@mui/x-data-grid-premium 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4052 -0
- package/DataGridPremium/DataGridPremium.d.ts +9 -0
- package/DataGridPremium/DataGridPremium.js +986 -0
- package/DataGridPremium/index.d.ts +2 -0
- package/DataGridPremium/index.js +2 -0
- package/DataGridPremium/package.json +6 -0
- package/DataGridPremium/useDataGridPremiumComponent.d.ts +4 -0
- package/DataGridPremium/useDataGridPremiumComponent.js +78 -0
- package/DataGridPremium/useDataGridPremiumProps.d.ts +6 -0
- package/DataGridPremium/useDataGridPremiumProps.js +37 -0
- package/LICENSE +12 -0
- package/README.md +31 -0
- package/components/GridExcelExportMenuItem.d.ts +9 -0
- package/components/GridExcelExportMenuItem.js +32 -0
- package/components/GridGroupingColumnLeafCell.d.ts +4 -0
- package/components/GridGroupingColumnLeafCell.js +22 -0
- package/components/GridGroupingCriteriaCell.d.ts +7 -0
- package/components/GridGroupingCriteriaCell.js +78 -0
- package/components/GridRowGroupableColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupableColumnMenuItems.js +63 -0
- package/components/GridRowGroupingColumnMenuItems.d.ts +11 -0
- package/components/GridRowGroupingColumnMenuItems.js +58 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/package.json +6 -0
- package/hooks/features/export/gridExcelExportInterface.d.ts +58 -0
- package/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/hooks/features/export/index.d.ts +1 -0
- package/hooks/features/export/index.js +1 -0
- package/hooks/features/export/serializer/excelSerializer.d.ts +14 -0
- package/hooks/features/export/serializer/excelSerializer.js +218 -0
- package/hooks/features/export/useGridExcelExport.d.ts +10 -0
- package/hooks/features/export/useGridExcelExport.js +77 -0
- package/hooks/features/index.d.ts +2 -0
- package/hooks/features/index.js +3 -0
- package/hooks/features/rowGrouping/createGroupingColDef.d.ts +42 -0
- package/hooks/features/rowGrouping/createGroupingColDef.js +318 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +37 -0
- package/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +4 -0
- package/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +27 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +139 -0
- package/hooks/features/rowGrouping/index.d.ts +3 -0
- package/hooks/features/rowGrouping/index.js +3 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +11 -0
- package/hooks/features/rowGrouping/useGridRowGrouping.js +200 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +4 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +201 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +3 -0
- package/hooks/package.json +6 -0
- package/hooks/utils/index.d.ts +1 -0
- package/hooks/utils/index.js +1 -0
- package/hooks/utils/useGridApiContext.d.ts +4 -0
- package/hooks/utils/useGridApiContext.js +2 -0
- package/hooks/utils/useGridApiRef.d.ts +4 -0
- package/hooks/utils/useGridApiRef.js +2 -0
- package/hooks/utils/useGridRootProps.d.ts +2 -0
- package/hooks/utils/useGridRootProps.js +2 -0
- package/hooks/utils/useKeepGroupedColumnsHidden.d.ts +12 -0
- package/hooks/utils/useKeepGroupedColumnsHidden.js +50 -0
- package/index.d.ts +22 -0
- package/index.js +25 -0
- package/legacy/DataGridPremium/DataGridPremium.js +986 -0
- package/legacy/DataGridPremium/index.js +2 -0
- package/legacy/DataGridPremium/useDataGridPremiumComponent.js +78 -0
- package/legacy/DataGridPremium/useDataGridPremiumProps.js +46 -0
- package/legacy/components/GridExcelExportMenuItem.js +30 -0
- package/legacy/components/GridGroupingColumnLeafCell.js +20 -0
- package/legacy/components/GridGroupingCriteriaCell.js +74 -0
- package/legacy/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/legacy/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/legacy/components/index.js +1 -0
- package/legacy/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/legacy/hooks/features/export/index.js +1 -0
- package/legacy/hooks/features/export/serializer/excelSerializer.js +260 -0
- package/legacy/hooks/features/export/useGridExcelExport.js +111 -0
- package/legacy/hooks/features/index.js +3 -0
- package/legacy/hooks/features/rowGrouping/createGroupingColDef.js +319 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingSelector.js +13 -0
- package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +147 -0
- package/legacy/hooks/features/rowGrouping/index.js +3 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +206 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +215 -0
- package/legacy/hooks/index.js +3 -0
- package/legacy/hooks/utils/index.js +1 -0
- package/legacy/hooks/utils/useGridApiContext.js +2 -0
- package/legacy/hooks/utils/useGridApiRef.js +2 -0
- package/legacy/hooks/utils/useGridRootProps.js +2 -0
- package/legacy/hooks/utils/useKeepGroupedColumnsHidden.js +50 -0
- package/legacy/index.js +25 -0
- package/legacy/models/dataGridPremiumProps.js +1 -0
- package/legacy/models/gridApiPremium.js +1 -0
- package/legacy/models/gridGroupingValueGetterParams.js +1 -0
- package/legacy/models/gridStatePremium.js +1 -0
- package/legacy/models/index.js +1 -0
- package/legacy/typeOverloads/index.js +1 -0
- package/legacy/typeOverloads/modules.js +33 -0
- package/legacy/typeOverloads/reexports.js +6 -0
- package/legacy/utils/releaseInfo.js +15 -0
- package/models/dataGridPremiumProps.d.ts +64 -0
- package/models/dataGridPremiumProps.js +1 -0
- package/models/gridApiPremium.d.ts +13 -0
- package/models/gridApiPremium.js +1 -0
- package/models/gridGroupingValueGetterParams.d.ts +31 -0
- package/models/gridGroupingValueGetterParams.js +1 -0
- package/models/gridStatePremium.d.ts +14 -0
- package/models/gridStatePremium.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/models/package.json +6 -0
- package/modern/DataGridPremium/DataGridPremium.js +986 -0
- package/modern/DataGridPremium/index.js +2 -0
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +76 -0
- package/modern/DataGridPremium/useDataGridPremiumProps.js +37 -0
- package/modern/components/GridExcelExportMenuItem.js +32 -0
- package/modern/components/GridGroupingColumnLeafCell.js +20 -0
- package/modern/components/GridGroupingCriteriaCell.js +76 -0
- package/modern/components/GridRowGroupableColumnMenuItems.js +61 -0
- package/modern/components/GridRowGroupingColumnMenuItems.js +56 -0
- package/modern/components/index.js +1 -0
- package/modern/hooks/features/export/gridExcelExportInterface.js +1 -0
- package/modern/hooks/features/export/index.js +1 -0
- package/modern/hooks/features/export/serializer/excelSerializer.js +216 -0
- package/modern/hooks/features/export/useGridExcelExport.js +73 -0
- package/modern/hooks/features/index.js +3 -0
- package/modern/hooks/features/rowGrouping/createGroupingColDef.js +302 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +137 -0
- package/modern/hooks/features/rowGrouping/index.js +3 -0
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +192 -0
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +201 -0
- package/modern/hooks/index.js +3 -0
- package/modern/hooks/utils/index.js +1 -0
- package/modern/hooks/utils/useGridApiContext.js +2 -0
- package/modern/hooks/utils/useGridApiRef.js +2 -0
- package/modern/hooks/utils/useGridRootProps.js +2 -0
- package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +46 -0
- package/modern/index.js +25 -0
- package/modern/models/dataGridPremiumProps.js +1 -0
- package/modern/models/gridApiPremium.js +1 -0
- package/modern/models/gridGroupingValueGetterParams.js +1 -0
- package/modern/models/gridStatePremium.js +1 -0
- package/modern/models/index.js +1 -0
- package/modern/typeOverloads/index.js +1 -0
- package/modern/typeOverloads/modules.js +33 -0
- package/modern/typeOverloads/reexports.js +6 -0
- package/modern/utils/releaseInfo.js +15 -0
- package/node/DataGridPremium/DataGridPremium.js +1009 -0
- package/node/DataGridPremium/index.js +30 -0
- package/node/DataGridPremium/useDataGridPremiumComponent.js +91 -0
- package/node/DataGridPremium/useDataGridPremiumProps.js +57 -0
- package/node/components/GridExcelExportMenuItem.js +49 -0
- package/node/components/GridGroupingColumnLeafCell.js +38 -0
- package/node/components/GridGroupingCriteriaCell.js +99 -0
- package/node/components/GridRowGroupableColumnMenuItems.js +82 -0
- package/node/components/GridRowGroupingColumnMenuItems.js +78 -0
- package/node/components/index.js +18 -0
- package/node/hooks/features/export/gridExcelExportInterface.js +5 -0
- package/node/hooks/features/export/index.js +18 -0
- package/node/hooks/features/export/serializer/excelSerializer.js +233 -0
- package/node/hooks/features/export/useGridExcelExport.js +95 -0
- package/node/hooks/features/index.js +31 -0
- package/node/hooks/features/rowGrouping/createGroupingColDef.js +341 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +5 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingSelector.js +18 -0
- package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +172 -0
- package/node/hooks/features/rowGrouping/index.js +51 -0
- package/node/hooks/features/rowGrouping/useGridRowGrouping.js +228 -0
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +223 -0
- package/node/hooks/index.js +31 -0
- package/node/hooks/utils/index.js +18 -0
- package/node/hooks/utils/useGridApiContext.js +11 -0
- package/node/hooks/utils/useGridApiRef.js +11 -0
- package/node/hooks/utils/useGridRootProps.js +11 -0
- package/node/hooks/utils/useKeepGroupedColumnsHidden.js +66 -0
- package/node/index.js +272 -0
- package/node/models/dataGridPremiumProps.js +5 -0
- package/node/models/gridApiPremium.js +5 -0
- package/node/models/gridGroupingValueGetterParams.js +5 -0
- package/node/models/gridStatePremium.js +5 -0
- package/node/models/index.js +18 -0
- package/node/typeOverloads/index.js +3 -0
- package/node/typeOverloads/modules.js +34 -0
- package/node/typeOverloads/reexports.js +29 -0
- package/node/utils/releaseInfo.js +25 -0
- package/package.json +63 -0
- package/typeOverloads/index.d.ts +1 -0
- package/typeOverloads/index.js +1 -0
- package/typeOverloads/modules.d.ts +0 -0
- package/typeOverloads/modules.js +33 -0
- package/typeOverloads/package.json +6 -0
- package/typeOverloads/reexports.d.ts +22 -0
- package/typeOverloads/reexports.js +6 -0
- package/utils/releaseInfo.d.ts +1 -0
- package/utils/releaseInfo.js +15 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GridApiPremium } from '../models/gridApiPremium';
|
|
3
|
+
import { DataGridPremiumProcessedProps } from '../models/dataGridPremiumProps';
|
|
4
|
+
export declare const useDataGridPremiumComponent: (inputApiRef: React.MutableRefObject<GridApiPremium> | undefined, props: DataGridPremiumProcessedProps) => React.MutableRefObject<GridApiPremium>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing_new, useGridEditing_old, editingStateInitializer_old, editingStateInitializer_new, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, selectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelCache, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
// Premium-only features
|
|
3
|
+
import { useGridRowGrouping, rowGroupingStateInitializer } from '../hooks/features/rowGrouping/useGridRowGrouping';
|
|
4
|
+
import { useGridRowGroupingPreProcessors } from '../hooks/features/rowGrouping/useGridRowGroupingPreProcessors';
|
|
5
|
+
import { useGridExcelExport } from '../hooks/features/export/useGridExcelExport';
|
|
6
|
+
export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
7
|
+
var _props$experimentalFe, _props$experimentalFe2;
|
|
8
|
+
|
|
9
|
+
const apiRef = useGridInitialization(inputApiRef, props);
|
|
10
|
+
/**
|
|
11
|
+
* Register all pre-processors called during state initialization here.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
useGridSelectionPreProcessors(apiRef, props);
|
|
15
|
+
useGridRowReorderPreProcessors(apiRef, props);
|
|
16
|
+
useGridRowGroupingPreProcessors(apiRef, props);
|
|
17
|
+
useGridTreeDataPreProcessors(apiRef, props);
|
|
18
|
+
useGridDetailPanelPreProcessors(apiRef, props); // The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
|
|
19
|
+
// Because it changes the order of the columns.
|
|
20
|
+
|
|
21
|
+
useGridColumnPinningPreProcessors(apiRef, props);
|
|
22
|
+
useGridRowsPreProcessors(apiRef);
|
|
23
|
+
/**
|
|
24
|
+
* Register all state initializers here.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
useGridInitializeState(rowGroupingStateInitializer, apiRef, props);
|
|
28
|
+
useGridInitializeState(selectionStateInitializer, apiRef, props);
|
|
29
|
+
useGridInitializeState(detailPanelStateInitializer, apiRef, props);
|
|
30
|
+
useGridInitializeState(columnPinningStateInitializer, apiRef, props);
|
|
31
|
+
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
32
|
+
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
33
|
+
useGridInitializeState((_props$experimentalFe = props.experimentalFeatures) != null && _props$experimentalFe.newEditingApi ? editingStateInitializer_new : editingStateInitializer_old, apiRef, props);
|
|
34
|
+
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
35
|
+
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
36
|
+
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
37
|
+
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
38
|
+
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
39
|
+
useGridInitializeState(columnReorderStateInitializer, apiRef, props);
|
|
40
|
+
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
41
|
+
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
42
|
+
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
43
|
+
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
44
|
+
useGridRowGrouping(apiRef, props);
|
|
45
|
+
useGridTreeData(apiRef);
|
|
46
|
+
useGridKeyboardNavigation(apiRef, props);
|
|
47
|
+
useGridSelection(apiRef, props);
|
|
48
|
+
useGridDetailPanel(apiRef, props);
|
|
49
|
+
useGridColumnPinning(apiRef, props);
|
|
50
|
+
useGridColumns(apiRef, props);
|
|
51
|
+
useGridRows(apiRef, props);
|
|
52
|
+
useGridParamsApi(apiRef);
|
|
53
|
+
useGridColumnSpanning(apiRef);
|
|
54
|
+
useGridDetailPanelCache(apiRef, props);
|
|
55
|
+
const useGridEditing = (_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.newEditingApi ? useGridEditing_new : useGridEditing_old;
|
|
56
|
+
useGridEditing(apiRef, props);
|
|
57
|
+
useGridFocus(apiRef, props);
|
|
58
|
+
useGridPreferencesPanel(apiRef);
|
|
59
|
+
useGridFilter(apiRef, props);
|
|
60
|
+
useGridSorting(apiRef, props);
|
|
61
|
+
useGridDensity(apiRef, props);
|
|
62
|
+
useGridColumnReorder(apiRef, props);
|
|
63
|
+
useGridColumnResize(apiRef, props);
|
|
64
|
+
useGridPagination(apiRef, props);
|
|
65
|
+
useGridRowsMeta(apiRef, props);
|
|
66
|
+
useGridRowReorder(apiRef, props);
|
|
67
|
+
useGridScroll(apiRef, props);
|
|
68
|
+
useGridInfiniteLoader(apiRef, props);
|
|
69
|
+
useGridColumnMenu(apiRef);
|
|
70
|
+
useGridCsvExport(apiRef);
|
|
71
|
+
useGridPrintExport(apiRef, props);
|
|
72
|
+
useGridExcelExport(apiRef);
|
|
73
|
+
useGridClipboard(apiRef);
|
|
74
|
+
useGridDimensions(apiRef, props);
|
|
75
|
+
useGridEvents(apiRef, props);
|
|
76
|
+
useGridStatePersistence(apiRef);
|
|
77
|
+
return apiRef;
|
|
78
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DataGridPremiumProps, DataGridPremiumProcessedProps, DataGridPremiumPropsWithDefaultValue } from '../models/dataGridPremiumProps';
|
|
2
|
+
/**
|
|
3
|
+
* The default values of `DataGridPremiumPropsWithDefaultValue` to inject in the props of DataGridPremium.
|
|
4
|
+
*/
|
|
5
|
+
export declare const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES: DataGridPremiumPropsWithDefaultValue;
|
|
6
|
+
export declare const useDataGridPremiumProps: (inProps: DataGridPremiumProps) => DataGridPremiumProcessedProps;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
+
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The default values of `DataGridPremiumPropsWithDefaultValue` to inject in the props of DataGridPremium.
|
|
8
|
+
*/
|
|
9
|
+
export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, {
|
|
10
|
+
disableRowGrouping: false,
|
|
11
|
+
rowGroupingColumnMode: 'single'
|
|
12
|
+
});
|
|
13
|
+
export const useDataGridPremiumProps = inProps => {
|
|
14
|
+
const themedProps = useThemeProps({
|
|
15
|
+
props: inProps,
|
|
16
|
+
name: 'MuiDataGrid'
|
|
17
|
+
});
|
|
18
|
+
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
19
|
+
const components = React.useMemo(() => {
|
|
20
|
+
const overrides = themedProps.components;
|
|
21
|
+
|
|
22
|
+
if (!overrides) {
|
|
23
|
+
return _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const mergedComponents = {};
|
|
27
|
+
Object.entries(DATA_GRID_DEFAULT_SLOTS_COMPONENTS).forEach(([key, defaultComponent]) => {
|
|
28
|
+
mergedComponents[key] = overrides[key] === undefined ? defaultComponent : overrides[key];
|
|
29
|
+
});
|
|
30
|
+
return mergedComponents;
|
|
31
|
+
}, [themedProps.components]);
|
|
32
|
+
return React.useMemo(() => _extends({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps, {
|
|
33
|
+
localeText,
|
|
34
|
+
components,
|
|
35
|
+
signature: 'DataGridPremium'
|
|
36
|
+
}), [themedProps, localeText, components]);
|
|
37
|
+
};
|
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Commercial License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Material-UI SAS
|
|
4
|
+
|
|
5
|
+
MUI X Premium (https://mui.com/pricing/) is commercial software. You must purchase
|
|
6
|
+
a license and agree to the End User License Agreement (EULA: https://mui.com/r/x-license-eula)
|
|
7
|
+
to be able to use the software.
|
|
8
|
+
|
|
9
|
+
Commercial licenses can be obtained at https://mui.com/r/x-get-license?scope=premium.
|
|
10
|
+
You are free to install and try the software without a license key as long as it
|
|
11
|
+
is not used for the development of a feature intended for production use. You can
|
|
12
|
+
find more details under the "Evaluation (trial) licenses" section of the EULA.
|
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @mui/x-data-grid-pro
|
|
2
|
+
|
|
3
|
+
This package is the Premium plan edition of the data grid component.
|
|
4
|
+
It's part of MUI X, an open core extension of MUI, with advanced components.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Install the package in your project directory with:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
// with npm
|
|
12
|
+
npm install @mui/x-data-grid-premium
|
|
13
|
+
|
|
14
|
+
// with yarn
|
|
15
|
+
yarn add @mui/x-data-grid-premium
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This component has the following peer dependencies that you will need to install as well.
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@mui/material": "^5.2.8",
|
|
23
|
+
"@mui/system": "^5.2.8",
|
|
24
|
+
"react": "^17.0.2 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.2 || ^18.0.0"
|
|
26
|
+
},
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
[The documentation](https://mui.com/x/react-data-grid/)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GridExportMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { GridExcelExportOptions } from '../hooks/features/export';
|
|
4
|
+
export declare type GridExcelExportMenuItemProps = GridExportMenuItemProps<GridExcelExportOptions>;
|
|
5
|
+
declare const GridExcelExportMenuItem: {
|
|
6
|
+
(props: GridExcelExportMenuItemProps): JSX.Element;
|
|
7
|
+
propTypes: any;
|
|
8
|
+
};
|
|
9
|
+
export { GridExcelExportMenuItem };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
4
|
+
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
const GridExcelExportMenuItem = props => {
|
|
8
|
+
const apiRef = useGridApiContext();
|
|
9
|
+
const {
|
|
10
|
+
hideMenu,
|
|
11
|
+
options
|
|
12
|
+
} = props;
|
|
13
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
14
|
+
onClick: () => {
|
|
15
|
+
apiRef.current.exportDataAsExcel(options);
|
|
16
|
+
hideMenu == null ? void 0 : hideMenu();
|
|
17
|
+
},
|
|
18
|
+
children: apiRef.current.getLocaleText('toolbarExportExcel')
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
process.env.NODE_ENV !== "production" ? GridExcelExportMenuItem.propTypes = {
|
|
23
|
+
// ----------------------------- Warning --------------------------------
|
|
24
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
25
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
26
|
+
// ----------------------------------------------------------------------
|
|
27
|
+
hideMenu: PropTypes.func,
|
|
28
|
+
options: PropTypes.shape({
|
|
29
|
+
disableToolbarButton: PropTypes.bool
|
|
30
|
+
})
|
|
31
|
+
} : void 0;
|
|
32
|
+
export { GridExcelExportMenuItem };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Box from '@mui/material/Box';
|
|
3
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
const GridGroupingColumnLeafCell = props => {
|
|
7
|
+
var _props$formattedValue;
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
rowNode
|
|
11
|
+
} = props;
|
|
12
|
+
const rootProps = useGridRootProps();
|
|
13
|
+
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 1 : rowNode.depth * 2;
|
|
14
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
15
|
+
sx: {
|
|
16
|
+
ml: marginLeft
|
|
17
|
+
},
|
|
18
|
+
children: (_props$formattedValue = props.formattedValue) != null ? _props$formattedValue : props.value
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { GridGroupingColumnLeafCell };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GridRenderCellParams } from '@mui/x-data-grid-pro';
|
|
3
|
+
interface GridGroupingCriteriaCellProps extends GridRenderCellParams {
|
|
4
|
+
hideDescendantCount?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const GridGroupingCriteriaCell: (props: GridGroupingCriteriaCellProps) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import Box from '@mui/material/Box';
|
|
5
|
+
import { useGridSelector, gridFilteredDescendantCountLookupSelector, getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
6
|
+
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
7
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
|
|
11
|
+
const useUtilityClasses = ownerState => {
|
|
12
|
+
const {
|
|
13
|
+
classes
|
|
14
|
+
} = ownerState;
|
|
15
|
+
const slots = {
|
|
16
|
+
root: ['groupingCriteriaCell'],
|
|
17
|
+
toggle: ['groupingCriteriaCellToggle']
|
|
18
|
+
};
|
|
19
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const GridGroupingCriteriaCell = props => {
|
|
23
|
+
var _filteredDescendantCo;
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
id,
|
|
27
|
+
field,
|
|
28
|
+
rowNode,
|
|
29
|
+
hideDescendantCount,
|
|
30
|
+
formattedValue
|
|
31
|
+
} = props;
|
|
32
|
+
const rootProps = useGridRootProps();
|
|
33
|
+
const apiRef = useGridApiContext();
|
|
34
|
+
const ownerState = {
|
|
35
|
+
classes: rootProps.classes
|
|
36
|
+
};
|
|
37
|
+
const classes = useUtilityClasses(ownerState);
|
|
38
|
+
const filteredDescendantCountLookup = useGridSelector(apiRef, gridFilteredDescendantCountLookupSelector);
|
|
39
|
+
const filteredDescendantCount = (_filteredDescendantCo = filteredDescendantCountLookup[rowNode.id]) != null ? _filteredDescendantCo : 0;
|
|
40
|
+
const Icon = rowNode.childrenExpanded ? rootProps.components.GroupingCriteriaCollapseIcon : rootProps.components.GroupingCriteriaExpandIcon;
|
|
41
|
+
|
|
42
|
+
const handleKeyDown = event => {
|
|
43
|
+
if (event.key === ' ') {
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
apiRef.current.publishEvent('cellKeyDown', props, event);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const handleClick = event => {
|
|
51
|
+
apiRef.current.setRowChildrenExpansion(id, !rowNode.childrenExpanded);
|
|
52
|
+
apiRef.current.setCellFocus(id, field);
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const marginLeft = rootProps.rowGroupingColumnMode === 'multiple' ? 0 : rowNode.depth * 2;
|
|
57
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
58
|
+
className: classes.root,
|
|
59
|
+
sx: {
|
|
60
|
+
ml: marginLeft
|
|
61
|
+
},
|
|
62
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: classes.toggle,
|
|
64
|
+
children: filteredDescendantCount > 0 && /*#__PURE__*/_jsx(IconButton, {
|
|
65
|
+
size: "small",
|
|
66
|
+
onClick: handleClick,
|
|
67
|
+
onKeyDown: handleKeyDown,
|
|
68
|
+
tabIndex: -1,
|
|
69
|
+
"aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand'),
|
|
70
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
71
|
+
fontSize: "inherit"
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
75
|
+
children: [formattedValue === undefined ? rowNode.groupingKey : formattedValue, !hideDescendantCount && filteredDescendantCount > 0 ? ` (${filteredDescendantCount})` : '']
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
3
|
+
interface GridRowGroupableColumnMenuItemsProps {
|
|
4
|
+
column?: GridColDef;
|
|
5
|
+
onClick?: (event: React.MouseEvent<any>) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const GridRowGroupableColumnMenuItems: {
|
|
8
|
+
(props: GridRowGroupableColumnMenuItemsProps): JSX.Element | null;
|
|
9
|
+
propTypes: any;
|
|
10
|
+
};
|
|
11
|
+
export { GridRowGroupableColumnMenuItems };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
4
|
+
import { gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
6
|
+
import { gridRowGroupingSanitizedModelSelector } from '../hooks/features/rowGrouping/gridRowGroupingSelector';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
const GridRowGroupableColumnMenuItems = props => {
|
|
10
|
+
var _columnsLookup$column;
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
column,
|
|
14
|
+
onClick
|
|
15
|
+
} = props;
|
|
16
|
+
const apiRef = useGridApiContext();
|
|
17
|
+
const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
18
|
+
const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
19
|
+
|
|
20
|
+
if (!(column != null && column.groupable)) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const ungroupColumn = event => {
|
|
25
|
+
apiRef.current.removeRowGroupingCriteria(column.field);
|
|
26
|
+
|
|
27
|
+
if (onClick) {
|
|
28
|
+
onClick(event);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const groupColumn = event => {
|
|
33
|
+
apiRef.current.addRowGroupingCriteria(column.field);
|
|
34
|
+
|
|
35
|
+
if (onClick) {
|
|
36
|
+
onClick(event);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const name = (_columnsLookup$column = columnsLookup[column.field].headerName) != null ? _columnsLookup$column : column.field;
|
|
41
|
+
|
|
42
|
+
if (rowGroupingModel.includes(column.field)) {
|
|
43
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
44
|
+
onClick: ungroupColumn,
|
|
45
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
50
|
+
onClick: groupColumn,
|
|
51
|
+
children: apiRef.current.getLocaleText('groupColumn')(name)
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
process.env.NODE_ENV !== "production" ? GridRowGroupableColumnMenuItems.propTypes = {
|
|
56
|
+
// ----------------------------- Warning --------------------------------
|
|
57
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
58
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
59
|
+
// ----------------------------------------------------------------------
|
|
60
|
+
column: PropTypes.object,
|
|
61
|
+
onClick: PropTypes.func
|
|
62
|
+
} : void 0;
|
|
63
|
+
export { GridRowGroupableColumnMenuItems };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
3
|
+
interface GridRowGroupingColumnMenuItemsProps {
|
|
4
|
+
column?: GridColDef;
|
|
5
|
+
onClick?: (event: React.MouseEvent<any>) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const GridRowGroupingColumnMenuItems: {
|
|
8
|
+
(props: GridRowGroupingColumnMenuItemsProps): JSX.Element | null;
|
|
9
|
+
propTypes: any;
|
|
10
|
+
};
|
|
11
|
+
export { GridRowGroupingColumnMenuItems };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
4
|
+
import { useGridSelector, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
6
|
+
import { gridRowGroupingSanitizedModelSelector } from '../hooks/features/rowGrouping/gridRowGroupingSelector';
|
|
7
|
+
import { getRowGroupingCriteriaFromGroupingField, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, isGroupingColumn } from '../hooks/features/rowGrouping/gridRowGroupingUtils';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
const GridRowGroupingColumnMenuItems = props => {
|
|
11
|
+
const {
|
|
12
|
+
column,
|
|
13
|
+
onClick
|
|
14
|
+
} = props;
|
|
15
|
+
const apiRef = useGridApiContext();
|
|
16
|
+
const rowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
17
|
+
const columnsLookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
18
|
+
|
|
19
|
+
const renderUnGroupingMenuItem = field => {
|
|
20
|
+
var _columnsLookup$field$;
|
|
21
|
+
|
|
22
|
+
const ungroupColumn = event => {
|
|
23
|
+
apiRef.current.removeRowGroupingCriteria(field);
|
|
24
|
+
|
|
25
|
+
if (onClick) {
|
|
26
|
+
onClick(event);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const name = (_columnsLookup$field$ = columnsLookup[field].headerName) != null ? _columnsLookup$field$ : field;
|
|
31
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
32
|
+
onClick: ungroupColumn,
|
|
33
|
+
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
34
|
+
}, field);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
if (!column || !isGroupingColumn(column.field)) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (column.field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD) {
|
|
42
|
+
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
43
|
+
children: rowGroupingModel.map(renderUnGroupingMenuItem)
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return renderUnGroupingMenuItem(getRowGroupingCriteriaFromGroupingField(column.field));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
process.env.NODE_ENV !== "production" ? GridRowGroupingColumnMenuItems.propTypes = {
|
|
51
|
+
// ----------------------------- Warning --------------------------------
|
|
52
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
53
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
54
|
+
// ----------------------------------------------------------------------
|
|
55
|
+
column: PropTypes.object,
|
|
56
|
+
onClick: PropTypes.func
|
|
57
|
+
} : void 0;
|
|
58
|
+
export { GridRowGroupingColumnMenuItems };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GridExcelExportMenuItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GridExcelExportMenuItem';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type * as Excel from 'exceljs';
|
|
2
|
+
import { GridFileExportOptions, GridExportFormat as GridExportFormatCommunity, GridExportExtension as GridExportExtensionCommunity, GridToolbarExportProps as GridToolbarExportPropsCommunity, GridExportDisplayOptions } from '@mui/x-data-grid-pro';
|
|
3
|
+
export declare type GridExportFormat = GridExportFormatCommunity | 'excel';
|
|
4
|
+
export declare type GridExportExtension = GridExportExtensionCommunity | 'xlsx';
|
|
5
|
+
export interface GridExceljsProcessInput {
|
|
6
|
+
workbook: Excel.Workbook;
|
|
7
|
+
worksheet: Excel.Worksheet;
|
|
8
|
+
}
|
|
9
|
+
export interface ColumnsStylesInterface {
|
|
10
|
+
[field: string]: Excel.Style;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The options to apply on the Excel export.
|
|
14
|
+
*/
|
|
15
|
+
export interface GridExcelExportOptions extends GridFileExportOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Name given to the worksheet containing the columns valueOptions.
|
|
18
|
+
* valueOptions are added to this worksheet if they are provided as an array.
|
|
19
|
+
*/
|
|
20
|
+
valueOptionsSheetName?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Method called before adding the rows to the workbook.
|
|
23
|
+
* @param {GridExceljsProcessInput} processInput object containing the workbook and the worksheet.
|
|
24
|
+
* @returns {Promise<void>} A promise which resolves after processing the input.
|
|
25
|
+
* */
|
|
26
|
+
exceljsPreProcess?: (processInput: GridExceljsProcessInput) => Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Method called after adding the rows to the workbook.
|
|
29
|
+
* @param {GridExceljsProcessInput} processInput object containing the workbook and the worksheet.
|
|
30
|
+
* @returns {Promise<void>} A promise which resolves after processing the input.
|
|
31
|
+
* */
|
|
32
|
+
exceljsPostProcess?: (processInput: GridExceljsProcessInput) => Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Object mapping column field to Exceljs style
|
|
35
|
+
* */
|
|
36
|
+
columnsStyles?: ColumnsStylesInterface;
|
|
37
|
+
}
|
|
38
|
+
export interface GridToolbarExportProps extends GridToolbarExportPropsCommunity {
|
|
39
|
+
excelOptions: GridExcelExportOptions & GridExportDisplayOptions;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The excel export API interface that is available in the grid [[apiRef]].
|
|
43
|
+
*/
|
|
44
|
+
export interface GridExcelExportApi {
|
|
45
|
+
/**
|
|
46
|
+
* Returns the grid data as an exceljs workbook.
|
|
47
|
+
* This method is used internally by `exportDataAsExcel`.
|
|
48
|
+
* @param {GridExcelExportOptions} options The options to apply on the export.
|
|
49
|
+
* @returns {Promise<Excel.Workbook>} The data in a exceljs workbook object.
|
|
50
|
+
*/
|
|
51
|
+
getDataAsExcel: (options?: GridExcelExportOptions) => Promise<Excel.Workbook> | null;
|
|
52
|
+
/**
|
|
53
|
+
* Downloads and exports an Excel file of the grid's data.
|
|
54
|
+
* @param {GridExcelExportOptions} options The options to apply on the export.
|
|
55
|
+
* @returns {Promise<void>} A promise which resolves after exporting to Excel.
|
|
56
|
+
*/
|
|
57
|
+
exportDataAsExcel: (options?: GridExcelExportOptions) => Promise<void>;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gridExcelExportInterface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gridExcelExportInterface';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as Excel from 'exceljs';
|
|
2
|
+
import { GridStateColDef, GridRowId, GridApi } from '@mui/x-data-grid-pro';
|
|
3
|
+
import { GridExceljsProcessInput, ColumnsStylesInterface } from '../gridExcelExportInterface';
|
|
4
|
+
interface BuildExcelOptions {
|
|
5
|
+
columns: GridStateColDef[];
|
|
6
|
+
rowIds: GridRowId[];
|
|
7
|
+
includeHeaders: boolean;
|
|
8
|
+
valueOptionsSheetName: string;
|
|
9
|
+
exceljsPreProcess?: (processInput: GridExceljsProcessInput) => Promise<void>;
|
|
10
|
+
exceljsPostProcess?: (processInput: GridExceljsProcessInput) => Promise<void>;
|
|
11
|
+
columnsStyles?: ColumnsStylesInterface;
|
|
12
|
+
}
|
|
13
|
+
export declare function buildExcel(options: BuildExcelOptions, api: GridApi): Promise<Excel.Workbook>;
|
|
14
|
+
export {};
|