KeyValue.js — react Source File
Architecture documentation for KeyValue.js, a javascript file in the react codebase. 29 imports, 6 dependents.
Entity Profile
Dependency Diagram
graph LR 276bc34e_3008_101e_3cd7_cc895fcd3848["KeyValue.js"] 913bb343_55ea_f1b8_08f5_b75cb0a92b76["context.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 913bb343_55ea_f1b8_08f5_b75cb0a92b76 04e82e8f_4cf5_68df_3f32_fe28fb509921["EditableName.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 04e82e8f_4cf5_68df_3f32_fe28fb509921 ca8114b4_a39e_775f_8cfb_ea560d8ed77f["EditableName"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> ca8114b4_a39e_775f_8cfb_ea560d8ed77f dc084a98_cfc9_b696_ce0b_8abf1ee07f6f["EditableValue.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> dc084a98_cfc9_b696_ce0b_8abf1ee07f6f 0e75ec50_6792_4e19_9cef_0f7f8a5ca3af["EditableValue"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 0e75ec50_6792_4e19_9cef_0f7f8a5ca3af bb770434_43dc_71aa_77ec_098236a83413["NewArrayValue.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> bb770434_43dc_71aa_77ec_098236a83413 fafa7f21_728a_fa34_ea0d_ee1f2426e2aa["NewArrayValue"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> fafa7f21_728a_fa34_ea0d_ee1f2426e2aa 0e638bf4_827b_30d0_21d6_77d4d615d353["NewKeyValue.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 0e638bf4_827b_30d0_21d6_77d4d615d353 a6a86905_58d7_fb49_1ae4_1168e4be0901["NewKeyValue"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> a6a86905_58d7_fb49_1ae4_1168e4be0901 cc9092f8_40d3_7bfd_6552_ebe71cb60a00["LoadingAnimation.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> cc9092f8_40d3_7bfd_6552_ebe71cb60a00 69abf117_7807_801a_56b5_5d173c2b9bc7["LoadingAnimation"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 69abf117_7807_801a_56b5_5d173c2b9bc7 5a801236_0190_8913_962e_81b4d9f36895["ExpandCollapseToggle.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 5a801236_0190_8913_962e_81b4d9f36895 167535af_0ec0_c7dd_3c85_20c6b56b20e7["ExpandCollapseToggle"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> 167535af_0ec0_c7dd_3c85_20c6b56b20e7 d7b27d30_728f_ba37_ed97_d371fbd3de62["utils.js"] 276bc34e_3008_101e_3cd7_cc895fcd3848 --> d7b27d30_728f_ba37_ed97_d371fbd3de62 style 276bc34e_3008_101e_3cd7_cc895fcd3848 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 {useTransition, useContext, useRef, useState, useMemo} from 'react';
import {OptionsContext} from '../context';
import EditableName from './EditableName';
import EditableValue from './EditableValue';
import NewArrayValue from './NewArrayValue';
import NewKeyValue from './NewKeyValue';
import LoadingAnimation from './LoadingAnimation';
import ExpandCollapseToggle from './ExpandCollapseToggle';
import {alphaSortEntries, getMetaValueLabel} from '../utils';
import {meta} from '../../../hydration';
import Store from '../../store';
import {parseHookPathForEdit} from './utils';
import styles from './KeyValue.css';
import Button from 'react-devtools-shared/src/devtools/views/Button';
import ButtonIcon from 'react-devtools-shared/src/devtools/views/ButtonIcon';
import isArray from 'react-devtools-shared/src/isArray';
import {InspectedElementContext} from './InspectedElementContext';
import {PROTOCOLS_SUPPORTED_AS_LINKS_IN_KEY_VALUE} from './constants';
import KeyValueContextMenuContainer from './KeyValueContextMenuContainer';
import {ContextMenuContext} from '../context';
import type {ContextMenuContextType} from '../context';
import type {InspectedElement} from 'react-devtools-shared/src/frontend/types';
import type {Element} from 'react-devtools-shared/src/frontend/types';
import type {Element as ReactElement} from 'react';
import type {FrontendBridge} from 'react-devtools-shared/src/bridge';
// $FlowFixMe[method-unbinding]
const hasOwnProperty = Object.prototype.hasOwnProperty;
type Type = 'props' | 'state' | 'context' | 'hooks';
type KeyValueProps = {
alphaSort: boolean,
bridge: FrontendBridge,
canDeletePaths: boolean,
canEditValues: boolean,
canRenamePaths: boolean,
canRenamePathsAtDepth?: (depth: number) => boolean,
depth: number,
element: Element,
hidden: boolean,
hookID?: ?number,
hookName?: ?string,
inspectedElement: InspectedElement,
isDirectChildOfAnArray?: boolean,
name: string,
path: Array<any>,
pathRoot: Type,
store: Store,
// ... (527 more lines)
Domain
Subdomains
Dependencies
- Button
- ButtonIcon
- EditableName
- EditableName.js
- EditableValue
- EditableValue.js
- ExpandCollapseToggle
- ExpandCollapseToggle.js
- InspectedElementContext.js
- KeyValue.css
- KeyValueContextMenuContainer
- KeyValueContextMenuContainer.js
- LoadingAnimation
- LoadingAnimation.js
- NewArrayValue
- NewArrayValue.js
- NewKeyValue
- NewKeyValue.js
- alphaSortEntries
- bridge
- constants.js
- context.js
- hydration.js
- isArray
- react
- store.js
- types
- utils.js
- utils.js
Imported By
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementContextTree.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementHooksTree.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementPropsTree.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementStateTree.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementStyleXPlugin.js
- packages/react-devtools-shared/src/devtools/views/Components/InspectedElementSuspendedBy.js
Source
Frequently Asked Questions
What does KeyValue.js do?
KeyValue.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 KeyValue.js?
KeyValue.js defines 4 function(s): DeleteToggle, KeyValue, KeyValueProps.canRenamePathsAtDepth, children.
What does KeyValue.js depend on?
KeyValue.js imports 29 module(s): Button, ButtonIcon, EditableName, EditableName.js, EditableValue, EditableValue.js, ExpandCollapseToggle, ExpandCollapseToggle.js, and 21 more.
What files import KeyValue.js?
KeyValue.js is imported by 6 file(s): InspectedElementContextTree.js, InspectedElementHooksTree.js, InspectedElementPropsTree.js, InspectedElementStateTree.js, InspectedElementStyleXPlugin.js, InspectedElementSuspendedBy.js.
Where is KeyValue.js in the architecture?
KeyValue.js is located at packages/react-devtools-shared/src/devtools/views/Components/KeyValue.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