@opennsw/jsonforms-renderers 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/index.d.ts +13 -11
- package/dist/jsonforms-renderers.css +1 -1
- package/dist/renderers.cjs.js +3 -1
- package/dist/renderers.es.js +840 -424
- package/package.json +16 -12
package/dist/renderers.es.js
CHANGED
|
@@ -1,151 +1,182 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { rankWith as
|
|
4
|
-
import { withJsonFormsControlProps as
|
|
5
|
-
import { Box as
|
|
6
|
-
import { FileTextIcon as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
children:
|
|
10
|
-
onUpload:
|
|
11
|
-
getDownloadUrl:
|
|
1
|
+
import { jsx as e, jsxs as z, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as xe, useContext as ze, useEffect as q, useState as fe, useRef as ye, useCallback as Te } from "react";
|
|
3
|
+
import { rankWith as N, isStringControl as ke, or as me, isNumberControl as Oe, isIntegerControl as Le, isBooleanControl as Fe, isEnumControl as we, isOneOfControl as Ce, isDateControl as Re, isDateTimeControl as Ae, isTimeControl as Ue, uiTypeIs as ie, and as _e, schemaMatches as Ie, createDefaultValue as je, isObjectArrayControl as Ve, isPrimitiveArrayControl as We } from "@jsonforms/core";
|
|
4
|
+
import { withJsonFormsControlProps as Q, JsonFormsDispatch as se, withJsonFormsArrayControlProps as Ye } from "@jsonforms/react";
|
|
5
|
+
import { Box as U, Flex as R, Text as D, TextField as oe, Checkbox as Ne, RadioGroup as ve, Select as ce, Tabs as ae, Heading as Se, Card as De, Button as pe, IconButton as Ee } from "@radix-ui/themes";
|
|
6
|
+
import { FileTextIcon as He, CheckCircledIcon as Pe, Cross2Icon as Be, ExclamationTriangleIcon as Je, UploadIcon as Ge, TrashIcon as qe, PlusIcon as Ke } from "@radix-ui/react-icons";
|
|
7
|
+
const Me = xe(null);
|
|
8
|
+
function Bt({
|
|
9
|
+
children: o,
|
|
10
|
+
onUpload: r,
|
|
11
|
+
getDownloadUrl: t
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */ e(
|
|
13
|
+
const y = { onUpload: r, getDownloadUrl: t };
|
|
14
|
+
return /* @__PURE__ */ e(Me.Provider, { value: y, children: o });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
return
|
|
16
|
+
function Ze() {
|
|
17
|
+
return ze(Me);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
const X = (o, r) => o ? o.split(`
|
|
20
|
+
`).map((t) => t.trim() === "is a required property" ? `${r || "This field"} is required` : t).join(`
|
|
21
|
+
`) : "", Qe = ({
|
|
22
|
+
data: o,
|
|
23
|
+
handleChange: r,
|
|
24
|
+
path: t,
|
|
25
|
+
label: y,
|
|
26
|
+
required: x,
|
|
27
|
+
errors: S,
|
|
28
|
+
uischema: a,
|
|
29
|
+
schema: M,
|
|
30
|
+
enabled: h,
|
|
31
|
+
visible: f = !0
|
|
29
32
|
}) => {
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
var T;
|
|
34
|
+
if (q(() => {
|
|
35
|
+
f === !1 && r(t, void 0);
|
|
36
|
+
}, [f, t, r]), f === !1)
|
|
37
|
+
return null;
|
|
38
|
+
const d = S.length === 0;
|
|
39
|
+
return /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ z(R, { direction: "column", gap: "1", children: [
|
|
40
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", weight: "bold", htmlFor: t, children: [
|
|
41
|
+
y,
|
|
35
42
|
" ",
|
|
36
|
-
|
|
43
|
+
x && /* @__PURE__ */ e(D, { color: "red", children: "*" })
|
|
37
44
|
] }),
|
|
38
45
|
/* @__PURE__ */ e(
|
|
39
|
-
|
|
46
|
+
oe.Root,
|
|
40
47
|
{
|
|
41
|
-
value:
|
|
42
|
-
onChange: (
|
|
43
|
-
disabled: !
|
|
44
|
-
placeholder: (
|
|
45
|
-
color:
|
|
46
|
-
id:
|
|
48
|
+
value: o || "",
|
|
49
|
+
onChange: (w) => r(t, w.target.value),
|
|
50
|
+
disabled: !h,
|
|
51
|
+
placeholder: (T = a.options) == null ? void 0 : T.placeholder,
|
|
52
|
+
color: d ? void 0 : "red",
|
|
53
|
+
id: t
|
|
47
54
|
}
|
|
48
55
|
),
|
|
49
|
-
!
|
|
50
|
-
|
|
56
|
+
!d && /* @__PURE__ */ e(D, { color: "red", size: "1", children: X(S, y) }),
|
|
57
|
+
M.description && /* @__PURE__ */ e(D, { size: "1", color: "gray", children: M.description })
|
|
51
58
|
] }) });
|
|
52
|
-
},
|
|
53
|
-
data:
|
|
54
|
-
handleChange:
|
|
55
|
-
path:
|
|
56
|
-
label:
|
|
57
|
-
required:
|
|
58
|
-
errors:
|
|
59
|
-
uischema:
|
|
60
|
-
schema:
|
|
61
|
-
enabled:
|
|
59
|
+
}, Xe = N(1, ke), et = Q(Qe), tt = ({
|
|
60
|
+
data: o,
|
|
61
|
+
handleChange: r,
|
|
62
|
+
path: t,
|
|
63
|
+
label: y,
|
|
64
|
+
required: x,
|
|
65
|
+
errors: S,
|
|
66
|
+
uischema: a,
|
|
67
|
+
schema: M,
|
|
68
|
+
enabled: h,
|
|
69
|
+
visible: f = !0
|
|
62
70
|
}) => {
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
var w;
|
|
72
|
+
if (q(() => {
|
|
73
|
+
f === !1 && r(t, void 0);
|
|
74
|
+
}, [f, t, r]), f === !1)
|
|
75
|
+
return null;
|
|
76
|
+
const d = S.length === 0, T = ($) => {
|
|
77
|
+
if ($ === "") {
|
|
78
|
+
r(t, void 0);
|
|
67
79
|
return;
|
|
68
80
|
}
|
|
69
|
-
const
|
|
70
|
-
isNaN(
|
|
81
|
+
const m = Number($);
|
|
82
|
+
isNaN(m) || r(t, m);
|
|
71
83
|
};
|
|
72
|
-
return /* @__PURE__ */ e(
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
|
|
84
|
+
return /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ z(R, { direction: "column", gap: "1", children: [
|
|
85
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", weight: "bold", htmlFor: t, children: [
|
|
86
|
+
y,
|
|
75
87
|
" ",
|
|
76
|
-
|
|
88
|
+
x && /* @__PURE__ */ e(D, { color: "red", children: "*" })
|
|
77
89
|
] }),
|
|
78
90
|
/* @__PURE__ */ e(
|
|
79
|
-
|
|
91
|
+
oe.Root,
|
|
80
92
|
{
|
|
81
93
|
type: "number",
|
|
82
|
-
value:
|
|
83
|
-
onChange: (
|
|
84
|
-
disabled: !
|
|
85
|
-
placeholder: (
|
|
86
|
-
color:
|
|
87
|
-
id:
|
|
94
|
+
value: o ?? "",
|
|
95
|
+
onChange: ($) => T($.target.value),
|
|
96
|
+
disabled: !h,
|
|
97
|
+
placeholder: (w = a.options) == null ? void 0 : w.placeholder,
|
|
98
|
+
color: d ? void 0 : "red",
|
|
99
|
+
id: t
|
|
88
100
|
}
|
|
89
101
|
),
|
|
90
|
-
!
|
|
91
|
-
|
|
102
|
+
!d && /* @__PURE__ */ e(D, { color: "red", size: "1", children: X(S, y) }),
|
|
103
|
+
M.description && /* @__PURE__ */ e(D, { size: "1", color: "gray", children: M.description })
|
|
92
104
|
] }) });
|
|
93
|
-
},
|
|
94
|
-
data:
|
|
95
|
-
handleChange:
|
|
96
|
-
path:
|
|
97
|
-
label:
|
|
98
|
-
required:
|
|
99
|
-
errors:
|
|
100
|
-
schema:
|
|
101
|
-
enabled:
|
|
105
|
+
}, rt = N(2, me(Oe, Le)), nt = Q(tt), ot = ({
|
|
106
|
+
data: o,
|
|
107
|
+
handleChange: r,
|
|
108
|
+
path: t,
|
|
109
|
+
label: y,
|
|
110
|
+
required: x,
|
|
111
|
+
errors: S,
|
|
112
|
+
schema: a,
|
|
113
|
+
enabled: M,
|
|
114
|
+
visible: h = !0
|
|
102
115
|
}) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
if (q(() => {
|
|
117
|
+
h === !1 && r(t, void 0);
|
|
118
|
+
}, [h, t, r]), h === !1)
|
|
119
|
+
return null;
|
|
120
|
+
const f = S.length === 0;
|
|
121
|
+
return /* @__PURE__ */ z(U, { mb: "4", children: [
|
|
122
|
+
/* @__PURE__ */ z(R, { gap: "2", align: "center", children: [
|
|
106
123
|
/* @__PURE__ */ e(
|
|
107
|
-
|
|
124
|
+
Ne,
|
|
108
125
|
{
|
|
109
|
-
checked: !!
|
|
110
|
-
onCheckedChange: (
|
|
111
|
-
disabled: !
|
|
112
|
-
id:
|
|
126
|
+
checked: !!o,
|
|
127
|
+
onCheckedChange: (d) => r(t, d === !0),
|
|
128
|
+
disabled: !M,
|
|
129
|
+
id: t
|
|
113
130
|
}
|
|
114
131
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
|
|
132
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", htmlFor: t, children: [
|
|
133
|
+
y,
|
|
117
134
|
" ",
|
|
118
|
-
|
|
135
|
+
x && "*"
|
|
119
136
|
] })
|
|
120
137
|
] }),
|
|
121
|
-
!
|
|
122
|
-
|
|
138
|
+
!f && /* @__PURE__ */ e(D, { color: "red", size: "1", className: "block mt-1", children: X(S, y) }),
|
|
139
|
+
a.description && /* @__PURE__ */ e(D, { size: "1", color: "gray", className: "block mt-1", children: a.description })
|
|
123
140
|
] });
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
141
|
+
}, it = N(2, Fe), st = Q(ot), lt = ({
|
|
142
|
+
data: o,
|
|
143
|
+
handleChange: r,
|
|
144
|
+
path: t,
|
|
145
|
+
label: y,
|
|
146
|
+
required: x,
|
|
147
|
+
errors: S,
|
|
148
|
+
schema: a,
|
|
149
|
+
enabled: M,
|
|
150
|
+
visible: h = !0
|
|
151
|
+
}) => {
|
|
152
|
+
if (q(() => {
|
|
153
|
+
h === !1 && r(t, void 0);
|
|
154
|
+
}, [h, t, r]), h === !1)
|
|
155
|
+
return null;
|
|
156
|
+
const f = S.length === 0;
|
|
157
|
+
let d = [];
|
|
158
|
+
a.enum ? d = a.enum.map((w) => ({ value: w, label: String(w) })) : a.oneOf && (d = a.oneOf.map((w) => ({
|
|
159
|
+
value: w.const,
|
|
160
|
+
label: w.title || String(w.const)
|
|
130
161
|
})));
|
|
131
|
-
const
|
|
132
|
-
return /* @__PURE__ */ e(
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
|
|
162
|
+
const T = o;
|
|
163
|
+
return /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ z(R, { direction: "column", gap: "1", children: [
|
|
164
|
+
/* @__PURE__ */ z(D, { as: "div", size: "2", weight: "bold", children: [
|
|
165
|
+
y,
|
|
135
166
|
" ",
|
|
136
|
-
|
|
167
|
+
x && /* @__PURE__ */ e(D, { color: "red", children: "*" })
|
|
137
168
|
] }),
|
|
138
169
|
/* @__PURE__ */ e(
|
|
139
|
-
|
|
170
|
+
ve.Root,
|
|
140
171
|
{
|
|
141
|
-
value:
|
|
142
|
-
onValueChange: (
|
|
143
|
-
const
|
|
144
|
-
|
|
172
|
+
value: T !== void 0 ? String(T) : "",
|
|
173
|
+
onValueChange: (w) => {
|
|
174
|
+
const $ = d.find((m) => String(m.value) === w);
|
|
175
|
+
$ && r(t, $.value);
|
|
145
176
|
},
|
|
146
|
-
disabled: !
|
|
177
|
+
disabled: !M,
|
|
147
178
|
children: /* @__PURE__ */ e(
|
|
148
|
-
|
|
179
|
+
R,
|
|
149
180
|
{
|
|
150
181
|
direction: "row",
|
|
151
182
|
style: {
|
|
@@ -153,253 +184,636 @@ const Ne = ({
|
|
|
153
184
|
columnGap: "clamp(14px, 3vw, 36px)",
|
|
154
185
|
rowGap: "clamp(8px, 1.6vw, 14px)"
|
|
155
186
|
},
|
|
156
|
-
children:
|
|
157
|
-
/* @__PURE__ */ e(
|
|
158
|
-
/* @__PURE__ */ e(
|
|
159
|
-
] }, String(
|
|
187
|
+
children: d.map((w) => /* @__PURE__ */ z(R, { align: "center", gap: "2", style: { minWidth: "max-content" }, children: [
|
|
188
|
+
/* @__PURE__ */ e(ve.Item, { value: String(w.value) }),
|
|
189
|
+
/* @__PURE__ */ e(D, { size: "2", color: M ? void 0 : "gray", children: w.label })
|
|
190
|
+
] }, String(w.value)))
|
|
160
191
|
}
|
|
161
192
|
)
|
|
162
193
|
}
|
|
163
194
|
),
|
|
164
|
-
!
|
|
165
|
-
|
|
195
|
+
!f && /* @__PURE__ */ e(D, { color: "red", size: "1", children: X(S, y) }),
|
|
196
|
+
a.description && /* @__PURE__ */ e(D, { size: "1", color: "gray", children: a.description })
|
|
166
197
|
] }) });
|
|
167
|
-
},
|
|
168
|
-
var
|
|
169
|
-
return
|
|
170
|
-
},
|
|
171
|
-
data:
|
|
172
|
-
handleChange:
|
|
173
|
-
path:
|
|
174
|
-
label:
|
|
175
|
-
required:
|
|
176
|
-
errors:
|
|
177
|
-
schema:
|
|
178
|
-
uischema:
|
|
179
|
-
enabled:
|
|
198
|
+
}, ct = (o, r, t) => {
|
|
199
|
+
var x;
|
|
200
|
+
return me(we, Ce)(o, r, t) && ((x = o == null ? void 0 : o.options) == null ? void 0 : x.format) === "radio" ? 3 : -1;
|
|
201
|
+
}, at = Q(lt), ut = ({
|
|
202
|
+
data: o,
|
|
203
|
+
handleChange: r,
|
|
204
|
+
path: t,
|
|
205
|
+
label: y,
|
|
206
|
+
required: x,
|
|
207
|
+
errors: S,
|
|
208
|
+
schema: a,
|
|
209
|
+
uischema: M,
|
|
210
|
+
enabled: h,
|
|
211
|
+
visible: f = !0
|
|
180
212
|
}) => {
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
213
|
+
var $;
|
|
214
|
+
if (q(() => {
|
|
215
|
+
f === !1 && r(t, void 0);
|
|
216
|
+
}, [f, t, r]), f === !1)
|
|
217
|
+
return null;
|
|
218
|
+
const d = S.length === 0;
|
|
219
|
+
let T = [];
|
|
220
|
+
a.enum ? T = a.enum.map((m) => ({ value: String(m), label: String(m) })) : a.oneOf && (T = a.oneOf.map((m) => ({
|
|
221
|
+
value: String(m.const),
|
|
222
|
+
label: m.title || String(m.const)
|
|
187
223
|
})));
|
|
188
|
-
const
|
|
189
|
-
return /* @__PURE__ */ e(
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
224
|
+
const w = o !== void 0 ? String(o) : "";
|
|
225
|
+
return /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ z(R, { direction: "column", gap: "1", children: [
|
|
226
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", weight: "bold", htmlFor: t, children: [
|
|
227
|
+
y,
|
|
192
228
|
" ",
|
|
193
|
-
|
|
229
|
+
x && /* @__PURE__ */ e(D, { color: "red", children: "*" })
|
|
194
230
|
] }),
|
|
195
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ z(ce.Root, { value: w, onValueChange: (m) => r(t, m), disabled: !h, children: [
|
|
196
232
|
/* @__PURE__ */ e(
|
|
197
|
-
|
|
233
|
+
ce.Trigger,
|
|
198
234
|
{
|
|
199
|
-
placeholder: ((
|
|
200
|
-
color:
|
|
201
|
-
id:
|
|
235
|
+
placeholder: (($ = M.options) == null ? void 0 : $.placeholder) || "Select an option",
|
|
236
|
+
color: d ? void 0 : "red",
|
|
237
|
+
id: t
|
|
202
238
|
}
|
|
203
239
|
),
|
|
204
|
-
/* @__PURE__ */ e(
|
|
240
|
+
/* @__PURE__ */ e(ce.Content, { children: T.map((m) => /* @__PURE__ */ e(ce.Item, { value: m.value, children: m.label }, m.value)) })
|
|
205
241
|
] }),
|
|
206
|
-
!
|
|
207
|
-
|
|
242
|
+
!d && /* @__PURE__ */ e(D, { color: "red", size: "1", children: X(S, y) }),
|
|
243
|
+
a.description && /* @__PURE__ */ e(D, { size: "1", color: "gray", children: a.description })
|
|
208
244
|
] }) });
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
return
|
|
212
|
-
|
|
213
|
-
|
|
245
|
+
}, dt = N(2, me(we, Ce)), ft = Q(ut);
|
|
246
|
+
function ht(o) {
|
|
247
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
248
|
+
}
|
|
249
|
+
var he = { exports: {} }, mt = he.exports, $e;
|
|
250
|
+
function pt() {
|
|
251
|
+
return $e || ($e = 1, (function(o, r) {
|
|
252
|
+
(function(t, y) {
|
|
253
|
+
o.exports = y();
|
|
254
|
+
})(mt, (function() {
|
|
255
|
+
var t = 1e3, y = 6e4, x = 36e5, S = "millisecond", a = "second", M = "minute", h = "hour", f = "day", d = "week", T = "month", w = "quarter", $ = "year", m = "date", _ = "Invalid Date", I = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, O = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
|
|
256
|
+
var l = ["th", "st", "nd", "rd"], n = u % 100;
|
|
257
|
+
return "[" + u + (l[(n - 20) % 10] || l[n] || l[0]) + "]";
|
|
258
|
+
} }, J = function(u, l, n) {
|
|
259
|
+
var c = String(u);
|
|
260
|
+
return !c || c.length >= l ? u : "" + Array(l + 1 - c.length).join(n) + u;
|
|
261
|
+
}, K = { s: J, z: function(u) {
|
|
262
|
+
var l = -u.utcOffset(), n = Math.abs(l), c = Math.floor(n / 60), i = n % 60;
|
|
263
|
+
return (l <= 0 ? "+" : "-") + J(c, 2, "0") + ":" + J(i, 2, "0");
|
|
264
|
+
}, m: function u(l, n) {
|
|
265
|
+
if (l.date() < n.date()) return -u(n, l);
|
|
266
|
+
var c = 12 * (n.year() - l.year()) + (n.month() - l.month()), i = l.clone().add(c, T), p = n - i < 0, g = l.clone().add(c + (p ? -1 : 1), T);
|
|
267
|
+
return +(-(c + (n - i) / (p ? i - g : g - i)) || 0);
|
|
268
|
+
}, a: function(u) {
|
|
269
|
+
return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
|
|
270
|
+
}, p: function(u) {
|
|
271
|
+
return { M: T, y: $, w: d, d: f, D: m, h, m: M, s: a, ms: S, Q: w }[u] || String(u || "").toLowerCase().replace(/s$/, "");
|
|
272
|
+
}, u: function(u) {
|
|
273
|
+
return u === void 0;
|
|
274
|
+
} }, H = "en", j = {};
|
|
275
|
+
j[H] = A;
|
|
276
|
+
var te = "$isDayjsObject", ee = function(u) {
|
|
277
|
+
return u instanceof B || !(!u || !u[te]);
|
|
278
|
+
}, P = function u(l, n, c) {
|
|
279
|
+
var i;
|
|
280
|
+
if (!l) return H;
|
|
281
|
+
if (typeof l == "string") {
|
|
282
|
+
var p = l.toLowerCase();
|
|
283
|
+
j[p] && (i = p), n && (j[p] = n, i = p);
|
|
284
|
+
var g = l.split("-");
|
|
285
|
+
if (!i && g.length > 1) return u(g[0]);
|
|
286
|
+
} else {
|
|
287
|
+
var s = l.name;
|
|
288
|
+
j[s] = l, i = s;
|
|
289
|
+
}
|
|
290
|
+
return !c && i && (H = i), i || !c && H;
|
|
291
|
+
}, L = function(u, l) {
|
|
292
|
+
if (ee(u)) return u.clone();
|
|
293
|
+
var n = typeof l == "object" ? l : {};
|
|
294
|
+
return n.date = u, n.args = arguments, new B(n);
|
|
295
|
+
}, C = K;
|
|
296
|
+
C.l = P, C.i = ee, C.w = function(u, l) {
|
|
297
|
+
return L(u, { locale: l.$L, utc: l.$u, x: l.$x, $offset: l.$offset });
|
|
298
|
+
};
|
|
299
|
+
var B = (function() {
|
|
300
|
+
function u(n) {
|
|
301
|
+
this.$L = P(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[te] = !0;
|
|
302
|
+
}
|
|
303
|
+
var l = u.prototype;
|
|
304
|
+
return l.parse = function(n) {
|
|
305
|
+
this.$d = (function(c) {
|
|
306
|
+
var i = c.date, p = c.utc;
|
|
307
|
+
if (i === null) return /* @__PURE__ */ new Date(NaN);
|
|
308
|
+
if (C.u(i)) return /* @__PURE__ */ new Date();
|
|
309
|
+
if (i instanceof Date) return new Date(i);
|
|
310
|
+
if (typeof i == "string" && !/Z$/i.test(i)) {
|
|
311
|
+
var g = i.match(I);
|
|
312
|
+
if (g) {
|
|
313
|
+
var s = g[2] - 1 || 0, v = (g[7] || "0").substring(0, 3);
|
|
314
|
+
return p ? new Date(Date.UTC(g[1], s, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, v)) : new Date(g[1], s, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, v);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return new Date(i);
|
|
318
|
+
})(n), this.init();
|
|
319
|
+
}, l.init = function() {
|
|
320
|
+
var n = this.$d;
|
|
321
|
+
this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
|
|
322
|
+
}, l.$utils = function() {
|
|
323
|
+
return C;
|
|
324
|
+
}, l.isValid = function() {
|
|
325
|
+
return this.$d.toString() !== _;
|
|
326
|
+
}, l.isSame = function(n, c) {
|
|
327
|
+
var i = L(n);
|
|
328
|
+
return this.startOf(c) <= i && i <= this.endOf(c);
|
|
329
|
+
}, l.isAfter = function(n, c) {
|
|
330
|
+
return L(n) < this.startOf(c);
|
|
331
|
+
}, l.isBefore = function(n, c) {
|
|
332
|
+
return this.endOf(c) < L(n);
|
|
333
|
+
}, l.$g = function(n, c, i) {
|
|
334
|
+
return C.u(n) ? this[c] : this.set(i, n);
|
|
335
|
+
}, l.unix = function() {
|
|
336
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
337
|
+
}, l.valueOf = function() {
|
|
338
|
+
return this.$d.getTime();
|
|
339
|
+
}, l.startOf = function(n, c) {
|
|
340
|
+
var i = this, p = !!C.u(c) || c, g = C.p(n), s = function(Z, W) {
|
|
341
|
+
var G = C.w(i.$u ? Date.UTC(i.$y, W, Z) : new Date(i.$y, W, Z), i);
|
|
342
|
+
return p ? G : G.endOf(f);
|
|
343
|
+
}, v = function(Z, W) {
|
|
344
|
+
return C.w(i.toDate()[Z].apply(i.toDate("s"), (p ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(W)), i);
|
|
345
|
+
}, k = this.$W, b = this.$M, F = this.$D, V = "set" + (this.$u ? "UTC" : "");
|
|
346
|
+
switch (g) {
|
|
347
|
+
case $:
|
|
348
|
+
return p ? s(1, 0) : s(31, 11);
|
|
349
|
+
case T:
|
|
350
|
+
return p ? s(1, b) : s(0, b + 1);
|
|
351
|
+
case d:
|
|
352
|
+
var Y = this.$locale().weekStart || 0, E = (k < Y ? k + 7 : k) - Y;
|
|
353
|
+
return s(p ? F - E : F + (6 - E), b);
|
|
354
|
+
case f:
|
|
355
|
+
case m:
|
|
356
|
+
return v(V + "Hours", 0);
|
|
357
|
+
case h:
|
|
358
|
+
return v(V + "Minutes", 1);
|
|
359
|
+
case M:
|
|
360
|
+
return v(V + "Seconds", 2);
|
|
361
|
+
case a:
|
|
362
|
+
return v(V + "Milliseconds", 3);
|
|
363
|
+
default:
|
|
364
|
+
return this.clone();
|
|
365
|
+
}
|
|
366
|
+
}, l.endOf = function(n) {
|
|
367
|
+
return this.startOf(n, !1);
|
|
368
|
+
}, l.$set = function(n, c) {
|
|
369
|
+
var i, p = C.p(n), g = "set" + (this.$u ? "UTC" : ""), s = (i = {}, i[f] = g + "Date", i[m] = g + "Date", i[T] = g + "Month", i[$] = g + "FullYear", i[h] = g + "Hours", i[M] = g + "Minutes", i[a] = g + "Seconds", i[S] = g + "Milliseconds", i)[p], v = p === f ? this.$D + (c - this.$W) : c;
|
|
370
|
+
if (p === T || p === $) {
|
|
371
|
+
var k = this.clone().set(m, 1);
|
|
372
|
+
k.$d[s](v), k.init(), this.$d = k.set(m, Math.min(this.$D, k.daysInMonth())).$d;
|
|
373
|
+
} else s && this.$d[s](v);
|
|
374
|
+
return this.init(), this;
|
|
375
|
+
}, l.set = function(n, c) {
|
|
376
|
+
return this.clone().$set(n, c);
|
|
377
|
+
}, l.get = function(n) {
|
|
378
|
+
return this[C.p(n)]();
|
|
379
|
+
}, l.add = function(n, c) {
|
|
380
|
+
var i, p = this;
|
|
381
|
+
n = Number(n);
|
|
382
|
+
var g = C.p(c), s = function(b) {
|
|
383
|
+
var F = L(p);
|
|
384
|
+
return C.w(F.date(F.date() + Math.round(b * n)), p);
|
|
385
|
+
};
|
|
386
|
+
if (g === T) return this.set(T, this.$M + n);
|
|
387
|
+
if (g === $) return this.set($, this.$y + n);
|
|
388
|
+
if (g === f) return s(1);
|
|
389
|
+
if (g === d) return s(7);
|
|
390
|
+
var v = (i = {}, i[M] = y, i[h] = x, i[a] = t, i)[g] || 1, k = this.$d.getTime() + n * v;
|
|
391
|
+
return C.w(k, this);
|
|
392
|
+
}, l.subtract = function(n, c) {
|
|
393
|
+
return this.add(-1 * n, c);
|
|
394
|
+
}, l.format = function(n) {
|
|
395
|
+
var c = this, i = this.$locale();
|
|
396
|
+
if (!this.isValid()) return i.invalidDate || _;
|
|
397
|
+
var p = n || "YYYY-MM-DDTHH:mm:ssZ", g = C.z(this), s = this.$H, v = this.$m, k = this.$M, b = i.weekdays, F = i.months, V = i.meridiem, Y = function(W, G, ne, le) {
|
|
398
|
+
return W && (W[G] || W(c, p)) || ne[G].slice(0, le);
|
|
399
|
+
}, E = function(W) {
|
|
400
|
+
return C.s(s % 12 || 12, W, "0");
|
|
401
|
+
}, Z = V || function(W, G, ne) {
|
|
402
|
+
var le = W < 12 ? "AM" : "PM";
|
|
403
|
+
return ne ? le.toLowerCase() : le;
|
|
404
|
+
};
|
|
405
|
+
return p.replace(O, (function(W, G) {
|
|
406
|
+
return G || (function(ne) {
|
|
407
|
+
switch (ne) {
|
|
408
|
+
case "YY":
|
|
409
|
+
return String(c.$y).slice(-2);
|
|
410
|
+
case "YYYY":
|
|
411
|
+
return C.s(c.$y, 4, "0");
|
|
412
|
+
case "M":
|
|
413
|
+
return k + 1;
|
|
414
|
+
case "MM":
|
|
415
|
+
return C.s(k + 1, 2, "0");
|
|
416
|
+
case "MMM":
|
|
417
|
+
return Y(i.monthsShort, k, F, 3);
|
|
418
|
+
case "MMMM":
|
|
419
|
+
return Y(F, k);
|
|
420
|
+
case "D":
|
|
421
|
+
return c.$D;
|
|
422
|
+
case "DD":
|
|
423
|
+
return C.s(c.$D, 2, "0");
|
|
424
|
+
case "d":
|
|
425
|
+
return String(c.$W);
|
|
426
|
+
case "dd":
|
|
427
|
+
return Y(i.weekdaysMin, c.$W, b, 2);
|
|
428
|
+
case "ddd":
|
|
429
|
+
return Y(i.weekdaysShort, c.$W, b, 3);
|
|
430
|
+
case "dddd":
|
|
431
|
+
return b[c.$W];
|
|
432
|
+
case "H":
|
|
433
|
+
return String(s);
|
|
434
|
+
case "HH":
|
|
435
|
+
return C.s(s, 2, "0");
|
|
436
|
+
case "h":
|
|
437
|
+
return E(1);
|
|
438
|
+
case "hh":
|
|
439
|
+
return E(2);
|
|
440
|
+
case "a":
|
|
441
|
+
return Z(s, v, !0);
|
|
442
|
+
case "A":
|
|
443
|
+
return Z(s, v, !1);
|
|
444
|
+
case "m":
|
|
445
|
+
return String(v);
|
|
446
|
+
case "mm":
|
|
447
|
+
return C.s(v, 2, "0");
|
|
448
|
+
case "s":
|
|
449
|
+
return String(c.$s);
|
|
450
|
+
case "ss":
|
|
451
|
+
return C.s(c.$s, 2, "0");
|
|
452
|
+
case "SSS":
|
|
453
|
+
return C.s(c.$ms, 3, "0");
|
|
454
|
+
case "Z":
|
|
455
|
+
return g;
|
|
456
|
+
}
|
|
457
|
+
return null;
|
|
458
|
+
})(W) || g.replace(":", "");
|
|
459
|
+
}));
|
|
460
|
+
}, l.utcOffset = function() {
|
|
461
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
462
|
+
}, l.diff = function(n, c, i) {
|
|
463
|
+
var p, g = this, s = C.p(c), v = L(n), k = (v.utcOffset() - this.utcOffset()) * y, b = this - v, F = function() {
|
|
464
|
+
return C.m(g, v);
|
|
465
|
+
};
|
|
466
|
+
switch (s) {
|
|
467
|
+
case $:
|
|
468
|
+
p = F() / 12;
|
|
469
|
+
break;
|
|
470
|
+
case T:
|
|
471
|
+
p = F();
|
|
472
|
+
break;
|
|
473
|
+
case w:
|
|
474
|
+
p = F() / 3;
|
|
475
|
+
break;
|
|
476
|
+
case d:
|
|
477
|
+
p = (b - k) / 6048e5;
|
|
478
|
+
break;
|
|
479
|
+
case f:
|
|
480
|
+
p = (b - k) / 864e5;
|
|
481
|
+
break;
|
|
482
|
+
case h:
|
|
483
|
+
p = b / x;
|
|
484
|
+
break;
|
|
485
|
+
case M:
|
|
486
|
+
p = b / y;
|
|
487
|
+
break;
|
|
488
|
+
case a:
|
|
489
|
+
p = b / t;
|
|
490
|
+
break;
|
|
491
|
+
default:
|
|
492
|
+
p = b;
|
|
493
|
+
}
|
|
494
|
+
return i ? p : C.a(p);
|
|
495
|
+
}, l.daysInMonth = function() {
|
|
496
|
+
return this.endOf(T).$D;
|
|
497
|
+
}, l.$locale = function() {
|
|
498
|
+
return j[this.$L];
|
|
499
|
+
}, l.locale = function(n, c) {
|
|
500
|
+
if (!n) return this.$L;
|
|
501
|
+
var i = this.clone(), p = P(n, c, !0);
|
|
502
|
+
return p && (i.$L = p), i;
|
|
503
|
+
}, l.clone = function() {
|
|
504
|
+
return C.w(this.$d, this);
|
|
505
|
+
}, l.toDate = function() {
|
|
506
|
+
return new Date(this.valueOf());
|
|
507
|
+
}, l.toJSON = function() {
|
|
508
|
+
return this.isValid() ? this.toISOString() : null;
|
|
509
|
+
}, l.toISOString = function() {
|
|
510
|
+
return this.$d.toISOString();
|
|
511
|
+
}, l.toString = function() {
|
|
512
|
+
return this.$d.toUTCString();
|
|
513
|
+
}, u;
|
|
514
|
+
})(), re = B.prototype;
|
|
515
|
+
return L.prototype = re, [["$ms", S], ["$s", a], ["$m", M], ["$H", h], ["$W", f], ["$M", T], ["$y", $], ["$D", m]].forEach((function(u) {
|
|
516
|
+
re[u[1]] = function(l) {
|
|
517
|
+
return this.$g(l, u[0], u[1]);
|
|
518
|
+
};
|
|
519
|
+
})), L.extend = function(u, l) {
|
|
520
|
+
return u.$i || (u(l, B, L), u.$i = !0), L;
|
|
521
|
+
}, L.locale = P, L.isDayjs = ee, L.unix = function(u) {
|
|
522
|
+
return L(1e3 * u);
|
|
523
|
+
}, L.en = j[H], L.Ls = j, L.p = {}, L;
|
|
524
|
+
}));
|
|
525
|
+
})(he)), he.exports;
|
|
526
|
+
}
|
|
527
|
+
var gt = pt();
|
|
528
|
+
const yt = /* @__PURE__ */ ht(gt), vt = (o, r) => yt(`${o}T${r}`).format(), $t = ({ path: o, label: r, required: t, errors: y, description: x, children: S }) => {
|
|
529
|
+
const a = y.length === 0;
|
|
530
|
+
return /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ z(R, { direction: "column", gap: "1", children: [
|
|
531
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", weight: "bold", htmlFor: o, children: [
|
|
532
|
+
r,
|
|
214
533
|
" ",
|
|
215
|
-
|
|
534
|
+
t && /* @__PURE__ */ e(D, { color: "red", children: "*" })
|
|
216
535
|
] }),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
type: "date",
|
|
221
|
-
value: t || "",
|
|
222
|
-
onChange: (g) => n(r, g.target.value),
|
|
223
|
-
disabled: !h,
|
|
224
|
-
color: s ? void 0 : "red",
|
|
225
|
-
id: r
|
|
226
|
-
}
|
|
227
|
-
),
|
|
228
|
-
!s && i !== "is a required property" && /* @__PURE__ */ e(c, { color: "red", size: "1", children: i }),
|
|
229
|
-
l.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", children: l.description })
|
|
536
|
+
S,
|
|
537
|
+
!a && /* @__PURE__ */ e(D, { color: "red", size: "1", children: X(y, r) }),
|
|
538
|
+
x && /* @__PURE__ */ e(D, { size: "1", color: "gray", children: x })
|
|
230
539
|
] }) });
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
540
|
+
}, bt = ({
|
|
541
|
+
data: o,
|
|
542
|
+
handleChange: r,
|
|
543
|
+
path: t,
|
|
544
|
+
label: y,
|
|
545
|
+
required: x,
|
|
546
|
+
errors: S,
|
|
547
|
+
schema: a,
|
|
548
|
+
enabled: M,
|
|
549
|
+
visible: h = !0
|
|
550
|
+
}) => {
|
|
551
|
+
if (q(() => {
|
|
552
|
+
h === !1 && r(t, void 0);
|
|
553
|
+
}, [h, t, r]), h === !1)
|
|
554
|
+
return null;
|
|
555
|
+
const f = S.length === 0, d = typeof o == "string" ? o : "", T = (O) => /* @__PURE__ */ e($t, { path: t, label: y, required: x, errors: S, description: a.description, children: O });
|
|
556
|
+
if (a.format === "time")
|
|
557
|
+
return T(
|
|
558
|
+
/* @__PURE__ */ e(
|
|
559
|
+
oe.Root,
|
|
560
|
+
{
|
|
561
|
+
type: "time",
|
|
562
|
+
value: d,
|
|
563
|
+
onChange: (O) => r(t, O.target.value),
|
|
564
|
+
disabled: !M,
|
|
565
|
+
color: f ? void 0 : "red",
|
|
566
|
+
id: t
|
|
567
|
+
}
|
|
568
|
+
)
|
|
569
|
+
);
|
|
570
|
+
const w = a.format === "date-time", [$ = "", m = ""] = d.split("T"), _ = m.slice(0, 5), I = (O, A) => {
|
|
571
|
+
if (!O) {
|
|
572
|
+
r(t, void 0);
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
r(t, w ? vt(O, A || "00:00") : O);
|
|
576
|
+
};
|
|
577
|
+
return T(
|
|
578
|
+
/* @__PURE__ */ z(R, { gap: "2", align: "center", children: [
|
|
579
|
+
/* @__PURE__ */ e(
|
|
580
|
+
oe.Root,
|
|
581
|
+
{
|
|
582
|
+
type: "date",
|
|
583
|
+
value: $,
|
|
584
|
+
disabled: !M,
|
|
585
|
+
color: f ? void 0 : "red",
|
|
586
|
+
onChange: (O) => I(O.target.value, _),
|
|
587
|
+
id: t,
|
|
588
|
+
style: { flex: 1 }
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
w && /* @__PURE__ */ e(
|
|
592
|
+
oe.Root,
|
|
593
|
+
{
|
|
594
|
+
type: "time",
|
|
595
|
+
value: _,
|
|
596
|
+
disabled: !M || !$,
|
|
597
|
+
color: f ? void 0 : "red",
|
|
598
|
+
onChange: (O) => I($, O.target.value),
|
|
599
|
+
style: { flex: 1 }
|
|
600
|
+
}
|
|
601
|
+
)
|
|
602
|
+
] })
|
|
603
|
+
);
|
|
604
|
+
}, wt = N(2, me(Re, Ae, Ue)), Ct = Q(bt), St = ({
|
|
605
|
+
uischema: o,
|
|
606
|
+
schema: r,
|
|
607
|
+
path: t,
|
|
608
|
+
renderers: y,
|
|
609
|
+
cells: x,
|
|
610
|
+
enabled: S,
|
|
611
|
+
visible: a = !0
|
|
612
|
+
}) => {
|
|
613
|
+
const h = o.elements;
|
|
614
|
+
return a === !1 ? null : /* @__PURE__ */ e(R, { direction: "column", gap: "4", children: h.map((f, d) => /* @__PURE__ */ e(
|
|
615
|
+
se,
|
|
235
616
|
{
|
|
236
|
-
uischema:
|
|
237
|
-
schema:
|
|
238
|
-
path:
|
|
239
|
-
renderers:
|
|
240
|
-
cells:
|
|
241
|
-
enabled:
|
|
617
|
+
uischema: f,
|
|
618
|
+
schema: r,
|
|
619
|
+
path: t,
|
|
620
|
+
renderers: y,
|
|
621
|
+
cells: x,
|
|
622
|
+
enabled: S
|
|
242
623
|
},
|
|
243
|
-
`${
|
|
624
|
+
`${t}-${d}`
|
|
244
625
|
)) });
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
626
|
+
}, Dt = N(1, ie("VerticalLayout")), Mt = ({
|
|
627
|
+
uischema: o,
|
|
628
|
+
schema: r,
|
|
629
|
+
path: t,
|
|
630
|
+
renderers: y,
|
|
631
|
+
cells: x,
|
|
632
|
+
enabled: S,
|
|
633
|
+
visible: a = !0
|
|
634
|
+
}) => {
|
|
635
|
+
const h = o.elements;
|
|
636
|
+
return a === !1 ? null : /* @__PURE__ */ e(R, { direction: "row", gap: "4", children: h.map((f, d) => /* @__PURE__ */ e(U, { style: { flex: 1 }, children: /* @__PURE__ */ e(
|
|
637
|
+
se,
|
|
249
638
|
{
|
|
250
|
-
uischema:
|
|
251
|
-
schema:
|
|
252
|
-
path:
|
|
253
|
-
renderers:
|
|
254
|
-
cells:
|
|
255
|
-
enabled:
|
|
639
|
+
uischema: f,
|
|
640
|
+
schema: r,
|
|
641
|
+
path: t,
|
|
642
|
+
renderers: y,
|
|
643
|
+
cells: x,
|
|
644
|
+
enabled: S
|
|
256
645
|
}
|
|
257
|
-
) }, `${
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
646
|
+
) }, `${t}-${d}`)) });
|
|
647
|
+
}, xt = N(1, ie("HorizontalLayout")), zt = ({
|
|
648
|
+
uischema: o,
|
|
649
|
+
schema: r,
|
|
650
|
+
path: t,
|
|
651
|
+
renderers: y,
|
|
652
|
+
cells: x,
|
|
653
|
+
enabled: S,
|
|
654
|
+
visible: a = !0
|
|
655
|
+
}) => {
|
|
656
|
+
const M = o, h = M.elements;
|
|
657
|
+
return a === !1 ? null : /* @__PURE__ */ z(U, { mb: "6", children: [
|
|
658
|
+
M.label && /* @__PURE__ */ e(Se, { size: "3", mb: "3", className: "text-gray-500 uppercase tracking-wide font-semibold", children: M.label }),
|
|
659
|
+
/* @__PURE__ */ e(R, { direction: "column", gap: "4", children: h.map((f, d) => /* @__PURE__ */ e(
|
|
660
|
+
se,
|
|
264
661
|
{
|
|
265
|
-
uischema:
|
|
266
|
-
schema:
|
|
267
|
-
path:
|
|
268
|
-
renderers:
|
|
269
|
-
cells:
|
|
270
|
-
enabled:
|
|
662
|
+
uischema: f,
|
|
663
|
+
schema: r,
|
|
664
|
+
path: t,
|
|
665
|
+
renderers: y,
|
|
666
|
+
cells: x,
|
|
667
|
+
enabled: S
|
|
271
668
|
},
|
|
272
|
-
`${
|
|
669
|
+
`${t}-${d}`
|
|
273
670
|
)) })
|
|
274
671
|
] });
|
|
275
|
-
},
|
|
276
|
-
uischema:
|
|
277
|
-
schema:
|
|
278
|
-
path:
|
|
279
|
-
renderers:
|
|
280
|
-
cells:
|
|
281
|
-
enabled:
|
|
672
|
+
}, Tt = N(1, ie("Group")), kt = ({
|
|
673
|
+
uischema: o,
|
|
674
|
+
schema: r,
|
|
675
|
+
path: t,
|
|
676
|
+
renderers: y,
|
|
677
|
+
cells: x,
|
|
678
|
+
enabled: S,
|
|
679
|
+
visible: a = !0
|
|
282
680
|
}) => {
|
|
283
|
-
var
|
|
284
|
-
const h =
|
|
285
|
-
if (!h.length) return null;
|
|
286
|
-
const
|
|
287
|
-
return /* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */ e(
|
|
289
|
-
/* @__PURE__ */ e(
|
|
290
|
-
|
|
681
|
+
var w;
|
|
682
|
+
const h = o.elements.filter(($) => $.type === "Category"), [f, d] = fe(((w = h[0]) == null ? void 0 : w.label) || "");
|
|
683
|
+
if (a === !1 || !h.length) return null;
|
|
684
|
+
const T = h.find(($) => $.label === f) ? f : h[0].label;
|
|
685
|
+
return /* @__PURE__ */ z(ae.Root, { value: T, onValueChange: d, children: [
|
|
686
|
+
/* @__PURE__ */ e(ae.List, { children: h.map(($, m) => /* @__PURE__ */ e(ae.Trigger, { value: $.label, children: $.label }, `${t}-${m}`)) }),
|
|
687
|
+
/* @__PURE__ */ e(U, { pt: "3", children: h.map(($, m) => /* @__PURE__ */ e(ae.Content, { value: $.label, children: /* @__PURE__ */ e(R, { direction: "column", gap: "4", children: $.elements.map((_, I) => /* @__PURE__ */ e(
|
|
688
|
+
se,
|
|
291
689
|
{
|
|
292
|
-
uischema:
|
|
293
|
-
schema:
|
|
294
|
-
path:
|
|
295
|
-
renderers:
|
|
296
|
-
cells:
|
|
297
|
-
enabled:
|
|
690
|
+
uischema: _,
|
|
691
|
+
schema: r,
|
|
692
|
+
path: t,
|
|
693
|
+
renderers: y,
|
|
694
|
+
cells: x,
|
|
695
|
+
enabled: S
|
|
298
696
|
},
|
|
299
|
-
`${
|
|
300
|
-
)) }) }, `${
|
|
697
|
+
`${t}-${m}-${I}`
|
|
698
|
+
)) }) }, `${t}-${m}`)) })
|
|
301
699
|
] });
|
|
302
|
-
},
|
|
303
|
-
function
|
|
304
|
-
return
|
|
700
|
+
}, Ot = N(1, ie("Categorization"));
|
|
701
|
+
function Lt(o) {
|
|
702
|
+
return o ? Array.isArray(o) ? o : [o] : [];
|
|
305
703
|
}
|
|
306
|
-
function
|
|
307
|
-
return
|
|
704
|
+
function ue(o) {
|
|
705
|
+
return o >= 1024 * 1024 ? `${(o / (1024 * 1024)).toFixed(0)} MB` : o >= 1024 ? `${(o / 1024).toFixed(0)} KB` : `${o} B`;
|
|
308
706
|
}
|
|
309
|
-
function
|
|
310
|
-
return
|
|
311
|
-
if (
|
|
312
|
-
return
|
|
313
|
-
if (
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
return
|
|
707
|
+
function de(o) {
|
|
708
|
+
return o.split(",").map((r) => {
|
|
709
|
+
if (r = r.trim(), r.endsWith("/*"))
|
|
710
|
+
return r.split("/")[0].toUpperCase() + "S";
|
|
711
|
+
if (r.startsWith("."))
|
|
712
|
+
return r.slice(1).toUpperCase();
|
|
713
|
+
const t = r.split("/")[1];
|
|
714
|
+
return t ? t.toUpperCase() : r;
|
|
317
715
|
}).join(", ");
|
|
318
716
|
}
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
717
|
+
const Ft = ({
|
|
718
|
+
data: o,
|
|
719
|
+
handleChange: r,
|
|
720
|
+
path: t,
|
|
721
|
+
label: y,
|
|
722
|
+
required: x,
|
|
723
|
+
uischema: S,
|
|
724
|
+
schema: a,
|
|
725
|
+
enabled: M,
|
|
726
|
+
errors: h,
|
|
727
|
+
visible: f = !0
|
|
728
|
+
}) => {
|
|
729
|
+
const d = Ze();
|
|
730
|
+
if (q(() => {
|
|
731
|
+
f === !1 && r(t, null);
|
|
732
|
+
}, [f, t, r]), f === !1)
|
|
733
|
+
return null;
|
|
734
|
+
const T = !h || h.length === 0, w = (a == null ? void 0 : a["x-file"]) ?? {}, $ = (S == null ? void 0 : S.options) ?? {}, m = w.maxFiles ?? $.maxFiles ?? 1, _ = w.maxSize ?? $.maxSize ?? 5 * 1024 * 1024, I = w.accept ?? $.accept ?? "image/*,application/pdf", O = m > 1, A = M !== !1, [J, K] = fe(!1), [H, j] = fe(null), [te, ee] = fe({}), P = ye(/* @__PURE__ */ new Set()), L = ye(null), C = Lt(o), B = C.length >= m;
|
|
735
|
+
q(() => () => {
|
|
736
|
+
P.current.forEach((s) => URL.revokeObjectURL(s)), P.current.clear();
|
|
323
737
|
}, []);
|
|
324
|
-
const
|
|
325
|
-
async (
|
|
326
|
-
if (
|
|
327
|
-
|
|
738
|
+
const re = Te(
|
|
739
|
+
async (s) => {
|
|
740
|
+
if (j(null), C.length >= m) {
|
|
741
|
+
j(`Maximum ${m} file${m > 1 ? "s" : ""} allowed.`);
|
|
328
742
|
return;
|
|
329
743
|
}
|
|
330
|
-
if (
|
|
331
|
-
|
|
744
|
+
if (s.size > _) {
|
|
745
|
+
j(`File exceeds the ${ue(_)} limit.`);
|
|
332
746
|
return;
|
|
333
747
|
}
|
|
334
|
-
if (!
|
|
335
|
-
|
|
748
|
+
if (!I.split(",").map((b) => b.trim()).some((b) => b === "*" || b === "*/*" ? !0 : b.endsWith("/*") ? s.type.startsWith(b.slice(0, -1)) : b.startsWith(".") ? s.name.toLowerCase().endsWith(b.toLowerCase()) : s.type === b)) {
|
|
749
|
+
j(`Invalid type. Accepted: ${de(I)}`);
|
|
336
750
|
return;
|
|
337
751
|
}
|
|
338
|
-
if (!(
|
|
339
|
-
|
|
752
|
+
if (!(d != null && d.onUpload)) {
|
|
753
|
+
j("Upload service not configured.");
|
|
340
754
|
return;
|
|
341
755
|
}
|
|
342
756
|
try {
|
|
343
|
-
const b = await
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
|
|
757
|
+
const b = await d.onUpload(s), F = URL.createObjectURL(s);
|
|
758
|
+
P.current.add(F);
|
|
759
|
+
const V = { key: b.key, name: b.name ?? s.name, blobUrl: F };
|
|
760
|
+
ee((E) => ({ ...E, [b.key]: V }));
|
|
761
|
+
const Y = [...C, b.key];
|
|
762
|
+
r(t, O ? Y : Y[0]);
|
|
349
763
|
} catch {
|
|
350
|
-
|
|
764
|
+
j("Upload failed. Please try again."), L.current && (L.current.value = "");
|
|
351
765
|
}
|
|
352
766
|
},
|
|
353
|
-
[
|
|
354
|
-
),
|
|
355
|
-
|
|
356
|
-
},
|
|
767
|
+
[C, m, _, I, d, t, r, O]
|
|
768
|
+
), u = (s) => {
|
|
769
|
+
s.preventDefault(), s.stopPropagation(), !(!A || B) && K(s.type === "dragenter" || s.type === "dragover");
|
|
770
|
+
}, l = (s) => {
|
|
357
771
|
var v;
|
|
358
|
-
|
|
359
|
-
},
|
|
772
|
+
s.preventDefault(), s.stopPropagation(), K(!1), !(!A || B) && (v = s.dataTransfer.files) != null && v[0] && re(s.dataTransfer.files[0]);
|
|
773
|
+
}, n = (s) => {
|
|
360
774
|
var v;
|
|
361
|
-
(v =
|
|
362
|
-
},
|
|
363
|
-
if (!
|
|
364
|
-
|
|
365
|
-
var
|
|
366
|
-
const b = { ...
|
|
367
|
-
return F && (URL.revokeObjectURL(F),
|
|
775
|
+
(v = s.target.files) != null && v[0] && (re(s.target.files[0]), s.target.value = "");
|
|
776
|
+
}, c = (s) => {
|
|
777
|
+
if (!A) return;
|
|
778
|
+
ee((k) => {
|
|
779
|
+
var V;
|
|
780
|
+
const b = { ...k }, F = (V = b[s]) == null ? void 0 : V.blobUrl;
|
|
781
|
+
return F && (URL.revokeObjectURL(F), P.current.delete(F)), delete b[s], b;
|
|
368
782
|
});
|
|
369
|
-
const v =
|
|
370
|
-
|
|
371
|
-
},
|
|
372
|
-
var F,
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
if (
|
|
376
|
-
(
|
|
783
|
+
const v = C.filter((k) => k !== s);
|
|
784
|
+
r(t, O ? v.length > 0 ? v : null : v[0] ?? null);
|
|
785
|
+
}, i = async (s, v) => {
|
|
786
|
+
var F, V, Y;
|
|
787
|
+
s.preventDefault();
|
|
788
|
+
const k = (F = te[v]) == null ? void 0 : F.blobUrl;
|
|
789
|
+
if (k) {
|
|
790
|
+
(V = window.open(k, "_blank", "noopener,noreferrer")) == null || V.focus();
|
|
377
791
|
return;
|
|
378
792
|
}
|
|
379
793
|
const b = window.open("", "_blank");
|
|
380
794
|
if (b)
|
|
381
795
|
try {
|
|
382
|
-
const
|
|
383
|
-
|
|
796
|
+
const E = await ((Y = d == null ? void 0 : d.getDownloadUrl) == null ? void 0 : Y.call(d, v));
|
|
797
|
+
E != null && E.url ? b.location.href = E.url : b.close();
|
|
384
798
|
} catch {
|
|
385
799
|
b.close();
|
|
386
800
|
}
|
|
387
801
|
};
|
|
388
|
-
if (!
|
|
389
|
-
const
|
|
390
|
-
return /* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
|
|
394
|
-
|
|
802
|
+
if (!A && C.length === 0) return null;
|
|
803
|
+
const p = m - C.length, g = A && !B;
|
|
804
|
+
return /* @__PURE__ */ z(U, { mb: "4", children: [
|
|
805
|
+
/* @__PURE__ */ z(R, { align: "center", justify: "between", mb: "2", children: [
|
|
806
|
+
/* @__PURE__ */ z(D, { as: "label", size: "2", weight: "bold", children: [
|
|
807
|
+
y,
|
|
808
|
+
x && /* @__PURE__ */ e(D, { color: "red", children: " *" })
|
|
395
809
|
] }),
|
|
396
|
-
/* @__PURE__ */ e(
|
|
810
|
+
/* @__PURE__ */ e(D, { size: "1", color: "gray", children: O ? `Up to ${m} files · ${ue(_)} each · ${de(I)}` : `${ue(_)} · ${de(I)}` })
|
|
397
811
|
] }),
|
|
398
|
-
|
|
812
|
+
C.map((s) => {
|
|
399
813
|
var v;
|
|
400
|
-
return /* @__PURE__ */ e(
|
|
814
|
+
return /* @__PURE__ */ e(De, { size: "2", variant: "surface", mb: "2", children: /* @__PURE__ */ z(R, { align: "center", gap: "3", children: [
|
|
401
815
|
/* @__PURE__ */ e(
|
|
402
|
-
|
|
816
|
+
U,
|
|
403
817
|
{
|
|
404
818
|
style: {
|
|
405
819
|
background: "var(--blue-3)",
|
|
@@ -408,11 +822,11 @@ const pr = ({ data: t, handleChange: n, path: r, label: f, required: m, uischema
|
|
|
408
822
|
color: "var(--blue-9)",
|
|
409
823
|
flexShrink: 0
|
|
410
824
|
},
|
|
411
|
-
children: /* @__PURE__ */ e(
|
|
825
|
+
children: /* @__PURE__ */ e(He, { width: "20", height: "20" })
|
|
412
826
|
}
|
|
413
827
|
),
|
|
414
|
-
/* @__PURE__ */ e(
|
|
415
|
-
|
|
828
|
+
/* @__PURE__ */ e(U, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ e(
|
|
829
|
+
D,
|
|
416
830
|
{
|
|
417
831
|
size: "2",
|
|
418
832
|
weight: "bold",
|
|
@@ -422,202 +836,204 @@ const pr = ({ data: t, handleChange: n, path: r, label: f, required: m, uischema
|
|
|
422
836
|
textOverflow: "ellipsis",
|
|
423
837
|
whiteSpace: "nowrap"
|
|
424
838
|
},
|
|
425
|
-
children: ((v =
|
|
839
|
+
children: ((v = te[s]) == null ? void 0 : v.name) ?? "Uploaded File"
|
|
426
840
|
}
|
|
427
841
|
) }),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
/* @__PURE__ */ e(
|
|
430
|
-
/* @__PURE__ */ e(
|
|
431
|
-
|
|
842
|
+
/* @__PURE__ */ z(R, { align: "center", gap: "2", style: { flexShrink: 0 }, children: [
|
|
843
|
+
/* @__PURE__ */ e(pe, { variant: "soft", color: "blue", size: "1", onClick: (k) => i(k, s), children: "View" }),
|
|
844
|
+
/* @__PURE__ */ e(Pe, { style: { color: "var(--green-9)", width: 18, height: 18 } }),
|
|
845
|
+
A && /* @__PURE__ */ e(Ee, { variant: "ghost", color: "gray", onClick: () => c(s), children: /* @__PURE__ */ e(Be, {}) })
|
|
432
846
|
] })
|
|
433
|
-
] }) },
|
|
847
|
+
] }) }, s);
|
|
434
848
|
}),
|
|
435
|
-
|
|
849
|
+
g && /* @__PURE__ */ z(
|
|
436
850
|
"div",
|
|
437
851
|
{
|
|
438
852
|
role: "button",
|
|
439
853
|
tabIndex: 0,
|
|
440
854
|
onClick: () => {
|
|
441
|
-
var
|
|
442
|
-
return (
|
|
855
|
+
var s;
|
|
856
|
+
return (s = L.current) == null ? void 0 : s.click();
|
|
443
857
|
},
|
|
444
|
-
onKeyDown: (
|
|
858
|
+
onKeyDown: (s) => {
|
|
445
859
|
var v;
|
|
446
|
-
(
|
|
860
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), (v = L.current) == null || v.click());
|
|
447
861
|
},
|
|
448
|
-
onDragEnter:
|
|
449
|
-
onDragLeave:
|
|
450
|
-
onDragOver:
|
|
451
|
-
onDrop:
|
|
862
|
+
onDragEnter: u,
|
|
863
|
+
onDragLeave: u,
|
|
864
|
+
onDragOver: u,
|
|
865
|
+
onDrop: l,
|
|
452
866
|
style: { cursor: "pointer" },
|
|
453
867
|
className: [
|
|
454
868
|
"border-2 border-dashed rounded-lg p-6 text-center",
|
|
455
869
|
"transition-all duration-200 ease-in-out",
|
|
456
|
-
|
|
870
|
+
J ? "border-blue-500 bg-blue-50" : H ? "border-red-300 bg-red-50" : "border-gray-300 hover:border-blue-400 hover:bg-gray-50"
|
|
457
871
|
].join(" "),
|
|
458
872
|
children: [
|
|
459
|
-
/* @__PURE__ */ e("input", { ref:
|
|
460
|
-
/* @__PURE__ */ e(
|
|
461
|
-
/* @__PURE__ */ e(
|
|
462
|
-
/* @__PURE__ */ e(
|
|
463
|
-
/* @__PURE__ */ e(
|
|
464
|
-
] }) : /* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */ e(
|
|
466
|
-
/* @__PURE__ */ e(
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
|
|
873
|
+
/* @__PURE__ */ e("input", { ref: L, type: "file", style: { display: "none" }, accept: I, onChange: n }),
|
|
874
|
+
/* @__PURE__ */ e(R, { direction: "column", align: "center", gap: "2", children: H ? /* @__PURE__ */ z(ge, { children: [
|
|
875
|
+
/* @__PURE__ */ e(Je, { style: { width: 32, height: 32, color: "var(--red-9)" } }),
|
|
876
|
+
/* @__PURE__ */ e(D, { size: "2", color: "red", weight: "medium", children: H }),
|
|
877
|
+
/* @__PURE__ */ e(D, { size: "1", color: "gray", children: "Click to try again" })
|
|
878
|
+
] }) : /* @__PURE__ */ z(ge, { children: [
|
|
879
|
+
/* @__PURE__ */ e(Ge, { style: { width: 32, height: 32, color: "var(--gray-8)" } }),
|
|
880
|
+
/* @__PURE__ */ e(D, { size: "2", weight: "medium", children: C.length > 0 ? `Add another file (${p} remaining)` : "Click to upload or drag and drop" }),
|
|
881
|
+
/* @__PURE__ */ z(D, { size: "1", color: "gray", children: [
|
|
882
|
+
ue(_),
|
|
469
883
|
" max · ",
|
|
470
|
-
|
|
884
|
+
de(I)
|
|
471
885
|
] })
|
|
472
886
|
] }) })
|
|
473
887
|
]
|
|
474
888
|
}
|
|
475
889
|
),
|
|
476
|
-
|
|
890
|
+
A && B && O && /* @__PURE__ */ z(D, { size: "1", color: "gray", mt: "1", style: { display: "block", textAlign: "center" }, children: [
|
|
477
891
|
"Maximum ",
|
|
478
|
-
|
|
892
|
+
m,
|
|
479
893
|
" files uploaded. Remove one to replace it."
|
|
480
|
-
] })
|
|
894
|
+
] }),
|
|
895
|
+
!T && /* @__PURE__ */ e(D, { color: "red", size: "1", mt: "2", style: { display: "block" }, children: X(h, y) })
|
|
481
896
|
] });
|
|
482
|
-
},
|
|
897
|
+
}, Rt = Q(Ft), At = N(
|
|
483
898
|
10,
|
|
484
899
|
// high rank to beat default array renderer
|
|
485
|
-
|
|
900
|
+
_e(
|
|
486
901
|
// Match both single-file (type: string) and multi-file (type: array)
|
|
487
|
-
|
|
488
|
-
if (
|
|
489
|
-
if (
|
|
490
|
-
const
|
|
491
|
-
return (
|
|
902
|
+
Ie((o) => {
|
|
903
|
+
if (o.type === "string" && o.format === "file") return !0;
|
|
904
|
+
if (o.type === "array") {
|
|
905
|
+
const r = o.items;
|
|
906
|
+
return (r == null ? void 0 : r.type) === "string" && (r == null ? void 0 : r.format) === "file";
|
|
492
907
|
}
|
|
493
908
|
return !1;
|
|
494
909
|
})
|
|
495
910
|
)
|
|
496
|
-
),
|
|
497
|
-
data:
|
|
498
|
-
path:
|
|
499
|
-
schema:
|
|
500
|
-
uischema:
|
|
501
|
-
enabled:
|
|
502
|
-
visible:
|
|
503
|
-
addItem:
|
|
504
|
-
removeItems:
|
|
505
|
-
rootSchema:
|
|
506
|
-
arraySchema:
|
|
911
|
+
), Ut = ({
|
|
912
|
+
data: o,
|
|
913
|
+
path: r,
|
|
914
|
+
schema: t,
|
|
915
|
+
uischema: y,
|
|
916
|
+
enabled: x,
|
|
917
|
+
visible: S,
|
|
918
|
+
addItem: a,
|
|
919
|
+
removeItems: M,
|
|
920
|
+
rootSchema: h,
|
|
921
|
+
arraySchema: f
|
|
507
922
|
}) => {
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
923
|
+
const d = f ? t : t.items, T = f || t;
|
|
924
|
+
if (S === !1 || !d || typeof d != "object" || Array.isArray(d))
|
|
510
925
|
return null;
|
|
511
|
-
const
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
},
|
|
515
|
-
if (
|
|
516
|
-
const
|
|
517
|
-
|
|
926
|
+
const w = d, $ = Array.isArray(o) ? o : [], m = T.title || "Array Items", _ = () => {
|
|
927
|
+
const O = je(w, h);
|
|
928
|
+
a && a(r, O)();
|
|
929
|
+
}, I = (O) => {
|
|
930
|
+
if (M) {
|
|
931
|
+
const A = M(r, [O]);
|
|
932
|
+
A && A();
|
|
518
933
|
}
|
|
519
934
|
};
|
|
520
|
-
return /* @__PURE__ */ e(
|
|
521
|
-
/* @__PURE__ */ e(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
var
|
|
525
|
-
const
|
|
526
|
-
return /* @__PURE__ */ e(
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ e(U, { mb: "6", children: /* @__PURE__ */ z(R, { direction: "column", gap: "4", children: [
|
|
936
|
+
/* @__PURE__ */ e(D, { as: "div", size: "4", weight: "bold", children: m }),
|
|
937
|
+
$.length === 0 && /* @__PURE__ */ e(U, { py: "4", px: "4", style: { backgroundColor: "var(--gray-3)", borderRadius: "var(--radius-3)" }, children: /* @__PURE__ */ e(D, { size: "2", color: "gray", children: "No items have been added yet." }) }),
|
|
938
|
+
$.map((O, A) => {
|
|
939
|
+
var K;
|
|
940
|
+
const J = `${r}.${A}`;
|
|
941
|
+
return /* @__PURE__ */ e(De, { size: "3", variant: "surface", children: /* @__PURE__ */ z(R, { direction: "column", gap: "4", children: [
|
|
942
|
+
/* @__PURE__ */ z(R, { justify: "between", align: "center", children: [
|
|
943
|
+
/* @__PURE__ */ z(D, { size: "3", weight: "bold", children: [
|
|
529
944
|
"Item ",
|
|
530
|
-
|
|
945
|
+
A + 1
|
|
531
946
|
] }),
|
|
532
|
-
|
|
533
|
-
|
|
947
|
+
x && /* @__PURE__ */ z(
|
|
948
|
+
pe,
|
|
534
949
|
{
|
|
535
950
|
type: "button",
|
|
536
951
|
color: "red",
|
|
537
952
|
variant: "soft",
|
|
538
|
-
onClick: () =>
|
|
953
|
+
onClick: () => I(A),
|
|
539
954
|
title: "Remove item",
|
|
540
955
|
children: [
|
|
541
|
-
/* @__PURE__ */ e(
|
|
956
|
+
/* @__PURE__ */ e(qe, {}),
|
|
542
957
|
"Remove"
|
|
543
958
|
]
|
|
544
959
|
}
|
|
545
960
|
)
|
|
546
961
|
] }),
|
|
547
|
-
/* @__PURE__ */ e(
|
|
548
|
-
|
|
962
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
963
|
+
se,
|
|
549
964
|
{
|
|
550
|
-
schema:
|
|
551
|
-
uischema: ((
|
|
965
|
+
schema: w,
|
|
966
|
+
uischema: ((K = y.options) == null ? void 0 : K.detail) || (w.type === "object" || w.properties ? {
|
|
552
967
|
type: "VerticalLayout",
|
|
553
|
-
elements: Object.keys(
|
|
968
|
+
elements: Object.keys(w.properties || {}).map((H) => ({
|
|
554
969
|
type: "Control",
|
|
555
|
-
scope: `#/properties/${
|
|
970
|
+
scope: `#/properties/${H}`
|
|
556
971
|
}))
|
|
557
972
|
} : {
|
|
558
973
|
type: "Control",
|
|
559
974
|
scope: "#"
|
|
560
975
|
}),
|
|
561
|
-
path:
|
|
562
|
-
enabled:
|
|
976
|
+
path: J,
|
|
977
|
+
enabled: x,
|
|
563
978
|
renderers: void 0,
|
|
564
979
|
cells: void 0
|
|
565
980
|
}
|
|
566
981
|
) })
|
|
567
|
-
] }) },
|
|
982
|
+
] }) }, J);
|
|
568
983
|
}),
|
|
569
|
-
|
|
570
|
-
/* @__PURE__ */ e(
|
|
984
|
+
x && /* @__PURE__ */ e(U, { mt: "2", children: /* @__PURE__ */ z(pe, { type: "button", variant: "surface", onClick: _, children: [
|
|
985
|
+
/* @__PURE__ */ e(Ke, {}),
|
|
571
986
|
"Add Item"
|
|
572
987
|
] }) })
|
|
573
988
|
] }) });
|
|
574
|
-
},
|
|
575
|
-
const
|
|
576
|
-
return
|
|
577
|
-
},
|
|
578
|
-
{ tester:
|
|
579
|
-
{ tester:
|
|
580
|
-
{ tester:
|
|
581
|
-
{ tester:
|
|
582
|
-
{ tester:
|
|
583
|
-
{ tester:
|
|
584
|
-
{ tester:
|
|
585
|
-
{ tester:
|
|
586
|
-
{ tester:
|
|
587
|
-
{ tester:
|
|
588
|
-
{ tester:
|
|
589
|
-
{ tester:
|
|
590
|
-
{ tester:
|
|
591
|
-
{ tester:
|
|
989
|
+
}, be = Ye(Ut), _t = N(3, Ve), It = ({ uischema: o, visible: r }) => {
|
|
990
|
+
const t = o;
|
|
991
|
+
return r === !1 ? null : /* @__PURE__ */ e(U, { mb: "4", children: /* @__PURE__ */ e(Se, { size: "4", children: t.text }) });
|
|
992
|
+
}, jt = N(1, ie("Label")), Vt = N(3, We), Jt = [
|
|
993
|
+
{ tester: Xe, renderer: et },
|
|
994
|
+
{ tester: rt, renderer: nt },
|
|
995
|
+
{ tester: it, renderer: st },
|
|
996
|
+
{ tester: ct, renderer: at },
|
|
997
|
+
{ tester: dt, renderer: ft },
|
|
998
|
+
{ tester: wt, renderer: Ct },
|
|
999
|
+
{ tester: Dt, renderer: St },
|
|
1000
|
+
{ tester: xt, renderer: Mt },
|
|
1001
|
+
{ tester: Tt, renderer: zt },
|
|
1002
|
+
{ tester: Ot, renderer: kt },
|
|
1003
|
+
{ tester: At, renderer: Rt },
|
|
1004
|
+
{ tester: _t, renderer: be },
|
|
1005
|
+
{ tester: Vt, renderer: be },
|
|
1006
|
+
{ tester: jt, renderer: It }
|
|
592
1007
|
];
|
|
593
1008
|
export {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
1009
|
+
be as ArrayControl,
|
|
1010
|
+
_t as ArrayControlTester,
|
|
1011
|
+
ot as BooleanControl,
|
|
1012
|
+
it as BooleanControlTester,
|
|
1013
|
+
kt as CategorizationLayoutRenderer,
|
|
1014
|
+
Ot as CategorizationLayoutTester,
|
|
1015
|
+
bt as DateControl,
|
|
1016
|
+
wt as DateControlTester,
|
|
1017
|
+
Rt as FileControl,
|
|
1018
|
+
At as FileControlTester,
|
|
1019
|
+
zt as GroupLayoutRenderer,
|
|
1020
|
+
Tt as GroupLayoutTester,
|
|
1021
|
+
Mt as HorizontalLayoutRenderer,
|
|
1022
|
+
xt as HorizontalLayoutTester,
|
|
1023
|
+
It as LabelRenderer,
|
|
1024
|
+
jt as LabelTester,
|
|
1025
|
+
tt as NumberControl,
|
|
1026
|
+
rt as NumberControlTester,
|
|
1027
|
+
lt as RadioControl,
|
|
1028
|
+
ct as RadioControlTester,
|
|
1029
|
+
ut as SelectControl,
|
|
1030
|
+
dt as SelectControlTester,
|
|
1031
|
+
Qe as TextControl,
|
|
1032
|
+
Xe as TextControlTester,
|
|
1033
|
+
Bt as UploadProvider,
|
|
1034
|
+
St as VerticalLayoutRenderer,
|
|
1035
|
+
Dt as VerticalLayoutTester,
|
|
1036
|
+
X as getErrorMessage,
|
|
1037
|
+
Jt as radixRenderers,
|
|
1038
|
+
Ze as useUpload
|
|
623
1039
|
};
|