@hybridcore/ui 1.6.0 → 1.6.2

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 (291) hide show
  1. package/CATALOG.md +179 -0
  2. package/README.md +1 -2
  3. package/dist/AccordionSummary-CJppWeqF.js +781 -0
  4. package/dist/Add-CqcD1PWb.js +403 -0
  5. package/dist/Box-DqUMmZjL.js +31 -0
  6. package/dist/{Button-CvE2gnly.js → Button-C5yquWAB.js} +120 -133
  7. package/dist/ButtonBase-BEF7oTOe.js +887 -0
  8. package/dist/{Delete-CW0UZv1m.js → Delete-BdyYpINH.js} +9 -8
  9. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-BvVjD9z3.js} +127 -124
  10. package/dist/FormGroup-CpBsIyYR.js +89 -0
  11. package/dist/{IconButton-CHwRQF-g.js → IconButton-BoGwbvrP.js} +41 -43
  12. package/dist/InputLabel-Dd8RrneV.js +341 -0
  13. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DwqJqzuM.js} +51 -53
  14. package/dist/Modal-MUZygjmQ.js +1158 -0
  15. package/dist/Paper-BkQLdsCI.js +582 -0
  16. package/dist/Select-DHUl_uG3.js +3916 -0
  17. package/dist/SwitchBase-DTndTqI8.js +235 -0
  18. package/dist/TextField-e2oKaUN1.js +669 -0
  19. package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
  20. package/dist/{Typography-CxbneZy_.js → Typography-DgsSLCFC.js} +53 -53
  21. package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
  22. package/dist/assets/index4.css +1 -0
  23. package/dist/clsx-OuTLNxxd.js +16 -0
  24. package/dist/components/access/helpers.js +1 -1
  25. package/dist/components/access/index.js +8 -15
  26. package/dist/components/access/logic.js +25 -0
  27. package/dist/components/button/index.js +10 -0
  28. package/dist/components/button/logic.js +26 -0
  29. package/dist/components/button/styled.js +9 -0
  30. package/dist/components/card/index.js +158 -498
  31. package/dist/components/card/logic.js +24 -0
  32. package/dist/components/card/styled.js +226 -51
  33. package/dist/components/card-alternate/index.js +111 -139
  34. package/dist/components/card-alternate/logic.js +17 -0
  35. package/dist/components/card-alternate/styled.js +113 -19
  36. package/dist/components/charts/_common/chart-error.js +19 -0
  37. package/dist/components/charts/candlestick/index.js +3 -3
  38. package/dist/components/charts/candlestick/logic.js +123 -113
  39. package/dist/components/charts/chart-wrapper/index.js +5 -5
  40. package/dist/components/charts/column-line-mix/index.js +9 -8
  41. package/dist/components/charts/column-line-mix/logic.js +68 -71
  42. package/dist/components/charts/drill-down-treemap/index.js +8 -7
  43. package/dist/components/charts/drill-down-treemap/logic.js +138 -144
  44. package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
  45. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
  46. package/dist/components/charts/heatmap/index.js +9 -8
  47. package/dist/components/charts/heatmap/logic.js +167 -173
  48. package/dist/components/charts/highlighting-line-data/index.js +3 -3
  49. package/dist/components/charts/line/index.js +9 -8
  50. package/dist/components/charts/line/logic.js +74 -79
  51. package/dist/components/charts/logaritmic-scale/index.js +9 -8
  52. package/dist/components/charts/logaritmic-scale/logic.js +63 -69
  53. package/dist/components/charts/multiple-value-axes/index.js +9 -8
  54. package/dist/components/charts/multiple-value-axes/logic.js +101 -107
  55. package/dist/components/charts/nested-pie/index.js +9 -8
  56. package/dist/components/charts/nested-pie/logic.js +62 -68
  57. package/dist/components/charts/packed-circles/index.js +7 -6
  58. package/dist/components/charts/packed-circles/logic.js +50 -56
  59. package/dist/components/charts/pie-chart/index.js +9 -8
  60. package/dist/components/charts/pie-chart/logic.js +49 -54
  61. package/dist/components/charts/stacked-area-radar/index.js +8 -7
  62. package/dist/components/charts/stacked-area-radar/logic.js +113 -118
  63. package/dist/components/charts/stacked-column-chart/index.js +9 -8
  64. package/dist/components/charts/stacked-column-chart/logic.js +78 -84
  65. package/dist/components/charts/xy-chart/index.js +9 -8
  66. package/dist/components/charts/xy-chart/logic.js +56 -60
  67. package/dist/components/collapsible-card/index.js +11 -10
  68. package/dist/components/collapsible-card/styled.js +1 -1
  69. package/dist/components/color-picker/index.js +7120 -0
  70. package/dist/components/color-picker/logic.js +18 -0
  71. package/dist/components/color-picker/styled.js +7 -0
  72. package/dist/components/confirm/dialog.js +3 -3
  73. package/dist/components/confirm/index.js +1 -1
  74. package/dist/components/container/index.js +28 -269
  75. package/dist/components/container/logic.js +12 -0
  76. package/dist/components/container/styled.js +29 -0
  77. package/dist/components/context-menu/index.js +25 -457
  78. package/dist/components/context-menu/logic.js +14 -0
  79. package/dist/components/context-menu/styled.js +40 -0
  80. package/dist/components/data-grid/index.js +22 -0
  81. package/dist/components/data-grid/logic.js +15 -0
  82. package/dist/components/data-grid/styled.js +20 -0
  83. package/dist/components/data-map/components/controls/index.js +4 -6
  84. package/dist/components/data-map/index.js +11 -11
  85. package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
  86. package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
  87. package/dist/components/data-security-selectors/security-level/index.js +39 -91
  88. package/dist/components/data-security-selectors/security-level/logic.js +28 -0
  89. package/dist/components/data-security-selectors/security-level/styled.js +53 -0
  90. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  91. package/dist/components/date-range-picker/index.js +2748 -0
  92. package/dist/components/date-range-picker/styled.js +14 -0
  93. package/dist/components/date-time-picker/index.js +45 -46
  94. package/dist/components/divider/index.js +11 -11
  95. package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
  96. package/dist/components/document-viewer/components/navigation/index.js +9 -9
  97. package/dist/components/document-viewer/components/viewer/index.js +31 -35
  98. package/dist/components/document-viewer/index.js +31 -39
  99. package/dist/components/document-viewer/logic.js +41 -34
  100. package/dist/components/document-viewer/styled.js +115 -27
  101. package/dist/components/duration-select/index.js +27 -0
  102. package/dist/components/duration-select/logic.js +21 -0
  103. package/dist/components/duration-select/styled.js +26 -0
  104. package/dist/components/editable-text/index.js +20 -0
  105. package/dist/components/editable-text/logic.js +18 -0
  106. package/dist/components/editable-text/styled.js +22 -0
  107. package/dist/components/geometry-picker/coordinate/index.js +29 -29
  108. package/dist/components/geometry-picker/edit/index.js +18 -18
  109. package/dist/components/geometry-picker/geometry/index.js +67 -67
  110. package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
  111. package/dist/components/geometry-picker/index.js +69 -85
  112. package/dist/components/geometry-picker/kml/index.js +16 -16
  113. package/dist/components/geometry-picker/logic.js +50 -57
  114. package/dist/components/geometry-picker/map/index.js +8 -8
  115. package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
  116. package/dist/components/geometry-picker/parser/index.js +46 -50
  117. package/dist/components/geometry-picker/parser/styled.js +22 -4
  118. package/dist/components/geometry-picker/styled.js +97 -37
  119. package/dist/components/geometry-picker/wkt/index.js +13 -13
  120. package/dist/components/heat-map/components/controls/index.js +4 -6
  121. package/dist/components/heat-map/components/legend/index.js +15 -17
  122. package/dist/components/heat-map/index.js +7 -7
  123. package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
  124. package/dist/components/instance-form/components/composite-list/index.js +5 -3
  125. package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
  126. package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
  127. package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
  128. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
  129. package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
  130. package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
  131. package/dist/components/instance-form/components/policy-list/index.js +47 -81
  132. package/dist/components/instance-form/components/variable/index.js +6 -11
  133. package/dist/components/instance-form/components/variables/index.js +48 -55
  134. package/dist/components/instance-form/helpers.js +9 -0
  135. package/dist/components/instance-form/index.js +402 -518
  136. package/dist/components/instance-form/logic.js +115 -0
  137. package/dist/components/instance-form/styled.js +487 -0
  138. package/dist/components/instance-hierarchy-table/index.js +32 -37
  139. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  140. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  141. package/dist/components/instance-table/index.js +30 -135
  142. package/dist/components/instance-table/logic.js +122 -0
  143. package/dist/components/instance-table/styled.js +53 -11
  144. package/dist/components/instance-variable-list/index.js +11 -11
  145. package/dist/components/loading/index.js +15 -9
  146. package/dist/components/loading/logic.js +15 -0
  147. package/dist/components/loading/styled.js +26 -19
  148. package/dist/components/map/index.js +28 -6
  149. package/dist/components/map/styled.js +1 -1
  150. package/dist/components/notification/index.js +67 -0
  151. package/dist/components/notification/logic.js +30 -0
  152. package/dist/components/notification/store.js +23 -0
  153. package/dist/components/notification/styled.js +52 -0
  154. package/dist/components/object-profile-card/components/avatar/index.js +9 -10
  155. package/dist/components/object-profile-card/index.js +19 -20
  156. package/dist/components/paginated-list/index.js +2 -3
  157. package/dist/components/phone-input/index.js +18 -22
  158. package/dist/components/phone-input/logic.js +14 -0
  159. package/dist/components/phone-input/styled.js +12 -4
  160. package/dist/components/placeholder/index.js +10 -0
  161. package/dist/components/placeholder/logic.js +12 -0
  162. package/dist/components/placeholder/styled.js +32 -0
  163. package/dist/components/positional-tooltip/index.js +24 -0
  164. package/dist/components/positional-tooltip/styled.js +17 -0
  165. package/dist/components/property-mapping/index.js +204 -423
  166. package/dist/components/property-mapping/logic.js +156 -0
  167. package/dist/components/property-mapping/styled.js +199 -0
  168. package/dist/components/prr-map/components/controls/index.js +4 -6
  169. package/dist/components/prr-map/components/legend/index.js +26 -28
  170. package/dist/components/prr-map/index.js +5 -5
  171. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  172. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  173. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  174. package/dist/components/range-selector/components/number-range/index.js +48 -53
  175. package/dist/components/range-selector/components/string-range/index.js +15 -17
  176. package/dist/components/range-selector/index.js +63 -57
  177. package/dist/components/range-selector/logic.js +12 -0
  178. package/dist/components/range-selector/styled.js +4294 -0
  179. package/dist/components/raster-grid-map/components/controls/index.js +4 -6
  180. package/dist/components/raster-grid-map/components/legend/index.js +4 -6
  181. package/dist/components/raster-grid-map/index.js +5 -5
  182. package/dist/components/scroll-drag/index.js +22 -0
  183. package/dist/components/scroll-drag/logic.js +39 -0
  184. package/dist/components/scroll-drag/styled.js +17 -0
  185. package/dist/components/search-input/logic.js +35 -33
  186. package/dist/components/simple-pivot-table/index.js +12 -12
  187. package/dist/components/sortable-list/index.js +599 -0
  188. package/dist/components/sortable-list/logic.js +18 -0
  189. package/dist/components/sortable-list/styled.js +38 -0
  190. package/dist/components/static-text/index.js +6 -6
  191. package/dist/components/stats-box/index.js +12 -0
  192. package/dist/components/stats-box/styled.js +36 -0
  193. package/dist/components/template-filters/components/filter/index.js +13 -18
  194. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  195. package/dist/components/template-filters/index.js +21 -29
  196. package/dist/components/template-filters/logic.js +18 -0
  197. package/dist/components/template-filters/styled.js +44 -1
  198. package/dist/components/template-form/components/property-list/index.js +27 -26
  199. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  200. package/dist/components/template-form/components/property-list/property-list-form.js +758 -14
  201. package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
  202. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  203. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -23
  204. package/dist/components/template-form/components/select-icon/index.js +24 -24
  205. package/dist/components/template-form/helpers.js +17 -0
  206. package/dist/components/template-form/index.js +270 -309
  207. package/dist/components/template-form/logic.js +69 -0
  208. package/dist/components/template-form/styled.js +84 -0
  209. package/dist/components/template-property-filters/index.js +45 -95
  210. package/dist/components/template-property-filters/logic.js +27 -0
  211. package/dist/components/template-property-filters/property.js +105 -165
  212. package/dist/components/template-property-filters/styled.js +121 -20
  213. package/dist/components/text-overflow/index.js +6 -0
  214. package/dist/components/text-overflow/styled.js +13 -0
  215. package/dist/components/timeline/index.js +12 -12
  216. package/dist/components/toggle-view-button/index.js +35 -0
  217. package/dist/components/toggle-view-button/logic.js +22 -0
  218. package/dist/components/toggle-view-button/styled.js +11 -0
  219. package/dist/components/tree-select/index.js +52 -67
  220. package/dist/components/tree-select/logic.js +59 -0
  221. package/dist/components/tree-select/styled.js +45 -62
  222. package/dist/components/treeview-filter/index.js +43 -65
  223. package/dist/components/treeview-filter/item/index.js +43 -42
  224. package/dist/components/treeview-filter/item-label/index.js +17 -37
  225. package/dist/components/treeview-filter/logic.js +28 -0
  226. package/dist/components/treeview-filter/styled.js +86 -0
  227. package/dist/components/uploader/index.js +532 -567
  228. package/dist/components/uploader/logic.js +74 -0
  229. package/dist/components/uploader/styled.js +93 -46
  230. package/dist/components/visually-hidden-input/index.js +4 -0
  231. package/dist/components/visually-hidden-input/styled.js +18 -0
  232. package/dist/createChainedFunction-C0nujS3O.js +9 -0
  233. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-Ch_cT8az.js} +69 -68
  234. package/dist/createSvgIcon-DuDuASu1.js +62 -0
  235. package/dist/{dialog-DcwXug9J.js → dialog-BYRnCztH.js} +18 -18
  236. package/dist/formControlState-vgaj2ksH.js +10 -0
  237. package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
  238. package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
  239. package/dist/index-BtlzPygz.js +470 -0
  240. package/dist/index-DH6qsPBn.js +153 -0
  241. package/dist/{index-syTc6m_V.js → index-e9xTIYWt.js} +87 -87
  242. package/dist/main.d.ts +1722 -562
  243. package/dist/main.js +161 -128
  244. package/dist/ownerWindow-wg6foiOE.js +10 -0
  245. package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
  246. package/dist/styled-Db1RdcPA.js +323 -0
  247. package/dist/unsupportedProp-DuqR2hj9.js +36 -0
  248. package/dist/useId-BW-oWmul.js +19 -0
  249. package/dist/useMobilePicker-CY8ndYRL.js +8279 -0
  250. package/dist/useSlot-B_Q4vnX5.js +42 -0
  251. package/package.json +15 -7
  252. package/dist/AccordionSummary-DgAwVTk8.js +0 -742
  253. package/dist/Add-DJLrrVHm.js +0 -382
  254. package/dist/Box-p6OtTUEo.js +0 -30
  255. package/dist/ButtonBase-2bPw77UP.js +0 -961
  256. package/dist/CardContent-CSHh-ZlM.js +0 -74
  257. package/dist/Checkbox-CWRMFTBp.js +0 -421
  258. package/dist/FormControl-BLbrq4C7.js +0 -1636
  259. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  260. package/dist/InputAdornment-DLxWUE6H.js +0 -157
  261. package/dist/List-tqElle9C.js +0 -121
  262. package/dist/ListItem-CfjsIg4B.js +0 -430
  263. package/dist/Modal-DhPpOoGB.js +0 -1299
  264. package/dist/Paper-2B03OBmZ.js +0 -169
  265. package/dist/Select-BgYwkZgI.js +0 -2613
  266. package/dist/TextField-1yCesIbH.js +0 -457
  267. package/dist/assertThisInitialized-BUtkG-md.js +0 -13
  268. package/dist/capitalize-ciszXJ7R.js +0 -9
  269. package/dist/components/instance-form/components/composite-list/styled.js +0 -73
  270. package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
  271. package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
  272. package/dist/components/key-protection/index.js +0 -4
  273. package/dist/components/key-protection/menu.js +0 -85
  274. package/dist/components/key-protection/utils.js +0 -10
  275. package/dist/components/treeview-filter/item/styled.js +0 -39
  276. package/dist/createSvgIcon-BjpIhJ30.js +0 -71
  277. package/dist/createTheme-DYxDnE9u.js +0 -612
  278. package/dist/index-BMS1Otro.js +0 -183
  279. package/dist/index-CcdvNlgr.js +0 -503
  280. package/dist/index-kCJ_Zvl8.js +0 -34
  281. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  282. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  283. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  284. package/dist/property-list-form-zZQfpR0X.js +0 -386
  285. package/dist/styled-eZwjUruw.js +0 -12
  286. package/dist/unsupportedProp-BND8AB6O.js +0 -25
  287. package/dist/useId-B4-oF9Mq.js +0 -34
  288. package/dist/useMobilePicker-BLg3Blg8.js +0 -7589
  289. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  290. package/dist/utils-BDNynJcd.js +0 -365
  291. package/dist/utils-Bq0ye5vf.js +0 -115
@@ -4,10 +4,10 @@ import K from "dayjs";
4
4
  import Q from "lodash";
5
5
  import { useId as U, useRef as ee, useEffect as te } from "react";
6
6
  import { colorSetFromPalette as ie } from "../_common/utils.js";
7
- import { m as I, f as N, e as j, p as C } from "../../../ColorSet-C7vpNXhM.js";
7
+ import { m as I, f as k, e as j, p as C } from "../../../ColorSet-C7vpNXhM.js";
8
8
  import { a as ae, H as F } from "../../../Hierarchy-Bihj0S61.js";
9
9
  import { R as z } from "../../../RoundedRectangle-CWLi2PXn.js";
10
- import { r as ne, c as k, a as O } from "../../../constant-BiOGvlZc.js";
10
+ import { r as ne, c as O, a as R } from "../../../constant-BiOGvlZc.js";
11
11
  class L extends V {
12
12
  constructor() {
13
13
  super(...arguments), Object.defineProperty(this, "labels", {
@@ -70,102 +70,102 @@ Object.defineProperty(L, "classNames", {
70
70
  writable: !0,
71
71
  value: V.classNames.concat([L.className])
72
72
  });
73
- function se(h) {
74
- h.x0 = Math.round(h.x0), h.y0 = Math.round(h.y0), h.x1 = Math.round(h.x1), h.y1 = Math.round(h.y1);
73
+ function se(u) {
74
+ u.x0 = Math.round(u.x0), u.y0 = Math.round(u.y0), u.x1 = Math.round(u.x1), u.y1 = Math.round(u.y1);
75
75
  }
76
- function x(h, t, i, a, s) {
77
- for (var l = h.children, n, g = -1, b = l.length, m = h.value && (a - t) / h.value; ++g < b; )
78
- n = l[g], n.y0 = i, n.y1 = s, n.x0 = t, n.x1 = t += n.value * m;
76
+ function x(u, t, i, a, r) {
77
+ for (var l = u.children, n, h = -1, b = l.length, c = u.value && (a - t) / u.value; ++h < b; )
78
+ n = l[h], n.y0 = i, n.y1 = r, n.x0 = t, n.x1 = t += n.value * c;
79
79
  }
80
- function A(h, t, i, a, s) {
81
- for (var l = h.children, n, g = -1, b = l.length, m = h.value && (s - i) / h.value; ++g < b; )
82
- n = l[g], n.x0 = t, n.x1 = a, n.y0 = i, n.y1 = i += n.value * m;
80
+ function A(u, t, i, a, r) {
81
+ for (var l = u.children, n, h = -1, b = l.length, c = u.value && (r - i) / u.value; ++h < b; )
82
+ n = l[h], n.x0 = t, n.x1 = a, n.y0 = i, n.y1 = i += n.value * c;
83
83
  }
84
84
  var re = (1 + Math.sqrt(5)) / 2;
85
- function oe(h, t, i, a, s, l) {
86
- for (var n = [], g = t.children, b, m, r = 0, p = 0, e = g.length, c, u, o = t.value, d, f, v, P, D, y, w; r < e; ) {
87
- c = s - i, u = l - a;
85
+ function oe(u, t, i, a, r, l) {
86
+ for (var n = [], h = t.children, b, c, o = 0, m = 0, e = h.length, d, g, f = t.value, s, p, _, w, T, y, v; o < e; ) {
87
+ d = r - i, g = l - a;
88
88
  do
89
- d = g[p++].value;
90
- while (!d && p < e);
91
- for (f = v = d, y = Math.max(u / c, c / u) / (o * h), w = d * d * y, D = Math.max(v / w, w / f); p < e; ++p) {
92
- if (d += m = g[p].value, m < f && (f = m), m > v && (v = m), w = d * d * y, P = Math.max(v / w, w / f), P > D) {
93
- d -= m;
89
+ s = h[m++].value;
90
+ while (!s && m < e);
91
+ for (p = _ = s, y = Math.max(g / d, d / g) / (f * u), v = s * s * y, T = Math.max(_ / v, v / p); m < e; ++m) {
92
+ if (s += c = h[m].value, c < p && (p = c), c > _ && (_ = c), v = s * s * y, w = Math.max(_ / v, v / p), w > T) {
93
+ s -= c;
94
94
  break;
95
95
  }
96
- D = P;
96
+ T = w;
97
97
  }
98
- n.push(b = { value: d, dice: c < u, children: g.slice(r, p) }), b.dice ? x(b, i, a, s, o ? a += u * d / o : l) : A(b, i, a, o ? i += c * d / o : s, l), o -= d, r = p;
98
+ n.push(b = { value: s, dice: d < g, children: h.slice(o, m) }), b.dice ? x(b, i, a, r, f ? a += g * s / f : l) : A(b, i, a, f ? i += d * s / f : r, l), f -= s, o = m;
99
99
  }
100
100
  return n;
101
101
  }
102
- const M = function h(t) {
103
- function i(a, s, l, n, g) {
104
- oe(t, a, s, l, n, g);
102
+ const M = function u(t) {
103
+ function i(a, r, l, n, h) {
104
+ oe(t, a, r, l, n, h);
105
105
  }
106
106
  return i.ratio = function(a) {
107
- return h((a = +a) > 1 ? a : 1);
107
+ return u((a = +a) > 1 ? a : 1);
108
108
  }, i;
109
109
  }(re);
110
110
  function q() {
111
- var h = M, t = !1, i = 1, a = 1, s = [0], l = k, n = k, g = k, b = k, m = k;
112
- function r(e) {
113
- return e.x0 = e.y0 = 0, e.x1 = i, e.y1 = a, e.eachBefore(p), s = [0], t && e.eachBefore(se), e;
111
+ var u = M, t = !1, i = 1, a = 1, r = [0], l = O, n = O, h = O, b = O, c = O;
112
+ function o(e) {
113
+ return e.x0 = e.y0 = 0, e.x1 = i, e.y1 = a, e.eachBefore(m), r = [0], t && e.eachBefore(se), e;
114
114
  }
115
- function p(e) {
116
- var c = s[e.depth], u = e.x0 + c, o = e.y0 + c, d = e.x1 - c, f = e.y1 - c;
117
- d < u && (u = d = (u + d) / 2), f < o && (o = f = (o + f) / 2), e.x0 = u, e.y0 = o, e.x1 = d, e.y1 = f, e.children && (c = s[e.depth + 1] = l(e) / 2, u += m(e) - c, o += n(e) - c, d -= g(e) - c, f -= b(e) - c, d < u && (u = d = (u + d) / 2), f < o && (o = f = (o + f) / 2), h(e, u, o, d, f));
115
+ function m(e) {
116
+ var d = r[e.depth], g = e.x0 + d, f = e.y0 + d, s = e.x1 - d, p = e.y1 - d;
117
+ s < g && (g = s = (g + s) / 2), p < f && (f = p = (f + p) / 2), e.x0 = g, e.y0 = f, e.x1 = s, e.y1 = p, e.children && (d = r[e.depth + 1] = l(e) / 2, g += c(e) - d, f += n(e) - d, s -= h(e) - d, p -= b(e) - d, s < g && (g = s = (g + s) / 2), p < f && (f = p = (f + p) / 2), u(e, g, f, s, p));
118
118
  }
119
- return r.round = function(e) {
120
- return arguments.length ? (t = !!e, r) : t;
121
- }, r.size = function(e) {
122
- return arguments.length ? (i = +e[0], a = +e[1], r) : [i, a];
123
- }, r.tile = function(e) {
124
- return arguments.length ? (h = ne(e), r) : h;
125
- }, r.padding = function(e) {
126
- return arguments.length ? r.paddingInner(e).paddingOuter(e) : r.paddingInner();
127
- }, r.paddingInner = function(e) {
128
- return arguments.length ? (l = typeof e == "function" ? e : O(+e), r) : l;
129
- }, r.paddingOuter = function(e) {
130
- return arguments.length ? r.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : r.paddingTop();
131
- }, r.paddingTop = function(e) {
132
- return arguments.length ? (n = typeof e == "function" ? e : O(+e), r) : n;
133
- }, r.paddingRight = function(e) {
134
- return arguments.length ? (g = typeof e == "function" ? e : O(+e), r) : g;
135
- }, r.paddingBottom = function(e) {
136
- return arguments.length ? (b = typeof e == "function" ? e : O(+e), r) : b;
137
- }, r.paddingLeft = function(e) {
138
- return arguments.length ? (m = typeof e == "function" ? e : O(+e), r) : m;
139
- }, r;
119
+ return o.round = function(e) {
120
+ return arguments.length ? (t = !!e, o) : t;
121
+ }, o.size = function(e) {
122
+ return arguments.length ? (i = +e[0], a = +e[1], o) : [i, a];
123
+ }, o.tile = function(e) {
124
+ return arguments.length ? (u = ne(e), o) : u;
125
+ }, o.padding = function(e) {
126
+ return arguments.length ? o.paddingInner(e).paddingOuter(e) : o.paddingInner();
127
+ }, o.paddingInner = function(e) {
128
+ return arguments.length ? (l = typeof e == "function" ? e : R(+e), o) : l;
129
+ }, o.paddingOuter = function(e) {
130
+ return arguments.length ? o.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : o.paddingTop();
131
+ }, o.paddingTop = function(e) {
132
+ return arguments.length ? (n = typeof e == "function" ? e : R(+e), o) : n;
133
+ }, o.paddingRight = function(e) {
134
+ return arguments.length ? (h = typeof e == "function" ? e : R(+e), o) : h;
135
+ }, o.paddingBottom = function(e) {
136
+ return arguments.length ? (b = typeof e == "function" ? e : R(+e), o) : b;
137
+ }, o.paddingLeft = function(e) {
138
+ return arguments.length ? (c = typeof e == "function" ? e : R(+e), o) : c;
139
+ }, o;
140
140
  }
141
- function le(h, t, i, a, s) {
142
- var l = h.children, n, g = l.length, b, m = new Array(g + 1);
143
- for (m[0] = b = n = 0; n < g; ++n)
144
- m[n + 1] = b += l[n].value;
145
- r(0, g, h.value, t, i, a, s);
146
- function r(p, e, c, u, o, d, f) {
147
- if (p >= e - 1) {
148
- var v = l[p];
149
- v.x0 = u, v.y0 = o, v.x1 = d, v.y1 = f;
141
+ function le(u, t, i, a, r) {
142
+ var l = u.children, n, h = l.length, b, c = new Array(h + 1);
143
+ for (c[0] = b = n = 0; n < h; ++n)
144
+ c[n + 1] = b += l[n].value;
145
+ o(0, h, u.value, t, i, a, r);
146
+ function o(m, e, d, g, f, s, p) {
147
+ if (m >= e - 1) {
148
+ var _ = l[m];
149
+ _.x0 = g, _.y0 = f, _.x1 = s, _.y1 = p;
150
150
  return;
151
151
  }
152
- for (var P = m[p], D = c / 2 + P, y = p + 1, w = e - 1; y < w; ) {
153
- var T = y + w >>> 1;
154
- m[T] < D ? y = T + 1 : w = T;
152
+ for (var w = c[m], T = d / 2 + w, y = m + 1, v = e - 1; y < v; ) {
153
+ var N = y + v >>> 1;
154
+ c[N] < T ? y = N + 1 : v = N;
155
155
  }
156
- D - m[y - 1] < m[y] - D && p + 1 < y && --y;
157
- var _ = m[y] - P, R = c - _;
158
- if (d - u > f - o) {
159
- var H = c ? (u * R + d * _) / c : d;
160
- r(p, y, _, u, o, H, f), r(y, e, R, H, o, d, f);
156
+ T - c[y - 1] < c[y] - T && m + 1 < y && --y;
157
+ var D = c[y] - w, P = d - D;
158
+ if (s - g > p - f) {
159
+ var H = d ? (g * P + s * D) / d : s;
160
+ o(m, y, D, g, f, H, p), o(y, e, P, H, f, s, p);
161
161
  } else {
162
- var S = c ? (o * R + f * _) / c : f;
163
- r(p, y, _, u, o, d, S), r(y, e, R, u, S, d, f);
162
+ var S = d ? (f * P + p * D) / d : p;
163
+ o(m, y, D, g, f, s, S), o(y, e, P, g, S, s, p);
164
164
  }
165
165
  }
166
166
  }
167
- function de(h, t, i, a, s) {
168
- (h.depth & 1 ? A : x)(h, t, i, a, s);
167
+ function de(u, t, i, a, r) {
168
+ (u.depth & 1 ? A : x)(u, t, i, a, r);
169
169
  }
170
170
  class Y extends F {
171
171
  constructor() {
@@ -228,26 +228,26 @@ class Y extends F {
228
228
  if (this._rootNode) {
229
229
  const t = this._treemapLayout;
230
230
  t.size([this.innerWidth(), this.innerHeight()]);
231
- const i = this.get("nodePaddingLeft"), a = this.get("nodePaddingRight"), s = this.get("nodePaddingTop"), l = this.get("nodePaddingBottom"), n = this.get("nodePaddingInner"), g = this.get("nodePaddingOuter");
232
- N(i) && t.paddingLeft(i), N(a) && t.paddingRight(a), N(s) && t.paddingTop(s), N(l) && t.paddingBottom(l), N(n) && t.paddingInner(n), N(g) && t.paddingOuter(g), t(this._rootNode), this._updateNodes(this._rootNode);
231
+ const i = this.get("nodePaddingLeft"), a = this.get("nodePaddingRight"), r = this.get("nodePaddingTop"), l = this.get("nodePaddingBottom"), n = this.get("nodePaddingInner"), h = this.get("nodePaddingOuter");
232
+ k(i) && t.paddingLeft(i), k(a) && t.paddingRight(a), k(r) && t.paddingTop(r), k(l) && t.paddingBottom(l), k(n) && t.paddingInner(n), k(h) && t.paddingOuter(h), t(this._rootNode), this._updateNodes(this._rootNode);
233
233
  }
234
234
  }
235
235
  _updateNode(t) {
236
236
  super._updateNode(t);
237
- const i = t.get("node"), a = t.get("rectangle"), s = t.get("d3HierarchyNode"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), g = s.x0 * l, b = s.x1 * l, m = s.y0 * n, r = s.y1 * n, p = b - g, e = r - m, c = this.get("animationDuration", 0), u = this.get("animationEasing");
238
- if (i.animate({ key: "x", to: g, duration: c, easing: u }), i.animate({ key: "y", to: m, duration: c, easing: u }), i.animate({ key: "width", to: p, duration: c, easing: u }), i.animate({ key: "height", to: e, duration: c, easing: u }), a) {
239
- const o = t.get("fill"), d = t.get("fillPattern");
240
- a.animate({ key: "width", to: p, duration: c, easing: u }), a.animate({ key: "height", to: e, duration: c, easing: u }), a._setDefault("fill", o), a._setDefault("fillPattern", d), a._setDefault("stroke", o);
237
+ const i = t.get("node"), a = t.get("rectangle"), r = t.get("d3HierarchyNode"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), h = r.x0 * l, b = r.x1 * l, c = r.y0 * n, o = r.y1 * n, m = b - h, e = o - c, d = this.get("animationDuration", 0), g = this.get("animationEasing");
238
+ if (i.animate({ key: "x", to: h, duration: d, easing: g }), i.animate({ key: "y", to: c, duration: d, easing: g }), i.animate({ key: "width", to: m, duration: d, easing: g }), i.animate({ key: "height", to: e, duration: d, easing: g }), a) {
239
+ const f = t.get("fill"), s = t.get("fillPattern");
240
+ a.animate({ key: "width", to: m, duration: d, easing: g }), a.animate({ key: "height", to: e, duration: d, easing: g }), a._setDefault("fill", f), a._setDefault("fillPattern", s), a._setDefault("stroke", f);
241
241
  }
242
242
  }
243
243
  _updateNodesScale(t) {
244
244
  const i = t.data.dataItem;
245
245
  if (i) {
246
- const a = i.get("node"), s = i.get("rectangle"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), g = t.x0 * l, b = t.x1 * l, m = t.y0 * n, r = t.y1 * n, p = b - g, e = r - m;
247
- a.setAll({ x: g, y: m, width: p, height: e }), s.setAll({ width: p, height: e });
248
- const c = t.children;
249
- c && j(c, (u) => {
250
- this._updateNodesScale(u);
246
+ const a = i.get("node"), r = i.get("rectangle"), l = this.getPrivate("scaleX", 1), n = this.getPrivate("scaleY", 1), h = t.x0 * l, b = t.x1 * l, c = t.y0 * n, o = t.y1 * n, m = b - h, e = o - c;
247
+ a.setAll({ x: h, y: c, width: m, height: e }), r.setAll({ width: m, height: e });
248
+ const d = t.children;
249
+ d && j(d, (g) => {
250
+ this._updateNodesScale(g);
251
251
  });
252
252
  }
253
253
  }
@@ -257,27 +257,27 @@ class Y extends F {
257
257
  makeNode(t) {
258
258
  const i = super.makeNode(t), a = i.children.moveValue(this.rectangles.make(), 0);
259
259
  i.setPrivate("tooltipTarget", a), t.setRaw("rectangle", a);
260
- const s = t.get("label");
260
+ const r = t.get("label");
261
261
  return a.on("width", () => {
262
- s.setPrivate("maxWidth", a.width());
262
+ r.setPrivate("maxWidth", a.width());
263
263
  }), a.on("height", () => {
264
- s.setPrivate("maxHeight", a.height());
264
+ r.setPrivate("maxHeight", a.height());
265
265
  }), i;
266
266
  }
267
267
  _zoom(t) {
268
268
  if (this.width() > 0 && this.height() > 0) {
269
269
  const i = t.get("d3HierarchyNode"), a = this.get("nodePaddingOuter", 0);
270
- let s = i.x0 + a, l = i.x1 - a, n = i.y0 + a, g = i.y1 - a, b = (this.innerWidth() - a * 2) / (l - s), m = (this.innerHeight() - a * 2) / (g - n);
271
- const r = this.get("animationEasing");
272
- let p = this.get("animationDuration", 0);
273
- this.inited || (p = 0), this.animatePrivate({ key: "scaleX", to: b, duration: p, easing: r }), this.animatePrivate({ key: "scaleY", to: m, duration: p, easing: r }), this.nodesContainer.animate({ key: "x", to: a - s * b, duration: p, easing: r }), this.nodesContainer.animate({ key: "y", to: a - n * m, duration: p, easing: r });
270
+ let r = i.x0 + a, l = i.x1 - a, n = i.y0 + a, h = i.y1 - a, b = (this.innerWidth() - a * 2) / (l - r), c = (this.innerHeight() - a * 2) / (h - n);
271
+ const o = this.get("animationEasing");
272
+ let m = this.get("animationDuration", 0);
273
+ this.inited || (m = 0), this.animatePrivate({ key: "scaleX", to: b, duration: m, easing: o }), this.animatePrivate({ key: "scaleY", to: c, duration: m, easing: o }), this.nodesContainer.animate({ key: "x", to: a - r * b, duration: m, easing: o }), this.nodesContainer.animate({ key: "y", to: a - n * c, duration: m, easing: o });
274
274
  }
275
275
  }
276
276
  _selectDataItem(t, i, a) {
277
277
  if (super._selectDataItem(t, i, a), t) {
278
- let s = this.get("downDepth", 1) + t.get("depth");
279
- this.inited || (s = this.get("initialDepth", 1));
280
- const l = this._getVisibleNodes(t, s);
278
+ let r = this.get("downDepth", 1) + t.get("depth");
279
+ this.inited || (r = this.get("initialDepth", 1));
280
+ const l = this._getVisibleNodes(t, r);
281
281
  this.nodes.each((n) => {
282
282
  l.indexOf(n.dataItem) == -1 ? n.setPrivate("focusable", !1) : n.removePrivate("focusable");
283
283
  });
@@ -286,10 +286,10 @@ class Y extends F {
286
286
  }
287
287
  _getVisibleNodes(t, i) {
288
288
  const a = t.get("children");
289
- let s = [];
289
+ let r = [];
290
290
  return a && j(a, (l) => {
291
- l.get("depth") == i || !l.get("children") ? s.push(l) : s = s.concat(this._getVisibleNodes(l, i));
292
- }), s;
291
+ l.get("depth") == i || !l.get("children") ? r.push(l) : r = r.concat(this._getVisibleNodes(l, i));
292
+ }), r;
293
293
  }
294
294
  }
295
295
  Object.defineProperty(Y, "className", {
@@ -304,40 +304,34 @@ Object.defineProperty(Y, "classNames", {
304
304
  writable: !0,
305
305
  value: F.classNames.concat([Y.className])
306
306
  });
307
- const we = (h) => {
308
- const t = G({ props: h, name: "HCDrillDownTreemap" }), {
307
+ const we = (u) => {
308
+ const t = G({ props: u, name: "HCDrillDownTreemap" }), {
309
309
  dimensions: i,
310
310
  values: a,
311
- data: s,
311
+ data: r,
312
312
  initDelay: l = 0,
313
313
  colors: n,
314
- sx: g,
314
+ sx: h,
315
315
  ...b
316
- } = t, m = J(), p = `hc-drill-down-treemap-${U().replace(/:/g, "")}`, e = ee(null);
317
- te(() => {
318
- let u;
319
- return u = setTimeout(() => {
320
- var D;
321
- if (i.length < 2) {
322
- console.error("DrillDownTreemap requires at least 2 dimensions");
323
- return;
324
- }
325
- if (a.length < 1) {
326
- console.error("DrillDownTreemap requires at least 1 value");
327
- return;
328
- }
329
- const o = E.new(p);
330
- e.current = o;
331
- const d = Z.new(o);
332
- d.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth1"]).setAll({ strokeWidth: 2 }), d.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth2"]).setAll({ strokeWidth: 1, strokeOpacity: 0.2 }), d.rule("Label", ["node", "depth1"]).setAll({ fontSize: 10 }), d.rule("Label", ["node", "depth2"]).setAll({ fontSize: 10 }), o.setThemes([$.new(o), d]);
333
- const f = o.container.children.push(
334
- V.new(o, {
316
+ } = t, c = J(), m = `hc-drill-down-treemap-${U().replace(/:/g, "")}`, e = ee(null);
317
+ let d = null;
318
+ i.length < 2 ? d = "DrillDownTreemap requires at least 2 dimensions" : a.length < 1 && (d = "DrillDownTreemap requires at least 1 value"), te(() => {
319
+ if (d) return;
320
+ let f;
321
+ return f = setTimeout(() => {
322
+ var y;
323
+ const s = E.new(m);
324
+ e.current = s;
325
+ const p = Z.new(s);
326
+ p.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth1"]).setAll({ strokeWidth: 2 }), p.rule("RoundedRectangle", ["hierarchy", "node", "shape", "depth2"]).setAll({ strokeWidth: 1, strokeOpacity: 0.2 }), p.rule("Label", ["node", "depth1"]).setAll({ fontSize: 10 }), p.rule("Label", ["node", "depth2"]).setAll({ fontSize: 10 }), s.setThemes([$.new(s), p]);
327
+ const _ = s.container.children.push(
328
+ V.new(s, {
335
329
  width: C(100),
336
330
  height: C(100),
337
- layout: o.verticalLayout
331
+ layout: s.verticalLayout
338
332
  })
339
- ), v = f.children.push(
340
- Y.new(o, {
333
+ ), w = _.children.push(
334
+ Y.new(s, {
341
335
  sort: "descending",
342
336
  singleBranchOnly: !1,
343
337
  downDepth: 1,
@@ -350,41 +344,41 @@ const we = (h) => {
350
344
  nodePaddingInner: 0
351
345
  })
352
346
  );
353
- v.nodes.template.setPrivate("trustBounds", !0), v.set("colors", ie(o, n)), (D = v.get("colors")) == null || D.set("step", 1), f.children.moveValue(
354
- L.new(o, { series: v }),
347
+ w.nodes.template.setPrivate("trustBounds", !0), w.set("colors", ie(s, n)), (y = w.get("colors")) == null || y.set("step", 1), _.children.moveValue(
348
+ L.new(s, { series: w }),
355
349
  0
356
350
  );
357
- const P = (y, w, T) => {
358
- if (y === "date") {
359
- let _ = "YYYY";
360
- return w.includes("month") ? _ = "MMM YYYY" : w.includes("day") && (_ = "DD MMM YYYY"), K(T).format(_);
351
+ const T = (v, N, D) => {
352
+ if (v === "date") {
353
+ let P = "YYYY";
354
+ return N.includes("month") ? P = "MMM YYYY" : N.includes("day") && (P = "DD MMM YYYY"), K(D).format(P);
361
355
  }
362
- return T;
356
+ return D;
363
357
  };
364
358
  if (i.length > 1) {
365
- const y = Q.groupBy(s, i[0].value), w = [];
366
- Object.keys(y).forEach((T) => {
367
- w.push({
368
- name: P(i[0].type, i[0].value, T),
369
- children: y[T].map((_) => ({
370
- name: P(
359
+ const v = Q.groupBy(r, i[0].value), N = [];
360
+ Object.keys(v).forEach((D) => {
361
+ N.push({
362
+ name: T(i[0].type, i[0].value, D),
363
+ children: v[D].map((P) => ({
364
+ name: T(
371
365
  i[1].type,
372
366
  i[1].value,
373
- _[i[1].value]
367
+ P[i[1].value]
374
368
  ),
375
- [a[0].dataFieldName]: _[a[0].dataFieldName]
369
+ [a[0].dataFieldName]: P[a[0].dataFieldName]
376
370
  }))
377
371
  });
378
- }), v.data.setAll([{ name: "Home", children: w }]);
372
+ }), w.data.setAll([{ name: "Home", children: N }]);
379
373
  }
380
- v.set("selectedDataItem", v.dataItems[0]);
374
+ w.set("selectedDataItem", w.dataItems[0]);
381
375
  }, l), () => {
382
- var o;
383
- u && clearTimeout(u), (o = e.current) == null || o.dispose(), e.current = null;
376
+ var s;
377
+ f && clearTimeout(f), (s = e.current) == null || s.dispose(), e.current = null;
384
378
  };
385
- }, [s, i, a, m.palette.mode, n]);
386
- const c = { ...t };
387
- return { chartId: p, ownerState: c, sx: g, other: b };
379
+ }, [r, i, a, c.palette.mode, n]);
380
+ const g = { ...t };
381
+ return { chartId: m, ownerState: g, sx: h, error: d, other: b };
388
382
  };
389
383
  export {
390
384
  we as useDrillDownTreemapLogic
@@ -1,10 +1,11 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useDrillDownVoronoiTreemapLogic as m } from "./logic.js";
3
- import { DrillDownVoronoiTreemapRoot as l } from "./styled.js";
4
- function a(r) {
5
- const { chartId: i, ownerState: e, sx: t, other: n } = m(r);
6
- return /* @__PURE__ */ o(l, { ownerState: e, sx: t, ...n, children: /* @__PURE__ */ o("div", { id: i, style: { width: "100%", height: "100%" } }) });
7
- }
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { ChartError as l } from "../_common/chart-error.js";
3
+ import { useDrillDownVoronoiTreemapLogic as p } from "./logic.js";
4
+ import { DrillDownVoronoiTreemapRoot as s } from "./styled.js";
5
+ const d = (e) => {
6
+ const { chartId: t, ownerState: i, sx: m, error: o, other: n } = p(e);
7
+ return /* @__PURE__ */ r(s, { ownerState: i, sx: m, ...n, children: o ? /* @__PURE__ */ r(l, { message: o }) : /* @__PURE__ */ r("div", { id: t, style: { width: "100%", height: "100%" } }) });
8
+ };
8
9
  export {
9
- a as DrillDownVoronoiTreemap
10
+ d as DrillDownVoronoiTreemap
10
11
  };