quantum-component-library 1.4.45-qa.10 → 1.4.45-qa.12
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.cjs +1 -13
- package/dist/components.js +395 -396
- package/dist/{dnd-core-vendor-v1lqdeP1.cjs → dnd-core-vendor-2Ve0kqUN.cjs} +1 -1
- package/dist/{dnd-core-vendor-ISBP7hu7.js → dnd-core-vendor-CErAmYu_.js} +2 -2
- package/dist/emotion-react-vendor-CHdBBD18.cjs +1 -0
- package/dist/emotion-react-vendor-CSrsXjBq.js +81 -0
- package/dist/emotion-vendor-D6PQH2K8.cjs +1 -0
- package/dist/emotion-vendor-DNnoMT20.js +546 -0
- package/dist/{graphql-vendor-CB3hZGUf.js → graphql-vendor-BWnD0b-j.js} +1 -1
- package/dist/{graphql-vendor-Dz6LvBOT.cjs → graphql-vendor-CL0XsjHb.cjs} +1 -1
- package/dist/hoist-non-react-statics-vendor-C5vG1oEE.cjs +1 -0
- package/dist/hoist-non-react-statics-vendor-DJU3S3cV.js +68 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +2 -2
- package/dist/quantum-component-library.css +1 -1
- package/dist/react-dnd-vendor-BPzSDojS.cjs +2 -0
- package/dist/{react-dnd-vendor-344hHSU8.js → react-dnd-vendor-D4nn9Mqx.js} +3 -3
- package/dist/react-is-vendor-CosIbvzW.cjs +15 -0
- package/dist/react-is-vendor-DpFLFzFZ.js +174 -0
- package/dist/react-jsx-runtime-vendor-Dszzpdy0.cjs +22 -0
- package/dist/react-jsx-runtime-vendor-OVHDjVDe.js +284 -0
- package/dist/react-select-vendor-BPaBUHFp.cjs +4 -0
- package/dist/{react-select-vendor-C9Yj5nBL.js → react-select-vendor-C_DuqfB7.js} +7 -6
- package/dist/stylis-vendor-CdCMw5Aa.js +334 -0
- package/dist/stylis-vendor-DzcTLVj9.cjs +1 -0
- package/dist/tailwind-vendor-B4y94WzT.js +2740 -0
- package/dist/tailwind-vendor-C0M23-WD.cjs +1 -0
- package/dist/ufuzzy-vendor-7qHa_k39.cjs +1 -0
- package/dist/ufuzzy-vendor-Dl0ZI6Av.js +456 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +3 -3
- package/dist/vendor-BjLvygDR.cjs +1 -0
- package/dist/vendor-VALJ9W3p.js +526 -0
- package/package.json +3 -2
- package/dist/other-react-vendor-Bks_g6Ah.js +0 -598
- package/dist/other-react-vendor-CDYjxKA1.cjs +0 -36
- package/dist/react-dnd-vendor-Clvo2okR.cjs +0 -2
- package/dist/react-select-vendor-Di9DcmX5.cjs +0 -4
- package/dist/styled-components-vendor-Bvwhddj9.js +0 -1154
- package/dist/styled-components-vendor-D09ATioU.cjs +0 -60
- package/dist/vendor-BnSpIYqA.cjs +0 -1
- package/dist/vendor-BnU6I1mv.js +0 -4562
package/dist/components.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { j as e } from "./
|
|
2
|
-
import { Flex as le, InputGroup as
|
|
3
|
-
import { useMemo as D, useState as F, useCallback as O, useRef as
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
const Ys = ({
|
|
1
|
+
import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
|
|
2
|
+
import { Flex as le, InputGroup as _e, InputLeftElement as rs, Icon as We, Input as Ce, FormLabel as $e, Box as B, TableContainer as Qe, Table as qe, Thead as He, Tr as be, Th as ie, Tbody as Ye, Td as re, ButtonGroup as ce, Tooltip as Je, Button as $, RangeSlider as ls, RangeSliderMark as Ae, Text as M, RangeSliderTrack as as, RangeSliderFilledTrack as cs, RangeSliderThumb as Pe, Select as ze, NumberInput as Ue, NumberInputField as Ge, HStack as K, Tag as de, Checkbox as ds, useToast as Ke, VStack as V, FormControl as G, Alert as ve, AlertIcon as ye, Spinner as Xe, useDisclosure as hs, Modal as us, ModalOverlay as ms, ModalContent as ps, ModalHeader as gs, ModalCloseButton as xs, ModalBody as fs, ModalFooter as js, IconButton as bs, Textarea as Ie } from "@chakra-ui/react";
|
|
3
|
+
import { useMemo as D, useState as F, useCallback as O, useRef as vs, useEffect as Y, memo as Se } from "react";
|
|
4
|
+
import { u as ys } from "./ufuzzy-vendor-Dl0ZI6Av.js";
|
|
5
|
+
import { s as se, y as Cs } from "./react-select-vendor-C_DuqfB7.js";
|
|
6
|
+
import { F as Ss, a as ws } from "./react-icons-vendor-TETORdU9.js";
|
|
7
|
+
import { u as ee, a as oe, b as Ms } from "./graphql-vendor-BWnD0b-j.js";
|
|
8
|
+
import { g as W, T as je, S as E, A as pe, a as Te } from "./generated-GfcSQz21.js";
|
|
9
|
+
import { A as ae, G as Ze, a as As, C as De, b as Ve, c as Re, M as es, d as Le, e as Is, f as ss, S as Ts, g as Ns, U as Os, h as Rs, i as Ls, j as Fs, k as Ds, l as Es, m as ks } from "./graphql-DZp5ePcc.js";
|
|
10
|
+
import { D as _s, H as Ps, u as zs, a as Us } from "./react-dnd-vendor-D4nn9Mqx.js";
|
|
11
|
+
import { getSegmentNameWithPlane as ts, getJointNameWithPlane as ns, getJointAngleDirectionName as Gs, getSegmentAngleDirectionName as Bs, getNormativeJointRange as Ws } from "./services.js";
|
|
12
|
+
import { availablePlanes as Be, getAnalysisPartIdNoSide as ge } from "./types.js";
|
|
13
|
+
import { thresholdsToParameters as $s, parametersToThresholds as Ne, cn as Qs } from "./utils.js";
|
|
14
|
+
import { usePartOptionsForSensorLocations as qs } from "./hooks.js";
|
|
15
|
+
const Hs = ({
|
|
17
16
|
setSearch: t,
|
|
18
17
|
actions: s,
|
|
19
18
|
updateUseCases: o
|
|
20
19
|
}) => {
|
|
21
|
-
const
|
|
20
|
+
const h = D(
|
|
22
21
|
() => s?.flatMap((l) => l.useCases).filter((l, a, m) => m.findIndex((f) => f.id === l.id) === a).map((l) => ({
|
|
23
22
|
label: l.name,
|
|
24
23
|
value: l.id
|
|
@@ -26,10 +25,10 @@ const Ys = ({
|
|
|
26
25
|
[s]
|
|
27
26
|
);
|
|
28
27
|
return /* @__PURE__ */ e.jsxs(le, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
|
|
29
|
-
/* @__PURE__ */ e.jsxs(
|
|
30
|
-
/* @__PURE__ */ e.jsx(
|
|
28
|
+
/* @__PURE__ */ e.jsxs(_e, { size: "md", children: [
|
|
29
|
+
/* @__PURE__ */ e.jsx(rs, { children: /* @__PURE__ */ e.jsx(We, { as: Ss, color: "gray.300" }) }),
|
|
31
30
|
/* @__PURE__ */ e.jsx(
|
|
32
|
-
|
|
31
|
+
Ce,
|
|
33
32
|
{
|
|
34
33
|
placeholder: "Search by name...",
|
|
35
34
|
maxW: "30rem",
|
|
@@ -37,7 +36,7 @@ const Ys = ({
|
|
|
37
36
|
}
|
|
38
37
|
)
|
|
39
38
|
] }),
|
|
40
|
-
/* @__PURE__ */ e.jsx(
|
|
39
|
+
/* @__PURE__ */ e.jsx(_e, { size: "md", children: /* @__PURE__ */ e.jsx(
|
|
41
40
|
se,
|
|
42
41
|
{
|
|
43
42
|
size: "md",
|
|
@@ -50,17 +49,17 @@ const Ys = ({
|
|
|
50
49
|
menuPortalTarget: document.body,
|
|
51
50
|
placeholder: "Filter use case",
|
|
52
51
|
isMulti: !0,
|
|
53
|
-
options:
|
|
52
|
+
options: h,
|
|
54
53
|
onChange: (l) => o(l.map((a) => a.value))
|
|
55
54
|
}
|
|
56
55
|
) })
|
|
57
56
|
] });
|
|
58
57
|
}, te = ({
|
|
59
58
|
children: t
|
|
60
|
-
}) => /* @__PURE__ */ e.jsx($e, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }),
|
|
59
|
+
}) => /* @__PURE__ */ e.jsx($e, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }), Ys = ({ value: t, onChange: s }) => {
|
|
61
60
|
const o = F(
|
|
62
61
|
() => Math.random().toString(36).substring(2, 15)
|
|
63
|
-
)[0],
|
|
62
|
+
)[0], h = O(
|
|
64
63
|
(l, a) => {
|
|
65
64
|
s((m) => {
|
|
66
65
|
const f = [...m], [j] = f.splice(l, 1);
|
|
@@ -69,25 +68,25 @@ const Ys = ({
|
|
|
69
68
|
},
|
|
70
69
|
[s]
|
|
71
70
|
);
|
|
72
|
-
return /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(_s, { backend:
|
|
73
|
-
/* @__PURE__ */ e.jsx(He, { children: /* @__PURE__ */ e.jsxs(
|
|
71
|
+
return /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(_s, { backend: Ps, children: /* @__PURE__ */ e.jsx(Qe, { children: /* @__PURE__ */ e.jsxs(qe, { variant: "simple", size: "md", children: [
|
|
72
|
+
/* @__PURE__ */ e.jsx(He, { children: /* @__PURE__ */ e.jsxs(be, { children: [
|
|
74
73
|
/* @__PURE__ */ e.jsx(ie, { children: "Order" }),
|
|
75
74
|
/* @__PURE__ */ e.jsx(ie, { children: "Name" })
|
|
76
75
|
] }) }),
|
|
77
76
|
/* @__PURE__ */ e.jsx(Ye, { children: t.map((l, a) => /* @__PURE__ */ e.jsx(
|
|
78
|
-
|
|
77
|
+
Js,
|
|
79
78
|
{
|
|
80
79
|
listKey: o,
|
|
81
80
|
index: a,
|
|
82
81
|
id: l.id,
|
|
83
82
|
name: l.name,
|
|
84
|
-
move:
|
|
83
|
+
move: h
|
|
85
84
|
},
|
|
86
85
|
l.id
|
|
87
86
|
)) })
|
|
88
87
|
] }) }) }) });
|
|
89
|
-
},
|
|
90
|
-
const a =
|
|
88
|
+
}, Js = ({ listKey: t, index: s, id: o, name: h, move: l }) => {
|
|
89
|
+
const a = vs(null), [{ handlerId: m }, f] = zs({
|
|
91
90
|
accept: t,
|
|
92
91
|
collect: (x) => ({
|
|
93
92
|
handlerId: x.getHandlerId()?.toString() ?? ""
|
|
@@ -98,30 +97,30 @@ const Ys = ({
|
|
|
98
97
|
const d = x.index, r = s;
|
|
99
98
|
if (d === r)
|
|
100
99
|
return;
|
|
101
|
-
const S = a.current?.getBoundingClientRect(), b = (S.bottom - S.top) / 2,
|
|
102
|
-
d < r &&
|
|
100
|
+
const S = a.current?.getBoundingClientRect(), b = (S.bottom - S.top) / 2, u = A.getClientOffset().y - S.top;
|
|
101
|
+
d < r && u < b || d > r && u > b || (l(d, r), x.index = r);
|
|
103
102
|
}
|
|
104
|
-
}), [{ isDragging: j }, C] =
|
|
103
|
+
}), [{ isDragging: j }, C] = Us({
|
|
105
104
|
type: t,
|
|
106
105
|
item: () => ({ id: o, index: s }),
|
|
107
106
|
collect: (x) => ({
|
|
108
107
|
isDragging: x.isDragging()
|
|
109
108
|
})
|
|
110
|
-
}), I = j ? 0.6 : 1,
|
|
111
|
-
return C(f(a)), /* @__PURE__ */ e.jsxs(
|
|
109
|
+
}), I = j ? 0.6 : 1, g = j ? "grabbing" : "grab";
|
|
110
|
+
return C(f(a)), /* @__PURE__ */ e.jsxs(be, { ref: a, style: { opacity: I, cursor: g }, "data-handler-id": m, children: [
|
|
112
111
|
/* @__PURE__ */ e.jsx(re, { children: s + 1 }),
|
|
113
|
-
/* @__PURE__ */ e.jsx(re, { children:
|
|
112
|
+
/* @__PURE__ */ e.jsx(re, { children: h })
|
|
114
113
|
] });
|
|
115
114
|
}, Fe = ({
|
|
116
115
|
items: t,
|
|
117
116
|
onChange: s,
|
|
118
117
|
selectedItem: o,
|
|
119
|
-
isDisabled:
|
|
118
|
+
isDisabled: h,
|
|
120
119
|
selectedProps: l,
|
|
121
120
|
buttonProps: a
|
|
122
121
|
}) => {
|
|
123
122
|
const m = (j) => j === o || j.value === o, f = (j) => m(j) ? { ...a, ...l } : a;
|
|
124
|
-
return /* @__PURE__ */ e.jsx(ce, { isAttached: !0, isDisabled:
|
|
123
|
+
return /* @__PURE__ */ e.jsx(ce, { isAttached: !0, isDisabled: h, children: t.map((j, C) => /* @__PURE__ */ e.jsx(
|
|
125
124
|
Je,
|
|
126
125
|
{
|
|
127
126
|
label: j.tooltip,
|
|
@@ -142,11 +141,11 @@ const Ys = ({
|
|
|
142
141
|
},
|
|
143
142
|
C
|
|
144
143
|
)) });
|
|
145
|
-
}, xe = (t, s) => s < 0 ? -1 * Math.abs(t) : Math.abs(t),
|
|
144
|
+
}, xe = (t, s) => s < 0 ? -1 * Math.abs(t) : Math.abs(t), Ks = ({
|
|
146
145
|
isReversed: t,
|
|
147
146
|
min: s,
|
|
148
147
|
max: o,
|
|
149
|
-
value:
|
|
148
|
+
value: h,
|
|
150
149
|
onChange: l,
|
|
151
150
|
inputProps: a,
|
|
152
151
|
size: m,
|
|
@@ -154,13 +153,13 @@ const Ys = ({
|
|
|
154
153
|
formatValue: j,
|
|
155
154
|
valueLabel: C,
|
|
156
155
|
positiveNegativeLabels: I,
|
|
157
|
-
isDisabled:
|
|
156
|
+
isDisabled: g,
|
|
158
157
|
...x
|
|
159
158
|
}) => {
|
|
160
|
-
const [A, d] = F([void 0, void 0]), r = A[0], S = A[1], b = f && s < -5 && o > 5, v = Number(
|
|
159
|
+
const [A, d] = F([void 0, void 0]), r = A[0], S = A[1], b = f && s < -5 && o > 5, v = Number(h?.[0] ?? S ?? s) > 0 ? 1 : -1, u = Number(h?.[1] ?? S ?? o) < 0 ? -1 : 1, p = I?.[0] === I?.[1], w = h?.[0], _ = h?.[1];
|
|
161
160
|
Y(() => {
|
|
162
|
-
w !== void 0 &&
|
|
163
|
-
}, [w,
|
|
161
|
+
w !== void 0 && _ !== void 0 && d([w.toFixed(0), _.toFixed(0)]);
|
|
162
|
+
}, [w, _, d]);
|
|
164
163
|
const T = O(
|
|
165
164
|
([i, y]) => {
|
|
166
165
|
i < y && d([i.toFixed(0), y.toFixed(0)]);
|
|
@@ -173,21 +172,21 @@ const Ys = ({
|
|
|
173
172
|
[l]
|
|
174
173
|
), R = O(() => {
|
|
175
174
|
d(([i, y]) => {
|
|
176
|
-
const L = isNaN(Number(i)) ? s : Number(i),
|
|
175
|
+
const L = isNaN(Number(i)) ? s : Number(i), P = isNaN(Number(y)) ? o : Number(y), H = xe(Number(L), v), k = xe(Number(P), u), J = v < 0 ? Math.max(H, s) : Math.min(H, o), z = u < 0 ? Math.max(k, s) : Math.min(k, o);
|
|
177
176
|
return J > z ? (l([z, J]), [z.toFixed(0), J.toFixed(0)]) : (l([J, z]), [J.toFixed(0), z.toFixed(0)]);
|
|
178
177
|
});
|
|
179
|
-
}, [l, d, v,
|
|
178
|
+
}, [l, d, v, u, s, o]), Q = O(
|
|
180
179
|
(i) => {
|
|
181
180
|
const y = i === "" || isNaN(Number(i)) ? i : xe(Number(i), v);
|
|
182
|
-
d(([L,
|
|
181
|
+
d(([L, P]) => [y.toString(), P]);
|
|
183
182
|
},
|
|
184
183
|
[d, v]
|
|
185
184
|
), U = O(
|
|
186
185
|
(i) => {
|
|
187
|
-
const y = i === "" || isNaN(Number(i)) ? i : xe(Number(i),
|
|
188
|
-
d(([L,
|
|
186
|
+
const y = i === "" || isNaN(Number(i)) ? i : xe(Number(i), u);
|
|
187
|
+
d(([L, P]) => [L, y.toString()]);
|
|
189
188
|
},
|
|
190
|
-
[d,
|
|
189
|
+
[d, u]
|
|
191
190
|
), c = D(
|
|
192
191
|
() => m === "xs" ? "0.75rem" : void 0,
|
|
193
192
|
[m]
|
|
@@ -196,14 +195,14 @@ const Ys = ({
|
|
|
196
195
|
const L = Number(y.target.value);
|
|
197
196
|
if (!r || !S || ![-1, 1].includes(L))
|
|
198
197
|
return;
|
|
199
|
-
const
|
|
200
|
-
H >
|
|
198
|
+
const P = (J) => L < 0 ? -1 * Math.abs(J) : Math.abs(J), H = i ? P(Number(r)) : Number(r), k = i ? Number(S) : P(Number(S));
|
|
199
|
+
H > k ? l([k, H]) : l([H, k]);
|
|
201
200
|
},
|
|
202
201
|
[r, S, l]
|
|
203
202
|
);
|
|
204
203
|
return /* @__PURE__ */ e.jsxs(le, { direction: "column", ...x, children: [
|
|
205
204
|
/* @__PURE__ */ e.jsx(B, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
|
|
206
|
-
|
|
205
|
+
ls,
|
|
207
206
|
{
|
|
208
207
|
"aria-label": ["min", "max"],
|
|
209
208
|
isReversed: t,
|
|
@@ -214,7 +213,7 @@ const Ys = ({
|
|
|
214
213
|
step: 1,
|
|
215
214
|
onChange: T,
|
|
216
215
|
onChangeEnd: q,
|
|
217
|
-
isDisabled:
|
|
216
|
+
isDisabled: g,
|
|
218
217
|
children: [
|
|
219
218
|
/* @__PURE__ */ e.jsx(Ae, { value: s, top: "-1em", children: /* @__PURE__ */ e.jsx(
|
|
220
219
|
M,
|
|
@@ -237,11 +236,21 @@ const Ys = ({
|
|
|
237
236
|
) }),
|
|
238
237
|
b && /* @__PURE__ */ e.jsxs(Ae, { value: 0, top: "-1em", pos: "relative", children: [
|
|
239
238
|
/* @__PURE__ */ e.jsx(M, { fontSize: m, fontWeight: "semibold", children: j?.(0) ?? "0" }),
|
|
240
|
-
/* @__PURE__ */ e.jsx(
|
|
239
|
+
/* @__PURE__ */ e.jsx(
|
|
240
|
+
B,
|
|
241
|
+
{
|
|
242
|
+
position: "absolute",
|
|
243
|
+
width: "2px",
|
|
244
|
+
height: "1em",
|
|
245
|
+
top: "90%",
|
|
246
|
+
left: "20%",
|
|
247
|
+
backgroundColor: "var(--chakra-colors-gray-300)"
|
|
248
|
+
}
|
|
249
|
+
)
|
|
241
250
|
] }),
|
|
242
|
-
/* @__PURE__ */ e.jsx(
|
|
243
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
-
/* @__PURE__ */ e.jsx(
|
|
251
|
+
/* @__PURE__ */ e.jsx(as, { children: /* @__PURE__ */ e.jsx(cs, {}) }),
|
|
252
|
+
/* @__PURE__ */ e.jsx(Pe, { index: 0, w: c, h: c }),
|
|
253
|
+
/* @__PURE__ */ e.jsx(Pe, { index: 1, w: c, h: c })
|
|
245
254
|
]
|
|
246
255
|
}
|
|
247
256
|
) }),
|
|
@@ -288,7 +297,7 @@ const Ys = ({
|
|
|
288
297
|
fontWeight: "bold",
|
|
289
298
|
value: v,
|
|
290
299
|
onChange: (i) => n(!0, i),
|
|
291
|
-
isDisabled:
|
|
300
|
+
isDisabled: p || g,
|
|
292
301
|
children: [
|
|
293
302
|
/* @__PURE__ */ e.jsx("option", { value: -1, children: I[0] }),
|
|
294
303
|
/* @__PURE__ */ e.jsx("option", { value: 1, children: I[1] })
|
|
@@ -301,14 +310,14 @@ const Ys = ({
|
|
|
301
310
|
precision: 0,
|
|
302
311
|
size: m ?? "sm",
|
|
303
312
|
min: 0,
|
|
304
|
-
max: v < 0 ? Math.abs(s) :
|
|
313
|
+
max: v < 0 ? Math.abs(s) : _ ?? o,
|
|
305
314
|
value: r === "" ? "" : Math.abs(Number(r ?? s)),
|
|
306
315
|
onChange: Q,
|
|
307
316
|
onBlur: R,
|
|
308
317
|
borderWidth: 1,
|
|
309
318
|
borderRadius: 3,
|
|
310
319
|
borderColor: "#ccc",
|
|
311
|
-
isDisabled:
|
|
320
|
+
isDisabled: g,
|
|
312
321
|
...a,
|
|
313
322
|
children: /* @__PURE__ */ e.jsx(
|
|
314
323
|
Ge,
|
|
@@ -325,7 +334,7 @@ const Ys = ({
|
|
|
325
334
|
{
|
|
326
335
|
size: m ?? "sm",
|
|
327
336
|
min: 0,
|
|
328
|
-
max:
|
|
337
|
+
max: u < 0 ? Math.abs(w ?? s) : o,
|
|
329
338
|
precision: 0,
|
|
330
339
|
value: S === "" ? "" : Math.abs(Number(S ?? o)),
|
|
331
340
|
onChange: U,
|
|
@@ -333,7 +342,7 @@ const Ys = ({
|
|
|
333
342
|
borderWidth: 1,
|
|
334
343
|
borderRadius: 3,
|
|
335
344
|
borderColor: "#ccc",
|
|
336
|
-
isDisabled:
|
|
345
|
+
isDisabled: g,
|
|
337
346
|
...a,
|
|
338
347
|
children: /* @__PURE__ */ e.jsx(
|
|
339
348
|
Ge,
|
|
@@ -351,9 +360,9 @@ const Ys = ({
|
|
|
351
360
|
width: "auto",
|
|
352
361
|
size: m,
|
|
353
362
|
fontWeight: "bold",
|
|
354
|
-
value:
|
|
363
|
+
value: u,
|
|
355
364
|
onChange: (i) => n(!1, i),
|
|
356
|
-
isDisabled:
|
|
365
|
+
isDisabled: p || g,
|
|
357
366
|
children: [
|
|
358
367
|
/* @__PURE__ */ e.jsx("option", { value: -1, children: I[0] }),
|
|
359
368
|
/* @__PURE__ */ e.jsx("option", { value: 1, children: I[1] })
|
|
@@ -364,25 +373,18 @@ const Ys = ({
|
|
|
364
373
|
}
|
|
365
374
|
)
|
|
366
375
|
] });
|
|
367
|
-
}, Zs =
|
|
368
|
-
position: absolute;
|
|
369
|
-
width: 2px;
|
|
370
|
-
height: 1em;
|
|
371
|
-
top: 90%;
|
|
372
|
-
left: 20%;
|
|
373
|
-
background-color: var(--chakra-colors-gray-300);
|
|
374
|
-
`, Vs = ({ tags: t, containerProps: s, ...o }) => /* @__PURE__ */ e.jsx(K, { ...s, children: t.map((u, l) => /* @__PURE__ */ e.jsx(de, { ...o, children: u }, l)) }), et = new Cs({}), st = (t, s) => {
|
|
376
|
+
}, Xs = ({ tags: t, containerProps: s, ...o }) => /* @__PURE__ */ e.jsx(K, { ...s, children: t.map((h, l) => /* @__PURE__ */ e.jsx(de, { ...o, children: h }, l)) }), Zs = new ys({}), Vs = (t, s) => {
|
|
375
377
|
if (!s || !s.trim().length)
|
|
376
378
|
return t;
|
|
377
379
|
const o = t.map((l) => l.name ?? "");
|
|
378
|
-
return
|
|
379
|
-
},
|
|
380
|
-
(o) => o.useCases.some((
|
|
381
|
-
),
|
|
380
|
+
return Zs.filter(o, s)?.map((l) => t[l]) ?? [];
|
|
381
|
+
}, et = (t, s) => !s || s.length == 0 ? t : t.filter(
|
|
382
|
+
(o) => o.useCases.some((h) => s.includes(h.id))
|
|
383
|
+
), st = ({
|
|
382
384
|
actions: t,
|
|
383
385
|
totalActions: s,
|
|
384
386
|
onCreate: o,
|
|
385
|
-
onDelete:
|
|
387
|
+
onDelete: h,
|
|
386
388
|
onEdit: l,
|
|
387
389
|
onSelected: a,
|
|
388
390
|
onDuplicate: m,
|
|
@@ -390,28 +392,28 @@ const Ys = ({
|
|
|
390
392
|
disableDelete: j,
|
|
391
393
|
disableEdit: C,
|
|
392
394
|
disableCreate: I,
|
|
393
|
-
tableProps:
|
|
395
|
+
tableProps: g,
|
|
394
396
|
...x
|
|
395
397
|
}) => {
|
|
396
398
|
const [A, d] = F(""), [r, S] = F(), b = D(() => {
|
|
397
399
|
if (!t)
|
|
398
400
|
return;
|
|
399
|
-
const
|
|
400
|
-
return
|
|
401
|
+
const p = Vs(t, A);
|
|
402
|
+
return et(p, r).sort((_, T) => _.name.localeCompare(T.name));
|
|
401
403
|
}, [t, A, r]), v = O(() => {
|
|
402
|
-
if (!
|
|
404
|
+
if (!h)
|
|
403
405
|
return;
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
}, [t,
|
|
406
|
+
const p = t.filter((w) => w.selected).map((w) => w.id);
|
|
407
|
+
h(p);
|
|
408
|
+
}, [t, h]), u = O(() => {
|
|
407
409
|
if (!m)
|
|
408
410
|
return;
|
|
409
|
-
const
|
|
410
|
-
m(
|
|
411
|
+
const p = t.filter((w) => w.selected);
|
|
412
|
+
m(p.map((w) => w.id)), a && p.forEach((w) => a(w, !1));
|
|
411
413
|
}, [t, m, a]);
|
|
412
414
|
return /* @__PURE__ */ e.jsxs(B, { ...x, children: [
|
|
413
415
|
/* @__PURE__ */ e.jsxs(le, { alignContent: "space-between", gap: 4, children: [
|
|
414
|
-
(o ||
|
|
416
|
+
(o || h || m) && /* @__PURE__ */ e.jsxs(ce, { mb: "1rem", gap: 4, children: [
|
|
415
417
|
o && /* @__PURE__ */ e.jsx(
|
|
416
418
|
$,
|
|
417
419
|
{
|
|
@@ -422,11 +424,11 @@ const Ys = ({
|
|
|
422
424
|
children: "Create New Activity"
|
|
423
425
|
}
|
|
424
426
|
),
|
|
425
|
-
|
|
427
|
+
h && !f && /* @__PURE__ */ e.jsx(
|
|
426
428
|
$,
|
|
427
429
|
{
|
|
428
430
|
colorScheme: "gray",
|
|
429
|
-
isDisabled: t.length <= 0 || !
|
|
431
|
+
isDisabled: t.length <= 0 || !h || j,
|
|
430
432
|
onClick: v,
|
|
431
433
|
children: "Delete Selected"
|
|
432
434
|
}
|
|
@@ -436,13 +438,13 @@ const Ys = ({
|
|
|
436
438
|
{
|
|
437
439
|
colorScheme: "gray",
|
|
438
440
|
isDisabled: t.length <= 0,
|
|
439
|
-
onClick:
|
|
441
|
+
onClick: u,
|
|
440
442
|
children: "Duplicate Selected"
|
|
441
443
|
}
|
|
442
444
|
)
|
|
443
445
|
] }),
|
|
444
446
|
/* @__PURE__ */ e.jsx(
|
|
445
|
-
|
|
447
|
+
Hs,
|
|
446
448
|
{
|
|
447
449
|
setSearch: d,
|
|
448
450
|
actions: t,
|
|
@@ -450,8 +452,8 @@ const Ys = ({
|
|
|
450
452
|
}
|
|
451
453
|
)
|
|
452
454
|
] }),
|
|
453
|
-
/* @__PURE__ */ e.jsx(Qe, { mr: "2rem", overflowX: "hidden", ...
|
|
454
|
-
/* @__PURE__ */ e.jsx(He, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(
|
|
455
|
+
/* @__PURE__ */ e.jsx(Qe, { mr: "2rem", overflowX: "hidden", ...g, children: /* @__PURE__ */ e.jsxs(qe, { size: "md", variant: "simple", children: [
|
|
456
|
+
/* @__PURE__ */ e.jsx(He, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(be, { children: [
|
|
455
457
|
/* @__PURE__ */ e.jsxs(ie, { fontWeight: "normal", children: [
|
|
456
458
|
"(showing ",
|
|
457
459
|
b?.length ?? 0,
|
|
@@ -465,21 +467,23 @@ const Ys = ({
|
|
|
465
467
|
/* @__PURE__ */ e.jsx(ie, { children: "Use Case" }),
|
|
466
468
|
/* @__PURE__ */ e.jsx(ie, {})
|
|
467
469
|
] }) }),
|
|
468
|
-
/* @__PURE__ */ e.jsx(Ye, { children: b?.map((
|
|
469
|
-
|
|
470
|
+
/* @__PURE__ */ e.jsx(Ye, { children: b?.map((p) => /* @__PURE__ */ e.jsxs(
|
|
471
|
+
be,
|
|
470
472
|
{
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
473
|
+
title: f && p.selected ? "This activity is selected. Click it again to deselect." : void 0,
|
|
474
|
+
bg: f && p.selected ? "gray.200" : void 0,
|
|
475
|
+
_hover: {
|
|
476
|
+
bg: f && !p.selected ? "#f7f7f7" : void 0
|
|
477
|
+
},
|
|
478
|
+
cursor: f ? "pointer" : "default",
|
|
479
|
+
onClick: () => f ? a?.(p, !p.selected) : void 0,
|
|
476
480
|
children: [
|
|
477
481
|
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(le, { children: [
|
|
478
482
|
a && !f && /* @__PURE__ */ e.jsx(
|
|
479
|
-
|
|
483
|
+
ds,
|
|
480
484
|
{
|
|
481
|
-
isChecked:
|
|
482
|
-
onChange: (w) => a(
|
|
485
|
+
isChecked: p.selected,
|
|
486
|
+
onChange: (w) => a(p, w.target.checked)
|
|
483
487
|
}
|
|
484
488
|
),
|
|
485
489
|
l && /* @__PURE__ */ e.jsx(
|
|
@@ -490,67 +494,62 @@ const Ys = ({
|
|
|
490
494
|
size: "sm",
|
|
491
495
|
variant: "link",
|
|
492
496
|
colorScheme: "blue",
|
|
493
|
-
onClick: () => l(
|
|
497
|
+
onClick: () => l(p.id),
|
|
494
498
|
children: "edit"
|
|
495
499
|
}
|
|
496
500
|
)
|
|
497
501
|
] }) }),
|
|
498
|
-
/* @__PURE__ */ e.jsx(re, { whiteSpace: "break-spaces", children:
|
|
499
|
-
/* @__PURE__ */ e.jsx(re, { maxW: "20rem", children:
|
|
502
|
+
/* @__PURE__ */ e.jsx(re, { whiteSpace: "break-spaces", children: p.name }),
|
|
503
|
+
/* @__PURE__ */ e.jsx(re, { maxW: "20rem", children: p.sensorLocations.length }),
|
|
500
504
|
/* @__PURE__ */ e.jsx(re, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
|
|
501
|
-
|
|
505
|
+
Xs,
|
|
502
506
|
{
|
|
503
507
|
containerProps: { flexWrap: "wrap" },
|
|
504
|
-
tags:
|
|
508
|
+
tags: p.useCases?.map((w) => w.name) ?? []
|
|
505
509
|
}
|
|
506
510
|
) })
|
|
507
511
|
]
|
|
508
512
|
},
|
|
509
|
-
|
|
513
|
+
p.id
|
|
510
514
|
)) })
|
|
511
515
|
] }) })
|
|
512
516
|
] });
|
|
513
|
-
},
|
|
514
|
-
&:hover {
|
|
515
|
-
background-color: ${(t) => t.disableMultiSelect && !t.selected ? "#f7f7f7" : void 0};
|
|
516
|
-
}
|
|
517
|
-
cursor: ${(t) => t.disableMultiSelect ? "pointer" : "default"};
|
|
518
|
-
`, Rt = ({
|
|
517
|
+
}, It = ({
|
|
519
518
|
onSave: t,
|
|
520
519
|
onCancel: s,
|
|
521
520
|
onError: o,
|
|
522
|
-
hideButtons:
|
|
521
|
+
hideButtons: h = !1,
|
|
523
522
|
setButtonDisabled: l,
|
|
524
523
|
setButtonOnClick: a,
|
|
525
524
|
quantumOwned: m
|
|
526
525
|
}) => {
|
|
527
|
-
const f = Ke(), [j, C] = F(""), [I,
|
|
528
|
-
query:
|
|
526
|
+
const f = Ke(), [j, C] = F(""), [I, g] = F([]), [x, A] = F(!1), [d] = ee({
|
|
527
|
+
query: Ze
|
|
529
528
|
}), [r] = ee({
|
|
530
|
-
query:
|
|
529
|
+
query: As,
|
|
531
530
|
variables: { groupId: j },
|
|
532
531
|
pause: !j
|
|
533
532
|
// Only run when group is selected
|
|
534
533
|
}), [, S] = oe(De), b = D(() => d.data?.groups ? d.data.groups.map(
|
|
535
|
-
(c) => W(
|
|
534
|
+
(c) => W(Ve, c)
|
|
536
535
|
) : [], [d.data]), v = D(() => r.data ? r.data.actions.map(
|
|
537
536
|
(n) => W(ae, n)
|
|
538
|
-
) : [], [r.data]),
|
|
537
|
+
) : [], [r.data]), u = D(() => v.filter(
|
|
539
538
|
(c) => I.includes(c.id)
|
|
540
|
-
), [v, I]),
|
|
539
|
+
), [v, I]), p = O(
|
|
541
540
|
(c) => {
|
|
542
541
|
const n = c?.value || "";
|
|
543
|
-
C(n),
|
|
542
|
+
C(n), g([]);
|
|
544
543
|
},
|
|
545
544
|
[]
|
|
546
545
|
), w = O(
|
|
547
546
|
(c) => {
|
|
548
547
|
const n = c.map((i) => i.value);
|
|
549
|
-
|
|
548
|
+
g(n);
|
|
550
549
|
},
|
|
551
550
|
[]
|
|
552
|
-
),
|
|
553
|
-
if (A(!0), !
|
|
551
|
+
), _ = O(async () => {
|
|
552
|
+
if (A(!0), !u.length) {
|
|
554
553
|
const c = new Error("No activities selected for copying");
|
|
555
554
|
o?.(c), A(!1);
|
|
556
555
|
return;
|
|
@@ -558,7 +557,7 @@ const Ys = ({
|
|
|
558
557
|
try {
|
|
559
558
|
const c = [];
|
|
560
559
|
let n = 0;
|
|
561
|
-
for (const i of
|
|
560
|
+
for (const i of u)
|
|
562
561
|
try {
|
|
563
562
|
const y = {
|
|
564
563
|
...i,
|
|
@@ -570,8 +569,8 @@ const Ys = ({
|
|
|
570
569
|
laterality: i.laterality,
|
|
571
570
|
activityKind: i.activityKind,
|
|
572
571
|
sensorLocations: i.sensorLocations,
|
|
573
|
-
thresholds: i.thresholds.map((
|
|
574
|
-
...
|
|
572
|
+
thresholds: i.thresholds.map((P) => ({
|
|
573
|
+
...P,
|
|
575
574
|
id: void 0
|
|
576
575
|
})),
|
|
577
576
|
quantumOwned: m,
|
|
@@ -580,11 +579,11 @@ const Ys = ({
|
|
|
580
579
|
if (L.error)
|
|
581
580
|
throw new Error(L.error.message);
|
|
582
581
|
if (L.data?.createAction) {
|
|
583
|
-
const
|
|
582
|
+
const P = W(
|
|
584
583
|
ae,
|
|
585
584
|
L.data.createAction
|
|
586
585
|
);
|
|
587
|
-
c.push(
|
|
586
|
+
c.push(P);
|
|
588
587
|
}
|
|
589
588
|
} catch (y) {
|
|
590
589
|
console.error(
|
|
@@ -593,14 +592,14 @@ const Ys = ({
|
|
|
593
592
|
), n++;
|
|
594
593
|
}
|
|
595
594
|
if (c.length > 0) {
|
|
596
|
-
const i = c.length, y =
|
|
595
|
+
const i = c.length, y = u.length;
|
|
597
596
|
f({
|
|
598
597
|
title: n > 0 ? "Partial copy completed" : "Activities copied successfully",
|
|
599
598
|
description: n > 0 ? `${i} of ${y} activities copied successfully` : `${i} activit${i > 1 ? "ies" : "y"} copied successfully`,
|
|
600
599
|
status: n > 0 ? "warning" : "success",
|
|
601
600
|
duration: 3e3,
|
|
602
601
|
isClosable: !0
|
|
603
|
-
}), t?.(), C(""),
|
|
602
|
+
}), t?.(), C(""), g([]);
|
|
604
603
|
} else
|
|
605
604
|
throw new Error("Failed to copy any activities");
|
|
606
605
|
} catch (c) {
|
|
@@ -615,20 +614,20 @@ const Ys = ({
|
|
|
615
614
|
} finally {
|
|
616
615
|
A(!1);
|
|
617
616
|
}
|
|
618
|
-
}, [
|
|
619
|
-
C(""),
|
|
617
|
+
}, [u, S, f, t, o, m]), T = O(() => {
|
|
618
|
+
C(""), g([]), s?.();
|
|
620
619
|
}, [s]);
|
|
621
620
|
Y(() => {
|
|
622
621
|
l && l({
|
|
623
622
|
cancelButton: !1,
|
|
624
|
-
saveButton:
|
|
623
|
+
saveButton: u.length === 0 || x
|
|
625
624
|
});
|
|
626
|
-
}, [
|
|
625
|
+
}, [u.length, x, l]), Y(() => {
|
|
627
626
|
a && a({
|
|
628
627
|
cancelButton: T,
|
|
629
|
-
saveButton:
|
|
628
|
+
saveButton: _
|
|
630
629
|
});
|
|
631
|
-
}, [a, T,
|
|
630
|
+
}, [a, T, _]);
|
|
632
631
|
const q = D(() => b.map((c) => ({
|
|
633
632
|
value: c.id,
|
|
634
633
|
label: c.name
|
|
@@ -647,14 +646,14 @@ const Ys = ({
|
|
|
647
646
|
placeholder: "Choose a group...",
|
|
648
647
|
options: q,
|
|
649
648
|
value: q.find((c) => c.value === j) || null,
|
|
650
|
-
onChange:
|
|
649
|
+
onChange: p,
|
|
651
650
|
isLoading: Q,
|
|
652
651
|
isDisabled: Q,
|
|
653
652
|
isClearable: !0
|
|
654
653
|
}
|
|
655
654
|
),
|
|
656
|
-
d.error && /* @__PURE__ */ e.jsxs(
|
|
657
|
-
/* @__PURE__ */ e.jsx(
|
|
655
|
+
d.error && /* @__PURE__ */ e.jsxs(ve, { status: "error", mt: 2, children: [
|
|
656
|
+
/* @__PURE__ */ e.jsx(ye, {}),
|
|
658
657
|
/* @__PURE__ */ e.jsxs(M, { fontSize: "sm", children: [
|
|
659
658
|
"Failed to load groups: ",
|
|
660
659
|
d.error.message
|
|
@@ -691,18 +690,18 @@ const Ys = ({
|
|
|
691
690
|
),
|
|
692
691
|
R.length === 0 && /* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.500", mt: 2, children: "No activities found" })
|
|
693
692
|
] }),
|
|
694
|
-
r.error && /* @__PURE__ */ e.jsxs(
|
|
695
|
-
/* @__PURE__ */ e.jsx(
|
|
693
|
+
r.error && /* @__PURE__ */ e.jsxs(ve, { status: "error", mt: 2, children: [
|
|
694
|
+
/* @__PURE__ */ e.jsx(ye, {}),
|
|
696
695
|
/* @__PURE__ */ e.jsxs(M, { fontSize: "sm", children: [
|
|
697
696
|
"Failed to load activities: ",
|
|
698
697
|
r.error.message
|
|
699
698
|
] })
|
|
700
699
|
] })
|
|
701
700
|
] }),
|
|
702
|
-
|
|
703
|
-
/* @__PURE__ */ e.jsx(M, { fontWeight: "semibold", mb: 3, children:
|
|
701
|
+
u.length > 0 && /* @__PURE__ */ e.jsxs(B, { p: 4, bg: "gray.50", borderRadius: "md", children: [
|
|
702
|
+
/* @__PURE__ */ e.jsx(M, { fontWeight: "semibold", mb: 3, children: u.length === 1 ? "Activity to Copy:" : `${u.length} Activities to Copy:` }),
|
|
704
703
|
/* @__PURE__ */ e.jsxs(V, { align: "start", spacing: 3, children: [
|
|
705
|
-
|
|
704
|
+
u.map((c, n) => /* @__PURE__ */ e.jsxs(
|
|
706
705
|
B,
|
|
707
706
|
{
|
|
708
707
|
w: "100%",
|
|
@@ -765,7 +764,7 @@ const Ys = ({
|
|
|
765
764
|
},
|
|
766
765
|
c.id
|
|
767
766
|
)),
|
|
768
|
-
|
|
767
|
+
u.length > 1 && /* @__PURE__ */ e.jsx(
|
|
769
768
|
B,
|
|
770
769
|
{
|
|
771
770
|
w: "100%",
|
|
@@ -776,14 +775,14 @@ const Ys = ({
|
|
|
776
775
|
borderColor: "blue.200",
|
|
777
776
|
children: /* @__PURE__ */ e.jsxs(M, { fontSize: "sm", fontWeight: "medium", color: "blue.800", children: [
|
|
778
777
|
"Total: ",
|
|
779
|
-
|
|
778
|
+
u.length,
|
|
780
779
|
" activities will be copied"
|
|
781
780
|
] })
|
|
782
781
|
}
|
|
783
782
|
)
|
|
784
783
|
] })
|
|
785
784
|
] }),
|
|
786
|
-
!
|
|
785
|
+
!h && /* @__PURE__ */ e.jsxs(ce, { spacing: 4, justifyContent: "flex-end", children: [
|
|
787
786
|
/* @__PURE__ */ e.jsx(
|
|
788
787
|
$,
|
|
789
788
|
{
|
|
@@ -797,43 +796,43 @@ const Ys = ({
|
|
|
797
796
|
$,
|
|
798
797
|
{
|
|
799
798
|
colorScheme: "blue",
|
|
800
|
-
onClick:
|
|
801
|
-
isDisabled:
|
|
799
|
+
onClick: _,
|
|
800
|
+
isDisabled: u.length === 0 || x,
|
|
802
801
|
isLoading: x,
|
|
803
802
|
loadingText: "Copying...",
|
|
804
803
|
children: [
|
|
805
804
|
"Copy",
|
|
806
805
|
" ",
|
|
807
|
-
|
|
806
|
+
u.length === 1 ? "Activity" : `${u.length} Activities`
|
|
808
807
|
]
|
|
809
808
|
}
|
|
810
809
|
)
|
|
811
810
|
] })
|
|
812
811
|
] }) });
|
|
813
|
-
},
|
|
812
|
+
}, Tt = ({
|
|
814
813
|
onSave: t,
|
|
815
814
|
onCancel: s,
|
|
816
815
|
onError: o,
|
|
817
|
-
hideButtons:
|
|
816
|
+
hideButtons: h = !1,
|
|
818
817
|
setButtonDisabled: l,
|
|
819
818
|
setButtonOnClick: a,
|
|
820
819
|
quantumOwned: m
|
|
821
820
|
}) => {
|
|
822
|
-
const f = Ke(), [j, C] = F(""), [I,
|
|
823
|
-
query:
|
|
821
|
+
const f = Ke(), [j, C] = F(""), [I, g] = F([]), [x, A] = F(!1), [d] = ee({
|
|
822
|
+
query: Ze
|
|
824
823
|
}), [r] = ee({
|
|
825
|
-
query:
|
|
824
|
+
query: Is,
|
|
826
825
|
variables: { groupId: j },
|
|
827
826
|
pause: !j
|
|
828
827
|
// Only run when group is selected
|
|
829
|
-
}), [, S] = oe(
|
|
830
|
-
(n) => W(
|
|
831
|
-
) : [], [d.data]),
|
|
828
|
+
}), [, S] = oe(ss), [, b] = oe(De), v = D(() => d.data?.groups ? d.data.groups.map(
|
|
829
|
+
(n) => W(Ve, n)
|
|
830
|
+
) : [], [d.data]), u = D(() => r.data?.modules ? W(
|
|
832
831
|
Re,
|
|
833
832
|
r.data?.modules
|
|
834
833
|
).map((i) => {
|
|
835
834
|
const y = W(
|
|
836
|
-
|
|
835
|
+
es,
|
|
837
836
|
i.moduleActions
|
|
838
837
|
);
|
|
839
838
|
return {
|
|
@@ -847,22 +846,22 @@ const Ys = ({
|
|
|
847
846
|
i.categories
|
|
848
847
|
)
|
|
849
848
|
};
|
|
850
|
-
}) : [], [r.data]),
|
|
849
|
+
}) : [], [r.data]), p = D(() => u.filter(
|
|
851
850
|
(n) => I.includes(n.id)
|
|
852
|
-
), [
|
|
851
|
+
), [u, I]), w = O(
|
|
853
852
|
(n) => {
|
|
854
853
|
const i = n?.value || "";
|
|
855
|
-
C(i),
|
|
854
|
+
C(i), g([]);
|
|
856
855
|
},
|
|
857
856
|
[]
|
|
858
|
-
),
|
|
857
|
+
), _ = O(
|
|
859
858
|
(n) => {
|
|
860
859
|
const i = n.map((y) => y.value);
|
|
861
|
-
|
|
860
|
+
g(i);
|
|
862
861
|
},
|
|
863
862
|
[]
|
|
864
863
|
), T = O(async () => {
|
|
865
|
-
if (A(!0), !
|
|
864
|
+
if (A(!0), !p.length) {
|
|
866
865
|
A(!1);
|
|
867
866
|
const n = new Error("No modules selected for copying");
|
|
868
867
|
o?.(n);
|
|
@@ -871,16 +870,16 @@ const Ys = ({
|
|
|
871
870
|
try {
|
|
872
871
|
const n = [];
|
|
873
872
|
let i = 0;
|
|
874
|
-
for (const y of
|
|
873
|
+
for (const y of p)
|
|
875
874
|
try {
|
|
876
|
-
let L = y.moduleActions.map((
|
|
875
|
+
let L = y.moduleActions.map((k) => k.actionId);
|
|
877
876
|
if (m) {
|
|
878
|
-
const
|
|
877
|
+
const k = y.moduleActions.map((z) => z.action);
|
|
879
878
|
L = (await Promise.all(
|
|
880
|
-
|
|
879
|
+
k.map(async (z) => {
|
|
881
880
|
if (z.quantumOwned)
|
|
882
881
|
return Promise.resolve(z);
|
|
883
|
-
const
|
|
882
|
+
const he = {
|
|
884
883
|
...z,
|
|
885
884
|
quantumOwned: m,
|
|
886
885
|
thresholds: z.thresholds.map((X) => ({
|
|
@@ -889,7 +888,7 @@ const Ys = ({
|
|
|
889
888
|
})),
|
|
890
889
|
id: void 0
|
|
891
890
|
};
|
|
892
|
-
return await b({ fields:
|
|
891
|
+
return await b({ fields: he }).then(
|
|
893
892
|
(X) => X.error || !X.data?.createAction ? null : W(
|
|
894
893
|
ae,
|
|
895
894
|
X.data.createAction
|
|
@@ -898,35 +897,35 @@ const Ys = ({
|
|
|
898
897
|
})
|
|
899
898
|
)).filter((z) => !!z).map((z) => z.id);
|
|
900
899
|
}
|
|
901
|
-
const
|
|
900
|
+
const P = {
|
|
902
901
|
name: `${y.name} (Copy)`,
|
|
903
902
|
// Add "(Copy)" suffix to distinguish
|
|
904
903
|
description: y.description || void 0,
|
|
905
904
|
actions: L,
|
|
906
|
-
categories: y.categories.map((
|
|
905
|
+
categories: y.categories.map((k) => k.id),
|
|
907
906
|
quantumOwned: m
|
|
908
|
-
}, H = await S({ input:
|
|
907
|
+
}, H = await S({ input: P });
|
|
909
908
|
if (H.error)
|
|
910
909
|
throw new Error(H.error.message);
|
|
911
910
|
if (H.data?.createModule) {
|
|
912
|
-
const
|
|
911
|
+
const k = W(
|
|
913
912
|
Re,
|
|
914
913
|
H.data.createModule
|
|
915
914
|
);
|
|
916
|
-
n.push(
|
|
915
|
+
n.push(k);
|
|
917
916
|
}
|
|
918
917
|
} catch (L) {
|
|
919
918
|
console.error(`Failed to copy module "${y.name}":`, L), i++;
|
|
920
919
|
}
|
|
921
920
|
if (n.length > 0) {
|
|
922
|
-
const y = n.length, L =
|
|
921
|
+
const y = n.length, L = p.length;
|
|
923
922
|
f({
|
|
924
923
|
title: i > 0 ? "Partial copy completed" : "Modules copied successfully",
|
|
925
924
|
description: i > 0 ? `${y} of ${L} modules copied successfully` : `${y} module${y > 1 ? "s" : ""} copied successfully`,
|
|
926
925
|
status: i > 0 ? "warning" : "success",
|
|
927
926
|
duration: 3e3,
|
|
928
927
|
isClosable: !0
|
|
929
|
-
}), n.length > 0 && t?.(), C(""),
|
|
928
|
+
}), n.length > 0 && t?.(), C(""), g([]);
|
|
930
929
|
} else
|
|
931
930
|
throw new Error("Failed to copy any modules");
|
|
932
931
|
} catch (n) {
|
|
@@ -942,7 +941,7 @@ const Ys = ({
|
|
|
942
941
|
A(!1);
|
|
943
942
|
}
|
|
944
943
|
}, [
|
|
945
|
-
|
|
944
|
+
p,
|
|
946
945
|
S,
|
|
947
946
|
f,
|
|
948
947
|
t,
|
|
@@ -950,14 +949,14 @@ const Ys = ({
|
|
|
950
949
|
m,
|
|
951
950
|
b
|
|
952
951
|
]), q = O(() => {
|
|
953
|
-
C(""),
|
|
952
|
+
C(""), g([]), s?.();
|
|
954
953
|
}, [s]);
|
|
955
954
|
Y(() => {
|
|
956
955
|
l && l({
|
|
957
956
|
cancelButton: !1,
|
|
958
|
-
saveButton:
|
|
957
|
+
saveButton: p.length === 0 || x
|
|
959
958
|
});
|
|
960
|
-
}, [
|
|
959
|
+
}, [p.length, x, l]), Y(() => {
|
|
961
960
|
a && a({
|
|
962
961
|
cancelButton: q,
|
|
963
962
|
saveButton: T
|
|
@@ -966,12 +965,12 @@ const Ys = ({
|
|
|
966
965
|
const R = D(() => v.map((n) => ({
|
|
967
966
|
value: n.id,
|
|
968
967
|
label: n.name
|
|
969
|
-
})), [v]), Q = D(() =>
|
|
968
|
+
})), [v]), Q = D(() => u.map((n) => ({
|
|
970
969
|
value: n.id,
|
|
971
970
|
label: n.name,
|
|
972
971
|
// Add custom data to identify quantum-owned modules
|
|
973
972
|
isQuantumOwned: n.quantumOwned
|
|
974
|
-
})), [
|
|
973
|
+
})), [u]), U = d.fetching, c = r.fetching;
|
|
975
974
|
return /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsxs(V, { spacing: 6, align: "stretch", children: [
|
|
976
975
|
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
977
976
|
/* @__PURE__ */ e.jsx(te, { children: "Select Source Group" }),
|
|
@@ -987,8 +986,8 @@ const Ys = ({
|
|
|
987
986
|
isClearable: !0
|
|
988
987
|
}
|
|
989
988
|
),
|
|
990
|
-
d.error && /* @__PURE__ */ e.jsxs(
|
|
991
|
-
/* @__PURE__ */ e.jsx(
|
|
989
|
+
d.error && /* @__PURE__ */ e.jsxs(ve, { status: "error", mt: 2, children: [
|
|
990
|
+
/* @__PURE__ */ e.jsx(ye, {}),
|
|
992
991
|
/* @__PURE__ */ e.jsxs(M, { fontSize: "sm", children: [
|
|
993
992
|
"Failed to load groups: ",
|
|
994
993
|
d.error.message
|
|
@@ -1009,7 +1008,7 @@ const Ys = ({
|
|
|
1009
1008
|
value: Q.filter(
|
|
1010
1009
|
(n) => I.includes(n.value)
|
|
1011
1010
|
),
|
|
1012
|
-
onChange:
|
|
1011
|
+
onChange: _,
|
|
1013
1012
|
isDisabled: Q.length === 0,
|
|
1014
1013
|
isClearable: !0,
|
|
1015
1014
|
isMulti: !0,
|
|
@@ -1025,18 +1024,18 @@ const Ys = ({
|
|
|
1025
1024
|
),
|
|
1026
1025
|
Q.length === 0 && /* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.500", mt: 2, children: "No modules found in this group" })
|
|
1027
1026
|
] }),
|
|
1028
|
-
r.error && /* @__PURE__ */ e.jsxs(
|
|
1029
|
-
/* @__PURE__ */ e.jsx(
|
|
1027
|
+
r.error && /* @__PURE__ */ e.jsxs(ve, { status: "error", mt: 2, children: [
|
|
1028
|
+
/* @__PURE__ */ e.jsx(ye, {}),
|
|
1030
1029
|
/* @__PURE__ */ e.jsxs(M, { fontSize: "sm", children: [
|
|
1031
1030
|
"Failed to load modules: ",
|
|
1032
1031
|
r.error.message
|
|
1033
1032
|
] })
|
|
1034
1033
|
] })
|
|
1035
1034
|
] }),
|
|
1036
|
-
|
|
1037
|
-
/* @__PURE__ */ e.jsx(M, { fontWeight: "semibold", mb: 3, children:
|
|
1035
|
+
p.length > 0 && /* @__PURE__ */ e.jsxs(B, { p: 4, bg: "gray.50", borderRadius: "md", children: [
|
|
1036
|
+
/* @__PURE__ */ e.jsx(M, { fontWeight: "semibold", mb: 3, children: p.length === 1 ? "Module to Copy:" : `${p.length} Modules to Copy:` }),
|
|
1038
1037
|
/* @__PURE__ */ e.jsxs(V, { align: "start", spacing: 3, children: [
|
|
1039
|
-
|
|
1038
|
+
p.map((n, i) => /* @__PURE__ */ e.jsxs(
|
|
1040
1039
|
B,
|
|
1041
1040
|
{
|
|
1042
1041
|
w: "100%",
|
|
@@ -1084,7 +1083,7 @@ const Ys = ({
|
|
|
1084
1083
|
},
|
|
1085
1084
|
n.id
|
|
1086
1085
|
)),
|
|
1087
|
-
|
|
1086
|
+
p.length > 1 && /* @__PURE__ */ e.jsx(
|
|
1088
1087
|
B,
|
|
1089
1088
|
{
|
|
1090
1089
|
w: "100%",
|
|
@@ -1095,12 +1094,12 @@ const Ys = ({
|
|
|
1095
1094
|
borderColor: "blue.200",
|
|
1096
1095
|
children: /* @__PURE__ */ e.jsxs(M, { fontSize: "sm", fontWeight: "medium", color: "blue.800", children: [
|
|
1097
1096
|
"Total: ",
|
|
1098
|
-
|
|
1097
|
+
p.length,
|
|
1099
1098
|
" modules will be copied"
|
|
1100
1099
|
] })
|
|
1101
1100
|
}
|
|
1102
1101
|
),
|
|
1103
|
-
m &&
|
|
1102
|
+
m && p.filter((n) => n.moduleActions.some((i) => !i.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
|
|
1104
1103
|
B,
|
|
1105
1104
|
{
|
|
1106
1105
|
p: 2,
|
|
@@ -1113,7 +1112,7 @@ const Ys = ({
|
|
|
1113
1112
|
)
|
|
1114
1113
|
] })
|
|
1115
1114
|
] }),
|
|
1116
|
-
!
|
|
1115
|
+
!h && /* @__PURE__ */ e.jsxs(ce, { spacing: 4, justifyContent: "flex-end", children: [
|
|
1117
1116
|
/* @__PURE__ */ e.jsx(
|
|
1118
1117
|
$,
|
|
1119
1118
|
{
|
|
@@ -1128,23 +1127,23 @@ const Ys = ({
|
|
|
1128
1127
|
{
|
|
1129
1128
|
colorScheme: "blue",
|
|
1130
1129
|
onClick: T,
|
|
1131
|
-
isDisabled:
|
|
1130
|
+
isDisabled: p.length === 0 || x,
|
|
1132
1131
|
isLoading: x,
|
|
1133
1132
|
loadingText: "Copying...",
|
|
1134
1133
|
children: [
|
|
1135
1134
|
"Copy",
|
|
1136
1135
|
" ",
|
|
1137
|
-
|
|
1136
|
+
p.length === 1 ? "Module" : `${p.length} Modules`
|
|
1138
1137
|
]
|
|
1139
1138
|
}
|
|
1140
1139
|
)
|
|
1141
1140
|
] })
|
|
1142
1141
|
] }) });
|
|
1143
|
-
},
|
|
1142
|
+
}, tt = ({
|
|
1144
1143
|
name: t,
|
|
1145
1144
|
setName: s,
|
|
1146
1145
|
actions: o,
|
|
1147
|
-
selectedActionIds:
|
|
1146
|
+
selectedActionIds: h,
|
|
1148
1147
|
setSelectedActionIds: l,
|
|
1149
1148
|
availableCategories: a,
|
|
1150
1149
|
selectedCategoryIds: m,
|
|
@@ -1153,17 +1152,17 @@ const Ys = ({
|
|
|
1153
1152
|
setDescription: C,
|
|
1154
1153
|
...I
|
|
1155
1154
|
}) => {
|
|
1156
|
-
const
|
|
1155
|
+
const g = hs(), x = D(() => o.map((v) => ({
|
|
1157
1156
|
...v,
|
|
1158
|
-
selected:
|
|
1159
|
-
})), [o,
|
|
1160
|
-
() =>
|
|
1161
|
-
[x,
|
|
1157
|
+
selected: h.includes(v.id)
|
|
1158
|
+
})), [o, h]), A = D(() => o.reduce((v, u) => (v[u.id] = u, v), {}), [o]), d = D(
|
|
1159
|
+
() => h.map((v) => A[v]),
|
|
1160
|
+
[x, h]
|
|
1162
1161
|
), r = O(
|
|
1163
|
-
(v,
|
|
1164
|
-
l(
|
|
1162
|
+
(v, u) => {
|
|
1163
|
+
l(u ? [...h, v.id] : h.filter((p) => p !== v.id));
|
|
1165
1164
|
},
|
|
1166
|
-
[
|
|
1165
|
+
[h, l]
|
|
1167
1166
|
), S = O(
|
|
1168
1167
|
(v) => {
|
|
1169
1168
|
s(v.target.value);
|
|
@@ -1177,9 +1176,9 @@ const Ys = ({
|
|
|
1177
1176
|
);
|
|
1178
1177
|
return /* @__PURE__ */ e.jsxs(B, { ...I, children: [
|
|
1179
1178
|
/* @__PURE__ */ e.jsxs(K, { gap: "2rem", children: [
|
|
1180
|
-
/* @__PURE__ */ e.jsx(
|
|
1179
|
+
/* @__PURE__ */ e.jsx(nt, { name: t ?? "", onInputChange: S }),
|
|
1181
1180
|
/* @__PURE__ */ e.jsx(
|
|
1182
|
-
|
|
1181
|
+
it,
|
|
1183
1182
|
{
|
|
1184
1183
|
availableCategories: a,
|
|
1185
1184
|
value: m,
|
|
@@ -1188,33 +1187,33 @@ const Ys = ({
|
|
|
1188
1187
|
)
|
|
1189
1188
|
] }),
|
|
1190
1189
|
/* @__PURE__ */ e.jsx(
|
|
1191
|
-
|
|
1190
|
+
ot,
|
|
1192
1191
|
{
|
|
1193
1192
|
description: j ?? "",
|
|
1194
1193
|
onInputChange: b
|
|
1195
1194
|
}
|
|
1196
1195
|
),
|
|
1197
1196
|
/* @__PURE__ */ e.jsx(
|
|
1198
|
-
|
|
1197
|
+
rt,
|
|
1199
1198
|
{
|
|
1200
1199
|
value: d,
|
|
1201
1200
|
onChange: l,
|
|
1202
|
-
onAdjustActivities: () =>
|
|
1201
|
+
onAdjustActivities: () => g.onOpen()
|
|
1203
1202
|
}
|
|
1204
1203
|
),
|
|
1205
1204
|
/* @__PURE__ */ e.jsxs(
|
|
1206
|
-
|
|
1205
|
+
us,
|
|
1207
1206
|
{
|
|
1208
|
-
isOpen:
|
|
1209
|
-
onClose:
|
|
1207
|
+
isOpen: g.isOpen,
|
|
1208
|
+
onClose: g.onClose,
|
|
1210
1209
|
size: "6xl",
|
|
1211
1210
|
children: [
|
|
1212
|
-
/* @__PURE__ */ e.jsx(
|
|
1211
|
+
/* @__PURE__ */ e.jsx(ms, {}),
|
|
1213
1212
|
/* @__PURE__ */ e.jsxs(ps, { children: [
|
|
1214
|
-
/* @__PURE__ */ e.jsx(
|
|
1215
|
-
/* @__PURE__ */ e.jsx(
|
|
1216
|
-
/* @__PURE__ */ e.jsx(
|
|
1217
|
-
|
|
1213
|
+
/* @__PURE__ */ e.jsx(gs, { children: "Select Activities" }),
|
|
1214
|
+
/* @__PURE__ */ e.jsx(xs, {}),
|
|
1215
|
+
/* @__PURE__ */ e.jsx(fs, { children: /* @__PURE__ */ e.jsx(
|
|
1216
|
+
st,
|
|
1218
1217
|
{
|
|
1219
1218
|
actions: x,
|
|
1220
1219
|
onSelected: r,
|
|
@@ -1226,12 +1225,12 @@ const Ys = ({
|
|
|
1226
1225
|
}
|
|
1227
1226
|
}
|
|
1228
1227
|
) }),
|
|
1229
|
-
/* @__PURE__ */ e.jsx(
|
|
1228
|
+
/* @__PURE__ */ e.jsx(js, { children: /* @__PURE__ */ e.jsx(
|
|
1230
1229
|
$,
|
|
1231
1230
|
{
|
|
1232
1231
|
colorScheme: "blue",
|
|
1233
|
-
onClick:
|
|
1234
|
-
isDisabled:
|
|
1232
|
+
onClick: g.onClose,
|
|
1233
|
+
isDisabled: h.length === 0,
|
|
1235
1234
|
children: "Done"
|
|
1236
1235
|
}
|
|
1237
1236
|
) })
|
|
@@ -1240,14 +1239,14 @@ const Ys = ({
|
|
|
1240
1239
|
}
|
|
1241
1240
|
)
|
|
1242
1241
|
] });
|
|
1243
|
-
},
|
|
1242
|
+
}, nt = Se(
|
|
1244
1243
|
({
|
|
1245
1244
|
name: t,
|
|
1246
1245
|
onInputChange: s
|
|
1247
1246
|
}) => /* @__PURE__ */ e.jsxs(G, { mb: 4, children: [
|
|
1248
1247
|
/* @__PURE__ */ e.jsx(te, { children: "Module Name" }),
|
|
1249
1248
|
/* @__PURE__ */ e.jsx(
|
|
1250
|
-
|
|
1249
|
+
Ce,
|
|
1251
1250
|
{
|
|
1252
1251
|
placeholder: "i.e. ACL RTP Test Battery",
|
|
1253
1252
|
value: t,
|
|
@@ -1256,22 +1255,22 @@ const Ys = ({
|
|
|
1256
1255
|
}
|
|
1257
1256
|
)
|
|
1258
1257
|
] })
|
|
1259
|
-
),
|
|
1258
|
+
), it = Se(
|
|
1260
1259
|
({
|
|
1261
1260
|
availableCategories: t,
|
|
1262
1261
|
value: s,
|
|
1263
1262
|
onChange: o
|
|
1264
1263
|
}) => {
|
|
1265
|
-
const
|
|
1264
|
+
const h = D(() => [
|
|
1266
1265
|
...t,
|
|
1267
1266
|
{
|
|
1268
1267
|
id: "other",
|
|
1269
1268
|
name: "Other"
|
|
1270
1269
|
}
|
|
1271
|
-
], [t]), l = D(() =>
|
|
1270
|
+
], [t]), l = D(() => h.map((a) => ({
|
|
1272
1271
|
value: a.id,
|
|
1273
1272
|
label: a.name
|
|
1274
|
-
})), [
|
|
1273
|
+
})), [h]);
|
|
1275
1274
|
return /* @__PURE__ */ e.jsxs(G, { mb: 4, children: [
|
|
1276
1275
|
/* @__PURE__ */ e.jsx(te, { children: "Module Category" }),
|
|
1277
1276
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1280,7 +1279,7 @@ const Ys = ({
|
|
|
1280
1279
|
isDisabled: t.length === 0,
|
|
1281
1280
|
isClearable: !0,
|
|
1282
1281
|
options: l,
|
|
1283
|
-
value:
|
|
1282
|
+
value: h.filter((a) => s.includes(a.id)).map((a) => ({
|
|
1284
1283
|
value: a.id,
|
|
1285
1284
|
label: a.name
|
|
1286
1285
|
})),
|
|
@@ -1290,7 +1289,7 @@ const Ys = ({
|
|
|
1290
1289
|
)
|
|
1291
1290
|
] });
|
|
1292
1291
|
}
|
|
1293
|
-
),
|
|
1292
|
+
), ot = Se(
|
|
1294
1293
|
({
|
|
1295
1294
|
description: t,
|
|
1296
1295
|
onInputChange: s
|
|
@@ -1300,7 +1299,7 @@ const Ys = ({
|
|
|
1300
1299
|
/* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.500", children: "Briefly describe the objective of this module. Max 40 words." })
|
|
1301
1300
|
] }) }),
|
|
1302
1301
|
/* @__PURE__ */ e.jsx(
|
|
1303
|
-
|
|
1302
|
+
Ce,
|
|
1304
1303
|
{
|
|
1305
1304
|
placeholder: "i.e. Assess readiness to return to play post-ACL reconstruction",
|
|
1306
1305
|
value: t,
|
|
@@ -1308,13 +1307,13 @@ const Ys = ({
|
|
|
1308
1307
|
}
|
|
1309
1308
|
)
|
|
1310
1309
|
] })
|
|
1311
|
-
),
|
|
1310
|
+
), rt = Se(
|
|
1312
1311
|
({
|
|
1313
1312
|
value: t,
|
|
1314
1313
|
onChange: s,
|
|
1315
1314
|
onAdjustActivities: o
|
|
1316
1315
|
}) => {
|
|
1317
|
-
const
|
|
1316
|
+
const h = D(
|
|
1318
1317
|
() => t.map((l) => ({
|
|
1319
1318
|
id: l.id,
|
|
1320
1319
|
name: l.name
|
|
@@ -1338,7 +1337,7 @@ const Ys = ({
|
|
|
1338
1337
|
}
|
|
1339
1338
|
)
|
|
1340
1339
|
] }),
|
|
1341
|
-
|
|
1340
|
+
h.length === 0 ? /* @__PURE__ */ e.jsx(V, { children: /* @__PURE__ */ e.jsxs(M, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
|
|
1342
1341
|
"No activities selected for this module.",
|
|
1343
1342
|
/* @__PURE__ */ e.jsx(
|
|
1344
1343
|
$,
|
|
@@ -1352,31 +1351,31 @@ const Ys = ({
|
|
|
1352
1351
|
}
|
|
1353
1352
|
)
|
|
1354
1353
|
] }) }) : /* @__PURE__ */ e.jsx(
|
|
1355
|
-
|
|
1354
|
+
Ys,
|
|
1356
1355
|
{
|
|
1357
|
-
value:
|
|
1356
|
+
value: h,
|
|
1358
1357
|
onChange: (l) => {
|
|
1359
|
-
const a = l(
|
|
1358
|
+
const a = l(h);
|
|
1360
1359
|
s(a.map((m) => m.id));
|
|
1361
1360
|
}
|
|
1362
1361
|
}
|
|
1363
1362
|
)
|
|
1364
1363
|
] });
|
|
1365
1364
|
}
|
|
1366
|
-
),
|
|
1365
|
+
), lt = ({
|
|
1367
1366
|
value: t,
|
|
1368
1367
|
onChange: s,
|
|
1369
1368
|
forceKind: o,
|
|
1370
|
-
disableRemove:
|
|
1369
|
+
disableRemove: h,
|
|
1371
1370
|
disableKind: l,
|
|
1372
1371
|
lockRanges: a,
|
|
1373
1372
|
...m
|
|
1374
1373
|
}) => {
|
|
1375
|
-
const f = D(() => [...t].sort((
|
|
1376
|
-
const A = Be.indexOf(
|
|
1374
|
+
const f = D(() => [...t].sort((g, x) => {
|
|
1375
|
+
const A = Be.indexOf(g.plane), d = Be.indexOf(x.plane);
|
|
1377
1376
|
return A - d;
|
|
1378
|
-
}), [t]), j = O((
|
|
1379
|
-
(
|
|
1377
|
+
}), [t]), j = O((g) => "segment" in g.id ? ts(g.id.segment, g.plane, !0) ?? "Unknown" : ns(g.id.joint, g.plane, !0) ?? "Unknown", []), C = O(
|
|
1378
|
+
(g, x) => {
|
|
1380
1379
|
const A = f.findIndex(
|
|
1381
1380
|
(r) => r.id === x.id && r.plane === x.plane
|
|
1382
1381
|
);
|
|
@@ -1389,46 +1388,46 @@ const Ys = ({
|
|
|
1389
1388
|
},
|
|
1390
1389
|
[s, f, o, a]
|
|
1391
1390
|
), I = O(
|
|
1392
|
-
(
|
|
1391
|
+
(g) => {
|
|
1393
1392
|
const x = f.filter(
|
|
1394
|
-
(A) => A.id !==
|
|
1393
|
+
(A) => A.id !== g.id || A.plane !== g.plane
|
|
1395
1394
|
);
|
|
1396
1395
|
s(x);
|
|
1397
1396
|
},
|
|
1398
1397
|
[s, f]
|
|
1399
1398
|
);
|
|
1400
|
-
return /* @__PURE__ */ e.jsx(V, { alignItems: "flex-start", overflowY: "auto", ...m, children: f.map((
|
|
1401
|
-
|
|
1399
|
+
return /* @__PURE__ */ e.jsx(V, { alignItems: "flex-start", overflowY: "auto", ...m, children: f.map((g, x) => /* @__PURE__ */ e.jsx(
|
|
1400
|
+
at,
|
|
1402
1401
|
{
|
|
1403
|
-
label: j(
|
|
1404
|
-
parameter:
|
|
1402
|
+
label: j(g),
|
|
1403
|
+
parameter: g,
|
|
1405
1404
|
onChange: (A) => C(x, A),
|
|
1406
|
-
onRemove:
|
|
1405
|
+
onRemove: h ? void 0 : () => I(g),
|
|
1407
1406
|
forceKind: o,
|
|
1408
1407
|
disableKind: l
|
|
1409
1408
|
},
|
|
1410
|
-
`${JSON.stringify(
|
|
1409
|
+
`${JSON.stringify(g.id)}-${g.plane}`
|
|
1411
1410
|
)) });
|
|
1412
|
-
},
|
|
1411
|
+
}, at = ({
|
|
1413
1412
|
label: t,
|
|
1414
1413
|
parameter: s,
|
|
1415
1414
|
onChange: o,
|
|
1416
|
-
onRemove:
|
|
1415
|
+
onRemove: h,
|
|
1417
1416
|
forceKind: l,
|
|
1418
1417
|
disableKind: a
|
|
1419
1418
|
}) => {
|
|
1420
1419
|
const m = O(
|
|
1421
|
-
(C) => "joint" in s.id ?
|
|
1420
|
+
(C) => "joint" in s.id ? Gs(
|
|
1422
1421
|
s.id.joint,
|
|
1423
1422
|
s.plane,
|
|
1424
1423
|
C < 0 ? -1 : 1
|
|
1425
|
-
) :
|
|
1424
|
+
) : Bs(
|
|
1426
1425
|
s.id.segment,
|
|
1427
1426
|
s.plane,
|
|
1428
1427
|
C < 0 ? -1 : 1
|
|
1429
1428
|
),
|
|
1430
1429
|
[s]
|
|
1431
|
-
), { min: f, max: j } = "joint" in s.id ?
|
|
1430
|
+
), { min: f, max: j } = "joint" in s.id ? Ws(s.id.joint, s.plane) : { min: -180, max: 180 };
|
|
1432
1431
|
return /* @__PURE__ */ e.jsxs(
|
|
1433
1432
|
V,
|
|
1434
1433
|
{
|
|
@@ -1451,14 +1450,14 @@ const Ys = ({
|
|
|
1451
1450
|
children: t
|
|
1452
1451
|
}
|
|
1453
1452
|
),
|
|
1454
|
-
|
|
1455
|
-
|
|
1453
|
+
h && /* @__PURE__ */ e.jsx(
|
|
1454
|
+
bs,
|
|
1456
1455
|
{
|
|
1457
1456
|
size: "xs",
|
|
1458
1457
|
variant: "ghost",
|
|
1459
1458
|
"aria-label": "delete",
|
|
1460
|
-
icon: /* @__PURE__ */ e.jsx(We, { as:
|
|
1461
|
-
onClick:
|
|
1459
|
+
icon: /* @__PURE__ */ e.jsx(We, { as: ws }),
|
|
1460
|
+
onClick: h
|
|
1462
1461
|
}
|
|
1463
1462
|
),
|
|
1464
1463
|
!l && /* @__PURE__ */ e.jsx(
|
|
@@ -1484,7 +1483,7 @@ const Ys = ({
|
|
|
1484
1483
|
)
|
|
1485
1484
|
] }),
|
|
1486
1485
|
/* @__PURE__ */ e.jsx(
|
|
1487
|
-
|
|
1486
|
+
Ks,
|
|
1488
1487
|
{
|
|
1489
1488
|
w: "100%",
|
|
1490
1489
|
size: "xs",
|
|
@@ -1501,11 +1500,11 @@ const Ys = ({
|
|
|
1501
1500
|
]
|
|
1502
1501
|
}
|
|
1503
1502
|
);
|
|
1504
|
-
}, fe = (t, s) => "segment" in t && "segment" in s && t.segment === s.segment || "joint" in t && "joint" in s && t.joint === s.joint,
|
|
1503
|
+
}, fe = (t, s) => "segment" in t && "segment" in s && t.segment === s.segment || "joint" in t && "joint" in s && t.joint === s.joint, ct = ({
|
|
1505
1504
|
options: t,
|
|
1506
1505
|
value: s,
|
|
1507
1506
|
onChange: o,
|
|
1508
|
-
forceKind:
|
|
1507
|
+
forceKind: h,
|
|
1509
1508
|
singleValue: l,
|
|
1510
1509
|
singleValueSideless: a,
|
|
1511
1510
|
editOnly: m,
|
|
@@ -1513,46 +1512,46 @@ const Ys = ({
|
|
|
1513
1512
|
maxParameters: j,
|
|
1514
1513
|
...C
|
|
1515
1514
|
}) => {
|
|
1516
|
-
const I = a ? 2 : j,
|
|
1515
|
+
const I = a ? 2 : j, g = D(
|
|
1517
1516
|
() => t.map((r) => ({
|
|
1518
|
-
label: "segment" in r.id ?
|
|
1517
|
+
label: "segment" in r.id ? ts(r.id.segment, r.plane, !0) ?? "Unknown" : ns(r.id.joint, r.plane, !0) ?? "Unknown",
|
|
1519
1518
|
value: r.id,
|
|
1520
1519
|
plane: r.plane
|
|
1521
1520
|
})),
|
|
1522
1521
|
[t]
|
|
1523
1522
|
), x = D(() => {
|
|
1524
1523
|
if (!a || s.length === 0)
|
|
1525
|
-
return
|
|
1524
|
+
return g;
|
|
1526
1525
|
const r = s[0];
|
|
1527
|
-
return
|
|
1528
|
-
(S) =>
|
|
1526
|
+
return g.filter(
|
|
1527
|
+
(S) => ge(S.value) === ge(r.id) && S.plane === r.plane
|
|
1529
1528
|
);
|
|
1530
|
-
}, [
|
|
1531
|
-
() =>
|
|
1529
|
+
}, [g, s, a]), A = D(
|
|
1530
|
+
() => g.filter(
|
|
1532
1531
|
(r) => s.some((S) => fe(S.id, r.value) && S.plane === r.plane)
|
|
1533
1532
|
),
|
|
1534
|
-
[
|
|
1533
|
+
[g, s]
|
|
1535
1534
|
), d = O(
|
|
1536
1535
|
(r) => {
|
|
1537
1536
|
const S = r.map((b) => {
|
|
1538
1537
|
const v = s.find(
|
|
1539
1538
|
(T) => fe(T.id, b.value) && T.plane === b.plane
|
|
1540
|
-
),
|
|
1539
|
+
), u = t.find(
|
|
1541
1540
|
(T) => fe(T.id, b.value) && T.plane === b.plane
|
|
1542
|
-
),
|
|
1543
|
-
(T) =>
|
|
1544
|
-
) : void 0, w =
|
|
1541
|
+
), p = a ? s.find(
|
|
1542
|
+
(T) => ge(T.id) === ge(b.value) && T.plane === b.plane
|
|
1543
|
+
) : void 0, w = p && !v ? p.min : u && u.min ? u.min : 0, _ = p && !v ? p.max : u && u.max ? u.max : 0;
|
|
1545
1544
|
return v ?? {
|
|
1546
1545
|
id: b.value,
|
|
1547
1546
|
plane: b.plane,
|
|
1548
1547
|
min: w,
|
|
1549
|
-
max:
|
|
1550
|
-
kind:
|
|
1548
|
+
max: _,
|
|
1549
|
+
kind: h ?? je.Limit
|
|
1551
1550
|
};
|
|
1552
1551
|
});
|
|
1553
1552
|
o(S);
|
|
1554
1553
|
},
|
|
1555
|
-
[o, s, t,
|
|
1554
|
+
[o, s, t, h, a]
|
|
1556
1555
|
);
|
|
1557
1556
|
return Y(() => {
|
|
1558
1557
|
const r = s.filter(
|
|
@@ -1573,109 +1572,109 @@ const Ys = ({
|
|
|
1573
1572
|
}
|
|
1574
1573
|
),
|
|
1575
1574
|
/* @__PURE__ */ e.jsx(
|
|
1576
|
-
|
|
1575
|
+
lt,
|
|
1577
1576
|
{
|
|
1578
1577
|
marginTop: 2,
|
|
1579
1578
|
maxH: "28rem",
|
|
1580
1579
|
value: s,
|
|
1581
1580
|
onChange: o,
|
|
1582
|
-
forceKind:
|
|
1581
|
+
forceKind: h,
|
|
1583
1582
|
disableKind: f,
|
|
1584
1583
|
lockRanges: a
|
|
1585
1584
|
}
|
|
1586
1585
|
)
|
|
1587
1586
|
] });
|
|
1588
|
-
},
|
|
1587
|
+
}, is = (t) => {
|
|
1589
1588
|
switch (t) {
|
|
1590
|
-
case
|
|
1589
|
+
case E.Thorax:
|
|
1591
1590
|
return "Thorax";
|
|
1592
|
-
case
|
|
1591
|
+
case E.CenterBack:
|
|
1593
1592
|
return "Center Back";
|
|
1594
|
-
case
|
|
1593
|
+
case E.Pelvis:
|
|
1595
1594
|
return "Pelvis";
|
|
1596
|
-
case
|
|
1595
|
+
case E.LeftThigh:
|
|
1597
1596
|
return "Left Thigh";
|
|
1598
|
-
case
|
|
1597
|
+
case E.RightThigh:
|
|
1599
1598
|
return "Right Thigh";
|
|
1600
|
-
case
|
|
1599
|
+
case E.LeftShank:
|
|
1601
1600
|
return "Left Shank";
|
|
1602
|
-
case
|
|
1601
|
+
case E.RightShank:
|
|
1603
1602
|
return "Right Shank";
|
|
1604
|
-
case
|
|
1603
|
+
case E.LeftFoot:
|
|
1605
1604
|
return "Left Foot";
|
|
1606
|
-
case
|
|
1605
|
+
case E.RightFoot:
|
|
1607
1606
|
return "Right Foot";
|
|
1608
|
-
case
|
|
1607
|
+
case E.LeftUpperArm:
|
|
1609
1608
|
return "Left Upper Arm";
|
|
1610
|
-
case
|
|
1609
|
+
case E.RightUpperArm:
|
|
1611
1610
|
return "Right Upper Arm";
|
|
1612
|
-
case
|
|
1611
|
+
case E.LeftForearm:
|
|
1613
1612
|
return "Left Forearm";
|
|
1614
|
-
case
|
|
1613
|
+
case E.RightForearm:
|
|
1615
1614
|
return "Right Forearm";
|
|
1616
|
-
case
|
|
1615
|
+
case E.Head:
|
|
1617
1616
|
return "Head";
|
|
1618
1617
|
}
|
|
1619
1618
|
return console.warn(`Unknown sensor location: ${t}`), "Unknown";
|
|
1620
|
-
},
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
],
|
|
1632
|
-
label:
|
|
1619
|
+
}, dt = 6, ht = [
|
|
1620
|
+
E.LeftFoot,
|
|
1621
|
+
E.LeftShank,
|
|
1622
|
+
E.LeftThigh,
|
|
1623
|
+
E.Pelvis,
|
|
1624
|
+
E.RightFoot,
|
|
1625
|
+
E.RightShank,
|
|
1626
|
+
E.RightThigh,
|
|
1627
|
+
E.Thorax,
|
|
1628
|
+
E.CenterBack,
|
|
1629
|
+
E.Head
|
|
1630
|
+
], ut = ht.map((t) => ({
|
|
1631
|
+
label: is(t),
|
|
1633
1632
|
value: t
|
|
1634
1633
|
})), Oe = (t) => t.map(
|
|
1635
1634
|
(s) => s.__isNew__ ? { name: s.label } : { id: s.value, name: s.label }
|
|
1636
|
-
),
|
|
1635
|
+
), Nt = ({
|
|
1637
1636
|
id: t,
|
|
1638
1637
|
onError: s,
|
|
1639
1638
|
onCancel: o,
|
|
1640
|
-
onSave:
|
|
1639
|
+
onSave: h,
|
|
1641
1640
|
hideButtons: l,
|
|
1642
1641
|
setButtonOnClick: a,
|
|
1643
1642
|
setButtonDisabled: m,
|
|
1644
1643
|
quantumOwned: f
|
|
1645
1644
|
}) => {
|
|
1646
|
-
const j =
|
|
1647
|
-
query:
|
|
1645
|
+
const j = Ms(), [{ fetching: C }, I] = oe(De), [{ fetching: g }, x] = oe(Os), [{ data: A }] = ee({
|
|
1646
|
+
query: Rs,
|
|
1648
1647
|
variables: { id: t ?? "" },
|
|
1649
1648
|
pause: !t
|
|
1650
1649
|
}), d = W(
|
|
1651
1650
|
ae,
|
|
1652
1651
|
A?.getActionById
|
|
1653
|
-
), r = C ||
|
|
1654
|
-
|
|
1652
|
+
), r = C || g, S = !!d && !!t, [b, v] = F(""), [u, p] = F(""), [w, _] = F(""), [T, q] = F(""), [R, Q] = F(
|
|
1653
|
+
pe.Either
|
|
1655
1654
|
), [U, c] = F(
|
|
1656
1655
|
Te.Action
|
|
1657
|
-
), [n, i] = F([]), [y, L] = F([]),
|
|
1656
|
+
), [n, i] = F([]), [y, L] = F([]), P = D(
|
|
1658
1657
|
() => n.map((N) => N.value),
|
|
1659
1658
|
[n]
|
|
1660
|
-
), H =
|
|
1659
|
+
), H = qs(P), [k, J] = F([]), [z, he] = F(!1), X = b.length && R;
|
|
1661
1660
|
Y(() => {
|
|
1662
|
-
d && (v(d.name), c(d.activityKind),
|
|
1661
|
+
d && (v(d.name), c(d.activityKind), p(d.description || ""), Q(d.laterality), L(
|
|
1663
1662
|
d.useCases.map((N) => ({
|
|
1664
1663
|
id: N.id,
|
|
1665
1664
|
value: N.id,
|
|
1666
1665
|
label: N.name,
|
|
1667
1666
|
__isNew__: !1
|
|
1668
1667
|
}))
|
|
1669
|
-
),
|
|
1668
|
+
), _(d.instructionsPointOfInterest || ""), q(d.instructionsMovementReport || ""), i(
|
|
1670
1669
|
d.sensorLocations.map((N) => ({
|
|
1671
|
-
label:
|
|
1670
|
+
label: is(N),
|
|
1672
1671
|
value: N
|
|
1673
1672
|
}))
|
|
1674
|
-
), J(
|
|
1673
|
+
), J($s(d.thresholds)));
|
|
1675
1674
|
}, [d]);
|
|
1676
|
-
const
|
|
1675
|
+
const os = O(
|
|
1677
1676
|
async (N) => (await j.query(
|
|
1678
|
-
f ?
|
|
1677
|
+
f ? Ts : Ns,
|
|
1679
1678
|
{
|
|
1680
1679
|
query: N,
|
|
1681
1680
|
limit: 10
|
|
@@ -1688,41 +1687,41 @@ const Ys = ({
|
|
|
1688
1687
|
value: ne.id
|
|
1689
1688
|
})),
|
|
1690
1689
|
[j, f]
|
|
1691
|
-
), [
|
|
1690
|
+
), [Ee, ke] = F({});
|
|
1692
1691
|
Y(() => {
|
|
1693
|
-
|
|
1692
|
+
ke({
|
|
1694
1693
|
name: b,
|
|
1695
1694
|
laterality: R,
|
|
1696
|
-
description:
|
|
1695
|
+
description: u,
|
|
1697
1696
|
instructionsPointOfInterest: w,
|
|
1698
1697
|
instructionsMovementReport: T,
|
|
1699
|
-
sensorLocations:
|
|
1700
|
-
thresholds: Ne(
|
|
1698
|
+
sensorLocations: P,
|
|
1699
|
+
thresholds: Ne(k),
|
|
1701
1700
|
useCases: Oe(y),
|
|
1702
1701
|
activityKind: U
|
|
1703
1702
|
});
|
|
1704
|
-
}, [
|
|
1703
|
+
}, [ke, d]);
|
|
1705
1704
|
const we = D(
|
|
1706
|
-
() => JSON.stringify(
|
|
1705
|
+
() => JSON.stringify(Ee) !== JSON.stringify({
|
|
1707
1706
|
name: b,
|
|
1708
1707
|
laterality: R,
|
|
1709
|
-
description:
|
|
1708
|
+
description: u,
|
|
1710
1709
|
instructionsPointOfInterest: w,
|
|
1711
1710
|
instructionsMovementReport: T,
|
|
1712
|
-
sensorLocations:
|
|
1713
|
-
thresholds: Ne(
|
|
1711
|
+
sensorLocations: P,
|
|
1712
|
+
thresholds: Ne(k),
|
|
1714
1713
|
useCases: Oe(y),
|
|
1715
1714
|
activityKind: U
|
|
1716
1715
|
}),
|
|
1717
1716
|
[
|
|
1718
|
-
|
|
1717
|
+
Ee,
|
|
1719
1718
|
b,
|
|
1720
1719
|
R,
|
|
1721
|
-
|
|
1722
|
-
|
|
1720
|
+
P,
|
|
1721
|
+
u,
|
|
1723
1722
|
T,
|
|
1724
1723
|
w,
|
|
1725
|
-
|
|
1724
|
+
k,
|
|
1726
1725
|
y,
|
|
1727
1726
|
U
|
|
1728
1727
|
]
|
|
@@ -1730,23 +1729,23 @@ const Ys = ({
|
|
|
1730
1729
|
const N = {
|
|
1731
1730
|
name: b,
|
|
1732
1731
|
laterality: R,
|
|
1733
|
-
description:
|
|
1732
|
+
description: u,
|
|
1734
1733
|
instructionsPointOfInterest: w,
|
|
1735
1734
|
instructionsMovementReport: T,
|
|
1736
|
-
sensorLocations:
|
|
1737
|
-
thresholds: Ne(
|
|
1735
|
+
sensorLocations: P,
|
|
1736
|
+
thresholds: Ne(k),
|
|
1738
1737
|
useCases: Oe(y),
|
|
1739
1738
|
activityKind: U,
|
|
1740
1739
|
quantumOwned: f
|
|
1741
1740
|
};
|
|
1742
|
-
let
|
|
1743
|
-
S && t ?
|
|
1741
|
+
let ue;
|
|
1742
|
+
S && t ? ue = x({
|
|
1744
1743
|
id: t,
|
|
1745
1744
|
fields: N
|
|
1746
|
-
}) :
|
|
1745
|
+
}) : ue = I({
|
|
1747
1746
|
fields: N
|
|
1748
|
-
}),
|
|
1749
|
-
ne ? s(ne) :
|
|
1747
|
+
}), ue.then(({ error: ne }) => {
|
|
1748
|
+
ne ? s(ne) : h();
|
|
1750
1749
|
});
|
|
1751
1750
|
}, [
|
|
1752
1751
|
f,
|
|
@@ -1755,13 +1754,13 @@ const Ys = ({
|
|
|
1755
1754
|
t,
|
|
1756
1755
|
b,
|
|
1757
1756
|
R,
|
|
1758
|
-
|
|
1759
|
-
u,
|
|
1757
|
+
P,
|
|
1760
1758
|
h,
|
|
1759
|
+
u,
|
|
1761
1760
|
T,
|
|
1762
1761
|
w,
|
|
1763
1762
|
S,
|
|
1764
|
-
|
|
1763
|
+
k,
|
|
1765
1764
|
y,
|
|
1766
1765
|
U,
|
|
1767
1766
|
s
|
|
@@ -1781,7 +1780,7 @@ const Ys = ({
|
|
|
1781
1780
|
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1782
1781
|
/* @__PURE__ */ e.jsx(Z, { children: "Name" }),
|
|
1783
1782
|
/* @__PURE__ */ e.jsx(
|
|
1784
|
-
|
|
1783
|
+
Ce,
|
|
1785
1784
|
{
|
|
1786
1785
|
value: b,
|
|
1787
1786
|
onChange: (N) => v(N.target.value),
|
|
@@ -1832,15 +1831,15 @@ const Ys = ({
|
|
|
1832
1831
|
},
|
|
1833
1832
|
items: [
|
|
1834
1833
|
{
|
|
1835
|
-
value:
|
|
1834
|
+
value: pe.Unilateral,
|
|
1836
1835
|
label: "unilateral"
|
|
1837
1836
|
},
|
|
1838
1837
|
{
|
|
1839
|
-
value:
|
|
1838
|
+
value: pe.Bilateral,
|
|
1840
1839
|
label: "bilateral"
|
|
1841
1840
|
},
|
|
1842
1841
|
{
|
|
1843
|
-
value:
|
|
1842
|
+
value: pe.Either,
|
|
1844
1843
|
label: "either / or"
|
|
1845
1844
|
}
|
|
1846
1845
|
]
|
|
@@ -1857,16 +1856,16 @@ const Ys = ({
|
|
|
1857
1856
|
label: "Type to search for existing use cases",
|
|
1858
1857
|
placement: "top-end",
|
|
1859
1858
|
children: /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(
|
|
1860
|
-
|
|
1859
|
+
Cs,
|
|
1861
1860
|
{
|
|
1862
1861
|
value: y,
|
|
1863
1862
|
onChange: (N) => L([...N]),
|
|
1864
1863
|
isMulti: !0,
|
|
1865
1864
|
cacheOptions: !0,
|
|
1866
1865
|
defaultOptions: !0,
|
|
1867
|
-
onFocus: () =>
|
|
1868
|
-
onBlur: () =>
|
|
1869
|
-
loadOptions:
|
|
1866
|
+
onFocus: () => he(!0),
|
|
1867
|
+
onBlur: () => he(!1),
|
|
1868
|
+
loadOptions: os,
|
|
1870
1869
|
placeholder: "(optional) Search for & select use cases…"
|
|
1871
1870
|
}
|
|
1872
1871
|
) })
|
|
@@ -1878,8 +1877,8 @@ const Ys = ({
|
|
|
1878
1877
|
/* @__PURE__ */ e.jsx(
|
|
1879
1878
|
Ie,
|
|
1880
1879
|
{
|
|
1881
|
-
value:
|
|
1882
|
-
onChange: (N) =>
|
|
1880
|
+
value: u,
|
|
1881
|
+
onChange: (N) => p(N.target.value),
|
|
1883
1882
|
rows: 2,
|
|
1884
1883
|
placeholder: "(optional) Describe how to perform the test or exercise"
|
|
1885
1884
|
}
|
|
@@ -1903,7 +1902,7 @@ const Ys = ({
|
|
|
1903
1902
|
Ie,
|
|
1904
1903
|
{
|
|
1905
1904
|
value: w,
|
|
1906
|
-
onChange: (N) =>
|
|
1905
|
+
onChange: (N) => _(N.target.value),
|
|
1907
1906
|
rows: 2,
|
|
1908
1907
|
placeholder: "(optional) Describe how to setup or generate the point of interest report"
|
|
1909
1908
|
}
|
|
@@ -1919,18 +1918,18 @@ const Ys = ({
|
|
|
1919
1918
|
isMulti: !0,
|
|
1920
1919
|
value: n,
|
|
1921
1920
|
onChange: (N) => i([...N]),
|
|
1922
|
-
options:
|
|
1923
|
-
isOptionDisabled: () => n.length >=
|
|
1921
|
+
options: ut,
|
|
1922
|
+
isOptionDisabled: () => n.length >= dt
|
|
1924
1923
|
}
|
|
1925
1924
|
)
|
|
1926
1925
|
] }),
|
|
1927
1926
|
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1928
1927
|
/* @__PURE__ */ e.jsx(Z, { children: "Default Parameters" }),
|
|
1929
1928
|
/* @__PURE__ */ e.jsx(
|
|
1930
|
-
|
|
1929
|
+
ct,
|
|
1931
1930
|
{
|
|
1932
1931
|
options: H,
|
|
1933
|
-
value:
|
|
1932
|
+
value: k,
|
|
1934
1933
|
onChange: J
|
|
1935
1934
|
}
|
|
1936
1935
|
)
|
|
@@ -1939,7 +1938,7 @@ const Ys = ({
|
|
|
1939
1938
|
/* @__PURE__ */ e.jsx(
|
|
1940
1939
|
"div",
|
|
1941
1940
|
{
|
|
1942
|
-
className:
|
|
1941
|
+
className: Qs("col-span-2 flex justify-end", l && "hidden"),
|
|
1943
1942
|
children: /* @__PURE__ */ e.jsxs(ce, { mt: 16, gap: 4, children: [
|
|
1944
1943
|
/* @__PURE__ */ e.jsx($, { colorScheme: "gray", isDisabled: r, onClick: o, children: "Cancel" }),
|
|
1945
1944
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1956,35 +1955,35 @@ const Ys = ({
|
|
|
1956
1955
|
}
|
|
1957
1956
|
)
|
|
1958
1957
|
] });
|
|
1959
|
-
}, Z = ({ children: t }) => /* @__PURE__ */ e.jsx($e, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }),
|
|
1958
|
+
}, Z = ({ children: t }) => /* @__PURE__ */ e.jsx($e, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }), Ot = ({
|
|
1960
1959
|
id: t,
|
|
1961
1960
|
onCancel: s,
|
|
1962
1961
|
onSave: o,
|
|
1963
|
-
onError:
|
|
1962
|
+
onError: h,
|
|
1964
1963
|
hideButtons: l,
|
|
1965
1964
|
quantumOwned: a,
|
|
1966
1965
|
setButtonOnClick: m,
|
|
1967
1966
|
setButtonDisabled: f
|
|
1968
1967
|
}) => {
|
|
1969
1968
|
const [{ data: j }] = ee({
|
|
1970
|
-
query: a ?
|
|
1969
|
+
query: a ? Ls : Fs
|
|
1971
1970
|
}), [{ data: C }] = ee({
|
|
1972
|
-
query:
|
|
1971
|
+
query: Ds,
|
|
1973
1972
|
variables: { id: t },
|
|
1974
1973
|
pause: !t
|
|
1975
1974
|
}), [{ data: I }] = ee({
|
|
1976
1975
|
query: Es
|
|
1977
|
-
}),
|
|
1976
|
+
}), g = W(
|
|
1978
1977
|
Le,
|
|
1979
1978
|
I?.moduleCategories
|
|
1980
|
-
), [{ fetching: x }, A] = oe(
|
|
1979
|
+
), [{ fetching: x }, A] = oe(ks), [{ fetching: d }, r] = oe(ss), S = W(
|
|
1981
1980
|
ae,
|
|
1982
1981
|
a ? j?.quantumOwnedActions : j?.actions
|
|
1983
|
-
) ?? [], b = W(Re, C?.module), v = W(
|
|
1982
|
+
) ?? [], b = W(Re, C?.module), v = W(es, b?.moduleActions) ?? [], [u, p] = F([
|
|
1984
1983
|
...v.map((c) => c.actionId) ?? []
|
|
1985
|
-
]), [w,
|
|
1984
|
+
]), [w, _] = F(b?.name ?? ""), [T, q] = F([]), [R, Q] = F(b?.description ?? "");
|
|
1986
1985
|
Y(() => {
|
|
1987
|
-
b && (
|
|
1986
|
+
b && (p(v.map((c) => c.actionId)), _(b.name), Q(b.description ?? ""), q(
|
|
1988
1987
|
b.categories.map(
|
|
1989
1988
|
(c) => W(Le, c).id
|
|
1990
1989
|
) ?? []
|
|
@@ -1993,7 +1992,7 @@ const Ys = ({
|
|
|
1993
1992
|
const U = O(() => {
|
|
1994
1993
|
let c;
|
|
1995
1994
|
const n = {
|
|
1996
|
-
actions:
|
|
1995
|
+
actions: u,
|
|
1997
1996
|
name: w,
|
|
1998
1997
|
categories: T.filter((i) => i !== "other"),
|
|
1999
1998
|
description: R,
|
|
@@ -2005,39 +2004,39 @@ const Ys = ({
|
|
|
2005
2004
|
}) : c = r({
|
|
2006
2005
|
input: n
|
|
2007
2006
|
}), c.then(({ error: i }) => {
|
|
2008
|
-
i ?
|
|
2007
|
+
i ? h(i) : o();
|
|
2009
2008
|
});
|
|
2010
2009
|
}, [
|
|
2011
2010
|
r,
|
|
2012
2011
|
A,
|
|
2013
|
-
|
|
2012
|
+
u,
|
|
2014
2013
|
w,
|
|
2015
2014
|
R,
|
|
2016
2015
|
T,
|
|
2017
2016
|
b,
|
|
2018
2017
|
o,
|
|
2019
|
-
|
|
2018
|
+
h
|
|
2020
2019
|
]);
|
|
2021
2020
|
return Y(() => {
|
|
2022
2021
|
f && f({
|
|
2023
2022
|
cancelButton: x || d,
|
|
2024
2023
|
saveButton: x || d || !w || R.trim().split(/\s+/).filter(Boolean).length > 40
|
|
2025
2024
|
});
|
|
2026
|
-
}, [f, x, d,
|
|
2025
|
+
}, [f, x, d, u, w, R]), Y(() => {
|
|
2027
2026
|
m && m({
|
|
2028
2027
|
cancelButton: s,
|
|
2029
2028
|
saveButton: U
|
|
2030
2029
|
});
|
|
2031
2030
|
}, [m, s, U]), /* @__PURE__ */ e.jsxs(B, { width: "100%", children: [
|
|
2032
2031
|
/* @__PURE__ */ e.jsx(
|
|
2033
|
-
|
|
2032
|
+
tt,
|
|
2034
2033
|
{
|
|
2035
2034
|
name: w,
|
|
2036
|
-
setName:
|
|
2035
|
+
setName: _,
|
|
2037
2036
|
actions: S,
|
|
2038
|
-
selectedActionIds:
|
|
2039
|
-
setSelectedActionIds:
|
|
2040
|
-
availableCategories:
|
|
2037
|
+
selectedActionIds: u,
|
|
2038
|
+
setSelectedActionIds: p,
|
|
2039
|
+
availableCategories: g ?? [],
|
|
2041
2040
|
selectedCategoryIds: T,
|
|
2042
2041
|
setSelectedCategoryIds: q,
|
|
2043
2042
|
description: R,
|
|
@@ -2068,12 +2067,12 @@ const Ys = ({
|
|
|
2068
2067
|
] });
|
|
2069
2068
|
};
|
|
2070
2069
|
export {
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2070
|
+
st as ActivityList,
|
|
2071
|
+
It as CopyActivityForm,
|
|
2072
|
+
Tt as CopyModuleForm,
|
|
2073
|
+
tt as ModuleForm,
|
|
2074
|
+
lt as ParameterEditList,
|
|
2075
|
+
ct as ParameterEditSelect,
|
|
2076
|
+
Nt as UpsertActivityForm,
|
|
2077
|
+
Ot as UpsertModuleForm
|
|
2079
2078
|
};
|