/** * Copyright 2018-present Facebook. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * @format */ import {Component} from 'react'; import FlexRow from '../FlexRow.js'; import {Elements} from './elements.js'; export type ElementID = string; export type ElementSearchResultSet = {| query: string, matches: Set, |}; export type ElementData = { [name: ElementID]: { [key: string]: | string | number | boolean | {| __type__: string, value: any, |}, }, }; export type ElementAttribute = {| name: string, value: string, |}; export type ElementExtraInfo = {| nonAXWithAXChild?: boolean, linkedAXNode?: string, |}; export type Element = {| id: ElementID, name: string, expanded: boolean, children: Array, attributes: Array, data: ElementData, decoration: string, extraInfo: ElementExtraInfo, |}; export default class ElementsInspector extends Component<{ onElementExpanded: (key: ElementID, deep: boolean) => void, onElementSelected: (key: ElementID) => void, onElementHovered: ?(key: ?ElementID) => void, onValueChanged: ?(path: Array, val: any) => void, selected: ?ElementID, searchResults?: ?ElementSearchResultSet, root: ?ElementID, elements: {[key: ElementID]: Element}, useAppSidebar?: boolean, }> { render() { const { selected, elements, root, onElementExpanded, onElementSelected, onElementHovered, searchResults, } = this.props; return ( ); } }