@hybridcore/ui 1.6.1 → 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 (231) 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-C5yquWAB.js +357 -0
  7. package/dist/ButtonBase-BEF7oTOe.js +887 -0
  8. package/dist/{Delete-fBLhTHbF.js → Delete-BdyYpINH.js} +9 -8
  9. package/dist/{DialogContent-CGJ7alb8.js → DialogContent-BvVjD9z3.js} +127 -122
  10. package/dist/FormGroup-CpBsIyYR.js +89 -0
  11. package/dist/{IconButton-_opV1iNK.js → IconButton-BoGwbvrP.js} +26 -26
  12. package/dist/{InputLabel-rEwwnD4_.js → InputLabel-Dd8RrneV.js} +140 -153
  13. package/dist/{MenuItem-DrE50M_p.js → MenuItem-DwqJqzuM.js} +65 -89
  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-B-Z5Y0Xq.js → Typography-DgsSLCFC.js} +28 -26
  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/logic.js +1 -1
  26. package/dist/components/button/index.js +10 -0
  27. package/dist/components/button/logic.js +26 -0
  28. package/dist/components/button/styled.js +9 -0
  29. package/dist/components/charts/_common/chart-error.js +19 -0
  30. package/dist/components/charts/candlestick/index.js +3 -3
  31. package/dist/components/charts/candlestick/logic.js +123 -113
  32. package/dist/components/charts/chart-wrapper/index.js +5 -5
  33. package/dist/components/charts/column-line-mix/index.js +9 -8
  34. package/dist/components/charts/column-line-mix/logic.js +68 -71
  35. package/dist/components/charts/drill-down-treemap/index.js +8 -7
  36. package/dist/components/charts/drill-down-treemap/logic.js +138 -144
  37. package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
  38. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
  39. package/dist/components/charts/heatmap/index.js +9 -8
  40. package/dist/components/charts/heatmap/logic.js +167 -173
  41. package/dist/components/charts/highlighting-line-data/index.js +3 -3
  42. package/dist/components/charts/line/index.js +9 -8
  43. package/dist/components/charts/line/logic.js +74 -79
  44. package/dist/components/charts/logaritmic-scale/index.js +9 -8
  45. package/dist/components/charts/logaritmic-scale/logic.js +63 -69
  46. package/dist/components/charts/multiple-value-axes/index.js +9 -8
  47. package/dist/components/charts/multiple-value-axes/logic.js +101 -107
  48. package/dist/components/charts/nested-pie/index.js +9 -8
  49. package/dist/components/charts/nested-pie/logic.js +62 -68
  50. package/dist/components/charts/packed-circles/index.js +7 -6
  51. package/dist/components/charts/packed-circles/logic.js +50 -56
  52. package/dist/components/charts/pie-chart/index.js +9 -8
  53. package/dist/components/charts/pie-chart/logic.js +49 -54
  54. package/dist/components/charts/stacked-area-radar/index.js +8 -7
  55. package/dist/components/charts/stacked-area-radar/logic.js +113 -118
  56. package/dist/components/charts/stacked-column-chart/index.js +9 -8
  57. package/dist/components/charts/stacked-column-chart/logic.js +78 -84
  58. package/dist/components/charts/xy-chart/index.js +9 -8
  59. package/dist/components/charts/xy-chart/logic.js +56 -60
  60. package/dist/components/collapsible-card/index.js +11 -10
  61. package/dist/components/collapsible-card/styled.js +1 -1
  62. package/dist/components/color-picker/index.js +7120 -0
  63. package/dist/components/color-picker/logic.js +18 -0
  64. package/dist/components/color-picker/styled.js +7 -0
  65. package/dist/components/confirm/dialog.js +3 -3
  66. package/dist/components/confirm/index.js +1 -1
  67. package/dist/components/data-grid/index.js +22 -0
  68. package/dist/components/data-grid/logic.js +15 -0
  69. package/dist/components/data-grid/styled.js +20 -0
  70. package/dist/components/data-map/components/controls/index.js +4 -6
  71. package/dist/components/data-map/index.js +11 -11
  72. package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
  73. package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
  74. package/dist/components/data-security-selectors/security-level/index.js +18 -15
  75. package/dist/components/data-security-selectors/security-level/logic.js +18 -63
  76. package/dist/components/data-security-selectors/security-level/styled.js +23 -17
  77. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  78. package/dist/components/date-range-picker/index.js +2748 -0
  79. package/dist/components/date-range-picker/styled.js +14 -0
  80. package/dist/components/date-time-picker/index.js +45 -46
  81. package/dist/components/divider/index.js +11 -11
  82. package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
  83. package/dist/components/document-viewer/components/navigation/index.js +9 -9
  84. package/dist/components/document-viewer/components/viewer/index.js +31 -35
  85. package/dist/components/document-viewer/index.js +31 -39
  86. package/dist/components/document-viewer/logic.js +41 -34
  87. package/dist/components/document-viewer/styled.js +115 -27
  88. package/dist/components/duration-select/index.js +27 -0
  89. package/dist/components/duration-select/logic.js +21 -0
  90. package/dist/components/duration-select/styled.js +26 -0
  91. package/dist/components/editable-text/index.js +20 -0
  92. package/dist/components/editable-text/logic.js +18 -0
  93. package/dist/components/editable-text/styled.js +22 -0
  94. package/dist/components/geometry-picker/coordinate/index.js +29 -29
  95. package/dist/components/geometry-picker/edit/index.js +18 -18
  96. package/dist/components/geometry-picker/geometry/index.js +67 -67
  97. package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
  98. package/dist/components/geometry-picker/index.js +69 -86
  99. package/dist/components/geometry-picker/kml/index.js +16 -16
  100. package/dist/components/geometry-picker/logic.js +50 -57
  101. package/dist/components/geometry-picker/map/index.js +8 -8
  102. package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
  103. package/dist/components/geometry-picker/parser/index.js +46 -50
  104. package/dist/components/geometry-picker/parser/styled.js +22 -4
  105. package/dist/components/geometry-picker/styled.js +97 -37
  106. package/dist/components/geometry-picker/wkt/index.js +13 -13
  107. package/dist/components/heat-map/components/controls/index.js +4 -6
  108. package/dist/components/heat-map/components/legend/index.js +15 -17
  109. package/dist/components/heat-map/index.js +7 -7
  110. package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
  111. package/dist/components/instance-form/components/composite-list/index.js +5 -3
  112. package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
  113. package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
  114. package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
  115. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
  116. package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
  117. package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
  118. package/dist/components/instance-form/components/policy-list/index.js +47 -81
  119. package/dist/components/instance-form/components/variable/index.js +6 -9
  120. package/dist/components/instance-form/components/variables/index.js +48 -55
  121. package/dist/components/instance-form/helpers.js +9 -0
  122. package/dist/components/instance-form/index.js +402 -518
  123. package/dist/components/instance-form/logic.js +115 -0
  124. package/dist/components/instance-form/styled.js +487 -0
  125. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  126. package/dist/components/instance-variable-list/index.js +11 -11
  127. package/dist/components/map/index.js +28 -6
  128. package/dist/components/map/styled.js +1 -1
  129. package/dist/components/notification/index.js +67 -0
  130. package/dist/components/notification/logic.js +30 -0
  131. package/dist/components/notification/store.js +23 -0
  132. package/dist/components/notification/styled.js +52 -0
  133. package/dist/components/object-profile-card/components/avatar/index.js +9 -10
  134. package/dist/components/object-profile-card/index.js +19 -20
  135. package/dist/components/paginated-list/index.js +2 -3
  136. package/dist/components/placeholder/index.js +10 -0
  137. package/dist/components/placeholder/logic.js +12 -0
  138. package/dist/components/placeholder/styled.js +32 -0
  139. package/dist/components/positional-tooltip/index.js +24 -0
  140. package/dist/components/positional-tooltip/styled.js +17 -0
  141. package/dist/components/property-mapping/index.js +204 -423
  142. package/dist/components/property-mapping/logic.js +156 -0
  143. package/dist/components/property-mapping/styled.js +199 -0
  144. package/dist/components/prr-map/components/controls/index.js +4 -6
  145. package/dist/components/prr-map/components/legend/index.js +26 -28
  146. package/dist/components/prr-map/index.js +5 -5
  147. package/dist/components/range-selector/styled.js +1106 -1034
  148. package/dist/components/raster-grid-map/components/controls/index.js +4 -6
  149. package/dist/components/raster-grid-map/components/legend/index.js +4 -6
  150. package/dist/components/raster-grid-map/index.js +5 -5
  151. package/dist/components/scroll-drag/index.js +22 -0
  152. package/dist/components/scroll-drag/logic.js +39 -0
  153. package/dist/components/scroll-drag/styled.js +17 -0
  154. package/dist/components/search-input/logic.js +35 -33
  155. package/dist/components/simple-pivot-table/index.js +12 -12
  156. package/dist/components/sortable-list/index.js +599 -0
  157. package/dist/components/sortable-list/logic.js +18 -0
  158. package/dist/components/sortable-list/styled.js +38 -0
  159. package/dist/components/static-text/index.js +6 -6
  160. package/dist/components/stats-box/index.js +12 -0
  161. package/dist/components/stats-box/styled.js +36 -0
  162. package/dist/components/template-form/components/property-list/index.js +27 -26
  163. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  164. package/dist/components/template-form/components/property-list/property-list-form.js +758 -12
  165. package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
  166. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  167. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -22
  168. package/dist/components/template-form/components/select-icon/index.js +24 -24
  169. package/dist/components/template-form/helpers.js +17 -0
  170. package/dist/components/template-form/index.js +270 -308
  171. package/dist/components/template-form/logic.js +69 -0
  172. package/dist/components/template-form/styled.js +84 -0
  173. package/dist/components/text-overflow/index.js +6 -0
  174. package/dist/components/text-overflow/styled.js +13 -0
  175. package/dist/components/timeline/index.js +12 -12
  176. package/dist/components/toggle-view-button/index.js +35 -0
  177. package/dist/components/toggle-view-button/logic.js +22 -0
  178. package/dist/components/toggle-view-button/styled.js +11 -0
  179. package/dist/components/tree-select/index.js +1 -1
  180. package/dist/components/visually-hidden-input/index.js +4 -0
  181. package/dist/components/visually-hidden-input/styled.js +18 -0
  182. package/dist/createChainedFunction-C0nujS3O.js +9 -0
  183. package/dist/{createSvgIcon-DX-SqL8M.js → createSvgIcon-Ch_cT8az.js} +68 -65
  184. package/dist/createSvgIcon-DuDuASu1.js +62 -0
  185. package/dist/debounce-46wSf_lW.js +15 -0
  186. package/dist/{dialog-cf4HUXXl.js → dialog-BYRnCztH.js} +30 -29
  187. package/dist/formControlState-vgaj2ksH.js +10 -0
  188. package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
  189. package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
  190. package/dist/index-BtlzPygz.js +470 -0
  191. package/dist/index-DH6qsPBn.js +153 -0
  192. package/dist/{index-C8C3YXle.js → index-e9xTIYWt.js} +139 -137
  193. package/dist/main.d.ts +1054 -330
  194. package/dist/main.js +163 -130
  195. package/dist/ownerWindow-wg6foiOE.js +10 -0
  196. package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
  197. package/dist/styled-Db1RdcPA.js +323 -0
  198. package/dist/unsupportedProp-DuqR2hj9.js +36 -0
  199. package/dist/useFormControl-CatNKXAi.js +10 -0
  200. package/dist/useId-BW-oWmul.js +19 -0
  201. package/dist/{useMobilePicker-B-M3dnTn.js → useMobilePicker-CY8ndYRL.js} +4777 -4491
  202. package/dist/useSlot-B_Q4vnX5.js +42 -0
  203. package/package.json +15 -7
  204. package/dist/AccordionSummary-CMg08YSA.js +0 -739
  205. package/dist/Add-DuVVJeQU.js +0 -380
  206. package/dist/ButtonBase-sObABYY2.js +0 -965
  207. package/dist/FormControl-BCurCxRj.js +0 -1294
  208. package/dist/FormControlLabel-BkRfrhNy.js +0 -601
  209. package/dist/InputAdornment-C7PEvvYr.js +0 -155
  210. package/dist/Modal-DlB6GH-f.js +0 -1659
  211. package/dist/Paper-q9kKjAKx.js +0 -527
  212. package/dist/TextField-DSDIEEKu.js +0 -3161
  213. package/dist/assertThisInitialized-BUtkG-md.js +0 -13
  214. package/dist/capitalize-quqpGCFu.js +0 -9
  215. package/dist/components/instance-form/components/composite-list/styled.js +0 -73
  216. package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
  217. package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
  218. package/dist/components/key-protection/index.js +0 -47
  219. package/dist/components/key-protection/logic.js +0 -40
  220. package/dist/components/key-protection/styled.js +0 -45
  221. package/dist/components/key-protection/utils.js +0 -10
  222. package/dist/createSvgIcon-BM3-TsGy.js +0 -70
  223. package/dist/index-BMS1Otro.js +0 -183
  224. package/dist/index-DPKUmQnz.js +0 -501
  225. package/dist/index-kCJ_Zvl8.js +0 -34
  226. package/dist/isMuiElement-BkJ72LB3.js +0 -26
  227. package/dist/property-list-form-DL_dEoNn.js +0 -381
  228. package/dist/styled-Bsjp3kFh.js +0 -668
  229. package/dist/unsupportedProp-BND8AB6O.js +0 -25
  230. package/dist/useId-B4-oF9Mq.js +0 -34
  231. package/dist/utils-Cxu-fHjQ.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
  };