KeyValueContextMenuContainer.js — react Source File
Architecture documentation for KeyValueContextMenuContainer.js, a javascript file in the react codebase. 10 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 1be4c533_22f9_d4ee_5d61_bdd15076cee1["KeyValueContextMenuContainer.js"] 913bb343_55ea_f1b8_08f5_b75cb0a92b76["context.js"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 913bb343_55ea_f1b8_08f5_b75cb0a92b76 f728765c_edc8_47f1_6565_9b8d47d128a2["backendAPI.js"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> f728765c_edc8_47f1_6565_9b8d47d128a2 21af3248_c15c_a61c_1f5b_7409a91b945c["Icon.js"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 21af3248_c15c_a61c_1f5b_7409a91b945c f23861b1_8332_6fa9_2862_ddd6110f3776["Icon"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> f23861b1_8332_6fa9_2862_ddd6110f3776 7eedd21d_ae6a_7447_035b_f34143688483["ContextMenuContainer.js"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 7eedd21d_ae6a_7447_035b_f34143688483 dde7bf17_8251_a55f_b1b1_f168003165bc["ContextMenuContainer"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> dde7bf17_8251_a55f_b1b1_f168003165bc 200e0284_4267_ca4f_a0f4_45be29594d83["KeyValueContextMenuContainer.css"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 200e0284_4267_ca4f_a0f4_45be29594d83 ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 baf70b0e_4867_b3ed_962a_e5c9ae820fef["store"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> baf70b0e_4867_b3ed_962a_e5c9ae820fef 4077b620_5c59_61c2_0910_273f565da757["bridge"] 1be4c533_22f9_d4ee_5d61_bdd15076cee1 --> 4077b620_5c59_61c2_0910_273f565da757 276bc34e_3008_101e_3cd7_cc895fcd3848["KeyValue.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 1be4c533_22f9_d4ee_5d61_bdd15076cee1 style 1be4c533_22f9_d4ee_5d61_bdd15076cee1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import * as React from 'react';
import {useContext} from 'react';
import {ContextMenuContext} from '../context';
import {
copyInspectedElementPath as copyInspectedElementPathAPI,
storeAsGlobal as storeAsGlobalAPI,
} from '../../../backendAPI';
import Icon from '../Icon';
import ContextMenuContainer from '../../ContextMenu/ContextMenuContainer';
import type Store from 'react-devtools-shared/src/devtools/store';
import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
import type {ContextMenuContextType} from '../context';
import styles from './KeyValueContextMenuContainer.css';
type Props = {
children: React.Node,
anchorElementRef: {
current: React.ElementRef<any> | null,
},
store: Store,
attributeSourceCanBeInspected: boolean,
bridge: FrontendBridge,
id: number,
path: Array<any>,
canBeCopiedToClipboard: boolean,
};
export default function KeyValueContextMenuContainer({
children,
anchorElementRef,
store,
attributeSourceCanBeInspected,
bridge,
id,
path,
canBeCopiedToClipboard,
}: Props): React.Node {
const {
isEnabledForInspectedElement: isContextMenuEnabledForInspectedElement,
viewAttributeSourceFunction,
} = useContext<ContextMenuContextType>(ContextMenuContext);
const menuItems = React.useMemo(() => {
const items = [
{
onClick: () => {
const rendererID = store.getRendererIDForElement(id);
if (rendererID !== null) {
// ... (76 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does KeyValueContextMenuContainer.js do?
KeyValueContextMenuContainer.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in KeyValueContextMenuContainer.js?
KeyValueContextMenuContainer.js defines 1 function(s): KeyValueContextMenuContainer.
What does KeyValueContextMenuContainer.js depend on?
KeyValueContextMenuContainer.js imports 10 module(s): ContextMenuContainer, ContextMenuContainer.js, Icon, Icon.js, KeyValueContextMenuContainer.css, backendAPI.js, bridge, context.js, and 2 more.
What files import KeyValueContextMenuContainer.js?
KeyValueContextMenuContainer.js is imported by 1 file(s): KeyValue.js.
Where is KeyValueContextMenuContainer.js in the architecture?
KeyValueContextMenuContainer.js is located at packages/react-devtools-shared/src/devtools/views/Components/KeyValueContextMenuContainer.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views/Components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free