@digiform/wizard 0.2.9 → 0.2.11

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 (153) hide show
  1. package/core/src/types/api.js +12 -0
  2. package/core/src/types/form-config.js +60 -0
  3. package/core/src/types/form-wizard-config-schema.js +113 -0
  4. package/core/src/types/guards.js +19 -0
  5. package/core/src/types/validation.js +61 -0
  6. package/core/src/utils/apiBodyUtils.js +95 -0
  7. package/features/api-integration.d.ts +2 -0
  8. package/features/api-integration.js +17 -0
  9. package/features/dialog-system.d.ts +2 -0
  10. package/features/dialog-system.js +9 -0
  11. package/features/form-runtime.d.ts +2 -0
  12. package/features/form-runtime.js +63 -0
  13. package/features/state-management.d.ts +2 -0
  14. package/features/state-management.js +21 -0
  15. package/features/trigger-action-system.d.ts +2 -0
  16. package/features/trigger-action-system.js +12 -0
  17. package/features/validation-system.d.ts +2 -0
  18. package/features/validation-system.js +23 -0
  19. package/index.js +108 -17470
  20. package/package.json +35 -30
  21. package/styles.css +1 -1
  22. package/ui/src/component-registry/renderComponent.js +11 -0
  23. package/ui/src/components/FormLayout/FormLayout.js +135 -0
  24. package/ui/src/components/FormLayout/FormLayout.module.css.js +20 -0
  25. package/ui/src/components/GridLayout/GridLayout.js +62 -0
  26. package/ui/src/components/GridLayout/GridLayout.module.css.js +16 -0
  27. package/ui/src/components/GridLayoutColumn/GridLayoutColumn.js +37 -0
  28. package/ui/src/components/GridLayoutColumn/GridLayoutColumn.module.css.js +10 -0
  29. package/ui/src/components/ProgressLoaderBar/ProgressLoaderBar.js +108 -0
  30. package/ui/src/components/ProgressLoaderBar/ProgressLoaderBar.module.css.js +20 -0
  31. package/ui/src/components/ProgressLoaderBar/useProgressAnimation.js +31 -0
  32. package/ui/src/components/ValidationCode/ValidationCode.js +198 -0
  33. package/ui/src/components/ValidationCode/ValidationCode.module.css.js +20 -0
  34. package/ui/src/components/alert/alert.js +30 -0
  35. package/ui/src/components/alert/alert.module.css.js +14 -0
  36. package/ui/src/components/badge/badge.js +20 -0
  37. package/ui/src/components/badge/badge.module.css.js +12 -0
  38. package/ui/src/components/box/box.js +8 -0
  39. package/ui/src/components/box/box.module.css.js +8 -0
  40. package/ui/src/components/button/button.js +25 -0
  41. package/ui/src/components/button/button.module.css.js +18 -0
  42. package/ui/src/components/card/card.js +106 -0
  43. package/ui/src/components/card/card.module.css.js +44 -0
  44. package/ui/src/components/checkbox/checkbox.js +20 -0
  45. package/ui/src/components/checkbox/checkbox.module.css.js +10 -0
  46. package/ui/src/components/dialog/dialog.js +67 -0
  47. package/ui/src/components/dialog/dialog.module.css.js +20 -0
  48. package/ui/src/components/form-header-base/form-header-base.js +59 -0
  49. package/ui/src/components/form-header-base/form-header-base.module.css.js +14 -0
  50. package/ui/src/components/input/input.js +20 -0
  51. package/ui/src/components/input/input.module.css.js +8 -0
  52. package/ui/src/components/radio-group/radio-group.js +30 -0
  53. package/ui/src/components/radio-group/radio-group.module.css.js +14 -0
  54. package/ui/src/components/select/select.js +115 -0
  55. package/ui/src/components/select/select.module.css.js +32 -0
  56. package/ui/src/components/sheet/sheet.js +71 -0
  57. package/ui/src/components/sheet/sheet.module.css.js +46 -0
  58. package/ui/src/components/textarea/textarea.js +19 -0
  59. package/ui/src/components/textarea/textarea.module.css.js +8 -0
  60. package/ui/src/design-system/components/FormFieldWrapper.js +16 -0
  61. package/ui/src/lib/assets/icons/Check.js +26 -0
  62. package/ui/src/lib/assets/icons/ChevronRight.js +26 -0
  63. package/ui/src/lib/error-boundaries/BaseErrorBoundary.js +155 -0
  64. package/ui/src/lib/error-boundaries/ComponentErrorBoundary.js +153 -0
  65. package/ui/src/lib/error-boundaries/FormWizardErrorBoundary.js +107 -0
  66. package/ui/src/lib/logger.js +106 -0
  67. package/ui/src/lib/providers/FormEditingContext.js +21 -0
  68. package/ui/src/lib/queryClient.js +26 -0
  69. package/ui/src/lib/types/guards.js +11 -0
  70. package/ui/src/lib/utils/componentUtils.js +38 -0
  71. package/ui/src/lib/utils/templateDialogResolver.js +85 -0
  72. package/ui/src/lib/utils/templateUtils.js +52 -0
  73. package/ui/src/theme/ThemeProvider.js +15 -0
  74. package/wizard/src/features/api-integration/components/EnhancedActionExecutor/EnhancedActionExecutor.js +370 -0
  75. package/wizard/src/features/api-integration/services/ActionExecutor.js +339 -0
  76. package/wizard/src/features/api-integration/services/ApiCallExecutor.js +6 -0
  77. package/wizard/src/features/api-integration/services/ApiCallService.js +309 -0
  78. package/wizard/src/features/api-integration/services/DialogExecutor.js +6 -0
  79. package/wizard/src/features/api-integration/services/GenericTriggerService.js +284 -0
  80. package/wizard/src/features/api-integration/services/NavigationExecutor.js +6 -0
  81. package/wizard/src/features/dialog-system/components/ActionDialog/ActionDialog.js +115 -0
  82. package/wizard/src/features/dialog-system/components/ActionDialog/ActionDialog.module.css.js +29 -0
  83. package/wizard/src/features/dialog-system/components/ConfirmationDialog/ConfirmationDialog.js +64 -0
  84. package/wizard/src/features/dialog-system/components/ConfirmationDialog/ConfirmationDialog.module.css.js +22 -0
  85. package/wizard/src/features/dialog-system/components/EmailVerificationDialog/EmailVerificationDialog.js +149 -0
  86. package/wizard/src/features/dialog-system/components/EmailVerificationDialog/EmailVerificationDialog.module.css.js +40 -0
  87. package/wizard/src/features/form-runtime/ComponentAdapterComplete/ComponentAdapterComplete.js +107 -0
  88. package/wizard/src/features/form-runtime/ComponentAdapterComplete/ComponentAdapterComplete.module.css.js +10 -0
  89. package/wizard/src/features/form-runtime/FormWizard/FormWizard.js +107 -0
  90. package/wizard/src/features/form-runtime/FormWizard/FormWizard.module.css.js +16 -0
  91. package/wizard/src/features/form-runtime/components/FormField.js +405 -0
  92. package/wizard/src/features/form-runtime/components/FormFooter.js +209 -0
  93. package/wizard/src/features/form-runtime/components/FormHeader.js +29 -0
  94. package/wizard/src/features/form-runtime/components/FormSection/FormSection.js +279 -0
  95. package/wizard/src/features/form-runtime/components/FormSection/FormSection.module.css.js +20 -0
  96. package/wizard/src/features/form-runtime/components/FormStep/FormStep.js +167 -0
  97. package/wizard/src/features/form-runtime/components/FormStep/FormStep.module.css.js +12 -0
  98. package/wizard/src/features/form-runtime/components/ProgressLoaderRuntime.js +88 -0
  99. package/wizard/src/features/form-runtime/components/StepProgressIndicator/StepProgressIndicator.js +61 -0
  100. package/wizard/src/features/form-runtime/components/StepProgressIndicator/StepProgressIndicator.module.css.js +34 -0
  101. package/wizard/src/features/form-runtime/components/displayValue/displayValue.js +21 -0
  102. package/wizard/src/features/form-runtime/components/displayValue/displayValue.module.css.js +10 -0
  103. package/wizard/src/features/form-runtime/components/renderers/DisplayModeRenderer/DisplayModeRenderer.js +28 -0
  104. package/wizard/src/features/form-runtime/components/renderers/DisplayModeRenderer/DisplayModeRenderer.module.css.js +8 -0
  105. package/wizard/src/features/form-runtime/components/renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.js +56 -0
  106. package/wizard/src/features/form-runtime/components/renderers/InteractiveFieldRenderer/InteractiveFieldRenderer.module.css.js +8 -0
  107. package/wizard/src/features/form-runtime/config/configResolver.js +38 -0
  108. package/wizard/src/features/form-runtime/config/templateConfig.js +156 -0
  109. package/wizard/src/features/form-runtime/config/templateLoader.js +265 -0
  110. package/wizard/src/features/form-runtime/config/templateUtils.js +14 -0
  111. package/wizard/src/features/form-runtime/context/LoaderContext.js +36 -0
  112. package/wizard/src/features/form-runtime/hooks/useApiActions.js +60 -0
  113. package/wizard/src/features/form-runtime/hooks/useComponentTriggers.js +102 -0
  114. package/wizard/src/features/form-runtime/hooks/useComponentVisibility.js +18 -0
  115. package/wizard/src/features/form-runtime/hooks/useFieldEventHandlers.js +61 -0
  116. package/wizard/src/features/form-runtime/hooks/useFormContext.js +13 -0
  117. package/wizard/src/features/form-runtime/hooks/useFormFieldState.js +40 -0
  118. package/wizard/src/features/form-runtime/hooks/useValidationEvents.js +39 -0
  119. package/wizard/src/features/form-runtime/utils/componentDisplayValue.js +22 -0
  120. package/wizard/src/features/form-runtime/utils/errorUtils.js +93 -0
  121. package/wizard/src/features/form-runtime/utils/fieldHelpers.js +17 -0
  122. package/wizard/src/features/form-runtime/utils/formDataBuilder.js +10 -0
  123. package/wizard/src/features/form-runtime/utils/formDirtyStateSync.js +52 -0
  124. package/wizard/src/features/form-runtime/utils/logger.js +111 -0
  125. package/wizard/src/features/form-runtime/utils/validation.js +100 -0
  126. package/wizard/src/features/form-runtime/utils/validationUX.js +58 -0
  127. package/wizard/src/features/form-runtime/utils/visibilityUtils.js +77 -0
  128. package/wizard/src/features/state-management/machines/actions/componentActions.js +215 -0
  129. package/wizard/src/features/state-management/machines/actions/navigationActions.js +122 -0
  130. package/wizard/src/features/state-management/machines/actions/saveActions.js +101 -0
  131. package/wizard/src/features/state-management/machines/componentTriggerEngine.js +598 -0
  132. package/wizard/src/features/state-management/machines/formMachine.js +1565 -0
  133. package/wizard/src/features/state-management/machines/guards/navigationGuards.js +59 -0
  134. package/wizard/src/features/state-management/machines/guards/saveGuards.js +21 -0
  135. package/wizard/src/features/state-management/machines/guards/triggerGuards.js +11 -0
  136. package/wizard/src/features/state-management/machines/helpers/triggerHelpers.js +12 -0
  137. package/wizard/src/features/state-management/machines/performance.js +56 -0
  138. package/wizard/src/features/state-management/machines/useFormMachine.js +412 -0
  139. package/wizard/src/features/trigger-action-system/components/ActionLoadingIndicator/ActionLoadingIndicator.js +46 -0
  140. package/wizard/src/features/trigger-action-system/components/ActionLoadingIndicator/ActionLoadingIndicator.module.css.js +30 -0
  141. package/wizard/src/features/trigger-action-system/components/ActionManager.js +108 -0
  142. package/wizard/src/features/trigger-action-system/components/ComponentAlert/ComponentAlert.js +10 -0
  143. package/wizard/src/features/trigger-action-system/components/ComponentAlert/ComponentAlert.module.css.js +8 -0
  144. package/wizard/src/features/trigger-action-system/utils/GenericTriggerEngine.js +376 -0
  145. package/wizard/src/features/validation-system/components/ValidationDebugger.js +69 -0
  146. package/wizard/src/features/validation-system/validation/ActionValidation.js +234 -0
  147. package/wizard/src/features/validation-system/validation/SchemaBuilder.js +239 -0
  148. package/wizard/src/features/validation-system/validation/ValidationCache.js +76 -0
  149. package/wizard/src/features/validation-system/validation/ValidationEngine.js +97 -0
  150. package/wizard/src/features/validation-system/validation/ValidationExecutor.js +138 -0
  151. package/wizard/src/features/validation-system/validation/tanstackSchemaAdapter.js +17 -0
  152. package/wizard/src/features/validation-system/validation/validationService.js +74 -0
  153. package/wizard/src/renderer/wizardRenderer.js +123 -0
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ const e = {
3
+ string: ["text", "email", "tel", "password", "textarea", "select"],
4
+ number: ["number", "range"],
5
+ boolean: ["checkbox", "radio"],
6
+ array: ["select", "checkbox-group", "radio-group"],
7
+ object: [],
8
+ null: []
9
+ };
10
+ export {
11
+ e as TYPE_COMPATIBILITY
12
+ };
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import { z as o } from "zod";
3
+ const t = o.object({
4
+ team: o.string()
5
+ }), a = o.object({
6
+ primaryStorage: o.string(),
7
+ fallbackPaths: o.array(o.string()).optional(),
8
+ staticAssets: o.string().optional(),
9
+ templates: o.union([o.string(), t]).optional()
10
+ }), e = o.object({
11
+ enabled: o.boolean(),
12
+ maxBackups: o.number().int().positive(),
13
+ backupPath: o.string()
14
+ }), n = o.object({
15
+ strategy: o.enum(["filesystem", "memory", "database"]),
16
+ paths: a,
17
+ fileExtension: o.string(),
18
+ createDirectories: o.boolean(),
19
+ backup: e.optional()
20
+ }), i = o.object({
21
+ strictMode: o.boolean(),
22
+ validateOnLoad: o.boolean(),
23
+ allowMigration: o.boolean()
24
+ }), r = o.object({
25
+ minVersion: o.string(),
26
+ maxVersion: o.string()
27
+ }), s = o.object({
28
+ version: o.string(),
29
+ lastUpdated: o.string().datetime(),
30
+ compatibility: r
31
+ }), c = o.object({
32
+ autoBackup: o.boolean(),
33
+ formTemplates: o.boolean(),
34
+ formVersioning: o.boolean(),
35
+ formSharing: o.boolean()
36
+ }), l = o.object({
37
+ enabled: o.boolean(),
38
+ sourceDirectories: o.array(o.string()),
39
+ preserveOriginals: o.boolean(),
40
+ logMigration: o.boolean()
41
+ }), m = o.object({
42
+ $schema: o.string().optional(),
43
+ storage: n,
44
+ validation: i.optional(),
45
+ metadata: s.optional(),
46
+ features: c.optional(),
47
+ migration: l.optional()
48
+ });
49
+ export {
50
+ e as BackupConfigSchema,
51
+ r as CompatibilitySchema,
52
+ c as FeaturesConfigSchema,
53
+ m as FormConfigSchema,
54
+ s as MetadataConfigSchema,
55
+ l as MigrationConfigSchema,
56
+ n as StorageConfigSchema,
57
+ a as StoragePathsSchema,
58
+ t as TemplateStorageConfigSchema,
59
+ i as ValidationConfigSchema
60
+ };
@@ -0,0 +1,113 @@
1
+ "use client";
2
+ import { z as o } from "zod";
3
+ const i = o.object({
4
+ id: o.string(),
5
+ type: o.string(),
6
+ label: o.string().optional(),
7
+ required: o.boolean().optional(),
8
+ validation: o.record(o.unknown()).optional(),
9
+ triggers: o.array(
10
+ o.object({
11
+ type: o.string(),
12
+ condition: o.unknown().optional(),
13
+ actions: o.array(
14
+ o.object({
15
+ type: o.string(),
16
+ config: o.unknown().optional()
17
+ })
18
+ )
19
+ })
20
+ ).optional()
21
+ }).passthrough(), e = o.object({
22
+ id: o.string(),
23
+ title: o.string().optional(),
24
+ mode: o.enum(["readOnly", "editable", "default", "isEditable"]).optional(),
25
+ components: o.array(i),
26
+ showTitle: o.boolean().optional(),
27
+ showActionLink: o.boolean().optional(),
28
+ editText: o.string().optional(),
29
+ cancelText: o.string().optional(),
30
+ saveText: o.string().optional(),
31
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
32
+ genericTriggerActions: o.any().optional(),
33
+ visibilityConditions: o.unknown().optional(),
34
+ triggerContexts: o.object({
35
+ supportsSectionSave: o.boolean(),
36
+ showSaveButton: o.boolean(),
37
+ autoSaveOnNavigate: o.boolean()
38
+ }).optional(),
39
+ fieldValidation: o.unknown().optional()
40
+ // Complex nested structure, validate at runtime
41
+ }).passthrough(), t = o.object({
42
+ next: o.object({
43
+ label: o.string(),
44
+ enabled: o.boolean()
45
+ }),
46
+ previous: o.object({
47
+ label: o.string(),
48
+ enabled: o.boolean()
49
+ })
50
+ }), a = o.object({
51
+ label: o.string().optional(),
52
+ showPercentage: o.boolean().optional(),
53
+ duration: o.number().optional(),
54
+ size: o.enum(["sm", "md", "lg"]).optional(),
55
+ variant: o.enum(["default", "minimal", "branded", "striped"]).optional(),
56
+ animationSpeed: o.enum(["slow", "normal", "fast"]).optional(),
57
+ completionMessage: o.string().optional(),
58
+ apiEndpoint: o.object({
59
+ endpoint: o.string(),
60
+ method: o.enum(["GET", "POST", "PUT", "DELETE"]).optional(),
61
+ successStatus: o.union([o.number(), o.array(o.number())]).optional()
62
+ }).optional()
63
+ }).optional(), r = o.object({
64
+ id: o.string(),
65
+ title: o.string(),
66
+ displayTitle: o.boolean().optional(),
67
+ showStepNumber: o.boolean().optional(),
68
+ sections: o.array(e).optional(),
69
+ navigation: t,
70
+ actions: o.array(o.unknown()).optional(),
71
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
72
+ genericTriggerActions: o.any().optional(),
73
+ waitForLoader: o.boolean().optional(),
74
+ loaderConfig: a
75
+ }).passthrough(), l = o.object({
76
+ id: o.string(),
77
+ templateId: o.string(),
78
+ navigation: t.partial().optional(),
79
+ readonly: o.boolean().optional(),
80
+ title: o.string().optional(),
81
+ stepIndex: o.number().optional(),
82
+ componentOverrides: o.record(o.unknown()).optional(),
83
+ sectionOverrides: o.record(o.unknown()).optional(),
84
+ showStepNumber: o.boolean().optional(),
85
+ actions: o.array(o.unknown()).optional()
86
+ }).passthrough(), s = o.object({
87
+ schemaVersion: o.number().optional(),
88
+ // Version tracking for lazy migration
89
+ id: o.string(),
90
+ title: o.string(),
91
+ description: o.string().optional(),
92
+ steps: o.array(o.union([r, l])),
93
+ validationMessageStyle: o.enum(["withLabel", "simple"]).optional(),
94
+ // biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
95
+ genericTriggerActions: o.any().optional()
96
+ }).passthrough();
97
+ function c(n) {
98
+ return s.safeParse(n);
99
+ }
100
+ function g(n) {
101
+ return n?.schemaVersion ?? 1;
102
+ }
103
+ export {
104
+ i as FormComponentSchema,
105
+ e as FormSectionSchema,
106
+ r as FormStepSchema,
107
+ s as FormWizardConfigSchema,
108
+ a as StepLoaderConfigSchema,
109
+ t as StepNavigationSchema,
110
+ l as TemplateStepSchema,
111
+ g as getSchemaVersion,
112
+ c as validateFormConfig
113
+ };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ function t(e) {
3
+ return typeof e == "object" && e !== null && "templateId" in e;
4
+ }
5
+ function i(e) {
6
+ return e.stepsData || [];
7
+ }
8
+ function n(e) {
9
+ return e && typeof e.template == "object" && typeof e.template.typeId == "string";
10
+ }
11
+ function a(e) {
12
+ return e && (e.templateTypeId || e.emailVerificationConfig);
13
+ }
14
+ export {
15
+ i as getTemplateSteps,
16
+ a as isLegacyDialogConfigWithTemplate,
17
+ n as isTemplateDialogConfig,
18
+ t as isTemplateStep
19
+ };
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ const l = {
3
+ required: {
4
+ withLabel: (e) => `${e} is verplicht`,
5
+ simple: () => "Dit veld is verplicht"
6
+ },
7
+ minLength: {
8
+ withLabel: (e, i) => `${e} moet minimaal ${i} tekens lang zijn`,
9
+ simple: (e) => `Dit veld moet minimaal ${e} tekens lang zijn`
10
+ },
11
+ maxLength: {
12
+ withLabel: (e, i) => `${e} moet maximaal ${i} tekens lang zijn`,
13
+ simple: (e) => `Dit veld moet maximaal ${e} tekens lang zijn`
14
+ },
15
+ pattern: {
16
+ withLabel: (e) => `${e} formaat is ongeldig`,
17
+ simple: () => "Dit veld formaat is ongeldig"
18
+ },
19
+ email: {
20
+ withLabel: (e) => `${e} moet een geldig e-mailadres zijn`,
21
+ simple: () => "Dit veld moet een geldig e-mailadres zijn"
22
+ },
23
+ min: {
24
+ withLabel: (e, i) => `${e} moet minimaal ${i} zijn`,
25
+ simple: (e) => `Dit veld moet minimaal ${e} zijn`
26
+ },
27
+ max: {
28
+ withLabel: (e, i) => `${e} moet maximaal ${i} zijn`,
29
+ simple: (e) => `Dit veld moet maximaal ${e} zijn`
30
+ },
31
+ minItems: {
32
+ withLabel: (e, i) => `${e} moet minimaal ${i} items hebben`,
33
+ simple: (e) => `Dit veld moet minimaal ${e} items hebben`
34
+ },
35
+ maxItems: {
36
+ withLabel: (e, i) => `${e} moet maximaal ${i} items hebben`,
37
+ simple: (e) => `Dit veld moet maximaal ${e} items hebben`
38
+ },
39
+ url: {
40
+ withLabel: (e) => `${e} moet een geldige URL zijn`,
41
+ simple: () => "Dit veld moet een geldige URL zijn"
42
+ },
43
+ phone: {
44
+ withLabel: (e) => `${e} moet een geldig telefoonnummer zijn`,
45
+ simple: () => "Dit veld moet een geldig telefoonnummer zijn"
46
+ }
47
+ }, n = {
48
+ // For components that need labeled messages (ValidationBuilder, etc.)
49
+ withLabel: (e, i, ...m) => l[e].withLabel(i, ...m),
50
+ // For components that need simple messages (createZodSchema, etc.)
51
+ simple: (e, ...i) => l[e].simple(...i),
52
+ // Dynamic message selection based on form configuration (defaults to withLabel)
53
+ auto: (e, i, m = "withLabel", ...t) => {
54
+ const a = l[e];
55
+ return m === "simple" ? a.simple(...t) : a.withLabel(i, ...t);
56
+ }
57
+ };
58
+ export {
59
+ l as DEFAULT_VALIDATION_MESSAGES,
60
+ n as getValidationMessage
61
+ };
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ function b(o, s) {
3
+ if (o.body) {
4
+ if (typeof o.body == "string")
5
+ return d(o.body, s);
6
+ if (typeof o.body == "object") {
7
+ const n = f(o.body, s);
8
+ return JSON.stringify(n);
9
+ }
10
+ }
11
+ if (o.bodyFields) {
12
+ const n = {};
13
+ for (const t of o.bodyFields) {
14
+ if (!t.key.trim()) continue;
15
+ let e;
16
+ t.type === "static" ? e = t.value : t.type === "dynamic" && t.fieldPath ? e = p(s, t.fieldPath) : e = t.value, y(n, t.key, e);
17
+ }
18
+ return JSON.stringify(n);
19
+ }
20
+ }
21
+ function p(o, s) {
22
+ return s.split(".").reduce((n, t) => n?.[t], o);
23
+ }
24
+ function d(o, s) {
25
+ let n = o.replace(/\$\{data\.([^}]+)\}/g, (t, e) => {
26
+ const i = p(s, e);
27
+ return i != null ? String(i) : t;
28
+ });
29
+ return n = n.replace(/\$\{([^}]+)\}/g, (t, e) => {
30
+ if (t.includes("data.")) return t;
31
+ if (e.includes(".")) {
32
+ const r = e.split("."), l = r[r.length - 1], u = s[l];
33
+ return u != null ? String(u) : t;
34
+ }
35
+ const i = p(s, e);
36
+ return i != null ? String(i) : t;
37
+ }), n;
38
+ }
39
+ function f(o, s) {
40
+ const n = {};
41
+ for (const [t, e] of Object.entries(o))
42
+ typeof e == "string" ? n[t] = d(e, s) : e && typeof e == "object" && !Array.isArray(e) ? n[t] = f(
43
+ e,
44
+ s
45
+ ) : Array.isArray(e) ? n[t] = e.map(
46
+ (i) => typeof i == "string" ? d(i, s) : i && typeof i == "object" ? f(
47
+ i,
48
+ s
49
+ ) : i
50
+ ) : n[t] = e;
51
+ return n;
52
+ }
53
+ function y(o, s, n) {
54
+ const t = s.split("."), e = t.pop(), i = t.reduce((r, l) => ((typeof r[l] != "object" || r[l] === null) && (r[l] = {}), r[l]), o);
55
+ i[e] = n;
56
+ }
57
+ function v(o, s) {
58
+ const n = [], t = o.findIndex((e) => e.id === s);
59
+ for (let e = 0; e <= t; e++) {
60
+ const i = o[e];
61
+ if (!i) continue;
62
+ const r = i.sections || [];
63
+ for (const l of r) {
64
+ const u = l.components || [];
65
+ for (const c of u)
66
+ a(c) && n.push({
67
+ id: c.id,
68
+ label: c.label,
69
+ path: c.id,
70
+ // For now, use component ID as path
71
+ stepTitle: i.title,
72
+ stepIndex: e + 1
73
+ });
74
+ }
75
+ }
76
+ return n;
77
+ }
78
+ function a(o) {
79
+ return [
80
+ "text",
81
+ "email",
82
+ "number",
83
+ "checkbox",
84
+ "radioGroup",
85
+ "dropdown"
86
+ ].includes(o.type);
87
+ }
88
+ export {
89
+ b as compileApiRequestBody,
90
+ v as getAvailableFormFields,
91
+ p as getValueFromFormData,
92
+ f as interpolateObjectTemplate,
93
+ d as interpolateTemplate,
94
+ y as setNestedValue
95
+ };
@@ -0,0 +1,2 @@
1
+ export * from './api-integration/index'
2
+ export {}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { ActionExecutor as e } from "../wizard/src/features/api-integration/services/ActionExecutor.js";
3
+ import { ApiCallExecutor as c } from "../wizard/src/features/api-integration/services/ApiCallExecutor.js";
4
+ import { ApiCallService as x } from "../wizard/src/features/api-integration/services/ApiCallService.js";
5
+ import { DialogExecutor as f } from "../wizard/src/features/api-integration/services/DialogExecutor.js";
6
+ import { EnhancedActionExecutor as n } from "../wizard/src/features/api-integration/components/EnhancedActionExecutor/EnhancedActionExecutor.js";
7
+ import { GenericTriggerService as l } from "../wizard/src/features/api-integration/services/GenericTriggerService.js";
8
+ import { NavigationExecutor as E } from "../wizard/src/features/api-integration/services/NavigationExecutor.js";
9
+ export {
10
+ e as ActionExecutor,
11
+ c as ApiCallExecutor,
12
+ x as ApiCallService,
13
+ f as DialogExecutor,
14
+ n as EnhancedActionExecutor,
15
+ l as GenericTriggerService,
16
+ E as NavigationExecutor
17
+ };
@@ -0,0 +1,2 @@
1
+ export * from './dialog-system/index'
2
+ export {}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { ActionDialog as r } from "../wizard/src/features/dialog-system/components/ActionDialog/ActionDialog.js";
3
+ import { ConfirmationDialog as a } from "../wizard/src/features/dialog-system/components/ConfirmationDialog/ConfirmationDialog.js";
4
+ import { EmailVerificationDialog as f } from "../wizard/src/features/dialog-system/components/EmailVerificationDialog/EmailVerificationDialog.js";
5
+ export {
6
+ r as ActionDialog,
7
+ a as ConfirmationDialog,
8
+ f as EmailVerificationDialog
9
+ };
@@ -0,0 +1,2 @@
1
+ export * from './form-runtime/index'
2
+ export {}
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { adaptComponentForRegistry as r } from "../wizard/src/features/form-runtime/ComponentAdapterComplete/ComponentAdapterComplete.js";
3
+ import { default as o } from "../wizard/src/features/form-runtime/FormWizard/FormWizard.js";
4
+ import { default as i } from "../wizard/src/features/form-runtime/components/FormField.js";
5
+ import { default as s } from "../wizard/src/features/form-runtime/components/FormSection/FormSection.js";
6
+ import { default as n } from "../wizard/src/features/form-runtime/components/FormStep/FormStep.js";
7
+ import { getAvailableGenericTemplatesSync as d, getTemplateInfo as T, validateTemplateReferences as f } from "../wizard/src/features/form-runtime/config/templateUtils.js";
8
+ import { getUsedTemplateIds as u, hasTemplateSteps as x, resolveFormWizardConfig as I } from "../wizard/src/features/form-runtime/config/configResolver.js";
9
+ import { getLockMessage as A, getTemplateConfig as F, getTemplateDisplayConfig as C, getTemplatePermissions as y, getTemplateTypeFromInput as E, isActionAllowed as M, isGenericTemplateInput as S, isStepLocked as V, isTeamTemplateInput as b, validateTemplateAction as h } from "../wizard/src/features/form-runtime/config/templateConfig.js";
10
+ import { clearTemplateCache as k, getAvailableGenericTemplates as G, getAvailableTemplates as R, getTemplateMetadata as U, loadTemplate as L, resolveTemplateStep as w } from "../wizard/src/features/form-runtime/config/templateLoader.js";
11
+ import { useComponentTriggers as N, useFieldTriggerMonitor as W } from "../wizard/src/features/form-runtime/hooks/useComponentTriggers.js";
12
+ import { getErrorDebugInfo as P, getFirstErrorMessage as _, getMostRelevantError as j, parseAllErrors as q, parseError as B } from "../wizard/src/features/form-runtime/utils/errorUtils.js";
13
+ import { validateComponentValue as J, validateRule as K } from "../wizard/src/features/form-runtime/utils/validation.js";
14
+ import { VALIDATION_TIMING as X, clearUserInteractionTracking as Y, getDisplayErrorMessage as Z, getValidationTiming as $, hasUserInteracted as ee, markFieldAsUserInteracted as te, shouldShowValidationError as re, updateValidationCache as ae } from "../wizard/src/features/form-runtime/utils/validationUX.js";
15
+ import { evaluateVisibility as le, getVisibilityDependencies as ie } from "../wizard/src/features/form-runtime/utils/visibilityUtils.js";
16
+ export {
17
+ r as ComponentAdapterComplete,
18
+ i as FormField,
19
+ s as FormSection,
20
+ n as FormStep,
21
+ o as FormWizard,
22
+ X as VALIDATION_TIMING,
23
+ k as clearTemplateCache,
24
+ Y as clearUserInteractionTracking,
25
+ le as evaluateVisibility,
26
+ G as getAvailableGenericTemplates,
27
+ d as getAvailableGenericTemplatesSync,
28
+ R as getAvailableTemplates,
29
+ Z as getDisplayErrorMessage,
30
+ P as getErrorDebugInfo,
31
+ _ as getFirstErrorMessage,
32
+ A as getLockMessage,
33
+ j as getMostRelevantError,
34
+ F as getTemplateConfig,
35
+ C as getTemplateDisplayConfig,
36
+ T as getTemplateInfo,
37
+ U as getTemplateMetadata,
38
+ y as getTemplatePermissions,
39
+ E as getTemplateTypeFromInput,
40
+ u as getUsedTemplateIds,
41
+ $ as getValidationTiming,
42
+ ie as getVisibilityDependencies,
43
+ x as hasTemplateSteps,
44
+ ee as hasUserInteracted,
45
+ M as isActionAllowed,
46
+ S as isGenericTemplateInput,
47
+ V as isStepLocked,
48
+ b as isTeamTemplateInput,
49
+ L as loadTemplate,
50
+ te as markFieldAsUserInteracted,
51
+ q as parseAllErrors,
52
+ B as parseError,
53
+ I as resolveFormWizardConfig,
54
+ w as resolveTemplateStep,
55
+ re as shouldShowValidationError,
56
+ ae as updateValidationCache,
57
+ N as useComponentTriggers,
58
+ W as useFieldTriggerMonitor,
59
+ J as validateComponentValue,
60
+ K as validateRule,
61
+ h as validateTemplateAction,
62
+ f as validateTemplateReferences
63
+ };
@@ -0,0 +1,2 @@
1
+ export * from './state-management/index'
2
+ export {}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { ComponentTriggerEngine as o, createExecutionPlan as r, determineTriggerContext as i, evaluateComponentTriggers as t, findComponentActions as g, findComponentTriggers as m, findDirtyComponentsForNavigation as s, findDirtyComponentsWithTriggers as a, getTriggersForAction as p, hasComponentActions as c, hasComponentTriggers as C } from "../wizard/src/features/state-management/machines/componentTriggerEngine.js";
3
+ import { FormMachineContext as h, useFormMachine as T, useFormMachineProvider as d } from "../wizard/src/features/state-management/machines/useFormMachine.js";
4
+ import { formMachine as u } from "../wizard/src/features/state-management/machines/formMachine.js";
5
+ export {
6
+ o as ComponentTriggerEngine,
7
+ h as FormMachineContext,
8
+ r as createExecutionPlan,
9
+ i as determineTriggerContext,
10
+ t as evaluateComponentTriggers,
11
+ g as findComponentActions,
12
+ m as findComponentTriggers,
13
+ s as findDirtyComponentsForNavigation,
14
+ a as findDirtyComponentsWithTriggers,
15
+ u as formMachine,
16
+ p as getTriggersForAction,
17
+ c as hasComponentActions,
18
+ C as hasComponentTriggers,
19
+ T as useFormMachine,
20
+ d as useFormMachineProvider
21
+ };
@@ -0,0 +1,2 @@
1
+ export * from './trigger-action-system/index'
2
+ export {}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { ActionLoadingIndicator as o } from "../wizard/src/features/trigger-action-system/components/ActionLoadingIndicator/ActionLoadingIndicator.js";
3
+ import { ActionManager as n } from "../wizard/src/features/trigger-action-system/components/ActionManager.js";
4
+ import { ComponentAlert as g } from "../wizard/src/features/trigger-action-system/components/ComponentAlert/ComponentAlert.js";
5
+ import { GenericTriggerEngine as a, createTriggerContext as m } from "../wizard/src/features/trigger-action-system/utils/GenericTriggerEngine.js";
6
+ export {
7
+ o as ActionLoadingIndicator,
8
+ n as ActionManager,
9
+ g as ComponentAlert,
10
+ a as GenericTriggerEngine,
11
+ m as createTriggerContext
12
+ };
@@ -0,0 +1,2 @@
1
+ export * from './validation-system/index'
2
+ export {}
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { default as t } from "../wizard/src/features/validation-system/components/ValidationDebugger.js";
3
+ import { createTanStackSchema as n, validateWithTanStack as o, validateWithTanStackReturnArray as l } from "../wizard/src/features/validation-system/validation/tanstackSchemaAdapter.js";
4
+ import { ValidationEngine as d, createValidationEngine as m, defaultValidationEngine as p } from "../wizard/src/features/validation-system/validation/ValidationEngine.js";
5
+ import { findComponentById as f, getAllComponents as g, getStepComponents as S, isFormValid as s, isStepValid as u, validateField as v, validateFieldReturnArray as V, validateForm as x, validateStep as F } from "../wizard/src/features/validation-system/validation/validationService.js";
6
+ export {
7
+ t as ValidationDebugger,
8
+ d as ValidationEngine,
9
+ n as createTanStackSchema,
10
+ m as createValidationEngine,
11
+ p as defaultValidationEngine,
12
+ f as findComponentById,
13
+ g as getAllComponents,
14
+ S as getStepComponents,
15
+ s as isFormValid,
16
+ u as isStepValid,
17
+ v as validateField,
18
+ V as validateFieldReturnArray,
19
+ x as validateForm,
20
+ F as validateStep,
21
+ o as validateWithTanStack,
22
+ l as validateWithTanStackReturnArray
23
+ };