@adaptabletools/adaptable-cjs
Version:
Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
22 lines (21 loc) • 1.64 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExportStatusBar = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const react_redux_1 = require("react-redux");
const ReportNameSelector_1 = require("./ReportNameSelector");
const ReportFormatSelector_1 = require("./ReportFormatSelector");
const ExportDestinationPicker_1 = require("./ExportDestinationPicker");
const AdaptableContext_1 = require("../AdaptableContext");
const ExportStatusBar = () => {
const adaptable = (0, AdaptableContext_1.useAdaptable)();
const exportApi = adaptable.api.exportApi;
const currentReportName = (0, react_redux_1.useSelector)((state) => state.Export.CurrentReport);
const currentFormat = (0, react_redux_1.useSelector)((state) => state.Export.CurrentFormat);
return (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement(ReportNameSelector_1.ReportNameSelector, { viewType: "StatusBar", size: 'small', reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
react_1.default.createElement(ReportFormatSelector_1.ReportFormatSelector, { viewType: "StatusBar", size: 'small', reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) }),
react_1.default.createElement(ExportDestinationPicker_1.ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })));
};
exports.ExportStatusBar = ExportStatusBar;