@mui/x-data-grid-premium 8.3.1 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +213 -0
- package/DataGridPremium/DataGridPremium.js +13 -3
- package/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/components/GridAggregationRowOverlay.js +2 -1
- package/components/GridColumnMenuAggregationItem.js +2 -2
- package/components/GridColumnMenuRowGroupItem.js +1 -0
- package/components/GridDataSourceGroupingCriteriaCell.js +2 -2
- package/components/GridEmptyPivotOverlay.js +1 -0
- package/components/GridPremiumColumnMenu.js +2 -1
- package/components/GridPremiumToolbar.js +1 -0
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.js +1 -0
- package/components/aiAssistantPanel/GridAiAssistantPanel.js +2 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +2 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +3 -2
- package/components/collapsible/Collapsible.js +2 -2
- package/components/collapsible/CollapsibleContext.js +1 -0
- package/components/collapsible/CollapsiblePanel.js +2 -2
- package/components/collapsible/CollapsibleTrigger.js +2 -2
- package/components/export/ExportExcel.js +1 -0
- package/components/pivotPanel/GridPivotPanelHeader.js +2 -2
- package/components/pivotPanel/GridPivotPanelSearch.js +2 -2
- package/components/pivotPanel/PivotPanelTrigger.js +1 -0
- package/components/prompt/GridPrompt.js +4 -3
- package/components/promptField/PromptField.js +1 -0
- package/components/promptField/PromptFieldContext.js +1 -0
- package/components/promptField/PromptFieldControl.js +1 -0
- package/components/promptField/PromptFieldRecord.js +1 -0
- package/components/promptField/PromptFieldSend.js +1 -0
- package/components/resizablePanel/ResizablePanel.js +2 -2
- package/components/resizablePanel/ResizablePanelContext.js +1 -0
- package/components/resizablePanel/ResizablePanelHandle.js +2 -2
- package/components/sidebar/Sidebar.js +2 -2
- package/components/sidebar/SidebarHeader.js +2 -2
- package/esm/DataGridPremium/DataGridPremium.js +13 -3
- package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/esm/components/GridAggregationRowOverlay.js +1 -0
- package/esm/components/GridColumnMenuAggregationItem.js +1 -1
- package/esm/components/GridColumnMenuRowGroupItem.js +1 -0
- package/esm/components/GridDataSourceGroupingCriteriaCell.js +1 -1
- package/esm/components/GridEmptyPivotOverlay.js +1 -0
- package/esm/components/GridPremiumColumnMenu.js +2 -1
- package/esm/components/GridPremiumToolbar.js +1 -0
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.js +1 -0
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.js +1 -1
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +1 -1
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +1 -1
- package/esm/components/collapsible/Collapsible.js +1 -1
- package/esm/components/collapsible/CollapsibleContext.js +1 -0
- package/esm/components/collapsible/CollapsiblePanel.js +1 -1
- package/esm/components/collapsible/CollapsibleTrigger.js +1 -1
- package/esm/components/export/ExportExcel.js +1 -0
- package/esm/components/pivotPanel/GridPivotPanelHeader.js +1 -1
- package/esm/components/pivotPanel/GridPivotPanelSearch.js +1 -1
- package/esm/components/pivotPanel/PivotPanelTrigger.js +1 -0
- package/esm/components/prompt/GridPrompt.js +2 -1
- package/esm/components/promptField/PromptField.js +1 -0
- package/esm/components/promptField/PromptFieldContext.js +1 -0
- package/esm/components/promptField/PromptFieldControl.js +1 -0
- package/esm/components/promptField/PromptFieldRecord.js +1 -0
- package/esm/components/promptField/PromptFieldSend.js +1 -0
- package/esm/components/resizablePanel/ResizablePanel.js +1 -1
- package/esm/components/resizablePanel/ResizablePanelContext.js +1 -0
- package/esm/components/resizablePanel/ResizablePanelHandle.js +1 -1
- package/esm/components/sidebar/Sidebar.js +1 -1
- package/esm/components/sidebar/SidebarHeader.js +1 -1
- package/esm/hooks/features/aggregation/gridAggregationUtils.js +1 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -0
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +3 -2
- package/esm/hooks/features/clipboard/useGridClipboardImport.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +5 -4
- package/esm/hooks/features/rowGrouping/createGroupingColDef.js +1 -0
- package/esm/index.js +1 -1
- package/esm/models/dataGridPremiumProps.d.ts +3 -2
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/hooks/features/aggregation/gridAggregationUtils.js +2 -2
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -0
- package/hooks/features/cellSelection/useGridCellSelection.js +3 -2
- package/hooks/features/clipboard/useGridClipboardImport.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboardImport.js +6 -5
- package/hooks/features/rowGrouping/createGroupingColDef.js +1 -0
- package/index.js +1 -1
- package/models/dataGridPremiumProps.d.ts +3 -2
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/package.json +5 -5
|
@@ -12,7 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _system = require("@mui/system");
|
|
14
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
|
-
var
|
|
15
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _ResizablePanelContext = require("./ResizablePanelContext");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -24,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
24
24
|
const slots = {
|
|
25
25
|
root: ['resizablePanel']
|
|
26
26
|
};
|
|
27
|
-
return (0,
|
|
27
|
+
return (0, _composeClasses.default)(slots, _xDataGridPro.getDataGridUtilityClass, classes);
|
|
28
28
|
};
|
|
29
29
|
const ResizablePanelRoot = (0, _system.styled)('div', {
|
|
30
30
|
name: 'MuiDataGrid',
|
|
@@ -8,6 +8,7 @@ exports.ResizablePanelContext = void 0;
|
|
|
8
8
|
exports.useResizablePanelContext = useResizablePanelContext;
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
const ResizablePanelContext = exports.ResizablePanelContext = /*#__PURE__*/React.createContext(undefined);
|
|
11
|
+
if (process.env.NODE_ENV !== "production") ResizablePanelContext.displayName = "ResizablePanelContext";
|
|
11
12
|
function useResizablePanelContext() {
|
|
12
13
|
const context = React.useContext(ResizablePanelContext);
|
|
13
14
|
if (context === undefined) {
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _system = require("@mui/system");
|
|
13
13
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
14
|
-
var
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _useResize = require("../../hooks/utils/useResize");
|
|
@@ -27,7 +27,7 @@ const useUtilityClasses = ownerState => {
|
|
|
27
27
|
const slots = {
|
|
28
28
|
root: ['resizablePanelHandle', `resizablePanelHandle--${direction}`]
|
|
29
29
|
};
|
|
30
|
-
return (0,
|
|
30
|
+
return (0, _composeClasses.default)(slots, _xDataGridPro.getDataGridUtilityClass, classes);
|
|
31
31
|
};
|
|
32
32
|
const ResizablePanelHandleRoot = (0, _system.styled)('div', {
|
|
33
33
|
name: 'MuiDataGrid',
|
|
@@ -12,7 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _system = require("@mui/system");
|
|
14
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
|
-
var
|
|
15
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _resizablePanel = require("../resizablePanel");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -24,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
24
24
|
const slots = {
|
|
25
25
|
root: ['sidebar']
|
|
26
26
|
};
|
|
27
|
-
return (0,
|
|
27
|
+
return (0, _composeClasses.default)(slots, _xDataGridPro.getDataGridUtilityClass, classes);
|
|
28
28
|
};
|
|
29
29
|
const SidebarRoot = (0, _system.styled)(_resizablePanel.ResizablePanel, {
|
|
30
30
|
name: 'MuiDataGrid',
|
|
@@ -12,7 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _system = require("@mui/system");
|
|
13
13
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
14
14
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
15
|
-
var
|
|
15
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -24,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
24
24
|
const slots = {
|
|
25
25
|
root: ['sidebarHeader']
|
|
26
26
|
};
|
|
27
|
-
return (0,
|
|
27
|
+
return (0, _composeClasses.default)(slots, _xDataGridPro.getDataGridUtilityClass, classes);
|
|
28
28
|
};
|
|
29
29
|
const SidebarHeaderRoot = (0, _system.styled)('div', {
|
|
30
30
|
name: 'MuiDataGrid',
|
|
@@ -33,7 +33,7 @@ const configuration = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const releaseInfo = "
|
|
36
|
+
const releaseInfo = "MTc0ODQ2OTYwMDAwMA==";
|
|
37
37
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
38
38
|
packageName: "x-data-grid-premium",
|
|
39
39
|
releaseInfo: releaseInfo
|
|
@@ -69,6 +69,7 @@ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
|
|
|
69
69
|
}))
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
+
if (process.env.NODE_ENV !== "production") DataGridPremiumRaw.displayName = "DataGridPremiumRaw";
|
|
72
73
|
process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
73
74
|
// ----------------------------- Warning --------------------------------
|
|
74
75
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -640,6 +641,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
640
641
|
* @default "error" ("warn" in dev mode)
|
|
641
642
|
*/
|
|
642
643
|
logLevel: PropTypes.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
644
|
+
/**
|
|
645
|
+
* If set to "always", the multi-sorting is applied without modifier key.
|
|
646
|
+
* Otherwise, the modifier key is required for multi-sorting to be applied.
|
|
647
|
+
* @see See https://mui.com/x/react-data-grid/sorting/#multi-sorting
|
|
648
|
+
* @default "withModifierKey"
|
|
649
|
+
*/
|
|
650
|
+
multipleColumnsSortingMode: PropTypes.oneOf(['always', 'withModifierKey']),
|
|
643
651
|
/**
|
|
644
652
|
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
|
|
645
653
|
*/
|
|
@@ -1244,8 +1252,9 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1244
1252
|
/**
|
|
1245
1253
|
* The function is used to split the pasted text into rows and cells.
|
|
1246
1254
|
* @param {string} text The text pasted from the clipboard.
|
|
1255
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
1247
1256
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
1248
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
1257
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
1249
1258
|
*/
|
|
1250
1259
|
splitClipboardPastedText: PropTypes.func,
|
|
1251
1260
|
style: PropTypes.object,
|
|
@@ -1280,4 +1289,5 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1280
1289
|
* API:
|
|
1281
1290
|
* - [DataGridPremium API](https://mui.com/x/api/data-grid/data-grid-premium/)
|
|
1282
1291
|
*/
|
|
1283
|
-
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1292
|
+
export const DataGridPremium = /*#__PURE__*/React.memo(DataGridPremiumRaw);
|
|
1293
|
+
if (process.env.NODE_ENV !== "production") DataGridPremium.displayName = "DataGridPremium";
|
|
@@ -27,11 +27,11 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
27
27
|
aggregationRowsScope: 'filtered',
|
|
28
28
|
getAggregationPosition: groupNode => groupNode.depth === -1 ? 'footer' : 'inline',
|
|
29
29
|
disableClipboardPaste: false,
|
|
30
|
-
splitClipboardPastedText: pastedText => {
|
|
30
|
+
splitClipboardPastedText: (pastedText, delimiter = '\t') => {
|
|
31
31
|
// Excel on Windows adds an empty line break at the end of the copied text.
|
|
32
32
|
// See https://github.com/mui/mui-x/issues/9103
|
|
33
33
|
const text = pastedText.replace(/\r?\n$/, '');
|
|
34
|
-
return text.split(/\r\n|\n|\r/).map(row => row.split(
|
|
34
|
+
return text.split(/\r\n|\n|\r/).map(row => row.split(delimiter));
|
|
35
35
|
},
|
|
36
36
|
disablePivoting: false,
|
|
37
37
|
getPivotDerivedColumns: defaultGetPivotDerivedColumns,
|
|
@@ -5,7 +5,7 @@ const _excluded = ["native"];
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
8
|
-
import
|
|
8
|
+
import useId from '@mui/utils/useId';
|
|
9
9
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
10
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
11
11
|
import { canColumnHaveAggregationFunction, getAggregationFunctionLabel, getAvailableAggregationFunctions } from "../hooks/features/aggregation/gridAggregationUtils.js";
|
|
@@ -30,6 +30,7 @@ export function GridColumnMenuRowGroupItem(props) {
|
|
|
30
30
|
children: apiRef.current.getLocaleText('unGroupColumn')(name)
|
|
31
31
|
}, field);
|
|
32
32
|
};
|
|
33
|
+
if (process.env.NODE_ENV !== "production") renderUnGroupingMenuItem.displayName = "renderUnGroupingMenuItem";
|
|
33
34
|
if (!colDef || !isGroupingColumn(colDef.field)) {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { useGridPrivateApiContext, gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector, gridRowSelector, vars } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { useGridSelector, getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
6
6
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
@@ -12,6 +12,7 @@ const GridEmptyPivotOverlay = forwardRef(function GridEmptyPivotOverlay(props, r
|
|
|
12
12
|
children: apiRef.current.getLocaleText('emptyPivotOverlayLabel')
|
|
13
13
|
}));
|
|
14
14
|
});
|
|
15
|
+
if (process.env.NODE_ENV !== "production") GridEmptyPivotOverlay.displayName = "GridEmptyPivotOverlay";
|
|
15
16
|
process.env.NODE_ENV !== "production" ? GridEmptyPivotOverlay.propTypes = {
|
|
16
17
|
// ----------------------------- Warning --------------------------------
|
|
17
18
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -39,4 +39,5 @@ export const GridPremiumColumnMenu = forwardRef(function GridPremiumColumnMenuSi
|
|
|
39
39
|
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
|
|
40
40
|
ref: ref
|
|
41
41
|
}));
|
|
42
|
-
});
|
|
42
|
+
});
|
|
43
|
+
if (process.env.NODE_ENV !== "production") GridPremiumColumnMenu.displayName = "GridPremiumColumnMenu";
|
|
@@ -44,6 +44,7 @@ export function GridPremiumToolbar(props) {
|
|
|
44
44
|
onClick: onMenuItemClick,
|
|
45
45
|
children: apiRef.current.getLocaleText('toolbarExportExcel')
|
|
46
46
|
}) : undefined;
|
|
47
|
+
if (process.env.NODE_ENV !== "production") additionalExportMenuItems.displayName = "additionalExportMenuItems";
|
|
47
48
|
return /*#__PURE__*/_jsx(GridToolbar, _extends({}, other, {
|
|
48
49
|
additionalItems: additionalItems,
|
|
49
50
|
additionalExportMenuItems: additionalExportMenuItems
|
|
@@ -74,6 +74,7 @@ const AiAssistantPanelTrigger = forwardRef(function AiAssistantPanelTrigger(prop
|
|
|
74
74
|
children: element
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
+
if (process.env.NODE_ENV !== "production") AiAssistantPanelTrigger.displayName = "AiAssistantPanelTrigger";
|
|
77
78
|
process.env.NODE_ENV !== "production" ? AiAssistantPanelTrigger.propTypes = {
|
|
78
79
|
// ----------------------------- Warning --------------------------------
|
|
79
80
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridSelector, getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
5
|
-
import
|
|
5
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import { styled } from '@mui/system';
|
|
7
7
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
8
8
|
import { gridAiAssistantActiveConversationSelector, gridAiAssistantConversationsSelector } from "../../hooks/features/aiAssistant/gridAiAssistantSelectors.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { getDataGridUtilityClass, GridShadowScrollArea } from '@mui/x-data-grid-pro';
|
|
4
|
-
import
|
|
4
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
7
7
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
3
|
-
import
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
6
6
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -6,7 +6,7 @@ import { styled } from '@mui/system';
|
|
|
6
6
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
7
7
|
import useId from '@mui/utils/useId';
|
|
8
8
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
9
|
-
import
|
|
9
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
10
10
|
import clsx from 'clsx';
|
|
11
11
|
import { CollapsibleContext } from "./CollapsibleContext.js";
|
|
12
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const CollapsibleContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") CollapsibleContext.displayName = "CollapsibleContext";
|
|
3
4
|
export function useCollapsibleContext() {
|
|
4
5
|
const context = React.useContext(CollapsibleContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
7
7
|
import useId from '@mui/utils/useId';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
10
10
|
import clsx from 'clsx';
|
|
11
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -4,7 +4,7 @@ const _excluded = ["children", "className"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -42,6 +42,7 @@ const ExportExcel = forwardRef(function ExportExcel(props, ref) {
|
|
|
42
42
|
children: element
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
|
+
if (process.env.NODE_ENV !== "production") ExportExcel.displayName = "ExportExcel";
|
|
45
46
|
process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
46
47
|
// ----------------------------- Warning --------------------------------
|
|
47
48
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { styled } from '@mui/system';
|
|
4
4
|
import { useGridSelector, getDataGridUtilityClass, gridRowCountSelector } from '@mui/x-data-grid-pro';
|
|
5
5
|
import { vars, NotRendered } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { SidebarHeader } from "../sidebar/index.js";
|
|
8
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
8
8
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -60,6 +60,7 @@ const PivotPanelTrigger = forwardRef(function PivotPanelTrigger(props, ref) {
|
|
|
60
60
|
children: element
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
|
+
if (process.env.NODE_ENV !== "production") PivotPanelTrigger.displayName = "PivotPanelTrigger";
|
|
63
64
|
process.env.NODE_ENV !== "production" ? PivotPanelTrigger.propTypes = {
|
|
64
65
|
// ----------------------------- Warning --------------------------------
|
|
65
66
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getDataGridUtilityClass, gridClasses, gridColumnLookupSelector, useGridSelector } from '@mui/x-data-grid-pro';
|
|
3
|
-
import
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
+
import capitalize from '@mui/utils/capitalize';
|
|
4
5
|
import { keyframes, styled } from '@mui/system';
|
|
5
6
|
import { getValueOptions, isSingleSelectColDef, vars } from '@mui/x-data-grid-pro/internals';
|
|
6
7
|
import useId from '@mui/utils/useId';
|
|
@@ -61,6 +61,7 @@ const PromptField = forwardRef(function PromptField(props, ref) {
|
|
|
61
61
|
children: element
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
|
+
if (process.env.NODE_ENV !== "production") PromptField.displayName = "PromptField";
|
|
64
65
|
process.env.NODE_ENV !== "production" ? PromptField.propTypes = {
|
|
65
66
|
// ----------------------------- Warning --------------------------------
|
|
66
67
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const PromptFieldContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") PromptFieldContext.displayName = "PromptFieldContext";
|
|
3
4
|
export function usePromptFieldContext() {
|
|
4
5
|
const context = React.useContext(PromptFieldContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -57,6 +57,7 @@ const PromptFieldControl = forwardRef(function PromptFieldControl(props, ref) {
|
|
|
57
57
|
children: element
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
+
if (process.env.NODE_ENV !== "production") PromptFieldControl.displayName = "PromptFieldControl";
|
|
60
61
|
process.env.NODE_ENV !== "production" ? PromptFieldControl.propTypes = {
|
|
61
62
|
// ----------------------------- Warning --------------------------------
|
|
62
63
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -123,6 +123,7 @@ const PromptFieldRecord = forwardRef(function PromptFieldRecord(props, ref) {
|
|
|
123
123
|
children: element
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
|
+
if (process.env.NODE_ENV !== "production") PromptFieldRecord.displayName = "PromptFieldRecord";
|
|
126
127
|
process.env.NODE_ENV !== "production" ? PromptFieldRecord.propTypes = {
|
|
127
128
|
// ----------------------------- Warning --------------------------------
|
|
128
129
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -48,6 +48,7 @@ const PromptFieldSend = forwardRef(function PromptFieldSend(props, ref) {
|
|
|
48
48
|
children: element
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
|
+
if (process.env.NODE_ENV !== "production") PromptFieldSend.displayName = "PromptFieldSend";
|
|
51
52
|
process.env.NODE_ENV !== "production" ? PromptFieldSend.propTypes = {
|
|
52
53
|
// ----------------------------- Warning --------------------------------
|
|
53
54
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/system';
|
|
7
7
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { ResizablePanelContext } from "./ResizablePanelContext.js";
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const ResizablePanelContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") ResizablePanelContext.displayName = "ResizablePanelContext";
|
|
3
4
|
export function useResizablePanelContext() {
|
|
4
5
|
const context = React.useContext(ResizablePanelContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -4,7 +4,7 @@ const _excluded = ["className", "children"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
7
|
-
import
|
|
7
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { getDataGridUtilityClass, gridClasses } from '@mui/x-data-grid-pro';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import { useResize } from "../../hooks/utils/useResize.js";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { styled } from '@mui/system';
|
|
7
7
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import { ResizablePanel, ResizablePanelHandle } from "../resizablePanel/index.js";
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { styled } from '@mui/system';
|
|
6
6
|
import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { vars } from '@mui/x-data-grid-pro/internals';
|
|
8
|
-
import
|
|
8
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import
|
|
2
|
+
import capitalize from '@mui/utils/capitalize';
|
|
3
3
|
import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
|
|
4
4
|
import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
5
5
|
import { addPinnedRow, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
|
|
@@ -458,7 +458,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
458
458
|
const sortedSelectedRowIds = sortedRowIds.filter(id => unsortedSelectedRowIds.includes(`${id}`));
|
|
459
459
|
const copyData = sortedSelectedRowIds.reduce((acc, rowId) => {
|
|
460
460
|
const fieldsMap = cellSelectionModel[rowId];
|
|
461
|
-
const
|
|
461
|
+
const rowValues = Object.keys(fieldsMap).map(field => {
|
|
462
462
|
let cellData;
|
|
463
463
|
if (fieldsMap[field]) {
|
|
464
464
|
const cellParams = apiRef.current.getCellParams(rowId, field);
|
|
@@ -473,8 +473,9 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
473
473
|
} else {
|
|
474
474
|
cellData = '';
|
|
475
475
|
}
|
|
476
|
-
return
|
|
476
|
+
return cellData;
|
|
477
477
|
}, '');
|
|
478
|
+
const rowString = rowValues.join(clipboardCopyCellDelimiter);
|
|
478
479
|
return acc === '' ? rowString : [acc, rowString].join('\r\n');
|
|
479
480
|
}, '');
|
|
480
481
|
return copyData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
3
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart">) => void;
|
|
4
|
+
export declare const useGridClipboardImport: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "pagination" | "paginationMode" | "processRowUpdate" | "onProcessRowUpdateError" | "getRowId" | "onClipboardPasteStart" | "onClipboardPasteEnd" | "splitClipboardPastedText" | "disableClipboardPaste" | "onBeforeClipboardPasteStart" | "clipboardCopyCellDelimiter">) => void;
|
|
@@ -4,7 +4,7 @@ import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumn
|
|
|
4
4
|
import { getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor, getPublicApiRef, isPasteShortcut, useGridLogger } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
6
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
|
|
7
|
-
import
|
|
7
|
+
import debounce from '@mui/utils/debounce';
|
|
8
8
|
const columnFieldsToExcludeFromPaste = [GRID_CHECKBOX_SELECTION_FIELD, GRID_REORDER_COL_DEF.field, GRID_DETAIL_PANEL_TOGGLE_FIELD];
|
|
9
9
|
|
|
10
10
|
// Batches rows that are updated during clipboard paste to reduce `updateRows` calls
|
|
@@ -256,8 +256,9 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
256
256
|
const getRowId = props.getRowId;
|
|
257
257
|
const enableClipboardPaste = !props.disableClipboardPaste;
|
|
258
258
|
const logger = useGridLogger(apiRef, 'useGridClipboardImport');
|
|
259
|
-
const splitClipboardPastedText = props.splitClipboardPastedText;
|
|
260
259
|
const {
|
|
260
|
+
clipboardCopyCellDelimiter,
|
|
261
|
+
splitClipboardPastedText,
|
|
261
262
|
pagination,
|
|
262
263
|
paginationMode,
|
|
263
264
|
onBeforeClipboardPasteStart
|
|
@@ -285,7 +286,7 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
285
286
|
if (!text) {
|
|
286
287
|
return;
|
|
287
288
|
}
|
|
288
|
-
const pastedData = splitClipboardPastedText(text);
|
|
289
|
+
const pastedData = splitClipboardPastedText(text, clipboardCopyCellDelimiter);
|
|
289
290
|
if (!pastedData) {
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
@@ -318,7 +319,7 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
318
319
|
paginationMode
|
|
319
320
|
});
|
|
320
321
|
cellUpdater.applyUpdates();
|
|
321
|
-
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
322
|
+
}, [apiRef, processRowUpdate, onProcessRowUpdateError, getRowId, enableClipboardPaste, splitClipboardPastedText, clipboardCopyCellDelimiter, pagination, paginationMode, onBeforeClipboardPasteStart, logger]);
|
|
322
323
|
const checkIfCanStartEditing = React.useCallback((initialValue, {
|
|
323
324
|
event
|
|
324
325
|
}) => {
|
|
@@ -255,6 +255,7 @@ export const createGroupingColDefForAllGroupingCriteria = ({
|
|
|
255
255
|
// Then we apply the sorting / filtering on the leaves based on the properties of `leavesColDef`
|
|
256
256
|
//
|
|
257
257
|
// By default, we apply the sorting / filtering on the groups of the top level grouping criteria based on the properties of `columnsLookup[orderedGroupedByFields[0]]`.
|
|
258
|
+
if (process.env.NODE_ENV !== "production") commonProperties.renderCell.displayName = "commonProperties.renderCell";
|
|
258
259
|
let sourceProperties;
|
|
259
260
|
if (mainGroupingCriteria && rowGroupingModel.includes(mainGroupingCriteria)) {
|
|
260
261
|
sourceProperties = getGroupingCriteriaProperties(columnsLookup[mainGroupingCriteria], true);
|
package/esm/index.js
CHANGED
|
@@ -78,10 +78,11 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
|
|
|
78
78
|
/**
|
|
79
79
|
* The function is used to split the pasted text into rows and cells.
|
|
80
80
|
* @param {string} text The text pasted from the clipboard.
|
|
81
|
+
* @param {string} delimiter The delimiter used to split the text. Default is the tab character and can be set with the `clipboardCopyCellDelimiter` prop.
|
|
81
82
|
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
|
|
82
|
-
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(
|
|
83
|
+
* @default (pastedText, delimiter = '\t') => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split(delimiter)); }
|
|
83
84
|
*/
|
|
84
|
-
splitClipboardPastedText: (text: string) => string[][] | null;
|
|
85
|
+
splitClipboardPastedText: (text: string, delimiter: string) => string[][] | null;
|
|
85
86
|
/**
|
|
86
87
|
* If `true`, the pivoting feature is disabled.
|
|
87
88
|
* @default false
|
package/esm/models/index.d.ts
CHANGED
package/esm/models/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.mergeStateWithAggregationModel = exports.getAvailableAggregationFunctions = exports.getAggregationRules = exports.getAggregationFunctionLabel = exports.getAggregationFooterRowIdFromGroupId = exports.canColumnHaveAggregationFunction = exports.areAggregationRulesEqual = exports.addFooterRows = exports.GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var
|
|
9
|
+
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
|
10
10
|
var _internals = require("@mui/x-data-grid/internals");
|
|
11
11
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
12
12
|
var _internals2 = require("@mui/x-data-grid-pro/internals");
|
|
@@ -187,7 +187,7 @@ const getAggregationFunctionLabel = ({
|
|
|
187
187
|
return aggregationRule.aggregationFunction.label;
|
|
188
188
|
}
|
|
189
189
|
try {
|
|
190
|
-
return apiRef.current.getLocaleText(`aggregationFunctionLabel${(0,
|
|
190
|
+
return apiRef.current.getLocaleText(`aggregationFunctionLabel${(0, _capitalize.default)(aggregationRule.aggregationFunctionName)}`);
|
|
191
191
|
} catch {
|
|
192
192
|
return aggregationRule.aggregationFunctionName;
|
|
193
193
|
}
|