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';
|
} from './ui/components/data-inspector/DataInspector.tsx';
|
||||||
export {
|
export {
|
||||||
default as ManagedDataInspector,
|
default as ManagedDataInspector,
|
||||||
} from './ui/components/data-inspector/ManagedDataInspector.js';
|
} from './ui/components/data-inspector/ManagedDataInspector.tsx';
|
||||||
export {
|
export {
|
||||||
default as DataDescription,
|
default as DataDescription,
|
||||||
} from './ui/components/data-inspector/DataDescription.js';
|
} from './ui/components/data-inspector/DataDescription.js';
|
||||||
|
|||||||
@@ -5,49 +5,47 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import {DataValueExtractor, DataInspectorExpanded} from './DataInspector';
|
||||||
DataValueExtractor,
|
|
||||||
DataInspectorExpanded,
|
|
||||||
} from './DataInspector.tsx';
|
|
||||||
import {PureComponent} from 'react';
|
import {PureComponent} from 'react';
|
||||||
import DataInspector from './DataInspector.tsx';
|
import DataInspector from './DataInspector';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
type ManagedDataInspectorProps = {|
|
type ManagedDataInspectorProps = {
|
||||||
/**
|
/**
|
||||||
* Object to inspect.
|
* Object to inspect.
|
||||||
*/
|
*/
|
||||||
data: any,
|
data: any;
|
||||||
/**
|
/**
|
||||||
* Object to compare with the provided `data` property.
|
* Object to compare with the provided `data` property.
|
||||||
* Differences will be styled accordingly in the UI.
|
* Differences will be styled accordingly in the UI.
|
||||||
*/
|
*/
|
||||||
diff?: any,
|
diff?: any;
|
||||||
/**
|
/**
|
||||||
* Whether to expand the root by default.
|
* Whether to expand the root by default.
|
||||||
*/
|
*/
|
||||||
expandRoot?: boolean,
|
expandRoot?: boolean;
|
||||||
/**
|
/**
|
||||||
* An optional callback that will explode a value into its type and value.
|
* An optional callback that will explode a value into its type and value.
|
||||||
* Useful for inspecting serialised data.
|
* Useful for inspecting serialised data.
|
||||||
*/
|
*/
|
||||||
extractValue?: DataValueExtractor,
|
extractValue?: DataValueExtractor;
|
||||||
/**
|
/**
|
||||||
* Callback when a value is edited.
|
* 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.
|
* Whether all objects and arrays should be collapsed by default.
|
||||||
*/
|
*/
|
||||||
collapsed?: boolean,
|
collapsed?: boolean;
|
||||||
/**
|
/**
|
||||||
* Object of all properties that will have tooltips
|
* Object of all properties that will have tooltips
|
||||||
*/
|
*/
|
||||||
tooltips?: Object,
|
tooltips?: Object;
|
||||||
|};
|
};
|
||||||
|
|
||||||
type ManagedDataInspectorState = {|
|
type ManagedDataInspectorState = {
|
||||||
expanded: DataInspectorExpanded,
|
expanded: DataInspectorExpanded;
|
||||||
|};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper around `DataInspector` that handles expanded state.
|
* Wrapper around `DataInspector` that handles expanded state.
|
||||||
@@ -57,7 +55,7 @@ type ManagedDataInspectorState = {|
|
|||||||
*/
|
*/
|
||||||
export default class ManagedDataInspector extends PureComponent<
|
export default class ManagedDataInspector extends PureComponent<
|
||||||
ManagedDataInspectorProps,
|
ManagedDataInspectorProps,
|
||||||
ManagedDataInspectorState,
|
ManagedDataInspectorState
|
||||||
> {
|
> {
|
||||||
constructor(props: ManagedDataInspectorProps, context: Object) {
|
constructor(props: ManagedDataInspectorProps, context: Object) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
@@ -10,7 +10,7 @@ import type {PluginClient} from '../../../plugin.tsx';
|
|||||||
import type Client from '../../../Client.tsx';
|
import type Client from '../../../Client.tsx';
|
||||||
import type {Logger} from '../../../fb-interfaces/Logger.js';
|
import type {Logger} from '../../../fb-interfaces/Logger.js';
|
||||||
import Panel from '../Panel.tsx';
|
import Panel from '../Panel.tsx';
|
||||||
import ManagedDataInspector from '../data-inspector/ManagedDataInspector.js';
|
import ManagedDataInspector from '../data-inspector/ManagedDataInspector.tsx';
|
||||||
import {Component} from 'react';
|
import {Component} from 'react';
|
||||||
import {Console} from '../console.tsx';
|
import {Console} from '../console.tsx';
|
||||||
import GK from '../../../fb-stubs/GK.tsx';
|
import GK from '../../../fb-stubs/GK.tsx';
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export {
|
|||||||
} from './components/data-inspector/DataInspector.tsx';
|
} from './components/data-inspector/DataInspector.tsx';
|
||||||
export {
|
export {
|
||||||
default as ManagedDataInspector,
|
default as ManagedDataInspector,
|
||||||
} from './components/data-inspector/ManagedDataInspector.js';
|
} from './components/data-inspector/ManagedDataInspector.tsx';
|
||||||
export {
|
export {
|
||||||
default as DataDescription,
|
default as DataDescription,
|
||||||
} from './components/data-inspector/DataDescription.js';
|
} from './components/data-inspector/DataDescription.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user