Move ManagedDataInspector from js to tsx
Summary: As per the title Reviewed By: danielbuechele Differential Revision: D16764792 fbshipit-source-id: 6dd9953c3434c6e56b6ee50e3708f3be350c907f
This commit is contained in:
committed by
Facebook Github Bot
parent
709830c8d2
commit
9294bf0b82
@@ -93,7 +93,7 @@ export {
|
||||
} from './ui/components/data-inspector/DataInspector.tsx';
|
||||
export {
|
||||
default as ManagedDataInspector,
|
||||
} from './ui/components/data-inspector/ManagedDataInspector.js';
|
||||
} from './ui/components/data-inspector/ManagedDataInspector.tsx';
|
||||
export {
|
||||
default as DataDescription,
|
||||
} from './ui/components/data-inspector/DataDescription.js';
|
||||
|
||||
@@ -5,49 +5,47 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {
|
||||
DataValueExtractor,
|
||||
DataInspectorExpanded,
|
||||
} from './DataInspector.tsx';
|
||||
import {DataValueExtractor, DataInspectorExpanded} from './DataInspector';
|
||||
import {PureComponent} from 'react';
|
||||
import DataInspector from './DataInspector.tsx';
|
||||
import DataInspector from './DataInspector';
|
||||
import React from 'react';
|
||||
|
||||
type ManagedDataInspectorProps = {|
|
||||
type ManagedDataInspectorProps = {
|
||||
/**
|
||||
* Object to inspect.
|
||||
*/
|
||||
data: any,
|
||||
data: any;
|
||||
/**
|
||||
* Object to compare with the provided `data` property.
|
||||
* Differences will be styled accordingly in the UI.
|
||||
*/
|
||||
diff?: any,
|
||||
diff?: any;
|
||||
/**
|
||||
* Whether to expand the root by default.
|
||||
*/
|
||||
expandRoot?: boolean,
|
||||
expandRoot?: boolean;
|
||||
/**
|
||||
* An optional callback that will explode a value into its type and value.
|
||||
* Useful for inspecting serialised data.
|
||||
*/
|
||||
extractValue?: DataValueExtractor,
|
||||
extractValue?: DataValueExtractor;
|
||||
/**
|
||||
* Callback when a value is edited.
|
||||
*/
|
||||
setValue?: (path: Array<string>, val: any) => void,
|
||||
setValue?: (path: Array<string>, val: any) => void;
|
||||
/**
|
||||
* Whether all objects and arrays should be collapsed by default.
|
||||
*/
|
||||
collapsed?: boolean,
|
||||
collapsed?: boolean;
|
||||
/**
|
||||
* Object of all properties that will have tooltips
|
||||
*/
|
||||
tooltips?: Object,
|
||||
|};
|
||||
tooltips?: Object;
|
||||
};
|
||||
|
||||
type ManagedDataInspectorState = {|
|
||||
expanded: DataInspectorExpanded,
|
||||
|};
|
||||
type ManagedDataInspectorState = {
|
||||
expanded: DataInspectorExpanded;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrapper around `DataInspector` that handles expanded state.
|
||||
@@ -57,7 +55,7 @@ type ManagedDataInspectorState = {|
|
||||
*/
|
||||
export default class ManagedDataInspector extends PureComponent<
|
||||
ManagedDataInspectorProps,
|
||||
ManagedDataInspectorState,
|
||||
ManagedDataInspectorState
|
||||
> {
|
||||
constructor(props: ManagedDataInspectorProps, context: Object) {
|
||||
super(props, context);
|
||||
@@ -10,7 +10,7 @@ import type {PluginClient} from '../../../plugin.tsx';
|
||||
import type Client from '../../../Client.tsx';
|
||||
import type {Logger} from '../../../fb-interfaces/Logger.js';
|
||||
import Panel from '../Panel.tsx';
|
||||
import ManagedDataInspector from '../data-inspector/ManagedDataInspector.js';
|
||||
import ManagedDataInspector from '../data-inspector/ManagedDataInspector.tsx';
|
||||
import {Component} from 'react';
|
||||
import {Console} from '../console.tsx';
|
||||
import GK from '../../../fb-stubs/GK.tsx';
|
||||
|
||||
@@ -61,7 +61,7 @@ export {
|
||||
} from './components/data-inspector/DataInspector.tsx';
|
||||
export {
|
||||
default as ManagedDataInspector,
|
||||
} from './components/data-inspector/ManagedDataInspector.js';
|
||||
} from './components/data-inspector/ManagedDataInspector.tsx';
|
||||
export {
|
||||
default as DataDescription,
|
||||
} from './components/data-inspector/DataDescription.js';
|
||||
|
||||
Reference in New Issue
Block a user