@mui/x-data-grid 8.5.0 → 8.5.2
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 +204 -0
- package/components/columnsPanel/ColumnsPanelTrigger.d.ts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.js +2 -2
- package/components/containers/GridRootStyles.d.ts +1 -1
- package/components/containers/GridRootStyles.js +6 -0
- package/components/export/ExportCsv.d.ts +1 -1
- package/components/export/ExportCsv.js +2 -2
- package/components/export/ExportPrint.d.ts +1 -1
- package/components/export/ExportPrint.js +2 -2
- package/components/filterPanel/FilterPanelTrigger.d.ts +1 -1
- package/components/filterPanel/FilterPanelTrigger.js +2 -2
- package/components/quickFilter/QuickFilter.d.ts +1 -1
- package/components/quickFilter/QuickFilter.js +2 -2
- package/components/quickFilter/QuickFilterClear.d.ts +1 -1
- package/components/quickFilter/QuickFilterClear.js +2 -2
- package/components/quickFilter/QuickFilterControl.d.ts +1 -1
- package/components/quickFilter/QuickFilterControl.js +2 -2
- package/components/quickFilter/QuickFilterTrigger.d.ts +1 -1
- package/components/quickFilter/QuickFilterTrigger.js +2 -2
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/toolbarV8/Toolbar.js +2 -2
- package/components/toolbarV8/ToolbarButton.d.ts +1 -1
- package/components/toolbarV8/ToolbarButton.js +2 -2
- package/esm/components/columnsPanel/ColumnsPanelTrigger.d.ts +1 -1
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +2 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -1
- package/esm/components/containers/GridRootStyles.js +6 -0
- package/esm/components/export/ExportCsv.d.ts +1 -1
- package/esm/components/export/ExportCsv.js +2 -2
- package/esm/components/export/ExportPrint.d.ts +1 -1
- package/esm/components/export/ExportPrint.js +2 -2
- package/esm/components/filterPanel/FilterPanelTrigger.d.ts +1 -1
- package/esm/components/filterPanel/FilterPanelTrigger.js +2 -2
- package/esm/components/quickFilter/QuickFilter.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilter.js +2 -2
- package/esm/components/quickFilter/QuickFilterClear.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +2 -2
- package/esm/components/quickFilter/QuickFilterControl.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterControl.js +2 -2
- package/esm/components/quickFilter/QuickFilterTrigger.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterTrigger.js +2 -2
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/toolbarV8/Toolbar.js +2 -2
- package/esm/components/toolbarV8/ToolbarButton.d.ts +1 -1
- package/esm/components/toolbarV8/ToolbarButton.js +2 -2
- package/esm/hooks/core/pipeProcessing/useGridPipeProcessing.js +3 -3
- package/esm/hooks/core/useGridApiInitialization.js +1 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +13 -5
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +41 -15
- package/esm/hooks/features/columns/gridColumnsUtils.js +3 -1
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +4 -0
- package/esm/hooks/features/density/densitySelector.d.ts +3 -1
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +36 -12
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +8 -4
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +51 -17
- package/esm/hooks/features/filter/gridFilterState.d.ts +2 -1
- package/esm/hooks/features/filter/gridFilterState.js +2 -1
- package/esm/hooks/features/filter/useGridFilter.js +1 -1
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +24 -8
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +9 -3
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +35 -19
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +9 -4
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +3 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +9 -3
- package/esm/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +9 -5
- package/esm/hooks/features/rowSelection/utils.d.ts +5 -3
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +9 -3
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +50 -29
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +15 -5
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +4 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +15 -5
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.js +3 -1
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/useGridSelector.d.ts +2 -4
- package/esm/hooks/utils/useGridSelector.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +0 -1
- package/esm/internals/index.js +0 -1
- package/esm/locales/arSD.js +5 -6
- package/esm/locales/ptPT.js +4 -4
- package/esm/material/variables.js +1 -2
- package/esm/models/api/gridCoreApi.d.ts +1 -1
- package/esm/models/gridCellClass.d.ts +2 -0
- package/esm/models/gridColumnGrouping.d.ts +2 -0
- package/esm/models/gridColumnGrouping.js +2 -0
- package/esm/models/gridColumnHeaderClass.d.ts +2 -0
- package/esm/models/gridRows.d.ts +2 -0
- package/esm/models/gridSortModel.d.ts +5 -0
- package/esm/models/params/gridRowParams.d.ts +1 -1
- package/esm/models/params/gridRowParams.js +1 -1
- package/esm/utils/createSelector.d.ts +3 -11
- package/esm/utils/createSelector.js +16 -86
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +3 -3
- package/hooks/core/useGridApiInitialization.js +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +13 -5
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnResize/columnResizeSelector.d.ts +3 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +41 -15
- package/hooks/features/columns/gridColumnsUtils.js +3 -1
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -2
- package/hooks/features/dataSource/useGridDataSourceBase.js +4 -0
- package/hooks/features/density/densitySelector.d.ts +3 -1
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +36 -12
- package/hooks/features/editing/gridEditingSelectors.d.ts +8 -4
- package/hooks/features/filter/gridFilterSelector.d.ts +51 -17
- package/hooks/features/filter/gridFilterState.d.ts +2 -1
- package/hooks/features/filter/gridFilterState.js +2 -1
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/focus/gridFocusStateSelector.d.ts +24 -8
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +9 -3
- package/hooks/features/pagination/gridPaginationSelector.d.ts +35 -19
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +9 -4
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +3 -1
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +9 -3
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +9 -5
- package/hooks/features/rowSelection/utils.d.ts +5 -3
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +9 -3
- package/hooks/features/rows/gridRowsSelector.d.ts +50 -29
- package/hooks/features/sorting/gridSortingSelector.d.ts +15 -5
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +4 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +15 -5
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +3 -1
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/useGridSelector.d.ts +2 -4
- package/hooks/utils/useGridSelector.js +4 -4
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -8
- package/locales/arSD.js +5 -6
- package/locales/ptPT.js +4 -4
- package/material/variables.js +1 -2
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/gridCellClass.d.ts +2 -0
- package/models/gridColumnGrouping.d.ts +2 -0
- package/models/gridColumnGrouping.js +2 -0
- package/models/gridColumnHeaderClass.d.ts +2 -0
- package/models/gridRows.d.ts +2 -0
- package/models/gridSortModel.d.ts +5 -0
- package/models/params/gridRowParams.d.ts +1 -1
- package/models/params/gridRowParams.js +1 -1
- package/package.json +4 -5
- package/utils/createSelector.d.ts +3 -11
- package/utils/createSelector.js +18 -88
- package/esm/hooks/utils/useGridComponentRenderer.d.ts +0 -12
- package/esm/hooks/utils/useGridComponentRenderer.js +0 -36
- package/esm/utils/Store.d.ts +0 -11
- package/esm/utils/Store.js +0 -24
- package/esm/utils/weakMapMemoize.d.ts +0 -20
- package/esm/utils/weakMapMemoize.js +0 -128
- package/hooks/utils/useGridComponentRenderer.d.ts +0 -12
- package/hooks/utils/useGridComponentRenderer.js +0 -44
- package/utils/Store.d.ts +0 -11
- package/utils/Store.js +0 -31
- package/utils/weakMapMemoize.d.ts +0 -20
- package/utils/weakMapMemoize.js +0 -134
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
export declare const gridPreferencePanelStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridPreferencePanelState>;
|
|
3
|
-
export declare const gridPreferencePanelSelectorWithLabel: import("
|
|
3
|
+
export declare const gridPreferencePanelSelectorWithLabel: (args_0: import("react").RefObject<{
|
|
4
|
+
state: GridStateCommunity;
|
|
5
|
+
} | null>, labelId: string | undefined) => boolean;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
import { GridRowId } from "../../../models/gridRows.js";
|
|
3
3
|
export declare const gridRowSelectionStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridRowSelectionModel>;
|
|
4
|
-
export declare const gridRowSelectionManagerSelector:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare const gridRowSelectionManagerSelector: (args_0: import("react").RefObject<{
|
|
5
|
+
state: GridStateCommunity;
|
|
6
|
+
} | null>) => import("../../../models/gridRowSelectionManager.js").RowSelectionManager;
|
|
7
|
+
export declare const gridRowSelectionCountSelector: (args_0: import("react").RefObject<{
|
|
8
|
+
state: GridStateCommunity;
|
|
9
|
+
} | null>) => number;
|
|
10
|
+
export declare const gridRowSelectionIdsSelector: (args_0: import("react").RefObject<{
|
|
11
|
+
state: GridStateCommunity;
|
|
12
|
+
} | null>) => Map<GridRowId, import("@mui/x-data-grid").GridValidRowModel>;
|
|
@@ -36,18 +36,22 @@ const useGridRowSelectionPreProcessors = (apiRef, props) => {
|
|
|
36
36
|
headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')
|
|
37
37
|
});
|
|
38
38
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
39
|
-
const
|
|
40
|
-
if (shouldHaveSelectionColumn && !
|
|
39
|
+
const hasSelectionColumn = columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
40
|
+
if (shouldHaveSelectionColumn && !hasSelectionColumn) {
|
|
41
41
|
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
42
42
|
columnsState.orderedFields = [_colDef.GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];
|
|
43
|
-
} else if (!shouldHaveSelectionColumn &&
|
|
43
|
+
} else if (!shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
44
44
|
delete columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD];
|
|
45
45
|
columnsState.orderedFields = columnsState.orderedFields.filter(field => field !== _colDef.GRID_CHECKBOX_SELECTION_FIELD);
|
|
46
|
-
} else if (shouldHaveSelectionColumn &&
|
|
46
|
+
} else if (shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
47
47
|
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = (0, _extends2.default)({}, selectionColumn, columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD]);
|
|
48
|
+
// If the column is not in the columns array (not a custom selection column), move it to the beginning of the column order
|
|
49
|
+
if (!props.columns.some(col => col.field === _colDef.GRID_CHECKBOX_SELECTION_FIELD)) {
|
|
50
|
+
columnsState.orderedFields = [_colDef.GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields.filter(field => field !== _colDef.GRID_CHECKBOX_SELECTION_FIELD)];
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
53
|
return columnsState;
|
|
50
|
-
}, [apiRef, classes, props.checkboxSelection]);
|
|
54
|
+
}, [apiRef, classes, props.columns, props.checkboxSelection]);
|
|
51
55
|
(0, _pipeProcessing.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', updateSelectionColumn);
|
|
52
56
|
};
|
|
53
57
|
exports.useGridRowSelectionPreProcessors = useGridRowSelectionPreProcessors;
|
|
@@ -5,13 +5,15 @@ import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommuni
|
|
|
5
5
|
import { type GridRowSelectionPropagation } from "../../../models/gridRowSelectionModel.js";
|
|
6
6
|
import { type RowSelectionManager } from "../../../models/gridRowSelectionManager.js";
|
|
7
7
|
export declare const ROW_SELECTION_PROPAGATION_DEFAULT: GridRowSelectionPropagation;
|
|
8
|
-
export declare const checkboxPropsSelector: import("
|
|
8
|
+
export declare const checkboxPropsSelector: (args_0: import("react").RefObject<{
|
|
9
|
+
state: import("../../../models/gridStateCommunity.js").GridStateCommunity;
|
|
10
|
+
} | null>, args_1: {
|
|
9
11
|
groupId: GridRowId;
|
|
10
12
|
autoSelectParents: boolean;
|
|
11
|
-
}
|
|
13
|
+
}) => {
|
|
12
14
|
isIndeterminate: boolean;
|
|
13
15
|
isChecked: boolean;
|
|
14
|
-
}
|
|
16
|
+
};
|
|
15
17
|
export declare function isMultipleRowSelectionEnabled(props: Pick<DataGridProcessedProps, 'signature' | 'disableMultipleRowSelection' | 'checkboxSelection'>): boolean;
|
|
16
18
|
export declare const findRowsToSelect: (apiRef: RefObject<GridPrivateApiCommunity>, tree: GridRowTreeConfig, selectedRow: GridRowId, autoSelectDescendants: boolean, autoSelectParents: boolean, addRow: (rowId: GridRowId) => void, rowSelectionManager?: RowSelectionManager) => void;
|
|
17
19
|
export declare const findRowsToDeselect: (apiRef: RefObject<GridPrivateApiCommunity>, tree: GridRowTreeConfig, deselectedRow: GridRowId, autoSelectDescendants: boolean, autoSelectParents: boolean, removeRow: (rowId: GridRowId) => void) => void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridRowSpanningHiddenCellsSelector:
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare const gridRowSpanningHiddenCellsSelector: (args_0: import("react").RefObject<{
|
|
3
|
+
state: GridStateCommunity;
|
|
4
|
+
} | null>) => Record<import("@mui/x-data-grid").GridRowId, Record<string, boolean>>;
|
|
5
|
+
export declare const gridRowSpanningSpannedCellsSelector: (args_0: import("react").RefObject<{
|
|
6
|
+
state: GridStateCommunity;
|
|
7
|
+
} | null>) => Record<import("@mui/x-data-grid").GridRowId, Record<string, number>>;
|
|
8
|
+
export declare const gridRowSpanningHiddenCellsOriginMapSelector: (args_0: import("react").RefObject<{
|
|
9
|
+
state: GridStateCommunity;
|
|
10
|
+
} | null>) => Record<number, Record<string, number>>;
|
|
@@ -1,31 +1,59 @@
|
|
|
1
1
|
import { GridRowId } from "../../../models/gridRows.js";
|
|
2
2
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
3
3
|
export declare const gridRowsStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridRowsState>;
|
|
4
|
-
export declare const gridRowCountSelector:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
4
|
+
export declare const gridRowCountSelector: (args_0: import("react").RefObject<{
|
|
5
|
+
state: GridStateCommunity;
|
|
6
|
+
} | null>) => number;
|
|
7
|
+
export declare const gridRowsLoadingSelector: (args_0: import("react").RefObject<{
|
|
8
|
+
state: GridStateCommunity;
|
|
9
|
+
} | null>) => boolean | undefined;
|
|
10
|
+
export declare const gridTopLevelRowCountSelector: (args_0: import("react").RefObject<{
|
|
11
|
+
state: GridStateCommunity;
|
|
12
|
+
} | null>) => number;
|
|
13
|
+
export declare const gridRowsLookupSelector: (args_0: import("react").RefObject<{
|
|
14
|
+
state: GridStateCommunity;
|
|
15
|
+
} | null>) => import("@mui/x-data-grid").GridRowIdToModelLookup<import("@mui/x-data-grid").GridValidRowModel>;
|
|
16
|
+
export declare const gridRowSelector: (args_0: import("react").RefObject<{
|
|
17
|
+
state: GridStateCommunity;
|
|
18
|
+
} | null>, id: GridRowId) => import("@mui/x-data-grid").GridValidRowModel;
|
|
19
|
+
export declare const gridRowTreeSelector: (args_0: import("react").RefObject<{
|
|
20
|
+
state: GridStateCommunity;
|
|
21
|
+
} | null>) => import("@mui/x-data-grid").GridRowTreeConfig;
|
|
22
|
+
export declare const gridRowNodeSelector: (args_0: import("react").RefObject<{
|
|
23
|
+
state: GridStateCommunity;
|
|
24
|
+
} | null>, rowId: GridRowId) => import("@mui/x-data-grid").GridTreeNode;
|
|
25
|
+
export declare const gridRowGroupsToFetchSelector: (args_0: import("react").RefObject<{
|
|
26
|
+
state: GridStateCommunity;
|
|
27
|
+
} | null>) => GridRowId[] | undefined;
|
|
28
|
+
export declare const gridRowGroupingNameSelector: (args_0: import("react").RefObject<{
|
|
29
|
+
state: GridStateCommunity;
|
|
30
|
+
} | null>) => string;
|
|
31
|
+
export declare const gridRowTreeDepthsSelector: (args_0: import("react").RefObject<{
|
|
32
|
+
state: GridStateCommunity;
|
|
33
|
+
} | null>) => import("./gridRowsInterfaces.js").GridTreeDepths;
|
|
34
|
+
export declare const gridRowMaximumTreeDepthSelector: (args_0: import("react").RefObject<{
|
|
35
|
+
state: GridStateCommunity;
|
|
36
|
+
} | null>) => number;
|
|
37
|
+
export declare const gridDataRowIdsSelector: (args_0: import("react").RefObject<{
|
|
38
|
+
state: GridStateCommunity;
|
|
39
|
+
} | null>) => GridRowId[];
|
|
40
|
+
export declare const gridDataRowsSelector: (args_0: import("react").RefObject<{
|
|
41
|
+
state: GridStateCommunity;
|
|
42
|
+
} | null>) => import("@mui/x-data-grid").GridValidRowModel[];
|
|
17
43
|
/**
|
|
18
44
|
* @ignore - do not document.
|
|
19
45
|
*/
|
|
20
|
-
export declare const gridAdditionalRowGroupsSelector:
|
|
46
|
+
export declare const gridAdditionalRowGroupsSelector: (args_0: import("react").RefObject<{
|
|
47
|
+
state: GridStateCommunity;
|
|
48
|
+
} | null>) => {
|
|
21
49
|
pinnedRows?: import("./gridRowsInterfaces.js").GridPinnedRowsState;
|
|
22
|
-
} | undefined
|
|
50
|
+
} | undefined;
|
|
23
51
|
/**
|
|
24
52
|
* @ignore - do not document.
|
|
25
53
|
*/
|
|
26
|
-
export declare const gridPinnedRowsSelector: import("
|
|
27
|
-
|
|
28
|
-
} |
|
|
54
|
+
export declare const gridPinnedRowsSelector: (args_0: import("react").RefObject<{
|
|
55
|
+
state: GridStateCommunity;
|
|
56
|
+
} | null>) => {
|
|
29
57
|
bottom: {
|
|
30
58
|
id: GridRowId;
|
|
31
59
|
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
@@ -34,17 +62,10 @@ export declare const gridPinnedRowsSelector: import("@mui/x-data-grid").OutputSe
|
|
|
34
62
|
id: GridRowId;
|
|
35
63
|
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
36
64
|
}[];
|
|
37
|
-
}
|
|
65
|
+
};
|
|
38
66
|
/**
|
|
39
67
|
* @ignore - do not document.
|
|
40
68
|
*/
|
|
41
|
-
export declare const gridPinnedRowsCountSelector: import("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
45
|
-
}[];
|
|
46
|
-
top: {
|
|
47
|
-
id: GridRowId;
|
|
48
|
-
model: import("@mui/x-data-grid").GridValidRowModel;
|
|
49
|
-
}[];
|
|
50
|
-
}, number>;
|
|
69
|
+
export declare const gridPinnedRowsCountSelector: (args_0: import("react").RefObject<{
|
|
70
|
+
state: GridStateCommunity;
|
|
71
|
+
} | null>) => number;
|
|
@@ -5,17 +5,23 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
5
5
|
* Get the id of the rows after the sorting process.
|
|
6
6
|
* @category Sorting
|
|
7
7
|
*/
|
|
8
|
-
export declare const gridSortedRowIdsSelector:
|
|
8
|
+
export declare const gridSortedRowIdsSelector: (args_0: import("react").RefObject<{
|
|
9
|
+
state: GridStateCommunity;
|
|
10
|
+
} | null>) => GridRowId[];
|
|
9
11
|
/**
|
|
10
12
|
* Get the id and the model of the rows after the sorting process.
|
|
11
13
|
* @category Sorting
|
|
12
14
|
*/
|
|
13
|
-
export declare const gridSortedRowEntriesSelector:
|
|
15
|
+
export declare const gridSortedRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
16
|
+
state: GridStateCommunity;
|
|
17
|
+
} | null>) => GridRowEntry<GridValidRowModel>[];
|
|
14
18
|
/**
|
|
15
19
|
* Get the current sorting model.
|
|
16
20
|
* @category Sorting
|
|
17
21
|
*/
|
|
18
|
-
export declare const gridSortModelSelector:
|
|
22
|
+
export declare const gridSortModelSelector: (args_0: import("react").RefObject<{
|
|
23
|
+
state: GridStateCommunity;
|
|
24
|
+
} | null>) => GridSortModel;
|
|
19
25
|
export type GridSortColumnLookup = Record<string, {
|
|
20
26
|
sortDirection: GridSortDirection;
|
|
21
27
|
sortIndex?: number;
|
|
@@ -24,9 +30,13 @@ export type GridSortColumnLookup = Record<string, {
|
|
|
24
30
|
* @category Sorting
|
|
25
31
|
* @ignore - do not document.
|
|
26
32
|
*/
|
|
27
|
-
export declare const gridSortColumnLookupSelector: import("
|
|
33
|
+
export declare const gridSortColumnLookupSelector: (args_0: import("react").RefObject<{
|
|
34
|
+
state: GridStateCommunity;
|
|
35
|
+
} | null>) => GridSortColumnLookup;
|
|
28
36
|
/**
|
|
29
37
|
* @category Sorting
|
|
30
38
|
* @ignore - do not document.
|
|
31
39
|
*/
|
|
32
|
-
export declare const gridSortedRowIndexLookupSelector: import("
|
|
40
|
+
export declare const gridSortedRowIndexLookupSelector: (args_0: import("react").RefObject<{
|
|
41
|
+
state: GridStateCommunity;
|
|
42
|
+
} | null>) => Record<GridRowId, number>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export declare const gridFocusedVirtualCellSelector:
|
|
1
|
+
export declare const gridFocusedVirtualCellSelector: (args_0: import("react").RefObject<{
|
|
2
|
+
state: import("../../../models/gridStateCommunity.js").GridStateCommunity;
|
|
3
|
+
} | null>) => {
|
|
2
4
|
rowIndex: number;
|
|
3
5
|
columnIndex: number;
|
|
4
6
|
id?: import("@mui/x-data-grid").GridRowId | undefined;
|
|
5
7
|
field?: string | undefined;
|
|
6
|
-
} | null
|
|
8
|
+
} | null;
|
|
@@ -10,27 +10,37 @@ export declare const gridVirtualizationSelector: import("@mui/x-data-grid").Outp
|
|
|
10
10
|
* @category Virtualization
|
|
11
11
|
* @deprecated Use `gridVirtualizationColumnEnabledSelector` and `gridVirtualizationRowEnabledSelector`
|
|
12
12
|
*/
|
|
13
|
-
export declare const gridVirtualizationEnabledSelector:
|
|
13
|
+
export declare const gridVirtualizationEnabledSelector: (args_0: import("react").RefObject<{
|
|
14
|
+
state: GridStateCommunity;
|
|
15
|
+
} | null>) => boolean;
|
|
14
16
|
/**
|
|
15
17
|
* Get the enabled state for column virtualization
|
|
16
18
|
* @category Virtualization
|
|
17
19
|
*/
|
|
18
|
-
export declare const gridVirtualizationColumnEnabledSelector:
|
|
20
|
+
export declare const gridVirtualizationColumnEnabledSelector: (args_0: import("react").RefObject<{
|
|
21
|
+
state: GridStateCommunity;
|
|
22
|
+
} | null>) => boolean;
|
|
19
23
|
/**
|
|
20
24
|
* Get the enabled state for row virtualization
|
|
21
25
|
* @category Virtualization
|
|
22
26
|
*/
|
|
23
|
-
export declare const gridVirtualizationRowEnabledSelector:
|
|
27
|
+
export declare const gridVirtualizationRowEnabledSelector: (args_0: import("react").RefObject<{
|
|
28
|
+
state: GridStateCommunity;
|
|
29
|
+
} | null>) => boolean;
|
|
24
30
|
/**
|
|
25
31
|
* Get the render context
|
|
26
32
|
* @category Virtualization
|
|
27
33
|
* @ignore - do not document.
|
|
28
34
|
*/
|
|
29
|
-
export declare const gridRenderContextSelector:
|
|
35
|
+
export declare const gridRenderContextSelector: (args_0: import("react").RefObject<{
|
|
36
|
+
state: GridStateCommunity;
|
|
37
|
+
} | null>) => import("@mui/x-data-grid").GridRenderContext;
|
|
30
38
|
/**
|
|
31
39
|
* Get the render context, with only columns filled in.
|
|
32
40
|
* This is cached, so it can be used to only re-render when the column interval changes.
|
|
33
41
|
* @category Virtualization
|
|
34
42
|
* @ignore - do not document.
|
|
35
43
|
*/
|
|
36
|
-
export declare const gridRenderContextColumnsSelector: import("
|
|
44
|
+
export declare const gridRenderContextColumnsSelector: (args_0: import("react").RefObject<{
|
|
45
|
+
state: GridStateCommunity;
|
|
46
|
+
} | null>) => GridColumnsRenderContext;
|
|
@@ -36,6 +36,8 @@ const gridVirtualizationRowEnabledSelector = exports.gridVirtualizationRowEnable
|
|
|
36
36
|
* @ignore - do not document.
|
|
37
37
|
*/
|
|
38
38
|
const gridRenderContextSelector = exports.gridRenderContextSelector = (0, _createSelector.createSelector)(gridVirtualizationSelector, state => state.renderContext);
|
|
39
|
+
const firstColumnIndexSelector = (0, _createSelector.createRootSelector)(state => state.virtualization.renderContext.firstColumnIndex);
|
|
40
|
+
const lastColumnIndexSelector = (0, _createSelector.createRootSelector)(state => state.virtualization.renderContext.lastColumnIndex);
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* Get the render context, with only columns filled in.
|
|
@@ -43,7 +45,7 @@ const gridRenderContextSelector = exports.gridRenderContextSelector = (0, _creat
|
|
|
43
45
|
* @category Virtualization
|
|
44
46
|
* @ignore - do not document.
|
|
45
47
|
*/
|
|
46
|
-
const gridRenderContextColumnsSelector = exports.gridRenderContextColumnsSelector = (0, _createSelector.createSelectorMemoized)(
|
|
48
|
+
const gridRenderContextColumnsSelector = exports.gridRenderContextColumnsSelector = (0, _createSelector.createSelectorMemoized)(firstColumnIndexSelector, lastColumnIndexSelector, (firstColumnIndex, lastColumnIndex) => ({
|
|
47
49
|
firstColumnIndex,
|
|
48
50
|
lastColumnIndex
|
|
49
51
|
}));
|
package/hooks/utils/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export * from "./useGridNativeEventListener.js";
|
|
|
6
6
|
export * from "./useFirstRender.js";
|
|
7
7
|
export * from "./useOnMount.js";
|
|
8
8
|
export * from "./useRunOnce.js";
|
|
9
|
-
export type { RenderProp } from
|
|
9
|
+
export type { RenderProp } from '@mui/x-internals/useComponentRenderer';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import type { GridApiCommon } from "../../models/api/gridApiCommon.js";
|
|
3
|
-
import type { OutputSelector } from "../../utils/createSelector.js";
|
|
4
|
-
type Selector<Api extends GridApiCommon, Args, T> = ((apiRef: RefObject<Api>) => T) | ((apiRef: RefObject<Api | null>) => T) | OutputSelector<Api['state'], Args, T>;
|
|
5
3
|
export declare const objectShallowCompare: (a: unknown, b: unknown) => boolean;
|
|
6
4
|
export declare const argsEqual: (prev: any, curr: any) => boolean;
|
|
7
|
-
export declare
|
|
8
|
-
export
|
|
5
|
+
export declare function useGridSelector<Api extends GridApiCommon, T>(apiRef: RefObject<Api>, selector: (apiRef: RefObject<Api>) => T, args?: undefined, equals?: <U = T>(a: U, b: U) => boolean): T;
|
|
6
|
+
export declare function useGridSelector<Api extends GridApiCommon, T, Args>(apiRef: RefObject<Api>, selector: (apiRef: RefObject<Api>, a1: Args) => T, args: Args, equals?: <U = T>(a: U, b: U) => boolean): T;
|
|
@@ -4,7 +4,8 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.objectShallowCompare = exports.argsEqual = void 0;
|
|
8
|
+
exports.useGridSelector = useGridSelector;
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
10
11
|
var _warning = require("@mui/x-internals/warning");
|
|
@@ -36,7 +37,7 @@ const createRefs = () => ({
|
|
|
36
37
|
});
|
|
37
38
|
const EMPTY = [];
|
|
38
39
|
const emptyGetSnapshot = () => null;
|
|
39
|
-
|
|
40
|
+
function useGridSelector(apiRef, selector, args = undefined, equals = defaultCompare) {
|
|
40
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
42
|
if (!apiRef.current.state) {
|
|
42
43
|
(0, _warning.warnOnce)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
@@ -85,5 +86,4 @@ const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCom
|
|
|
85
86
|
}, EMPTY);
|
|
86
87
|
(0, _shim.useSyncExternalStore)(unsubscribe, subscribe, emptyGetSnapshot);
|
|
87
88
|
return state;
|
|
88
|
-
}
|
|
89
|
-
exports.useGridSelector = useGridSelector;
|
|
89
|
+
}
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -77,7 +77,6 @@ export * from "../hooks/features/virtualization/index.js";
|
|
|
77
77
|
export { useGridColumnResize, columnResizeStateInitializer } from "../hooks/features/columnResize/useGridColumnResize.js";
|
|
78
78
|
export { ROW_SELECTION_PROPAGATION_DEFAULT } from "../hooks/features/rowSelection/utils.js";
|
|
79
79
|
export { useGridListView, listViewStateInitializer } from "../hooks/features/listView/useGridListView.js";
|
|
80
|
-
export { useGridComponentRenderer } from "../hooks/utils/useGridComponentRenderer.js";
|
|
81
80
|
export { useTimeout } from "../hooks/utils/useTimeout.js";
|
|
82
81
|
export { useGridVisibleRows, getVisibleRows } from "../hooks/utils/useGridVisibleRows.js";
|
|
83
82
|
export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js";
|
package/internals/index.js
CHANGED
|
@@ -94,7 +94,6 @@ var _exportNames = {
|
|
|
94
94
|
ROW_SELECTION_PROPAGATION_DEFAULT: true,
|
|
95
95
|
useGridListView: true,
|
|
96
96
|
listViewStateInitializer: true,
|
|
97
|
-
useGridComponentRenderer: true,
|
|
98
97
|
useTimeout: true,
|
|
99
98
|
useGridVisibleRows: true,
|
|
100
99
|
getVisibleRows: true,
|
|
@@ -608,12 +607,6 @@ Object.defineProperty(exports, "useGridColumns", {
|
|
|
608
607
|
return _useGridColumns.useGridColumns;
|
|
609
608
|
}
|
|
610
609
|
});
|
|
611
|
-
Object.defineProperty(exports, "useGridComponentRenderer", {
|
|
612
|
-
enumerable: true,
|
|
613
|
-
get: function () {
|
|
614
|
-
return _useGridComponentRenderer.useGridComponentRenderer;
|
|
615
|
-
}
|
|
616
|
-
});
|
|
617
610
|
Object.defineProperty(exports, "useGridCsvExport", {
|
|
618
611
|
enumerable: true,
|
|
619
612
|
get: function () {
|
|
@@ -953,7 +946,6 @@ Object.keys(_virtualization).forEach(function (key) {
|
|
|
953
946
|
var _useGridColumnResize = require("../hooks/features/columnResize/useGridColumnResize");
|
|
954
947
|
var _utils = require("../hooks/features/rowSelection/utils");
|
|
955
948
|
var _useGridListView = require("../hooks/features/listView/useGridListView");
|
|
956
|
-
var _useGridComponentRenderer = require("../hooks/utils/useGridComponentRenderer");
|
|
957
949
|
var _useTimeout = require("../hooks/utils/useTimeout");
|
|
958
950
|
var _useGridVisibleRows = require("../hooks/utils/useGridVisibleRows");
|
|
959
951
|
var _useGridInitializeState = require("../hooks/utils/useGridInitializeState");
|
package/locales/arSD.js
CHANGED
|
@@ -45,12 +45,11 @@ const arSDGrid = {
|
|
|
45
45
|
// toolbarAssistant: 'AI Assistant',
|
|
46
46
|
|
|
47
47
|
// Columns management text
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
columnsManagementSearchTitle: 'بحث',
|
|
49
|
+
columnsManagementNoColumns: 'لا يوجد أعمدة',
|
|
50
|
+
columnsManagementShowHideAllText: 'عرض/إخفاء الكل',
|
|
51
|
+
columnsManagementReset: 'إعادة ضبط',
|
|
52
|
+
columnsManagementDeleteIconLabel: 'مسح',
|
|
54
53
|
// Filter panel text
|
|
55
54
|
filterPanelAddFilter: 'إضافة مرشِح',
|
|
56
55
|
filterPanelRemoveAll: 'حذف الكل',
|
package/locales/ptPT.js
CHANGED
|
@@ -16,7 +16,7 @@ const ptPTGrid = {
|
|
|
16
16
|
// Density selector toolbar button text
|
|
17
17
|
toolbarDensity: 'Densidade',
|
|
18
18
|
toolbarDensityLabel: 'Densidade',
|
|
19
|
-
toolbarDensityCompact: '
|
|
19
|
+
toolbarDensityCompact: 'Compacto',
|
|
20
20
|
toolbarDensityStandard: 'Padrão',
|
|
21
21
|
toolbarDensityComfortable: 'Confortável',
|
|
22
22
|
// Columns selector toolbar button text
|
|
@@ -31,7 +31,7 @@ const ptPTGrid = {
|
|
|
31
31
|
// Quick filter toolbar field
|
|
32
32
|
toolbarQuickFilterPlaceholder: 'Procurar…',
|
|
33
33
|
toolbarQuickFilterLabel: 'Procurar',
|
|
34
|
-
toolbarQuickFilterDeleteIconLabel: '
|
|
34
|
+
toolbarQuickFilterDeleteIconLabel: 'Limpar',
|
|
35
35
|
// Export selector toolbar button text
|
|
36
36
|
toolbarExport: 'Exportar',
|
|
37
37
|
toolbarExportLabel: 'Exportar',
|
|
@@ -150,8 +150,8 @@ const ptPTGrid = {
|
|
|
150
150
|
unpin: 'Desafixar',
|
|
151
151
|
// Tree Data
|
|
152
152
|
treeDataGroupingHeaderName: 'Grupo',
|
|
153
|
-
treeDataExpand: '
|
|
154
|
-
treeDataCollapse: '
|
|
153
|
+
treeDataExpand: 'expandir',
|
|
154
|
+
treeDataCollapse: 'colapsar',
|
|
155
155
|
// Grouping columns
|
|
156
156
|
groupingColumnHeaderName: 'Grupo',
|
|
157
157
|
groupColumn: name => `Agrupar por ${name}`,
|
package/material/variables.js
CHANGED
|
@@ -22,8 +22,7 @@ function useMaterialCSSVariables() {
|
|
|
22
22
|
}
|
|
23
23
|
function transformTheme(t) {
|
|
24
24
|
const borderColor = getBorderColor(t);
|
|
25
|
-
const dataGridPalette = t.palette.DataGrid;
|
|
26
|
-
|
|
25
|
+
const dataGridPalette = (t.vars || t).palette.DataGrid;
|
|
27
26
|
const backgroundBase = dataGridPalette?.bg ?? (t.vars || t).palette.background.default;
|
|
28
27
|
const backgroundHeader = dataGridPalette?.headerBg ?? backgroundBase;
|
|
29
28
|
const backgroundPinned = dataGridPalette?.pinnedBg ?? backgroundBase;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { EventManager, EventListenerOptions } from '@mui/x-internals/EventManager';
|
|
3
|
+
import type { Store } from '@mui/x-internals/store';
|
|
3
4
|
import type { GridEventPublisher, GridEventListener, GridEvents } from "../events/index.js";
|
|
4
|
-
import { Store } from "../../utils/Store.js";
|
|
5
5
|
import type { GridApiCaches } from "../gridApiCaches.js";
|
|
6
6
|
import type { GridApiCommon, GridPrivateApiCommon } from "./gridApiCommon.js";
|
|
7
7
|
import type { DataGridProcessedProps } from "../props/DataGridProps.js";
|
|
@@ -2,6 +2,8 @@ import { GridValidRowModel } from "./gridRows.js";
|
|
|
2
2
|
import { GridCellParams } from "./params/gridCellParams.js";
|
|
3
3
|
/**
|
|
4
4
|
* A function used to process cellClassName params.
|
|
5
|
+
* @param {GridCellParams<R, V>} params The parameters of the cell.
|
|
6
|
+
* @returns {string} The class name to be added to the cell.
|
|
5
7
|
*/
|
|
6
8
|
export type GridCellClassFn<R extends GridValidRowModel = any, V = unknown> = (params: GridCellParams<R, V>) => string;
|
|
7
9
|
/**
|
|
@@ -7,6 +7,8 @@ export type GridColumnNode = GridColumnGroup | GridLeafColumn;
|
|
|
7
7
|
export declare function isLeaf(node: GridColumnNode): node is GridLeafColumn;
|
|
8
8
|
/**
|
|
9
9
|
* A function used to process headerClassName params.
|
|
10
|
+
* @param {GridColumnGroupHeaderParams} params The parameters of the column group header.
|
|
11
|
+
* @returns {string} The class name to be added to the column group header cell.
|
|
10
12
|
*/
|
|
11
13
|
export type GridColumnGroupHeaderClassFn = (params: GridColumnGroupHeaderParams) => string;
|
|
12
14
|
/**
|
|
@@ -10,6 +10,8 @@ function isLeaf(node) {
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A function used to process headerClassName params.
|
|
13
|
+
* @param {GridColumnGroupHeaderParams} params The parameters of the column group header.
|
|
14
|
+
* @returns {string} The class name to be added to the column group header cell.
|
|
13
15
|
*/
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GridColumnHeaderParams } from "./params/gridColumnHeaderParams.js";
|
|
2
2
|
/**
|
|
3
3
|
* A function used to process headerClassName params.
|
|
4
|
+
* @param {GridColumnHeaderParams} params The parameters of the column header.
|
|
5
|
+
* @returns {string} The class name to be added to the column header cell.
|
|
4
6
|
*/
|
|
5
7
|
export type GridColumnHeaderClassFn = (params: GridColumnHeaderParams) => string;
|
|
6
8
|
/**
|
package/models/gridRows.d.ts
CHANGED
|
@@ -173,6 +173,8 @@ export interface GridRowEntry<R extends GridValidRowModel = GridValidRowModel> {
|
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* The function to retrieve the id of a [[GridRowModel]].
|
|
176
|
+
* @param {R} row The row model.
|
|
177
|
+
* @returns {GridRowId} The id of the row.
|
|
176
178
|
*/
|
|
177
179
|
export type GridRowIdGetter<R extends GridValidRowModel = GridValidRowModel> = (row: R) => GridRowId;
|
|
178
180
|
export {};
|
|
@@ -9,6 +9,11 @@ export interface GridSortCellParams<V = any> {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* The type of the sort comparison function.
|
|
12
|
+
* @param {V} v1 The first value to compare.
|
|
13
|
+
* @param {V} v2 The second value to compare.
|
|
14
|
+
* @param {GridSortCellParams<V>} cellParams1 The parameters of the first cell.
|
|
15
|
+
* @param {GridSortCellParams<V>} cellParams2 The parameters of the second cell.
|
|
16
|
+
* @returns {number} The result of the comparison.
|
|
12
17
|
*/
|
|
13
18
|
export type GridComparatorFn<V = any> = (v1: V, v2: V, cellParams1: GridSortCellParams<V>, cellParams2: GridSortCellParams<V>) => number;
|
|
14
19
|
/**
|
|
@@ -3,7 +3,7 @@ import type { GridColDef } from "../colDef/gridColDef.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Object passed as parameter in the row callbacks.
|
|
5
5
|
* @demos
|
|
6
|
-
* - [Master
|
|
6
|
+
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
|
|
7
7
|
*/
|
|
8
8
|
export interface GridRowParams<R extends GridValidRowModel = any> {
|
|
9
9
|
/**
|
|
@@ -7,7 +7,7 @@ exports.GridRowEditStopReasons = exports.GridRowEditStartReasons = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* Object passed as parameter in the row callbacks.
|
|
9
9
|
* @demos
|
|
10
|
-
* - [Master
|
|
10
|
+
* - [Master-detail row panels](/x/react-data-grid/master-detail/)
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* Object passed as parameter in the row `getRowClassName` callback prop.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.2",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
"directory": "packages/x-data-grid"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@babel/runtime": "^7.27.
|
|
43
|
-
"@mui/utils": "^7.
|
|
42
|
+
"@babel/runtime": "^7.27.6",
|
|
43
|
+
"@mui/utils": "^7.1.1",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
45
45
|
"prop-types": "^15.8.1",
|
|
46
|
-
"reselect": "^5.1.1",
|
|
47
46
|
"use-sync-external-store": "^1.5.0",
|
|
48
|
-
"@mui/x-internals": "8.5.
|
|
47
|
+
"@mui/x-internals": "8.5.2"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
|
51
50
|
"@emotion/react": "^11.9.0",
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateSelectorFunction } from '@mui/x-internals/store';
|
|
3
3
|
export interface OutputSelector<State, Args, Result> {
|
|
4
4
|
(apiRef: RefObject<{
|
|
5
5
|
state: State;
|
|
6
6
|
} | null>, args?: Args): Result;
|
|
7
7
|
}
|
|
8
|
-
type StateFromSelector<T> = T extends ((first: infer F, ...args: any[]) => any) ? F extends RefObject<{
|
|
9
|
-
state: infer F2;
|
|
10
|
-
} | null> ? F2 : F : never;
|
|
11
|
-
type StateFromSelectorList<Selectors extends readonly any[]> = Selectors extends [f: infer F, ...other: infer R] ? StateFromSelector<F> extends StateFromSelectorList<R> ? StateFromSelector<F> : StateFromSelectorList<R> : {};
|
|
12
|
-
type SelectorResultArrayWithArgs<Selectors extends ReadonlyArray<Selector<any>>, Args> = [...SelectorResultArray<Selectors>, Args];
|
|
13
|
-
type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Args, Result> = [selectors: [...Selectors], combiner: (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result] | [...Selectors, (...args: SelectorResultArrayWithArgs<Selectors, Args>) => Result];
|
|
14
|
-
type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Args, Result>(...items: SelectorArgs<Selectors, Args, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Args, Result>;
|
|
15
8
|
export declare const createSelector: CreateSelectorFunction;
|
|
9
|
+
export declare const createSelectorMemoized: CreateSelectorFunction;
|
|
16
10
|
/**
|
|
17
11
|
* Used to create the root selector for a feature. It assumes that the state is already initialized
|
|
18
12
|
* and strips from the types the possibility of `apiRef` being `null`.
|
|
19
13
|
* Users are warned about this in our documentation https://mui.com/x/react-data-grid/state/#direct-selector-access
|
|
20
14
|
*/
|
|
21
|
-
export declare const createRootSelector: <State, Args, Result>(fn: (state: State, args: Args) => Result) => OutputSelector<State, Args, Result>;
|
|
22
|
-
export declare const createSelectorMemoized: CreateSelectorFunction;
|
|
23
|
-
export {};
|
|
15
|
+
export declare const createRootSelector: <State, Args, Result>(fn: (state: State, args: Args) => Result) => OutputSelector<State, Args, Result>;
|