Migrated ExportDataPluginSheet from js to ts
Summary: Migrated ExportDataPluginSheet.js to ExportDataPluginSheet.tsx Reviewed By: passy Differential Revision: D16731274 fbshipit-source-id: 5025f6eb34465d84e276f21855ee78cb98e8cd8d
This commit is contained in:
committed by
Facebook Github Bot
parent
b5c01bdf36
commit
46b032d5ed
@@ -15,7 +15,7 @@ import BugReporterDialog from './chrome/BugReporterDialog.tsx';
|
|||||||
import ErrorBar from './chrome/ErrorBar.tsx';
|
import ErrorBar from './chrome/ErrorBar.tsx';
|
||||||
import ShareSheet from './chrome/ShareSheet.js';
|
import ShareSheet from './chrome/ShareSheet.js';
|
||||||
import SignInSheet from './chrome/SignInSheet.js';
|
import SignInSheet from './chrome/SignInSheet.js';
|
||||||
import ExportDataPluginSheet from './chrome/ExportDataPluginSheet.js';
|
import ExportDataPluginSheet from './chrome/ExportDataPluginSheet.tsx';
|
||||||
import ShareSheetExportFile from './chrome/ShareSheetExportFile.js';
|
import ShareSheetExportFile from './chrome/ShareSheetExportFile.js';
|
||||||
import PluginContainer from './PluginContainer.js';
|
import PluginContainer from './PluginContainer.js';
|
||||||
import Sheet from './chrome/Sheet.js';
|
import Sheet from './chrome/Sheet.js';
|
||||||
|
|||||||
@@ -5,35 +5,40 @@
|
|||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {Component, connect} from 'flipper';
|
import {connect} from 'react-redux';
|
||||||
import type {ShareType} from '../reducers/application.tsx';
|
import React, {Component} from 'react';
|
||||||
import type {State as PluginState} from '../reducers/plugins.tsx';
|
import {ShareType} from '../reducers/application';
|
||||||
import type {State as PluginStatesState} from '../reducers/pluginStates.tsx';
|
import {State as PluginState} from '../reducers/plugins';
|
||||||
import type {ActiveSheet} from '../reducers/application.tsx';
|
import {State as PluginStatesState} from '../reducers/pluginStates';
|
||||||
import {selectedPlugins as actionForSelectedPlugins} from '../reducers/plugins.tsx';
|
import {State as Store} from '../reducers';
|
||||||
import {getActivePersistentPlugins} from '../utils/pluginUtils.tsx';
|
import {ActiveSheet} from '../reducers/application';
|
||||||
|
import {selectedPlugins as actionForSelectedPlugins} from '../reducers/plugins';
|
||||||
|
import {getActivePersistentPlugins} from '../utils/pluginUtils';
|
||||||
import {
|
import {
|
||||||
ACTIVE_SHEET_SHARE_DATA,
|
ACTIVE_SHEET_SHARE_DATA,
|
||||||
setActiveSheet as getActiveSheetAction,
|
setActiveSheet as getActiveSheetAction,
|
||||||
setExportDataToFileActiveSheet as getExportDataToFileActiveSheetAction,
|
setExportDataToFileActiveSheet as getExportDataToFileActiveSheetAction,
|
||||||
} from '../reducers/application.tsx';
|
} from '../reducers/application';
|
||||||
import SelectPluginSheet from './SelectPluginSheet';
|
import SelectPluginSheet from './SelectPluginSheet';
|
||||||
|
|
||||||
type OwnProps = {|
|
type OwnProps = {
|
||||||
onHide: () => mixed,
|
onHide: () => any;
|
||||||
|};
|
};
|
||||||
|
|
||||||
type Props = {|
|
type StateFromProps = {
|
||||||
...OwnProps,
|
share: ShareType;
|
||||||
share: ShareType,
|
plugins: PluginState;
|
||||||
plugins: PluginState,
|
pluginStates: PluginStatesState;
|
||||||
pluginStates: PluginStatesState,
|
};
|
||||||
selectedPlugins: (payload: Array<string>) => void,
|
|
||||||
setActiveSheet: (payload: ActiveSheet) => void,
|
|
||||||
setExportDataToFileActiveSheet: (payload: string) => void,
|
|
||||||
|};
|
|
||||||
|
|
||||||
class ExportDataPluginSheet extends Component<Props, *> {
|
type DispatchFromProps = {
|
||||||
|
selectedPlugins: (payload: Array<string>) => void;
|
||||||
|
setActiveSheet: (payload: ActiveSheet) => void;
|
||||||
|
setExportDataToFileActiveSheet: (payload: string) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
||||||
|
class ExportDataPluginSheet extends Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const {plugins, pluginStates, onHide} = this.props;
|
const {plugins, pluginStates, onHide} = this.props;
|
||||||
return (
|
return (
|
||||||
@@ -79,9 +84,9 @@ class ExportDataPluginSheet extends Component<Props, *> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect<Props, OwnProps, _, _, _, _>(
|
export default connect<StateFromProps, DispatchFromProps, OwnProps, Store>(
|
||||||
({application: {share}, plugins, pluginStates}) => ({
|
({application: {share}, plugins, pluginStates}) => ({
|
||||||
share: share,
|
share,
|
||||||
plugins,
|
plugins,
|
||||||
pluginStates,
|
pluginStates,
|
||||||
}),
|
}),
|
||||||
Reference in New Issue
Block a user