@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.
Files changed (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -2
  3. package/lib/additional/LabelRenderer.d.ts +4 -0
  4. package/lib/additional/index.d.ts +1 -0
  5. package/lib/cells/BooleanCell.d.ts +3 -0
  6. package/lib/cells/Cell.d.ts +3 -0
  7. package/lib/cells/CompositeCell.d.ts +9 -0
  8. package/lib/cells/CompositeDetailDialog.d.ts +3 -0
  9. package/lib/cells/EnumCell.d.ts +3 -0
  10. package/lib/cells/NumberCell.d.ts +3 -0
  11. package/lib/cells/NumberFormatCell.d.ts +4 -0
  12. package/lib/cells/TextCell.d.ts +3 -0
  13. package/lib/cells/asCell.d.ts +12 -0
  14. package/lib/cells/index.d.ts +7 -0
  15. package/lib/complex/AdditionalProperties.d.ts +4 -0
  16. package/lib/complex/AnyOfRenderer.d.ts +7 -0
  17. package/lib/complex/ArrayChoicesControl.d.ts +6 -0
  18. package/lib/complex/ArrayControlRenderer.d.ts +4 -0
  19. package/lib/complex/ArrayPanelToggle.d.ts +6 -0
  20. package/lib/complex/CollectionPager.d.ts +5 -0
  21. package/lib/complex/CombinatorSwitchDialog.d.ts +8 -0
  22. package/lib/complex/DeleteDialog.d.ts +6 -0
  23. package/lib/complex/DetailDialogContent.d.ts +7 -0
  24. package/lib/complex/ErrorIndicator.d.ts +7 -0
  25. package/lib/complex/MixedRenderer.d.ts +6 -0
  26. package/lib/complex/ObjectRenderer.d.ts +3 -0
  27. package/lib/complex/OneOfRenderer.d.ts +5 -0
  28. package/lib/complex/RecursiveTreeRenderer.d.ts +4 -0
  29. package/lib/complex/RowDetailFrame.d.ts +16 -0
  30. package/lib/complex/ScalarCompositionRenderer.d.ts +4 -0
  31. package/lib/complex/TupleAdditionalItems.d.ts +4 -0
  32. package/lib/complex/TupleControlRenderer.d.ts +6 -0
  33. package/lib/complex/TupleField.d.ts +4 -0
  34. package/lib/complex/array/ArrayItemPanels.d.ts +18 -0
  35. package/lib/complex/array/ArrayItemViewProps.d.ts +11 -0
  36. package/lib/complex/array/ArrayListDetail.d.ts +9 -0
  37. package/lib/complex/array/ArrayTable.d.ts +21 -0
  38. package/lib/complex/index.d.ts +10 -0
  39. package/lib/complex/mixed/JsonTypeIcon.d.ts +5 -0
  40. package/lib/complex/mixed/MixedWidgets.d.ts +22 -0
  41. package/lib/complex/mixed/useConfirmation.d.ts +6 -0
  42. package/lib/components/ClearValueButton.d.ts +12 -0
  43. package/lib/components/ScrollRegion.d.ts +4 -0
  44. package/lib/components/TimePicker.d.ts +13 -0
  45. package/lib/components/index.d.ts +2 -0
  46. package/lib/controls/AnyOfStringOrEnumControl.d.ts +4 -0
  47. package/lib/controls/BooleanControl.d.ts +4 -0
  48. package/lib/controls/BooleanToggleControl.d.ts +4 -0
  49. package/lib/controls/ChoiceCards.d.ts +1 -0
  50. package/lib/controls/DateControl.d.ts +4 -0
  51. package/lib/controls/DateTimeControl.d.ts +4 -0
  52. package/lib/controls/EnumControl.d.ts +5 -0
  53. package/lib/controls/InputControl.d.ts +30 -0
  54. package/lib/controls/IntegerControl.d.ts +4 -0
  55. package/lib/controls/NumberControl.d.ts +4 -0
  56. package/lib/controls/OneOfEnumControl.d.ts +3 -0
  57. package/lib/controls/PasswordControl.d.ts +9 -0
  58. package/lib/controls/RadioGroupControl.d.ts +4 -0
  59. package/lib/controls/SliderControl.d.ts +4 -0
  60. package/lib/controls/TextControl.d.ts +4 -0
  61. package/lib/controls/TimeControl.d.ts +4 -0
  62. package/lib/controls/index.d.ts +15 -0
  63. package/lib/index.d.ts +6 -0
  64. package/lib/jsonforms-react-shadcn.cjs.js +3 -0
  65. package/lib/jsonforms-react-shadcn.cjs.js.map +1 -0
  66. package/lib/jsonforms-react-shadcn.esm.js +4040 -0
  67. package/lib/jsonforms-react-shadcn.esm.js.map +1 -0
  68. package/lib/layouts/CategorizationLayout.d.ts +7 -0
  69. package/lib/layouts/GroupLayout.d.ts +4 -0
  70. package/lib/layouts/HorizontalLayout.d.ts +4 -0
  71. package/lib/layouts/Layout.d.ts +5 -0
  72. package/lib/layouts/ValidationIndicator.d.ts +4 -0
  73. package/lib/layouts/VerticalLayout.d.ts +4 -0
  74. package/lib/layouts/index.d.ts +4 -0
  75. package/lib/renderers.d.ts +8 -0
  76. package/lib/util/dateTime.d.ts +12 -0
  77. package/lib/util/groupState.d.ts +1 -0
  78. package/lib/util/useTemporalControl.d.ts +28 -0
  79. package/package.json +86 -3
  80. package/src/additional/LabelRenderer.tsx +8 -0
  81. package/src/additional/index.ts +1 -0
  82. package/src/cells/BooleanCell.tsx +26 -0
  83. package/src/cells/Cell.tsx +101 -0
  84. package/src/cells/CompositeCell.tsx +275 -0
  85. package/src/cells/CompositeDetailDialog.tsx +79 -0
  86. package/src/cells/EnumCell.tsx +74 -0
  87. package/src/cells/NumberCell.tsx +51 -0
  88. package/src/cells/NumberFormatCell.tsx +47 -0
  89. package/src/cells/TextCell.tsx +40 -0
  90. package/src/cells/asCell.tsx +79 -0
  91. package/src/cells/index.ts +7 -0
  92. package/src/complex/AdditionalProperties.tsx +453 -0
  93. package/src/complex/AnyOfRenderer.tsx +341 -0
  94. package/src/complex/ArrayChoicesControl.tsx +303 -0
  95. package/src/complex/ArrayControlRenderer.tsx +400 -0
  96. package/src/complex/ArrayPanelToggle.tsx +33 -0
  97. package/src/complex/CollectionPager.tsx +76 -0
  98. package/src/complex/CombinatorSwitchDialog.tsx +43 -0
  99. package/src/complex/DeleteDialog.tsx +41 -0
  100. package/src/complex/DetailDialogContent.tsx +84 -0
  101. package/src/complex/ErrorIndicator.tsx +136 -0
  102. package/src/complex/MixedRenderer.tsx +262 -0
  103. package/src/complex/ObjectRenderer.tsx +43 -0
  104. package/src/complex/OneOfRenderer.tsx +14 -0
  105. package/src/complex/RecursiveTreeRenderer.tsx +20 -0
  106. package/src/complex/RowDetailFrame.tsx +158 -0
  107. package/src/complex/ScalarCompositionRenderer.tsx +14 -0
  108. package/src/complex/TupleAdditionalItems.tsx +94 -0
  109. package/src/complex/TupleControlRenderer.tsx +54 -0
  110. package/src/complex/TupleField.tsx +41 -0
  111. package/src/complex/array/ArrayItemPanels.tsx +217 -0
  112. package/src/complex/array/ArrayItemViewProps.ts +15 -0
  113. package/src/complex/array/ArrayListDetail.tsx +165 -0
  114. package/src/complex/array/ArrayTable.tsx +535 -0
  115. package/src/complex/index.ts +16 -0
  116. package/src/complex/mixed/JsonTypeIcon.tsx +41 -0
  117. package/src/complex/mixed/MixedWidgets.tsx +326 -0
  118. package/src/complex/mixed/useConfirmation.tsx +34 -0
  119. package/src/components/ClearValueButton.tsx +56 -0
  120. package/src/components/ScrollRegion.tsx +27 -0
  121. package/src/components/TimePicker.tsx +250 -0
  122. package/src/components/index.ts +2 -0
  123. package/src/controls/AnyOfStringOrEnumControl.tsx +44 -0
  124. package/src/controls/BooleanControl.tsx +67 -0
  125. package/src/controls/BooleanToggleControl.tsx +58 -0
  126. package/src/controls/ChoiceCards.tsx +9 -0
  127. package/src/controls/DateControl.tsx +240 -0
  128. package/src/controls/DateTimeControl.tsx +187 -0
  129. package/src/controls/EnumControl.tsx +159 -0
  130. package/src/controls/InputControl.tsx +258 -0
  131. package/src/controls/IntegerControl.tsx +14 -0
  132. package/src/controls/NumberControl.tsx +14 -0
  133. package/src/controls/OneOfEnumControl.tsx +13 -0
  134. package/src/controls/PasswordControl.tsx +216 -0
  135. package/src/controls/RadioGroupControl.tsx +72 -0
  136. package/src/controls/SliderControl.tsx +77 -0
  137. package/src/controls/TextControl.tsx +50 -0
  138. package/src/controls/TimeControl.tsx +135 -0
  139. package/src/controls/index.ts +19 -0
  140. package/src/index.tsx +10 -0
  141. package/src/layouts/CategorizationLayout.tsx +248 -0
  142. package/src/layouts/GroupLayout.tsx +210 -0
  143. package/src/layouts/HorizontalLayout.tsx +12 -0
  144. package/src/layouts/Layout.tsx +62 -0
  145. package/src/layouts/ValidationIndicator.tsx +40 -0
  146. package/src/layouts/VerticalLayout.tsx +12 -0
  147. package/src/layouts/index.ts +4 -0
  148. package/src/renderers.ts +225 -0
  149. package/src/styles.css +482 -0
  150. package/src/tailwind-theme.cjs +42 -0
  151. package/src/theme.css +43 -0
  152. package/src/util/dateTime.ts +80 -0
  153. package/src/util/groupState.ts +5 -0
  154. package/src/util/useTemporalControl.ts +160 -0
@@ -0,0 +1,4040 @@
1
+ import { dynamicCellEntry as e, dynamicRendererEntry as t } from "@chobantonov/jsonforms-react-renderer-common/dynamic/DynamicUiProvider";
2
+ import n, { createContext as r, useCallback as i, useContext as a, useEffect as o, useId as s, useRef as c, useState as l } from "react";
3
+ import { Button as u } from "@jsonforms-react-shadcn-ui/button";
4
+ import { Dialog as d, DialogContent as f, DialogDescription as p, DialogFooter as m, DialogHeader as h, DialogTitle as g } from "@jsonforms-react-shadcn-ui/dialog";
5
+ import { useConfirmationState as _ } from "@chobantonov/jsonforms-react-renderer-common/interaction/useConfirmationState";
6
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
7
+ import { createRecursiveTreeRenderer as x, recursiveTreeTester as S } from "@chobantonov/jsonforms-react-renderer-common/mixed/RecursiveTreeRenderer";
8
+ import { ArrowDown as C, ArrowUp as w, CalendarClock as T, CalendarIcon as E, Check as D, ChevronDown as O, ChevronLeft as k, ChevronRight as A, ChevronUp as j, CircleAlert as M, Clock3 as N, Eye as P, EyeOff as F, Maximize2 as I, Minimize2 as L, Pencil as R, Plus as z, Trash2 as ee, X as te } from "lucide-react";
9
+ import { useI18n as B, useI18nDefault as V, useTranslator as H } from "@chobantonov/jsonforms-react-renderer-common/locale/translate";
10
+ import { Tooltip as U, TooltipContent as W, TooltipProvider as ne, TooltipTrigger as re } from "@jsonforms-react-shadcn-ui/tooltip";
11
+ import { Input as G } from "@jsonforms-react-shadcn-ui/input";
12
+ import { Select as K, SelectContent as q, SelectItem as J, SelectTrigger as ie, SelectValue as ae } from "@jsonforms-react-shadcn-ui/select";
13
+ import { Collapsible as oe, CollapsibleContent as se, CollapsibleTrigger as ce } from "@jsonforms-react-shadcn-ui/collapsible";
14
+ import { mixedPathKey as le, mixedTreeLabel as ue } from "@chobantonov/jsonforms-react-renderer-common/mixed/mixedTree";
15
+ import { choiceCardsTester as de, createChoiceCards as fe } from "@chobantonov/jsonforms-react-renderer-common/composition/choiceCards";
16
+ import { Resolve as pe, UPDATE_DATA as me, and as he, categorizationHasCategory as ge, composePaths as _e, coreReducer as ve, createCleanLabel as ye, createControlElement as be, createDefaultValue as xe, defaultErrorTranslator as Se, deriveLabelForUISchemaElement as Ce, enumToEnumOptionMapper as we, formatIs as Te, getCombinedErrorMessage as Ee, getFirstPrimitiveProp as De, getI18nKeyPrefix as Oe, isAnyOfControl as ke, isBooleanControl as Ae, isDateControl as je, isDateTimeControl as Me, isEnumControl as Ne, isIntegerControl as Pe, isNumberControl as Fe, isNumberFormatControl as Ie, isObjectArrayWithNesting as Le, isOneOfControl as Re, isOneOfEnumControl as ze, isRangeControl as Be, isStringControl as Ve, isTimeControl as He, oneOfToEnumOptionMapper as Ue, optionIs as We, or as Ge, rankWith as Y, schemaMatches as Ke, schemaTypeIs as qe, uiTypeIs as Je, update as Ye } from "@jsonforms/core";
17
+ import { DispatchCell as Xe, JsonFormsContext as Ze, JsonFormsDispatch as Qe, useJsonForms as $e, withJsonFormsAnyOfProps as et, withJsonFormsArrayLayoutProps as tt, withJsonFormsCellProps as nt, withJsonFormsControlProps as X, withJsonFormsEnumProps as rt, withJsonFormsLabelProps as it, withJsonFormsLayoutProps as at, withJsonFormsOneOfEnumProps as ot, withJsonFormsOneOfProps as st, withTranslateProps as ct } from "@jsonforms/react";
18
+ import { Checkbox as lt } from "@jsonforms-react-shadcn-ui/checkbox";
19
+ import { Popover as ut, PopoverContent as dt, PopoverTrigger as ft } from "@jsonforms-react-shadcn-ui/popover";
20
+ import { displayableErrors as pt, useContainerValidation as mt } from "@chobantonov/jsonforms-react-renderer-common/validation/validationIndicator";
21
+ import { addChoice as ht, arrayChoiceItemErrors as gt, arrayChoicesOf as _t, asArrayValue as vt, canAddChoice as yt, canRemoveChoice as bt, isChipsControl as xt, isMultiSelectControl as St, isSelected as Ct, removeChoiceAt as wt, resolveItemSchema as Tt, sameChoice as Et } from "@chobantonov/jsonforms-react-renderer-common/collections/arrayChoices";
22
+ import { useMixedScalar as Dt } from "@chobantonov/jsonforms-react-renderer-common/mixed/mixedScalar";
23
+ import { usePreTouchErrors as Ot } from "@chobantonov/jsonforms-react-renderer-common/validation/preTouchErrors";
24
+ import { getControlHelp as kt } from "@chobantonov/jsonforms-react-renderer-common/controls/controlHelp";
25
+ import { InputAdornments as At } from "@chobantonov/jsonforms-react-renderer-common/controls/inputAdornments";
26
+ import { ErrorSummaryList as jt, ObjectErrorContext as Mt, useAdditionalPropertyErrors as Nt, useErrorFeedback as Pt, useNameConstraintMessage as Ft, usePathErrorIndicator as It, usePropertyNameErrors as Lt } from "@chobantonov/jsonforms-react-renderer-common/validation/errorSummary";
27
+ import { ScalarCompositionControl as Rt } from "@chobantonov/jsonforms-react-renderer-common/composition/ScalarCompositionControl";
28
+ import { scalarCompositionTester as zt } from "@chobantonov/jsonforms-react-renderer-common/composition/useScalarComposition";
29
+ import { useTupleControl as Bt } from "@chobantonov/jsonforms-react-renderer-common/tuple/useTupleControl";
30
+ import { TupleControlContent as Vt, connectTupleControl as Ht } from "@chobantonov/jsonforms-react-renderer-common/tuple/TupleControlContent";
31
+ import { tupleControlTester as Ut } from "@chobantonov/jsonforms-react-renderer-common/tuple/tupleSchema";
32
+ import { useTupleAdditionalItems as Wt } from "@chobantonov/jsonforms-react-renderer-common/tuple/useTupleAdditionalItems";
33
+ import { PendingChangesProvider as Gt } from "@chobantonov/jsonforms-react-renderer-common/interaction/pendingChanges";
34
+ import { Pagination as Kt, PaginationContent as qt, PaginationItem as Jt } from "@jsonforms-react-shadcn-ui/pagination";
35
+ import { TupleField as Yt } from "@chobantonov/jsonforms-react-renderer-common/tuple/TupleField";
36
+ import { hasInvalidCompositeEditorDraft as Xt, useCompositeDraft as Zt } from "@chobantonov/jsonforms-react-renderer-common/cells/useCompositeDraft";
37
+ import { ScrollArea as Qt, ScrollBar as $t } from "@jsonforms-react-shadcn-ui/scroll-area";
38
+ import { useDetailDialog as en } from "@chobantonov/jsonforms-react-renderer-common/interaction/detailDialog";
39
+ import { literalPropertySchema as tn } from "@chobantonov/jsonforms-react-renderer-common/objects/literalPropertySchema";
40
+ import { renamePropertyKey as nn } from "@chobantonov/jsonforms-react-renderer-common/objects/additionalProperties";
41
+ import { DynamicPropertyProvider as rn, clearedDynamicPropertyValue as an } from "@chobantonov/jsonforms-react-renderer-common/objects/dynamicProperties";
42
+ import { useAdditionalPropertyActions as on, useAdditionalPropertyEntries as sn } from "@chobantonov/jsonforms-react-renderer-common/objects/useAdditionalPropertyEntries";
43
+ import { IsolatedPropertyEditor as cn } from "@chobantonov/jsonforms-react-renderer-common/objects/IsolatedPropertyEditor";
44
+ import { assignOwnProperty as ln, needsIsolatedEditor as un, validateAdditionalPropertyName as dn } from "@chobantonov/jsonforms-react-renderer-common/objects/additionalPropertyName";
45
+ import { Card as fn, CardContent as pn, CardFooter as mn, CardHeader as hn, CardTitle as gn } from "@jsonforms-react-shadcn-ui/card";
46
+ import { AllOfControl as _n, AllOfRenderer as vn, allOfControlTester as yn } from "@chobantonov/jsonforms-react-renderer-common/composition/AllOfRenderer";
47
+ import { useCombinatorSelection as bn } from "@chobantonov/jsonforms-react-renderer-common/composition/useCombinatorSelection";
48
+ import { discriminatorBranch as xn } from "@chobantonov/jsonforms-react-renderer-common/composition/discriminatorBranch";
49
+ import { isArrayElementPath as Sn, isArrayElementPath as Cn, isMixedControl as wn, isMixedSchema as Tn, mixedControlTester as En, schemaForType as Dn, schemaForType as On } from "@chobantonov/jsonforms-react-renderer-common/mixed/mixedSchema";
50
+ import { branchChangeData as kn, clearedBranchValue as An, discardedByBranchChange as jn, isUnselectedBranchValue as Mn } from "@chobantonov/jsonforms-react-renderer-common/composition/combinators";
51
+ import { CombinatorBranch as Nn } from "@chobantonov/jsonforms-react-renderer-common/composition/CombinatorBranch";
52
+ import { Tabs as Pn, TabsContent as Fn, TabsList as In, TabsTrigger as Ln } from "@jsonforms-react-shadcn-ui/tabs";
53
+ import { CombinatorProperties as Rn } from "@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties";
54
+ import { resolveCollapsed as zn, useGroupHeaderTitle as Bn, useGroupState as Vn, useGroupState as Hn } from "@chobantonov/jsonforms-react-renderer-common/layout/groupState";
55
+ import { findDetailUISchema as Un, resolveEditorDetail as Wn } from "@chobantonov/jsonforms-react-renderer-common/core/detailUiSchema";
56
+ import { ColumnResizeHandle as Gn, useColumnWidths as Kn } from "@chobantonov/jsonforms-react-renderer-common/collections/columnResize";
57
+ import { useTableSelection as qn } from "@chobantonov/jsonforms-react-renderer-common/collections/useTableSelection";
58
+ import { useCollectionPagination as Jn } from "@chobantonov/jsonforms-react-renderer-common/collections/collectionPagination";
59
+ import { createRowDetailFrame as Yn, createRowDetailToggle as Xn, useRowDetail as Zn } from "@chobantonov/jsonforms-react-renderer-common/collections/rowDetail";
60
+ import { ResizableHandle as Qn, ResizablePanel as $n, ResizablePanelGroup as er } from "@jsonforms-react-shadcn-ui/resizable";
61
+ import { useArrayPanelState as tr } from "@chobantonov/jsonforms-react-renderer-common/collections/useArrayPanelState";
62
+ import { shouldConfirm as nr } from "@chobantonov/jsonforms-react-renderer-common/interaction/confirmation";
63
+ import { CollectionErrorNavigation as rr, RowErrorCount as ir } from "@chobantonov/jsonforms-react-renderer-common/collections/CollectionErrorNavigation";
64
+ import { CellSummary as ar, ItemProvider as or } from "@chobantonov/jsonforms-react-renderer-common/cells/CellSummary";
65
+ import { tableColumnFields as sr, tableColumnStyle as cr } from "@chobantonov/jsonforms-react-renderer-common/collections/tableColumns";
66
+ import { ItemValidationIndicator as lr } from "@chobantonov/jsonforms-react-renderer-common/validation/ItemValidationIndicator";
67
+ import { Item as ur, ItemActions as dr, ItemContent as fr, ItemGroup as pr } from "@jsonforms-react-shadcn-ui/item";
68
+ import { Avatar as mr, AvatarFallback as hr } from "@jsonforms-react-shadcn-ui/avatar";
69
+ import { MixedCodeControl as gr, MixedDetailControl as _r, MixedNodeControl as vr } from "@chobantonov/jsonforms-react-renderer-common/mixed/MixedDetailControl";
70
+ import { mixedParentNode as yr } from "@chobantonov/jsonforms-react-renderer-common/mixed/mixedTreeActions";
71
+ import { useMixedRenderer as br } from "@chobantonov/jsonforms-react-renderer-common/mixed/useMixedRenderer";
72
+ import { Breadcrumb as xr, BreadcrumbItem as Sr, BreadcrumbLink as Cr, BreadcrumbList as wr, BreadcrumbPage as Tr, BreadcrumbSeparator as Er } from "@jsonforms-react-shadcn-ui/breadcrumb";
73
+ import { ObjectDetailContext as Dr, createObjectRenderer as Or, objectControlTester as kr } from "@chobantonov/jsonforms-react-renderer-common/objects/ObjectDetail";
74
+ import { resolveIntlLocale as Ar } from "@chobantonov/jsonforms-react-renderer-common/locale/intl";
75
+ import jr from "dayjs";
76
+ import { formatDate as Mr, parseDateValue as Nr } from "@chobantonov/jsonforms-react-renderer-common/formats/dateValues";
77
+ import { effectiveRestrict as Pr, resolveDataBounds as Fr, temporalBounds as Ir } from "@chobantonov/jsonforms-react-renderer-common/formats/temporalBounds";
78
+ import { specDateSaveFormat as Lr, specDateTimeSaveFormat as Rr, specTimeSaveFormat as zr, warnOnSaveFormat as Br } from "@chobantonov/jsonforms-react-renderer-common/formats/temporalFormats";
79
+ import { format as Vr } from "date-fns/format";
80
+ import { parse as Hr } from "date-fns/parse";
81
+ import { isValid as Ur } from "date-fns/isValid";
82
+ import { Calendar as Wr } from "@jsonforms-react-shadcn-ui/calendar";
83
+ import Gr from "lodash/isEqual";
84
+ import { Textarea as Kr } from "@jsonforms-react-shadcn-ui/textarea";
85
+ import { Switch as qr } from "@jsonforms-react-shadcn-ui/switch";
86
+ import { RadioGroup as Jr, RadioGroupItem as Yr } from "@jsonforms-react-shadcn-ui/radio-group";
87
+ import { Slider as Xr } from "@jsonforms-react-shadcn-ui/slider";
88
+ import { categoryKey as Zr, useCategorySelection as Qr } from "@chobantonov/jsonforms-react-renderer-common/layout/categoryState";
89
+ import { useEffectiveElements as $r } from "@chobantonov/jsonforms-react-renderer-common/layout/layoutContext";
90
+ import { containerStyle as ei, itemSizing as ti, resolveGap as ni, resolveGridColumns as ri } from "@chobantonov/jsonforms-react-renderer-common/layout/layoutSizing";
91
+ import { useCompositeCellPresentation as ii } from "@chobantonov/jsonforms-react-renderer-common/cells/useCompositeCellPresentation";
92
+ import { preventsEmpty as ai } from "@chobantonov/jsonforms-react-renderer-common/cells/compositeActions";
93
+ import { compositeCellTester as oi } from "@chobantonov/jsonforms-react-renderer-common/cells/compositeCellTester";
94
+ export * from "@chobantonov/jsonforms-react-renderer-common/composition/CombinatorProperties";
95
+ // src/complex/mixed/useConfirmation.tsx
96
+ var si = () => {
97
+ let { t: e, pending: t, request: n, close: r, confirm: i, title: a, message: o } = _();
98
+ return {
99
+ request: n,
100
+ dialog: t ? /* @__PURE__ */ y(d, {
101
+ open: !0,
102
+ onOpenChange: (e) => !e && r(),
103
+ children: /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ b(h, { children: [/* @__PURE__ */ y(g, { children: a }), /* @__PURE__ */ y(p, { children: o })] }), /* @__PURE__ */ b(m, { children: [/* @__PURE__ */ y(u, {
104
+ variant: "outline",
105
+ onClick: r,
106
+ children: e("confirm.decline")
107
+ }), /* @__PURE__ */ y(u, {
108
+ onClick: i,
109
+ children: e("confirm.accept")
110
+ })] })] })
111
+ }) : null
112
+ };
113
+ }, ci = ({ count: e }) => {
114
+ let t = B()(e === void 0 ? "validation.containerHasErrors" : e === 1 ? "validation.containerError" : "validation.containerErrors", { count: e });
115
+ return /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
116
+ asChild: !0,
117
+ children: /* @__PURE__ */ y("span", {
118
+ role: "img",
119
+ "aria-label": t,
120
+ tabIndex: 0,
121
+ "data-container-validation-indicator": !0,
122
+ "data-error-count": e,
123
+ className: "inline-flex shrink-0 items-center align-middle leading-none text-destructive",
124
+ children: /* @__PURE__ */ y(M, {
125
+ className: "h-4 w-4",
126
+ "aria-hidden": "true"
127
+ })
128
+ })
129
+ }), /* @__PURE__ */ y(W, { children: t })] }) });
130
+ }, li = ({ type: e, active: t = !1 }) => /* @__PURE__ */ b("svg", {
131
+ "aria-hidden": "true",
132
+ "data-json-type": e,
133
+ className: `h-4 w-4 shrink-0 fill-none stroke-current ${t ? "text-foreground" : "text-muted-foreground"}`,
134
+ viewBox: "0 0 24 24",
135
+ strokeWidth: "2.5",
136
+ strokeLinecap: "round",
137
+ strokeLinejoin: "round",
138
+ children: [
139
+ e === "object" && /* @__PURE__ */ y("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" }),
140
+ e === "array" && /* @__PURE__ */ y("path", { d: "M8 4H5v16h3M16 4h3v16h-3" }),
141
+ e === "string" && /* @__PURE__ */ y("path", {
142
+ strokeWidth: "2",
143
+ d: "M7 8h10M7 12h10M7 16h6"
144
+ }),
145
+ (e === "number" || e === "integer") && /* @__PURE__ */ b("g", {
146
+ strokeWidth: "2",
147
+ children: [/* @__PURE__ */ y("path", { d: "M9 4v16M15 4v16" }), /* @__PURE__ */ y("path", { d: "M4 9h16M4 15h16" })]
148
+ }),
149
+ e === "boolean" && /* @__PURE__ */ y("path", {
150
+ d: "M4 12l5 5L20 7",
151
+ strokeWidth: "3"
152
+ }),
153
+ e === "null" && /* @__PURE__ */ b("g", {
154
+ strokeWidth: "2",
155
+ children: [/* @__PURE__ */ y("circle", {
156
+ cx: "12",
157
+ cy: "12",
158
+ r: "9"
159
+ }), /* @__PURE__ */ y("path", { d: "M18.5 5.5l-13 13" })]
160
+ })
161
+ ]
162
+ }), ui = n.createContext(null), di = ({ clearable: e = !0, disabled: t, error: n, onChange: r, types: i, value: a }) => {
163
+ let o = B(), s = H();
164
+ return /* @__PURE__ */ b("div", {
165
+ className: "min-w-0",
166
+ children: [/* @__PURE__ */ b("div", {
167
+ className: "group relative",
168
+ children: [/* @__PURE__ */ b(K, {
169
+ disabled: t,
170
+ value: a == null ? "" : a,
171
+ onValueChange: r,
172
+ children: [/* @__PURE__ */ y(ie, {
173
+ className: e && a && !t ? "w-full pr-16 [&>svg]:absolute [&>svg]:right-3" : "w-full",
174
+ "aria-label": o("mixed.typeLabel"),
175
+ "aria-invalid": !!n,
176
+ children: /* @__PURE__ */ y(ae, { placeholder: o("mixed.typePlaceholder") })
177
+ }), /* @__PURE__ */ y(q, { children: i.map((e) => /* @__PURE__ */ y(J, {
178
+ value: e,
179
+ children: s(`mixed.type.${e}`, e)
180
+ }, s(`mixed.type.${e}`, e))) })]
181
+ }), e && a && !t && /* @__PURE__ */ y(u, {
182
+ type: "button",
183
+ variant: "ghost",
184
+ size: "icon-sm",
185
+ disabled: t,
186
+ "aria-label": o("mixed.clearType"),
187
+ title: o("mixed.clearType"),
188
+ 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",
189
+ onPointerDown: (e) => e.preventDefault(),
190
+ onClick: (e) => {
191
+ e.stopPropagation(), r(void 0);
192
+ },
193
+ children: /* @__PURE__ */ y(te, { "aria-hidden": "true" })
194
+ })]
195
+ }), n && /* @__PURE__ */ y("div", {
196
+ role: "alert",
197
+ className: "text-sm text-destructive",
198
+ children: n
199
+ })]
200
+ });
201
+ }, fi = ({ label: e, onView: t, selector: n }) => {
202
+ let r = B();
203
+ return /* @__PURE__ */ b("div", {
204
+ className: "space-y-1",
205
+ children: [e && /* @__PURE__ */ y("div", { children: e }), /* @__PURE__ */ b("div", {
206
+ className: "flex items-center gap-2",
207
+ children: [n, /* @__PURE__ */ y(u, {
208
+ type: "button",
209
+ variant: "ghost",
210
+ size: "icon-sm",
211
+ "aria-label": r("mixed.view", { label: e || r("control.value") }),
212
+ onClick: t,
213
+ children: /* @__PURE__ */ y(P, { "aria-hidden": "true" })
214
+ })]
215
+ })]
216
+ });
217
+ }, pi = (e) => {
218
+ let t = B(), [n, r] = l(""), [i, a] = l(!1), [o, s] = l(), [c, d] = l(""), f = o ? e.validateRename(o, c) : void 0, p = () => {
219
+ o && !f && (e.onRename(o, c), s(void 0));
220
+ }, m = (e, t, n, r = !1, i = !1) => /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
221
+ asChild: !0,
222
+ children: /* @__PURE__ */ y(u, {
223
+ type: "button",
224
+ variant: i ? "destructive" : "ghost",
225
+ size: "icon-sm",
226
+ "aria-label": e,
227
+ className: r ? "shrink-0 opacity-0 group-hover/tree-row:opacity-100 group-focus-within/tree-row:opacity-100 [@media(hover:none)]:opacity-100" : "shrink-0",
228
+ onClick: n,
229
+ children: t
230
+ })
231
+ }), /* @__PURE__ */ y(W, { children: e })] }), h = (e) => ue(e).toLowerCase().includes(n.toLowerCase()) || e.children.some(h), g = (r) => {
232
+ var l;
233
+ let _ = r.type === "object" || r.type === "array", v = le(e.selectedPath) === le(r.path);
234
+ return (n ? !h(r) : r.path.length && !_ && !i) ? null : /* @__PURE__ */ b(oe, {
235
+ defaultOpen: e.domainTree && r.path.length === 0,
236
+ children: [/* @__PURE__ */ b("div", {
237
+ className: "group/tree-row flex min-w-0 items-center gap-1",
238
+ children: [
239
+ r.children.length > 0 ? /* @__PURE__ */ y(ce, {
240
+ render: /* @__PURE__ */ y(u, {
241
+ type: "button",
242
+ variant: "ghost",
243
+ size: "icon-sm"
244
+ }),
245
+ className: "size-8 shrink-0",
246
+ "aria-label": t("mixed.expand", { label: ue(r) }),
247
+ children: /* @__PURE__ */ y(A, { "aria-hidden": "true" })
248
+ }) : /* @__PURE__ */ y("span", {
249
+ "aria-hidden": "true",
250
+ className: "size-8 shrink-0"
251
+ }),
252
+ o && le(o.path) === le(r.path) ? /* @__PURE__ */ b("div", {
253
+ className: "flex min-w-0 flex-1 items-start gap-2",
254
+ children: [/* @__PURE__ */ y(li, {
255
+ type: r.type,
256
+ active: v
257
+ }), /* @__PURE__ */ b("div", {
258
+ className: "min-w-0 flex-1",
259
+ children: [/* @__PURE__ */ y(G, {
260
+ autoFocus: !0,
261
+ "aria-label": t("additionalProperties.namePlaceholder"),
262
+ value: c,
263
+ "aria-invalid": !!f,
264
+ onChange: (e) => d(e.target.value),
265
+ onBlur: p,
266
+ onKeyDown: (e) => {
267
+ e.key === "Enter" && (e.preventDefault(), p()), e.key === "Escape" && (e.preventDefault(), s(void 0));
268
+ }
269
+ }), f && /* @__PURE__ */ y("p", {
270
+ role: "alert",
271
+ className: "text-sm text-destructive break-words",
272
+ children: f
273
+ })]
274
+ })]
275
+ }) : /* @__PURE__ */ b(u, {
276
+ type: "button",
277
+ variant: v ? "secondary" : "ghost",
278
+ className: "min-w-0 flex-1 justify-start",
279
+ "data-recursive-node": e.domainTree ? le(r.path) : void 0,
280
+ "aria-pressed": v,
281
+ onClick: () => e.onSelect(r),
282
+ children: [/* @__PURE__ */ y(li, {
283
+ type: r.type,
284
+ active: v
285
+ }), /* @__PURE__ */ y("span", {
286
+ className: "truncate",
287
+ children: r.path.length === 0 ? r.label : ue(r)
288
+ })]
289
+ }),
290
+ (l = e.renderIndicator) == null ? void 0 : l.call(e, r),
291
+ !e.domainTree && r.path.length === 0 && m(t(i ? "mixed.hidePrimitives" : "mixed.showPrimitives"), y(i ? P : F, { "aria-hidden": "true" }), () => a(!i)),
292
+ e.canRename(r) && !o && m(t("additionalProperties.renameNamed", { name: ue(r) }), /* @__PURE__ */ y(R, { "aria-hidden": "true" }), () => {
293
+ s(r), d(e.domainTree ? r.label : String(r.path[r.path.length - 1]));
294
+ }, !0),
295
+ e.canDelete(r) && !o && m(t("additionalProperties.deleteNamed", { name: ue(r) }), /* @__PURE__ */ y(ee, { "aria-hidden": "true" }), () => e.onDelete(r), !0, !0)
296
+ ]
297
+ }), /* @__PURE__ */ y(se, {
298
+ keepMounted: !0,
299
+ className: "pl-3",
300
+ children: r.children.map(g)
301
+ })]
302
+ }, le(r.path));
303
+ };
304
+ return /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b("div", {
305
+ className: "min-w-0 space-y-2 p-1",
306
+ children: [/* @__PURE__ */ y(G, {
307
+ "aria-label": t("mixed.searchLabel"),
308
+ placeholder: t("mixed.searchPlaceholder"),
309
+ value: n,
310
+ onChange: (e) => r(e.target.value)
311
+ }), /* @__PURE__ */ y("nav", {
312
+ "aria-label": t("mixed.treeLabel"),
313
+ children: g(e.root)
314
+ })]
315
+ }) });
316
+ }, mi = x(pi, ci, ({ children: e, onClick: t }) => /* @__PURE__ */ y(u, {
317
+ variant: "link",
318
+ type: "button",
319
+ onClick: t,
320
+ children: e
321
+ }), si), hi = fe(si, () => ({
322
+ border: "hsl(var(--border, 214.3 31.8% 91.4%))",
323
+ selected: "hsl(var(--primary, 222.2 47.4% 11.2%))",
324
+ focus: "hsl(var(--ring, 222.2 84% 4.9%))",
325
+ background: "hsl(var(--card, 0 0% 100%))",
326
+ error: "hsl(var(--destructive, 0 84.2% 60.2%))"
327
+ })), gi = ({ errors: e, className: t, path: r, local: i = !1 }) => {
328
+ let { open: a, setOpen: o, count: s, entries: c, message: l } = Pt(e, r, i), d = n.useRef(), f = n.useRef(null), p = n.useRef(null), m = () => {
329
+ d.current && clearTimeout(d.current);
330
+ }, h = () => {
331
+ m(), o(!0);
332
+ }, g = () => {
333
+ m(), d.current = setTimeout(() => {
334
+ var e;
335
+ f.current !== document.activeElement && !((e = p.current) != null && e.contains(document.activeElement)) && o(!1);
336
+ }, 200);
337
+ };
338
+ return n.useEffect(() => () => {
339
+ d.current && clearTimeout(d.current);
340
+ }, []), s <= 1 ? /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, {
341
+ onOpenChange: o,
342
+ children: [/* @__PURE__ */ y(re, {
343
+ asChild: !0,
344
+ children: /* @__PURE__ */ y(u, {
345
+ type: "button",
346
+ variant: "ghost",
347
+ size: "icon-sm",
348
+ className: `h-6 w-6 shrink-0 p-0 text-destructive ${t == null ? "" : t}`,
349
+ "aria-label": e,
350
+ children: /* @__PURE__ */ y(M, {
351
+ className: "h-4 w-4",
352
+ "aria-hidden": "true"
353
+ })
354
+ })
355
+ }), /* @__PURE__ */ y(W, {
356
+ className: "max-w-sm whitespace-pre-line",
357
+ children: l
358
+ })]
359
+ }) }) : /* @__PURE__ */ b(ut, {
360
+ open: a,
361
+ onOpenChange: o,
362
+ children: [/* @__PURE__ */ y(ft, {
363
+ asChild: !0,
364
+ children: /* @__PURE__ */ y(u, {
365
+ type: "button",
366
+ variant: "ghost",
367
+ size: "icon-sm",
368
+ ref: f,
369
+ onPointerEnter: h,
370
+ onPointerLeave: g,
371
+ onFocus: h,
372
+ onBlur: g,
373
+ onClick: (e) => {
374
+ e.preventDefault(), h();
375
+ },
376
+ className: `h-6 w-6 shrink-0 p-0 text-destructive ${t == null ? "" : t}`,
377
+ "aria-label": e,
378
+ children: /* @__PURE__ */ y(M, {
379
+ className: "h-4 w-4",
380
+ "aria-hidden": "true"
381
+ })
382
+ })
383
+ }), /* @__PURE__ */ y(dt, {
384
+ className: "w-auto",
385
+ align: "start",
386
+ onOpenAutoFocus: (e) => e.preventDefault(),
387
+ onCloseAutoFocus: (e) => e.preventDefault(),
388
+ onPointerEnter: m,
389
+ onPointerLeave: g,
390
+ onFocusCapture: m,
391
+ onBlurCapture: g,
392
+ children: /* @__PURE__ */ y("div", {
393
+ ref: p,
394
+ children: /* @__PURE__ */ y(jt, {
395
+ entries: c,
396
+ renderToggle: (e, t, n) => /* @__PURE__ */ y(u, {
397
+ type: "button",
398
+ variant: "link",
399
+ onClick: t,
400
+ "aria-expanded": n,
401
+ children: e
402
+ })
403
+ })
404
+ })
405
+ })]
406
+ });
407
+ };
408
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
409
+ function _i(e) {
410
+ "@babel/helpers - typeof";
411
+ return _i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
412
+ return typeof e;
413
+ } : function(e) {
414
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
415
+ }, _i(e);
416
+ }
417
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
418
+ function vi(e, t) {
419
+ if (_i(e) != "object" || !e) return e;
420
+ var n = e[Symbol.toPrimitive];
421
+ if (n !== void 0) {
422
+ var r = n.call(e, t || "default");
423
+ if (_i(r) != "object") return r;
424
+ throw TypeError("@@toPrimitive must return a primitive value.");
425
+ }
426
+ return (t === "string" ? String : Number)(e);
427
+ }
428
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
429
+ function yi(e) {
430
+ var t = vi(e, "string");
431
+ return _i(t) == "symbol" ? t : t + "";
432
+ }
433
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
434
+ function bi(e, t, n) {
435
+ return (t = yi(t)) in e ? Object.defineProperty(e, t, {
436
+ value: n,
437
+ enumerable: !0,
438
+ configurable: !0,
439
+ writable: !0
440
+ }) : e[t] = n, e;
441
+ }
442
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/objectSpread2.js
443
+ function xi(e, t) {
444
+ var n = Object.keys(e);
445
+ if (Object.getOwnPropertySymbols) {
446
+ var r = Object.getOwnPropertySymbols(e);
447
+ t && (r = r.filter(function(t) {
448
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
449
+ })), n.push.apply(n, r);
450
+ }
451
+ return n;
452
+ }
453
+ function Z(e) {
454
+ for (var t = 1; t < arguments.length; t++) {
455
+ var n = arguments[t] == null ? {} : arguments[t];
456
+ t % 2 ? xi(Object(n), !0).forEach(function(t) {
457
+ bi(e, t, n[t]);
458
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xi(Object(n)).forEach(function(t) {
459
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
460
+ });
461
+ }
462
+ return e;
463
+ }
464
+ // src/cells/asCell.tsx
465
+ var Si = r(!1), Ci = (e) => (t) => /* @__PURE__ */ y(Si.Provider, {
466
+ value: !0,
467
+ children: /* @__PURE__ */ y(e, Z(Z({}, t), {}, { uischema: Z(Z({}, t.uischema), {}, {
468
+ scope: "#",
469
+ label: !1
470
+ }) }))
471
+ }), wi = nt(({ children: e, errors: t, path: n, schema: r, uischema: i }) => {
472
+ var a;
473
+ return /* @__PURE__ */ b("div", {
474
+ className: "shadcn-jsonforms-grid-cell",
475
+ style: {
476
+ display: "flex",
477
+ alignItems: "center",
478
+ height: "100%",
479
+ minWidth: 0,
480
+ width: "100%"
481
+ },
482
+ children: [/* @__PURE__ */ y("div", {
483
+ className: "shadcn-jsonforms-grid-cell-content",
484
+ style: {
485
+ flex: 1,
486
+ minWidth: 0
487
+ },
488
+ children: e
489
+ }), t && ((a = i.options) == null || (a = a.summary) == null ? void 0 : a.type) !== "Label" && r.type !== "object" && r.type !== "array" && /* @__PURE__ */ y(gi, {
490
+ local: !0,
491
+ errors: t,
492
+ path: n,
493
+ className: "shadcn-jsonforms-cell-error"
494
+ })]
495
+ });
496
+ }), Ti = (e) => /* @__PURE__ */ y(wi, Z(Z({}, e), {}, { uischema: e.uischema })), Ei = (e) => e != null && e !== "", Di = ({ clearable: e = !0, adornmentAware: t = !0, trailingControlSpace: n = 0, data: r, enabled: i, onClear: a, readonly: o }) => {
497
+ let s = B();
498
+ return !e || !i || o || !Ei(r) ? null : /* @__PURE__ */ y(u, {
499
+ "aria-label": s("control.clearValue"),
500
+ 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",
501
+ style: { insetInlineEnd: t ? `calc(0.25rem + var(--jf-end-adornment-space, 0px) + ${n}px)` : "0.25rem" },
502
+ onClick: (e) => {
503
+ e.stopPropagation(), a();
504
+ },
505
+ onMouseDown: (e) => e.preventDefault(),
506
+ onPointerDown: (e) => e.preventDefault(),
507
+ size: "icon",
508
+ title: s("control.clearValue"),
509
+ type: "button",
510
+ variant: "ghost",
511
+ children: /* @__PURE__ */ y(te, { className: "h-4 w-4" })
512
+ });
513
+ }, Oi = (e) => e === void 0 ? "" : String(e), Q = (e, t) => `shadcn-jsonforms-${e || t || "root"}`.replace(/[^a-zA-Z0-9_-]/g, "-"), $ = ({ id: e, label: t, required: n, description: r, errors: i, path: o = "", schema: s, children: c, config: l, uischema: u }) => {
514
+ var d, f, p;
515
+ let m = $e(), { errors: h, focused: g, onFocus: _, onBlur: v } = Ot({
516
+ errors: i,
517
+ path: o,
518
+ schema: s,
519
+ config: l == null ? m.config : l,
520
+ uischema: u
521
+ }), x = kt({
522
+ description: r,
523
+ errors: h,
524
+ config: l == null ? m.config : l,
525
+ uischema: u
526
+ }, g), S = a(Si), C = u == null ? void 0 : u.options, w = /* @__PURE__ */ y(At, {
527
+ schema: s,
528
+ options: C,
529
+ children: c
530
+ });
531
+ return S ? /* @__PURE__ */ y("div", {
532
+ className: "shadcn-jsonforms-cell",
533
+ title: h || void 0,
534
+ onFocusCapture: _,
535
+ onBlurCapture: v,
536
+ children: w
537
+ }) : /* @__PURE__ */ b("div", {
538
+ className: "shadcn-jsonforms-field",
539
+ onFocusCapture: _,
540
+ onBlurCapture: (e) => {
541
+ e.currentTarget.contains(e.relatedTarget) || v();
542
+ },
543
+ children: [
544
+ t && (u == null ? void 0 : u.label) !== !1 ? /* @__PURE__ */ b("label", {
545
+ className: "shadcn-jsonforms-label",
546
+ htmlFor: e,
547
+ children: [t, n && !((d = u == null || (f = u.options) == null ? void 0 : f.hideRequiredAsterisk) == null ? (p = l == null ? m.config : l) != null && p.hideRequiredAsterisk : d) ? /* @__PURE__ */ y("span", {
548
+ "aria-hidden": "true",
549
+ children: " *"
550
+ }) : null]
551
+ }) : null,
552
+ w,
553
+ x && !h ? /* @__PURE__ */ y("div", {
554
+ className: "shadcn-jsonforms-description",
555
+ children: x
556
+ }) : null,
557
+ h ? /* @__PURE__ */ y("div", {
558
+ id: `${e}-errors`,
559
+ role: "alert",
560
+ className: "shadcn-jsonforms-error",
561
+ children: h
562
+ }) : null
563
+ ]
564
+ });
565
+ }, ki = ({ data: e, schema: t, config: n, description: r, enabled: i, errors: a, handleChange: o, label: s, path: c, required: l, readonly: u, uischema: d, visible: f, type: p = "text", suggestions: m }) => {
566
+ var h, g, _, v, x, S, C;
567
+ let w = Dt(c), T = (e, t) => o(e, w && t === void 0 ? "" : t);
568
+ if (!f) return null;
569
+ let E = Q(c, s), D = (h = (g = d.options) == null ? void 0 : g.format) == null ? p : h;
570
+ return /* @__PURE__ */ y($, {
571
+ path: c,
572
+ schema: t,
573
+ config: n,
574
+ uischema: d,
575
+ id: E,
576
+ label: s,
577
+ required: l,
578
+ description: r,
579
+ errors: a,
580
+ children: /* @__PURE__ */ b("div", {
581
+ className: "group relative w-full",
582
+ children: [
583
+ /* @__PURE__ */ y(G, {
584
+ id: E,
585
+ className: "shadcn-jsonforms-input pr-10",
586
+ type: D,
587
+ maxLength: ((_ = (v = d.options) == null ? void 0 : v.restrict) == null ? n != null && n.restrict : _) ? t.maxLength : void 0,
588
+ disabled: !i || u,
589
+ "aria-invalid": !!a,
590
+ "aria-describedby": a ? `${E}-errors` : void 0,
591
+ list: m ? `${E}-suggestions` : void 0,
592
+ value: Oi(e),
593
+ onChange: (e) => T(c, e.currentTarget.value || void 0)
594
+ }),
595
+ m && /* @__PURE__ */ y("datalist", {
596
+ id: `${E}-suggestions`,
597
+ children: m.map((e) => /* @__PURE__ */ y("option", { value: e }, e))
598
+ }),
599
+ /* @__PURE__ */ y(Di, {
600
+ clearable: (x = (S = (C = d.options) == null ? void 0 : C.clearable) == null ? n == null ? void 0 : n.clearable : S) == null || x,
601
+ data: e,
602
+ enabled: i,
603
+ readonly: u,
604
+ onClear: () => T(c, void 0)
605
+ })
606
+ ]
607
+ })
608
+ });
609
+ }, Ai = (e) => {
610
+ var t, n, r;
611
+ let { config: i, data: a, enabled: o, handleChange: s, path: c, readonly: l, uischema: u, visible: d } = e, f = Dt(c), p = (e, t) => s(e, f && t === void 0 ? 0 : t);
612
+ if (!d) return null;
613
+ let m = Q(c, e.label);
614
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
615
+ id: m,
616
+ label: e.label,
617
+ required: e.required,
618
+ description: e.description,
619
+ errors: e.errors,
620
+ children: /* @__PURE__ */ b("div", {
621
+ className: "group relative w-full",
622
+ children: [/* @__PURE__ */ y(G, {
623
+ id: m,
624
+ className: "shadcn-jsonforms-input",
625
+ style: { paddingInlineEnd: 64 },
626
+ type: "number",
627
+ step: e.integer ? 1 : "any",
628
+ disabled: !o || l,
629
+ value: Oi(a),
630
+ onChange: (t) => {
631
+ let n = t.currentTarget.value;
632
+ p(c, n === "" ? void 0 : e.integer ? Math.trunc(Number(n)) : Number(n));
633
+ }
634
+ }), /* @__PURE__ */ y(Di, {
635
+ trailingControlSpace: 24,
636
+ clearable: (t = (n = (r = u.options) == null ? void 0 : r.clearable) == null ? i == null ? void 0 : i.clearable : n) == null || t,
637
+ data: a,
638
+ enabled: o,
639
+ readonly: l,
640
+ onClear: () => p(c, void 0)
641
+ })]
642
+ })
643
+ }));
644
+ }, ji = Y(6, he(Je("Control"), xt)), Mi = Y(6, he(Je("Control"), St)), Ni = (e, t) => {
645
+ let n = Tt(e, t), r = _t(n);
646
+ if (r) return r;
647
+ let i = n == null ? void 0 : n.oneOf;
648
+ return Array.isArray(i) && i.length > 0 && i.every((e) => e.const !== void 0) ? i.map((e) => {
649
+ var t;
650
+ return {
651
+ value: e.const,
652
+ label: (t = e.title) == null ? String(e.const) : t
653
+ };
654
+ }) : void 0;
655
+ }, Pi = Y(5, he(Je("Control"), Ke((e, t) => e.type === "array" && e.uniqueItems === !0 && Ni(e, t) !== void 0))), Fi = (e) => {
656
+ var t, n;
657
+ let [r, i] = l(""), [a, o] = l(""), s = B(), c = $e(), d = H();
658
+ if (!e.visible) return null;
659
+ let { schema: f, rootSchema: p, data: m, path: h, handleChange: g } = e, _ = Z(Z({}, e.config), e.uischema.options), x = _.variant === "chips", S = _.variant === "multi-select", C = vt(m), w = Ni(f, p), [T, E] = pt((t = c.core) == null ? {} : t), D = gt([...T == null ? [] : T, ...E == null ? [] : E], h, C.length), k = Tt(f, p), A = D.map((t, n) => {
660
+ var r, i;
661
+ return Ee(t, (r = (i = c.i18n) == null ? void 0 : i.translateError) == null ? Se : r, d, k, e.uischema, h ? `${h}.${n}` : String(n));
662
+ }), j = [e.errors, ...A.map((e, t) => e ? `${String(C[t])}: ${e}` : "")].filter(Boolean).join("\n"), N = {
663
+ minItems: f.minItems,
664
+ maxItems: f.maxItems,
665
+ restrict: _.restrict !== !1
666
+ }, P = !e.enabled || e.readonly, F = Q(h, e.label), I = (e) => {
667
+ var t, n;
668
+ return (t = w == null || (n = w.find((t) => Et(t.value, e))) == null ? void 0 : n.label) == null ? String(e) : t;
669
+ }, L = (e) => {
670
+ !P && bt(C, N) && g(h, wt(C, e));
671
+ }, R = (e) => {
672
+ !P && e !== "" && yt(C, N) && (!w || w.some((t) => Et(t.value, e))) && (g(h, ht(C, e, f.uniqueItems === !0)), i(""));
673
+ }, ee = [...w == null ? [] : w, ...C.filter((e) => !(w != null && w.some((t) => Et(t.value, e)))).map((e) => ({
674
+ value: e,
675
+ label: String(e)
676
+ }))], V = /* @__PURE__ */ y("div", {
677
+ className: _.vertical ? "flex flex-col gap-2" : "flex flex-wrap gap-3",
678
+ role: "group",
679
+ "aria-label": e.label,
680
+ children: ee.filter((e) => e.label.toLocaleLowerCase().includes(a.toLocaleLowerCase())).map((e, t) => {
681
+ let n = Ct(C, e.value);
682
+ return /* @__PURE__ */ b("label", {
683
+ className: "flex items-center gap-2",
684
+ children: [/* @__PURE__ */ y(lt, {
685
+ checked: n,
686
+ disabled: P || (n ? !bt(C, N) : !yt(C, N)),
687
+ onCheckedChange: () => n ? L(C.findIndex((t) => Et(t, e.value))) : R(e.value)
688
+ }), e.label]
689
+ }, t);
690
+ })
691
+ }), U = /* @__PURE__ */ y(v, { children: C.map((e, t) => /* @__PURE__ */ b("span", {
692
+ 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 ${A[t] ? "border-destructive" : "border-transparent"}`,
693
+ "aria-invalid": !!A[t],
694
+ title: A[t] || void 0,
695
+ children: [
696
+ /* @__PURE__ */ y("span", {
697
+ className: "min-w-0 truncate",
698
+ title: I(e),
699
+ children: I(e)
700
+ }),
701
+ A[t] ? /* @__PURE__ */ y(M, {
702
+ className: "h-3.5 w-3.5 text-destructive",
703
+ role: "img",
704
+ "aria-label": A[t]
705
+ }) : null,
706
+ /* @__PURE__ */ y(u, {
707
+ type: "button",
708
+ variant: "ghost",
709
+ size: "icon",
710
+ className: "h-4 w-4 shrink-0 rounded-sm p-0",
711
+ disabled: P || !bt(C, N),
712
+ "aria-label": s("composite.remove", { label: I(e) }),
713
+ onClick: () => L(t),
714
+ children: /* @__PURE__ */ y(te, { className: "h-3 w-3" })
715
+ })
716
+ ]
717
+ }, t)) });
718
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
719
+ id: F,
720
+ errors: j,
721
+ children: x ? /* @__PURE__ */ b("div", {
722
+ className: "flex min-w-0 flex-wrap items-center gap-2",
723
+ children: [
724
+ U,
725
+ /* @__PURE__ */ y(G, {
726
+ id: F,
727
+ className: "min-w-40 flex-1",
728
+ value: r,
729
+ list: w ? F + "-choices" : void 0,
730
+ disabled: P || !yt(C, N),
731
+ "aria-invalid": !!j,
732
+ placeholder: (n = _.placeholder) == null ? s("chips.addPlaceholder") : n,
733
+ onChange: (e) => i(e.target.value),
734
+ onKeyDown: (e) => {
735
+ e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), R(r));
736
+ }
737
+ }),
738
+ w && /* @__PURE__ */ y("datalist", {
739
+ id: F + "-choices",
740
+ children: w.map((e) => /* @__PURE__ */ y("option", {
741
+ value: String(e.value),
742
+ children: e.label
743
+ }, String(e.value)))
744
+ }),
745
+ /* @__PURE__ */ y(u, {
746
+ type: "button",
747
+ variant: "outline",
748
+ size: "icon",
749
+ disabled: P || !r || !yt(C, N),
750
+ "aria-label": s("tuple.add"),
751
+ onClick: () => R(r),
752
+ children: /* @__PURE__ */ y(z, { className: "h-4 w-4" })
753
+ })
754
+ ]
755
+ }) : S ? /* @__PURE__ */ b(ut, { children: [/* @__PURE__ */ b("div", {
756
+ 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",
757
+ children: [/* @__PURE__ */ y("div", {
758
+ className: "flex min-w-0 flex-1 flex-wrap gap-1 max-h-32 overflow-auto",
759
+ children: C.length ? U : /* @__PURE__ */ y("span", {
760
+ className: "text-sm text-muted-foreground",
761
+ children: _.placeholder || e.label
762
+ })
763
+ }), /* @__PURE__ */ y(ft, {
764
+ asChild: !0,
765
+ children: /* @__PURE__ */ y(u, {
766
+ id: F,
767
+ type: "button",
768
+ variant: "ghost",
769
+ size: "icon",
770
+ "aria-label": e.label,
771
+ disabled: P,
772
+ "aria-invalid": !!j,
773
+ className: "h-7 w-7 shrink-0",
774
+ children: /* @__PURE__ */ y(O, { className: "h-4 w-4" })
775
+ })
776
+ })]
777
+ }), /* @__PURE__ */ b(dt, { children: [/* @__PURE__ */ y(G, {
778
+ "aria-label": e.label,
779
+ value: a,
780
+ onChange: (e) => o(e.target.value)
781
+ }), /* @__PURE__ */ y("div", {
782
+ className: "max-h-64 overflow-auto py-2",
783
+ children: V
784
+ })] })] }) : V
785
+ }));
786
+ }, Ii = { marginBottom: 16 }, Li = X((e) => /* @__PURE__ */ y(Rt, Z(Z({}, e), {}, {
787
+ errorClassName: "text-destructive text-sm",
788
+ errorStyle: Ii
789
+ }))), Ri = he(Ve, Ge(Te("password"), We("format", "password"))), zi = Y(4, Ri), Bi = Y(5, he(Ri, We("variant", "otp"), Ke((e) => typeof e.minLength == "number" && typeof e.maxLength == "number" && e.maxLength > 0))), Vi = (e) => {
790
+ var t, n, r;
791
+ let [i, a] = l(!1), o = c([]), s = B();
792
+ if (!e.visible) return null;
793
+ let { data: d, path: f, label: p, schema: m, enabled: h, readonly: g, errors: _, handleChange: v, uischema: x, config: S } = e, C = Q(f, p), w = !h || g, T = typeof d == "string" ? d : "", E = e.segmented ? m.maxLength : 1, D = s(i ? "password.hide" : "password.show"), O = (e) => v(f, e || void 0), k = (e) => {
794
+ let t = o.current[Math.max(0, Math.min(E - 1, e))];
795
+ t == null || t.focus(), t == null || t.select();
796
+ }, A = (e, t) => {
797
+ let n = Math.min(e, T.length), r = (T.slice(0, n) + t + T.slice(n + t.length)).slice(0, E);
798
+ O(r), k(n + t.length);
799
+ };
800
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
801
+ id: C,
802
+ children: /* @__PURE__ */ b("div", {
803
+ className: e.segmented ? "group relative flex min-w-0 items-center gap-2" : "group relative min-w-0 w-full",
804
+ children: [
805
+ /* @__PURE__ */ y("div", {
806
+ role: e.segmented ? "group" : void 0,
807
+ "aria-label": e.segmented ? p : void 0,
808
+ className: `flex min-w-0 gap-1 overflow-x-auto${e.segmented ? "" : " w-full"}`,
809
+ children: Array.from({ length: E }, (t, n) => {
810
+ var r;
811
+ return /* @__PURE__ */ y(G, {
812
+ ref: (e) => {
813
+ o.current[n] = e;
814
+ },
815
+ id: n === 0 ? C : `${C}-${n}`,
816
+ className: e.segmented ? "w-10 shrink-0 px-1 text-center" : "shadcn-jsonforms-input pr-20",
817
+ type: i ? "text" : "password",
818
+ disabled: w,
819
+ "aria-label": e.segmented ? `${p || ""} ${n + 1} / ${E}` : void 0,
820
+ "aria-invalid": !!_,
821
+ "aria-describedby": _ ? `${C}-errors` : void 0,
822
+ autoComplete: e.segmented ? "one-time-code" : "current-password",
823
+ value: e.segmented ? (r = T[n]) == null ? "" : r : T,
824
+ onFocus: (t) => {
825
+ e.segmented && t.currentTarget.select();
826
+ },
827
+ onChange: (t) => {
828
+ let r = t.currentTarget.value;
829
+ e.segmented ? r ? A(n, r) : O(T.slice(0, n) + T.slice(n + 1)) : O(r);
830
+ },
831
+ onPaste: e.segmented ? (e) => {
832
+ e.preventDefault(), A(n, e.clipboardData.getData("text"));
833
+ } : void 0,
834
+ onKeyDown: e.segmented ? (e) => {
835
+ e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), k(n + (e.key === "ArrowLeft" ? -1 : 1))) : e.key === "Backspace" && !T[n] && n > 0 && (e.preventDefault(), O(T.slice(0, n - 1) + T.slice(n)), k(n - 1));
836
+ } : void 0
837
+ }, n);
838
+ })
839
+ }),
840
+ /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
841
+ asChild: !0,
842
+ children: /* @__PURE__ */ y(u, {
843
+ type: "button",
844
+ variant: "ghost",
845
+ size: "icon",
846
+ className: e.segmented ? "h-7 w-7 shrink-0" : "absolute inset-y-0 end-1 my-auto h-7 w-7",
847
+ disabled: w,
848
+ "aria-label": D,
849
+ onMouseDown: (e) => e.preventDefault(),
850
+ onClick: () => a((e) => !e),
851
+ children: y(i ? P : F, { className: "h-4 w-4" })
852
+ })
853
+ }), /* @__PURE__ */ y(W, { children: D })] }) }),
854
+ /* @__PURE__ */ y("div", {
855
+ className: e.segmented ? "relative h-10 w-10 shrink-0" : "absolute inset-y-0 end-11 my-auto h-9 w-9",
856
+ children: /* @__PURE__ */ y(Di, {
857
+ adornmentAware: !1,
858
+ clearable: (t = (n = (r = x.options) == null ? void 0 : r.clearable) == null ? S == null ? void 0 : S.clearable : n) == null || t,
859
+ data: d,
860
+ enabled: h,
861
+ readonly: g,
862
+ onClear: () => O("")
863
+ })
864
+ })
865
+ ]
866
+ })
867
+ }));
868
+ }, Hi = (e) => /* @__PURE__ */ y(Vi, Z(Z({}, e), {}, { segmented: !0 })), Ui = ({ open: e, onCancel: t, onConfirm: n }) => {
869
+ let r = B();
870
+ return /* @__PURE__ */ y(d, {
871
+ open: e,
872
+ onOpenChange: (e) => !e && t(),
873
+ children: /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ b(h, { children: [/* @__PURE__ */ y(g, { children: r("confirm.delete.title") }), /* @__PURE__ */ y(p, { children: r("confirm.delete.message") })] }), /* @__PURE__ */ b(m, { children: [/* @__PURE__ */ y(u, {
874
+ type: "button",
875
+ variant: "outline",
876
+ onClick: t,
877
+ children: r("confirm.decline")
878
+ }), /* @__PURE__ */ y(u, {
879
+ type: "button",
880
+ variant: "destructive",
881
+ onClick: n,
882
+ children: r("confirm.accept")
883
+ })] })] })
884
+ });
885
+ }, Wi = ({ page: e }) => {
886
+ let t = B();
887
+ return !e.enabled || !e.total ? null : /* @__PURE__ */ y("div", {
888
+ "data-collection-footer": !0,
889
+ className: "border-t py-3",
890
+ children: /* @__PURE__ */ b(Kt, {
891
+ "aria-label": t("collection.pagination"),
892
+ className: "flex flex-wrap items-center justify-end gap-2",
893
+ children: [/* @__PURE__ */ b(K, {
894
+ value: String(e.size),
895
+ onValueChange: (t) => e.change(e.current, Number(t)),
896
+ children: [/* @__PURE__ */ y(ie, {
897
+ "aria-label": t("collection.pageSize"),
898
+ className: "w-20",
899
+ children: /* @__PURE__ */ y(ae, {})
900
+ }), /* @__PURE__ */ y(q, { children: e.choices.map((e) => /* @__PURE__ */ y(J, {
901
+ value: String(e),
902
+ children: e
903
+ }, e)) })]
904
+ }), /* @__PURE__ */ b(qt, { children: [
905
+ /* @__PURE__ */ y(Jt, { children: /* @__PURE__ */ y(u, {
906
+ type: "button",
907
+ variant: "outline",
908
+ size: "icon-sm",
909
+ "aria-label": t("collection.previous"),
910
+ disabled: e.current === 1,
911
+ onClick: () => e.change(e.current - 1),
912
+ children: /* @__PURE__ */ y(k, {})
913
+ }) }),
914
+ /* @__PURE__ */ y(Jt, { children: /* @__PURE__ */ b("span", {
915
+ "aria-live": "polite",
916
+ children: [
917
+ e.current,
918
+ " / ",
919
+ e.pages
920
+ ]
921
+ }) }),
922
+ /* @__PURE__ */ y(Jt, { children: /* @__PURE__ */ y(u, {
923
+ type: "button",
924
+ variant: "outline",
925
+ size: "icon-sm",
926
+ "aria-label": t("collection.next"),
927
+ disabled: e.current === e.pages,
928
+ onClick: () => e.change(e.current + 1),
929
+ children: /* @__PURE__ */ y(A, {})
930
+ }) })
931
+ ] })]
932
+ })
933
+ });
934
+ }, Gi = (e) => {
935
+ let { renderItem: t, positionLabel: n } = e, { t: r, message: i, canAdd: a, canDelete: o, add: s, deletion: c, visibleIndices: l, page: d } = Wt(e);
936
+ return /* @__PURE__ */ b("section", {
937
+ "data-tuple-additional": !0,
938
+ style: {
939
+ marginTop: 16,
940
+ paddingTop: 12,
941
+ borderTop: "1px solid var(--border)"
942
+ },
943
+ children: [
944
+ /* @__PURE__ */ y(Ui, {
945
+ open: c.confirming,
946
+ onCancel: c.cancel,
947
+ onConfirm: c.confirm
948
+ }),
949
+ /* @__PURE__ */ b("header", {
950
+ style: {
951
+ display: "flex",
952
+ alignItems: "center",
953
+ justifyContent: "space-between",
954
+ gap: 8,
955
+ marginBottom: 8
956
+ },
957
+ children: [/* @__PURE__ */ y("strong", { children: r("tuple.additionalItems") }), /* @__PURE__ */ y(u, {
958
+ size: "icon-sm",
959
+ type: "button",
960
+ variant: "ghost",
961
+ disabled: !a,
962
+ onClick: s,
963
+ title: r("tuple.add"),
964
+ "aria-label": r("tuple.add"),
965
+ "data-tuple-add": !0,
966
+ children: /* @__PURE__ */ y(z, { className: "h-4 w-4" })
967
+ })]
968
+ }),
969
+ /* @__PURE__ */ y(Gt, {
970
+ changes: d.pending,
971
+ children: l.map((e) => /* @__PURE__ */ b("div", {
972
+ style: {
973
+ display: "flex",
974
+ alignItems: "flex-start",
975
+ gap: 8,
976
+ marginBottom: 8
977
+ },
978
+ children: [/* @__PURE__ */ y("div", {
979
+ style: {
980
+ flex: 1,
981
+ minWidth: 0
982
+ },
983
+ children: t(e)
984
+ }), /* @__PURE__ */ y(u, {
985
+ size: "icon-sm",
986
+ type: "button",
987
+ variant: "ghost",
988
+ className: "text-destructive",
989
+ disabled: !o,
990
+ onClick: () => c.request(e),
991
+ title: r("tuple.delete", { label: n(e) }),
992
+ "aria-label": r("tuple.delete", { label: n(e) }),
993
+ "data-tuple-delete": e,
994
+ children: /* @__PURE__ */ y(ee, { className: "h-4 w-4" })
995
+ })]
996
+ }, e))
997
+ }),
998
+ /* @__PURE__ */ y(Wi, { page: d }),
999
+ i && /* @__PURE__ */ y("span", {
1000
+ className: "text-destructive",
1001
+ role: "alert",
1002
+ "data-tuple-draft": !0,
1003
+ children: i
1004
+ })
1005
+ ]
1006
+ });
1007
+ };
1008
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js
1009
+ function Ki(e, t) {
1010
+ if (e == null) return {};
1011
+ var n = {};
1012
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1013
+ if (t.includes(r)) continue;
1014
+ n[r] = e[r];
1015
+ }
1016
+ return n;
1017
+ }
1018
+ // \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutProperties.js
1019
+ function qi(e, t) {
1020
+ if (e == null) return {};
1021
+ var n, r, i = Ki(e, t);
1022
+ if (Object.getOwnPropertySymbols) {
1023
+ var a = Object.getOwnPropertySymbols(e);
1024
+ for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
1025
+ }
1026
+ return i;
1027
+ }
1028
+ // src/components/ScrollRegion.tsx
1029
+ var Ji = [
1030
+ "children",
1031
+ "style",
1032
+ "className"
1033
+ ], Yi = (e) => {
1034
+ let { children: t, style: n, className: r = "" } = e, i = qi(e, Ji);
1035
+ return /* @__PURE__ */ b(Qt, Z(Z({}, i), {}, {
1036
+ type: "auto",
1037
+ className: "shadcn-jsonforms-scroll-region " + r,
1038
+ style: Z({
1039
+ display: "flex",
1040
+ flexDirection: "column",
1041
+ minWidth: 0,
1042
+ minHeight: 0,
1043
+ overflow: "hidden"
1044
+ }, n),
1045
+ children: [t, /* @__PURE__ */ y($t, { orientation: "horizontal" })]
1046
+ }));
1047
+ }, Xi = [
1048
+ "options",
1049
+ "open",
1050
+ "children"
1051
+ ], Zi = (e) => {
1052
+ var t;
1053
+ let { options: r = {}, open: i, children: a } = e, o = qi(e, Xi), s = en(i, r), c = H(), l = s.maximized ? c("dialog.restore", "Restore dialog") : c("dialog.maximize", "Maximize dialog"), d = n.Children.toArray(a);
1054
+ return /* @__PURE__ */ b(f, Z(Z({}, o), {}, {
1055
+ tabIndex: -1,
1056
+ style: Z(Z(Z({}, o.style), s.style), {}, {
1057
+ width: (t = s.style.width) == null ? 640 : t,
1058
+ display: "flex",
1059
+ flexDirection: "column",
1060
+ overflow: "hidden",
1061
+ transitionProperty: "none",
1062
+ left: `calc(50% + ${s.offset.x}px)`,
1063
+ top: `calc(50% + ${s.offset.y}px)`,
1064
+ translate: "-50% -50%",
1065
+ transform: "none"
1066
+ }),
1067
+ onOpenAutoFocus: (e) => {
1068
+ e.preventDefault(), e.target.focus();
1069
+ },
1070
+ children: [
1071
+ s.options.maximizable !== !1 && /* @__PURE__ */ y(u, {
1072
+ type: "button",
1073
+ variant: "ghost",
1074
+ size: "icon-sm",
1075
+ className: "absolute right-10 top-2",
1076
+ "aria-label": l,
1077
+ title: l,
1078
+ onClick: s.toggle,
1079
+ children: s.maximized ? /* @__PURE__ */ y(L, {}) : /* @__PURE__ */ y(I, {})
1080
+ }),
1081
+ /* @__PURE__ */ y("div", Z(Z({}, s.dragProps), {}, {
1082
+ style: Z(Z({}, s.dragProps.style), {}, { flexShrink: 0 }),
1083
+ className: "min-w-0 pr-16",
1084
+ children: d[0]
1085
+ })),
1086
+ /* @__PURE__ */ y(Yi, {
1087
+ "data-detail-dialog-body": !0,
1088
+ style: {
1089
+ flex: "1 1 auto",
1090
+ minHeight: 0
1091
+ },
1092
+ children: d.slice(1, -1)
1093
+ }),
1094
+ /* @__PURE__ */ y("div", {
1095
+ "data-detail-dialog-footer": !0,
1096
+ style: {
1097
+ flexShrink: 0,
1098
+ display: "flex",
1099
+ justifyContent: "flex-end"
1100
+ },
1101
+ children: d[d.length - 1]
1102
+ })
1103
+ ]
1104
+ }));
1105
+ }, Qi = (e) => {
1106
+ let { open: t, title: n, label: r, options: i, t: a, children: o } = e, s = Zt(e);
1107
+ return /* @__PURE__ */ y(d, {
1108
+ open: t,
1109
+ onOpenChange: (e) => {
1110
+ e || s.cancel();
1111
+ },
1112
+ children: /* @__PURE__ */ b(Zi, {
1113
+ open: t,
1114
+ options: i.dialog,
1115
+ className: "max-w-2xl",
1116
+ "aria-label": r,
1117
+ "aria-describedby": void 0,
1118
+ children: [
1119
+ /* @__PURE__ */ y(h, { children: /* @__PURE__ */ y(g, { children: n }) }),
1120
+ /* @__PURE__ */ y(Ze.Provider, {
1121
+ value: s.context,
1122
+ children: /* @__PURE__ */ y(Gt, {
1123
+ changes: s.pending,
1124
+ children: /* @__PURE__ */ y(Si.Provider, {
1125
+ value: !1,
1126
+ children: /* @__PURE__ */ y("div", {
1127
+ className: "p-1",
1128
+ children: o
1129
+ })
1130
+ })
1131
+ })
1132
+ }),
1133
+ s.conflicted && /* @__PURE__ */ y("p", {
1134
+ role: "alert",
1135
+ children: a("composite.applyConflict", s.defaultMessage("composite.applyConflict"))
1136
+ }),
1137
+ /* @__PURE__ */ b(m, { children: [
1138
+ i.showEmptyButton === !0 && /* @__PURE__ */ y(u, {
1139
+ type: "button",
1140
+ variant: "outline",
1141
+ disabled: !s.canEmpty,
1142
+ onClick: s.clear,
1143
+ children: s.buttonLabel(i.emptyLabel, "composite.empty")
1144
+ }),
1145
+ /* @__PURE__ */ y(u, {
1146
+ type: "button",
1147
+ variant: "outline",
1148
+ onClick: s.cancel,
1149
+ children: s.buttonLabel(i.cancelLabel, "composite.cancel")
1150
+ }),
1151
+ /* @__PURE__ */ y(u, {
1152
+ type: "button",
1153
+ disabled: !s.canApply,
1154
+ onClick: s.apply,
1155
+ children: s.buttonLabel(i.okLabel, "composite.apply")
1156
+ })
1157
+ ] })
1158
+ ]
1159
+ })
1160
+ });
1161
+ };
1162
+ // src/complex/TupleField.tsx
1163
+ function $i(e) {
1164
+ return /* @__PURE__ */ y(Yt, Z(Z({}, e), {}, {
1165
+ CompositeDetailDialog: Qi,
1166
+ gap: 8,
1167
+ legendStyle: {
1168
+ marginBottom: 4,
1169
+ fontSize: 14,
1170
+ color: "inherit"
1171
+ },
1172
+ renderEditButton: (e, t, n) => /* @__PURE__ */ y(u, {
1173
+ size: "icon-sm",
1174
+ type: "button",
1175
+ variant: "ghost",
1176
+ disabled: t,
1177
+ onClick: n,
1178
+ title: e,
1179
+ "aria-label": e,
1180
+ children: /* @__PURE__ */ y(R, { className: "h-4 w-4" })
1181
+ }),
1182
+ renderError: (e, t) => /* @__PURE__ */ y("span", {
1183
+ className: "text-destructive",
1184
+ role: "alert",
1185
+ "data-tuple-draft": t || void 0,
1186
+ children: e
1187
+ })
1188
+ }));
1189
+ }
1190
+ // src/complex/TupleControlRenderer.tsx
1191
+ var ea = Ut, ta = (e) => {
1192
+ let { label: t, required: n, visible: r } = e, i = Bt(e), { options: a, shownErrors: o } = i;
1193
+ if (!r) return null;
1194
+ let s = /* @__PURE__ */ y(Vt, {
1195
+ props: e,
1196
+ model: i,
1197
+ TupleField: $i,
1198
+ TupleAdditionalItems: Gi,
1199
+ gap: 16,
1200
+ diagnostic: (e) => /* @__PURE__ */ y("span", {
1201
+ className: "text-destructive",
1202
+ role: "alert",
1203
+ "data-tuple-diagnostic": !0,
1204
+ children: e
1205
+ })
1206
+ });
1207
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
1208
+ id: e.id,
1209
+ label: t,
1210
+ required: n,
1211
+ errors: o || void 0,
1212
+ children: a.showBorder === !1 ? /* @__PURE__ */ y("div", {
1213
+ "data-tuple-control": !0,
1214
+ children: s
1215
+ }) : /* @__PURE__ */ y("div", {
1216
+ "data-tuple-control": !0,
1217
+ className: "rounded-md border p-3",
1218
+ children: s
1219
+ })
1220
+ }));
1221
+ }, na = Ht(ta), ra = Y(5, he(Je("Control"), Ke((e) => {
1222
+ let t = e.anyOf;
1223
+ return Array.isArray(t) && t.every((e) => (!e.type || e.type === "string") && (!e.enum || e.enum.every((e) => typeof e == "string"))) && t.some((e) => e.type === "string" && !e.enum) && t.some((e) => Array.isArray(e.enum));
1224
+ }))), ia = (e) => {
1225
+ var t;
1226
+ return /* @__PURE__ */ y(ki, Z(Z({}, e), {}, { suggestions: Array.from(new Set(((t = e.schema.anyOf) == null ? [] : t).flatMap((e) => {
1227
+ var t;
1228
+ return (t = e.enum) == null ? [] : t;
1229
+ }).filter((e) => typeof e == "string"))) }));
1230
+ }, aa = ({ text: e, visible: t }) => t ? /* @__PURE__ */ y("div", {
1231
+ className: "shadcn-jsonforms-static-label",
1232
+ children: e
1233
+ }) : null, oa = Y(1, Je("Label")), sa = (e) => {
1234
+ let { embedded: t = !1, cells: n, data: r, enabled: i, handleChange: a, label: o, path: s, readonly: c, renderers: _, rootSchema: x, schema: S } = e, [C, w] = l(""), [T, E] = l(null), [D, O] = l(""), k = sn(e), { objectSchema: A, appliedOptions: j, objectData: M, page: N, additionalPropertyItems: P, shouldShow: F } = k, I = typeof A.additionalProperties == "object" && typeof A.additionalProperties.title == "string" ? A.additionalProperties.title : void 0, L = B(), te = Ft(), V = (e, t, n, r, i) => {
1235
+ var a;
1236
+ let o = dn({
1237
+ name: e,
1238
+ data: t,
1239
+ schema: n,
1240
+ rootSchema: r,
1241
+ currentName: i,
1242
+ allowEmptyName: j.allowEmptyPropertyNames === !0
1243
+ });
1244
+ return (a = te(o.errors)) == null ? o.error ? L(o.error === "already-defined" ? "additionalProperties.nameTaken" : o.error === "required" ? "additionalProperties.nameRequired" : "additionalProperties.nameInvalid", { name: e }) : void 0 : a;
1245
+ }, H = C, U = V(H, r, S, x), { addPropertyDisabled: W, removePropertyDisabled: ne, deletion: re, addProperty: K, removeProperty: q } = on(e, k, {
1246
+ restrict: !!j.restrict,
1247
+ propertyName: H,
1248
+ propertyNameError: U,
1249
+ setNewPropertyName: w
1250
+ }), J = (e) => {
1251
+ let t = D, n = V(t, r, S, x, e);
1252
+ if (t === e) {
1253
+ E(null), O("");
1254
+ return;
1255
+ }
1256
+ if (n || !M) return;
1257
+ let i = nn(M, e, t);
1258
+ a(s, i), E(null), O("");
1259
+ }, ie = () => {
1260
+ E(null), O("");
1261
+ }, ae = T ? V(D, r, S, x, T) : void 0, oe = !i || c || !!ae, se = Nt(s), ce = Lt(s);
1262
+ return F ? /* @__PURE__ */ y(Gt, {
1263
+ changes: N.pending,
1264
+ children: /* @__PURE__ */ b(v, { children: [
1265
+ /* @__PURE__ */ y(Ui, {
1266
+ open: re.confirming,
1267
+ onCancel: re.cancel,
1268
+ onConfirm: re.confirm
1269
+ }),
1270
+ /* @__PURE__ */ b(fn, {
1271
+ className: "jsonforms-additional-properties my-1 min-w-full",
1272
+ style: t ? {
1273
+ border: 0,
1274
+ boxShadow: "none",
1275
+ padding: 0,
1276
+ margin: 0
1277
+ } : void 0,
1278
+ children: [
1279
+ /* @__PURE__ */ y("div", {
1280
+ className: t ? "py-2" : "px-4 py-2",
1281
+ children: /* @__PURE__ */ b("div", {
1282
+ className: "flex flex-col gap-2 md:flex-row md:gap-4",
1283
+ children: [I ? /* @__PURE__ */ y("div", {
1284
+ className: "md:flex md:h-10 md:items-center md:pt-6",
1285
+ children: /* @__PURE__ */ b("span", {
1286
+ className: "text-sm text-foreground",
1287
+ children: [I, se && /* @__PURE__ */ y(gi, {
1288
+ local: !0,
1289
+ errors: se
1290
+ })]
1291
+ })
1292
+ }) : null, /* @__PURE__ */ b("div", {
1293
+ className: "min-w-0 flex-1",
1294
+ children: [
1295
+ /* @__PURE__ */ y("label", {
1296
+ className: "mb-1 block text-sm font-medium text-foreground",
1297
+ htmlFor: "shadcn-additional-property-name",
1298
+ children: L("additionalProperties.namePlaceholder")
1299
+ }),
1300
+ /* @__PURE__ */ b("div", {
1301
+ className: "relative pr-12",
1302
+ children: [/* @__PURE__ */ y(G, {
1303
+ id: "shadcn-additional-property-name",
1304
+ className: "shadcn-jsonforms-input",
1305
+ "aria-label": o ? L("additionalProperties.addTo", { label: o }) : L("additionalProperties.add"),
1306
+ "aria-invalid": C !== "" && !!U,
1307
+ disabled: !i || c,
1308
+ type: "text",
1309
+ value: C,
1310
+ onChange: (e) => w(e.currentTarget.value),
1311
+ onKeyDown: (e) => {
1312
+ e.key === "Enter" && K();
1313
+ }
1314
+ }), /* @__PURE__ */ y(u, {
1315
+ className: "absolute right-0 top-0 h-10 w-10 shrink-0",
1316
+ disabled: W,
1317
+ size: "icon",
1318
+ type: "button",
1319
+ "aria-label": L("additionalProperties.add"),
1320
+ title: L("additionalProperties.add"),
1321
+ onClick: K,
1322
+ children: /* @__PURE__ */ y(z, { className: "h-4 w-4" })
1323
+ })]
1324
+ }),
1325
+ C !== "" && U ? /* @__PURE__ */ y("div", {
1326
+ className: "jsonforms-additional-properties-error mt-1 text-sm text-destructive",
1327
+ role: "alert",
1328
+ children: U
1329
+ }) : null
1330
+ ]
1331
+ })]
1332
+ })
1333
+ }),
1334
+ /* @__PURE__ */ y("div", {
1335
+ className: `jsonforms-additional-properties-list flex flex-col gap-2${t ? "" : " px-4"}`,
1336
+ children: N.indices.map((e) => P[e]).map((e) => /* @__PURE__ */ b("div", {
1337
+ className: "jsonforms-additional-property relative",
1338
+ children: [/* @__PURE__ */ b("div", {
1339
+ className: "flex min-h-6 items-center justify-between gap-2 mb-2",
1340
+ children: [/* @__PURE__ */ b("span", {
1341
+ "data-property-name-label": e.propertyName,
1342
+ className: `inline-flex min-w-0 items-center gap-1 text-sm font-medium ${ce.has(e.propertyName) ? "text-destructive" : ""}`,
1343
+ children: [/* @__PURE__ */ y("span", {
1344
+ className: "min-w-0 break-all",
1345
+ children: e.propertyName || "\xA0"
1346
+ }), ce.get(e.propertyName) && /* @__PURE__ */ y(gi, {
1347
+ local: !0,
1348
+ errors: ce.get(e.propertyName)
1349
+ })]
1350
+ }), i ? /* @__PURE__ */ b("div", {
1351
+ className: "jsonforms-additional-property-actions flex shrink-0 items-center gap-0.5",
1352
+ children: [/* @__PURE__ */ y(u, {
1353
+ className: "h-6 w-6 text-muted-foreground [&_svg]:size-3",
1354
+ variant: "ghost",
1355
+ size: "icon",
1356
+ disabled: c,
1357
+ type: "button",
1358
+ "aria-label": L("additionalProperties.renameNamed", { name: e.propertyName }),
1359
+ title: L("additionalProperties.renameNamed", { name: e.propertyName }),
1360
+ onClick: () => {
1361
+ E(e.propertyName), O(e.propertyName);
1362
+ },
1363
+ children: /* @__PURE__ */ y(R, { className: "h-4 w-4" })
1364
+ }), /* @__PURE__ */ y(u, {
1365
+ className: "h-6 w-6 bg-destructive/10 text-destructive hover:bg-destructive/20 [&_svg]:size-3",
1366
+ variant: "destructive",
1367
+ size: "icon",
1368
+ disabled: ne,
1369
+ type: "button",
1370
+ "aria-label": L("additionalProperties.deleteNamed", { name: e.propertyName }),
1371
+ title: L("additionalProperties.deleteNamed", { name: e.propertyName }),
1372
+ onClick: () => q(e.propertyName),
1373
+ children: /* @__PURE__ */ y(ee, { className: "h-4 w-4" })
1374
+ })]
1375
+ }) : null]
1376
+ }), /* @__PURE__ */ y("div", {
1377
+ className: "jsonforms-additional-property-control min-w-0",
1378
+ children: un(e.propertyName) ? /* @__PURE__ */ y(v, { children: /* @__PURE__ */ y(cn, {
1379
+ value: M == null ? void 0 : M[e.propertyName],
1380
+ schema: tn(e.schema, x),
1381
+ uischema: {
1382
+ type: "Control",
1383
+ scope: "#",
1384
+ label: !1
1385
+ },
1386
+ enabled: !!i,
1387
+ readonly: c,
1388
+ renderers: _,
1389
+ cells: n,
1390
+ onChange: (t) => a(s, ln(Z({}, M), e.propertyName, t === void 0 ? an(e.schema, x, M == null ? void 0 : M[e.propertyName]) : t))
1391
+ }) }) : /* @__PURE__ */ y(rn, {
1392
+ path: e.path,
1393
+ schema: e.schema,
1394
+ rootSchema: x,
1395
+ children: /* @__PURE__ */ y(Qe, {
1396
+ schema: e.schema,
1397
+ uischema: Z(Z({}, e.uischema), {}, { label: !1 }),
1398
+ path: e.path,
1399
+ enabled: i,
1400
+ renderers: _,
1401
+ cells: n,
1402
+ readonly: c
1403
+ })
1404
+ })
1405
+ })]
1406
+ }, e.propertyName))
1407
+ }),
1408
+ /* @__PURE__ */ y("div", {
1409
+ className: t ? void 0 : "px-4 pb-4",
1410
+ children: /* @__PURE__ */ y(Wi, { page: N })
1411
+ })
1412
+ ]
1413
+ }),
1414
+ /* @__PURE__ */ y(d, {
1415
+ open: T !== null,
1416
+ onOpenChange: (e) => {
1417
+ e || ie();
1418
+ },
1419
+ children: /* @__PURE__ */ b(f, {
1420
+ className: "max-w-sm",
1421
+ children: [/* @__PURE__ */ b(h, { children: [/* @__PURE__ */ y(g, { children: L("additionalProperties.renameTitle") }), /* @__PURE__ */ y(p, { children: L("additionalProperties.renameDialogDescription") })] }), /* @__PURE__ */ b("form", {
1422
+ onSubmit: (e) => {
1423
+ e.preventDefault(), T && J(T);
1424
+ },
1425
+ children: [
1426
+ /* @__PURE__ */ y("label", {
1427
+ className: "mb-2 block text-sm font-medium",
1428
+ htmlFor: "shadcn-rename-property",
1429
+ children: L("additionalProperties.renamePropertyNameLabel")
1430
+ }),
1431
+ /* @__PURE__ */ y(G, {
1432
+ id: "shadcn-rename-property",
1433
+ autoFocus: !0,
1434
+ disabled: c,
1435
+ value: D,
1436
+ "aria-invalid": !!ae,
1437
+ onChange: (e) => O(e.currentTarget.value)
1438
+ }),
1439
+ ae ? /* @__PURE__ */ y("p", {
1440
+ className: "mt-2 text-sm text-destructive",
1441
+ role: "alert",
1442
+ children: ae
1443
+ }) : null,
1444
+ /* @__PURE__ */ b(m, {
1445
+ className: "mt-4",
1446
+ children: [/* @__PURE__ */ y(u, {
1447
+ type: "button",
1448
+ variant: "outline",
1449
+ onClick: ie,
1450
+ children: L("combinator.cancel")
1451
+ }), /* @__PURE__ */ y(u, {
1452
+ type: "submit",
1453
+ disabled: oe,
1454
+ children: L("additionalProperties.renameConfirm")
1455
+ })]
1456
+ })
1457
+ ]
1458
+ })]
1459
+ })
1460
+ })
1461
+ ] })
1462
+ }) : null;
1463
+ }, ca = ({ open: e, onCancel: t, onConfirm: n }) => {
1464
+ let r = B();
1465
+ return /* @__PURE__ */ y(d, {
1466
+ open: e,
1467
+ onOpenChange: (e) => !e && t(),
1468
+ children: /* @__PURE__ */ b(f, { children: [/* @__PURE__ */ b(h, { children: [/* @__PURE__ */ y(g, { children: r("combinator.clearTitle") }), /* @__PURE__ */ y(p, { children: r("combinator.clearMessage") })] }), /* @__PURE__ */ b(m, { children: [/* @__PURE__ */ y(u, {
1469
+ type: "button",
1470
+ variant: "outline",
1471
+ onClick: t,
1472
+ children: r("confirm.decline")
1473
+ }), /* @__PURE__ */ y(u, {
1474
+ type: "button",
1475
+ onClick: n,
1476
+ children: r("confirm.accept")
1477
+ })] })] })
1478
+ });
1479
+ }, la = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0, ua = ({ handleChange: e, schema: t, rootSchema: n, indexOfFittingSchema: r, visible: a, path: o, renderers: c, cells: d, uischema: f, uischemas: p, data: m, enabled: h, label: g, config: _, combinator: x = "anyOf" }) => {
1480
+ var S, C;
1481
+ let w = $e();
1482
+ r = (S = xn(t, n, x, m)) == null ? r : S;
1483
+ let T = s(), [E, D] = l((C = r) == null ? x === "oneOf" && la(m) ? -1 : 0 : C), [O, k] = l(!1), A = si(), [j, M] = l(), [N, P] = l({
1484
+ initialized: !1,
1485
+ data: m,
1486
+ indexOfFittingSchema: r,
1487
+ combinator: x
1488
+ });
1489
+ N.initialized && N.data === m && N.indexOfFittingSchema === r && N.combinator === x || (P({
1490
+ initialized: !0,
1491
+ data: m,
1492
+ indexOfFittingSchema: r,
1493
+ combinator: x
1494
+ }), x === "oneOf" && Mn(m, r) ? (k(!1), D(-1), M(void 0)) : !O && r != null && r >= 0 && D(r));
1495
+ let { translate: F, selectionError: I, renderInfos: L } = bn({
1496
+ schema: t,
1497
+ rootSchema: n,
1498
+ uischema: f,
1499
+ path: o,
1500
+ uischemas: p
1501
+ }, x, w.core), R = i((t, r) => {
1502
+ r && e(o, xe(L[t].schema, n)), k(!0), D(t);
1503
+ }, [
1504
+ e,
1505
+ o,
1506
+ L,
1507
+ n
1508
+ ]), z = (r) => {
1509
+ let i = r === "" ? -1 : Number(r);
1510
+ if (h === !1 || i === E) return;
1511
+ if (x === "oneOf") {
1512
+ A.request({
1513
+ catalogId: "oneOf",
1514
+ operation: "branchChange",
1515
+ config: _,
1516
+ options: f.options,
1517
+ discarded: [jn(m, t)],
1518
+ perform: () => {
1519
+ var r;
1520
+ e(o, kn(m, i < 0 ? An(Cn((r = w.core) == null ? void 0 : r.data, o), L.map((e) => e.schema)) : xe(L[i].schema, n), t)), k(!0), D(i);
1521
+ }
1522
+ });
1523
+ return;
1524
+ }
1525
+ let a = xe(L[i].schema, n);
1526
+ la(m) || typeof m == typeof a ? R(i, !1) : M(i);
1527
+ };
1528
+ if (!a) return null;
1529
+ if (L.length === 1) {
1530
+ let e = L[0];
1531
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(Rn, {
1532
+ schema: t,
1533
+ combinatorKeyword: x,
1534
+ path: o,
1535
+ rootSchema: n
1536
+ }), /* @__PURE__ */ y(Nn, {
1537
+ options: f.options,
1538
+ schema: e.schema,
1539
+ path: o,
1540
+ children: /* @__PURE__ */ y(Qe, {
1541
+ schema: e.schema,
1542
+ uischema: e.uischema,
1543
+ path: o,
1544
+ renderers: c,
1545
+ cells: d,
1546
+ enabled: h
1547
+ })
1548
+ })] });
1549
+ }
1550
+ return /* @__PURE__ */ b("div", {
1551
+ className: "shadcn-jsonforms-combinator",
1552
+ children: [
1553
+ /* @__PURE__ */ y(Rn, {
1554
+ schema: t,
1555
+ combinatorKeyword: x,
1556
+ path: o,
1557
+ rootSchema: n
1558
+ }),
1559
+ x === "oneOf" ? /* @__PURE__ */ b(v, { children: [
1560
+ g && /* @__PURE__ */ y("label", {
1561
+ htmlFor: T,
1562
+ className: "mb-2 block text-sm font-medium",
1563
+ children: g
1564
+ }),
1565
+ /* @__PURE__ */ b("div", {
1566
+ className: "relative w-full",
1567
+ children: [/* @__PURE__ */ b(K, {
1568
+ value: E >= 0 ? String(E) : "",
1569
+ disabled: h === !1,
1570
+ onValueChange: z,
1571
+ children: [/* @__PURE__ */ y(ie, {
1572
+ className: E >= 0 ? "w-full pe-16" : "w-full",
1573
+ id: T,
1574
+ "aria-invalid": !!I,
1575
+ "aria-describedby": I ? T + "-error" : void 0,
1576
+ "aria-label": g || t.title || "oneOf",
1577
+ children: /* @__PURE__ */ y(ae, {})
1578
+ }), /* @__PURE__ */ y(q, { children: L.map((e, t) => /* @__PURE__ */ y(J, {
1579
+ value: String(t),
1580
+ children: e.label
1581
+ }, t)) })]
1582
+ }), E >= 0 && /* @__PURE__ */ y(u, {
1583
+ type: "button",
1584
+ variant: "ghost",
1585
+ size: "icon",
1586
+ className: "absolute end-8 top-1/2 size-7 -translate-y-1/2",
1587
+ "aria-label": F("oneOf.clear", "Clear selection"),
1588
+ title: F("oneOf.clear", "Clear selection"),
1589
+ disabled: h === !1,
1590
+ onClick: () => z(""),
1591
+ children: /* @__PURE__ */ y(te, {
1592
+ className: "size-4",
1593
+ "aria-hidden": "true"
1594
+ })
1595
+ })]
1596
+ }),
1597
+ I && /* @__PURE__ */ y("p", {
1598
+ id: T + "-error",
1599
+ role: "alert",
1600
+ className: "text-sm text-destructive",
1601
+ children: I
1602
+ }),
1603
+ L[E] && /* @__PURE__ */ y(Nn, {
1604
+ options: f.options,
1605
+ schema: L[E].schema,
1606
+ path: o,
1607
+ children: /* @__PURE__ */ y(Qe, {
1608
+ schema: L[E].schema,
1609
+ uischema: L[E].uischema,
1610
+ path: o,
1611
+ renderers: c,
1612
+ cells: d,
1613
+ enabled: h
1614
+ })
1615
+ })
1616
+ ] }) : /* @__PURE__ */ b(Pn, {
1617
+ value: String(E),
1618
+ onValueChange: z,
1619
+ children: [/* @__PURE__ */ y(In, { children: L.map((e, t) => /* @__PURE__ */ y(Ln, {
1620
+ value: String(t),
1621
+ children: e.label
1622
+ }, t)) }), L.map((e, t) => /* @__PURE__ */ y(Fn, {
1623
+ value: String(t),
1624
+ children: E === t ? /* @__PURE__ */ y(Nn, {
1625
+ options: f.options,
1626
+ schema: e.schema,
1627
+ path: o,
1628
+ children: /* @__PURE__ */ y(Qe, {
1629
+ schema: e.schema,
1630
+ uischema: e.uischema,
1631
+ path: o,
1632
+ renderers: c,
1633
+ cells: d
1634
+ })
1635
+ }) : null
1636
+ }, t))]
1637
+ }),
1638
+ A.dialog,
1639
+ /* @__PURE__ */ y(ca, {
1640
+ open: j !== void 0,
1641
+ onCancel: () => M(void 0),
1642
+ onConfirm: () => {
1643
+ j !== void 0 && R(j, !0), M(void 0);
1644
+ }
1645
+ })
1646
+ ]
1647
+ });
1648
+ }, da = Y(3, ke), fa = et(ua);
1649
+ // src/complex/ArrayPanelToggle.tsx
1650
+ function pa({ panel: e, label: t }) {
1651
+ let n = B();
1652
+ return e.collapsible ? /* @__PURE__ */ y(u, {
1653
+ type: "button",
1654
+ variant: "ghost",
1655
+ size: "icon-sm",
1656
+ "aria-label": t || n("control.array"),
1657
+ "aria-expanded": !e.collapsed,
1658
+ "aria-controls": e.contentId,
1659
+ onClick: e.toggle,
1660
+ children: e.collapsed ? /* @__PURE__ */ y(O, { "aria-hidden": "true" }) : /* @__PURE__ */ y(j, { "aria-hidden": "true" })
1661
+ }) : null;
1662
+ }
1663
+ var ma = Yn(({ state: e }) => {
1664
+ let { options: t, t: n } = e;
1665
+ return /* @__PURE__ */ y(d, {
1666
+ open: !!e.selection,
1667
+ onOpenChange: (t) => !t && e.close(),
1668
+ children: /* @__PURE__ */ b(Zi, {
1669
+ open: !!e.selection,
1670
+ options: t.dialog,
1671
+ "aria-describedby": void 0,
1672
+ children: [
1673
+ /* @__PURE__ */ y(h, { children: /* @__PURE__ */ y(g, { children: n("collection.editDetails") }) }),
1674
+ /* @__PURE__ */ b("div", {
1675
+ className: "p-1",
1676
+ children: [e.conflict && /* @__PURE__ */ y("p", {
1677
+ role: "alert",
1678
+ children: n("composite.applyConflict")
1679
+ }), e.content]
1680
+ }),
1681
+ /* @__PURE__ */ b(m, { children: [/* @__PURE__ */ y(u, {
1682
+ type: "button",
1683
+ variant: "outline",
1684
+ onClick: e.close,
1685
+ children: n("composite.cancel")
1686
+ }), /* @__PURE__ */ y(u, {
1687
+ type: "button",
1688
+ disabled: !e.enabled || e.conflict,
1689
+ onClick: e.apply,
1690
+ children: n("composite.apply")
1691
+ })] })
1692
+ ]
1693
+ })
1694
+ });
1695
+ }, ({ state: e, children: t }) => {
1696
+ var n;
1697
+ let { options: r, panelOpen: i } = e;
1698
+ return /* @__PURE__ */ y("div", { children: /* @__PURE__ */ b(er, {
1699
+ orientation: r.placement === "bottom" ? "vertical" : "horizontal",
1700
+ style: { height: i && r.placement === "bottom" ? "40rem" : "32rem" },
1701
+ children: [
1702
+ /* @__PURE__ */ y($n, {
1703
+ defaultSize: "55%",
1704
+ minSize: "20%",
1705
+ children: /* @__PURE__ */ y(Yi, {
1706
+ className: "shadcn-jsonforms-collection-pane",
1707
+ style: { height: "100%" },
1708
+ children: t
1709
+ })
1710
+ }),
1711
+ i && r.resizable !== !1 && /* @__PURE__ */ y(Qn, { withHandle: !0 }),
1712
+ i && /* @__PURE__ */ y($n, {
1713
+ minSize: "20%",
1714
+ children: /* @__PURE__ */ y(Yi, {
1715
+ style: { height: "100%" },
1716
+ children: /* @__PURE__ */ y("div", {
1717
+ className: "p-3",
1718
+ children: (n = e.content) == null ? e.t("collection.selectItem") : n
1719
+ })
1720
+ })
1721
+ })
1722
+ ]
1723
+ }) });
1724
+ }), ha = Xn((e) => /* @__PURE__ */ y("div", {
1725
+ className: "flex items-center",
1726
+ children: /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
1727
+ asChild: !0,
1728
+ children: /* @__PURE__ */ y(u, {
1729
+ type: "button",
1730
+ variant: "ghost",
1731
+ size: "icon-sm",
1732
+ "aria-label": e.label,
1733
+ "aria-expanded": e.expanded,
1734
+ onClick: e.toggle,
1735
+ children: e.expanded ? /* @__PURE__ */ y(F, { "aria-hidden": "true" }) : /* @__PURE__ */ y(P, { "aria-hidden": "true" })
1736
+ })
1737
+ }), /* @__PURE__ */ y(W, { children: e.label })] }) })
1738
+ })), ga = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
1739
+ asChild: !0,
1740
+ children: /* @__PURE__ */ y(u, {
1741
+ type: "button",
1742
+ variant: "ghost",
1743
+ size: "icon-sm",
1744
+ "aria-label": e,
1745
+ disabled: n,
1746
+ onClick: t,
1747
+ children: /* @__PURE__ */ y(R, {
1748
+ className: "h-4 w-4",
1749
+ "aria-hidden": "true"
1750
+ })
1751
+ })
1752
+ }), /* @__PURE__ */ y(W, { children: e })] }) }), _a = nt(({ errors: e, path: t, schema: n, uischema: r }) => {
1753
+ var i;
1754
+ return e && ((i = r.options) == null || (i = i.summary) == null ? void 0 : i.type) !== "Label" && n.type !== "object" && n.type !== "array" ? /* @__PURE__ */ y(gi, {
1755
+ local: !0,
1756
+ errors: e,
1757
+ path: t,
1758
+ className: "shadcn-jsonforms-cell-error"
1759
+ }) : null;
1760
+ });
1761
+ function va(e) {
1762
+ let { schema: t, rootSchema: n, uischema: r, path: i, label: a, options: o, rowDetail: s, page: c, selection: l, columnSizes: u } = e, [d] = u, f = ya(t, n, r, o, d), p = !!t.properties, m = !!(s.options || o.showSortButtons), h = d.__selection ? Object.values(d).reduce((e, t) => e + t, 0) : void 0;
1763
+ return /* @__PURE__ */ y(ma, {
1764
+ state: s,
1765
+ children: /* @__PURE__ */ b("div", {
1766
+ className: "min-w-0 w-full max-w-full overflow-x-auto",
1767
+ style: { contain: "inline-size" },
1768
+ children: [
1769
+ /* @__PURE__ */ b("table", {
1770
+ className: "text-sm",
1771
+ style: {
1772
+ flexShrink: 0,
1773
+ minWidth: h,
1774
+ width: h == null ? "100%" : h,
1775
+ tableLayout: d.__selection ? "fixed" : "auto"
1776
+ },
1777
+ "aria-label": a,
1778
+ children: [p && /* @__PURE__ */ y(xa, {
1779
+ columns: f,
1780
+ columnSizes: u,
1781
+ page: c,
1782
+ selection: l,
1783
+ selectPageLabel: s.t("collection.selectPage"),
1784
+ hasRowActions: m,
1785
+ schema: t,
1786
+ options: o
1787
+ }), /* @__PURE__ */ y("tbody", { children: c.indices.map((t) => /* @__PURE__ */ y(Ta, {
1788
+ table: e,
1789
+ index: t,
1790
+ columns: f,
1791
+ hasRowActions: m
1792
+ }, _e(i, String(t)))) })]
1793
+ }),
1794
+ /* @__PURE__ */ y(rr, {
1795
+ options: r.options,
1796
+ renderAction: Ca,
1797
+ path: i,
1798
+ reveal: (e) => {
1799
+ c.change(Math.floor(e / c.size) + 1), s.options && (s.setPanelOpen(!0), s.open(e));
1800
+ }
1801
+ }),
1802
+ /* @__PURE__ */ y(Wi, { page: c })
1803
+ ]
1804
+ })
1805
+ });
1806
+ }
1807
+ function ya(e, t, n, r, i) {
1808
+ var a, o;
1809
+ let s = (a = n.options) == null ? void 0 : a.columnDefs, c = (o = e.properties) == null ? { value: e } : o, l = !!e.properties;
1810
+ return sr(c, l ? s : void 0, Object.keys(c)).map((n) => {
1811
+ var a;
1812
+ let o = s == null ? void 0 : s.find((e) => e.field === n), u = s == null ? void 0 : s.some((e) => e.field === n && e.scope === "#"), d = u ? e : c[n], f = d.$ref ? pe.schema(d, "#", t) : d, p = cr(o), m = i[n], h = (a = r.cells) == null ? void 0 : a[n];
1813
+ return {
1814
+ field: n,
1815
+ column: f,
1816
+ definition: o,
1817
+ propertyBound: l && !u,
1818
+ cellOptions: h,
1819
+ editorOptions: Z(Z({}, h), u ? { summaryOnly: !0 } : {}),
1820
+ header: wa(n, f.title, o),
1821
+ maxWidth: p.maxWidth,
1822
+ style: m === void 0 ? p : Z(Z({}, p), {}, {
1823
+ width: m,
1824
+ minWidth: m,
1825
+ maxWidth: m
1826
+ })
1827
+ };
1828
+ });
1829
+ }
1830
+ function ba(e = 32) {
1831
+ return {
1832
+ width: e,
1833
+ minWidth: 32,
1834
+ maxWidth: e
1835
+ };
1836
+ }
1837
+ function xa({ columns: e, columnSizes: t, page: n, selection: r, selectPageLabel: i, hasRowActions: a, schema: o, options: s }) {
1838
+ var c;
1839
+ let [l, u] = t, d = n.indices.filter((e) => r.selected.includes(e)).length, f = d > 0 && d < n.indices.length ? "indeterminate" : d > 0;
1840
+ return /* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
1841
+ className: "border-b",
1842
+ children: [
1843
+ /* @__PURE__ */ y("th", {
1844
+ "data-column-key": "__selection",
1845
+ style: ba(l.__selection),
1846
+ className: "p-2 text-center",
1847
+ children: /* @__PURE__ */ y(lt, {
1848
+ className: "shadcn-jsonforms-row-selection align-middle",
1849
+ "aria-label": i,
1850
+ disabled: !r.selectable || !n.indices.length,
1851
+ checked: f,
1852
+ onCheckedChange: (e) => r.setSelected(e === !0 ? [.../* @__PURE__ */ new Set([...r.selected, ...n.indices])] : r.selected.filter((e) => !n.indices.includes(e)))
1853
+ })
1854
+ }),
1855
+ e.map(({ field: e, definition: t, header: n, style: r }) => {
1856
+ var i, a, c;
1857
+ return /* @__PURE__ */ b("th", {
1858
+ "data-column-key": e,
1859
+ style: r,
1860
+ className: "relative p-2 pe-4 text-left font-medium",
1861
+ children: [
1862
+ n,
1863
+ ((i = o.required) == null ? void 0 : i.includes(e)) && !((a = (c = s.cells) == null || (c = c[e]) == null ? void 0 : c.hideRequiredAsterisk) == null ? s.hideRequiredAsterisk : a) && /* @__PURE__ */ y("span", {
1864
+ "aria-hidden": "true",
1865
+ children: " *"
1866
+ }),
1867
+ /* @__PURE__ */ y(Gn, {
1868
+ colors: {
1869
+ border: "hsl(var(--muted-foreground) / 0.5)",
1870
+ active: "hsl(var(--primary))",
1871
+ focus: "hsl(var(--ring))"
1872
+ },
1873
+ field: n,
1874
+ definition: t,
1875
+ width: l[e],
1876
+ onResizeStart: (e) => u(e),
1877
+ onResize: (t) => u((n) => Z(Z({}, n), {}, { [e]: t }))
1878
+ })
1879
+ ]
1880
+ }, e);
1881
+ }),
1882
+ a && /* @__PURE__ */ y("th", {
1883
+ "data-column-key": "__actions",
1884
+ style: { width: (c = l.__actions) == null ? 1 : c },
1885
+ className: "whitespace-nowrap p-2"
1886
+ })
1887
+ ]
1888
+ }) });
1889
+ }
1890
+ function Sa({ index: e, rowDetail: t, showSortButtons: n, path: r, enabled: i, readonly: a, data: o, moveUp: s, moveDown: c, translations: l }) {
1891
+ let d = i && !a;
1892
+ return /* @__PURE__ */ b("div", {
1893
+ className: "flex w-max flex-nowrap items-center gap-1",
1894
+ children: [
1895
+ t.options && /* @__PURE__ */ y(ga, {
1896
+ label: t.t("collection.editDetails"),
1897
+ onClick: (n) => {
1898
+ var r;
1899
+ n.stopPropagation(), ((r = t.options) == null ? void 0 : r.presentation) === "panel" && t.setPanelOpen(!0), t.open(e);
1900
+ }
1901
+ }),
1902
+ /* @__PURE__ */ y(ir, {
1903
+ path: r,
1904
+ index: e,
1905
+ renderIndicator: (e) => /* @__PURE__ */ y(gi, { errors: e })
1906
+ }),
1907
+ n && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
1908
+ type: "button",
1909
+ variant: "ghost",
1910
+ size: "icon",
1911
+ className: "h-7 w-7",
1912
+ "aria-label": l.upAriaLabel,
1913
+ title: l.up,
1914
+ disabled: !d || e === 0,
1915
+ onClick: s == null ? void 0 : s(r, e),
1916
+ children: /* @__PURE__ */ y(j, {
1917
+ className: "h-4 w-4",
1918
+ "aria-hidden": "true"
1919
+ })
1920
+ }), /* @__PURE__ */ y(u, {
1921
+ type: "button",
1922
+ variant: "ghost",
1923
+ size: "icon",
1924
+ className: "h-7 w-7",
1925
+ "aria-label": l.downAriaLabel,
1926
+ title: l.down,
1927
+ disabled: !d || e === o - 1,
1928
+ onClick: c == null ? void 0 : c(r, e),
1929
+ children: /* @__PURE__ */ y(O, {
1930
+ className: "h-4 w-4",
1931
+ "aria-hidden": "true"
1932
+ })
1933
+ })] })
1934
+ ]
1935
+ });
1936
+ }
1937
+ function Ca(e, t, n) {
1938
+ return /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
1939
+ asChild: !0,
1940
+ children: /* @__PURE__ */ y(u, {
1941
+ type: "button",
1942
+ variant: "outline",
1943
+ size: "icon",
1944
+ className: "h-7 w-7",
1945
+ "aria-label": e,
1946
+ onClick: t,
1947
+ children: n
1948
+ })
1949
+ }), /* @__PURE__ */ y(W, { children: e })] }) });
1950
+ }
1951
+ function wa(e, t, n) {
1952
+ var r, i;
1953
+ return (r = (i = n == null ? void 0 : n.headerName) == null ? t : i) == null ? ye(e) : r;
1954
+ }
1955
+ function Ta({ table: e, index: t, columns: n, hasRowActions: r }) {
1956
+ var i, a, o;
1957
+ let { path: s, enabled: c, readonly: l, data: u, moveUp: d, moveDown: f, translations: p, rowDetail: m, options: h, selection: g, renderers: _, cells: v } = e, [x] = e.columnSizes, S = {
1958
+ rowDetail: m,
1959
+ showSortButtons: h.showSortButtons,
1960
+ path: s,
1961
+ enabled: c,
1962
+ readonly: l,
1963
+ data: u,
1964
+ moveUp: d,
1965
+ moveDown: f,
1966
+ translations: p
1967
+ }, C = _e(s, String(t)), w = ((i = m.options) == null ? void 0 : i.presentation) === "panel", T = w && m.panelOpen && ((a = m.selection) == null ? void 0 : a.index) === t;
1968
+ return /* @__PURE__ */ b("tr", {
1969
+ className: T ? "border-b bg-accent" : "border-b",
1970
+ "aria-current": T || void 0,
1971
+ onClick: () => {
1972
+ w && m.open(t);
1973
+ },
1974
+ children: [
1975
+ /* @__PURE__ */ y("td", {
1976
+ className: "p-2 text-center",
1977
+ style: ba(x.__selection),
1978
+ onClick: (e) => e.stopPropagation(),
1979
+ children: /* @__PURE__ */ y(lt, {
1980
+ className: "shadcn-jsonforms-row-selection align-middle",
1981
+ "aria-label": m.t("collection.selectRow", { index: t + 1 }),
1982
+ disabled: !g.selectable,
1983
+ checked: g.selected.includes(t),
1984
+ onCheckedChange: (e) => g.setSelected(e === !0 ? [...g.selected, t] : g.selected.filter((e) => e !== t))
1985
+ })
1986
+ }),
1987
+ n.map(({ field: e, column: t, style: n, maxWidth: r, propertyBound: i, editorOptions: a, cellOptions: o }) => {
1988
+ let s = i ? _e(C, e) : C;
1989
+ return /* @__PURE__ */ y("td", {
1990
+ style: n,
1991
+ className: "shadcn-jsonforms-table-cell p-2",
1992
+ children: /* @__PURE__ */ b("div", {
1993
+ style: {
1994
+ maxWidth: r,
1995
+ overflow: "hidden"
1996
+ },
1997
+ children: [/* @__PURE__ */ y(or, {
1998
+ path: C,
1999
+ children: /* @__PURE__ */ y(Xe, {
2000
+ schema: t,
2001
+ uischema: {
2002
+ type: "Control",
2003
+ scope: i ? "#/properties/" + e : "#",
2004
+ options: a
2005
+ },
2006
+ path: s,
2007
+ enabled: c && !l && !t.readOnly,
2008
+ renderers: _,
2009
+ cells: v
2010
+ })
2011
+ }), /* @__PURE__ */ y(_a, {
2012
+ schema: t,
2013
+ uischema: {
2014
+ type: "Control",
2015
+ scope: "#",
2016
+ options: o
2017
+ },
2018
+ path: s
2019
+ })]
2020
+ })
2021
+ }, e);
2022
+ }),
2023
+ r && /* @__PURE__ */ y("td", {
2024
+ className: "whitespace-nowrap p-2",
2025
+ style: { width: (o = x.__actions) == null ? 1 : o },
2026
+ children: /* @__PURE__ */ y(Sa, Z({ index: t }, S))
2027
+ })
2028
+ ]
2029
+ });
2030
+ }
2031
+ // src/complex/array/ArrayItemPanels.tsx
2032
+ var Ea = ({ label: e, index: t, open: n, onOpenChange: r, hideAvatar: i, actions: a, indicator: o, children: s }) => {
2033
+ let c = B();
2034
+ return /* @__PURE__ */ b(oe, {
2035
+ open: n,
2036
+ onOpenChange: r,
2037
+ className: "shadcn-jsonforms-array-item",
2038
+ children: [/* @__PURE__ */ b("div", {
2039
+ className: "relative flex items-center",
2040
+ children: [/* @__PURE__ */ b(ce, {
2041
+ render: /* @__PURE__ */ y(u, {
2042
+ type: "button",
2043
+ variant: "ghost"
2044
+ }),
2045
+ className: "h-auto min-w-0 flex-1 justify-start gap-3 whitespace-normal text-left",
2046
+ "aria-label": e || String(t + 1),
2047
+ children: [
2048
+ !i && /* @__PURE__ */ y("span", {
2049
+ "data-array-index": !0,
2050
+ "aria-label": `${c("array.indexLabel")} ${t + 1}`,
2051
+ className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-muted text-muted-foreground",
2052
+ children: t + 1
2053
+ }),
2054
+ /* @__PURE__ */ b("span", {
2055
+ className: "flex min-w-0 flex-1 items-center gap-2 pe-10",
2056
+ children: [/* @__PURE__ */ y("span", {
2057
+ className: "min-w-0",
2058
+ children: i ? `${t + 1} ${e}` : e
2059
+ }), /* @__PURE__ */ y("span", {
2060
+ className: "flex shrink-0 items-center leading-none",
2061
+ children: o
2062
+ })]
2063
+ }),
2064
+ y(n ? j : O, { "aria-hidden": "true" })
2065
+ ]
2066
+ }), /* @__PURE__ */ y("div", {
2067
+ className: "absolute right-10 flex items-center gap-1",
2068
+ children: a
2069
+ })]
2070
+ }), /* @__PURE__ */ y(se, {
2071
+ keepMounted: !0,
2072
+ hidden: !n,
2073
+ className: "px-3 pb-3",
2074
+ children: s
2075
+ })]
2076
+ });
2077
+ }, Da = ({ index: e, settings: t }) => {
2078
+ var n, r;
2079
+ let i = B(), { uischema: a, config: o, translations: s, canMove: c, count: l, removeLabel: d, removeTooltip: f, canRemove: p, onMove: m, requestRemove: h } = t;
2080
+ return /* @__PURE__ */ b(v, { children: [((n = (r = a.options) == null ? void 0 : r.showSortButtons) == null ? o == null ? void 0 : o.showSortButtons : n) && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
2081
+ type: "button",
2082
+ variant: "ghost",
2083
+ size: "icon",
2084
+ "aria-label": s.upAriaLabel,
2085
+ title: s.up,
2086
+ disabled: !c || e === 0,
2087
+ onClick: () => m(e, -1),
2088
+ children: /* @__PURE__ */ y(w, { "aria-hidden": "true" })
2089
+ }), /* @__PURE__ */ y(u, {
2090
+ type: "button",
2091
+ variant: "ghost",
2092
+ size: "icon",
2093
+ "aria-label": s.downAriaLabel,
2094
+ title: s.down,
2095
+ disabled: !c || e === l - 1,
2096
+ onClick: () => m(e, 1),
2097
+ children: /* @__PURE__ */ y(C, { "aria-hidden": "true" })
2098
+ })] }), /* @__PURE__ */ y(u, {
2099
+ variant: "destructive",
2100
+ size: "icon",
2101
+ className: "h-7 w-7",
2102
+ "aria-label": d || i("array.removeAriaLabel"),
2103
+ title: f || i("array.removeTooltip"),
2104
+ type: "button",
2105
+ disabled: !p,
2106
+ onClick: () => h(e),
2107
+ children: /* @__PURE__ */ y(ee, {
2108
+ className: "h-4 w-4",
2109
+ "aria-hidden": "true"
2110
+ })
2111
+ })] });
2112
+ };
2113
+ function Oa(e) {
2114
+ let { schema: t, path: n, enabled: r, cells: i, renderers: a, detail: o, indices: s, hideAvatar: c, childLabelForIndex: l, config: u, uischema: d, expandedIndex: f, onExpand: p } = e;
2115
+ return /* @__PURE__ */ y(v, { children: s.map((s) => {
2116
+ let m = _e(n, `${s}`), h = l(m, s);
2117
+ return /* @__PURE__ */ y(Ea, {
2118
+ label: h,
2119
+ indicator: /* @__PURE__ */ y(lr, {
2120
+ Indicator: ci,
2121
+ path: m,
2122
+ options: d.options,
2123
+ config: u
2124
+ }),
2125
+ index: s,
2126
+ open: f === s,
2127
+ onOpenChange: (e) => p(e ? s : void 0),
2128
+ hideAvatar: c,
2129
+ actions: /* @__PURE__ */ y(Da, {
2130
+ index: s,
2131
+ settings: e
2132
+ }),
2133
+ children: /* @__PURE__ */ y(Qe, {
2134
+ schema: t,
2135
+ uischema: o,
2136
+ path: m,
2137
+ enabled: r,
2138
+ renderers: a,
2139
+ cells: i
2140
+ })
2141
+ }, m);
2142
+ }) });
2143
+ }
2144
+ // src/complex/array/ArrayListDetail.tsx
2145
+ var ka = [
2146
+ "schema",
2147
+ "path",
2148
+ "enabled",
2149
+ "cells",
2150
+ "renderers",
2151
+ "detail",
2152
+ "indices",
2153
+ "count",
2154
+ "label",
2155
+ "readonly",
2156
+ "selectedItem",
2157
+ "emptyMessage"
2158
+ ];
2159
+ function Aa(e) {
2160
+ let { schema: t, path: n, enabled: r, cells: i, renderers: a, detail: o, indices: s, count: c, label: l, readonly: u, selectedItem: d, emptyMessage: f } = e, p = qi(e, ka);
2161
+ if (c === 0) return /* @__PURE__ */ y("div", {
2162
+ className: "py-6 text-center text-muted-foreground",
2163
+ children: f()
2164
+ });
2165
+ let m = Math.min(d, c - 1);
2166
+ return /* @__PURE__ */ b(er, {
2167
+ orientation: "horizontal",
2168
+ style: { height: "auto" },
2169
+ children: [
2170
+ /* @__PURE__ */ y($n, {
2171
+ defaultSize: "25%",
2172
+ minSize: "15%",
2173
+ maxSize: "60%",
2174
+ children: /* @__PURE__ */ y(Yi, {
2175
+ className: "shadcn-jsonforms-list-navigation",
2176
+ style: { maxHeight: "20rem" },
2177
+ children: /* @__PURE__ */ y(pr, {
2178
+ className: "min-w-0 rounded-lg border p-1",
2179
+ "aria-label": l,
2180
+ children: s.map((e) => {
2181
+ let t = m === e, r = p.childLabelForIndex(_e(n, String(e)), e);
2182
+ return /* @__PURE__ */ y(ja, Z({
2183
+ index: e,
2184
+ selected: t,
2185
+ itemLabel: r
2186
+ }, p), e);
2187
+ })
2188
+ })
2189
+ })
2190
+ }),
2191
+ /* @__PURE__ */ y(Qn, { withHandle: !0 }),
2192
+ /* @__PURE__ */ y($n, {
2193
+ minSize: "25%",
2194
+ children: /* @__PURE__ */ y("div", {
2195
+ className: "min-w-0 space-y-3 ps-3",
2196
+ role: "tabpanel",
2197
+ children: /* @__PURE__ */ y(Qe, {
2198
+ schema: t,
2199
+ uischema: o,
2200
+ path: _e(n, String(m)),
2201
+ enabled: r && !u,
2202
+ renderers: a,
2203
+ cells: i
2204
+ })
2205
+ })
2206
+ })
2207
+ ]
2208
+ });
2209
+ }
2210
+ function ja({ index: e, selected: t, itemLabel: n, hideAvatar: r, canRemove: i, removeLabel: a, removeTooltip: o, onSelect: s, requestRemove: c }) {
2211
+ let l = B();
2212
+ return /* @__PURE__ */ b(ur, {
2213
+ role: "listitem",
2214
+ size: "sm",
2215
+ variant: t ? "muted" : "default",
2216
+ className: "flex-nowrap gap-1 p-1",
2217
+ children: [/* @__PURE__ */ y(fr, {
2218
+ className: "min-w-0",
2219
+ children: /* @__PURE__ */ b(u, {
2220
+ type: "button",
2221
+ variant: "ghost",
2222
+ className: "h-auto min-h-12 w-full min-w-0 justify-start gap-3 whitespace-nowrap text-left",
2223
+ "aria-pressed": t,
2224
+ "aria-label": n || String(e + 1),
2225
+ onClick: () => s(e),
2226
+ children: [
2227
+ !r && /* @__PURE__ */ y(mr, {
2228
+ "data-array-index": !0,
2229
+ "aria-label": `${l("array.indexLabel")} ${e + 1}`,
2230
+ className: "border",
2231
+ children: /* @__PURE__ */ y(hr, { children: e + 1 })
2232
+ }),
2233
+ /* @__PURE__ */ y("span", {
2234
+ className: "min-w-0 flex-1 truncate",
2235
+ children: r ? `${e + 1} ${n}` : n
2236
+ }),
2237
+ t && /* @__PURE__ */ y(D, {
2238
+ className: "h-4 w-4 shrink-0",
2239
+ "aria-hidden": "true"
2240
+ })
2241
+ ]
2242
+ })
2243
+ }), /* @__PURE__ */ y(dr, {
2244
+ className: "shrink-0",
2245
+ children: /* @__PURE__ */ y(u, {
2246
+ type: "button",
2247
+ variant: "ghost",
2248
+ size: "icon",
2249
+ className: "h-6 w-6 bg-destructive/10 text-destructive hover:bg-destructive/20 hover:text-destructive",
2250
+ "aria-label": a,
2251
+ title: o,
2252
+ disabled: !i,
2253
+ onClick: () => c(e),
2254
+ children: /* @__PURE__ */ y(ee, {
2255
+ className: "h-3 w-3",
2256
+ "aria-hidden": "true"
2257
+ })
2258
+ })
2259
+ })]
2260
+ });
2261
+ }
2262
+ // src/complex/ArrayControlRenderer.tsx
2263
+ function Ma(e) {
2264
+ return !e || typeof e == "string" && e.toUpperCase() === "DEFAULT";
2265
+ }
2266
+ function Na({ arraySchema: e, rootSchema: t, config: n }, r) {
2267
+ return Le(be("#"), e == null ? {
2268
+ type: "array",
2269
+ items: r
2270
+ } : e, {
2271
+ rootSchema: t,
2272
+ config: n
2273
+ }) ? !1 : !!r.properties || [
2274
+ "string",
2275
+ "number",
2276
+ "integer",
2277
+ "boolean",
2278
+ "null"
2279
+ ].includes(r.type);
2280
+ }
2281
+ function Pa(e, t, n) {
2282
+ return String(e.uischema.type) === "ListWithDetail" ? "list" : n.table === !0 || n.format === "table" ? "table" : n.table === !1 || !Ma(n.detail) ? "panels" : Na(e, t) ? "table" : "panels";
2283
+ }
2284
+ var Fa = (e) => {
2285
+ var t, r, i, a, o;
2286
+ let { addItem: s, moveUp: c, moveDown: l, cells: d, config: f, readonly: p, data: m, enabled: h, label: g, required: _, path: v, removeItems: x, renderers: S, rootSchema: C, schema: w = {}, arraySchema: T, uischema: E, visible: D } = e, O = $e(), k = Z(Z({}, f), E.options), A = It(v, E.options, !k.hideArraySummaryValidation), [j, M] = n.useState(() => m > 0 && !zn(E.options, f, "array") ? 0 : void 0), N = (e) => {
2287
+ M((t) => t === void 0 || t < e ? t : t === e ? void 0 : t - 1), x == null || x(v, [e])();
2288
+ }, P = (e, t) => {
2289
+ var n;
2290
+ if (!h || p) return;
2291
+ let r = e + t;
2292
+ r < 0 || r >= m || (M((t) => t === e ? r : t === r ? e : t), (n = t === -1 ? c : l) == null || n(v, e)());
2293
+ }, F = H(), I = {
2294
+ addAriaLabel: F("array.addAriaLabel", "Add"),
2295
+ addTooltip: F("array.addTooltip", "Add item"),
2296
+ removeAriaLabel: F("array.removeAriaLabel", "Remove"),
2297
+ removeTooltip: F("array.removeTooltip", "Remove item"),
2298
+ upAriaLabel: F("array.upAriaLabel", "Move up") || "Move up",
2299
+ up: F("array.up", "Move up") || "Move up",
2300
+ downAriaLabel: F("array.downAriaLabel", "Move down") || "Move down",
2301
+ down: F("array.down", "Move down") || "Move down"
2302
+ }, L = qn({
2303
+ path: v,
2304
+ schema: w,
2305
+ uischema: E,
2306
+ config: f,
2307
+ enabled: h,
2308
+ readonly: p,
2309
+ removeItems: x
2310
+ }), R = Kn(), [te, B] = n.useState(0), [V, G] = n.useState(), K = tr(E.options, f), q = h && !p && !k.disableAdd && !(k.restrict && T.maxItems !== void 0 && m >= T.maxItems), J = !!x && h && !p && !k.disableRemove && !(k.restrict && T.minItems !== void 0 && m <= T.minItems), ie = (e) => {
2311
+ var t;
2312
+ if (!J) return;
2313
+ let n = pe.data((t = O.core) == null ? void 0 : t.data, _e(v, String(e)));
2314
+ nr({
2315
+ options: E.options,
2316
+ config: f,
2317
+ catalogId: "arrayLayout",
2318
+ operation: "delete"
2319
+ }, [n]) ? G(e) : N(e);
2320
+ }, ae = n.useMemo(() => {
2321
+ var e;
2322
+ return Un((e = O.uischemas) == null ? [] : e, w, E.scope, v, typeof w == "boolean" && w ? () => be("#") : void 0, E, C);
2323
+ }, [
2324
+ O.uischemas,
2325
+ w,
2326
+ E,
2327
+ v,
2328
+ C
2329
+ ]), oe = (t = (r = E.options) == null ? void 0 : r.elementLabelProp) == null ? De(w) : t, se = Pa(e, w, k), ce = se === "table", le = Jn(Array.from({ length: m }, (e, t) => t), (i = E.options) == null ? void 0 : i.pagination, f, "array", ce), ue = Zn({
2330
+ schema: w,
2331
+ rootSchema: C,
2332
+ uischema: E,
2333
+ config: f,
2334
+ path: v,
2335
+ enabled: h,
2336
+ readonly: p,
2337
+ renderers: S,
2338
+ cells: d
2339
+ });
2340
+ if (!D) return null;
2341
+ let de = {
2342
+ schema: w,
2343
+ path: v,
2344
+ renderers: S,
2345
+ cells: d,
2346
+ enabled: h,
2347
+ detail: ae,
2348
+ indices: le.indices,
2349
+ hideAvatar: !!k.hideAvatar,
2350
+ canRemove: J,
2351
+ requestRemove: ie,
2352
+ childLabelForIndex: (e, t) => {
2353
+ var n;
2354
+ if (!oe) return `${t}`;
2355
+ let r = pe.data((n = O.core) == null ? void 0 : n.data, _e(e, oe));
2356
+ return r == null || Number.isNaN(r) ? "" : `${r}`;
2357
+ },
2358
+ removeLabel: I.removeAriaLabel,
2359
+ removeTooltip: I.removeTooltip
2360
+ };
2361
+ return /* @__PURE__ */ y(Gt, {
2362
+ changes: le.pending,
2363
+ children: /* @__PURE__ */ b("div", {
2364
+ className: "shadcn-jsonforms-array",
2365
+ children: [
2366
+ /* @__PURE__ */ b("div", {
2367
+ className: "shadcn-jsonforms-array-header",
2368
+ children: [/* @__PURE__ */ b("div", {
2369
+ className: "flex items-center gap-2",
2370
+ children: [/* @__PURE__ */ b("h3", { children: [g, _ && !k.hideRequiredAsterisk && /* @__PURE__ */ y("span", {
2371
+ "aria-hidden": "true",
2372
+ children: " *"
2373
+ })] }), A && /* @__PURE__ */ y(gi, {
2374
+ local: !0,
2375
+ errors: A,
2376
+ className: "shadcn-jsonforms-array-errors"
2377
+ })]
2378
+ }), /* @__PURE__ */ b("div", {
2379
+ className: "shadcn-jsonforms-array-actions",
2380
+ children: [
2381
+ /* @__PURE__ */ y(ha, { state: ue }),
2382
+ ce && /* @__PURE__ */ y(ne, { children: /* @__PURE__ */ b(U, { children: [/* @__PURE__ */ y(re, {
2383
+ asChild: !0,
2384
+ children: /* @__PURE__ */ y(u, {
2385
+ type: "button",
2386
+ size: "icon-sm",
2387
+ variant: "destructive",
2388
+ "aria-label": ue.t("collection.deleteSelected"),
2389
+ disabled: !L.canDelete,
2390
+ onClick: L.request,
2391
+ children: /* @__PURE__ */ y(ee, {
2392
+ "aria-hidden": "true",
2393
+ className: "h-4 w-4"
2394
+ })
2395
+ })
2396
+ }), /* @__PURE__ */ y(W, { children: ue.t("collection.deleteSelected") })] }) }),
2397
+ /* @__PURE__ */ y(u, {
2398
+ type: "button",
2399
+ size: "icon-sm",
2400
+ "aria-label": (a = I == null ? void 0 : I.addAriaLabel) == null ? F("array.addAriaLabel", "Add") : a,
2401
+ title: (o = I == null ? void 0 : I.addTooltip) == null ? F("array.addTooltip", "Add item") : o,
2402
+ disabled: !q,
2403
+ onClick: () => {
2404
+ q && (k.collapseNewItems || M(m), s(v, xe(w, C))());
2405
+ },
2406
+ children: /* @__PURE__ */ y(z, {
2407
+ className: "h-4 w-4",
2408
+ "aria-hidden": "true"
2409
+ })
2410
+ }),
2411
+ /* @__PURE__ */ y(pa, {
2412
+ panel: K,
2413
+ label: g
2414
+ })
2415
+ ]
2416
+ })]
2417
+ }),
2418
+ /* @__PURE__ */ b("div", {
2419
+ id: K.contentId,
2420
+ hidden: K.collapsed,
2421
+ children: [se === "list" ? /* @__PURE__ */ y(Aa, Z(Z({}, de), {}, {
2422
+ count: m,
2423
+ label: g,
2424
+ readonly: p,
2425
+ selectedItem: te,
2426
+ onSelect: B,
2427
+ emptyMessage: () => F("array.noDataMessage", "No data")
2428
+ })) : ce ? /* @__PURE__ */ y(va, Z(Z({}, e), {}, {
2429
+ schema: w,
2430
+ options: k,
2431
+ rowDetail: ue,
2432
+ page: le,
2433
+ selection: L,
2434
+ columnSizes: R,
2435
+ translations: I
2436
+ })) : /* @__PURE__ */ y(Oa, Z(Z({}, de), {}, {
2437
+ config: f,
2438
+ uischema: E,
2439
+ expandedIndex: j,
2440
+ onExpand: M,
2441
+ onMove: P,
2442
+ canMove: h && !p,
2443
+ count: m,
2444
+ translations: I
2445
+ })), !ce && /* @__PURE__ */ y(Wi, { page: le })]
2446
+ }),
2447
+ /* @__PURE__ */ y(Ui, {
2448
+ open: L.confirming,
2449
+ onCancel: L.cancel,
2450
+ onConfirm: L.confirm
2451
+ }),
2452
+ /* @__PURE__ */ y(Ui, {
2453
+ open: V !== void 0,
2454
+ onCancel: () => G(void 0),
2455
+ onConfirm: () => {
2456
+ J && V !== void 0 && V < m && N(V), G(void 0);
2457
+ }
2458
+ })
2459
+ ]
2460
+ })
2461
+ });
2462
+ }, Ia = Y(3, he(Ge(Je("Control"), Je("ListWithDetail")), qe("array"))), La = (e) => {
2463
+ let { description: t, label: r, path: i, rootSchema: a, uischema: o } = e, s = si(), c = br(e, s.request), { appliedOptions: l, structuredLayout: d, t: f, collapsible: p, expanded: m, setSelectedPath: h, selectedType: g, tree: _, selectedNode: x, canRenameNode: S } = c, C = n.useContext(ui), w = /* @__PURE__ */ y(_r, Z(Z({}, c.detailProps), {}, {
2464
+ selectedType: g,
2465
+ selectedSchema: c.selectedSchema
2466
+ })), T = g === "object" || g === "array", E = /* @__PURE__ */ y(di, Z({}, c.selectorProps)), D = (e, t) => {
2467
+ var n;
2468
+ let r = e.path[e.path.length - 1], i = yr(_, e);
2469
+ if (!i || typeof r != "string" || !S(e)) return f("mixed.renameBlocked");
2470
+ let o = dn({
2471
+ name: t,
2472
+ currentName: r,
2473
+ data: i.data,
2474
+ schema: On(i.schema, "object", a),
2475
+ rootSchema: a,
2476
+ validate: (n = c.jsonforms.core) != null && n.ajv ? (e, t) => !!c.jsonforms.core.ajv.validate(e, t) : void 0
2477
+ });
2478
+ if (o.error === "required") return f("additionalProperties.nameRequired");
2479
+ if (o.error === "already-defined") return f("additionalProperties.nameTaken", { name: t });
2480
+ if (o.error) return f("additionalProperties.nameInvalid", { name: t });
2481
+ }, k = (e, t) => {
2482
+ D(e, t) || c.renameNode(e, t);
2483
+ };
2484
+ if (!e.visible) return null;
2485
+ if (d === "code") return /* @__PURE__ */ y(gr, Z({}, e));
2486
+ if (d === "tree" && C && T) return /* @__PURE__ */ y(fi, {
2487
+ description: t,
2488
+ label: r,
2489
+ onView: () => C.selectPath(i),
2490
+ selector: E
2491
+ });
2492
+ let A = /* @__PURE__ */ b("div", {
2493
+ "data-structured-layout": d,
2494
+ className: "jsonforms-mixed-renderer min-w-0 space-y-2",
2495
+ children: [s.dialog, T ? /* @__PURE__ */ b(oe, {
2496
+ open: m,
2497
+ onOpenChange: c.setExpanded,
2498
+ className: "min-w-0",
2499
+ children: [
2500
+ r && o.label !== !1 && /* @__PURE__ */ y("div", {
2501
+ className: "shadcn-jsonforms-label mb-2",
2502
+ children: r
2503
+ }),
2504
+ /* @__PURE__ */ b("div", {
2505
+ className: "flex items-center gap-3",
2506
+ children: [
2507
+ /* @__PURE__ */ y("div", {
2508
+ className: "w-36 shrink-0",
2509
+ children: E
2510
+ }),
2511
+ c.validation.show && /* @__PURE__ */ y(ci, { count: c.validation.count }),
2512
+ p ? /* @__PURE__ */ y(ce, {
2513
+ render: /* @__PURE__ */ y(u, {
2514
+ type: "button",
2515
+ variant: "ghost"
2516
+ }),
2517
+ className: "flex-1 justify-end",
2518
+ "aria-label": r || f("control.value"),
2519
+ children: y(m ? j : O, { "aria-hidden": "true" })
2520
+ }) : /* @__PURE__ */ y("span", { className: "flex-1" })
2521
+ ]
2522
+ }),
2523
+ /* @__PURE__ */ b(se, {
2524
+ keepMounted: !0,
2525
+ hidden: !m,
2526
+ className: "pt-3",
2527
+ children: [d === "nested" && w, d === "tree" && _ && x && /* @__PURE__ */ b(er, {
2528
+ orientation: "horizontal",
2529
+ className: "min-w-0",
2530
+ children: [
2531
+ /* @__PURE__ */ y($n, {
2532
+ defaultSize: "30%",
2533
+ minSize: "20%",
2534
+ className: "pr-3",
2535
+ children: /* @__PURE__ */ y(pi, {
2536
+ root: _,
2537
+ selectedPath: x.path,
2538
+ onSelect: (e) => h(e.path),
2539
+ canDelete: c.canDeleteNode,
2540
+ canRename: S,
2541
+ onDelete: c.deleteNode,
2542
+ onRename: k,
2543
+ validateRename: D
2544
+ })
2545
+ }),
2546
+ /* @__PURE__ */ y(Qn, { withHandle: !0 }),
2547
+ /* @__PURE__ */ y($n, {
2548
+ minSize: "30%",
2549
+ className: "pl-3",
2550
+ children: /* @__PURE__ */ b("div", {
2551
+ className: "min-w-0 space-y-2",
2552
+ children: [/* @__PURE__ */ y(xr, {
2553
+ "aria-label": f("mixed.valuePath"),
2554
+ children: /* @__PURE__ */ y(wr, { children: [[], ...x.path.map((e, t) => x.path.slice(0, t + 1))].map((e, t) => /* @__PURE__ */ b(n.Fragment, { children: [t > 0 && /* @__PURE__ */ y(Er, {}), /* @__PURE__ */ y(Sr, { children: t === x.path.length ? /* @__PURE__ */ y(Tr, { children: t === 0 ? r || f("control.value") : String(e[t - 1]) }) : /* @__PURE__ */ y(Cr, {
2555
+ asChild: !0,
2556
+ children: /* @__PURE__ */ y("button", {
2557
+ type: "button",
2558
+ onClick: () => h(e),
2559
+ children: t === 0 ? r || f("control.value") : String(e[t - 1])
2560
+ })
2561
+ }) })] }, t)) })
2562
+ }), /* @__PURE__ */ y(vr, Z(Z(Z({}, c.detailProps), {}, { node: x }, c.nodeEditorProps), {}, {
2563
+ MixedTypeSelector: di,
2564
+ wrapStructured: (e) => /* @__PURE__ */ y("div", {
2565
+ className: "space-y-2",
2566
+ children: e
2567
+ })
2568
+ }))]
2569
+ })
2570
+ })
2571
+ ]
2572
+ })]
2573
+ })
2574
+ ]
2575
+ }) : /* @__PURE__ */ b(v, { children: [r && o.label !== !1 && /* @__PURE__ */ b("div", {
2576
+ className: "shadcn-jsonforms-label",
2577
+ children: [r, e.required && !l.hideRequiredAsterisk && " *"]
2578
+ }), /* @__PURE__ */ b("div", {
2579
+ className: g && g !== "null" ? "jsonforms-mixed-renderer-primitive" : "",
2580
+ children: [E, /* @__PURE__ */ y("div", {
2581
+ className: "min-w-0",
2582
+ children: w
2583
+ })]
2584
+ })] })]
2585
+ });
2586
+ return d === "nested" || C ? A : /* @__PURE__ */ y(ui.Provider, {
2587
+ value: c.navigation,
2588
+ children: A
2589
+ });
2590
+ }, Ra = X(La), za = Or(sa, ({ path: e, title: t, errors: n, detail: r, additional: i }) => /* @__PURE__ */ b("div", {
2591
+ className: e ? "shadcn-jsonforms-object" : void 0,
2592
+ children: [
2593
+ t && /* @__PURE__ */ b("div", {
2594
+ className: "flex items-center gap-1",
2595
+ children: [/* @__PURE__ */ y("h3", { children: t }), n && /* @__PURE__ */ y(gi, {
2596
+ local: !0,
2597
+ errors: n
2598
+ })]
2599
+ }),
2600
+ !t && n && /* @__PURE__ */ y("div", {
2601
+ role: "alert",
2602
+ className: "text-sm text-destructive whitespace-pre-line",
2603
+ children: n
2604
+ }),
2605
+ r,
2606
+ i
2607
+ ]
2608
+ }), !0), Ba = (e) => /* @__PURE__ */ y(ua, Z(Z({}, e), {}, { combinator: "oneOf" })), Va = Y(3, Re), Ha = st(Ba);
2609
+ // src/controls/BooleanControl.tsx
2610
+ function Ua({ value: e }) {
2611
+ let t = B();
2612
+ return /* @__PURE__ */ y("span", { children: typeof e == "boolean" ? t(e ? "boolean.yes" : "boolean.no") : "" });
2613
+ }
2614
+ var Wa = ({ config: e, uischema: t, schema: n, data: r, description: i, enabled: a, errors: o, handleChange: s, label: c, path: l, required: u, readonly: d, visible: f }) => {
2615
+ if (!f) return null;
2616
+ let p = Q(l, c);
2617
+ return /* @__PURE__ */ y($, {
2618
+ path: l,
2619
+ schema: n,
2620
+ config: e,
2621
+ uischema: t,
2622
+ id: p,
2623
+ label: c,
2624
+ required: u,
2625
+ description: i,
2626
+ errors: o,
2627
+ children: /* @__PURE__ */ b("label", {
2628
+ className: "shadcn-jsonforms-checkbox",
2629
+ children: [/* @__PURE__ */ y(lt, {
2630
+ className: "shadcn-jsonforms-checkbox-control",
2631
+ id: p,
2632
+ disabled: !a || d,
2633
+ checked: typeof r == "boolean" ? r : "indeterminate",
2634
+ onCheckedChange: (e) => s(l, e === !0)
2635
+ }), /* @__PURE__ */ y(Ua, { value: r })]
2636
+ })
2637
+ });
2638
+ }, Ga = Y(2, Ae), Ka = {
2639
+ date: Lr,
2640
+ time: zr,
2641
+ dateTime: Rr
2642
+ }, qa = {
2643
+ date: "YYYY-MM-DD",
2644
+ time: "HH:mm",
2645
+ dateTime: "YYYY-MM-DD HH:mm"
2646
+ }, Ja = {
2647
+ date: "temporal.datePlaceholder",
2648
+ time: "temporal.timePlaceholder",
2649
+ dateTime: "temporal.dateTimePlaceholder"
2650
+ };
2651
+ function Ya(e, t) {
2652
+ let n = Array.isArray(e) ? e.filter((e) => [
2653
+ "hours",
2654
+ "minutes",
2655
+ "seconds"
2656
+ ].includes(e)) : [], r = n.length > 0;
2657
+ return {
2658
+ showHours: !r || n.includes("hours"),
2659
+ showMinutes: !r || n.includes("minutes"),
2660
+ useSeconds: r ? n.includes("seconds") : t.includes("s")
2661
+ };
2662
+ }
2663
+ function Xa(e, t, n) {
2664
+ var r, i;
2665
+ let a = e.ampm === !0, o = (r = e[`${t}Format`]) == null ? t === "time" && a ? "hh:mm a" : qa[t] : r;
2666
+ return Z({
2667
+ ampm: a,
2668
+ displayFormat: o,
2669
+ saveFormat: (i = e[`${t}SaveFormat`]) == null ? Ka[t] : i,
2670
+ placeholder: typeof e.placeholder == "string" ? e.placeholder : n
2671
+ }, Ya(e.views, o));
2672
+ }
2673
+ function Za(e, t) {
2674
+ var n, r, i;
2675
+ let a = $e(), s = Z(Z({}, e.config), e.uischema.options), c = Xa(s, t, B()(Ja[t])), { displayFormat: l, saveFormat: u, useSeconds: d } = c;
2676
+ o(() => {
2677
+ Br(e.schema.format, u);
2678
+ }, [e.schema.format, u]);
2679
+ let f = [
2680
+ u,
2681
+ l,
2682
+ "YYYY-MM-DDTHH:mm:ssZ",
2683
+ "HH:mm:ssZ",
2684
+ "HH:mm:ss"
2685
+ ], p = typeof e.data == "string" ? Nr(e.data, f) : null, m = p ? {
2686
+ hours: p.hour(),
2687
+ minutes: p.minute(),
2688
+ seconds: p.second()
2689
+ } : void 0, h = d ? "second" : "minute", g = Fr(e.schema, e.path, (n = a.core) == null ? void 0 : n.data), _ = Ir(g, f, t === "date" ? "day" : h, t === "time"), v = Pr(e.uischema.options, e.config), y = (e) => {
2690
+ let n = jr(e);
2691
+ return t === "time" ? n.year(2e3).month(0).date(1) : n;
2692
+ }, b = (e) => {
2693
+ if (!v) return !0;
2694
+ let t = y(e);
2695
+ return !_.empty && !(_.min && t.isBefore(_.min)) && !(_.max && t.isAfter(_.max));
2696
+ };
2697
+ return Z(Z({
2698
+ options: s,
2699
+ selected: p,
2700
+ selectedTime: m
2701
+ }, c), {}, {
2702
+ displayText: p ? Mr(p, l) : void 0,
2703
+ allowed: b,
2704
+ disabledDate: (e) => v && (_.empty || !!(_.min && jr(e).isBefore(_.min, "day")) || !!(_.max && jr(e).isAfter(_.max, "day"))),
2705
+ commit: (n) => {
2706
+ let r = jr(n).second(d || t === "date" ? n.getSeconds() : 0).millisecond(0);
2707
+ e.enabled && !e.readonly && b(r.toDate()) && e.handleChange(e.path, Mr(r, u));
2708
+ },
2709
+ min: v ? (r = _.min) == null ? void 0 : r.toDate() : void 0,
2710
+ max: v ? (i = _.max) == null ? void 0 : i.toDate() : void 0
2711
+ });
2712
+ }
2713
+ // src/util/dateTime.ts
2714
+ var Qa = (e) => String(e).padStart(2, "0"), $a = (e, t) => new Intl.DateTimeFormat(Ar(t), {
2715
+ year: "numeric",
2716
+ month: "short",
2717
+ day: "2-digit"
2718
+ }).format(e), eo = (e) => {
2719
+ var t;
2720
+ if (typeof e != "string") return;
2721
+ let n = /(?:T)?(\d{2}):(\d{2})(?::(\d{2}))?/.exec(e);
2722
+ if (!n) return;
2723
+ let r = {
2724
+ hours: Number(n[1]),
2725
+ minutes: Number(n[2]),
2726
+ seconds: Number((t = n[3]) == null ? 0 : t)
2727
+ };
2728
+ return r.hours < 24 && r.minutes < 60 && r.seconds < 60 ? r : void 0;
2729
+ }, to = (e, t = !0) => {
2730
+ let n = `${Qa(e.hours)}:${Qa(e.minutes)}`;
2731
+ return t ? `${n}:${Qa(e.seconds)}` : n;
2732
+ }, no = (e, t = !1) => {
2733
+ if (!t) return to(e, e.seconds !== 0);
2734
+ let n = e.hours >= 12 ? "PM" : "AM", r = `${Qa(e.hours % 12 || 12)}:${Qa(e.minutes)}`;
2735
+ return `${e.seconds ? `${r}:${Qa(e.seconds)}` : r} ${n}`;
2736
+ }, ro = (e, t, n = !1, r) => `${$a(e, r)}, ${no(t, n)}`, io = (e) => {
2737
+ var t, r, i, a, o, s, c, l;
2738
+ let d = B(), { data: f, description: p, enabled: m, errors: h, handleChange: g, label: _, path: v, required: x, uischema: S, visible: C } = e, w = Za(e, "date"), T = $e(), D = Z(Z({}, e.config), S.options), O = (e) => e.replace(/\[([^\]]*)\]|YYYY|YY|DD|D/g, (e, t) => t === void 0 ? {
2739
+ YYYY: "yyyy",
2740
+ YY: "yy",
2741
+ DD: "dd",
2742
+ D: "d"
2743
+ }[e] : "'" + t + "'"), k = typeof D.dateSaveFormat == "string" ? O(D.dateSaveFormat) : "yyyy-MM-dd", A = typeof f == "string" ? Hr(f, k, new Date(2e3, 0, 1)) : void 0, j = A && Ur(A) ? A : void 0, M = Array.isArray(D.views) && D.views.includes("month") && D.views.includes("year") && !D.views.includes("day") && !D.views.includes("date"), [N] = n.useState(() => /* @__PURE__ */ new Date()), [P, F] = n.useState(j == null ? N : j), [I, L] = n.useState(!1), [R] = n.useState(() => (/* @__PURE__ */ new Date()).getFullYear());
2744
+ if (!C) return null;
2745
+ let z = Q(v, _), ee = w.disabledDate, { min: V, max: H } = w, { placeholder: U } = w;
2746
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
2747
+ id: z,
2748
+ label: _,
2749
+ required: x,
2750
+ description: p,
2751
+ errors: h,
2752
+ children: /* @__PURE__ */ b("div", {
2753
+ className: "group relative w-full",
2754
+ children: [/* @__PURE__ */ b(ut, {
2755
+ open: I,
2756
+ onOpenChange: (e) => {
2757
+ e && F(j == null ? /* @__PURE__ */ new Date() : j), L(e);
2758
+ },
2759
+ children: [/* @__PURE__ */ y(ft, {
2760
+ asChild: !0,
2761
+ children: /* @__PURE__ */ b(u, {
2762
+ id: z,
2763
+ type: "button",
2764
+ variant: "outline",
2765
+ disabled: !m || e.readonly,
2766
+ autoFocus: ((t = S.options) == null ? void 0 : t.focus) === !0,
2767
+ "aria-invalid": !!h,
2768
+ className: "w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground",
2769
+ "data-empty": !j,
2770
+ children: [/* @__PURE__ */ y(E, { className: "h-4 w-4" }), j ? typeof D.dateFormat == "string" ? Vr(j, O(D.dateFormat)) : $a(j, (r = T.i18n) == null ? void 0 : r.locale) : U]
2771
+ })
2772
+ }), /* @__PURE__ */ y(dt, {
2773
+ align: "start",
2774
+ className: "w-auto p-0",
2775
+ children: M ? /* @__PURE__ */ b("div", {
2776
+ className: "space-y-4 p-3",
2777
+ children: [/* @__PURE__ */ b("div", {
2778
+ className: "flex gap-2",
2779
+ children: [/* @__PURE__ */ b(K, {
2780
+ value: String(P.getMonth()),
2781
+ onValueChange: (e) => F(new Date(P.getFullYear(), Number(e), 1)),
2782
+ children: [/* @__PURE__ */ y(ie, {
2783
+ "aria-label": d("temporal.month"),
2784
+ className: "w-36",
2785
+ children: /* @__PURE__ */ y(ae, {})
2786
+ }), /* @__PURE__ */ y(q, { children: Array.from({ length: 12 }, (e, t) => {
2787
+ var n;
2788
+ return /* @__PURE__ */ y(J, {
2789
+ value: String(t),
2790
+ children: new Intl.DateTimeFormat(Ar((n = T.i18n) == null ? void 0 : n.locale), { month: "long" }).format(new Date(2e3, t, 1))
2791
+ }, t);
2792
+ }) })]
2793
+ }), /* @__PURE__ */ b(K, {
2794
+ value: String(P.getFullYear()),
2795
+ onValueChange: (e) => F(new Date(Number(e), P.getMonth(), 1)),
2796
+ children: [/* @__PURE__ */ y(ie, {
2797
+ "aria-label": d("temporal.year"),
2798
+ className: "w-24",
2799
+ children: /* @__PURE__ */ y(ae, {})
2800
+ }), /* @__PURE__ */ y(q, { children: Array.from({ length: ((i = H == null ? void 0 : H.getFullYear()) == null ? R + 100 : i) - ((a = V == null ? void 0 : V.getFullYear()) == null ? R - 100 : a) + 1 }, (e, t) => {
2801
+ var n;
2802
+ return ((n = V == null ? void 0 : V.getFullYear()) == null ? R - 100 : n) + t;
2803
+ }).map((e) => /* @__PURE__ */ y(J, {
2804
+ value: String(e),
2805
+ children: e
2806
+ }, e)) })]
2807
+ })]
2808
+ }), /* @__PURE__ */ b("div", {
2809
+ className: "flex justify-end gap-2",
2810
+ children: [/* @__PURE__ */ y(u, {
2811
+ variant: "outline",
2812
+ type: "button",
2813
+ onClick: () => L(!1),
2814
+ children: d("control.cancel")
2815
+ }), /* @__PURE__ */ y(u, {
2816
+ type: "button",
2817
+ disabled: !!(V && P < V || H && P > H),
2818
+ onClick: () => {
2819
+ w.commit(P), L(!1);
2820
+ },
2821
+ children: d("control.apply")
2822
+ })]
2823
+ })]
2824
+ }) : /* @__PURE__ */ y(Wr, {
2825
+ mode: "single",
2826
+ selected: j,
2827
+ defaultMonth: j,
2828
+ onSelect: (t) => {
2829
+ t ? w.commit(t) : m && !e.readonly && g(v, void 0), L(!1);
2830
+ },
2831
+ disabled: ee,
2832
+ captionLayout: "dropdown",
2833
+ startMonth: V == null ? new Date(R - 100, 0) : V,
2834
+ endMonth: H == null ? new Date(R + 20, 11) : H
2835
+ })
2836
+ })]
2837
+ }), j && m && !e.readonly && ((o = (s = (c = S.options) == null ? void 0 : c.clearable) == null ? (l = e.config) == null ? void 0 : l.clearable : s) == null || o) ? /* @__PURE__ */ y(u, {
2838
+ type: "button",
2839
+ variant: "ghost",
2840
+ size: "icon",
2841
+ className: "absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
2842
+ "aria-label": d("temporal.clearDate"),
2843
+ title: d("temporal.clearDate"),
2844
+ onClick: () => g(v, void 0),
2845
+ children: /* @__PURE__ */ y(te, { className: "h-4 w-4" })
2846
+ }) : null]
2847
+ })
2848
+ }));
2849
+ }, ao = Y(4, je), oo = {
2850
+ hours: {
2851
+ increase: "temporal.increaseHours",
2852
+ decrease: "temporal.decreaseHours"
2853
+ },
2854
+ minutes: {
2855
+ increase: "temporal.increaseMinutes",
2856
+ decrease: "temporal.decreaseMinutes"
2857
+ },
2858
+ seconds: {
2859
+ increase: "temporal.increaseSeconds",
2860
+ decrease: "temporal.decreaseSeconds"
2861
+ }
2862
+ }, so = {
2863
+ hours: 0,
2864
+ minutes: 0,
2865
+ seconds: 0
2866
+ }, co = ({ part: e, label: t, displayedValue: n, onValueChange: r, onStep: i, ampm: a, disabled: o, time: s, isAllowed: c }) => {
2867
+ let l = B();
2868
+ return /* @__PURE__ */ b("div", {
2869
+ className: "flex flex-col items-center gap-1",
2870
+ children: [
2871
+ /* @__PURE__ */ y(u, {
2872
+ type: "button",
2873
+ variant: "ghost",
2874
+ size: "icon",
2875
+ disabled: o,
2876
+ "aria-label": l(oo[e].increase),
2877
+ onClick: () => i(1),
2878
+ children: /* @__PURE__ */ y(j, { className: "h-4 w-4" })
2879
+ }),
2880
+ /* @__PURE__ */ y(G, {
2881
+ type: "number",
2882
+ inputMode: "numeric",
2883
+ 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",
2884
+ value: n == null ? "" : n,
2885
+ placeholder: "--",
2886
+ min: a && e === "hours" ? 1 : 0,
2887
+ max: e === "hours" ? a ? 12 : 23 : 59,
2888
+ disabled: o,
2889
+ "aria-label": t,
2890
+ "aria-invalid": s && c ? !c(s) : void 0,
2891
+ onChange: (e) => {
2892
+ e.currentTarget.value !== "" && r(Number(e.currentTarget.value));
2893
+ }
2894
+ }),
2895
+ /* @__PURE__ */ y(u, {
2896
+ type: "button",
2897
+ variant: "ghost",
2898
+ size: "icon",
2899
+ disabled: o,
2900
+ "aria-label": l(oo[e].decrease),
2901
+ onClick: () => i(-1),
2902
+ children: /* @__PURE__ */ y(O, { className: "h-4 w-4" })
2903
+ })
2904
+ ]
2905
+ });
2906
+ }, lo = ({ hours: e = 0, disabled: t, onChange: n }) => {
2907
+ let r = B();
2908
+ return /* @__PURE__ */ b("div", {
2909
+ className: "ml-2 grid gap-1",
2910
+ "aria-label": r("temporal.period"),
2911
+ children: [/* @__PURE__ */ y(u, {
2912
+ type: "button",
2913
+ size: "sm",
2914
+ variant: e < 12 ? "default" : "outline",
2915
+ disabled: t,
2916
+ onClick: () => n(!1),
2917
+ children: r("temporal.am")
2918
+ }), /* @__PURE__ */ y(u, {
2919
+ type: "button",
2920
+ size: "sm",
2921
+ variant: e >= 12 ? "default" : "outline",
2922
+ disabled: t,
2923
+ onClick: () => n(!0),
2924
+ children: r("temporal.pm")
2925
+ })]
2926
+ });
2927
+ }, uo = (e, t) => t ? e % 12 || 12 : e, fo = ({ value: e, onChange: t, useSeconds: r = !1, showHours: i = !0, showMinutes: a = !0, ampm: o = !1, disabled: s = !1, isAllowed: c }) => {
2928
+ let l = B(), u = eo(e), [d, f] = n.useState(u), [p, m] = n.useState(e);
2929
+ p !== e && (m(e), f(u));
2930
+ let h = (e) => {
2931
+ f(e), (!c || c(e)) && t(to(e, r));
2932
+ }, g = (e, t) => {
2933
+ let n = d == null ? so : d, r = e === "hours" ? 23 : 59;
2934
+ h(Z(Z({}, n), {}, { [e]: Math.max(0, Math.min(r, t)) }));
2935
+ }, _ = (e, t) => {
2936
+ let n = d == null ? so : d, r = e === "hours" ? 23 : 59, i = (n[e] + t + r + 1) % (r + 1);
2937
+ h(Z(Z({}, n), {}, { [e]: i }));
2938
+ }, x = d ? uo(d.hours, o) : void 0, S = (e) => {
2939
+ var t;
2940
+ if (!o) {
2941
+ g("hours", e);
2942
+ return;
2943
+ }
2944
+ let n = Math.max(1, Math.min(12, e)), r = ((t = d == null ? void 0 : d.hours) == null ? 0 : t) >= 12;
2945
+ g("hours", n % 12 + (r ? 12 : 0));
2946
+ }, C = (e) => {
2947
+ let t = d == null ? so : d, n = t.hours % 12 + (e ? 12 : 0);
2948
+ h(Z(Z({}, t), {}, { hours: n }));
2949
+ }, w = (e, t, n, r = (t) => g(e, t)) => /* @__PURE__ */ y(co, {
2950
+ part: e,
2951
+ label: t,
2952
+ displayedValue: n,
2953
+ onValueChange: r,
2954
+ onStep: (t) => _(e, t),
2955
+ ampm: o,
2956
+ disabled: s,
2957
+ time: d,
2958
+ isAllowed: c
2959
+ });
2960
+ return /* @__PURE__ */ b("div", {
2961
+ className: "flex items-center justify-center gap-2",
2962
+ "data-slot": "time-picker",
2963
+ children: [
2964
+ i && w("hours", l("temporal.hours"), x, S),
2965
+ i && a && /* @__PURE__ */ y("span", {
2966
+ className: "select-none text-2xl font-semibold",
2967
+ children: ":"
2968
+ }),
2969
+ a && w("minutes", l("temporal.minutes"), d == null ? void 0 : d.minutes),
2970
+ r ? /* @__PURE__ */ b(v, { children: [(i || a) && /* @__PURE__ */ y("span", {
2971
+ className: "select-none text-2xl font-semibold",
2972
+ children: ":"
2973
+ }), w("seconds", l("temporal.seconds"), d == null ? void 0 : d.seconds)] }) : null,
2974
+ o && i ? /* @__PURE__ */ y(lo, {
2975
+ hours: d == null ? void 0 : d.hours,
2976
+ disabled: s,
2977
+ onChange: C
2978
+ }) : null
2979
+ ]
2980
+ });
2981
+ }, po = (e) => {
2982
+ var t, r, i, a, o, s, c;
2983
+ let l = B(), d = (t = $e().i18n) == null ? void 0 : t.locale, { data: f, description: p, enabled: m, errors: h, handleChange: g, label: _, path: v, required: x, uischema: S, visible: C } = e, w = Za(e, "dateTime"), [E, D] = n.useState(!1), [O] = n.useState(() => (/* @__PURE__ */ new Date()).getFullYear()), [k, A] = n.useState(), [j, M] = n.useState();
2984
+ if (!C) return null;
2985
+ let N = Q(v, _), P = (r = w.selected) == null ? void 0 : r.toDate(), { selectedTime: F, ampm: I, useSeconds: L, placeholder: R } = w, z = (e, t) => {
2986
+ if (e && t) {
2987
+ let n = new Date(e);
2988
+ n.setHours(t.hours, t.minutes, t.seconds, 0), w.commit(n);
2989
+ }
2990
+ };
2991
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
2992
+ id: N,
2993
+ label: _,
2994
+ required: x,
2995
+ description: p,
2996
+ errors: h,
2997
+ children: /* @__PURE__ */ b("div", {
2998
+ className: "group relative w-full",
2999
+ children: [/* @__PURE__ */ b(ut, {
3000
+ open: E,
3001
+ onOpenChange: (e) => {
3002
+ D(e), e && (A(P), M(F));
3003
+ },
3004
+ children: [/* @__PURE__ */ y(ft, {
3005
+ asChild: !0,
3006
+ children: /* @__PURE__ */ b(u, {
3007
+ id: N,
3008
+ type: "button",
3009
+ variant: "outline",
3010
+ disabled: !m || e.readonly,
3011
+ autoFocus: ((i = S.options) == null ? void 0 : i.focus) === !0,
3012
+ "aria-invalid": !!h,
3013
+ className: "w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground",
3014
+ "data-empty": !P || !F,
3015
+ children: [/* @__PURE__ */ y(T, { className: "h-4 w-4" }), P && F ? typeof w.options.dateTimeFormat == "string" ? w.displayText : ro(P, F, I, d) : typeof f == "string" && f ? f : R]
3016
+ })
3017
+ }), /* @__PURE__ */ b(dt, {
3018
+ align: "start",
3019
+ className: "w-auto p-2",
3020
+ children: [
3021
+ /* @__PURE__ */ y(Wr, {
3022
+ mode: "single",
3023
+ disabled: w.disabledDate,
3024
+ selected: k,
3025
+ defaultMonth: k == null ? P : k,
3026
+ captionLayout: "dropdown",
3027
+ startMonth: new Date(O - 100, 0),
3028
+ endMonth: new Date(O + 20, 11),
3029
+ onSelect: (e) => {
3030
+ var t;
3031
+ let n = (t = j == null ? F : j) == null ? {
3032
+ hours: 0,
3033
+ minutes: 0,
3034
+ seconds: 0
3035
+ } : t;
3036
+ A(e), M(n), z(e, n);
3037
+ }
3038
+ }),
3039
+ /* @__PURE__ */ y("div", {
3040
+ className: "border-t p-2 pt-3",
3041
+ children: /* @__PURE__ */ y(fo, {
3042
+ value: j ? to(j, !0) : typeof f == "string" ? f : void 0,
3043
+ useSeconds: L,
3044
+ showHours: w.showHours,
3045
+ showMinutes: w.showMinutes,
3046
+ ampm: I,
3047
+ disabled: !m || e.readonly,
3048
+ isAllowed: (e) => {
3049
+ var t;
3050
+ let n = new Date((t = k == null ? P : k) == null ? /* @__PURE__ */ new Date() : t);
3051
+ return n.setHours(e.hours, e.minutes, e.seconds, 0), w.allowed(n);
3052
+ },
3053
+ onChange: (e) => {
3054
+ let t = eo(e);
3055
+ M(t), z(k == null ? P : k, t);
3056
+ }
3057
+ })
3058
+ }),
3059
+ /* @__PURE__ */ y("div", {
3060
+ className: "flex justify-end p-2 pt-0",
3061
+ children: /* @__PURE__ */ y(u, {
3062
+ type: "button",
3063
+ size: "sm",
3064
+ onClick: () => D(!1),
3065
+ children: l("control.done")
3066
+ })
3067
+ })
3068
+ ]
3069
+ })]
3070
+ }), P && m && !e.readonly && ((a = (o = (s = S.options) == null ? void 0 : s.clearable) == null ? (c = e.config) == null ? void 0 : c.clearable : o) == null || a) ? /* @__PURE__ */ y(u, {
3071
+ type: "button",
3072
+ variant: "ghost",
3073
+ size: "icon",
3074
+ className: "absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
3075
+ "aria-label": l("temporal.clearDateTime"),
3076
+ title: l("temporal.clearDateTime"),
3077
+ onClick: () => g(v, void 0),
3078
+ children: /* @__PURE__ */ y(te, { className: "h-4 w-4" })
3079
+ }) : null]
3080
+ })
3081
+ }));
3082
+ }, mo = Y(4, Me);
3083
+ // src/controls/EnumControl.tsx
3084
+ function ho(e, t) {
3085
+ var n, r, i, a;
3086
+ let o = e == null ? {} : e, s = t == null ? {} : t;
3087
+ return {
3088
+ searchable: ((n = o.autocomplete) == null ? s.autocomplete : n) === !0,
3089
+ clearable: (r = (i = o.clearable) == null ? s.clearable : i) == null || r,
3090
+ placeholder: (a = o.placeholder) == null ? s.placeholder : a
3091
+ };
3092
+ }
3093
+ var go = ({ schema: e, data: t, config: r, description: i, enabled: a, errors: o, handleChange: s, label: c, options: l, path: u, required: d, readonly: f, uischema: p, visible: m }) => {
3094
+ let h = B(), [g, _] = n.useState(""), { searchable: v, clearable: x, placeholder: S } = ho(p.options, r), C = (l == null ? [] : l).map((e, t) => ({
3095
+ option: e,
3096
+ index: t
3097
+ })).filter(({ option: e }) => !v || e.label.toLocaleLowerCase().includes(g.toLocaleLowerCase()));
3098
+ if (!m) return null;
3099
+ let w = Q(u, c), T = x && a && !f && Ei(t);
3100
+ return /* @__PURE__ */ y($, {
3101
+ path: u,
3102
+ schema: e,
3103
+ config: r,
3104
+ uischema: p,
3105
+ id: w,
3106
+ label: c,
3107
+ required: d,
3108
+ description: i,
3109
+ errors: o,
3110
+ children: /* @__PURE__ */ b("div", {
3111
+ className: "group relative w-full",
3112
+ children: [/* @__PURE__ */ b(K, {
3113
+ onOpenChange: () => _(""),
3114
+ disabled: !a || f,
3115
+ value: (() => {
3116
+ let e = (l == null ? [] : l).findIndex((e) => Gr(e.value, t));
3117
+ return e < 0 ? "" : `option-${e}`;
3118
+ })(),
3119
+ onValueChange: (e) => {
3120
+ let t = (l == null ? [] : l)[Number(e.replace("option-", ""))];
3121
+ t && a && !f && s(u, t.value);
3122
+ },
3123
+ children: [/* @__PURE__ */ y(ie, {
3124
+ id: w,
3125
+ className: "shadcn-jsonforms-input shadcn-jsonforms-select w-full min-w-0 pr-3",
3126
+ children: /* @__PURE__ */ y(ae, {
3127
+ className: T ? "mr-10 min-w-0" : "min-w-0",
3128
+ placeholder: S == null ? h("enum.select") : S
3129
+ })
3130
+ }), /* @__PURE__ */ b(q, {
3131
+ className: "shadcn-jsonforms-select-content",
3132
+ children: [
3133
+ v && /* @__PURE__ */ y(G, {
3134
+ type: "search",
3135
+ role: "searchbox",
3136
+ "aria-label": h("enum.search"),
3137
+ value: g,
3138
+ disabled: !a || f,
3139
+ onChange: (e) => _(e.currentTarget.value),
3140
+ onKeyDown: (e) => {
3141
+ [
3142
+ "ArrowUp",
3143
+ "ArrowDown",
3144
+ "Escape",
3145
+ "Tab"
3146
+ ].includes(e.key) || e.stopPropagation();
3147
+ }
3148
+ }),
3149
+ v && C.length === 0 && /* @__PURE__ */ y("div", {
3150
+ role: "status",
3151
+ children: h("enum.noMatches")
3152
+ }),
3153
+ C.map(({ option: e, index: t }) => /* @__PURE__ */ y(J, {
3154
+ className: "shadcn-jsonforms-select-item",
3155
+ value: `option-${t}`,
3156
+ children: e.label
3157
+ }, t))
3158
+ ]
3159
+ })]
3160
+ }), /* @__PURE__ */ y(Di, {
3161
+ clearable: x,
3162
+ trailingControlSpace: 36,
3163
+ data: t,
3164
+ enabled: a,
3165
+ readonly: f,
3166
+ onClear: () => s(u, void 0)
3167
+ })]
3168
+ })
3169
+ });
3170
+ }, _o = Y(2, Ne), vo = (e) => /* @__PURE__ */ y(Ai, Z(Z({}, e), {}, { integer: !0 })), yo = Y(2, Pe), bo = (e) => /* @__PURE__ */ y(Ai, Z({}, e)), xo = Y(1, Fe), So = (e) => {
3171
+ var t, n, r, i;
3172
+ if (!e.visible) return null;
3173
+ if (!((t = e.uischema.options) != null && t.multi)) return /* @__PURE__ */ y(ki, Z(Z({}, e), {}, { type: "text" }));
3174
+ let a = Q(e.path, e.label);
3175
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
3176
+ id: a,
3177
+ label: e.label,
3178
+ required: e.required,
3179
+ description: e.description,
3180
+ errors: e.errors,
3181
+ children: /* @__PURE__ */ y(Kr, {
3182
+ id: a,
3183
+ maxLength: ((n = (r = e.uischema.options) == null ? void 0 : r.restrict) == null ? (i = e.config) != null && i.restrict : n) ? e.schema.maxLength : void 0,
3184
+ value: Oi(e.data),
3185
+ disabled: !e.enabled || e.readonly,
3186
+ "aria-invalid": !!e.errors,
3187
+ "aria-describedby": e.errors ? `${a}-errors` : void 0,
3188
+ onChange: (t) => e.handleChange(e.path, t.currentTarget.value || void 0)
3189
+ })
3190
+ }));
3191
+ }, Co = Y(1, Ve), wo = (e) => {
3192
+ var t, r, i, a, o;
3193
+ let s = B(), { data: c, description: l, enabled: d, errors: f, handleChange: p, label: m, path: h, required: g, uischema: _, visible: v } = e, x = Za(e, "time"), [S, C] = n.useState(!1);
3194
+ if (!v) return null;
3195
+ let w = Q(h, m), { selectedTime: T, ampm: E, useSeconds: D, placeholder: O } = x;
3196
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
3197
+ id: w,
3198
+ label: m,
3199
+ required: g,
3200
+ description: l,
3201
+ errors: f,
3202
+ children: /* @__PURE__ */ b("div", {
3203
+ className: "group relative w-full",
3204
+ children: [/* @__PURE__ */ b(ut, {
3205
+ open: S,
3206
+ onOpenChange: C,
3207
+ children: [/* @__PURE__ */ y(ft, {
3208
+ asChild: !0,
3209
+ children: /* @__PURE__ */ b(u, {
3210
+ id: w,
3211
+ type: "button",
3212
+ variant: "outline",
3213
+ disabled: !d || e.readonly,
3214
+ autoFocus: ((t = _.options) == null ? void 0 : t.focus) === !0,
3215
+ "aria-invalid": !!f,
3216
+ className: "w-full justify-start pr-10 text-left font-normal data-[empty=true]:text-muted-foreground",
3217
+ "data-empty": !T,
3218
+ children: [/* @__PURE__ */ y(N, { className: "h-4 w-4" }), T ? x.displayText : typeof c == "string" && c ? c : O]
3219
+ })
3220
+ }), /* @__PURE__ */ b(dt, {
3221
+ align: "start",
3222
+ className: "w-auto p-4",
3223
+ children: [/* @__PURE__ */ y(fo, {
3224
+ value: T ? to(T, !0) : typeof c == "string" ? c : void 0,
3225
+ useSeconds: D,
3226
+ showHours: x.showHours,
3227
+ showMinutes: x.showMinutes,
3228
+ ampm: E,
3229
+ disabled: !d || e.readonly,
3230
+ isAllowed: (e) => x.allowed(new Date(2e3, 0, 1, e.hours, e.minutes, e.seconds)),
3231
+ onChange: (e) => {
3232
+ let t = eo(e);
3233
+ if (t) {
3234
+ let e = new Date(2e3, 0, 1, t.hours, t.minutes, t.seconds);
3235
+ x.commit(e);
3236
+ }
3237
+ }
3238
+ }), /* @__PURE__ */ y("div", {
3239
+ className: "mt-3 flex justify-end",
3240
+ children: /* @__PURE__ */ y(u, {
3241
+ type: "button",
3242
+ size: "sm",
3243
+ onClick: () => C(!1),
3244
+ children: s("control.done")
3245
+ })
3246
+ })]
3247
+ })]
3248
+ }), T && d && !e.readonly && ((r = (i = (a = _.options) == null ? void 0 : a.clearable) == null ? (o = e.config) == null ? void 0 : o.clearable : i) == null || r) ? /* @__PURE__ */ y(u, {
3249
+ type: "button",
3250
+ variant: "ghost",
3251
+ size: "icon",
3252
+ className: "absolute end-1 top-1 h-8 w-8 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
3253
+ "aria-label": s("temporal.clearTime"),
3254
+ title: s("temporal.clearTime"),
3255
+ onClick: () => p(h, void 0),
3256
+ children: /* @__PURE__ */ y(te, { className: "h-4 w-4" })
3257
+ }) : null]
3258
+ })
3259
+ }));
3260
+ }, To = Y(4, He), Eo = Y(5, ze), Do = ot(ct(n.memo(go)), !1), Oo = (e) => {
3261
+ let t = B();
3262
+ if (!e.visible) return null;
3263
+ let n = Q(e.path, e.label), r = typeof e.data == "boolean", i = `${n}-state`;
3264
+ return /* @__PURE__ */ b($, Z(Z({}, e), {}, {
3265
+ id: n,
3266
+ label: e.label,
3267
+ required: e.required,
3268
+ description: e.description,
3269
+ errors: e.errors,
3270
+ children: [/* @__PURE__ */ y(qr, {
3271
+ id: n,
3272
+ checked: e.data === !0,
3273
+ disabled: !e.enabled || e.readonly,
3274
+ "aria-invalid": !!e.errors,
3275
+ "aria-describedby": [e.errors ? `${n}-errors` : void 0, r ? void 0 : i].filter(Boolean).join(" ") || void 0,
3276
+ onCheckedChange: (t) => e.handleChange(e.path, t)
3277
+ }), !r && /* @__PURE__ */ y("span", {
3278
+ id: i,
3279
+ className: "sr-only",
3280
+ children: t(e.data === void 0 || e.data === null ? "boolean.notSet" : "boolean.invalid")
3281
+ })]
3282
+ }));
3283
+ }, ko = Y(3, he(Ae, We("toggle", !0))), Ao = (e) => {
3284
+ var t, n, r, i, a;
3285
+ if (!e.visible) return null;
3286
+ let o = Q(e.path, e.label), s = (t = e.options) == null ? [] : t, c = s.findIndex((t) => Gr(t.value, e.data)), l = ((n = (r = (i = e.uischema.options) == null ? void 0 : i.vertical) == null ? (a = e.config) == null || (a = a.jsonformsExtended) == null || (a = a.radio) == null ? void 0 : a.vertical : r) != null && n) === !0 ? "vertical" : "horizontal";
3287
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
3288
+ id: o,
3289
+ label: e.label,
3290
+ required: e.required,
3291
+ description: e.description,
3292
+ errors: e.errors,
3293
+ children: /* @__PURE__ */ y(Jr, {
3294
+ id: o,
3295
+ "aria-label": e.label,
3296
+ orientation: l,
3297
+ className: l === "horizontal" ? "flex flex-wrap gap-4" : void 0,
3298
+ value: c < 0 ? "" : `option-${c}`,
3299
+ disabled: !e.enabled || e.readonly,
3300
+ onValueChange: (t) => {
3301
+ let n = s[Number(t.replace("option-", ""))];
3302
+ n && e.handleChange(e.path, n.value);
3303
+ },
3304
+ children: s.map((e, t) => /* @__PURE__ */ b("label", {
3305
+ className: "flex items-center gap-2",
3306
+ htmlFor: `${o}-${t}`,
3307
+ children: [/* @__PURE__ */ y(Yr, {
3308
+ id: `${o}-${t}`,
3309
+ value: `option-${t}`
3310
+ }), e.label]
3311
+ }, t))
3312
+ })
3313
+ }));
3314
+ }, jo = Y(20, he(Ne, We("format", "radio"))), Mo = (e) => {
3315
+ var t, n, r;
3316
+ let i = B();
3317
+ if (!e.visible) return null;
3318
+ let a = Q(e.path, e.label), o = (t = e.schema.minimum) == null ? 0 : t, s = (n = e.schema.maximum) == null ? 100 : n, c = typeof e.data == "number" && Number.isFinite(e.data) ? e.data : void 0, l = s > o ? Math.max(0, Math.min(100, ((c == null ? o : c) - o) / (s - o) * 100)) : 0;
3319
+ return /* @__PURE__ */ y($, Z(Z({}, e), {}, {
3320
+ id: a,
3321
+ label: e.label,
3322
+ required: e.required,
3323
+ description: e.description,
3324
+ errors: e.errors,
3325
+ children: /* @__PURE__ */ b("div", {
3326
+ className: "flex items-end gap-3",
3327
+ children: [
3328
+ /* @__PURE__ */ y("span", {
3329
+ className: "text-sm text-muted-foreground tabular-nums",
3330
+ "data-slider-min": !0,
3331
+ children: o
3332
+ }),
3333
+ /* @__PURE__ */ b("div", {
3334
+ className: "relative min-w-0 flex-1 pt-9 pb-2",
3335
+ children: [c !== void 0 && /* @__PURE__ */ y("output", {
3336
+ htmlFor: a,
3337
+ "data-slider-value": !0,
3338
+ className: "absolute top-0 -translate-x-1/2 rounded border bg-background px-2 py-0.5 text-xs tabular-nums shadow-sm",
3339
+ style: { left: `${l}%` },
3340
+ children: c
3341
+ }), /* @__PURE__ */ y(Xr, {
3342
+ id: a,
3343
+ "aria-label": e.label,
3344
+ "aria-valuetext": c === void 0 ? i("control.notSet") : void 0,
3345
+ min: o,
3346
+ max: s,
3347
+ step: (r = e.schema.multipleOf) == null ? 1 : r,
3348
+ value: [c == null ? o : c],
3349
+ disabled: !e.enabled || e.readonly,
3350
+ onValueChange: ([t]) => e.handleChange(e.path, e.schema.type === "integer" ? Math.trunc(t) : t)
3351
+ })]
3352
+ }),
3353
+ /* @__PURE__ */ y("span", {
3354
+ className: "text-sm text-muted-foreground tabular-nums",
3355
+ "data-slider-max": !0,
3356
+ children: s
3357
+ })
3358
+ ]
3359
+ })
3360
+ }));
3361
+ }, No = Y(4, Be), Po = ({ category: e, path: t, config: n }) => {
3362
+ let r = Vn(e, t, n), i = mt(e, t, n, !1), a = B();
3363
+ return /* @__PURE__ */ b("span", {
3364
+ className: "inline-flex items-center gap-1",
3365
+ children: [i.show && /* @__PURE__ */ y(ci, { count: i.count }), r.hasData && /* @__PURE__ */ y("span", {
3366
+ role: "img",
3367
+ "aria-label": a("group.dataIndicator"),
3368
+ title: a("group.dataIndicator"),
3369
+ "data-category-data-indicator": !0,
3370
+ children: "●"
3371
+ })]
3372
+ });
3373
+ }, Fo = (e) => {
3374
+ var t, n, r;
3375
+ let i = $e(), a = H(), o = B(), c = s(), l = e.uischema, d = (t = l.options) == null ? void 0 : t.variant, f = Z(Z({}, e.config), l.options), { categories: p, active: m, select: h, close: g } = Qr(l, (n = i.core) == null ? void 0 : n.data, (r = i.core) == null ? void 0 : r.ajv, e.config, void 0, d === "accordion", e.path);
3376
+ if (!e.visible || p.length === 0) return null;
3377
+ let _ = (e, t) => Zr(e, t), v = (e) => Ce(e, a), x = (t) => /* @__PURE__ */ y(Qe, {
3378
+ schema: e.schema,
3379
+ uischema: Z(Z({}, t), {}, { type: "VerticalLayout" }),
3380
+ path: e.path,
3381
+ enabled: e.enabled,
3382
+ renderers: e.renderers,
3383
+ cells: e.cells
3384
+ }), S = (t) => /* @__PURE__ */ y(Po, {
3385
+ category: t,
3386
+ path: e.path,
3387
+ config: e.config
3388
+ });
3389
+ return d === "accordion" ? /* @__PURE__ */ y("div", {
3390
+ className: "shadcn-jsonforms-categorization space-y-1",
3391
+ children: p.map((e, t) => {
3392
+ let n = `${c}-${encodeURIComponent(_(e, t))}`, r = t === m;
3393
+ return /* @__PURE__ */ b("div", {
3394
+ className: "border-b",
3395
+ children: [/* @__PURE__ */ y("h3", { children: /* @__PURE__ */ b(u, {
3396
+ type: "button",
3397
+ variant: "ghost",
3398
+ className: "h-auto w-full justify-between py-4 text-left",
3399
+ id: `${n}-header`,
3400
+ "aria-expanded": r,
3401
+ "aria-controls": `${n}-panel`,
3402
+ onClick: () => r ? g() : h(t),
3403
+ children: [/* @__PURE__ */ y("span", { children: v(e) }), /* @__PURE__ */ b("span", {
3404
+ className: "ml-auto flex items-center gap-2",
3405
+ children: [S(e), /* @__PURE__ */ y(O, {
3406
+ "aria-hidden": "true",
3407
+ className: r ? "h-4 w-4 rotate-180" : "h-4 w-4"
3408
+ })]
3409
+ })]
3410
+ }) }), /* @__PURE__ */ y("div", {
3411
+ id: `${n}-panel`,
3412
+ role: "region",
3413
+ "aria-labelledby": `${n}-header`,
3414
+ hidden: !r,
3415
+ className: "pb-4",
3416
+ children: x(e)
3417
+ })]
3418
+ }, _(e, t));
3419
+ })
3420
+ }) : d === "stepper" ? /* @__PURE__ */ b("div", {
3421
+ className: "shadcn-jsonforms-categorization space-y-4",
3422
+ children: [
3423
+ /* @__PURE__ */ y("ol", {
3424
+ className: f.vertical ? "flex flex-col gap-2" : "flex flex-wrap gap-2",
3425
+ children: p.map((e, t) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ b(u, {
3426
+ type: "button",
3427
+ variant: t === m ? "default" : "outline",
3428
+ "aria-current": t === m ? "step" : void 0,
3429
+ "aria-controls": `${c}-step-${t}`,
3430
+ id: `${c}-step-heading-${t}`,
3431
+ onClick: () => h(t),
3432
+ children: [
3433
+ /* @__PURE__ */ b("span", {
3434
+ "aria-hidden": "true",
3435
+ children: [t + 1, "."]
3436
+ }),
3437
+ v(e),
3438
+ S(e)
3439
+ ]
3440
+ }) }, _(e, t)))
3441
+ }),
3442
+ p.map((e, t) => /* @__PURE__ */ y("div", {
3443
+ id: `${c}-step-${t}`,
3444
+ role: "region",
3445
+ "aria-labelledby": `${c}-step-heading-${t}`,
3446
+ hidden: t !== m,
3447
+ children: x(e)
3448
+ }, _(e, t))),
3449
+ f.showNavButtons && /* @__PURE__ */ b("div", {
3450
+ className: "flex justify-end gap-2",
3451
+ children: [/* @__PURE__ */ y(u, {
3452
+ type: "button",
3453
+ variant: "outline",
3454
+ disabled: m <= 0,
3455
+ onClick: () => h(m - 1),
3456
+ children: o("categorization.previous")
3457
+ }), /* @__PURE__ */ y(u, {
3458
+ type: "button",
3459
+ disabled: m < 0 || m >= p.length - 1,
3460
+ onClick: () => h(m + 1),
3461
+ children: o("categorization.next")
3462
+ })]
3463
+ })
3464
+ ]
3465
+ }) : /* @__PURE__ */ b(Pn, {
3466
+ className: "shadcn-jsonforms-categorization",
3467
+ value: String(m),
3468
+ onValueChange: (e) => h(Number(e)),
3469
+ children: [/* @__PURE__ */ y(In, { children: p.map((e, t) => /* @__PURE__ */ b(Ln, {
3470
+ value: String(t),
3471
+ children: [v(e), S(e)]
3472
+ }, _(e, t))) }), p.map((e, t) => /* @__PURE__ */ y(Fn, {
3473
+ value: String(t),
3474
+ forceMount: !0,
3475
+ hidden: t !== m,
3476
+ children: x(e)
3477
+ }, _(e, t)))]
3478
+ });
3479
+ }, Io = Y(1, Je("Categorization")), Lo = Y(3, he(Je("Categorization"), ge, We("variant", "accordion"))), Ro = Y(2, he(Je("Categorization"), ge, We("variant", "stepper"))), zo = ["direction"], Bo = (e) => {
3480
+ var t;
3481
+ let { direction: n } = e, r = qi(e, zo), i = r.uischema, a = $r((t = i.elements) == null ? [] : t, r.path, r.config);
3482
+ if (!r.visible) return null;
3483
+ let o = ni(i.options, r.config, n, {
3484
+ row: 16,
3485
+ column: 16
3486
+ }), s = ri(i.options, r.config);
3487
+ return /* @__PURE__ */ y("div", {
3488
+ "data-layout": n,
3489
+ className: `shadcn-jsonforms-layout shadcn-jsonforms-layout-${n}`,
3490
+ style: ei(i.options, r.config, n, {
3491
+ row: 16,
3492
+ column: 16
3493
+ }),
3494
+ children: a.map((e, t) => {
3495
+ var a, c;
3496
+ return /* @__PURE__ */ y("div", {
3497
+ style: ti(e, n, s, o, (a = i.options) == null ? void 0 : a.minItemWidth).style,
3498
+ children: /* @__PURE__ */ y(Qe, {
3499
+ schema: r.schema,
3500
+ uischema: e,
3501
+ path: r.path,
3502
+ enabled: r.enabled,
3503
+ renderers: r.renderers,
3504
+ cells: r.cells
3505
+ })
3506
+ }, `${(c = e.scope) == null ? e.type : c}-${t}`);
3507
+ })
3508
+ });
3509
+ }, Vo = (e) => {
3510
+ var t, r, i, a, o, s;
3511
+ let c = e.uischema, l = (t, n) => /* @__PURE__ */ y(Qe, {
3512
+ schema: e.schema,
3513
+ uischema: t,
3514
+ path: e.path,
3515
+ enabled: e.enabled,
3516
+ renderers: e.renderers,
3517
+ cells: e.cells
3518
+ }, n), d = Hn(e.uischema, e.path, e.config), f = B(), p = c.footer, m = !!(c.cover || (t = c.header) != null && t.length || p != null && p.length), h = m ? hn : "div", g = Bn(e.path, c.header), _ = mt(e.uischema, e.path, e.config, !1), x = n.useContext(Dr), S = (x == null ? void 0 : x.uischema) === e.uischema ? x.additional : null, C = n.useContext(Mt), w = (C == null ? void 0 : C.uischema) === e.uischema, T = w ? C.message : "";
3519
+ if (!e.visible) return null;
3520
+ let E = /* @__PURE__ */ b(v, { children: [!((r = c.header) != null && r.length) && /* @__PURE__ */ y("span", {
3521
+ className: "shadcn-jsonforms-group-title",
3522
+ children: e.label
3523
+ }), /* @__PURE__ */ b("span", {
3524
+ className: "shadcn-jsonforms-group-actions",
3525
+ children: [
3526
+ w ? T ? /* @__PURE__ */ y(gi, {
3527
+ local: !0,
3528
+ errors: T
3529
+ }) : null : _.show && /* @__PURE__ */ y(ci, { count: _.count }),
3530
+ d.hasData && /* @__PURE__ */ y("span", {
3531
+ role: "img",
3532
+ "aria-label": f("group.dataIndicator"),
3533
+ title: f("group.dataIndicator"),
3534
+ "data-group-indicator": !0,
3535
+ children: "●"
3536
+ }),
3537
+ d.collapsible && (d.collapsed ? /* @__PURE__ */ y(O, { "aria-hidden": "true" }) : /* @__PURE__ */ y(j, { "aria-hidden": "true" }))
3538
+ ]
3539
+ })] }), D = (i = c.header) != null && i.length ? /* @__PURE__ */ y("div", {
3540
+ "data-group-header": !0,
3541
+ children: c.header.map((e, t) => /* @__PURE__ */ y("div", {
3542
+ className: t === 0 ? "group-header-title" : "group-header-detail",
3543
+ children: l(e, `header-${t}`)
3544
+ }, t))
3545
+ }) : null;
3546
+ return /* @__PURE__ */ b(oe, {
3547
+ className: "shadcn-jsonforms-group",
3548
+ "data-group-frame": !0,
3549
+ "data-has-regions": m || void 0,
3550
+ "data-collapsible": d.collapsible || void 0,
3551
+ role: "group",
3552
+ "aria-label": g || e.label || void 0,
3553
+ open: !d.collapsed,
3554
+ onOpenChange: (e) => {
3555
+ d.collapsible && e === d.collapsed && d.toggle();
3556
+ },
3557
+ children: [
3558
+ c.cover && /* @__PURE__ */ y("div", {
3559
+ className: "shadcn-jsonforms-group-cover",
3560
+ "data-group-cover": !0,
3561
+ children: l(c.cover, "cover")
3562
+ }),
3563
+ d.collapsible ? /* @__PURE__ */ b(h, {
3564
+ className: "shadcn-jsonforms-group-header px-0 gap-0",
3565
+ children: [D, /* @__PURE__ */ y(ce, {
3566
+ render: /* @__PURE__ */ y(u, {
3567
+ type: "button",
3568
+ variant: "ghost"
3569
+ }),
3570
+ "aria-label": g || e.label || f("control.group"),
3571
+ "aria-controls": d.contentId,
3572
+ children: E
3573
+ })]
3574
+ }) : e.label || d.hasData || T || _.show || (a = c.header) != null && a.length ? /* @__PURE__ */ b(h, {
3575
+ className: "shadcn-jsonforms-group-header px-0 gap-0",
3576
+ children: [m ? /* @__PURE__ */ y(gn, {
3577
+ className: "shadcn-jsonforms-group-heading",
3578
+ children: E
3579
+ }) : E, D]
3580
+ }) : null,
3581
+ /* @__PURE__ */ b(se, {
3582
+ className: "shadcn-jsonforms-group-content",
3583
+ id: d.contentId,
3584
+ keepMounted: !0,
3585
+ hidden: d.collapsed,
3586
+ children: [m ? /* @__PURE__ */ b(pn, {
3587
+ className: "shadcn-jsonforms-group-card-content px-0",
3588
+ children: [((o = e.uischema.elements) == null ? void 0 : o.length) > 0 && /* @__PURE__ */ y(Bo, Z(Z({}, e), {}, { direction: "column" })), S]
3589
+ }) : /* @__PURE__ */ b(v, { children: [((s = e.uischema.elements) == null ? void 0 : s.length) > 0 && /* @__PURE__ */ y(Bo, Z(Z({}, e), {}, { direction: "column" })), S] }), d.collapsible && !!(p != null && p.length) && /* @__PURE__ */ y(mn, {
3590
+ className: "shadcn-jsonforms-group-footer",
3591
+ "data-group-footer": !0,
3592
+ children: p == null ? void 0 : p.map((e, t) => l(e, `footer-${t}`))
3593
+ })]
3594
+ }),
3595
+ !d.collapsible && p && p.length > 0 && /* @__PURE__ */ y(mn, {
3596
+ className: "shadcn-jsonforms-group-footer",
3597
+ "data-group-footer": !0,
3598
+ children: p.map((e, t) => l(e, `footer-${t}`))
3599
+ })
3600
+ ]
3601
+ });
3602
+ }, Ho = Y(2, Je("Group")), Uo = (e) => /* @__PURE__ */ y(Bo, Z(Z({}, e), {}, { direction: "row" })), Wo = Y(1, Je("HorizontalLayout")), Go = (e) => /* @__PURE__ */ y(Bo, Z(Z({}, e), {}, { direction: "column" })), Ko = Y(1, Je("VerticalLayout")), qo = ({ config: e, uischema: t, data: n, enabled: r, visible: i, id: a, path: o, handleChange: s, errors: c, schema: l }) => {
3603
+ var u, d, f;
3604
+ let p = B();
3605
+ return i === !1 ? null : /* @__PURE__ */ b("div", {
3606
+ className: "group relative w-full",
3607
+ children: [/* @__PURE__ */ y(G, {
3608
+ className: "pr-10",
3609
+ id: a,
3610
+ type: "number",
3611
+ step: l.type === "integer" ? 1 : "any",
3612
+ "aria-label": o || p("control.value"),
3613
+ "aria-invalid": !!c,
3614
+ value: n == null ? "" : n,
3615
+ disabled: !r,
3616
+ onChange: (e) => {
3617
+ let t = e.currentTarget.value;
3618
+ s(o, t === "" ? void 0 : l.type === "integer" ? Math.trunc(Number(t)) : Number(t));
3619
+ }
3620
+ }), /* @__PURE__ */ y(Di, {
3621
+ clearable: (u = (d = (f = t.options) == null ? void 0 : f.clearable) == null ? e == null ? void 0 : e.clearable : d) == null || u,
3622
+ data: n,
3623
+ enabled: r,
3624
+ onClear: () => s(o, void 0)
3625
+ })]
3626
+ });
3627
+ }, Jo = Y(4, Ie), Yo = (e) => {
3628
+ if (e.visible === !1) return null;
3629
+ let { toFormatted: t, fromFormatted: n } = e;
3630
+ if (!t || !n) return /* @__PURE__ */ y(qo, Z({}, e));
3631
+ let r = Z(Z({}, e.config), e.uischema.options), i = r.multi ? Kr : G;
3632
+ return /* @__PURE__ */ b("div", {
3633
+ className: "group relative w-full",
3634
+ children: [/* @__PURE__ */ y(i, {
3635
+ id: e.id,
3636
+ className: "pr-10",
3637
+ disabled: !e.enabled,
3638
+ value: t(e.data),
3639
+ "aria-invalid": !!e.errors,
3640
+ autoFocus: r.focus,
3641
+ placeholder: r.placeholder,
3642
+ maxLength: e.schema.maxLength,
3643
+ onChange: (t) => e.handleChange(e.path, n(t.currentTarget.value))
3644
+ }), /* @__PURE__ */ y(Di, {
3645
+ data: e.data,
3646
+ enabled: e.enabled,
3647
+ clearable: r.clearable !== !1,
3648
+ onClear: () => e.handleChange(e.path, void 0)
3649
+ })]
3650
+ });
3651
+ }, Xo = (e) => e === void 0 ? e : JSON.parse(JSON.stringify(e)), Zo = (e, t) => JSON.stringify(e) === JSON.stringify(t), Qo = (e) => {
3652
+ var t, n, r, i, a, o, s, f, p, _, v, x, S, C, w, T;
3653
+ let E = $e(), D = Xt((t = E.core) == null ? void 0 : t.additionalErrors, e.path), O = H(), k = V(), A = B(), [j, M] = l(), [N, P] = l(), F = c(), [I, L] = l(), z = (n = e.uischema.options) == null ? {} : n, { errors: ee, summary: U } = ii(e, O, k), W = e.enabled && !E.readonly && !e.schema.readOnly, ne = (r = e.schema.title) == null ? A(e.schema.type === "array" ? "composite.itemsLabel" : "composite.detailsLabel") : r, re = () => {
3654
+ var t;
3655
+ return pe.data((t = E.core) == null ? void 0 : t.data, e.path);
3656
+ }, G = () => {
3657
+ F.current = void 0, P(void 0);
3658
+ }, K = (t) => {
3659
+ W && F.current && t.type === me && (!e.path || t.path === e.path || t.path.startsWith(`${e.path}.`)) && (F.current = ve(F.current, t), P(F.current));
3660
+ }, q = N && pe.data(N.data, e.path), J = e.schema.type === "array", ie = !!N && !Zo(re(), I), ae = W && !z.disableRemove && typeof q == "object" && !!q && Object.keys(q).length > 0 && (z.restrict === !1 || !ai(e.schema, J));
3661
+ return e.visible === !1 ? null : /* @__PURE__ */ b("div", {
3662
+ className: "group/composite flex min-w-0 items-center gap-1.5",
3663
+ children: [
3664
+ ((i = (a = z.showTypeIndicator) == null ? (o = e.config) == null ? void 0 : o.showTypeIndicator : a) != null && i) === !0 && (J || ((s = e.schema) == null ? void 0 : s.type) === "object") && /* @__PURE__ */ y("span", {
3665
+ "aria-hidden": "true",
3666
+ className: "shrink-0 text-muted-foreground",
3667
+ children: J ? "[]" : "{}"
3668
+ }),
3669
+ /* @__PURE__ */ y("span", {
3670
+ className: `min-w-0 flex-1 truncate${U.generated && ((f = z.summary) == null ? void 0 : f.type) !== "Label" ? " italic text-muted-foreground" : ""}`,
3671
+ children: ((p = z.summary) == null ? void 0 : p.type) === "Label" ? /* @__PURE__ */ y(ar, {
3672
+ schema: e.schema,
3673
+ path: e.path,
3674
+ uischema: z.summary
3675
+ }) : U.text
3676
+ }),
3677
+ ee && /* @__PURE__ */ y(gi, {
3678
+ errors: ee,
3679
+ path: e.path
3680
+ }),
3681
+ (!z.summaryOnly && ((_ = z.summary) == null ? void 0 : _.type) !== "Label" || z.detail) && /* @__PURE__ */ y(u, {
3682
+ type: "button",
3683
+ variant: "ghost",
3684
+ size: "icon",
3685
+ 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",
3686
+ title: A("composite.edit", { label: ne }),
3687
+ "aria-label": A("composite.edit", { label: ne }),
3688
+ onClick: () => {
3689
+ var e;
3690
+ E.core && (L(Xo(re())), F.current = Z(Z({}, E.core), {}, { data: Xo((e = E.core) == null ? void 0 : e.data) }), P(F.current));
3691
+ },
3692
+ children: /* @__PURE__ */ y(R, {
3693
+ className: "h-4 w-4",
3694
+ "aria-hidden": "true"
3695
+ })
3696
+ }),
3697
+ W && !z.summaryOnly && (((v = z.summary) == null ? void 0 : v.type) !== "Label" || !!z.detail) && e.data !== void 0 && z.clearable !== !1 && /* @__PURE__ */ y(u, {
3698
+ type: "button",
3699
+ variant: "ghost",
3700
+ size: "icon",
3701
+ 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",
3702
+ style: { color: "hsl(var(--destructive))" },
3703
+ title: A("composite.remove", { label: ne }),
3704
+ "aria-label": A("composite.remove", { label: ne }),
3705
+ onClick: () => {
3706
+ nr({
3707
+ catalogId: "compositeCell",
3708
+ operation: "delete",
3709
+ options: z,
3710
+ config: e.config
3711
+ }, [e.data]) ? M({
3712
+ value: e.data,
3713
+ path: e.path
3714
+ }) : e.handleChange(e.path, void 0);
3715
+ },
3716
+ children: /* @__PURE__ */ y(te, {
3717
+ className: "h-4 w-4",
3718
+ "aria-hidden": "true"
3719
+ })
3720
+ }),
3721
+ /* @__PURE__ */ y(Ui, {
3722
+ open: !!j,
3723
+ onCancel: () => M(void 0),
3724
+ onConfirm: () => {
3725
+ j && W && z.clearable !== !1 && j.path === e.path && j.value === e.data && e.handleChange(e.path, void 0), M(void 0);
3726
+ }
3727
+ }),
3728
+ /* @__PURE__ */ y(d, {
3729
+ open: !!N,
3730
+ onOpenChange: (e) => !e && G(),
3731
+ children: /* @__PURE__ */ b(Zi, {
3732
+ open: !!N,
3733
+ options: z.dialog,
3734
+ "aria-describedby": void 0,
3735
+ className: "max-h-[85vh] overflow-auto sm:max-w-2xl",
3736
+ children: [
3737
+ /* @__PURE__ */ y(h, { children: /* @__PURE__ */ y(g, { children: (x = e.schema.title) == null ? A("composite.detailsTitle") : x }) }),
3738
+ N && /* @__PURE__ */ y(Ze.Provider, {
3739
+ value: Z(Z({}, E), {}, {
3740
+ core: N,
3741
+ dispatch: K
3742
+ }),
3743
+ children: /* @__PURE__ */ y(Qe, {
3744
+ schema: e.schema,
3745
+ uischema: Wn(z.detail, (S = E.uischemas) == null ? [] : S, e.schema, e.uischema.scope, e.path, e.rootSchema, {
3746
+ type: "Control",
3747
+ scope: "#",
3748
+ label: !1
3749
+ }),
3750
+ path: e.path,
3751
+ enabled: W,
3752
+ renderers: e.renderers,
3753
+ cells: e.cells
3754
+ })
3755
+ }),
3756
+ /* @__PURE__ */ b(m, { children: [
3757
+ z.showEmptyButton === !0 && /* @__PURE__ */ y(u, {
3758
+ type: "button",
3759
+ variant: "outline",
3760
+ disabled: !ae,
3761
+ onClick: () => K(Ye(e.path, () => J ? [] : {})),
3762
+ children: (C = z.emptyLabel) == null ? A("composite.empty") : C
3763
+ }),
3764
+ /* @__PURE__ */ y(u, {
3765
+ type: "button",
3766
+ variant: "outline",
3767
+ onClick: G,
3768
+ children: (w = z.cancelLabel) == null ? A("composite.cancel") : w
3769
+ }),
3770
+ /* @__PURE__ */ y(u, {
3771
+ type: "button",
3772
+ disabled: !W || ie || D,
3773
+ title: ie ? A("composite.applyConflict") : void 0,
3774
+ onClick: () => {
3775
+ var t;
3776
+ if (!W || ie || D) return;
3777
+ let n = Xo(pe.data((t = F.current) == null ? void 0 : t.data, e.path));
3778
+ Zo(n, I) || e.handleChange(e.path, n), G();
3779
+ },
3780
+ children: (T = z.okLabel) == null ? A("composite.apply") : T
3781
+ })
3782
+ ] })
3783
+ ]
3784
+ })
3785
+ })
3786
+ ]
3787
+ });
3788
+ }, $o = ({ data: e, enabled: t, visible: n, id: r, path: i, handleChange: a, errors: o }) => {
3789
+ let s = B();
3790
+ return n === !1 ? null : /* @__PURE__ */ y(lt, {
3791
+ id: r,
3792
+ "aria-label": i || s("control.value"),
3793
+ "aria-invalid": !!o,
3794
+ checked: typeof e == "boolean" ? e : "indeterminate",
3795
+ disabled: !t,
3796
+ onCheckedChange: (e) => a(i, e === !0)
3797
+ });
3798
+ }, es = ({ data: e, enabled: t, visible: n, id: r, path: i, handleChange: a, errors: o, schema: s, uischema: c }) => {
3799
+ var l, u, d;
3800
+ let f = B(), p = H();
3801
+ if (n === !1) return null;
3802
+ let m = Oe(s, c, i), h = (l = s.oneOf) == null ? void 0 : l.map((e) => Ue(e, p, m)), g = (u = (d = h == null ? void 0 : h.map((e) => e.value)) == null ? s.enum : d) == null ? Object.prototype.hasOwnProperty.call(s, "const") ? [s.const] : [] : u, _ = g.findIndex((t) => Gr(t, e));
3803
+ return /* @__PURE__ */ b(K, {
3804
+ value: _ < 0 ? "" : `option-${_}`,
3805
+ disabled: !t,
3806
+ onValueChange: (e) => a(i, g[Number(e.replace("option-", ""))]),
3807
+ children: [/* @__PURE__ */ y(ie, {
3808
+ className: "w-full min-w-0",
3809
+ id: r,
3810
+ "aria-label": i || f("control.value"),
3811
+ "aria-invalid": !!o,
3812
+ children: /* @__PURE__ */ y(ae, { placeholder: f("enum.select") })
3813
+ }), /* @__PURE__ */ y(q, { children: g.map((e, t) => {
3814
+ var n;
3815
+ return /* @__PURE__ */ y(J, {
3816
+ value: `option-${t}`,
3817
+ children: (n = h == null ? void 0 : h[t].label) == null ? we(e, p, m).label : n
3818
+ }, t);
3819
+ }) })]
3820
+ });
3821
+ }, ts = ({ config: e, uischema: t, data: n, enabled: r, visible: i, id: a, path: o, handleChange: s, errors: c }) => {
3822
+ var l, u, d;
3823
+ let f = B();
3824
+ return i === !1 ? null : /* @__PURE__ */ b("div", {
3825
+ className: "group relative w-full",
3826
+ children: [/* @__PURE__ */ y(G, {
3827
+ className: "pr-10",
3828
+ id: a,
3829
+ "aria-label": o || f("control.value"),
3830
+ "aria-invalid": !!c,
3831
+ value: n == null ? "" : n,
3832
+ disabled: !r,
3833
+ onChange: (e) => s(o, e.currentTarget.value || void 0)
3834
+ }), /* @__PURE__ */ y(Di, {
3835
+ clearable: (l = (u = (d = t.options) == null ? void 0 : d.clearable) == null ? e == null ? void 0 : e.clearable : u) == null || l,
3836
+ data: n,
3837
+ enabled: r,
3838
+ onClear: () => s(o, void 0)
3839
+ })]
3840
+ });
3841
+ }, ns = [
3842
+ e,
3843
+ {
3844
+ tester: Jo,
3845
+ cell: nt(Yo)
3846
+ },
3847
+ {
3848
+ tester: ko,
3849
+ cell: Ci(X(Oo))
3850
+ },
3851
+ {
3852
+ tester: zi,
3853
+ cell: Ci(X(Vi))
3854
+ },
3855
+ {
3856
+ tester: Y(5, ze),
3857
+ cell: nt(es)
3858
+ },
3859
+ {
3860
+ tester: Y(3, je),
3861
+ cell: Ci(X(io))
3862
+ },
3863
+ {
3864
+ tester: Y(3, He),
3865
+ cell: Ci(X(wo))
3866
+ },
3867
+ {
3868
+ tester: Y(3, Me),
3869
+ cell: Ci(X(po))
3870
+ },
3871
+ {
3872
+ tester: oi,
3873
+ cell: nt(Qo)
3874
+ },
3875
+ {
3876
+ tester: Y(2, Pe),
3877
+ cell: nt(qo)
3878
+ },
3879
+ {
3880
+ tester: Y(2, Ae),
3881
+ cell: nt($o)
3882
+ },
3883
+ {
3884
+ tester: Y(3, Ne),
3885
+ cell: nt(es)
3886
+ },
3887
+ {
3888
+ tester: Y(2, Fe),
3889
+ cell: nt(qo)
3890
+ },
3891
+ {
3892
+ tester: Y(1, Ve),
3893
+ cell: nt(ts)
3894
+ }
3895
+ ], rs = [
3896
+ t,
3897
+ {
3898
+ tester: S,
3899
+ renderer: mi
3900
+ },
3901
+ {
3902
+ tester: de,
3903
+ renderer: hi
3904
+ },
3905
+ ...[
3906
+ ji,
3907
+ Mi,
3908
+ Pi
3909
+ ].map((e) => ({
3910
+ tester: e,
3911
+ renderer: X(Fi)
3912
+ })),
3913
+ {
3914
+ tester: zt,
3915
+ renderer: Li
3916
+ },
3917
+ {
3918
+ tester: Y(20, he(ze, We("format", "radio"))),
3919
+ renderer: ot(Ao)
3920
+ },
3921
+ {
3922
+ tester: zi,
3923
+ renderer: X(Vi)
3924
+ },
3925
+ {
3926
+ tester: Bi,
3927
+ renderer: X(Hi)
3928
+ },
3929
+ {
3930
+ tester: ea,
3931
+ renderer: na
3932
+ },
3933
+ {
3934
+ tester: ra,
3935
+ renderer: X(ia)
3936
+ },
3937
+ {
3938
+ tester: Lo,
3939
+ renderer: at(Fo)
3940
+ },
3941
+ {
3942
+ tester: Ro,
3943
+ renderer: at(Fo)
3944
+ },
3945
+ {
3946
+ tester: ko,
3947
+ renderer: X(Oo)
3948
+ },
3949
+ {
3950
+ tester: jo,
3951
+ renderer: rt(Ao)
3952
+ },
3953
+ {
3954
+ tester: No,
3955
+ renderer: X(Mo)
3956
+ },
3957
+ {
3958
+ tester: Eo,
3959
+ renderer: Do
3960
+ },
3961
+ {
3962
+ tester: Va,
3963
+ renderer: Ha
3964
+ },
3965
+ {
3966
+ tester: yn,
3967
+ renderer: _n
3968
+ },
3969
+ {
3970
+ tester: da,
3971
+ renderer: fa
3972
+ },
3973
+ {
3974
+ tester: En,
3975
+ renderer: Ra
3976
+ },
3977
+ {
3978
+ tester: Ia,
3979
+ renderer: tt(Fa)
3980
+ },
3981
+ {
3982
+ tester: kr,
3983
+ renderer: X(za)
3984
+ },
3985
+ {
3986
+ tester: Ga,
3987
+ renderer: X(Wa)
3988
+ },
3989
+ {
3990
+ tester: _o,
3991
+ renderer: rt(ct(go), !1)
3992
+ },
3993
+ {
3994
+ tester: yo,
3995
+ renderer: X(vo)
3996
+ },
3997
+ {
3998
+ tester: xo,
3999
+ renderer: X(bo)
4000
+ },
4001
+ {
4002
+ tester: mo,
4003
+ renderer: X(po)
4004
+ },
4005
+ {
4006
+ tester: ao,
4007
+ renderer: X(io)
4008
+ },
4009
+ {
4010
+ tester: To,
4011
+ renderer: X(wo)
4012
+ },
4013
+ {
4014
+ tester: Co,
4015
+ renderer: X(So)
4016
+ },
4017
+ {
4018
+ tester: Ho,
4019
+ renderer: at(Vo)
4020
+ },
4021
+ {
4022
+ tester: Wo,
4023
+ renderer: at(Uo)
4024
+ },
4025
+ {
4026
+ tester: Ko,
4027
+ renderer: at(Go)
4028
+ },
4029
+ {
4030
+ tester: Io,
4031
+ renderer: at(Fo)
4032
+ },
4033
+ {
4034
+ tester: oa,
4035
+ renderer: it(aa)
4036
+ }
4037
+ ], is = rs;
4038
+ export { sa as AdditionalProperties, pa as ArrayPanelToggle, Di as ClearValueButton, ca as CombinatorSwitchDialog, gi as ErrorIndicator, $ as InputShell, Ra as MixedRenderer, La as MixedRendererComponent, ga as RowDetailEditButton, ma as RowDetailFrame, _n as ShadcnAllOfControl, vn as ShadcnAllOfRenderer, fa as ShadcnAnyOfControl, ua as ShadcnAnyOfRenderer, ia as ShadcnAnyOfStringOrEnumControl, Fa as ShadcnArrayRenderer, $o as ShadcnBooleanCell, Wa as ShadcnBooleanControl, Oo as ShadcnBooleanToggleControl, Fo as ShadcnCategorizationLayout, ts as ShadcnCell, ts as ShadcnTextCell, Si as ShadcnCellMode, Qo as ShadcnCompositeCell, io as ShadcnDateControl, po as ShadcnDateTimeControl, es as ShadcnEnumCell, go as ShadcnEnumControl, Ti as ShadcnGridCellFrame, Vo as ShadcnGroupLayout, Uo as ShadcnHorizontalLayout, ki as ShadcnInputControl, vo as ShadcnIntegerControl, aa as ShadcnLabelRenderer, qo as ShadcnNumberCell, Ai as ShadcnNumberControl, bo as ShadcnNumberInputControl, za as ShadcnObjectRenderer, Ha as ShadcnOneOfControl, Do as ShadcnOneOfEnumControl, Ba as ShadcnOneOfRenderer, Vi as ShadcnPasswordControl, Hi as ShadcnPasswordOtpControl, Ao as ShadcnRadioGroupControl, Mo as ShadcnSliderControl, So as ShadcnTextControl, wo as ShadcnTimeControl, Go as ShadcnVerticalLayout, fo as TimePicker, ta as TupleControl, na as TupleControlRenderer, is as advancedShadcnRenderers, yn as allOfControlTester, da as anyOfControlTester, ra as anyOfStringOrEnumControlTester, Ia as arrayControlTester, Ci as asShadcnCell, Ga as booleanControlTester, ko as booleanToggleControlTester, Lo as categorizationAccordionTester, Ro as categorizationStepperTester, Io as categorizationTester, ao as dateControlTester, mo as dateTimeControlTester, _o as enumControlTester, Ho as groupTester, Ei as hasClearableValue, Wo as horizontalLayoutTester, yo as integerControlTester, Sn as isArrayElementPath, wn as isMixedControl, Tn as isMixedSchema, oa as labelRendererTester, Q as makeId, En as mixedControlTester, xo as numberControlTester, kr as objectControlTester, Va as oneOfControlTester, Eo as oneOfEnumControlTester, zi as passwordControlTester, Bi as passwordOtpControlTester, jo as radioGroupControlTester, Dn as schemaForType, ns as shadcnCells, oi as shadcnCompositeCellTester, rs as shadcnRenderers, No as sliderControlTester, Co as textControlTester, To as timeControlTester, Oi as toStringValue, ea as tupleControlRendererTester, si as useConfirmation, Ko as verticalLayoutTester };
4039
+
4040
+ //# sourceMappingURL=jsonforms-react-shadcn.esm.js.map