@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.13
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 +299 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/components/GridFooter.js +1 -1
- package/components/GridHeader.js +1 -1
- package/components/GridPagination.js +5 -6
- package/components/GridRowCount.js +4 -5
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.js +5 -6
- package/components/GridShadowScrollArea.d.ts +8 -0
- package/components/GridShadowScrollArea.js +82 -0
- package/components/cell/GridEditInputCell.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/components/columnsManagement/GridColumnsManagement.js +59 -61
- package/components/containers/GridOverlay.js +6 -8
- package/components/containers/GridRoot.js +4 -2
- package/components/containers/GridRootStyles.d.ts +1 -2
- package/components/containers/GridRootStyles.js +77 -100
- package/components/containers/GridToolbarContainer.js +5 -6
- package/components/menu/GridMenu.js +7 -6
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
- package/components/panel/GridPanel.js +18 -20
- package/components/panel/GridPanelContent.js +6 -8
- package/components/panel/GridPanelFooter.js +5 -6
- package/components/panel/GridPanelHeader.js +4 -5
- package/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
- package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/components/virtualization/GridVirtualScrollbar.js +8 -5
- package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/constants/cssVariables.d.ts +294 -0
- package/constants/cssVariables.js +168 -0
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/defaultGridSlotsComponents.js +1 -1
- package/constants/gridClasses.d.ts +13 -0
- package/constants/gridClasses.js +1 -1
- package/context/GridContextProvider.js +4 -1
- package/esm/DataGrid/DataGrid.js +31 -22
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/esm/components/GridFooter.js +2 -2
- package/esm/components/GridHeader.js +1 -1
- package/esm/components/GridPagination.js +5 -6
- package/esm/components/GridRowCount.js +4 -5
- package/esm/components/GridScrollArea.js +2 -1
- package/esm/components/GridSelectedRowCount.js +5 -6
- package/esm/components/GridShadowScrollArea.d.ts +8 -0
- package/esm/components/GridShadowScrollArea.js +74 -0
- package/esm/components/cell/GridEditInputCell.js +2 -3
- package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/esm/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/esm/components/containers/GridOverlay.js +6 -8
- package/esm/components/containers/GridRoot.js +4 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -2
- package/esm/components/containers/GridRootStyles.js +78 -101
- package/esm/components/containers/GridToolbarContainer.js +5 -6
- package/esm/components/menu/GridMenu.js +7 -6
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/esm/components/panel/GridPanel.js +18 -20
- package/esm/components/panel/GridPanelContent.js +6 -8
- package/esm/components/panel/GridPanelFooter.js +5 -6
- package/esm/components/panel/GridPanelHeader.js +4 -5
- package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/esm/constants/cssVariables.d.ts +294 -0
- package/esm/constants/cssVariables.js +161 -0
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/defaultGridSlotsComponents.js +2 -2
- package/esm/constants/gridClasses.d.ts +13 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/context/GridContextProvider.js +4 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/esm/hooks/features/columns/index.d.ts +1 -1
- package/esm/hooks/features/columns/index.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +4 -2
- package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/esm/hooks/features/dataSource/index.d.ts +2 -0
- package/esm/hooks/features/dataSource/index.js +2 -0
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
- package/esm/hooks/features/export/utils.js +4 -2
- package/esm/hooks/features/focus/useGridFocus.js +3 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
- package/esm/hooks/features/rowSelection/utils.js +11 -11
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
- package/esm/hooks/features/rows/useGridRows.js +7 -7
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/esm/hooks/utils/useGridSelector.js +4 -1
- package/esm/hooks/utils/useIsSSR.js +4 -1
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/utils/propValidation.js +1 -1
- package/esm/locales/bnBD.d.ts +2 -0
- package/esm/locales/bnBD.js +167 -0
- package/esm/locales/deDE.js +3 -5
- package/esm/locales/huHU.js +10 -13
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/ruRU.js +17 -21
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +164 -49
- package/esm/material/variables.d.ts +5 -0
- package/esm/material/variables.js +89 -0
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/api/gridSortApi.d.ts +1 -1
- package/esm/models/configuration/gridConfiguration.d.ts +7 -1
- package/esm/models/gridBaseSlots.d.ts +56 -6
- package/esm/models/gridDataSource.d.ts +9 -4
- package/esm/models/gridRowSelectionManager.d.ts +9 -0
- package/esm/models/gridRowSelectionManager.js +36 -0
- package/esm/models/gridRowSelectionModel.d.ts +4 -2
- package/esm/models/gridSlotsComponent.d.ts +7 -27
- package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
- package/esm/models/gridSortModel.d.ts +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -3
- package/esm/models/props/DataGridProps.d.ts +22 -17
- package/esm/utils/css/context.d.ts +14 -0
- package/esm/utils/css/context.js +54 -0
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +28 -27
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/hooks/features/columns/gridColumnsSelector.js +9 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/hooks/features/columns/index.d.ts +1 -1
- package/hooks/features/columns/index.js +94 -10
- package/hooks/features/columns/useGridColumns.js +4 -2
- package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/hooks/features/dataSource/gridDataSourceError.js +40 -0
- package/hooks/features/dataSource/index.d.ts +2 -0
- package/hooks/features/dataSource/index.js +25 -0
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/hooks/features/dimensions/useGridDimensions.js +19 -18
- package/hooks/features/editing/useGridCellEditing.js +10 -9
- package/hooks/features/editing/useGridRowEditing.js +11 -10
- package/hooks/features/export/utils.js +4 -2
- package/hooks/features/focus/useGridFocus.js +8 -7
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +11 -28
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
- package/hooks/features/rowSelection/utils.d.ts +2 -2
- package/hooks/features/rowSelection/utils.js +10 -10
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +10 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -8
- package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/virtualization/useGridVirtualScroller.js +21 -25
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +15 -0
- package/internals/utils/propValidation.js +1 -1
- package/locales/bnBD.d.ts +2 -0
- package/locales/bnBD.js +173 -0
- package/locales/deDE.js +3 -5
- package/locales/huHU.js +10 -13
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/locales/ruRU.js +17 -21
- package/material/index.d.ts +1 -0
- package/material/index.js +170 -49
- package/material/variables.d.ts +5 -0
- package/material/variables.js +95 -0
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/api/gridSortApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +56 -6
- package/models/gridDataSource.d.ts +9 -4
- package/models/gridRowSelectionManager.d.ts +9 -0
- package/models/gridRowSelectionManager.js +43 -0
- package/models/gridRowSelectionModel.d.ts +4 -2
- package/models/gridSlotsComponent.d.ts +7 -27
- package/models/gridSlotsComponentsProps.d.ts +3 -11
- package/models/gridSortModel.d.ts +1 -1
- package/models/index.d.ts +2 -1
- package/models/index.js +34 -11
- package/models/props/DataGridProps.d.ts +22 -17
- package/modern/DataGrid/DataGrid.js +31 -22
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/modern/components/GridFooter.js +2 -2
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridPagination.js +5 -6
- package/modern/components/GridRowCount.js +4 -5
- package/modern/components/GridScrollArea.js +2 -1
- package/modern/components/GridSelectedRowCount.js +5 -6
- package/modern/components/GridShadowScrollArea.d.ts +8 -0
- package/modern/components/GridShadowScrollArea.js +74 -0
- package/modern/components/cell/GridEditInputCell.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/modern/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/modern/components/containers/GridOverlay.js +6 -8
- package/modern/components/containers/GridRoot.js +4 -2
- package/modern/components/containers/GridRootStyles.d.ts +1 -2
- package/modern/components/containers/GridRootStyles.js +78 -101
- package/modern/components/containers/GridToolbarContainer.js +5 -6
- package/modern/components/menu/GridMenu.js +7 -6
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/modern/components/panel/GridPanel.js +18 -20
- package/modern/components/panel/GridPanelContent.js +6 -8
- package/modern/components/panel/GridPanelFooter.js +5 -6
- package/modern/components/panel/GridPanelHeader.js +4 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/modern/constants/cssVariables.d.ts +294 -0
- package/modern/constants/cssVariables.js +161 -0
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +2 -2
- package/modern/constants/gridClasses.d.ts +13 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/context/GridContextProvider.js +4 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/modern/hooks/features/columns/index.d.ts +1 -1
- package/modern/hooks/features/columns/index.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +4 -2
- package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/modern/hooks/features/dataSource/index.d.ts +2 -0
- package/modern/hooks/features/dataSource/index.js +2 -0
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
- package/modern/hooks/features/export/utils.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.d.ts +1 -1
- package/modern/hooks/features/index.js +1 -1
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
- package/modern/hooks/features/rowSelection/utils.js +11 -11
- package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/modern/hooks/utils/useGridSelector.js +4 -1
- package/modern/hooks/utils/useIsSSR.js +4 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.d.ts +2 -1
- package/modern/internals/index.js +2 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/bnBD.d.ts +2 -0
- package/modern/locales/bnBD.js +167 -0
- package/modern/locales/deDE.js +3 -5
- package/modern/locales/huHU.js +10 -13
- package/modern/locales/index.d.ts +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/ruRU.js +17 -21
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +164 -49
- package/modern/material/variables.d.ts +5 -0
- package/modern/material/variables.js +89 -0
- package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
- package/modern/models/api/gridSortApi.d.ts +1 -1
- package/modern/models/configuration/gridConfiguration.d.ts +7 -1
- package/modern/models/gridBaseSlots.d.ts +56 -6
- package/modern/models/gridDataSource.d.ts +9 -4
- package/modern/models/gridRowSelectionManager.d.ts +9 -0
- package/modern/models/gridRowSelectionManager.js +36 -0
- package/modern/models/gridRowSelectionModel.d.ts +4 -2
- package/modern/models/gridSlotsComponent.d.ts +7 -27
- package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
- package/modern/models/gridSortModel.d.ts +1 -1
- package/modern/models/index.d.ts +2 -1
- package/modern/models/index.js +2 -3
- package/modern/models/props/DataGridProps.d.ts +22 -17
- package/modern/utils/css/context.d.ts +14 -0
- package/modern/utils/css/context.js +54 -0
- package/modern/utils/index.d.ts +2 -1
- package/modern/utils/index.js +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/css/context.d.ts +14 -0
- package/utils/css/context.js +64 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +8 -1
package/locales/ruRU.js
CHANGED
|
@@ -21,9 +21,8 @@ const ruRUGrid = {
|
|
|
21
21
|
// Root
|
|
22
22
|
noRowsLabel: 'Нет строк',
|
|
23
23
|
noResultsOverlayLabel: 'Данные не найдены.',
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
noColumnsOverlayLabel: 'Нет столбцов',
|
|
25
|
+
noColumnsOverlayManageColumns: 'Управление столбцами',
|
|
27
26
|
// Density selector toolbar button text
|
|
28
27
|
toolbarDensity: 'Высота строки',
|
|
29
28
|
toolbarDensityLabel: 'Высота строки',
|
|
@@ -48,16 +47,15 @@ const ruRUGrid = {
|
|
|
48
47
|
toolbarQuickFilterLabel: 'Поиск',
|
|
49
48
|
toolbarQuickFilterDeleteIconLabel: 'Очистить',
|
|
50
49
|
// Prompt toolbar field
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
toolbarPromptControlPlaceholder: 'Введите запрос…',
|
|
51
|
+
toolbarPromptControlWithRecordingPlaceholder: 'Введите или запишите запрос…',
|
|
52
|
+
toolbarPromptControlRecordingPlaceholder: 'Прослушивание запроса…',
|
|
53
|
+
toolbarPromptControlLabel: 'Ввод запроса',
|
|
54
|
+
toolbarPromptControlRecordButtonDefaultLabel: 'Запись',
|
|
55
|
+
toolbarPromptControlRecordButtonActiveLabel: 'Остановить запись',
|
|
56
|
+
toolbarPromptControlSendActionLabel: 'Отправить',
|
|
57
|
+
toolbarPromptControlSendActionAriaLabel: 'Отправить запрос',
|
|
58
|
+
toolbarPromptControlErrorMessage: 'При обработке запроса произошла ошибка. Пожалуйста, повторите попытку с другим запросом.',
|
|
61
59
|
// Export selector toolbar button text
|
|
62
60
|
toolbarExport: 'Экспорт',
|
|
63
61
|
toolbarExportLabel: 'Экспорт',
|
|
@@ -69,8 +67,7 @@ const ruRUGrid = {
|
|
|
69
67
|
columnsManagementNoColumns: 'Нет столбцов',
|
|
70
68
|
columnsManagementShowHideAllText: 'Показать/Скрыть Всё',
|
|
71
69
|
columnsManagementReset: 'Сбросить',
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
columnsManagementDeleteIconLabel: 'Очистить',
|
|
74
71
|
// Filter panel text
|
|
75
72
|
filterPanelAddFilter: 'Добавить фильтр',
|
|
76
73
|
filterPanelRemoveAll: 'Очистить фильтр',
|
|
@@ -84,9 +81,9 @@ const ruRUGrid = {
|
|
|
84
81
|
filterPanelInputPlaceholder: 'Значение фильтра',
|
|
85
82
|
// Filter operators text
|
|
86
83
|
filterOperatorContains: 'содержит',
|
|
87
|
-
|
|
84
|
+
filterOperatorDoesNotContain: 'не содержит',
|
|
88
85
|
filterOperatorEquals: 'равен',
|
|
89
|
-
|
|
86
|
+
filterOperatorDoesNotEqual: 'не равен',
|
|
90
87
|
filterOperatorStartsWith: 'начинается с',
|
|
91
88
|
filterOperatorEndsWith: 'заканчивается на',
|
|
92
89
|
filterOperatorIs: 'равен',
|
|
@@ -106,9 +103,9 @@ const ruRUGrid = {
|
|
|
106
103
|
'filterOperator<=': '<=',
|
|
107
104
|
// Header filter operators text
|
|
108
105
|
headerFilterOperatorContains: 'содержит',
|
|
109
|
-
|
|
106
|
+
headerFilterOperatorDoesNotContain: 'не содержит',
|
|
110
107
|
headerFilterOperatorEquals: 'равен',
|
|
111
|
-
|
|
108
|
+
headerFilterOperatorDoesNotEqual: 'не равен',
|
|
112
109
|
headerFilterOperatorStartsWith: 'начинается с',
|
|
113
110
|
headerFilterOperatorEndsWith: 'заканчивается на',
|
|
114
111
|
headerFilterOperatorIs: 'равен',
|
|
@@ -126,8 +123,7 @@ const ruRUGrid = {
|
|
|
126
123
|
'headerFilterOperator>=': 'больше или равно',
|
|
127
124
|
'headerFilterOperator<': 'меньше чем',
|
|
128
125
|
'headerFilterOperator<=': 'меньше или равно',
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
headerFilterClear: 'Очистить фильтр',
|
|
131
127
|
// Filter values text
|
|
132
128
|
filterValueAny: 'любой',
|
|
133
129
|
filterValueTrue: 'истина',
|
package/material/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GridIconSlotsComponent } from '../models';
|
|
2
2
|
import type { GridBaseSlots } from '../models/gridSlotsComponent';
|
|
3
|
+
export { useMaterialCSSVariables } from "./variables.js";
|
|
3
4
|
declare const materialSlots: GridBaseSlots & GridIconSlotsComponent;
|
|
4
5
|
export default materialSlots;
|
package/material/index.js
CHANGED
|
@@ -6,10 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
Object.defineProperty(exports, "useMaterialCSSVariables", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _variables.useMaterialCSSVariables;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
9
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
16
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
17
|
var React = _interopRequireWildcard(require("react"));
|
|
12
18
|
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
19
|
+
var _styles = require("@mui/material/styles");
|
|
20
|
+
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
13
21
|
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
14
22
|
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
15
23
|
var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
@@ -24,12 +32,12 @@ var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
|
|
|
24
32
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
25
33
|
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
26
34
|
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
27
|
-
var _FormControlLabel =
|
|
35
|
+
var _FormControlLabel = _interopRequireWildcard(require("@mui/material/FormControlLabel"));
|
|
28
36
|
var _Select = _interopRequireDefault(require("@mui/material/Select"));
|
|
29
37
|
var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
|
|
30
38
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
31
|
-
var _IconButton =
|
|
32
|
-
var _InputAdornment =
|
|
39
|
+
var _IconButton = _interopRequireWildcard(require("@mui/material/IconButton"));
|
|
40
|
+
var _InputAdornment = _interopRequireWildcard(require("@mui/material/InputAdornment"));
|
|
33
41
|
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
34
42
|
var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
|
|
35
43
|
var _ClickAwayListener = _interopRequireDefault(require("@mui/material/ClickAwayListener"));
|
|
@@ -42,15 +50,56 @@ var _GridColumnUnsortedIcon = require("./icons/GridColumnUnsortedIcon");
|
|
|
42
50
|
var _icons = require("./icons");
|
|
43
51
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
44
52
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
53
|
+
var _variables = require("./variables");
|
|
45
54
|
const _excluded = ["id", "label", "labelId", "disabled", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "size", "style", "fullWidth"],
|
|
46
|
-
_excluded2 = ["autoFocus", "label", "fullWidth", "slotProps", "className"
|
|
55
|
+
_excluded2 = ["autoFocus", "label", "fullWidth", "slotProps", "className"],
|
|
47
56
|
_excluded3 = ["inert", "iconStart", "iconEnd", "children"],
|
|
48
57
|
_excluded4 = ["slotProps"],
|
|
49
|
-
_excluded5 = ["slotProps"],
|
|
50
|
-
_excluded6 = ["
|
|
58
|
+
_excluded5 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps"],
|
|
59
|
+
_excluded6 = ["key"],
|
|
60
|
+
_excluded7 = ["inputProps", "InputProps", "InputLabelProps"],
|
|
61
|
+
_excluded8 = ["slotProps"],
|
|
62
|
+
_excluded9 = ["native"];
|
|
51
63
|
const ClickAwayListener = (0, _forwardRef.forwardRef)(_ClickAwayListener.default);
|
|
64
|
+
const InputAdornment = (0, _styles.styled)(_InputAdornment.default)({
|
|
65
|
+
[`&.${_InputAdornment.inputAdornmentClasses.positionEnd} .${_IconButton.iconButtonClasses.sizeSmall}`]: {
|
|
66
|
+
marginRight: '-7px'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const FormControlLabel = (0, _styles.styled)(_FormControlLabel.default, {
|
|
70
|
+
shouldForwardProp: prop => prop !== 'fullWidth'
|
|
71
|
+
})(({
|
|
72
|
+
theme
|
|
73
|
+
}) => ({
|
|
74
|
+
gap: theme.spacing(0.5),
|
|
75
|
+
margin: 0,
|
|
76
|
+
[`& .${_FormControlLabel.formControlLabelClasses.label}`]: {
|
|
77
|
+
fontSize: theme.typography.pxToRem(14)
|
|
78
|
+
},
|
|
79
|
+
variants: [{
|
|
80
|
+
props: {
|
|
81
|
+
fullWidth: true
|
|
82
|
+
},
|
|
83
|
+
style: {
|
|
84
|
+
width: '100%'
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
87
|
+
}));
|
|
88
|
+
const Checkbox = (0, _styles.styled)(_Checkbox.default, {
|
|
89
|
+
shouldForwardProp: prop => prop !== 'density'
|
|
90
|
+
})(({
|
|
91
|
+
theme
|
|
92
|
+
}) => ({
|
|
93
|
+
variants: [{
|
|
94
|
+
props: {
|
|
95
|
+
density: 'compact'
|
|
96
|
+
},
|
|
97
|
+
style: {
|
|
98
|
+
padding: theme.spacing(0.5)
|
|
99
|
+
}
|
|
100
|
+
}]
|
|
101
|
+
}));
|
|
52
102
|
const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
53
|
-
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
54
103
|
const {
|
|
55
104
|
id,
|
|
56
105
|
label,
|
|
@@ -66,21 +115,27 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
|
66
115
|
fullWidth
|
|
67
116
|
} = props,
|
|
68
117
|
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
69
|
-
|
|
118
|
+
const menuProps = {
|
|
119
|
+
PaperProps: {
|
|
120
|
+
onKeyDown
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
if (onClose) {
|
|
124
|
+
menuProps.onClose = onClose;
|
|
125
|
+
}
|
|
126
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_FormControl.default, {
|
|
70
127
|
size: size,
|
|
71
128
|
fullWidth: fullWidth,
|
|
72
129
|
style: style,
|
|
73
|
-
disabled: disabled
|
|
74
|
-
}, rootProps.slotProps?.baseFormControl, {
|
|
130
|
+
disabled: disabled,
|
|
75
131
|
ref: ref,
|
|
76
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default,
|
|
132
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, {
|
|
77
133
|
id: labelId,
|
|
78
134
|
htmlFor: id,
|
|
79
135
|
shrink: true,
|
|
80
|
-
variant: "outlined"
|
|
81
|
-
}, rootProps.slotProps?.baseInputLabel, {
|
|
136
|
+
variant: "outlined",
|
|
82
137
|
children: label
|
|
83
|
-
})
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, (0, _extends2.default)({
|
|
84
139
|
id: id,
|
|
85
140
|
labelId: labelId,
|
|
86
141
|
label: label,
|
|
@@ -91,15 +146,10 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
|
|
|
91
146
|
notched: true,
|
|
92
147
|
inputProps: slotProps?.htmlInput,
|
|
93
148
|
onOpen: onOpen,
|
|
94
|
-
MenuProps:
|
|
95
|
-
onClose,
|
|
96
|
-
PaperProps: {
|
|
97
|
-
onKeyDown
|
|
98
|
-
}
|
|
99
|
-
},
|
|
149
|
+
MenuProps: menuProps,
|
|
100
150
|
size: size
|
|
101
151
|
}))]
|
|
102
|
-
})
|
|
152
|
+
});
|
|
103
153
|
});
|
|
104
154
|
|
|
105
155
|
/* eslint-disable material-ui/disallow-react-api-in-server-components */
|
|
@@ -143,6 +193,7 @@ const iconSlots = {
|
|
|
143
193
|
menuItemCheckIcon: _icons.GridCheckIcon
|
|
144
194
|
};
|
|
145
195
|
const baseSlots = {
|
|
196
|
+
baseAutocomplete: BaseAutocomplete,
|
|
146
197
|
baseBadge: _Badge.default,
|
|
147
198
|
baseCheckbox: /*#__PURE__*/React.forwardRef(BaseCheckbox),
|
|
148
199
|
baseCircularProgress: _CircularProgress.default,
|
|
@@ -152,38 +203,29 @@ const baseSlots = {
|
|
|
152
203
|
baseMenuList: BaseMenuList,
|
|
153
204
|
baseMenuItem: BaseMenuItem,
|
|
154
205
|
baseTextField: BaseTextField,
|
|
155
|
-
baseFormControl: _FormControl.default,
|
|
156
206
|
baseButton: _Button.default,
|
|
157
207
|
baseIconButton: _IconButton.default,
|
|
158
|
-
baseInputAdornment: _InputAdornment.default,
|
|
159
208
|
baseTooltip: _Tooltip.default,
|
|
160
209
|
basePopper: BasePopper,
|
|
161
|
-
baseInputLabel: _InputLabel.default,
|
|
162
210
|
baseSelect: BaseSelect,
|
|
163
211
|
baseSelectOption: BaseSelectOption,
|
|
164
212
|
baseSkeleton: _Skeleton.default,
|
|
165
|
-
baseSwitch: _Switch.default
|
|
166
|
-
baseChip: _Chip.default
|
|
213
|
+
baseSwitch: _Switch.default
|
|
167
214
|
};
|
|
168
215
|
const materialSlots = (0, _extends2.default)({}, baseSlots, iconSlots);
|
|
169
216
|
var _default = exports.default = materialSlots;
|
|
170
|
-
const CHECKBOX_COMPACT = {
|
|
171
|
-
p: 0.5
|
|
172
|
-
};
|
|
173
217
|
function BaseCheckbox(props, ref) {
|
|
174
218
|
const {
|
|
175
219
|
autoFocus,
|
|
176
220
|
label,
|
|
177
221
|
fullWidth,
|
|
178
222
|
slotProps,
|
|
179
|
-
className
|
|
180
|
-
density
|
|
223
|
+
className
|
|
181
224
|
} = props,
|
|
182
225
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
183
226
|
const elementRef = React.useRef(null);
|
|
184
227
|
const handleRef = (0, _useForkRef.default)(elementRef, ref);
|
|
185
228
|
const rippleRef = React.useRef(null);
|
|
186
|
-
const sx = density === 'compact' ? CHECKBOX_COMPACT : undefined;
|
|
187
229
|
React.useEffect(() => {
|
|
188
230
|
if (autoFocus) {
|
|
189
231
|
const input = elementRef.current?.querySelector('input');
|
|
@@ -197,27 +239,22 @@ function BaseCheckbox(props, ref) {
|
|
|
197
239
|
}
|
|
198
240
|
}, [autoFocus]);
|
|
199
241
|
if (!label) {
|
|
200
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
242
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Checkbox, (0, _extends2.default)({}, other, {
|
|
201
243
|
className: className,
|
|
202
244
|
inputProps: slotProps?.htmlInput,
|
|
203
245
|
ref: handleRef,
|
|
204
|
-
sx: sx,
|
|
205
246
|
touchRippleRef: rippleRef
|
|
206
247
|
}));
|
|
207
248
|
}
|
|
208
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
249
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormControlLabel, {
|
|
209
250
|
className: className,
|
|
210
|
-
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
251
|
+
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(Checkbox, (0, _extends2.default)({}, other, {
|
|
211
252
|
inputProps: slotProps?.htmlInput,
|
|
212
253
|
ref: handleRef,
|
|
213
|
-
sx: sx,
|
|
214
254
|
touchRippleRef: rippleRef
|
|
215
255
|
})),
|
|
216
256
|
label: label,
|
|
217
|
-
|
|
218
|
-
width: '100%',
|
|
219
|
-
margin: 0
|
|
220
|
-
} : undefined
|
|
257
|
+
fullWidth: fullWidth
|
|
221
258
|
});
|
|
222
259
|
}
|
|
223
260
|
function BaseMenuList(props) {
|
|
@@ -253,20 +290,102 @@ function BaseTextField(props) {
|
|
|
253
290
|
variant: "outlined"
|
|
254
291
|
}, rest, {
|
|
255
292
|
inputProps: slotProps?.htmlInput,
|
|
256
|
-
InputProps: slotProps?.input,
|
|
293
|
+
InputProps: transformInputProps(slotProps?.input),
|
|
257
294
|
InputLabelProps: (0, _extends2.default)({
|
|
258
295
|
shrink: true
|
|
259
296
|
}, slotProps?.inputLabel)
|
|
260
297
|
}));
|
|
261
298
|
}
|
|
262
|
-
function
|
|
299
|
+
function BaseAutocomplete(props) {
|
|
300
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
263
301
|
const {
|
|
302
|
+
id,
|
|
303
|
+
multiple,
|
|
304
|
+
freeSolo,
|
|
305
|
+
options,
|
|
306
|
+
getOptionLabel,
|
|
307
|
+
isOptionEqualToValue,
|
|
308
|
+
value,
|
|
309
|
+
onChange,
|
|
310
|
+
label,
|
|
311
|
+
placeholder,
|
|
264
312
|
slotProps
|
|
265
313
|
} = props,
|
|
266
314
|
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded5);
|
|
267
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
268
|
-
|
|
269
|
-
|
|
315
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
|
|
316
|
+
id: id,
|
|
317
|
+
multiple: multiple,
|
|
318
|
+
freeSolo: freeSolo,
|
|
319
|
+
options: options,
|
|
320
|
+
getOptionLabel: getOptionLabel,
|
|
321
|
+
isOptionEqualToValue: isOptionEqualToValue,
|
|
322
|
+
value: value,
|
|
323
|
+
onChange: onChange,
|
|
324
|
+
renderTags: (currentValue, getTagProps) => currentValue.map((option, index) => {
|
|
325
|
+
const _getTagProps = getTagProps({
|
|
326
|
+
index
|
|
327
|
+
}),
|
|
328
|
+
{
|
|
329
|
+
key
|
|
330
|
+
} = _getTagProps,
|
|
331
|
+
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded6);
|
|
332
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
|
|
333
|
+
variant: "outlined",
|
|
334
|
+
size: "small",
|
|
335
|
+
label: typeof option === 'string' ? option : getOptionLabel?.(option)
|
|
336
|
+
}, tagProps), key);
|
|
337
|
+
}),
|
|
338
|
+
renderInput: params => {
|
|
339
|
+
const {
|
|
340
|
+
inputProps,
|
|
341
|
+
InputProps,
|
|
342
|
+
InputLabelProps
|
|
343
|
+
} = params,
|
|
344
|
+
inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded7);
|
|
345
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTextField, (0, _extends2.default)({}, inputRest, {
|
|
346
|
+
label: label,
|
|
347
|
+
placeholder: placeholder,
|
|
348
|
+
slotProps: {
|
|
349
|
+
input: InputProps,
|
|
350
|
+
inputLabel: InputLabelProps,
|
|
351
|
+
htmlInput: inputProps
|
|
352
|
+
}
|
|
353
|
+
}, slotProps?.textField, rootProps.slotProps?.baseTextField));
|
|
354
|
+
}
|
|
355
|
+
}, rest));
|
|
356
|
+
}
|
|
357
|
+
function BaseInput(props) {
|
|
358
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({}, transformInputProps(props)));
|
|
359
|
+
}
|
|
360
|
+
function transformInputProps(props) {
|
|
361
|
+
if (!props) {
|
|
362
|
+
return undefined;
|
|
363
|
+
}
|
|
364
|
+
const {
|
|
365
|
+
slotProps
|
|
366
|
+
} = props,
|
|
367
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded8);
|
|
368
|
+
const result = rest;
|
|
369
|
+
if (result.startAdornment) {
|
|
370
|
+
result.startAdornment = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, {
|
|
371
|
+
position: "start",
|
|
372
|
+
children: result.startAdornment
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
if (result.endAdornment) {
|
|
376
|
+
result.endAdornment = /*#__PURE__*/(0, _jsxRuntime.jsx)(InputAdornment, {
|
|
377
|
+
position: "end",
|
|
378
|
+
children: result.endAdornment
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
if (slotProps?.htmlInput) {
|
|
382
|
+
if (result.inputProps) {
|
|
383
|
+
result.inputProps = (0, _extends2.default)({}, result.inputProps, slotProps?.htmlInput);
|
|
384
|
+
} else {
|
|
385
|
+
result.inputProps = slotProps?.htmlInput;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return result;
|
|
270
389
|
}
|
|
271
390
|
const transformOrigin = {
|
|
272
391
|
'bottom-start': 'top left',
|
|
@@ -361,15 +480,17 @@ function focusTrapWrapper(props, content) {
|
|
|
361
480
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Unstable_TrapFocus.default, {
|
|
362
481
|
open: true,
|
|
363
482
|
disableEnforceFocus: true,
|
|
364
|
-
|
|
365
|
-
|
|
483
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
484
|
+
tabIndex: -1,
|
|
485
|
+
children: content
|
|
486
|
+
})
|
|
366
487
|
});
|
|
367
488
|
}
|
|
368
489
|
function BaseSelectOption(_ref) {
|
|
369
490
|
let {
|
|
370
491
|
native
|
|
371
492
|
} = _ref,
|
|
372
|
-
props = (0, _objectWithoutPropertiesLoose2.default)(_ref,
|
|
493
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded9);
|
|
373
494
|
if (native) {
|
|
374
495
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
|
|
375
496
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useMaterialCSSVariables = useMaterialCSSVariables;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _styles = require("@mui/material/styles");
|
|
10
|
+
var _hash = require("@mui/x-internals/hash");
|
|
11
|
+
var _cssVariables = require("../constants/cssVariables");
|
|
12
|
+
function useMaterialCSSVariables() {
|
|
13
|
+
const theme = (0, _styles.useTheme)();
|
|
14
|
+
return React.useMemo(() => {
|
|
15
|
+
const id = (0, _hash.hash)(JSON.stringify(theme));
|
|
16
|
+
const variables = transformTheme(theme);
|
|
17
|
+
return {
|
|
18
|
+
id,
|
|
19
|
+
variables
|
|
20
|
+
};
|
|
21
|
+
}, [theme]);
|
|
22
|
+
}
|
|
23
|
+
function transformTheme(t) {
|
|
24
|
+
const borderColor = getBorderColor(t);
|
|
25
|
+
const dataGridPalette = t.palette.DataGrid; // FIXME: docs typecheck error
|
|
26
|
+
|
|
27
|
+
const backgroundBase = dataGridPalette?.bg ?? (t.vars || t).palette.background.default;
|
|
28
|
+
const backgroundHeader = dataGridPalette?.headerBg ?? backgroundBase;
|
|
29
|
+
const backgroundPinned = dataGridPalette?.pinnedBg ?? backgroundBase;
|
|
30
|
+
const backgroundBackdrop = t.vars ? `rgba(${t.vars.palette.background.defaultChannel} / ${t.vars.palette.action.disabledOpacity})` : (0, _styles.alpha)(t.palette.background.default, t.palette.action.disabledOpacity);
|
|
31
|
+
const selectedColor = t.vars ? `rgb(${t.vars.palette.primary.mainChannel})` : t.palette.primary.main;
|
|
32
|
+
const k = _cssVariables.vars.keys;
|
|
33
|
+
return {
|
|
34
|
+
[k.spacingUnit]: t.spacing(1),
|
|
35
|
+
[k.colors.border.base]: borderColor,
|
|
36
|
+
[k.colors.background.base]: backgroundBase,
|
|
37
|
+
[k.colors.background.overlay]: t.palette.mode === 'dark' ? `color-mix(in srgb, ${t.palette.background.paper} 95%, #fff)` : t.palette.background.paper,
|
|
38
|
+
[k.colors.background.backdrop]: backgroundBackdrop,
|
|
39
|
+
[k.colors.foreground.base]: t.palette.text.primary,
|
|
40
|
+
[k.colors.foreground.muted]: t.palette.text.secondary,
|
|
41
|
+
[k.colors.foreground.accent]: t.palette.primary.dark,
|
|
42
|
+
[k.colors.foreground.disabled]: t.palette.text.disabled,
|
|
43
|
+
[k.colors.interactive.hover]: removeOpacity(t.palette.action.hover),
|
|
44
|
+
[k.colors.interactive.hoverOpacity]: t.palette.action.hoverOpacity,
|
|
45
|
+
[k.colors.interactive.focus]: removeOpacity(t.palette.primary.main),
|
|
46
|
+
[k.colors.interactive.focusOpacity]: t.palette.action.focusOpacity,
|
|
47
|
+
[k.colors.interactive.disabled]: removeOpacity(t.palette.action.disabled),
|
|
48
|
+
[k.colors.interactive.disabledOpacity]: t.palette.action.disabledOpacity,
|
|
49
|
+
[k.colors.interactive.selected]: selectedColor,
|
|
50
|
+
[k.colors.interactive.selectedOpacity]: t.palette.action.selectedOpacity,
|
|
51
|
+
[k.header.background.base]: backgroundHeader,
|
|
52
|
+
[k.cell.background.pinned]: backgroundPinned,
|
|
53
|
+
[k.radius.base]: typeof t.shape.borderRadius === 'number' ? `${t.shape.borderRadius}px` : t.shape.borderRadius,
|
|
54
|
+
[k.typography.fontFamily.base]: t.typography.fontFamily,
|
|
55
|
+
[k.typography.fontWeight.light]: t.typography.fontWeightLight,
|
|
56
|
+
[k.typography.fontWeight.regular]: t.typography.fontWeightRegular,
|
|
57
|
+
[k.typography.fontWeight.medium]: t.typography.fontWeightMedium,
|
|
58
|
+
[k.typography.fontWeight.bold]: t.typography.fontWeightBold,
|
|
59
|
+
[k.typography.body.fontFamily]: t.typography.body2.fontFamily,
|
|
60
|
+
[k.typography.body.fontSize]: t.typography.body2.fontSize,
|
|
61
|
+
[k.typography.body.fontWeight]: t.typography.body2.fontWeight,
|
|
62
|
+
[k.typography.body.letterSpacing]: t.typography.body2.letterSpacing,
|
|
63
|
+
[k.typography.body.lineHeight]: t.typography.body2.lineHeight,
|
|
64
|
+
[k.typography.small.fontFamily]: t.typography.caption.fontFamily,
|
|
65
|
+
[k.typography.small.fontSize]: t.typography.caption.fontSize,
|
|
66
|
+
[k.typography.small.fontWeight]: t.typography.caption.fontWeight,
|
|
67
|
+
[k.typography.small.letterSpacing]: t.typography.caption.letterSpacing,
|
|
68
|
+
[k.typography.small.lineHeight]: t.typography.caption.lineHeight,
|
|
69
|
+
[k.transitions.easing.easeIn]: t.transitions.easing.easeIn,
|
|
70
|
+
[k.transitions.easing.easeOut]: t.transitions.easing.easeOut,
|
|
71
|
+
[k.transitions.easing.easeInOut]: t.transitions.easing.easeInOut,
|
|
72
|
+
[k.transitions.duration.short]: `${t.transitions.duration.shorter}ms`,
|
|
73
|
+
[k.transitions.duration.base]: `${t.transitions.duration.short}ms`,
|
|
74
|
+
[k.transitions.duration.long]: `${t.transitions.duration.standard}ms`,
|
|
75
|
+
[k.shadows.base]: t.shadows[2],
|
|
76
|
+
[k.shadows.overlay]: t.shadows[8],
|
|
77
|
+
[k.zIndex.panel]: t.zIndex.modal,
|
|
78
|
+
[k.zIndex.menu]: t.zIndex.modal
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function getBorderColor(theme) {
|
|
82
|
+
if (theme.vars) {
|
|
83
|
+
return theme.vars.palette.TableCell.border;
|
|
84
|
+
}
|
|
85
|
+
if (theme.palette.mode === 'light') {
|
|
86
|
+
return (0, _styles.lighten)((0, _styles.alpha)(theme.palette.divider, 1), 0.88);
|
|
87
|
+
}
|
|
88
|
+
return (0, _styles.darken)((0, _styles.alpha)(theme.palette.divider, 1), 0.68);
|
|
89
|
+
}
|
|
90
|
+
function setOpacity(color, opacity) {
|
|
91
|
+
return `rgba(from ${color} r g b / ${opacity})`;
|
|
92
|
+
}
|
|
93
|
+
function removeOpacity(color) {
|
|
94
|
+
return setOpacity(color, 1);
|
|
95
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { GridRowId, GridRowModel } from
|
|
1
|
+
import type { GridRowId, GridRowModel } from '../gridRows';
|
|
2
|
+
import type { GridRowSelectionModel } from '../gridRowSelectionModel';
|
|
2
3
|
/**
|
|
3
4
|
* The selection API interface that is available in the grid [[apiRef]].
|
|
4
5
|
*/
|
|
@@ -25,6 +26,7 @@ export interface GridRowSelectionApi {
|
|
|
25
26
|
/**
|
|
26
27
|
* Returns an array of the selected rows.
|
|
27
28
|
* @returns {Map<GridRowId, GridRowModel>} A `Map` with the selected rows.
|
|
29
|
+
* @deprecated Use `gridRowSelectionIdsSelector`, `gridRowSelectionCountSelector`, or `gridRowSelectionManagerSelector` instead.
|
|
28
30
|
*/
|
|
29
31
|
getSelectedRows: () => Map<GridRowId, GridRowModel>;
|
|
30
32
|
/**
|
|
@@ -32,7 +34,7 @@ export interface GridRowSelectionApi {
|
|
|
32
34
|
* Any row already selected will be unselected.
|
|
33
35
|
* @param {readonly GridRowId[]} rowIds The row ids to select.
|
|
34
36
|
*/
|
|
35
|
-
setRowSelectionModel: (rowIds:
|
|
37
|
+
setRowSelectionModel: (rowIds: GridRowSelectionModel) => void;
|
|
36
38
|
}
|
|
37
39
|
export interface GridRowMultiSelectionApi {
|
|
38
40
|
/**
|
|
@@ -23,7 +23,7 @@ export interface GridSortApi {
|
|
|
23
23
|
* Sorts a column.
|
|
24
24
|
* @param {GridColDef['field']} field The field identifier of the column to be sorted.
|
|
25
25
|
* @param {GridSortDirection} direction The direction to be sorted. By default, the next in the `sortingOrder` prop.
|
|
26
|
-
* @param {boolean} allowMultipleSorting Whether to keep the existing [
|
|
26
|
+
* @param {boolean} allowMultipleSorting Whether to keep the existing [GridSortModel]. Default is `false`.
|
|
27
27
|
*/
|
|
28
28
|
sortColumn: (field: GridColDef['field'], direction?: GridSortDirection, allowMultipleSorting?: boolean) => void;
|
|
29
29
|
/**
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridRowAriaAttributesInternalHook } from "./gridRowConfiguration.js";
|
|
3
|
+
import type { GridCSSVariablesInterface } from '../../constants/cssVariables';
|
|
3
4
|
export interface GridAriaAttributesInternalHook {
|
|
4
5
|
useGridAriaAttributes: () => React.HTMLAttributes<HTMLElement>;
|
|
5
6
|
}
|
|
6
|
-
export interface GridInternalHook extends GridAriaAttributesInternalHook, GridRowAriaAttributesInternalHook {
|
|
7
|
+
export interface GridInternalHook extends GridAriaAttributesInternalHook, GridRowAriaAttributesInternalHook {
|
|
8
|
+
useCSSVariables: () => {
|
|
9
|
+
id: string;
|
|
10
|
+
variables: GridCSSVariablesInterface;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
7
13
|
export interface GridConfiguration {
|
|
8
14
|
hooks: GridInternalHook;
|
|
9
15
|
}
|