@mui/x-data-grid 8.0.0-alpha.13 → 8.0.0-alpha.14

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 (198) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/colDef/gridActionsColDef.js +1 -1
  3. package/colDef/gridBooleanColDef.js +1 -1
  4. package/colDef/gridCheckboxSelectionColDef.js +1 -1
  5. package/components/columnsManagement/GridColumnsManagement.js +1 -0
  6. package/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  7. package/components/columnsPanel/ColumnsPanelTrigger.js +209 -0
  8. package/components/columnsPanel/index.d.ts +1 -0
  9. package/components/columnsPanel/index.js +16 -0
  10. package/components/export/ExportCsv.d.ts +30 -0
  11. package/components/export/ExportCsv.js +196 -0
  12. package/components/export/ExportPrint.d.ts +30 -0
  13. package/components/export/ExportPrint.js +196 -0
  14. package/components/export/index.d.ts +2 -0
  15. package/components/export/index.js +27 -0
  16. package/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  17. package/components/filterPanel/FilterPanelTrigger.js +212 -0
  18. package/components/filterPanel/index.d.ts +1 -0
  19. package/components/filterPanel/index.js +16 -0
  20. package/components/index.d.ts +6 -1
  21. package/components/index.js +60 -0
  22. package/components/quickFilter/QuickFilter.d.ts +41 -0
  23. package/components/quickFilter/QuickFilter.js +110 -0
  24. package/components/quickFilter/QuickFilterClear.d.ts +28 -0
  25. package/components/quickFilter/QuickFilterClear.js +161 -0
  26. package/components/quickFilter/QuickFilterContext.d.ts +13 -0
  27. package/components/quickFilter/QuickFilterContext.js +17 -0
  28. package/components/quickFilter/QuickFilterControl.d.ts +28 -0
  29. package/components/quickFilter/QuickFilterControl.js +104 -0
  30. package/components/quickFilter/index.d.ts +3 -0
  31. package/components/quickFilter/index.js +38 -0
  32. package/components/toolbar/GridToolbar.d.ts +1 -1
  33. package/components/toolbar/GridToolbar.js +2 -2
  34. package/components/toolbar/GridToolbarQuickFilter.js +54 -87
  35. package/components/toolbarV8/GridToolbar.d.ts +11 -0
  36. package/components/toolbarV8/GridToolbar.js +142 -0
  37. package/components/toolbarV8/Toolbar.d.ts +32 -0
  38. package/components/toolbarV8/Toolbar.js +132 -0
  39. package/components/toolbarV8/ToolbarButton.d.ts +23 -0
  40. package/components/toolbarV8/ToolbarButton.js +179 -0
  41. package/components/toolbarV8/ToolbarContext.d.ts +9 -0
  42. package/components/toolbarV8/ToolbarContext.js +17 -0
  43. package/components/toolbarV8/index.d.ts +2 -0
  44. package/components/toolbarV8/index.js +27 -0
  45. package/components/virtualization/GridVirtualScrollbar.js +7 -1
  46. package/constants/defaultGridSlotsComponents.js +2 -1
  47. package/constants/gridClasses.d.ts +4 -0
  48. package/esm/colDef/gridActionsColDef.js +1 -1
  49. package/esm/colDef/gridBooleanColDef.js +1 -1
  50. package/esm/colDef/gridCheckboxSelectionColDef.js +1 -1
  51. package/esm/components/columnsManagement/GridColumnsManagement.js +1 -0
  52. package/esm/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  53. package/esm/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
  54. package/esm/components/columnsPanel/index.d.ts +1 -0
  55. package/esm/components/columnsPanel/index.js +1 -0
  56. package/esm/components/export/ExportCsv.d.ts +30 -0
  57. package/esm/components/export/ExportCsv.js +189 -0
  58. package/esm/components/export/ExportPrint.d.ts +30 -0
  59. package/esm/components/export/ExportPrint.js +189 -0
  60. package/esm/components/export/index.d.ts +2 -0
  61. package/esm/components/export/index.js +2 -0
  62. package/esm/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  63. package/esm/components/filterPanel/FilterPanelTrigger.js +205 -0
  64. package/esm/components/filterPanel/index.d.ts +1 -0
  65. package/esm/components/filterPanel/index.js +1 -0
  66. package/esm/components/index.d.ts +6 -1
  67. package/esm/components/index.js +6 -1
  68. package/esm/components/quickFilter/QuickFilter.d.ts +41 -0
  69. package/esm/components/quickFilter/QuickFilter.js +103 -0
  70. package/esm/components/quickFilter/QuickFilterClear.d.ts +28 -0
  71. package/esm/components/quickFilter/QuickFilterClear.js +154 -0
  72. package/esm/components/quickFilter/QuickFilterContext.d.ts +13 -0
  73. package/esm/components/quickFilter/QuickFilterContext.js +9 -0
  74. package/esm/components/quickFilter/QuickFilterControl.d.ts +28 -0
  75. package/esm/components/quickFilter/QuickFilterControl.js +97 -0
  76. package/esm/components/quickFilter/index.d.ts +3 -0
  77. package/esm/components/quickFilter/index.js +3 -0
  78. package/esm/components/toolbar/GridToolbar.d.ts +1 -1
  79. package/esm/components/toolbar/GridToolbar.js +2 -2
  80. package/esm/components/toolbar/GridToolbarQuickFilter.js +56 -87
  81. package/esm/components/toolbarV8/GridToolbar.d.ts +11 -0
  82. package/esm/components/toolbarV8/GridToolbar.js +135 -0
  83. package/esm/components/toolbarV8/Toolbar.d.ts +32 -0
  84. package/esm/components/toolbarV8/Toolbar.js +125 -0
  85. package/esm/components/toolbarV8/ToolbarButton.d.ts +23 -0
  86. package/esm/components/toolbarV8/ToolbarButton.js +172 -0
  87. package/esm/components/toolbarV8/ToolbarContext.d.ts +9 -0
  88. package/esm/components/toolbarV8/ToolbarContext.js +9 -0
  89. package/esm/components/toolbarV8/index.d.ts +2 -0
  90. package/esm/components/toolbarV8/index.js +2 -0
  91. package/esm/components/virtualization/GridVirtualScrollbar.js +7 -1
  92. package/esm/constants/defaultGridSlotsComponents.js +2 -1
  93. package/esm/constants/gridClasses.d.ts +4 -0
  94. package/esm/hooks/features/rows/useGridRowsMeta.js +8 -0
  95. package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  96. package/esm/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  97. package/esm/hooks/utils/index.d.ts +2 -1
  98. package/esm/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  99. package/esm/hooks/utils/useGridComponentRenderer.js +36 -0
  100. package/esm/index.js +1 -1
  101. package/esm/internals/demo/TailwindDemoContainer.d.ts +11 -0
  102. package/esm/internals/demo/TailwindDemoContainer.js +55 -0
  103. package/esm/internals/demo/index.d.ts +1 -0
  104. package/esm/internals/demo/index.js +1 -0
  105. package/esm/internals/index.d.ts +4 -0
  106. package/esm/internals/index.js +3 -0
  107. package/esm/material/icons/index.d.ts +3 -3
  108. package/esm/material/icons/index.js +6 -6
  109. package/esm/material/index.js +3 -3
  110. package/esm/models/gridBaseSlots.d.ts +5 -1
  111. package/esm/models/gridIconSlotsComponent.d.ts +1 -1
  112. package/esm/models/gridSlotsComponent.d.ts +1 -2
  113. package/hooks/features/rows/useGridRowsMeta.js +8 -0
  114. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  115. package/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  116. package/hooks/utils/index.d.ts +2 -1
  117. package/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  118. package/hooks/utils/useGridComponentRenderer.js +44 -0
  119. package/index.js +1 -1
  120. package/internals/demo/TailwindDemoContainer.d.ts +11 -0
  121. package/internals/demo/TailwindDemoContainer.js +63 -0
  122. package/internals/demo/index.d.ts +1 -0
  123. package/internals/demo/index.js +12 -0
  124. package/internals/index.d.ts +4 -0
  125. package/internals/index.js +28 -0
  126. package/material/icons/index.d.ts +3 -3
  127. package/material/icons/index.js +7 -7
  128. package/material/index.js +2 -2
  129. package/models/gridBaseSlots.d.ts +5 -1
  130. package/models/gridIconSlotsComponent.d.ts +1 -1
  131. package/models/gridSlotsComponent.d.ts +1 -2
  132. package/modern/colDef/gridActionsColDef.js +1 -1
  133. package/modern/colDef/gridBooleanColDef.js +1 -1
  134. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -1
  135. package/modern/components/columnsManagement/GridColumnsManagement.js +1 -0
  136. package/modern/components/columnsPanel/ColumnsPanelTrigger.d.ts +33 -0
  137. package/modern/components/columnsPanel/ColumnsPanelTrigger.js +202 -0
  138. package/modern/components/columnsPanel/index.d.ts +1 -0
  139. package/modern/components/columnsPanel/index.js +1 -0
  140. package/modern/components/export/ExportCsv.d.ts +30 -0
  141. package/modern/components/export/ExportCsv.js +189 -0
  142. package/modern/components/export/ExportPrint.d.ts +30 -0
  143. package/modern/components/export/ExportPrint.js +189 -0
  144. package/modern/components/export/index.d.ts +2 -0
  145. package/modern/components/export/index.js +2 -0
  146. package/modern/components/filterPanel/FilterPanelTrigger.d.ts +37 -0
  147. package/modern/components/filterPanel/FilterPanelTrigger.js +205 -0
  148. package/modern/components/filterPanel/index.d.ts +1 -0
  149. package/modern/components/filterPanel/index.js +1 -0
  150. package/modern/components/index.d.ts +6 -1
  151. package/modern/components/index.js +6 -1
  152. package/modern/components/quickFilter/QuickFilter.d.ts +41 -0
  153. package/modern/components/quickFilter/QuickFilter.js +103 -0
  154. package/modern/components/quickFilter/QuickFilterClear.d.ts +28 -0
  155. package/modern/components/quickFilter/QuickFilterClear.js +154 -0
  156. package/modern/components/quickFilter/QuickFilterContext.d.ts +13 -0
  157. package/modern/components/quickFilter/QuickFilterContext.js +9 -0
  158. package/modern/components/quickFilter/QuickFilterControl.d.ts +28 -0
  159. package/modern/components/quickFilter/QuickFilterControl.js +97 -0
  160. package/modern/components/quickFilter/index.d.ts +3 -0
  161. package/modern/components/quickFilter/index.js +3 -0
  162. package/modern/components/toolbar/GridToolbar.d.ts +1 -1
  163. package/modern/components/toolbar/GridToolbar.js +2 -2
  164. package/modern/components/toolbar/GridToolbarQuickFilter.js +56 -87
  165. package/modern/components/toolbarV8/GridToolbar.d.ts +11 -0
  166. package/modern/components/toolbarV8/GridToolbar.js +135 -0
  167. package/modern/components/toolbarV8/Toolbar.d.ts +32 -0
  168. package/modern/components/toolbarV8/Toolbar.js +125 -0
  169. package/modern/components/toolbarV8/ToolbarButton.d.ts +23 -0
  170. package/modern/components/toolbarV8/ToolbarButton.js +172 -0
  171. package/modern/components/toolbarV8/ToolbarContext.d.ts +9 -0
  172. package/modern/components/toolbarV8/ToolbarContext.js +9 -0
  173. package/modern/components/toolbarV8/index.d.ts +2 -0
  174. package/modern/components/toolbarV8/index.js +2 -0
  175. package/modern/components/virtualization/GridVirtualScrollbar.js +7 -1
  176. package/modern/constants/defaultGridSlotsComponents.js +2 -1
  177. package/modern/constants/gridClasses.d.ts +4 -0
  178. package/modern/hooks/features/rows/useGridRowsMeta.js +8 -0
  179. package/modern/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -2
  180. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -2
  181. package/modern/hooks/utils/index.d.ts +2 -1
  182. package/modern/hooks/utils/useGridComponentRenderer.d.ts +12 -0
  183. package/modern/hooks/utils/useGridComponentRenderer.js +36 -0
  184. package/modern/index.js +1 -1
  185. package/modern/internals/demo/TailwindDemoContainer.d.ts +11 -0
  186. package/modern/internals/demo/TailwindDemoContainer.js +55 -0
  187. package/modern/internals/demo/index.d.ts +1 -0
  188. package/modern/internals/demo/index.js +1 -0
  189. package/modern/internals/index.d.ts +4 -0
  190. package/modern/internals/index.js +3 -0
  191. package/modern/material/icons/index.d.ts +3 -3
  192. package/modern/material/icons/index.js +6 -6
  193. package/modern/material/index.js +3 -3
  194. package/modern/models/gridBaseSlots.d.ts +5 -1
  195. package/modern/models/gridIconSlotsComponent.d.ts +1 -1
  196. package/modern/models/gridSlotsComponent.d.ts +1 -2
  197. package/package.json +1 -1
  198. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { RenderProp } from "../../hooks/utils/useGridComponentRenderer.js";
3
+ import { GridPrintExportOptions } from "../../models/gridExport.js";
4
+ import type { GridSlotProps } from '../../models';
5
+ export type ExportPrintProps = GridSlotProps['baseButton'] & {
6
+ /**
7
+ * A function to customize rendering of the component.
8
+ */
9
+ render?: RenderProp<GridSlotProps['baseButton']>;
10
+ /**
11
+ * The options to apply on the Print export.
12
+ * @demos
13
+ * - [Print export](/x/react-data-grid/export/#print-export)
14
+ */
15
+ options?: GridPrintExportOptions;
16
+ };
17
+ /**
18
+ * A button that triggers a print export.
19
+ * It renders the `baseButton` slot.
20
+ *
21
+ * Demos:
22
+ *
23
+ * - [Export](https://mui.com/x/react-data-grid/components/export/)
24
+ *
25
+ * API:
26
+ *
27
+ * - [ExportPrint API](https://mui.com/x/api/data-grid/export-print/)
28
+ */
29
+ declare const ExportPrint: React.ForwardRefExoticComponent<ExportPrintProps> | React.ForwardRefExoticComponent<Omit<ExportPrintProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
30
+ export { ExportPrint };
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.ExportPrint = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _forwardRef = require("@mui/x-internals/forwardRef");
14
+ var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
15
+ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
16
+ var _useGridComponentRenderer = require("../../hooks/utils/useGridComponentRenderer");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ const _excluded = ["render", "options", "onClick"];
19
+ /**
20
+ * A button that triggers a print export.
21
+ * It renders the `baseButton` slot.
22
+ *
23
+ * Demos:
24
+ *
25
+ * - [Export](https://mui.com/x/react-data-grid/components/export/)
26
+ *
27
+ * API:
28
+ *
29
+ * - [ExportPrint API](https://mui.com/x/api/data-grid/export-print/)
30
+ */
31
+ const ExportPrint = exports.ExportPrint = (0, _forwardRef.forwardRef)(function ExportPrint(props, ref) {
32
+ const {
33
+ render,
34
+ options,
35
+ onClick
36
+ } = props,
37
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
38
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
39
+ const apiRef = (0, _useGridApiContext.useGridApiContext)();
40
+ const handleClick = event => {
41
+ apiRef.current.exportDataAsPrint(options);
42
+ onClick?.(event);
43
+ };
44
+ const element = (0, _useGridComponentRenderer.useGridComponentRenderer)(rootProps.slots.baseButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseButton, {
45
+ onClick: handleClick
46
+ }, other, {
47
+ ref
48
+ }));
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
50
+ children: element
51
+ });
52
+ });
53
+ process.env.NODE_ENV !== "production" ? ExportPrint.propTypes = {
54
+ // ----------------------------- Warning --------------------------------
55
+ // | These PropTypes are generated from the TypeScript type definitions |
56
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
57
+ // ----------------------------------------------------------------------
58
+ /**
59
+ * A ref for imperative actions.
60
+ * It currently only supports `focusVisible()` action.
61
+ */
62
+ action: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
63
+ current: _propTypes.default.shape({
64
+ focusVisible: _propTypes.default.func.isRequired
65
+ })
66
+ })]),
67
+ /**
68
+ * If `true`, the ripples are centered.
69
+ * They won't start at the cursor interaction position.
70
+ * @default false
71
+ */
72
+ centerRipple: _propTypes.default.bool,
73
+ className: _propTypes.default.string,
74
+ /**
75
+ * The color of the component.
76
+ * It supports both default and custom theme colors, which can be added as shown in the
77
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
78
+ * @default 'primary'
79
+ */
80
+ color: _propTypes.default.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
81
+ component: _propTypes.default.elementType,
82
+ /**
83
+ * If `true`, the component is disabled.
84
+ */
85
+ disabled: _propTypes.default.bool,
86
+ /**
87
+ * If `true`, no elevation is used.
88
+ * @default false
89
+ */
90
+ disableElevation: _propTypes.default.bool,
91
+ /**
92
+ * If `true`, the keyboard focus ripple is disabled.
93
+ * @default false
94
+ */
95
+ disableFocusRipple: _propTypes.default.bool,
96
+ /**
97
+ * If `true`, the ripple effect is disabled.
98
+ *
99
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
100
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
101
+ * @default false
102
+ */
103
+ disableRipple: _propTypes.default.bool,
104
+ /**
105
+ * If `true`, the touch ripple effect is disabled.
106
+ * @default false
107
+ */
108
+ disableTouchRipple: _propTypes.default.bool,
109
+ /**
110
+ * Element placed after the children.
111
+ */
112
+ endIcon: _propTypes.default.node,
113
+ /**
114
+ * If `true`, the base button will have a keyboard focus ripple.
115
+ * @default false
116
+ */
117
+ focusRipple: _propTypes.default.bool,
118
+ /**
119
+ * This prop can help identify which element has keyboard focus.
120
+ * The class name will be applied when the element gains the focus through keyboard interaction.
121
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
122
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
123
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
124
+ * if needed.
125
+ */
126
+ focusVisibleClassName: _propTypes.default.string,
127
+ /**
128
+ * If `true`, the button will take up the full width of its container.
129
+ * @default false
130
+ */
131
+ fullWidth: _propTypes.default.bool,
132
+ /**
133
+ * The URL to link to when the button is clicked.
134
+ * If defined, an `a` element will be used as the root node.
135
+ */
136
+ href: _propTypes.default.string,
137
+ /**
138
+ * The component used to render a link when the `href` prop is provided.
139
+ * @default 'a'
140
+ */
141
+ LinkComponent: _propTypes.default.elementType,
142
+ /**
143
+ * Callback fired when the component is focused with a keyboard.
144
+ * We trigger a `onFocus` callback too.
145
+ */
146
+ onFocusVisible: _propTypes.default.func,
147
+ /**
148
+ * The options to apply on the Print export.
149
+ * @demos
150
+ * - [Print export](/x/react-data-grid/export/#print-export)
151
+ */
152
+ options: _propTypes.default.shape({
153
+ allColumns: _propTypes.default.bool,
154
+ bodyClassName: _propTypes.default.string,
155
+ copyStyles: _propTypes.default.bool,
156
+ fields: _propTypes.default.arrayOf(_propTypes.default.string),
157
+ fileName: _propTypes.default.string,
158
+ getRowsToExport: _propTypes.default.func,
159
+ hideFooter: _propTypes.default.bool,
160
+ hideToolbar: _propTypes.default.bool,
161
+ includeCheckboxes: _propTypes.default.bool,
162
+ pageStyle: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string])
163
+ }),
164
+ /**
165
+ * A function to customize rendering of the component.
166
+ */
167
+ render: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]),
168
+ /**
169
+ * The size of the component.
170
+ * `small` is equivalent to the dense button styling.
171
+ */
172
+ size: _propTypes.default.oneOf(['large', 'medium', 'small']),
173
+ /**
174
+ * Element placed before the children.
175
+ */
176
+ startIcon: _propTypes.default.node,
177
+ style: _propTypes.default.object,
178
+ /**
179
+ * The system prop that allows defining system overrides as well as additional CSS styles.
180
+ */
181
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
182
+ tabIndex: _propTypes.default.number,
183
+ /**
184
+ * Props applied to the `TouchRipple` element.
185
+ */
186
+ TouchRippleProps: _propTypes.default.object,
187
+ /**
188
+ * A ref that points to the `TouchRipple` element.
189
+ */
190
+ touchRippleRef: _propTypes.default.any,
191
+ /**
192
+ * The variant to use.
193
+ * @default 'text'
194
+ */
195
+ variant: _propTypes.default.oneOf(['contained', 'outlined', 'text'])
196
+ } : void 0;
@@ -0,0 +1,2 @@
1
+ export * from "./ExportCsv.js";
2
+ export * from "./ExportPrint.js";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _ExportCsv = require("./ExportCsv");
7
+ Object.keys(_ExportCsv).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _ExportCsv[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _ExportCsv[key];
14
+ }
15
+ });
16
+ });
17
+ var _ExportPrint = require("./ExportPrint");
18
+ Object.keys(_ExportPrint).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _ExportPrint[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _ExportPrint[key];
25
+ }
26
+ });
27
+ });
@@ -0,0 +1,37 @@
1
+ import * as React from 'react';
2
+ import { RenderProp } from "../../hooks/utils/useGridComponentRenderer.js";
3
+ import type { GridSlotProps } from '../../models';
4
+ export interface FilterPanelState {
5
+ /**
6
+ * If `true`, the filter panel is open.
7
+ */
8
+ open: boolean;
9
+ /**
10
+ * The number of active filters.
11
+ */
12
+ filterCount: number;
13
+ }
14
+ export type FilterPanelTriggerProps = Omit<GridSlotProps['baseButton'], 'className'> & {
15
+ /**
16
+ * A function to customize rendering of the component.
17
+ */
18
+ render?: RenderProp<GridSlotProps['baseButton'], FilterPanelState>;
19
+ /**
20
+ * A function to customize rendering of the component.
21
+ */
22
+ className?: string | ((state: FilterPanelState) => string);
23
+ };
24
+ /**
25
+ * A button that opens and closes the filter panel.
26
+ * It renders the `baseButton` slot.
27
+ *
28
+ * Demos:
29
+ *
30
+ * - [Filter Panel](https://mui.com/x/react-data-grid/components/filter-panel/)
31
+ *
32
+ * API:
33
+ *
34
+ * - [FilterPanelTrigger API](https://mui.com/x/api/data-grid/filter-panel-trigger/)
35
+ */
36
+ declare const FilterPanelTrigger: React.ForwardRefExoticComponent<FilterPanelTriggerProps> | React.ForwardRefExoticComponent<Omit<FilterPanelTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
37
+ export { FilterPanelTrigger };
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.FilterPanelTrigger = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _useId = _interopRequireDefault(require("@mui/utils/useId"));
14
+ var _forwardRef = require("@mui/x-internals/forwardRef");
15
+ var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
16
+ var _hooks = require("../../hooks");
17
+ var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
18
+ var _useGridComponentRenderer = require("../../hooks/utils/useGridComponentRenderer");
19
+ var _jsxRuntime = require("react/jsx-runtime");
20
+ const _excluded = ["render", "className", "onClick", "onPointerUp"];
21
+ /**
22
+ * A button that opens and closes the filter panel.
23
+ * It renders the `baseButton` slot.
24
+ *
25
+ * Demos:
26
+ *
27
+ * - [Filter Panel](https://mui.com/x/react-data-grid/components/filter-panel/)
28
+ *
29
+ * API:
30
+ *
31
+ * - [FilterPanelTrigger API](https://mui.com/x/api/data-grid/filter-panel-trigger/)
32
+ */
33
+ const FilterPanelTrigger = exports.FilterPanelTrigger = (0, _forwardRef.forwardRef)(function FilterPanelTrigger(props, ref) {
34
+ const {
35
+ render,
36
+ className,
37
+ onClick,
38
+ onPointerUp
39
+ } = props,
40
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
41
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
42
+ const buttonId = (0, _useId.default)();
43
+ const panelId = (0, _useId.default)();
44
+ const apiRef = (0, _useGridApiContext.useGridApiContext)();
45
+ const panelState = (0, _hooks.useGridSelector)(apiRef, _hooks.gridPreferencePanelStateSelector);
46
+ const open = panelState.open && panelState.openedPanelValue === _hooks.GridPreferencePanelsValue.filters;
47
+ const activeFilters = (0, _hooks.useGridSelector)(apiRef, _hooks.gridFilterActiveItemsSelector);
48
+ const filterCount = activeFilters.length;
49
+ const state = {
50
+ open,
51
+ filterCount
52
+ };
53
+ const resolvedClassName = typeof className === 'function' ? className(state) : className;
54
+ const handleClick = event => {
55
+ if (open) {
56
+ apiRef.current.hidePreferences();
57
+ } else {
58
+ apiRef.current.showPreferences(_hooks.GridPreferencePanelsValue.filters, panelId, buttonId);
59
+ }
60
+ onClick?.(event);
61
+ };
62
+ const handlePointerUp = event => {
63
+ if (open) {
64
+ event.stopPropagation();
65
+ }
66
+ onPointerUp?.(event);
67
+ };
68
+ const element = (0, _useGridComponentRenderer.useGridComponentRenderer)(rootProps.slots.baseButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseButton, {
69
+ id: buttonId,
70
+ 'aria-haspopup': 'true',
71
+ 'aria-expanded': open ? 'true' : undefined,
72
+ 'aria-controls': open ? panelId : undefined,
73
+ onClick: handleClick,
74
+ onPointerUp: handlePointerUp,
75
+ className: resolvedClassName
76
+ }, other, {
77
+ ref
78
+ }), state);
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
80
+ children: element
81
+ });
82
+ });
83
+ process.env.NODE_ENV !== "production" ? FilterPanelTrigger.propTypes = {
84
+ // ----------------------------- Warning --------------------------------
85
+ // | These PropTypes are generated from the TypeScript type definitions |
86
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
87
+ // ----------------------------------------------------------------------
88
+ /**
89
+ * A ref for imperative actions.
90
+ * It currently only supports `focusVisible()` action.
91
+ */
92
+ action: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
93
+ current: _propTypes.default.shape({
94
+ focusVisible: _propTypes.default.func.isRequired
95
+ })
96
+ })]),
97
+ /**
98
+ * If `true`, the ripples are centered.
99
+ * They won't start at the cursor interaction position.
100
+ * @default false
101
+ */
102
+ centerRipple: _propTypes.default.bool,
103
+ /**
104
+ * A function to customize rendering of the component.
105
+ */
106
+ className: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
107
+ /**
108
+ * The color of the component.
109
+ * It supports both default and custom theme colors, which can be added as shown in the
110
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
111
+ * @default 'primary'
112
+ */
113
+ color: _propTypes.default.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
114
+ component: _propTypes.default.elementType,
115
+ /**
116
+ * If `true`, the component is disabled.
117
+ */
118
+ disabled: _propTypes.default.bool,
119
+ /**
120
+ * If `true`, no elevation is used.
121
+ * @default false
122
+ */
123
+ disableElevation: _propTypes.default.bool,
124
+ /**
125
+ * If `true`, the keyboard focus ripple is disabled.
126
+ * @default false
127
+ */
128
+ disableFocusRipple: _propTypes.default.bool,
129
+ /**
130
+ * If `true`, the ripple effect is disabled.
131
+ *
132
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
133
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
134
+ * @default false
135
+ */
136
+ disableRipple: _propTypes.default.bool,
137
+ /**
138
+ * If `true`, the touch ripple effect is disabled.
139
+ * @default false
140
+ */
141
+ disableTouchRipple: _propTypes.default.bool,
142
+ /**
143
+ * Element placed after the children.
144
+ */
145
+ endIcon: _propTypes.default.node,
146
+ /**
147
+ * If `true`, the base button will have a keyboard focus ripple.
148
+ * @default false
149
+ */
150
+ focusRipple: _propTypes.default.bool,
151
+ /**
152
+ * This prop can help identify which element has keyboard focus.
153
+ * The class name will be applied when the element gains the focus through keyboard interaction.
154
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
155
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
156
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
157
+ * if needed.
158
+ */
159
+ focusVisibleClassName: _propTypes.default.string,
160
+ /**
161
+ * If `true`, the button will take up the full width of its container.
162
+ * @default false
163
+ */
164
+ fullWidth: _propTypes.default.bool,
165
+ /**
166
+ * The URL to link to when the button is clicked.
167
+ * If defined, an `a` element will be used as the root node.
168
+ */
169
+ href: _propTypes.default.string,
170
+ /**
171
+ * The component used to render a link when the `href` prop is provided.
172
+ * @default 'a'
173
+ */
174
+ LinkComponent: _propTypes.default.elementType,
175
+ /**
176
+ * Callback fired when the component is focused with a keyboard.
177
+ * We trigger a `onFocus` callback too.
178
+ */
179
+ onFocusVisible: _propTypes.default.func,
180
+ /**
181
+ * A function to customize rendering of the component.
182
+ */
183
+ render: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]),
184
+ /**
185
+ * The size of the component.
186
+ * `small` is equivalent to the dense button styling.
187
+ */
188
+ size: _propTypes.default.oneOf(['large', 'medium', 'small']),
189
+ /**
190
+ * Element placed before the children.
191
+ */
192
+ startIcon: _propTypes.default.node,
193
+ style: _propTypes.default.object,
194
+ /**
195
+ * The system prop that allows defining system overrides as well as additional CSS styles.
196
+ */
197
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
198
+ tabIndex: _propTypes.default.number,
199
+ /**
200
+ * Props applied to the `TouchRipple` element.
201
+ */
202
+ TouchRippleProps: _propTypes.default.object,
203
+ /**
204
+ * A ref that points to the `TouchRipple` element.
205
+ */
206
+ touchRippleRef: _propTypes.default.any,
207
+ /**
208
+ * The variant to use.
209
+ * @default 'text'
210
+ */
211
+ variant: _propTypes.default.oneOf(['contained', 'outlined', 'text'])
212
+ } : void 0;
@@ -0,0 +1 @@
1
+ export * from "./FilterPanelTrigger.js";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _FilterPanelTrigger = require("./FilterPanelTrigger");
7
+ Object.keys(_FilterPanelTrigger).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _FilterPanelTrigger[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _FilterPanelTrigger[key];
14
+ }
15
+ });
16
+ });
@@ -17,4 +17,9 @@ export * from "./GridNoColumnsOverlay.js";
17
17
  export { GridPagination } from "./GridPagination.js";
18
18
  export * from "./GridRowCount.js";
19
19
  export * from "./GridRow.js";
20
- export * from "./GridSelectedRowCount.js";
20
+ export * from "./GridSelectedRowCount.js";
21
+ export * from "./columnsPanel/index.js";
22
+ export * from "./export/index.js";
23
+ export * from "./filterPanel/index.js";
24
+ export * from "./toolbarV8/index.js";
25
+ export * from "./quickFilter/index.js";
@@ -240,4 +240,64 @@ Object.keys(_GridSelectedRowCount).forEach(function (key) {
240
240
  return _GridSelectedRowCount[key];
241
241
  }
242
242
  });
243
+ });
244
+ var _columnsPanel = require("./columnsPanel");
245
+ Object.keys(_columnsPanel).forEach(function (key) {
246
+ if (key === "default" || key === "__esModule") return;
247
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
248
+ if (key in exports && exports[key] === _columnsPanel[key]) return;
249
+ Object.defineProperty(exports, key, {
250
+ enumerable: true,
251
+ get: function () {
252
+ return _columnsPanel[key];
253
+ }
254
+ });
255
+ });
256
+ var _export = require("./export");
257
+ Object.keys(_export).forEach(function (key) {
258
+ if (key === "default" || key === "__esModule") return;
259
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
260
+ if (key in exports && exports[key] === _export[key]) return;
261
+ Object.defineProperty(exports, key, {
262
+ enumerable: true,
263
+ get: function () {
264
+ return _export[key];
265
+ }
266
+ });
267
+ });
268
+ var _filterPanel = require("./filterPanel");
269
+ Object.keys(_filterPanel).forEach(function (key) {
270
+ if (key === "default" || key === "__esModule") return;
271
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
272
+ if (key in exports && exports[key] === _filterPanel[key]) return;
273
+ Object.defineProperty(exports, key, {
274
+ enumerable: true,
275
+ get: function () {
276
+ return _filterPanel[key];
277
+ }
278
+ });
279
+ });
280
+ var _toolbarV = require("./toolbarV8");
281
+ Object.keys(_toolbarV).forEach(function (key) {
282
+ if (key === "default" || key === "__esModule") return;
283
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
284
+ if (key in exports && exports[key] === _toolbarV[key]) return;
285
+ Object.defineProperty(exports, key, {
286
+ enumerable: true,
287
+ get: function () {
288
+ return _toolbarV[key];
289
+ }
290
+ });
291
+ });
292
+ var _quickFilter = require("./quickFilter");
293
+ Object.keys(_quickFilter).forEach(function (key) {
294
+ if (key === "default" || key === "__esModule") return;
295
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
296
+ if (key in exports && exports[key] === _quickFilter[key]) return;
297
+ Object.defineProperty(exports, key, {
298
+ enumerable: true,
299
+ get: function () {
300
+ return _quickFilter[key];
301
+ }
302
+ });
243
303
  });
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ import type { GridFilterModel } from '../../models';
3
+ export type QuickFilterProps = {
4
+ children: React.ReactNode;
5
+ /**
6
+ * Function responsible for parsing text input in an array of independent values for quick filtering.
7
+ * @param {string} input The value entered by the user
8
+ * @returns {any[]} The array of value on which quick filter is applied
9
+ * @default (searchText: string) => searchText.split(' ').filter((word) => word !== '')
10
+ */
11
+ parser?: (input: string) => any[];
12
+ /**
13
+ * Function responsible for formatting values of quick filter in a string when the model is modified
14
+ * @param {any[]} values The new values passed to the quick filter model
15
+ * @returns {string} The string to display in the text field
16
+ * @default (values: string[]) => values.join(' ')
17
+ */
18
+ formatter?: (values: NonNullable<GridFilterModel['quickFilterValues']>) => string;
19
+ /**
20
+ * The debounce time in milliseconds.
21
+ * @default 150
22
+ */
23
+ debounceMs?: number;
24
+ };
25
+ /**
26
+ * The top level Quick Filter component that provides context to child components.
27
+ * It does not render any DOM elements.
28
+ *
29
+ * Demos:
30
+ *
31
+ * - [Quick Filter](https://mui.com/x/react-data-grid/components/quick-filter/)
32
+ *
33
+ * API:
34
+ *
35
+ * - [QuickFilter API](https://mui.com/x/api/data-grid/quick-filter/)
36
+ */
37
+ declare function QuickFilter(props: QuickFilterProps): React.JSX.Element;
38
+ declare namespace QuickFilter {
39
+ var propTypes: any;
40
+ }
41
+ export { QuickFilter };