@digiform/wizard 0.3.0 → 0.3.2

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 (89) hide show
  1. package/core/src/types/guards.js +0 -12
  2. package/core/src/utils/apiBodyUtils.js +43 -75
  3. package/features/form-runtime/components/FormFooter.d.ts +5 -0
  4. package/features/form-runtime/hooks/useValidationEvents.d.ts +0 -1
  5. package/features/state-management/machines/formMachine.d.ts +3 -0
  6. package/features/state-management/machines/types.d.ts +4 -0
  7. package/features/state-management/machines/useFormMachine.d.ts +18 -0
  8. package/index.d.ts +2 -8
  9. package/index.js +2 -108
  10. package/package.json +1 -30
  11. package/styles.css +1 -1
  12. package/ui/src/lib/utils/templateUtils.js +11 -43
  13. package/wizard/src/features/api-integration/services/ApiCallService.js +65 -74
  14. package/wizard/src/features/dialog-system/components/ActionDialog/ActionDialog.js +39 -43
  15. package/wizard/src/features/dialog-system/components/ConfirmationDialog/ConfirmationDialog.js +37 -41
  16. package/wizard/src/features/dialog-system/components/EmailVerificationDialog/EmailVerificationDialog.js +44 -45
  17. package/wizard/src/features/form-runtime/FormWizard/FormWizard.js +56 -78
  18. package/wizard/src/features/form-runtime/components/FormField.js +28 -28
  19. package/wizard/src/features/form-runtime/components/FormFooter.js +53 -184
  20. package/wizard/src/features/form-runtime/components/FormSection/FormSection.js +152 -196
  21. package/wizard/src/features/form-runtime/components/FormStep/FormStep.js +82 -91
  22. package/wizard/src/features/form-runtime/components/StepProgressIndicator/StepProgressIndicator.js +24 -30
  23. package/wizard/src/features/form-runtime/config/configResolver.js +10 -14
  24. package/wizard/src/features/form-runtime/config/templateLoader.js +71 -108
  25. package/wizard/src/features/form-runtime/hooks/useComponentTriggers.js +45 -88
  26. package/wizard/src/features/form-runtime/hooks/useFieldEventHandlers.js +27 -41
  27. package/wizard/src/features/form-runtime/hooks/useFormFieldState.js +5 -5
  28. package/wizard/src/features/form-runtime/hooks/useValidationEvents.js +22 -25
  29. package/wizard/src/features/form-runtime/utils/errorUtils.js +31 -42
  30. package/wizard/src/features/form-runtime/utils/formDirtyStateSync.js +26 -37
  31. package/wizard/src/features/form-runtime/utils/logger.js +12 -12
  32. package/wizard/src/features/form-runtime/utils/validationUX.js +14 -55
  33. package/wizard/src/features/state-management/machines/actions/navigationActions.js +13 -8
  34. package/wizard/src/features/state-management/machines/componentTriggerEngine.js +167 -432
  35. package/wizard/src/features/state-management/machines/formMachine.js +558 -677
  36. package/wizard/src/features/state-management/machines/useFormMachine.js +172 -190
  37. package/wizard/src/features/trigger-action-system/components/ActionManager.js +35 -86
  38. package/wizard/src/features/validation-system/validation/SchemaBuilder.js +28 -82
  39. package/wizard/src/features/validation-system/validation/ValidationCache.js +11 -27
  40. package/wizard/src/features/validation-system/validation/ValidationEngine.js +24 -29
  41. package/wizard/src/features/validation-system/validation/ValidationExecutor.js +26 -58
  42. package/FormWizard.d.ts +0 -10
  43. package/core/src/types/api.js +0 -12
  44. package/core/src/types/form-config.js +0 -60
  45. package/core/src/types/form-wizard-config-schema.js +0 -113
  46. package/core/src/types/validation.js +0 -61
  47. package/features/api-integration.d.ts +0 -2
  48. package/features/api-integration.js +0 -17
  49. package/features/dialog-system.d.ts +0 -2
  50. package/features/dialog-system.js +0 -9
  51. package/features/form-runtime/utils/formSaver.d.ts +0 -22
  52. package/features/form-runtime.d.ts +0 -2
  53. package/features/form-runtime.js +0 -63
  54. package/features/index.d.ts +0 -11
  55. package/features/state-management/components/ValidationBuilder/ValidationBuilder.d.ts +0 -9
  56. package/features/state-management/machines/__tests__/setup.d.ts +0 -0
  57. package/features/state-management/machines/__tests__/vitest.config.d.ts +0 -2
  58. package/features/state-management/machines/actions/validationActions.d.ts +0 -68
  59. package/features/state-management/machines/lazyLoading.d.ts +0 -34
  60. package/features/state-management/machines/validation/index.d.ts +0 -5
  61. package/features/state-management/machines/validation/validateField.d.ts +0 -2
  62. package/features/state-management/machines/validation/validateForm.d.ts +0 -2
  63. package/features/state-management/machines/validation/validateSection.d.ts +0 -2
  64. package/features/state-management/machines/validation/validateStep.d.ts +0 -2
  65. package/features/state-management/machines/validation/validationTypes.d.ts +0 -1
  66. package/features/state-management.d.ts +0 -2
  67. package/features/state-management.js +0 -21
  68. package/features/trigger-action-system/components/FieldWarning/FieldWarning.d.ts +0 -20
  69. package/features/trigger-action-system.d.ts +0 -2
  70. package/features/trigger-action-system.js +0 -12
  71. package/features/validation-system.d.ts +0 -2
  72. package/features/validation-system.js +0 -23
  73. package/styles/index.d.ts +0 -0
  74. package/ui/src/components/badge/badge.js +0 -20
  75. package/ui/src/components/badge/badge.module.css.js +0 -12
  76. package/wizard/src/features/api-integration/services/ActionExecutor.js +0 -339
  77. package/wizard/src/features/api-integration/services/ApiCallExecutor.js +0 -6
  78. package/wizard/src/features/api-integration/services/DialogExecutor.js +0 -6
  79. package/wizard/src/features/api-integration/services/GenericTriggerService.js +0 -284
  80. package/wizard/src/features/api-integration/services/NavigationExecutor.js +0 -6
  81. package/wizard/src/features/form-runtime/config/templateConfig.js +0 -156
  82. package/wizard/src/features/form-runtime/config/templateUtils.js +0 -14
  83. package/wizard/src/features/form-runtime/utils/validation.js +0 -100
  84. package/wizard/src/features/trigger-action-system/components/ActionLoadingIndicator/ActionLoadingIndicator.js +0 -46
  85. package/wizard/src/features/trigger-action-system/components/ActionLoadingIndicator/ActionLoadingIndicator.module.css.js +0 -30
  86. package/wizard/src/features/trigger-action-system/utils/GenericTriggerEngine.js +0 -376
  87. package/wizard/src/features/validation-system/components/ValidationDebugger.js +0 -69
  88. package/wizard/src/features/validation-system/validation/tanstackSchemaAdapter.js +0 -17
  89. package/wizard/src/features/validation-system/validation/validationService.js +0 -74
@@ -1,50 +1,49 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
3
3
  /* empty css */
4
4
  import { Alert as E, AlertDescription as $ } from "../../../../../../ui/src/components/alert/alert.js";
5
5
  import { Button as m } from "../../../../../../ui/src/components/button/button.js";
6
- import { Dialog as D, DialogContent as V, DialogHeader as x, DialogTitle as A, DialogDescription as L } from "../../../../../../ui/src/components/dialog/dialog.js";
6
+ import { Dialog as x, DialogContent as D, DialogHeader as V, DialogTitle as A, DialogDescription as L } from "../../../../../../ui/src/components/dialog/dialog.js";
7
7
  import { ValidationCode as P } from "../../../../../../ui/src/components/ValidationCode/ValidationCode.js";
8
8
  import { CheckCircle as _, Mail as j, AlertCircle as q } from "lucide-react";
9
- import { memo as H, useState as f, useEffect as I, useCallback as W } from "react";
9
+ import { memo as H, useState as f, useEffect as I, useCallback as O } from "react";
10
10
  import i from "./EmailVerificationDialog.module.css.js";
11
- const Y = H(
11
+ const W = H(
12
12
  ({
13
13
  config: h,
14
- formData: z,
15
- onButtonClick: g,
16
- onClose: F,
17
- isOpen: u
14
+ formData: Y,
15
+ onButtonClick: u,
16
+ onClose: z,
17
+ isOpen: C
18
18
  }) => {
19
- console.log("🔥 EmailVerificationDialog rendering!", { isOpen: u, config: h });
20
- const t = h.templateMetadata, [c, C] = f(""), [n, r] = f("idle"), [p, l] = f(""), [d, v] = f(0), [b, k] = f(0);
19
+ const t = h.templateMetadata, [c, p] = f(""), [n, s] = f("idle"), [g, l] = f(""), [d, v] = f(0), [b, k] = f(0);
21
20
  I(() => {
22
21
  if (d > 0) {
23
- const a = setTimeout(() => v(d - 1), 1e3);
24
- return () => clearTimeout(a);
22
+ const o = setTimeout(() => v(d - 1), 1e3);
23
+ return () => clearTimeout(o);
25
24
  }
26
25
  }, [d]);
27
- const N = W(async () => {
28
- r("verifying");
29
- const a = b + 1;
30
- k(a);
26
+ const N = O(async () => {
27
+ s("verifying");
28
+ const o = b + 1;
29
+ k(o);
31
30
  try {
32
- if (await new Promise((s) => setTimeout(s, 1500)), c === "123456" || c === "000000" || c === "111111")
33
- r("success");
31
+ if (await new Promise((r) => setTimeout(r, 1500)), c === "123456" || c === "000000" || c === "111111")
32
+ s("success");
34
33
  else {
35
- const s = t?.maxAttempts;
36
- if (s && a >= s)
37
- r("blocked"), l(
34
+ const r = t?.maxAttempts;
35
+ if (r && o >= r)
36
+ s("blocked"), l(
38
37
  "Maximum verification attempts exceeded. Please request a new verification code."
39
38
  );
40
39
  else {
41
- r("error");
42
- const M = s ? s - a : null, R = t?.errorMessage || "Invalid code. Please try again.", S = M ? ` (${M} attempts remaining)` : "";
40
+ s("error");
41
+ const M = r ? r - o : null, R = t?.errorMessage || "Invalid code. Please try again.", S = M ? ` (${M} attempts remaining)` : "";
43
42
  l(R + S);
44
43
  }
45
44
  }
46
45
  } catch {
47
- r("error"), l(
46
+ s("error"), l(
48
47
  t?.errorMessage || "Verification failed. Please try again."
49
48
  );
50
49
  }
@@ -53,18 +52,18 @@ const Y = H(
53
52
  t?.errorMessage,
54
53
  t?.maxAttempts,
55
54
  b
56
- ]), w = (a) => {
57
- C(a), (n === "error" || n === "blocked") && (r("idle"), l(""));
58
- }, T = (a) => {
59
- console.log("completedCode", a), t?.enableAutoSubmit && n === "idle" && N();
55
+ ]), w = (o) => {
56
+ p(o), (n === "error" || n === "blocked") && (s("idle"), l(""));
57
+ }, T = (o) => {
58
+ t?.enableAutoSubmit && n === "idle" && N();
60
59
  }, y = () => {
61
- v(t?.resendTimer || 60), C(""), r("idle"), l(""), k(0);
60
+ v(t?.resendTimer || 60), p(""), s("idle"), l(""), k(0);
62
61
  }, B = () => {
63
- g({ type: "close" });
62
+ u({ type: "close" });
64
63
  };
65
- return n === "success" ? /* @__PURE__ */ e(D, { open: u, onOpenChange: () => !1, children: /* @__PURE__ */ o(V, { className: i.dialogContent, children: [
66
- /* @__PURE__ */ o(x, { children: [
67
- /* @__PURE__ */ o("div", { className: i.headerRow, children: [
64
+ return n === "success" ? /* @__PURE__ */ e(x, { open: C, onOpenChange: () => !1, children: /* @__PURE__ */ a(D, { className: i.dialogContent, children: [
65
+ /* @__PURE__ */ a(V, { children: [
66
+ /* @__PURE__ */ a("div", { className: i.headerRow, children: [
68
67
  /* @__PURE__ */ e(_, { className: `${i.iconMd} ${i.iconSuccess}` }),
69
68
  /* @__PURE__ */ e(A, { children: t?.successTitle || "Verification Successful" })
70
69
  ] }),
@@ -73,7 +72,7 @@ const Y = H(
73
72
  /* @__PURE__ */ e("div", { className: i.successButtonRow, children: /* @__PURE__ */ e(
74
73
  m,
75
74
  {
76
- onClick: () => g(
75
+ onClick: () => u(
77
76
  t?.onVerifiedAction || {
78
77
  type: "navigate",
79
78
  direction: "next"
@@ -83,16 +82,16 @@ const Y = H(
83
82
  children: t?.continueButtonLabel || "Continue"
84
83
  }
85
84
  ) })
86
- ] }) }) : /* @__PURE__ */ e(D, { open: u, onOpenChange: () => !1, children: /* @__PURE__ */ o(V, { className: i.dialogContent, children: [
87
- /* @__PURE__ */ o(x, { children: [
88
- /* @__PURE__ */ o("div", { className: i.headerRow, children: [
85
+ ] }) }) : /* @__PURE__ */ e(x, { open: C, onOpenChange: () => !1, children: /* @__PURE__ */ a(D, { className: i.dialogContent, children: [
86
+ /* @__PURE__ */ a(V, { children: [
87
+ /* @__PURE__ */ a("div", { className: i.headerRow, children: [
89
88
  /* @__PURE__ */ e(j, { className: `${i.iconMd} ${i.iconMail}` }),
90
89
  /* @__PURE__ */ e(A, { children: h.title })
91
90
  ] }),
92
91
  /* @__PURE__ */ e(L, { children: h.content })
93
92
  ] }),
94
- /* @__PURE__ */ o("div", { className: i.formContent, children: [
95
- /* @__PURE__ */ o("div", { className: i.codeSection, children: [
93
+ /* @__PURE__ */ a("div", { className: i.formContent, children: [
94
+ /* @__PURE__ */ a("div", { className: i.codeSection, children: [
96
95
  /* @__PURE__ */ e("div", { className: i.codeLabel, children: "Verification Code" }),
97
96
  /* @__PURE__ */ e("div", { className: i.codeCenter, children: /* @__PURE__ */ e(
98
97
  P,
@@ -105,9 +104,9 @@ const Y = H(
105
104
  }
106
105
  ) })
107
106
  ] }),
108
- (n === "error" || n === "blocked") && p && /* @__PURE__ */ o(E, { variant: "destructive", children: [
107
+ (n === "error" || n === "blocked") && g && /* @__PURE__ */ a(E, { variant: "destructive", children: [
109
108
  /* @__PURE__ */ e(q, { className: i.iconSm }),
110
- /* @__PURE__ */ e($, { children: p })
109
+ /* @__PURE__ */ e($, { children: g })
111
110
  ] }),
112
111
  t?.enableResend && n !== "blocked" && /* @__PURE__ */ e("div", { className: i.resendText, children: d > 0 ? `Resend code in ${d}s` : /* @__PURE__ */ e(
113
112
  m,
@@ -128,7 +127,7 @@ const Y = H(
128
127
  }
129
128
  ) })
130
129
  ] }),
131
- /* @__PURE__ */ o("div", { className: i.footerButtonRow, children: [
130
+ /* @__PURE__ */ a("div", { className: i.footerButtonRow, children: [
132
131
  /* @__PURE__ */ e(m, { variant: "secondary", onClick: B, children: t?.cancelButtonLabel || "Cancel" }),
133
132
  /* @__PURE__ */ e(
134
133
  m,
@@ -142,8 +141,8 @@ const Y = H(
142
141
  ] }) });
143
142
  }
144
143
  );
145
- Y.displayName = "EmailVerificationDialog";
144
+ W.displayName = "EmailVerificationDialog";
146
145
  export {
147
- Y as EmailVerificationDialog,
148
- Y as default
146
+ W as EmailVerificationDialog,
147
+ W as default
149
148
  };
@@ -1,107 +1,85 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
3
- import { useFormMachineProvider as E, FormMachineContext as z } from "../../state-management/machines/useFormMachine.js";
4
- import { ActionManager as M } from "../../trigger-action-system/components/ActionManager.js";
2
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
3
+ import { wizardDefaultRenderer as E } from "../../../renderer/wizardRenderer.js";
5
4
  /* empty css */
6
5
  import { FormLayout as s } from "../../../../../ui/src/components/FormLayout/FormLayout.js";
7
- import { formWizardQueryClient as N } from "../../../../../ui/src/lib/queryClient.js";
8
- import { QueryClientProvider as W } from "@tanstack/react-query";
9
- import { clsx as g } from "clsx";
10
- import { memo as w, useState as h, useEffect as L, useMemo as u } from "react";
11
- import n from "./FormWizard.module.css.js";
12
- import P from "../components/FormStep/FormStep.js";
13
- import T from "../components/StepProgressIndicator/StepProgressIndicator.js";
14
- import { hasTemplateSteps as I, resolveFormWizardConfig as x } from "../config/configResolver.js";
15
- import { ThemeProvider as b, useThemeConfig as U } from "../../../../../ui/src/theme/ThemeProvider.js";
16
- import j from "../../../../../ui/src/lib/error-boundaries/FormWizardErrorBoundary.js";
17
- import { FormEditingProvider as O } from "../../../../../ui/src/lib/providers/FormEditingContext.js";
18
- import m from "../../../../../ui/src/lib/error-boundaries/ComponentErrorBoundary.js";
19
- import { ValidationEngine as V } from "../../validation-system/validation/ValidationEngine.js";
20
- import { Heading as k } from "@rijkshuisstijl-community/components-react";
21
- const v = w(
6
+ import { formWizardQueryClient as z } from "../../../../../ui/src/lib/queryClient.js";
7
+ import { QueryClientProvider as N } from "@tanstack/react-query";
8
+ import { clsx as u } from "clsx";
9
+ import { memo as M, useState as h, useEffect as P, useMemo as g } from "react";
10
+ import t from "./FormWizard.module.css.js";
11
+ import W from "../components/FormStep/FormStep.js";
12
+ import w from "../components/StepProgressIndicator/StepProgressIndicator.js";
13
+ import { hasTemplateSteps as x, resolveFormWizardConfig as L } from "../config/configResolver.js";
14
+ import { ThemeProvider as T, useThemeConfig as I } from "../../../../../ui/src/theme/ThemeProvider.js";
15
+ import { useFormMachineProvider as R, FormMachineContext as j } from "../../state-management/machines/useFormMachine.js";
16
+ import A from "../../../../../ui/src/lib/error-boundaries/FormWizardErrorBoundary.js";
17
+ import { FormEditingProvider as B } from "../../../../../ui/src/lib/providers/FormEditingContext.js";
18
+ import l from "../../../../../ui/src/lib/error-boundaries/ComponentErrorBoundary.js";
19
+ import { ActionManager as H } from "../../trigger-action-system/components/ActionManager.js";
20
+ import { registerRenderComponent as Q } from "../../../../../ui/src/component-registry/renderComponent.js";
21
+ import { ValidationEngine as b } from "../../validation-system/validation/ValidationEngine.js";
22
+ import { Heading as D } from "@rijkshuisstijl-community/components-react";
23
+ Q(E);
24
+ const v = M(
22
25
  ({
23
- config: r,
24
- initialData: a = {},
25
- onSubmit: y,
26
- queryClient: C = N
26
+ config: e,
27
+ initialData: n = {},
28
+ onSubmit: C,
29
+ queryClient: y = z
27
30
  }) => {
28
- console.log(
29
- "🏁 [FormWizard] FormWizardCore component MOUNTING with config:",
30
- {
31
- configId: r.id,
32
- configTitle: r.title,
33
- stepCount: r.steps?.length,
34
- validationMessageStyle: r.validationMessageStyle,
35
- hasInitialData: Object.keys(a).length > 0
36
- }
37
- ), typeof window < "u" && setTimeout(() => {
38
- console.log(
39
- "🚨 [FormWizard] MOUNTED SUCCESSFULLY - Check console for detailed logs"
40
- );
41
- }, 100);
42
- const [t, d] = h(null), [c, f] = h(null);
43
- L(() => {
31
+ const [i, d] = h(null), [c, f] = h(null);
32
+ P(() => {
44
33
  (async () => {
45
34
  try {
46
- if (f(null), I(r)) {
47
- const o = await x(r);
35
+ if (f(null), x(e)) {
36
+ const o = await L(e);
48
37
  d(o);
49
38
  } else
50
- d(r);
39
+ d(e);
51
40
  } catch (o) {
52
41
  f(
53
42
  o instanceof Error ? o.message : "Failed to resolve configuration"
54
43
  ), console.error("Error resolving form configuration:", o);
55
44
  }
56
45
  })();
57
- }, [r]);
58
- const p = u(() => {
59
- console.log(
60
- "🚀 [FormWizard] Creating ValidationEngine with messageStyle:",
61
- r.validationMessageStyle || "withLabel"
62
- );
63
- const i = new V({
64
- messageStyle: r.validationMessageStyle || "withLabel"
65
- });
66
- return console.log("✅ [FormWizard] ValidationEngine created:", {
67
- engine: !!i,
68
- validateField: typeof i.validateField,
69
- messageStyle: r.validationMessageStyle || "withLabel"
70
- }), i;
71
- }, [r.validationMessageStyle]), S = u(() => t ? {
72
- ...t,
73
- steps: t.steps.map((i) => {
74
- const o = i;
46
+ }, [e]);
47
+ const p = g(() => new b({
48
+ messageStyle: e.validationMessageStyle || "withLabel"
49
+ }), [e.validationMessageStyle]), S = g(() => i ? {
50
+ ...i,
51
+ steps: i.steps.map((m) => {
52
+ const o = m;
75
53
  return {
76
54
  ...o,
77
55
  schema: o.schema || p.getStepSchema(o)
78
56
  };
79
57
  })
80
- } : null, [t, p]), F = E({
81
- config: S || r,
58
+ } : null, [i, p]), F = R({
59
+ config: S || e,
82
60
  // Fallback to original config if resolution fails
83
- initialData: a,
84
- onSubmit: y
61
+ initialData: n,
62
+ onSubmit: C
85
63
  });
86
- return c ? /* @__PURE__ */ l("div", { className: g("form-wizard-error", n.errorState), children: [
87
- /* @__PURE__ */ e("h3", { className: n.errorHeading, children: "Configuration Error" }),
88
- /* @__PURE__ */ e("p", { children: c })
89
- ] }) : t ? /* @__PURE__ */ e(W, { client: C, children: /* @__PURE__ */ e(j, { formId: r.id, children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ l(z.Provider, { value: F, children: [
90
- /* @__PURE__ */ e(m, { componentName: "ActionManager", children: /* @__PURE__ */ e(M, {}) }),
91
- /* @__PURE__ */ l(s, { className: n.formLayout, children: [
92
- /* @__PURE__ */ e(s.Title, { children: /* @__PURE__ */ e(k, { level: 1, children: r.title }) }),
93
- /* @__PURE__ */ e(s.LeftColumn, { children: /* @__PURE__ */ e(m, { componentName: "StepProgressIndicator", children: /* @__PURE__ */ e(T, {}) }) }),
94
- /* @__PURE__ */ e(m, { componentName: "FormStep", children: /* @__PURE__ */ e(P, {}) })
64
+ return c ? /* @__PURE__ */ a("div", { className: u("form-wizard-error", t.errorState), children: [
65
+ /* @__PURE__ */ r("h3", { className: t.errorHeading, children: "Configuration Error" }),
66
+ /* @__PURE__ */ r("p", { children: c })
67
+ ] }) : i ? /* @__PURE__ */ r(N, { client: y, children: /* @__PURE__ */ r(A, { formId: e.id, children: /* @__PURE__ */ r(B, { children: /* @__PURE__ */ a(j.Provider, { value: F, children: [
68
+ /* @__PURE__ */ r(l, { componentName: "ActionManager", children: /* @__PURE__ */ r(H, {}) }),
69
+ /* @__PURE__ */ a(s, { className: t.formLayout, children: [
70
+ /* @__PURE__ */ r(s.Title, { children: /* @__PURE__ */ r(D, { level: 1, children: e.title }) }),
71
+ /* @__PURE__ */ r(s.LeftColumn, { children: /* @__PURE__ */ r(l, { componentName: "StepProgressIndicator", children: /* @__PURE__ */ r(w, {}) }) }),
72
+ /* @__PURE__ */ r(l, { componentName: "FormStep", children: /* @__PURE__ */ r(W, {}) })
95
73
  ] })
96
- ] }) }) }) }) : /* @__PURE__ */ e("div", { className: g("form-wizard-loading", n.loadingState), children: /* @__PURE__ */ e("div", { className: n.loadingPulse, children: "Loading form templates..." }) });
74
+ ] }) }) }) }) : /* @__PURE__ */ r("div", { className: u("form-wizard-loading", t.loadingState), children: /* @__PURE__ */ r("div", { className: t.loadingPulse, children: "Loading form templates..." }) });
97
75
  }
98
76
  );
99
77
  v.displayName = "FormWizardCore";
100
- const A = (r) => {
101
- const a = U();
102
- return /* @__PURE__ */ e(b, { config: a, children: /* @__PURE__ */ e(v, { ...r }) });
78
+ const V = (e) => {
79
+ const n = I();
80
+ return /* @__PURE__ */ r(T, { config: n, children: /* @__PURE__ */ r(v, { ...e }) });
103
81
  };
104
- A.displayName = "FormWizard";
82
+ V.displayName = "FormWizard";
105
83
  export {
106
- A as default
84
+ V as default
107
85
  };
@@ -1,42 +1,42 @@
1
1
  "use client";
2
2
  import { jsx as n, jsxs as p } from "react/jsx-runtime";
3
- import { useFormMachine as M } from "../../state-management/machines/useFormMachine.js";
4
3
  import { ComponentAlerts as F } from "../../trigger-action-system/components/ComponentAlert/ComponentAlert.js";
5
4
  /* empty css */
6
- import { memo as N, useMemo as x } from "react";
7
- import { adaptComponentForRegistry as _ } from "../ComponentAdapterComplete/ComponentAdapterComplete.js";
8
- import { useComponentTriggers as B } from "../hooks/useComponentTriggers.js";
9
- import { useComponentVisibility as H } from "../hooks/useComponentVisibility.js";
10
- import { useFieldEventHandlers as O } from "../hooks/useFieldEventHandlers.js";
11
- import { useFormContext as U } from "../hooks/useFormContext.js";
12
- import { useFormFieldState as G } from "../hooks/useFormFieldState.js";
13
- import { useValidationEvents as z } from "../hooks/useValidationEvents.js";
14
- import { checkHasIsDirtyTriggers as P, shouldBeFormField as j, checkFieldHasValue as q, getValidationDisplayState as J, shouldShowComponentAlerts as W, shouldShowDisplayMode as X } from "../utils/fieldHelpers.js";
5
+ import { memo as M, useMemo as N } from "react";
6
+ import { adaptComponentForRegistry as x } from "../ComponentAdapterComplete/ComponentAdapterComplete.js";
7
+ import { useComponentTriggers as _ } from "../hooks/useComponentTriggers.js";
8
+ import { useComponentVisibility as B } from "../hooks/useComponentVisibility.js";
9
+ import { useFieldEventHandlers as H } from "../hooks/useFieldEventHandlers.js";
10
+ import { useFormContext as O } from "../hooks/useFormContext.js";
11
+ import { useFormFieldState as U } from "../hooks/useFormFieldState.js";
12
+ import { useValidationEvents as G } from "../hooks/useValidationEvents.js";
13
+ import { checkHasIsDirtyTriggers as z, shouldBeFormField as P, checkFieldHasValue as j, getValidationDisplayState as q, shouldShowComponentAlerts as J, shouldShowDisplayMode as W } from "../utils/fieldHelpers.js";
15
14
  import { logger as e } from "../utils/logger.js";
16
15
  import { updateValidationCache as C } from "../utils/validationUX.js";
17
- import { ProgressLoaderRuntime as Z } from "./ProgressLoaderRuntime.js";
18
- import { DisplayModeRenderer as K } from "./renderers/DisplayModeRenderer/DisplayModeRenderer.js";
19
- import { InteractiveFieldRenderer as Q } from "./renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.js";
16
+ import { ProgressLoaderRuntime as X } from "./ProgressLoaderRuntime.js";
17
+ import { DisplayModeRenderer as Z } from "./renderers/DisplayModeRenderer/DisplayModeRenderer.js";
18
+ import { InteractiveFieldRenderer as K } from "./renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.js";
19
+ import { useFormMachine as Q } from "../../state-management/machines/useFormMachine.js";
20
20
  import Y from "../../../../../ui/src/lib/error-boundaries/ComponentErrorBoundary.js";
21
- const ii = N(
21
+ const ii = M(
22
22
  ({ component: i, readOnly: V = !1 }) => {
23
- const [D, ai, g] = M(), c = U(), { isVisible: T } = H({
23
+ const [D, ai, g] = Q(), c = O(), { isVisible: T } = B({
24
24
  visibilityConditions: i.visibilityConditions,
25
25
  formData: D.context.data
26
- }), { forceShowValidation: A, resetValidationState: $ } = z({
26
+ }), { forceShowValidation: A, resetValidationState: $ } = G({
27
27
  componentId: i.id
28
- }), y = P(i), { originalValueFromMachine: b, initializeField: R, getEnhancedIsDirty: S } = G({
28
+ }), y = z(i), { originalValueFromMachine: b, initializeField: R, getEnhancedIsDirty: S } = U({
29
29
  componentId: i.id,
30
30
  hasIsDirtyTriggers: y
31
- }), { handleChange: L, handleBlur: k } = O({
31
+ }), { handleChange: L, handleBlur: k } = H({
32
32
  componentId: i.id,
33
33
  hasIsDirtyTriggers: y,
34
34
  originalValueFromMachine: b,
35
35
  getEnhancedIsDirty: S,
36
36
  resetValidationState: $
37
- }), f = B({
37
+ }), f = _({
38
38
  componentId: i.id
39
- }), m = x(() => {
39
+ }), m = N(() => {
40
40
  const a = g.validationEngine;
41
41
  return e.debug(`ValidationEngine instance check for ${i.id}:`, {
42
42
  validationEngine: !!a,
@@ -156,7 +156,7 @@ const ii = N(
156
156
  validationRules: i.validation,
157
157
  validationEngineExists: !!g.validationEngine
158
158
  });
159
- const w = j(i);
159
+ const w = P(i);
160
160
  if (i.validation && g.validationEngine)
161
161
  try {
162
162
  const a = g.validationEngine.validateField(
@@ -316,21 +316,21 @@ const ii = N(
316
316
  r
317
317
  );
318
318
  }
319
- const s = q(t, i.type), d = X(
319
+ const s = j(t, i.type), d = W(
320
320
  V,
321
321
  s
322
- ), { isSubmitAttempted: u } = J(
322
+ ), { isSubmitAttempted: u } = q(
323
323
  a.state.meta,
324
324
  c.state,
325
325
  A
326
- ), o = W(
326
+ ), o = J(
327
327
  y,
328
328
  l,
329
329
  f.alerts.length
330
330
  );
331
331
  return d && I ? /* @__PURE__ */ p("div", { children: [
332
332
  /* @__PURE__ */ n(
333
- K,
333
+ Z,
334
334
  {
335
335
  component: i,
336
336
  fieldValue: t
@@ -339,7 +339,7 @@ const ii = N(
339
339
  o && f.alerts.length > 0 && /* @__PURE__ */ n(F, { alerts: f.alerts })
340
340
  ] }) : /* @__PURE__ */ p("div", { children: [
341
341
  /* @__PURE__ */ n(
342
- Q,
342
+ K,
343
343
  {
344
344
  component: i,
345
345
  field: a,
@@ -369,14 +369,14 @@ const ii = N(
369
369
  ) : i.type === "progress-loader" ? (
370
370
  // Special handling for progress-loader: use runtime wrapper for auto-start
371
371
  /* @__PURE__ */ n(
372
- Z,
372
+ X,
373
373
  {
374
374
  properties: i.properties || {}
375
375
  }
376
376
  )
377
377
  ) : (
378
378
  // For display-only components, render directly without form.Field wrapper
379
- _(
379
+ x(
380
380
  i,
381
381
  null,
382
382
  // no form value