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