@hybridcore/ui 1.3.5 → 1.3.7
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.
- package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/data-management/instance-form/components/composite-list/styled.js +15 -6
- package/dist/components/data-management/instance-form/components/variable/index.js +1 -1
- package/dist/components/data-management/instance-form/components/variables/index.js +16 -14
- package/dist/components/data-management/instance-form/index.js +117 -104
- package/dist/components/data-security-selectors/dissemination-list/index.js +11 -5
- package/dist/components/data-security-selectors/security-level/index.js +23 -24
- package/dist/components/date-time-picker/index.js +80 -58
- package/dist/components/geometry-picker/index.js +59 -55
- package/dist/components/geometry-picker/styled.js +22 -14
- package/dist/components/template-property-filters/property.js +47 -47
- package/dist/components/tree-select/index.js +46 -45
- package/dist/{index-B3Oj04nl.js → index-CJVcedWy.js} +109 -110
- package/dist/main.d.ts +8 -3
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { RadioButtonUnchecked as
|
|
5
|
-
import { Typography as p, FormLabel as
|
|
1
|
+
import { jsx as a, jsxs as r, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w } from "react";
|
|
3
|
+
import m from "dayjs";
|
|
4
|
+
import { RadioButtonUnchecked as F, CheckCircle as S, KeyboardArrowUp as Y, KeyboardArrowDown as y } from "@mui/icons-material";
|
|
5
|
+
import { Typography as p, FormLabel as D, FormGroup as L, Button as B } from "@mui/material";
|
|
6
6
|
import { DatePicker as I } from "@mui/x-date-pickers";
|
|
7
7
|
import { T as x, F as C } from "../../FormControlLabel-DENNVXWL.js";
|
|
8
|
-
import { B as
|
|
9
|
-
import { F as
|
|
10
|
-
function
|
|
8
|
+
import { B as f, C as V } from "../../Checkbox-BFWhj3s-.js";
|
|
9
|
+
import { F as T } from "../../FormControl-BMRUQKHh.js";
|
|
10
|
+
function R({
|
|
11
11
|
property: e,
|
|
12
12
|
value: t,
|
|
13
13
|
size: d = "medium",
|
|
14
|
-
onChange:
|
|
14
|
+
onChange: h
|
|
15
15
|
}) {
|
|
16
16
|
var g;
|
|
17
|
-
const u = (o) => (
|
|
17
|
+
const u = (o) => (n) => {
|
|
18
18
|
let l = { ...t };
|
|
19
|
-
const i =
|
|
20
|
-
l[o] = String(i),
|
|
21
|
-
[
|
|
19
|
+
const i = n.target.type === "checkbox" ? n.target.checked : n.target.value;
|
|
20
|
+
l[o] = String(i), h({
|
|
21
|
+
[n.target.name]: l
|
|
22
22
|
});
|
|
23
23
|
}, M = (o) => {
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
i ? (
|
|
27
|
-
[
|
|
24
|
+
var c;
|
|
25
|
+
const n = { ...t }, { value: l, checked: i, name: s } = o.target;
|
|
26
|
+
i ? (n.list || (n.list = []), n.list.push(l)) : n.list = (c = n.list) == null ? void 0 : c.filter((P) => P !== l), h({
|
|
27
|
+
[s]: n
|
|
28
28
|
});
|
|
29
|
-
}, b = (o) => (
|
|
29
|
+
}, b = (o) => (n) => {
|
|
30
30
|
let l = { ...t };
|
|
31
|
-
l[o] =
|
|
31
|
+
l[o] = m(n).format("YYYY-MM-DD"), h({
|
|
32
32
|
[e.propertyId]: l
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
if (["string", "text", "list"].includes(e.type))
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ a(
|
|
37
37
|
x,
|
|
38
38
|
{
|
|
39
39
|
label: e.name,
|
|
@@ -53,8 +53,8 @@ function G({
|
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
if (["integer", "double", "long", "byte"].includes(e.type))
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ r(f, { display: "flex", alignItems: "center", mb: 2, children: [
|
|
57
|
+
/* @__PURE__ */ a(
|
|
58
58
|
x,
|
|
59
59
|
{
|
|
60
60
|
label: `${e.name} (Min)`,
|
|
@@ -71,8 +71,8 @@ function G({
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ a(p, { px: 1, children: "-" }),
|
|
75
|
+
/* @__PURE__ */ a(
|
|
76
76
|
x,
|
|
77
77
|
{
|
|
78
78
|
label: `${e.name} (Max)`,
|
|
@@ -91,9 +91,9 @@ function G({
|
|
|
91
91
|
)
|
|
92
92
|
] });
|
|
93
93
|
if (e.type === "date") {
|
|
94
|
-
const o = "DD/MM/YYYY",
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
94
|
+
const o = "DD/MM/YYYY", n = "YYYY-MM-DD", l = t.min && m(t.min, n, !0).isValid() ? m(t.min, n) : null, i = t.max && m(t.max, n, !0).isValid() ? m(t.max, n) : null;
|
|
95
|
+
return /* @__PURE__ */ r(f, { mb: 2, display: "flex", alignItems: "end", children: [
|
|
96
|
+
/* @__PURE__ */ a(
|
|
97
97
|
I,
|
|
98
98
|
{
|
|
99
99
|
label: `${e.name} (Min)`,
|
|
@@ -113,8 +113,8 @@ function G({
|
|
|
113
113
|
onChange: b("min")
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ a(p, { px: 1, children: "-" }),
|
|
117
|
+
/* @__PURE__ */ a(
|
|
118
118
|
I,
|
|
119
119
|
{
|
|
120
120
|
label: `${e.name} (Max)`,
|
|
@@ -138,18 +138,18 @@ function G({
|
|
|
138
138
|
] });
|
|
139
139
|
}
|
|
140
140
|
if (e.type === "boolean")
|
|
141
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ a(f, { mb: 2, children: /* @__PURE__ */ a(
|
|
142
142
|
C,
|
|
143
143
|
{
|
|
144
144
|
label: e.name,
|
|
145
|
-
control: /* @__PURE__ */
|
|
145
|
+
control: /* @__PURE__ */ a(
|
|
146
146
|
V,
|
|
147
147
|
{
|
|
148
148
|
size: d,
|
|
149
149
|
name: e.propertyId,
|
|
150
150
|
checked: !!t,
|
|
151
|
-
icon: /* @__PURE__ */
|
|
152
|
-
checkedIcon: /* @__PURE__ */
|
|
151
|
+
icon: /* @__PURE__ */ a(F, {}),
|
|
152
|
+
checkedIcon: /* @__PURE__ */ a(S, {}),
|
|
153
153
|
onChange: u("exact")
|
|
154
154
|
}
|
|
155
155
|
),
|
|
@@ -161,19 +161,19 @@ function G({
|
|
|
161
161
|
}
|
|
162
162
|
) });
|
|
163
163
|
if (e.type === "enum") {
|
|
164
|
-
const [o,
|
|
164
|
+
const [o, n] = w(!1), l = 10;
|
|
165
165
|
let i = [];
|
|
166
|
-
return (g = e.dataTypeInfo) != null && g.enumValues && (i = e.dataTypeInfo.enumValues), /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
166
|
+
return (g = e.dataTypeInfo) != null && g.enumValues && (i = e.dataTypeInfo.enumValues), /* @__PURE__ */ r(f, { mb: 2, children: [
|
|
167
|
+
/* @__PURE__ */ r(T, { fullWidth: !0, component: "fieldset", variant: "standard", children: [
|
|
168
|
+
/* @__PURE__ */ a(D, { component: "legend", sx: { mb: 1 }, children: e.name }),
|
|
169
|
+
/* @__PURE__ */ a(L, { children: i.slice(0, o ? 9999 : l).map((s, c) => /* @__PURE__ */ a(
|
|
170
170
|
C,
|
|
171
171
|
{
|
|
172
172
|
label: s,
|
|
173
|
-
control: /* @__PURE__ */
|
|
173
|
+
control: /* @__PURE__ */ a(
|
|
174
174
|
V,
|
|
175
175
|
{
|
|
176
|
-
name: e.
|
|
176
|
+
name: e.propertyId,
|
|
177
177
|
value: s,
|
|
178
178
|
size: "small",
|
|
179
179
|
checked: t.list ? t.list.includes(s) : !1,
|
|
@@ -186,16 +186,16 @@ function G({
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
|
-
|
|
189
|
+
c
|
|
190
190
|
)) })
|
|
191
191
|
] }),
|
|
192
|
-
i.length > l && /* @__PURE__ */
|
|
193
|
-
|
|
192
|
+
i.length > l && /* @__PURE__ */ r(
|
|
193
|
+
B,
|
|
194
194
|
{
|
|
195
195
|
size: "small",
|
|
196
196
|
sx: { p: 0, textTransform: "none" },
|
|
197
|
-
endIcon: o ? /* @__PURE__ */
|
|
198
|
-
onClick: () =>
|
|
197
|
+
endIcon: o ? /* @__PURE__ */ a(Y, {}) : /* @__PURE__ */ a(y, {}),
|
|
198
|
+
onClick: () => n((s) => !s),
|
|
199
199
|
children: [
|
|
200
200
|
"Show ",
|
|
201
201
|
o ? "Less" : "More"
|
|
@@ -204,8 +204,8 @@ function G({
|
|
|
204
204
|
)
|
|
205
205
|
] });
|
|
206
206
|
}
|
|
207
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ a(k, {});
|
|
208
208
|
}
|
|
209
209
|
export {
|
|
210
|
-
|
|
210
|
+
R as default
|
|
211
211
|
};
|
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { jsxs as p, Fragment as
|
|
1
|
+
import { jsxs as p, Fragment as _, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import { TreeViewFilter as
|
|
3
|
+
import { TreeViewFilter as b } from "../treeview-filter/index.js";
|
|
4
4
|
import r from "lodash";
|
|
5
|
-
import { flattenNestedTemplates as
|
|
6
|
-
import { F as
|
|
7
|
-
import { S as
|
|
8
|
-
import { M as
|
|
9
|
-
import { D as
|
|
10
|
-
const
|
|
5
|
+
import { flattenNestedTemplates as A } from "../../utils/ontology.js";
|
|
6
|
+
import { F as E, I as M } from "../../FormControl-BMRUQKHh.js";
|
|
7
|
+
import { S as j } from "../../Select-NDq3WyLt.js";
|
|
8
|
+
import { M as B } from "../../MenuItem-DstAFfik.js";
|
|
9
|
+
import { D as k, a as w, b as L, B as N } from "../../DialogContent-BCYm_d1s.js";
|
|
10
|
+
const Q = ({
|
|
11
11
|
data: h,
|
|
12
12
|
label: s,
|
|
13
|
-
selected:
|
|
14
|
-
disabled:
|
|
15
|
-
idKey:
|
|
16
|
-
|
|
13
|
+
selected: o,
|
|
14
|
+
disabled: C,
|
|
15
|
+
idKey: l = "id",
|
|
16
|
+
variant: u = "outlined",
|
|
17
|
+
onChange: S
|
|
17
18
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
(e) => i.find((t) => String(r.get(t,
|
|
20
|
-
) : [], [
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
m(!0),
|
|
24
|
-
},
|
|
19
|
+
const [D, m] = f.useState(!1), [I, g] = f.useState([]), i = A(h), a = f.useMemo(() => r.isArray(o) ? o.map(
|
|
20
|
+
(e) => i.find((t) => String(r.get(t, l)) === e)
|
|
21
|
+
) : [], [o, i]), v = (e, t) => {
|
|
22
|
+
S(e, t);
|
|
23
|
+
}, T = () => {
|
|
24
|
+
m(!0), O();
|
|
25
|
+
}, x = () => {
|
|
25
26
|
m(!1);
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
27
|
+
}, F = (e, t) => {
|
|
28
|
+
g(t);
|
|
29
|
+
}, O = () => {
|
|
29
30
|
let e = [];
|
|
30
|
-
|
|
31
|
-
const d = t == null ? void 0 : t.parentKeys,
|
|
32
|
-
e.push(...
|
|
33
|
-
}),
|
|
31
|
+
a.length > 0 && a.forEach((t) => {
|
|
32
|
+
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)));
|
|
33
|
+
e.push(...W);
|
|
34
|
+
}), g(e);
|
|
34
35
|
};
|
|
35
|
-
return /* @__PURE__ */ p(
|
|
36
|
-
/* @__PURE__ */ p(
|
|
37
|
-
s !== void 0 && /* @__PURE__ */ n(
|
|
36
|
+
return /* @__PURE__ */ p(_, { children: [
|
|
37
|
+
/* @__PURE__ */ p(E, { variant: u, fullWidth: !0, children: [
|
|
38
|
+
s !== void 0 && /* @__PURE__ */ n(M, { id: "select-label", children: s }),
|
|
38
39
|
/* @__PURE__ */ n(
|
|
39
|
-
|
|
40
|
+
j,
|
|
40
41
|
{
|
|
41
42
|
label: s,
|
|
42
|
-
variant:
|
|
43
|
+
variant: u,
|
|
43
44
|
id: "select",
|
|
44
45
|
labelId: "select-label",
|
|
45
|
-
value:
|
|
46
|
+
value: o,
|
|
46
47
|
open: !1,
|
|
47
|
-
onOpen:
|
|
48
|
-
children:
|
|
48
|
+
onOpen: T,
|
|
49
|
+
children: a.length > 0 && a.map((e, t) => /* @__PURE__ */ n(B, { value: r.get(e, l) ?? "", children: e == null ? void 0 : e.name }, t))
|
|
49
50
|
}
|
|
50
51
|
)
|
|
51
52
|
] }),
|
|
52
|
-
/* @__PURE__ */ p(
|
|
53
|
-
/* @__PURE__ */ n(
|
|
54
|
-
|
|
53
|
+
/* @__PURE__ */ p(k, { open: D, onClose: x, fullWidth: !0, maxWidth: "sm", children: [
|
|
54
|
+
/* @__PURE__ */ n(w, { sx: { p: 1, pt: 2 }, children: /* @__PURE__ */ n(
|
|
55
|
+
b,
|
|
55
56
|
{
|
|
56
57
|
data: h,
|
|
57
|
-
selected: r.isArray(
|
|
58
|
-
disabled:
|
|
59
|
-
expanded:
|
|
60
|
-
idKey:
|
|
61
|
-
onToggle:
|
|
62
|
-
onChange:
|
|
58
|
+
selected: r.isArray(o) ? o : void 0,
|
|
59
|
+
disabled: C,
|
|
60
|
+
expanded: I,
|
|
61
|
+
idKey: l,
|
|
62
|
+
onToggle: F,
|
|
63
|
+
onChange: v
|
|
63
64
|
}
|
|
64
65
|
) }),
|
|
65
|
-
/* @__PURE__ */ n(
|
|
66
|
+
/* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(N, { onClick: x, variant: "contained", fullWidth: !0, children: "OK" }) })
|
|
66
67
|
] })
|
|
67
68
|
] });
|
|
68
69
|
};
|
|
69
70
|
export {
|
|
70
|
-
|
|
71
|
+
Q as TreeSelect
|
|
71
72
|
};
|