@factorialco/rjsf-f0 1.0.0 → 1.1.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.
@@ -8228,7 +8228,42 @@ const zi = (e) => {
8228
8228
  time: "time"
8229
8229
  };
8230
8230
  function Vf(e) {
8231
- const { type: t, schema: n, options: r } = e, i = t || (n.type === "number" || n.type === "integer" ? "number" : "text"), l = Hf[i] ?? "text";
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 qf(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(Vf, { ...e });
8266
+ const l = Hf[i] ?? "text";
8232
8267
  return l === "date" ? /* @__PURE__ */ N(
8233
8268
  ht,
8234
8269
  {
@@ -8266,8 +8301,8 @@ function Vf(e) {
8266
8301
  }
8267
8302
  );
8268
8303
  }
8269
- const qf = 5;
8270
- function Wf(e) {
8304
+ const Wf = 5;
8305
+ function $f(e) {
8271
8306
  const { options: t } = e;
8272
8307
  return /* @__PURE__ */ N(
8273
8308
  ht,
@@ -8275,17 +8310,17 @@ function Wf(e) {
8275
8310
  ...e,
8276
8311
  field: {
8277
8312
  type: "textarea",
8278
- rows: t.rows || qf
8313
+ rows: t.rows || Wf
8279
8314
  },
8280
8315
  fromFieldValue: (n) => n === "" ? t.emptyValue : n
8281
8316
  }
8282
8317
  );
8283
8318
  }
8284
- const $f = (e) => (Array.isArray(e) ? e : []).map((t, n) => ({
8319
+ const Gf = (e) => (Array.isArray(e) ? e : []).map((t, n) => ({
8285
8320
  value: String(n),
8286
8321
  label: String(t.label)
8287
8322
  }));
8288
- function Gf(e) {
8323
+ function Yf(e) {
8289
8324
  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
8325
  (f) => {
8291
8326
  if (n)
@@ -8310,7 +8345,7 @@ function Gf(e) {
8310
8345
  ...e,
8311
8346
  field: {
8312
8347
  type: "select",
8313
- options: $f(l).filter(
8348
+ options: Gf(l).filter(
8314
8349
  (f, m) => {
8315
8350
  var h;
8316
8351
  return !(Array.isArray(o) && o.includes((h = a[m]) == null ? void 0 : h.value));
@@ -8326,7 +8361,7 @@ function Gf(e) {
8326
8361
  }
8327
8362
  );
8328
8363
  }
8329
- function Yf({
8364
+ function Xf({
8330
8365
  id: e,
8331
8366
  value: t,
8332
8367
  label: n,
@@ -8351,7 +8386,7 @@ function Yf({
8351
8386
  a && /* @__PURE__ */ N("label", { className: "rjsf-f0-checkbox-label", htmlFor: e, children: /* @__PURE__ */ N(It, { components: { p: "span" }, children: n }) })
8352
8387
  ] });
8353
8388
  }
8354
- function Xf({
8389
+ function Kf({
8355
8390
  id: e,
8356
8391
  disabled: t,
8357
8392
  readonly: n,
@@ -8380,7 +8415,7 @@ function Xf({
8380
8415
  ] }, String(s.value));
8381
8416
  }) });
8382
8417
  }
8383
- function Kf(e) {
8418
+ function Qf(e) {
8384
8419
  const { options: t, required: n } = e, r = Array.isArray(t.enumOptions) ? t.enumOptions : [];
8385
8420
  return /* @__PURE__ */ N(
8386
8421
  ht,
@@ -8412,11 +8447,11 @@ function Kf(e) {
8412
8447
  }
8413
8448
  );
8414
8449
  }
8415
- const Qf = {
8450
+ const Jf = {
8416
8451
  ArrayFieldItemButtonsTemplate: zf,
8417
8452
  ArrayFieldItemTemplate: Ff,
8418
8453
  ArrayFieldTemplate: Mf,
8419
- BaseInputTemplate: Vf,
8454
+ BaseInputTemplate: qf,
8420
8455
  ButtonTemplates: If,
8421
8456
  DescriptionFieldTemplate: Nf,
8422
8457
  ErrorListTemplate: Pf,
@@ -8428,27 +8463,27 @@ const Qf = {
8428
8463
  ObjectFieldTemplate: vf,
8429
8464
  TitleFieldTemplate: Of,
8430
8465
  WrapIfAdditionalTemplate: Lf
8431
- }, Jf = {
8432
- CheckboxWidget: Yf,
8433
- CheckboxesWidget: Xf,
8434
- RadioWidget: Kf,
8435
- SelectWidget: Gf,
8436
- TextareaWidget: Wf
8466
+ }, Zf = {
8467
+ CheckboxWidget: Xf,
8468
+ CheckboxesWidget: Kf,
8469
+ RadioWidget: Qf,
8470
+ SelectWidget: Yf,
8471
+ TextareaWidget: $f
8437
8472
  };
8438
8473
  function Dl() {
8439
- return { templates: Qf, widgets: Jf };
8474
+ return { templates: Jf, widgets: Zf };
8440
8475
  }
8441
- const Zf = Dl();
8442
- function op() {
8476
+ const ep = Dl();
8477
+ function ap() {
8443
8478
  return Bi(Dl());
8444
8479
  }
8445
- const ap = Bi(Zf);
8480
+ const sp = Bi(ep);
8446
8481
  export {
8447
- ap as Form,
8448
- Qf as Templates,
8449
- Zf as Theme,
8450
- Jf as Widgets,
8451
- op as generateForm,
8482
+ sp as Form,
8483
+ Jf as Templates,
8484
+ ep as Theme,
8485
+ Zf as Widgets,
8486
+ ap as generateForm,
8452
8487
  Dl as generateTheme
8453
8488
  };
8454
8489
  //# sourceMappingURL=rjsf-f0.es.js.map