quantum-component-library 1.4.48-dev.2 → 1.4.48-dev.4
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 -1
- package/dist/components.js +1193 -1150
- package/dist/{dnd-core-vendor-CErAmYu_.js → dnd-core-vendor-P5FwdnRw.js} +2 -2
- package/dist/{dnd-core-vendor-2Ve0kqUN.cjs → dnd-core-vendor-qc3HexmT.cjs} +1 -1
- package/dist/{graphql-Dbkm2qZl.js → graphql-D_8ExpKx.js} +11 -11
- package/dist/graphql-vendor-Clpf4KGC.js +669 -0
- package/dist/graphql-vendor-Duv5PgOG.cjs +14 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +61 -51
- package/dist/index.cjs +1 -1
- package/dist/index.js +6 -6
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/use-ui-label-context.d.ts +1 -0
- package/dist/lib/providers/ui-label-provider/context.d.ts +2 -2
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +27 -33
- package/dist/{react-dnd-vendor-BPzSDojS.cjs → react-dnd-vendor-C9CZcQ3Z.cjs} +1 -1
- package/dist/{react-dnd-vendor-D4nn9Mqx.js → react-dnd-vendor-CklV8_LH.js} +2 -2
- package/dist/{react-select-vendor-BlY9Il4Q.js → react-select-vendor-CEyywmHR.js} +1 -1
- package/dist/{react-select-vendor-D_Q2fL5j.cjs → react-select-vendor-Dz7HnrhR.cjs} +1 -1
- package/dist/services.cjs +1 -1
- package/dist/services.js +73 -73
- package/dist/vendor-BruMPwbF.cjs +1 -0
- package/dist/vendor-DJTRwKAQ.js +421 -0
- package/package.json +2 -2
- package/dist/graphql-vendor-BWnD0b-j.js +0 -1285
- package/dist/graphql-vendor-CL0XsjHb.cjs +0 -19
- package/dist/vendor-BjLvygDR.cjs +0 -1
- package/dist/vendor-VALJ9W3p.js +0 -526
package/dist/components.js
CHANGED
|
@@ -1,245 +1,246 @@
|
|
|
1
1
|
import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
|
|
2
|
-
import { Flex as ge, InputGroup as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { u as
|
|
5
|
-
import { s as le } from "./react-select-vendor-
|
|
6
|
-
import { F as
|
|
7
|
-
import {
|
|
2
|
+
import { Flex as ge, InputGroup as ze, InputLeftElement as ht, Icon as Ye, Input as je, FormLabel as He, Box as Z, TableContainer as Je, Table as Xe, Thead as Ze, Tr as Me, Th as pe, Tbody as Ke, Td as xe, ButtonGroup as fe, Tooltip as Ee, Button as K, RangeSlider as mt, RangeSliderMark as Re, Text as C, RangeSliderTrack as pt, RangeSliderFilledTrack as gt, RangeSliderThumb as Ge, Select as Pe, NumberInput as We, NumberInputField as Ue, HStack as se, Tag as be, Checkbox as xt, Image as ft, useToast as Ve, VStack as ne, FormControl as X, RadioGroup as et, Radio as Te, Alert as Ie, AlertIcon as Oe, Spinner as tt, useDisclosure as jt, Modal as bt, ModalOverlay as vt, ModalContent as yt, ModalHeader as Ct, ModalCloseButton as wt, ModalBody as St, ModalFooter as Lt, IconButton as At, Textarea as Be } from "@chakra-ui/react";
|
|
3
|
+
import { useMemo as k, useState as z, useCallback as R, useRef as Mt, useEffect as re, memo as Ne } from "react";
|
|
4
|
+
import { u as Tt } from "./ufuzzy-vendor-Dl0ZI6Av.js";
|
|
5
|
+
import { s as le } from "./react-select-vendor-CEyywmHR.js";
|
|
6
|
+
import { F as It, a as Ot } from "./react-icons-vendor-TETORdU9.js";
|
|
7
|
+
import { useQuery as de, useMutation as ie, useClient as Nt } from "urql";
|
|
8
8
|
import { getFragmentData as $ } from "./generated.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { G as nt, a as kt, C as _e, b as st, M as ve, c as Fe, A as ue, d as $e, e as rt, f as Rt, g as ot, U as it, h as Le, i as at, j as Dt, k as Ft, l as $t, m as Et, n as _t, o as zt, p as Gt } from "./graphql-D_8ExpKx.js";
|
|
10
|
+
import "./moment-vendor-DMLRxgRE.js";
|
|
11
|
+
import { useUiLabelContext as ke, usePartOptionsForSensorLocations as Pt } from "./hooks.js";
|
|
12
|
+
import { D as Wt, H as Ut, u as Bt, a as Qt } from "./react-dnd-vendor-CklV8_LH.js";
|
|
13
|
+
import { ThresholdKind as Ae, SensorLocation as W, ActionLaterality as qt } from "./generated-graphql.js";
|
|
14
|
+
import { getSegmentNameWithPlane as lt, getJointNameWithPlane as ct, getJointAngleDirectionName as Yt, getSegmentAngleDirectionName as Ht, getNormativeJointRange as Jt } from "./services.js";
|
|
14
15
|
import { availablePlanes as Qe, getAnalysisPartIdNoSide as Ce } from "./types.js";
|
|
15
|
-
import { thresholdsToParameters as
|
|
16
|
-
import
|
|
16
|
+
import { thresholdsToParameters as Xt, parametersToThresholds as qe, cn as Zt } from "./utils.js";
|
|
17
|
+
import "./providers.js";
|
|
17
18
|
const Kt = ({
|
|
18
|
-
setSearch:
|
|
19
|
-
actions:
|
|
20
|
-
updateUseCases:
|
|
21
|
-
hideUseCaseFilter:
|
|
19
|
+
setSearch: s,
|
|
20
|
+
actions: n,
|
|
21
|
+
updateUseCases: o,
|
|
22
|
+
hideUseCaseFilter: c = !1
|
|
22
23
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
() =>
|
|
25
|
-
label:
|
|
26
|
-
value:
|
|
24
|
+
const d = k(
|
|
25
|
+
() => n?.flatMap((a) => a.useCases).filter((a, l, g) => g.findIndex((i) => i.id === a.id) === l).map((a) => ({
|
|
26
|
+
label: a.name,
|
|
27
|
+
value: a.id
|
|
27
28
|
})) || [],
|
|
28
|
-
[
|
|
29
|
+
[n]
|
|
29
30
|
);
|
|
30
31
|
return /* @__PURE__ */ e.jsxs(ge, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
|
|
31
|
-
/* @__PURE__ */ e.jsxs(
|
|
32
|
-
/* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsx(Ye, { as:
|
|
32
|
+
/* @__PURE__ */ e.jsxs(ze, { size: "md", flex: 1, children: [
|
|
33
|
+
/* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsx(Ye, { as: It, color: "gray.300" }) }),
|
|
33
34
|
/* @__PURE__ */ e.jsx(
|
|
34
35
|
je,
|
|
35
36
|
{
|
|
36
37
|
placeholder: "Search by name...",
|
|
37
38
|
width: "100%",
|
|
38
|
-
maxW:
|
|
39
|
-
onChange: (
|
|
39
|
+
maxW: c ? void 0 : "30rem",
|
|
40
|
+
onChange: (a) => s(a.target.value)
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
43
|
] }),
|
|
43
|
-
!
|
|
44
|
+
!c && /* @__PURE__ */ e.jsx(ze, { size: "md", children: /* @__PURE__ */ e.jsx(
|
|
44
45
|
le,
|
|
45
46
|
{
|
|
46
47
|
size: "md",
|
|
47
48
|
chakraStyles: {
|
|
48
|
-
container: (
|
|
49
|
-
...
|
|
49
|
+
container: (a) => ({
|
|
50
|
+
...a,
|
|
50
51
|
width: "100%"
|
|
51
52
|
})
|
|
52
53
|
},
|
|
53
54
|
menuPortalTarget: document.body,
|
|
54
55
|
placeholder: "Filter use case",
|
|
55
56
|
isMulti: !0,
|
|
56
|
-
options:
|
|
57
|
-
onChange: (
|
|
57
|
+
options: d,
|
|
58
|
+
onChange: (a) => o(a.map((l) => l.value))
|
|
58
59
|
}
|
|
59
60
|
) })
|
|
60
61
|
] });
|
|
61
62
|
}, ae = ({
|
|
62
|
-
children:
|
|
63
|
-
}) => /* @__PURE__ */ e.jsx(He, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children:
|
|
64
|
-
const
|
|
63
|
+
children: s
|
|
64
|
+
}) => /* @__PURE__ */ e.jsx(He, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: s }), Vt = ({ value: s, onChange: n }) => {
|
|
65
|
+
const o = z(
|
|
65
66
|
() => Math.random().toString(36).substring(2, 15)
|
|
66
|
-
)[0],
|
|
67
|
-
(
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
return
|
|
67
|
+
)[0], c = R(
|
|
68
|
+
(d, a) => {
|
|
69
|
+
n((l) => {
|
|
70
|
+
const g = [...l], [i] = g.splice(d, 1);
|
|
71
|
+
return g.splice(a, 0, i), g;
|
|
71
72
|
});
|
|
72
73
|
},
|
|
73
|
-
[
|
|
74
|
+
[n]
|
|
74
75
|
);
|
|
75
|
-
return /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx(
|
|
76
|
-
/* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs(
|
|
76
|
+
return /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsx(Wt, { backend: Ut, children: /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsxs(Xe, { variant: "simple", size: "md", children: [
|
|
77
|
+
/* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
77
78
|
/* @__PURE__ */ e.jsx(pe, { children: "Order" }),
|
|
78
79
|
/* @__PURE__ */ e.jsx(pe, { children: "Name" })
|
|
79
80
|
] }) }),
|
|
80
|
-
/* @__PURE__ */ e.jsx(Ke, { children:
|
|
81
|
+
/* @__PURE__ */ e.jsx(Ke, { children: s.map((d, a) => /* @__PURE__ */ e.jsx(
|
|
81
82
|
en,
|
|
82
83
|
{
|
|
83
|
-
listKey:
|
|
84
|
-
index:
|
|
85
|
-
id:
|
|
86
|
-
name:
|
|
87
|
-
move:
|
|
84
|
+
listKey: o,
|
|
85
|
+
index: a,
|
|
86
|
+
id: d.id,
|
|
87
|
+
name: d.name,
|
|
88
|
+
move: c
|
|
88
89
|
},
|
|
89
|
-
|
|
90
|
+
d.id
|
|
90
91
|
)) })
|
|
91
92
|
] }) }) }) });
|
|
92
|
-
}, en = ({ listKey:
|
|
93
|
-
const
|
|
94
|
-
accept:
|
|
95
|
-
collect: (
|
|
96
|
-
handlerId:
|
|
93
|
+
}, en = ({ listKey: s, index: n, id: o, name: c, move: d }) => {
|
|
94
|
+
const a = Mt(null), [{ handlerId: l }, g] = Bt({
|
|
95
|
+
accept: s,
|
|
96
|
+
collect: (m) => ({
|
|
97
|
+
handlerId: m.getHandlerId()?.toString() ?? ""
|
|
97
98
|
}),
|
|
98
|
-
hover: (
|
|
99
|
-
if (!
|
|
99
|
+
hover: (m, S) => {
|
|
100
|
+
if (!a.current)
|
|
100
101
|
return;
|
|
101
|
-
const
|
|
102
|
-
if (
|
|
102
|
+
const b = m.index, r = n;
|
|
103
|
+
if (b === r)
|
|
103
104
|
return;
|
|
104
|
-
const
|
|
105
|
-
|
|
105
|
+
const f = a.current?.getBoundingClientRect(), v = (f.bottom - f.top) / 2, L = S.getClientOffset().y - f.top;
|
|
106
|
+
b < r && L < v || b > r && L > v || (d(b, r), m.index = r);
|
|
106
107
|
}
|
|
107
|
-
}), [{ isDragging:
|
|
108
|
-
type:
|
|
109
|
-
item: () => ({ id:
|
|
110
|
-
collect: (
|
|
111
|
-
isDragging:
|
|
108
|
+
}), [{ isDragging: i }, x] = Qt({
|
|
109
|
+
type: s,
|
|
110
|
+
item: () => ({ id: o, index: n }),
|
|
111
|
+
collect: (m) => ({
|
|
112
|
+
isDragging: m.isDragging()
|
|
112
113
|
})
|
|
113
|
-
}),
|
|
114
|
-
return
|
|
115
|
-
/* @__PURE__ */ e.jsx(xe, { children:
|
|
116
|
-
/* @__PURE__ */ e.jsx(xe, { children:
|
|
114
|
+
}), h = i ? 0.6 : 1, M = i ? "grabbing" : "grab";
|
|
115
|
+
return x(g(a)), /* @__PURE__ */ e.jsxs(Me, { ref: a, style: { opacity: h, cursor: M }, "data-handler-id": l, children: [
|
|
116
|
+
/* @__PURE__ */ e.jsx(xe, { children: n + 1 }),
|
|
117
|
+
/* @__PURE__ */ e.jsx(xe, { children: c })
|
|
117
118
|
] });
|
|
118
119
|
}, tn = ({
|
|
119
|
-
items:
|
|
120
|
-
onChange:
|
|
121
|
-
selectedItem:
|
|
122
|
-
isDisabled:
|
|
123
|
-
selectedProps:
|
|
124
|
-
buttonProps:
|
|
120
|
+
items: s,
|
|
121
|
+
onChange: n,
|
|
122
|
+
selectedItem: o,
|
|
123
|
+
isDisabled: c,
|
|
124
|
+
selectedProps: d,
|
|
125
|
+
buttonProps: a
|
|
125
126
|
}) => {
|
|
126
|
-
const
|
|
127
|
-
return /* @__PURE__ */ e.jsx(fe, { isAttached: !0, isDisabled:
|
|
127
|
+
const l = (i) => i === o || i.value === o, g = (i) => l(i) ? { ...a, ...d } : a;
|
|
128
|
+
return /* @__PURE__ */ e.jsx(fe, { isAttached: !0, isDisabled: c, children: s.map((i, x) => /* @__PURE__ */ e.jsx(
|
|
128
129
|
Ee,
|
|
129
130
|
{
|
|
130
|
-
label:
|
|
131
|
+
label: i.tooltip,
|
|
131
132
|
openDelay: 50,
|
|
132
133
|
closeDelay: 200,
|
|
133
134
|
placement: "top",
|
|
134
|
-
visibility:
|
|
135
|
+
visibility: i.tooltip ? "visible" : "hidden",
|
|
135
136
|
hasArrow: !0,
|
|
136
137
|
children: /* @__PURE__ */ e.jsx(
|
|
137
138
|
K,
|
|
138
139
|
{
|
|
139
|
-
onClick: () =>
|
|
140
|
-
isDisabled:
|
|
141
|
-
...
|
|
142
|
-
children:
|
|
140
|
+
onClick: () => l(i) ? null : n(i, x),
|
|
141
|
+
isDisabled: i.disabled,
|
|
142
|
+
...g(i),
|
|
143
|
+
children: i.label
|
|
143
144
|
}
|
|
144
145
|
)
|
|
145
146
|
},
|
|
146
|
-
|
|
147
|
+
x
|
|
147
148
|
)) });
|
|
148
|
-
}, we = (
|
|
149
|
-
isReversed:
|
|
150
|
-
min:
|
|
151
|
-
max:
|
|
152
|
-
value:
|
|
153
|
-
onChange:
|
|
154
|
-
inputProps:
|
|
155
|
-
size:
|
|
156
|
-
zeroMarker:
|
|
157
|
-
formatValue:
|
|
158
|
-
valueLabel:
|
|
159
|
-
positiveNegativeLabels:
|
|
160
|
-
isDisabled:
|
|
161
|
-
...
|
|
149
|
+
}, we = (s, n) => n < 0 ? -1 * Math.abs(s) : Math.abs(s), nn = ({
|
|
150
|
+
isReversed: s,
|
|
151
|
+
min: n,
|
|
152
|
+
max: o,
|
|
153
|
+
value: c,
|
|
154
|
+
onChange: d,
|
|
155
|
+
inputProps: a,
|
|
156
|
+
size: l,
|
|
157
|
+
zeroMarker: g,
|
|
158
|
+
formatValue: i,
|
|
159
|
+
valueLabel: x,
|
|
160
|
+
positiveNegativeLabels: h,
|
|
161
|
+
isDisabled: M,
|
|
162
|
+
...m
|
|
162
163
|
}) => {
|
|
163
|
-
const [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}, [
|
|
167
|
-
const
|
|
164
|
+
const [S, b] = z([void 0, void 0]), r = S[0], f = S[1], v = g && n < -5 && o > 5, p = Number(c?.[0] ?? f ?? n) > 0 ? 1 : -1, L = Number(c?.[1] ?? f ?? o) < 0 ? -1 : 1, F = h?.[0] === h?.[1], G = c?.[0], U = c?.[1];
|
|
165
|
+
re(() => {
|
|
166
|
+
G !== void 0 && U !== void 0 && b([G.toFixed(0), U.toFixed(0)]);
|
|
167
|
+
}, [G, U, b]);
|
|
168
|
+
const D = R(
|
|
168
169
|
([w, P]) => {
|
|
169
|
-
w < P &&
|
|
170
|
+
w < P && b([w.toFixed(0), P.toFixed(0)]);
|
|
170
171
|
},
|
|
171
|
-
[
|
|
172
|
-
),
|
|
172
|
+
[b]
|
|
173
|
+
), T = R(
|
|
173
174
|
([w, P]) => {
|
|
174
|
-
w < P &&
|
|
175
|
+
w < P && d([w, P]);
|
|
175
176
|
},
|
|
176
|
-
[
|
|
177
|
-
),
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
return
|
|
177
|
+
[d]
|
|
178
|
+
), I = R(() => {
|
|
179
|
+
b(([w, P]) => {
|
|
180
|
+
const Q = isNaN(Number(w)) ? n : Number(w), ee = isNaN(Number(P)) ? o : Number(P), N = we(Number(Q), p), t = we(Number(ee), L), u = p < 0 ? Math.max(N, n) : Math.min(N, o), A = L < 0 ? Math.max(t, n) : Math.min(t, o);
|
|
181
|
+
return u > A ? (d([A, u]), [A.toFixed(0), u.toFixed(0)]) : (d([u, A]), [u.toFixed(0), A.toFixed(0)]);
|
|
181
182
|
});
|
|
182
|
-
}, [
|
|
183
|
+
}, [d, b, p, L, n, o]), y = R(
|
|
183
184
|
(w) => {
|
|
184
|
-
const P = w === "" || isNaN(Number(w)) ? w : we(Number(w),
|
|
185
|
-
|
|
185
|
+
const P = w === "" || isNaN(Number(w)) ? w : we(Number(w), p);
|
|
186
|
+
b(([Q, ee]) => [P.toString(), ee]);
|
|
186
187
|
},
|
|
187
|
-
[
|
|
188
|
+
[b, p]
|
|
188
189
|
), E = R(
|
|
189
190
|
(w) => {
|
|
190
|
-
const P = w === "" || isNaN(Number(w)) ? w : we(Number(w),
|
|
191
|
-
|
|
191
|
+
const P = w === "" || isNaN(Number(w)) ? w : we(Number(w), L);
|
|
192
|
+
b(([Q, ee]) => [Q, P.toString()]);
|
|
192
193
|
},
|
|
193
|
-
[
|
|
194
|
-
),
|
|
195
|
-
() =>
|
|
196
|
-
[
|
|
194
|
+
[b, L]
|
|
195
|
+
), O = k(
|
|
196
|
+
() => l === "xs" ? "0.75rem" : void 0,
|
|
197
|
+
[l]
|
|
197
198
|
), V = R(
|
|
198
199
|
(w, P) => {
|
|
199
|
-
const
|
|
200
|
-
if (!
|
|
200
|
+
const Q = Number(P.target.value);
|
|
201
|
+
if (!r || !f || ![-1, 1].includes(Q))
|
|
201
202
|
return;
|
|
202
|
-
const
|
|
203
|
-
|
|
203
|
+
const ee = (u) => Q < 0 ? -1 * Math.abs(u) : Math.abs(u), N = w ? ee(Number(r)) : Number(r), t = w ? Number(f) : ee(Number(f));
|
|
204
|
+
N > t ? d([t, N]) : d([N, t]);
|
|
204
205
|
},
|
|
205
|
-
[
|
|
206
|
+
[r, f, d]
|
|
206
207
|
);
|
|
207
|
-
return /* @__PURE__ */ e.jsxs(ge, { direction: "column", ...
|
|
208
|
+
return /* @__PURE__ */ e.jsxs(ge, { direction: "column", ...m, children: [
|
|
208
209
|
/* @__PURE__ */ e.jsx(Z, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
|
|
209
210
|
mt,
|
|
210
211
|
{
|
|
211
212
|
"aria-label": ["min", "max"],
|
|
212
|
-
isReversed:
|
|
213
|
-
value: [Number(
|
|
214
|
-
max:
|
|
215
|
-
min:
|
|
213
|
+
isReversed: s,
|
|
214
|
+
value: [Number(r ?? n), Number(f ?? o)],
|
|
215
|
+
max: o,
|
|
216
|
+
min: n,
|
|
216
217
|
minStepsBetweenThumbs: 3,
|
|
217
218
|
step: 1,
|
|
218
|
-
onChange:
|
|
219
|
-
onChangeEnd:
|
|
220
|
-
isDisabled:
|
|
219
|
+
onChange: D,
|
|
220
|
+
onChangeEnd: T,
|
|
221
|
+
isDisabled: M,
|
|
221
222
|
children: [
|
|
222
|
-
/* @__PURE__ */ e.jsx(
|
|
223
|
-
|
|
223
|
+
/* @__PURE__ */ e.jsx(Re, { value: n, top: "-1em", children: /* @__PURE__ */ e.jsx(
|
|
224
|
+
C,
|
|
224
225
|
{
|
|
225
|
-
fontSize:
|
|
226
|
+
fontSize: l ?? "sm",
|
|
226
227
|
fontWeight: "semibold",
|
|
227
228
|
whiteSpace: "nowrap",
|
|
228
|
-
children:
|
|
229
|
+
children: i ? i?.(n) : n
|
|
229
230
|
}
|
|
230
231
|
) }),
|
|
231
|
-
/* @__PURE__ */ e.jsx(
|
|
232
|
-
|
|
232
|
+
/* @__PURE__ */ e.jsx(Re, { value: o, top: "-1em", children: /* @__PURE__ */ e.jsx(
|
|
233
|
+
C,
|
|
233
234
|
{
|
|
234
|
-
fontSize:
|
|
235
|
+
fontSize: l ?? "sm",
|
|
235
236
|
fontWeight: "semibold",
|
|
236
237
|
style: { transform: "translateX(-100%)" },
|
|
237
238
|
whiteSpace: "nowrap",
|
|
238
|
-
children:
|
|
239
|
+
children: i ? i(o) : o
|
|
239
240
|
}
|
|
240
241
|
) }),
|
|
241
|
-
|
|
242
|
-
/* @__PURE__ */ e.jsx(
|
|
242
|
+
v && /* @__PURE__ */ e.jsxs(Re, { value: 0, top: "-1em", pos: "relative", children: [
|
|
243
|
+
/* @__PURE__ */ e.jsx(C, { fontSize: l, fontWeight: "semibold", children: i?.(0) ?? "0" }),
|
|
243
244
|
/* @__PURE__ */ e.jsx(
|
|
244
245
|
Z,
|
|
245
246
|
{
|
|
@@ -253,33 +254,33 @@ const Kt = ({
|
|
|
253
254
|
)
|
|
254
255
|
] }),
|
|
255
256
|
/* @__PURE__ */ e.jsx(pt, { children: /* @__PURE__ */ e.jsx(gt, {}) }),
|
|
256
|
-
/* @__PURE__ */ e.jsx(Ge, { index: 0, w:
|
|
257
|
-
/* @__PURE__ */ e.jsx(Ge, { index: 1, w:
|
|
257
|
+
/* @__PURE__ */ e.jsx(Ge, { index: 0, w: O, h: O }),
|
|
258
|
+
/* @__PURE__ */ e.jsx(Ge, { index: 1, w: O, h: O })
|
|
258
259
|
]
|
|
259
260
|
}
|
|
260
261
|
) }),
|
|
261
|
-
|
|
262
|
+
x && /* @__PURE__ */ e.jsxs(
|
|
262
263
|
ge,
|
|
263
264
|
{
|
|
264
|
-
direction:
|
|
265
|
+
direction: s ? "row-reverse" : "row",
|
|
265
266
|
justifyContent: "space-between",
|
|
266
267
|
children: [
|
|
267
268
|
/* @__PURE__ */ e.jsx(
|
|
268
|
-
|
|
269
|
+
C,
|
|
269
270
|
{
|
|
270
|
-
fontSize:
|
|
271
|
+
fontSize: l ?? "sm",
|
|
271
272
|
fontWeight: "semibold",
|
|
272
273
|
whiteSpace: "nowrap",
|
|
273
|
-
children:
|
|
274
|
+
children: x(n)
|
|
274
275
|
}
|
|
275
276
|
),
|
|
276
277
|
/* @__PURE__ */ e.jsx(
|
|
277
|
-
|
|
278
|
+
C,
|
|
278
279
|
{
|
|
279
|
-
fontSize:
|
|
280
|
+
fontSize: l ?? "sm",
|
|
280
281
|
fontWeight: "semibold",
|
|
281
282
|
whiteSpace: "nowrap",
|
|
282
|
-
children:
|
|
283
|
+
children: x(o)
|
|
283
284
|
}
|
|
284
285
|
)
|
|
285
286
|
]
|
|
@@ -288,23 +289,23 @@ const Kt = ({
|
|
|
288
289
|
/* @__PURE__ */ e.jsxs(
|
|
289
290
|
ge,
|
|
290
291
|
{
|
|
291
|
-
direction:
|
|
292
|
+
direction: s ? "row-reverse" : "row",
|
|
292
293
|
justifyContent: "center",
|
|
293
294
|
alignItems: "center",
|
|
294
295
|
gap: "0.125em",
|
|
295
296
|
children: [
|
|
296
|
-
|
|
297
|
+
h && /* @__PURE__ */ e.jsxs(
|
|
297
298
|
Pe,
|
|
298
299
|
{
|
|
299
300
|
width: "auto",
|
|
300
|
-
size:
|
|
301
|
+
size: l,
|
|
301
302
|
fontWeight: "bold",
|
|
302
|
-
value:
|
|
303
|
+
value: p,
|
|
303
304
|
onChange: (w) => V(!0, w),
|
|
304
|
-
isDisabled: F ||
|
|
305
|
+
isDisabled: F || M,
|
|
305
306
|
children: [
|
|
306
|
-
/* @__PURE__ */ e.jsx("option", { value: -1, children:
|
|
307
|
-
/* @__PURE__ */ e.jsx("option", { value: 1, children:
|
|
307
|
+
/* @__PURE__ */ e.jsx("option", { value: -1, children: h[0] }),
|
|
308
|
+
/* @__PURE__ */ e.jsx("option", { value: 1, children: h[1] })
|
|
308
309
|
]
|
|
309
310
|
}
|
|
310
311
|
),
|
|
@@ -312,17 +313,17 @@ const Kt = ({
|
|
|
312
313
|
We,
|
|
313
314
|
{
|
|
314
315
|
precision: 0,
|
|
315
|
-
size:
|
|
316
|
+
size: l ?? "sm",
|
|
316
317
|
min: 0,
|
|
317
|
-
max:
|
|
318
|
-
value:
|
|
319
|
-
onChange:
|
|
320
|
-
onBlur:
|
|
318
|
+
max: p < 0 ? Math.abs(n) : U ?? o,
|
|
319
|
+
value: r === "" ? "" : Math.abs(Number(r ?? n)),
|
|
320
|
+
onChange: y,
|
|
321
|
+
onBlur: I,
|
|
321
322
|
borderWidth: 1,
|
|
322
323
|
borderRadius: 3,
|
|
323
324
|
borderColor: "#ccc",
|
|
324
|
-
isDisabled:
|
|
325
|
-
...
|
|
325
|
+
isDisabled: M,
|
|
326
|
+
...a,
|
|
326
327
|
children: /* @__PURE__ */ e.jsx(
|
|
327
328
|
Ue,
|
|
328
329
|
{
|
|
@@ -336,18 +337,18 @@ const Kt = ({
|
|
|
336
337
|
/* @__PURE__ */ e.jsx(
|
|
337
338
|
We,
|
|
338
339
|
{
|
|
339
|
-
size:
|
|
340
|
+
size: l ?? "sm",
|
|
340
341
|
min: 0,
|
|
341
|
-
max:
|
|
342
|
+
max: L < 0 ? Math.abs(G ?? n) : o,
|
|
342
343
|
precision: 0,
|
|
343
|
-
value:
|
|
344
|
+
value: f === "" ? "" : Math.abs(Number(f ?? o)),
|
|
344
345
|
onChange: E,
|
|
345
|
-
onBlur:
|
|
346
|
+
onBlur: I,
|
|
346
347
|
borderWidth: 1,
|
|
347
348
|
borderRadius: 3,
|
|
348
349
|
borderColor: "#ccc",
|
|
349
|
-
isDisabled:
|
|
350
|
-
...
|
|
350
|
+
isDisabled: M,
|
|
351
|
+
...a,
|
|
351
352
|
children: /* @__PURE__ */ e.jsx(
|
|
352
353
|
Ue,
|
|
353
354
|
{
|
|
@@ -358,18 +359,18 @@ const Kt = ({
|
|
|
358
359
|
)
|
|
359
360
|
}
|
|
360
361
|
),
|
|
361
|
-
|
|
362
|
+
h && /* @__PURE__ */ e.jsxs(
|
|
362
363
|
Pe,
|
|
363
364
|
{
|
|
364
365
|
width: "auto",
|
|
365
|
-
size:
|
|
366
|
+
size: l,
|
|
366
367
|
fontWeight: "bold",
|
|
367
|
-
value:
|
|
368
|
+
value: L,
|
|
368
369
|
onChange: (w) => V(!1, w),
|
|
369
|
-
isDisabled: F ||
|
|
370
|
+
isDisabled: F || M,
|
|
370
371
|
children: [
|
|
371
|
-
/* @__PURE__ */ e.jsx("option", { value: -1, children:
|
|
372
|
-
/* @__PURE__ */ e.jsx("option", { value: 1, children:
|
|
372
|
+
/* @__PURE__ */ e.jsx("option", { value: -1, children: h[0] }),
|
|
373
|
+
/* @__PURE__ */ e.jsx("option", { value: 1, children: h[1] })
|
|
373
374
|
]
|
|
374
375
|
}
|
|
375
376
|
)
|
|
@@ -377,10 +378,10 @@ const Kt = ({
|
|
|
377
378
|
}
|
|
378
379
|
)
|
|
379
380
|
] });
|
|
380
|
-
}, sn = ({ tags:
|
|
381
|
-
action:
|
|
382
|
-
quantumIconSrc:
|
|
383
|
-
}) =>
|
|
381
|
+
}, sn = ({ tags: s, containerProps: n, ...o }) => /* @__PURE__ */ e.jsx(se, { ...n, children: s.map((c, d) => /* @__PURE__ */ e.jsx(be, { ...o, children: c }, d)) }), rn = new Tt({}), on = ({
|
|
382
|
+
action: s,
|
|
383
|
+
quantumIconSrc: n
|
|
384
|
+
}) => s.quantumOwned ? /* @__PURE__ */ e.jsx(
|
|
384
385
|
Ee,
|
|
385
386
|
{
|
|
386
387
|
label: "This activity is owned by Quantum",
|
|
@@ -397,7 +398,7 @@ const Kt = ({
|
|
|
397
398
|
children: /* @__PURE__ */ e.jsx(
|
|
398
399
|
ft,
|
|
399
400
|
{
|
|
400
|
-
src:
|
|
401
|
+
src: n,
|
|
401
402
|
boxSize: "1em",
|
|
402
403
|
alt: "Quantum-owned activity"
|
|
403
404
|
}
|
|
@@ -405,89 +406,89 @@ const Kt = ({
|
|
|
405
406
|
}
|
|
406
407
|
)
|
|
407
408
|
}
|
|
408
|
-
) : null, an = (
|
|
409
|
-
if (!
|
|
410
|
-
return
|
|
411
|
-
const
|
|
412
|
-
return
|
|
413
|
-
}, ln = (
|
|
414
|
-
(
|
|
409
|
+
) : null, an = (s, n) => {
|
|
410
|
+
if (!n || !n.trim().length)
|
|
411
|
+
return s;
|
|
412
|
+
const o = s.map((d) => d.name ?? "");
|
|
413
|
+
return rn.filter(o, n)?.map((d) => s[d]) ?? [];
|
|
414
|
+
}, ln = (s) => !s || s.length === 0 ? "None" : s.map(
|
|
415
|
+
(n) => (
|
|
415
416
|
// Convert camelCase to separate words (e.g., 'LeftFoot' -> 'Left Foot')
|
|
416
|
-
|
|
417
|
+
n.replace(/([A-Z])/g, " $1").trim()
|
|
417
418
|
)
|
|
418
|
-
).join(", "), cn = (
|
|
419
|
-
(
|
|
419
|
+
).join(", "), cn = (s, n) => !n || n.length == 0 ? s : s.filter(
|
|
420
|
+
(o) => o.useCases?.some((c) => n.includes(c.id)) ?? !1
|
|
420
421
|
), dn = ({
|
|
421
|
-
actions:
|
|
422
|
-
totalActions:
|
|
423
|
-
onCreate:
|
|
424
|
-
onDelete:
|
|
425
|
-
onEdit:
|
|
426
|
-
onView:
|
|
427
|
-
onSelected:
|
|
428
|
-
onDuplicate:
|
|
429
|
-
disableMultiSelect:
|
|
430
|
-
disableDelete:
|
|
431
|
-
disableEdit:
|
|
432
|
-
disableCreate:
|
|
433
|
-
hideUseCase:
|
|
434
|
-
tableProps:
|
|
435
|
-
containerProps:
|
|
436
|
-
quantumIconSrc:
|
|
422
|
+
actions: s,
|
|
423
|
+
totalActions: n,
|
|
424
|
+
onCreate: o,
|
|
425
|
+
onDelete: c,
|
|
426
|
+
onEdit: d,
|
|
427
|
+
onView: a,
|
|
428
|
+
onSelected: l,
|
|
429
|
+
onDuplicate: g,
|
|
430
|
+
disableMultiSelect: i,
|
|
431
|
+
disableDelete: x,
|
|
432
|
+
disableEdit: h,
|
|
433
|
+
disableCreate: M,
|
|
434
|
+
hideUseCase: m = !0,
|
|
435
|
+
tableProps: S,
|
|
436
|
+
containerProps: b,
|
|
437
|
+
quantumIconSrc: r = "/favicon.ico"
|
|
437
438
|
}) => {
|
|
438
|
-
const [
|
|
439
|
-
if (!
|
|
439
|
+
const [f, v] = z(""), [p, L] = z(), F = k(() => {
|
|
440
|
+
if (!s)
|
|
440
441
|
return;
|
|
441
|
-
const
|
|
442
|
-
return
|
|
443
|
-
}, [
|
|
444
|
-
if (!
|
|
442
|
+
const y = an(s, f);
|
|
443
|
+
return m ? y : cn(y, p);
|
|
444
|
+
}, [s, f, p, m]), G = R(() => {
|
|
445
|
+
if (!c)
|
|
445
446
|
return;
|
|
446
|
-
const E =
|
|
447
|
-
(
|
|
448
|
-
).map((
|
|
449
|
-
|
|
450
|
-
}, [
|
|
451
|
-
if (!
|
|
447
|
+
const E = s.filter(
|
|
448
|
+
(O) => O.selected && !O.quantumOwned
|
|
449
|
+
).map((O) => O.id);
|
|
450
|
+
c(E);
|
|
451
|
+
}, [s, c]), U = R(() => {
|
|
452
|
+
if (!g)
|
|
452
453
|
return;
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
}, [
|
|
456
|
-
return /* @__PURE__ */ e.jsxs(Z, { ...
|
|
454
|
+
const y = s.filter((E) => E.selected);
|
|
455
|
+
g(y.map((E) => E.id)), l && y.forEach((E) => l(E, !1));
|
|
456
|
+
}, [s, g, l]), D = k(() => s.some((y) => y.selected && !y.quantumOwned), [s]), T = k(() => s.some((y) => y.selected), [s]), I = k(() => s.some((y) => y.selected && y.quantumOwned), [s]);
|
|
457
|
+
return /* @__PURE__ */ e.jsxs(Z, { ...b, children: [
|
|
457
458
|
/* @__PURE__ */ e.jsxs(ge, { alignContent: "space-between", gap: 4, children: [
|
|
458
|
-
(
|
|
459
|
-
|
|
459
|
+
(o || c || g) && /* @__PURE__ */ e.jsxs(fe, { mb: "1rem", gap: 4, children: [
|
|
460
|
+
o && /* @__PURE__ */ e.jsx(
|
|
460
461
|
K,
|
|
461
462
|
{
|
|
462
|
-
isDisabled: !
|
|
463
|
+
isDisabled: !o || M,
|
|
463
464
|
colorScheme: "blackAlpha",
|
|
464
465
|
backgroundColor: "gray.700",
|
|
465
|
-
onClick:
|
|
466
|
+
onClick: o,
|
|
466
467
|
children: "Create New Activity"
|
|
467
468
|
}
|
|
468
469
|
),
|
|
469
|
-
|
|
470
|
+
c && !i && /* @__PURE__ */ e.jsx(
|
|
470
471
|
Ee,
|
|
471
472
|
{
|
|
472
|
-
label:
|
|
473
|
+
label: I ? D ? "Quantum-owned activities are selected and will be skipped" : "Selected activities are quantum-owned and cannot be deleted" : void 0,
|
|
473
474
|
shouldWrapChildren: !0,
|
|
474
475
|
children: /* @__PURE__ */ e.jsx(
|
|
475
476
|
K,
|
|
476
477
|
{
|
|
477
478
|
colorScheme: "gray",
|
|
478
|
-
isDisabled: !
|
|
479
|
-
onClick:
|
|
479
|
+
isDisabled: !D || !c || x,
|
|
480
|
+
onClick: G,
|
|
480
481
|
children: "Delete Selected"
|
|
481
482
|
}
|
|
482
483
|
)
|
|
483
484
|
}
|
|
484
485
|
),
|
|
485
|
-
|
|
486
|
+
g && !i && /* @__PURE__ */ e.jsx(
|
|
486
487
|
K,
|
|
487
488
|
{
|
|
488
489
|
colorScheme: "gray",
|
|
489
|
-
isDisabled: !
|
|
490
|
-
onClick:
|
|
490
|
+
isDisabled: !T,
|
|
491
|
+
onClick: U,
|
|
491
492
|
children: "Duplicate Selected"
|
|
492
493
|
}
|
|
493
494
|
)
|
|
@@ -495,275 +496,298 @@ const Kt = ({
|
|
|
495
496
|
/* @__PURE__ */ e.jsx(
|
|
496
497
|
Kt,
|
|
497
498
|
{
|
|
498
|
-
setSearch:
|
|
499
|
-
actions:
|
|
500
|
-
updateUseCases:
|
|
501
|
-
hideUseCaseFilter:
|
|
499
|
+
setSearch: v,
|
|
500
|
+
actions: s,
|
|
501
|
+
updateUseCases: L,
|
|
502
|
+
hideUseCaseFilter: m
|
|
502
503
|
}
|
|
503
504
|
)
|
|
504
505
|
] }),
|
|
505
|
-
/* @__PURE__ */ e.jsx(Je, { mr: "2rem", overflowX: "hidden", ...
|
|
506
|
-
/* @__PURE__ */ e.jsx(Ze, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(
|
|
506
|
+
/* @__PURE__ */ e.jsx(Je, { mr: "2rem", overflowX: "hidden", ...S, children: /* @__PURE__ */ e.jsxs(Xe, { size: "md", variant: "simple", children: [
|
|
507
|
+
/* @__PURE__ */ e.jsx(Ze, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
507
508
|
/* @__PURE__ */ e.jsxs(pe, { fontWeight: "normal", children: [
|
|
508
509
|
"(showing ",
|
|
509
510
|
F?.length ?? 0,
|
|
510
511
|
" of",
|
|
511
512
|
" ",
|
|
512
|
-
|
|
513
|
+
n ?? s.length,
|
|
513
514
|
")"
|
|
514
515
|
] }),
|
|
515
516
|
/* @__PURE__ */ e.jsx(pe, { children: "Name" }),
|
|
516
517
|
/* @__PURE__ */ e.jsx(pe, { children: "Sensor Locations" }),
|
|
517
|
-
!
|
|
518
|
+
!m && /* @__PURE__ */ e.jsx(pe, { children: "Use Case" }),
|
|
518
519
|
/* @__PURE__ */ e.jsx(pe, {})
|
|
519
520
|
] }) }),
|
|
520
|
-
/* @__PURE__ */ e.jsx(Ke, { children: F?.map((
|
|
521
|
-
|
|
521
|
+
/* @__PURE__ */ e.jsx(Ke, { children: F?.map((y) => /* @__PURE__ */ e.jsxs(
|
|
522
|
+
Me,
|
|
522
523
|
{
|
|
523
|
-
title:
|
|
524
|
-
bg:
|
|
524
|
+
title: i && y.selected ? "This activity is selected. Click it again to deselect." : void 0,
|
|
525
|
+
bg: i && y.selected ? "gray.200" : void 0,
|
|
525
526
|
_hover: {
|
|
526
|
-
bg:
|
|
527
|
+
bg: i && !y.selected ? "#f7f7f7" : void 0
|
|
527
528
|
},
|
|
528
|
-
cursor:
|
|
529
|
-
onClick: () =>
|
|
529
|
+
cursor: i ? "pointer" : "default",
|
|
530
|
+
onClick: () => i ? l?.(y, !y.selected) : void 0,
|
|
530
531
|
children: [
|
|
531
532
|
/* @__PURE__ */ e.jsx(xe, { children: /* @__PURE__ */ e.jsxs(ge, { children: [
|
|
532
|
-
|
|
533
|
+
l && !i && /* @__PURE__ */ e.jsx(
|
|
533
534
|
xt,
|
|
534
535
|
{
|
|
535
|
-
isChecked:
|
|
536
|
+
isChecked: y.selected,
|
|
536
537
|
"aria-label": "Select activity",
|
|
537
|
-
onChange: (E) =>
|
|
538
|
+
onChange: (E) => l(y, E.target.checked)
|
|
538
539
|
}
|
|
539
540
|
),
|
|
540
|
-
(
|
|
541
|
+
(y.quantumOwned || !d) && a && /* @__PURE__ */ e.jsx(
|
|
541
542
|
K,
|
|
542
543
|
{
|
|
543
544
|
ml: "1em",
|
|
544
545
|
size: "sm",
|
|
545
546
|
variant: "link",
|
|
546
547
|
colorScheme: "blue",
|
|
547
|
-
onClick: () =>
|
|
548
|
+
onClick: () => a(y.id),
|
|
548
549
|
children: "View"
|
|
549
550
|
}
|
|
550
551
|
),
|
|
551
|
-
!
|
|
552
|
+
!y.quantumOwned && d && /* @__PURE__ */ e.jsx(
|
|
552
553
|
K,
|
|
553
554
|
{
|
|
554
|
-
isDisabled:
|
|
555
|
+
isDisabled: h,
|
|
555
556
|
ml: "1em",
|
|
556
557
|
size: "sm",
|
|
557
558
|
variant: "link",
|
|
558
559
|
colorScheme: "blue",
|
|
559
|
-
onClick: () =>
|
|
560
|
+
onClick: () => d(y.id),
|
|
560
561
|
children: "Edit"
|
|
561
562
|
}
|
|
562
563
|
)
|
|
563
564
|
] }) }),
|
|
564
565
|
/* @__PURE__ */ e.jsx(xe, { whiteSpace: "break-spaces", children: /* @__PURE__ */ e.jsxs(ge, { align: "center", gap: 2, children: [
|
|
565
566
|
/* @__PURE__ */ e.jsx(
|
|
566
|
-
|
|
567
|
+
on,
|
|
567
568
|
{
|
|
568
|
-
action:
|
|
569
|
-
quantumIconSrc:
|
|
569
|
+
action: y,
|
|
570
|
+
quantumIconSrc: r
|
|
570
571
|
}
|
|
571
572
|
),
|
|
572
|
-
|
|
573
|
+
y.name
|
|
573
574
|
] }) }),
|
|
574
|
-
/* @__PURE__ */ e.jsx(xe, { maxW: "20rem", whiteSpace: "break-spaces", children: ln(
|
|
575
|
-
!
|
|
575
|
+
/* @__PURE__ */ e.jsx(xe, { maxW: "20rem", whiteSpace: "break-spaces", children: ln(y.sensorLocations) }),
|
|
576
|
+
!m && /* @__PURE__ */ e.jsx(xe, { maxW: "20rem", children: /* @__PURE__ */ e.jsx(
|
|
576
577
|
sn,
|
|
577
578
|
{
|
|
578
579
|
containerProps: { flexWrap: "wrap" },
|
|
579
|
-
tags:
|
|
580
|
+
tags: y.useCases?.map((E) => E.name) ?? []
|
|
580
581
|
}
|
|
581
582
|
) })
|
|
582
583
|
]
|
|
583
584
|
},
|
|
584
|
-
|
|
585
|
+
y.id
|
|
585
586
|
)) })
|
|
586
587
|
] }) })
|
|
587
588
|
] });
|
|
588
|
-
},
|
|
589
|
-
onSave:
|
|
590
|
-
onCancel:
|
|
591
|
-
onError:
|
|
592
|
-
hideButtons:
|
|
593
|
-
setButtonDisabled:
|
|
594
|
-
setButtonOnClick:
|
|
595
|
-
quantumOwned:
|
|
589
|
+
}, Gn = ({
|
|
590
|
+
onSave: s,
|
|
591
|
+
onCancel: n,
|
|
592
|
+
onError: o,
|
|
593
|
+
hideButtons: c = !1,
|
|
594
|
+
setButtonDisabled: d,
|
|
595
|
+
setButtonOnClick: a,
|
|
596
|
+
quantumOwned: l
|
|
596
597
|
}) => {
|
|
597
|
-
const
|
|
598
|
+
const g = Ve(), { getLabel: i } = ke(), x = k(() => ({
|
|
599
|
+
singular: i("action"),
|
|
600
|
+
plural: i("action_plural"),
|
|
601
|
+
pluralLowerCase: i("action_plural").toLowerCase(),
|
|
602
|
+
singularLowerCase: i("action").toLowerCase()
|
|
603
|
+
}), [i]), [h, M] = z("copy"), [m, S] = z(""), [b, r] = z([]), [f, v] = z(!1), [p] = de({
|
|
598
604
|
query: nt
|
|
599
|
-
}), [
|
|
605
|
+
}), [L] = de({
|
|
600
606
|
query: kt,
|
|
601
|
-
variables: { groupId:
|
|
602
|
-
pause: !
|
|
607
|
+
variables: { groupId: m },
|
|
608
|
+
pause: !m
|
|
603
609
|
// Only run when group is selected
|
|
604
|
-
}), [,
|
|
610
|
+
}), [, F] = ie(_e), [, G] = ie(
|
|
605
611
|
st
|
|
606
|
-
),
|
|
607
|
-
(
|
|
608
|
-
) : [], [
|
|
609
|
-
(
|
|
610
|
-
) : [], [
|
|
611
|
-
(
|
|
612
|
-
), [
|
|
613
|
-
(
|
|
614
|
-
const
|
|
615
|
-
|
|
612
|
+
), U = k(() => p.data?.groups ? p.data.groups.map(
|
|
613
|
+
(t) => $(rt, t)
|
|
614
|
+
) : [], [p.data]), D = k(() => L.data ? L.data.actions.map(
|
|
615
|
+
(u) => $(ue, u)
|
|
616
|
+
) : [], [L.data]), T = k(() => D.filter(
|
|
617
|
+
(t) => b.includes(t.id)
|
|
618
|
+
), [D, b]), I = R(
|
|
619
|
+
(t) => {
|
|
620
|
+
const u = t?.value || "";
|
|
621
|
+
S(u), r([]);
|
|
616
622
|
},
|
|
617
623
|
[]
|
|
618
|
-
),
|
|
619
|
-
(
|
|
620
|
-
const
|
|
621
|
-
|
|
624
|
+
), y = R(
|
|
625
|
+
(t) => {
|
|
626
|
+
const u = t.map((A) => A.value);
|
|
627
|
+
r(u);
|
|
622
628
|
},
|
|
623
629
|
[]
|
|
624
|
-
),
|
|
625
|
-
async (
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
),
|
|
630
|
-
|
|
631
|
-
|
|
630
|
+
), E = R(
|
|
631
|
+
async (t) => {
|
|
632
|
+
const u = $(
|
|
633
|
+
ve,
|
|
634
|
+
t.categories
|
|
635
|
+
), J = $(
|
|
636
|
+
Fe,
|
|
637
|
+
t.metadataGroups
|
|
632
638
|
).flatMap(
|
|
633
|
-
(
|
|
634
|
-
),
|
|
635
|
-
...
|
|
636
|
-
name: `${
|
|
639
|
+
(Y) => Y.data.map((j) => $($e, j).id)
|
|
640
|
+
), q = {
|
|
641
|
+
...t,
|
|
642
|
+
name: `${t.name} (Copy)`,
|
|
637
643
|
// Add "(Copy)" suffix to distinguish
|
|
638
|
-
description:
|
|
639
|
-
instructionsPointOfInterest:
|
|
640
|
-
instructionsMovementReport:
|
|
641
|
-
laterality:
|
|
642
|
-
activityKind:
|
|
643
|
-
sensorLocations:
|
|
644
|
-
thresholds:
|
|
645
|
-
...
|
|
644
|
+
description: t.description || void 0,
|
|
645
|
+
instructionsPointOfInterest: t.instructionsPointOfInterest || void 0,
|
|
646
|
+
instructionsMovementReport: t.instructionsMovementReport || void 0,
|
|
647
|
+
laterality: t.laterality,
|
|
648
|
+
activityKind: t.activityKind,
|
|
649
|
+
sensorLocations: t.sensorLocations,
|
|
650
|
+
thresholds: t.thresholds.map((Y) => ({
|
|
651
|
+
...Y,
|
|
646
652
|
id: void 0
|
|
647
653
|
})),
|
|
648
|
-
categories:
|
|
649
|
-
quantumOwned:
|
|
650
|
-
metadataItemIds:
|
|
654
|
+
categories: u?.map((Y) => Y.id),
|
|
655
|
+
quantumOwned: l,
|
|
656
|
+
metadataItemIds: J,
|
|
651
657
|
id: void 0
|
|
652
|
-
},
|
|
653
|
-
if (
|
|
654
|
-
throw new Error(
|
|
655
|
-
if (
|
|
656
|
-
return $(ue,
|
|
658
|
+
}, _ = await F({ fields: q });
|
|
659
|
+
if (_.error)
|
|
660
|
+
throw new Error(_.error.message);
|
|
661
|
+
if (_.data?.createAction)
|
|
662
|
+
return $(ue, _.data.createAction);
|
|
657
663
|
throw new Error("No action data returned");
|
|
658
664
|
},
|
|
659
|
-
[
|
|
660
|
-
),
|
|
661
|
-
async (
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
664
|
-
throw new Error(
|
|
665
|
-
if (
|
|
665
|
+
[F, l]
|
|
666
|
+
), O = R(
|
|
667
|
+
async (t) => {
|
|
668
|
+
const u = await G({ id: t.id });
|
|
669
|
+
if (u.error)
|
|
670
|
+
throw new Error(u.error.message);
|
|
671
|
+
if (u.data?.convertActionToQuantumOwned)
|
|
666
672
|
return $(
|
|
667
673
|
ue,
|
|
668
|
-
|
|
674
|
+
u.data.convertActionToQuantumOwned
|
|
669
675
|
);
|
|
670
676
|
throw new Error("No action data returned");
|
|
671
677
|
},
|
|
672
|
-
[
|
|
673
|
-
),
|
|
674
|
-
if (
|
|
675
|
-
const
|
|
676
|
-
`No
|
|
678
|
+
[G]
|
|
679
|
+
), V = R(async () => {
|
|
680
|
+
if (v(!0), !T.length) {
|
|
681
|
+
const t = new Error(
|
|
682
|
+
`No ${x.pluralLowerCase} selected for ${h === "copy" ? "copying" : "converting"}`
|
|
677
683
|
);
|
|
678
|
-
|
|
684
|
+
o?.(t), v(!1);
|
|
679
685
|
return;
|
|
680
686
|
}
|
|
681
687
|
try {
|
|
682
|
-
const
|
|
683
|
-
let
|
|
684
|
-
const
|
|
685
|
-
for (const
|
|
688
|
+
const t = [];
|
|
689
|
+
let u = 0;
|
|
690
|
+
const A = h === "copy" ? E : O, J = h === "copy" ? "copy" : "convert";
|
|
691
|
+
for (const q of T)
|
|
686
692
|
try {
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
} catch (
|
|
693
|
+
const _ = await A(q);
|
|
694
|
+
t.push(_);
|
|
695
|
+
} catch (_) {
|
|
690
696
|
console.error(
|
|
691
|
-
`Failed to ${
|
|
692
|
-
|
|
693
|
-
),
|
|
697
|
+
`Failed to ${J} ${x.singularLowerCase} "${q.name}":`,
|
|
698
|
+
_
|
|
699
|
+
), u++;
|
|
694
700
|
}
|
|
695
|
-
if (
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
title:
|
|
699
|
-
description:
|
|
700
|
-
status:
|
|
701
|
+
if (t.length > 0) {
|
|
702
|
+
const q = t.length, _ = T.length, Y = h === "copy" ? "copied" : "converted", j = h === "copy" ? "copy" : "convert";
|
|
703
|
+
g({
|
|
704
|
+
title: u > 0 ? `Partial ${j} completed` : `${x.plural} ${Y} successfully`,
|
|
705
|
+
description: u > 0 ? `${q} of ${_} ${x.pluralLowerCase} ${Y} successfully` : `${q} ${q > 1 ? x.pluralLowerCase : x.singularLowerCase} ${Y} successfully`,
|
|
706
|
+
status: u > 0 ? "warning" : "success",
|
|
701
707
|
duration: 3e3,
|
|
702
708
|
isClosable: !0
|
|
703
|
-
}),
|
|
709
|
+
}), s?.(), S(""), r([]);
|
|
704
710
|
} else
|
|
705
|
-
throw new Error(
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
+
throw new Error(
|
|
712
|
+
`Failed to ${J} any ${x.pluralLowerCase}`
|
|
713
|
+
);
|
|
714
|
+
} catch (t) {
|
|
715
|
+
const u = h === "copy" ? "copy" : "convert", A = t instanceof Error ? t.message : `Failed to ${u} ${x.pluralLowerCase}`;
|
|
716
|
+
g({
|
|
717
|
+
title: `${h === "copy" ? "Copy" : "Convert"} failed`,
|
|
718
|
+
description: A,
|
|
711
719
|
status: "error",
|
|
712
720
|
duration: 5e3,
|
|
713
721
|
isClosable: !0
|
|
714
|
-
}),
|
|
722
|
+
}), o?.(t instanceof Error ? t : new Error(A));
|
|
715
723
|
} finally {
|
|
716
|
-
|
|
724
|
+
v(!1);
|
|
717
725
|
}
|
|
718
726
|
}, [
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
]),
|
|
727
|
-
|
|
728
|
-
}, [
|
|
729
|
-
|
|
730
|
-
|
|
727
|
+
T,
|
|
728
|
+
h,
|
|
729
|
+
E,
|
|
730
|
+
O,
|
|
731
|
+
g,
|
|
732
|
+
s,
|
|
733
|
+
o
|
|
734
|
+
]), w = R(() => {
|
|
735
|
+
S(""), r([]), M("copy"), n?.();
|
|
736
|
+
}, [n]);
|
|
737
|
+
re(() => {
|
|
738
|
+
d && d({
|
|
731
739
|
cancelButton: !1,
|
|
732
|
-
saveButton:
|
|
740
|
+
saveButton: T.length === 0 || f
|
|
733
741
|
});
|
|
734
|
-
}, [
|
|
735
|
-
|
|
736
|
-
cancelButton:
|
|
737
|
-
saveButton:
|
|
742
|
+
}, [T.length, f, d]), re(() => {
|
|
743
|
+
a && a({
|
|
744
|
+
cancelButton: w,
|
|
745
|
+
saveButton: V
|
|
738
746
|
});
|
|
739
|
-
}, [
|
|
740
|
-
const
|
|
741
|
-
value:
|
|
742
|
-
label:
|
|
743
|
-
})), [
|
|
744
|
-
value:
|
|
745
|
-
label:
|
|
747
|
+
}, [a, w, V]);
|
|
748
|
+
const P = k(() => U.map((t) => ({
|
|
749
|
+
value: t.id,
|
|
750
|
+
label: t.name
|
|
751
|
+
})), [U]), Q = k(() => D.filter((t) => h === "copy" ? !0 : !t.quantumOwned).map((t) => ({
|
|
752
|
+
value: t.id,
|
|
753
|
+
label: t.name,
|
|
746
754
|
// Add custom data to identify quantum-owned actions for UI display
|
|
747
|
-
isQuantumOwned:
|
|
748
|
-
})), [
|
|
749
|
-
return /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsxs(
|
|
750
|
-
|
|
755
|
+
isQuantumOwned: t.quantumOwned
|
|
756
|
+
})), [D, h]), ee = p.fetching, N = L.fetching;
|
|
757
|
+
return /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsxs(ne, { spacing: 6, align: "stretch", children: [
|
|
758
|
+
l && /* @__PURE__ */ e.jsxs(X, { children: [
|
|
751
759
|
/* @__PURE__ */ e.jsx(ae, { children: "Operation Mode" }),
|
|
752
760
|
/* @__PURE__ */ e.jsx(
|
|
753
761
|
et,
|
|
754
762
|
{
|
|
755
|
-
value:
|
|
756
|
-
onChange: (
|
|
757
|
-
|
|
763
|
+
value: h,
|
|
764
|
+
onChange: (t) => {
|
|
765
|
+
M(t), r([]);
|
|
758
766
|
},
|
|
759
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
760
|
-
/* @__PURE__ */ e.jsx(
|
|
761
|
-
/* @__PURE__ */ e.
|
|
762
|
-
|
|
767
|
+
children: /* @__PURE__ */ e.jsxs(se, { spacing: 6, children: [
|
|
768
|
+
/* @__PURE__ */ e.jsx(Te, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 1, children: [
|
|
769
|
+
/* @__PURE__ */ e.jsxs(C, { fontWeight: "medium", children: [
|
|
770
|
+
"Copy ",
|
|
771
|
+
x.plural
|
|
772
|
+
] }),
|
|
773
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
774
|
+
"Create new ",
|
|
775
|
+
x.plural.toLocaleLowerCase(),
|
|
776
|
+
" ",
|
|
777
|
+
"based on selected ones"
|
|
778
|
+
] })
|
|
763
779
|
] }) }),
|
|
764
|
-
/* @__PURE__ */ e.jsx(
|
|
765
|
-
/* @__PURE__ */ e.
|
|
766
|
-
|
|
780
|
+
/* @__PURE__ */ e.jsx(Te, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 1, children: [
|
|
781
|
+
/* @__PURE__ */ e.jsxs(C, { fontWeight: "medium", children: [
|
|
782
|
+
"Convert to Quantum Owned ",
|
|
783
|
+
x.singular
|
|
784
|
+
] }),
|
|
785
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
786
|
+
"Convert existing",
|
|
787
|
+
" ",
|
|
788
|
+
x.plural.toLocaleLowerCase(),
|
|
789
|
+
" to quantum-owned"
|
|
790
|
+
] })
|
|
767
791
|
] }) })
|
|
768
792
|
] })
|
|
769
793
|
}
|
|
@@ -775,68 +799,81 @@ const Kt = ({
|
|
|
775
799
|
le,
|
|
776
800
|
{
|
|
777
801
|
placeholder: "Choose a group...",
|
|
778
|
-
options:
|
|
779
|
-
value:
|
|
780
|
-
onChange:
|
|
781
|
-
isLoading:
|
|
782
|
-
isDisabled:
|
|
802
|
+
options: P,
|
|
803
|
+
value: P.find((t) => t.value === m) || null,
|
|
804
|
+
onChange: I,
|
|
805
|
+
isLoading: ee,
|
|
806
|
+
isDisabled: ee,
|
|
783
807
|
isClearable: !0
|
|
784
808
|
}
|
|
785
809
|
),
|
|
786
|
-
|
|
787
|
-
/* @__PURE__ */ e.jsx(
|
|
788
|
-
/* @__PURE__ */ e.jsxs(
|
|
810
|
+
p.error && /* @__PURE__ */ e.jsxs(Ie, { status: "error", mt: 2, children: [
|
|
811
|
+
/* @__PURE__ */ e.jsx(Oe, {}),
|
|
812
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", children: [
|
|
789
813
|
"Failed to load groups: ",
|
|
790
|
-
|
|
814
|
+
p.error.message
|
|
791
815
|
] })
|
|
792
816
|
] })
|
|
793
817
|
] }),
|
|
794
|
-
|
|
818
|
+
m && /* @__PURE__ */ e.jsxs(X, { children: [
|
|
795
819
|
/* @__PURE__ */ e.jsxs(ae, { children: [
|
|
796
|
-
"Select
|
|
820
|
+
"Select ",
|
|
821
|
+
x.plural,
|
|
822
|
+
" to",
|
|
797
823
|
" ",
|
|
798
|
-
|
|
824
|
+
h === "copy" ? "Copy" : "Convert"
|
|
799
825
|
] }),
|
|
800
|
-
|
|
826
|
+
N ? /* @__PURE__ */ e.jsxs(se, { children: [
|
|
801
827
|
/* @__PURE__ */ e.jsx(tt, { size: "sm" }),
|
|
802
|
-
/* @__PURE__ */ e.
|
|
828
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
829
|
+
"Loading ",
|
|
830
|
+
x.pluralLowerCase,
|
|
831
|
+
"..."
|
|
832
|
+
] })
|
|
803
833
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
804
834
|
/* @__PURE__ */ e.jsx(
|
|
805
835
|
le,
|
|
806
836
|
{
|
|
807
|
-
placeholder: `Choose
|
|
808
|
-
options:
|
|
809
|
-
value:
|
|
810
|
-
(
|
|
837
|
+
placeholder: `Choose ${x.pluralLowerCase} to ${h}...`,
|
|
838
|
+
options: Q,
|
|
839
|
+
value: Q.filter(
|
|
840
|
+
(t) => b.includes(t.value)
|
|
811
841
|
),
|
|
812
|
-
onChange:
|
|
813
|
-
isDisabled:
|
|
842
|
+
onChange: y,
|
|
843
|
+
isDisabled: Q.length === 0,
|
|
814
844
|
isClearable: !0,
|
|
815
845
|
isMulti: !0,
|
|
816
846
|
closeMenuOnSelect: !1,
|
|
817
|
-
formatOptionLabel: (
|
|
847
|
+
formatOptionLabel: (t, { context: u }) => /* @__PURE__ */ e.jsxs(se, { justify: "space-between", w: "100%", children: [
|
|
818
848
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
819
|
-
/* @__PURE__ */ e.jsx(
|
|
820
|
-
|
|
849
|
+
/* @__PURE__ */ e.jsx(C, { children: t.label }),
|
|
850
|
+
u === "value" && t.isQuantumOwned && /* @__PURE__ */ e.jsx(C, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
|
|
821
851
|
] }),
|
|
822
|
-
|
|
852
|
+
t.isQuantumOwned && u === "menu" && /* @__PURE__ */ e.jsx(be, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
|
|
823
853
|
] })
|
|
824
854
|
}
|
|
825
855
|
),
|
|
826
|
-
|
|
856
|
+
Q.length === 0 && /* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.500", mt: 2, children: [
|
|
857
|
+
"No ",
|
|
858
|
+
x.pluralLowerCase,
|
|
859
|
+
" found"
|
|
860
|
+
] })
|
|
827
861
|
] }),
|
|
828
|
-
|
|
829
|
-
/* @__PURE__ */ e.jsx(
|
|
830
|
-
/* @__PURE__ */ e.jsxs(
|
|
831
|
-
"Failed to load
|
|
832
|
-
|
|
862
|
+
L.error && /* @__PURE__ */ e.jsxs(Ie, { status: "error", mt: 2, children: [
|
|
863
|
+
/* @__PURE__ */ e.jsx(Oe, {}),
|
|
864
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", children: [
|
|
865
|
+
"Failed to load ",
|
|
866
|
+
x.pluralLowerCase,
|
|
867
|
+
":",
|
|
868
|
+
" ",
|
|
869
|
+
L.error.message
|
|
833
870
|
] })
|
|
834
871
|
] })
|
|
835
872
|
] }),
|
|
836
|
-
|
|
837
|
-
/* @__PURE__ */ e.jsx(
|
|
838
|
-
/* @__PURE__ */ e.jsxs(
|
|
839
|
-
|
|
873
|
+
T.length > 0 && /* @__PURE__ */ e.jsxs(Z, { p: 4, bg: "gray.50", borderRadius: "md", children: [
|
|
874
|
+
/* @__PURE__ */ e.jsx(C, { fontWeight: "semibold", mb: 3, children: T.length === 1 ? `${x.singular} to ${h === "copy" ? "Copy" : "Convert"}:` : `${T.length} ${x.plural} to ${h === "copy" ? "Copy" : "Convert"}:` }),
|
|
875
|
+
/* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 3, children: [
|
|
876
|
+
T.map((t, u) => /* @__PURE__ */ e.jsxs(
|
|
840
877
|
Z,
|
|
841
878
|
{
|
|
842
879
|
w: "100%",
|
|
@@ -846,60 +883,60 @@ const Kt = ({
|
|
|
846
883
|
border: "1px solid",
|
|
847
884
|
borderColor: "gray.200",
|
|
848
885
|
children: [
|
|
849
|
-
/* @__PURE__ */ e.jsxs(
|
|
850
|
-
/* @__PURE__ */ e.jsxs(
|
|
851
|
-
|
|
886
|
+
/* @__PURE__ */ e.jsxs(se, { justify: "space-between", align: "start", mb: 2, children: [
|
|
887
|
+
/* @__PURE__ */ e.jsxs(C, { fontWeight: "medium", fontSize: "sm", children: [
|
|
888
|
+
u + 1,
|
|
852
889
|
". ",
|
|
853
|
-
|
|
890
|
+
t.name
|
|
854
891
|
] }),
|
|
855
|
-
|
|
892
|
+
t.quantumOwned && /* @__PURE__ */ e.jsx(be, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
|
|
856
893
|
] }),
|
|
857
894
|
/* @__PURE__ */ e.jsxs(
|
|
858
|
-
|
|
895
|
+
ne,
|
|
859
896
|
{
|
|
860
897
|
align: "start",
|
|
861
898
|
spacing: 1,
|
|
862
899
|
fontSize: "sm",
|
|
863
900
|
color: "gray.600",
|
|
864
901
|
children: [
|
|
865
|
-
|
|
902
|
+
t.description && /* @__PURE__ */ e.jsxs(C, { children: [
|
|
866
903
|
/* @__PURE__ */ e.jsx("strong", { children: "Description:" }),
|
|
867
904
|
" ",
|
|
868
|
-
|
|
905
|
+
t.description
|
|
869
906
|
] }),
|
|
870
|
-
/* @__PURE__ */ e.jsxs(
|
|
907
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
871
908
|
/* @__PURE__ */ e.jsx("strong", { children: "Type:" }),
|
|
872
909
|
" ",
|
|
873
|
-
|
|
910
|
+
t.activityKind
|
|
874
911
|
] }),
|
|
875
|
-
/* @__PURE__ */ e.jsxs(
|
|
912
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
876
913
|
/* @__PURE__ */ e.jsx("strong", { children: "Laterality:" }),
|
|
877
914
|
" ",
|
|
878
|
-
|
|
915
|
+
t.laterality
|
|
879
916
|
] }),
|
|
880
|
-
/* @__PURE__ */ e.jsxs(
|
|
917
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
881
918
|
/* @__PURE__ */ e.jsx("strong", { children: "Sensor Locations:" }),
|
|
882
919
|
" ",
|
|
883
|
-
|
|
920
|
+
t.sensorLocations.length
|
|
884
921
|
] }),
|
|
885
|
-
/* @__PURE__ */ e.jsxs(
|
|
922
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
886
923
|
/* @__PURE__ */ e.jsx("strong", { children: "Thresholds:" }),
|
|
887
924
|
" ",
|
|
888
|
-
|
|
925
|
+
t.thresholds.length
|
|
889
926
|
] }),
|
|
890
|
-
/* @__PURE__ */ e.jsxs(
|
|
927
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
891
928
|
/* @__PURE__ */ e.jsx("strong", { children: "Use Cases:" }),
|
|
892
929
|
" ",
|
|
893
|
-
|
|
930
|
+
t.useCases.map((A) => A.name).join(", ") || "None"
|
|
894
931
|
] })
|
|
895
932
|
]
|
|
896
933
|
}
|
|
897
934
|
)
|
|
898
935
|
]
|
|
899
936
|
},
|
|
900
|
-
|
|
937
|
+
t.id
|
|
901
938
|
)),
|
|
902
|
-
|
|
939
|
+
T.length > 1 && /* @__PURE__ */ e.jsx(
|
|
903
940
|
Z,
|
|
904
941
|
{
|
|
905
942
|
w: "100%",
|
|
@@ -908,23 +945,25 @@ const Kt = ({
|
|
|
908
945
|
borderRadius: "md",
|
|
909
946
|
border: "1px solid",
|
|
910
947
|
borderColor: "blue.200",
|
|
911
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
948
|
+
children: /* @__PURE__ */ e.jsxs(C, { fontSize: "sm", fontWeight: "medium", color: "blue.800", children: [
|
|
912
949
|
"Total: ",
|
|
913
|
-
|
|
914
|
-
" activities will be",
|
|
950
|
+
T.length,
|
|
915
951
|
" ",
|
|
916
|
-
|
|
952
|
+
x.pluralLowerCase,
|
|
953
|
+
" will be",
|
|
954
|
+
" ",
|
|
955
|
+
h === "copy" ? "copied" : "converted"
|
|
917
956
|
] })
|
|
918
957
|
}
|
|
919
958
|
)
|
|
920
959
|
] })
|
|
921
960
|
] }),
|
|
922
|
-
!
|
|
961
|
+
!c && /* @__PURE__ */ e.jsxs(fe, { spacing: 4, justifyContent: "flex-end", children: [
|
|
923
962
|
/* @__PURE__ */ e.jsx(
|
|
924
963
|
K,
|
|
925
964
|
{
|
|
926
965
|
variant: "outline",
|
|
927
|
-
onClick:
|
|
966
|
+
onClick: w,
|
|
928
967
|
isDisabled: f,
|
|
929
968
|
children: "Cancel"
|
|
930
969
|
}
|
|
@@ -932,253 +971,257 @@ const Kt = ({
|
|
|
932
971
|
/* @__PURE__ */ e.jsxs(
|
|
933
972
|
K,
|
|
934
973
|
{
|
|
935
|
-
colorScheme:
|
|
936
|
-
onClick:
|
|
937
|
-
isDisabled:
|
|
974
|
+
colorScheme: h === "copy" ? "blue" : "green",
|
|
975
|
+
onClick: V,
|
|
976
|
+
isDisabled: T.length === 0 || f,
|
|
938
977
|
isLoading: f,
|
|
939
|
-
loadingText: `${
|
|
978
|
+
loadingText: `${h === "copy" ? "Copying" : "Converting"}...`,
|
|
940
979
|
children: [
|
|
941
|
-
|
|
980
|
+
h === "copy" ? "Copy" : "Convert",
|
|
942
981
|
" ",
|
|
943
|
-
|
|
982
|
+
T.length === 1 ? x.singular : `${T.length} ${x.plural}`
|
|
944
983
|
]
|
|
945
984
|
}
|
|
946
985
|
)
|
|
947
986
|
] })
|
|
948
987
|
] }) });
|
|
949
|
-
},
|
|
950
|
-
onSave:
|
|
951
|
-
onCancel:
|
|
952
|
-
onError:
|
|
953
|
-
hideButtons:
|
|
954
|
-
setButtonDisabled:
|
|
955
|
-
setButtonOnClick:
|
|
956
|
-
quantumOwned:
|
|
988
|
+
}, Pn = ({
|
|
989
|
+
onSave: s,
|
|
990
|
+
onCancel: n,
|
|
991
|
+
onError: o,
|
|
992
|
+
hideButtons: c = !1,
|
|
993
|
+
setButtonDisabled: d,
|
|
994
|
+
setButtonOnClick: a,
|
|
995
|
+
quantumOwned: l
|
|
957
996
|
}) => {
|
|
958
|
-
const
|
|
997
|
+
const g = Ve(), { getLabel: i } = ke(), [x, h] = z(""), [M, m] = z([]), [S, b] = z(!1), [r, f] = z("copy"), [v] = de({
|
|
959
998
|
query: nt
|
|
960
|
-
}), [
|
|
999
|
+
}), [p] = de({
|
|
961
1000
|
query: Rt,
|
|
962
|
-
variables: { groupId:
|
|
963
|
-
pause: !
|
|
1001
|
+
variables: { groupId: x },
|
|
1002
|
+
pause: !x
|
|
964
1003
|
// Only run when group is selected
|
|
965
|
-
}), [,
|
|
1004
|
+
}), [, L] = ie(ot), [, F] = ie(it), [, G] = ie(_e), [, U] = ie(
|
|
966
1005
|
st
|
|
967
|
-
),
|
|
968
|
-
(
|
|
969
|
-
) : [], [
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
).map((
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
|
|
1006
|
+
), D = k(() => v.data?.groups ? v.data.groups.map(
|
|
1007
|
+
(t) => $(rt, t)
|
|
1008
|
+
) : [], [v.data]), T = k(() => p.data?.modules ? $(
|
|
1009
|
+
Le,
|
|
1010
|
+
p.data?.modules
|
|
1011
|
+
).map((u) => {
|
|
1012
|
+
const A = $(
|
|
1013
|
+
at,
|
|
1014
|
+
u.moduleActions
|
|
976
1015
|
);
|
|
977
1016
|
return {
|
|
978
|
-
...
|
|
979
|
-
moduleActions:
|
|
980
|
-
...
|
|
981
|
-
action: $(ue,
|
|
1017
|
+
...u,
|
|
1018
|
+
moduleActions: A.map((J) => ({
|
|
1019
|
+
...J,
|
|
1020
|
+
action: $(ue, J.action)
|
|
982
1021
|
})),
|
|
983
1022
|
categories: $(
|
|
984
|
-
|
|
985
|
-
|
|
1023
|
+
ve,
|
|
1024
|
+
u.categories
|
|
986
1025
|
)
|
|
987
1026
|
};
|
|
988
|
-
}) : [], [
|
|
989
|
-
(
|
|
990
|
-
), [
|
|
991
|
-
(
|
|
992
|
-
const
|
|
993
|
-
|
|
1027
|
+
}) : [], [p.data]), I = k(() => T.filter(
|
|
1028
|
+
(t) => M.includes(t.id)
|
|
1029
|
+
), [T, M]), y = R(
|
|
1030
|
+
(t) => {
|
|
1031
|
+
const u = t?.value || "";
|
|
1032
|
+
h(u), m([]);
|
|
994
1033
|
},
|
|
995
1034
|
[]
|
|
996
1035
|
), E = R(
|
|
997
|
-
(
|
|
998
|
-
const
|
|
999
|
-
|
|
1036
|
+
(t) => {
|
|
1037
|
+
const u = t.map((A) => A.value);
|
|
1038
|
+
m(u);
|
|
1000
1039
|
},
|
|
1001
1040
|
[]
|
|
1002
|
-
),
|
|
1003
|
-
if (
|
|
1004
|
-
|
|
1005
|
-
const
|
|
1006
|
-
`No modules selected for ${
|
|
1041
|
+
), O = R(async () => {
|
|
1042
|
+
if (b(!0), !I.length) {
|
|
1043
|
+
b(!1);
|
|
1044
|
+
const t = new Error(
|
|
1045
|
+
`No modules selected for ${r === "convert" ? "converting" : "copying"}`
|
|
1007
1046
|
);
|
|
1008
|
-
|
|
1047
|
+
o?.(t);
|
|
1009
1048
|
return;
|
|
1010
1049
|
}
|
|
1011
1050
|
try {
|
|
1012
|
-
const
|
|
1013
|
-
let
|
|
1014
|
-
for (const
|
|
1051
|
+
const t = [];
|
|
1052
|
+
let u = 0;
|
|
1053
|
+
for (const A of I)
|
|
1015
1054
|
try {
|
|
1016
|
-
let
|
|
1017
|
-
if (
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
if (
|
|
1055
|
+
let J = A.moduleActions.map((q) => q.actionId);
|
|
1056
|
+
if (l) {
|
|
1057
|
+
const q = A.moduleActions.map((j) => j.action), _ = async (j) => {
|
|
1058
|
+
if (r === "copy") {
|
|
1059
|
+
if (j.quantumOwned) return j;
|
|
1021
1060
|
const H = $(
|
|
1022
|
-
|
|
1023
|
-
|
|
1061
|
+
ve,
|
|
1062
|
+
j.categories
|
|
1024
1063
|
), oe = {
|
|
1025
|
-
...
|
|
1064
|
+
...j,
|
|
1026
1065
|
quantumOwned: !0,
|
|
1027
|
-
thresholds:
|
|
1066
|
+
thresholds: j.thresholds.map((he) => ({
|
|
1028
1067
|
...he,
|
|
1029
1068
|
id: void 0
|
|
1030
1069
|
})),
|
|
1031
1070
|
categories: H?.map((he) => he.id),
|
|
1032
1071
|
id: void 0
|
|
1033
|
-
},
|
|
1034
|
-
return
|
|
1072
|
+
}, te = await G({ fields: oe });
|
|
1073
|
+
return te.error || !te.data?.createAction ? null : $(
|
|
1035
1074
|
ue,
|
|
1036
|
-
|
|
1075
|
+
te.data.createAction
|
|
1037
1076
|
);
|
|
1038
1077
|
}
|
|
1039
|
-
if (
|
|
1040
|
-
const
|
|
1041
|
-
id:
|
|
1078
|
+
if (j.quantumOwned) return j;
|
|
1079
|
+
const B = await U({
|
|
1080
|
+
id: j.id
|
|
1042
1081
|
});
|
|
1043
|
-
return
|
|
1082
|
+
return B.error || !B.data?.convertActionToQuantumOwned ? null : $(
|
|
1044
1083
|
ue,
|
|
1045
|
-
|
|
1084
|
+
B.data.convertActionToQuantumOwned
|
|
1046
1085
|
);
|
|
1047
1086
|
};
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
)).filter((
|
|
1087
|
+
J = (await Promise.all(
|
|
1088
|
+
q.map(_)
|
|
1089
|
+
)).filter((j) => !!j).map((j) => j.id);
|
|
1051
1090
|
}
|
|
1052
|
-
if (
|
|
1053
|
-
const
|
|
1054
|
-
name:
|
|
1055
|
-
description:
|
|
1056
|
-
actions:
|
|
1057
|
-
categories:
|
|
1091
|
+
if (r === "convert") {
|
|
1092
|
+
const q = {
|
|
1093
|
+
name: A.name,
|
|
1094
|
+
description: A.description || void 0,
|
|
1095
|
+
actions: J,
|
|
1096
|
+
categories: A.categories.map((Y) => Y.id),
|
|
1058
1097
|
quantumOwned: !0
|
|
1059
|
-
},
|
|
1060
|
-
id:
|
|
1061
|
-
input:
|
|
1098
|
+
}, _ = await F({
|
|
1099
|
+
id: A.id,
|
|
1100
|
+
input: q
|
|
1062
1101
|
});
|
|
1063
|
-
if (
|
|
1064
|
-
if (
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1067
|
-
|
|
1102
|
+
if (_.error) throw new Error(_.error.message);
|
|
1103
|
+
if (_.data?.updateModule) {
|
|
1104
|
+
const Y = $(
|
|
1105
|
+
Le,
|
|
1106
|
+
_.data.updateModule
|
|
1068
1107
|
);
|
|
1069
|
-
|
|
1108
|
+
t.push(Y);
|
|
1070
1109
|
}
|
|
1071
1110
|
} else {
|
|
1072
|
-
const
|
|
1073
|
-
name: `${
|
|
1074
|
-
description:
|
|
1075
|
-
actions:
|
|
1076
|
-
categories:
|
|
1077
|
-
quantumOwned:
|
|
1078
|
-
},
|
|
1079
|
-
if (
|
|
1080
|
-
if (
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
|
|
1111
|
+
const q = {
|
|
1112
|
+
name: `${A.name} (Copy)`,
|
|
1113
|
+
description: A.description || void 0,
|
|
1114
|
+
actions: J,
|
|
1115
|
+
categories: A.categories.map((Y) => Y.id),
|
|
1116
|
+
quantumOwned: l
|
|
1117
|
+
}, _ = await L({ input: q });
|
|
1118
|
+
if (_.error) throw new Error(_.error.message);
|
|
1119
|
+
if (_.data?.createModule) {
|
|
1120
|
+
const Y = $(
|
|
1121
|
+
Le,
|
|
1122
|
+
_.data.createModule
|
|
1084
1123
|
);
|
|
1085
|
-
|
|
1124
|
+
t.push(Y);
|
|
1086
1125
|
}
|
|
1087
1126
|
}
|
|
1088
|
-
} catch (
|
|
1127
|
+
} catch (J) {
|
|
1089
1128
|
console.error(
|
|
1090
|
-
`Failed to ${
|
|
1091
|
-
|
|
1092
|
-
),
|
|
1129
|
+
`Failed to ${r === "convert" ? "convert" : "copy"} module "${A.name}":`,
|
|
1130
|
+
J
|
|
1131
|
+
), u++;
|
|
1093
1132
|
}
|
|
1094
|
-
if (
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
title:
|
|
1098
|
-
description:
|
|
1099
|
-
status:
|
|
1133
|
+
if (t.length > 0) {
|
|
1134
|
+
const A = t.length, J = I.length;
|
|
1135
|
+
g({
|
|
1136
|
+
title: u > 0 ? `Partial ${r === "convert" ? "convert" : "copy"} completed` : `Modules ${r === "convert" ? "converted" : "copied"} successfully`,
|
|
1137
|
+
description: u > 0 ? `${A} of ${J} modules ${r === "convert" ? "converted" : "copied"} successfully` : `${A} module${A > 1 ? "s" : ""} ${r === "convert" ? "converted" : "copied"} successfully`,
|
|
1138
|
+
status: u > 0 ? "warning" : "success",
|
|
1100
1139
|
duration: 3e3,
|
|
1101
1140
|
isClosable: !0
|
|
1102
|
-
}),
|
|
1141
|
+
}), t.length > 0 && s?.(), h(""), m([]);
|
|
1103
1142
|
} else
|
|
1104
1143
|
throw new Error(
|
|
1105
|
-
`Failed to ${
|
|
1144
|
+
`Failed to ${r === "convert" ? "convert" : "copy"} any modules`
|
|
1106
1145
|
);
|
|
1107
|
-
} catch (
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
title:
|
|
1111
|
-
description:
|
|
1146
|
+
} catch (t) {
|
|
1147
|
+
const u = t instanceof Error ? t.message : `Failed to ${r === "convert" ? "convert" : "copy"} modules`;
|
|
1148
|
+
g({
|
|
1149
|
+
title: r === "convert" ? "Convert failed" : "Copy failed",
|
|
1150
|
+
description: u,
|
|
1112
1151
|
status: "error",
|
|
1113
1152
|
duration: 5e3,
|
|
1114
1153
|
isClosable: !0
|
|
1115
|
-
}),
|
|
1154
|
+
}), o?.(t instanceof Error ? t : new Error(u));
|
|
1116
1155
|
} finally {
|
|
1117
|
-
|
|
1156
|
+
b(!1);
|
|
1118
1157
|
}
|
|
1119
1158
|
}, [
|
|
1120
|
-
N,
|
|
1121
|
-
M,
|
|
1122
|
-
F,
|
|
1123
|
-
p,
|
|
1124
|
-
n,
|
|
1125
|
-
r,
|
|
1126
|
-
c,
|
|
1127
|
-
z,
|
|
1128
1159
|
I,
|
|
1129
|
-
|
|
1160
|
+
L,
|
|
1161
|
+
F,
|
|
1162
|
+
g,
|
|
1163
|
+
s,
|
|
1164
|
+
o,
|
|
1165
|
+
l,
|
|
1166
|
+
G,
|
|
1167
|
+
U,
|
|
1168
|
+
r
|
|
1130
1169
|
]), V = R(() => {
|
|
1131
|
-
|
|
1132
|
-
}, [
|
|
1133
|
-
|
|
1134
|
-
|
|
1170
|
+
h(""), m([]), f("copy"), n?.();
|
|
1171
|
+
}, [n]);
|
|
1172
|
+
re(() => {
|
|
1173
|
+
d && d({
|
|
1135
1174
|
cancelButton: !1,
|
|
1136
|
-
saveButton:
|
|
1175
|
+
saveButton: I.length === 0 || S
|
|
1137
1176
|
});
|
|
1138
|
-
}, [
|
|
1139
|
-
|
|
1177
|
+
}, [I.length, S, d]), re(() => {
|
|
1178
|
+
a && a({
|
|
1140
1179
|
cancelButton: V,
|
|
1141
|
-
saveButton:
|
|
1180
|
+
saveButton: O
|
|
1142
1181
|
});
|
|
1143
|
-
}, [
|
|
1144
|
-
const w =
|
|
1145
|
-
value:
|
|
1146
|
-
label:
|
|
1147
|
-
})), [
|
|
1148
|
-
value:
|
|
1149
|
-
label:
|
|
1182
|
+
}, [a, V, O]);
|
|
1183
|
+
const w = k(() => D.map((t) => ({
|
|
1184
|
+
value: t.id,
|
|
1185
|
+
label: t.name
|
|
1186
|
+
})), [D]), P = k(() => T.filter((t) => r === "copy" ? !0 : !t.quantumOwned).map((t) => ({
|
|
1187
|
+
value: t.id,
|
|
1188
|
+
label: t.name,
|
|
1150
1189
|
// Add custom data to identify quantum-owned modules
|
|
1151
|
-
isQuantumOwned:
|
|
1152
|
-
})), [
|
|
1153
|
-
|
|
1154
|
-
|
|
1190
|
+
isQuantumOwned: t.quantumOwned
|
|
1191
|
+
})), [T, r]), Q = v.fetching, ee = p.fetching, N = k(() => ({
|
|
1192
|
+
singular: i("module"),
|
|
1193
|
+
plural: i("module_plural"),
|
|
1194
|
+
pluralLowerCase: i("module_plural").toLowerCase(),
|
|
1195
|
+
singularLowerCase: i("module").toLowerCase()
|
|
1196
|
+
}), [i]);
|
|
1197
|
+
return /* @__PURE__ */ e.jsx(Z, { children: /* @__PURE__ */ e.jsxs(ne, { spacing: 6, align: "stretch", children: [
|
|
1198
|
+
l && /* @__PURE__ */ e.jsxs(X, { children: [
|
|
1155
1199
|
/* @__PURE__ */ e.jsx(ae, { children: "Operation Mode" }),
|
|
1156
1200
|
/* @__PURE__ */ e.jsx(
|
|
1157
1201
|
et,
|
|
1158
1202
|
{
|
|
1159
|
-
value:
|
|
1160
|
-
onChange: (
|
|
1161
|
-
|
|
1203
|
+
value: r,
|
|
1204
|
+
onChange: (t) => {
|
|
1205
|
+
f(t), m([]);
|
|
1162
1206
|
},
|
|
1163
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1164
|
-
/* @__PURE__ */ e.jsx(
|
|
1165
|
-
/* @__PURE__ */ e.jsxs(
|
|
1207
|
+
children: /* @__PURE__ */ e.jsxs(se, { spacing: 6, children: [
|
|
1208
|
+
/* @__PURE__ */ e.jsx(Te, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 1, children: [
|
|
1209
|
+
/* @__PURE__ */ e.jsxs(C, { fontWeight: "medium", children: [
|
|
1166
1210
|
"Copy ",
|
|
1167
|
-
|
|
1168
|
-
"s"
|
|
1211
|
+
N.plural
|
|
1169
1212
|
] }),
|
|
1170
|
-
/* @__PURE__ */ e.jsxs(
|
|
1213
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
1171
1214
|
"Create new ",
|
|
1172
|
-
|
|
1173
|
-
"
|
|
1215
|
+
N.pluralLowerCase,
|
|
1216
|
+
" based on selected ones"
|
|
1174
1217
|
] })
|
|
1175
1218
|
] }) }),
|
|
1176
|
-
/* @__PURE__ */ e.jsx(
|
|
1177
|
-
/* @__PURE__ */ e.jsx(
|
|
1178
|
-
/* @__PURE__ */ e.jsxs(
|
|
1219
|
+
/* @__PURE__ */ e.jsx(Te, { value: "convert", colorScheme: "green", children: /* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 1, children: [
|
|
1220
|
+
/* @__PURE__ */ e.jsx(C, { fontWeight: "medium", children: "Convert to Quantum Owned" }),
|
|
1221
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
1179
1222
|
"Convert existing ",
|
|
1180
|
-
|
|
1181
|
-
"
|
|
1223
|
+
N.pluralLowerCase,
|
|
1224
|
+
" to quantum-owned"
|
|
1182
1225
|
] })
|
|
1183
1226
|
] }) })
|
|
1184
1227
|
] })
|
|
@@ -1192,74 +1235,74 @@ const Kt = ({
|
|
|
1192
1235
|
{
|
|
1193
1236
|
placeholder: "Choose a group...",
|
|
1194
1237
|
options: w,
|
|
1195
|
-
value: w.find((
|
|
1196
|
-
onChange:
|
|
1197
|
-
isLoading:
|
|
1198
|
-
isDisabled:
|
|
1238
|
+
value: w.find((t) => t.value === x) || null,
|
|
1239
|
+
onChange: y,
|
|
1240
|
+
isLoading: Q,
|
|
1241
|
+
isDisabled: Q,
|
|
1199
1242
|
isClearable: !0
|
|
1200
1243
|
}
|
|
1201
1244
|
),
|
|
1202
|
-
|
|
1203
|
-
/* @__PURE__ */ e.jsx(
|
|
1204
|
-
/* @__PURE__ */ e.jsxs(
|
|
1245
|
+
v.error && /* @__PURE__ */ e.jsxs(Ie, { status: "error", mt: 2, children: [
|
|
1246
|
+
/* @__PURE__ */ e.jsx(Oe, {}),
|
|
1247
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", children: [
|
|
1205
1248
|
"Failed to load groups: ",
|
|
1206
|
-
|
|
1249
|
+
v.error.message
|
|
1207
1250
|
] })
|
|
1208
1251
|
] })
|
|
1209
1252
|
] }),
|
|
1210
|
-
|
|
1211
|
-
/* @__PURE__ */ e.jsx(ae, { children:
|
|
1212
|
-
|
|
1253
|
+
x && /* @__PURE__ */ e.jsxs(X, { children: [
|
|
1254
|
+
/* @__PURE__ */ e.jsx(ae, { children: r === "convert" ? `Select ${N.plural} to Convert` : `Select ${N.plural} to Copy` }),
|
|
1255
|
+
ee ? /* @__PURE__ */ e.jsxs(se, { children: [
|
|
1213
1256
|
/* @__PURE__ */ e.jsx(tt, { size: "sm" }),
|
|
1214
|
-
/* @__PURE__ */ e.jsxs(
|
|
1257
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.600", children: [
|
|
1215
1258
|
"Loading ",
|
|
1216
|
-
|
|
1217
|
-
"
|
|
1259
|
+
N.pluralLowerCase,
|
|
1260
|
+
"..."
|
|
1218
1261
|
] })
|
|
1219
1262
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1220
1263
|
/* @__PURE__ */ e.jsx(
|
|
1221
1264
|
le,
|
|
1222
1265
|
{
|
|
1223
|
-
placeholder:
|
|
1266
|
+
placeholder: r === "convert" ? `Choose ${N.pluralLowerCase} to convert...` : `Choose ${N.pluralLowerCase} to copy...`,
|
|
1224
1267
|
options: P,
|
|
1225
1268
|
value: P.filter(
|
|
1226
|
-
(
|
|
1269
|
+
(t) => M.includes(t.value)
|
|
1227
1270
|
),
|
|
1228
1271
|
onChange: E,
|
|
1229
1272
|
isDisabled: P.length === 0,
|
|
1230
1273
|
isClearable: !0,
|
|
1231
1274
|
isMulti: !0,
|
|
1232
1275
|
closeMenuOnSelect: !1,
|
|
1233
|
-
formatOptionLabel: (
|
|
1276
|
+
formatOptionLabel: (t, { context: u }) => /* @__PURE__ */ e.jsxs(se, { justify: "space-between", w: "100%", children: [
|
|
1234
1277
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1235
|
-
/* @__PURE__ */ e.jsx(
|
|
1236
|
-
|
|
1278
|
+
/* @__PURE__ */ e.jsx(C, { children: t.label }),
|
|
1279
|
+
u === "value" && t.isQuantumOwned && /* @__PURE__ */ e.jsx(C, { color: "blue", fontSize: "xs", children: "(Quantum Owned)" })
|
|
1237
1280
|
] }),
|
|
1238
|
-
|
|
1281
|
+
t.isQuantumOwned && u === "menu" && /* @__PURE__ */ e.jsx(be, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
|
|
1239
1282
|
] })
|
|
1240
1283
|
}
|
|
1241
1284
|
),
|
|
1242
|
-
P.length === 0 && /* @__PURE__ */ e.jsxs(
|
|
1285
|
+
P.length === 0 && /* @__PURE__ */ e.jsxs(C, { fontSize: "sm", color: "gray.500", mt: 2, children: [
|
|
1243
1286
|
"No ",
|
|
1244
|
-
|
|
1245
|
-
"
|
|
1287
|
+
N.pluralLowerCase,
|
|
1288
|
+
" found in this group"
|
|
1246
1289
|
] })
|
|
1247
1290
|
] }),
|
|
1248
|
-
|
|
1249
|
-
/* @__PURE__ */ e.jsx(
|
|
1250
|
-
/* @__PURE__ */ e.jsxs(
|
|
1291
|
+
p.error && /* @__PURE__ */ e.jsxs(Ie, { status: "error", mt: 2, children: [
|
|
1292
|
+
/* @__PURE__ */ e.jsx(Oe, {}),
|
|
1293
|
+
/* @__PURE__ */ e.jsxs(C, { fontSize: "sm", children: [
|
|
1251
1294
|
"Failed to load ",
|
|
1252
|
-
|
|
1253
|
-
"
|
|
1295
|
+
N.pluralLowerCase,
|
|
1296
|
+
":",
|
|
1254
1297
|
" ",
|
|
1255
|
-
|
|
1298
|
+
p.error.message
|
|
1256
1299
|
] })
|
|
1257
1300
|
] })
|
|
1258
1301
|
] }),
|
|
1259
|
-
|
|
1260
|
-
/* @__PURE__ */ e.jsx(
|
|
1261
|
-
/* @__PURE__ */ e.jsxs(
|
|
1262
|
-
|
|
1302
|
+
I.length > 0 && /* @__PURE__ */ e.jsxs(Z, { p: 4, bg: "gray.50", borderRadius: "md", children: [
|
|
1303
|
+
/* @__PURE__ */ e.jsx(C, { fontWeight: "semibold", mb: 3, children: I.length === 1 ? `${N.singular} to ${r === "copy" ? "Copy" : "Convert"}` : `${I.length} ${N.plural} to ${r === "copy" ? "Copy" : "Convert"}` }),
|
|
1304
|
+
/* @__PURE__ */ e.jsxs(ne, { align: "start", spacing: 3, children: [
|
|
1305
|
+
I.map((t, u) => /* @__PURE__ */ e.jsxs(
|
|
1263
1306
|
Z,
|
|
1264
1307
|
{
|
|
1265
1308
|
w: "100%",
|
|
@@ -1269,45 +1312,45 @@ const Kt = ({
|
|
|
1269
1312
|
border: "1px solid",
|
|
1270
1313
|
borderColor: "gray.200",
|
|
1271
1314
|
children: [
|
|
1272
|
-
/* @__PURE__ */ e.jsxs(
|
|
1273
|
-
/* @__PURE__ */ e.jsxs(
|
|
1274
|
-
|
|
1315
|
+
/* @__PURE__ */ e.jsxs(se, { justify: "space-between", align: "start", mb: 2, children: [
|
|
1316
|
+
/* @__PURE__ */ e.jsxs(C, { fontWeight: "medium", fontSize: "sm", children: [
|
|
1317
|
+
u + 1,
|
|
1275
1318
|
". ",
|
|
1276
|
-
|
|
1319
|
+
t.name
|
|
1277
1320
|
] }),
|
|
1278
|
-
|
|
1321
|
+
t.quantumOwned && /* @__PURE__ */ e.jsx(be, { size: "sm", colorScheme: "blue", variant: "solid", children: "Quantum Owned" })
|
|
1279
1322
|
] }),
|
|
1280
1323
|
/* @__PURE__ */ e.jsxs(
|
|
1281
|
-
|
|
1324
|
+
ne,
|
|
1282
1325
|
{
|
|
1283
1326
|
align: "start",
|
|
1284
1327
|
spacing: 1,
|
|
1285
1328
|
fontSize: "sm",
|
|
1286
1329
|
color: "gray.600",
|
|
1287
1330
|
children: [
|
|
1288
|
-
|
|
1331
|
+
t.description && /* @__PURE__ */ e.jsxs(C, { children: [
|
|
1289
1332
|
/* @__PURE__ */ e.jsx("strong", { children: "Description:" }),
|
|
1290
1333
|
" ",
|
|
1291
|
-
|
|
1334
|
+
t.description
|
|
1292
1335
|
] }),
|
|
1293
|
-
/* @__PURE__ */ e.jsxs(
|
|
1336
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
1294
1337
|
/* @__PURE__ */ e.jsx("strong", { children: "Activities:" }),
|
|
1295
1338
|
" ",
|
|
1296
|
-
|
|
1339
|
+
t.moduleActions.length
|
|
1297
1340
|
] }),
|
|
1298
|
-
/* @__PURE__ */ e.jsxs(
|
|
1341
|
+
/* @__PURE__ */ e.jsxs(C, { children: [
|
|
1299
1342
|
/* @__PURE__ */ e.jsx("strong", { children: "Categories:" }),
|
|
1300
1343
|
" ",
|
|
1301
|
-
|
|
1344
|
+
t.categories.map((A) => A.name).join(", ") || "None"
|
|
1302
1345
|
] })
|
|
1303
1346
|
]
|
|
1304
1347
|
}
|
|
1305
1348
|
)
|
|
1306
1349
|
]
|
|
1307
1350
|
},
|
|
1308
|
-
|
|
1351
|
+
t.id
|
|
1309
1352
|
)),
|
|
1310
|
-
|
|
1353
|
+
I.length > 1 && /* @__PURE__ */ e.jsx(
|
|
1311
1354
|
Z,
|
|
1312
1355
|
{
|
|
1313
1356
|
w: "100%",
|
|
@@ -1316,18 +1359,18 @@ const Kt = ({
|
|
|
1316
1359
|
borderRadius: "md",
|
|
1317
1360
|
border: "1px solid",
|
|
1318
1361
|
borderColor: "blue.200",
|
|
1319
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1362
|
+
children: /* @__PURE__ */ e.jsxs(C, { fontSize: "sm", fontWeight: "medium", color: "blue.800", children: [
|
|
1320
1363
|
"Total: ",
|
|
1321
|
-
|
|
1364
|
+
I.length,
|
|
1322
1365
|
" ",
|
|
1323
|
-
|
|
1366
|
+
N.pluralLowerCase,
|
|
1324
1367
|
"s will be",
|
|
1325
1368
|
" ",
|
|
1326
|
-
|
|
1369
|
+
r === "copy" ? "copied" : "converted"
|
|
1327
1370
|
] })
|
|
1328
1371
|
}
|
|
1329
1372
|
),
|
|
1330
|
-
|
|
1373
|
+
l && I.filter((t) => t.moduleActions.some((u) => !u.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
|
|
1331
1374
|
Z,
|
|
1332
1375
|
{
|
|
1333
1376
|
p: 2,
|
|
@@ -1335,116 +1378,116 @@ const Kt = ({
|
|
|
1335
1378
|
borderRadius: "md",
|
|
1336
1379
|
border: "1px solid",
|
|
1337
1380
|
borderColor: "yellow.200",
|
|
1338
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1381
|
+
children: /* @__PURE__ */ e.jsx(C, { fontSize: "sm", fontWeight: "medium", color: "yellow.800", children: r === "convert" ? `Converting ${N.plural} will convert non QM-Owned Activities to QM-Owned` : `Copying ${N.plural} with Non QM-Owned Activities will create corresponding QM-Owned Activities` })
|
|
1339
1382
|
}
|
|
1340
1383
|
)
|
|
1341
1384
|
] })
|
|
1342
1385
|
] }),
|
|
1343
|
-
!
|
|
1386
|
+
!c && /* @__PURE__ */ e.jsxs(fe, { spacing: 4, justifyContent: "flex-end", children: [
|
|
1344
1387
|
/* @__PURE__ */ e.jsx(
|
|
1345
1388
|
K,
|
|
1346
1389
|
{
|
|
1347
1390
|
variant: "outline",
|
|
1348
1391
|
onClick: V,
|
|
1349
|
-
isDisabled:
|
|
1392
|
+
isDisabled: S,
|
|
1350
1393
|
children: "Cancel"
|
|
1351
1394
|
}
|
|
1352
1395
|
),
|
|
1353
1396
|
/* @__PURE__ */ e.jsxs(
|
|
1354
1397
|
K,
|
|
1355
1398
|
{
|
|
1356
|
-
colorScheme:
|
|
1357
|
-
onClick:
|
|
1358
|
-
isDisabled:
|
|
1359
|
-
isLoading:
|
|
1360
|
-
loadingText: `${
|
|
1399
|
+
colorScheme: r === "copy" ? "blue" : "green",
|
|
1400
|
+
onClick: O,
|
|
1401
|
+
isDisabled: I.length === 0 || S,
|
|
1402
|
+
isLoading: S,
|
|
1403
|
+
loadingText: `${r === "copy" ? "Copying" : "Converting"}...`,
|
|
1361
1404
|
children: [
|
|
1362
|
-
|
|
1405
|
+
r === "copy" ? "Copy" : "Convert",
|
|
1363
1406
|
" ",
|
|
1364
|
-
|
|
1407
|
+
I.length === 1 ? N.singular : `${I.length} ${N.plural}`
|
|
1365
1408
|
]
|
|
1366
1409
|
}
|
|
1367
1410
|
)
|
|
1368
1411
|
] })
|
|
1369
1412
|
] }) });
|
|
1370
1413
|
}, un = ({
|
|
1371
|
-
name:
|
|
1372
|
-
setName:
|
|
1373
|
-
actions:
|
|
1374
|
-
selectedActionIds:
|
|
1375
|
-
setSelectedActionIds:
|
|
1376
|
-
availableCategories:
|
|
1377
|
-
selectedCategoryIds:
|
|
1378
|
-
setSelectedCategoryIds:
|
|
1379
|
-
description:
|
|
1380
|
-
setDescription:
|
|
1381
|
-
...
|
|
1414
|
+
name: s,
|
|
1415
|
+
setName: n,
|
|
1416
|
+
actions: o,
|
|
1417
|
+
selectedActionIds: c,
|
|
1418
|
+
setSelectedActionIds: d,
|
|
1419
|
+
availableCategories: a,
|
|
1420
|
+
selectedCategoryIds: l,
|
|
1421
|
+
setSelectedCategoryIds: g,
|
|
1422
|
+
description: i,
|
|
1423
|
+
setDescription: x,
|
|
1424
|
+
...h
|
|
1382
1425
|
}) => {
|
|
1383
|
-
const
|
|
1384
|
-
...
|
|
1385
|
-
selected:
|
|
1386
|
-
})), [
|
|
1387
|
-
() =>
|
|
1388
|
-
[
|
|
1389
|
-
),
|
|
1390
|
-
(
|
|
1391
|
-
|
|
1426
|
+
const M = jt(), m = k(() => o.map((p) => ({
|
|
1427
|
+
...p,
|
|
1428
|
+
selected: c.includes(p.id)
|
|
1429
|
+
})), [o, c]), S = k(() => o.reduce((p, L) => (p[L.id] = L, p), {}), [o]), b = k(
|
|
1430
|
+
() => c.map((p) => S[p]),
|
|
1431
|
+
[c, S]
|
|
1432
|
+
), r = R(
|
|
1433
|
+
(p, L) => {
|
|
1434
|
+
d(L ? [...c, p.id] : c.filter((F) => F !== p.id));
|
|
1392
1435
|
},
|
|
1393
|
-
[
|
|
1394
|
-
),
|
|
1395
|
-
(
|
|
1396
|
-
|
|
1436
|
+
[c, d]
|
|
1437
|
+
), f = R(
|
|
1438
|
+
(p) => {
|
|
1439
|
+
n(p.target.value);
|
|
1397
1440
|
},
|
|
1398
|
-
[
|
|
1399
|
-
),
|
|
1400
|
-
(
|
|
1401
|
-
|
|
1441
|
+
[n]
|
|
1442
|
+
), v = R(
|
|
1443
|
+
(p) => {
|
|
1444
|
+
x?.(p.target.value);
|
|
1402
1445
|
},
|
|
1403
|
-
[
|
|
1446
|
+
[x]
|
|
1404
1447
|
);
|
|
1405
|
-
return /* @__PURE__ */ e.jsxs(Z, { ...
|
|
1406
|
-
/* @__PURE__ */ e.jsxs(
|
|
1407
|
-
/* @__PURE__ */ e.jsx(hn, { name:
|
|
1448
|
+
return /* @__PURE__ */ e.jsxs(Z, { ...h, children: [
|
|
1449
|
+
/* @__PURE__ */ e.jsxs(se, { gap: "2rem", children: [
|
|
1450
|
+
/* @__PURE__ */ e.jsx(hn, { name: s ?? "", onInputChange: f }),
|
|
1408
1451
|
/* @__PURE__ */ e.jsx(
|
|
1409
1452
|
mn,
|
|
1410
1453
|
{
|
|
1411
|
-
availableCategories:
|
|
1412
|
-
value:
|
|
1413
|
-
onChange:
|
|
1454
|
+
availableCategories: a,
|
|
1455
|
+
value: l,
|
|
1456
|
+
onChange: g
|
|
1414
1457
|
}
|
|
1415
1458
|
)
|
|
1416
1459
|
] }),
|
|
1417
1460
|
/* @__PURE__ */ e.jsx(
|
|
1418
1461
|
pn,
|
|
1419
1462
|
{
|
|
1420
|
-
description:
|
|
1421
|
-
onInputChange:
|
|
1463
|
+
description: i ?? "",
|
|
1464
|
+
onInputChange: v
|
|
1422
1465
|
}
|
|
1423
1466
|
),
|
|
1424
1467
|
/* @__PURE__ */ e.jsx(
|
|
1425
1468
|
gn,
|
|
1426
1469
|
{
|
|
1427
|
-
value:
|
|
1428
|
-
onChange:
|
|
1429
|
-
onAdjustActivities: () =>
|
|
1470
|
+
value: b,
|
|
1471
|
+
onChange: d,
|
|
1472
|
+
onAdjustActivities: () => M.onOpen()
|
|
1430
1473
|
}
|
|
1431
1474
|
),
|
|
1432
1475
|
/* @__PURE__ */ e.jsxs(
|
|
1433
|
-
|
|
1476
|
+
bt,
|
|
1434
1477
|
{
|
|
1435
|
-
isOpen:
|
|
1436
|
-
onClose:
|
|
1478
|
+
isOpen: M.isOpen,
|
|
1479
|
+
onClose: M.onClose,
|
|
1437
1480
|
size: "6xl",
|
|
1438
1481
|
children: [
|
|
1439
|
-
/* @__PURE__ */ e.jsx(
|
|
1482
|
+
/* @__PURE__ */ e.jsx(vt, {}),
|
|
1440
1483
|
/* @__PURE__ */ e.jsxs(yt, { children: [
|
|
1441
1484
|
/* @__PURE__ */ e.jsx(Ct, { children: "Select Activities" }),
|
|
1442
1485
|
/* @__PURE__ */ e.jsx(wt, {}),
|
|
1443
1486
|
/* @__PURE__ */ e.jsx(St, { children: /* @__PURE__ */ e.jsx(
|
|
1444
1487
|
dn,
|
|
1445
1488
|
{
|
|
1446
|
-
actions:
|
|
1447
|
-
onSelected:
|
|
1489
|
+
actions: m,
|
|
1490
|
+
onSelected: r,
|
|
1448
1491
|
disableCreate: !0,
|
|
1449
1492
|
disableDelete: !0,
|
|
1450
1493
|
tableProps: {
|
|
@@ -1453,12 +1496,12 @@ const Kt = ({
|
|
|
1453
1496
|
}
|
|
1454
1497
|
}
|
|
1455
1498
|
) }),
|
|
1456
|
-
/* @__PURE__ */ e.jsx(
|
|
1499
|
+
/* @__PURE__ */ e.jsx(Lt, { children: /* @__PURE__ */ e.jsx(
|
|
1457
1500
|
K,
|
|
1458
1501
|
{
|
|
1459
1502
|
colorScheme: "blue",
|
|
1460
|
-
onClick:
|
|
1461
|
-
isDisabled:
|
|
1503
|
+
onClick: M.onClose,
|
|
1504
|
+
isDisabled: c.length === 0,
|
|
1462
1505
|
children: "Done"
|
|
1463
1506
|
}
|
|
1464
1507
|
) })
|
|
@@ -1467,100 +1510,100 @@ const Kt = ({
|
|
|
1467
1510
|
}
|
|
1468
1511
|
)
|
|
1469
1512
|
] });
|
|
1470
|
-
}, hn =
|
|
1513
|
+
}, hn = Ne(
|
|
1471
1514
|
({
|
|
1472
|
-
name:
|
|
1473
|
-
onInputChange:
|
|
1515
|
+
name: s,
|
|
1516
|
+
onInputChange: n
|
|
1474
1517
|
}) => {
|
|
1475
|
-
const { getLabel:
|
|
1518
|
+
const { getLabel: o } = ke(), c = o("module");
|
|
1476
1519
|
return /* @__PURE__ */ e.jsxs(X, { mb: 4, children: [
|
|
1477
1520
|
/* @__PURE__ */ e.jsxs(ae, { children: [
|
|
1478
|
-
|
|
1521
|
+
c,
|
|
1479
1522
|
" Name"
|
|
1480
1523
|
] }),
|
|
1481
1524
|
/* @__PURE__ */ e.jsx(
|
|
1482
1525
|
je,
|
|
1483
1526
|
{
|
|
1484
1527
|
placeholder: "i.e. ACL RTP Test Battery",
|
|
1485
|
-
value:
|
|
1486
|
-
onChange:
|
|
1528
|
+
value: s,
|
|
1529
|
+
onChange: n,
|
|
1487
1530
|
isRequired: !0
|
|
1488
1531
|
}
|
|
1489
1532
|
)
|
|
1490
1533
|
] });
|
|
1491
1534
|
}
|
|
1492
|
-
), mn =
|
|
1535
|
+
), mn = Ne(
|
|
1493
1536
|
({
|
|
1494
|
-
availableCategories:
|
|
1495
|
-
value:
|
|
1496
|
-
onChange:
|
|
1537
|
+
availableCategories: s,
|
|
1538
|
+
value: n,
|
|
1539
|
+
onChange: o
|
|
1497
1540
|
}) => {
|
|
1498
|
-
const { getLabel:
|
|
1499
|
-
...
|
|
1541
|
+
const { getLabel: c } = ke(), d = c("module"), a = k(() => [
|
|
1542
|
+
...s,
|
|
1500
1543
|
{
|
|
1501
1544
|
id: "other",
|
|
1502
1545
|
name: "Other"
|
|
1503
1546
|
}
|
|
1504
|
-
], [
|
|
1505
|
-
value:
|
|
1506
|
-
label:
|
|
1507
|
-
})), [
|
|
1547
|
+
], [s]), l = k(() => a.map((g) => ({
|
|
1548
|
+
value: g.id,
|
|
1549
|
+
label: g.name
|
|
1550
|
+
})), [a]);
|
|
1508
1551
|
return /* @__PURE__ */ e.jsxs(X, { mb: 4, children: [
|
|
1509
1552
|
/* @__PURE__ */ e.jsxs(ae, { children: [
|
|
1510
|
-
|
|
1553
|
+
d,
|
|
1511
1554
|
" Category"
|
|
1512
1555
|
] }),
|
|
1513
1556
|
/* @__PURE__ */ e.jsx(
|
|
1514
1557
|
le,
|
|
1515
1558
|
{
|
|
1516
|
-
isDisabled:
|
|
1517
|
-
options:
|
|
1518
|
-
value:
|
|
1519
|
-
value:
|
|
1520
|
-
label:
|
|
1559
|
+
isDisabled: s.length === 0,
|
|
1560
|
+
options: l,
|
|
1561
|
+
value: n.length === 0 ? { value: "other", label: "Other" } : a.filter((g) => n.includes(g.id)).map((g) => ({
|
|
1562
|
+
value: g.id,
|
|
1563
|
+
label: g.name
|
|
1521
1564
|
}))[0],
|
|
1522
|
-
onChange: (
|
|
1565
|
+
onChange: (g) => o(g ? [g.value] : []),
|
|
1523
1566
|
placeholder: "Select category"
|
|
1524
1567
|
}
|
|
1525
1568
|
)
|
|
1526
1569
|
] });
|
|
1527
1570
|
}
|
|
1528
|
-
), pn =
|
|
1571
|
+
), pn = Ne(
|
|
1529
1572
|
({
|
|
1530
|
-
description:
|
|
1531
|
-
onInputChange:
|
|
1573
|
+
description: s,
|
|
1574
|
+
onInputChange: n
|
|
1532
1575
|
}) => /* @__PURE__ */ e.jsxs(X, { mb: 4, children: [
|
|
1533
1576
|
/* @__PURE__ */ e.jsx(ae, { children: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
1534
1577
|
"Description",
|
|
1535
|
-
/* @__PURE__ */ e.jsx(
|
|
1578
|
+
/* @__PURE__ */ e.jsx(C, { fontSize: "sm", color: "gray.500", children: "Briefly describe the objective of this module. Max 40 words." })
|
|
1536
1579
|
] }) }),
|
|
1537
1580
|
/* @__PURE__ */ e.jsx(
|
|
1538
1581
|
je,
|
|
1539
1582
|
{
|
|
1540
1583
|
placeholder: "i.e. Assess readiness to return to play post-ACL reconstruction",
|
|
1541
|
-
value:
|
|
1542
|
-
onChange:
|
|
1584
|
+
value: s,
|
|
1585
|
+
onChange: n
|
|
1543
1586
|
}
|
|
1544
1587
|
)
|
|
1545
1588
|
] })
|
|
1546
|
-
), gn =
|
|
1589
|
+
), gn = Ne(
|
|
1547
1590
|
({
|
|
1548
|
-
value:
|
|
1549
|
-
onChange:
|
|
1550
|
-
onAdjustActivities:
|
|
1591
|
+
value: s,
|
|
1592
|
+
onChange: n,
|
|
1593
|
+
onAdjustActivities: o
|
|
1551
1594
|
}) => {
|
|
1552
|
-
const
|
|
1553
|
-
() =>
|
|
1554
|
-
id:
|
|
1555
|
-
name:
|
|
1595
|
+
const c = k(
|
|
1596
|
+
() => s.map((d) => ({
|
|
1597
|
+
id: d.id,
|
|
1598
|
+
name: d.name
|
|
1556
1599
|
})),
|
|
1557
|
-
[
|
|
1600
|
+
[s]
|
|
1558
1601
|
);
|
|
1559
1602
|
return /* @__PURE__ */ e.jsxs(X, { mb: 4, children: [
|
|
1560
|
-
/* @__PURE__ */ e.jsxs(
|
|
1603
|
+
/* @__PURE__ */ e.jsxs(se, { justifyContent: "space-between", children: [
|
|
1561
1604
|
/* @__PURE__ */ e.jsx(ae, { children: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
1562
1605
|
"Activities",
|
|
1563
|
-
/* @__PURE__ */ e.jsx(
|
|
1606
|
+
/* @__PURE__ */ e.jsx(C, { fontSize: "sm", color: "gray.500", children: "Drag and drop to reorder the activities in this module." })
|
|
1564
1607
|
] }) }),
|
|
1565
1608
|
/* @__PURE__ */ e.jsx(
|
|
1566
1609
|
K,
|
|
@@ -1568,12 +1611,12 @@ const Kt = ({
|
|
|
1568
1611
|
size: "sm",
|
|
1569
1612
|
variant: "solid",
|
|
1570
1613
|
colorScheme: "blue",
|
|
1571
|
-
onClick:
|
|
1614
|
+
onClick: o,
|
|
1572
1615
|
children: "Add / Remove Activities"
|
|
1573
1616
|
}
|
|
1574
1617
|
)
|
|
1575
1618
|
] }),
|
|
1576
|
-
|
|
1619
|
+
c.length === 0 ? /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsxs(C, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
|
|
1577
1620
|
"No activities selected for this module.",
|
|
1578
1621
|
/* @__PURE__ */ e.jsx(
|
|
1579
1622
|
K,
|
|
@@ -1582,93 +1625,93 @@ const Kt = ({
|
|
|
1582
1625
|
size: "sm",
|
|
1583
1626
|
variant: "link",
|
|
1584
1627
|
colorScheme: "blue",
|
|
1585
|
-
onClick:
|
|
1628
|
+
onClick: o,
|
|
1586
1629
|
children: "Add activities."
|
|
1587
1630
|
}
|
|
1588
1631
|
)
|
|
1589
1632
|
] }) }) : /* @__PURE__ */ e.jsx(
|
|
1590
1633
|
Vt,
|
|
1591
1634
|
{
|
|
1592
|
-
value:
|
|
1593
|
-
onChange: (
|
|
1594
|
-
const
|
|
1595
|
-
|
|
1635
|
+
value: c,
|
|
1636
|
+
onChange: (d) => {
|
|
1637
|
+
const a = d(c);
|
|
1638
|
+
n(a.map((l) => l.id));
|
|
1596
1639
|
}
|
|
1597
1640
|
}
|
|
1598
1641
|
)
|
|
1599
1642
|
] });
|
|
1600
1643
|
}
|
|
1601
1644
|
), xn = ({
|
|
1602
|
-
value:
|
|
1603
|
-
onChange:
|
|
1604
|
-
forceKind:
|
|
1605
|
-
disableRemove:
|
|
1606
|
-
disableKind:
|
|
1607
|
-
isDisabled:
|
|
1608
|
-
lockRanges:
|
|
1609
|
-
...
|
|
1645
|
+
value: s,
|
|
1646
|
+
onChange: n,
|
|
1647
|
+
forceKind: o,
|
|
1648
|
+
disableRemove: c,
|
|
1649
|
+
disableKind: d,
|
|
1650
|
+
isDisabled: a,
|
|
1651
|
+
lockRanges: l,
|
|
1652
|
+
...g
|
|
1610
1653
|
}) => {
|
|
1611
|
-
const
|
|
1612
|
-
const
|
|
1613
|
-
return
|
|
1614
|
-
}), [
|
|
1615
|
-
(
|
|
1616
|
-
const
|
|
1617
|
-
(
|
|
1654
|
+
const i = k(() => [...s].sort((m, S) => {
|
|
1655
|
+
const b = Qe.indexOf(m.plane), r = Qe.indexOf(S.plane);
|
|
1656
|
+
return b - r;
|
|
1657
|
+
}), [s]), x = R((m) => "segment" in m.id ? lt(m.id.segment, m.plane, !0) ?? "Unknown" : ct(m.id.joint, m.plane, !0) ?? "Unknown", []), h = R(
|
|
1658
|
+
(m, S) => {
|
|
1659
|
+
const b = i.findIndex(
|
|
1660
|
+
(f) => f.id === S.id && f.plane === S.plane
|
|
1618
1661
|
);
|
|
1619
|
-
let
|
|
1620
|
-
|
|
1621
|
-
...
|
|
1622
|
-
min:
|
|
1623
|
-
max:
|
|
1624
|
-
}))),
|
|
1662
|
+
let r = [...i];
|
|
1663
|
+
o && (S = { ...S, kind: o }), r[b] = S, l && (r = r.map((f) => ({
|
|
1664
|
+
...f,
|
|
1665
|
+
min: S.min,
|
|
1666
|
+
max: S.max
|
|
1667
|
+
}))), n(r);
|
|
1625
1668
|
},
|
|
1626
|
-
[
|
|
1627
|
-
),
|
|
1628
|
-
(
|
|
1629
|
-
const
|
|
1630
|
-
(
|
|
1669
|
+
[n, i, o, l]
|
|
1670
|
+
), M = R(
|
|
1671
|
+
(m) => {
|
|
1672
|
+
const S = i.filter(
|
|
1673
|
+
(b) => b.id !== m.id || b.plane !== m.plane
|
|
1631
1674
|
);
|
|
1632
|
-
|
|
1675
|
+
n(S);
|
|
1633
1676
|
},
|
|
1634
|
-
[
|
|
1677
|
+
[n, i]
|
|
1635
1678
|
);
|
|
1636
|
-
return /* @__PURE__ */ e.jsx(
|
|
1679
|
+
return /* @__PURE__ */ e.jsx(ne, { alignItems: "flex-start", overflowY: "auto", ...g, children: i.map((m, S) => /* @__PURE__ */ e.jsx(
|
|
1637
1680
|
fn,
|
|
1638
1681
|
{
|
|
1639
|
-
label:
|
|
1640
|
-
parameter:
|
|
1641
|
-
onChange: (
|
|
1642
|
-
onRemove:
|
|
1643
|
-
forceKind:
|
|
1644
|
-
disableKind:
|
|
1645
|
-
isDisabled:
|
|
1682
|
+
label: x(m),
|
|
1683
|
+
parameter: m,
|
|
1684
|
+
onChange: (b) => h(S, b),
|
|
1685
|
+
onRemove: c || a ? void 0 : () => M(m),
|
|
1686
|
+
forceKind: o,
|
|
1687
|
+
disableKind: d || a,
|
|
1688
|
+
isDisabled: a
|
|
1646
1689
|
},
|
|
1647
|
-
`${JSON.stringify(
|
|
1690
|
+
`${JSON.stringify(m.id)}-${m.plane}`
|
|
1648
1691
|
)) });
|
|
1649
1692
|
}, fn = ({
|
|
1650
|
-
label:
|
|
1651
|
-
parameter:
|
|
1652
|
-
onChange:
|
|
1653
|
-
onRemove:
|
|
1654
|
-
forceKind:
|
|
1655
|
-
disableKind:
|
|
1656
|
-
isDisabled:
|
|
1693
|
+
label: s,
|
|
1694
|
+
parameter: n,
|
|
1695
|
+
onChange: o,
|
|
1696
|
+
onRemove: c,
|
|
1697
|
+
forceKind: d,
|
|
1698
|
+
disableKind: a,
|
|
1699
|
+
isDisabled: l
|
|
1657
1700
|
}) => {
|
|
1658
|
-
const
|
|
1659
|
-
(
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
) :
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1701
|
+
const g = R(
|
|
1702
|
+
(h) => "joint" in n.id ? Yt(
|
|
1703
|
+
n.id.joint,
|
|
1704
|
+
n.plane,
|
|
1705
|
+
h < 0 ? -1 : 1
|
|
1706
|
+
) : Ht(
|
|
1707
|
+
n.id.segment,
|
|
1708
|
+
n.plane,
|
|
1709
|
+
h < 0 ? -1 : 1
|
|
1667
1710
|
),
|
|
1668
|
-
[
|
|
1669
|
-
), { min:
|
|
1711
|
+
[n]
|
|
1712
|
+
), { min: i, max: x } = "joint" in n.id ? Jt(n.id.joint, n.plane) : { min: -180, max: 180 };
|
|
1670
1713
|
return /* @__PURE__ */ e.jsxs(
|
|
1671
|
-
|
|
1714
|
+
ne,
|
|
1672
1715
|
{
|
|
1673
1716
|
borderRadius: "md",
|
|
1674
1717
|
p: 2,
|
|
@@ -1678,33 +1721,33 @@ const Kt = ({
|
|
|
1678
1721
|
overflow: "hidden",
|
|
1679
1722
|
flexShrink: "0",
|
|
1680
1723
|
children: [
|
|
1681
|
-
/* @__PURE__ */ e.jsxs(
|
|
1724
|
+
/* @__PURE__ */ e.jsxs(se, { w: "100%", children: [
|
|
1682
1725
|
/* @__PURE__ */ e.jsx(
|
|
1683
|
-
|
|
1726
|
+
C,
|
|
1684
1727
|
{
|
|
1685
1728
|
fontSize: "sm",
|
|
1686
1729
|
flex: 1,
|
|
1687
1730
|
textTransform: "capitalize",
|
|
1688
1731
|
fontWeight: "semibold",
|
|
1689
|
-
children:
|
|
1732
|
+
children: s
|
|
1690
1733
|
}
|
|
1691
1734
|
),
|
|
1692
|
-
|
|
1693
|
-
|
|
1735
|
+
c && !l && /* @__PURE__ */ e.jsx(
|
|
1736
|
+
At,
|
|
1694
1737
|
{
|
|
1695
1738
|
size: "xs",
|
|
1696
1739
|
variant: "ghost",
|
|
1697
1740
|
"aria-label": "delete",
|
|
1698
|
-
icon: /* @__PURE__ */ e.jsx(Ye, { as:
|
|
1699
|
-
onClick:
|
|
1741
|
+
icon: /* @__PURE__ */ e.jsx(Ye, { as: Ot }),
|
|
1742
|
+
onClick: c
|
|
1700
1743
|
}
|
|
1701
1744
|
),
|
|
1702
|
-
!
|
|
1745
|
+
!d && /* @__PURE__ */ e.jsx(
|
|
1703
1746
|
tn,
|
|
1704
1747
|
{
|
|
1705
|
-
selectedItem:
|
|
1706
|
-
onChange: ({ value:
|
|
1707
|
-
isDisabled:
|
|
1748
|
+
selectedItem: n?.kind ?? Ae.Limit,
|
|
1749
|
+
onChange: ({ value: h }) => o({ ...n, kind: h }),
|
|
1750
|
+
isDisabled: a || l,
|
|
1708
1751
|
buttonProps: {
|
|
1709
1752
|
size: "sm",
|
|
1710
1753
|
variant: "outline",
|
|
@@ -1715,8 +1758,8 @@ const Kt = ({
|
|
|
1715
1758
|
colorScheme: "teal"
|
|
1716
1759
|
},
|
|
1717
1760
|
items: [
|
|
1718
|
-
{ value:
|
|
1719
|
-
{ value:
|
|
1761
|
+
{ value: Ae.Limit, label: "limit" },
|
|
1762
|
+
{ value: Ae.Target, label: "target" }
|
|
1720
1763
|
]
|
|
1721
1764
|
}
|
|
1722
1765
|
)
|
|
@@ -1726,88 +1769,88 @@ const Kt = ({
|
|
|
1726
1769
|
{
|
|
1727
1770
|
w: "100%",
|
|
1728
1771
|
size: "xs",
|
|
1729
|
-
min:
|
|
1730
|
-
max:
|
|
1772
|
+
min: i,
|
|
1773
|
+
max: x,
|
|
1731
1774
|
zeroMarker: !0,
|
|
1732
|
-
value: [
|
|
1733
|
-
onChange: (
|
|
1734
|
-
formatValue: (
|
|
1735
|
-
valueLabel: (
|
|
1736
|
-
positiveNegativeLabels:
|
|
1737
|
-
isDisabled:
|
|
1775
|
+
value: [n.min, n.max],
|
|
1776
|
+
onChange: (h) => o({ ...n, min: h[0], max: h[1] }),
|
|
1777
|
+
formatValue: (h) => `${Math.abs(h)}°`,
|
|
1778
|
+
valueLabel: (h) => g(h) ?? "",
|
|
1779
|
+
positiveNegativeLabels: g(0) ? [g(-1) ?? "", g(1) ?? ""] : void 0,
|
|
1780
|
+
isDisabled: l
|
|
1738
1781
|
}
|
|
1739
1782
|
)
|
|
1740
1783
|
]
|
|
1741
1784
|
}
|
|
1742
1785
|
);
|
|
1743
|
-
}, Se = (
|
|
1744
|
-
options:
|
|
1745
|
-
value:
|
|
1746
|
-
onChange:
|
|
1747
|
-
forceKind:
|
|
1748
|
-
singleValue:
|
|
1749
|
-
singleValueSideless:
|
|
1750
|
-
editOnly:
|
|
1751
|
-
disableKind:
|
|
1752
|
-
maxParameters:
|
|
1753
|
-
...
|
|
1786
|
+
}, Se = (s, n) => "segment" in s && "segment" in n && s.segment === n.segment || "joint" in s && "joint" in n && s.joint === n.joint, jn = ({
|
|
1787
|
+
options: s,
|
|
1788
|
+
value: n,
|
|
1789
|
+
onChange: o,
|
|
1790
|
+
forceKind: c,
|
|
1791
|
+
singleValue: d,
|
|
1792
|
+
singleValueSideless: a,
|
|
1793
|
+
editOnly: l,
|
|
1794
|
+
disableKind: g,
|
|
1795
|
+
maxParameters: i,
|
|
1796
|
+
...x
|
|
1754
1797
|
}) => {
|
|
1755
|
-
const
|
|
1756
|
-
() =>
|
|
1757
|
-
label: "segment" in
|
|
1758
|
-
value:
|
|
1759
|
-
plane:
|
|
1798
|
+
const h = a ? 2 : i, M = k(
|
|
1799
|
+
() => s.map((r) => ({
|
|
1800
|
+
label: "segment" in r.id ? lt(r.id.segment, r.plane, !0) ?? "Unknown" : ct(r.id.joint, r.plane, !0) ?? "Unknown",
|
|
1801
|
+
value: r.id,
|
|
1802
|
+
plane: r.plane
|
|
1760
1803
|
})),
|
|
1761
|
-
[
|
|
1762
|
-
),
|
|
1763
|
-
if (!
|
|
1764
|
-
return
|
|
1765
|
-
const
|
|
1766
|
-
return
|
|
1767
|
-
(
|
|
1804
|
+
[s]
|
|
1805
|
+
), m = k(() => {
|
|
1806
|
+
if (!a || n.length === 0)
|
|
1807
|
+
return M;
|
|
1808
|
+
const r = n[0];
|
|
1809
|
+
return M.filter(
|
|
1810
|
+
(f) => Ce(f.value) === Ce(r.id) && f.plane === r.plane
|
|
1768
1811
|
);
|
|
1769
|
-
}, [
|
|
1770
|
-
() =>
|
|
1771
|
-
(
|
|
1812
|
+
}, [M, n, a]), S = k(
|
|
1813
|
+
() => M.filter(
|
|
1814
|
+
(r) => n.some((f) => Se(f.id, r.value) && f.plane === r.plane)
|
|
1772
1815
|
),
|
|
1773
|
-
[
|
|
1774
|
-
),
|
|
1775
|
-
(
|
|
1776
|
-
const
|
|
1777
|
-
const
|
|
1778
|
-
(
|
|
1779
|
-
),
|
|
1780
|
-
(
|
|
1781
|
-
), F =
|
|
1782
|
-
(
|
|
1783
|
-
) : void 0,
|
|
1784
|
-
return
|
|
1785
|
-
id:
|
|
1786
|
-
plane:
|
|
1787
|
-
min:
|
|
1788
|
-
max:
|
|
1789
|
-
kind:
|
|
1816
|
+
[M, n]
|
|
1817
|
+
), b = R(
|
|
1818
|
+
(r) => {
|
|
1819
|
+
const f = r.map((v) => {
|
|
1820
|
+
const p = n.find(
|
|
1821
|
+
(D) => Se(D.id, v.value) && D.plane === v.plane
|
|
1822
|
+
), L = s.find(
|
|
1823
|
+
(D) => Se(D.id, v.value) && D.plane === v.plane
|
|
1824
|
+
), F = a ? n.find(
|
|
1825
|
+
(D) => Ce(D.id) === Ce(v.value) && D.plane === v.plane
|
|
1826
|
+
) : void 0, G = F && !p ? F.min : L && L.min ? L.min : 0, U = F && !p ? F.max : L && L.max ? L.max : 0;
|
|
1827
|
+
return p ?? {
|
|
1828
|
+
id: v.value,
|
|
1829
|
+
plane: v.plane,
|
|
1830
|
+
min: G,
|
|
1831
|
+
max: U,
|
|
1832
|
+
kind: c ?? Ae.Limit
|
|
1790
1833
|
};
|
|
1791
1834
|
});
|
|
1792
|
-
|
|
1835
|
+
o(f);
|
|
1793
1836
|
},
|
|
1794
|
-
[
|
|
1837
|
+
[o, n, s, c, a]
|
|
1795
1838
|
);
|
|
1796
|
-
return
|
|
1797
|
-
const
|
|
1798
|
-
(
|
|
1839
|
+
return re(() => {
|
|
1840
|
+
const r = n.filter(
|
|
1841
|
+
(f) => s.some((v) => Se(v.id, f.id) && v.plane === f.plane)
|
|
1799
1842
|
);
|
|
1800
|
-
|
|
1801
|
-
}, [
|
|
1843
|
+
r.length !== n.length && o(r);
|
|
1844
|
+
}, [s, o]), /* @__PURE__ */ e.jsxs(Z, { ...x, children: [
|
|
1802
1845
|
/* @__PURE__ */ e.jsx(
|
|
1803
1846
|
le,
|
|
1804
1847
|
{
|
|
1805
|
-
isMulti: !
|
|
1806
|
-
placeholder:
|
|
1807
|
-
value:
|
|
1808
|
-
isDisabled:
|
|
1809
|
-
onChange: (
|
|
1810
|
-
options:
|
|
1848
|
+
isMulti: !d,
|
|
1849
|
+
placeholder: n.length ? `${n.length} selected` : "Search...",
|
|
1850
|
+
value: S,
|
|
1851
|
+
isDisabled: l || S.length >= (h ?? 1 / 0),
|
|
1852
|
+
onChange: (r) => Array.isArray(r) ? b([...r]) : b(r !== null ? [r] : []),
|
|
1853
|
+
options: m,
|
|
1811
1854
|
controlShouldRenderValue: !1
|
|
1812
1855
|
}
|
|
1813
1856
|
),
|
|
@@ -1816,17 +1859,17 @@ const Kt = ({
|
|
|
1816
1859
|
{
|
|
1817
1860
|
marginTop: 2,
|
|
1818
1861
|
maxH: "28rem",
|
|
1819
|
-
value:
|
|
1820
|
-
onChange:
|
|
1821
|
-
forceKind:
|
|
1822
|
-
disableKind:
|
|
1823
|
-
isDisabled:
|
|
1824
|
-
lockRanges:
|
|
1862
|
+
value: n,
|
|
1863
|
+
onChange: o,
|
|
1864
|
+
forceKind: c,
|
|
1865
|
+
disableKind: g,
|
|
1866
|
+
isDisabled: l,
|
|
1867
|
+
lockRanges: a
|
|
1825
1868
|
}
|
|
1826
1869
|
)
|
|
1827
1870
|
] });
|
|
1828
|
-
}, dt = (
|
|
1829
|
-
switch (
|
|
1871
|
+
}, dt = (s) => {
|
|
1872
|
+
switch (s) {
|
|
1830
1873
|
case W.Thorax:
|
|
1831
1874
|
return "Thorax";
|
|
1832
1875
|
case W.CenterBack:
|
|
@@ -1856,8 +1899,8 @@ const Kt = ({
|
|
|
1856
1899
|
case W.Head:
|
|
1857
1900
|
return "Head";
|
|
1858
1901
|
}
|
|
1859
|
-
return console.warn(`Unknown sensor location: ${
|
|
1860
|
-
},
|
|
1902
|
+
return console.warn(`Unknown sensor location: ${s}`), "Unknown";
|
|
1903
|
+
}, bn = 6, vn = [
|
|
1861
1904
|
W.LeftFoot,
|
|
1862
1905
|
W.LeftShank,
|
|
1863
1906
|
W.LeftThigh,
|
|
@@ -1868,162 +1911,162 @@ const Kt = ({
|
|
|
1868
1911
|
W.Thorax,
|
|
1869
1912
|
W.CenterBack,
|
|
1870
1913
|
W.Head
|
|
1871
|
-
], yn =
|
|
1872
|
-
label: dt(
|
|
1873
|
-
value:
|
|
1874
|
-
})),
|
|
1914
|
+
], yn = vn.map((s) => ({
|
|
1915
|
+
label: dt(s),
|
|
1916
|
+
value: s
|
|
1917
|
+
})), De = [
|
|
1875
1918
|
{ key: "module_category", label: "Link Category", multi: !0 },
|
|
1876
1919
|
{ key: "activity_type", label: "Activity Type", multi: !1 },
|
|
1877
1920
|
{ key: "session_type", label: "Session Type", multi: !0 },
|
|
1878
1921
|
{ key: "body_region", label: "Body Region", multi: !0 },
|
|
1879
1922
|
{ key: "sport", label: "Sport", multi: !0 }
|
|
1880
|
-
],
|
|
1881
|
-
id:
|
|
1882
|
-
onError:
|
|
1883
|
-
onCancel:
|
|
1884
|
-
onSave:
|
|
1885
|
-
hideButtons:
|
|
1886
|
-
setButtonOnClick:
|
|
1887
|
-
setButtonDisabled:
|
|
1888
|
-
quantumOwned:
|
|
1889
|
-
isView:
|
|
1923
|
+
], Wn = ({
|
|
1924
|
+
id: s,
|
|
1925
|
+
onError: n,
|
|
1926
|
+
onCancel: o,
|
|
1927
|
+
onSave: c,
|
|
1928
|
+
hideButtons: d,
|
|
1929
|
+
setButtonOnClick: a,
|
|
1930
|
+
setButtonDisabled: l,
|
|
1931
|
+
quantumOwned: g,
|
|
1932
|
+
isView: i
|
|
1890
1933
|
}) => {
|
|
1891
|
-
const
|
|
1892
|
-
query:
|
|
1893
|
-
variables: { id:
|
|
1894
|
-
pause: !
|
|
1895
|
-
}),
|
|
1934
|
+
const x = Nt(), [{ fetching: h }, M] = ie(_e), [{ fetching: m }, S] = ie(Dt), [{ data: b }] = de({
|
|
1935
|
+
query: Ft,
|
|
1936
|
+
variables: { id: s ?? "" },
|
|
1937
|
+
pause: !s
|
|
1938
|
+
}), r = $(
|
|
1896
1939
|
ue,
|
|
1897
|
-
|
|
1898
|
-
),
|
|
1899
|
-
() =>
|
|
1900
|
-
[
|
|
1901
|
-
),
|
|
1902
|
-
|
|
1903
|
-
const
|
|
1904
|
-
(
|
|
1940
|
+
b?.getActionById
|
|
1941
|
+
), f = h || m, v = !!r && !!s, [p, L] = z(""), [F, G] = z(""), [U, D] = z(""), [T, I] = z(""), [y, E] = z([]), [O, V] = z([]), [w, P] = z({}), Q = k(
|
|
1942
|
+
() => y.map((j) => j.value),
|
|
1943
|
+
[y]
|
|
1944
|
+
), ee = Pt(Q), [N, t] = z([]), u = p.length > 0, [A, J] = z({});
|
|
1945
|
+
re(() => {
|
|
1946
|
+
const j = De.map(
|
|
1947
|
+
(B) => x.query($t, { key: B.key })
|
|
1905
1948
|
);
|
|
1906
|
-
Promise.all(
|
|
1949
|
+
Promise.all(j).then((B) => {
|
|
1907
1950
|
const H = {};
|
|
1908
|
-
|
|
1951
|
+
B.forEach((oe) => {
|
|
1909
1952
|
if (oe.error || !oe.data) return;
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1953
|
+
const te = $(
|
|
1954
|
+
Fe,
|
|
1912
1955
|
oe.data.getMetadataByKey
|
|
1913
1956
|
), he = $(
|
|
1914
|
-
|
|
1915
|
-
|
|
1957
|
+
$e,
|
|
1958
|
+
te.data
|
|
1916
1959
|
);
|
|
1917
|
-
H[
|
|
1960
|
+
H[te.key] = he.map((me) => ({
|
|
1918
1961
|
label: me.label || me.value,
|
|
1919
1962
|
value: me.value,
|
|
1920
1963
|
id: me.id
|
|
1921
1964
|
}));
|
|
1922
1965
|
}), P(H);
|
|
1923
1966
|
});
|
|
1924
|
-
}, [
|
|
1925
|
-
if (
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1928
|
-
|
|
1967
|
+
}, [x]), re(() => {
|
|
1968
|
+
if (r) {
|
|
1969
|
+
const B = $(
|
|
1970
|
+
Fe,
|
|
1971
|
+
r.metadataGroups
|
|
1929
1972
|
).map(
|
|
1930
|
-
(oe) => oe.data.map((
|
|
1973
|
+
(oe) => oe.data.map((te) => $($e, te).id)
|
|
1931
1974
|
), H = {
|
|
1932
|
-
name:
|
|
1933
|
-
description:
|
|
1934
|
-
cameraPlacement:
|
|
1935
|
-
videoLink:
|
|
1936
|
-
sensorLocations:
|
|
1975
|
+
name: r.name,
|
|
1976
|
+
description: r.description || "",
|
|
1977
|
+
cameraPlacement: r.cameraPlacement || "",
|
|
1978
|
+
videoLink: r.videoLink || "",
|
|
1979
|
+
sensorLocations: r.sensorLocations.map((oe) => ({
|
|
1937
1980
|
label: dt(oe),
|
|
1938
1981
|
value: oe
|
|
1939
1982
|
})),
|
|
1940
|
-
thresholds:
|
|
1941
|
-
metadataIds:
|
|
1983
|
+
thresholds: Xt(r.thresholds),
|
|
1984
|
+
metadataIds: B.flat()
|
|
1942
1985
|
};
|
|
1943
|
-
|
|
1986
|
+
L(H.name), G(H.description), D(H.cameraPlacement), I(H.videoLink), E(H.sensorLocations), t(H.thresholds), V(H.metadataIds), J(H);
|
|
1944
1987
|
}
|
|
1945
|
-
}, [
|
|
1946
|
-
const
|
|
1947
|
-
() => JSON.stringify(
|
|
1948
|
-
name:
|
|
1988
|
+
}, [r]);
|
|
1989
|
+
const q = k(
|
|
1990
|
+
() => JSON.stringify(A) !== JSON.stringify({
|
|
1991
|
+
name: p,
|
|
1949
1992
|
description: F,
|
|
1950
|
-
cameraPlacement:
|
|
1951
|
-
videoLink:
|
|
1952
|
-
sensorLocations:
|
|
1953
|
-
thresholds: qe(
|
|
1954
|
-
metadataIds:
|
|
1993
|
+
cameraPlacement: U,
|
|
1994
|
+
videoLink: T,
|
|
1995
|
+
sensorLocations: Q,
|
|
1996
|
+
thresholds: qe(N),
|
|
1997
|
+
metadataIds: O
|
|
1955
1998
|
}),
|
|
1956
1999
|
[
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2000
|
+
A,
|
|
2001
|
+
p,
|
|
2002
|
+
Q,
|
|
1960
2003
|
F,
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
2004
|
+
U,
|
|
2005
|
+
T,
|
|
2006
|
+
O,
|
|
2007
|
+
N
|
|
1965
2008
|
]
|
|
1966
|
-
),
|
|
1967
|
-
const
|
|
1968
|
-
name:
|
|
2009
|
+
), _ = R(() => {
|
|
2010
|
+
const j = {
|
|
2011
|
+
name: p,
|
|
1969
2012
|
description: F,
|
|
1970
|
-
cameraPlacement:
|
|
1971
|
-
videoLink:
|
|
1972
|
-
sensorLocations:
|
|
1973
|
-
thresholds: qe(
|
|
1974
|
-
metadataItemIds:
|
|
2013
|
+
cameraPlacement: U,
|
|
2014
|
+
videoLink: T,
|
|
2015
|
+
sensorLocations: Q,
|
|
2016
|
+
thresholds: qe(N),
|
|
2017
|
+
metadataItemIds: O,
|
|
1975
2018
|
// Backend requires laterality; keep existing default since UI no longer edits it
|
|
1976
|
-
laterality:
|
|
1977
|
-
quantumOwned:
|
|
2019
|
+
laterality: qt.Either,
|
|
2020
|
+
quantumOwned: g,
|
|
1978
2021
|
//Backend requires session type; keep existing default since UI no longer edits it
|
|
1979
2022
|
sessionType: []
|
|
1980
2023
|
};
|
|
1981
|
-
let
|
|
1982
|
-
|
|
1983
|
-
id:
|
|
1984
|
-
fields:
|
|
1985
|
-
}) :
|
|
1986
|
-
fields:
|
|
1987
|
-
}),
|
|
1988
|
-
H ?
|
|
2024
|
+
let B;
|
|
2025
|
+
v && s ? B = S({
|
|
2026
|
+
id: s,
|
|
2027
|
+
fields: j
|
|
2028
|
+
}) : B = M({
|
|
2029
|
+
fields: j
|
|
2030
|
+
}), B.then(({ error: H }) => {
|
|
2031
|
+
H ? n(H) : c();
|
|
1989
2032
|
});
|
|
1990
2033
|
}, [
|
|
2034
|
+
g,
|
|
2035
|
+
M,
|
|
2036
|
+
S,
|
|
2037
|
+
s,
|
|
1991
2038
|
p,
|
|
1992
|
-
|
|
1993
|
-
C,
|
|
1994
|
-
n,
|
|
1995
|
-
x,
|
|
1996
|
-
J,
|
|
2039
|
+
Q,
|
|
1997
2040
|
F,
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2041
|
+
U,
|
|
2042
|
+
T,
|
|
2043
|
+
O,
|
|
2044
|
+
v,
|
|
2045
|
+
N,
|
|
2046
|
+
c,
|
|
2047
|
+
n
|
|
2005
2048
|
]);
|
|
2006
|
-
|
|
2007
|
-
c && c({
|
|
2008
|
-
cancelButton: g,
|
|
2009
|
-
saveButton: o ? !0 : g || !A || !B
|
|
2010
|
-
});
|
|
2011
|
-
}, [g, c, A, B, o]), se(() => {
|
|
2049
|
+
re(() => {
|
|
2012
2050
|
l && l({
|
|
2013
|
-
cancelButton:
|
|
2014
|
-
saveButton:
|
|
2015
|
-
} : Y
|
|
2051
|
+
cancelButton: f,
|
|
2052
|
+
saveButton: i ? !0 : f || !u || !q
|
|
2016
2053
|
});
|
|
2017
|
-
}, [l,
|
|
2018
|
-
|
|
2019
|
-
|
|
2054
|
+
}, [f, l, u, q, i]), re(() => {
|
|
2055
|
+
a && a({
|
|
2056
|
+
cancelButton: o,
|
|
2057
|
+
saveButton: i ? () => {
|
|
2058
|
+
} : _
|
|
2059
|
+
});
|
|
2060
|
+
}, [a, o, _, i]);
|
|
2061
|
+
const Y = (j, B) => {
|
|
2062
|
+
const H = De.find((te) => te.key === j);
|
|
2020
2063
|
if (!H) return;
|
|
2021
|
-
const oe = H.multi ? (
|
|
2022
|
-
(
|
|
2023
|
-
) :
|
|
2024
|
-
V((
|
|
2064
|
+
const oe = H.multi ? (B ?? []).map(
|
|
2065
|
+
(te) => te.id
|
|
2066
|
+
) : B ? [B.id] : [];
|
|
2067
|
+
V((te) => [...te.filter((me) => Object.values(w).flat().find((ye) => ye.id === me) && !Object.keys(w).find(
|
|
2025
2068
|
(ye) => w[ye]?.some(
|
|
2026
|
-
(ut) => ut.id === me && ye ===
|
|
2069
|
+
(ut) => ut.id === me && ye === j
|
|
2027
2070
|
)
|
|
2028
2071
|
)), ...oe]);
|
|
2029
2072
|
};
|
|
@@ -2034,11 +2077,11 @@ const Kt = ({
|
|
|
2034
2077
|
/* @__PURE__ */ e.jsx(
|
|
2035
2078
|
je,
|
|
2036
2079
|
{
|
|
2037
|
-
value:
|
|
2038
|
-
onChange: (
|
|
2080
|
+
value: p,
|
|
2081
|
+
onChange: (j) => L(j.target.value),
|
|
2039
2082
|
type: "text",
|
|
2040
2083
|
placeholder: "i.e. Lunge & Return",
|
|
2041
|
-
isDisabled:
|
|
2084
|
+
isDisabled: i
|
|
2042
2085
|
}
|
|
2043
2086
|
)
|
|
2044
2087
|
] }),
|
|
@@ -2047,11 +2090,11 @@ const Kt = ({
|
|
|
2047
2090
|
/* @__PURE__ */ e.jsx(
|
|
2048
2091
|
Be,
|
|
2049
2092
|
{
|
|
2050
|
-
value:
|
|
2051
|
-
onChange: (
|
|
2093
|
+
value: U,
|
|
2094
|
+
onChange: (j) => D(j.target.value),
|
|
2052
2095
|
rows: 2,
|
|
2053
2096
|
placeholder: "(optional) Describe camera setup, placement, angles",
|
|
2054
|
-
isDisabled:
|
|
2097
|
+
isDisabled: i
|
|
2055
2098
|
}
|
|
2056
2099
|
)
|
|
2057
2100
|
] }),
|
|
@@ -2060,11 +2103,11 @@ const Kt = ({
|
|
|
2060
2103
|
/* @__PURE__ */ e.jsx(
|
|
2061
2104
|
je,
|
|
2062
2105
|
{
|
|
2063
|
-
value:
|
|
2064
|
-
onChange: (
|
|
2106
|
+
value: T,
|
|
2107
|
+
onChange: (j) => I(j.target.value),
|
|
2065
2108
|
type: "url",
|
|
2066
2109
|
placeholder: "(optional) https://...",
|
|
2067
|
-
isDisabled:
|
|
2110
|
+
isDisabled: i
|
|
2068
2111
|
}
|
|
2069
2112
|
)
|
|
2070
2113
|
] }),
|
|
@@ -2074,34 +2117,34 @@ const Kt = ({
|
|
|
2074
2117
|
Be,
|
|
2075
2118
|
{
|
|
2076
2119
|
value: F,
|
|
2077
|
-
onChange: (
|
|
2120
|
+
onChange: (j) => G(j.target.value),
|
|
2078
2121
|
rows: 2,
|
|
2079
2122
|
placeholder: "(optional) Describe how to perform the test or exercise",
|
|
2080
|
-
isDisabled:
|
|
2123
|
+
isDisabled: i
|
|
2081
2124
|
}
|
|
2082
2125
|
)
|
|
2083
2126
|
] }),
|
|
2084
2127
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
2085
2128
|
/* @__PURE__ */ e.jsx(ce, { children: "Metadata Tags" }),
|
|
2086
|
-
|
|
2087
|
-
/* @__PURE__ */ e.jsx(ce, { children:
|
|
2129
|
+
De.map((j) => /* @__PURE__ */ e.jsxs(X, { children: [
|
|
2130
|
+
/* @__PURE__ */ e.jsx(ce, { children: j.label }),
|
|
2088
2131
|
/* @__PURE__ */ e.jsx(
|
|
2089
2132
|
le,
|
|
2090
2133
|
{
|
|
2091
|
-
isMulti:
|
|
2092
|
-
value: w[
|
|
2093
|
-
(
|
|
2134
|
+
isMulti: j.multi,
|
|
2135
|
+
value: w[j.key]?.filter(
|
|
2136
|
+
(B) => O.includes(B.id)
|
|
2094
2137
|
),
|
|
2095
|
-
onChange: (
|
|
2096
|
-
|
|
2138
|
+
onChange: (B) => {
|
|
2139
|
+
Y(j.key, B);
|
|
2097
2140
|
},
|
|
2098
|
-
options: w[
|
|
2099
|
-
placeholder: `Select ${
|
|
2100
|
-
isDisabled:
|
|
2101
|
-
isClearable:
|
|
2141
|
+
options: w[j.key],
|
|
2142
|
+
placeholder: `Select ${j.multi ? "one or more" : "one"} ${j.label.toLowerCase()}`,
|
|
2143
|
+
isDisabled: i,
|
|
2144
|
+
isClearable: j.multi
|
|
2102
2145
|
}
|
|
2103
2146
|
)
|
|
2104
|
-
] },
|
|
2147
|
+
] }, j.key))
|
|
2105
2148
|
] })
|
|
2106
2149
|
] }),
|
|
2107
2150
|
/* @__PURE__ */ e.jsxs("div", { className: "col-span-2 lg:col-span-1 flex flex-col gap-4", children: [
|
|
@@ -2111,11 +2154,11 @@ const Kt = ({
|
|
|
2111
2154
|
le,
|
|
2112
2155
|
{
|
|
2113
2156
|
isMulti: !0,
|
|
2114
|
-
value:
|
|
2115
|
-
onChange: (
|
|
2157
|
+
value: y,
|
|
2158
|
+
onChange: (j) => E([...j]),
|
|
2116
2159
|
options: yn,
|
|
2117
|
-
isOptionDisabled: () =>
|
|
2118
|
-
isDisabled:
|
|
2160
|
+
isOptionDisabled: () => y.length >= bn,
|
|
2161
|
+
isDisabled: i
|
|
2119
2162
|
}
|
|
2120
2163
|
)
|
|
2121
2164
|
] }),
|
|
@@ -2124,10 +2167,10 @@ const Kt = ({
|
|
|
2124
2167
|
/* @__PURE__ */ e.jsx(
|
|
2125
2168
|
jn,
|
|
2126
2169
|
{
|
|
2127
|
-
options:
|
|
2128
|
-
value:
|
|
2129
|
-
onChange:
|
|
2130
|
-
editOnly:
|
|
2170
|
+
options: ee,
|
|
2171
|
+
value: N,
|
|
2172
|
+
onChange: t,
|
|
2173
|
+
editOnly: i
|
|
2131
2174
|
}
|
|
2132
2175
|
)
|
|
2133
2176
|
] })
|
|
@@ -2135,19 +2178,19 @@ const Kt = ({
|
|
|
2135
2178
|
/* @__PURE__ */ e.jsx(
|
|
2136
2179
|
"div",
|
|
2137
2180
|
{
|
|
2138
|
-
className:
|
|
2181
|
+
className: Zt(
|
|
2139
2182
|
"col-span-2 flex justify-end",
|
|
2140
|
-
(
|
|
2183
|
+
(d || i) && "hidden"
|
|
2141
2184
|
),
|
|
2142
2185
|
children: /* @__PURE__ */ e.jsxs(fe, { mt: 16, gap: 4, children: [
|
|
2143
|
-
/* @__PURE__ */ e.jsx(K, { colorScheme: "gray", isDisabled:
|
|
2186
|
+
/* @__PURE__ */ e.jsx(K, { colorScheme: "gray", isDisabled: f, onClick: o, children: "Cancel" }),
|
|
2144
2187
|
/* @__PURE__ */ e.jsx(
|
|
2145
2188
|
K,
|
|
2146
2189
|
{
|
|
2147
2190
|
colorScheme: "blue",
|
|
2148
|
-
isDisabled:
|
|
2149
|
-
isLoading:
|
|
2150
|
-
onClick:
|
|
2191
|
+
isDisabled: f || !u || !q,
|
|
2192
|
+
isLoading: f,
|
|
2193
|
+
onClick: _,
|
|
2151
2194
|
children: "Save changes"
|
|
2152
2195
|
}
|
|
2153
2196
|
)
|
|
@@ -2155,102 +2198,102 @@ const Kt = ({
|
|
|
2155
2198
|
}
|
|
2156
2199
|
)
|
|
2157
2200
|
] });
|
|
2158
|
-
}, ce = ({ children:
|
|
2159
|
-
id:
|
|
2160
|
-
onCancel:
|
|
2161
|
-
onSave:
|
|
2162
|
-
onError:
|
|
2163
|
-
hideButtons:
|
|
2164
|
-
quantumOwned:
|
|
2165
|
-
setButtonOnClick:
|
|
2166
|
-
setButtonDisabled:
|
|
2201
|
+
}, ce = ({ children: s }) => /* @__PURE__ */ e.jsx(He, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: s }), Un = ({
|
|
2202
|
+
id: s,
|
|
2203
|
+
onCancel: n,
|
|
2204
|
+
onSave: o,
|
|
2205
|
+
onError: c,
|
|
2206
|
+
hideButtons: d,
|
|
2207
|
+
quantumOwned: a,
|
|
2208
|
+
setButtonOnClick: l,
|
|
2209
|
+
setButtonDisabled: g
|
|
2167
2210
|
}) => {
|
|
2168
|
-
const [{ data:
|
|
2169
|
-
query:
|
|
2170
|
-
}), [{ data:
|
|
2171
|
-
query:
|
|
2172
|
-
variables: { id:
|
|
2173
|
-
pause: !
|
|
2174
|
-
}), [{ data:
|
|
2211
|
+
const [{ data: i }] = de({
|
|
2212
|
+
query: a ? Et : _t
|
|
2213
|
+
}), [{ data: x }] = de({
|
|
2214
|
+
query: zt,
|
|
2215
|
+
variables: { id: s },
|
|
2216
|
+
pause: !s
|
|
2217
|
+
}), [{ data: h }] = de({
|
|
2175
2218
|
query: Gt
|
|
2176
|
-
}),
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
), [{ fetching:
|
|
2219
|
+
}), M = $(
|
|
2220
|
+
ve,
|
|
2221
|
+
h?.moduleCategories
|
|
2222
|
+
), [{ fetching: m }, S] = ie(it), [{ fetching: b }, r] = ie(ot), f = $(
|
|
2180
2223
|
ue,
|
|
2181
|
-
|
|
2182
|
-
) ?? [],
|
|
2183
|
-
...
|
|
2184
|
-
]), [
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
(
|
|
2224
|
+
a ? i?.quantumOwnedActions : i?.actions
|
|
2225
|
+
) ?? [], v = $(Le, x?.module), p = $(at, v?.moduleActions) ?? [], [L, F] = z([
|
|
2226
|
+
...p.map((O) => O.actionId) ?? []
|
|
2227
|
+
]), [G, U] = z(v?.name ?? ""), [D, T] = z([]), [I, y] = z(v?.description ?? "");
|
|
2228
|
+
re(() => {
|
|
2229
|
+
v && (F(p.map((O) => O.actionId)), U(v.name), y(v.description ?? ""), T(
|
|
2230
|
+
v.categories.map(
|
|
2231
|
+
(O) => $(ve, O).id
|
|
2189
2232
|
) ?? []
|
|
2190
2233
|
));
|
|
2191
|
-
}, [
|
|
2234
|
+
}, [v, p]);
|
|
2192
2235
|
const E = R(() => {
|
|
2193
|
-
let
|
|
2236
|
+
let O;
|
|
2194
2237
|
const V = {
|
|
2195
|
-
actions:
|
|
2196
|
-
name:
|
|
2197
|
-
categories:
|
|
2198
|
-
description:
|
|
2199
|
-
quantumOwned:
|
|
2238
|
+
actions: L,
|
|
2239
|
+
name: G,
|
|
2240
|
+
categories: D.filter((w) => w !== "other"),
|
|
2241
|
+
description: I,
|
|
2242
|
+
quantumOwned: a
|
|
2200
2243
|
};
|
|
2201
|
-
|
|
2202
|
-
id:
|
|
2244
|
+
v ? O = S({
|
|
2245
|
+
id: v.id,
|
|
2203
2246
|
input: V
|
|
2204
|
-
}) :
|
|
2247
|
+
}) : O = r({
|
|
2205
2248
|
input: V
|
|
2206
|
-
}),
|
|
2207
|
-
w ?
|
|
2249
|
+
}), O.then(({ error: w }) => {
|
|
2250
|
+
w ? c(w) : o();
|
|
2208
2251
|
});
|
|
2209
2252
|
}, [
|
|
2210
|
-
s,
|
|
2211
|
-
C,
|
|
2212
|
-
M,
|
|
2213
|
-
z,
|
|
2214
|
-
N,
|
|
2215
|
-
_,
|
|
2216
|
-
j,
|
|
2217
2253
|
r,
|
|
2218
|
-
|
|
2219
|
-
|
|
2254
|
+
S,
|
|
2255
|
+
L,
|
|
2256
|
+
G,
|
|
2257
|
+
I,
|
|
2258
|
+
D,
|
|
2259
|
+
v,
|
|
2260
|
+
o,
|
|
2261
|
+
c,
|
|
2262
|
+
a
|
|
2220
2263
|
]);
|
|
2221
|
-
return
|
|
2222
|
-
|
|
2223
|
-
cancelButton:
|
|
2224
|
-
saveButton:
|
|
2264
|
+
return re(() => {
|
|
2265
|
+
g && g({
|
|
2266
|
+
cancelButton: m || b,
|
|
2267
|
+
saveButton: m || b || !G || I.trim().split(/\s+/).filter(Boolean).length > 40
|
|
2225
2268
|
});
|
|
2226
|
-
}, [
|
|
2227
|
-
|
|
2228
|
-
cancelButton:
|
|
2269
|
+
}, [g, m, b, L, G, I]), re(() => {
|
|
2270
|
+
l && l({
|
|
2271
|
+
cancelButton: n,
|
|
2229
2272
|
saveButton: E
|
|
2230
2273
|
});
|
|
2231
|
-
}, [
|
|
2274
|
+
}, [l, n, E]), /* @__PURE__ */ e.jsxs(Z, { width: "100%", children: [
|
|
2232
2275
|
/* @__PURE__ */ e.jsx(
|
|
2233
2276
|
un,
|
|
2234
2277
|
{
|
|
2235
|
-
name:
|
|
2236
|
-
setName:
|
|
2237
|
-
actions:
|
|
2238
|
-
selectedActionIds:
|
|
2278
|
+
name: G,
|
|
2279
|
+
setName: U,
|
|
2280
|
+
actions: f,
|
|
2281
|
+
selectedActionIds: L,
|
|
2239
2282
|
setSelectedActionIds: F,
|
|
2240
|
-
availableCategories:
|
|
2241
|
-
selectedCategoryIds:
|
|
2242
|
-
setSelectedCategoryIds:
|
|
2243
|
-
description:
|
|
2244
|
-
setDescription:
|
|
2283
|
+
availableCategories: M ?? [],
|
|
2284
|
+
selectedCategoryIds: D,
|
|
2285
|
+
setSelectedCategoryIds: T,
|
|
2286
|
+
description: I,
|
|
2287
|
+
setDescription: y
|
|
2245
2288
|
}
|
|
2246
2289
|
),
|
|
2247
|
-
!
|
|
2290
|
+
!d && /* @__PURE__ */ e.jsx(se, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(fe, { mt: 16, gap: 4, children: [
|
|
2248
2291
|
/* @__PURE__ */ e.jsx(
|
|
2249
2292
|
K,
|
|
2250
2293
|
{
|
|
2251
2294
|
colorScheme: "gray",
|
|
2252
|
-
isDisabled:
|
|
2253
|
-
onClick:
|
|
2295
|
+
isDisabled: m || b,
|
|
2296
|
+
onClick: n,
|
|
2254
2297
|
children: "Cancel"
|
|
2255
2298
|
}
|
|
2256
2299
|
),
|
|
@@ -2258,8 +2301,8 @@ const Kt = ({
|
|
|
2258
2301
|
K,
|
|
2259
2302
|
{
|
|
2260
2303
|
colorScheme: "blue",
|
|
2261
|
-
isDisabled:
|
|
2262
|
-
isLoading:
|
|
2304
|
+
isDisabled: m || b || !G || I.trim().split(/\s+/).filter(Boolean).length > 40,
|
|
2305
|
+
isLoading: m || b,
|
|
2263
2306
|
onClick: E,
|
|
2264
2307
|
children: "Save"
|
|
2265
2308
|
}
|
|
@@ -2269,11 +2312,11 @@ const Kt = ({
|
|
|
2269
2312
|
};
|
|
2270
2313
|
export {
|
|
2271
2314
|
dn as ActivityList,
|
|
2272
|
-
|
|
2273
|
-
|
|
2315
|
+
Gn as CopyActivityForm,
|
|
2316
|
+
Pn as CopyModuleForm,
|
|
2274
2317
|
un as ModuleForm,
|
|
2275
2318
|
xn as ParameterEditList,
|
|
2276
2319
|
jn as ParameterEditSelect,
|
|
2277
|
-
|
|
2278
|
-
|
|
2320
|
+
Wn as UpsertActivityForm,
|
|
2321
|
+
Un as UpsertModuleForm
|
|
2279
2322
|
};
|