devextreme-react 24.1.2-beta → 24.1.3
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/LICENSE +21 -21
- package/README.md +23 -23
- package/cjs/accordion.d.ts +3 -3
- package/cjs/accordion.js +34 -37
- package/cjs/action-sheet.d.ts +3 -3
- package/cjs/action-sheet.js +34 -37
- package/cjs/autocomplete.d.ts +2 -2
- package/cjs/autocomplete.js +79 -82
- package/cjs/bar-gauge.d.ts +2 -2
- package/cjs/bar-gauge.js +97 -100
- package/cjs/box.d.ts +3 -3
- package/cjs/box.js +34 -37
- package/cjs/bullet.d.ts +2 -2
- package/cjs/bullet.js +44 -50
- package/cjs/button-group.d.ts +2 -2
- package/cjs/button-group.js +34 -37
- package/cjs/button.d.ts +2 -2
- package/cjs/button.js +22 -28
- package/cjs/calendar.d.ts +2 -2
- package/cjs/calendar.js +27 -31
- package/cjs/chart.d.ts +2 -2
- package/cjs/chart.js +305 -308
- package/cjs/check-box.d.ts +2 -2
- package/cjs/check-box.js +24 -29
- package/cjs/circular-gauge.d.ts +2 -2
- package/cjs/circular-gauge.js +103 -106
- package/cjs/color-box.d.ts +2 -2
- package/cjs/color-box.js +76 -79
- package/cjs/common/charts.d.ts +2 -2
- package/cjs/common/charts.js +2 -2
- package/cjs/common/data/custom-store.d.ts +2 -2
- package/cjs/common/data/custom-store.js +2 -2
- package/cjs/common/grids.d.ts +2 -2
- package/cjs/common/grids.js +2 -2
- package/cjs/common/index.d.ts +2 -2
- package/cjs/common/index.js +2 -2
- package/cjs/context-menu.d.ts +3 -3
- package/cjs/context-menu.js +76 -79
- package/cjs/core/component-base.d.ts +2 -2
- package/cjs/core/component-base.js +107 -141
- package/cjs/core/component.d.ts +2 -2
- package/cjs/core/component.js +29 -43
- package/cjs/core/config.d.ts +2 -2
- package/cjs/core/config.js +4 -15
- package/cjs/core/configuration/comparer.d.ts +2 -2
- package/cjs/core/configuration/comparer.js +27 -27
- package/cjs/core/configuration/config-node.d.ts +2 -2
- package/cjs/core/configuration/config-node.js +2 -2
- package/cjs/core/configuration/react/element.d.ts +2 -3
- package/cjs/core/configuration/react/element.js +10 -10
- package/cjs/core/configuration/react/templates.d.ts +2 -2
- package/cjs/core/configuration/react/templates.js +2 -2
- package/cjs/core/configuration/react/tree.d.ts +2 -2
- package/cjs/core/configuration/react/tree.js +33 -40
- package/cjs/core/configuration/tree.d.ts +2 -2
- package/cjs/core/configuration/tree.js +24 -24
- package/cjs/core/configuration/utils.d.ts +2 -2
- package/cjs/core/configuration/utils.js +12 -17
- package/cjs/core/extension-component.d.ts +2 -2
- package/cjs/core/extension-component.js +20 -35
- package/cjs/core/helpers.d.ts +2 -3
- package/cjs/core/helpers.js +30 -161
- package/cjs/core/nested-option.d.ts +2 -2
- package/cjs/core/nested-option.js +8 -8
- package/cjs/core/options-manager.d.ts +2 -2
- package/cjs/core/options-manager.js +85 -128
- package/cjs/core/template-manager.d.ts +2 -2
- package/cjs/core/template-manager.js +51 -82
- package/cjs/core/template-wrapper.d.ts +2 -2
- package/cjs/core/template-wrapper.js +32 -49
- package/cjs/core/template.d.ts +2 -2
- package/cjs/core/template.js +4 -4
- package/cjs/core/types.d.ts +2 -2
- package/cjs/core/types.js +2 -2
- package/cjs/core/widget-config.d.ts +2 -2
- package/cjs/core/widget-config.js +21 -22
- package/cjs/data-grid.d.ts +3 -3
- package/cjs/data-grid.js +290 -292
- package/cjs/date-box.d.ts +2 -2
- package/cjs/date-box.js +83 -85
- package/cjs/date-range-box.d.ts +2 -2
- package/cjs/date-range-box.js +82 -85
- package/cjs/defer-rendering.d.ts +2 -2
- package/cjs/defer-rendering.js +50 -56
- package/cjs/diagram.d.ts +16 -16
- package/cjs/diagram.js +109 -112
- package/cjs/draggable.d.ts +2 -2
- package/cjs/draggable.js +29 -34
- package/cjs/drawer.d.ts +2 -2
- package/cjs/drawer.js +27 -31
- package/cjs/drop-down-box.d.ts +2 -2
- package/cjs/drop-down-box.js +76 -79
- package/cjs/drop-down-button.d.ts +2 -2
- package/cjs/drop-down-button.js +68 -73
- package/cjs/file-manager.d.ts +2 -2
- package/cjs/file-manager.js +59 -65
- package/cjs/file-uploader.d.ts +2 -2
- package/cjs/file-uploader.js +24 -29
- package/cjs/filter-builder.d.ts +2 -2
- package/cjs/filter-builder.js +47 -50
- package/cjs/form.d.ts +2 -2
- package/cjs/form.js +94 -98
- package/cjs/funnel.d.ts +2 -2
- package/cjs/funnel.js +109 -113
- package/cjs/gallery.d.ts +3 -3
- package/cjs/gallery.js +34 -37
- package/cjs/gantt.d.ts +2 -2
- package/cjs/gantt.js +101 -106
- package/cjs/html-editor.d.ts +2 -2
- package/cjs/html-editor.js +64 -68
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +2 -2
- package/cjs/linear-gauge.d.ts +2 -2
- package/cjs/linear-gauge.js +103 -107
- package/cjs/list.d.ts +3 -3
- package/cjs/list.js +52 -55
- package/cjs/load-indicator.d.ts +2 -2
- package/cjs/load-indicator.js +19 -26
- package/cjs/load-panel.d.ts +2 -2
- package/cjs/load-panel.js +62 -65
- package/cjs/lookup.d.ts +2 -2
- package/cjs/lookup.js +79 -82
- package/cjs/map.d.ts +2 -2
- package/cjs/map.js +46 -50
- package/cjs/menu.d.ts +3 -3
- package/cjs/menu.js +76 -79
- package/cjs/multi-view.d.ts +3 -3
- package/cjs/multi-view.js +34 -37
- package/cjs/number-box.d.ts +2 -2
- package/cjs/number-box.js +37 -41
- package/cjs/pie-chart.d.ts +2 -2
- package/cjs/pie-chart.js +136 -139
- package/cjs/pivot-grid-field-chooser.d.ts +2 -2
- package/cjs/pivot-grid-field-chooser.js +38 -44
- package/cjs/pivot-grid.d.ts +2 -2
- package/cjs/pivot-grid.js +62 -68
- package/cjs/polar-chart.d.ts +2 -2
- package/cjs/polar-chart.js +238 -242
- package/cjs/popover.d.ts +2 -2
- package/cjs/popover.js +74 -76
- package/cjs/popup.d.ts +2 -2
- package/cjs/popup.js +68 -70
- package/cjs/progress-bar.d.ts +2 -2
- package/cjs/progress-bar.js +24 -29
- package/cjs/radio-group.d.ts +2 -2
- package/cjs/radio-group.js +34 -37
- package/cjs/range-selector.d.ts +2 -2
- package/cjs/range-selector.js +208 -212
- package/cjs/range-slider.d.ts +2 -2
- package/cjs/range-slider.js +37 -41
- package/cjs/recurrence-editor.d.ts +2 -2
- package/cjs/recurrence-editor.js +24 -29
- package/cjs/resizable.d.ts +2 -2
- package/cjs/resizable.js +24 -29
- package/cjs/responsive-box.d.ts +3 -3
- package/cjs/responsive-box.js +43 -46
- package/cjs/sankey.d.ts +2 -2
- package/cjs/sankey.js +85 -89
- package/cjs/scheduler.d.ts +2 -2
- package/cjs/scheduler.js +46 -49
- package/cjs/scroll-view.d.ts +2 -2
- package/cjs/scroll-view.js +19 -26
- package/cjs/select-box.d.ts +2 -2
- package/cjs/select-box.js +79 -82
- package/cjs/slider.d.ts +2 -2
- package/cjs/slider.js +37 -41
- package/cjs/sortable.d.ts +2 -2
- package/cjs/sortable.js +29 -34
- package/cjs/sparkline.d.ts +2 -2
- package/cjs/sparkline.js +44 -50
- package/cjs/speed-dial-action.d.ts +2 -2
- package/cjs/speed-dial-action.js +19 -26
- package/cjs/splitter.d.ts +6 -6
- package/cjs/splitter.js +34 -37
- package/cjs/switch.d.ts +2 -2
- package/cjs/switch.js +24 -29
- package/cjs/tab-panel.d.ts +3 -3
- package/cjs/tab-panel.js +34 -37
- package/cjs/tabs.d.ts +3 -3
- package/cjs/tabs.js +34 -37
- package/cjs/tag-box.d.ts +2 -2
- package/cjs/tag-box.js +79 -82
- package/cjs/text-area.d.ts +2 -2
- package/cjs/text-area.js +24 -29
- package/cjs/text-box.d.ts +2 -2
- package/cjs/text-box.js +34 -38
- package/cjs/tile-view.d.ts +3 -3
- package/cjs/tile-view.js +34 -37
- package/cjs/toast.d.ts +2 -2
- package/cjs/toast.js +65 -67
- package/cjs/toolbar.d.ts +3 -3
- package/cjs/toolbar.js +34 -37
- package/cjs/tooltip.d.ts +2 -2
- package/cjs/tooltip.js +71 -73
- package/cjs/tree-list.d.ts +3 -3
- package/cjs/tree-list.js +250 -254
- package/cjs/tree-map.d.ts +2 -2
- package/cjs/tree-map.js +91 -95
- package/cjs/tree-view.d.ts +3 -3
- package/cjs/tree-view.js +43 -46
- package/cjs/validation-group.d.ts +2 -2
- package/cjs/validation-group.js +19 -26
- package/cjs/validation-summary.d.ts +3 -3
- package/cjs/validation-summary.js +34 -37
- package/cjs/validator.d.ts +2 -2
- package/cjs/validator.js +57 -63
- package/cjs/vector-map.d.ts +2 -2
- package/cjs/vector-map.js +106 -110
- package/esm/accordion.js +29 -32
- package/esm/action-sheet.js +29 -32
- package/esm/autocomplete.js +74 -77
- package/esm/bar-gauge.js +92 -95
- package/esm/box.js +29 -32
- package/esm/bullet.js +39 -45
- package/esm/button-group.js +29 -32
- package/esm/button.js +18 -24
- package/esm/calendar.js +23 -27
- package/esm/chart.js +300 -303
- package/esm/check-box.js +20 -25
- package/esm/circular-gauge.js +98 -101
- package/esm/color-box.js +71 -74
- package/esm/common/charts.js +2 -2
- package/esm/common/data/custom-store.js +2 -2
- package/esm/common/grids.js +2 -2
- package/esm/common/index.js +2 -2
- package/esm/context-menu.js +71 -74
- package/esm/core/component-base.js +94 -131
- package/esm/core/component.js +25 -39
- package/esm/core/config.js +4 -15
- package/esm/core/configuration/comparer.js +25 -25
- package/esm/core/configuration/config-node.js +2 -2
- package/esm/core/configuration/react/element.js +9 -9
- package/esm/core/configuration/react/templates.js +2 -2
- package/esm/core/configuration/react/tree.js +28 -35
- package/esm/core/configuration/tree.js +23 -23
- package/esm/core/configuration/utils.js +12 -17
- package/esm/core/extension-component.js +17 -32
- package/esm/core/helpers.js +30 -163
- package/esm/core/nested-option.js +6 -6
- package/esm/core/options-manager.js +81 -124
- package/esm/core/template-manager.js +44 -75
- package/esm/core/template-wrapper.js +27 -44
- package/esm/core/template.js +3 -3
- package/esm/core/types.js +2 -2
- package/esm/core/widget-config.js +21 -22
- package/esm/data-grid.js +285 -287
- package/esm/date-box.js +78 -80
- package/esm/date-range-box.js +77 -80
- package/esm/defer-rendering.js +45 -51
- package/esm/diagram.js +104 -107
- package/esm/draggable.js +24 -29
- package/esm/drawer.js +23 -27
- package/esm/drop-down-box.js +71 -74
- package/esm/drop-down-button.js +63 -68
- package/esm/file-manager.js +54 -60
- package/esm/file-uploader.js +20 -25
- package/esm/filter-builder.js +42 -45
- package/esm/form.js +89 -93
- package/esm/funnel.js +104 -108
- package/esm/gallery.js +29 -32
- package/esm/gantt.js +96 -101
- package/esm/html-editor.js +59 -63
- package/esm/index.js +2 -2
- package/esm/linear-gauge.js +98 -102
- package/esm/list.js +47 -50
- package/esm/load-indicator.js +15 -22
- package/esm/load-panel.js +57 -60
- package/esm/lookup.js +74 -77
- package/esm/map.js +41 -45
- package/esm/menu.js +71 -74
- package/esm/multi-view.js +29 -32
- package/esm/number-box.js +32 -36
- package/esm/pie-chart.js +131 -134
- package/esm/pivot-grid-field-chooser.js +33 -39
- package/esm/pivot-grid.js +57 -63
- package/esm/polar-chart.js +233 -237
- package/esm/popover.js +69 -71
- package/esm/popup.js +63 -65
- package/esm/progress-bar.js +20 -25
- package/esm/radio-group.js +29 -32
- package/esm/range-selector.js +203 -207
- package/esm/range-slider.js +32 -36
- package/esm/recurrence-editor.js +20 -25
- package/esm/resizable.js +20 -25
- package/esm/responsive-box.js +38 -41
- package/esm/sankey.js +80 -84
- package/esm/scheduler.js +41 -44
- package/esm/scroll-view.js +15 -22
- package/esm/select-box.js +74 -77
- package/esm/slider.js +32 -36
- package/esm/sortable.js +24 -29
- package/esm/sparkline.js +39 -45
- package/esm/speed-dial-action.js +15 -22
- package/esm/splitter.js +29 -32
- package/esm/switch.js +20 -25
- package/esm/tab-panel.js +29 -32
- package/esm/tabs.js +29 -32
- package/esm/tag-box.js +74 -77
- package/esm/text-area.js +20 -25
- package/esm/text-box.js +29 -33
- package/esm/tile-view.js +29 -32
- package/esm/toast.js +60 -62
- package/esm/toolbar.js +29 -32
- package/esm/tooltip.js +66 -68
- package/esm/tree-list.js +245 -249
- package/esm/tree-map.js +86 -90
- package/esm/tree-view.js +38 -41
- package/esm/validation-group.js +15 -22
- package/esm/validation-summary.js +29 -32
- package/esm/validator.js +52 -58
- package/esm/vector-map.js +101 -105
- package/package.json +50 -51
package/esm/core/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 24.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 24.1.3
|
|
4
|
+
* Build date: Tue Jun 11 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -11,104 +11,32 @@
|
|
|
11
11
|
* https://github.com/DevExpress/devextreme-react
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
var __extends = (this && this.__extends) || (function () {
|
|
15
|
-
var extendStatics = function (d, b) {
|
|
16
|
-
extendStatics = Object.setPrototypeOf ||
|
|
17
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
18
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
19
|
-
return extendStatics(d, b);
|
|
20
|
-
};
|
|
21
|
-
return function (d, b) {
|
|
22
|
-
if (typeof b !== "function" && b !== null)
|
|
23
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
24
|
-
extendStatics(d, b);
|
|
25
|
-
function __() { this.constructor = d; }
|
|
26
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
27
|
-
};
|
|
28
|
-
})();
|
|
29
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
30
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
31
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
32
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
|
-
function step(op) {
|
|
34
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
36
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
37
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
|
-
switch (op[0]) {
|
|
39
|
-
case 0: case 1: t = op; break;
|
|
40
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
41
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
42
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
43
|
-
default:
|
|
44
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
45
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
46
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
47
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
48
|
-
if (t[2]) _.ops.pop();
|
|
49
|
-
_.trys.pop(); continue;
|
|
50
|
-
}
|
|
51
|
-
op = body.call(thisArg, _);
|
|
52
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
53
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var __values = (this && this.__values) || function(o) {
|
|
57
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
58
|
-
if (m) return m.call(o);
|
|
59
|
-
if (o && typeof o.length === "number") return {
|
|
60
|
-
next: function () {
|
|
61
|
-
if (o && i >= o.length) o = void 0;
|
|
62
|
-
return { value: o && o[i++], done: !o };
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
66
|
-
};
|
|
67
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
68
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
69
|
-
if (!m) return o;
|
|
70
|
-
var i = m.call(o), r, ar = [], e;
|
|
71
|
-
try {
|
|
72
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
73
|
-
}
|
|
74
|
-
catch (error) { e = { error: error }; }
|
|
75
|
-
finally {
|
|
76
|
-
try {
|
|
77
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
78
|
-
}
|
|
79
|
-
finally { if (e) throw e.error; }
|
|
80
|
-
}
|
|
81
|
-
return ar;
|
|
82
|
-
};
|
|
83
14
|
/* eslint-disable max-classes-per-file, no-restricted-syntax */
|
|
84
15
|
import { createContext } from 'react';
|
|
85
|
-
export
|
|
16
|
+
export const RemovalLockerContext = createContext(undefined);
|
|
86
17
|
// eslint-disable-next-line @typescript-eslint/no-extra-parens
|
|
87
|
-
export
|
|
18
|
+
export const RestoreTreeContext = createContext(undefined);
|
|
88
19
|
export function generateID() {
|
|
89
20
|
return Math.random().toString(36).substring(2);
|
|
90
21
|
}
|
|
91
|
-
|
|
92
|
-
|
|
22
|
+
export class DoubleKeyMap {
|
|
23
|
+
constructor() {
|
|
93
24
|
this._map = new Map();
|
|
94
25
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var innerMap = this._map.get(key1);
|
|
26
|
+
set({ key1, key2 }, value) {
|
|
27
|
+
let innerMap = this._map.get(key1);
|
|
98
28
|
if (!innerMap) {
|
|
99
29
|
innerMap = new Map();
|
|
100
30
|
this._map.set(key1, innerMap);
|
|
101
31
|
}
|
|
102
32
|
innerMap.set(key2, value);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var innerMap = this._map.get(key1);
|
|
33
|
+
}
|
|
34
|
+
get({ key1, key2 }) {
|
|
35
|
+
const innerMap = this._map.get(key1);
|
|
107
36
|
return innerMap ? innerMap.get(key2) : undefined;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
var innerMap = this._map.get(key1);
|
|
37
|
+
}
|
|
38
|
+
delete({ key1, key2 }) {
|
|
39
|
+
const innerMap = this._map.get(key1);
|
|
112
40
|
if (!innerMap) {
|
|
113
41
|
return;
|
|
114
42
|
}
|
|
@@ -116,89 +44,28 @@ var DoubleKeyMap = /** @class */ (function () {
|
|
|
116
44
|
if (innerMap.size === 0) {
|
|
117
45
|
this._map.delete(key1);
|
|
118
46
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
configurable: true
|
|
126
|
-
});
|
|
127
|
-
DoubleKeyMap.prototype.shallowCopy = function () {
|
|
128
|
-
var copy = new DoubleKeyMap();
|
|
47
|
+
}
|
|
48
|
+
get empty() {
|
|
49
|
+
return this._map.size === 0;
|
|
50
|
+
}
|
|
51
|
+
shallowCopy() {
|
|
52
|
+
const copy = new DoubleKeyMap();
|
|
129
53
|
copy._map = this._map;
|
|
130
54
|
return copy;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
switch (_g.label) {
|
|
137
|
-
case 0:
|
|
138
|
-
_g.trys.push([0, 11, 12, 13]);
|
|
139
|
-
_a = __values(this._map), _b = _a.next();
|
|
140
|
-
_g.label = 1;
|
|
141
|
-
case 1:
|
|
142
|
-
if (!!_b.done) return [3 /*break*/, 10];
|
|
143
|
-
_c = __read(_b.value, 2), key1 = _c[0], innerMap = _c[1];
|
|
144
|
-
_g.label = 2;
|
|
145
|
-
case 2:
|
|
146
|
-
_g.trys.push([2, 7, 8, 9]);
|
|
147
|
-
innerMap_1 = (e_1 = void 0, __values(innerMap)), innerMap_1_1 = innerMap_1.next();
|
|
148
|
-
_g.label = 3;
|
|
149
|
-
case 3:
|
|
150
|
-
if (!!innerMap_1_1.done) return [3 /*break*/, 6];
|
|
151
|
-
_d = __read(innerMap_1_1.value, 2), key2 = _d[0], value = _d[1];
|
|
152
|
-
return [4 /*yield*/, [{ key1: key1, key2: key2 }, value]];
|
|
153
|
-
case 4:
|
|
154
|
-
_g.sent();
|
|
155
|
-
_g.label = 5;
|
|
156
|
-
case 5:
|
|
157
|
-
innerMap_1_1 = innerMap_1.next();
|
|
158
|
-
return [3 /*break*/, 3];
|
|
159
|
-
case 6: return [3 /*break*/, 9];
|
|
160
|
-
case 7:
|
|
161
|
-
e_1_1 = _g.sent();
|
|
162
|
-
e_1 = { error: e_1_1 };
|
|
163
|
-
return [3 /*break*/, 9];
|
|
164
|
-
case 8:
|
|
165
|
-
try {
|
|
166
|
-
if (innerMap_1_1 && !innerMap_1_1.done && (_f = innerMap_1.return)) _f.call(innerMap_1);
|
|
167
|
-
}
|
|
168
|
-
finally { if (e_1) throw e_1.error; }
|
|
169
|
-
return [7 /*endfinally*/];
|
|
170
|
-
case 9:
|
|
171
|
-
_b = _a.next();
|
|
172
|
-
return [3 /*break*/, 1];
|
|
173
|
-
case 10: return [3 /*break*/, 13];
|
|
174
|
-
case 11:
|
|
175
|
-
e_2_1 = _g.sent();
|
|
176
|
-
e_2 = { error: e_2_1 };
|
|
177
|
-
return [3 /*break*/, 13];
|
|
178
|
-
case 12:
|
|
179
|
-
try {
|
|
180
|
-
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
181
|
-
}
|
|
182
|
-
finally { if (e_2) throw e_2.error; }
|
|
183
|
-
return [7 /*endfinally*/];
|
|
184
|
-
case 13: return [2 /*return*/];
|
|
55
|
+
}
|
|
56
|
+
*[Symbol.iterator]() {
|
|
57
|
+
for (const [key1, innerMap] of this._map) {
|
|
58
|
+
for (const [key2, value] of innerMap) {
|
|
59
|
+
yield [{ key1, key2 }, value];
|
|
185
60
|
}
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
return DoubleKeyMap;
|
|
189
|
-
}());
|
|
190
|
-
export { DoubleKeyMap };
|
|
191
|
-
var TemplateInstantiationModels = /** @class */ (function (_super) {
|
|
192
|
-
__extends(TemplateInstantiationModels, _super);
|
|
193
|
-
function TemplateInstantiationModels() {
|
|
194
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
}
|
|
195
62
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
63
|
+
}
|
|
64
|
+
export class TemplateInstantiationModels extends DoubleKeyMap {
|
|
65
|
+
}
|
|
199
66
|
export function capitalizeFirstLetter(text) {
|
|
200
67
|
if (text.length) {
|
|
201
|
-
return
|
|
68
|
+
return `${text[0].toUpperCase()}${text.substr(1)}`;
|
|
202
69
|
}
|
|
203
70
|
return '';
|
|
204
71
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 24.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 24.1.3
|
|
4
|
+
* Build date: Tue Jun 11 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
import * as React from 'react';
|
|
15
15
|
import { ElementType, getElementInfo } from './configuration/react/element';
|
|
16
|
-
|
|
16
|
+
const NestedOption = (props) => {
|
|
17
17
|
// @ts-expect-error TS2339
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const { children: stateChildren } = props;
|
|
19
|
+
const children = React.Children.map(stateChildren, (child) => {
|
|
20
|
+
const childElementInfo = getElementInfo(child);
|
|
21
21
|
return childElementInfo.type === ElementType.Option ? child : null;
|
|
22
22
|
});
|
|
23
23
|
return React.createElement(React.Fragment, {}, children);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 24.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 24.1.3
|
|
4
|
+
* Build date: Tue Jun 11 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -11,123 +11,92 @@
|
|
|
11
11
|
* https://github.com/DevExpress/devextreme-react
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
15
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
16
|
-
if (!m) return o;
|
|
17
|
-
var i = m.call(o), r, ar = [], e;
|
|
18
|
-
try {
|
|
19
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
20
|
-
}
|
|
21
|
-
catch (error) { e = { error: error }; }
|
|
22
|
-
finally {
|
|
23
|
-
try {
|
|
24
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
25
|
-
}
|
|
26
|
-
finally { if (e) throw e.error; }
|
|
27
|
-
}
|
|
28
|
-
return ar;
|
|
29
|
-
};
|
|
30
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
31
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
32
|
-
if (ar || !(i in from)) {
|
|
33
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
34
|
-
ar[i] = from[i];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
38
|
-
};
|
|
39
14
|
/* eslint-disable no-restricted-globals */
|
|
40
15
|
import { getChanges } from './configuration/comparer';
|
|
41
16
|
import { buildConfig, findValue, ValueType } from './configuration/tree';
|
|
42
17
|
import { mergeNameParts, shallowEquals } from './configuration/utils';
|
|
43
18
|
import { capitalizeFirstLetter } from './helpers';
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
19
|
+
const optionsManagers = new Set();
|
|
20
|
+
let guardTimeoutHandler = -1;
|
|
21
|
+
let innerGuardTimeoutHandler = -1;
|
|
47
22
|
export function unscheduleGuards() {
|
|
48
23
|
clearTimeout(guardTimeoutHandler);
|
|
49
24
|
clearTimeout(innerGuardTimeoutHandler);
|
|
50
25
|
}
|
|
51
26
|
export function scheduleGuards() {
|
|
52
27
|
unscheduleGuards();
|
|
53
|
-
guardTimeoutHandler = window.setTimeout(
|
|
54
|
-
innerGuardTimeoutHandler = window.setTimeout(
|
|
55
|
-
optionsManagers.forEach(
|
|
28
|
+
guardTimeoutHandler = window.setTimeout(() => {
|
|
29
|
+
innerGuardTimeoutHandler = window.setTimeout(() => {
|
|
30
|
+
optionsManagers.forEach((optionManager) => optionManager.execGuards());
|
|
56
31
|
});
|
|
57
32
|
});
|
|
58
33
|
}
|
|
59
|
-
|
|
60
|
-
|
|
34
|
+
class OptionsManager {
|
|
35
|
+
constructor() {
|
|
61
36
|
this.guards = {};
|
|
62
37
|
this.isUpdating = false;
|
|
63
38
|
this.onOptionChanged = this.onOptionChanged.bind(this);
|
|
64
39
|
this.wrapOptionValue = this.wrapOptionValue.bind(this);
|
|
65
40
|
}
|
|
66
|
-
|
|
41
|
+
setInstance(instance, config, subscribableOptions, independentEvents) {
|
|
67
42
|
this.instance = instance;
|
|
68
43
|
this.currentConfig = config;
|
|
69
44
|
this.subscribableOptions = new Set(subscribableOptions);
|
|
70
45
|
this.independentEvents = new Set(independentEvents);
|
|
71
46
|
optionsManagers.add(this);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
options[key] = _this.wrapOptionValue(key, config.options[key]);
|
|
47
|
+
}
|
|
48
|
+
getInitialOptions(rootNode) {
|
|
49
|
+
const config = buildConfig(rootNode, false);
|
|
50
|
+
const options = {};
|
|
51
|
+
Object.keys(config.options).forEach((key) => {
|
|
52
|
+
options[key] = this.wrapOptionValue(key, config.options[key]);
|
|
79
53
|
});
|
|
80
54
|
return options;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
55
|
+
}
|
|
56
|
+
getTemplateOptions(rootNode) {
|
|
57
|
+
const config = buildConfig(rootNode, false);
|
|
84
58
|
return config.templates;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var optionChangedHandler = function (_a) {
|
|
90
|
-
var value = _a.value, fullName = _a.fullName;
|
|
59
|
+
}
|
|
60
|
+
update(config, dxtemplates) {
|
|
61
|
+
const changedOptions = [];
|
|
62
|
+
const optionChangedHandler = ({ value, fullName }) => {
|
|
91
63
|
changedOptions.push([fullName, value]);
|
|
92
64
|
};
|
|
93
65
|
this.instance.on('optionChanged', optionChangedHandler);
|
|
94
|
-
|
|
66
|
+
const changes = getChanges(config, this.currentConfig);
|
|
95
67
|
if (!changes.options && !changes.templates && !changes.removedOptions.length) {
|
|
96
68
|
return;
|
|
97
69
|
}
|
|
98
70
|
this.instance.beginUpdate();
|
|
99
71
|
this.isUpdating = true;
|
|
100
|
-
changes.removedOptions.forEach(
|
|
101
|
-
|
|
72
|
+
changes.removedOptions.forEach((optionName) => {
|
|
73
|
+
this.resetOption(optionName);
|
|
102
74
|
});
|
|
103
75
|
if (Object.keys(dxtemplates).length > 0) {
|
|
104
76
|
this.setValue('integrationOptions', {
|
|
105
77
|
templates: dxtemplates,
|
|
106
78
|
});
|
|
107
79
|
}
|
|
108
|
-
Object.keys(changes.options).forEach(
|
|
109
|
-
|
|
80
|
+
Object.keys(changes.options).forEach((key) => {
|
|
81
|
+
this.setValue(key, changes.options[key]);
|
|
110
82
|
});
|
|
111
83
|
this.isUpdating = false;
|
|
112
84
|
this.instance.off('optionChanged', optionChangedHandler);
|
|
113
85
|
this.currentConfig = config;
|
|
114
|
-
changedOptions.forEach(
|
|
115
|
-
|
|
116
|
-
var currentPropValue = config.options[name];
|
|
86
|
+
changedOptions.forEach(([name, value]) => {
|
|
87
|
+
const currentPropValue = config.options[name];
|
|
117
88
|
if (Object.prototype.hasOwnProperty.call(config.options, name)
|
|
118
89
|
&& currentPropValue !== value) {
|
|
119
|
-
|
|
90
|
+
this.setValue(name, currentPropValue);
|
|
120
91
|
}
|
|
121
92
|
});
|
|
122
93
|
this.instance.endUpdate();
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
var _this = this;
|
|
126
|
-
var _a;
|
|
94
|
+
}
|
|
95
|
+
onOptionChanged(e) {
|
|
127
96
|
if (this.isUpdating) {
|
|
128
97
|
return;
|
|
129
98
|
}
|
|
130
|
-
|
|
99
|
+
let valueDescriptor = findValue(this.currentConfig, e.fullName.split('.'));
|
|
131
100
|
if (!valueDescriptor || valueDescriptor.value !== e.value) {
|
|
132
101
|
this.callOptionChangeHandler(e.fullName, e.value);
|
|
133
102
|
}
|
|
@@ -135,27 +104,26 @@ var OptionsManager = /** @class */ (function () {
|
|
|
135
104
|
if (!valueDescriptor) {
|
|
136
105
|
return;
|
|
137
106
|
}
|
|
138
|
-
|
|
107
|
+
const { value, type } = valueDescriptor;
|
|
139
108
|
if (value instanceof Array && type === ValueType.Array) {
|
|
140
|
-
for (
|
|
141
|
-
if (value[i] !==
|
|
109
|
+
for (let i = 0; i < value.length; i += 1) {
|
|
110
|
+
if (value[i] !== e.value?.[i]) {
|
|
142
111
|
this.addGuard(e.fullName, value);
|
|
143
112
|
return;
|
|
144
113
|
}
|
|
145
114
|
}
|
|
146
115
|
}
|
|
147
116
|
else if (type === ValueType.Complex && value instanceof Object) {
|
|
148
|
-
Object.keys(value).forEach(
|
|
149
|
-
|
|
150
|
-
if (value[key] === ((_a = e.value) === null || _a === void 0 ? void 0 : _a[key])) {
|
|
117
|
+
Object.keys(value).forEach((key) => {
|
|
118
|
+
if (value[key] === e.value?.[key]) {
|
|
151
119
|
return;
|
|
152
120
|
}
|
|
153
|
-
|
|
121
|
+
this.addGuard(mergeNameParts(e.fullName, key), value[key]);
|
|
154
122
|
});
|
|
155
123
|
}
|
|
156
124
|
else {
|
|
157
|
-
|
|
158
|
-
|
|
125
|
+
const valuesAreEqual = value === e.value;
|
|
126
|
+
const valuesAreEqualObjects = !valuesAreEqual
|
|
159
127
|
&& value instanceof Object
|
|
160
128
|
&& e.value instanceof Object
|
|
161
129
|
&& shallowEquals(value, e.value);
|
|
@@ -164,88 +132,77 @@ var OptionsManager = /** @class */ (function () {
|
|
|
164
132
|
}
|
|
165
133
|
this.addGuard(e.fullName, value);
|
|
166
134
|
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
enumerable: false,
|
|
173
|
-
configurable: true
|
|
174
|
-
});
|
|
175
|
-
OptionsManager.prototype.dispose = function () {
|
|
176
|
-
var _this = this;
|
|
135
|
+
}
|
|
136
|
+
get isInstanceSet() {
|
|
137
|
+
return !!this.instance;
|
|
138
|
+
}
|
|
139
|
+
dispose() {
|
|
177
140
|
optionsManagers.delete(this);
|
|
178
|
-
Object.keys(this.guards).forEach(
|
|
179
|
-
delete
|
|
141
|
+
Object.keys(this.guards).forEach((optionName) => {
|
|
142
|
+
delete this.guards[optionName];
|
|
180
143
|
});
|
|
181
144
|
this.instance = null;
|
|
182
|
-
}
|
|
183
|
-
|
|
145
|
+
}
|
|
146
|
+
isOptionSubscribable(optionName) {
|
|
184
147
|
return this.subscribableOptions.has(optionName);
|
|
185
|
-
}
|
|
186
|
-
|
|
148
|
+
}
|
|
149
|
+
isIndependentEvent(optionName) {
|
|
187
150
|
return this.independentEvents.has(optionName);
|
|
188
|
-
}
|
|
189
|
-
|
|
151
|
+
}
|
|
152
|
+
callOptionChangeHandler(optionName, optionValue) {
|
|
190
153
|
if (!this.isOptionSubscribable(optionName)) {
|
|
191
154
|
return;
|
|
192
155
|
}
|
|
193
|
-
|
|
194
|
-
|
|
156
|
+
const parts = optionName.split('.');
|
|
157
|
+
const propName = parts[parts.length - 1];
|
|
195
158
|
if (propName.startsWith('on')) {
|
|
196
159
|
return;
|
|
197
160
|
}
|
|
198
|
-
|
|
161
|
+
const eventName = `on${capitalizeFirstLetter(propName)}Change`;
|
|
199
162
|
parts[parts.length - 1] = eventName;
|
|
200
|
-
|
|
163
|
+
const changeEvent = findValue(this.currentConfig, parts);
|
|
201
164
|
if (!changeEvent) {
|
|
202
165
|
return;
|
|
203
166
|
}
|
|
204
167
|
if (typeof changeEvent.value !== 'function') {
|
|
205
|
-
throw new Error(
|
|
168
|
+
throw new Error(`Invalid value for the ${eventName} property.
|
|
169
|
+
${eventName} must be a function.`);
|
|
206
170
|
}
|
|
207
171
|
changeEvent.value(optionValue);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
var _this = this;
|
|
172
|
+
}
|
|
173
|
+
wrapOptionValue(name, value) {
|
|
211
174
|
if (name.substr(0, 2) === 'on' && typeof value === 'function') {
|
|
212
|
-
return
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
args[_i] = arguments[_i];
|
|
216
|
-
}
|
|
217
|
-
if (!_this.isUpdating || _this.isIndependentEvent(name)) {
|
|
218
|
-
value.apply(void 0, __spreadArray([], __read(args), false));
|
|
175
|
+
return (...args) => {
|
|
176
|
+
if (!this.isUpdating || this.isIndependentEvent(name)) {
|
|
177
|
+
value(...args);
|
|
219
178
|
}
|
|
220
179
|
};
|
|
221
180
|
}
|
|
222
181
|
return value;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
var _this = this;
|
|
182
|
+
}
|
|
183
|
+
addGuard(optionName, optionValue) {
|
|
226
184
|
if (this.guards[optionName] !== undefined) {
|
|
227
185
|
return;
|
|
228
186
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
delete
|
|
187
|
+
const handler = () => {
|
|
188
|
+
this.setValue(optionName, optionValue);
|
|
189
|
+
delete this.guards[optionName];
|
|
232
190
|
};
|
|
233
191
|
this.guards[optionName] = handler;
|
|
234
192
|
scheduleGuards();
|
|
235
|
-
}
|
|
236
|
-
|
|
193
|
+
}
|
|
194
|
+
execGuards() {
|
|
237
195
|
Object.values(this.guards)
|
|
238
|
-
.forEach(
|
|
239
|
-
}
|
|
240
|
-
|
|
196
|
+
.forEach((handler) => handler());
|
|
197
|
+
}
|
|
198
|
+
resetOption(name) {
|
|
241
199
|
this.instance.resetOption(name);
|
|
242
|
-
}
|
|
243
|
-
|
|
200
|
+
}
|
|
201
|
+
setValue(name, value) {
|
|
244
202
|
if (this.guards[name]) {
|
|
245
203
|
delete this.guards[name];
|
|
246
204
|
}
|
|
247
205
|
this.instance.option(name, this.wrapOptionValue(name, value));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
}());
|
|
206
|
+
}
|
|
207
|
+
}
|
|
251
208
|
export { OptionsManager, };
|