@mui/x-data-grid 6.7.0 → 6.9.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 +145 -5541
- package/components/GridColumnHeaders.d.ts +2 -2
- package/components/GridColumnHeaders.js +3 -1
- package/components/GridPagination.d.ts +2 -2
- package/components/GridRow.d.ts +2 -2
- package/components/GridRow.js +33 -79
- package/components/cell/GridCell.d.ts +24 -15
- package/components/cell/GridCell.js +422 -45
- package/components/cell/GridEditInputCell.js +9 -9
- package/components/cell/index.d.ts +2 -1
- package/components/cell/index.js +1 -1
- package/components/containers/GridRootStyles.js +30 -16
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +2 -2
- package/components/virtualization/GridVirtualScroller.js +4 -9
- package/components/virtualization/GridVirtualScrollerContent.js +11 -20
- package/constants/defaultGridSlotsComponents.js +6 -2
- package/hooks/core/useGridApiInitialization.js +4 -1
- package/hooks/core/useGridStateInitialization.js +2 -9
- package/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/hooks/features/editing/useGridCellEditing.js +5 -3
- package/hooks/features/editing/useGridRowEditing.js +14 -6
- package/hooks/features/filter/gridFilterSelector.js +8 -8
- package/hooks/features/filter/gridFilterUtils.d.ts +4 -1
- package/hooks/features/filter/gridFilterUtils.js +19 -13
- package/hooks/features/filter/useGridFilter.js +2 -1
- package/hooks/features/focus/useGridFocus.js +9 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/hooks/features/rows/gridRowsSelector.js +3 -3
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -0
- package/hooks/features/rows/useGridParamsApi.js +7 -15
- package/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +8 -816
- package/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridSelector.d.ts +3 -1
- package/hooks/utils/useGridSelector.js +37 -6
- package/hooks/utils/useLazyRef.d.ts +2 -0
- package/hooks/utils/useLazyRef.js +9 -0
- package/hooks/utils/useOnMount.d.ts +2 -0
- package/hooks/utils/useOnMount.js +7 -0
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/legacy/components/GridColumnHeaders.js +3 -1
- package/legacy/components/GridRow.js +35 -79
- package/legacy/components/cell/GridCell.js +425 -46
- package/legacy/components/cell/GridEditInputCell.js +9 -9
- package/legacy/components/cell/index.js +1 -1
- package/legacy/components/containers/GridRootStyles.js +20 -17
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/legacy/components/toolbar/GridToolbar.js +2 -2
- package/legacy/components/virtualization/GridVirtualScroller.js +4 -7
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +10 -17
- package/legacy/constants/defaultGridSlotsComponents.js +6 -2
- package/legacy/hooks/core/useGridApiInitialization.js +4 -1
- package/legacy/hooks/core/useGridStateInitialization.js +2 -7
- package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/legacy/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/legacy/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/legacy/hooks/features/editing/useGridCellEditing.js +5 -3
- package/legacy/hooks/features/editing/useGridRowEditing.js +15 -7
- package/legacy/hooks/features/filter/gridFilterSelector.js +8 -8
- package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
- package/legacy/hooks/features/filter/useGridFilter.js +2 -1
- package/legacy/hooks/features/focus/useGridFocus.js +9 -4
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/legacy/hooks/features/rows/gridRowsSelector.js +3 -3
- package/legacy/hooks/features/rows/useGridParamsApi.js +23 -15
- package/legacy/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +38 -34
- package/legacy/hooks/utils/index.js +1 -1
- package/legacy/hooks/utils/useGridSelector.js +43 -5
- package/legacy/hooks/utils/useLazyRef.js +9 -0
- package/legacy/hooks/utils/useOnMount.js +7 -0
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/locales/elGR.js +70 -79
- package/legacy/locales/ptBR.js +12 -13
- package/legacy/utils/Store.js +34 -0
- package/legacy/utils/createSelector.js +74 -6
- package/legacy/utils/doesSupportPreventScroll.js +13 -0
- package/legacy/utils/fastMemo.js +5 -0
- package/legacy/utils/fastObjectShallowCompare.js +32 -0
- package/legacy/utils/keyboardUtils.js +4 -2
- package/locales/elGR.js +66 -79
- package/locales/ptBR.js +12 -13
- package/models/api/gridCoreApi.d.ts +6 -0
- package/models/colDef/gridColDef.d.ts +4 -3
- package/models/colDef/gridColType.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +3 -3
- package/modern/components/GridColumnHeaders.js +3 -1
- package/modern/components/GridRow.js +32 -79
- package/modern/components/cell/GridCell.js +421 -45
- package/modern/components/cell/GridEditInputCell.js +9 -9
- package/modern/components/cell/index.js +1 -1
- package/modern/components/containers/GridRootStyles.js +30 -16
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/modern/components/toolbar/GridToolbar.js +2 -2
- package/modern/components/virtualization/GridVirtualScroller.js +4 -9
- package/modern/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/modern/constants/defaultGridSlotsComponents.js +6 -2
- package/modern/hooks/core/useGridApiInitialization.js +4 -1
- package/modern/hooks/core/useGridStateInitialization.js +2 -9
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/modern/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/modern/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/modern/hooks/features/editing/useGridCellEditing.js +5 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +14 -6
- package/modern/hooks/features/filter/gridFilterSelector.js +8 -8
- package/modern/hooks/features/filter/gridFilterUtils.js +17 -12
- package/modern/hooks/features/filter/useGridFilter.js +2 -1
- package/modern/hooks/features/focus/useGridFocus.js +8 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/modern/hooks/features/rows/gridRowsSelector.js +3 -3
- package/modern/hooks/features/rows/useGridParamsApi.js +7 -15
- package/modern/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +37 -6
- package/modern/hooks/utils/useLazyRef.js +9 -0
- package/modern/hooks/utils/useOnMount.js +7 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/locales/elGR.js +66 -79
- package/modern/locales/ptBR.js +12 -13
- package/modern/utils/Store.js +24 -0
- package/modern/utils/createSelector.js +74 -6
- package/modern/utils/doesSupportPreventScroll.js +13 -0
- package/modern/utils/fastMemo.js +5 -0
- package/modern/utils/fastObjectShallowCompare.js +32 -0
- package/modern/utils/keyboardUtils.js +4 -2
- package/node/components/GridColumnHeaders.js +4 -2
- package/node/components/GridRow.js +32 -79
- package/node/components/cell/GridCell.js +424 -47
- package/node/components/cell/GridEditInputCell.js +9 -9
- package/node/components/cell/index.js +17 -10
- package/node/components/containers/GridRootStyles.js +30 -16
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/node/components/toolbar/GridToolbar.js +2 -2
- package/node/components/virtualization/GridVirtualScroller.js +4 -9
- package/node/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/node/constants/defaultGridSlotsComponents.js +4 -1
- package/node/hooks/core/useGridApiInitialization.js +4 -1
- package/node/hooks/core/useGridStateInitialization.js +2 -9
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/node/hooks/features/columnGrouping/gridColumnGroupsSelector.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -2
- package/node/hooks/features/columns/gridColumnsSelector.js +6 -6
- package/node/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/node/hooks/features/editing/useGridCellEditing.js +5 -3
- package/node/hooks/features/editing/useGridRowEditing.js +14 -6
- package/node/hooks/features/filter/gridFilterSelector.js +7 -7
- package/node/hooks/features/filter/gridFilterUtils.js +17 -12
- package/node/hooks/features/filter/useGridFilter.js +2 -1
- package/node/hooks/features/focus/useGridFocus.js +8 -4
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +3 -3
- package/node/hooks/features/rowSelection/gridRowSelectionSelector.js +2 -2
- package/node/hooks/features/rows/gridRowsSelector.js +2 -2
- package/node/hooks/features/rows/useGridParamsApi.js +9 -15
- package/node/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +40 -36
- package/node/hooks/utils/index.js +14 -10
- package/node/hooks/utils/useGridSelector.js +41 -7
- package/node/hooks/utils/useLazyRef.js +17 -0
- package/node/hooks/utils/useOnMount.js +15 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/locales/elGR.js +66 -79
- package/node/locales/ptBR.js +12 -13
- package/node/utils/Store.js +31 -0
- package/node/utils/createSelector.js +77 -8
- package/node/utils/doesSupportPreventScroll.js +19 -0
- package/node/utils/fastMemo.js +13 -0
- package/node/utils/fastObjectShallowCompare.js +38 -0
- package/node/utils/keyboardUtils.js +4 -2
- package/package.json +2 -2
- package/utils/Store.d.ts +11 -0
- package/utils/Store.js +24 -0
- package/utils/createSelector.d.ts +1 -0
- package/utils/createSelector.js +74 -6
- package/utils/doesSupportPreventScroll.d.ts +1 -0
- package/utils/doesSupportPreventScroll.js +13 -0
- package/utils/fastMemo.d.ts +1 -0
- package/utils/fastMemo.js +5 -0
- package/utils/fastObjectShallowCompare.d.ts +1 -0
- package/utils/fastObjectShallowCompare.js +32 -0
- package/utils/keyboardUtils.js +4 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useLazyRef = useLazyRef;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
const UNINITIALIZED = {};
|
|
11
|
+
function useLazyRef(init, initArg) {
|
|
12
|
+
const ref = React.useRef(UNINITIALIZED);
|
|
13
|
+
if (ref.current === UNINITIALIZED) {
|
|
14
|
+
ref.current = init(initArg);
|
|
15
|
+
}
|
|
16
|
+
return ref;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useOnMount = useOnMount;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
const EMPTY = [];
|
|
11
|
+
function useOnMount(fn) {
|
|
12
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
13
|
+
React.useEffect(fn, EMPTY);
|
|
14
|
+
/* eslint-enable react-hooks/exhaustive-deps */
|
|
15
|
+
}
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -76,6 +76,7 @@ var _exportNames = {
|
|
|
76
76
|
getColumnsToExport: true,
|
|
77
77
|
defaultGetRowsToExport: true,
|
|
78
78
|
createSelector: true,
|
|
79
|
+
createSelectorMemoized: true,
|
|
79
80
|
unstable_resetCreateSelectorCache: true,
|
|
80
81
|
findParentElementFromClassName: true,
|
|
81
82
|
getActiveElement: true,
|
|
@@ -180,6 +181,12 @@ Object.defineProperty(exports, "createSelector", {
|
|
|
180
181
|
return _createSelector.createSelector;
|
|
181
182
|
}
|
|
182
183
|
});
|
|
184
|
+
Object.defineProperty(exports, "createSelectorMemoized", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () {
|
|
187
|
+
return _createSelector.createSelectorMemoized;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
183
190
|
Object.defineProperty(exports, "defaultGetRowsToExport", {
|
|
184
191
|
enumerable: true,
|
|
185
192
|
get: function () {
|
package/node/locales/elGR.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.elGR = void 0;
|
|
7
|
+
var _locale = require("@mui/material/locale");
|
|
7
8
|
var _getGridLocalization = require("../utils/getGridLocalization");
|
|
8
9
|
const elGRGrid = {
|
|
9
10
|
// Root
|
|
@@ -25,17 +26,15 @@ const elGRGrid = {
|
|
|
25
26
|
toolbarFiltersTooltipShow: 'Εμφάνιση φίλτρων',
|
|
26
27
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} ενεργά φίλτρα` : `${count} ενεργό φίλτρο`,
|
|
27
28
|
// Quick filter toolbar field
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
toolbarQuickFilterPlaceholder: 'Αναζήτηση…',
|
|
30
|
+
toolbarQuickFilterLabel: 'Αναζήτηση',
|
|
31
|
+
toolbarQuickFilterDeleteIconLabel: 'Καθαρισμός',
|
|
32
32
|
// Export selector toolbar button text
|
|
33
33
|
toolbarExport: 'Εξαγωγή',
|
|
34
34
|
toolbarExportLabel: 'Εξαγωγή',
|
|
35
35
|
toolbarExportCSV: 'Λήψη ως CSV',
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
toolbarExportPrint: 'Εκτύπωση',
|
|
37
|
+
toolbarExportExcel: 'Λήψη ως Excel',
|
|
39
38
|
// Columns panel text
|
|
40
39
|
columnsPanelTextFieldLabel: 'Εύρεση στήλης',
|
|
41
40
|
columnsPanelTextFieldPlaceholder: 'Επικεφαλίδα στήλης',
|
|
@@ -44,9 +43,9 @@ const elGRGrid = {
|
|
|
44
43
|
columnsPanelHideAllButton: 'Απόκρυψη όλων',
|
|
45
44
|
// Filter panel text
|
|
46
45
|
filterPanelAddFilter: 'Προσθήκη φίλτρου',
|
|
47
|
-
|
|
46
|
+
filterPanelRemoveAll: 'Αφαίρεση όλων',
|
|
48
47
|
filterPanelDeleteIconLabel: 'Διαγραφή',
|
|
49
|
-
|
|
48
|
+
filterPanelLogicOperator: 'Λογικός τελεστής',
|
|
50
49
|
filterPanelOperator: 'Τελεστές',
|
|
51
50
|
filterPanelOperatorAnd: 'Καί',
|
|
52
51
|
filterPanelOperatorOr: 'Ή',
|
|
@@ -66,44 +65,41 @@ const elGRGrid = {
|
|
|
66
65
|
filterOperatorOnOrBefore: 'είναι ίσο ή πριν',
|
|
67
66
|
filterOperatorIsEmpty: 'είναι κενό',
|
|
68
67
|
filterOperatorIsNotEmpty: 'δεν είναι κενό',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
filterOperatorIsAnyOf: 'είναι οποιοδήποτε από',
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
77
75
|
// Header filter operators text
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
76
|
+
headerFilterOperatorContains: 'Περιέχει',
|
|
77
|
+
headerFilterOperatorEquals: 'Ισούται',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Ξεκινάει με',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Τελειώνει με',
|
|
80
|
+
headerFilterOperatorIs: 'Είναι',
|
|
81
|
+
headerFilterOperatorNot: 'Δεν είναι',
|
|
82
|
+
headerFilterOperatorAfter: 'Είναι μετά',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'Είναι ίσο ή μετά',
|
|
84
|
+
headerFilterOperatorBefore: 'Είναι πριν',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'Είναι ίσο ή πριν',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Είναι κενό',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'Δεν είναι κενό',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Είναι οποιοδήποτε από',
|
|
89
|
+
'headerFilterOperator=': 'Ισούται',
|
|
90
|
+
'headerFilterOperator!=': 'Δεν ισούται',
|
|
91
|
+
'headerFilterOperator>': 'Μεγαλύτερο από',
|
|
92
|
+
'headerFilterOperator>=': 'Μεγαλύτερο ή ίσο με',
|
|
93
|
+
'headerFilterOperator<': 'Μικρότερο από',
|
|
94
|
+
'headerFilterOperator<=': 'Μικρότερο ή ίσο με',
|
|
98
95
|
// Filter values text
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
filterValueAny: 'οποιοδήποτε',
|
|
97
|
+
filterValueTrue: 'αληθές',
|
|
98
|
+
filterValueFalse: 'ψευδές',
|
|
103
99
|
// Column menu text
|
|
104
100
|
columnMenuLabel: 'Μενού',
|
|
105
101
|
columnMenuShowColumns: 'Εμφάνιση στηλών',
|
|
106
|
-
|
|
102
|
+
columnMenuManageColumns: 'Διαχείριση στηλών',
|
|
107
103
|
columnMenuFilter: 'Φίλτρο',
|
|
108
104
|
columnMenuHideColumn: 'Απόκρυψη',
|
|
109
105
|
columnMenuUnsort: 'Απενεργοποίηση ταξινόμησης',
|
|
@@ -120,50 +116,41 @@ const elGRGrid = {
|
|
|
120
116
|
// Total visible row amount footer text
|
|
121
117
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} από ${totalCount.toLocaleString()}`,
|
|
122
118
|
// Checkbox selection text
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
checkboxSelectionHeaderName: 'Επιλογή πλαισίου ελέγχου',
|
|
120
|
+
checkboxSelectionSelectAllRows: 'Επιλέξτε όλες τις σειρές',
|
|
121
|
+
checkboxSelectionUnselectAllRows: 'Καταργήση επιλογής όλων των σειρών',
|
|
122
|
+
checkboxSelectionSelectRow: 'Επιλογή γραμμής',
|
|
123
|
+
checkboxSelectionUnselectRow: 'Καταργήση επιλογής γραμμής',
|
|
129
124
|
// Boolean cell text
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
booleanCellTrueLabel: 'ναί',
|
|
126
|
+
booleanCellFalseLabel: 'όχι',
|
|
133
127
|
// Actions cell more text
|
|
134
|
-
actionsCellMore: 'περισσότερα'
|
|
135
|
-
|
|
128
|
+
actionsCellMore: 'περισσότερα',
|
|
136
129
|
// Column pinning text
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
130
|
+
pinToLeft: 'Καρφιτσώμα στα αριστερά',
|
|
131
|
+
pinToRight: 'Καρφιτσώμα στα δεξιά',
|
|
132
|
+
unpin: 'Ξεκαρφίτσωμα',
|
|
141
133
|
// Tree Data
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
134
|
+
treeDataGroupingHeaderName: 'Ομαδοποίηση',
|
|
135
|
+
treeDataExpand: 'εμφάνιση περιεχομένων',
|
|
136
|
+
treeDataCollapse: 'απόκρυψη περιεχομένων',
|
|
146
137
|
// Grouping columns
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
138
|
+
groupingColumnHeaderName: 'Ομαδοποίηση',
|
|
139
|
+
groupColumn: name => `Ομαδοποίηση κατά ${name}`,
|
|
140
|
+
unGroupColumn: name => `Διακοπή ομαδοποίησης κατά ${name}`,
|
|
151
141
|
// Master/detail
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
142
|
+
detailPanelToggle: 'Εναλλαγή πίνακα λεπτομερειών',
|
|
143
|
+
expandDetailPanel: 'Ανάπτυξη',
|
|
144
|
+
collapseDetailPanel: 'Σύμπτυξη',
|
|
156
145
|
// Row reordering text
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
rowReorderingHeaderName: 'Αναδιάταξη γραμμών',
|
|
159
147
|
// Aggregation
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
aggregationMenuItemHeader: 'Συσσωμάτωση',
|
|
149
|
+
aggregationFunctionLabelSum: 'άθροισμα',
|
|
150
|
+
aggregationFunctionLabelAvg: 'μέση τιμή',
|
|
151
|
+
aggregationFunctionLabelMin: 'ελάχιστο',
|
|
152
|
+
aggregationFunctionLabelMax: 'μέγιστο',
|
|
153
|
+
aggregationFunctionLabelSize: 'μέγεθος'
|
|
166
154
|
};
|
|
167
|
-
|
|
168
|
-
const elGR = (0, _getGridLocalization.getGridLocalization)(elGRGrid);
|
|
155
|
+
const elGR = (0, _getGridLocalization.getGridLocalization)(elGRGrid, _locale.elGR);
|
|
169
156
|
exports.elGR = elGR;
|
package/node/locales/ptBR.js
CHANGED
|
@@ -74,12 +74,12 @@ const ptBRGrid = {
|
|
|
74
74
|
// 'filterOperator<=': '<=',
|
|
75
75
|
|
|
76
76
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
headerFilterOperatorContains: 'Contém',
|
|
78
|
+
headerFilterOperatorEquals: 'Igual',
|
|
79
|
+
headerFilterOperatorStartsWith: 'Começa com',
|
|
80
|
+
headerFilterOperatorEndsWith: 'Termina com',
|
|
81
|
+
headerFilterOperatorIs: 'É',
|
|
82
|
+
headerFilterOperatorNot: 'Não é',
|
|
83
83
|
// headerFilterOperatorAfter: 'Is after',
|
|
84
84
|
// headerFilterOperatorOnOrAfter: 'Is on or after',
|
|
85
85
|
// headerFilterOperatorBefore: 'Is before',
|
|
@@ -87,13 +87,12 @@ const ptBRGrid = {
|
|
|
87
87
|
// headerFilterOperatorIsEmpty: 'Is empty',
|
|
88
88
|
// headerFilterOperatorIsNotEmpty: 'Is not empty',
|
|
89
89
|
// headerFilterOperatorIsAnyOf: 'Is any of',
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
'headerFilterOperator=': 'Igual',
|
|
91
|
+
'headerFilterOperator!=': 'Não igual',
|
|
92
|
+
'headerFilterOperator>': 'Maior que',
|
|
93
|
+
'headerFilterOperator>=': 'Maior que ou igual a',
|
|
94
|
+
'headerFilterOperator<': 'Menor que',
|
|
95
|
+
'headerFilterOperator<=': 'Menor que ou igual a',
|
|
97
96
|
// Filter values text
|
|
98
97
|
filterValueAny: 'qualquer',
|
|
99
98
|
filterValueTrue: 'verdadeiro',
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Store = void 0;
|
|
7
|
+
class Store {
|
|
8
|
+
static create(value) {
|
|
9
|
+
return new Store(value);
|
|
10
|
+
}
|
|
11
|
+
constructor(_value) {
|
|
12
|
+
this.value = void 0;
|
|
13
|
+
this.listeners = void 0;
|
|
14
|
+
this.subscribe = fn => {
|
|
15
|
+
this.listeners.add(fn);
|
|
16
|
+
return () => {
|
|
17
|
+
this.listeners.delete(fn);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
this.getSnapshot = () => {
|
|
21
|
+
return this.value;
|
|
22
|
+
};
|
|
23
|
+
this.update = value => {
|
|
24
|
+
this.value = value;
|
|
25
|
+
this.listeners.forEach(l => l(value));
|
|
26
|
+
};
|
|
27
|
+
this.value = _value;
|
|
28
|
+
this.listeners = new Set();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Store = Store;
|
|
@@ -3,21 +3,90 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unstable_resetCreateSelectorCache = exports.createSelector = void 0;
|
|
6
|
+
exports.unstable_resetCreateSelectorCache = exports.createSelectorMemoized = exports.createSelector = void 0;
|
|
7
7
|
var _reselect = require("reselect");
|
|
8
8
|
var _warning = require("./warning");
|
|
9
9
|
const cacheContainer = {
|
|
10
10
|
cache: new WeakMap()
|
|
11
11
|
};
|
|
12
12
|
const missingInstanceIdWarning = (0, _warning.buildWarning)(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`.']);
|
|
13
|
-
|
|
13
|
+
function checkIsAPIRef(value) {
|
|
14
|
+
return 'current' in value && 'instanceId' in value.current;
|
|
15
|
+
}
|
|
16
|
+
const DEFAULT_INSTANCE_ID = {
|
|
17
|
+
id: 'default'
|
|
18
|
+
};
|
|
19
|
+
const createSelector = (a, b, c, d, e, f, ...rest) => {
|
|
20
|
+
if (rest.length > 0) {
|
|
21
|
+
throw new Error('Unsupported number of selectors');
|
|
22
|
+
}
|
|
23
|
+
let selector;
|
|
24
|
+
if (a && b && c && d && e && f) {
|
|
25
|
+
selector = (stateOrApiRef, instanceIdParam) => {
|
|
26
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
27
|
+
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
28
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
29
|
+
const va = a(state, instanceId);
|
|
30
|
+
const vb = b(state, instanceId);
|
|
31
|
+
const vc = c(state, instanceId);
|
|
32
|
+
const vd = d(state, instanceId);
|
|
33
|
+
const ve = e(state, instanceId);
|
|
34
|
+
return f(va, vb, vc, vd, ve);
|
|
35
|
+
};
|
|
36
|
+
} else if (a && b && c && d && e) {
|
|
37
|
+
selector = (stateOrApiRef, instanceIdParam) => {
|
|
38
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
39
|
+
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
40
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
41
|
+
const va = a(state, instanceId);
|
|
42
|
+
const vb = b(state, instanceId);
|
|
43
|
+
const vc = c(state, instanceId);
|
|
44
|
+
const vd = d(state, instanceId);
|
|
45
|
+
return e(va, vb, vc, vd);
|
|
46
|
+
};
|
|
47
|
+
} else if (a && b && c && d) {
|
|
48
|
+
selector = (stateOrApiRef, instanceIdParam) => {
|
|
49
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
50
|
+
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
51
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
52
|
+
const va = a(state, instanceId);
|
|
53
|
+
const vb = b(state, instanceId);
|
|
54
|
+
const vc = c(state, instanceId);
|
|
55
|
+
return d(va, vb, vc);
|
|
56
|
+
};
|
|
57
|
+
} else if (a && b && c) {
|
|
58
|
+
selector = (stateOrApiRef, instanceIdParam) => {
|
|
59
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
60
|
+
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
61
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
62
|
+
const va = a(state, instanceId);
|
|
63
|
+
const vb = b(state, instanceId);
|
|
64
|
+
return c(va, vb);
|
|
65
|
+
};
|
|
66
|
+
} else if (a && b) {
|
|
67
|
+
selector = (stateOrApiRef, instanceIdParam) => {
|
|
68
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
69
|
+
const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
|
|
70
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
71
|
+
const va = a(state, instanceId);
|
|
72
|
+
return b(va);
|
|
73
|
+
};
|
|
74
|
+
} else {
|
|
75
|
+
throw new Error('Missing arguments');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// We use this property to detect if the selector was created with createSelector
|
|
79
|
+
// or it's only a simple function the receives the state and returns part of it.
|
|
80
|
+
selector.acceptsApiRef = true;
|
|
81
|
+
return selector;
|
|
82
|
+
};
|
|
83
|
+
exports.createSelector = createSelector;
|
|
84
|
+
const createSelectorMemoized = (...args) => {
|
|
14
85
|
const selector = (...selectorArgs) => {
|
|
15
86
|
const [stateOrApiRef, instanceId] = selectorArgs;
|
|
16
|
-
const
|
|
17
|
-
const cacheKey =
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
const state = isApiRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
87
|
+
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
|
88
|
+
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
|
|
89
|
+
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
|
21
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
22
91
|
if (cacheKey.id === 'default') {
|
|
23
92
|
missingInstanceIdWarning();
|
|
@@ -46,7 +115,7 @@ const createSelector = (...args) => {
|
|
|
46
115
|
};
|
|
47
116
|
|
|
48
117
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
49
|
-
exports.
|
|
118
|
+
exports.createSelectorMemoized = createSelectorMemoized;
|
|
50
119
|
const unstable_resetCreateSelectorCache = () => {
|
|
51
120
|
cacheContainer.cache = new WeakMap();
|
|
52
121
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.doesSupportPreventScroll = doesSupportPreventScroll;
|
|
7
|
+
// Based on https://stackoverflow.com/a/59518678
|
|
8
|
+
let cachedSupportsPreventScroll;
|
|
9
|
+
function doesSupportPreventScroll() {
|
|
10
|
+
if (cachedSupportsPreventScroll === undefined) {
|
|
11
|
+
document.createElement('div').focus({
|
|
12
|
+
get preventScroll() {
|
|
13
|
+
cachedSupportsPreventScroll = true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return cachedSupportsPreventScroll;
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fastMemo = fastMemo;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _fastObjectShallowCompare = require("./fastObjectShallowCompare");
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
function fastMemo(component) {
|
|
12
|
+
return /*#__PURE__*/React.memo(component, _fastObjectShallowCompare.fastObjectShallowCompare);
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fastObjectShallowCompare = fastObjectShallowCompare;
|
|
7
|
+
const is = Object.is;
|
|
8
|
+
function fastObjectShallowCompare(a, b) {
|
|
9
|
+
if (a === b) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
if (!(a instanceof Object) || !(b instanceof Object)) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
let aLength = 0;
|
|
16
|
+
let bLength = 0;
|
|
17
|
+
|
|
18
|
+
/* eslint-disable no-restricted-syntax */
|
|
19
|
+
/* eslint-disable guard-for-in */
|
|
20
|
+
for (const key in a) {
|
|
21
|
+
aLength += 1;
|
|
22
|
+
if (!is(a[key], b[key])) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (!(key in b)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unused-vars */
|
|
31
|
+
for (const _ in b) {
|
|
32
|
+
bLength += 1;
|
|
33
|
+
}
|
|
34
|
+
/* eslint-enable no-restricted-syntax */
|
|
35
|
+
/* eslint-enable guard-for-in */
|
|
36
|
+
|
|
37
|
+
return aLength === bLength;
|
|
38
|
+
}
|
|
@@ -24,12 +24,14 @@ const isDeleteKeys = key => key === 'Delete' || key === 'Backspace';
|
|
|
24
24
|
|
|
25
25
|
// Non printable keys have a name, e.g. "ArrowRight", see the whole list:
|
|
26
26
|
// https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
27
|
-
//
|
|
27
|
+
// So event.key.length === 1 is often enough.
|
|
28
|
+
//
|
|
29
|
+
// However, we also need to ignore shortcuts, for example: select all:
|
|
28
30
|
// - Windows: Ctrl+A, event.ctrlKey is true
|
|
29
31
|
// - macOS: ⌘ Command+A, event.metaKey is true
|
|
30
32
|
exports.isDeleteKeys = isDeleteKeys;
|
|
31
33
|
function isPrintableKey(event) {
|
|
32
|
-
return event.key.length === 1 && event.ctrlKey
|
|
34
|
+
return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
|
|
33
35
|
}
|
|
34
36
|
const GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];
|
|
35
37
|
exports.GRID_MULTIPLE_SELECTION_KEYS = GRID_MULTIPLE_SELECTION_KEYS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "The community edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"directory": "packages/grid/x-data-grid"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.
|
|
38
|
+
"@babel/runtime": "^7.22.5",
|
|
39
39
|
"@mui/utils": "^5.13.1",
|
|
40
40
|
"clsx": "^1.2.1",
|
|
41
41
|
"prop-types": "^15.8.1",
|
package/utils/Store.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Listener<T> = (value: T) => void;
|
|
2
|
+
export declare class Store<T> {
|
|
3
|
+
value: T;
|
|
4
|
+
listeners: Set<Listener<T>>;
|
|
5
|
+
static create<T>(value: T): Store<T>;
|
|
6
|
+
constructor(value: T);
|
|
7
|
+
subscribe: (fn: Listener<T>) => () => void;
|
|
8
|
+
getSnapshot: () => T;
|
|
9
|
+
update: (value: T) => void;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
package/utils/Store.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class Store {
|
|
2
|
+
static create(value) {
|
|
3
|
+
return new Store(value);
|
|
4
|
+
}
|
|
5
|
+
constructor(_value) {
|
|
6
|
+
this.value = void 0;
|
|
7
|
+
this.listeners = void 0;
|
|
8
|
+
this.subscribe = fn => {
|
|
9
|
+
this.listeners.add(fn);
|
|
10
|
+
return () => {
|
|
11
|
+
this.listeners.delete(fn);
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
this.getSnapshot = () => {
|
|
15
|
+
return this.value;
|
|
16
|
+
};
|
|
17
|
+
this.update = value => {
|
|
18
|
+
this.value = value;
|
|
19
|
+
this.listeners.forEach(l => l(value));
|
|
20
|
+
};
|
|
21
|
+
this.value = _value;
|
|
22
|
+
this.listeners = new Set();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -19,5 +19,6 @@ type StateFromSelectorList<Selectors extends readonly any[]> = Selectors extends
|
|
|
19
19
|
type SelectorArgs<Selectors extends ReadonlyArray<Selector<any>>, Result> = [selectors: [...Selectors], combiner: (...args: SelectorResultArray<Selectors>) => Result] | [...Selectors, (...args: SelectorResultArray<Selectors>) => Result];
|
|
20
20
|
type CreateSelectorFunction = <Selectors extends ReadonlyArray<Selector<any>>, Result>(...items: SelectorArgs<Selectors, Result>) => OutputSelector<StateFromSelectorList<Selectors>, Result>;
|
|
21
21
|
export declare const createSelector: CreateSelectorFunction;
|
|
22
|
+
export declare const createSelectorMemoized: CreateSelectorFunction;
|
|
22
23
|
export declare const unstable_resetCreateSelectorCache: () => void;
|
|
23
24
|
export {};
|