@rjsf/react-bootstrap 6.0.0-beta.2 → 6.0.0-beta.21

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.
Files changed (66) hide show
  1. package/README.md +4 -2
  2. package/dist/{index.js → index.cjs} +142 -63
  3. package/dist/index.cjs.map +7 -0
  4. package/dist/react-bootstrap.esm.js +141 -62
  5. package/dist/react-bootstrap.esm.js.map +4 -4
  6. package/dist/react-bootstrap.umd.js +89 -21
  7. package/lib/AddButton/AddButton.js +1 -1
  8. package/lib/AddButton/AddButton.js.map +1 -1
  9. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +3 -3
  10. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
  11. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  12. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  13. package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
  14. package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -2
  15. package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
  16. package/lib/FieldHelpTemplate/FieldHelpTemplate.js +2 -2
  17. package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
  18. package/lib/IconButton/IconButton.d.ts +6 -5
  19. package/lib/IconButton/IconButton.js +1 -1
  20. package/lib/IconButton/IconButton.js.map +1 -1
  21. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +2 -0
  22. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js +6 -0
  23. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.js.map +1 -0
  24. package/lib/MultiSchemaFieldTemplate/index.d.ts +2 -0
  25. package/lib/MultiSchemaFieldTemplate/index.js +3 -0
  26. package/lib/MultiSchemaFieldTemplate/index.js.map +1 -0
  27. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
  28. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +3 -2
  29. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
  30. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +10 -0
  31. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js +22 -0
  32. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.js.map +1 -0
  33. package/lib/OptionalDataControlsTemplate/index.d.ts +2 -0
  34. package/lib/OptionalDataControlsTemplate/index.js +3 -0
  35. package/lib/OptionalDataControlsTemplate/index.js.map +1 -0
  36. package/lib/RadioWidget/RadioWidget.js.map +1 -1
  37. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  38. package/lib/Templates/Templates.js +4 -0
  39. package/lib/Templates/Templates.js.map +1 -1
  40. package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
  41. package/lib/TitleField/TitleField.d.ts +1 -1
  42. package/lib/TitleField/TitleField.js +9 -2
  43. package/lib/TitleField/TitleField.js.map +1 -1
  44. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
  45. package/lib/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +16 -16
  47. package/src/AddButton/AddButton.tsx +1 -1
  48. package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +24 -10
  49. package/src/BaseInputTemplate/BaseInputTemplate.tsx +3 -3
  50. package/src/CheckboxWidget/CheckboxWidget.tsx +2 -2
  51. package/src/CheckboxesWidget/CheckboxesWidget.tsx +1 -1
  52. package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +2 -2
  53. package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -2
  54. package/src/IconButton/IconButton.tsx +12 -6
  55. package/src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx +15 -0
  56. package/src/MultiSchemaFieldTemplate/index.ts +2 -0
  57. package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +8 -4
  58. package/src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx +47 -0
  59. package/src/OptionalDataControlsTemplate/index.ts +2 -0
  60. package/src/RadioWidget/RadioWidget.tsx +1 -1
  61. package/src/SelectWidget/SelectWidget.tsx +1 -1
  62. package/src/Templates/Templates.ts +4 -0
  63. package/src/TextareaWidget/TextareaWidget.tsx +1 -1
  64. package/src/TitleField/TitleField.tsx +19 -2
  65. package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -1
  66. package/dist/index.js.map +0 -7
@@ -15,10 +15,10 @@ function AddButton({
15
15
  return /* @__PURE__ */ jsx(
16
16
  Button,
17
17
  {
18
+ title: translateString(TranslatableString.AddItemButton),
18
19
  ...props,
19
20
  style: { width: "100%" },
20
21
  className: `ml-1 ${props.className}`,
21
- title: translateString(TranslatableString.AddItemButton),
22
22
  children: /* @__PURE__ */ jsx(BsPlus, {})
23
23
  }
24
24
  );
@@ -63,7 +63,20 @@ import {
63
63
  } from "@rjsf/utils";
64
64
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
65
65
  function ArrayFieldTemplate(props) {
66
- const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
66
+ const {
67
+ canAdd,
68
+ disabled,
69
+ fieldPathId,
70
+ uiSchema,
71
+ items,
72
+ optionalDataControl,
73
+ onAddClick,
74
+ readonly,
75
+ registry,
76
+ required,
77
+ schema,
78
+ title
79
+ } = props;
67
80
  const uiOptions = getUiOptions2(uiSchema);
68
81
  const ArrayFieldDescriptionTemplate = getTemplate2(
69
82
  "ArrayFieldDescriptionTemplate",
@@ -80,6 +93,7 @@ function ArrayFieldTemplate(props) {
80
93
  registry,
81
94
  uiOptions
82
95
  );
96
+ const showOptionalDataControlInTitle = !readonly && !disabled;
83
97
  const {
84
98
  ButtonTemplates: { AddButton: AddButton2 }
85
99
  } = registry.templates;
@@ -87,18 +101,19 @@ function ArrayFieldTemplate(props) {
87
101
  /* @__PURE__ */ jsx3(
88
102
  ArrayFieldTitleTemplate,
89
103
  {
90
- idSchema,
104
+ fieldPathId,
91
105
  title: uiOptions.title || title,
92
106
  schema,
93
107
  uiSchema,
94
108
  required,
95
- registry
109
+ registry,
110
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
96
111
  }
97
112
  ),
98
113
  /* @__PURE__ */ jsx3(
99
114
  ArrayFieldDescriptionTemplate,
100
115
  {
101
- idSchema,
116
+ fieldPathId,
102
117
  description: uiOptions.description || schema.description,
103
118
  schema,
104
119
  uiSchema,
@@ -106,13 +121,14 @@ function ArrayFieldTemplate(props) {
106
121
  }
107
122
  ),
108
123
  /* @__PURE__ */ jsxs2(Container, { fluid: true, className: "p-0 m-0", children: [
109
- items && items.map(({ key, ...itemProps }) => /* @__PURE__ */ jsx3(ArrayFieldItemTemplate2, { ...itemProps }, key)),
124
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
125
+ items.map(({ key, ...itemProps }) => /* @__PURE__ */ jsx3(ArrayFieldItemTemplate2, { ...itemProps }, key)),
110
126
  canAdd && /* @__PURE__ */ jsx3(Container, { className: "", children: /* @__PURE__ */ jsxs2(Row2, { className: "mt-2", children: [
111
127
  /* @__PURE__ */ jsx3(Col2, { xs: 9 }),
112
128
  /* @__PURE__ */ jsx3(Col2, { xs: 3, className: "py-4 col-lg-3 col-3", children: /* @__PURE__ */ jsx3(
113
129
  AddButton2,
114
130
  {
115
- id: buttonId(idSchema, "add"),
131
+ id: buttonId(fieldPathId, "add"),
116
132
  className: "rjsf-array-item-add",
117
133
  onClick: onAddClick,
118
134
  disabled: disabled || readonly,
@@ -121,7 +137,7 @@ function ArrayFieldTemplate(props) {
121
137
  }
122
138
  ) })
123
139
  ] }) })
124
- ] }, `array-item-list-${idSchema.$id}`)
140
+ ] }, `array-item-list-${fieldPathId.$id}`)
125
141
  ] }) }) });
126
142
  }
127
143
 
@@ -253,8 +269,8 @@ function RemoveButton(props) {
253
269
  IconButton,
254
270
  {
255
271
  title: translateString(TranslatableString3.RemoveButton),
256
- ...props,
257
272
  variant: "danger",
273
+ ...props,
258
274
  icon: /* @__PURE__ */ jsx7(IoIosRemove, {})
259
275
  }
260
276
  );
@@ -265,11 +281,11 @@ import { errorId } from "@rjsf/utils";
265
281
  import ListGroup2 from "react-bootstrap/ListGroup";
266
282
  import { jsx as jsx8 } from "react/jsx-runtime";
267
283
  function FieldErrorTemplate(props) {
268
- const { errors = [], idSchema } = props;
284
+ const { errors = [], fieldPathId } = props;
269
285
  if (errors.length === 0) {
270
286
  return null;
271
287
  }
272
- const id = errorId(idSchema);
288
+ const id = errorId(fieldPathId);
273
289
  return /* @__PURE__ */ jsx8(ListGroup2, { as: "ul", id, children: errors.map((error, i) => {
274
290
  return /* @__PURE__ */ jsx8(ListGroup2.Item, { as: "li", className: "border-0 m-0 p-0", children: /* @__PURE__ */ jsx8("small", { className: "m-0 text-danger", children: error }) }, i);
275
291
  }) });
@@ -280,11 +296,11 @@ import { helpId } from "@rjsf/utils";
280
296
  import Form2 from "react-bootstrap/Form";
281
297
  import { jsx as jsx9 } from "react/jsx-runtime";
282
298
  function FieldHelpTemplate(props) {
283
- const { idSchema, help, hasErrors } = props;
299
+ const { fieldPathId, help, hasErrors } = props;
284
300
  if (!help) {
285
301
  return null;
286
302
  }
287
- const id = helpId(idSchema);
303
+ const id = helpId(fieldPathId);
288
304
  return /* @__PURE__ */ jsx9(Form2.Text, { className: hasErrors ? "text-danger" : "text-muted", id, children: help });
289
305
  }
290
306
 
@@ -367,6 +383,16 @@ function GridTemplate(props) {
367
383
  return /* @__PURE__ */ jsx11(Row3, { ...rest, children });
368
384
  }
369
385
 
386
+ // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
387
+ import Card2 from "react-bootstrap/Card";
388
+ import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
389
+ function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
390
+ return /* @__PURE__ */ jsxs6(Card2, { style: { marginBottom: "1rem" }, children: [
391
+ /* @__PURE__ */ jsx12(Card2.Body, { children: selector }),
392
+ /* @__PURE__ */ jsx12(Card2.Body, { children: optionSchemaField })
393
+ ] });
394
+ }
395
+
370
396
  // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
371
397
  import Row4 from "react-bootstrap/Row";
372
398
  import Col4 from "react-bootstrap/Col";
@@ -379,16 +405,17 @@ import {
379
405
  getUiOptions as getUiOptions4,
380
406
  titleId
381
407
  } from "@rjsf/utils";
382
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
408
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
383
409
  function ObjectFieldTemplate({
384
410
  description,
385
411
  title,
386
412
  properties,
387
413
  required,
388
414
  uiSchema,
389
- idSchema,
415
+ fieldPathId,
390
416
  schema,
391
417
  formData,
418
+ optionalDataControl,
392
419
  onAddClick,
393
420
  disabled,
394
421
  readonly,
@@ -401,40 +428,43 @@ function ObjectFieldTemplate({
401
428
  registry,
402
429
  uiOptions
403
430
  );
431
+ const showOptionalDataControlInTitle = !readonly && !disabled;
404
432
  const {
405
433
  ButtonTemplates: { AddButton: AddButton2 }
406
434
  } = registry.templates;
407
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
408
- title && /* @__PURE__ */ jsx12(
435
+ return /* @__PURE__ */ jsxs7(Fragment2, { children: [
436
+ title && /* @__PURE__ */ jsx13(
409
437
  TitleFieldTemplate,
410
438
  {
411
- id: titleId(idSchema),
439
+ id: titleId(fieldPathId),
412
440
  title,
413
441
  required,
414
442
  schema,
415
443
  uiSchema,
416
- registry
444
+ registry,
445
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
417
446
  }
418
447
  ),
419
- description && /* @__PURE__ */ jsx12(
448
+ description && /* @__PURE__ */ jsx13(
420
449
  DescriptionFieldTemplate,
421
450
  {
422
- id: descriptionId(idSchema),
451
+ id: descriptionId(fieldPathId),
423
452
  description,
424
453
  schema,
425
454
  uiSchema,
426
455
  registry
427
456
  }
428
457
  ),
429
- /* @__PURE__ */ jsxs6(Container2, { fluid: true, className: "p-0", children: [
430
- properties.map((element, index) => /* @__PURE__ */ jsx12(Row4, { style: { marginBottom: "10px" }, className: element.hidden ? "d-none" : void 0, children: /* @__PURE__ */ jsxs6(Col4, { xs: 12, children: [
458
+ /* @__PURE__ */ jsxs7(Container2, { fluid: true, className: "p-0", children: [
459
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
460
+ properties.map((element, index) => /* @__PURE__ */ jsx13(Row4, { style: { marginBottom: "10px" }, className: element.hidden ? "d-none" : void 0, children: /* @__PURE__ */ jsxs7(Col4, { xs: 12, children: [
431
461
  " ",
432
462
  element.content
433
463
  ] }) }, index)),
434
- canExpand(schema, uiSchema, formData) ? /* @__PURE__ */ jsx12(Row4, { children: /* @__PURE__ */ jsx12(Col4, { xs: { offset: 9, span: 3 }, className: "py-4", children: /* @__PURE__ */ jsx12(
464
+ canExpand(schema, uiSchema, formData) ? /* @__PURE__ */ jsx13(Row4, { children: /* @__PURE__ */ jsx13(Col4, { xs: { offset: 9, span: 3 }, className: "py-4", children: /* @__PURE__ */ jsx13(
435
465
  AddButton2,
436
466
  {
437
- id: buttonId2(idSchema, "add"),
467
+ id: buttonId2(fieldPathId, "add"),
438
468
  onClick: onAddClick(schema),
439
469
  disabled: disabled || readonly,
440
470
  className: "rjsf-object-property-expand",
@@ -446,30 +476,77 @@ function ObjectFieldTemplate({
446
476
  ] });
447
477
  }
448
478
 
479
+ // src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
480
+ import { BsPlus as BsPlus2 } from "@react-icons/all-files/bs/BsPlus";
481
+ import { jsx as jsx14 } from "react/jsx-runtime";
482
+ function OptionalDataControlsTemplate(props) {
483
+ const { id, registry, label, onAddClick, onRemoveClick } = props;
484
+ if (onAddClick) {
485
+ return /* @__PURE__ */ jsx14(
486
+ IconButton,
487
+ {
488
+ id,
489
+ registry,
490
+ className: "rjsf-add-optional-data",
491
+ icon: /* @__PURE__ */ jsx14(BsPlus2, {}),
492
+ onClick: onAddClick,
493
+ title: label,
494
+ size: "sm",
495
+ variant: "secondary"
496
+ }
497
+ );
498
+ } else if (onRemoveClick) {
499
+ return /* @__PURE__ */ jsx14(
500
+ RemoveButton,
501
+ {
502
+ id,
503
+ registry,
504
+ className: "rjsf-remove-optional-data",
505
+ onClick: onRemoveClick,
506
+ title: label,
507
+ size: "sm",
508
+ variant: "secondary"
509
+ }
510
+ );
511
+ }
512
+ return /* @__PURE__ */ jsx14("em", { id, children: label });
513
+ }
514
+
449
515
  // src/SubmitButton/SubmitButton.tsx
450
516
  import Button3 from "react-bootstrap/Button";
451
517
  import { getSubmitButtonOptions } from "@rjsf/utils";
452
- import { jsx as jsx13 } from "react/jsx-runtime";
518
+ import { jsx as jsx15 } from "react/jsx-runtime";
453
519
  function SubmitButton(props) {
454
520
  const { submitText, norender, props: submitButtonProps } = getSubmitButtonOptions(props.uiSchema);
455
521
  if (norender) {
456
522
  return null;
457
523
  }
458
- return /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13(Button3, { variant: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
524
+ return /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsx15(Button3, { variant: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
459
525
  }
460
526
 
461
527
  // src/TitleField/TitleField.tsx
462
528
  import { getUiOptions as getUiOptions5 } from "@rjsf/utils";
463
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
529
+ import Row5 from "react-bootstrap/Row";
530
+ import Col5 from "react-bootstrap/Col";
531
+ import Container3 from "react-bootstrap/Container";
532
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
464
533
  function TitleField({
465
534
  id,
466
535
  title,
467
- uiSchema
536
+ uiSchema,
537
+ optionalDataControl
468
538
  }) {
469
539
  const uiOptions = getUiOptions5(uiSchema);
470
- return /* @__PURE__ */ jsxs7("div", { id, className: "my-1", children: [
471
- /* @__PURE__ */ jsx14("h5", { children: uiOptions.title || title }),
472
- /* @__PURE__ */ jsx14("hr", { className: "border-0 bg-secondary", style: { height: "1px" } })
540
+ let heading = /* @__PURE__ */ jsx16("h5", { children: uiOptions.title || title });
541
+ if (optionalDataControl) {
542
+ heading = /* @__PURE__ */ jsx16(Container3, { fluid: true, className: "p-0", children: /* @__PURE__ */ jsxs8(Row5, { children: [
543
+ /* @__PURE__ */ jsx16(Col5, { xs: "11", children: heading }),
544
+ /* @__PURE__ */ jsx16(Col5, { xs: "1", style: { marginLeft: "-5px" }, children: optionalDataControl })
545
+ ] }) });
546
+ }
547
+ return /* @__PURE__ */ jsxs8("div", { id, className: "my-1", children: [
548
+ heading,
549
+ /* @__PURE__ */ jsx16("hr", { className: "border-0 bg-secondary mt-0", style: { height: "1px" } })
473
550
  ] });
474
551
  }
475
552
 
@@ -479,10 +556,10 @@ import {
479
556
  buttonId as buttonId3,
480
557
  TranslatableString as TranslatableString4
481
558
  } from "@rjsf/utils";
482
- import Row5 from "react-bootstrap/Row";
483
- import Col5 from "react-bootstrap/Col";
559
+ import Row6 from "react-bootstrap/Row";
560
+ import Col6 from "react-bootstrap/Col";
484
561
  import Form4 from "react-bootstrap/Form";
485
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
562
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
486
563
  function WrapIfAdditionalTemplate({
487
564
  classNames,
488
565
  style,
@@ -503,14 +580,14 @@ function WrapIfAdditionalTemplate({
503
580
  const keyLabel = translateString(TranslatableString4.KeyLabel, [label]);
504
581
  const additional = ADDITIONAL_PROPERTY_FLAG in schema;
505
582
  if (!additional) {
506
- return /* @__PURE__ */ jsx15("div", { className: classNames, style, children });
583
+ return /* @__PURE__ */ jsx17("div", { className: classNames, style, children });
507
584
  }
508
585
  const handleBlur = ({ target }) => onKeyChange(target.value);
509
586
  const keyId = `${id}-key`;
510
- return /* @__PURE__ */ jsxs8(Row5, { className: classNames, style, children: [
511
- /* @__PURE__ */ jsx15(Col5, { xs: 5, children: /* @__PURE__ */ jsxs8(Form4.Group, { children: [
512
- /* @__PURE__ */ jsx15(Form4.Label, { htmlFor: keyId, children: keyLabel }),
513
- /* @__PURE__ */ jsx15(
587
+ return /* @__PURE__ */ jsxs9(Row6, { className: classNames, style, children: [
588
+ /* @__PURE__ */ jsx17(Col6, { xs: 5, children: /* @__PURE__ */ jsxs9(Form4.Group, { children: [
589
+ /* @__PURE__ */ jsx17(Form4.Label, { htmlFor: keyId, children: keyLabel }),
590
+ /* @__PURE__ */ jsx17(
514
591
  Form4.Control,
515
592
  {
516
593
  required,
@@ -523,8 +600,8 @@ function WrapIfAdditionalTemplate({
523
600
  }
524
601
  )
525
602
  ] }) }),
526
- /* @__PURE__ */ jsx15(Col5, { xs: 5, children }),
527
- /* @__PURE__ */ jsx15(Col5, { xs: 2, className: "py-4 d-grid gap-2", children: /* @__PURE__ */ jsx15(
603
+ /* @__PURE__ */ jsx17(Col6, { xs: 5, children }),
604
+ /* @__PURE__ */ jsx17(Col6, { xs: 2, className: "py-4 d-grid gap-2", children: /* @__PURE__ */ jsx17(
528
605
  RemoveButton2,
529
606
  {
530
607
  id: buttonId3(id, "remove"),
@@ -558,7 +635,9 @@ function generateTemplates() {
558
635
  FieldHelpTemplate,
559
636
  FieldTemplate,
560
637
  GridTemplate,
638
+ MultiSchemaFieldTemplate,
561
639
  ObjectFieldTemplate,
640
+ OptionalDataControlsTemplate,
562
641
  TitleFieldTemplate: TitleField,
563
642
  WrapIfAdditionalTemplate
564
643
  };
@@ -574,7 +653,7 @@ import {
574
653
  schemaRequiresTrueValue
575
654
  } from "@rjsf/utils";
576
655
  import Form5 from "react-bootstrap/Form";
577
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
656
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
578
657
  function CheckboxWidget(props) {
579
658
  const {
580
659
  id,
@@ -602,8 +681,8 @@ function CheckboxWidget(props) {
602
681
  const _onBlur = ({ target }) => onBlur(id, target && target.checked);
603
682
  const _onFocus = ({ target }) => onFocus(id, target && target.checked);
604
683
  const description = options.description || schema.description;
605
- return /* @__PURE__ */ jsxs9(Form5.Group, { className: disabled || readonly ? "disabled" : "", "aria-describedby": ariaDescribedByIds2(id), children: [
606
- !hideLabel && description && /* @__PURE__ */ jsx16(
684
+ return /* @__PURE__ */ jsxs10(Form5.Group, { className: disabled || readonly ? "disabled" : "", "aria-describedby": ariaDescribedByIds2(id), children: [
685
+ !hideLabel && description && /* @__PURE__ */ jsx18(
607
686
  DescriptionFieldTemplate,
608
687
  {
609
688
  id: descriptionId2(id),
@@ -613,7 +692,7 @@ function CheckboxWidget(props) {
613
692
  registry
614
693
  }
615
694
  ),
616
- /* @__PURE__ */ jsx16(
695
+ /* @__PURE__ */ jsx18(
617
696
  Form5.Check,
618
697
  {
619
698
  id,
@@ -642,7 +721,7 @@ import {
642
721
  enumOptionsValueForIndex,
643
722
  optionId
644
723
  } from "@rjsf/utils";
645
- import { jsx as jsx17 } from "react/jsx-runtime";
724
+ import { jsx as jsx19 } from "react/jsx-runtime";
646
725
  function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus }) {
647
726
  const { enumOptions, enumDisabled, inline, emptyValue } = options;
648
727
  const checkboxesValues = Array.isArray(value) ? value : [value];
@@ -655,10 +734,10 @@ function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, r
655
734
  };
656
735
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
657
736
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex(target && target.value, enumOptions, emptyValue));
658
- return /* @__PURE__ */ jsx17(Form6.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
737
+ return /* @__PURE__ */ jsx19(Form6.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
659
738
  const checked = enumOptionsIsSelected(option.value, checkboxesValues);
660
739
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
661
- return /* @__PURE__ */ jsx17(
740
+ return /* @__PURE__ */ jsx19(
662
741
  Form6.Check,
663
742
  {
664
743
  inline,
@@ -689,7 +768,7 @@ import {
689
768
  enumOptionsValueForIndex as enumOptionsValueForIndex2,
690
769
  optionId as optionId2
691
770
  } from "@rjsf/utils";
692
- import { jsx as jsx18 } from "react/jsx-runtime";
771
+ import { jsx as jsx20 } from "react/jsx-runtime";
693
772
  function RadioWidget({
694
773
  id,
695
774
  options,
@@ -706,10 +785,10 @@ function RadioWidget({
706
785
  const _onBlur = ({ target }) => onBlur(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
707
786
  const _onFocus = ({ target }) => onFocus(id, enumOptionsValueForIndex2(target && target.value, enumOptions, emptyValue));
708
787
  const inline = Boolean(options && options.inline);
709
- return /* @__PURE__ */ jsx18(Form7.Group, { className: "mb-0", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
788
+ return /* @__PURE__ */ jsx20(Form7.Group, { className: "mb-0", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
710
789
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
711
790
  const checked = enumOptionsIsSelected2(option.value, value);
712
- const radio = /* @__PURE__ */ jsx18(
791
+ const radio = /* @__PURE__ */ jsx20(
713
792
  Form7.Check,
714
793
  {
715
794
  inline,
@@ -735,7 +814,7 @@ function RadioWidget({
735
814
  // src/RangeWidget/RangeWidget.tsx
736
815
  import { rangeSpec } from "@rjsf/utils";
737
816
  import FormRange from "react-bootstrap/FormRange";
738
- import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
817
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
739
818
  function RangeWidget(props) {
740
819
  const { id, value, disabled, onChange, onBlur, onFocus, schema } = props;
741
820
  const _onChange = ({ target: { value: value2 } }) => onChange(value2);
@@ -751,9 +830,9 @@ function RangeWidget(props) {
751
830
  onFocus: _onFocus,
752
831
  ...rangeSpec(schema)
753
832
  };
754
- return /* @__PURE__ */ jsxs10(Fragment3, { children: [
755
- /* @__PURE__ */ jsx19(FormRange, { ...rangeProps }),
756
- /* @__PURE__ */ jsx19("span", { className: "range-view", children: value })
833
+ return /* @__PURE__ */ jsxs11(Fragment3, { children: [
834
+ /* @__PURE__ */ jsx21(FormRange, { ...rangeProps }),
835
+ /* @__PURE__ */ jsx21("span", { className: "range-view", children: value })
757
836
  ] });
758
837
  }
759
838
 
@@ -764,7 +843,7 @@ import {
764
843
  enumOptionsIndexForValue,
765
844
  enumOptionsValueForIndex as enumOptionsValueForIndex3
766
845
  } from "@rjsf/utils";
767
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
846
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
768
847
  function SelectWidget({
769
848
  schema,
770
849
  id,
@@ -792,7 +871,7 @@ function SelectWidget({
792
871
  }
793
872
  const selectedIndexes = enumOptionsIndexForValue(value, enumOptions, multiple);
794
873
  const showPlaceholderOption = !multiple && schema.default === void 0;
795
- return /* @__PURE__ */ jsxs11(
874
+ return /* @__PURE__ */ jsxs12(
796
875
  FormSelect,
797
876
  {
798
877
  id,
@@ -817,10 +896,10 @@ function SelectWidget({
817
896
  },
818
897
  "aria-describedby": ariaDescribedByIds5(id),
819
898
  children: [
820
- showPlaceholderOption && /* @__PURE__ */ jsx20("option", { value: "", children: placeholder }),
899
+ showPlaceholderOption && /* @__PURE__ */ jsx22("option", { value: "", children: placeholder }),
821
900
  enumOptions.map(({ value: value2, label }, i) => {
822
901
  const disabled2 = Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) != -1;
823
- return /* @__PURE__ */ jsx20("option", { id: label, value: String(i), disabled: disabled2, children: label }, i);
902
+ return /* @__PURE__ */ jsx22("option", { id: label, value: String(i), disabled: disabled2, children: label }, i);
824
903
  })
825
904
  ]
826
905
  }
@@ -831,7 +910,7 @@ function SelectWidget({
831
910
  import { ariaDescribedByIds as ariaDescribedByIds6 } from "@rjsf/utils";
832
911
  import FormControl from "react-bootstrap/FormControl";
833
912
  import InputGroup from "react-bootstrap/InputGroup";
834
- import { jsx as jsx21 } from "react/jsx-runtime";
913
+ import { jsx as jsx23 } from "react/jsx-runtime";
835
914
  function TextareaWidget({
836
915
  id,
837
916
  placeholder,
@@ -848,7 +927,7 @@ function TextareaWidget({
848
927
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
849
928
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
850
929
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
851
- return /* @__PURE__ */ jsx21(InputGroup, { children: /* @__PURE__ */ jsx21(
930
+ return /* @__PURE__ */ jsx23(InputGroup, { children: /* @__PURE__ */ jsx23(
852
931
  FormControl,
853
932
  {
854
933
  id,