@redsift/table 12.5.0 → 12.5.1-muiv6-alpha.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.
@@ -1,17 +1,1289 @@
1
- import { _ as _objectSpread2, a as _objectWithoutProperties, b as _extends } from './_rollupPluginBabelHelpers.js';
1
+ import { _ as _objectSpread2, a as _objectWithoutProperties, b as _extends$1 } from './_rollupPluginBabelHelpers.js';
2
2
  import * as React from 'react';
3
- import React__default, { useCallback, useEffect, useRef, useMemo, forwardRef, useState } from 'react';
4
- import { createTheme, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
3
+ import React__default, { useCallback, useEffect, useMemo, forwardRef, useRef, useState } from 'react';
5
4
  import classNames from 'classnames';
6
- import { LicenseInfo } from '@mui/x-license';
7
- import { Icon, useTheme, RedsiftColorBlueN, RedsiftColorNeutralXDarkGrey, RedsiftColorNeutralWhite, ThemeProvider } from '@redsift/design-system';
8
- import { getGridNumericOperators as getGridNumericOperators$1, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, getGridStringOperators as getGridStringOperators$1, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators, GridLogicOperator, useGridApiRef, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector, DataGridPremium } from '@mui/x-data-grid-premium';
9
- import { u as useControlledDatagridState, S as StyledDataGrid } from './useControlledDatagridState.js';
10
- import Box from '@mui/material/Box';
11
- import TextField from '@mui/material/TextField';
5
+ import { Icon, useTheme as useTheme$1, ThemeProvider, RedsiftColorBlueN, RedsiftColorNeutralXDarkGrey, RedsiftColorNeutralWhite } from '@redsift/design-system';
6
+ import { getGridNumericOperators as getGridNumericOperators$1, GridFilterInputValue, GridFilterInputSingleSelect, GridFilterInputMultipleValue, GridFilterInputMultipleSingleSelect, getGridStringOperators as getGridStringOperators$1, getGridBooleanOperators, getGridDateOperators, getGridSingleSelectOperators, GridLogicOperator, useGridApiRef, gridPaginatedVisibleSortedGridRowEntriesSelector, gridPaginatedVisibleSortedGridRowIdsSelector, gridFilteredSortedRowEntriesSelector, gridFilteredSortedRowIdsSelector, DataGridPro } from '@mui/x-data-grid-pro';
7
+ import { L as LicenseInfo, u as useControlledDatagridState, T as ThemeProvider$1, S as StyledDataGrid } from './useControlledDatagridState.js';
12
8
  import { mdiSync } from '@redsift/icons';
13
- import { n as normalizeRowSelectionModel, o as onServerSideSelectionStatusChange, g as getSelectionCount, i as isRowSelected, S as ServerSideControlledPagination, C as ControlledPagination } from './ServerSideControlledPagination.js';
14
- import { B as BaseButton, a as BaseCheckbox, c as BaseIconButton, b as BaseIcon } from './BaseIconButton.js';
9
+ import { _ as _objectWithoutPropertiesLoose, a as _extends, d as defaultSxConfig, i as isPlainObject, s as styled, b as styleFunctionSx, u as useTheme, c as clsx, e as createTheme, T as THEME_ID, C as ClassNameGenerator, P as PropTypes, g as generateUtilityClasses, f as generateUtilityClass, h as styled$1, j as useThemeProps, k as capitalize, l as composeClasses, r as rootShouldForwardProp, m as refType } from './Portal.js';
10
+ import { j as jsxRuntimeExports } from './jsx-runtime.js';
11
+ import { u as useFormControl, a as formControlState, i as isAdornedStart, b as isFilled, F as FormControlContext, c as useId, d as Select, I as Input, e as FilledInput, O as OutlinedInput, o as onServerSideSelectionStatusChange, S as ServerSideControlledPagination, C as ControlledPagination } from './ControlledPagination.js';
12
+ import { T as Toolbar } from './Toolbar2.js';
13
+ import { B as BaseButton, a as BaseCheckbox, c as BasePopper, b as BaseIcon } from './BasePopper.js';
14
+ import { T as ToolbarWrapper } from './ToolbarWrapper2.js';
15
+
16
+ function isMuiElement(element, muiNames) {
17
+ return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;
18
+ }
19
+
20
+ const _excluded$7 = ["sx"];
21
+ const splitProps = props => {
22
+ var _props$theme$unstable, _props$theme;
23
+ const result = {
24
+ systemProps: {},
25
+ otherProps: {}
26
+ };
27
+ const config = (_props$theme$unstable = props == null ? void 0 : (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig;
28
+ Object.keys(props).forEach(prop => {
29
+ if (config[prop]) {
30
+ result.systemProps[prop] = props[prop];
31
+ } else {
32
+ result.otherProps[prop] = props[prop];
33
+ }
34
+ });
35
+ return result;
36
+ };
37
+ function extendSxProp(props) {
38
+ const {
39
+ sx: inSx
40
+ } = props,
41
+ other = _objectWithoutPropertiesLoose(props, _excluded$7);
42
+ const {
43
+ systemProps,
44
+ otherProps
45
+ } = splitProps(other);
46
+ let finalSx;
47
+ if (Array.isArray(inSx)) {
48
+ finalSx = [systemProps, ...inSx];
49
+ } else if (typeof inSx === 'function') {
50
+ finalSx = (...args) => {
51
+ const result = inSx(...args);
52
+ if (!isPlainObject(result)) {
53
+ return systemProps;
54
+ }
55
+ return _extends({}, systemProps, result);
56
+ };
57
+ } else {
58
+ finalSx = _extends({}, systemProps, inSx);
59
+ }
60
+ return _extends({}, otherProps, {
61
+ sx: finalSx
62
+ });
63
+ }
64
+
65
+ const _excluded$6 = ["className", "component"];
66
+ function createBox(options = {}) {
67
+ const {
68
+ themeId,
69
+ defaultTheme,
70
+ defaultClassName = 'MuiBox-root',
71
+ generateClassName
72
+ } = options;
73
+ const BoxRoot = styled('div', {
74
+ shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'
75
+ })(styleFunctionSx);
76
+ const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {
77
+ const theme = useTheme(defaultTheme);
78
+ const _extendSxProp = extendSxProp(inProps),
79
+ {
80
+ className,
81
+ component = 'div'
82
+ } = _extendSxProp,
83
+ other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$6);
84
+ return /*#__PURE__*/jsxRuntimeExports.jsx(BoxRoot, _extends({
85
+ as: component,
86
+ ref: ref,
87
+ className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
88
+ theme: themeId ? theme[themeId] || theme : theme
89
+ }, other));
90
+ });
91
+ return Box;
92
+ }
93
+
94
+ const defaultTheme = createTheme();
95
+ const Box = createBox({
96
+ themeId: THEME_ID,
97
+ defaultTheme,
98
+ defaultClassName: 'MuiBox-root',
99
+ generateClassName: ClassNameGenerator.generate
100
+ });
101
+ process.env.NODE_ENV !== "production" ? Box.propTypes /* remove-proptypes */ = {
102
+ // ----------------------------- Warning --------------------------------
103
+ // | These PropTypes are generated from the TypeScript type definitions |
104
+ // | To update them edit the d.ts file and run "yarn proptypes" |
105
+ // ----------------------------------------------------------------------
106
+ /**
107
+ * @ignore
108
+ */
109
+ children: PropTypes.node,
110
+ /**
111
+ * The component used for the root node.
112
+ * Either a string to use a HTML element or a component.
113
+ */
114
+ component: PropTypes.elementType,
115
+ /**
116
+ * The system prop that allows defining system overrides as well as additional CSS styles.
117
+ */
118
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
119
+ } : void 0;
120
+ var Box$1 = Box;
121
+
122
+ function getFormLabelUtilityClasses(slot) {
123
+ return generateUtilityClass('MuiFormLabel', slot);
124
+ }
125
+ const formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);
126
+ var formLabelClasses$1 = formLabelClasses;
127
+
128
+ const _excluded$5 = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"];
129
+ const useUtilityClasses$4 = ownerState => {
130
+ const {
131
+ classes,
132
+ color,
133
+ focused,
134
+ disabled,
135
+ error,
136
+ filled,
137
+ required
138
+ } = ownerState;
139
+ const slots = {
140
+ root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', filled && 'filled', focused && 'focused', required && 'required'],
141
+ asterisk: ['asterisk', error && 'error']
142
+ };
143
+ return composeClasses(slots, getFormLabelUtilityClasses, classes);
144
+ };
145
+ const FormLabelRoot = styled$1('label', {
146
+ name: 'MuiFormLabel',
147
+ slot: 'Root',
148
+ overridesResolver: ({
149
+ ownerState
150
+ }, styles) => {
151
+ return _extends({}, styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled);
152
+ }
153
+ })(({
154
+ theme,
155
+ ownerState
156
+ }) => _extends({
157
+ color: (theme.vars || theme).palette.text.secondary
158
+ }, theme.typography.body1, {
159
+ lineHeight: '1.4375em',
160
+ padding: 0,
161
+ position: 'relative',
162
+ [`&.${formLabelClasses$1.focused}`]: {
163
+ color: (theme.vars || theme).palette[ownerState.color].main
164
+ },
165
+ [`&.${formLabelClasses$1.disabled}`]: {
166
+ color: (theme.vars || theme).palette.text.disabled
167
+ },
168
+ [`&.${formLabelClasses$1.error}`]: {
169
+ color: (theme.vars || theme).palette.error.main
170
+ }
171
+ }));
172
+ const AsteriskComponent = styled$1('span', {
173
+ name: 'MuiFormLabel',
174
+ slot: 'Asterisk',
175
+ overridesResolver: (props, styles) => styles.asterisk
176
+ })(({
177
+ theme
178
+ }) => ({
179
+ [`&.${formLabelClasses$1.error}`]: {
180
+ color: (theme.vars || theme).palette.error.main
181
+ }
182
+ }));
183
+ const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {
184
+ const props = useThemeProps({
185
+ props: inProps,
186
+ name: 'MuiFormLabel'
187
+ });
188
+ const {
189
+ children,
190
+ className,
191
+ component = 'label'
192
+ } = props,
193
+ other = _objectWithoutPropertiesLoose(props, _excluded$5);
194
+ const muiFormControl = useFormControl();
195
+ const fcs = formControlState({
196
+ props,
197
+ muiFormControl,
198
+ states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']
199
+ });
200
+ const ownerState = _extends({}, props, {
201
+ color: fcs.color || 'primary',
202
+ component,
203
+ disabled: fcs.disabled,
204
+ error: fcs.error,
205
+ filled: fcs.filled,
206
+ focused: fcs.focused,
207
+ required: fcs.required
208
+ });
209
+ const classes = useUtilityClasses$4(ownerState);
210
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabelRoot, _extends({
211
+ as: component,
212
+ ownerState: ownerState,
213
+ className: clsx(classes.root, className),
214
+ ref: ref
215
+ }, other, {
216
+ children: [children, fcs.required && /*#__PURE__*/jsxRuntimeExports.jsxs(AsteriskComponent, {
217
+ ownerState: ownerState,
218
+ "aria-hidden": true,
219
+ className: classes.asterisk,
220
+ children: ["\u2009", '*']
221
+ })]
222
+ }));
223
+ });
224
+ process.env.NODE_ENV !== "production" ? FormLabel.propTypes /* remove-proptypes */ = {
225
+ // ----------------------------- Warning --------------------------------
226
+ // | These PropTypes are generated from the TypeScript type definitions |
227
+ // | To update them edit the d.ts file and run "yarn proptypes" |
228
+ // ----------------------------------------------------------------------
229
+ /**
230
+ * The content of the component.
231
+ */
232
+ children: PropTypes.node,
233
+ /**
234
+ * Override or extend the styles applied to the component.
235
+ */
236
+ classes: PropTypes.object,
237
+ /**
238
+ * @ignore
239
+ */
240
+ className: PropTypes.string,
241
+ /**
242
+ * The color of the component.
243
+ * It supports both default and custom theme colors, which can be added as shown in the
244
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
245
+ */
246
+ color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
247
+ /**
248
+ * The component used for the root node.
249
+ * Either a string to use a HTML element or a component.
250
+ */
251
+ component: PropTypes.elementType,
252
+ /**
253
+ * If `true`, the label should be displayed in a disabled state.
254
+ */
255
+ disabled: PropTypes.bool,
256
+ /**
257
+ * If `true`, the label is displayed in an error state.
258
+ */
259
+ error: PropTypes.bool,
260
+ /**
261
+ * If `true`, the label should use filled classes key.
262
+ */
263
+ filled: PropTypes.bool,
264
+ /**
265
+ * If `true`, the input of this label is focused (used by `FormGroup` components).
266
+ */
267
+ focused: PropTypes.bool,
268
+ /**
269
+ * If `true`, the label will indicate that the `input` is required.
270
+ */
271
+ required: PropTypes.bool,
272
+ /**
273
+ * The system prop that allows defining system overrides as well as additional CSS styles.
274
+ */
275
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
276
+ } : void 0;
277
+ var FormLabel$1 = FormLabel;
278
+
279
+ function getInputLabelUtilityClasses(slot) {
280
+ return generateUtilityClass('MuiInputLabel', slot);
281
+ }
282
+ generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);
283
+
284
+ const _excluded$4 = ["disableAnimation", "margin", "shrink", "variant", "className"];
285
+ const useUtilityClasses$3 = ownerState => {
286
+ const {
287
+ classes,
288
+ formControl,
289
+ size,
290
+ shrink,
291
+ disableAnimation,
292
+ variant,
293
+ required
294
+ } = ownerState;
295
+ const slots = {
296
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size === 'small' && 'sizeSmall', variant],
297
+ asterisk: [required && 'asterisk']
298
+ };
299
+ const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
300
+ return _extends({}, classes, composedClasses);
301
+ };
302
+ const InputLabelRoot = styled$1(FormLabel$1, {
303
+ shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
304
+ name: 'MuiInputLabel',
305
+ slot: 'Root',
306
+ overridesResolver: (props, styles) => {
307
+ const {
308
+ ownerState
309
+ } = props;
310
+ return [{
311
+ [`& .${formLabelClasses$1.asterisk}`]: styles.asterisk
312
+ }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, styles[ownerState.variant]];
313
+ }
314
+ })(({
315
+ theme,
316
+ ownerState
317
+ }) => _extends({
318
+ display: 'block',
319
+ transformOrigin: 'top left',
320
+ whiteSpace: 'nowrap',
321
+ overflow: 'hidden',
322
+ textOverflow: 'ellipsis',
323
+ maxWidth: '100%'
324
+ }, ownerState.formControl && {
325
+ position: 'absolute',
326
+ left: 0,
327
+ top: 0,
328
+ // slight alteration to spec spacing to match visual spec result
329
+ transform: 'translate(0, 20px) scale(1)'
330
+ }, ownerState.size === 'small' && {
331
+ // Compensation for the `Input.inputSizeSmall` style.
332
+ transform: 'translate(0, 17px) scale(1)'
333
+ }, ownerState.shrink && {
334
+ transform: 'translate(0, -1.5px) scale(0.75)',
335
+ transformOrigin: 'top left',
336
+ maxWidth: '133%'
337
+ }, !ownerState.disableAnimation && {
338
+ transition: theme.transitions.create(['color', 'transform', 'max-width'], {
339
+ duration: theme.transitions.duration.shorter,
340
+ easing: theme.transitions.easing.easeOut
341
+ })
342
+ }, ownerState.variant === 'filled' && _extends({
343
+ // Chrome's autofill feature gives the input field a yellow background.
344
+ // Since the input field is behind the label in the HTML tree,
345
+ // the input field is drawn last and hides the label with an opaque background color.
346
+ // zIndex: 1 will raise the label above opaque background-colors of input.
347
+ zIndex: 1,
348
+ pointerEvents: 'none',
349
+ transform: 'translate(12px, 16px) scale(1)',
350
+ maxWidth: 'calc(100% - 24px)'
351
+ }, ownerState.size === 'small' && {
352
+ transform: 'translate(12px, 13px) scale(1)'
353
+ }, ownerState.shrink && _extends({
354
+ userSelect: 'none',
355
+ pointerEvents: 'auto',
356
+ transform: 'translate(12px, 7px) scale(0.75)',
357
+ maxWidth: 'calc(133% - 24px)'
358
+ }, ownerState.size === 'small' && {
359
+ transform: 'translate(12px, 4px) scale(0.75)'
360
+ })), ownerState.variant === 'outlined' && _extends({
361
+ // see comment above on filled.zIndex
362
+ zIndex: 1,
363
+ pointerEvents: 'none',
364
+ transform: 'translate(14px, 16px) scale(1)',
365
+ maxWidth: 'calc(100% - 24px)'
366
+ }, ownerState.size === 'small' && {
367
+ transform: 'translate(14px, 9px) scale(1)'
368
+ }, ownerState.shrink && {
369
+ userSelect: 'none',
370
+ pointerEvents: 'auto',
371
+ // Theoretically, we should have (8+5)*2/0.75 = 34px
372
+ // but it feels a better when it bleeds a bit on the left, so 32px.
373
+ maxWidth: 'calc(133% - 32px)',
374
+ transform: 'translate(14px, -9px) scale(0.75)'
375
+ })));
376
+ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {
377
+ const props = useThemeProps({
378
+ name: 'MuiInputLabel',
379
+ props: inProps
380
+ });
381
+ const {
382
+ disableAnimation = false,
383
+ shrink: shrinkProp,
384
+ className
385
+ } = props,
386
+ other = _objectWithoutPropertiesLoose(props, _excluded$4);
387
+ const muiFormControl = useFormControl();
388
+ let shrink = shrinkProp;
389
+ if (typeof shrink === 'undefined' && muiFormControl) {
390
+ shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;
391
+ }
392
+ const fcs = formControlState({
393
+ props,
394
+ muiFormControl,
395
+ states: ['size', 'variant', 'required']
396
+ });
397
+ const ownerState = _extends({}, props, {
398
+ disableAnimation,
399
+ formControl: muiFormControl,
400
+ shrink,
401
+ size: fcs.size,
402
+ variant: fcs.variant,
403
+ required: fcs.required
404
+ });
405
+ const classes = useUtilityClasses$3(ownerState);
406
+ return /*#__PURE__*/jsxRuntimeExports.jsx(InputLabelRoot, _extends({
407
+ "data-shrink": shrink,
408
+ ownerState: ownerState,
409
+ ref: ref,
410
+ className: clsx(classes.root, className)
411
+ }, other, {
412
+ classes: classes
413
+ }));
414
+ });
415
+ process.env.NODE_ENV !== "production" ? InputLabel.propTypes /* remove-proptypes */ = {
416
+ // ----------------------------- Warning --------------------------------
417
+ // | These PropTypes are generated from the TypeScript type definitions |
418
+ // | To update them edit the d.ts file and run "yarn proptypes" |
419
+ // ----------------------------------------------------------------------
420
+ /**
421
+ * The content of the component.
422
+ */
423
+ children: PropTypes.node,
424
+ /**
425
+ * Override or extend the styles applied to the component.
426
+ */
427
+ classes: PropTypes.object,
428
+ /**
429
+ * @ignore
430
+ */
431
+ className: PropTypes.string,
432
+ /**
433
+ * The color of the component.
434
+ * It supports both default and custom theme colors, which can be added as shown in the
435
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
436
+ */
437
+ color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),
438
+ /**
439
+ * If `true`, the transition animation is disabled.
440
+ * @default false
441
+ */
442
+ disableAnimation: PropTypes.bool,
443
+ /**
444
+ * If `true`, the component is disabled.
445
+ */
446
+ disabled: PropTypes.bool,
447
+ /**
448
+ * If `true`, the label is displayed in an error state.
449
+ */
450
+ error: PropTypes.bool,
451
+ /**
452
+ * If `true`, the `input` of this label is focused.
453
+ */
454
+ focused: PropTypes.bool,
455
+ /**
456
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
457
+ * FormControl.
458
+ */
459
+ margin: PropTypes.oneOf(['dense']),
460
+ /**
461
+ * if `true`, the label will indicate that the `input` is required.
462
+ */
463
+ required: PropTypes.bool,
464
+ /**
465
+ * If `true`, the label is shrunk.
466
+ */
467
+ shrink: PropTypes.bool,
468
+ /**
469
+ * The size of the component.
470
+ * @default 'normal'
471
+ */
472
+ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]),
473
+ /**
474
+ * The system prop that allows defining system overrides as well as additional CSS styles.
475
+ */
476
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
477
+ /**
478
+ * The variant to use.
479
+ */
480
+ variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
481
+ } : void 0;
482
+ var InputLabel$1 = InputLabel;
483
+
484
+ function getFormControlUtilityClasses(slot) {
485
+ return generateUtilityClass('MuiFormControl', slot);
486
+ }
487
+ generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);
488
+
489
+ const _excluded$3 = ["children", "className", "color", "component", "disabled", "error", "focused", "fullWidth", "hiddenLabel", "margin", "required", "size", "variant"];
490
+ const useUtilityClasses$2 = ownerState => {
491
+ const {
492
+ classes,
493
+ margin,
494
+ fullWidth
495
+ } = ownerState;
496
+ const slots = {
497
+ root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']
498
+ };
499
+ return composeClasses(slots, getFormControlUtilityClasses, classes);
500
+ };
501
+ const FormControlRoot = styled$1('div', {
502
+ name: 'MuiFormControl',
503
+ slot: 'Root',
504
+ overridesResolver: ({
505
+ ownerState
506
+ }, styles) => {
507
+ return _extends({}, styles.root, styles[`margin${capitalize(ownerState.margin)}`], ownerState.fullWidth && styles.fullWidth);
508
+ }
509
+ })(({
510
+ ownerState
511
+ }) => _extends({
512
+ display: 'inline-flex',
513
+ flexDirection: 'column',
514
+ position: 'relative',
515
+ // Reset fieldset default style.
516
+ minWidth: 0,
517
+ padding: 0,
518
+ margin: 0,
519
+ border: 0,
520
+ verticalAlign: 'top'
521
+ }, ownerState.margin === 'normal' && {
522
+ marginTop: 16,
523
+ marginBottom: 8
524
+ }, ownerState.margin === 'dense' && {
525
+ marginTop: 8,
526
+ marginBottom: 4
527
+ }, ownerState.fullWidth && {
528
+ width: '100%'
529
+ }));
530
+
531
+ /**
532
+ * Provides context such as filled/focused/error/required for form inputs.
533
+ * Relying on the context provides high flexibility and ensures that the state always stays
534
+ * consistent across the children of the `FormControl`.
535
+ * This context is used by the following components:
536
+ *
537
+ * - FormLabel
538
+ * - FormHelperText
539
+ * - Input
540
+ * - InputLabel
541
+ *
542
+ * You can find one composition example below and more going to [the demos](/material-ui/react-text-field/#components).
543
+ *
544
+ * ```jsx
545
+ * <FormControl>
546
+ * <InputLabel htmlFor="my-input">Email address</InputLabel>
547
+ * <Input id="my-input" aria-describedby="my-helper-text" />
548
+ * <FormHelperText id="my-helper-text">We'll never share your email.</FormHelperText>
549
+ * </FormControl>
550
+ * ```
551
+ *
552
+ * ⚠️ Only one `InputBase` can be used within a FormControl because it creates visual inconsistencies.
553
+ * For instance, only one input can be focused at the same time, the state shouldn't be shared.
554
+ */
555
+ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {
556
+ const props = useThemeProps({
557
+ props: inProps,
558
+ name: 'MuiFormControl'
559
+ });
560
+ const {
561
+ children,
562
+ className,
563
+ color = 'primary',
564
+ component = 'div',
565
+ disabled = false,
566
+ error = false,
567
+ focused: visuallyFocused,
568
+ fullWidth = false,
569
+ hiddenLabel = false,
570
+ margin = 'none',
571
+ required = false,
572
+ size = 'medium',
573
+ variant = 'outlined'
574
+ } = props,
575
+ other = _objectWithoutPropertiesLoose(props, _excluded$3);
576
+ const ownerState = _extends({}, props, {
577
+ color,
578
+ component,
579
+ disabled,
580
+ error,
581
+ fullWidth,
582
+ hiddenLabel,
583
+ margin,
584
+ required,
585
+ size,
586
+ variant
587
+ });
588
+ const classes = useUtilityClasses$2(ownerState);
589
+ const [adornedStart, setAdornedStart] = React.useState(() => {
590
+ // We need to iterate through the children and find the Input in order
591
+ // to fully support server-side rendering.
592
+ let initialAdornedStart = false;
593
+ if (children) {
594
+ React.Children.forEach(children, child => {
595
+ if (!isMuiElement(child, ['Input', 'Select'])) {
596
+ return;
597
+ }
598
+ const input = isMuiElement(child, ['Select']) ? child.props.input : child;
599
+ if (input && isAdornedStart(input.props)) {
600
+ initialAdornedStart = true;
601
+ }
602
+ });
603
+ }
604
+ return initialAdornedStart;
605
+ });
606
+ const [filled, setFilled] = React.useState(() => {
607
+ // We need to iterate through the children and find the Input in order
608
+ // to fully support server-side rendering.
609
+ let initialFilled = false;
610
+ if (children) {
611
+ React.Children.forEach(children, child => {
612
+ if (!isMuiElement(child, ['Input', 'Select'])) {
613
+ return;
614
+ }
615
+ if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {
616
+ initialFilled = true;
617
+ }
618
+ });
619
+ }
620
+ return initialFilled;
621
+ });
622
+ const [focusedState, setFocused] = React.useState(false);
623
+ if (disabled && focusedState) {
624
+ setFocused(false);
625
+ }
626
+ const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;
627
+ let registerEffect;
628
+ if (process.env.NODE_ENV !== 'production') {
629
+ // eslint-disable-next-line react-hooks/rules-of-hooks
630
+ const registeredInput = React.useRef(false);
631
+ registerEffect = () => {
632
+ if (registeredInput.current) {
633
+ console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\n'));
634
+ }
635
+ registeredInput.current = true;
636
+ return () => {
637
+ registeredInput.current = false;
638
+ };
639
+ };
640
+ }
641
+ const childContext = React.useMemo(() => {
642
+ return {
643
+ adornedStart,
644
+ setAdornedStart,
645
+ color,
646
+ disabled,
647
+ error,
648
+ filled,
649
+ focused,
650
+ fullWidth,
651
+ hiddenLabel,
652
+ size,
653
+ onBlur: () => {
654
+ setFocused(false);
655
+ },
656
+ onEmpty: () => {
657
+ setFilled(false);
658
+ },
659
+ onFilled: () => {
660
+ setFilled(true);
661
+ },
662
+ onFocus: () => {
663
+ setFocused(true);
664
+ },
665
+ registerEffect,
666
+ required,
667
+ variant
668
+ };
669
+ }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);
670
+ return /*#__PURE__*/jsxRuntimeExports.jsx(FormControlContext.Provider, {
671
+ value: childContext,
672
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(FormControlRoot, _extends({
673
+ as: component,
674
+ ownerState: ownerState,
675
+ className: clsx(classes.root, className),
676
+ ref: ref
677
+ }, other, {
678
+ children: children
679
+ }))
680
+ });
681
+ });
682
+ process.env.NODE_ENV !== "production" ? FormControl.propTypes /* remove-proptypes */ = {
683
+ // ----------------------------- Warning --------------------------------
684
+ // | These PropTypes are generated from the TypeScript type definitions |
685
+ // | To update them edit the d.ts file and run "yarn proptypes" |
686
+ // ----------------------------------------------------------------------
687
+ /**
688
+ * The content of the component.
689
+ */
690
+ children: PropTypes.node,
691
+ /**
692
+ * Override or extend the styles applied to the component.
693
+ */
694
+ classes: PropTypes.object,
695
+ /**
696
+ * @ignore
697
+ */
698
+ className: PropTypes.string,
699
+ /**
700
+ * The color of the component.
701
+ * It supports both default and custom theme colors, which can be added as shown in the
702
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
703
+ * @default 'primary'
704
+ */
705
+ color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
706
+ /**
707
+ * The component used for the root node.
708
+ * Either a string to use a HTML element or a component.
709
+ */
710
+ component: PropTypes.elementType,
711
+ /**
712
+ * If `true`, the label, input and helper text should be displayed in a disabled state.
713
+ * @default false
714
+ */
715
+ disabled: PropTypes.bool,
716
+ /**
717
+ * If `true`, the label is displayed in an error state.
718
+ * @default false
719
+ */
720
+ error: PropTypes.bool,
721
+ /**
722
+ * If `true`, the component is displayed in focused state.
723
+ */
724
+ focused: PropTypes.bool,
725
+ /**
726
+ * If `true`, the component will take up the full width of its container.
727
+ * @default false
728
+ */
729
+ fullWidth: PropTypes.bool,
730
+ /**
731
+ * If `true`, the label is hidden.
732
+ * This is used to increase density for a `FilledInput`.
733
+ * Be sure to add `aria-label` to the `input` element.
734
+ * @default false
735
+ */
736
+ hiddenLabel: PropTypes.bool,
737
+ /**
738
+ * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
739
+ * @default 'none'
740
+ */
741
+ margin: PropTypes.oneOf(['dense', 'none', 'normal']),
742
+ /**
743
+ * If `true`, the label will indicate that the `input` is required.
744
+ * @default false
745
+ */
746
+ required: PropTypes.bool,
747
+ /**
748
+ * The size of the component.
749
+ * @default 'medium'
750
+ */
751
+ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
752
+ /**
753
+ * The system prop that allows defining system overrides as well as additional CSS styles.
754
+ */
755
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
756
+ /**
757
+ * The variant to use.
758
+ * @default 'outlined'
759
+ */
760
+ variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
761
+ } : void 0;
762
+ var FormControl$1 = FormControl;
763
+
764
+ function getFormHelperTextUtilityClasses(slot) {
765
+ return generateUtilityClass('MuiFormHelperText', slot);
766
+ }
767
+ const formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root', 'error', 'disabled', 'sizeSmall', 'sizeMedium', 'contained', 'focused', 'filled', 'required']);
768
+ var formHelperTextClasses$1 = formHelperTextClasses;
769
+
770
+ var _span;
771
+ const _excluded$2 = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
772
+ const useUtilityClasses$1 = ownerState => {
773
+ const {
774
+ classes,
775
+ contained,
776
+ size,
777
+ disabled,
778
+ error,
779
+ filled,
780
+ focused,
781
+ required
782
+ } = ownerState;
783
+ const slots = {
784
+ root: ['root', disabled && 'disabled', error && 'error', size && `size${capitalize(size)}`, contained && 'contained', focused && 'focused', filled && 'filled', required && 'required']
785
+ };
786
+ return composeClasses(slots, getFormHelperTextUtilityClasses, classes);
787
+ };
788
+ const FormHelperTextRoot = styled$1('p', {
789
+ name: 'MuiFormHelperText',
790
+ slot: 'Root',
791
+ overridesResolver: (props, styles) => {
792
+ const {
793
+ ownerState
794
+ } = props;
795
+ return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];
796
+ }
797
+ })(({
798
+ theme,
799
+ ownerState
800
+ }) => _extends({
801
+ color: (theme.vars || theme).palette.text.secondary
802
+ }, theme.typography.caption, {
803
+ textAlign: 'left',
804
+ marginTop: 3,
805
+ marginRight: 0,
806
+ marginBottom: 0,
807
+ marginLeft: 0,
808
+ [`&.${formHelperTextClasses$1.disabled}`]: {
809
+ color: (theme.vars || theme).palette.text.disabled
810
+ },
811
+ [`&.${formHelperTextClasses$1.error}`]: {
812
+ color: (theme.vars || theme).palette.error.main
813
+ }
814
+ }, ownerState.size === 'small' && {
815
+ marginTop: 4
816
+ }, ownerState.contained && {
817
+ marginLeft: 14,
818
+ marginRight: 14
819
+ }));
820
+ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {
821
+ const props = useThemeProps({
822
+ props: inProps,
823
+ name: 'MuiFormHelperText'
824
+ });
825
+ const {
826
+ children,
827
+ className,
828
+ component = 'p'
829
+ } = props,
830
+ other = _objectWithoutPropertiesLoose(props, _excluded$2);
831
+ const muiFormControl = useFormControl();
832
+ const fcs = formControlState({
833
+ props,
834
+ muiFormControl,
835
+ states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']
836
+ });
837
+ const ownerState = _extends({}, props, {
838
+ component,
839
+ contained: fcs.variant === 'filled' || fcs.variant === 'outlined',
840
+ variant: fcs.variant,
841
+ size: fcs.size,
842
+ disabled: fcs.disabled,
843
+ error: fcs.error,
844
+ filled: fcs.filled,
845
+ focused: fcs.focused,
846
+ required: fcs.required
847
+ });
848
+ const classes = useUtilityClasses$1(ownerState);
849
+ return /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperTextRoot, _extends({
850
+ as: component,
851
+ ownerState: ownerState,
852
+ className: clsx(classes.root, className),
853
+ ref: ref
854
+ }, other, {
855
+ children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue
856
+ _span || (_span = /*#__PURE__*/jsxRuntimeExports.jsx("span", {
857
+ className: "notranslate",
858
+ children: "\u200B"
859
+ })) : children
860
+ }));
861
+ });
862
+ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes /* remove-proptypes */ = {
863
+ // ----------------------------- Warning --------------------------------
864
+ // | These PropTypes are generated from the TypeScript type definitions |
865
+ // | To update them edit the d.ts file and run "yarn proptypes" |
866
+ // ----------------------------------------------------------------------
867
+ /**
868
+ * The content of the component.
869
+ *
870
+ * If `' '` is provided, the component reserves one line height for displaying a future message.
871
+ */
872
+ children: PropTypes.node,
873
+ /**
874
+ * Override or extend the styles applied to the component.
875
+ */
876
+ classes: PropTypes.object,
877
+ /**
878
+ * @ignore
879
+ */
880
+ className: PropTypes.string,
881
+ /**
882
+ * The component used for the root node.
883
+ * Either a string to use a HTML element or a component.
884
+ */
885
+ component: PropTypes.elementType,
886
+ /**
887
+ * If `true`, the helper text should be displayed in a disabled state.
888
+ */
889
+ disabled: PropTypes.bool,
890
+ /**
891
+ * If `true`, helper text should be displayed in an error state.
892
+ */
893
+ error: PropTypes.bool,
894
+ /**
895
+ * If `true`, the helper text should use filled classes key.
896
+ */
897
+ filled: PropTypes.bool,
898
+ /**
899
+ * If `true`, the helper text should use focused classes key.
900
+ */
901
+ focused: PropTypes.bool,
902
+ /**
903
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
904
+ * FormControl.
905
+ */
906
+ margin: PropTypes.oneOf(['dense']),
907
+ /**
908
+ * If `true`, the helper text should use required classes key.
909
+ */
910
+ required: PropTypes.bool,
911
+ /**
912
+ * The system prop that allows defining system overrides as well as additional CSS styles.
913
+ */
914
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
915
+ /**
916
+ * The variant to use.
917
+ */
918
+ variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
919
+ } : void 0;
920
+ var FormHelperText$1 = FormHelperText;
921
+
922
+ function getTextFieldUtilityClass(slot) {
923
+ return generateUtilityClass('MuiTextField', slot);
924
+ }
925
+ generateUtilityClasses('MuiTextField', ['root']);
926
+
927
+ const _excluded$1 = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"];
928
+ const variantComponent = {
929
+ standard: Input,
930
+ filled: FilledInput,
931
+ outlined: OutlinedInput
932
+ };
933
+ const useUtilityClasses = ownerState => {
934
+ const {
935
+ classes
936
+ } = ownerState;
937
+ const slots = {
938
+ root: ['root']
939
+ };
940
+ return composeClasses(slots, getTextFieldUtilityClass, classes);
941
+ };
942
+ const TextFieldRoot = styled$1(FormControl$1, {
943
+ name: 'MuiTextField',
944
+ slot: 'Root',
945
+ overridesResolver: (props, styles) => styles.root
946
+ })({});
947
+
948
+ /**
949
+ * The `TextField` is a convenience wrapper for the most common cases (80%).
950
+ * It cannot be all things to all people, otherwise the API would grow out of control.
951
+ *
952
+ * ## Advanced Configuration
953
+ *
954
+ * It's important to understand that the text field is a simple abstraction
955
+ * on top of the following components:
956
+ *
957
+ * - [FormControl](/material-ui/api/form-control/)
958
+ * - [InputLabel](/material-ui/api/input-label/)
959
+ * - [FilledInput](/material-ui/api/filled-input/)
960
+ * - [OutlinedInput](/material-ui/api/outlined-input/)
961
+ * - [Input](/material-ui/api/input/)
962
+ * - [FormHelperText](/material-ui/api/form-helper-text/)
963
+ *
964
+ * If you wish to alter the props applied to the `input` element, you can do so as follows:
965
+ *
966
+ * ```jsx
967
+ * const inputProps = {
968
+ * step: 300,
969
+ * };
970
+ *
971
+ * return <TextField id="time" type="time" inputProps={inputProps} />;
972
+ * ```
973
+ *
974
+ * For advanced cases, please look at the source of TextField by clicking on the
975
+ * "Edit this page" button above. Consider either:
976
+ *
977
+ * - using the upper case props for passing values directly to the components
978
+ * - using the underlying components directly as shown in the demos
979
+ */
980
+ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {
981
+ const props = useThemeProps({
982
+ props: inProps,
983
+ name: 'MuiTextField'
984
+ });
985
+ const {
986
+ autoComplete,
987
+ autoFocus = false,
988
+ children,
989
+ className,
990
+ color = 'primary',
991
+ defaultValue,
992
+ disabled = false,
993
+ error = false,
994
+ FormHelperTextProps,
995
+ fullWidth = false,
996
+ helperText,
997
+ id: idOverride,
998
+ InputLabelProps,
999
+ inputProps,
1000
+ InputProps,
1001
+ inputRef,
1002
+ label,
1003
+ maxRows,
1004
+ minRows,
1005
+ multiline = false,
1006
+ name,
1007
+ onBlur,
1008
+ onChange,
1009
+ onClick,
1010
+ onFocus,
1011
+ placeholder,
1012
+ required = false,
1013
+ rows,
1014
+ select = false,
1015
+ SelectProps,
1016
+ type,
1017
+ value,
1018
+ variant = 'outlined'
1019
+ } = props,
1020
+ other = _objectWithoutPropertiesLoose(props, _excluded$1);
1021
+ const ownerState = _extends({}, props, {
1022
+ autoFocus,
1023
+ color,
1024
+ disabled,
1025
+ error,
1026
+ fullWidth,
1027
+ multiline,
1028
+ required,
1029
+ select,
1030
+ variant
1031
+ });
1032
+ const classes = useUtilityClasses(ownerState);
1033
+ if (process.env.NODE_ENV !== 'production') {
1034
+ if (select && !children) {
1035
+ console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
1036
+ }
1037
+ }
1038
+ const InputMore = {};
1039
+ if (variant === 'outlined') {
1040
+ if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') {
1041
+ InputMore.notched = InputLabelProps.shrink;
1042
+ }
1043
+ InputMore.label = label;
1044
+ }
1045
+ if (select) {
1046
+ // unset defaults from textbox inputs
1047
+ if (!SelectProps || !SelectProps.native) {
1048
+ InputMore.id = undefined;
1049
+ }
1050
+ InputMore['aria-describedby'] = undefined;
1051
+ }
1052
+ const id = useId(idOverride);
1053
+ const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
1054
+ const inputLabelId = label && id ? `${id}-label` : undefined;
1055
+ const InputComponent = variantComponent[variant];
1056
+ const InputElement = /*#__PURE__*/jsxRuntimeExports.jsx(InputComponent, _extends({
1057
+ "aria-describedby": helperTextId,
1058
+ autoComplete: autoComplete,
1059
+ autoFocus: autoFocus,
1060
+ defaultValue: defaultValue,
1061
+ fullWidth: fullWidth,
1062
+ multiline: multiline,
1063
+ name: name,
1064
+ rows: rows,
1065
+ maxRows: maxRows,
1066
+ minRows: minRows,
1067
+ type: type,
1068
+ value: value,
1069
+ id: id,
1070
+ inputRef: inputRef,
1071
+ onBlur: onBlur,
1072
+ onChange: onChange,
1073
+ onFocus: onFocus,
1074
+ onClick: onClick,
1075
+ placeholder: placeholder,
1076
+ inputProps: inputProps
1077
+ }, InputMore, InputProps));
1078
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(TextFieldRoot, _extends({
1079
+ className: clsx(classes.root, className),
1080
+ disabled: disabled,
1081
+ error: error,
1082
+ fullWidth: fullWidth,
1083
+ ref: ref,
1084
+ required: required,
1085
+ color: color,
1086
+ variant: variant,
1087
+ ownerState: ownerState
1088
+ }, other, {
1089
+ children: [label != null && label !== '' && /*#__PURE__*/jsxRuntimeExports.jsx(InputLabel$1, _extends({
1090
+ htmlFor: id,
1091
+ id: inputLabelId
1092
+ }, InputLabelProps, {
1093
+ children: label
1094
+ })), select ? /*#__PURE__*/jsxRuntimeExports.jsx(Select, _extends({
1095
+ "aria-describedby": helperTextId,
1096
+ id: id,
1097
+ labelId: inputLabelId,
1098
+ value: value,
1099
+ input: InputElement
1100
+ }, SelectProps, {
1101
+ children: children
1102
+ })) : InputElement, helperText && /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperText$1, _extends({
1103
+ id: helperTextId
1104
+ }, FormHelperTextProps, {
1105
+ children: helperText
1106
+ }))]
1107
+ }));
1108
+ });
1109
+ process.env.NODE_ENV !== "production" ? TextField.propTypes /* remove-proptypes */ = {
1110
+ // ----------------------------- Warning --------------------------------
1111
+ // | These PropTypes are generated from the TypeScript type definitions |
1112
+ // | To update them edit the d.ts file and run "yarn proptypes" |
1113
+ // ----------------------------------------------------------------------
1114
+ /**
1115
+ * This prop helps users to fill forms faster, especially on mobile devices.
1116
+ * The name can be confusing, as it's more like an autofill.
1117
+ * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).
1118
+ */
1119
+ autoComplete: PropTypes.string,
1120
+ /**
1121
+ * If `true`, the `input` element is focused during the first mount.
1122
+ * @default false
1123
+ */
1124
+ autoFocus: PropTypes.bool,
1125
+ /**
1126
+ * @ignore
1127
+ */
1128
+ children: PropTypes.node,
1129
+ /**
1130
+ * Override or extend the styles applied to the component.
1131
+ */
1132
+ classes: PropTypes.object,
1133
+ /**
1134
+ * @ignore
1135
+ */
1136
+ className: PropTypes.string,
1137
+ /**
1138
+ * The color of the component.
1139
+ * It supports both default and custom theme colors, which can be added as shown in the
1140
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
1141
+ * @default 'primary'
1142
+ */
1143
+ color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
1144
+ /**
1145
+ * The default value. Use when the component is not controlled.
1146
+ */
1147
+ defaultValue: PropTypes.any,
1148
+ /**
1149
+ * If `true`, the component is disabled.
1150
+ * @default false
1151
+ */
1152
+ disabled: PropTypes.bool,
1153
+ /**
1154
+ * If `true`, the label is displayed in an error state.
1155
+ * @default false
1156
+ */
1157
+ error: PropTypes.bool,
1158
+ /**
1159
+ * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
1160
+ */
1161
+ FormHelperTextProps: PropTypes.object,
1162
+ /**
1163
+ * If `true`, the input will take up the full width of its container.
1164
+ * @default false
1165
+ */
1166
+ fullWidth: PropTypes.bool,
1167
+ /**
1168
+ * The helper text content.
1169
+ */
1170
+ helperText: PropTypes.node,
1171
+ /**
1172
+ * The id of the `input` element.
1173
+ * Use this prop to make `label` and `helperText` accessible for screen readers.
1174
+ */
1175
+ id: PropTypes.string,
1176
+ /**
1177
+ * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
1178
+ * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
1179
+ */
1180
+ InputLabelProps: PropTypes.object,
1181
+ /**
1182
+ * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
1183
+ */
1184
+ inputProps: PropTypes.object,
1185
+ /**
1186
+ * Props applied to the Input element.
1187
+ * It will be a [`FilledInput`](/material-ui/api/filled-input/),
1188
+ * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
1189
+ * component depending on the `variant` prop value.
1190
+ */
1191
+ InputProps: PropTypes.object,
1192
+ /**
1193
+ * Pass a ref to the `input` element.
1194
+ */
1195
+ inputRef: refType,
1196
+ /**
1197
+ * The label content.
1198
+ */
1199
+ label: PropTypes.node,
1200
+ /**
1201
+ * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
1202
+ * @default 'none'
1203
+ */
1204
+ margin: PropTypes.oneOf(['dense', 'none', 'normal']),
1205
+ /**
1206
+ * Maximum number of rows to display when multiline option is set to true.
1207
+ */
1208
+ maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
1209
+ /**
1210
+ * Minimum number of rows to display when multiline option is set to true.
1211
+ */
1212
+ minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
1213
+ /**
1214
+ * If `true`, a `textarea` element is rendered instead of an input.
1215
+ * @default false
1216
+ */
1217
+ multiline: PropTypes.bool,
1218
+ /**
1219
+ * Name attribute of the `input` element.
1220
+ */
1221
+ name: PropTypes.string,
1222
+ /**
1223
+ * @ignore
1224
+ */
1225
+ onBlur: PropTypes.func,
1226
+ /**
1227
+ * Callback fired when the value is changed.
1228
+ *
1229
+ * @param {object} event The event source of the callback.
1230
+ * You can pull out the new value by accessing `event.target.value` (string).
1231
+ */
1232
+ onChange: PropTypes.func,
1233
+ /**
1234
+ * @ignore
1235
+ */
1236
+ onClick: PropTypes.func,
1237
+ /**
1238
+ * @ignore
1239
+ */
1240
+ onFocus: PropTypes.func,
1241
+ /**
1242
+ * The short hint displayed in the `input` before the user enters a value.
1243
+ */
1244
+ placeholder: PropTypes.string,
1245
+ /**
1246
+ * If `true`, the label is displayed as required and the `input` element is required.
1247
+ * @default false
1248
+ */
1249
+ required: PropTypes.bool,
1250
+ /**
1251
+ * Number of rows to display when multiline option is set to true.
1252
+ */
1253
+ rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
1254
+ /**
1255
+ * Render a [`Select`](/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.
1256
+ * If this option is set you must pass the options of the select as children.
1257
+ * @default false
1258
+ */
1259
+ select: PropTypes.bool,
1260
+ /**
1261
+ * Props applied to the [`Select`](/material-ui/api/select/) element.
1262
+ */
1263
+ SelectProps: PropTypes.object,
1264
+ /**
1265
+ * The size of the component.
1266
+ */
1267
+ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
1268
+ /**
1269
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1270
+ */
1271
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
1272
+ /**
1273
+ * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).
1274
+ */
1275
+ type: PropTypes /* @typescript-to-proptypes-ignore */.string,
1276
+ /**
1277
+ * The value of the `input` element, required for a controlled component.
1278
+ */
1279
+ value: PropTypes.any,
1280
+ /**
1281
+ * The variant to use.
1282
+ * @default 'outlined'
1283
+ */
1284
+ variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])
1285
+ } : void 0;
1286
+ var TextField$1 = TextField;
15
1287
 
16
1288
  const SUBMIT_FILTER_STROKE_TIME = 500;
17
1289
  const InputNumberInterval = props => {
@@ -53,7 +1325,7 @@ const InputNumberInterval = props => {
53
1325
  const newLowerBound = event.target.value;
54
1326
  updateFilterValue(newLowerBound, filterValueState[1]);
55
1327
  };
56
- return /*#__PURE__*/React.createElement(Box, {
1328
+ return /*#__PURE__*/React.createElement(Box$1, {
57
1329
  sx: {
58
1330
  display: 'inline-flex',
59
1331
  flexDirection: 'row',
@@ -61,7 +1333,7 @@ const InputNumberInterval = props => {
61
1333
  height: 48,
62
1334
  pl: '20px'
63
1335
  }
64
- }, /*#__PURE__*/React.createElement(TextField, {
1336
+ }, /*#__PURE__*/React.createElement(TextField$1, {
65
1337
  name: "lower-bound-input",
66
1338
  placeholder: "From",
67
1339
  label: "From",
@@ -73,7 +1345,7 @@ const InputNumberInterval = props => {
73
1345
  sx: {
74
1346
  mr: 2
75
1347
  }
76
- }), /*#__PURE__*/React.createElement(TextField, {
1348
+ }), /*#__PURE__*/React.createElement(TextField$1, {
77
1349
  name: "upper-bound-input",
78
1350
  placeholder: "To",
79
1351
  label: "To",
@@ -105,8 +1377,8 @@ const isBetweenOperator = {
105
1377
  if (typeof filterItem.value[0] !== 'number' || typeof filterItem.value[1] !== 'number') {
106
1378
  return null;
107
1379
  }
108
- return value => {
109
- return value !== null && value !== undefined && filterItem.value[0] <= value && value <= filterItem.value[1];
1380
+ return params => {
1381
+ return params.value !== null && params.value !== undefined && filterItem.value[0] <= params.value && params.value <= filterItem.value[1];
110
1382
  };
111
1383
  },
112
1384
  InputComponent: InputNumberInterval
@@ -122,14 +1394,14 @@ const doesNotContain = {
122
1394
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
123
1395
  return null;
124
1396
  }
125
- return value => {
1397
+ return params => {
126
1398
  if (filterItem.value.length === 0) {
127
1399
  return true;
128
1400
  }
129
- if (value == null) {
1401
+ if (params.value == null) {
130
1402
  return true;
131
1403
  }
132
- if (String(value).indexOf(filterItem.value) !== -1) {
1404
+ if (String(params.value).indexOf(filterItem.value) !== -1) {
133
1405
  return false;
134
1406
  }
135
1407
  return true;
@@ -146,11 +1418,11 @@ const doesNotEndWithOperator = {
146
1418
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
147
1419
  return null;
148
1420
  }
149
- return value => {
150
- if (value == null) {
1421
+ return params => {
1422
+ if (params.value == null) {
151
1423
  return true;
152
1424
  }
153
- return !String(value).endsWith(filterItem.value);
1425
+ return !String(params.value).endsWith(filterItem.value);
154
1426
  };
155
1427
  },
156
1428
  InputComponent: GridFilterInputValue
@@ -164,11 +1436,11 @@ const doesNotEqual = {
164
1436
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
165
1437
  return null;
166
1438
  }
167
- return value => {
168
- if (value == null) {
1439
+ return params => {
1440
+ if (params.value == null) {
169
1441
  return true;
170
1442
  }
171
- if (String(value) === filterItem.value) {
1443
+ if (String(params.value) === filterItem.value) {
172
1444
  return false;
173
1445
  }
174
1446
  return true;
@@ -185,11 +1457,11 @@ const doesNotHaveOperator = {
185
1457
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
186
1458
  return null;
187
1459
  }
188
- return value => {
189
- if (value == null) {
1460
+ return params => {
1461
+ if (params.value == null) {
190
1462
  return true;
191
1463
  }
192
- const cellValues = Array.isArray(value) ? value : [value];
1464
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
193
1465
  return !cellValues.map(value => String(value)).includes(filterItem.value);
194
1466
  };
195
1467
  },
@@ -207,11 +1479,11 @@ const doesNotStartWithOperator = {
207
1479
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
208
1480
  return null;
209
1481
  }
210
- return value => {
211
- if (value == null) {
1482
+ return params => {
1483
+ if (params.value == null) {
212
1484
  return true;
213
1485
  }
214
- return !String(value).startsWith(filterItem.value);
1486
+ return !String(params.value).startsWith(filterItem.value);
215
1487
  };
216
1488
  },
217
1489
  InputComponent: GridFilterInputValue
@@ -225,11 +1497,11 @@ const hasOperator = {
225
1497
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
226
1498
  return null;
227
1499
  }
228
- return value => {
229
- if (value == null) {
1500
+ return params => {
1501
+ if (params.value == null) {
230
1502
  return false;
231
1503
  }
232
- const cellValues = Array.isArray(value) ? value : [value];
1504
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
233
1505
  return cellValues.map(value => String(value)).includes(filterItem.value);
234
1506
  };
235
1507
  },
@@ -247,11 +1519,11 @@ const hasOnlyOperator = {
247
1519
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
248
1520
  return null;
249
1521
  }
250
- return value => {
251
- if (value == null) {
1522
+ return params => {
1523
+ if (params.value == null) {
252
1524
  return false;
253
1525
  }
254
- const cellValues = Array.isArray(value) ? value : [value];
1526
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
255
1527
  return cellValues.length === 1 && String(cellValues[0]) === filterItem.value;
256
1528
  };
257
1529
  },
@@ -269,14 +1541,14 @@ const isOperator = {
269
1541
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
270
1542
  return null;
271
1543
  }
272
- return value => {
273
- if (value == null) {
1544
+ return params => {
1545
+ if (params.value == null) {
274
1546
  return false;
275
1547
  }
276
- if (Array.isArray(value)) {
1548
+ if (Array.isArray(params.value)) {
277
1549
  return false;
278
1550
  }
279
- return String(value) === filterItem.value;
1551
+ return String(params.value) === filterItem.value;
280
1552
  };
281
1553
  },
282
1554
  InputComponent: GridFilterInputValue
@@ -293,14 +1565,14 @@ const isNotOperator = {
293
1565
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
294
1566
  return null;
295
1567
  }
296
- return value => {
297
- if (value == null) {
1568
+ return params => {
1569
+ if (params.value == null) {
298
1570
  return true;
299
1571
  }
300
- if (Array.isArray(value)) {
1572
+ if (Array.isArray(params.value)) {
301
1573
  return true;
302
1574
  }
303
- return String(value) !== filterItem.value;
1575
+ return String(params.value) !== filterItem.value;
304
1576
  };
305
1577
  },
306
1578
  InputComponent: GridFilterInputValue
@@ -317,14 +1589,14 @@ const containsAnyOfOperator = {
317
1589
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
318
1590
  return null;
319
1591
  }
320
- return value => {
1592
+ return params => {
321
1593
  if (filterItem.value.length === 0) {
322
1594
  return true;
323
1595
  }
324
- if (value == null) {
1596
+ if (params.value == null) {
325
1597
  return false;
326
1598
  }
327
- const paramValues = Array.isArray(value) ? value : [value];
1599
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
328
1600
  let match = false;
329
1601
  filterItem.value.forEach(filteredValue => {
330
1602
  paramValues.forEach(paramValue => {
@@ -347,14 +1619,14 @@ const doesNotContainAnyOfOperator = {
347
1619
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
348
1620
  return null;
349
1621
  }
350
- return value => {
1622
+ return params => {
351
1623
  if (filterItem.value.length === 0) {
352
1624
  return true;
353
1625
  }
354
- if (value == null) {
1626
+ if (params.value == null) {
355
1627
  return true;
356
1628
  }
357
- const paramValues = Array.isArray(value) ? value : [value];
1629
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
358
1630
  for (const filteredValue of filterItem.value) {
359
1631
  for (const paramValue of paramValues) {
360
1632
  if (String(paramValue).indexOf(filteredValue) !== -1) {
@@ -376,14 +1648,14 @@ const doesNotEndWithAnyOfOperator = {
376
1648
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
377
1649
  return null;
378
1650
  }
379
- return value => {
1651
+ return params => {
380
1652
  if (filterItem.value.length === 0) {
381
1653
  return true;
382
1654
  }
383
- if (value == null) {
1655
+ if (params.value == null) {
384
1656
  return true;
385
1657
  }
386
- const paramValues = Array.isArray(value) ? value : [value];
1658
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
387
1659
  for (const filteredValue of filterItem.value) {
388
1660
  for (const paramValue of paramValues) {
389
1661
  if (String(paramValue).endsWith(filteredValue)) {
@@ -405,11 +1677,11 @@ const doesNotHaveAnyOf = {
405
1677
  if (!filterItem.field || !filterItem.value || !Array.isArray(filterItem.value) || filterItem.value.length === 0) {
406
1678
  return null;
407
1679
  }
408
- return value => {
409
- if (value == null) {
1680
+ return params => {
1681
+ if (params.value == null) {
410
1682
  return true;
411
1683
  }
412
- const cellValues = Array.isArray(value) ? value : [value];
1684
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
413
1685
 
414
1686
  // Return true only if none of the filter values are in the cell values
415
1687
  return filterItem.value.every(filterVal => !cellValues.map(value => String(value)).includes(filterVal));
@@ -429,14 +1701,14 @@ const doesNotStartWithAnyOfOperator = {
429
1701
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
430
1702
  return null;
431
1703
  }
432
- return value => {
1704
+ return params => {
433
1705
  if (filterItem.value.length === 0) {
434
1706
  return true;
435
1707
  }
436
- if (value == null) {
1708
+ if (params.value == null) {
437
1709
  return true;
438
1710
  }
439
- const paramValues = Array.isArray(value) ? value : [value];
1711
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
440
1712
  for (const filteredValue of filterItem.value) {
441
1713
  for (const paramValue of paramValues) {
442
1714
  if (String(paramValue).startsWith(filteredValue)) {
@@ -458,14 +1730,14 @@ const endsWithAnyOfOperator = {
458
1730
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
459
1731
  return null;
460
1732
  }
461
- return value => {
1733
+ return params => {
462
1734
  if (filterItem.value.length === 0) {
463
1735
  return true;
464
1736
  }
465
- if (value == null) {
1737
+ if (params.value == null) {
466
1738
  return false;
467
1739
  }
468
- const paramValues = Array.isArray(value) ? value : [value];
1740
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
469
1741
  let match = false;
470
1742
  filterItem.value.forEach(filteredValue => {
471
1743
  paramValues.forEach(paramValue => {
@@ -488,14 +1760,14 @@ const hasAllOfOperator = {
488
1760
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
489
1761
  return null;
490
1762
  }
491
- return value => {
1763
+ return params => {
492
1764
  if (filterItem.value.length === 0) {
493
1765
  return true;
494
1766
  }
495
- if (value == null) {
1767
+ if (params.value == null) {
496
1768
  return false;
497
1769
  }
498
- const cellValues = Array.isArray(value) ? value : [value];
1770
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
499
1771
  const cellStrings = cellValues.map(value => String(value));
500
1772
  const filterItemValues = Array.isArray(filterItem.value) ? filterItem.value : [filterItem.value];
501
1773
  return filterItemValues.every(v => cellStrings.includes(v));
@@ -515,14 +1787,14 @@ const hasAnyOfOperator = {
515
1787
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
516
1788
  return null;
517
1789
  }
518
- return value => {
1790
+ return params => {
519
1791
  if (filterItem.value.length === 0) {
520
1792
  return true;
521
1793
  }
522
- if (value == null) {
1794
+ if (params.value == null) {
523
1795
  return false;
524
1796
  }
525
- const cellValues = Array.isArray(value) ? value : [value];
1797
+ const cellValues = Array.isArray(params.value) ? params.value : [params.value];
526
1798
  const filterItemValues = Array.isArray(filterItem.value) ? filterItem.value : [filterItem.value];
527
1799
  return filterItemValues.some(v => cellValues.map(value => String(value)).includes(v));
528
1800
  };
@@ -541,14 +1813,14 @@ const isAnyOfOperator = {
541
1813
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
542
1814
  return null;
543
1815
  }
544
- return value => {
1816
+ return params => {
545
1817
  if (filterItem.value.length === 0) {
546
1818
  return true;
547
1819
  }
548
- if (value == null) {
1820
+ if (params.value == null) {
549
1821
  return false;
550
1822
  }
551
- const paramValues = Array.isArray(value) ? value : [value];
1823
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
552
1824
  for (const paramValue of paramValues) {
553
1825
  if (filterItem.value.includes(String(paramValue))) {
554
1826
  return true;
@@ -571,14 +1843,14 @@ const isNotAnyOfOperator = {
571
1843
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
572
1844
  return null;
573
1845
  }
574
- return value => {
1846
+ return params => {
575
1847
  if (filterItem.value.length === 0) {
576
1848
  return true;
577
1849
  }
578
- if (value == null) {
1850
+ if (params.value == null) {
579
1851
  return true;
580
1852
  }
581
- const paramValues = Array.isArray(value) ? value : [value];
1853
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
582
1854
  for (const paramValue of paramValues) {
583
1855
  if (filterItem.value.includes(String(paramValue))) {
584
1856
  return false;
@@ -601,14 +1873,14 @@ const startsWithAnyOfOperator = {
601
1873
  if (!filterItem.field || !filterItem.value || !filterItem.operator) {
602
1874
  return null;
603
1875
  }
604
- return value => {
1876
+ return params => {
605
1877
  if (filterItem.value.length === 0) {
606
1878
  return true;
607
1879
  }
608
- if (value == null) {
1880
+ if (params.value == null) {
609
1881
  return false;
610
1882
  }
611
- const paramValues = Array.isArray(value) ? value : [value];
1883
+ const paramValues = Array.isArray(params.value) ? params.value : [params.value];
612
1884
  let match = false;
613
1885
  filterItem.value.forEach(filteredValue => {
614
1886
  paramValues.forEach(paramValue => {
@@ -635,15 +1907,15 @@ const isEmptyOperator = {
635
1907
  value: 'isEmpty',
636
1908
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
637
1909
  getApplyFilterFn: _filterItem => {
638
- return value => {
639
- if (value == null) {
1910
+ return params => {
1911
+ if (params.value == null) {
640
1912
  return true;
641
1913
  }
642
- if (Array.isArray(value)) {
643
- return value.length === 0;
1914
+ if (Array.isArray(params.value)) {
1915
+ return params.value.length === 0;
644
1916
  }
645
- if (typeof value === 'string') {
646
- return value.trim() === '';
1917
+ if (typeof params.value === 'string') {
1918
+ return params.value.trim() === '';
647
1919
  }
648
1920
  return false;
649
1921
  };
@@ -655,15 +1927,15 @@ const isNotEmptyOperator = {
655
1927
  value: 'isNotEmpty',
656
1928
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
657
1929
  getApplyFilterFn: _filterItem => {
658
- return value => {
659
- if (value == null) {
1930
+ return params => {
1931
+ if (params.value == null) {
660
1932
  return false;
661
1933
  }
662
- if (Array.isArray(value)) {
663
- return value.length > 0;
1934
+ if (Array.isArray(params.value)) {
1935
+ return params.value.length > 0;
664
1936
  }
665
- if (typeof value === 'string') {
666
- return value.trim() !== '';
1937
+ if (typeof params.value === 'string') {
1938
+ return params.value.trim() !== '';
667
1939
  }
668
1940
  return true;
669
1941
  };
@@ -1663,7 +2935,7 @@ const getSearchParamsFromDensity = density => {
1663
2935
  return searchParams;
1664
2936
  };
1665
2937
  const getDensityModel = (search, localStorageDensity, setLocalStorageDensity, _initialState, isNewVersion) => {
1666
- // Default density when none is persisted
2938
+ // MUI v6 GridInitialStatePro does not include density default to 'compact'
1667
2939
  const defaultValue = 'compact';
1668
2940
 
1669
2941
  // Persist initialState-derived density to localStorage so all three sources stay in sync
@@ -1949,23 +3221,6 @@ const useTableStates = (id, version) => {
1949
3221
  };
1950
3222
  };
1951
3223
 
1952
- /**
1953
- * Deep-equal comparison for plain objects / arrays.
1954
- * Used to stabilise parsed model references so that MUI v8 does not
1955
- * reset pagination on every render.
1956
- */
1957
- function isDeepEqual(a, b) {
1958
- if (a === b) return true;
1959
- if (a == null || b == null) return false;
1960
- if (typeof a !== typeof b) return false;
1961
- if (typeof a !== 'object') return false;
1962
- const aObj = a;
1963
- const bObj = b;
1964
- const aKeys = Object.keys(aObj);
1965
- const bKeys = Object.keys(bObj);
1966
- if (aKeys.length !== bKeys.length) return false;
1967
- return aKeys.every(key => isDeepEqual(aObj[key], bObj[key]));
1968
- }
1969
3224
  const useStatefulTable = props => {
1970
3225
  const {
1971
3226
  apiRef,
@@ -2046,29 +3301,6 @@ const useStatefulTable = props => {
2046
3301
  historyReplace(pendingSearch);
2047
3302
  }
2048
3303
  }, [pendingSearch, historyReplace]);
2049
-
2050
- // Stabilise parsed model references to prevent MUI v8 from resetting
2051
- // pagination on every render due to new object identity.
2052
- const filterParsedRef = useRef(filterParsed);
2053
- if (!isDeepEqual(filterParsedRef.current, filterParsed)) {
2054
- filterParsedRef.current = filterParsed;
2055
- }
2056
- const sortModelParsedRef = useRef(sortModelParsed);
2057
- if (!isDeepEqual(sortModelParsedRef.current, sortModelParsed)) {
2058
- sortModelParsedRef.current = sortModelParsed;
2059
- }
2060
- const paginationModelParsedRef = useRef(paginationModelParsed);
2061
- if (!isDeepEqual(paginationModelParsedRef.current, paginationModelParsed)) {
2062
- paginationModelParsedRef.current = paginationModelParsed;
2063
- }
2064
- const visibilityModelRef = useRef(visibilityModel);
2065
- if (!isDeepEqual(visibilityModelRef.current, visibilityModel)) {
2066
- visibilityModelRef.current = visibilityModel;
2067
- }
2068
- const pinnedColumnsModelRef = useRef(pinnedColumnsModel);
2069
- if (!isDeepEqual(pinnedColumnsModelRef.current, pinnedColumnsModel)) {
2070
- pinnedColumnsModelRef.current = pinnedColumnsModel;
2071
- }
2072
3304
  const columns = useMemo(() => propsColumns.map(column => {
2073
3305
  return _objectSpread2(_objectSpread2({}, column), {}, {
2074
3306
  width: dimensionModel[column.field] || column.width || 100
@@ -2077,8 +3309,7 @@ const useStatefulTable = props => {
2077
3309
  if (apiRef.current) {
2078
3310
  /** Add resetPage method to apiRef. */
2079
3311
  apiRef.current.resetPage = () => {
2080
- var _apiRef$current;
2081
- (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : _apiRef$current.setPage(0);
3312
+ apiRef.current.setPage(0);
2082
3313
  };
2083
3314
  }
2084
3315
 
@@ -2088,7 +3319,7 @@ const useStatefulTable = props => {
2088
3319
  if (!(api !== null && api !== void 0 && api.subscribeEvent)) return;
2089
3320
  let prevDensity = densityParsed;
2090
3321
  const unsub = api.subscribeEvent('stateChange', () => {
2091
- const currentDensity = api.state.density;
3322
+ const currentDensity = api.state.density.value;
2092
3323
  if (currentDensity !== prevDensity) {
2093
3324
  prevDensity = currentDensity;
2094
3325
  updateUrl({
@@ -2108,71 +3339,67 @@ const useStatefulTable = props => {
2108
3339
  columns,
2109
3340
  density: densityParsed,
2110
3341
  onFilterModelChange: (model, details) => {
2111
- var _apiRef$current$state, _apiRef$current3;
2112
3342
  const filterModel = _objectSpread2(_objectSpread2({}, model), {}, {
2113
3343
  items: model.items.map(item => {
2114
- var _apiRef$current2;
2115
- const column = (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 ? void 0 : _apiRef$current2.getColumn(item.field);
2116
- item.type = (column === null || column === void 0 ? void 0 : column.type) || 'string';
3344
+ const column = apiRef.current.getColumn(item.field);
3345
+ item.type = column.type || 'string';
2117
3346
  return item;
2118
3347
  }),
2119
3348
  quickFilterValues: model.quickFilterValues || []
2120
3349
  });
3350
+ propsOnFilterModelChange === null || propsOnFilterModelChange === void 0 ? void 0 : propsOnFilterModelChange(filterModel, details);
2121
3351
  updateUrl({
2122
3352
  filterModel: filterModel,
2123
3353
  sortModel: sortModelParsed,
2124
3354
  paginationModel: paginationModelParsed,
2125
- columnsModel: (_apiRef$current$state = (_apiRef$current3 = apiRef.current) === null || _apiRef$current3 === void 0 ? void 0 : _apiRef$current3.state.columns.columnVisibilityModel) !== null && _apiRef$current$state !== void 0 ? _apiRef$current$state : {},
3355
+ columnsModel: apiRef.current.state.columns.columnVisibilityModel,
2126
3356
  pinnedColumnsModel: pinnedColumnsModel,
2127
3357
  density: densityParsed
2128
3358
  }, search, localStorageVersion, historyReplace, columns);
2129
- propsOnFilterModelChange === null || propsOnFilterModelChange === void 0 ? void 0 : propsOnFilterModelChange(filterModel, details);
2130
3359
  },
2131
- filterModel: filterParsedRef.current,
3360
+ filterModel: filterParsed,
2132
3361
  onSortModelChange: (model, details) => {
2133
- var _apiRef$current$state2, _apiRef$current4;
3362
+ propsOnSortModelChange === null || propsOnSortModelChange === void 0 ? void 0 : propsOnSortModelChange(model, details);
2134
3363
  updateUrl({
2135
3364
  filterModel: filterParsed,
2136
3365
  sortModel: model,
2137
3366
  paginationModel: paginationModelParsed,
2138
- columnsModel: (_apiRef$current$state2 = (_apiRef$current4 = apiRef.current) === null || _apiRef$current4 === void 0 ? void 0 : _apiRef$current4.state.columns.columnVisibilityModel) !== null && _apiRef$current$state2 !== void 0 ? _apiRef$current$state2 : {},
3367
+ columnsModel: apiRef.current.state.columns.columnVisibilityModel,
2139
3368
  pinnedColumnsModel: pinnedColumnsModel,
2140
3369
  density: densityParsed
2141
3370
  }, search, localStorageVersion, historyReplace, columns);
2142
- propsOnSortModelChange === null || propsOnSortModelChange === void 0 ? void 0 : propsOnSortModelChange(model, details);
2143
3371
  },
2144
- sortModel: sortModelParsedRef.current,
3372
+ sortModel: sortModelParsed,
2145
3373
  onPinnedColumnsChange: (pinnedColumns, details) => {
2146
- var _apiRef$current$state3, _apiRef$current5;
3374
+ propsOnPinnedColumnsChange === null || propsOnPinnedColumnsChange === void 0 ? void 0 : propsOnPinnedColumnsChange(pinnedColumns, details);
2147
3375
  updateUrl({
2148
3376
  filterModel: filterParsed,
2149
3377
  sortModel: sortModelParsed,
2150
3378
  paginationModel: paginationModelParsed,
2151
- columnsModel: (_apiRef$current$state3 = (_apiRef$current5 = apiRef.current) === null || _apiRef$current5 === void 0 ? void 0 : _apiRef$current5.state.columns.columnVisibilityModel) !== null && _apiRef$current$state3 !== void 0 ? _apiRef$current$state3 : {},
3379
+ columnsModel: apiRef.current.state.columns.columnVisibilityModel,
2152
3380
  pinnedColumnsModel: pinnedColumns,
2153
3381
  density: densityParsed
2154
3382
  }, search, localStorageVersion, historyReplace, columns);
2155
- propsOnPinnedColumnsChange === null || propsOnPinnedColumnsChange === void 0 ? void 0 : propsOnPinnedColumnsChange(pinnedColumns, details);
2156
3383
  },
2157
- pinnedColumns: pinnedColumnsModelRef.current,
2158
- paginationModel: paginationModelParsedRef.current,
3384
+ pinnedColumns: pinnedColumnsModel,
3385
+ paginationModel: paginationModelParsed,
2159
3386
  onPaginationModelChange: (model, details) => {
2160
- var _apiRef$current$state4, _apiRef$current6;
2161
3387
  const paginationModel = _objectSpread2(_objectSpread2({}, model), {}, {
2162
3388
  direction: paginationModelParsed.page < model.page ? 'next' : 'back'
2163
3389
  });
3390
+ propsOnPaginationModelChange === null || propsOnPaginationModelChange === void 0 ? void 0 : propsOnPaginationModelChange(paginationModel, details);
2164
3391
  updateUrl({
2165
3392
  filterModel: filterParsed,
2166
3393
  sortModel: sortModelParsed,
2167
3394
  paginationModel: paginationModel,
2168
- columnsModel: (_apiRef$current$state4 = (_apiRef$current6 = apiRef.current) === null || _apiRef$current6 === void 0 ? void 0 : _apiRef$current6.state.columns.columnVisibilityModel) !== null && _apiRef$current$state4 !== void 0 ? _apiRef$current$state4 : {},
3395
+ columnsModel: apiRef.current.state.columns.columnVisibilityModel,
2169
3396
  pinnedColumnsModel: pinnedColumnsModel,
2170
3397
  density: densityParsed
2171
3398
  }, search, localStorageVersion, historyReplace, columns);
2172
- propsOnPaginationModelChange === null || propsOnPaginationModelChange === void 0 ? void 0 : propsOnPaginationModelChange(paginationModel, details);
2173
3399
  },
2174
- columnVisibilityModel: visibilityModelRef.current,
3400
+ columnVisibilityModel: visibilityModel,
2175
3401
  onColumnVisibilityModelChange: (columnsVisibilityModel, details) => {
3402
+ propsOnColumnVisibilityModelChange === null || propsOnColumnVisibilityModelChange === void 0 ? void 0 : propsOnColumnVisibilityModelChange(columnsVisibilityModel, details);
2176
3403
  updateUrl({
2177
3404
  filterModel: filterParsed,
2178
3405
  sortModel: sortModelParsed,
@@ -2181,7 +3408,6 @@ const useStatefulTable = props => {
2181
3408
  pinnedColumnsModel: pinnedColumnsModel,
2182
3409
  density: densityParsed
2183
3410
  }, search, localStorageVersion, historyReplace, columns);
2184
- propsOnColumnVisibilityModelChange === null || propsOnColumnVisibilityModelChange === void 0 ? void 0 : propsOnColumnVisibilityModelChange(columnsVisibilityModel, details);
2185
3411
  },
2186
3412
  onColumnWidthChange: (params, event, details) => {
2187
3413
  propsOnColumnWidthChange === null || propsOnColumnWidthChange === void 0 ? void 0 : propsOnColumnWidthChange(params, event, details);
@@ -2193,7 +3419,7 @@ const useStatefulTable = props => {
2193
3419
  };
2194
3420
  };
2195
3421
 
2196
- const _excluded = ["apiRef", "autoHeight", "className", "columns", "slots", "slotProps", "filterModel", "columnVisibilityModel", "pinnedColumns", "sortModel", "paginationModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "localStorageVersion", "previousLocalStorageVersions", "onFilterModelChange", "rowSelectionModel", "onColumnWidthChange", "onPaginationModelChange", "onRowSelectionModelChange", "onColumnVisibilityModelChange", "onPinnedColumnsChange", "onSortModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx", "theme", "useRouter", "paginationMode", "rowCount", "density"];
3422
+ const _excluded = ["apiRef", "autoHeight", "className", "columns", "slots", "slotProps", "filterModel", "columnVisibilityModel", "pinnedColumns", "sortModel", "paginationModel", "height", "hideToolbar", "initialState", "isRowSelectable", "license", "localStorageVersion", "previousLocalStorageVersions", "onFilterModelChange", "rowSelectionModel", "onColumnWidthChange", "onPaginationModelChange", "onRowSelectionModelChange", "onColumnVisibilityModelChange", "onPinnedColumnsChange", "onSortModelChange", "pagination", "paginationPlacement", "paginationProps", "rows", "pageSizeOptions", "sx", "theme", "useRouter", "paginationMode", "rowCount"];
2197
3423
  const COMPONENT_NAME = 'DataGrid';
2198
3424
  const CLASSNAME = 'redsift-datagrid';
2199
3425
 
@@ -2286,13 +3512,13 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2286
3512
  theme: propsTheme,
2287
3513
  useRouter,
2288
3514
  paginationMode = 'client',
2289
- rowCount,
2290
- density: _density
3515
+ rowCount
2291
3516
  } = props,
2292
3517
  forwardedProps = _objectWithoutProperties(props, _excluded);
2293
- const theme = useTheme(propsTheme);
3518
+ const theme = useTheme$1(propsTheme);
2294
3519
  const _apiRef = useGridApiRef();
2295
3520
  const apiRef = propsApiRef !== null && propsApiRef !== void 0 ? propsApiRef : _apiRef;
3521
+ const RenderedToolbar = slots !== null && slots !== void 0 && slots.toolbar ? slots.toolbar : Toolbar;
2296
3522
  LicenseInfo.setLicenseKey(license);
2297
3523
  const height = propsHeight !== null && propsHeight !== void 0 ? propsHeight : autoHeight ? undefined : '500px';
2298
3524
  const {
@@ -2342,9 +3568,9 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2342
3568
  localStorageVersion,
2343
3569
  previousLocalStorageVersions
2344
3570
  });
2345
- const [rowSelectionModel, setRowSelectionModel] = useState(() => normalizeRowSelectionModel(propsRowSelectionModel));
3571
+ const [rowSelectionModel, setRowSelectionModel] = useState(propsRowSelectionModel !== null && propsRowSelectionModel !== void 0 ? propsRowSelectionModel : []);
2346
3572
  useEffect(() => {
2347
- setRowSelectionModel(normalizeRowSelectionModel(propsRowSelectionModel));
3573
+ setRowSelectionModel(propsRowSelectionModel !== null && propsRowSelectionModel !== void 0 ? propsRowSelectionModel : []);
2348
3574
  }, [propsRowSelectionModel]);
2349
3575
  const onRowSelectionModelChange = (selectionModel, details) => {
2350
3576
  setRowSelectionModel(selectionModel);
@@ -2358,36 +3584,15 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2358
3584
  pageSize: paginationModel.pageSize
2359
3585
  });
2360
3586
 
2361
- // Version counter to force re-renders when selectionStatus ref changes
2362
- const [, forceSelectionUpdate] = useState(0);
2363
-
2364
3587
  // The checkboxSelectionVisibleOnly should only be applied to client-side pagination,
2365
3588
  // for server-side pagination it produces inconsistent behavior when selecting all rows in pages 2 and beyond
2366
3589
  const checkboxSelectionVisibleOnly = Boolean(pagination) && Boolean(paginationMode != 'server');
2367
3590
 
2368
- // Track when the grid API is ready to ensure top pagination renders correctly
2369
- const [gridReady, setGridReady] = useState(false);
2370
-
2371
- // Force re-render when the grid API becomes ready (for top pagination)
2372
- useEffect(() => {
2373
- if (apiRef.current && !gridReady) {
2374
- setGridReady(true);
2375
- }
2376
- });
2377
-
2378
- // Sync persisted density via apiRef — initialState only applies on mount,
2379
- // so this handles SPA back/forward navigation where controlledDensity changes after mount
2380
- useEffect(() => {
2381
- if (apiRef.current) {
2382
- apiRef.current.setDensity(controlledDensity);
2383
- }
2384
- }, [controlledDensity, apiRef]);
2385
-
2386
3591
  // in server-side pagination we want to update the selection status
2387
3592
  // every time we navigate between pages, resize our page or select something
2388
3593
  useEffect(() => {
2389
3594
  if (paginationMode == 'server') {
2390
- onServerSideSelectionStatusChange(rowSelectionModel, apiRef, selectionStatusRef, forceSelectionUpdate, isRowSelectable, paginationModel.page, paginationModel.pageSize);
3595
+ onServerSideSelectionStatusChange(Array.isArray(rowSelectionModel) ? rowSelectionModel : [rowSelectionModel], apiRef, selectionStatusRef, isRowSelectable, paginationModel.page, paginationModel.pageSize);
2391
3596
  }
2392
3597
  }, [rowSelectionModel, paginationModel.page, paginationModel.pageSize, rows]);
2393
3598
  if (!Array.isArray(rows)) {
@@ -2399,15 +3604,9 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2399
3604
  // receive the fresh value in the same render cycle — no extra re-render needed.
2400
3605
  // The ref is kept in sync for the onRowSelectionModelChange callback's deselect logic.
2401
3606
  let selectionStatus = selectionStatusRef.current;
2402
- if (pagination && paginationMode !== 'server' && getSelectionCount(rowSelectionModel) > 0) {
3607
+ if (pagination && paginationMode !== 'server' && Array.isArray(rowSelectionModel) && rowSelectionModel.length > 0) {
2403
3608
  try {
2404
- // Use manual page slicing instead of gridPaginatedVisibleSorted* selectors.
2405
- // MUI's paginated selectors use apiRef internal state which may be stale when
2406
- // paginationModel prop changes — our React state is always up to date.
2407
- const allFilteredEntries = gridFilteredSortedRowEntriesSelector(apiRef);
2408
- const pageStart = paginationModel.page * paginationModel.pageSize;
2409
- const pageEntries = allFilteredEntries.slice(pageStart, pageStart + paginationModel.pageSize);
2410
- const selectableRowsInPage = isRowSelectable ? pageEntries.filter(_ref => {
3609
+ const selectableRowsInPage = isRowSelectable ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref => {
2411
3610
  let {
2412
3611
  model
2413
3612
  } = _ref;
@@ -2419,29 +3618,24 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2419
3618
  id
2420
3619
  } = _ref2;
2421
3620
  return id;
2422
- }) : pageEntries.map(_ref3 => {
2423
- let {
2424
- id
2425
- } = _ref3;
2426
- return id;
2427
- });
3621
+ }) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
2428
3622
  const numberOfSelectableRowsInPage = selectableRowsInPage.length;
2429
- const selectableRowsInTable = isRowSelectable ? allFilteredEntries.filter(_ref4 => {
3623
+ const selectableRowsInTable = isRowSelectable ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref3 => {
2430
3624
  let {
2431
3625
  model
2432
- } = _ref4;
3626
+ } = _ref3;
2433
3627
  return isRowSelectable({
2434
3628
  row: model
2435
3629
  });
2436
- }).map(_ref5 => {
3630
+ }).map(_ref4 => {
2437
3631
  let {
2438
3632
  id
2439
- } = _ref5;
3633
+ } = _ref4;
2440
3634
  return id;
2441
3635
  }) : gridFilteredSortedRowIdsSelector(apiRef);
2442
3636
  const numberOfSelectableRowsInTable = selectableRowsInTable.length;
2443
- const numberOfSelectedRows = getSelectionCount(rowSelectionModel);
2444
- const selectedOnCurrentPage = selectableRowsInPage.filter(id => isRowSelected(rowSelectionModel, id));
3637
+ const numberOfSelectedRows = rowSelectionModel.length;
3638
+ const selectedOnCurrentPage = selectableRowsInPage.filter(id => rowSelectionModel.includes(id));
2445
3639
  if (numberOfSelectedRows === numberOfSelectableRowsInTable && numberOfSelectableRowsInPage < numberOfSelectableRowsInTable) {
2446
3640
  selectionStatus = {
2447
3641
  type: 'table',
@@ -2495,31 +3689,11 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2495
3689
  ref: datagridRef,
2496
3690
  className: classNames(StatefulDataGrid.className, className),
2497
3691
  $height: height
2498
- }, pagination && ['top', 'both'].includes(paginationPlacement) && gridReady ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, {
2499
- displaySelection: true,
2500
- displayRowsPerPage: ['top', 'both'].includes(paginationPlacement),
2501
- displayPagination: ['top', 'both'].includes(paginationPlacement),
2502
- selectionStatus: selectionStatus,
2503
- paginationModel: paginationModel,
2504
- onPaginationModelChange: onPaginationModelChange,
2505
- pageSizeOptions: pageSizeOptions,
2506
- paginationProps: paginationProps,
2507
- rowCount: rowCount
2508
- }) : /*#__PURE__*/React__default.createElement(ControlledPagination, {
2509
- displaySelection: true,
2510
- displayRowsPerPage: ['top', 'both'].includes(paginationPlacement),
2511
- displayPagination: ['top', 'both'].includes(paginationPlacement),
2512
- selectionStatus: selectionStatus,
2513
- apiRef: apiRef,
2514
- isRowSelectable: isRowSelectable,
2515
- paginationModel: paginationModel,
2516
- onPaginationModelChange: onPaginationModelChange,
2517
- pageSizeOptions: pageSizeOptions,
2518
- paginationProps: paginationProps
2519
- }) : null, /*#__PURE__*/React__default.createElement(DataGridPremium, _extends({}, forwardedProps, {
3692
+ }, /*#__PURE__*/React__default.createElement(DataGridPro, _extends$1({}, forwardedProps, {
2520
3693
  apiRef: apiRef,
2521
3694
  columns: columns,
2522
3695
  columnVisibilityModel: columnVisibilityModel,
3696
+ density: controlledDensity,
2523
3697
  filterModel: filterModel,
2524
3698
  onColumnVisibilityModelChange: onColumnVisibilityModelChange,
2525
3699
  onFilterModelChange: onFilterModelChange,
@@ -2531,9 +3705,7 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2531
3705
  sortModel: sortModel,
2532
3706
  pageSizeOptions: pageSizeOptions,
2533
3707
  onColumnWidthChange: onColumnWidthChange,
2534
- initialState: _objectSpread2(_objectSpread2({}, initialState), {}, {
2535
- density: controlledDensity
2536
- }),
3708
+ initialState: initialState,
2537
3709
  isRowSelectable: isRowSelectable,
2538
3710
  pagination: pagination,
2539
3711
  paginationMode: paginationMode,
@@ -2542,48 +3714,48 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2542
3714
  rowCount: rowCount,
2543
3715
  autoHeight: autoHeight,
2544
3716
  checkboxSelectionVisibleOnly: checkboxSelectionVisibleOnly,
2545
- disableRowSelectionExcludeModel: true,
2546
- showToolbar: !hideToolbar,
2547
3717
  slots: _objectSpread2(_objectSpread2({
2548
3718
  baseButton: BaseButton,
2549
3719
  baseCheckbox: BaseCheckbox,
2550
- baseIconButton: BaseIconButton,
2551
- columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2552
- displayName: "columnFilteredIcon"
3720
+ // baseTextField,
3721
+ basePopper: BasePopper,
3722
+ columnFilteredIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3723
+ displayName: "ColumnFilteredIcon"
2553
3724
  })),
2554
- columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2555
- displayName: "columnSelectorIcon"
3725
+ columnSelectorIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3726
+ displayName: "ColumnSelectorIcon"
2556
3727
  })),
2557
- columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2558
- displayName: "columnSortedAscendingIcon"
3728
+ columnSortedAscendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3729
+ displayName: "ColumnSortedAscendingIcon"
2559
3730
  })),
2560
- columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2561
- displayName: "columnSortedDescendingIcon"
3731
+ columnSortedDescendingIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3732
+ displayName: "ColumnSortedDescendingIcon"
2562
3733
  })),
2563
- densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2564
- displayName: "densityCompactIcon"
3734
+ densityCompactIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3735
+ displayName: "DensityCompactIcon"
2565
3736
  })),
2566
- densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2567
- displayName: "densityStandardIcon"
3737
+ densityStandardIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3738
+ displayName: "DensityStandardIcon"
2568
3739
  })),
2569
- densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2570
- displayName: "densityComfortableIcon"
3740
+ densityComfortableIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3741
+ displayName: "DensityComfortableIcon"
2571
3742
  })),
2572
- detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2573
- displayName: "detailPanelCollapseIcon"
3743
+ detailPanelCollapseIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3744
+ displayName: "DetailPanelCollapseIcon"
2574
3745
  })),
2575
- detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2576
- displayName: "detailPanelExpandIcon"
3746
+ detailPanelExpandIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3747
+ displayName: "DetailPanelExpandIcon"
2577
3748
  })),
2578
- exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2579
- displayName: "exportIcon"
3749
+ exportIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({}, props, {
3750
+ displayName: "ExportIcon"
2580
3751
  })),
2581
- openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends({}, props, {
2582
- displayName: "openFilterButtonIcon"
2583
- }))
3752
+ openFilterButtonIcon: props => /*#__PURE__*/React__default.createElement(BaseIcon, _extends$1({
3753
+ displayName: "OpenFilterButtonIcon"
3754
+ }, props))
2584
3755
  }, slots), {}, {
3756
+ toolbar: ToolbarWrapper,
2585
3757
  pagination: props => {
2586
- return pagination ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, _extends({}, props, {
3758
+ return pagination ? paginationMode == 'server' ? /*#__PURE__*/React__default.createElement(ServerSideControlledPagination, _extends$1({}, props, {
2587
3759
  displaySelection: false,
2588
3760
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
2589
3761
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
@@ -2592,8 +3764,9 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2592
3764
  onPaginationModelChange: onPaginationModelChange,
2593
3765
  pageSizeOptions: pageSizeOptions,
2594
3766
  paginationProps: paginationProps,
3767
+ paginationMode: paginationMode,
2595
3768
  rowCount: rowCount
2596
- })) : /*#__PURE__*/React__default.createElement(ControlledPagination, _extends({}, props, {
3769
+ })) : /*#__PURE__*/React__default.createElement(ControlledPagination, _extends$1({}, props, {
2597
3770
  displaySelection: false,
2598
3771
  displayRowsPerPage: ['bottom', 'both'].includes(paginationPlacement),
2599
3772
  displayPagination: ['bottom', 'both'].includes(paginationPlacement),
@@ -2603,57 +3776,65 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2603
3776
  paginationModel: paginationModel,
2604
3777
  onPaginationModelChange: onPaginationModelChange,
2605
3778
  pageSizeOptions: pageSizeOptions,
2606
- paginationProps: paginationProps
3779
+ paginationProps: paginationProps,
3780
+ paginationMode: paginationMode
2607
3781
  })) : null;
2608
3782
  }
2609
3783
  }),
2610
- slotProps: _objectSpread2({}, slotProps),
3784
+ slotProps: _objectSpread2(_objectSpread2({}, slotProps), {}, {
3785
+ toolbar: _objectSpread2({
3786
+ hideToolbar,
3787
+ RenderedToolbar,
3788
+ filterModel,
3789
+ onFilterModelChange,
3790
+ pagination,
3791
+ paginationPlacement,
3792
+ selectionStatus,
3793
+ apiRef,
3794
+ isRowSelectable,
3795
+ paginationModel,
3796
+ onPaginationModelChange,
3797
+ pageSizeOptions,
3798
+ paginationProps,
3799
+ paginationMode,
3800
+ rowCount
3801
+ }, slotProps === null || slotProps === void 0 ? void 0 : slotProps.toolbar)
3802
+ }),
2611
3803
  rowSelectionModel: rowSelectionModel,
2612
3804
  onRowSelectionModelChange: (newSelectionModel, details) => {
2613
3805
  if (pagination && paginationMode != 'server') {
2614
- // Use manual page slicing instead of gridPaginatedVisibleSorted* selectors
2615
- // to avoid stale apiRef pagination state.
2616
- const allFilteredEntries = gridFilteredSortedRowEntriesSelector(apiRef);
2617
- const pageStart = paginationModel.page * paginationModel.pageSize;
2618
- const pageEntries = allFilteredEntries.slice(pageStart, pageStart + paginationModel.pageSize);
2619
- const selectableRowsInPage = isRowSelectable ? pageEntries.filter(_ref6 => {
3806
+ const selectableRowsInPage = isRowSelectable ? gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef).filter(_ref5 => {
2620
3807
  let {
2621
3808
  model
2622
- } = _ref6;
3809
+ } = _ref5;
2623
3810
  return isRowSelectable({
2624
3811
  row: model
2625
3812
  });
2626
- }).map(_ref7 => {
2627
- let {
2628
- id
2629
- } = _ref7;
2630
- return id;
2631
- }) : pageEntries.map(_ref8 => {
3813
+ }).map(_ref6 => {
2632
3814
  let {
2633
3815
  id
2634
- } = _ref8;
3816
+ } = _ref6;
2635
3817
  return id;
2636
- });
3818
+ }) : gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);
2637
3819
  const numberOfSelectableRowsInPage = selectableRowsInPage.length;
2638
- const selectableRowsInTable = isRowSelectable ? allFilteredEntries.filter(_ref9 => {
3820
+ const selectableRowsInTable = isRowSelectable ? gridFilteredSortedRowEntriesSelector(apiRef).filter(_ref7 => {
2639
3821
  let {
2640
3822
  model
2641
- } = _ref9;
3823
+ } = _ref7;
2642
3824
  return isRowSelectable({
2643
3825
  row: model
2644
3826
  });
2645
- }).map(_ref10 => {
3827
+ }).map(_ref8 => {
2646
3828
  let {
2647
3829
  id
2648
- } = _ref10;
3830
+ } = _ref8;
2649
3831
  return id;
2650
3832
  }) : gridFilteredSortedRowIdsSelector(apiRef);
2651
3833
  const numberOfSelectableRowsInTable = selectableRowsInTable.length;
2652
- const numberOfSelectedRows = getSelectionCount(newSelectionModel);
3834
+ const numberOfSelectedRows = newSelectionModel.length;
2653
3835
  if (selectionStatusRef.current.type === 'table' && numberOfSelectedRows === numberOfSelectableRowsInTable - numberOfSelectableRowsInPage || selectionStatusRef.current.type === 'table' && numberOfSelectedRows === numberOfSelectableRowsInTable || selectionStatusRef.current.type === 'page' && numberOfSelectedRows === numberOfSelectableRowsInPage) {
2654
3836
  setTimeout(() => {
2655
- var _apiRef$current;
2656
- (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : _apiRef$current.selectRows([], true, true);
3837
+ apiRef.current.selectRows([], true, true);
2657
3838
  }, 0);
2658
3839
  }
2659
3840
  if (numberOfSelectedRows === numberOfSelectableRowsInPage && numberOfSelectableRowsInPage < numberOfSelectableRowsInTable) {
@@ -2677,7 +3858,6 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2677
3858
  numberOfSelectedRows
2678
3859
  };
2679
3860
  }
2680
- forceSelectionUpdate(v => v + 1);
2681
3861
  }
2682
3862
  onRowSelectionModelChange === null || onRowSelectionModelChange === void 0 ? void 0 : onRowSelectionModelChange(newSelectionModel, details);
2683
3863
  },
@@ -2695,5 +3875,5 @@ const StatefulDataGrid = /*#__PURE__*/forwardRef((props, ref) => {
2695
3875
  StatefulDataGrid.className = CLASSNAME;
2696
3876
  StatefulDataGrid.displayName = COMPONENT_NAME;
2697
3877
 
2698
- export { buildQueryParamsString as $, ARRAY_IS_EMPTY as A, IS as B, CONTAINS_ANY_OF as C, DOES_NOT_CONTAIN as D, ENDS_WITH_ANY_OF as E, IS_NOT as F, getGridStringOperators as G, HAS_WITH_SELECT as H, IS_ANY_OF as I, getGridStringArrayOperators as J, getGridStringArrayOperatorsWithSelect as K, getGridStringArrayOperatorsWithSelectOnStringArrayColumns as L, FILTER_MODEL_KEY as M, SORT_MODEL_KEY as N, PINNED_COLUMNS as O, PAGINATION_MODEL_KEY as P, DIMENSION_MODEL_KEY as Q, FILTER_SEARCH_KEY as R, STARTS_WITH_ANY_OF as S, DENSITY_MODEL_KEY as T, CATEGORIES as U, VISIBILITY_MODEL_KEY as V, buildStorageKey as W, clearPreviousVersionStorage as X, convertToDisplayFormat as Y, convertFromDisplayFormat as Z, getDecodedSearchFromUrl as _, DOES_NOT_EQUAL as a, areSearchStringsEqual as a0, decodeValue as a1, encodeValue as a2, urlSearchParamsToString as a3, numberOperatorEncoder as a4, numberOperatorDecoder as a5, isOperatorValueValid as a6, isValueValid as a7, getFilterModelFromString as a8, getSearchParamsFromFilterModel as a9, getSortingFromString as aa, getSearchParamsFromSorting as ab, getPaginationFromString as ac, getSearchParamsFromPagination as ad, getColumnVisibilityFromString as ae, getSearchParamsFromColumnVisibility as af, getPinnedColumnsFromString as ag, getSearchParamsFromPinnedColumns as ah, getSearchParamsFromTab as ai, getDensityFromString as aj, getSearchParamsFromDensity as ak, getFinalSearch as al, getModelsParsedOrUpdateLocalStorage as am, updateUrl as an, areFilterModelsEquivalent as ao, StatefulDataGrid as ap, DOES_NOT_START_WITH as b, DOES_NOT_END_WITH as c, IS_NOT_ANY_OF as d, DOES_NOT_CONTAIN_ANY_OF as e, DOES_NOT_START_WITH_ANY_OF as f, DOES_NOT_END_WITH_ANY_OF as g, IS_BETWEEN as h, IS_WITH_SELECT as i, IS_NOT_WITH_SELECT as j, IS_ANY_OF_WITH_SELECT as k, IS_NOT_ANY_OF_WITH_SELECT as l, ARRAY_IS_NOT_EMPTY as m, DOES_NOT_HAVE_WITH_SELECT as n, operatorList as o, HAS_ANY_OF_WITH_SELECT as p, HAS_ALL_OF_WITH_SELECT as q, DOES_NOT_HAVE_ANY_OF_WITH_SELECT as r, HAS_ONLY_WITH_SELECT as s, HAS as t, DOES_NOT_HAVE as u, HAS_ANY_OF as v, HAS_ALL_OF as w, DOES_NOT_HAVE_ANY_OF as x, HAS_ONLY as y, getGridNumericOperators as z };
3878
+ export { convertFromDisplayFormat as $, ARRAY_IS_EMPTY as A, Box$1 as B, CONTAINS_ANY_OF as C, DOES_NOT_CONTAIN as D, ENDS_WITH_ANY_OF as E, IS as F, IS_NOT as G, HAS_WITH_SELECT as H, IS_ANY_OF as I, getGridStringOperators as J, getGridStringArrayOperators as K, getGridStringArrayOperatorsWithSelect as L, getGridStringArrayOperatorsWithSelectOnStringArrayColumns as M, FILTER_MODEL_KEY as N, SORT_MODEL_KEY as O, PAGINATION_MODEL_KEY as P, PINNED_COLUMNS as Q, DIMENSION_MODEL_KEY as R, STARTS_WITH_ANY_OF as S, TextField$1 as T, FILTER_SEARCH_KEY as U, VISIBILITY_MODEL_KEY as V, DENSITY_MODEL_KEY as W, CATEGORIES as X, buildStorageKey as Y, clearPreviousVersionStorage as Z, convertToDisplayFormat as _, DOES_NOT_EQUAL as a, getDecodedSearchFromUrl as a0, buildQueryParamsString as a1, areSearchStringsEqual as a2, decodeValue as a3, encodeValue as a4, urlSearchParamsToString as a5, numberOperatorEncoder as a6, numberOperatorDecoder as a7, isOperatorValueValid as a8, isValueValid as a9, getFilterModelFromString as aa, getSearchParamsFromFilterModel as ab, getSortingFromString as ac, getSearchParamsFromSorting as ad, getPaginationFromString as ae, getSearchParamsFromPagination as af, getColumnVisibilityFromString as ag, getSearchParamsFromColumnVisibility as ah, getPinnedColumnsFromString as ai, getSearchParamsFromPinnedColumns as aj, getSearchParamsFromTab as ak, getDensityFromString as al, getSearchParamsFromDensity as am, getFinalSearch as an, getModelsParsedOrUpdateLocalStorage as ao, updateUrl as ap, areFilterModelsEquivalent as aq, StatefulDataGrid as ar, DOES_NOT_START_WITH as b, DOES_NOT_END_WITH as c, IS_NOT_ANY_OF as d, DOES_NOT_CONTAIN_ANY_OF as e, DOES_NOT_START_WITH_ANY_OF as f, DOES_NOT_END_WITH_ANY_OF as g, IS_BETWEEN as h, IS_WITH_SELECT as i, IS_NOT_WITH_SELECT as j, IS_ANY_OF_WITH_SELECT as k, IS_NOT_ANY_OF_WITH_SELECT as l, ARRAY_IS_NOT_EMPTY as m, DOES_NOT_HAVE_WITH_SELECT as n, operatorList as o, HAS_ANY_OF_WITH_SELECT as p, HAS_ALL_OF_WITH_SELECT as q, DOES_NOT_HAVE_ANY_OF_WITH_SELECT as r, HAS_ONLY_WITH_SELECT as s, HAS as t, DOES_NOT_HAVE as u, HAS_ANY_OF as v, HAS_ALL_OF as w, DOES_NOT_HAVE_ANY_OF as x, HAS_ONLY as y, getGridNumericOperators as z };
2699
3879
  //# sourceMappingURL=StatefulDataGrid2.js.map