devextreme-react 24.1.3 → 24.1.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/cjs/accordion.d.ts +2 -2
- package/cjs/accordion.js +2 -2
- package/cjs/action-sheet.d.ts +2 -2
- package/cjs/action-sheet.js +2 -2
- package/cjs/autocomplete.d.ts +2 -2
- package/cjs/autocomplete.js +2 -2
- package/cjs/bar-gauge.d.ts +2 -2
- package/cjs/bar-gauge.js +2 -2
- package/cjs/box.d.ts +2 -2
- package/cjs/box.js +2 -2
- package/cjs/bullet.d.ts +2 -2
- package/cjs/bullet.js +2 -2
- package/cjs/button-group.d.ts +2 -2
- package/cjs/button-group.js +2 -2
- package/cjs/button.d.ts +2 -2
- package/cjs/button.js +2 -2
- package/cjs/calendar.d.ts +2 -2
- package/cjs/calendar.js +2 -2
- package/cjs/chart.d.ts +2 -2
- package/cjs/chart.js +2 -2
- package/cjs/check-box.d.ts +2 -2
- package/cjs/check-box.js +2 -2
- package/cjs/circular-gauge.d.ts +2 -2
- package/cjs/circular-gauge.js +2 -2
- package/cjs/color-box.d.ts +2 -2
- package/cjs/color-box.js +2 -2
- 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 +2 -2
- package/cjs/context-menu.js +2 -2
- package/cjs/core/component-base.d.ts +2 -2
- package/cjs/core/component-base.js +3 -3
- package/cjs/core/component.d.ts +2 -2
- package/cjs/core/component.js +2 -2
- package/cjs/core/config.d.ts +2 -2
- package/cjs/core/config.js +2 -2
- package/cjs/core/configuration/comparer.d.ts +2 -2
- package/cjs/core/configuration/comparer.js +2 -2
- 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 -2
- package/cjs/core/configuration/react/element.js +2 -2
- 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 +2 -2
- package/cjs/core/configuration/tree.d.ts +2 -2
- package/cjs/core/configuration/tree.js +2 -2
- package/cjs/core/configuration/utils.d.ts +2 -2
- package/cjs/core/configuration/utils.js +2 -2
- package/cjs/core/extension-component.d.ts +2 -2
- package/cjs/core/extension-component.js +2 -2
- package/cjs/core/helpers.d.ts +4 -4
- package/cjs/core/helpers.js +5 -7
- package/cjs/core/nested-option.d.ts +2 -2
- package/cjs/core/nested-option.js +2 -2
- package/cjs/core/options-manager.d.ts +2 -2
- package/cjs/core/options-manager.js +2 -2
- package/cjs/core/template-manager.d.ts +2 -2
- package/cjs/core/template-manager.js +27 -29
- package/cjs/core/template-wrapper.d.ts +2 -2
- package/cjs/core/template-wrapper.js +2 -2
- package/cjs/core/template.d.ts +2 -2
- package/cjs/core/template.js +2 -2
- 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 +2 -2
- package/cjs/data-grid.d.ts +2 -2
- package/cjs/data-grid.js +2 -2
- package/cjs/date-box.d.ts +2 -2
- package/cjs/date-box.js +2 -2
- package/cjs/date-range-box.d.ts +2 -2
- package/cjs/date-range-box.js +2 -2
- package/cjs/defer-rendering.d.ts +2 -2
- package/cjs/defer-rendering.js +2 -2
- package/cjs/diagram.d.ts +2 -2
- package/cjs/diagram.js +2 -2
- package/cjs/draggable.d.ts +2 -2
- package/cjs/draggable.js +2 -2
- package/cjs/drawer.d.ts +2 -2
- package/cjs/drawer.js +2 -2
- package/cjs/drop-down-box.d.ts +2 -2
- package/cjs/drop-down-box.js +2 -2
- package/cjs/drop-down-button.d.ts +2 -2
- package/cjs/drop-down-button.js +2 -2
- package/cjs/file-manager.d.ts +2 -2
- package/cjs/file-manager.js +2 -2
- package/cjs/file-uploader.d.ts +2 -2
- package/cjs/file-uploader.js +2 -2
- package/cjs/filter-builder.d.ts +2 -2
- package/cjs/filter-builder.js +2 -2
- package/cjs/form.d.ts +2 -2
- package/cjs/form.js +2 -2
- package/cjs/funnel.d.ts +2 -2
- package/cjs/funnel.js +2 -2
- package/cjs/gallery.d.ts +2 -2
- package/cjs/gallery.js +2 -2
- package/cjs/gantt.d.ts +2 -2
- package/cjs/gantt.js +2 -2
- package/cjs/html-editor.d.ts +2 -2
- package/cjs/html-editor.js +2 -2
- 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 +2 -2
- package/cjs/list.d.ts +2 -2
- package/cjs/list.js +2 -2
- package/cjs/load-indicator.d.ts +2 -2
- package/cjs/load-indicator.js +2 -2
- package/cjs/load-panel.d.ts +2 -2
- package/cjs/load-panel.js +2 -2
- package/cjs/lookup.d.ts +2 -2
- package/cjs/lookup.js +2 -2
- package/cjs/map.d.ts +2 -2
- package/cjs/map.js +2 -2
- package/cjs/menu.d.ts +2 -2
- package/cjs/menu.js +2 -2
- package/cjs/multi-view.d.ts +2 -2
- package/cjs/multi-view.js +2 -2
- package/cjs/number-box.d.ts +2 -2
- package/cjs/number-box.js +2 -2
- package/cjs/pie-chart.d.ts +2 -2
- package/cjs/pie-chart.js +2 -2
- package/cjs/pivot-grid-field-chooser.d.ts +2 -2
- package/cjs/pivot-grid-field-chooser.js +2 -2
- package/cjs/pivot-grid.d.ts +2 -2
- package/cjs/pivot-grid.js +2 -2
- package/cjs/polar-chart.d.ts +2 -2
- package/cjs/polar-chart.js +2 -2
- package/cjs/popover.d.ts +2 -2
- package/cjs/popover.js +2 -2
- package/cjs/popup.d.ts +2 -2
- package/cjs/popup.js +2 -2
- package/cjs/progress-bar.d.ts +2 -2
- package/cjs/progress-bar.js +2 -2
- package/cjs/radio-group.d.ts +2 -2
- package/cjs/radio-group.js +2 -2
- package/cjs/range-selector.d.ts +2 -2
- package/cjs/range-selector.js +2 -2
- package/cjs/range-slider.d.ts +2 -2
- package/cjs/range-slider.js +2 -2
- package/cjs/recurrence-editor.d.ts +2 -2
- package/cjs/recurrence-editor.js +2 -2
- package/cjs/resizable.d.ts +2 -2
- package/cjs/resizable.js +2 -2
- package/cjs/responsive-box.d.ts +2 -2
- package/cjs/responsive-box.js +2 -2
- package/cjs/sankey.d.ts +2 -2
- package/cjs/sankey.js +2 -2
- package/cjs/scheduler.d.ts +2 -2
- package/cjs/scheduler.js +2 -2
- package/cjs/scroll-view.d.ts +2 -2
- package/cjs/scroll-view.js +2 -2
- package/cjs/select-box.d.ts +2 -2
- package/cjs/select-box.js +2 -2
- package/cjs/slider.d.ts +2 -2
- package/cjs/slider.js +2 -2
- package/cjs/sortable.d.ts +2 -2
- package/cjs/sortable.js +2 -2
- package/cjs/sparkline.d.ts +2 -2
- package/cjs/sparkline.js +2 -2
- package/cjs/speed-dial-action.d.ts +2 -2
- package/cjs/speed-dial-action.js +2 -2
- package/cjs/splitter.d.ts +2 -2
- package/cjs/splitter.js +2 -2
- package/cjs/switch.d.ts +2 -2
- package/cjs/switch.js +2 -2
- package/cjs/tab-panel.d.ts +2 -2
- package/cjs/tab-panel.js +2 -2
- package/cjs/tabs.d.ts +2 -2
- package/cjs/tabs.js +2 -2
- package/cjs/tag-box.d.ts +2 -2
- package/cjs/tag-box.js +2 -2
- package/cjs/text-area.d.ts +2 -2
- package/cjs/text-area.js +2 -2
- package/cjs/text-box.d.ts +2 -2
- package/cjs/text-box.js +2 -2
- package/cjs/tile-view.d.ts +2 -2
- package/cjs/tile-view.js +2 -2
- package/cjs/toast.d.ts +2 -2
- package/cjs/toast.js +2 -2
- package/cjs/toolbar.d.ts +2 -2
- package/cjs/toolbar.js +2 -2
- package/cjs/tooltip.d.ts +2 -2
- package/cjs/tooltip.js +2 -2
- package/cjs/tree-list.d.ts +2 -2
- package/cjs/tree-list.js +2 -2
- package/cjs/tree-map.d.ts +2 -2
- package/cjs/tree-map.js +2 -2
- package/cjs/tree-view.d.ts +2 -2
- package/cjs/tree-view.js +2 -2
- package/cjs/validation-group.d.ts +2 -2
- package/cjs/validation-group.js +2 -2
- package/cjs/validation-summary.d.ts +2 -2
- package/cjs/validation-summary.js +2 -2
- package/cjs/validator.d.ts +2 -2
- package/cjs/validator.js +2 -2
- package/cjs/vector-map.d.ts +2 -2
- package/cjs/vector-map.js +2 -2
- package/esm/accordion.js +2 -2
- package/esm/action-sheet.js +2 -2
- package/esm/autocomplete.js +2 -2
- package/esm/bar-gauge.js +2 -2
- package/esm/box.js +2 -2
- package/esm/bullet.js +2 -2
- package/esm/button-group.js +2 -2
- package/esm/button.js +2 -2
- package/esm/calendar.js +2 -2
- package/esm/chart.js +2 -2
- package/esm/check-box.js +2 -2
- package/esm/circular-gauge.js +2 -2
- package/esm/color-box.js +2 -2
- 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 +2 -2
- package/esm/core/component-base.js +3 -3
- package/esm/core/component.js +2 -2
- package/esm/core/config.js +2 -2
- package/esm/core/configuration/comparer.js +2 -2
- package/esm/core/configuration/config-node.js +2 -2
- package/esm/core/configuration/react/element.js +2 -2
- package/esm/core/configuration/react/templates.js +2 -2
- package/esm/core/configuration/react/tree.js +2 -2
- package/esm/core/configuration/tree.js +2 -2
- package/esm/core/configuration/utils.js +2 -2
- package/esm/core/extension-component.js +2 -2
- package/esm/core/helpers.js +5 -7
- package/esm/core/nested-option.js +2 -2
- package/esm/core/options-manager.js +2 -2
- package/esm/core/template-manager.js +27 -29
- package/esm/core/template-wrapper.js +2 -2
- package/esm/core/template.js +2 -2
- package/esm/core/types.js +2 -2
- package/esm/core/widget-config.js +2 -2
- package/esm/data-grid.js +2 -2
- package/esm/date-box.js +2 -2
- package/esm/date-range-box.js +2 -2
- package/esm/defer-rendering.js +2 -2
- package/esm/diagram.js +2 -2
- package/esm/draggable.js +2 -2
- package/esm/drawer.js +2 -2
- package/esm/drop-down-box.js +2 -2
- package/esm/drop-down-button.js +2 -2
- package/esm/file-manager.js +2 -2
- package/esm/file-uploader.js +2 -2
- package/esm/filter-builder.js +2 -2
- package/esm/form.js +2 -2
- package/esm/funnel.js +2 -2
- package/esm/gallery.js +2 -2
- package/esm/gantt.js +2 -2
- package/esm/html-editor.js +2 -2
- package/esm/index.js +2 -2
- package/esm/linear-gauge.js +2 -2
- package/esm/list.js +2 -2
- package/esm/load-indicator.js +2 -2
- package/esm/load-panel.js +2 -2
- package/esm/lookup.js +2 -2
- package/esm/map.js +2 -2
- package/esm/menu.js +2 -2
- package/esm/multi-view.js +2 -2
- package/esm/number-box.js +2 -2
- package/esm/pie-chart.js +2 -2
- package/esm/pivot-grid-field-chooser.js +2 -2
- package/esm/pivot-grid.js +2 -2
- package/esm/polar-chart.js +2 -2
- package/esm/popover.js +2 -2
- package/esm/popup.js +2 -2
- package/esm/progress-bar.js +2 -2
- package/esm/radio-group.js +2 -2
- package/esm/range-selector.js +2 -2
- package/esm/range-slider.js +2 -2
- package/esm/recurrence-editor.js +2 -2
- package/esm/resizable.js +2 -2
- package/esm/responsive-box.js +2 -2
- package/esm/sankey.js +2 -2
- package/esm/scheduler.js +2 -2
- package/esm/scroll-view.js +2 -2
- package/esm/select-box.js +2 -2
- package/esm/slider.js +2 -2
- package/esm/sortable.js +2 -2
- package/esm/sparkline.js +2 -2
- package/esm/speed-dial-action.js +2 -2
- package/esm/splitter.js +2 -2
- package/esm/switch.js +2 -2
- package/esm/tab-panel.js +2 -2
- package/esm/tabs.js +2 -2
- package/esm/tag-box.js +2 -2
- package/esm/text-area.js +2 -2
- package/esm/text-box.js +2 -2
- package/esm/tile-view.js +2 -2
- package/esm/toast.js +2 -2
- package/esm/toolbar.js +2 -2
- package/esm/tooltip.js +2 -2
- package/esm/tree-list.js +2 -2
- package/esm/tree-map.js +2 -2
- package/esm/tree-view.js +2 -2
- package/esm/validation-group.js +2 -2
- package/esm/validation-summary.js +2 -2
- package/esm/validator.js +2 -2
- package/esm/vector-map.js +2 -2
- package/package.json +2 -2
package/esm/common/grids.js
CHANGED
package/esm/common/index.js
CHANGED
package/esm/context-menu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 24.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 24.1.4
|
|
4
|
+
* Build date: Mon Jul 15 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -45,7 +45,7 @@ const ComponentBase = forwardRef((props, ref) => {
|
|
|
45
45
|
const updateTemplates = useRef();
|
|
46
46
|
const prevPropsRef = useRef();
|
|
47
47
|
const restoreTree = useCallback(() => {
|
|
48
|
-
if (childNodes.current?.length && element.current) {
|
|
48
|
+
if (childElementsDetached.current && childNodes.current?.length && element.current) {
|
|
49
49
|
element.current.append(...childNodes.current);
|
|
50
50
|
childElementsDetached.current = false;
|
|
51
51
|
}
|
package/esm/core/component.js
CHANGED
package/esm/core/config.js
CHANGED
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.4
|
|
4
|
+
* Build date: Mon Jul 15 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -45,14 +45,12 @@ export class DoubleKeyMap {
|
|
|
45
45
|
this._map.delete(key1);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
clear() {
|
|
49
|
+
this._map.clear();
|
|
50
|
+
}
|
|
48
51
|
get empty() {
|
|
49
52
|
return this._map.size === 0;
|
|
50
53
|
}
|
|
51
|
-
shallowCopy() {
|
|
52
|
-
const copy = new DoubleKeyMap();
|
|
53
|
-
copy._map = this._map;
|
|
54
|
-
return copy;
|
|
55
|
-
}
|
|
56
54
|
*[Symbol.iterator]() {
|
|
57
55
|
for (const [key1, innerMap] of this._map) {
|
|
58
56
|
for (const [key2, value] of innerMap) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* devextreme-react
|
|
3
|
-
* Version: 24.1.
|
|
4
|
-
* Build date:
|
|
3
|
+
* Version: 24.1.4
|
|
4
|
+
* Build date: Mon Jul 15 2024
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
*
|
|
@@ -29,7 +29,9 @@ function normalizeProps(props) {
|
|
|
29
29
|
return props;
|
|
30
30
|
}
|
|
31
31
|
export const TemplateManager = ({ init }) => {
|
|
32
|
-
const [instantiationModels, setInstantiationModels] = useState(
|
|
32
|
+
const [instantiationModels, setInstantiationModels] = useState({
|
|
33
|
+
collection: new TemplateInstantiationModels(),
|
|
34
|
+
});
|
|
33
35
|
const [updateContext, setUpdateContext] = useState();
|
|
34
36
|
const widgetId = useRef('');
|
|
35
37
|
const templateFactories = useRef({});
|
|
@@ -46,37 +48,32 @@ export const TemplateManager = ({ init }) => {
|
|
|
46
48
|
const unwrapElement = useCallback((element) => (element.get ? element.get(0) : element), []);
|
|
47
49
|
const createMapKey = useCallback((key1, key2) => ({ key1, key2 }), []);
|
|
48
50
|
const getRandomId = useCallback(() => `${generateID()}${generateID()}${generateID()}`, []);
|
|
51
|
+
const { collection } = instantiationModels;
|
|
49
52
|
const getRenderFunc = useCallback((templateKey) => ({ model: data, index, container, onRendered, }) => {
|
|
50
53
|
const containerElement = unwrapElement(container);
|
|
51
54
|
const key = createMapKey(data, containerElement);
|
|
52
55
|
const onRemoved = () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return currentInstantiationModels.shallowCopy();
|
|
58
|
-
}
|
|
59
|
-
return currentInstantiationModels;
|
|
60
|
-
});
|
|
56
|
+
if (collection.get(key)) {
|
|
57
|
+
collection.delete(key);
|
|
58
|
+
setInstantiationModels({ collection });
|
|
59
|
+
}
|
|
61
60
|
};
|
|
62
61
|
const hostWidgetId = widgetId.current;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
onRemoved,
|
|
75
|
-
});
|
|
76
|
-
return currentInstantiationModels.shallowCopy();
|
|
62
|
+
collection.set(key, {
|
|
63
|
+
templateKey,
|
|
64
|
+
index,
|
|
65
|
+
componentKey: getRandomId(),
|
|
66
|
+
onRendered: () => {
|
|
67
|
+
unsubscribeOnRemoval(containerElement, onRemoved);
|
|
68
|
+
if (hostWidgetId === widgetId.current) {
|
|
69
|
+
onRendered?.();
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
onRemoved,
|
|
77
73
|
});
|
|
74
|
+
setInstantiationModels({ collection });
|
|
78
75
|
return containerElement;
|
|
79
|
-
}, [unsubscribeOnRemoval, createMapKey]);
|
|
76
|
+
}, [unsubscribeOnRemoval, createMapKey, collection]);
|
|
80
77
|
useMemo(() => {
|
|
81
78
|
function getTemplateFunction(template) {
|
|
82
79
|
switch (template.type) {
|
|
@@ -108,7 +105,8 @@ export const TemplateManager = ({ init }) => {
|
|
|
108
105
|
}
|
|
109
106
|
function clearInstantiationModels() {
|
|
110
107
|
widgetId.current = getRandomId();
|
|
111
|
-
|
|
108
|
+
instantiationModels.collection.clear();
|
|
109
|
+
setInstantiationModels({ ...instantiationModels });
|
|
112
110
|
}
|
|
113
111
|
function updateTemplates(onUpdated) {
|
|
114
112
|
setUpdateContext({ onUpdated });
|
|
@@ -120,10 +118,10 @@ export const TemplateManager = ({ init }) => {
|
|
|
120
118
|
updateContext.onUpdated();
|
|
121
119
|
}
|
|
122
120
|
}, [updateContext]);
|
|
123
|
-
if (instantiationModels.empty) {
|
|
121
|
+
if (instantiationModels.collection.empty) {
|
|
124
122
|
return null;
|
|
125
123
|
}
|
|
126
|
-
return (React.createElement(React.Fragment, null, Array.from(instantiationModels).map(([{ key1: data, key2: container }, { index, templateKey, componentKey, onRendered, onRemoved, }]) => {
|
|
124
|
+
return (React.createElement(React.Fragment, null, Array.from(instantiationModels.collection).map(([{ key1: data, key2: container }, { index, templateKey, componentKey, onRendered, onRemoved, }]) => {
|
|
127
125
|
subscribeOnRemoval(container, onRemoved);
|
|
128
126
|
const factory = templateFactories.current[templateKey];
|
|
129
127
|
if (factory) {
|
package/esm/core/template.js
CHANGED
package/esm/core/types.js
CHANGED
package/esm/data-grid.js
CHANGED
package/esm/date-box.js
CHANGED
package/esm/date-range-box.js
CHANGED
package/esm/defer-rendering.js
CHANGED
package/esm/diagram.js
CHANGED
package/esm/draggable.js
CHANGED
package/esm/drawer.js
CHANGED
package/esm/drop-down-box.js
CHANGED
package/esm/drop-down-button.js
CHANGED
package/esm/file-manager.js
CHANGED
package/esm/file-uploader.js
CHANGED
package/esm/filter-builder.js
CHANGED
package/esm/form.js
CHANGED
package/esm/funnel.js
CHANGED
package/esm/gallery.js
CHANGED
package/esm/gantt.js
CHANGED
package/esm/html-editor.js
CHANGED
package/esm/index.js
CHANGED
package/esm/linear-gauge.js
CHANGED
package/esm/list.js
CHANGED
package/esm/load-indicator.js
CHANGED
package/esm/load-panel.js
CHANGED
package/esm/lookup.js
CHANGED
package/esm/map.js
CHANGED