@factorialco/rjsf-f0 1.1.0 → 1.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/README.md +1 -1
- package/dist/rjsf-f0.cjs.js +5 -5
- package/dist/rjsf-f0.cjs.js.map +1 -1
- package/dist/rjsf-f0.es.js +68 -30
- package/dist/rjsf-f0.es.js.map +1 -1
- package/dist/src/theme.d.ts +5 -3
- package/dist/src/widgets/input-widgets.d.ts +2 -2
- package/dist/styles.css +193 -0
- package/package.json +1 -1
package/dist/rjsf-f0.es.js
CHANGED
|
@@ -8226,9 +8226,44 @@ const zi = (e) => {
|
|
|
8226
8226
|
date: "date",
|
|
8227
8227
|
"datetime-local": "datetime",
|
|
8228
8228
|
time: "time"
|
|
8229
|
-
};
|
|
8230
|
-
function
|
|
8231
|
-
const {
|
|
8229
|
+
}, Vf = /* @__PURE__ */ new Set(["password", "email", "tel", "url"]);
|
|
8230
|
+
function qf(e) {
|
|
8231
|
+
const {
|
|
8232
|
+
id: t,
|
|
8233
|
+
htmlName: n,
|
|
8234
|
+
autofocus: r,
|
|
8235
|
+
disabled: i,
|
|
8236
|
+
readonly: l,
|
|
8237
|
+
required: o,
|
|
8238
|
+
multiple: a,
|
|
8239
|
+
accept: u,
|
|
8240
|
+
onChangeOverride: s,
|
|
8241
|
+
onBlur: c,
|
|
8242
|
+
onFocus: f
|
|
8243
|
+
} = e;
|
|
8244
|
+
return /* @__PURE__ */ N(
|
|
8245
|
+
"input",
|
|
8246
|
+
{
|
|
8247
|
+
id: t,
|
|
8248
|
+
name: n || t,
|
|
8249
|
+
className: "rjsf-f0-file",
|
|
8250
|
+
type: "file",
|
|
8251
|
+
autoFocus: r,
|
|
8252
|
+
disabled: i || l,
|
|
8253
|
+
required: o,
|
|
8254
|
+
multiple: a,
|
|
8255
|
+
accept: u,
|
|
8256
|
+
onChange: s,
|
|
8257
|
+
onBlur: (m) => c(t, m.target.value),
|
|
8258
|
+
onFocus: (m) => f(t, m.target.value)
|
|
8259
|
+
}
|
|
8260
|
+
);
|
|
8261
|
+
}
|
|
8262
|
+
function Wf(e) {
|
|
8263
|
+
const { type: t, schema: n, options: r } = e, i = t || (n.type === "number" || n.type === "integer" ? "number" : "text");
|
|
8264
|
+
if (i === "file")
|
|
8265
|
+
return /* @__PURE__ */ N(qf, { ...e });
|
|
8266
|
+
const l = Hf[i] ?? "text";
|
|
8232
8267
|
return l === "date" ? /* @__PURE__ */ N(
|
|
8233
8268
|
ht,
|
|
8234
8269
|
{
|
|
@@ -8261,13 +8296,16 @@ function Vf(e) {
|
|
|
8261
8296
|
ht,
|
|
8262
8297
|
{
|
|
8263
8298
|
...e,
|
|
8264
|
-
field: {
|
|
8299
|
+
field: {
|
|
8300
|
+
type: l,
|
|
8301
|
+
...Vf.has(i) && { inputType: i }
|
|
8302
|
+
},
|
|
8265
8303
|
fromFieldValue: (o) => o === "" ? r.emptyValue : o
|
|
8266
8304
|
}
|
|
8267
8305
|
);
|
|
8268
8306
|
}
|
|
8269
|
-
const
|
|
8270
|
-
function
|
|
8307
|
+
const $f = 5;
|
|
8308
|
+
function Gf(e) {
|
|
8271
8309
|
const { options: t } = e;
|
|
8272
8310
|
return /* @__PURE__ */ N(
|
|
8273
8311
|
ht,
|
|
@@ -8275,17 +8313,17 @@ function Wf(e) {
|
|
|
8275
8313
|
...e,
|
|
8276
8314
|
field: {
|
|
8277
8315
|
type: "textarea",
|
|
8278
|
-
rows: t.rows ||
|
|
8316
|
+
rows: t.rows || $f
|
|
8279
8317
|
},
|
|
8280
8318
|
fromFieldValue: (n) => n === "" ? t.emptyValue : n
|
|
8281
8319
|
}
|
|
8282
8320
|
);
|
|
8283
8321
|
}
|
|
8284
|
-
const
|
|
8322
|
+
const Yf = (e) => (Array.isArray(e) ? e : []).map((t, n) => ({
|
|
8285
8323
|
value: String(n),
|
|
8286
8324
|
label: String(t.label)
|
|
8287
8325
|
}));
|
|
8288
|
-
function
|
|
8326
|
+
function Xf(e) {
|
|
8289
8327
|
const { options: t, multiple: n, value: r, schema: i } = e, { enumOptions: l, enumDisabled: o } = t, a = Array.isArray(l) ? l : [], u = (f) => a.findIndex((m) => sr(m.value, f)), s = Wt(
|
|
8290
8328
|
(f) => {
|
|
8291
8329
|
if (n)
|
|
@@ -8310,7 +8348,7 @@ function Gf(e) {
|
|
|
8310
8348
|
...e,
|
|
8311
8349
|
field: {
|
|
8312
8350
|
type: "select",
|
|
8313
|
-
options:
|
|
8351
|
+
options: Yf(l).filter(
|
|
8314
8352
|
(f, m) => {
|
|
8315
8353
|
var h;
|
|
8316
8354
|
return !(Array.isArray(o) && o.includes((h = a[m]) == null ? void 0 : h.value));
|
|
@@ -8326,7 +8364,7 @@ function Gf(e) {
|
|
|
8326
8364
|
}
|
|
8327
8365
|
);
|
|
8328
8366
|
}
|
|
8329
|
-
function
|
|
8367
|
+
function Kf({
|
|
8330
8368
|
id: e,
|
|
8331
8369
|
value: t,
|
|
8332
8370
|
label: n,
|
|
@@ -8351,7 +8389,7 @@ function Yf({
|
|
|
8351
8389
|
a && /* @__PURE__ */ N("label", { className: "rjsf-f0-checkbox-label", htmlFor: e, children: /* @__PURE__ */ N(It, { components: { p: "span" }, children: n }) })
|
|
8352
8390
|
] });
|
|
8353
8391
|
}
|
|
8354
|
-
function
|
|
8392
|
+
function Qf({
|
|
8355
8393
|
id: e,
|
|
8356
8394
|
disabled: t,
|
|
8357
8395
|
readonly: n,
|
|
@@ -8380,7 +8418,7 @@ function Xf({
|
|
|
8380
8418
|
] }, String(s.value));
|
|
8381
8419
|
}) });
|
|
8382
8420
|
}
|
|
8383
|
-
function
|
|
8421
|
+
function Jf(e) {
|
|
8384
8422
|
const { options: t, required: n } = e, r = Array.isArray(t.enumOptions) ? t.enumOptions : [];
|
|
8385
8423
|
return /* @__PURE__ */ N(
|
|
8386
8424
|
ht,
|
|
@@ -8412,11 +8450,11 @@ function Kf(e) {
|
|
|
8412
8450
|
}
|
|
8413
8451
|
);
|
|
8414
8452
|
}
|
|
8415
|
-
const
|
|
8453
|
+
const Zf = {
|
|
8416
8454
|
ArrayFieldItemButtonsTemplate: zf,
|
|
8417
8455
|
ArrayFieldItemTemplate: Ff,
|
|
8418
8456
|
ArrayFieldTemplate: Mf,
|
|
8419
|
-
BaseInputTemplate:
|
|
8457
|
+
BaseInputTemplate: Wf,
|
|
8420
8458
|
ButtonTemplates: If,
|
|
8421
8459
|
DescriptionFieldTemplate: Nf,
|
|
8422
8460
|
ErrorListTemplate: Pf,
|
|
@@ -8428,27 +8466,27 @@ const Qf = {
|
|
|
8428
8466
|
ObjectFieldTemplate: vf,
|
|
8429
8467
|
TitleFieldTemplate: Of,
|
|
8430
8468
|
WrapIfAdditionalTemplate: Lf
|
|
8431
|
-
},
|
|
8432
|
-
CheckboxWidget:
|
|
8433
|
-
CheckboxesWidget:
|
|
8434
|
-
RadioWidget:
|
|
8435
|
-
SelectWidget:
|
|
8436
|
-
TextareaWidget:
|
|
8469
|
+
}, ep = {
|
|
8470
|
+
CheckboxWidget: Kf,
|
|
8471
|
+
CheckboxesWidget: Qf,
|
|
8472
|
+
RadioWidget: Jf,
|
|
8473
|
+
SelectWidget: Xf,
|
|
8474
|
+
TextareaWidget: Gf
|
|
8437
8475
|
};
|
|
8438
8476
|
function Dl() {
|
|
8439
|
-
return { templates:
|
|
8477
|
+
return { templates: Zf, widgets: ep };
|
|
8440
8478
|
}
|
|
8441
|
-
const
|
|
8442
|
-
function
|
|
8479
|
+
const tp = Dl();
|
|
8480
|
+
function sp() {
|
|
8443
8481
|
return Bi(Dl());
|
|
8444
8482
|
}
|
|
8445
|
-
const
|
|
8483
|
+
const up = Bi(tp);
|
|
8446
8484
|
export {
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8485
|
+
up as Form,
|
|
8486
|
+
Zf as Templates,
|
|
8487
|
+
tp as Theme,
|
|
8488
|
+
ep as Widgets,
|
|
8489
|
+
sp as generateForm,
|
|
8452
8490
|
Dl as generateTheme
|
|
8453
8491
|
};
|
|
8454
8492
|
//# sourceMappingURL=rjsf-f0.es.js.map
|