@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
package/README.md CHANGED
@@ -54,10 +54,12 @@ Exports `react-bootstrap` theme, fields and widgets for `react-jsonschema-form`.
54
54
  ### Prerequisites
55
55
 
56
56
  - `react-bootstrap >= 2.0.0`
57
- - `@rjsf/core >= 2.2.0`
57
+ - `@rjsf/core >= 6`
58
+ - `@rjsf/utils >= 6`
59
+ - `@rjsf/validator-ajv8 >= 6`
58
60
 
59
61
  ```bash
60
- yarn add react-bootstrap @rjsf/core
62
+ yarn add react-bootstrap @rjsf/core @rjsf/utils @rjsf/validator-ajv8
61
63
  ```
62
64
 
63
65
  ### Installation
@@ -59,10 +59,10 @@ function AddButton({
59
59
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
60
  import_Button.default,
61
61
  {
62
+ title: translateString(import_utils.TranslatableString.AddItemButton),
62
63
  ...props,
63
64
  style: { width: "100%" },
64
65
  className: `ml-1 ${props.className}`,
65
- title: translateString(import_utils.TranslatableString.AddItemButton),
66
66
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_BsPlus.BsPlus, {})
67
67
  }
68
68
  );
@@ -100,7 +100,20 @@ var import_Container = __toESM(require("react-bootstrap/Container"), 1);
100
100
  var import_utils3 = require("@rjsf/utils");
101
101
  var import_jsx_runtime3 = require("react/jsx-runtime");
102
102
  function ArrayFieldTemplate(props) {
103
- const { canAdd, disabled, idSchema, uiSchema, items, onAddClick, readonly, registry, required, schema, title } = props;
103
+ const {
104
+ canAdd,
105
+ disabled,
106
+ fieldPathId,
107
+ uiSchema,
108
+ items,
109
+ optionalDataControl,
110
+ onAddClick,
111
+ readonly,
112
+ registry,
113
+ required,
114
+ schema,
115
+ title
116
+ } = props;
104
117
  const uiOptions = (0, import_utils3.getUiOptions)(uiSchema);
105
118
  const ArrayFieldDescriptionTemplate = (0, import_utils3.getTemplate)(
106
119
  "ArrayFieldDescriptionTemplate",
@@ -117,6 +130,7 @@ function ArrayFieldTemplate(props) {
117
130
  registry,
118
131
  uiOptions
119
132
  );
133
+ const showOptionalDataControlInTitle = !readonly && !disabled;
120
134
  const {
121
135
  ButtonTemplates: { AddButton: AddButton2 }
122
136
  } = registry.templates;
@@ -124,18 +138,19 @@ function ArrayFieldTemplate(props) {
124
138
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
125
139
  ArrayFieldTitleTemplate,
126
140
  {
127
- idSchema,
141
+ fieldPathId,
128
142
  title: uiOptions.title || title,
129
143
  schema,
130
144
  uiSchema,
131
145
  required,
132
- registry
146
+ registry,
147
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
133
148
  }
134
149
  ),
135
150
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
136
151
  ArrayFieldDescriptionTemplate,
137
152
  {
138
- idSchema,
153
+ fieldPathId,
139
154
  description: uiOptions.description || schema.description,
140
155
  schema,
141
156
  uiSchema,
@@ -143,13 +158,14 @@ function ArrayFieldTemplate(props) {
143
158
  }
144
159
  ),
145
160
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Container.default, { fluid: true, className: "p-0 m-0", children: [
146
- items && items.map(({ key, ...itemProps }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrayFieldItemTemplate2, { ...itemProps }, key)),
161
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
162
+ items.map(({ key, ...itemProps }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrayFieldItemTemplate2, { ...itemProps }, key)),
147
163
  canAdd && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Container.default, { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_Row2.default, { className: "mt-2", children: [
148
164
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Col2.default, { xs: 9 }),
149
165
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Col2.default, { xs: 3, className: "py-4 col-lg-3 col-3", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
150
166
  AddButton2,
151
167
  {
152
- id: (0, import_utils3.buttonId)(idSchema, "add"),
168
+ id: (0, import_utils3.buttonId)(fieldPathId, "add"),
153
169
  className: "rjsf-array-item-add",
154
170
  onClick: onAddClick,
155
171
  disabled: disabled || readonly,
@@ -158,7 +174,7 @@ function ArrayFieldTemplate(props) {
158
174
  }
159
175
  ) })
160
176
  ] }) })
161
- ] }, `array-item-list-${idSchema.$id}`)
177
+ ] }, `array-item-list-${fieldPathId.$id}`)
162
178
  ] }) }) });
163
179
  }
164
180
 
@@ -286,8 +302,8 @@ function RemoveButton(props) {
286
302
  IconButton,
287
303
  {
288
304
  title: translateString(import_utils6.TranslatableString.RemoveButton),
289
- ...props,
290
305
  variant: "danger",
306
+ ...props,
291
307
  icon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_IoIosRemove.IoIosRemove, {})
292
308
  }
293
309
  );
@@ -298,11 +314,11 @@ var import_utils7 = require("@rjsf/utils");
298
314
  var import_ListGroup2 = __toESM(require("react-bootstrap/ListGroup"), 1);
299
315
  var import_jsx_runtime8 = require("react/jsx-runtime");
300
316
  function FieldErrorTemplate(props) {
301
- const { errors = [], idSchema } = props;
317
+ const { errors = [], fieldPathId } = props;
302
318
  if (errors.length === 0) {
303
319
  return null;
304
320
  }
305
- const id = (0, import_utils7.errorId)(idSchema);
321
+ const id = (0, import_utils7.errorId)(fieldPathId);
306
322
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ListGroup2.default, { as: "ul", id, children: errors.map((error, i) => {
307
323
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ListGroup2.default.Item, { as: "li", className: "border-0 m-0 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("small", { className: "m-0 text-danger", children: error }) }, i);
308
324
  }) });
@@ -313,11 +329,11 @@ var import_utils8 = require("@rjsf/utils");
313
329
  var import_Form2 = __toESM(require("react-bootstrap/Form"), 1);
314
330
  var import_jsx_runtime9 = require("react/jsx-runtime");
315
331
  function FieldHelpTemplate(props) {
316
- const { idSchema, help, hasErrors } = props;
332
+ const { fieldPathId, help, hasErrors } = props;
317
333
  if (!help) {
318
334
  return null;
319
335
  }
320
- const id = (0, import_utils8.helpId)(idSchema);
336
+ const id = (0, import_utils8.helpId)(fieldPathId);
321
337
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_Form2.default.Text, { className: hasErrors ? "text-danger" : "text-muted", id, children: help });
322
338
  }
323
339
 
@@ -397,21 +413,32 @@ function GridTemplate(props) {
397
413
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Row3.default, { ...rest, children });
398
414
  }
399
415
 
416
+ // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
417
+ var import_Card2 = __toESM(require("react-bootstrap/Card"), 1);
418
+ var import_jsx_runtime12 = require("react/jsx-runtime");
419
+ function MultiSchemaFieldTemplate({ selector, optionSchemaField }) {
420
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_Card2.default, { style: { marginBottom: "1rem" }, children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Card2.default.Body, { children: selector }),
422
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Card2.default.Body, { children: optionSchemaField })
423
+ ] });
424
+ }
425
+
400
426
  // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
401
427
  var import_Row4 = __toESM(require("react-bootstrap/Row"), 1);
402
428
  var import_Col4 = __toESM(require("react-bootstrap/Col"), 1);
403
429
  var import_Container2 = __toESM(require("react-bootstrap/Container"), 1);
404
430
  var import_utils10 = require("@rjsf/utils");
405
- var import_jsx_runtime12 = require("react/jsx-runtime");
431
+ var import_jsx_runtime13 = require("react/jsx-runtime");
406
432
  function ObjectFieldTemplate({
407
433
  description,
408
434
  title,
409
435
  properties,
410
436
  required,
411
437
  uiSchema,
412
- idSchema,
438
+ fieldPathId,
413
439
  schema,
414
440
  formData,
441
+ optionalDataControl,
415
442
  onAddClick,
416
443
  disabled,
417
444
  readonly,
@@ -424,40 +451,43 @@ function ObjectFieldTemplate({
424
451
  registry,
425
452
  uiOptions
426
453
  );
454
+ const showOptionalDataControlInTitle = !readonly && !disabled;
427
455
  const {
428
456
  ButtonTemplates: { AddButton: AddButton2 }
429
457
  } = registry.templates;
430
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
431
- title && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
458
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
459
+ title && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
432
460
  TitleFieldTemplate,
433
461
  {
434
- id: (0, import_utils10.titleId)(idSchema),
462
+ id: (0, import_utils10.titleId)(fieldPathId),
435
463
  title,
436
464
  required,
437
465
  schema,
438
466
  uiSchema,
439
- registry
467
+ registry,
468
+ optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
440
469
  }
441
470
  ),
442
- description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
471
+ description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
443
472
  DescriptionFieldTemplate,
444
473
  {
445
- id: (0, import_utils10.descriptionId)(idSchema),
474
+ id: (0, import_utils10.descriptionId)(fieldPathId),
446
475
  description,
447
476
  schema,
448
477
  uiSchema,
449
478
  registry
450
479
  }
451
480
  ),
452
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_Container2.default, { fluid: true, className: "p-0", children: [
453
- properties.map((element, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Row4.default, { style: { marginBottom: "10px" }, className: element.hidden ? "d-none" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_Col4.default, { xs: 12, children: [
481
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_Container2.default, { fluid: true, className: "p-0", children: [
482
+ !showOptionalDataControlInTitle ? optionalDataControl : void 0,
483
+ properties.map((element, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Row4.default, { style: { marginBottom: "10px" }, className: element.hidden ? "d-none" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_Col4.default, { xs: 12, children: [
454
484
  " ",
455
485
  element.content
456
486
  ] }) }, index)),
457
- (0, import_utils10.canExpand)(schema, uiSchema, formData) ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Row4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_Col4.default, { xs: { offset: 9, span: 3 }, className: "py-4", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
487
+ (0, import_utils10.canExpand)(schema, uiSchema, formData) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Row4.default, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Col4.default, { xs: { offset: 9, span: 3 }, className: "py-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
458
488
  AddButton2,
459
489
  {
460
- id: (0, import_utils10.buttonId)(idSchema, "add"),
490
+ id: (0, import_utils10.buttonId)(fieldPathId, "add"),
461
491
  onClick: onAddClick(schema),
462
492
  disabled: disabled || readonly,
463
493
  className: "rjsf-object-property-expand",
@@ -469,39 +499,86 @@ function ObjectFieldTemplate({
469
499
  ] });
470
500
  }
471
501
 
502
+ // src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
503
+ var import_BsPlus2 = require("@react-icons/all-files/bs/BsPlus");
504
+ var import_jsx_runtime14 = require("react/jsx-runtime");
505
+ function OptionalDataControlsTemplate(props) {
506
+ const { id, registry, label, onAddClick, onRemoveClick } = props;
507
+ if (onAddClick) {
508
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
509
+ IconButton,
510
+ {
511
+ id,
512
+ registry,
513
+ className: "rjsf-add-optional-data",
514
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_BsPlus2.BsPlus, {}),
515
+ onClick: onAddClick,
516
+ title: label,
517
+ size: "sm",
518
+ variant: "secondary"
519
+ }
520
+ );
521
+ } else if (onRemoveClick) {
522
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
523
+ RemoveButton,
524
+ {
525
+ id,
526
+ registry,
527
+ className: "rjsf-remove-optional-data",
528
+ onClick: onRemoveClick,
529
+ title: label,
530
+ size: "sm",
531
+ variant: "secondary"
532
+ }
533
+ );
534
+ }
535
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("em", { id, children: label });
536
+ }
537
+
472
538
  // src/SubmitButton/SubmitButton.tsx
473
539
  var import_Button3 = __toESM(require("react-bootstrap/Button"), 1);
474
540
  var import_utils11 = require("@rjsf/utils");
475
- var import_jsx_runtime13 = require("react/jsx-runtime");
541
+ var import_jsx_runtime15 = require("react/jsx-runtime");
476
542
  function SubmitButton(props) {
477
543
  const { submitText, norender, props: submitButtonProps } = (0, import_utils11.getSubmitButtonOptions)(props.uiSchema);
478
544
  if (norender) {
479
545
  return null;
480
546
  }
481
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Button3.default, { variant: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
547
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Button3.default, { variant: "primary", type: "submit", ...submitButtonProps, children: submitText }) });
482
548
  }
483
549
 
484
550
  // src/TitleField/TitleField.tsx
485
551
  var import_utils12 = require("@rjsf/utils");
486
- var import_jsx_runtime14 = require("react/jsx-runtime");
552
+ var import_Row5 = __toESM(require("react-bootstrap/Row"), 1);
553
+ var import_Col5 = __toESM(require("react-bootstrap/Col"), 1);
554
+ var import_Container3 = __toESM(require("react-bootstrap/Container"), 1);
555
+ var import_jsx_runtime16 = require("react/jsx-runtime");
487
556
  function TitleField({
488
557
  id,
489
558
  title,
490
- uiSchema
559
+ uiSchema,
560
+ optionalDataControl
491
561
  }) {
492
562
  const uiOptions = (0, import_utils12.getUiOptions)(uiSchema);
493
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { id, className: "my-1", children: [
494
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h5", { children: uiOptions.title || title }),
495
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { className: "border-0 bg-secondary", style: { height: "1px" } })
563
+ let heading = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h5", { children: uiOptions.title || title });
564
+ if (optionalDataControl) {
565
+ heading = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Container3.default, { fluid: true, className: "p-0", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_Row5.default, { children: [
566
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Col5.default, { xs: "11", children: heading }),
567
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_Col5.default, { xs: "1", style: { marginLeft: "-5px" }, children: optionalDataControl })
568
+ ] }) });
569
+ }
570
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { id, className: "my-1", children: [
571
+ heading,
572
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("hr", { className: "border-0 bg-secondary mt-0", style: { height: "1px" } })
496
573
  ] });
497
574
  }
498
575
 
499
576
  // src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
500
577
  var import_utils13 = require("@rjsf/utils");
501
- var import_Row5 = __toESM(require("react-bootstrap/Row"), 1);
502
- var import_Col5 = __toESM(require("react-bootstrap/Col"), 1);
578
+ var import_Row6 = __toESM(require("react-bootstrap/Row"), 1);
579
+ var import_Col6 = __toESM(require("react-bootstrap/Col"), 1);
503
580
  var import_Form4 = __toESM(require("react-bootstrap/Form"), 1);
504
- var import_jsx_runtime15 = require("react/jsx-runtime");
581
+ var import_jsx_runtime17 = require("react/jsx-runtime");
505
582
  function WrapIfAdditionalTemplate({
506
583
  classNames,
507
584
  style,
@@ -522,14 +599,14 @@ function WrapIfAdditionalTemplate({
522
599
  const keyLabel = translateString(import_utils13.TranslatableString.KeyLabel, [label]);
523
600
  const additional = import_utils13.ADDITIONAL_PROPERTY_FLAG in schema;
524
601
  if (!additional) {
525
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: classNames, style, children });
602
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: classNames, style, children });
526
603
  }
527
604
  const handleBlur = ({ target }) => onKeyChange(target.value);
528
605
  const keyId = `${id}-key`;
529
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_Row5.default, { className: classNames, style, children: [
530
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Col5.default, { xs: 5, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_Form4.default.Group, { children: [
531
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Form4.default.Label, { htmlFor: keyId, children: keyLabel }),
532
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
606
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_Row6.default, { className: classNames, style, children: [
607
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Col6.default, { xs: 5, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_Form4.default.Group, { children: [
608
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Form4.default.Label, { htmlFor: keyId, children: keyLabel }),
609
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
533
610
  import_Form4.default.Control,
534
611
  {
535
612
  required,
@@ -542,8 +619,8 @@ function WrapIfAdditionalTemplate({
542
619
  }
543
620
  )
544
621
  ] }) }),
545
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Col5.default, { xs: 5, children }),
546
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_Col5.default, { xs: 2, className: "py-4 d-grid gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
622
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Col6.default, { xs: 5, children }),
623
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Col6.default, { xs: 2, className: "py-4 d-grid gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
547
624
  RemoveButton2,
548
625
  {
549
626
  id: (0, import_utils13.buttonId)(id, "remove"),
@@ -577,7 +654,9 @@ function generateTemplates() {
577
654
  FieldHelpTemplate,
578
655
  FieldTemplate,
579
656
  GridTemplate,
657
+ MultiSchemaFieldTemplate,
580
658
  ObjectFieldTemplate,
659
+ OptionalDataControlsTemplate,
581
660
  TitleFieldTemplate: TitleField,
582
661
  WrapIfAdditionalTemplate
583
662
  };
@@ -587,7 +666,7 @@ var Templates_default = generateTemplates();
587
666
  // src/CheckboxWidget/CheckboxWidget.tsx
588
667
  var import_utils14 = require("@rjsf/utils");
589
668
  var import_Form5 = __toESM(require("react-bootstrap/Form"), 1);
590
- var import_jsx_runtime16 = require("react/jsx-runtime");
669
+ var import_jsx_runtime18 = require("react/jsx-runtime");
591
670
  function CheckboxWidget(props) {
592
671
  const {
593
672
  id,
@@ -615,8 +694,8 @@ function CheckboxWidget(props) {
615
694
  const _onBlur = ({ target }) => onBlur(id, target && target.checked);
616
695
  const _onFocus = ({ target }) => onFocus(id, target && target.checked);
617
696
  const description = options.description || schema.description;
618
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_Form5.default.Group, { className: disabled || readonly ? "disabled" : "", "aria-describedby": (0, import_utils14.ariaDescribedByIds)(id), children: [
619
- !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
697
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Form5.default.Group, { className: disabled || readonly ? "disabled" : "", "aria-describedby": (0, import_utils14.ariaDescribedByIds)(id), children: [
698
+ !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
620
699
  DescriptionFieldTemplate,
621
700
  {
622
701
  id: (0, import_utils14.descriptionId)(id),
@@ -626,7 +705,7 @@ function CheckboxWidget(props) {
626
705
  registry
627
706
  }
628
707
  ),
629
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
708
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
630
709
  import_Form5.default.Check,
631
710
  {
632
711
  id,
@@ -648,7 +727,7 @@ function CheckboxWidget(props) {
648
727
  // src/CheckboxesWidget/CheckboxesWidget.tsx
649
728
  var import_Form6 = __toESM(require("react-bootstrap/Form"), 1);
650
729
  var import_utils15 = require("@rjsf/utils");
651
- var import_jsx_runtime17 = require("react/jsx-runtime");
730
+ var import_jsx_runtime19 = require("react/jsx-runtime");
652
731
  function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, required, onChange, onBlur, onFocus }) {
653
732
  const { enumOptions, enumDisabled, inline, emptyValue } = options;
654
733
  const checkboxesValues = Array.isArray(value) ? value : [value];
@@ -661,10 +740,10 @@ function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, r
661
740
  };
662
741
  const _onBlur = ({ target }) => onBlur(id, (0, import_utils15.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
663
742
  const _onFocus = ({ target }) => onFocus(id, (0, import_utils15.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
664
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_Form6.default.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
743
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Form6.default.Group, { children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
665
744
  const checked = (0, import_utils15.enumOptionsIsSelected)(option.value, checkboxesValues);
666
745
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
667
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
746
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
668
747
  import_Form6.default.Check,
669
748
  {
670
749
  inline,
@@ -690,7 +769,7 @@ function CheckboxesWidget({ id, disabled, options, value, autofocus, readonly, r
690
769
  // src/RadioWidget/RadioWidget.tsx
691
770
  var import_Form7 = __toESM(require("react-bootstrap/Form"), 1);
692
771
  var import_utils16 = require("@rjsf/utils");
693
- var import_jsx_runtime18 = require("react/jsx-runtime");
772
+ var import_jsx_runtime20 = require("react/jsx-runtime");
694
773
  function RadioWidget({
695
774
  id,
696
775
  options,
@@ -707,10 +786,10 @@ function RadioWidget({
707
786
  const _onBlur = ({ target }) => onBlur(id, (0, import_utils16.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
708
787
  const _onFocus = ({ target }) => onFocus(id, (0, import_utils16.enumOptionsValueForIndex)(target && target.value, enumOptions, emptyValue));
709
788
  const inline = Boolean(options && options.inline);
710
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_Form7.default.Group, { className: "mb-0", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
789
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Form7.default.Group, { className: "mb-0", children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
711
790
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
712
791
  const checked = (0, import_utils16.enumOptionsIsSelected)(option.value, value);
713
- const radio = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
792
+ const radio = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
714
793
  import_Form7.default.Check,
715
794
  {
716
795
  inline,
@@ -736,7 +815,7 @@ function RadioWidget({
736
815
  // src/RangeWidget/RangeWidget.tsx
737
816
  var import_utils17 = require("@rjsf/utils");
738
817
  var import_FormRange = __toESM(require("react-bootstrap/FormRange"), 1);
739
- var import_jsx_runtime19 = require("react/jsx-runtime");
818
+ var import_jsx_runtime21 = require("react/jsx-runtime");
740
819
  function RangeWidget(props) {
741
820
  const { id, value, disabled, onChange, onBlur, onFocus, schema } = props;
742
821
  const _onChange = ({ target: { value: value2 } }) => onChange(value2);
@@ -752,16 +831,16 @@ function RangeWidget(props) {
752
831
  onFocus: _onFocus,
753
832
  ...(0, import_utils17.rangeSpec)(schema)
754
833
  };
755
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
756
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_FormRange.default, { ...rangeProps }),
757
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "range-view", children: value })
834
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
835
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_FormRange.default, { ...rangeProps }),
836
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "range-view", children: value })
758
837
  ] });
759
838
  }
760
839
 
761
840
  // src/SelectWidget/SelectWidget.tsx
762
841
  var import_FormSelect = __toESM(require("react-bootstrap/FormSelect"), 1);
763
842
  var import_utils18 = require("@rjsf/utils");
764
- var import_jsx_runtime20 = require("react/jsx-runtime");
843
+ var import_jsx_runtime22 = require("react/jsx-runtime");
765
844
  function SelectWidget({
766
845
  schema,
767
846
  id,
@@ -789,7 +868,7 @@ function SelectWidget({
789
868
  }
790
869
  const selectedIndexes = (0, import_utils18.enumOptionsIndexForValue)(value, enumOptions, multiple);
791
870
  const showPlaceholderOption = !multiple && schema.default === void 0;
792
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
871
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
793
872
  import_FormSelect.default,
794
873
  {
795
874
  id,
@@ -814,10 +893,10 @@ function SelectWidget({
814
893
  },
815
894
  "aria-describedby": (0, import_utils18.ariaDescribedByIds)(id),
816
895
  children: [
817
- showPlaceholderOption && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { value: "", children: placeholder }),
896
+ showPlaceholderOption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: placeholder }),
818
897
  enumOptions.map(({ value: value2, label }, i) => {
819
898
  const disabled2 = Array.isArray(enumDisabled) && enumDisabled.indexOf(value2) != -1;
820
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("option", { id: label, value: String(i), disabled: disabled2, children: label }, i);
899
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { id: label, value: String(i), disabled: disabled2, children: label }, i);
821
900
  })
822
901
  ]
823
902
  }
@@ -828,7 +907,7 @@ function SelectWidget({
828
907
  var import_utils19 = require("@rjsf/utils");
829
908
  var import_FormControl = __toESM(require("react-bootstrap/FormControl"), 1);
830
909
  var import_InputGroup = __toESM(require("react-bootstrap/InputGroup"), 1);
831
- var import_jsx_runtime21 = require("react/jsx-runtime");
910
+ var import_jsx_runtime23 = require("react/jsx-runtime");
832
911
  function TextareaWidget({
833
912
  id,
834
913
  placeholder,
@@ -845,7 +924,7 @@ function TextareaWidget({
845
924
  const _onChange = ({ target: { value: value2 } }) => onChange(value2 === "" ? options.emptyValue : value2);
846
925
  const _onBlur = ({ target }) => onBlur(id, target && target.value);
847
926
  const _onFocus = ({ target }) => onFocus(id, target && target.value);
848
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_InputGroup.default, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
927
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_InputGroup.default, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
849
928
  import_FormControl.default,
850
929
  {
851
930
  id,
@@ -896,4 +975,4 @@ var Form_default = generateForm();
896
975
 
897
976
  // src/index.ts
898
977
  var index_default = Form_default;
899
- //# sourceMappingURL=index.js.map
978
+ //# sourceMappingURL=index.cjs.map