@hybridcore/ui 1.5.90 → 1.6.1

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 (325) hide show
  1. package/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-CMg08YSA.js} +91 -95
  2. package/dist/{Add-CMz4N2zT.js → Add-DuVVJeQU.js} +35 -36
  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/Bullet-DVczI2TD.js +41 -0
  7. package/dist/Button-CcsPEIDh.js +35 -0
  8. package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-sObABYY2.js} +62 -58
  9. package/dist/CategoryAxis-CwnfaGc8.js +458 -0
  10. package/dist/Circle-Cy5s-pVc.js +27 -0
  11. package/dist/ColorSet-C7vpNXhM.js +2957 -0
  12. package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
  13. package/dist/DataProcessor-CHDO51q4.js +83 -0
  14. package/dist/DateAxis-YX3QNIB-.js +569 -0
  15. package/dist/{Delete-86TO0fMo.js → Delete-fBLhTHbF.js} +1 -1
  16. package/dist/{DialogContent-CqTojymQ.js → DialogContent-CGJ7alb8.js} +10 -13
  17. package/dist/FormControl-BCurCxRj.js +1294 -0
  18. package/dist/FormControlLabel-BkRfrhNy.js +601 -0
  19. package/dist/Hierarchy-Bihj0S61.js +925 -0
  20. package/dist/{IconButton-DJ-31-Fd.js → IconButton-_opV1iNK.js} +18 -19
  21. package/dist/IconPlus-yPkff_Vj.js +19 -0
  22. package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-C7PEvvYr.js} +17 -19
  23. package/dist/InputLabel-rEwwnD4_.js +354 -0
  24. package/dist/Legend-Dp_MKfS4.js +178 -0
  25. package/dist/LineSeries-Uiv5o56b.js +472 -0
  26. package/dist/{MenuItem-C6qlUyV3.js → MenuItem-DrE50M_p.js} +92 -69
  27. package/dist/Modal-DlB6GH-f.js +1659 -0
  28. package/dist/Paper-q9kKjAKx.js +527 -0
  29. package/dist/PieSeries-B2fW3z0s.js +693 -0
  30. package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
  31. package/dist/Scrollbar-D86MJyr2.js +171 -0
  32. package/dist/Slice-B19rbYDZ.js +261 -0
  33. package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
  34. package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
  35. package/dist/TextField-DSDIEEKu.js +3161 -0
  36. package/dist/Tick-2bcLyHpF.js +162 -0
  37. package/dist/{Typography-D1t7XuLN.js → Typography-B-Z5Y0Xq.js} +48 -50
  38. package/dist/Vector-BmuhQO4p.js +3606 -0
  39. package/dist/Vector-DfTqQEln.js +1735 -0
  40. package/dist/WKT-2wsDT-nq.js +2310 -0
  41. package/dist/XYCursor-C8WktvKM.js +362 -0
  42. package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
  43. package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
  44. package/dist/capitalize-quqpGCFu.js +9 -0
  45. package/dist/components/access/helpers.js +1 -1
  46. package/dist/components/access/index.js +8 -15
  47. package/dist/components/access/logic.js +25 -0
  48. package/dist/components/card/index.js +158 -498
  49. package/dist/components/card/logic.js +24 -0
  50. package/dist/components/card/styled.js +226 -51
  51. package/dist/components/card-alternate/index.js +111 -139
  52. package/dist/components/card-alternate/logic.js +17 -0
  53. package/dist/components/card-alternate/styled.js +113 -19
  54. package/dist/components/charts/_common/utils.js +20 -0
  55. package/dist/components/charts/candlestick/logic.js +170 -140
  56. package/dist/components/charts/chart-wrapper/helpers.js +27 -0
  57. package/dist/components/charts/chart-wrapper/index.js +44 -0
  58. package/dist/components/charts/chart-wrapper/logic.js +47 -0
  59. package/dist/components/charts/chart-wrapper/styled.js +44 -0
  60. package/dist/components/charts/column-line-mix/index.js +10 -0
  61. package/dist/components/charts/column-line-mix/logic.js +162 -0
  62. package/dist/components/charts/column-line-mix/styled.js +12 -0
  63. package/dist/components/charts/drill-down-treemap/index.js +10 -0
  64. package/dist/components/charts/drill-down-treemap/logic.js +391 -0
  65. package/dist/components/charts/drill-down-treemap/styled.js +12 -0
  66. package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
  67. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
  68. package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
  69. package/dist/components/charts/heatmap/index.js +10 -0
  70. package/dist/components/charts/heatmap/logic.js +361 -0
  71. package/dist/components/charts/heatmap/styled.js +12 -0
  72. package/dist/components/charts/highlighting-line-data/logic.js +89 -256
  73. package/dist/components/charts/line/index.js +10 -0
  74. package/dist/components/charts/line/logic.js +148 -0
  75. package/dist/components/charts/line/styled.js +12 -0
  76. package/dist/components/charts/logaritmic-scale/index.js +10 -0
  77. package/dist/components/charts/logaritmic-scale/logic.js +119 -0
  78. package/dist/components/charts/logaritmic-scale/styled.js +12 -0
  79. package/dist/components/charts/multiple-value-axes/index.js +10 -0
  80. package/dist/components/charts/multiple-value-axes/logic.js +191 -0
  81. package/dist/components/charts/multiple-value-axes/styled.js +12 -0
  82. package/dist/components/charts/nested-pie/index.js +10 -0
  83. package/dist/components/charts/nested-pie/logic.js +110 -0
  84. package/dist/components/charts/nested-pie/styled.js +12 -0
  85. package/dist/components/charts/packed-circles/index.js +10 -0
  86. package/dist/components/charts/packed-circles/logic.js +423 -0
  87. package/dist/components/charts/packed-circles/styled.js +12 -0
  88. package/dist/components/charts/pie-chart/index.js +10 -0
  89. package/dist/components/charts/pie-chart/logic.js +70 -0
  90. package/dist/components/charts/pie-chart/styled.js +12 -0
  91. package/dist/components/charts/stacked-area-radar/index.js +10 -0
  92. package/dist/components/charts/stacked-area-radar/logic.js +868 -0
  93. package/dist/components/charts/stacked-area-radar/styled.js +12 -0
  94. package/dist/components/charts/stacked-column-chart/index.js +10 -0
  95. package/dist/components/charts/stacked-column-chart/logic.js +148 -0
  96. package/dist/components/charts/stacked-column-chart/styled.js +12 -0
  97. package/dist/components/charts/xy-chart/index.js +10 -0
  98. package/dist/components/charts/xy-chart/logic.js +170 -0
  99. package/dist/components/charts/xy-chart/styled.js +12 -0
  100. package/dist/components/collapsible-card/index.js +58 -32
  101. package/dist/components/collapsible-card/logic.js +20 -0
  102. package/dist/components/collapsible-card/styled.js +52 -0
  103. package/dist/components/confirm/dialog.js +3 -3
  104. package/dist/components/confirm/index.js +1 -1
  105. package/dist/components/container/index.js +28 -269
  106. package/dist/components/container/logic.js +12 -0
  107. package/dist/components/container/styled.js +29 -0
  108. package/dist/components/context-menu/index.js +25 -557
  109. package/dist/components/context-menu/logic.js +14 -0
  110. package/dist/components/context-menu/styled.js +40 -0
  111. package/dist/components/data-map/components/controls/index.js +12 -0
  112. package/dist/components/data-map/components/controls/styled.js +34 -0
  113. package/dist/components/data-map/index.js +51 -0
  114. package/dist/components/data-map/logic.js +108 -0
  115. package/dist/components/data-map/styled.js +32 -0
  116. package/dist/components/data-security-selectors/security-level/index.js +36 -91
  117. package/dist/components/data-security-selectors/security-level/logic.js +73 -0
  118. package/dist/components/data-security-selectors/security-level/styled.js +47 -0
  119. package/dist/components/date-picker-with-custom-range/index.js +9 -0
  120. package/dist/components/date-picker-with-custom-range/logic.js +66 -0
  121. package/dist/components/date-picker-with-custom-range/styled.js +43 -0
  122. package/dist/components/divider/index.js +18 -0
  123. package/dist/components/divider/logic.js +13 -0
  124. package/dist/components/divider/styled.js +14 -0
  125. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  126. package/dist/components/geometry-picker/edit/index.js +1 -1
  127. package/dist/components/geometry-picker/geometry/index.js +1 -1
  128. package/dist/components/geometry-picker/index.js +8 -8
  129. package/dist/components/geometry-picker/kml/index.js +1 -1
  130. package/dist/components/geometry-picker/map/index.js +1 -1
  131. package/dist/components/geometry-picker/map/logic.js +65 -62
  132. package/dist/components/geometry-picker/map/style.js +1 -1
  133. package/dist/components/heat-map/components/controls/index.js +12 -0
  134. package/dist/components/heat-map/components/controls/styled.js +34 -0
  135. package/dist/components/heat-map/components/legend/index.js +26 -0
  136. package/dist/components/heat-map/components/legend/styled.js +14 -0
  137. package/dist/components/heat-map/index.js +37 -0
  138. package/dist/components/heat-map/logic.js +1945 -0
  139. package/dist/components/heat-map/styled.js +32 -0
  140. package/dist/components/icon-button/index.js +22 -15
  141. package/dist/components/icon-button/logic.js +15 -0
  142. package/dist/components/icon-button/styled.js +22 -10
  143. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  144. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
  145. package/dist/components/instance-form/components/variable/index.js +7 -9
  146. package/dist/components/instance-form/components/variables/index.js +1 -1
  147. package/dist/components/instance-form/index.js +1 -1
  148. package/dist/components/instance-hierarchy-table/index.js +32 -37
  149. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  150. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  151. package/dist/components/instance-table/index.js +30 -135
  152. package/dist/components/instance-table/logic.js +122 -0
  153. package/dist/components/instance-table/styled.js +53 -11
  154. package/dist/components/instance-variable-list/index.js +34 -29
  155. package/dist/components/instance-variable-list/styled.js +21 -21
  156. package/dist/components/instance-variable-list/variable.js +44 -74
  157. package/dist/components/key-protection/index.js +45 -2
  158. package/dist/components/key-protection/logic.js +40 -0
  159. package/dist/components/key-protection/styled.js +45 -0
  160. package/dist/components/key-protection/utils.js +1 -1
  161. package/dist/components/linear-indicator/index.js +10 -67
  162. package/dist/components/linear-indicator/logic.js +47 -0
  163. package/dist/components/linear-indicator/styled.js +39 -40
  164. package/dist/components/loading/index.js +15 -9
  165. package/dist/components/loading/logic.js +15 -0
  166. package/dist/components/loading/styled.js +26 -19
  167. package/dist/components/map/helpers/kml.js +1 -1
  168. package/dist/components/map/helpers/mapbox.js +14 -14
  169. package/dist/components/map/helpers/ol.js +23 -19
  170. package/dist/components/map/helpers/wkt.js +26 -1314
  171. package/dist/components/map/index.js +1 -1
  172. package/dist/components/map/logic.js +113 -101
  173. package/dist/components/map/styled.js +39 -31
  174. package/dist/components/metric-card/MetricChart.js +50 -498
  175. package/dist/components/metric-card/index.js +94 -115
  176. package/dist/components/metric-card/logic.js +70 -131
  177. package/dist/components/object-profile-card/components/avatar/index.js +44 -0
  178. package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
  179. package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
  180. package/dist/components/object-profile-card/index.js +90 -0
  181. package/dist/components/object-profile-card/logic.js +33 -0
  182. package/dist/components/object-profile-card/styled.js +48 -0
  183. package/dist/components/paginated-list/index.js +93 -89
  184. package/dist/components/paginated-list/logic.js +51 -40
  185. package/dist/components/paginated-list/styled.js +25 -21
  186. package/dist/components/phone-input/index.js +18 -22
  187. package/dist/components/phone-input/logic.js +14 -0
  188. package/dist/components/phone-input/styled.js +12 -4
  189. package/dist/components/property-mapping/index.js +2 -2
  190. package/dist/components/prr-map/components/controls/index.js +12 -0
  191. package/dist/components/prr-map/components/controls/styled.js +34 -0
  192. package/dist/components/prr-map/components/legend/index.js +36 -0
  193. package/dist/components/prr-map/components/legend/styled.js +21 -0
  194. package/dist/components/prr-map/index.js +38 -0
  195. package/dist/components/prr-map/logic.js +104 -0
  196. package/dist/components/prr-map/styled.js +32 -0
  197. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  198. package/dist/components/range-selector/components/date-range/index.js +148 -7
  199. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  200. package/dist/components/range-selector/components/number-range/index.js +48 -53
  201. package/dist/components/range-selector/components/string-range/index.js +15 -17
  202. package/dist/components/range-selector/index.js +63 -57
  203. package/dist/components/range-selector/logic.js +12 -0
  204. package/dist/components/range-selector/styled.js +4222 -0
  205. package/dist/components/raster-grid-map/components/controls/index.js +12 -0
  206. package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
  207. package/dist/components/raster-grid-map/components/legend/index.js +14 -0
  208. package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
  209. package/dist/components/raster-grid-map/helpers.js +190 -0
  210. package/dist/components/raster-grid-map/index.js +38 -0
  211. package/dist/components/raster-grid-map/logic.js +172 -0
  212. package/dist/components/raster-grid-map/styled.js +32 -0
  213. package/dist/components/search-input/index.js +62 -140
  214. package/dist/components/search-input/logic.js +43 -0
  215. package/dist/components/search-input/styled.js +33 -0
  216. package/dist/components/simple-pivot-table/index.js +66 -0
  217. package/dist/components/simple-pivot-table/logic.js +51 -0
  218. package/dist/components/simple-pivot-table/styled.js +45 -0
  219. package/dist/components/static-text/index.js +18 -0
  220. package/dist/components/static-text/logic.js +13 -0
  221. package/dist/components/static-text/styled.js +45 -0
  222. package/dist/components/tabs/index.js +56 -2160
  223. package/dist/components/tabs/logic.js +36 -0
  224. package/dist/components/tabs/styled.js +94 -16
  225. package/dist/components/tabs/tab-panel.js +11 -10
  226. package/dist/components/template-filters/components/filter/index.js +13 -18
  227. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  228. package/dist/components/template-filters/index.js +21 -29
  229. package/dist/components/template-filters/logic.js +18 -0
  230. package/dist/components/template-filters/styled.js +44 -1
  231. package/dist/components/template-form/components/property-list/index.js +8 -8
  232. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  233. package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
  234. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  235. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  236. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +8 -9
  237. package/dist/components/template-form/index.js +32 -33
  238. package/dist/components/template-property-filters/index.js +45 -95
  239. package/dist/components/template-property-filters/logic.js +27 -0
  240. package/dist/components/template-property-filters/property.js +105 -165
  241. package/dist/components/template-property-filters/styled.js +121 -20
  242. package/dist/components/timeline/index.js +61 -0
  243. package/dist/components/timeline/logic.js +40 -0
  244. package/dist/components/timeline/styled.js +48 -0
  245. package/dist/components/tree-select/index.js +52 -67
  246. package/dist/components/tree-select/logic.js +59 -0
  247. package/dist/components/tree-select/styled.js +45 -62
  248. package/dist/components/treeview-filter/index.js +43 -65
  249. package/dist/components/treeview-filter/item/index.js +43 -42
  250. package/dist/components/treeview-filter/item-label/index.js +17 -37
  251. package/dist/components/treeview-filter/logic.js +28 -0
  252. package/dist/components/treeview-filter/styled.js +86 -0
  253. package/dist/components/uploader/index.js +532 -567
  254. package/dist/components/uploader/logic.js +74 -0
  255. package/dist/components/uploader/styled.js +93 -46
  256. package/dist/constant-BiOGvlZc.js +21 -0
  257. package/dist/createReactComponent-C7L-DMHj.js +60 -0
  258. package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BM3-TsGy.js} +33 -36
  259. package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DX-SqL8M.js} +24 -26
  260. package/dist/{dialog-BE4D6swf.js → dialog-cf4HUXXl.js} +27 -28
  261. package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
  262. package/dist/index-BMS1Otro.js +183 -0
  263. package/dist/index-C8C3YXle.js +1932 -0
  264. package/dist/index-C__OZmYy.js +663 -0
  265. package/dist/{index-CGNxsLVm.js → index-DPKUmQnz.js} +11 -13
  266. package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
  267. package/dist/index.es-CHNMhaMi.js +2067 -0
  268. package/dist/index.esm-BLLrbTzY.js +318 -0
  269. package/dist/isMuiElement-BkJ72LB3.js +26 -0
  270. package/dist/main.d.ts +1869 -565
  271. package/dist/main.js +141 -443
  272. package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
  273. package/dist/ol-yOE-NV0X.js +7465 -0
  274. package/dist/path-CNVruS--.js +84 -0
  275. package/dist/{property-list-form-C5hcK2y2.js → property-list-form-DL_dEoNn.js} +57 -62
  276. package/dist/{createTheme-CNnKNxwL.js → styled-Bsjp3kFh.js} +275 -278
  277. package/dist/useId-B4-oF9Mq.js +34 -0
  278. package/dist/useMobilePicker-B-M3dnTn.js +7993 -0
  279. package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
  280. package/package.json +11 -2
  281. package/dist/AxisRendererY-kADUad00.js +0 -18370
  282. package/dist/Box-B1AVyJ_s.js +0 -71
  283. package/dist/Button-eqWvpDuh.js +0 -356
  284. package/dist/CardContent-DsYqqPeJ.js +0 -74
  285. package/dist/Checkbox-CrU2hpWB.js +0 -420
  286. package/dist/DateAxis-CMum47iz.js +0 -924
  287. package/dist/FormControlLabel-BrdX4R71.js +0 -195
  288. package/dist/Input-CoIrGZAh.js +0 -326
  289. package/dist/InputLabel-CBuAYyuT.js +0 -1367
  290. package/dist/LineSeries-CfcpoYla.js +0 -549
  291. package/dist/List-DOD5kSk3.js +0 -121
  292. package/dist/ListItem-r8PbsvCz.js +0 -429
  293. package/dist/Modal-CkcFEpHa.js +0 -1284
  294. package/dist/OutlinedInput-B-iZoc9l.js +0 -450
  295. package/dist/Paper-CjqLScHA.js +0 -163
  296. package/dist/Select-t3ewnSdf.js +0 -2180
  297. package/dist/Tabs-Cn42Z5QI.js +0 -789
  298. package/dist/TextField-BQ8a50fA.js +0 -459
  299. package/dist/components/collapsible-card/style.js +0 -49
  300. package/dist/components/key-protection/menu.js +0 -85
  301. package/dist/components/profile-card/index.js +0 -80
  302. package/dist/components/profile-card/logic.js +0 -33
  303. package/dist/components/profile-card/styled.js +0 -43
  304. package/dist/components/tabs/appleTabs.style.js +0 -55
  305. package/dist/components/treeview-filter/item/styled.js +0 -39
  306. package/dist/createStyled-BGx1I94c.js +0 -352
  307. package/dist/createTheme-CyC5HawC.js +0 -879
  308. package/dist/debounce-46wSf_lW.js +0 -15
  309. package/dist/exactProp-cjT0t_Pt.js +0 -36
  310. package/dist/extendSxProp-FEpqY5_S.js +0 -30
  311. package/dist/index-DMSHuq6l.js +0 -688
  312. package/dist/index-SpeaLUQD.js +0 -10963
  313. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  314. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  315. package/dist/listItemTextClasses-CNjn41Of.js +0 -16
  316. package/dist/ol-lGwSyEIV.js +0 -15050
  317. package/dist/ownerDocument-CUrv0DIK.js +0 -6
  318. package/dist/ownerWindow-niciwP7I.js +0 -7
  319. package/dist/styled-B8ugzvji.js +0 -12
  320. package/dist/useFormControl-CatNKXAi.js +0 -10
  321. package/dist/useId-BHG98T5I.js +0 -26
  322. package/dist/useTheme-C15Eq8KG.js +0 -18
  323. package/dist/useTheme-D-uii9iX.js +0 -10
  324. package/dist/useThemeProps-DRP1dikX.js +0 -95
  325. package/dist/utils-CsOZUsQj.js +0 -365
@@ -1,78 +1,63 @@
1
- import { jsxs as h, Fragment as _, jsx as n } from "react/jsx-runtime";
2
- import m from "react";
3
- import { TreeViewFilter as b } from "../treeview-filter/index.js";
4
- import i from "lodash";
5
- import { flattenNestedTemplates as A } from "../../utils/ontology.js";
6
- import { a as M, F as j, I as k } from "../../InputLabel-CBuAYyuT.js";
7
- import { S as B } from "../../Select-t3ewnSdf.js";
8
- import { M as L } from "../../MenuItem-C6qlUyV3.js";
9
- import { D as w, a as y, b as N } from "../../DialogContent-CqTojymQ.js";
10
- import { B as R } from "../../Button-eqWvpDuh.js";
11
- const Z = ({
12
- data: g,
13
- label: a,
14
- selected: r,
15
- disabled: S,
16
- idKey: d = "id",
17
- variant: x = "outlined",
18
- labelPosition: c = "top",
19
- onChange: D
20
- }) => {
21
- const [E, v] = m.useState(!1), [F, f] = m.useState([]), u = A(g), p = m.useMemo(() => i.isArray(r) ? r.map(
22
- (t) => u.find((e) => String(i.get(e, d)) === t)
23
- ) : [], [r, u]), T = (t, e) => {
24
- D(t, e);
25
- }, I = () => {
26
- v(!0), W();
27
- }, C = () => {
28
- v(!1);
29
- }, O = (t, e, l) => {
30
- f(l ? (s) => [
31
- ...s.filter((o) => o !== e),
32
- e
33
- ] : (s) => s.filter((o) => o !== e));
34
- }, W = () => {
35
- const t = [];
36
- p.length > 0 && p.forEach((e) => {
37
- const l = e == null ? void 0 : e.parentKeys, s = u.filter((o) => l == null ? void 0 : l.includes(o.templateKey)).map((o) => String(i.get(o, d)));
38
- t.push(...s);
39
- }), f(t);
40
- };
41
- return /* @__PURE__ */ h(_, { children: [
42
- c === "top" && a !== void 0 && /* @__PURE__ */ n(M, { sx: { display: "block", mb: 0.5 }, children: a }),
43
- /* @__PURE__ */ h(j, { variant: x, fullWidth: !0, children: [
44
- c === "default" && a !== void 0 && /* @__PURE__ */ n(k, { id: "select-label", children: a }),
45
- /* @__PURE__ */ n(
46
- B,
1
+ import { jsxs as d, jsx as l } from "react/jsx-runtime";
2
+ import c from "lodash";
3
+ import { TreeViewFilter as T } from "../treeview-filter/index.js";
4
+ import { useTreeSelectLogic as f } from "./logic.js";
5
+ import { TreeSelectRoot as g, TreeSelectLabel as S, TreeSelectFormControl as x, TreeSelectInput as C, TreeSelectMenuItem as v, TreeSelectDialog as I, TreeSelectDialogContent as W, TreeSelectDialogActions as D, TreeSelectConfirmButton as L } from "./styled.js";
6
+ import { I as O } from "../../InputLabel-rEwwnD4_.js";
7
+ const K = (e) => {
8
+ const { state: h, actions: t } = f(e), { ownerState: s, open: u, expanded: m, selectedItems: i, idKey: o, variant: r, labelPosition: a } = h;
9
+ return /* @__PURE__ */ d(g, { ownerState: s, sx: e.sx, children: [
10
+ a === "top" && e.label !== void 0 && /* @__PURE__ */ l(S, { children: e.label }),
11
+ /* @__PURE__ */ d(x, { variant: r, fullWidth: !0, children: [
12
+ a === "default" && e.label !== void 0 && /* @__PURE__ */ l(O, { id: "select-label", children: e.label }),
13
+ /* @__PURE__ */ l(
14
+ C,
47
15
  {
48
- label: c === "default" ? a : void 0,
49
- variant: x,
16
+ label: a === "default" ? e.label : void 0,
17
+ variant: r,
50
18
  id: "select",
51
19
  labelId: "select-label",
52
- value: r,
20
+ value: e.selected,
53
21
  open: !1,
54
- onOpen: I,
55
- children: p.length > 0 && p.map((t, e) => /* @__PURE__ */ n(L, { value: i.get(t, d) ?? "", children: t == null ? void 0 : t.name }, e))
22
+ onOpen: t.handleOpen,
23
+ children: i.length > 0 && i.map((n, b) => /* @__PURE__ */ l(v, { value: c.get(n, o) ?? "", children: n == null ? void 0 : n.name }, b))
56
24
  }
57
25
  )
58
26
  ] }),
59
- /* @__PURE__ */ h(w, { open: E, onClose: C, fullWidth: !0, maxWidth: "sm", children: [
60
- /* @__PURE__ */ n(y, { sx: { p: 1, pt: 2 }, children: /* @__PURE__ */ n(
61
- b,
62
- {
63
- data: g,
64
- selected: i.isArray(r) ? r : void 0,
65
- disabled: S,
66
- expanded: F,
67
- idKey: d,
68
- onExpansionToggle: O,
69
- onChange: T
70
- }
71
- ) }),
72
- /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(R, { onClick: C, variant: "contained", fullWidth: !0, children: "OK" }) })
73
- ] })
27
+ /* @__PURE__ */ d(
28
+ I,
29
+ {
30
+ open: u,
31
+ onClose: t.handleClose,
32
+ fullWidth: !0,
33
+ maxWidth: "sm",
34
+ children: [
35
+ /* @__PURE__ */ l(W, { children: /* @__PURE__ */ l(
36
+ T,
37
+ {
38
+ data: e.data,
39
+ selected: c.isArray(e.selected) ? e.selected : void 0,
40
+ disabled: e.disabled,
41
+ expanded: m,
42
+ idKey: o,
43
+ onExpansionToggle: t.handleExpansionToggle,
44
+ onChange: t.handleChange
45
+ }
46
+ ) }),
47
+ /* @__PURE__ */ l(D, { children: /* @__PURE__ */ l(
48
+ L,
49
+ {
50
+ onClick: t.handleClose,
51
+ variant: "contained",
52
+ fullWidth: !0,
53
+ children: "OK"
54
+ }
55
+ ) })
56
+ ]
57
+ }
58
+ )
74
59
  ] });
75
60
  };
76
61
  export {
77
- Z as TreeSelect
62
+ K as TreeSelect
78
63
  };
@@ -0,0 +1,59 @@
1
+ import { useThemeProps as O } from "@mui/material";
2
+ import f from "lodash";
3
+ import r from "react";
4
+ import { flattenNestedTemplates as v } from "../../utils/ontology.js";
5
+ const H = (x) => {
6
+ const i = O({ props: x, name: "HCTreeSelect" }), {
7
+ data: u,
8
+ selected: l,
9
+ idKey: s = "id",
10
+ variant: h = "outlined",
11
+ labelPosition: g = "top",
12
+ onChange: S
13
+ } = i, [T, m] = r.useState(!1), [C, p] = r.useState([]), c = r.useMemo(() => v(u), [u]), d = r.useMemo(() => f.isArray(l) ? l.map(
14
+ (t) => c.find((e) => String(f.get(e, s)) === t)
15
+ ) : [], [l, c, s]), E = {
16
+ ...i,
17
+ idKey: s,
18
+ variant: h,
19
+ labelPosition: g
20
+ }, _ = (t, e) => {
21
+ S(t, e);
22
+ }, y = () => {
23
+ const t = [];
24
+ d.length > 0 && d.forEach((e) => {
25
+ const o = e == null ? void 0 : e.parentKeys, a = c.filter((n) => o == null ? void 0 : o.includes(n.templateKey)).map((n) => String(f.get(n, s)));
26
+ t.push(...a);
27
+ }), p(t);
28
+ };
29
+ return {
30
+ refs: {},
31
+ state: {
32
+ ownerState: E,
33
+ open: T,
34
+ expanded: C,
35
+ selectedItems: d,
36
+ idKey: s,
37
+ variant: h,
38
+ labelPosition: g
39
+ },
40
+ actions: {
41
+ handleChange: _,
42
+ handleOpen: () => {
43
+ m(!0), y();
44
+ },
45
+ handleClose: () => {
46
+ m(!1);
47
+ },
48
+ handleExpansionToggle: (t, e, o) => {
49
+ p(o ? (a) => [
50
+ ...a.filter((n) => n !== e),
51
+ e
52
+ ] : (a) => a.filter((n) => n !== e));
53
+ }
54
+ }
55
+ };
56
+ };
57
+ export {
58
+ H as useTreeSelectLogic
59
+ };
@@ -1,64 +1,47 @@
1
- import { styled as t, Box as e } from "@mui/material";
2
- import r from "react-dropdown-tree-select";
3
- const a = t(r)(({ theme: o }) => ({
4
- ".dropdown": {
5
- display: "block",
6
- ".dropdown-trigger": {
7
- display: "block",
8
- minHeight: 30,
9
- border: "none",
10
- padding: "4px 0px",
11
- borderBottom: `1px solid ${o.palette.text.disabled}`,
12
- transition: "all 0.3s",
13
- ".placeholder": {
14
- color: o.palette.text.disabled
15
- },
16
- "&::after": {
17
- position: "absolute",
18
- right: 0,
19
- top: 5,
20
- color: o.palette.text.primary
21
- },
22
- ".tag-list .tag-item:last-child": {
23
- display: "none"
24
- },
25
- ".tag-item": {
26
- margin: 0,
27
- fontSize: "1rem",
28
- ".tag": {
29
- padding: 0,
30
- backgroundColor: "transparent",
31
- border: "none",
32
- ".tag-remove": {
33
- display: "none"
34
- }
35
- }
36
- }
37
- },
38
- ".dropdown-content": {
39
- position: "fixed",
40
- width: "50%",
41
- backgroundColor: o.palette.background.paper,
42
- zIndex: 99999,
43
- ".toggle": {
44
- padding: "0px 5px",
45
- fontStyle: "normal",
46
- fontSize: "1rem"
47
- },
48
- ".search": {
49
- padding: 10,
50
- boxSizing: "border-box",
51
- backgroundColor: o.palette.background.paper,
52
- color: o.palette.text.primary
53
- }
54
- }
55
- }
56
- })), d = t(e)({
57
- display: "flex"
58
- }), i = {
59
- Container: a,
60
- Placeholder: d
61
- };
1
+ import { styled as e, Box as o, FormLabel as l, FormControl as n, Select as c, MenuItem as r, Dialog as a, DialogContent as s, DialogActions as i, Button as m } from "@mui/material";
2
+ const S = (t) => t !== "ownerState", C = e(o, {
3
+ name: "HCTreeSelect",
4
+ slot: "root",
5
+ shouldForwardProp: S
6
+ })({}), g = e(l, {
7
+ name: "HCTreeSelect",
8
+ slot: "label"
9
+ })(({ theme: t }) => ({
10
+ display: "block",
11
+ marginBottom: t.spacing(0.5)
12
+ })), d = e(n, {
13
+ name: "HCTreeSelect",
14
+ slot: "formControl"
15
+ })({}), p = e(c, {
16
+ name: "HCTreeSelect",
17
+ slot: "select"
18
+ })({}), H = e(r, {
19
+ name: "HCTreeSelect",
20
+ slot: "menuItem"
21
+ })({}), u = e(a, {
22
+ name: "HCTreeSelect",
23
+ slot: "dialog"
24
+ })({}), D = e(s, {
25
+ name: "HCTreeSelect",
26
+ slot: "dialogContent"
27
+ })(({ theme: t }) => ({
28
+ padding: t.spacing(1),
29
+ paddingTop: t.spacing(2)
30
+ })), B = e(i, {
31
+ name: "HCTreeSelect",
32
+ slot: "dialogActions"
33
+ })({}), b = e(m, {
34
+ name: "HCTreeSelect",
35
+ slot: "confirmButton"
36
+ })({});
62
37
  export {
63
- i as default
38
+ b as TreeSelectConfirmButton,
39
+ u as TreeSelectDialog,
40
+ B as TreeSelectDialogActions,
41
+ D as TreeSelectDialogContent,
42
+ d as TreeSelectFormControl,
43
+ p as TreeSelectInput,
44
+ g as TreeSelectLabel,
45
+ H as TreeSelectMenuItem,
46
+ C as TreeSelectRoot
64
47
  };
@@ -1,82 +1,60 @@
1
- import { jsxs as d, Fragment as p, jsx as t } from "react/jsx-runtime";
2
- import u from "react";
3
- import { SimpleTreeView as B } from "@mui/x-tree-view";
4
- import C from "./item/index.js";
5
- import a from "lodash";
6
- import { Box as F, Divider as L } from "@mui/material";
7
- import { SearchInput as _ } from "../search-input/index.js";
8
- import { flattenNestedTemplates as j } from "../../utils/ontology.js";
9
- import { ArrowDropDown as y, ArrowRight as z } from "@mui/icons-material";
10
- const H = ({
11
- data: i,
12
- idKey: s = "id",
13
- selected: m,
14
- expanded: f,
15
- disabled: c,
16
- disableSearch: h,
17
- onChange: S,
18
- onExpansionToggle: x
19
- }) => {
20
- const [r, o] = u.useState(""), b = j(i), w = u.useMemo(() => r.length > 0 ? a.uniqBy(
21
- b.filter(
22
- (e) => e.name.toLowerCase().includes(r)
23
- ),
24
- (e) => e.id
25
- ) : i, [r, i]);
26
- let n = null;
27
- const I = 500;
28
- return /* @__PURE__ */ d(p, { children: [
29
- !h && /* @__PURE__ */ d(p, { children: [
30
- /* @__PURE__ */ t(F, { px: 1, pt: 0.75, children: /* @__PURE__ */ t(
31
- _,
1
+ import { jsxs as o, Fragment as S, jsx as t } from "react/jsx-runtime";
2
+ import { ArrowDropDown as f, ArrowRight as g } from "@mui/icons-material";
3
+ import r from "lodash";
4
+ import { SearchInput as b } from "../search-input/index.js";
5
+ import { Item as w } from "./item/index.js";
6
+ import { useTreeViewFilterLogic as I } from "./logic.js";
7
+ import { TreeViewFilterRoot as T, SearchContainer as p, TreeViewDivider as C, TreeContainer as D } from "./styled.js";
8
+ const F = {
9
+ "& .MuiInputBase-input": {
10
+ padding: "8px 0px 8px 12px",
11
+ fontSize: "small"
12
+ }
13
+ }, E = {
14
+ collapseIcon: () => /* @__PURE__ */ t(f, {}),
15
+ expandIcon: () => /* @__PURE__ */ t(g, {})
16
+ }, L = (e) => {
17
+ const { state: d, actions: l } = I(e), { ownerState: c, search: s, filteredData: m, idKey: a } = d;
18
+ return /* @__PURE__ */ o(T, { ownerState: c, sx: e.sx, children: [
19
+ !e.disableSearch && /* @__PURE__ */ o(S, { children: [
20
+ /* @__PURE__ */ t(p, { children: /* @__PURE__ */ t(
21
+ b,
32
22
  {
33
23
  fullWidth: !0,
34
24
  disableLabel: !0,
35
25
  placeholder: "Filter",
36
- sx: {
37
- "& .MuiInputBase-input": {
38
- p: "8px 0px 8px 12px",
39
- fontSize: "small"
40
- }
41
- },
26
+ sx: F,
42
27
  iconSize: "small",
43
- onChange: (e) => {
44
- n && clearTimeout(n), n = setTimeout(() => o(e.toLowerCase()), I);
45
- },
46
- onSubmit: (e) => {
47
- o(e || "");
48
- }
28
+ onChange: l.handleSearch,
29
+ onSubmit: l.handleSubmit
49
30
  }
50
31
  ) }),
51
- /* @__PURE__ */ t(L, { sx: { mt: 1.75 } })
32
+ /* @__PURE__ */ t(C, {})
52
33
  ] }),
53
34
  /* @__PURE__ */ t(
54
- B,
35
+ D,
55
36
  {
56
37
  "aria-label": "tree view filter",
57
38
  disableSelection: !0,
58
- defaultExpandedItems: f,
59
- slots: {
60
- collapseIcon: () => /* @__PURE__ */ t(y, {}),
61
- expandIcon: () => /* @__PURE__ */ t(z, {})
62
- },
63
- onItemExpansionToggle: x,
64
- children: w.map((e, g) => {
65
- const l = String(e[s]), T = a.includes(m, l), D = a.includes(c, l);
39
+ defaultExpandedItems: e.expanded,
40
+ slots: E,
41
+ onItemExpansionToggle: e.onExpansionToggle,
42
+ children: m.map((i, h) => {
43
+ const n = String(r.get(i, a)), u = r.includes(e.selected, n), x = r.includes(e.disabled, n);
66
44
  return /* @__PURE__ */ t(
67
- C,
45
+ w,
68
46
  {
69
- id: l,
70
- idKey: s,
71
- name: e.name,
72
- checked: T,
73
- disabled: D,
74
- disabledIds: c,
75
- children: r ? [] : e.children,
76
- onChange: S,
77
- defaultSelected: m
47
+ id: n,
48
+ idKey: a,
49
+ name: i.name,
50
+ checked: u,
51
+ disabled: x,
52
+ disabledIds: e.disabled,
53
+ children: s ? [] : i.children,
54
+ onChange: e.onChange,
55
+ defaultSelected: e.selected
78
56
  },
79
- g
57
+ h
80
58
  );
81
59
  })
82
60
  }
@@ -84,5 +62,5 @@ const H = ({
84
62
  ] });
85
63
  };
86
64
  export {
87
- H as TreeViewFilter
65
+ L as TreeViewFilter
88
66
  };
@@ -1,54 +1,55 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import I from "../item-label/index.js";
3
- import a from "lodash";
4
- import { TreeItem as h } from "./styled.js";
5
- function x({
6
- id: m,
7
- idKey: n,
8
- name: p,
9
- checked: i,
10
- disabled: d,
11
- disabledIds: o,
12
- onChange: c,
13
- children: s,
14
- defaultSelected: l
15
- }) {
16
- return /* @__PURE__ */ e(
17
- h,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import c from "lodash";
3
+ import { ItemLabel as u } from "../item-label/index.js";
4
+ import { TreeItem as g } from "../styled.js";
5
+ const k = (a) => {
6
+ const {
7
+ id: n,
8
+ idKey: r,
9
+ name: h,
10
+ checked: t,
11
+ disabled: b,
12
+ disabledIds: l,
13
+ onChange: o,
14
+ children: m,
15
+ defaultSelected: s
16
+ } = a;
17
+ return /* @__PURE__ */ i(
18
+ g,
18
19
  {
19
- itemId: String(m),
20
- label: /* @__PURE__ */ e(
21
- I,
20
+ itemId: String(n),
21
+ label: /* @__PURE__ */ i(
22
+ u,
22
23
  {
23
- id: m,
24
- name: p,
25
- checked: i,
26
- disabled: d,
27
- onChange: c
24
+ id: n,
25
+ name: h,
26
+ checked: t,
27
+ disabled: b,
28
+ onChange: o
28
29
  }
29
30
  ),
30
- checked: i,
31
- children: s && s.map((r, f) => {
32
- const t = String(r[n]), u = a.includes(l, t), b = a.includes(o, t);
33
- return /* @__PURE__ */ e(
34
- x,
31
+ checked: t,
32
+ children: m && m.map((e, p) => {
33
+ const d = String(c.get(e, r ?? "id")), I = c.includes(s, d), f = c.includes(l, d);
34
+ return /* @__PURE__ */ i(
35
+ k,
35
36
  {
36
- id: t,
37
- idKey: n,
38
- name: r.name,
39
- checked: u,
40
- disabled: b,
41
- disabledIds: o,
42
- children: r.children,
43
- onChange: c,
44
- defaultSelected: l
37
+ id: d,
38
+ idKey: r,
39
+ name: e.name,
40
+ checked: I,
41
+ disabled: f,
42
+ disabledIds: l,
43
+ children: e.children,
44
+ onChange: o,
45
+ defaultSelected: s
45
46
  },
46
- f
47
+ p
47
48
  );
48
49
  })
49
50
  }
50
51
  );
51
- }
52
+ };
52
53
  export {
53
- x as default
54
+ k as Item
54
55
  };
@@ -1,46 +1,26 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { B as s } from "../../../Box-B1AVyJ_s.js";
3
- import { C as p } from "../../../Checkbox-CrU2hpWB.js";
4
- import { T as h } from "../../../Typography-D1t7XuLN.js";
5
- function u({
6
- id: o,
7
- name: n,
8
- checked: i,
9
- disabled: r,
10
- onChange: a
11
- }) {
12
- return /* @__PURE__ */ l(s, { display: "flex", alignItems: "center", children: [
13
- /* @__PURE__ */ e(
14
- p,
1
+ import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
+ import { ItemLabelRoot as c, ItemCheckbox as s, ItemText as d } from "../styled.js";
3
+ const b = (o) => {
4
+ const { id: n, name: l, checked: r, disabled: i, onChange: t } = o;
5
+ return /* @__PURE__ */ h(c, { children: [
6
+ /* @__PURE__ */ a(
7
+ s,
15
8
  {
16
9
  size: "small",
17
- checked: i,
18
- value: o,
19
- sx: {
20
- padding: 0,
21
- marginRight: 0.85,
22
- "& .MuiSvgIcon-root": { width: 14, height: 14 }
10
+ checked: r,
11
+ value: n,
12
+ disabled: i,
13
+ onChange: (e) => {
14
+ t && t(e.target.value, e.target.checked);
23
15
  },
24
- disabled: r,
25
- onChange: (t) => {
26
- a && a(t.target.value, t.target.checked);
27
- },
28
- onClick: (t) => {
29
- t.stopPropagation();
16
+ onClick: (e) => {
17
+ e.stopPropagation();
30
18
  }
31
19
  }
32
20
  ),
33
- /* @__PURE__ */ e(
34
- h,
35
- {
36
- variant: "subtitle1",
37
- fontSize: "12px",
38
- sx: { userSelect: "none" },
39
- children: n
40
- }
41
- )
21
+ /* @__PURE__ */ a(d, { variant: "subtitle1", children: l })
42
22
  ] });
43
- }
23
+ };
44
24
  export {
45
- u as default
25
+ b as ItemLabel
46
26
  };
@@ -0,0 +1,28 @@
1
+ import { useThemeProps as d } from "@mui/material";
2
+ import f from "lodash";
3
+ import s from "react";
4
+ import { flattenNestedTemplates as h } from "../../utils/ontology.js";
5
+ const p = 500, R = (u) => {
6
+ const a = d({ props: u, name: "HCTreeViewFilter" }), { data: r, idKey: n = "id" } = a, [t, c] = s.useState(""), o = s.useRef(
7
+ null
8
+ ), i = h(
9
+ r
10
+ ), l = s.useMemo(() => t.length > 0 ? f.uniqBy(
11
+ i.filter((e) => e.name.toLowerCase().includes(t)),
12
+ (e) => e.id
13
+ ) : r, [t, r, i]), m = { ...a, idKey: n };
14
+ return {
15
+ refs: {},
16
+ state: { ownerState: m, search: t, filteredData: l, idKey: n },
17
+ actions: { handleSearch: (e) => {
18
+ o.current && clearTimeout(o.current), o.current = setTimeout(() => {
19
+ c(e.toLowerCase());
20
+ }, p);
21
+ }, handleSubmit: (e) => {
22
+ c(e ? e.toLowerCase() : "");
23
+ } }
24
+ };
25
+ };
26
+ export {
27
+ R as useTreeViewFilterLogic
28
+ };