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