@questpie/admin 3.2.3 → 3.2.5

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 (244) hide show
  1. package/dist/client/blocks/block-renderer.d.mts +2 -2
  2. package/dist/client/blocks/block-renderer.mjs +164 -339
  3. package/dist/client/components/actions/action-button.mjs +9 -9
  4. package/dist/client/components/actions/action-dialog.mjs +195 -493
  5. package/dist/client/components/actions/confirmation-dialog.mjs +44 -159
  6. package/dist/client/components/actions/header-actions.mjs +73 -165
  7. package/dist/client/components/admin-link.d.mts +2 -2
  8. package/dist/client/components/admin-link.mjs +40 -126
  9. package/dist/client/components/auth/auth-loading.mjs +9 -44
  10. package/dist/client/components/blocks/block-canvas.mjs +31 -95
  11. package/dist/client/components/blocks/block-editor-context.mjs +13 -57
  12. package/dist/client/components/blocks/block-editor-layout.mjs +72 -166
  13. package/dist/client/components/blocks/block-editor-provider.mjs +184 -245
  14. package/dist/client/components/blocks/block-fields-renderer.mjs +54 -229
  15. package/dist/client/components/blocks/block-insert-button.mjs +49 -165
  16. package/dist/client/components/blocks/block-item-menu.mjs +102 -301
  17. package/dist/client/components/blocks/block-item.mjs +136 -370
  18. package/dist/client/components/blocks/block-library-sidebar.mjs +106 -220
  19. package/dist/client/components/blocks/block-tree.mjs +12 -68
  20. package/dist/client/components/blocks/block-type-icon.mjs +14 -56
  21. package/dist/client/components/brand-logo.mjs +35 -149
  22. package/dist/client/components/component-renderer.mjs +42 -118
  23. package/dist/client/components/error-boundary.mjs +14 -58
  24. package/dist/client/components/fields/array-field.mjs +209 -521
  25. package/dist/client/components/fields/asset-preview-field.mjs +41 -141
  26. package/dist/client/components/fields/blocks-field/blocks-field.mjs +60 -156
  27. package/dist/client/components/fields/boolean-field.mjs +29 -59
  28. package/dist/client/components/fields/date-field.mjs +7 -37
  29. package/dist/client/components/fields/datetime-field.mjs +7 -38
  30. package/dist/client/components/fields/email-field.mjs +25 -54
  31. package/dist/client/components/fields/field-wrapper.mjs +30 -105
  32. package/dist/client/components/fields/json-field.mjs +107 -313
  33. package/dist/client/components/fields/locale-badge.mjs +6 -15
  34. package/dist/client/components/fields/number-field.mjs +27 -60
  35. package/dist/client/components/fields/object-array-field.mjs +283 -659
  36. package/dist/client/components/fields/object-field.mjs +165 -633
  37. package/dist/client/components/fields/relation/displays/cards-display.mjs +106 -220
  38. package/dist/client/components/fields/relation/displays/chips-display.mjs +78 -150
  39. package/dist/client/components/fields/relation/displays/grid-display.mjs +92 -186
  40. package/dist/client/components/fields/relation/displays/list-display.mjs +122 -239
  41. package/dist/client/components/fields/relation/displays/table-display.mjs +70 -244
  42. package/dist/client/components/fields/relation/relation-items-display.mjs +30 -126
  43. package/dist/client/components/fields/relation-field.mjs +10 -66
  44. package/dist/client/components/fields/relation-picker.mjs +18 -18
  45. package/dist/client/components/fields/relation-select.mjs +12 -12
  46. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +80 -182
  47. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +8 -19
  48. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +13 -29
  49. package/dist/client/components/fields/rich-text-editor/index.mjs +196 -530
  50. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +61 -111
  51. package/dist/client/components/fields/rich-text-editor/table-controls.mjs +105 -415
  52. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +256 -511
  53. package/dist/client/components/fields/rich-text-field.mjs +14 -53
  54. package/dist/client/components/fields/select-field.mjs +39 -74
  55. package/dist/client/components/fields/text-field.mjs +26 -59
  56. package/dist/client/components/fields/textarea-field.mjs +26 -58
  57. package/dist/client/components/fields/time-field.mjs +7 -35
  58. package/dist/client/components/fields/upload-field.mjs +47 -165
  59. package/dist/client/components/filter-builder/columns-tab.mjs +80 -280
  60. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +197 -540
  61. package/dist/client/components/filter-builder/filters-tab.mjs +96 -386
  62. package/dist/client/components/filter-builder/saved-views-tab.mjs +133 -351
  63. package/dist/client/components/history-sidebar.mjs +306 -611
  64. package/dist/client/components/layout/field-layout-renderer.mjs +106 -254
  65. package/dist/client/components/locale-switcher.mjs +106 -228
  66. package/dist/client/components/media/media-grid.mjs +84 -273
  67. package/dist/client/components/media/media-picker-dialog.mjs +177 -494
  68. package/dist/client/components/preview/live-preview-mode.mjs +240 -438
  69. package/dist/client/components/preview/preview-pane.mjs +22 -22
  70. package/dist/client/components/primitives/asset-preview.mjs +290 -666
  71. package/dist/client/components/primitives/checkbox-input.mjs +9 -35
  72. package/dist/client/components/primitives/date-input.mjs +109 -327
  73. package/dist/client/components/primitives/dropzone.mjs +209 -336
  74. package/dist/client/components/primitives/field-select-control.mjs +12 -80
  75. package/dist/client/components/primitives/number-input.mjs +4 -4
  76. package/dist/client/components/primitives/select-multi.mjs +200 -559
  77. package/dist/client/components/primitives/select-single.mjs +165 -499
  78. package/dist/client/components/primitives/time-input.mjs +43 -117
  79. package/dist/client/components/primitives/toggle-input.mjs +9 -29
  80. package/dist/client/components/sheets/resource-sheet.mjs +61 -70
  81. package/dist/client/components/ui/accordion.mjs +35 -155
  82. package/dist/client/components/ui/alert.mjs +13 -68
  83. package/dist/client/components/ui/badge.mjs +9 -51
  84. package/dist/client/components/ui/button.mjs +8 -54
  85. package/dist/client/components/ui/card.mjs +37 -193
  86. package/dist/client/components/ui/checkbox.mjs +12 -68
  87. package/dist/client/components/ui/command.mjs +48 -219
  88. package/dist/client/components/ui/dialog.mjs +50 -262
  89. package/dist/client/components/ui/drawer.mjs +55 -259
  90. package/dist/client/components/ui/dropdown-menu.mjs +86 -427
  91. package/dist/client/components/ui/empty-state.mjs +28 -98
  92. package/dist/client/components/ui/field.mjs +73 -309
  93. package/dist/client/components/ui/input-group.mjs +42 -167
  94. package/dist/client/components/ui/input.mjs +7 -37
  95. package/dist/client/components/ui/kbd.mjs +6 -36
  96. package/dist/client/components/ui/label.mjs +7 -37
  97. package/dist/client/components/ui/popover.mjs +34 -169
  98. package/dist/client/components/ui/responsive-dialog.mjs +67 -273
  99. package/dist/client/components/ui/scroll-fade.mjs +63 -158
  100. package/dist/client/components/ui/search-input.mjs +33 -100
  101. package/dist/client/components/ui/select.mjs +72 -393
  102. package/dist/client/components/ui/separator.mjs +7 -38
  103. package/dist/client/components/ui/sheet.mjs +49 -269
  104. package/dist/client/components/ui/sidebar.mjs +171 -690
  105. package/dist/client/components/ui/skeleton.mjs +7 -38
  106. package/dist/client/components/ui/sonner.mjs +11 -42
  107. package/dist/client/components/ui/switch.mjs +9 -45
  108. package/dist/client/components/ui/table.mjs +48 -266
  109. package/dist/client/components/ui/tabs.mjs +26 -139
  110. package/dist/client/components/ui/textarea.mjs +6 -32
  111. package/dist/client/components/ui/tooltip.mjs +27 -129
  112. package/dist/client/components/widgets/chart-widget.mjs +174 -522
  113. package/dist/client/components/widgets/progress-widget.mjs +66 -172
  114. package/dist/client/components/widgets/quick-actions-widget.mjs +102 -261
  115. package/dist/client/components/widgets/recent-items-widget.mjs +69 -195
  116. package/dist/client/components/widgets/stats-widget.mjs +41 -175
  117. package/dist/client/components/widgets/table-widget.mjs +9 -9
  118. package/dist/client/components/widgets/timeline-widget.mjs +86 -226
  119. package/dist/client/components/widgets/value-widget.mjs +74 -381
  120. package/dist/client/components/widgets/widget-empty-state.mjs +26 -76
  121. package/dist/client/components/widgets/widget-skeletons.mjs +138 -421
  122. package/dist/client/contexts/focus-context.d.mts +4 -0
  123. package/dist/client/contexts/focus-context.mjs +87 -150
  124. package/dist/client/hooks/typed-hooks.mjs +241 -701
  125. package/dist/client/hooks/use-action.mjs +62 -198
  126. package/dist/client/hooks/use-admin-config.mjs +5 -35
  127. package/dist/client/hooks/use-admin-preferences.mjs +16 -88
  128. package/dist/client/hooks/use-admin-routes.mjs +22 -56
  129. package/dist/client/hooks/use-audit-history.mjs +21 -69
  130. package/dist/client/hooks/use-brand.mjs +1 -9
  131. package/dist/client/hooks/use-collection-fields.mjs +17 -57
  132. package/dist/client/hooks/use-collection-meta.mjs +12 -44
  133. package/dist/client/hooks/use-collection-schema.mjs +10 -33
  134. package/dist/client/hooks/use-collection-validation.mjs +23 -53
  135. package/dist/client/hooks/use-collection.mjs +194 -614
  136. package/dist/client/hooks/use-current-user.mjs +0 -1
  137. package/dist/client/hooks/use-field-hooks.mjs +10 -10
  138. package/dist/client/hooks/use-field-options.mjs +61 -202
  139. package/dist/client/hooks/use-global-fields.mjs +14 -46
  140. package/dist/client/hooks/use-global-meta.mjs +9 -30
  141. package/dist/client/hooks/use-global-schema.mjs +9 -30
  142. package/dist/client/hooks/use-global.mjs +63 -219
  143. package/dist/client/hooks/use-locks.mjs +117 -325
  144. package/dist/client/hooks/use-media-query.mjs +16 -36
  145. package/dist/client/hooks/use-prefill-params.mjs +0 -1
  146. package/dist/client/hooks/use-questpie-query-options.mjs +12 -29
  147. package/dist/client/hooks/use-reactive-fields.mjs +1 -1
  148. package/dist/client/hooks/use-reactive-prop.mjs +65 -223
  149. package/dist/client/hooks/use-realtime-highlight.mjs +51 -114
  150. package/dist/client/hooks/use-saved-views.mjs +22 -103
  151. package/dist/client/hooks/use-search-param-toggle.mjs +28 -79
  152. package/dist/client/hooks/use-search.mjs +31 -143
  153. package/dist/client/hooks/use-server-actions.mjs +18 -50
  154. package/dist/client/hooks/use-server-validation.mjs +72 -166
  155. package/dist/client/hooks/use-server-widget-data.mjs +7 -33
  156. package/dist/client/hooks/use-setup-status.mjs +12 -25
  157. package/dist/client/hooks/use-sidebar-search-param.mjs +33 -78
  158. package/dist/client/hooks/use-transition-stage.mjs +8 -38
  159. package/dist/client/hooks/use-upload.mjs +54 -152
  160. package/dist/client/hooks/use-validation-error-map.mjs +6 -26
  161. package/dist/client/hooks/use-view-state.mjs +187 -437
  162. package/dist/client/i18n/hooks.mjs +65 -197
  163. package/dist/client/lib/render-profiler.mjs +14 -41
  164. package/dist/client/preview/block-scope-context.d.mts +2 -2
  165. package/dist/client/preview/block-scope-context.mjs +14 -36
  166. package/dist/client/preview/diff.mjs +110 -0
  167. package/dist/client/preview/preview-banner.mjs +42 -108
  168. package/dist/client/preview/preview-field.d.mts +4 -4
  169. package/dist/client/preview/preview-field.mjs +166 -409
  170. package/dist/client/preview/use-collection-preview.mjs +135 -201
  171. package/dist/client/runtime/content-locales-provider.mjs +31 -83
  172. package/dist/client/runtime/locale-scope.mjs +22 -63
  173. package/dist/client/runtime/provider.mjs +100 -255
  174. package/dist/client/runtime/translations-provider.mjs +41 -107
  175. package/dist/client/scope/picker.d.mts +2 -2
  176. package/dist/client/scope/picker.mjs +86 -321
  177. package/dist/client/scope/provider.d.mts +2 -2
  178. package/dist/client/scope/provider.mjs +8 -17
  179. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  180. package/dist/client/views/auth/accept-invite-form.mjs +121 -412
  181. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  182. package/dist/client/views/auth/auth-layout.mjs +104 -284
  183. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  184. package/dist/client/views/auth/forgot-password-form.mjs +94 -325
  185. package/dist/client/views/auth/invite-form.mjs +107 -442
  186. package/dist/client/views/auth/login-form.d.mts +2 -2
  187. package/dist/client/views/auth/login-form.mjs +116 -337
  188. package/dist/client/views/auth/reset-password-form.mjs +128 -453
  189. package/dist/client/views/auth/setup-form.mjs +140 -478
  190. package/dist/client/views/collection/auto-form-fields.mjs +243 -615
  191. package/dist/client/views/collection/bulk-action-toolbar.mjs +212 -400
  192. package/dist/client/views/collection/cells/complex-cells.mjs +183 -611
  193. package/dist/client/views/collection/cells/primitive-cells.mjs +109 -363
  194. package/dist/client/views/collection/cells/relation-cells.mjs +86 -233
  195. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +142 -371
  196. package/dist/client/views/collection/cells/shared/relation-chip.mjs +35 -131
  197. package/dist/client/views/collection/cells/upload-cells.mjs +60 -177
  198. package/dist/client/views/collection/columns/build-columns.mjs +8 -48
  199. package/dist/client/views/collection/field-renderer.mjs +11 -24
  200. package/dist/client/views/collection/form-view.mjs +288 -560
  201. package/dist/client/views/collection/table-view.mjs +239 -469
  202. package/dist/client/views/collection/view-skeletons.mjs +112 -237
  203. package/dist/client/views/common/global-search.mjs +241 -543
  204. package/dist/client/views/dashboard/dashboard-grid.mjs +256 -775
  205. package/dist/client/views/dashboard/dashboard-widget.mjs +38 -126
  206. package/dist/client/views/dashboard/widget-card.mjs +61 -269
  207. package/dist/client/views/globals/global-form-view.mjs +478 -1298
  208. package/dist/client/views/layout/admin-layout-provider.mjs +28 -88
  209. package/dist/client/views/layout/admin-layout.mjs +83 -246
  210. package/dist/client/views/layout/admin-router.mjs +457 -1289
  211. package/dist/client/views/layout/admin-sidebar.mjs +510 -1292
  212. package/dist/client/views/layout/admin-theme.mjs +30 -64
  213. package/dist/client/views/layout/admin-view-layout.mjs +40 -144
  214. package/dist/client/views/pages/accept-invite-page.mjs +95 -290
  215. package/dist/client/views/pages/dashboard-page.mjs +11 -57
  216. package/dist/client/views/pages/forgot-password-page.mjs +31 -83
  217. package/dist/client/views/pages/invite-page.mjs +35 -90
  218. package/dist/client/views/pages/login-page.mjs +41 -121
  219. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  220. package/dist/client/views/pages/reset-password-page.mjs +46 -173
  221. package/dist/client/views/pages/setup-page.d.mts +2 -2
  222. package/dist/client/views/pages/setup-page.mjs +33 -95
  223. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  224. package/dist/components/rich-text/rich-text-renderer.mjs +9 -33
  225. package/dist/server/modules/admin/collections/account.d.mts +50 -50
  226. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  227. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  228. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  229. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  230. package/dist/server/modules/admin/collections/assets.d.mts +34 -34
  231. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  232. package/dist/server/modules/admin/collections/user.d.mts +53 -53
  233. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  234. package/dist/server/modules/admin/index.d.mts +21 -20
  235. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  236. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  237. package/dist/server/modules/admin/routes/locales.d.mts +2 -2
  238. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  239. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  240. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  241. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  242. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  243. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  244. package/package.json +3 -5
@@ -5,7 +5,6 @@ import { configureField } from "../../builder/field/field.mjs";
5
5
  import { gridColumnClasses } from "./field-utils.mjs";
6
6
  import { FieldWrapper } from "./field-wrapper.mjs";
7
7
  import { FieldLayoutRenderer } from "../layout/field-layout-renderer.mjs";
8
- import { c } from "react/compiler-runtime";
9
8
  import { Icon } from "@iconify/react";
10
9
  import * as React from "react";
11
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -17,669 +16,202 @@ import { jsx, jsxs } from "react/jsx-runtime";
17
16
  * Renders nested fields for JSON object structures.
18
17
  * Supports wrapper modes (flat, collapsible) and layout modes (stack, inline, grid).
19
18
  */
20
- function NestedFieldRenderer(t0) {
21
- const $ = c(35);
22
- const { fieldName, fieldDef, parentName, disabled } = t0;
19
+ function NestedFieldRenderer({ fieldName, fieldDef, parentName, disabled }) {
23
20
  const resolveText = useResolveText();
24
21
  const fullName = `${parentName}.${fieldName}`;
25
- let t1;
26
- if ($[0] !== fieldDef) {
27
- t1 = fieldDef["~options"] || {};
28
- $[0] = fieldDef;
29
- $[1] = t1;
30
- } else t1 = $[1];
31
- const options = t1;
22
+ const options = fieldDef["~options"] || {};
32
23
  const Component = fieldDef.component;
33
- if (!Component) {
34
- let t2$1;
35
- if ($[2] !== fieldDef.name) {
36
- t2$1 = /* @__PURE__ */ jsxs("div", {
37
- className: "text-destructive text-sm",
38
- children: ["No component for field type: ", fieldDef.name]
39
- });
40
- $[2] = fieldDef.name;
41
- $[3] = t2$1;
42
- } else t2$1 = $[3];
43
- return t2$1;
44
- }
45
- let description;
46
- let fieldSpecificOptions;
47
- let label;
48
- let locale;
49
- let localized;
50
- let optionsDisabled;
51
- let placeholder;
52
- let readOnly;
53
- let required;
54
- if ($[4] !== options) {
55
- const { label: t2$1, description: t3$1, placeholder: t4$1, required: t5$1, disabled: t6$1, readOnly: t7, hidden, localized: t8, locale: t9, ...t10 } = options;
56
- label = t2$1;
57
- description = t3$1;
58
- placeholder = t4$1;
59
- required = t5$1;
60
- optionsDisabled = t6$1;
61
- readOnly = t7;
62
- localized = t8;
63
- locale = t9;
64
- fieldSpecificOptions = t10;
65
- $[4] = options;
66
- $[5] = description;
67
- $[6] = fieldSpecificOptions;
68
- $[7] = label;
69
- $[8] = locale;
70
- $[9] = localized;
71
- $[10] = optionsDisabled;
72
- $[11] = placeholder;
73
- $[12] = readOnly;
74
- $[13] = required;
75
- } else {
76
- description = $[5];
77
- fieldSpecificOptions = $[6];
78
- label = $[7];
79
- locale = $[8];
80
- localized = $[9];
81
- optionsDisabled = $[10];
82
- placeholder = $[11];
83
- readOnly = $[12];
84
- required = $[13];
85
- }
86
- let t2;
87
- if ($[14] !== label || $[15] !== resolveText) {
88
- t2 = resolveText(label);
89
- $[14] = label;
90
- $[15] = resolveText;
91
- $[16] = t2;
92
- } else t2 = $[16];
93
- let t3;
94
- if ($[17] !== description || $[18] !== resolveText) {
95
- t3 = resolveText(description);
96
- $[17] = description;
97
- $[18] = resolveText;
98
- $[19] = t3;
99
- } else t3 = $[19];
100
- let t4;
101
- if ($[20] !== placeholder || $[21] !== resolveText) {
102
- t4 = resolveText(placeholder);
103
- $[20] = placeholder;
104
- $[21] = resolveText;
105
- $[22] = t4;
106
- } else t4 = $[22];
107
- const t5 = disabled || optionsDisabled;
108
- let t6;
109
- if ($[23] !== Component || $[24] !== fieldSpecificOptions || $[25] !== fullName || $[26] !== locale || $[27] !== localized || $[28] !== readOnly || $[29] !== required || $[30] !== t2 || $[31] !== t3 || $[32] !== t4 || $[33] !== t5) {
110
- t6 = /* @__PURE__ */ jsx(Component, {
111
- name: fullName,
112
- label: t2,
113
- description: t3,
114
- placeholder: t4,
115
- required,
116
- disabled: t5,
117
- readOnly,
118
- localized,
119
- locale,
120
- ...fieldSpecificOptions
121
- });
122
- $[23] = Component;
123
- $[24] = fieldSpecificOptions;
124
- $[25] = fullName;
125
- $[26] = locale;
126
- $[27] = localized;
127
- $[28] = readOnly;
128
- $[29] = required;
129
- $[30] = t2;
130
- $[31] = t3;
131
- $[32] = t4;
132
- $[33] = t5;
133
- $[34] = t6;
134
- } else t6 = $[34];
135
- return t6;
24
+ if (!Component) return /* @__PURE__ */ jsxs("div", {
25
+ className: "text-destructive text-sm",
26
+ children: ["No component for field type: ", fieldDef.name]
27
+ });
28
+ const { label, description, placeholder, required, disabled: optionsDisabled, readOnly, hidden, localized, locale, ...fieldSpecificOptions } = options;
29
+ return /* @__PURE__ */ jsx(Component, {
30
+ name: fullName,
31
+ label: resolveText(label),
32
+ description: resolveText(description),
33
+ placeholder: resolveText(placeholder),
34
+ required,
35
+ disabled: disabled || optionsDisabled,
36
+ readOnly,
37
+ localized,
38
+ locale,
39
+ ...fieldSpecificOptions
40
+ });
136
41
  }
137
- function ObjectField(t0) {
138
- const $ = c(136);
139
- const { name, label, description, required, disabled, localized, locale, className, fields: fieldsProp, form: formProp, wrapper: t1, layout: t2, columns: t3, defaultCollapsed: t4 } = t0;
140
- const wrapper = t1 === void 0 ? "collapsible" : t1;
141
- const layout = t2 === void 0 ? "stack" : t2;
142
- const columns = t3 === void 0 ? 2 : t3;
143
- const defaultCollapsed = t4 === void 0 ? true : t4;
42
+ function ObjectField({ name, label, description, required, disabled, localized, locale, className, fields: fieldsProp, form: formProp, wrapper = "collapsible", layout = "stack", columns = 2, defaultCollapsed = true }) {
144
43
  const resolveText = useResolveText();
145
44
  const admin = useAdminStore(selectAdmin);
146
45
  const [isCollapsed, setIsCollapsed] = React.useState(defaultCollapsed);
147
- let t5;
148
- bb0: {
149
- if (!fieldsProp) {
150
- let t6$1;
151
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
152
- t6$1 = {};
153
- $[0] = t6$1;
154
- } else t6$1 = $[0];
155
- t5 = t6$1;
156
- break bb0;
157
- }
46
+ const nestedFields = React.useMemo(() => {
47
+ if (!fieldsProp) return {};
158
48
  if (typeof fieldsProp === "function") {
159
- let t6$1;
160
- if ($[1] !== admin || $[2] !== fieldsProp) {
161
- const registeredFields = admin.getFields();
162
- const r = {};
163
- for (const key in registeredFields) r[key] = (opts) => configureField(registeredFields[key], opts ?? {});
164
- t6$1 = fieldsProp({ r });
165
- $[1] = admin;
166
- $[2] = fieldsProp;
167
- $[3] = t6$1;
168
- } else t6$1 = $[3];
169
- t5 = t6$1;
170
- break bb0;
49
+ const registeredFields = admin.getFields();
50
+ const r = {};
51
+ for (const key in registeredFields) r[key] = (opts) => configureField(registeredFields[key], opts ?? {});
52
+ return fieldsProp({ r });
171
53
  }
172
- t5 = fieldsProp;
173
- }
174
- const nestedFields = t5;
175
- let t6;
176
- if ($[4] !== nestedFields) {
177
- t6 = Object.entries(nestedFields);
178
- $[4] = nestedFields;
179
- $[5] = t6;
180
- } else t6 = $[5];
181
- const fieldEntries = t6;
54
+ return fieldsProp;
55
+ }, [fieldsProp, admin]);
56
+ const fieldEntries = Object.entries(nestedFields);
182
57
  if (fieldEntries.length === 0) return null;
183
58
  if (formProp?.fields?.length) {
184
- let t7$1;
185
- if ($[6] !== disabled || $[7] !== name || $[8] !== nestedFields) {
186
- t7$1 = (fieldName, opts_0) => {
187
- const fieldDef = nestedFields[fieldName];
188
- if (!fieldDef) return null;
189
- return /* @__PURE__ */ jsx(NestedFieldRenderer, {
190
- fieldName,
191
- fieldDef,
192
- parentName: name,
193
- disabled
194
- }, fieldName);
195
- };
196
- $[6] = disabled;
197
- $[7] = name;
198
- $[8] = nestedFields;
199
- $[9] = t7$1;
200
- } else t7$1 = $[9];
201
- let t8$1;
202
- if ($[10] !== resolveText) {
203
- t8$1 = (text, fallback) => resolveText(text, fallback);
204
- $[10] = resolveText;
205
- $[11] = t8$1;
206
- } else t8$1 = $[11];
207
- let t9$1;
208
- if ($[12] !== t7$1 || $[13] !== t8$1) {
209
- t9$1 = {
210
- renderField: t7$1,
211
- resolveText: t8$1
212
- };
213
- $[12] = t7$1;
214
- $[13] = t8$1;
215
- $[14] = t9$1;
216
- } else t9$1 = $[14];
217
- const layoutCtx = t9$1;
218
- let t10;
219
- if ($[15] !== formProp.fields || $[16] !== layoutCtx) {
220
- t10 = /* @__PURE__ */ jsx(FieldLayoutRenderer, {
221
- items: formProp.fields,
222
- ctx: layoutCtx
223
- });
224
- $[15] = formProp.fields;
225
- $[16] = layoutCtx;
226
- $[17] = t10;
227
- } else t10 = $[17];
228
- const content = t10;
229
- if (wrapper === "collapsible") {
230
- let t11$1;
231
- if ($[18] !== className) {
232
- t11$1 = cn("qa-object-field panel-surface", className);
233
- $[18] = className;
234
- $[19] = t11$1;
235
- } else t11$1 = $[19];
236
- let t12$1;
237
- if ($[20] !== isCollapsed) {
238
- t12$1 = () => setIsCollapsed(!isCollapsed);
239
- $[20] = isCollapsed;
240
- $[21] = t12$1;
241
- } else t12$1 = $[21];
242
- let t13;
243
- if ($[22] !== isCollapsed) {
244
- t13 = isCollapsed ? /* @__PURE__ */ jsx(Icon, {
245
- icon: "ph:caret-right",
246
- className: "h-4 w-4"
247
- }) : /* @__PURE__ */ jsx(Icon, {
248
- icon: "ph:caret-down",
249
- className: "h-4 w-4"
250
- });
251
- $[22] = isCollapsed;
252
- $[23] = t13;
253
- } else t13 = $[23];
254
- const t14 = label ?? name;
255
- let t15;
256
- if ($[24] !== resolveText || $[25] !== t14) {
257
- t15 = resolveText(t14);
258
- $[24] = resolveText;
259
- $[25] = t14;
260
- $[26] = t15;
261
- } else t15 = $[26];
262
- let t16;
263
- if ($[27] !== t15) {
264
- t16 = /* @__PURE__ */ jsx("span", {
265
- className: "font-medium",
266
- children: t15
267
- });
268
- $[27] = t15;
269
- $[28] = t16;
270
- } else t16 = $[28];
271
- let t17;
272
- if ($[29] !== required) {
273
- t17 = required && /* @__PURE__ */ jsx("span", {
274
- className: "text-destructive",
275
- children: "*"
276
- });
277
- $[29] = required;
278
- $[30] = t17;
279
- } else t17 = $[30];
280
- let t18;
281
- if ($[31] !== t13 || $[32] !== t16 || $[33] !== t17) {
282
- t18 = /* @__PURE__ */ jsxs("div", {
59
+ const content = /* @__PURE__ */ jsx(FieldLayoutRenderer, {
60
+ items: formProp.fields,
61
+ ctx: {
62
+ renderField: (fieldName, opts) => {
63
+ const fieldDef = nestedFields[fieldName];
64
+ if (!fieldDef) return null;
65
+ return /* @__PURE__ */ jsx(NestedFieldRenderer, {
66
+ fieldName,
67
+ fieldDef,
68
+ parentName: name,
69
+ disabled
70
+ }, fieldName);
71
+ },
72
+ resolveText: (text, fallback) => resolveText(text, fallback)
73
+ }
74
+ });
75
+ if (wrapper === "collapsible") return /* @__PURE__ */ jsxs("div", {
76
+ className: cn("qa-object-field panel-surface", className),
77
+ children: [/* @__PURE__ */ jsx("button", {
78
+ type: "button",
79
+ onClick: () => setIsCollapsed(!isCollapsed),
80
+ className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
81
+ disabled,
82
+ children: /* @__PURE__ */ jsxs("div", {
283
83
  className: "flex items-center gap-2",
284
84
  children: [
285
- t13,
286
- t16,
287
- t17
85
+ isCollapsed ? /* @__PURE__ */ jsx(Icon, {
86
+ icon: "ph:caret-right",
87
+ className: "h-4 w-4"
88
+ }) : /* @__PURE__ */ jsx(Icon, {
89
+ icon: "ph:caret-down",
90
+ className: "h-4 w-4"
91
+ }),
92
+ /* @__PURE__ */ jsx("span", {
93
+ className: "font-medium",
94
+ children: resolveText(label ?? name)
95
+ }),
96
+ required && /* @__PURE__ */ jsx("span", {
97
+ className: "text-destructive",
98
+ children: "*"
99
+ })
288
100
  ]
289
- });
290
- $[31] = t13;
291
- $[32] = t16;
292
- $[33] = t17;
293
- $[34] = t18;
294
- } else t18 = $[34];
295
- let t19;
296
- if ($[35] !== disabled || $[36] !== t12$1 || $[37] !== t18) {
297
- t19 = /* @__PURE__ */ jsx("button", {
298
- type: "button",
299
- onClick: t12$1,
300
- className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
301
- disabled,
302
- children: t18
303
- });
304
- $[35] = disabled;
305
- $[36] = t12$1;
306
- $[37] = t18;
307
- $[38] = t19;
308
- } else t19 = $[38];
309
- let t20;
310
- if ($[39] !== content || $[40] !== isCollapsed) {
311
- t20 = !isCollapsed && /* @__PURE__ */ jsx("div", {
312
- className: "border-t p-4",
313
- children: content
314
- });
315
- $[39] = content;
316
- $[40] = isCollapsed;
317
- $[41] = t20;
318
- } else t20 = $[41];
319
- let t21;
320
- if ($[42] !== t11$1 || $[43] !== t19 || $[44] !== t20) {
321
- t21 = /* @__PURE__ */ jsxs("div", {
322
- className: t11$1,
323
- children: [t19, t20]
324
- });
325
- $[42] = t11$1;
326
- $[43] = t19;
327
- $[44] = t20;
328
- $[45] = t21;
329
- } else t21 = $[45];
330
- return t21;
331
- }
332
- if (label) {
333
- let t11$1;
334
- if ($[46] !== label || $[47] !== resolveText) {
335
- t11$1 = resolveText(label);
336
- $[46] = label;
337
- $[47] = resolveText;
338
- $[48] = t11$1;
339
- } else t11$1 = $[48];
340
- let t12$1;
341
- if ($[49] !== className) {
342
- t12$1 = cn("qa-object-field pt-1", className);
343
- $[49] = className;
344
- $[50] = t12$1;
345
- } else t12$1 = $[50];
346
- let t13;
347
- if ($[51] !== content || $[52] !== t12$1) {
348
- t13 = /* @__PURE__ */ jsx("div", {
349
- className: t12$1,
350
- children: content
351
- });
352
- $[51] = content;
353
- $[52] = t12$1;
354
- $[53] = t13;
355
- } else t13 = $[53];
356
- let t14;
357
- if ($[54] !== description || $[55] !== disabled || $[56] !== locale || $[57] !== localized || $[58] !== name || $[59] !== required || $[60] !== t11$1 || $[61] !== t13) {
358
- t14 = /* @__PURE__ */ jsx(FieldWrapper, {
359
- name,
360
- label: t11$1,
361
- description,
362
- required,
363
- disabled,
364
- localized,
365
- locale,
366
- children: t13
367
- });
368
- $[54] = description;
369
- $[55] = disabled;
370
- $[56] = locale;
371
- $[57] = localized;
372
- $[58] = name;
373
- $[59] = required;
374
- $[60] = t11$1;
375
- $[61] = t13;
376
- $[62] = t14;
377
- } else t14 = $[62];
378
- return t14;
379
- }
380
- let t11;
381
- if ($[63] !== className) {
382
- t11 = cn("qa-object-field", className);
383
- $[63] = className;
384
- $[64] = t11;
385
- } else t11 = $[64];
386
- let t12;
387
- if ($[65] !== content || $[66] !== t11) {
388
- t12 = /* @__PURE__ */ jsx("div", {
389
- className: t11,
101
+ })
102
+ }), !isCollapsed && /* @__PURE__ */ jsx("div", {
103
+ className: "border-t p-4",
390
104
  children: content
391
- });
392
- $[65] = content;
393
- $[66] = t11;
394
- $[67] = t12;
395
- } else t12 = $[67];
396
- return t12;
105
+ })]
106
+ });
107
+ if (label) return /* @__PURE__ */ jsx(FieldWrapper, {
108
+ name,
109
+ label: resolveText(label),
110
+ description,
111
+ required,
112
+ disabled,
113
+ localized,
114
+ locale,
115
+ children: /* @__PURE__ */ jsx("div", {
116
+ className: cn("qa-object-field pt-1", className),
117
+ children: content
118
+ })
119
+ });
120
+ return /* @__PURE__ */ jsx("div", {
121
+ className: cn("qa-object-field", className),
122
+ children: content
123
+ });
397
124
  }
398
- if (wrapper === "collapsible" || layout === "collapsible") {
399
- let t7$1;
400
- if ($[68] !== className) {
401
- t7$1 = cn("qa-object-field panel-surface", className);
402
- $[68] = className;
403
- $[69] = t7$1;
404
- } else t7$1 = $[69];
405
- let t8$1;
406
- if ($[70] !== isCollapsed) {
407
- t8$1 = () => setIsCollapsed(!isCollapsed);
408
- $[70] = isCollapsed;
409
- $[71] = t8$1;
410
- } else t8$1 = $[71];
411
- let t9$1;
412
- if ($[72] !== isCollapsed) {
413
- t9$1 = isCollapsed ? /* @__PURE__ */ jsx(Icon, {
414
- icon: "ph:caret-right",
415
- className: "h-4 w-4"
416
- }) : /* @__PURE__ */ jsx(Icon, {
417
- icon: "ph:caret-down",
418
- className: "h-4 w-4"
419
- });
420
- $[72] = isCollapsed;
421
- $[73] = t9$1;
422
- } else t9$1 = $[73];
423
- const t10 = label ?? name;
424
- let t11;
425
- if ($[74] !== resolveText || $[75] !== t10) {
426
- t11 = resolveText(t10);
427
- $[74] = resolveText;
428
- $[75] = t10;
429
- $[76] = t11;
430
- } else t11 = $[76];
431
- let t12;
432
- if ($[77] !== t11) {
433
- t12 = /* @__PURE__ */ jsx("span", {
434
- className: "font-medium",
435
- children: t11
436
- });
437
- $[77] = t11;
438
- $[78] = t12;
439
- } else t12 = $[78];
440
- let t13;
441
- if ($[79] !== required) {
442
- t13 = required && /* @__PURE__ */ jsx("span", {
443
- className: "text-destructive",
444
- children: "*"
445
- });
446
- $[79] = required;
447
- $[80] = t13;
448
- } else t13 = $[80];
449
- let t14;
450
- if ($[81] !== t12 || $[82] !== t13 || $[83] !== t9$1) {
451
- t14 = /* @__PURE__ */ jsxs("div", {
125
+ if (wrapper === "collapsible" || layout === "collapsible") return /* @__PURE__ */ jsxs("div", {
126
+ className: cn("qa-object-field panel-surface", className),
127
+ children: [/* @__PURE__ */ jsx("button", {
128
+ type: "button",
129
+ onClick: () => setIsCollapsed(!isCollapsed),
130
+ className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
131
+ disabled,
132
+ children: /* @__PURE__ */ jsxs("div", {
452
133
  className: "flex items-center gap-2",
453
134
  children: [
454
- t9$1,
455
- t12,
456
- t13
135
+ isCollapsed ? /* @__PURE__ */ jsx(Icon, {
136
+ icon: "ph:caret-right",
137
+ className: "h-4 w-4"
138
+ }) : /* @__PURE__ */ jsx(Icon, {
139
+ icon: "ph:caret-down",
140
+ className: "h-4 w-4"
141
+ }),
142
+ /* @__PURE__ */ jsx("span", {
143
+ className: "font-medium",
144
+ children: resolveText(label ?? name)
145
+ }),
146
+ required && /* @__PURE__ */ jsx("span", {
147
+ className: "text-destructive",
148
+ children: "*"
149
+ })
457
150
  ]
458
- });
459
- $[81] = t12;
460
- $[82] = t13;
461
- $[83] = t9$1;
462
- $[84] = t14;
463
- } else t14 = $[84];
464
- let t15;
465
- if ($[85] !== disabled || $[86] !== t14 || $[87] !== t8$1) {
466
- t15 = /* @__PURE__ */ jsx("button", {
467
- type: "button",
468
- onClick: t8$1,
469
- className: "hover:bg-muted flex min-h-10 w-full items-center justify-between p-3 text-left transition-colors active:scale-[0.96]",
470
- disabled,
471
- children: t14
472
- });
473
- $[85] = disabled;
474
- $[86] = t14;
475
- $[87] = t8$1;
476
- $[88] = t15;
477
- } else t15 = $[88];
478
- let t16;
479
- if ($[89] !== columns || $[90] !== description || $[91] !== disabled || $[92] !== fieldEntries || $[93] !== isCollapsed || $[94] !== layout || $[95] !== name || $[96] !== resolveText) {
480
- t16 = !isCollapsed && /* @__PURE__ */ jsxs("div", {
481
- className: "border-t p-4",
482
- children: [description && /* @__PURE__ */ jsx("p", {
483
- className: "text-muted-foreground mb-4 text-sm text-pretty",
484
- children: resolveText(description)
485
- }), /* @__PURE__ */ jsx(NestedFieldsLayout, {
486
- fieldEntries,
487
- layout,
488
- columns,
489
- name,
490
- disabled
491
- })]
492
- });
493
- $[89] = columns;
494
- $[90] = description;
495
- $[91] = disabled;
496
- $[92] = fieldEntries;
497
- $[93] = isCollapsed;
498
- $[94] = layout;
499
- $[95] = name;
500
- $[96] = resolveText;
501
- $[97] = t16;
502
- } else t16 = $[97];
503
- let t17;
504
- if ($[98] !== t15 || $[99] !== t16 || $[100] !== t7$1) {
505
- t17 = /* @__PURE__ */ jsxs("div", {
506
- className: t7$1,
507
- children: [t15, t16]
508
- });
509
- $[98] = t15;
510
- $[99] = t16;
511
- $[100] = t7$1;
512
- $[101] = t17;
513
- } else t17 = $[101];
514
- return t17;
515
- }
516
- if (label) {
517
- let t7$1;
518
- if ($[102] !== label || $[103] !== resolveText) {
519
- t7$1 = resolveText(label);
520
- $[102] = label;
521
- $[103] = resolveText;
522
- $[104] = t7$1;
523
- } else t7$1 = $[104];
524
- let t8$1;
525
- if ($[105] !== className) {
526
- t8$1 = cn("qa-object-field pt-1", className);
527
- $[105] = className;
528
- $[106] = t8$1;
529
- } else t8$1 = $[106];
530
- let t9$1;
531
- if ($[107] !== columns || $[108] !== disabled || $[109] !== fieldEntries || $[110] !== layout || $[111] !== name) {
532
- t9$1 = /* @__PURE__ */ jsx(NestedFieldsLayout, {
151
+ })
152
+ }), !isCollapsed && /* @__PURE__ */ jsxs("div", {
153
+ className: "border-t p-4",
154
+ children: [description && /* @__PURE__ */ jsx("p", {
155
+ className: "text-muted-foreground mb-4 text-sm text-pretty",
156
+ children: resolveText(description)
157
+ }), /* @__PURE__ */ jsx(NestedFieldsLayout, {
533
158
  fieldEntries,
534
159
  layout,
535
160
  columns,
536
161
  name,
537
162
  disabled
538
- });
539
- $[107] = columns;
540
- $[108] = disabled;
541
- $[109] = fieldEntries;
542
- $[110] = layout;
543
- $[111] = name;
544
- $[112] = t9$1;
545
- } else t9$1 = $[112];
546
- let t10;
547
- if ($[113] !== t8$1 || $[114] !== t9$1) {
548
- t10 = /* @__PURE__ */ jsx("div", {
549
- className: t8$1,
550
- children: t9$1
551
- });
552
- $[113] = t8$1;
553
- $[114] = t9$1;
554
- $[115] = t10;
555
- } else t10 = $[115];
556
- let t11;
557
- if ($[116] !== description || $[117] !== disabled || $[118] !== locale || $[119] !== localized || $[120] !== name || $[121] !== required || $[122] !== t10 || $[123] !== t7$1) {
558
- t11 = /* @__PURE__ */ jsx(FieldWrapper, {
163
+ })]
164
+ })]
165
+ });
166
+ if (label) return /* @__PURE__ */ jsx(FieldWrapper, {
167
+ name,
168
+ label: resolveText(label),
169
+ description,
170
+ required,
171
+ disabled,
172
+ localized,
173
+ locale,
174
+ children: /* @__PURE__ */ jsx("div", {
175
+ className: cn("qa-object-field pt-1", className),
176
+ children: /* @__PURE__ */ jsx(NestedFieldsLayout, {
177
+ fieldEntries,
178
+ layout,
179
+ columns,
559
180
  name,
560
- label: t7$1,
561
- description,
562
- required,
563
- disabled,
564
- localized,
565
- locale,
566
- children: t10
567
- });
568
- $[116] = description;
569
- $[117] = disabled;
570
- $[118] = locale;
571
- $[119] = localized;
572
- $[120] = name;
573
- $[121] = required;
574
- $[122] = t10;
575
- $[123] = t7$1;
576
- $[124] = t11;
577
- } else t11 = $[124];
578
- return t11;
579
- }
580
- let t7;
581
- if ($[125] !== className) {
582
- t7 = cn("qa-object-field", className);
583
- $[125] = className;
584
- $[126] = t7;
585
- } else t7 = $[126];
586
- let t8;
587
- if ($[127] !== columns || $[128] !== disabled || $[129] !== fieldEntries || $[130] !== layout || $[131] !== name) {
588
- t8 = /* @__PURE__ */ jsx(NestedFieldsLayout, {
181
+ disabled
182
+ })
183
+ })
184
+ });
185
+ return /* @__PURE__ */ jsx("div", {
186
+ className: cn("qa-object-field", className),
187
+ children: /* @__PURE__ */ jsx(NestedFieldsLayout, {
589
188
  fieldEntries,
590
189
  layout,
591
190
  columns,
592
191
  name,
593
192
  disabled
594
- });
595
- $[127] = columns;
596
- $[128] = disabled;
597
- $[129] = fieldEntries;
598
- $[130] = layout;
599
- $[131] = name;
600
- $[132] = t8;
601
- } else t8 = $[132];
602
- let t9;
603
- if ($[133] !== t7 || $[134] !== t8) {
604
- t9 = /* @__PURE__ */ jsx("div", {
605
- className: t7,
606
- children: t8
607
- });
608
- $[133] = t7;
609
- $[134] = t8;
610
- $[135] = t9;
611
- } else t9 = $[135];
612
- return t9;
193
+ })
194
+ });
613
195
  }
614
- function NestedFieldsLayout(t0) {
615
- const $ = c(16);
616
- const { fieldEntries, layout, columns, name, disabled } = t0;
617
- let t1;
618
- if ($[0] !== disabled || $[1] !== fieldEntries || $[2] !== name) {
619
- let t2$1;
620
- if ($[4] !== disabled || $[5] !== name) {
621
- t2$1 = (t3) => {
622
- const [fieldName, fieldDef] = t3;
623
- return /* @__PURE__ */ jsx(NestedFieldRenderer, {
624
- fieldName,
625
- fieldDef,
626
- parentName: name,
627
- disabled
628
- }, fieldName);
629
- };
630
- $[4] = disabled;
631
- $[5] = name;
632
- $[6] = t2$1;
633
- } else t2$1 = $[6];
634
- t1 = fieldEntries.map(t2$1);
635
- $[0] = disabled;
636
- $[1] = fieldEntries;
637
- $[2] = name;
638
- $[3] = t1;
639
- } else t1 = $[3];
640
- const fieldElements = t1;
641
- if (layout === "inline") {
642
- let t2$1;
643
- if ($[7] !== fieldElements) {
644
- t2$1 = /* @__PURE__ */ jsx("div", {
645
- className: "flex flex-wrap items-end gap-2",
646
- children: fieldElements
647
- });
648
- $[7] = fieldElements;
649
- $[8] = t2$1;
650
- } else t2$1 = $[8];
651
- return t2$1;
652
- }
653
- if (layout === "grid") {
654
- const t2$1 = gridColumnClasses[columns] || "grid-cols-2";
655
- let t3;
656
- if ($[9] !== t2$1) {
657
- t3 = cn("grid gap-4", t2$1);
658
- $[9] = t2$1;
659
- $[10] = t3;
660
- } else t3 = $[10];
661
- let t4;
662
- if ($[11] !== fieldElements || $[12] !== t3) {
663
- t4 = /* @__PURE__ */ jsx("div", {
664
- className: t3,
665
- children: fieldElements
666
- });
667
- $[11] = fieldElements;
668
- $[12] = t3;
669
- $[13] = t4;
670
- } else t4 = $[13];
671
- return t4;
672
- }
673
- let t2;
674
- if ($[14] !== fieldElements) {
675
- t2 = /* @__PURE__ */ jsx("div", {
676
- className: "space-y-4",
677
- children: fieldElements
678
- });
679
- $[14] = fieldElements;
680
- $[15] = t2;
681
- } else t2 = $[15];
682
- return t2;
196
+ function NestedFieldsLayout({ fieldEntries, layout, columns, name, disabled }) {
197
+ const fieldElements = fieldEntries.map(([fieldName, fieldDef]) => /* @__PURE__ */ jsx(NestedFieldRenderer, {
198
+ fieldName,
199
+ fieldDef,
200
+ parentName: name,
201
+ disabled
202
+ }, fieldName));
203
+ if (layout === "inline") return /* @__PURE__ */ jsx("div", {
204
+ className: "flex flex-wrap items-end gap-2",
205
+ children: fieldElements
206
+ });
207
+ if (layout === "grid") return /* @__PURE__ */ jsx("div", {
208
+ className: cn("grid gap-4", gridColumnClasses[columns] || "grid-cols-2"),
209
+ children: fieldElements
210
+ });
211
+ return /* @__PURE__ */ jsx("div", {
212
+ className: "space-y-4",
213
+ children: fieldElements
214
+ });
683
215
  }
684
216
 
685
217
  //#endregion