devextreme-react 20.2.4-build-20310-0313 → 20.2.4
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/accordion.d.ts +3 -2
- package/accordion.js +3 -2
- package/action-sheet.d.ts +3 -2
- package/action-sheet.js +3 -2
- package/autocomplete.d.ts +3 -2
- package/autocomplete.js +3 -2
- package/bar-gauge.d.ts +3 -2
- package/bar-gauge.js +3 -2
- package/box.d.ts +3 -2
- package/box.js +3 -2
- package/bullet.d.ts +2 -2
- package/bullet.js +2 -2
- package/button-group.d.ts +3 -2
- package/button-group.js +3 -2
- package/button.d.ts +2 -2
- package/button.js +2 -2
- package/calendar.d.ts +3 -2
- package/calendar.js +3 -2
- package/chart.d.ts +3 -2
- package/chart.js +3 -2
- package/check-box.d.ts +3 -2
- package/check-box.js +3 -2
- package/circular-gauge.d.ts +3 -2
- package/circular-gauge.js +3 -2
- package/color-box.d.ts +3 -2
- package/color-box.js +3 -2
- package/context-menu.d.ts +3 -2
- package/context-menu.js +3 -2
- package/core/component-base.d.ts +3 -2
- package/core/component-base.js +3 -3
- package/core/component.d.ts +2 -2
- package/core/component.js +2 -2
- package/core/config.d.ts +2 -2
- package/core/config.js +2 -2
- package/core/configuration/comparer.d.ts +2 -2
- package/core/configuration/comparer.js +2 -2
- package/core/configuration/config-node.d.ts +2 -2
- package/core/configuration/config-node.js +2 -2
- package/core/configuration/react/element.d.ts +2 -2
- package/core/configuration/react/element.js +2 -2
- package/core/configuration/react/templates.d.ts +2 -2
- package/core/configuration/react/templates.js +2 -2
- package/core/configuration/react/tree.d.ts +2 -2
- package/core/configuration/react/tree.js +2 -2
- package/core/configuration/tree.d.ts +2 -2
- package/core/configuration/tree.js +2 -2
- package/core/configuration/utils.d.ts +2 -2
- package/core/configuration/utils.js +2 -2
- package/core/dx-template.d.ts +2 -2
- package/core/dx-template.js +2 -2
- package/core/extension-component.d.ts +2 -2
- package/core/extension-component.js +2 -2
- package/core/helpers.d.ts +2 -2
- package/core/helpers.js +2 -2
- package/core/nested-option.d.ts +2 -2
- package/core/nested-option.js +2 -2
- package/core/options-manager.d.ts +17 -16
- package/core/options-manager.js +58 -55
- package/core/template-wrapper.d.ts +2 -2
- package/core/template-wrapper.js +2 -2
- package/core/template.d.ts +2 -2
- package/core/template.js +2 -2
- package/core/templates-manager.d.ts +2 -2
- package/core/templates-manager.js +2 -2
- package/core/templates-renderer.d.ts +2 -2
- package/core/templates-renderer.js +2 -2
- package/core/templates-store.d.ts +2 -2
- package/core/templates-store.js +2 -2
- package/core/widget-config.d.ts +2 -2
- package/core/widget-config.js +2 -2
- package/data-grid.d.ts +3 -2
- package/data-grid.js +3 -2
- package/date-box.d.ts +3 -2
- package/date-box.js +3 -2
- package/defer-rendering.d.ts +2 -2
- package/defer-rendering.js +2 -2
- package/diagram.d.ts +2 -2
- package/diagram.js +2 -2
- package/draggable.d.ts +2 -2
- package/draggable.js +2 -2
- package/drawer.d.ts +3 -2
- package/drawer.js +3 -2
- package/drop-down-box.d.ts +4 -27
- package/drop-down-box.js +5 -22
- package/drop-down-button.d.ts +2 -2
- package/drop-down-button.js +2 -2
- package/file-manager.d.ts +2 -2
- package/file-manager.js +2 -2
- package/file-uploader.d.ts +3 -2
- package/file-uploader.js +3 -2
- package/filter-builder.d.ts +3 -2
- package/filter-builder.js +3 -2
- package/form.d.ts +3 -2
- package/form.js +3 -2
- package/funnel.d.ts +3 -2
- package/funnel.js +3 -2
- package/gallery.d.ts +3 -2
- package/gallery.js +3 -2
- package/gantt.d.ts +3 -2
- package/gantt.js +2 -2
- package/html-editor.d.ts +3 -2
- package/html-editor.js +3 -2
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/linear-gauge.d.ts +3 -2
- package/linear-gauge.js +3 -2
- package/list.d.ts +3 -2
- package/list.js +3 -2
- package/load-indicator.d.ts +2 -2
- package/load-indicator.js +2 -2
- package/load-panel.d.ts +3 -2
- package/load-panel.js +3 -2
- package/lookup.d.ts +3 -2
- package/lookup.js +3 -2
- package/map.d.ts +14 -13
- package/map.js +18 -17
- package/menu.d.ts +3 -2
- package/menu.js +3 -2
- package/multi-view.d.ts +3 -2
- package/multi-view.js +3 -2
- package/nav-bar.d.ts +3 -2
- package/nav-bar.js +3 -2
- package/number-box.d.ts +3 -2
- package/number-box.js +3 -2
- package/package.json +3 -3
- package/pie-chart.d.ts +3 -2
- package/pie-chart.js +3 -2
- package/pivot-grid-field-chooser.d.ts +2 -2
- package/pivot-grid-field-chooser.js +2 -2
- package/pivot-grid.d.ts +2 -2
- package/pivot-grid.js +2 -2
- package/polar-chart.d.ts +3 -2
- package/polar-chart.js +3 -2
- package/popover.d.ts +3 -2
- package/popover.js +3 -2
- package/popup.d.ts +3 -2
- package/popup.js +3 -2
- package/progress-bar.d.ts +3 -2
- package/progress-bar.js +3 -2
- package/radio-group.d.ts +3 -2
- package/radio-group.js +3 -2
- package/range-selector.d.ts +3 -2
- package/range-selector.js +3 -2
- package/range-slider.d.ts +3 -2
- package/range-slider.js +3 -2
- package/recurrence-editor.d.ts +3 -2
- package/recurrence-editor.js +3 -2
- package/resizable.d.ts +3 -2
- package/resizable.js +3 -2
- package/responsive-box.d.ts +3 -2
- package/responsive-box.js +3 -2
- package/sankey.d.ts +3 -2
- package/sankey.js +3 -2
- package/scheduler.d.ts +3 -2
- package/scheduler.js +3 -2
- package/scroll-view.d.ts +2 -2
- package/scroll-view.js +2 -2
- package/select-box.d.ts +3 -2
- package/select-box.js +3 -2
- package/slide-out-view.d.ts +2 -2
- package/slide-out-view.js +2 -2
- package/slide-out.d.ts +3 -2
- package/slide-out.js +3 -2
- package/slider.d.ts +3 -2
- package/slider.js +3 -2
- package/sortable.d.ts +2 -2
- package/sortable.js +2 -2
- package/sparkline.d.ts +2 -2
- package/sparkline.js +2 -2
- package/speed-dial-action.d.ts +2 -2
- package/speed-dial-action.js +2 -2
- package/switch.d.ts +3 -2
- package/switch.js +3 -2
- package/tab-panel.d.ts +3 -2
- package/tab-panel.js +3 -2
- package/tabs.d.ts +3 -2
- package/tabs.js +3 -2
- package/tag-box.d.ts +3 -2
- package/tag-box.js +3 -2
- package/text-area.d.ts +3 -2
- package/text-area.js +3 -2
- package/text-box.d.ts +3 -2
- package/text-box.js +3 -2
- package/tile-view.d.ts +3 -2
- package/tile-view.js +3 -2
- package/toast.d.ts +3 -2
- package/toast.js +3 -2
- package/toolbar.d.ts +3 -2
- package/toolbar.js +3 -2
- package/tooltip.d.ts +3 -2
- package/tooltip.js +3 -2
- package/tree-list.d.ts +3 -2
- package/tree-list.js +3 -2
- package/tree-map.d.ts +3 -2
- package/tree-map.js +3 -2
- package/tree-view.d.ts +3 -2
- package/tree-view.js +3 -2
- package/ui/accordion.d.ts +2 -2
- package/ui/accordion.js +2 -2
- package/ui/action-sheet.d.ts +2 -2
- package/ui/action-sheet.js +2 -2
- package/ui/autocomplete.d.ts +2 -2
- package/ui/autocomplete.js +2 -2
- package/ui/bar-gauge.d.ts +2 -2
- package/ui/bar-gauge.js +2 -2
- package/ui/box.d.ts +2 -2
- package/ui/box.js +2 -2
- package/ui/bullet.d.ts +2 -2
- package/ui/bullet.js +2 -2
- package/ui/button-group.d.ts +2 -2
- package/ui/button-group.js +2 -2
- package/ui/button.d.ts +2 -2
- package/ui/button.js +2 -2
- package/ui/calendar.d.ts +2 -2
- package/ui/calendar.js +2 -2
- package/ui/chart.d.ts +2 -2
- package/ui/chart.js +2 -2
- package/ui/check-box.d.ts +2 -2
- package/ui/check-box.js +2 -2
- package/ui/circular-gauge.d.ts +2 -2
- package/ui/circular-gauge.js +2 -2
- package/ui/color-box.d.ts +2 -2
- package/ui/color-box.js +2 -2
- package/ui/context-menu.d.ts +2 -2
- package/ui/context-menu.js +2 -2
- package/ui/data-grid.d.ts +2 -2
- package/ui/data-grid.js +2 -2
- package/ui/date-box.d.ts +2 -2
- package/ui/date-box.js +2 -2
- package/ui/defer-rendering.d.ts +2 -2
- package/ui/defer-rendering.js +2 -2
- package/ui/diagram.d.ts +2 -2
- package/ui/diagram.js +2 -2
- package/ui/draggable.d.ts +2 -2
- package/ui/draggable.js +2 -2
- package/ui/drawer.d.ts +2 -2
- package/ui/drawer.js +2 -2
- package/ui/drop-down-box.d.ts +2 -2
- package/ui/drop-down-box.js +2 -2
- package/ui/drop-down-button.d.ts +2 -2
- package/ui/drop-down-button.js +2 -2
- package/ui/file-manager.d.ts +2 -2
- package/ui/file-manager.js +2 -2
- package/ui/file-uploader.d.ts +2 -2
- package/ui/file-uploader.js +2 -2
- package/ui/filter-builder.d.ts +2 -2
- package/ui/filter-builder.js +2 -2
- package/ui/form.d.ts +2 -2
- package/ui/form.js +2 -2
- package/ui/funnel.d.ts +2 -2
- package/ui/funnel.js +2 -2
- package/ui/gallery.d.ts +2 -2
- package/ui/gallery.js +2 -2
- package/ui/gantt.d.ts +2 -2
- package/ui/gantt.js +2 -2
- package/ui/html-editor.d.ts +2 -2
- package/ui/html-editor.js +2 -2
- package/ui/linear-gauge.d.ts +2 -2
- package/ui/linear-gauge.js +2 -2
- package/ui/list.d.ts +2 -2
- package/ui/list.js +2 -2
- package/ui/load-indicator.d.ts +2 -2
- package/ui/load-indicator.js +2 -2
- package/ui/load-panel.d.ts +2 -2
- package/ui/load-panel.js +2 -2
- package/ui/lookup.d.ts +2 -2
- package/ui/lookup.js +2 -2
- package/ui/map.d.ts +2 -2
- package/ui/map.js +2 -2
- package/ui/menu.d.ts +2 -2
- package/ui/menu.js +2 -2
- package/ui/multi-view.d.ts +2 -2
- package/ui/multi-view.js +2 -2
- package/ui/nav-bar.d.ts +2 -2
- package/ui/nav-bar.js +2 -2
- package/ui/number-box.d.ts +2 -2
- package/ui/number-box.js +2 -2
- package/ui/pie-chart.d.ts +2 -2
- package/ui/pie-chart.js +2 -2
- package/ui/pivot-grid-field-chooser.d.ts +2 -2
- package/ui/pivot-grid-field-chooser.js +2 -2
- package/ui/pivot-grid.d.ts +2 -2
- package/ui/pivot-grid.js +2 -2
- package/ui/polar-chart.d.ts +2 -2
- package/ui/polar-chart.js +2 -2
- package/ui/popover.d.ts +2 -2
- package/ui/popover.js +2 -2
- package/ui/popup.d.ts +2 -2
- package/ui/popup.js +2 -2
- package/ui/progress-bar.d.ts +2 -2
- package/ui/progress-bar.js +2 -2
- package/ui/radio-group.d.ts +2 -2
- package/ui/radio-group.js +2 -2
- package/ui/range-selector.d.ts +2 -2
- package/ui/range-selector.js +2 -2
- package/ui/range-slider.d.ts +2 -2
- package/ui/range-slider.js +2 -2
- package/ui/recurrence-editor.d.ts +2 -2
- package/ui/recurrence-editor.js +2 -2
- package/ui/resizable.d.ts +2 -2
- package/ui/resizable.js +2 -2
- package/ui/responsive-box.d.ts +2 -2
- package/ui/responsive-box.js +2 -2
- package/ui/sankey.d.ts +2 -2
- package/ui/sankey.js +2 -2
- package/ui/scheduler.d.ts +2 -2
- package/ui/scheduler.js +2 -2
- package/ui/scroll-view.d.ts +2 -2
- package/ui/scroll-view.js +2 -2
- package/ui/select-box.d.ts +2 -2
- package/ui/select-box.js +2 -2
- package/ui/slide-out-view.d.ts +2 -2
- package/ui/slide-out-view.js +2 -2
- package/ui/slide-out.d.ts +2 -2
- package/ui/slide-out.js +2 -2
- package/ui/slider.d.ts +2 -2
- package/ui/slider.js +2 -2
- package/ui/sortable.d.ts +2 -2
- package/ui/sortable.js +2 -2
- package/ui/sparkline.d.ts +2 -2
- package/ui/sparkline.js +2 -2
- package/ui/speed-dial-action.d.ts +2 -2
- package/ui/speed-dial-action.js +2 -2
- package/ui/switch.d.ts +2 -2
- package/ui/switch.js +2 -2
- package/ui/tab-panel.d.ts +2 -2
- package/ui/tab-panel.js +2 -2
- package/ui/tabs.d.ts +2 -2
- package/ui/tabs.js +2 -2
- package/ui/tag-box.d.ts +2 -2
- package/ui/tag-box.js +2 -2
- package/ui/text-area.d.ts +2 -2
- package/ui/text-area.js +2 -2
- package/ui/text-box.d.ts +2 -2
- package/ui/text-box.js +2 -2
- package/ui/tile-view.d.ts +2 -2
- package/ui/tile-view.js +2 -2
- package/ui/toast.d.ts +2 -2
- package/ui/toast.js +2 -2
- package/ui/toolbar.d.ts +2 -2
- package/ui/toolbar.js +2 -2
- package/ui/tooltip.d.ts +2 -2
- package/ui/tooltip.js +2 -2
- package/ui/tree-list.d.ts +2 -2
- package/ui/tree-list.js +2 -2
- package/ui/tree-map.d.ts +2 -2
- package/ui/tree-map.js +2 -2
- package/ui/tree-view.d.ts +2 -2
- package/ui/tree-view.js +2 -2
- package/ui/validation-group.d.ts +2 -2
- package/ui/validation-group.js +2 -2
- package/ui/validation-summary.d.ts +2 -2
- package/ui/validation-summary.js +2 -2
- package/ui/validator.d.ts +2 -2
- package/ui/validator.js +2 -2
- package/ui/vector-map.d.ts +2 -2
- package/ui/vector-map.js +2 -2
- package/validation-group.d.ts +2 -2
- package/validation-group.js +2 -2
- package/validation-summary.d.ts +3 -2
- package/validation-summary.js +3 -2
- package/validator.d.ts +2 -2
- package/validator.js +2 -2
- package/vector-map.d.ts +3 -2
- package/vector-map.js +3 -2
package/core/dx-template.d.ts
CHANGED
package/core/dx-template.js
CHANGED
package/core/helpers.d.ts
CHANGED
package/core/helpers.js
CHANGED
package/core/nested-option.d.ts
CHANGED
package/core/nested-option.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -14,26 +14,27 @@
|
|
|
14
14
|
import TemplatesManager from './templates-manager';
|
|
15
15
|
import { IConfigNode } from './configuration/config-node';
|
|
16
16
|
declare class OptionsManager {
|
|
17
|
-
private readonly
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
17
|
+
private readonly guards;
|
|
18
|
+
private templatesManager;
|
|
19
|
+
private instance;
|
|
20
|
+
private isUpdating;
|
|
21
|
+
private currentConfig;
|
|
22
|
+
private subscribableOptions;
|
|
23
23
|
constructor(templatesManager: TemplatesManager);
|
|
24
|
-
setInstance(instance: unknown, config: IConfigNode): void;
|
|
25
|
-
getInitialOptions(rootNode: IConfigNode): Record<string,
|
|
24
|
+
setInstance(instance: unknown, config: IConfigNode, subscribableOptions: string[]): void;
|
|
25
|
+
getInitialOptions(rootNode: IConfigNode): Record<string, unknown>;
|
|
26
26
|
update(config: IConfigNode): void;
|
|
27
27
|
onOptionChanged(e: {
|
|
28
28
|
name: string;
|
|
29
29
|
fullName: string;
|
|
30
|
-
value:
|
|
30
|
+
value: unknown;
|
|
31
31
|
}): void;
|
|
32
32
|
dispose(): void;
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
33
|
+
private isOptionSubscribable;
|
|
34
|
+
private callOptionChangeHandler;
|
|
35
|
+
private wrapOptionValue;
|
|
36
|
+
private setGuard;
|
|
37
|
+
private resetOption;
|
|
38
|
+
private setValue;
|
|
38
39
|
}
|
|
39
40
|
export { OptionsManager, };
|
package/core/options-manager.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -20,73 +20,70 @@ var utils_1 = require("./configuration/utils");
|
|
|
20
20
|
var helpers_1 = require("./helpers");
|
|
21
21
|
var OptionsManager = /** @class */ (function () {
|
|
22
22
|
function OptionsManager(templatesManager) {
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
this._templatesManager = templatesManager;
|
|
23
|
+
this.guards = {};
|
|
24
|
+
this.isUpdating = false;
|
|
25
|
+
this.templatesManager = templatesManager;
|
|
27
26
|
this.onOptionChanged = this.onOptionChanged.bind(this);
|
|
28
|
-
this.
|
|
27
|
+
this.wrapOptionValue = this.wrapOptionValue.bind(this);
|
|
29
28
|
}
|
|
30
|
-
OptionsManager.prototype.setInstance = function (instance, config) {
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
29
|
+
OptionsManager.prototype.setInstance = function (instance, config, subscribableOptions) {
|
|
30
|
+
this.instance = instance;
|
|
31
|
+
this.currentConfig = config;
|
|
32
|
+
this.subscribableOptions = new Set(subscribableOptions);
|
|
33
33
|
};
|
|
34
34
|
OptionsManager.prototype.getInitialOptions = function (rootNode) {
|
|
35
35
|
var _this = this;
|
|
36
36
|
var config = tree_1.buildConfig(rootNode, false);
|
|
37
37
|
Object.keys(config.templates).forEach(function (key) {
|
|
38
|
-
_this.
|
|
38
|
+
_this.templatesManager.add(key, config.templates[key]);
|
|
39
39
|
});
|
|
40
40
|
var options = {};
|
|
41
41
|
Object.keys(config.options).forEach(function (key) {
|
|
42
|
-
options[key] = _this.
|
|
42
|
+
options[key] = _this.wrapOptionValue(key, config.options[key]);
|
|
43
43
|
});
|
|
44
|
-
if (this.
|
|
44
|
+
if (this.templatesManager.templatesCount > 0) {
|
|
45
45
|
options.integrationOptions = {
|
|
46
|
-
templates: this.
|
|
46
|
+
templates: this.templatesManager.templates,
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
return options;
|
|
50
50
|
};
|
|
51
51
|
OptionsManager.prototype.update = function (config) {
|
|
52
52
|
var _this = this;
|
|
53
|
-
var changes = comparer_1.getChanges(config, this.
|
|
53
|
+
var changes = comparer_1.getChanges(config, this.currentConfig);
|
|
54
54
|
if (!changes.options && !changes.templates && !changes.removedOptions.length) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
57
|
+
this.instance.beginUpdate();
|
|
58
|
+
this.isUpdating = true;
|
|
59
59
|
changes.removedOptions.forEach(function (optionName) {
|
|
60
|
-
_this.
|
|
60
|
+
_this.resetOption(optionName);
|
|
61
61
|
});
|
|
62
62
|
Object.keys(changes.templates).forEach(function (key) {
|
|
63
|
-
_this.
|
|
63
|
+
_this.templatesManager.add(key, changes.templates[key]);
|
|
64
64
|
});
|
|
65
|
-
if (this.
|
|
66
|
-
this.
|
|
67
|
-
templates: this.
|
|
65
|
+
if (this.templatesManager.templatesCount > 0) {
|
|
66
|
+
this.setValue('integrationOptions', {
|
|
67
|
+
templates: this.templatesManager.templates,
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
Object.keys(changes.options).forEach(function (key) {
|
|
71
|
-
_this.
|
|
72
|
-
_this._setValue(key, changes.options[key]);
|
|
71
|
+
_this.setValue(key, changes.options[key]);
|
|
73
72
|
});
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
73
|
+
this.isUpdating = false;
|
|
74
|
+
this.instance.endUpdate();
|
|
75
|
+
this.currentConfig = config;
|
|
77
76
|
};
|
|
78
77
|
OptionsManager.prototype.onOptionChanged = function (e) {
|
|
79
78
|
var _this = this;
|
|
80
|
-
if (this.
|
|
79
|
+
if (this.isUpdating) {
|
|
81
80
|
return;
|
|
82
81
|
}
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
var valueDescriptor = tree_1.findValue(this.currentConfig, e.fullName.split('.'));
|
|
83
|
+
if (!valueDescriptor || valueDescriptor.value !== e.value) {
|
|
84
|
+
this.callOptionChangeHandler(e.fullName, e.value);
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
this._callOptionChangeHandler(e.fullName, e.value);
|
|
88
|
-
}
|
|
89
|
-
var valueDescriptor = tree_1.findValue(this._currentConfig, e.fullName.split('.'));
|
|
86
|
+
valueDescriptor = tree_1.findValue(this.currentConfig, e.fullName.split('.'));
|
|
90
87
|
if (!valueDescriptor) {
|
|
91
88
|
return;
|
|
92
89
|
}
|
|
@@ -96,24 +93,30 @@ var OptionsManager = /** @class */ (function () {
|
|
|
96
93
|
if (value[key] === e.value[key]) {
|
|
97
94
|
return;
|
|
98
95
|
}
|
|
99
|
-
_this.
|
|
96
|
+
_this.setGuard(utils_1.mergeNameParts(e.fullName, key), value[key]);
|
|
100
97
|
});
|
|
101
98
|
}
|
|
102
99
|
else {
|
|
103
100
|
if (value === e.value) {
|
|
104
101
|
return;
|
|
105
102
|
}
|
|
106
|
-
this.
|
|
103
|
+
this.setGuard(e.fullName, value);
|
|
107
104
|
}
|
|
108
105
|
};
|
|
109
106
|
OptionsManager.prototype.dispose = function () {
|
|
110
107
|
var _this = this;
|
|
111
|
-
Object.keys(this.
|
|
112
|
-
window.clearTimeout(_this.
|
|
113
|
-
delete _this.
|
|
108
|
+
Object.keys(this.guards).forEach(function (optionName) {
|
|
109
|
+
window.clearTimeout(_this.guards[optionName]);
|
|
110
|
+
delete _this.guards[optionName];
|
|
114
111
|
});
|
|
115
112
|
};
|
|
116
|
-
OptionsManager.prototype.
|
|
113
|
+
OptionsManager.prototype.isOptionSubscribable = function (optionName) {
|
|
114
|
+
return this.subscribableOptions.has(optionName);
|
|
115
|
+
};
|
|
116
|
+
OptionsManager.prototype.callOptionChangeHandler = function (optionName, optionValue) {
|
|
117
|
+
if (!this.isOptionSubscribable(optionName)) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
117
120
|
var parts = optionName.split('.');
|
|
118
121
|
var propName = parts[parts.length - 1];
|
|
119
122
|
if (propName.startsWith('on')) {
|
|
@@ -121,7 +124,7 @@ var OptionsManager = /** @class */ (function () {
|
|
|
121
124
|
}
|
|
122
125
|
var eventName = "on" + helpers_1.capitalizeFirstLetter(propName) + "Change";
|
|
123
126
|
parts[parts.length - 1] = eventName;
|
|
124
|
-
var changeEvent = tree_1.findValue(this.
|
|
127
|
+
var changeEvent = tree_1.findValue(this.currentConfig, parts);
|
|
125
128
|
if (!changeEvent) {
|
|
126
129
|
return;
|
|
127
130
|
}
|
|
@@ -130,7 +133,7 @@ var OptionsManager = /** @class */ (function () {
|
|
|
130
133
|
}
|
|
131
134
|
changeEvent.value(optionValue);
|
|
132
135
|
};
|
|
133
|
-
OptionsManager.prototype.
|
|
136
|
+
OptionsManager.prototype.wrapOptionValue = function (name, value) {
|
|
134
137
|
var _this = this;
|
|
135
138
|
if (name.substr(0, 2) === 'on' && typeof value === 'function') {
|
|
136
139
|
return function () {
|
|
@@ -138,34 +141,34 @@ var OptionsManager = /** @class */ (function () {
|
|
|
138
141
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
139
142
|
args[_i] = arguments[_i];
|
|
140
143
|
}
|
|
141
|
-
if (!_this.
|
|
144
|
+
if (!_this.isUpdating) {
|
|
142
145
|
value.apply(void 0, args);
|
|
143
146
|
}
|
|
144
147
|
};
|
|
145
148
|
}
|
|
146
149
|
return value;
|
|
147
150
|
};
|
|
148
|
-
OptionsManager.prototype.
|
|
151
|
+
OptionsManager.prototype.setGuard = function (optionName, optionValue) {
|
|
149
152
|
var _this = this;
|
|
150
|
-
if (this.
|
|
153
|
+
if (this.guards[optionName] !== undefined) {
|
|
151
154
|
return;
|
|
152
155
|
}
|
|
153
156
|
var guardId = window.setTimeout(function () {
|
|
154
|
-
_this.
|
|
157
|
+
_this.setValue(optionName, optionValue);
|
|
155
158
|
window.clearTimeout(guardId);
|
|
156
|
-
delete _this.
|
|
159
|
+
delete _this.guards[optionName];
|
|
157
160
|
});
|
|
158
|
-
this.
|
|
161
|
+
this.guards[optionName] = guardId;
|
|
159
162
|
};
|
|
160
|
-
OptionsManager.prototype.
|
|
161
|
-
this.
|
|
163
|
+
OptionsManager.prototype.resetOption = function (name) {
|
|
164
|
+
this.instance.resetOption(name);
|
|
162
165
|
};
|
|
163
|
-
OptionsManager.prototype.
|
|
164
|
-
if (this.
|
|
165
|
-
window.clearTimeout(this.
|
|
166
|
-
delete this.
|
|
166
|
+
OptionsManager.prototype.setValue = function (name, value) {
|
|
167
|
+
if (this.guards[name]) {
|
|
168
|
+
window.clearTimeout(this.guards[name]);
|
|
169
|
+
delete this.guards[name];
|
|
167
170
|
}
|
|
168
|
-
this.
|
|
171
|
+
this.instance.option(name, this.wrapOptionValue(name, value));
|
|
169
172
|
};
|
|
170
173
|
return OptionsManager;
|
|
171
174
|
}());
|
package/core/template-wrapper.js
CHANGED
package/core/template.d.ts
CHANGED
package/core/template.js
CHANGED
package/core/templates-store.js
CHANGED
package/core/widget-config.d.ts
CHANGED
package/core/widget-config.js
CHANGED
package/data-grid.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -45,6 +45,7 @@ interface IDataGridOptions extends IOptions, IHtmlOptions {
|
|
|
45
45
|
declare class DataGrid extends BaseComponent<IDataGridOptions> {
|
|
46
46
|
get instance(): dxDataGrid;
|
|
47
47
|
protected _WidgetClass: typeof dxDataGrid;
|
|
48
|
+
protected subscribableOptions: string[];
|
|
48
49
|
protected _defaults: {
|
|
49
50
|
defaultColumns: string;
|
|
50
51
|
defaultEditing: string;
|
package/data-grid.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -36,6 +36,7 @@ var DataGrid = /** @class */ (function (_super) {
|
|
|
36
36
|
function DataGrid() {
|
|
37
37
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
38
38
|
_this._WidgetClass = data_grid_1.default;
|
|
39
|
+
_this.subscribableOptions = ["columns", "editing", "filterPanel", "filterValue", "focusedColumnIndex", "focusedRowIndex", "focusedRowKey", "paging", "searchPanel", "selectedRowKeys", "selectionFilter"];
|
|
39
40
|
_this._defaults = {
|
|
40
41
|
defaultColumns: "columns",
|
|
41
42
|
defaultEditing: "editing",
|
package/date-box.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -27,6 +27,7 @@ interface IDateBoxOptions extends IOptions, IHtmlOptions {
|
|
|
27
27
|
declare class DateBox extends BaseComponent<IDateBoxOptions> {
|
|
28
28
|
get instance(): dxDateBox;
|
|
29
29
|
protected _WidgetClass: typeof dxDateBox;
|
|
30
|
+
protected subscribableOptions: string[];
|
|
30
31
|
protected _defaults: {
|
|
31
32
|
defaultOpened: string;
|
|
32
33
|
defaultValue: string;
|
package/date-box.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 20.2.4
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 20.2.4
|
|
4
|
+
* Build date: Tue Dec 01 2020
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -36,6 +36,7 @@ var DateBox = /** @class */ (function (_super) {
|
|
|
36
36
|
function DateBox() {
|
|
37
37
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
38
38
|
_this._WidgetClass = date_box_1.default;
|
|
39
|
+
_this.subscribableOptions = ["opened", "value"];
|
|
39
40
|
_this._defaults = {
|
|
40
41
|
defaultOpened: "opened",
|
|
41
42
|
defaultValue: "value"
|