@hybridcore/ui 1.5.89 → 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 +42 -9
  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,128 +1,107 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { useTheme as k, Stack as c, Skeleton as s } from "@mui/material";
3
- import * as L from "react";
4
- import { Widget as I } from "../widget/styled.js";
5
- import { useMetricCardLogic as O } from "./logic.js";
6
- import { MetricChart as V } from "./MetricChart.js";
7
- import { MetricCardRoot as W, MetricCardCornerIconContainer as A, MetricCardIconContainer as S, MetricCardContent as D, MetricCardLabel as J, MetricCardValue as N, MetricCardTrendContainer as P, MetricCardDescription as q, MetricCardChartContainer as B } from "./styled.js";
8
- const U = L.forwardRef(
9
- (b, l) => {
10
- const {
11
- label: h,
12
- value: m,
13
- calculatedValue: p,
14
- calculatedChange: d,
15
- description: C,
16
- variant: o,
17
- loading: T,
18
- showChange: f,
19
- showTrend: x,
20
- Icon: i,
21
- iconPosition: g,
22
- showChart: w,
23
- chartType: u,
24
- sx: M,
25
- other: v,
26
- ownerState: r,
27
- TrendIcon: z,
28
- showCornerIcon: R,
29
- showSideIcon: y,
30
- asOf: j
31
- } = O(b), n = k();
32
- let a = n.palette.text.secondary;
33
- return o === "primary" && (a = n.palette.primary.main), o === "success" && (a = n.palette.success.main), o === "warning" && (a = n.palette.warning.main), o === "danger" && (a = n.palette.error.main), T ? /* @__PURE__ */ e(W, { ref: l, ownerState: r, sx: M, ...v, children: /* @__PURE__ */ t(c, { spacing: 1, children: [
34
- /* @__PURE__ */ e(s, { variant: "text", width: "60%" }),
35
- /* @__PURE__ */ e(s, { variant: "rectangular", height: 40, width: "40%" }),
36
- /* @__PURE__ */ e(s, { variant: "text", width: "80%" }),
37
- w && /* @__PURE__ */ e(
38
- s,
39
- {
40
- variant: "rectangular",
41
- height: 40,
42
- width: "100%",
43
- sx: { mt: 2 }
44
- }
45
- )
46
- ] }) }) : /* @__PURE__ */ e(
47
- I.Root,
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { Stack as a, Skeleton as c } from "@mui/material";
3
+ import { Widget as l } from "../widget/styled.js";
4
+ import { MetricChart as u } from "./MetricChart.js";
5
+ import { useMetricCardLogic as M } from "./logic.js";
6
+ import { MetricCardRoot as v, MetricCardCornerIconContainer as I, MetricCardIconContainer as s, MetricCardContent as y, MetricCardLabel as S, MetricCardValue as T, MetricCardTrendContainer as b, MetricCardDescription as z, MetricCardChartContainer as j } from "./styled.js";
7
+ const A = (t) => {
8
+ const { state: C } = M(t), {
9
+ ownerState: r,
10
+ calculatedValue: x,
11
+ calculatedChange: o,
12
+ TrendIcon: m,
13
+ Icon: i,
14
+ showCornerIcon: g,
15
+ showSideIcon: d,
16
+ chartColor: w,
17
+ iconPosition: h,
18
+ snapshotPayload: f
19
+ } = C;
20
+ return t.loading ? /* @__PURE__ */ e(v, { ownerState: r, sx: t.sx, children: /* @__PURE__ */ n(a, { spacing: 1, children: [
21
+ /* @__PURE__ */ e(c, { variant: "text", width: "60%" }),
22
+ /* @__PURE__ */ e(c, { variant: "rectangular", height: 40, width: "40%" }),
23
+ /* @__PURE__ */ e(c, { variant: "text", width: "80%" }),
24
+ t.showChart && /* @__PURE__ */ e(
25
+ c,
48
26
  {
49
- ref: l,
50
- sx: M,
51
- ...v,
52
- "data-snapshot": JSON.stringify({
53
- metric: h,
54
- value: p,
55
- change: d,
56
- asOf: j
57
- }),
58
- children: /* @__PURE__ */ t(
59
- I.Content,
27
+ variant: "rectangular",
28
+ height: 40,
29
+ width: "100%",
30
+ sx: { mt: 2 }
31
+ }
32
+ )
33
+ ] }) }) : /* @__PURE__ */ e(l.Root, { sx: t.sx, "data-snapshot": f, children: /* @__PURE__ */ n(
34
+ l.Content,
35
+ {
36
+ sx: {
37
+ py: { xs: 1, md: 1.5 },
38
+ px: { xs: 1, md: 2 }
39
+ },
40
+ children: [
41
+ g && i && /* @__PURE__ */ e(I, { ownerState: r, children: /* @__PURE__ */ e(i, { size: 24 }) }),
42
+ /* @__PURE__ */ n(
43
+ a,
60
44
  {
61
- sx: {
62
- py: { xs: 1, md: 1.5 },
63
- px: { xs: 1, md: 2 }
64
- },
45
+ direction: "row",
46
+ justifyContent: "space-between",
47
+ alignItems: "flex-start",
48
+ sx: { flex: 1 },
65
49
  children: [
66
- R && i && /* @__PURE__ */ e(A, { ownerState: r, children: /* @__PURE__ */ e(i, { size: 24 }) }),
67
- /* @__PURE__ */ t(
68
- c,
50
+ d && i && h === "left" && /* @__PURE__ */ e(s, { ownerState: r, children: /* @__PURE__ */ e(i, { sx: { fontSize: 24 } }) }),
51
+ /* @__PURE__ */ n(y, { ownerState: r, children: [
52
+ /* @__PURE__ */ e(S, { variant: "body2", ownerState: r, children: t.label }),
53
+ /* @__PURE__ */ n(
54
+ a,
55
+ {
56
+ direction: "row",
57
+ alignItems: "baseline",
58
+ spacing: 1,
59
+ flexWrap: "wrap",
60
+ children: [
61
+ /* @__PURE__ */ e(T, { variant: "h4", ownerState: r, children: x }),
62
+ (t.showChange || t.showTrend) && o !== "—" && /* @__PURE__ */ n(b, { ownerState: r, children: [
63
+ t.showTrend && /* @__PURE__ */ e(m, { size: 16 }),
64
+ t.showChange && o
65
+ ] })
66
+ ]
67
+ }
68
+ )
69
+ ] }),
70
+ d && i && h === "right" && /* @__PURE__ */ e(s, { ownerState: r, children: /* @__PURE__ */ e(i, { sx: { fontSize: 24 } }) })
71
+ ]
72
+ }
73
+ ),
74
+ /* @__PURE__ */ n(
75
+ a,
76
+ {
77
+ direction: { xs: "column-reverse", sm: "column" },
78
+ spacing: 1,
79
+ sx: { width: "100%", mt: 2 },
80
+ children: [
81
+ t.description && /* @__PURE__ */ e(
82
+ z,
69
83
  {
70
- direction: "row",
71
- justifyContent: "space-between",
72
- alignItems: "flex-start",
73
- sx: { flex: 1 },
74
- children: [
75
- y && i && g === "left" && /* @__PURE__ */ e(S, { ownerState: r, children: /* @__PURE__ */ e(i, { sx: { fontSize: 24 } }) }),
76
- /* @__PURE__ */ t(D, { ownerState: r, children: [
77
- /* @__PURE__ */ e(J, { variant: "body2", ownerState: r, children: h }),
78
- /* @__PURE__ */ t(
79
- c,
80
- {
81
- direction: "row",
82
- alignItems: "baseline",
83
- spacing: 1,
84
- flexWrap: "wrap",
85
- children: [
86
- /* @__PURE__ */ e(N, { variant: "h4", ownerState: r, children: p }),
87
- (f || x) && d !== "—" && /* @__PURE__ */ t(P, { ownerState: r, children: [
88
- x && /* @__PURE__ */ e(z, { size: 16 }),
89
- f && d
90
- ] })
91
- ]
92
- }
93
- )
94
- ] }),
95
- y && i && g === "right" && /* @__PURE__ */ e(S, { ownerState: r, children: /* @__PURE__ */ e(i, { sx: { fontSize: 24 } }) })
96
- ]
84
+ variant: "caption",
85
+ ownerState: r,
86
+ sx: { textAlign: { xs: "center", sm: "left" } },
87
+ children: t.description
97
88
  }
98
89
  ),
99
- /* @__PURE__ */ t(
100
- c,
90
+ t.showChart && t.chartType && (t.value ?? []).length >= 2 && /* @__PURE__ */ e(j, { ownerState: r, children: /* @__PURE__ */ e(
91
+ u,
101
92
  {
102
- direction: { xs: "column-reverse", sm: "column" },
103
- spacing: 1,
104
- sx: { width: "100%", mt: 2 },
105
- children: [
106
- C && /* @__PURE__ */ e(
107
- q,
108
- {
109
- variant: "caption",
110
- ownerState: r,
111
- sx: { textAlign: { xs: "center", sm: "left" } },
112
- children: C
113
- }
114
- ),
115
- w && u && m.length >= 2 && /* @__PURE__ */ e(B, { ownerState: r, children: /* @__PURE__ */ e(V, { type: u, data: m, color: a }) })
116
- ]
93
+ type: t.chartType,
94
+ data: t.value,
95
+ color: w
117
96
  }
118
- )
97
+ ) })
119
98
  ]
120
99
  }
121
100
  )
122
- }
123
- );
124
- }
125
- );
101
+ ]
102
+ }
103
+ ) });
104
+ };
126
105
  export {
127
- U as MetricCard
106
+ A as MetricCard
128
107
  };
@@ -1,168 +1,107 @@
1
- import { useThemeProps as D } from "@mui/material";
2
- import { forwardRef as R, createElement as y } from "react";
1
+ import { useThemeProps as k, useTheme as _ } from "@mui/material";
2
+ import { c as N } from "../../createReactComponent-C7L-DMHj.js";
3
3
  /**
4
4
  * @license @tabler/icons-react v3.44.0 - MIT
5
5
  *
6
6
  * This source code is licensed under the MIT license.
7
7
  * See the LICENSE file in the root directory of this source tree.
8
8
  */
9
- var F = {
10
- outline: {
11
- xmlns: "http://www.w3.org/2000/svg",
12
- width: 24,
13
- height: 24,
14
- viewBox: "0 0 24 24",
15
- fill: "none",
16
- stroke: "currentColor",
17
- strokeWidth: 2,
18
- strokeLinecap: "round",
19
- strokeLinejoin: "round"
20
- },
21
- filled: {
22
- xmlns: "http://www.w3.org/2000/svg",
23
- width: 24,
24
- height: 24,
25
- viewBox: "0 0 24 24",
26
- fill: "currentColor",
27
- stroke: "none"
28
- }
29
- };
30
- /**
31
- * @license @tabler/icons-react v3.44.0 - MIT
32
- *
33
- * This source code is licensed under the MIT license.
34
- * See the LICENSE file in the root directory of this source tree.
35
- */
36
- const C = (w, g, m, e) => {
37
- const h = R(
38
- ({ color: d = "currentColor", size: u = 24, stroke: p = 2, title: o, className: f, children: r, ...a }, i) => y(
39
- "svg",
40
- {
41
- ref: i,
42
- ...F[w],
43
- width: u,
44
- height: u,
45
- className: ["tabler-icon", `tabler-icon-${g}`, f].join(" "),
46
- strokeWidth: p,
47
- stroke: d,
48
- ...a
49
- },
50
- [
51
- o && y("title", { key: "svg-title" }, o),
52
- ...e.map(([v, N]) => y(v, N)),
53
- ...Array.isArray(r) ? r : [r]
54
- ]
55
- )
56
- );
57
- return h.displayName = `${m}`, h;
58
- };
59
- /**
60
- * @license @tabler/icons-react v3.44.0 - MIT
61
- *
62
- * This source code is licensed under the MIT license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */
65
- const L = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], S = C("outline", "arrow-right", "ArrowRight", L);
9
+ const D = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], $ = N("outline", "arrow-right", "ArrowRight", D);
66
10
  /**
67
11
  * @license @tabler/icons-react v3.44.0 - MIT
68
12
  *
69
13
  * This source code is licensed under the MIT license.
70
14
  * See the LICENSE file in the root directory of this source tree.
71
15
  */
72
- const U = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], j = C("outline", "trending-down", "TrendingDown", U);
16
+ const x = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], S = N("outline", "trending-down", "TrendingDown", x);
73
17
  /**
74
18
  * @license @tabler/icons-react v3.44.0 - MIT
75
19
  *
76
20
  * This source code is licensed under the MIT license.
77
21
  * See the LICENSE file in the root directory of this source tree.
78
22
  */
79
- const B = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], P = C("outline", "trending-up", "TrendingUp", B), H = (w) => {
80
- const g = D({ props: w, name: "HCMetricCard" }), {
81
- label: m,
23
+ const F = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], P = N("outline", "trending-up", "TrendingUp", F), O = (w) => {
24
+ const p = k({ props: w, name: "HCMetricCard" }), {
82
25
  value: e = [],
83
- description: h,
84
- variant: d = "default",
85
- loading: u = !1,
86
- showChange: p = !1,
87
- changeType: o = "percentage",
88
- showTrend: f = !1,
89
- showIcon: r = !1,
90
- icon: a,
91
- iconPosition: i = "right",
92
- showChart: v = !1,
93
- chartType: N,
94
- sx: I,
95
- ...x
96
- } = g, M = e.length > 0;
97
- let k = "—", T = "";
98
- if (M) {
26
+ variant: s = "default",
27
+ showChange: y = !1,
28
+ changeType: i = "percentage",
29
+ showTrend: b = !1,
30
+ showIcon: v = !1,
31
+ icon: d,
32
+ iconPosition: g = "right"
33
+ } = p, r = _(), u = e.length > 0;
34
+ let h = "", f = "";
35
+ if (u) {
99
36
  const n = e[e.length - 1], t = Number(n.v);
100
- isNaN(t) || (k = new Intl.NumberFormat("en-US", {
37
+ isNaN(t) || (h = new Intl.NumberFormat("en-US", {
101
38
  maximumFractionDigits: 2
102
- }).format(t), T = n.t);
39
+ }).format(t), f = n.t);
103
40
  }
104
- let l;
105
- if (p)
41
+ let o;
42
+ if (y)
106
43
  if (e.length >= 2) {
107
44
  const n = Number(e[e.length - 1].v), t = Number(e[e.length - 2].v);
108
45
  if (isNaN(n) || isNaN(t))
109
- l = "—";
110
- else if (t === 0 && o === "percentage")
111
- l = "—";
46
+ o = "—";
47
+ else if (t === 0 && i === "percentage")
48
+ o = "—";
112
49
  else {
113
50
  let c = 0;
114
- o === "absolute" ? c = n - t : c = (n - t) / t * 100, l = `${c > 0 ? "+" : c < 0 ? "−" : ""}${Math.abs(c).toFixed(
115
- o === "percentage" ? 1 : 2
116
- )}${o === "percentage" ? "%" : ""}`;
51
+ i === "absolute" ? c = n - t : c = (n - t) / t * 100, o = `${c > 0 ? "+" : c < 0 ? "−" : ""}${Math.abs(c).toFixed(
52
+ i === "percentage" ? 1 : 2
53
+ )}${i === "percentage" ? "%" : ""}`;
117
54
  }
118
55
  } else
119
- l = "—";
120
- let s;
121
- if (f && e.length >= 2) {
56
+ o = "—";
57
+ let a;
58
+ if (b && e.length >= 2) {
122
59
  const n = Number(e[e.length - 1].v), t = Number(e[e.length - 2].v);
123
- !isNaN(n) && !isNaN(t) && (n > t ? s = "up" : n < t ? s = "down" : s = "neutral");
60
+ !isNaN(n) && !isNaN(t) && (n > t ? a = "up" : n < t ? a = "down" : a = "neutral");
124
61
  }
125
- const $ = {
126
- ...g,
127
- calculatedValue: k,
128
- calculatedChange: l,
129
- calculatedTrend: s,
130
- hasData: M,
131
- changeType: o,
132
- iconPosition: i,
133
- variant: d
62
+ let m = $;
63
+ a === "up" ? m = P : a === "down" && (m = S);
64
+ const M = v && !!d && ["top-left", "top-right", "bottom-left", "bottom-right"].includes(
65
+ g
66
+ ), T = v && !!d && ["left", "right"].includes(g);
67
+ let l = r.palette.text.secondary;
68
+ s === "primary" && (l = r.palette.primary.main), s === "success" && (l = r.palette.success.main), s === "warning" && (l = r.palette.warning.main), s === "danger" && (l = r.palette.error.main);
69
+ const I = JSON.stringify({
70
+ metric: p.label,
71
+ value: h,
72
+ change: o,
73
+ asOf: f
74
+ }), C = {
75
+ ...p,
76
+ calculatedValue: h,
77
+ calculatedChange: o,
78
+ calculatedTrend: a,
79
+ hasData: u,
80
+ changeType: i,
81
+ iconPosition: g,
82
+ variant: s
134
83
  };
135
- let b = S;
136
- s === "up" ? b = P : s === "down" && (b = j);
137
- const _ = r && !!a && ["top-left", "top-right", "bottom-left", "bottom-right"].includes(
138
- i || ""
139
- ), A = r && !!a && ["left", "right"].includes(i || "");
140
84
  return {
141
- label: m,
142
- value: e,
143
- calculatedValue: k,
144
- calculatedChange: l,
145
- calculatedTrend: s,
146
- description: h,
147
- variant: d,
148
- loading: u,
149
- showChange: p,
150
- changeType: o,
151
- showTrend: f,
152
- showIcon: r,
153
- Icon: a,
154
- iconPosition: i,
155
- showChart: v,
156
- chartType: N,
157
- sx: I,
158
- other: x,
159
- ownerState: $,
160
- TrendIcon: b,
161
- showCornerIcon: _,
162
- showSideIcon: A,
163
- asOf: T
85
+ refs: {},
86
+ state: {
87
+ ownerState: C,
88
+ calculatedValue: h,
89
+ calculatedChange: o,
90
+ calculatedTrend: a,
91
+ hasData: u,
92
+ asOf: f,
93
+ TrendIcon: m,
94
+ Icon: d,
95
+ showCornerIcon: M,
96
+ showSideIcon: T,
97
+ chartColor: l,
98
+ variant: s,
99
+ iconPosition: g,
100
+ snapshotPayload: I
101
+ },
102
+ actions: {}
164
103
  };
165
104
  };
166
105
  export {
167
- H as useMetricCardLogic
106
+ O as useMetricCardLogic
168
107
  };
@@ -0,0 +1,44 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { Loading as h } from "../../../loading/index.js";
3
+ import { useObjectProfileCardAvatarLogic as g } from "./logic.js";
4
+ import { AvatarContainer as f, AvatarButton as m, AvatarCaption as v } from "./styled.js";
5
+ import { c as u } from "../../../../createReactComponent-C7L-DMHj.js";
6
+ /**
7
+ * @license @tabler/icons-react v3.44.0 - MIT
8
+ *
9
+ * This source code is licensed under the MIT license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */
12
+ const y = [["path", { d: "M15 8h.01", key: "svg-0" }], ["path", { d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12", key: "svg-1" }], ["path", { d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5", key: "svg-2" }], ["path", { d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3", key: "svg-3" }]], C = u("outline", "photo", "Photo", y);
13
+ function M(e) {
14
+ const { imageUrl: a, loading: r, onUpload: l, accept: c = ".jpg, .jpeg, .png", sx: d } = e, { fileInputRef: p, handleStartUpload: n, handleFileChange: s } = g(e), o = !!l;
15
+ return /* @__PURE__ */ i(f, { sx: d, children: [
16
+ a ? /* @__PURE__ */ t(
17
+ "img",
18
+ {
19
+ src: a,
20
+ width: 150,
21
+ height: 150,
22
+ onClick: o ? n : void 0,
23
+ style: { cursor: o ? "pointer" : "default" }
24
+ }
25
+ ) : /* @__PURE__ */ i(m, { onClick: n, disabled: !o, children: [
26
+ /* @__PURE__ */ t(C, { size: 24 }),
27
+ o && /* @__PURE__ */ t(v, { variant: "body2", children: "click here to upload" })
28
+ ] }),
29
+ o && /* @__PURE__ */ t(
30
+ "input",
31
+ {
32
+ ref: p,
33
+ type: "file",
34
+ accept: c,
35
+ style: { display: "none" },
36
+ onChange: s
37
+ }
38
+ ),
39
+ /* @__PURE__ */ t(h, { show: !!r, position: "absolute" })
40
+ ] });
41
+ }
42
+ export {
43
+ M as ObjectProfileCardAvatar
44
+ };
@@ -0,0 +1,19 @@
1
+ import { useRef as c } from "react";
2
+ const u = (e) => {
3
+ const t = c(null);
4
+ return {
5
+ fileInputRef: t,
6
+ handleStartUpload: () => {
7
+ var n;
8
+ e.onUpload && ((n = t.current) == null || n.click());
9
+ },
10
+ handleFileChange: (n) => {
11
+ var a, r;
12
+ const l = (a = n.target.files) == null ? void 0 : a[0];
13
+ l && ((r = e.onUpload) == null || r.call(e, l)), t.current && (t.current.value = "");
14
+ }
15
+ };
16
+ };
17
+ export {
18
+ u as useObjectProfileCardAvatarLogic
19
+ };
@@ -0,0 +1,41 @@
1
+ import { styled as t, Box as a, ButtonBase as e, Typography as r } from "@mui/material";
2
+ const i = t(a, {
3
+ name: "HCObjectProfileCardAvatar",
4
+ slot: "Root"
5
+ })(({ theme: o }) => ({
6
+ position: "relative",
7
+ display: "flex",
8
+ flexDirection: "column",
9
+ width: 150,
10
+ height: 150,
11
+ alignItems: "center",
12
+ justifyContent: "center",
13
+ backgroundColor: o.palette.background.default,
14
+ overflow: "hidden",
15
+ borderRadius: "50%",
16
+ "& .MuiSvgIcon-root": {
17
+ fontSize: "50px",
18
+ color: o.palette.text.secondary
19
+ }
20
+ })), l = t(e, {
21
+ name: "HCObjectProfileCardAvatar",
22
+ slot: "Button"
23
+ })({
24
+ display: "flex",
25
+ flexDirection: "column",
26
+ flex: 1,
27
+ width: "100%"
28
+ }), d = t(r, {
29
+ name: "HCObjectProfileCardAvatar",
30
+ slot: "Caption"
31
+ })(({ theme: o }) => ({
32
+ background: o.palette.secondary.main,
33
+ color: o.palette.background.paper,
34
+ padding: o.spacing(0, 0.5),
35
+ borderRadius: o.shape.borderRadius
36
+ }));
37
+ export {
38
+ l as AvatarButton,
39
+ d as AvatarCaption,
40
+ i as AvatarContainer
41
+ };
@@ -0,0 +1,90 @@
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
+ import { useTheme as y, Typography as o, Box as a, Divider as C } from "@mui/material";
3
+ import j from "lodash";
4
+ import { A as x } from "../../index.es-CHNMhaMi.js";
5
+ import { FlexRow as P } from "../flex-row/index.js";
6
+ import { InstanceVariableList as u } from "../instance-variable-list/index.js";
7
+ import { ObjectProfileCardAvatar as O } from "./components/avatar/index.js";
8
+ import { useObjectProfileCardLogic as A } from "./logic.js";
9
+ import { ObjectProfileCardRoot as R, ObjectProfileCardContent as U, ObjectProfileCardHeader as H, ObjectProfileCardHierarchy as D, ObjectProfileCardVariables as I } from "./styled.js";
10
+ import { c as T } from "../../createReactComponent-C7L-DMHj.js";
11
+ /**
12
+ * @license @tabler/icons-react v3.44.0 - MIT
13
+ *
14
+ * This source code is licensed under the MIT license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */
17
+ const _ = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], d = T("outline", "chevron-right", "ChevronRight", _);
18
+ function S(m) {
19
+ const l = y(), {
20
+ data: r,
21
+ template: p,
22
+ templateHierarchy: s,
23
+ icon: n,
24
+ avatarUploading: h,
25
+ onAvatarUpload: f,
26
+ ownerState: t,
27
+ sx: g,
28
+ other: v
29
+ } = A(m);
30
+ return j.isEmpty(r) ? null : /* @__PURE__ */ e(R, { ownerState: t, sx: g, ...v, children: /* @__PURE__ */ i(U, { ownerState: t, children: [
31
+ /* @__PURE__ */ i(H, { ownerState: t, children: [
32
+ /* @__PURE__ */ e(
33
+ O,
34
+ {
35
+ imageUrl: r.profileImageUrl,
36
+ loading: h,
37
+ onUpload: f
38
+ }
39
+ ),
40
+ /* @__PURE__ */ i(P, { gap: 1, mt: 1, children: [
41
+ n && /* @__PURE__ */ e("img", { src: n, height: 24 }),
42
+ /* @__PURE__ */ e(o, { variant: "h2", children: r.title })
43
+ ] }),
44
+ /* @__PURE__ */ i(D, { ownerState: t, children: [
45
+ s.map((b, c) => /* @__PURE__ */ i(a, { display: "inline", children: [
46
+ c > 0 && /* @__PURE__ */ e(
47
+ d,
48
+ {
49
+ size: 20,
50
+ style: { verticalAlign: "middle" },
51
+ color: l.palette.action.disabled
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e(o, { variant: "caption", color: "text.secondary", children: b.name })
55
+ ] }, c)),
56
+ /* @__PURE__ */ i(a, { display: "inline", children: [
57
+ /* @__PURE__ */ e(
58
+ d,
59
+ {
60
+ size: 20,
61
+ style: { verticalAlign: "middle" },
62
+ color: l.palette.action.disabled
63
+ }
64
+ ),
65
+ /* @__PURE__ */ e(o, { variant: "caption", color: "text.secondary", children: r.template.name })
66
+ ] })
67
+ ] })
68
+ ] }),
69
+ /* @__PURE__ */ i(a, { flex: 1, minHeight: 0, children: [
70
+ /* @__PURE__ */ e(C, {}),
71
+ /* @__PURE__ */ e(x, { heightRelativeToParent: "100%", children: /* @__PURE__ */ e(I, { ownerState: t, children: /* @__PURE__ */ e(
72
+ u,
73
+ {
74
+ variables: r.variables,
75
+ template: p,
76
+ extraData: r.description ? [
77
+ {
78
+ title: "Details",
79
+ type: "string",
80
+ value: r.description
81
+ }
82
+ ] : []
83
+ }
84
+ ) }) })
85
+ ] })
86
+ ] }) });
87
+ }
88
+ export {
89
+ S as ObjectProfileCard
90
+ };