@mui/x-data-grid 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/components/GridHeader.d.ts +2 -2
  3. package/components/GridHeader.js +4 -6
  4. package/components/base/GridBody.d.ts +0 -1
  5. package/components/base/GridBody.js +32 -15
  6. package/components/columnSelection/GridCellCheckboxRenderer.d.ts +1 -1
  7. package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  8. package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
  9. package/components/containers/GridMainContainer.d.ts +3 -1
  10. package/components/containers/GridMainContainer.js +3 -2
  11. package/components/containers/GridRoot.js +0 -5
  12. package/components/index.d.ts +0 -1
  13. package/components/index.js +0 -1
  14. package/components/panel/GridColumnsPanel.js +3 -2
  15. package/components/panel/GridPanel.d.ts +2 -2
  16. package/components/panel/GridPanel.js +2 -1
  17. package/components/panel/filterPanel/GridFilterPanel.js +5 -2
  18. package/hooks/features/dimensions/gridDimensionsApi.d.ts +4 -0
  19. package/hooks/features/dimensions/useGridDimensions.js +49 -10
  20. package/hooks/features/export/useGridPrintExport.js +3 -1
  21. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -0
  22. package/hooks/features/virtualization/useGridVirtualScroller.js +11 -5
  23. package/index.js +1 -1
  24. package/joy/index.d.ts +2 -0
  25. package/joy/index.js +2 -0
  26. package/joy/joySlots.d.ts +4 -0
  27. package/joy/joySlots.js +71 -0
  28. package/joy/package.json +6 -0
  29. package/legacy/components/GridHeader.js +4 -6
  30. package/legacy/components/base/GridBody.js +33 -16
  31. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  32. package/legacy/components/containers/GridMainContainer.js +3 -2
  33. package/legacy/components/containers/GridRoot.js +0 -5
  34. package/legacy/components/index.js +0 -1
  35. package/legacy/components/panel/GridColumnsPanel.js +3 -2
  36. package/legacy/components/panel/GridPanel.js +2 -1
  37. package/legacy/components/panel/filterPanel/GridFilterPanel.js +5 -2
  38. package/legacy/hooks/features/dimensions/useGridDimensions.js +55 -12
  39. package/legacy/hooks/features/export/useGridPrintExport.js +3 -1
  40. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +12 -6
  41. package/legacy/index.js +1 -1
  42. package/legacy/joy/index.js +2 -0
  43. package/legacy/joy/joySlots.js +73 -0
  44. package/material/index.d.ts +1 -1
  45. package/models/gridSlotsComponent.d.ts +2 -2
  46. package/modern/components/GridHeader.js +4 -6
  47. package/modern/components/base/GridBody.js +32 -15
  48. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  49. package/modern/components/containers/GridMainContainer.js +3 -2
  50. package/modern/components/containers/GridRoot.js +0 -5
  51. package/modern/components/index.js +0 -1
  52. package/modern/components/panel/GridColumnsPanel.js +3 -2
  53. package/modern/components/panel/GridPanel.js +2 -1
  54. package/modern/components/panel/filterPanel/GridFilterPanel.js +5 -2
  55. package/modern/hooks/features/dimensions/useGridDimensions.js +48 -10
  56. package/modern/hooks/features/export/useGridPrintExport.js +3 -1
  57. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +11 -5
  58. package/modern/index.js +1 -1
  59. package/modern/joy/index.js +2 -0
  60. package/modern/joy/joySlots.js +71 -0
  61. package/node/components/GridHeader.js +5 -8
  62. package/node/components/base/GridBody.js +32 -15
  63. package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
  64. package/node/components/containers/GridMainContainer.js +5 -3
  65. package/node/components/containers/GridRoot.js +0 -5
  66. package/node/components/index.js +0 -11
  67. package/node/components/panel/GridColumnsPanel.js +3 -2
  68. package/node/components/panel/GridPanel.js +2 -1
  69. package/node/components/panel/filterPanel/GridFilterPanel.js +5 -2
  70. package/node/hooks/features/dimensions/useGridDimensions.js +47 -9
  71. package/node/hooks/features/export/useGridPrintExport.js +3 -1
  72. package/node/hooks/features/virtualization/useGridVirtualScroller.js +11 -5
  73. package/node/index.js +1 -1
  74. package/node/joy/index.js +13 -0
  75. package/node/joy/joySlots.js +79 -0
  76. package/package.json +1 -1
  77. package/components/GridAutoSizer.d.ts +0 -44
  78. package/components/GridAutoSizer.js +0 -126
  79. package/legacy/components/GridAutoSizer.js +0 -132
  80. package/modern/components/GridAutoSizer.js +0 -125
  81. package/node/components/GridAutoSizer.js +0 -132
package/CHANGELOG.md CHANGED
@@ -3,9 +3,57 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.2.1
7
+
8
+ _Apr 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Add virtualization to row detail panels (#7969) @yaredtsy
13
+ - 🐞 Bugfixes
14
+ - 📚 Documentation improvements
15
+
16
+ ### `@mui/x-data-grid@v6.2.1` / `@mui/x-data-grid-pro@v6.2.1` / `@mui/x-data-grid-premium@v6.2.1`
17
+
18
+ #### Changes
19
+
20
+ - [DataGrid] Add `getTogglableColumns` to `Hide all` and `Show all` actions (#8496) @MBilalShafi
21
+ - [DataGrid] Add Grid + Joy UI experiment page (#8067) @cherniavskii
22
+ - [DataGrid] Fix print style when rendering inside Shadow DOM (#8656) @Bwatermelon
23
+ - [DataGrid] Replace `GridAutoSizer` with `ResizeObserver` (#8091) @m4theushw
24
+ - [DataGrid] Use stable ID for the placeholder filter item (#8603) @m4theushw
25
+ - [DataGridPro] Virtualize row detail panels (#7969) @yaredtsy
26
+
27
+ ### `@mui/x-date-pickers@v6.2.1` / `@mui/x-date-pickers-pro@v6.2.1`
28
+
29
+ #### Changes
30
+
31
+ - [pickers] Do not include the time in date components when going to today (#8657) @flaviendelangle
32
+ - [pickers] Sync internal state with controlled value (#8674) @alexfauquette
33
+
34
+ ### `@mui/x-codemod@v6.0.6`
35
+
36
+ #### Changes
37
+
38
+ - [codemod] Avoid filter failures on object prototype properties (#8647) @LukasTy
39
+
40
+ ### Docs
41
+
42
+ - [docs] Add no-op service worker to fix stale cache issue (#8598) @cherniavskii
43
+ - [docs] Clarify what `AdapterDayjs` is in the Getting Started page (#8219) @flaviendelangle
44
+ - [docs] Fix typo on picker page description (#8611) @maxolasersquad
45
+ - [docs] Improve section title in Getting Started page (#8648) @flaviendelangle
46
+ - [docs] Inform about input format modification (#8458) @alexfauquette
47
+
48
+ ### Core
49
+
50
+ - [core] Fix release date (#8618) @flaviendelangle
51
+ - [core] Upgrade monorepo (#8668) @MBilalShafi
52
+ - [charts] Support Tooltip (#8356) @alexfauquette
53
+
6
54
  ## 6.2.0
7
55
 
8
- _Apr 13, 2023_
56
+ _Apr 14, 2023_
9
57
 
10
58
  We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
11
59
 
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
2
- export declare const GridHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1
+ /// <reference types="react" />
2
+ export declare function GridHeader(): JSX.Element;
@@ -3,12 +3,10 @@ import * as React from 'react';
3
3
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
6
- export const GridHeader = /*#__PURE__*/React.forwardRef(function GridHeader(props, ref) {
6
+ export function GridHeader() {
7
7
  var _rootProps$slotProps, _rootProps$slotProps2;
8
8
  const rootProps = useGridRootProps();
9
- return /*#__PURE__*/_jsxs("div", _extends({
10
- ref: ref
11
- }, props, {
9
+ return /*#__PURE__*/_jsxs(React.Fragment, {
12
10
  children: [/*#__PURE__*/_jsx(rootProps.slots.preferencesPanel, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.preferencesPanel)), rootProps.slots.toolbar && /*#__PURE__*/_jsx(rootProps.slots.toolbar, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.toolbar))]
13
- }));
14
- });
11
+ });
12
+ }
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  interface GridBodyProps {
3
- children?: React.ReactNode;
4
3
  ColumnHeadersProps?: Record<string, any>;
5
4
  VirtualScrollerComponent: React.JSXElementConstructor<React.HTMLAttributes<HTMLDivElement> & {
6
5
  ref: React.Ref<HTMLDivElement>;
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
4
5
  import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
5
6
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
6
7
  import { GridMainContainer } from '../containers/GridMainContainer';
7
- import { GridAutoSizer } from '../GridAutoSizer';
8
8
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
9
9
  import { gridColumnPositionsSelector, gridColumnVisibilityModelSelector, gridVisibleColumnDefinitionsSelector } from '../../hooks/features/columns/gridColumnsSelector';
10
10
  import { gridFilterActiveItemsLookupSelector } from '../../hooks/features/filter/gridFilterSelector';
@@ -17,12 +17,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
18
  function GridBody(props) {
19
19
  const {
20
- children,
21
20
  VirtualScrollerComponent,
22
21
  ColumnHeadersProps
23
22
  } = props;
24
23
  const apiRef = useGridPrivateApiContext();
25
24
  const rootProps = useGridRootProps();
25
+ const rootRef = React.useRef(null);
26
26
  const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
27
27
  const filterColumnLookup = useGridSelector(apiRef, gridFilterActiveItemsLookupSelector);
28
28
  const sortColumnLookup = useGridSelector(apiRef, gridSortColumnLookupSelector);
@@ -39,6 +39,24 @@ function GridBody(props) {
39
39
  const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
40
40
  const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
41
41
  const [isVirtualizationDisabled, setIsVirtualizationDisabled] = React.useState(rootProps.disableVirtualization);
42
+ useEnhancedEffect(() => {
43
+ apiRef.current.computeSizeAndPublishResizeEvent();
44
+ const elementToObserve = rootRef.current;
45
+ if (typeof ResizeObserver === 'undefined') {
46
+ return () => {};
47
+ }
48
+ const observer = new ResizeObserver(() => {
49
+ apiRef.current.computeSizeAndPublishResizeEvent();
50
+ });
51
+ if (elementToObserve) {
52
+ observer.observe(elementToObserve);
53
+ }
54
+ return () => {
55
+ if (elementToObserve) {
56
+ observer.unobserve(elementToObserve);
57
+ }
58
+ };
59
+ }, [apiRef]);
42
60
  const disableVirtualization = React.useCallback(() => {
43
61
  setIsVirtualizationDisabled(true);
44
62
  }, []);
@@ -65,10 +83,9 @@ function GridBody(props) {
65
83
  columnHeadersElementRef: columnHeadersRef,
66
84
  virtualScrollerRef
67
85
  });
68
- const handleResize = React.useCallback(size => {
69
- apiRef.current.publishEvent('resize', size);
70
- }, [apiRef]);
86
+ const hasDimensions = !!apiRef.current.getRootDimensions();
71
87
  return /*#__PURE__*/_jsxs(GridMainContainer, {
88
+ ref: rootRef,
72
89
  children: [/*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
73
90
  ref: columnsContainerRef,
74
91
  innerRef: columnHeadersRef,
@@ -86,15 +103,16 @@ function GridBody(props) {
86
103
  columnVisibility: columnVisibility,
87
104
  columnGroupsHeaderStructure: columnGroupsHeaderStructure,
88
105
  hasOtherElementInTabSequence: hasOtherElementInTabSequence
89
- }, ColumnHeadersProps)), /*#__PURE__*/_jsx(GridAutoSizer, {
90
- nonce: rootProps.nonce,
91
- disableHeight: rootProps.autoHeight,
92
- onResize: handleResize,
93
- children: /*#__PURE__*/_jsx(VirtualScrollerComponent, {
94
- ref: virtualScrollerRef,
95
- disableVirtualization: isVirtualizationDisabled
96
- })
97
- }), children]
106
+ }, ColumnHeadersProps)), hasDimensions && /*#__PURE__*/_jsx(VirtualScrollerComponent
107
+ // The content is only rendered after dimensions are computed because
108
+ // the lazy-loading hook is listening to `renderedRowsIntervalChange`,
109
+ // but only does something if the dimensions are also available.
110
+ // If this event is published while dimensions haven't been computed,
111
+ // the `onFetchRows` prop won't be called during mount.
112
+ , {
113
+ ref: virtualScrollerRef,
114
+ disableVirtualization: isVirtualizationDisabled
115
+ })]
98
116
  });
99
117
  }
100
118
  process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
@@ -102,7 +120,6 @@ process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
102
120
  // | These PropTypes are generated from the TypeScript type definitions |
103
121
  // | To update them edit the TypeScript types and run "yarn proptypes" |
104
122
  // ----------------------------------------------------------------------
105
- children: PropTypes.node,
106
123
  ColumnHeadersProps: PropTypes.object,
107
124
  VirtualScrollerComponent: PropTypes.elementType.isRequired
108
125
  } : void 0;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { GridRenderCellParams } from '../../models/params/gridCellParams';
2
+ import type { GridRenderCellParams } from '../../models/params/gridCellParams';
3
3
  declare const GridCellCheckboxForwardRef: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
4
4
  export { GridCellCheckboxForwardRef };
5
5
  export declare const GridCellCheckboxRenderer: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
@@ -36,7 +36,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
36
36
  };
37
37
  const classes = useUtilityClasses(ownerState);
38
38
  const checkboxElement = React.useRef(null);
39
- const rippleRef = React.useRef();
39
+ const rippleRef = React.useRef(null);
40
40
  const handleRef = useForkRef(checkboxElement, ref);
41
41
  const element = apiRef.current.getCellElement(id, field);
42
42
  const handleChange = event => {
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- import { GridColumnHeaderParams } from '../../models/params/gridColumnHeaderParams';
2
+ import type { GridColumnHeaderParams } from '../../models/params/gridColumnHeaderParams';
3
3
  declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../../models/gridRows").GridValidRowModel, any, any> & React.RefAttributes<HTMLInputElement>>;
4
4
  export { GridHeaderCheckbox };
@@ -1,2 +1,4 @@
1
1
  import * as React from 'react';
2
- export declare function GridMainContainer(props: React.PropsWithChildren<{}>): JSX.Element;
2
+ export declare const GridMainContainer: React.ForwardRefExoticComponent<{
3
+ children?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -24,12 +24,13 @@ const GridMainContainerRoot = styled('div', {
24
24
  flexDirection: 'column',
25
25
  overflow: 'hidden'
26
26
  }));
27
- export function GridMainContainer(props) {
27
+ export const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
28
28
  const rootProps = useGridRootProps();
29
29
  const classes = useUtilityClasses(rootProps);
30
30
  return /*#__PURE__*/_jsx(GridMainContainerRoot, {
31
+ ref: ref,
31
32
  className: classes.root,
32
33
  ownerState: rootProps,
33
34
  children: props.children
34
35
  });
35
- }
36
+ });
@@ -54,11 +54,6 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
54
54
  useEnhancedEffect(() => {
55
55
  setMountedState(true);
56
56
  }, []);
57
- useEnhancedEffect(() => {
58
- if (mountedState) {
59
- apiRef.current.updateGridDimensionsRef();
60
- }
61
- }, [apiRef, mountedState]);
62
57
  if (!mountedState) {
63
58
  return null;
64
59
  }
@@ -8,7 +8,6 @@ export * from './menu';
8
8
  export * from './panel';
9
9
  export * from './toolbar';
10
10
  export * from './GridApiContext';
11
- export * from './GridAutoSizer';
12
11
  export * from './GridFooter';
13
12
  export * from './GridHeader';
14
13
  export * from './GridLoadingOverlay';
@@ -8,7 +8,6 @@ export * from './menu';
8
8
  export * from './panel';
9
9
  export * from './toolbar';
10
10
  export * from './GridApiContext';
11
- export * from './GridAutoSizer';
12
11
  export * from './GridFooter';
13
12
  export * from './GridHeader';
14
13
  export * from './GridLoadingOverlay';
@@ -95,8 +95,9 @@ function GridColumnsPanel(props) {
95
95
  const toggleAllColumns = React.useCallback(isVisible => {
96
96
  const currentModel = gridColumnVisibilityModelSelector(apiRef);
97
97
  const newModel = _extends({}, currentModel);
98
+ const togglableColumns = getTogglableColumns ? getTogglableColumns(columns) : null;
98
99
  columns.forEach(col => {
99
- if (col.hideable) {
100
+ if (col.hideable && (togglableColumns == null || togglableColumns.includes(col.field))) {
100
101
  if (isVisible) {
101
102
  // delete the key from the model instead of setting it to `true`
102
103
  delete newModel[col.field];
@@ -106,7 +107,7 @@ function GridColumnsPanel(props) {
106
107
  }
107
108
  });
108
109
  return apiRef.current.setColumnVisibilityModel(newModel);
109
- }, [apiRef, columns]);
110
+ }, [apiRef, columns, getTogglableColumns]);
110
111
  const handleSearchValueChange = React.useCallback(event => {
111
112
  setSearchValue(event.target.value);
112
113
  }, []);
@@ -21,10 +21,10 @@ declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit
21
21
  Root?: React.ElementType<any> | undefined;
22
22
  } | undefined;
23
23
  componentsProps?: {
24
- root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperUnstyledRootSlotPropsOverrides, import("@mui/base").PopperUnstyledOwnerState> | undefined;
24
+ root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperUnstyledRootSlotPropsOverrides, import("@mui/base").PopperUnstyledOwnProps> | undefined;
25
25
  } | undefined;
26
26
  sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
27
- } & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "ownerState" | "components" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps" | keyof React.RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
27
+ } & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "components" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps" | keyof React.RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
28
28
  ownerState: OwnerState;
29
29
  }, {}, {}>;
30
30
  declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -116,6 +116,7 @@ process.env.NODE_ENV !== "production" ? GridPanel.propTypes = {
116
116
  /**
117
117
  * If `true`, the component is shown.
118
118
  */
119
- open: PropTypes.bool.isRequired
119
+ open: PropTypes.bool.isRequired,
120
+ ownerState: PropTypes.object
120
121
  } : void 0;
121
122
  export { GridPanel };
@@ -27,6 +27,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
27
27
  const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
28
28
  const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);
29
29
  const lastFilterRef = React.useRef(null);
30
+ const placeholderFilter = React.useRef(null);
30
31
  const {
31
32
  logicOperators = [GridLogicOperator.And, GridLogicOperator.Or],
32
33
  columnsSort,
@@ -93,8 +94,10 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
93
94
  if (filterModel.items.length) {
94
95
  return filterModel.items;
95
96
  }
96
- const defaultFilter = getDefaultFilter();
97
- return defaultFilter ? [defaultFilter] : [];
97
+ if (!placeholderFilter.current) {
98
+ placeholderFilter.current = getDefaultFilter();
99
+ }
100
+ return placeholderFilter.current ? [placeholderFilter.current] : [];
98
101
  }, [filterModel.items, getDefaultFilter]);
99
102
  const hasMultipleFilters = items.length > 1;
100
103
  const addNewFilter = () => {
@@ -43,4 +43,8 @@ export interface GridDimensionsPrivateApi {
43
43
  * Forces a recalculation of all dimensions.
44
44
  */
45
45
  updateGridDimensionsRef: () => void;
46
+ /**
47
+ * Computes the size and publishes a `resize` event with the new value.
48
+ */
49
+ computeSizeAndPublishResizeEvent: () => void;
46
50
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { unstable_debounce as debounce, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
2
+ import { unstable_debounce as debounce, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';
3
3
  import { useGridApiEventHandler, useGridApiOptionHandler } from '../../utils/useGridApiEventHandler';
4
4
  import { useGridApiMethod } from '../../utils/useGridApiMethod';
5
5
  import { useGridLogger } from '../../utils/useGridLogger';
@@ -10,6 +10,7 @@ import { getVisibleRows } from '../../utils/useGridVisibleRows';
10
10
  import { gridRowsMetaSelector } from '../rows/gridRowsMetaSelector';
11
11
  import { calculatePinnedRowsHeight } from '../rows/gridRowsUtils';
12
12
  import { getTotalHeaderHeight } from '../columns/gridColumnsUtils';
13
+ import { gridClasses } from '../../../constants/gridClasses';
13
14
  const isTestEnvironment = process.env.NODE_ENV === 'test';
14
15
  const hasScroll = ({
15
16
  content,
@@ -114,10 +115,20 @@ export function useGridDimensions(apiRef, props) {
114
115
  apiRef.current.publishEvent('viewportInnerSizeChange', newFullDimensions.viewportInnerSize);
115
116
  }
116
117
  }, [apiRef, props.scrollbarSize, props.autoHeight, rowsMeta.currentPageTotalHeight, totalHeaderHeight]);
118
+ const [savedSize, setSavedSize] = React.useState();
119
+ const debouncedSetSavedSize = React.useMemo(() => debounce(setSavedSize, 60), []);
120
+ const previousSize = React.useRef();
121
+ useEnhancedEffect(() => {
122
+ if (savedSize) {
123
+ updateGridDimensionsRef();
124
+ apiRef.current.publishEvent('debouncedResize', rootDimensionsRef.current);
125
+ }
126
+ }, [apiRef, savedSize, updateGridDimensionsRef]);
127
+
128
+ // This is the function called by apiRef.current.resize()
117
129
  const resize = React.useCallback(() => {
118
- updateGridDimensionsRef();
119
- apiRef.current.publishEvent('debouncedResize', rootDimensionsRef.current);
120
- }, [apiRef, updateGridDimensionsRef]);
130
+ apiRef.current.computeSizeAndPublishResizeEvent();
131
+ }, [apiRef]);
121
132
  const getRootDimensions = React.useCallback(() => fullDimensionsRef.current, []);
122
133
  const getViewportPageSize = React.useCallback(() => {
123
134
  const dimensions = apiRef.current.getRootDimensions();
@@ -139,17 +150,45 @@ export function useGridDimensions(apiRef, props) {
139
150
  const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
140
151
  return Math.min(maximumPageSizeWithoutScrollBar, currentPage.rows.length);
141
152
  }, [apiRef, props.pagination, props.paginationMode, props.getRowHeight, rowHeight]);
153
+ const computeSizeAndPublishResizeEvent = React.useCallback(() => {
154
+ var _apiRef$current$rootE2, _previousSize$current, _previousSize$current2;
155
+ const rootEl = (_apiRef$current$rootE2 = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE2.current;
156
+ const mainEl = rootEl == null ? void 0 : rootEl.querySelector(`.${gridClasses.main}`);
157
+ if (!mainEl) {
158
+ return;
159
+ }
160
+ const height = mainEl.offsetHeight || 0;
161
+ const width = mainEl.offsetWidth || 0;
162
+ const win = ownerWindow(mainEl);
163
+ const computedStyle = win.getComputedStyle(mainEl);
164
+ const paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;
165
+ const paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;
166
+ const paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;
167
+ const paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;
168
+ const newHeight = height - paddingTop - paddingBottom;
169
+ const newWidth = width - paddingLeft - paddingRight;
170
+ const hasHeightChanged = newHeight !== ((_previousSize$current = previousSize.current) == null ? void 0 : _previousSize$current.height);
171
+ const hasWidthChanged = newWidth !== ((_previousSize$current2 = previousSize.current) == null ? void 0 : _previousSize$current2.width);
172
+ if (!previousSize.current || hasHeightChanged || hasWidthChanged) {
173
+ const size = {
174
+ width: newWidth,
175
+ height: newHeight
176
+ };
177
+ apiRef.current.publishEvent('resize', size);
178
+ previousSize.current = size;
179
+ }
180
+ }, [apiRef]);
142
181
  const dimensionsApi = {
143
182
  resize,
144
183
  getRootDimensions
145
184
  };
146
185
  const dimensionsPrivateApi = {
147
186
  getViewportPageSize,
148
- updateGridDimensionsRef
187
+ updateGridDimensionsRef,
188
+ computeSizeAndPublishResizeEvent
149
189
  };
150
190
  useGridApiMethod(apiRef, dimensionsApi, 'public');
151
191
  useGridApiMethod(apiRef, dimensionsPrivateApi, 'private');
152
- const debounceResize = React.useMemo(() => debounce(resize, 60), [resize]);
153
192
  const isFirstSizing = React.useRef(true);
154
193
  const handleResize = React.useCallback(size => {
155
194
  rootDimensionsRef.current = size;
@@ -166,18 +205,18 @@ export function useGridDimensions(apiRef, props) {
166
205
  }
167
206
  if (isTestEnvironment) {
168
207
  // We don't need to debounce the resize for tests.
169
- resize();
208
+ setSavedSize(size);
170
209
  isFirstSizing.current = false;
171
210
  return;
172
211
  }
173
212
  if (isFirstSizing.current) {
174
213
  // We want to initialize the grid dimensions as soon as possible to avoid flickering
175
- resize();
214
+ setSavedSize(size);
176
215
  isFirstSizing.current = false;
177
216
  return;
178
217
  }
179
- debounceResize();
180
- }, [props.autoHeight, debounceResize, logger, resize]);
218
+ debouncedSetSavedSize(size);
219
+ }, [props.autoHeight, debouncedSetSavedSize, logger]);
181
220
  useEnhancedEffect(() => updateGridDimensionsRef(), [updateGridDimensionsRef]);
182
221
  useGridApiOptionHandler(apiRef, 'sortedRowsSet', updateGridDimensionsRef);
183
222
  useGridApiOptionHandler(apiRef, 'paginationModelChange', updateGridDimensionsRef);
@@ -124,7 +124,9 @@ export const useGridPrintExport = (apiRef, props) => {
124
124
  printDoc.body.classList.add(...normalizeOptions.bodyClassName.split(' '));
125
125
  }
126
126
  if (normalizeOptions.copyStyles) {
127
- const headStyleElements = doc.current.querySelectorAll("style, link[rel='stylesheet']");
127
+ const rootCandidate = gridRootElement.getRootNode();
128
+ const root = rootCandidate.constructor.name === 'ShadowRoot' ? rootCandidate : doc.current;
129
+ const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");
128
130
  for (let i = 0; i < headStyleElements.length; i += 1) {
129
131
  const node = headStyleElements[i];
130
132
  if (node.tagName === 'STYLE') {
@@ -31,6 +31,7 @@ export declare const useGridVirtualScroller: (props: UseGridVirtualScrollerProps
31
31
  availableSpace?: number | null | undefined;
32
32
  rows?: GridRowEntry<import("../../../models").GridValidRowModel>[] | undefined;
33
33
  rowIndexOffset?: number | undefined;
34
+ onRowRender?: ((rowId: GridRowId) => void) | undefined;
34
35
  }) => JSX.Element[] | null;
35
36
  getRootProps: ({ style, ...other }?: {
36
37
  style?: {} | undefined;
@@ -176,11 +176,13 @@ export const useGridVirtualScroller = props => {
176
176
  height: rootRef.current.clientHeight
177
177
  });
178
178
  }, [rowsMeta.currentPageTotalHeight]);
179
- const handleResize = React.useCallback(params => {
180
- setContainerDimensions({
181
- width: params.width,
182
- height: params.height
183
- });
179
+ const handleResize = React.useCallback(() => {
180
+ if (rootRef.current) {
181
+ setContainerDimensions({
182
+ width: rootRef.current.clientWidth,
183
+ height: rootRef.current.clientHeight
184
+ });
185
+ }
184
186
  }, []);
185
187
  useGridApiEventHandler(apiRef, 'debouncedResize', handleResize);
186
188
  const updateRenderZonePosition = React.useCallback(nextRenderContext => {
@@ -307,6 +309,7 @@ export const useGridVirtualScroller = props => {
307
309
  }) => {
308
310
  var _rootProps$slotProps;
309
311
  const {
312
+ onRowRender,
310
313
  renderContext: nextRenderContext,
311
314
  minFirstColumn = renderZoneMinColumnIndex,
312
315
  maxLastColumn = renderZoneMaxColumnIndex,
@@ -391,6 +394,9 @@ export const useGridVirtualScroller = props => {
391
394
  } else {
392
395
  isSelected = apiRef.current.isRowSelectable(id);
393
396
  }
397
+ if (onRowRender) {
398
+ onRowRender(id);
399
+ }
394
400
  const focusedCell = cellFocus !== null && cellFocus.id === id ? cellFocus.field : null;
395
401
  let tabbableCell = null;
396
402
  if (cellTabIndex !== null && cellTabIndex.id === id) {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.2.0
2
+ * @mui/x-data-grid v6.2.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/joy/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import joySlots from './joySlots';
2
+ export { joySlots as unstable_joySlots };
package/joy/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import joySlots from './joySlots';
2
+ export { joySlots as unstable_joySlots };
@@ -0,0 +1,4 @@
1
+ import type { UncapitalizeObjectKeys } from '../internals/utils';
2
+ import type { GridSlotsComponent } from '../models';
3
+ declare const joySlots: UncapitalizeObjectKeys<Partial<GridSlotsComponent>>;
4
+ export default joySlots;
@@ -0,0 +1,71 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"];
4
+ import * as React from 'react';
5
+ import JoyCheckbox from '@mui/joy/Checkbox';
6
+ import JoyInput from '@mui/joy/Input';
7
+ import JoyFormControl from '@mui/joy/FormControl';
8
+ import JoyFormLabel from '@mui/joy/FormLabel';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
12
+ let {
13
+ inputProps,
14
+ onChange,
15
+ checked,
16
+ inputRef
17
+ } = _ref,
18
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
19
+ return /*#__PURE__*/_jsx(JoyCheckbox, _extends({}, props, {
20
+ slotProps: {
21
+ input: _extends({}, inputProps, {
22
+ ref: inputRef
23
+ })
24
+ },
25
+ ref: ref,
26
+ checked: checked,
27
+ onChange: onChange
28
+ }));
29
+ });
30
+ const TextField = /*#__PURE__*/React.forwardRef(({
31
+ onChange,
32
+ label,
33
+ placeholder,
34
+ value,
35
+ inputRef,
36
+ type
37
+ }, ref) => {
38
+ return /*#__PURE__*/_jsxs(JoyFormControl, {
39
+ ref: ref,
40
+ children: [/*#__PURE__*/_jsx(JoyFormLabel, {
41
+ sx: {
42
+ fontSize: 12
43
+ },
44
+ children: label
45
+ }), /*#__PURE__*/_jsx(JoyInput, {
46
+ type: type,
47
+ value: value,
48
+ onChange: onChange,
49
+ placeholder: placeholder,
50
+ size: "sm",
51
+ slotProps: {
52
+ input: {
53
+ ref: inputRef
54
+ }
55
+ }
56
+ })]
57
+ });
58
+ });
59
+ const joySlots = {
60
+ baseCheckbox: Checkbox,
61
+ baseTextField: TextField
62
+ // BaseFormControl: MUIFormControl,
63
+ // BaseSelect: MUISelect,
64
+ // BaseSwitch: MUISwitch,
65
+ // BaseButton: MUIButton,
66
+ // BaseIconButton: MUIIconButton,
67
+ // BaseTooltip: MUITooltip,
68
+ // BasePopper: MUIPopper,
69
+ };
70
+
71
+ export default joySlots;