@mui/x-data-grid 5.13.1 → 5.14.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 +44 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/colDef/gridActionsColDef.js +2 -0
- package/colDef/gridBooleanColDef.js +3 -1
- package/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/colDef/gridDateOperators.d.ts +1 -1
- package/colDef/gridStringColDef.d.ts +3 -0
- package/colDef/gridStringColDef.js +6 -0
- package/components/base/GridOverlays.js +4 -1
- package/components/cell/GridBooleanCell.d.ts +5 -2
- package/components/cell/GridBooleanCell.js +93 -2
- package/components/cell/GridEditDateCell.js +5 -1
- package/components/cell/index.d.ts +1 -0
- package/components/cell/index.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/components/containers/GridRootStyles.js +10 -0
- package/components/toolbar/GridToolbarExport.js +20 -10
- package/constants/gridClasses.d.ts +25 -1
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +8 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +2 -1
- package/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +13 -6
- package/hooks/features/export/utils.d.ts +1 -1
- package/hooks/features/export/utils.js +9 -2
- package/hooks/features/filter/gridFilterUtils.js +6 -0
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +11 -4
- package/hooks/features/pagination/useGridPage.js +4 -3
- package/hooks/features/pagination/useGridPageSize.js +4 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/selection/useGridSelection.js +24 -10
- package/hooks/features/sorting/gridSortingUtils.d.ts +1 -0
- package/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +34 -6
- package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +12 -1
- package/hooks/features/statePersistence/index.d.ts +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
- package/hooks/utils/useGridNativeEventListener.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -2
- package/internals/index.js +2 -2
- package/legacy/DataGrid/useDataGridComponent.js +1 -1
- package/legacy/colDef/gridActionsColDef.js +2 -0
- package/legacy/colDef/gridBooleanColDef.js +3 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/legacy/colDef/gridStringColDef.js +6 -0
- package/legacy/components/base/GridOverlays.js +4 -1
- package/legacy/components/cell/GridBooleanCell.js +93 -2
- package/legacy/components/cell/GridEditDateCell.js +5 -1
- package/legacy/components/cell/index.js +1 -0
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +6 -1
- package/legacy/components/containers/GridRootStyles.js +3 -3
- package/legacy/components/toolbar/GridToolbarExport.js +20 -10
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +8 -1
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/legacy/hooks/features/columns/useGridColumns.js +13 -8
- package/legacy/hooks/features/export/utils.js +9 -2
- package/legacy/hooks/features/filter/gridFilterUtils.js +6 -0
- package/legacy/hooks/features/filter/useGridFilter.js +11 -4
- package/legacy/hooks/features/pagination/useGridPage.js +4 -3
- package/legacy/hooks/features/pagination/useGridPageSize.js +4 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/legacy/hooks/features/selection/useGridSelection.js +26 -12
- package/legacy/hooks/features/sorting/gridSortingUtils.js +11 -12
- package/legacy/hooks/features/sorting/useGridSorting.js +34 -6
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/legacy/hooks/utils/useGridNativeEventListener.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +2 -2
- package/legacy/locales/arSD.js +7 -0
- package/legacy/locales/bgBG.js +7 -0
- package/legacy/locales/csCZ.js +7 -0
- package/legacy/locales/daDK.js +7 -0
- package/legacy/locales/deDE.js +8 -1
- package/legacy/locales/elGR.js +7 -0
- package/legacy/locales/esES.js +7 -0
- package/legacy/locales/faIR.js +7 -0
- package/legacy/locales/fiFI.js +7 -0
- package/legacy/locales/frFR.js +8 -1
- package/legacy/locales/heIL.js +8 -1
- package/legacy/locales/huHU.js +7 -0
- package/legacy/locales/index.js +2 -1
- package/legacy/locales/itIT.js +7 -0
- package/legacy/locales/jaJP.js +8 -1
- package/legacy/locales/koKR.js +7 -0
- package/legacy/locales/nbNO.js +8 -1
- package/legacy/locales/nlNL.js +8 -1
- package/legacy/locales/plPL.js +7 -0
- package/legacy/locales/ptBR.js +8 -1
- package/legacy/locales/roRO.js +8 -1
- package/legacy/locales/ruRU.js +7 -0
- package/legacy/locales/skSK.js +8 -1
- package/legacy/locales/svSE.js +8 -1
- package/legacy/locales/trTR.js +7 -0
- package/legacy/locales/ukUA.js +7 -0
- package/legacy/locales/viVN.js +7 -0
- package/legacy/locales/zhCN.js +7 -0
- package/legacy/locales/zhTW.js +135 -0
- package/legacy/models/events/gridEvents.js +1 -0
- package/locales/arSD.js +7 -0
- package/locales/bgBG.js +7 -0
- package/locales/csCZ.js +7 -0
- package/locales/daDK.js +7 -0
- package/locales/deDE.js +8 -1
- package/locales/elGR.js +7 -0
- package/locales/esES.js +7 -0
- package/locales/faIR.js +7 -0
- package/locales/fiFI.js +7 -0
- package/locales/frFR.js +8 -1
- package/locales/heIL.js +8 -1
- package/locales/huHU.js +7 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +2 -1
- package/locales/itIT.js +7 -0
- package/locales/jaJP.js +8 -1
- package/locales/koKR.js +7 -0
- package/locales/nbNO.js +8 -1
- package/locales/nlNL.js +8 -1
- package/locales/plPL.js +7 -0
- package/locales/ptBR.js +8 -1
- package/locales/roRO.js +8 -1
- package/locales/ruRU.js +7 -0
- package/locales/skSK.js +8 -1
- package/locales/svSE.js +8 -1
- package/locales/trTR.js +7 -0
- package/locales/ukUA.js +7 -0
- package/locales/viVN.js +7 -0
- package/locales/zhCN.js +7 -0
- package/locales/zhTW.d.ts +2 -0
- package/locales/zhTW.js +123 -0
- package/models/api/gridColumnSpanning.d.ts +2 -0
- package/models/api/gridLocaleTextApi.d.ts +8 -2
- package/models/api/gridSelectionApi.d.ts +6 -0
- package/models/events/gridEvents.d.ts +1 -0
- package/models/events/gridEvents.js +1 -0
- package/models/gridRows.d.ts +10 -1
- package/models/params/gridCellParams.d.ts +4 -4
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/colDef/gridActionsColDef.js +2 -0
- package/modern/colDef/gridBooleanColDef.js +3 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/modern/colDef/gridStringColDef.js +6 -0
- package/modern/components/base/GridOverlays.js +4 -1
- package/modern/components/cell/GridBooleanCell.js +93 -2
- package/modern/components/cell/GridEditDateCell.js +5 -1
- package/modern/components/cell/index.js +1 -0
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/modern/components/containers/GridRootStyles.js +10 -0
- package/modern/components/toolbar/GridToolbarExport.js +20 -10
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +8 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/modern/hooks/features/columns/useGridColumns.js +10 -5
- package/modern/hooks/features/export/utils.js +5 -2
- package/modern/hooks/features/filter/gridFilterUtils.js +6 -0
- package/modern/hooks/features/filter/useGridFilter.js +8 -3
- package/modern/hooks/features/pagination/useGridPage.js +4 -3
- package/modern/hooks/features/pagination/useGridPageSize.js +4 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +8 -4
- package/modern/hooks/features/selection/useGridSelection.js +22 -10
- package/modern/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/modern/hooks/features/sorting/useGridSorting.js +30 -6
- package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/modern/hooks/utils/useGridNativeEventListener.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -2
- package/modern/locales/arSD.js +7 -0
- package/modern/locales/bgBG.js +7 -0
- package/modern/locales/csCZ.js +7 -0
- package/modern/locales/daDK.js +7 -0
- package/modern/locales/deDE.js +8 -1
- package/modern/locales/elGR.js +7 -0
- package/modern/locales/esES.js +7 -0
- package/modern/locales/faIR.js +7 -0
- package/modern/locales/fiFI.js +7 -0
- package/modern/locales/frFR.js +8 -1
- package/modern/locales/heIL.js +8 -1
- package/modern/locales/huHU.js +7 -0
- package/modern/locales/index.js +2 -1
- package/modern/locales/itIT.js +7 -0
- package/modern/locales/jaJP.js +8 -1
- package/modern/locales/koKR.js +7 -0
- package/modern/locales/nbNO.js +8 -1
- package/modern/locales/nlNL.js +8 -1
- package/modern/locales/plPL.js +7 -0
- package/modern/locales/ptBR.js +8 -1
- package/modern/locales/roRO.js +8 -1
- package/modern/locales/ruRU.js +7 -0
- package/modern/locales/skSK.js +8 -1
- package/modern/locales/svSE.js +8 -1
- package/modern/locales/trTR.js +7 -0
- package/modern/locales/ukUA.js +7 -0
- package/modern/locales/viVN.js +7 -0
- package/modern/locales/zhCN.js +7 -0
- package/modern/locales/zhTW.js +123 -0
- package/modern/models/events/gridEvents.js +1 -0
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/colDef/gridActionsColDef.js +2 -0
- package/node/colDef/gridBooleanColDef.js +3 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +2 -0
- package/node/colDef/gridStringColDef.js +5 -0
- package/node/components/base/GridOverlays.js +4 -1
- package/node/components/cell/GridBooleanCell.js +93 -2
- package/node/components/cell/GridEditDateCell.js +7 -1
- package/node/components/cell/index.js +13 -0
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
- package/node/components/containers/GridRootStyles.js +10 -0
- package/node/components/toolbar/GridToolbarExport.js +16 -10
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +8 -1
- package/node/hooks/features/columns/useGridColumnSpanning.js +9 -7
- package/node/hooks/features/columns/useGridColumns.js +13 -6
- package/node/hooks/features/export/utils.js +10 -2
- package/node/hooks/features/filter/gridFilterUtils.js +7 -0
- package/node/hooks/features/filter/useGridFilter.js +11 -4
- package/node/hooks/features/pagination/useGridPage.js +4 -3
- package/node/hooks/features/pagination/useGridPageSize.js +4 -3
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
- package/node/hooks/features/selection/useGridSelection.js +24 -10
- package/node/hooks/features/sorting/gridSortingUtils.js +10 -11
- package/node/hooks/features/sorting/useGridSorting.js +34 -6
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -4
- package/node/hooks/utils/useGridNativeEventListener.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +18 -0
- package/node/locales/arSD.js +7 -0
- package/node/locales/bgBG.js +7 -0
- package/node/locales/csCZ.js +7 -0
- package/node/locales/daDK.js +7 -0
- package/node/locales/deDE.js +8 -1
- package/node/locales/elGR.js +7 -0
- package/node/locales/esES.js +7 -0
- package/node/locales/faIR.js +7 -0
- package/node/locales/fiFI.js +7 -0
- package/node/locales/frFR.js +8 -1
- package/node/locales/heIL.js +8 -1
- package/node/locales/huHU.js +7 -0
- package/node/locales/index.js +13 -0
- package/node/locales/itIT.js +7 -0
- package/node/locales/jaJP.js +8 -1
- package/node/locales/koKR.js +7 -0
- package/node/locales/nbNO.js +8 -1
- package/node/locales/nlNL.js +8 -1
- package/node/locales/plPL.js +7 -0
- package/node/locales/ptBR.js +8 -1
- package/node/locales/roRO.js +8 -1
- package/node/locales/ruRU.js +7 -0
- package/node/locales/skSK.js +8 -1
- package/node/locales/svSE.js +8 -1
- package/node/locales/trTR.js +7 -0
- package/node/locales/ukUA.js +7 -0
- package/node/locales/viVN.js +7 -0
- package/node/locales/zhCN.js +7 -0
- package/node/locales/zhTW.js +133 -0
- package/node/models/events/gridEvents.js +1 -0
- package/package.json +1 -1
- package/utils/getGridLocalization.d.ts +1 -1
package/locales/zhCN.js
CHANGED
|
@@ -111,6 +111,13 @@ const zhCNGrid = {
|
|
|
111
111
|
// collapseDetailPanel: 'Collapse',
|
|
112
112
|
// Row reordering text
|
|
113
113
|
// rowReorderingHeaderName: 'Row reordering',
|
|
114
|
+
// Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
114
121
|
|
|
115
122
|
};
|
|
116
123
|
export const zhCN = getGridLocalization(zhCNGrid, zhCNCore);
|
package/locales/zhTW.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { zhTW as zhTWCore } from '@mui/material/locale';
|
|
2
|
+
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
3
|
+
const zhTWGrid = {
|
|
4
|
+
// Root
|
|
5
|
+
noRowsLabel: '沒有資料',
|
|
6
|
+
noResultsOverlayLabel: '沒有結果',
|
|
7
|
+
errorOverlayDefaultLabel: '發生錯誤',
|
|
8
|
+
// Density selector toolbar button text
|
|
9
|
+
toolbarDensity: '表格密度',
|
|
10
|
+
toolbarDensityLabel: '表格密度',
|
|
11
|
+
toolbarDensityCompact: '緊湊',
|
|
12
|
+
toolbarDensityStandard: '標準',
|
|
13
|
+
toolbarDensityComfortable: '舒適',
|
|
14
|
+
// Columns selector toolbar button text
|
|
15
|
+
toolbarColumns: '欄位',
|
|
16
|
+
toolbarColumnsLabel: '選擇欄位',
|
|
17
|
+
// Filters toolbar button text
|
|
18
|
+
toolbarFilters: '篩選器',
|
|
19
|
+
toolbarFiltersLabel: '顯示篩選器',
|
|
20
|
+
toolbarFiltersTooltipHide: '隱藏篩選器',
|
|
21
|
+
toolbarFiltersTooltipShow: '顯示篩選器',
|
|
22
|
+
toolbarFiltersTooltipActive: count => `${count} 個篩選器`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
toolbarQuickFilterPlaceholder: '搜尋...',
|
|
25
|
+
toolbarQuickFilterLabel: '搜尋',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: '清除',
|
|
27
|
+
// Export selector toolbar button text
|
|
28
|
+
toolbarExport: '匯出',
|
|
29
|
+
toolbarExportLabel: '匯出',
|
|
30
|
+
toolbarExportCSV: '匯出 CSV',
|
|
31
|
+
toolbarExportPrint: '列印',
|
|
32
|
+
toolbarExportExcel: '匯出 Excel',
|
|
33
|
+
// Columns panel text
|
|
34
|
+
columnsPanelTextFieldLabel: '欄位搜尋',
|
|
35
|
+
columnsPanelTextFieldPlaceholder: '欄位名稱',
|
|
36
|
+
columnsPanelDragIconLabel: '排序欄位',
|
|
37
|
+
columnsPanelShowAllButton: '顯示所有',
|
|
38
|
+
columnsPanelHideAllButton: '隱藏所有',
|
|
39
|
+
// Filter panel text
|
|
40
|
+
filterPanelAddFilter: '增加篩選器',
|
|
41
|
+
filterPanelDeleteIconLabel: '刪除',
|
|
42
|
+
filterPanelLinkOperator: '邏輯運算子',
|
|
43
|
+
filterPanelOperators: '運算子',
|
|
44
|
+
// TODO v6: rename to filterPanelOperator
|
|
45
|
+
filterPanelOperatorAnd: '且',
|
|
46
|
+
filterPanelOperatorOr: '或',
|
|
47
|
+
filterPanelColumns: '欄位',
|
|
48
|
+
filterPanelInputLabel: '值',
|
|
49
|
+
filterPanelInputPlaceholder: '篩選值',
|
|
50
|
+
// Filter operators text
|
|
51
|
+
filterOperatorContains: '包含',
|
|
52
|
+
filterOperatorEquals: '等於',
|
|
53
|
+
filterOperatorStartsWith: '以...開頭',
|
|
54
|
+
filterOperatorEndsWith: '以...結束',
|
|
55
|
+
filterOperatorIs: '為',
|
|
56
|
+
filterOperatorNot: '不為',
|
|
57
|
+
filterOperatorAfter: '...之後',
|
|
58
|
+
filterOperatorOnOrAfter: '...(含)之後',
|
|
59
|
+
filterOperatorBefore: '...之前',
|
|
60
|
+
filterOperatorOnOrBefore: '...(含)之前',
|
|
61
|
+
filterOperatorIsEmpty: '為空',
|
|
62
|
+
filterOperatorIsNotEmpty: '不為空',
|
|
63
|
+
filterOperatorIsAnyOf: '是其中之一',
|
|
64
|
+
// Filter values text
|
|
65
|
+
filterValueAny: '任何值',
|
|
66
|
+
filterValueTrue: '真',
|
|
67
|
+
filterValueFalse: '假',
|
|
68
|
+
// Column menu text
|
|
69
|
+
columnMenuLabel: '選單',
|
|
70
|
+
columnMenuShowColumns: '顯示欄位',
|
|
71
|
+
columnMenuFilter: '篩選器',
|
|
72
|
+
columnMenuHideColumn: '隱藏',
|
|
73
|
+
columnMenuUnsort: '預設排序',
|
|
74
|
+
columnMenuSortAsc: '升序',
|
|
75
|
+
columnMenuSortDesc: '降序',
|
|
76
|
+
// Column header text
|
|
77
|
+
columnHeaderFiltersTooltipActive: count => `${count} 個篩選器`,
|
|
78
|
+
columnHeaderFiltersLabel: '顯示篩選器',
|
|
79
|
+
columnHeaderSortIconLabel: '排序',
|
|
80
|
+
// Rows selected footer text
|
|
81
|
+
footerRowSelected: count => `已選取 ${count.toLocaleString()} 個`,
|
|
82
|
+
// Total row amount footer text
|
|
83
|
+
footerTotalRows: '總數:',
|
|
84
|
+
// Total visible row amount footer text
|
|
85
|
+
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
|
86
|
+
// Checkbox selection text
|
|
87
|
+
checkboxSelectionHeaderName: '核取方塊',
|
|
88
|
+
checkboxSelectionSelectAllRows: '全選',
|
|
89
|
+
checkboxSelectionUnselectAllRows: '取消全選',
|
|
90
|
+
checkboxSelectionSelectRow: '選取',
|
|
91
|
+
checkboxSelectionUnselectRow: '取消選取',
|
|
92
|
+
// Boolean cell text
|
|
93
|
+
booleanCellTrueLabel: '真',
|
|
94
|
+
booleanCellFalseLabel: '假',
|
|
95
|
+
// Actions cell more text
|
|
96
|
+
actionsCellMore: '查看更多',
|
|
97
|
+
// Column pinning text
|
|
98
|
+
pinToLeft: '釘選在左側',
|
|
99
|
+
pinToRight: '釘選在右側',
|
|
100
|
+
unpin: '取消釘選',
|
|
101
|
+
// Tree Data
|
|
102
|
+
treeDataGroupingHeaderName: '群組',
|
|
103
|
+
treeDataExpand: '查看子項目',
|
|
104
|
+
treeDataCollapse: '隱藏子項目',
|
|
105
|
+
// Grouping columns
|
|
106
|
+
groupingColumnHeaderName: '群組',
|
|
107
|
+
groupColumn: name => `以 ${name} 分組`,
|
|
108
|
+
unGroupColumn: name => `取消以 ${name} 分組`,
|
|
109
|
+
// Master/detail
|
|
110
|
+
detailPanelToggle: '切換顯示詳細資訊',
|
|
111
|
+
expandDetailPanel: '展開',
|
|
112
|
+
collapseDetailPanel: '摺疊',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: '排序' // Aggregation
|
|
115
|
+
// aggregationMenuItemHeader: 'Aggregation',
|
|
116
|
+
// aggregationFunctionLabelSum: 'sum',
|
|
117
|
+
// aggregationFunctionLabelAvg: 'avg',
|
|
118
|
+
// aggregationFunctionLabelMin: 'min',
|
|
119
|
+
// aggregationFunctionLabelMax: 'max',
|
|
120
|
+
// aggregationFunctionLabelSize: 'size',
|
|
121
|
+
|
|
122
|
+
};
|
|
123
|
+
export const zhTW = getGridLocalization(zhTWGrid, zhTWCore);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GridStateColDef } from '../colDef';
|
|
1
2
|
import { GridColumnIndex, GridCellColSpanInfo } from '../gridColumnSpanning';
|
|
2
3
|
import { GridRowId } from '../gridRows';
|
|
3
4
|
/**
|
|
@@ -24,5 +25,6 @@ export interface GridColumnSpanningApi {
|
|
|
24
25
|
rowId: GridRowId;
|
|
25
26
|
minFirstColumn: number;
|
|
26
27
|
maxLastColumn: number;
|
|
28
|
+
columns: GridStateColDef[];
|
|
27
29
|
}) => void;
|
|
28
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentsPropsList } from '@mui/material/styles';
|
|
3
3
|
/**
|
|
4
4
|
* Set the types of the texts in the grid.
|
|
@@ -90,8 +90,14 @@ export interface GridLocaleText {
|
|
|
90
90
|
detailPanelToggle: string;
|
|
91
91
|
expandDetailPanel: string;
|
|
92
92
|
collapseDetailPanel: string;
|
|
93
|
-
MuiTablePagination: Omit<ComponentsPropsList['MuiTablePagination'], 'page' | 'count' | 'onChangePage' | 'rowsPerPage' | 'onPageChange'>;
|
|
94
93
|
rowReorderingHeaderName: string;
|
|
94
|
+
aggregationMenuItemHeader: string;
|
|
95
|
+
aggregationFunctionLabelSum: string;
|
|
96
|
+
aggregationFunctionLabelAvg: string;
|
|
97
|
+
aggregationFunctionLabelMin: string;
|
|
98
|
+
aggregationFunctionLabelMax: string;
|
|
99
|
+
aggregationFunctionLabelSize: string;
|
|
100
|
+
MuiTablePagination: Omit<ComponentsPropsList['MuiTablePagination'], 'page' | 'count' | 'onChangePage' | 'rowsPerPage' | 'onPageChange'>;
|
|
95
101
|
}
|
|
96
102
|
export declare type GridTranslationKeys = keyof GridLocaleText;
|
|
97
103
|
/**
|
|
@@ -35,6 +35,12 @@ export interface GridSelectionApi {
|
|
|
35
35
|
* @returns {boolean} A boolean indicating if the row is selected.
|
|
36
36
|
*/
|
|
37
37
|
isRowSelected: (id: GridRowId) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Determines if a row can be selected or not.
|
|
40
|
+
* @param {GridRowId} id The id of the row.
|
|
41
|
+
* @returns {boolean} A boolean indicating if the row can be selected.
|
|
42
|
+
*/
|
|
43
|
+
isRowSelectable: (id: GridRowId) => boolean;
|
|
38
44
|
/**
|
|
39
45
|
* Returns an array of the selected rows.
|
|
40
46
|
* @returns {Map<GridRowId, GridRowModel>} A `Map` with the selected rows.
|
|
@@ -53,6 +53,7 @@ declare enum GridEvents {
|
|
|
53
53
|
pageChange = "pageChange",
|
|
54
54
|
pageSizeChange = "pageSizeChange",
|
|
55
55
|
rowGroupingModelChange = "rowGroupingModelChange",
|
|
56
|
+
aggregationModelChange = "aggregationModelChange",
|
|
56
57
|
rowsScroll = "rowsScroll",
|
|
57
58
|
rowsScrollEnd = "rowsScrollEnd",
|
|
58
59
|
columnSeparatorMouseDown = "columnSeparatorMouseDown",
|
|
@@ -54,6 +54,7 @@ var GridEvents;
|
|
|
54
54
|
GridEvents["pageChange"] = "pageChange";
|
|
55
55
|
GridEvents["pageSizeChange"] = "pageSizeChange";
|
|
56
56
|
GridEvents["rowGroupingModelChange"] = "rowGroupingModelChange";
|
|
57
|
+
GridEvents["aggregationModelChange"] = "aggregationModelChange";
|
|
57
58
|
GridEvents["rowsScroll"] = "rowsScroll";
|
|
58
59
|
GridEvents["rowsScrollEnd"] = "rowsScrollEnd";
|
|
59
60
|
GridEvents["columnSeparatorMouseDown"] = "columnSeparatorMouseDown";
|
package/models/gridRows.d.ts
CHANGED
|
@@ -25,6 +25,10 @@ export interface GridRowTreeNodeConfig {
|
|
|
25
25
|
* @default []
|
|
26
26
|
*/
|
|
27
27
|
children?: GridRowId[];
|
|
28
|
+
/**
|
|
29
|
+
* The id of the footer
|
|
30
|
+
*/
|
|
31
|
+
footerId?: GridRowId | null;
|
|
28
32
|
/**
|
|
29
33
|
* The row id of the parent (null if this row is a top level row).
|
|
30
34
|
*/
|
|
@@ -41,7 +45,7 @@ export interface GridRowTreeNodeConfig {
|
|
|
41
45
|
/**
|
|
42
46
|
* The key used to group the children of this row.
|
|
43
47
|
*/
|
|
44
|
-
groupingKey: GridKeyValue;
|
|
48
|
+
groupingKey: GridKeyValue | null;
|
|
45
49
|
/**
|
|
46
50
|
* The field used to group the children of this row.
|
|
47
51
|
* Is `null` if no field has been used to group the children of this row.
|
|
@@ -52,6 +56,11 @@ export interface GridRowTreeNodeConfig {
|
|
|
52
56
|
* @default false
|
|
53
57
|
*/
|
|
54
58
|
isAutoGenerated?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Position of the row among its sibling.
|
|
61
|
+
* @default 'body'
|
|
62
|
+
*/
|
|
63
|
+
position?: 'body' | 'footer';
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
57
66
|
* The grid rows total height and row positions.
|
|
@@ -142,7 +142,7 @@ export interface GridValueFormatterParams<V = any> {
|
|
|
142
142
|
/**
|
|
143
143
|
* Object passed as parameter in the column [[GridColDef]] edit cell props change callback.
|
|
144
144
|
*/
|
|
145
|
-
export interface GridPreProcessEditCellProps {
|
|
145
|
+
export interface GridPreProcessEditCellProps<V = any, R extends GridValidRowModel = any> {
|
|
146
146
|
/**
|
|
147
147
|
* The grid row id.
|
|
148
148
|
*/
|
|
@@ -150,11 +150,11 @@ export interface GridPreProcessEditCellProps {
|
|
|
150
150
|
/**
|
|
151
151
|
* The row that is being edited.
|
|
152
152
|
*/
|
|
153
|
-
row: GridRowModel
|
|
153
|
+
row: GridRowModel<R>;
|
|
154
154
|
/**
|
|
155
155
|
* The edit cell props.
|
|
156
156
|
*/
|
|
157
|
-
props: GridEditCellProps
|
|
157
|
+
props: GridEditCellProps<V>;
|
|
158
158
|
/**
|
|
159
159
|
* Whether the new value is different from the stored value or not.
|
|
160
160
|
*/
|
|
@@ -163,5 +163,5 @@ export interface GridPreProcessEditCellProps {
|
|
|
163
163
|
* Object containing the props of the other fields.
|
|
164
164
|
* Only available for row editing and when using the new editing API.
|
|
165
165
|
*/
|
|
166
|
-
otherFieldsProps?: Record<string, GridEditCellProps
|
|
166
|
+
otherFieldsProps?: Record<string, GridEditCellProps<V>>;
|
|
167
167
|
}
|
|
@@ -58,7 +58,7 @@ export const useDataGridComponent = props => {
|
|
|
58
58
|
const useGridEditing = props.experimentalFeatures?.newEditingApi ? useGridEditing_new : useGridEditing_old;
|
|
59
59
|
useGridEditing(apiRef, props);
|
|
60
60
|
useGridFocus(apiRef, props);
|
|
61
|
-
useGridPreferencesPanel(apiRef);
|
|
61
|
+
useGridPreferencesPanel(apiRef, props);
|
|
62
62
|
useGridFilter(apiRef, props);
|
|
63
63
|
useGridSorting(apiRef, props);
|
|
64
64
|
useGridDensity(apiRef, props);
|
|
@@ -21,5 +21,7 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
21
21
|
sortComparator: gridNumberComparator,
|
|
22
22
|
valueFormatter: gridBooleanFormatter,
|
|
23
23
|
filterOperators: getGridBooleanOperators(),
|
|
24
|
-
getApplyQuickFilterFn: undefined
|
|
24
|
+
getApplyQuickFilterFn: undefined,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
aggregable: false
|
|
25
27
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { renderEditInputCell } from '../components/cell/GridEditInputCell';
|
|
2
2
|
import { gridStringOrNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
3
|
import { getGridStringOperators, getGridStringQuickFilterFn } from './gridStringOperators';
|
|
4
|
+
/**
|
|
5
|
+
* TODO: Move pro and premium properties outside of this Community file
|
|
6
|
+
*/
|
|
7
|
+
|
|
4
8
|
export const GRID_STRING_COL_DEF = {
|
|
5
9
|
width: 100,
|
|
6
10
|
minWidth: 50,
|
|
@@ -12,6 +16,8 @@ export const GRID_STRING_COL_DEF = {
|
|
|
12
16
|
filterable: true,
|
|
13
17
|
groupable: true,
|
|
14
18
|
pinnable: true,
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
private_aggregable: true,
|
|
15
21
|
editable: false,
|
|
16
22
|
sortComparator: gridStringOrNumberComparator,
|
|
17
23
|
type: 'string',
|
|
@@ -36,7 +36,10 @@ function GridOverlayWrapper(props) {
|
|
|
36
36
|
width: viewportInnerSize?.width ?? 0,
|
|
37
37
|
position: 'absolute',
|
|
38
38
|
top: headerHeight,
|
|
39
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
39
|
+
bottom: height === 'auto' ? 0 : undefined,
|
|
40
|
+
zIndex: 3,
|
|
41
|
+
// should be above pinned columns and detail panel
|
|
42
|
+
pointerEvents: 'none'
|
|
40
43
|
}
|
|
41
44
|
}, props));
|
|
42
45
|
}
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex", "getValue"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
6
7
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
7
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
@@ -18,7 +19,7 @@ const useUtilityClasses = ownerState => {
|
|
|
18
19
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
const GridBooleanCellRaw = props => {
|
|
22
23
|
const {
|
|
23
24
|
value
|
|
24
25
|
} = props,
|
|
@@ -37,7 +38,97 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
|
37
38
|
titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
|
|
38
39
|
"data-value": Boolean(value)
|
|
39
40
|
}, other));
|
|
40
|
-
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
|
|
44
|
+
// ----------------------------- Warning --------------------------------
|
|
45
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
46
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
47
|
+
// ----------------------------------------------------------------------
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* GridApi that let you manipulate the grid.
|
|
51
|
+
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
52
|
+
*/
|
|
53
|
+
api: PropTypes.any.isRequired,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The mode of the cell.
|
|
57
|
+
*/
|
|
58
|
+
cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The column of the row that the current cell belongs to.
|
|
62
|
+
*/
|
|
63
|
+
colDef: PropTypes.object.isRequired,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The column field of the cell that triggered the event.
|
|
67
|
+
*/
|
|
68
|
+
field: PropTypes.string.isRequired,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A ref allowing to set imperative focus.
|
|
72
|
+
* It can be passed to the element that should receive focus.
|
|
73
|
+
* @ignore - do not document.
|
|
74
|
+
*/
|
|
75
|
+
focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
76
|
+
current: PropTypes.shape({
|
|
77
|
+
focus: PropTypes.func.isRequired
|
|
78
|
+
})
|
|
79
|
+
})]),
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The cell value formatted with the column valueFormatter.
|
|
83
|
+
*/
|
|
84
|
+
formattedValue: PropTypes.any,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Get the cell value of a row and field.
|
|
88
|
+
* @param {GridRowId} id The row id.
|
|
89
|
+
* @param {string} field The field.
|
|
90
|
+
* @returns {any} The cell value.
|
|
91
|
+
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
92
|
+
*/
|
|
93
|
+
getValue: PropTypes.func.isRequired,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* If true, the cell is the active element.
|
|
97
|
+
*/
|
|
98
|
+
hasFocus: PropTypes.bool.isRequired,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The grid row id.
|
|
102
|
+
*/
|
|
103
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* If true, the cell is editable.
|
|
107
|
+
*/
|
|
108
|
+
isEditable: PropTypes.bool,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The row model of the row that the current cell belongs to.
|
|
112
|
+
*/
|
|
113
|
+
row: PropTypes.object.isRequired,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The node of the row that the current cell belongs to.
|
|
117
|
+
*/
|
|
118
|
+
rowNode: PropTypes.object.isRequired,
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* the tabIndex value.
|
|
122
|
+
*/
|
|
123
|
+
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The cell value, but if the column has valueGetter, use getValue.
|
|
127
|
+
*/
|
|
128
|
+
value: PropTypes.any
|
|
129
|
+
} : void 0;
|
|
130
|
+
const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
|
|
131
|
+
export { GridBooleanCell };
|
|
41
132
|
export const renderBooleanCell = params => {
|
|
42
133
|
if (params.rowNode.isAutoGenerated) {
|
|
43
134
|
return '';
|
|
@@ -6,10 +6,14 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
7
7
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
8
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
|
+
import { styled } from '@mui/material/styles';
|
|
9
10
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
12
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const StyledInputBase = styled(InputBase)({
|
|
15
|
+
fontSize: 'inherit'
|
|
16
|
+
});
|
|
13
17
|
|
|
14
18
|
const useUtilityClasses = ownerState => {
|
|
15
19
|
const {
|
|
@@ -114,7 +118,7 @@ function GridEditDateCell(props) {
|
|
|
114
118
|
inputRef.current.focus();
|
|
115
119
|
}
|
|
116
120
|
}, [hasFocus]);
|
|
117
|
-
return /*#__PURE__*/_jsx(
|
|
121
|
+
return /*#__PURE__*/_jsx(StyledInputBase, _extends({
|
|
118
122
|
inputRef: inputRef,
|
|
119
123
|
fullWidth: true,
|
|
120
124
|
className: classes.root,
|
|
@@ -26,6 +26,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
26
26
|
field,
|
|
27
27
|
id,
|
|
28
28
|
value: isChecked,
|
|
29
|
+
rowNode,
|
|
29
30
|
hasFocus,
|
|
30
31
|
tabIndex
|
|
31
32
|
} = props,
|
|
@@ -73,7 +74,12 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
73
74
|
apiRef.current.publishEvent('cellNavigationKeyDown', props, event);
|
|
74
75
|
}
|
|
75
76
|
}, [apiRef, props]);
|
|
76
|
-
|
|
77
|
+
|
|
78
|
+
if (rowNode.position === 'footer') {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const isSelectable = apiRef.current.isRowSelectable(id);
|
|
77
83
|
const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
78
84
|
return /*#__PURE__*/_jsx(rootProps.components.BaseCheckbox, _extends({
|
|
79
85
|
ref: handleRef,
|
|
@@ -6,6 +6,16 @@ export const GridRootStyles = styled('div', {
|
|
|
6
6
|
slot: 'Root',
|
|
7
7
|
overridesResolver: (props, styles) => [{
|
|
8
8
|
[`&.${gridClasses.autoHeight}`]: styles.autoHeight
|
|
9
|
+
}, {
|
|
10
|
+
[`&.${gridClasses.aggregationColumnHeader}`]: styles.aggregationColumnHeader
|
|
11
|
+
}, {
|
|
12
|
+
[`&.${gridClasses['aggregationColumnHeader--alignLeft']}`]: styles['aggregationColumnHeader--alignLeft']
|
|
13
|
+
}, {
|
|
14
|
+
[`&.${gridClasses['aggregationColumnHeader--alignCenter']}`]: styles['aggregationColumnHeader--alignCenter']
|
|
15
|
+
}, {
|
|
16
|
+
[`&.${gridClasses['aggregationColumnHeader--alignRight']}`]: styles['aggregationColumnHeader--alignRight']
|
|
17
|
+
}, {
|
|
18
|
+
[`&.${gridClasses.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel
|
|
9
19
|
}, {
|
|
10
20
|
[`& .${gridClasses.editBooleanCell}`]: styles.editBooleanCell
|
|
11
21
|
}, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["
|
|
3
|
+
const _excluded = ["hideMenu", "options"],
|
|
4
|
+
_excluded2 = ["hideMenu", "options"],
|
|
5
|
+
_excluded3 = ["csvOptions", "printOptions", "excelOptions"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import MenuItem from '@mui/material/MenuItem';
|
|
@@ -9,31 +11,39 @@ import { GridToolbarExportContainer } from './GridToolbarExportContainer';
|
|
|
9
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
12
|
export const GridCsvExportMenuItem = props => {
|
|
11
13
|
const apiRef = useGridApiContext();
|
|
14
|
+
|
|
12
15
|
const {
|
|
13
16
|
hideMenu,
|
|
14
17
|
options
|
|
15
|
-
} = props
|
|
16
|
-
|
|
18
|
+
} = props,
|
|
19
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
20
|
+
|
|
21
|
+
return /*#__PURE__*/_jsx(MenuItem, _extends({
|
|
17
22
|
onClick: () => {
|
|
18
23
|
apiRef.current.exportDataAsCsv(options);
|
|
19
24
|
hideMenu?.();
|
|
20
|
-
}
|
|
25
|
+
}
|
|
26
|
+
}, other, {
|
|
21
27
|
children: apiRef.current.getLocaleText('toolbarExportCSV')
|
|
22
|
-
});
|
|
28
|
+
}));
|
|
23
29
|
};
|
|
24
30
|
export const GridPrintExportMenuItem = props => {
|
|
25
31
|
const apiRef = useGridApiContext();
|
|
32
|
+
|
|
26
33
|
const {
|
|
27
34
|
hideMenu,
|
|
28
35
|
options
|
|
29
|
-
} = props
|
|
30
|
-
|
|
36
|
+
} = props,
|
|
37
|
+
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/_jsx(MenuItem, _extends({
|
|
31
40
|
onClick: () => {
|
|
32
41
|
apiRef.current.exportDataAsPrint(options);
|
|
33
42
|
hideMenu?.();
|
|
34
|
-
}
|
|
43
|
+
}
|
|
44
|
+
}, other, {
|
|
35
45
|
children: apiRef.current.getLocaleText('toolbarExportPrint')
|
|
36
|
-
});
|
|
46
|
+
}));
|
|
37
47
|
};
|
|
38
48
|
const GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExport(props, ref) {
|
|
39
49
|
const {
|
|
@@ -41,7 +51,7 @@ const GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExpo
|
|
|
41
51
|
printOptions = {},
|
|
42
52
|
excelOptions
|
|
43
53
|
} = props,
|
|
44
|
-
other = _objectWithoutPropertiesLoose(props,
|
|
54
|
+
other = _objectWithoutPropertiesLoose(props, _excluded3);
|
|
45
55
|
|
|
46
56
|
const apiRef = useGridApiContext();
|
|
47
57
|
const preProcessedButtons = apiRef.current.unstable_applyPipeProcessors('exportMenu', [], {
|
|
@@ -2,4 +2,4 @@ import { generateUtilityClasses, generateUtilityClass } from '@mui/material';
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell', 'cellContent', 'cellCheckbox', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLinkOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle']);
|
|
@@ -111,5 +111,12 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
111
111
|
// Used core components translation keys
|
|
112
112
|
MuiTablePagination: {},
|
|
113
113
|
// Row reordering text
|
|
114
|
-
rowReorderingHeaderName: 'Row reordering'
|
|
114
|
+
rowReorderingHeaderName: 'Row reordering',
|
|
115
|
+
// Aggregation
|
|
116
|
+
aggregationMenuItemHeader: 'Aggregation',
|
|
117
|
+
aggregationFunctionLabelSum: 'sum',
|
|
118
|
+
aggregationFunctionLabelAvg: 'avg',
|
|
119
|
+
aggregationFunctionLabelMin: 'min',
|
|
120
|
+
aggregationFunctionLabelMax: 'max',
|
|
121
|
+
aggregationFunctionLabelSize: 'size'
|
|
115
122
|
};
|