@mui/x-data-grid 9.3.0 → 9.5.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +296 -0
  2. package/colDef/gridColumnTypesRegistry.d.mts +8 -0
  3. package/colDef/gridColumnTypesRegistry.d.ts +8 -0
  4. package/colDef/gridColumnTypesRegistry.js +44 -0
  5. package/colDef/gridColumnTypesRegistry.mjs +34 -0
  6. package/colDef/gridDefaultColumnTypes.d.mts +1 -1
  7. package/colDef/gridDefaultColumnTypes.d.ts +1 -1
  8. package/colDef/gridDefaultColumnTypes.js +11 -23
  9. package/colDef/gridDefaultColumnTypes.mjs +4 -22
  10. package/components/GridRow.js +9 -1
  11. package/components/GridRow.mjs +9 -1
  12. package/components/cell/GridActionsCell.js +1 -1
  13. package/components/cell/GridActionsCell.mjs +1 -1
  14. package/components/cell/GridActionsCellItem.js +1 -1
  15. package/components/cell/GridActionsCellItem.mjs +1 -1
  16. package/components/cell/GridLongTextCell.js +2 -0
  17. package/components/cell/GridLongTextCell.mjs +2 -0
  18. package/components/cell/GridSkeletonCell.d.mts +2 -1
  19. package/components/cell/GridSkeletonCell.d.ts +2 -1
  20. package/components/cell/GridSkeletonCell.js +8 -3
  21. package/components/cell/GridSkeletonCell.mjs +8 -3
  22. package/components/containers/GridRootStyles.js +29 -0
  23. package/components/containers/GridRootStyles.mjs +29 -0
  24. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -4
  25. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +2 -4
  26. package/components/panel/filterPanel/filterPanelUtils.d.mts +3 -2
  27. package/components/panel/filterPanel/filterPanelUtils.d.ts +3 -2
  28. package/components/panel/filterPanel/filterPanelUtils.js +4 -0
  29. package/components/panel/filterPanel/filterPanelUtils.mjs +3 -0
  30. package/constants/cssVariables.d.mts +3 -0
  31. package/constants/cssVariables.d.ts +3 -0
  32. package/constants/cssVariables.js +2 -1
  33. package/constants/cssVariables.mjs +2 -1
  34. package/constants/gridClasses.d.mts +48 -0
  35. package/constants/gridClasses.d.ts +48 -0
  36. package/constants/gridClasses.js +1 -1
  37. package/constants/gridClasses.mjs +1 -1
  38. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.mts +17 -1
  39. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +17 -1
  40. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
  41. package/hooks/core/strategyProcessing/useGridStrategyProcessing.mjs +2 -1
  42. package/hooks/core/useGridProps.js +5 -3
  43. package/hooks/core/useGridProps.mjs +5 -3
  44. package/hooks/core/useGridVirtualizer.d.mts +10 -10
  45. package/hooks/core/useGridVirtualizer.d.ts +10 -10
  46. package/hooks/features/columns/gridColumnsUtils.js +18 -10
  47. package/hooks/features/columns/gridColumnsUtils.mjs +19 -11
  48. package/hooks/features/columns/useGridColumns.js +11 -0
  49. package/hooks/features/columns/useGridColumns.mjs +11 -0
  50. package/hooks/features/dataSource/models.d.mts +1 -1
  51. package/hooks/features/dataSource/models.d.ts +1 -1
  52. package/hooks/features/dataSource/useGridDataSourceBase.d.mts +2 -2
  53. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +2 -2
  54. package/hooks/features/dataSource/useGridDataSourceBase.js +31 -19
  55. package/hooks/features/dataSource/useGridDataSourceBase.mjs +31 -19
  56. package/hooks/features/dataSource/utils.d.mts +1 -0
  57. package/hooks/features/dataSource/utils.d.ts +1 -0
  58. package/hooks/features/dataSource/utils.js +1 -0
  59. package/hooks/features/dataSource/utils.mjs +1 -0
  60. package/hooks/features/editing/useGridCellEditing.js +1 -1
  61. package/hooks/features/editing/useGridCellEditing.mjs +1 -1
  62. package/hooks/features/editing/useGridRowEditing.js +1 -1
  63. package/hooks/features/editing/useGridRowEditing.mjs +1 -1
  64. package/hooks/features/export/serializers/csvSerializer.js +3 -1
  65. package/hooks/features/export/serializers/csvSerializer.mjs +3 -1
  66. package/hooks/features/filter/gridFilterUtils.js +5 -3
  67. package/hooks/features/filter/gridFilterUtils.mjs +5 -3
  68. package/hooks/features/listView/useGridListView.js +1 -1
  69. package/hooks/features/listView/useGridListView.mjs +1 -1
  70. package/hooks/features/sorting/gridSortingUtils.js +3 -1
  71. package/hooks/features/sorting/gridSortingUtils.mjs +3 -1
  72. package/hooks/features/virtualization/gridVirtualizationSelectors.d.mts +1 -1
  73. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
  74. package/hooks/utils/useGridSelector.js +26 -23
  75. package/hooks/utils/useGridSelector.mjs +25 -23
  76. package/index.js +1 -1
  77. package/index.mjs +1 -1
  78. package/internals/index.d.mts +9 -4
  79. package/internals/index.d.ts +9 -4
  80. package/internals/index.js +62 -2
  81. package/internals/index.mjs +8 -4
  82. package/internals/utils/propValidation.js +3 -0
  83. package/internals/utils/propValidation.mjs +3 -0
  84. package/material/augmentation.d.mts +4 -0
  85. package/material/augmentation.d.ts +4 -0
  86. package/material/index.js +38 -24
  87. package/material/index.mjs +38 -24
  88. package/material/variables.js +2 -1
  89. package/material/variables.mjs +2 -1
  90. package/models/colDef/gridColDef.d.mts +35 -3
  91. package/models/colDef/gridColDef.d.ts +35 -3
  92. package/models/colDef/gridColType.d.mts +1 -0
  93. package/models/colDef/gridColType.d.ts +1 -0
  94. package/models/colDef/gridColumnTypesRecord.d.mts +1 -1
  95. package/models/colDef/gridColumnTypesRecord.d.ts +1 -1
  96. package/models/colDef/index.d.mts +1 -1
  97. package/models/colDef/index.d.ts +1 -1
  98. package/models/gridBaseSlots.d.mts +46 -0
  99. package/models/gridBaseSlots.d.ts +46 -0
  100. package/models/gridDataSource.d.mts +6 -0
  101. package/models/gridDataSource.d.ts +6 -0
  102. package/models/gridRows.d.mts +0 -1
  103. package/models/gridRows.d.ts +0 -1
  104. package/models/gridSlotsComponent.d.mts +5 -0
  105. package/models/gridSlotsComponent.d.ts +5 -0
  106. package/models/gridSlotsComponentsProps.d.mts +3 -1
  107. package/models/gridSlotsComponentsProps.d.ts +3 -1
  108. package/models/gridStateCommunity.d.mts +1 -1
  109. package/models/gridStateCommunity.d.ts +1 -1
  110. package/package.json +4 -4
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
+ GRID_STRING_COL_DEF: true,
8
+ registerGridColumnTypes: true,
9
+ gridRowIdSelector: true,
7
10
  GridVirtualScroller: true,
8
11
  GridVirtualScrollerContent: true,
9
12
  GridVirtualScrollerRenderZone: true,
@@ -19,6 +22,8 @@ var _exportNames = {
19
22
  propsStateInitializer: true,
20
23
  getGridFilter: true,
21
24
  getValueOptions: true,
25
+ getValueFromValueOptions: true,
26
+ isMultiSelectColDef: true,
22
27
  isSingleSelectColDef: true,
23
28
  useGridRegisterPipeProcessor: true,
24
29
  GridStrategyGroup: true,
@@ -45,9 +50,11 @@ var _exportNames = {
45
50
  filterStateInitializer: true,
46
51
  defaultGridFilterLookup: true,
47
52
  passFilterLogic: true,
53
+ removeDiacritics: true,
48
54
  gridFilteredChildrenCountLookupSelector: true,
49
55
  gridExpandedSortedRowTreeLevelPositionLookupSelector: true,
50
56
  gridFilteredSortedDepthRowEntriesSelector: true,
57
+ gridFilterModelSelector: true,
51
58
  useGridFocus: true,
52
59
  focusStateInitializer: true,
53
60
  useGridKeyboardNavigation: true,
@@ -132,7 +139,8 @@ var _exportNames = {
132
139
  serializeCellValue: true,
133
140
  GridSkeletonLoadingOverlayInner: true,
134
141
  createSvgIcon: true,
135
- useGridPanelContext: true
142
+ useGridPanelContext: true,
143
+ useSyncExternalStore: true
136
144
  };
137
145
  Object.defineProperty(exports, "CacheChunkManager", {
138
146
  enumerable: true,
@@ -164,6 +172,12 @@ Object.defineProperty(exports, "GRID_ID_AUTOGENERATED", {
164
172
  return _gridRowsUtils.GRID_ID_AUTOGENERATED;
165
173
  }
166
174
  });
175
+ Object.defineProperty(exports, "GRID_STRING_COL_DEF", {
176
+ enumerable: true,
177
+ get: function () {
178
+ return _gridStringColDef.GRID_STRING_COL_DEF;
179
+ }
180
+ });
167
181
  Object.defineProperty(exports, "GridBaseColumnHeaders", {
168
182
  enumerable: true,
169
183
  get: function () {
@@ -392,6 +406,12 @@ Object.defineProperty(exports, "getTreeNodeDescendants", {
392
406
  return _gridRowsUtils.getTreeNodeDescendants;
393
407
  }
394
408
  });
409
+ Object.defineProperty(exports, "getValueFromValueOptions", {
410
+ enumerable: true,
411
+ get: function () {
412
+ return _filterPanelUtils.getValueFromValueOptions;
413
+ }
414
+ });
395
415
  Object.defineProperty(exports, "getValueOptions", {
396
416
  enumerable: true,
397
417
  get: function () {
@@ -422,6 +442,12 @@ Object.defineProperty(exports, "gridExpandedSortedRowTreeLevelPositionLookupSele
422
442
  return _gridFilterSelector.gridExpandedSortedRowTreeLevelPositionLookupSelector;
423
443
  }
424
444
  });
445
+ Object.defineProperty(exports, "gridFilterModelSelector", {
446
+ enumerable: true,
447
+ get: function () {
448
+ return _gridFilterSelector.gridFilterModelSelector;
449
+ }
450
+ });
425
451
  Object.defineProperty(exports, "gridFilteredChildrenCountLookupSelector", {
426
452
  enumerable: true,
427
453
  get: function () {
@@ -482,6 +508,12 @@ Object.defineProperty(exports, "gridRowGroupsToFetchSelector", {
482
508
  return _gridRowsSelector.gridRowGroupsToFetchSelector;
483
509
  }
484
510
  });
511
+ Object.defineProperty(exports, "gridRowIdSelector", {
512
+ enumerable: true,
513
+ get: function () {
514
+ return _gridPropsSelectors.gridRowIdSelector;
515
+ }
516
+ });
485
517
  Object.defineProperty(exports, "gridRowSelector", {
486
518
  enumerable: true,
487
519
  get: function () {
@@ -524,6 +556,12 @@ Object.defineProperty(exports, "isFillRightShortcut", {
524
556
  return _keyboardUtils.isFillRightShortcut;
525
557
  }
526
558
  });
559
+ Object.defineProperty(exports, "isMultiSelectColDef", {
560
+ enumerable: true,
561
+ get: function () {
562
+ return _filterPanelUtils.isMultiSelectColDef;
563
+ }
564
+ });
527
565
  Object.defineProperty(exports, "isNavigationKey", {
528
566
  enumerable: true,
529
567
  get: function () {
@@ -584,6 +622,18 @@ Object.defineProperty(exports, "propsStateInitializer", {
584
622
  return _useGridProps.propsStateInitializer;
585
623
  }
586
624
  });
625
+ Object.defineProperty(exports, "registerGridColumnTypes", {
626
+ enumerable: true,
627
+ get: function () {
628
+ return _gridColumnTypesRegistry.registerGridColumnTypes;
629
+ }
630
+ });
631
+ Object.defineProperty(exports, "removeDiacritics", {
632
+ enumerable: true,
633
+ get: function () {
634
+ return _gridFilterUtils.removeDiacritics;
635
+ }
636
+ });
587
637
  Object.defineProperty(exports, "rowSelectionStateInitializer", {
588
638
  enumerable: true,
589
639
  get: function () {
@@ -896,6 +946,12 @@ Object.defineProperty(exports, "usePinnedScrollOffset", {
896
946
  return _usePinnedScrollOffset.usePinnedScrollOffset;
897
947
  }
898
948
  });
949
+ Object.defineProperty(exports, "useSyncExternalStore", {
950
+ enumerable: true,
951
+ get: function () {
952
+ return _shim.useSyncExternalStore;
953
+ }
954
+ });
899
955
  Object.defineProperty(exports, "useTimeout", {
900
956
  enumerable: true,
901
957
  get: function () {
@@ -908,6 +964,9 @@ Object.defineProperty(exports, "vars", {
908
964
  return _cssVariables.vars;
909
965
  }
910
966
  });
967
+ var _gridStringColDef = require("../colDef/gridStringColDef");
968
+ var _gridColumnTypesRegistry = require("../colDef/gridColumnTypesRegistry");
969
+ var _gridPropsSelectors = require("../hooks/core/gridPropsSelectors");
911
970
  var _GridVirtualScroller = require("../components/virtualization/GridVirtualScroller");
912
971
  var _GridVirtualScrollerContent = require("../components/virtualization/GridVirtualScrollerContent");
913
972
  var _GridVirtualScrollerRenderZone = require("../components/virtualization/GridVirtualScrollerRenderZone");
@@ -1179,4 +1238,5 @@ Object.keys(_pivoting).forEach(function (key) {
1179
1238
  });
1180
1239
  });
1181
1240
  var _createSvgIcon = require("../material/icons/createSvgIcon");
1182
- var _GridPanelContext = require("../components/panel/GridPanelContext");
1241
+ var _GridPanelContext = require("../components/panel/GridPanelContext");
1242
+ var _shim = require("use-sync-external-store/shim");
@@ -1,3 +1,6 @@
1
+ export { GRID_STRING_COL_DEF } from "../colDef/gridStringColDef.mjs";
2
+ export { registerGridColumnTypes } from "../colDef/gridColumnTypesRegistry.mjs";
3
+ export { gridRowIdSelector } from "../hooks/core/gridPropsSelectors.mjs";
1
4
  export { GridVirtualScroller } from "../components/virtualization/GridVirtualScroller.mjs";
2
5
  export { GridVirtualScrollerContent } from "../components/virtualization/GridVirtualScrollerContent.mjs";
3
6
  export { GridVirtualScrollerRenderZone } from "../components/virtualization/GridVirtualScrollerRenderZone.mjs";
@@ -12,7 +15,7 @@ export { vars } from "../constants/cssVariables.mjs";
12
15
  export { useGridVirtualizer } from "../hooks/core/useGridVirtualizer.mjs";
13
16
  export { propsStateInitializer } from "../hooks/core/useGridProps.mjs";
14
17
  export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.mjs";
15
- export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.mjs";
18
+ export { getValueOptions, getValueFromValueOptions, isMultiSelectColDef } from "../components/panel/filterPanel/filterPanelUtils.mjs";
16
19
  export { useGridRegisterPipeProcessor } from "../hooks/core/pipeProcessing/index.mjs";
17
20
  export { GridStrategyGroup, useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from "../hooks/core/strategyProcessing/index.mjs";
18
21
  export { useGridInitialization } from "../hooks/core/useGridInitialization.mjs";
@@ -31,8 +34,8 @@ export { useGridCsvExport } from "../hooks/features/export/useGridCsvExport.mjs"
31
34
  export { useGridPrintExport } from "../hooks/features/export/useGridPrintExport.mjs";
32
35
  export { useGridFilter, filterStateInitializer } from "../hooks/features/filter/useGridFilter.mjs";
33
36
  export { defaultGridFilterLookup } from "../hooks/features/filter/gridFilterState.mjs";
34
- export { passFilterLogic } from "../hooks/features/filter/gridFilterUtils.mjs";
35
- export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridFilteredSortedDepthRowEntriesSelector } from "../hooks/features/filter/gridFilterSelector.mjs";
37
+ export { passFilterLogic, removeDiacritics } from "../hooks/features/filter/gridFilterUtils.mjs";
38
+ export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridFilteredSortedDepthRowEntriesSelector, gridFilterModelSelector } from "../hooks/features/filter/gridFilterSelector.mjs";
36
39
  export { isSingleSelectColDef } from "../components/panel/filterPanel/filterPanelUtils.mjs";
37
40
  export { useGridFocus, focusStateInitializer } from "../hooks/features/focus/useGridFocus.mjs";
38
41
  export { useGridKeyboardNavigation } from "../hooks/features/keyboardNavigation/useGridKeyboardNavigation.mjs";
@@ -97,4 +100,5 @@ export * from "./demo/index.mjs";
97
100
  export { GridSkeletonLoadingOverlayInner } from "../components/GridSkeletonLoadingOverlay.mjs";
98
101
  export * from "../hooks/features/pivoting/index.mjs";
99
102
  export { createSvgIcon } from "../material/icons/createSvgIcon.mjs";
100
- export { useGridPanelContext } from "../components/panel/GridPanelContext.mjs";
103
+ export { useGridPanelContext } from "../components/panel/GridPanelContext.mjs";
104
+ export { useSyncExternalStore } from 'use-sync-external-store/shim';
@@ -10,6 +10,9 @@ var _utils = require("../../utils/utils");
10
10
  var _signature = require("../../constants/signature");
11
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];
12
12
  function validateProps(props, validators) {
13
+ if (process.env.NODE_ENV === 'production') {
14
+ return;
15
+ }
13
16
  validators.forEach(validator => {
14
17
  const message = validator(props);
15
18
  if (message) {
@@ -3,6 +3,9 @@ import { isNumber } from "../../utils/utils.mjs";
3
3
  import { GridSignature } from "../../constants/signature.mjs";
4
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];
5
5
  export function validateProps(props, validators) {
6
+ if (process.env.NODE_ENV === 'production') {
7
+ return;
8
+ }
6
9
  validators.forEach(validator => {
7
10
  const message = validator(props);
8
11
  if (message) {
@@ -7,6 +7,7 @@ import type { DividerProps } from '@mui/material/Divider';
7
7
  import type { LinearProgressProps } from '@mui/material/LinearProgress';
8
8
  import type { MenuListProps } from '@mui/material/MenuList';
9
9
  import type { MenuItemProps } from '@mui/material/MenuItem';
10
+ import type { ModalProps } from '@mui/material/Modal';
10
11
  import type { TextFieldProps } from '@mui/material/TextField';
11
12
  import type { SwitchProps } from '@mui/material/Switch';
12
13
  import type { ButtonProps } from '@mui/material/Button';
@@ -51,6 +52,9 @@ declare module '@mui/x-data-grid' {
51
52
  interface BaseMenuItemPropsOverrides {
52
53
  material?: Partial<MenuItemProps>;
53
54
  }
55
+ interface BaseModalPropsOverrides {
56
+ material?: Partial<ModalProps>;
57
+ }
54
58
  interface BaseTextFieldPropsOverrides {
55
59
  material?: Partial<TextFieldProps>;
56
60
  }
@@ -7,6 +7,7 @@ import type { DividerProps } from '@mui/material/Divider';
7
7
  import type { LinearProgressProps } from '@mui/material/LinearProgress';
8
8
  import type { MenuListProps } from '@mui/material/MenuList';
9
9
  import type { MenuItemProps } from '@mui/material/MenuItem';
10
+ import type { ModalProps } from '@mui/material/Modal';
10
11
  import type { TextFieldProps } from '@mui/material/TextField';
11
12
  import type { SwitchProps } from '@mui/material/Switch';
12
13
  import type { ButtonProps } from '@mui/material/Button';
@@ -51,6 +52,9 @@ declare module '@mui/x-data-grid' {
51
52
  interface BaseMenuItemPropsOverrides {
52
53
  material?: Partial<MenuItemProps>;
53
54
  }
55
+ interface BaseModalPropsOverrides {
56
+ material?: Partial<ModalProps>;
57
+ }
54
58
  interface BaseTextFieldPropsOverrides {
55
59
  material?: Partial<TextFieldProps>;
56
60
  }
package/material/index.js CHANGED
@@ -32,6 +32,7 @@ var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon")
32
32
  var _ListItemText = _interopRequireWildcard(require("@mui/material/ListItemText"));
33
33
  var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
34
34
  var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
35
+ var _Modal = _interopRequireDefault(require("@mui/material/Modal"));
35
36
  var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
36
37
  var _TextareaAutosize = _interopRequireDefault(require("@mui/material/TextareaAutosize"));
37
38
  var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
@@ -61,7 +62,7 @@ var _useGridRootProps = require("../hooks/utils/useGridRootProps");
61
62
  require("./augmentation");
62
63
  var _jsxRuntime = require("react/jsx-runtime");
63
64
  var _variables = require("./variables");
64
- const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "size", "style", "fullWidth"],
65
+ const _excluded = ["id", "label", "labelId", "material", "disabled", "multiple", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "renderValue", "size", "style", "fullWidth"],
65
66
  _excluded2 = ["onRowsPerPageChange", "material", "disabled"],
66
67
  _excluded3 = ["material"],
67
68
  _excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
@@ -77,18 +78,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
77
78
  _excluded12 = ["material", "label", "className"],
78
79
  _excluded13 = ["material"],
79
80
  _excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
80
- _excluded15 = ["slotProps", "material"],
81
- _excluded16 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
82
- _excluded17 = ["key"],
83
- _excluded18 = ["slotProps"],
81
+ _excluded15 = ["material"],
82
+ _excluded16 = ["slotProps", "material"],
83
+ _excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
84
+ _excluded18 = ["key"],
84
85
  _excluded19 = ["slotProps"],
85
86
  _excluded20 = ["slotProps"],
86
- _excluded21 = ["slotProps", "material"],
87
- _excluded22 = ["material"],
88
- _excluded23 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
89
- _excluded24 = ["native"],
90
- _excluded25 = ["children", "value", "active"],
91
- _excluded26 = ["items", "value", "material"];
87
+ _excluded21 = ["slotProps"],
88
+ _excluded22 = ["slotProps", "material"],
89
+ _excluded23 = ["material"],
90
+ _excluded24 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
91
+ _excluded25 = ["native"],
92
+ _excluded26 = ["children", "value", "active"],
93
+ _excluded27 = ["items", "value", "material"];
92
94
  /* eslint-disable mui/disallow-react-api-in-server-components */
93
95
 
94
96
  const InputAdornment = (0, _styles.styled)(_InputAdornment.default, {
@@ -155,11 +157,13 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
155
157
  labelId,
156
158
  material,
157
159
  disabled,
160
+ multiple,
158
161
  slotProps,
159
162
  onChange,
160
163
  onKeyDown,
161
164
  onOpen,
162
165
  onClose,
166
+ renderValue,
163
167
  size,
164
168
  style,
165
169
  fullWidth
@@ -196,7 +200,9 @@ const BaseSelect = (0, _forwardRef.forwardRef)(function BaseSelect(props, ref) {
196
200
  labelId: labelId,
197
201
  label: label,
198
202
  displayEmpty: true,
203
+ multiple: multiple,
199
204
  onChange: onChange,
205
+ renderValue: renderValue,
200
206
  variant: computedVariant
201
207
  }, other, {
202
208
  inputProps: slotProps?.htmlInput,
@@ -484,12 +490,19 @@ function BaseMenuItem(props) {
484
490
  children: iconEnd
485
491
  }, "3")]);
486
492
  }
493
+ function BaseModal(props) {
494
+ const {
495
+ material
496
+ } = props,
497
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
498
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Modal.default, (0, _extends2.default)({}, other, material));
499
+ }
487
500
  function BaseTextField(props) {
488
501
  const {
489
502
  slotProps,
490
503
  material
491
504
  } = props,
492
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded15);
505
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
493
506
  const theme = (0, _styles.useTheme)();
494
507
  const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
495
508
  const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
@@ -523,7 +536,7 @@ function BaseAutocomplete(props) {
523
536
  slotProps,
524
537
  material
525
538
  } = props,
526
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded16);
539
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded17);
527
540
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
528
541
  id: id,
529
542
  multiple: multiple,
@@ -540,28 +553,28 @@ function BaseAutocomplete(props) {
540
553
  {
541
554
  key
542
555
  } = _getTagProps,
543
- tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded17);
556
+ tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded18);
544
557
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Chip.default, (0, _extends2.default)({
545
558
  variant: "outlined",
546
559
  size: "small",
547
560
  label: typeof option === 'string' ? option : getOptionLabel?.(option)
548
- }, tagProps), key);
561
+ }, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
549
562
  }),
550
563
  renderInput: params => {
551
564
  const {
552
565
  slotProps: autocompleteSlotProps
553
566
  } = params,
554
- inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded18);
567
+ inputRest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded19);
555
568
  const _ref = slotProps?.textField ?? {},
556
569
  {
557
570
  slotProps: textFieldSlotProps
558
571
  } = _ref,
559
- textFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded19);
572
+ textFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded20);
560
573
  const _ref2 = rootProps.slotProps?.baseTextField ?? {},
561
574
  {
562
575
  slotProps: baseTextFieldSlotProps
563
576
  } = _ref2,
564
- baseTextFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded20);
577
+ baseTextFieldRest = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded21);
565
578
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, inputRest, {
566
579
  label: label,
567
580
  placeholder: placeholder
@@ -588,7 +601,7 @@ function transformInputProps(props, wrapAdornments = true) {
588
601
  slotProps,
589
602
  material
590
603
  } = props,
591
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded21);
604
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
592
605
  const result = other;
593
606
  if (wrapAdornments) {
594
607
  if (result.startAdornment) {
@@ -622,7 +635,7 @@ const BaseTextarea = (0, _forwardRef.forwardRef)(function BaseTextarea(props, re
622
635
  const {
623
636
  material
624
637
  } = props,
625
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded22);
638
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded23);
626
639
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextareaAutosize.default, (0, _extends2.default)({}, other, material, {
627
640
  ref: ref
628
641
  }));
@@ -647,7 +660,7 @@ function BasePopper(props) {
647
660
  placement,
648
661
  material
649
662
  } = props,
650
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded23);
663
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded24);
651
664
  const modifiers = React.useMemo(() => {
652
665
  const result = [{
653
666
  name: 'preventOverflow',
@@ -742,7 +755,7 @@ function BaseSelectOption(_ref3) {
742
755
  let {
743
756
  native
744
757
  } = _ref3,
745
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded24);
758
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref3, _excluded25);
746
759
  if (native) {
747
760
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("option", (0, _extends2.default)({}, props));
748
761
  }
@@ -777,7 +790,7 @@ function TabPanel(props) {
777
790
  children,
778
791
  active
779
792
  } = props,
780
- other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded25);
793
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded26);
781
794
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledTabPanel, (0, _extends2.default)({
782
795
  role: "tabpanel",
783
796
  style: {
@@ -793,7 +806,7 @@ function BaseTabs(_ref4) {
793
806
  value,
794
807
  material
795
808
  } = _ref4,
796
- props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded26);
809
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref4, _excluded27);
797
810
  const id = (0, _useId.default)();
798
811
  const labelId = `${id}-tab-${value}`;
799
812
  const panelId = `${id}-tabpanel-${value}`;
@@ -873,6 +886,7 @@ const baseSlots = {
873
886
  baseLinearProgress: BaseLinearProgress,
874
887
  baseMenuList: BaseMenuList,
875
888
  baseMenuItem: BaseMenuItem,
889
+ baseModal: BaseModal,
876
890
  baseTextField: BaseTextField,
877
891
  baseButton: BaseButton,
878
892
  baseIconButton: BaseIconButton,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps", "onChange", "onKeyDown", "onOpen", "onClose", "size", "style", "fullWidth"],
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"],
6
6
  _excluded4 = ["autoFocus", "label", "fullWidth", "slotProps", "className", "material", "inputRef"],
@@ -16,18 +16,19 @@ const _excluded = ["id", "label", "labelId", "material", "disabled", "slotProps"
16
16
  _excluded12 = ["material", "label", "className"],
17
17
  _excluded13 = ["material"],
18
18
  _excluded14 = ["inert", "iconStart", "iconEnd", "children", "material"],
19
- _excluded15 = ["slotProps", "material"],
20
- _excluded16 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
21
- _excluded17 = ["key"],
22
- _excluded18 = ["slotProps"],
19
+ _excluded15 = ["material"],
20
+ _excluded16 = ["slotProps", "material"],
21
+ _excluded17 = ["id", "multiple", "freeSolo", "options", "getOptionLabel", "isOptionEqualToValue", "value", "onChange", "label", "placeholder", "slotProps", "material"],
22
+ _excluded18 = ["key"],
23
23
  _excluded19 = ["slotProps"],
24
24
  _excluded20 = ["slotProps"],
25
- _excluded21 = ["slotProps", "material"],
26
- _excluded22 = ["material"],
27
- _excluded23 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
28
- _excluded24 = ["native"],
29
- _excluded25 = ["children", "value", "active"],
30
- _excluded26 = ["items", "value", "material"];
25
+ _excluded21 = ["slotProps"],
26
+ _excluded22 = ["slotProps", "material"],
27
+ _excluded23 = ["material"],
28
+ _excluded24 = ["ref", "open", "children", "className", "clickAwayTouchEvent", "clickAwayMouseEvent", "flip", "focusTrap", "onExited", "onClickAway", "onDidShow", "onDidHide", "id", "target", "transition", "placement", "material"],
29
+ _excluded25 = ["native"],
30
+ _excluded26 = ["children", "value", "active"],
31
+ _excluded27 = ["items", "value", "material"];
31
32
  import * as React from 'react';
32
33
  import clsx from 'clsx';
33
34
  import useForkRef from '@mui/utils/useForkRef';
@@ -46,6 +47,7 @@ import MUIListItemIcon from '@mui/material/ListItemIcon';
46
47
  import MUIListItemText, { listItemTextClasses } from '@mui/material/ListItemText';
47
48
  import MUIMenuList from '@mui/material/MenuList';
48
49
  import MUIMenuItem from '@mui/material/MenuItem';
50
+ import MUIModal from '@mui/material/Modal';
49
51
  import MUITextField from '@mui/material/TextField';
50
52
  import MUITextareaAutosize from '@mui/material/TextareaAutosize';
51
53
  import MUIFormControl from '@mui/material/FormControl';
@@ -142,11 +144,13 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
142
144
  labelId,
143
145
  material,
144
146
  disabled,
147
+ multiple,
145
148
  slotProps,
146
149
  onChange,
147
150
  onKeyDown,
148
151
  onOpen,
149
152
  onClose,
153
+ renderValue,
150
154
  size,
151
155
  style,
152
156
  fullWidth
@@ -183,7 +187,9 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
183
187
  labelId: labelId,
184
188
  label: label,
185
189
  displayEmpty: true,
190
+ multiple: multiple,
186
191
  onChange: onChange,
192
+ renderValue: renderValue,
187
193
  variant: computedVariant
188
194
  }, other, {
189
195
  inputProps: slotProps?.htmlInput,
@@ -471,12 +477,19 @@ function BaseMenuItem(props) {
471
477
  children: iconEnd
472
478
  }, "3")]);
473
479
  }
480
+ function BaseModal(props) {
481
+ const {
482
+ material
483
+ } = props,
484
+ other = _objectWithoutPropertiesLoose(props, _excluded15);
485
+ return /*#__PURE__*/_jsx(MUIModal, _extends({}, other, material));
486
+ }
474
487
  function BaseTextField(props) {
475
488
  const {
476
489
  slotProps,
477
490
  material
478
491
  } = props,
479
- other = _objectWithoutPropertiesLoose(props, _excluded15);
492
+ other = _objectWithoutPropertiesLoose(props, _excluded16);
480
493
  const theme = useTheme();
481
494
  const textFieldDefaults = theme.components?.MuiTextField?.defaultProps ?? {};
482
495
  const computedVariant = other.variant ?? textFieldDefaults.variant ?? 'outlined';
@@ -510,7 +523,7 @@ function BaseAutocomplete(props) {
510
523
  slotProps,
511
524
  material
512
525
  } = props,
513
- other = _objectWithoutPropertiesLoose(props, _excluded16);
526
+ other = _objectWithoutPropertiesLoose(props, _excluded17);
514
527
  return /*#__PURE__*/_jsx(MUIAutocomplete, _extends({
515
528
  id: id,
516
529
  multiple: multiple,
@@ -527,28 +540,28 @@ function BaseAutocomplete(props) {
527
540
  {
528
541
  key
529
542
  } = _getTagProps,
530
- tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded17);
543
+ tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded18);
531
544
  return /*#__PURE__*/_jsx(MUIChip, _extends({
532
545
  variant: "outlined",
533
546
  size: "small",
534
547
  label: typeof option === 'string' ? option : getOptionLabel?.(option)
535
- }, tagProps), key);
548
+ }, tagProps, typeof slotProps?.chip === 'function' ? slotProps.chip(option, index) : slotProps?.chip), key);
536
549
  }),
537
550
  renderInput: params => {
538
551
  const {
539
552
  slotProps: autocompleteSlotProps
540
553
  } = params,
541
- inputRest = _objectWithoutPropertiesLoose(params, _excluded18);
554
+ inputRest = _objectWithoutPropertiesLoose(params, _excluded19);
542
555
  const _ref = slotProps?.textField ?? {},
543
556
  {
544
557
  slotProps: textFieldSlotProps
545
558
  } = _ref,
546
- textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded19);
559
+ textFieldRest = _objectWithoutPropertiesLoose(_ref, _excluded20);
547
560
  const _ref2 = rootProps.slotProps?.baseTextField ?? {},
548
561
  {
549
562
  slotProps: baseTextFieldSlotProps
550
563
  } = _ref2,
551
- baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded20);
564
+ baseTextFieldRest = _objectWithoutPropertiesLoose(_ref2, _excluded21);
552
565
  return /*#__PURE__*/_jsx(MUITextField, _extends({}, inputRest, {
553
566
  label: label,
554
567
  placeholder: placeholder
@@ -575,7 +588,7 @@ function transformInputProps(props, wrapAdornments = true) {
575
588
  slotProps,
576
589
  material
577
590
  } = props,
578
- other = _objectWithoutPropertiesLoose(props, _excluded21);
591
+ other = _objectWithoutPropertiesLoose(props, _excluded22);
579
592
  const result = other;
580
593
  if (wrapAdornments) {
581
594
  if (result.startAdornment) {
@@ -609,7 +622,7 @@ const BaseTextarea = forwardRef(function BaseTextarea(props, ref) {
609
622
  const {
610
623
  material
611
624
  } = props,
612
- other = _objectWithoutPropertiesLoose(props, _excluded22);
625
+ other = _objectWithoutPropertiesLoose(props, _excluded23);
613
626
  return /*#__PURE__*/_jsx(MUITextareaAutosize, _extends({}, other, material, {
614
627
  ref: ref
615
628
  }));
@@ -634,7 +647,7 @@ function BasePopper(props) {
634
647
  placement,
635
648
  material
636
649
  } = props,
637
- other = _objectWithoutPropertiesLoose(props, _excluded23);
650
+ other = _objectWithoutPropertiesLoose(props, _excluded24);
638
651
  const modifiers = React.useMemo(() => {
639
652
  const result = [{
640
653
  name: 'preventOverflow',
@@ -729,7 +742,7 @@ function BaseSelectOption(_ref3) {
729
742
  let {
730
743
  native
731
744
  } = _ref3,
732
- props = _objectWithoutPropertiesLoose(_ref3, _excluded24);
745
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded25);
733
746
  if (native) {
734
747
  return /*#__PURE__*/_jsx("option", _extends({}, props));
735
748
  }
@@ -764,7 +777,7 @@ function TabPanel(props) {
764
777
  children,
765
778
  active
766
779
  } = props,
767
- other = _objectWithoutPropertiesLoose(props, _excluded25);
780
+ other = _objectWithoutPropertiesLoose(props, _excluded26);
768
781
  return /*#__PURE__*/_jsx(StyledTabPanel, _extends({
769
782
  role: "tabpanel",
770
783
  style: {
@@ -780,7 +793,7 @@ function BaseTabs(_ref4) {
780
793
  value,
781
794
  material
782
795
  } = _ref4,
783
- props = _objectWithoutPropertiesLoose(_ref4, _excluded26);
796
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded27);
784
797
  const id = useId();
785
798
  const labelId = `${id}-tab-${value}`;
786
799
  const panelId = `${id}-tabpanel-${value}`;
@@ -860,6 +873,7 @@ const baseSlots = {
860
873
  baseLinearProgress: BaseLinearProgress,
861
874
  baseMenuList: BaseMenuList,
862
875
  baseMenuItem: BaseMenuItem,
876
+ baseModal: BaseModal,
863
877
  baseTextField: BaseTextField,
864
878
  baseButton: BaseButton,
865
879
  baseIconButton: BaseIconButton,
@@ -75,7 +75,8 @@ function transformTheme(t) {
75
75
  [k.shadows.base]: (t.vars || t).shadows[2],
76
76
  [k.shadows.overlay]: (t.vars || t).shadows[8],
77
77
  [k.zIndex.panel]: (t.vars || t).zIndex.modal,
78
- [k.zIndex.menu]: (t.vars || t).zIndex.modal
78
+ [k.zIndex.menu]: (t.vars || t).zIndex.modal,
79
+ [k.zIndex.modal]: (t.vars || t).zIndex.modal
79
80
  };
80
81
  }
81
82
  function getRadius(theme) {
@@ -68,7 +68,8 @@ function transformTheme(t) {
68
68
  [k.shadows.base]: (t.vars || t).shadows[2],
69
69
  [k.shadows.overlay]: (t.vars || t).shadows[8],
70
70
  [k.zIndex.panel]: (t.vars || t).zIndex.modal,
71
- [k.zIndex.menu]: (t.vars || t).zIndex.modal
71
+ [k.zIndex.menu]: (t.vars || t).zIndex.modal,
72
+ [k.zIndex.modal]: (t.vars || t).zIndex.modal
72
73
  };
73
74
  }
74
75
  function getRadius(theme) {