@mui/x-data-grid 6.3.1 → 6.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 +113 -0
- package/DataGrid/DataGrid.js +20 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/DataGrid/useDataGridProps.js +8 -13
- package/colDef/gridBooleanColDef.js +19 -1
- package/colDef/gridDateColDef.js +6 -2
- package/colDef/gridNumericOperators.js +0 -6
- package/colDef/gridSingleSelectColDef.js +21 -1
- package/components/base/GridBody.js +2 -1
- package/components/cell/GridEditInputCell.js +4 -1
- package/components/containers/GridRootStyles.js +1 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +15 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +8 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +8 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +11 -4
- package/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -1
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/panel/filterPanel/index.d.ts +3 -1
- package/components/panel/filterPanel/index.js +2 -1
- package/constants/localeTextConstants.js +26 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +12 -1
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -1
- package/hooks/features/clipboard/useGridClipboard.js +43 -26
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +9 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/hooks/features/dimensions/useGridDimensions.js +4 -6
- package/hooks/features/editing/useGridCellEditing.js +7 -3
- package/hooks/features/editing/useGridEditing.js +0 -3
- package/hooks/features/editing/useGridRowEditing.js +7 -3
- package/hooks/features/export/serializers/csvSerializer.d.ts +5 -0
- package/hooks/features/export/serializers/csvSerializer.js +46 -6
- package/hooks/features/export/useGridCsvExport.d.ts +2 -1
- package/hooks/features/export/useGridCsvExport.js +7 -5
- package/hooks/features/focus/gridFocusState.d.ts +2 -0
- package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -0
- package/hooks/features/focus/gridFocusStateSelector.js +6 -0
- package/hooks/features/focus/useGridFocus.js +55 -9
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -0
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
- package/hooks/features/headerFiltering/index.d.ts +1 -0
- package/hooks/features/headerFiltering/index.js +1 -0
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +6 -0
- package/hooks/features/headerFiltering/useGridHeaderFiltering.js +91 -0
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +2 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
- package/hooks/features/rows/useGridRows.js +16 -1
- package/index.js +1 -1
- package/internals/index.d.ts +9 -3
- package/internals/index.js +7 -2
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/internals/utils/useProps.d.ts +8 -0
- package/internals/utils/useProps.js +13 -0
- package/joy/icons.d.ts +33 -0
- package/joy/icons.js +433 -0
- package/joy/joySlots.js +114 -4
- package/legacy/DataGrid/DataGrid.js +20 -1
- package/legacy/DataGrid/useDataGridComponent.js +2 -2
- package/legacy/DataGrid/useDataGridProps.js +11 -9
- package/legacy/colDef/gridBooleanColDef.js +21 -1
- package/legacy/colDef/gridDateColDef.js +10 -2
- package/legacy/colDef/gridNumericOperators.js +0 -6
- package/legacy/colDef/gridSingleSelectColDef.js +21 -1
- package/legacy/components/base/GridBody.js +2 -1
- package/legacy/components/cell/GridEditInputCell.js +4 -1
- package/legacy/components/containers/GridRootStyles.js +1 -0
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +79 -35
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +26 -5
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +54 -31
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +28 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/legacy/components/panel/filterPanel/index.js +2 -1
- package/legacy/constants/localeTextConstants.js +26 -0
- package/legacy/hooks/features/clipboard/useGridClipboard.js +44 -26
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/legacy/hooks/features/dimensions/useGridDimensions.js +4 -6
- package/legacy/hooks/features/editing/useGridCellEditing.js +7 -3
- package/legacy/hooks/features/editing/useGridEditing.js +0 -3
- package/legacy/hooks/features/editing/useGridRowEditing.js +7 -3
- package/legacy/hooks/features/export/serializers/csvSerializer.js +43 -6
- package/legacy/hooks/features/export/useGridCsvExport.js +8 -5
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +10 -0
- package/legacy/hooks/features/focus/useGridFocus.js +58 -9
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +11 -0
- package/legacy/hooks/features/headerFiltering/index.js +1 -0
- package/legacy/hooks/features/headerFiltering/useGridHeaderFiltering.js +93 -0
- package/legacy/hooks/features/index.js +2 -1
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +123 -4
- package/legacy/hooks/features/rows/useGridRows.js +16 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +7 -2
- package/legacy/internals/utils/index.js +2 -1
- package/legacy/internals/utils/useProps.js +11 -0
- package/legacy/joy/icons.js +432 -0
- package/legacy/joy/joySlots.js +118 -4
- package/legacy/locales/arSD.js +28 -0
- package/legacy/locales/beBY.js +28 -0
- package/legacy/locales/bgBG.js +28 -0
- package/legacy/locales/csCZ.js +36 -8
- package/legacy/locales/daDK.js +28 -0
- package/legacy/locales/deDE.js +30 -2
- package/legacy/locales/elGR.js +27 -0
- package/legacy/locales/esES.js +28 -0
- package/legacy/locales/faIR.js +28 -0
- package/legacy/locales/fiFI.js +28 -0
- package/legacy/locales/frFR.js +34 -6
- package/legacy/locales/heIL.js +30 -2
- package/legacy/locales/huHU.js +28 -0
- package/legacy/locales/itIT.js +28 -0
- package/legacy/locales/jaJP.js +28 -0
- package/legacy/locales/koKR.js +28 -0
- package/legacy/locales/nbNO.js +28 -0
- package/legacy/locales/nlNL.js +28 -0
- package/legacy/locales/plPL.js +28 -0
- package/legacy/locales/ptBR.js +29 -1
- package/legacy/locales/roRO.js +28 -0
- package/legacy/locales/ruRU.js +28 -0
- package/legacy/locales/skSK.js +28 -0
- package/legacy/locales/svSE.js +28 -0
- package/legacy/locales/trTR.js +28 -0
- package/legacy/locales/ukUA.js +36 -9
- package/legacy/locales/urPK.js +28 -0
- package/legacy/locales/viVN.js +27 -0
- package/legacy/locales/zhCN.js +28 -0
- package/legacy/locales/zhTW.js +28 -0
- package/legacy/material/index.js +5 -1
- package/legacy/models/api/index.js +0 -1
- package/legacy/models/index.js +0 -1
- package/legacy/utils/domUtils.js +14 -1
- package/locales/arSD.js +28 -0
- package/locales/beBY.js +28 -0
- package/locales/bgBG.js +28 -0
- package/locales/csCZ.js +36 -8
- package/locales/daDK.js +28 -0
- package/locales/deDE.js +30 -2
- package/locales/elGR.js +27 -0
- package/locales/esES.js +28 -0
- package/locales/faIR.js +28 -0
- package/locales/fiFI.js +28 -0
- package/locales/frFR.js +34 -6
- package/locales/heIL.js +30 -2
- package/locales/huHU.js +28 -0
- package/locales/itIT.js +28 -0
- package/locales/jaJP.js +28 -0
- package/locales/koKR.js +28 -0
- package/locales/nbNO.js +28 -0
- package/locales/nlNL.js +28 -0
- package/locales/plPL.js +28 -0
- package/locales/ptBR.js +29 -1
- package/locales/roRO.js +28 -0
- package/locales/ruRU.js +28 -0
- package/locales/skSK.js +28 -0
- package/locales/svSE.js +28 -0
- package/locales/trTR.js +28 -0
- package/locales/ukUA.js +36 -9
- package/locales/urPK.js +28 -0
- package/locales/viVN.js +27 -0
- package/locales/zhCN.js +28 -0
- package/locales/zhTW.js +28 -0
- package/material/index.d.ts +3 -65
- package/material/index.js +5 -1
- package/models/api/gridApiCommon.d.ts +3 -3
- package/models/api/gridCoreApi.d.ts +8 -0
- package/models/api/gridFocusApi.d.ts +6 -0
- package/models/api/gridHeaderFilteringApi.d.ts +30 -0
- package/models/api/gridLocaleTextApi.d.ts +25 -0
- package/models/api/index.d.ts +0 -1
- package/models/api/index.js +0 -1
- package/models/events/gridEventLookup.d.ts +33 -1
- package/models/gridFilterOperator.d.ts +4 -0
- package/models/gridHeaderFilteringModel.d.ts +5 -0
- package/models/gridHeaderFilteringModel.js +1 -0
- package/models/gridSlotsComponent.d.ts +21 -4
- package/models/gridSlotsComponentsProps.d.ts +4 -0
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/index.d.ts +1 -1
- package/models/index.js +0 -1
- package/models/props/DataGridProps.d.ts +19 -0
- package/modern/DataGrid/DataGrid.js +20 -1
- package/modern/DataGrid/useDataGridComponent.js +2 -2
- package/modern/DataGrid/useDataGridProps.js +8 -13
- package/modern/colDef/gridBooleanColDef.js +19 -1
- package/modern/colDef/gridDateColDef.js +6 -2
- package/modern/colDef/gridNumericOperators.js +0 -6
- package/modern/colDef/gridSingleSelectColDef.js +21 -1
- package/modern/components/base/GridBody.js +2 -1
- package/modern/components/cell/GridEditInputCell.js +4 -1
- package/modern/components/containers/GridRootStyles.js +1 -0
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/panel/filterPanel/index.js +2 -1
- package/modern/constants/localeTextConstants.js +26 -0
- package/modern/hooks/features/clipboard/useGridClipboard.js +43 -26
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +3 -5
- package/modern/hooks/features/editing/useGridCellEditing.js +7 -3
- package/modern/hooks/features/editing/useGridEditing.js +0 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -3
- package/modern/hooks/features/export/serializers/csvSerializer.js +44 -6
- package/modern/hooks/features/export/useGridCsvExport.js +7 -5
- package/modern/hooks/features/focus/gridFocusStateSelector.js +6 -0
- package/modern/hooks/features/focus/useGridFocus.js +55 -9
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
- package/modern/hooks/features/headerFiltering/index.js +1 -0
- package/modern/hooks/features/headerFiltering/useGridHeaderFiltering.js +90 -0
- package/modern/hooks/features/index.js +2 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
- package/modern/hooks/features/rows/useGridRows.js +16 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +7 -2
- package/modern/internals/utils/index.js +2 -1
- package/modern/internals/utils/useProps.js +13 -0
- package/modern/joy/icons.js +433 -0
- package/modern/joy/joySlots.js +110 -4
- package/modern/locales/arSD.js +28 -0
- package/modern/locales/beBY.js +28 -0
- package/modern/locales/bgBG.js +28 -0
- package/modern/locales/csCZ.js +36 -8
- package/modern/locales/daDK.js +28 -0
- package/modern/locales/deDE.js +30 -2
- package/modern/locales/elGR.js +27 -0
- package/modern/locales/esES.js +28 -0
- package/modern/locales/faIR.js +28 -0
- package/modern/locales/fiFI.js +28 -0
- package/modern/locales/frFR.js +34 -6
- package/modern/locales/heIL.js +30 -2
- package/modern/locales/huHU.js +28 -0
- package/modern/locales/itIT.js +28 -0
- package/modern/locales/jaJP.js +28 -0
- package/modern/locales/koKR.js +28 -0
- package/modern/locales/nbNO.js +28 -0
- package/modern/locales/nlNL.js +28 -0
- package/modern/locales/plPL.js +28 -0
- package/modern/locales/ptBR.js +29 -1
- package/modern/locales/roRO.js +28 -0
- package/modern/locales/ruRU.js +28 -0
- package/modern/locales/skSK.js +28 -0
- package/modern/locales/svSE.js +28 -0
- package/modern/locales/trTR.js +28 -0
- package/modern/locales/ukUA.js +36 -9
- package/modern/locales/urPK.js +28 -0
- package/modern/locales/viVN.js +27 -0
- package/modern/locales/zhCN.js +28 -0
- package/modern/locales/zhTW.js +28 -0
- package/modern/material/index.js +5 -1
- package/modern/models/api/gridHeaderFilteringApi.js +1 -0
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridHeaderFilteringModel.js +1 -0
- package/modern/models/index.js +0 -1
- package/modern/utils/domUtils.js +13 -1
- package/node/DataGrid/DataGrid.js +20 -1
- package/node/DataGrid/useDataGridComponent.js +2 -2
- package/node/DataGrid/useDataGridProps.js +7 -12
- package/node/colDef/gridBooleanColDef.js +19 -1
- package/node/colDef/gridDateColDef.js +6 -2
- package/node/colDef/gridNumericOperators.js +0 -6
- package/node/colDef/gridSingleSelectColDef.js +21 -1
- package/node/components/base/GridBody.js +2 -1
- package/node/components/cell/GridEditInputCell.js +4 -1
- package/node/components/containers/GridRootStyles.js +1 -0
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +78 -35
- package/node/components/panel/filterPanel/GridFilterInputDate.js +27 -6
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
- package/node/components/panel/filterPanel/GridFilterInputValue.js +29 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +2 -1
- package/node/components/panel/filterPanel/index.js +26 -8
- package/node/constants/localeTextConstants.js +26 -0
- package/node/hooks/features/clipboard/useGridClipboard.js +42 -25
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/node/hooks/features/dimensions/useGridDimensions.js +3 -5
- package/node/hooks/features/editing/useGridCellEditing.js +7 -3
- package/node/hooks/features/editing/useGridEditing.js +0 -3
- package/node/hooks/features/editing/useGridRowEditing.js +7 -3
- package/node/hooks/features/export/serializers/csvSerializer.js +46 -6
- package/node/hooks/features/export/useGridCsvExport.js +6 -3
- package/node/hooks/features/focus/gridFocusStateSelector.js +9 -1
- package/node/hooks/features/focus/useGridFocus.js +55 -9
- package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +15 -0
- package/node/hooks/features/headerFiltering/index.js +16 -0
- package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +101 -0
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
- package/node/hooks/features/rows/useGridRows.js +16 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +69 -1
- package/node/internals/utils/index.js +11 -0
- package/node/internals/utils/useProps.js +22 -0
- package/node/joy/icons.js +471 -0
- package/node/joy/joySlots.js +110 -3
- package/node/locales/arSD.js +28 -0
- package/node/locales/beBY.js +28 -0
- package/node/locales/bgBG.js +28 -0
- package/node/locales/csCZ.js +36 -8
- package/node/locales/daDK.js +28 -0
- package/node/locales/deDE.js +30 -2
- package/node/locales/elGR.js +27 -0
- package/node/locales/esES.js +28 -0
- package/node/locales/faIR.js +28 -0
- package/node/locales/fiFI.js +28 -0
- package/node/locales/frFR.js +34 -6
- package/node/locales/heIL.js +30 -2
- package/node/locales/huHU.js +28 -0
- package/node/locales/itIT.js +28 -0
- package/node/locales/jaJP.js +28 -0
- package/node/locales/koKR.js +28 -0
- package/node/locales/nbNO.js +28 -0
- package/node/locales/nlNL.js +28 -0
- package/node/locales/plPL.js +28 -0
- package/node/locales/ptBR.js +29 -1
- package/node/locales/roRO.js +28 -0
- package/node/locales/ruRU.js +28 -0
- package/node/locales/skSK.js +28 -0
- package/node/locales/svSE.js +28 -0
- package/node/locales/trTR.js +28 -0
- package/node/locales/ukUA.js +36 -9
- package/node/locales/urPK.js +28 -0
- package/node/locales/viVN.js +27 -0
- package/node/locales/zhCN.js +28 -0
- package/node/locales/zhTW.js +28 -0
- package/node/material/index.js +5 -1
- package/node/models/api/index.js +0 -11
- package/node/models/gridHeaderFilteringModel.js +5 -0
- package/node/models/index.js +0 -11
- package/node/utils/domUtils.js +15 -1
- package/package.json +1 -1
- package/utils/domUtils.d.ts +1 -0
- package/utils/domUtils.js +13 -1
- package/models/api/gridClipboardApi.d.ts +0 -11
- /package/legacy/models/api/{gridClipboardApi.js → gridHeaderFilteringApi.js} +0 -0
- /package/{models/api/gridClipboardApi.js → legacy/models/gridHeaderFilteringModel.js} +0 -0
- /package/{modern/models/api/gridClipboardApi.js → models/api/gridHeaderFilteringApi.js} +0 -0
- /package/node/models/api/{gridClipboardApi.js → gridHeaderFilteringApi.js} +0 -0
package/joy/icons.js
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["sx", "fontSize"],
|
|
4
|
+
_excluded2 = ["sortingOrder"];
|
|
5
|
+
/**
|
|
6
|
+
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
|
|
7
|
+
* All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
8
|
+
*
|
|
9
|
+
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
|
|
10
|
+
* provided that the above copyright notice and this permission notice appear in all copies.
|
|
11
|
+
*
|
|
12
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
|
|
13
|
+
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
|
14
|
+
* FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
15
|
+
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
16
|
+
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
17
|
+
*/
|
|
18
|
+
import * as React from 'react';
|
|
19
|
+
import SvgIcon from '@mui/joy/SvgIcon';
|
|
20
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
function createSvgIcon(path, displayName) {
|
|
24
|
+
const fontSizeMap = {
|
|
25
|
+
small: 'lg',
|
|
26
|
+
medium: 'xl',
|
|
27
|
+
large: 'xl2',
|
|
28
|
+
inherit: undefined
|
|
29
|
+
};
|
|
30
|
+
// @ts-ignore internal component
|
|
31
|
+
function Component(_ref, ref) {
|
|
32
|
+
let {
|
|
33
|
+
sx,
|
|
34
|
+
fontSize
|
|
35
|
+
} = _ref,
|
|
36
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/_jsx(SvgIcon, _extends({
|
|
38
|
+
"data-testid": `${displayName}Icon`,
|
|
39
|
+
ref: ref,
|
|
40
|
+
fill: "none",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeWidth: "2",
|
|
43
|
+
strokeLinecap: "round",
|
|
44
|
+
strokeLinejoin: "round",
|
|
45
|
+
sx: [{
|
|
46
|
+
fill: 'none'
|
|
47
|
+
}, ...(Array.isArray(sx) ? sx : [sx])],
|
|
48
|
+
fontSize: fontSize ? fontSizeMap[fontSize] : undefined
|
|
49
|
+
}, props, {
|
|
50
|
+
children: path
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
54
|
+
// Need to set `displayName` on the inner component for React.memo.
|
|
55
|
+
// React prior to 16.14 ignores `displayName` on the wrapper.
|
|
56
|
+
Component.displayName = `${displayName}Icon`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @ts-ignore internal component
|
|
60
|
+
Component.muiName = SvgIcon.muiName;
|
|
61
|
+
|
|
62
|
+
// @ts-ignore internal component
|
|
63
|
+
return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
|
|
64
|
+
}
|
|
65
|
+
export const GridArrowUpwardIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
66
|
+
children: [/*#__PURE__*/_jsx("line", {
|
|
67
|
+
x1: "12",
|
|
68
|
+
x2: "12",
|
|
69
|
+
y1: "19",
|
|
70
|
+
y2: "5"
|
|
71
|
+
}), /*#__PURE__*/_jsx("polyline", {
|
|
72
|
+
points: "5 12 12 5 19 12"
|
|
73
|
+
})]
|
|
74
|
+
}), 'ArrowUpward');
|
|
75
|
+
export const GridArrowDownwardIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
76
|
+
children: [/*#__PURE__*/_jsx("line", {
|
|
77
|
+
x1: "12",
|
|
78
|
+
x2: "12",
|
|
79
|
+
y1: "5",
|
|
80
|
+
y2: "19"
|
|
81
|
+
}), /*#__PURE__*/_jsx("polyline", {
|
|
82
|
+
points: "19 12 12 19 5 12"
|
|
83
|
+
})]
|
|
84
|
+
}), 'ArrowDownward');
|
|
85
|
+
export const GridKeyboardArrowLeft = createSvgIcon( /*#__PURE__*/_jsx("polyline", {
|
|
86
|
+
points: "15 18 9 12 15 6"
|
|
87
|
+
}), 'KeyboardArrowLeft');
|
|
88
|
+
export const GridKeyboardArrowRight = createSvgIcon( /*#__PURE__*/_jsx("polyline", {
|
|
89
|
+
points: "9 18 15 12 9 6"
|
|
90
|
+
}), 'KeyboardArrowRight');
|
|
91
|
+
export const GridExpandMoreIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
92
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
93
|
+
d: "m7 15 5 5 5-5"
|
|
94
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
95
|
+
d: "m7 9 5-5 5 5"
|
|
96
|
+
})]
|
|
97
|
+
}), 'ExpandMore');
|
|
98
|
+
export const GridFilterListIcon = createSvgIcon( /*#__PURE__*/_jsx("polygon", {
|
|
99
|
+
points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"
|
|
100
|
+
}), 'FilterList');
|
|
101
|
+
export const GridFilterAltIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
102
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
103
|
+
d: "M3 6h18"
|
|
104
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
105
|
+
d: "M7 12h10"
|
|
106
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
107
|
+
d: "M10 18h4"
|
|
108
|
+
})]
|
|
109
|
+
}), 'FilterAlt');
|
|
110
|
+
export const GridSearchIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
111
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
112
|
+
cx: "11",
|
|
113
|
+
cy: "11",
|
|
114
|
+
r: "8"
|
|
115
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
116
|
+
x1: "21",
|
|
117
|
+
x2: "16.65",
|
|
118
|
+
y1: "21",
|
|
119
|
+
y2: "16.65"
|
|
120
|
+
})]
|
|
121
|
+
}), 'Search');
|
|
122
|
+
export const GridMenuIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
123
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
124
|
+
width: "18",
|
|
125
|
+
height: "18",
|
|
126
|
+
x: "3",
|
|
127
|
+
y: "3",
|
|
128
|
+
rx: "2"
|
|
129
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
130
|
+
d: "M7 8h10"
|
|
131
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
132
|
+
d: "M7 12h10"
|
|
133
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
134
|
+
d: "M7 16h10"
|
|
135
|
+
})]
|
|
136
|
+
}), 'Menu');
|
|
137
|
+
export const GridCheckCircleIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
138
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
139
|
+
d: "M22 11.08V12a10 10 0 1 1-5.93-9.14"
|
|
140
|
+
}), /*#__PURE__*/_jsx("polyline", {
|
|
141
|
+
points: "22 4 12 14.01 9 11.01"
|
|
142
|
+
})]
|
|
143
|
+
}), 'CheckCircle');
|
|
144
|
+
export const GridColumnIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
145
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
146
|
+
width: "18",
|
|
147
|
+
height: "18",
|
|
148
|
+
x: "3",
|
|
149
|
+
y: "3",
|
|
150
|
+
rx: "2",
|
|
151
|
+
ry: "2"
|
|
152
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
153
|
+
x1: "12",
|
|
154
|
+
x2: "12",
|
|
155
|
+
y1: "3",
|
|
156
|
+
y2: "21"
|
|
157
|
+
})]
|
|
158
|
+
}), 'ColumnIcon');
|
|
159
|
+
export const GridSeparatorIcon = createSvgIcon( /*#__PURE__*/_jsx("path", {
|
|
160
|
+
d: "M11 19V5h2v14z"
|
|
161
|
+
}), 'Separator');
|
|
162
|
+
export const GridViewHeadlineIcon = createSvgIcon( /*#__PURE__*/_jsx("path", {
|
|
163
|
+
fill: "none",
|
|
164
|
+
stroke: "currentColor",
|
|
165
|
+
strokeWidth: "1.5",
|
|
166
|
+
d: "M3 12h18M3 12v4.5M3 12V7.5M21 12v4.5m0-4.5V7.5m-18 9v3.9a.6.6 0 0 0 .6.6h16.8a.6.6 0 0 0 .6-.6v-3.9m-18 0h18m0-9V3.6a.6.6 0 0 0-.6-.6H3.6a.6.6 0 0 0-.6.6v3.9m18 0H3"
|
|
167
|
+
}), 'ViewHeadline');
|
|
168
|
+
export const GridTableRowsIcon = createSvgIcon( /*#__PURE__*/_jsx("path", {
|
|
169
|
+
fill: "currentColor",
|
|
170
|
+
strokeWidth: "0",
|
|
171
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5z"
|
|
172
|
+
}), 'TableRows');
|
|
173
|
+
export const GridViewStreamIcon = createSvgIcon( /*#__PURE__*/_jsx("path", {
|
|
174
|
+
d: "M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm0 6h16"
|
|
175
|
+
}), 'ViewStream');
|
|
176
|
+
export const GridTripleDotsVerticalIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
177
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
178
|
+
cx: "12",
|
|
179
|
+
cy: "12",
|
|
180
|
+
r: "1"
|
|
181
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
182
|
+
cx: "12",
|
|
183
|
+
cy: "5",
|
|
184
|
+
r: "1"
|
|
185
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
186
|
+
cx: "12",
|
|
187
|
+
cy: "19",
|
|
188
|
+
r: "1"
|
|
189
|
+
})]
|
|
190
|
+
}), 'TripleDotsVertical');
|
|
191
|
+
export const GridCloseIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
192
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
193
|
+
cx: "12",
|
|
194
|
+
cy: "12",
|
|
195
|
+
r: "10"
|
|
196
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
197
|
+
x1: "15",
|
|
198
|
+
x2: "9",
|
|
199
|
+
y1: "9",
|
|
200
|
+
y2: "15"
|
|
201
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
202
|
+
x1: "9",
|
|
203
|
+
x2: "15",
|
|
204
|
+
y1: "9",
|
|
205
|
+
y2: "15"
|
|
206
|
+
})]
|
|
207
|
+
}), 'Close');
|
|
208
|
+
export const GridAddIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
209
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
210
|
+
cx: "12",
|
|
211
|
+
cy: "12",
|
|
212
|
+
r: "10"
|
|
213
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
214
|
+
x1: "12",
|
|
215
|
+
x2: "12",
|
|
216
|
+
y1: "8",
|
|
217
|
+
y2: "16"
|
|
218
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
219
|
+
x1: "8",
|
|
220
|
+
x2: "16",
|
|
221
|
+
y1: "12",
|
|
222
|
+
y2: "12"
|
|
223
|
+
})]
|
|
224
|
+
}), 'Add');
|
|
225
|
+
export const GridRemoveIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
226
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
227
|
+
cx: "12",
|
|
228
|
+
cy: "12",
|
|
229
|
+
r: "10"
|
|
230
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
231
|
+
x1: "15",
|
|
232
|
+
x2: "9",
|
|
233
|
+
y1: "9",
|
|
234
|
+
y2: "15"
|
|
235
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
236
|
+
x1: "9",
|
|
237
|
+
x2: "15",
|
|
238
|
+
y1: "9",
|
|
239
|
+
y2: "15"
|
|
240
|
+
})]
|
|
241
|
+
}), 'Remove');
|
|
242
|
+
export const GridLoadIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
243
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
244
|
+
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
|
|
245
|
+
}), /*#__PURE__*/_jsx("polyline", {
|
|
246
|
+
points: "7 10 12 15 17 10"
|
|
247
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
248
|
+
x1: "12",
|
|
249
|
+
x2: "12",
|
|
250
|
+
y1: "15",
|
|
251
|
+
y2: "3"
|
|
252
|
+
})]
|
|
253
|
+
}), 'Load');
|
|
254
|
+
export const GridDragIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
255
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
256
|
+
cx: "9",
|
|
257
|
+
cy: "12",
|
|
258
|
+
r: "1"
|
|
259
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
260
|
+
cx: "9",
|
|
261
|
+
cy: "5",
|
|
262
|
+
r: "1"
|
|
263
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
264
|
+
cx: "9",
|
|
265
|
+
cy: "19",
|
|
266
|
+
r: "1"
|
|
267
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
268
|
+
cx: "15",
|
|
269
|
+
cy: "12",
|
|
270
|
+
r: "1"
|
|
271
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
272
|
+
cx: "15",
|
|
273
|
+
cy: "5",
|
|
274
|
+
r: "1"
|
|
275
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
276
|
+
cx: "15",
|
|
277
|
+
cy: "19",
|
|
278
|
+
r: "1"
|
|
279
|
+
})]
|
|
280
|
+
}), 'Drag');
|
|
281
|
+
export const GridSaveAltIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
282
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
283
|
+
d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"
|
|
284
|
+
}), /*#__PURE__*/_jsx("polyline", {
|
|
285
|
+
points: "14 2 14 8 20 8"
|
|
286
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
287
|
+
d: "M12 12v6"
|
|
288
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
289
|
+
d: "m15 15-3-3-3 3"
|
|
290
|
+
})]
|
|
291
|
+
}), 'SaveAlt');
|
|
292
|
+
export const GridCheckIcon = createSvgIcon( /*#__PURE__*/_jsx("polyline", {
|
|
293
|
+
points: "20 6 9 17 4 12"
|
|
294
|
+
}), 'Check');
|
|
295
|
+
export const GridMoreVertIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
296
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
297
|
+
cx: "12",
|
|
298
|
+
cy: "12",
|
|
299
|
+
r: "1"
|
|
300
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
301
|
+
cx: "12",
|
|
302
|
+
cy: "5",
|
|
303
|
+
r: "1"
|
|
304
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
305
|
+
cx: "12",
|
|
306
|
+
cy: "19",
|
|
307
|
+
r: "1"
|
|
308
|
+
})]
|
|
309
|
+
}), 'MoreVert');
|
|
310
|
+
export const GridVisibilityOffIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
311
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
312
|
+
d: "M9.88 9.88a3 3 0 1 0 4.24 4.24"
|
|
313
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
314
|
+
d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"
|
|
315
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
316
|
+
d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"
|
|
317
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
318
|
+
x1: "2",
|
|
319
|
+
x2: "22",
|
|
320
|
+
y1: "2",
|
|
321
|
+
y2: "22"
|
|
322
|
+
})]
|
|
323
|
+
}), 'VisibilityOff');
|
|
324
|
+
export const GridViewColumnIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
325
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
326
|
+
width: "6",
|
|
327
|
+
height: "20",
|
|
328
|
+
x: "4",
|
|
329
|
+
y: "2",
|
|
330
|
+
rx: "2"
|
|
331
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
332
|
+
width: "6",
|
|
333
|
+
height: "20",
|
|
334
|
+
x: "14",
|
|
335
|
+
y: "2",
|
|
336
|
+
rx: "2"
|
|
337
|
+
})]
|
|
338
|
+
}), 'ViewColumn');
|
|
339
|
+
export const GridClearIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
340
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
341
|
+
d: "m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"
|
|
342
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
343
|
+
d: "M22 21H7"
|
|
344
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
345
|
+
d: "m5 11 9 9"
|
|
346
|
+
})]
|
|
347
|
+
}), 'Clear');
|
|
348
|
+
export const GridDeleteIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
349
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
350
|
+
d: "M3 6h18"
|
|
351
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
352
|
+
d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"
|
|
353
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
354
|
+
d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
|
|
355
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
356
|
+
x1: "10",
|
|
357
|
+
x2: "10",
|
|
358
|
+
y1: "11",
|
|
359
|
+
y2: "17"
|
|
360
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
361
|
+
x1: "14",
|
|
362
|
+
x2: "14",
|
|
363
|
+
y1: "11",
|
|
364
|
+
y2: "17"
|
|
365
|
+
})]
|
|
366
|
+
}), 'Delete');
|
|
367
|
+
export const GridDeleteForeverIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {
|
|
368
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
369
|
+
d: "M3 6h18"
|
|
370
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
371
|
+
d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"
|
|
372
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
373
|
+
d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"
|
|
374
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
375
|
+
x1: "10",
|
|
376
|
+
x2: "10",
|
|
377
|
+
y1: "11",
|
|
378
|
+
y2: "17"
|
|
379
|
+
}), /*#__PURE__*/_jsx("line", {
|
|
380
|
+
x1: "14",
|
|
381
|
+
x2: "14",
|
|
382
|
+
y1: "11",
|
|
383
|
+
y2: "17"
|
|
384
|
+
})]
|
|
385
|
+
}), 'Delete');
|
|
386
|
+
const GridColumnUnsortedIcon = /*#__PURE__*/React.memo(function GridColumnHeaderSortIcon(props) {
|
|
387
|
+
const {
|
|
388
|
+
sortingOrder
|
|
389
|
+
} = props,
|
|
390
|
+
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
391
|
+
const rootProps = useGridRootProps();
|
|
392
|
+
const [nextSortDirection] = sortingOrder;
|
|
393
|
+
const Icon = nextSortDirection === 'asc' ? rootProps.slots.columnSortedAscendingIcon : rootProps.slots.columnSortedDescendingIcon;
|
|
394
|
+
return Icon ? /*#__PURE__*/_jsx(Icon, _extends({}, other)) : null;
|
|
395
|
+
});
|
|
396
|
+
const joyIconSlots = {
|
|
397
|
+
booleanCellTrueIcon: GridCheckIcon,
|
|
398
|
+
booleanCellFalseIcon: GridCloseIcon,
|
|
399
|
+
columnMenuIcon: GridTripleDotsVerticalIcon,
|
|
400
|
+
openFilterButtonIcon: GridFilterListIcon,
|
|
401
|
+
filterPanelDeleteIcon: GridCloseIcon,
|
|
402
|
+
columnFilteredIcon: GridFilterAltIcon,
|
|
403
|
+
columnSelectorIcon: GridColumnIcon,
|
|
404
|
+
columnUnsortedIcon: GridColumnUnsortedIcon,
|
|
405
|
+
columnSortedAscendingIcon: GridArrowUpwardIcon,
|
|
406
|
+
columnSortedDescendingIcon: GridArrowDownwardIcon,
|
|
407
|
+
columnResizeIcon: GridSeparatorIcon,
|
|
408
|
+
densityCompactIcon: GridViewHeadlineIcon,
|
|
409
|
+
densityStandardIcon: GridTableRowsIcon,
|
|
410
|
+
densityComfortableIcon: GridViewStreamIcon,
|
|
411
|
+
exportIcon: GridSaveAltIcon,
|
|
412
|
+
moreActionsIcon: GridMoreVertIcon,
|
|
413
|
+
treeDataCollapseIcon: GridExpandMoreIcon,
|
|
414
|
+
treeDataExpandIcon: GridKeyboardArrowRight,
|
|
415
|
+
groupingCriteriaCollapseIcon: GridExpandMoreIcon,
|
|
416
|
+
groupingCriteriaExpandIcon: GridKeyboardArrowRight,
|
|
417
|
+
detailPanelExpandIcon: GridAddIcon,
|
|
418
|
+
detailPanelCollapseIcon: GridRemoveIcon,
|
|
419
|
+
rowReorderIcon: GridDragIcon,
|
|
420
|
+
quickFilterIcon: GridSearchIcon,
|
|
421
|
+
quickFilterClearIcon: GridCloseIcon,
|
|
422
|
+
columnMenuHideIcon: GridVisibilityOffIcon,
|
|
423
|
+
columnMenuSortAscendingIcon: GridArrowUpwardIcon,
|
|
424
|
+
columnMenuSortDescendingIcon: GridArrowDownwardIcon,
|
|
425
|
+
columnMenuFilterIcon: GridFilterAltIcon,
|
|
426
|
+
columnMenuManageColumnsIcon: GridViewColumnIcon,
|
|
427
|
+
columnMenuClearIcon: GridClearIcon,
|
|
428
|
+
loadIcon: GridLoadIcon,
|
|
429
|
+
filterPanelAddIcon: GridAddIcon,
|
|
430
|
+
filterPanelRemoveAllIcon: GridDeleteForeverIcon,
|
|
431
|
+
columnReorderIcon: GridDragIcon
|
|
432
|
+
};
|
|
433
|
+
export default joyIconSlots;
|
package/joy/joySlots.js
CHANGED
|
@@ -18,7 +18,13 @@ import JoyIconButton from '@mui/joy/IconButton';
|
|
|
18
18
|
import JoySwitch from '@mui/joy/Switch';
|
|
19
19
|
import JoySelect from '@mui/joy/Select';
|
|
20
20
|
import JoyOption from '@mui/joy/Option';
|
|
21
|
+
import JoyBox from '@mui/joy/Box';
|
|
22
|
+
import JoyTypography from '@mui/joy/Typography';
|
|
21
23
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
24
|
+
import joyIconSlots, { GridKeyboardArrowRight, GridKeyboardArrowLeft } from './icons';
|
|
25
|
+
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
26
|
+
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
27
|
+
import { gridFilteredTopLevelRowCountSelector, gridPaginationModelSelector } from '../hooks';
|
|
22
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
30
|
function convertColor(color) {
|
|
@@ -264,7 +270,111 @@ const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
|
264
270
|
sx: sx
|
|
265
271
|
}));
|
|
266
272
|
});
|
|
267
|
-
|
|
273
|
+
function labelDisplayedRows({
|
|
274
|
+
from,
|
|
275
|
+
to,
|
|
276
|
+
count
|
|
277
|
+
}) {
|
|
278
|
+
return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
279
|
+
}
|
|
280
|
+
const getLabelDisplayedRowsTo = ({
|
|
281
|
+
page,
|
|
282
|
+
pageSize,
|
|
283
|
+
rowCount
|
|
284
|
+
}) => {
|
|
285
|
+
if (rowCount === -1) {
|
|
286
|
+
return (page + 1) * pageSize;
|
|
287
|
+
}
|
|
288
|
+
return pageSize === -1 ? rowCount : Math.min(rowCount, (page + 1) * pageSize);
|
|
289
|
+
};
|
|
290
|
+
const Pagination = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
291
|
+
var _rootProps$pageSizeOp;
|
|
292
|
+
const apiRef = useGridApiContext();
|
|
293
|
+
const rootProps = useGridRootProps();
|
|
294
|
+
const paginationModel = gridPaginationModelSelector(apiRef);
|
|
295
|
+
const visibleTopLevelRowCount = gridFilteredTopLevelRowCountSelector(apiRef);
|
|
296
|
+
const rowCount = React.useMemo(() => {
|
|
297
|
+
var _ref9, _rootProps$rowCount;
|
|
298
|
+
return (_ref9 = (_rootProps$rowCount = rootProps.rowCount) != null ? _rootProps$rowCount : visibleTopLevelRowCount) != null ? _ref9 : 0;
|
|
299
|
+
}, [rootProps.rowCount, visibleTopLevelRowCount]);
|
|
300
|
+
const lastPage = React.useMemo(() => Math.floor(rowCount / (paginationModel.pageSize || 1)), [rowCount, paginationModel.pageSize]);
|
|
301
|
+
const handlePageChange = React.useCallback(page => {
|
|
302
|
+
apiRef.current.setPage(page);
|
|
303
|
+
}, [apiRef]);
|
|
304
|
+
const page = paginationModel.page <= lastPage ? paginationModel.page : lastPage;
|
|
305
|
+
const pageSize = paginationModel.pageSize;
|
|
306
|
+
const pageSizeOptions = (_rootProps$pageSizeOp = rootProps.pageSizeOptions) != null && _rootProps$pageSizeOp.includes(pageSize) ? rootProps.pageSizeOptions : [];
|
|
307
|
+
const handleChangeRowsPerPage = (event, newValue) => {
|
|
308
|
+
const newPageSize = Number(newValue);
|
|
309
|
+
apiRef.current.setPageSize(newPageSize);
|
|
310
|
+
};
|
|
311
|
+
return /*#__PURE__*/_jsxs(JoyBox, {
|
|
312
|
+
sx: {
|
|
313
|
+
display: 'flex',
|
|
314
|
+
alignItems: 'center',
|
|
315
|
+
gap: 2,
|
|
316
|
+
justifyContent: 'flex-end',
|
|
317
|
+
px: 2
|
|
318
|
+
},
|
|
319
|
+
ref: ref,
|
|
320
|
+
children: [/*#__PURE__*/_jsxs(JoyFormControl, {
|
|
321
|
+
orientation: "horizontal",
|
|
322
|
+
size: "sm",
|
|
323
|
+
children: [/*#__PURE__*/_jsx(JoyFormLabel, {
|
|
324
|
+
children: "Rows per page:"
|
|
325
|
+
}), /*#__PURE__*/_jsx(JoySelect, {
|
|
326
|
+
onChange: handleChangeRowsPerPage,
|
|
327
|
+
value: pageSize,
|
|
328
|
+
children: pageSizeOptions.map(option => {
|
|
329
|
+
return /*#__PURE__*/_jsx(Option, {
|
|
330
|
+
value: option,
|
|
331
|
+
children: option
|
|
332
|
+
}, option);
|
|
333
|
+
})
|
|
334
|
+
})]
|
|
335
|
+
}), /*#__PURE__*/_jsx(JoyTypography, {
|
|
336
|
+
textAlign: "center",
|
|
337
|
+
fontSize: "xs",
|
|
338
|
+
fontWeight: "md",
|
|
339
|
+
children: labelDisplayedRows({
|
|
340
|
+
from: rowCount === 0 ? 0 : page * pageSize + 1,
|
|
341
|
+
to: getLabelDisplayedRowsTo({
|
|
342
|
+
page,
|
|
343
|
+
pageSize,
|
|
344
|
+
rowCount
|
|
345
|
+
}),
|
|
346
|
+
count: rowCount === -1 ? -1 : rowCount
|
|
347
|
+
})
|
|
348
|
+
}), /*#__PURE__*/_jsxs(JoyBox, {
|
|
349
|
+
sx: {
|
|
350
|
+
display: 'flex',
|
|
351
|
+
gap: 0.5
|
|
352
|
+
},
|
|
353
|
+
children: [/*#__PURE__*/_jsx(JoyIconButton, {
|
|
354
|
+
size: "sm",
|
|
355
|
+
color: "neutral",
|
|
356
|
+
variant: "outlined",
|
|
357
|
+
disabled: page === 0,
|
|
358
|
+
onClick: () => handlePageChange(page - 1),
|
|
359
|
+
sx: {
|
|
360
|
+
bgcolor: 'background.surface'
|
|
361
|
+
},
|
|
362
|
+
children: /*#__PURE__*/_jsx(GridKeyboardArrowLeft, {})
|
|
363
|
+
}), /*#__PURE__*/_jsx(JoyIconButton, {
|
|
364
|
+
size: "sm",
|
|
365
|
+
color: "neutral",
|
|
366
|
+
variant: "outlined",
|
|
367
|
+
disabled: rowCount !== -1 ? page >= Math.ceil(rowCount / pageSize) - 1 : false,
|
|
368
|
+
onClick: () => handlePageChange(page + 1),
|
|
369
|
+
sx: {
|
|
370
|
+
bgcolor: 'background.surface'
|
|
371
|
+
},
|
|
372
|
+
children: /*#__PURE__*/_jsx(GridKeyboardArrowRight, {})
|
|
373
|
+
})]
|
|
374
|
+
})]
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
const joySlots = _extends({}, joyIconSlots, {
|
|
268
378
|
baseCheckbox: Checkbox,
|
|
269
379
|
baseTextField: TextField,
|
|
270
380
|
baseButton: Button,
|
|
@@ -273,9 +383,9 @@ const joySlots = {
|
|
|
273
383
|
baseSelect: Select,
|
|
274
384
|
baseSelectOption: Option,
|
|
275
385
|
baseInputLabel: InputLabel,
|
|
276
|
-
baseFormControl: JoyFormControl
|
|
386
|
+
baseFormControl: JoyFormControl,
|
|
277
387
|
// BaseTooltip: MUITooltip,
|
|
278
388
|
// BasePopper: MUIPopper,
|
|
279
|
-
|
|
280
|
-
|
|
389
|
+
pagination: Pagination
|
|
390
|
+
});
|
|
281
391
|
export default joySlots;
|
|
@@ -68,6 +68,11 @@ DataGridRaw.propTypes = {
|
|
|
68
68
|
* Override or extend the styles applied to the component.
|
|
69
69
|
*/
|
|
70
70
|
classes: PropTypes.object,
|
|
71
|
+
/**
|
|
72
|
+
* The character used to separate cell values when copying to the clipboard.
|
|
73
|
+
* @default '\t'
|
|
74
|
+
*/
|
|
75
|
+
clipboardCopyCellDelimiter: PropTypes.string,
|
|
71
76
|
/**
|
|
72
77
|
* Number of extra columns to be rendered before/after the visible slice.
|
|
73
78
|
* @default 3
|
|
@@ -328,6 +333,11 @@ DataGridRaw.propTypes = {
|
|
|
328
333
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
329
334
|
*/
|
|
330
335
|
onCellModesModelChange: PropTypes.func,
|
|
336
|
+
/**
|
|
337
|
+
* Callback called when the data is copied to the clipboard.
|
|
338
|
+
* @param {string} data The data copied to the clipboard.
|
|
339
|
+
*/
|
|
340
|
+
onClipboardCopy: PropTypes.func,
|
|
331
341
|
/**
|
|
332
342
|
* Callback fired when a click event comes from a column header element.
|
|
333
343
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
@@ -613,5 +623,14 @@ DataGridRaw.propTypes = {
|
|
|
613
623
|
/**
|
|
614
624
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
615
625
|
*/
|
|
616
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
626
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
627
|
+
/**
|
|
628
|
+
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
629
|
+
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
630
|
+
* @default: false
|
|
631
|
+
*/
|
|
632
|
+
unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
|
|
633
|
+
clipboardExport: PropTypes.bool,
|
|
634
|
+
csvExport: PropTypes.bool
|
|
635
|
+
}), PropTypes.bool])
|
|
617
636
|
};
|
|
@@ -67,9 +67,9 @@ export var useDataGridComponent = function useDataGridComponent(inputApiRef, pro
|
|
|
67
67
|
useGridRowsMeta(privateApiRef, props);
|
|
68
68
|
useGridScroll(privateApiRef, props);
|
|
69
69
|
useGridColumnMenu(privateApiRef);
|
|
70
|
-
useGridCsvExport(privateApiRef);
|
|
70
|
+
useGridCsvExport(privateApiRef, props);
|
|
71
71
|
useGridPrintExport(privateApiRef, props);
|
|
72
|
-
useGridClipboard(privateApiRef);
|
|
72
|
+
useGridClipboard(privateApiRef, props);
|
|
73
73
|
useGridDimensions(privateApiRef, props);
|
|
74
74
|
useGridEvents(privateApiRef, props);
|
|
75
75
|
useGridStatePersistence(privateApiRef);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import
|
|
3
|
-
var _excluded = ["components", "componentsProps"];
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { useThemeProps } from '@mui/material/styles';
|
|
6
5
|
import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
|
|
7
6
|
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
|
|
8
7
|
import { GridEditModes } from '../models';
|
|
9
|
-
import { computeSlots, uncapitalizeObjectKeys } from '../internals/utils';
|
|
8
|
+
import { computeSlots, useProps, uncapitalizeObjectKeys } from '../internals/utils';
|
|
10
9
|
var DATA_GRID_FORCED_PROPS = {
|
|
11
10
|
disableMultipleColumnsFiltering: true,
|
|
12
11
|
disableMultipleColumnsSorting: true,
|
|
@@ -66,17 +65,20 @@ export var DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
66
65
|
disableColumnReorder: false,
|
|
67
66
|
disableColumnResize: false,
|
|
68
67
|
keepNonExistentRowsSelected: false,
|
|
69
|
-
keepColumnPositionIfDraggedOutside: false
|
|
68
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
69
|
+
unstable_ignoreValueFormatterDuringExport: false,
|
|
70
|
+
clipboardCopyCellDelimiter: '\t'
|
|
70
71
|
};
|
|
71
72
|
var defaultSlots = uncapitalizeObjectKeys(DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
|
|
72
73
|
export var useDataGridProps = function useDataGridProps(inProps) {
|
|
73
|
-
var
|
|
74
|
+
var _useProps = useProps(useThemeProps({
|
|
74
75
|
props: inProps,
|
|
75
76
|
name: 'MuiDataGrid'
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
})),
|
|
78
|
+
_useProps2 = _slicedToArray(_useProps, 3),
|
|
79
|
+
components = _useProps2[0],
|
|
80
|
+
componentsProps = _useProps2[1],
|
|
81
|
+
themedProps = _useProps2[2];
|
|
80
82
|
var localeText = React.useMemo(function () {
|
|
81
83
|
return _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText);
|
|
82
84
|
}, [themedProps.localeText]);
|