@overmap-ai/forms 2.1.0 → 2.1.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/forms.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as X, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { Card as fe, LuIcon as m, Text as _, Spinner as pt, Overlay as W, preventDefault as Wt, ButtonGroup as D, IconButton as A, Separator as ye, Input as
|
|
2
|
+
import { Card as fe, LuIcon as m, Text as _, Spinner as pt, Overlay as W, preventDefault as Wt, ButtonGroup as D, IconButton as A, Separator as ye, Input as B, Badge as G, Checkbox as ot, CheckboxGroup as xt, Popover as P, Button as x, DayPicker as Wn, Menu as g, OneTimePasswordField as wt, toast as le, stopPropagation as Ve, RadioGroup as Pe, TextArea as Ze, Rating as jn, Heading as js, ToggleGroup as zt, useAlertDialog as Ps } from "@overmap-ai/blocks";
|
|
3
3
|
import { cx as ze, cva as Kt } from "class-variance-authority";
|
|
4
4
|
import { forwardRef as Xt, createElement as Ut, memo as w, createContext as Ye, useState as U, useLayoutEffect as Kn, useContext as Zt, useCallback as u, useEffect as pe, Fragment as Yt, use as L, useMemo as $, useRef as ke } from "react";
|
|
5
5
|
import "@xyflow/react/dist/style.css";
|
|
6
|
-
import { getBezierPath as
|
|
6
|
+
import { getBezierPath as Us, Position as be, BaseEdge as Gs, EdgeLabelRenderer as Hs, NodeToolbar as Js, Handle as Pn, MarkerType as Ws, useNodesState as Ks, useEdgesState as Xs, ReactFlow as Zs, Panel as St } from "@xyflow/react";
|
|
7
7
|
import { willCreateCycle as Xn } from "graphology-dag";
|
|
8
|
-
import { useController as
|
|
8
|
+
import { useController as Ys, useWatch as Zn, useFormState as Yn, useFormContext as Qn, useForm as ei, FormProvider as ti } from "react-hook-form";
|
|
9
9
|
import { v4 as N } from "uuid";
|
|
10
|
-
import { DragDropContext as
|
|
10
|
+
import { DragDropContext as Qs, Droppable as er, Draggable as tr } from "@hello-pangea/dnd";
|
|
11
11
|
import { saveAs as Qt } from "file-saver";
|
|
12
12
|
import { useActiveCallback as Un, useActiveEffect as ni } from "@overmap-ai/hooks";
|
|
13
|
-
import { useZxing as
|
|
13
|
+
import { useZxing as nr } from "react-zxing";
|
|
14
14
|
import Gn from "@dagrejs/dagre";
|
|
15
15
|
import { JSONFieldSectionSchema as ii } from "@adrekic/zod-fieldsjson";
|
|
16
|
-
import { DirectedGraph as
|
|
17
|
-
import { bfsFromNode as
|
|
16
|
+
import { DirectedGraph as ir } from "graphology";
|
|
17
|
+
import { bfsFromNode as lr } from "graphology-traversal";
|
|
18
18
|
import li from "lodash.get";
|
|
19
|
-
import
|
|
20
|
-
const
|
|
19
|
+
import sr from "lodash.set";
|
|
20
|
+
const rr = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ar = (n) => n.replace(
|
|
21
21
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
22
22
|
(e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
|
|
23
23
|
), Hn = (n) => {
|
|
24
|
-
const e =
|
|
24
|
+
const e = ar(n);
|
|
25
25
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
26
|
-
}, si = (...n) => n.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(),
|
|
26
|
+
}, si = (...n) => n.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), or = (n) => {
|
|
27
27
|
for (const e in n)
|
|
28
28
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
29
29
|
return !0;
|
|
30
30
|
};
|
|
31
|
-
var
|
|
31
|
+
var cr = {
|
|
32
32
|
xmlns: "http://www.w3.org/2000/svg",
|
|
33
33
|
width: 24,
|
|
34
34
|
height: 24,
|
|
@@ -39,7 +39,7 @@ var ur = {
|
|
|
39
39
|
strokeLinecap: "round",
|
|
40
40
|
strokeLinejoin: "round"
|
|
41
41
|
};
|
|
42
|
-
const
|
|
42
|
+
const dr = Xt(
|
|
43
43
|
({
|
|
44
44
|
color: n = "currentColor",
|
|
45
45
|
size: e = 24,
|
|
@@ -53,13 +53,13 @@ const hr = Xt(
|
|
|
53
53
|
"svg",
|
|
54
54
|
{
|
|
55
55
|
ref: d,
|
|
56
|
-
...
|
|
56
|
+
...cr,
|
|
57
57
|
width: e,
|
|
58
58
|
height: e,
|
|
59
59
|
stroke: n,
|
|
60
60
|
strokeWidth: i ? Number(t) * 24 / Number(e) : t,
|
|
61
61
|
className: si("lucide", s),
|
|
62
|
-
...!r && !
|
|
62
|
+
...!r && !or(h) && { "aria-hidden": "true" },
|
|
63
63
|
...h
|
|
64
64
|
},
|
|
65
65
|
[
|
|
@@ -70,11 +70,11 @@ const hr = Xt(
|
|
|
70
70
|
);
|
|
71
71
|
const q = (n, e) => {
|
|
72
72
|
const t = Xt(
|
|
73
|
-
({ className: i, ...s }, r) => Ut(
|
|
73
|
+
({ className: i, ...s }, r) => Ut(dr, {
|
|
74
74
|
ref: r,
|
|
75
75
|
iconNode: e,
|
|
76
76
|
className: si(
|
|
77
|
-
`lucide-${
|
|
77
|
+
`lucide-${rr(Hn(n))}`,
|
|
78
78
|
`lucide-${n}`,
|
|
79
79
|
i
|
|
80
80
|
),
|
|
@@ -83,24 +83,24 @@ const q = (n, e) => {
|
|
|
83
83
|
);
|
|
84
84
|
return t.displayName = Hn(n), t;
|
|
85
85
|
};
|
|
86
|
-
const
|
|
86
|
+
const ur = [
|
|
87
87
|
["path", { d: "M3 12h18", key: "1i2n21" }],
|
|
88
88
|
["path", { d: "M3 18h18", key: "1h113x" }],
|
|
89
89
|
["path", { d: "M3 6h18", key: "d0wm0j" }]
|
|
90
|
-
],
|
|
91
|
-
const
|
|
90
|
+
], hr = q("align-justify", ur);
|
|
91
|
+
const fr = [
|
|
92
92
|
["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
|
|
93
93
|
["path", { d: "M7 20V4", key: "1yoxec" }],
|
|
94
94
|
["path", { d: "m21 8-4-4-4 4", key: "1c9v7m" }],
|
|
95
95
|
["path", { d: "M17 4v16", key: "7dpous" }]
|
|
96
|
-
],
|
|
97
|
-
const
|
|
96
|
+
], pr = q("arrow-down-up", fr);
|
|
97
|
+
const mr = [
|
|
98
98
|
["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
|
|
99
99
|
["path", { d: "M4 7h16", key: "6tx8e3" }],
|
|
100
100
|
["path", { d: "m16 21 4-4-4-4", key: "siv7j2" }],
|
|
101
101
|
["path", { d: "M20 17H4", key: "h6l3hr" }]
|
|
102
|
-
],
|
|
103
|
-
const
|
|
102
|
+
], gr = q("arrow-left-right", mr);
|
|
103
|
+
const br = [
|
|
104
104
|
[
|
|
105
105
|
"path",
|
|
106
106
|
{
|
|
@@ -109,47 +109,47 @@ const yr = [
|
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
111
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
112
|
-
], ri = q("camera",
|
|
113
|
-
const
|
|
112
|
+
], ri = q("camera", br);
|
|
113
|
+
const Cr = [
|
|
114
114
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
115
115
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
116
116
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
117
117
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
118
|
-
],
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
118
|
+
], yr = q("calendar", Cr);
|
|
119
|
+
const vr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], re = q("check", vr);
|
|
120
|
+
const Vr = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], it = q("chevron-down", Vr);
|
|
121
|
+
const xr = [
|
|
122
122
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
123
123
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
124
124
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
125
|
-
], mt = q("circle-alert",
|
|
126
|
-
const
|
|
125
|
+
], mt = q("circle-alert", xr);
|
|
126
|
+
const wr = [
|
|
127
127
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
128
128
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
129
|
-
],
|
|
130
|
-
const
|
|
129
|
+
], zr = q("circle-check", wr);
|
|
130
|
+
const Sr = [
|
|
131
131
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
132
132
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }]
|
|
133
|
-
],
|
|
134
|
-
const
|
|
133
|
+
], Fr = q("circle-dot", Sr);
|
|
134
|
+
const Nr = [
|
|
135
135
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
136
136
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
137
137
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
138
|
-
],
|
|
139
|
-
const
|
|
138
|
+
], kr = q("circle-question-mark", Nr);
|
|
139
|
+
const qr = [
|
|
140
140
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
141
141
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
142
142
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
143
|
-
],
|
|
144
|
-
const
|
|
145
|
-
const
|
|
143
|
+
], Or = q("circle-x", qr);
|
|
144
|
+
const Ir = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], ai = q("circle", Ir);
|
|
145
|
+
const Tr = [
|
|
146
146
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
147
147
|
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
|
|
148
148
|
["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
|
|
149
149
|
["path", { d: "M21 14H11", key: "1bme5i" }],
|
|
150
150
|
["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
|
|
151
|
-
], oi = q("clipboard-copy",
|
|
152
|
-
const
|
|
151
|
+
], oi = q("clipboard-copy", Tr);
|
|
152
|
+
const Er = [
|
|
153
153
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
154
154
|
[
|
|
155
155
|
"path",
|
|
@@ -162,106 +162,106 @@ const Rr = [
|
|
|
162
162
|
["path", { d: "M12 16h4", key: "n85exb" }],
|
|
163
163
|
["path", { d: "M8 11h.01", key: "1dfujw" }],
|
|
164
164
|
["path", { d: "M8 16h.01", key: "18s6g9" }]
|
|
165
|
-
],
|
|
166
|
-
const
|
|
165
|
+
], Ar = q("clipboard-list", Er);
|
|
166
|
+
const Rr = [
|
|
167
167
|
["path", { d: "M11 14h10", key: "1w8e9d" }],
|
|
168
168
|
["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
|
|
169
169
|
["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
|
|
170
170
|
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
|
|
171
171
|
["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
|
|
172
|
-
], ci = q("clipboard-paste",
|
|
173
|
-
const
|
|
172
|
+
], ci = q("clipboard-paste", Rr);
|
|
173
|
+
const Mr = [
|
|
174
174
|
["path", { d: "m12 15 2 2 4-4", key: "2c609p" }],
|
|
175
175
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
176
176
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
177
|
-
],
|
|
178
|
-
const
|
|
177
|
+
], Dr = q("copy-check", Mr);
|
|
178
|
+
const Lr = [
|
|
179
179
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
180
180
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
181
|
-
], en = q("copy",
|
|
182
|
-
const
|
|
181
|
+
], en = q("copy", Lr);
|
|
182
|
+
const _r = [
|
|
183
183
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
184
184
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
185
185
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
186
|
-
], tn = q("download",
|
|
187
|
-
const
|
|
186
|
+
], tn = q("download", _r);
|
|
187
|
+
const $r = [
|
|
188
188
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
189
189
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
190
190
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
191
|
-
], di = q("ellipsis",
|
|
192
|
-
const
|
|
191
|
+
], di = q("ellipsis", $r);
|
|
192
|
+
const Br = [
|
|
193
193
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
194
194
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
195
195
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
196
|
-
],
|
|
197
|
-
const
|
|
196
|
+
], jr = q("external-link", Br);
|
|
197
|
+
const Pr = [
|
|
198
198
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
199
199
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
200
|
-
],
|
|
201
|
-
const
|
|
200
|
+
], Ur = q("file", Pr);
|
|
201
|
+
const Gr = [
|
|
202
202
|
["line", { x1: "6", x2: "6", y1: "3", y2: "15", key: "17qcm7" }],
|
|
203
203
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
204
204
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
205
205
|
["path", { d: "M18 9a9 9 0 0 1-9 9", key: "n2h4wq" }]
|
|
206
|
-
],
|
|
207
|
-
const
|
|
206
|
+
], Hr = q("git-branch", Gr);
|
|
207
|
+
const Jr = [
|
|
208
208
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
209
209
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
210
210
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
211
211
|
["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
|
|
212
|
-
],
|
|
213
|
-
const
|
|
212
|
+
], Wr = q("hash", Jr);
|
|
213
|
+
const Kr = [
|
|
214
214
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
215
215
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
216
216
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
217
|
-
], ui = q("image",
|
|
218
|
-
const
|
|
217
|
+
], ui = q("image", Kr);
|
|
218
|
+
const Xr = [
|
|
219
219
|
["rect", { width: "18", height: "7", x: "3", y: "3", rx: "1", key: "f1a2em" }],
|
|
220
220
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
|
|
221
221
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }]
|
|
222
|
-
], hi = q("layout-panel-top",
|
|
223
|
-
const
|
|
222
|
+
], hi = q("layout-panel-top", Xr);
|
|
223
|
+
const Zr = [
|
|
224
224
|
["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
|
|
225
225
|
["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
|
|
226
|
-
],
|
|
227
|
-
const
|
|
226
|
+
], Yr = q("link", Zr);
|
|
227
|
+
const Qr = [
|
|
228
228
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
229
229
|
["path", { d: "m3 7 2 2 4-4", key: "1obspn" }],
|
|
230
230
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
231
231
|
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
232
232
|
["path", { d: "M13 18h8", key: "oe0vm4" }]
|
|
233
|
-
],
|
|
234
|
-
const
|
|
233
|
+
], ea = q("list-checks", Qr);
|
|
234
|
+
const ta = [
|
|
235
235
|
["rect", { x: "3", y: "5", width: "6", height: "6", rx: "1", key: "1defrl" }],
|
|
236
236
|
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
237
237
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
238
238
|
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
239
239
|
["path", { d: "M13 18h8", key: "oe0vm4" }]
|
|
240
|
-
],
|
|
241
|
-
const
|
|
240
|
+
], na = q("list-todo", ta);
|
|
241
|
+
const ia = [
|
|
242
242
|
["path", { d: "M3 12h.01", key: "nlz23k" }],
|
|
243
243
|
["path", { d: "M3 18h.01", key: "1tta3j" }],
|
|
244
244
|
["path", { d: "M3 6h.01", key: "1rqtza" }],
|
|
245
245
|
["path", { d: "M8 12h13", key: "1za7za" }],
|
|
246
246
|
["path", { d: "M8 18h13", key: "1lx6n3" }],
|
|
247
247
|
["path", { d: "M8 6h13", key: "ik3vkj" }]
|
|
248
|
-
],
|
|
249
|
-
const
|
|
248
|
+
], la = q("list", ia);
|
|
249
|
+
const sa = [
|
|
250
250
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
251
251
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
252
252
|
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
253
253
|
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
254
|
-
],
|
|
255
|
-
const
|
|
256
|
-
const
|
|
254
|
+
], ra = q("maximize", sa);
|
|
255
|
+
const aa = [["path", { d: "M5 12h14", key: "1ays0h" }]], ct = q("minus", aa);
|
|
256
|
+
const oa = [
|
|
257
257
|
["path", { d: "M8 18L12 22L16 18", key: "cskvfv" }],
|
|
258
258
|
["path", { d: "M12 2V22", key: "r89rzk" }]
|
|
259
|
-
], fi = q("move-down",
|
|
260
|
-
const
|
|
259
|
+
], fi = q("move-down", oa);
|
|
260
|
+
const ca = [
|
|
261
261
|
["path", { d: "M8 6L12 2L16 6", key: "1yvkyx" }],
|
|
262
262
|
["path", { d: "M12 2V22", key: "r89rzk" }]
|
|
263
|
-
], dt = q("move-up",
|
|
264
|
-
const
|
|
263
|
+
], dt = q("move-up", ca);
|
|
264
|
+
const da = [
|
|
265
265
|
[
|
|
266
266
|
"path",
|
|
267
267
|
{
|
|
@@ -269,24 +269,24 @@ const ha = [
|
|
|
269
269
|
key: "1miecu"
|
|
270
270
|
}
|
|
271
271
|
]
|
|
272
|
-
], pi = q("paperclip",
|
|
273
|
-
const
|
|
272
|
+
], pi = q("paperclip", da);
|
|
273
|
+
const ua = [
|
|
274
274
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
275
275
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
276
|
-
], ce = q("plus",
|
|
277
|
-
const
|
|
276
|
+
], ce = q("plus", ua);
|
|
277
|
+
const ha = [
|
|
278
278
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
|
|
279
279
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
280
280
|
["path", { d: "M17 12h.01", key: "1m0b6t" }],
|
|
281
281
|
["path", { d: "M7 12h.01", key: "eqddd0" }]
|
|
282
|
-
],
|
|
283
|
-
const
|
|
282
|
+
], fa = q("rectangle-ellipsis", ha);
|
|
283
|
+
const pa = [
|
|
284
284
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
285
285
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
286
286
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
287
287
|
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }]
|
|
288
|
-
],
|
|
289
|
-
const
|
|
288
|
+
], ma = q("scan", pa);
|
|
289
|
+
const ga = [
|
|
290
290
|
[
|
|
291
291
|
"path",
|
|
292
292
|
{
|
|
@@ -295,12 +295,12 @@ const Ca = [
|
|
|
295
295
|
}
|
|
296
296
|
],
|
|
297
297
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
298
|
-
],
|
|
299
|
-
const
|
|
298
|
+
], ba = q("settings", ga);
|
|
299
|
+
const Ca = [
|
|
300
300
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
301
301
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
302
|
-
],
|
|
303
|
-
const
|
|
302
|
+
], ya = q("square-check", Ca);
|
|
303
|
+
const va = [
|
|
304
304
|
["path", { d: "M5 3a2 2 0 0 0-2 2", key: "y57alp" }],
|
|
305
305
|
["path", { d: "M19 3a2 2 0 0 1 2 2", key: "18rm91" }],
|
|
306
306
|
["path", { d: "M21 19a2 2 0 0 1-2 2", key: "1j7049" }],
|
|
@@ -313,8 +313,8 @@ const xa = [
|
|
|
313
313
|
["path", { d: "M21 9v1", key: "mxsmne" }],
|
|
314
314
|
["path", { d: "M3 14v1", key: "vnatye" }],
|
|
315
315
|
["path", { d: "M21 14v1", key: "169vum" }]
|
|
316
|
-
],
|
|
317
|
-
const
|
|
316
|
+
], Va = q("square-dashed", va);
|
|
317
|
+
const xa = [
|
|
318
318
|
[
|
|
319
319
|
"path",
|
|
320
320
|
{
|
|
@@ -322,30 +322,30 @@ const za = [
|
|
|
322
322
|
key: "r04s7s"
|
|
323
323
|
}
|
|
324
324
|
]
|
|
325
|
-
], mi = q("star",
|
|
326
|
-
const
|
|
325
|
+
], mi = q("star", xa);
|
|
326
|
+
const wa = [
|
|
327
327
|
["path", { d: "M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6", key: "1528k5" }],
|
|
328
328
|
["path", { d: "M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7", key: "13ksps" }],
|
|
329
329
|
["path", { d: "M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1", key: "1n9rhb" }],
|
|
330
330
|
["path", { d: "M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1", key: "1mj8rg" }],
|
|
331
331
|
["path", { d: "M9 6v12", key: "velyjx" }]
|
|
332
|
-
],
|
|
333
|
-
const
|
|
332
|
+
], za = q("text-cursor-input", wa);
|
|
333
|
+
const Sa = [
|
|
334
334
|
["line", { x1: "10", x2: "14", y1: "2", y2: "2", key: "14vaq8" }],
|
|
335
335
|
["line", { x1: "12", x2: "15", y1: "14", y2: "11", key: "17fdiu" }],
|
|
336
336
|
["circle", { cx: "12", cy: "14", r: "8", key: "1e1u0o" }]
|
|
337
|
-
],
|
|
338
|
-
const
|
|
337
|
+
], Fa = q("timer", Sa);
|
|
338
|
+
const Na = [
|
|
339
339
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
340
340
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
341
341
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
342
|
-
], Se = q("trash",
|
|
343
|
-
const
|
|
342
|
+
], Se = q("trash", Na);
|
|
343
|
+
const ka = [
|
|
344
344
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
345
345
|
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
346
346
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
347
|
-
], nn = q("upload",
|
|
348
|
-
const
|
|
347
|
+
], nn = q("upload", ka);
|
|
348
|
+
const qa = [
|
|
349
349
|
[
|
|
350
350
|
"path",
|
|
351
351
|
{
|
|
@@ -354,16 +354,16 @@ const Ia = [
|
|
|
354
354
|
}
|
|
355
355
|
],
|
|
356
356
|
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
|
|
357
|
-
],
|
|
358
|
-
const
|
|
357
|
+
], Oa = q("video", qa);
|
|
358
|
+
const Ia = [
|
|
359
359
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
360
360
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
361
|
-
], ue = q("x",
|
|
361
|
+
], ue = q("x", Ia), gi = w((n) => {
|
|
362
362
|
const { ref: e, file: t, className: i, error: s, rightSlot: r, size: a, ...h } = n, d = () => s ? /* @__PURE__ */ o(X, { children: [
|
|
363
363
|
/* @__PURE__ */ l(m, { icon: mt, color: "var(--base-a11)" }),
|
|
364
364
|
/* @__PURE__ */ l(_, { accentColor: "base", className: "truncate", size: a, children: s })
|
|
365
365
|
] }) : t ? /* @__PURE__ */ o(X, { children: [
|
|
366
|
-
/* @__PURE__ */ l(m, { icon:
|
|
366
|
+
/* @__PURE__ */ l(m, { icon: Ur, color: "var(--base-a11)" }),
|
|
367
367
|
/* @__PURE__ */ l(_, { className: "truncate", size: a, children: t.name })
|
|
368
368
|
] }) : /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ l(pt, { size: a }) }) });
|
|
369
369
|
return /* @__PURE__ */ o(fe, { className: ze(i, "flex w-full items-center gap-2"), ref: e, size: "xs", ...h, children: [
|
|
@@ -553,7 +553,7 @@ const Ci = Ye(() => {
|
|
|
553
553
|
] }) });
|
|
554
554
|
});
|
|
555
555
|
yi.displayName = "ImageViewer";
|
|
556
|
-
const
|
|
556
|
+
const Ta = w((n) => {
|
|
557
557
|
const { children: e } = n, [t, i] = U(null), s = u(() => {
|
|
558
558
|
i(null);
|
|
559
559
|
}, []), r = u(
|
|
@@ -569,7 +569,7 @@ const Aa = w((n) => {
|
|
|
569
569
|
t && /* @__PURE__ */ l(yi, { file: t.file, onClose: a })
|
|
570
570
|
] });
|
|
571
571
|
});
|
|
572
|
-
|
|
572
|
+
Ta.displayName = "FileViewerProvider";
|
|
573
573
|
const Z = w((n) => {
|
|
574
574
|
const { label: e, error: t, description: i, required: s, children: r, inputId: a, image: h, size: d } = n, [c, f] = U(void 0), b = ln();
|
|
575
575
|
pe(() => {
|
|
@@ -598,11 +598,11 @@ const Z = w((n) => {
|
|
|
598
598
|
] });
|
|
599
599
|
});
|
|
600
600
|
Z.displayName = "InputWithLabel";
|
|
601
|
-
const
|
|
601
|
+
const Ea = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e.id)), Gt = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e.id)), ee = (n) => {
|
|
602
602
|
const { field: e } = n, {
|
|
603
603
|
field: { value: t, name: i, onChange: s, onBlur: r, disabled: a },
|
|
604
604
|
fieldState: { isTouched: h, error: d }
|
|
605
|
-
} =
|
|
605
|
+
} = Ys({
|
|
606
606
|
name: e.id
|
|
607
607
|
});
|
|
608
608
|
return {
|
|
@@ -654,7 +654,7 @@ const Ra = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e
|
|
|
654
654
|
), k = u(() => {
|
|
655
655
|
r();
|
|
656
656
|
}, [r]);
|
|
657
|
-
return /* @__PURE__ */ l(
|
|
657
|
+
return /* @__PURE__ */ l(Qs, { onDragEnd: I, children: /* @__PURE__ */ o(
|
|
658
658
|
Z,
|
|
659
659
|
{
|
|
660
660
|
size: t,
|
|
@@ -666,8 +666,8 @@ const Ra = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e
|
|
|
666
666
|
image: e.image,
|
|
667
667
|
children: [
|
|
668
668
|
(!d || i.length === 0) && /* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
669
|
-
/* @__PURE__ */ l(
|
|
670
|
-
|
|
669
|
+
/* @__PURE__ */ l(B.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ l(
|
|
670
|
+
B.Field,
|
|
671
671
|
{
|
|
672
672
|
value: c,
|
|
673
673
|
onChange: y,
|
|
@@ -693,7 +693,7 @@ const Ra = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e
|
|
|
693
693
|
}
|
|
694
694
|
)
|
|
695
695
|
] }),
|
|
696
|
-
i.length !== 0 && /* @__PURE__ */ l(
|
|
696
|
+
i.length !== 0 && /* @__PURE__ */ l(er, { droppableId: `${e.id}-droppable`, children: (F) => /* @__PURE__ */ o(
|
|
697
697
|
"div",
|
|
698
698
|
{
|
|
699
699
|
className: "flex flex-col gap-1",
|
|
@@ -701,7 +701,7 @@ const Ra = (n) => n.map((e) => /* @__PURE__ */ l(Yt, { children: e.render() }, e
|
|
|
701
701
|
ref: F.innerRef,
|
|
702
702
|
children: [
|
|
703
703
|
i.map((T, O) => /* @__PURE__ */ l(
|
|
704
|
-
|
|
704
|
+
tr,
|
|
705
705
|
{
|
|
706
706
|
draggableId: `${T}-draggable`,
|
|
707
707
|
index: O,
|
|
@@ -1041,8 +1041,8 @@ const wi = w((n) => {
|
|
|
1041
1041
|
required: e.required,
|
|
1042
1042
|
error: h,
|
|
1043
1043
|
image: e.image,
|
|
1044
|
-
children: /* @__PURE__ */ l(
|
|
1045
|
-
|
|
1044
|
+
children: /* @__PURE__ */ l(B.Root, { accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ l(
|
|
1045
|
+
B.Field,
|
|
1046
1046
|
{
|
|
1047
1047
|
id: e.id,
|
|
1048
1048
|
name: s,
|
|
@@ -1854,15 +1854,15 @@ class Te extends E {
|
|
|
1854
1854
|
const Fe = {
|
|
1855
1855
|
pass: {
|
|
1856
1856
|
label: "Pass",
|
|
1857
|
-
icon:
|
|
1857
|
+
icon: zr
|
|
1858
1858
|
},
|
|
1859
1859
|
fail: {
|
|
1860
1860
|
label: "Fail",
|
|
1861
|
-
icon:
|
|
1861
|
+
icon: Or
|
|
1862
1862
|
},
|
|
1863
1863
|
na: {
|
|
1864
1864
|
label: "N/A",
|
|
1865
|
-
icon:
|
|
1865
|
+
icon: kr
|
|
1866
1866
|
}
|
|
1867
1867
|
}, nt = Object.keys(Fe);
|
|
1868
1868
|
class xe extends File {
|
|
@@ -1907,7 +1907,7 @@ class Xe extends Promise {
|
|
|
1907
1907
|
return t.uuid = this.uuid, t;
|
|
1908
1908
|
}
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Aa(n) {
|
|
1911
1911
|
return Array.isArray(n) ? n.every((e) => e instanceof Xe || e instanceof xe) : !1;
|
|
1912
1912
|
}
|
|
1913
1913
|
function sn(n, e) {
|
|
@@ -1957,9 +1957,9 @@ const ki = Ye(() => {
|
|
|
1957
1957
|
const F = k.getContext("2d");
|
|
1958
1958
|
if (!F) throw new Error("Could not setup canvas context.");
|
|
1959
1959
|
F.drawImage(y, 0, 0, k.width, k.height), b();
|
|
1960
|
-
const T = await new Promise((de,
|
|
1960
|
+
const T = await new Promise((de, j) => {
|
|
1961
1961
|
k.toBlob(
|
|
1962
|
-
(ie) => ie ? de(ie) :
|
|
1962
|
+
(ie) => ie ? de(ie) : j(new Error("Could not convert canvas to blob.")),
|
|
1963
1963
|
"image/jpeg",
|
|
1964
1964
|
0.92
|
|
1965
1965
|
);
|
|
@@ -2119,7 +2119,7 @@ const Ti = w((n) => {
|
|
|
2119
2119
|
] });
|
|
2120
2120
|
});
|
|
2121
2121
|
Ti.displayName = "ImageCapturer";
|
|
2122
|
-
const
|
|
2122
|
+
const Ra = w((n) => {
|
|
2123
2123
|
const { children: e } = n, [t, i] = U(null), s = u(() => {
|
|
2124
2124
|
i(null);
|
|
2125
2125
|
}, []), r = u(
|
|
@@ -2135,7 +2135,7 @@ const Da = w((n) => {
|
|
|
2135
2135
|
t && /* @__PURE__ */ l(Ti, { open: !0, onOpenChange: a, onConfirm: t.onConfirm, modal: t.modal })
|
|
2136
2136
|
] });
|
|
2137
2137
|
});
|
|
2138
|
-
|
|
2138
|
+
Ra.displayName = "ImageCapturerProvider";
|
|
2139
2139
|
const Ei = w((n) => {
|
|
2140
2140
|
const { ref: e, file: t, error: i, rightSlot: s, className: r, size: a, ...h } = n;
|
|
2141
2141
|
return /* @__PURE__ */ o(
|
|
@@ -2183,7 +2183,7 @@ const Ri = w((n) => {
|
|
|
2183
2183
|
(!!t || !!s) && /* @__PURE__ */ o(X, { children: [
|
|
2184
2184
|
/* @__PURE__ */ l(ye, { size: "full" }),
|
|
2185
2185
|
/* @__PURE__ */ o("div", { className: "flex w-full shrink-0 items-center gap-2 self-end p-3", children: [
|
|
2186
|
-
s ? /* @__PURE__ */ l(m, { color: "var(--danger-11)", icon: mt }) : t && /* @__PURE__ */ l(m, { color: "var(--base-11)", icon:
|
|
2186
|
+
s ? /* @__PURE__ */ l(m, { color: "var(--danger-11)", icon: mt }) : t && /* @__PURE__ */ l(m, { color: "var(--base-11)", icon: Oa }),
|
|
2187
2187
|
/* @__PURE__ */ l(_, { className: "truncate", size: a, children: s ?? t?.name }),
|
|
2188
2188
|
r
|
|
2189
2189
|
] })
|
|
@@ -2469,15 +2469,15 @@ const Mi = w((n) => {
|
|
|
2469
2469
|
);
|
|
2470
2470
|
});
|
|
2471
2471
|
Mi.displayName = "PassFailFieldInput";
|
|
2472
|
-
const Di = (n) => typeof n == "string" && nt.includes(n),
|
|
2472
|
+
const Di = (n) => typeof n == "string" && nt.includes(n), Ma = (n) => !(n === null || typeof n != "object" || !("status" in n) || !Di(n.status) || !("notes" in n) || typeof n.notes != "string" || !("files" in n) || !(Array.isArray(n.files) && n.files.length === 0)), Da = (n) => !(n === null || typeof n != "object" || !("status" in n) || !Di(n.status) || !("notes" in n) || typeof n.notes != "string" || !("files" in n) || !Aa(n.files)), La = (n) => ({
|
|
2473
2473
|
status: n.status,
|
|
2474
2474
|
notes: n.notes,
|
|
2475
2475
|
files: []
|
|
2476
|
-
}),
|
|
2476
|
+
}), _a = (n) => ({
|
|
2477
2477
|
status: n.status,
|
|
2478
2478
|
notes: n.notes,
|
|
2479
2479
|
files: []
|
|
2480
|
-
}),
|
|
2480
|
+
}), $a = (n, e) => !(n.status !== e.status || n.notes !== e.notes || !sn(n.files, e.files)), Ba = (n, e) => !(n.status !== e.status || n.notes !== e.notes || n.files.length !== e.files.length);
|
|
2481
2481
|
class Ee extends E {
|
|
2482
2482
|
type = "pass-fail";
|
|
2483
2483
|
showNotesAndFilesOn;
|
|
@@ -2568,22 +2568,22 @@ class Ee extends E {
|
|
|
2568
2568
|
};
|
|
2569
2569
|
}
|
|
2570
2570
|
serializeValue(e) {
|
|
2571
|
-
return
|
|
2571
|
+
return La(e);
|
|
2572
2572
|
}
|
|
2573
2573
|
deserializeValue(e) {
|
|
2574
|
-
return
|
|
2574
|
+
return _a(e);
|
|
2575
2575
|
}
|
|
2576
2576
|
render() {
|
|
2577
2577
|
return /* @__PURE__ */ l(Mi, { field: this });
|
|
2578
2578
|
}
|
|
2579
2579
|
isSerializedValue(e) {
|
|
2580
|
-
return
|
|
2580
|
+
return Ma(e);
|
|
2581
2581
|
}
|
|
2582
2582
|
isValue(e) {
|
|
2583
|
-
return
|
|
2583
|
+
return Da(e);
|
|
2584
2584
|
}
|
|
2585
2585
|
areValuesEqual(e, t) {
|
|
2586
|
-
return
|
|
2586
|
+
return $a(e, t);
|
|
2587
2587
|
}
|
|
2588
2588
|
blankValue() {
|
|
2589
2589
|
return {
|
|
@@ -2610,7 +2610,7 @@ class Ee extends E {
|
|
|
2610
2610
|
};
|
|
2611
2611
|
}
|
|
2612
2612
|
areSerializedValuesEqual(e, t) {
|
|
2613
|
-
return
|
|
2613
|
+
return Ba(e, t);
|
|
2614
2614
|
}
|
|
2615
2615
|
}
|
|
2616
2616
|
const Li = w((n) => {
|
|
@@ -2736,7 +2736,7 @@ class Ae extends he {
|
|
|
2736
2736
|
return e === t;
|
|
2737
2737
|
}
|
|
2738
2738
|
}
|
|
2739
|
-
const
|
|
2739
|
+
const ja = Kt(
|
|
2740
2740
|
[
|
|
2741
2741
|
"group flex cursor-pointer items-center justify-center text-yellow-500 transition-colors disabled:pointer-events-none disabled:opacity-50"
|
|
2742
2742
|
],
|
|
@@ -2772,7 +2772,7 @@ const Ua = Kt(
|
|
|
2772
2772
|
image: e.image,
|
|
2773
2773
|
children: /* @__PURE__ */ o("div", { className: "flex flex-row items-center gap-1", children: [
|
|
2774
2774
|
/* @__PURE__ */ l(
|
|
2775
|
-
|
|
2775
|
+
jn.Root,
|
|
2776
2776
|
{
|
|
2777
2777
|
id: e.id,
|
|
2778
2778
|
name: s,
|
|
@@ -2780,7 +2780,7 @@ const Ua = Kt(
|
|
|
2780
2780
|
value: i,
|
|
2781
2781
|
onValueChange: c,
|
|
2782
2782
|
disabled: d,
|
|
2783
|
-
children: b.map((C) => /* @__PURE__ */ l(
|
|
2783
|
+
children: b.map((C) => /* @__PURE__ */ l(jn.Item, { value: C, className: ja({ size: t }), children: /* @__PURE__ */ l(m, { icon: mi, className: "size-full group-data-[active=true]:fill-current" }) }, `${e.id}-${C}`))
|
|
2784
2784
|
}
|
|
2785
2785
|
),
|
|
2786
2786
|
!d && i !== null && /* @__PURE__ */ l(A, { onClick: f, type: "button", variant: "ghost", accentColor: "base", size: t, children: /* @__PURE__ */ l(m, { icon: ue }) })
|
|
@@ -2895,12 +2895,12 @@ class Re extends E {
|
|
|
2895
2895
|
return e === t;
|
|
2896
2896
|
}
|
|
2897
2897
|
}
|
|
2898
|
-
const an = Ye(null),
|
|
2898
|
+
const an = Ye(null), Pa = () => {
|
|
2899
2899
|
const n = L(an);
|
|
2900
2900
|
if (!n)
|
|
2901
2901
|
throw new Error("useScannerContext must be used within a component tree wrapped by ScannerProvider.");
|
|
2902
2902
|
return n;
|
|
2903
|
-
},
|
|
2903
|
+
}, bc = () => {
|
|
2904
2904
|
const n = L(an);
|
|
2905
2905
|
if (!n)
|
|
2906
2906
|
throw new Error("useScanner must be used within a component tree wrapped by ScannerProvider.");
|
|
@@ -2926,7 +2926,7 @@ const an = Ye(null), Ga = () => {
|
|
|
2926
2926
|
});
|
|
2927
2927
|
on.displayName = "Scanner";
|
|
2928
2928
|
const $i = w((n) => {
|
|
2929
|
-
const { paused: e, formats: t, timeBetweenDecodingAttempts: i, trySkew: s, onDecodeResult: r, onDecodeError: a, onError: h } = n, { wasmUrl: d } =
|
|
2929
|
+
const { paused: e, formats: t, timeBetweenDecodingAttempts: i, trySkew: s, onDecodeResult: r, onDecodeError: a, onError: h } = n, { wasmUrl: d } = Pa(), { ref: c } = nr({
|
|
2930
2930
|
wasmUrl: d,
|
|
2931
2931
|
paused: e,
|
|
2932
2932
|
formats: t,
|
|
@@ -2950,7 +2950,7 @@ const $i = w((n) => {
|
|
|
2950
2950
|
] });
|
|
2951
2951
|
});
|
|
2952
2952
|
$i.displayName = "ScannerInternal";
|
|
2953
|
-
const
|
|
2953
|
+
const Ua = w((n) => {
|
|
2954
2954
|
const { children: e, wasmUrl: t } = n, [i, s] = U(null), r = u(() => {
|
|
2955
2955
|
s(null);
|
|
2956
2956
|
}, []), a = u(
|
|
@@ -2972,8 +2972,8 @@ const Ha = w((n) => {
|
|
|
2972
2972
|
i && /* @__PURE__ */ l(on, { open: !0, onOpenChange: h, ...i })
|
|
2973
2973
|
] });
|
|
2974
2974
|
});
|
|
2975
|
-
|
|
2976
|
-
const
|
|
2975
|
+
Ua.displayName = "ScannerProvider";
|
|
2976
|
+
const Bi = w((n) => {
|
|
2977
2977
|
const { field: e } = n, { size: t } = L(K), { value: i, name: s, onBlur: r, onChange: a, error: h, disabled: d } = ee({ field: e }), [c, f] = U(!1), b = u(
|
|
2978
2978
|
(z) => {
|
|
2979
2979
|
const S = z.target.value;
|
|
@@ -3030,7 +3030,7 @@ const ji = w((n) => {
|
|
|
3030
3030
|
accentColor: "base",
|
|
3031
3031
|
disabled: d,
|
|
3032
3032
|
children: [
|
|
3033
|
-
/* @__PURE__ */ l(m, { icon:
|
|
3033
|
+
/* @__PURE__ */ l(m, { icon: ra }),
|
|
3034
3034
|
"Scan"
|
|
3035
3035
|
]
|
|
3036
3036
|
}
|
|
@@ -3040,7 +3040,7 @@ const ji = w((n) => {
|
|
|
3040
3040
|
}
|
|
3041
3041
|
);
|
|
3042
3042
|
});
|
|
3043
|
-
|
|
3043
|
+
Bi.displayName = "ScanFieldInput";
|
|
3044
3044
|
class Je extends E {
|
|
3045
3045
|
type = "qr";
|
|
3046
3046
|
constructor(e) {
|
|
@@ -3083,7 +3083,7 @@ class Je extends E {
|
|
|
3083
3083
|
return e;
|
|
3084
3084
|
}
|
|
3085
3085
|
render() {
|
|
3086
|
-
return /* @__PURE__ */ l(
|
|
3086
|
+
return /* @__PURE__ */ l(Bi, { field: this });
|
|
3087
3087
|
}
|
|
3088
3088
|
isSerializedValue(e) {
|
|
3089
3089
|
return typeof e == "string";
|
|
@@ -3104,7 +3104,7 @@ class Je extends E {
|
|
|
3104
3104
|
return e === t;
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
const
|
|
3107
|
+
const ji = w((n) => {
|
|
3108
3108
|
const { field: e } = n, { size: t } = L(K), { value: i, name: s, onBlur: r, onChange: a, error: h, disabled: d } = ee({ field: e }), c = u(
|
|
3109
3109
|
(C) => {
|
|
3110
3110
|
a(C ?? null), r();
|
|
@@ -3152,7 +3152,7 @@ const Bi = w((n) => {
|
|
|
3152
3152
|
}
|
|
3153
3153
|
);
|
|
3154
3154
|
});
|
|
3155
|
-
|
|
3155
|
+
ji.displayName = "SelectFieldInput";
|
|
3156
3156
|
class Me extends he {
|
|
3157
3157
|
type = "select";
|
|
3158
3158
|
placeholder;
|
|
@@ -3211,7 +3211,7 @@ class Me extends he {
|
|
|
3211
3211
|
return e;
|
|
3212
3212
|
}
|
|
3213
3213
|
render() {
|
|
3214
|
-
return /* @__PURE__ */ l(
|
|
3214
|
+
return /* @__PURE__ */ l(ji, { field: this });
|
|
3215
3215
|
}
|
|
3216
3216
|
isSerializedValue(e) {
|
|
3217
3217
|
return typeof e != "string" && e !== null ? !1 : (/* @__PURE__ */ new Set([null, ...this.options.map(({ value: i }) => i)])).has(e);
|
|
@@ -3254,8 +3254,8 @@ const Pi = w((n) => {
|
|
|
3254
3254
|
required: e.required,
|
|
3255
3255
|
error: h,
|
|
3256
3256
|
image: e.image,
|
|
3257
|
-
children: /* @__PURE__ */ l(
|
|
3258
|
-
|
|
3257
|
+
children: /* @__PURE__ */ l(B.Root, { accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ l(
|
|
3258
|
+
B.Field,
|
|
3259
3259
|
{
|
|
3260
3260
|
id: e.id,
|
|
3261
3261
|
className: "truncate",
|
|
@@ -3392,8 +3392,8 @@ class Le extends Ge {
|
|
|
3392
3392
|
return /* @__PURE__ */ l(Ui, { field: this });
|
|
3393
3393
|
}
|
|
3394
3394
|
}
|
|
3395
|
-
const Gi =
|
|
3396
|
-
function
|
|
3395
|
+
const Gi = Ha(), Ga = new Set(Gi);
|
|
3396
|
+
function Ha(n = !0) {
|
|
3397
3397
|
const e = /* @__PURE__ */ new Set();
|
|
3398
3398
|
for (let t = -12; t <= 14; t++) {
|
|
3399
3399
|
const i = t >= 0 ? "+" : "-", s = Math.abs(t).toString().padStart(2, "0");
|
|
@@ -3412,17 +3412,17 @@ function Jn(n) {
|
|
|
3412
3412
|
const e = n[0] === "+" ? 1 : -1, t = Number(n.slice(1, 3)), i = Number(n.slice(4, 6));
|
|
3413
3413
|
return e * (t * 60 + i);
|
|
3414
3414
|
}
|
|
3415
|
-
const
|
|
3415
|
+
const Ja = "+00:00", Wa = /^T([01]\d|2[0-3]):([0-5]\d):00([+-]\d{2}:\d{2})$/, cn = (n) => typeof n == "string" && Ga.has(n), Ka = () => {
|
|
3416
3416
|
const n = -(/* @__PURE__ */ new Date()).getTimezoneOffset(), e = n >= 0 ? "+" : "-", t = Math.abs(n), i = Math.floor(t / 60), s = t % 60, r = `${e}${i.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
|
|
3417
|
-
return cn(r) ? r :
|
|
3417
|
+
return cn(r) ? r : Ja;
|
|
3418
3418
|
};
|
|
3419
|
-
function
|
|
3419
|
+
function Xa(n) {
|
|
3420
3420
|
const e = /^([+-])(\d{2}):(\d{2})$/.exec(n);
|
|
3421
3421
|
if (!e) throw new Error(`Invalid UTC offset: ${n}`);
|
|
3422
3422
|
return (e[1] === "+" ? 1 : -1) * (Number(e[2]) * 60 + Number(e[3]));
|
|
3423
3423
|
}
|
|
3424
3424
|
const bt = (n) => {
|
|
3425
|
-
const e =
|
|
3425
|
+
const e = Wa.exec(n);
|
|
3426
3426
|
if (!e) return null;
|
|
3427
3427
|
const t = e[3];
|
|
3428
3428
|
return cn(t) ? {
|
|
@@ -3430,7 +3430,7 @@ const bt = (n) => {
|
|
|
3430
3430
|
minutes: Number(e[2]),
|
|
3431
3431
|
utcOffset: t
|
|
3432
3432
|
} : null;
|
|
3433
|
-
}, me = (n) => typeof n == "string" && bt(n) !== null, Ne = (n, e, t =
|
|
3433
|
+
}, me = (n) => typeof n == "string" && bt(n) !== null, Ne = (n, e, t = Ka()) => {
|
|
3434
3434
|
if (!Number.isInteger(n) || n < 0 || n > 23) throw new Error(`Invalid hour: ${n}`);
|
|
3435
3435
|
if (!Number.isInteger(e) || e < 0 || e > 59) throw new Error(`Invalid minute: ${e}`);
|
|
3436
3436
|
if (!cn(t)) throw new Error("Unsupported UTC offset");
|
|
@@ -3439,13 +3439,13 @@ const bt = (n) => {
|
|
|
3439
3439
|
}, Ht = (n) => `UTC${n}`, _e = (n) => {
|
|
3440
3440
|
const e = bt(n);
|
|
3441
3441
|
if (!e) throw new Error(`Invalid time value: ${n}`);
|
|
3442
|
-
return (e.hours * 60 + e.minutes -
|
|
3442
|
+
return (e.hours * 60 + e.minutes - Xa(e.utcOffset) + 1440) % 1440;
|
|
3443
3443
|
}, Ft = (n, e = !0) => {
|
|
3444
3444
|
const t = bt(n);
|
|
3445
3445
|
if (!t) throw new Error(`Invalid time value: ${n}`);
|
|
3446
3446
|
const i = (t.hours % 12 || 12).toString().padStart(2, "0"), s = t.minutes.toString().padStart(2, "0"), r = t.hours >= 12 ? "PM" : "AM", a = `${i}:${s} ${r}`;
|
|
3447
3447
|
return e ? `${a} ${Ht(t.utcOffset)}` : a;
|
|
3448
|
-
},
|
|
3448
|
+
}, Cc = (n) => typeof n == "object" && (me(n.from) || me(n.to)), Hi = (n, e) => {
|
|
3449
3449
|
const t = _e(n), i = e.from ? _e(e.from) : null, s = e.to ? _e(e.to) : null;
|
|
3450
3450
|
return i === null && s === null ? !0 : i === null ? t <= s : s === null ? t >= i : i <= s ? t >= i && t <= s : t >= i || t <= s;
|
|
3451
3451
|
}, dn = w((n) => {
|
|
@@ -3472,8 +3472,8 @@ const bt = (n) => {
|
|
|
3472
3472
|
[i]
|
|
3473
3473
|
);
|
|
3474
3474
|
return /* @__PURE__ */ o("div", { className: "flex min-w-0 gap-2", children: [
|
|
3475
|
-
/* @__PURE__ */ l(
|
|
3476
|
-
|
|
3475
|
+
/* @__PURE__ */ l(B.Root, { className: "min-w-0 grow", accentColor: "base", variant: "surface", size: r, children: /* @__PURE__ */ l(
|
|
3476
|
+
B.Field,
|
|
3477
3477
|
{
|
|
3478
3478
|
id: a,
|
|
3479
3479
|
name: h,
|
|
@@ -3910,8 +3910,8 @@ const Ki = w((n) => {
|
|
|
3910
3910
|
error: h,
|
|
3911
3911
|
image: e.image,
|
|
3912
3912
|
children: /* @__PURE__ */ o("div", { className: "flex w-full gap-2", children: [
|
|
3913
|
-
/* @__PURE__ */ l(
|
|
3914
|
-
|
|
3913
|
+
/* @__PURE__ */ l(B.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ l(
|
|
3914
|
+
B.Field,
|
|
3915
3915
|
{
|
|
3916
3916
|
id: e.id,
|
|
3917
3917
|
className: "truncate",
|
|
@@ -3935,7 +3935,7 @@ const Ki = w((n) => {
|
|
|
3935
3935
|
type: "button",
|
|
3936
3936
|
disabled: i === null,
|
|
3937
3937
|
onClick: C,
|
|
3938
|
-
children: /* @__PURE__ */ l(m, { icon:
|
|
3938
|
+
children: /* @__PURE__ */ l(m, { icon: jr })
|
|
3939
3939
|
}
|
|
3940
3940
|
)
|
|
3941
3941
|
] })
|
|
@@ -4043,71 +4043,71 @@ const lt = {
|
|
|
4043
4043
|
"pass-fail": Ee,
|
|
4044
4044
|
otp: Te,
|
|
4045
4045
|
rating: Re
|
|
4046
|
-
},
|
|
4046
|
+
}, Za = Object.keys(lt), H = {
|
|
4047
4047
|
"checkbox-list": {
|
|
4048
4048
|
description: "Allows the user to select a multiple options from a list.",
|
|
4049
4049
|
group: R.Selection,
|
|
4050
|
-
icon:
|
|
4050
|
+
icon: Dr,
|
|
4051
4051
|
name: "Checkbox list"
|
|
4052
4052
|
},
|
|
4053
4053
|
"multi-select": {
|
|
4054
4054
|
description: "Allows the user to select a multiple options from a list of options.",
|
|
4055
4055
|
group: R.Selection,
|
|
4056
|
-
icon:
|
|
4056
|
+
icon: ea,
|
|
4057
4057
|
name: "Multi-select"
|
|
4058
4058
|
},
|
|
4059
4059
|
"multi-string": {
|
|
4060
4060
|
description: "Allows the user to provide multiple unique strings.",
|
|
4061
4061
|
group: R.Text,
|
|
4062
|
-
icon:
|
|
4062
|
+
icon: la,
|
|
4063
4063
|
name: "Multi-string"
|
|
4064
4064
|
},
|
|
4065
4065
|
"pass-fail": {
|
|
4066
4066
|
description: "Track pass, fail, or N/A outcome.",
|
|
4067
4067
|
group: R.Assessment,
|
|
4068
|
-
icon:
|
|
4068
|
+
icon: Ar,
|
|
4069
4069
|
name: "Pass - Fail"
|
|
4070
4070
|
},
|
|
4071
4071
|
boolean: {
|
|
4072
4072
|
description: "Perfect for both optional and required yes/no questions.",
|
|
4073
4073
|
group: R.Selection,
|
|
4074
|
-
icon:
|
|
4074
|
+
icon: ya,
|
|
4075
4075
|
name: "Checkbox"
|
|
4076
4076
|
},
|
|
4077
4077
|
date: {
|
|
4078
4078
|
description: "Allows specifying a date.",
|
|
4079
4079
|
group: R.Temporal,
|
|
4080
|
-
icon:
|
|
4080
|
+
icon: yr,
|
|
4081
4081
|
name: "Date"
|
|
4082
4082
|
},
|
|
4083
4083
|
time: {
|
|
4084
4084
|
description: "Allows specifying a time and UTC offset.",
|
|
4085
4085
|
group: R.Temporal,
|
|
4086
|
-
icon:
|
|
4086
|
+
icon: Fa,
|
|
4087
4087
|
name: "Time"
|
|
4088
4088
|
},
|
|
4089
4089
|
number: {
|
|
4090
4090
|
description: "Allows specifying a number within a given range.",
|
|
4091
4091
|
group: R.Numeric,
|
|
4092
|
-
icon:
|
|
4092
|
+
icon: Wr,
|
|
4093
4093
|
name: "Number"
|
|
4094
4094
|
},
|
|
4095
4095
|
otp: {
|
|
4096
4096
|
description: "Allows specifying a number within a given range.",
|
|
4097
4097
|
group: R.Verification,
|
|
4098
|
-
icon:
|
|
4098
|
+
icon: fa,
|
|
4099
4099
|
name: "OTP"
|
|
4100
4100
|
},
|
|
4101
4101
|
qr: {
|
|
4102
4102
|
description: "Used for scanning/reading QR and barcodes.",
|
|
4103
4103
|
group: R.Capture,
|
|
4104
|
-
icon:
|
|
4104
|
+
icon: ma,
|
|
4105
4105
|
name: "Scan"
|
|
4106
4106
|
},
|
|
4107
4107
|
radio: {
|
|
4108
4108
|
description: "Allows the user to select a single option from a list of options.",
|
|
4109
4109
|
group: R.Selection,
|
|
4110
|
-
icon:
|
|
4110
|
+
icon: Fr,
|
|
4111
4111
|
name: "Option list"
|
|
4112
4112
|
},
|
|
4113
4113
|
rating: {
|
|
@@ -4119,19 +4119,19 @@ const lt = {
|
|
|
4119
4119
|
select: {
|
|
4120
4120
|
description: "Allows the user to select a single option from a list of options.",
|
|
4121
4121
|
group: R.Selection,
|
|
4122
|
-
icon:
|
|
4122
|
+
icon: na,
|
|
4123
4123
|
name: "Dropdown"
|
|
4124
4124
|
},
|
|
4125
4125
|
string: {
|
|
4126
4126
|
description: "Short text fields can hold up to 500 characters on a single line.",
|
|
4127
4127
|
group: R.Text,
|
|
4128
|
-
icon:
|
|
4128
|
+
icon: za,
|
|
4129
4129
|
name: "Short Text"
|
|
4130
4130
|
},
|
|
4131
4131
|
text: {
|
|
4132
4132
|
description: "Paragraph fields can hold up to 10000 characters and can have multiple lines.",
|
|
4133
4133
|
group: R.Text,
|
|
4134
|
-
icon:
|
|
4134
|
+
icon: hr,
|
|
4135
4135
|
name: "Paragraph"
|
|
4136
4136
|
},
|
|
4137
4137
|
upload: {
|
|
@@ -4143,10 +4143,10 @@ const lt = {
|
|
|
4143
4143
|
url: {
|
|
4144
4144
|
description: "Allows users to enter a URL.",
|
|
4145
4145
|
group: R.Text,
|
|
4146
|
-
icon:
|
|
4146
|
+
icon: Yr,
|
|
4147
4147
|
name: "URL"
|
|
4148
4148
|
}
|
|
4149
|
-
},
|
|
4149
|
+
}, Ya = {
|
|
4150
4150
|
[R.Assessment]: { name: "Assessment" },
|
|
4151
4151
|
[R.Capture]: { name: "Capture" },
|
|
4152
4152
|
[R.Numeric]: { name: "Numeric" },
|
|
@@ -5220,7 +5220,7 @@ class xn extends v {
|
|
|
5220
5220
|
return (t) => t === e;
|
|
5221
5221
|
}
|
|
5222
5222
|
}
|
|
5223
|
-
class
|
|
5223
|
+
class Bl extends v {
|
|
5224
5224
|
type = "qr";
|
|
5225
5225
|
modifier = "notEquals";
|
|
5226
5226
|
serializeValue() {
|
|
@@ -5231,7 +5231,7 @@ class jl extends v {
|
|
|
5231
5231
|
return (t) => t !== e;
|
|
5232
5232
|
}
|
|
5233
5233
|
}
|
|
5234
|
-
class
|
|
5234
|
+
class jl extends v {
|
|
5235
5235
|
type = "qr";
|
|
5236
5236
|
modifier = "includes";
|
|
5237
5237
|
serializeValue() {
|
|
@@ -5261,13 +5261,13 @@ const Dt = {
|
|
|
5261
5261
|
defaultValue: () => ""
|
|
5262
5262
|
},
|
|
5263
5263
|
notEquals: {
|
|
5264
|
-
klass:
|
|
5264
|
+
klass: Bl,
|
|
5265
5265
|
label: "is not",
|
|
5266
5266
|
isTransferable: (n) => !0,
|
|
5267
5267
|
defaultValue: () => ""
|
|
5268
5268
|
},
|
|
5269
5269
|
includes: {
|
|
5270
|
-
klass:
|
|
5270
|
+
klass: jl,
|
|
5271
5271
|
label: "includes",
|
|
5272
5272
|
isTransferable: (n) => !0,
|
|
5273
5273
|
defaultValue: () => ""
|
|
@@ -5555,7 +5555,7 @@ class is extends v {
|
|
|
5555
5555
|
return (t) => me(t) ? !Hi(t, e) : !1;
|
|
5556
5556
|
}
|
|
5557
5557
|
}
|
|
5558
|
-
const
|
|
5558
|
+
const Bt = {
|
|
5559
5559
|
equals: {
|
|
5560
5560
|
klass: Fn,
|
|
5561
5561
|
label: "is",
|
|
@@ -5613,7 +5613,7 @@ class ls extends v {
|
|
|
5613
5613
|
return (e) => e.length === 0;
|
|
5614
5614
|
}
|
|
5615
5615
|
}
|
|
5616
|
-
const
|
|
5616
|
+
const jt = {
|
|
5617
5617
|
equals: {
|
|
5618
5618
|
klass: Nn,
|
|
5619
5619
|
label: "is",
|
|
@@ -5696,7 +5696,7 @@ const Pt = {
|
|
|
5696
5696
|
isTransferable: (n) => !0,
|
|
5697
5697
|
defaultValue: () => ""
|
|
5698
5698
|
}
|
|
5699
|
-
},
|
|
5699
|
+
}, Qa = {
|
|
5700
5700
|
date: {
|
|
5701
5701
|
equals: (n, e) => new pn({ ...n, field: e, value: new Date(n.value) }),
|
|
5702
5702
|
notEquals: (n, e) => new sl({ ...n, field: e, value: new Date(n.value) }),
|
|
@@ -5784,9 +5784,9 @@ const Pt = {
|
|
|
5784
5784
|
},
|
|
5785
5785
|
qr: {
|
|
5786
5786
|
equals: (n, e) => new xn({ ...n, field: e }),
|
|
5787
|
-
notEquals: (n, e) => new
|
|
5787
|
+
notEquals: (n, e) => new Bl({ ...n, field: e }),
|
|
5788
5788
|
excludes: (n, e) => new Pl({ ...n, field: e }),
|
|
5789
|
-
includes: (n, e) => new
|
|
5789
|
+
includes: (n, e) => new jl({ ...n, field: e })
|
|
5790
5790
|
},
|
|
5791
5791
|
select: {
|
|
5792
5792
|
equals: (n, e) => new wn({ ...n, field: e }),
|
|
@@ -5824,7 +5824,7 @@ const Pt = {
|
|
|
5824
5824
|
equals: (n, e) => new Nn({ ...n, field: e }),
|
|
5825
5825
|
notEquals: (n, e) => new ls({ ...n, field: e })
|
|
5826
5826
|
}
|
|
5827
|
-
},
|
|
5827
|
+
}, eo = {
|
|
5828
5828
|
and: (n, e) => new yt({ ...n, conditions: e }),
|
|
5829
5829
|
nand: (n, e) => new il({ ...n, conditions: e }),
|
|
5830
5830
|
nor: (n, e) => new ll({ ...n, conditions: e }),
|
|
@@ -5833,16 +5833,16 @@ const Pt = {
|
|
|
5833
5833
|
if (!Tn(n, e)) return null;
|
|
5834
5834
|
if (e.type === "compound") {
|
|
5835
5835
|
const t = ht(n, e.conditions);
|
|
5836
|
-
return
|
|
5836
|
+
return eo[e.operator](e, t);
|
|
5837
5837
|
} else {
|
|
5838
5838
|
const t = n.find((i) => i.id === e.field);
|
|
5839
|
-
return
|
|
5839
|
+
return Qa[e.type][e.modifier](e, t);
|
|
5840
5840
|
}
|
|
5841
5841
|
}, ht = (n, e) => e.map((t) => os(n, t)).filter((t) => !!t), cs = (n, e) => On(n, e) ? e.serialize() : null, ds = (n, e) => e.map((t) => cs(n, t)).filter((t) => !!t), On = (n, e) => e.type === "compound" ? (e.conditions = In(n, e.conditions), e) : new Set(n.map((i) => i.id)).has(e.field.id) ? e : null, In = (n, e) => e.map((t) => On(n, t)).filter((t) => !!t), Tn = (n, e) => e.type === "compound" ? {
|
|
5842
5842
|
...e,
|
|
5843
5843
|
conditions: us(n, e.conditions)
|
|
5844
5844
|
} : new Set(n.map((i) => i.id)).has(e.field) ? e : null, us = (n, e) => e.map((t) => Tn(n, t)).filter((t) => !!t);
|
|
5845
|
-
class
|
|
5845
|
+
class to extends gt {
|
|
5846
5846
|
conditions;
|
|
5847
5847
|
constructor(e) {
|
|
5848
5848
|
super(), this.conditions = this.initConditions(e);
|
|
@@ -5882,24 +5882,24 @@ class io extends gt {
|
|
|
5882
5882
|
return qn(this.conditions, e);
|
|
5883
5883
|
}
|
|
5884
5884
|
}
|
|
5885
|
-
const
|
|
5886
|
-
const t = new
|
|
5885
|
+
const yc = (n, e) => $(() => {
|
|
5886
|
+
const t = new to(n);
|
|
5887
5887
|
return t.observe((i) => e(i.getConditions())), t;
|
|
5888
5888
|
}, [n, e]), En = (n) => lt[n.type].deserialize(n);
|
|
5889
|
-
function
|
|
5889
|
+
function vc(n) {
|
|
5890
5890
|
return n.map(En);
|
|
5891
5891
|
}
|
|
5892
|
-
function
|
|
5892
|
+
function no(n) {
|
|
5893
5893
|
return n.type === "section" ? oe.deserialize(n) : En(n);
|
|
5894
5894
|
}
|
|
5895
|
-
const An = (n) => n.map(
|
|
5896
|
-
function
|
|
5895
|
+
const An = (n) => n.map(no), hs = (n) => lt[n.type].fromConfig(n), io = (n) => n.map((e) => hs(e)), lo = (n) => n.type === "section" ? oe.fromConfig(n) : hs(n), so = (n) => n.map(lo), fs = (n) => lt[n.type].deserializeConfig(n), ro = (n) => n.map(fs), ao = (n) => n.type === "section" ? oe.deserializeConfig(n) : fs(n), oo = (n) => n.map(ao), ps = (n) => lt[n.type].serializeConfig(n), co = (n) => n.map(ps), uo = (n) => n.type === "section" ? oe.serializeConfig(n) : ps(n), ho = (n) => n.map(uo);
|
|
5896
|
+
function Vc(n) {
|
|
5897
5897
|
const e = {};
|
|
5898
5898
|
for (const t of n)
|
|
5899
5899
|
e[t.id] = t;
|
|
5900
5900
|
return e;
|
|
5901
5901
|
}
|
|
5902
|
-
function
|
|
5902
|
+
function fo(n, e, t = !0) {
|
|
5903
5903
|
const i = t ? Rn(n, e) : e, s = {};
|
|
5904
5904
|
for (const r of n) {
|
|
5905
5905
|
if (!(r.id in i)) continue;
|
|
@@ -5908,7 +5908,7 @@ function mo(n, e, t = !0) {
|
|
|
5908
5908
|
}
|
|
5909
5909
|
return s;
|
|
5910
5910
|
}
|
|
5911
|
-
function
|
|
5911
|
+
function po(n, e, t = !0) {
|
|
5912
5912
|
const i = t ? ms(n, e) : e, s = {};
|
|
5913
5913
|
for (const r of n) {
|
|
5914
5914
|
if (!(r.id in i)) continue;
|
|
@@ -5935,7 +5935,7 @@ function ms(n, e) {
|
|
|
5935
5935
|
}
|
|
5936
5936
|
return t;
|
|
5937
5937
|
}
|
|
5938
|
-
function
|
|
5938
|
+
function mo(n, e) {
|
|
5939
5939
|
const t = Rn(n, e), i = {}, s = {};
|
|
5940
5940
|
for (const r of n) {
|
|
5941
5941
|
if (!(r.id in t)) continue;
|
|
@@ -5958,7 +5958,7 @@ function bo(n, e) {
|
|
|
5958
5958
|
}
|
|
5959
5959
|
return [i, s];
|
|
5960
5960
|
}
|
|
5961
|
-
function
|
|
5961
|
+
function go(n, e, t) {
|
|
5962
5962
|
const i = {};
|
|
5963
5963
|
for (const s of n) {
|
|
5964
5964
|
if (!(s.id in e)) continue;
|
|
@@ -5982,36 +5982,49 @@ function Co(n, e, t) {
|
|
|
5982
5982
|
}
|
|
5983
5983
|
return i;
|
|
5984
5984
|
}
|
|
5985
|
-
const
|
|
5985
|
+
const bo = (n, e) => {
|
|
5986
5986
|
const t = {};
|
|
5987
5987
|
for (const i of n) {
|
|
5988
5988
|
const s = e[i.id];
|
|
5989
5989
|
t[i.id] = s !== void 0 ? s : i.blankValue();
|
|
5990
5990
|
}
|
|
5991
5991
|
return t;
|
|
5992
|
-
},
|
|
5992
|
+
}, Co = (n, e, t) => {
|
|
5993
5993
|
const i = {};
|
|
5994
5994
|
for (const s of n) {
|
|
5995
|
+
if (!(s.id in e) && !(s.id in t)) continue;
|
|
5996
|
+
if (!(s.id in e)) {
|
|
5997
|
+
i[s.id] = t[s.id];
|
|
5998
|
+
continue;
|
|
5999
|
+
}
|
|
6000
|
+
if (!(s.id in t)) continue;
|
|
5995
6001
|
const r = e[s.id], a = t[s.id];
|
|
5996
6002
|
s.areValuesEqual(r, a) || (i[s.id] = a);
|
|
5997
6003
|
}
|
|
5998
6004
|
return i;
|
|
5999
|
-
},
|
|
6005
|
+
}, yo = (n, e, t) => {
|
|
6000
6006
|
const i = {};
|
|
6001
6007
|
for (const s of n) {
|
|
6008
|
+
if (!(s.id in e) && !(s.id in t) || !(s.id in e) || !(s.id in t)) continue;
|
|
6002
6009
|
const r = e[s.id], a = t[s.id];
|
|
6003
6010
|
s.areValuesEqual(r, a) && (i[s.id] = a);
|
|
6004
6011
|
}
|
|
6005
6012
|
return i;
|
|
6006
|
-
},
|
|
6013
|
+
}, vo = (n, e, t) => n.every((i) => {
|
|
6014
|
+
if (!(i.id in e) && !(i.id in t)) return !0;
|
|
6015
|
+
if (!(i.id in e) || !(i.id in t)) return !1;
|
|
6007
6016
|
const s = e[i.id], r = t[i.id];
|
|
6008
6017
|
return i.areValuesEqual(s, r);
|
|
6009
|
-
}),
|
|
6018
|
+
}), Vo = (n) => {
|
|
6010
6019
|
const e = {};
|
|
6011
6020
|
for (const t of n)
|
|
6012
6021
|
e[t.id] = t.blankValue();
|
|
6013
6022
|
return e;
|
|
6014
|
-
}, xo = (n, e) =>
|
|
6023
|
+
}, xo = (n, e) => n.every((t) => {
|
|
6024
|
+
if (!(t.id in e)) return !0;
|
|
6025
|
+
const i = e[t.id];
|
|
6026
|
+
return t.isValueBlank(i);
|
|
6027
|
+
}), wo = (n, e) => n.some((t) => !(t.id in e)), zo = (n, e) => n.every((t) => t.id in e), So = Kt(["flex", "flex-col"], {
|
|
6015
6028
|
variants: {
|
|
6016
6029
|
size: {
|
|
6017
6030
|
xs: ["gap-2"],
|
|
@@ -6031,7 +6044,7 @@ const yo = (n, e) => {
|
|
|
6031
6044
|
xl: ["gap-10"]
|
|
6032
6045
|
}
|
|
6033
6046
|
}
|
|
6034
|
-
}),
|
|
6047
|
+
}), gs = w((n) => {
|
|
6035
6048
|
const { fieldSection: e } = n, { label: t, description: i } = e, s = Zn(), { fieldSchema: r, size: a } = L(K), h = $(() => r.getFieldSections(), [r]), d = $(() => h.findIndex(({ id: C }) => C === e.id), [h, e.id]), c = $(() => h.filter((C) => e.id in C.conditions), [h, e.id]), f = $(() => c.length === 0 ? !0 : c.some((C) => {
|
|
6036
6049
|
const p = C.getConditions(e.id);
|
|
6037
6050
|
return qn(p, s);
|
|
@@ -6040,14 +6053,14 @@ const yo = (n, e) => {
|
|
|
6040
6053
|
d !== 0 ? /* @__PURE__ */ l(ye, { size: "full" }) : null,
|
|
6041
6054
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-4", children: [
|
|
6042
6055
|
(t || i) && /* @__PURE__ */ l(X, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
6043
|
-
/* @__PURE__ */ l(
|
|
6056
|
+
/* @__PURE__ */ l(js, { size: a, children: t }),
|
|
6044
6057
|
i && /* @__PURE__ */ l(_, { accentColor: "base", size: a, children: i })
|
|
6045
6058
|
] }) }),
|
|
6046
6059
|
/* @__PURE__ */ l("div", { className: Mn({ size: a }), children: b })
|
|
6047
6060
|
] })
|
|
6048
6061
|
] }) : null;
|
|
6049
6062
|
});
|
|
6050
|
-
|
|
6063
|
+
gs.displayName = "FieldSectionLayout";
|
|
6051
6064
|
class oe extends Ue {
|
|
6052
6065
|
type = "section";
|
|
6053
6066
|
label;
|
|
@@ -6075,7 +6088,7 @@ class oe extends Ue {
|
|
|
6075
6088
|
return new oe({ ...e, fields: t, conditions: i });
|
|
6076
6089
|
};
|
|
6077
6090
|
static fromConfig = (e) => {
|
|
6078
|
-
const t =
|
|
6091
|
+
const t = io(e.fields), i = {};
|
|
6079
6092
|
for (const [s, r] of Object.entries(e.conditions ?? {}))
|
|
6080
6093
|
i[s] = ht(t, r);
|
|
6081
6094
|
return new oe({ ...e, fields: t, conditions: i });
|
|
@@ -6086,7 +6099,7 @@ class oe extends Ue {
|
|
|
6086
6099
|
...Ue._deserializeConfig(a),
|
|
6087
6100
|
label: t,
|
|
6088
6101
|
description: i,
|
|
6089
|
-
fields:
|
|
6102
|
+
fields: ro(s),
|
|
6090
6103
|
conditions: r
|
|
6091
6104
|
};
|
|
6092
6105
|
}
|
|
@@ -6096,7 +6109,7 @@ class oe extends Ue {
|
|
|
6096
6109
|
...Ue._serializeConfig(a),
|
|
6097
6110
|
label: t,
|
|
6098
6111
|
description: i,
|
|
6099
|
-
fields:
|
|
6112
|
+
fields: co(s),
|
|
6100
6113
|
conditions: r
|
|
6101
6114
|
};
|
|
6102
6115
|
}
|
|
@@ -6227,7 +6240,7 @@ class oe extends Ue {
|
|
|
6227
6240
|
}
|
|
6228
6241
|
// Render
|
|
6229
6242
|
render() {
|
|
6230
|
-
return /* @__PURE__ */ l(
|
|
6243
|
+
return /* @__PURE__ */ l(gs, { fieldSection: this });
|
|
6231
6244
|
}
|
|
6232
6245
|
}
|
|
6233
6246
|
const ge = Ye({}), te = (n, e, t) => u(
|
|
@@ -6240,7 +6253,7 @@ const ge = Ye({}), te = (n, e, t) => u(
|
|
|
6240
6253
|
t(n, d);
|
|
6241
6254
|
},
|
|
6242
6255
|
[n, e, t]
|
|
6243
|
-
),
|
|
6256
|
+
), bs = w, we = bs(function(n) {
|
|
6244
6257
|
const { ref: e, children: t, ...i } = n, s = u(
|
|
6245
6258
|
(r) => typeof t == "function" ? /* @__PURE__ */ o(X, { children: [
|
|
6246
6259
|
t(r),
|
|
@@ -6252,7 +6265,7 @@ const ge = Ye({}), te = (n, e, t) => u(
|
|
|
6252
6265
|
[t]
|
|
6253
6266
|
);
|
|
6254
6267
|
return /* @__PURE__ */ l(g.SelectItem, { ref: e, ...i, children: s });
|
|
6255
|
-
}),
|
|
6268
|
+
}), Cs = bs(function(n) {
|
|
6256
6269
|
const { ref: e, children: t, ...i } = n, s = u(
|
|
6257
6270
|
(r) => typeof t == "function" ? /* @__PURE__ */ o(X, { children: [
|
|
6258
6271
|
t(r),
|
|
@@ -6286,7 +6299,7 @@ const Jt = w((n) => {
|
|
|
6286
6299
|
] });
|
|
6287
6300
|
});
|
|
6288
6301
|
Jt.displayName = "DayPickerPopover";
|
|
6289
|
-
const
|
|
6302
|
+
const ys = w((n) => {
|
|
6290
6303
|
const {
|
|
6291
6304
|
children: e,
|
|
6292
6305
|
open: t,
|
|
@@ -6319,8 +6332,8 @@ const Vs = w((n) => {
|
|
|
6319
6332
|
/* @__PURE__ */ l(P.Trigger, { asChild: !0, children: e }),
|
|
6320
6333
|
/* @__PURE__ */ l(P.Content, { size: a, onClick: Ve, accentColor: h, ...b, children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: [
|
|
6321
6334
|
/* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
6322
|
-
/* @__PURE__ */ l(
|
|
6323
|
-
|
|
6335
|
+
/* @__PURE__ */ l(B.Root, { className: "grow", accentColor: "base", variant: "outline", size: "sm", children: /* @__PURE__ */ l(
|
|
6336
|
+
B.Field,
|
|
6324
6337
|
{
|
|
6325
6338
|
value: C,
|
|
6326
6339
|
onChange: y,
|
|
@@ -6370,8 +6383,8 @@ const Vs = w((n) => {
|
|
|
6370
6383
|
] }) })
|
|
6371
6384
|
] });
|
|
6372
6385
|
});
|
|
6373
|
-
|
|
6374
|
-
const
|
|
6386
|
+
ys.displayName = "NumberInputPopover";
|
|
6387
|
+
const Be = w((n) => {
|
|
6375
6388
|
const {
|
|
6376
6389
|
children: e,
|
|
6377
6390
|
open: t,
|
|
@@ -6400,8 +6413,8 @@ const je = w((n) => {
|
|
|
6400
6413
|
);
|
|
6401
6414
|
return /* @__PURE__ */ o(P.Root, { open: t, onOpenChange: i, defaultOpen: s, modal: r, children: [
|
|
6402
6415
|
/* @__PURE__ */ l(P.Trigger, { asChild: !0, children: e }),
|
|
6403
|
-
/* @__PURE__ */ l(P.Content, { size: a, onClick: Ve, ...b, children: /* @__PURE__ */ l(
|
|
6404
|
-
|
|
6416
|
+
/* @__PURE__ */ l(P.Content, { size: a, onClick: Ve, ...b, children: /* @__PURE__ */ l(B.Root, { size: a, accentColor: h, children: /* @__PURE__ */ l(
|
|
6417
|
+
B.Field,
|
|
6405
6418
|
{
|
|
6406
6419
|
placeholder: f,
|
|
6407
6420
|
type: "number",
|
|
@@ -6412,7 +6425,7 @@ const je = w((n) => {
|
|
|
6412
6425
|
) }) })
|
|
6413
6426
|
] });
|
|
6414
6427
|
});
|
|
6415
|
-
|
|
6428
|
+
Be.displayName = "NumberInputPopover";
|
|
6416
6429
|
const Q = (n) => {
|
|
6417
6430
|
const { condition: e, onClick: t, ...i } = n, s = u(() => {
|
|
6418
6431
|
t(e);
|
|
@@ -6424,7 +6437,7 @@ const st = w((n) => {
|
|
|
6424
6437
|
const { ref: e, selectFieldOptions: t, ...i } = n, s = $(() => Oe(t), [t]);
|
|
6425
6438
|
return /* @__PURE__ */ o(g.MultiSelectGroup, { ref: e, ...i, children: [
|
|
6426
6439
|
/* @__PURE__ */ l(Dn, { children: "Select all" }),
|
|
6427
|
-
s.map((r) => /* @__PURE__ */ l(
|
|
6440
|
+
s.map((r) => /* @__PURE__ */ l(Cs, { value: r.value, children: /* @__PURE__ */ l("span", { className: "truncate", children: r.label }) }, r.value))
|
|
6428
6441
|
] });
|
|
6429
6442
|
});
|
|
6430
6443
|
st.displayName = "SelectFieldOptionMultiSelectGroup";
|
|
@@ -6459,8 +6472,8 @@ const et = w((n) => {
|
|
|
6459
6472
|
d && p(d);
|
|
6460
6473
|
}, [d]), /* @__PURE__ */ o(P.Root, { open: t, onOpenChange: i, defaultOpen: s, modal: r, children: [
|
|
6461
6474
|
/* @__PURE__ */ l(P.Trigger, { asChild: !0, children: e }),
|
|
6462
|
-
/* @__PURE__ */ l(P.Content, { size: a, onClick: Ve, ...b, children: /* @__PURE__ */ l(
|
|
6463
|
-
|
|
6475
|
+
/* @__PURE__ */ l(P.Content, { size: a, onClick: Ve, ...b, children: /* @__PURE__ */ l(B.Root, { size: a, accentColor: h, children: /* @__PURE__ */ l(
|
|
6476
|
+
B.Field,
|
|
6464
6477
|
{
|
|
6465
6478
|
placeholder: f,
|
|
6466
6479
|
type: "text",
|
|
@@ -6520,7 +6533,7 @@ const ne = (n) => {
|
|
|
6520
6533
|
}
|
|
6521
6534
|
) })
|
|
6522
6535
|
] });
|
|
6523
|
-
},
|
|
6536
|
+
}, Fo = (n) => {
|
|
6524
6537
|
const { condition: e, onReplace: t, onRemove: i } = n, s = e.getValue(), r = e.modifier, a = () => {
|
|
6525
6538
|
switch (s) {
|
|
6526
6539
|
case !0:
|
|
@@ -6553,7 +6566,7 @@ const ne = (n) => {
|
|
|
6553
6566
|
] }),
|
|
6554
6567
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
6555
6568
|
] });
|
|
6556
|
-
},
|
|
6569
|
+
}, No = (n) => {
|
|
6557
6570
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(
|
|
6558
6571
|
e,
|
|
6559
6572
|
kt,
|
|
@@ -6601,7 +6614,7 @@ const ne = (n) => {
|
|
|
6601
6614
|
[R.Text]: [],
|
|
6602
6615
|
[R.Verification]: []
|
|
6603
6616
|
};
|
|
6604
|
-
for (const c of
|
|
6617
|
+
for (const c of Za) {
|
|
6605
6618
|
const { group: f } = H[c];
|
|
6606
6619
|
d[f].push(c);
|
|
6607
6620
|
}
|
|
@@ -6610,11 +6623,11 @@ const ne = (n) => {
|
|
|
6610
6623
|
return /* @__PURE__ */ o(g.Root, { ...a, children: [
|
|
6611
6624
|
/* @__PURE__ */ l(g.ClickTrigger, { children: e }),
|
|
6612
6625
|
/* @__PURE__ */ l(g.Content, { variant: t, size: i, accentColor: s, children: /* @__PURE__ */ l(g.Scroll, { children: Object.entries(h).map(([d, c]) => {
|
|
6613
|
-
const { name: f } =
|
|
6626
|
+
const { name: f } = Ya[d];
|
|
6614
6627
|
return c.length === 0 ? null : /* @__PURE__ */ o(g.Group, { children: [
|
|
6615
6628
|
/* @__PURE__ */ l(g.Label, { children: f }),
|
|
6616
6629
|
c.map((b) => /* @__PURE__ */ l(
|
|
6617
|
-
|
|
6630
|
+
vs,
|
|
6618
6631
|
{
|
|
6619
6632
|
fieldType: b,
|
|
6620
6633
|
onSelectFieldType: r
|
|
@@ -6626,7 +6639,7 @@ const ne = (n) => {
|
|
|
6626
6639
|
] });
|
|
6627
6640
|
});
|
|
6628
6641
|
vt.displayName = "CreateFieldDropdownMenu";
|
|
6629
|
-
const
|
|
6642
|
+
const vs = w((n) => {
|
|
6630
6643
|
const { fieldType: e, onSelectFieldType: t } = n, i = u(() => {
|
|
6631
6644
|
t(e);
|
|
6632
6645
|
}, [e, t]), { icon: s, name: r } = H[e];
|
|
@@ -6635,7 +6648,7 @@ const xs = w((n) => {
|
|
|
6635
6648
|
/* @__PURE__ */ l(_, { className: "truncate", children: r })
|
|
6636
6649
|
] });
|
|
6637
6650
|
});
|
|
6638
|
-
|
|
6651
|
+
vs.displayName = "CreateFieldDropdownMenuItem";
|
|
6639
6652
|
const _n = (n) => {
|
|
6640
6653
|
switch (n) {
|
|
6641
6654
|
case "text":
|
|
@@ -6850,7 +6863,7 @@ const _n = (n) => {
|
|
|
6850
6863
|
field: n
|
|
6851
6864
|
});
|
|
6852
6865
|
}
|
|
6853
|
-
},
|
|
6866
|
+
}, Vs = (n, e) => {
|
|
6854
6867
|
switch (n) {
|
|
6855
6868
|
case "checkbox-list":
|
|
6856
6869
|
return Ce.getFieldCreationSchema(e);
|
|
@@ -6877,18 +6890,18 @@ const _n = (n) => {
|
|
|
6877
6890
|
default:
|
|
6878
6891
|
return;
|
|
6879
6892
|
}
|
|
6880
|
-
},
|
|
6893
|
+
}, xs = w((n) => {
|
|
6881
6894
|
const { popoverInputs: e, ...t } = n;
|
|
6882
6895
|
return /* @__PURE__ */ o(P.Root, { children: [
|
|
6883
6896
|
/* @__PURE__ */ l(P.Trigger, { asChild: !0, children: /* @__PURE__ */ o(x, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
|
|
6884
|
-
/* @__PURE__ */ l(m, { icon:
|
|
6897
|
+
/* @__PURE__ */ l(m, { icon: ba }),
|
|
6885
6898
|
"Settings"
|
|
6886
6899
|
] }) }),
|
|
6887
6900
|
/* @__PURE__ */ l(P.Content, { size: "sm", ...t, children: /* @__PURE__ */ l("div", { className: ze("flex w-full max-w-[350px] flex-col", Mn({ size: "sm" })), children: e }) })
|
|
6888
6901
|
] });
|
|
6889
6902
|
});
|
|
6890
|
-
|
|
6891
|
-
const
|
|
6903
|
+
xs.displayName = "FieldSettingsPopover";
|
|
6904
|
+
const ws = w((n) => {
|
|
6892
6905
|
const { parentPath: e, fieldIndex: t, field: i } = n, s = ln(), { disableRequiredFields: r } = L(ge), [a, h] = U(void 0);
|
|
6893
6906
|
ni(
|
|
6894
6907
|
(F) => {
|
|
@@ -6909,7 +6922,7 @@ const Ss = w((n) => {
|
|
|
6909
6922
|
const d = u(() => {
|
|
6910
6923
|
i.setOptions({ image: void 0 });
|
|
6911
6924
|
}, [i]), [c, f] = $(() => {
|
|
6912
|
-
const F = [], T = [], O =
|
|
6925
|
+
const F = [], T = [], O = Vs(i.type, `${e}.${t}`) ?? [];
|
|
6913
6926
|
for (const M of O)
|
|
6914
6927
|
M.showDirectly ? F.push(M.field) : T.push(M.field);
|
|
6915
6928
|
return [F, T];
|
|
@@ -6953,7 +6966,7 @@ const Ss = w((n) => {
|
|
|
6953
6966
|
/* @__PURE__ */ l(_, { size: "sm", accentColor: "base", children: "Required" })
|
|
6954
6967
|
] })
|
|
6955
6968
|
] }),
|
|
6956
|
-
p && /* @__PURE__ */ l(
|
|
6969
|
+
p && /* @__PURE__ */ l(xs, { popoverInputs: C, align: "end" })
|
|
6957
6970
|
] }),
|
|
6958
6971
|
a && /* @__PURE__ */ o("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
|
|
6959
6972
|
/* @__PURE__ */ l(
|
|
@@ -6979,8 +6992,8 @@ const Ss = w((n) => {
|
|
|
6979
6992
|
)
|
|
6980
6993
|
] }),
|
|
6981
6994
|
/* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
6982
|
-
/* @__PURE__ */ l(
|
|
6983
|
-
|
|
6995
|
+
/* @__PURE__ */ l(B.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ l(
|
|
6996
|
+
B.Field,
|
|
6984
6997
|
{
|
|
6985
6998
|
placeholder: "Enter your question",
|
|
6986
6999
|
value: i.label ?? "",
|
|
@@ -7004,7 +7017,7 @@ const Ss = w((n) => {
|
|
|
7004
7017
|
c.length > 0 && /* @__PURE__ */ l("div", { className: ze("w-full", Mn({ size: "sm" })), children: b })
|
|
7005
7018
|
] });
|
|
7006
7019
|
});
|
|
7007
|
-
|
|
7020
|
+
ws.displayName = "FieldBuilder";
|
|
7008
7021
|
const $n = w((n) => {
|
|
7009
7022
|
const { field: e, fieldSection: t, fieldIndex: i, sectionIndex: s } = n, r = ke(null), a = `fields.${s}.fields`, h = u(
|
|
7010
7023
|
(V) => {
|
|
@@ -7039,7 +7052,7 @@ const $n = w((n) => {
|
|
|
7039
7052
|
t.removeField(e);
|
|
7040
7053
|
}, [e, t]);
|
|
7041
7054
|
return /* @__PURE__ */ o(fe, { className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
7042
|
-
/* @__PURE__ */ l(
|
|
7055
|
+
/* @__PURE__ */ l(ws, { fieldIndex: i, field: e, parentPath: a }),
|
|
7043
7056
|
/* @__PURE__ */ o(D, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
7044
7057
|
/* @__PURE__ */ l(vt, { onSelectFieldType: h, size: "sm", children: /* @__PURE__ */ l(A, { type: "button", children: /* @__PURE__ */ l(m, { icon: ce }) }) }),
|
|
7045
7058
|
/* @__PURE__ */ l(A, { type: "button", onClick: b, disabled: i === 0, "aria-label": "Move field up", children: /* @__PURE__ */ l(m, { icon: dt }) }),
|
|
@@ -7061,7 +7074,7 @@ const $n = w((n) => {
|
|
|
7061
7074
|
] });
|
|
7062
7075
|
});
|
|
7063
7076
|
$n.displayName = "FieldBuilderWithActions";
|
|
7064
|
-
const
|
|
7077
|
+
const Bn = w((n) => {
|
|
7065
7078
|
const { children: e, variant: t, size: i, accentColor: s, fields: r, onSelectField: a, onSelectAllFields: h, ...d } = n, c = u(() => {
|
|
7066
7079
|
h?.(r);
|
|
7067
7080
|
}, [h, r]);
|
|
@@ -7069,12 +7082,12 @@ const jn = w((n) => {
|
|
|
7069
7082
|
/* @__PURE__ */ l(g.ClickTrigger, { children: e }),
|
|
7070
7083
|
/* @__PURE__ */ l(g.Content, { variant: t, size: i, accentColor: s, children: /* @__PURE__ */ o(g.Scroll, { children: [
|
|
7071
7084
|
h ? /* @__PURE__ */ l(g.Item, { onSelect: c, children: "Select all" }) : null,
|
|
7072
|
-
r.map((f) => /* @__PURE__ */ l(
|
|
7085
|
+
r.map((f) => /* @__PURE__ */ l(zs, { field: f, onSelectField: a }, f.id))
|
|
7073
7086
|
] }) })
|
|
7074
7087
|
] });
|
|
7075
7088
|
});
|
|
7076
|
-
|
|
7077
|
-
const
|
|
7089
|
+
Bn.displayName = "FieldDropdownMenu";
|
|
7090
|
+
const zs = w((n) => {
|
|
7078
7091
|
const { field: e, onSelectField: t } = n, i = u(() => {
|
|
7079
7092
|
t(e);
|
|
7080
7093
|
}, [e, t]);
|
|
@@ -7083,13 +7096,13 @@ const Fs = w((n) => {
|
|
|
7083
7096
|
e.label || Y
|
|
7084
7097
|
] });
|
|
7085
7098
|
});
|
|
7086
|
-
|
|
7087
|
-
const
|
|
7099
|
+
zs.displayName = "FieldDropdownMenuItem";
|
|
7100
|
+
const Ss = w((n) => {
|
|
7088
7101
|
const { children: e, variant: t, size: i, accentColor: s, fieldSections: r, onSelectFieldSection: a, ...h } = n;
|
|
7089
7102
|
return /* @__PURE__ */ o(g.Root, { ...h, children: [
|
|
7090
7103
|
/* @__PURE__ */ l(g.ClickTrigger, { children: e }),
|
|
7091
7104
|
/* @__PURE__ */ l(g.Content, { variant: t, size: i, accentColor: s, children: r.map((d) => /* @__PURE__ */ l(
|
|
7092
|
-
|
|
7105
|
+
Fs,
|
|
7093
7106
|
{
|
|
7094
7107
|
fieldSection: d,
|
|
7095
7108
|
onSelectFieldSection: a
|
|
@@ -7098,8 +7111,8 @@ const Ns = w((n) => {
|
|
|
7098
7111
|
)) })
|
|
7099
7112
|
] });
|
|
7100
7113
|
});
|
|
7101
|
-
|
|
7102
|
-
const
|
|
7114
|
+
Ss.displayName = "FieldSectionDropdownMenu";
|
|
7115
|
+
const Fs = w((n) => {
|
|
7103
7116
|
const { fieldSection: e, onSelectFieldSection: t } = n, i = u(() => {
|
|
7104
7117
|
t(e);
|
|
7105
7118
|
}, [e, t]);
|
|
@@ -7108,8 +7121,8 @@ const ks = w((n) => {
|
|
|
7108
7121
|
e.label || un
|
|
7109
7122
|
] });
|
|
7110
7123
|
});
|
|
7111
|
-
|
|
7112
|
-
const
|
|
7124
|
+
Fs.displayName = "FieldSectionDropdownMenuItem";
|
|
7125
|
+
const ko = (n) => {
|
|
7113
7126
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, qt, t), r = () => {
|
|
7114
7127
|
switch (e.modifier) {
|
|
7115
7128
|
case "in":
|
|
@@ -7153,7 +7166,7 @@ const Fo = (n) => {
|
|
|
7153
7166
|
r(),
|
|
7154
7167
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7155
7168
|
] });
|
|
7156
|
-
},
|
|
7169
|
+
}, qo = (n) => {
|
|
7157
7170
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(
|
|
7158
7171
|
e,
|
|
7159
7172
|
Ot,
|
|
@@ -7190,14 +7203,14 @@ const Fo = (n) => {
|
|
|
7190
7203
|
r(),
|
|
7191
7204
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7192
7205
|
] });
|
|
7193
|
-
},
|
|
7206
|
+
}, Oo = (n) => {
|
|
7194
7207
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(
|
|
7195
7208
|
e,
|
|
7196
7209
|
It,
|
|
7197
7210
|
t
|
|
7198
7211
|
), r = () => {
|
|
7199
7212
|
const a = e.getValue();
|
|
7200
|
-
return /* @__PURE__ */ l(
|
|
7213
|
+
return /* @__PURE__ */ l(ys, { values: a, onValuesChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: a.length === 1 ? a[0] : `${a.length} values` }) });
|
|
7201
7214
|
};
|
|
7202
7215
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7203
7216
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7217,7 +7230,7 @@ const Fo = (n) => {
|
|
|
7217
7230
|
r(),
|
|
7218
7231
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7219
7232
|
] });
|
|
7220
|
-
},
|
|
7233
|
+
}, Io = (n) => {
|
|
7221
7234
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Tt, t), r = u(
|
|
7222
7235
|
(c) => {
|
|
7223
7236
|
c === null || e.modifier === "inRange" || e.modifier === "notInRange" || e.setValue(c);
|
|
@@ -7239,12 +7252,12 @@ const Fo = (n) => {
|
|
|
7239
7252
|
case "notInRange": {
|
|
7240
7253
|
const c = e.getValue();
|
|
7241
7254
|
return /* @__PURE__ */ o(X, { children: [
|
|
7242
|
-
/* @__PURE__ */ l(
|
|
7243
|
-
/* @__PURE__ */ l(
|
|
7255
|
+
/* @__PURE__ */ l(Be, { value: c.from, onValueChange: a, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: c.from ?? "..." }) }),
|
|
7256
|
+
/* @__PURE__ */ l(Be, { value: c.to, onValueChange: h, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: c.to ?? "..." }) })
|
|
7244
7257
|
] });
|
|
7245
7258
|
}
|
|
7246
7259
|
default:
|
|
7247
|
-
return /* @__PURE__ */ l(
|
|
7260
|
+
return /* @__PURE__ */ l(Be, { value: e.getValue(), onValueChange: r, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: e.getValue() }) });
|
|
7248
7261
|
}
|
|
7249
7262
|
};
|
|
7250
7263
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7265,7 +7278,7 @@ const Fo = (n) => {
|
|
|
7265
7278
|
d(),
|
|
7266
7279
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7267
7280
|
] });
|
|
7268
|
-
},
|
|
7281
|
+
}, To = (n) => {
|
|
7269
7282
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Et, t), r = () => /* @__PURE__ */ l(et, { value: e.getValue(), onValueChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ l("span", { className: "truncate", children: e.getValue() || "..." }) }) });
|
|
7270
7283
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7271
7284
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7285,7 +7298,7 @@ const Fo = (n) => {
|
|
|
7285
7298
|
r(),
|
|
7286
7299
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7287
7300
|
] });
|
|
7288
|
-
},
|
|
7301
|
+
}, Eo = (n) => {
|
|
7289
7302
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, At, t), r = () => {
|
|
7290
7303
|
switch (e.modifier) {
|
|
7291
7304
|
case "equals":
|
|
@@ -7316,7 +7329,7 @@ const Fo = (n) => {
|
|
|
7316
7329
|
onValuesChange: e.setValue,
|
|
7317
7330
|
children: [
|
|
7318
7331
|
/* @__PURE__ */ l(Dn, { children: "Select all" }),
|
|
7319
|
-
nt.map((a) => /* @__PURE__ */ o(
|
|
7332
|
+
nt.map((a) => /* @__PURE__ */ o(Cs, { value: a, children: [
|
|
7320
7333
|
/* @__PURE__ */ l(m, { icon: Fe[a].icon }),
|
|
7321
7334
|
Fe[a].label
|
|
7322
7335
|
] }, a))
|
|
@@ -7344,7 +7357,7 @@ const Fo = (n) => {
|
|
|
7344
7357
|
r(),
|
|
7345
7358
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7346
7359
|
] });
|
|
7347
|
-
},
|
|
7360
|
+
}, Ao = (n) => {
|
|
7348
7361
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Rt, t), r = () => {
|
|
7349
7362
|
switch (e.modifier) {
|
|
7350
7363
|
case "equals":
|
|
@@ -7401,7 +7414,7 @@ const Fo = (n) => {
|
|
|
7401
7414
|
r(),
|
|
7402
7415
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7403
7416
|
] });
|
|
7404
|
-
},
|
|
7417
|
+
}, Ro = (n) => {
|
|
7405
7418
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Mt, t), r = u(
|
|
7406
7419
|
(c) => {
|
|
7407
7420
|
c === null || e.modifier === "inRange" || e.modifier === "notInRange" || e.setValue(c);
|
|
@@ -7423,12 +7436,12 @@ const Fo = (n) => {
|
|
|
7423
7436
|
case "notInRange": {
|
|
7424
7437
|
const c = e.getValue();
|
|
7425
7438
|
return /* @__PURE__ */ o(X, { children: [
|
|
7426
|
-
/* @__PURE__ */ l(
|
|
7427
|
-
/* @__PURE__ */ l(
|
|
7439
|
+
/* @__PURE__ */ l(Be, { value: c.from, onValueChange: a, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: c.from ?? "..." }) }),
|
|
7440
|
+
/* @__PURE__ */ l(Be, { value: c.to, onValueChange: h, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: c.to ?? "..." }) })
|
|
7428
7441
|
] });
|
|
7429
7442
|
}
|
|
7430
7443
|
default:
|
|
7431
|
-
return /* @__PURE__ */ l(
|
|
7444
|
+
return /* @__PURE__ */ l(Be, { value: e.getValue(), onValueChange: r, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "truncate", children: e.getValue() }) });
|
|
7432
7445
|
}
|
|
7433
7446
|
};
|
|
7434
7447
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7449,7 +7462,7 @@ const Fo = (n) => {
|
|
|
7449
7462
|
d(),
|
|
7450
7463
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7451
7464
|
] });
|
|
7452
|
-
},
|
|
7465
|
+
}, Mo = (n) => {
|
|
7453
7466
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Dt, t), r = () => /* @__PURE__ */ l(et, { value: e.getValue(), onValueChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ l("span", { className: "truncate", children: e.getValue() || "..." }) }) });
|
|
7454
7467
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7455
7468
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7469,7 +7482,7 @@ const Fo = (n) => {
|
|
|
7469
7482
|
r(),
|
|
7470
7483
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7471
7484
|
] });
|
|
7472
|
-
},
|
|
7485
|
+
}, Do = (n) => {
|
|
7473
7486
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Lt, t), r = () => {
|
|
7474
7487
|
switch (e.modifier) {
|
|
7475
7488
|
case "equals":
|
|
@@ -7526,7 +7539,7 @@ const Fo = (n) => {
|
|
|
7526
7539
|
r(),
|
|
7527
7540
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7528
7541
|
] });
|
|
7529
|
-
},
|
|
7542
|
+
}, Lo = (n) => {
|
|
7530
7543
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, _t, t), r = () => /* @__PURE__ */ l(et, { value: e.getValue(), onValueChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ l("span", { className: "truncate", children: e.getValue() || "..." }) }) });
|
|
7531
7544
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7532
7545
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7546,7 +7559,7 @@ const Fo = (n) => {
|
|
|
7546
7559
|
r(),
|
|
7547
7560
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7548
7561
|
] });
|
|
7549
|
-
},
|
|
7562
|
+
}, _o = (n) => {
|
|
7550
7563
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, $t, t), r = () => /* @__PURE__ */ l(et, { value: e.getValue(), onValueChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ l("span", { className: "truncate", children: e.getValue() || "..." }) }) });
|
|
7551
7564
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7552
7565
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7566,8 +7579,8 @@ const Fo = (n) => {
|
|
|
7566
7579
|
r(),
|
|
7567
7580
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7568
7581
|
] });
|
|
7569
|
-
},
|
|
7570
|
-
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e,
|
|
7582
|
+
}, $o = (n) => {
|
|
7583
|
+
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Bt, t), r = u(
|
|
7571
7584
|
(c) => {
|
|
7572
7585
|
c === null || e.modifier === "in" || e.modifier === "notIn" || e.setValue(c);
|
|
7573
7586
|
},
|
|
@@ -7607,15 +7620,15 @@ const Fo = (n) => {
|
|
|
7607
7620
|
required: !0,
|
|
7608
7621
|
value: e.modifier,
|
|
7609
7622
|
onValueChange: s,
|
|
7610
|
-
modifierConfig:
|
|
7611
|
-
children: /* @__PURE__ */ l(x, { type: "button", children:
|
|
7623
|
+
modifierConfig: Bt,
|
|
7624
|
+
children: /* @__PURE__ */ l(x, { type: "button", children: Bt[e.modifier].label })
|
|
7612
7625
|
}
|
|
7613
7626
|
),
|
|
7614
7627
|
d(),
|
|
7615
7628
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7616
7629
|
] });
|
|
7617
|
-
},
|
|
7618
|
-
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e,
|
|
7630
|
+
}, Bo = (n) => {
|
|
7631
|
+
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, jt, t), r = () => /* @__PURE__ */ o(g.Root, { children: [
|
|
7619
7632
|
/* @__PURE__ */ l(g.ClickTrigger, { children: /* @__PURE__ */ l(x, { type: "button", children: e.getValue() ? "empty" : "not empty" }) }),
|
|
7620
7633
|
/* @__PURE__ */ l(g.Content, { size: "sm", children: /* @__PURE__ */ o(g.SelectGroup, { required: !0, value: e.getValue(), onValueChange: e.setValue, children: [
|
|
7621
7634
|
/* @__PURE__ */ l(we, { value: !0, children: "empty" }),
|
|
@@ -7633,14 +7646,14 @@ const Fo = (n) => {
|
|
|
7633
7646
|
required: !0,
|
|
7634
7647
|
value: e.modifier,
|
|
7635
7648
|
onValueChange: s,
|
|
7636
|
-
modifierConfig:
|
|
7637
|
-
children: /* @__PURE__ */ l(x, { type: "button", children:
|
|
7649
|
+
modifierConfig: jt,
|
|
7650
|
+
children: /* @__PURE__ */ l(x, { type: "button", children: jt[e.modifier].label })
|
|
7638
7651
|
}
|
|
7639
7652
|
),
|
|
7640
7653
|
r(),
|
|
7641
7654
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7642
7655
|
] });
|
|
7643
|
-
},
|
|
7656
|
+
}, jo = (n) => {
|
|
7644
7657
|
const { condition: e, onReplace: t, onRemove: i } = n, s = te(e, Pt, t), r = () => /* @__PURE__ */ l(et, { value: e.getValue(), onValueChange: e.setValue, size: "sm", children: /* @__PURE__ */ l(x, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ l("span", { className: "truncate", children: e.getValue() || "..." }) }) });
|
|
7645
7658
|
return /* @__PURE__ */ o(D, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
7646
7659
|
/* @__PURE__ */ o(G, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
@@ -7660,55 +7673,55 @@ const Fo = (n) => {
|
|
|
7660
7673
|
r(),
|
|
7661
7674
|
/* @__PURE__ */ l(Q, { condition: e, onClick: i })
|
|
7662
7675
|
] });
|
|
7663
|
-
},
|
|
7676
|
+
}, Ns = (n) => {
|
|
7664
7677
|
const { condition: e, ...t } = n;
|
|
7665
7678
|
switch (e.type) {
|
|
7666
7679
|
case "string":
|
|
7667
|
-
return /* @__PURE__ */ l(
|
|
7680
|
+
return /* @__PURE__ */ l(Lo, { condition: e, ...t });
|
|
7668
7681
|
case "text":
|
|
7669
|
-
return /* @__PURE__ */ l(
|
|
7682
|
+
return /* @__PURE__ */ l(_o, { condition: e, ...t });
|
|
7670
7683
|
case "otp":
|
|
7671
|
-
return /* @__PURE__ */ l(
|
|
7684
|
+
return /* @__PURE__ */ l(To, { condition: e, ...t });
|
|
7672
7685
|
case "qr":
|
|
7673
|
-
return /* @__PURE__ */ l(
|
|
7686
|
+
return /* @__PURE__ */ l(Mo, { condition: e, ...t });
|
|
7674
7687
|
case "url":
|
|
7675
|
-
return /* @__PURE__ */ l(
|
|
7688
|
+
return /* @__PURE__ */ l(jo, { condition: e, ...t });
|
|
7676
7689
|
case "select":
|
|
7677
|
-
return /* @__PURE__ */ l(
|
|
7690
|
+
return /* @__PURE__ */ l(Do, { condition: e, ...t });
|
|
7678
7691
|
case "radio":
|
|
7679
|
-
return /* @__PURE__ */ l(
|
|
7692
|
+
return /* @__PURE__ */ l(Ao, { condition: e, ...t });
|
|
7680
7693
|
case "checkbox-list":
|
|
7681
|
-
return /* @__PURE__ */ l(So, { condition: e, ...t });
|
|
7682
|
-
case "multi-select":
|
|
7683
7694
|
return /* @__PURE__ */ l(No, { condition: e, ...t });
|
|
7695
|
+
case "multi-select":
|
|
7696
|
+
return /* @__PURE__ */ l(qo, { condition: e, ...t });
|
|
7684
7697
|
case "multi-string":
|
|
7685
|
-
return /* @__PURE__ */ l(
|
|
7698
|
+
return /* @__PURE__ */ l(Oo, { condition: e, ...t });
|
|
7686
7699
|
case "number":
|
|
7687
|
-
return /* @__PURE__ */ l(
|
|
7700
|
+
return /* @__PURE__ */ l(Io, { condition: e, ...t });
|
|
7688
7701
|
case "rating":
|
|
7689
|
-
return /* @__PURE__ */ l(
|
|
7702
|
+
return /* @__PURE__ */ l(Ro, { condition: e, ...t });
|
|
7690
7703
|
case "date":
|
|
7691
|
-
return /* @__PURE__ */ l(
|
|
7704
|
+
return /* @__PURE__ */ l(ko, { condition: e, ...t });
|
|
7692
7705
|
case "time":
|
|
7693
|
-
return /* @__PURE__ */ l(
|
|
7706
|
+
return /* @__PURE__ */ l($o, { condition: e, ...t });
|
|
7694
7707
|
case "pass-fail":
|
|
7695
|
-
return /* @__PURE__ */ l(
|
|
7708
|
+
return /* @__PURE__ */ l(Eo, { condition: e, ...t });
|
|
7696
7709
|
case "upload":
|
|
7697
|
-
return /* @__PURE__ */ l(
|
|
7710
|
+
return /* @__PURE__ */ l(Bo, { condition: e, ...t });
|
|
7698
7711
|
case "boolean":
|
|
7699
|
-
return /* @__PURE__ */ l(
|
|
7712
|
+
return /* @__PURE__ */ l(Fo, { condition: e, ...t });
|
|
7700
7713
|
case "compound":
|
|
7701
|
-
return /* @__PURE__ */ l(
|
|
7714
|
+
return /* @__PURE__ */ l(Uo, { condition: e, ...t });
|
|
7702
7715
|
}
|
|
7703
|
-
},
|
|
7704
|
-
const n = Zt(
|
|
7716
|
+
}, ks = Ye(null), Po = () => {
|
|
7717
|
+
const n = Zt(ks);
|
|
7705
7718
|
if (!n) throw new Error("useFieldConditionBuilderContext requires a FieldConditionBuilder");
|
|
7706
7719
|
return n;
|
|
7707
|
-
},
|
|
7720
|
+
}, qs = (n) => {
|
|
7708
7721
|
const { fields: e, conditions: t, onAdd: i, onReplace: s, onRemove: r } = n, a = $(() => ({ fields: e }), [e]), h = u((f) => i([ft(f)]), [i]), d = u((f) => i(f.map(ft)), [i]), c = u(() => i([new yt({ id: N(), conditions: [] })]), [i]);
|
|
7709
|
-
return /* @__PURE__ */ l(
|
|
7722
|
+
return /* @__PURE__ */ l(ks.Provider, { value: a, children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-4", children: [
|
|
7710
7723
|
t.map((f) => /* @__PURE__ */ l(
|
|
7711
|
-
|
|
7724
|
+
Ns,
|
|
7712
7725
|
{
|
|
7713
7726
|
condition: f,
|
|
7714
7727
|
onReplace: s,
|
|
@@ -7718,7 +7731,7 @@ const Fo = (n) => {
|
|
|
7718
7731
|
)),
|
|
7719
7732
|
/* @__PURE__ */ o("div", { className: "flex gap-2", children: [
|
|
7720
7733
|
/* @__PURE__ */ l(
|
|
7721
|
-
|
|
7734
|
+
Bn,
|
|
7722
7735
|
{
|
|
7723
7736
|
fields: e,
|
|
7724
7737
|
onSelectField: h,
|
|
@@ -7737,8 +7750,8 @@ const Fo = (n) => {
|
|
|
7737
7750
|
] })
|
|
7738
7751
|
] })
|
|
7739
7752
|
] }) });
|
|
7740
|
-
},
|
|
7741
|
-
const { condition: e, onReplace: t, onRemove: i } = n, s = e.conditions, { fields: r } =
|
|
7753
|
+
}, Uo = (n) => {
|
|
7754
|
+
const { condition: e, onReplace: t, onRemove: i } = n, s = e.conditions, { fields: r } = Po(), a = u(
|
|
7742
7755
|
(p) => {
|
|
7743
7756
|
const { klass: y } = rt[p], V = new y({
|
|
7744
7757
|
id: e.id,
|
|
@@ -7804,7 +7817,7 @@ const Fo = (n) => {
|
|
|
7804
7817
|
] }),
|
|
7805
7818
|
/* @__PURE__ */ l(ye, { size: "full" }),
|
|
7806
7819
|
s.length > 0 ? /* @__PURE__ */ l("div", { className: "flex shrink grow flex-col gap-4 p-4", children: s.map((p) => /* @__PURE__ */ l(
|
|
7807
|
-
|
|
7820
|
+
Ns,
|
|
7808
7821
|
{
|
|
7809
7822
|
condition: p,
|
|
7810
7823
|
onRemove: C,
|
|
@@ -7814,7 +7827,7 @@ const Fo = (n) => {
|
|
|
7814
7827
|
)) }) : null,
|
|
7815
7828
|
/* @__PURE__ */ o("div", { className: "h-max shrink-0 grow-0 rounded-b-[inherit] px-4 py-2", children: [
|
|
7816
7829
|
/* @__PURE__ */ l(
|
|
7817
|
-
|
|
7830
|
+
Bn,
|
|
7818
7831
|
{
|
|
7819
7832
|
fields: r,
|
|
7820
7833
|
onSelectField: c,
|
|
@@ -7833,7 +7846,7 @@ const Fo = (n) => {
|
|
|
7833
7846
|
] })
|
|
7834
7847
|
] })
|
|
7835
7848
|
] });
|
|
7836
|
-
},
|
|
7849
|
+
}, Os = w((n) => {
|
|
7837
7850
|
const { id: e, sourceX: t, sourceY: i, targetX: s, targetY: r, style: a, markerEnd: h, data: d } = n, { targetSection: c, sourceSection: f, layoutDirection: b } = d, C = f.getConditions(c.id), p = u(
|
|
7838
7851
|
(F, T) => {
|
|
7839
7852
|
f.replaceCondition(c.id, F, T);
|
|
@@ -7851,7 +7864,7 @@ const Fo = (n) => {
|
|
|
7851
7864
|
[f, c.id]
|
|
7852
7865
|
), z = u(() => {
|
|
7853
7866
|
f.removeConditional(c.id);
|
|
7854
|
-
}, [f, c.id]), [S, I, k] =
|
|
7867
|
+
}, [f, c.id]), [S, I, k] = Us({
|
|
7855
7868
|
sourceX: t,
|
|
7856
7869
|
sourceY: i,
|
|
7857
7870
|
sourcePosition: b === "LR" ? be.Right : be.Bottom,
|
|
@@ -7860,8 +7873,8 @@ const Fo = (n) => {
|
|
|
7860
7873
|
targetPosition: b === "LR" ? be.Left : be.Top
|
|
7861
7874
|
});
|
|
7862
7875
|
return /* @__PURE__ */ o(X, { children: [
|
|
7863
|
-
/* @__PURE__ */ l(
|
|
7864
|
-
/* @__PURE__ */ l(
|
|
7876
|
+
/* @__PURE__ */ l(Gs, { id: e, path: S, style: a, markerEnd: h, labelX: I, labelY: k }),
|
|
7877
|
+
/* @__PURE__ */ l(Hs, { children: /* @__PURE__ */ o(
|
|
7865
7878
|
fe,
|
|
7866
7879
|
{
|
|
7867
7880
|
size: "xs",
|
|
@@ -7888,7 +7901,7 @@ const Fo = (n) => {
|
|
|
7888
7901
|
)
|
|
7889
7902
|
] }),
|
|
7890
7903
|
/* @__PURE__ */ l(
|
|
7891
|
-
|
|
7904
|
+
qs,
|
|
7892
7905
|
{
|
|
7893
7906
|
fields: f.fields,
|
|
7894
7907
|
conditions: C,
|
|
@@ -7902,8 +7915,8 @@ const Fo = (n) => {
|
|
|
7902
7915
|
) })
|
|
7903
7916
|
] });
|
|
7904
7917
|
});
|
|
7905
|
-
|
|
7906
|
-
const
|
|
7918
|
+
Os.displayName = "FieldSectionConditionEdgeComponent";
|
|
7919
|
+
const Is = w((n) => {
|
|
7907
7920
|
const { data: e, selected: t } = n, { fieldSection: i, index: s, layoutDirection: r } = e, { fieldSchema: a } = L(ge), h = u(() => {
|
|
7908
7921
|
a.removeFieldSection(i);
|
|
7909
7922
|
}, [a, i]), d = u(
|
|
@@ -7937,8 +7950,8 @@ const Es = w((n) => {
|
|
|
7937
7950
|
children: [
|
|
7938
7951
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-3", children: [
|
|
7939
7952
|
/* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
7940
|
-
/* @__PURE__ */ l(
|
|
7941
|
-
|
|
7953
|
+
/* @__PURE__ */ l(B.Root, { variant: "outline", size: "md", accentColor: "base", children: /* @__PURE__ */ l(
|
|
7954
|
+
B.Field,
|
|
7942
7955
|
{
|
|
7943
7956
|
placeholder: "Enter a section label (optional)",
|
|
7944
7957
|
value: i.label ?? "",
|
|
@@ -7977,7 +7990,7 @@ const Es = w((n) => {
|
|
|
7977
7990
|
p.id
|
|
7978
7991
|
)) })
|
|
7979
7992
|
] }),
|
|
7980
|
-
/* @__PURE__ */ l(
|
|
7993
|
+
/* @__PURE__ */ l(Js, { isVisible: !0, position: be.Right, align: "start", offset: 8, onMouseDown: Ve, children: /* @__PURE__ */ l(
|
|
7981
7994
|
fe,
|
|
7982
7995
|
{
|
|
7983
7996
|
variant: "surface",
|
|
@@ -7985,7 +7998,7 @@ const Es = w((n) => {
|
|
|
7985
7998
|
size: "sm",
|
|
7986
7999
|
onClick: Ve,
|
|
7987
8000
|
children: /* @__PURE__ */ o(D, { className: "flex flex-col gap-0", variant: "soft", size: "xs", accentColor: "base", children: [
|
|
7988
|
-
/* @__PURE__ */ l(A, { className: "rounded-b-none", type: "button", onClick: c, children: /* @__PURE__ */ l(m, { icon:
|
|
8001
|
+
/* @__PURE__ */ l(A, { className: "rounded-b-none", type: "button", onClick: c, children: /* @__PURE__ */ l(m, { icon: Hr }) }),
|
|
7989
8002
|
/* @__PURE__ */ l(A, { className: "rounded-none", type: "button", onClick: f, children: /* @__PURE__ */ l(m, { icon: en }) }),
|
|
7990
8003
|
/* @__PURE__ */ l(A, { className: "rounded-t-none", type: "button", onClick: h, children: /* @__PURE__ */ l(m, { icon: Se }) })
|
|
7991
8004
|
] })
|
|
@@ -8011,12 +8024,12 @@ const Es = w((n) => {
|
|
|
8011
8024
|
}
|
|
8012
8025
|
);
|
|
8013
8026
|
});
|
|
8014
|
-
|
|
8015
|
-
const
|
|
8016
|
-
fieldSection:
|
|
8017
|
-
},
|
|
8018
|
-
fieldSectionCondition:
|
|
8019
|
-
},
|
|
8027
|
+
Is.displayName = "CustomNode";
|
|
8028
|
+
const Go = {
|
|
8029
|
+
fieldSection: Is
|
|
8030
|
+
}, Ho = {
|
|
8031
|
+
fieldSectionCondition: Os
|
|
8032
|
+
}, Jo = (n, e, t) => {
|
|
8020
8033
|
const i = new Gn.graphlib.Graph().setDefaultEdgeLabel(() => ({}));
|
|
8021
8034
|
return i.setGraph({ rankdir: t, nodesep: 200, edgesep: 500, ranksep: 500 }), e.forEach(
|
|
8022
8035
|
(s) => i.setEdge(s.source, s.target, {
|
|
@@ -8038,20 +8051,20 @@ const Po = {
|
|
|
8038
8051
|
}),
|
|
8039
8052
|
e
|
|
8040
8053
|
];
|
|
8041
|
-
},
|
|
8054
|
+
}, Wo = {
|
|
8042
8055
|
hideAttribution: !0
|
|
8043
|
-
},
|
|
8056
|
+
}, Ts = w(() => {
|
|
8044
8057
|
const { errors: n } = Yn(), { handleSubmit: e } = Qn(), { onSave: t, onCancel: i } = L(ge), { fieldSchema: s } = L(ge), r = ke(null), [a, h] = U(), [d, c] = U("TB");
|
|
8045
8058
|
Kn(() => {
|
|
8046
8059
|
r.current && r.current.classList.remove("light");
|
|
8047
8060
|
}, []);
|
|
8048
8061
|
const f = $(
|
|
8049
|
-
() => s.fieldSections.map((
|
|
8050
|
-
id:
|
|
8062
|
+
() => s.fieldSections.map((j, ie) => ({
|
|
8063
|
+
id: j.id,
|
|
8051
8064
|
position: { x: 0, y: 0 },
|
|
8052
8065
|
data: {
|
|
8053
8066
|
index: ie,
|
|
8054
|
-
fieldSection:
|
|
8067
|
+
fieldSection: j,
|
|
8055
8068
|
layoutDirection: d
|
|
8056
8069
|
},
|
|
8057
8070
|
draggable: !0,
|
|
@@ -8059,13 +8072,13 @@ const Po = {
|
|
|
8059
8072
|
})),
|
|
8060
8073
|
[s.fieldSections, d]
|
|
8061
8074
|
), b = $(() => {
|
|
8062
|
-
const
|
|
8075
|
+
const j = [], ie = {};
|
|
8063
8076
|
for (const ae of s.fieldSections)
|
|
8064
8077
|
ie[ae.id] = ae;
|
|
8065
8078
|
for (const ae of s.fieldSections) {
|
|
8066
8079
|
const Vt = ae.conditions;
|
|
8067
|
-
for (const [tt,
|
|
8068
|
-
|
|
8080
|
+
for (const [tt, Bs] of Object.entries(Vt))
|
|
8081
|
+
j.push({
|
|
8069
8082
|
id: `${ae.id}-${tt}`,
|
|
8070
8083
|
source: ae.id,
|
|
8071
8084
|
target: tt,
|
|
@@ -8074,31 +8087,31 @@ const Po = {
|
|
|
8074
8087
|
sourceSection: ae,
|
|
8075
8088
|
layoutDirection: d
|
|
8076
8089
|
},
|
|
8077
|
-
animated:
|
|
8078
|
-
markerEnd:
|
|
8090
|
+
animated: Bs.length > 0,
|
|
8091
|
+
markerEnd: Ws.Arrow,
|
|
8079
8092
|
style: { strokeWidth: 2, stroke: "var(--base-a8)" },
|
|
8080
8093
|
type: "fieldSectionCondition"
|
|
8081
8094
|
});
|
|
8082
8095
|
}
|
|
8083
|
-
return
|
|
8084
|
-
}, [s.fieldSections, d]), [C, p, y] =
|
|
8096
|
+
return j;
|
|
8097
|
+
}, [s.fieldSections, d]), [C, p, y] = Ks(f), [V, z, S] = Xs(b);
|
|
8085
8098
|
pe(() => {
|
|
8086
8099
|
p(f);
|
|
8087
8100
|
}, [f, p]), pe(() => {
|
|
8088
8101
|
z(b);
|
|
8089
8102
|
}, [b, z]);
|
|
8090
|
-
const [I, k] = $(() =>
|
|
8103
|
+
const [I, k] = $(() => Jo(C, V, d), [V, d, C]), F = u(() => {
|
|
8091
8104
|
s.addFieldSection(new oe({ id: N(), fields: [] }));
|
|
8092
8105
|
}, [s]), T = u(
|
|
8093
|
-
(
|
|
8094
|
-
const { source: ie, target: ae } =
|
|
8106
|
+
(j) => {
|
|
8107
|
+
const { source: ie, target: ae } = j;
|
|
8095
8108
|
s.fieldSections.find(({ id: tt }) => tt === ie).addConditional(ae);
|
|
8096
8109
|
},
|
|
8097
8110
|
[s.fieldSections]
|
|
8098
8111
|
), O = u(
|
|
8099
|
-
(
|
|
8112
|
+
(j) => {
|
|
8100
8113
|
const ie = s.getSectionDependencyGraph();
|
|
8101
|
-
return !Xn(ie,
|
|
8114
|
+
return !Xn(ie, j.source, j.target);
|
|
8102
8115
|
},
|
|
8103
8116
|
[s]
|
|
8104
8117
|
), M = u(() => {
|
|
@@ -8111,7 +8124,7 @@ const Po = {
|
|
|
8111
8124
|
return /* @__PURE__ */ o("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
|
|
8112
8125
|
/* @__PURE__ */ o(fe, { className: "relative size-full", variant: "outline", children: [
|
|
8113
8126
|
/* @__PURE__ */ l(
|
|
8114
|
-
|
|
8127
|
+
Zs,
|
|
8115
8128
|
{
|
|
8116
8129
|
ref: r,
|
|
8117
8130
|
onInit: h,
|
|
@@ -8119,14 +8132,14 @@ const Po = {
|
|
|
8119
8132
|
onNodesChange: y,
|
|
8120
8133
|
edges: k,
|
|
8121
8134
|
onEdgesChange: S,
|
|
8122
|
-
nodeTypes:
|
|
8123
|
-
edgeTypes:
|
|
8135
|
+
nodeTypes: Go,
|
|
8136
|
+
edgeTypes: Ho,
|
|
8124
8137
|
onConnect: T,
|
|
8125
8138
|
attributionPosition: "bottom-left",
|
|
8126
8139
|
fitView: !0,
|
|
8127
8140
|
minZoom: 0,
|
|
8128
8141
|
isValidConnection: O,
|
|
8129
|
-
proOptions:
|
|
8142
|
+
proOptions: Wo
|
|
8130
8143
|
}
|
|
8131
8144
|
),
|
|
8132
8145
|
/* @__PURE__ */ l(St, { position: "top-left", children: /* @__PURE__ */ l(D, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */ o(x, { type: "button", variant: "surface", onClick: F, children: [
|
|
@@ -8144,8 +8157,8 @@ const Po = {
|
|
|
8144
8157
|
value: d,
|
|
8145
8158
|
onValueChange: c,
|
|
8146
8159
|
children: [
|
|
8147
|
-
/* @__PURE__ */ l(zt.IconItem, { className: "rounded-b-none", value: "LR", type: "button", children: /* @__PURE__ */ l(m, { icon:
|
|
8148
|
-
/* @__PURE__ */ l(zt.IconItem, { className: "rounded-t-none", value: "TB", type: "button", children: /* @__PURE__ */ l(m, { icon:
|
|
8160
|
+
/* @__PURE__ */ l(zt.IconItem, { className: "rounded-b-none", value: "LR", type: "button", children: /* @__PURE__ */ l(m, { icon: gr }) }),
|
|
8161
|
+
/* @__PURE__ */ l(zt.IconItem, { className: "rounded-t-none", value: "TB", type: "button", children: /* @__PURE__ */ l(m, { icon: pr }) })
|
|
8149
8162
|
]
|
|
8150
8163
|
}
|
|
8151
8164
|
),
|
|
@@ -8153,7 +8166,7 @@ const Po = {
|
|
|
8153
8166
|
/* @__PURE__ */ o(D, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
8154
8167
|
/* @__PURE__ */ l(A, { className: "rounded-b-none", onClick: J, type: "button", children: /* @__PURE__ */ l(m, { icon: ce }) }),
|
|
8155
8168
|
/* @__PURE__ */ l(A, { onClick: M, radius: "none", type: "button", children: /* @__PURE__ */ l(m, { icon: ct }) }),
|
|
8156
|
-
/* @__PURE__ */ l(A, { className: "rounded-t-none", onClick: de, type: "button", children: /* @__PURE__ */ l(m, { icon:
|
|
8169
|
+
/* @__PURE__ */ l(A, { className: "rounded-t-none", onClick: de, type: "button", children: /* @__PURE__ */ l(m, { icon: Va }) })
|
|
8157
8170
|
] })
|
|
8158
8171
|
] }),
|
|
8159
8172
|
/* @__PURE__ */ l(St, { position: "bottom-right", children: /* @__PURE__ */ o(D, { className: "flex items-center justify-end gap-2", size: "sm", children: [
|
|
@@ -8164,8 +8177,8 @@ const Po = {
|
|
|
8164
8177
|
!!n.fields?.message && /* @__PURE__ */ l(_, { size: "xs", accentColor: "danger", children: n.fields.message })
|
|
8165
8178
|
] });
|
|
8166
8179
|
});
|
|
8167
|
-
|
|
8168
|
-
const
|
|
8180
|
+
Ts.displayName = "FormBuilderFlowBuilder";
|
|
8181
|
+
const Ko = (n, e, t = {}) => {
|
|
8169
8182
|
const { conditions: i = !1 } = t, s = n.get(e.id);
|
|
8170
8183
|
if (!s)
|
|
8171
8184
|
throw new Error(
|
|
@@ -8202,12 +8215,12 @@ const Jo = (n, e, t = {}) => {
|
|
|
8202
8215
|
conditions: h,
|
|
8203
8216
|
fields: a
|
|
8204
8217
|
};
|
|
8205
|
-
},
|
|
8218
|
+
}, Xo = (n, e = {}) => {
|
|
8206
8219
|
const t = new Map(
|
|
8207
8220
|
n.map((i) => [i.id, N()])
|
|
8208
8221
|
);
|
|
8209
|
-
return n.map((i) =>
|
|
8210
|
-
},
|
|
8222
|
+
return n.map((i) => Ko(t, i, e));
|
|
8223
|
+
}, Es = (n, e) => {
|
|
8211
8224
|
const t = {}, i = n.filter((s) => s instanceof oe);
|
|
8212
8225
|
for (const s of n)
|
|
8213
8226
|
if (s instanceof oe) {
|
|
@@ -8223,10 +8236,10 @@ const Jo = (n, e, t = {}) => {
|
|
|
8223
8236
|
if (!(s instanceof E))
|
|
8224
8237
|
throw new Error("Invalid field type");
|
|
8225
8238
|
const r = s.id, a = s.getError(li(e, r));
|
|
8226
|
-
a &&
|
|
8239
|
+
a && sr(t, r, a);
|
|
8227
8240
|
}
|
|
8228
8241
|
return t;
|
|
8229
|
-
},
|
|
8242
|
+
}, xc = async (n) => {
|
|
8230
8243
|
const e = {};
|
|
8231
8244
|
for (const t of n) {
|
|
8232
8245
|
const { fields: i } = t;
|
|
@@ -8243,13 +8256,13 @@ const Jo = (n, e, t = {}) => {
|
|
|
8243
8256
|
}
|
|
8244
8257
|
return e;
|
|
8245
8258
|
};
|
|
8246
|
-
async function
|
|
8259
|
+
async function wc(n) {
|
|
8247
8260
|
const e = {};
|
|
8248
8261
|
for (const [t, i] of Object.entries(n))
|
|
8249
8262
|
e[t] = await Promise.all(i);
|
|
8250
8263
|
return e;
|
|
8251
8264
|
}
|
|
8252
|
-
class
|
|
8265
|
+
class je extends gt {
|
|
8253
8266
|
fieldSections;
|
|
8254
8267
|
constructor(e) {
|
|
8255
8268
|
super(), this.fieldSections = this.initFields(e);
|
|
@@ -8261,19 +8274,19 @@ class Be extends gt {
|
|
|
8261
8274
|
return this.fieldSections.map((e) => e.config());
|
|
8262
8275
|
}
|
|
8263
8276
|
static deserialize(e) {
|
|
8264
|
-
return new
|
|
8277
|
+
return new je(An(e));
|
|
8265
8278
|
}
|
|
8266
8279
|
static fromConfig(e) {
|
|
8267
|
-
return new
|
|
8280
|
+
return new je(so(e));
|
|
8268
8281
|
}
|
|
8269
8282
|
static serializeConfig(e) {
|
|
8270
|
-
return
|
|
8283
|
+
return ho(e);
|
|
8271
8284
|
}
|
|
8272
8285
|
static deserializeConfig(e) {
|
|
8273
|
-
return
|
|
8286
|
+
return oo(e);
|
|
8274
8287
|
}
|
|
8275
8288
|
static reseedFieldSections(e, t) {
|
|
8276
|
-
return
|
|
8289
|
+
return Xo(e, t);
|
|
8277
8290
|
}
|
|
8278
8291
|
// Fields
|
|
8279
8292
|
fieldObserver = () => {
|
|
@@ -8306,7 +8319,7 @@ class Be extends gt {
|
|
|
8306
8319
|
i.splice(t, 0, s), this.fieldSections = this.initFields(i), this.notify(this);
|
|
8307
8320
|
}
|
|
8308
8321
|
getSectionDependencyGraph() {
|
|
8309
|
-
const e = new
|
|
8322
|
+
const e = new ir({ type: "directed" });
|
|
8310
8323
|
for (const t of this.fieldSections)
|
|
8311
8324
|
for (const i of Object.keys(t.conditions))
|
|
8312
8325
|
e.mergeEdge(t.id, i);
|
|
@@ -8316,7 +8329,7 @@ class Be extends gt {
|
|
|
8316
8329
|
const t = this.getSectionDependencyGraph(), i = new Map(
|
|
8317
8330
|
this.fieldSections.map((r) => [r.id, r])
|
|
8318
8331
|
), s = [];
|
|
8319
|
-
return
|
|
8332
|
+
return lr(
|
|
8320
8333
|
t,
|
|
8321
8334
|
e,
|
|
8322
8335
|
(r, a, h) => {
|
|
@@ -8333,16 +8346,16 @@ class Be extends gt {
|
|
|
8333
8346
|
return ms(this.getFields(), e);
|
|
8334
8347
|
}
|
|
8335
8348
|
deserializeValues(e, t) {
|
|
8336
|
-
return
|
|
8349
|
+
return po(this.getFields(), e, t);
|
|
8337
8350
|
}
|
|
8338
8351
|
serializeValues(e, t) {
|
|
8339
|
-
return
|
|
8352
|
+
return fo(this.getFields(), e, t);
|
|
8340
8353
|
}
|
|
8341
8354
|
initializeValues(e) {
|
|
8342
|
-
return
|
|
8355
|
+
return bo(this.getFields(), e);
|
|
8343
8356
|
}
|
|
8344
8357
|
validateValues(e) {
|
|
8345
|
-
return
|
|
8358
|
+
return Es(this.getFieldSections(), e);
|
|
8346
8359
|
}
|
|
8347
8360
|
areValuesValid(e) {
|
|
8348
8361
|
return Object.keys(this.validateValues(e)).length === 0;
|
|
@@ -8372,28 +8385,34 @@ class Be extends gt {
|
|
|
8372
8385
|
return ds(this.getFields(), e);
|
|
8373
8386
|
}
|
|
8374
8387
|
changedFieldValues(e, t) {
|
|
8375
|
-
return
|
|
8388
|
+
return Co(this.getFields(), e, t);
|
|
8376
8389
|
}
|
|
8377
8390
|
unchangedFieldValues(e, t) {
|
|
8378
|
-
return
|
|
8391
|
+
return yo(this.getFields(), e, t);
|
|
8379
8392
|
}
|
|
8380
8393
|
areValuesEqual(e, t) {
|
|
8381
|
-
return
|
|
8394
|
+
return vo(this.getFields(), e, t);
|
|
8382
8395
|
}
|
|
8383
8396
|
areValuesBlank(e) {
|
|
8384
8397
|
return xo(this.getFields(), e);
|
|
8385
8398
|
}
|
|
8399
|
+
areValuesPartial(e) {
|
|
8400
|
+
return wo(this.getFields(), e);
|
|
8401
|
+
}
|
|
8402
|
+
areValuesComplete(e) {
|
|
8403
|
+
return zo(this.getFields(), e);
|
|
8404
|
+
}
|
|
8386
8405
|
blankValues() {
|
|
8387
|
-
return
|
|
8406
|
+
return Vo(this.getFields());
|
|
8388
8407
|
}
|
|
8389
8408
|
extractFilesAndPromisesFromFieldValues(e) {
|
|
8390
|
-
return
|
|
8409
|
+
return mo(this.getFields(), e);
|
|
8391
8410
|
}
|
|
8392
8411
|
insertFilesAndPromisesToFieldValues(e, t) {
|
|
8393
|
-
return
|
|
8412
|
+
return go(this.getFields(), e, t);
|
|
8394
8413
|
}
|
|
8395
8414
|
}
|
|
8396
|
-
const
|
|
8415
|
+
const As = w((n) => {
|
|
8397
8416
|
const { sourceFieldSection: e, targetFieldSection: t } = n, i = e.getConditions(t.id), s = u(
|
|
8398
8417
|
(d, c) => {
|
|
8399
8418
|
e.replaceCondition(t.id, d, c);
|
|
@@ -8432,7 +8451,7 @@ const Ms = w((n) => {
|
|
|
8432
8451
|
)
|
|
8433
8452
|
] }),
|
|
8434
8453
|
/* @__PURE__ */ l(
|
|
8435
|
-
|
|
8454
|
+
qs,
|
|
8436
8455
|
{
|
|
8437
8456
|
fields: e.fields,
|
|
8438
8457
|
conditions: i,
|
|
@@ -8443,8 +8462,8 @@ const Ms = w((n) => {
|
|
|
8443
8462
|
)
|
|
8444
8463
|
] });
|
|
8445
8464
|
});
|
|
8446
|
-
|
|
8447
|
-
const
|
|
8465
|
+
As.displayName = "FieldSectionConditionalItem";
|
|
8466
|
+
const Rs = w((n) => {
|
|
8448
8467
|
const { fieldSection: e } = n, { fieldSchema: t } = L(ge), i = $(() => t.fieldSections.filter((d) => e.id in d.conditions), [t.fieldSections, e.id]), s = u(
|
|
8449
8468
|
(d) => {
|
|
8450
8469
|
d.addConditional(e.id);
|
|
@@ -8468,8 +8487,8 @@ const Ds = w((n) => {
|
|
|
8468
8487
|
}, [e.id, t]);
|
|
8469
8488
|
return /* @__PURE__ */ o("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
8470
8489
|
/* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
8471
|
-
/* @__PURE__ */ l(
|
|
8472
|
-
|
|
8490
|
+
/* @__PURE__ */ l(B.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ l(
|
|
8491
|
+
B.Field,
|
|
8473
8492
|
{
|
|
8474
8493
|
placeholder: "Enter a section label (optional)",
|
|
8475
8494
|
value: e.label ?? "",
|
|
@@ -8495,7 +8514,7 @@ const Ds = w((n) => {
|
|
|
8495
8514
|
/* @__PURE__ */ o("div", { className: "flex justify-between gap-2", children: [
|
|
8496
8515
|
/* @__PURE__ */ l(_, { accentColor: "base", children: "Conditions" }),
|
|
8497
8516
|
/* @__PURE__ */ l(
|
|
8498
|
-
|
|
8517
|
+
Ss,
|
|
8499
8518
|
{
|
|
8500
8519
|
fieldSections: h,
|
|
8501
8520
|
onSelectFieldSection: s,
|
|
@@ -8509,7 +8528,7 @@ const Ds = w((n) => {
|
|
|
8509
8528
|
] }),
|
|
8510
8529
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-4", children: i.map((d, c) => /* @__PURE__ */ o(Yt, { children: [
|
|
8511
8530
|
/* @__PURE__ */ l(
|
|
8512
|
-
|
|
8531
|
+
As,
|
|
8513
8532
|
{
|
|
8514
8533
|
sourceFieldSection: d,
|
|
8515
8534
|
targetFieldSection: e
|
|
@@ -8521,9 +8540,9 @@ const Ds = w((n) => {
|
|
|
8521
8540
|
/* @__PURE__ */ l(ye, { size: "full" })
|
|
8522
8541
|
] });
|
|
8523
8542
|
});
|
|
8524
|
-
|
|
8525
|
-
const
|
|
8526
|
-
const { fieldSection: e, sectionIndex: t } = n, { fieldSchema: i } = L(ge), s =
|
|
8543
|
+
Rs.displayName = "FieldSectionBuilder";
|
|
8544
|
+
const Ms = w((n) => {
|
|
8545
|
+
const { fieldSection: e, sectionIndex: t } = n, { fieldSchema: i } = L(ge), s = Ps(), r = u(() => {
|
|
8527
8546
|
i.removeFieldSection(e);
|
|
8528
8547
|
}, [i, e]), a = u(
|
|
8529
8548
|
(V) => {
|
|
@@ -8543,12 +8562,12 @@ const Ls = w((n) => {
|
|
|
8543
8562
|
}, [a]), f = u(() => {
|
|
8544
8563
|
a("down");
|
|
8545
8564
|
}, [a]), b = u(async () => {
|
|
8546
|
-
const V = [e.serialize()], z =
|
|
8565
|
+
const V = [e.serialize()], z = je.reseedFieldSections(V, {
|
|
8547
8566
|
conditions: !1
|
|
8548
8567
|
}), S = JSON.stringify(z);
|
|
8549
8568
|
await navigator.clipboard.writeText(S), le.success({ title: "Section copied" });
|
|
8550
8569
|
}, [e]), C = u(async () => {
|
|
8551
|
-
const z = i.getDependenciesOfSection(e.id).map((k) => k.serialize()), S =
|
|
8570
|
+
const z = i.getDependenciesOfSection(e.id).map((k) => k.serialize()), S = je.reseedFieldSections(z, {
|
|
8552
8571
|
conditions: !0
|
|
8553
8572
|
}), I = JSON.stringify(S);
|
|
8554
8573
|
await navigator.clipboard.writeText(I), le.success({ title: "Section copied" });
|
|
@@ -8590,7 +8609,7 @@ const Ls = w((n) => {
|
|
|
8590
8609
|
}, [i, t]);
|
|
8591
8610
|
return /* @__PURE__ */ o(fe, { variant: "outline", className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
8592
8611
|
/* @__PURE__ */ o("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
8593
|
-
/* @__PURE__ */ l(
|
|
8612
|
+
/* @__PURE__ */ l(Rs, { fieldSection: e }),
|
|
8594
8613
|
/* @__PURE__ */ o("div", { className: "flex w-full flex-col gap-2", children: [
|
|
8595
8614
|
/* @__PURE__ */ o("div", { className: "flex justify-between gap-2", children: [
|
|
8596
8615
|
/* @__PURE__ */ l(_, { accentColor: "base", size: "md", children: "Fields" }),
|
|
@@ -8656,13 +8675,13 @@ const Ls = w((n) => {
|
|
|
8656
8675
|
] })
|
|
8657
8676
|
] });
|
|
8658
8677
|
});
|
|
8659
|
-
|
|
8660
|
-
const
|
|
8678
|
+
Ms.displayName = "FieldSectionWithActions";
|
|
8679
|
+
const Ds = w(() => {
|
|
8661
8680
|
const { handleSubmit: n } = Qn(), { errors: e } = Yn(), { onSave: t, onCancel: i } = L(ge), { fieldSchema: s } = L(ge), r = u(() => {
|
|
8662
8681
|
s.addFieldSection(new oe({ id: N(), fields: [] }));
|
|
8663
8682
|
}, [s]), a = u(async () => {
|
|
8664
8683
|
try {
|
|
8665
|
-
const d = s.serialize(), c =
|
|
8684
|
+
const d = s.serialize(), c = je.reseedFieldSections(d, { conditions: !0 }), f = JSON.stringify(c);
|
|
8666
8685
|
await navigator.clipboard.writeText(f), le.success({ title: "Sections copied", description: "All sections JSON copied to clipboard." });
|
|
8667
8686
|
} catch {
|
|
8668
8687
|
le.error({ title: "Copy failed", description: "Unable to copy the sections JSON." });
|
|
@@ -8705,7 +8724,7 @@ const _s = w(() => {
|
|
|
8705
8724
|
" Paste JSON"
|
|
8706
8725
|
] })
|
|
8707
8726
|
] }),
|
|
8708
|
-
s.fieldSections.map((d, c) => /* @__PURE__ */ l(
|
|
8727
|
+
s.fieldSections.map((d, c) => /* @__PURE__ */ l(Ms, { fieldSection: d, sectionIndex: c }, d.id)),
|
|
8709
8728
|
/* @__PURE__ */ o(
|
|
8710
8729
|
x,
|
|
8711
8730
|
{
|
|
@@ -8729,8 +8748,8 @@ const _s = w(() => {
|
|
|
8729
8748
|
] })
|
|
8730
8749
|
] });
|
|
8731
8750
|
});
|
|
8732
|
-
|
|
8733
|
-
function
|
|
8751
|
+
Ds.displayName = "FormBuilderListBuilder";
|
|
8752
|
+
function Ls(n) {
|
|
8734
8753
|
const e = (t) => {
|
|
8735
8754
|
const i = {};
|
|
8736
8755
|
for (const [s, r] of Object.entries(t))
|
|
@@ -8742,7 +8761,7 @@ function $s(n) {
|
|
|
8742
8761
|
};
|
|
8743
8762
|
return e(n);
|
|
8744
8763
|
}
|
|
8745
|
-
const
|
|
8764
|
+
const Zo = w(
|
|
8746
8765
|
Xt((n, e) => {
|
|
8747
8766
|
const {
|
|
8748
8767
|
disabled: t = !1,
|
|
@@ -8762,8 +8781,8 @@ const Ko = w(
|
|
|
8762
8781
|
submitIcon: z,
|
|
8763
8782
|
size: S = "md"
|
|
8764
8783
|
} = n, I = $(() => i.initializeValues(s), [i, s]), k = u(
|
|
8765
|
-
(
|
|
8766
|
-
a?.(
|
|
8784
|
+
(j) => {
|
|
8785
|
+
a?.(j);
|
|
8767
8786
|
},
|
|
8768
8787
|
[a]
|
|
8769
8788
|
), F = ei({
|
|
@@ -8771,31 +8790,31 @@ const Ko = w(
|
|
|
8771
8790
|
mode: "onBlur",
|
|
8772
8791
|
criteriaMode: "all",
|
|
8773
8792
|
disabled: t,
|
|
8774
|
-
resolver: (
|
|
8775
|
-
const ie = i.validateValues(
|
|
8793
|
+
resolver: (j) => {
|
|
8794
|
+
const ie = i.validateValues(j), ae = Ls(ie);
|
|
8776
8795
|
return Object.keys(ie).length > 0 ? {
|
|
8777
8796
|
values: {},
|
|
8778
8797
|
errors: ae
|
|
8779
8798
|
} : {
|
|
8780
|
-
values:
|
|
8799
|
+
values: j,
|
|
8781
8800
|
errors: {}
|
|
8782
8801
|
};
|
|
8783
8802
|
}
|
|
8784
8803
|
}), T = u(
|
|
8785
|
-
(
|
|
8786
|
-
r?.(
|
|
8804
|
+
(j) => {
|
|
8805
|
+
r?.(j);
|
|
8787
8806
|
},
|
|
8788
8807
|
[r]
|
|
8789
8808
|
);
|
|
8790
8809
|
pe(() => {
|
|
8791
|
-
const { unsubscribe:
|
|
8810
|
+
const { unsubscribe: j } = F.watch((ie, { type: ae }) => {
|
|
8792
8811
|
ae === "change" && T(ie);
|
|
8793
8812
|
});
|
|
8794
8813
|
return () => {
|
|
8795
|
-
|
|
8814
|
+
j();
|
|
8796
8815
|
};
|
|
8797
8816
|
}, [F, T]);
|
|
8798
|
-
const O =
|
|
8817
|
+
const O = Ea(i.getFieldSections()), M = $(
|
|
8799
8818
|
() => ({
|
|
8800
8819
|
fieldSchema: i,
|
|
8801
8820
|
size: S
|
|
@@ -8809,7 +8828,7 @@ const Ko = w(
|
|
|
8809
8828
|
className: ze(C, "flex flex-col gap-4"),
|
|
8810
8829
|
onSubmit: F.handleSubmit(k),
|
|
8811
8830
|
children: [
|
|
8812
|
-
/* @__PURE__ */ l("div", { className:
|
|
8831
|
+
/* @__PURE__ */ l("div", { className: So({ size: S }), children: O }),
|
|
8813
8832
|
!t && (J || de) ? /* @__PURE__ */ o(D, { className: "flex items-center justify-end gap-2", size: S, children: [
|
|
8814
8833
|
J ? /* @__PURE__ */ o(
|
|
8815
8834
|
x,
|
|
@@ -8843,19 +8862,19 @@ const Ko = w(
|
|
|
8843
8862
|
}
|
|
8844
8863
|
) }) });
|
|
8845
8864
|
})
|
|
8846
|
-
),
|
|
8865
|
+
), _s = w(() => {
|
|
8847
8866
|
const { fieldSchema: n } = L(ge);
|
|
8848
|
-
return /* @__PURE__ */ l(
|
|
8867
|
+
return /* @__PURE__ */ l(Zo, { fieldSchema: n, disabled: !1 });
|
|
8849
8868
|
});
|
|
8850
|
-
|
|
8851
|
-
const
|
|
8869
|
+
_s.displayName = "FormBuilderPreview";
|
|
8870
|
+
const $s = w((n) => {
|
|
8852
8871
|
const { children: e, initialFields: t, onSave: i, onCancel: s, disableRequiredFields: r = !1 } = n, a = u((y) => {
|
|
8853
8872
|
const V = {};
|
|
8854
8873
|
(!y.fields || y.fields.length === 0) && (V.fields = "At least one field is required.");
|
|
8855
8874
|
const z = [];
|
|
8856
8875
|
for (const [k, F] of y.fields.entries())
|
|
8857
8876
|
for (const [T, O] of F.fields.entries()) {
|
|
8858
|
-
const M =
|
|
8877
|
+
const M = Vs(O.type, `fields.${k}.fields.${T}`)?.map(
|
|
8859
8878
|
({ field: J }) => J
|
|
8860
8879
|
) ?? [];
|
|
8861
8880
|
z.push(...M);
|
|
@@ -8863,7 +8882,7 @@ const Bs = w((n) => {
|
|
|
8863
8882
|
const S = {};
|
|
8864
8883
|
for (const k of z)
|
|
8865
8884
|
S[k.id] = li(y, k.id);
|
|
8866
|
-
const I =
|
|
8885
|
+
const I = Es(z, S);
|
|
8867
8886
|
return Object.keys(I).length > 0 && (V.fields = I.fields), Object.keys(V).length > 0 && le.error({
|
|
8868
8887
|
title: "Some form settings are invalid",
|
|
8869
8888
|
description: "Please check settings highlighted in red."
|
|
@@ -8879,7 +8898,7 @@ const Bs = w((n) => {
|
|
|
8879
8898
|
criteriaMode: "all",
|
|
8880
8899
|
reValidateMode: "onSubmit",
|
|
8881
8900
|
resolver: (y) => {
|
|
8882
|
-
const V = a(y), z =
|
|
8901
|
+
const V = a(y), z = Ls(V);
|
|
8883
8902
|
return Object.keys(V).length > 0 ? {
|
|
8884
8903
|
values: {},
|
|
8885
8904
|
errors: z
|
|
@@ -8897,7 +8916,7 @@ const Bs = w((n) => {
|
|
|
8897
8916
|
control: d.control,
|
|
8898
8917
|
compute: (y) => y.fields
|
|
8899
8918
|
}), b = $(() => {
|
|
8900
|
-
const y =
|
|
8919
|
+
const y = je.fromConfig(f);
|
|
8901
8920
|
return y.observe(c), y;
|
|
8902
8921
|
}, [f, c]), C = $(() => ({
|
|
8903
8922
|
fieldSchema: b,
|
|
@@ -8913,12 +8932,12 @@ const Bs = w((n) => {
|
|
|
8913
8932
|
);
|
|
8914
8933
|
return /* @__PURE__ */ l(ge, { value: C, children: /* @__PURE__ */ l(K, { value: p, children: /* @__PURE__ */ l(ti, { ...d, children: e }) }) });
|
|
8915
8934
|
});
|
|
8916
|
-
|
|
8917
|
-
const
|
|
8918
|
-
Root:
|
|
8919
|
-
FlowBuilder:
|
|
8920
|
-
ListBuilder:
|
|
8921
|
-
Preview:
|
|
8935
|
+
$s.displayName = "FormBuilderRoot";
|
|
8936
|
+
const zc = {
|
|
8937
|
+
Root: $s,
|
|
8938
|
+
FlowBuilder: Ts,
|
|
8939
|
+
ListBuilder: Ds,
|
|
8940
|
+
Preview: _s
|
|
8922
8941
|
};
|
|
8923
8942
|
export {
|
|
8924
8943
|
yt as AndFieldCondition,
|
|
@@ -8930,55 +8949,55 @@ export {
|
|
|
8930
8949
|
he as BaseOptionsField,
|
|
8931
8950
|
Ge as BaseStringField,
|
|
8932
8951
|
Ie as BooleanField,
|
|
8933
|
-
|
|
8952
|
+
Fo as BooleanFieldConditionCell,
|
|
8934
8953
|
hn as BooleanFieldEqualsCondition,
|
|
8935
8954
|
xi as BooleanFieldInput,
|
|
8936
8955
|
Zi as BooleanFieldNotEqualsCondition,
|
|
8937
8956
|
Ce as CheckboxListField,
|
|
8938
|
-
|
|
8957
|
+
No as CheckboxListFieldConditionCell,
|
|
8939
8958
|
fn as CheckboxListFieldEqualsCondition,
|
|
8940
8959
|
Qi as CheckboxListFieldEveryCondition,
|
|
8941
8960
|
tl as CheckboxListFieldNoneCondition,
|
|
8942
8961
|
Yi as CheckboxListFieldNotEqualsCondition,
|
|
8943
8962
|
el as CheckboxListFieldSomeCondition,
|
|
8944
|
-
|
|
8945
|
-
|
|
8963
|
+
Uo as CompoundFieldConditionCell,
|
|
8964
|
+
to as ConditionManager,
|
|
8946
8965
|
He as DateField,
|
|
8947
8966
|
al as DateFieldAfterCondition,
|
|
8948
8967
|
rl as DateFieldBeforeCondition,
|
|
8949
|
-
|
|
8968
|
+
ko as DateFieldConditionCell,
|
|
8950
8969
|
pn as DateFieldEqualsCondition,
|
|
8951
8970
|
ol as DateFieldInCondition,
|
|
8952
8971
|
Si as DateFieldInput,
|
|
8953
8972
|
sl as DateFieldNotEqualsCondition,
|
|
8954
8973
|
cl as DateFieldNotInCondition,
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8974
|
+
Za as FIELD_TYPES,
|
|
8975
|
+
qs as FieldConditionBuilder,
|
|
8976
|
+
ks as FieldConditionBuilderContext,
|
|
8977
|
+
Ns as FieldConditionCell,
|
|
8978
|
+
je as FieldSchema,
|
|
8960
8979
|
oe as FieldSection,
|
|
8961
8980
|
R as FieldTypeGroup,
|
|
8962
8981
|
lt as FieldTypeToClsMapping,
|
|
8963
|
-
|
|
8982
|
+
Zo as FieldsRenderer,
|
|
8964
8983
|
gi as FileCard,
|
|
8965
|
-
|
|
8984
|
+
zc as FormBuilder,
|
|
8966
8985
|
Ti as ImageCapturer,
|
|
8967
|
-
|
|
8986
|
+
Ra as ImageCapturerProvider,
|
|
8968
8987
|
Ei as ImageCard,
|
|
8969
8988
|
Qe as ImageFile,
|
|
8970
8989
|
yi as ImageViewer,
|
|
8971
|
-
|
|
8990
|
+
Ta as ImageViewerProvider,
|
|
8972
8991
|
Z as InputWithLabel,
|
|
8973
8992
|
ve as MultiSelectField,
|
|
8974
|
-
|
|
8993
|
+
qo as MultiSelectFieldConditionCell,
|
|
8975
8994
|
mn as MultiSelectFieldEqualsCondition,
|
|
8976
8995
|
ul as MultiSelectFieldEveryCondition,
|
|
8977
8996
|
fl as MultiSelectFieldNoneCondition,
|
|
8978
8997
|
dl as MultiSelectFieldNotEqualsCondition,
|
|
8979
8998
|
hl as MultiSelectFieldSomeCondition,
|
|
8980
8999
|
qe as MultiStringField,
|
|
8981
|
-
|
|
9000
|
+
Oo as MultiStringFieldConditionCell,
|
|
8982
9001
|
gn as MultiStringFieldEqualsCondition,
|
|
8983
9002
|
ml as MultiStringFieldEveryCondition,
|
|
8984
9003
|
bl as MultiStringFieldNoneCondition,
|
|
@@ -8987,7 +9006,7 @@ export {
|
|
|
8987
9006
|
il as NandFieldCondition,
|
|
8988
9007
|
ll as NorFieldCondition,
|
|
8989
9008
|
se as NumberField,
|
|
8990
|
-
|
|
9009
|
+
Io as NumberFieldConditionCell,
|
|
8991
9010
|
bn as NumberFieldEqualsCondition,
|
|
8992
9011
|
Vl as NumberFieldGreaterThanCondition,
|
|
8993
9012
|
xl as NumberFieldGreaterThanOrEqualsCondition,
|
|
@@ -8997,7 +9016,7 @@ export {
|
|
|
8997
9016
|
Cl as NumberFieldNotEqualsCondition,
|
|
8998
9017
|
zl as NumberFieldNotInRangeCondition,
|
|
8999
9018
|
Te as OTPField,
|
|
9000
|
-
|
|
9019
|
+
To as OTPFieldConditionCell,
|
|
9001
9020
|
Cn as OTPFieldEqualsCondition,
|
|
9002
9021
|
Nl as OTPFieldExcludesCondition,
|
|
9003
9022
|
Fl as OTPFieldIncludesCondition,
|
|
@@ -9005,19 +9024,19 @@ export {
|
|
|
9005
9024
|
gt as Observable,
|
|
9006
9025
|
nl as OrFieldCondition,
|
|
9007
9026
|
Ee as PassFailField,
|
|
9008
|
-
|
|
9027
|
+
Eo as PassFailFieldConditionCell,
|
|
9009
9028
|
yn as PassFailFieldEqualsCondition,
|
|
9010
9029
|
Ol as PassFailFieldExcludesCondition,
|
|
9011
9030
|
ql as PassFailFieldIncludesCondition,
|
|
9012
9031
|
kl as PassFailFieldNotEqualsCondition,
|
|
9013
9032
|
Ae as RadioField,
|
|
9014
|
-
|
|
9033
|
+
Ao as RadioFieldConditionCell,
|
|
9015
9034
|
vn as RadioFieldEqualsCondition,
|
|
9016
9035
|
El as RadioFieldExcludesCondition,
|
|
9017
9036
|
Tl as RadioFieldIncludesCondition,
|
|
9018
9037
|
Il as RadioFieldNotEqualsCondition,
|
|
9019
9038
|
Re as RatingField,
|
|
9020
|
-
|
|
9039
|
+
Ro as RatingFieldConditionCell,
|
|
9021
9040
|
Vn as RatingFieldEqualsCondition,
|
|
9022
9041
|
Dl as RatingFieldGreaterThanCondition,
|
|
9023
9042
|
Ll as RatingFieldGreaterThanOrEqualsCondition,
|
|
@@ -9027,27 +9046,27 @@ export {
|
|
|
9027
9046
|
Al as RatingFieldNotEqualsCondition,
|
|
9028
9047
|
$l as RatingFieldNotInRangeCondition,
|
|
9029
9048
|
Je as ScanField,
|
|
9030
|
-
|
|
9049
|
+
Mo as ScanFieldConditionCell,
|
|
9031
9050
|
xn as ScanFieldEqualsCondition,
|
|
9032
9051
|
Pl as ScanFieldExcludesCondition,
|
|
9033
|
-
|
|
9034
|
-
|
|
9052
|
+
jl as ScanFieldIncludesCondition,
|
|
9053
|
+
Bl as ScanFieldNotEqualsCondition,
|
|
9035
9054
|
on as Scanner,
|
|
9036
|
-
|
|
9055
|
+
Ua as ScannerProvider,
|
|
9037
9056
|
Me as SelectField,
|
|
9038
|
-
|
|
9057
|
+
Do as SelectFieldConditionCell,
|
|
9039
9058
|
wn as SelectFieldEqualsCondition,
|
|
9040
9059
|
Hl as SelectFieldExcludesCondition,
|
|
9041
9060
|
Gl as SelectFieldIncludesCondition,
|
|
9042
9061
|
Ul as SelectFieldNotEqualsCondition,
|
|
9043
9062
|
De as StringField,
|
|
9044
|
-
|
|
9063
|
+
Lo as StringFieldConditionCell,
|
|
9045
9064
|
zn as StringFieldEqualsCondition,
|
|
9046
9065
|
Kl as StringFieldExcludesCondition,
|
|
9047
9066
|
Wl as StringFieldIncludesCondition,
|
|
9048
9067
|
Jl as StringFieldNotEqualsCondition,
|
|
9049
9068
|
Le as TextField,
|
|
9050
|
-
|
|
9069
|
+
_o as TextFieldConditionCell,
|
|
9051
9070
|
Sn as TextFieldEqualsCondition,
|
|
9052
9071
|
Yl as TextFieldExcludesCondition,
|
|
9053
9072
|
Zl as TextFieldIncludesCondition,
|
|
@@ -9055,7 +9074,7 @@ export {
|
|
|
9055
9074
|
We as TimeField,
|
|
9056
9075
|
ts as TimeFieldAfterCondition,
|
|
9057
9076
|
es as TimeFieldBeforeCondition,
|
|
9058
|
-
|
|
9077
|
+
$o as TimeFieldConditionCell,
|
|
9059
9078
|
dn as TimeFieldControl,
|
|
9060
9079
|
Fn as TimeFieldEqualsCondition,
|
|
9061
9080
|
ns as TimeFieldInCondition,
|
|
@@ -9065,31 +9084,33 @@ export {
|
|
|
9065
9084
|
Y as UNLABELLED_FIELD_LABEL,
|
|
9066
9085
|
un as UNLABELLED_SECTION_LABEL,
|
|
9067
9086
|
Ke as URLField,
|
|
9068
|
-
|
|
9087
|
+
jo as URLFieldConditionCell,
|
|
9069
9088
|
kn as URLFieldEqualsCondition,
|
|
9070
9089
|
as as URLFieldExcludesCondition,
|
|
9071
9090
|
rs as URLFieldIncludesCondition,
|
|
9072
9091
|
ss as URLFieldNotEqualsCondition,
|
|
9073
9092
|
Gi as UTC_OFFSETS,
|
|
9074
|
-
|
|
9093
|
+
Ga as UTC_OFFSETS_SET,
|
|
9075
9094
|
xe as UUIDFile,
|
|
9076
9095
|
Xe as UUIDPromise,
|
|
9077
9096
|
$e as UploadField,
|
|
9078
|
-
|
|
9097
|
+
Bo as UploadFieldConditionCell,
|
|
9079
9098
|
Nn as UploadFieldEqualsCondition,
|
|
9080
9099
|
ls as UploadFieldNotEqualsCondition,
|
|
9081
9100
|
Ri as VideoCard,
|
|
9082
9101
|
Ai as VideoFile,
|
|
9083
9102
|
qn as applyConditions,
|
|
9084
9103
|
xo as areFieldValuesBlank,
|
|
9085
|
-
|
|
9104
|
+
zo as areFieldValuesComplete,
|
|
9105
|
+
vo as areFieldValuesEqual,
|
|
9106
|
+
wo as areFieldValuesPartial,
|
|
9086
9107
|
sn as areFileAndPromiseArraysEqual,
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9108
|
+
Ba as areJSONPassFailFieldValuesEqual,
|
|
9109
|
+
$a as arePassFieldValuesEqual,
|
|
9110
|
+
wc as awaitFilesAndPromises,
|
|
9111
|
+
Vo as blankFieldValues,
|
|
9091
9112
|
Nt as booleanFieldConditionModifierConfig,
|
|
9092
|
-
|
|
9113
|
+
Co as changedFieldValues,
|
|
9093
9114
|
kt as checkboxListFieldConditionModifierConfig,
|
|
9094
9115
|
On as cleanCondition,
|
|
9095
9116
|
In as cleanConditions,
|
|
@@ -9106,39 +9127,39 @@ export {
|
|
|
9106
9127
|
ht as deserializeConditions,
|
|
9107
9128
|
En as deserializeField,
|
|
9108
9129
|
fs as deserializeFieldConfig,
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9130
|
+
ro as deserializeFieldConfigs,
|
|
9131
|
+
no as deserializeFieldElement,
|
|
9132
|
+
ao as deserializeFieldElementConfig,
|
|
9133
|
+
oo as deserializeFieldElementConfigs,
|
|
9113
9134
|
An as deserializeFieldElements,
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9135
|
+
po as deserializeFieldValues,
|
|
9136
|
+
vc as deserializeFields,
|
|
9137
|
+
_a as deserializePassFailFieldValue,
|
|
9138
|
+
mo as extractFilesAndPromisesFromFieldValues,
|
|
9118
9139
|
H as fieldDataMapping,
|
|
9119
|
-
|
|
9120
|
-
|
|
9140
|
+
lo as fieldElementFromConfig,
|
|
9141
|
+
so as fieldElementsFromConfigs,
|
|
9121
9142
|
hs as fieldFromConfig,
|
|
9122
9143
|
Mn as fieldSpacingCva,
|
|
9123
|
-
|
|
9124
|
-
|
|
9144
|
+
Ya as fieldTypeGroupDataMapping,
|
|
9145
|
+
io as fieldsFromConfigs,
|
|
9125
9146
|
Ft as formatTime,
|
|
9126
9147
|
Ht as formatUTCOffset,
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9148
|
+
Ka as getCurrentUTCOffset,
|
|
9149
|
+
Vc as getFieldsMapping,
|
|
9150
|
+
xc as getImagesFromFields,
|
|
9130
9151
|
_e as getUTCMinuteOfDay,
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9152
|
+
Xa as getUTCOffsetMinutes,
|
|
9153
|
+
bo as initializeFieldValues,
|
|
9154
|
+
go as insertFilesAndPromisesToFieldValues,
|
|
9155
|
+
Aa as isFileAndPromiseArray,
|
|
9156
|
+
Ma as isJSONPassFailFieldValue,
|
|
9136
9157
|
Di as isPassFailFieldStatus,
|
|
9137
|
-
|
|
9158
|
+
Da as isPassFailFieldValue,
|
|
9138
9159
|
ut as isStringArray,
|
|
9139
9160
|
me as isTime,
|
|
9140
9161
|
Hi as isTimeInRange,
|
|
9141
|
-
|
|
9162
|
+
Cc as isTimeRange,
|
|
9142
9163
|
cn as isUTCOffset,
|
|
9143
9164
|
Ot as multiSelectFieldConditionModifierConfig,
|
|
9144
9165
|
It as multiStringFieldConditionModifierConfig,
|
|
@@ -9157,26 +9178,26 @@ export {
|
|
|
9157
9178
|
cs as serializeCondition,
|
|
9158
9179
|
ds as serializeConditions,
|
|
9159
9180
|
ps as serializeFieldConfig,
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9181
|
+
co as serializeFieldConfigs,
|
|
9182
|
+
uo as serializeFieldElementConfig,
|
|
9183
|
+
ho as serializeFieldElementConfigs,
|
|
9184
|
+
fo as serializeFieldValues,
|
|
9185
|
+
La as serializePassFailFieldValue,
|
|
9165
9186
|
_t as stringFieldConditionModifierConfig,
|
|
9166
9187
|
$t as textFieldConditionModifierConfig,
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9188
|
+
Bt as timeFieldConditionModifierConfig,
|
|
9189
|
+
yo as unchangedFieldValues,
|
|
9190
|
+
jt as uploadFieldConditionModifierConfig,
|
|
9170
9191
|
Pt as urlFieldConditionModifierConfig,
|
|
9171
|
-
|
|
9172
|
-
|
|
9192
|
+
yc as useConditionManager,
|
|
9193
|
+
Po as useFieldConditionBuilderContext,
|
|
9173
9194
|
ee as useFieldInput,
|
|
9174
9195
|
Gt as useFieldInputs,
|
|
9175
|
-
|
|
9196
|
+
Ea as useFieldSectionInputs,
|
|
9176
9197
|
qi as useImageCapturer,
|
|
9177
9198
|
ln as useImageViewer,
|
|
9178
9199
|
bi as useObjectUrl,
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9200
|
+
bc as useScanner,
|
|
9201
|
+
Pa as useScannerContext,
|
|
9202
|
+
Es as validateFieldValues
|
|
9182
9203
|
};
|