@rjsf/semantic-ui 6.6.2 → 6.7.0

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 (60) hide show
  1. package/LICENSE.md +201 -0
  2. package/dist/index.cjs +206 -187
  3. package/dist/index.cjs.map +4 -4
  4. package/dist/semantic-ui.esm.js +139 -118
  5. package/dist/semantic-ui.esm.js.map +4 -4
  6. package/dist/semantic-ui.umd.js +54 -40
  7. package/lib/AddButton/AddButton.d.ts +1 -1
  8. package/lib/ArrayFieldItemTemplate/ArrayFieldItemTemplate.d.ts +1 -1
  9. package/lib/ArrayFieldTemplate/ArrayFieldTemplate.d.ts +1 -1
  10. package/lib/BaseInputTemplate/BaseInputTemplate.d.ts +1 -1
  11. package/lib/BaseInputTemplate/BaseInputTemplate.js +2 -2
  12. package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
  13. package/lib/CheckboxWidget/CheckboxWidget.d.ts +1 -1
  14. package/lib/CheckboxWidget/CheckboxWidget.js +4 -4
  15. package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
  16. package/lib/CheckboxesWidget/CheckboxesWidget.d.ts +1 -1
  17. package/lib/CyclicSchemaExpandTemplate/CyclicSchemaExpandTemplate.d.ts +6 -0
  18. package/lib/CyclicSchemaExpandTemplate/CyclicSchemaExpandTemplate.js +14 -0
  19. package/lib/CyclicSchemaExpandTemplate/CyclicSchemaExpandTemplate.js.map +1 -0
  20. package/lib/CyclicSchemaExpandTemplate/index.d.ts +2 -0
  21. package/lib/CyclicSchemaExpandTemplate/index.js +3 -0
  22. package/lib/CyclicSchemaExpandTemplate/index.js.map +1 -0
  23. package/lib/DescriptionField/DescriptionField.d.ts +1 -1
  24. package/lib/ErrorList/ErrorList.d.ts +1 -1
  25. package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +1 -1
  26. package/lib/FieldHelpTemplate/FieldHelpTemplate.d.ts +1 -1
  27. package/lib/FieldTemplate/FieldTemplate.d.ts +1 -1
  28. package/lib/GridTemplate/GridTemplate.d.ts +1 -1
  29. package/lib/IconButton/IconButton.d.ts +6 -6
  30. package/lib/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.d.ts +1 -1
  31. package/lib/ObjectFieldTemplate/ObjectFieldTemplate.d.ts +1 -1
  32. package/lib/OptionalDataControlsTemplate/OptionalDataControlsTemplate.d.ts +1 -1
  33. package/lib/RadioWidget/RadioWidget.d.ts +1 -1
  34. package/lib/RangeWidget/RangeWidget.d.ts +1 -1
  35. package/lib/RangeWidget/RangeWidget.js +3 -3
  36. package/lib/RangeWidget/RangeWidget.js.map +1 -1
  37. package/lib/SelectWidget/SelectWidget.d.ts +1 -1
  38. package/lib/SelectWidget/SelectWidget.js +6 -5
  39. package/lib/SelectWidget/SelectWidget.js.map +1 -1
  40. package/lib/SubmitButton/SubmitButton.d.ts +1 -1
  41. package/lib/Templates/Templates.js +2 -0
  42. package/lib/Templates/Templates.js.map +1 -1
  43. package/lib/TextareaWidget/TextareaWidget.d.ts +1 -1
  44. package/lib/TextareaWidget/TextareaWidget.js +3 -3
  45. package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
  46. package/lib/TitleField/TitleField.d.ts +1 -1
  47. package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.d.ts +1 -1
  48. package/lib/tsconfig.tsbuildinfo +1 -1
  49. package/lib/util.js +4 -3
  50. package/lib/util.js.map +1 -1
  51. package/package.json +25 -23
  52. package/src/BaseInputTemplate/BaseInputTemplate.tsx +2 -2
  53. package/src/CheckboxWidget/CheckboxWidget.tsx +4 -4
  54. package/src/CyclicSchemaExpandTemplate/CyclicSchemaExpandTemplate.tsx +25 -0
  55. package/src/CyclicSchemaExpandTemplate/index.ts +2 -0
  56. package/src/RangeWidget/RangeWidget.tsx +3 -3
  57. package/src/SelectWidget/SelectWidget.tsx +28 -22
  58. package/src/Templates/Templates.ts +2 -0
  59. package/src/TextareaWidget/TextareaWidget.tsx +3 -3
  60. package/src/util.tsx +3 -3
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ module.exports = __toCommonJS(index_exports);
46
46
  var import_core4 = require("@rjsf/core");
47
47
 
48
48
  // src/Theme/Theme.ts
49
- var import_semantic_ui_react20 = require("semantic-ui-react");
49
+ var import_semantic_ui_react21 = require("semantic-ui-react");
50
50
 
51
51
  // src/AddButton/AddButton.tsx
52
52
  var import_utils = require("@rjsf/utils");
@@ -103,10 +103,10 @@ function getSemanticErrorProps({
103
103
  options = {},
104
104
  defaultProps = { size: "small", pointing: "above" }
105
105
  }) {
106
- const formContextProps = formContext.semantic && formContext.semantic.errorOptions;
106
+ const formContextProps = formContext.semantic?.errorOptions;
107
107
  const semanticOptions = (0, import_utils2.getUiOptions)(uiSchema).semantic;
108
- const schemaProps = semanticOptions && semanticOptions.errorOptions;
109
- const optionProps = options.semantic && options.semantic.errorOptions;
108
+ const schemaProps = semanticOptions?.errorOptions;
109
+ const optionProps = options.semantic?.errorOptions;
110
110
  return { ...defaultProps, ...schemaProps, ...optionProps, ...formContextProps };
111
111
  }
112
112
  function cleanClassNames(classNameArr, omit = []) {
@@ -278,8 +278,8 @@ function BaseInputTemplate(props) {
278
278
  options
279
279
  });
280
280
  const handleChange = ({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue);
281
- const handleBlur = () => onBlur && onBlur(id, value);
282
- const handleFocus = () => onFocus && onFocus(id, value);
281
+ const handleBlur = () => onBlur?.(id, value);
282
+ const handleFocus = () => onFocus?.(id, value);
283
283
  const handleClear = (0, import_react.useCallback)(
284
284
  (e) => {
285
285
  e.preventDefault();
@@ -316,40 +316,54 @@ function BaseInputTemplate(props) {
316
316
  ] });
317
317
  }
318
318
 
319
+ // src/CyclicSchemaExpandTemplate/CyclicSchemaExpandTemplate.tsx
320
+ var import_utils6 = require("@rjsf/utils");
321
+ var import_semantic_ui_react4 = require("semantic-ui-react");
322
+ var import_jsx_runtime6 = require("react/jsx-runtime");
323
+ function CyclicSchemaExpandTemplate(props) {
324
+ const { name, fieldPathId, registry, onExpand } = props;
325
+ const { translateString } = registry;
326
+ const buttonId4 = `${fieldPathId[import_utils6.ID_KEY]}-button`;
327
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { marginTop: "1rem", marginBottom: "1rem" }, children: [
328
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { style: { color: "red" }, children: translateString(import_utils6.TranslatableString.CycleDetected, [name]) }),
329
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_semantic_ui_react4.Button, { id: buttonId4, type: "button", size: "mini", onClick: () => onExpand(fieldPathId[import_utils6.ID_KEY]), children: translateString(import_utils6.TranslatableString.ExpandButton) })
330
+ ] });
331
+ }
332
+
319
333
  // src/DescriptionField/DescriptionField.tsx
320
334
  var import_core2 = require("@rjsf/core");
321
- var import_jsx_runtime6 = require("react/jsx-runtime");
335
+ var import_jsx_runtime7 = require("react/jsx-runtime");
322
336
  function DescriptionField(props) {
323
337
  const { id, description, registry, uiSchema } = props;
324
338
  if (!description) {
325
339
  return null;
326
340
  }
327
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { id, className: "sui-description", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core2.RichDescription, { description, registry, uiSchema }) });
341
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { id, className: "sui-description", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core2.RichDescription, { description, registry, uiSchema }) });
328
342
  }
329
343
 
330
344
  // src/ErrorList/ErrorList.tsx
331
- var import_utils6 = require("@rjsf/utils");
332
- var import_semantic_ui_react4 = require("semantic-ui-react");
333
- var import_jsx_runtime7 = require("react/jsx-runtime");
345
+ var import_utils7 = require("@rjsf/utils");
346
+ var import_semantic_ui_react5 = require("semantic-ui-react");
347
+ var import_jsx_runtime8 = require("react/jsx-runtime");
334
348
  function ErrorList({
335
349
  errors,
336
350
  registry
337
351
  }) {
338
352
  const { translateString } = registry;
339
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_semantic_ui_react4.Message, { negative: true, children: [
340
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_semantic_ui_react4.Message.Header, { children: translateString(import_utils6.TranslatableString.ErrorsLabel) }),
341
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_semantic_ui_react4.Message.List, { children: errors.map((error, index) => (
353
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_semantic_ui_react5.Message, { negative: true, children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.Message.Header, { children: translateString(import_utils7.TranslatableString.ErrorsLabel) }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.Message.List, { children: errors.map((error, index) => (
342
356
  // oxlint-disable-next-line react/no-array-index-key
343
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_semantic_ui_react4.Message.Item, { children: error.stack }, `error-${index}`)
357
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.Message.Item, { children: error.stack }, `error-${index}`)
344
358
  )) })
345
359
  ] });
346
360
  }
347
361
 
348
362
  // src/FieldErrorTemplate/FieldErrorTemplate.tsx
349
- var import_utils7 = require("@rjsf/utils");
363
+ var import_utils8 = require("@rjsf/utils");
350
364
  var import_uniqueId = __toESM(require("lodash/uniqueId"), 1);
351
- var import_semantic_ui_react5 = require("semantic-ui-react");
352
- var import_jsx_runtime8 = require("react/jsx-runtime");
365
+ var import_semantic_ui_react6 = require("semantic-ui-react");
366
+ var import_jsx_runtime9 = require("react/jsx-runtime");
353
367
  var DEFAULT_OPTIONS = {
354
368
  options: {
355
369
  pointing: "above",
@@ -365,29 +379,29 @@ function FieldErrorTemplate({ errors, fieldPathId, uiSchema, registry }) {
365
379
  });
366
380
  const { pointing, size } = options;
367
381
  if (errors && errors.length > 0) {
368
- const id = (0, import_utils7.errorId)(fieldPathId);
369
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.Label, { id, color: "red", pointing: pointing || "above", size: size || "small", basic: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.List, { bulleted: true, children: errors.map((error) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_semantic_ui_react5.List.Item, { children: error }, (0, import_uniqueId.default)("field-error-"))) }) });
382
+ const id = (0, import_utils8.errorId)(fieldPathId);
383
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.Label, { id, color: "red", pointing: pointing || "above", size: size || "small", basic: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.List, { bulleted: true, children: errors.map((error) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.List.Item, { children: error }, (0, import_uniqueId.default)("field-error-"))) }) });
370
384
  }
371
385
  return null;
372
386
  }
373
387
 
374
388
  // src/FieldHelpTemplate/FieldHelpTemplate.tsx
375
389
  var import_core3 = require("@rjsf/core");
376
- var import_utils8 = require("@rjsf/utils");
377
- var import_semantic_ui_react6 = require("semantic-ui-react");
378
- var import_jsx_runtime9 = require("react/jsx-runtime");
390
+ var import_utils9 = require("@rjsf/utils");
391
+ var import_semantic_ui_react7 = require("semantic-ui-react");
392
+ var import_jsx_runtime10 = require("react/jsx-runtime");
379
393
  function FieldHelpTemplate(props) {
380
394
  const { fieldPathId, help, uiSchema, registry } = props;
381
395
  if (help) {
382
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.Message, { size: "mini", info: true, id: (0, import_utils8.helpId)(fieldPathId), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core3.RichHelp, { help, registry, uiSchema }) });
396
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_semantic_ui_react7.Message, { size: "mini", info: true, id: (0, import_utils9.helpId)(fieldPathId), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core3.RichHelp, { help, registry, uiSchema }) });
383
397
  }
384
398
  return null;
385
399
  }
386
400
 
387
401
  // src/FieldTemplate/FieldTemplate.tsx
388
- var import_utils9 = require("@rjsf/utils");
389
- var import_semantic_ui_react7 = require("semantic-ui-react");
390
- var import_jsx_runtime10 = require("react/jsx-runtime");
402
+ var import_utils10 = require("@rjsf/utils");
403
+ var import_semantic_ui_react8 = require("semantic-ui-react");
404
+ var import_jsx_runtime11 = require("react/jsx-runtime");
391
405
  function FieldTemplate(props) {
392
406
  const {
393
407
  id,
@@ -411,17 +425,17 @@ function FieldTemplate(props) {
411
425
  formContext: registry.formContext
412
426
  });
413
427
  const { wrapLabel, wrapContent } = semanticProps;
414
- const uiOptions = (0, import_utils9.getUiOptions)(uiSchema);
415
- const WrapIfAdditionalTemplate2 = (0, import_utils9.getTemplate)(
428
+ const uiOptions = (0, import_utils10.getUiOptions)(uiSchema);
429
+ const WrapIfAdditionalTemplate2 = (0, import_utils10.getTemplate)(
416
430
  "WrapIfAdditionalTemplate",
417
431
  registry,
418
432
  uiOptions
419
433
  );
420
434
  if (hidden) {
421
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { display: "none" }, children });
435
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { style: { display: "none" }, children });
422
436
  }
423
437
  const isCheckbox = uiOptions.widget === "checkbox";
424
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
438
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
425
439
  WrapIfAdditionalTemplate2,
426
440
  {
427
441
  classNames,
@@ -434,9 +448,9 @@ function FieldTemplate(props) {
434
448
  schema,
435
449
  uiSchema,
436
450
  ...otherProps,
437
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_semantic_ui_react7.Form.Group, { widths: "equal", grouped: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(MaybeWrap, { wrap: wrapContent, className: "sui-field-content", children: [
451
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_semantic_ui_react8.Form.Group, { widths: "equal", grouped: true, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(MaybeWrap, { wrap: wrapContent, className: "sui-field-content", children: [
438
452
  children,
439
- displayLabel && rawDescription && !isCheckbox && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MaybeWrap, { wrap: wrapLabel, className: "sui-field-label", children: description }),
453
+ displayLabel && rawDescription && !isCheckbox && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MaybeWrap, { wrap: wrapLabel, className: "sui-field-label", children: description }),
440
454
  help,
441
455
  errors
442
456
  ] }) }, id)
@@ -445,25 +459,25 @@ function FieldTemplate(props) {
445
459
  }
446
460
 
447
461
  // src/GridTemplate/GridTemplate.tsx
448
- var import_semantic_ui_react8 = require("semantic-ui-react");
449
- var import_jsx_runtime11 = require("react/jsx-runtime");
462
+ var import_semantic_ui_react9 = require("semantic-ui-react");
463
+ var import_jsx_runtime12 = require("react/jsx-runtime");
450
464
  function GridTemplate(props) {
451
465
  const { children, column, ...rest } = props;
452
466
  if (column) {
453
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_semantic_ui_react8.Grid.Column, { ...rest, children });
467
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_semantic_ui_react9.Grid.Column, { ...rest, children });
454
468
  }
455
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_semantic_ui_react8.Grid, { ...rest, children });
469
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_semantic_ui_react9.Grid, { ...rest, children });
456
470
  }
457
471
 
458
472
  // src/IconButton/IconButton.tsx
459
473
  var import_react2 = require("react");
460
- var import_utils10 = require("@rjsf/utils");
461
- var import_semantic_ui_react9 = require("semantic-ui-react");
462
- var import_jsx_runtime12 = require("react/jsx-runtime");
474
+ var import_utils11 = require("@rjsf/utils");
475
+ var import_semantic_ui_react10 = require("semantic-ui-react");
476
+ var import_jsx_runtime13 = require("react/jsx-runtime");
463
477
  function IconButtonFn(props) {
464
478
  const { icon, iconType, color, className, uiSchema, registry, ...otherProps } = props;
465
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
466
- import_semantic_ui_react9.Button,
479
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
480
+ import_semantic_ui_react10.Button,
467
481
  {
468
482
  icon,
469
483
  size: iconType,
@@ -478,52 +492,52 @@ function CopyButtonFn(props) {
478
492
  const {
479
493
  registry: { translateString }
480
494
  } = props;
481
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { title: translateString(import_utils10.TranslatableString.CopyButton), ...props, icon: "copy" });
495
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: translateString(import_utils11.TranslatableString.CopyButton), ...props, icon: "copy" });
482
496
  }
483
497
  var CopyButton = (0, import_react2.memo)(CopyButtonFn);
484
498
  function MoveDownButtonFn(props) {
485
499
  const {
486
500
  registry: { translateString }
487
501
  } = props;
488
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { title: translateString(import_utils10.TranslatableString.MoveDownButton), ...props, icon: "angle down" });
502
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: translateString(import_utils11.TranslatableString.MoveDownButton), ...props, icon: "angle down" });
489
503
  }
490
504
  var MoveDownButton = (0, import_react2.memo)(MoveDownButtonFn);
491
505
  function MoveUpButtonFn(props) {
492
506
  const {
493
507
  registry: { translateString }
494
508
  } = props;
495
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { title: translateString(import_utils10.TranslatableString.MoveUpButton), ...props, icon: "angle up" });
509
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: translateString(import_utils11.TranslatableString.MoveUpButton), ...props, icon: "angle up" });
496
510
  }
497
511
  var MoveUpButton = (0, import_react2.memo)(MoveUpButtonFn);
498
512
  function RemoveButtonFn(props) {
499
513
  const {
500
514
  registry: { translateString }
501
515
  } = props;
502
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { title: translateString(import_utils10.TranslatableString.RemoveButton), ...props, icon: "trash" });
516
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: translateString(import_utils11.TranslatableString.RemoveButton), ...props, icon: "trash" });
503
517
  }
504
518
  var RemoveButton = (0, import_react2.memo)(RemoveButtonFn);
505
519
  function ClearButtonFn(props) {
506
520
  const {
507
521
  registry: { translateString }
508
522
  } = props;
509
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { title: translateString(import_utils10.TranslatableString.ClearButton), ...props, icon: "close" });
523
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButton, { title: translateString(import_utils11.TranslatableString.ClearButton), ...props, icon: "close" });
510
524
  }
511
525
  var ClearButton = (0, import_react2.memo)(ClearButtonFn);
512
526
 
513
527
  // src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx
514
- var import_jsx_runtime13 = require("react/jsx-runtime");
528
+ var import_jsx_runtime14 = require("react/jsx-runtime");
515
529
  function MultiSchemaFieldTemplate(props) {
516
530
  const { selector, optionSchemaField } = props;
517
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
518
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children: selector }),
531
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
532
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: selector }),
519
533
  optionSchemaField
520
534
  ] });
521
535
  }
522
536
 
523
537
  // src/ObjectFieldTemplate/ObjectFieldTemplate.tsx
524
- var import_utils11 = require("@rjsf/utils");
525
- var import_semantic_ui_react10 = require("semantic-ui-react");
526
- var import_jsx_runtime14 = require("react/jsx-runtime");
538
+ var import_utils12 = require("@rjsf/utils");
539
+ var import_semantic_ui_react11 = require("semantic-ui-react");
540
+ var import_jsx_runtime15 = require("react/jsx-runtime");
527
541
  function ObjectFieldTemplate(props) {
528
542
  const {
529
543
  description,
@@ -540,9 +554,9 @@ function ObjectFieldTemplate(props) {
540
554
  fieldPathId,
541
555
  registry
542
556
  } = props;
543
- const uiOptions = (0, import_utils11.getUiOptions)(uiSchema);
544
- const TitleFieldTemplate = (0, import_utils11.getTemplate)("TitleFieldTemplate", registry, uiOptions);
545
- const DescriptionFieldTemplate = (0, import_utils11.getTemplate)(
557
+ const uiOptions = (0, import_utils12.getUiOptions)(uiSchema);
558
+ const TitleFieldTemplate = (0, import_utils12.getTemplate)("TitleFieldTemplate", registry, uiOptions);
559
+ const DescriptionFieldTemplate = (0, import_utils12.getTemplate)(
546
560
  "DescriptionFieldTemplate",
547
561
  registry,
548
562
  uiOptions
@@ -551,11 +565,11 @@ function ObjectFieldTemplate(props) {
551
565
  const {
552
566
  ButtonTemplates: { AddButton: AddButton2 }
553
567
  } = registry.templates;
554
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
555
- title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
568
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
569
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
556
570
  TitleFieldTemplate,
557
571
  {
558
- id: (0, import_utils11.titleId)(fieldPathId),
572
+ id: (0, import_utils12.titleId)(fieldPathId),
559
573
  title,
560
574
  required,
561
575
  schema,
@@ -564,10 +578,10 @@ function ObjectFieldTemplate(props) {
564
578
  optionalDataControl: showOptionalDataControlInTitle ? optionalDataControl : void 0
565
579
  }
566
580
  ),
567
- description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
581
+ description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
568
582
  DescriptionFieldTemplate,
569
583
  {
570
- id: (0, import_utils11.descriptionId)(fieldPathId),
584
+ id: (0, import_utils12.descriptionId)(fieldPathId),
571
585
  description,
572
586
  schema,
573
587
  uiSchema,
@@ -576,7 +590,7 @@ function ObjectFieldTemplate(props) {
576
590
  ),
577
591
  !showOptionalDataControlInTitle ? optionalDataControl : void 0,
578
592
  properties.map((prop) => prop.content),
579
- (0, import_utils11.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_semantic_ui_react10.Grid.Column, { width: 16, verticalAlign: "middle", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_semantic_ui_react10.Grid.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
593
+ (0, import_utils12.canExpand)(schema, uiSchema, formData) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_semantic_ui_react11.Grid.Column, { width: 16, verticalAlign: "middle", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_semantic_ui_react11.Grid.Row, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
580
594
  "div",
581
595
  {
582
596
  style: {
@@ -584,10 +598,10 @@ function ObjectFieldTemplate(props) {
584
598
  position: "relative",
585
599
  textAlign: "right"
586
600
  },
587
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
601
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
588
602
  AddButton2,
589
603
  {
590
- id: (0, import_utils11.buttonId)(fieldPathId, "add"),
604
+ id: (0, import_utils12.buttonId)(fieldPathId, "add"),
591
605
  className: "rjsf-object-property-expand",
592
606
  onClick: onAddProperty,
593
607
  disabled: disabled || readonly,
@@ -601,11 +615,11 @@ function ObjectFieldTemplate(props) {
601
615
  }
602
616
 
603
617
  // src/OptionalDataControlsTemplate/OptionalDataControlsTemplate.tsx
604
- var import_jsx_runtime15 = require("react/jsx-runtime");
618
+ var import_jsx_runtime16 = require("react/jsx-runtime");
605
619
  function OptionalDataControlsTemplate(props) {
606
620
  const { id, registry, label, onAddClick, onRemoveClick } = props;
607
621
  if (onAddClick) {
608
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
622
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
609
623
  AddButton,
610
624
  {
611
625
  id,
@@ -618,7 +632,7 @@ function OptionalDataControlsTemplate(props) {
618
632
  );
619
633
  }
620
634
  if (onRemoveClick) {
621
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
635
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
622
636
  RemoveButton,
623
637
  {
624
638
  id,
@@ -630,24 +644,24 @@ function OptionalDataControlsTemplate(props) {
630
644
  }
631
645
  );
632
646
  }
633
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("em", { id, children: label });
647
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("em", { id, children: label });
634
648
  }
635
649
 
636
650
  // src/SubmitButton/SubmitButton.tsx
637
- var import_utils12 = require("@rjsf/utils");
638
- var import_semantic_ui_react11 = require("semantic-ui-react");
639
- var import_jsx_runtime16 = require("react/jsx-runtime");
651
+ var import_utils13 = require("@rjsf/utils");
652
+ var import_semantic_ui_react12 = require("semantic-ui-react");
653
+ var import_jsx_runtime17 = require("react/jsx-runtime");
640
654
  function SubmitButton({ uiSchema }) {
641
- const { submitText, norender, props: submitButtonProps = {} } = (0, import_utils12.getSubmitButtonOptions)(uiSchema);
655
+ const { submitText, norender, props: submitButtonProps = {} } = (0, import_utils13.getSubmitButtonOptions)(uiSchema);
642
656
  if (norender) {
643
657
  return null;
644
658
  }
645
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_semantic_ui_react11.Button, { type: "submit", primary: true, ...submitButtonProps, children: submitText });
659
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Button, { type: "submit", primary: true, ...submitButtonProps, children: submitText });
646
660
  }
647
661
 
648
662
  // src/TitleField/TitleField.tsx
649
- var import_semantic_ui_react12 = require("semantic-ui-react");
650
- var import_jsx_runtime17 = require("react/jsx-runtime");
663
+ var import_semantic_ui_react13 = require("semantic-ui-react");
664
+ var import_jsx_runtime18 = require("react/jsx-runtime");
651
665
  var DEFAULT_OPTIONS2 = {
652
666
  inverted: false,
653
667
  dividing: true
@@ -662,20 +676,20 @@ function TitleField({
662
676
  uiSchema,
663
677
  defaultSchemaProps: DEFAULT_OPTIONS2
664
678
  });
665
- let heading = title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Header, { id, ...semanticProps, as: "h5", children: title }) : null;
679
+ let heading = title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Header, { id, ...semanticProps, as: "h5", children: title }) : null;
666
680
  if (optionalDataControl) {
667
- heading = /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_semantic_ui_react12.Grid, { colums: 2, relaxed: true, children: [
668
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Grid.Column, { width: 14, style: { paddingRight: 0 }, children: heading }),
669
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_semantic_ui_react12.Grid.Column, { width: 2, children: optionalDataControl })
681
+ heading = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_semantic_ui_react13.Grid, { colums: 2, relaxed: true, children: [
682
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { width: 14, style: { paddingRight: 0 }, children: heading }),
683
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { width: 2, children: optionalDataControl })
670
684
  ] });
671
685
  }
672
686
  return heading;
673
687
  }
674
688
 
675
689
  // src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
676
- var import_utils13 = require("@rjsf/utils");
677
- var import_semantic_ui_react13 = require("semantic-ui-react");
678
- var import_jsx_runtime18 = require("react/jsx-runtime");
690
+ var import_utils14 = require("@rjsf/utils");
691
+ var import_semantic_ui_react14 = require("semantic-ui-react");
692
+ var import_jsx_runtime19 = require("react/jsx-runtime");
679
693
  function WrapIfAdditionalTemplate(props) {
680
694
  const {
681
695
  children,
@@ -696,16 +710,16 @@ function WrapIfAdditionalTemplate(props) {
696
710
  } = props;
697
711
  const { templates, translateString } = registry;
698
712
  const { RemoveButton: RemoveButton2 } = templates.ButtonTemplates;
699
- const keyLabel = translateString(import_utils13.TranslatableString.KeyLabel, [label]);
713
+ const keyLabel = translateString(import_utils14.TranslatableString.KeyLabel, [label]);
700
714
  const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;
701
- const additional = import_utils13.ADDITIONAL_PROPERTY_FLAG in schema;
715
+ const additional = import_utils14.ADDITIONAL_PROPERTY_FLAG in schema;
702
716
  const margin = rawDescription ? 4 : 24;
703
717
  if (!additional) {
704
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children });
718
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: classNames, style, children });
705
719
  }
706
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: classNames, style, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_semantic_ui_react13.Grid.Row, { children: [
707
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { width: 7, className: "form-additional", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Form.Group, { widths: "equal", grouped: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
708
- import_semantic_ui_react13.Form.Input,
720
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: classNames, style, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_semantic_ui_react14.Grid.Row, { children: [
721
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Grid.Column, { width: 7, className: "form-additional", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Form.Group, { widths: "equal", grouped: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
722
+ import_semantic_ui_react14.Form.Input,
709
723
  {
710
724
  className: "form-group",
711
725
  hasFeedback: true,
@@ -723,11 +737,11 @@ function WrapIfAdditionalTemplate(props) {
723
737
  },
724
738
  label
725
739
  ) }) }),
726
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { width: 7, className: "form-additional", verticalAlign: "middle", children }),
727
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_semantic_ui_react13.Grid.Column, { verticalAlign: "middle", style: displayLabel ? { marginTop: `${margin}px` } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
740
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Grid.Column, { width: 7, className: "form-additional", verticalAlign: "middle", children }),
741
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Grid.Column, { verticalAlign: "middle", style: displayLabel ? { marginTop: `${margin}px` } : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
728
742
  RemoveButton2,
729
743
  {
730
- id: (0, import_utils13.buttonId)(id, "remove"),
744
+ id: (0, import_utils14.buttonId)(id, "remove"),
731
745
  iconType: "mini",
732
746
  className: "rjsf-object-property-remove",
733
747
  disabled: disabled || readonly,
@@ -745,6 +759,7 @@ function generateTemplates() {
745
759
  ArrayFieldItemTemplate,
746
760
  ArrayFieldTemplate,
747
761
  BaseInputTemplate,
762
+ CyclicSchemaExpandTemplate,
748
763
  ButtonTemplates: {
749
764
  AddButton,
750
765
  CopyButton,
@@ -770,9 +785,9 @@ function generateTemplates() {
770
785
  var Templates_default = generateTemplates();
771
786
 
772
787
  // src/CheckboxesWidget/CheckboxesWidget.tsx
773
- var import_utils14 = require("@rjsf/utils");
774
- var import_semantic_ui_react14 = require("semantic-ui-react");
775
- var import_jsx_runtime19 = require("react/jsx-runtime");
788
+ var import_utils15 = require("@rjsf/utils");
789
+ var import_semantic_ui_react15 = require("semantic-ui-react");
790
+ var import_jsx_runtime20 = require("react/jsx-runtime");
776
791
  function CheckboxesWidget(props) {
777
792
  const {
778
793
  id,
@@ -792,7 +807,7 @@ function CheckboxesWidget(props) {
792
807
  rawErrors = [],
793
808
  registry
794
809
  } = props;
795
- const TitleFieldTemplate = (0, import_utils14.getTemplate)("TitleFieldTemplate", registry, options);
810
+ const TitleFieldTemplate = (0, import_utils15.getTemplate)("TitleFieldTemplate", registry, options);
796
811
  const { enumOptions, enumDisabled, inline } = options;
797
812
  const checkboxesValues = Array.isArray(value) ? value : [value];
798
813
  const semanticProps = getSemanticProps({
@@ -805,23 +820,23 @@ function CheckboxesWidget(props) {
805
820
  });
806
821
  const handleChange = (index) => ({ target: { checked } }) => {
807
822
  if (checked) {
808
- onChange((0, import_utils14.enumOptionsSelectValue)(index, checkboxesValues, enumOptions));
823
+ onChange((0, import_utils15.enumOptionsSelectValue)(index, checkboxesValues, enumOptions));
809
824
  } else {
810
- onChange((0, import_utils14.enumOptionsDeselectValue)(index, checkboxesValues, enumOptions));
825
+ onChange((0, import_utils15.enumOptionsDeselectValue)(index, checkboxesValues, enumOptions));
811
826
  }
812
827
  };
813
828
  const handleBlur = () => onBlur(id, value);
814
829
  const handleFocus = () => onFocus(id, value);
815
830
  const inlineOption = inline ? { inline: true } : { grouped: true };
816
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
817
- !hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TitleFieldTemplate, { id: (0, import_utils14.titleId)(id), title: label, schema, uiSchema, registry }),
818
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_semantic_ui_react14.Form.Group, { id, name: htmlName || id, ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
819
- const checked = (0, import_utils14.enumOptionsIsSelected)(option.value, checkboxesValues);
831
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
832
+ !hideLabel && !!label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TitleFieldTemplate, { id: (0, import_utils15.titleId)(id), title: label, schema, uiSchema, registry }),
833
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_semantic_ui_react15.Form.Group, { id, name: htmlName || id, ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
834
+ const checked = (0, import_utils15.enumOptionsIsSelected)(option.value, checkboxesValues);
820
835
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
821
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
822
- import_semantic_ui_react14.Form.Checkbox,
836
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
837
+ import_semantic_ui_react15.Form.Checkbox,
823
838
  {
824
- id: (0, import_utils14.optionId)(id, index),
839
+ id: (0, import_utils15.optionId)(id, index),
825
840
  name: htmlName || id,
826
841
  label: option.label,
827
842
  ...semanticProps,
@@ -832,7 +847,7 @@ function CheckboxesWidget(props) {
832
847
  onChange: handleChange(index),
833
848
  onBlur: handleBlur,
834
849
  onFocus: handleFocus,
835
- "aria-describedby": (0, import_utils14.ariaDescribedByIds)(id)
850
+ "aria-describedby": (0, import_utils15.ariaDescribedByIds)(id)
836
851
  },
837
852
  String(option.value)
838
853
  );
@@ -841,9 +856,9 @@ function CheckboxesWidget(props) {
841
856
  }
842
857
 
843
858
  // src/CheckboxWidget/CheckboxWidget.tsx
844
- var import_utils15 = require("@rjsf/utils");
845
- var import_semantic_ui_react15 = require("semantic-ui-react");
846
- var import_jsx_runtime20 = require("react/jsx-runtime");
859
+ var import_utils16 = require("@rjsf/utils");
860
+ var import_semantic_ui_react16 = require("semantic-ui-react");
861
+ var import_jsx_runtime21 = require("react/jsx-runtime");
847
862
  function CheckboxWidget(props) {
848
863
  const {
849
864
  id,
@@ -851,7 +866,7 @@ function CheckboxWidget(props) {
851
866
  value,
852
867
  disabled,
853
868
  readonly,
854
- label = "",
869
+ label,
855
870
  hideLabel,
856
871
  autofocus,
857
872
  onChange,
@@ -871,30 +886,30 @@ function CheckboxWidget(props) {
871
886
  inverted: "false"
872
887
  }
873
888
  });
874
- const DescriptionFieldTemplate = (0, import_utils15.getTemplate)(
889
+ const DescriptionFieldTemplate = (0, import_utils16.getTemplate)(
875
890
  "DescriptionFieldTemplate",
876
891
  registry,
877
892
  options
878
893
  );
879
- const required = (0, import_utils15.schemaRequiresTrueValue)(schema);
894
+ const required = (0, import_utils16.schemaRequiresTrueValue)(schema);
880
895
  const checked = value === "true" || value === true;
881
- const handleChange = (_, data) => onChange && onChange(data.checked);
882
- const handleBlur = () => onBlur && onBlur(id, value);
883
- const handleFocus = () => onFocus && onFocus(id, value);
896
+ const handleChange = (_, data) => onChange?.(data.checked);
897
+ const handleBlur = () => onBlur?.(id, value);
898
+ const handleFocus = () => onFocus?.(id, value);
884
899
  const description = options.description ?? schema.description;
885
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
886
- !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
900
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
901
+ !hideLabel && description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
887
902
  DescriptionFieldTemplate,
888
903
  {
889
- id: (0, import_utils15.descriptionId)(id),
904
+ id: (0, import_utils16.descriptionId)(id),
890
905
  description,
891
906
  schema,
892
907
  uiSchema,
893
908
  registry
894
909
  }
895
910
  ),
896
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
897
- import_semantic_ui_react15.Form.Checkbox,
911
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
912
+ import_semantic_ui_react16.Form.Checkbox,
898
913
  {
899
914
  id,
900
915
  name: htmlName || id,
@@ -907,17 +922,17 @@ function CheckboxWidget(props) {
907
922
  onBlur: handleBlur,
908
923
  onFocus: handleFocus,
909
924
  required,
910
- label: (0, import_utils15.labelValue)(label, hideLabel, false),
911
- "aria-describedby": (0, import_utils15.ariaDescribedByIds)(id)
925
+ label: (0, import_utils16.labelValue)(label, hideLabel, false),
926
+ "aria-describedby": (0, import_utils16.ariaDescribedByIds)(id)
912
927
  }
913
928
  )
914
929
  ] });
915
930
  }
916
931
 
917
932
  // src/RadioWidget/RadioWidget.tsx
918
- var import_utils16 = require("@rjsf/utils");
919
- var import_semantic_ui_react16 = require("semantic-ui-react");
920
- var import_jsx_runtime21 = require("react/jsx-runtime");
933
+ var import_utils17 = require("@rjsf/utils");
934
+ var import_semantic_ui_react17 = require("semantic-ui-react");
935
+ var import_jsx_runtime22 = require("react/jsx-runtime");
921
936
  var import_react3 = require("react");
922
937
  function RadioWidget(props) {
923
938
  const {
@@ -936,46 +951,46 @@ function RadioWidget(props) {
936
951
  rawErrors = []
937
952
  } = props;
938
953
  const { enumOptions, enumDisabled, emptyValue } = options;
939
- const optionValueFormat = (0, import_utils16.getOptionValueFormat)(options);
954
+ const optionValueFormat = (0, import_utils17.getOptionValueFormat)(options);
940
955
  const semanticProps = getSemanticProps({
941
956
  formContext: registry.formContext,
942
957
  options,
943
958
  uiSchema
944
959
  });
945
- const handleChange = (_, { value: eventValue }) => onChange((0, import_utils16.enumOptionValueDecoder)(String(eventValue), enumOptions, optionValueFormat, emptyValue));
960
+ const handleChange = (_, { value: eventValue }) => onChange((0, import_utils17.enumOptionValueDecoder)(String(eventValue), enumOptions, optionValueFormat, emptyValue));
946
961
  const handleBlur = () => onBlur(id, value);
947
962
  const handleFocus = () => onFocus(id, value);
948
963
  const inlineOption = options.inline ? { inline: true } : { grouped: true };
949
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_semantic_ui_react16.Form.Group, { ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
950
- const checked = (0, import_utils16.enumOptionsIsSelected)(option.value, value);
964
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_semantic_ui_react17.Form.Group, { ...inlineOption, children: Array.isArray(enumOptions) && enumOptions.map((option, index) => {
965
+ const checked = (0, import_utils17.enumOptionsIsSelected)(option.value, value);
951
966
  const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
952
967
  return /* @__PURE__ */ (0, import_react3.createElement)(
953
- import_semantic_ui_react16.Form.Field,
968
+ import_semantic_ui_react17.Form.Field,
954
969
  {
955
970
  required,
956
- control: import_semantic_ui_react16.Radio,
957
- id: (0, import_utils16.optionId)(id, index),
971
+ control: import_semantic_ui_react17.Radio,
972
+ id: (0, import_utils17.optionId)(id, index),
958
973
  name: htmlName || id,
959
974
  ...semanticProps,
960
975
  onFocus: handleFocus,
961
976
  onBlur: handleBlur,
962
977
  onChange: handleChange,
963
978
  label: option.label,
964
- value: (0, import_utils16.enumOptionValueEncoder)(option.value, index, optionValueFormat),
979
+ value: (0, import_utils17.enumOptionValueEncoder)(option.value, index, optionValueFormat),
965
980
  error: rawErrors.length > 0,
966
981
  key: String(option.value),
967
982
  checked,
968
983
  disabled: disabled || itemDisabled || readonly,
969
- "aria-describedby": (0, import_utils16.ariaDescribedByIds)(id)
984
+ "aria-describedby": (0, import_utils17.ariaDescribedByIds)(id)
970
985
  }
971
986
  );
972
987
  }) });
973
988
  }
974
989
 
975
990
  // src/RangeWidget/RangeWidget.tsx
976
- var import_utils17 = require("@rjsf/utils");
977
- var import_semantic_ui_react17 = require("semantic-ui-react");
978
- var import_jsx_runtime22 = require("react/jsx-runtime");
991
+ var import_utils18 = require("@rjsf/utils");
992
+ var import_semantic_ui_react18 = require("semantic-ui-react");
993
+ var import_jsx_runtime23 = require("react/jsx-runtime");
979
994
  function RangeWidget(props) {
980
995
  const {
981
996
  id,
@@ -1000,45 +1015,45 @@ function RangeWidget(props) {
1000
1015
  fluid: true
1001
1016
  }
1002
1017
  });
1003
- const handleChange = ({ target: { value: value2 } }) => onChange && onChange(value2 === "" ? options.emptyValue : value2);
1004
- const handleBlur = () => onBlur && onBlur(id, value);
1005
- const handleFocus = () => onFocus && onFocus(id, value);
1006
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
1007
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1008
- import_semantic_ui_react17.Input,
1018
+ const handleChange = ({ target: { value: value2 } }) => onChange?.(value2 === "" ? options.emptyValue : value2);
1019
+ const handleBlur = () => onBlur?.(id, value);
1020
+ const handleFocus = () => onFocus?.(id, value);
1021
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1022
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1023
+ import_semantic_ui_react18.Input,
1009
1024
  {
1010
1025
  id,
1011
1026
  name: id,
1012
1027
  type: "range",
1013
1028
  required,
1014
1029
  disabled: disabled || readonly,
1015
- ...(0, import_utils17.rangeSpec)(schema),
1030
+ ...(0, import_utils18.rangeSpec)(schema),
1016
1031
  ...semanticProps,
1017
1032
  value: value || "",
1018
1033
  error: rawErrors.length > 0,
1019
1034
  onChange: handleChange,
1020
1035
  onBlur: handleBlur,
1021
1036
  onFocus: handleFocus,
1022
- "aria-describedby": (0, import_utils17.ariaDescribedByIds)(id)
1037
+ "aria-describedby": (0, import_utils18.ariaDescribedByIds)(id)
1023
1038
  },
1024
1039
  id
1025
1040
  ),
1026
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: value })
1041
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: value })
1027
1042
  ] });
1028
1043
  }
1029
1044
 
1030
1045
  // src/SelectWidget/SelectWidget.tsx
1031
- var import_utils18 = require("@rjsf/utils");
1046
+ var import_utils19 = require("@rjsf/utils");
1032
1047
  var import_map = __toESM(require("lodash/map"), 1);
1033
- var import_semantic_ui_react18 = require("semantic-ui-react");
1034
- var import_jsx_runtime23 = require("react/jsx-runtime");
1048
+ var import_semantic_ui_react19 = require("semantic-ui-react");
1049
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1035
1050
  function createDefaultValueOptionsForDropDown(enumOptions, enumDisabled, showPlaceholderOption, placeholder, format = "indexed") {
1036
1051
  const disabledOptions = enumDisabled || [];
1037
1052
  const options = (0, import_map.default)(enumOptions, ({ label, value }, index) => ({
1038
1053
  disabled: disabledOptions.includes(value),
1039
1054
  key: label,
1040
1055
  text: label,
1041
- value: (0, import_utils18.enumOptionValueEncoder)(value, index, format)
1056
+ value: (0, import_utils19.enumOptionValueEncoder)(value, index, format)
1042
1057
  }));
1043
1058
  if (showPlaceholderOption) {
1044
1059
  options.unshift({ value: "", text: placeholder || "" });
@@ -1081,8 +1096,9 @@ function SelectWidget(props) {
1081
1096
  });
1082
1097
  const { enumDisabled, enumOptions, emptyValue: optEmptyVal } = options;
1083
1098
  const emptyValue = multiple ? [] : "";
1084
- const optionValueFormat = (0, import_utils18.getOptionValueFormat)(options);
1099
+ const optionValueFormat = (0, import_utils19.getOptionValueFormat)(options);
1085
1100
  const showPlaceholderOption = !multiple && schema.default === void 0;
1101
+ (0, import_utils19.logUnsupportedDefaultForEnum)(id, schema, enumOptions, multiple);
1086
1102
  const dropdownOptions = createDefaultValueOptionsForDropDown(
1087
1103
  enumOptions,
1088
1104
  enumDisabled,
@@ -1090,38 +1106,41 @@ function SelectWidget(props) {
1090
1106
  placeholder,
1091
1107
  optionValueFormat
1092
1108
  );
1093
- const handleChange = (_, { value: enumValue }) => onChange((0, import_utils18.enumOptionValueDecoder)(enumValue, enumOptions, optionValueFormat, optEmptyVal));
1094
- const handleBlur = (_, { target }) => onBlur(id, (0, import_utils18.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1095
- const handleFocus = (_, { target }) => onFocus(id, (0, import_utils18.enumOptionValueDecoder)(target && target.value, enumOptions, optionValueFormat, optEmptyVal));
1096
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1097
- import_semantic_ui_react18.Form.Dropdown,
1098
- {
1099
- id,
1100
- name: htmlName || id,
1101
- label: (0, import_utils18.labelValue)(label || void 0, hideLabel, false),
1102
- multiple: typeof multiple === "undefined" ? false : multiple,
1103
- value: (0, import_utils18.enumOptionSelectedValue)(value, enumOptions, !!multiple, optionValueFormat, emptyValue),
1104
- error: rawErrors.length > 0,
1105
- disabled,
1106
- placeholder,
1107
- ...semanticProps,
1108
- required,
1109
- autoFocus: autofocus,
1110
- readOnly: readonly,
1111
- options: dropdownOptions,
1112
- onChange: handleChange,
1113
- onBlur: handleBlur,
1114
- onFocus: handleFocus,
1115
- "aria-describedby": (0, import_utils18.ariaDescribedByIds)(id)
1116
- },
1117
- id
1118
- );
1109
+ const handleChange = (_, { value: enumValue }) => onChange((0, import_utils19.enumOptionValueDecoder)(enumValue, enumOptions, optionValueFormat, optEmptyVal));
1110
+ const handleBlur = (_, { target }) => onBlur(id, (0, import_utils19.enumOptionValueDecoder)(target?.value, enumOptions, optionValueFormat, optEmptyVal));
1111
+ const handleFocus = (_, { target }) => onFocus(id, (0, import_utils19.enumOptionValueDecoder)(target?.value, enumOptions, optionValueFormat, optEmptyVal));
1112
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1113
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1114
+ import_semantic_ui_react19.Form.Dropdown,
1115
+ {
1116
+ id,
1117
+ name: htmlName || id,
1118
+ label: (0, import_utils19.labelValue)(label || void 0, hideLabel, false),
1119
+ multiple: typeof multiple === "undefined" ? false : multiple,
1120
+ value: (0, import_utils19.enumOptionSelectedValue)(value, enumOptions, !!multiple, optionValueFormat, emptyValue),
1121
+ error: rawErrors.length > 0,
1122
+ disabled,
1123
+ placeholder,
1124
+ ...semanticProps,
1125
+ required,
1126
+ autoFocus: autofocus,
1127
+ readOnly: readonly,
1128
+ options: dropdownOptions,
1129
+ onChange: handleChange,
1130
+ onBlur: handleBlur,
1131
+ onFocus: handleFocus,
1132
+ "aria-describedby": (0, import_utils19.ariaDescribedByIds)(id)
1133
+ },
1134
+ id
1135
+ ),
1136
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_utils19.SelectedOptionDescription, { ...props })
1137
+ ] });
1119
1138
  }
1120
1139
 
1121
1140
  // src/TextareaWidget/TextareaWidget.tsx
1122
- var import_utils19 = require("@rjsf/utils");
1123
- var import_semantic_ui_react19 = require("semantic-ui-react");
1124
- var import_jsx_runtime24 = require("react/jsx-runtime");
1141
+ var import_utils20 = require("@rjsf/utils");
1142
+ var import_semantic_ui_react20 = require("semantic-ui-react");
1143
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1125
1144
  function TextareaWidget(props) {
1126
1145
  const {
1127
1146
  id,
@@ -1146,15 +1165,15 @@ function TextareaWidget(props) {
1146
1165
  options,
1147
1166
  defaultSchemaProps: { inverted: "false" }
1148
1167
  });
1149
- const handleChange = ({ target: { value: value2 } }) => onChange && onChange(value2 === "" ? options.emptyValue : value2);
1150
- const handleBlur = () => onBlur && onBlur(id, value);
1151
- const handleFocus = () => onFocus && onFocus(id, value);
1152
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1153
- import_semantic_ui_react19.Form.TextArea,
1168
+ const handleChange = ({ target: { value: value2 } }) => onChange?.(value2 === "" ? options.emptyValue : value2);
1169
+ const handleBlur = () => onBlur?.(id, value);
1170
+ const handleFocus = () => onFocus?.(id, value);
1171
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1172
+ import_semantic_ui_react20.Form.TextArea,
1154
1173
  {
1155
1174
  id,
1156
1175
  name: htmlName || id,
1157
- label: (0, import_utils19.labelValue)(label || void 0, hideLabel, false),
1176
+ label: (0, import_utils20.labelValue)(label || void 0, hideLabel, false),
1158
1177
  placeholder,
1159
1178
  autoFocus: autofocus,
1160
1179
  required,
@@ -1166,7 +1185,7 @@ function TextareaWidget(props) {
1166
1185
  onChange: handleChange,
1167
1186
  onBlur: handleBlur,
1168
1187
  onFocus: handleFocus,
1169
- "aria-describedby": (0, import_utils19.ariaDescribedByIds)(id)
1188
+ "aria-describedby": (0, import_utils20.ariaDescribedByIds)(id)
1170
1189
  },
1171
1190
  id
1172
1191
  );
@@ -1190,7 +1209,7 @@ function generateTheme() {
1190
1209
  return {
1191
1210
  templates: generateTemplates(),
1192
1211
  widgets: generateWidgets(),
1193
- _internalFormWrapper: import_semantic_ui_react20.Form
1212
+ _internalFormWrapper: import_semantic_ui_react21.Form
1194
1213
  };
1195
1214
  }
1196
1215
  var Theme_default = generateTheme();