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.
Files changed (312) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/cjs/accordion.d.ts +3 -3
  4. package/cjs/accordion.js +34 -37
  5. package/cjs/action-sheet.d.ts +3 -3
  6. package/cjs/action-sheet.js +34 -37
  7. package/cjs/autocomplete.d.ts +2 -2
  8. package/cjs/autocomplete.js +79 -82
  9. package/cjs/bar-gauge.d.ts +2 -2
  10. package/cjs/bar-gauge.js +97 -100
  11. package/cjs/box.d.ts +3 -3
  12. package/cjs/box.js +34 -37
  13. package/cjs/bullet.d.ts +2 -2
  14. package/cjs/bullet.js +44 -50
  15. package/cjs/button-group.d.ts +2 -2
  16. package/cjs/button-group.js +34 -37
  17. package/cjs/button.d.ts +2 -2
  18. package/cjs/button.js +22 -28
  19. package/cjs/calendar.d.ts +2 -2
  20. package/cjs/calendar.js +27 -31
  21. package/cjs/chart.d.ts +2 -2
  22. package/cjs/chart.js +305 -308
  23. package/cjs/check-box.d.ts +2 -2
  24. package/cjs/check-box.js +24 -29
  25. package/cjs/circular-gauge.d.ts +2 -2
  26. package/cjs/circular-gauge.js +103 -106
  27. package/cjs/color-box.d.ts +2 -2
  28. package/cjs/color-box.js +76 -79
  29. package/cjs/common/charts.d.ts +2 -2
  30. package/cjs/common/charts.js +2 -2
  31. package/cjs/common/data/custom-store.d.ts +2 -2
  32. package/cjs/common/data/custom-store.js +2 -2
  33. package/cjs/common/grids.d.ts +2 -2
  34. package/cjs/common/grids.js +2 -2
  35. package/cjs/common/index.d.ts +2 -2
  36. package/cjs/common/index.js +2 -2
  37. package/cjs/context-menu.d.ts +3 -3
  38. package/cjs/context-menu.js +76 -79
  39. package/cjs/core/component-base.d.ts +2 -2
  40. package/cjs/core/component-base.js +107 -141
  41. package/cjs/core/component.d.ts +2 -2
  42. package/cjs/core/component.js +29 -43
  43. package/cjs/core/config.d.ts +2 -2
  44. package/cjs/core/config.js +4 -15
  45. package/cjs/core/configuration/comparer.d.ts +2 -2
  46. package/cjs/core/configuration/comparer.js +27 -27
  47. package/cjs/core/configuration/config-node.d.ts +2 -2
  48. package/cjs/core/configuration/config-node.js +2 -2
  49. package/cjs/core/configuration/react/element.d.ts +2 -3
  50. package/cjs/core/configuration/react/element.js +10 -10
  51. package/cjs/core/configuration/react/templates.d.ts +2 -2
  52. package/cjs/core/configuration/react/templates.js +2 -2
  53. package/cjs/core/configuration/react/tree.d.ts +2 -2
  54. package/cjs/core/configuration/react/tree.js +33 -40
  55. package/cjs/core/configuration/tree.d.ts +2 -2
  56. package/cjs/core/configuration/tree.js +24 -24
  57. package/cjs/core/configuration/utils.d.ts +2 -2
  58. package/cjs/core/configuration/utils.js +12 -17
  59. package/cjs/core/extension-component.d.ts +2 -2
  60. package/cjs/core/extension-component.js +20 -35
  61. package/cjs/core/helpers.d.ts +2 -3
  62. package/cjs/core/helpers.js +30 -161
  63. package/cjs/core/nested-option.d.ts +2 -2
  64. package/cjs/core/nested-option.js +8 -8
  65. package/cjs/core/options-manager.d.ts +2 -2
  66. package/cjs/core/options-manager.js +85 -128
  67. package/cjs/core/template-manager.d.ts +2 -2
  68. package/cjs/core/template-manager.js +51 -82
  69. package/cjs/core/template-wrapper.d.ts +2 -2
  70. package/cjs/core/template-wrapper.js +32 -49
  71. package/cjs/core/template.d.ts +2 -2
  72. package/cjs/core/template.js +4 -4
  73. package/cjs/core/types.d.ts +2 -2
  74. package/cjs/core/types.js +2 -2
  75. package/cjs/core/widget-config.d.ts +2 -2
  76. package/cjs/core/widget-config.js +21 -22
  77. package/cjs/data-grid.d.ts +3 -3
  78. package/cjs/data-grid.js +290 -292
  79. package/cjs/date-box.d.ts +2 -2
  80. package/cjs/date-box.js +83 -85
  81. package/cjs/date-range-box.d.ts +2 -2
  82. package/cjs/date-range-box.js +82 -85
  83. package/cjs/defer-rendering.d.ts +2 -2
  84. package/cjs/defer-rendering.js +50 -56
  85. package/cjs/diagram.d.ts +16 -16
  86. package/cjs/diagram.js +109 -112
  87. package/cjs/draggable.d.ts +2 -2
  88. package/cjs/draggable.js +29 -34
  89. package/cjs/drawer.d.ts +2 -2
  90. package/cjs/drawer.js +27 -31
  91. package/cjs/drop-down-box.d.ts +2 -2
  92. package/cjs/drop-down-box.js +76 -79
  93. package/cjs/drop-down-button.d.ts +2 -2
  94. package/cjs/drop-down-button.js +68 -73
  95. package/cjs/file-manager.d.ts +2 -2
  96. package/cjs/file-manager.js +59 -65
  97. package/cjs/file-uploader.d.ts +2 -2
  98. package/cjs/file-uploader.js +24 -29
  99. package/cjs/filter-builder.d.ts +2 -2
  100. package/cjs/filter-builder.js +47 -50
  101. package/cjs/form.d.ts +2 -2
  102. package/cjs/form.js +94 -98
  103. package/cjs/funnel.d.ts +2 -2
  104. package/cjs/funnel.js +109 -113
  105. package/cjs/gallery.d.ts +3 -3
  106. package/cjs/gallery.js +34 -37
  107. package/cjs/gantt.d.ts +2 -2
  108. package/cjs/gantt.js +101 -106
  109. package/cjs/html-editor.d.ts +2 -2
  110. package/cjs/html-editor.js +64 -68
  111. package/cjs/index.d.ts +2 -2
  112. package/cjs/index.js +2 -2
  113. package/cjs/linear-gauge.d.ts +2 -2
  114. package/cjs/linear-gauge.js +103 -107
  115. package/cjs/list.d.ts +3 -3
  116. package/cjs/list.js +52 -55
  117. package/cjs/load-indicator.d.ts +2 -2
  118. package/cjs/load-indicator.js +19 -26
  119. package/cjs/load-panel.d.ts +2 -2
  120. package/cjs/load-panel.js +62 -65
  121. package/cjs/lookup.d.ts +2 -2
  122. package/cjs/lookup.js +79 -82
  123. package/cjs/map.d.ts +2 -2
  124. package/cjs/map.js +46 -50
  125. package/cjs/menu.d.ts +3 -3
  126. package/cjs/menu.js +76 -79
  127. package/cjs/multi-view.d.ts +3 -3
  128. package/cjs/multi-view.js +34 -37
  129. package/cjs/number-box.d.ts +2 -2
  130. package/cjs/number-box.js +37 -41
  131. package/cjs/pie-chart.d.ts +2 -2
  132. package/cjs/pie-chart.js +136 -139
  133. package/cjs/pivot-grid-field-chooser.d.ts +2 -2
  134. package/cjs/pivot-grid-field-chooser.js +38 -44
  135. package/cjs/pivot-grid.d.ts +2 -2
  136. package/cjs/pivot-grid.js +62 -68
  137. package/cjs/polar-chart.d.ts +2 -2
  138. package/cjs/polar-chart.js +238 -242
  139. package/cjs/popover.d.ts +2 -2
  140. package/cjs/popover.js +74 -76
  141. package/cjs/popup.d.ts +2 -2
  142. package/cjs/popup.js +68 -70
  143. package/cjs/progress-bar.d.ts +2 -2
  144. package/cjs/progress-bar.js +24 -29
  145. package/cjs/radio-group.d.ts +2 -2
  146. package/cjs/radio-group.js +34 -37
  147. package/cjs/range-selector.d.ts +2 -2
  148. package/cjs/range-selector.js +208 -212
  149. package/cjs/range-slider.d.ts +2 -2
  150. package/cjs/range-slider.js +37 -41
  151. package/cjs/recurrence-editor.d.ts +2 -2
  152. package/cjs/recurrence-editor.js +24 -29
  153. package/cjs/resizable.d.ts +2 -2
  154. package/cjs/resizable.js +24 -29
  155. package/cjs/responsive-box.d.ts +3 -3
  156. package/cjs/responsive-box.js +43 -46
  157. package/cjs/sankey.d.ts +2 -2
  158. package/cjs/sankey.js +85 -89
  159. package/cjs/scheduler.d.ts +2 -2
  160. package/cjs/scheduler.js +46 -49
  161. package/cjs/scroll-view.d.ts +2 -2
  162. package/cjs/scroll-view.js +19 -26
  163. package/cjs/select-box.d.ts +2 -2
  164. package/cjs/select-box.js +79 -82
  165. package/cjs/slider.d.ts +2 -2
  166. package/cjs/slider.js +37 -41
  167. package/cjs/sortable.d.ts +2 -2
  168. package/cjs/sortable.js +29 -34
  169. package/cjs/sparkline.d.ts +2 -2
  170. package/cjs/sparkline.js +44 -50
  171. package/cjs/speed-dial-action.d.ts +2 -2
  172. package/cjs/speed-dial-action.js +19 -26
  173. package/cjs/splitter.d.ts +6 -6
  174. package/cjs/splitter.js +34 -37
  175. package/cjs/switch.d.ts +2 -2
  176. package/cjs/switch.js +24 -29
  177. package/cjs/tab-panel.d.ts +3 -3
  178. package/cjs/tab-panel.js +34 -37
  179. package/cjs/tabs.d.ts +3 -3
  180. package/cjs/tabs.js +34 -37
  181. package/cjs/tag-box.d.ts +2 -2
  182. package/cjs/tag-box.js +79 -82
  183. package/cjs/text-area.d.ts +2 -2
  184. package/cjs/text-area.js +24 -29
  185. package/cjs/text-box.d.ts +2 -2
  186. package/cjs/text-box.js +34 -38
  187. package/cjs/tile-view.d.ts +3 -3
  188. package/cjs/tile-view.js +34 -37
  189. package/cjs/toast.d.ts +2 -2
  190. package/cjs/toast.js +65 -67
  191. package/cjs/toolbar.d.ts +3 -3
  192. package/cjs/toolbar.js +34 -37
  193. package/cjs/tooltip.d.ts +2 -2
  194. package/cjs/tooltip.js +71 -73
  195. package/cjs/tree-list.d.ts +3 -3
  196. package/cjs/tree-list.js +250 -254
  197. package/cjs/tree-map.d.ts +2 -2
  198. package/cjs/tree-map.js +91 -95
  199. package/cjs/tree-view.d.ts +3 -3
  200. package/cjs/tree-view.js +43 -46
  201. package/cjs/validation-group.d.ts +2 -2
  202. package/cjs/validation-group.js +19 -26
  203. package/cjs/validation-summary.d.ts +3 -3
  204. package/cjs/validation-summary.js +34 -37
  205. package/cjs/validator.d.ts +2 -2
  206. package/cjs/validator.js +57 -63
  207. package/cjs/vector-map.d.ts +2 -2
  208. package/cjs/vector-map.js +106 -110
  209. package/esm/accordion.js +29 -32
  210. package/esm/action-sheet.js +29 -32
  211. package/esm/autocomplete.js +74 -77
  212. package/esm/bar-gauge.js +92 -95
  213. package/esm/box.js +29 -32
  214. package/esm/bullet.js +39 -45
  215. package/esm/button-group.js +29 -32
  216. package/esm/button.js +18 -24
  217. package/esm/calendar.js +23 -27
  218. package/esm/chart.js +300 -303
  219. package/esm/check-box.js +20 -25
  220. package/esm/circular-gauge.js +98 -101
  221. package/esm/color-box.js +71 -74
  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 +71 -74
  227. package/esm/core/component-base.js +94 -131
  228. package/esm/core/component.js +25 -39
  229. package/esm/core/config.js +4 -15
  230. package/esm/core/configuration/comparer.js +25 -25
  231. package/esm/core/configuration/config-node.js +2 -2
  232. package/esm/core/configuration/react/element.js +9 -9
  233. package/esm/core/configuration/react/templates.js +2 -2
  234. package/esm/core/configuration/react/tree.js +28 -35
  235. package/esm/core/configuration/tree.js +23 -23
  236. package/esm/core/configuration/utils.js +12 -17
  237. package/esm/core/extension-component.js +17 -32
  238. package/esm/core/helpers.js +30 -163
  239. package/esm/core/nested-option.js +6 -6
  240. package/esm/core/options-manager.js +81 -124
  241. package/esm/core/template-manager.js +44 -75
  242. package/esm/core/template-wrapper.js +27 -44
  243. package/esm/core/template.js +3 -3
  244. package/esm/core/types.js +2 -2
  245. package/esm/core/widget-config.js +21 -22
  246. package/esm/data-grid.js +285 -287
  247. package/esm/date-box.js +78 -80
  248. package/esm/date-range-box.js +77 -80
  249. package/esm/defer-rendering.js +45 -51
  250. package/esm/diagram.js +104 -107
  251. package/esm/draggable.js +24 -29
  252. package/esm/drawer.js +23 -27
  253. package/esm/drop-down-box.js +71 -74
  254. package/esm/drop-down-button.js +63 -68
  255. package/esm/file-manager.js +54 -60
  256. package/esm/file-uploader.js +20 -25
  257. package/esm/filter-builder.js +42 -45
  258. package/esm/form.js +89 -93
  259. package/esm/funnel.js +104 -108
  260. package/esm/gallery.js +29 -32
  261. package/esm/gantt.js +96 -101
  262. package/esm/html-editor.js +59 -63
  263. package/esm/index.js +2 -2
  264. package/esm/linear-gauge.js +98 -102
  265. package/esm/list.js +47 -50
  266. package/esm/load-indicator.js +15 -22
  267. package/esm/load-panel.js +57 -60
  268. package/esm/lookup.js +74 -77
  269. package/esm/map.js +41 -45
  270. package/esm/menu.js +71 -74
  271. package/esm/multi-view.js +29 -32
  272. package/esm/number-box.js +32 -36
  273. package/esm/pie-chart.js +131 -134
  274. package/esm/pivot-grid-field-chooser.js +33 -39
  275. package/esm/pivot-grid.js +57 -63
  276. package/esm/polar-chart.js +233 -237
  277. package/esm/popover.js +69 -71
  278. package/esm/popup.js +63 -65
  279. package/esm/progress-bar.js +20 -25
  280. package/esm/radio-group.js +29 -32
  281. package/esm/range-selector.js +203 -207
  282. package/esm/range-slider.js +32 -36
  283. package/esm/recurrence-editor.js +20 -25
  284. package/esm/resizable.js +20 -25
  285. package/esm/responsive-box.js +38 -41
  286. package/esm/sankey.js +80 -84
  287. package/esm/scheduler.js +41 -44
  288. package/esm/scroll-view.js +15 -22
  289. package/esm/select-box.js +74 -77
  290. package/esm/slider.js +32 -36
  291. package/esm/sortable.js +24 -29
  292. package/esm/sparkline.js +39 -45
  293. package/esm/speed-dial-action.js +15 -22
  294. package/esm/splitter.js +29 -32
  295. package/esm/switch.js +20 -25
  296. package/esm/tab-panel.js +29 -32
  297. package/esm/tabs.js +29 -32
  298. package/esm/tag-box.js +74 -77
  299. package/esm/text-area.js +20 -25
  300. package/esm/text-box.js +29 -33
  301. package/esm/tile-view.js +29 -32
  302. package/esm/toast.js +60 -62
  303. package/esm/toolbar.js +29 -32
  304. package/esm/tooltip.js +66 -68
  305. package/esm/tree-list.js +245 -249
  306. package/esm/tree-map.js +86 -90
  307. package/esm/tree-view.js +38 -41
  308. package/esm/validation-group.js +15 -22
  309. package/esm/validation-summary.js +29 -32
  310. package/esm/validator.js +52 -58
  311. package/esm/vector-map.js +101 -105
  312. package/package.json +50 -51
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 24.1.2-beta
4
- * Build date: Mon May 13 2024
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,76 +11,42 @@
11
11
  * https://github.com/DevExpress/devextreme-react
12
12
  */
13
13
 
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var __read = (this && this.__read) || function (o, n) {
26
- var m = typeof Symbol === "function" && o[Symbol.iterator];
27
- if (!m) return o;
28
- var i = m.call(o), r, ar = [], e;
29
- try {
30
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
31
- }
32
- catch (error) { e = { error: error }; }
33
- finally {
34
- try {
35
- if (r && !r.done && (m = i["return"])) m.call(i);
36
- }
37
- finally { if (e) throw e.error; }
38
- }
39
- return ar;
40
- };
41
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
42
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
43
- if (ar || !(i in from)) {
44
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45
- ar[i] = from[i];
46
- }
47
- }
48
- return to.concat(ar || Array.prototype.slice.call(from));
49
- };
50
14
  import * as React from 'react';
51
15
  import * as events from 'devextreme/events';
52
16
  import { useContext, useImperativeHandle, forwardRef, useRef, useLayoutEffect, useCallback, useState, } from 'react';
53
17
  import { requestAnimationFrame } from 'devextreme/animation/frame';
54
18
  import { deferUpdate } from 'devextreme/core/utils/common';
19
+ import config from 'devextreme/core/config';
55
20
  import { createPortal } from 'react-dom';
56
21
  import { RemovalLockerContext, RestoreTreeContext } from './helpers';
57
22
  import { OptionsManager, scheduleGuards, unscheduleGuards } from './options-manager';
58
23
  import { elementPropNames, getClassName } from './widget-config';
59
24
  import { buildConfigTree } from './configuration/react/tree';
60
25
  import { TemplateManager } from './template-manager';
61
- var DX_REMOVE_EVENT = 'dxremove';
62
- var ComponentBase = forwardRef(function (props, ref) {
63
- var _a = props.templateProps, templateProps = _a === void 0 ? [] : _a, _b = props.defaults, defaults = _b === void 0 ? {} : _b, _c = props.expectedChildren, expectedChildren = _c === void 0 ? {} : _c, _d = props.isPortalComponent, isPortalComponent = _d === void 0 ? false : _d, _e = props.useRequestAnimationFrameFlag, useRequestAnimationFrameFlag = _e === void 0 ? false : _e, _f = props.subscribableOptions, subscribableOptions = _f === void 0 ? [] : _f, WidgetClass = props.WidgetClass, _g = props.independentEvents, independentEvents = _g === void 0 ? [] : _g, renderChildren = props.renderChildren, _h = props.beforeCreateWidget, beforeCreateWidget = _h === void 0 ? function () { return undefined; } : _h, _j = props.afterCreateWidget, afterCreateWidget = _j === void 0 ? function () { return undefined; } : _j;
64
- var _k = __read(useState(0), 2), setForceUpdateToken = _k[1];
65
- var removalLocker = useContext(RemovalLockerContext);
66
- var restoreParentLink = useContext(RestoreTreeContext);
67
- var instance = useRef();
68
- var element = useRef();
69
- var portalContainer = useRef();
70
- var useDeferUpdateForTemplates = useRef(false);
71
- var guardsUpdateScheduled = useRef(false);
72
- var childElementsDetached = useRef(false);
73
- var optionsManager = useRef(new OptionsManager());
74
- var childNodes = useRef();
75
- var createDXTemplates = useRef();
76
- var clearInstantiationModels = useRef();
77
- var updateTemplates = useRef();
78
- var prevPropsRef = useRef();
79
- var restoreTree = useCallback(function () {
80
- var _a;
81
- var _b;
82
- if (((_b = childNodes.current) === null || _b === void 0 ? void 0 : _b.length) && element.current) {
83
- (_a = element.current).append.apply(_a, __spreadArray([], __read(childNodes.current), false));
26
+ const DX_REMOVE_EVENT = 'dxremove';
27
+ config({
28
+ buyNowLink: 'https://go.devexpress.com/Licensing_Installer_Watermark_DevExtremeReact.aspx',
29
+ });
30
+ const ComponentBase = forwardRef((props, ref) => {
31
+ const { templateProps = [], defaults = {}, expectedChildren = {}, isPortalComponent = false, useRequestAnimationFrameFlag = false, subscribableOptions = [], WidgetClass, independentEvents = [], renderChildren, beforeCreateWidget = () => undefined, afterCreateWidget = () => undefined, } = props;
32
+ const [, setForceUpdateToken] = useState(0);
33
+ const removalLocker = useContext(RemovalLockerContext);
34
+ const restoreParentLink = useContext(RestoreTreeContext);
35
+ const instance = useRef();
36
+ const element = useRef();
37
+ const portalContainer = useRef();
38
+ const useDeferUpdateForTemplates = useRef(false);
39
+ const guardsUpdateScheduled = useRef(false);
40
+ const childElementsDetached = useRef(false);
41
+ const optionsManager = useRef(new OptionsManager());
42
+ const childNodes = useRef();
43
+ const createDXTemplates = useRef();
44
+ const clearInstantiationModels = useRef();
45
+ const updateTemplates = useRef();
46
+ const prevPropsRef = useRef();
47
+ const restoreTree = useCallback(() => {
48
+ if (childNodes.current?.length && element.current) {
49
+ element.current.append(...childNodes.current);
84
50
  childElementsDetached.current = false;
85
51
  }
86
52
  if (restoreParentLink && element.current && !element.current.isConnected) {
@@ -92,49 +58,45 @@ var ComponentBase = forwardRef(function (props, ref) {
92
58
  childElementsDetached.current,
93
59
  restoreParentLink,
94
60
  ]);
95
- var updateCssClasses = useCallback(function (prevProps, newProps) {
96
- var _a, _b;
97
- var _c, _d;
98
- var prevClassName = prevProps ? getClassName(prevProps) : undefined;
99
- var newClassName = getClassName(newProps);
61
+ const updateCssClasses = useCallback((prevProps, newProps) => {
62
+ const prevClassName = prevProps ? getClassName(prevProps) : undefined;
63
+ const newClassName = getClassName(newProps);
100
64
  if (prevClassName === newClassName) {
101
65
  return;
102
66
  }
103
67
  if (prevClassName) {
104
- var classNames = prevClassName.split(' ').filter(function (c) { return c; });
68
+ const classNames = prevClassName.split(' ').filter((c) => c);
105
69
  if (classNames.length) {
106
- (_c = element.current) === null || _c === void 0 ? void 0 : (_a = _c.classList).remove.apply(_a, __spreadArray([], __read(classNames), false));
70
+ element.current?.classList.remove(...classNames);
107
71
  }
108
72
  }
109
73
  if (newClassName) {
110
- var classNames = newClassName.split(' ').filter(function (c) { return c; });
74
+ const classNames = newClassName.split(' ').filter((c) => c);
111
75
  if (classNames.length) {
112
- (_d = element.current) === null || _d === void 0 ? void 0 : (_b = _d.classList).add.apply(_b, __spreadArray([], __read(classNames), false));
76
+ element.current?.classList.add(...classNames);
113
77
  }
114
78
  }
115
79
  }, [element.current]);
116
- var setInlineStyles = useCallback(function (styles) {
80
+ const setInlineStyles = useCallback((styles) => {
117
81
  if (element.current) {
118
- var el_1 = element.current;
119
- Object.entries(styles).forEach(function (_a) {
120
- var _b = __read(_a, 2), name = _b[0], value = _b[1];
121
- el_1.style[name] = value;
82
+ const el = element.current;
83
+ Object.entries(styles).forEach(([name, value]) => {
84
+ el.style[name] = value;
122
85
  });
123
86
  }
124
87
  }, [element.current]);
125
- var getConfig = useCallback(function () { return buildConfigTree({
88
+ const getConfig = useCallback(() => buildConfigTree({
126
89
  templates: templateProps,
127
90
  initialValuesProps: defaults,
128
91
  predefinedValuesProps: {},
129
- expectedChildren: expectedChildren,
130
- }, props); }, [
92
+ expectedChildren,
93
+ }, props), [
131
94
  templateProps,
132
95
  defaults,
133
96
  expectedChildren,
134
97
  props,
135
98
  ]);
136
- var setTemplateManagerHooks = useCallback(function (_a) {
137
- var createDXTemplatesFn = _a.createDXTemplates, clearInstantiationModelsFn = _a.clearInstantiationModels, updateTemplatesFn = _a.updateTemplates;
99
+ const setTemplateManagerHooks = useCallback(({ createDXTemplates: createDXTemplatesFn, clearInstantiationModels: clearInstantiationModelsFn, updateTemplates: updateTemplatesFn, }) => {
138
100
  createDXTemplates.current = createDXTemplatesFn;
139
101
  clearInstantiationModels.current = clearInstantiationModelsFn;
140
102
  updateTemplates.current = updateTemplatesFn;
@@ -143,31 +105,30 @@ var ComponentBase = forwardRef(function (props, ref) {
143
105
  clearInstantiationModels.current,
144
106
  updateTemplates.current,
145
107
  ]);
146
- var getElementProps = useCallback(function () {
147
- var elementProps = {
148
- ref: function (el) {
108
+ const getElementProps = useCallback(() => {
109
+ const elementProps = {
110
+ ref: (el) => {
149
111
  if (el) {
150
112
  element.current = el;
151
113
  }
152
114
  },
153
115
  };
154
- elementPropNames.forEach(function (name) {
116
+ elementPropNames.forEach((name) => {
155
117
  if (name in props) {
156
118
  elementProps[name] = props[name];
157
119
  }
158
120
  });
159
121
  return elementProps;
160
122
  }, [element.current]);
161
- var scheduleTemplatesUpdate = useCallback(function () {
123
+ const scheduleTemplatesUpdate = useCallback(() => {
162
124
  if (guardsUpdateScheduled.current) {
163
125
  return;
164
126
  }
165
127
  guardsUpdateScheduled.current = true;
166
- var updateFunc = useDeferUpdateForTemplates.current ? deferUpdate : requestAnimationFrame;
167
- updateFunc(function () {
168
- var _a;
128
+ const updateFunc = useDeferUpdateForTemplates.current ? deferUpdate : requestAnimationFrame;
129
+ updateFunc(() => {
169
130
  guardsUpdateScheduled.current = false;
170
- (_a = updateTemplates.current) === null || _a === void 0 ? void 0 : _a.call(updateTemplates, function () { return scheduleGuards(); });
131
+ updateTemplates.current?.(() => scheduleGuards());
171
132
  });
172
133
  unscheduleGuards();
173
134
  }, [
@@ -175,25 +136,30 @@ var ComponentBase = forwardRef(function (props, ref) {
175
136
  useDeferUpdateForTemplates.current,
176
137
  updateTemplates.current,
177
138
  ]);
178
- var createWidget = useCallback(function (el) {
179
- var _a, _b;
139
+ const createWidget = useCallback((el) => {
180
140
  beforeCreateWidget();
181
141
  el = el || element.current;
182
- var config = getConfig();
183
- var options = __assign({ templatesRenderAsynchronously: true }, optionsManager.current.getInitialOptions(config));
184
- var templateOptions = optionsManager.current.getTemplateOptions(config);
185
- var dxTemplates = (_a = createDXTemplates.current) === null || _a === void 0 ? void 0 : _a.call(createDXTemplates, templateOptions);
142
+ const widgetConfig = getConfig();
143
+ let options = {
144
+ templatesRenderAsynchronously: true,
145
+ ...optionsManager.current.getInitialOptions(widgetConfig),
146
+ };
147
+ const templateOptions = optionsManager.current.getTemplateOptions(widgetConfig);
148
+ const dxTemplates = createDXTemplates.current?.(templateOptions);
186
149
  if (dxTemplates && Object.keys(dxTemplates).length) {
187
- options = __assign(__assign({}, options), { integrationOptions: {
150
+ options = {
151
+ ...options,
152
+ integrationOptions: {
188
153
  templates: dxTemplates,
189
- } });
154
+ },
155
+ };
190
156
  }
191
- (_b = clearInstantiationModels.current) === null || _b === void 0 ? void 0 : _b.call(clearInstantiationModels);
157
+ clearInstantiationModels.current?.();
192
158
  instance.current = new WidgetClass(el, options);
193
159
  if (!useRequestAnimationFrameFlag) {
194
160
  useDeferUpdateForTemplates.current = instance.current.option('integrationOptions.useDeferUpdateForTemplates');
195
161
  }
196
- optionsManager.current.setInstance(instance.current, config, subscribableOptions, independentEvents);
162
+ optionsManager.current.setInstance(instance.current, widgetConfig, subscribableOptions, independentEvents);
197
163
  instance.current.on('optionChanged', optionsManager.current.onOptionChanged);
198
164
  afterCreateWidget();
199
165
  }, [
@@ -211,16 +177,15 @@ var ComponentBase = forwardRef(function (props, ref) {
211
177
  independentEvents,
212
178
  getConfig,
213
179
  ]);
214
- var onComponentUpdated = useCallback(function () {
215
- var _a, _b;
216
- if (!((_a = optionsManager.current) === null || _a === void 0 ? void 0 : _a.isInstanceSet)) {
180
+ const onComponentUpdated = useCallback(() => {
181
+ if (!optionsManager.current?.isInstanceSet) {
217
182
  return;
218
183
  }
219
184
  updateCssClasses(prevPropsRef.current, props);
220
- var config = getConfig();
221
- var templateOptions = optionsManager.current.getTemplateOptions(config);
222
- var dxTemplates = ((_b = createDXTemplates.current) === null || _b === void 0 ? void 0 : _b.call(createDXTemplates, templateOptions)) || {};
223
- optionsManager.current.update(config, dxTemplates);
185
+ const widgetConfig = getConfig();
186
+ const templateOptions = optionsManager.current.getTemplateOptions(widgetConfig);
187
+ const dxTemplates = createDXTemplates.current?.(templateOptions) || {};
188
+ optionsManager.current.update(widgetConfig, dxTemplates);
224
189
  scheduleTemplatesUpdate();
225
190
  prevPropsRef.current = props;
226
191
  }, [
@@ -232,14 +197,13 @@ var ComponentBase = forwardRef(function (props, ref) {
232
197
  getConfig,
233
198
  props,
234
199
  ]);
235
- var onComponentMounted = useCallback(function () {
236
- var _a, _b;
237
- var style = props.style;
200
+ const onComponentMounted = useCallback(() => {
201
+ const { style } = props;
238
202
  if (childElementsDetached.current) {
239
203
  restoreTree();
240
204
  }
241
- else if ((_a = element.current) === null || _a === void 0 ? void 0 : _a.childNodes.length) {
242
- childNodes.current = Array.from((_b = element.current) === null || _b === void 0 ? void 0 : _b.childNodes);
205
+ else if (element.current?.childNodes.length) {
206
+ childNodes.current = Array.from(element.current?.childNodes);
243
207
  }
244
208
  updateCssClasses(undefined, props);
245
209
  if (style) {
@@ -254,12 +218,11 @@ var ComponentBase = forwardRef(function (props, ref) {
254
218
  setInlineStyles,
255
219
  props,
256
220
  ]);
257
- var onComponentUnmounted = useCallback(function () {
258
- var _a;
259
- removalLocker === null || removalLocker === void 0 ? void 0 : removalLocker.lock();
221
+ const onComponentUnmounted = useCallback(() => {
222
+ removalLocker?.lock();
260
223
  if (instance.current) {
261
- var dxRemoveArgs = { isUnmounting: true };
262
- (_a = childNodes.current) === 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); });
224
+ const dxRemoveArgs = { isUnmounting: true };
225
+ childNodes.current?.forEach((child) => child.parentNode?.removeChild(child));
263
226
  childElementsDetached.current = true;
264
227
  if (element.current) {
265
228
  events.triggerHandler(element.current, DX_REMOVE_EVENT, dxRemoveArgs);
@@ -267,7 +230,7 @@ var ComponentBase = forwardRef(function (props, ref) {
267
230
  instance.current.dispose();
268
231
  }
269
232
  optionsManager.current.dispose();
270
- removalLocker === null || removalLocker === void 0 ? void 0 : removalLocker.unlock();
233
+ removalLocker?.unlock();
271
234
  }, [
272
235
  removalLocker,
273
236
  instance.current,
@@ -276,41 +239,41 @@ var ComponentBase = forwardRef(function (props, ref) {
276
239
  optionsManager.current,
277
240
  childElementsDetached.current,
278
241
  ]);
279
- useLayoutEffect(function () {
242
+ useLayoutEffect(() => {
280
243
  onComponentMounted();
281
- return function () {
244
+ return () => {
282
245
  onComponentUnmounted();
283
246
  };
284
247
  }, []);
285
- useLayoutEffect(function () {
248
+ useLayoutEffect(() => {
286
249
  onComponentUpdated();
287
250
  });
288
- useImperativeHandle(ref, function () { return ({
289
- getInstance: function () {
251
+ useImperativeHandle(ref, () => ({
252
+ getInstance() {
290
253
  return instance.current;
291
254
  },
292
- getElement: function () {
255
+ getElement() {
293
256
  return element.current;
294
257
  },
295
- createWidget: function (el) {
258
+ createWidget(el) {
296
259
  createWidget(el);
297
260
  },
298
- }); }, [instance.current, element.current, createWidget]);
299
- var _renderChildren = useCallback(function () {
261
+ }), [instance.current, element.current, createWidget]);
262
+ const _renderChildren = useCallback(() => {
300
263
  if (renderChildren) {
301
264
  return renderChildren();
302
265
  }
303
266
  // @ts-expect-error TS2339
304
- var children = props.children;
267
+ const { children } = props;
305
268
  return children;
306
269
  }, [props, renderChildren]);
307
- var renderPortal = useCallback(function () { return portalContainer.current && createPortal(_renderChildren(), portalContainer.current); }, [portalContainer.current, _renderChildren]);
308
- var renderContent = useCallback(function () {
270
+ const renderPortal = useCallback(() => portalContainer.current && createPortal(_renderChildren(), portalContainer.current), [portalContainer.current, _renderChildren]);
271
+ const renderContent = useCallback(() => {
309
272
  // @ts-expect-error TS2339
310
- var children = props.children;
273
+ const { children } = props;
311
274
  return isPortalComponent && children
312
275
  ? React.createElement('div', {
313
- ref: function (node) {
276
+ ref: (node) => {
314
277
  if (node && portalContainer.current !== node) {
315
278
  portalContainer.current = node;
316
279
  setForceUpdateToken(Math.random());
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 24.1.2-beta
4
- * Build date: Mon May 13 2024
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,43 +11,31 @@
11
11
  * https://github.com/DevExpress/devextreme-react
12
12
  */
13
13
 
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
14
  import * as React from 'react';
26
15
  import { useImperativeHandle, forwardRef, useRef, useLayoutEffect, useCallback, } from 'react';
27
16
  import { ComponentBase } from './component-base';
28
17
  import { elementIsExtension } from './extension-component';
29
- var Component = forwardRef(function (props, ref) {
30
- var componentBaseRef = useRef(null);
31
- var extensionCreators = useRef([]);
32
- var registerExtension = useCallback(function (creator) {
18
+ const Component = forwardRef((props, ref) => {
19
+ const componentBaseRef = useRef(null);
20
+ const extensionCreators = useRef([]);
21
+ const registerExtension = useCallback((creator) => {
33
22
  extensionCreators.current.push(creator);
34
23
  }, [extensionCreators.current]);
35
- var createExtensions = useCallback(function () {
36
- extensionCreators.current.forEach(function (creator) { var _a; return creator((_a = componentBaseRef.current) === null || _a === void 0 ? void 0 : _a.getElement()); });
24
+ const createExtensions = useCallback(() => {
25
+ extensionCreators.current.forEach((creator) => creator(componentBaseRef.current?.getElement()));
37
26
  }, [extensionCreators.current, componentBaseRef.current]);
38
- var renderChildren = useCallback(function () { return React.Children.map(
27
+ const renderChildren = useCallback(() => React.Children.map(
39
28
  // @ts-expect-error TS2339
40
- props.children, function (child) {
29
+ props.children, (child) => {
41
30
  if (child && elementIsExtension(child)) {
42
31
  return React.cloneElement(child, { onMounted: registerExtension });
43
32
  }
44
33
  return child;
45
- }); }, [props, registerExtension]);
46
- var createWidget = useCallback(function (el) {
47
- var _a;
48
- (_a = componentBaseRef.current) === null || _a === void 0 ? void 0 : _a.createWidget(el);
34
+ }), [props, registerExtension]);
35
+ const createWidget = useCallback((el) => {
36
+ componentBaseRef.current?.createWidget(el);
49
37
  }, [componentBaseRef.current]);
50
- var clearExtensions = useCallback(function () {
38
+ const clearExtensions = useCallback(() => {
51
39
  if (props.clearExtensions) {
52
40
  props.clearExtensions();
53
41
  }
@@ -56,29 +44,27 @@ var Component = forwardRef(function (props, ref) {
56
44
  extensionCreators.current,
57
45
  props.clearExtensions,
58
46
  ]);
59
- useLayoutEffect(function () {
47
+ useLayoutEffect(() => {
60
48
  createWidget();
61
49
  createExtensions();
62
- return function () {
50
+ return () => {
63
51
  clearExtensions();
64
52
  };
65
53
  }, []);
66
- useImperativeHandle(ref, function () { return ({
67
- getInstance: function () {
68
- var _a;
69
- return (_a = componentBaseRef.current) === null || _a === void 0 ? void 0 : _a.getInstance();
54
+ useImperativeHandle(ref, () => ({
55
+ getInstance() {
56
+ return componentBaseRef.current?.getInstance();
70
57
  },
71
- getElement: function () {
72
- var _a;
73
- return (_a = componentBaseRef.current) === null || _a === void 0 ? void 0 : _a.getElement();
58
+ getElement() {
59
+ return componentBaseRef.current?.getElement();
74
60
  },
75
- createWidget: function (el) {
61
+ createWidget(el) {
76
62
  createWidget(el);
77
63
  },
78
- clearExtensions: function () {
64
+ clearExtensions() {
79
65
  clearExtensions();
80
66
  },
81
- }); }, [componentBaseRef.current, createWidget, clearExtensions]);
82
- return (React.createElement(ComponentBase, __assign({ ref: componentBaseRef, renderChildren: renderChildren }, props)));
67
+ }), [componentBaseRef.current, createWidget, clearExtensions]);
68
+ return (React.createElement(ComponentBase, { ref: componentBaseRef, renderChildren: renderChildren, ...props }));
83
69
  });
84
70
  export { Component, };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 24.1.2-beta
4
- * Build date: Mon May 13 2024
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,22 +11,11 @@
11
11
  * https://github.com/DevExpress/devextreme-react
12
12
  */
13
13
 
14
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
- var config = {
14
+ let config = {
26
15
  useLegacyTemplateEngine: false,
27
16
  };
28
17
  function setOptions(options) {
29
- config = __assign(__assign({}, config), options);
18
+ config = { ...config, ...options };
30
19
  }
31
20
  function getOption(optionName) {
32
21
  return config[optionName];
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 24.1.2-beta
4
- * Build date: Mon May 13 2024
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
  *
@@ -14,24 +14,24 @@
14
14
  import { buildNode, buildTemplates } from './tree';
15
15
  import { mergeNameParts } from './utils';
16
16
  function compareTemplates(current, prev, changesAccum) {
17
- var currentTemplatesOptions = {};
18
- var currentTemplates = {};
19
- var prevTemplatesOptions = {};
20
- var prevTemplates = {};
17
+ const currentTemplatesOptions = {};
18
+ const currentTemplates = {};
19
+ const prevTemplatesOptions = {};
20
+ const prevTemplates = {};
21
21
  buildTemplates(current, currentTemplatesOptions, currentTemplates);
22
22
  buildTemplates(prev, prevTemplatesOptions, prevTemplates);
23
23
  changesAccum.addRemovedValues(currentTemplatesOptions, prevTemplatesOptions, current.fullName);
24
24
  // TODO: support switching to default templates
25
25
  // appendRemovedValues(currentTemplates, prevTemplates, "", changesAccum.templates);
26
- Object.keys(currentTemplatesOptions).forEach(function (key) {
26
+ Object.keys(currentTemplatesOptions).forEach((key) => {
27
27
  if (currentTemplatesOptions[key] === prevTemplatesOptions[key]) {
28
28
  return;
29
29
  }
30
30
  changesAccum.options[mergeNameParts(current.fullName, key)] = currentTemplatesOptions[key];
31
31
  });
32
- Object.keys(currentTemplates).forEach(function (key) {
33
- var currentTemplate = currentTemplates[key];
34
- var prevTemplate = prevTemplates[key];
32
+ Object.keys(currentTemplates).forEach((key) => {
33
+ const currentTemplate = currentTemplates[key];
34
+ const prevTemplate = prevTemplates[key];
35
35
  if (prevTemplate && currentTemplate.content === prevTemplate.content) {
36
36
  return;
37
37
  }
@@ -48,10 +48,10 @@ function compare(current, prev, changesAccum) {
48
48
  changesAccum.addRemovedValues(current.configs, prev.configs, current.fullName);
49
49
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
50
50
  compareCollections(current, prev, changesAccum);
51
- Object.keys(current.configs).forEach(function (key) {
51
+ Object.keys(current.configs).forEach((key) => {
52
52
  compare(current.configs[key], prev.configs[key], changesAccum);
53
53
  });
54
- Object.keys(current.options).forEach(function (key) {
54
+ Object.keys(current.options).forEach((key) => {
55
55
  if (current.options[key] === prev.options[key]) {
56
56
  return;
57
57
  }
@@ -60,17 +60,17 @@ function compare(current, prev, changesAccum) {
60
60
  compareTemplates(current, prev, changesAccum);
61
61
  }
62
62
  function appendRemovedValues(current, prev, path, changesAccum) {
63
- var removedKeys = Object.keys(prev).filter(function (key) { return !Object.keys(current).includes(key); });
64
- removedKeys.forEach(function (key) {
63
+ const removedKeys = Object.keys(prev).filter((key) => !Object.keys(current).includes(key));
64
+ removedKeys.forEach((key) => {
65
65
  changesAccum.push(mergeNameParts(path, key));
66
66
  });
67
67
  }
68
68
  function getChanges(current, prev) {
69
- var changesAccum = {
69
+ const changesAccum = {
70
70
  options: {},
71
71
  removedOptions: [],
72
72
  templates: {},
73
- addRemovedValues: function (currentOptions, prevOptions, path) {
73
+ addRemovedValues(currentOptions, prevOptions, path) {
74
74
  appendRemovedValues(currentOptions, prevOptions, path, this.removedOptions);
75
75
  },
76
76
  };
@@ -78,19 +78,19 @@ function getChanges(current, prev) {
78
78
  return changesAccum;
79
79
  }
80
80
  function compareCollections(current, prev, changesAccum) {
81
- Object.keys(current.configCollections).forEach(function (key) {
82
- var currentCollection = current.configCollections[key];
83
- var prevCollection = prev.configCollections[key] || [];
81
+ Object.keys(current.configCollections).forEach((key) => {
82
+ const currentCollection = current.configCollections[key];
83
+ const prevCollection = prev.configCollections[key] || [];
84
84
  if (!currentCollection || currentCollection.length !== prevCollection.length) {
85
- var updatedCollection_1 = [];
86
- currentCollection.forEach(function (item) {
87
- var config = buildNode(item, changesAccum.templates, true);
88
- updatedCollection_1.push(config);
85
+ const updatedCollection = [];
86
+ currentCollection.forEach((item) => {
87
+ const config = buildNode(item, changesAccum.templates, true);
88
+ updatedCollection.push(config);
89
89
  });
90
- changesAccum.options[mergeNameParts(current.fullName, key)] = updatedCollection_1;
90
+ changesAccum.options[mergeNameParts(current.fullName, key)] = updatedCollection;
91
91
  return;
92
92
  }
93
- for (var i = 0; i < currentCollection.length; i += 1) {
93
+ for (let i = 0; i < currentCollection.length; i += 1) {
94
94
  compare(currentCollection[i], prevCollection[i], changesAccum);
95
95
  }
96
96
  });
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * devextreme-react
3
- * Version: 24.1.2-beta
4
- * Build date: Mon May 13 2024
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
  *