@chobantonov/jsonforms-react-antd-renderers 0.0.0-stage → 0.1.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.
- package/LICENSE +22 -0
- package/README.md +103 -2
- package/lib/additional/LabelRenderer.d.ts +13 -0
- package/lib/additional/ListWithDetailMasterItem.d.ts +9 -0
- package/lib/additional/ListWithDetailRenderer.d.ts +8 -0
- package/lib/additional/index.d.ts +4 -0
- package/lib/additional/unwrapped.d.ts +6 -0
- package/lib/antd-controls/AntdCheckbox.d.ts +10 -0
- package/lib/antd-controls/AntdClearValueButton.d.ts +44 -0
- package/lib/antd-controls/AntdClearableInput.d.ts +19 -0
- package/lib/antd-controls/AntdDatePicker.d.ts +7 -0
- package/lib/antd-controls/AntdDateTimePicker.d.ts +7 -0
- package/lib/antd-controls/AntdFile.d.ts +7 -0
- package/lib/antd-controls/AntdInputInteger.d.ts +3 -0
- package/lib/antd-controls/AntdInputNumber.d.ts +3 -0
- package/lib/antd-controls/AntdInputNumberFormat.d.ts +6 -0
- package/lib/antd-controls/AntdInputText.d.ts +6 -0
- package/lib/antd-controls/AntdNumericInput.d.ts +9 -0
- package/lib/antd-controls/AntdOtp.d.ts +33 -0
- package/lib/antd-controls/AntdPassword.d.ts +6 -0
- package/lib/antd-controls/AntdRadioGroup.d.ts +6 -0
- package/lib/antd-controls/AntdRevealButton.d.ts +32 -0
- package/lib/antd-controls/AntdSelect.d.ts +7 -0
- package/lib/antd-controls/AntdSlider.d.ts +21 -0
- package/lib/antd-controls/AntdTimePicker.d.ts +6 -0
- package/lib/antd-controls/AntdToggle.d.ts +6 -0
- package/lib/antd-controls/FileFeedback.d.ts +6 -0
- package/lib/antd-controls/index.d.ts +18 -0
- package/lib/antd-controls/useTemporalPicker.d.ts +49 -0
- package/lib/cells/AntdCompositeCell.d.ts +8 -0
- package/lib/cells/BooleanCell.d.ts +6 -0
- package/lib/cells/BooleanToggleCell.d.ts +5 -0
- package/lib/cells/CompositeDetailDialog.d.ts +15 -0
- package/lib/cells/CustomizableCells.d.ts +9 -0
- package/lib/cells/DateCell.d.ts +6 -0
- package/lib/cells/EnumCell.d.ts +11 -0
- package/lib/cells/IntegerCell.d.ts +6 -0
- package/lib/cells/NumberCell.d.ts +10 -0
- package/lib/cells/NumberFormatCell.d.ts +10 -0
- package/lib/cells/OneOfEnumCell.d.ts +11 -0
- package/lib/cells/PasswordCell.d.ts +5 -0
- package/lib/cells/TextCell.d.ts +10 -0
- package/lib/cells/TimeCell.d.ts +6 -0
- package/lib/cells/index.d.ts +14 -0
- package/lib/complex/AdditionalProperties.d.ts +4 -0
- package/lib/complex/AnyOfRenderer.d.ts +31 -0
- package/lib/complex/ArrayControlRenderer.d.ts +8 -0
- package/lib/complex/ChipsControl.d.ts +22 -0
- package/lib/complex/CollectionPager.d.ts +5 -0
- package/lib/complex/DataCell.d.ts +16 -0
- package/lib/complex/DeleteDialog.d.ts +14 -0
- package/lib/complex/DetailModal.d.ts +6 -0
- package/lib/complex/EnumArrayRenderer.d.ts +6 -0
- package/lib/complex/ErrorFeedback.d.ts +6 -0
- package/lib/complex/MixedRenderer.d.ts +6 -0
- package/lib/complex/MultiSelectControl.d.ts +17 -0
- package/lib/complex/ObjectRenderer.d.ts +5 -0
- package/lib/complex/OneOfRenderer.d.ts +6 -0
- package/lib/complex/OneOfTabRenderer.d.ts +5 -0
- package/lib/complex/RecursiveTreeRenderer.d.ts +4 -0
- package/lib/complex/RowDetailFrame.d.ts +10 -0
- package/lib/complex/ScalarCompositionRenderer.d.ts +4 -0
- package/lib/complex/TabSwitchConfirmDialog.d.ts +9 -0
- package/lib/complex/TableControl.d.ts +9 -0
- package/lib/complex/TableToolbar.d.ts +21 -0
- package/lib/complex/TupleAdditionalItems.d.ts +13 -0
- package/lib/complex/TupleControlRenderer.d.ts +6 -0
- package/lib/complex/TupleField.d.ts +4 -0
- package/lib/complex/ValidationIcon.d.ts +8 -0
- package/lib/complex/additionalProperties/AntdAdditionalPropertyActions.d.ts +9 -0
- package/lib/complex/additionalProperties/AntdAdditionalPropertyRenameDialog.d.ts +11 -0
- package/lib/complex/index.d.ts +20 -0
- package/lib/complex/mixed/AntdJsonTypeIcon.d.ts +4 -0
- package/lib/complex/mixed/AntdMixedNavigationContext.d.ts +5 -0
- package/lib/complex/mixed/AntdMixedSplitPane.d.ts +5 -0
- package/lib/complex/mixed/AntdMixedTree.d.ts +15 -0
- package/lib/complex/mixed/AntdMixedTypeSelector.d.ts +12 -0
- package/lib/complex/mixed/AntdNestedMixedNavigation.d.ts +7 -0
- package/lib/complex/mixed/mixedTree.d.ts +2 -0
- package/lib/complex/unwrapped.d.ts +10 -0
- package/lib/controls/AnyOfStringOrEnumControl.d.ts +9 -0
- package/lib/controls/BooleanControl.d.ts +6 -0
- package/lib/controls/BooleanToggleControl.d.ts +6 -0
- package/lib/controls/ChoiceCards.d.ts +1 -0
- package/lib/controls/DateControl.d.ts +6 -0
- package/lib/controls/DateTimeControl.d.ts +6 -0
- package/lib/controls/EnumControl.d.ts +7 -0
- package/lib/controls/FileControl.d.ts +7 -0
- package/lib/controls/InputControl.d.ts +6 -0
- package/lib/controls/IntegerControl.d.ts +6 -0
- package/lib/controls/NativeControl.d.ts +6 -0
- package/lib/controls/NumberControl.d.ts +6 -0
- package/lib/controls/OneOfEnumControl.d.ts +7 -0
- package/lib/controls/OneOfRadioGroupControl.d.ts +6 -0
- package/lib/controls/PasswordControl.d.ts +18 -0
- package/lib/controls/PasswordOtpControl.d.ts +38 -0
- package/lib/controls/RadioGroup.d.ts +3 -0
- package/lib/controls/RadioGroupControl.d.ts +6 -0
- package/lib/controls/SliderControl.d.ts +6 -0
- package/lib/controls/TextControl.d.ts +6 -0
- package/lib/controls/TimeControl.d.ts +6 -0
- package/lib/controls/index.d.ts +20 -0
- package/lib/controls/unwrapped.d.ts +19 -0
- package/lib/index.d.ts +50 -0
- package/lib/jsonforms-react-antd.cjs.js +39 -0
- package/lib/jsonforms-react-antd.cjs.js.map +1 -0
- package/lib/jsonforms-react-antd.esm.js +4235 -0
- package/lib/jsonforms-react-antd.esm.js.map +1 -0
- package/lib/layouts/ArrayLayout.d.ts +5 -0
- package/lib/layouts/ArrayLayoutRenderer.d.ts +8 -0
- package/lib/layouts/ArrayPanel.d.ts +7 -0
- package/lib/layouts/ArrayToolbar.d.ts +17 -0
- package/lib/layouts/CategorizationAccordionLayout.d.ts +21 -0
- package/lib/layouts/CategorizationLayout.d.ts +14 -0
- package/lib/layouts/CategorizationStepperLayout.d.ts +10 -0
- package/lib/layouts/CategoryHeader.d.ts +39 -0
- package/lib/layouts/ContainerIndicator.d.ts +37 -0
- package/lib/layouts/GroupLayout.d.ts +6 -0
- package/lib/layouts/HorizontalLayout.d.ts +10 -0
- package/lib/layouts/ValidationIndicator.d.ts +13 -0
- package/lib/layouts/VerticalLayout.d.ts +10 -0
- package/lib/layouts/arrayTitle.d.ts +2 -0
- package/lib/layouts/index.d.ts +11 -0
- package/lib/layouts/unwrapped.d.ts +11 -0
- package/lib/locale/index.d.ts +1 -0
- package/lib/util/additionalPropertyName.d.ts +2 -0
- package/lib/util/arrayChoices.d.ts +2 -0
- package/lib/util/categoryState.d.ts +3 -0
- package/lib/util/cellFrame.d.ts +27 -0
- package/lib/util/cellMode.d.ts +29 -0
- package/lib/util/clearAffordance.d.ts +1 -0
- package/lib/util/combinators.d.ts +1 -0
- package/lib/util/compositeActions.d.ts +1 -0
- package/lib/util/compositeSummary.d.ts +1 -0
- package/lib/util/configNamespaces.d.ts +1 -0
- package/lib/util/confirmation.d.ts +2 -0
- package/lib/util/datejs.d.ts +4 -0
- package/lib/util/debounce.d.ts +1 -0
- package/lib/util/dynamicProperties.d.ts +1 -0
- package/lib/util/focus.d.ts +1 -0
- package/lib/util/groupState.d.ts +1 -0
- package/lib/util/index.d.ts +25 -0
- package/lib/util/layout.d.ts +18 -0
- package/lib/util/layoutSizing.d.ts +6 -0
- package/lib/util/literalPropertySchema.d.ts +1 -0
- package/lib/util/locale.d.ts +68 -0
- package/lib/util/numeric.d.ts +1 -0
- package/lib/util/pendingChanges.d.ts +2 -0
- package/lib/util/preTouchErrors.d.ts +2 -0
- package/lib/util/rendererLocale.d.ts +2 -0
- package/lib/util/temporalBounds.d.ts +35 -0
- package/lib/util/temporalFormats.d.ts +26 -0
- package/lib/util/theme.d.ts +9 -0
- package/lib/util/translate.d.ts +1 -0
- package/lib/util/tuple.d.ts +2 -0
- package/lib/util/useConfirmation.d.ts +7 -0
- package/lib/util/validationIndicator.d.ts +2 -0
- package/lib/util/visuallyHidden.d.ts +1 -0
- package/package.json +89 -3
- package/src/additional/LabelRenderer.tsx +21 -0
- package/src/additional/ListWithDetailMasterItem.tsx +124 -0
- package/src/additional/ListWithDetailRenderer.tsx +243 -0
- package/src/additional/index.ts +14 -0
- package/src/additional/unwrapped.ts +8 -0
- package/src/antd-controls/AntdCheckbox.tsx +56 -0
- package/src/antd-controls/AntdClearValueButton.tsx +96 -0
- package/src/antd-controls/AntdClearableInput.tsx +63 -0
- package/src/antd-controls/AntdDatePicker.tsx +26 -0
- package/src/antd-controls/AntdDateTimePicker.tsx +31 -0
- package/src/antd-controls/AntdFile.tsx +395 -0
- package/src/antd-controls/AntdInputInteger.tsx +10 -0
- package/src/antd-controls/AntdInputNumber.tsx +10 -0
- package/src/antd-controls/AntdInputNumberFormat.tsx +63 -0
- package/src/antd-controls/AntdInputText.tsx +124 -0
- package/src/antd-controls/AntdNumericInput.tsx +83 -0
- package/src/antd-controls/AntdOtp.tsx +132 -0
- package/src/antd-controls/AntdPassword.tsx +106 -0
- package/src/antd-controls/AntdRadioGroup.tsx +60 -0
- package/src/antd-controls/AntdRevealButton.tsx +74 -0
- package/src/antd-controls/AntdSelect.tsx +113 -0
- package/src/antd-controls/AntdSlider.tsx +114 -0
- package/src/antd-controls/AntdTimePicker.tsx +25 -0
- package/src/antd-controls/AntdToggle.tsx +70 -0
- package/src/antd-controls/FileFeedback.tsx +37 -0
- package/src/antd-controls/index.ts +18 -0
- package/src/antd-controls/useTemporalPicker.ts +130 -0
- package/src/cells/AntdCompositeCell.tsx +228 -0
- package/src/cells/BooleanCell.tsx +33 -0
- package/src/cells/BooleanToggleCell.tsx +38 -0
- package/src/cells/CompositeDetailDialog.tsx +100 -0
- package/src/cells/CustomizableCells.ts +9 -0
- package/src/cells/DateCell.tsx +17 -0
- package/src/cells/EnumCell.tsx +30 -0
- package/src/cells/IntegerCell.tsx +17 -0
- package/src/cells/NumberCell.tsx +20 -0
- package/src/cells/NumberFormatCell.tsx +37 -0
- package/src/cells/OneOfEnumCell.tsx +32 -0
- package/src/cells/PasswordCell.tsx +22 -0
- package/src/cells/TextCell.tsx +22 -0
- package/src/cells/TimeCell.tsx +17 -0
- package/src/cells/index.ts +40 -0
- package/src/complex/AdditionalProperties.tsx +422 -0
- package/src/complex/AnyOfRenderer.tsx +158 -0
- package/src/complex/ArrayControlRenderer.tsx +121 -0
- package/src/complex/ChipsControl.tsx +205 -0
- package/src/complex/CollectionPager.tsx +26 -0
- package/src/complex/DataCell.tsx +82 -0
- package/src/complex/DeleteDialog.tsx +44 -0
- package/src/complex/DetailModal.tsx +110 -0
- package/src/complex/EnumArrayRenderer.tsx +148 -0
- package/src/complex/ErrorFeedback.tsx +51 -0
- package/src/complex/MixedRenderer.tsx +325 -0
- package/src/complex/MultiSelectControl.tsx +205 -0
- package/src/complex/ObjectRenderer.tsx +55 -0
- package/src/complex/OneOfRenderer.tsx +299 -0
- package/src/complex/OneOfTabRenderer.tsx +123 -0
- package/src/complex/RecursiveTreeRenderer.tsx +20 -0
- package/src/complex/RowDetailFrame.tsx +99 -0
- package/src/complex/ScalarCompositionRenderer.tsx +14 -0
- package/src/complex/TabSwitchConfirmDialog.tsx +36 -0
- package/src/complex/TableControl.tsx +646 -0
- package/src/complex/TableToolbar.tsx +80 -0
- package/src/complex/TupleAdditionalItems.tsx +100 -0
- package/src/complex/TupleControlRenderer.tsx +78 -0
- package/src/complex/TupleField.tsx +44 -0
- package/src/complex/ValidationIcon.tsx +30 -0
- package/src/complex/additionalProperties/AntdAdditionalPropertyActions.tsx +56 -0
- package/src/complex/additionalProperties/AntdAdditionalPropertyRenameDialog.tsx +56 -0
- package/src/complex/index.ts +48 -0
- package/src/complex/mixed/AntdJsonTypeIcon.tsx +40 -0
- package/src/complex/mixed/AntdMixedNavigationContext.ts +8 -0
- package/src/complex/mixed/AntdMixedSplitPane.tsx +51 -0
- package/src/complex/mixed/AntdMixedTree.tsx +287 -0
- package/src/complex/mixed/AntdMixedTypeSelector.tsx +60 -0
- package/src/complex/mixed/AntdNestedMixedNavigation.tsx +39 -0
- package/src/complex/mixed/mixedTree.ts +9 -0
- package/src/complex/unwrapped.ts +15 -0
- package/src/controls/AnyOfStringOrEnumControl.tsx +123 -0
- package/src/controls/BooleanControl.tsx +17 -0
- package/src/controls/BooleanToggleControl.tsx +24 -0
- package/src/controls/ChoiceCards.tsx +13 -0
- package/src/controls/DateControl.tsx +19 -0
- package/src/controls/DateTimeControl.tsx +22 -0
- package/src/controls/EnumControl.tsx +29 -0
- package/src/controls/FileControl.tsx +44 -0
- package/src/controls/InputControl.tsx +94 -0
- package/src/controls/IntegerControl.tsx +16 -0
- package/src/controls/NativeControl.tsx +79 -0
- package/src/controls/NumberControl.tsx +18 -0
- package/src/controls/OneOfEnumControl.tsx +32 -0
- package/src/controls/OneOfRadioGroupControl.tsx +25 -0
- package/src/controls/PasswordControl.tsx +43 -0
- package/src/controls/PasswordOtpControl.tsx +61 -0
- package/src/controls/RadioGroup.tsx +8 -0
- package/src/controls/RadioGroupControl.tsx +21 -0
- package/src/controls/SliderControl.tsx +19 -0
- package/src/controls/TextControl.tsx +17 -0
- package/src/controls/TimeControl.tsx +20 -0
- package/src/controls/index.ts +69 -0
- package/src/controls/unwrapped.ts +35 -0
- package/src/index.ts +267 -0
- package/src/layouts/ArrayLayout.tsx +435 -0
- package/src/layouts/ArrayLayoutRenderer.tsx +54 -0
- package/src/layouts/ArrayPanel.tsx +51 -0
- package/src/layouts/ArrayToolbar.tsx +67 -0
- package/src/layouts/CategorizationAccordionLayout.tsx +217 -0
- package/src/layouts/CategorizationLayout.tsx +149 -0
- package/src/layouts/CategorizationStepperLayout.tsx +164 -0
- package/src/layouts/CategoryHeader.tsx +107 -0
- package/src/layouts/ContainerIndicator.tsx +83 -0
- package/src/layouts/GroupLayout.tsx +307 -0
- package/src/layouts/HorizontalLayout.tsx +50 -0
- package/src/layouts/ValidationIndicator.tsx +43 -0
- package/src/layouts/VerticalLayout.tsx +50 -0
- package/src/layouts/arrayTitle.tsx +30 -0
- package/src/layouts/index.ts +35 -0
- package/src/layouts/unwrapped.ts +17 -0
- package/src/locale/index.ts +1 -0
- package/src/util/additionalPropertyName.ts +11 -0
- package/src/util/arrayChoices.ts +21 -0
- package/src/util/categoryState.ts +17 -0
- package/src/util/cellFrame.tsx +52 -0
- package/src/util/cellMode.tsx +145 -0
- package/src/util/clearAffordance.ts +2 -0
- package/src/util/combinators.ts +6 -0
- package/src/util/compositeActions.ts +2 -0
- package/src/util/compositeSummary.ts +2 -0
- package/src/util/configNamespaces.ts +4 -0
- package/src/util/confirmation.ts +15 -0
- package/src/util/datejs.tsx +42 -0
- package/src/util/debounce.ts +2 -0
- package/src/util/dynamicProperties.ts +6 -0
- package/src/util/focus.ts +2 -0
- package/src/util/groupState.ts +8 -0
- package/src/util/index.ts +25 -0
- package/src/util/layout.tsx +121 -0
- package/src/util/layoutSizing.ts +33 -0
- package/src/util/literalPropertySchema.ts +2 -0
- package/src/util/locale.ts +222 -0
- package/src/util/numeric.ts +2 -0
- package/src/util/pendingChanges.tsx +6 -0
- package/src/util/preTouchErrors.ts +10 -0
- package/src/util/rendererLocale.ts +10 -0
- package/src/util/temporalBounds.ts +106 -0
- package/src/util/temporalFormats.ts +95 -0
- package/src/util/theme.ts +9 -0
- package/src/util/translate.ts +6 -0
- package/src/util/tuple.ts +16 -0
- package/src/util/uiSchemaCycle.tsx +2 -0
- package/src/util/useConfirmation.tsx +25 -0
- package/src/util/validationIndicator.ts +10 -0
- package/src/util/visuallyHidden.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonforms-react-antd.esm.js","names":["antTheme","antTheme","useI18n","useTranslator","Tree","useCellMode","_Fragment","useTranslator","useTranslator","schemaForType","_Fragment","antTheme","useTranslator","displayableErrors","ExclamationCircleOutlined","antTheme","PendingChangesProvider","antTheme","CommonTupleField","antTheme","_Fragment","EyeInvisibleOutlined","EyeOutlined","useI18n","_Fragment","_Fragment","PendingChangesProvider","_Fragment","formatDate","resolveGap","sharedResolveGap","containerStyle","sharedContainerStyle","resolveGap","containerStyle","useEffectiveElements","PendingChangesProvider","isArrayElementPath","_Fragment","_Fragment","SR_ONLY","_Fragment","findUISchema","antdTheme","theme","findUISchema","_Fragment","ListWithDetailMasterItem","range","eventToValue","_Fragment","_Fragment","clearedDynamicPropertyValue","antTheme","_Fragment","_jsxs","antTheme","categorization","_Fragment","categorization","MultiSelectControl","ChipsControl","ArrayControlRenderer","BooleanControl","BooleanToggleControl","NativeControl","EnumControl","IntegerControl","NumberControl","TextControl","PasswordControl","PasswordOtpControl","DateTimeControl","DateControl","TimeControl","SliderControl","ObjectRenderer","ScalarCompositionRenderer","AnyOfRenderer","OneOfRenderer","FileControl","RadioGroupControl","OneOfRadioGroupControl","OneOfEnumControl","GroupLayout","HorizontalLayout","VerticalLayout","CategorizationLayout","CategorizationStepperLayout","CategorizationAccordionLayout","ArrayLayout","LabelRenderer","ListWithDetailRenderer","AnyOfStringOrEnumControl","EnumArrayRenderer","AntdCompositeCell","BooleanCell","BooleanToggleCell","DateCell","EnumCell","IntegerCell","NumberCell","NumberFormatCell","OneOfEnumCell","TextCell","PasswordCell","TimeCell","React","useI18n$1","useTranslator$1","ExclamationCircleOutlined","DeleteOutlined","EditOutlined","EyeInvisibleOutlined","EyeOutlined","AlignLeftOutlined","CheckOutlined","CodeOutlined","StopOutlined","WarningOutlined","CloseCircleFilled","FileOutlined","ExclamationCircleFilled","useCellMode$1","toNumber","CloseOutlined","ExclamationCircleOutlined$1","EyeInvisibleOutlined$1","EyeOutlined$1","PendingChangesProvider$1","antdCompositeCellTester","isArrayElementPath$1","schemaForType$1","displayableErrors$1","PlusOutlined","TupleField$1","AllOfRenderer","AllOfRenderer$1","ArrowDownOutlined","ArrowUpOutlined","DeleteFilled","range","startCase","union","merge","DownOutlined","UpOutlined","isEmpty","dayjs","formatDate$1","getData","useEffectiveElements$1","clearedDynamicPropertyValue$1","map","every","isArray","isString","isEqual","__defProp","__exportAll","target","name","all","no_symbols","useConfirmation","useConfirmationState","pending","Modal","t","confirm","close","message","_typeof","o","toPrimitive","e","i","r","toPropertyKey","_defineProperty","ownKeys","_objectSpread2","ContainerIndicator","theme","Tooltip","label","marker","token","DataDotIcon","ErrorIcon","ContainerValidationIndicator","useI18n","count","AntdAdditionalPropertyRenameDialog","onRename","oldName","Typography","Form","error","Input","onChange","event","disabled","typeIcons","AntdJsonTypeIcon","_typeIcons$get","type","icon","containsSearch","mixedTreeLabel","node","search","child","AntdMixedTree","setSearch","useState","showPrimitives","setShowPrimitives","expandedKeys","setExpandedKeys","mixedPathKey","renamingNode","setRenamingNode","renameValue","setRenameValue","normalizedSearch","nodeMap","renameError","validateRename","searchExpandedKeys","useMemo","keys","collectMatchingBranches","root","selectedKey","selectedPath","previousSelectedKey","setPreviousSelectedKey","ancestorKeys","index","current","closeRename","toDataNode","structured","key","rootNode","deletable","canDelete","renameable","domainTree","canRename","Flex","renderIndicator","Button","jsx","onDelete","treeData","Tree","onSelect","RecursiveTreeRenderer","createRecursiveTreeRenderer","ChoiceCards","createChoiceCards","FileFeedback","color","severity","cell","Popover","CLEAR_OFFSET","CLEAR_OFFSET_WITH_HANDLES","AntdClearValueButton","clearable","enabled","data","inline","visible","onClear","offset","AntdClearableInput","active","setActive","slotted","children","clear","ErrorFeedback","useErrorFeedback","errors","path","local","setOpen","ErrorSummaryList","toggle","expanded","ControlFormItem","_context$config","context","useJsonForms","showRequired","required","hideRequiredAsterisk","isValid","feedbackIcons","content","adornmentOptions","InputAdornments","adornmentSchema","style","help","_objectWithoutPropertiesLoose","n","_objectWithoutProperties","s","asyncGeneratorStep","c","u","_asyncToGenerator","_next","_throw","_excluded$3","_excluded2","FileActionButton","_type","_color","_ref","props","FilePill","_ref2","formatBytes","bytes","byteUnit","k","dm","decimals","sizes","toNonNegativeNumber","result","param","getFileSize","exclusive","fileSize","variant","schema","uioptions","toBase64","dataurl","reader","schemaFormat","insertIndex","file","reject","onProgress","AntdFile","_attachmentName","_props$uischema$optio","d","useI18nDefault","text","useCellMode","attachment","setAttachment","setSeverity","rejection","setRejection","previousData","setPreviousData","sizeRejection","minFileSize","minFileSizeExclusive","uischema","maxFileSize","maxFileSizeExclusive","getI18nKey","formatSize","rejectionMessage","reason","beforeUpload","Upload","uploadImage","_ref3","options","base64","handleChange","onSuccess","_unused","onError","fileItemSchema","FileArrayInput","attachmentName","inputProps","Fragment","ValidationIcon","errorMessages","_excluded$2","DetailModal","_props$centered","_geometry$style$width","surface","geometry","useDetailDialog","_surface$current","restoredWidth","setRestoredWidth","_surface$current2","container","styles","FullscreenExitOutlined","FullscreenOutlined","CompositeDetailDialog","dialog","useCompositeDraft","footer","JsonFormsContext","PendingChangesProvider","CellModeProvider","AntdCompositeCell_default","withJsonFormsCellProps","withTranslateProps","_props$uischema","_props$schema","_props$schema$title","_props$schema2","_context$uischemas","_options$summary","_options$showTypeIndi","_props$config","_props$schema3","_options$summary2","_options$summary3","_options$summary4","_options$summary5","_props$schema$title2","_props$schema4","confirmation","latest","useRef","open","useCompositeCellPresentation","translateWithLabel","detail","resolveEditorDetail","canClear","summary","CellSummary","_current$uischema$opt","value","JsonFormsDispatch","AntdMixedNavigationContext","AntdMixedSplitPane","Grid","Splitter","tree","AntdMixedTypeSelector","translateType","fullWidth","Select","types","visuallyHidden","AntdNestedMixedNavigation","selector","onView","description","MixedRendererComponent","model","useMixedRenderer","parentNavigation","renderedControl","MixedDetailControl","isStructuredType","selectedType","validateNodeRename","_model$jsonforms$core","parent","mixedParentNode","nextName","canRenameNode","parentSchema","rootSchema","propertyNames","_resolveSchema","resolveSchema","ajv","pattern","renameNode","structuredLayout","MixedCodeControl","Collapse","collapsible","selectedNode","setSelectedPath","Breadcrumb","breadcrumbPath","breadcrumbLabel","segment","MixedNodeControl","MixedRenderer","withJsonFormsControlProps","chipsControlTester","rankWith","and","uiTypeIs","isChipsControl","ChipsControl","_uischema$options","_options$placeholder","draft","setDraft","usePreTouchErrors","values","asArrayValue","itemSchema","resolveItemSchema","choices","arrayChoicesOf","unique","limits","addable","canAddChoice","removable","canRemoveChoice","commit","next","add","addChoice","labelFor","choice","entry","remaining","isSelected","Tag","removeChoiceAt","_option$label","option","input","onBlur","ChipsControl_default","multiSelectControlTester","isMultiSelectControl","MultiSelectControl","_arrayChoicesOf","_context$core","translate","primary","additional","itemMessages","arrayChoiceItemErrors","_context$i18n$transla","_context$i18n","getCombinedErrorMessage","defaultErrorTranslator","unknownValues","sameChoice","tagLabel","issue","MultiSelectControl_default","DeleteDialog","title","onConfirm","acceptText","declineText","CollectionPager","page","Pagination","TupleAdditionalItems","useTupleAdditionalItems","deletion","canAdd","visibleIndices","renderItem","positionLabel","TupleField","tupleControlRendererTester","tupleControlTester","TupleControl","useTupleControl","TupleControlContent","shownErrors","TupleControlRenderer","connectTupleControl","AnyOfRenderer","_schema$anyOf","selectedAnyOf","setSelectedAnyOf","indexOfFittingSchema","chosen","handleTabChange","useCallback","anyOf","anyOfRenderInfos","createCombinatorRenderInfos","uischemas","branch","CombinatorProperties","CombinatorBranch","Tabs","anyOfRenderInfo","anyOfIndex","anyOfControlTester","isAnyOfControl","AnyOfRenderer_default","withJsonFormsAnyOfProps","RowDetailFrame","createRowDetailFrame","state","_state$content","panelOpen","Empty","RowDetailToggle","createRowDetailToggle","CellFrame","ConnectedCellFrame","ctx","ctxToCellProps","controlWithoutLabel","DataCell","propName","DispatchCell","Resolve","encode","cellOptions","_excluded$1","ArrayPanel","panel","useArrayPanelState","config","Card","extra","panelLabel","renderArrayTitle","Row","Col","Title","TableToolbar","arrayErrors","usePathErrorIndicator","actions","translations","disableAdd","addItem","createDefaultValue","generateDataColumns","_schema$properties","definitions","tableColumnFields","getValidColumnProps","_definitions$find$hea","_definitions$find","_schema$properties2","tableColumnStyle","column","prop","rowPath","Paths","row","ItemProvider","RowDataCell","properties","scopedSchema","ctxToDataCellProps","_ctx$core$errors","_ctx$core","_ctx$core$schema","_ctx$core2","ownProps","formatErrorMessage","errorsAt","p","_error$message","dataCellProps","ActionCell","moveUp","moveUpCreator","rowIndex","moveDown","moveDownCreator","showSortButtons","enableUp","enableDown","generateColumns","width","childPath","CollectionTable","_props$uischema$optio2","_actionColumn$width","useCollectionPagination","dataSource","columnWidths","setColumnWidths","useColumnWidths","useRowDetail","selection","useTableSelection","actionColumn","columns","displayColumns","_detail$options","RowErrorCount","renderFrame","Table","sum","isObjectSchema","_columnWidths$__actio","_props$uischema$optio3","_columnWidths$field","_props$schema$require","_props$uischema$optio4","_props$uischema$optio5","_props$uischema$optio6","_column$title","field","definition","item","ColumnResizeHandle","widths","_detail$options2","_detail$selection","_detail$options3","_detail$selection2","_detail$options4","CollectionErrorNavigation","TableControl","_args","appliedUiSchemaOptions","doDisableAdd","doDisableRemove","disableRemove","controlElement","ArrayControlRenderer","setPending","openDeleteDialog","removeItems","discarded","shouldConfirm","deleteCancel","deleteConfirm","supportedArray","or","isObjectArrayControl","isPrimitiveArrayControl","defaultTableTester","forcedTableTester","optionIs","arrayControlTester","ArrayControlRenderer_default","withJsonFormsArrayLayoutProps","withArrayTranslationProps","AntdCheckbox","Checkbox","createOnChangeHandler","saveFormat","createOnBlurHandler","date","format","formattedDate","rerenderChild","gaps","resolveGap$1","resolveGap","direction","containerStyle$1","containerStyle","renderLayoutElements","grid","resolveGridColumns","layoutOptions","gap","ConfigProvider","elements","itemSizing","diagnostics","AntdLayoutRenderer","effective","renderers","cells","locale","antd","day","defaultAntdLocaleLoaders","loaders","setAntdLocaleLoaders","getAntdLocaleLoaders","localeKey","lower","cache","apply","loaded","useAntdLocale","_cache$get$antd","_cache$get","resolved","setResolved","useEffect","cached","load","live","EnumArrayRenderer","focused","onFocus","useFocus","vertical","showDescription","isDescriptionHidden","optionPath","checkboxValue","id","newValue","removeItem","hasOneOfItems","hasEnumItems","enumArrayRendererTester","schemaMatches","hasType","schemaSubPathMatches","resolvedSchema","EnumArrayRenderer_default","withJsonFormsMultiEnumProps","AntdAdditionalPropertyActions","readonly","deleteDisabled","ObjectRenderer","createObjectRenderer","newPropertyName","setNewPropertyName","renamingPropertyName","setRenamingPropertyName","entries","useAdditionalPropertyEntries","restrict","appliedOptions","allowEmptyPropertyNames","propertyName","nameMessage","constraintMessage","useNameConstraintMessage","validateName","_constraintMessage","validateAdditionalPropertyName","reservedPropertyNames","nameSchema","propertyNameError","showPropertyNameError","useAdditionalPropertyActions","renameProperty","propertyToRename","objectData","updatedData","renamePropertyKey","propertyErrors","useAdditionalPropertyErrors","nameErrors","usePropertyNameErrors","shouldShow","embedded","addProperty","addPropertyDisabled","additionalPropertyItems","_objectSchema$require","isolated","needsIsolatedEditor","removePropertyDisabled","objectSchema","removeProperty","IsolatedPropertyEditor","assignOwnProperty","clearedDynamicPropertyValue","literalPropertySchema","DynamicPropertyProvider","ObjectRenderer_default","TabSwitchConfirmDialog","handleClose","cancel","OneOfRenderer","_discriminatorBranch","formContext","discriminatorBranch","confirmDialogOpen","setConfirmDialogOpen","selectedIndex","setSelectedIndex","newSelectedIndex","setNewSelectedIndex","setChosen","previousInput","setPreviousInput","isUnselectedBranchValue","oneOfRenderInfos","useCombinatorSelection","openNewTab","_formContext$core","defaults","newIndex","clearedBranchValue","info","branchChangeData","newOneOfIndex","discardedByBranchChange","selectionError","idx","oneOfControlTester","isOneOfControl","OneOfRenderer_default","withJsonFormsOneOfProps","OneOfTabRenderer","_schema$oneOf","oneOfRenderInfo","oneOfTabControlTester","OneOfTabRenderer_default","MESSAGE_STYLE","ScalarCompositionRenderer_default","ScalarCompositionControl","labelRendererTester","LabelRenderer","LabelRenderer_default","withJsonFormsLabelProps","ArrayLayoutToolbar","_options$hideArraySum","createDefault","SR_ONLY$1","ArrayLayoutComponent","expandedIndex","setExpandedIndex","resolveCollapsed","innerCreateDefaultValue","hideAvatar","avatarStyle","ownErrors","_props$ctx$core$error","_props$ctx$core","errorPath","summaryErrors","trackSwap","from","to","trackRemoval","removed","handleAddItem","inserted","getExtra","_props$ctx$core2","composePaths","foundUISchema","findDetailUISchema","createControlElement","arraySchema","childLabelForIndex","_uischema$options$ele","_props$ctx$core3","childLabelProp","getFirstPrimitiveProp","labelValue","computeLabel","Avatar","Space","ItemValidationIndicator","ArrayLayout","_excluded","ArrayLayoutRenderer","addItemCb","arrayLayoutTester","isObjectArrayWithNesting","isControl","ArrayLayoutRenderer_default","SR_ONLY","ListWithDetailMasterItem","theme$1","useToken","handleSelect","selected","Text","childLabel","ListWithDetailMasterItem_default","withJsonFormsMasterListItemProps","ListWithDetailRenderer","_ctx$core3","handleRemoveItem","handleListItemClick","handleCreateDefaultValue","previousSchema","setPreviousSchema","itemTypes","deriveTypes","Listy","listWithDetailTester","schemaTypeIs","ListWithDetailRenderer_default","AntdRevealButton","revealed","onToggle","OTP_MASK","otpLength","min","max","AntdOtp","_otpLength","setRevealed","length","shown","timePickerColumns","views","wanted","view","datePickerMode","CLOCK_DAY","disabledDateFor","bounds","outside","range$1","out","disabledTimeFor","useSeconds","precision","timeOnly","upper","disabledHours","disabledMinutes","hour","minute","specDateSaveFormat","specDateTimeSaveFormat","specTimeSaveFormat","defaultDisplayFormat","kind","ampm","useTemporalPicker","_useJsonForms$core","_options","_options2","rootData","boundsSchema","resolveDataBounds","formats","effectiveRestrict","temporalBounds","AntdDatePicker","DatePicker","pickerProps","AntdDateTimePicker","_timePickerColumns","AntdNumericInput","originalHandleChange","keepSelectedType","useMixedScalar","inputStyle","inputValue","useDebouncedChange","toCommittableNumber","InputNumber","AntdInputInteger","AntdInputNumber","AntdInputNumberFormat","maxLength","formattedNumber","validStringNumber","ev","InputComponent","eventToValue$1","AntdInputText","keepEmptyString","inputText","specificProps","suggestions","suggestion","AutoComplete","AntdRadioGroup","_uischema$options$ver","Radio","AntdSelect","_appliedUiSchemaOptio","noneOptionLabel","selectStyle","searchable","_options$index","resolveSliderValue","parsed","fallback","hasSliderValue","AntdSlider","_schema$minimum","sliderStyle","committed","effectiveValue","marks","Slider","AntdTimePicker","TimePicker","AntdToggle","stateId","describedBy","Switch","isChecked","eventToValue","AntdPassword","InputControl","preserveDynamicPropertyKey","useDynamicProperty","handleInputChange","changedPath","getControlHelp","helpId","InnerComponent","findEnumSchema","schemas","findTextSchema","AntdAutocompleteInputText","_schema$anyOf2","_enumSchema$enum","enumSchema","stringSchema","filteredOptions","setFilteredOptions","searchText","AnyOfStringOrEnumControl","Control","hasEnumAndText","wrongType","simpleAnyOf","_schema$anyOf3","anyOfStringOrEnumControlTester","AnyOfStringOrEnumControl_default","BooleanControl","booleanControlTester","isBooleanControl","BooleanControl_default","BooleanToggleControl","booleanToggleControlTester","BooleanToggleControl_default","DateControl","dateControlTester","isDateControl","DateControl_default","DateTimeControl","dateTimeControlTester","isDateTimeControl","DateTimeControl_default","EnumControl","enumControlTester","isEnumControl","EnumControl_default","withJsonFormsEnumProps","IntegerControl","integerControlTester","isIntegerControl","IntegerControl_default","NativeControl","fieldType","nativeControlTester","isTimeControl","NativeControl_default","NumberControl","numberControlTester","isNumberControl","NumberControl_default","OneOfEnumControl","oneOfEnumControlTester","isOneOfEnumControl","OneOfEnumControl_default","withJsonFormsOneOfEnumProps","RadioGroup","OneOfRadioGroupControl","oneOfRadioGroupControlTester","OneOfRadioGroupControl_default","RadioGroupControl","radioGroupControlTester","RadioGroupControl_default","SliderControl","sliderControlTester","isRangeControl","SliderControl_default","PasswordControl","isPasswordControl","isStringControl","formatIs","passwordControlTester","PasswordControl_default","PasswordOtpControl","hasSegmentedLength","passwordOtpControlTester","PasswordOtpControl_default","TextControl","textControlTester","TextControl_default","TimeControl","timeControlTester","TimeControl_default","FileControl","isBase64String","singleFileTester","fileControlTester","ui","fileArrayTester","FileControl_default","groupTester","GroupLayoutRenderer","_regions$header","_regions$footer","_regions$header2","_headerContent$","group","useGroupState","validation","useContainerValidation","object","ObjectErrorContext","objectOwned","objectErrors","objectDetail","ObjectDetailContext","layout","regions","headerTitle","useGroupHeaderTitle","renderRegion","element","cover","headerContent","indicatorLabel","indicator","GroupLayout_default","withJsonFormsLayoutProps","antdGroupTester","withIncreasedRank","horizontalLayoutTester","HorizontalLayoutRenderer","childProps","HorizontalLayout_default","verticalLayoutTester","VerticalLayoutRenderer","verticalLayout","VerticalLayout_default","CategoryIndicators","category","CategoryHeader","useCategoryLabels","categories","deriveLabelForUISchemaElement","isSingleLevelCategorization","categorization","acc","categorizationTester","CategorizationLayoutRenderer","useCategorySelection","_category$elements","onTabChange","select","tabLabels","CategorizationLayout_default","withAjvProps","categorizationStepperTester","categorizationHasCategory","CategorizationStepperLayout_default","_categories$activeCat","_categories$activeCat2","buttonWrapperStyle","buttonNextStyle","buttonStyle","activeCategory","handleStep","step","Steps","categorizationAccordionTester","CategorizationAccordionLayoutRenderer","labels","rootRef","baseId","useId","_rootRef$current","items","header","headerId","panelId","opened","categoryKey","CategorizationAccordionLayout_default","BooleanCell","booleanCellTester","BooleanCell_default","BooleanToggleCell","booleanToggleCellTester","BooleanToggleCell_default","DateCell","dateCellTester","DateCell_default","EnumCell","enumCellTester","EnumCell_default","withJsonFormsEnumCellProps","IntegerCell","integerCellTester","IntegerCell_default","NumberCell","numberCellTester","NumberCell_default","NumberFormatCell","toFormatted","fromFormatted","numberFormatCellTester","isNumberFormatControl","NumberFormatCell_default","OneOfEnumCell","oneOfEnumCellTester","OneOfEnumCell_default","withJsonFormsOneOfEnumCellProps","PasswordCell","passwordCellTester","PasswordCell_default","TextCell","textCellTester","TextCell_default","TimeCell","timeCellTester","TimeCell_default","CustomizableCells_exports","UnwrappedAdditional","UnwrappedComplex","UnwrappedControls","UnwrappedLayouts","antdRenderers","dynamicRendererEntry","recursiveTreeTester","choiceCardsTester","mixedControlTester","objectControlTester","scalarCompositionTester","allOfControlTester","antdCells","dynamicCellEntry","Unwrapped","JSONFORMS_CONFIG_KEY","JSONFORMS_EXTENDED_CONFIG_KEY","UNCONSTRAINED_TYPES","bgRendererLocale","buildErrorIndex","compositeSummary","confirmationRequired","defaultRendererLocales","displayableErrors","errorDataPath","fallbackConfirmationPolicy","filterErrorsBeforeTouch","formatDate","getRendererLocales","hasStringItems","i18nDefaults","isArrayElementPath","isComplexTupleSchema","isComplexValue","isDiscardableValue","isMixedControl","isMixedSchema","preventsEmpty","registerRendererLocale","removeChoice","rendererDefault","resolveConfirmationPolicy","resolveIndicatorOption","resolveRendererLocale","resolveTupleSchema","schemaForType","setRendererLocales","sharedErrorIndex","tupleDefinition","tupleEmptyValue","tupleFieldOwnsLabel","tupleInitialValue","tupleRenderSchema","useClearAffordance","useEffectiveElements","useRegisterPendingChange","useTranslator"],"sources":["../src/util/useConfirmation.tsx","../src/layouts/ContainerIndicator.tsx","../src/layouts/ValidationIndicator.tsx","../src/complex/additionalProperties/AntdAdditionalPropertyRenameDialog.tsx","../src/complex/mixed/AntdJsonTypeIcon.tsx","../src/complex/mixed/AntdMixedTree.tsx","../src/complex/RecursiveTreeRenderer.tsx","../src/controls/ChoiceCards.tsx","../src/antd-controls/FileFeedback.tsx","../src/antd-controls/AntdClearValueButton.tsx","../src/antd-controls/AntdClearableInput.tsx","../src/complex/ErrorFeedback.tsx","../src/util/cellMode.tsx","../src/antd-controls/AntdFile.tsx","../src/complex/ValidationIcon.tsx","../src/complex/DetailModal.tsx","../src/cells/CompositeDetailDialog.tsx","../src/cells/AntdCompositeCell.tsx","../src/complex/mixed/AntdMixedNavigationContext.ts","../src/complex/mixed/AntdMixedSplitPane.tsx","../src/complex/mixed/AntdMixedTypeSelector.tsx","../src/complex/mixed/AntdNestedMixedNavigation.tsx","../src/complex/MixedRenderer.tsx","../src/complex/ChipsControl.tsx","../src/complex/MultiSelectControl.tsx","../src/complex/DeleteDialog.tsx","../src/complex/CollectionPager.tsx","../src/complex/TupleAdditionalItems.tsx","../src/complex/TupleField.tsx","../src/complex/TupleControlRenderer.tsx","../src/complex/AnyOfRenderer.tsx","../src/complex/RowDetailFrame.tsx","../src/util/cellFrame.tsx","../src/complex/DataCell.tsx","../src/layouts/ArrayPanel.tsx","../src/layouts/arrayTitle.tsx","../src/complex/TableToolbar.tsx","../src/complex/TableControl.tsx","../src/complex/ArrayControlRenderer.tsx","../src/antd-controls/AntdCheckbox.tsx","../src/util/datejs.tsx","../src/util/layoutSizing.ts","../src/util/layout.tsx","../src/util/locale.ts","../src/complex/EnumArrayRenderer.tsx","../src/complex/additionalProperties/AntdAdditionalPropertyActions.tsx","../src/complex/AdditionalProperties.tsx","../src/complex/ObjectRenderer.tsx","../src/complex/TabSwitchConfirmDialog.tsx","../src/complex/OneOfRenderer.tsx","../src/complex/OneOfTabRenderer.tsx","../src/complex/ScalarCompositionRenderer.tsx","../src/additional/LabelRenderer.tsx","../src/layouts/ArrayToolbar.tsx","../src/layouts/ArrayLayout.tsx","../src/layouts/ArrayLayoutRenderer.tsx","../src/additional/ListWithDetailMasterItem.tsx","../src/additional/ListWithDetailRenderer.tsx","../src/antd-controls/AntdRevealButton.tsx","../src/antd-controls/AntdOtp.tsx","../src/util/temporalFormats.ts","../src/util/temporalBounds.ts","../src/antd-controls/useTemporalPicker.ts","../src/antd-controls/AntdDatePicker.tsx","../src/antd-controls/AntdDateTimePicker.tsx","../src/antd-controls/AntdNumericInput.tsx","../src/antd-controls/AntdInputInteger.tsx","../src/antd-controls/AntdInputNumber.tsx","../src/antd-controls/AntdInputNumberFormat.tsx","../src/antd-controls/AntdInputText.tsx","../src/antd-controls/AntdRadioGroup.tsx","../src/antd-controls/AntdSelect.tsx","../src/antd-controls/AntdSlider.tsx","../src/antd-controls/AntdTimePicker.tsx","../src/antd-controls/AntdToggle.tsx","../src/antd-controls/AntdPassword.tsx","../src/controls/InputControl.tsx","../src/controls/AnyOfStringOrEnumControl.tsx","../src/controls/BooleanControl.tsx","../src/controls/BooleanToggleControl.tsx","../src/controls/DateControl.tsx","../src/controls/DateTimeControl.tsx","../src/controls/EnumControl.tsx","../src/controls/IntegerControl.tsx","../src/controls/NativeControl.tsx","../src/controls/NumberControl.tsx","../src/controls/OneOfEnumControl.tsx","../src/controls/RadioGroup.tsx","../src/controls/OneOfRadioGroupControl.tsx","../src/controls/RadioGroupControl.tsx","../src/controls/SliderControl.tsx","../src/controls/PasswordControl.tsx","../src/controls/PasswordOtpControl.tsx","../src/controls/TextControl.tsx","../src/controls/TimeControl.tsx","../src/controls/FileControl.tsx","../src/layouts/GroupLayout.tsx","../src/layouts/HorizontalLayout.tsx","../src/layouts/VerticalLayout.tsx","../src/layouts/CategoryHeader.tsx","../src/util/categoryState.ts","../src/layouts/CategorizationLayout.tsx","../src/layouts/CategorizationStepperLayout.tsx","../src/layouts/CategorizationAccordionLayout.tsx","../src/cells/BooleanCell.tsx","../src/cells/BooleanToggleCell.tsx","../src/cells/DateCell.tsx","../src/cells/EnumCell.tsx","../src/cells/IntegerCell.tsx","../src/cells/NumberCell.tsx","../src/cells/NumberFormatCell.tsx","../src/cells/OneOfEnumCell.tsx","../src/cells/PasswordCell.tsx","../src/cells/TextCell.tsx","../src/cells/TimeCell.tsx","../src/additional/unwrapped.ts","../src/complex/unwrapped.ts","../src/controls/unwrapped.ts","../src/layouts/unwrapped.ts","../src/index.ts"],"sourcesContent":["import React from 'react';\nimport { Modal } from 'antd';\nimport { useConfirmationState } from '@chobantonov/jsonforms-react-renderer-common/interaction/useConfirmationState';\nexport type { ConfirmationRequest as ConfirmRequest } from '@chobantonov/jsonforms-react-renderer-common/interaction/confirmation';\n\n/** Presents the shared destructive-change policy with an AntD dialog. */\nexport const useConfirmation = () => {\n const { t, pending, request, close, confirm, title, message } =\n useConfirmationState();\n const dialog = pending ? (\n <Modal\n open\n title={title}\n okText={t('confirm.accept')}\n cancelText={t('confirm.decline')}\n okButtonProps={{ danger: pending.operation === 'delete' }}\n onOk={confirm}\n onCancel={close}\n data-confirm={pending.operation}\n >\n <p>{message}</p>\n </Modal>\n ) : null;\n return { request, dialog };\n};\n","import ExclamationCircleOutlined from '@ant-design/icons/ExclamationCircleOutlined';\nimport { Tooltip, theme as antTheme } from 'antd';\nimport React from 'react';\n\n/**\n * A marker on a container's header.\n *\n * Both markers are **SVG**, not text glyphs and not CSS shapes. A glyph like\n * `●` renders at whatever size and baseline the platform font gives it, so it\n * never lines up with an icon beside it; a CSS circle is crisp but is a third\n * mechanism to keep in sync. An SVG in antd's own icon box - `1em` square,\n * `currentColor`, `viewBox=\"64 64 896 896\"` - is resolution independent, takes\n * its size from `fontSize` and its color from `color`, so two markers sharing\n * this shell are aligned and sized identically by construction.\n *\n * The shell must not make its header taller. It uses the body font size, which\n * is smaller than the header's line box, and `lineHeight: 0` so the inline box\n * adds no leading of its own.\n */\nexport interface ContainerIndicatorProps {\n /** Tooltip text and accessible name. One string, so they cannot diverge. */\n label: string;\n /** `colorError` for a failure, a muted color for data presence. */\n color: string;\n children: React.ReactNode;\n /** Marks the element for tests and host styling. */\n marker?: Record<string, boolean | number | string | undefined>;\n}\n\nexport const ContainerIndicator = ({\n label,\n color,\n children,\n marker,\n}: ContainerIndicatorProps) => {\n const { token } = antTheme.useToken();\n return (\n <Tooltip title={label} trigger={['hover', 'focus']}>\n <span\n role='img'\n aria-label={label}\n tabIndex={0}\n {...marker}\n style={{\n color,\n display: 'inline-flex',\n verticalAlign: 'middle',\n alignItems: 'center',\n // Body size, not the header's: large enough to read, never tall\n // enough to stretch the row.\n fontSize: token.fontSize,\n lineHeight: 0,\n }}\n >\n {children}\n </span>\n </Tooltip>\n );\n};\n\n/**\n * A plain filled dot in antd's icon box.\n *\n * `@ant-design/icons` has no plain circle - every `*CircleFilled` carries a\n * symbol - so this draws one, matching the box and attributes of the icons it\n * sits beside. Deliberately smaller than a full icon: data presence is a\n * quieter signal than a failure.\n */\nexport const DataDotIcon = () => (\n <svg\n viewBox='64 64 896 896'\n width='1em'\n height='1em'\n fill='currentColor'\n focusable='false'\n aria-hidden='true'\n >\n <circle cx='512' cy='512' r='224' />\n </svg>\n);\n\n/** The failure marker: antd's outlined exclamation, shared with array error summaries. */\nexport const ErrorIcon = () => <ExclamationCircleOutlined rev={undefined} />;\n","import { theme as antTheme } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../util/translate';\nimport { ContainerIndicator, ErrorIcon } from './ContainerIndicator';\n\nexport interface ValidationIndicatorProps {\n /** Eligible errors at or below the container, or undefined to omit it. */\n count?: number;\n}\n\n/**\n * The marker a container shows when something below it fails validation.\n *\n * Deliberately not color alone: it carries a localized accessible name and a\n * tooltip available on hover and keyboard focus, as a bare colored glyph\n * communicates nothing to a screen reader and nothing on touch.\n */\nexport const ContainerValidationIndicator = ({\n count,\n}: ValidationIndicatorProps) => {\n const { token } = antTheme.useToken();\n const t = useI18n();\n const key =\n count === undefined\n ? 'validation.containerHasErrors'\n : count === 1\n ? 'validation.containerError'\n : 'validation.containerErrors';\n // `useI18n` fills `{count}` itself, so the hand-rolled replace is gone.\n const label = t(key, { count });\n return (\n <ContainerIndicator\n label={label}\n color={token.colorError}\n marker={{\n 'data-container-validation-indicator': true,\n 'data-error-count': count,\n }}\n >\n <ErrorIcon />\n </ContainerIndicator>\n );\n};\n","import { Form, Input, Modal, Typography } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../../util/translate';\n\nexport interface AntdAdditionalPropertyRenameDialogProps {\n disabled: boolean;\n error?: string;\n oldName: string | null;\n onCancel: () => void;\n onChange: (value: string) => void;\n onRename: () => void;\n value: string;\n}\n\nexport const AntdAdditionalPropertyRenameDialog = ({\n disabled,\n error,\n oldName,\n onCancel,\n onChange,\n onRename,\n value,\n}: AntdAdditionalPropertyRenameDialogProps) => {\n const t = useI18n();\n return (\n <Modal\n cancelText={t('combinator.cancel')}\n destroyOnHidden\n okButtonProps={{ disabled }}\n okText={t('additionalProperties.renameConfirm')}\n onCancel={onCancel}\n onOk={onRename}\n open={oldName !== null}\n title={t('additionalProperties.renameTitle')}\n >\n <Typography.Paragraph type='secondary'>\n {t('additionalProperties.renameDialogDescription')}\n </Typography.Paragraph>\n <Form.Item\n help={error}\n label={t('additionalProperties.renamePropertyNameLabel')}\n validateStatus={error ? 'error' : undefined}\n >\n <Input\n autoFocus\n aria-label={t('additionalProperties.renamePropertyNameLabel')}\n onChange={(event) => onChange(event.currentTarget.value)}\n onPressEnter={() => {\n if (!disabled) onRename();\n }}\n value={value}\n />\n </Form.Item>\n </Modal>\n );\n};\n","import {\n useI18n,\n useTranslator,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport AlignLeftOutlined from '@ant-design/icons/AlignLeftOutlined';\nimport CheckOutlined from '@ant-design/icons/CheckOutlined';\nimport CodeOutlined from '@ant-design/icons/CodeOutlined';\nimport StopOutlined from '@ant-design/icons/StopOutlined';\nimport React from 'react';\n\nconst typeIcons = new Map<string, React.ReactNode>([\n ['array', '[]'],\n ['object', '{}'],\n ['string', <AlignLeftOutlined key='AlignLeftOutlined' />],\n ['integer', '#'],\n ['number', '#'],\n ['boolean', <CheckOutlined key='CheckOutlined' />],\n ['null', <StopOutlined key='StopOutlined' />],\n]);\n\nexport const AntdJsonTypeIcon = ({ type }: { type: string | null }) => {\n const t = useI18n();\n const translate = useTranslator();\n const label = t('mixed.typedValue', {\n type: translate(`mixed.type.${type ?? 'unknown'}`, type ?? 'unknown'),\n });\n const icon = typeIcons.get(type ?? 'unknown') ?? <CodeOutlined />;\n\n return (\n <span\n aria-label={label}\n className='jsonforms-mixed-tree-type-icon'\n role='img'\n style={{ fontFamily: 'monospace', fontWeight: 600 }}\n title={label}\n >\n {icon}\n </span>\n );\n};\n","import DeleteOutlined from '@ant-design/icons/DeleteOutlined';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport EyeInvisibleOutlined from '@ant-design/icons/EyeInvisibleOutlined';\nimport EyeOutlined from '@ant-design/icons/EyeOutlined';\nimport { Button, Flex, Input, Tooltip, Tree, Typography } from 'antd';\nimport type { DataNode } from 'antd/es/tree';\nimport { useI18n } from '../../util/translate';\nimport React, { useMemo, useState } from 'react';\nimport { AntdAdditionalPropertyRenameDialog } from '../additionalProperties/AntdAdditionalPropertyRenameDialog';\nimport { AntdJsonTypeIcon } from './AntdJsonTypeIcon';\nimport {\n mixedPathKey,\n MixedTreeNode,\n MixedTreePath,\n mixedTreeLabel,\n} from './mixedTree';\n\nexport interface AntdMixedTreeProps {\n domainTree?: boolean;\n renderIndicator?: (node: MixedTreeNode) => React.ReactNode;\n canDelete: (node: MixedTreeNode) => boolean;\n canRename: (node: MixedTreeNode) => boolean;\n onDelete: (node: MixedTreeNode) => void;\n onRename: (node: MixedTreeNode, nextName: string) => void;\n onSelect: (node: MixedTreeNode) => void;\n root: MixedTreeNode;\n selectedPath: MixedTreePath;\n validateRename: (node: MixedTreeNode, nextName: string) => string | undefined;\n}\n\nconst containsSearch = (node: MixedTreeNode, search: string): boolean =>\n mixedTreeLabel(node).toLowerCase().includes(search) ||\n node.children.some((child) => containsSearch(child, search));\n\nexport const AntdMixedTree = ({\n domainTree,\n renderIndicator,\n canDelete,\n canRename,\n onDelete,\n onRename,\n onSelect,\n root,\n selectedPath,\n validateRename,\n}: AntdMixedTreeProps) => {\n const t = useI18n();\n const [search, setSearch] = useState('');\n const [showPrimitives, setShowPrimitives] = useState(false);\n const [expandedKeys, setExpandedKeys] = useState<React.Key[]>([\n mixedPathKey([]),\n ]);\n const [renamingNode, setRenamingNode] = useState<MixedTreeNode | null>(null);\n const [renameValue, setRenameValue] = useState('');\n const normalizedSearch = search.trim().toLowerCase();\n const nodeMap = new Map<string, MixedTreeNode>();\n const renameError = renamingNode\n ? validateRename(renamingNode, renameValue.trim())\n : undefined;\n const searchExpandedKeys = useMemo(() => {\n if (!normalizedSearch) return [];\n const keys: React.Key[] = [];\n const collectMatchingBranches = (node: MixedTreeNode) => {\n if (!containsSearch(node, normalizedSearch)) return;\n if (node.type === 'object' || node.type === 'array') {\n keys.push(mixedPathKey(node.path));\n }\n node.children.forEach(collectMatchingBranches);\n };\n collectMatchingBranches(root);\n return keys;\n }, [normalizedSearch, root]);\n\n const selectedKey = JSON.stringify(selectedPath);\n const [previousSelectedKey, setPreviousSelectedKey] = useState<string>();\n if (previousSelectedKey !== selectedKey) {\n setPreviousSelectedKey(selectedKey);\n const ancestorKeys = selectedPath.map((_, index) =>\n mixedPathKey(selectedPath.slice(0, index)),\n );\n setExpandedKeys((current) => [\n ...new Set([...current, mixedPathKey([]), ...ancestorKeys]),\n ]);\n }\n\n const closeRename = () => {\n setRenamingNode(null);\n setRenameValue('');\n };\n\n const toDataNode = (node: MixedTreeNode): DataNode | null => {\n const structured = node.type === 'object' || node.type === 'array';\n if (\n node.path.length > 0 &&\n !structured &&\n !showPrimitives &&\n mixedPathKey(selectedPath) !== mixedPathKey(node.path) &&\n !normalizedSearch\n ) {\n return null;\n }\n if (normalizedSearch && !containsSearch(node, normalizedSearch))\n return null;\n const key = mixedPathKey(node.path);\n nodeMap.set(key, node);\n const rootNode = node.path.length === 0;\n const deletable = !rootNode && canDelete(node);\n const renameable = (!rootNode || domainTree) && canRename(node);\n return {\n icon: <AntdJsonTypeIcon type={node.type} />,\n key,\n title: (\n <Flex\n align='center'\n className='jsonforms-mixed-tree-row'\n gap={4}\n data-recursive-node={domainTree ? mixedPathKey(node.path) : undefined}\n >\n {rootNode && !domainTree ? null : (\n <Typography.Text\n className='jsonforms-mixed-tree-label'\n ellipsis={{ tooltip: mixedTreeLabel(node) }}\n >\n {mixedTreeLabel(node)}\n </Typography.Text>\n )}\n {renderIndicator?.(node)}\n <Flex\n className={`jsonforms-mixed-tree-actions${\n rootNode && !domainTree ? ' root-actions' : ''\n }`}\n gap={2}\n >\n {rootNode && !domainTree ? (\n <Tooltip\n title={t(\n showPrimitives\n ? 'mixed.hidePrimitives'\n : 'mixed.showPrimitives',\n )}\n >\n <Button\n aria-label={t(\n showPrimitives\n ? 'mixed.hidePrimitives'\n : 'mixed.showPrimitives',\n )}\n icon={\n showPrimitives ? <EyeOutlined /> : <EyeInvisibleOutlined />\n }\n onClick={(event) => {\n event.stopPropagation();\n setShowPrimitives((current) => !current);\n }}\n size='small'\n type='text'\n />\n </Tooltip>\n ) : null}\n {renameable ? (\n <Tooltip title={t('mixed.rename')}>\n <Button\n aria-label={t('mixed.renameNamed', {\n name: mixedTreeLabel(node),\n })}\n icon={<EditOutlined />}\n onClick={(event) => {\n event.stopPropagation();\n setRenamingNode(node);\n setRenameValue(\n domainTree\n ? node.label\n : String(node.path[node.path.length - 1]),\n );\n }}\n size='small'\n type='text'\n />\n </Tooltip>\n ) : null}\n {deletable ? (\n <Tooltip title={t('mixed.delete')}>\n <Button\n aria-label={t('mixed.deleteNamed', {\n name: mixedTreeLabel(node),\n })}\n danger\n icon={<DeleteOutlined />}\n onClick={(event) => {\n event.stopPropagation();\n /*\n Every node goes through the host's `onDelete`, including a\n structured one with children. This used to raise its own\n modal for that case, which is now a second prompt on top\n of the shared section 14 one - and an unconfigurable one,\n so `confirmation: { delete: \"never\" }` could not silence\n it.\n */\n onDelete(node);\n }}\n size='small'\n type='text'\n />\n </Tooltip>\n ) : null}\n </Flex>\n </Flex>\n ),\n children: node.children\n .map(toDataNode)\n .filter((child): child is DataNode => Boolean(child)),\n };\n };\n\n const treeData = [toDataNode(root)].filter((node): node is DataNode =>\n Boolean(node),\n );\n\n return (\n <Flex className='jsonforms-mixed-tree' vertical gap='small'>\n <style>{`\n .jsonforms-mixed-tree .ant-tree-treenode { align-items: center; display: flex; width: 100%; }\n .jsonforms-mixed-tree .ant-tree-indent-unit { width: 20px; }\n .jsonforms-mixed-tree .ant-tree-node-content-wrapper { display: flex; flex: 1 1 auto; min-width: 0; }\n .jsonforms-mixed-tree .ant-tree-iconEle { flex: 0 0 24px; margin-inline-end: 0; text-align: center; }\n .jsonforms-mixed-tree .ant-tree-title { display: block; flex: 1 1 auto; min-width: 0; }\n .jsonforms-mixed-tree .ant-tree-list-holder-inner { min-width: max-content; }\n .jsonforms-mixed-tree-row { min-width: 0; width: 100%; }\n .jsonforms-mixed-tree-label { min-width: 0; flex: 1 1 auto; }\n .jsonforms-mixed-tree-actions { margin-inline-start: auto; flex: 0 0 auto; opacity: 0; visibility: hidden; }\n .jsonforms-mixed-tree-actions.root-actions,\n .ant-tree-node-content-wrapper:hover .jsonforms-mixed-tree-actions,\n .ant-tree-node-content-wrapper:focus-within .jsonforms-mixed-tree-actions { opacity: 1; visibility: visible; }\n .jsonforms-mixed-tree-actions .ant-btn { height: 24px; padding: 0; width: 24px; }\n .jsonforms-mixed-tree-type-icon { align-items: center; display: inline-flex; justify-content: center; width: 20px; }\n `}</style>\n <Input.Search\n allowClear\n aria-label={t('mixed.searchLabel')}\n onChange={(event) => setSearch(event.currentTarget.value)}\n placeholder={t('mixed.searchPlaceholder')}\n value={search}\n />\n <Tree\n aria-label={t('mixed.treeLabel')}\n autoExpandParent={Boolean(normalizedSearch)}\n blockNode\n expandedKeys={normalizedSearch ? searchExpandedKeys : expandedKeys}\n onExpand={(keys) => setExpandedKeys(keys)}\n onSelect={(keys) => {\n const node = keys[0] ? nodeMap.get(String(keys[0])) : undefined;\n if (node) onSelect(node);\n }}\n selectedKeys={[mixedPathKey(selectedPath)]}\n showIcon\n treeData={treeData}\n />\n <AntdAdditionalPropertyRenameDialog\n disabled={\n !renamingNode ||\n Boolean(renameError) ||\n !renameValue.trim() ||\n renameValue.trim() ===\n (domainTree\n ? renamingNode.label\n : String(renamingNode.path[renamingNode.path.length - 1]))\n }\n error={renameError}\n oldName={\n renamingNode\n ? domainTree\n ? renamingNode.label\n : String(renamingNode.path[renamingNode.path.length - 1])\n : null\n }\n onCancel={closeRename}\n onChange={setRenameValue}\n onRename={() => {\n if (!renamingNode || renameError) return;\n onRename(renamingNode, renameValue.trim());\n closeRename();\n }}\n value={renameValue}\n />\n </Flex>\n );\n};\n","import React from 'react';\nimport { useConfirmation } from '../util/useConfirmation';\nimport {\n createRecursiveTreeRenderer,\n recursiveTreeTester,\n} from '@chobantonov/jsonforms-react-renderer-common/mixed/RecursiveTreeRenderer';\nimport { ContainerValidationIndicator } from '../layouts/ValidationIndicator';\nimport { AntdMixedTree as Tree } from './mixed/AntdMixedTree';\nimport { Button } from 'antd';\nexport { recursiveTreeTester };\nexport const RecursiveTreeRenderer = createRecursiveTreeRenderer(\n Tree,\n ContainerValidationIndicator,\n ({ children, onClick }) => (\n <Button type='link' onClick={onClick}>\n {children}\n </Button>\n ),\n useConfirmation,\n);\n","import { theme } from 'antd';\nimport { createChoiceCards } from '@chobantonov/jsonforms-react-renderer-common/composition/choiceCards';\nimport { useConfirmation } from '../util/useConfirmation';\nexport const ChoiceCards = createChoiceCards(useConfirmation, () => {\n const { token } = theme.useToken();\n return {\n border: token.colorBorder,\n selected: token.colorPrimary,\n focus: token.colorPrimary,\n background: token.colorBgContainer,\n error: token.colorError,\n };\n});\n","import React from 'react';\nimport { Button, Popover, Typography, theme } from 'antd';\nimport WarningOutlined from '@ant-design/icons/WarningOutlined';\nimport ExclamationCircleOutlined from '@ant-design/icons/ExclamationCircleOutlined';\nexport const FileFeedback = ({\n message,\n cell,\n severity,\n}: {\n message: string;\n cell?: boolean;\n severity: 'warning' | 'error';\n}) => {\n const { token } = theme.useToken();\n const color = severity === 'warning' ? token.colorWarning : token.colorError;\n return cell ? (\n <Popover content={message} trigger={['hover', 'focus', 'click']}>\n <Button\n type='text'\n size='small'\n aria-label={message}\n style={{ color, flexShrink: 0 }}\n icon={\n severity === 'warning' ? (\n <WarningOutlined />\n ) : (\n <ExclamationCircleOutlined />\n )\n }\n />\n </Popover>\n ) : (\n <Typography.Text style={{ color }} role='alert' data-file-rejection>\n {message}\n </Typography.Text>\n );\n};\n","import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';\nimport { Button, Tooltip } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../util/translate';\n\n/** Enough to clear a `Form.Item` feedback icon and the input's padding. */\nexport const CLEAR_OFFSET = 24;\n\n/**\n * Enough to also clear `InputNumber`'s stepper handles, which antd reveals on\n * hover in the same corner - the default offset put the button on top of them.\n * 22px is antd's handler-wrap width.\n */\nexport const CLEAR_OFFSET_WITH_HANDLES = CLEAR_OFFSET + 22;\n\nexport interface AntdClearValueButtonProps {\n clearable?: boolean;\n data: unknown;\n enabled: boolean;\n onClear: () => void;\n visible?: boolean;\n /**\n * Distance from the trailing edge, in pixels.\n *\n * The button is positioned over the control rather than handed to antd's\n * `suffix` slot, because `Form.Item` feedback *replaces* that slot rather\n * than composing with it - `suffix: suffixNode || suffix` in antd's\n * `InputNumber` - so a field with a validation error would lose its clear\n * button exactly when someone wants it.\n *\n * The default clears a feedback icon. A control that also shows stepper\n * handles needs more; see `CLEAR_OFFSET_WITH_HANDLES`.\n *\n * Ignored when {@link AntdClearValueButtonProps.inline} is set.\n */\n offset?: number;\n /**\n * Render in the normal flow instead of over the control.\n *\n * `Input` - unlike `InputNumber` - *composes* its `suffix` with the\n * `Form.Item` feedback icon (`<>{suffix}{hasFeedback && feedbackIcon}</>`),\n * so a control built on it can put this button in that slot and let antd lay\n * the row out. An `Input.Password` has three trailing affordances - reveal,\n * clear and the error icon - and no fixed offset places the middle one\n * correctly in both states: the feedback icon is only there while the value\n * is invalid, so an offset that clears it leaves a gap when it is not.\n */\n inline?: boolean;\n}\n\nexport const AntdClearValueButton = ({\n clearable = true,\n data,\n enabled,\n onClear,\n visible = true,\n offset = CLEAR_OFFSET,\n inline = false,\n}: AntdClearValueButtonProps) => {\n const t = useI18n();\n const populated = data !== undefined && data !== null && data !== '';\n // A slotted button takes up space even at zero opacity. Password fields put\n // it before the persistent reveal button, so remove it while inactive.\n if (!clearable || !enabled || !populated || (inline && !visible)) return null;\n\n return (\n <Tooltip title={t('control.clearValue')}>\n <Button\n aria-label={t('control.clearValue')}\n icon={<CloseCircleFilled />}\n onClick={(event) => {\n event.stopPropagation();\n onClear();\n }}\n onMouseDown={(event) => event.preventDefault()}\n shape='circle'\n size='small'\n style={{\n opacity: visible ? 1 : 0,\n pointerEvents: visible ? 'auto' : 'none',\n transition: 'opacity 120ms ease',\n ...(inline\n ? {}\n : {\n insetBlockStart: '50%',\n insetInlineEnd: `calc(${offset}px + var(--jf-end-adornment-space, 0px))`,\n position: 'absolute',\n transform: 'translateY(-50%)',\n zIndex: 2,\n }),\n }}\n type='text'\n />\n </Tooltip>\n );\n};\n","import React, { ReactNode, useState } from 'react';\nimport { AntdClearValueButton } from './AntdClearValueButton';\n\nexport interface AntdClearableInputProps {\n /**\n * The control, or a function that places the clear button itself.\n *\n * The plain form overlays the button on the control. The function form hands\n * it back so a control can put it in antd's `suffix` slot instead, which is\n * what `Input`-based controls with their own trailing icon need - see\n * `inline` in `AntdClearValueButton`.\n */\n children: ReactNode | ((clear: ReactNode) => ReactNode);\n clearable?: boolean;\n data: unknown;\n enabled: boolean;\n onClear: () => void;\n /** Distance from the trailing edge; see `AntdClearValueButton`. */\n offset?: number;\n}\n\nexport const AntdClearableInput = ({\n children,\n clearable,\n data,\n enabled,\n onClear,\n offset,\n}: AntdClearableInputProps) => {\n const [active, setActive] = useState(false);\n const slotted = typeof children === 'function';\n const clear = (\n <AntdClearValueButton\n clearable={clearable}\n data={data}\n enabled={enabled}\n inline={slotted}\n offset={offset}\n onClear={onClear}\n visible={active}\n />\n );\n\n return (\n <span\n className='jsonforms-antd-clearable-input'\n onBlurCapture={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) {\n setActive(false);\n }\n }}\n onFocusCapture={() => setActive(true)}\n onMouseEnter={() => setActive(true)}\n onMouseLeave={() => setActive(false)}\n style={{ display: 'block', minWidth: 0, position: 'relative' }}\n >\n {slotted\n ? (children as (clear: ReactNode) => ReactNode)(clear)\n : children}\n {slotted ? null : clear}\n </span>\n );\n};\n","import React from 'react';\nimport { Button, Popover, Tooltip } from 'antd';\nimport {\n ErrorSummaryList,\n useErrorFeedback,\n} from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\n\nexport const ErrorFeedback = ({\n errors,\n path,\n children,\n local = false,\n}: React.PropsWithChildren<{\n errors: string;\n path?: string;\n local?: boolean;\n}>) => {\n const { setOpen, count, entries, message } = useErrorFeedback(\n errors,\n path,\n local,\n );\n if (count <= 1)\n return (\n <Tooltip\n onOpenChange={setOpen}\n trigger={['hover', 'focus']}\n title={<span style={{ whiteSpace: 'pre-line' }}>{message}</span>}\n >\n {children}\n </Tooltip>\n );\n return (\n <Popover\n onOpenChange={setOpen}\n trigger={['hover', 'focus', 'click']}\n content={\n <ErrorSummaryList\n entries={entries}\n renderToggle={(label, toggle, expanded) => (\n <Button type='link' onClick={toggle} aria-expanded={expanded}>\n {label}\n </Button>\n )}\n />\n }\n >\n {children}\n </Popover>\n );\n};\n","import React from 'react';\nimport { InputAdornments } from '@chobantonov/jsonforms-react-renderer-common/controls/inputAdornments';\nimport { Form } from 'antd';\nimport { useJsonForms } from '@jsonforms/react';\nimport { ErrorFeedback } from '../complex/ErrorFeedback';\nimport ExclamationCircleFilled from '@ant-design/icons/ExclamationCircleFilled';\n\nimport { useCellMode } from '@chobantonov/jsonforms-react-renderer-common/cells/cellMode';\nexport {\n CellModeProvider,\n useCellMode,\n} from '@chobantonov/jsonforms-react-renderer-common/cells/cellMode';\n\nexport interface ControlFormItemProps {\n path?: string;\n id?: string;\n htmlFor?: string;\n label?: React.ReactNode;\n required?: boolean;\n hideRequiredAsterisk?: boolean;\n /** Validation messages; drives the error state and, in cells, the tooltip. */\n errors?: string;\n /** Message shown under the control outside cells (errors or description). */\n help?: React.ReactNode;\n style?: React.CSSProperties;\n children?: React.ReactNode;\n adornmentSchema?: { type?: unknown };\n adornmentOptions?: Record<string, unknown>;\n}\n\n/**\n * The single Form.Item every antd control renders through.\n *\n * Outside a table it behaves as before: label above, message below. Inside a\n * cell the column header already supplies the label and a message underneath\n * would break the row height, so both are dropped and the validation message\n * moves into a tooltip on the control's error state instead.\n */\nexport const ControlFormItem = ({\n path,\n id,\n htmlFor,\n label,\n required,\n hideRequiredAsterisk,\n errors,\n help,\n style,\n children,\n adornmentSchema,\n adornmentOptions,\n}: ControlFormItemProps) => {\n const cell = useCellMode();\n const context = useJsonForms();\n const showRequired =\n required && !(hideRequiredAsterisk ?? context.config?.hideRequiredAsterisk);\n const isValid = !errors || errors.length === 0;\n\n /**\n * antd's hasFeedback accepts custom icons, so the validation message can hang\n * off the error icon itself rather than the whole field. One message per line\n * keeps multi-error tooltips readable.\n *\n * **`hasFeedback` stays on whether or not the field is valid, and the icon is\n * suppressed instead.** It is not a style choice; switching it changes the\n * DOM. antd composes the feedback icon into the input's `suffix`, and an antd\n * `Input` with no prefix, suffix or `allowClear` renders a bare `<input>`\n * while one with any of them nests it inside\n * `<span class=\"ant-input-affix-wrapper\">`. Turning feedback on at the moment\n * a field becomes invalid therefore moves the input to a new position in the\n * element tree, so React unmounts it and mounts a fresh one - and whoever was\n * typing loses the caret mid-word. antd warns about exactly this in\n * development: \"dynamic add or remove prefix / suffix will make it lose focus\n * caused by dom structure change\".\n *\n * Returning `false` for a status is antd's own way to say it draws no icon,\n * while the slot - and so the element tree - stays put. The only trace on a\n * valid field is an empty suffix span holding four pixels open, which is a\n * gutter the error icon then no longer has to push the text aside to claim.\n *\n * Any control that always has a prefix or suffix of its own - the color\n * picker's swatch, the password field's reveal button - was already immune,\n * which is why this only ever showed up on the plain text and masked fields.\n */\n const feedbackIcons = () => ({\n success: false,\n warning: false,\n validating: false,\n error: (\n <ErrorFeedback errors={errors ?? ''} path={path} local>\n <ExclamationCircleFilled\n // In a cell the message exists only inside the tooltip, which opens\n // on hover and so is not reachable by a screen reader. Naming the\n // icon with the message keeps it announced.\n tabIndex={0}\n role='img'\n aria-label={errors}\n // antd sets pointer-events: none on .ant-form-item-feedback-icon so\n // the icon never blocks the input. That also means it never receives\n // hover, so the tooltip would never open - a descendant may opt back\n // in without making the whole slot clickable.\n style={{ pointerEvents: 'auto', cursor: 'help' }}\n />\n </ErrorFeedback>\n ),\n });\n\n const content = adornmentOptions ? (\n <InputAdornments schema={adornmentSchema} options={adornmentOptions}>\n {children}\n </InputAdornments>\n ) : (\n children\n );\n\n if (cell) {\n return (\n <Form.Item\n required={showRequired}\n hasFeedback={{ icons: feedbackIcons }}\n validateStatus={isValid ? 'success' : 'error'}\n style={{ marginBottom: 0, ...style }}\n htmlFor={htmlFor}\n id={id}\n >\n {content}\n </Form.Item>\n );\n }\n\n return (\n <Form.Item\n required={showRequired}\n hasFeedback={{ icons: feedbackIcons }}\n validateStatus={isValid ? 'success' : 'error'}\n label={label}\n help={help ?? null}\n style={style}\n htmlFor={htmlFor}\n id={id}\n >\n {content}\n </Form.Item>\n );\n};\n","import { FileFeedback } from './FileFeedback';\nimport { AntdClearableInput } from './AntdClearableInput';\nimport {\n FileArrayInput,\n fileItemSchema,\n attachmentName,\n} from '@chobantonov/jsonforms-react-renderer-common/controls/FileArrayInput';\nimport { Input, Tooltip, theme, Button, Upload } from 'antd';\nimport FileOutlined from '@ant-design/icons/FileOutlined';\nimport { useCellMode } from '../util/cellMode';\nimport React, { useState } from 'react';\nimport {\n CellProps,\n JsonSchema,\n WithClassname,\n getI18nKey,\n} from '@jsonforms/core';\nimport toNumber from 'lodash/toNumber';\nimport { TranslateProps } from '@jsonforms/react';\nimport { useI18n, useI18nDefault } from '../util/translate';\n\nconst FileActionButton = ({\n type: _type,\n color: _color,\n ...props\n}: React.ButtonHTMLAttributes<HTMLButtonElement>) => (\n <Button {...props} htmlType='button' type='text' size='small' />\n);\nconst FilePill = ({\n style,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n const { token } = theme.useToken();\n return (\n <span\n {...props}\n style={{\n ...style,\n background: token.colorFillSecondary,\n color: token.colorText,\n fontSize: token.fontSizeSM,\n }}\n />\n );\n};\n\ninterface UploadProgressEvent extends Partial<ProgressEvent> {\n percent?: number;\n}\n\nconst formatBytes = (bytes: number, byteUnit: string, decimals = 2) => {\n if (bytes === 0) return `0 ${byteUnit}`;\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = [byteUnit, 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\nconst toNonNegativeNumber = (param: any): number | undefined => {\n const result = param !== undefined ? toNumber(param) : undefined;\n return result && result >= 0 ? result : undefined;\n};\n\nconst getFileSize = (\n schema: JsonSchema & {\n formatMinimum: any;\n formatMaximum: any;\n formatExclusiveMinimum: any;\n formatExclusiveMaximum: any;\n },\n uioptions:\n | {\n formatMinimum: any;\n formatMaximum: any;\n formatExclusiveMinimum: any;\n formatExclusiveMaximum: any;\n }\n | undefined,\n variant: 'min' | 'max',\n): [number | undefined, boolean] => {\n let exclusive = false;\n let fileSize: number | undefined = undefined;\n\n if (variant === 'min') {\n fileSize = toNonNegativeNumber(schema?.formatMinimum);\n if (fileSize === undefined && schema?.formatExclusiveMinimum) {\n fileSize = toNonNegativeNumber(schema?.formatExclusiveMinimum);\n exclusive = true;\n }\n\n if (fileSize === undefined && uioptions) {\n if (\n typeof uioptions.formatMinimum === 'number' ||\n typeof uioptions.formatMinimum === 'string'\n ) {\n fileSize = toNonNegativeNumber(uioptions.formatMinimum);\n } else if (\n typeof uioptions.formatExclusiveMinimum === 'number' ||\n typeof uioptions.formatExclusiveMinimum === 'string'\n ) {\n fileSize = toNonNegativeNumber(uioptions.formatExclusiveMinimum);\n exclusive = true;\n }\n }\n } else {\n fileSize = toNonNegativeNumber(schema?.formatMaximum);\n if (fileSize === undefined && schema?.formatExclusiveMaximum) {\n fileSize = toNonNegativeNumber(schema?.formatExclusiveMaximum);\n exclusive = true;\n }\n\n if (fileSize === undefined && uioptions) {\n if (\n typeof uioptions.formatMaximum === 'number' ||\n typeof uioptions.formatMaximum === 'string'\n ) {\n fileSize = toNonNegativeNumber(uioptions.formatMaximum);\n } else if (\n typeof uioptions.formatExclusiveMaximum === 'number' ||\n typeof uioptions.formatExclusiveMaximum === 'string'\n ) {\n fileSize = toNonNegativeNumber(uioptions.formatExclusiveMaximum);\n exclusive = true;\n }\n }\n }\n\n return [fileSize, exclusive];\n};\n\nconst toBase64 = (\n file: File,\n reader: FileReader,\n onProgress: (event: UploadProgressEvent) => void,\n schemaFormat?: string,\n) =>\n new Promise((resolve, reject) => {\n reader.onload = () => {\n const dataurl = reader.result as string;\n if (schemaFormat === 'uri') {\n resolve(dataurl);\n } else if (schemaFormat === 'binary') {\n //special handling to encode the filename\n const insertIndex = dataurl.indexOf(';base64,');\n resolve(\n dataurl.substring(0, insertIndex) +\n `;filename=${encodeURIComponent(file.name)}` +\n dataurl.substring(insertIndex),\n );\n } else {\n resolve(dataurl.substring(dataurl.indexOf(',') + 1));\n }\n };\n reader.onabort = (error) => reject(error);\n reader.onerror = (error) => reject(error);\n reader.onprogress = onProgress;\n reader.readAsDataURL(file);\n });\n\nexport const AntdFile = React.memo(function AntdFile(\n props: CellProps &\n WithClassname &\n TranslateProps & {\n inputProps?: React.ComponentProps<typeof Upload>;\n },\n) {\n const { schema, uischema, path, handleChange, enabled, t, inputProps } =\n props;\n /*\n The default message carries the locale bundle (§6.5), so it must not be\n read straight out of the English table.\n */\n const d = useI18nDefault();\n const text = useI18n();\n const cell = useCellMode();\n const [attachment, setAttachment] = useState<{\n value: unknown;\n name: string;\n }>();\n const [severity, setSeverity] = useState<'warning' | 'error'>('warning');\n\n const [rejection, setRejection] = useState<string | undefined>(undefined);\n const [previousData, setPreviousData] = React.useState(props.data);\n if (!Object.is(previousData, props.data)) {\n setPreviousData(() => props.data);\n setRejection(undefined);\n }\n\n /** Why a selection breaks its size bounds, or undefined if it passes. */\n const sizeRejection = (file: { size: number }): string | undefined => {\n const [minFileSize, minFileSizeExclusive] = getFileSize(\n schema as any,\n uischema.options as any,\n 'min',\n );\n const [maxFileSize, maxFileSizeExclusive] = getFileSize(\n schema as any,\n uischema.options as any,\n 'max',\n );\n\n if (maxFileSize) {\n const valid = maxFileSizeExclusive\n ? file.size < maxFileSize\n : file.size <= maxFileSize;\n if (!valid) {\n const key = getI18nKey(\n schema,\n uischema,\n path,\n maxFileSizeExclusive\n ? 'error.formatExclusiveMaximum'\n : 'error.formatMaximum',\n );\n const formatSize = formatBytes(maxFileSize, text('file.bytes'));\n return t(key, text('file.maximumSize', { limitText: formatSize }), {\n limitText: `${formatSize}`,\n limit: `${maxFileSize}`,\n });\n }\n }\n\n if (minFileSize) {\n const valid = minFileSizeExclusive\n ? file.size > minFileSize\n : file.size >= minFileSize;\n if (!valid) {\n const key = getI18nKey(\n schema,\n uischema,\n path,\n minFileSizeExclusive\n ? 'error.formatExclusiveMinimum'\n : 'error.formatMinimum',\n );\n const formatSize = formatBytes(minFileSize, text('file.bytes'));\n return t(key, text('file.minimumSize', { limitText: formatSize }), {\n limitText: `${formatSize}`,\n limit: `${minFileSize}`,\n });\n }\n }\n return undefined;\n };\n\n /**\n * The message shown when a selection is refused.\n *\n * It names the file. The previously committed attachment is still listed\n * above this message, so a bare \"size should be less than 1 MB\" reads as an\n * error about *that* file; naming the one that was turned away removes the\n * ambiguity. Falls back to the bare reason when the platform gives no name.\n */\n const rejectionMessage = (file: {\n size: number;\n name?: string;\n }): string | undefined => {\n const reason = sizeRejection(file);\n if (!reason || !file.name) {\n return reason;\n }\n return t('file.rejected', d('file.rejected'), {\n name: file.name,\n reason,\n })\n .replace('{name}', file.name)\n .replace('{reason}', reason);\n };\n\n /**\n * Size is checked here, before anything else happens to the selection.\n *\n * `Upload.LIST_IGNORE` drops the rejected file without adding it to the\n * list, so `customRequest` never runs: nothing is read, nothing is\n * converted, and - the point of doing it here - **the value already\n * committed is left alone**. Rejecting inside `customRequest` meant writing\n * `undefined` to the form first, so choosing an oversized file destroyed a\n * perfectly good attachment.\n */\n const beforeUpload = (file: { size: number; name?: string }) => {\n setSeverity('warning');\n const message = rejectionMessage(file);\n setRejection(message);\n return message ? Upload.LIST_IGNORE : true;\n };\n\n const uploadImage = async (options: any) => {\n const { onSuccess, onError, file, onProgress } = options;\n try {\n const base64 = await toBase64(\n file,\n new FileReader(),\n onProgress,\n schema.format,\n );\n setRejection(undefined);\n setAttachment({ value: base64, name: file.name });\n handleChange(path, base64);\n onSuccess('Ok');\n } catch {\n // A failed read of a *new* file is not a reason to discard the value\n // that is already committed, for the same reason a size rejection is\n // not. Report it and leave the form data untouched.\n setSeverity('error');\n const message = t('file.readFailed', d('file.readFailed'));\n setRejection(message);\n onError({ message });\n }\n };\n\n if (fileItemSchema(props.schema, props.rootSchema)) {\n return (\n <FileArrayInput\n {...props}\n cell={cell}\n FeedbackComponent={FileFeedback}\n ButtonComponent={FileActionButton}\n PillComponent={FilePill}\n />\n );\n }\n const name = props.data\n ? (attachmentName(props.data) ??\n (attachment && attachment.value === props.data\n ? attachment.name\n : t('file.attached', d('file.attached'))))\n : '';\n return (\n <div style={{ minWidth: 0, width: '100%' }}>\n <AntdClearableInput\n data={props.data}\n enabled={enabled}\n clearable={props.uischema.options?.clearable !== false}\n onClear={() => {\n setRejection(undefined);\n handleChange(path, undefined);\n }}\n >\n {(clear) => (\n <Input\n readOnly\n disabled={!enabled}\n value={name}\n title={name}\n id={props.id}\n aria-label={props.path}\n aria-invalid={Boolean(props.errors)}\n prefix={\n <Upload\n disabled={!enabled}\n accept={(props.schema as any).contentMediaType}\n beforeUpload={beforeUpload}\n customRequest={uploadImage}\n listType='text'\n showUploadList={false}\n maxCount={1}\n onRemove={() => {\n // An explicit removal is the one case that should clear the value.\n setRejection(undefined);\n handleChange(path, undefined);\n }}\n {...inputProps}\n >\n <Tooltip title={t('file.select', d('file.select'))}>\n <Button\n type='text'\n size='small'\n disabled={!enabled}\n aria-label={t('file.select', d('file.select'))}\n icon={<FileOutlined />}\n />\n </Tooltip>\n </Upload>\n }\n suffix={\n <>\n {cell && rejection && (\n <FileFeedback message={rejection} cell severity={severity} />\n )}\n {clear}\n </>\n }\n />\n )}\n </AntdClearableInput>\n {rejection && !cell && (\n <FileFeedback message={rejection} severity={severity} />\n )}\n </div>\n );\n});\n","import React from 'react';\nimport { Button } from 'antd';\nimport ExclamationCircleOutlined from '@ant-design/icons/ExclamationCircleOutlined';\nimport { ErrorFeedback } from './ErrorFeedback';\nexport interface ValidationProps {\n errorMessages: string;\n id: string;\n path?: string;\n local?: boolean;\n}\nexport const ValidationIcon: React.FC<ValidationProps> = ({\n errorMessages,\n id,\n path,\n local,\n}) => {\n return errorMessages ? (\n <ErrorFeedback errors={errorMessages} path={path} local={local}>\n <Button\n id={id}\n data-validation-summary\n type='text'\n danger\n size='small'\n aria-label={errorMessages}\n icon={<ExclamationCircleOutlined />}\n />\n </ErrorFeedback>\n ) : null;\n};\n","import React from 'react';\nimport { Modal, Button, Tooltip } from 'antd';\nimport { FullscreenOutlined, FullscreenExitOutlined } from '@ant-design/icons';\nimport {\n useDetailDialog,\n DetailDialogOptions,\n} from '@chobantonov/jsonforms-react-renderer-common/interaction/detailDialog';\nimport { useTranslator } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\n\nexport const DetailModal = ({\n options = {},\n ...props\n}: React.ComponentProps<typeof Modal> & { options?: DetailDialogOptions }) => {\n const t = useTranslator();\n const surface = React.useRef<HTMLDivElement>(null);\n const geometry = useDetailDialog(\n !!props.open,\n options,\n () => surface.current?.firstElementChild as HTMLElement | null,\n );\n const [restoredWidth, setRestoredWidth] = React.useState<string>();\n if (!props.open && restoredWidth !== undefined) setRestoredWidth(undefined);\n const toggle = () => {\n if (!geometry.maximized) {\n // Native CSS resizing writes an inline width on the content container.\n const container = surface.current\n ?.firstElementChild as HTMLElement | null;\n if (container?.style.width) setRestoredWidth(container.style.width);\n }\n geometry.toggle();\n };\n const styles =\n typeof props.styles === 'function' ? props.styles({ props }) : props.styles;\n const label = geometry.maximized\n ? t('dialog.restore', 'Restore dialog')\n : t('dialog.maximize', 'Maximize dialog');\n return (\n <Modal\n {...props}\n centered={props.centered ?? true}\n width={geometry.style.width ?? props.width}\n style={{\n ...props.style,\n top: props.centered === false ? 16 : 0,\n paddingBottom: 0,\n }}\n styles={{\n ...styles,\n container: {\n ...styles?.container,\n width: geometry.maximized ? '100%' : restoredWidth,\n resize: geometry.style.resize,\n minWidth: 280,\n minHeight: 160,\n maxWidth: geometry.style.maxWidth,\n height: geometry.style.height,\n maxHeight: geometry.style.maxHeight,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n },\n body: {\n ...styles?.body,\n flex: '1 1 auto',\n minHeight: 0,\n maxHeight: undefined,\n overflow: 'auto',\n },\n header: { ...styles?.header, flexShrink: 0 },\n footer: {\n ...styles?.footer,\n flexShrink: 0,\n marginTop: 'auto',\n paddingTop: 12,\n textAlign: 'end',\n },\n }}\n modalRender={(node) => (\n <div ref={surface} style={{ translate: geometry.style.translate }}>\n {node}\n </div>\n )}\n title={\n <div\n {...geometry.dragProps}\n style={{ ...geometry.dragProps.style, paddingRight: 56 }}\n >\n {props.title}\n {geometry.options.maximizable !== false && (\n <Tooltip title={label}>\n <Button\n type='text'\n aria-label={label}\n style={{ position: 'absolute', right: 48, top: 12 }}\n icon={\n geometry.maximized ? (\n <FullscreenExitOutlined />\n ) : (\n <FullscreenOutlined />\n )\n }\n onClick={toggle}\n />\n </Tooltip>\n )}\n </div>\n }\n />\n );\n};\n","import {\n useCompositeDraft,\n type CompositeDetailDialogProps,\n} from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeDraft';\nexport type { CompositeDetailDialogOptions } from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeDraft';\nimport { DetailModal } from '../complex/DetailModal';\nimport React from 'react';\nimport { Button, Tooltip } from 'antd';\nimport { JsonFormsContext } from '@jsonforms/react';\nimport { CellModeProvider } from '../util/cellMode';\nimport { PendingChangesProvider } from '../util/pendingChanges';\n\n/**\n * A detail dialog that edits an isolated copy of the form state, so nothing\n * reaches the form until Apply. Ported from the Svelte renderers'\n * `useDetailDialog`.\n *\n * The whole core is cloned rather than just the value at `path`, so `$ref`s\n * into the root schema and rules that read other parts of the data still\n * resolve while the dialog is open. Only writes are redirected: dispatch is\n * replaced with one that accepts UPDATE_DATA inside `path` and drops\n * everything else.\n */\nexport const CompositeDetailDialog = (props: CompositeDetailDialogProps) => {\n const { open, title, label, options, t, children } = props;\n const dialog = useCompositeDraft(props);\n\n const footer = (\n <div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end' }}>\n {options.showEmptyButton === true && (\n <Tooltip\n title={t(\n 'composite.emptyTooltip',\n dialog.defaultMessage('composite.emptyTooltip'),\n )}\n >\n <span>\n <Button disabled={!dialog.canEmpty} onClick={dialog.clear}>\n {dialog.buttonLabel(options.emptyLabel, 'composite.empty')}\n </Button>\n </span>\n </Tooltip>\n )}\n <Tooltip\n title={t(\n 'composite.cancelTooltip',\n dialog.defaultMessage('composite.cancelTooltip'),\n )}\n >\n <Button onClick={dialog.cancel}>\n {dialog.buttonLabel(options.cancelLabel, 'composite.cancel')}\n </Button>\n </Tooltip>\n <Tooltip\n title={\n dialog.conflicted\n ? t(\n 'composite.applyConflict',\n dialog.defaultMessage('composite.applyConflict'),\n )\n : t(\n 'composite.applyTooltip',\n dialog.defaultMessage('composite.applyTooltip'),\n )\n }\n >\n <span>\n <Button\n type='primary'\n disabled={!dialog.canApply}\n onClick={dialog.apply}\n >\n {dialog.buttonLabel(options.okLabel, 'composite.apply')}\n </Button>\n </span>\n </Tooltip>\n </div>\n );\n\n return (\n <DetailModal\n options={options.dialog}\n open={open}\n title={title}\n onCancel={dialog.cancel}\n footer={footer}\n destroyOnHidden\n width={640}\n aria-label={label}\n >\n <JsonFormsContext.Provider value={dialog.context as any}>\n <PendingChangesProvider changes={dialog.pending}>\n {/* the dialog is a normal form: labels, descriptions and inline\n messages all come back */}\n <CellModeProvider value={false}>{children}</CellModeProvider>\n </PendingChangesProvider>\n </JsonFormsContext.Provider>\n </DetailModal>\n );\n};\n","import { useCompositeCellPresentation } from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeCellPresentation';\nimport React, { useLayoutEffect, useState, useRef } from 'react';\nimport { resolveEditorDetail } from '@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema';\nimport { CellSummary } from '@chobantonov/jsonforms-react-renderer-common/cells/CellSummary';\nimport { ValidationIcon } from '../complex/ValidationIcon';\nimport { Button, theme } from 'antd';\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport {\n CellProps,\n Translator,\n JsonFormsCellRendererRegistryEntry,\n JsonFormsRendererRegistryEntry,\n UISchemaElement,\n} from '@jsonforms/core';\n\n/** DispatchCell forwards these, but they are not part of CellProps. */\ntype CompositeCellProps = CellProps & {\n renderers?: JsonFormsRendererRegistryEntry[];\n cells?: JsonFormsCellRendererRegistryEntry[];\n /** Supplied by withTranslateProps; every visible string goes through it. */\n t: Translator;\n};\nimport {\n JsonFormsDispatch,\n useJsonForms,\n withJsonFormsCellProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { useConfirmation } from '../util/useConfirmation';\nimport { useI18nDefault } from '../util/translate';\nimport {\n CompositeDetailDialog,\n CompositeDetailDialogOptions,\n} from './CompositeDetailDialog';\n\nconst AntdCompositeCell = (props: CompositeCellProps) => {\n const { t } = props;\n const context = useJsonForms();\n const { token } = theme.useToken();\n /*\n The default message carries the locale bundle (§6.5), so it must not be\n read straight out of the English table.\n */\n const d = useI18nDefault();\n const confirmation = useConfirmation();\n const latest = useRef(props);\n useLayoutEffect(() => {\n latest.current = props;\n }, [props]);\n const [open, setOpen] = useState(false);\n const [active, setActive] = useState(false);\n const options = (props.uischema?.options ??\n {}) as CompositeDetailDialogOptions & {\n summary?: UISchemaElement;\n detail?: UISchemaElement | string;\n clearable?: boolean;\n summaryOnly?: boolean;\n showTypeIndicator?: boolean;\n };\n const { errors, summary } = useCompositeCellPresentation(props, t, d);\n const isArray = Array.isArray(props.data) || props.schema?.type === 'array';\n const label =\n props.schema?.title ??\n (isArray\n ? t('composite.itemsLabel', d('composite.itemsLabel'))\n : t('composite.detailsLabel', d('composite.detailsLabel')));\n const translateWithLabel = (key: 'composite.edit' | 'composite.remove') =>\n t(key, d(key), { label }).replace('{label}', label);\n const detail = resolveEditorDetail(\n options.detail,\n context.uischemas ?? [],\n props.schema,\n props.uischema.scope,\n props.path,\n props.rootSchema,\n { type: 'Control', scope: '#', label: false } as any,\n );\n // Cell removal shares the destructive-change policy.\n const canClear =\n props.enabled &&\n !options.summaryOnly &&\n (options.summary?.type !== 'Label' || !!options.detail) &&\n props.data !== undefined &&\n options.clearable !== false;\n return (\n <div\n style={{ display: 'flex', alignItems: 'center', gap: 6, minWidth: 0 }}\n onMouseEnter={() => setActive(true)}\n onMouseLeave={() => setActive(false)}\n onFocus={() => setActive(true)}\n onBlur={() => setActive(false)}\n >\n {(options.showTypeIndicator ??\n props.config?.showTypeIndicator ??\n false) === true &&\n (isArray || props.schema?.type === 'object') && (\n <span\n aria-hidden='true'\n style={{ flex: 'none', opacity: 0.55, lineHeight: 0 }}\n >\n {isArray ? '[]' : '{}'}\n </span>\n )}\n {/* one line: the row height must not grow with the content */}\n <span\n style={{\n color:\n summary.generated && options.summary?.type !== 'Label'\n ? token.colorTextSecondary\n : undefined,\n fontStyle:\n summary.generated && options.summary?.type !== 'Label'\n ? 'italic'\n : undefined,\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {options.summary?.type === 'Label' ? (\n <CellSummary\n schema={props.schema}\n path={props.path}\n uischema={options.summary}\n />\n ) : (\n summary.text\n )}\n </span>\n <ValidationIcon\n errorMessages={errors}\n path={props.path}\n id={`${props.path}-cell-errors`}\n />\n {/* opacity rather than mounting: keeps the row from reflowing on hover */}\n {((!options.summaryOnly && options.summary?.type !== 'Label') ||\n options.detail) && (\n <span\n style={{\n display: 'flex',\n gap: 2,\n flex: 'none',\n opacity: active || open ? 1 : 0,\n transition: 'opacity 0.2s',\n }}\n >\n <Button\n size='small'\n type='text'\n icon={<EditOutlined />}\n onClick={() => setOpen(true)}\n title={translateWithLabel('composite.edit')}\n aria-label={translateWithLabel('composite.edit')}\n />\n {canClear && (\n <Button\n size='small'\n type='text'\n danger\n icon={<CloseOutlined />}\n onClick={() => {\n const target = props.data;\n const path = props.path;\n confirmation.request({\n catalogId: 'compositeCell',\n operation: 'delete',\n options,\n config: props.config,\n discarded: [target],\n perform: () => {\n const current = latest.current;\n if (\n current.enabled &&\n current.path === path &&\n current.data === target &&\n current.uischema.options?.clearable !== false\n )\n current.handleChange(path, undefined);\n },\n });\n }}\n title={translateWithLabel('composite.remove')}\n aria-label={translateWithLabel('composite.remove')}\n />\n )}\n </span>\n )}\n {confirmation.dialog}\n <CompositeDetailDialog\n open={open}\n title={\n props.schema?.title ??\n t('composite.detailsTitle', d('composite.detailsTitle'))\n }\n label={label}\n path={props.path}\n schema={props.schema}\n enabled={Boolean(props.enabled)}\n options={options}\n t={t}\n onClose={() => setOpen(false)}\n onApply={(value) => props.handleChange(props.path, value)}\n >\n <JsonFormsDispatch\n schema={props.schema}\n uischema={detail}\n path={props.path}\n enabled={props.enabled}\n renderers={props.renderers}\n cells={props.cells}\n />\n </CompositeDetailDialog>\n </div>\n );\n};\n\n/**\n * Structured, mixed and composed values. A catch-all would tie with scalar cells (also\n * rank 1) and win on registration order, swallowing every string column.\n */\nexport { compositeCellTester as antdCompositeCellTester } from '@chobantonov/jsonforms-react-renderer-common/cells/compositeCellTester';\n\nexport default withJsonFormsCellProps(\n withTranslateProps(AntdCompositeCell) as any,\n);\n","import React from 'react';\n\nexport interface AntdMixedNavigation {\n selectPath: (path: string) => void;\n}\n\nexport const AntdMixedNavigationContext =\n React.createContext<AntdMixedNavigation | null>(null);\n","import { Grid, Splitter } from 'antd';\nimport React from 'react';\n\nexport const AntdMixedSplitPane = ({\n detail,\n tree,\n}: {\n detail: React.ReactNode;\n tree: React.ReactNode;\n}) => {\n const screens = Grid.useBreakpoint();\n if (!screens.md) {\n return (\n <div\n className='jsonforms-mixed-split-pane-stacked'\n style={{ display: 'grid', gap: 16 }}\n >\n <div\n className='jsonforms-mixed-tree-pane'\n style={{ maxHeight: 'min(45vh, 480px)', overflow: 'auto' }}\n >\n {tree}\n </div>\n <div className='jsonforms-mixed-detail-pane'>{detail}</div>\n </div>\n );\n }\n return (\n <Splitter\n className='jsonforms-mixed-split-pane'\n style={{ height: 'min(70vh, 720px)', minHeight: 280 }}\n >\n <Splitter.Panel defaultSize='25%' min='18%' max='45%'>\n <div\n className='jsonforms-mixed-tree-pane'\n style={{ height: '100%', overflow: 'auto', padding: 12 }}\n >\n {tree}\n </div>\n </Splitter.Panel>\n <Splitter.Panel min='45%'>\n <div\n className='jsonforms-mixed-detail-pane'\n style={{ height: '100%', overflow: 'auto', padding: 12 }}\n >\n {detail}\n </div>\n </Splitter.Panel>\n </Splitter>\n );\n};\n","import { useTranslator } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { Select, Typography } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../../util/translate';\nimport { visuallyHidden } from '../../util/visuallyHidden';\n\nexport interface AntdMixedTypeSelectorProps {\n clearable?: boolean;\n disabled: boolean;\n error?: string;\n fullWidth?: boolean;\n onChange: (value: string | undefined) => void;\n required?: boolean;\n types: string[];\n value: string | null;\n}\n\nexport const AntdMixedTypeSelector = ({\n clearable = true,\n disabled,\n error,\n fullWidth = false,\n onChange,\n required,\n types,\n value,\n}: AntdMixedTypeSelectorProps) => {\n const t = useI18n();\n const translateType = useTranslator();\n return (\n <div\n className={\n fullWidth\n ? 'jsonforms-mixed-type-selector jsonforms-mixed-type-selector-full-width'\n : 'jsonforms-mixed-type-selector'\n }\n style={{ minWidth: 140, width: fullWidth ? '100%' : undefined }}\n >\n <Select\n allowClear={clearable}\n aria-label={t('mixed.typeLabel')}\n disabled={disabled}\n onChange={onChange}\n options={types.map((type) => ({\n label: translateType(`mixed.type.${type}`, type),\n value: type,\n }))}\n placeholder={t('mixed.typePlaceholder')}\n popupMatchSelectWidth={false}\n status={error ? 'error' : undefined}\n value={value ?? undefined}\n style={{ width: '100%' }}\n />\n {error ? <Typography.Text type='danger'>{error}</Typography.Text> : null}\n {required ? (\n <span style={visuallyHidden}>{t('mixed.required')}</span>\n ) : null}\n </div>\n );\n};\n","import { useI18n } from '../../util/translate';\nimport EyeOutlined from '@ant-design/icons/EyeOutlined';\nimport { Button, Flex, Tooltip, Typography } from 'antd';\nimport React from 'react';\n\nexport const AntdNestedMixedNavigation = ({\n description,\n label,\n onView,\n selector,\n}: {\n description?: string;\n label?: string;\n onView: () => void;\n selector: React.ReactNode;\n}) => {\n const t = useI18n();\n return (\n <Flex className='jsonforms-mixed-nested-navigation' vertical gap={4}>\n {label ? <Typography.Text>{label}</Typography.Text> : null}\n <Flex align='center' gap='small'>\n {selector}\n <Tooltip\n title={t('mixed.view', { label: label || t('control.value') })}\n >\n <Button\n aria-label={t('mixed.view', { label: label || t('control.value') })}\n icon={<EyeOutlined />}\n onClick={onView}\n size='small'\n />\n </Tooltip>\n </Flex>\n {description ? (\n <Typography.Text type='secondary'>{description}</Typography.Text>\n ) : null}\n </Flex>\n );\n};\n","import {\n MixedNodeControl,\n MixedDetailControl,\n MixedCodeControl,\n} from '@chobantonov/jsonforms-react-renderer-common/mixed/MixedDetailControl';\nimport { mixedParentNode } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedTreeActions';\nimport { useMixedRenderer } from '@chobantonov/jsonforms-react-renderer-common/mixed/useMixedRenderer';\nimport { ContainerValidationIndicator } from '../layouts/ValidationIndicator';\nimport { schemaForType } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema';\nexport {\n schemaForType,\n isArrayElementPath,\n isMixedSchema,\n isMixedControl,\n mixedControlTester,\n} from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema';\nexport type { JsonDataType } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema';\nimport { ControlProps, JsonSchema7, resolveSchema } from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { Breadcrumb, Collapse, Flex, Typography } from 'antd';\nimport React from 'react';\nimport { AntdMixedNavigationContext } from './mixed/AntdMixedNavigationContext';\nimport { AntdMixedSplitPane } from './mixed/AntdMixedSplitPane';\nimport { useConfirmation } from '../util/useConfirmation';\nimport { AntdMixedTree } from './mixed/AntdMixedTree';\nimport { AntdMixedTypeSelector } from './mixed/AntdMixedTypeSelector';\nimport { AntdNestedMixedNavigation } from './mixed/AntdNestedMixedNavigation';\nimport { AntdJsonTypeIcon } from './mixed/AntdJsonTypeIcon';\nimport { MixedTreeNode } from './mixed/mixedTree';\n\nexport const MixedRendererComponent = (props: ControlProps) => {\n const { description, label, path, rootSchema, uischema } = props;\n const confirmation = useConfirmation();\n const model = useMixedRenderer(props, confirmation.request);\n const {\n structuredLayout,\n t,\n collapsible,\n expanded,\n setSelectedPath,\n selectedType,\n tree,\n selectedNode,\n canRenameNode,\n } = model;\n const parentNavigation = React.useContext(AntdMixedNavigationContext);\n\n const renderedControl = (\n <MixedDetailControl\n {...model.detailProps}\n selectedType={selectedType}\n selectedSchema={model.selectedSchema}\n />\n );\n const isStructuredType =\n selectedType === 'object' || selectedType === 'array';\n\n const selector = <AntdMixedTypeSelector {...model.selectorProps} />;\n if (!props.visible) return null;\n\n const validateNodeRename = (node: MixedTreeNode, nextName: string) => {\n const oldName = node.path[node.path.length - 1];\n const parent = mixedParentNode(tree, node);\n if (!nextName) return t('additionalProperties.nameRequired');\n if (!parent || typeof oldName !== 'string' || !canRenameNode(node)) {\n return t('mixed.renameBlocked');\n }\n if (\n nextName.includes('.') ||\n nextName.includes('[') ||\n nextName.includes(']')\n ) {\n return t('additionalProperties.nameInvalid', { name: nextName });\n }\n if (\n parent.data &&\n typeof parent.data === 'object' &&\n nextName !== oldName &&\n Object.prototype.hasOwnProperty.call(parent.data, nextName)\n ) {\n return t('additionalProperties.nameTaken', { name: nextName });\n }\n const parentSchema = schemaForType(\n parent.schema,\n 'object',\n rootSchema,\n ) as JsonSchema7;\n let propertyNames = parentSchema.propertyNames as JsonSchema7 | undefined;\n if (propertyNames?.$ref) {\n propertyNames =\n (resolveSchema(rootSchema, propertyNames.$ref, rootSchema) as\n | JsonSchema7\n | undefined) ?? propertyNames;\n }\n const ajv = model.jsonforms.core?.ajv;\n if (propertyNames && ajv && !ajv.validate(propertyNames, nextName)) {\n /*\n ajv's own text where it has some - it names the constraint that\n failed, which is more use than any fixed sentence - and the\n translated message where it does not. ajv's text follows the\n validator's locale, not the form's; see the ajv localizers in the\n extended package.\n */\n return (\n ajv.errorsText(ajv.errors) ||\n t('additionalProperties.nameInvalid', { name: nextName })\n );\n }\n if (\n parentSchema.additionalProperties === false &&\n parentSchema.patternProperties &&\n !Object.keys(parentSchema.patternProperties).some((pattern) => {\n try {\n return new RegExp(pattern).test(nextName);\n } catch {\n return false;\n }\n })\n ) {\n return t('additionalProperties.namePattern');\n }\n return undefined;\n };\n const renameNode = (node: MixedTreeNode, nextName: string) => {\n if (!validateNodeRename(node, nextName)) model.renameNode(node, nextName);\n };\n\n if (structuredLayout === 'code') return <MixedCodeControl {...props} />;\n\n if (structuredLayout === 'tree' && parentNavigation && isStructuredType) {\n return (\n <AntdNestedMixedNavigation\n description={description}\n label={label}\n onView={() => parentNavigation.selectPath(path)}\n selector={selector}\n />\n );\n }\n\n const content = (\n <Flex\n data-structured-layout={structuredLayout}\n className='jsonforms-mixed-renderer'\n vertical\n gap='small'\n >\n {confirmation.dialog}\n <style>{`\n .jsonforms-mixed-renderer-primitive,\n .jsonforms-mixed-renderer-detail-primitive {\n align-items: start;\n display: grid;\n gap: 8px;\n grid-template-columns: 140px minmax(0, 1fr);\n }\n .jsonforms-mixed-renderer-unselected {\n grid-template-columns: minmax(0, 1fr);\n }\n .jsonforms-mixed-renderer-detail-control,\n .jsonforms-mixed-renderer-value {\n min-width: 0;\n }\n @media (max-width: 600px) {\n .jsonforms-mixed-renderer-primitive,\n .jsonforms-mixed-renderer-detail-primitive {\n grid-template-columns: minmax(0, 1fr);\n }\n }\n `}</style>\n {isStructuredType ? (\n <>\n {label && uischema.label !== false && (\n <Typography.Text>{label}</Typography.Text>\n )}\n <Collapse\n ghost\n styles={{\n header: { padding: 0, alignItems: 'center' },\n body: { padding: '12px 0' },\n }}\n activeKey={expanded ? ['value'] : []}\n className='jsonforms-mixed-renderer-structured'\n expandIconPlacement='end'\n onChange={(keys) => model.setExpanded(keys.includes('value'))}\n items={[\n {\n key: 'value',\n collapsible: collapsible ? undefined : 'disabled',\n showArrow: collapsible,\n label: (\n <Flex align='center' gap='middle'>\n <div\n onClick={(event) => event.stopPropagation()}\n onKeyDown={(event) => event.stopPropagation()}\n >\n {selector}\n </div>\n {model.validation.show && (\n <ContainerValidationIndicator\n count={model.validation.count}\n />\n )}\n </Flex>\n ),\n children:\n structuredLayout === 'nested' ? (\n renderedControl\n ) : tree && selectedNode ? (\n <AntdMixedSplitPane\n tree={\n <AntdMixedTree\n canDelete={model.canDeleteNode}\n canRename={canRenameNode}\n onDelete={model.deleteNode}\n onRename={renameNode}\n onSelect={(node) => setSelectedPath(node.path)}\n root={tree}\n selectedPath={selectedNode.path}\n validateRename={validateNodeRename}\n />\n }\n detail={\n <Flex vertical gap='small'>\n <Breadcrumb\n items={[\n {\n title: <AntdJsonTypeIcon type={tree.type} />,\n ...(selectedNode.path.length > 0\n ? {\n href: '#',\n onClick: (\n event: React.MouseEvent<\n HTMLAnchorElement | HTMLSpanElement\n >,\n ) => {\n event.preventDefault();\n setSelectedPath([]);\n },\n }\n : {}),\n },\n ...selectedNode.path.map((segment, index) => {\n const breadcrumbPath = selectedNode.path.slice(\n 0,\n index + 1,\n );\n const breadcrumbLabel =\n typeof segment === 'number'\n ? `Item ${segment}`\n : segment;\n const current =\n index === selectedNode.path.length - 1;\n return {\n title: breadcrumbLabel,\n ...(current\n ? {}\n : {\n href: '#',\n onClick: (\n event: React.MouseEvent<\n HTMLAnchorElement | HTMLSpanElement\n >,\n ) => {\n event.preventDefault();\n setSelectedPath(breadcrumbPath);\n },\n }),\n };\n }),\n ]}\n />\n <MixedNodeControl\n {...model.detailProps}\n node={selectedNode}\n {...model.nodeEditorProps}\n MixedTypeSelector={AntdMixedTypeSelector}\n wrapStructured={(children) => (\n <Flex vertical gap='small'>\n {children}\n </Flex>\n )}\n />\n </Flex>\n }\n />\n ) : null,\n },\n ]}\n />\n </>\n ) : (\n <>\n {label && uischema.label !== false ? (\n <Typography.Text>{label}</Typography.Text>\n ) : null}\n <div\n className={`jsonforms-mixed-renderer-primitive${\n selectedType ? '' : ' jsonforms-mixed-renderer-unselected'\n }`}\n >\n <div className='jsonforms-mixed-renderer-type'>{selector}</div>\n {selectedType ? (\n <div className='jsonforms-mixed-renderer-value'>\n {renderedControl}\n </div>\n ) : null}\n </div>\n </>\n )}\n {description ? (\n <Typography.Text type='secondary'>{description}</Typography.Text>\n ) : null}\n </Flex>\n );\n return structuredLayout === 'nested' || parentNavigation ? (\n content\n ) : (\n <AntdMixedNavigationContext.Provider value={model.navigation}>\n {content}\n </AntdMixedNavigationContext.Provider>\n );\n};\n\nexport const MixedRenderer = withJsonFormsControlProps(MixedRendererComponent);\n","import React, { useState } from 'react';\nimport { Flex, Input, Select, Tag, theme as antTheme } from 'antd';\nimport {\n ControlProps,\n RankedTester,\n rankWith,\n and,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { ControlFormItem } from '../util/cellMode';\nimport { usePreTouchErrors } from '../util/preTouchErrors';\nimport { useI18n } from '../util/translate';\nimport {\n addChoice,\n arrayChoicesOf,\n asArrayValue,\n canAddChoice,\n canRemoveChoice,\n isChipsControl,\n isSelected,\n removeChoiceAt,\n resolveItemSchema,\n} from '../util/arrayChoices';\n\n/**\n * `variant: \"chips\"` — an array of strings as removable tokens.\n *\n * **The tokens are drawn here rather than by antd's `Select` in tags mode**,\n * and the reason is duplicates. `uniqueItems` is optional for chips, so\n * `[\"a\", \"a\"]` is legal data the specification expects to survive: \"otherwise\n * free-entry chips may retain repeated strings\", and \"remove the selected\n * occurrence when duplicates exist\". A `Select` keys its tags by value, so two\n * equal tokens are one entry to it and closing either removes both. Tags of our\n * own are identified by **position**, which is what makes removing the intended\n * occurrence possible at all.\n *\n * What is free here is entry, not validation: item constraints still apply to\n * every stored value, and a schema that narrows the items to a finite list\n * turns the adder into a chooser.\n */\nexport const chipsControlTester: RankedTester = rankWith(\n 6,\n and(uiTypeIs('Control'), isChipsControl),\n);\n\nexport const ChipsControl = (props: ControlProps) => {\n const t = useI18n();\n const { token } = antTheme.useToken();\n const [draft, setDraft] = useState('');\n const {\n data,\n enabled,\n id,\n label,\n path,\n required,\n rootSchema,\n schema,\n uischema,\n visible,\n } = props;\n // See `usePreTouchErrors`; unchanged unless filtering is on.\n const { errors, onFocus, onBlur } = usePreTouchErrors({\n errors: props.errors,\n path: props.path,\n schema: props.schema,\n uischema: props.uischema as any,\n config: props.config,\n });\n\n const options = {\n ...props.config,\n ...uischema.options,\n } as Record<string, any>;\n const values = asArrayValue(data);\n const itemSchema = resolveItemSchema(schema, rootSchema);\n const choices = arrayChoicesOf(itemSchema);\n const unique = schema.uniqueItems === true;\n const limits = {\n minItems: schema.minItems,\n maxItems: schema.maxItems,\n restrict: options.restrict !== false,\n };\n const addable = enabled !== false && canAddChoice(values, limits);\n const removable = enabled !== false && canRemoveChoice(values, limits);\n\n if (!visible) {\n return null;\n }\n\n const commit = (next: unknown[]) => props.handleChange(path, next);\n\n const add = (value: string) => {\n if (!addable || value === '') {\n return;\n }\n // `unique` refuses rather than collapses, so a `uniqueItems` array cannot\n // be pushed into an invalid state from here.\n const next = addChoice(values, value, unique);\n if (next !== values) {\n commit(next);\n }\n setDraft('');\n };\n\n /** The label to show for a stored value, which may not be a known choice. */\n const labelFor = (value: unknown): string => {\n const choice = choices?.find((entry) => entry.value === value);\n return choice ? choice.label : String(value);\n };\n\n const remaining = choices?.filter(\n (choice) => !unique || !isSelected(values, choice.value),\n );\n\n return (\n <ControlFormItem\n hideRequiredAsterisk={uischema.options?.hideRequiredAsterisk}\n id={id}\n label={label}\n required={required}\n errors={errors || undefined}\n help={errors || props.description}\n >\n <Flex data-chips vertical gap={token.paddingXS}>\n {values.length > 0 && (\n <Flex wrap gap={token.paddingXXS}>\n {values.map((value, index) => (\n /*\n Keyed and closed by **position**, never by value. Two equal\n tokens are two tokens, and closing the second must not take the\n first with it.\n */\n <Tag\n key={`${index}-${String(value)}`}\n closable={removable}\n data-chip={index}\n onClose={(event) => {\n event.preventDefault();\n if (removable) {\n commit(removeChoiceAt(values, index));\n }\n }}\n >\n {labelFor(value)}\n </Tag>\n ))}\n </Flex>\n )}\n {choices ? (\n /*\n A finite item schema turns entry into selection: the specification\n says \"the schema determines whether entry is free or choice-limited;\n no separate free-entry option is introduced\".\n */\n <Select\n data-chips-select\n disabled={!addable}\n autoFocus={options.focus === true}\n style={{ width: '100%' }}\n placeholder={options.placeholder}\n // Controlled as empty: the chosen value goes into the tag list\n // above, not into the selector.\n value={null}\n showSearch={{\n optionFilterProp: 'label',\n filterOption: (input, option) =>\n String(option?.label ?? '')\n .toLowerCase()\n .includes(input.toLowerCase()),\n }}\n notFoundContent={t('enum.noMatches')}\n onChange={(value: string) => add(value)}\n options={(remaining ?? []).map((choice) => ({\n value: choice.value as string,\n label: choice.label,\n }))}\n />\n ) : (\n <Input\n data-chips-input\n disabled={!addable}\n autoFocus={options.focus === true}\n placeholder={options.placeholder ?? t('chips.addPlaceholder')}\n value={draft}\n /*\n A partial token \"remains a local draft until explicitly\n committed\", so nothing is written while typing - only on Enter.\n */\n onChange={(event) => setDraft(event.currentTarget.value)}\n onPressEnter={() => add(draft)}\n onFocus={onFocus}\n onBlur={() => {\n setDraft('');\n onBlur();\n }}\n />\n )}\n </Flex>\n </ControlFormItem>\n );\n};\n\nexport default withJsonFormsControlProps(ChipsControl);\n","import React from 'react';\nimport { Select, Tag, Tooltip } from 'antd';\nimport { ExclamationCircleOutlined } from '@ant-design/icons';\nimport {\n ControlProps,\n RankedTester,\n defaultErrorTranslator,\n getCombinedErrorMessage,\n rankWith,\n and,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { useJsonForms, withJsonFormsControlProps } from '@jsonforms/react';\nimport { displayableErrors } from '@chobantonov/jsonforms-react-renderer-common/validation/validationIndicator';\nimport { useTranslator } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ControlFormItem } from '../util/cellMode';\nimport { usePreTouchErrors } from '../util/preTouchErrors';\nimport { useI18n } from '../util/translate';\nimport {\n arrayChoicesOf,\n arrayChoiceItemErrors,\n asArrayValue,\n canAddChoice,\n canRemoveChoice,\n isMultiSelectControl,\n resolveItemSchema,\n sameChoice,\n} from '../util/arrayChoices';\n\n/**\n * `variant: \"multi-select\"` — several finite choices in one compact control.\n *\n * Rank 6, above the automatic checkbox group at 5, because the specification\n * says \"explicit selection takes precedence over automatic checkboxes\". It\n * matches the same schema shapes that group does, so the only thing choosing\n * between them is the variant.\n *\n * There is **no free entry**: the choices come from the schema, and a search\n * query filters them rather than adding to them.\n */\nexport const multiSelectControlTester: RankedTester = rankWith(\n 6,\n and(uiTypeIs('Control'), isMultiSelectControl),\n);\n\nexport const MultiSelectControl = (props: ControlProps) => {\n const t = useI18n();\n const context = useJsonForms();\n const translate = useTranslator();\n const {\n data,\n enabled,\n id,\n label,\n path,\n required,\n rootSchema,\n schema,\n uischema,\n visible,\n } = props;\n const options = {\n ...props.config,\n ...uischema.options,\n } as Record<string, any>;\n const values = asArrayValue(data);\n const itemSchema = resolveItemSchema(schema, rootSchema);\n const choices = arrayChoicesOf(itemSchema) ?? [];\n const [primary, additional] = displayableErrors(context.core ?? {});\n const itemErrors = arrayChoiceItemErrors(\n [...(primary ?? []), ...(additional ?? [])],\n path,\n values.length,\n );\n const itemMessages = itemErrors.map((errors, index) =>\n getCombinedErrorMessage(\n errors,\n context.i18n?.translateError ?? defaultErrorTranslator,\n translate,\n itemSchema,\n uischema,\n path ? `${path}.${index}` : String(index),\n ),\n );\n // See `usePreTouchErrors`; unchanged unless filtering is on.\n const { errors, onFocus, onBlur } = usePreTouchErrors({\n errors: [\n props.errors,\n ...itemMessages.map((message, index) =>\n message ? `${String(values[index])}: ${message}` : '',\n ),\n ]\n .filter(Boolean)\n .join('\\n'),\n path,\n schema,\n uischema: uischema as any,\n config: props.config,\n });\n const limits = {\n minItems: schema.minItems,\n maxItems: schema.maxItems,\n restrict: options.restrict !== false,\n };\n const addable = canAddChoice(values, limits);\n const removable = canRemoveChoice(values, limits);\n\n if (!visible) {\n return null;\n }\n\n /*\n Incoming values the schema does not admit are shown as choices of their own\n rather than dropped. Section 19, and the array-choice contract: \"do not\n silently deduplicate, coerce, or discard invalid incoming values.\"\n */\n const unknownValues = values.filter(\n (value) => !choices.some((choice) => sameChoice(choice.value, value)),\n );\n\n return (\n <ControlFormItem\n hideRequiredAsterisk={uischema.options?.hideRequiredAsterisk}\n id={id}\n label={label}\n required={required}\n errors={errors || undefined}\n help={errors || props.description}\n >\n <Select\n mode='multiple'\n data-multi-select\n disabled={!enabled}\n onFocus={onFocus}\n onBlur={onBlur}\n autoFocus={options.focus === true}\n style={{ width: '100%' }}\n placeholder={options.placeholder}\n value={values}\n status={errors ? 'error' : undefined}\n tagRender={({ label: tagLabel, value, closable, onClose }) => {\n const index = values.findIndex((entry) => sameChoice(entry, value));\n const issue = errors && index >= 0 ? itemMessages[index] : '';\n return (\n <Tooltip title={issue || undefined}>\n <Tag\n color={issue ? 'red' : undefined}\n closable={closable}\n onClose={onClose}\n onMouseDown={(event) => event.preventDefault()}\n >\n <span aria-invalid={Boolean(issue)}>{tagLabel}</span>\n {issue ? (\n <ExclamationCircleOutlined\n aria-label={issue}\n style={{ marginInlineStart: 4 }}\n />\n ) : null}\n </Tag>\n </Tooltip>\n );\n }}\n /*\n Searching filters the labels; it never creates a value. `mode=\"tags\"`\n would, which is what makes it the wrong mode here even though it looks\n the same.\n */\n showSearch={{\n optionFilterProp: 'label',\n filterOption: (input, option) =>\n String(option?.label ?? '')\n .toLowerCase()\n .includes(input.toLowerCase()),\n }}\n notFoundContent={t('enum.noMatches')}\n onChange={(next: unknown[]) => {\n /*\n antd reports the whole selection, so the bound has to be applied to\n the *direction* of the change: refusing a longer list when the\n maximum is reached, and a shorter one when the minimum is.\n */\n if (next.length > values.length && !addable) {\n return;\n }\n if (next.length < values.length && !removable) {\n return;\n }\n props.handleChange(path, next);\n }}\n options={[\n ...choices.map((choice) => ({\n value: choice.value as string,\n label: choice.label,\n })),\n ...unknownValues.map((value) => ({\n value: value as string,\n label: String(value),\n })),\n ]}\n />\n </ControlFormItem>\n );\n};\n\nexport default withJsonFormsControlProps(MultiSelectControl);\n","import React from 'react';\nimport { Modal } from 'antd';\nimport { useI18n } from '../util/translate';\n\nexport interface DeleteDialogProps {\n open: boolean;\n onConfirm(): void;\n onCancel(): void;\n title?: string;\n message?: string;\n acceptText?: string;\n declineText?: string;\n}\n\nexport interface WithDeleteDialogSupport {\n openDeleteDialog(path: string, data: number): void;\n}\n\nexport const DeleteDialog = React.memo(function DeleteDialog({\n open,\n onConfirm,\n onCancel,\n title,\n message,\n acceptText,\n declineText,\n}: DeleteDialogProps) {\n const t = useI18n();\n return (\n <Modal\n title={title ?? t('confirm.delete.title')}\n open={open}\n onOk={onConfirm}\n onCancel={onCancel}\n okText={acceptText ?? t('confirm.accept')}\n okButtonProps={{ danger: true }}\n cancelText={declineText ?? t('confirm.decline')}\n aria-labelledby='alert-dialog-confirmdelete-title'\n aria-describedby='alert-dialog-confirmdelete-description'\n >\n <p>{message ?? t('confirm.delete.message')}</p>\n </Modal>\n );\n});\n","import React from 'react';\nimport { Pagination, theme } from 'antd';\nimport { CollectionPage } from '@chobantonov/jsonforms-react-renderer-common/collections/collectionPagination';\nexport const CollectionPager = ({ page }: { page: CollectionPage }) => {\n const { token } = theme.useToken();\n return !page.enabled || page.total === 0 ? null : (\n <div\n data-collection-footer\n style={{\n display: 'flex',\n justifyContent: 'flex-end',\n paddingBlock: 12,\n borderTop: `1px solid ${token.colorBorderSecondary}`,\n }}\n >\n <Pagination\n current={page.current}\n pageSize={page.size}\n total={page.total}\n pageSizeOptions={page.choices}\n showSizeChanger\n onChange={page.change}\n />\n </div>\n );\n};\n","import {\n useTupleAdditionalItems,\n type TupleAdditionalItemsProps,\n} from '@chobantonov/jsonforms-react-renderer-common/tuple/useTupleAdditionalItems';\nimport { DeleteDialog } from './DeleteDialog';\nimport { PendingChangesProvider } from '@chobantonov/jsonforms-react-renderer-common/interaction/pendingChanges';\nimport { CollectionPager } from './CollectionPager';\nimport React from 'react';\nimport { Button, Typography, theme as antTheme } from 'antd';\nimport DeleteOutlined from '@ant-design/icons/DeleteOutlined';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nexport type { TupleAdditionalItemsProps } from '@chobantonov/jsonforms-react-renderer-common/tuple/useTupleAdditionalItems';\n\n/**\n * The trailing values a tuple permits past its declared positions.\n *\n * Presented as its own section with a heading and an Add button in the header,\n * \"consistent with the additional-properties control\" as section 18 asks, and\n * each entry gets a positional label and a Delete button. The declared prefix is\n * untouchable from here: Delete refuses any index inside it, so no action in\n * this section can remove or reorder a fixed position.\n */\nexport const TupleAdditionalItems = (props: TupleAdditionalItemsProps) => {\n const { renderItem, positionLabel } = props;\n const { token } = antTheme.useToken();\n const { t, message, canAdd, canDelete, add, deletion, visibleIndices, page } =\n useTupleAdditionalItems(props);\n\n return (\n <section\n data-tuple-additional\n style={{\n marginTop: token.margin,\n paddingTop: token.paddingSM,\n borderTop: `1px solid ${token.colorBorderSecondary}`,\n }}\n >\n <DeleteDialog\n open={deletion.confirming}\n onCancel={deletion.cancel}\n onConfirm={deletion.confirm}\n />\n <header\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: token.paddingXS,\n marginBottom: token.paddingXS,\n }}\n >\n <Typography.Text strong>{t('tuple.additionalItems')}</Typography.Text>\n <Button\n size='small'\n type='text'\n icon={<PlusOutlined />}\n disabled={!canAdd}\n onClick={add}\n title={t('tuple.add')}\n aria-label={t('tuple.add')}\n data-tuple-add\n />\n </header>\n <PendingChangesProvider changes={page.pending}>\n {visibleIndices.map((index) => (\n <div\n key={index}\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n gap: token.paddingXS,\n marginBottom: token.paddingXS,\n }}\n >\n <div style={{ flex: 1, minWidth: 0 }}>{renderItem(index)}</div>\n <Button\n size='small'\n type='text'\n danger\n icon={<DeleteOutlined />}\n disabled={!canDelete}\n onClick={() => deletion.request(index)}\n title={t('tuple.delete', { label: positionLabel(index) })}\n aria-label={t('tuple.delete', {\n label: positionLabel(index),\n })}\n data-tuple-delete={index}\n />\n </div>\n ))}\n </PendingChangesProvider>\n <CollectionPager page={page} />\n {message && (\n <Typography.Text type='warning' role='alert' data-tuple-draft>\n {message}\n </Typography.Text>\n )}\n </section>\n );\n};\n","import React from 'react';\nimport {\n TupleField as CommonTupleField,\n type TupleFieldProps,\n} from '@chobantonov/jsonforms-react-renderer-common/tuple/TupleField';\nexport type { TupleFieldProps } from '@chobantonov/jsonforms-react-renderer-common/tuple/TupleField';\nimport { CompositeDetailDialog } from '../cells/CompositeDetailDialog';\nimport { Button, Typography, theme as antTheme } from 'antd';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nexport function TupleField(props: TupleFieldProps) {\n const { token } = antTheme.useToken();\n return (\n <CommonTupleField\n {...props}\n CompositeDetailDialog={CompositeDetailDialog}\n gap={token.paddingXS}\n legendStyle={{\n marginBottom: token.paddingXXS,\n fontSize: token.fontSize,\n color: token.colorTextHeading,\n }}\n renderEditButton={(label, disabled, open) => (\n <Button\n size='small'\n type='text'\n icon={<EditOutlined />}\n disabled={disabled}\n onClick={open}\n title={label}\n aria-label={label}\n />\n )}\n renderError={(message, draft) => (\n <Typography.Text\n type={draft ? 'warning' : 'danger'}\n role='alert'\n data-tuple-draft={draft || undefined}\n >\n {message}\n </Typography.Text>\n )}\n />\n );\n}\n","import { useTupleControl } from '@chobantonov/jsonforms-react-renderer-common/tuple/useTupleControl';\nimport {\n connectTupleControl,\n TupleControlContent,\n type TupleControlProps,\n} from '@chobantonov/jsonforms-react-renderer-common/tuple/TupleControlContent';\nimport React from 'react';\nimport type { RankedTester } from '@jsonforms/core';\nimport { Typography, theme as antTheme } from 'antd';\nimport { ControlFormItem } from '../util/cellMode';\nimport { tupleControlTester } from '../util/tuple';\nimport { TupleAdditionalItems } from './TupleAdditionalItems';\nimport { TupleField } from './TupleField';\n\nexport const tupleControlRendererTester: RankedTester = tupleControlTester;\n\nexport const TupleControl = (props: TupleControlProps) => {\n const { label, required, visible, uischema } = props;\n const { token } = antTheme.useToken();\n const model = useTupleControl(props);\n const { options, shownErrors } = model;\n if (!visible) return null;\n const content = (\n <TupleControlContent\n props={props}\n model={model}\n TupleField={TupleField}\n TupleAdditionalItems={TupleAdditionalItems}\n gap={token.margin}\n diagnostic={(message) => (\n <Typography.Text type='danger' role='alert' data-tuple-diagnostic>\n {message}\n </Typography.Text>\n )}\n />\n );\n return (\n /*\n Array-level errors - minItems, maxItems, uniqueItems - belong to the tuple\n as a whole and appear here, beneath it. `props.errors` on an array control\n carries only errors at the array's own path, so a position's error stays\n beside that position and never marks the others invalid.\n\n The exception is a position a supplied layout does not draw: its error\n has no field to sit beside, so it is reported here instead, named.\n */\n <ControlFormItem\n hideRequiredAsterisk={uischema.options?.hideRequiredAsterisk}\n id={props.id}\n label={label}\n required={required}\n errors={shownErrors || undefined}\n help={shownErrors || props.description}\n >\n {options.showBorder === false ? (\n <div data-tuple-control>{content}</div>\n ) : (\n /*\n `showBorder` defaults to true: one subtle boundary around the heading,\n the positions, the additional items and the array-level errors, so a\n tuple reads as one value rather than as several loose fields.\n */\n <div\n data-tuple-control\n style={{\n border: `1px solid ${token.colorBorderSecondary}`,\n borderRadius: token.borderRadius,\n padding: token.paddingSM,\n }}\n >\n {content}\n </div>\n )}\n </ControlFormItem>\n );\n};\n\nexport const TupleControlRenderer = connectTupleControl(TupleControl);\n","import { CombinatorBranch } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorBranch';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nimport {\n CombinatorRendererProps,\n createCombinatorRenderInfos,\n isAnyOfControl,\n JsonSchema,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { JsonFormsDispatch, withJsonFormsAnyOfProps } from '@jsonforms/react';\nimport { Tabs } from 'antd';\nimport { CombinatorProperties } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties';\n\n/**\n * `anyOf` - tabs over one value.\n *\n * Section 18: \"Tabs selecting the branch form to display over the same bound\n * value… Tab navigation alone preserves data; one or more branches may\n * validate. These are editor views, not checkboxes enabling schema branches.\"\n * And of the worked example: \"Switching tabs does not delete email or phone.\n * A value containing both can satisfy anyOf; the active tab is presentation\n * state only.\"\n *\n * So changing tab writes nothing at all - no generated defaults, and\n * therefore nothing to confirm.\n *\n * That holds even for a branch whose type the current value is not, such as\n * an object branch over a string. It looks as though those inputs would have\n * nowhere to write, but JSON Forms' `update` builds the containers along the\n * path: a child write of `note` against a string value yields\n * `{ \"note\": \"…\" }`, replacing the string. The branch becomes real when the\n * user edits it, which is the moment they actually chose it - not when they\n * looked at it.\n *\n * `oneOf` is the opposite case and must write on selection: its branches\n * carry generated defaults, typically a `const` discriminator, that no amount\n * of typing in the visible fields would produce.\n */\nexport const AnyOfRenderer = ({\n schema,\n rootSchema,\n indexOfFittingSchema,\n visible,\n enabled,\n path,\n renderers,\n cells,\n uischema,\n uischemas,\n}: CombinatorRendererProps) => {\n const [selectedAnyOf, setSelectedAnyOf] = useState(\n indexOfFittingSchema ?? -1,\n );\n\n /*\n Which tab opens is derived from the data only until the user picks one.\n Afterwards the choice is theirs: re-deriving it moved the tab out from\n under them as soon as their editing changed which branch fits - emptying\n the value while on a chosen tab left no tab selected and the panel blank,\n mid-edit. Section 22 counts the selected tab as runtime state.\n */\n const chosen = useRef(false);\n useEffect(() => {\n if (!chosen.current) {\n setSelectedAnyOf(indexOfFittingSchema ?? -1);\n }\n }, [indexOfFittingSchema]);\n\n const handleTabChange = useCallback((value: string) => {\n chosen.current = true;\n setSelectedAnyOf(parseInt(value, 10));\n }, []);\n\n const anyOf = 'anyOf';\n const anyOfRenderInfos = createCombinatorRenderInfos(\n (schema as JsonSchema).anyOf ?? [],\n rootSchema,\n anyOf,\n uischema,\n path,\n uischemas,\n );\n\n if (!visible) {\n return null;\n }\n\n if (anyOfRenderInfos.length === 1) {\n const branch = anyOfRenderInfos[0];\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={'anyOf'}\n path={path}\n rootSchema={rootSchema}\n />\n <CombinatorBranch\n options={uischema.options}\n schema={branch.schema}\n path={path}\n >\n <JsonFormsDispatch\n schema={branch.schema}\n uischema={branch.uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n enabled={enabled}\n />\n </CombinatorBranch>\n </>\n );\n }\n\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={anyOf}\n path={path}\n rootSchema={rootSchema}\n />\n <Tabs\n activeKey={selectedAnyOf >= 0 ? selectedAnyOf.toString() : ''}\n onChange={handleTabChange}\n items={anyOfRenderInfos.map(\n (anyOfRenderInfo, anyOfIndex) =>\n ({\n label: anyOfRenderInfo.label,\n key: String(anyOfIndex),\n children: selectedAnyOf === anyOfIndex && (\n <CombinatorBranch\n options={uischema.options}\n schema={anyOfRenderInfo.schema}\n path={path}\n >\n <JsonFormsDispatch\n schema={anyOfRenderInfo.schema}\n uischema={anyOfRenderInfo.uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n />\n </CombinatorBranch>\n ),\n }) as any,\n )}\n ></Tabs>\n </>\n );\n};\n\nexport const anyOfControlTester: RankedTester = rankWith(3, isAnyOfControl);\n\nexport default withJsonFormsAnyOfProps(AnyOfRenderer);\n","import { DetailModal } from '../complex/DetailModal';\nimport React from 'react';\nimport { Splitter, Empty, Button, Tooltip } from 'antd';\nimport { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons';\nimport {\n type RowDetailState,\n createRowDetailToggle,\n createRowDetailFrame,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/rowDetail';\nconst RowDialog = ({ state }: { state: RowDetailState }) => {\n const { options, t } = state;\n return (\n <DetailModal\n options={options.dialog}\n open={!!state.selection}\n title={t('collection.editDetails')}\n onCancel={state.close}\n onOk={state.apply}\n okText={t('composite.apply')}\n cancelText={t('composite.cancel')}\n okButtonProps={{ disabled: !state.enabled || state.conflict }}\n styles={{ body: { maxHeight: '65vh', overflow: 'auto' } }}\n >\n {state.conflict && <p role='alert'>{t('composite.applyConflict')}</p>}\n {state.content}\n </DetailModal>\n );\n};\nconst RowPanel = ({\n state,\n children,\n}: React.PropsWithChildren<{ state: RowDetailState }>) => {\n const { options, panelOpen, t } = state;\n return (\n <div>\n <Splitter\n orientation={options.placement === 'bottom' ? 'vertical' : 'horizontal'}\n style={{\n height: panelOpen\n ? options.placement === 'bottom'\n ? '40rem'\n : '32rem'\n : 'auto',\n maxWidth: '100%',\n }}\n >\n <Splitter.Panel\n defaultSize='55%'\n min='20%'\n resizable={options.resizable !== false}\n >\n <div\n style={{\n height: panelOpen ? '100%' : undefined,\n minWidth: 0,\n minHeight: 0,\n overflow: 'auto',\n }}\n >\n {children}\n </div>\n </Splitter.Panel>\n {panelOpen && (\n <Splitter.Panel min='20%' resizable={options.resizable !== false}>\n <div\n style={{\n padding: 12,\n height: '100%',\n minWidth: 0,\n minHeight: 0,\n overflow: 'auto',\n }}\n >\n {state.content ?? (\n <Empty description={t('collection.selectItem')} />\n )}\n </div>\n </Splitter.Panel>\n )}\n </Splitter>\n </div>\n );\n};\n\nexport const RowDetailFrame = createRowDetailFrame(RowDialog, RowPanel);\n\nexport const RowDetailToggle = createRowDetailToggle((toggle) => (\n <div style={{ display: 'inline-flex' }}>\n <Tooltip title={toggle.label}>\n <Button\n shape='circle'\n aria-label={toggle.label}\n aria-expanded={toggle.expanded}\n icon={toggle.expanded ? <EyeInvisibleOutlined /> : <EyeOutlined />}\n onClick={toggle.toggle}\n />\n </Tooltip>\n </div>\n));\n","import React from 'react';\nimport { JsonSchema, UISchemaElement } from '@jsonforms/core';\nimport { ctxToCellProps, useJsonForms } from '@jsonforms/react';\nimport { CellModeProvider, ControlFormItem } from './cellMode';\n\n/**\n * The chrome around one table or grid cell.\n *\n * The scalar cells in the cells registry are bare inputs - they draw no\n * Form.Item of their own - so without this a cell shows no validation state at\n * all. It supplies the compact form: the error border plus an icon whose\n * tooltip carries the message, and no label or inline message, neither of\n * which a row has room for. `CellModeProvider` keeps anything dispatched\n * inside it on the same footing.\n */\nexport const CellFrame = ({\n errors,\n path,\n children,\n}: React.PropsWithChildren<{ errors?: string; path?: string }>) => (\n <CellModeProvider>\n <ControlFormItem path={path} errors={errors || undefined}>\n {children}\n </ControlFormItem>\n </CellModeProvider>\n);\n\nexport type ConnectedCellFrameProps = React.PropsWithChildren<{\n schema?: JsonSchema;\n uischema?: UISchemaElement;\n path: string;\n}>;\n\n/**\n * CellFrame for callers that do not already hold the cell's errors - the AG\n * Grid renderer, whose cells are dispatched from a cellRenderer rather than\n * from a connected component.\n */\nexport const ConnectedCellFrame = ({\n schema,\n uischema,\n path,\n children,\n}: ConnectedCellFrameProps) => {\n const ctx = useJsonForms();\n const { errors } = ctxToCellProps(ctx, { schema, uischema, path } as any);\n return (\n <CellFrame errors={errors} path={path}>\n {children}\n </CellFrame>\n );\n};\n","import {\n ControlElement,\n encode,\n JsonFormsCellRendererRegistryEntry,\n JsonFormsRendererRegistryEntry,\n JsonSchema,\n Resolve,\n} from '@jsonforms/core';\nimport { DispatchCell } from '@jsonforms/react';\nimport React from 'react';\nimport { CellFrame } from '../util/cellFrame';\n\nexport interface DataCellProps {\n path: string;\n propName?: string;\n schema: JsonSchema;\n rootSchema: JsonSchema;\n errors: string;\n enabled: boolean;\n renderers?: JsonFormsRendererRegistryEntry[];\n cells?: JsonFormsCellRendererRegistryEntry[];\n /** Per-column options from the array uischema's `cells` entry. */\n cellOptions?: Record<string, unknown>;\n}\n\nconst controlWithoutLabel = (\n scope: string,\n options?: Record<string, unknown>,\n): ControlElement => ({\n type: 'Control',\n scope: scope,\n label: false,\n // `cells: { <prop>: { summary, detail } }` from the array's uischema reaches\n // the cell here, which is how composite columns know how to summarise\n // themselves and what to show in their detail dialog.\n options,\n});\n\nconst DataCell = ({\n path,\n propName,\n schema,\n rootSchema,\n errors,\n enabled,\n renderers,\n cells,\n cellOptions,\n}: DataCellProps) => {\n return (\n <CellFrame errors={errors} path={path}>\n {schema.properties && propName !== undefined ? (\n <DispatchCell\n schema={Resolve.schema(\n schema,\n `#/properties/${encode(propName)}`,\n rootSchema,\n )}\n uischema={controlWithoutLabel(\n `#/properties/${encode(propName)}`,\n cellOptions,\n )}\n path={path}\n enabled={enabled}\n renderers={renderers}\n cells={cells}\n />\n ) : (\n <DispatchCell\n schema={schema}\n uischema={controlWithoutLabel('#', cellOptions)}\n path={path}\n enabled={enabled}\n renderers={renderers}\n cells={cells}\n />\n )}\n </CellFrame>\n );\n};\n\nexport default DataCell;\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport React from 'react';\nimport { Button, Card, CardProps } from 'antd';\nimport DownOutlined from '@ant-design/icons/DownOutlined';\nimport UpOutlined from '@ant-design/icons/UpOutlined';\nimport { useArrayPanelState } from '@chobantonov/jsonforms-react-renderer-common/collections/useArrayPanelState';\n\nexport const ArrayPanel = ({\n options,\n config,\n panelLabel,\n children,\n extra,\n ...props\n}: CardProps & {\n options?: Record<string, any>;\n config?: any;\n panelLabel?: string;\n}) => {\n const t = useI18n();\n const panel = useArrayPanelState(options, config);\n return (\n <Card\n {...props}\n style={{ minWidth: 0, maxWidth: '100%', ...props.style }}\n extra={\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n {extra}\n {panel.collapsible && (\n <Button\n shape='circle'\n aria-label={panelLabel || t('control.array')}\n aria-expanded={!panel.collapsed}\n aria-controls={panel.contentId}\n onClick={panel.toggle}\n icon={panel.collapsed ? <DownOutlined /> : <UpOutlined />}\n />\n )}\n </div>\n }\n >\n <div\n id={panel.contentId}\n hidden={panel.collapsed}\n style={{ minWidth: 0, maxWidth: '100%' }}\n >\n {children}\n </div>\n </Card>\n );\n};\n","import React from 'react';\nimport { Card, Col, Row, Typography } from 'antd';\nimport { ValidationIcon } from '../complex/ValidationIcon';\nconst { Title } = Typography;\n\nexport const renderArrayTitle = (\n label: string,\n errors: string,\n description: string | undefined,\n) => (\n <>\n <Row align='middle'>\n <Col>\n <Title level={5} style={{ margin: 0 }}>\n {label}\n </Title>\n </Col>\n <Col style={{ paddingLeft: 8 }}>\n {errors.length !== 0 && (\n <ValidationIcon\n id='tooltip-validation'\n errorMessages={errors}\n local\n />\n )}\n </Col>\n </Row>\n {description && <Card.Meta description={description} />}\n </>\n);\n","import { usePathErrorIndicator } from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport { ArrayPanel } from '../layouts/ArrayPanel';\nimport React from 'react';\nimport {\n ControlElement,\n createDefaultValue,\n JsonSchema,\n ArrayTranslations,\n} from '@jsonforms/core';\nimport { Button, Tooltip } from 'antd';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nimport { renderArrayTitle } from '../layouts/arrayTitle';\n\nexport interface TableToolbarProps {\n errors: string;\n options?: Record<string, any>;\n config?: any;\n label: string;\n description: string | undefined;\n path: string;\n uischema: ControlElement;\n schema: JsonSchema;\n rootSchema: JsonSchema;\n enabled: boolean;\n translations: ArrayTranslations;\n addItem(path: string, value: any): () => void;\n disableAdd?: boolean;\n children?: React.ReactNode;\n actions?: React.ReactNode;\n}\n\nconst TableToolbar = React.memo(function TableToolbar({\n label,\n description,\n path,\n addItem,\n schema,\n enabled,\n translations,\n rootSchema,\n disableAdd,\n children,\n actions,\n options,\n uischema,\n config,\n}: TableToolbarProps) {\n const arrayErrors = usePathErrorIndicator(path, options ?? uischema.options);\n return (\n <ArrayPanel\n options={options ?? uischema.options}\n config={config}\n panelLabel={label}\n style={{ width: '100%' }}\n size='small'\n type='inner'\n title={renderArrayTitle(label, arrayErrors, description)}\n extra={[\n actions,\n <Tooltip\n key='tooltip-add'\n title={translations.addTooltip}\n placement='bottom'\n >\n <Button\n disabled={!enabled || disableAdd}\n aria-label={translations.addAriaLabel}\n onClick={addItem(path, createDefaultValue(schema, rootSchema))}\n shape='circle'\n icon={<PlusOutlined rev={undefined} />}\n />\n </Tooltip>,\n ]}\n >\n {children}\n </ArrayPanel>\n );\n});\n\nexport default TableToolbar;\n","import { ValidationIcon } from './ValidationIcon';\nimport {\n CollectionErrorNavigation,\n RowErrorCount,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/CollectionErrorNavigation';\nimport { ItemProvider } from '@chobantonov/jsonforms-react-renderer-common/cells/CellSummary';\nimport {\n ColumnResizeHandle,\n useColumnWidths,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/columnResize';\nimport {\n tableColumnFields,\n tableColumnStyle,\n TableColumnDefinition,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/tableColumns';\nimport { useTableSelection } from '@chobantonov/jsonforms-react-renderer-common/collections/useTableSelection';\nimport { PendingChangesProvider } from '@chobantonov/jsonforms-react-renderer-common/interaction/pendingChanges';\nimport { useCollectionPagination } from '@chobantonov/jsonforms-react-renderer-common/collections/collectionPagination';\nimport { useRowDetail } from '@chobantonov/jsonforms-react-renderer-common/collections/rowDetail';\nimport { RowDetailFrame, RowDetailToggle } from './RowDetailFrame';\nimport { CollectionPager } from './CollectionPager';\nimport ArrowDownOutlined from '@ant-design/icons/ArrowDownOutlined';\nimport ArrowUpOutlined from '@ant-design/icons/ArrowUpOutlined';\nimport DeleteFilled from '@ant-design/icons/DeleteFilled';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport {\n ArrayLayoutProps,\n ArrayTranslations,\n ControlElement,\n errorsAt,\n formatErrorMessage,\n JsonFormsCellRendererRegistryEntry,\n JsonFormsRendererRegistryEntry,\n JsonSchema,\n Paths,\n} from '@jsonforms/core';\nimport {\n JsonFormsStateContext,\n useJsonForms,\n DispatchCell,\n} from '@jsonforms/react';\nimport { Button, Table, TableColumnProps, Tooltip, theme } from 'antd';\nimport range from 'lodash/range';\nimport startCase from 'lodash/startCase';\nimport union from 'lodash/union';\nimport React, { useMemo } from 'react';\n\nimport merge from 'lodash/merge';\nimport { DeleteDialog, WithDeleteDialogSupport } from './DeleteDialog';\nimport DataCell, { DataCellProps } from './DataCell';\nimport TableToolbar from './TableToolbar';\n\ntype TableRow = { index: number; key: number };\n\ninterface TableColumn extends TableColumnProps<TableRow> {\n dataIndex?: string;\n title?: string;\n width?: number;\n render: (value: unknown, row: TableRow, index: number) => React.ReactNode;\n}\n\nconst generateDataColumns = (props: ArrayLayoutProps): TableColumn[] => {\n const { path, schema, enabled, cells } = props;\n const cellOptions = (props.uischema as ControlElement)?.options?.cells as\n | Record<string, Record<string, unknown>>\n | undefined;\n\n if (schema.type === 'object') {\n const definitions = props.uischema.options?.columnDefs as\n | TableColumnDefinition[]\n | undefined;\n return tableColumnFields(\n schema.properties ?? {},\n definitions,\n getValidColumnProps(schema, cellOptions),\n ).map<TableColumn>((prop) => {\n const style = tableColumnStyle(\n definitions?.find((column) => column.field === prop),\n );\n const props = {\n propName: prop,\n schema,\n title:\n definitions?.find((c) => c.field === prop)?.headerName ??\n schema.properties?.[prop]?.title ??\n startCase(prop),\n enabled,\n cells,\n cellOptions: cellOptions?.[prop],\n };\n return {\n dataIndex: props.propName,\n width: style.width,\n onHeaderCell: () => ({ style }),\n onCell: () => ({ style }),\n title: props.title,\n render: (_field, row) => {\n const rowPath = Paths.compose(path, `${row.index}`);\n if (definitions?.some((c) => c.field === prop && c.scope === '#'))\n return (\n <ItemProvider path={rowPath}>\n <DispatchCell\n schema={schema}\n path={rowPath}\n uischema={{\n type: 'Control',\n scope: '#',\n options: { ...cellOptions?.[prop], summaryOnly: true },\n }}\n enabled={enabled}\n cells={cells}\n />\n </ItemProvider>\n );\n\n return (\n <ItemProvider path={rowPath}>\n <div\n style={{\n ...style,\n width: style.width ? '100%' : undefined,\n overflow: 'hidden',\n }}\n >\n <RowDataCell {...props} rowPath={rowPath} />\n </div>\n </ItemProvider>\n );\n },\n };\n });\n } else {\n // primitives\n const props = {\n schema,\n enabled,\n };\n return [\n {\n render: (_field, row) => {\n const rowPath = Paths.compose(path, `${row.index}`);\n\n return <RowDataCell {...props} rowPath={rowPath} />;\n },\n },\n ];\n }\n};\n\nconst getValidColumnProps = (\n scopedSchema: JsonSchema,\n cellOptions?: Record<string, unknown>,\n) => {\n const properties = scopedSchema.properties;\n if (scopedSchema.type === 'object' && typeof properties === 'object') {\n return Object.keys(properties).filter(\n (prop) =>\n // Array columns are skipped by default because a plain cell cannot show\n // them, but a `cells` entry says how to summarise one, so keep it.\n properties[prop].type !== 'array' || Boolean(cellOptions?.[prop]),\n );\n }\n // primitives\n return [''];\n};\n\ninterface RowDataCellProps {\n rowPath: string;\n propName?: string;\n schema: JsonSchema;\n enabled: boolean;\n renderers?: JsonFormsRendererRegistryEntry[];\n cells?: JsonFormsCellRendererRegistryEntry[];\n /** The array uischema's `cells` entry for this column. */\n cellOptions?: Record<string, unknown>;\n}\n\nconst ctxToDataCellProps = (\n ctx: JsonFormsStateContext,\n ownProps: RowDataCellProps,\n): DataCellProps => {\n const path =\n ownProps.rowPath +\n (ownProps.schema.type === 'object' ? '.' + ownProps.propName : '');\n const errors = formatErrorMessage(\n union(\n errorsAt(\n path,\n ownProps.schema,\n (p) => p === path,\n )(ctx.core?.errors ?? []).flatMap((error) => error.message ?? []),\n ),\n );\n return {\n propName: ownProps.propName,\n schema: ownProps.schema,\n rootSchema: ctx.core?.schema ?? ownProps.schema,\n errors,\n path,\n enabled: ownProps.enabled,\n cells: ownProps.cells || ctx.cells,\n renderers: ownProps.renderers || ctx.renderers,\n cellOptions: ownProps.cellOptions,\n };\n};\n\nconst RowDataCell = (ownProps: RowDataCellProps) => {\n const ctx = useJsonForms();\n const dataCellProps = ctxToDataCellProps(ctx, ownProps);\n\n return <DataCell {...dataCellProps} />;\n};\n\ninterface ActionCellProps {\n childPath: string;\n rowIndex: number;\n moveUpCreator?: (path: string, position: number) => () => void;\n moveDownCreator?: (path: string, position: number) => () => void;\n enabled: boolean;\n enableUp: boolean;\n enableDown: boolean;\n showSortButtons: boolean;\n path: string;\n translations: ArrayTranslations;\n disableRemove?: boolean;\n}\n\nconst ActionCell = ({\n rowIndex,\n moveUpCreator,\n moveDownCreator,\n enabled,\n enableUp,\n enableDown,\n showSortButtons,\n path,\n translations,\n}: ActionCellProps & WithDeleteDialogSupport) => {\n const moveUp = useMemo(\n () => moveUpCreator?.(path, rowIndex),\n [moveUpCreator, path, rowIndex],\n );\n const moveDown = useMemo(\n () => moveDownCreator?.(path, rowIndex),\n [moveDownCreator, path, rowIndex],\n );\n\n return (\n <div>\n {showSortButtons ? (\n <>\n <Tooltip title={translations.up}>\n <Button\n shape='circle'\n aria-label={translations.upAriaLabel}\n icon={<ArrowUpOutlined rev={undefined} />}\n onClick={moveUp}\n disabled={!enabled || !enableUp || !moveUp}\n />\n </Tooltip>\n <Tooltip title={translations.down}>\n <Button\n shape='circle'\n aria-label={translations.downAriaLabel}\n icon={<ArrowDownOutlined rev={undefined} />}\n onClick={moveDown}\n disabled={!enabled || !enableDown || !moveDown}\n />\n </Tooltip>\n </>\n ) : null}\n </div>\n );\n};\n\ninterface GenerateColumns extends ArrayLayoutProps, WithDeleteDialogSupport {\n moveUpCreator?: (path: string, position: number) => () => void;\n moveDownCreator?: (path: string, position: number) => () => void;\n showSortButtons: boolean;\n path: string;\n translations: ArrayTranslations;\n disableRemove?: boolean;\n}\n\nconst generateColumns = (props: GenerateColumns) => {\n const path = props.path;\n const width = props.showSortButtons ? 150 : 50;\n\n return generateDataColumns(props).concat(\n props.enabled && props.showSortButtons\n ? [\n {\n key: 'actions',\n dataIndex: '',\n title: '',\n width: width,\n render: (_field, row) => {\n const rowIndex = row.index;\n const childPath = Paths.compose(path, `${rowIndex}`);\n\n const enableUp = rowIndex !== 0;\n const enableDown = rowIndex !== props.data - 1;\n\n return (\n <ActionCell\n {...props}\n enableUp={enableUp}\n enableDown={enableDown}\n rowIndex={rowIndex}\n childPath={childPath}\n />\n );\n },\n },\n ]\n : [],\n );\n};\n\nconst CollectionTable = ({\n props,\n columns,\n dataSource,\n isObjectSchema,\n renderFrame,\n}: {\n props: ArrayLayoutProps;\n columns: TableColumn[];\n dataSource: TableRow[];\n isObjectSchema: boolean;\n renderFrame: (\n table: React.ReactNode,\n actions: React.ReactNode,\n ) => React.ReactNode;\n}) => {\n const { token } = theme.useToken();\n const page = useCollectionPagination(\n dataSource.map((row) => row.index),\n props.uischema.options?.pagination,\n props.config,\n 'array',\n true,\n );\n const [columnWidths, setColumnWidths] = useColumnWidths();\n const detail = useRowDetail(props);\n const selection = useTableSelection(props);\n const actionColumn = columns.find((column) => column.key === 'actions');\n const displayColumns: TableColumn[] = detail.options\n ? [\n ...columns.filter((column) => column.key !== 'actions'),\n {\n key: 'actions',\n title: '',\n width: (actionColumn?.width ?? 0) + 40,\n render: (value, row, index) => (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 4,\n whiteSpace: 'nowrap',\n }}\n >\n <Tooltip title={detail.t('collection.editDetails')}>\n <Button\n icon={<EditOutlined />}\n aria-label={detail.t('collection.editDetails')}\n onClick={(event) => {\n event.stopPropagation();\n if (detail.options?.presentation === 'panel') {\n detail.setPanelOpen(true);\n }\n detail.open(row.index);\n }}\n />\n </Tooltip>\n <RowErrorCount\n path={props.path}\n index={row.index}\n renderIndicator={(message) => (\n <ValidationIcon\n errorMessages={message}\n id={`${props.path}-${row.index}-row-errors`}\n />\n )}\n />\n {actionColumn?.render(value, row, index)}\n </div>\n ),\n },\n ]\n : columns;\n return (\n <PendingChangesProvider changes={page.pending}>\n {renderFrame(\n <RowDetailFrame state={detail}>\n <div style={{ minWidth: 0, overflow: 'auto' }}>\n <Table<TableRow>\n style={\n columnWidths.__selection\n ? {\n width: Object.values(columnWidths).reduce(\n (sum, value) => sum + value,\n 0,\n ),\n maxWidth: 'none',\n }\n : undefined\n }\n tableLayout={columnWidths.__selection ? 'fixed' : 'auto'}\n rowSelection={{\n columnWidth: columnWidths.__selection,\n selectedRowKeys: selection.selected,\n onChange: (keys) =>\n selection.setSelected(\n keys.filter(\n (key): key is number => typeof key === 'number',\n ),\n ),\n getCheckboxProps: () => ({ disabled: !selection.selectable }),\n }}\n scroll={{\n x: columnWidths.__selection\n ? Object.values(columnWidths).reduce(\n (sum, value) => sum + value,\n 0,\n )\n : 'max-content',\n }}\n dataSource={page.indices.map((index) => dataSource[index])}\n showHeader={isObjectSchema}\n columns={displayColumns.map((column) => {\n if (!column.dataIndex)\n return {\n ...column,\n width: columnWidths.__actions ?? column.width,\n };\n const field = column.dataIndex;\n const definition = props.uischema.options?.columnDefs?.find(\n (item: TableColumnDefinition) => item.field === field,\n );\n const width = columnWidths[field] ?? column.width;\n return {\n ...column,\n width,\n onHeaderCell: () => ({\n 'data-column-key': field,\n style: {\n ...tableColumnStyle(definition),\n width,\n position: 'relative',\n paddingInlineEnd: 16,\n },\n }),\n onCell: () => ({\n style: { ...tableColumnStyle(definition), width },\n }),\n title: (\n <>\n {column.title}\n {props.schema.required?.includes(field) &&\n !(\n props.uischema.options?.cells?.[field]\n ?.hideRequiredAsterisk ??\n props.uischema.options?.hideRequiredAsterisk ??\n props.config?.hideRequiredAsterisk\n ) && (\n <span\n aria-hidden='true'\n style={{ color: token.colorError }}\n >\n {' '}\n *\n </span>\n )}\n <ColumnResizeHandle\n colors={{\n border: token.colorSplit,\n active: token.colorPrimary,\n focus: token.colorPrimaryBorder,\n }}\n field={String(column.title ?? field)}\n definition={definition}\n width={width}\n onResizeStart={(widths) => setColumnWidths(widths)}\n onResize={(value) =>\n setColumnWidths((current) => ({\n ...current,\n [field]: value,\n }))\n }\n />\n </>\n ),\n };\n })}\n size='small'\n pagination={false}\n rowClassName={(row) =>\n detail.options?.presentation === 'panel' &&\n detail.panelOpen &&\n detail.selection?.index === row.index\n ? 'ant-table-row-selected'\n : ''\n }\n onRow={(row) => ({\n 'aria-current':\n detail.options?.presentation === 'panel' &&\n detail.panelOpen &&\n detail.selection?.index === row.index\n ? true\n : undefined,\n onClick: () => {\n if (detail.options?.presentation === 'panel')\n detail.open(row.index);\n },\n })}\n />\n <CollectionErrorNavigation\n options={props.uischema.options}\n renderAction={(label, onClick, icon) => (\n <Tooltip title={label}>\n <Button\n size='small'\n icon={icon}\n aria-label={label}\n onClick={onClick}\n />\n </Tooltip>\n )}\n path={props.path}\n reveal={(index) => {\n page.change(Math.floor(index / page.size) + 1);\n if (detail.options) {\n detail.setPanelOpen(true);\n detail.open(index);\n }\n }}\n />\n <CollectionPager page={page} />\n </div>\n </RowDetailFrame>,\n <React.Fragment key='table-actions'>\n <RowDetailToggle state={detail} />\n <Tooltip title={detail.t('collection.deleteSelected')}>\n <Button\n shape='circle'\n icon={<DeleteFilled />}\n danger\n aria-label={detail.t('collection.deleteSelected')}\n disabled={!selection.canDelete}\n onClick={selection.request}\n />\n </Tooltip>\n </React.Fragment>,\n )}\n <DeleteDialog\n open={selection.confirming}\n onConfirm={selection.confirm}\n onCancel={selection.cancel}\n title={detail.t('collection.deleteSelected')}\n message={detail.t('collection.deleteSelectedMessage')}\n acceptText={detail.t('collection.deleteSelected')}\n declineText={detail.t('composite.cancel')}\n />\n </PendingChangesProvider>\n );\n};\n\nexport class TableControl extends React.Component<\n ArrayLayoutProps &\n WithDeleteDialogSupport & { translations: ArrayTranslations },\n any\n> {\n addItem = (path: string, value: any) => this.props.addItem(path, value);\n render() {\n const {\n label,\n description,\n path,\n schema,\n rootSchema,\n uischema,\n errors,\n moveUp,\n moveDown,\n visible,\n enabled,\n translations,\n disableAdd,\n disableRemove,\n config,\n data,\n } = this.props;\n\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const doDisableAdd = disableAdd || appliedUiSchemaOptions.disableAdd;\n const doDisableRemove =\n disableRemove || appliedUiSchemaOptions.disableRemove;\n\n const controlElement = uischema as ControlElement;\n const isObjectSchema = schema.type === 'object';\n\n if (!visible) {\n return null;\n }\n\n const columns = generateColumns({\n ...this.props,\n disableRemove: doDisableRemove,\n showSortButtons: appliedUiSchemaOptions.showSortButtons,\n moveUpCreator: moveUp,\n moveDownCreator: moveDown,\n });\n\n const dataSource = range(data).map((index) => ({ index, key: index }));\n\n return (\n <CollectionTable\n props={this.props}\n columns={columns}\n dataSource={dataSource}\n isObjectSchema={isObjectSchema}\n renderFrame={(children: React.ReactNode, actions: React.ReactNode) => (\n <TableToolbar\n config={this.props.config}\n errors={errors}\n label={label}\n description={description}\n addItem={this.addItem}\n path={path}\n uischema={controlElement}\n schema={schema}\n rootSchema={rootSchema}\n enabled={enabled}\n translations={translations}\n disableAdd={doDisableAdd}\n actions={actions}\n >\n {children}\n </TableToolbar>\n )}\n />\n );\n }\n}\n","import {\n ArrayLayoutProps,\n ArrayTranslations,\n optionIs,\n RankedTester,\n isObjectArrayControl,\n isPrimitiveArrayControl,\n or,\n rankWith,\n Resolve,\n} from '@jsonforms/core';\nimport {\n withArrayTranslationProps,\n withJsonFormsArrayLayoutProps,\n withTranslateProps,\n useJsonForms,\n} from '@jsonforms/react';\nimport React, { useCallback, useState } from 'react';\nimport { shouldConfirm } from '../util/confirmation';\nimport { DeleteDialog } from './DeleteDialog';\nimport { TableControl } from './TableControl';\n\nexport const ArrayControlRenderer = (\n props: ArrayLayoutProps & { translations: ArrayTranslations },\n) => {\n const [pending, setPending] = useState<{ path: string; index: number }>();\n const { removeItems, visible, translations } = props;\n\n /*\n This table used to confirm unconditionally, which the gap review noted\n \"matches by accident\" - it happened to agree with the `always` fallback but\n could not be configured, so `confirmation: { delete: \"never\" }` did nothing.\n The prompt is now the policy's decision, and the dialog below is only opened\n when the policy asks for one.\n */\n const ctx = useJsonForms();\n const confirmDelete = useCallback(\n (p: string, rowIndex: number) => {\n if (!removeItems) return;\n const parent = p.substring(0, p.lastIndexOf('.'));\n /*\n `p` is the *row's* path, and `props.data` on an array control is the\n item **count**, not the array - so the row has to be read from the\n form's own data. Taking it from `props.data` yielded `undefined`, and a\n policy told nothing was being discarded does not prompt: the table\n silently lost the confirmation it used to have.\n */\n const discarded = [Resolve.data(ctx.core?.data, p)];\n if (\n shouldConfirm(\n {\n options: props.uischema?.options,\n config: props.config,\n catalogId: 'arrayTable',\n operation: 'delete',\n },\n discarded,\n )\n ) {\n setPending({ path: parent, index: rowIndex });\n return;\n }\n removeItems(parent, [rowIndex])();\n },\n [ctx.core?.data, props.config, props.uischema, removeItems],\n );\n const openDeleteDialog = confirmDelete;\n const deleteCancel = useCallback(() => setPending(undefined), []);\n const deleteConfirm = useCallback(() => {\n if (pending) removeItems?.(pending.path, [pending.index])();\n setPending(undefined);\n }, [pending, removeItems]);\n\n if (!visible) {\n return null;\n }\n\n return (\n <>\n <TableControl\n {...props}\n openDeleteDialog={openDeleteDialog}\n translations={translations}\n />\n <DeleteDialog\n open={!!pending}\n onCancel={deleteCancel}\n onConfirm={deleteConfirm}\n acceptText={translations.deleteDialogAccept}\n declineText={translations.deleteDialogDecline}\n title={translations.deleteDialogTitle}\n message={translations.deleteDialogMessage}\n />\n </>\n );\n};\n\nconst supportedArray = or(isObjectArrayControl, isPrimitiveArrayControl);\nconst defaultTableTester = rankWith(3, supportedArray);\n/**\n * Nested objects/arrays make isObjectArrayWithNesting true, so the detail\n * renderer (rank 4) normally wins. `table: true` (or `format: 'table'`) opts a\n * composite array back into the table, where the `cells` option decides how\n * each composite column is summarised.\n */\nconst forcedTableTester = rankWith(\n 5,\n or(optionIs('table', true), optionIs('format', 'table')),\n);\n\nexport const arrayControlTester: RankedTester = (uischema, schema, context) =>\n supportedArray(uischema, schema, context)\n ? Math.max(\n defaultTableTester(uischema, schema, context),\n forcedTableTester(uischema, schema, context),\n )\n : -1;\n\nexport default withJsonFormsArrayLayoutProps(\n withTranslateProps(withArrayTranslationProps(ArrayControlRenderer)),\n);\n","import React from 'react';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { Checkbox } from 'antd';\nimport merge from 'lodash/merge';\n\ntype Props = {\n label?: string;\n};\n\nexport const AntdCheckbox = React.memo(function AntdCheckbox(\n props: CellProps &\n WithClassname &\n Props & {\n inputProps?: React.ComponentProps<typeof Checkbox> & React.AriaAttributes;\n },\n) {\n const {\n data,\n className,\n id,\n enabled,\n label,\n uischema,\n path,\n handleChange,\n config,\n inputProps,\n } = props;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n /*\n Only a real `true` is checked, and anything that is not a boolean shows as\n indeterminate rather than as a selection.\n\n `!!data` made the *string* `'false'` render as checked - the case the\n specification names - and made `0`, `''` and `{}` look like deliberate\n answers. Incoming data that is not a boolean is preserved for correction\n and reported by validation; it must not be presented as a valid true or\n false selection.\n */\n const committed = typeof data === 'boolean';\n\n return (\n <Checkbox\n indeterminate={!committed}\n checked={data === true}\n onChange={(e: any) => handleChange(path, e.target.checked)}\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={!!appliedUiSchemaOptions.focus}\n {...inputProps}\n >\n {label}\n </Checkbox>\n );\n});\n","import dayjs from 'dayjs';\nimport { formatDate } from '@chobantonov/jsonforms-react-renderer-common/formats/dateValues';\nexport {\n formatDate,\n parseDateValue as getData,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/dateValues';\n\nexport const createOnChangeHandler =\n (\n path: string,\n handleChange: (path: string, value: any) => void,\n saveFormat: string,\n ) =>\n (value: dayjs.Dayjs | null) => {\n if (!value) {\n handleChange(path, undefined);\n } else if (value.isValid()) {\n const formattedDate = formatDate(value, saveFormat);\n handleChange(path, formattedDate);\n }\n };\n\nexport const createOnBlurHandler =\n (\n path: string,\n handleChange: (path: string, value: any) => void,\n format: string,\n saveFormat: string,\n rerenderChild: () => void,\n onBlur: () => void,\n ) =>\n (e: React.FocusEvent<HTMLTextAreaElement | HTMLInputElement, Element>) => {\n const date = dayjs(e.target.value, format);\n const formattedDate = formatDate(date, saveFormat);\n if (formattedDate.toString() === 'Invalid Date') {\n handleChange(path, undefined);\n rerenderChild();\n } else {\n handleChange(path, formattedDate);\n }\n onBlur();\n };\n","import {\n containerStyle as sharedContainerStyle,\n resolveGap as sharedResolveGap,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing';\nimport type {\n LayoutContainerOptions,\n LayoutDirection,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing';\nexport {\n resolveGridColumns,\n resolveWrap,\n spanBasis,\n itemSizing,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing';\nexport type {\n LayoutContainerOptions,\n LayoutDirection,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing';\n\n// Portable spacing; layout-owned Form.Item margins are suppressed by the layout.\nexport const DEFAULT_ROW_GAP = 16;\nconst DEFAULT_COLUMN_GAP = 16;\nconst gaps = { row: DEFAULT_ROW_GAP, column: DEFAULT_COLUMN_GAP };\nexport const resolveGap = (\n options: LayoutContainerOptions | undefined,\n config: unknown,\n direction: LayoutDirection,\n) => sharedResolveGap(options, config, direction, gaps);\nexport const containerStyle = (\n options: LayoutContainerOptions | undefined,\n config: unknown,\n direction: LayoutDirection,\n) => sharedContainerStyle(options, config, direction, gaps);\n","import { useEffectiveElements } from '@chobantonov/jsonforms-react-renderer-common/layout/layoutContext';\nexport {\n useEffectiveElements,\n withAjvProps,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutContext';\nexport type { AjvProps } from '@chobantonov/jsonforms-react-renderer-common/layout/layoutContext';\nimport isEmpty from 'lodash/isEmpty';\nimport { ConfigProvider } from 'antd';\nimport React from 'react';\nimport type { UISchemaElement } from '@jsonforms/core';\nimport {\n JsonFormsCellRendererRegistryEntry,\n JsonFormsRendererRegistryEntry,\n JsonSchema,\n OwnPropsOfRenderer,\n} from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport {\n containerStyle,\n itemSizing,\n resolveGap,\n resolveGridColumns,\n type LayoutContainerOptions,\n} from './layoutSizing';\n\nexport interface AntdLayoutRendererProps extends OwnPropsOfRenderer {\n elements: UISchemaElement[];\n direction: 'row' | 'column';\n /** The layout element's own flat options - the container half of the model. */\n layoutOptions?: LayoutContainerOptions;\n config?: unknown;\n}\n\nexport const renderLayoutElements = (\n elements: UISchemaElement[],\n schema: JsonSchema,\n path: string,\n enabled: boolean,\n direction: 'row' | 'column',\n layoutOptions: LayoutContainerOptions | undefined,\n config: unknown,\n renderers?: JsonFormsRendererRegistryEntry[],\n cells?: JsonFormsCellRendererRegistryEntry[],\n) => {\n const grid = resolveGridColumns(layoutOptions, config);\n const gap = resolveGap(layoutOptions, config, direction);\n return (\n <ConfigProvider theme={{ components: { Form: { itemMarginBottom: 0 } } }}>\n <div\n data-layout={direction}\n style={{\n ...containerStyle(layoutOptions, config, direction),\n width: '100%',\n }}\n >\n {elements.map((child, index) => {\n const { style, diagnostics } = itemSizing(\n child,\n direction,\n grid,\n gap,\n layoutOptions?.minItemWidth,\n );\n const all = diagnostics;\n return (\n <div\n key={`${path}-${index}`}\n style={style}\n {...(all.length\n ? { 'data-layout-diagnostic': all.join(' ') }\n : {})}\n >\n <JsonFormsDispatch\n uischema={child}\n schema={schema}\n path={path}\n enabled={enabled}\n renderers={renderers}\n cells={cells}\n />\n </div>\n );\n })}\n </div>\n </ConfigProvider>\n );\n};\n\nconst AntdLayoutRendererComponent = ({\n visible,\n elements,\n schema,\n path = '',\n enabled = true,\n direction,\n layoutOptions,\n config,\n renderers,\n cells,\n}: AntdLayoutRendererProps) => {\n const effective = useEffectiveElements(elements, path, config);\n if (!schema || isEmpty(effective) || !visible) {\n return null;\n }\n return renderLayoutElements(\n effective,\n schema,\n path,\n enabled,\n direction,\n layoutOptions,\n config,\n renderers,\n cells,\n );\n};\nexport const AntdLayoutRenderer = React.memo(AntdLayoutRendererComponent);\n\nexport interface AntdLabelableLayoutRendererProps extends AntdLayoutRendererProps {\n label?: string;\n}\n","import { useEffect, useState } from 'react';\nimport dayjs from 'dayjs';\nimport type { Locale } from 'antd/es/locale';\n\n/**\n * Teaching antd which language it is in.\n *\n * JSON Forms carries a locale (`i18n.locale`) and translates the strings the\n * *renderers* own. It says nothing to antd, which owns a second set of strings\n * nobody authored here: the month and weekday names in a calendar, \"Today\",\n * \"OK\", a select's empty text, a table's sort tooltips. Without this they stay\n * English however the form is configured, which looks like a translation gap\n * in the form rather than a missing setting.\n *\n * dayjs has to be told separately, because antd's locale supplies the widget\n * chrome while dayjs supplies the formatted date itself.\n *\n * ## Why loaders rather than imports\n *\n * antd ships 75 locales and dayjs 143. Importing them statically puts every\n * one in the bundle to use at most one, so each entry here is a **loader**: a\n * function whose `import()` the bundler turns into its own chunk, fetched only\n * if that locale is asked for.\n *\n * The specifiers are deliberately literal. A computed `import(path)` cannot be\n * analysed statically, and a bundler answers that by emitting either nothing\n * or all 75 - so the list below *is* the build-time selection of supported\n * locales, and adding one means adding a line.\n */\n\n/**\n * A loaded locale: antd's chrome, plus the name dayjs knows it by.\n *\n * The dayjs name is carried rather than applied by the loader, because\n * `dayjs.locale()` is global state and has to be set **every time this locale\n * becomes the active one** - not only the first time it is fetched. Applying\n * it inside the loader looked right and left the last-loaded language in\n * charge, so switching back to an already-cached one formatted its dates in\n * the wrong language.\n */\nexport interface LoadedLocale {\n antd: Locale;\n dayjsName: string;\n}\n\nexport type AntdLocaleLoader = () => Promise<LoadedLocale>;\n\n/** Both halves of a locale: the widget chrome, and the date formatting. */\nconst entry =\n (\n antd: () => Promise<{ default: Locale }>,\n day: () => Promise<unknown>,\n dayjsName: string,\n ): AntdLocaleLoader =>\n async () => {\n const [locale] = await Promise.all([antd(), day()]);\n return { antd: locale.default, dayjsName };\n };\n\n/**\n * The locales this build includes.\n *\n * Keyed by language tag, matched case-insensitively and by language alone -\n * `bg-BG`, `bg_BG` and `bg` all reach the same entry - so a host that carries\n * a regional tag does not have to normalise it first.\n *\n * Replace or extend it with {@link setAntdLocaleLoaders} at startup; the key\n * is what `i18n.locale` will hold.\n */\nexport const defaultAntdLocaleLoaders: Record<string, AntdLocaleLoader> = {\n en: entry(\n () => import('antd/locale/en_US'),\n () => import('dayjs/locale/en'),\n 'en',\n ),\n bg: entry(\n () => import('antd/locale/bg_BG'),\n () => import('dayjs/locale/bg'),\n 'bg',\n ),\n es: entry(\n () => import('antd/locale/es_ES'),\n () => import('dayjs/locale/es'),\n 'es',\n ),\n fr: entry(\n () => import('antd/locale/fr_FR'),\n () => import('dayjs/locale/fr'),\n 'fr',\n ),\n it: entry(\n () => import('antd/locale/it_IT'),\n () => import('dayjs/locale/it'),\n 'it',\n ),\n ja: entry(\n () => import('antd/locale/ja_JP'),\n () => import('dayjs/locale/ja'),\n 'ja',\n ),\n nl: entry(\n () => import('antd/locale/nl_NL'),\n () => import('dayjs/locale/nl'),\n 'nl',\n ),\n pl: entry(\n () => import('antd/locale/pl_PL'),\n () => import('dayjs/locale/pl'),\n 'pl',\n ),\n pt: entry(\n () => import('antd/locale/pt_PT'),\n () => import('dayjs/locale/pt'),\n 'pt',\n ),\n ru: entry(\n () => import('antd/locale/ru_RU'),\n () => import('dayjs/locale/ru'),\n 'ru',\n ),\n tr: entry(\n () => import('antd/locale/tr_TR'),\n () => import('dayjs/locale/tr'),\n 'tr',\n ),\n uk: entry(\n () => import('antd/locale/uk_UA'),\n () => import('dayjs/locale/uk'),\n 'uk',\n ),\n zh: entry(\n () => import('antd/locale/zh_CN'),\n () => import('dayjs/locale/zh-cn'),\n 'zh-cn',\n ),\n};\n\nlet loaders: Record<string, AntdLocaleLoader> = defaultAntdLocaleLoaders;\n\n/**\n * Replaces the supported set, for a build that wants fewer chunks or more\n * languages than the list above.\n */\nexport const setAntdLocaleLoaders = (\n next: Record<string, AntdLocaleLoader>,\n): void => {\n loaders = next;\n};\n\nexport const getAntdLocaleLoaders = (): Record<string, AntdLocaleLoader> =>\n loaders;\n\n/** `bg-BG` and `bg_BG` both mean `bg`, and case never matters. */\nexport const localeKey = (locale: string | undefined): string | undefined => {\n if (!locale) {\n return undefined;\n }\n const lower = locale.toLowerCase().replace(/_/g, '-');\n return loaders[lower] ? lower : lower.split('-')[0];\n};\n\nconst cache = new Map<string, LoadedLocale>();\n\n/** Applying a locale is two things, and dayjs is global. */\nconst apply = (loaded: LoadedLocale): Locale => {\n dayjs.locale(loaded.dayjsName);\n return loaded.antd;\n};\n\n/**\n * Resolves the antd locale for a language tag, loading it on first use.\n *\n * Returns `undefined` until it arrives and for a tag this build does not\n * carry, which is what antd's own default handles - English chrome is a\n * better answer than a form that will not render.\n */\nexport const useAntdLocale = (\n locale: string | undefined,\n): Locale | undefined => {\n const key = localeKey(locale);\n const [resolved, setResolved] = useState<{ key: string; locale: Locale }>();\n\n useEffect(() => {\n if (!key) {\n return;\n }\n const cached = cache.get(key);\n if (cached) {\n // Re-applied, not just re-read: another locale may have been the last\n // one to set dayjs.\n apply(cached);\n return;\n }\n const load = loaders[key];\n if (!load) {\n return;\n }\n let live = true;\n load()\n .then((value) => {\n cache.set(key, value);\n if (live) {\n setResolved({ key, locale: apply(value) });\n }\n })\n .catch(() => {\n // A missing chunk must not take the form down; antd falls back to its\n // own default, which is English.\n if (live) {\n setResolved(undefined);\n }\n });\n return () => {\n live = false;\n };\n }, [key]);\n\n return key\n ? (cache.get(key)?.antd ??\n (resolved?.key === key ? resolved.locale : undefined))\n : undefined;\n};\n","import {\n and,\n ControlProps,\n DispatchPropsOfMultiEnumControl,\n hasType,\n isDescriptionHidden,\n JsonSchema,\n OwnPropsOfEnum,\n Paths,\n RankedTester,\n rankWith,\n resolveSchema,\n schemaMatches,\n schemaSubPathMatches,\n uiTypeIs,\n} from '@jsonforms/core';\n\nimport { withJsonFormsMultiEnumProps } from '@jsonforms/react';\nimport { Flex, Form } from 'antd';\nimport isEmpty from 'lodash/isEmpty';\nimport merge from 'lodash/merge';\nimport React from 'react';\nimport { AntdCheckbox } from '../antd-controls/AntdCheckbox';\nimport { useFocus } from '../util';\n\nexport const EnumArrayRenderer = ({\n config,\n id,\n schema,\n visible,\n errors,\n description,\n label,\n required,\n path,\n options,\n data,\n addItem,\n removeItem,\n uischema,\n rootSchema,\n enabled,\n}: ControlProps & OwnPropsOfEnum & DispatchPropsOfMultiEnumControl) => {\n const [focused, onFocus, onBlur] = useFocus();\n const isValid = errors.length === 0;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const vertical = uischema.options?.vertical === true;\n const showDescription = !isDescriptionHidden(\n visible,\n description,\n focused,\n appliedUiSchemaOptions.showUnfocusedDescription,\n );\n\n if (!visible) {\n return null;\n }\n\n return (\n <Form.Item\n required={required && !appliedUiSchemaOptions.hideRequiredAsterisk}\n hasFeedback={!isValid}\n validateStatus={isValid ? 'success' : 'error'}\n label={label}\n help={!isValid ? errors : showDescription ? description : null}\n >\n {/*\n Same orientation encoding as the radio group: `vertical` false (the\n default) lays the choices out in a wrapping row, true stacks them.\n The checkboxes are individual controls rather than an antd\n Checkbox.Group, so the group role and orientation are declared here.\n */}\n <Flex\n aria-orientation={vertical ? 'vertical' : 'horizontal'}\n gap={vertical ? 4 : 8}\n role='group'\n vertical={vertical}\n wrap={!vertical}\n >\n {(options ?? []).map((option: any, index: number) => {\n const optionPath = Paths.compose(path, `${index}`);\n const checkboxValue = data?.includes(option.value) ? true : false;\n return (\n <AntdCheckbox\n id={id + '-input-' + option.value}\n key={option.value}\n label={option.label}\n isValid={isEmpty(errors)}\n path={optionPath}\n handleChange={(_childPath, newValue) =>\n newValue\n ? addItem(path, option.value)\n : removeItem?.(path, option.value)\n }\n data={checkboxValue}\n errors={errors}\n schema={schema}\n visible={visible}\n rootSchema={rootSchema}\n uischema={uischema}\n enabled={enabled}\n inputProps={{\n onFocus,\n onBlur,\n }}\n />\n );\n })}\n </Flex>\n </Form.Item>\n );\n};\n\nconst hasOneOfItems = (schema: JsonSchema): boolean =>\n schema.oneOf !== undefined &&\n schema.oneOf.length > 0 &&\n (schema.oneOf as JsonSchema[]).every((entry: JsonSchema) => {\n return entry.const !== undefined;\n });\n\nconst hasEnumItems = (schema: JsonSchema): boolean =>\n schema.type === 'string' && schema.enum !== undefined;\n\nexport const enumArrayRendererTester: RankedTester = rankWith(\n 5,\n and(\n uiTypeIs('Control'),\n and(\n schemaMatches(\n (schema) =>\n hasType(schema, 'array') &&\n !Array.isArray(schema.items) &&\n schema.uniqueItems === true,\n ),\n schemaSubPathMatches('items', (schema, rootSchema) => {\n const resolvedSchema = schema.$ref\n ? resolveSchema(rootSchema, schema.$ref, rootSchema)\n : schema;\n return (\n !!resolvedSchema &&\n (hasOneOfItems(resolvedSchema) || hasEnumItems(resolvedSchema))\n );\n }),\n ),\n ),\n);\n\nexport default withJsonFormsMultiEnumProps(EnumArrayRenderer);\n","import DeleteOutlined from '@ant-design/icons/DeleteOutlined';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport { Button, Flex, Tooltip } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../../util/translate';\n\nexport interface AntdAdditionalPropertyActionsProps {\n deleteDisabled: boolean;\n name: string;\n onDelete: () => void;\n onRename: () => void;\n readonly?: boolean;\n}\n\nexport const AntdAdditionalPropertyActions = ({\n deleteDisabled,\n name,\n onDelete,\n onRename,\n readonly,\n}: AntdAdditionalPropertyActionsProps) => {\n const t = useI18n();\n return (\n <Flex className='jsonforms-additional-property-actions' gap={4}>\n <Tooltip title={t('additionalProperties.rename')}>\n <Button\n aria-label={t('additionalProperties.renameNamed', { name })}\n disabled={readonly}\n icon={<EditOutlined />}\n onClick={onRename}\n shape='circle'\n size='small'\n type='text'\n />\n </Tooltip>\n <Tooltip\n title={\n deleteDisabled\n ? t('additionalProperties.deleteBlocked')\n : t('additionalProperties.delete')\n }\n >\n <Button\n aria-label={t('additionalProperties.deleteNamed', { name })}\n danger\n disabled={deleteDisabled}\n icon={<DeleteOutlined />}\n onClick={onDelete}\n shape='circle'\n size='small'\n type='text'\n />\n </Tooltip>\n </Flex>\n );\n};\n","import { renamePropertyKey } from '@chobantonov/jsonforms-react-renderer-common/objects/additionalProperties';\nimport {\n useAdditionalPropertyEntries,\n useAdditionalPropertyActions,\n type AdditionalPropertiesProps,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/useAdditionalPropertyEntries';\nimport { ValidationIcon } from './ValidationIcon';\nimport {\n useNameConstraintMessage,\n usePropertyNameErrors,\n useAdditionalPropertyErrors,\n} from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport { DeleteDialog } from './DeleteDialog';\nimport { PendingChangesProvider } from '@chobantonov/jsonforms-react-renderer-common/interaction/pendingChanges';\nimport { CollectionPager } from './CollectionPager';\nimport {\n DynamicPropertyProvider,\n clearedDynamicPropertyValue,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/dynamicProperties';\n\nimport type { JsonSchema } from '@jsonforms/core';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nimport { JsonFormsDispatch, useJsonForms } from '@jsonforms/react';\nimport {\n Button,\n Card,\n Col,\n Flex,\n Form,\n Input,\n Row,\n Tooltip,\n Typography,\n} from 'antd';\nimport React, { useState } from 'react';\nimport { useI18n } from '../util/translate';\nimport {\n AdditionalPropertyNameError,\n AdditionalPropertyNameResult,\n assignOwnProperty,\n needsIsolatedEditor,\n validateAdditionalPropertyName,\n} from '../util/additionalPropertyName';\nimport { IsolatedPropertyEditor } from '@chobantonov/jsonforms-react-renderer-common/objects/IsolatedPropertyEditor';\nimport { literalPropertySchema } from '../util/literalPropertySchema';\nimport { AntdAdditionalPropertyActions } from './additionalProperties/AntdAdditionalPropertyActions';\nimport { AntdAdditionalPropertyRenameDialog } from './additionalProperties/AntdAdditionalPropertyRenameDialog';\n\nexport type { AdditionalPropertiesProps } from '@chobantonov/jsonforms-react-renderer-common/objects/useAdditionalPropertyEntries';\n\nexport const AdditionalProperties = (props: AdditionalPropertiesProps) => {\n const {\n embedded = false,\n cells,\n\n data,\n enabled,\n handleChange,\n label,\n path,\n readonly,\n renderers,\n rootSchema,\n schema,\n } = props;\n const context = useJsonForms();\n const [newPropertyName, setNewPropertyName] = useState('');\n const [renamingPropertyName, setRenamingPropertyName] = useState<\n string | null\n >(null);\n const t = useI18n();\n const [renameValue, setRenameValue] = useState('');\n const entries = useAdditionalPropertyEntries(props);\n const {\n objectSchema,\n appliedOptions,\n objectData,\n reservedPropertyNames,\n page,\n additionalPropertyItems,\n shouldShow,\n } = entries;\n const restrict = appliedOptions.restrict !== false;\n const allowEmptyPropertyNames =\n appliedOptions.allowEmptyPropertyNames === true;\n\n // Exactly as typed. Trimming here would store `\"a\"` for `\" a \"`, and with\n // empty names permitted it would erase a whitespace-only key entirely.\n const propertyName = newPropertyName;\n /*\n One message per reason, all through the translator.\n\n Only the schema refuses a name now. A dot or an empty name is accepted and\n routed to an isolated editor rather than rejected, because a property that\n no data path can address is still perfectly legal data - see Adjustment 14.\n */\n const nameMessage = (\n error: AdditionalPropertyNameError,\n name: string,\n ): string => {\n switch (error) {\n case 'required':\n return t('additionalProperties.nameRequired');\n case 'already-defined':\n return t('additionalProperties.nameTaken', { name });\n default:\n return t('additionalProperties.nameInvalid', { name });\n }\n };\n const constraintMessage = useNameConstraintMessage();\n const ajv = context.core?.ajv;\n const validateName = (name: string, currentName?: string) => {\n const result: AdditionalPropertyNameResult = validateAdditionalPropertyName(\n {\n name,\n schema,\n rootSchema,\n data,\n currentName,\n disallowedNames: reservedPropertyNames,\n allowEmptyName: allowEmptyPropertyNames,\n validate: ajv\n ? (nameSchema, value) => ajv.validate(nameSchema, value)\n : undefined,\n },\n );\n return result.error === undefined\n ? undefined\n : (constraintMessage(result.errors) ??\n nameMessage(result.error, result.name));\n };\n const propertyNameError = validateName(propertyName);\n /*\n Section 18's draft rule: an exactly empty name input \"must not show inline\n name-validation errors on initial load or after it is cleared or reset,\n including an empty-name collision when `allowEmptyPropertyNames` is\n enabled\". Suppressing the message must not suppress the judgement, so Add\n still consults `propertyNameError` below.\n */\n const showPropertyNameError =\n newPropertyName !== '' && Boolean(propertyNameError);\n const {\n addPropertyDisabled,\n removePropertyDisabled,\n deletion,\n addProperty,\n removeProperty,\n } = useAdditionalPropertyActions(props, entries, {\n restrict,\n propertyName,\n propertyNameError,\n setNewPropertyName,\n });\n const renameProperty = (propertyToRename: string) => {\n const nextName = renameValue;\n const renameError = validateName(nextName, propertyToRename);\n if (renameError || nextName === propertyToRename || !objectData) {\n return;\n }\n\n // Rebuilt in order, so renaming does not move the property to the end.\n const updatedData = renamePropertyKey(\n objectData,\n propertyToRename,\n nextName,\n );\n handleChange(path, updatedData);\n setRenamingPropertyName(null);\n setRenameValue('');\n };\n\n const renameError =\n renamingPropertyName === null\n ? undefined\n : validateName(renameValue, renamingPropertyName);\n const closeRename = () => {\n setRenamingPropertyName(null);\n setRenameValue('');\n };\n\n const propertyErrors = useAdditionalPropertyErrors(path);\n const nameErrors = usePropertyNameErrors(path);\n if (!shouldShow) return null;\n\n return (\n <PendingChangesProvider changes={page.pending}>\n <Card\n className='jsonforms-additional-properties'\n size='small'\n variant={embedded ? 'borderless' : 'outlined'}\n styles={embedded ? { body: { padding: 0 } } : undefined}\n >\n <DeleteDialog\n open={deletion.confirming}\n onCancel={deletion.cancel}\n onConfirm={deletion.confirm}\n />\n <Flex vertical gap='middle'>\n <Row align='bottom' gutter={[12, 8]}>\n <Col md={5} xs={24}>\n <Typography.Text>\n {t('additionalProperties.title')}\n {propertyErrors && (\n <ValidationIcon\n local\n errorMessages={propertyErrors}\n id={`${path}-additional-property-errors`}\n />\n )}\n </Typography.Text>\n </Col>\n <Col md={18} xs={20}>\n <Form.Item\n label={t('additionalProperties.namePlaceholder')}\n validateStatus={showPropertyNameError ? 'error' : undefined}\n style={{ marginBottom: 0 }}\n >\n <Input\n aria-label={\n label\n ? t('additionalProperties.addTo', { label })\n : t('additionalProperties.add')\n }\n disabled={!enabled || readonly}\n placeholder={t('additionalProperties.namePlaceholder')}\n value={newPropertyName}\n onChange={(event) =>\n setNewPropertyName(event.currentTarget.value)\n }\n onPressEnter={addProperty}\n />\n </Form.Item>\n </Col>\n <Col md={1} xs={4}>\n <Tooltip title={t('additionalProperties.add')}>\n <Button\n aria-label={t('additionalProperties.add')}\n disabled={addPropertyDisabled}\n icon={<PlusOutlined />}\n onClick={addProperty}\n shape='circle'\n size='small'\n />\n </Tooltip>\n </Col>\n </Row>\n {showPropertyNameError ? (\n <Typography.Text\n className='jsonforms-additional-properties-error'\n type='danger'\n >\n {propertyNameError}\n </Typography.Text>\n ) : null}\n <Flex\n className='jsonforms-additional-properties-list'\n vertical\n gap='middle'\n >\n {page.indices\n .map((index) => additionalPropertyItems[index])\n .map((item) => {\n /*\n A name a data path cannot address - empty, or containing a dot -\n is edited in a form of its own. The row keeps the heading and the\n actions in that case, because the isolated editor draws no label.\n */\n const isolated = needsIsolatedEditor(item.propertyName);\n const actions = enabled ? (\n <AntdAdditionalPropertyActions\n deleteDisabled={\n removePropertyDisabled ||\n Boolean(\n restrict &&\n objectSchema.required?.includes(item.propertyName),\n )\n }\n name={item.propertyName}\n onDelete={() => removeProperty(item.propertyName)}\n onRename={() => {\n setRenamingPropertyName(item.propertyName);\n setRenameValue(item.propertyName);\n }}\n readonly={readonly}\n />\n ) : null;\n return (\n <Flex\n align='start'\n className='jsonforms-additional-property'\n key={item.propertyName}\n style={{ position: 'relative', width: '100%' }}\n vertical\n >\n {\n <Flex\n align='center'\n justify='space-between'\n style={{ width: '100%' }}\n >\n {/*\n Section 18: an empty name \"has a visually blank label. Do\n not display the literal text `\"\"` as a substitute name.\"\n The non-breaking space keeps the row its normal height so\n Rename and Delete stay above the value input rather than\n dropping into a row of their own.\n */}\n <Flex align='center' gap={4}>\n <Typography.Text\n type={\n nameErrors.has(item.propertyName)\n ? 'danger'\n : undefined\n }\n data-property-name={item.propertyName}\n >\n {item.propertyName === ''\n ? '\\u00a0'\n : item.propertyName}\n </Typography.Text>\n {nameErrors.get(item.propertyName) && (\n <ValidationIcon\n local\n errorMessages={nameErrors.get(item.propertyName)!}\n id={`${item.path}-name-errors`}\n />\n )}\n </Flex>\n {actions}\n </Flex>\n }\n <div\n className='jsonforms-additional-property-control'\n style={{ width: '100%' }}\n >\n {isolated ? (\n <IsolatedPropertyEditor\n cells={cells}\n enabled={Boolean(enabled)}\n onChange={(next) =>\n handleChange(\n path,\n assignOwnProperty(\n { ...objectData },\n item.propertyName,\n next === undefined\n ? clearedDynamicPropertyValue(\n item.schema,\n rootSchema,\n objectData?.[item.propertyName],\n )\n : next,\n ),\n )\n }\n readonly={readonly}\n renderers={renderers}\n /*\n Rebundled, so a local `$ref` inside this property's\n schema still resolves once the value is its own\n document. See `literalPropertySchema`.\n */\n schema={literalPropertySchema(\n item.schema as JsonSchema,\n rootSchema,\n )}\n uischema={{\n type: 'Control',\n scope: '#',\n label: false,\n }}\n value={\n objectData &&\n Object.prototype.hasOwnProperty.call(\n objectData,\n item.propertyName,\n )\n ? objectData[item.propertyName]\n : undefined\n }\n />\n ) : (\n <DynamicPropertyProvider path={item.path}>\n <JsonFormsDispatch\n schema={item.schema}\n uischema={{ ...item.uischema, label: false } as any}\n path={item.path}\n enabled={enabled}\n renderers={renderers}\n cells={cells}\n readonly={readonly}\n />\n </DynamicPropertyProvider>\n )}\n </div>\n </Flex>\n );\n })}\n </Flex>\n <CollectionPager page={page} />\n </Flex>\n <AntdAdditionalPropertyRenameDialog\n disabled={\n !enabled ||\n Boolean(readonly) ||\n Boolean(renameError) ||\n !renameValue.trim() ||\n renameValue.trim() === renamingPropertyName\n }\n error={renameError}\n oldName={renamingPropertyName}\n onCancel={closeRename}\n onChange={setRenameValue}\n onRename={() => {\n if (renamingPropertyName) renameProperty(renamingPropertyName);\n }}\n value={renameValue}\n />\n </Card>\n </PendingChangesProvider>\n );\n};\n","import React from 'react';\nimport { Card, Typography } from 'antd';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport {\n createObjectRenderer,\n type ObjectFrameProps,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/ObjectDetail';\nexport { objectControlTester } from '@chobantonov/jsonforms-react-renderer-common/objects/ObjectDetail';\nimport { ValidationIcon } from './ValidationIcon';\nimport { AdditionalProperties } from './AdditionalProperties';\n\nconst ObjectFrame = ({\n path,\n title,\n errors,\n detail,\n additional,\n}: ObjectFrameProps) => {\n const content = (\n <div style={{ display: 'grid', gap: 12, minWidth: 0 }}>\n {!title && errors && (\n <Typography.Text type='danger' role='alert'>\n {errors}\n </Typography.Text>\n )}\n {detail}\n {additional}\n </div>\n );\n return path ? (\n <Card\n className='jsonforms-object'\n title={title}\n extra={\n title && errors ? (\n <ValidationIcon\n local\n errorMessages={errors}\n id={`${path}-object-errors`}\n />\n ) : undefined\n }\n >\n {content}\n </Card>\n ) : (\n content\n );\n};\n\nexport const ObjectRenderer = createObjectRenderer(\n AdditionalProperties,\n ObjectFrame,\n);\nexport default withJsonFormsControlProps(ObjectRenderer);\n","import React from 'react';\nimport { useI18n } from '../util/translate';\n\nimport { Modal } from 'antd';\n\nexport interface TabSwitchConfirmDialogProps {\n open: boolean;\n handleClose: () => void;\n confirm: () => void;\n cancel: () => void;\n id: string;\n}\n\nexport const TabSwitchConfirmDialog = ({\n open,\n handleClose,\n confirm,\n cancel,\n}: TabSwitchConfirmDialogProps) => {\n const t = useI18n();\n return (\n <Modal\n title={t('confirm.branchChange.title')}\n open={open}\n afterClose={handleClose}\n onOk={confirm}\n onCancel={cancel}\n okText={t('confirm.accept')}\n cancelText={t('confirm.decline')}\n aria-labelledby='alert-dialog-title'\n aria-describedby='alert-dialog-description'\n >\n <p>{t('confirm.branchChange.message')}</p>\n </Modal>\n );\n};\n","import { useCombinatorSelection } from '@chobantonov/jsonforms-react-renderer-common/composition/useCombinatorSelection';\nimport { discriminatorBranch } from '@chobantonov/jsonforms-react-renderer-common/composition/discriminatorBranch';\nimport {\n useJsonForms,\n JsonFormsDispatch,\n withJsonFormsOneOfProps,\n} from '@jsonforms/react';\nimport { isArrayElementPath } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema';\nimport {\n isUnselectedBranchValue,\n clearedBranchValue,\n} from '@chobantonov/jsonforms-react-renderer-common/composition/combinators';\nimport { CombinatorBranch } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorBranch';\nimport React, { useCallback, useState } from 'react';\nimport isEmpty from 'lodash/isEmpty';\nimport { shouldConfirm } from '../util/confirmation';\n\nimport { TabSwitchConfirmDialog } from './TabSwitchConfirmDialog';\n\nimport {\n CombinatorRendererProps,\n createDefaultValue,\n isDescriptionHidden,\n isOneOfControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { Select, Form } from 'antd';\nimport { CombinatorProperties } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties';\nimport merge from 'lodash/merge';\nimport { useFocus } from '../util';\nimport { branchChangeData, discardedByBranchChange } from '../util/combinators';\n\nexport const OneOfRenderer = ({\n handleChange,\n schema,\n path,\n renderers,\n cells,\n rootSchema,\n id,\n visible,\n indexOfFittingSchema,\n uischema,\n uischemas,\n data,\n enabled,\n config,\n required,\n errors,\n label,\n description,\n}: CombinatorRendererProps) => {\n const formContext = useJsonForms();\n indexOfFittingSchema =\n discriminatorBranch(schema, rootSchema, 'oneOf', data) ??\n indexOfFittingSchema;\n const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n const [selectedIndex, setSelectedIndex] = useState(\n indexOfFittingSchema !== null && indexOfFittingSchema !== undefined\n ? indexOfFittingSchema\n : !isEmpty(data)\n ? 0 // uses the first schema and report errors if not empty\n : null,\n );\n const [newSelectedIndex, setNewSelectedIndex] = useState<number | null>(0);\n\n /*\n The displayed branch follows the data until the user picks one.\n\n Section 18 asks the form to show the branch that fits the existing value -\n \"if the value matches a later oneOf branch, display that branch\" - and the\n selection was derived once, at mount, and never again. A discriminated\n oneOf therefore went stale the moment its discriminator changed: choosing\n \"Post\" left the collection-point field on screen, which is the whole\n mechanism by which a schema, with no UI rule, decides which fields exist.\n\n Once the user selects a branch themselves the choice is theirs, and the\n write that selection makes puts the data on the branch anyway. A value\n that fits *nothing* leaves the display where it is: section 18 keeps a\n fallback branch on screen \"alongside validation errors, while retaining\n the incoming data for correction\", and blanking the form mid-edit would\n hide the very field the correction needs.\n */\n const [chosen, setChosen] = useState(false);\n const [previousInput, setPreviousInput] = useState({\n initialized: false,\n data,\n indexOfFittingSchema,\n });\n if (\n !previousInput.initialized ||\n previousInput.data !== data ||\n previousInput.indexOfFittingSchema !== indexOfFittingSchema\n ) {\n setPreviousInput({ initialized: true, data, indexOfFittingSchema });\n if (isUnselectedBranchValue(data, indexOfFittingSchema)) {\n setChosen(false);\n setSelectedIndex(null);\n setConfirmDialogOpen(false);\n } else if (\n !chosen &&\n indexOfFittingSchema != null &&\n indexOfFittingSchema >= 0\n ) {\n setSelectedIndex(indexOfFittingSchema);\n }\n }\n const handleClose = useCallback(\n () => setConfirmDialogOpen(false),\n [setConfirmDialogOpen],\n );\n const cancel = useCallback(() => {\n setConfirmDialogOpen(false);\n }, [setConfirmDialogOpen]);\n const { selectionError, renderInfos: oneOfRenderInfos } =\n useCombinatorSelection(\n { schema, rootSchema, uischema, path, uischemas },\n 'oneOf',\n formContext.core,\n );\n\n /*\n A branch change initializes from the new branch's generated defaults and\n carries the enclosing schema's own properties across. It used to write the\n generated defaults alone, which silently dropped every enclosing value -\n `name` in the specification's worked example - on every switch, and on a\n clear.\n */\n const openNewTab = (newIndex: number | null) => {\n const defaults =\n newIndex !== null\n ? createDefaultValue(oneOfRenderInfos[newIndex].schema, rootSchema)\n : clearedBranchValue(\n isArrayElementPath(formContext.core?.data, path),\n oneOfRenderInfos.map((info) => info.schema),\n );\n handleChange(path, branchChangeData(data, defaults, schema));\n setSelectedIndex(newIndex);\n };\n\n const confirm = () => {\n openNewTab(newSelectedIndex);\n setConfirmDialogOpen(false);\n };\n\n const handleTabChange = (value: string | null) => {\n const newOneOfIndex =\n value === null || value === undefined ? null : parseInt(value, 10);\n\n // Re-selecting the branch already in use is not a change.\n if (newOneOfIndex === selectedIndex) {\n return;\n }\n setChosen(true);\n\n setNewSelectedIndex(newOneOfIndex);\n /*\n Was `!isEmpty(data)`, which is close to `always` but not the policy:\n it could not be configured, and lodash's `isEmpty` calls `0` and `false`\n empty - values section 14 explicitly counts as existing. Clearing the\n selection (`null`) is a branchChange too, and used to skip the prompt\n entirely.\n */\n if (\n shouldConfirm(\n {\n options: uischema.options as Record<string, unknown> | undefined,\n config,\n catalogId: 'oneOf',\n operation: 'branchChange',\n },\n // Only what the switch actually discards: the enclosing properties\n // survive it, so they are not values being thrown away.\n [discardedByBranchChange(data, schema)],\n )\n ) {\n setConfirmDialogOpen(true);\n return;\n }\n openNewTab(newOneOfIndex);\n };\n\n const [focused, onFocus, onBlur] = useFocus();\n\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const isValid = errors.length === 0 && !selectionError;\n const showDescription = !isDescriptionHidden(\n visible,\n description,\n focused,\n appliedUiSchemaOptions.showUnfocusedDescription,\n );\n\n const help = !isValid\n ? selectionError || errors\n : showDescription\n ? description\n : null;\n const style = { width: '100%' };\n\n if (!visible) {\n return null;\n }\n\n if (oneOfRenderInfos.length === 1) {\n const branch = oneOfRenderInfos[0];\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={'oneOf'}\n path={path}\n rootSchema={rootSchema}\n />\n <CombinatorBranch\n options={uischema.options}\n schema={branch.schema}\n path={path}\n >\n <JsonFormsDispatch\n schema={branch.schema}\n uischema={branch.uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n enabled={enabled}\n />\n </CombinatorBranch>\n </>\n );\n }\n\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={'oneOf'}\n path={path}\n rootSchema={rootSchema}\n />\n <Form.Item\n required={required && !appliedUiSchemaOptions.hideRequiredAsterisk}\n hasFeedback={!isValid}\n validateStatus={isValid ? 'success' : 'error'}\n label={label}\n help={help}\n style={style}\n htmlFor={id + '-input'}\n id={id}\n >\n <Select\n id={id + '-input'}\n aria-invalid={!isValid}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n placeholder={appliedUiSchemaOptions.placeholder}\n onFocus={onFocus}\n onBlur={onBlur}\n value={selectedIndex?.toString()}\n onChange={handleTabChange}\n allowClear={enabled}\n options={oneOfRenderInfos.map((info, idx) => ({\n value: String(idx),\n label: info.label,\n }))}\n />\n </Form.Item>\n\n {selectedIndex !== undefined && selectedIndex !== null && (\n <CombinatorBranch\n options={uischema.options}\n schema={oneOfRenderInfos[selectedIndex].schema}\n path={path}\n >\n <JsonFormsDispatch\n uischema={oneOfRenderInfos[selectedIndex].uischema}\n schema={oneOfRenderInfos[selectedIndex].schema}\n path={path}\n renderers={renderers}\n cells={cells}\n />\n </CombinatorBranch>\n )}\n\n <TabSwitchConfirmDialog\n cancel={cancel}\n confirm={confirm}\n id={'oneOf-' + id}\n open={confirmDialogOpen}\n handleClose={handleClose}\n />\n </>\n );\n};\n\nexport const oneOfControlTester: RankedTester = rankWith(3, isOneOfControl);\n\nexport default withJsonFormsOneOfProps(OneOfRenderer);\n","import React, { useCallback, useState } from 'react';\nimport isEmpty from 'lodash/isEmpty';\n\nimport { TabSwitchConfirmDialog } from './TabSwitchConfirmDialog';\n\nimport {\n and,\n CombinatorRendererProps,\n createCombinatorRenderInfos,\n createDefaultValue,\n isOneOfControl,\n JsonSchema,\n optionIs,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { Tabs } from 'antd';\nimport { JsonFormsDispatch, withJsonFormsOneOfProps } from '@jsonforms/react';\nimport { CombinatorProperties } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties';\n\nconst OneOfTabRenderer = ({\n handleChange,\n schema,\n path,\n renderers,\n cells,\n rootSchema,\n id,\n visible,\n indexOfFittingSchema = 0,\n uischema,\n uischemas,\n data,\n}: CombinatorRendererProps) => {\n const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n const [selectedIndex, setSelectedIndex] = useState(indexOfFittingSchema);\n const [newSelectedIndex, setNewSelectedIndex] = useState(0);\n const handleClose = useCallback(\n () => setConfirmDialogOpen(false),\n [setConfirmDialogOpen],\n );\n const oneOfRenderInfos = createCombinatorRenderInfos(\n (schema as JsonSchema).oneOf ?? [],\n rootSchema,\n 'oneOf',\n uischema,\n path,\n uischemas,\n );\n\n const openNewTab = (newIndex: number) => {\n handleChange(\n path,\n createDefaultValue(oneOfRenderInfos[newIndex].schema, rootSchema),\n );\n setSelectedIndex(newIndex);\n };\n\n const confirm = () => {\n openNewTab(newSelectedIndex);\n setConfirmDialogOpen(false);\n };\n\n const handleTabChange = (value: string) => {\n const newOneOfIndex = parseInt(value, 10);\n\n setNewSelectedIndex(newOneOfIndex);\n if (isEmpty(data)) {\n openNewTab(newOneOfIndex);\n } else {\n setConfirmDialogOpen(true);\n }\n };\n\n if (!visible) {\n return null;\n }\n\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={'oneOf'}\n path={path}\n rootSchema={rootSchema}\n />\n <Tabs\n defaultActiveKey={String(selectedIndex)}\n onChange={handleTabChange}\n items={oneOfRenderInfos.map(\n (oneOfRenderInfo, idx) =>\n ({\n label: oneOfRenderInfo.label,\n key: String(idx),\n children: (\n <JsonFormsDispatch\n schema={oneOfRenderInfo.schema}\n uischema={oneOfRenderInfo.uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n />\n ),\n }) as any,\n )}\n ></Tabs>\n <TabSwitchConfirmDialog\n cancel={handleClose}\n confirm={confirm}\n id={'oneOf-' + id}\n open={confirmDialogOpen}\n handleClose={handleClose}\n />\n </>\n );\n};\n\nexport const oneOfTabControlTester: RankedTester = rankWith(\n 4,\n and(isOneOfControl, optionIs('variant', 'tab')),\n);\n\nexport default withJsonFormsOneOfProps(OneOfTabRenderer);\n","import React from 'react';\nimport type { ControlProps } from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { ScalarCompositionControl } from '@chobantonov/jsonforms-react-renderer-common/composition/ScalarCompositionControl';\nexport { scalarCompositionTester } from '@chobantonov/jsonforms-react-renderer-common/composition/useScalarComposition';\nconst MESSAGE_STYLE: React.CSSProperties = { marginTop: -16, marginBottom: 16 };\n\nexport default withJsonFormsControlProps((props: ControlProps) => (\n <ScalarCompositionControl\n {...props}\n errorClassName='ant-form-item-explain ant-form-item-explain-error'\n errorStyle={MESSAGE_STYLE}\n />\n));\n","import React from 'react';\nimport { LabelProps, RankedTester, rankWith, uiTypeIs } from '@jsonforms/core';\nimport { withJsonFormsLabelProps } from '@jsonforms/react';\n\n/**\n * Default tester for a label.\n * @type {RankedTester}\n */\nexport const labelRendererTester: RankedTester = rankWith(1, uiTypeIs('Label'));\n\n/**\n * Default renderer for a label.\n */\nexport const LabelRenderer = ({ text, visible }: LabelProps) => {\n if (!visible) {\n return null;\n }\n return <label>{text}</label>;\n};\n\nexport default withJsonFormsLabelProps(LabelRenderer);\n","import { usePathErrorIndicator } from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport { ArrayPanel } from '../layouts/ArrayPanel';\nimport PlusOutlined from '@ant-design/icons/PlusOutlined';\nimport { ArrayTranslations } from '@jsonforms/core';\nimport { Button, Tooltip } from 'antd';\nimport React from 'react';\nimport { renderArrayTitle } from '../layouts/arrayTitle';\nexport interface ArrayLayoutToolbarProps {\n options?: Record<string, any>;\n config?: any;\n label: string;\n description: string | undefined;\n errors: string;\n path: string;\n enabled: boolean;\n addItem(path: string, data: any): () => void;\n createDefault(): any;\n translations: ArrayTranslations;\n disableAdd?: boolean;\n children?: React.ReactNode;\n}\n\nexport const ArrayLayoutToolbar = React.memo(function ArrayLayoutToolbar({\n label,\n description,\n addItem,\n path,\n enabled,\n createDefault,\n translations,\n disableAdd,\n children,\n options,\n config,\n}: ArrayLayoutToolbarProps) {\n const arrayErrors = usePathErrorIndicator(\n path,\n options,\n !(\n options?.hideArraySummaryValidation ?? config?.hideArraySummaryValidation\n ),\n );\n return (\n <ArrayPanel\n options={options}\n config={config}\n panelLabel={label}\n style={{ width: '100%' }}\n size='small'\n type='inner'\n title={renderArrayTitle(label, arrayErrors, description)}\n extra={[\n <Tooltip key='1' title={translations.addTooltip}>\n <Button\n disabled={!enabled || disableAdd}\n aria-label={translations.addTooltip}\n onClick={addItem(path, createDefault())}\n shape='circle'\n icon={<PlusOutlined rev={undefined} />}\n />\n </Tooltip>,\n ]}\n >\n {children}\n </ArrayPanel>\n );\n});\n","import { findDetailUISchema as findUISchema } from '@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema';\nimport { ItemValidationIndicator } from '@chobantonov/jsonforms-react-renderer-common/validation/ItemValidationIndicator';\nimport { ContainerValidationIndicator } from './ValidationIndicator';\nimport { resolveCollapsed } from '@chobantonov/jsonforms-react-renderer-common/layout/groupState';\nimport ArrowDownOutlined from '@ant-design/icons/ArrowDownOutlined';\nimport ArrowUpOutlined from '@ant-design/icons/ArrowUpOutlined';\nimport DeleteFilled from '@ant-design/icons/DeleteFilled';\nimport {\n ArrayLayoutProps,\n ArrayTranslations,\n Resolve,\n composePaths,\n computeLabel,\n createControlElement,\n createDefaultValue,\n errorsAt,\n formatErrorMessage,\n getFirstPrimitiveProp,\n} from '@jsonforms/core';\nimport {\n JsonFormsDispatch,\n JsonFormsStateContext,\n useJsonForms,\n} from '@jsonforms/react';\nimport {\n Avatar,\n Button,\n Collapse,\n Empty,\n Space,\n Tooltip,\n Typography,\n} from 'antd';\nimport map from 'lodash/map';\nimport merge from 'lodash/merge';\nimport range from 'lodash/range';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { useI18n } from '../util/translate';\nimport { useConfirmation } from '../util/useConfirmation';\nimport { ArrayLayoutToolbar } from './ArrayToolbar';\n\n/*\n `hideAvatar` hides the *marker*, not the item's identity - \"without\n suppressing accessible item identity or validation feedback\". So the index\n stays in the accessibility tree when the badge goes; `clip` rather than\n `display: none`, which would take it out of that tree too.\n*/\nconst SR_ONLY: React.CSSProperties = {\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n};\n\ninterface ExtraProps {\n rowIndex: number;\n enableUp: boolean;\n enableDown: boolean;\n showSortButtons: boolean;\n disableRemove?: boolean;\n}\n\nconst ArrayLayoutComponent = (\n props: { ctx: JsonFormsStateContext } & ArrayLayoutProps & {\n translations: ArrayTranslations;\n },\n) => {\n /*\n The expanded item is tracked by **index**, not by panel key, because the\n index is what every other operation here speaks: add appends at `data`,\n the sort buttons swap neighbours, and delete shifts everything after it\n down. Keeping a key would mean re-deriving the index on each of those.\n\n This used to be `useState<string | boolean>(false)` with a curried\n `handleChange(panel)(event, expanded)` that the `Collapse` called as\n `handleChange(value)` - producing the inner function and discarding it. So\n `setExpanded` never ran, the state was permanently `false`, and the\n `Collapse` was left uncontrolled. `collapsed` and `collapseNewItems`\n could not be implemented on top of that, and the only visible symptom was\n an avatar highlight that never appeared.\n */\n const [expandedIndex, setExpandedIndex] = useState<number | undefined>(() => {\n // \"False: initially open the first item if present.\" Initialization only.\n const collapsed = resolveCollapsed(\n props.uischema.options,\n props.config,\n 'array',\n );\n return collapsed || props.data === 0 ? undefined : 0;\n });\n const innerCreateDefaultValue = useCallback(\n () => createDefaultValue(props.schema, props.rootSchema),\n [props.schema, props.rootSchema],\n );\n const {\n arraySchema,\n enabled,\n data,\n path,\n schema,\n uischema,\n errors,\n addItem,\n renderers,\n cells,\n label,\n required,\n rootSchema,\n config,\n uischemas,\n description,\n disableAdd,\n disableRemove,\n translations,\n moveUp,\n moveDown,\n removeItems,\n } = props;\n\n const t = useI18n();\n const confirmation = useConfirmation();\n const appliedUiSchemaOptions = useMemo(\n () => merge({}, config, uischema.options),\n [config, uischema.options],\n );\n const showSortButtons = appliedUiSchemaOptions.showSortButtons;\n\n const hideAvatar = appliedUiSchemaOptions.hideAvatar === true;\n const avatarStyle = useMemo(\n (): React.CSSProperties => ({ marginRight: '10px' }),\n [],\n );\n\n /*\n \"True: hide that summary only; retain validation and field/item error\n feedback.\" The `errors` prop is the array's own errors followed by a\n combined child summary, so hiding the summary means showing only the\n array's own - not showing nothing.\n */\n const ownErrors = useMemo(\n () =>\n formatErrorMessage(\n errorsAt(\n path,\n schema,\n (errorPath: string) => errorPath === path,\n )(props.ctx.core?.errors ?? []).flatMap((error) => error.message ?? []),\n ),\n [path, schema, props.ctx.core],\n );\n const summaryErrors = appliedUiSchemaOptions.hideArraySummaryValidation\n ? ownErrors\n : errors;\n\n /*\n Expansion follows the *item*, not the slot. Reordering swaps two\n neighbours, so the open panel has to move with the item the user opened -\n \"track the logical item through renderer-owned reorder operations rather\n than transferring expansion to the item now at its old index\".\n */\n const trackSwap = useCallback((from: number, to: number) => {\n setExpandedIndex((current) =>\n current === from ? to : current === to ? from : current,\n );\n }, []);\n // Deletion shifts every later item down one; the open panel must not end up\n // on a different item, and must close if it was the one removed.\n const trackRemoval = useCallback((removed: number) => {\n setExpandedIndex((current) =>\n current === undefined || current < removed\n ? current\n : current === removed\n ? undefined\n : current - 1,\n );\n }, []);\n const handleAddItem = useCallback(\n (p: string, value: any) => () => {\n // Add appends, so the new item's index is the old count.\n const inserted = data;\n addItem(p, value)();\n // \"False: open the newly added item. True: leave it closed and preserve\n // existing expansion.\"\n if (!appliedUiSchemaOptions.collapseNewItems) {\n setExpandedIndex(inserted);\n }\n },\n [addItem, data, appliedUiSchemaOptions.collapseNewItems],\n );\n\n const getExtra = ({\n rowIndex,\n enableUp,\n enableDown,\n showSortButtons,\n disableRemove,\n }: ExtraProps) => {\n return (\n <>\n {showSortButtons ? (\n <>\n <Tooltip title={translations.up}>\n <Button\n shape='circle'\n aria-label={translations.upAriaLabel}\n icon={<ArrowUpOutlined rev={undefined} />}\n onClick={(event) => {\n event.stopPropagation();\n trackSwap(rowIndex, rowIndex - 1);\n moveUp?.(path, rowIndex)();\n }}\n disabled={!enabled || !enableUp || !moveUp}\n />\n </Tooltip>\n <Tooltip title={translations.down}>\n <Button\n shape='circle'\n aria-label={translations.downAriaLabel}\n icon={<ArrowDownOutlined rev={undefined} />}\n onClick={(event) => {\n event.stopPropagation();\n trackSwap(rowIndex, rowIndex + 1);\n moveDown?.(path, rowIndex)();\n }}\n disabled={!enabled || !enableDown || !moveDown}\n />\n </Tooltip>\n </>\n ) : null}\n <Tooltip key='tooltip-remove' title={translations.removeTooltip}>\n <Button\n onClick={(event) => {\n event.stopPropagation();\n // Section 14's `always` fallback: this used to delete silently.\n confirmation.request({\n operation: 'delete',\n catalogId: 'arrayLayout',\n /*\n `data` here is the item *count*, not the array, so the value\n being discarded is read from the form's own data at the\n item's path.\n */\n discarded: [\n Resolve.data(\n props.ctx.core?.data,\n composePaths(path, `${rowIndex}`),\n ),\n ],\n options: uischema?.options,\n config,\n perform: () => {\n trackRemoval(rowIndex);\n removeItems?.(path, [rowIndex])();\n },\n });\n }}\n shape='circle'\n disabled={!enabled || disableRemove || !removeItems}\n icon={<DeleteFilled rev={undefined} />}\n aria-label={translations.removeAriaLabel}\n />\n </Tooltip>\n </>\n );\n };\n\n const foundUISchema = useMemo(\n () =>\n findUISchema(\n uischemas ?? [],\n schema,\n uischema.scope,\n path,\n // JSON Forms generates an empty layout for `items: true`; dispatch\n // the unrestricted item as a Control so mixed values remain editable.\n typeof schema === 'boolean' && schema\n ? () => createControlElement('#')\n : undefined,\n uischema,\n rootSchema,\n ),\n [uischemas, schema, path, uischema, rootSchema],\n );\n\n const doDisableAdd =\n disableAdd ||\n appliedUiSchemaOptions.disableAdd ||\n (appliedUiSchemaOptions.restrict &&\n arraySchema !== undefined &&\n arraySchema.maxItems !== undefined &&\n data >= arraySchema.maxItems);\n\n const doDisableRemove =\n disableRemove ||\n appliedUiSchemaOptions.disableRemove ||\n (appliedUiSchemaOptions.restrict &&\n arraySchema !== undefined &&\n arraySchema.minItems !== undefined &&\n data <= arraySchema.minItems);\n\n const childLabelForIndex = (childPath: string, index: number) => {\n const childLabelProp =\n uischema.options?.elementLabelProp ?? getFirstPrimitiveProp(schema);\n if (!childLabelProp) {\n return `${index}`;\n }\n const labelValue = Resolve.data(\n props.ctx.core?.data,\n composePaths(childPath, childLabelProp),\n );\n if (\n labelValue === undefined ||\n labelValue === null ||\n Number.isNaN(labelValue)\n ) {\n return '';\n }\n return `${labelValue}`;\n };\n\n return (\n <>\n {confirmation.dialog}\n <ArrayLayoutToolbar\n options={uischema.options}\n config={config}\n translations={translations}\n label={computeLabel(\n label,\n required ?? false,\n appliedUiSchemaOptions.hideRequiredAsterisk,\n )}\n description={description}\n errors={summaryErrors}\n path={path}\n enabled={enabled}\n addItem={handleAddItem}\n createDefault={innerCreateDefaultValue}\n disableAdd={doDisableAdd}\n >\n {data > 0 ? (\n <Collapse\n accordion\n expandIconPlacement='end'\n activeKey={\n expandedIndex === undefined ? [] : [String(expandedIndex)]\n }\n onChange={(value) => {\n // `accordion` gives at most one key back, and an empty list when\n // the open panel is closed.\n const key = Array.isArray(value) ? value[0] : value;\n setExpandedIndex(key === undefined ? undefined : Number(key));\n }}\n items={map(range(data), (index) => {\n const childPath = composePaths(path, `${index}`);\n\n const text = childLabelForIndex(childPath, index);\n\n return {\n key: String(index),\n label: (\n <>\n {/*\n \"True: hide that marker, without suppressing accessible\n item identity.\" With the marker gone the header still has\n to say which item it is, so the index moves onto the\n header's own accessible name.\n */}\n {hideAvatar ? (\n <span style={SR_ONLY}>\n {t('array.indexLabel')} {index + 1}\n </span>\n ) : (\n <Avatar\n aria-label={t('array.indexLabel')}\n style={avatarStyle}\n >\n {index + 1}\n </Avatar>\n )}\n <Space\n size='small'\n align='center'\n style={{ verticalAlign: 'middle' }}\n >\n {text ? <Typography.Text>{text}</Typography.Text> : null}\n <ItemValidationIndicator\n Indicator={ContainerValidationIndicator}\n path={childPath}\n options={props.uischema.options}\n config={props.config}\n />\n </Space>\n </>\n ),\n extra: (\n <Space>\n {getExtra({\n rowIndex: index,\n enableUp: index !== 0,\n enableDown: index !== props.data - 1,\n showSortButtons: showSortButtons,\n disableRemove: doDisableRemove,\n })}\n </Space>\n ),\n children: (\n <JsonFormsDispatch\n schema={schema}\n uischema={foundUISchema}\n path={childPath}\n key={childPath}\n renderers={renderers}\n cells={cells}\n />\n ),\n };\n })}\n ></Collapse>\n ) : (\n <Empty description={translations.noDataMessage} />\n )}\n </ArrayLayoutToolbar>\n </>\n );\n};\n\nexport const ArrayLayout = React.memo(function ArrayLayout(\n props: ArrayLayoutProps & { translations: ArrayTranslations },\n) {\n const ctx = useJsonForms();\n return <ArrayLayoutComponent {...props} ctx={ctx} />;\n});\n","import React, { useCallback } from 'react';\n\nimport {\n and,\n ArrayLayoutProps,\n ArrayTranslations,\n isControl,\n isObjectArrayWithNesting,\n or,\n RankedTester,\n rankWith,\n schemaMatches,\n} from '@jsonforms/core';\nimport {\n withArrayTranslationProps,\n withJsonFormsArrayLayoutProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { ArrayLayout } from './ArrayLayout';\n\nexport const ArrayLayoutRenderer = ({\n visible,\n addItem,\n ...props\n}: ArrayLayoutProps & { translations: ArrayTranslations }) => {\n const addItemCb = useCallback(\n (p: string, value: any) => addItem(p, value),\n [addItem],\n );\n\n if (!visible) {\n return null;\n }\n\n return <ArrayLayout visible={visible} addItem={addItemCb} {...props} />;\n};\n\nexport const arrayLayoutTester: RankedTester = rankWith(\n 4,\n or(\n isObjectArrayWithNesting,\n and(\n isControl,\n schemaMatches(\n (schema) =>\n schema.type === 'array' &&\n (schema as unknown as { items?: unknown }).items === true,\n ),\n ),\n ),\n);\nexport default withJsonFormsArrayLayoutProps(\n withTranslateProps(withArrayTranslationProps(ArrayLayoutRenderer)),\n);\n","import DeleteFilled from '@ant-design/icons/DeleteFilled';\nimport type {\n OwnPropsOfMasterListItem,\n StatePropsOfMasterItem,\n} from '@jsonforms/core';\nimport { withJsonFormsMasterListItemProps } from '@jsonforms/react';\nimport {\n Avatar,\n Button,\n Flex,\n Tooltip,\n Typography,\n theme as antdTheme,\n} from 'antd';\nimport React from 'react';\n\nimport { useI18n } from '../util/translate';\n\nconst { Text } = Typography;\n\nconst SR_ONLY: React.CSSProperties = {\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n};\n\nexport const ListWithDetailMasterItem = ({\n index,\n childLabel,\n selected,\n enabled,\n handleSelect,\n removeItem,\n path,\n translations,\n disableRemove,\n hideAvatar,\n}: StatePropsOfMasterItem & { hideAvatar?: boolean }) => {\n const t = useI18n();\n const { useToken } = antdTheme;\n const { token: theme } = useToken();\n\n return (\n <Flex\n align='center'\n gap={theme.marginXS}\n className='jsonforms-list-detail-item'\n onClick={handleSelect(index)}\n style={{\n paddingBlock: theme.paddingSM,\n paddingInline: theme.paddingXS,\n background: selected ? theme.controlItemBgActive : undefined,\n borderRadius: theme.borderRadius,\n }}\n >\n <Button\n type='text'\n aria-pressed={selected}\n onClick={(event) => {\n event.stopPropagation();\n handleSelect(index)();\n }}\n style={{\n flex: 1,\n minWidth: 0,\n height: 'auto',\n justifyContent: 'flex-start',\n }}\n >\n {hideAvatar ? (\n <span style={SR_ONLY}>\n {t('array.indexLabel')} {index + 1}\n </span>\n ) : (\n <Avatar\n aria-label={t('array.indexLabel')}\n style={\n selected\n ? { background: theme.colorPrimary, flexShrink: 0 }\n : { flexShrink: 0 }\n }\n size='small'\n >\n {index + 1}\n </Avatar>\n )}\n <Text ellipsis>{childLabel ?? index}</Text>\n </Button>\n <Tooltip title={translations.removeTooltip} key='action_remove'>\n <Button\n disabled={!enabled || disableRemove}\n aria-label={translations.removeAriaLabel}\n icon={<DeleteFilled rev={undefined} />}\n onClick={(event) => {\n /*\n The whole row selects on click, and this button is inside it.\n Without this, pressing Delete on one entry while reading\n another also navigates to the one being deleted - and then\n asks about it, so declining could not put the selection back:\n the move had already happened on the way in.\n\n The array layout and the mixed tree stop propagation on their\n row actions for the same reason.\n */\n event.stopPropagation();\n removeItem(path, index)();\n }}\n />\n </Tooltip>\n </Flex>\n );\n};\n\n/*\n `hideAvatar` is an own prop the renderer passes straight through, but the\n HOC's own-props type is fixed by JSON Forms, so the connected component is\n re-typed here rather than at each call site.\n*/\nexport default withJsonFormsMasterListItemProps(\n ListWithDetailMasterItem,\n) as React.ComponentType<OwnPropsOfMasterListItem & { hideAvatar?: boolean }>;\n","import { findDetailUISchema as findUISchema } from '@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema';\nimport {\n and,\n ArrayLayoutProps,\n ArrayTranslations,\n composePaths,\n Resolve,\n computeLabel,\n createDefaultValue,\n deriveTypes,\n errorsAt,\n formatErrorMessage,\n RankedTester,\n rankWith,\n schemaTypeIs,\n uiTypeIs,\n} from '@jsonforms/core';\nimport {\n JsonFormsDispatch,\n withArrayTranslationProps,\n withJsonFormsArrayLayoutProps,\n withTranslateProps,\n useJsonForms,\n} from '@jsonforms/react';\nimport { Empty, Listy, Splitter } from 'antd';\n\nimport range from 'lodash/range';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { useConfirmation } from '../util/useConfirmation';\nimport { ArrayLayoutRenderer } from '../layouts/ArrayLayoutRenderer';\nimport { ArrayLayoutToolbar } from '../layouts/ArrayToolbar';\nimport ListWithDetailMasterItem from './ListWithDetailMasterItem';\nimport merge from 'lodash/merge';\n\nexport const ListWithDetailRenderer = (\n props: ArrayLayoutProps & { translations: ArrayTranslations },\n) => {\n const {\n uischemas,\n schema,\n uischema,\n path,\n enabled,\n errors,\n visible,\n label,\n required,\n removeItems,\n addItem,\n data,\n renderers,\n cells,\n config,\n rootSchema,\n description,\n disableAdd,\n disableRemove,\n translations,\n } = props;\n const [selectedIndex, setSelectedIndex] = useState<number>();\n const confirmation = useConfirmation();\n const ctx = useJsonForms();\n const handleRemoveItem = useCallback(\n (p: string, value: number) => () => {\n const remove = () => {\n removeItems?.(p, [value])();\n if (selectedIndex === value) {\n setSelectedIndex(undefined);\n } else if (selectedIndex !== undefined && selectedIndex > value) {\n setSelectedIndex(selectedIndex - 1);\n }\n };\n // Section 14's `always` fallback: this used to remove silently.\n confirmation.request({\n operation: 'delete',\n catalogId: 'listWithDetail',\n /*\n `data` on an array layout is the item **count**, not the array, so\n the item has to be read from the form's own data. Reading it from\n `data` yielded `undefined`, and a policy told nothing is being\n discarded does not prompt.\n */\n discarded: [Resolve.data(ctx.core?.data, composePaths(p, `${value}`))],\n options: props.uischema?.options as Record<string, unknown> | undefined,\n config,\n perform: remove,\n });\n },\n [\n confirmation,\n config,\n ctx.core?.data,\n props.uischema,\n removeItems,\n selectedIndex,\n ],\n );\n const handleListItemClick = useCallback(\n (index: number) => () => setSelectedIndex(index),\n [setSelectedIndex],\n );\n const handleCreateDefaultValue = useCallback(\n () => createDefaultValue(schema, rootSchema),\n [schema, rootSchema],\n );\n const foundUISchema = useMemo(\n () =>\n findUISchema(\n uischemas ?? [],\n schema,\n uischema.scope,\n path,\n undefined,\n uischema,\n rootSchema,\n ),\n [uischemas, schema, path, uischema, rootSchema],\n );\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n /*\n `errors` on an array control is the control's own errors followed by a\n combined child summary; hiding the summary shows only the former.\n */\n const ownErrors = formatErrorMessage(\n errorsAt(\n path,\n schema,\n (errorPath: string) => errorPath === path,\n )(ctx.core?.errors ?? []).flatMap((error) => error.message ?? []),\n );\n const summaryErrors = appliedUiSchemaOptions.hideArraySummaryValidation\n ? ownErrors\n : errors;\n const doDisableAdd = disableAdd || appliedUiSchemaOptions.disableAdd;\n const doDisableRemove =\n !removeItems || disableRemove || appliedUiSchemaOptions.disableRemove;\n\n const [previousSchema, setPreviousSchema] = React.useState(schema);\n if (previousSchema !== schema) {\n setPreviousSchema(schema);\n setSelectedIndex(undefined);\n }\n\n if (!visible) {\n return null;\n }\n\n // Primitive list-with-detail examples use the same accordion presentation\n // as other primitive arrays. Object arrays retain the master/detail layout.\n // Object items may infer their type from properties or use allOf/$ref,\n // as in Huge Test. Only known non-object items use the accordion fallback.\n const itemTypes = deriveTypes(schema);\n if (itemTypes.length > 0 && !itemTypes.includes('object')) {\n return <ArrayLayoutRenderer {...props} />;\n }\n\n return (\n <>\n {confirmation.dialog}\n <ArrayLayoutToolbar\n options={uischema.options}\n config={config}\n translations={translations}\n label={computeLabel(\n label,\n required ?? false,\n appliedUiSchemaOptions.hideRequiredAsterisk,\n )}\n description={description}\n errors={summaryErrors}\n path={path}\n enabled={enabled}\n addItem={addItem}\n createDefault={handleCreateDefaultValue}\n disableAdd={doDisableAdd}\n >\n <Splitter orientation='horizontal'>\n <Splitter.Panel defaultSize='25%' min='15%' max='60%'>\n <div\n style={{\n maxHeight: '20rem',\n overflowY: 'auto',\n overscrollBehaviorY: 'contain',\n }}\n >\n {data > 0 ? (\n <Listy<number>\n items={range(data)}\n rowKey={(index) => index}\n styles={{ item: { padding: 0 } }}\n itemRender={(index) => (\n <ListWithDetailMasterItem\n index={index}\n path={path}\n schema={schema}\n enabled={enabled}\n handleSelect={handleListItemClick}\n removeItem={handleRemoveItem}\n selected={selectedIndex === index}\n key={index}\n uischema={foundUISchema}\n childLabelProp={appliedUiSchemaOptions.elementLabelProp}\n translations={translations}\n disableRemove={doDisableRemove}\n hideAvatar={appliedUiSchemaOptions.hideAvatar === true}\n />\n )}\n />\n ) : (\n <Empty description={translations.noDataMessage} />\n )}\n </div>\n </Splitter.Panel>\n <Splitter.Panel min='25%'>\n <div style={{ minWidth: 0, paddingInlineStart: 12 }}>\n {selectedIndex !== undefined ? (\n <JsonFormsDispatch\n renderers={renderers}\n cells={cells}\n visible={visible}\n schema={schema}\n uischema={foundUISchema}\n path={composePaths(path, `${selectedIndex}`)}\n />\n ) : (\n <Empty description={translations.noSelection} />\n )}\n </div>\n </Splitter.Panel>\n </Splitter>\n </ArrayLayoutToolbar>\n </>\n );\n};\n\nexport const listWithDetailTester: RankedTester = rankWith(\n 4,\n and(uiTypeIs('ListWithDetail'), schemaTypeIs('array')),\n);\n\nexport default withJsonFormsArrayLayoutProps(\n withTranslateProps(withArrayTranslationProps(ListWithDetailRenderer)),\n);\n","import EyeInvisibleOutlined from '@ant-design/icons/EyeInvisibleOutlined';\nimport EyeOutlined from '@ant-design/icons/EyeOutlined';\nimport { Tooltip } from 'antd';\nimport React from 'react';\nimport { useI18n } from '../util/translate';\n\nexport interface AntdRevealButtonProps {\n revealed: boolean;\n /** Toggles the reveal state. */\n onToggle: () => void;\n disabled?: boolean;\n}\n\n/**\n * The show/hide control for a masked value.\n *\n * A real button whose accessible name states the **action it will perform**\n * rather than the current state - \"Show password\" while the value is hidden -\n * which is what section 18 asks for. Enter or Space activates it natively.\n *\n * It carries a tooltip with the same wording, for the same reason the clear\n * button does: the control is an icon, and an icon with no visible name is\n * guessable at best. antd renders no tooltip on its own reveal icon - it gives\n * the wrapper an `aria-label` and stops there - so this is ours to supply, not\n * something the library prevents.\n *\n * Deliberately no `aria-pressed`. A toggle button either names its state and\n * reports pressed, or names the action it will perform; doing both describes\n * the control twice and contradicts itself, since \"Show password\" is not a\n * thing that can be pressed or unpressed. The specification asks for the\n * action wording, so that is what this reports.\n *\n * Toggling is presentation only. The specification is explicit that it \"must\n * not write form data, trigger a value-change event, alter validation, or mark\n * the value dirty\", and that reveal state is \"never serialized into data or UI\n * schema\".\n */\nexport const AntdRevealButton = ({\n revealed,\n onToggle,\n disabled = false,\n}: AntdRevealButtonProps) => {\n const t = useI18n();\n const name = t(revealed ? 'password.hide' : 'password.show');\n return (\n <Tooltip title={name}>\n <button\n aria-label={name}\n data-password-toggle\n disabled={disabled}\n // Keeps focus in the text field, the way antd's own icon does, so\n // revealing does not move the caret or close the field's clear button.\n onMouseDown={(event) => event.preventDefault()}\n onClick={onToggle}\n style={{\n background: 'none',\n border: 0,\n color: 'inherit',\n cursor: disabled ? 'not-allowed' : 'pointer',\n display: 'inline-flex',\n padding: 0,\n }}\n tabIndex={0}\n type='button'\n >\n {revealed ? (\n <EyeOutlined rev={undefined} />\n ) : (\n <EyeInvisibleOutlined rev={undefined} />\n )}\n </button>\n </Tooltip>\n );\n};\n","import { CellProps, JsonSchema, WithClassname } from '@jsonforms/core';\nimport { Flex, Input } from 'antd';\nimport merge from 'lodash/merge';\nimport React, { useState } from 'react';\nimport { AntdClearableInput } from './AntdClearableInput';\nimport { AntdRevealButton } from './AntdRevealButton';\n\n/**\n * How many boxes a segmented code editor draws, or `undefined` when the schema\n * does not fix a length.\n *\n * `maxLength` is the count, because a box the user cannot fill would be a lie\n * about what the field accepts. `minLength` has to be present too - see\n * `otpControlTester` - but it constrains validity rather than layout: with the\n * two equal, which is the intended authoring, the boxes and the schema agree\n * exactly; with `minLength` lower, the trailing boxes are optional and the\n * floor is enforced by validation like any other `minLength`.\n */\n/**\n * The character drawn in place of each hidden one.\n *\n * A bullet rather than `true`: see the note on `mask` below - antd's boolean\n * form reveals the value it is supposed to hide.\n */\nexport const OTP_MASK = '\\u2022';\n\nexport const otpLength = (schema?: JsonSchema): number | undefined => {\n const min = (schema as { minLength?: unknown } | undefined)?.minLength;\n const max = (schema as { maxLength?: unknown } | undefined)?.maxLength;\n return typeof min === 'number' && typeof max === 'number' && max > 0\n ? max\n : undefined;\n};\n\n/**\n * A fixed-length secret entered one character per box.\n *\n * Selected by `options.variant: \"otp\"` on a password control whose schema\n * bounds its length. It is the same value under the same storage contract as\n * the ordinary password field - only the editor differs - so masking, reveal\n * and clear all behave the way section 18 requires of a password.\n */\nexport const AntdOtp = React.memo(function AntdOtp(\n props: CellProps &\n WithClassname & {\n inputProps?: Record<string, unknown>;\n label?: React.ReactNode;\n },\n) {\n const {\n data,\n config,\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange,\n schema,\n label,\n } = props;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const [revealed, setRevealed] = useState(false);\n const length = otpLength(schema) ?? 6;\n const value = typeof data === 'string' ? data : '';\n\n return (\n <AntdClearableInput\n clearable={appliedUiSchemaOptions.clearable !== false}\n data={data}\n enabled={enabled}\n onClear={() => handleChange(path, undefined)}\n >\n {(clear) => (\n <Flex align='center' gap='small'>\n <Input.OTP\n /*\n `onInput`, not `onChange`. antd fires `onChange` only once every\n box is filled, so a half-typed code would leave the form data\n holding the previous value while the screen showed something\n else, and deleting a character would write nothing at all.\n Section 19 requires the UI to represent the actual form data, and\n a `minLength` error can only be reported against a value that was\n actually stored.\n */\n onInput={(cells) => handleChange(path, cells.join('') || undefined)}\n /*\n Reveal is the `mask` lever: antd's OTP has no toggle of its own.\n As with the password field this changes presentation only and\n never touches form data.\n\n `mask` is a **character**, not `true`. antd draws the mask as an\n overlay showing `typeof mask === 'string' ? mask : value`, over an\n input whose own text is `color: transparent` - so `mask={true}`\n puts the real character on screen, which is no mask at all.\n\n `type` is set for the same reason from the other side: OTPInput\n asks for `type: mask === true ? 'password' : 'text'` and then\n spreads its shared props, which carry `type: undefined`, over the\n top - so the cells come out as plain text boxes unless the type is\n passed in explicitly. Passing it keeps each box a real password\n input, which is what a screen reader and a browser read.\n */\n mask={revealed ? false : OTP_MASK}\n type={revealed ? 'text' : 'password'}\n value={value}\n length={length}\n disabled={!enabled}\n autoComplete='one-time-code'\n className={className}\n /*\n The boxes are separate inputs, so the Form.Item label has no\n single control to point `htmlFor` at. Naming the group is what\n assistive technology needs to announce the field once rather than\n announcing `length` unlabelled text boxes.\n */\n role='group'\n aria-label={typeof label === 'string' ? label : undefined}\n id={id}\n {...(props.inputProps as Record<string, unknown>)}\n />\n <AntdRevealButton\n revealed={revealed}\n onToggle={() => setRevealed((shown) => !shown)}\n disabled={!enabled}\n />\n {clear}\n </Flex>\n )}\n </AntdClearableInput>\n );\n});\n","export {\n specDateSaveFormat,\n specTimeSaveFormat,\n specDateTimeSaveFormat,\n saveFormatSatisfies,\n SAVE_FORMAT_DIAGNOSTIC,\n warnOnSaveFormat,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalFormats';\n\n/** The calendar views a date picker may offer, per section 18. */\ntype DateView = 'year' | 'month' | 'day';\n\n/**\n * The picker granularity, from `views` or - failing that - the save format.\n *\n * Section 18 makes `views` \"a date-only array drawn from `year`, `month`,\n * `day`\", and is explicit that it \"does not automatically change\n * `dateSaveFormat`\". The two are independent settings: a year/month picker\n * that stores a full date is a legitimate thing to ask for.\n *\n * Before this existed the granularity was **inferred from the save format** -\n * no `D` meant a month picker, no `M` a year picker. That is the coupling the\n * section rules out, and backwards: it made the storage decide the interaction.\n * The inference is kept as a fallback for forms authored against it, below an\n * explicit `views`.\n */\n/** The time columns a picker may offer. */\ntype TimeView = 'hours' | 'minutes' | 'seconds';\n\n/**\n * Which time columns `views` asks for, or `undefined` to leave it to the\n * display format.\n *\n * The specification narrows `views` to a date-only array, but the convention\n * it comes from uses time views as well - a time picker defaults to\n * `['hours','minutes']` there, and a date-time picker to\n * `['year','day','hours','minutes']`. Honouring them costs nothing and means a\n * UI schema carrying `views: ['hours','minutes']` hides the seconds column\n * rather than being accepted and ignored.\n *\n * `undefined` rather than all-true when no time view is named: a picker\n * already derives its columns from the display format, and overriding that\n * with an explicit set would make `views: ['year']` on a time picker blank the\n * whole panel. An array naming no time view leaves the format in charge.\n *\n * Independent of the save format, as `views` is everywhere: asking for hours\n * and minutes does not stop seconds being stored.\n */\nexport const timePickerColumns = (\n views: unknown,\n):\n | { showHour: boolean; showMinute: boolean; showSecond: boolean }\n | undefined => {\n if (!Array.isArray(views)) {\n return undefined;\n }\n const wanted = views.filter(\n (view): view is TimeView =>\n view === 'hours' || view === 'minutes' || view === 'seconds',\n );\n if (wanted.length === 0) {\n return undefined;\n }\n return {\n showHour: wanted.includes('hours'),\n showMinute: wanted.includes('minutes'),\n showSecond: wanted.includes('seconds'),\n };\n};\n\nexport const datePickerMode = (\n views: unknown,\n saveFormat: string,\n): 'date' | 'month' | 'year' => {\n if (Array.isArray(views)) {\n const wanted = views.filter(\n (view): view is DateView =>\n view === 'year' || view === 'month' || view === 'day',\n );\n // The finest view the author asked for is the one the picker lands on.\n if (wanted.includes('day')) {\n return 'date';\n }\n if (wanted.includes('month')) {\n return 'month';\n }\n if (wanted.includes('year')) {\n return 'year';\n }\n }\n if (!saveFormat.includes('D')) {\n return saveFormat.includes('M') ? 'month' : 'year';\n }\n return 'date';\n};\n","import dayjs from 'dayjs';\nimport type {\n TemporalBounds,\n BoundPrecision,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalBounds';\nexport {\n temporalBounds,\n effectiveRestrict,\n resolveDataBounds,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalBounds';\nexport type {\n BoundPrecision,\n TemporalBounds,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalBounds';\nconst CLOCK_DAY = '2000-01-01';\n\n/** A `disabledDate` for antd, or undefined when nothing is bounded. */\nexport const disabledDateFor = (bounds: TemporalBounds) => {\n if (bounds.empty) {\n return () => true;\n }\n if (!bounds.min && !bounds.max) {\n return undefined;\n }\n return (current: dayjs.Dayjs) => outside(current, bounds, 'day');\n};\n\nconst range = (from: number, to: number): number[] => {\n const out: number[] = [];\n for (let value = from; value <= to; value += 1) {\n out.push(value);\n }\n return out;\n};\n\n/**\n * A `disabledTime` for antd.\n *\n * For a date-time the bounds only bite on the **boundary days** - the section\n * asks for exactly that, \"date-time bounds applied per boundary day\". On any\n * day strictly inside the range every hour is available, and on a day outside\n * it `disabledDate` has already removed the day itself.\n *\n * The parameter is **not** nullable, although at runtime it can be: antd\n * types it as `(date: DateType) => DisabledTimes`, and declaring\n * `DateType | null` makes TypeScript infer the picker's whole generic as\n * `Dayjs | null`. That then rejects the `onChange` handler beside it, whose\n * value is a plain `Dayjs` - an error that points at `onChange` and is caused\n * here. The runtime guard below stays, because a bare time picker really can\n * be called with nothing.\n */\nexport const disabledTimeFor = (\n bounds: TemporalBounds,\n timeOnly: boolean,\n precision: BoundPrecision,\n) => {\n if (!bounds.min && !bounds.max) {\n return undefined;\n }\n const useSeconds = precision === 'second';\n\n return (current: dayjs.Dayjs) => {\n const day = timeOnly\n ? dayjs(CLOCK_DAY).startOf('day')\n : // `current` is typed non-null and is not always supplied.\n (current ?? bounds.min ?? bounds.max)!.startOf('day');\n\n const lower =\n bounds.min && bounds.min.isSame(day, 'day') ? bounds.min : undefined;\n const upper =\n bounds.max && bounds.max.isSame(day, 'day') ? bounds.max : undefined;\n if (!lower && !upper) {\n return {};\n }\n\n const disabledHours = () => [\n ...(lower ? range(0, lower.hour() - 1) : []),\n ...(upper ? range(upper.hour() + 1, 23) : []),\n ];\n const disabledMinutes = (hour: number) => [\n ...(lower && hour === lower.hour() ? range(0, lower.minute() - 1) : []),\n ...(upper && hour === upper.hour() ? range(upper.minute() + 1, 59) : []),\n ];\n const disabledSeconds = (hour: number, minute: number) => [\n ...(lower && hour === lower.hour() && minute === lower.minute()\n ? range(0, lower.second() - 1)\n : []),\n ...(upper && hour === upper.hour() && minute === upper.minute()\n ? range(upper.second() + 1, 59)\n : []),\n ];\n\n return useSeconds\n ? { disabledHours, disabledMinutes, disabledSeconds }\n : { disabledHours, disabledMinutes };\n };\n};\n\n/** Whether a whole unit at `value` is outside the range. */\nconst outside = (\n value: dayjs.Dayjs,\n { min, max }: TemporalBounds,\n precision: BoundPrecision,\n): boolean =>\n (!!min && value.isBefore(min.startOf(precision))) ||\n (!!max && value.isAfter(max.startOf(precision)));\n","import type { CellProps, WithClassname } from '@jsonforms/core';\nimport { useJsonForms } from '@jsonforms/react';\nimport { useEffect, useMemo } from 'react';\nimport merge from 'lodash/merge';\nimport { createOnChangeHandler, getData } from '../util';\nimport {\n specDateSaveFormat,\n specDateTimeSaveFormat,\n specTimeSaveFormat,\n warnOnSaveFormat,\n} from '../util/temporalFormats';\nimport {\n disabledDateFor,\n disabledTimeFor,\n effectiveRestrict,\n resolveDataBounds,\n temporalBounds,\n} from '../util/temporalBounds';\nconst JSON_SCHEMA_DATE_FORMATS = ['YYYY-MM-DD'];\nconst JSON_SCHEMA_DATE_TIME_FORMATS = [\n 'YYYY-MM-DDTHH:mm:ss.SSSZ',\n 'YYYY-MM-DDTHH:mm:ss.SSS',\n 'YYYY-MM-DDTHH:mm:ssZ',\n 'YYYY-MM-DDTHH:mm:ss',\n];\nconst JSON_SCHEMA_TIME_FORMATS = [\n 'HH:mm:ss.SSSZ',\n 'HH:mm:ss.SSS',\n 'HH:mm:ssZ',\n 'HH:mm:ss',\n];\nconst defaults = {\n date: { formats: JSON_SCHEMA_DATE_FORMATS, saveFormat: specDateSaveFormat },\n dateTime: {\n formats: JSON_SCHEMA_DATE_TIME_FORMATS,\n saveFormat: specDateTimeSaveFormat,\n },\n time: { formats: JSON_SCHEMA_TIME_FORMATS, saveFormat: specTimeSaveFormat },\n};\nconst style = { width: '100%' };\n\nfunction defaultDisplayFormat(kind: keyof typeof defaults, ampm: unknown) {\n if (kind === 'date') return 'YYYY-MM-DD';\n if (kind === 'dateTime') return 'YYYY-MM-DD HH:mm';\n return ampm === true ? 'hh:mm a' : 'HH:mm';\n}\n\nexport function useTemporalPicker(\n props: CellProps & WithClassname,\n kind: keyof typeof defaults,\n) {\n const {\n config,\n uischema,\n schema,\n path,\n data,\n handleChange,\n enabled,\n isValid,\n id,\n className,\n } = props;\n const options = useMemo(\n () => merge({}, config, uischema.options),\n [config, uischema.options],\n );\n const rootData = useJsonForms().core?.data;\n const boundsSchema = useMemo(\n () => resolveDataBounds(schema as Record<string, unknown>, path, rootData),\n [schema, path, rootData],\n );\n const format =\n options[`${kind}Format`] ?? defaultDisplayFormat(kind, options.ampm);\n const saveFormat = options[`${kind}SaveFormat`] ?? defaults[kind].saveFormat;\n const formats = useMemo(\n () => [saveFormat, format, ...defaults[kind].formats],\n [saveFormat, format, kind],\n );\n useEffect(() => {\n warnOnSaveFormat(schema?.format, saveFormat);\n }, [schema?.format, saveFormat]);\n const value = useMemo(() => getData(data, formats), [data, formats]);\n const onChange = useMemo(\n () => createOnChangeHandler(path, handleChange, saveFormat),\n [path, handleChange, saveFormat],\n );\n const restrict = effectiveRestrict(uischema.options, config);\n const precision = format.includes('s') ? 'second' : 'minute';\n const bounds = useMemo(\n () =>\n temporalBounds(\n boundsSchema,\n formats,\n kind === 'date' ? 'day' : precision,\n kind === 'time',\n ),\n [boundsSchema, formats, kind, precision],\n );\n const disabledDate = useMemo(\n () => (restrict && kind !== 'time' ? disabledDateFor(bounds) : undefined),\n [bounds, restrict, kind],\n );\n const disabledTime = useMemo(\n () =>\n restrict && kind !== 'date'\n ? disabledTimeFor(bounds, kind === 'time', precision)\n : undefined,\n [bounds, kind, restrict, precision],\n );\n return {\n options,\n disabledDate,\n disabledTime,\n saveFormat,\n pickerProps: {\n value,\n onChange,\n format,\n allowClear: enabled,\n disabled: !enabled,\n className,\n id,\n autoFocus: options.focus,\n placeholder: options.placeholder,\n style,\n status: isValid ? undefined : ('error' as const),\n },\n };\n}\n","import type { Dayjs } from 'dayjs';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { DatePicker } from 'antd';\nimport React from 'react';\nimport { datePickerMode } from '../util/temporalFormats';\nimport { useTemporalPicker } from './useTemporalPicker';\n\nexport const AntdDatePicker = React.memo(function AntdDatePicker(\n props: CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<typeof DatePicker<Dayjs>>;\n },\n) {\n const { pickerProps, options, disabledDate, saveFormat } = useTemporalPicker(\n props,\n 'date',\n );\n return (\n <DatePicker<Dayjs>\n {...pickerProps}\n picker={datePickerMode(options.views, saveFormat)}\n disabledDate={disabledDate}\n {...props.inputProps}\n />\n );\n});\n","import type { Dayjs } from 'dayjs';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { DatePicker } from 'antd';\nimport React from 'react';\nimport { timePickerColumns } from '../util/temporalFormats';\nimport { useTemporalPicker } from './useTemporalPicker';\n\nexport const AntdDateTimePicker = React.memo(function AntdDateTimePicker(\n props: CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<typeof DatePicker<Dayjs>>;\n },\n) {\n const { pickerProps, options, disabledDate, disabledTime } =\n useTemporalPicker(props, 'dateTime');\n return (\n <DatePicker<Dayjs>\n {...pickerProps}\n disabledDate={disabledDate}\n disabledTime={disabledTime}\n /*\n The time half of `views`. The date half is not applied here: a\n date-time picker always offers a full date, and narrowing it to months\n would leave a value it cannot express.\n */\n showTime={timePickerColumns(options.views) ?? true}\n use12Hours={!!options.ampm}\n {...props.inputProps}\n />\n );\n});\n","import React from 'react';\nimport { useMixedScalar } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedScalar';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport merge from 'lodash/merge';\nimport { InputNumber } from 'antd';\nimport { toCommittableNumber, useDebouncedChange } from '../util';\nimport { AntdClearableInput } from './AntdClearableInput';\nimport { CLEAR_OFFSET_WITH_HANDLES } from './AntdClearValueButton';\n\nexport type AntdNumericInputProps = CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<typeof InputNumber>;\n };\n\nexport const AntdNumericInput = React.memo(function AntdNumericInput(\n props: AntdNumericInputProps & { integerOnly?: boolean },\n) {\n const {\n data,\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange: originalHandleChange,\n config,\n inputProps,\n } = props;\n const keepSelectedType = useMixedScalar(path);\n const handleChange = React.useCallback(\n (target: string, value: any) =>\n originalHandleChange(\n target,\n keepSelectedType && value === undefined ? 0 : value,\n ),\n [originalHandleChange, keepSelectedType],\n );\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const inputStyle = { width: '100%' };\n\n const [inputValue, onChange, onClear] = useDebouncedChange(\n handleChange,\n keepSelectedType ? 0 : '',\n data,\n path,\n toCommittableNumber,\n );\n return (\n // The clear button sits over the control rather than in antd's suffix,\n // because `Form.Item` feedback replaces that slot instead of composing with\n // it - so an errored field would lose its clear button. The wider offset\n // keeps it clear of the stepper handles antd reveals on hover.\n <AntdClearableInput\n clearable={appliedUiSchemaOptions.clearable !== false}\n data={data}\n enabled={enabled}\n offset={CLEAR_OFFSET_WITH_HANDLES}\n onClear={onClear}\n >\n <InputNumber\n value={inputValue}\n // antd reports a cleared field as null. Routing that through onClear\n // rather than the debounced path commits it at once and cancels any\n // queued keystroke, so an old callback cannot restore the value.\n onChange={(value) =>\n value === null || value === undefined\n ? onClear()\n : !props.integerOnly || Number.isInteger(Number(value))\n ? onChange(value as never)\n : undefined\n }\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n step={props.integerOnly ? undefined : 0.1}\n style={inputStyle}\n placeholder={appliedUiSchemaOptions.placeholder}\n {...inputProps}\n />\n </AntdClearableInput>\n );\n});\n","import React from 'react';\nimport {\n AntdNumericInput,\n type AntdNumericInputProps,\n} from './AntdNumericInput';\n\nexport const AntdInputInteger: React.NamedExoticComponent<AntdNumericInputProps> =\n React.memo(function AntdInputInteger(props: AntdNumericInputProps) {\n return <AntdNumericInput {...props} integerOnly />;\n });\n","import React from 'react';\nimport {\n AntdNumericInput,\n type AntdNumericInputProps,\n} from './AntdNumericInput';\n\nexport const AntdInputNumber: React.NamedExoticComponent<AntdNumericInputProps> =\n React.memo(function AntdInputNumber(props: AntdNumericInputProps) {\n return <AntdNumericInput {...props} />;\n });\n","import { CellProps, Formatted, WithClassname } from '@jsonforms/core';\nimport { Input } from 'antd';\nimport merge from 'lodash/merge';\nimport React from 'react';\nimport { AntdClearableInput } from './AntdClearableInput';\n\nexport const AntdInputNumberFormat = (\n props: CellProps &\n WithClassname &\n Formatted<number> & {\n inputProps?: React.ComponentProps<typeof Input | typeof Input.TextArea>;\n },\n) => {\n const {\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange,\n schema,\n config,\n inputProps,\n } = props;\n const maxLength = schema.maxLength;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const formattedNumber = props.toFormatted(props.data);\n\n const onChange = (ev: any) => {\n const validStringNumber = props.fromFormatted(ev.currentTarget.value);\n handleChange(path, validStringNumber);\n };\n\n let InputComponent: React.ComponentType<any> = Input;\n\n if (appliedUiSchemaOptions.multi === true) {\n InputComponent = Input.TextArea;\n }\n\n const inputStyle = { width: '100%' };\n\n return (\n <AntdClearableInput\n clearable={appliedUiSchemaOptions.clearable !== false}\n data={props.data}\n enabled={enabled}\n onClear={() => handleChange(path, undefined)}\n >\n <InputComponent\n value={formattedNumber}\n onChange={onChange}\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n placeholder={appliedUiSchemaOptions.placeholder}\n maxLength={maxLength}\n style={inputStyle}\n {...inputProps}\n />\n </AntdClearableInput>\n );\n};\n","import { useMixedScalar } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedScalar';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { AutoComplete, AutoCompleteProps, Input } from 'antd';\nimport every from 'lodash/every';\nimport isArray from 'lodash/isArray';\nimport isString from 'lodash/isString';\nimport merge from 'lodash/merge';\nimport React, { CSSProperties } from 'react';\nimport { useDebouncedChange, useFocus } from '../util';\nimport { AntdClearableInput } from './AntdClearableInput';\n\nconst eventToValue = (ev: any) => {\n if (ev.target) {\n return ev.target.value === '' ? undefined : ev.target.value;\n }\n return ev === '' ? undefined : ev;\n};\n\ntype ElementType<T> = T extends (infer U)[] ? U : never;\ntype AutoCompleteOption = ElementType<AutoCompleteProps['options']>;\n\nexport const AntdInputText = React.memo(function AntdInputText(\n props: CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<\n | typeof Input\n | typeof Input.TextArea\n | typeof Input.Password\n | typeof AutoComplete\n >;\n },\n) {\n const [focused, onFocus, onBlur] = useFocus();\n\n const {\n data,\n config,\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange: originalHandleChange,\n schema,\n inputProps,\n } = props;\n const keepEmptyString = useMixedScalar(path);\n const handleChange = React.useCallback(\n (target: string, value: any) =>\n originalHandleChange(\n target,\n keepEmptyString && value === undefined ? '' : value,\n ),\n [originalHandleChange, keepEmptyString],\n );\n const maxLength = schema.maxLength;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n\n const [inputText, onChange, onClear] = useDebouncedChange(\n handleChange,\n '',\n data,\n path,\n eventToValue,\n );\n\n let InputComponent: React.ComponentType<any> = Input;\n\n const specificProps: Record<string, any> = {};\n\n const suggestions = appliedUiSchemaOptions?.suggestion;\n\n if (isArray(suggestions) && every(suggestions, isString)) {\n const options: AutoCompleteOption[] = (suggestions as string[]).map(\n (suggestion) => ({ value: suggestion }),\n );\n InputComponent = AutoComplete;\n\n (specificProps as AutoCompleteProps).options = options;\n (specificProps as AutoCompleteProps).filterOption = true;\n (specificProps as AutoCompleteProps).popupMatchSelectWidth = true;\n }\n\n const inputStyle: CSSProperties = { width: '100%' };\n\n if (appliedUiSchemaOptions.multi) {\n inputStyle.resize = 'vertical';\n inputStyle.overflow = 'auto';\n InputComponent = Input.TextArea;\n\n specificProps.rows = 5;\n specificProps.autoSize = { minRows: 5, maxRows: 5 };\n }\n\n return (\n <AntdClearableInput\n clearable={appliedUiSchemaOptions.clearable !== false}\n data={data}\n enabled={enabled}\n onClear={onClear}\n >\n <InputComponent\n value={inputText}\n onChange={onChange}\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n style={inputStyle}\n maxLength={maxLength}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={appliedUiSchemaOptions.placeholder}\n count={\n maxLength !== undefined\n ? { max: maxLength, show: focused }\n : undefined\n }\n {...specificProps}\n {...inputProps}\n />\n </AntdClearableInput>\n );\n});\n","import React from 'react';\nimport { CellProps, OwnPropsOfEnum, WithClassname } from '@jsonforms/core';\nimport { Flex, Radio } from 'antd';\nimport isEqual from 'lodash/isEqual';\n\nexport const AntdRadioGroup = React.memo(function AntdRadioGroup(\n props: CellProps &\n WithClassname &\n OwnPropsOfEnum & {\n inputProps?: React.ComponentProps<typeof Radio.Group>;\n },\n) {\n const {\n data,\n options = [],\n handleChange,\n path,\n enabled,\n uischema,\n inputProps,\n } = props;\n /*\n `options.vertical` is the single orientation encoding for a radio group:\n false (the default) arranges the choices in a row that may wrap, true\n stacks them. The orientation is also announced, so assistive technology\n describes the arrangement that is actually on screen.\n */\n const vertical =\n (uischema.options?.vertical ??\n props.config?.jsonformsExtended?.radio?.vertical ??\n false) === true;\n\n return (\n <Radio.Group\n aria-orientation={vertical ? 'vertical' : 'horizontal'}\n disabled={!enabled}\n value={(options || []).findIndex((option) => isEqual(option.value, data))}\n // Guarded as well as disabled: the specification requires mutation\n // handlers to enforce the same rules as the visible state, so that\n // neither a keyboard path nor a caller-supplied `inputProps.disabled`\n // override can commit a change to a read-only control.\n onChange={(e: any) => {\n if (!enabled) {\n return;\n }\n handleChange(path, options[e.target.value].value);\n }}\n {...inputProps}\n >\n <Flex gap={vertical ? 4 : 8} vertical={vertical} wrap={!vertical}>\n {(options || []).map((option, index) => (\n // UI tokens stay separate from JSON values and translated labels.\n <Radio value={index} key={index}>\n {option.label}\n </Radio>\n ))}\n </Flex>\n </Radio.Group>\n );\n});\n","import React, { useMemo } from 'react';\nimport { EnumCellProps, WithClassname } from '@jsonforms/core';\n\nimport { Select } from 'antd';\nimport merge from 'lodash/merge';\nimport isEqual from 'lodash/isEqual';\nimport { useI18nDefault } from '../util';\nimport { TranslateProps } from '@jsonforms/react';\n\nexport const AntdSelect = (\n props: EnumCellProps &\n WithClassname &\n TranslateProps & { inputProps?: React.ComponentProps<typeof Select> },\n) => {\n const {\n data,\n className,\n id,\n enabled,\n schema,\n uischema,\n path,\n handleChange,\n options = [],\n config,\n inputProps,\n t,\n } = props;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n /*\n The default message carries the locale bundle (§6.5), so it must not be\n read straight out of the English table.\n */\n const d = useI18nDefault();\n const noneOptionLabel = useMemo(\n () => t('enum.none', d('enum.none'), { schema, uischema, path }),\n [t, d, schema, uischema, path],\n );\n\n const selectedIndex = options.findIndex((option) =>\n isEqual(option.value, data),\n );\n\n const selectStyle = { width: '100%' };\n\n /*\n `options.autocomplete` is the portable encoding for searchable finite\n choices. **This family defaults to off**, which the specification permits -\n \"preserves the renderer family's documented default. No universal default\n is imposed\" - and which differs from Material, where searching is the\n default. See Adjustment 16.\n\n Only `true` turns it on, so `false` and absence behave alike; the\n distinction matters only against a global config that switched it on.\n */\n const searchable = appliedUiSchemaOptions.autocomplete === true;\n\n return (\n <Select\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n value={selectedIndex < 0 ? undefined : selectedIndex}\n onChange={(index) => {\n if (enabled) {\n handleChange(\n path,\n typeof index === 'number' ? options[index]?.value : undefined,\n );\n }\n }}\n style={selectStyle}\n placeholder={appliedUiSchemaOptions.placeholder ?? noneOptionLabel}\n allowClear={enabled}\n /*\n The specification requires a searchable renderer to say how the query\n filters: here, a case-insensitive substring of the **label** - what the\n reader can actually see, which for a constant-based `oneOf` is the\n branch title rather than the stored constant. Matching the value would\n mean searching for `eng` to find \"Engineering\".\n\n Configured through the `showSearch` object; antd 6 deprecated the flat\n `optionFilterProp` / `filterOption` props in favour of it.\n */\n showSearch={\n searchable\n ? {\n optionFilterProp: 'label',\n filterOption: (input, option) =>\n String(option?.label ?? '')\n .toLowerCase()\n .includes(input.toLowerCase()),\n }\n : false\n }\n notFoundContent={\n searchable\n ? t('enum.noMatches', d('enum.noMatches'), {\n schema,\n uischema,\n path,\n })\n : undefined\n }\n // `options` rather than `<Select.Option>` children: the component form is\n // deprecated in antd 6, and it also keyed each entry by its value, which\n // collides when two choices share one.\n options={options.map(({ label }, index) => ({ value: index, label }))}\n {...inputProps}\n />\n );\n};\n","import React from 'react';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { Slider } from 'antd';\nimport merge from 'lodash/merge';\nimport { useI18n } from '../util/translate';\n\n/**\n * A slider position for a value, or the fallback when there is nothing usable.\n *\n * Type-checked rather than truthy: `0` is a real value and must survive.\n * `Number(data || schema.default)` turned a committed `0` into the default -\n * the data said 0 while the knob sat at 10 - which section 18 forbids:\n * \"Zero is a real current value and must not be replaced by a default through\n * a truthiness fallback.\"\n *\n * Strings are tolerated so incoming `\"25\"` still positions the thumb, but an\n * empty or unparseable one falls back rather than becoming `Number('')` = 0.\n */\nexport const resolveSliderValue = (\n value: unknown,\n fallback: number,\n): number => {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim() !== '') {\n const parsed = Number(value);\n if (Number.isFinite(parsed)) {\n return parsed;\n }\n }\n return fallback;\n};\n\n/** Whether the control holds a value at all, as opposed to showing a fallback. */\nexport const hasSliderValue = (value: unknown): boolean =>\n (typeof value === 'number' && Number.isFinite(value)) ||\n (typeof value === 'string' &&\n value.trim() !== '' &&\n Number.isFinite(Number(value)));\n\nexport const AntdSlider = React.memo(function AntdSlider(\n props: CellProps &\n WithClassname & { inputProps?: React.ComponentProps<typeof Slider> },\n) {\n const {\n data,\n id,\n enabled,\n uischema,\n path,\n handleChange,\n config,\n schema,\n inputProps,\n } = props;\n const t = useI18n();\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n\n const sliderStyle: { [x: string]: any } = {\n marginTop: '7px',\n };\n\n // data -> schema.default -> schema.minimum -> 0, each checked rather than\n // trusted: the range tester requires a default, but not that it is a number.\n const committed = hasSliderValue(data);\n const effectiveValue = resolveSliderValue(\n data,\n resolveSliderValue(schema.default, schema.minimum ?? 0),\n );\n\n const marks = {\n [schema.minimum!]: {\n label: schema.minimum,\n style: { whiteSpace: 'nowrap' as const },\n },\n [schema.maximum!]: {\n label: schema.maximum,\n style: { whiteSpace: 'nowrap' as const },\n },\n };\n\n return (\n <Slider\n id={id}\n style={sliderStyle}\n min={schema.minimum}\n max={schema.maximum}\n marks={marks}\n value={effectiveValue as any}\n /*\n Missing data may borrow the default's position, but the spec requires\n it to be \"visibly and accessibly identified as Not set until edited\",\n so it must not be announced as a committed number.\n\n Through antd's own prop, not `aria-valuetext`: the announcement\n belongs on the **handle**, which is what carries `aria-valuenow`, and\n antd does not forward the bare attribute to it. Set as an attribute on\n the control it never reached the DOM at all, so the number was\n announced unqualified.\n */\n ariaValueTextFormatterForHandle={\n committed ? undefined : () => t('control.notSet')\n }\n onChange={(value: any) => {\n handleChange(path, Number(value));\n }}\n disabled={!enabled}\n step={schema.multipleOf || 1}\n autoFocus={!!appliedUiSchemaOptions.focus}\n {...inputProps}\n ></Slider>\n );\n});\n","import { CellProps, WithClassname } from '@jsonforms/core';\nimport { TimePicker } from 'antd';\nimport React from 'react';\nimport { timePickerColumns } from '../util/temporalFormats';\nimport { useTemporalPicker } from './useTemporalPicker';\n\nexport const AntdTimePicker = React.memo(function AntdTimePicker(\n props: CellProps &\n WithClassname & { inputProps?: React.ComponentProps<typeof TimePicker> },\n) {\n const { pickerProps, options, disabledTime } = useTemporalPicker(\n props,\n 'time',\n );\n return (\n <TimePicker\n {...pickerProps}\n disabledTime={disabledTime}\n // `views` picks the columns; absent, the display format still decides.\n {...timePickerColumns(options.views)}\n use12Hours={!!options.ampm}\n {...props.inputProps}\n />\n );\n});\n","import React from 'react';\nimport { CellProps, WithClassname } from '@jsonforms/core';\nimport { Switch } from 'antd';\nimport merge from 'lodash/merge';\nimport { useI18n } from '../util/translate';\nimport { visuallyHidden } from '../util/visuallyHidden';\n\nexport const AntdToggle = React.memo(function AntdToggle(\n props: CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<typeof Switch> & React.AriaAttributes;\n },\n) {\n const {\n data,\n id,\n className,\n enabled,\n uischema,\n path,\n handleChange,\n config,\n inputProps,\n } = props;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const t = useI18n();\n /*\n A switch cannot show an indeterminate state, so the specification asks for\n an accessible \"Not set\" indication instead. `!!data` additionally rendered\n the string `'false'` as on; only a real `true` is on.\n */\n const committed = typeof data === 'boolean';\n const stateId = `${id}-state`;\n // Composed, not assigned: InputControl passes its help id through\n // `inputProps`, which is spread after our props and would otherwise replace\n // this one - leaving the state unannounced.\n const describedBy =\n [\n (inputProps as { 'aria-describedby'?: string } | undefined)?.[\n 'aria-describedby'\n ],\n committed ? undefined : stateId,\n ]\n .filter(Boolean)\n .join(' ') || undefined;\n\n return (\n <>\n <Switch\n id={id}\n checked={data === true}\n onChange={(isChecked) => handleChange(path, isChecked)}\n className={className}\n disabled={!enabled}\n autoFocus={!!appliedUiSchemaOptions.focus}\n {...inputProps}\n aria-describedby={describedBy}\n />\n {committed ? null : (\n <span id={stateId} style={visuallyHidden}>\n {t(\n typeof data === 'undefined' || data === null\n ? 'boolean.notSet'\n : 'boolean.invalid',\n )}\n </span>\n )}\n </>\n );\n});\n","import { CellProps, WithClassname } from '@jsonforms/core';\nimport { Input } from 'antd';\nimport merge from 'lodash/merge';\nimport React, { useState } from 'react';\nimport { useDebouncedChange } from '../util';\nimport { AntdClearableInput } from './AntdClearableInput';\nimport { AntdRevealButton } from './AntdRevealButton';\n\nconst eventToValue = (ev: any) =>\n ev.target.value === '' ? undefined : ev.target.value;\n\nexport const AntdPassword = React.memo(function AntdPassword(\n props: CellProps &\n WithClassname & {\n inputProps?: React.ComponentProps<typeof Input>;\n },\n) {\n const {\n data,\n config,\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange,\n schema,\n inputProps,\n } = props;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const [inputText, onChange, onClear] = useDebouncedChange(\n handleChange,\n '',\n data,\n path,\n eventToValue,\n );\n /*\n Reveal state is local runtime state. The specification is explicit that\n toggling \"must not write form data, trigger a value-change event, alter\n validation, or mark the value dirty\", and that it is \"never serialized into\n data or UI schema\".\n */\n const [revealed, setRevealed] = useState(false);\n\n return (\n <AntdClearableInput\n clearable={appliedUiSchemaOptions.clearable !== false}\n data={data}\n enabled={enabled}\n onClear={onClear}\n >\n {/*\n The clear and reveal controls both go in antd's `suffix` slot. An\n overlaid clear button landed on top of the reveal icon, and the\n `Form.Item` error icon on top of both - three icons in one corner.\n `Input` *composes* `suffix` with the feedback icon\n (`<>{suffix}{hasFeedback && feedbackIcon}</>`) rather than replacing it,\n as `InputNumber` does, so the slot yields clear / reveal / error laid\n out by antd and correct whether or not the value is currently invalid.\n Clear comes first so its conditional appearance does not move the\n persistent reveal control or leave a gap when hidden.\n */}\n {(clear) => (\n <Input\n /*\n A plain `Input` with our own toggle, not `Input.Password`.\n\n antd 6's `Input.Password` wraps whatever `iconRender` returns in a\n `span` that is itself `role=\"button\"`, focusable, and labelled from\n antd's own locale - so putting a real button inside it, which is\n what the accessible name has to live on, nested one interactive\n element inside another: two tab stops for one action, and two\n different names for it (\"Show\" from antd, \"Show password\" from the\n form's translator).\n\n Owning the toggle keeps one control, one name, and that name coming\n from the JSON Forms translator like every other rendered string.\n All `Input.Password` does beyond this is swap the input type, which\n is one line.\n */\n type={revealed ? 'text' : 'password'}\n suffix={\n <>\n {clear}\n <AntdRevealButton\n revealed={revealed}\n onToggle={() => setRevealed((shown) => !shown)}\n disabled={!enabled}\n />\n </>\n }\n value={inputText}\n onChange={onChange}\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n maxLength={schema.maxLength}\n placeholder={appliedUiSchemaOptions.placeholder}\n {...inputProps}\n />\n )}\n </AntdClearableInput>\n );\n});\n","import { getControlHelp } from '@chobantonov/jsonforms-react-renderer-common/controls/controlHelp';\nimport { ControlProps } from '@jsonforms/core';\nimport React, { useCallback } from 'react';\nimport { InputAdornments } from '@chobantonov/jsonforms-react-renderer-common/controls/inputAdornments';\n\nimport { AntdCheckbox } from '../antd-controls';\nimport { ControlFormItem, useCellMode } from '../util';\nimport { usePreTouchErrors } from '../util/preTouchErrors';\nimport {\n clearedDynamicPropertyValue,\n useDynamicProperty,\n} from '../util/dynamicProperties';\n\nexport interface WithInput {\n input: any;\n}\n\nexport const InputControl = (props: ControlProps & WithInput) => {\n const cell = useCellMode();\n const { id, label, visible, required, input, handleChange } = props;\n /*\n Replaces `useFocus`: the same focus state, plus the touch state pre-touch\n error filtering needs, and the filtered message. With filtering off this\n returns `props.errors` unchanged.\n */\n const { errors, focused, onFocus, onBlur } = usePreTouchErrors(props);\n const isValid = errors.length === 0;\n const preserveDynamicPropertyKey = useDynamicProperty(props.path);\n const handleInputChange = useCallback(\n (changedPath: string, value: unknown) => {\n handleChange(\n changedPath,\n preserveDynamicPropertyKey &&\n changedPath === props.path &&\n value === undefined\n ? clearedDynamicPropertyValue(props.schema, props.rootSchema)\n : value,\n );\n },\n [\n preserveDynamicPropertyKey,\n handleChange,\n props.path,\n props.rootSchema,\n props.schema,\n ],\n );\n\n const help = getControlHelp({ ...props, errors }, focused);\n\n const helpId = help ? `${id}-input-help` : undefined;\n\n const InnerComponent = input;\n const style = { width: '100%' };\n\n if (!visible) {\n return null;\n }\n\n return (\n <ControlFormItem\n hideRequiredAsterisk={props.uischema.options?.hideRequiredAsterisk}\n path={props.path}\n required={required}\n errors={isValid ? undefined : errors}\n label={\n input !== AntdCheckbox && props.uischema.label !== false ? label : ''\n }\n help={help ? <span id={helpId}>{help}</span> : null}\n style={style}\n htmlFor={id + '-input'}\n id={id}\n >\n <InputAdornments\n schema={props.schema}\n options={props.uischema.options as Record<string, unknown>}\n >\n <InnerComponent\n {...props}\n handleChange={handleInputChange}\n label={cell || props.uischema.label === false ? '' : label}\n inputProps={{\n onFocus,\n onBlur,\n 'aria-describedby': helpId,\n }}\n id={id + '-input'}\n isValid={isValid}\n visible={visible}\n />\n </InputAdornments>\n </ControlFormItem>\n );\n};\n","import {\n and,\n ControlProps,\n ControlState,\n EnumCellProps,\n JsonSchema,\n RankedTester,\n rankWith,\n schemaMatches,\n uiTypeIs,\n WithClassname,\n} from '@jsonforms/core';\nimport { Control, withJsonFormsControlProps } from '@jsonforms/react';\nimport merge from 'lodash/merge';\nimport React, { useMemo, useState } from 'react';\nimport { useDebouncedChange } from '../util';\nimport { InputControl } from './InputControl';\nimport { AutoComplete } from 'antd';\n\ninterface AutoCompleteOption {\n value: string;\n}\n\nconst findEnumSchema = (schemas: JsonSchema[]) =>\n schemas.find(\n (s) =>\n s.enum !== undefined && (s.type === 'string' || s.type === undefined),\n );\nconst findTextSchema = (schemas: JsonSchema[]) =>\n schemas.find((s) => s.type === 'string' && s.enum === undefined);\n\nconst AntdAutocompleteInputText = (props: EnumCellProps & WithClassname) => {\n const {\n data,\n config,\n className,\n id,\n enabled,\n uischema,\n path,\n handleChange,\n schema,\n } = props;\n const enumSchema = findEnumSchema(schema.anyOf ?? []);\n const stringSchema = findTextSchema(schema.anyOf ?? []);\n const maxLength = stringSchema?.maxLength;\n const appliedUiSchemaOptions = useMemo(\n () => merge({}, config, uischema.options),\n [config, uischema.options],\n );\n const options: AutoCompleteOption[] = (enumSchema?.enum ?? []).map(\n (value) => ({\n value,\n }),\n );\n const [filteredOptions, setFilteredOptions] =\n useState<AutoCompleteOption[]>(options);\n const [inputText, onChange] = useDebouncedChange(\n handleChange,\n '',\n data,\n path,\n (ev: any) => ev || undefined,\n );\n const onSearch = (searchText: string) => {\n setFilteredOptions(\n !searchText\n ? options\n : options.filter((option) =>\n option.value.toLowerCase().includes(searchText),\n ),\n );\n };\n const inputStyle = { width: '100%' };\n return (\n <AutoComplete\n value={inputText}\n onSearch={onSearch}\n onChange={onChange}\n onSelect={onChange}\n options={filteredOptions}\n className={className}\n id={id}\n disabled={!enabled}\n autoFocus={appliedUiSchemaOptions.focus}\n maxLength={maxLength}\n style={inputStyle}\n allowClear={enabled}\n />\n );\n};\n\nexport class AnyOfStringOrEnumControl extends Control<\n ControlProps,\n ControlState\n> {\n render() {\n return <InputControl {...this.props} input={AntdAutocompleteInputText} />;\n }\n}\nconst hasEnumAndText = (schemas: JsonSchema[]) => {\n // idea: map to type,enum and check that all types are string and at least one item is of type enum,\n const enumSchema = findEnumSchema(schemas);\n const stringSchema = findTextSchema(schemas);\n const remainingSchemas = schemas.filter(\n (s) => s !== enumSchema || s !== stringSchema,\n );\n const wrongType = remainingSchemas.find((s) => s.type && s.type !== 'string');\n return !!enumSchema && !!stringSchema && !wrongType;\n};\nconst simpleAnyOf = and(\n uiTypeIs('Control'),\n schemaMatches(\n (schema) =>\n Object.prototype.hasOwnProperty.call(schema, 'anyOf') &&\n hasEnumAndText(schema.anyOf ?? []),\n ),\n);\nexport const anyOfStringOrEnumControlTester: RankedTester = rankWith(\n 5,\n simpleAnyOf,\n);\nexport default withJsonFormsControlProps(AnyOfStringOrEnumControl);\n","import React from 'react';\nimport {\n isBooleanControl,\n RankedTester,\n rankWith,\n ControlProps,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { AntdCheckbox } from '../antd-controls/AntdCheckbox';\nimport { InputControl } from './InputControl';\n\nexport const BooleanControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdCheckbox} />\n);\n\nexport const booleanControlTester: RankedTester = rankWith(2, isBooleanControl);\nexport default withJsonFormsControlProps(BooleanControl);\n","import {\n ControlProps,\n RankedTester,\n and,\n isBooleanControl,\n optionIs,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdToggle } from '../antd-controls/AntdToggle';\n\nimport { InputControl } from './InputControl';\n\nexport const BooleanToggleControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdToggle} />\n);\n\nexport const booleanToggleControlTester: RankedTester = rankWith(\n 3,\n and(isBooleanControl, optionIs('toggle', true)),\n);\n\nexport default withJsonFormsControlProps(BooleanToggleControl);\n","import {\n ControlProps,\n RankedTester,\n isDateControl,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdDatePicker } from '../antd-controls/AntdDatePicker';\n\nimport { InputControl } from './InputControl';\n\nexport const DateControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdDatePicker} />\n);\n\nexport const dateControlTester: RankedTester = rankWith(4, isDateControl);\n\nexport default withJsonFormsControlProps(DateControl);\n","import {\n ControlProps,\n RankedTester,\n isDateTimeControl,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdDateTimePicker } from '../antd-controls/AntdDateTimePicker';\n\nimport { InputControl } from './InputControl';\n\nexport const DateTimeControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdDateTimePicker} />\n);\n\nexport const dateTimeControlTester: RankedTester = rankWith(\n 2,\n isDateTimeControl,\n);\n\nexport default withJsonFormsControlProps(DateTimeControl);\n","import {\n ControlProps,\n isEnumControl,\n OwnPropsOfEnum,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsEnumProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport React from 'react';\nimport { AntdSelect } from '../antd-controls/AntdSelect';\nimport { InputControl } from './InputControl';\n\nexport const EnumControl = (\n props: ControlProps & OwnPropsOfEnum & TranslateProps,\n) => {\n return <InputControl {...props} input={AntdSelect} />;\n};\n\nexport const enumControlTester: RankedTester = rankWith(2, isEnumControl);\n\n// HOC order can be reversed with https://github.com/eclipsesource/jsonforms/issues/1987\nexport default withJsonFormsEnumProps(\n withTranslateProps(React.memo(EnumControl)),\n false,\n);\n","import React from 'react';\nimport {\n ControlProps,\n isIntegerControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { AntdInputInteger } from '../antd-controls/AntdInputInteger';\nimport { InputControl } from './InputControl';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\n\nexport const IntegerControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdInputInteger} />\n);\nexport const integerControlTester: RankedTester = rankWith(2, isIntegerControl);\nexport default withJsonFormsControlProps(IntegerControl);\n","import { getControlHelp } from '@chobantonov/jsonforms-react-renderer-common/controls/controlHelp';\nimport { ControlFormItem, useDebouncedChange } from '../util';\nimport { usePreTouchErrors } from '../util/preTouchErrors';\nimport React from 'react';\nimport {\n ControlProps,\n isDateControl,\n isTimeControl,\n or,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport merge from 'lodash/merge';\nimport { Input } from 'antd';\n\nexport const NativeControl = (props: ControlProps) => {\n const {\n id,\n label,\n schema,\n enabled,\n visible,\n required,\n path,\n handleChange,\n data,\n config,\n } = props;\n // See `usePreTouchErrors`; with filtering off this is `props.errors`.\n const { errors, focused, onFocus, onBlur } = usePreTouchErrors(props);\n const isValid = errors.length === 0;\n const appliedUiSchemaOptions = merge({}, config, props.uischema.options);\n const [inputValue, onChange] = useDebouncedChange(\n handleChange,\n '',\n data,\n path,\n );\n const fieldType = appliedUiSchemaOptions.format ?? schema.format;\n const help = getControlHelp({ ...props, errors }, focused);\n\n const inputStyle = { width: '100%' };\n\n if (!visible) {\n return null;\n }\n\n return (\n <ControlFormItem\n hideRequiredAsterisk={props.uischema.options?.hideRequiredAsterisk}\n path={props.path}\n errors={!isValid ? errors : undefined}\n required={required}\n label={label}\n help={help}\n htmlFor={id + '-input'}\n id={id}\n >\n <Input\n id={id + '-input'}\n type={fieldType}\n disabled={!enabled}\n style={inputStyle}\n onFocus={onFocus}\n onBlur={onBlur}\n value={inputValue}\n onChange={onChange}\n />\n </ControlFormItem>\n );\n};\n\nexport const nativeControlTester: RankedTester = rankWith(\n 2,\n or(isDateControl, isTimeControl),\n);\n\nexport default withJsonFormsControlProps(NativeControl);\n","import React from 'react';\nimport {\n ControlProps,\n isNumberControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { AntdInputNumber } from '../antd-controls/AntdInputNumber';\nimport { InputControl } from './InputControl';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\n\nexport const NumberControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdInputNumber} />\n);\n\nexport const numberControlTester: RankedTester = rankWith(2, isNumberControl);\n\nexport default withJsonFormsControlProps(NumberControl);\n","import {\n ControlProps,\n isOneOfEnumControl,\n OwnPropsOfEnum,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsOneOfEnumProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport React from 'react';\nimport { AntdSelect } from '../antd-controls/AntdSelect';\nimport { InputControl } from './InputControl';\n\nexport const OneOfEnumControl = (\n props: ControlProps & OwnPropsOfEnum & TranslateProps,\n) => {\n return <InputControl {...props} input={AntdSelect} />;\n};\n\nexport const oneOfEnumControlTester: RankedTester = rankWith(\n 5,\n isOneOfEnumControl,\n);\n\n// HOC order can be reversed with https://github.com/eclipsesource/jsonforms/issues/1987\nexport default withJsonFormsOneOfEnumProps(\n withTranslateProps(React.memo(OneOfEnumControl)),\n false,\n);\n","import { ControlProps } from '@jsonforms/core';\nimport React from 'react';\nimport { AntdRadioGroup } from '../antd-controls/AntdRadioGroup';\nimport { InputControl } from './InputControl';\n\nexport const RadioGroup = (props: ControlProps) => (\n <InputControl {...props} input={AntdRadioGroup} />\n);\n","import React from 'react';\nimport {\n and,\n ControlProps,\n isOneOfEnumControl,\n optionIs,\n OwnPropsOfEnum,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsOneOfEnumProps } from '@jsonforms/react';\nimport { RadioGroup } from './RadioGroup';\n\nexport const OneOfRadioGroupControl = (\n props: ControlProps & OwnPropsOfEnum,\n) => {\n return <RadioGroup {...props} />;\n};\n\nexport const oneOfRadioGroupControlTester: RankedTester = rankWith(\n 20,\n and(isOneOfEnumControl, optionIs('format', 'radio')),\n);\n\nexport default withJsonFormsOneOfEnumProps(OneOfRadioGroupControl);\n","import React from 'react';\nimport {\n and,\n ControlProps,\n isEnumControl,\n optionIs,\n OwnPropsOfEnum,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsEnumProps } from '@jsonforms/react';\nimport { RadioGroup } from './RadioGroup';\nexport const RadioGroupControl = (props: ControlProps & OwnPropsOfEnum) => {\n return <RadioGroup {...props} />;\n};\n\nexport const radioGroupControlTester: RankedTester = rankWith(\n 20,\n and(isEnumControl, optionIs('format', 'radio')),\n);\nexport default withJsonFormsEnumProps(RadioGroupControl);\n","import {\n ControlProps,\n RankedTester,\n isRangeControl,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\n\nimport { AntdSlider } from '../antd-controls/AntdSlider';\nimport { InputControl } from './InputControl';\n\nexport const SliderControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdSlider} />\n);\n\nexport const sliderControlTester: RankedTester = rankWith(4, isRangeControl);\n\nexport default withJsonFormsControlProps(SliderControl);\n","import {\n and,\n ControlProps,\n formatIs,\n isStringControl,\n optionIs,\n or,\n RankedTester,\n rankWith,\n Tester,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdPassword } from '../antd-controls/AntdPassword';\nimport { InputControl } from './InputControl';\n\nconst PasswordControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdPassword} />\n);\n\n/**\n * A string this project treats as a password, by **either** path, as section 5\n * requires: schema `format` describes the data, UI `options.format` requests\n * the presentation without changing the schema. Supporting only the schema\n * format - which is what the string control used to do - leaves\n * `options.format: \"password\"` on a plain string rendering in clear text.\n *\n * Exported so the OTP variant selects on exactly the same predicate; a value\n * that is a password with `variant: \"otp\"` must not stop being a password\n * because of how it is drawn.\n */\nexport const isPasswordControl: Tester = and(\n isStringControl,\n or(formatIs('password'), optionIs('format', 'password')),\n);\n\n/** Ranked above the string control so it wins for a string that asks for it. */\nexport const passwordControlTester: RankedTester = rankWith(\n 4,\n isPasswordControl,\n);\n\nexport default withJsonFormsControlProps(PasswordControl);\n","import {\n and,\n ControlProps,\n optionIs,\n RankedTester,\n rankWith,\n schemaMatches,\n Tester,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdOtp, otpLength } from '../antd-controls/AntdOtp';\nimport { InputControl } from './InputControl';\nimport { isPasswordControl } from './PasswordControl';\n\nconst PasswordOtpControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdOtp} />\n);\n\n/**\n * The schema must bound the length before a segmented editor is drawn.\n *\n * A box-per-character editor has to know how many boxes to draw, and inventing\n * a number would make the widget claim a length the schema does not require -\n * the user would see six boxes for a value that accepts any string. So both\n * `minLength` and `maxLength` must be present. With the two equal, which is\n * the intended authoring, the boxes and the schema agree exactly.\n *\n * Through `schemaMatches` rather than by reading `schema` directly: a tester is\n * handed the **root** schema and the control's scope, not the property's own\n * subschema, so `schema.minLength` on the object at the root is always\n * `undefined` and the variant would never be selected.\n */\nexport const hasSegmentedLength: Tester = schemaMatches(\n (schema) => otpLength(schema) !== undefined,\n);\n\n/**\n * `options.variant: \"otp\"` - a fixed-length code entered one character per box.\n *\n * `variant` rather than a new `format`, because in this project `variant` is\n * the reserved dispatch input that chooses *which renderer draws a value*\n * (`variant: \"ag-grid\"`, `variant: \"splitter\"`), while `format` describes what\n * the value **is**. An OTP is still a password: same schema, same storage, same\n * masking contract - only the editor differs.\n *\n * `otp` rather than `pin`, of the two names: a PIN is by definition a numeric\n * personal code, while a one-time password may be alphanumeric, so `otp`\n * constrains the alphabet less. A PIN is this variant plus a numeric `pattern`,\n * not a second variant name.\n *\n * Ranked above the plain password control so it wins when asked for, and\n * failing either condition falls back to it rather than to nothing - an\n * unbounded string with `variant: \"otp\"` is an ordinary password field.\n */\nexport const passwordOtpControlTester: RankedTester = rankWith(\n 5,\n and(isPasswordControl, optionIs('variant', 'otp'), hasSegmentedLength),\n);\n\nexport default withJsonFormsControlProps(PasswordOtpControl);\n","import React from 'react';\nimport {\n ControlProps,\n isStringControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { AntdInputText } from '../antd-controls/AntdInputText';\nimport { InputControl } from './InputControl';\n\nexport const TextControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdInputText} />\n);\n\nexport const textControlTester: RankedTester = rankWith(1, isStringControl);\nexport default withJsonFormsControlProps(TextControl);\n","import {\n ControlProps,\n RankedTester,\n isTimeControl,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport React from 'react';\n\nimport { AntdTimePicker } from '../antd-controls/AntdTimePicker';\n\nimport { InputControl } from './InputControl';\n\nexport const TimeControl = (props: ControlProps) => (\n <InputControl {...props} input={AntdTimePicker} />\n);\n\nexport const timeControlTester: RankedTester = rankWith(4, isTimeControl);\n\nexport default withJsonFormsControlProps(TimeControl);\n","import { fileArrayTester } from '@chobantonov/jsonforms-react-renderer-common/controls/FileArrayInput';\nimport React from 'react';\nimport {\n and,\n ControlProps,\n isStringControl,\n RankedTester,\n rankWith,\n schemaMatches,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { InputControl } from './InputControl';\nimport {\n TranslateProps,\n withJsonFormsControlProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { AntdFile } from '../antd-controls';\n\nexport const FileControl = (props: ControlProps & TranslateProps) => {\n return <InputControl {...props} input={AntdFile} />;\n};\n\nconst isBase64String = and(\n uiTypeIs('Control'),\n isStringControl,\n schemaMatches(\n (schema) =>\n (Object.prototype.hasOwnProperty.call(schema, 'contentEncoding') &&\n (schema as any).contentEncoding == 'base64') ||\n schema.format === 'binary' ||\n schema.format === 'byte',\n ),\n);\n\nconst singleFileTester = rankWith(2, isBase64String);\nexport const fileControlTester: RankedTester = (ui, schema, context) =>\n Math.max(\n singleFileTester(ui, schema, context),\n fileArrayTester(ui, schema, context),\n );\nexport default withJsonFormsControlProps(\n withTranslateProps(React.memo(FileControl)),\n);\n","import { ObjectDetailContext } from '@chobantonov/jsonforms-react-renderer-common/objects/ObjectDetail';\nimport { ValidationIcon } from '../complex/ValidationIcon';\nimport { ObjectErrorContext } from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport { useGroupHeaderTitle } from '@chobantonov/jsonforms-react-renderer-common/layout/groupState';\nimport React from 'react';\nimport { Card, Collapse, theme as antTheme } from 'antd';\nimport {\n GroupLayout,\n LayoutProps,\n RankedTester,\n UISchemaElement,\n rankWith,\n uiTypeIs,\n withIncreasedRank,\n} from '@jsonforms/core';\nimport { JsonFormsDispatch, withJsonFormsLayoutProps } from '@jsonforms/react';\nimport { AntdLayoutRenderer } from '../util/layout';\nimport { useGroupState } from '../util/groupState';\nimport { useI18n } from '../util/translate';\nimport { useContainerValidation } from '../util/validationIndicator';\nimport { ContainerIndicator, DataDotIcon } from './ContainerIndicator';\nimport { ContainerValidationIndicator } from './ValidationIndicator';\n\nconst groupTester: RankedTester = rankWith(1, uiTypeIs('Group'));\n\nexport const GroupLayoutRenderer = (props: LayoutProps) => {\n /*\n `useI18n`, not the raw translator from context.\n\n It used to call `translate?.(key, i18nDefaults[key])`, which supplies the\n **English** string as the default message - and the default message is\n exactly where the locale bundle is delivered (§6.5). So the indicator\n stayed English in every language whose catalog did not happen to define\n `group.dataIndicator`, which is the usual case: a form's catalog is\n written for its own labels.\n */\n const { token } = antTheme.useToken();\n const t = useI18n();\n const group = useGroupState(props.uischema, props.path, props.config);\n // Default false for a Group: no indicator exists today, so defaulting to\n // true would change every existing form's appearance.\n const validation = useContainerValidation(\n props.uischema,\n props.path,\n props.config,\n false,\n );\n const object = React.useContext(ObjectErrorContext);\n const objectOwned = object?.uischema === props.uischema;\n const objectErrors = objectOwned ? object.message : '';\n const objectDetail = React.useContext(ObjectDetailContext);\n const additional =\n objectDetail?.uischema === props.uischema ? objectDetail.additional : null;\n const layout = props.uischema as GroupLayout;\n const regions = layout as GroupLayout & {\n cover?: UISchemaElement;\n header?: UISchemaElement[];\n footer?: UISchemaElement[];\n };\n const headerTitle = useGroupHeaderTitle(props.path, regions.header);\n if (!props.visible) return null;\n const renderRegion = (element: UISchemaElement, key: string) => (\n <JsonFormsDispatch\n key={key}\n schema={props.schema}\n uischema={element}\n path={props.path}\n enabled={props.enabled}\n renderers={props.renderers}\n cells={props.cells}\n />\n );\n const cover = regions.cover ? (\n <div data-group-cover>{renderRegion(regions.cover, 'cover')}</div>\n ) : null;\n const headerContent = regions.header?.map((element, index) =>\n renderRegion(element, `header-${index}`),\n );\n const footer = regions.footer?.map((element, index) =>\n renderRegion(element, `footer-${index}`),\n );\n\n // One string for the tooltip and the accessible name, so the two cannot\n // drift apart.\n const indicatorLabel = t('group.dataIndicator');\n const indicator = group.hasData ? (\n <ContainerIndicator\n label={indicatorLabel}\n color={token.colorTextTertiary}\n marker={{ 'data-group-indicator': true }}\n >\n <DataDotIcon />\n </ContainerIndicator>\n ) : undefined;\n // Two different signals, deliberately side by side: the dot says data is\n // present, the error marker says something below needs fixing.\n const extra =\n (objectOwned ? Boolean(objectErrors) : validation.show) || indicator ? (\n // One flex row so the two markers share a centre line and a gap,\n // whichever of them is present.\n <span\n data-group-indicators\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: token.marginXS,\n // The row must not add leading of its own either, or the header\n // grows by the difference between its line box and the icons'.\n lineHeight: 0,\n }}\n >\n {objectOwned ? (\n objectErrors ? (\n <ValidationIcon\n local\n errorMessages={objectErrors}\n id={`${props.path}-object-errors`}\n />\n ) : null\n ) : validation.show ? (\n <ContainerValidationIndicator count={validation.count} />\n ) : null}\n {indicator}\n </span>\n ) : undefined;\n const content = (\n <>\n {layout.elements.length > 0 && (\n <AntdLayoutRenderer\n {...props}\n direction='column'\n elements={layout.elements}\n />\n )}\n {additional}\n </>\n );\n const style = { marginBottom: '10px', width: '100%' };\n\n if (!regions.cover && !regions.header?.length && !footer?.length) {\n if (group.collapsible) {\n return (\n <section\n role='group'\n aria-label={props.label || undefined}\n style={style}\n >\n <Collapse\n activeKey={group.collapsed ? [] : ['group']}\n onChange={(keys) => {\n if (keys.includes('group') === group.collapsed) group.toggle();\n }}\n destroyOnHidden={false}\n items={[\n {\n key: 'group',\n label: props.label || t('control.group'),\n extra,\n forceRender: true,\n children: content,\n },\n ]}\n />\n </section>\n );\n }\n return (\n <Card\n title={props.label || undefined}\n extra={extra}\n style={style}\n role='group'\n aria-label={props.label || undefined}\n >\n {content}\n </Card>\n );\n }\n\n const card = (\n <Card\n data-group-frame\n cover={cover}\n actions={\n footer?.length && !group.collapsible\n ? [\n <div\n key='footer'\n data-group-footer\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n gap: token.marginXS,\n paddingInline: token.padding,\n }}\n >\n {footer}\n </div>,\n ]\n : undefined\n }\n style={style}\n role='group'\n aria-label={headerTitle || props.label || undefined}\n >\n <div\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n gap: token.marginXS,\n marginBottom: group.collapsed ? 0 : token.margin,\n }}\n >\n <div data-group-header style={{ minWidth: 0 }}>\n <Card.Meta\n title={headerContent?.[0] ?? props.label ?? undefined}\n description={\n headerContent?.length ? headerContent.slice(1) : undefined\n }\n />\n </div>\n {(group.collapsible || extra) && (\n <span\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n flexShrink: 0,\n gap: token.marginXS,\n }}\n >\n {extra}\n {group.collapsible && (\n <button\n type='button'\n aria-label={headerTitle || props.label || t('control.group')}\n aria-expanded={!group.collapsed}\n aria-controls={group.contentId}\n onClick={group.toggle}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n border: 0,\n background: 'transparent',\n color: 'inherit',\n cursor: 'pointer',\n padding: token.paddingXS,\n }}\n >\n <svg\n aria-hidden='true'\n width='14'\n height='14'\n viewBox='0 0 14 14'\n >\n <path\n d='m5 3 4 4-4 4'\n fill='none'\n stroke='currentColor'\n strokeWidth='1.5'\n strokeLinecap='round'\n strokeLinejoin='round'\n transform={group.collapsed ? undefined : 'rotate(90 7 7)'}\n />\n </svg>\n </button>\n )}\n </span>\n )}\n </div>\n {group.collapsible ? (\n <div\n id={group.contentId}\n data-group-body\n style={{ display: group.collapsed ? 'none' : undefined }}\n >\n {content}\n {footer?.length ? (\n <footer\n data-group-footer\n style={{\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n gap: token.marginXS,\n borderTop: `1px solid ${token.colorBorderSecondary}`,\n paddingTop: token.padding,\n marginTop: token.margin,\n }}\n >\n {footer}\n </footer>\n ) : null}\n </div>\n ) : (\n content\n )}\n </Card>\n );\n\n return card;\n};\n\nexport default withJsonFormsLayoutProps(GroupLayoutRenderer);\nexport const antdGroupTester: RankedTester = withIncreasedRank(1, groupTester);\n","import React from 'react';\nimport {\n HorizontalLayout,\n LayoutProps,\n RankedTester,\n rankWith,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { withJsonFormsLayoutProps } from '@jsonforms/react';\nimport { AntdLayoutRenderer, AntdLayoutRendererProps } from '../util/layout';\n\n/**\n * Default tester for a horizontal layout.\n * @type {RankedTester}\n */\nexport const horizontalLayoutTester: RankedTester = rankWith(\n 2,\n uiTypeIs('HorizontalLayout'),\n);\n\nexport const HorizontalLayoutRenderer = ({\n uischema,\n renderers,\n cells,\n schema,\n path,\n enabled,\n visible,\n config,\n}: LayoutProps) => {\n const layout = uischema as HorizontalLayout;\n const childProps: AntdLayoutRendererProps = {\n elements: layout.elements,\n schema,\n path,\n enabled,\n direction: 'row',\n visible,\n // The container half of the sizing model: gap, wrap, align, justify,\n // minItemWidth, and gridColumns for a horizontal layout.\n layoutOptions: layout.options as any,\n config,\n };\n\n return (\n <AntdLayoutRenderer {...childProps} renderers={renderers} cells={cells} />\n );\n};\n\nexport default withJsonFormsLayoutProps(HorizontalLayoutRenderer);\n","import React from 'react';\nimport {\n LayoutProps,\n RankedTester,\n rankWith,\n uiTypeIs,\n VerticalLayout,\n} from '@jsonforms/core';\nimport { AntdLayoutRenderer, AntdLayoutRendererProps } from '../util/layout';\nimport { withJsonFormsLayoutProps } from '@jsonforms/react';\n\n/**\n * Default tester for a vertical layout.\n * @type {RankedTester}\n */\nexport const verticalLayoutTester: RankedTester = rankWith(\n 1,\n uiTypeIs('VerticalLayout'),\n);\n\nexport const VerticalLayoutRenderer = ({\n uischema,\n schema,\n path,\n enabled,\n visible,\n renderers,\n cells,\n config,\n}: LayoutProps) => {\n const verticalLayout = uischema as VerticalLayout;\n const childProps: AntdLayoutRendererProps = {\n elements: verticalLayout.elements,\n schema,\n path,\n enabled,\n direction: 'column',\n visible,\n // The container half of the sizing model: gap, wrap, align, justify,\n // minItemWidth, and gridColumns for a horizontal layout.\n layoutOptions: verticalLayout.options as any,\n config,\n };\n\n return (\n <AntdLayoutRenderer {...childProps} renderers={renderers} cells={cells} />\n );\n};\n\nexport default withJsonFormsLayoutProps(VerticalLayoutRenderer);\n","import { Category, UISchemaElement } from '@jsonforms/core';\nimport { theme as antTheme } from 'antd';\nimport React from 'react';\nimport { useGroupState } from '../util/groupState';\nimport { useI18n } from '../util/translate';\nimport { useContainerValidation } from '../util/validationIndicator';\nimport { ContainerIndicator, DataDotIcon } from './ContainerIndicator';\nimport { ContainerValidationIndicator } from './ValidationIndicator';\n\nexport interface CategoryHeaderProps {\n category: Category;\n label?: string;\n path: string;\n config?: Record<string, unknown>;\n}\n\nexport type CategoryIndicatorsProps = Omit<CategoryHeaderProps, 'label'>;\n\n/**\n * The container markers for a Category: an error marker, and the dot that says\n * the section holds data.\n *\n * A Category has no data scope - the same reason it needs an explicit `i18n`\n * prefix - so both are aggregated from the Controls bound below it, through\n * the one traversal shared with the Group's indicators.\n *\n * Rendered on its own rather than baked into the label, because where they\n * belong depends on the shape of the header rather than on the presentation:\n * see {@link CategoryHeader}. Returns `null` when there is nothing to show, so\n * a caller can hand it straight to an `extra` slot.\n *\n * Both default to off: no indicator existed on categories before, and\n * defaulting to on would change every existing form.\n */\nexport const CategoryIndicators = ({\n category,\n path,\n config,\n}: CategoryIndicatorsProps) => {\n const { token } = antTheme.useToken();\n // See GroupLayout: the default message is where the locale bundle arrives.\n const t = useI18n();\n const validation = useContainerValidation(\n category as UISchemaElement,\n path,\n config,\n false,\n );\n const group = useGroupState(category as UISchemaElement, path, config);\n\n if (!validation.show && !group.hasData) {\n return null;\n }\n\n const indicatorLabel = t('group.dataIndicator');\n\n return (\n <span\n data-category-indicators\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: token.marginXS,\n // No leading of its own, or a header grows by the difference between\n // its line box and the icons'.\n lineHeight: 0,\n }}\n >\n {validation.show ? (\n <ContainerValidationIndicator count={validation.count} />\n ) : null}\n {group.hasData ? (\n <ContainerIndicator\n label={indicatorLabel}\n color={token.colorTextTertiary}\n marker={{ 'data-category-data-indicator': true }}\n >\n <DataDotIcon />\n </ContainerIndicator>\n ) : null}\n </span>\n );\n};\n\n/**\n * A category's **tab or step** label, with the indicators after it.\n *\n * A tab and a step label are just text: they are sized to their content and\n * have no trailing edge, so the markers can only follow the words.\n *\n * An accordion header is a different shape - a full-width bar, like a Group's -\n * and there the markers go at the end of the bar instead, through antd's\n * `extra` slot, so that two collapsible sections in one form do not put their\n * status in two different places. That is why this component is not used by\n * the accordion; it renders {@link CategoryIndicators} directly.\n */\nexport const CategoryHeader = ({\n category,\n label,\n path,\n config,\n}: CategoryHeaderProps) => (\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: 8 }}>\n {label}\n <CategoryIndicators category={category} path={path} config={config} />\n </span>\n);\n","import { useMemo } from 'react';\nimport {\n deriveLabelForUISchemaElement,\n type Category,\n type Translator,\n} from '@jsonforms/core';\nexport const useCategoryLabels = (categories: Category[], t: Translator) =>\n useMemo(\n () =>\n categories.map((category) => deriveLabelForUISchemaElement(category, t)),\n [categories, t],\n );\n// Compatibility export; implementation is shared by all renderer families.\nexport {\n categoryKey,\n useCategorySelection,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/categoryState';\n","import React from 'react';\nimport {\n and,\n Categorization,\n Category,\n RankedTester,\n rankWith,\n StatePropsOfLayout,\n Tester,\n UISchemaElement,\n uiTypeIs,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsLayoutProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { CategoryHeader } from './CategoryHeader';\nimport { useCategorySelection, useCategoryLabels } from '../util/categoryState';\nimport {\n AjvProps,\n AntdLayoutRenderer,\n AntdLayoutRendererProps,\n withAjvProps,\n} from '../util/layout';\nimport { Tabs } from 'antd';\n\nconst isSingleLevelCategorization: Tester = and(\n uiTypeIs('Categorization'),\n (uischema: UISchemaElement): boolean => {\n const categorization = uischema as Categorization;\n\n return (\n categorization.elements &&\n categorization.elements.reduce(\n (acc, e) => acc && e.type === 'Category',\n true,\n )\n );\n },\n);\n\nexport const categorizationTester: RankedTester = rankWith(\n 1,\n isSingleLevelCategorization,\n);\n\nexport interface CategorizationLayoutRendererProps\n extends StatePropsOfLayout, AjvProps, TranslateProps {\n selected?: number;\n ownState?: boolean;\n data?: any;\n onChange?(selected: number, prevSelected: number): void;\n}\n\nexport const CategorizationLayoutRenderer = (\n props: CategorizationLayoutRendererProps,\n) => {\n const {\n data,\n path,\n renderers,\n cells,\n schema,\n uischema,\n visible,\n enabled,\n selected,\n onChange,\n ajv,\n config,\n t,\n } = props;\n const categorization = uischema as Categorization;\n // Visibility, `options.initial` and the \"selected category became hidden\"\n // rule are the same for tabs, stepper and accordion, so section 8's\n // navigation contract is implemented once and shared.\n const { categories, active, select } = useCategorySelection(\n categorization,\n data,\n ajv,\n config,\n selected,\n false,\n path,\n );\n\n /*\n Per category, not per selection. antd keeps a tab panel mounted once it has\n been visited, so a panel built from `categories[active]` goes on rendering\n whatever is selected now - and the panels left behind end up duplicating\n the selected category instead of holding their own.\n */\n const childProps = (category: Category): AntdLayoutRendererProps => ({\n elements: category.elements ?? [],\n schema,\n path,\n direction: 'column',\n enabled,\n visible,\n renderers,\n cells,\n });\n const onTabChange = (value: string) => {\n const category = parseInt(value);\n\n if (onChange) {\n onChange(category, active);\n }\n select(category);\n };\n\n const tabLabels = useCategoryLabels(categories, t);\n\n if (!visible) {\n return null;\n }\n\n return (\n <Tabs\n /*\n Controlled, not `defaultActiveKey`. An uncontrolled Tabs keeps its own\n index, so when the selected category was hidden by a rule the tab strip\n went on pointing at that slot and showed a different category's panel.\n */\n activeKey={String(active)}\n onChange={onTabChange}\n items={categories.map(\n (category: Category, idx: number) =>\n ({\n label: (\n <CategoryHeader\n category={category}\n label={tabLabels[idx]}\n path={path}\n config={config}\n />\n ),\n key: String(idx),\n children: <AntdLayoutRenderer {...childProps(category)} />,\n }) as any,\n )}\n ></Tabs>\n );\n};\n\nexport default withAjvProps(\n withTranslateProps(withJsonFormsLayoutProps(CategorizationLayoutRenderer)),\n);\n","import React from 'react';\nimport merge from 'lodash/merge';\nimport { Button, Steps } from 'antd';\nimport {\n and,\n Categorization,\n categorizationHasCategory,\n Category,\n optionIs,\n RankedTester,\n rankWith,\n StatePropsOfLayout,\n uiTypeIs,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsLayoutProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { CategoryHeader } from './CategoryHeader';\nimport { useCategorySelection, useCategoryLabels } from '../util/categoryState';\nimport { useI18n } from '../util/translate';\nimport {\n AjvProps,\n AntdLayoutRenderer,\n AntdLayoutRendererProps,\n withAjvProps,\n} from '../util/layout';\n\nexport const categorizationStepperTester: RankedTester = rankWith(\n 2,\n and(\n uiTypeIs('Categorization'),\n categorizationHasCategory,\n optionIs('variant', 'stepper'),\n ),\n);\n\ninterface CategorizationStepperLayoutRendererProps\n extends StatePropsOfLayout, AjvProps, TranslateProps {\n data: any;\n}\n\nconst CategorizationStepperLayoutRenderer = (\n props: CategorizationStepperLayoutRendererProps,\n) => {\n // The `t` from props is core's Translator, which returns undefined for a\n // key with no fallback; useI18n always supplies the default.\n const label = useI18n();\n const {\n data,\n path,\n renderers,\n schema,\n uischema,\n visible,\n cells,\n config,\n ajv,\n t,\n } = props;\n const categorization = uischema as Categorization;\n const appliedUiSchemaOptions = merge({}, config, uischema.options);\n const buttonWrapperStyle = {\n textAlign: 'right' as const,\n width: '100%',\n margin: '1em auto',\n };\n const buttonNextStyle = {\n float: 'right' as const,\n };\n const buttonStyle = {\n marginRight: '1em',\n };\n // Section 8's navigation contract, shared with the tabs and accordion\n // presentations: visibility, `options.initial`, and what happens when the\n // current category is hidden.\n const {\n categories,\n active: activeCategory,\n select,\n } = useCategorySelection(\n categorization,\n data,\n ajv,\n config,\n undefined,\n false,\n path,\n );\n const handleStep = (step: number) => {\n // \"Previous/Next actions operate on visible categories and stop at the\n // first/last visible category.\"\n select(Math.min(Math.max(step, 0), categories.length - 1));\n };\n const childProps: AntdLayoutRendererProps = {\n // A Categorization whose categories are all hidden has \"no active category\n // or stale active panel\"; indexing blindly here threw instead.\n elements: categories[activeCategory]?.elements ?? [],\n schema,\n path,\n direction: 'column',\n visible,\n renderers,\n cells,\n };\n const tabLabels = useCategoryLabels(categories, t);\n\n if (!visible) {\n return null;\n }\n\n return (\n <>\n <Steps\n current={activeCategory < 0 ? 0 : activeCategory}\n items={categories.map((category: Category, idx: number) => ({\n key: tabLabels[idx],\n title: (\n <CategoryHeader\n category={category}\n label={tabLabels[idx]}\n path={path}\n config={config}\n />\n ),\n }))}\n onChange={handleStep}\n style={{ marginBottom: '10px' }}\n />\n <div>\n <AntdLayoutRenderer {...childProps} />\n </div>\n {appliedUiSchemaOptions.showNavButtons ? (\n <div style={buttonWrapperStyle}>\n <Button\n style={buttonNextStyle}\n color='primary'\n disabled={activeCategory >= categories.length - 1}\n onClick={() => handleStep(activeCategory + 1)}\n >\n {label('categorization.next')}\n </Button>\n <Button\n style={buttonStyle}\n color='default'\n disabled={activeCategory <= 0}\n onClick={() => handleStep(activeCategory - 1)}\n >\n {label('categorization.previous')}\n </Button>\n </div>\n ) : (\n <></>\n )}\n </>\n );\n};\n\nexport default withAjvProps(\n withTranslateProps(\n withJsonFormsLayoutProps(CategorizationStepperLayoutRenderer),\n ),\n);\n","import React, { useEffect, useId, useMemo, useRef } from 'react';\nimport { Collapse } from 'antd';\nimport {\n and,\n Categorization,\n categorizationHasCategory,\n Category,\n deriveLabelForUISchemaElement,\n optionIs,\n RankedTester,\n rankWith,\n StatePropsOfLayout,\n uiTypeIs,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsLayoutProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { CategoryIndicators } from './CategoryHeader';\nimport { categoryKey, useCategorySelection } from '../util/categoryState';\nimport {\n AjvProps,\n AntdLayoutRenderer,\n AntdLayoutRendererProps,\n withAjvProps,\n} from '../util/layout';\n\n/**\n * Rank 3, above the stepper at 2 and the generic tabs renderer at 1, because\n * the specification requires this explicit match to \"take precedence over the\n * generic Categorization renderer\". Before this existed, `variant: \"accordion\"`\n * fell through to tabs and the request was silently ignored.\n *\n * No schema type requirement, no scope, no array binding: categories are\n * structural UI sections and may hold unbound content or be used with an empty\n * data object.\n */\nexport const categorizationAccordionTester: RankedTester = rankWith(\n 3,\n and(\n uiTypeIs('Categorization'),\n categorizationHasCategory,\n optionIs('variant', 'accordion'),\n ),\n);\n\nexport interface CategorizationAccordionLayoutRendererProps\n extends StatePropsOfLayout, AjvProps, TranslateProps {\n data?: unknown;\n}\n\nexport const CategorizationAccordionLayoutRenderer = (\n props: CategorizationAccordionLayoutRendererProps,\n) => {\n const {\n data,\n path,\n renderers,\n cells,\n schema,\n uischema,\n visible,\n enabled,\n ajv,\n config,\n t,\n } = props;\n const categorization = uischema as Categorization;\n const { categories, active, select, close } = useCategorySelection(\n categorization,\n data,\n ajv,\n config,\n undefined,\n // Closable: an accordion here may be closed entirely. This is the one\n // place the project differs from section 8; see Adjustment 10.2.\n true,\n path,\n );\n\n const labels = useMemo(\n () =>\n categories.map((category) => deriveLabelForUISchemaElement(category, t)),\n [categories, t],\n );\n\n /*\n The panel relationship section 8 asks for (\"accessible accordion headings\n and controls with expanded-state and panel relationships\").\n\n rc-collapse supplies `role=\"button\"` and `aria-expanded` but never\n `aria-controls`, and gives the panel no role or label at all, so a screen\n reader is told a header can be expanded without being told what it expands.\n There is no prop for it - extra item props land on the item wrapper, not on\n the header - so the two are tied together here, after render. The selectors\n are antd's stable panel structure, and `accordionAccessibility` in the tests\n fails loudly if that changes.\n */\n const rootRef = useRef<HTMLDivElement>(null);\n const baseId = useId();\n useEffect(() => {\n const items = rootRef.current?.querySelectorAll<HTMLElement>(\n ':scope > .ant-collapse > .ant-collapse-item',\n );\n items?.forEach((item, index) => {\n const header = item.querySelector<HTMLElement>(\n ':scope > .ant-collapse-header',\n );\n // `-panel` in antd 6, `-content` in 5. Accepting both means a version\n // bump degrades to \"no relationship\" rather than to a crash, and the\n // accessibility test says which one is actually in use.\n const panel = item.querySelector<HTMLElement>(\n ':scope > .ant-collapse-panel, :scope > .ant-collapse-content',\n );\n if (!header || !panel) {\n return;\n }\n const headerId = `${baseId}-header-${index}`;\n const panelId = `${baseId}-panel-${index}`;\n header.id = headerId;\n header.setAttribute('aria-controls', panelId);\n panel.id = panelId;\n panel.setAttribute('role', 'region');\n panel.setAttribute('aria-labelledby', headerId);\n });\n });\n\n if (!visible) {\n return null;\n }\n\n const childProps = (category: Category): AntdLayoutRendererProps => ({\n elements: category.elements,\n schema,\n path,\n direction: 'column',\n enabled,\n visible,\n renderers,\n cells,\n });\n\n return (\n <div ref={rootRef}>\n <Collapse\n /*\n Deliberately *not* antd's `accordion` prop.\n\n Its at-most-one-open behaviour is now what we want, but the prop also\n switches the whole control to a tabs pattern - `role=\"tablist\"` on the\n root, `role=\"tab\"` on each header, `role=\"tabpanel\"` on each panel -\n and then does not implement one: a `tab` reports `aria-expanded` where\n the pattern calls for `aria-selected`, the panel gets no accessible\n name, and only Enter is handled, with none of the arrow-key navigation\n a `tablist` promises. A tablist also cannot express \"no tab selected\",\n which is a legal state here. Without the prop the same component is a\n disclosure - `role=\"button\"` plus `aria-expanded` - which is what\n rc-collapse actually implements and what an all-closed accordion needs.\n\n Exclusivity is enforced here instead: `activeKey` never holds more than\n one key.\n */\n activeKey={active >= 0 ? [String(active)] : []}\n onChange={(keys) => {\n // Without `accordion`, opening a panel *adds* its key, so the newly\n // opened one is whichever key was not already active. Clicking the\n // open header removes its key and leaves none, which closes the\n // accordion - see Adjustment 10.2.\n const opened = (Array.isArray(keys) ? keys : [keys]).filter(\n (key) => String(key) !== String(active),\n );\n if (opened.length > 0) {\n select(Number(opened[0]));\n } else {\n close();\n }\n }}\n items={categories.map((category, index) => ({\n // Identity, not position, so a reorder keeps a panel's expansion and\n // its content together rather than reusing the slot's DOM.\n key: String(index),\n 'data-category-key': categoryKey(category, index),\n label: labels[index],\n /*\n The indicators go in `extra` - the end of the header bar - not\n after the label. An accordion header is the same shape as a\n collapsible Group's, so putting its status somewhere else would\n mean two collapsible sections in one form marking themselves\n differently. A tab or a step has no trailing edge to use, which is\n why those keep the markers beside the words; see `CategoryHeader`.\n */\n extra: (\n <CategoryIndicators\n category={category}\n path={path}\n config={config}\n />\n ),\n /*\n Panels stay mounted. \"Closing a category preserves its data and\n validation\" - and an unmounted subtree would take its controls'\n pending debounced writes with it.\n */\n forceRender: true,\n children: <AntdLayoutRenderer {...childProps(category)} />,\n }))}\n />\n </div>\n );\n};\n\nexport default withAjvProps(\n withTranslateProps(\n withJsonFormsLayoutProps(CategorizationAccordionLayoutRenderer),\n ),\n);\n","import React from 'react';\nimport {\n CellProps,\n isBooleanControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdCheckbox } from '../antd-controls/AntdCheckbox';\n\nimport { ValidationIcon } from '../complex/ValidationIcon';\n\nexport const BooleanCell = (props: CellProps & WithClassname) => {\n return props.visible === false ? null : (\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>\n <AntdCheckbox\n {...props}\n inputProps={{ 'aria-invalid': Boolean(props.errors) }}\n />\n <ValidationIcon\n local\n errorMessages={props.errors}\n path={props.path}\n id={`${props.id}-error`}\n />\n </span>\n );\n};\n\nexport const booleanCellTester: RankedTester = rankWith(2, isBooleanControl);\n\nexport default withJsonFormsCellProps(BooleanCell);\n","import React from 'react';\nimport {\n and,\n CellProps,\n isBooleanControl,\n optionIs,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdToggle } from '../antd-controls/AntdToggle';\n\nimport { ValidationIcon } from '../complex/ValidationIcon';\n\nconst BooleanToggleCell = (props: CellProps & WithClassname) => {\n return props.visible === false ? null : (\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>\n <AntdToggle\n {...props}\n inputProps={{ 'aria-invalid': Boolean(props.errors) }}\n />\n <ValidationIcon\n local\n errorMessages={props.errors}\n path={props.path}\n id={`${props.id}-error`}\n />\n </span>\n );\n};\n\nexport const booleanToggleCellTester: RankedTester = rankWith(\n 3,\n and(isBooleanControl, optionIs('toggle', true)),\n);\n\nexport default withJsonFormsCellProps(BooleanToggleCell);\n","import React from 'react';\nimport {\n CellProps,\n isDateControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdDatePicker } from '../antd-controls';\n\nexport const DateCell = (props: CellProps & WithClassname) => {\n return <AntdDatePicker {...props} />;\n};\nexport const dateCellTester: RankedTester = rankWith(2, isDateControl);\n\nexport default withJsonFormsCellProps(DateCell);\n","import React from 'react';\nimport {\n EnumCellProps,\n isEnumControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsEnumCellProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { AntdSelect } from '../antd-controls/AntdSelect';\n\nexport const EnumCell = (\n props: EnumCellProps & WithClassname & TranslateProps,\n) => <AntdSelect {...props} />;\n\n/**\n * Default tester for enum controls.\n * @type {RankedTester}\n */\nexport const enumCellTester: RankedTester = rankWith(2, isEnumControl);\n\n// HOC order can be reversed with https://github.com/eclipsesource/jsonforms/issues/1987\nexport default withJsonFormsEnumCellProps(\n withTranslateProps(React.memo(EnumCell)),\n false,\n);\n","import React from 'react';\nimport {\n CellProps,\n isIntegerControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdInputInteger } from '../antd-controls/AntdInputInteger';\n\nexport const IntegerCell = (props: CellProps & WithClassname) => (\n <AntdInputInteger {...props} />\n);\nexport const integerCellTester: RankedTester = rankWith(2, isIntegerControl);\n\nexport default withJsonFormsCellProps(IntegerCell);\n","import React from 'react';\nimport {\n CellProps,\n isNumberControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdInputNumber } from '../antd-controls/AntdInputNumber';\n\nexport const NumberCell = (props: CellProps & WithClassname) => (\n <AntdInputNumber {...props} />\n);\n/**\n * Default tester for number controls.\n * @type {RankedTester}\n */\nexport const numberCellTester: RankedTester = rankWith(2, isNumberControl);\nexport default withJsonFormsCellProps(NumberCell);\n","import React from 'react';\nimport { IntegerCell } from './IntegerCell';\nimport {\n CellProps,\n Formatted,\n isNumberFormatControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdInputNumberFormat } from '../antd-controls/AntdInputNumberFormat';\n\nexport const NumberFormatCell = (\n props: CellProps & WithClassname & Partial<Formatted<number>>,\n) => {\n const { toFormatted, fromFormatted } = props;\n return toFormatted && fromFormatted ? (\n <AntdInputNumberFormat\n {...props}\n toFormatted={toFormatted}\n fromFormatted={fromFormatted}\n />\n ) : (\n <IntegerCell {...props} />\n );\n};\n/**\n * Default tester for text-based/string controls.\n * @type {RankedTester}\n */\nexport const numberFormatCellTester: RankedTester = rankWith(\n 4,\n isNumberFormatControl,\n);\n\nexport default withJsonFormsCellProps(NumberFormatCell);\n","import React from 'react';\nimport {\n EnumCellProps,\n isOneOfEnumControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport {\n TranslateProps,\n withJsonFormsOneOfEnumCellProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { AntdSelect } from '../antd-controls/AntdSelect';\n\nexport const OneOfEnumCell = (\n props: EnumCellProps & WithClassname & TranslateProps,\n) => <AntdSelect {...props} />;\n\n/**\n * Default tester for oneOf enum controls.\n * @type {RankedTester}\n */\nexport const oneOfEnumCellTester: RankedTester = rankWith(\n 2,\n isOneOfEnumControl,\n);\n\nexport default withJsonFormsOneOfEnumCellProps(\n withTranslateProps(React.memo(OneOfEnumCell)),\n false,\n);\n","import { CellProps, RankedTester, WithClassname } from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport React from 'react';\nimport { AntdPassword } from '../antd-controls/AntdPassword';\nimport { passwordControlTester } from '../controls/PasswordControl';\n\n/**\n * Masking has to survive delegation to a cell.\n *\n * The shared table-cell contract requires that \"password masking, multiline\n * input, radio choices, switches, sliders, masks, and temporal controls must\n * not lose their meaning merely because the editor appears in a table\" -\n * without this, a password column fell through to the plain text cell and\n * showed the value to anyone looking at the screen.\n */\nconst PasswordCell = (props: CellProps & WithClassname) => (\n <AntdPassword {...props} />\n);\n\nexport const passwordCellTester: RankedTester = passwordControlTester;\n\nexport default withJsonFormsCellProps(PasswordCell);\n","import React from 'react';\nimport {\n CellProps,\n isStringControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdInputText } from '../antd-controls/AntdInputText';\n\nexport const TextCell = (props: CellProps & WithClassname) => (\n <AntdInputText {...props} />\n);\n\n/**\n * Default tester for text-based/string controls.\n * @type {RankedTester}\n */\nexport const textCellTester: RankedTester = rankWith(1, isStringControl);\n\nexport default withJsonFormsCellProps(TextCell);\n","import React from 'react';\nimport {\n CellProps,\n isTimeControl,\n RankedTester,\n rankWith,\n WithClassname,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { AntdTimePicker } from '../antd-controls/AntdTimePicker';\n\nexport const TimeCell = (props: CellProps & WithClassname) => (\n <AntdTimePicker {...props} />\n);\nexport const timeCellTester: RankedTester = rankWith(2, isTimeControl);\n\nexport default withJsonFormsCellProps(TimeCell);\n","import { LabelRenderer } from './LabelRenderer';\n\nimport { ListWithDetailRenderer } from './ListWithDetailRenderer';\n\nexport const UnwrappedAdditional = {\n LabelRenderer,\n ListWithDetailRenderer,\n};\n","import { AllOfRenderer } from '@chobantonov/jsonforms-react-renderer-common/composition/AllOfRenderer';\nimport { AnyOfRenderer } from './AnyOfRenderer';\nimport { ArrayControlRenderer } from './ArrayControlRenderer';\nimport { EnumArrayRenderer } from './EnumArrayRenderer';\nimport { ObjectRenderer } from './ObjectRenderer';\nimport { OneOfRenderer } from './OneOfRenderer';\n\nexport const UnwrappedComplex = {\n AllOfRenderer,\n AnyOfRenderer,\n ArrayControlRenderer,\n EnumArrayRenderer,\n ObjectRenderer,\n OneOfRenderer,\n};\n","import { AnyOfStringOrEnumControl } from './AnyOfStringOrEnumControl';\nimport { BooleanControl } from './BooleanControl';\nimport { BooleanToggleControl } from './BooleanToggleControl';\nimport { DateControl } from './DateControl';\nimport { DateTimeControl } from './DateTimeControl';\nimport { EnumControl } from './EnumControl';\nimport { IntegerControl } from './IntegerControl';\nimport { NativeControl } from './NativeControl';\nimport { NumberControl } from './NumberControl';\nimport { OneOfEnumControl } from './OneOfEnumControl';\nimport { OneOfRadioGroupControl } from './OneOfRadioGroupControl';\nimport { RadioGroupControl } from './RadioGroupControl';\nimport { SliderControl } from './SliderControl';\nimport { TextControl } from './TextControl';\nimport { TimeControl } from './TimeControl';\nimport { FileControl } from './FileControl';\n\nexport const UnwrappedControls = {\n AnyOfStringOrEnumControl,\n BooleanControl,\n BooleanToggleControl,\n DateControl,\n DateTimeControl,\n EnumControl,\n IntegerControl,\n NativeControl,\n NumberControl,\n OneOfEnumControl,\n OneOfRadioGroupControl,\n SliderControl,\n RadioGroupControl,\n TextControl,\n TimeControl,\n FileControl,\n};\n","import { GroupLayoutRenderer } from './GroupLayout';\nimport { HorizontalLayoutRenderer } from './HorizontalLayout';\nimport { VerticalLayoutRenderer } from './VerticalLayout';\nimport { CategorizationLayoutRenderer } from './CategorizationLayout';\nimport { CategorizationAccordionLayoutRenderer } from './CategorizationAccordionLayout';\nimport { ArrayLayoutRenderer } from './ArrayLayoutRenderer';\n\nexport const UnwrappedLayouts = {\n ArrayLayout: ArrayLayoutRenderer,\n CategorizationLayout: CategorizationLayoutRenderer,\n CategorizationAccordionLayout: CategorizationAccordionLayoutRenderer,\n GroupLayout: GroupLayoutRenderer,\n HorizontalLayout: HorizontalLayoutRenderer,\n VerticalLayout: VerticalLayoutRenderer,\n};\n\nexport * from './ArrayToolbar';\n","import {\n dynamicRendererEntry,\n dynamicCellEntry,\n} from '@chobantonov/jsonforms-react-renderer-common/dynamic/DynamicUiProvider';\nimport {\n RecursiveTreeRenderer,\n recursiveTreeTester,\n} from './complex/RecursiveTreeRenderer';\nimport { ChoiceCards } from './controls/ChoiceCards';\nimport { choiceCardsTester } from '@chobantonov/jsonforms-react-renderer-common/composition/choiceCards';\nimport { withJsonFormsCellProps, withTranslateProps } from '@jsonforms/react';\nimport { AntdFile } from './antd-controls/AntdFile';\nimport AntdCompositeCell, {\n antdCompositeCellTester,\n} from './cells/AntdCompositeCell';\nimport { MixedRenderer, mixedControlTester } from './complex/MixedRenderer';\nimport ChipsControl, { chipsControlTester } from './complex/ChipsControl';\nimport MultiSelectControl, {\n multiSelectControlTester,\n} from './complex/MultiSelectControl';\nimport {\n TupleControlRenderer,\n tupleControlRendererTester,\n} from './complex/TupleControlRenderer';\nimport {\n JsonFormsCellRendererRegistryEntry,\n JsonFormsRendererRegistryEntry,\n} from '@jsonforms/core';\nimport {\n allOfControlTester,\n AllOfRenderer,\n anyOfControlTester,\n AnyOfRenderer,\n ArrayControlRenderer,\n arrayControlTester,\n objectControlTester,\n ObjectRenderer,\n oneOfControlTester,\n OneOfRenderer,\n scalarCompositionTester,\n ScalarCompositionRenderer,\n EnumArrayRenderer,\n enumArrayRendererTester,\n} from './complex';\nimport {\n LabelRenderer,\n labelRendererTester,\n ListWithDetailRenderer,\n listWithDetailTester,\n} from './additional';\nimport {\n AnyOfStringOrEnumControl,\n anyOfStringOrEnumControlTester,\n BooleanControl,\n booleanControlTester,\n BooleanToggleControl,\n booleanToggleControlTester,\n DateControl,\n dateControlTester,\n DateTimeControl,\n dateTimeControlTester,\n TimeControl,\n timeControlTester,\n EnumControl,\n enumControlTester,\n IntegerControl,\n integerControlTester,\n NativeControl,\n nativeControlTester,\n NumberControl,\n numberControlTester,\n OneOfEnumControl,\n oneOfEnumControlTester,\n PasswordControl,\n passwordControlTester,\n PasswordOtpControl,\n passwordOtpControlTester,\n RadioGroupControl,\n radioGroupControlTester,\n SliderControl,\n sliderControlTester,\n TextControl,\n textControlTester,\n OneOfRadioGroupControl,\n oneOfRadioGroupControlTester,\n FileControl,\n fileControlTester,\n} from './controls';\nimport {\n ArrayLayout,\n arrayLayoutTester,\n CategorizationLayout,\n categorizationTester,\n GroupLayout,\n antdGroupTester,\n HorizontalLayout,\n horizontalLayoutTester,\n VerticalLayout,\n verticalLayoutTester,\n} from './layouts';\nimport {\n BooleanCell,\n booleanCellTester,\n BooleanToggleCell,\n booleanToggleCellTester,\n DateCell,\n dateCellTester,\n EnumCell,\n enumCellTester,\n IntegerCell,\n integerCellTester,\n NumberCell,\n numberCellTester,\n NumberFormatCell,\n numberFormatCellTester,\n OneOfEnumCell,\n oneOfEnumCellTester,\n PasswordCell,\n passwordCellTester,\n TextCell,\n textCellTester,\n TimeCell,\n timeCellTester,\n} from './cells';\nimport CategorizationStepperLayout, {\n categorizationStepperTester,\n} from './layouts/CategorizationStepperLayout';\nimport CategorizationAccordionLayout, {\n categorizationAccordionTester,\n} from './layouts/CategorizationAccordionLayout';\n\nexport * from './additional';\nexport * from './cells';\nexport * from './complex';\nexport * from './controls';\nexport * from './layouts';\nexport * from './util';\nexport * from './locale';\n\nexport const antdRenderers: JsonFormsRendererRegistryEntry[] = [\n dynamicRendererEntry,\n { tester: recursiveTreeTester, renderer: RecursiveTreeRenderer },\n { tester: choiceCardsTester, renderer: ChoiceCards },\n // controls\n { tester: mixedControlTester, renderer: MixedRenderer },\n { tester: multiSelectControlTester, renderer: MultiSelectControl },\n { tester: chipsControlTester, renderer: ChipsControl },\n { tester: tupleControlRendererTester, renderer: TupleControlRenderer },\n {\n tester: arrayControlTester,\n renderer: ArrayControlRenderer,\n },\n { tester: booleanControlTester, renderer: BooleanControl },\n {\n tester: booleanToggleControlTester,\n renderer: BooleanToggleControl,\n },\n { tester: nativeControlTester, renderer: NativeControl },\n { tester: enumControlTester, renderer: EnumControl },\n { tester: integerControlTester, renderer: IntegerControl },\n { tester: numberControlTester, renderer: NumberControl },\n { tester: textControlTester, renderer: TextControl },\n { tester: passwordControlTester, renderer: PasswordControl },\n { tester: passwordOtpControlTester, renderer: PasswordOtpControl },\n { tester: dateTimeControlTester, renderer: DateTimeControl },\n { tester: dateControlTester, renderer: DateControl },\n { tester: timeControlTester, renderer: TimeControl },\n { tester: sliderControlTester, renderer: SliderControl },\n { tester: objectControlTester, renderer: ObjectRenderer },\n /*\n Above the three combinator renderers: a composition that describes one\n scalar editor gets one input rather than a branch selector. Below the\n finite-choice renderers at rank 5, which keep their own conventions.\n */\n {\n tester: scalarCompositionTester,\n renderer: ScalarCompositionRenderer,\n },\n { tester: allOfControlTester, renderer: AllOfRenderer },\n { tester: anyOfControlTester, renderer: AnyOfRenderer },\n { tester: oneOfControlTester, renderer: OneOfRenderer },\n { tester: fileControlTester, renderer: FileControl },\n {\n tester: radioGroupControlTester,\n renderer: RadioGroupControl,\n },\n {\n tester: oneOfRadioGroupControlTester,\n renderer: OneOfRadioGroupControl,\n },\n {\n tester: oneOfEnumControlTester,\n renderer: OneOfEnumControl,\n },\n // layouts\n { tester: antdGroupTester, renderer: GroupLayout },\n {\n tester: horizontalLayoutTester,\n renderer: HorizontalLayout,\n },\n { tester: verticalLayoutTester, renderer: VerticalLayout },\n {\n tester: categorizationTester,\n renderer: CategorizationLayout,\n },\n {\n tester: categorizationStepperTester,\n renderer: CategorizationStepperLayout,\n },\n {\n tester: categorizationAccordionTester,\n renderer: CategorizationAccordionLayout,\n },\n { tester: arrayLayoutTester, renderer: ArrayLayout },\n // additional\n { tester: labelRendererTester, renderer: LabelRenderer },\n {\n tester: listWithDetailTester,\n renderer: ListWithDetailRenderer,\n },\n {\n tester: anyOfStringOrEnumControlTester,\n renderer: AnyOfStringOrEnumControl,\n },\n {\n tester: enumArrayRendererTester,\n renderer: EnumArrayRenderer,\n },\n];\n\nexport const antdCells: JsonFormsCellRendererRegistryEntry[] = [\n dynamicCellEntry,\n // Rank 1 fallback: objects and arrays that no specialised cell handles get a\n // summary plus a detail dialog instead of rendering nothing.\n {\n tester: fileControlTester,\n cell: withJsonFormsCellProps(withTranslateProps(AntdFile)),\n },\n { tester: antdCompositeCellTester, cell: AntdCompositeCell },\n { tester: booleanCellTester, cell: BooleanCell },\n { tester: booleanToggleCellTester, cell: BooleanToggleCell },\n { tester: dateCellTester, cell: DateCell },\n { tester: enumCellTester, cell: EnumCell },\n { tester: integerCellTester, cell: IntegerCell },\n { tester: numberCellTester, cell: NumberCell },\n { tester: numberFormatCellTester, cell: NumberFormatCell },\n { tester: oneOfEnumCellTester, cell: OneOfEnumCell },\n { tester: textCellTester, cell: TextCell },\n { tester: passwordCellTester, cell: PasswordCell },\n { tester: timeCellTester, cell: TimeCell },\n];\n\nimport { UnwrappedAdditional } from './additional/unwrapped';\nimport { UnwrappedComplex } from './complex/unwrapped';\nimport { UnwrappedControls } from './controls/unwrapped';\nimport { UnwrappedLayouts } from './layouts/unwrapped';\n\nexport const Unwrapped = {\n ...UnwrappedAdditional,\n ...UnwrappedComplex,\n ...UnwrappedControls,\n ...UnwrappedLayouts,\n};\n\nexport * from './antd-controls';\n\nexport { RowDetailFrame } from './complex/RowDetailFrame';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A,GAMaoK,WAAwB;CACnC,IAAM,EAAE,MAAG,YAAS,YAAS,UAAO,YAAS,UAAO,eAClDC,GAAqB;CAevB,OAAO;EAAE;EAAS,QAdHC,IACb,kBAACC,GAAD;GACE,MAAA;GACO;GACP,QAAQC,EAAE,gBAAgB;GAC1B,YAAYA,EAAE,iBAAiB;GAC/B,eAAe,EAAE,QAAQF,EAAQ,cAAc,SAAS;GACxD,MAAMG;G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