@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
15 lines (14 loc) • 1.28 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useSelector } from 'react-redux';
import { ReportNameSelector } from './ReportNameSelector';
import { ReportFormatSelector } from './ReportFormatSelector';
import { ExportDestinationPicker } from './ExportDestinationPicker';
import { useAdaptable } from '../AdaptableContext';
import { Flex } from '../../components/Flex';
export const ExportStatusBar = () => {
const adaptable = useAdaptable();
const exportApi = adaptable.api.exportApi;
const currentReportName = useSelector((state) => state.Export.CurrentReport);
const currentFormat = useSelector((state) => state.Export.CurrentFormat);
return (_jsxs(_Fragment, { children: [_jsxs(Flex, { className: "twa:gap-1", children: [_jsx(ReportNameSelector, { viewType: "StatusBar", reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }), _jsx(ReportFormatSelector, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) })] }), _jsx(ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })] }));
};