@hybridcore/ui 1.5.90 → 1.6.0

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 (267) hide show
  1. package/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-DgAwVTk8.js} +81 -82
  2. package/dist/{Add-CMz4N2zT.js → Add-DJLrrVHm.js} +52 -51
  3. package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
  4. package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
  5. package/dist/AxisRendererY-C_ItLPNV.js +445 -0
  6. package/dist/Box-p6OtTUEo.js +30 -0
  7. package/dist/Bullet-DVczI2TD.js +41 -0
  8. package/dist/Button-CcsPEIDh.js +35 -0
  9. package/dist/{Button-eqWvpDuh.js → Button-CvE2gnly.js} +138 -124
  10. package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-2bPw77UP.js} +5 -5
  11. package/dist/{CardContent-DsYqqPeJ.js → CardContent-CSHh-ZlM.js} +4 -4
  12. package/dist/CategoryAxis-CwnfaGc8.js +458 -0
  13. package/dist/{Checkbox-CrU2hpWB.js → Checkbox-CWRMFTBp.js} +12 -11
  14. package/dist/Circle-Cy5s-pVc.js +27 -0
  15. package/dist/ColorSet-C7vpNXhM.js +2957 -0
  16. package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
  17. package/dist/DataProcessor-CHDO51q4.js +83 -0
  18. package/dist/DateAxis-YX3QNIB-.js +569 -0
  19. package/dist/{Delete-86TO0fMo.js → Delete-CW0UZv1m.js} +1 -1
  20. package/dist/{DialogContent-CqTojymQ.js → DialogContent-B3nbEbuv.js} +10 -11
  21. package/dist/FormControl-BLbrq4C7.js +1636 -0
  22. package/dist/{FormControlLabel-BrdX4R71.js → FormControlLabel-C8SPv14J.js} +8 -8
  23. package/dist/Hierarchy-Bihj0S61.js +925 -0
  24. package/dist/{IconButton-DJ-31-Fd.js → IconButton-CHwRQF-g.js} +20 -19
  25. package/dist/IconPlus-yPkff_Vj.js +19 -0
  26. package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-DLxWUE6H.js} +6 -6
  27. package/dist/Legend-Dp_MKfS4.js +178 -0
  28. package/dist/LineSeries-Uiv5o56b.js +472 -0
  29. package/dist/{List-DOD5kSk3.js → List-tqElle9C.js} +4 -4
  30. package/dist/{ListItem-r8PbsvCz.js → ListItem-CfjsIg4B.js} +9 -8
  31. package/dist/{MenuItem-C6qlUyV3.js → MenuItem-xZx_w7zA.js} +14 -13
  32. package/dist/{Modal-CkcFEpHa.js → Modal-DhPpOoGB.js} +292 -277
  33. package/dist/{Paper-CjqLScHA.js → Paper-2B03OBmZ.js} +47 -41
  34. package/dist/PieSeries-B2fW3z0s.js +693 -0
  35. package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
  36. package/dist/Scrollbar-D86MJyr2.js +171 -0
  37. package/dist/{Select-t3ewnSdf.js → Select-BgYwkZgI.js} +2066 -1633
  38. package/dist/Slice-B19rbYDZ.js +261 -0
  39. package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
  40. package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
  41. package/dist/{TextField-BQ8a50fA.js → TextField-1yCesIbH.js} +23 -25
  42. package/dist/Tick-2bcLyHpF.js +162 -0
  43. package/dist/{Typography-D1t7XuLN.js → Typography-CxbneZy_.js} +11 -11
  44. package/dist/Vector-BmuhQO4p.js +3606 -0
  45. package/dist/Vector-DfTqQEln.js +1735 -0
  46. package/dist/WKT-2wsDT-nq.js +2310 -0
  47. package/dist/XYCursor-C8WktvKM.js +362 -0
  48. package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
  49. package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
  50. package/dist/capitalize-ciszXJ7R.js +9 -0
  51. package/dist/components/access/helpers.js +1 -1
  52. package/dist/components/access/index.js +1 -1
  53. package/dist/components/card/index.js +6 -6
  54. package/dist/components/card/styled.js +1 -1
  55. package/dist/components/charts/_common/utils.js +20 -0
  56. package/dist/components/charts/candlestick/logic.js +170 -140
  57. package/dist/components/charts/chart-wrapper/helpers.js +27 -0
  58. package/dist/components/charts/chart-wrapper/index.js +44 -0
  59. package/dist/components/charts/chart-wrapper/logic.js +47 -0
  60. package/dist/components/charts/chart-wrapper/styled.js +44 -0
  61. package/dist/components/charts/column-line-mix/index.js +10 -0
  62. package/dist/components/charts/column-line-mix/logic.js +162 -0
  63. package/dist/components/charts/column-line-mix/styled.js +12 -0
  64. package/dist/components/charts/drill-down-treemap/index.js +10 -0
  65. package/dist/components/charts/drill-down-treemap/logic.js +391 -0
  66. package/dist/components/charts/drill-down-treemap/styled.js +12 -0
  67. package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
  68. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
  69. package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
  70. package/dist/components/charts/heatmap/index.js +10 -0
  71. package/dist/components/charts/heatmap/logic.js +361 -0
  72. package/dist/components/charts/heatmap/styled.js +12 -0
  73. package/dist/components/charts/highlighting-line-data/logic.js +89 -256
  74. package/dist/components/charts/line/index.js +10 -0
  75. package/dist/components/charts/line/logic.js +148 -0
  76. package/dist/components/charts/line/styled.js +12 -0
  77. package/dist/components/charts/logaritmic-scale/index.js +10 -0
  78. package/dist/components/charts/logaritmic-scale/logic.js +119 -0
  79. package/dist/components/charts/logaritmic-scale/styled.js +12 -0
  80. package/dist/components/charts/multiple-value-axes/index.js +10 -0
  81. package/dist/components/charts/multiple-value-axes/logic.js +191 -0
  82. package/dist/components/charts/multiple-value-axes/styled.js +12 -0
  83. package/dist/components/charts/nested-pie/index.js +10 -0
  84. package/dist/components/charts/nested-pie/logic.js +110 -0
  85. package/dist/components/charts/nested-pie/styled.js +12 -0
  86. package/dist/components/charts/packed-circles/index.js +10 -0
  87. package/dist/components/charts/packed-circles/logic.js +423 -0
  88. package/dist/components/charts/packed-circles/styled.js +12 -0
  89. package/dist/components/charts/pie-chart/index.js +10 -0
  90. package/dist/components/charts/pie-chart/logic.js +70 -0
  91. package/dist/components/charts/pie-chart/styled.js +12 -0
  92. package/dist/components/charts/stacked-area-radar/index.js +10 -0
  93. package/dist/components/charts/stacked-area-radar/logic.js +868 -0
  94. package/dist/components/charts/stacked-area-radar/styled.js +12 -0
  95. package/dist/components/charts/stacked-column-chart/index.js +10 -0
  96. package/dist/components/charts/stacked-column-chart/logic.js +148 -0
  97. package/dist/components/charts/stacked-column-chart/styled.js +12 -0
  98. package/dist/components/charts/xy-chart/index.js +10 -0
  99. package/dist/components/charts/xy-chart/logic.js +170 -0
  100. package/dist/components/charts/xy-chart/styled.js +12 -0
  101. package/dist/components/collapsible-card/index.js +58 -32
  102. package/dist/components/collapsible-card/logic.js +20 -0
  103. package/dist/components/collapsible-card/styled.js +52 -0
  104. package/dist/components/confirm/dialog.js +3 -3
  105. package/dist/components/confirm/index.js +1 -1
  106. package/dist/components/container/index.js +7 -7
  107. package/dist/components/context-menu/index.js +153 -253
  108. package/dist/components/data-map/components/controls/index.js +12 -0
  109. package/dist/components/data-map/components/controls/styled.js +34 -0
  110. package/dist/components/data-map/index.js +51 -0
  111. package/dist/components/data-map/logic.js +108 -0
  112. package/dist/components/data-map/styled.js +32 -0
  113. package/dist/components/data-security-selectors/security-level/index.js +5 -5
  114. package/dist/components/date-picker-with-custom-range/index.js +9 -0
  115. package/dist/components/date-picker-with-custom-range/logic.js +66 -0
  116. package/dist/components/date-picker-with-custom-range/styled.js +43 -0
  117. package/dist/components/divider/index.js +18 -0
  118. package/dist/components/divider/logic.js +13 -0
  119. package/dist/components/divider/styled.js +14 -0
  120. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  121. package/dist/components/geometry-picker/edit/index.js +1 -1
  122. package/dist/components/geometry-picker/geometry/index.js +1 -1
  123. package/dist/components/geometry-picker/index.js +7 -8
  124. package/dist/components/geometry-picker/kml/index.js +1 -1
  125. package/dist/components/geometry-picker/map/index.js +1 -1
  126. package/dist/components/geometry-picker/map/logic.js +65 -62
  127. package/dist/components/geometry-picker/map/style.js +1 -1
  128. package/dist/components/heat-map/components/controls/index.js +12 -0
  129. package/dist/components/heat-map/components/controls/styled.js +34 -0
  130. package/dist/components/heat-map/components/legend/index.js +26 -0
  131. package/dist/components/heat-map/components/legend/styled.js +14 -0
  132. package/dist/components/heat-map/index.js +37 -0
  133. package/dist/components/heat-map/logic.js +1945 -0
  134. package/dist/components/heat-map/styled.js +32 -0
  135. package/dist/components/icon-button/index.js +22 -15
  136. package/dist/components/icon-button/logic.js +15 -0
  137. package/dist/components/icon-button/styled.js +22 -10
  138. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  139. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
  140. package/dist/components/instance-form/components/variable/index.js +8 -8
  141. package/dist/components/instance-form/components/variables/index.js +1 -1
  142. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  143. package/dist/components/instance-variable-list/index.js +34 -29
  144. package/dist/components/instance-variable-list/styled.js +21 -21
  145. package/dist/components/instance-variable-list/variable.js +44 -74
  146. package/dist/components/linear-indicator/index.js +10 -67
  147. package/dist/components/linear-indicator/logic.js +47 -0
  148. package/dist/components/linear-indicator/styled.js +39 -40
  149. package/dist/components/map/helpers/kml.js +1 -1
  150. package/dist/components/map/helpers/mapbox.js +14 -14
  151. package/dist/components/map/helpers/ol.js +23 -19
  152. package/dist/components/map/helpers/wkt.js +26 -1314
  153. package/dist/components/map/index.js +1 -1
  154. package/dist/components/map/logic.js +113 -101
  155. package/dist/components/map/styled.js +39 -31
  156. package/dist/components/metric-card/MetricChart.js +50 -498
  157. package/dist/components/metric-card/index.js +94 -115
  158. package/dist/components/metric-card/logic.js +70 -131
  159. package/dist/components/object-profile-card/components/avatar/index.js +44 -0
  160. package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
  161. package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
  162. package/dist/components/object-profile-card/index.js +90 -0
  163. package/dist/components/object-profile-card/logic.js +33 -0
  164. package/dist/components/object-profile-card/styled.js +48 -0
  165. package/dist/components/paginated-list/index.js +93 -89
  166. package/dist/components/paginated-list/logic.js +51 -40
  167. package/dist/components/paginated-list/styled.js +25 -21
  168. package/dist/components/property-mapping/index.js +2 -2
  169. package/dist/components/prr-map/components/controls/index.js +12 -0
  170. package/dist/components/prr-map/components/controls/styled.js +34 -0
  171. package/dist/components/prr-map/components/legend/index.js +36 -0
  172. package/dist/components/prr-map/components/legend/styled.js +21 -0
  173. package/dist/components/prr-map/index.js +38 -0
  174. package/dist/components/prr-map/logic.js +104 -0
  175. package/dist/components/prr-map/styled.js +32 -0
  176. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  177. package/dist/components/range-selector/components/date-range/index.js +4282 -7
  178. package/dist/components/range-selector/index.js +1 -1
  179. package/dist/components/raster-grid-map/components/controls/index.js +12 -0
  180. package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
  181. package/dist/components/raster-grid-map/components/legend/index.js +14 -0
  182. package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
  183. package/dist/components/raster-grid-map/helpers.js +190 -0
  184. package/dist/components/raster-grid-map/index.js +38 -0
  185. package/dist/components/raster-grid-map/logic.js +172 -0
  186. package/dist/components/raster-grid-map/styled.js +32 -0
  187. package/dist/components/search-input/index.js +62 -140
  188. package/dist/components/search-input/logic.js +43 -0
  189. package/dist/components/search-input/styled.js +33 -0
  190. package/dist/components/simple-pivot-table/index.js +66 -0
  191. package/dist/components/simple-pivot-table/logic.js +51 -0
  192. package/dist/components/simple-pivot-table/styled.js +45 -0
  193. package/dist/components/static-text/index.js +18 -0
  194. package/dist/components/static-text/logic.js +13 -0
  195. package/dist/components/static-text/styled.js +45 -0
  196. package/dist/components/tabs/index.js +56 -2160
  197. package/dist/components/tabs/logic.js +36 -0
  198. package/dist/components/tabs/styled.js +94 -16
  199. package/dist/components/tabs/tab-panel.js +11 -10
  200. package/dist/components/template-filters/components/tab-panel/index.js +1 -1
  201. package/dist/components/template-form/components/property-list/index.js +7 -7
  202. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  203. package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
  204. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  205. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  206. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
  207. package/dist/components/template-form/index.js +5 -5
  208. package/dist/components/template-property-filters/property.js +5 -5
  209. package/dist/components/timeline/index.js +61 -0
  210. package/dist/components/timeline/logic.js +40 -0
  211. package/dist/components/timeline/styled.js +48 -0
  212. package/dist/components/tree-select/index.js +5 -5
  213. package/dist/components/treeview-filter/item-label/index.js +3 -3
  214. package/dist/constant-BiOGvlZc.js +21 -0
  215. package/dist/createReactComponent-C7L-DMHj.js +60 -0
  216. package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BjpIhJ30.js} +30 -32
  217. package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DrtgaibK.js} +5 -5
  218. package/dist/{createTheme-CNnKNxwL.js → createTheme-DYxDnE9u.js} +226 -285
  219. package/dist/{dialog-BE4D6swf.js → dialog-DcwXug9J.js} +6 -6
  220. package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
  221. package/dist/index-BMS1Otro.js +183 -0
  222. package/dist/index-C__OZmYy.js +663 -0
  223. package/dist/{index-CGNxsLVm.js → index-CcdvNlgr.js} +7 -7
  224. package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
  225. package/dist/index-syTc6m_V.js +1934 -0
  226. package/dist/index.es-CHNMhaMi.js +2067 -0
  227. package/dist/index.esm-BLLrbTzY.js +318 -0
  228. package/dist/{listItemTextClasses-CNjn41Of.js → listItemTextClasses-C3lndiXO.js} +2 -2
  229. package/dist/main.d.ts +1226 -358
  230. package/dist/main.js +141 -443
  231. package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
  232. package/dist/ol-yOE-NV0X.js +7465 -0
  233. package/dist/path-CNVruS--.js +84 -0
  234. package/dist/{property-list-form-C5hcK2y2.js → property-list-form-zZQfpR0X.js} +13 -13
  235. package/dist/styled-eZwjUruw.js +12 -0
  236. package/dist/useId-B4-oF9Mq.js +34 -0
  237. package/dist/useMobilePicker-BLg3Blg8.js +7589 -0
  238. package/dist/useThemeProps-BzzHcQyd.js +58 -0
  239. package/dist/{utils-CsOZUsQj.js → utils-BDNynJcd.js} +2 -2
  240. package/package.json +11 -2
  241. package/dist/AxisRendererY-kADUad00.js +0 -18370
  242. package/dist/Box-B1AVyJ_s.js +0 -71
  243. package/dist/DateAxis-CMum47iz.js +0 -924
  244. package/dist/Input-CoIrGZAh.js +0 -326
  245. package/dist/InputLabel-CBuAYyuT.js +0 -1367
  246. package/dist/LineSeries-CfcpoYla.js +0 -549
  247. package/dist/OutlinedInput-B-iZoc9l.js +0 -450
  248. package/dist/Tabs-Cn42Z5QI.js +0 -789
  249. package/dist/components/collapsible-card/style.js +0 -49
  250. package/dist/components/profile-card/index.js +0 -80
  251. package/dist/components/profile-card/logic.js +0 -33
  252. package/dist/components/profile-card/styled.js +0 -43
  253. package/dist/components/tabs/appleTabs.style.js +0 -55
  254. package/dist/createStyled-BGx1I94c.js +0 -352
  255. package/dist/createTheme-CyC5HawC.js +0 -879
  256. package/dist/exactProp-cjT0t_Pt.js +0 -36
  257. package/dist/extendSxProp-FEpqY5_S.js +0 -30
  258. package/dist/index-DMSHuq6l.js +0 -688
  259. package/dist/index-SpeaLUQD.js +0 -10963
  260. package/dist/ol-lGwSyEIV.js +0 -15050
  261. package/dist/ownerDocument-CUrv0DIK.js +0 -6
  262. package/dist/ownerWindow-niciwP7I.js +0 -7
  263. package/dist/styled-B8ugzvji.js +0 -12
  264. package/dist/useId-BHG98T5I.js +0 -26
  265. package/dist/useTheme-C15Eq8KG.js +0 -18
  266. package/dist/useTheme-D-uii9iX.js +0 -10
  267. package/dist/useThemeProps-DRP1dikX.js +0 -95
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, Fragment as a } from "react/jsx-runtime";
2
2
  import n from "lodash";
3
3
  import f from "./components/composite-list-range/index.js";
4
- import { D as g } from "../../index-SpeaLUQD.js";
4
+ import g from "./components/date-range/index.js";
5
5
  import u from "./components/geometry-range/index.js";
6
6
  import l from "./components/number-range/index.js";
7
7
  import s from "./components/string-range/index.js";
@@ -0,0 +1,12 @@
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { Container as t, Button as r } from "./styled.js";
3
+ import { I as s, a as l } from "../../../../IconPlus-yPkff_Vj.js";
4
+ function m({ mapRef: n }) {
5
+ return n ? /* @__PURE__ */ i(t, { children: [
6
+ /* @__PURE__ */ o(r, { onClick: n.zoomIn, children: /* @__PURE__ */ o(s, { size: 18 }) }),
7
+ /* @__PURE__ */ o(r, { onClick: n.zoomOut, children: /* @__PURE__ */ o(l, { size: 18 }) })
8
+ ] }) : null;
9
+ }
10
+ export {
11
+ m as Controls
12
+ };
@@ -0,0 +1,34 @@
1
+ import { styled as a, Box as r, IconButton as n } from "@mui/material";
2
+ const t = a(r, {
3
+ name: "HCRasterGridMapControls",
4
+ slot: "Root"
5
+ })(({ theme: o }) => ({
6
+ position: "absolute",
7
+ left: o.spacing(1),
8
+ bottom: o.spacing(1),
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ gap: o.spacing(0.5)
12
+ })), s = a(n, {
13
+ name: "HCRasterGridMapControls",
14
+ slot: "Button"
15
+ })(({ theme: o }) => ({
16
+ borderRadius: o.shape.borderRadius,
17
+ backgroundColor: o.palette.background.paper,
18
+ border: "1px solid",
19
+ borderColor: o.palette.divider,
20
+ width: o.spacing(3),
21
+ height: o.spacing(3),
22
+ padding: o.spacing(0.5),
23
+ ".MuiSvgIcon-root": {
24
+ width: o.spacing(2),
25
+ height: o.spacing(2)
26
+ },
27
+ "&:hover": {
28
+ backgroundColor: o.palette.background.default
29
+ }
30
+ }));
31
+ export {
32
+ s as Button,
33
+ t as Container
34
+ };
@@ -0,0 +1,14 @@
1
+ import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
+ import { Typography as l } from "@mui/material";
3
+ import { FlexCol as e } from "../../../flex-col/index.js";
4
+ import { FlexRow as p } from "../../../flex-row/index.js";
5
+ import { Container as t, ColorBox as x } from "./styled.js";
6
+ function a({ heatScale: m }) {
7
+ return !m || m.bins.length === 0 ? null : /* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(e, { children: m.bins.map((r, n) => /* @__PURE__ */ i(p, { gap: 0.5, children: [
8
+ /* @__PURE__ */ o(x, { bgcolor: r.color }),
9
+ /* @__PURE__ */ o(l, { variant: "overline", children: r.min !== r.max ? r.min + "-" + r.max : r.min })
10
+ ] }, n)) }) });
11
+ }
12
+ export {
13
+ a as Legend
14
+ };
@@ -0,0 +1,21 @@
1
+ import { styled as t, Paper as a, Box as n } from "@mui/material";
2
+ const i = t(a, {
3
+ name: "HCRasterGridMapLegend",
4
+ slot: "Root"
5
+ })(({ theme: o }) => ({
6
+ position: "absolute",
7
+ right: o.spacing(1),
8
+ bottom: o.spacing(1),
9
+ padding: o.spacing(0.5),
10
+ backgroundColor: o.palette.background.default
11
+ })), s = t(n, {
12
+ name: "HCRasterGridMapLegend",
13
+ slot: "ColorBox"
14
+ })(() => ({
15
+ height: 18,
16
+ width: 24
17
+ }));
18
+ export {
19
+ s as ColorBox,
20
+ i as Container
21
+ };
@@ -0,0 +1,190 @@
1
+ import { DEFAULT_VIRIDIS_COOL as A } from "../charts/_common/utils.js";
2
+ const E = A;
3
+ function H(r) {
4
+ const { min: i, max: o, count: n, mode: t } = r;
5
+ if (n <= 0) return [];
6
+ if (i > o) return [];
7
+ if (i === o)
8
+ return Array.from({ length: n }, () => ({ min: i, max: o }));
9
+ const c = [];
10
+ if (t === "linear") {
11
+ const e = (o - i) / n;
12
+ for (let l = 0; l <= n; l++) c.push(i + e * l);
13
+ } else {
14
+ const e = Math.max(1, i), l = Math.log10(e), f = (Math.log10(o) - l) / n;
15
+ for (let M = 0; M <= n; M++) c.push(Math.pow(10, l + f * M));
16
+ c[0] = i;
17
+ }
18
+ c[c.length - 1] = o;
19
+ const u = [];
20
+ let m = i - 1;
21
+ for (let e = 0; e < n; e++) {
22
+ const l = m + 1;
23
+ let a = e === n - 1 ? o : Math.floor(c[e + 1]);
24
+ if (a = Math.max(a, l), a = Math.min(a, o), u.push({ min: l, max: a }), m = a, m >= o) {
25
+ for (let f = e + 1; f < n; f++) u.push({ min: o, max: o });
26
+ break;
27
+ }
28
+ }
29
+ return u;
30
+ }
31
+ function p(r, i, o) {
32
+ return Math.min(o, Math.max(i, Math.trunc(r)));
33
+ }
34
+ function k(r, i, o) {
35
+ const n = r.map((t) => ({ ...t, min: Math.trunc(t.min), max: Math.trunc(t.max) }));
36
+ if (n.length === 0) return n;
37
+ n.sort((t, c) => t.min - c.min), n[0].min = p(n[0].min, i, o), n[0].max = p(n[0].max, n[0].min, o);
38
+ for (let t = 1; t < n.length; t++)
39
+ n[t].min = Math.max(n[t].min, n[t - 1].max + 1), n[t].min = p(n[t].min, i, o), n[t].max = p(n[t].max, n[t].min, o);
40
+ return n[n.length - 1].max = o, n;
41
+ }
42
+ function w(r, i, o) {
43
+ if (i === 1) return r[r.length - 1];
44
+ const n = o / (i - 1), t = Math.round(n * (r.length - 1));
45
+ return r[Math.min(r.length - 1, Math.max(0, t))];
46
+ }
47
+ function D(r) {
48
+ const { palette: i, colorsCount: o, positives: n, lowCut: t, highCut: c, middleMode: u = "log" } = r;
49
+ if (o < 1) throw new Error("colorsCount must be >= 1");
50
+ if (i.length < o) throw new Error("palette has fewer colors than colorsCount");
51
+ const m = n.filter((x) => Number.isFinite(x) && x > 0).map((x) => Math.trunc(x));
52
+ if (m.length === 0)
53
+ return Array.from({ length: o }, (x, C) => ({
54
+ index: C,
55
+ color: w(i, o, C),
56
+ min: 0,
57
+ max: 0
58
+ }));
59
+ const e = Math.min(...m), l = Math.max(...m), a = t == null ? void 0 : p(t, e, l), f = c == null ? void 0 : p(c, e, l), M = a ?? e, d = f ?? l, N = Math.min(M, d), b = Math.max(M, d), s = a != null ? 1 : 0, h = f != null ? 1 : 0, I = Math.max(0, o - s - h), P = [];
60
+ let g = 0;
61
+ s && (P.push({
62
+ index: g,
63
+ color: w(i, o, g),
64
+ min: e,
65
+ max: N
66
+ }), g++);
67
+ const B = s ? N + 1 : e, L = h ? b - 1 : l;
68
+ if (I > 0 && B <= L) {
69
+ const x = H({
70
+ min: B,
71
+ max: L,
72
+ count: I,
73
+ mode: u
74
+ });
75
+ for (let C = 0; C < x.length; C++)
76
+ P.push({
77
+ index: g,
78
+ color: w(i, o, g),
79
+ min: x[C].min,
80
+ max: x[C].max
81
+ }), g++;
82
+ } else if (I > 0)
83
+ for (let x = 0; x < I; x++)
84
+ P.push({
85
+ index: g,
86
+ color: w(i, o, g),
87
+ min: b,
88
+ max: b
89
+ }), g++;
90
+ return h && (P.push({
91
+ index: g,
92
+ color: w(i, o, g),
93
+ min: b,
94
+ max: l
95
+ }), g++), k(P, e, l);
96
+ }
97
+ function _(r) {
98
+ const { palette: i, colorsCount: o, positives: n } = r;
99
+ if (n.length === 0) return [];
100
+ const t = n[0], c = n[n.length - 1];
101
+ if (t === c) {
102
+ const u = w(i, o, o - 1);
103
+ return [{ index: o, color: u, min: t, max: c }];
104
+ }
105
+ return D(r);
106
+ }
107
+ function v(r) {
108
+ const i = [], o = r.result ?? [];
109
+ for (const n of o)
110
+ if (n !== null)
111
+ for (const t of n)
112
+ t == null || Number.isNaN(t) || t > 0 && i.push(Math.trunc(t));
113
+ return i.sort((n, t) => n - t), i;
114
+ }
115
+ function y(r, i) {
116
+ if (r.length === 0) return 0;
117
+ const o = Math.min(1, Math.max(0, i)), n = (r.length - 1) * o, t = Math.floor(n), c = Math.ceil(n);
118
+ if (t === c) return r[t];
119
+ const u = n - t;
120
+ return r[t] * (1 - u) + r[c] * u;
121
+ }
122
+ function z(r, i) {
123
+ const { lowPct: o = 0.8, highPct: n = 0.99, minLowCut: t = 1, minGap: c = 1 } = i ?? {};
124
+ if (r.length === 0) return { lowCut: 0, highCut: 0 };
125
+ const u = r[0], m = r[r.length - 1];
126
+ if (u === m) return { lowCut: u, highCut: m };
127
+ let e = Math.floor(y(r, o)), l = Math.ceil(y(r, n));
128
+ return e = p(e, Math.max(t, u), m), l = p(l, u, m), l < e + c && (e + c <= m ? l = e + c : e = Math.max(u, m - c)), { lowCut: e, highCut: l };
129
+ }
130
+ function O(r, i) {
131
+ const {
132
+ mode: o = "log",
133
+ palette: n = [...E].reverse(),
134
+ nullColor: t = "transparent",
135
+ zeroColor: c = n[0] ?? "transparent",
136
+ clamp: u = !0,
137
+ treatNegativeAsNull: m = !0
138
+ } = i ?? {};
139
+ if (!n.length) throw new Error("Palette must have at least 1 color.");
140
+ const e = r.result ?? [];
141
+ for (const s of e)
142
+ if (s !== null)
143
+ for (const h of s)
144
+ h == null || Number.isNaN(h) || m && h < 0;
145
+ const l = v(r), a = l.length > 0, { lowCut: f, highCut: M } = z(l, {
146
+ lowPct: 0.8,
147
+ // try 0.7–0.9
148
+ highPct: 0.99
149
+ // try 0.97–0.995
150
+ }), d = _({
151
+ palette: n,
152
+ colorsCount: 5,
153
+ positives: l,
154
+ lowCut: f,
155
+ highCut: M,
156
+ middleMode: "log"
157
+ }), N = (s) => {
158
+ if (s == null || Number.isNaN(s) || m && s < 0 || s === 0 || !a) return null;
159
+ if (u) {
160
+ if (s <= f) return d[0] ?? null;
161
+ if (s >= M) return d[d.length - 1] ?? null;
162
+ }
163
+ for (const h of d)
164
+ if (s >= h.min && s <= h.max) return h;
165
+ return null;
166
+ };
167
+ return {
168
+ mode: o,
169
+ palette: n,
170
+ lowCut: f,
171
+ highCut: M,
172
+ bins: d,
173
+ getColor: (s) => {
174
+ if (s == null || Number.isNaN(s) || m && s < 0) return t;
175
+ if (s === 0) return c;
176
+ const h = N(s);
177
+ return h ? h.color : u ? s < f ? n[0] : n[n.length - 1] : t;
178
+ },
179
+ getBin: N,
180
+ zeroColor: c,
181
+ nullColor: t
182
+ };
183
+ }
184
+ export {
185
+ O as createHeatMapScale,
186
+ z as deriveDynamicCuts,
187
+ v as extractPositiveInts,
188
+ y as percentileSorted,
189
+ E as viridisCool
190
+ };
@@ -0,0 +1,38 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { Typography as d } from "@mui/material";
3
+ import { useEffect as l } from "react";
4
+ import { u as h } from "../../index.esm-BLLrbTzY.js";
5
+ import { M as u } from "../../index-kCJ_Zvl8.js";
6
+ import { Controls as R } from "./components/controls/index.js";
7
+ import { Legend as M } from "./components/legend/index.js";
8
+ import { useRasterGridMapLogic as g } from "./logic.js";
9
+ import { RasterGridMapRoot as z, RasterGridMapHeader as G, RasterGridMapContent as x } from "./styled.js";
10
+ function D(o) {
11
+ const { refs: r, state: m, actions: i, ownerState: t, sx: f, other: p } = g(o), { width: a, height: s, ref: c } = h();
12
+ return l(() => (a && s && i.onMapResize(), () => {
13
+ }), [a, s]), /* @__PURE__ */ n(z, { ownerState: t, sx: f, ref: c, ...p, children: [
14
+ /* @__PURE__ */ e(G, { ownerState: t, children: /* @__PURE__ */ e(d, { variant: "h3", children: o.title }) }),
15
+ /* @__PURE__ */ n(x, { ownerState: t, children: [
16
+ /* @__PURE__ */ e(
17
+ u,
18
+ {
19
+ id: r.mapId.current,
20
+ ref: r.mapRef,
21
+ center: { latitude: 0, longitude: 0 },
22
+ zoom: 3,
23
+ options: {
24
+ cssPosition: "absolute",
25
+ controls: { zoom: !1 },
26
+ interactions: { mouseWheelZoom: !1 }
27
+ },
28
+ onInit: i.onInit
29
+ }
30
+ ),
31
+ /* @__PURE__ */ e(M, { heatScale: m.heatScale }),
32
+ /* @__PURE__ */ e(R, { mapRef: r.mapRef.current })
33
+ ] })
34
+ ] });
35
+ }
36
+ export {
37
+ D as RasterGridMap
38
+ };
@@ -0,0 +1,172 @@
1
+ import { useThemeProps as gt, useTheme as xt } from "@mui/material";
2
+ import { uniqueId as ht } from "lodash";
3
+ import { Feature as yt } from "ol";
4
+ import { b as wt, P as St, f as k, g as Tt } from "../../Source-BSZST_GH.js";
5
+ import { V as Ct } from "../../Vector-BmuhQO4p.js";
6
+ import { V as Lt } from "../../Vector-DfTqQEln.js";
7
+ import { S as A, T as vt, F, I as Mt, a as bt, C as Xt } from "../../Text-ChJRuaD8.js";
8
+ import { useRef as m, useState as q, useEffect as O } from "react";
9
+ import { DEFAULT_VIRIDIS_COOL as Yt } from "../charts/_common/utils.js";
10
+ import { createMapboxLayer as Gt } from "../map/helpers/mapbox.js";
11
+ import { createHeatMapScale as Rt } from "./helpers.js";
12
+ const Et = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='93'%20height='93'%20viewBox='0%200%2093%2093'%3e%3ccircle%20id='Ellipse_748'%20data-name='Ellipse%20748'%20cx='46.5'%20cy='46.5'%20r='46.5'%20fill='%23fff'%20opacity='0.925'/%3e%3c/svg%3e", Ft = 0.25, It = (r) => {
13
+ const u = r.getGeometry(), a = r.get("icon"), p = r.get("iconColor"), h = r.get("iconTextColor"), y = r.get("showText"), w = r.get("title"), S = r.get("scale");
14
+ return u && u.getType() === "Point" && a ? new A({
15
+ ...y && {
16
+ text: new vt({
17
+ text: w,
18
+ font: "10px sans-serif",
19
+ fill: new F({ color: h ?? "#ddd" })
20
+ })
21
+ },
22
+ image: new Mt({
23
+ anchor: [0.5, 0.5],
24
+ src: a,
25
+ scale: S ?? Ft,
26
+ color: p ?? "#b32f5b"
27
+ }),
28
+ zIndex: 2
29
+ }) : new A({
30
+ fill: new F({ color: "rgba(255, 255, 255, 0.25)" }),
31
+ stroke: new bt({ color: "#3069AA", width: 2 }),
32
+ image: new Xt({
33
+ radius: 5,
34
+ fill: new F({ color: "#444" })
35
+ })
36
+ });
37
+ }, Ut = (r) => {
38
+ const u = gt({ props: r, name: "HCRasterGridMap" }), {
39
+ data: a,
40
+ payload: p,
41
+ onPayloadUpdate: h,
42
+ accessToken: y,
43
+ palette: w = Yt,
44
+ sx: S,
45
+ ...U
46
+ } = u, T = xt(), I = m(ht("map-")), o = m(null), l = m(null), C = m(null), s = m(null), L = m(), [B, W] = q(!1), [Z, N] = q(null), z = () => {
47
+ let t = 3;
48
+ if (o.current) {
49
+ const e = o.current.getZoomLevel() || 3;
50
+ e > 11 ? t = 6 : e > 9 ? t = 5 : e > 5 && (t = 4);
51
+ }
52
+ return t;
53
+ }, j = () => {
54
+ var P, D, H;
55
+ if (!B || !o.current || !a) return;
56
+ const { result: t, rowCount: e, columnCount: n, minX: c, minY: i, maxX: d, maxY: f } = a, v = [c, i, d, f], [nt, rt] = Tt(v), M = nt / n, b = rt / e, ct = ((P = o.current) == null ? void 0 : P.getZoomLevel()) || 3;
57
+ (D = C.current) == null || D.clear();
58
+ const X = Rt(a, {
59
+ palette: [...w].reverse(),
60
+ mode: "log",
61
+ nullColor: "transparent",
62
+ zeroColor: "transparent"
63
+ });
64
+ if (N(X), t !== null)
65
+ for (let g = 0; g < e; g++) {
66
+ const V = t[g];
67
+ if (V !== null)
68
+ for (let x = 0; x < n; x++) {
69
+ const Y = V[x];
70
+ if (Y < 2) continue;
71
+ const G = c + x * M, R = i + (e - g - 1) * b, at = G + M, st = R + b, it = G + M / 2, lt = R + b / 2, mt = wt(
72
+ [it, lt],
73
+ "EPSG:4326",
74
+ "EPSG:3857"
75
+ ), ut = {
76
+ bottomLeft: { latitude: R, longitude: G },
77
+ topRight: { latitude: st, longitude: at }
78
+ }, pt = ct / z(), E = X.getBin(Y), dt = (((E == null ? void 0 : E.index) || 0) + 1) * 0.1, ft = new yt({
79
+ geometry: new St(mt),
80
+ icon: Et,
81
+ iconColor: X.getColor(Y),
82
+ iconTextColor: "#fff",
83
+ showText: pt > 1.5,
84
+ boundingBox: ut,
85
+ scale: dt
86
+ });
87
+ (H = C.current) == null || H.addFeature(ft);
88
+ }
89
+ }
90
+ }, J = () => {
91
+ let t = {
92
+ gridLevel: z(),
93
+ minX: -180,
94
+ minY: -180,
95
+ maxX: 180,
96
+ maxY: 180
97
+ };
98
+ if (o.current) {
99
+ const e = o.current.getBoundingBox();
100
+ t = {
101
+ ...t,
102
+ minX: e.bottomLeft.longitude,
103
+ minY: e.bottomLeft.latitude,
104
+ maxX: e.topRight.longitude,
105
+ maxY: e.topRight.latitude
106
+ };
107
+ }
108
+ return t;
109
+ }, _ = () => {
110
+ const t = {
111
+ ...p,
112
+ heatGridMapFilter: J()
113
+ };
114
+ h(t);
115
+ }, K = () => {
116
+ L.current && clearTimeout(L.current), L.current = setTimeout(() => {
117
+ var t;
118
+ (t = o.current) == null || t.updateSize(), l.current && l.current.map.resize();
119
+ }, 100);
120
+ }, Q = () => {
121
+ var t, e;
122
+ (t = o.current) == null || t.on("movestart", () => {
123
+ s.current && (clearTimeout(s.current), s.current = null);
124
+ }), (e = o.current) == null || e.on("moveend", () => {
125
+ s.current && (clearTimeout(s.current), s.current = null), s.current = setTimeout(_, 500);
126
+ });
127
+ };
128
+ function $(t) {
129
+ const [e, n] = k([t.minX, t.minY]), [c, i] = k([t.maxX, t.maxY]);
130
+ return [e, n, c, i];
131
+ }
132
+ const tt = () => {
133
+ var d, f;
134
+ const t = T.palette.mode === "light" ? "mapbox://styles/mapbox/light-v11" : "mapbox://styles/mapbox/dark-v11", e = Gt({
135
+ id: I.current,
136
+ center: [0, 0],
137
+ style: t,
138
+ accessToken: y
139
+ });
140
+ (d = o.current) == null || d.addLayer(e.layer), l.current = e;
141
+ const n = new Lt(), c = new Ct({
142
+ source: n,
143
+ style: It
144
+ });
145
+ (f = o.current) == null || f.addLayer(c), C.current = n, W(!0), Q(), _();
146
+ const { heatGridMapFilter: i } = p;
147
+ if (i && o.current) {
148
+ const v = $(i);
149
+ o.current.centerToExtent(v);
150
+ }
151
+ }, et = () => {
152
+ var n, c;
153
+ if (!l.current) return;
154
+ const t = T.palette.mode === "light" ? "mapbox://styles/mapbox/light-v11" : "mapbox://styles/mapbox/dark-v11", e = ((c = (n = l.current.layer.getSource()) == null ? void 0 : n.getMapboxMap) == null ? void 0 : c.call(n)) || l.current.map;
155
+ e && e.setStyle(t);
156
+ };
157
+ O(() => (j(), () => {
158
+ }), [a, B]), O(() => (et(), () => {
159
+ }), [T.palette.mode]);
160
+ const ot = { ...u };
161
+ return {
162
+ refs: { mapRef: o, mapId: I },
163
+ state: { heatScale: Z },
164
+ actions: { onInit: tt, onMapResize: K },
165
+ ownerState: ot,
166
+ sx: S,
167
+ other: U
168
+ };
169
+ };
170
+ export {
171
+ Ut as useRasterGridMapLogic
172
+ };
@@ -0,0 +1,32 @@
1
+ import { styled as o, Paper as r, Box as t } from "@mui/material";
2
+ const i = o(r, {
3
+ name: "HCRasterGridMap",
4
+ slot: "Root",
5
+ shouldForwardProp: (e) => e !== "ownerState"
6
+ })(() => ({
7
+ height: "100%",
8
+ display: "flex",
9
+ flexDirection: "column"
10
+ })), n = o(t, {
11
+ name: "HCRasterGridMap",
12
+ slot: "Header",
13
+ shouldForwardProp: (e) => e !== "ownerState"
14
+ })(({ theme: e }) => ({
15
+ flex: "0 0 auto",
16
+ padding: e.spacing(1.25, 2)
17
+ })), s = o(t, {
18
+ name: "HCRasterGridMap",
19
+ slot: "Content",
20
+ shouldForwardProp: (e) => e !== "ownerState"
21
+ })(() => ({
22
+ position: "relative",
23
+ display: "flex",
24
+ flexDirection: "column",
25
+ flex: "1 1 auto",
26
+ minHeight: 0
27
+ }));
28
+ export {
29
+ s as RasterGridMapContent,
30
+ n as RasterGridMapHeader,
31
+ i as RasterGridMapRoot
32
+ };