@chobantonov/jsonforms-react-shadcn-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 +21 -0
- package/README.md +157 -2
- package/lib/additional/LabelRenderer.d.ts +4 -0
- package/lib/additional/index.d.ts +1 -0
- package/lib/cells/BooleanCell.d.ts +3 -0
- package/lib/cells/Cell.d.ts +3 -0
- package/lib/cells/CompositeCell.d.ts +9 -0
- package/lib/cells/CompositeDetailDialog.d.ts +3 -0
- package/lib/cells/EnumCell.d.ts +3 -0
- package/lib/cells/NumberCell.d.ts +3 -0
- package/lib/cells/NumberFormatCell.d.ts +4 -0
- package/lib/cells/TextCell.d.ts +3 -0
- package/lib/cells/asCell.d.ts +12 -0
- package/lib/cells/index.d.ts +7 -0
- package/lib/complex/AdditionalProperties.d.ts +4 -0
- package/lib/complex/AnyOfRenderer.d.ts +7 -0
- package/lib/complex/ArrayChoicesControl.d.ts +6 -0
- package/lib/complex/ArrayControlRenderer.d.ts +4 -0
- package/lib/complex/ArrayPanelToggle.d.ts +6 -0
- package/lib/complex/CollectionPager.d.ts +5 -0
- package/lib/complex/CombinatorSwitchDialog.d.ts +8 -0
- package/lib/complex/DeleteDialog.d.ts +6 -0
- package/lib/complex/DetailDialogContent.d.ts +7 -0
- package/lib/complex/ErrorIndicator.d.ts +7 -0
- package/lib/complex/MixedRenderer.d.ts +6 -0
- package/lib/complex/ObjectRenderer.d.ts +3 -0
- package/lib/complex/OneOfRenderer.d.ts +5 -0
- package/lib/complex/RecursiveTreeRenderer.d.ts +4 -0
- package/lib/complex/RowDetailFrame.d.ts +16 -0
- package/lib/complex/ScalarCompositionRenderer.d.ts +4 -0
- package/lib/complex/TupleAdditionalItems.d.ts +4 -0
- package/lib/complex/TupleControlRenderer.d.ts +6 -0
- package/lib/complex/TupleField.d.ts +4 -0
- package/lib/complex/array/ArrayItemPanels.d.ts +18 -0
- package/lib/complex/array/ArrayItemViewProps.d.ts +11 -0
- package/lib/complex/array/ArrayListDetail.d.ts +9 -0
- package/lib/complex/array/ArrayTable.d.ts +21 -0
- package/lib/complex/index.d.ts +10 -0
- package/lib/complex/mixed/JsonTypeIcon.d.ts +5 -0
- package/lib/complex/mixed/MixedWidgets.d.ts +22 -0
- package/lib/complex/mixed/useConfirmation.d.ts +6 -0
- package/lib/components/ClearValueButton.d.ts +12 -0
- package/lib/components/ScrollRegion.d.ts +4 -0
- package/lib/components/TimePicker.d.ts +13 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/controls/AnyOfStringOrEnumControl.d.ts +4 -0
- package/lib/controls/BooleanControl.d.ts +4 -0
- package/lib/controls/BooleanToggleControl.d.ts +4 -0
- package/lib/controls/ChoiceCards.d.ts +1 -0
- package/lib/controls/DateControl.d.ts +4 -0
- package/lib/controls/DateTimeControl.d.ts +4 -0
- package/lib/controls/EnumControl.d.ts +5 -0
- package/lib/controls/InputControl.d.ts +30 -0
- package/lib/controls/IntegerControl.d.ts +4 -0
- package/lib/controls/NumberControl.d.ts +4 -0
- package/lib/controls/OneOfEnumControl.d.ts +3 -0
- package/lib/controls/PasswordControl.d.ts +9 -0
- package/lib/controls/RadioGroupControl.d.ts +4 -0
- package/lib/controls/SliderControl.d.ts +4 -0
- package/lib/controls/TextControl.d.ts +4 -0
- package/lib/controls/TimeControl.d.ts +4 -0
- package/lib/controls/index.d.ts +15 -0
- package/lib/index.d.ts +6 -0
- package/lib/jsonforms-react-shadcn.cjs.js +3 -0
- package/lib/jsonforms-react-shadcn.cjs.js.map +1 -0
- package/lib/jsonforms-react-shadcn.esm.js +4040 -0
- package/lib/jsonforms-react-shadcn.esm.js.map +1 -0
- package/lib/layouts/CategorizationLayout.d.ts +7 -0
- package/lib/layouts/GroupLayout.d.ts +4 -0
- package/lib/layouts/HorizontalLayout.d.ts +4 -0
- package/lib/layouts/Layout.d.ts +5 -0
- package/lib/layouts/ValidationIndicator.d.ts +4 -0
- package/lib/layouts/VerticalLayout.d.ts +4 -0
- package/lib/layouts/index.d.ts +4 -0
- package/lib/renderers.d.ts +8 -0
- package/lib/util/dateTime.d.ts +12 -0
- package/lib/util/groupState.d.ts +1 -0
- package/lib/util/useTemporalControl.d.ts +28 -0
- package/package.json +86 -3
- package/src/additional/LabelRenderer.tsx +8 -0
- package/src/additional/index.ts +1 -0
- package/src/cells/BooleanCell.tsx +26 -0
- package/src/cells/Cell.tsx +101 -0
- package/src/cells/CompositeCell.tsx +275 -0
- package/src/cells/CompositeDetailDialog.tsx +79 -0
- package/src/cells/EnumCell.tsx +74 -0
- package/src/cells/NumberCell.tsx +51 -0
- package/src/cells/NumberFormatCell.tsx +47 -0
- package/src/cells/TextCell.tsx +40 -0
- package/src/cells/asCell.tsx +79 -0
- package/src/cells/index.ts +7 -0
- package/src/complex/AdditionalProperties.tsx +453 -0
- package/src/complex/AnyOfRenderer.tsx +341 -0
- package/src/complex/ArrayChoicesControl.tsx +303 -0
- package/src/complex/ArrayControlRenderer.tsx +400 -0
- package/src/complex/ArrayPanelToggle.tsx +33 -0
- package/src/complex/CollectionPager.tsx +76 -0
- package/src/complex/CombinatorSwitchDialog.tsx +43 -0
- package/src/complex/DeleteDialog.tsx +41 -0
- package/src/complex/DetailDialogContent.tsx +84 -0
- package/src/complex/ErrorIndicator.tsx +136 -0
- package/src/complex/MixedRenderer.tsx +262 -0
- package/src/complex/ObjectRenderer.tsx +43 -0
- package/src/complex/OneOfRenderer.tsx +14 -0
- package/src/complex/RecursiveTreeRenderer.tsx +20 -0
- package/src/complex/RowDetailFrame.tsx +158 -0
- package/src/complex/ScalarCompositionRenderer.tsx +14 -0
- package/src/complex/TupleAdditionalItems.tsx +94 -0
- package/src/complex/TupleControlRenderer.tsx +54 -0
- package/src/complex/TupleField.tsx +41 -0
- package/src/complex/array/ArrayItemPanels.tsx +217 -0
- package/src/complex/array/ArrayItemViewProps.ts +15 -0
- package/src/complex/array/ArrayListDetail.tsx +165 -0
- package/src/complex/array/ArrayTable.tsx +535 -0
- package/src/complex/index.ts +16 -0
- package/src/complex/mixed/JsonTypeIcon.tsx +41 -0
- package/src/complex/mixed/MixedWidgets.tsx +326 -0
- package/src/complex/mixed/useConfirmation.tsx +34 -0
- package/src/components/ClearValueButton.tsx +56 -0
- package/src/components/ScrollRegion.tsx +27 -0
- package/src/components/TimePicker.tsx +250 -0
- package/src/components/index.ts +2 -0
- package/src/controls/AnyOfStringOrEnumControl.tsx +44 -0
- package/src/controls/BooleanControl.tsx +67 -0
- package/src/controls/BooleanToggleControl.tsx +58 -0
- package/src/controls/ChoiceCards.tsx +9 -0
- package/src/controls/DateControl.tsx +240 -0
- package/src/controls/DateTimeControl.tsx +187 -0
- package/src/controls/EnumControl.tsx +159 -0
- package/src/controls/InputControl.tsx +258 -0
- package/src/controls/IntegerControl.tsx +14 -0
- package/src/controls/NumberControl.tsx +14 -0
- package/src/controls/OneOfEnumControl.tsx +13 -0
- package/src/controls/PasswordControl.tsx +216 -0
- package/src/controls/RadioGroupControl.tsx +72 -0
- package/src/controls/SliderControl.tsx +77 -0
- package/src/controls/TextControl.tsx +50 -0
- package/src/controls/TimeControl.tsx +135 -0
- package/src/controls/index.ts +19 -0
- package/src/index.tsx +10 -0
- package/src/layouts/CategorizationLayout.tsx +248 -0
- package/src/layouts/GroupLayout.tsx +210 -0
- package/src/layouts/HorizontalLayout.tsx +12 -0
- package/src/layouts/Layout.tsx +62 -0
- package/src/layouts/ValidationIndicator.tsx +40 -0
- package/src/layouts/VerticalLayout.tsx +12 -0
- package/src/layouts/index.ts +4 -0
- package/src/renderers.ts +225 -0
- package/src/styles.css +482 -0
- package/src/tailwind-theme.cjs +42 -0
- package/src/theme.css +43 -0
- package/src/util/dateTime.ts +80 -0
- package/src/util/groupState.ts +5 -0
- package/src/util/useTemporalControl.ts +160 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonforms-react-shadcn.esm.js","names":["Tree","_Fragment","TupleField","CommonTupleField","_Fragment","isArrayElementPath","_Fragment","_Fragment","_Fragment","schemaForType","_Fragment","_Fragment","useGroupState","_Fragment","ScalarCompositionRenderer","React","ShadcnAllOfControl","ShadcnAllOfRenderer","isArrayElementPath$1","schemaForType$1","useGroupState$1","dayjs","isEqual","shadcnCompositeCellTester","useConfirmation","useConfirmationState","pending","Dialog","open","close","DialogContent","DialogHeader","DialogTitle","title","DialogDescription","message","DialogFooter","Button","t","confirm","ContainerValidationIndicator","label","useI18n","count","TooltipProvider","Tooltip","TooltipTrigger","CircleAlert","TooltipContent","JsonTypeIcon","type","active","MixedNavigationContext","MixedTypeSelector","translateType","useTranslator","Select","value","onChange","SelectTrigger","clearable","disabled","error","SelectValue","SelectContent","types","SelectItem","event","X","NestedMixedNavigation","selector","onView","Eye","MixedTree","search","setSearch","useState","showPrimitives","setShowPrimitives","renaming","setRenaming","name","setName","props","commitRename","action","destructive","hover","icon","match","mixedTreeLabel","node","render","_props$renderIndicato","structured","selected","mixedPathKey","Collapsible","CollapsibleTrigger","ChevronRight","Input","jsx","EyeOff","Pencil","Trash2","CollapsibleContent","RecursiveTreeRenderer","createRecursiveTreeRenderer","ChoiceCards","createChoiceCards","ErrorIndicator","useErrorFeedback","errors","path","local","timer","trigger","content","cancelClose","show","setOpen","scheduleClose","_content$current","className","Popover","PopoverTrigger","PopoverContent","ErrorSummaryList","toggle","expanded","_typeof","o","toPrimitive","e","i","r","toPropertyKey","_defineProperty","ownKeys","_objectSpread2","ShadcnCellMode","createContext","asShadcnCell","Control","ConnectedGridCellFrame","withJsonFormsCellProps","_uischema$options","uischema","schema","ShadcnGridCellFrame","hasClearableValue","data","ClearValueButton","enabled","readonly","adornmentAware","trailingControlSpace","onClear","toStringValue","makeId","InputShell","rawErrors","_uischema$options$hid","_ref","ctx","useJsonForms","usePreTouchErrors","config","help","getControlHelp","focused","cell","useContext","adornmentOptions","adorned","InputAdornments","onFocus","onBlur","id","required","ShadcnInputControl","originalHandleChange","_uischema$options$for","_uischema$options2","_uischema$options$res","_uischema$options3","_ref2","_uischema$options$cle","_uischema$options4","keepEmptyString","useMixedScalar","handleChange","target","visible","inputType","suggestions","ShadcnNumberControl","_ref3","_uischema$options$cle2","_uischema$options5","keepSelectedType","chipsControlTester","rankWith","and","uiTypeIs","isChipsControl","multiSelectControlTester","isMultiSelectControl","enumChoices","items","resolveItemSchema","root","strings","arrayChoicesOf","branches","branch","_branch$title","enumArrayControlTester","schemaMatches","ShadcnArrayChoicesControl","_context$core","_options$placeholder","draft","setDraft","context","translate","options","chips","dropdown","values","asArrayValue","choices","rootSchema","primary","additional","displayableErrors","itemErrors","arrayChoiceItemErrors","itemSchema","itemMessages","_context$i18n$transla","_context$i18n","getCombinedErrorMessage","defaultErrorTranslator","index","limits","_choices$find$label","_choices$find","sameChoice","choice","remove","canRemoveChoice","removeChoiceAt","add","canAddChoice","addChoice","choiceList","checks","checked","isSelected","Checkbox","pills","Fragment","Plus","ChevronDown","MESSAGE_STYLE","ScalarCompositionRenderer_default","withJsonFormsControlProps","ScalarCompositionControl","isPassword","isStringControl","or","formatIs","optionIs","passwordControlTester","passwordOtpControlTester","ShadcnPasswordControl","revealed","setRevealed","inputs","useRef","length","revealLabel","commit","next","focus","input","replace","start","text","_value$index","element","v","ShadcnPasswordOtpControl","DeleteDialog","onCancel","onConfirm","CollectionPager","page","Pagination","size","PaginationContent","PaginationItem","ChevronLeft","TupleAdditionalItems","useTupleAdditionalItems","deletion","canAdd","PendingChangesProvider","visibleIndices","renderItem","canDelete","positionLabel","_objectWithoutPropertiesLoose","n","_objectWithoutProperties","s","_excluded$3","ScrollRegion","ScrollArea","style","children","ScrollBar","_excluded$2","DetailDialogContent","_geometry$style$width","geometry","useDetailDialog","parts","Minimize2","Maximize2","CompositeDetailDialog","dialog","useCompositeDraft","JsonFormsContext","TupleField$1","TupleField","tupleControlRendererTester","tupleControlTester","TupleControl","model","useTupleControl","TupleControlContent","shownErrors","TupleControlRenderer","connectTupleControl","anyOfStringOrEnumControlTester","ShadcnAnyOfStringOrEnumControl","_props$schema$anyOf","_branch$enum","ShadcnLabelRenderer","labelRendererTester","AdditionalProperties","newPropertyName","setNewPropertyName","renamingPropertyName","setRenamingPropertyName","renameValue","setRenameValue","entries","useAdditionalPropertyEntries","additionalPropertiesTitle","objectSchema","constraintMessage","useNameConstraintMessage","validatePropertyName","_constraintMessage","result","validateAdditionalPropertyName","nameSchema","appliedOptions","propertyName","propertyNameError","useAdditionalPropertyActions","renameProperty","trimmed","renameError","propertyToRename","objectData","updatedData","renamePropertyKey","closeRenameDialog","renameDisabled","propertyErrors","useAdditionalPropertyErrors","nameErrors","usePropertyNameErrors","shouldShow","Card","embedded","addProperty","addPropertyDisabled","additionalPropertyItems","item","removePropertyDisabled","removeProperty","needsIsolatedEditor","IsolatedPropertyEditor","literalPropertySchema","assignOwnProperty","clearedDynamicPropertyValue","DynamicPropertyProvider","JsonFormsDispatch","dialogOpen","CombinatorSwitchDialog","nextOpen","isEmptyData","ShadcnAnyOfRenderer","_discriminatorBranch","_indexOfFittingSchema","formContext","discriminatorBranch","combinator","indexOfFittingSchema","selectorId","useId","selectedIndex","setSelectedIndex","chosen","setChosen","confirmation","pendingIndex","setPendingIndex","previousInput","setPreviousInput","isUnselectedBranchValue","useCombinatorSelection","selectSchema","useCallback","resetData","createDefaultValue","renderInfos","handleTabChange","discardedByBranchChange","_formContext$core","branchChangeData","clearedBranchValue","info","nextDefault","CombinatorProperties","CombinatorBranch","selectionError","Tabs","TabsList","TabsTrigger","renderInfo","TabsContent","anyOfControlTester","isAnyOfControl","ShadcnAnyOfControl","withJsonFormsAnyOfProps","ArrayPanelToggle","panel","ChevronUp","RowDetailFrame","createRowDetailFrame","state","_state$content","ResizablePanelGroup","panelOpen","ResizablePanel","ResizableHandle","RowDetailToggle","createRowDetailToggle","RowDetailEditButton","TableCellErrors","ArrayTable","columnWidths","columnSizes","columns","resolveTableColumns","objectRows","hasRowActions","rowDetail","tableWidth","sum","width","ArrayTableHead","ArrayTableRow","composePaths","CollectionErrorNavigation","renderErrorNavigationButton","_schema$properties","definitions","properties","tableColumnFields","_options$cells","definition","column","field","rowBound","source","Resolve","tableColumnStyle","cellOptions","columnHeader","selectionColumnStyle","_columnWidths$__actio","setColumnWidths","selectedCount","selection","pageChecked","selectPageLabel","_schema$required","_options$cells$field$","_options$cells2","header","ColumnResizeHandle","widths","current","ArrayRowActions","editable","_rowDetail$options","RowErrorCount","showSortButtons","translations","moveUp","moveDown","_definition$headerNam","createCleanLabel","_rowDetail$options2","_rowDetail$selection","_columnWidths$__actio2","table","actionProps","rowPath","cellPath","propertyBound","ItemProvider","DispatchCell","editorOptions","ArrayItemPanel","hideAvatar","indicator","actions","ArrayItemActions","_uischema$options$sho","settings","canMove","onMove","ArrowUp","ArrowDown","removeLabel","removeTooltip","canRemove","requestRemove","ArrayItemPanels","indices","childPath","childLabel","childLabelForIndex","ItemValidationIndicator","expandedIndex","onExpand","detail","_excluded$1","ArrayListDetail","itemProps","emptyMessage","activeIndex","selectedItem","ItemGroup","itemLabel","ArrayListItem","Item","ItemContent","onSelect","Avatar","AvatarFallback","Check","ItemActions","usesDefaultDetail","supportsDefaultTable","isObjectArrayWithNesting","createControlElement","arraySchema","arrayPresentation","ShadcnArrayRenderer","_uischema$options$ele","_translations$addAria","_translations$addTool","arrayErrors","usePathErrorIndicator","setExpandedIndex","resolveCollapsed","removeItem","removeItems","moveItem","direction","useTableSelection","useColumnWidths","setSelectedItem","useArrayPanelState","_ctx$core","shouldConfirm","_ctx$uischemas","findDetailUISchema","childLabelProp","getFirstPrimitiveProp","presentation","useCollectionPagination","useRowDetail","itemView","_ctx$core2","labelValue","addItem","arrayControlTester","schemaTypeIs","MixedRendererComponent","useMixedRenderer","parentNavigation","renderedControl","MixedDetailControl","isStructuredType","selectedType","validateNodeRename","_model$jsonforms$core","oldName","parent","mixedParentNode","tree","canRenameNode","nextName","renameNode","structuredLayout","MixedCodeControl","collapsible","selectedNode","setSelectedPath","Breadcrumb","BreadcrumbList","BreadcrumbSeparator","BreadcrumbItem","BreadcrumbPage","nodePath","BreadcrumbLink","MixedNodeControl","MixedRenderer","ShadcnObjectRenderer","createObjectRenderer","ShadcnOneOfRenderer","oneOfControlTester","isOneOfControl","ShadcnOneOfControl","withJsonFormsOneOfProps","BooleanValueLabel","ShadcnBooleanControl","booleanControlTester","isBooleanControl","saveFormats","specDateSaveFormat","specTimeSaveFormat","specDateTimeSaveFormat","displayFormats","placeholderKeys","resolveTimeViews","timeViews","views","view","hasTimeViews","displayFormat","resolvePresentation","_options","_options2","ampm","kind","defaultPlaceholder","useTemporalControl","_bounds$min","_bounds$max","saveFormat","formats","parseDateValue","selectedTime","precision","useSeconds","resolveDataBounds","bounds","temporalBounds","restrict","effectiveRestrict","comparable","date","allowed","formatDate","pad","formatDisplayDate","resolveIntlLocale","locale","parseTimeValue","_match$","formatTimeValue","time","formatDisplayTime","period","formatDisplayDateTime","ShadcnDateControl","_ctx$i18n","_max$getFullYear","_min$getFullYear","_props$config","temporal","datePattern","literal","token","selectedDate","parse","isValid","monthYearOnly","initialDate","calendarYear","disabledDates","CalendarIcon","format","placeholder","_ctx$i18n2","month","max","min","_min$getFullYear2","year","Calendar","dateControlTester","isDateControl","partActionKeys","emptyTime","TimePartInput","part","onStep","displayedValue","isAllowed","onValueChange","TimePeriodButtons","hours","displayHour","TimePicker","parsedValue","setTime","previousValue","setPreviousValue","updatePart","maximum","stepPart","amount","displayedHour","updateDisplayedHour","_time$hours","hour","normalized","isPm","setPeriod","renderPart","showHours","showMinutes","ShadcnDateTimeControl","_useJsonForms$i18n","_temporal$selected","draftDate","setDraftDate","draftTime","setDraftTime","updateValue","CalendarClock","nextTime","dateTimeControlTester","isDateTimeControl","enumPresentation","_local$autocomplete","_local$clearable","_local$placeholder","global","ShadcnEnumControl","query","setQuery","searchable","option","showClear","enumControlTester","isEnumControl","ShadcnIntegerControl","integerControlTester","isIntegerControl","ShadcnNumberInputControl","numberControlTester","isNumberControl","ShadcnTextControl","_props$uischema$optio","_props$uischema$optio2","_props$uischema$optio3","Textarea","textControlTester","ShadcnTimeControl","Clock3","timeControlTester","isTimeControl","oneOfEnumControlTester","isOneOfEnumControl","ShadcnOneOfEnumControl","withJsonFormsOneOfEnumProps","withTranslateProps","ShadcnBooleanToggleControl","committed","stateId","Switch","booleanToggleControlTester","ShadcnRadioGroupControl","_props$options","orientation","RadioGroup","RadioGroupItem","radioGroupControlTester","ShadcnSliderControl","_props$schema$minimum","_props$schema$maximum","_props$schema$multipl","position","Slider","sliderControlTester","isRangeControl","Indicators","group","useGroupState","category","validation","useContainerValidation","ShadcnCategorizationLayout","_categorization$optio","baseId","categorization","variant","useCategorySelection","categories","key","categoryKey","deriveLabelForUISchemaElement","indicators","categoryId","select","categorizationTester","categorizationAccordionTester","categorizationHasCategory","categorizationStepperTester","_excluded","ShadcnLayout","_layout$elements","layout","elements","useEffectiveElements","gap","resolveGap","grid","resolveGridColumns","containerStyle","_layout$options","_child$scope","itemSizing","child","ShadcnGroupLayout","_regions$header","_regions$header2","_regions$header3","_regions$header4","_props$uischema$eleme","_props$uischema$eleme2","regions","renderRegion","footer","hasRegions","HeaderSection","CardHeader","headerTitle","useGroupHeaderTitle","ObjectDetailContext","object","ObjectErrorContext","objectOwned","objectErrors","headerElements","CardTitle","CardContent","CardFooter","groupTester","ShadcnHorizontalLayout","horizontalLayoutTester","ShadcnVerticalLayout","verticalLayoutTester","ShadcnNumberCell","numberFormatCellTester","isNumberFormatControl","ShadcnNumberFormatCell","toFormatted","fromFormatted","Component","copy","equal","a","b","ShadcnCompositeCell","_parent$core","_props$schema$title","_options$showTypeIndi","_props$schema","_options$summary","_options$summary2","_options$summary3","_options$summary4","_props$schema$title2","_parent$uischemas","_options$emptyLabel","_options$cancelLabel","_options$okLabel","invalidEditorDraft","hasInvalidCompositeEditorDraft","d","useI18nDefault","pendingDelete","setPendingDelete","draftRef","original","setOriginal","useCompositeCellPresentation","_parent$core2","dispatch","UPDATE_DATA","coreReducer","isArray","conflicted","canClear","preventsEmpty","summary","CellSummary","_parent$core3","resolveEditorDetail","update","_draftRef$current","ShadcnBooleanCell","ShadcnEnumCell","_schema$oneOf","_choices$map","prefix","getI18nKeyPrefix","oneOfToEnumOptionMapper","entry","_choices$index$label","enumToEnumOptionMapper","ShadcnTextCell","shadcnCells","dynamicCellEntry","shadcnRenderers","dynamicRendererEntry","recursiveTreeTester","choiceCardsTester","scalarCompositionTester","withJsonFormsLayoutProps","withJsonFormsEnumProps","allOfControlTester","mixedControlTester","withJsonFormsArrayLayoutProps","objectControlTester","withJsonFormsLabelProps","advancedShadcnRenderers","isArrayElementPath","isMixedControl","isMixedSchema","schemaForType"],"sources":["../src/complex/mixed/useConfirmation.tsx","../src/layouts/ValidationIndicator.tsx","../src/complex/mixed/JsonTypeIcon.tsx","../src/complex/mixed/MixedWidgets.tsx","../src/complex/RecursiveTreeRenderer.tsx","../src/controls/ChoiceCards.tsx","../src/complex/ErrorIndicator.tsx","../src/cells/asCell.tsx","../src/components/ClearValueButton.tsx","../src/controls/InputControl.tsx","../src/complex/ArrayChoicesControl.tsx","../src/complex/ScalarCompositionRenderer.tsx","../src/controls/PasswordControl.tsx","../src/complex/DeleteDialog.tsx","../src/complex/CollectionPager.tsx","../src/complex/TupleAdditionalItems.tsx","../src/components/ScrollRegion.tsx","../src/complex/DetailDialogContent.tsx","../src/cells/CompositeDetailDialog.tsx","../src/complex/TupleField.tsx","../src/complex/TupleControlRenderer.tsx","../src/controls/AnyOfStringOrEnumControl.tsx","../src/additional/LabelRenderer.tsx","../src/complex/AdditionalProperties.tsx","../src/complex/CombinatorSwitchDialog.tsx","../src/complex/AnyOfRenderer.tsx","../src/complex/ArrayPanelToggle.tsx","../src/complex/RowDetailFrame.tsx","../src/complex/array/ArrayTable.tsx","../src/complex/array/ArrayItemPanels.tsx","../src/complex/array/ArrayListDetail.tsx","../src/complex/ArrayControlRenderer.tsx","../src/complex/MixedRenderer.tsx","../src/complex/ObjectRenderer.tsx","../src/complex/OneOfRenderer.tsx","../src/controls/BooleanControl.tsx","../src/util/useTemporalControl.ts","../src/util/dateTime.ts","../src/controls/DateControl.tsx","../src/components/TimePicker.tsx","../src/controls/DateTimeControl.tsx","../src/controls/EnumControl.tsx","../src/controls/IntegerControl.tsx","../src/controls/NumberControl.tsx","../src/controls/TextControl.tsx","../src/controls/TimeControl.tsx","../src/controls/OneOfEnumControl.tsx","../src/controls/BooleanToggleControl.tsx","../src/controls/RadioGroupControl.tsx","../src/controls/SliderControl.tsx","../src/layouts/CategorizationLayout.tsx","../src/layouts/Layout.tsx","../src/layouts/GroupLayout.tsx","../src/layouts/HorizontalLayout.tsx","../src/layouts/VerticalLayout.tsx","../src/cells/NumberCell.tsx","../src/cells/NumberFormatCell.tsx","../src/cells/CompositeCell.tsx","../src/cells/BooleanCell.tsx","../src/cells/EnumCell.tsx","../src/cells/TextCell.tsx","../src/cells/Cell.tsx","../src/renderers.ts"],"sourcesContent":["import React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n DialogFooter,\n} from '@jsonforms-react-shadcn-ui/dialog';\nimport { useConfirmationState } from '@chobantonov/jsonforms-react-renderer-common/interaction/useConfirmationState';\n\n/** Presents the shared destructive-change policy with a shadcn dialog. */\nexport const useConfirmation = () => {\n const { t, pending, request, close, confirm, title, message } =\n useConfirmationState();\n const dialog = pending ? (\n <Dialog open onOpenChange={(open) => !open && close()}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{message}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button variant='outline' onClick={close}>\n {t('confirm.decline')}\n </Button>\n <Button onClick={confirm}>{t('confirm.accept')}</Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ) : null;\n return { request, dialog };\n};\n","import React from 'react';\nimport { CircleAlert } from 'lucide-react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@jsonforms-react-shadcn-ui/tooltip';\n\nexport const ContainerValidationIndicator = ({ count }: { count?: number }) => {\n const t = useI18n();\n const label = t(\n count === undefined\n ? 'validation.containerHasErrors'\n : count === 1\n ? 'validation.containerError'\n : 'validation.containerErrors',\n { count },\n );\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n role='img'\n aria-label={label}\n tabIndex={0}\n data-container-validation-indicator\n data-error-count={count}\n className='inline-flex shrink-0 items-center align-middle leading-none text-destructive'\n >\n <CircleAlert className='h-4 w-4' aria-hidden='true' />\n </span>\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import React from 'react';\n\n// Keep the shapes in sync with the Svelte renderers' JsonTypeIcon.\nexport const JsonTypeIcon = ({\n type,\n active = false,\n}: {\n type: string | null;\n active?: boolean;\n}) => (\n <svg\n aria-hidden='true'\n data-json-type={type}\n className={`h-4 w-4 shrink-0 fill-none stroke-current ${\n active ? 'text-foreground' : 'text-muted-foreground'\n }`}\n viewBox='0 0 24 24'\n strokeWidth='2.5'\n strokeLinecap='round'\n strokeLinejoin='round'\n >\n {type === 'object' && (\n <path d='M8 3c-1.5 0-3 1-3 3v3c0 1.5-1 2-2 2 1 0 2 .5 2 2v3c0 2 1.5 3 3 3M16 3c1.5 0 3 1 3 3v3c0 1.5 1 2 2 2-1 0-2 .5-2 2v3c0 2-1.5 3-3 3' />\n )}\n {type === 'array' && <path d='M8 4H5v16h3M16 4h3v16h-3' />}\n {type === 'string' && <path strokeWidth='2' d='M7 8h10M7 12h10M7 16h6' />}\n {(type === 'number' || type === 'integer') && (\n <g strokeWidth='2'>\n <path d='M9 4v16M15 4v16' />\n <path d='M4 9h16M4 15h16' />\n </g>\n )}\n {type === 'boolean' && <path d='M4 12l5 5L20 7' strokeWidth='3' />}\n {type === 'null' && (\n <g strokeWidth='2'>\n <circle cx='12' cy='12' r='9' />\n <path d='M18.5 5.5l-13 13' />\n </g>\n )}\n </svg>\n);\n","import {\n useTranslator,\n useI18n,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport type { MixedTreeProps } from '@chobantonov/jsonforms-react-renderer-common/mixed/RecursiveTreeRenderer';\nimport { JsonTypeIcon } from './JsonTypeIcon';\nimport React, { useState } from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@jsonforms-react-shadcn-ui/select';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '@jsonforms-react-shadcn-ui/collapsible';\nimport {\n TooltipProvider,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport { ChevronRight, Pencil, Trash2, Eye, EyeOff, X } from 'lucide-react';\nimport {\n MixedTreeNode,\n mixedPathKey,\n mixedTreeLabel,\n} from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedTree';\n\nexport const MixedNavigationContext = React.createContext<{\n selectPath: (path: string) => void;\n} | null>(null);\nexport const MixedTypeSelector = ({\n clearable = true,\n disabled,\n error,\n onChange,\n types,\n value,\n}: {\n clearable?: boolean;\n disabled: boolean;\n error?: string;\n fullWidth?: boolean;\n required?: boolean;\n onChange: (value: string | undefined) => void;\n types: string[];\n value: string | null;\n}) => {\n const t = useI18n();\n const translateType = useTranslator();\n return (\n <div className='min-w-0'>\n <div className='group relative'>\n <Select\n disabled={disabled}\n value={value ?? ''}\n onValueChange={onChange}\n >\n <SelectTrigger\n className={\n clearable && value && !disabled\n ? 'w-full pr-16 [&>svg]:absolute [&>svg]:right-3'\n : 'w-full'\n }\n aria-label={t('mixed.typeLabel')}\n aria-invalid={!!error}\n >\n <SelectValue placeholder={t('mixed.typePlaceholder')} />\n </SelectTrigger>\n <SelectContent>\n {types.map((type) => (\n <SelectItem\n key={translateType(`mixed.type.${type}`, type)}\n value={type}\n >\n {translateType(`mixed.type.${type}`, type)}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {clearable && value && !disabled && (\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n disabled={disabled}\n aria-label={t('mixed.clearType')}\n title={t('mixed.clearType')}\n className='absolute right-7 top-1/2 h-7 w-7 -translate-y-1/2 opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 [@media(hover:none)]:opacity-100'\n onPointerDown={(event) => event.preventDefault()}\n onClick={(event) => {\n event.stopPropagation();\n onChange(undefined);\n }}\n >\n <X aria-hidden='true' />\n </Button>\n )}\n </div>\n {error && (\n <div role='alert' className='text-sm text-destructive'>\n {error}\n </div>\n )}\n </div>\n );\n};\nexport const NestedMixedNavigation = ({\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 <div className='space-y-1'>\n {label && <div>{label}</div>}\n <div className='flex items-center gap-2'>\n {selector}\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n aria-label={t('mixed.view', { label: label || t('control.value') })}\n onClick={onView}\n >\n <Eye aria-hidden='true' />\n </Button>\n </div>\n </div>\n );\n};\n\nexport const MixedTree = (props: MixedTreeProps) => {\n const t = useI18n();\n const [search, setSearch] = useState('');\n const [showPrimitives, setShowPrimitives] = useState(false);\n const [renaming, setRenaming] = useState<MixedTreeNode>();\n const [name, setName] = useState('');\n const error = renaming ? props.validateRename(renaming, name) : undefined;\n const commitRename = () => {\n if (renaming && !error) {\n props.onRename(renaming, name);\n setRenaming(undefined);\n }\n };\n const action = (\n label: string,\n icon: React.ReactNode,\n onClick: () => void,\n hover = false,\n destructive = false,\n ) => (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant={destructive ? 'destructive' : 'ghost'}\n size='icon-sm'\n aria-label={label}\n className={\n hover\n ? 'shrink-0 opacity-0 group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 [@media(hover:none)]:opacity-100'\n : 'shrink-0'\n }\n onClick={onClick}\n >\n {icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n );\n const match = (node: MixedTreeNode): boolean =>\n mixedTreeLabel(node).toLowerCase().includes(search.toLowerCase()) ||\n node.children.some(match);\n const render = (node: MixedTreeNode): React.ReactNode => {\n const structured = node.type === 'object' || node.type === 'array';\n const selected =\n mixedPathKey(props.selectedPath) === mixedPathKey(node.path);\n if (\n search ? !match(node) : node.path.length && !structured && !showPrimitives\n )\n return null;\n return (\n <Collapsible\n key={mixedPathKey(node.path)}\n defaultOpen={props.domainTree && node.path.length === 0}\n >\n <div className='group/tree-row flex min-w-0 items-center gap-1'>\n {node.children.length > 0 ? (\n <CollapsibleTrigger\n render={<Button type='button' variant='ghost' size='icon-sm' />}\n className='size-8 shrink-0'\n aria-label={t('mixed.expand', { label: mixedTreeLabel(node) })}\n >\n <ChevronRight aria-hidden='true' />\n </CollapsibleTrigger>\n ) : (\n <span aria-hidden='true' className='size-8 shrink-0' />\n )}\n {renaming &&\n mixedPathKey(renaming.path) === mixedPathKey(node.path) ? (\n <div className='flex min-w-0 flex-1 items-start gap-2'>\n <JsonTypeIcon type={node.type} active={selected} />\n <div className='min-w-0 flex-1'>\n <Input\n autoFocus\n aria-label={t('additionalProperties.namePlaceholder')}\n value={name}\n aria-invalid={!!error}\n onChange={(event) => setName(event.target.value)}\n onBlur={commitRename}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n commitRename();\n }\n if (event.key === 'Escape') {\n event.preventDefault();\n setRenaming(undefined);\n }\n }}\n />\n {error && (\n <p\n role='alert'\n className='text-sm text-destructive break-words'\n >\n {error}\n </p>\n )}\n </div>\n </div>\n ) : (\n <Button\n type='button'\n variant={selected ? 'secondary' : 'ghost'}\n className='min-w-0 flex-1 justify-start'\n data-recursive-node={\n props.domainTree ? mixedPathKey(node.path) : undefined\n }\n aria-pressed={selected}\n onClick={() => props.onSelect(node)}\n >\n <JsonTypeIcon type={node.type} active={selected} />\n <span className='truncate'>\n {node.path.length === 0 ? node.label : mixedTreeLabel(node)}\n </span>\n </Button>\n )}\n {props.renderIndicator?.(node)}\n {!props.domainTree &&\n node.path.length === 0 &&\n action(\n t(\n showPrimitives\n ? 'mixed.hidePrimitives'\n : 'mixed.showPrimitives',\n ),\n showPrimitives ? (\n <Eye aria-hidden='true' />\n ) : (\n <EyeOff aria-hidden='true' />\n ),\n () => setShowPrimitives(!showPrimitives),\n )}\n {props.canRename(node) &&\n !renaming &&\n action(\n t('additionalProperties.renameNamed', {\n name: mixedTreeLabel(node),\n }),\n <Pencil aria-hidden='true' />,\n () => {\n setRenaming(node);\n setName(\n props.domainTree\n ? node.label\n : String(node.path[node.path.length - 1]),\n );\n },\n true,\n )}\n {props.canDelete(node) &&\n !renaming &&\n action(\n t('additionalProperties.deleteNamed', {\n name: mixedTreeLabel(node),\n }),\n <Trash2 aria-hidden='true' />,\n () => props.onDelete(node),\n true,\n true,\n )}\n </div>\n <CollapsibleContent keepMounted className='pl-3'>\n {node.children.map(render)}\n </CollapsibleContent>\n </Collapsible>\n );\n };\n return (\n <TooltipProvider>\n <div className='min-w-0 space-y-2 p-1'>\n <Input\n aria-label={t('mixed.searchLabel')}\n placeholder={t('mixed.searchPlaceholder')}\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n />\n <nav aria-label={t('mixed.treeLabel')}>{render(props.root)}</nav>\n </div>\n </TooltipProvider>\n );\n};\n","import React from 'react';\nimport { useConfirmation } from './mixed/useConfirmation';\nimport {\n createRecursiveTreeRenderer,\n recursiveTreeTester,\n} from '@chobantonov/jsonforms-react-renderer-common/mixed/RecursiveTreeRenderer';\nimport { ContainerValidationIndicator } from '../layouts/ValidationIndicator';\nimport { MixedTree as Tree } from './mixed/MixedWidgets';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nexport { recursiveTreeTester };\nexport const RecursiveTreeRenderer = createRecursiveTreeRenderer(\n Tree,\n ContainerValidationIndicator,\n ({ children, onClick }) => (\n <Button variant='link' type='button' onClick={onClick}>\n {children}\n </Button>\n ),\n useConfirmation,\n);\n","import { createChoiceCards } from '@chobantonov/jsonforms-react-renderer-common/composition/choiceCards';\nimport { useConfirmation } from '../complex/mixed/useConfirmation';\nexport const ChoiceCards = createChoiceCards(useConfirmation, () => ({\n border: 'hsl(var(--border, 214.3 31.8% 91.4%))',\n selected: 'hsl(var(--primary, 222.2 47.4% 11.2%))',\n focus: 'hsl(var(--ring, 222.2 84% 4.9%))',\n background: 'hsl(var(--card, 0 0% 100%))',\n error: 'hsl(var(--destructive, 0 84.2% 60.2%))',\n}));\n","import React from 'react';\nimport { CircleAlert } from 'lucide-react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Tooltip,\n TooltipProvider,\n TooltipTrigger,\n TooltipContent,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@jsonforms-react-shadcn-ui/popover';\nimport {\n ErrorSummaryList,\n useErrorFeedback,\n} from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\n\nexport const ErrorIndicator = ({\n errors,\n className,\n path,\n local = false,\n}: {\n errors: string;\n className?: string;\n path?: string;\n local?: boolean;\n}) => {\n const { open, setOpen, count, entries, message } = useErrorFeedback(\n errors,\n path,\n local,\n );\n const timer = React.useRef<ReturnType<typeof setTimeout>>();\n const trigger = React.useRef<HTMLButtonElement>(null);\n const content = React.useRef<HTMLDivElement>(null);\n const cancelClose = () => {\n if (timer.current) clearTimeout(timer.current);\n };\n const show = () => {\n cancelClose();\n setOpen(true);\n };\n const scheduleClose = () => {\n cancelClose();\n timer.current = setTimeout(() => {\n if (\n trigger.current !== document.activeElement &&\n !content.current?.contains(document.activeElement)\n )\n setOpen(false);\n }, 200);\n };\n React.useEffect(\n () => () => {\n if (timer.current) clearTimeout(timer.current);\n },\n [],\n );\n if (count <= 1)\n return (\n <TooltipProvider>\n <Tooltip onOpenChange={setOpen}>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n className={`h-6 w-6 shrink-0 p-0 text-destructive ${\n className ?? ''\n }`}\n aria-label={errors}\n >\n <CircleAlert className='h-4 w-4' aria-hidden='true' />\n </Button>\n </TooltipTrigger>\n <TooltipContent className='max-w-sm whitespace-pre-line'>\n {message}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n ref={trigger}\n onPointerEnter={show}\n onPointerLeave={scheduleClose}\n onFocus={show}\n onBlur={scheduleClose}\n onClick={(event) => {\n event.preventDefault();\n show();\n }}\n className={`h-6 w-6 shrink-0 p-0 text-destructive ${className ?? ''}`}\n aria-label={errors}\n >\n <CircleAlert className='h-4 w-4' aria-hidden='true' />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n className='w-auto'\n align='start'\n onOpenAutoFocus={(event) => event.preventDefault()}\n onCloseAutoFocus={(event) => event.preventDefault()}\n onPointerEnter={cancelClose}\n onPointerLeave={scheduleClose}\n onFocusCapture={cancelClose}\n onBlurCapture={scheduleClose}\n >\n <div ref={content}>\n <ErrorSummaryList\n entries={entries}\n renderToggle={(label, toggle, expanded) => (\n <Button\n type='button'\n variant='link'\n onClick={toggle}\n aria-expanded={expanded}\n >\n {label}\n </Button>\n )}\n />\n </div>\n </PopoverContent>\n </Popover>\n );\n};\n","import React, { createContext } from 'react';\nimport {\n CellProps,\n ControlElement,\n JsonSchema,\n UISchemaElement,\n} from '@jsonforms/core';\nimport { withJsonFormsCellProps } from '@jsonforms/react';\nimport { ErrorIndicator } from '../complex/ErrorIndicator';\n\nexport const ShadcnCellMode = createContext(false);\n\n/** DispatchCell paths already include the field scope; connected controls must not append it again. */\nexport const asShadcnCell = <P extends { uischema?: UISchemaElement }>(\n Control: React.ComponentType<P>,\n): React.ComponentType<P> => {\n const Cell = (props: P) => (\n <ShadcnCellMode.Provider value={true}>\n <Control\n {...props}\n uischema={{ ...props.uischema, scope: '#', label: false } as any}\n />\n </ShadcnCellMode.Provider>\n );\n return Cell;\n};\n\n/** AG Grid cells fill a row; center short controls such as checkboxes vertically. */\nconst ConnectedGridCellFrame = withJsonFormsCellProps(\n ({\n children,\n errors,\n path,\n schema,\n uischema,\n }: React.PropsWithChildren<CellProps>) => (\n <div\n className='shadcn-jsonforms-grid-cell'\n style={{\n display: 'flex',\n alignItems: 'center',\n height: '100%',\n minWidth: 0,\n width: '100%',\n }}\n >\n <div\n className='shadcn-jsonforms-grid-cell-content'\n style={{ flex: 1, minWidth: 0 }}\n >\n {children}\n </div>\n {errors &&\n uischema.options?.summary?.type !== 'Label' &&\n schema.type !== 'object' &&\n schema.type !== 'array' && (\n <ErrorIndicator\n local\n errors={errors}\n path={path}\n className='shadcn-jsonforms-cell-error'\n />\n )}\n </div>\n ),\n);\n\nexport const ShadcnGridCellFrame = (\n props: React.PropsWithChildren<{\n schema?: JsonSchema;\n uischema?: UISchemaElement;\n path: string;\n }>,\n) => (\n <ConnectedGridCellFrame\n {...props}\n uischema={props.uischema as ControlElement}\n />\n);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { X } from 'lucide-react';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\n\nexport interface ClearValueButtonProps {\n clearable?: boolean;\n adornmentAware?: boolean;\n trailingControlSpace?: number;\n data: unknown;\n enabled: boolean;\n onClear: () => void;\n readonly?: boolean;\n}\n\nexport const hasClearableValue = (data: unknown) =>\n data !== undefined && data !== null && data !== '';\n\nexport const ClearValueButton = ({\n clearable = true,\n adornmentAware = true,\n trailingControlSpace = 0,\n data,\n enabled,\n onClear,\n readonly,\n}: ClearValueButtonProps) => {\n const t = useI18n();\n if (!clearable || !enabled || readonly || !hasClearableValue(data)) {\n return null;\n }\n\n return (\n <Button\n aria-label={t('control.clearValue')}\n className='absolute top-1/2 h-8 w-8 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100'\n style={{\n insetInlineEnd: adornmentAware\n ? `calc(0.25rem + var(--jf-end-adornment-space, 0px) + ${trailingControlSpace}px)`\n : '0.25rem',\n }}\n onClick={(event) => {\n event.stopPropagation();\n onClear();\n }}\n onMouseDown={(event) => event.preventDefault()}\n onPointerDown={(event) => event.preventDefault()}\n size='icon'\n title={t('control.clearValue')}\n type='button'\n variant='ghost'\n >\n <X className='h-4 w-4' />\n </Button>\n );\n};\n","import { useMixedScalar } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedScalar';\nimport { usePreTouchErrors } from '@chobantonov/jsonforms-react-renderer-common/validation/preTouchErrors';\nimport { useJsonForms } from '@jsonforms/react';\nimport {\n getControlHelp,\n ControlHelpProps,\n} from '@chobantonov/jsonforms-react-renderer-common/controls/controlHelp';\nimport { ControlProps } from '@jsonforms/core';\nimport React, { useContext } from 'react';\nimport { InputAdornments } from '@chobantonov/jsonforms-react-renderer-common/controls/inputAdornments';\nimport { ShadcnCellMode } from '../cells/asCell';\nimport { ClearValueButton } from '../components/ClearValueButton';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\n\nexport const toStringValue = (value: unknown) =>\n value === undefined ? '' : String(value);\n\nexport const makeId = (path: string, label?: string) =>\n `shadcn-jsonforms-${path || label || 'root'}`.replace(/[^a-zA-Z0-9_-]/g, '-');\n\nexport const InputShell = ({\n id,\n label,\n required,\n description,\n errors: rawErrors,\n path = '',\n schema,\n children,\n config,\n uischema,\n}: React.PropsWithChildren<\n ControlHelpProps & {\n config?: ControlHelpProps['config'] & { hideRequiredAsterisk?: boolean };\n uischema?: ControlHelpProps['uischema'] & {\n label?: ControlProps['uischema']['label'];\n options?: { hideRequiredAsterisk?: boolean };\n };\n id: string;\n path?: string;\n schema?: ControlProps['schema'];\n label?: string;\n required?: boolean;\n description?: string;\n errors?: string;\n }\n>) => {\n const ctx = useJsonForms();\n const { errors, focused, onFocus, onBlur } = usePreTouchErrors({\n errors: rawErrors,\n path,\n schema,\n config: config ?? ctx.config,\n uischema: uischema as ControlProps['uischema'],\n });\n const help = getControlHelp(\n { description, errors, config: config ?? ctx.config, uischema },\n focused,\n );\n const cell = useContext(ShadcnCellMode);\n const adornmentOptions = uischema?.options as\n | Record<string, unknown>\n | undefined;\n const adorned = (\n <InputAdornments schema={schema} options={adornmentOptions}>\n {children}\n </InputAdornments>\n );\n if (cell)\n return (\n <div\n className='shadcn-jsonforms-cell'\n title={errors || undefined}\n onFocusCapture={onFocus}\n onBlurCapture={onBlur}\n >\n {adorned}\n </div>\n );\n return (\n <div\n className='shadcn-jsonforms-field'\n onFocusCapture={onFocus}\n onBlurCapture={(event) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node))\n onBlur();\n }}\n >\n {label && uischema?.label !== false ? (\n <label className='shadcn-jsonforms-label' htmlFor={id}>\n {label}\n {required &&\n !(\n uischema?.options?.hideRequiredAsterisk ??\n (config ?? ctx.config)?.hideRequiredAsterisk\n ) ? (\n <span aria-hidden='true'> *</span>\n ) : null}\n </label>\n ) : null}\n {adorned}\n {help && !errors ? (\n <div className='shadcn-jsonforms-description'>{help}</div>\n ) : null}\n {errors ? (\n <div\n id={`${id}-errors`}\n role='alert'\n className='shadcn-jsonforms-error'\n >\n {errors}\n </div>\n ) : null}\n </div>\n );\n};\n\nexport const ShadcnInputControl = ({\n data,\n schema,\n config,\n description,\n enabled,\n errors,\n handleChange: originalHandleChange,\n label,\n path,\n required,\n readonly,\n uischema,\n visible,\n type = 'text',\n suggestions,\n}: ControlProps & { type?: string; suggestions?: string[] }) => {\n const keepEmptyString = useMixedScalar(path);\n const handleChange = (target: string, value: any) =>\n originalHandleChange(\n target,\n keepEmptyString && value === undefined ? '' : value,\n );\n if (!visible) return null;\n const id = makeId(path, label);\n const inputType = uischema.options?.format ?? type;\n\n return (\n <InputShell\n path={path}\n schema={schema}\n config={config}\n uischema={uischema}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <div className='group relative w-full'>\n <Input\n id={id}\n className='shadcn-jsonforms-input pr-10'\n type={inputType}\n maxLength={\n (uischema.options?.restrict ?? config?.restrict)\n ? schema.maxLength\n : undefined\n }\n disabled={!enabled || readonly}\n aria-invalid={Boolean(errors)}\n aria-describedby={errors ? `${id}-errors` : undefined}\n list={suggestions ? `${id}-suggestions` : undefined}\n value={toStringValue(data)}\n onChange={(event) =>\n handleChange(path, event.currentTarget.value || undefined)\n }\n />\n {suggestions && (\n <datalist id={`${id}-suggestions`}>\n {suggestions.map((value) => (\n <option key={value} value={value} />\n ))}\n </datalist>\n )}\n <ClearValueButton\n clearable={uischema.options?.clearable ?? config?.clearable ?? true}\n data={data}\n enabled={enabled}\n readonly={readonly}\n onClear={() => handleChange(path, undefined)}\n />\n </div>\n </InputShell>\n );\n};\n\nexport const ShadcnNumberControl = (\n props: ControlProps & { integer?: boolean },\n) => {\n const {\n config,\n data,\n enabled,\n handleChange: originalHandleChange,\n path,\n readonly,\n uischema,\n visible,\n } = props;\n const keepSelectedType = useMixedScalar(path);\n const handleChange = (target: string, value: any) =>\n originalHandleChange(\n target,\n keepSelectedType && value === undefined ? 0 : value,\n );\n if (!visible) return null;\n const id = makeId(path, props.label);\n\n return (\n <InputShell\n {...props}\n id={id}\n label={props.label}\n required={props.required}\n description={props.description}\n errors={props.errors}\n >\n <div className='group relative w-full'>\n <Input\n id={id}\n className='shadcn-jsonforms-input'\n style={{ paddingInlineEnd: 64 }}\n type='number'\n step={props.integer ? 1 : 'any'}\n disabled={!enabled || readonly}\n value={toStringValue(data)}\n onChange={(event) => {\n const value = event.currentTarget.value;\n handleChange(\n path,\n value === ''\n ? undefined\n : props.integer\n ? Math.trunc(Number(value))\n : Number(value),\n );\n }}\n />\n <ClearValueButton\n trailingControlSpace={24}\n clearable={uischema.options?.clearable ?? config?.clearable ?? true}\n data={data}\n enabled={enabled}\n readonly={readonly}\n onClear={() => handleChange(path, undefined)}\n />\n </div>\n </InputShell>\n );\n};\n","import React, { useState } from 'react';\nimport {\n ControlProps,\n defaultErrorTranslator,\n getCombinedErrorMessage,\n and,\n rankWith,\n schemaMatches,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { useJsonForms } from '@jsonforms/react';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Checkbox } from '@jsonforms-react-shadcn-ui/checkbox';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@jsonforms-react-shadcn-ui/popover';\nimport { X, Plus, ChevronDown, CircleAlert } from 'lucide-react';\nimport {\n useI18n,\n useTranslator,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { displayableErrors } from '@chobantonov/jsonforms-react-renderer-common/validation/validationIndicator';\nimport {\n addChoice,\n arrayChoiceItemErrors,\n arrayChoicesOf,\n asArrayValue,\n canAddChoice,\n canRemoveChoice,\n isChipsControl,\n isMultiSelectControl,\n isSelected,\n removeChoiceAt,\n resolveItemSchema,\n sameChoice,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/arrayChoices';\nimport { InputShell, makeId } from '../controls/InputControl';\n\nexport const chipsControlTester = rankWith(\n 6,\n and(uiTypeIs('Control'), isChipsControl),\n);\nexport const multiSelectControlTester = rankWith(\n 6,\n and(uiTypeIs('Control'), isMultiSelectControl),\n);\nconst enumChoices = (\n schema: ControlProps['schema'],\n root: ControlProps['rootSchema'],\n) => {\n const items = resolveItemSchema(schema, root);\n const strings = arrayChoicesOf(items);\n if (strings) return strings;\n const branches = items?.oneOf as Array<ControlProps['schema']> | undefined;\n return Array.isArray(branches) &&\n branches.length > 0 &&\n branches.every((branch) => branch.const !== undefined)\n ? branches.map((branch) => ({\n value: branch.const,\n label: branch.title ?? String(branch.const),\n }))\n : undefined;\n};\nexport const enumArrayControlTester = rankWith(\n 5,\n and(\n uiTypeIs('Control'),\n schemaMatches(\n (schema, root) =>\n schema.type === 'array' &&\n schema.uniqueItems === true &&\n enumChoices(schema, root) !== undefined,\n ),\n ),\n);\n\nexport const ShadcnArrayChoicesControl = (props: ControlProps) => {\n const [draft, setDraft] = useState('');\n const [search, setSearch] = useState('');\n const t = useI18n();\n const context = useJsonForms();\n const translate = useTranslator();\n if (!props.visible) return null;\n const { schema, rootSchema, data, path, handleChange } = props;\n const options = { ...props.config, ...props.uischema.options };\n const chips = options.variant === 'chips';\n const dropdown = options.variant === 'multi-select';\n const values = asArrayValue(data);\n const choices = enumChoices(schema, rootSchema);\n const [primary, additional] = displayableErrors(context.core ?? {});\n const itemErrors = arrayChoiceItemErrors(\n [...(primary ?? []), ...(additional ?? [])],\n path,\n values.length,\n );\n const itemSchema = resolveItemSchema(schema, rootSchema);\n const itemMessages = itemErrors.map((errors, index) =>\n getCombinedErrorMessage(\n errors,\n context.i18n?.translateError ?? defaultErrorTranslator,\n translate,\n itemSchema,\n props.uischema,\n path ? `${path}.${index}` : String(index),\n ),\n );\n const errors = [\n props.errors,\n ...itemMessages.map((message, index) =>\n message ? `${String(values[index])}: ${message}` : '',\n ),\n ]\n .filter(Boolean)\n .join('\\n');\n const limits = {\n minItems: schema.minItems,\n maxItems: schema.maxItems,\n restrict: options.restrict !== false,\n };\n const disabled = !props.enabled || props.readonly;\n const id = makeId(path, props.label);\n const label = (value: unknown) =>\n choices?.find((choice) => sameChoice(choice.value, value))?.label ??\n String(value);\n const remove = (index: number) => {\n if (!disabled && canRemoveChoice(values, limits))\n handleChange(path, removeChoiceAt(values, index));\n };\n const add = (value: unknown) => {\n if (disabled || value === '' || !canAddChoice(values, limits)) return;\n if (choices && !choices.some((choice) => sameChoice(choice.value, value)))\n return;\n handleChange(path, addChoice(values, value, schema.uniqueItems === true));\n setDraft('');\n };\n const choiceList = [\n ...(choices ?? []),\n ...values\n .filter(\n (value) => !choices?.some((choice) => sameChoice(choice.value, value)),\n )\n .map((value) => ({ value, label: String(value) })),\n ];\n const checks = (\n <div\n className={\n options.vertical ? 'flex flex-col gap-2' : 'flex flex-wrap gap-3'\n }\n role='group'\n aria-label={props.label}\n >\n {choiceList\n .filter((choice) =>\n choice.label.toLocaleLowerCase().includes(search.toLocaleLowerCase()),\n )\n .map((choice, index) => {\n const checked = isSelected(values, choice.value);\n return (\n <label key={index} className='flex items-center gap-2'>\n <Checkbox\n checked={checked}\n disabled={\n disabled ||\n (checked\n ? !canRemoveChoice(values, limits)\n : !canAddChoice(values, limits))\n }\n onCheckedChange={() =>\n checked\n ? remove(\n values.findIndex((value) =>\n sameChoice(value, choice.value),\n ),\n )\n : add(choice.value)\n }\n />\n {choice.label}\n </label>\n );\n })}\n </div>\n );\n const pills = (\n <>\n {values.map((value, index) => (\n <span\n key={index}\n className={`inline-flex max-w-full items-center gap-1 rounded-md border bg-secondary px-2 py-0.5 text-sm text-secondary-foreground ${itemMessages[index] ? 'border-destructive' : 'border-transparent'}`}\n aria-invalid={Boolean(itemMessages[index])}\n title={itemMessages[index] || undefined}\n >\n <span className='min-w-0 truncate' title={label(value)}>\n {label(value)}\n </span>\n {itemMessages[index] ? (\n <CircleAlert\n className='h-3.5 w-3.5 text-destructive'\n role='img'\n aria-label={itemMessages[index]}\n />\n ) : null}\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-4 w-4 shrink-0 rounded-sm p-0'\n disabled={disabled || !canRemoveChoice(values, limits)}\n aria-label={t('composite.remove', { label: label(value) })}\n onClick={() => remove(index)}\n >\n <X className='h-3 w-3' />\n </Button>\n </span>\n ))}\n </>\n );\n return (\n <InputShell {...props} id={id} errors={errors}>\n {chips ? (\n <div className='flex min-w-0 flex-wrap items-center gap-2'>\n {pills}\n <Input\n id={id}\n className='min-w-40 flex-1'\n value={draft}\n list={choices ? id + '-choices' : undefined}\n disabled={disabled || !canAddChoice(values, limits)}\n aria-invalid={Boolean(errors)}\n placeholder={options.placeholder ?? t('chips.addPlaceholder')}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' && !event.nativeEvent.isComposing) {\n event.preventDefault();\n add(draft);\n }\n }}\n />\n {choices && (\n <datalist id={id + '-choices'}>\n {choices.map((choice) => (\n <option key={String(choice.value)} value={String(choice.value)}>\n {choice.label}\n </option>\n ))}\n </datalist>\n )}\n <Button\n type='button'\n variant='outline'\n size='icon'\n disabled={disabled || !draft || !canAddChoice(values, limits)}\n aria-label={t('tuple.add')}\n onClick={() => add(draft)}\n >\n <Plus className='h-4 w-4' />\n </Button>\n </div>\n ) : dropdown ? (\n <Popover>\n <div className='flex min-h-9 w-full min-w-0 items-center gap-1 rounded-md border border-input bg-background px-2 py-1'>\n <div className='flex min-w-0 flex-1 flex-wrap gap-1 max-h-32 overflow-auto'>\n {values.length ? (\n pills\n ) : (\n <span className='text-sm text-muted-foreground'>\n {options.placeholder || props.label}\n </span>\n )}\n </div>\n <PopoverTrigger asChild>\n <Button\n id={id}\n type='button'\n variant='ghost'\n size='icon'\n aria-label={props.label}\n disabled={disabled}\n aria-invalid={Boolean(errors)}\n className='h-7 w-7 shrink-0'\n >\n <ChevronDown className='h-4 w-4' />\n </Button>\n </PopoverTrigger>\n </div>\n <PopoverContent>\n <Input\n aria-label={props.label}\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n />\n <div className='max-h-64 overflow-auto py-2'>{checks}</div>\n </PopoverContent>\n </Popover>\n ) : (\n checks\n )}\n </InputShell>\n );\n};\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 = { marginBottom: 16 };\n\nexport default withJsonFormsControlProps((props: ControlProps) => (\n <ScalarCompositionControl\n {...props}\n errorClassName='text-destructive text-sm'\n errorStyle={MESSAGE_STYLE}\n />\n));\n","import {\n and,\n ControlProps,\n formatIs,\n isStringControl,\n optionIs,\n or,\n rankWith,\n schemaMatches,\n} from '@jsonforms/core';\nimport React, { useRef, useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { InputShell, makeId } from './InputControl';\nimport { ClearValueButton } from '../components/ClearValueButton';\n\nconst isPassword = and(\n isStringControl,\n or(formatIs('password'), optionIs('format', 'password')),\n);\nexport const passwordControlTester = rankWith(4, isPassword);\nexport const passwordOtpControlTester = rankWith(\n 5,\n and(\n isPassword,\n optionIs('variant', 'otp'),\n schemaMatches(\n (schema) =>\n typeof schema.minLength === 'number' &&\n typeof schema.maxLength === 'number' &&\n schema.maxLength > 0,\n ),\n ),\n);\n\n/** Shared masking and actions; segmented edits commit partial values immediately. */\nexport const ShadcnPasswordControl = (\n props: ControlProps & { segmented?: boolean },\n) => {\n const [revealed, setRevealed] = useState(false);\n const inputs = useRef<Array<HTMLInputElement | null>>([]);\n const t = useI18n();\n if (!props.visible) return null;\n const {\n data,\n path,\n label,\n schema,\n enabled,\n readonly,\n errors,\n handleChange,\n uischema,\n config,\n } = props;\n const id = makeId(path, label);\n const disabled = !enabled || readonly;\n const value = typeof data === 'string' ? data : '';\n const length = props.segmented ? schema.maxLength! : 1;\n const revealLabel = t(revealed ? 'password.hide' : 'password.show');\n const commit = (next: string) => handleChange(path, next || undefined);\n const focus = (index: number) => {\n const input = inputs.current[Math.max(0, Math.min(length - 1, index))];\n input?.focus();\n input?.select();\n };\n const replace = (index: number, text: string) => {\n const start = Math.min(index, value.length);\n const next = (\n value.slice(0, start) +\n text +\n value.slice(start + text.length)\n ).slice(0, length);\n commit(next);\n focus(start + text.length);\n };\n return (\n <InputShell {...props} id={id}>\n <div\n className={\n props.segmented\n ? 'group relative flex min-w-0 items-center gap-2'\n : 'group relative min-w-0 w-full'\n }\n >\n <div\n role={props.segmented ? 'group' : undefined}\n aria-label={props.segmented ? label : undefined}\n className={`flex min-w-0 gap-1 overflow-x-auto${\n props.segmented ? '' : ' w-full'\n }`}\n >\n {Array.from({ length }, (_, index) => (\n <Input\n key={index}\n ref={(element) => {\n inputs.current[index] = element;\n }}\n id={index === 0 ? id : `${id}-${index}`}\n className={\n props.segmented\n ? 'w-10 shrink-0 px-1 text-center'\n : 'shadcn-jsonforms-input pr-20'\n }\n type={revealed ? 'text' : 'password'}\n disabled={disabled}\n aria-label={\n props.segmented\n ? `${label || ''} ${index + 1} / ${length}`\n : undefined\n }\n aria-invalid={Boolean(errors)}\n aria-describedby={errors ? `${id}-errors` : undefined}\n autoComplete={\n props.segmented ? 'one-time-code' : 'current-password'\n }\n value={props.segmented ? (value[index] ?? '') : value}\n onFocus={(event) => {\n if (props.segmented) event.currentTarget.select();\n }}\n onChange={(event) => {\n const text = event.currentTarget.value;\n if (!props.segmented) commit(text);\n else if (text) replace(index, text);\n else commit(value.slice(0, index) + value.slice(index + 1));\n }}\n onPaste={\n props.segmented\n ? (event) => {\n event.preventDefault();\n replace(index, event.clipboardData.getData('text'));\n }\n : undefined\n }\n onKeyDown={\n props.segmented\n ? (event) => {\n if (\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight'\n ) {\n event.preventDefault();\n focus(index + (event.key === 'ArrowLeft' ? -1 : 1));\n } else if (\n event.key === 'Backspace' &&\n !value[index] &&\n index > 0\n ) {\n event.preventDefault();\n commit(value.slice(0, index - 1) + value.slice(index));\n focus(index - 1);\n }\n }\n : undefined\n }\n />\n ))}\n </div>\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className={\n props.segmented\n ? 'h-7 w-7 shrink-0'\n : 'absolute inset-y-0 end-1 my-auto h-7 w-7'\n }\n disabled={disabled}\n aria-label={revealLabel}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => setRevealed((v) => !v)}\n >\n {revealed ? (\n <Eye className='h-4 w-4' />\n ) : (\n <EyeOff className='h-4 w-4' />\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{revealLabel}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n <div\n className={\n props.segmented\n ? 'relative h-10 w-10 shrink-0'\n : 'absolute inset-y-0 end-11 my-auto h-9 w-9'\n }\n >\n <ClearValueButton\n adornmentAware={false}\n clearable={uischema.options?.clearable ?? config?.clearable ?? true}\n data={data}\n enabled={enabled}\n readonly={readonly}\n onClear={() => commit('')}\n />\n </div>\n </div>\n </InputShell>\n );\n};\nexport const ShadcnPasswordOtpControl = (props: ControlProps) => (\n <ShadcnPasswordControl {...props} segmented />\n);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '@jsonforms-react-shadcn-ui/dialog';\n\nexport const DeleteDialog = ({\n open,\n onCancel,\n onConfirm,\n}: {\n open: boolean;\n onCancel: () => void;\n onConfirm: () => void;\n}) => {\n const t = useI18n();\n return (\n <Dialog open={open} onOpenChange={(open) => !open && onCancel()}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>{t('confirm.delete.title')}</DialogTitle>\n <DialogDescription>{t('confirm.delete.message')}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button type='button' variant='outline' onClick={onCancel}>\n {t('confirm.decline')}\n </Button>\n <Button type='button' variant='destructive' onClick={onConfirm}>\n {t('confirm.accept')}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n};\n","import {\n Pagination,\n PaginationContent,\n PaginationItem,\n} from '@jsonforms-react-shadcn-ui/pagination';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@jsonforms-react-shadcn-ui/select';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { CollectionPage } from '@chobantonov/jsonforms-react-renderer-common/collections/collectionPagination';\nexport const CollectionPager = ({ page }: { page: CollectionPage }) => {\n const t = useI18n();\n if (!page.enabled || !page.total) return null;\n return (\n <div data-collection-footer className='border-t py-3'>\n <Pagination\n aria-label={t('collection.pagination')}\n className='flex flex-wrap items-center justify-end gap-2'\n >\n <Select\n value={String(page.size)}\n onValueChange={(value) => page.change(page.current, Number(value))}\n >\n <SelectTrigger aria-label={t('collection.pageSize')} className='w-20'>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {page.choices.map((size) => (\n <SelectItem key={size} value={String(size)}>\n {size}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <PaginationContent>\n <PaginationItem>\n <Button\n type='button'\n variant='outline'\n size='icon-sm'\n aria-label={t('collection.previous')}\n disabled={page.current === 1}\n onClick={() => page.change(page.current - 1)}\n >\n <ChevronLeft />\n </Button>\n </PaginationItem>\n <PaginationItem>\n <span aria-live='polite'>\n {page.current} / {page.pages}\n </span>\n </PaginationItem>\n <PaginationItem>\n <Button\n type='button'\n variant='outline'\n size='icon-sm'\n aria-label={t('collection.next')}\n disabled={page.current === page.pages}\n onClick={() => page.change(page.current + 1)}\n >\n <ChevronRight />\n </Button>\n </PaginationItem>\n </PaginationContent>\n </Pagination>\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 } from '@jsonforms-react-shadcn-ui/button';\nimport { Trash2, Plus } from 'lucide-react';\n\nexport type { TupleAdditionalItemsProps } from '@chobantonov/jsonforms-react-renderer-common/tuple/useTupleAdditionalItems';\n\nexport const TupleAdditionalItems = (props: TupleAdditionalItemsProps) => {\n const { renderItem, positionLabel } = props;\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: 16,\n paddingTop: 12,\n borderTop: `1px solid ${'var(--border)'}`,\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: 8,\n marginBottom: 8,\n }}\n >\n <strong>{t('tuple.additionalItems')}</strong>\n <Button\n size='icon-sm'\n type='button'\n variant='ghost'\n disabled={!canAdd}\n onClick={add}\n title={t('tuple.add')}\n aria-label={t('tuple.add')}\n data-tuple-add\n >\n <Plus className='h-4 w-4' />\n </Button>\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: 8,\n marginBottom: 8,\n }}\n >\n <div style={{ flex: 1, minWidth: 0 }}>{renderItem(index)}</div>\n <Button\n size='icon-sm'\n type='button'\n variant='ghost'\n className='text-destructive'\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 <Trash2 className='h-4 w-4' />\n </Button>\n </div>\n ))}\n </PendingChangesProvider>\n <CollectionPager page={page} />\n {message && (\n <span className='text-destructive' role='alert' data-tuple-draft>\n {message}\n </span>\n )}\n </section>\n );\n};\n","import React from 'react';\nimport { ScrollArea, ScrollBar } from '@jsonforms-react-shadcn-ui/scroll-area';\n\n/** The host supplies upstream themed scrollbars; both axes remain reachable. */\nexport const ScrollRegion = ({\n children,\n style,\n className = '',\n ...props\n}: React.ComponentProps<typeof ScrollArea>) => (\n <ScrollArea\n {...props}\n type='auto'\n className={'shadcn-jsonforms-scroll-region ' + className}\n style={{\n display: 'flex',\n flexDirection: 'column',\n minWidth: 0,\n minHeight: 0,\n overflow: 'hidden',\n ...style,\n }}\n >\n {children}\n <ScrollBar orientation='horizontal' />\n </ScrollArea>\n);\n","import { ScrollRegion } from '../components/ScrollRegion';\nimport React from 'react';\nimport { Maximize2, Minimize2 } from 'lucide-react';\nimport { DialogContent } from '@jsonforms-react-shadcn-ui/dialog';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\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 DetailDialogContent = ({\n options = {},\n open,\n children,\n ...props\n}: React.ComponentProps<typeof DialogContent> & {\n options?: DetailDialogOptions;\n open: boolean;\n}) => {\n const geometry = useDetailDialog(open, options);\n const t = useTranslator();\n const label = geometry.maximized\n ? t('dialog.restore', 'Restore dialog')\n : t('dialog.maximize', 'Maximize dialog');\n const parts = React.Children.toArray(children);\n return (\n <DialogContent\n {...props}\n tabIndex={-1}\n style={{\n ...props.style,\n ...geometry.style,\n width: geometry.style.width ?? 640,\n display: 'flex',\n flexDirection: 'column',\n overflow: 'hidden',\n // Geometry must follow the pointer without the primitive's transition delay.\n transitionProperty: 'none',\n left: `calc(50% + ${geometry.offset.x}px)`,\n top: `calc(50% + ${geometry.offset.y}px)`,\n translate: '-50% -50%',\n transform: 'none',\n }}\n onOpenAutoFocus={(event) => {\n event.preventDefault();\n (event.target as HTMLElement).focus();\n }}\n >\n {geometry.options.maximizable !== false && (\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n className='absolute right-10 top-2'\n aria-label={label}\n title={label}\n onClick={geometry.toggle}\n >\n {geometry.maximized ? <Minimize2 /> : <Maximize2 />}\n </Button>\n )}\n <div\n {...geometry.dragProps}\n style={{ ...geometry.dragProps.style, flexShrink: 0 }}\n className='min-w-0 pr-16'\n >\n {parts[0]}\n </div>\n <ScrollRegion\n data-detail-dialog-body\n style={{ flex: '1 1 auto', minHeight: 0 }}\n >\n {parts.slice(1, -1)}\n </ScrollRegion>\n <div\n data-detail-dialog-footer\n style={{ flexShrink: 0, display: 'flex', justifyContent: 'flex-end' }}\n >\n {parts[parts.length - 1]}\n </div>\n </DialogContent>\n );\n};\n","import {\n useCompositeDraft,\n type CompositeDetailDialogProps,\n} from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeDraft';\nimport { DetailDialogContent } from '../complex/DetailDialogContent';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n} from '@jsonforms-react-shadcn-ui/dialog';\nimport { JsonFormsContext } from '@jsonforms/react';\nimport { ShadcnCellMode } from './asCell';\nimport { PendingChangesProvider } from '@chobantonov/jsonforms-react-renderer-common/interaction/pendingChanges';\n\nexport const CompositeDetailDialog = (props: CompositeDetailDialogProps) => {\n const { open, title, label, options, t, children } = props;\n const dialog = useCompositeDraft(props);\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next) dialog.cancel();\n }}\n >\n <DetailDialogContent\n open={open}\n options={options.dialog}\n className='max-w-2xl'\n aria-label={label}\n aria-describedby={undefined}\n >\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n </DialogHeader>\n <JsonFormsContext.Provider value={dialog.context as any}>\n <PendingChangesProvider changes={dialog.pending}>\n <ShadcnCellMode.Provider value={false}>\n <div className='p-1'>{children}</div>\n </ShadcnCellMode.Provider>\n </PendingChangesProvider>\n </JsonFormsContext.Provider>\n {dialog.conflicted && (\n <p role='alert'>\n {t(\n 'composite.applyConflict',\n dialog.defaultMessage('composite.applyConflict'),\n )}\n </p>\n )}\n <DialogFooter>\n {options.showEmptyButton === true && (\n <Button\n type='button'\n variant='outline'\n disabled={!dialog.canEmpty}\n onClick={dialog.clear}\n >\n {dialog.buttonLabel(options.emptyLabel, 'composite.empty')}\n </Button>\n )}\n <Button type='button' variant='outline' onClick={dialog.cancel}>\n {dialog.buttonLabel(options.cancelLabel, 'composite.cancel')}\n </Button>\n <Button\n type='button'\n disabled={!dialog.canApply}\n onClick={dialog.apply}\n >\n {dialog.buttonLabel(options.okLabel, 'composite.apply')}\n </Button>\n </DialogFooter>\n </DetailDialogContent>\n </Dialog>\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 } from '@jsonforms-react-shadcn-ui/button';\nimport { Pencil } from 'lucide-react';\nexport function TupleField(props: TupleFieldProps) {\n return (\n <CommonTupleField\n {...props}\n CompositeDetailDialog={CompositeDetailDialog}\n gap={8}\n legendStyle={{ marginBottom: 4, fontSize: 14, color: 'inherit' }}\n renderEditButton={(label, disabled, open) => (\n <Button\n size='icon-sm'\n type='button'\n variant='ghost'\n disabled={disabled}\n onClick={open}\n title={label}\n aria-label={label}\n >\n <Pencil className='h-4 w-4' />\n </Button>\n )}\n renderError={(message, draft) => (\n <span\n className='text-destructive'\n role='alert'\n data-tuple-draft={draft || undefined}\n >\n {message}\n </span>\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 { InputShell } from '../controls/InputControl';\nimport { tupleControlTester } from '@chobantonov/jsonforms-react-renderer-common/tuple/tupleSchema';\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 } = props;\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={16}\n diagnostic={(message) => (\n <span className='text-destructive' role='alert' data-tuple-diagnostic>\n {message}\n </span>\n )}\n />\n );\n return (\n <InputShell\n {...props}\n id={props.id}\n label={label}\n required={required}\n errors={shownErrors || undefined}\n >\n {options.showBorder === false ? (\n <div data-tuple-control>{content}</div>\n ) : (\n <div data-tuple-control className='rounded-md border p-3'>\n {content}\n </div>\n )}\n </InputShell>\n );\n};\n\nexport const TupleControlRenderer = connectTupleControl(TupleControl);\n","import React from 'react';\nimport {\n ControlProps,\n JsonSchema,\n and,\n rankWith,\n schemaMatches,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { ShadcnInputControl } from './InputControl';\n\nexport const anyOfStringOrEnumControlTester = rankWith(\n 5,\n and(\n uiTypeIs('Control'),\n schemaMatches((schema) => {\n const branches = schema.anyOf as JsonSchema[] | undefined;\n return (\n Array.isArray(branches) &&\n branches.every(\n (branch) =>\n (!branch.type || branch.type === 'string') &&\n (!branch.enum ||\n branch.enum.every((value) => typeof value === 'string')),\n ) &&\n branches.some((branch) => branch.type === 'string' && !branch.enum) &&\n branches.some((branch) => Array.isArray(branch.enum))\n );\n }),\n ),\n);\n\nexport const ShadcnAnyOfStringOrEnumControl = (props: ControlProps) => (\n <ShadcnInputControl\n {...props}\n suggestions={Array.from(\n new Set(\n (props.schema.anyOf ?? [])\n .flatMap((branch) => branch.enum ?? [])\n .filter((value): value is string => typeof value === 'string'),\n ),\n )}\n />\n);\n","import { LabelProps, RankedTester, rankWith, uiTypeIs } from '@jsonforms/core';\nimport React from 'react';\n\nexport const ShadcnLabelRenderer = ({ text, visible }: LabelProps) => {\n if (!visible) return null;\n return <div className='shadcn-jsonforms-static-label'>{text}</div>;\n};\nexport const labelRendererTester: RankedTester = rankWith(1, uiTypeIs('Label'));\n","import { literalPropertySchema } from '@chobantonov/jsonforms-react-renderer-common/objects/literalPropertySchema';\nimport { renamePropertyKey } from '@chobantonov/jsonforms-react-renderer-common/objects/additionalProperties';\nimport {\n DynamicPropertyProvider,\n clearedDynamicPropertyValue,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/dynamicProperties';\nimport {\n useAdditionalPropertyEntries,\n useAdditionalPropertyActions,\n type AdditionalPropertiesProps,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/useAdditionalPropertyEntries';\n\nimport { IsolatedPropertyEditor } from '@chobantonov/jsonforms-react-renderer-common/objects/IsolatedPropertyEditor';\nimport {\n needsIsolatedEditor,\n assignOwnProperty,\n validateAdditionalPropertyName,\n} from '@chobantonov/jsonforms-react-renderer-common/objects/additionalPropertyName';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ErrorIndicator } from './ErrorIndicator';\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 type { JsonSchema } from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport { Pencil, Plus, Trash2 } from 'lucide-react';\nimport React, { useState } from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Card } from '@jsonforms-react-shadcn-ui/card';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '@jsonforms-react-shadcn-ui/dialog';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\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 [newPropertyName, setNewPropertyName] = useState('');\n const [renamingPropertyName, setRenamingPropertyName] = useState<\n string | null\n >(null);\n const [renameValue, setRenameValue] = useState('');\n const entries = useAdditionalPropertyEntries(props);\n const {\n objectSchema,\n appliedOptions,\n objectData,\n page,\n additionalPropertyItems,\n shouldShow,\n } = entries;\n const additionalPropertiesTitle =\n typeof objectSchema.additionalProperties === 'object' &&\n typeof objectSchema.additionalProperties.title === 'string'\n ? objectSchema.additionalProperties.title\n : undefined;\n\n const t = useI18n();\n const constraintMessage = useNameConstraintMessage();\n const validatePropertyName = (\n name: string,\n value: any,\n nameSchema: JsonSchema,\n root: JsonSchema,\n currentName?: string,\n ) => {\n const result = validateAdditionalPropertyName({\n name,\n data: value,\n schema: nameSchema,\n rootSchema: root,\n currentName,\n allowEmptyName: appliedOptions.allowEmptyPropertyNames === true,\n });\n return (\n constraintMessage(result.errors) ??\n (result.error\n ? t(\n result.error === 'already-defined'\n ? 'additionalProperties.nameTaken'\n : result.error === 'required'\n ? 'additionalProperties.nameRequired'\n : 'additionalProperties.nameInvalid',\n { name },\n )\n : undefined)\n );\n };\n const propertyName = newPropertyName;\n const propertyNameError = validatePropertyName(\n propertyName,\n data,\n schema,\n rootSchema,\n );\n const {\n addPropertyDisabled,\n removePropertyDisabled,\n deletion,\n addProperty,\n removeProperty,\n } = useAdditionalPropertyActions(props, entries, {\n restrict: Boolean(appliedOptions.restrict),\n propertyName,\n propertyNameError,\n setNewPropertyName,\n });\n const renameProperty = (propertyToRename: string) => {\n const trimmed = renameValue;\n const renameError = validatePropertyName(\n trimmed,\n data,\n schema,\n rootSchema,\n propertyToRename,\n );\n if (trimmed === propertyToRename) {\n setRenamingPropertyName(null);\n setRenameValue('');\n return;\n }\n if (renameError || !objectData) {\n return;\n }\n\n const updatedData = renamePropertyKey(\n objectData,\n propertyToRename,\n trimmed,\n );\n handleChange(path, updatedData);\n setRenamingPropertyName(null);\n setRenameValue('');\n };\n\n const closeRenameDialog = () => {\n setRenamingPropertyName(null);\n setRenameValue('');\n };\n\n const renameError = renamingPropertyName\n ? validatePropertyName(\n renameValue,\n data,\n schema,\n rootSchema,\n renamingPropertyName,\n )\n : undefined;\n const renameDisabled = !enabled || readonly || Boolean(renameError);\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 <>\n <DeleteDialog\n open={deletion.confirming}\n onCancel={deletion.cancel}\n onConfirm={deletion.confirm}\n />\n <Card\n className='jsonforms-additional-properties my-1 min-w-full'\n style={\n embedded\n ? { border: 0, boxShadow: 'none', padding: 0, margin: 0 }\n : undefined\n }\n >\n <div className={embedded ? 'py-2' : 'px-4 py-2'}>\n <div className='flex flex-col gap-2 md:flex-row md:gap-4'>\n {additionalPropertiesTitle ? (\n <div className='md:flex md:h-10 md:items-center md:pt-6'>\n <span className='text-sm text-foreground'>\n {additionalPropertiesTitle}\n {propertyErrors && (\n <ErrorIndicator local errors={propertyErrors} />\n )}\n </span>\n </div>\n ) : null}\n <div className='min-w-0 flex-1'>\n <label\n className='mb-1 block text-sm font-medium text-foreground'\n htmlFor='shadcn-additional-property-name'\n >\n {t('additionalProperties.namePlaceholder')}\n </label>\n <div className='relative pr-12'>\n <Input\n id='shadcn-additional-property-name'\n className='shadcn-jsonforms-input'\n aria-label={\n label\n ? t('additionalProperties.addTo', { label })\n : t('additionalProperties.add')\n }\n aria-invalid={\n newPropertyName !== '' && Boolean(propertyNameError)\n }\n disabled={!enabled || readonly}\n type='text'\n value={newPropertyName}\n onChange={(event) =>\n setNewPropertyName(event.currentTarget.value)\n }\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n addProperty();\n }\n }}\n />\n <Button\n className='absolute right-0 top-0 h-10 w-10 shrink-0'\n disabled={addPropertyDisabled}\n size='icon'\n type='button'\n aria-label={t('additionalProperties.add')}\n title={t('additionalProperties.add')}\n onClick={addProperty}\n >\n <Plus className='h-4 w-4' />\n </Button>\n </div>\n {newPropertyName !== '' && propertyNameError ? (\n <div\n className='jsonforms-additional-properties-error mt-1 text-sm text-destructive'\n role='alert'\n >\n {propertyNameError}\n </div>\n ) : null}\n </div>\n </div>\n </div>\n <div\n className={`jsonforms-additional-properties-list flex flex-col gap-2${\n embedded ? '' : ' px-4'\n }`}\n >\n {page.indices\n .map((index) => additionalPropertyItems[index])\n .map((item) => (\n <div\n className='jsonforms-additional-property relative'\n key={item.propertyName}\n >\n <div className='flex min-h-6 items-center justify-between gap-2 mb-2'>\n <span\n data-property-name-label={item.propertyName}\n className={`inline-flex min-w-0 items-center gap-1 text-sm font-medium ${\n nameErrors.has(item.propertyName)\n ? 'text-destructive'\n : ''\n }`}\n >\n <span className='min-w-0 break-all'>\n {item.propertyName || '\\u00a0'}\n </span>\n {nameErrors.get(item.propertyName) && (\n <ErrorIndicator\n local\n errors={nameErrors.get(item.propertyName)!}\n />\n )}\n </span>\n {enabled ? (\n <div className='jsonforms-additional-property-actions flex shrink-0 items-center gap-0.5'>\n <Button\n className='h-6 w-6 text-muted-foreground [&_svg]:size-3'\n variant='ghost'\n size='icon'\n disabled={readonly}\n type='button'\n aria-label={t('additionalProperties.renameNamed', {\n name: item.propertyName,\n })}\n title={t('additionalProperties.renameNamed', {\n name: item.propertyName,\n })}\n onClick={() => {\n setRenamingPropertyName(item.propertyName);\n setRenameValue(item.propertyName);\n }}\n >\n <Pencil className='h-4 w-4' />\n </Button>\n <Button\n className='h-6 w-6 bg-destructive/10 text-destructive hover:bg-destructive/20 [&_svg]:size-3'\n variant='destructive'\n size='icon'\n disabled={removePropertyDisabled}\n type='button'\n aria-label={t('additionalProperties.deleteNamed', {\n name: item.propertyName,\n })}\n title={t('additionalProperties.deleteNamed', {\n name: item.propertyName,\n })}\n onClick={() => removeProperty(item.propertyName)}\n >\n <Trash2 className='h-4 w-4' />\n </Button>\n </div>\n ) : null}\n </div>\n <div className='jsonforms-additional-property-control min-w-0'>\n {needsIsolatedEditor(item.propertyName) ? (\n <>\n <IsolatedPropertyEditor\n value={objectData?.[item.propertyName]}\n schema={literalPropertySchema(\n item.schema,\n rootSchema,\n )}\n uischema={{\n type: 'Control',\n scope: '#',\n label: false,\n }}\n enabled={Boolean(enabled)}\n readonly={readonly}\n renderers={renderers}\n cells={cells}\n onChange={(value) =>\n handleChange(\n path,\n assignOwnProperty(\n { ...objectData },\n item.propertyName,\n value === undefined\n ? clearedDynamicPropertyValue(\n item.schema,\n rootSchema,\n objectData?.[item.propertyName],\n )\n : value,\n ),\n )\n }\n />\n </>\n ) : (\n <DynamicPropertyProvider\n path={item.path}\n schema={item.schema}\n rootSchema={rootSchema}\n >\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 </div>\n ))}\n </div>\n <div className={embedded ? undefined : 'px-4 pb-4'}>\n <CollectionPager page={page} />\n </div>\n </Card>\n\n <Dialog\n open={renamingPropertyName !== null}\n onOpenChange={(dialogOpen) => {\n if (!dialogOpen) closeRenameDialog();\n }}\n >\n <DialogContent className='max-w-sm'>\n <DialogHeader>\n <DialogTitle>{t('additionalProperties.renameTitle')}</DialogTitle>\n <DialogDescription>\n {t('additionalProperties.renameDialogDescription')}\n </DialogDescription>\n </DialogHeader>\n <form\n onSubmit={(event) => {\n event.preventDefault();\n if (renamingPropertyName) {\n renameProperty(renamingPropertyName);\n }\n }}\n >\n <label\n className='mb-2 block text-sm font-medium'\n htmlFor='shadcn-rename-property'\n >\n {t('additionalProperties.renamePropertyNameLabel')}\n </label>\n <Input\n id='shadcn-rename-property'\n autoFocus\n disabled={readonly}\n value={renameValue}\n aria-invalid={Boolean(renameError)}\n onChange={(event) => setRenameValue(event.currentTarget.value)}\n />\n {renameError ? (\n <p className='mt-2 text-sm text-destructive' role='alert'>\n {renameError}\n </p>\n ) : null}\n <DialogFooter className='mt-4'>\n <Button\n type='button'\n variant='outline'\n onClick={closeRenameDialog}\n >\n {t('combinator.cancel')}\n </Button>\n <Button type='submit' disabled={renameDisabled}>\n {t('additionalProperties.renameConfirm')}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n </>\n </PendingChangesProvider>\n );\n};\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '@jsonforms-react-shadcn-ui/dialog';\n\ntype CombinatorSwitchDialogProps = {\n open: boolean;\n onCancel: () => void;\n onConfirm: () => void;\n};\n\nexport const CombinatorSwitchDialog = ({\n open,\n onCancel,\n onConfirm,\n}: CombinatorSwitchDialogProps) => {\n const t = useI18n();\n return (\n <Dialog open={open} onOpenChange={(nextOpen) => !nextOpen && onCancel()}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>{t('combinator.clearTitle')}</DialogTitle>\n <DialogDescription>{t('combinator.clearMessage')}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button type='button' variant='outline' onClick={onCancel}>\n {t('confirm.decline')}\n </Button>\n <Button type='button' onClick={onConfirm}>\n {t('confirm.accept')}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n};\n","import { useCombinatorSelection } from '@chobantonov/jsonforms-react-renderer-common/composition/useCombinatorSelection';\nimport { X } from 'lucide-react';\nimport { discriminatorBranch } from '@chobantonov/jsonforms-react-renderer-common/composition/discriminatorBranch';\nimport {\n useJsonForms,\n JsonFormsDispatch,\n withJsonFormsAnyOfProps,\n} from '@jsonforms/react';\nimport { isArrayElementPath } from '@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema';\nimport {\n isUnselectedBranchValue,\n clearedBranchValue,\n branchChangeData,\n discardedByBranchChange,\n} from '@chobantonov/jsonforms-react-renderer-common/composition/combinators';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport React, { useId, useCallback, useState } from 'react';\nimport { useConfirmation } from './mixed/useConfirmation';\nimport { CombinatorBranch } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorBranch';\nimport {\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@jsonforms-react-shadcn-ui/select';\nimport {\n CombinatorRendererProps,\n createDefaultValue,\n isAnyOfControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@jsonforms-react-shadcn-ui/tabs';\nimport { CombinatorProperties } from '@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties';\nimport { CombinatorSwitchDialog } from './CombinatorSwitchDialog';\n\nconst isEmptyData = (data: unknown) =>\n data === undefined ||\n data === null ||\n data === '' ||\n (Array.isArray(data) && data.length === 0) ||\n (typeof data === 'object' &&\n !Array.isArray(data) &&\n Object.keys(data as Record<string, unknown>).length === 0);\n\nexport const ShadcnAnyOfRenderer = ({\n handleChange,\n schema,\n rootSchema,\n indexOfFittingSchema,\n visible,\n path,\n renderers,\n cells,\n uischema,\n uischemas,\n data,\n enabled,\n label,\n config,\n combinator = 'anyOf',\n}: CombinatorRendererProps & { combinator?: 'anyOf' | 'oneOf' }) => {\n const formContext = useJsonForms();\n indexOfFittingSchema =\n discriminatorBranch(schema, rootSchema, combinator, data) ??\n indexOfFittingSchema;\n const selectorId = useId();\n const [selectedIndex, setSelectedIndex] = useState(\n indexOfFittingSchema ??\n (combinator === 'oneOf' && isEmptyData(data) ? -1 : 0),\n );\n const [chosen, setChosen] = useState(false);\n const confirmation = useConfirmation();\n const [pendingIndex, setPendingIndex] = useState<number>();\n const [previousInput, setPreviousInput] = useState({\n initialized: false,\n data,\n indexOfFittingSchema,\n combinator,\n });\n if (\n !previousInput.initialized ||\n previousInput.data !== data ||\n previousInput.indexOfFittingSchema !== indexOfFittingSchema ||\n previousInput.combinator !== combinator\n ) {\n setPreviousInput({\n initialized: true,\n data,\n indexOfFittingSchema,\n combinator,\n });\n if (\n combinator === 'oneOf' &&\n isUnselectedBranchValue(data, indexOfFittingSchema)\n ) {\n setChosen(false);\n setSelectedIndex(-1);\n setPendingIndex(undefined);\n } else if (\n !chosen &&\n indexOfFittingSchema != null &&\n indexOfFittingSchema >= 0\n ) {\n setSelectedIndex(indexOfFittingSchema);\n }\n }\n\n const { translate, selectionError, renderInfos } = useCombinatorSelection(\n { schema, rootSchema, uischema, path, uischemas },\n combinator,\n formContext.core,\n );\n\n const selectSchema = useCallback(\n (index: number, resetData: boolean) => {\n if (resetData) {\n handleChange(\n path,\n createDefaultValue(renderInfos[index].schema, rootSchema),\n );\n }\n setChosen(true);\n setSelectedIndex(index);\n },\n [handleChange, path, renderInfos, rootSchema],\n );\n\n const handleTabChange = (value: string) => {\n const index = value === '' ? -1 : Number(value);\n if (enabled === false || index === selectedIndex) return;\n if (combinator === 'oneOf') {\n confirmation.request({\n catalogId: 'oneOf',\n operation: 'branchChange',\n config,\n options: uischema.options,\n discarded: [discardedByBranchChange(data, schema)],\n perform: () => {\n handleChange(\n path,\n branchChangeData(\n data,\n index < 0\n ? clearedBranchValue(\n isArrayElementPath(formContext.core?.data, path),\n renderInfos.map((info) => info.schema),\n )\n : createDefaultValue(renderInfos[index].schema, rootSchema),\n schema,\n ),\n );\n setChosen(true);\n setSelectedIndex(index);\n },\n });\n return;\n }\n const nextDefault = createDefaultValue(\n renderInfos[index].schema,\n rootSchema,\n );\n\n if (isEmptyData(data) || typeof data === typeof nextDefault) {\n selectSchema(index, false);\n return;\n }\n\n setPendingIndex(index);\n };\n\n if (!visible) {\n return null;\n }\n\n if (renderInfos.length === 1) {\n const branch = renderInfos[0];\n return (\n <>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={combinator}\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 <div className='shadcn-jsonforms-combinator'>\n <CombinatorProperties\n schema={schema}\n combinatorKeyword={combinator}\n path={path}\n rootSchema={rootSchema}\n />\n {combinator === 'oneOf' ? (\n <>\n {label && (\n <label\n htmlFor={selectorId}\n className='mb-2 block text-sm font-medium'\n >\n {label}\n </label>\n )}\n <div className='relative w-full'>\n <Select\n value={selectedIndex >= 0 ? String(selectedIndex) : ''}\n disabled={enabled === false}\n onValueChange={handleTabChange}\n >\n <SelectTrigger\n className={selectedIndex >= 0 ? 'w-full pe-16' : 'w-full'}\n id={selectorId}\n aria-invalid={Boolean(selectionError)}\n aria-describedby={\n selectionError ? selectorId + '-error' : undefined\n }\n aria-label={label || schema.title || 'oneOf'}\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {renderInfos.map((info, index) => (\n <SelectItem key={index} value={String(index)}>\n {info.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {selectedIndex >= 0 && (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='absolute end-8 top-1/2 size-7 -translate-y-1/2'\n aria-label={translate('oneOf.clear', 'Clear selection')}\n title={translate('oneOf.clear', 'Clear selection')}\n disabled={enabled === false}\n onClick={() => handleTabChange('')}\n >\n <X className='size-4' aria-hidden='true' />\n </Button>\n )}\n </div>\n {selectionError && (\n <p\n id={selectorId + '-error'}\n role='alert'\n className='text-sm text-destructive'\n >\n {selectionError}\n </p>\n )}\n {renderInfos[selectedIndex] && (\n <CombinatorBranch\n options={uischema.options}\n schema={renderInfos[selectedIndex].schema}\n path={path}\n >\n <JsonFormsDispatch\n schema={renderInfos[selectedIndex].schema}\n uischema={renderInfos[selectedIndex].uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n enabled={enabled}\n />\n </CombinatorBranch>\n )}\n </>\n ) : (\n <Tabs value={String(selectedIndex)} onValueChange={handleTabChange}>\n <TabsList>\n {renderInfos.map((renderInfo, index) => (\n <TabsTrigger key={index} value={String(index)}>\n {renderInfo.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {renderInfos.map((renderInfo, index) => (\n <TabsContent key={index} value={String(index)}>\n {selectedIndex === index ? (\n <CombinatorBranch\n options={uischema.options}\n schema={renderInfo.schema}\n path={path}\n >\n <JsonFormsDispatch\n schema={renderInfo.schema}\n uischema={renderInfo.uischema}\n path={path}\n renderers={renderers}\n cells={cells}\n />\n </CombinatorBranch>\n ) : null}\n </TabsContent>\n ))}\n </Tabs>\n )}\n {confirmation.dialog}\n <CombinatorSwitchDialog\n open={pendingIndex !== undefined}\n onCancel={() => setPendingIndex(undefined)}\n onConfirm={() => {\n if (pendingIndex !== undefined) {\n selectSchema(pendingIndex, true);\n }\n setPendingIndex(undefined);\n }}\n />\n </div>\n );\n};\n\nexport const anyOfControlTester: RankedTester = rankWith(3, isAnyOfControl);\n\nexport const ShadcnAnyOfControl = withJsonFormsAnyOfProps(ShadcnAnyOfRenderer);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport React from 'react';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport type { useArrayPanelState } from '@chobantonov/jsonforms-react-renderer-common/collections/useArrayPanelState';\n\nexport function ArrayPanelToggle({\n panel,\n label,\n}: {\n panel: ReturnType<typeof useArrayPanelState>;\n label?: string;\n}) {\n const t = useI18n();\n if (!panel.collapsible) return null;\n return (\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n aria-label={label || t('control.array')}\n aria-expanded={!panel.collapsed}\n aria-controls={panel.contentId}\n onClick={panel.toggle}\n >\n {panel.collapsed ? (\n <ChevronDown aria-hidden='true' />\n ) : (\n <ChevronUp aria-hidden='true' />\n )}\n </Button>\n );\n}\n","import { ScrollRegion } from '../components/ScrollRegion';\nimport { DetailDialogContent } from '../complex/DetailDialogContent';\nimport { Eye, EyeOff, Pencil } from 'lucide-react';\nimport {\n Tooltip,\n TooltipProvider,\n TooltipTrigger,\n TooltipContent,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport React from 'react';\nimport {\n type RowDetailState,\n createRowDetailToggle,\n createRowDetailFrame,\n} from '@chobantonov/jsonforms-react-renderer-common/collections/rowDetail';\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n} from '@jsonforms-react-shadcn-ui/dialog';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from '@jsonforms-react-shadcn-ui/resizable';\nconst RowDialog = ({ state }: { state: RowDetailState }) => {\n const { options, t } = state;\n return (\n <Dialog\n open={!!state.selection}\n onOpenChange={(open) => !open && state.close()}\n >\n <DetailDialogContent\n open={!!state.selection}\n options={options.dialog}\n aria-describedby={undefined}\n >\n <DialogHeader>\n <DialogTitle>{t('collection.editDetails')}</DialogTitle>\n </DialogHeader>\n <div className='p-1'>\n {state.conflict && <p role='alert'>{t('composite.applyConflict')}</p>}\n {state.content}\n </div>\n <DialogFooter>\n <Button type='button' variant='outline' onClick={state.close}>\n {t('composite.cancel')}\n </Button>\n <Button\n type='button'\n disabled={!state.enabled || state.conflict}\n onClick={state.apply}\n >\n {t('composite.apply')}\n </Button>\n </DialogFooter>\n </DetailDialogContent>\n </Dialog>\n );\n};\nconst RowPanel = ({\n state,\n children,\n}: React.PropsWithChildren<{ state: RowDetailState }>) => {\n const { options, panelOpen } = state;\n return (\n <div>\n <ResizablePanelGroup\n orientation={options.placement === 'bottom' ? 'vertical' : 'horizontal'}\n // Percentage-sized panels need a definite height, even with one panel.\n style={{\n height:\n panelOpen && options.placement === 'bottom' ? '40rem' : '32rem',\n }}\n >\n <ResizablePanel defaultSize='55%' minSize='20%'>\n <ScrollRegion\n className='shadcn-jsonforms-collection-pane'\n style={{ height: '100%' }}\n >\n {children}\n </ScrollRegion>\n </ResizablePanel>\n {panelOpen && options.resizable !== false && (\n <ResizableHandle withHandle />\n )}\n {panelOpen && (\n <ResizablePanel minSize='20%'>\n <ScrollRegion style={{ height: '100%' }}>\n <div className='p-3'>\n {state.content ?? state.t('collection.selectItem')}\n </div>\n </ScrollRegion>\n </ResizablePanel>\n )}\n </ResizablePanelGroup>\n </div>\n );\n};\n\nexport const RowDetailFrame = createRowDetailFrame(RowDialog, RowPanel);\n\nexport const RowDetailToggle = createRowDetailToggle((toggle) => (\n <div className='flex items-center'>\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n aria-label={toggle.label}\n aria-expanded={toggle.expanded}\n onClick={toggle.toggle}\n >\n {toggle.expanded ? (\n <EyeOff aria-hidden='true' />\n ) : (\n <Eye aria-hidden='true' />\n )}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{toggle.label}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n </div>\n));\n\n/** Shared row edit action for native tables and AG Grid. */\nexport const RowDetailEditButton = ({\n label,\n onClick,\n disabled,\n}: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n disabled?: boolean;\n}) => (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant='ghost'\n size='icon-sm'\n aria-label={label}\n disabled={disabled}\n onClick={onClick}\n >\n <Pencil className='h-4 w-4' aria-hidden='true' />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n);\n","import {\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 Tooltip,\n TooltipProvider,\n TooltipTrigger,\n TooltipContent,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport { ErrorIndicator } from '../ErrorIndicator';\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 { Checkbox } from '@jsonforms-react-shadcn-ui/checkbox';\nimport { useRowDetail } from '@chobantonov/jsonforms-react-renderer-common/collections/rowDetail';\nimport { CollectionPager } from '../CollectionPager';\nimport { RowDetailFrame, RowDetailEditButton } from '../RowDetailFrame';\nimport {\n ArrayLayoutProps,\n CellProps,\n composePaths,\n createCleanLabel,\n Resolve,\n} from '@jsonforms/core';\nimport { DispatchCell, withJsonFormsCellProps } from '@jsonforms/react';\nimport React from 'react';\nimport { ChevronUp, ChevronDown } from 'lucide-react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport type { CollectionPage } from '@chobantonov/jsonforms-react-renderer-common/collections/collectionPagination';\nconst TableCellErrors = withJsonFormsCellProps(\n ({ errors, path, schema, uischema }: CellProps) =>\n errors &&\n uischema.options?.summary?.type !== 'Label' &&\n schema.type !== 'object' &&\n schema.type !== 'array' ? (\n <ErrorIndicator\n local\n errors={errors}\n path={path}\n className='shadcn-jsonforms-cell-error'\n />\n ) : null,\n);\n\ntype ArrayTableProps = ArrayLayoutProps & {\n options: NonNullable<ArrayLayoutProps['uischema']['options']>;\n rowDetail: ReturnType<typeof useRowDetail>;\n page: CollectionPage;\n selection: ReturnType<typeof useTableSelection>;\n columnSizes: ReturnType<typeof useColumnWidths>;\n translations: {\n upAriaLabel: string;\n up: string;\n downAriaLabel: string;\n down: string;\n };\n};\n\nexport function ArrayTable(props: ArrayTableProps) {\n const {\n schema,\n rootSchema,\n uischema,\n path,\n label,\n options,\n rowDetail,\n page,\n selection,\n columnSizes,\n } = props;\n const [columnWidths] = columnSizes;\n const columns = resolveTableColumns(\n schema,\n rootSchema,\n uischema,\n options,\n columnWidths,\n );\n const objectRows = Boolean(schema.properties);\n const hasRowActions = Boolean(rowDetail.options || options.showSortButtons);\n const tableWidth = columnWidths.__selection\n ? Object.values(columnWidths).reduce((sum, width) => sum + width, 0)\n : undefined;\n\n return (\n <RowDetailFrame state={rowDetail}>\n <div\n className='min-w-0 w-full max-w-full overflow-x-auto'\n style={{ contain: 'inline-size' }}\n >\n <table\n className='text-sm'\n style={{\n flexShrink: 0,\n minWidth: tableWidth,\n width: tableWidth ?? '100%',\n tableLayout: columnWidths.__selection ? 'fixed' : 'auto',\n }}\n aria-label={label}\n >\n {objectRows && (\n <ArrayTableHead\n columns={columns}\n columnSizes={columnSizes}\n page={page}\n selection={selection}\n selectPageLabel={rowDetail.t('collection.selectPage')}\n hasRowActions={hasRowActions}\n schema={schema}\n options={options}\n />\n )}\n <tbody>\n {page.indices.map((index) => (\n <ArrayTableRow\n key={composePaths(path, String(index))}\n table={props}\n index={index}\n columns={columns}\n hasRowActions={hasRowActions}\n />\n ))}\n </tbody>\n </table>\n <CollectionErrorNavigation\n options={uischema.options}\n renderAction={renderErrorNavigationButton}\n path={path}\n reveal={(index) => {\n page.change(Math.floor(index / page.size) + 1);\n if (rowDetail.options) {\n rowDetail.setPanelOpen(true);\n rowDetail.open(index);\n }\n }}\n />\n <CollectionPager page={page} />\n </div>\n </RowDetailFrame>\n );\n}\n\nfunction resolveTableColumns(\n schema: ArrayLayoutProps['schema'],\n rootSchema: ArrayLayoutProps['rootSchema'],\n uischema: ArrayLayoutProps['uischema'],\n options: ArrayTableProps['options'],\n columnWidths: Record<string, number>,\n) {\n const definitions = uischema.options?.columnDefs as\n | TableColumnDefinition[]\n | undefined;\n const properties = schema.properties ?? { value: schema };\n const objectRows = Boolean(schema.properties);\n return tableColumnFields(\n properties,\n objectRows ? definitions : undefined,\n Object.keys(properties),\n ).map((field) => {\n const definition = definitions?.find((column) => column.field === field);\n const rowBound = definitions?.some(\n (column) => column.field === field && column.scope === '#',\n );\n const source = rowBound ? schema : properties[field];\n const column = source.$ref\n ? Resolve.schema(source, '#', rootSchema)\n : source;\n const style = tableColumnStyle(definition);\n const width = columnWidths[field];\n const cellOptions = options.cells?.[field];\n return {\n field,\n column,\n definition,\n propertyBound: objectRows && !rowBound,\n cellOptions,\n editorOptions: {\n ...cellOptions,\n ...(rowBound ? { summaryOnly: true } : {}),\n },\n header: columnHeader(field, column.title, definition),\n maxWidth: style.maxWidth,\n style:\n width === undefined\n ? style\n : { ...style, width, minWidth: width, maxWidth: width },\n };\n });\n}\n\nfunction selectionColumnStyle(width = 32) {\n return { width, minWidth: 32, maxWidth: width };\n}\n\nfunction ArrayTableHead({\n columns,\n columnSizes,\n page,\n selection,\n selectPageLabel,\n hasRowActions,\n schema,\n options,\n}: Pick<\n ArrayTableProps,\n 'columnSizes' | 'page' | 'selection' | 'schema' | 'options'\n> & {\n columns: ReturnType<typeof resolveTableColumns>;\n selectPageLabel: string;\n hasRowActions: boolean;\n}) {\n const [columnWidths, setColumnWidths] = columnSizes;\n const selectedCount = page.indices.filter((index) =>\n selection.selected.includes(index),\n ).length;\n const pageChecked =\n selectedCount > 0 && selectedCount < page.indices.length\n ? 'indeterminate'\n : selectedCount > 0;\n return (\n <thead>\n <tr className='border-b'>\n <th\n data-column-key='__selection'\n style={selectionColumnStyle(columnWidths.__selection)}\n className='p-2 text-center'\n >\n <Checkbox\n className='shadcn-jsonforms-row-selection align-middle'\n aria-label={selectPageLabel}\n disabled={!selection.selectable || !page.indices.length}\n checked={pageChecked}\n onCheckedChange={(checked) =>\n selection.setSelected(\n checked === true\n ? [...new Set([...selection.selected, ...page.indices])]\n : selection.selected.filter((i) => !page.indices.includes(i)),\n )\n }\n />\n </th>\n {columns.map(({ field, definition, header, style }) => (\n <th\n key={field}\n data-column-key={field}\n style={style}\n className='relative p-2 pe-4 text-left font-medium'\n >\n {header}\n {schema.required?.includes(field) &&\n !(\n options.cells?.[field]?.hideRequiredAsterisk ??\n options.hideRequiredAsterisk\n ) && <span aria-hidden='true'> *</span>}\n <ColumnResizeHandle\n colors={{\n border: 'hsl(var(--muted-foreground) / 0.5)',\n active: 'hsl(var(--primary))',\n focus: 'hsl(var(--ring))',\n }}\n field={header}\n definition={definition}\n width={columnWidths[field]}\n onResizeStart={(widths) => setColumnWidths(widths)}\n onResize={(value) =>\n setColumnWidths((current) => ({\n ...current,\n [field]: value,\n }))\n }\n />\n </th>\n ))}\n {hasRowActions && (\n <th\n data-column-key='__actions'\n style={{ width: columnWidths.__actions ?? 1 }}\n className='whitespace-nowrap p-2'\n />\n )}\n </tr>\n </thead>\n );\n}\n\nfunction ArrayRowActions({\n index,\n rowDetail,\n showSortButtons,\n path,\n enabled,\n readonly,\n data,\n moveUp,\n moveDown,\n translations,\n}: Pick<\n ArrayTableProps,\n | 'rowDetail'\n | 'path'\n | 'enabled'\n | 'readonly'\n | 'data'\n | 'moveUp'\n | 'moveDown'\n | 'translations'\n> & { index: number; showSortButtons: boolean }) {\n const editable = enabled && !readonly;\n return (\n <div className='flex w-max flex-nowrap items-center gap-1'>\n {rowDetail.options && (\n <RowDetailEditButton\n label={rowDetail.t('collection.editDetails')}\n onClick={(event) => {\n event.stopPropagation();\n if (rowDetail.options?.presentation === 'panel')\n rowDetail.setPanelOpen(true);\n rowDetail.open(index);\n }}\n />\n )}\n <RowErrorCount\n path={path}\n index={index}\n renderIndicator={(message) => <ErrorIndicator errors={message} />}\n />\n {showSortButtons && (\n <>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-7 w-7'\n aria-label={translations.upAriaLabel}\n title={translations.up}\n disabled={!editable || index === 0}\n onClick={moveUp?.(path, index)}\n >\n <ChevronUp className='h-4 w-4' aria-hidden='true' />\n </Button>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-7 w-7'\n aria-label={translations.downAriaLabel}\n title={translations.down}\n disabled={!editable || index === data - 1}\n onClick={moveDown?.(path, index)}\n >\n <ChevronDown className='h-4 w-4' aria-hidden='true' />\n </Button>\n </>\n )}\n </div>\n );\n}\n\nfunction renderErrorNavigationButton(\n label: string,\n onClick: () => void,\n icon: React.ReactNode,\n) {\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n variant='outline'\n size='icon'\n className='h-7 w-7'\n aria-label={label}\n onClick={onClick}\n >\n {icon}\n </Button>\n </TooltipTrigger>\n <TooltipContent>{label}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n}\n\nfunction columnHeader(\n field: string,\n title: string | undefined,\n definition: TableColumnDefinition | undefined,\n) {\n return definition?.headerName ?? title ?? createCleanLabel(field);\n}\n\nfunction ArrayTableRow({\n table,\n index,\n columns,\n hasRowActions,\n}: {\n table: ArrayTableProps;\n index: number;\n columns: ReturnType<typeof resolveTableColumns>;\n hasRowActions: boolean;\n}) {\n const {\n path,\n enabled,\n readonly,\n data,\n moveUp,\n moveDown,\n translations,\n rowDetail,\n options,\n selection,\n renderers,\n cells,\n } = table;\n const [columnWidths] = table.columnSizes;\n\n const actionProps = {\n rowDetail,\n showSortButtons: options.showSortButtons,\n path,\n enabled,\n readonly,\n data,\n moveUp,\n moveDown,\n translations,\n };\n\n const rowPath = composePaths(path, String(index));\n const panel = rowDetail.options?.presentation === 'panel';\n const current =\n panel && rowDetail.panelOpen && rowDetail.selection?.index === index;\n return (\n <tr\n className={current ? 'border-b bg-accent' : 'border-b'}\n aria-current={current || undefined}\n onClick={() => {\n if (panel) {\n rowDetail.open(index);\n }\n }}\n >\n <td\n className='p-2 text-center'\n style={selectionColumnStyle(columnWidths.__selection)}\n onClick={(event) => event.stopPropagation()}\n >\n <Checkbox\n className='shadcn-jsonforms-row-selection align-middle'\n aria-label={rowDetail.t('collection.selectRow', {\n index: index + 1,\n })}\n disabled={!selection.selectable}\n checked={selection.selected.includes(index)}\n onCheckedChange={(checked) =>\n selection.setSelected(\n checked === true\n ? [...selection.selected, index]\n : selection.selected.filter((i) => i !== index),\n )\n }\n />\n </td>\n {columns.map(\n ({\n field,\n column,\n style,\n maxWidth,\n propertyBound,\n editorOptions,\n cellOptions,\n }) => {\n const cellPath = propertyBound\n ? composePaths(rowPath, field)\n : rowPath;\n return (\n <td\n key={field}\n style={style}\n className='shadcn-jsonforms-table-cell p-2'\n >\n <div style={{ maxWidth, overflow: 'hidden' }}>\n <ItemProvider path={rowPath}>\n <DispatchCell\n schema={column}\n uischema={{\n type: 'Control',\n scope: propertyBound ? '#/properties/' + field : '#',\n options: editorOptions,\n }}\n path={cellPath}\n enabled={enabled && !readonly && !(column as any).readOnly}\n renderers={renderers}\n cells={cells}\n />\n </ItemProvider>\n <TableCellErrors\n schema={column}\n uischema={{\n type: 'Control',\n scope: '#',\n options: cellOptions,\n }}\n path={cellPath}\n />\n </div>\n </td>\n );\n },\n )}\n {hasRowActions && (\n <td\n className='whitespace-nowrap p-2'\n style={{ width: columnWidths.__actions ?? 1 }}\n >\n <ArrayRowActions index={index} {...actionProps} />\n </td>\n )}\n </tr>\n );\n}\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ItemValidationIndicator } from '@chobantonov/jsonforms-react-renderer-common/validation/ItemValidationIndicator';\nimport { ContainerValidationIndicator } from '../../layouts/ValidationIndicator';\nimport { ArrayLayoutProps, composePaths } from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport React from 'react';\nimport {\n Trash2,\n ChevronUp,\n ChevronDown,\n ArrowUp,\n ArrowDown,\n} from 'lucide-react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n} from '@jsonforms-react-shadcn-ui/collapsible';\nimport type { ArrayItemViewProps } from './ArrayItemViewProps';\nconst ArrayItemPanel = ({\n label,\n index,\n open,\n onOpenChange,\n hideAvatar,\n actions,\n indicator,\n children,\n}: React.PropsWithChildren<{\n label: string;\n index: number;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n hideAvatar: boolean;\n actions: React.ReactNode;\n indicator: React.ReactNode;\n}>) => {\n const t = useI18n();\n return (\n <Collapsible\n open={open}\n onOpenChange={onOpenChange}\n className='shadcn-jsonforms-array-item'\n >\n <div className='relative flex items-center'>\n <CollapsibleTrigger\n render={<Button type='button' variant='ghost' />}\n className='h-auto min-w-0 flex-1 justify-start gap-3 whitespace-normal text-left'\n aria-label={label || String(index + 1)}\n >\n {!hideAvatar && (\n <span\n data-array-index\n aria-label={`${t('array.indexLabel')} ${index + 1}`}\n className='flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-muted text-muted-foreground'\n >\n {index + 1}\n </span>\n )}\n <span className='flex min-w-0 flex-1 items-center gap-2 pe-10'>\n <span className='min-w-0'>\n {hideAvatar ? `${index + 1} ${label}` : label}\n </span>\n <span className='flex shrink-0 items-center leading-none'>\n {indicator}\n </span>\n </span>\n {open ? (\n <ChevronUp aria-hidden='true' />\n ) : (\n <ChevronDown aria-hidden='true' />\n )}\n </CollapsibleTrigger>\n <div className='absolute right-10 flex items-center gap-1'>\n {actions}\n </div>\n </div>\n <CollapsibleContent keepMounted hidden={!open} className='px-3 pb-3'>\n {children}\n </CollapsibleContent>\n </Collapsible>\n );\n};\n\ntype ArrayItemPanelsProps = ArrayItemViewProps &\n Pick<ArrayLayoutProps, 'config' | 'uischema'> & {\n expandedIndex?: number;\n onExpand: (index: number | undefined) => void;\n onMove: (index: number, direction: -1 | 1) => void;\n canMove: boolean;\n count: number;\n translations: {\n upAriaLabel: string;\n up: string;\n downAriaLabel: string;\n down: string;\n };\n };\n\nconst ArrayItemActions = ({\n index,\n settings,\n}: {\n index: number;\n settings: ArrayItemPanelsProps;\n}) => {\n const t = useI18n();\n const {\n uischema,\n config,\n translations,\n canMove,\n count,\n removeLabel,\n removeTooltip,\n canRemove,\n onMove,\n requestRemove,\n } = settings;\n return (\n <>\n {(uischema.options?.showSortButtons ?? config?.showSortButtons) && (\n <>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n aria-label={translations.upAriaLabel}\n title={translations.up}\n disabled={!canMove || index === 0}\n onClick={() => onMove(index, -1)}\n >\n <ArrowUp aria-hidden='true' />\n </Button>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n aria-label={translations.downAriaLabel}\n title={translations.down}\n disabled={!canMove || index === count - 1}\n onClick={() => onMove(index, 1)}\n >\n <ArrowDown aria-hidden='true' />\n </Button>\n </>\n )}\n <Button\n variant='destructive'\n size='icon'\n className='h-7 w-7'\n aria-label={removeLabel || t('array.removeAriaLabel')}\n title={removeTooltip || t('array.removeTooltip')}\n type='button'\n disabled={!canRemove}\n onClick={() => requestRemove(index)}\n >\n <Trash2 className='h-4 w-4' aria-hidden='true' />\n </Button>\n </>\n );\n};\n\nexport function ArrayItemPanels(props: ArrayItemPanelsProps) {\n const {\n schema,\n path,\n enabled,\n cells,\n renderers,\n detail,\n indices,\n hideAvatar,\n childLabelForIndex,\n config,\n uischema,\n expandedIndex,\n onExpand,\n } = props;\n return (\n <>\n {indices.map((index) => {\n const childPath = composePaths(path, `${index}`);\n const childLabel = childLabelForIndex(childPath, index);\n return (\n <ArrayItemPanel\n key={childPath}\n label={childLabel}\n indicator={\n <ItemValidationIndicator\n Indicator={ContainerValidationIndicator}\n path={childPath}\n options={uischema.options}\n config={config}\n />\n }\n index={index}\n open={expandedIndex === index}\n onOpenChange={(open) => onExpand(open ? index : undefined)}\n hideAvatar={hideAvatar}\n actions={<ArrayItemActions index={index} settings={props} />}\n >\n <JsonFormsDispatch\n schema={schema}\n uischema={detail}\n path={childPath}\n enabled={enabled}\n renderers={renderers}\n cells={cells}\n />\n </ArrayItemPanel>\n );\n })}\n </>\n );\n}\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ScrollRegion } from '../../components/ScrollRegion';\nimport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from '@jsonforms-react-shadcn-ui/resizable';\nimport { ArrayLayoutProps, composePaths } from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport React from 'react';\nimport { Check, Trash2 } from 'lucide-react';\nimport {\n Item,\n ItemGroup,\n ItemContent,\n ItemActions,\n} from '@jsonforms-react-shadcn-ui/item';\nimport { Avatar, AvatarFallback } from '@jsonforms-react-shadcn-ui/avatar';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport type { ArrayItemViewProps } from './ArrayItemViewProps';\nexport function ArrayListDetail({\n schema,\n path,\n enabled,\n cells,\n renderers,\n detail,\n indices,\n count,\n label,\n readonly,\n selectedItem,\n emptyMessage,\n ...itemProps\n}: ArrayItemViewProps &\n Pick<ArrayLayoutProps, 'label' | 'readonly'> & {\n count: number;\n selectedItem: number;\n onSelect: (index: number) => void;\n emptyMessage: () => string;\n }) {\n if (count === 0)\n return (\n <div className='py-6 text-center text-muted-foreground'>\n {emptyMessage()}\n </div>\n );\n const activeIndex = Math.min(selectedItem, count - 1);\n return (\n <ResizablePanelGroup orientation='horizontal' style={{ height: 'auto' }}>\n <ResizablePanel defaultSize='25%' minSize='15%' maxSize='60%'>\n <ScrollRegion\n className='shadcn-jsonforms-list-navigation'\n style={{ maxHeight: '20rem' }}\n >\n <ItemGroup\n className='min-w-0 rounded-lg border p-1'\n aria-label={label}\n >\n {indices.map((index) => {\n const selected = activeIndex === index;\n const itemLabel = itemProps.childLabelForIndex(\n composePaths(path, String(index)),\n index,\n );\n return (\n <ArrayListItem\n key={index}\n index={index}\n selected={selected}\n itemLabel={itemLabel}\n {...itemProps}\n />\n );\n })}\n </ItemGroup>\n </ScrollRegion>\n </ResizablePanel>\n <ResizableHandle withHandle />\n <ResizablePanel minSize='25%'>\n <div className='min-w-0 space-y-3 ps-3' role='tabpanel'>\n <JsonFormsDispatch\n schema={schema}\n uischema={detail}\n path={composePaths(path, String(activeIndex))}\n enabled={enabled && !readonly}\n renderers={renderers}\n cells={cells}\n />\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n );\n}\n\nfunction ArrayListItem({\n index,\n selected,\n itemLabel,\n hideAvatar,\n canRemove,\n removeLabel,\n removeTooltip,\n onSelect,\n requestRemove,\n}: Pick<\n ArrayItemViewProps,\n 'hideAvatar' | 'canRemove' | 'removeLabel' | 'removeTooltip' | 'requestRemove'\n> & {\n index: number;\n selected: boolean;\n itemLabel: string;\n onSelect: (index: number) => void;\n}) {\n const t = useI18n();\n return (\n <Item\n role='listitem'\n size='sm'\n variant={selected ? 'muted' : 'default'}\n className='flex-nowrap gap-1 p-1'\n >\n <ItemContent className='min-w-0'>\n <Button\n type='button'\n variant='ghost'\n className='h-auto min-h-12 w-full min-w-0 justify-start gap-3 whitespace-nowrap text-left'\n aria-pressed={selected}\n aria-label={itemLabel || String(index + 1)}\n onClick={() => onSelect(index)}\n >\n {!hideAvatar && (\n <Avatar\n data-array-index\n aria-label={`${t('array.indexLabel')} ${index + 1}`}\n className='border'\n >\n <AvatarFallback>{index + 1}</AvatarFallback>\n </Avatar>\n )}\n <span className='min-w-0 flex-1 truncate'>\n {hideAvatar ? `${index + 1} ${itemLabel}` : itemLabel}\n </span>\n {selected && (\n <Check className='h-4 w-4 shrink-0' aria-hidden='true' />\n )}\n </Button>\n </ItemContent>\n <ItemActions className='shrink-0'>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-6 w-6 bg-destructive/10 text-destructive hover:bg-destructive/20 hover:text-destructive'\n aria-label={removeLabel}\n title={removeTooltip}\n disabled={!canRemove}\n onClick={() => requestRemove(index)}\n >\n <Trash2 className='h-3 w-3' aria-hidden='true' />\n </Button>\n </ItemActions>\n </Item>\n );\n}\n","import { useTranslator } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { resolveCollapsed } from '@chobantonov/jsonforms-react-renderer-common/layout/groupState';\nimport { ArrayPanelToggle } from './ArrayPanelToggle';\nimport { findDetailUISchema as findUISchema } from '@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema';\nimport { usePathErrorIndicator } from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport {\n Tooltip,\n TooltipProvider,\n TooltipTrigger,\n TooltipContent,\n} from '@jsonforms-react-shadcn-ui/tooltip';\nimport { ErrorIndicator } from './ErrorIndicator';\nimport { useColumnWidths } from '@chobantonov/jsonforms-react-renderer-common/collections/columnResize';\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 { CollectionPager } from './CollectionPager';\nimport { RowDetailToggle } from './RowDetailFrame';\nimport { useArrayPanelState } from '@chobantonov/jsonforms-react-renderer-common/collections/useArrayPanelState';\nimport {\n and,\n ArrayLayoutProps,\n JsonSchema,\n composePaths,\n createControlElement,\n createDefaultValue,\n getFirstPrimitiveProp,\n isObjectArrayWithNesting,\n schemaTypeIs,\n or,\n uiTypeIs,\n RankedTester,\n rankWith,\n Resolve,\n} from '@jsonforms/core';\nimport { useJsonForms } from '@jsonforms/react';\nimport React from 'react';\nimport { Plus, Trash2 } from 'lucide-react';\nimport { shouldConfirm } from '@chobantonov/jsonforms-react-renderer-common/interaction/confirmation';\nimport { DeleteDialog } from './DeleteDialog';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { ArrayTable } from './array/ArrayTable';\nimport { ArrayItemPanels } from './array/ArrayItemPanels';\nimport { ArrayListDetail } from './array/ArrayListDetail';\n\nfunction usesDefaultDetail(detail: unknown) {\n return (\n !detail ||\n (typeof detail === 'string' && detail.toUpperCase() === 'DEFAULT')\n );\n}\n\nfunction supportsDefaultTable(\n { arraySchema, rootSchema, config }: ArrayLayoutProps,\n schema: JsonSchema,\n) {\n const nestedItems = isObjectArrayWithNesting(\n createControlElement('#'),\n arraySchema ?? ({ type: 'array', items: schema } as JsonSchema),\n { rootSchema, config },\n );\n if (nestedItems) return false;\n return (\n Boolean(schema.properties) ||\n ['string', 'number', 'integer', 'boolean', 'null'].includes(\n schema.type as string,\n )\n );\n}\n\nfunction arrayPresentation(\n props: ArrayLayoutProps,\n schema: JsonSchema,\n options: NonNullable<ArrayLayoutProps['uischema']['options']>,\n): 'list' | 'table' | 'panels' {\n if (String(props.uischema.type) === 'ListWithDetail') return 'list';\n if (options.table === true || options.format === 'table') return 'table';\n if (options.table === false || !usesDefaultDetail(options.detail))\n return 'panels';\n return supportsDefaultTable(props, schema) ? 'table' : 'panels';\n}\n\nexport const ShadcnArrayRenderer = (props: ArrayLayoutProps) => {\n const {\n addItem,\n moveUp,\n moveDown,\n cells,\n config,\n readonly,\n data,\n enabled,\n label,\n required,\n path,\n removeItems,\n renderers,\n rootSchema,\n schema = {},\n arraySchema,\n uischema,\n visible,\n } = props;\n const ctx = useJsonForms();\n const options = { ...config, ...uischema.options };\n const arrayErrors = usePathErrorIndicator(\n path,\n uischema.options,\n !options.hideArraySummaryValidation,\n );\n const [expandedIndex, setExpandedIndex] = React.useState<number | undefined>(\n () =>\n data > 0 && !resolveCollapsed(uischema.options, config, 'array')\n ? 0\n : undefined,\n );\n const removeItem = (index: number) => {\n setExpandedIndex((current) =>\n current === undefined || current < index\n ? current\n : current === index\n ? undefined\n : current - 1,\n );\n removeItems?.(path, [index])();\n };\n const moveItem = (index: number, direction: -1 | 1) => {\n if (!enabled || readonly) return;\n const target = index + direction;\n if (target < 0 || target >= data) return;\n setExpandedIndex((current) =>\n current === index ? target : current === target ? index : current,\n );\n (direction === -1 ? moveUp : moveDown)?.(path, index)();\n };\n const translate = useTranslator();\n const translations = {\n addAriaLabel: translate('array.addAriaLabel', 'Add'),\n addTooltip: translate('array.addTooltip', 'Add item'),\n removeAriaLabel: translate('array.removeAriaLabel', 'Remove'),\n removeTooltip: translate('array.removeTooltip', 'Remove item'),\n upAriaLabel: translate('array.upAriaLabel', 'Move up') || 'Move up',\n up: translate('array.up', 'Move up') || 'Move up',\n downAriaLabel: translate('array.downAriaLabel', 'Move down') || 'Move down',\n down: translate('array.down', 'Move down') || 'Move down',\n };\n const selection = useTableSelection({\n path,\n schema,\n uischema,\n config,\n enabled,\n readonly,\n removeItems,\n });\n const columnSizes = useColumnWidths();\n const [selectedItem, setSelectedItem] = React.useState(0);\n const [pendingIndex, setPendingIndex] = React.useState<number>();\n const panel = useArrayPanelState(uischema.options, config);\n const canAdd =\n enabled &&\n !readonly &&\n !options.disableAdd &&\n !(\n options.restrict &&\n arraySchema.maxItems !== undefined &&\n data >= arraySchema.maxItems\n );\n const canRemove =\n !!removeItems &&\n enabled &&\n !readonly &&\n !options.disableRemove &&\n !(\n options.restrict &&\n arraySchema.minItems !== undefined &&\n data <= arraySchema.minItems\n );\n const requestRemove = (index: number) => {\n if (!canRemove) return;\n const value = Resolve.data(\n ctx.core?.data,\n composePaths(path, String(index)),\n );\n if (\n shouldConfirm(\n {\n options: uischema.options,\n config,\n catalogId: 'arrayLayout',\n operation: 'delete',\n },\n [value],\n )\n )\n setPendingIndex(index);\n else removeItem(index);\n };\n const detail = React.useMemo(\n () =>\n findUISchema(\n ctx.uischemas ?? [],\n schema,\n uischema.scope,\n path,\n // `items: true` resolves to a boolean schema; its generated layout is empty.\n typeof schema === 'boolean' && schema\n ? () => createControlElement('#')\n : undefined,\n uischema,\n rootSchema,\n ),\n [ctx.uischemas, schema, uischema, path, rootSchema],\n );\n const childLabelProp =\n uischema.options?.elementLabelProp ?? getFirstPrimitiveProp(schema);\n\n const presentation = arrayPresentation(props, schema, options);\n const table = presentation === 'table';\n const page = useCollectionPagination(\n Array.from({ length: data }, (_, i) => i),\n uischema.options?.pagination,\n config,\n 'array',\n table,\n );\n const rowDetail = useRowDetail({\n schema,\n rootSchema,\n uischema,\n config,\n path,\n enabled,\n readonly,\n renderers,\n cells,\n });\n if (!visible) return null;\n const childLabelForIndex = (childPath: string, index: number) => {\n if (!childLabelProp) {\n return `${index}`;\n }\n const labelValue = Resolve.data(\n 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 const itemView = {\n schema,\n path,\n renderers,\n cells,\n enabled,\n detail,\n indices: page.indices,\n hideAvatar: Boolean(options.hideAvatar),\n canRemove,\n requestRemove,\n childLabelForIndex,\n removeLabel: translations.removeAriaLabel,\n removeTooltip: translations.removeTooltip,\n };\n return (\n <PendingChangesProvider changes={page.pending}>\n <div className='shadcn-jsonforms-array'>\n <div className='shadcn-jsonforms-array-header'>\n <div className='flex items-center gap-2'>\n <h3>\n {label}\n {required && !options.hideRequiredAsterisk && (\n <span aria-hidden='true'> *</span>\n )}\n </h3>\n {arrayErrors && (\n <ErrorIndicator\n local\n errors={arrayErrors}\n className='shadcn-jsonforms-array-errors'\n />\n )}\n </div>\n <div className='shadcn-jsonforms-array-actions'>\n <RowDetailToggle state={rowDetail} />\n {table && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n type='button'\n size='icon-sm'\n variant='destructive'\n aria-label={rowDetail.t('collection.deleteSelected')}\n disabled={!selection.canDelete}\n onClick={selection.request}\n >\n <Trash2 aria-hidden='true' className='h-4 w-4' />\n </Button>\n </TooltipTrigger>\n <TooltipContent>\n {rowDetail.t('collection.deleteSelected')}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n <Button\n type='button'\n size='icon-sm'\n aria-label={\n translations?.addAriaLabel ??\n translate('array.addAriaLabel', 'Add')\n }\n title={\n translations?.addTooltip ??\n translate('array.addTooltip', 'Add item')\n }\n disabled={!canAdd}\n onClick={() => {\n if (!canAdd) return;\n if (!options.collapseNewItems) setExpandedIndex(data);\n addItem(path, createDefaultValue(schema, rootSchema))();\n }}\n >\n <Plus className='h-4 w-4' aria-hidden='true' />\n </Button>\n <ArrayPanelToggle panel={panel} label={label} />\n </div>\n </div>\n <div id={panel.contentId} hidden={panel.collapsed}>\n {presentation === 'list' ? (\n <ArrayListDetail\n {...itemView}\n count={data}\n label={label}\n readonly={readonly}\n selectedItem={selectedItem}\n onSelect={setSelectedItem}\n emptyMessage={() => translate('array.noDataMessage', 'No data')}\n />\n ) : table ? (\n <ArrayTable\n {...props}\n schema={schema}\n options={options}\n rowDetail={rowDetail}\n page={page}\n selection={selection}\n columnSizes={columnSizes}\n translations={translations}\n />\n ) : (\n <ArrayItemPanels\n {...itemView}\n config={config}\n uischema={uischema}\n expandedIndex={expandedIndex}\n onExpand={setExpandedIndex}\n onMove={moveItem}\n canMove={enabled && !readonly}\n count={data}\n translations={translations}\n />\n )}\n {!table && <CollectionPager page={page} />}\n </div>\n <DeleteDialog\n open={selection.confirming}\n onCancel={selection.cancel}\n onConfirm={selection.confirm}\n />\n <DeleteDialog\n open={pendingIndex !== undefined}\n onCancel={() => setPendingIndex(undefined)}\n onConfirm={() => {\n if (canRemove && pendingIndex !== undefined && pendingIndex < data)\n removeItem(pendingIndex);\n setPendingIndex(undefined);\n }}\n />\n </div>\n </PendingChangesProvider>\n );\n};\n\nexport const arrayControlTester: RankedTester = rankWith(\n 3,\n and(\n or(uiTypeIs('Control'), uiTypeIs('ListWithDetail')),\n schemaTypeIs('array'),\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 React from 'react';\nimport { ContainerValidationIndicator } from '../layouts/ValidationIndicator';\nimport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from '@jsonforms-react-shadcn-ui/breadcrumb';\nimport { validateAdditionalPropertyName } from '@chobantonov/jsonforms-react-renderer-common/objects/additionalPropertyName';\nimport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from '@jsonforms-react-shadcn-ui/resizable';\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 } from '@jsonforms/core';\nimport { withJsonFormsControlProps } from '@jsonforms/react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '@jsonforms-react-shadcn-ui/collapsible';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport {\n MixedNavigationContext,\n MixedTree,\n MixedTypeSelector,\n NestedMixedNavigation,\n} from './mixed/MixedWidgets';\nimport { useConfirmation } from './mixed/useConfirmation';\nimport { MixedTreeNode } from '@chobantonov/jsonforms-react-renderer-common/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 appliedOptions,\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(MixedNavigationContext);\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 = <MixedTypeSelector {...model.selectorProps} />;\n const validateNodeRename = (node: MixedTreeNode, nextName: string) => {\n const oldName = node.path[node.path.length - 1];\n const parent = mixedParentNode(tree, node);\n if (!parent || typeof oldName !== 'string' || !canRenameNode(node)) {\n return t('mixed.renameBlocked');\n }\n const result = validateAdditionalPropertyName({\n name: nextName,\n currentName: oldName,\n data: parent.data,\n schema: schemaForType(parent.schema, 'object', rootSchema),\n rootSchema,\n validate: model.jsonforms.core?.ajv\n ? (schema, value) =>\n Boolean(model.jsonforms.core!.ajv!.validate(schema, value))\n : undefined,\n });\n if (result.error === 'required')\n return t('additionalProperties.nameRequired');\n if (result.error === 'already-defined')\n return t('additionalProperties.nameTaken', { name: nextName });\n if (result.error)\n return t('additionalProperties.nameInvalid', { name: nextName });\n return undefined;\n };\n const renameNode = (node: MixedTreeNode, nextName: string) => {\n if (!validateNodeRename(node, nextName)) model.renameNode(node, nextName);\n };\n\n if (!props.visible) return null;\n\n if (structuredLayout === 'code') return <MixedCodeControl {...props} />;\n\n if (structuredLayout === 'tree' && parentNavigation && isStructuredType) {\n return (\n <NestedMixedNavigation\n description={description}\n label={label}\n onView={() => parentNavigation.selectPath(path)}\n selector={selector}\n />\n );\n }\n\n const content = (\n <div\n data-structured-layout={structuredLayout}\n className='jsonforms-mixed-renderer min-w-0 space-y-2'\n >\n {confirmation.dialog}\n {isStructuredType ? (\n <Collapsible\n open={expanded}\n onOpenChange={model.setExpanded}\n className='min-w-0'\n >\n {label && uischema.label !== false && (\n <div className='shadcn-jsonforms-label mb-2'>{label}</div>\n )}\n <div className='flex items-center gap-3'>\n <div className='w-36 shrink-0'>{selector}</div>\n {model.validation.show && (\n <ContainerValidationIndicator count={model.validation.count} />\n )}\n {collapsible ? (\n <CollapsibleTrigger\n render={<Button type='button' variant='ghost' />}\n className='flex-1 justify-end'\n aria-label={label || t('control.value')}\n >\n {expanded ? (\n <ChevronUp aria-hidden='true' />\n ) : (\n <ChevronDown aria-hidden='true' />\n )}\n </CollapsibleTrigger>\n ) : (\n <span className='flex-1' />\n )}\n </div>\n <CollapsibleContent keepMounted hidden={!expanded} className='pt-3'>\n {structuredLayout === 'nested' && renderedControl}\n {structuredLayout === 'tree' && tree && selectedNode && (\n <ResizablePanelGroup orientation='horizontal' className='min-w-0'>\n <ResizablePanel\n defaultSize='30%'\n minSize='20%'\n className='pr-3'\n >\n <MixedTree\n root={tree}\n selectedPath={selectedNode.path}\n onSelect={(node) => setSelectedPath(node.path)}\n canDelete={model.canDeleteNode}\n canRename={canRenameNode}\n onDelete={model.deleteNode}\n onRename={renameNode}\n validateRename={validateNodeRename}\n />\n </ResizablePanel>\n <ResizableHandle withHandle />\n <ResizablePanel minSize='30%' className='pl-3'>\n <div className='min-w-0 space-y-2'>\n <Breadcrumb aria-label={t('mixed.valuePath')}>\n <BreadcrumbList>\n {[\n [],\n ...selectedNode.path.map((_, index) =>\n selectedNode.path.slice(0, index + 1),\n ),\n ].map((nodePath, index) => (\n <React.Fragment key={index}>\n {index > 0 && <BreadcrumbSeparator />}\n <BreadcrumbItem>\n {index === selectedNode.path.length ? (\n <BreadcrumbPage>\n {index === 0\n ? label || t('control.value')\n : String(nodePath[index - 1])}\n </BreadcrumbPage>\n ) : (\n <BreadcrumbLink asChild>\n <button\n type='button'\n onClick={() => setSelectedPath(nodePath)}\n >\n {index === 0\n ? label || t('control.value')\n : String(nodePath[index - 1])}\n </button>\n </BreadcrumbLink>\n )}\n </BreadcrumbItem>\n </React.Fragment>\n ))}\n </BreadcrumbList>\n </Breadcrumb>\n <MixedNodeControl\n {...model.detailProps}\n node={selectedNode}\n {...model.nodeEditorProps}\n MixedTypeSelector={MixedTypeSelector}\n wrapStructured={(children) => (\n <div className='space-y-2'>{children}</div>\n )}\n />\n </div>\n </ResizablePanel>\n </ResizablePanelGroup>\n )}\n </CollapsibleContent>\n </Collapsible>\n ) : (\n <>\n {label && uischema.label !== false && (\n <div className='shadcn-jsonforms-label'>\n {label}\n {props.required && !appliedOptions.hideRequiredAsterisk && ' *'}\n </div>\n )}\n <div\n className={\n selectedType && selectedType !== 'null'\n ? 'jsonforms-mixed-renderer-primitive'\n : ''\n }\n >\n {selector}\n <div className='min-w-0'>{renderedControl}</div>\n </div>\n </>\n )}\n </div>\n );\n return structuredLayout === 'nested' || parentNavigation ? (\n content\n ) : (\n <MixedNavigationContext.Provider value={model.navigation}>\n {content}\n </MixedNavigationContext.Provider>\n );\n};\nexport const MixedRenderer = withJsonFormsControlProps(MixedRendererComponent);\n","import React from '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 { ErrorIndicator } from './ErrorIndicator';\nimport { AdditionalProperties } from './AdditionalProperties';\n\nconst ObjectFrame = ({\n path,\n title,\n errors,\n detail,\n additional,\n}: ObjectFrameProps) => {\n return (\n <div className={path ? 'shadcn-jsonforms-object' : undefined}>\n {title && (\n <div className='flex items-center gap-1'>\n <h3>{title}</h3>\n {errors && <ErrorIndicator local errors={errors} />}\n </div>\n )}\n {!title && errors && (\n <div\n role='alert'\n className='text-sm text-destructive whitespace-pre-line'\n >\n {errors}\n </div>\n )}\n {detail}\n {additional}\n </div>\n );\n};\n\nexport const ShadcnObjectRenderer = createObjectRenderer(\n AdditionalProperties,\n ObjectFrame,\n true,\n);\n","import React from 'react';\nimport {\n CombinatorRendererProps,\n isOneOfControl,\n rankWith,\n} from '@jsonforms/core';\nimport { withJsonFormsOneOfProps } from '@jsonforms/react';\nimport { ShadcnAnyOfRenderer } from './AnyOfRenderer';\n\nexport const ShadcnOneOfRenderer = (props: CombinatorRendererProps) => (\n <ShadcnAnyOfRenderer {...props} combinator='oneOf' />\n);\nexport const oneOfControlTester = rankWith(3, isOneOfControl);\nexport const ShadcnOneOfControl = withJsonFormsOneOfProps(ShadcnOneOfRenderer);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport {\n ControlProps,\n isBooleanControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport React from 'react';\nimport { InputShell, makeId } from './InputControl';\nimport { Checkbox } from '@jsonforms-react-shadcn-ui/checkbox';\n\nfunction BooleanValueLabel({ value }: { value: unknown }) {\n const t = useI18n();\n return (\n <span>\n {typeof value === 'boolean'\n ? t(value ? 'boolean.yes' : 'boolean.no')\n : ''}\n </span>\n );\n}\n\nexport const ShadcnBooleanControl = ({\n config,\n uischema,\n schema,\n data,\n description,\n enabled,\n errors,\n handleChange,\n label,\n path,\n required,\n readonly,\n visible,\n}: ControlProps) => {\n if (!visible) return null;\n const id = makeId(path, label);\n\n return (\n <InputShell\n path={path}\n schema={schema}\n config={config}\n uischema={uischema}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <label className='shadcn-jsonforms-checkbox'>\n <Checkbox\n className='shadcn-jsonforms-checkbox-control'\n id={id}\n disabled={!enabled || readonly}\n checked={typeof data === 'boolean' ? data : 'indeterminate'}\n onCheckedChange={(checked) => handleChange(path, checked === true)}\n />\n <BooleanValueLabel value={data} />\n </label>\n </InputShell>\n );\n};\n\nexport const booleanControlTester: RankedTester = rankWith(2, isBooleanControl);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport type { TimeValue } from './dateTime';\nimport type { ControlProps } from '@jsonforms/core';\nimport { useJsonForms } from '@jsonforms/react';\nimport { useEffect } from 'react';\nimport dayjs from 'dayjs';\nimport {\n formatDate,\n parseDateValue,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/dateValues';\nimport {\n effectiveRestrict,\n resolveDataBounds,\n temporalBounds,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalBounds';\nimport {\n specDateSaveFormat,\n specTimeSaveFormat,\n specDateTimeSaveFormat,\n warnOnSaveFormat,\n} from '@chobantonov/jsonforms-react-renderer-common/formats/temporalFormats';\n\nconst saveFormats = {\n date: specDateSaveFormat,\n time: specTimeSaveFormat,\n dateTime: specDateTimeSaveFormat,\n};\n\nconst displayFormats = {\n date: 'YYYY-MM-DD',\n time: 'HH:mm',\n dateTime: 'YYYY-MM-DD HH:mm',\n};\nconst placeholderKeys = {\n date: 'temporal.datePlaceholder',\n time: 'temporal.timePlaceholder',\n dateTime: 'temporal.dateTimePlaceholder',\n} as const;\n\nfunction resolveTimeViews(views: unknown, displayFormat: string) {\n const timeViews = Array.isArray(views)\n ? views.filter((view) => ['hours', 'minutes', 'seconds'].includes(view))\n : [];\n const hasTimeViews = timeViews.length > 0;\n return {\n showHours: !hasTimeViews || timeViews.includes('hours'),\n showMinutes: !hasTimeViews || timeViews.includes('minutes'),\n useSeconds: hasTimeViews\n ? timeViews.includes('seconds')\n : displayFormat.includes('s'),\n };\n}\n\nfunction resolvePresentation(\n options: NonNullable<ControlProps['config']>,\n kind: keyof typeof saveFormats,\n defaultPlaceholder: string,\n) {\n const ampm = options.ampm === true;\n const displayFormat: string =\n options[`${kind}Format`] ??\n (kind === 'time' && ampm ? 'hh:mm a' : displayFormats[kind]);\n const saveFormat: string = options[`${kind}SaveFormat`] ?? saveFormats[kind];\n return {\n ampm,\n displayFormat,\n saveFormat,\n placeholder:\n typeof options.placeholder === 'string'\n ? options.placeholder\n : defaultPlaceholder,\n ...resolveTimeViews(options.views, displayFormat),\n };\n}\n\n/** Shared serialization and bound policy for the three shadcn pickers. */\nexport function useTemporalControl(\n props: ControlProps,\n kind: keyof typeof saveFormats,\n) {\n const context = useJsonForms();\n const options = { ...props.config, ...props.uischema.options };\n const t = useI18n();\n const presentation = resolvePresentation(\n options,\n kind,\n t(placeholderKeys[kind]),\n );\n const { displayFormat, saveFormat, useSeconds } = presentation;\n useEffect(() => {\n warnOnSaveFormat(props.schema.format, saveFormat);\n }, [props.schema.format, saveFormat]);\n const formats = [\n saveFormat,\n displayFormat,\n 'YYYY-MM-DDTHH:mm:ssZ',\n 'HH:mm:ssZ',\n 'HH:mm:ss',\n ];\n const selected =\n typeof props.data === 'string' ? parseDateValue(props.data, formats) : null;\n const selectedTime: TimeValue | undefined = selected\n ? {\n hours: selected.hour(),\n minutes: selected.minute(),\n seconds: selected.second(),\n }\n : undefined;\n const precision = useSeconds ? 'second' : 'minute';\n const schema = resolveDataBounds(\n props.schema as Record<string, unknown>,\n props.path,\n context.core?.data,\n );\n const bounds = temporalBounds(\n schema,\n formats,\n kind === 'date' ? 'day' : precision,\n kind === 'time',\n );\n const restrict = effectiveRestrict(props.uischema.options, props.config);\n const comparable = (value: Date) => {\n const date = dayjs(value);\n return kind === 'time' ? date.year(2000).month(0).date(1) : date;\n };\n const allowed = (value: Date) => {\n if (!restrict) return true;\n const date = comparable(value);\n return (\n !bounds.empty &&\n !(bounds.min && date.isBefore(bounds.min)) &&\n !(bounds.max && date.isAfter(bounds.max))\n );\n };\n const disabledDate = (value: Date) =>\n restrict &&\n (bounds.empty ||\n Boolean(bounds.min && dayjs(value).isBefore(bounds.min, 'day')) ||\n Boolean(bounds.max && dayjs(value).isAfter(bounds.max, 'day')));\n const commit = (value: Date) => {\n const date = dayjs(value)\n .second(useSeconds || kind === 'date' ? value.getSeconds() : 0)\n .millisecond(0);\n if (props.enabled && !props.readonly && allowed(date.toDate())) {\n props.handleChange(props.path, formatDate(date, saveFormat));\n }\n };\n return {\n options,\n selected,\n selectedTime,\n ...presentation,\n displayText: selected ? formatDate(selected, displayFormat) : undefined,\n allowed,\n disabledDate,\n commit,\n min: restrict ? bounds.min?.toDate() : undefined,\n max: restrict ? bounds.max?.toDate() : undefined,\n };\n}\n","import { resolveIntlLocale } from '@chobantonov/jsonforms-react-renderer-common/locale/intl';\nconst pad = (value: number) => String(value).padStart(2, '0');\n\nexport type TimeValue = {\n hours: number;\n minutes: number;\n seconds: number;\n};\n\nexport const parseDateValue = (value: unknown): Date | undefined => {\n if (typeof value !== 'string') return undefined;\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})/.exec(value);\n if (!match) return undefined;\n\n const date = new Date(\n Number(match[1]),\n Number(match[2]) - 1,\n Number(match[3]),\n );\n return date.getFullYear() === Number(match[1]) &&\n date.getMonth() === Number(match[2]) - 1 &&\n date.getDate() === Number(match[3])\n ? date\n : undefined;\n};\n\nexport const formatDateValue = (date: Date) =>\n `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;\n\nexport const formatDisplayDate = (date: Date, locale?: string) =>\n new Intl.DateTimeFormat(resolveIntlLocale(locale), {\n year: 'numeric',\n month: 'short',\n day: '2-digit',\n }).format(date);\n\nexport const parseTimeValue = (value: unknown): TimeValue | undefined => {\n if (typeof value !== 'string') return undefined;\n const match = /(?:T)?(\\d{2}):(\\d{2})(?::(\\d{2}))?/.exec(value);\n if (!match) return undefined;\n\n const result = {\n hours: Number(match[1]),\n minutes: Number(match[2]),\n seconds: Number(match[3] ?? 0),\n };\n return result.hours < 24 && result.minutes < 60 && result.seconds < 60\n ? result\n : undefined;\n};\n\nexport const formatTimeValue = (time: TimeValue, useSeconds = true) => {\n const value = `${pad(time.hours)}:${pad(time.minutes)}`;\n return useSeconds ? `${value}:${pad(time.seconds)}` : value;\n};\n\nconst formatDisplayTime = (time: TimeValue, ampm = false) => {\n if (!ampm) return formatTimeValue(time, time.seconds !== 0);\n const period = time.hours >= 12 ? 'PM' : 'AM';\n const hours = time.hours % 12 || 12;\n const value = `${pad(hours)}:${pad(time.minutes)}`;\n return `${time.seconds ? `${value}:${pad(time.seconds)}` : value} ${period}`;\n};\n\nexport const formatDateTimeValue = (date: Date, time: TimeValue) => {\n const offset = -date.getTimezoneOffset();\n const sign = offset >= 0 ? '+' : '-';\n const offsetHours = pad(Math.floor(Math.abs(offset) / 60));\n const offsetMinutes = pad(Math.abs(offset) % 60);\n return `${formatDateValue(date)}T${formatTimeValue(\n time,\n )}${sign}${offsetHours}:${offsetMinutes}`;\n};\n\nexport const formatDisplayDateTime = (\n date: Date,\n time: TimeValue,\n ampm = false,\n locale?: string,\n) => `${formatDisplayDate(date, locale)}, ${formatDisplayTime(time, ampm)}`;\n","import { resolveIntlLocale } from '@chobantonov/jsonforms-react-renderer-common/locale/intl';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { useTemporalControl } from '../util/useTemporalControl';\nimport {\n ControlProps,\n isDateControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { CalendarIcon, X } from 'lucide-react';\nimport React from 'react';\nimport { format } from 'date-fns/format';\nimport { parse } from 'date-fns/parse';\nimport { isValid } from 'date-fns/isValid';\nimport { useJsonForms } from '@jsonforms/react';\nimport {\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@jsonforms-react-shadcn-ui/select';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Calendar } from '@jsonforms-react-shadcn-ui/calendar';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@jsonforms-react-shadcn-ui/popover';\nimport { formatDisplayDate } from '../util/dateTime';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnDateControl = (props: ControlProps) => {\n const text = useI18n();\n const {\n data,\n description,\n enabled,\n errors,\n handleChange,\n label,\n path,\n required,\n uischema,\n visible,\n } = props;\n const temporal = useTemporalControl(props, 'date');\n const ctx = useJsonForms();\n const options = { ...props.config, ...uischema.options };\n const datePattern = (value: string) =>\n value.replace(/\\[([^\\]]*)\\]|YYYY|YY|DD|D/g, (token, literal) =>\n literal !== undefined\n ? \"'\" + literal + \"'\"\n : { YYYY: 'yyyy', YY: 'yy', DD: 'dd', D: 'd' }[token]!,\n );\n const saveFormat =\n typeof options.dateSaveFormat === 'string'\n ? datePattern(options.dateSaveFormat)\n : 'yyyy-MM-dd';\n const selectedDate =\n typeof data === 'string'\n ? parse(data, saveFormat, new Date(2000, 0, 1))\n : undefined;\n const selected =\n selectedDate && isValid(selectedDate) ? selectedDate : undefined;\n const monthYearOnly =\n Array.isArray(options.views) &&\n options.views.includes('month') &&\n options.views.includes('year') &&\n !options.views.includes('day') &&\n !options.views.includes('date');\n const [initialDate] = React.useState(() => new Date());\n const [draft, setDraft] = React.useState(selected ?? initialDate);\n const [open, setOpen] = React.useState(false);\n const [calendarYear] = React.useState(() => new Date().getFullYear());\n\n if (!visible) return null;\n\n const id = makeId(path, label);\n\n const disabledDates = temporal.disabledDate;\n const { min, max } = temporal;\n const { placeholder } = temporal;\n\n return (\n <InputShell\n {...props}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <div className='group relative w-full'>\n <Popover\n open={open}\n onOpenChange={(value) => {\n if (value) setDraft(selected ?? new Date());\n setOpen(value);\n }}\n >\n <PopoverTrigger asChild>\n <Button\n id={id}\n type='button'\n variant='outline'\n disabled={!enabled || props.readonly}\n autoFocus={uischema.options?.focus === true}\n aria-invalid={!!errors}\n className='w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground'\n data-empty={!selected}\n >\n <CalendarIcon className='h-4 w-4' />\n {selected\n ? typeof options.dateFormat === 'string'\n ? format(selected, datePattern(options.dateFormat))\n : formatDisplayDate(selected, ctx.i18n?.locale)\n : placeholder}\n </Button>\n </PopoverTrigger>\n <PopoverContent align='start' className='w-auto p-0'>\n {monthYearOnly ? (\n <div className='space-y-4 p-3'>\n <div className='flex gap-2'>\n <Select\n value={String(draft.getMonth())}\n onValueChange={(value) =>\n setDraft(new Date(draft.getFullYear(), Number(value), 1))\n }\n >\n <SelectTrigger\n aria-label={text('temporal.month')}\n className='w-36'\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {Array.from({ length: 12 }, (_, month) => (\n <SelectItem key={month} value={String(month)}>\n {new Intl.DateTimeFormat(\n resolveIntlLocale(ctx.i18n?.locale),\n {\n month: 'long',\n },\n ).format(new Date(2000, month, 1))}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Select\n value={String(draft.getFullYear())}\n onValueChange={(value) =>\n setDraft(new Date(Number(value), draft.getMonth(), 1))\n }\n >\n <SelectTrigger\n aria-label={text('temporal.year')}\n className='w-24'\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {Array.from(\n {\n length:\n (max?.getFullYear() ?? calendarYear + 100) -\n (min?.getFullYear() ?? calendarYear - 100) +\n 1,\n },\n (_, index) =>\n (min?.getFullYear() ?? calendarYear - 100) + index,\n ).map((year) => (\n <SelectItem key={year} value={String(year)}>\n {year}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className='flex justify-end gap-2'>\n <Button\n variant='outline'\n type='button'\n onClick={() => setOpen(false)}\n >\n {text('control.cancel')}\n </Button>\n <Button\n type='button'\n disabled={!!((min && draft < min) || (max && draft > max))}\n onClick={() => {\n temporal.commit(draft);\n setOpen(false);\n }}\n >\n {text('control.apply')}\n </Button>\n </div>\n </div>\n ) : (\n <Calendar\n mode='single'\n selected={selected}\n defaultMonth={selected}\n onSelect={(date) => {\n if (date) temporal.commit(date);\n else if (enabled && !props.readonly)\n handleChange(path, undefined);\n setOpen(false);\n }}\n disabled={disabledDates}\n captionLayout='dropdown'\n startMonth={min ?? new Date(calendarYear - 100, 0)}\n endMonth={max ?? new Date(calendarYear + 20, 11)}\n />\n )}\n </PopoverContent>\n </Popover>\n {selected &&\n enabled &&\n !props.readonly &&\n (uischema.options?.clearable ?? props.config?.clearable ?? true) ? (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100'\n aria-label={text('temporal.clearDate')}\n title={text('temporal.clearDate')}\n onClick={() => handleChange(path, undefined)}\n >\n <X className='h-4 w-4' />\n </Button>\n ) : null}\n </div>\n </InputShell>\n );\n};\n\nexport const dateControlTester: RankedTester = rankWith(4, isDateControl);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport React from 'react';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport { TimeValue, formatTimeValue, parseTimeValue } from '../util/dateTime';\n\nexport type TimePickerProps = {\n value?: string;\n onChange: (value: string) => void;\n useSeconds?: boolean;\n showHours?: boolean;\n showMinutes?: boolean;\n ampm?: boolean;\n disabled?: boolean;\n isAllowed?: (time: TimeValue) => boolean;\n};\n\ntype TimePart = 'hours' | 'minutes' | 'seconds';\n\nconst partActionKeys = {\n hours: {\n increase: 'temporal.increaseHours',\n decrease: 'temporal.decreaseHours',\n },\n minutes: {\n increase: 'temporal.increaseMinutes',\n decrease: 'temporal.decreaseMinutes',\n },\n seconds: {\n increase: 'temporal.increaseSeconds',\n decrease: 'temporal.decreaseSeconds',\n },\n} as const;\n\nconst emptyTime: TimeValue = { hours: 0, minutes: 0, seconds: 0 };\n\nconst TimePartInput = ({\n part,\n label,\n displayedValue,\n onValueChange,\n onStep,\n ampm,\n disabled,\n time,\n isAllowed,\n}: {\n part: TimePart;\n label: string;\n displayedValue?: number;\n onValueChange: (value: number) => void;\n onStep: (amount: number) => void;\n ampm: boolean;\n disabled: boolean;\n time?: TimeValue;\n isAllowed?: TimePickerProps['isAllowed'];\n}) => {\n const t = useI18n();\n return (\n <div className='flex flex-col items-center gap-1'>\n <Button\n type='button'\n variant='ghost'\n size='icon'\n disabled={disabled}\n aria-label={t(partActionKeys[part].increase)}\n onClick={() => onStep(1)}\n >\n <ChevronUp className='h-4 w-4' />\n </Button>\n <Input\n type='number'\n inputMode='numeric'\n className='h-12 w-16 appearance-none text-center text-xl font-semibold [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none'\n value={displayedValue ?? ''}\n placeholder='--'\n min={ampm && part === 'hours' ? 1 : 0}\n max={part === 'hours' ? (ampm ? 12 : 23) : 59}\n disabled={disabled}\n aria-label={label}\n aria-invalid={time && isAllowed ? !isAllowed(time) : undefined}\n onChange={(event) => {\n if (event.currentTarget.value !== '') {\n onValueChange(Number(event.currentTarget.value));\n }\n }}\n />\n <Button\n type='button'\n variant='ghost'\n size='icon'\n disabled={disabled}\n aria-label={t(partActionKeys[part].decrease)}\n onClick={() => onStep(-1)}\n >\n <ChevronDown className='h-4 w-4' />\n </Button>\n </div>\n );\n};\n\nconst TimePeriodButtons = ({\n hours = 0,\n disabled,\n onChange,\n}: {\n hours?: number;\n disabled: boolean;\n onChange: (isPm: boolean) => void;\n}) => {\n const t = useI18n();\n return (\n <div className='ml-2 grid gap-1' aria-label={t('temporal.period')}>\n <Button\n type='button'\n size='sm'\n variant={hours < 12 ? 'default' : 'outline'}\n disabled={disabled}\n onClick={() => onChange(false)}\n >\n {t('temporal.am')}\n </Button>\n <Button\n type='button'\n size='sm'\n variant={hours >= 12 ? 'default' : 'outline'}\n disabled={disabled}\n onClick={() => onChange(true)}\n >\n {t('temporal.pm')}\n </Button>\n </div>\n );\n};\n\nconst displayHour = (hours: number, ampm: boolean) =>\n ampm ? hours % 12 || 12 : hours;\n\nexport const TimePicker = ({\n value,\n onChange,\n useSeconds = false,\n showHours = true,\n showMinutes = true,\n ampm = false,\n disabled = false,\n isAllowed,\n}: TimePickerProps) => {\n const t = useI18n();\n const parsedValue = parseTimeValue(value);\n const [time, setTime] = React.useState<TimeValue | undefined>(parsedValue);\n\n const [previousValue, setPreviousValue] = React.useState(value);\n if (previousValue !== value) {\n setPreviousValue(value);\n setTime(parsedValue);\n }\n\n const commit = (next: TimeValue) => {\n setTime(next);\n if (!isAllowed || isAllowed(next))\n onChange(formatTimeValue(next, useSeconds));\n };\n\n const updatePart = (part: TimePart, value: number) => {\n const current = time ?? emptyTime;\n const maximum = part === 'hours' ? 23 : 59;\n commit({ ...current, [part]: Math.max(0, Math.min(maximum, value)) });\n };\n\n const stepPart = (part: TimePart, amount: number) => {\n const current = time ?? emptyTime;\n const maximum = part === 'hours' ? 23 : 59;\n const next = (current[part] + amount + maximum + 1) % (maximum + 1);\n commit({ ...current, [part]: next });\n };\n\n const displayedHour = time ? displayHour(time.hours, ampm) : undefined;\n\n const updateDisplayedHour = (hour: number) => {\n if (!ampm) {\n updatePart('hours', hour);\n return;\n }\n const normalized = Math.max(1, Math.min(12, hour));\n const isPm = (time?.hours ?? 0) >= 12;\n updatePart('hours', (normalized % 12) + (isPm ? 12 : 0));\n };\n\n const setPeriod = (isPm: boolean) => {\n const current = time ?? emptyTime;\n const hours = (current.hours % 12) + (isPm ? 12 : 0);\n commit({ ...current, hours });\n };\n\n const renderPart = (\n part: TimePart,\n label: string,\n displayedValue: number | undefined,\n onValueChange = (next: number) => updatePart(part, next),\n ) => (\n <TimePartInput\n part={part}\n label={label}\n displayedValue={displayedValue}\n onValueChange={onValueChange}\n onStep={(amount) => stepPart(part, amount)}\n ampm={ampm}\n disabled={disabled}\n time={time}\n isAllowed={isAllowed}\n />\n );\n\n return (\n <div\n className='flex items-center justify-center gap-2'\n data-slot='time-picker'\n >\n {showHours &&\n renderPart(\n 'hours',\n t('temporal.hours'),\n displayedHour,\n updateDisplayedHour,\n )}\n {showHours && showMinutes && (\n <span className='select-none text-2xl font-semibold'>:</span>\n )}\n {showMinutes &&\n renderPart('minutes', t('temporal.minutes'), time?.minutes)}\n {useSeconds ? (\n <>\n {(showHours || showMinutes) && (\n <span className='select-none text-2xl font-semibold'>:</span>\n )}\n {renderPart('seconds', t('temporal.seconds'), time?.seconds)}\n </>\n ) : null}\n {ampm && showHours ? (\n <TimePeriodButtons\n hours={time?.hours}\n disabled={disabled}\n onChange={setPeriod}\n />\n ) : null}\n </div>\n );\n};\n","import { useJsonForms } from '@jsonforms/react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { useTemporalControl } from '../util/useTemporalControl';\nimport {\n ControlProps,\n isDateTimeControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { CalendarClock, X } from 'lucide-react';\nimport React from 'react';\nimport { TimePicker } from '../components/TimePicker';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport { Calendar } from '@jsonforms-react-shadcn-ui/calendar';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@jsonforms-react-shadcn-ui/popover';\nimport {\n TimeValue,\n formatDisplayDateTime,\n formatTimeValue,\n parseTimeValue,\n} from '../util/dateTime';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnDateTimeControl = (props: ControlProps) => {\n const text = useI18n();\n const locale = useJsonForms().i18n?.locale;\n const {\n data,\n description,\n enabled,\n errors,\n handleChange,\n label,\n path,\n required,\n uischema,\n visible,\n } = props;\n const temporal = useTemporalControl(props, 'dateTime');\n const [open, setOpen] = React.useState(false);\n const [calendarYear] = React.useState(() => new Date().getFullYear());\n const [draftDate, setDraftDate] = React.useState<Date>();\n const [draftTime, setDraftTime] = React.useState<TimeValue>();\n\n if (!visible) return null;\n\n const id = makeId(path, label);\n const selectedDate = temporal.selected?.toDate();\n const { selectedTime, ampm, useSeconds, placeholder } = temporal;\n\n const updateValue = (date: Date | undefined, time: TimeValue | undefined) => {\n if (date && time) {\n const value = new Date(date);\n value.setHours(time.hours, time.minutes, time.seconds, 0);\n temporal.commit(value);\n }\n };\n\n return (\n <InputShell\n {...props}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <div className='group relative w-full'>\n <Popover\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (nextOpen) {\n setDraftDate(selectedDate);\n setDraftTime(selectedTime);\n }\n }}\n >\n <PopoverTrigger asChild>\n <Button\n id={id}\n type='button'\n variant='outline'\n disabled={!enabled || props.readonly}\n autoFocus={uischema.options?.focus === true}\n aria-invalid={!!errors}\n className='w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground'\n data-empty={!selectedDate || !selectedTime}\n >\n <CalendarClock className='h-4 w-4' />\n {selectedDate && selectedTime\n ? typeof temporal.options.dateTimeFormat === 'string'\n ? temporal.displayText\n : formatDisplayDateTime(\n selectedDate,\n selectedTime,\n ampm,\n locale,\n )\n : typeof data === 'string' && data\n ? data\n : placeholder}\n </Button>\n </PopoverTrigger>\n <PopoverContent align='start' className='w-auto p-2'>\n <Calendar\n mode='single'\n disabled={temporal.disabledDate}\n selected={draftDate}\n defaultMonth={draftDate ?? selectedDate}\n captionLayout='dropdown'\n startMonth={new Date(calendarYear - 100, 0)}\n endMonth={new Date(calendarYear + 20, 11)}\n onSelect={(date) => {\n const nextTime =\n draftTime ??\n selectedTime ??\n ({ hours: 0, minutes: 0, seconds: 0 } as TimeValue);\n setDraftDate(date);\n setDraftTime(nextTime);\n updateValue(date, nextTime);\n }}\n />\n <div className='border-t p-2 pt-3'>\n <TimePicker\n value={\n draftTime\n ? formatTimeValue(draftTime, true)\n : typeof data === 'string'\n ? data\n : undefined\n }\n useSeconds={useSeconds}\n showHours={temporal.showHours}\n showMinutes={temporal.showMinutes}\n ampm={ampm}\n disabled={!enabled || props.readonly}\n isAllowed={(time) => {\n const date = new Date(\n draftDate ?? selectedDate ?? new Date(),\n );\n date.setHours(time.hours, time.minutes, time.seconds, 0);\n return temporal.allowed(date);\n }}\n onChange={(value) => {\n const nextTime = parseTimeValue(value);\n setDraftTime(nextTime);\n updateValue(draftDate ?? selectedDate, nextTime);\n }}\n />\n </div>\n <div className='flex justify-end p-2 pt-0'>\n <Button type='button' size='sm' onClick={() => setOpen(false)}>\n {text('control.done')}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n {selectedDate &&\n enabled &&\n !props.readonly &&\n (uischema.options?.clearable ?? props.config?.clearable ?? true) ? (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100'\n aria-label={text('temporal.clearDateTime')}\n title={text('temporal.clearDateTime')}\n onClick={() => handleChange(path, undefined)}\n >\n <X className='h-4 w-4' />\n </Button>\n ) : null}\n </div>\n </InputShell>\n );\n};\n\nexport const dateTimeControlTester: RankedTester = rankWith(\n 4,\n isDateTimeControl,\n);\n","import isEqual from 'lodash/isEqual';\nimport {\n ControlProps,\n isEnumControl,\n OwnPropsOfEnum,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { TranslateProps } from '@jsonforms/react';\nimport React from 'react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport {\n ClearValueButton,\n hasClearableValue,\n} from '../components/ClearValueButton';\nimport { InputShell, makeId } from './InputControl';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@jsonforms-react-shadcn-ui/select';\n\nfunction enumPresentation(\n options: ControlProps['uischema']['options'],\n config: ControlProps['config'],\n) {\n const local = options ?? {};\n const global = config ?? {};\n return {\n searchable: (local.autocomplete ?? global.autocomplete) === true,\n clearable: local.clearable ?? global.clearable ?? true,\n placeholder: local.placeholder ?? global.placeholder,\n };\n}\n\nexport const ShadcnEnumControl = ({\n schema,\n data,\n config,\n description,\n enabled,\n errors,\n handleChange,\n label,\n options,\n path,\n required,\n readonly,\n uischema,\n visible,\n}: ControlProps & OwnPropsOfEnum & TranslateProps) => {\n const t = useI18n();\n const [query, setQuery] = React.useState('');\n const { searchable, clearable, placeholder } = enumPresentation(\n uischema.options,\n config,\n );\n const choices = (options ?? [])\n .map((option, index) => ({ option, index }))\n .filter(\n ({ option }) =>\n !searchable ||\n option.label.toLocaleLowerCase().includes(query.toLocaleLowerCase()),\n );\n if (!visible) return null;\n const id = makeId(path, label);\n const showClear =\n clearable && enabled && !readonly && hasClearableValue(data);\n\n return (\n <InputShell\n path={path}\n schema={schema}\n config={config}\n uischema={uischema}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <div className='group relative w-full'>\n <Select\n onOpenChange={() => setQuery('')}\n disabled={!enabled || readonly}\n value={(() => {\n const index = (options ?? []).findIndex((option) =>\n isEqual(option.value, data),\n );\n return index < 0 ? '' : `option-${index}`;\n })()}\n onValueChange={(value) => {\n const option = (options ?? [])[\n Number(value.replace('option-', ''))\n ];\n if (option && enabled && !readonly)\n handleChange(path, option.value);\n }}\n >\n <SelectTrigger\n id={id}\n className='shadcn-jsonforms-input shadcn-jsonforms-select w-full min-w-0 pr-3'\n >\n <SelectValue\n className={showClear ? 'mr-10 min-w-0' : 'min-w-0'}\n placeholder={placeholder ?? t('enum.select')}\n />\n </SelectTrigger>\n <SelectContent className='shadcn-jsonforms-select-content'>\n {searchable && (\n <Input\n type='search'\n role='searchbox'\n aria-label={t('enum.search')}\n value={query}\n disabled={!enabled || readonly}\n onChange={(event) => setQuery(event.currentTarget.value)}\n onKeyDown={(event) => {\n if (\n !['ArrowUp', 'ArrowDown', 'Escape', 'Tab'].includes(\n event.key,\n )\n ) {\n event.stopPropagation();\n }\n }}\n />\n )}\n {searchable && choices.length === 0 && (\n <div role='status'>{t('enum.noMatches')}</div>\n )}\n {choices.map(({ option, index }) => (\n <SelectItem\n className='shadcn-jsonforms-select-item'\n key={index}\n value={`option-${index}`}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <ClearValueButton\n clearable={clearable}\n trailingControlSpace={36}\n data={data}\n enabled={enabled}\n readonly={readonly}\n onClear={() => handleChange(path, undefined)}\n />\n </div>\n </InputShell>\n );\n};\n\nexport const enumControlTester: RankedTester = rankWith(2, isEnumControl);\n","import {\n ControlProps,\n isIntegerControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport React from 'react';\nimport { ShadcnNumberControl } from './InputControl';\n\nexport const ShadcnIntegerControl = (props: ControlProps) => (\n <ShadcnNumberControl {...props} integer />\n);\n\nexport const integerControlTester: RankedTester = rankWith(2, isIntegerControl);\n","import {\n ControlProps,\n isNumberControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport React from 'react';\nimport { ShadcnNumberControl } from './InputControl';\n\nexport const ShadcnNumberInputControl = (props: ControlProps) => (\n <ShadcnNumberControl {...props} />\n);\n\nexport const numberControlTester: RankedTester = rankWith(1, isNumberControl);\n","import {\n ControlProps,\n isStringControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport React from 'react';\nimport {\n ShadcnInputControl,\n InputShell,\n makeId,\n toStringValue,\n} from './InputControl';\nimport { Textarea } from '@jsonforms-react-shadcn-ui/textarea';\n\nexport const ShadcnTextControl = (props: ControlProps) => {\n if (!props.visible) return null;\n if (!props.uischema.options?.multi) {\n return <ShadcnInputControl {...props} type='text' />;\n }\n const id = makeId(props.path, props.label);\n return (\n <InputShell\n {...props}\n id={id}\n label={props.label}\n required={props.required}\n description={props.description}\n errors={props.errors}\n >\n <Textarea\n id={id}\n maxLength={\n (props.uischema.options?.restrict ?? props.config?.restrict)\n ? props.schema.maxLength\n : undefined\n }\n value={toStringValue(props.data)}\n disabled={!props.enabled || props.readonly}\n aria-invalid={Boolean(props.errors)}\n aria-describedby={props.errors ? `${id}-errors` : undefined}\n onChange={(event) =>\n props.handleChange(props.path, event.currentTarget.value || undefined)\n }\n />\n </InputShell>\n );\n};\n\nexport const textControlTester: RankedTester = rankWith(1, isStringControl);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { useTemporalControl } from '../util/useTemporalControl';\nimport {\n ControlProps,\n isTimeControl,\n RankedTester,\n rankWith,\n} from '@jsonforms/core';\nimport { Clock3, X } from 'lucide-react';\nimport React from 'react';\nimport { TimePicker } from '../components/TimePicker';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@jsonforms-react-shadcn-ui/popover';\nimport { formatTimeValue, parseTimeValue } from '../util/dateTime';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnTimeControl = (props: ControlProps) => {\n const text = useI18n();\n const {\n data,\n description,\n enabled,\n errors,\n handleChange,\n label,\n path,\n required,\n uischema,\n visible,\n } = props;\n const temporal = useTemporalControl(props, 'time');\n const [open, setOpen] = React.useState(false);\n\n if (!visible) return null;\n\n const id = makeId(path, label);\n const { selectedTime: selected, ampm, useSeconds, placeholder } = temporal;\n\n return (\n <InputShell\n {...props}\n id={id}\n label={label}\n required={required}\n description={description}\n errors={errors}\n >\n <div className='group relative w-full'>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n id={id}\n type='button'\n variant='outline'\n disabled={!enabled || props.readonly}\n autoFocus={uischema.options?.focus === true}\n aria-invalid={!!errors}\n className='w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground'\n data-empty={!selected}\n >\n <Clock3 className='h-4 w-4' />\n {selected\n ? temporal.displayText\n : typeof data === 'string' && data\n ? data\n : placeholder}\n </Button>\n </PopoverTrigger>\n <PopoverContent align='start' className='w-auto p-4'>\n <TimePicker\n value={\n selected\n ? formatTimeValue(selected, true)\n : typeof data === 'string'\n ? data\n : undefined\n }\n useSeconds={useSeconds}\n showHours={temporal.showHours}\n showMinutes={temporal.showMinutes}\n ampm={ampm}\n disabled={!enabled || props.readonly}\n isAllowed={(time) =>\n temporal.allowed(\n new Date(2000, 0, 1, time.hours, time.minutes, time.seconds),\n )\n }\n onChange={(value) => {\n const time = parseTimeValue(value);\n if (time) {\n const date = new Date(\n 2000,\n 0,\n 1,\n time.hours,\n time.minutes,\n time.seconds,\n );\n temporal.commit(date);\n }\n }}\n />\n <div className='mt-3 flex justify-end'>\n <Button type='button' size='sm' onClick={() => setOpen(false)}>\n {text('control.done')}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n {selected &&\n enabled &&\n !props.readonly &&\n (uischema.options?.clearable ?? props.config?.clearable ?? true) ? (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100'\n aria-label={text('temporal.clearTime')}\n title={text('temporal.clearTime')}\n onClick={() => handleChange(path, undefined)}\n >\n <X className='h-4 w-4' />\n </Button>\n ) : null}\n </div>\n </InputShell>\n );\n};\n\nexport const timeControlTester: RankedTester = rankWith(4, isTimeControl);\n","import React from 'react';\nimport { isOneOfEnumControl, rankWith } from '@jsonforms/core';\nimport {\n withJsonFormsOneOfEnumProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { ShadcnEnumControl } from './EnumControl';\n\nexport const oneOfEnumControlTester = rankWith(5, isOneOfEnumControl);\nexport const ShadcnOneOfEnumControl = withJsonFormsOneOfEnumProps(\n withTranslateProps(React.memo(ShadcnEnumControl)),\n false,\n);\n","import React from 'react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport {\n ControlProps,\n and,\n isBooleanControl,\n optionIs,\n rankWith,\n} from '@jsonforms/core';\nimport { Switch } from '@jsonforms-react-shadcn-ui/switch';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnBooleanToggleControl = (props: ControlProps) => {\n const t = useI18n();\n if (!props.visible) return null;\n const id = makeId(props.path, props.label);\n const committed = typeof props.data === 'boolean';\n const stateId = `${id}-state`;\n return (\n <InputShell\n {...props}\n id={id}\n label={props.label}\n required={props.required}\n description={props.description}\n errors={props.errors}\n >\n <Switch\n id={id}\n checked={props.data === true}\n disabled={!props.enabled || props.readonly}\n aria-invalid={Boolean(props.errors)}\n aria-describedby={\n [\n props.errors ? `${id}-errors` : undefined,\n committed ? undefined : stateId,\n ]\n .filter(Boolean)\n .join(' ') || undefined\n }\n onCheckedChange={(checked) => props.handleChange(props.path, checked)}\n />\n {!committed && (\n <span id={stateId} className='sr-only'>\n {t(\n props.data === undefined || props.data === null\n ? 'boolean.notSet'\n : 'boolean.invalid',\n )}\n </span>\n )}\n </InputShell>\n );\n};\nexport const booleanToggleControlTester = rankWith(\n 3,\n and(isBooleanControl, optionIs('toggle', true)),\n);\n","import isEqual from 'lodash/isEqual';\nimport React from 'react';\nimport {\n ControlProps,\n OwnPropsOfEnum,\n and,\n isEnumControl,\n optionIs,\n rankWith,\n} from '@jsonforms/core';\nimport {\n RadioGroup,\n RadioGroupItem,\n} from '@jsonforms-react-shadcn-ui/radio-group';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnRadioGroupControl = (\n props: ControlProps & OwnPropsOfEnum,\n) => {\n if (!props.visible) return null;\n const id = makeId(props.path, props.label);\n const options = props.options ?? [];\n const selected = options.findIndex((option) =>\n isEqual(option.value, props.data),\n );\n const orientation =\n (props.uischema.options?.vertical ??\n props.config?.jsonformsExtended?.radio?.vertical ??\n false) === true\n ? 'vertical'\n : 'horizontal';\n return (\n <InputShell\n {...props}\n id={id}\n label={props.label}\n required={props.required}\n description={props.description}\n errors={props.errors}\n >\n <RadioGroup\n id={id}\n aria-label={props.label}\n orientation={orientation}\n className={\n orientation === 'horizontal' ? 'flex flex-wrap gap-4' : undefined\n }\n value={selected < 0 ? '' : `option-${selected}`}\n disabled={!props.enabled || props.readonly}\n onValueChange={(token) => {\n const option = options[Number(token.replace('option-', ''))];\n if (option) props.handleChange(props.path, option.value);\n }}\n >\n {options.map((option, index) => (\n <label\n key={index}\n className='flex items-center gap-2'\n htmlFor={`${id}-${index}`}\n >\n <RadioGroupItem id={`${id}-${index}`} value={`option-${index}`} />\n {option.label}\n </label>\n ))}\n </RadioGroup>\n </InputShell>\n );\n};\nexport const radioGroupControlTester = rankWith(\n 20,\n and(isEnumControl, optionIs('format', 'radio')),\n);\n","import React from 'react';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ControlProps, isRangeControl, rankWith } from '@jsonforms/core';\nimport { Slider } from '@jsonforms-react-shadcn-ui/slider';\nimport { InputShell, makeId } from './InputControl';\n\nexport const ShadcnSliderControl = (props: ControlProps) => {\n const t = useI18n();\n if (!props.visible) return null;\n const id = makeId(props.path, props.label);\n const min = props.schema.minimum ?? 0;\n const max = props.schema.maximum ?? 100;\n const value =\n typeof props.data === 'number' && Number.isFinite(props.data)\n ? props.data\n : undefined;\n const position =\n max > min\n ? Math.max(0, Math.min(100, (((value ?? min) - min) / (max - min)) * 100))\n : 0;\n return (\n <InputShell\n {...props}\n id={id}\n label={props.label}\n required={props.required}\n description={props.description}\n errors={props.errors}\n >\n <div className='flex items-end gap-3'>\n <span\n className='text-sm text-muted-foreground tabular-nums'\n data-slider-min\n >\n {min}\n </span>\n <div className='relative min-w-0 flex-1 pt-9 pb-2'>\n {value !== undefined && (\n <output\n htmlFor={id}\n data-slider-value\n className='absolute top-0 -translate-x-1/2 rounded border bg-background px-2 py-0.5 text-xs tabular-nums shadow-sm'\n style={{ left: `${position}%` }}\n >\n {value}\n </output>\n )}\n <Slider\n id={id}\n aria-label={props.label}\n aria-valuetext={\n value === undefined ? t('control.notSet') : undefined\n }\n min={min}\n max={max}\n step={props.schema.multipleOf ?? 1}\n value={[value ?? min]}\n disabled={!props.enabled || props.readonly}\n onValueChange={([value]) =>\n props.handleChange(\n props.path,\n props.schema.type === 'integer' ? Math.trunc(value) : value,\n )\n }\n />\n </div>\n <span\n className='text-sm text-muted-foreground tabular-nums'\n data-slider-max\n >\n {max}\n </span>\n </div>\n </InputShell>\n );\n};\nexport const sliderControlTester = rankWith(4, isRangeControl);\n","import { ContainerValidationIndicator } from './ValidationIndicator';\nimport {\n Categorization,\n Category,\n LayoutProps,\n and,\n categorizationHasCategory,\n deriveLabelForUISchemaElement,\n optionIs,\n rankWith,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { JsonFormsDispatch, useJsonForms } from '@jsonforms/react';\nimport React, { useId } from 'react';\nimport { ChevronDown } from 'lucide-react';\nimport {\n categoryKey,\n useCategorySelection,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/categoryState';\nimport { useGroupState } from '@chobantonov/jsonforms-react-renderer-common/layout/groupState';\nimport { useContainerValidation } from '@chobantonov/jsonforms-react-renderer-common/validation/validationIndicator';\nimport {\n useI18n,\n useTranslator,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@jsonforms-react-shadcn-ui/tabs';\n\nconst Indicators = ({\n category,\n path,\n config,\n}: {\n category: Category;\n path: string;\n config: any;\n}) => {\n const group = useGroupState(category, path, config);\n const validation = useContainerValidation(category, path, config, false);\n const t = useI18n();\n return (\n <span className='inline-flex items-center gap-1'>\n {validation.show && (\n <ContainerValidationIndicator count={validation.count} />\n )}\n {group.hasData && (\n <span\n role='img'\n aria-label={t('group.dataIndicator')}\n title={t('group.dataIndicator')}\n data-category-data-indicator\n >\n ●\n </span>\n )}\n </span>\n );\n};\n\n/** All presentations share identity, visibility and initial-selection rules. */\nexport const ShadcnCategorizationLayout = (props: LayoutProps) => {\n const ctx = useJsonForms();\n const t = useTranslator();\n const text = useI18n();\n const baseId = useId();\n const categorization = props.uischema as Categorization;\n const variant = categorization.options?.variant;\n const options = { ...props.config, ...categorization.options };\n const { categories, active, select, close } = useCategorySelection(\n categorization,\n ctx.core?.data,\n ctx.core?.ajv,\n props.config,\n undefined,\n variant === 'accordion',\n props.path,\n );\n if (!props.visible || categories.length === 0) return null;\n const key = (category: Category, index: number) =>\n categoryKey(category, index);\n const label = (category: Category) =>\n deriveLabelForUISchemaElement(category, t);\n const panel = (category: Category) => (\n <JsonFormsDispatch\n schema={props.schema}\n uischema={{ ...category, type: 'VerticalLayout' }}\n path={props.path}\n enabled={props.enabled}\n renderers={props.renderers}\n cells={props.cells}\n />\n );\n const indicators = (category: Category) => (\n <Indicators category={category} path={props.path} config={props.config} />\n );\n\n if (variant === 'accordion')\n return (\n <div className='shadcn-jsonforms-categorization space-y-1'>\n {categories.map((category, index) => {\n const categoryId = `${baseId}-${encodeURIComponent(\n key(category, index),\n )}`;\n const expanded = index === active;\n return (\n <div key={key(category, index)} className='border-b'>\n <h3>\n <Button\n type='button'\n variant='ghost'\n className='h-auto w-full justify-between py-4 text-left'\n id={`${categoryId}-header`}\n aria-expanded={expanded}\n aria-controls={`${categoryId}-panel`}\n onClick={() => (expanded ? close() : select(index))}\n >\n <span>{label(category)}</span>\n <span className='ml-auto flex items-center gap-2'>\n {indicators(category)}\n <ChevronDown\n aria-hidden='true'\n className={expanded ? 'h-4 w-4 rotate-180' : 'h-4 w-4'}\n />\n </span>\n </Button>\n </h3>\n <div\n id={`${categoryId}-panel`}\n role='region'\n aria-labelledby={`${categoryId}-header`}\n hidden={!expanded}\n className='pb-4'\n >\n {panel(category)}\n </div>\n </div>\n );\n })}\n </div>\n );\n\n if (variant === 'stepper')\n return (\n <div className='shadcn-jsonforms-categorization space-y-4'>\n <ol\n className={\n options.vertical ? 'flex flex-col gap-2' : 'flex flex-wrap gap-2'\n }\n >\n {categories.map((category, index) => (\n <li key={key(category, index)}>\n <Button\n type='button'\n variant={index === active ? 'default' : 'outline'}\n aria-current={index === active ? 'step' : undefined}\n aria-controls={`${baseId}-step-${index}`}\n id={`${baseId}-step-heading-${index}`}\n onClick={() => select(index)}\n >\n <span aria-hidden='true'>{index + 1}.</span>\n {label(category)}\n {indicators(category)}\n </Button>\n </li>\n ))}\n </ol>\n {categories.map((category, index) => (\n <div\n key={key(category, index)}\n id={`${baseId}-step-${index}`}\n role='region'\n aria-labelledby={`${baseId}-step-heading-${index}`}\n hidden={index !== active}\n >\n {panel(category)}\n </div>\n ))}\n {options.showNavButtons && (\n <div className='flex justify-end gap-2'>\n <Button\n type='button'\n variant='outline'\n disabled={active <= 0}\n onClick={() => select(active - 1)}\n >\n {text('categorization.previous')}\n </Button>\n <Button\n type='button'\n disabled={active < 0 || active >= categories.length - 1}\n onClick={() => select(active + 1)}\n >\n {text('categorization.next')}\n </Button>\n </div>\n )}\n </div>\n );\n\n return (\n <Tabs\n className='shadcn-jsonforms-categorization'\n value={String(active)}\n onValueChange={(value) => select(Number(value))}\n >\n <TabsList>\n {categories.map((category, index) => (\n <TabsTrigger key={key(category, index)} value={String(index)}>\n {label(category)}\n {indicators(category)}\n </TabsTrigger>\n ))}\n </TabsList>\n {categories.map((category, index) => (\n <TabsContent\n key={key(category, index)}\n value={String(index)}\n forceMount\n hidden={index !== active}\n >\n {panel(category)}\n </TabsContent>\n ))}\n </Tabs>\n );\n};\nexport const categorizationTester = rankWith(1, uiTypeIs('Categorization'));\nexport const categorizationAccordionTester = rankWith(\n 3,\n and(\n uiTypeIs('Categorization'),\n categorizationHasCategory,\n optionIs('variant', 'accordion'),\n ),\n);\nexport const categorizationStepperTester = rankWith(\n 2,\n and(\n uiTypeIs('Categorization'),\n categorizationHasCategory,\n optionIs('variant', 'stepper'),\n ),\n);\n","import { LayoutProps } from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport React from 'react';\nimport { useEffectiveElements } from '@chobantonov/jsonforms-react-renderer-common/layout/layoutContext';\nimport {\n containerStyle,\n itemSizing,\n resolveGap,\n resolveGridColumns,\n} from '@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing';\n\nexport const ShadcnLayout = ({\n direction,\n ...props\n}: LayoutProps & { direction: 'row' | 'column' }) => {\n const layout = props.uischema as any;\n const elements = useEffectiveElements(\n layout.elements ?? [],\n props.path,\n props.config,\n );\n if (!props.visible) return null;\n const gap = resolveGap(layout.options, props.config, direction, {\n row: 16,\n column: 16,\n });\n const grid = resolveGridColumns(layout.options, props.config);\n return (\n <div\n data-layout={direction}\n className={`shadcn-jsonforms-layout shadcn-jsonforms-layout-${direction}`}\n style={containerStyle(layout.options, props.config, direction, {\n row: 16,\n column: 16,\n })}\n >\n {elements.map((child: any, index: number) => (\n <div\n key={`${child.scope ?? child.type}-${index}`}\n style={\n itemSizing(\n child,\n direction,\n grid,\n gap,\n layout.options?.minItemWidth,\n ).style\n }\n >\n <JsonFormsDispatch\n schema={props.schema}\n uischema={child}\n path={props.path}\n enabled={props.enabled}\n renderers={props.renderers}\n cells={props.cells}\n />\n </div>\n ))}\n </div>\n );\n};\n","import { ObjectDetailContext } from '@chobantonov/jsonforms-react-renderer-common/objects/ObjectDetail';\nimport { ErrorIndicator } from '../complex/ErrorIndicator';\nimport { ObjectErrorContext } from '@chobantonov/jsonforms-react-renderer-common/validation/errorSummary';\nimport { useContainerValidation } from '@chobantonov/jsonforms-react-renderer-common/validation/validationIndicator';\nimport { ContainerValidationIndicator } from './ValidationIndicator';\nimport {\n LayoutProps,\n RankedTester,\n UISchemaElement,\n rankWith,\n uiTypeIs,\n} from '@jsonforms/core';\nimport { JsonFormsDispatch } from '@jsonforms/react';\nimport { useGroupHeaderTitle } from '@chobantonov/jsonforms-react-renderer-common/layout/groupState';\nimport React from 'react';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport { ShadcnLayout } from './Layout';\nimport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n} from '@jsonforms-react-shadcn-ui/collapsible';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n CardContent,\n CardFooter,\n CardHeader,\n CardTitle,\n} from '@jsonforms-react-shadcn-ui/card';\nimport { useGroupState } from '../util/groupState';\nimport { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\n\nexport const ShadcnGroupLayout = (props: LayoutProps) => {\n const regions = props.uischema as typeof props.uischema & {\n cover?: UISchemaElement;\n header?: UISchemaElement[];\n i18n?: string;\n footer?: UISchemaElement[];\n };\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 group = useGroupState(props.uischema, props.path, props.config);\n const t = useI18n();\n const footer = regions.footer;\n const hasRegions = Boolean(\n regions.cover || regions.header?.length || footer?.length,\n );\n const HeaderSection = hasRegions ? CardHeader : 'div';\n const headerTitle = useGroupHeaderTitle(props.path, regions.header);\n\n const validation = useContainerValidation(\n props.uischema,\n props.path,\n props.config,\n false,\n );\n const detail = React.useContext(ObjectDetailContext);\n const additional =\n detail?.uischema === props.uischema ? detail.additional : null;\n const object = React.useContext(ObjectErrorContext);\n const objectOwned = object?.uischema === props.uischema;\n const objectErrors = objectOwned ? object.message : '';\n if (!props.visible) return null;\n\n const header = (\n <>\n {!regions.header?.length && (\n <span className='shadcn-jsonforms-group-title'>{props.label}</span>\n )}\n <span className='shadcn-jsonforms-group-actions'>\n {objectOwned ? (\n objectErrors ? (\n <ErrorIndicator local errors={objectErrors} />\n ) : null\n ) : (\n validation.show && (\n <ContainerValidationIndicator count={validation.count} />\n )\n )}\n {group.hasData && (\n <span\n role='img'\n aria-label={t('group.dataIndicator')}\n title={t('group.dataIndicator')}\n data-group-indicator\n >\n ●\n </span>\n )}\n {group.collapsible &&\n (group.collapsed ? (\n <ChevronDown aria-hidden='true' />\n ) : (\n <ChevronUp aria-hidden='true' />\n ))}\n </span>\n </>\n );\n\n const headerElements = regions.header?.length ? (\n <div data-group-header>\n {regions.header.map((element, index) => (\n <div\n className={index === 0 ? 'group-header-title' : 'group-header-detail'}\n key={index}\n >\n {renderRegion(element, `header-${index}`)}\n </div>\n ))}\n </div>\n ) : null;\n\n return (\n <Collapsible\n className='shadcn-jsonforms-group'\n data-group-frame\n data-has-regions={hasRegions || undefined}\n data-collapsible={group.collapsible || undefined}\n role='group'\n aria-label={headerTitle || props.label || undefined}\n open={!group.collapsed}\n onOpenChange={(open) => {\n if (group.collapsible && open === group.collapsed) group.toggle();\n }}\n >\n {regions.cover && (\n <div className='shadcn-jsonforms-group-cover' data-group-cover>\n {renderRegion(regions.cover, 'cover')}\n </div>\n )}\n {group.collapsible ? (\n <HeaderSection className='shadcn-jsonforms-group-header px-0 gap-0'>\n {headerElements}\n <CollapsibleTrigger\n render={<Button type='button' variant='ghost' />}\n aria-label={headerTitle || props.label || t('control.group')}\n aria-controls={group.contentId}\n >\n {header}\n </CollapsibleTrigger>\n </HeaderSection>\n ) : props.label ||\n group.hasData ||\n objectErrors ||\n validation.show ||\n regions.header?.length ? (\n <HeaderSection className='shadcn-jsonforms-group-header px-0 gap-0'>\n {hasRegions ? (\n <CardTitle className='shadcn-jsonforms-group-heading'>\n {header}\n </CardTitle>\n ) : (\n header\n )}\n {headerElements}\n </HeaderSection>\n ) : null}\n <CollapsibleContent\n className='shadcn-jsonforms-group-content'\n id={group.contentId}\n keepMounted\n hidden={group.collapsed}\n >\n {hasRegions ? (\n <CardContent className='shadcn-jsonforms-group-card-content px-0'>\n {(props.uischema as any).elements?.length > 0 && (\n <ShadcnLayout {...props} direction='column' />\n )}\n {additional}\n </CardContent>\n ) : (\n <>\n {(props.uischema as any).elements?.length > 0 && (\n <ShadcnLayout {...props} direction='column' />\n )}\n {additional}\n </>\n )}\n {group.collapsible && Boolean(footer?.length) && (\n <CardFooter\n className='shadcn-jsonforms-group-footer'\n data-group-footer\n >\n {footer?.map((element, index) =>\n renderRegion(element, `footer-${index}`),\n )}\n </CardFooter>\n )}\n </CollapsibleContent>\n {!group.collapsible && footer && footer.length > 0 && (\n <CardFooter className='shadcn-jsonforms-group-footer' data-group-footer>\n {footer.map((element, index) =>\n renderRegion(element, `footer-${index}`),\n )}\n </CardFooter>\n )}\n </Collapsible>\n );\n};\n\nexport const groupTester: RankedTester = rankWith(2, uiTypeIs('Group'));\n","import { LayoutProps, RankedTester, rankWith, uiTypeIs } from '@jsonforms/core';\nimport React from 'react';\nimport { ShadcnLayout } from './Layout';\n\nexport const ShadcnHorizontalLayout = (props: LayoutProps) => (\n <ShadcnLayout {...props} direction='row' />\n);\n\nexport const horizontalLayoutTester: RankedTester = rankWith(\n 1,\n uiTypeIs('HorizontalLayout'),\n);\n","import { LayoutProps, RankedTester, rankWith, uiTypeIs } from '@jsonforms/core';\nimport React from 'react';\nimport { ShadcnLayout } from './Layout';\n\nexport const ShadcnVerticalLayout = (props: LayoutProps) => (\n <ShadcnLayout {...props} direction='column' />\n);\n\nexport const verticalLayoutTester: RankedTester = rankWith(\n 1,\n uiTypeIs('VerticalLayout'),\n);\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ClearValueButton } from '../components/ClearValueButton';\nimport React from 'react';\nimport { CellProps } from '@jsonforms/core';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\n\nexport const ShadcnNumberCell = ({\n config,\n uischema,\n data,\n enabled,\n visible,\n id,\n path,\n handleChange,\n errors,\n schema,\n}: CellProps) => {\n const t = useI18n();\n return visible === false ? null : (\n <div className='group relative w-full'>\n <Input\n className='pr-10'\n id={id}\n type='number'\n step={schema.type === 'integer' ? 1 : 'any'}\n aria-label={path || t('control.value')}\n aria-invalid={Boolean(errors)}\n value={data ?? ''}\n disabled={!enabled}\n onChange={(event) => {\n const value = event.currentTarget.value;\n handleChange(\n path,\n value === ''\n ? undefined\n : schema.type === 'integer'\n ? Math.trunc(Number(value))\n : Number(value),\n );\n }}\n />\n <ClearValueButton\n clearable={uischema.options?.clearable ?? config?.clearable ?? true}\n data={data}\n enabled={enabled}\n onClear={() => handleChange(path, undefined)}\n />\n </div>\n );\n};\n","import { ShadcnNumberCell } from './NumberCell';\nimport React from 'react';\nimport {\n CellProps,\n Formatted,\n isNumberFormatControl,\n rankWith,\n} from '@jsonforms/core';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\nimport { Textarea } from '@jsonforms-react-shadcn-ui/textarea';\nimport { ClearValueButton } from '../components/ClearValueButton';\nexport const numberFormatCellTester = rankWith(4, isNumberFormatControl);\nexport const ShadcnNumberFormatCell = (\n props: CellProps & Partial<Formatted<number>>,\n) => {\n if (props.visible === false) return null;\n const { toFormatted, fromFormatted } = props;\n if (!toFormatted || !fromFormatted) return <ShadcnNumberCell {...props} />;\n const options = { ...props.config, ...props.uischema.options };\n const Component = options.multi ? Textarea : Input;\n return (\n <div className='group relative w-full'>\n <Component\n id={props.id}\n className='pr-10'\n disabled={!props.enabled}\n value={toFormatted(props.data)}\n aria-invalid={Boolean(props.errors)}\n autoFocus={options.focus}\n placeholder={options.placeholder}\n maxLength={props.schema.maxLength}\n onChange={(event) =>\n props.handleChange(\n props.path,\n fromFormatted(event.currentTarget.value),\n )\n }\n />\n <ClearValueButton\n data={props.data}\n enabled={props.enabled}\n clearable={options.clearable !== false}\n onClear={() => props.handleChange(props.path, undefined)}\n />\n </div>\n );\n};\n","import { hasInvalidCompositeEditorDraft } from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeDraft';\nimport { useCompositeCellPresentation } from '@chobantonov/jsonforms-react-renderer-common/cells/useCompositeCellPresentation';\nimport { resolveEditorDetail } from '@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema';\nimport { CellSummary } from '@chobantonov/jsonforms-react-renderer-common/cells/CellSummary';\nimport { ErrorIndicator } from '../complex/ErrorIndicator';\nimport { DetailDialogContent } from '../complex/DetailDialogContent';\nimport React, { useRef, useState } from 'react';\nimport { Pencil, X } from 'lucide-react';\nimport {\n CellProps,\n JsonFormsCore,\n JsonFormsRendererRegistryEntry,\n JsonFormsCellRendererRegistryEntry,\n Resolve,\n coreReducer,\n UPDATE_DATA,\n update,\n} from '@jsonforms/core';\nimport {\n JsonFormsContext,\n JsonFormsDispatch,\n useJsonForms,\n} from '@jsonforms/react';\nimport { shouldConfirm } from '@chobantonov/jsonforms-react-renderer-common/interaction/confirmation';\nimport { DeleteDialog } from '../complex/DeleteDialog';\nimport { preventsEmpty } from '@chobantonov/jsonforms-react-renderer-common/cells/compositeActions';\nimport {\n useI18n,\n useI18nDefault,\n useTranslator,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { Button } from '@jsonforms-react-shadcn-ui/button';\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogFooter,\n} from '@jsonforms-react-shadcn-ui/dialog';\n\nconst copy = <T,>(value: T): T =>\n value === undefined ? value : JSON.parse(JSON.stringify(value));\nconst equal = (a: unknown, b: unknown) =>\n JSON.stringify(a) === JSON.stringify(b);\ntype Props = CellProps & {\n renderers?: JsonFormsRendererRegistryEntry[];\n cells?: JsonFormsCellRendererRegistryEntry[];\n};\n\n/** A compact summary with isolated editing; only Apply writes to the form. */\nexport const ShadcnCompositeCell = (props: Props) => {\n const parent = useJsonForms();\n const invalidEditorDraft = hasInvalidCompositeEditorDraft(\n parent.core?.additionalErrors,\n props.path,\n );\n const t = useTranslator();\n const d = useI18nDefault();\n const text = useI18n();\n const [pendingDelete, setPendingDelete] = useState<{\n value: unknown;\n path: string;\n }>();\n const [draft, setDraft] = useState<JsonFormsCore>();\n const draftRef = useRef<JsonFormsCore>();\n const [original, setOriginal] = useState<unknown>();\n const options = props.uischema.options ?? {};\n const { errors, summary } = useCompositeCellPresentation(props, t, d);\n const enabled =\n props.enabled &&\n !(parent as any).readonly &&\n !(props.schema as { readOnly?: boolean }).readOnly;\n const label =\n props.schema.title ??\n text(\n props.schema.type === 'array'\n ? 'composite.itemsLabel'\n : 'composite.detailsLabel',\n );\n const current = () => Resolve.data(parent.core?.data, props.path);\n const close = () => {\n draftRef.current = undefined;\n setDraft(undefined);\n };\n const dispatch = (action: any) => {\n if (!enabled || !draftRef.current || action.type !== UPDATE_DATA) return;\n if (\n props.path &&\n action.path !== props.path &&\n !action.path.startsWith(`${props.path}.`)\n )\n return;\n draftRef.current = coreReducer(draftRef.current, action);\n setDraft(draftRef.current);\n };\n const value = draft && Resolve.data(draft.data, props.path);\n const isArray = props.schema.type === 'array';\n const conflicted = !!draft && !equal(current(), original);\n const canClear =\n enabled &&\n !options.disableRemove &&\n value != null &&\n typeof value === 'object' &&\n Object.keys(value).length > 0 &&\n (options.restrict === false || !preventsEmpty(props.schema, isArray));\n if (props.visible === false) return null;\n return (\n <div className='group/composite flex min-w-0 items-center gap-1.5'>\n {(options.showTypeIndicator ??\n props.config?.showTypeIndicator ??\n false) === true &&\n (isArray || props.schema?.type === 'object') && (\n <span aria-hidden='true' className='shrink-0 text-muted-foreground'>\n {isArray ? '[]' : '{}'}\n </span>\n )}\n <span\n className={`min-w-0 flex-1 truncate${\n summary.generated && options.summary?.type !== 'Label'\n ? ' italic text-muted-foreground'\n : ''\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 {errors && <ErrorIndicator errors={errors} path={props.path} />}\n {((!options.summaryOnly && options.summary?.type !== 'Label') ||\n options.detail) && (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-7 w-7 shrink-0 opacity-0 group-hover/composite:opacity-100 group-focus-within/composite:opacity-100 [@media(hover:none)]:opacity-100'\n title={text('composite.edit', { label })}\n aria-label={text('composite.edit', { label })}\n onClick={() => {\n if (!parent.core) return;\n setOriginal(copy(current()));\n draftRef.current = {\n ...parent.core,\n data: copy(parent.core?.data),\n };\n setDraft(draftRef.current);\n }}\n >\n <Pencil className='h-4 w-4' aria-hidden='true' />\n </Button>\n )}\n {enabled &&\n !options.summaryOnly &&\n (options.summary?.type !== 'Label' || !!options.detail) &&\n props.data !== undefined &&\n options.clearable !== false && (\n <Button\n type='button'\n variant='ghost'\n size='icon'\n className='h-7 w-7 shrink-0 opacity-0 group-hover/composite:opacity-100 group-focus-within/composite:opacity-100 [@media(hover:none)]:opacity-100'\n style={{ color: 'hsl(var(--destructive))' }}\n title={text('composite.remove', { label })}\n aria-label={text('composite.remove', { label })}\n onClick={() => {\n if (\n shouldConfirm(\n {\n catalogId: 'compositeCell',\n operation: 'delete',\n options,\n config: props.config,\n },\n [props.data],\n )\n )\n setPendingDelete({ value: props.data, path: props.path });\n else props.handleChange(props.path, undefined);\n }}\n >\n <X className='h-4 w-4' aria-hidden='true' />\n </Button>\n )}\n <DeleteDialog\n open={!!pendingDelete}\n onCancel={() => setPendingDelete(undefined)}\n onConfirm={() => {\n if (\n pendingDelete &&\n enabled &&\n options.clearable !== false &&\n pendingDelete.path === props.path &&\n pendingDelete.value === props.data\n )\n props.handleChange(props.path, undefined);\n setPendingDelete(undefined);\n }}\n />\n <Dialog open={!!draft} onOpenChange={(open) => !open && close()}>\n <DetailDialogContent\n open={!!draft}\n options={options.dialog}\n aria-describedby={undefined}\n className='max-h-[85vh] overflow-auto sm:max-w-2xl'\n >\n <DialogHeader>\n <DialogTitle>\n {props.schema.title ?? text('composite.detailsTitle')}\n </DialogTitle>\n </DialogHeader>\n {draft && (\n <JsonFormsContext.Provider\n value={{ ...parent, core: draft, dispatch }}\n >\n <JsonFormsDispatch\n schema={props.schema}\n uischema={resolveEditorDetail(\n options.detail,\n parent.uischemas ?? [],\n props.schema,\n props.uischema.scope,\n props.path,\n props.rootSchema,\n { type: 'Control', scope: '#', label: false } as any,\n )}\n path={props.path}\n enabled={enabled}\n renderers={props.renderers}\n cells={props.cells}\n />\n </JsonFormsContext.Provider>\n )}\n <DialogFooter>\n {options.showEmptyButton === true && (\n <Button\n type='button'\n variant='outline'\n disabled={!canClear}\n onClick={() =>\n dispatch(update(props.path, () => (isArray ? [] : {})))\n }\n >\n {options.emptyLabel ?? text('composite.empty')}\n </Button>\n )}\n <Button type='button' variant='outline' onClick={close}>\n {options.cancelLabel ?? text('composite.cancel')}\n </Button>\n <Button\n type='button'\n disabled={!enabled || conflicted || invalidEditorDraft}\n title={conflicted ? text('composite.applyConflict') : undefined}\n onClick={() => {\n if (!enabled || conflicted || invalidEditorDraft) return;\n const next = copy(\n Resolve.data(draftRef.current?.data, props.path),\n );\n if (!equal(next, original))\n props.handleChange(props.path, next);\n close();\n }}\n >\n {options.okLabel ?? text('composite.apply')}\n </Button>\n </DialogFooter>\n </DetailDialogContent>\n </Dialog>\n </div>\n );\n};\nexport { compositeCellTester as shadcnCompositeCellTester } from '@chobantonov/jsonforms-react-renderer-common/cells/compositeCellTester';\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport React from 'react';\nimport { CellProps } from '@jsonforms/core';\nimport { Checkbox } from '@jsonforms-react-shadcn-ui/checkbox';\n\nexport const ShadcnBooleanCell = ({\n data,\n enabled,\n visible,\n id,\n path,\n handleChange,\n errors,\n}: CellProps) => {\n const t = useI18n();\n return visible === false ? null : (\n <Checkbox\n id={id}\n aria-label={path || t('control.value')}\n aria-invalid={Boolean(errors)}\n checked={typeof data === 'boolean' ? data : 'indeterminate'}\n disabled={!enabled}\n onCheckedChange={(checked) => handleChange(path, checked === true)}\n />\n );\n};\n","import {\n useTranslator,\n useI18n,\n} from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport {\n enumToEnumOptionMapper,\n oneOfToEnumOptionMapper,\n getI18nKeyPrefix,\n CellProps,\n} from '@jsonforms/core';\n\nimport isEqual from 'lodash/isEqual';\nimport React from 'react';\n\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@jsonforms-react-shadcn-ui/select';\n\nexport const ShadcnEnumCell = ({\n data,\n enabled,\n visible,\n id,\n path,\n handleChange,\n errors,\n schema,\n uischema,\n}: CellProps) => {\n const t = useI18n();\n const translate = useTranslator();\n if (visible === false) return null;\n const prefix = getI18nKeyPrefix(schema, uischema, path);\n const choices = schema.oneOf?.map((entry) =>\n oneOfToEnumOptionMapper(entry, translate, prefix),\n );\n const values =\n choices?.map((entry) => entry.value) ??\n schema.enum ??\n (Object.prototype.hasOwnProperty.call(schema, 'const')\n ? [schema.const]\n : []);\n const index = values.findIndex((value) => isEqual(value, data));\n return (\n <Select\n value={index < 0 ? '' : `option-${index}`}\n disabled={!enabled}\n onValueChange={(value) =>\n handleChange(path, values[Number(value.replace('option-', ''))])\n }\n >\n <SelectTrigger\n className='w-full min-w-0'\n id={id}\n aria-label={path || t('control.value')}\n aria-invalid={Boolean(errors)}\n >\n <SelectValue placeholder={t('enum.select')} />\n </SelectTrigger>\n <SelectContent>\n {values.map((value, index) => (\n <SelectItem key={index} value={`option-${index}`}>\n {choices?.[index].label ??\n enumToEnumOptionMapper(value, translate, prefix).label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n};\n","import { useI18n } from '@chobantonov/jsonforms-react-renderer-common/locale/translate';\nimport { ClearValueButton } from '../components/ClearValueButton';\nimport React from 'react';\nimport { CellProps } from '@jsonforms/core';\nimport { Input } from '@jsonforms-react-shadcn-ui/input';\n\nexport const ShadcnTextCell = ({\n config,\n uischema,\n data,\n enabled,\n visible,\n id,\n path,\n handleChange,\n errors,\n}: CellProps) => {\n const t = useI18n();\n return visible === false ? null : (\n <div className='group relative w-full'>\n <Input\n className='pr-10'\n id={id}\n aria-label={path || t('control.value')}\n aria-invalid={Boolean(errors)}\n value={data ?? ''}\n disabled={!enabled}\n onChange={(event) =>\n handleChange(path, event.currentTarget.value || undefined)\n }\n />\n <ClearValueButton\n clearable={uischema.options?.clearable ?? config?.clearable ?? true}\n data={data}\n enabled={enabled}\n onClear={() => handleChange(path, undefined)}\n />\n </div>\n );\n};\n","import { dynamicCellEntry } from '@chobantonov/jsonforms-react-renderer-common/dynamic/DynamicUiProvider';\nimport {\n ShadcnNumberFormatCell,\n numberFormatCellTester,\n} from './NumberFormatCell';\nimport {\n ShadcnBooleanToggleControl,\n booleanToggleControlTester,\n} from '../controls/BooleanToggleControl';\nimport {\n ShadcnPasswordControl,\n passwordControlTester,\n} from '../controls/PasswordControl';\nimport {\n isIntegerControl,\n isDateControl,\n isTimeControl,\n isDateTimeControl,\n isBooleanControl,\n isEnumControl,\n isOneOfEnumControl,\n isNumberControl,\n isStringControl,\n JsonFormsCellRendererRegistryEntry,\n rankWith,\n} from '@jsonforms/core';\nimport { asShadcnCell } from './asCell';\nimport { ShadcnDateControl } from '../controls/DateControl';\nimport { ShadcnTimeControl } from '../controls/TimeControl';\nimport { ShadcnDateTimeControl } from '../controls/DateTimeControl';\nimport {\n withJsonFormsControlProps,\n withJsonFormsCellProps,\n} from '@jsonforms/react';\nimport {\n ShadcnCompositeCell,\n shadcnCompositeCellTester,\n} from './CompositeCell';\nimport { ShadcnBooleanCell } from './BooleanCell';\nimport { ShadcnEnumCell } from './EnumCell';\nimport { ShadcnNumberCell } from './NumberCell';\nimport { ShadcnTextCell } from './TextCell';\n\nexport { ShadcnTextCell as ShadcnCell } from './TextCell';\nexport const shadcnCells: JsonFormsCellRendererRegistryEntry[] = [\n dynamicCellEntry,\n {\n tester: numberFormatCellTester,\n cell: withJsonFormsCellProps(ShadcnNumberFormatCell),\n },\n {\n tester: booleanToggleControlTester,\n cell: asShadcnCell(\n withJsonFormsControlProps(ShadcnBooleanToggleControl),\n ) as any,\n },\n {\n tester: passwordControlTester,\n cell: asShadcnCell(withJsonFormsControlProps(ShadcnPasswordControl)) as any,\n },\n {\n tester: rankWith(5, isOneOfEnumControl),\n cell: withJsonFormsCellProps(ShadcnEnumCell),\n },\n {\n tester: rankWith(3, isDateControl),\n cell: asShadcnCell(withJsonFormsControlProps(ShadcnDateControl)) as any,\n },\n {\n tester: rankWith(3, isTimeControl),\n cell: asShadcnCell(withJsonFormsControlProps(ShadcnTimeControl)) as any,\n },\n {\n tester: rankWith(3, isDateTimeControl),\n cell: asShadcnCell(withJsonFormsControlProps(ShadcnDateTimeControl)) as any,\n },\n {\n tester: shadcnCompositeCellTester,\n cell: withJsonFormsCellProps(ShadcnCompositeCell),\n },\n {\n tester: rankWith(2, isIntegerControl),\n cell: withJsonFormsCellProps(ShadcnNumberCell),\n },\n {\n tester: rankWith(2, isBooleanControl),\n cell: withJsonFormsCellProps(ShadcnBooleanCell),\n },\n {\n tester: rankWith(3, isEnumControl),\n cell: withJsonFormsCellProps(ShadcnEnumCell),\n },\n {\n tester: rankWith(2, isNumberControl),\n cell: withJsonFormsCellProps(ShadcnNumberCell),\n },\n {\n tester: rankWith(1, isStringControl),\n cell: withJsonFormsCellProps(ShadcnTextCell),\n },\n];\n","import { dynamicRendererEntry } 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 {\n ShadcnArrayChoicesControl,\n chipsControlTester,\n multiSelectControlTester,\n enumArrayControlTester,\n} from './complex/ArrayChoicesControl';\nimport ScalarCompositionRenderer, {\n scalarCompositionTester,\n} from './complex/ScalarCompositionRenderer';\nimport {\n and,\n isOneOfEnumControl,\n optionIs,\n rankWith,\n JsonFormsRendererRegistryEntry,\n} from '@jsonforms/core';\nimport {\n ShadcnPasswordControl,\n ShadcnPasswordOtpControl,\n passwordControlTester,\n passwordOtpControlTester,\n} from './controls/PasswordControl';\nimport {\n TupleControlRenderer,\n tupleControlRendererTester,\n} from './complex/TupleControlRenderer';\nimport {\n anyOfStringOrEnumControlTester,\n ShadcnAnyOfStringOrEnumControl,\n} from './controls/AnyOfStringOrEnumControl';\nimport {\n withJsonFormsArrayLayoutProps,\n withJsonFormsControlProps,\n withJsonFormsEnumProps,\n withJsonFormsOneOfEnumProps,\n withJsonFormsLabelProps,\n withJsonFormsLayoutProps,\n withTranslateProps,\n} from '@jsonforms/react';\nimport { ShadcnLabelRenderer, labelRendererTester } from './additional';\nimport {\n oneOfControlTester,\n ShadcnOneOfControl,\n allOfControlTester,\n anyOfControlTester,\n MixedRenderer,\n ShadcnAllOfControl,\n ShadcnAnyOfControl,\n ShadcnArrayRenderer,\n ShadcnObjectRenderer,\n arrayControlTester,\n mixedControlTester,\n objectControlTester,\n} from './complex';\nimport {\n ShadcnOneOfEnumControl,\n oneOfEnumControlTester,\n ShadcnBooleanToggleControl,\n booleanToggleControlTester,\n ShadcnRadioGroupControl,\n radioGroupControlTester,\n ShadcnSliderControl,\n sliderControlTester,\n ShadcnBooleanControl,\n ShadcnDateControl,\n ShadcnDateTimeControl,\n ShadcnEnumControl,\n ShadcnIntegerControl,\n ShadcnNumberInputControl,\n ShadcnTextControl,\n ShadcnTimeControl,\n booleanControlTester,\n dateControlTester,\n dateTimeControlTester,\n enumControlTester,\n integerControlTester,\n numberControlTester,\n textControlTester,\n timeControlTester,\n} from './controls';\nimport {\n ShadcnCategorizationLayout,\n ShadcnGroupLayout,\n ShadcnHorizontalLayout,\n ShadcnVerticalLayout,\n categorizationTester,\n categorizationAccordionTester,\n categorizationStepperTester,\n groupTester,\n horizontalLayoutTester,\n verticalLayoutTester,\n} from './layouts';\n\nexport * from './additional';\nexport * from './cells';\nexport * from './complex';\nexport * from './controls';\nexport * from './layouts';\n\nexport const shadcnRenderers: JsonFormsRendererRegistryEntry[] = [\n dynamicRendererEntry,\n { tester: recursiveTreeTester, renderer: RecursiveTreeRenderer },\n { tester: choiceCardsTester, renderer: ChoiceCards },\n ...[chipsControlTester, multiSelectControlTester, enumArrayControlTester].map(\n (tester) => ({\n tester,\n renderer: withJsonFormsControlProps(ShadcnArrayChoicesControl),\n }),\n ),\n { tester: scalarCompositionTester, renderer: ScalarCompositionRenderer },\n {\n tester: rankWith(20, and(isOneOfEnumControl, optionIs('format', 'radio'))),\n renderer: withJsonFormsOneOfEnumProps(ShadcnRadioGroupControl),\n },\n {\n tester: passwordControlTester,\n renderer: withJsonFormsControlProps(ShadcnPasswordControl),\n },\n {\n tester: passwordOtpControlTester,\n renderer: withJsonFormsControlProps(ShadcnPasswordOtpControl),\n },\n { tester: tupleControlRendererTester, renderer: TupleControlRenderer },\n {\n tester: anyOfStringOrEnumControlTester,\n renderer: withJsonFormsControlProps(ShadcnAnyOfStringOrEnumControl),\n },\n {\n tester: categorizationAccordionTester,\n renderer: withJsonFormsLayoutProps(ShadcnCategorizationLayout),\n },\n {\n tester: categorizationStepperTester,\n renderer: withJsonFormsLayoutProps(ShadcnCategorizationLayout),\n },\n {\n tester: booleanToggleControlTester,\n renderer: withJsonFormsControlProps(ShadcnBooleanToggleControl),\n },\n {\n tester: radioGroupControlTester,\n renderer: withJsonFormsEnumProps(ShadcnRadioGroupControl),\n },\n {\n tester: sliderControlTester,\n renderer: withJsonFormsControlProps(ShadcnSliderControl),\n },\n { tester: oneOfEnumControlTester, renderer: ShadcnOneOfEnumControl },\n { tester: oneOfControlTester, renderer: ShadcnOneOfControl },\n { tester: allOfControlTester, renderer: ShadcnAllOfControl },\n { tester: anyOfControlTester, renderer: ShadcnAnyOfControl },\n { tester: mixedControlTester, renderer: MixedRenderer },\n {\n tester: arrayControlTester,\n renderer: withJsonFormsArrayLayoutProps(ShadcnArrayRenderer),\n },\n {\n tester: objectControlTester,\n renderer: withJsonFormsControlProps(ShadcnObjectRenderer),\n },\n {\n tester: booleanControlTester,\n renderer: withJsonFormsControlProps(ShadcnBooleanControl),\n },\n {\n tester: enumControlTester,\n renderer: withJsonFormsEnumProps(\n withTranslateProps(ShadcnEnumControl),\n false,\n ),\n },\n {\n tester: integerControlTester,\n renderer: withJsonFormsControlProps(ShadcnIntegerControl),\n },\n {\n tester: numberControlTester,\n renderer: withJsonFormsControlProps(ShadcnNumberInputControl),\n },\n {\n tester: dateTimeControlTester,\n renderer: withJsonFormsControlProps(ShadcnDateTimeControl),\n },\n {\n tester: dateControlTester,\n renderer: withJsonFormsControlProps(ShadcnDateControl),\n },\n {\n tester: timeControlTester,\n renderer: withJsonFormsControlProps(ShadcnTimeControl),\n },\n {\n tester: textControlTester,\n renderer: withJsonFormsControlProps(ShadcnTextControl),\n },\n {\n tester: groupTester,\n renderer: withJsonFormsLayoutProps(ShadcnGroupLayout),\n },\n {\n tester: horizontalLayoutTester,\n renderer: withJsonFormsLayoutProps(ShadcnHorizontalLayout),\n },\n {\n tester: verticalLayoutTester,\n renderer: withJsonFormsLayoutProps(ShadcnVerticalLayout),\n },\n {\n tester: categorizationTester,\n renderer: withJsonFormsLayoutProps(ShadcnCategorizationLayout),\n },\n {\n tester: labelRendererTester,\n renderer: withJsonFormsLabelProps(ShadcnLabelRenderer),\n },\n];\n\nexport const advancedShadcnRenderers = shadcnRenderers;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAawB,WAAwB;CACnC,IAAM,EAAE,MAAG,YAAS,YAAS,UAAO,YAAS,UAAO,eAClDC,EAAqB;CAiBvB,OAAO;EAAE;EAAS,QAhBHC,IACb,kBAACC,GAAD;GAAQ,MAAA;GAAK,eAAe,MAAS,CAACC,KAAQC,EAAM;GAClD,UAAA,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,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