@hybridcore/ui 1.4.36 → 1.4.38

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 (33) hide show
  1. package/dist/{DialogContent-B0_-g7B0.js → DialogContent-CtA2aNum.js} +1 -1
  2. package/dist/{Modal-CJn-Bqyo.js → Modal-DzZo-vlm.js} +1 -0
  3. package/dist/{Select-DwAJxKTN.js → Select-ush_fSWy.js} +1 -1
  4. package/dist/{TextField-BAXUnwnR.js → TextField-BjFXx91l.js} +1 -1
  5. package/dist/components/confirm/dialog.js +2 -2
  6. package/dist/components/confirm/index.js +1 -1
  7. package/dist/components/context-menu/index.js +118 -118
  8. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  9. package/dist/components/instance-form/components/variable/index.js +3 -3
  10. package/dist/components/instance-form/components/variables/index.js +1 -1
  11. package/dist/components/property-mapping/index.js +1 -1
  12. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  13. package/dist/components/range-selector/components/date-range/index.js +1 -1
  14. package/dist/components/range-selector/index.js +1 -1
  15. package/dist/components/template-filters/components/filter/index.js +27 -23
  16. package/dist/components/template-form/components/property-list/index.js +3 -3
  17. package/dist/components/template-form/components/property-list/property-list-form.js +3 -3
  18. package/dist/components/template-form/components/recognition-property-list/index.js +2 -2
  19. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +2 -2
  20. package/dist/components/template-form/index.js +2 -2
  21. package/dist/components/template-property-filters/property.js +1 -1
  22. package/dist/components/tree-select/index.js +51 -48
  23. package/dist/components/treeview-filter/index.js +55 -591
  24. package/dist/components/treeview-filter/item/index.js +30 -34
  25. package/dist/components/treeview-filter/item/styled.js +14 -13
  26. package/dist/components/treeview-filter/item-label/index.js +1 -1
  27. package/dist/{dialog-DPGR2gik.js → dialog-DrVArHYg.js} +1 -1
  28. package/dist/{index-RfDWDd66.js → index-CAaDu0NI.js} +1979 -2071
  29. package/dist/{index-B_GNCJdV.js → index-D2tF2-ya.js} +2 -2
  30. package/dist/main.d.ts +6 -1
  31. package/dist/main.js +1 -1
  32. package/dist/{property-list-form-DgmTiBvu.js → property-list-form-CLSTkOmv.js} +2 -2
  33. package/package.json +2 -2
@@ -1,70 +1,73 @@
1
- import { jsxs as p, Fragment as _, jsx as n } from "react/jsx-runtime";
2
- import f from "react";
3
- import { TreeViewFilter as b } from "../treeview-filter/index.js";
4
- import r from "lodash";
5
- import { flattenNestedTemplates as A } from "../../utils/ontology.js";
6
- import { F as E, I as M } from "../../InputLabel-ClDXuWBr.js";
7
- import { S as j } from "../../Select-DwAJxKTN.js";
1
+ import { jsxs as h, Fragment as W, jsx as o } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { TreeViewFilter as _ } from "../treeview-filter/index.js";
4
+ import s from "lodash";
5
+ import { flattenNestedTemplates as b } from "../../utils/ontology.js";
6
+ import { F as A, I as M } from "../../InputLabel-ClDXuWBr.js";
7
+ import { S as j } from "../../Select-ush_fSWy.js";
8
8
  import { M as B } from "../../MenuItem-Lcjh1XlV.js";
9
- import { D as k, a as w, b as L } from "../../DialogContent-B0_-g7B0.js";
9
+ import { D as k, a as w, b as L } from "../../DialogContent-CtA2aNum.js";
10
10
  import { B as N } from "../../Button-jy67CcTH.js";
11
11
  const U = ({
12
12
  data: m,
13
- label: s,
14
- selected: o,
15
- disabled: C,
16
- idKey: l = "id",
17
- variant: h = "outlined",
18
- onChange: S
13
+ label: c,
14
+ selected: r,
15
+ disabled: S,
16
+ idKey: i = "id",
17
+ variant: g = "outlined",
18
+ onChange: D
19
19
  }) => {
20
- const [D, u] = f.useState(!1), [I, g] = f.useState([]), i = A(m), a = f.useMemo(() => r.isArray(o) ? o.map(
21
- (e) => i.find((t) => String(r.get(t, l)) === e)
22
- ) : [], [o, i]), v = (e, t) => {
23
- S(e, t);
24
- }, T = () => {
25
- u(!0), O();
26
- }, x = () => {
27
- u(!1);
28
- }, F = (e, t) => {
29
- g(t);
20
+ const [v, x] = u.useState(!1), [E, d] = u.useState([]), f = b(m), p = u.useMemo(() => s.isArray(r) ? r.map(
21
+ (n) => f.find((e) => String(s.get(e, i)) === n)
22
+ ) : [], [r, f]), T = (n, e) => {
23
+ D(n, e);
24
+ }, F = () => {
25
+ x(!0), O();
26
+ }, C = () => {
27
+ x(!1);
28
+ }, I = (n, e, l) => {
29
+ d(l ? (a) => [
30
+ ...a.filter((t) => t !== e),
31
+ e
32
+ ] : (a) => a.filter((t) => t !== e));
30
33
  }, O = () => {
31
- const e = [];
32
- a.length > 0 && a.forEach((t) => {
33
- const d = t == null ? void 0 : t.parentKeys, W = i.filter((c) => d == null ? void 0 : d.includes(c.templateKey)).map((c) => String(r.get(c, l)));
34
- e.push(...W);
35
- }), g(e);
34
+ const n = [];
35
+ p.length > 0 && p.forEach((e) => {
36
+ const l = e == null ? void 0 : e.parentKeys, a = f.filter((t) => l == null ? void 0 : l.includes(t.templateKey)).map((t) => String(s.get(t, i)));
37
+ n.push(...a);
38
+ }), d(n);
36
39
  };
37
- return /* @__PURE__ */ p(_, { children: [
38
- /* @__PURE__ */ p(E, { variant: h, fullWidth: !0, children: [
39
- s !== void 0 && /* @__PURE__ */ n(M, { id: "select-label", children: s }),
40
- /* @__PURE__ */ n(
40
+ return /* @__PURE__ */ h(W, { children: [
41
+ /* @__PURE__ */ h(A, { variant: g, fullWidth: !0, children: [
42
+ c !== void 0 && /* @__PURE__ */ o(M, { id: "select-label", children: c }),
43
+ /* @__PURE__ */ o(
41
44
  j,
42
45
  {
43
- label: s,
44
- variant: h,
46
+ label: c,
47
+ variant: g,
45
48
  id: "select",
46
49
  labelId: "select-label",
47
- value: o,
50
+ value: r,
48
51
  open: !1,
49
- onOpen: T,
50
- children: a.length > 0 && a.map((e, t) => /* @__PURE__ */ n(B, { value: r.get(e, l) ?? "", children: e == null ? void 0 : e.name }, t))
52
+ onOpen: F,
53
+ children: p.length > 0 && p.map((n, e) => /* @__PURE__ */ o(B, { value: s.get(n, i) ?? "", children: n == null ? void 0 : n.name }, e))
51
54
  }
52
55
  )
53
56
  ] }),
54
- /* @__PURE__ */ p(k, { open: D, onClose: x, fullWidth: !0, maxWidth: "sm", children: [
55
- /* @__PURE__ */ n(w, { sx: { p: 1, pt: 2 }, children: /* @__PURE__ */ n(
56
- b,
57
+ /* @__PURE__ */ h(k, { open: v, onClose: C, fullWidth: !0, maxWidth: "sm", children: [
58
+ /* @__PURE__ */ o(w, { sx: { p: 1, pt: 2 }, children: /* @__PURE__ */ o(
59
+ _,
57
60
  {
58
61
  data: m,
59
- selected: r.isArray(o) ? o : void 0,
60
- disabled: C,
61
- expanded: I,
62
- idKey: l,
63
- onToggle: F,
64
- onChange: v
62
+ selected: s.isArray(r) ? r : void 0,
63
+ disabled: S,
64
+ expanded: E,
65
+ idKey: i,
66
+ onExpansionToggle: I,
67
+ onChange: T
65
68
  }
66
69
  ) }),
67
- /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(N, { onClick: x, variant: "contained", fullWidth: !0, children: "OK" }) })
70
+ /* @__PURE__ */ o(L, { children: /* @__PURE__ */ o(N, { onClick: C, variant: "contained", fullWidth: !0, children: "OK" }) })
68
71
  ] })
69
72
  ] });
70
73
  };