@uipath/apollo-wind 0.9.0 → 0.10.0-pr257.2a4b17b

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 (145) hide show
  1. package/dist/components/forms/field-renderer.cjs +120 -69
  2. package/dist/components/forms/field-renderer.js +120 -69
  3. package/dist/components/forms/form-designer.cjs +2352 -1488
  4. package/dist/components/forms/form-designer.js +2353 -1489
  5. package/dist/components/forms/form-examples.cjs +10 -10
  6. package/dist/components/forms/form-examples.js +10 -10
  7. package/dist/components/forms/form-state-viewer.cjs +988 -433
  8. package/dist/components/forms/form-state-viewer.js +988 -433
  9. package/dist/components/forms/metadata-form.cjs +446 -170
  10. package/dist/components/forms/metadata-form.js +446 -170
  11. package/dist/components/forms/schema-viewer.cjs +173 -80
  12. package/dist/components/forms/schema-viewer.js +173 -80
  13. package/dist/components/ui/accordion.cjs +131 -27
  14. package/dist/components/ui/accordion.js +131 -27
  15. package/dist/components/ui/alert-dialog.cjs +273 -45
  16. package/dist/components/ui/alert-dialog.js +273 -45
  17. package/dist/components/ui/alert.cjs +106 -17
  18. package/dist/components/ui/alert.js +106 -17
  19. package/dist/components/ui/avatar.cjs +100 -15
  20. package/dist/components/ui/avatar.js +100 -15
  21. package/dist/components/ui/badge.cjs +36 -6
  22. package/dist/components/ui/badge.js +36 -6
  23. package/dist/components/ui/breadcrumb.cjs +258 -52
  24. package/dist/components/ui/breadcrumb.js +258 -52
  25. package/dist/components/ui/button-group.cjs +119 -19
  26. package/dist/components/ui/button-group.js +119 -19
  27. package/dist/components/ui/button.cjs +48 -8
  28. package/dist/components/ui/button.js +48 -8
  29. package/dist/components/ui/calendar.cjs +88 -30
  30. package/dist/components/ui/calendar.js +88 -30
  31. package/dist/components/ui/card.cjs +199 -30
  32. package/dist/components/ui/card.js +199 -30
  33. package/dist/components/ui/checkbox.cjs +42 -8
  34. package/dist/components/ui/checkbox.js +42 -8
  35. package/dist/components/ui/combobox.cjs +150 -53
  36. package/dist/components/ui/combobox.js +150 -53
  37. package/dist/components/ui/command.cjs +291 -53
  38. package/dist/components/ui/command.js +291 -53
  39. package/dist/components/ui/context-menu.cjs +370 -72
  40. package/dist/components/ui/context-menu.js +370 -72
  41. package/dist/components/ui/data-table.cjs +76 -39
  42. package/dist/components/ui/data-table.js +76 -39
  43. package/dist/components/ui/date-picker.cjs +179 -68
  44. package/dist/components/ui/date-picker.js +179 -68
  45. package/dist/components/ui/datetime-picker.cjs +225 -104
  46. package/dist/components/ui/datetime-picker.js +225 -104
  47. package/dist/components/ui/dialog.cjs +290 -78
  48. package/dist/components/ui/dialog.js +290 -78
  49. package/dist/components/ui/drawer.cjs +220 -39
  50. package/dist/components/ui/drawer.js +220 -39
  51. package/dist/components/ui/dropdown-menu.cjs +376 -73
  52. package/dist/components/ui/dropdown-menu.js +376 -73
  53. package/dist/components/ui/editable-cell.cjs +106 -42
  54. package/dist/components/ui/editable-cell.js +106 -42
  55. package/dist/components/ui/empty-state.cjs +106 -33
  56. package/dist/components/ui/empty-state.js +106 -33
  57. package/dist/components/ui/file-upload.cjs +405 -187
  58. package/dist/components/ui/file-upload.d.ts +3 -1
  59. package/dist/components/ui/file-upload.js +405 -187
  60. package/dist/components/ui/hover-card.cjs +46 -7
  61. package/dist/components/ui/hover-card.js +46 -7
  62. package/dist/components/ui/index.cjs +4 -4
  63. package/dist/components/ui/input.cjs +39 -6
  64. package/dist/components/ui/input.js +39 -6
  65. package/dist/components/ui/label.cjs +34 -5
  66. package/dist/components/ui/label.js +34 -5
  67. package/dist/components/ui/layout/column.cjs +209 -41
  68. package/dist/components/ui/layout/column.js +209 -41
  69. package/dist/components/ui/layout/grid.cjs +275 -60
  70. package/dist/components/ui/layout/grid.js +275 -60
  71. package/dist/components/ui/layout/row.cjs +209 -41
  72. package/dist/components/ui/layout/row.js +209 -41
  73. package/dist/components/ui/menubar.cjs +540 -106
  74. package/dist/components/ui/menubar.js +540 -106
  75. package/dist/components/ui/multi-select.cjs +289 -135
  76. package/dist/components/ui/multi-select.js +289 -135
  77. package/dist/components/ui/navigation-menu.cjs +244 -47
  78. package/dist/components/ui/navigation-menu.js +244 -47
  79. package/dist/components/ui/pagination.cjs +301 -65
  80. package/dist/components/ui/pagination.js +301 -65
  81. package/dist/components/ui/popover.cjs +48 -9
  82. package/dist/components/ui/popover.js +48 -9
  83. package/dist/components/ui/progress.cjs +48 -8
  84. package/dist/components/ui/progress.js +48 -8
  85. package/dist/components/ui/radio-group.cjs +74 -12
  86. package/dist/components/ui/radio-group.js +74 -12
  87. package/dist/components/ui/resizable.cjs +75 -10
  88. package/dist/components/ui/resizable.js +75 -10
  89. package/dist/components/ui/scroll-area.cjs +113 -21
  90. package/dist/components/ui/scroll-area.js +113 -21
  91. package/dist/components/ui/search.cjs +280 -98
  92. package/dist/components/ui/search.js +280 -98
  93. package/dist/components/ui/select.cjs +334 -68
  94. package/dist/components/ui/select.js +334 -68
  95. package/dist/components/ui/separator.cjs +48 -7
  96. package/dist/components/ui/separator.js +48 -7
  97. package/dist/components/ui/sheet.cjs +236 -50
  98. package/dist/components/ui/sheet.js +236 -50
  99. package/dist/components/ui/skeleton.cjs +31 -5
  100. package/dist/components/ui/skeleton.js +31 -5
  101. package/dist/components/ui/slider.cjs +71 -21
  102. package/dist/components/ui/slider.js +71 -21
  103. package/dist/components/ui/sonner.cjs +43 -15
  104. package/dist/components/ui/sonner.js +43 -15
  105. package/dist/components/ui/spinner.cjs +83 -21
  106. package/dist/components/ui/spinner.js +83 -21
  107. package/dist/components/ui/stats-card.cjs +169 -60
  108. package/dist/components/ui/stats-card.js +169 -60
  109. package/dist/components/ui/stepper.cjs +126 -57
  110. package/dist/components/ui/stepper.js +126 -57
  111. package/dist/components/ui/switch.cjs +42 -8
  112. package/dist/components/ui/switch.js +42 -8
  113. package/dist/components/ui/table.cjs +267 -42
  114. package/dist/components/ui/table.js +267 -42
  115. package/dist/components/ui/tabs.cjs +100 -15
  116. package/dist/components/ui/tabs.js +100 -15
  117. package/dist/components/ui/textarea.cjs +34 -5
  118. package/dist/components/ui/textarea.js +34 -5
  119. package/dist/components/ui/toggle-group.cjs +112 -19
  120. package/dist/components/ui/toggle-group.js +112 -19
  121. package/dist/components/ui/toggle.cjs +43 -6
  122. package/dist/components/ui/toggle.js +43 -6
  123. package/dist/components/ui/tooltip.cjs +40 -6
  124. package/dist/components/ui/tooltip.js +40 -6
  125. package/dist/examples/admin-layout-example.cjs +879 -347
  126. package/dist/examples/admin-layout-example.js +879 -347
  127. package/dist/examples/app-shell-example.cjs +14 -14
  128. package/dist/examples/app-shell-example.js +14 -14
  129. package/dist/examples/dashboard-example.cjs +495 -334
  130. package/dist/examples/dashboard-example.js +495 -334
  131. package/dist/examples/data-management-example.cjs +501 -303
  132. package/dist/examples/data-management-example.js +502 -304
  133. package/dist/examples/flow-editor-layout-example.cjs +435 -231
  134. package/dist/examples/flow-editor-layout-example.js +436 -232
  135. package/dist/examples/flow-start-example.cjs +508 -251
  136. package/dist/examples/flow-start-example.js +509 -252
  137. package/dist/examples/form-builder-example.cjs +1006 -602
  138. package/dist/examples/form-builder-example.js +1007 -603
  139. package/dist/examples/new-project-example.cjs +806 -474
  140. package/dist/examples/new-project-example.js +807 -475
  141. package/dist/examples/settings-example.cjs +792 -704
  142. package/dist/examples/settings-example.js +792 -704
  143. package/dist/examples/vscode-example.cjs +731 -236
  144. package/dist/examples/vscode-example.js +731 -236
  145. package/package.json +4 -1
@@ -27,6 +27,7 @@ __webpack_require__.d(__webpack_exports__, {
27
27
  MetadataForm: ()=>MetadataForm
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const compiler_runtime_namespaceObject = require("react/compiler-runtime");
30
31
  const external_react_namespaceObject = require("react");
31
32
  const external_react_hook_form_namespaceObject = require("react-hook-form");
32
33
  const v4_namespaceObject = require("zod/v4");
@@ -53,7 +54,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
53
54
  const { watch, handleSubmit, reset } = form;
54
55
  const valuesRef = (0, external_react_namespaceObject.useRef)({});
55
56
  const watchedValues = watch();
56
- valuesRef.current = watchedValues;
57
+ (0, external_react_namespaceObject.useEffect)(()=>{
58
+ valuesRef.current = watchedValues;
59
+ });
57
60
  const context = (0, external_react_namespaceObject.useMemo)(()=>({
58
61
  schema,
59
62
  form,
@@ -87,7 +90,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
87
90
  currentStep
88
91
  ]);
89
92
  const contextRef = (0, external_react_namespaceObject.useRef)(context);
90
- contextRef.current = context;
93
+ (0, external_react_namespaceObject.useEffect)(()=>{
94
+ contextRef.current = context;
95
+ });
91
96
  (0, external_react_namespaceObject.useEffect)(()=>{
92
97
  if (isInitialized) return;
93
98
  const initializeForm = async ()=>{
@@ -104,11 +109,11 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
104
109
  ]);
105
110
  (0, external_react_namespaceObject.useEffect)(()=>{
106
111
  if (!isInitialized) return;
107
- const subscription = watch((value, { name })=>{
108
- if (name) {
112
+ const subscription = watch((value, { name: name_0 })=>{
113
+ if (name_0) {
109
114
  valuesRef.current = value;
110
- plugins.forEach((plugin)=>{
111
- plugin.onValueChange?.(name, value[name], contextRef.current);
115
+ plugins.forEach((plugin_0)=>{
116
+ plugin_0.onValueChange?.(name_0, value[name_0], contextRef.current);
112
117
  });
113
118
  }
114
119
  });
@@ -118,9 +123,9 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
118
123
  isInitialized,
119
124
  plugins
120
125
  ]);
121
- const handleFormSubmit = handleSubmit(async (data)=>{
122
- let finalData = data;
123
- for (const plugin of plugins)if (plugin.onSubmit) finalData = await plugin.onSubmit(finalData, context) || finalData;
126
+ const handleFormSubmit = handleSubmit(async (data_0)=>{
127
+ let finalData = data_0;
128
+ for (const plugin_1 of plugins)if (plugin_1.onSubmit) finalData = await plugin_1.onSubmit(finalData, context) || finalData;
124
129
  if (onSubmit) await onSubmit(finalData);
125
130
  });
126
131
  const renderContent = ()=>{
@@ -156,188 +161,459 @@ function MetadataForm({ schema, plugins = DEFAULT_PLUGINS, onSubmit, className,
156
161
  })
157
162
  });
158
163
  }
159
- function SinglePageForm({ schema, context, customComponents, disabled }) {
160
- const sections = schema.sections || [];
161
- const visibleSections = sections.filter((section)=>!section.conditions || context.evaluateConditions(section.conditions));
162
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
163
- className: "space-y-2",
164
- children: visibleSections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
165
- section: section,
166
- context: context,
167
- customComponents: customComponents,
168
- disabled: disabled
169
- }, section.id))
170
- });
164
+ function SinglePageForm(t0) {
165
+ const $ = (0, compiler_runtime_namespaceObject.c)(15);
166
+ const { schema, context, customComponents, disabled } = t0;
167
+ let t1;
168
+ let t2;
169
+ if ($[0] !== context || $[1] !== customComponents || $[2] !== disabled || $[3] !== schema.sections) {
170
+ const sections = schema.sections || [];
171
+ let t3;
172
+ if ($[6] !== context) {
173
+ t3 = (section)=>!section.conditions || context.evaluateConditions(section.conditions);
174
+ $[6] = context;
175
+ $[7] = t3;
176
+ } else t3 = $[7];
177
+ const visibleSections = sections.filter(t3);
178
+ t1 = "space-y-2";
179
+ let t4;
180
+ if ($[8] !== context || $[9] !== customComponents || $[10] !== disabled) {
181
+ t4 = (section_0)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
182
+ section: section_0,
183
+ context: context,
184
+ customComponents: customComponents,
185
+ disabled: disabled
186
+ }, section_0.id);
187
+ $[8] = context;
188
+ $[9] = customComponents;
189
+ $[10] = disabled;
190
+ $[11] = t4;
191
+ } else t4 = $[11];
192
+ t2 = visibleSections.map(t4);
193
+ $[0] = context;
194
+ $[1] = customComponents;
195
+ $[2] = disabled;
196
+ $[3] = schema.sections;
197
+ $[4] = t1;
198
+ $[5] = t2;
199
+ } else {
200
+ t1 = $[4];
201
+ t2 = $[5];
202
+ }
203
+ let t3;
204
+ if ($[12] !== t1 || $[13] !== t2) {
205
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
206
+ className: t1,
207
+ children: t2
208
+ });
209
+ $[12] = t1;
210
+ $[13] = t2;
211
+ $[14] = t3;
212
+ } else t3 = $[14];
213
+ return t3;
171
214
  }
172
- function MultiStepForm({ schema, context, currentStep, setCurrentStep, customComponents, disabled }) {
173
- const steps = schema.steps || [];
215
+ function MultiStepForm(t0) {
216
+ const $ = (0, compiler_runtime_namespaceObject.c)(43);
217
+ const { schema, context, currentStep, setCurrentStep, customComponents, disabled } = t0;
218
+ let t1;
219
+ if ($[0] !== schema.steps) {
220
+ t1 = schema.steps || [];
221
+ $[0] = schema.steps;
222
+ $[1] = t1;
223
+ } else t1 = $[1];
224
+ const steps = t1;
174
225
  const step = steps[currentStep];
175
226
  if (!step) return null;
176
227
  if (step.conditions && !context.evaluateConditions(step.conditions)) {
177
228
  if (currentStep < steps.length - 1) setCurrentStep(currentStep + 1);
178
229
  return null;
179
230
  }
180
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
181
- className: "space-y-6",
182
- children: [
183
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
184
- className: "flex items-center justify-between",
185
- children: [
186
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
187
- children: [
188
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h2", {
189
- className: "text-2xl font-semibold",
190
- children: step.title
191
- }),
192
- step.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
193
- className: "text-muted-foreground mt-1",
194
- children: step.description
195
- })
196
- ]
197
- }),
198
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
199
- className: "text-sm text-muted-foreground",
200
- children: [
201
- "Step ",
202
- currentStep + 1,
203
- " of ",
204
- steps.length
205
- ]
206
- })
207
- ]
208
- }),
209
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
210
- className: "space-y-2",
211
- children: step.sections.map((section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
212
- section: section,
213
- context: context,
214
- customComponents: customComponents,
215
- disabled: disabled
216
- }, section.id))
217
- }),
218
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
219
- className: "flex justify-between pt-6",
220
- children: [
221
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
222
- type: "button",
223
- onClick: ()=>setCurrentStep(Math.max(0, currentStep - 1)),
224
- disabled: 0 === currentStep,
225
- variant: "secondary",
226
- children: "Previous"
227
- }),
228
- currentStep < steps.length - 1 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
229
- type: "button",
230
- onClick: ()=>setCurrentStep(currentStep + 1),
231
- variant: "default",
232
- children: "Next"
233
- }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
234
- type: "submit",
235
- variant: "default",
236
- children: "Submit"
237
- })
238
- ]
239
- })
240
- ]
241
- });
231
+ let t2;
232
+ if ($[2] !== step.title) {
233
+ t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h2", {
234
+ className: "text-2xl font-semibold",
235
+ children: step.title
236
+ });
237
+ $[2] = step.title;
238
+ $[3] = t2;
239
+ } else t2 = $[3];
240
+ let t3;
241
+ if ($[4] !== step.description) {
242
+ t3 = step.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
243
+ className: "text-muted-foreground mt-1",
244
+ children: step.description
245
+ });
246
+ $[4] = step.description;
247
+ $[5] = t3;
248
+ } else t3 = $[5];
249
+ let t4;
250
+ if ($[6] !== t2 || $[7] !== t3) {
251
+ t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
252
+ children: [
253
+ t2,
254
+ t3
255
+ ]
256
+ });
257
+ $[6] = t2;
258
+ $[7] = t3;
259
+ $[8] = t4;
260
+ } else t4 = $[8];
261
+ const t5 = currentStep + 1;
262
+ let t6;
263
+ if ($[9] !== steps.length || $[10] !== t5) {
264
+ t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
265
+ className: "text-sm text-muted-foreground",
266
+ children: [
267
+ "Step ",
268
+ t5,
269
+ " of ",
270
+ steps.length
271
+ ]
272
+ });
273
+ $[9] = steps.length;
274
+ $[10] = t5;
275
+ $[11] = t6;
276
+ } else t6 = $[11];
277
+ let t7;
278
+ if ($[12] !== t4 || $[13] !== t6) {
279
+ t7 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
280
+ className: "flex items-center justify-between",
281
+ children: [
282
+ t4,
283
+ t6
284
+ ]
285
+ });
286
+ $[12] = t4;
287
+ $[13] = t6;
288
+ $[14] = t7;
289
+ } else t7 = $[14];
290
+ let t8;
291
+ if ($[15] !== context || $[16] !== customComponents || $[17] !== disabled || $[18] !== step.sections) {
292
+ let t9;
293
+ if ($[20] !== context || $[21] !== customComponents || $[22] !== disabled) {
294
+ t9 = (section)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(FormSection, {
295
+ section: section,
296
+ context: context,
297
+ customComponents: customComponents,
298
+ disabled: disabled
299
+ }, section.id);
300
+ $[20] = context;
301
+ $[21] = customComponents;
302
+ $[22] = disabled;
303
+ $[23] = t9;
304
+ } else t9 = $[23];
305
+ t8 = step.sections.map(t9);
306
+ $[15] = context;
307
+ $[16] = customComponents;
308
+ $[17] = disabled;
309
+ $[18] = step.sections;
310
+ $[19] = t8;
311
+ } else t8 = $[19];
312
+ let t9;
313
+ if ($[24] !== t8) {
314
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
315
+ className: "space-y-2",
316
+ children: t8
317
+ });
318
+ $[24] = t8;
319
+ $[25] = t9;
320
+ } else t9 = $[25];
321
+ let t10;
322
+ if ($[26] !== currentStep || $[27] !== setCurrentStep) {
323
+ t10 = ()=>setCurrentStep(Math.max(0, currentStep - 1));
324
+ $[26] = currentStep;
325
+ $[27] = setCurrentStep;
326
+ $[28] = t10;
327
+ } else t10 = $[28];
328
+ const t11 = 0 === currentStep;
329
+ let t12;
330
+ if ($[29] !== t10 || $[30] !== t11) {
331
+ t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
332
+ type: "button",
333
+ onClick: t10,
334
+ disabled: t11,
335
+ variant: "secondary",
336
+ children: "Previous"
337
+ });
338
+ $[29] = t10;
339
+ $[30] = t11;
340
+ $[31] = t12;
341
+ } else t12 = $[31];
342
+ let t13;
343
+ if ($[32] !== currentStep || $[33] !== setCurrentStep || $[34] !== steps.length) {
344
+ t13 = currentStep < steps.length - 1 ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
345
+ type: "button",
346
+ onClick: ()=>setCurrentStep(currentStep + 1),
347
+ variant: "default",
348
+ children: "Next"
349
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
350
+ type: "submit",
351
+ variant: "default",
352
+ children: "Submit"
353
+ });
354
+ $[32] = currentStep;
355
+ $[33] = setCurrentStep;
356
+ $[34] = steps.length;
357
+ $[35] = t13;
358
+ } else t13 = $[35];
359
+ let t14;
360
+ if ($[36] !== t12 || $[37] !== t13) {
361
+ t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
362
+ className: "flex justify-between pt-6",
363
+ children: [
364
+ t12,
365
+ t13
366
+ ]
367
+ });
368
+ $[36] = t12;
369
+ $[37] = t13;
370
+ $[38] = t14;
371
+ } else t14 = $[38];
372
+ let t15;
373
+ if ($[39] !== t14 || $[40] !== t7 || $[41] !== t9) {
374
+ t15 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
375
+ className: "space-y-6",
376
+ children: [
377
+ t7,
378
+ t9,
379
+ t14
380
+ ]
381
+ });
382
+ $[39] = t14;
383
+ $[40] = t7;
384
+ $[41] = t9;
385
+ $[42] = t15;
386
+ } else t15 = $[42];
387
+ return t15;
242
388
  }
243
- function FormSection({ section, context, customComponents, disabled }) {
389
+ function FormSection(t0) {
390
+ const $ = (0, compiler_runtime_namespaceObject.c)(41);
391
+ const { section, context, customComponents, disabled } = t0;
244
392
  const gridColumns = context.schema.layout?.columns || 1;
245
393
  const gap = context.schema.layout?.gap || 4;
246
- const fieldsGrid = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
247
- className: "grid",
248
- style: {
249
- gridTemplateColumns: `repeat(${gridColumns}, minmax(0, 1fr))`,
250
- gap: `${0.25 * gap}rem`
251
- },
252
- children: section.fields.map((field)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_field_renderer_cjs_namespaceObject.FormFieldRenderer, {
253
- field: field,
254
- context: context,
255
- customComponents: customComponents,
256
- disabled: disabled
257
- }, field.name))
258
- });
394
+ const t1 = `repeat(${gridColumns}, minmax(0, 1fr))`;
395
+ const t2 = `${0.25 * gap}rem`;
396
+ let t3;
397
+ if ($[0] !== t1 || $[1] !== t2) {
398
+ t3 = {
399
+ gridTemplateColumns: t1,
400
+ gap: t2
401
+ };
402
+ $[0] = t1;
403
+ $[1] = t2;
404
+ $[2] = t3;
405
+ } else t3 = $[2];
406
+ let t4;
407
+ if ($[3] !== context || $[4] !== customComponents || $[5] !== disabled || $[6] !== section.fields) {
408
+ let t5;
409
+ if ($[8] !== context || $[9] !== customComponents || $[10] !== disabled) {
410
+ t5 = (field)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_field_renderer_cjs_namespaceObject.FormFieldRenderer, {
411
+ field: field,
412
+ context: context,
413
+ customComponents: customComponents,
414
+ disabled: disabled
415
+ }, field.name);
416
+ $[8] = context;
417
+ $[9] = customComponents;
418
+ $[10] = disabled;
419
+ $[11] = t5;
420
+ } else t5 = $[11];
421
+ t4 = section.fields.map(t5);
422
+ $[3] = context;
423
+ $[4] = customComponents;
424
+ $[5] = disabled;
425
+ $[6] = section.fields;
426
+ $[7] = t4;
427
+ } else t4 = $[7];
428
+ let t5;
429
+ if ($[12] !== t3 || $[13] !== t4) {
430
+ t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
431
+ className: "grid",
432
+ style: t3,
433
+ children: t4
434
+ });
435
+ $[12] = t3;
436
+ $[13] = t4;
437
+ $[14] = t5;
438
+ } else t5 = $[14];
439
+ const fieldsGrid = t5;
259
440
  if (!section.title) return fieldsGrid;
260
- const innerContent = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
261
- className: "flex flex-col gap-4",
262
- children: [
263
- section.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
264
- className: "text-sm text-muted-foreground",
265
- children: section.description
266
- }),
267
- fieldsGrid
268
- ]
269
- });
441
+ let t6;
442
+ if ($[15] !== section.description) {
443
+ t6 = section.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
444
+ className: "text-sm text-muted-foreground",
445
+ children: section.description
446
+ });
447
+ $[15] = section.description;
448
+ $[16] = t6;
449
+ } else t6 = $[16];
450
+ let t7;
451
+ if ($[17] !== fieldsGrid || $[18] !== t6) {
452
+ t7 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
453
+ className: "flex flex-col gap-4",
454
+ children: [
455
+ t6,
456
+ fieldsGrid
457
+ ]
458
+ });
459
+ $[17] = fieldsGrid;
460
+ $[18] = t6;
461
+ $[19] = t7;
462
+ } else t7 = $[19];
463
+ const innerContent = t7;
270
464
  if (section.collapsible) {
271
- const defaultValue = false !== section.defaultExpanded ? [
272
- section.id
273
- ] : [];
274
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Accordion, {
275
- type: "multiple",
276
- defaultValue: defaultValue,
277
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.AccordionItem, {
465
+ let t8;
466
+ if ($[20] !== section.defaultExpanded || $[21] !== section.id) {
467
+ t8 = false !== section.defaultExpanded ? [
468
+ section.id
469
+ ] : [];
470
+ $[20] = section.defaultExpanded;
471
+ $[21] = section.id;
472
+ $[22] = t8;
473
+ } else t8 = $[22];
474
+ const defaultValue = t8;
475
+ let t9;
476
+ if ($[23] !== section.title) {
477
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionTrigger, {
478
+ className: "text-sm font-medium",
479
+ children: section.title
480
+ });
481
+ $[23] = section.title;
482
+ $[24] = t9;
483
+ } else t9 = $[24];
484
+ let t10;
485
+ if ($[25] !== innerContent) {
486
+ t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionContent, {
487
+ children: innerContent
488
+ });
489
+ $[25] = innerContent;
490
+ $[26] = t10;
491
+ } else t10 = $[26];
492
+ let t11;
493
+ if ($[27] !== section.id || $[28] !== t10 || $[29] !== t9) {
494
+ t11 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(accordion_cjs_namespaceObject.AccordionItem, {
278
495
  value: section.id,
279
496
  className: "border rounded-lg px-3",
280
497
  children: [
281
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionTrigger, {
282
- className: "text-sm font-medium",
283
- children: section.title
284
- }),
285
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.AccordionContent, {
286
- children: innerContent
287
- })
498
+ t9,
499
+ t10
288
500
  ]
501
+ });
502
+ $[27] = section.id;
503
+ $[28] = t10;
504
+ $[29] = t9;
505
+ $[30] = t11;
506
+ } else t11 = $[30];
507
+ let t12;
508
+ if ($[31] !== defaultValue || $[32] !== t11) {
509
+ t12 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(accordion_cjs_namespaceObject.Accordion, {
510
+ type: "multiple",
511
+ defaultValue: defaultValue,
512
+ children: t11
513
+ });
514
+ $[31] = defaultValue;
515
+ $[32] = t11;
516
+ $[33] = t12;
517
+ } else t12 = $[33];
518
+ return t12;
519
+ }
520
+ let t8;
521
+ if ($[34] !== section.title) {
522
+ t8 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
523
+ className: "flex",
524
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
525
+ className: "flex flex-1 items-center justify-between py-4 text-sm font-medium",
526
+ children: section.title
289
527
  })
290
528
  });
291
- }
292
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
293
- className: "border rounded-lg px-3",
294
- children: [
295
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
296
- className: "flex",
297
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
298
- className: "flex flex-1 items-center justify-between py-4 text-sm font-medium",
299
- children: section.title
300
- })
301
- }),
302
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
303
- className: "text-sm",
304
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
305
- className: "pb-4 pt-0",
306
- children: innerContent
307
- })
529
+ $[34] = section.title;
530
+ $[35] = t8;
531
+ } else t8 = $[35];
532
+ let t9;
533
+ if ($[36] !== innerContent) {
534
+ t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
535
+ className: "text-sm",
536
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
537
+ className: "pb-4 pt-0",
538
+ children: innerContent
308
539
  })
309
- ]
310
- });
540
+ });
541
+ $[36] = innerContent;
542
+ $[37] = t9;
543
+ } else t9 = $[37];
544
+ let t10;
545
+ if ($[38] !== t8 || $[39] !== t9) {
546
+ t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
547
+ className: "border rounded-lg px-3",
548
+ children: [
549
+ t8,
550
+ t9
551
+ ]
552
+ });
553
+ $[38] = t8;
554
+ $[39] = t9;
555
+ $[40] = t10;
556
+ } else t10 = $[40];
557
+ return t10;
311
558
  }
312
- function FormActions({ schema, context, onReset }) {
313
- const actions = schema.actions || [
314
- {
315
- id: 'submit',
316
- type: 'submit',
317
- label: 'Submit',
318
- variant: 'default'
319
- }
320
- ];
559
+ function FormActions(t0) {
560
+ const $ = (0, compiler_runtime_namespaceObject.c)(11);
561
+ const { schema, context, onReset } = t0;
562
+ let t1;
563
+ if ($[0] !== schema.actions) {
564
+ t1 = schema.actions || [
565
+ {
566
+ id: "submit",
567
+ type: "submit",
568
+ label: "Submit",
569
+ variant: "default"
570
+ }
571
+ ];
572
+ $[0] = schema.actions;
573
+ $[1] = t1;
574
+ } else t1 = $[1];
575
+ const actions = t1;
321
576
  if (0 === actions.length) return null;
322
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
323
- className: "flex gap-2 pt-6",
324
- children: actions.map((action)=>{
325
- if (action.conditions && !context.evaluateConditions(action.conditions)) return null;
326
- if ('reset' === action.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
327
- type: "button",
328
- onClick: onReset,
329
- variant: action.variant || 'secondary',
330
- disabled: action.disabled,
331
- children: action.label
332
- }, action.id);
333
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
334
- type: 'submit' === action.type ? 'submit' : 'button',
335
- variant: action.variant || 'default',
336
- disabled: action.disabled || 'submit' === action.type && context.isSubmitting,
337
- children: action.loading && context.isSubmitting ? 'Loading...' : action.label
338
- }, action.id);
339
- })
340
- });
577
+ let t2;
578
+ if ($[2] !== actions || $[3] !== context || $[4] !== onReset) {
579
+ let t3;
580
+ if ($[6] !== context || $[7] !== onReset) {
581
+ t3 = (action)=>{
582
+ if (action.conditions && !context.evaluateConditions(action.conditions)) return null;
583
+ if ("reset" === action.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
584
+ type: "button",
585
+ onClick: onReset,
586
+ variant: action.variant || "secondary",
587
+ disabled: action.disabled,
588
+ children: action.label
589
+ }, action.id);
590
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(button_cjs_namespaceObject.Button, {
591
+ type: "submit" === action.type ? "submit" : "button",
592
+ variant: action.variant || "default",
593
+ disabled: action.disabled || "submit" === action.type && context.isSubmitting,
594
+ children: action.loading && context.isSubmitting ? "Loading..." : action.label
595
+ }, action.id);
596
+ };
597
+ $[6] = context;
598
+ $[7] = onReset;
599
+ $[8] = t3;
600
+ } else t3 = $[8];
601
+ t2 = actions.map(t3);
602
+ $[2] = actions;
603
+ $[3] = context;
604
+ $[4] = onReset;
605
+ $[5] = t2;
606
+ } else t2 = $[5];
607
+ let t3;
608
+ if ($[9] !== t2) {
609
+ t3 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
610
+ className: "flex gap-2 pt-6",
611
+ children: t2
612
+ });
613
+ $[9] = t2;
614
+ $[10] = t3;
615
+ } else t3 = $[10];
616
+ return t3;
341
617
  }
342
618
  function buildZodSchema(schema) {
343
619
  const shape = {};