@hybridcore/ui 1.6.24 → 1.6.26

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 (53) hide show
  1. package/dist/{AccordionSummary-c6-Buzbq.js → AccordionSummary-B6-hHjCC.js} +3 -3
  2. package/dist/{Add-CB4mPrke.js → Add-eXYPgCCB.js} +1 -1
  3. package/dist/{Alert-BsT46Tgd.js → Alert-OoSOUjZM.js} +2 -2
  4. package/dist/{Button-BMUZn0cT.js → Button-gZFgy23t.js} +1 -1
  5. package/dist/{ButtonBase-DG5J0YgP.js → ButtonBase-Dgg9dzM8.js} +2 -2
  6. package/dist/{Delete-ofipLwkd.js → Delete-B8COyxKI.js} +1 -1
  7. package/dist/{IconButton-SJfF1cr9.js → IconButton-CQwROBzr.js} +1 -1
  8. package/dist/{MenuItem-BjnnhDbD.js → MenuItem-BAKBPyZx.js} +3 -3
  9. package/dist/{Modal-Djf5pMjD.js → Modal-DVdqH5dj.js} +1 -1
  10. package/dist/{Select-nL91eUH9.js → Select-B4zhu5G_.js} +2 -2
  11. package/dist/{SwitchBase-BcJAJYsB.js → SwitchBase-BqUrfIHp.js} +1 -1
  12. package/dist/{TextField-Db63_GNb.js → TextField-Cx5T7iJn.js} +4 -3
  13. package/dist/components/button/styled.js +1 -1
  14. package/dist/components/charts/forecast-cone/index.js +1 -1
  15. package/dist/components/collapsible-card/index.js +1 -1
  16. package/dist/components/collapsible-card/styled.js +1 -1
  17. package/dist/components/color-picker/index.js +2 -2
  18. package/dist/components/color-picker/styled.js +1 -1
  19. package/dist/components/confirm/dialog.js +2 -2
  20. package/dist/components/confirm/index.js +1 -1
  21. package/dist/components/duration-select/index.js +1 -1
  22. package/dist/components/duration-select/styled.js +1 -1
  23. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  24. package/dist/components/instance-form/components/variable/index.js +3 -2
  25. package/dist/components/instance-form/components/variables/index.js +1 -1
  26. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  27. package/dist/components/property-mapping/index.js +1 -1
  28. package/dist/components/simple-pivot-table/index.js +46 -50
  29. package/dist/components/simple-pivot-table/styled.js +43 -28
  30. package/dist/components/template-form/components/default-value-input/index.js +120 -0
  31. package/dist/components/template-form/components/default-value-input/logic.js +76 -0
  32. package/dist/components/template-form/components/property-list/index.js +5 -5
  33. package/dist/components/template-form/components/property-list/property-list-columns.js +2 -2
  34. package/dist/components/template-form/components/property-list/property-list-form.js +245 -240
  35. package/dist/components/template-form/components/property-list/property-list-logic.js +59 -42
  36. package/dist/components/template-form/components/recognition-property-list/index.js +5 -5
  37. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  38. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +5 -5
  39. package/dist/components/template-form/index.js +39 -37
  40. package/dist/components/template-form/logic.js +24 -23
  41. package/dist/components/template-property-filters/property.js +23 -20
  42. package/dist/createSvgIcon-Bi-IzY8I.js +83 -0
  43. package/dist/{dialog-CNxZ7uox.js → dialog-DwmnOp5c.js} +2 -2
  44. package/dist/{index-BQ4_OA4b.js → index-Dvh8D1yM.js} +26 -25
  45. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  46. package/dist/main.d.ts +27 -1
  47. package/dist/{styled-DObpn_Bi.js → styled-C5WQOj4E.js} +1 -1
  48. package/dist/{useIsFocusVisible-BHPF-Pml.js → useIsFocusVisible-CVnvB5M2.js} +1 -1
  49. package/dist/{useSlot-gpKOd92R.js → useSlot-BOHuz6Wu.js} +1 -1
  50. package/dist/{useTimeout-CM6EsHyp.js → useTimeout-D5vWrF1x.js} +2 -2
  51. package/dist/utils/ontology.js +49 -43
  52. package/package.json +1 -1
  53. package/dist/createSvgIcon-jKAqRXE2.js +0 -93
@@ -0,0 +1,83 @@
1
+ import { a as v } from "./_commonjsHelpers-BkfeUUK-.js";
2
+ import { c as g } from "./createSvgIcon-Bx0mTP6n.js";
3
+ import { C as b, b as E } from "./styled-Ckq8ALHh.js";
4
+ import { d as _ } from "./debounce-46wSf_lW.js";
5
+ import { o as y, a as N } from "./ownerWindow-wg6foiOE.js";
6
+ import { a as S } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
7
+ import { s as C, a as $, b as I, u as T } from "./useTimeout-D5vWrF1x.js";
8
+ import { c as P } from "./createChainedFunction-C0nujS3O.js";
9
+ import { i as w } from "./isMuiElement-CxT3_ACP.js";
10
+ import { u as O } from "./useId-BW-oWmul.js";
11
+ import { u as F } from "./useControlled-BYdyS7Pn.js";
12
+ import { u as j } from "./useIsFocusVisible-CVnvB5M2.js";
13
+ var c = {};
14
+ function q(e, r) {
15
+ return process.env.NODE_ENV === "production" ? () => null : (n, s, o, t, u) => {
16
+ const a = o || "<<anonymous>>", i = u || s;
17
+ return typeof n[s] < "u" ? new Error(`The ${t} \`${i}\` of \`${a}\` is deprecated. ${r}`) : null;
18
+ };
19
+ }
20
+ function D(e, r) {
21
+ if (process.env.NODE_ENV === "production")
22
+ return () => null;
23
+ const n = r ? S({}, r.propTypes) : null;
24
+ return (o) => (t, u, a, i, l, ...h) => {
25
+ const f = l || u, m = n == null ? void 0 : n[f];
26
+ if (m) {
27
+ const p = m(t, u, a, i, l, ...h);
28
+ if (p)
29
+ return p;
30
+ }
31
+ return typeof t[u] < "u" && !t[o] ? new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${o}\` prop.`) : null;
32
+ };
33
+ }
34
+ function V(e, r, n, s, o) {
35
+ if (process.env.NODE_ENV === "production")
36
+ return null;
37
+ const t = o || r;
38
+ return typeof e[r] < "u" ? new Error(`The prop \`${t}\` is not supported. Please remove it.`) : null;
39
+ }
40
+ const k = {
41
+ configure: (e) => {
42
+ process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
43
+ `)), b.configure(e);
44
+ }
45
+ }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46
+ __proto__: null,
47
+ capitalize: E,
48
+ createChainedFunction: P,
49
+ createSvgIcon: g,
50
+ debounce: _,
51
+ deprecatedPropType: q,
52
+ isMuiElement: w,
53
+ ownerDocument: y,
54
+ ownerWindow: N,
55
+ requirePropFactory: D,
56
+ setRef: C,
57
+ unstable_ClassNameGenerator: k,
58
+ unstable_useEnhancedEffect: $,
59
+ unstable_useId: O,
60
+ unsupportedProp: V,
61
+ useControlled: F,
62
+ useEventCallback: I,
63
+ useForkRef: T,
64
+ useIsFocusVisible: j
65
+ }, Symbol.toStringTag, { value: "Module" })), M = /* @__PURE__ */ v(G);
66
+ var d;
67
+ function Q() {
68
+ return d || (d = 1, function(e) {
69
+ "use client";
70
+ Object.defineProperty(e, "__esModule", {
71
+ value: !0
72
+ }), Object.defineProperty(e, "default", {
73
+ enumerable: !0,
74
+ get: function() {
75
+ return r.createSvgIcon;
76
+ }
77
+ });
78
+ var r = M;
79
+ }(c)), c;
80
+ }
81
+ export {
82
+ Q as r
83
+ };
@@ -8,10 +8,10 @@ import { P as o } from "./index-CblbdqjE.js";
8
8
  import { c as g } from "./clsx-OuTLNxxd.js";
9
9
  import { g as y, a as C, s as m, b, u as D, c as v } from "./styled-Ckq8ALHh.js";
10
10
  import { P as _, u as no } from "./Paper-BFDcMa0t.js";
11
- import { B as ro, M as so, F as lo } from "./Modal-Djf5pMjD.js";
11
+ import { B as ro, M as so, F as lo } from "./Modal-DVdqH5dj.js";
12
12
  import { u as co } from "./useId-BW-oWmul.js";
13
13
  import { T as po } from "./Typography-B_LKrxyI.js";
14
- import { B as E } from "./Button-BMUZn0cT.js";
14
+ import { B as E } from "./Button-gZFgy23t.js";
15
15
  function uo(e) {
16
16
  return C("MuiDialog", e);
17
17
  }
@@ -3,17 +3,18 @@ import { KeyboardArrowUp as X, KeyboardArrowDown as Z, Add as O, LockOutlined as
3
3
  import { FormControl as K, FormGroup as ne, FormControlLabel as $, Checkbox as U, Chip as te, Dialog as re, DialogTitle as ae, DialogContent as oe, DialogActions as le, Button as G, TextField as H, InputAdornment as ie, Tooltip as de, InputLabel as pe, Select as ce, MenuItem as ue } from "@mui/material";
4
4
  import J from "dayjs";
5
5
  import C from "lodash";
6
+ import { parseBooleanValue as me } from "./utils/ontology.js";
6
7
  import { ConditionalWrapper as p } from "./components/conditional-wrapper/index.js";
7
- import { DateTimePicker as me } from "./components/date-time-picker/index.js";
8
- import { GeometryPicker as se } from "./components/geometry-picker/index.js";
9
- import { PhoneInput as he } from "./components/phone-input/index.js";
8
+ import { DateTimePicker as se } from "./components/date-time-picker/index.js";
9
+ import { GeometryPicker as he } from "./components/geometry-picker/index.js";
10
+ import { PhoneInput as fe } from "./components/phone-input/index.js";
10
11
  import { leftLayoutWrapper as y } from "./components/instance-form/helpers.js";
11
- import { CompositeListEnumLabel as fe, CompositeListEnumEmpty as ye, CompositeListShowMoreButton as Ie, CompositeListContainer as Ce, CompositeListLabel as ge, CompositeListValues as be, CompositeListMiniButton as ve, VariableFullWidth as P } from "./components/instance-form/styled.js";
12
+ import { CompositeListEnumLabel as ye, CompositeListEnumEmpty as Ie, CompositeListShowMoreButton as Ce, CompositeListContainer as ge, CompositeListLabel as be, CompositeListValues as ve, CompositeListMiniButton as Ve, VariableFullWidth as P } from "./components/instance-form/styled.js";
12
13
  import { useState as R } from "react";
13
- import Ve from "./hooks/useToggle.js";
14
+ import we from "./hooks/useToggle.js";
14
15
  import b from "./components/instance-form/components/TopLabelWrapper.js";
15
- import { CompositeMatrix as we } from "./components/instance-form/components/composite-matrix/index.js";
16
- const _ = 10, Te = (q) => {
16
+ import { CompositeMatrix as Te } from "./components/instance-form/components/composite-matrix/index.js";
17
+ const _ = 10, xe = (q) => {
17
18
  var L, k, A;
18
19
  const {
19
20
  property: l,
@@ -23,7 +24,7 @@ const _ = 10, Te = (q) => {
23
24
  labelPosition: r = "default",
24
25
  size: u = "medium",
25
26
  onChange: v
26
- } = q, t = Ve(!1), [T, m] = R(), [g, D] = R(!1), x = (i) => {
27
+ } = q, t = we(!1), [T, m] = R(), [g, D] = R(!1), x = (i) => {
27
28
  m(C.get(i, l.propertyId));
28
29
  }, S = () => {
29
30
  v([...a ?? [], T]), m(""), t.action.close();
@@ -50,7 +51,7 @@ const _ = 10, Te = (q) => {
50
51
  wrapper: b(l.name, l == null ? void 0 : l.required),
51
52
  children: /* @__PURE__ */ I(B, { children: [
52
53
  /* @__PURE__ */ I(K, { fullWidth: !0, component: "fieldset", variant: s, children: [
53
- r === "default" && /* @__PURE__ */ n(fe, { children: l.name }),
54
+ r === "default" && /* @__PURE__ */ n(ye, { children: l.name }),
54
55
  /* @__PURE__ */ n(ne, { children: i && i.length > 0 ? i.slice(0, g ? 9999 : _).map((d, f) => /* @__PURE__ */ n(
55
56
  $,
56
57
  {
@@ -70,10 +71,10 @@ const _ = 10, Te = (q) => {
70
71
  }
71
72
  },
72
73
  f
73
- )) : /* @__PURE__ */ n(ye, { variant: "caption", children: "No enum values!" }) })
74
+ )) : /* @__PURE__ */ n(Ie, { variant: "caption", children: "No enum values!" }) })
74
75
  ] }),
75
76
  C.isArray(i) && i.length > _ && /* @__PURE__ */ I(
76
- Ie,
77
+ Ce,
77
78
  {
78
79
  size: "small",
79
80
  endIcon: g ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n(Z, {}),
@@ -101,9 +102,9 @@ const _ = 10, Te = (q) => {
101
102
  {
102
103
  condition: r === "top",
103
104
  wrapper: b(l.name, l == null ? void 0 : l.required),
104
- children: /* @__PURE__ */ I(Ce, { ownerState: { variant: s }, children: [
105
- r === "default" && /* @__PURE__ */ n(ge, { children: l.name }),
106
- /* @__PURE__ */ n(be, { children: C.isArray(a) && a.map((i, d) => {
105
+ children: /* @__PURE__ */ I(ge, { ownerState: { variant: s }, children: [
106
+ r === "default" && /* @__PURE__ */ n(be, { children: l.name }),
107
+ /* @__PURE__ */ n(ve, { children: C.isArray(a) && a.map((i, d) => {
107
108
  var f, h;
108
109
  return /* @__PURE__ */ n(
109
110
  te,
@@ -116,7 +117,7 @@ const _ = 10, Te = (q) => {
116
117
  );
117
118
  }) }),
118
119
  /* @__PURE__ */ n(
119
- ve,
120
+ Ve,
120
121
  {
121
122
  ownerState: { variant: "text" },
122
123
  startIcon: /* @__PURE__ */ n(O, {}),
@@ -140,7 +141,7 @@ const _ = 10, Te = (q) => {
140
141
  children: [
141
142
  /* @__PURE__ */ n(ae, { children: "Add List Value" }),
142
143
  /* @__PURE__ */ n(oe, { children: (A = l.dataTypeInfo) != null && A.innerType ? /* @__PURE__ */ n(
143
- xe,
144
+ Le,
144
145
  {
145
146
  mapboxAccessToken: e,
146
147
  property: {
@@ -168,7 +169,7 @@ const _ = 10, Te = (q) => {
168
169
  }
169
170
  )
170
171
  ] });
171
- }, xe = (q) => {
172
+ }, Le = (q) => {
172
173
  var i, d, f, h, M, N, j, Y, z;
173
174
  const {
174
175
  mapboxAccessToken: l,
@@ -279,7 +280,7 @@ const _ = 10, Te = (q) => {
279
280
  (h = t == null ? void 0 : t[e == null ? void 0 : e.propertyId]) == null ? void 0 : h.description
280
281
  ),
281
282
  children: /* @__PURE__ */ n(
282
- me,
283
+ se,
283
284
  {
284
285
  label: r === "default" ? e.name : void 0,
285
286
  value: o,
@@ -352,7 +353,7 @@ const _ = 10, Te = (q) => {
352
353
  U,
353
354
  {
354
355
  name: e.propertyId,
355
- checked: !!(a ?? e.defaultValue ?? !1),
356
+ checked: me(a ?? e.defaultValue ?? !1),
356
357
  onChange: x,
357
358
  size: u
358
359
  }
@@ -418,7 +419,7 @@ const _ = 10, Te = (q) => {
418
419
  condition: r === "left",
419
420
  wrapper: y(e.name),
420
421
  children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
421
- se,
422
+ he,
422
423
  {
423
424
  mapboxAccessToken: l,
424
425
  label: r === "default" ? e.name : void 0,
@@ -435,7 +436,7 @@ const _ = 10, Te = (q) => {
435
436
  condition: r === "left",
436
437
  wrapper: y(e.name),
437
438
  children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
438
- he,
439
+ fe,
439
440
  {
440
441
  label: r === "default" ? e.name : void 0,
441
442
  placeholder: "Enter phone number",
@@ -445,7 +446,7 @@ const _ = 10, Te = (q) => {
445
446
  ) })
446
447
  }
447
448
  ) : e.type === "composite-list" ? /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
448
- Te,
449
+ xe,
449
450
  {
450
451
  property: e,
451
452
  value: a ?? e.defaultValue ?? "",
@@ -456,7 +457,7 @@ const _ = 10, Te = (q) => {
456
457
  onChange: k(e.propertyId)
457
458
  }
458
459
  ) }) : e.type === "composite-matrix" ? /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
459
- we,
460
+ Te,
460
461
  {
461
462
  property: e,
462
463
  value: a ?? e.defaultValue ?? "",
@@ -467,6 +468,6 @@ const _ = 10, Te = (q) => {
467
468
  ) }) : null;
468
469
  };
469
470
  export {
470
- Te as C,
471
- xe as V
471
+ xe as C,
472
+ Le as V
472
473
  };
@@ -0,0 +1,13 @@
1
+ import * as u from "react";
2
+ function m(i, a) {
3
+ var l, e;
4
+ return /* @__PURE__ */ u.isValidElement(i) && a.indexOf(
5
+ // For server components `muiName` is avaialble in element.type._payload.value.muiName
6
+ // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
7
+ // eslint-disable-next-line no-underscore-dangle
8
+ (l = i.type.muiName) != null ? l : (e = i.type) == null || (e = e._payload) == null || (e = e.value) == null ? void 0 : e.muiName
9
+ ) !== -1;
10
+ }
11
+ export {
12
+ m as i
13
+ };
package/dist/main.d.ts CHANGED
@@ -3848,7 +3848,8 @@ declare module "@mui/material/styles" {
3848
3848
  | "header"
3849
3849
  | "content"
3850
3850
  | "footer"
3851
- | "scrollHint";
3851
+ | "scrollHint"
3852
+ | "valueHeadCell";
3852
3853
  }
3853
3854
 
3854
3855
  interface ComponentsPropsList {
@@ -4766,6 +4767,21 @@ declare namespace ONTOLOGY {
4766
4767
  };
4767
4768
  }
4768
4769
 
4770
+ /**
4771
+ * A template's own override of an inherited property's `defaultValue`,
4772
+ * `required` and/or `description`. The target must be an inherited property
4773
+ * (overriding a property the template defines itself is rejected by the
4774
+ * backend). At most one override per `propertyId`. Each overridable field is
4775
+ * `null`/absent when not overridden, in which case the inherited value applies;
4776
+ * an override with every field null is treated as a removal.
4777
+ */
4778
+ interface PropertyOverride {
4779
+ propertyId: string;
4780
+ defaultValue?: string | null;
4781
+ required?: boolean | null;
4782
+ description?: string | null;
4783
+ }
4784
+
4769
4785
  interface DataTypeInfo {
4770
4786
  datePattern?: string;
4771
4787
  coordinateFormat?: string;
@@ -4813,6 +4829,7 @@ declare namespace ONTOLOGY {
4813
4829
  editable: boolean;
4814
4830
  stationary: boolean;
4815
4831
  agentReferenceIds: Array<number>;
4832
+ localPropertyOverrides?: PropertyOverride[];
4816
4833
 
4817
4834
  // UI Spesific fields
4818
4835
  childrenKeys?: string[];
@@ -4832,6 +4849,7 @@ declare namespace ONTOLOGY {
4832
4849
  editable: boolean;
4833
4850
  stationary: boolean;
4834
4851
  agentReferenceIds?: Array<number>;
4852
+ localPropertyOverrides?: PropertyOverride[];
4835
4853
  }
4836
4854
 
4837
4855
  interface UpdateObjectDTO extends CreateObjectDTO {
@@ -4852,6 +4870,7 @@ declare namespace ONTOLOGY {
4852
4870
  creatable: boolean;
4853
4871
  editable: boolean;
4854
4872
  recognitionPropertyList: RecognitionProperty[];
4873
+ localPropertyOverrides?: PropertyOverride[];
4855
4874
  }
4856
4875
 
4857
4876
  interface CreateEventDTO {
@@ -4866,6 +4885,7 @@ declare namespace ONTOLOGY {
4866
4885
  creatable: boolean;
4867
4886
  editable: boolean;
4868
4887
  recognitionPropertyList: RecognitionProperty[];
4888
+ localPropertyOverrides?: PropertyOverride[];
4869
4889
  }
4870
4890
 
4871
4891
  interface UpdateEventDTO extends CreateEventDTO {
@@ -4887,6 +4907,7 @@ declare namespace ONTOLOGY {
4887
4907
  version: unknown;
4888
4908
  creatable: boolean;
4889
4909
  editable: boolean;
4910
+ localPropertyOverrides?: PropertyOverride[];
4890
4911
  }
4891
4912
 
4892
4913
  interface CreateAgentDTO {
@@ -4902,6 +4923,7 @@ declare namespace ONTOLOGY {
4902
4923
  version: unknown;
4903
4924
  creatable: boolean;
4904
4925
  editable: boolean;
4926
+ localPropertyOverrides?: PropertyOverride[];
4905
4927
  }
4906
4928
 
4907
4929
  interface UpdateAgentDTO extends CreateAgentDTO {
@@ -4922,6 +4944,7 @@ declare namespace ONTOLOGY {
4922
4944
  creatable: boolean;
4923
4945
  editable: boolean;
4924
4946
  storeFile: boolean;
4947
+ localPropertyOverrides?: PropertyOverride[];
4925
4948
  }
4926
4949
 
4927
4950
  interface CreateFileDTO {
@@ -4936,6 +4959,7 @@ declare namespace ONTOLOGY {
4936
4959
  creatable: boolean;
4937
4960
  editable: boolean;
4938
4961
  storeFile: boolean;
4962
+ localPropertyOverrides?: PropertyOverride[];
4939
4963
  }
4940
4964
 
4941
4965
  interface UpdateFileDTO extends CreateFileDTO {
@@ -4955,6 +4979,7 @@ declare namespace ONTOLOGY {
4955
4979
  version: any;
4956
4980
  creatable: boolean;
4957
4981
  editable: boolean;
4982
+ localPropertyOverrides?: PropertyOverride[];
4958
4983
  }
4959
4984
 
4960
4985
  interface CreateSystemDTO {
@@ -4969,6 +4994,7 @@ declare namespace ONTOLOGY {
4969
4994
  version: any;
4970
4995
  creatable: boolean;
4971
4996
  editable: boolean;
4997
+ localPropertyOverrides?: PropertyOverride[];
4972
4998
  }
4973
4999
 
4974
5000
  interface UpdateSystemDTO extends CreateSystemDTO {
@@ -4,7 +4,7 @@ import * as d from "react";
4
4
  import { P as e } from "./index-CblbdqjE.js";
5
5
  import { c as F } from "./clsx-OuTLNxxd.js";
6
6
  import { s as f, r as I, g as H, a as G, b as u, d as V, u as W, c as q } from "./styled-Ckq8ALHh.js";
7
- import { S as L } from "./SwitchBase-BcJAJYsB.js";
7
+ import { S as L } from "./SwitchBase-BqUrfIHp.js";
8
8
  import { c as z } from "./createSvgIcon-Bx0mTP6n.js";
9
9
  import { jsx as s, jsxs as Z } from "react/jsx-runtime";
10
10
  import { c as A } from "./createChainedFunction-C0nujS3O.js";
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { T as o } from "./useTimeout-CM6EsHyp.js";
2
+ import { T as o } from "./useTimeout-D5vWrF1x.js";
3
3
  let n = !0, s = !1;
4
4
  const c = new o(), f = {
5
5
  text: !0,
@@ -1,6 +1,6 @@
1
1
  import { _ as s, a as n } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
2
  import { r as v, m as b, a as j } from "./Paper-BFDcMa0t.js";
3
- import { u as k } from "./useTimeout-CM6EsHyp.js";
3
+ import { u as k } from "./useTimeout-D5vWrF1x.js";
4
4
  const E = ["className", "elementType", "ownerState", "externalForwardedProps", "getSlotOwnerState", "internalForwardedProps"], L = ["component", "slots", "slotProps"], N = ["component"];
5
5
  function z(o, e) {
6
6
  const {
@@ -53,8 +53,8 @@ function h() {
53
53
  export {
54
54
  r as T,
55
55
  i as a,
56
- h as b,
57
- l as c,
56
+ l as b,
57
+ h as c,
58
58
  s,
59
59
  d as u
60
60
  };
@@ -1,59 +1,65 @@
1
- import d from "lodash";
1
+ import y from "lodash";
2
2
  import { OBJECT_FALLBACK_ICON as p, EVENT_FALLBACK_ICON as g } from "../constants/index.js";
3
- const N = (n, i = !0) => {
4
- const t = [], e = n.values();
5
- for (const c of e)
6
- (c.parent === null || !n.has(c.parent)) && t.push(c.templateKey);
7
- const o = (c) => {
8
- const r = [], s = n.get(c);
3
+ const N = (n, t = !0) => {
4
+ const o = [], e = n.values();
5
+ for (const i of e)
6
+ (i.parent === null || !n.has(i.parent)) && o.push(i.templateKey);
7
+ const r = (i) => {
8
+ const c = [], s = n.get(i);
9
9
  if (s && s.childrenKeys)
10
- for (const l of s.childrenKeys) {
11
- const u = o(l), f = n.get(l);
12
- f && (u.length && (f.children = u), r.push(f));
10
+ for (const h of s.childrenKeys) {
11
+ const l = r(h), u = n.get(h);
12
+ u && (l.length && (u.children = l), c.push(u));
13
13
  }
14
- return r;
15
- }, h = [];
16
- return t.forEach((c) => {
17
- const r = n.get(c);
18
- if (r) {
19
- const s = o(c);
20
- r.children = s, i && r.parent === null ? h.push(...r.children) : h.push(r);
14
+ return c;
15
+ }, f = [];
16
+ return o.forEach((i) => {
17
+ const c = n.get(i);
18
+ if (c) {
19
+ const s = r(i);
20
+ c.children = s, t && c.parent === null ? f.push(...c.children) : f.push(c);
21
21
  }
22
- }), d.uniqBy(h, "id");
23
- }, y = (n) => {
24
- const i = [];
25
- for (const t in n)
26
- if (i.push(n[t]), n[t].children) {
27
- const e = y(n[t].children);
28
- i.push(...e);
29
- }
30
- return i;
31
- }, C = (n, i) => {
22
+ }), y.uniqBy(f, "id");
23
+ }, E = (n) => {
32
24
  const t = [];
33
- if (i && n && i.parent) {
34
- const e = n.get(i.parent);
25
+ for (const o in n)
26
+ if (t.push(n[o]), n[o].children) {
27
+ const e = E(n[o].children);
28
+ t.push(...e);
29
+ }
30
+ return t;
31
+ }, T = (n, t) => {
32
+ const o = [];
33
+ if (t && n && t.parent) {
34
+ const e = n.get(t.parent);
35
35
  if (e) {
36
- t.unshift(e);
37
- const o = C(n, e);
38
- t.unshift(...o);
36
+ o.unshift(e);
37
+ const r = T(n, e);
38
+ o.unshift(...r);
39
39
  }
40
40
  }
41
- return t;
42
- }, E = (n, i, t) => {
43
- const e = n == null ? void 0 : n.get(i);
44
- let o = p;
41
+ return o;
42
+ }, d = ["true", "1", "yes"], _ = ["false", "0", "no"], O = (n) => typeof n == "boolean" ? n : typeof n == "number" ? n !== 0 : typeof n != "string" ? !!n : d.includes(n.trim().toLowerCase()), A = (n) => {
43
+ if (n == null) return "";
44
+ const t = String(n).trim().toLowerCase();
45
+ return d.includes(t) ? "true" : _.includes(t) ? "false" : "";
46
+ }, B = (n, t, o) => {
47
+ const e = n == null ? void 0 : n.get(t);
48
+ let r = p;
45
49
  if (e)
46
- if (e.icon) o = e.icon;
50
+ if (e.icon) r = e.icon;
47
51
  else {
48
52
  if (!e.icon && e.parent)
49
- return E(n, e.parent, t);
50
- e.type === "EVENT" ? o = g : e.type === "OBJECT" && (o = p);
53
+ return B(n, e.parent, o);
54
+ e.type === "EVENT" ? r = g : e.type === "OBJECT" && (r = p);
51
55
  }
52
- return t && (o = o.replace("ontology-icon/", `ontology-icon/${t}/`), o = o.replace(".svg", ".png")), o;
56
+ return o && (r = r.replace("ontology-icon/", `ontology-icon/${o}/`), r = r.replace(".svg", ".png")), r;
53
57
  };
54
58
  export {
55
- y as flattenNestedTemplates,
59
+ E as flattenNestedTemplates,
56
60
  N as getNestedChildrenFromMap,
57
- E as getPageIcon,
58
- C as getTemplateHierarchy
61
+ B as getPageIcon,
62
+ T as getTemplateHierarchy,
63
+ O as parseBooleanValue,
64
+ A as toBooleanText
59
65
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.24",
4
+ "version": "1.6.26",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,93 +0,0 @@
1
- import { a as h } from "./_commonjsHelpers-BkfeUUK-.js";
2
- import { c as y } from "./createSvgIcon-Bx0mTP6n.js";
3
- import { C as _, b as g } from "./styled-Ckq8ALHh.js";
4
- import { d as E } from "./debounce-46wSf_lW.js";
5
- import { o as N, a as b } from "./ownerWindow-wg6foiOE.js";
6
- import { a as S } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
7
- import { s as $, a as C, c as I, u as T } from "./useTimeout-CM6EsHyp.js";
8
- import { c as O } from "./createChainedFunction-C0nujS3O.js";
9
- import * as P from "react";
10
- import { u as w } from "./useId-BW-oWmul.js";
11
- import { u as F } from "./useControlled-BYdyS7Pn.js";
12
- import { u as V } from "./useIsFocusVisible-BHPF-Pml.js";
13
- var c = {};
14
- function j(e, r) {
15
- return process.env.NODE_ENV === "production" ? () => null : (o, t, u, n, a) => {
16
- const s = u || "<<anonymous>>", i = a || t;
17
- return typeof o[t] < "u" ? new Error(`The ${n} \`${i}\` of \`${s}\` is deprecated. ${r}`) : null;
18
- };
19
- }
20
- function q(e, r) {
21
- var o, t;
22
- return /* @__PURE__ */ P.isValidElement(e) && r.indexOf(
23
- // For server components `muiName` is avaialble in element.type._payload.value.muiName
24
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
25
- // eslint-disable-next-line no-underscore-dangle
26
- (o = e.type.muiName) != null ? o : (t = e.type) == null || (t = t._payload) == null || (t = t.value) == null ? void 0 : t.muiName
27
- ) !== -1;
28
- }
29
- function D(e, r) {
30
- if (process.env.NODE_ENV === "production")
31
- return () => null;
32
- const o = r ? S({}, r.propTypes) : null;
33
- return (u) => (n, a, s, i, l, ...v) => {
34
- const m = l || a, f = o == null ? void 0 : o[m];
35
- if (f) {
36
- const p = f(n, a, s, i, l, ...v);
37
- if (p)
38
- return p;
39
- }
40
- return typeof n[a] < "u" && !n[u] ? new Error(`The prop \`${m}\` of \`${e}\` can only be used together with the \`${u}\` prop.`) : null;
41
- };
42
- }
43
- function R(e, r, o, t, u) {
44
- if (process.env.NODE_ENV === "production")
45
- return null;
46
- const n = u || r;
47
- return typeof e[r] < "u" ? new Error(`The prop \`${n}\` is not supported. Please remove it.`) : null;
48
- }
49
- const k = {
50
- configure: (e) => {
51
- process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
52
- `)), _.configure(e);
53
- }
54
- }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
55
- __proto__: null,
56
- capitalize: g,
57
- createChainedFunction: O,
58
- createSvgIcon: y,
59
- debounce: E,
60
- deprecatedPropType: j,
61
- isMuiElement: q,
62
- ownerDocument: N,
63
- ownerWindow: b,
64
- requirePropFactory: D,
65
- setRef: $,
66
- unstable_ClassNameGenerator: k,
67
- unstable_useEnhancedEffect: C,
68
- unstable_useId: w,
69
- unsupportedProp: R,
70
- useControlled: F,
71
- useEventCallback: I,
72
- useForkRef: T,
73
- useIsFocusVisible: V
74
- }, Symbol.toStringTag, { value: "Module" })), M = /* @__PURE__ */ h(G);
75
- var d;
76
- function Q() {
77
- return d || (d = 1, function(e) {
78
- "use client";
79
- Object.defineProperty(e, "__esModule", {
80
- value: !0
81
- }), Object.defineProperty(e, "default", {
82
- enumerable: !0,
83
- get: function() {
84
- return r.createSvgIcon;
85
- }
86
- });
87
- var r = M;
88
- }(c)), c;
89
- }
90
- export {
91
- q as i,
92
- Q as r
93
- };