quantum-component-library 1.4.47-dev.9 → 1.4.47-qa
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/README.md +115 -115
- package/dist/components.cjs +1 -1
- package/dist/components.js +113 -104
- package/dist/lib/services/rom.json.d.ts +223 -223
- package/package.json +133 -133
package/dist/components.js
CHANGED
|
@@ -94,14 +94,14 @@ const Jt = ({
|
|
|
94
94
|
collect: (h) => ({
|
|
95
95
|
handlerId: h.getHandlerId()?.toString() ?? ""
|
|
96
96
|
}),
|
|
97
|
-
hover: (h,
|
|
97
|
+
hover: (h, C) => {
|
|
98
98
|
if (!l.current)
|
|
99
99
|
return;
|
|
100
100
|
const r = h.index, a = n;
|
|
101
101
|
if (r === a)
|
|
102
102
|
return;
|
|
103
|
-
const p = l.current?.getBoundingClientRect(), g = (p.bottom - p.top) / 2,
|
|
104
|
-
r < a &&
|
|
103
|
+
const p = l.current?.getBoundingClientRect(), g = (p.bottom - p.top) / 2, w = C.getClientOffset().y - p.top;
|
|
104
|
+
r < a && w < g || r > a && w > g || (u(r, a), h.index = a);
|
|
105
105
|
}
|
|
106
106
|
}), [{ isDragging: o }, I] = $t({
|
|
107
107
|
type: s,
|
|
@@ -159,7 +159,7 @@ const Jt = ({
|
|
|
159
159
|
isDisabled: A,
|
|
160
160
|
...h
|
|
161
161
|
}) => {
|
|
162
|
-
const [
|
|
162
|
+
const [C, r] = P([void 0, void 0]), a = C[0], p = C[1], g = v && n < -5 && i > 5, y = Number(c?.[0] ?? p ?? n) > 0 ? 1 : -1, w = Number(c?.[1] ?? p ?? i) < 0 ? -1 : 1, G = j?.[0] === j?.[1], k = c?.[0], T = c?.[1];
|
|
163
163
|
ne(() => {
|
|
164
164
|
k !== void 0 && T !== void 0 && r([k.toFixed(0), T.toFixed(0)]);
|
|
165
165
|
}, [k, T, r]);
|
|
@@ -175,10 +175,10 @@ const Jt = ({
|
|
|
175
175
|
[u]
|
|
176
176
|
), _ = R(() => {
|
|
177
177
|
r(([b, z]) => {
|
|
178
|
-
const Z = isNaN(Number(b)) ? n : Number(b), t = isNaN(Number(z)) ? i : Number(z), m = ye(Number(Z), y),
|
|
178
|
+
const Z = isNaN(Number(b)) ? n : Number(b), t = isNaN(Number(z)) ? i : Number(z), m = ye(Number(Z), y), S = ye(Number(t), w), D = y < 0 ? Math.max(m, n) : Math.min(m, i), $ = w < 0 ? Math.max(S, n) : Math.min(S, i);
|
|
179
179
|
return D > $ ? (u([$, D]), [$.toFixed(0), D.toFixed(0)]) : (u([D, $]), [D.toFixed(0), $.toFixed(0)]);
|
|
180
180
|
});
|
|
181
|
-
}, [u, r, y,
|
|
181
|
+
}, [u, r, y, w, n, i]), f = R(
|
|
182
182
|
(b) => {
|
|
183
183
|
const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b), y);
|
|
184
184
|
r(([Z, t]) => [z.toString(), t]);
|
|
@@ -186,10 +186,10 @@ const Jt = ({
|
|
|
186
186
|
[r, y]
|
|
187
187
|
), M = R(
|
|
188
188
|
(b) => {
|
|
189
|
-
const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b),
|
|
189
|
+
const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b), w);
|
|
190
190
|
r(([Z, t]) => [Z, z.toString()]);
|
|
191
191
|
},
|
|
192
|
-
[r,
|
|
192
|
+
[r, w]
|
|
193
193
|
), L = F(
|
|
194
194
|
() => d === "xs" ? "0.75rem" : void 0,
|
|
195
195
|
[d]
|
|
@@ -198,8 +198,8 @@ const Jt = ({
|
|
|
198
198
|
const Z = Number(z.target.value);
|
|
199
199
|
if (!a || !p || ![-1, 1].includes(Z))
|
|
200
200
|
return;
|
|
201
|
-
const t = (D) => Z < 0 ? -1 * Math.abs(D) : Math.abs(D), m = b ? t(Number(a)) : Number(a),
|
|
202
|
-
m >
|
|
201
|
+
const t = (D) => Z < 0 ? -1 * Math.abs(D) : Math.abs(D), m = b ? t(Number(a)) : Number(a), S = b ? Number(p) : t(Number(p));
|
|
202
|
+
m > S ? u([S, m]) : u([m, S]);
|
|
203
203
|
},
|
|
204
204
|
[a, p, u]
|
|
205
205
|
);
|
|
@@ -337,7 +337,7 @@ const Jt = ({
|
|
|
337
337
|
{
|
|
338
338
|
size: d ?? "sm",
|
|
339
339
|
min: 0,
|
|
340
|
-
max:
|
|
340
|
+
max: w < 0 ? Math.abs(k ?? n) : i,
|
|
341
341
|
precision: 0,
|
|
342
342
|
value: p === "" ? "" : Math.abs(Number(p ?? i)),
|
|
343
343
|
onChange: M,
|
|
@@ -363,7 +363,7 @@ const Jt = ({
|
|
|
363
363
|
width: "auto",
|
|
364
364
|
size: d,
|
|
365
365
|
fontWeight: "bold",
|
|
366
|
-
value:
|
|
366
|
+
value: w,
|
|
367
367
|
onChange: (b) => X(!1, b),
|
|
368
368
|
isDisabled: G || A,
|
|
369
369
|
children: [
|
|
@@ -393,7 +393,14 @@ const Jt = ({
|
|
|
393
393
|
display: "flex",
|
|
394
394
|
alignItems: "center",
|
|
395
395
|
justifyContent: "center",
|
|
396
|
-
children: /* @__PURE__ */ e.jsx(
|
|
396
|
+
children: /* @__PURE__ */ e.jsx(
|
|
397
|
+
pt,
|
|
398
|
+
{
|
|
399
|
+
src: n,
|
|
400
|
+
boxSize: "1em",
|
|
401
|
+
alt: "Quantum-owned activity"
|
|
402
|
+
}
|
|
403
|
+
)
|
|
397
404
|
}
|
|
398
405
|
)
|
|
399
406
|
}
|
|
@@ -408,7 +415,7 @@ const Jt = ({
|
|
|
408
415
|
n.replace(/([A-Z])/g, " $1").trim()
|
|
409
416
|
)
|
|
410
417
|
).join(", "), rn = (s, n) => !n || n.length == 0 ? s : s.filter(
|
|
411
|
-
(i) => i.useCases
|
|
418
|
+
(i) => i.useCases?.some((c) => n.includes(c.id)) ?? !1
|
|
412
419
|
), ln = ({
|
|
413
420
|
actions: s,
|
|
414
421
|
totalActions: n,
|
|
@@ -423,11 +430,11 @@ const Jt = ({
|
|
|
423
430
|
disableEdit: j,
|
|
424
431
|
disableCreate: A,
|
|
425
432
|
hideUseCase: h = !0,
|
|
426
|
-
tableProps:
|
|
433
|
+
tableProps: C,
|
|
427
434
|
containerProps: r,
|
|
428
435
|
quantumIconSrc: a = "/favicon.ico"
|
|
429
436
|
}) => {
|
|
430
|
-
const [p, g] = P(""), [y,
|
|
437
|
+
const [p, g] = P(""), [y, w] = P(), G = F(() => {
|
|
431
438
|
if (!s)
|
|
432
439
|
return;
|
|
433
440
|
const f = sn(s, p);
|
|
@@ -462,6 +469,7 @@ const Jt = ({
|
|
|
462
469
|
Le,
|
|
463
470
|
{
|
|
464
471
|
label: _ ? N ? "Quantum-owned activities are selected and will be skipped" : "Selected activities are quantum-owned and cannot be deleted" : void 0,
|
|
472
|
+
shouldWrapChildren: !0,
|
|
465
473
|
children: /* @__PURE__ */ e.jsx(
|
|
466
474
|
J,
|
|
467
475
|
{
|
|
@@ -488,12 +496,12 @@ const Jt = ({
|
|
|
488
496
|
{
|
|
489
497
|
setSearch: g,
|
|
490
498
|
actions: s,
|
|
491
|
-
updateUseCases:
|
|
499
|
+
updateUseCases: w,
|
|
492
500
|
hideUseCaseFilter: h
|
|
493
501
|
}
|
|
494
502
|
)
|
|
495
503
|
] }),
|
|
496
|
-
/* @__PURE__ */ e.jsx(qe, { mr: "2rem", overflowX: "hidden", ...
|
|
504
|
+
/* @__PURE__ */ e.jsx(qe, { mr: "2rem", overflowX: "hidden", ...C, children: /* @__PURE__ */ e.jsxs(He, { size: "md", variant: "simple", children: [
|
|
497
505
|
/* @__PURE__ */ e.jsx(Ye, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
498
506
|
/* @__PURE__ */ e.jsxs(ue, { fontWeight: "normal", children: [
|
|
499
507
|
"(showing ",
|
|
@@ -524,6 +532,7 @@ const Jt = ({
|
|
|
524
532
|
mt,
|
|
525
533
|
{
|
|
526
534
|
isChecked: f.selected,
|
|
535
|
+
"aria-label": "Select activity",
|
|
527
536
|
onChange: (M) => d(f, M.target.checked)
|
|
528
537
|
}
|
|
529
538
|
),
|
|
@@ -541,7 +550,7 @@ const Jt = ({
|
|
|
541
550
|
!f.quantumOwned && u && /* @__PURE__ */ e.jsx(
|
|
542
551
|
J,
|
|
543
552
|
{
|
|
544
|
-
|
|
553
|
+
isDisabled: j,
|
|
545
554
|
ml: "1em",
|
|
546
555
|
size: "sm",
|
|
547
556
|
variant: "link",
|
|
@@ -584,14 +593,14 @@ const Jt = ({
|
|
|
584
593
|
setButtonOnClick: l,
|
|
585
594
|
quantumOwned: d
|
|
586
595
|
}) => {
|
|
587
|
-
const v = Xe(), [o, I] = P("copy"), [j, A] = P(""), [h,
|
|
596
|
+
const v = Xe(), [o, I] = P("copy"), [j, A] = P(""), [h, C] = P([]), [r, a] = P(!1), [p] = le({
|
|
588
597
|
query: Ve
|
|
589
598
|
}), [g] = le({
|
|
590
599
|
query: Ot,
|
|
591
600
|
variables: { groupId: j },
|
|
592
601
|
pause: !j
|
|
593
602
|
// Only run when group is selected
|
|
594
|
-
}), [, y] = oe(De), [,
|
|
603
|
+
}), [, y] = oe(De), [, w] = oe(
|
|
595
604
|
et
|
|
596
605
|
), G = F(() => p.data?.groups ? p.data.groups.map(
|
|
597
606
|
(t) => U(tt, t)
|
|
@@ -602,13 +611,13 @@ const Jt = ({
|
|
|
602
611
|
), [k, h]), N = R(
|
|
603
612
|
(t) => {
|
|
604
613
|
const m = t?.value || "";
|
|
605
|
-
A(m),
|
|
614
|
+
A(m), C([]);
|
|
606
615
|
},
|
|
607
616
|
[]
|
|
608
617
|
), E = R(
|
|
609
618
|
(t) => {
|
|
610
|
-
const m = t.map((
|
|
611
|
-
|
|
619
|
+
const m = t.map((S) => S.value);
|
|
620
|
+
C(m);
|
|
612
621
|
},
|
|
613
622
|
[]
|
|
614
623
|
), _ = R(
|
|
@@ -616,7 +625,7 @@ const Jt = ({
|
|
|
616
625
|
const m = U(
|
|
617
626
|
me,
|
|
618
627
|
t.categories
|
|
619
|
-
),
|
|
628
|
+
), S = {
|
|
620
629
|
...t,
|
|
621
630
|
name: `${t.name} (Copy)`,
|
|
622
631
|
// Add "(Copy)" suffix to distinguish
|
|
@@ -633,7 +642,7 @@ const Jt = ({
|
|
|
633
642
|
categories: m?.map(($) => $.id),
|
|
634
643
|
quantumOwned: d,
|
|
635
644
|
id: void 0
|
|
636
|
-
}, D = await y({ fields:
|
|
645
|
+
}, D = await y({ fields: S });
|
|
637
646
|
if (D.error)
|
|
638
647
|
throw new Error(D.error.message);
|
|
639
648
|
if (D.data?.createAction)
|
|
@@ -643,7 +652,7 @@ const Jt = ({
|
|
|
643
652
|
[y, d]
|
|
644
653
|
), f = R(
|
|
645
654
|
async (t) => {
|
|
646
|
-
const m = await
|
|
655
|
+
const m = await w({ id: t.id });
|
|
647
656
|
if (m.error)
|
|
648
657
|
throw new Error(m.error.message);
|
|
649
658
|
if (m.data?.convertActionToQuantumOwned)
|
|
@@ -653,7 +662,7 @@ const Jt = ({
|
|
|
653
662
|
);
|
|
654
663
|
throw new Error("No action data returned");
|
|
655
664
|
},
|
|
656
|
-
[
|
|
665
|
+
[w]
|
|
657
666
|
), M = R(async () => {
|
|
658
667
|
if (a(!0), !T.length) {
|
|
659
668
|
const t = new Error(
|
|
@@ -665,10 +674,10 @@ const Jt = ({
|
|
|
665
674
|
try {
|
|
666
675
|
const t = [];
|
|
667
676
|
let m = 0;
|
|
668
|
-
const
|
|
677
|
+
const S = o === "copy" ? _ : f, D = o === "copy" ? "copy" : "convert";
|
|
669
678
|
for (const $ of T)
|
|
670
679
|
try {
|
|
671
|
-
const Q = await
|
|
680
|
+
const Q = await S($);
|
|
672
681
|
t.push(Q);
|
|
673
682
|
} catch (Q) {
|
|
674
683
|
console.error(
|
|
@@ -684,18 +693,18 @@ const Jt = ({
|
|
|
684
693
|
status: m > 0 ? "warning" : "success",
|
|
685
694
|
duration: 3e3,
|
|
686
695
|
isClosable: !0
|
|
687
|
-
}), s?.(), A(""),
|
|
696
|
+
}), s?.(), A(""), C([]);
|
|
688
697
|
} else
|
|
689
698
|
throw new Error(`Failed to ${D} any activities`);
|
|
690
699
|
} catch (t) {
|
|
691
|
-
const m = o === "copy" ? "copy" : "convert",
|
|
700
|
+
const m = o === "copy" ? "copy" : "convert", S = t instanceof Error ? t.message : `Failed to ${m} activities`;
|
|
692
701
|
v({
|
|
693
702
|
title: `${o === "copy" ? "Copy" : "Convert"} failed`,
|
|
694
|
-
description:
|
|
703
|
+
description: S,
|
|
695
704
|
status: "error",
|
|
696
705
|
duration: 5e3,
|
|
697
706
|
isClosable: !0
|
|
698
|
-
}), i?.(t instanceof Error ? t : new Error(
|
|
707
|
+
}), i?.(t instanceof Error ? t : new Error(S));
|
|
699
708
|
} finally {
|
|
700
709
|
a(!1);
|
|
701
710
|
}
|
|
@@ -708,7 +717,7 @@ const Jt = ({
|
|
|
708
717
|
s,
|
|
709
718
|
i
|
|
710
719
|
]), L = R(() => {
|
|
711
|
-
A(""),
|
|
720
|
+
A(""), C([]), I("copy"), n?.();
|
|
712
721
|
}, [n]);
|
|
713
722
|
ne(() => {
|
|
714
723
|
u && u({
|
|
@@ -738,7 +747,7 @@ const Jt = ({
|
|
|
738
747
|
{
|
|
739
748
|
value: o,
|
|
740
749
|
onChange: (t) => {
|
|
741
|
-
I(t),
|
|
750
|
+
I(t), C([]);
|
|
742
751
|
},
|
|
743
752
|
children: /* @__PURE__ */ e.jsxs(te, { spacing: 6, children: [
|
|
744
753
|
/* @__PURE__ */ e.jsx(Ae, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ee, { align: "start", spacing: 1, children: [
|
|
@@ -874,7 +883,7 @@ const Jt = ({
|
|
|
874
883
|
/* @__PURE__ */ e.jsxs(x, { children: [
|
|
875
884
|
/* @__PURE__ */ e.jsx("strong", { children: "Use Cases:" }),
|
|
876
885
|
" ",
|
|
877
|
-
t.useCases.map((
|
|
886
|
+
t.useCases.map((S) => S.name).join(", ") || "None"
|
|
878
887
|
] })
|
|
879
888
|
]
|
|
880
889
|
}
|
|
@@ -939,14 +948,14 @@ const Jt = ({
|
|
|
939
948
|
setButtonOnClick: l,
|
|
940
949
|
quantumOwned: d
|
|
941
950
|
}) => {
|
|
942
|
-
const v = Xe(), [o, I] = P(""), [j, A] = P([]), [h,
|
|
951
|
+
const v = Xe(), [o, I] = P(""), [j, A] = P([]), [h, C] = P(!1), [r, a] = P("copy"), [p] = le({
|
|
943
952
|
query: Ve
|
|
944
953
|
}), [g] = le({
|
|
945
954
|
query: It,
|
|
946
955
|
variables: { groupId: o },
|
|
947
956
|
pause: !o
|
|
948
957
|
// Only run when group is selected
|
|
949
|
-
}), [, y] = oe(ot), [,
|
|
958
|
+
}), [, y] = oe(ot), [, w] = oe(st), [, G] = oe(De), [, k] = oe(
|
|
950
959
|
et
|
|
951
960
|
), T = F(() => p.data?.groups ? p.data.groups.map(
|
|
952
961
|
(t) => U(tt, t)
|
|
@@ -954,13 +963,13 @@ const Jt = ({
|
|
|
954
963
|
Ce,
|
|
955
964
|
g.data?.modules
|
|
956
965
|
).map((m) => {
|
|
957
|
-
const
|
|
966
|
+
const S = U(
|
|
958
967
|
nt,
|
|
959
968
|
m.moduleActions
|
|
960
969
|
);
|
|
961
970
|
return {
|
|
962
971
|
...m,
|
|
963
|
-
moduleActions:
|
|
972
|
+
moduleActions: S.map((D) => ({
|
|
964
973
|
...D,
|
|
965
974
|
action: U(ae, D.action)
|
|
966
975
|
})),
|
|
@@ -979,13 +988,13 @@ const Jt = ({
|
|
|
979
988
|
[]
|
|
980
989
|
), f = R(
|
|
981
990
|
(t) => {
|
|
982
|
-
const m = t.map((
|
|
991
|
+
const m = t.map((S) => S.value);
|
|
983
992
|
A(m);
|
|
984
993
|
},
|
|
985
994
|
[]
|
|
986
995
|
), M = R(async () => {
|
|
987
|
-
if (
|
|
988
|
-
|
|
996
|
+
if (C(!0), !E.length) {
|
|
997
|
+
C(!1);
|
|
989
998
|
const t = new Error(
|
|
990
999
|
`No modules selected for ${r === "convert" ? "converting" : "copying"}`
|
|
991
1000
|
);
|
|
@@ -995,11 +1004,11 @@ const Jt = ({
|
|
|
995
1004
|
try {
|
|
996
1005
|
const t = [];
|
|
997
1006
|
let m = 0;
|
|
998
|
-
for (const
|
|
1007
|
+
for (const S of E)
|
|
999
1008
|
try {
|
|
1000
|
-
let D =
|
|
1009
|
+
let D = S.moduleActions.map(($) => $.actionId);
|
|
1001
1010
|
if (d) {
|
|
1002
|
-
const $ =
|
|
1011
|
+
const $ = S.moduleActions.map((B) => B.action), Q = async (B) => {
|
|
1003
1012
|
if (r === "copy") {
|
|
1004
1013
|
if (B.quantumOwned) return B;
|
|
1005
1014
|
const Ie = U(
|
|
@@ -1035,13 +1044,13 @@ const Jt = ({
|
|
|
1035
1044
|
}
|
|
1036
1045
|
if (r === "convert") {
|
|
1037
1046
|
const $ = {
|
|
1038
|
-
name:
|
|
1039
|
-
description:
|
|
1047
|
+
name: S.name,
|
|
1048
|
+
description: S.description || void 0,
|
|
1040
1049
|
actions: D,
|
|
1041
|
-
categories:
|
|
1050
|
+
categories: S.categories.map((K) => K.id),
|
|
1042
1051
|
quantumOwned: !0
|
|
1043
|
-
}, Q = await
|
|
1044
|
-
id:
|
|
1052
|
+
}, Q = await w({
|
|
1053
|
+
id: S.id,
|
|
1045
1054
|
input: $
|
|
1046
1055
|
});
|
|
1047
1056
|
if (Q.error) throw new Error(Q.error.message);
|
|
@@ -1054,10 +1063,10 @@ const Jt = ({
|
|
|
1054
1063
|
}
|
|
1055
1064
|
} else {
|
|
1056
1065
|
const $ = {
|
|
1057
|
-
name: `${
|
|
1058
|
-
description:
|
|
1066
|
+
name: `${S.name} (Copy)`,
|
|
1067
|
+
description: S.description || void 0,
|
|
1059
1068
|
actions: D,
|
|
1060
|
-
categories:
|
|
1069
|
+
categories: S.categories.map((K) => K.id),
|
|
1061
1070
|
quantumOwned: d
|
|
1062
1071
|
}, Q = await y({ input: $ });
|
|
1063
1072
|
if (Q.error) throw new Error(Q.error.message);
|
|
@@ -1071,15 +1080,15 @@ const Jt = ({
|
|
|
1071
1080
|
}
|
|
1072
1081
|
} catch (D) {
|
|
1073
1082
|
console.error(
|
|
1074
|
-
`Failed to ${r === "convert" ? "convert" : "copy"} module "${
|
|
1083
|
+
`Failed to ${r === "convert" ? "convert" : "copy"} module "${S.name}":`,
|
|
1075
1084
|
D
|
|
1076
1085
|
), m++;
|
|
1077
1086
|
}
|
|
1078
1087
|
if (t.length > 0) {
|
|
1079
|
-
const
|
|
1088
|
+
const S = t.length, D = E.length;
|
|
1080
1089
|
v({
|
|
1081
1090
|
title: m > 0 ? `Partial ${r === "convert" ? "convert" : "copy"} completed` : `Modules ${r === "convert" ? "converted" : "copied"} successfully`,
|
|
1082
|
-
description: m > 0 ? `${
|
|
1091
|
+
description: m > 0 ? `${S} of ${D} modules ${r === "convert" ? "converted" : "copied"} successfully` : `${S} module${S > 1 ? "s" : ""} ${r === "convert" ? "converted" : "copied"} successfully`,
|
|
1083
1092
|
status: m > 0 ? "warning" : "success",
|
|
1084
1093
|
duration: 3e3,
|
|
1085
1094
|
isClosable: !0
|
|
@@ -1098,12 +1107,12 @@ const Jt = ({
|
|
|
1098
1107
|
isClosable: !0
|
|
1099
1108
|
}), i?.(t instanceof Error ? t : new Error(m));
|
|
1100
1109
|
} finally {
|
|
1101
|
-
|
|
1110
|
+
C(!1);
|
|
1102
1111
|
}
|
|
1103
1112
|
}, [
|
|
1104
1113
|
E,
|
|
1105
1114
|
y,
|
|
1106
|
-
|
|
1115
|
+
w,
|
|
1107
1116
|
v,
|
|
1108
1117
|
s,
|
|
1109
1118
|
i,
|
|
@@ -1259,7 +1268,7 @@ const Jt = ({
|
|
|
1259
1268
|
/* @__PURE__ */ e.jsxs(x, { children: [
|
|
1260
1269
|
/* @__PURE__ */ e.jsx("strong", { children: "Categories:" }),
|
|
1261
1270
|
" ",
|
|
1262
|
-
t.categories.map((
|
|
1271
|
+
t.categories.map((S) => S.name).join(", ") || "None"
|
|
1263
1272
|
] })
|
|
1264
1273
|
]
|
|
1265
1274
|
}
|
|
@@ -1342,12 +1351,12 @@ const Jt = ({
|
|
|
1342
1351
|
const A = gt(), h = F(() => i.map((y) => ({
|
|
1343
1352
|
...y,
|
|
1344
1353
|
selected: c.includes(y.id)
|
|
1345
|
-
})), [i, c]),
|
|
1346
|
-
() => c.map((y) =>
|
|
1347
|
-
[
|
|
1354
|
+
})), [i, c]), C = F(() => i.reduce((y, w) => (y[w.id] = w, y), {}), [i]), r = F(
|
|
1355
|
+
() => c.map((y) => C[y]),
|
|
1356
|
+
[c, C]
|
|
1348
1357
|
), a = R(
|
|
1349
|
-
(y,
|
|
1350
|
-
u(
|
|
1358
|
+
(y, w) => {
|
|
1359
|
+
u(w ? [...c, y.id] : c.filter((G) => G !== y.id));
|
|
1351
1360
|
},
|
|
1352
1361
|
[c, u]
|
|
1353
1362
|
), p = R(
|
|
@@ -1464,12 +1473,11 @@ const Jt = ({
|
|
|
1464
1473
|
se,
|
|
1465
1474
|
{
|
|
1466
1475
|
isDisabled: s.length === 0,
|
|
1467
|
-
isClearable: !0,
|
|
1468
1476
|
options: u,
|
|
1469
|
-
value: c.filter((l) => n.includes(l.id)).map((l) => ({
|
|
1477
|
+
value: n.length === 0 ? { value: "other", label: "Other" } : c.filter((l) => n.includes(l.id)).map((l) => ({
|
|
1470
1478
|
value: l.id,
|
|
1471
1479
|
label: l.name
|
|
1472
|
-
})),
|
|
1480
|
+
}))[0],
|
|
1473
1481
|
onChange: (l) => i(l ? [l.value] : []),
|
|
1474
1482
|
placeholder: "Select category"
|
|
1475
1483
|
}
|
|
@@ -1559,37 +1567,37 @@ const Jt = ({
|
|
|
1559
1567
|
lockRanges: d,
|
|
1560
1568
|
...v
|
|
1561
1569
|
}) => {
|
|
1562
|
-
const o = F(() => [...s].sort((h,
|
|
1563
|
-
const r = Ge.indexOf(h.plane), a = Ge.indexOf(
|
|
1570
|
+
const o = F(() => [...s].sort((h, C) => {
|
|
1571
|
+
const r = Ge.indexOf(h.plane), a = Ge.indexOf(C.plane);
|
|
1564
1572
|
return r - a;
|
|
1565
1573
|
}), [s]), I = R((h) => "segment" in h.id ? it(h.id.segment, h.plane, !0) ?? "Unknown" : lt(h.id.joint, h.plane, !0) ?? "Unknown", []), j = R(
|
|
1566
|
-
(h,
|
|
1574
|
+
(h, C) => {
|
|
1567
1575
|
const r = o.findIndex(
|
|
1568
|
-
(p) => p.id ===
|
|
1576
|
+
(p) => p.id === C.id && p.plane === C.plane
|
|
1569
1577
|
);
|
|
1570
1578
|
let a = [...o];
|
|
1571
|
-
i && (
|
|
1579
|
+
i && (C = { ...C, kind: i }), a[r] = C, d && (a = a.map((p) => ({
|
|
1572
1580
|
...p,
|
|
1573
|
-
min:
|
|
1574
|
-
max:
|
|
1581
|
+
min: C.min,
|
|
1582
|
+
max: C.max
|
|
1575
1583
|
}))), n(a);
|
|
1576
1584
|
},
|
|
1577
1585
|
[n, o, i, d]
|
|
1578
1586
|
), A = R(
|
|
1579
1587
|
(h) => {
|
|
1580
|
-
const
|
|
1588
|
+
const C = o.filter(
|
|
1581
1589
|
(r) => r.id !== h.id || r.plane !== h.plane
|
|
1582
1590
|
);
|
|
1583
|
-
n(
|
|
1591
|
+
n(C);
|
|
1584
1592
|
},
|
|
1585
1593
|
[n, o]
|
|
1586
1594
|
);
|
|
1587
|
-
return /* @__PURE__ */ e.jsx(ee, { alignItems: "flex-start", overflowY: "auto", ...v, children: o.map((h,
|
|
1595
|
+
return /* @__PURE__ */ e.jsx(ee, { alignItems: "flex-start", overflowY: "auto", ...v, children: o.map((h, C) => /* @__PURE__ */ e.jsx(
|
|
1588
1596
|
pn,
|
|
1589
1597
|
{
|
|
1590
1598
|
label: I(h),
|
|
1591
1599
|
parameter: h,
|
|
1592
|
-
onChange: (r) => j(
|
|
1600
|
+
onChange: (r) => j(C, r),
|
|
1593
1601
|
onRemove: c || l ? void 0 : () => A(h),
|
|
1594
1602
|
forceKind: i,
|
|
1595
1603
|
disableKind: u || l,
|
|
@@ -1717,7 +1725,7 @@ const Jt = ({
|
|
|
1717
1725
|
return A.filter(
|
|
1718
1726
|
(p) => ve(p.value) === ve(a.id) && p.plane === a.plane
|
|
1719
1727
|
);
|
|
1720
|
-
}, [A, n, l]),
|
|
1728
|
+
}, [A, n, l]), C = F(
|
|
1721
1729
|
() => A.filter(
|
|
1722
1730
|
(a) => n.some((p) => be(p.id, a.value) && p.plane === a.plane)
|
|
1723
1731
|
),
|
|
@@ -1727,11 +1735,11 @@ const Jt = ({
|
|
|
1727
1735
|
const p = a.map((g) => {
|
|
1728
1736
|
const y = n.find(
|
|
1729
1737
|
(N) => be(N.id, g.value) && N.plane === g.plane
|
|
1730
|
-
),
|
|
1738
|
+
), w = s.find(
|
|
1731
1739
|
(N) => be(N.id, g.value) && N.plane === g.plane
|
|
1732
1740
|
), G = l ? n.find(
|
|
1733
1741
|
(N) => ve(N.id) === ve(g.value) && N.plane === g.plane
|
|
1734
|
-
) : void 0, k = G && !y ? G.min :
|
|
1742
|
+
) : void 0, k = G && !y ? G.min : w && w.min ? w.min : 0, T = G && !y ? G.max : w && w.max ? w.max : 0;
|
|
1735
1743
|
return y ?? {
|
|
1736
1744
|
id: g.value,
|
|
1737
1745
|
plane: g.plane,
|
|
@@ -1755,8 +1763,8 @@ const Jt = ({
|
|
|
1755
1763
|
{
|
|
1756
1764
|
isMulti: !u,
|
|
1757
1765
|
placeholder: n.length ? `${n.length} selected` : "Search...",
|
|
1758
|
-
value:
|
|
1759
|
-
isDisabled: d ||
|
|
1766
|
+
value: C,
|
|
1767
|
+
isDisabled: d || C.length >= (j ?? 1 / 0),
|
|
1760
1768
|
onChange: (a) => Array.isArray(a) ? r([...a]) : r(a !== null ? [a] : []),
|
|
1761
1769
|
options: h,
|
|
1762
1770
|
controlShouldRenderValue: !1
|
|
@@ -1833,25 +1841,25 @@ const Jt = ({
|
|
|
1833
1841
|
quantumOwned: v,
|
|
1834
1842
|
isView: o
|
|
1835
1843
|
}) => {
|
|
1836
|
-
const [{ fetching: I }, j] = oe(De), [{ fetching: A }, h] = oe(Nt), [{ data:
|
|
1844
|
+
const [{ fetching: I }, j] = oe(De), [{ fetching: A }, h] = oe(Nt), [{ data: C }] = le({
|
|
1837
1845
|
query: Lt,
|
|
1838
1846
|
variables: { id: s ?? "" },
|
|
1839
1847
|
pause: !s
|
|
1840
1848
|
}), r = U(
|
|
1841
1849
|
ae,
|
|
1842
|
-
|
|
1843
|
-
), a = I || A, p = !!r && !!s, [g, y] = P(""), [
|
|
1850
|
+
C?.getActionById
|
|
1851
|
+
), a = I || A, p = !!r && !!s, [g, y] = P(""), [w, G] = P(""), [k, T] = P(""), [N, E] = P(""), [_, f] = P(), [M, L] = P([]), [X, b] = P([]), [z, Z] = P([]), t = F(
|
|
1844
1852
|
() => X.map((O) => O.value),
|
|
1845
1853
|
[X]
|
|
1846
|
-
), m = Yt(t), [{ data:
|
|
1854
|
+
), m = Yt(t), [{ data: S }] = le({
|
|
1847
1855
|
query: rt
|
|
1848
1856
|
}), D = F(() => U(
|
|
1849
1857
|
me,
|
|
1850
|
-
|
|
1858
|
+
S?.moduleCategories
|
|
1851
1859
|
)?.map((H) => ({
|
|
1852
1860
|
label: H.name,
|
|
1853
1861
|
value: H.id
|
|
1854
|
-
})), [
|
|
1862
|
+
})), [S?.moduleCategories]), $ = F(
|
|
1855
1863
|
() => Qe(Object.values(Pt), Pe),
|
|
1856
1864
|
[]
|
|
1857
1865
|
), [Q, K] = P([]), B = g.length > 0, [ce, Ie] = P({});
|
|
@@ -1883,7 +1891,7 @@ const Jt = ({
|
|
|
1883
1891
|
const pe = F(
|
|
1884
1892
|
() => JSON.stringify(ce) !== JSON.stringify({
|
|
1885
1893
|
name: g,
|
|
1886
|
-
description:
|
|
1894
|
+
description: w,
|
|
1887
1895
|
cameraPlacement: k,
|
|
1888
1896
|
videoLink: N,
|
|
1889
1897
|
activityType: _,
|
|
@@ -1896,7 +1904,7 @@ const Jt = ({
|
|
|
1896
1904
|
ce,
|
|
1897
1905
|
g,
|
|
1898
1906
|
t,
|
|
1899
|
-
|
|
1907
|
+
w,
|
|
1900
1908
|
k,
|
|
1901
1909
|
N,
|
|
1902
1910
|
_,
|
|
@@ -1907,7 +1915,7 @@ const Jt = ({
|
|
|
1907
1915
|
), de = R(() => {
|
|
1908
1916
|
const O = {
|
|
1909
1917
|
name: g,
|
|
1910
|
-
description:
|
|
1918
|
+
description: w,
|
|
1911
1919
|
cameraPlacement: k,
|
|
1912
1920
|
videoLink: N,
|
|
1913
1921
|
activityType: _,
|
|
@@ -1936,7 +1944,7 @@ const Jt = ({
|
|
|
1936
1944
|
s,
|
|
1937
1945
|
g,
|
|
1938
1946
|
t,
|
|
1939
|
-
|
|
1947
|
+
w,
|
|
1940
1948
|
k,
|
|
1941
1949
|
N,
|
|
1942
1950
|
_,
|
|
@@ -2025,7 +2033,7 @@ const Jt = ({
|
|
|
2025
2033
|
/* @__PURE__ */ e.jsx(
|
|
2026
2034
|
$e,
|
|
2027
2035
|
{
|
|
2028
|
-
value:
|
|
2036
|
+
value: w,
|
|
2029
2037
|
onChange: (O) => G(O.target.value),
|
|
2030
2038
|
rows: 2,
|
|
2031
2039
|
placeholder: "(optional) Describe how to perform the test or exercise",
|
|
@@ -2142,10 +2150,10 @@ const Jt = ({
|
|
|
2142
2150
|
}), A = U(
|
|
2143
2151
|
me,
|
|
2144
2152
|
j?.moduleCategories
|
|
2145
|
-
), [{ fetching: h },
|
|
2153
|
+
), [{ fetching: h }, C] = oe(st), [{ fetching: r }, a] = oe(ot), p = U(
|
|
2146
2154
|
ae,
|
|
2147
2155
|
l ? o?.quantumOwnedActions : o?.actions
|
|
2148
|
-
) ?? [], g = U(Ce, I?.module), y = U(nt, g?.moduleActions) ?? [], [
|
|
2156
|
+
) ?? [], g = U(Ce, I?.module), y = U(nt, g?.moduleActions) ?? [], [w, G] = P([
|
|
2149
2157
|
...y.map((L) => L.actionId) ?? []
|
|
2150
2158
|
]), [k, T] = P(g?.name ?? ""), [N, E] = P([]), [_, f] = P(g?.description ?? "");
|
|
2151
2159
|
ne(() => {
|
|
@@ -2158,13 +2166,13 @@ const Jt = ({
|
|
|
2158
2166
|
const M = R(() => {
|
|
2159
2167
|
let L;
|
|
2160
2168
|
const X = {
|
|
2161
|
-
actions:
|
|
2169
|
+
actions: w,
|
|
2162
2170
|
name: k,
|
|
2163
2171
|
categories: N.filter((b) => b !== "other"),
|
|
2164
2172
|
description: _,
|
|
2165
2173
|
quantumOwned: l
|
|
2166
2174
|
};
|
|
2167
|
-
g ? L =
|
|
2175
|
+
g ? L = C({
|
|
2168
2176
|
id: g.id,
|
|
2169
2177
|
input: X
|
|
2170
2178
|
}) : L = a({
|
|
@@ -2174,21 +2182,22 @@ const Jt = ({
|
|
|
2174
2182
|
});
|
|
2175
2183
|
}, [
|
|
2176
2184
|
a,
|
|
2177
|
-
S,
|
|
2178
2185
|
C,
|
|
2186
|
+
w,
|
|
2179
2187
|
k,
|
|
2180
2188
|
_,
|
|
2181
2189
|
N,
|
|
2182
2190
|
g,
|
|
2183
2191
|
i,
|
|
2184
|
-
c
|
|
2192
|
+
c,
|
|
2193
|
+
l
|
|
2185
2194
|
]);
|
|
2186
2195
|
return ne(() => {
|
|
2187
2196
|
v && v({
|
|
2188
2197
|
cancelButton: h || r,
|
|
2189
2198
|
saveButton: h || r || !k || _.trim().split(/\s+/).filter(Boolean).length > 40
|
|
2190
2199
|
});
|
|
2191
|
-
}, [v, h, r,
|
|
2200
|
+
}, [v, h, r, w, k, _]), ne(() => {
|
|
2192
2201
|
d && d({
|
|
2193
2202
|
cancelButton: n,
|
|
2194
2203
|
saveButton: M
|
|
@@ -2200,7 +2209,7 @@ const Jt = ({
|
|
|
2200
2209
|
name: k,
|
|
2201
2210
|
setName: T,
|
|
2202
2211
|
actions: p,
|
|
2203
|
-
selectedActionIds:
|
|
2212
|
+
selectedActionIds: w,
|
|
2204
2213
|
setSelectedActionIds: G,
|
|
2205
2214
|
availableCategories: A ?? [],
|
|
2206
2215
|
selectedCategoryIds: N,
|