@mui/x-data-grid 9.14.0 → 9.15.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 +176 -0
- package/DataGrid/DataGrid.js +8 -0
- package/DataGrid/DataGrid.mjs +9 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/DataGrid/useDataGridComponent.mjs +2 -2
- package/DataGrid/useDataGridProps.mjs +1 -1
- package/colDef/gridActionsColDef.mjs +1 -1
- package/colDef/gridBooleanColDef.mjs +1 -1
- package/colDef/gridCheckboxSelectionColDef.mjs +1 -1
- package/colDef/gridDateColDef.mjs +1 -1
- package/colDef/gridDefaultColumnTypes.mjs +1 -1
- package/colDef/gridLongTextColDef.mjs +1 -1
- package/colDef/gridNumericColDef.mjs +1 -1
- package/colDef/gridSingleSelectColDef.mjs +1 -1
- package/components/GridColumnHeaders.mjs +2 -2
- package/components/GridColumnSortButton.mjs +2 -2
- package/components/GridColumnUnsortedIcon.mjs +2 -2
- package/components/GridFooter.mjs +1 -1
- package/components/GridHeader.mjs +1 -1
- package/components/GridHeaders.mjs +1 -1
- package/components/GridLoadingOverlay.mjs +2 -2
- package/components/GridNoColumnsOverlay.mjs +1 -1
- package/components/GridNoResultsOverlay.mjs +1 -1
- package/components/GridNoRowsOverlay.mjs +1 -1
- package/components/GridPagination.js +9 -1
- package/components/GridPagination.mjs +10 -2
- package/components/GridRow.mjs +2 -2
- package/components/GridRowCount.mjs +2 -2
- package/components/GridRowDragAndDropOverlay.mjs +1 -1
- package/components/GridScrollArea.mjs +1 -1
- package/components/GridSelectedRowCount.mjs +2 -2
- package/components/GridShadowScrollArea.mjs +2 -2
- package/components/GridSkeletonLoadingOverlay.mjs +2 -2
- package/components/base/GridFooterPlaceholder.mjs +1 -1
- package/components/base/GridOverlays.mjs +1 -1
- package/components/cell/GridActionsCell.js +2 -2
- package/components/cell/GridActionsCell.mjs +5 -5
- package/components/cell/GridActionsCellItem.d.mts +20 -6
- package/components/cell/GridActionsCellItem.d.ts +20 -6
- package/components/cell/GridActionsCellItem.js +30 -7
- package/components/cell/GridActionsCellItem.mjs +32 -9
- package/components/cell/GridBooleanCell.mjs +2 -2
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridCell.mjs +3 -3
- package/components/cell/GridEditBooleanCell.mjs +2 -2
- package/components/cell/GridEditDateCell.mjs +2 -2
- package/components/cell/GridEditInputCell.mjs +2 -2
- package/components/cell/GridEditLongTextCell.mjs +1 -1
- package/components/cell/GridEditSingleSelectCell.mjs +2 -2
- package/components/cell/GridFooterCell.mjs +2 -2
- package/components/cell/GridLongTextCell.mjs +1 -1
- package/components/cell/GridSkeletonCell.mjs +2 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.mjs +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.mjs +2 -2
- package/components/columnHeaders/GridColumnGroupHeader.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.d.mts +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.mjs +2 -2
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +17 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.mjs +18 -1
- package/components/columnHeaders/GridColumnHeaderTitle.mjs +2 -2
- package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +2 -2
- package/components/columnHeaders/GridIconButtonContainer.mjs +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.mjs +2 -2
- package/components/columnSelection/GridHeaderCheckbox.mjs +2 -2
- package/components/columnSelection/GridRowCheckbox.js +1 -3
- package/components/columnSelection/GridRowCheckbox.mjs +3 -5
- package/components/columnsManagement/GridColumnsManagement.mjs +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.mjs +2 -2
- package/components/containers/GridFooterContainer.mjs +2 -2
- package/components/containers/GridOverlay.mjs +2 -2
- package/components/containers/GridRoot.mjs +2 -2
- package/components/containers/GridRootStyles.js +22 -10
- package/components/containers/GridRootStyles.mjs +22 -10
- package/components/containers/GridToolbarContainer.mjs +2 -2
- package/components/export/ExportCsv.mjs +2 -2
- package/components/export/ExportPrint.js +4 -1
- package/components/export/ExportPrint.mjs +6 -3
- package/components/filterPanel/FilterPanelTrigger.mjs +2 -2
- package/components/menu/GridMenu.mjs +2 -2
- package/components/menu/columnMenu/GridColumnHeaderMenu.mjs +1 -1
- package/components/menu/columnMenu/GridColumnMenu.mjs +2 -2
- package/components/menu/columnMenu/GridColumnMenuContainer.mjs +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.mjs +1 -1
- package/components/panel/GridColumnsPanel.mjs +1 -1
- package/components/panel/GridPanel.mjs +2 -2
- package/components/panel/GridPanelContent.mjs +2 -2
- package/components/panel/GridPanelContext.mjs +1 -1
- package/components/panel/GridPanelFooter.mjs +2 -2
- package/components/panel/GridPanelHeader.mjs +2 -2
- package/components/panel/GridPanelWrapper.mjs +2 -2
- package/components/panel/GridPreferencesPanel.mjs +1 -1
- package/components/panel/filterPanel/GridFilterForm.mjs +1 -1
- package/components/panel/filterPanel/GridFilterFormBase.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -12
- package/components/panel/filterPanel/GridFilterInputBoolean.mjs +3 -14
- package/components/panel/filterPanel/GridFilterInputDate.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -12
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +3 -14
- package/components/panel/filterPanel/GridFilterInputValue.mjs +2 -2
- package/components/panel/filterPanel/GridFilterPanel.mjs +1 -1
- package/components/panel/filterPanel/GridFilterPanelBase.mjs +2 -2
- package/components/panel/filterPanel/filterPanelUtils.mjs +1 -1
- package/components/quickFilter/QuickFilter.mjs +2 -2
- package/components/quickFilter/QuickFilterClear.js +17 -0
- package/components/quickFilter/QuickFilterClear.mjs +19 -2
- package/components/quickFilter/QuickFilterControl.mjs +2 -2
- package/components/quickFilter/QuickFilterTrigger.mjs +2 -2
- package/components/toolbar/GridToolbar.mjs +2 -2
- package/components/toolbar/GridToolbarColumnsButton.mjs +1 -1
- package/components/toolbar/GridToolbarDensitySelector.mjs +1 -1
- package/components/toolbar/GridToolbarExport.js +4 -1
- package/components/toolbar/GridToolbarExport.mjs +6 -3
- package/components/toolbar/GridToolbarExportContainer.mjs +1 -1
- package/components/toolbar/GridToolbarFilterButton.mjs +1 -1
- package/components/toolbar/GridToolbarQuickFilter.mjs +2 -2
- package/components/toolbarV8/GridToolbar.mjs +2 -2
- package/components/toolbarV8/Toolbar.mjs +2 -2
- package/components/toolbarV8/ToolbarButton.js +17 -0
- package/components/toolbarV8/ToolbarButton.mjs +19 -2
- package/components/virtualization/GridBottomContainer.mjs +1 -1
- package/components/virtualization/GridMainContainer.mjs +1 -1
- package/components/virtualization/GridTopContainer.mjs +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -2
- package/components/virtualization/GridVirtualScrollbar.mjs +2 -2
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/components/virtualization/GridVirtualScroller.mjs +3 -3
- package/components/virtualization/GridVirtualScrollerContent.mjs +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.mjs +1 -1
- package/constants/cssVariables.mjs +1 -1
- package/constants/defaultGridSlotsComponents.mjs +1 -1
- package/constants/signature.d.mts +1 -1
- package/constants/signature.d.ts +1 -1
- package/hooks/core/pipeProcessing/useGridPipeProcessing.mjs +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.mjs +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.mjs +2 -2
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +1 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -2
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -2
- package/hooks/core/useGridApiInitialization.js +1 -1
- package/hooks/core/useGridApiInitialization.mjs +1 -1
- package/hooks/core/useGridIsRtl.mjs +1 -1
- package/hooks/core/useGridProps.mjs +1 -1
- package/hooks/core/useGridStateInitialization.mjs +1 -1
- package/hooks/core/useGridVirtualizer.d.mts +2 -2
- package/hooks/core/useGridVirtualizer.d.ts +2 -2
- package/hooks/core/useGridVirtualizer.js +6 -6
- package/hooks/core/useGridVirtualizer.mjs +4 -4
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.mjs +2 -2
- package/hooks/features/columnGrouping/useGridColumnGrouping.mjs +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.mjs +1 -1
- package/hooks/features/columnMenu/getColumnMenuItemKeys.mjs +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.mjs +1 -1
- package/hooks/features/columnMenu/useGridColumnMenuSlots.mjs +2 -2
- package/hooks/features/columnResize/useGridColumnResize.mjs +1 -1
- package/hooks/features/columns/gridColumnsInterfaces.d.mts +1 -1
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.mjs +1 -1
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/columns/useGridColumns.mjs +2 -2
- package/hooks/features/dataSource/cache.js +1 -1
- package/hooks/features/dataSource/cache.mjs +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +13 -28
- package/hooks/features/dataSource/useGridDataSourceBase.mjs +16 -31
- package/hooks/features/dataSource/useGridDataSourcePolling.d.mts +29 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.d.ts +29 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.js +62 -0
- package/hooks/features/dataSource/useGridDataSourcePolling.mjs +54 -0
- package/hooks/features/dataSource/utils.d.mts +1 -1
- package/hooks/features/dataSource/utils.d.ts +1 -1
- package/hooks/features/dataSource/utils.mjs +1 -1
- package/hooks/features/density/useGridDensity.mjs +1 -1
- package/hooks/features/dimensions/useGridDimensions.d.mts +1 -1
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +3 -3
- package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
- package/hooks/features/editing/useGridCellEditing.js +1 -1
- package/hooks/features/editing/useGridCellEditing.mjs +5 -5
- package/hooks/features/editing/useGridEditing.mjs +1 -1
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/editing/useGridRowEditing.mjs +5 -5
- package/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/hooks/features/export/serializers/csvSerializer.mjs +5 -5
- package/hooks/features/export/useGridPrintExport.js +44 -20
- package/hooks/features/export/useGridPrintExport.mjs +45 -21
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/gridFilterUtils.mjs +5 -5
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/filter/useGridFilter.mjs +3 -3
- package/hooks/features/focus/useGridFocus.mjs +1 -1
- package/hooks/features/headerFiltering/useGridHeaderFiltering.mjs +1 -1
- package/hooks/features/listView/useGridListView.d.mts +2 -2
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +1 -1
- package/hooks/features/listView/useGridListView.mjs +2 -2
- package/hooks/features/pagination/useGridPagination.mjs +1 -1
- package/hooks/features/pagination/useGridPaginationMeta.mjs +1 -1
- package/hooks/features/pagination/useGridPaginationModel.mjs +1 -1
- package/hooks/features/pagination/useGridRowCount.js +2 -2
- package/hooks/features/pagination/useGridRowCount.mjs +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.mts +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelsValue.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.mjs +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.mjs +1 -1
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.js +2 -2
- package/hooks/features/rows/gridRowsUtils.mjs +3 -3
- package/hooks/features/rows/useGridRowSpanning.mjs +1 -1
- package/hooks/features/rows/useGridRows.mjs +1 -1
- package/hooks/features/rows/useGridRowsMeta.mjs +1 -1
- package/hooks/features/rows/useGridRowsOverridableMethods.mjs +1 -1
- package/hooks/features/rows/useGridRowsPreProcessors.mjs +1 -1
- package/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/hooks/features/sorting/gridSortingUtils.mjs +3 -3
- package/hooks/features/sorting/useGridSorting.js +2 -2
- package/hooks/features/sorting/useGridSorting.mjs +3 -3
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.mjs +1 -1
- package/hooks/features/virtualization/useGridVirtualization.mjs +1 -1
- package/hooks/utils/index.d.mts +1 -1
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -12
- package/hooks/utils/index.mjs +2 -1
- package/hooks/utils/useGridSelector.js +2 -2
- package/hooks/utils/useGridSelector.mjs +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/constants.d.mts +1 -1
- package/internals/constants.d.ts +1 -1
- package/internals/index.d.mts +1 -0
- package/internals/index.d.ts +1 -0
- package/internals/index.js +8 -0
- package/internals/index.mjs +1 -0
- package/internals/utils/cache.d.mts +0 -1
- package/internals/utils/cache.d.ts +0 -1
- package/internals/utils/cache.js +1 -3
- package/internals/utils/cache.mjs +1 -3
- package/internals/utils/computeSlots.mjs +1 -1
- package/internals/utils/propValidation.js +2 -2
- package/internals/utils/propValidation.mjs +3 -3
- package/material/index.mjs +2 -2
- package/models/api/gridCoreApi.d.mts +1 -1
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/api/gridEditingApi.d.mts +6 -6
- package/models/api/gridEditingApi.d.ts +6 -6
- package/models/api/gridPrintExportApi.d.mts +2 -1
- package/models/api/gridPrintExportApi.d.ts +2 -1
- package/models/events/gridEventLookup.d.mts +5 -5
- package/models/events/gridEventLookup.d.ts +5 -5
- package/models/gridBaseSlots.d.mts +18 -1
- package/models/gridBaseSlots.d.ts +18 -1
- package/models/gridEditRowModel.d.mts +3 -3
- package/models/gridEditRowModel.d.ts +3 -3
- package/models/gridExport.d.mts +13 -0
- package/models/gridExport.d.ts +13 -0
- package/models/gridFilterItem.d.mts +2 -2
- package/models/gridFilterItem.d.ts +2 -2
- package/models/index.d.mts +2 -1
- package/models/index.d.ts +2 -1
- package/models/params/gridEditCellParams.d.mts +2 -2
- package/models/params/gridEditCellParams.d.ts +2 -2
- package/models/params/gridRowParams.d.mts +2 -2
- package/models/params/gridRowParams.d.ts +2 -2
- package/models/props/DataGridProps.d.mts +8 -0
- package/models/props/DataGridProps.d.ts +8 -0
- package/package.json +5 -5
- package/utils/createSelector.d.mts +1 -1
- package/utils/createSelector.d.ts +1 -1
- package/utils/createSelector.js +1 -1
- package/utils/createSelector.mjs +1 -1
- package/hooks/utils/useFirstRender.d.mts +0 -1
- package/hooks/utils/useFirstRender.d.ts +0 -1
- package/hooks/utils/useFirstRender.js +0 -16
- package/hooks/utils/useFirstRender.mjs +0 -1
package/internals/index.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataS
|
|
|
102
102
|
export { CacheChunkManager } from "../hooks/features/dataSource/utils.js";
|
|
103
103
|
export { gridGetRowsParamsSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
|
|
104
104
|
export { useGridDataSourceFilterModelChange } from "../hooks/features/dataSource/useGridDataSourceFilterModelChange.js";
|
|
105
|
+
export { useGridDataSourcePolling } from "../hooks/features/dataSource/useGridDataSourcePolling.js";
|
|
105
106
|
export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.js";
|
|
106
107
|
export * from "../utils/createControllablePromise.js";
|
|
107
108
|
export * from "../utils/focusElement.js";
|
package/internals/index.js
CHANGED
|
@@ -121,6 +121,7 @@ var _exportNames = {
|
|
|
121
121
|
useGridDataSourceBase: true,
|
|
122
122
|
gridGetRowsParamsSelector: true,
|
|
123
123
|
useGridDataSourceFilterModelChange: true,
|
|
124
|
+
useGridDataSourcePolling: true,
|
|
124
125
|
getColumnsToExport: true,
|
|
125
126
|
defaultGetRowsToExport: true,
|
|
126
127
|
NotRendered: true,
|
|
@@ -765,6 +766,12 @@ Object.defineProperty(exports, "useGridDataSourceFilterModelChange", {
|
|
|
765
766
|
return _useGridDataSourceFilterModelChange.useGridDataSourceFilterModelChange;
|
|
766
767
|
}
|
|
767
768
|
});
|
|
769
|
+
Object.defineProperty(exports, "useGridDataSourcePolling", {
|
|
770
|
+
enumerable: true,
|
|
771
|
+
get: function () {
|
|
772
|
+
return _useGridDataSourcePolling.useGridDataSourcePolling;
|
|
773
|
+
}
|
|
774
|
+
});
|
|
768
775
|
Object.defineProperty(exports, "useGridDensity", {
|
|
769
776
|
enumerable: true,
|
|
770
777
|
get: function () {
|
|
@@ -1144,6 +1151,7 @@ var _utils2 = require("../hooks/features/dataSource/utils");
|
|
|
1144
1151
|
var _useGridDataSourceBase = require("../hooks/features/dataSource/useGridDataSourceBase");
|
|
1145
1152
|
var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
|
|
1146
1153
|
var _useGridDataSourceFilterModelChange = require("../hooks/features/dataSource/useGridDataSourceFilterModelChange");
|
|
1154
|
+
var _useGridDataSourcePolling = require("../hooks/features/dataSource/useGridDataSourcePolling");
|
|
1147
1155
|
var _utils3 = require("../hooks/features/export/utils");
|
|
1148
1156
|
var _createControllablePromise = require("../utils/createControllablePromise");
|
|
1149
1157
|
Object.keys(_createControllablePromise).forEach(function (key) {
|
package/internals/index.mjs
CHANGED
|
@@ -80,6 +80,7 @@ export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataS
|
|
|
80
80
|
export { CacheChunkManager } from "../hooks/features/dataSource/utils.mjs";
|
|
81
81
|
export { gridGetRowsParamsSelector } from "../hooks/features/dataSource/gridDataSourceSelector.mjs";
|
|
82
82
|
export { useGridDataSourceFilterModelChange } from "../hooks/features/dataSource/useGridDataSourceFilterModelChange.mjs";
|
|
83
|
+
export { useGridDataSourcePolling } from "../hooks/features/dataSource/useGridDataSourcePolling.mjs";
|
|
83
84
|
export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.mjs";
|
|
84
85
|
export * from "../utils/createControllablePromise.mjs";
|
|
85
86
|
export * from "../utils/focusElement.mjs";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.mjs";
|
|
2
2
|
export declare class TestCache {
|
|
3
3
|
private cache;
|
|
4
|
-
constructor();
|
|
5
4
|
set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
|
|
6
5
|
get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
|
|
7
6
|
size(): number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.js";
|
|
2
2
|
export declare class TestCache {
|
|
3
3
|
private cache;
|
|
4
|
-
constructor();
|
|
5
4
|
set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
|
|
6
5
|
get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
|
|
7
6
|
size(): number;
|
package/internals/utils/cache.js
CHANGED
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TestCache = void 0;
|
|
7
7
|
var _cache = require("../../hooks/features/dataSource/cache");
|
|
8
8
|
class TestCache {
|
|
9
|
-
|
|
10
|
-
this.cache = new Map();
|
|
11
|
-
}
|
|
9
|
+
cache = new Map();
|
|
12
10
|
set(key, value) {
|
|
13
11
|
this.cache.set((0, _cache.getKeyDefault)(key), value);
|
|
14
12
|
}
|
|
@@ -8,7 +8,7 @@ exports.validateProps = validateProps;
|
|
|
8
8
|
var _warning = require("@mui/x-internals/warning");
|
|
9
9
|
var _utils = require("../../utils/utils");
|
|
10
10
|
var _signature = require("../../constants/signature");
|
|
11
|
-
const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === _signature.GridSignature.DataGrid && props.paginationMode === 'client' && (0, _utils.isNumber)(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
11
|
+
const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.height != null && props.autoHeight && ['MUI X: `<DataGrid height={...} autoHeight={true} />` are not valid props.', 'You cannot use both the `height` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to its content.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === _signature.GridSignature.DataGrid && props.paginationMode === 'client' && (0, _utils.isNumber)(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
12
12
|
function validateProps(props, validators) {
|
|
13
13
|
if (process.env.NODE_ENV === 'production') {
|
|
14
14
|
return;
|
|
@@ -16,7 +16,7 @@ function validateProps(props, validators) {
|
|
|
16
16
|
validators.forEach(validator => {
|
|
17
17
|
const message = validator(props);
|
|
18
18
|
if (message) {
|
|
19
|
-
(0, _warning.
|
|
19
|
+
(0, _warning.errorOnce)(message);
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { errorOnce } from '@mui/x-internals/warning';
|
|
2
2
|
import { isNumber } from "../../utils/utils.mjs";
|
|
3
3
|
import { GridSignature } from "../../constants/signature.mjs";
|
|
4
|
-
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
4
|
+
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.height != null && props.autoHeight && ['MUI X: `<DataGrid height={...} autoHeight={true} />` are not valid props.', 'You cannot use both the `height` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to its content.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
|
|
5
5
|
export function validateProps(props, validators) {
|
|
6
6
|
if (process.env.NODE_ENV === 'production') {
|
|
7
7
|
return;
|
|
@@ -9,7 +9,7 @@ export function validateProps(props, validators) {
|
|
|
9
9
|
validators.forEach(validator => {
|
|
10
10
|
const message = validator(props);
|
|
11
11
|
if (message) {
|
|
12
|
-
|
|
12
|
+
errorOnce(message);
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
}
|
package/material/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
|
|
4
4
|
_excluded2 = ["onRowsPerPageChange", "material", "disabled"],
|
|
5
5
|
_excluded3 = ["material"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
|
|
3
|
-
import type { Store } from '@
|
|
3
|
+
import type { Store } from '@base-ui/utils/store';
|
|
4
4
|
import type { GridEventPublisher, GridEventListener, GridEvents } from "../events/index.mjs";
|
|
5
5
|
import type { GridApiCaches } from "../gridApiCaches.mjs";
|
|
6
6
|
import type { GridApiCommon, GridPrivateApiCommon } from "./gridApiCommon.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
|
|
3
|
-
import type { Store } from '@
|
|
3
|
+
import type { Store } from '@base-ui/utils/store';
|
|
4
4
|
import type { GridEventPublisher, GridEventListener, GridEvents } from "../events/index.js";
|
|
5
5
|
import type { GridApiCaches } from "../gridApiCaches.js";
|
|
6
6
|
import type { GridApiCommon, GridPrivateApiCommon } from "./gridApiCommon.js";
|
|
@@ -4,17 +4,17 @@ import type { GridCellModes, GridRowModes } from "../gridEditRowModel.mjs";
|
|
|
4
4
|
import type { GridRowId, GridRowModel } from "../gridRows.mjs";
|
|
5
5
|
import type { GridCellParams } from "../params/gridCellParams.mjs";
|
|
6
6
|
import type { GridEditCellValueParams } from "../params/gridEditCellParams.mjs";
|
|
7
|
-
export type GridCellModesModelProps =
|
|
7
|
+
export type GridCellModesModelProps = {
|
|
8
8
|
mode: GridCellModes.View;
|
|
9
|
-
} & Omit<GridStopCellEditModeParams, 'id' | 'field'>
|
|
9
|
+
} & Omit<GridStopCellEditModeParams, 'id' | 'field'> | {
|
|
10
10
|
mode: GridCellModes.Edit;
|
|
11
|
-
} & Omit<GridStartCellEditModeParams, 'id' | 'field'
|
|
11
|
+
} & Omit<GridStartCellEditModeParams, 'id' | 'field'>;
|
|
12
12
|
export type GridCellModesModel = Record<GridRowId, Record<string, GridCellModesModelProps>>;
|
|
13
|
-
export type GridRowModesModelProps =
|
|
13
|
+
export type GridRowModesModelProps = {
|
|
14
14
|
mode: GridRowModes.View;
|
|
15
|
-
} & Omit<GridStopRowEditModeParams, 'id' | 'field'>
|
|
15
|
+
} & Omit<GridStopRowEditModeParams, 'id' | 'field'> | {
|
|
16
16
|
mode: GridRowModes.Edit;
|
|
17
|
-
} & Omit<GridStartRowEditModeParams, 'id' | 'field'
|
|
17
|
+
} & Omit<GridStartRowEditModeParams, 'id' | 'field'>;
|
|
18
18
|
export type GridRowModesModel = Record<GridRowId, GridRowModesModelProps>;
|
|
19
19
|
export interface GridEditCellMeta {
|
|
20
20
|
changeReason?: 'debouncedSetEditCellValue' | 'setEditCellValue';
|
|
@@ -4,17 +4,17 @@ import type { GridCellModes, GridRowModes } from "../gridEditRowModel.js";
|
|
|
4
4
|
import type { GridRowId, GridRowModel } from "../gridRows.js";
|
|
5
5
|
import type { GridCellParams } from "../params/gridCellParams.js";
|
|
6
6
|
import type { GridEditCellValueParams } from "../params/gridEditCellParams.js";
|
|
7
|
-
export type GridCellModesModelProps =
|
|
7
|
+
export type GridCellModesModelProps = {
|
|
8
8
|
mode: GridCellModes.View;
|
|
9
|
-
} & Omit<GridStopCellEditModeParams, 'id' | 'field'>
|
|
9
|
+
} & Omit<GridStopCellEditModeParams, 'id' | 'field'> | {
|
|
10
10
|
mode: GridCellModes.Edit;
|
|
11
|
-
} & Omit<GridStartCellEditModeParams, 'id' | 'field'
|
|
11
|
+
} & Omit<GridStartCellEditModeParams, 'id' | 'field'>;
|
|
12
12
|
export type GridCellModesModel = Record<GridRowId, Record<string, GridCellModesModelProps>>;
|
|
13
|
-
export type GridRowModesModelProps =
|
|
13
|
+
export type GridRowModesModelProps = {
|
|
14
14
|
mode: GridRowModes.View;
|
|
15
|
-
} & Omit<GridStopRowEditModeParams, 'id' | 'field'>
|
|
15
|
+
} & Omit<GridStopRowEditModeParams, 'id' | 'field'> | {
|
|
16
16
|
mode: GridRowModes.Edit;
|
|
17
|
-
} & Omit<GridStartRowEditModeParams, 'id' | 'field'
|
|
17
|
+
} & Omit<GridStartRowEditModeParams, 'id' | 'field'>;
|
|
18
18
|
export type GridRowModesModel = Record<GridRowId, GridRowModesModelProps>;
|
|
19
19
|
export interface GridEditCellMeta {
|
|
20
20
|
changeReason?: 'debouncedSetEditCellValue' | 'setEditCellValue';
|
|
@@ -6,6 +6,7 @@ export interface GridPrintExportApi {
|
|
|
6
6
|
/**
|
|
7
7
|
* Print the grid's data.
|
|
8
8
|
* @param {GridPrintExportOptions} options The options to apply on the export.
|
|
9
|
+
* @returns {Promise<void>} A promise that resolves once the print dialog has been shown, which in most browsers means once it's closed, and rejects if the print fails, for example when `onStylesheetError` stops it.
|
|
9
10
|
*/
|
|
10
|
-
exportDataAsPrint: (options?: GridPrintExportOptions) => void
|
|
11
|
+
exportDataAsPrint: (options?: GridPrintExportOptions) => Promise<void>;
|
|
11
12
|
}
|
|
@@ -6,6 +6,7 @@ export interface GridPrintExportApi {
|
|
|
6
6
|
/**
|
|
7
7
|
* Print the grid's data.
|
|
8
8
|
* @param {GridPrintExportOptions} options The options to apply on the export.
|
|
9
|
+
* @returns {Promise<void>} A promise that resolves once the print dialog has been shown, which in most browsers means once it's closed, and rejects if the print fails, for example when `onStylesheetError` stops it.
|
|
9
10
|
*/
|
|
10
|
-
exportDataAsPrint: (options?: GridPrintExportOptions) => void
|
|
11
|
+
exportDataAsPrint: (options?: GridPrintExportOptions) => Promise<void>;
|
|
11
12
|
}
|
|
@@ -503,17 +503,17 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
|
|
|
503
503
|
};
|
|
504
504
|
/**
|
|
505
505
|
* Fired when the rows are updated.
|
|
506
|
-
*
|
|
506
|
+
* The filtering and sorting of the updated rows run after this event.
|
|
507
507
|
*/
|
|
508
508
|
rowsSet: {};
|
|
509
509
|
/**
|
|
510
|
-
* Fired when the filtered rows are updated
|
|
511
|
-
*
|
|
510
|
+
* Fired when the filtered rows are updated.
|
|
511
|
+
* The event fires after the state update and before the re-render.
|
|
512
512
|
*/
|
|
513
513
|
filteredRowsSet: {};
|
|
514
514
|
/**
|
|
515
|
-
* Fired when the sorted rows are updated
|
|
516
|
-
*
|
|
515
|
+
* Fired when the sorted rows are updated.
|
|
516
|
+
* The event fires after the state update and before the re-render.
|
|
517
517
|
*/
|
|
518
518
|
sortedRowsSet: {};
|
|
519
519
|
/**
|
|
@@ -503,17 +503,17 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
|
|
|
503
503
|
};
|
|
504
504
|
/**
|
|
505
505
|
* Fired when the rows are updated.
|
|
506
|
-
*
|
|
506
|
+
* The filtering and sorting of the updated rows run after this event.
|
|
507
507
|
*/
|
|
508
508
|
rowsSet: {};
|
|
509
509
|
/**
|
|
510
|
-
* Fired when the filtered rows are updated
|
|
511
|
-
*
|
|
510
|
+
* Fired when the filtered rows are updated.
|
|
511
|
+
* The event fires after the state update and before the re-render.
|
|
512
512
|
*/
|
|
513
513
|
filteredRowsSet: {};
|
|
514
514
|
/**
|
|
515
|
-
* Fired when the sorted rows are updated
|
|
516
|
-
*
|
|
515
|
+
* Fired when the sorted rows are updated.
|
|
516
|
+
* The event fires after the state update and before the re-render.
|
|
517
517
|
*/
|
|
518
518
|
sortedRowsSet: {};
|
|
519
519
|
/**
|
|
@@ -152,7 +152,7 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
|
|
|
152
152
|
label?: string;
|
|
153
153
|
color?: 'default' | 'inherit' | 'primary';
|
|
154
154
|
edge?: 'start' | 'end' | false;
|
|
155
|
-
};
|
|
155
|
+
} & LinkableComponentProps;
|
|
156
156
|
export type ToggleButtonProps = Omit<CommonProps, 'onChange'> & {
|
|
157
157
|
selected?: boolean;
|
|
158
158
|
value: string;
|
|
@@ -179,6 +179,23 @@ export type MenuItemProps = CommonProps & {
|
|
|
179
179
|
selected?: boolean;
|
|
180
180
|
value?: number | string | readonly string[];
|
|
181
181
|
style?: React.CSSProperties;
|
|
182
|
+
} & LinkableComponentProps;
|
|
183
|
+
/**
|
|
184
|
+
* Props shared by components that can render as a link, either by setting
|
|
185
|
+
* `href` directly, or by overriding `component` (for example with a router `Link`).
|
|
186
|
+
*/
|
|
187
|
+
type LinkableComponentProps = {
|
|
188
|
+
/** The component used for the root node. Either a string to use an HTML element or a component. */
|
|
189
|
+
component?: React.ElementType;
|
|
190
|
+
/** The URL to link to. If set, and `component` is not set, the component renders as an anchor tag. */
|
|
191
|
+
href?: string;
|
|
192
|
+
/** Where to display the linked URL, as the name for a browsing context. */
|
|
193
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
194
|
+
/**
|
|
195
|
+
* The relationship of the linked URL.
|
|
196
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
197
|
+
*/
|
|
198
|
+
rel?: string;
|
|
182
199
|
};
|
|
183
200
|
type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
184
201
|
type VariationPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
@@ -152,7 +152,7 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
|
|
|
152
152
|
label?: string;
|
|
153
153
|
color?: 'default' | 'inherit' | 'primary';
|
|
154
154
|
edge?: 'start' | 'end' | false;
|
|
155
|
-
};
|
|
155
|
+
} & LinkableComponentProps;
|
|
156
156
|
export type ToggleButtonProps = Omit<CommonProps, 'onChange'> & {
|
|
157
157
|
selected?: boolean;
|
|
158
158
|
value: string;
|
|
@@ -179,6 +179,23 @@ export type MenuItemProps = CommonProps & {
|
|
|
179
179
|
selected?: boolean;
|
|
180
180
|
value?: number | string | readonly string[];
|
|
181
181
|
style?: React.CSSProperties;
|
|
182
|
+
} & LinkableComponentProps;
|
|
183
|
+
/**
|
|
184
|
+
* Props shared by components that can render as a link, either by setting
|
|
185
|
+
* `href` directly, or by overriding `component` (for example with a router `Link`).
|
|
186
|
+
*/
|
|
187
|
+
type LinkableComponentProps = {
|
|
188
|
+
/** The component used for the root node. Either a string to use an HTML element or a component. */
|
|
189
|
+
component?: React.ElementType;
|
|
190
|
+
/** The URL to link to. If set, and `component` is not set, the component renders as an anchor tag. */
|
|
191
|
+
href?: string;
|
|
192
|
+
/** Where to display the linked URL, as the name for a browsing context. */
|
|
193
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
194
|
+
/**
|
|
195
|
+
* The relationship of the linked URL.
|
|
196
|
+
* Set it to `noopener noreferrer` when `target` is set to `_blank` to avoid a security issue.
|
|
197
|
+
*/
|
|
198
|
+
rel?: string;
|
|
182
199
|
};
|
|
183
200
|
type BasePlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
184
201
|
type VariationPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
@@ -15,14 +15,14 @@ export type GridEditingState = {
|
|
|
15
15
|
export type GridEditMode = 'cell' | 'row';
|
|
16
16
|
declare enum GridEditModes {
|
|
17
17
|
Cell = "cell",
|
|
18
|
-
Row = "row"
|
|
18
|
+
Row = "row"
|
|
19
19
|
}
|
|
20
20
|
declare enum GridCellModes {
|
|
21
21
|
Edit = "edit",
|
|
22
|
-
View = "view"
|
|
22
|
+
View = "view"
|
|
23
23
|
}
|
|
24
24
|
declare enum GridRowModes {
|
|
25
25
|
Edit = "edit",
|
|
26
|
-
View = "view"
|
|
26
|
+
View = "view"
|
|
27
27
|
}
|
|
28
28
|
export { GridEditModes, GridCellModes, GridRowModes };
|
|
@@ -15,14 +15,14 @@ export type GridEditingState = {
|
|
|
15
15
|
export type GridEditMode = 'cell' | 'row';
|
|
16
16
|
declare enum GridEditModes {
|
|
17
17
|
Cell = "cell",
|
|
18
|
-
Row = "row"
|
|
18
|
+
Row = "row"
|
|
19
19
|
}
|
|
20
20
|
declare enum GridCellModes {
|
|
21
21
|
Edit = "edit",
|
|
22
|
-
View = "view"
|
|
22
|
+
View = "view"
|
|
23
23
|
}
|
|
24
24
|
declare enum GridRowModes {
|
|
25
25
|
Edit = "edit",
|
|
26
|
-
View = "view"
|
|
26
|
+
View = "view"
|
|
27
27
|
}
|
|
28
28
|
export { GridEditModes, GridCellModes, GridRowModes };
|
package/models/gridExport.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
+
import type { StylesheetErrorReason } from '@mui/x-internals/export';
|
|
2
3
|
import type { GridRowId } from "./gridRows.mjs";
|
|
3
4
|
import type { GridApiCommon } from "./api/index.mjs";
|
|
4
5
|
import type { GridApiCommunity } from "./api/gridApiCommunity.mjs";
|
|
@@ -132,6 +133,18 @@ export interface GridPrintExportOptions extends GridExportOptions {
|
|
|
132
133
|
* @default true
|
|
133
134
|
*/
|
|
134
135
|
copyStyles?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Callback function that is called when a stylesheet, or a stylesheet it imports, fails to load in the print window,
|
|
138
|
+
* for example if a request fails or a Content Security Policy blocks it.
|
|
139
|
+
* Return or resolve to `false` to cancel the export without an error.
|
|
140
|
+
* Throw or reject to make the export fail with that error.
|
|
141
|
+
* Return anything else to continue the export, so the result may be missing some styles.
|
|
142
|
+
* If not provided, the export continues and the failure is logged as a warning in development.
|
|
143
|
+
* @param {HTMLLinkElement} element The stylesheet link element that failed to load, or whose import failed to load.
|
|
144
|
+
* @param {StylesheetErrorReason} reason `'content-security-policy'` if the Content Security Policy blocked the stylesheet, `'load-error'` if the request failed or a stylesheet it imports failed to load.
|
|
145
|
+
* @returns {Promise<boolean | void> | boolean | void} `false` to cancel the export. If a promise is returned, the export waits for it to settle before proceeding.
|
|
146
|
+
*/
|
|
147
|
+
onStylesheetError?: (element: HTMLLinkElement, reason: StylesheetErrorReason) => Promise<boolean | void> | boolean | void;
|
|
135
148
|
/**
|
|
136
149
|
* One or more classes passed to the print window.
|
|
137
150
|
*/
|
package/models/gridExport.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
+
import type { StylesheetErrorReason } from '@mui/x-internals/export';
|
|
2
3
|
import type { GridRowId } from "./gridRows.js";
|
|
3
4
|
import type { GridApiCommon } from "./api/index.js";
|
|
4
5
|
import type { GridApiCommunity } from "./api/gridApiCommunity.js";
|
|
@@ -132,6 +133,18 @@ export interface GridPrintExportOptions extends GridExportOptions {
|
|
|
132
133
|
* @default true
|
|
133
134
|
*/
|
|
134
135
|
copyStyles?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Callback function that is called when a stylesheet, or a stylesheet it imports, fails to load in the print window,
|
|
138
|
+
* for example if a request fails or a Content Security Policy blocks it.
|
|
139
|
+
* Return or resolve to `false` to cancel the export without an error.
|
|
140
|
+
* Throw or reject to make the export fail with that error.
|
|
141
|
+
* Return anything else to continue the export, so the result may be missing some styles.
|
|
142
|
+
* If not provided, the export continues and the failure is logged as a warning in development.
|
|
143
|
+
* @param {HTMLLinkElement} element The stylesheet link element that failed to load, or whose import failed to load.
|
|
144
|
+
* @param {StylesheetErrorReason} reason `'content-security-policy'` if the Content Security Policy blocked the stylesheet, `'load-error'` if the request failed or a stylesheet it imports failed to load.
|
|
145
|
+
* @returns {Promise<boolean | void> | boolean | void} `false` to cancel the export. If a promise is returned, the export waits for it to settle before proceeding.
|
|
146
|
+
*/
|
|
147
|
+
onStylesheetError?: (element: HTMLLinkElement, reason: StylesheetErrorReason) => Promise<boolean | void> | boolean | void;
|
|
135
148
|
/**
|
|
136
149
|
* One or more classes passed to the print window.
|
|
137
150
|
*/
|
|
@@ -23,10 +23,10 @@ export interface GridFilterItem {
|
|
|
23
23
|
* The name of the operator we want to apply.
|
|
24
24
|
* A custom operator is supported by providing any string value.
|
|
25
25
|
*/
|
|
26
|
-
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' |
|
|
26
|
+
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | string & {};
|
|
27
27
|
}
|
|
28
28
|
declare enum GridLogicOperator {
|
|
29
29
|
And = "and",
|
|
30
|
-
Or = "or"
|
|
30
|
+
Or = "or"
|
|
31
31
|
}
|
|
32
32
|
export { GridLogicOperator };
|
|
@@ -23,10 +23,10 @@ export interface GridFilterItem {
|
|
|
23
23
|
* The name of the operator we want to apply.
|
|
24
24
|
* A custom operator is supported by providing any string value.
|
|
25
25
|
*/
|
|
26
|
-
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' |
|
|
26
|
+
operator: 'contains' | 'doesNotContain' | 'equals' | 'doesNotEqual' | 'startsWith' | 'endsWith' | '=' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'not' | 'after' | 'onOrAfter' | 'before' | 'onOrBefore' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf' | string & {};
|
|
27
27
|
}
|
|
28
28
|
declare enum GridLogicOperator {
|
|
29
29
|
And = "and",
|
|
30
|
-
Or = "or"
|
|
30
|
+
Or = "or"
|
|
31
31
|
}
|
|
32
32
|
export { GridLogicOperator };
|
package/models/index.d.mts
CHANGED
|
@@ -28,4 +28,5 @@ export * from "./gridColumnGrouping.mjs";
|
|
|
28
28
|
export type { GridDataSourceCache, GridUpdateRowParams } from "./gridDataSource.mjs";
|
|
29
29
|
export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridPrintGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions } from "./gridExport.mjs";
|
|
30
30
|
export * from "./gridFilterOperator.mjs";
|
|
31
|
-
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
31
|
+
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
32
|
+
export type { StylesheetErrorReason } from '@mui/x-internals/export';
|
package/models/index.d.ts
CHANGED
|
@@ -28,4 +28,5 @@ export * from "./gridColumnGrouping.js";
|
|
|
28
28
|
export type { GridDataSourceCache, GridUpdateRowParams } from "./gridDataSource.js";
|
|
29
29
|
export type { GridExportOptions, GridFileExportOptions, GridGetRowsToExportParams, GridCsvGetRowsToExportParams, GridPrintGetRowsToExportParams, GridCsvExportOptions, GridPrintExportOptions } from "./gridExport.js";
|
|
30
30
|
export * from "./gridFilterOperator.js";
|
|
31
|
-
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
31
|
+
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
32
|
+
export type { StylesheetErrorReason } from '@mui/x-internals/export';
|
|
@@ -30,7 +30,7 @@ declare enum GridCellEditStartReasons {
|
|
|
30
30
|
cellDoubleClick = "cellDoubleClick",
|
|
31
31
|
printableKeyDown = "printableKeyDown",
|
|
32
32
|
deleteKeyDown = "deleteKeyDown",
|
|
33
|
-
pasteKeyDown = "pasteKeyDown"
|
|
33
|
+
pasteKeyDown = "pasteKeyDown"
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Params passed to the `cellEditStart` event.
|
|
@@ -51,7 +51,7 @@ declare enum GridCellEditStopReasons {
|
|
|
51
51
|
escapeKeyDown = "escapeKeyDown",
|
|
52
52
|
enterKeyDown = "enterKeyDown",
|
|
53
53
|
tabKeyDown = "tabKeyDown",
|
|
54
|
-
shiftTabKeyDown = "shiftTabKeyDown"
|
|
54
|
+
shiftTabKeyDown = "shiftTabKeyDown"
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Params passed to the `cellEditStop event.
|
|
@@ -30,7 +30,7 @@ declare enum GridCellEditStartReasons {
|
|
|
30
30
|
cellDoubleClick = "cellDoubleClick",
|
|
31
31
|
printableKeyDown = "printableKeyDown",
|
|
32
32
|
deleteKeyDown = "deleteKeyDown",
|
|
33
|
-
pasteKeyDown = "pasteKeyDown"
|
|
33
|
+
pasteKeyDown = "pasteKeyDown"
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Params passed to the `cellEditStart` event.
|
|
@@ -51,7 +51,7 @@ declare enum GridCellEditStopReasons {
|
|
|
51
51
|
escapeKeyDown = "escapeKeyDown",
|
|
52
52
|
enterKeyDown = "enterKeyDown",
|
|
53
53
|
tabKeyDown = "tabKeyDown",
|
|
54
|
-
shiftTabKeyDown = "shiftTabKeyDown"
|
|
54
|
+
shiftTabKeyDown = "shiftTabKeyDown"
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Params passed to the `cellEditStop event.
|
|
@@ -57,7 +57,7 @@ declare enum GridRowEditStartReasons {
|
|
|
57
57
|
enterKeyDown = "enterKeyDown",
|
|
58
58
|
cellDoubleClick = "cellDoubleClick",
|
|
59
59
|
printableKeyDown = "printableKeyDown",
|
|
60
|
-
deleteKeyDown = "deleteKeyDown"
|
|
60
|
+
deleteKeyDown = "deleteKeyDown"
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Params passed to the `rowEditStart` event.
|
|
@@ -81,7 +81,7 @@ declare enum GridRowEditStopReasons {
|
|
|
81
81
|
escapeKeyDown = "escapeKeyDown",
|
|
82
82
|
enterKeyDown = "enterKeyDown",
|
|
83
83
|
tabKeyDown = "tabKeyDown",
|
|
84
|
-
shiftTabKeyDown = "shiftTabKeyDown"
|
|
84
|
+
shiftTabKeyDown = "shiftTabKeyDown"
|
|
85
85
|
}
|
|
86
86
|
export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
|
|
87
87
|
/**
|
|
@@ -57,7 +57,7 @@ declare enum GridRowEditStartReasons {
|
|
|
57
57
|
enterKeyDown = "enterKeyDown",
|
|
58
58
|
cellDoubleClick = "cellDoubleClick",
|
|
59
59
|
printableKeyDown = "printableKeyDown",
|
|
60
|
-
deleteKeyDown = "deleteKeyDown"
|
|
60
|
+
deleteKeyDown = "deleteKeyDown"
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Params passed to the `rowEditStart` event.
|
|
@@ -81,7 +81,7 @@ declare enum GridRowEditStopReasons {
|
|
|
81
81
|
escapeKeyDown = "escapeKeyDown",
|
|
82
82
|
enterKeyDown = "enterKeyDown",
|
|
83
83
|
tabKeyDown = "tabKeyDown",
|
|
84
|
-
shiftTabKeyDown = "shiftTabKeyDown"
|
|
84
|
+
shiftTabKeyDown = "shiftTabKeyDown"
|
|
85
85
|
}
|
|
86
86
|
export interface GridRowEditStopParams<R extends GridValidRowModel = any> extends GridRowParams<R> {
|
|
87
87
|
/**
|
|
@@ -459,6 +459,14 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
459
459
|
* Override the height/width of the Data Grid inner scrollbar.
|
|
460
460
|
*/
|
|
461
461
|
scrollbarSize?: number;
|
|
462
|
+
/**
|
|
463
|
+
* The fixed height of the Data Grid.
|
|
464
|
+
* Accepts a number (pixels), a CSS length (for example `'50vh'`), a percentage, or a CSS calculation.
|
|
465
|
+
* Percentage values require a parent with an explicit height.
|
|
466
|
+
* Content-based values such as `'auto'`, `'min-content'`, `'max-content'`, and `'fit-content'` are not supported.
|
|
467
|
+
* For content-based sizing, use a flex parent container instead.
|
|
468
|
+
*/
|
|
469
|
+
height?: number | string;
|
|
462
470
|
/**
|
|
463
471
|
* Function that applies CSS classes dynamically on cells.
|
|
464
472
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
@@ -459,6 +459,14 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
459
459
|
* Override the height/width of the Data Grid inner scrollbar.
|
|
460
460
|
*/
|
|
461
461
|
scrollbarSize?: number;
|
|
462
|
+
/**
|
|
463
|
+
* The fixed height of the Data Grid.
|
|
464
|
+
* Accepts a number (pixels), a CSS length (for example `'50vh'`), a percentage, or a CSS calculation.
|
|
465
|
+
* Percentage values require a parent with an explicit height.
|
|
466
|
+
* Content-based values such as `'auto'`, `'min-content'`, `'max-content'`, and `'fit-content'` are not supported.
|
|
467
|
+
* For content-based sizing, use a flex parent container instead.
|
|
468
|
+
*/
|
|
469
|
+
height?: number | string;
|
|
462
470
|
/**
|
|
463
471
|
* Function that applies CSS classes dynamically on cells.
|
|
464
472
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|