quantum-component-library 1.4.45-qa.1 → 1.4.45-qa.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{babel-vendor-BOM86iTb.js → babel-vendor-Brd7V25k.js} +76 -71
- package/dist/babel-vendor-pl7onWh-.cjs +3 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +57 -57
- package/dist/{dnd-core-vendor-bgjKfDi6.cjs → dnd-core-vendor-B8SfRHAC.cjs} +1 -1
- package/dist/{dnd-core-vendor-q7mfiuVu.js → dnd-core-vendor-B9bDJoIO.js} +2 -2
- package/dist/framer-motion-vendor-BgJ2HqtS.cjs +1 -0
- package/dist/framer-motion-vendor-Cn84b4iY.js +3285 -0
- package/dist/{graphql-DiUes2Np.js → graphql-DZp5ePcc.js} +6 -6
- package/dist/graphql-vendor-2jHffeBc.cjs +19 -0
- package/dist/graphql-vendor-DZM4vSNi.js +1285 -0
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +11 -12
- package/dist/lodash-vendor-Dkc3o8vE.cjs +1 -0
- package/dist/lodash-vendor-KQku4vKh.js +1602 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +5 -5
- package/dist/{react-dnd-vendor-BWqlt2EC.cjs → react-dnd-vendor-CMnbNCdx.cjs} +1 -1
- package/dist/{react-dnd-vendor-BZs2igAJ.js → react-dnd-vendor-CrTWIfyP.js} +2 -2
- package/dist/{react-select-vendor-eBH7yy3O.js → react-select-vendor-Dt2A4G_u.js} +35 -35
- package/dist/{react-select-vendor-By3h6JjH.cjs → react-select-vendor-DwRVrD2f.cjs} +1 -1
- package/dist/services.cjs +1 -1
- package/dist/services.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/dist/ui-vendor-BAkBLewK.cjs +294 -0
- package/dist/ui-vendor-DLN2xOTj.js +10756 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +17 -17
- package/dist/vendor-Br-qBXqd.cjs +90 -0
- package/dist/vendor-BvxNWBst.js +11937 -0
- package/package.json +1 -1
- package/dist/babel-vendor-cKvSpnBp.cjs +0 -3
- package/dist/graphql-vendor-JsvuUrRs.cjs +0 -14
- package/dist/graphql-vendor-YnA_qhJA.js +0 -669
- package/dist/lodash-vendor-D5A6v3mw.cjs +0 -1
- package/dist/lodash-vendor-Dz4vW7Gd.js +0 -1120
- package/dist/vendor-BeqUcSbw.cjs +0 -45
- package/dist/vendor-DvX9OX-j.js +0 -7876
package/dist/components.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as e, u as ls } from "./vendor-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { F as
|
|
7
|
-
import {
|
|
1
|
+
import { j as e, u as ls } from "./vendor-BvxNWBst.js";
|
|
2
|
+
import { useMemo as D, useState as F, useCallback as O, useRef as as, useEffect as Y, memo as ye } from "react";
|
|
3
|
+
import { d as We } from "./styled-components-vendor-Bvwhddj9.js";
|
|
4
|
+
import { s as se, y as cs } from "./react-select-vendor-Dt2A4G_u.js";
|
|
5
|
+
import { F as ds, a as us } from "./react-icons-vendor-TETORdU9.js";
|
|
6
|
+
import { F as le, I as Pe, a as hs, b as $e, c as Ce, d as Qe, B, T as qe, e as He, f as Ye, g as Se, h as ie, i as Je, j as re, k as ce, l as Ke, m as $, R as ms, n as Ae, o as M, p as gs, q as ps, r as _e, S as ze, N as Ue, s as Ge, H as K, t as de, C as xs, u as Xe, V, v as G, A as be, w as ve, x as Ze, y as fs, M as js, z as bs, D as vs, E as ys, G as Cs, J as Ss, K as ws, L as Ms, O as Ie } from "./ui-vendor-DLN2xOTj.js";
|
|
7
|
+
import { u as ee, a as oe, b as As } from "./graphql-vendor-DZM4vSNi.js";
|
|
8
8
|
import { g as W, T as je, S as k, A as ge, a as Te } from "./generated-GfcSQz21.js";
|
|
9
|
-
import { G as Ve, a as Is, C as De,
|
|
10
|
-
import { D as _s, H as zs, u as Us, a as Gs } from "./react-dnd-vendor-
|
|
9
|
+
import { A as ae, G as Ve, a as Is, C as De, b as es, c as Re, M as ss, d as Le, e as Ts, f as ts, S as Ns, g as Os, U as Rs, h as Ls, i as Fs, j as Ds, k as ks, l as Es, m as Ps } from "./graphql-DZp5ePcc.js";
|
|
10
|
+
import { D as _s, H as zs, u as Us, a as Gs } from "./react-dnd-vendor-CrTWIfyP.js";
|
|
11
11
|
import { getSegmentNameWithPlane as ns, getJointNameWithPlane as is, getJointAngleDirectionName as Bs, getSegmentAngleDirectionName as Ws, getNormativeJointRange as $s } from "./services.js";
|
|
12
12
|
import { availablePlanes as Be, getAnalysisPartIdNoSide as pe } from "./types.js";
|
|
13
13
|
import { thresholdsToParameters as Qs, parametersToThresholds as Ne, cn as qs } from "./utils.js";
|
|
@@ -26,9 +26,9 @@ const Ys = ({
|
|
|
26
26
|
);
|
|
27
27
|
return /* @__PURE__ */ e.jsxs(le, { width: "100%", alignContent: "space-evenly", gap: 4, children: [
|
|
28
28
|
/* @__PURE__ */ e.jsxs(Pe, { size: "md", children: [
|
|
29
|
-
/* @__PURE__ */ e.jsx(
|
|
29
|
+
/* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx($e, { as: ds, color: "gray.300" }) }),
|
|
30
30
|
/* @__PURE__ */ e.jsx(
|
|
31
|
-
|
|
31
|
+
Ce,
|
|
32
32
|
{
|
|
33
33
|
placeholder: "Search by name...",
|
|
34
34
|
maxW: "30rem",
|
|
@@ -56,7 +56,7 @@ const Ys = ({
|
|
|
56
56
|
] });
|
|
57
57
|
}, te = ({
|
|
58
58
|
children: t
|
|
59
|
-
}) => /* @__PURE__ */ e.jsx(
|
|
59
|
+
}) => /* @__PURE__ */ e.jsx(Qe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }), Js = ({ value: t, onChange: s }) => {
|
|
60
60
|
const o = F(
|
|
61
61
|
() => Math.random().toString(36).substring(2, 15)
|
|
62
62
|
)[0], u = O(
|
|
@@ -68,12 +68,12 @@ const Ys = ({
|
|
|
68
68
|
},
|
|
69
69
|
[s]
|
|
70
70
|
);
|
|
71
|
-
return /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(_s, { backend: zs, children: /* @__PURE__ */ e.jsx(
|
|
72
|
-
/* @__PURE__ */ e.jsx(
|
|
71
|
+
return /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(_s, { backend: zs, children: /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsxs(He, { variant: "simple", size: "md", children: [
|
|
72
|
+
/* @__PURE__ */ e.jsx(Ye, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
73
73
|
/* @__PURE__ */ e.jsx(ie, { children: "Order" }),
|
|
74
74
|
/* @__PURE__ */ e.jsx(ie, { children: "Name" })
|
|
75
75
|
] }) }),
|
|
76
|
-
/* @__PURE__ */ e.jsx(
|
|
76
|
+
/* @__PURE__ */ e.jsx(Je, { children: t.map((l, a) => /* @__PURE__ */ e.jsx(
|
|
77
77
|
Ks,
|
|
78
78
|
{
|
|
79
79
|
listKey: o,
|
|
@@ -86,7 +86,7 @@ const Ys = ({
|
|
|
86
86
|
)) })
|
|
87
87
|
] }) }) }) });
|
|
88
88
|
}, Ks = ({ listKey: t, index: s, id: o, name: u, move: l }) => {
|
|
89
|
-
const a =
|
|
89
|
+
const a = as(null), [{ handlerId: m }, f] = Us({
|
|
90
90
|
accept: t,
|
|
91
91
|
collect: (x) => ({
|
|
92
92
|
handlerId: x.getHandlerId()?.toString() ?? ""
|
|
@@ -107,7 +107,7 @@ const Ys = ({
|
|
|
107
107
|
isDragging: x.isDragging()
|
|
108
108
|
})
|
|
109
109
|
}), I = j ? 0.6 : 1, p = j ? "grabbing" : "grab";
|
|
110
|
-
return C(f(a)), /* @__PURE__ */ e.jsxs(
|
|
110
|
+
return C(f(a)), /* @__PURE__ */ e.jsxs(Se, { ref: a, style: { opacity: I, cursor: p }, "data-handler-id": m, children: [
|
|
111
111
|
/* @__PURE__ */ e.jsx(re, { children: s + 1 }),
|
|
112
112
|
/* @__PURE__ */ e.jsx(re, { children: u })
|
|
113
113
|
] });
|
|
@@ -121,7 +121,7 @@ const Ys = ({
|
|
|
121
121
|
}) => {
|
|
122
122
|
const m = (j) => j === o || j.value === o, f = (j) => m(j) ? { ...a, ...l } : a;
|
|
123
123
|
return /* @__PURE__ */ e.jsx(ce, { isAttached: !0, isDisabled: u, children: t.map((j, C) => /* @__PURE__ */ e.jsx(
|
|
124
|
-
|
|
124
|
+
Ke,
|
|
125
125
|
{
|
|
126
126
|
label: j.tooltip,
|
|
127
127
|
openDelay: 50,
|
|
@@ -202,7 +202,7 @@ const Ys = ({
|
|
|
202
202
|
);
|
|
203
203
|
return /* @__PURE__ */ e.jsxs(le, { direction: "column", ...x, children: [
|
|
204
204
|
/* @__PURE__ */ e.jsx(B, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
|
|
205
|
-
|
|
205
|
+
ms,
|
|
206
206
|
{
|
|
207
207
|
"aria-label": ["min", "max"],
|
|
208
208
|
isReversed: t,
|
|
@@ -238,7 +238,7 @@ const Ys = ({
|
|
|
238
238
|
/* @__PURE__ */ e.jsx(M, { fontSize: m, fontWeight: "semibold", children: j?.(0) ?? "0" }),
|
|
239
239
|
/* @__PURE__ */ e.jsx(Zs, {})
|
|
240
240
|
] }),
|
|
241
|
-
/* @__PURE__ */ e.jsx(
|
|
241
|
+
/* @__PURE__ */ e.jsx(gs, { children: /* @__PURE__ */ e.jsx(ps, {}) }),
|
|
242
242
|
/* @__PURE__ */ e.jsx(_e, { index: 0, w: c, h: c }),
|
|
243
243
|
/* @__PURE__ */ e.jsx(_e, { index: 1, w: c, h: c })
|
|
244
244
|
]
|
|
@@ -363,7 +363,7 @@ const Ys = ({
|
|
|
363
363
|
}
|
|
364
364
|
)
|
|
365
365
|
] });
|
|
366
|
-
}, Zs =
|
|
366
|
+
}, Zs = We(B)`
|
|
367
367
|
position: absolute;
|
|
368
368
|
width: 2px;
|
|
369
369
|
height: 1em;
|
|
@@ -449,8 +449,8 @@ const Ys = ({
|
|
|
449
449
|
}
|
|
450
450
|
)
|
|
451
451
|
] }),
|
|
452
|
-
/* @__PURE__ */ e.jsx(
|
|
453
|
-
/* @__PURE__ */ e.jsx(
|
|
452
|
+
/* @__PURE__ */ e.jsx(qe, { mr: "2rem", overflowX: "hidden", ...p, children: /* @__PURE__ */ e.jsxs(He, { size: "md", variant: "simple", children: [
|
|
453
|
+
/* @__PURE__ */ e.jsx(Ye, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
454
454
|
/* @__PURE__ */ e.jsxs(ie, { fontWeight: "normal", children: [
|
|
455
455
|
"(showing ",
|
|
456
456
|
b?.length ?? 0,
|
|
@@ -464,7 +464,7 @@ const Ys = ({
|
|
|
464
464
|
/* @__PURE__ */ e.jsx(ie, { children: "Use Case" }),
|
|
465
465
|
/* @__PURE__ */ e.jsx(ie, {})
|
|
466
466
|
] }) }),
|
|
467
|
-
/* @__PURE__ */ e.jsx(
|
|
467
|
+
/* @__PURE__ */ e.jsx(Je, { children: b?.map((g) => /* @__PURE__ */ e.jsxs(
|
|
468
468
|
it,
|
|
469
469
|
{
|
|
470
470
|
disableMultiSelect: f,
|
|
@@ -475,7 +475,7 @@ const Ys = ({
|
|
|
475
475
|
children: [
|
|
476
476
|
/* @__PURE__ */ e.jsx(re, { children: /* @__PURE__ */ e.jsxs(le, { children: [
|
|
477
477
|
a && !f && /* @__PURE__ */ e.jsx(
|
|
478
|
-
|
|
478
|
+
xs,
|
|
479
479
|
{
|
|
480
480
|
isChecked: g.selected,
|
|
481
481
|
onChange: (w) => a(g, w.target.checked)
|
|
@@ -509,7 +509,7 @@ const Ys = ({
|
|
|
509
509
|
)) })
|
|
510
510
|
] }) })
|
|
511
511
|
] });
|
|
512
|
-
}, it =
|
|
512
|
+
}, it = We(Se)`
|
|
513
513
|
&:hover {
|
|
514
514
|
background-color: ${(t) => t.disableMultiSelect && !t.selected ? "#f7f7f7" : void 0};
|
|
515
515
|
}
|
|
@@ -523,7 +523,7 @@ const Ys = ({
|
|
|
523
523
|
setButtonOnClick: a,
|
|
524
524
|
quantumOwned: m
|
|
525
525
|
}) => {
|
|
526
|
-
const f =
|
|
526
|
+
const f = Xe(), [j, C] = F(""), [I, p] = F([]), [x, A] = F(!1), [d] = ee({
|
|
527
527
|
query: Ve
|
|
528
528
|
}), [r] = ee({
|
|
529
529
|
query: Is,
|
|
@@ -663,7 +663,7 @@ const Ys = ({
|
|
|
663
663
|
j && /* @__PURE__ */ e.jsxs(G, { children: [
|
|
664
664
|
/* @__PURE__ */ e.jsx(te, { children: "Select Activities to Copy" }),
|
|
665
665
|
U ? /* @__PURE__ */ e.jsxs(K, { children: [
|
|
666
|
-
/* @__PURE__ */ e.jsx(
|
|
666
|
+
/* @__PURE__ */ e.jsx(Ze, { size: "sm" }),
|
|
667
667
|
/* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.600", children: "Loading activities..." })
|
|
668
668
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
669
669
|
/* @__PURE__ */ e.jsx(
|
|
@@ -818,21 +818,21 @@ const Ys = ({
|
|
|
818
818
|
setButtonOnClick: a,
|
|
819
819
|
quantumOwned: m
|
|
820
820
|
}) => {
|
|
821
|
-
const f =
|
|
821
|
+
const f = Xe(), [j, C] = F(""), [I, p] = F([]), [x, A] = F(!1), [d] = ee({
|
|
822
822
|
query: Ve
|
|
823
823
|
}), [r] = ee({
|
|
824
824
|
query: Ts,
|
|
825
825
|
variables: { groupId: j },
|
|
826
826
|
pause: !j
|
|
827
827
|
// Only run when group is selected
|
|
828
|
-
}), [, S] = oe(
|
|
828
|
+
}), [, S] = oe(ts), [, b] = oe(De), v = D(() => d.data?.groups ? d.data.groups.map(
|
|
829
829
|
(n) => W(es, n)
|
|
830
830
|
) : [], [d.data]), h = D(() => r.data?.modules ? W(
|
|
831
831
|
Re,
|
|
832
832
|
r.data?.modules
|
|
833
833
|
).map((i) => {
|
|
834
834
|
const y = W(
|
|
835
|
-
|
|
835
|
+
ss,
|
|
836
836
|
i.moduleActions
|
|
837
837
|
);
|
|
838
838
|
return {
|
|
@@ -997,7 +997,7 @@ const Ys = ({
|
|
|
997
997
|
j && /* @__PURE__ */ e.jsxs(G, { children: [
|
|
998
998
|
/* @__PURE__ */ e.jsx(te, { children: "Select Module to Copy" }),
|
|
999
999
|
c ? /* @__PURE__ */ e.jsxs(K, { children: [
|
|
1000
|
-
/* @__PURE__ */ e.jsx(
|
|
1000
|
+
/* @__PURE__ */ e.jsx(Ze, { size: "sm" }),
|
|
1001
1001
|
/* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.600", children: "Loading modules..." })
|
|
1002
1002
|
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1003
1003
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1152,7 +1152,7 @@ const Ys = ({
|
|
|
1152
1152
|
setDescription: C,
|
|
1153
1153
|
...I
|
|
1154
1154
|
}) => {
|
|
1155
|
-
const p =
|
|
1155
|
+
const p = fs(), x = D(() => o.map((v) => ({
|
|
1156
1156
|
...v,
|
|
1157
1157
|
selected: u.includes(v.id)
|
|
1158
1158
|
})), [o, u]), A = D(() => o.reduce((v, h) => (v[h.id] = h, v), {}), [o]), d = D(
|
|
@@ -1202,17 +1202,17 @@ const Ys = ({
|
|
|
1202
1202
|
}
|
|
1203
1203
|
),
|
|
1204
1204
|
/* @__PURE__ */ e.jsxs(
|
|
1205
|
-
|
|
1205
|
+
js,
|
|
1206
1206
|
{
|
|
1207
1207
|
isOpen: p.isOpen,
|
|
1208
1208
|
onClose: p.onClose,
|
|
1209
1209
|
size: "6xl",
|
|
1210
1210
|
children: [
|
|
1211
|
-
/* @__PURE__ */ e.jsx(
|
|
1212
|
-
/* @__PURE__ */ e.jsxs(
|
|
1213
|
-
/* @__PURE__ */ e.jsx(
|
|
1214
|
-
/* @__PURE__ */ e.jsx(
|
|
1215
|
-
/* @__PURE__ */ e.jsx(
|
|
1211
|
+
/* @__PURE__ */ e.jsx(bs, {}),
|
|
1212
|
+
/* @__PURE__ */ e.jsxs(vs, { children: [
|
|
1213
|
+
/* @__PURE__ */ e.jsx(ys, { children: "Select Activities" }),
|
|
1214
|
+
/* @__PURE__ */ e.jsx(Cs, {}),
|
|
1215
|
+
/* @__PURE__ */ e.jsx(Ss, { children: /* @__PURE__ */ e.jsx(
|
|
1216
1216
|
nt,
|
|
1217
1217
|
{
|
|
1218
1218
|
actions: x,
|
|
@@ -1225,7 +1225,7 @@ const Ys = ({
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
) }),
|
|
1228
|
-
/* @__PURE__ */ e.jsx(
|
|
1228
|
+
/* @__PURE__ */ e.jsx(ws, { children: /* @__PURE__ */ e.jsx(
|
|
1229
1229
|
$,
|
|
1230
1230
|
{
|
|
1231
1231
|
colorScheme: "blue",
|
|
@@ -1239,14 +1239,14 @@ const Ys = ({
|
|
|
1239
1239
|
}
|
|
1240
1240
|
)
|
|
1241
1241
|
] });
|
|
1242
|
-
}, rt =
|
|
1242
|
+
}, rt = ye(
|
|
1243
1243
|
({
|
|
1244
1244
|
name: t,
|
|
1245
1245
|
onInputChange: s
|
|
1246
1246
|
}) => /* @__PURE__ */ e.jsxs(G, { mb: 4, children: [
|
|
1247
1247
|
/* @__PURE__ */ e.jsx(te, { children: "Module Name" }),
|
|
1248
1248
|
/* @__PURE__ */ e.jsx(
|
|
1249
|
-
|
|
1249
|
+
Ce,
|
|
1250
1250
|
{
|
|
1251
1251
|
placeholder: "i.e. ACL RTP Test Battery",
|
|
1252
1252
|
value: t,
|
|
@@ -1255,7 +1255,7 @@ const Ys = ({
|
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
1257
1257
|
] })
|
|
1258
|
-
), lt =
|
|
1258
|
+
), lt = ye(
|
|
1259
1259
|
({
|
|
1260
1260
|
availableCategories: t,
|
|
1261
1261
|
value: s,
|
|
@@ -1289,7 +1289,7 @@ const Ys = ({
|
|
|
1289
1289
|
)
|
|
1290
1290
|
] });
|
|
1291
1291
|
}
|
|
1292
|
-
), at =
|
|
1292
|
+
), at = ye(
|
|
1293
1293
|
({
|
|
1294
1294
|
description: t,
|
|
1295
1295
|
onInputChange: s
|
|
@@ -1299,7 +1299,7 @@ const Ys = ({
|
|
|
1299
1299
|
/* @__PURE__ */ e.jsx(M, { fontSize: "sm", color: "gray.500", children: "Briefly describe the objective of this module. Max 40 words." })
|
|
1300
1300
|
] }) }),
|
|
1301
1301
|
/* @__PURE__ */ e.jsx(
|
|
1302
|
-
|
|
1302
|
+
Ce,
|
|
1303
1303
|
{
|
|
1304
1304
|
placeholder: "i.e. Assess readiness to return to play post-ACL reconstruction",
|
|
1305
1305
|
value: t,
|
|
@@ -1307,7 +1307,7 @@ const Ys = ({
|
|
|
1307
1307
|
}
|
|
1308
1308
|
)
|
|
1309
1309
|
] })
|
|
1310
|
-
), ct =
|
|
1310
|
+
), ct = ye(
|
|
1311
1311
|
({
|
|
1312
1312
|
value: t,
|
|
1313
1313
|
onChange: s,
|
|
@@ -1451,12 +1451,12 @@ const Ys = ({
|
|
|
1451
1451
|
}
|
|
1452
1452
|
),
|
|
1453
1453
|
u && /* @__PURE__ */ e.jsx(
|
|
1454
|
-
|
|
1454
|
+
Ms,
|
|
1455
1455
|
{
|
|
1456
1456
|
size: "xs",
|
|
1457
1457
|
variant: "ghost",
|
|
1458
1458
|
"aria-label": "delete",
|
|
1459
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
1459
|
+
icon: /* @__PURE__ */ e.jsx($e, { as: us }),
|
|
1460
1460
|
onClick: u
|
|
1461
1461
|
}
|
|
1462
1462
|
),
|
|
@@ -1642,8 +1642,8 @@ const Ys = ({
|
|
|
1642
1642
|
setButtonDisabled: m,
|
|
1643
1643
|
quantumOwned: f
|
|
1644
1644
|
}) => {
|
|
1645
|
-
const j = As(), [{ fetching: C }, I] = oe(De), [{ fetching: p }, x] = oe(
|
|
1646
|
-
query:
|
|
1645
|
+
const j = As(), [{ fetching: C }, I] = oe(De), [{ fetching: p }, x] = oe(Rs), [{ data: A }] = ee({
|
|
1646
|
+
query: Ls,
|
|
1647
1647
|
variables: { id: t ?? "" },
|
|
1648
1648
|
pause: !t
|
|
1649
1649
|
}), d = W(
|
|
@@ -1674,7 +1674,7 @@ const Ys = ({
|
|
|
1674
1674
|
}, [d]);
|
|
1675
1675
|
const rs = O(
|
|
1676
1676
|
async (N) => (await j.query(
|
|
1677
|
-
f ?
|
|
1677
|
+
f ? Ns : Os,
|
|
1678
1678
|
{
|
|
1679
1679
|
query: N,
|
|
1680
1680
|
limit: 10
|
|
@@ -1780,7 +1780,7 @@ const Ys = ({
|
|
|
1780
1780
|
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1781
1781
|
/* @__PURE__ */ e.jsx(Z, { children: "Name" }),
|
|
1782
1782
|
/* @__PURE__ */ e.jsx(
|
|
1783
|
-
|
|
1783
|
+
Ce,
|
|
1784
1784
|
{
|
|
1785
1785
|
value: b,
|
|
1786
1786
|
onChange: (N) => v(N.target.value),
|
|
@@ -1850,13 +1850,13 @@ const Ys = ({
|
|
|
1850
1850
|
/* @__PURE__ */ e.jsxs(G, { children: [
|
|
1851
1851
|
/* @__PURE__ */ e.jsx(Z, { children: "Use Cases" }),
|
|
1852
1852
|
/* @__PURE__ */ e.jsx(
|
|
1853
|
-
|
|
1853
|
+
Ke,
|
|
1854
1854
|
{
|
|
1855
1855
|
isOpen: z,
|
|
1856
1856
|
label: "Type to search for existing use cases",
|
|
1857
1857
|
placement: "top-end",
|
|
1858
1858
|
children: /* @__PURE__ */ e.jsx(B, { children: /* @__PURE__ */ e.jsx(
|
|
1859
|
-
|
|
1859
|
+
cs,
|
|
1860
1860
|
{
|
|
1861
1861
|
value: y,
|
|
1862
1862
|
onChange: (N) => L([...N]),
|
|
@@ -1955,7 +1955,7 @@ const Ys = ({
|
|
|
1955
1955
|
}
|
|
1956
1956
|
)
|
|
1957
1957
|
] });
|
|
1958
|
-
}, Z = ({ children: t }) => /* @__PURE__ */ e.jsx(
|
|
1958
|
+
}, Z = ({ children: t }) => /* @__PURE__ */ e.jsx(Qe, { fontWeight: "bold", fontFamily: "sans-serif", fontSize: "large", children: t }), Ft = ({
|
|
1959
1959
|
id: t,
|
|
1960
1960
|
onCancel: s,
|
|
1961
1961
|
onSave: o,
|
|
@@ -1976,10 +1976,10 @@ const Ys = ({
|
|
|
1976
1976
|
}), p = W(
|
|
1977
1977
|
Le,
|
|
1978
1978
|
I?.moduleCategories
|
|
1979
|
-
), [{ fetching: x }, A] = oe(Ps), [{ fetching: d }, r] = oe(
|
|
1979
|
+
), [{ fetching: x }, A] = oe(Ps), [{ fetching: d }, r] = oe(ts), S = W(
|
|
1980
1980
|
ae,
|
|
1981
1981
|
a ? j?.quantumOwnedActions : j?.actions
|
|
1982
|
-
) ?? [], b = W(Re, C?.module), v = W(
|
|
1982
|
+
) ?? [], b = W(Re, C?.module), v = W(ss, b?.moduleActions) ?? [], [h, g] = F([
|
|
1983
1983
|
...v.map((c) => c.actionId) ?? []
|
|
1984
1984
|
]), [w, P] = F(b?.name ?? ""), [T, q] = F([]), [R, Q] = F(b?.description ?? "");
|
|
1985
1985
|
Y(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const M=require("./vendor-BeqUcSbw.cjs"),s=require("./react-dnd-vendor-BWqlt2EC.cjs");function j(t,e,r){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,t)}function H(t,e){return t.filter(r=>r!==e)}function U(t){return typeof t=="object"}function N(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function L(t,e){return t.filter(r=>e.indexOf(r)>-1)}const E="dnd-core/INIT_COORDS",p="dnd-core/BEGIN_DRAG",I="dnd-core/PUBLISH_DRAG_SOURCE",h="dnd-core/HOVER",y="dnd-core/DROP",S="dnd-core/END_DRAG";function _(t,e){return{type:E,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const V={type:E,payload:{clientOffset:null,sourceClientOffset:null}};function k(t){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,c=t.getMonitor(),l=t.getRegistry();t.dispatch(_(o)),q(r,c,l);const f=X(r,c);if(f==null){t.dispatch(V);return}let D=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");B(a),D=a(f)}t.dispatch(_(o,D));const b=l.getSource(f).beginDrag(c,f);if(b==null)return;F(b),l.pinSource(f);const $=l.getSourceType(f);return{type:p,payload:{itemType:$,item:b,sourceId:f,clientOffset:o||null,sourceClientOffset:D||null,isSourcePublic:!!i}}}}function q(t,e,r){s.invariant(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){s.invariant(r.getSource(n),"Expected sourceIds to be registered.")})}function B(t){s.invariant(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function F(t){s.invariant(U(t),"Item must be an object.")}function X(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){W(t,i,r[i])})}return t}function J(t){return function(r={}){const n=t.getMonitor(),i=t.getRegistry();Q(n),K(n).forEach((a,c)=>{const l=Y(a,c,i,n),f={type:y,payload:{dropResult:z({},r,l)}};t.dispatch(f)})}}function Q(t){s.invariant(t.isDragging(),"Cannot call drop while not dragging."),s.invariant(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Y(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;return Z(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Z(t){s.invariant(typeof t>"u"||U(t),"Drop result must either be an object or undefined.")}function K(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function ee(t){return function(){const r=t.getMonitor(),n=t.getRegistry();te(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:S}}}function te(t){s.invariant(t.isDragging(),"Cannot call endDrag while not dragging.")}function v(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function re(t){return function(r,{clientOffset:n}={}){ne(r);const i=r.slice(0),o=t.getMonitor(),a=t.getRegistry(),c=o.getItemType();return oe(i,a,c),ie(i,o,a),se(i,o,a),{type:h,payload:{targetIds:i,clientOffset:n||null}}}}function ne(t){s.invariant(Array.isArray(t),"Expected targetIds to be an array.")}function ie(t,e,r){s.invariant(e.isDragging(),"Cannot call hover while not dragging."),s.invariant(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];s.invariant(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);s.invariant(o,"Expected targetIds to be registered.")}}function oe(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);v(o,r)||t.splice(n,1)}}function se(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function ae(t){return function(){if(t.getMonitor().isDragging())return{type:I}}}function ce(t){return{beginDrag:k(t),publishDragSource:ae(t),hover:re(t),drop:J(t),endDrag:ee(t)}}class ue{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const c=o.apply(e,a);typeof c<"u"&&r(c)}}const i=ce(this);return Object.keys(i).reduce((o,a)=>{const c=i[a];return o[a]=n(c),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function fe(t,e){return{x:t.x+e.x,y:t.y+e.y}}function G(t,e){return{x:t.x-e.x,y:t.y-e.y}}function le(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:G(fe(e,n),r)}function de(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:G(e,r)}const g=[],m=[];g.__IS_NONE__=!0;m.__IS_ALL__=!0;function ge(t,e){return t===g?!1:t===m||typeof e>"u"?!0:L(e,t).length>0}class pe{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;s.invariant(typeof e=="function","listener must be a function."),s.invariant(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),c=a.stateId;try{c===i||c===i+1&&!ge(a.dirtyHandlerIds,n)||e()}finally{i=c}};return this.store.subscribe(o)}subscribeToOffsetChange(e){s.invariant(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return s.invariant(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(s.invariant(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return v(n,i)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(s.invariant(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!v(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return n?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return le(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return de(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const C="dnd-core/ADD_SOURCE",R="dnd-core/ADD_TARGET",x="dnd-core/REMOVE_SOURCE",O="dnd-core/REMOVE_TARGET";function he(t){return{type:C,payload:{sourceId:t}}}function ye(t){return{type:R,payload:{targetId:t}}}function Se(t){return{type:x,payload:{sourceId:t}}}function Oe(t){return{type:O,payload:{targetId:t}}}function De(t){s.invariant(typeof t.canDrag=="function","Expected canDrag to be a function."),s.invariant(typeof t.beginDrag=="function","Expected beginDrag to be a function."),s.invariant(typeof t.endDrag=="function","Expected endDrag to be a function.")}function be(t){s.invariant(typeof t.canDrop=="function","Expected canDrop to be a function."),s.invariant(typeof t.hover=="function","Expected hover to be a function."),s.invariant(typeof t.drop=="function","Expected beginDrag to be a function.")}function T(t,e){if(e&&Array.isArray(t)){t.forEach(r=>T(r,!1));return}s.invariant(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(u||(u={}));let ve=0;function Te(){return ve++}function Ee(t){const e=Te().toString();switch(t){case u.SOURCE:return`S${e}`;case u.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function w(t){switch(t[0]){case"S":return u.SOURCE;case"T":return u.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P(t,e){const r=t.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===e)return!0;n=!!i}while(!n);return!1}class Ie{addSource(e,r){T(e),De(r);const n=this.addHandler(u.SOURCE,e,r);return this.store.dispatch(he(n)),n}addTarget(e,r){T(e,!0),be(r);const n=this.addHandler(u.TARGET,e,r);return this.store.dispatch(ye(n)),n}containsHandler(e){return P(this.dragSources,e)||P(this.dropTargets,e)}getSource(e,r=!1){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return w(e)===u.SOURCE}isTargetId(e){return w(e)===u.TARGET}removeSource(e){s.invariant(this.getSource(e),"Expected an existing source."),this.store.dispatch(Se(e)),s.asap(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){s.invariant(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Oe(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);s.invariant(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){s.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const i=Ee(e);return this.types.set(i,r),e===u.SOURCE?this.dragSources.set(i,n):e===u.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const me=(t,e)=>t===e;function Ce(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Re(t,e,r=me){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function xe(t=g,e){switch(e.type){case h:break;case C:case R:case O:case x:return g;case p:case I:case S:case y:default:return m}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=N(r,n);if(!(i.length>0||!Re(r,n)))return g;const a=n[n.length-1],c=r[r.length-1];return a!==c&&(a&&i.push(a),c&&i.push(c)),i}function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_e(t,i,r[i])})}return t}const A={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pe(t=A,e){const{payload:r}=e;switch(e.type){case E:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case h:return Ce(t.clientOffset,r.clientOffset)?t:we({},t,{clientOffset:r.clientOffset});case S:case y:return A;default:return t}}function Ae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ae(t,i,r[i])})}return t}const Ue={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ge(t=Ue,e){const{payload:r}=e;switch(e.type){case p:return d({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case I:return d({},t,{isSourcePublic:!0});case h:return d({},t,{targetIds:r.targetIds});case O:return t.targetIds.indexOf(r.targetId)===-1?t:d({},t,{targetIds:H(t.targetIds,r.targetId)});case y:return d({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case S:return d({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function $e(t=0,e){switch(e.type){case C:case R:return t+1;case x:case O:return t-1;default:return t}}function Me(t=0){return t+1}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){je(t,i,r[i])})}return t}function Ne(t={},e){return{dirtyHandlerIds:xe(t.dirtyHandlerIds,{type:e.type,payload:He({},e.payload,{prevTargetIds:j(t,"dragOperation.targetIds",[])})}),dragOffset:Pe(t.dragOffset,e),refCount:$e(t.refCount,e),dragOperation:Ge(t.dragOperation,e),stateId:Me(t.stateId)}}function Le(t,e=void 0,r={},n=!1){const i=Ve(n),o=new pe(i,new Ie(i)),a=new ue(i,o),c=t(a,e,r);return a.receiveBackend(c),a}function Ve(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return M.createStore(Ne,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}exports.createDragDropManager=Le;
|
|
1
|
+
"use strict";const M=require("./vendor-Br-qBXqd.cjs"),s=require("./react-dnd-vendor-CMnbNCdx.cjs");function j(t,e,r){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,t)}function H(t,e){return t.filter(r=>r!==e)}function U(t){return typeof t=="object"}function N(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function L(t,e){return t.filter(r=>e.indexOf(r)>-1)}const E="dnd-core/INIT_COORDS",p="dnd-core/BEGIN_DRAG",I="dnd-core/PUBLISH_DRAG_SOURCE",h="dnd-core/HOVER",y="dnd-core/DROP",S="dnd-core/END_DRAG";function _(t,e){return{type:E,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const V={type:E,payload:{clientOffset:null,sourceClientOffset:null}};function k(t){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,c=t.getMonitor(),l=t.getRegistry();t.dispatch(_(o)),q(r,c,l);const f=X(r,c);if(f==null){t.dispatch(V);return}let D=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");B(a),D=a(f)}t.dispatch(_(o,D));const b=l.getSource(f).beginDrag(c,f);if(b==null)return;F(b),l.pinSource(f);const $=l.getSourceType(f);return{type:p,payload:{itemType:$,item:b,sourceId:f,clientOffset:o||null,sourceClientOffset:D||null,isSourcePublic:!!i}}}}function q(t,e,r){s.invariant(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){s.invariant(r.getSource(n),"Expected sourceIds to be registered.")})}function B(t){s.invariant(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function F(t){s.invariant(U(t),"Item must be an object.")}function X(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){W(t,i,r[i])})}return t}function J(t){return function(r={}){const n=t.getMonitor(),i=t.getRegistry();Q(n),K(n).forEach((a,c)=>{const l=Y(a,c,i,n),f={type:y,payload:{dropResult:z({},r,l)}};t.dispatch(f)})}}function Q(t){s.invariant(t.isDragging(),"Cannot call drop while not dragging."),s.invariant(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Y(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;return Z(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Z(t){s.invariant(typeof t>"u"||U(t),"Drop result must either be an object or undefined.")}function K(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function ee(t){return function(){const r=t.getMonitor(),n=t.getRegistry();te(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:S}}}function te(t){s.invariant(t.isDragging(),"Cannot call endDrag while not dragging.")}function v(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function re(t){return function(r,{clientOffset:n}={}){ne(r);const i=r.slice(0),o=t.getMonitor(),a=t.getRegistry(),c=o.getItemType();return oe(i,a,c),ie(i,o,a),se(i,o,a),{type:h,payload:{targetIds:i,clientOffset:n||null}}}}function ne(t){s.invariant(Array.isArray(t),"Expected targetIds to be an array.")}function ie(t,e,r){s.invariant(e.isDragging(),"Cannot call hover while not dragging."),s.invariant(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];s.invariant(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);s.invariant(o,"Expected targetIds to be registered.")}}function oe(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);v(o,r)||t.splice(n,1)}}function se(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function ae(t){return function(){if(t.getMonitor().isDragging())return{type:I}}}function ce(t){return{beginDrag:k(t),publishDragSource:ae(t),hover:re(t),drop:J(t),endDrag:ee(t)}}class ue{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const c=o.apply(e,a);typeof c<"u"&&r(c)}}const i=ce(this);return Object.keys(i).reduce((o,a)=>{const c=i[a];return o[a]=n(c),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function fe(t,e){return{x:t.x+e.x,y:t.y+e.y}}function G(t,e){return{x:t.x-e.x,y:t.y-e.y}}function le(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:G(fe(e,n),r)}function de(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:G(e,r)}const g=[],m=[];g.__IS_NONE__=!0;m.__IS_ALL__=!0;function ge(t,e){return t===g?!1:t===m||typeof e>"u"?!0:L(e,t).length>0}class pe{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;s.invariant(typeof e=="function","listener must be a function."),s.invariant(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),c=a.stateId;try{c===i||c===i+1&&!ge(a.dirtyHandlerIds,n)||e()}finally{i=c}};return this.store.subscribe(o)}subscribeToOffsetChange(e){s.invariant(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return s.invariant(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(s.invariant(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return v(n,i)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(s.invariant(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!v(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return n?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return le(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return de(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const C="dnd-core/ADD_SOURCE",R="dnd-core/ADD_TARGET",x="dnd-core/REMOVE_SOURCE",O="dnd-core/REMOVE_TARGET";function he(t){return{type:C,payload:{sourceId:t}}}function ye(t){return{type:R,payload:{targetId:t}}}function Se(t){return{type:x,payload:{sourceId:t}}}function Oe(t){return{type:O,payload:{targetId:t}}}function De(t){s.invariant(typeof t.canDrag=="function","Expected canDrag to be a function."),s.invariant(typeof t.beginDrag=="function","Expected beginDrag to be a function."),s.invariant(typeof t.endDrag=="function","Expected endDrag to be a function.")}function be(t){s.invariant(typeof t.canDrop=="function","Expected canDrop to be a function."),s.invariant(typeof t.hover=="function","Expected hover to be a function."),s.invariant(typeof t.drop=="function","Expected beginDrag to be a function.")}function T(t,e){if(e&&Array.isArray(t)){t.forEach(r=>T(r,!1));return}s.invariant(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(u||(u={}));let ve=0;function Te(){return ve++}function Ee(t){const e=Te().toString();switch(t){case u.SOURCE:return`S${e}`;case u.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function w(t){switch(t[0]){case"S":return u.SOURCE;case"T":return u.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P(t,e){const r=t.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===e)return!0;n=!!i}while(!n);return!1}class Ie{addSource(e,r){T(e),De(r);const n=this.addHandler(u.SOURCE,e,r);return this.store.dispatch(he(n)),n}addTarget(e,r){T(e,!0),be(r);const n=this.addHandler(u.TARGET,e,r);return this.store.dispatch(ye(n)),n}containsHandler(e){return P(this.dragSources,e)||P(this.dropTargets,e)}getSource(e,r=!1){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return w(e)===u.SOURCE}isTargetId(e){return w(e)===u.TARGET}removeSource(e){s.invariant(this.getSource(e),"Expected an existing source."),this.store.dispatch(Se(e)),s.asap(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){s.invariant(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Oe(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);s.invariant(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){s.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const i=Ee(e);return this.types.set(i,r),e===u.SOURCE?this.dragSources.set(i,n):e===u.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const me=(t,e)=>t===e;function Ce(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Re(t,e,r=me){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function xe(t=g,e){switch(e.type){case h:break;case C:case R:case O:case x:return g;case p:case I:case S:case y:default:return m}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=N(r,n);if(!(i.length>0||!Re(r,n)))return g;const a=n[n.length-1],c=r[r.length-1];return a!==c&&(a&&i.push(a),c&&i.push(c)),i}function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_e(t,i,r[i])})}return t}const A={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pe(t=A,e){const{payload:r}=e;switch(e.type){case E:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case h:return Ce(t.clientOffset,r.clientOffset)?t:we({},t,{clientOffset:r.clientOffset});case S:case y:return A;default:return t}}function Ae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ae(t,i,r[i])})}return t}const Ue={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ge(t=Ue,e){const{payload:r}=e;switch(e.type){case p:return d({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case I:return d({},t,{isSourcePublic:!0});case h:return d({},t,{targetIds:r.targetIds});case O:return t.targetIds.indexOf(r.targetId)===-1?t:d({},t,{targetIds:H(t.targetIds,r.targetId)});case y:return d({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case S:return d({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function $e(t=0,e){switch(e.type){case C:case R:return t+1;case x:case O:return t-1;default:return t}}function Me(t=0){return t+1}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){je(t,i,r[i])})}return t}function Ne(t={},e){return{dirtyHandlerIds:xe(t.dirtyHandlerIds,{type:e.type,payload:He({},e.payload,{prevTargetIds:j(t,"dragOperation.targetIds",[])})}),dragOffset:Pe(t.dragOffset,e),refCount:$e(t.refCount,e),dragOperation:Ge(t.dragOperation,e),stateId:Me(t.stateId)}}function Le(t,e=void 0,r={},n=!1){const i=Ve(n),o=new pe(i,new Ie(i)),a=new ue(i,o),c=t(a,e,r);return a.receiveBackend(c),a}function Ve(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return M.createStore(Ne,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}exports.createDragDropManager=Le;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as j } from "./vendor-
|
|
2
|
-
import { i as s, b as M } from "./react-dnd-vendor-
|
|
1
|
+
import { c as j } from "./vendor-BvxNWBst.js";
|
|
2
|
+
import { i as s, b as M } from "./react-dnd-vendor-CrTWIfyP.js";
|
|
3
3
|
function H(t, e, r) {
|
|
4
4
|
return e.split(".").reduce(
|
|
5
5
|
(n, i) => n && n[i] ? n[i] : r || null,
|