@mui/x-data-grid 8.0.0-alpha.3 → 8.0.0-alpha.5
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 +377 -0
- package/DataGrid/DataGrid.js +7 -11
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +1 -1
- package/components/GridRow.js +13 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.js +4 -6
- package/components/cell/GridCell.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/components/panel/GridColumnsPanel.js +1 -2
- package/components/panel/GridPanelContent.js +7 -3
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -3
- package/components/panel/filterPanel/GridFilterForm.js +15 -15
- package/components/toolbar/GridToolbarDensitySelector.js +3 -5
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +3 -0
- package/components/toolbar/GridToolbarQuickFilter.js +27 -23
- package/components/virtualization/GridMainContainer.js +1 -1
- package/constants/dataGridPropsDefaultValues.js +1 -1
- package/hooks/core/useGridStateInitialization.js +3 -3
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
- package/hooks/features/columnResize/useGridColumnResize.js +9 -4
- package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/filter/useGridFilter.js +1 -1
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/overlays/useGridOverlays.js +3 -1
- package/hooks/features/pagination/gridPaginationSelector.d.ts +15 -9
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/hooks/features/rowSelection/utils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -12
- package/hooks/features/rows/useGridRowSpanning.d.ts +1 -1
- package/hooks/features/rows/useGridRowSpanning.js +16 -8
- package/hooks/features/rows/useGridRows.js +5 -5
- package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
- package/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
- package/hooks/utils/useGridSelector.d.ts +4 -6
- package/hooks/utils/useGridSelector.js +6 -44
- package/index.js +1 -1
- package/internals/index.d.ts +2 -2
- package/internals/index.js +2 -2
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +0 -1
- package/locales/koKR.js +45 -49
- package/locales/roRO.js +18 -20
- package/material/index.js +30 -4
- package/models/api/gridStateApi.d.ts +1 -1
- package/models/controlStateItem.d.ts +2 -2
- package/models/gridBaseSlots.d.ts +21 -0
- package/models/gridBaseSlots.js +1 -0
- package/models/gridSlotsComponentsProps.d.ts +25 -5
- package/models/props/DataGridProps.d.ts +1 -6
- package/modern/DataGrid/DataGrid.js +7 -11
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridRow.js +13 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +4 -6
- package/modern/components/cell/GridCell.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/components/panel/GridPanelContent.js +7 -3
- package/modern/components/panel/GridPanelFooter.js +4 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +15 -15
- package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -5
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -0
- package/modern/components/toolbar/GridToolbarQuickFilter.js +27 -23
- package/modern/components/virtualization/GridMainContainer.js +1 -1
- package/modern/constants/dataGridPropsDefaultValues.js +1 -1
- package/modern/hooks/core/useGridStateInitialization.js +3 -3
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
- package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +9 -4
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- package/modern/hooks/features/overlays/useGridOverlays.js +3 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/modern/hooks/features/rows/useGridRowSpanning.js +16 -8
- package/modern/hooks/features/rows/useGridRows.js +5 -5
- package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
- package/modern/hooks/utils/useGridSelector.js +6 -44
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -2
- package/modern/internals/utils/index.js +0 -1
- package/modern/locales/koKR.js +45 -49
- package/modern/locales/roRO.js +18 -20
- package/modern/material/index.js +30 -4
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/utils/createSelector.js +1 -120
- package/node/DataGrid/DataGrid.js +7 -11
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridRow.js +13 -2
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +3 -5
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/components/panel/GridPanelContent.js +7 -3
- package/node/components/panel/GridPanelFooter.js +5 -4
- package/node/components/panel/filterPanel/GridFilterForm.js +15 -15
- package/node/components/toolbar/GridToolbarDensitySelector.js +3 -5
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -0
- package/node/components/toolbar/GridToolbarQuickFilter.js +27 -23
- package/node/components/virtualization/GridMainContainer.js +1 -1
- package/node/constants/dataGridPropsDefaultValues.js +1 -1
- package/node/hooks/core/useGridStateInitialization.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +10 -3
- package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +9 -4
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/overlays/useGridOverlays.js +3 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/node/hooks/features/rows/useGridRowSpanning.js +16 -8
- package/node/hooks/features/rows/useGridRows.js +5 -5
- package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
- package/node/hooks/utils/useGridSelector.js +8 -47
- package/node/index.js +1 -1
- package/node/internals/index.js +8 -22
- package/node/internals/utils/index.js +0 -11
- package/node/locales/koKR.js +45 -49
- package/node/locales/roRO.js +18 -20
- package/node/material/index.js +31 -4
- package/node/models/gridBaseSlots.js +5 -0
- package/node/utils/createSelector.js +4 -125
- package/package.json +2 -2
- package/utils/createSelector.d.ts +4 -16
- package/utils/createSelector.js +1 -120
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -389
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -389
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -397
|
@@ -103,10 +103,7 @@ const useGridVirtualScroller = () => {
|
|
|
103
103
|
return undefined;
|
|
104
104
|
}
|
|
105
105
|
const initialRect = node.getBoundingClientRect();
|
|
106
|
-
let lastSize =
|
|
107
|
-
width: initialRect.width,
|
|
108
|
-
height: initialRect.height
|
|
109
|
-
};
|
|
106
|
+
let lastSize = roundDimensions(initialRect);
|
|
110
107
|
apiRef.current.publishEvent('resize', lastSize);
|
|
111
108
|
if (typeof ResizeObserver === 'undefined') {
|
|
112
109
|
return undefined;
|
|
@@ -116,10 +113,7 @@ const useGridVirtualScroller = () => {
|
|
|
116
113
|
if (!entry) {
|
|
117
114
|
return;
|
|
118
115
|
}
|
|
119
|
-
const newSize =
|
|
120
|
-
width: entry.contentRect.width,
|
|
121
|
-
height: entry.contentRect.height
|
|
122
|
-
};
|
|
116
|
+
const newSize = roundDimensions(entry.contentRect);
|
|
123
117
|
if (newSize.width === lastSize.width && newSize.height === lastSize.height) {
|
|
124
118
|
return;
|
|
125
119
|
}
|
|
@@ -796,4 +790,13 @@ function bufferForDirection(isRtl, direction, rowBufferPx, columnBufferPx, verti
|
|
|
796
790
|
// eslint unable to figure out enum exhaustiveness
|
|
797
791
|
throw new Error('unreachable');
|
|
798
792
|
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// Round to avoid issues with subpixel rendering
|
|
796
|
+
// https://github.com/mui/mui-x/issues/15721
|
|
797
|
+
function roundDimensions(dimensions) {
|
|
798
|
+
return {
|
|
799
|
+
width: Math.round(dimensions.width * 10) / 10,
|
|
800
|
+
height: Math.round(dimensions.height * 10) / 10
|
|
801
|
+
};
|
|
799
802
|
}
|
|
@@ -4,7 +4,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.useGridSelector = exports.objectShallowCompare = exports.argsEqual = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
10
10
|
var _warning = require("@mui/x-internals/warning");
|
|
@@ -13,20 +13,11 @@ var _useOnMount = require("./useOnMount");
|
|
|
13
13
|
function isOutputSelector(selector) {
|
|
14
14
|
return selector.acceptsApiRef;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
function applySelector(apiRef, selector) {
|
|
18
|
-
if (isOutputSelector(selector)) {
|
|
19
|
-
return selector(apiRef);
|
|
20
|
-
}
|
|
21
|
-
return selector(apiRef.current.state);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// TODO v8: Rename this function to `applySelector`
|
|
25
|
-
function applySelectorV8(apiRef, selector, args, instanceId) {
|
|
16
|
+
function applySelector(apiRef, selector, args, instanceId) {
|
|
26
17
|
if (isOutputSelector(selector)) {
|
|
27
18
|
return selector(apiRef, args);
|
|
28
19
|
}
|
|
29
|
-
return selector(apiRef.current.state, instanceId);
|
|
20
|
+
return selector(apiRef.current.state, args, instanceId);
|
|
30
21
|
}
|
|
31
22
|
const defaultCompare = Object.is;
|
|
32
23
|
const objectShallowCompare = exports.objectShallowCompare = _fastObjectShallowCompare.fastObjectShallowCompare;
|
|
@@ -52,37 +43,7 @@ const createRefs = () => ({
|
|
|
52
43
|
selector: null,
|
|
53
44
|
args: null
|
|
54
45
|
});
|
|
55
|
-
|
|
56
|
-
// TODO v8: Remove this function
|
|
57
|
-
const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
58
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
59
|
-
if (!apiRef.current.state) {
|
|
60
|
-
(0, _warning.warnOnce)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
const refs = (0, _useLazyRef.useLazyRef)(createRefs);
|
|
64
|
-
const didInit = refs.current.selector !== null;
|
|
65
|
-
const [state, setState] = React.useState(
|
|
66
|
-
// We don't use an initialization function to avoid allocations
|
|
67
|
-
didInit ? null : applySelector(apiRef, selector));
|
|
68
|
-
refs.current.state = state;
|
|
69
|
-
refs.current.equals = equals;
|
|
70
|
-
refs.current.selector = selector;
|
|
71
|
-
(0, _useOnMount.useOnMount)(() => {
|
|
72
|
-
return apiRef.current.store.subscribe(() => {
|
|
73
|
-
const newState = applySelector(apiRef, refs.current.selector);
|
|
74
|
-
if (!refs.current.equals(refs.current.state, newState)) {
|
|
75
|
-
refs.current.state = newState;
|
|
76
|
-
setState(newState);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
return state;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// TODO v8: Rename this function to `useGridSelector`
|
|
84
|
-
exports.useGridSelector = useGridSelector;
|
|
85
|
-
const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
46
|
+
const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCompare) => {
|
|
86
47
|
if (process.env.NODE_ENV !== 'production') {
|
|
87
48
|
if (!apiRef.current.state) {
|
|
88
49
|
(0, _warning.warnOnce)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
@@ -92,14 +53,14 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
|
|
|
92
53
|
const didInit = refs.current.selector !== null;
|
|
93
54
|
const [state, setState] = React.useState(
|
|
94
55
|
// We don't use an initialization function to avoid allocations
|
|
95
|
-
didInit ? null :
|
|
56
|
+
didInit ? null : applySelector(apiRef, selector, args, apiRef.current.instanceId));
|
|
96
57
|
refs.current.state = state;
|
|
97
58
|
refs.current.equals = equals;
|
|
98
59
|
refs.current.selector = selector;
|
|
99
60
|
const prevArgs = refs.current.args;
|
|
100
61
|
refs.current.args = args;
|
|
101
62
|
if (didInit && !argsEqual(prevArgs, args)) {
|
|
102
|
-
const newState =
|
|
63
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
103
64
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
104
65
|
refs.current.state = newState;
|
|
105
66
|
setState(newState);
|
|
@@ -107,7 +68,7 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
|
|
|
107
68
|
}
|
|
108
69
|
(0, _useOnMount.useOnMount)(() => {
|
|
109
70
|
return apiRef.current.store.subscribe(() => {
|
|
110
|
-
const newState =
|
|
71
|
+
const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
|
|
111
72
|
if (!refs.current.equals(refs.current.state, newState)) {
|
|
112
73
|
refs.current.state = newState;
|
|
113
74
|
setState(newState);
|
|
@@ -116,4 +77,4 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
|
|
|
116
77
|
});
|
|
117
78
|
return state;
|
|
118
79
|
};
|
|
119
|
-
exports.
|
|
80
|
+
exports.useGridSelector = useGridSelector;
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -73,6 +73,7 @@ var _exportNames = {
|
|
|
73
73
|
useGridRowSelectionPreProcessors: true,
|
|
74
74
|
useGridSorting: true,
|
|
75
75
|
sortingStateInitializer: true,
|
|
76
|
+
gridSortedRowIndexLookupSelector: true,
|
|
76
77
|
useGridScroll: true,
|
|
77
78
|
useGridEvents: true,
|
|
78
79
|
dimensionsStateInitializer: true,
|
|
@@ -92,10 +93,7 @@ var _exportNames = {
|
|
|
92
93
|
getColumnsToExport: true,
|
|
93
94
|
defaultGetRowsToExport: true,
|
|
94
95
|
createSelector: true,
|
|
95
|
-
createSelectorV8: true,
|
|
96
96
|
createSelectorMemoized: true,
|
|
97
|
-
createSelectorMemoizedV8: true,
|
|
98
|
-
useGridSelectorV8: true,
|
|
99
97
|
findParentElementFromClassName: true,
|
|
100
98
|
getActiveElement: true,
|
|
101
99
|
isEventTargetInPortal: true,
|
|
@@ -220,18 +218,6 @@ Object.defineProperty(exports, "createSelectorMemoized", {
|
|
|
220
218
|
return _createSelector.createSelectorMemoized;
|
|
221
219
|
}
|
|
222
220
|
});
|
|
223
|
-
Object.defineProperty(exports, "createSelectorMemoizedV8", {
|
|
224
|
-
enumerable: true,
|
|
225
|
-
get: function () {
|
|
226
|
-
return _createSelector.createSelectorMemoizedV8;
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
Object.defineProperty(exports, "createSelectorV8", {
|
|
230
|
-
enumerable: true,
|
|
231
|
-
get: function () {
|
|
232
|
-
return _createSelector.createSelectorV8;
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
221
|
Object.defineProperty(exports, "defaultGetRowsToExport", {
|
|
236
222
|
enumerable: true,
|
|
237
223
|
get: function () {
|
|
@@ -370,6 +356,12 @@ Object.defineProperty(exports, "gridRowGroupsToFetchSelector", {
|
|
|
370
356
|
return _gridRowsSelector.gridRowGroupsToFetchSelector;
|
|
371
357
|
}
|
|
372
358
|
});
|
|
359
|
+
Object.defineProperty(exports, "gridSortedRowIndexLookupSelector", {
|
|
360
|
+
enumerable: true,
|
|
361
|
+
get: function () {
|
|
362
|
+
return _gridSortingSelector.gridSortedRowIndexLookupSelector;
|
|
363
|
+
}
|
|
364
|
+
});
|
|
373
365
|
Object.defineProperty(exports, "headerFilteringStateInitializer", {
|
|
374
366
|
enumerable: true,
|
|
375
367
|
get: function () {
|
|
@@ -676,12 +668,6 @@ Object.defineProperty(exports, "useGridScroll", {
|
|
|
676
668
|
return _useGridScroll.useGridScroll;
|
|
677
669
|
}
|
|
678
670
|
});
|
|
679
|
-
Object.defineProperty(exports, "useGridSelectorV8", {
|
|
680
|
-
enumerable: true,
|
|
681
|
-
get: function () {
|
|
682
|
-
return _useGridSelector.useGridSelectorV8;
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
671
|
Object.defineProperty(exports, "useGridSorting", {
|
|
686
672
|
enumerable: true,
|
|
687
673
|
get: function () {
|
|
@@ -791,6 +777,7 @@ var _useGridHeaderFiltering = require("../hooks/features/headerFiltering/useGrid
|
|
|
791
777
|
var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
|
|
792
778
|
var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
|
|
793
779
|
var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
|
|
780
|
+
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
794
781
|
var _useGridScroll = require("../hooks/features/scroll/useGridScroll");
|
|
795
782
|
var _useGridEvents = require("../hooks/features/events/useGridEvents");
|
|
796
783
|
var _useGridDimensions = require("../hooks/features/dimensions/useGridDimensions");
|
|
@@ -828,7 +815,6 @@ Object.keys(_createControllablePromise).forEach(function (key) {
|
|
|
828
815
|
});
|
|
829
816
|
});
|
|
830
817
|
var _createSelector = require("../utils/createSelector");
|
|
831
|
-
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
832
818
|
var _domUtils = require("../utils/domUtils");
|
|
833
819
|
var _keyboardUtils = require("../utils/keyboardUtils");
|
|
834
820
|
var _utils3 = require("../utils/utils");
|
|
@@ -14,17 +14,6 @@ Object.keys(_computeSlots).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _useProps = require("./useProps");
|
|
18
|
-
Object.keys(_useProps).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _useProps[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _useProps[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
17
|
var _propValidation = require("./propValidation");
|
|
29
18
|
Object.keys(_propValidation).forEach(function (key) {
|
|
30
19
|
if (key === "default" || key === "__esModule") return;
|
package/node/locales/koKR.js
CHANGED
|
@@ -30,16 +30,15 @@ const koKRGrid = {
|
|
|
30
30
|
toolbarQuickFilterLabel: '검색',
|
|
31
31
|
toolbarQuickFilterDeleteIconLabel: '초기화',
|
|
32
32
|
// Prompt toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
toolbarPromptControlPlaceholder: '프롬프트 입력…',
|
|
34
|
+
toolbarPromptControlWithRecordingPlaceholder: '프롬프트 입력 또는 녹음…',
|
|
35
|
+
toolbarPromptControlRecordingPlaceholder: '녹음 중…',
|
|
36
|
+
toolbarPromptControlLabel: '프롬프트 입력',
|
|
37
|
+
toolbarPromptControlRecordButtonDefaultLabel: '녹음',
|
|
38
|
+
toolbarPromptControlRecordButtonActiveLabel: '녹음 정지',
|
|
39
|
+
toolbarPromptControlSendActionLabel: '전송',
|
|
40
|
+
toolbarPromptControlSendActionAriaLabel: '프롬프트 전송',
|
|
41
|
+
toolbarPromptControlErrorMessage: '요청을 처리하는 동안 오류가 발생했습니다. 다른 프롬프트로 다시 시도하십시오.',
|
|
43
42
|
// Export selector toolbar button text
|
|
44
43
|
toolbarExport: '내보내기',
|
|
45
44
|
toolbarExportLabel: '내보내기',
|
|
@@ -47,15 +46,14 @@ const koKRGrid = {
|
|
|
47
46
|
toolbarExportPrint: '프린트',
|
|
48
47
|
toolbarExportExcel: 'Excel로 내보내기',
|
|
49
48
|
// Columns management text
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
columnsManagementSearchTitle: '검색',
|
|
50
|
+
columnsManagementNoColumns: '열이 없습니다.',
|
|
51
|
+
columnsManagementShowHideAllText: '모두 보기/숨기기',
|
|
52
|
+
columnsManagementReset: '초기화',
|
|
53
|
+
columnsManagementDeleteIconLabel: '제거',
|
|
56
54
|
// Filter panel text
|
|
57
55
|
filterPanelAddFilter: '필터 추가',
|
|
58
|
-
|
|
56
|
+
filterPanelRemoveAll: '모두 삭제',
|
|
59
57
|
filterPanelDeleteIconLabel: '삭제',
|
|
60
58
|
filterPanelLogicOperator: '논리 연산자',
|
|
61
59
|
filterPanelOperator: '연산자',
|
|
@@ -66,9 +64,9 @@ const koKRGrid = {
|
|
|
66
64
|
filterPanelInputPlaceholder: '값 입력',
|
|
67
65
|
// Filter operators text
|
|
68
66
|
filterOperatorContains: '포함하는',
|
|
69
|
-
|
|
67
|
+
filterOperatorDoesNotContain: '포함하지 않는',
|
|
70
68
|
filterOperatorEquals: '값이 같은',
|
|
71
|
-
|
|
69
|
+
filterOperatorDoesNotEqual: '값이 다른',
|
|
72
70
|
filterOperatorStartsWith: '시작하는',
|
|
73
71
|
filterOperatorEndsWith: '끝나는',
|
|
74
72
|
filterOperatorIs: '~인',
|
|
@@ -80,36 +78,34 @@ const koKRGrid = {
|
|
|
80
78
|
filterOperatorIsEmpty: '값이 없는',
|
|
81
79
|
filterOperatorIsNotEmpty: '값이 있는',
|
|
82
80
|
filterOperatorIsAnyOf: '값 중 하나인',
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
'filterOperator=': '=',
|
|
82
|
+
'filterOperator!=': '!=',
|
|
83
|
+
'filterOperator>': '>',
|
|
84
|
+
'filterOperator>=': '>=',
|
|
85
|
+
'filterOperator<': '<',
|
|
86
|
+
'filterOperator<=': '<=',
|
|
90
87
|
// Header filter operators text
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
88
|
+
headerFilterOperatorContains: '포함하는',
|
|
89
|
+
headerFilterOperatorDoesNotContain: '포함하지 않는',
|
|
90
|
+
headerFilterOperatorEquals: '값이 같은',
|
|
91
|
+
headerFilterOperatorDoesNotEqual: '값이 다른',
|
|
92
|
+
headerFilterOperatorStartsWith: '시작하는',
|
|
93
|
+
headerFilterOperatorEndsWith: '끝나는',
|
|
94
|
+
headerFilterOperatorIs: '~인',
|
|
95
|
+
headerFilterOperatorNot: '~아닌',
|
|
96
|
+
headerFilterOperatorAfter: '더 이후',
|
|
97
|
+
headerFilterOperatorOnOrAfter: '이후',
|
|
98
|
+
headerFilterOperatorBefore: '더 이전',
|
|
99
|
+
headerFilterOperatorOnOrBefore: '이전',
|
|
100
|
+
headerFilterOperatorIsEmpty: '값이 없는',
|
|
101
|
+
headerFilterOperatorIsNotEmpty: '값이 있는',
|
|
102
|
+
headerFilterOperatorIsAnyOf: '값 중 하나인',
|
|
103
|
+
'headerFilterOperator=': '값이 같은',
|
|
104
|
+
'headerFilterOperator!=': '값이 다른',
|
|
105
|
+
'headerFilterOperator>': '더 큰',
|
|
106
|
+
'headerFilterOperator>=': '같거나 더 큰',
|
|
107
|
+
'headerFilterOperator<': '더 작은',
|
|
108
|
+
'headerFilterOperator<=': '같거나 더 작은',
|
|
113
109
|
// Filter values text
|
|
114
110
|
filterValueAny: '아무값',
|
|
115
111
|
filterValueTrue: '참',
|
|
@@ -117,7 +113,7 @@ const koKRGrid = {
|
|
|
117
113
|
// Column menu text
|
|
118
114
|
columnMenuLabel: '메뉴',
|
|
119
115
|
columnMenuShowColumns: '열 표시',
|
|
120
|
-
|
|
116
|
+
columnMenuManageColumns: '열 관리',
|
|
121
117
|
columnMenuFilter: '필터',
|
|
122
118
|
columnMenuHideColumn: '열 숨기기',
|
|
123
119
|
columnMenuUnsort: '정렬 해제',
|
package/node/locales/roRO.js
CHANGED
|
@@ -30,16 +30,15 @@ const roROGrid = {
|
|
|
30
30
|
toolbarQuickFilterLabel: 'Căutare',
|
|
31
31
|
toolbarQuickFilterDeleteIconLabel: 'Ștergere',
|
|
32
32
|
// Prompt toolbar field
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
toolbarPromptControlPlaceholder: 'Scrie un prompt…',
|
|
34
|
+
toolbarPromptControlWithRecordingPlaceholder: 'Scrie sau înregistrează un prompt…',
|
|
35
|
+
toolbarPromptControlRecordingPlaceholder: 'Ascultare prompt…',
|
|
36
|
+
toolbarPromptControlLabel: 'Introducere prompt',
|
|
37
|
+
toolbarPromptControlRecordButtonDefaultLabel: 'Înregistrează',
|
|
38
|
+
toolbarPromptControlRecordButtonActiveLabel: 'Oprește înregistrare',
|
|
39
|
+
toolbarPromptControlSendActionLabel: 'Trimite',
|
|
40
|
+
toolbarPromptControlSendActionAriaLabel: 'Trimite prompt',
|
|
41
|
+
toolbarPromptControlErrorMessage: 'A apărut o eroare la procesare. Încercați din nou cu un alt prompt.',
|
|
43
42
|
// Export selector toolbar button text
|
|
44
43
|
toolbarExport: 'Export',
|
|
45
44
|
toolbarExportLabel: 'Export',
|
|
@@ -47,12 +46,11 @@ const roROGrid = {
|
|
|
47
46
|
toolbarExportPrint: 'Printare',
|
|
48
47
|
toolbarExportExcel: 'Download în format Excel',
|
|
49
48
|
// Columns management text
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
columnsManagementSearchTitle: 'Caută',
|
|
50
|
+
columnsManagementNoColumns: 'Nicio coloană',
|
|
51
|
+
columnsManagementShowHideAllText: 'Arată/Ascunde tot',
|
|
52
|
+
columnsManagementReset: 'Resetează',
|
|
53
|
+
columnsManagementDeleteIconLabel: 'Șterge',
|
|
56
54
|
// Filter panel text
|
|
57
55
|
filterPanelAddFilter: 'Adăugare filtru',
|
|
58
56
|
filterPanelRemoveAll: 'Șterge tot',
|
|
@@ -66,9 +64,9 @@ const roROGrid = {
|
|
|
66
64
|
filterPanelInputPlaceholder: 'Filtrare valoare',
|
|
67
65
|
// Filter operators text
|
|
68
66
|
filterOperatorContains: 'conține',
|
|
69
|
-
|
|
67
|
+
filterOperatorDoesNotContain: 'nu conține',
|
|
70
68
|
filterOperatorEquals: 'este egal cu',
|
|
71
|
-
|
|
69
|
+
filterOperatorDoesNotEqual: 'nu este egal cu',
|
|
72
70
|
filterOperatorStartsWith: 'începe cu',
|
|
73
71
|
filterOperatorEndsWith: 'se termină cu',
|
|
74
72
|
filterOperatorIs: 'este',
|
|
@@ -88,9 +86,9 @@ const roROGrid = {
|
|
|
88
86
|
'filterOperator<=': '<=',
|
|
89
87
|
// Header filter operators text
|
|
90
88
|
headerFilterOperatorContains: 'Conține',
|
|
91
|
-
|
|
89
|
+
headerFilterOperatorDoesNotContain: 'Nu conține',
|
|
92
90
|
headerFilterOperatorEquals: 'Egal cu',
|
|
93
|
-
|
|
91
|
+
headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
|
|
94
92
|
headerFilterOperatorStartsWith: 'Începe cu',
|
|
95
93
|
headerFilterOperatorEndsWith: 'Se termină cu',
|
|
96
94
|
headerFilterOperatorIs: 'Este',
|
package/node/material/index.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
12
|
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
10
13
|
var _Checkbox = _interopRequireDefault(require("@mui/material/Checkbox"));
|
|
11
14
|
var _Divider = _interopRequireDefault(require("@mui/material/Divider"));
|
|
15
|
+
var _ListItemIcon = _interopRequireDefault(require("@mui/material/ListItemIcon"));
|
|
16
|
+
var _ListItemText = _interopRequireDefault(require("@mui/material/ListItemText"));
|
|
12
17
|
var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
|
|
13
18
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
14
19
|
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
@@ -24,6 +29,8 @@ var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
|
|
|
24
29
|
var _GridColumnUnsortedIcon = require("./icons/GridColumnUnsortedIcon");
|
|
25
30
|
var _icons = require("./icons");
|
|
26
31
|
var _MUISelectOption = _interopRequireDefault(require("./components/MUISelectOption"));
|
|
32
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
|
+
const _excluded = ["inert", "iconStart", "iconEnd", "children"];
|
|
27
34
|
const iconSlots = {
|
|
28
35
|
booleanCellTrueIcon: _icons.GridCheckIcon,
|
|
29
36
|
booleanCellFalseIcon: _icons.GridCloseIcon,
|
|
@@ -61,12 +68,12 @@ const iconSlots = {
|
|
|
61
68
|
filterPanelRemoveAllIcon: _icons.GridDeleteForeverIcon,
|
|
62
69
|
columnReorderIcon: _icons.GridDragIcon
|
|
63
70
|
};
|
|
64
|
-
const
|
|
71
|
+
const baseSlots = {
|
|
65
72
|
baseBadge: _Badge.default,
|
|
66
73
|
baseCheckbox: _Checkbox.default,
|
|
67
74
|
baseDivider: _Divider.default,
|
|
68
75
|
baseMenuList: _MenuList.default,
|
|
69
|
-
baseMenuItem:
|
|
76
|
+
baseMenuItem: BaseMenuItem,
|
|
70
77
|
baseTextField: _TextField.default,
|
|
71
78
|
baseFormControl: _FormControl.default,
|
|
72
79
|
baseSelect: _Select.default,
|
|
@@ -78,5 +85,25 @@ const materialSlots = (0, _extends2.default)({}, iconSlots, {
|
|
|
78
85
|
baseInputLabel: _InputLabel.default,
|
|
79
86
|
baseSelectOption: _MUISelectOption.default,
|
|
80
87
|
baseChip: _Chip.default
|
|
81
|
-
}
|
|
82
|
-
|
|
88
|
+
};
|
|
89
|
+
const materialSlots = (0, _extends2.default)({}, baseSlots, iconSlots);
|
|
90
|
+
var _default = exports.default = materialSlots;
|
|
91
|
+
function BaseMenuItem(props) {
|
|
92
|
+
const {
|
|
93
|
+
inert,
|
|
94
|
+
iconStart,
|
|
95
|
+
iconEnd,
|
|
96
|
+
children
|
|
97
|
+
} = props,
|
|
98
|
+
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
99
|
+
if (inert) {
|
|
100
|
+
other.disableRipple = true;
|
|
101
|
+
}
|
|
102
|
+
return /*#__PURE__*/React.createElement(_MenuItem.default, other, [iconStart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
|
|
103
|
+
children: iconStart
|
|
104
|
+
}, "1"), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemText.default, {
|
|
105
|
+
children: children
|
|
106
|
+
}, "2"), iconEnd && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ListItemIcon.default, {
|
|
107
|
+
children: iconEnd
|
|
108
|
+
}, "3")]);
|
|
109
|
+
}
|