devextreme-react 23.2.1-alpha-23255-1813 → 23.2.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.
Files changed (323) hide show
  1. package/cjs/accordion.d.ts +2 -2
  2. package/cjs/accordion.js +3 -2
  3. package/cjs/action-sheet.d.ts +2 -2
  4. package/cjs/action-sheet.js +3 -2
  5. package/cjs/autocomplete.d.ts +2 -2
  6. package/cjs/autocomplete.js +5 -3
  7. package/cjs/bar-gauge.d.ts +22 -22
  8. package/cjs/bar-gauge.js +3 -2
  9. package/cjs/box.d.ts +3 -3
  10. package/cjs/box.js +3 -2
  11. package/cjs/bullet.d.ts +6 -6
  12. package/cjs/bullet.js +3 -2
  13. package/cjs/button-group.d.ts +2 -2
  14. package/cjs/button-group.js +3 -2
  15. package/cjs/button.d.ts +2 -2
  16. package/cjs/button.js +3 -2
  17. package/cjs/calendar.d.ts +4 -4
  18. package/cjs/calendar.js +19 -2
  19. package/cjs/chart.d.ts +133 -134
  20. package/cjs/chart.js +3 -2
  21. package/cjs/check-box.d.ts +2 -2
  22. package/cjs/check-box.js +3 -2
  23. package/cjs/circular-gauge.d.ts +15 -16
  24. package/cjs/circular-gauge.js +3 -2
  25. package/cjs/color-box.d.ts +2 -2
  26. package/cjs/color-box.js +5 -3
  27. package/cjs/common/charts.d.ts +3 -3
  28. package/cjs/common/charts.js +2 -2
  29. package/cjs/common/data/custom-store.d.ts +2 -2
  30. package/cjs/common/data/custom-store.js +2 -2
  31. package/cjs/common/grids.d.ts +2 -2
  32. package/cjs/common/grids.js +2 -2
  33. package/cjs/common/index.d.ts +2 -2
  34. package/cjs/common/index.js +2 -2
  35. package/cjs/context-menu.d.ts +2 -2
  36. package/cjs/context-menu.js +3 -2
  37. package/cjs/core/component-base.d.ts +14 -6
  38. package/cjs/core/component-base.js +84 -33
  39. package/cjs/core/component.d.ts +2 -2
  40. package/cjs/core/component.js +2 -2
  41. package/cjs/core/config.d.ts +2 -2
  42. package/cjs/core/config.js +2 -2
  43. package/cjs/core/configuration/comparer.d.ts +2 -2
  44. package/cjs/core/configuration/comparer.js +2 -2
  45. package/cjs/core/configuration/config-node.d.ts +2 -2
  46. package/cjs/core/configuration/config-node.js +2 -2
  47. package/cjs/core/configuration/react/element.d.ts +2 -2
  48. package/cjs/core/configuration/react/element.js +2 -2
  49. package/cjs/core/configuration/react/templates.d.ts +2 -2
  50. package/cjs/core/configuration/react/templates.js +2 -2
  51. package/cjs/core/configuration/react/tree.d.ts +2 -2
  52. package/cjs/core/configuration/react/tree.js +2 -2
  53. package/cjs/core/configuration/tree.d.ts +2 -2
  54. package/cjs/core/configuration/tree.js +2 -2
  55. package/cjs/core/configuration/utils.d.ts +2 -2
  56. package/cjs/core/configuration/utils.js +2 -2
  57. package/cjs/core/extension-component.d.ts +2 -2
  58. package/cjs/core/extension-component.js +2 -2
  59. package/cjs/core/helpers.d.ts +14 -3
  60. package/cjs/core/helpers.js +155 -4
  61. package/cjs/core/nested-option.d.ts +2 -2
  62. package/cjs/core/nested-option.js +2 -2
  63. package/cjs/core/options-manager.d.ts +7 -7
  64. package/cjs/core/options-manager.js +33 -20
  65. package/cjs/core/template-manager.d.ts +16 -0
  66. package/cjs/core/template-manager.js +182 -0
  67. package/cjs/core/template-wrapper.d.ts +4 -29
  68. package/cjs/core/template-wrapper.js +94 -98
  69. package/cjs/core/template.d.ts +2 -2
  70. package/cjs/core/template.js +2 -2
  71. package/cjs/core/types.d.ts +69 -0
  72. package/cjs/core/types.js +15 -0
  73. package/cjs/core/widget-config.d.ts +2 -2
  74. package/cjs/core/widget-config.js +2 -2
  75. package/cjs/data-grid.d.ts +23 -30
  76. package/cjs/data-grid.js +3 -2
  77. package/cjs/date-box.d.ts +13 -13
  78. package/cjs/date-box.js +20 -3
  79. package/cjs/date-range-box.d.ts +17 -17
  80. package/cjs/date-range-box.js +25 -3
  81. package/cjs/defer-rendering.d.ts +5 -3
  82. package/cjs/defer-rendering.js +3 -2
  83. package/cjs/diagram.d.ts +2 -2
  84. package/cjs/diagram.js +3 -2
  85. package/cjs/draggable.d.ts +2 -2
  86. package/cjs/draggable.js +3 -2
  87. package/cjs/drawer.d.ts +2 -2
  88. package/cjs/drawer.js +3 -2
  89. package/cjs/drop-down-box.d.ts +2 -2
  90. package/cjs/drop-down-box.js +5 -3
  91. package/cjs/drop-down-button.d.ts +3 -10
  92. package/cjs/drop-down-button.js +12 -2
  93. package/cjs/file-manager.d.ts +2 -2
  94. package/cjs/file-manager.js +3 -2
  95. package/cjs/file-uploader.d.ts +2 -2
  96. package/cjs/file-uploader.js +3 -2
  97. package/cjs/filter-builder.d.ts +8 -8
  98. package/cjs/filter-builder.js +3 -2
  99. package/cjs/form.d.ts +8 -8
  100. package/cjs/form.js +3 -2
  101. package/cjs/funnel.d.ts +20 -20
  102. package/cjs/funnel.js +3 -2
  103. package/cjs/gallery.d.ts +2 -2
  104. package/cjs/gallery.js +3 -2
  105. package/cjs/gantt.d.ts +6 -6
  106. package/cjs/gantt.js +5 -2
  107. package/cjs/html-editor.d.ts +2 -2
  108. package/cjs/html-editor.js +3 -2
  109. package/cjs/index.d.ts +2 -2
  110. package/cjs/index.js +2 -2
  111. package/cjs/linear-gauge.d.ts +15 -16
  112. package/cjs/linear-gauge.js +3 -2
  113. package/cjs/list.d.ts +3 -3
  114. package/cjs/list.js +3 -2
  115. package/cjs/load-indicator.d.ts +2 -2
  116. package/cjs/load-indicator.js +3 -2
  117. package/cjs/load-panel.d.ts +2 -2
  118. package/cjs/load-panel.js +3 -2
  119. package/cjs/lookup.d.ts +2 -2
  120. package/cjs/lookup.js +5 -3
  121. package/cjs/map.d.ts +2 -2
  122. package/cjs/map.js +3 -2
  123. package/cjs/menu.d.ts +2 -2
  124. package/cjs/menu.js +3 -2
  125. package/cjs/multi-view.d.ts +2 -2
  126. package/cjs/multi-view.js +3 -2
  127. package/cjs/number-box.d.ts +4 -4
  128. package/cjs/number-box.js +5 -3
  129. package/cjs/pie-chart.d.ts +28 -29
  130. package/cjs/pie-chart.js +3 -2
  131. package/cjs/pivot-grid-field-chooser.d.ts +2 -2
  132. package/cjs/pivot-grid-field-chooser.js +3 -2
  133. package/cjs/pivot-grid.d.ts +2 -2
  134. package/cjs/pivot-grid.js +3 -2
  135. package/cjs/polar-chart.d.ts +95 -95
  136. package/cjs/polar-chart.js +3 -2
  137. package/cjs/popover.d.ts +2 -2
  138. package/cjs/popover.js +3 -2
  139. package/cjs/popup.d.ts +2 -2
  140. package/cjs/popup.js +3 -2
  141. package/cjs/progress-bar.d.ts +2 -2
  142. package/cjs/progress-bar.js +3 -2
  143. package/cjs/radio-group.d.ts +2 -2
  144. package/cjs/radio-group.js +3 -2
  145. package/cjs/range-selector.d.ts +49 -50
  146. package/cjs/range-selector.js +3 -2
  147. package/cjs/range-slider.d.ts +4 -4
  148. package/cjs/range-slider.js +3 -2
  149. package/cjs/recurrence-editor.d.ts +2 -2
  150. package/cjs/recurrence-editor.js +3 -2
  151. package/cjs/resizable.d.ts +2 -2
  152. package/cjs/resizable.js +3 -2
  153. package/cjs/responsive-box.d.ts +4 -4
  154. package/cjs/responsive-box.js +3 -2
  155. package/cjs/sankey.d.ts +11 -11
  156. package/cjs/sankey.js +3 -2
  157. package/cjs/scheduler.d.ts +6 -5
  158. package/cjs/scheduler.js +19 -2
  159. package/cjs/scroll-view.d.ts +2 -2
  160. package/cjs/scroll-view.js +3 -2
  161. package/cjs/select-box.d.ts +2 -2
  162. package/cjs/select-box.js +5 -3
  163. package/cjs/slider.d.ts +4 -4
  164. package/cjs/slider.js +3 -2
  165. package/cjs/sortable.d.ts +2 -2
  166. package/cjs/sortable.js +3 -2
  167. package/cjs/sparkline.d.ts +6 -6
  168. package/cjs/sparkline.js +3 -2
  169. package/cjs/speed-dial-action.d.ts +2 -2
  170. package/cjs/speed-dial-action.js +3 -2
  171. package/cjs/switch.d.ts +2 -2
  172. package/cjs/switch.js +3 -2
  173. package/cjs/tab-panel.d.ts +2 -2
  174. package/cjs/tab-panel.js +3 -2
  175. package/cjs/tabs.d.ts +2 -2
  176. package/cjs/tabs.js +3 -2
  177. package/cjs/tag-box.d.ts +2 -2
  178. package/cjs/tag-box.js +5 -3
  179. package/cjs/text-area.d.ts +2 -2
  180. package/cjs/text-area.js +5 -3
  181. package/cjs/text-box.d.ts +2 -2
  182. package/cjs/text-box.js +5 -3
  183. package/cjs/tile-view.d.ts +2 -2
  184. package/cjs/tile-view.js +3 -2
  185. package/cjs/toast.d.ts +2 -2
  186. package/cjs/toast.js +3 -2
  187. package/cjs/toolbar.d.ts +2 -2
  188. package/cjs/toolbar.js +3 -2
  189. package/cjs/tooltip.d.ts +2 -2
  190. package/cjs/tooltip.js +3 -2
  191. package/cjs/tree-list.d.ts +14 -14
  192. package/cjs/tree-list.js +3 -2
  193. package/cjs/tree-map.d.ts +15 -15
  194. package/cjs/tree-map.js +3 -2
  195. package/cjs/tree-view.d.ts +3 -3
  196. package/cjs/tree-view.js +3 -2
  197. package/cjs/validation-group.d.ts +2 -2
  198. package/cjs/validation-group.js +3 -2
  199. package/cjs/validation-summary.d.ts +2 -2
  200. package/cjs/validation-summary.js +3 -2
  201. package/cjs/validator.d.ts +8 -8
  202. package/cjs/validator.js +3 -2
  203. package/cjs/vector-map.d.ts +21 -21
  204. package/cjs/vector-map.js +3 -2
  205. package/core/component/package.json +6 -0
  206. package/core/config/package.json +6 -0
  207. package/core/extension-component/package.json +6 -0
  208. package/core/nested-option/package.json +6 -0
  209. package/esm/accordion.js +3 -2
  210. package/esm/action-sheet.js +3 -2
  211. package/esm/autocomplete.js +5 -3
  212. package/esm/bar-gauge.js +3 -2
  213. package/esm/box.js +3 -2
  214. package/esm/bullet.js +3 -2
  215. package/esm/button-group.js +3 -2
  216. package/esm/button.js +3 -2
  217. package/esm/calendar.js +19 -2
  218. package/esm/chart.js +3 -2
  219. package/esm/check-box.js +3 -2
  220. package/esm/circular-gauge.js +3 -2
  221. package/esm/color-box.js +5 -3
  222. package/esm/common/charts.js +2 -2
  223. package/esm/common/data/custom-store.js +2 -2
  224. package/esm/common/grids.js +2 -2
  225. package/esm/common/index.js +2 -2
  226. package/esm/context-menu.js +3 -2
  227. package/esm/core/component-base.js +85 -31
  228. package/esm/core/component.js +2 -2
  229. package/esm/core/config.js +2 -2
  230. package/esm/core/configuration/comparer.js +2 -2
  231. package/esm/core/configuration/config-node.js +2 -2
  232. package/esm/core/configuration/react/element.js +2 -2
  233. package/esm/core/configuration/react/templates.js +2 -2
  234. package/esm/core/configuration/react/tree.js +2 -2
  235. package/esm/core/configuration/tree.js +2 -2
  236. package/esm/core/configuration/utils.js +2 -2
  237. package/esm/core/extension-component.js +2 -2
  238. package/esm/core/helpers.js +154 -3
  239. package/esm/core/nested-option.js +2 -2
  240. package/esm/core/options-manager.js +33 -20
  241. package/esm/core/template-manager.js +159 -0
  242. package/esm/core/template-wrapper.js +94 -98
  243. package/esm/core/template.js +2 -2
  244. package/esm/core/types.js +14 -0
  245. package/esm/core/widget-config.js +2 -2
  246. package/esm/data-grid.js +3 -2
  247. package/esm/date-box.js +20 -3
  248. package/esm/date-range-box.js +25 -3
  249. package/esm/defer-rendering.js +3 -2
  250. package/esm/diagram.js +3 -2
  251. package/esm/draggable.js +3 -2
  252. package/esm/drawer.js +3 -2
  253. package/esm/drop-down-box.js +5 -3
  254. package/esm/drop-down-button.js +12 -2
  255. package/esm/file-manager.js +3 -2
  256. package/esm/file-uploader.js +3 -2
  257. package/esm/filter-builder.js +3 -2
  258. package/esm/form.js +3 -2
  259. package/esm/funnel.js +3 -2
  260. package/esm/gallery.js +3 -2
  261. package/esm/gantt.js +5 -2
  262. package/esm/html-editor.js +3 -2
  263. package/esm/index.js +2 -2
  264. package/esm/linear-gauge.js +3 -2
  265. package/esm/list.js +3 -2
  266. package/esm/load-indicator.js +3 -2
  267. package/esm/load-panel.js +3 -2
  268. package/esm/lookup.js +5 -3
  269. package/esm/map.js +3 -2
  270. package/esm/menu.js +3 -2
  271. package/esm/multi-view.js +3 -2
  272. package/esm/number-box.js +5 -3
  273. package/esm/pie-chart.js +3 -2
  274. package/esm/pivot-grid-field-chooser.js +3 -2
  275. package/esm/pivot-grid.js +3 -2
  276. package/esm/polar-chart.js +3 -2
  277. package/esm/popover.js +3 -2
  278. package/esm/popup.js +3 -2
  279. package/esm/progress-bar.js +3 -2
  280. package/esm/radio-group.js +3 -2
  281. package/esm/range-selector.js +3 -2
  282. package/esm/range-slider.js +3 -2
  283. package/esm/recurrence-editor.js +3 -2
  284. package/esm/resizable.js +3 -2
  285. package/esm/responsive-box.js +3 -2
  286. package/esm/sankey.js +3 -2
  287. package/esm/scheduler.js +19 -2
  288. package/esm/scroll-view.js +3 -2
  289. package/esm/select-box.js +5 -3
  290. package/esm/slider.js +3 -2
  291. package/esm/sortable.js +3 -2
  292. package/esm/sparkline.js +3 -2
  293. package/esm/speed-dial-action.js +3 -2
  294. package/esm/switch.js +3 -2
  295. package/esm/tab-panel.js +3 -2
  296. package/esm/tabs.js +3 -2
  297. package/esm/tag-box.js +5 -3
  298. package/esm/text-area.js +5 -3
  299. package/esm/text-box.js +5 -3
  300. package/esm/tile-view.js +3 -2
  301. package/esm/toast.js +3 -2
  302. package/esm/toolbar.js +3 -2
  303. package/esm/tooltip.js +3 -2
  304. package/esm/tree-list.js +3 -2
  305. package/esm/tree-map.js +3 -2
  306. package/esm/tree-view.js +3 -2
  307. package/esm/validation-group.js +3 -2
  308. package/esm/validation-summary.js +3 -2
  309. package/esm/validator.js +3 -2
  310. package/esm/vector-map.js +3 -2
  311. package/package.json +6 -7
  312. package/cjs/core/dx-template.d.ts +0 -26
  313. package/cjs/core/dx-template.js +0 -99
  314. package/cjs/core/templates-manager.d.ts +0 -25
  315. package/cjs/core/templates-manager.js +0 -88
  316. package/cjs/core/templates-renderer.d.ts +0 -28
  317. package/cjs/core/templates-renderer.js +0 -103
  318. package/cjs/core/templates-store.d.ts +0 -24
  319. package/cjs/core/templates-store.js +0 -50
  320. package/esm/core/dx-template.js +0 -77
  321. package/esm/core/templates-manager.js +0 -67
  322. package/esm/core/templates-renderer.js +0 -81
  323. package/esm/core/templates-store.js +0 -47
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -37,16 +37,38 @@ var __assign = (this && this.__assign) || function () {
37
37
  };
38
38
  return __assign.apply(this, arguments);
39
39
  };
40
+ var __read = (this && this.__read) || function (o, n) {
41
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
42
+ if (!m) return o;
43
+ var i = m.call(o), r, ar = [], e;
44
+ try {
45
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
46
+ }
47
+ catch (error) { e = { error: error }; }
48
+ finally {
49
+ try {
50
+ if (r && !r.done && (m = i["return"])) m.call(i);
51
+ }
52
+ finally { if (e) throw e.error; }
53
+ }
54
+ return ar;
55
+ };
56
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
57
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
58
+ to[j] = from[i];
59
+ return to;
60
+ };
40
61
  import * as events from 'devextreme/events';
41
62
  import * as React from 'react';
42
63
  import { createPortal } from 'react-dom';
43
- import TemplatesManager from './templates-manager';
44
- import { TemplatesRenderer } from './templates-renderer';
45
- import { TemplatesStore } from './templates-store';
64
+ import { requestAnimationFrame } from 'devextreme/animation/frame';
65
+ import { deferUpdate } from 'devextreme/core/utils/common';
66
+ import { TemplateManager } from './template-manager';
46
67
  import { OptionsManager, scheduleGuards, unscheduleGuards } from './options-manager';
47
68
  import { elementPropNames, getClassName } from './widget-config';
48
69
  import { buildConfigTree } from './configuration/react/tree';
49
70
  import { isIE } from './configuration/utils';
71
+ import { RemovalLockerContext } from './helpers';
50
72
  var DX_REMOVE_EVENT = 'dxremove';
51
73
  var ComponentBase = /** @class */ (function (_super) {
52
74
  __extends(ComponentBase, _super);
@@ -57,15 +79,10 @@ var ComponentBase = /** @class */ (function (_super) {
57
79
  _this._childNodes = [];
58
80
  _this.useRequestAnimationFrameFlag = false;
59
81
  _this.useDeferUpdateForTemplates = false;
60
- _this._setTemplatesRendererRef = _this._setTemplatesRendererRef.bind(_this);
82
+ _this.guardsUpdateScheduled = false;
61
83
  _this._createWidget = _this._createWidget.bind(_this);
62
- _this._templatesStore = new TemplatesStore(function () {
63
- if (_this._templatesRendererRef) {
64
- _this._templatesRendererRef.scheduleUpdate(_this.useDeferUpdateForTemplates);
65
- }
66
- });
67
- _this._templatesManager = new TemplatesManager(_this._templatesStore);
68
- _this._optionsManager = new OptionsManager(_this._templatesManager);
84
+ _this._setTemplateManagerHooks = _this._setTemplateManagerHooks.bind(_this);
85
+ _this._optionsManager = new OptionsManager();
69
86
  return _this;
70
87
  }
71
88
  ComponentBase.displayContentsStyle = function () {
@@ -83,7 +100,7 @@ var ComponentBase = /** @class */ (function (_super) {
83
100
  var _b;
84
101
  var style = this.props.style;
85
102
  if ((_b = this._childNodes) === null || _b === void 0 ? void 0 : _b.length) {
86
- (_a = this._element).append.apply(_a, this._childNodes);
103
+ (_a = this._element).append.apply(_a, __spreadArray([], __read(this._childNodes)));
87
104
  }
88
105
  else if (this._element.childNodes.length) {
89
106
  this._childNodes = Array.from(this._element.childNodes);
@@ -94,33 +111,60 @@ var ComponentBase = /** @class */ (function (_super) {
94
111
  }
95
112
  };
96
113
  ComponentBase.prototype.componentDidUpdate = function (prevProps) {
114
+ var _a;
97
115
  this._updateCssClasses(prevProps, this.props);
98
116
  var config = this._getConfig();
99
- this._optionsManager.update(config);
100
- if (this._templatesRendererRef) {
101
- this._templatesRendererRef.scheduleUpdate(this.useDeferUpdateForTemplates, scheduleGuards);
102
- }
103
- unscheduleGuards();
117
+ var templateOptions = this._optionsManager.getTemplateOptions(config);
118
+ var dxTemplates = ((_a = this._createDXTemplates) === null || _a === void 0 ? void 0 : _a.call(this, templateOptions)) || {};
119
+ this._optionsManager.update(config, dxTemplates);
120
+ this._scheduleTemplatesUpdate();
104
121
  };
105
122
  ComponentBase.prototype.componentWillUnmount = function () {
106
123
  var _a;
124
+ this._lockParentOnRemoved();
107
125
  if (this._instance) {
126
+ var dxRemoveArgs = { isUnmounting: true };
108
127
  (_a = this._childNodes) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(child); });
109
- events.triggerHandler(this._element, DX_REMOVE_EVENT);
128
+ events.triggerHandler(this._element, DX_REMOVE_EVENT, dxRemoveArgs);
110
129
  this._instance.dispose();
111
130
  }
112
131
  this._optionsManager.dispose();
132
+ this._unlockParentOnRemoved();
113
133
  };
114
134
  ComponentBase.prototype._createWidget = function (element) {
135
+ var _a, _b;
115
136
  element = element || this._element;
116
137
  var config = this._getConfig();
117
- this._instance = new this._WidgetClass(element, __assign({ templatesRenderAsynchronously: true }, this._optionsManager.getInitialOptions(config)));
138
+ var options = __assign({ templatesRenderAsynchronously: true }, this._optionsManager.getInitialOptions(config));
139
+ var templateOptions = this._optionsManager.getTemplateOptions(config);
140
+ var dxTemplates = (_a = this._createDXTemplates) === null || _a === void 0 ? void 0 : _a.call(this, templateOptions);
141
+ if (dxTemplates && Object.keys(dxTemplates).length) {
142
+ options = __assign(__assign({}, options), { integrationOptions: {
143
+ templates: dxTemplates,
144
+ } });
145
+ }
146
+ (_b = this._clearInstantiationModels) === null || _b === void 0 ? void 0 : _b.call(this);
147
+ this._instance = new this._WidgetClass(element, options);
118
148
  if (!this.useRequestAnimationFrameFlag) {
119
149
  this.useDeferUpdateForTemplates = this._instance.option('integrationOptions.useDeferUpdateForTemplates');
120
150
  }
121
151
  this._optionsManager.setInstance(this._instance, config, this.subscribableOptions, this.independentEvents);
122
152
  this._instance.on('optionChanged', this._optionsManager.onOptionChanged);
123
153
  };
154
+ ComponentBase.prototype._scheduleTemplatesUpdate = function () {
155
+ var _this = this;
156
+ if (this.guardsUpdateScheduled) {
157
+ return;
158
+ }
159
+ this.guardsUpdateScheduled = true;
160
+ var updateFunc = this.useDeferUpdateForTemplates ? deferUpdate : requestAnimationFrame;
161
+ updateFunc(function () {
162
+ var _a;
163
+ _this.guardsUpdateScheduled = false;
164
+ (_a = _this._updateTemplates) === null || _a === void 0 ? void 0 : _a.call(_this, function () { return scheduleGuards(); });
165
+ });
166
+ unscheduleGuards();
167
+ };
124
168
  ComponentBase.prototype._getConfig = function () {
125
169
  return buildConfigTree({
126
170
  templates: this._templateProps,
@@ -129,9 +173,6 @@ var ComponentBase = /** @class */ (function (_super) {
129
173
  expectedChildren: this._expectedChildren,
130
174
  }, this.props);
131
175
  };
132
- ComponentBase.prototype._setTemplatesRendererRef = function (instance) {
133
- this._templatesRendererRef = instance;
134
- };
135
176
  ComponentBase.prototype._getElementProps = function () {
136
177
  var _this = this;
137
178
  var elementProps = {
@@ -148,7 +189,7 @@ var ComponentBase = /** @class */ (function (_super) {
148
189
  ComponentBase.prototype._setInlineStyles = function (styles) {
149
190
  var _this = this;
150
191
  Object.entries(styles).forEach(function (_a) {
151
- var name = _a[0], value = _a[1];
192
+ var _b = __read(_a, 2), name = _b[0], value = _b[1];
152
193
  _this._element.style[name] = value;
153
194
  });
154
195
  };
@@ -162,16 +203,30 @@ var ComponentBase = /** @class */ (function (_super) {
162
203
  if (prevClassName) {
163
204
  var classNames = prevClassName.split(' ').filter(function (c) { return c; });
164
205
  if (classNames.length) {
165
- (_a = this._element.classList).remove.apply(_a, classNames);
206
+ (_a = this._element.classList).remove.apply(_a, __spreadArray([], __read(classNames)));
166
207
  }
167
208
  }
168
209
  if (newClassName) {
169
210
  var classNames = newClassName.split(' ').filter(function (c) { return c; });
170
211
  if (classNames.length) {
171
- (_b = this._element.classList).add.apply(_b, classNames);
212
+ (_b = this._element.classList).add.apply(_b, __spreadArray([], __read(classNames)));
172
213
  }
173
214
  }
174
215
  };
216
+ ComponentBase.prototype._lockParentOnRemoved = function () {
217
+ var _a;
218
+ (_a = this.context) === null || _a === void 0 ? void 0 : _a.lock();
219
+ };
220
+ ComponentBase.prototype._unlockParentOnRemoved = function () {
221
+ var _a;
222
+ (_a = this.context) === null || _a === void 0 ? void 0 : _a.unlock();
223
+ };
224
+ ComponentBase.prototype._setTemplateManagerHooks = function (_a) {
225
+ var createDXTemplates = _a.createDXTemplates, clearInstantiationModels = _a.clearInstantiationModels, updateTemplates = _a.updateTemplates;
226
+ this._createDXTemplates = createDXTemplates;
227
+ this._clearInstantiationModels = clearInstantiationModels;
228
+ this._updateTemplates = updateTemplates;
229
+ };
175
230
  ComponentBase.prototype.renderChildren = function () {
176
231
  // @ts-expect-error TS2339
177
232
  var children = this.props.children;
@@ -194,15 +249,14 @@ var ComponentBase = /** @class */ (function (_super) {
194
249
  : this.renderChildren();
195
250
  };
196
251
  ComponentBase.prototype.renderPortal = function () {
197
- // @ts-expect-error TS2322
198
252
  return this.portalContainer && createPortal(this.renderChildren(), this.portalContainer);
199
253
  };
200
254
  ComponentBase.prototype.render = function () {
201
- return React.createElement(React.Fragment, {}, React.createElement('div', this._getElementProps(), this.renderContent(), React.createElement(TemplatesRenderer, {
202
- templatesStore: this._templatesStore,
203
- ref: this._setTemplatesRendererRef,
255
+ return React.createElement(React.Fragment, {}, React.createElement('div', this._getElementProps(), this.renderContent(), React.createElement(TemplateManager, {
256
+ init: this._setTemplateManagerHooks,
204
257
  })), this.isPortalComponent && this.renderPortal());
205
258
  };
259
+ ComponentBase.contextType = RemovalLockerContext;
206
260
  return ComponentBase;
207
261
  }(React.PureComponent));
208
262
  export { ComponentBase, DX_REMOVE_EVENT, };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -11,8 +11,83 @@
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 (_) 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
+ /* eslint-disable max-classes-per-file, no-restricted-syntax */
84
+ import { createContext } from 'react';
85
+ export var RemovalLockerContext = createContext({
86
+ lock: function () { return undefined; },
87
+ unlock: function () { return undefined; },
88
+ });
14
89
  export function generateID() {
15
- return Math.random().toString(36).substr(2);
90
+ return Math.random().toString(36).substring(2);
16
91
  }
17
92
  var DoubleKeyMap = /** @class */ (function () {
18
93
  function DoubleKeyMap() {
@@ -43,9 +118,85 @@ var DoubleKeyMap = /** @class */ (function () {
43
118
  this._map.delete(key1);
44
119
  }
45
120
  };
121
+ Object.defineProperty(DoubleKeyMap.prototype, "empty", {
122
+ get: function () {
123
+ return this._map.size === 0;
124
+ },
125
+ enumerable: false,
126
+ configurable: true
127
+ });
128
+ DoubleKeyMap.prototype.shallowCopy = function () {
129
+ var copy = new DoubleKeyMap();
130
+ copy._map = this._map;
131
+ return copy;
132
+ };
133
+ DoubleKeyMap.prototype[Symbol.iterator] = function () {
134
+ var _a, _b, _c, key1, innerMap, innerMap_1, innerMap_1_1, _d, key2, value, e_1_1, e_2_1;
135
+ var e_2, _e, e_1, _f;
136
+ return __generator(this, function (_g) {
137
+ switch (_g.label) {
138
+ case 0:
139
+ _g.trys.push([0, 11, 12, 13]);
140
+ _a = __values(this._map), _b = _a.next();
141
+ _g.label = 1;
142
+ case 1:
143
+ if (!!_b.done) return [3 /*break*/, 10];
144
+ _c = __read(_b.value, 2), key1 = _c[0], innerMap = _c[1];
145
+ _g.label = 2;
146
+ case 2:
147
+ _g.trys.push([2, 7, 8, 9]);
148
+ innerMap_1 = (e_1 = void 0, __values(innerMap)), innerMap_1_1 = innerMap_1.next();
149
+ _g.label = 3;
150
+ case 3:
151
+ if (!!innerMap_1_1.done) return [3 /*break*/, 6];
152
+ _d = __read(innerMap_1_1.value, 2), key2 = _d[0], value = _d[1];
153
+ return [4 /*yield*/, [{ key1: key1, key2: key2 }, value]];
154
+ case 4:
155
+ _g.sent();
156
+ _g.label = 5;
157
+ case 5:
158
+ innerMap_1_1 = innerMap_1.next();
159
+ return [3 /*break*/, 3];
160
+ case 6: return [3 /*break*/, 9];
161
+ case 7:
162
+ e_1_1 = _g.sent();
163
+ e_1 = { error: e_1_1 };
164
+ return [3 /*break*/, 9];
165
+ case 8:
166
+ try {
167
+ if (innerMap_1_1 && !innerMap_1_1.done && (_f = innerMap_1.return)) _f.call(innerMap_1);
168
+ }
169
+ finally { if (e_1) throw e_1.error; }
170
+ return [7 /*endfinally*/];
171
+ case 9:
172
+ _b = _a.next();
173
+ return [3 /*break*/, 1];
174
+ case 10: return [3 /*break*/, 13];
175
+ case 11:
176
+ e_2_1 = _g.sent();
177
+ e_2 = { error: e_2_1 };
178
+ return [3 /*break*/, 13];
179
+ case 12:
180
+ try {
181
+ if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
182
+ }
183
+ finally { if (e_2) throw e_2.error; }
184
+ return [7 /*endfinally*/];
185
+ case 13: return [2 /*return*/];
186
+ }
187
+ });
188
+ };
46
189
  return DoubleKeyMap;
47
190
  }());
48
191
  export { DoubleKeyMap };
192
+ var TemplateInstantiationModels = /** @class */ (function (_super) {
193
+ __extends(TemplateInstantiationModels, _super);
194
+ function TemplateInstantiationModels() {
195
+ return _super !== null && _super.apply(this, arguments) || this;
196
+ }
197
+ return TemplateInstantiationModels;
198
+ }(DoubleKeyMap));
199
+ export { TemplateInstantiationModels };
49
200
  export function capitalizeFirstLetter(text) {
50
201
  if (text.length) {
51
202
  return "" + text[0].toUpperCase() + text.substr(1);
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 23.2.1-alpha-23255-1813
4
- * Build date: Tue Sep 12 2023
3
+ * Version: 23.2.3
4
+ * Build date: Tue Nov 28 2023
5
5
  *
6
6
  * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
7
7
  *
@@ -11,6 +11,27 @@
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) {
31
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
32
+ to[j] = from[i];
33
+ return to;
34
+ };
14
35
  /* eslint-disable no-restricted-globals */
15
36
  import { getChanges } from './configuration/comparer';
16
37
  import { buildConfig, findValue, ValueType } from './configuration/tree';
@@ -28,10 +49,9 @@ export function scheduleGuards() {
28
49
  });
29
50
  }
30
51
  var OptionsManager = /** @class */ (function () {
31
- function OptionsManager(templatesManager) {
52
+ function OptionsManager() {
32
53
  this.guards = {};
33
54
  this.isUpdating = false;
34
- this.templatesManager = templatesManager;
35
55
  optionsManagers.add(this);
36
56
  this.onOptionChanged = this.onOptionChanged.bind(this);
37
57
  this.wrapOptionValue = this.wrapOptionValue.bind(this);
@@ -45,21 +65,17 @@ var OptionsManager = /** @class */ (function () {
45
65
  OptionsManager.prototype.getInitialOptions = function (rootNode) {
46
66
  var _this = this;
47
67
  var config = buildConfig(rootNode, false);
48
- Object.keys(config.templates).forEach(function (key) {
49
- _this.templatesManager.add(key, config.templates[key]);
50
- });
51
68
  var options = {};
52
69
  Object.keys(config.options).forEach(function (key) {
53
70
  options[key] = _this.wrapOptionValue(key, config.options[key]);
54
71
  });
55
- if (this.templatesManager.templatesCount > 0) {
56
- options.integrationOptions = {
57
- templates: this.templatesManager.templates,
58
- };
59
- }
60
72
  return options;
61
73
  };
62
- OptionsManager.prototype.update = function (config) {
74
+ OptionsManager.prototype.getTemplateOptions = function (rootNode) {
75
+ var config = buildConfig(rootNode, false);
76
+ return config.templates;
77
+ };
78
+ OptionsManager.prototype.update = function (config, dxtemplates) {
63
79
  var _this = this;
64
80
  var changedOptions = [];
65
81
  var optionChangedHandler = function (_a) {
@@ -76,12 +92,9 @@ var OptionsManager = /** @class */ (function () {
76
92
  changes.removedOptions.forEach(function (optionName) {
77
93
  _this.resetOption(optionName);
78
94
  });
79
- Object.keys(changes.templates).forEach(function (key) {
80
- _this.templatesManager.add(key, changes.templates[key]);
81
- });
82
- if (this.templatesManager.templatesCount > 0) {
95
+ if (Object.keys(dxtemplates).length > 0) {
83
96
  this.setValue('integrationOptions', {
84
- templates: this.templatesManager.templates,
97
+ templates: dxtemplates,
85
98
  });
86
99
  }
87
100
  Object.keys(changes.options).forEach(function (key) {
@@ -91,7 +104,7 @@ var OptionsManager = /** @class */ (function () {
91
104
  this.instance.off('optionChanged', optionChangedHandler);
92
105
  this.currentConfig = config;
93
106
  changedOptions.forEach(function (_a) {
94
- var name = _a[0], value = _a[1];
107
+ var _b = __read(_a, 2), name = _b[0], value = _b[1];
95
108
  var currentPropValue = config.options[name];
96
109
  if (Object.prototype.hasOwnProperty.call(config.options, name)
97
110
  && currentPropValue !== value) {
@@ -186,7 +199,7 @@ var OptionsManager = /** @class */ (function () {
186
199
  args[_i] = arguments[_i];
187
200
  }
188
201
  if (!_this.isUpdating || _this.isIndependentEvent(name)) {
189
- value.apply(void 0, args);
202
+ value.apply(void 0, __spreadArray([], __read(args)));
190
203
  }
191
204
  };
192
205
  }