@digiform/wizard 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/index.cjs +1029 -693
- package/index.cjs.map +1 -1
- package/index.js +1026 -693
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/renderer/wizardRenderer.d.ts +2 -0
- package/styles.css +330 -0
package/index.js
CHANGED
|
@@ -3,533 +3,185 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { forwardRef, isValidElement, useRef, useImperativeHandle, useEffect, useId, createElement, createContext, useState, useMemo, useContext, Component, memo, useCallback } from "react";
|
|
5
5
|
import clsx$h, { clsx as clsx$g } from "clsx";
|
|
6
|
-
import { QueryClient, useQuery, useMutation, QueryClientProvider } from "@tanstack/react-query";
|
|
7
|
-
import { X, ChevronLeft, CheckCircle, AlertCircle, RefreshCw, AlertTriangle, FileX, ArrowLeft, HelpCircle, Info, Mail, Edit, Check as Check$1, Loader2 } from "lucide-react";
|
|
8
6
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
8
|
+
import { Check as Check$1, X, ChevronLeft, CheckCircle, AlertCircle, RefreshCw, Circle, ChevronDown, ChevronUp, AlertTriangle, FileX, ArrowLeft, HelpCircle, Info, Mail, Edit, Loader2 } from "lucide-react";
|
|
9
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
10
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
11
|
+
import { QueryClient, useQuery, useMutation, QueryClientProvider } from "@tanstack/react-query";
|
|
9
12
|
import { useForm } from "@tanstack/react-form";
|
|
10
13
|
import { useMachine } from "@xstate/react";
|
|
11
14
|
import { assign, createMachine } from "xstate";
|
|
12
15
|
import { z } from "zod";
|
|
13
16
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const alert = "fb-alert_5UcaT";
|
|
18
|
+
const alertTitle = "fb-alertTitle_-KE5o";
|
|
19
|
+
const alertDescription = "fb-alertDescription_cg7Ke";
|
|
20
|
+
const styles$u = {
|
|
21
|
+
alert,
|
|
22
|
+
"variant-default": "fb-variant-default_yhEpY",
|
|
23
|
+
"variant-destructive": "fb-variant-destructive_rafp5",
|
|
24
|
+
alertTitle,
|
|
25
|
+
alertDescription
|
|
21
26
|
};
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}).
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
genericTriggerActions: z.any().optional(),
|
|
96
|
-
waitForLoader: z.boolean().optional(),
|
|
97
|
-
loaderConfig: StepLoaderConfigSchema
|
|
98
|
-
}).passthrough();
|
|
99
|
-
const TemplateStepSchema = z.object({
|
|
100
|
-
id: z.string(),
|
|
101
|
-
templateId: z.string(),
|
|
102
|
-
navigation: StepNavigationSchema.partial().optional(),
|
|
103
|
-
readonly: z.boolean().optional(),
|
|
104
|
-
title: z.string().optional(),
|
|
105
|
-
stepIndex: z.number().optional(),
|
|
106
|
-
componentOverrides: z.record(z.unknown()).optional(),
|
|
107
|
-
sectionOverrides: z.record(z.unknown()).optional(),
|
|
108
|
-
showStepNumber: z.boolean().optional(),
|
|
109
|
-
actions: z.array(z.unknown()).optional()
|
|
110
|
-
}).passthrough();
|
|
111
|
-
const FormWizardConfigSchema = z.object({
|
|
112
|
-
schemaVersion: z.number().optional(),
|
|
113
|
-
// Version tracking for lazy migration
|
|
114
|
-
id: z.string(),
|
|
115
|
-
title: z.string(),
|
|
116
|
-
description: z.string().optional(),
|
|
117
|
-
steps: z.array(z.union([FormStepSchema, TemplateStepSchema])),
|
|
118
|
-
validationMessageStyle: z.enum(["withLabel", "simple"]).optional(),
|
|
119
|
-
// biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
|
|
120
|
-
genericTriggerActions: z.any().optional()
|
|
121
|
-
}).passthrough();
|
|
122
|
-
function validateFormConfig(data) {
|
|
123
|
-
return FormWizardConfigSchema.safeParse(data);
|
|
124
|
-
}
|
|
125
|
-
function getSchemaVersion(config) {
|
|
126
|
-
return config?.["schemaVersion"] ?? 1;
|
|
127
|
-
}
|
|
128
|
-
const TemplateStorageConfigSchema = z.object({
|
|
129
|
-
team: z.string()
|
|
130
|
-
});
|
|
131
|
-
const StoragePathsSchema = z.object({
|
|
132
|
-
primaryStorage: z.string(),
|
|
133
|
-
fallbackPaths: z.array(z.string()).optional(),
|
|
134
|
-
staticAssets: z.string().optional(),
|
|
135
|
-
templates: z.union([z.string(), TemplateStorageConfigSchema]).optional()
|
|
136
|
-
});
|
|
137
|
-
const BackupConfigSchema = z.object({
|
|
138
|
-
enabled: z.boolean(),
|
|
139
|
-
maxBackups: z.number().int().positive(),
|
|
140
|
-
backupPath: z.string()
|
|
141
|
-
});
|
|
142
|
-
const StorageConfigSchema = z.object({
|
|
143
|
-
strategy: z.enum(["filesystem", "memory", "database"]),
|
|
144
|
-
paths: StoragePathsSchema,
|
|
145
|
-
fileExtension: z.string(),
|
|
146
|
-
createDirectories: z.boolean(),
|
|
147
|
-
backup: BackupConfigSchema.optional()
|
|
148
|
-
});
|
|
149
|
-
const ValidationConfigSchema = z.object({
|
|
150
|
-
strictMode: z.boolean(),
|
|
151
|
-
validateOnLoad: z.boolean(),
|
|
152
|
-
allowMigration: z.boolean()
|
|
153
|
-
});
|
|
154
|
-
const CompatibilitySchema = z.object({
|
|
155
|
-
minVersion: z.string(),
|
|
156
|
-
maxVersion: z.string()
|
|
157
|
-
});
|
|
158
|
-
const MetadataConfigSchema = z.object({
|
|
159
|
-
version: z.string(),
|
|
160
|
-
lastUpdated: z.string().datetime(),
|
|
161
|
-
compatibility: CompatibilitySchema
|
|
162
|
-
});
|
|
163
|
-
const FeaturesConfigSchema = z.object({
|
|
164
|
-
autoBackup: z.boolean(),
|
|
165
|
-
formTemplates: z.boolean(),
|
|
166
|
-
formVersioning: z.boolean(),
|
|
167
|
-
formSharing: z.boolean()
|
|
168
|
-
});
|
|
169
|
-
const MigrationConfigSchema = z.object({
|
|
170
|
-
enabled: z.boolean(),
|
|
171
|
-
sourceDirectories: z.array(z.string()),
|
|
172
|
-
preserveOriginals: z.boolean(),
|
|
173
|
-
logMigration: z.boolean()
|
|
174
|
-
});
|
|
175
|
-
const FormConfigSchema = z.object({
|
|
176
|
-
$schema: z.string().optional(),
|
|
177
|
-
storage: StorageConfigSchema,
|
|
178
|
-
validation: ValidationConfigSchema.optional(),
|
|
179
|
-
metadata: MetadataConfigSchema.optional(),
|
|
180
|
-
features: FeaturesConfigSchema.optional(),
|
|
181
|
-
migration: MigrationConfigSchema.optional()
|
|
182
|
-
});
|
|
183
|
-
function isTemplateStep$1(step) {
|
|
184
|
-
return typeof step === "object" && step !== null && "templateId" in step;
|
|
185
|
-
}
|
|
186
|
-
function getTemplateSteps(template) {
|
|
187
|
-
return template.stepsData || [];
|
|
188
|
-
}
|
|
189
|
-
function isTemplateDialogConfig$1(config) {
|
|
190
|
-
return config && typeof config.template === "object" && typeof config.template.typeId === "string";
|
|
191
|
-
}
|
|
192
|
-
function isLegacyDialogConfigWithTemplate(config) {
|
|
193
|
-
return config && (config.templateTypeId || config.emailVerificationConfig);
|
|
27
|
+
const Alert$2 = React.forwardRef(
|
|
28
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
role: "alert",
|
|
33
|
+
className: clsx$g(
|
|
34
|
+
styles$u.alert,
|
|
35
|
+
styles$u[`variant-${variant ?? "default"}`],
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
Alert$2.displayName = "Alert";
|
|
43
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h5", { ref, className: clsx$g(styles$u.alertTitle, className), ...props }));
|
|
44
|
+
AlertTitle.displayName = "AlertTitle";
|
|
45
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$u.alertDescription, className), ...props }));
|
|
46
|
+
AlertDescription.displayName = "AlertDescription";
|
|
47
|
+
const button = "fb-button_MJLDl";
|
|
48
|
+
const styles$t = {
|
|
49
|
+
button,
|
|
50
|
+
"variant-default": "fb-variant-default_KLx8b",
|
|
51
|
+
"variant-destructive": "fb-variant-destructive_vQKZ2",
|
|
52
|
+
"variant-outline": "fb-variant-outline_1Mb0E",
|
|
53
|
+
"variant-secondary": "fb-variant-secondary_-bohS",
|
|
54
|
+
"variant-ghost": "fb-variant-ghost_qml-f",
|
|
55
|
+
"variant-link": "fb-variant-link_aNj3r",
|
|
56
|
+
"size-default": "fb-size-default_9qKVU",
|
|
57
|
+
"size-sm": "fb-size-sm_MvjvS",
|
|
58
|
+
"size-lg": "fb-size-lg_v6n8j",
|
|
59
|
+
"size-icon": "fb-size-icon_MYsET"
|
|
60
|
+
};
|
|
61
|
+
const Button$1 = React.forwardRef(
|
|
62
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
63
|
+
const Comp = asChild ? Slot : "button";
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
Comp,
|
|
66
|
+
{
|
|
67
|
+
className: clsx$g(
|
|
68
|
+
styles$t.button,
|
|
69
|
+
styles$t[`variant-${variant ?? "default"}`],
|
|
70
|
+
styles$t[`size-${size ?? "default"}`],
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
ref,
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
Button$1.displayName = "Button";
|
|
80
|
+
const badge = "fb-badge_Q1h-y";
|
|
81
|
+
const styles$s = {
|
|
82
|
+
badge,
|
|
83
|
+
"variant-default": "fb-variant-default_7HL-r",
|
|
84
|
+
"variant-secondary": "fb-variant-secondary_knrZF",
|
|
85
|
+
"variant-destructive": "fb-variant-destructive_YUruN",
|
|
86
|
+
"variant-outline": "fb-variant-outline_EHC5j"
|
|
87
|
+
};
|
|
88
|
+
function Badge({ className, variant, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
className: clsx$g(
|
|
93
|
+
styles$s.badge,
|
|
94
|
+
styles$s[`variant-${variant ?? "default"}`],
|
|
95
|
+
className
|
|
96
|
+
),
|
|
97
|
+
...props
|
|
98
|
+
}
|
|
99
|
+
);
|
|
194
100
|
}
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
pattern: {
|
|
209
|
-
withLabel: (label) => `${label} formaat is ongeldig`,
|
|
210
|
-
simple: () => "Dit veld formaat is ongeldig"
|
|
211
|
-
},
|
|
212
|
-
email: {
|
|
213
|
-
withLabel: (label) => `${label} moet een geldig e-mailadres zijn`,
|
|
214
|
-
simple: () => "Dit veld moet een geldig e-mailadres zijn"
|
|
215
|
-
},
|
|
216
|
-
min: {
|
|
217
|
-
withLabel: (label, value) => `${label} moet minimaal ${value} zijn`,
|
|
218
|
-
simple: (value) => `Dit veld moet minimaal ${value} zijn`
|
|
219
|
-
},
|
|
220
|
-
max: {
|
|
221
|
-
withLabel: (label, value) => `${label} moet maximaal ${value} zijn`,
|
|
222
|
-
simple: (value) => `Dit veld moet maximaal ${value} zijn`
|
|
223
|
-
},
|
|
224
|
-
minItems: {
|
|
225
|
-
withLabel: (label, value) => `${label} moet minimaal ${value} items hebben`,
|
|
226
|
-
simple: (value) => `Dit veld moet minimaal ${value} items hebben`
|
|
227
|
-
},
|
|
228
|
-
maxItems: {
|
|
229
|
-
withLabel: (label, value) => `${label} moet maximaal ${value} items hebben`,
|
|
230
|
-
simple: (value) => `Dit veld moet maximaal ${value} items hebben`
|
|
231
|
-
},
|
|
232
|
-
url: {
|
|
233
|
-
withLabel: (label) => `${label} moet een geldige URL zijn`,
|
|
234
|
-
simple: () => "Dit veld moet een geldige URL zijn"
|
|
235
|
-
},
|
|
236
|
-
phone: {
|
|
237
|
-
withLabel: (label) => `${label} moet een geldig telefoonnummer zijn`,
|
|
238
|
-
simple: () => "Dit veld moet een geldig telefoonnummer zijn"
|
|
239
|
-
}
|
|
101
|
+
const card$1 = "fb-card_Ry9d9";
|
|
102
|
+
const cardHeader = "fb-cardHeader_exSCY";
|
|
103
|
+
const cardTitle = "fb-cardTitle_mLAib";
|
|
104
|
+
const cardDescription = "fb-cardDescription_iLv2K";
|
|
105
|
+
const cardContent$1 = "fb-cardContent_HJ92K";
|
|
106
|
+
const cardFooter = "fb-cardFooter_BAcjS";
|
|
107
|
+
const styles$r = {
|
|
108
|
+
card: card$1,
|
|
109
|
+
cardHeader,
|
|
110
|
+
cardTitle,
|
|
111
|
+
cardDescription,
|
|
112
|
+
cardContent: cardContent$1,
|
|
113
|
+
cardFooter
|
|
240
114
|
};
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
return messageConfig.withLabel(label, ...args);
|
|
259
|
-
}
|
|
115
|
+
const Card$1 = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$r.card, className), ...props }));
|
|
116
|
+
Card$1.displayName = "Card";
|
|
117
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$r.cardHeader, className), ...props }));
|
|
118
|
+
CardHeader.displayName = "CardHeader";
|
|
119
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: clsx$g(styles$r.cardTitle, className), ...props }));
|
|
120
|
+
CardTitle.displayName = "CardTitle";
|
|
121
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: clsx$g(styles$r.cardDescription, className), ...props }));
|
|
122
|
+
CardDescription.displayName = "CardDescription";
|
|
123
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$r.cardContent, className), ...props }));
|
|
124
|
+
CardContent.displayName = "CardContent";
|
|
125
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$r.cardFooter, className), ...props }));
|
|
126
|
+
CardFooter.displayName = "CardFooter";
|
|
127
|
+
const checkbox = "fb-checkbox_wsic0";
|
|
128
|
+
const checkboxIndicator = "fb-checkboxIndicator_31Q4N";
|
|
129
|
+
const styles$q = {
|
|
130
|
+
checkbox,
|
|
131
|
+
checkboxIndicator
|
|
260
132
|
};
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
if (config.bodyFields) {
|
|
271
|
-
const bodyObject = {};
|
|
272
|
-
for (const field of config.bodyFields) {
|
|
273
|
-
if (!field.key.trim()) continue;
|
|
274
|
-
let value;
|
|
275
|
-
if (field.type === "static") {
|
|
276
|
-
value = field.value;
|
|
277
|
-
} else if (field.type === "dynamic" && field.fieldPath) {
|
|
278
|
-
value = getValueFromFormData(formData, field.fieldPath);
|
|
279
|
-
} else {
|
|
280
|
-
value = field.value;
|
|
281
|
-
}
|
|
282
|
-
setNestedValue(bodyObject, field.key, value);
|
|
283
|
-
}
|
|
284
|
-
return JSON.stringify(bodyObject);
|
|
285
|
-
}
|
|
286
|
-
return void 0;
|
|
287
|
-
}
|
|
288
|
-
function getValueFromFormData(formData, path) {
|
|
289
|
-
return path.split(".").reduce((current2, key) => {
|
|
290
|
-
return current2?.[key];
|
|
291
|
-
}, formData);
|
|
292
|
-
}
|
|
293
|
-
function interpolateTemplate(template, formData) {
|
|
294
|
-
let result = template.replace(/\$\{data\.([^}]+)\}/g, (match, fieldPath) => {
|
|
295
|
-
const value = getValueFromFormData(formData, fieldPath);
|
|
296
|
-
return value != null ? String(value) : match;
|
|
297
|
-
});
|
|
298
|
-
result = result.replace(/\$\{([^}]+)\}/g, (match, fieldPath) => {
|
|
299
|
-
if (match.includes("data.")) return match;
|
|
300
|
-
if (fieldPath.includes(".")) {
|
|
301
|
-
const parts = fieldPath.split(".");
|
|
302
|
-
const fieldName = parts[parts.length - 1];
|
|
303
|
-
const value2 = formData[fieldName];
|
|
304
|
-
return value2 != null ? String(value2) : match;
|
|
305
|
-
}
|
|
306
|
-
const value = getValueFromFormData(formData, fieldPath);
|
|
307
|
-
return value != null ? String(value) : match;
|
|
308
|
-
});
|
|
309
|
-
return result;
|
|
310
|
-
}
|
|
311
|
-
function interpolateObjectTemplate(obj, formData) {
|
|
312
|
-
const result = {};
|
|
313
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
314
|
-
if (typeof value === "string") {
|
|
315
|
-
result[key] = interpolateTemplate(value, formData);
|
|
316
|
-
} else if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
317
|
-
result[key] = interpolateObjectTemplate(
|
|
318
|
-
value,
|
|
319
|
-
formData
|
|
320
|
-
);
|
|
321
|
-
} else if (Array.isArray(value)) {
|
|
322
|
-
result[key] = value.map(
|
|
323
|
-
(item) => typeof item === "string" ? interpolateTemplate(item, formData) : item && typeof item === "object" ? interpolateObjectTemplate(
|
|
324
|
-
item,
|
|
325
|
-
formData
|
|
326
|
-
) : item
|
|
327
|
-
);
|
|
328
|
-
} else {
|
|
329
|
-
result[key] = value;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return result;
|
|
333
|
-
}
|
|
334
|
-
function setNestedValue(obj, path, value) {
|
|
335
|
-
const keys = path.split(".");
|
|
336
|
-
const lastKey = keys.pop();
|
|
337
|
-
const target = keys.reduce((current2, key) => {
|
|
338
|
-
if (typeof current2[key] !== "object" || current2[key] === null) {
|
|
339
|
-
current2[key] = {};
|
|
340
|
-
}
|
|
341
|
-
return current2[key];
|
|
342
|
-
}, obj);
|
|
343
|
-
target[lastKey] = value;
|
|
344
|
-
}
|
|
345
|
-
function getAvailableFormFields(steps, currentStepId) {
|
|
346
|
-
const fields = [];
|
|
347
|
-
const currentStepIndex = steps.findIndex((step) => step.id === currentStepId);
|
|
348
|
-
for (let i = 0; i <= currentStepIndex; i++) {
|
|
349
|
-
const step = steps[i];
|
|
350
|
-
if (!step) continue;
|
|
351
|
-
const sections = step.sections || [];
|
|
352
|
-
for (const section2 of sections) {
|
|
353
|
-
const components = section2.components || [];
|
|
354
|
-
for (const component of components) {
|
|
355
|
-
if (isInputComponent(component)) {
|
|
356
|
-
fields.push({
|
|
357
|
-
id: component.id,
|
|
358
|
-
label: component.label,
|
|
359
|
-
path: component.id,
|
|
360
|
-
// For now, use component ID as path
|
|
361
|
-
stepTitle: step.title,
|
|
362
|
-
stepIndex: i + 1
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
133
|
+
const Checkbox$2 = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
134
|
+
CheckboxPrimitive.Root,
|
|
135
|
+
{
|
|
136
|
+
ref,
|
|
137
|
+
className: clsx$g(styles$q.checkbox, className),
|
|
138
|
+
...props,
|
|
139
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: styles$q.checkboxIndicator, children: /* @__PURE__ */ jsx(Check$1, { className: styles$q.checkboxIcon }) })
|
|
367
140
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
"dropdown"
|
|
378
|
-
];
|
|
379
|
-
return inputTypes.includes(component.type);
|
|
380
|
-
}
|
|
381
|
-
const alert = "fb-alert_5UcaT";
|
|
382
|
-
const alertTitle = "fb-alertTitle_-KE5o";
|
|
383
|
-
const alertDescription = "fb-alertDescription_cg7Ke";
|
|
141
|
+
));
|
|
142
|
+
Checkbox$2.displayName = CheckboxPrimitive.Root.displayName;
|
|
143
|
+
const dialogOverlay = "fb-dialogOverlay_GSMVm";
|
|
144
|
+
const dialogContent$2 = "fb-dialogContent_neUay";
|
|
145
|
+
const dialogClose = "fb-dialogClose_QbWkj";
|
|
146
|
+
const dialogCloseIcon = "fb-dialogCloseIcon_kK8c6";
|
|
147
|
+
const dialogHeader = "fb-dialogHeader_df1-u";
|
|
148
|
+
const dialogTitle = "fb-dialogTitle_FS7k8";
|
|
149
|
+
const dialogDescription = "fb-dialogDescription_uEgTa";
|
|
384
150
|
const styles$p = {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
151
|
+
dialogOverlay,
|
|
152
|
+
dialogContent: dialogContent$2,
|
|
153
|
+
dialogClose,
|
|
154
|
+
dialogCloseIcon,
|
|
155
|
+
dialogHeader,
|
|
156
|
+
dialogTitle,
|
|
157
|
+
dialogDescription
|
|
390
158
|
};
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
159
|
+
const Dialog = DialogPrimitive.Root;
|
|
160
|
+
const DialogPortal = DialogPrimitive.Portal;
|
|
161
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
162
|
+
DialogPrimitive.Overlay,
|
|
163
|
+
{
|
|
164
|
+
ref,
|
|
165
|
+
className: clsx$g(styles$p.dialogOverlay, className),
|
|
166
|
+
...props
|
|
167
|
+
}
|
|
168
|
+
));
|
|
169
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
170
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
171
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
172
|
+
/* @__PURE__ */ jsxs(
|
|
173
|
+
DialogPrimitive.Content,
|
|
394
174
|
{
|
|
395
175
|
ref,
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
className
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
);
|
|
406
|
-
Alert$2.displayName = "Alert";
|
|
407
|
-
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h5", { ref, className: clsx$g(styles$p.alertTitle, className), ...props }));
|
|
408
|
-
AlertTitle.displayName = "AlertTitle";
|
|
409
|
-
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$p.alertDescription, className), ...props }));
|
|
410
|
-
AlertDescription.displayName = "AlertDescription";
|
|
411
|
-
const button = "fb-button_MJLDl";
|
|
412
|
-
const styles$o = {
|
|
413
|
-
button,
|
|
414
|
-
"variant-default": "fb-variant-default_KLx8b",
|
|
415
|
-
"variant-destructive": "fb-variant-destructive_vQKZ2",
|
|
416
|
-
"variant-outline": "fb-variant-outline_1Mb0E",
|
|
417
|
-
"variant-secondary": "fb-variant-secondary_-bohS",
|
|
418
|
-
"variant-ghost": "fb-variant-ghost_qml-f",
|
|
419
|
-
"variant-link": "fb-variant-link_aNj3r",
|
|
420
|
-
"size-default": "fb-size-default_9qKVU",
|
|
421
|
-
"size-sm": "fb-size-sm_MvjvS",
|
|
422
|
-
"size-lg": "fb-size-lg_v6n8j",
|
|
423
|
-
"size-icon": "fb-size-icon_MYsET"
|
|
424
|
-
};
|
|
425
|
-
const Button$1 = React.forwardRef(
|
|
426
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
427
|
-
const Comp = asChild ? Slot : "button";
|
|
428
|
-
return /* @__PURE__ */ jsx(
|
|
429
|
-
Comp,
|
|
430
|
-
{
|
|
431
|
-
className: clsx$g(
|
|
432
|
-
styles$o.button,
|
|
433
|
-
styles$o[`variant-${variant ?? "default"}`],
|
|
434
|
-
styles$o[`size-${size ?? "default"}`],
|
|
435
|
-
className
|
|
436
|
-
),
|
|
437
|
-
ref,
|
|
438
|
-
...props
|
|
439
|
-
}
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
);
|
|
443
|
-
Button$1.displayName = "Button";
|
|
444
|
-
const badge = "fb-badge_Q1h-y";
|
|
445
|
-
const styles$n = {
|
|
446
|
-
badge,
|
|
447
|
-
"variant-default": "fb-variant-default_7HL-r",
|
|
448
|
-
"variant-secondary": "fb-variant-secondary_knrZF",
|
|
449
|
-
"variant-destructive": "fb-variant-destructive_YUruN",
|
|
450
|
-
"variant-outline": "fb-variant-outline_EHC5j"
|
|
451
|
-
};
|
|
452
|
-
function Badge({ className, variant, ...props }) {
|
|
453
|
-
return /* @__PURE__ */ jsx(
|
|
454
|
-
"div",
|
|
455
|
-
{
|
|
456
|
-
className: clsx$g(
|
|
457
|
-
styles$n.badge,
|
|
458
|
-
styles$n[`variant-${variant ?? "default"}`],
|
|
459
|
-
className
|
|
460
|
-
),
|
|
461
|
-
...props
|
|
462
|
-
}
|
|
463
|
-
);
|
|
464
|
-
}
|
|
465
|
-
const card$1 = "fb-card_Ry9d9";
|
|
466
|
-
const cardHeader = "fb-cardHeader_exSCY";
|
|
467
|
-
const cardTitle = "fb-cardTitle_mLAib";
|
|
468
|
-
const cardDescription = "fb-cardDescription_iLv2K";
|
|
469
|
-
const cardContent$1 = "fb-cardContent_HJ92K";
|
|
470
|
-
const cardFooter = "fb-cardFooter_BAcjS";
|
|
471
|
-
const styles$m = {
|
|
472
|
-
card: card$1,
|
|
473
|
-
cardHeader,
|
|
474
|
-
cardTitle,
|
|
475
|
-
cardDescription,
|
|
476
|
-
cardContent: cardContent$1,
|
|
477
|
-
cardFooter
|
|
478
|
-
};
|
|
479
|
-
const Card$1 = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$m.card, className), ...props }));
|
|
480
|
-
Card$1.displayName = "Card";
|
|
481
|
-
const CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$m.cardHeader, className), ...props }));
|
|
482
|
-
CardHeader.displayName = "CardHeader";
|
|
483
|
-
const CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: clsx$g(styles$m.cardTitle, className), ...props }));
|
|
484
|
-
CardTitle.displayName = "CardTitle";
|
|
485
|
-
const CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: clsx$g(styles$m.cardDescription, className), ...props }));
|
|
486
|
-
CardDescription.displayName = "CardDescription";
|
|
487
|
-
const CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$m.cardContent, className), ...props }));
|
|
488
|
-
CardContent.displayName = "CardContent";
|
|
489
|
-
const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: clsx$g(styles$m.cardFooter, className), ...props }));
|
|
490
|
-
CardFooter.displayName = "CardFooter";
|
|
491
|
-
const dialogOverlay = "fb-dialogOverlay_GSMVm";
|
|
492
|
-
const dialogContent$2 = "fb-dialogContent_neUay";
|
|
493
|
-
const dialogClose = "fb-dialogClose_QbWkj";
|
|
494
|
-
const dialogCloseIcon = "fb-dialogCloseIcon_kK8c6";
|
|
495
|
-
const dialogHeader = "fb-dialogHeader_df1-u";
|
|
496
|
-
const dialogTitle = "fb-dialogTitle_FS7k8";
|
|
497
|
-
const dialogDescription = "fb-dialogDescription_uEgTa";
|
|
498
|
-
const styles$l = {
|
|
499
|
-
dialogOverlay,
|
|
500
|
-
dialogContent: dialogContent$2,
|
|
501
|
-
dialogClose,
|
|
502
|
-
dialogCloseIcon,
|
|
503
|
-
dialogHeader,
|
|
504
|
-
dialogTitle,
|
|
505
|
-
dialogDescription
|
|
506
|
-
};
|
|
507
|
-
const Dialog = DialogPrimitive.Root;
|
|
508
|
-
const DialogPortal = DialogPrimitive.Portal;
|
|
509
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
510
|
-
DialogPrimitive.Overlay,
|
|
511
|
-
{
|
|
512
|
-
ref,
|
|
513
|
-
className: clsx$g(styles$l.dialogOverlay, className),
|
|
514
|
-
...props
|
|
515
|
-
}
|
|
516
|
-
));
|
|
517
|
-
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
518
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
519
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
520
|
-
/* @__PURE__ */ jsxs(
|
|
521
|
-
DialogPrimitive.Content,
|
|
522
|
-
{
|
|
523
|
-
ref,
|
|
524
|
-
className: clsx$g(styles$l.dialogContent, className),
|
|
525
|
-
...props,
|
|
526
|
-
children: [
|
|
527
|
-
children,
|
|
528
|
-
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: styles$l.dialogClose, children: [
|
|
529
|
-
/* @__PURE__ */ jsx(X, { className: styles$l.dialogCloseIcon }),
|
|
530
|
-
/* @__PURE__ */ jsx("span", { children: "Close" })
|
|
531
|
-
] })
|
|
532
|
-
]
|
|
176
|
+
className: clsx$g(styles$p.dialogContent, className),
|
|
177
|
+
...props,
|
|
178
|
+
children: [
|
|
179
|
+
children,
|
|
180
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: styles$p.dialogClose, children: [
|
|
181
|
+
/* @__PURE__ */ jsx(X, { className: styles$p.dialogCloseIcon }),
|
|
182
|
+
/* @__PURE__ */ jsx("span", { children: "Close" })
|
|
183
|
+
] })
|
|
184
|
+
]
|
|
533
185
|
}
|
|
534
186
|
)
|
|
535
187
|
] }));
|
|
@@ -537,13 +189,13 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
|
537
189
|
const DialogHeader = ({
|
|
538
190
|
className,
|
|
539
191
|
...props
|
|
540
|
-
}) => /* @__PURE__ */ jsx("div", { className: clsx$g(styles$
|
|
192
|
+
}) => /* @__PURE__ */ jsx("div", { className: clsx$g(styles$p.dialogHeader, className), ...props });
|
|
541
193
|
DialogHeader.displayName = "DialogHeader";
|
|
542
194
|
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
543
195
|
DialogPrimitive.Title,
|
|
544
196
|
{
|
|
545
197
|
ref,
|
|
546
|
-
className: clsx$g(styles$
|
|
198
|
+
className: clsx$g(styles$p.dialogTitle, className),
|
|
547
199
|
...props
|
|
548
200
|
}
|
|
549
201
|
));
|
|
@@ -552,24 +204,24 @@ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
552
204
|
DialogPrimitive.Description,
|
|
553
205
|
{
|
|
554
206
|
ref,
|
|
555
|
-
className: clsx$g(styles$
|
|
207
|
+
className: clsx$g(styles$p.dialogDescription, className),
|
|
556
208
|
...props
|
|
557
209
|
}
|
|
558
210
|
));
|
|
559
211
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
560
212
|
const boxContainer = "fb-boxContainer_oXGAN";
|
|
561
|
-
const styles$
|
|
213
|
+
const styles$o = {
|
|
562
214
|
boxContainer
|
|
563
215
|
};
|
|
564
216
|
const Box = ({ className, children, ...rest }) => {
|
|
565
|
-
return /* @__PURE__ */ jsx("div", { className: clsx$g(styles$
|
|
217
|
+
return /* @__PURE__ */ jsx("div", { className: clsx$g(styles$o.boxContainer, className), ...rest, children });
|
|
566
218
|
};
|
|
567
219
|
const luxGridLayoutContainer = "fb-luxGridLayoutContainer_Co4nr";
|
|
568
220
|
const luxGridLayoutContainerWithoutPadding = "fb-luxGridLayoutContainerWithoutPadding_VpIVN";
|
|
569
221
|
const luxGridLayoutContainerFullWidth = "fb-luxGridLayoutContainerFullWidth_ROl0Y";
|
|
570
222
|
const luxGridLayout = "fb-luxGridLayout_Jsul6";
|
|
571
223
|
const luxGridLayoutFullWidth = "fb-luxGridLayoutFullWidth_0O2LE";
|
|
572
|
-
const styles$
|
|
224
|
+
const styles$n = {
|
|
573
225
|
luxGridLayoutContainer,
|
|
574
226
|
luxGridLayoutContainerWithoutPadding,
|
|
575
227
|
luxGridLayoutContainerFullWidth,
|
|
@@ -602,9 +254,9 @@ function GridLayout({
|
|
|
602
254
|
return /* @__PURE__ */ jsx(
|
|
603
255
|
"div",
|
|
604
256
|
{
|
|
605
|
-
className: clsx$g(styles$
|
|
606
|
-
[styles$
|
|
607
|
-
[styles$
|
|
257
|
+
className: clsx$g(styles$n.luxGridLayoutContainer, {
|
|
258
|
+
[styles$n.luxGridLayoutContainerWithoutPadding]: !containerPadding,
|
|
259
|
+
[styles$n.luxGridLayoutContainerFullWidth]: fullWidth
|
|
608
260
|
}),
|
|
609
261
|
style: {
|
|
610
262
|
"--grid-container-background-color": containerBackGroundColor
|
|
@@ -614,9 +266,9 @@ function GridLayout({
|
|
|
614
266
|
{
|
|
615
267
|
...otherProps,
|
|
616
268
|
className: clsx$g(
|
|
617
|
-
styles$
|
|
269
|
+
styles$n.luxGridLayout,
|
|
618
270
|
{
|
|
619
|
-
[styles$
|
|
271
|
+
[styles$n.luxGridLayoutFullWidth]: fullWidth
|
|
620
272
|
},
|
|
621
273
|
className
|
|
622
274
|
),
|
|
@@ -633,7 +285,7 @@ function GridLayout({
|
|
|
633
285
|
);
|
|
634
286
|
}
|
|
635
287
|
const gridLayoutColumn = "fb-gridLayoutColumn_5TCzp";
|
|
636
|
-
const styles$
|
|
288
|
+
const styles$m = {
|
|
637
289
|
gridLayoutColumn
|
|
638
290
|
};
|
|
639
291
|
function GridLayoutColumn({
|
|
@@ -656,7 +308,7 @@ function GridLayoutColumn({
|
|
|
656
308
|
...style,
|
|
657
309
|
...cssVariables
|
|
658
310
|
},
|
|
659
|
-
className: clsx$g(className, styles$
|
|
311
|
+
className: clsx$g(className, styles$m.gridLayoutColumn),
|
|
660
312
|
children
|
|
661
313
|
}
|
|
662
314
|
);
|
|
@@ -668,7 +320,7 @@ const rightColumn = "fb-rightColumn_P0J6U";
|
|
|
668
320
|
const footerSection = "fb-footerSection_eW4js";
|
|
669
321
|
const contentBorder = "fb-contentBorder_yYFFn";
|
|
670
322
|
const mainContent = "fb-mainContent_9ZW4m";
|
|
671
|
-
const styles$
|
|
323
|
+
const styles$l = {
|
|
672
324
|
formLayoutWrapper,
|
|
673
325
|
titleSection,
|
|
674
326
|
leftColumn,
|
|
@@ -759,7 +411,7 @@ function FormLayoutBase({
|
|
|
759
411
|
const leftWidth = hasLeftColumn ? leftColumnWidth : 0;
|
|
760
412
|
const mainContentStart = leftWidth + 1;
|
|
761
413
|
const mainContentEnd = 10;
|
|
762
|
-
return /* @__PURE__ */ jsx("div", { ...otherProps, className: clsx$g(styles$
|
|
414
|
+
return /* @__PURE__ */ jsx("div", { ...otherProps, className: clsx$g(styles$l.formLayoutWrapper, className), children: /* @__PURE__ */ jsxs(
|
|
763
415
|
GridLayout,
|
|
764
416
|
{
|
|
765
417
|
containerBackGroundColor,
|
|
@@ -768,13 +420,13 @@ function FormLayoutBase({
|
|
|
768
420
|
columnGap,
|
|
769
421
|
fullWidth,
|
|
770
422
|
children: [
|
|
771
|
-
title2 && /* @__PURE__ */ jsx(GridLayoutColumn, { startSlice: 4, endSlice: 13, children: /* @__PURE__ */ jsx("div", { className: clsx$g(styles$
|
|
423
|
+
title2 && /* @__PURE__ */ jsx(GridLayoutColumn, { startSlice: 4, endSlice: 13, children: /* @__PURE__ */ jsx("div", { className: clsx$g(styles$l.titleSection), children: title2 }) }),
|
|
772
424
|
hasLeftColumn && leftColumn2 && /* @__PURE__ */ jsx(GridLayoutColumn, { startSlice: 1, endSlice: leftColumnWidth + 1, children: /* @__PURE__ */ jsx(
|
|
773
425
|
"div",
|
|
774
426
|
{
|
|
775
427
|
className: clsx$g(
|
|
776
|
-
styles$
|
|
777
|
-
showContentBorder && styles$
|
|
428
|
+
styles$l.leftColumn,
|
|
429
|
+
showContentBorder && styles$l.contentBorder
|
|
778
430
|
),
|
|
779
431
|
children: leftColumn2
|
|
780
432
|
}
|
|
@@ -785,8 +437,8 @@ function FormLayoutBase({
|
|
|
785
437
|
startSlice: mainContentStart,
|
|
786
438
|
endSlice: mainContentEnd,
|
|
787
439
|
className: clsx$g(
|
|
788
|
-
styles$
|
|
789
|
-
showContentBorder && styles$
|
|
440
|
+
styles$l.mainContent,
|
|
441
|
+
showContentBorder && styles$l.contentBorder
|
|
790
442
|
),
|
|
791
443
|
children: /* @__PURE__ */ jsx(Box, { children: mainContent2 })
|
|
792
444
|
}
|
|
@@ -795,13 +447,13 @@ function FormLayoutBase({
|
|
|
795
447
|
Box,
|
|
796
448
|
{
|
|
797
449
|
className: clsx$g(
|
|
798
|
-
styles$
|
|
799
|
-
showContentBorder && styles$
|
|
450
|
+
styles$l.rightColumn,
|
|
451
|
+
showContentBorder && styles$l.contentBorder
|
|
800
452
|
),
|
|
801
453
|
children: rightColumn2
|
|
802
454
|
}
|
|
803
455
|
) }),
|
|
804
|
-
footerContent && /* @__PURE__ */ jsx(GridLayoutColumn, { startSlice: 4, endSlice: 10, children: /* @__PURE__ */ jsx("div", { className: clsx$g(styles$
|
|
456
|
+
footerContent && /* @__PURE__ */ jsx(GridLayoutColumn, { startSlice: 4, endSlice: 10, children: /* @__PURE__ */ jsx("div", { className: clsx$g(styles$l.footerSection), children: footerContent }) })
|
|
805
457
|
]
|
|
806
458
|
}
|
|
807
459
|
) });
|
|
@@ -1022,12 +674,12 @@ function clsx$8() {
|
|
|
1022
674
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r$8(e)) && (n && (n += " "), n += t);
|
|
1023
675
|
return n;
|
|
1024
676
|
}
|
|
1025
|
-
const FormField$2 = forwardRef(({ className, children, description, errorMessage: errorMessage2, input, invalid, label, type, ...restProps }, ref) => jsxs("div", { ...restProps, ref, className: clsx$8("utrecht-form-field", {
|
|
677
|
+
const FormField$2 = forwardRef(({ className, children, description, errorMessage: errorMessage2, input: input2, invalid, label, type, ...restProps }, ref) => jsxs("div", { ...restProps, ref, className: clsx$8("utrecht-form-field", {
|
|
1026
678
|
"utrecht-form-field--invalid": invalid,
|
|
1027
679
|
"utrecht-form-field--checkbox": type === "checkbox",
|
|
1028
680
|
"utrecht-form-field--radio": type === "radio",
|
|
1029
681
|
"utrecht-form-field--text": !type || type === "text"
|
|
1030
|
-
}, className), children: [label && jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsx("div", { className: "utrecht-form-field__description", children: description }),
|
|
682
|
+
}, className), children: [label && jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsx("div", { className: "utrecht-form-field__description", children: description }), input2 && jsx("div", { className: "utrecht-form-field__input", children: input2 }), errorMessage2 && jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
|
|
1031
683
|
FormField$2.displayName = "FormField";
|
|
1032
684
|
function r$5$1(e) {
|
|
1033
685
|
var t, f, n = "";
|
|
@@ -1102,12 +754,12 @@ function clsx$2$1() {
|
|
|
1102
754
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r$2$1(e)) && (n && (n += " "), n += t);
|
|
1103
755
|
return n;
|
|
1104
756
|
}
|
|
1105
|
-
const FormField$1 = forwardRef(({ className, children, description, errorMessage: errorMessage2, input, invalid, label, type, ...restProps }, ref) => jsxs("div", { ...restProps, ref, className: clsx$2$1("utrecht-form-field", {
|
|
757
|
+
const FormField$1 = forwardRef(({ className, children, description, errorMessage: errorMessage2, input: input2, invalid, label, type, ...restProps }, ref) => jsxs("div", { ...restProps, ref, className: clsx$2$1("utrecht-form-field", {
|
|
1106
758
|
"utrecht-form-field--invalid": invalid,
|
|
1107
759
|
"utrecht-form-field--checkbox": type === "checkbox",
|
|
1108
760
|
"utrecht-form-field--radio": type === "radio",
|
|
1109
761
|
"utrecht-form-field--text": !type || type === "text"
|
|
1110
|
-
}, className), children: [label && jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsx("div", { className: "utrecht-form-field__description", children: description }),
|
|
762
|
+
}, className), children: [label && jsx("div", { className: "utrecht-form-field__label", children: label }), description && jsx("div", { className: "utrecht-form-field__description", children: description }), input2 && jsx("div", { className: "utrecht-form-field__input", children: input2 }), errorMessage2 && jsx("div", { className: "utrecht-form-field__error-message", children: errorMessage2 }), children] }));
|
|
1111
763
|
FormField$1.displayName = "FormField";
|
|
1112
764
|
function r$1$1(e) {
|
|
1113
765
|
var t, f, n = "";
|
|
@@ -2397,7 +2049,7 @@ function _objectSpread$X(e) {
|
|
|
2397
2049
|
}
|
|
2398
2050
|
return e;
|
|
2399
2051
|
}
|
|
2400
|
-
var Textarea = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
2052
|
+
var Textarea$1 = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
2401
2053
|
var dir = _ref.dir, disabled2 = _ref.disabled, inputRequired = _ref.inputRequired, invalid = _ref.invalid, readOnly = _ref.readOnly, required = _ref.required, className = _ref.className, restProps = _objectWithoutProperties(_ref, _excluded$W);
|
|
2402
2054
|
return jsx("textarea", _objectSpread$X(_objectSpread$X({}, restProps), {}, {
|
|
2403
2055
|
ref,
|
|
@@ -2410,7 +2062,7 @@ var Textarea = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
|
2410
2062
|
"aria-invalid": invalid || void 0
|
|
2411
2063
|
}));
|
|
2412
2064
|
});
|
|
2413
|
-
Textarea.displayName = "Textarea";
|
|
2065
|
+
Textarea$1.displayName = "Textarea";
|
|
2414
2066
|
var _excluded$V = ["autoComplete", "children", "cols", "defaultValue", "description", "disabled", "errorMessage", "inputDir", "inputRequired", "invalid", "label", "maxLength", "minLength", "name", "onBlur", "onChange", "onFocus", "onInput", "placeholder", "readOnly", "required", "rows", "status", "inputRef", "value"];
|
|
2415
2067
|
function ownKeys$W(e, r2) {
|
|
2416
2068
|
var t = Object.keys(e);
|
|
@@ -2459,7 +2111,7 @@ var FormFieldTextarea = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
|
2459
2111
|
children: errorMessage2
|
|
2460
2112
|
}), jsx("div", {
|
|
2461
2113
|
className: "utrecht-form-field__input",
|
|
2462
|
-
children: jsx(Textarea, {
|
|
2114
|
+
children: jsx(Textarea$1, {
|
|
2463
2115
|
"aria-describedby": clsx$h(_defineProperty(_defineProperty(_defineProperty({}, descriptionId, description), errorMessageId, invalid), statusId, status)) || void 0,
|
|
2464
2116
|
autoComplete,
|
|
2465
2117
|
cols,
|
|
@@ -3954,7 +3606,7 @@ function _objectSpread$l(e) {
|
|
|
3954
3606
|
}
|
|
3955
3607
|
return e;
|
|
3956
3608
|
}
|
|
3957
|
-
var Select = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
3609
|
+
var Select$1 = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
3958
3610
|
var busy = _ref.busy, invalid = _ref.invalid, required = _ref.required, className = _ref.className, noscript = _ref.noscript, children = _ref.children, restProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
3959
3611
|
return jsx("select", _objectSpread$l(_objectSpread$l({
|
|
3960
3612
|
"aria-busy": busy || void 0,
|
|
@@ -3967,7 +3619,7 @@ var Select = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
|
3967
3619
|
children
|
|
3968
3620
|
}));
|
|
3969
3621
|
});
|
|
3970
|
-
Select.displayName = "Select";
|
|
3622
|
+
Select$1.displayName = "Select";
|
|
3971
3623
|
var SelectOption = /* @__PURE__ */ forwardRef(function(_ref2, ref) {
|
|
3972
3624
|
var disabled2 = _ref2.disabled, invalid = _ref2.invalid, value = _ref2.value, children = _ref2.children, className = _ref2.className, restProps = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
3973
3625
|
return jsx("option", _objectSpread$l(_objectSpread$l({}, restProps), {}, {
|
|
@@ -7900,10 +7552,10 @@ function FormFieldWrapper({
|
|
|
7900
7552
|
invalid,
|
|
7901
7553
|
errorMessage: errorMessage2,
|
|
7902
7554
|
className = "",
|
|
7903
|
-
input
|
|
7555
|
+
input: input2
|
|
7904
7556
|
}) {
|
|
7905
7557
|
return /* @__PURE__ */ jsxs("div", { className: `form-field-wrapper ${className}`, children: [
|
|
7906
|
-
|
|
7558
|
+
input2,
|
|
7907
7559
|
invalid && errorMessage2 && /* @__PURE__ */ jsx("div", { className: "form-field-error mt-2 text-sm text-red-600", children: errorMessage2 })
|
|
7908
7560
|
] });
|
|
7909
7561
|
}
|
|
@@ -7911,7 +7563,7 @@ const container = "fb-container_p6qC4";
|
|
|
7911
7563
|
const disabled = "fb-disabled_EuvTp";
|
|
7912
7564
|
const prevButtonDisabled = "fb-prevButtonDisabled_Wj2Qp";
|
|
7913
7565
|
const additionalContent = "fb-additionalContent_0tppE";
|
|
7914
|
-
const styles$
|
|
7566
|
+
const styles$k = {
|
|
7915
7567
|
container,
|
|
7916
7568
|
disabled,
|
|
7917
7569
|
prevButtonDisabled,
|
|
@@ -7934,7 +7586,7 @@ const FlowPrevButton = ({
|
|
|
7934
7586
|
appearance: "subtle-button",
|
|
7935
7587
|
onClick: handleClick,
|
|
7936
7588
|
disabled: disabled2 || isDisplayOnly,
|
|
7937
|
-
className: isDisplayOnly ? styles$
|
|
7589
|
+
className: isDisplayOnly ? styles$k.prevButtonDisabled : "",
|
|
7938
7590
|
...otherProps,
|
|
7939
7591
|
children: [
|
|
7940
7592
|
/* @__PURE__ */ jsx(ChevronLeft, {}),
|
|
@@ -7954,7 +7606,7 @@ const FormHeaderBase = ({
|
|
|
7954
7606
|
isDisplayOnly = false
|
|
7955
7607
|
}) => {
|
|
7956
7608
|
const isDisabled = isEditing || isDisplayOnly;
|
|
7957
|
-
return /* @__PURE__ */ jsxs("div", { className: clsx$g(styles$
|
|
7609
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx$g(styles$k.container, isDisabled && styles$k.disabled), children: [
|
|
7958
7610
|
navigation?.previous?.enabled && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
7959
7611
|
FlowPrevButton,
|
|
7960
7612
|
{
|
|
@@ -7968,9 +7620,27 @@ const FormHeaderBase = ({
|
|
|
7968
7620
|
showStepNumber && stepNumber2 ? /* @__PURE__ */ jsx(PreHeading, { heading: title2 ? /* @__PURE__ */ jsx(Heading7, { level: 2, children: title2 }) : /* @__PURE__ */ jsx(Heading7, { level: 2, children: "" }), children: typeof stepNumber2 === "number" ? `Stap ${stepNumber2}` : `Stap ${stepNumber2?.current} van ${stepNumber2?.total}` }) : null,
|
|
7969
7621
|
title2 && !(showStepNumber && stepNumber2) && /* @__PURE__ */ jsx(Heading7, { level: 2, children: title2 })
|
|
7970
7622
|
] }),
|
|
7971
|
-
children && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7623
|
+
children && /* @__PURE__ */ jsx("div", { className: styles$k.additionalContent, children })
|
|
7972
7624
|
] });
|
|
7973
7625
|
};
|
|
7626
|
+
const input = "fb-input_RJ7IM";
|
|
7627
|
+
const styles$j = {
|
|
7628
|
+
input
|
|
7629
|
+
};
|
|
7630
|
+
const Input = React.forwardRef(
|
|
7631
|
+
({ className, type, ...props }, ref) => {
|
|
7632
|
+
return /* @__PURE__ */ jsx(
|
|
7633
|
+
"input",
|
|
7634
|
+
{
|
|
7635
|
+
type,
|
|
7636
|
+
className: clsx$g(styles$j.input, className),
|
|
7637
|
+
ref,
|
|
7638
|
+
...props
|
|
7639
|
+
}
|
|
7640
|
+
);
|
|
7641
|
+
}
|
|
7642
|
+
);
|
|
7643
|
+
Input.displayName = "Input";
|
|
7974
7644
|
function useProgressAnimation(targetProgress, duration, onUpdate, isActive = true) {
|
|
7975
7645
|
const stateRef = useRef({
|
|
7976
7646
|
displayProgress: 0,
|
|
@@ -8029,7 +7699,7 @@ const completionMessage = "fb-completionMessage_OyQ9C";
|
|
|
8029
7699
|
const errorMessage = "fb-errorMessage_B8dGO";
|
|
8030
7700
|
const errorContent = "fb-errorContent_2TAc5";
|
|
8031
7701
|
const retryButton = "fb-retryButton_0HfjY";
|
|
8032
|
-
const styles$
|
|
7702
|
+
const styles$i = {
|
|
8033
7703
|
wrapper,
|
|
8034
7704
|
progress,
|
|
8035
7705
|
progressLabel,
|
|
@@ -8097,7 +7767,7 @@ const ProgressLoaderBar = React.forwardRef(
|
|
|
8097
7767
|
return /* @__PURE__ */ jsxs(
|
|
8098
7768
|
"div",
|
|
8099
7769
|
{
|
|
8100
|
-
className: clsx$g(styles$
|
|
7770
|
+
className: clsx$g(styles$i.wrapper, className),
|
|
8101
7771
|
role: "progressbar",
|
|
8102
7772
|
"aria-label": props["aria-label"] || label || "Progress",
|
|
8103
7773
|
"aria-valuenow": mode === "determinate" ? roundedProgress : void 0,
|
|
@@ -8110,7 +7780,7 @@ const ProgressLoaderBar = React.forwardRef(
|
|
|
8110
7780
|
"progress",
|
|
8111
7781
|
{
|
|
8112
7782
|
ref,
|
|
8113
|
-
className: styles$
|
|
7783
|
+
className: styles$i.progress,
|
|
8114
7784
|
value: displayProgress,
|
|
8115
7785
|
max: 100,
|
|
8116
7786
|
style: {
|
|
@@ -8118,17 +7788,17 @@ const ProgressLoaderBar = React.forwardRef(
|
|
|
8118
7788
|
}
|
|
8119
7789
|
}
|
|
8120
7790
|
),
|
|
8121
|
-
(label || showPercentage) && /* @__PURE__ */ jsxs("label", { className: styles$
|
|
7791
|
+
(label || showPercentage) && /* @__PURE__ */ jsxs("label", { className: styles$i.progressLabel, children: [
|
|
8122
7792
|
label,
|
|
8123
7793
|
label && showPercentage && mode === "determinate" && " - ",
|
|
8124
7794
|
showPercentage && mode === "determinate" && `${roundedProgress}%`
|
|
8125
7795
|
] }),
|
|
8126
|
-
status === "complete" && completionConfig?.showMessage?.enabled && /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7796
|
+
status === "complete" && completionConfig?.showMessage?.enabled && /* @__PURE__ */ jsxs("div", { className: styles$i.completionMessage, children: [
|
|
8127
7797
|
/* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" }),
|
|
8128
7798
|
/* @__PURE__ */ jsx("span", { children: completionConfig.showMessage.text })
|
|
8129
7799
|
] }),
|
|
8130
|
-
status === "error" && errorConfig?.showErrorMessage && /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8131
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7800
|
+
status === "error" && errorConfig?.showErrorMessage && /* @__PURE__ */ jsxs("div", { className: styles$i.errorMessage, children: [
|
|
7801
|
+
/* @__PURE__ */ jsxs("div", { className: styles$i.errorContent, children: [
|
|
8132
7802
|
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
8133
7803
|
/* @__PURE__ */ jsx("span", { children: errorConfig.errorText })
|
|
8134
7804
|
] }),
|
|
@@ -8137,7 +7807,7 @@ const ProgressLoaderBar = React.forwardRef(
|
|
|
8137
7807
|
{
|
|
8138
7808
|
type: "button",
|
|
8139
7809
|
onClick: onRetry,
|
|
8140
|
-
className: styles$
|
|
7810
|
+
className: styles$i.retryButton,
|
|
8141
7811
|
children: [
|
|
8142
7812
|
/* @__PURE__ */ jsx(RefreshCw, { className: "h-3 w-3" }),
|
|
8143
7813
|
errorConfig.retryButtonText
|
|
@@ -8151,6 +7821,166 @@ const ProgressLoaderBar = React.forwardRef(
|
|
|
8151
7821
|
}
|
|
8152
7822
|
);
|
|
8153
7823
|
ProgressLoaderBar.displayName = "ProgressLoaderBar";
|
|
7824
|
+
const radioGroup = "fb-radioGroup_PqpPn";
|
|
7825
|
+
const radioGroupItem = "fb-radioGroupItem_r91M1";
|
|
7826
|
+
const radioIndicator = "fb-radioIndicator_PFyGX";
|
|
7827
|
+
const radioIndicatorIcon = "fb-radioIndicatorIcon_vSsbY";
|
|
7828
|
+
const styles$h = {
|
|
7829
|
+
radioGroup,
|
|
7830
|
+
radioGroupItem,
|
|
7831
|
+
radioIndicator,
|
|
7832
|
+
radioIndicatorIcon
|
|
7833
|
+
};
|
|
7834
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
7835
|
+
return /* @__PURE__ */ jsx(
|
|
7836
|
+
RadioGroupPrimitive.Root,
|
|
7837
|
+
{
|
|
7838
|
+
className: clsx$g(styles$h.radioGroup, className),
|
|
7839
|
+
...props,
|
|
7840
|
+
ref
|
|
7841
|
+
}
|
|
7842
|
+
);
|
|
7843
|
+
});
|
|
7844
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
7845
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
7846
|
+
return /* @__PURE__ */ jsx(
|
|
7847
|
+
RadioGroupPrimitive.Item,
|
|
7848
|
+
{
|
|
7849
|
+
ref,
|
|
7850
|
+
className: clsx$g(styles$h.radioGroupItem, className),
|
|
7851
|
+
...props,
|
|
7852
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: styles$h.radioIndicator, children: /* @__PURE__ */ jsx(Circle, { className: styles$h.radioIndicatorIcon }) })
|
|
7853
|
+
}
|
|
7854
|
+
);
|
|
7855
|
+
});
|
|
7856
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
7857
|
+
const selectTrigger = "fb-selectTrigger_dj84x";
|
|
7858
|
+
const selectTriggerIcon = "fb-selectTriggerIcon_V8dav";
|
|
7859
|
+
const selectScrollUpButton = "fb-selectScrollUpButton_c6WZR";
|
|
7860
|
+
const selectScrollDownButton = "fb-selectScrollDownButton_kmWY4";
|
|
7861
|
+
const selectScrollIcon = "fb-selectScrollIcon_IZbZG";
|
|
7862
|
+
const selectContent = "fb-selectContent_uJ-ZX";
|
|
7863
|
+
const popper = "fb-popper_uKkq9";
|
|
7864
|
+
const selectViewport = "fb-selectViewport_wcTaR";
|
|
7865
|
+
const selectLabel = "fb-selectLabel_hb7ig";
|
|
7866
|
+
const selectItem = "fb-selectItem_f23oZ";
|
|
7867
|
+
const selectItemIndicator = "fb-selectItemIndicator_PD-WQ";
|
|
7868
|
+
const selectItemIndicatorIcon = "fb-selectItemIndicatorIcon_kgB1I";
|
|
7869
|
+
const selectSeparator = "fb-selectSeparator_DS7X2";
|
|
7870
|
+
const styles$g = {
|
|
7871
|
+
selectTrigger,
|
|
7872
|
+
selectTriggerIcon,
|
|
7873
|
+
selectScrollUpButton,
|
|
7874
|
+
selectScrollDownButton,
|
|
7875
|
+
selectScrollIcon,
|
|
7876
|
+
selectContent,
|
|
7877
|
+
popper,
|
|
7878
|
+
selectViewport,
|
|
7879
|
+
selectLabel,
|
|
7880
|
+
selectItem,
|
|
7881
|
+
selectItemIndicator,
|
|
7882
|
+
selectItemIndicatorIcon,
|
|
7883
|
+
selectSeparator
|
|
7884
|
+
};
|
|
7885
|
+
const Select = SelectPrimitive.Root;
|
|
7886
|
+
const SelectValue = SelectPrimitive.Value;
|
|
7887
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7888
|
+
SelectPrimitive.Trigger,
|
|
7889
|
+
{
|
|
7890
|
+
ref,
|
|
7891
|
+
className: clsx$g(styles$g.selectTrigger, className),
|
|
7892
|
+
...props,
|
|
7893
|
+
children: [
|
|
7894
|
+
children,
|
|
7895
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: styles$g.selectTriggerIcon }) })
|
|
7896
|
+
]
|
|
7897
|
+
}
|
|
7898
|
+
));
|
|
7899
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
7900
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7901
|
+
SelectPrimitive.ScrollUpButton,
|
|
7902
|
+
{
|
|
7903
|
+
ref,
|
|
7904
|
+
className: clsx$g(styles$g.selectScrollUpButton, className),
|
|
7905
|
+
...props,
|
|
7906
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: styles$g.selectScrollIcon })
|
|
7907
|
+
}
|
|
7908
|
+
));
|
|
7909
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
7910
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7911
|
+
SelectPrimitive.ScrollDownButton,
|
|
7912
|
+
{
|
|
7913
|
+
ref,
|
|
7914
|
+
className: clsx$g(styles$g.selectScrollDownButton, className),
|
|
7915
|
+
...props,
|
|
7916
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: styles$g.selectScrollIcon })
|
|
7917
|
+
}
|
|
7918
|
+
));
|
|
7919
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
7920
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
7921
|
+
SelectPrimitive.Content,
|
|
7922
|
+
{
|
|
7923
|
+
ref,
|
|
7924
|
+
className: clsx$g(
|
|
7925
|
+
styles$g.selectContent,
|
|
7926
|
+
position === "popper" && styles$g.popper,
|
|
7927
|
+
className
|
|
7928
|
+
),
|
|
7929
|
+
position,
|
|
7930
|
+
avoidCollisions: true,
|
|
7931
|
+
collisionPadding: 10,
|
|
7932
|
+
sideOffset: 5,
|
|
7933
|
+
alignOffset: 0,
|
|
7934
|
+
hideWhenDetached: false,
|
|
7935
|
+
...props,
|
|
7936
|
+
children: [
|
|
7937
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
7938
|
+
/* @__PURE__ */ jsx(
|
|
7939
|
+
SelectPrimitive.Viewport,
|
|
7940
|
+
{
|
|
7941
|
+
className: clsx$g(
|
|
7942
|
+
styles$g.selectViewport,
|
|
7943
|
+
position === "popper" && styles$g.popper
|
|
7944
|
+
),
|
|
7945
|
+
children
|
|
7946
|
+
}
|
|
7947
|
+
),
|
|
7948
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
7949
|
+
]
|
|
7950
|
+
}
|
|
7951
|
+
) }));
|
|
7952
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
7953
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7954
|
+
SelectPrimitive.Label,
|
|
7955
|
+
{
|
|
7956
|
+
ref,
|
|
7957
|
+
className: clsx$g(styles$g.selectLabel, className),
|
|
7958
|
+
...props
|
|
7959
|
+
}
|
|
7960
|
+
));
|
|
7961
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7962
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7963
|
+
SelectPrimitive.Item,
|
|
7964
|
+
{
|
|
7965
|
+
ref,
|
|
7966
|
+
className: clsx$g(styles$g.selectItem, className),
|
|
7967
|
+
...props,
|
|
7968
|
+
children: [
|
|
7969
|
+
/* @__PURE__ */ jsx("span", { className: styles$g.selectItemIndicator, children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check$1, { className: styles$g.selectItemIndicatorIcon }) }) }),
|
|
7970
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
7971
|
+
]
|
|
7972
|
+
}
|
|
7973
|
+
));
|
|
7974
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7975
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7976
|
+
SelectPrimitive.Separator,
|
|
7977
|
+
{
|
|
7978
|
+
ref,
|
|
7979
|
+
className: clsx$g(styles$g.selectSeparator, className),
|
|
7980
|
+
...props
|
|
7981
|
+
}
|
|
7982
|
+
));
|
|
7983
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
8154
7984
|
const sheetOverlay = "fb-sheetOverlay_2nFRz";
|
|
8155
7985
|
const sheetOverlayFadeIn = "fb-sheetOverlayFadeIn_AS-42";
|
|
8156
7986
|
const sheetOverlayFadeOut = "fb-sheetOverlayFadeOut_Y-hE4";
|
|
@@ -8169,7 +7999,7 @@ const sheetHeader = "fb-sheetHeader_w9TtP";
|
|
|
8169
7999
|
const sheetFooter = "fb-sheetFooter_XN1p0";
|
|
8170
8000
|
const sheetTitle = "fb-sheetTitle_F6nNH";
|
|
8171
8001
|
const sheetDescription = "fb-sheetDescription_AzWJb";
|
|
8172
|
-
const styles$
|
|
8002
|
+
const styles$f = {
|
|
8173
8003
|
sheetOverlay,
|
|
8174
8004
|
sheetOverlayFadeIn,
|
|
8175
8005
|
sheetOverlayFadeOut,
|
|
@@ -8198,7 +8028,7 @@ const SheetPortal = DialogPrimitive.Portal;
|
|
|
8198
8028
|
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8199
8029
|
DialogPrimitive.Overlay,
|
|
8200
8030
|
{
|
|
8201
|
-
className: clsx$g(styles$
|
|
8031
|
+
className: clsx$g(styles$f.sheetOverlay, className),
|
|
8202
8032
|
...props,
|
|
8203
8033
|
ref
|
|
8204
8034
|
}
|
|
@@ -8211,15 +8041,15 @@ const SheetContent = React.forwardRef(({ side = "right", className, children, ..
|
|
|
8211
8041
|
{
|
|
8212
8042
|
ref,
|
|
8213
8043
|
className: clsx$g(
|
|
8214
|
-
styles$
|
|
8215
|
-
styles$
|
|
8044
|
+
styles$f.sheetContent,
|
|
8045
|
+
styles$f[`side-${side}`],
|
|
8216
8046
|
className
|
|
8217
8047
|
),
|
|
8218
8048
|
...props,
|
|
8219
8049
|
children: [
|
|
8220
8050
|
children,
|
|
8221
|
-
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: styles$
|
|
8222
|
-
/* @__PURE__ */ jsx(X, { className: styles$
|
|
8051
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: styles$f.sheetClose, children: [
|
|
8052
|
+
/* @__PURE__ */ jsx(X, { className: styles$f.sheetCloseIcon }),
|
|
8223
8053
|
/* @__PURE__ */ jsx("span", { children: "Close" })
|
|
8224
8054
|
] })
|
|
8225
8055
|
]
|
|
@@ -8230,13 +8060,13 @@ SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
|
8230
8060
|
const SheetHeader = ({
|
|
8231
8061
|
className,
|
|
8232
8062
|
...props
|
|
8233
|
-
}) => /* @__PURE__ */ jsx("div", { className: clsx$g(styles$
|
|
8063
|
+
}) => /* @__PURE__ */ jsx("div", { className: clsx$g(styles$f.sheetHeader, className), ...props });
|
|
8234
8064
|
SheetHeader.displayName = "SheetHeader";
|
|
8235
8065
|
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8236
8066
|
DialogPrimitive.Title,
|
|
8237
8067
|
{
|
|
8238
8068
|
ref,
|
|
8239
|
-
className: clsx$g(styles$
|
|
8069
|
+
className: clsx$g(styles$f.sheetTitle, className),
|
|
8240
8070
|
...props
|
|
8241
8071
|
}
|
|
8242
8072
|
));
|
|
@@ -8245,11 +8075,28 @@ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
8245
8075
|
DialogPrimitive.Description,
|
|
8246
8076
|
{
|
|
8247
8077
|
ref,
|
|
8248
|
-
className: clsx$g(styles$
|
|
8078
|
+
className: clsx$g(styles$f.sheetDescription, className),
|
|
8249
8079
|
...props
|
|
8250
8080
|
}
|
|
8251
8081
|
));
|
|
8252
8082
|
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
8083
|
+
const textarea = "fb-textarea_p4K5i";
|
|
8084
|
+
const styles$e = {
|
|
8085
|
+
textarea
|
|
8086
|
+
};
|
|
8087
|
+
const Textarea = React.forwardRef(
|
|
8088
|
+
({ className, ...props }, ref) => {
|
|
8089
|
+
return /* @__PURE__ */ jsx(
|
|
8090
|
+
"textarea",
|
|
8091
|
+
{
|
|
8092
|
+
className: clsx$g(styles$e.textarea, className),
|
|
8093
|
+
ref,
|
|
8094
|
+
...props
|
|
8095
|
+
}
|
|
8096
|
+
);
|
|
8097
|
+
}
|
|
8098
|
+
);
|
|
8099
|
+
Textarea.displayName = "Textarea";
|
|
8253
8100
|
const vcContainer = "fb-vcContainer_oHl8H";
|
|
8254
8101
|
const vcInput = "fb-vcInput_Nb8NL";
|
|
8255
8102
|
const vcGroup = "fb-vcGroup_5z3tY";
|
|
@@ -8327,33 +8174,33 @@ const ValidationCode = React.forwardRef(
|
|
|
8327
8174
|
[]
|
|
8328
8175
|
);
|
|
8329
8176
|
React.useEffect(() => {
|
|
8330
|
-
const
|
|
8177
|
+
const input2 = inputRef.current;
|
|
8331
8178
|
const container2 = containerRef.current;
|
|
8332
|
-
if (!
|
|
8179
|
+
if (!input2 || !container2 && input2 == null) {
|
|
8333
8180
|
return;
|
|
8334
8181
|
}
|
|
8335
|
-
if (initialLoadRef.current.value !==
|
|
8336
|
-
initialLoadRef.current.onChange(
|
|
8182
|
+
if (initialLoadRef.current.value !== input2.value) {
|
|
8183
|
+
initialLoadRef.current.onChange(input2.value);
|
|
8337
8184
|
}
|
|
8338
8185
|
inputMetadataRef.current.prev = [
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8186
|
+
input2.selectionStart,
|
|
8187
|
+
input2.selectionEnd,
|
|
8188
|
+
input2.selectionDirection
|
|
8342
8189
|
];
|
|
8343
8190
|
function onDocumentSelectionChange() {
|
|
8344
|
-
if (document.activeElement !==
|
|
8191
|
+
if (document.activeElement !== input2) {
|
|
8345
8192
|
setMirrorSelectionStart(null);
|
|
8346
8193
|
setMirrorSelectionEnd(null);
|
|
8347
8194
|
return;
|
|
8348
8195
|
}
|
|
8349
|
-
if (!
|
|
8196
|
+
if (!input2) {
|
|
8350
8197
|
return;
|
|
8351
8198
|
}
|
|
8352
|
-
const _s =
|
|
8353
|
-
const _e =
|
|
8354
|
-
const _dir =
|
|
8355
|
-
const _ml =
|
|
8356
|
-
const _val =
|
|
8199
|
+
const _s = input2.selectionStart;
|
|
8200
|
+
const _e = input2.selectionEnd;
|
|
8201
|
+
const _dir = input2.selectionDirection;
|
|
8202
|
+
const _ml = input2.maxLength;
|
|
8203
|
+
const _val = input2.value;
|
|
8357
8204
|
const _prev = inputMetadataRef.current.prev;
|
|
8358
8205
|
let start = -1;
|
|
8359
8206
|
let end = -1;
|
|
@@ -8443,8 +8290,8 @@ const ValidationCode = React.forwardRef(
|
|
|
8443
8290
|
}, [maxLength]);
|
|
8444
8291
|
const _pasteListener = React.useCallback(
|
|
8445
8292
|
(e) => {
|
|
8446
|
-
const
|
|
8447
|
-
if (!initialLoadRef.current.isIOS || !e.clipboardData || !
|
|
8293
|
+
const input2 = inputRef.current;
|
|
8294
|
+
if (!initialLoadRef.current.isIOS || !e.clipboardData || !input2) {
|
|
8448
8295
|
return;
|
|
8449
8296
|
}
|
|
8450
8297
|
const content2 = e.clipboardData.getData("text/plain");
|
|
@@ -8457,11 +8304,11 @@ const ValidationCode = React.forwardRef(
|
|
|
8457
8304
|
if (newValue.length > 0 && regexp && !regexp.test(newValue)) {
|
|
8458
8305
|
return;
|
|
8459
8306
|
}
|
|
8460
|
-
|
|
8307
|
+
input2.value = newValue;
|
|
8461
8308
|
onChange(newValue);
|
|
8462
8309
|
const _start = Math.min(newValue.length, maxLength - 1);
|
|
8463
8310
|
const _end = newValue.length;
|
|
8464
|
-
|
|
8311
|
+
input2.setSelectionRange(_start, _end);
|
|
8465
8312
|
setMirrorSelectionStart(_start);
|
|
8466
8313
|
setMirrorSelectionEnd(_end);
|
|
8467
8314
|
},
|
|
@@ -8574,89 +8421,456 @@ const DEFAULT_VALUES = {
|
|
|
8574
8421
|
const getDefaultValue = (componentType) => {
|
|
8575
8422
|
return DEFAULT_VALUES[componentType] ?? "";
|
|
8576
8423
|
};
|
|
8577
|
-
function resolveTemplateDialog(actionConfig) {
|
|
8578
|
-
if (actionConfig.template?.typeId === "verify-dialog") {
|
|
8579
|
-
const templateConfig = actionConfig.template.config;
|
|
8580
|
-
return {
|
|
8581
|
-
title: templateConfig.title,
|
|
8582
|
-
content: templateConfig.description,
|
|
8583
|
-
type: "modal",
|
|
8584
|
-
buttons: [
|
|
8585
|
-
{
|
|
8586
|
-
id: "cancel-btn",
|
|
8587
|
-
label: templateConfig.cancelButtonLabel,
|
|
8588
|
-
variant: "secondary",
|
|
8589
|
-
action: templateConfig.onCancelAction || { type: "close" }
|
|
8590
|
-
},
|
|
8591
|
-
{
|
|
8592
|
-
id: "verify-btn",
|
|
8593
|
-
label: templateConfig.verifyButtonLabel,
|
|
8594
|
-
variant: "primary",
|
|
8595
|
-
action: { type: "custom", handler: "verifyEmail" }
|
|
8596
|
-
}
|
|
8597
|
-
],
|
|
8598
|
-
dismissible: true,
|
|
8599
|
-
// Add template metadata for runtime behavior
|
|
8600
|
-
templateMetadata: {
|
|
8601
|
-
typeId: "verify-dialog",
|
|
8602
|
-
codeLength: templateConfig.codeLength,
|
|
8603
|
-
codeType: templateConfig.codeType,
|
|
8604
|
-
enableAutoSubmit: templateConfig.enableAutoSubmit,
|
|
8605
|
-
enableResend: templateConfig.enableResend,
|
|
8606
|
-
resendTimer: templateConfig.resendTimer,
|
|
8607
|
-
successTitle: templateConfig.successTitle,
|
|
8608
|
-
successMessage: templateConfig.successMessage,
|
|
8609
|
-
errorMessage: templateConfig.errorMessage,
|
|
8610
|
-
continueButtonLabel: templateConfig.continueButtonLabel,
|
|
8611
|
-
// Store configurable action for verification success
|
|
8612
|
-
onVerifiedAction: templateConfig.onVerifiedAction || {
|
|
8613
|
-
type: "navigate",
|
|
8614
|
-
direction: "next"
|
|
8615
|
-
}
|
|
8616
|
-
}
|
|
8617
|
-
};
|
|
8424
|
+
function resolveTemplateDialog(actionConfig) {
|
|
8425
|
+
if (actionConfig.template?.typeId === "verify-dialog") {
|
|
8426
|
+
const templateConfig = actionConfig.template.config;
|
|
8427
|
+
return {
|
|
8428
|
+
title: templateConfig.title,
|
|
8429
|
+
content: templateConfig.description,
|
|
8430
|
+
type: "modal",
|
|
8431
|
+
buttons: [
|
|
8432
|
+
{
|
|
8433
|
+
id: "cancel-btn",
|
|
8434
|
+
label: templateConfig.cancelButtonLabel,
|
|
8435
|
+
variant: "secondary",
|
|
8436
|
+
action: templateConfig.onCancelAction || { type: "close" }
|
|
8437
|
+
},
|
|
8438
|
+
{
|
|
8439
|
+
id: "verify-btn",
|
|
8440
|
+
label: templateConfig.verifyButtonLabel,
|
|
8441
|
+
variant: "primary",
|
|
8442
|
+
action: { type: "custom", handler: "verifyEmail" }
|
|
8443
|
+
}
|
|
8444
|
+
],
|
|
8445
|
+
dismissible: true,
|
|
8446
|
+
// Add template metadata for runtime behavior
|
|
8447
|
+
templateMetadata: {
|
|
8448
|
+
typeId: "verify-dialog",
|
|
8449
|
+
codeLength: templateConfig.codeLength,
|
|
8450
|
+
codeType: templateConfig.codeType,
|
|
8451
|
+
enableAutoSubmit: templateConfig.enableAutoSubmit,
|
|
8452
|
+
enableResend: templateConfig.enableResend,
|
|
8453
|
+
resendTimer: templateConfig.resendTimer,
|
|
8454
|
+
successTitle: templateConfig.successTitle,
|
|
8455
|
+
successMessage: templateConfig.successMessage,
|
|
8456
|
+
errorMessage: templateConfig.errorMessage,
|
|
8457
|
+
continueButtonLabel: templateConfig.continueButtonLabel,
|
|
8458
|
+
// Store configurable action for verification success
|
|
8459
|
+
onVerifiedAction: templateConfig.onVerifiedAction || {
|
|
8460
|
+
type: "navigate",
|
|
8461
|
+
direction: "next"
|
|
8462
|
+
}
|
|
8463
|
+
}
|
|
8464
|
+
};
|
|
8465
|
+
}
|
|
8466
|
+
if (actionConfig.template?.typeId === "confirmation-dialog") {
|
|
8467
|
+
const templateConfig = actionConfig.template.config;
|
|
8468
|
+
return {
|
|
8469
|
+
title: templateConfig.title,
|
|
8470
|
+
content: templateConfig.content,
|
|
8471
|
+
type: "modal",
|
|
8472
|
+
buttons: [
|
|
8473
|
+
{
|
|
8474
|
+
id: "cancel-btn",
|
|
8475
|
+
label: templateConfig.cancelButtonLabel,
|
|
8476
|
+
variant: "secondary",
|
|
8477
|
+
action: templateConfig.onCancelAction || { type: "close" }
|
|
8478
|
+
},
|
|
8479
|
+
{
|
|
8480
|
+
id: "confirm-btn",
|
|
8481
|
+
label: templateConfig.confirmButtonLabel,
|
|
8482
|
+
variant: templateConfig.confirmButtonVariant || "primary",
|
|
8483
|
+
action: templateConfig.onConfirmAction || {
|
|
8484
|
+
type: "navigate",
|
|
8485
|
+
direction: "next"
|
|
8486
|
+
}
|
|
8487
|
+
}
|
|
8488
|
+
],
|
|
8489
|
+
dismissible: true,
|
|
8490
|
+
// Add template metadata for runtime behavior
|
|
8491
|
+
templateMetadata: {
|
|
8492
|
+
typeId: "confirmation-dialog",
|
|
8493
|
+
showIcon: templateConfig.showIcon,
|
|
8494
|
+
iconType: templateConfig.iconType
|
|
8495
|
+
}
|
|
8496
|
+
};
|
|
8497
|
+
}
|
|
8498
|
+
if (actionConfig.templateTypeId === "verify-dialog" && actionConfig.templateConfig) {
|
|
8499
|
+
return resolveTemplateDialog({
|
|
8500
|
+
template: {
|
|
8501
|
+
typeId: actionConfig.templateTypeId,
|
|
8502
|
+
config: actionConfig.templateConfig
|
|
8503
|
+
}
|
|
8504
|
+
});
|
|
8505
|
+
}
|
|
8506
|
+
return actionConfig;
|
|
8507
|
+
}
|
|
8508
|
+
const TYPE_COMPATIBILITY = {
|
|
8509
|
+
string: ["text", "email", "tel", "password", "textarea", "select"],
|
|
8510
|
+
number: ["number", "range"],
|
|
8511
|
+
boolean: ["checkbox", "radio"],
|
|
8512
|
+
array: ["select", "checkbox-group", "radio-group"],
|
|
8513
|
+
object: [],
|
|
8514
|
+
null: []
|
|
8515
|
+
};
|
|
8516
|
+
const FormComponentSchema = z.object({
|
|
8517
|
+
id: z.string(),
|
|
8518
|
+
type: z.string(),
|
|
8519
|
+
label: z.string().optional(),
|
|
8520
|
+
required: z.boolean().optional(),
|
|
8521
|
+
validation: z.record(z.unknown()).optional(),
|
|
8522
|
+
triggers: z.array(
|
|
8523
|
+
z.object({
|
|
8524
|
+
type: z.string(),
|
|
8525
|
+
condition: z.unknown().optional(),
|
|
8526
|
+
actions: z.array(
|
|
8527
|
+
z.object({
|
|
8528
|
+
type: z.string(),
|
|
8529
|
+
config: z.unknown().optional()
|
|
8530
|
+
})
|
|
8531
|
+
)
|
|
8532
|
+
})
|
|
8533
|
+
).optional()
|
|
8534
|
+
}).passthrough();
|
|
8535
|
+
const FormSectionSchema = z.object({
|
|
8536
|
+
id: z.string(),
|
|
8537
|
+
title: z.string().optional(),
|
|
8538
|
+
mode: z.enum(["readOnly", "editable", "default", "isEditable"]).optional(),
|
|
8539
|
+
components: z.array(FormComponentSchema),
|
|
8540
|
+
showTitle: z.boolean().optional(),
|
|
8541
|
+
showActionLink: z.boolean().optional(),
|
|
8542
|
+
editText: z.string().optional(),
|
|
8543
|
+
cancelText: z.string().optional(),
|
|
8544
|
+
saveText: z.string().optional(),
|
|
8545
|
+
// biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
|
|
8546
|
+
genericTriggerActions: z.any().optional(),
|
|
8547
|
+
visibilityConditions: z.unknown().optional(),
|
|
8548
|
+
triggerContexts: z.object({
|
|
8549
|
+
supportsSectionSave: z.boolean(),
|
|
8550
|
+
showSaveButton: z.boolean(),
|
|
8551
|
+
autoSaveOnNavigate: z.boolean()
|
|
8552
|
+
}).optional(),
|
|
8553
|
+
fieldValidation: z.unknown().optional()
|
|
8554
|
+
// Complex nested structure, validate at runtime
|
|
8555
|
+
}).passthrough();
|
|
8556
|
+
const StepNavigationSchema = z.object({
|
|
8557
|
+
next: z.object({
|
|
8558
|
+
label: z.string(),
|
|
8559
|
+
enabled: z.boolean()
|
|
8560
|
+
}),
|
|
8561
|
+
previous: z.object({
|
|
8562
|
+
label: z.string(),
|
|
8563
|
+
enabled: z.boolean()
|
|
8564
|
+
})
|
|
8565
|
+
});
|
|
8566
|
+
const StepLoaderConfigSchema = z.object({
|
|
8567
|
+
label: z.string().optional(),
|
|
8568
|
+
showPercentage: z.boolean().optional(),
|
|
8569
|
+
duration: z.number().optional(),
|
|
8570
|
+
size: z.enum(["sm", "md", "lg"]).optional(),
|
|
8571
|
+
variant: z.enum(["default", "minimal", "branded", "striped"]).optional(),
|
|
8572
|
+
animationSpeed: z.enum(["slow", "normal", "fast"]).optional(),
|
|
8573
|
+
completionMessage: z.string().optional(),
|
|
8574
|
+
apiEndpoint: z.object({
|
|
8575
|
+
endpoint: z.string(),
|
|
8576
|
+
method: z.enum(["GET", "POST", "PUT", "DELETE"]).optional(),
|
|
8577
|
+
successStatus: z.union([z.number(), z.array(z.number())]).optional()
|
|
8578
|
+
}).optional()
|
|
8579
|
+
}).optional();
|
|
8580
|
+
const FormStepSchema = z.object({
|
|
8581
|
+
id: z.string(),
|
|
8582
|
+
title: z.string(),
|
|
8583
|
+
displayTitle: z.boolean().optional(),
|
|
8584
|
+
showStepNumber: z.boolean().optional(),
|
|
8585
|
+
sections: z.array(FormSectionSchema).optional(),
|
|
8586
|
+
navigation: StepNavigationSchema,
|
|
8587
|
+
actions: z.array(z.unknown()).optional(),
|
|
8588
|
+
// biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
|
|
8589
|
+
genericTriggerActions: z.any().optional(),
|
|
8590
|
+
waitForLoader: z.boolean().optional(),
|
|
8591
|
+
loaderConfig: StepLoaderConfigSchema
|
|
8592
|
+
}).passthrough();
|
|
8593
|
+
const TemplateStepSchema = z.object({
|
|
8594
|
+
id: z.string(),
|
|
8595
|
+
templateId: z.string(),
|
|
8596
|
+
navigation: StepNavigationSchema.partial().optional(),
|
|
8597
|
+
readonly: z.boolean().optional(),
|
|
8598
|
+
title: z.string().optional(),
|
|
8599
|
+
stepIndex: z.number().optional(),
|
|
8600
|
+
componentOverrides: z.record(z.unknown()).optional(),
|
|
8601
|
+
sectionOverrides: z.record(z.unknown()).optional(),
|
|
8602
|
+
showStepNumber: z.boolean().optional(),
|
|
8603
|
+
actions: z.array(z.unknown()).optional()
|
|
8604
|
+
}).passthrough();
|
|
8605
|
+
const FormWizardConfigSchema = z.object({
|
|
8606
|
+
schemaVersion: z.number().optional(),
|
|
8607
|
+
// Version tracking for lazy migration
|
|
8608
|
+
id: z.string(),
|
|
8609
|
+
title: z.string(),
|
|
8610
|
+
description: z.string().optional(),
|
|
8611
|
+
steps: z.array(z.union([FormStepSchema, TemplateStepSchema])),
|
|
8612
|
+
validationMessageStyle: z.enum(["withLabel", "simple"]).optional(),
|
|
8613
|
+
// biome-ignore lint/suspicious/noExplicitAny: preserves backward compat (was `any` in hand-written interface)
|
|
8614
|
+
genericTriggerActions: z.any().optional()
|
|
8615
|
+
}).passthrough();
|
|
8616
|
+
function validateFormConfig(data) {
|
|
8617
|
+
return FormWizardConfigSchema.safeParse(data);
|
|
8618
|
+
}
|
|
8619
|
+
function getSchemaVersion(config) {
|
|
8620
|
+
return config?.["schemaVersion"] ?? 1;
|
|
8621
|
+
}
|
|
8622
|
+
const TemplateStorageConfigSchema = z.object({
|
|
8623
|
+
team: z.string()
|
|
8624
|
+
});
|
|
8625
|
+
const StoragePathsSchema = z.object({
|
|
8626
|
+
primaryStorage: z.string(),
|
|
8627
|
+
fallbackPaths: z.array(z.string()).optional(),
|
|
8628
|
+
staticAssets: z.string().optional(),
|
|
8629
|
+
templates: z.union([z.string(), TemplateStorageConfigSchema]).optional()
|
|
8630
|
+
});
|
|
8631
|
+
const BackupConfigSchema = z.object({
|
|
8632
|
+
enabled: z.boolean(),
|
|
8633
|
+
maxBackups: z.number().int().positive(),
|
|
8634
|
+
backupPath: z.string()
|
|
8635
|
+
});
|
|
8636
|
+
const StorageConfigSchema = z.object({
|
|
8637
|
+
strategy: z.enum(["filesystem", "memory", "database"]),
|
|
8638
|
+
paths: StoragePathsSchema,
|
|
8639
|
+
fileExtension: z.string(),
|
|
8640
|
+
createDirectories: z.boolean(),
|
|
8641
|
+
backup: BackupConfigSchema.optional()
|
|
8642
|
+
});
|
|
8643
|
+
const ValidationConfigSchema = z.object({
|
|
8644
|
+
strictMode: z.boolean(),
|
|
8645
|
+
validateOnLoad: z.boolean(),
|
|
8646
|
+
allowMigration: z.boolean()
|
|
8647
|
+
});
|
|
8648
|
+
const CompatibilitySchema = z.object({
|
|
8649
|
+
minVersion: z.string(),
|
|
8650
|
+
maxVersion: z.string()
|
|
8651
|
+
});
|
|
8652
|
+
const MetadataConfigSchema = z.object({
|
|
8653
|
+
version: z.string(),
|
|
8654
|
+
lastUpdated: z.string().datetime(),
|
|
8655
|
+
compatibility: CompatibilitySchema
|
|
8656
|
+
});
|
|
8657
|
+
const FeaturesConfigSchema = z.object({
|
|
8658
|
+
autoBackup: z.boolean(),
|
|
8659
|
+
formTemplates: z.boolean(),
|
|
8660
|
+
formVersioning: z.boolean(),
|
|
8661
|
+
formSharing: z.boolean()
|
|
8662
|
+
});
|
|
8663
|
+
const MigrationConfigSchema = z.object({
|
|
8664
|
+
enabled: z.boolean(),
|
|
8665
|
+
sourceDirectories: z.array(z.string()),
|
|
8666
|
+
preserveOriginals: z.boolean(),
|
|
8667
|
+
logMigration: z.boolean()
|
|
8668
|
+
});
|
|
8669
|
+
const FormConfigSchema = z.object({
|
|
8670
|
+
$schema: z.string().optional(),
|
|
8671
|
+
storage: StorageConfigSchema,
|
|
8672
|
+
validation: ValidationConfigSchema.optional(),
|
|
8673
|
+
metadata: MetadataConfigSchema.optional(),
|
|
8674
|
+
features: FeaturesConfigSchema.optional(),
|
|
8675
|
+
migration: MigrationConfigSchema.optional()
|
|
8676
|
+
});
|
|
8677
|
+
function isTemplateStep$1(step) {
|
|
8678
|
+
return typeof step === "object" && step !== null && "templateId" in step;
|
|
8679
|
+
}
|
|
8680
|
+
function getTemplateSteps(template) {
|
|
8681
|
+
return template.stepsData || [];
|
|
8682
|
+
}
|
|
8683
|
+
function isTemplateDialogConfig$1(config) {
|
|
8684
|
+
return config && typeof config.template === "object" && typeof config.template.typeId === "string";
|
|
8685
|
+
}
|
|
8686
|
+
function isLegacyDialogConfigWithTemplate(config) {
|
|
8687
|
+
return config && (config.templateTypeId || config.emailVerificationConfig);
|
|
8688
|
+
}
|
|
8689
|
+
const DEFAULT_VALIDATION_MESSAGES = {
|
|
8690
|
+
required: {
|
|
8691
|
+
withLabel: (label) => `${label} is verplicht`,
|
|
8692
|
+
simple: () => "Dit veld is verplicht"
|
|
8693
|
+
},
|
|
8694
|
+
minLength: {
|
|
8695
|
+
withLabel: (label, value) => `${label} moet minimaal ${value} tekens lang zijn`,
|
|
8696
|
+
simple: (value) => `Dit veld moet minimaal ${value} tekens lang zijn`
|
|
8697
|
+
},
|
|
8698
|
+
maxLength: {
|
|
8699
|
+
withLabel: (label, value) => `${label} moet maximaal ${value} tekens lang zijn`,
|
|
8700
|
+
simple: (value) => `Dit veld moet maximaal ${value} tekens lang zijn`
|
|
8701
|
+
},
|
|
8702
|
+
pattern: {
|
|
8703
|
+
withLabel: (label) => `${label} formaat is ongeldig`,
|
|
8704
|
+
simple: () => "Dit veld formaat is ongeldig"
|
|
8705
|
+
},
|
|
8706
|
+
email: {
|
|
8707
|
+
withLabel: (label) => `${label} moet een geldig e-mailadres zijn`,
|
|
8708
|
+
simple: () => "Dit veld moet een geldig e-mailadres zijn"
|
|
8709
|
+
},
|
|
8710
|
+
min: {
|
|
8711
|
+
withLabel: (label, value) => `${label} moet minimaal ${value} zijn`,
|
|
8712
|
+
simple: (value) => `Dit veld moet minimaal ${value} zijn`
|
|
8713
|
+
},
|
|
8714
|
+
max: {
|
|
8715
|
+
withLabel: (label, value) => `${label} moet maximaal ${value} zijn`,
|
|
8716
|
+
simple: (value) => `Dit veld moet maximaal ${value} zijn`
|
|
8717
|
+
},
|
|
8718
|
+
minItems: {
|
|
8719
|
+
withLabel: (label, value) => `${label} moet minimaal ${value} items hebben`,
|
|
8720
|
+
simple: (value) => `Dit veld moet minimaal ${value} items hebben`
|
|
8721
|
+
},
|
|
8722
|
+
maxItems: {
|
|
8723
|
+
withLabel: (label, value) => `${label} moet maximaal ${value} items hebben`,
|
|
8724
|
+
simple: (value) => `Dit veld moet maximaal ${value} items hebben`
|
|
8725
|
+
},
|
|
8726
|
+
url: {
|
|
8727
|
+
withLabel: (label) => `${label} moet een geldige URL zijn`,
|
|
8728
|
+
simple: () => "Dit veld moet een geldige URL zijn"
|
|
8729
|
+
},
|
|
8730
|
+
phone: {
|
|
8731
|
+
withLabel: (label) => `${label} moet een geldig telefoonnummer zijn`,
|
|
8732
|
+
simple: () => "Dit veld moet een geldig telefoonnummer zijn"
|
|
8733
|
+
}
|
|
8734
|
+
};
|
|
8735
|
+
const getValidationMessage = {
|
|
8736
|
+
// For components that need labeled messages (ValidationBuilder, etc.)
|
|
8737
|
+
withLabel: (type, label, ...args) => {
|
|
8738
|
+
const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
|
|
8739
|
+
return messageConfig.withLabel(label, ...args);
|
|
8740
|
+
},
|
|
8741
|
+
// For components that need simple messages (createZodSchema, etc.)
|
|
8742
|
+
simple: (type, ...args) => {
|
|
8743
|
+
const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
|
|
8744
|
+
return messageConfig.simple(...args);
|
|
8745
|
+
},
|
|
8746
|
+
// Dynamic message selection based on form configuration (defaults to withLabel)
|
|
8747
|
+
auto: (type, label, messageStyle = "withLabel", ...args) => {
|
|
8748
|
+
const messageConfig = DEFAULT_VALIDATION_MESSAGES[type];
|
|
8749
|
+
if (messageStyle === "simple") {
|
|
8750
|
+
return messageConfig.simple(...args);
|
|
8751
|
+
}
|
|
8752
|
+
return messageConfig.withLabel(label, ...args);
|
|
8753
|
+
}
|
|
8754
|
+
};
|
|
8755
|
+
function compileApiRequestBody(config, formData) {
|
|
8756
|
+
if (config.body) {
|
|
8757
|
+
if (typeof config.body === "string") {
|
|
8758
|
+
return interpolateTemplate(config.body, formData);
|
|
8759
|
+
} else if (typeof config.body === "object") {
|
|
8760
|
+
const interpolatedBody = interpolateObjectTemplate(config.body, formData);
|
|
8761
|
+
return JSON.stringify(interpolatedBody);
|
|
8762
|
+
}
|
|
8618
8763
|
}
|
|
8619
|
-
if (
|
|
8620
|
-
const
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
type
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
action: templateConfig.onCancelAction || { type: "close" }
|
|
8631
|
-
},
|
|
8632
|
-
{
|
|
8633
|
-
id: "confirm-btn",
|
|
8634
|
-
label: templateConfig.confirmButtonLabel,
|
|
8635
|
-
variant: templateConfig.confirmButtonVariant || "primary",
|
|
8636
|
-
action: templateConfig.onConfirmAction || {
|
|
8637
|
-
type: "navigate",
|
|
8638
|
-
direction: "next"
|
|
8639
|
-
}
|
|
8640
|
-
}
|
|
8641
|
-
],
|
|
8642
|
-
dismissible: true,
|
|
8643
|
-
// Add template metadata for runtime behavior
|
|
8644
|
-
templateMetadata: {
|
|
8645
|
-
typeId: "confirmation-dialog",
|
|
8646
|
-
showIcon: templateConfig.showIcon,
|
|
8647
|
-
iconType: templateConfig.iconType
|
|
8764
|
+
if (config.bodyFields) {
|
|
8765
|
+
const bodyObject = {};
|
|
8766
|
+
for (const field of config.bodyFields) {
|
|
8767
|
+
if (!field.key.trim()) continue;
|
|
8768
|
+
let value;
|
|
8769
|
+
if (field.type === "static") {
|
|
8770
|
+
value = field.value;
|
|
8771
|
+
} else if (field.type === "dynamic" && field.fieldPath) {
|
|
8772
|
+
value = getValueFromFormData(formData, field.fieldPath);
|
|
8773
|
+
} else {
|
|
8774
|
+
value = field.value;
|
|
8648
8775
|
}
|
|
8649
|
-
|
|
8776
|
+
setNestedValue(bodyObject, field.key, value);
|
|
8777
|
+
}
|
|
8778
|
+
return JSON.stringify(bodyObject);
|
|
8650
8779
|
}
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8780
|
+
return void 0;
|
|
8781
|
+
}
|
|
8782
|
+
function getValueFromFormData(formData, path) {
|
|
8783
|
+
return path.split(".").reduce((current2, key) => {
|
|
8784
|
+
return current2?.[key];
|
|
8785
|
+
}, formData);
|
|
8786
|
+
}
|
|
8787
|
+
function interpolateTemplate(template, formData) {
|
|
8788
|
+
let result = template.replace(/\$\{data\.([^}]+)\}/g, (match, fieldPath) => {
|
|
8789
|
+
const value = getValueFromFormData(formData, fieldPath);
|
|
8790
|
+
return value != null ? String(value) : match;
|
|
8791
|
+
});
|
|
8792
|
+
result = result.replace(/\$\{([^}]+)\}/g, (match, fieldPath) => {
|
|
8793
|
+
if (match.includes("data.")) return match;
|
|
8794
|
+
if (fieldPath.includes(".")) {
|
|
8795
|
+
const parts = fieldPath.split(".");
|
|
8796
|
+
const fieldName = parts[parts.length - 1];
|
|
8797
|
+
const value2 = formData[fieldName];
|
|
8798
|
+
return value2 != null ? String(value2) : match;
|
|
8799
|
+
}
|
|
8800
|
+
const value = getValueFromFormData(formData, fieldPath);
|
|
8801
|
+
return value != null ? String(value) : match;
|
|
8802
|
+
});
|
|
8803
|
+
return result;
|
|
8804
|
+
}
|
|
8805
|
+
function interpolateObjectTemplate(obj, formData) {
|
|
8806
|
+
const result = {};
|
|
8807
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
8808
|
+
if (typeof value === "string") {
|
|
8809
|
+
result[key] = interpolateTemplate(value, formData);
|
|
8810
|
+
} else if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
8811
|
+
result[key] = interpolateObjectTemplate(
|
|
8812
|
+
value,
|
|
8813
|
+
formData
|
|
8814
|
+
);
|
|
8815
|
+
} else if (Array.isArray(value)) {
|
|
8816
|
+
result[key] = value.map(
|
|
8817
|
+
(item) => typeof item === "string" ? interpolateTemplate(item, formData) : item && typeof item === "object" ? interpolateObjectTemplate(
|
|
8818
|
+
item,
|
|
8819
|
+
formData
|
|
8820
|
+
) : item
|
|
8821
|
+
);
|
|
8822
|
+
} else {
|
|
8823
|
+
result[key] = value;
|
|
8824
|
+
}
|
|
8825
|
+
}
|
|
8826
|
+
return result;
|
|
8827
|
+
}
|
|
8828
|
+
function setNestedValue(obj, path, value) {
|
|
8829
|
+
const keys = path.split(".");
|
|
8830
|
+
const lastKey = keys.pop();
|
|
8831
|
+
const target = keys.reduce((current2, key) => {
|
|
8832
|
+
if (typeof current2[key] !== "object" || current2[key] === null) {
|
|
8833
|
+
current2[key] = {};
|
|
8834
|
+
}
|
|
8835
|
+
return current2[key];
|
|
8836
|
+
}, obj);
|
|
8837
|
+
target[lastKey] = value;
|
|
8838
|
+
}
|
|
8839
|
+
function getAvailableFormFields(steps, currentStepId) {
|
|
8840
|
+
const fields = [];
|
|
8841
|
+
const currentStepIndex = steps.findIndex((step) => step.id === currentStepId);
|
|
8842
|
+
for (let i = 0; i <= currentStepIndex; i++) {
|
|
8843
|
+
const step = steps[i];
|
|
8844
|
+
if (!step) continue;
|
|
8845
|
+
const sections = step.sections || [];
|
|
8846
|
+
for (const section2 of sections) {
|
|
8847
|
+
const components = section2.components || [];
|
|
8848
|
+
for (const component of components) {
|
|
8849
|
+
if (isInputComponent(component)) {
|
|
8850
|
+
fields.push({
|
|
8851
|
+
id: component.id,
|
|
8852
|
+
label: component.label,
|
|
8853
|
+
path: component.id,
|
|
8854
|
+
// For now, use component ID as path
|
|
8855
|
+
stepTitle: step.title,
|
|
8856
|
+
stepIndex: i + 1
|
|
8857
|
+
});
|
|
8858
|
+
}
|
|
8656
8859
|
}
|
|
8657
|
-
}
|
|
8860
|
+
}
|
|
8658
8861
|
}
|
|
8659
|
-
return
|
|
8862
|
+
return fields;
|
|
8863
|
+
}
|
|
8864
|
+
function isInputComponent(component) {
|
|
8865
|
+
const inputTypes = [
|
|
8866
|
+
"text",
|
|
8867
|
+
"email",
|
|
8868
|
+
"number",
|
|
8869
|
+
"checkbox",
|
|
8870
|
+
"radioGroup",
|
|
8871
|
+
"dropdown"
|
|
8872
|
+
];
|
|
8873
|
+
return inputTypes.includes(component.type);
|
|
8660
8874
|
}
|
|
8661
8875
|
const TEMPLATE_PREFIXES = {
|
|
8662
8876
|
GENERIC: "generic-",
|
|
@@ -9354,13 +9568,131 @@ const useThemeConfig = () => {
|
|
|
9354
9568
|
name: "eva-light"
|
|
9355
9569
|
};
|
|
9356
9570
|
};
|
|
9571
|
+
let registeredRenderer = null;
|
|
9572
|
+
const registerRenderComponent = (fn) => {
|
|
9573
|
+
registeredRenderer = fn;
|
|
9574
|
+
};
|
|
9357
9575
|
const renderComponent = (props) => {
|
|
9358
|
-
{
|
|
9576
|
+
if (!registeredRenderer) {
|
|
9359
9577
|
console.error(
|
|
9360
9578
|
"[renderComponent] No renderer registered. Ensure @formbuilder/builder has been initialised before rendering form components."
|
|
9361
9579
|
);
|
|
9362
9580
|
return null;
|
|
9363
9581
|
}
|
|
9582
|
+
return registeredRenderer(props);
|
|
9583
|
+
};
|
|
9584
|
+
const wizardDefaultRenderer = ({
|
|
9585
|
+
component,
|
|
9586
|
+
value,
|
|
9587
|
+
onChange,
|
|
9588
|
+
isFormView
|
|
9589
|
+
}) => {
|
|
9590
|
+
const props = component.properties ?? {};
|
|
9591
|
+
switch (component.type) {
|
|
9592
|
+
case "text":
|
|
9593
|
+
case "email":
|
|
9594
|
+
case "tel":
|
|
9595
|
+
case "number":
|
|
9596
|
+
case "date":
|
|
9597
|
+
return /* @__PURE__ */ jsx(
|
|
9598
|
+
Input,
|
|
9599
|
+
{
|
|
9600
|
+
type: component.type,
|
|
9601
|
+
value: typeof value === "string" ? value : "",
|
|
9602
|
+
disabled: Boolean(props.disabled),
|
|
9603
|
+
readOnly: Boolean(props.readOnly) || !isFormView,
|
|
9604
|
+
placeholder: typeof props.placeholder === "string" ? props.placeholder : void 0,
|
|
9605
|
+
onChange: isFormView ? (e) => onChange(e.target.value) : void 0
|
|
9606
|
+
}
|
|
9607
|
+
);
|
|
9608
|
+
case "textarea":
|
|
9609
|
+
return /* @__PURE__ */ jsx(
|
|
9610
|
+
Textarea,
|
|
9611
|
+
{
|
|
9612
|
+
value: typeof value === "string" ? value : "",
|
|
9613
|
+
disabled: Boolean(props.disabled),
|
|
9614
|
+
readOnly: Boolean(props.readOnly) || !isFormView,
|
|
9615
|
+
placeholder: typeof props.placeholder === "string" ? props.placeholder : void 0,
|
|
9616
|
+
onChange: isFormView ? (e) => onChange(e.target.value) : void 0
|
|
9617
|
+
}
|
|
9618
|
+
);
|
|
9619
|
+
case "checkbox":
|
|
9620
|
+
return /* @__PURE__ */ jsx(
|
|
9621
|
+
Checkbox$2,
|
|
9622
|
+
{
|
|
9623
|
+
checked: !!value,
|
|
9624
|
+
disabled: Boolean(props.disabled),
|
|
9625
|
+
onCheckedChange: isFormView ? (checked) => onChange(checked === true) : void 0
|
|
9626
|
+
}
|
|
9627
|
+
);
|
|
9628
|
+
case "radioGroup": {
|
|
9629
|
+
const options = Array.isArray(props.options) ? props.options : [];
|
|
9630
|
+
return /* @__PURE__ */ jsx(
|
|
9631
|
+
RadioGroup,
|
|
9632
|
+
{
|
|
9633
|
+
value: typeof value === "string" ? value : "",
|
|
9634
|
+
onValueChange: isFormView ? (val) => onChange(val) : void 0,
|
|
9635
|
+
disabled: Boolean(props.disabled),
|
|
9636
|
+
children: options.map((opt) => /* @__PURE__ */ jsx(RadioGroupItem, { value: opt.value, children: opt.label }, opt.value))
|
|
9637
|
+
}
|
|
9638
|
+
);
|
|
9639
|
+
}
|
|
9640
|
+
case "dropdown": {
|
|
9641
|
+
const options = Array.isArray(props.options) ? props.options : [];
|
|
9642
|
+
return /* @__PURE__ */ jsxs(
|
|
9643
|
+
Select,
|
|
9644
|
+
{
|
|
9645
|
+
value: typeof value === "string" ? value : "",
|
|
9646
|
+
onValueChange: isFormView ? (val) => onChange(val) : void 0,
|
|
9647
|
+
disabled: Boolean(props.disabled),
|
|
9648
|
+
children: [
|
|
9649
|
+
/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(
|
|
9650
|
+
SelectValue,
|
|
9651
|
+
{
|
|
9652
|
+
placeholder: typeof props.placeholder === "string" ? props.placeholder : ""
|
|
9653
|
+
}
|
|
9654
|
+
) }),
|
|
9655
|
+
/* @__PURE__ */ jsx(SelectContent, { children: options.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
9656
|
+
]
|
|
9657
|
+
}
|
|
9658
|
+
);
|
|
9659
|
+
}
|
|
9660
|
+
case "button":
|
|
9661
|
+
return /* @__PURE__ */ jsx(
|
|
9662
|
+
Button$1,
|
|
9663
|
+
{
|
|
9664
|
+
type: "button",
|
|
9665
|
+
disabled: Boolean(props.disabled),
|
|
9666
|
+
onClick: isFormView ? () => onChange(null) : void 0,
|
|
9667
|
+
children: typeof props.label === "string" ? props.label : "Submit"
|
|
9668
|
+
}
|
|
9669
|
+
);
|
|
9670
|
+
case "heading": {
|
|
9671
|
+
const rawLevel = typeof props.level === "number" ? props.level : void 0;
|
|
9672
|
+
const level = rawLevel !== void 0 ? Math.min(6, Math.max(1, rawLevel)) : 2;
|
|
9673
|
+
const text = typeof props.text === "string" ? props.text : "";
|
|
9674
|
+
const Tag = `h${level}`;
|
|
9675
|
+
return /* @__PURE__ */ jsx(Tag, { children: text });
|
|
9676
|
+
}
|
|
9677
|
+
case "paragraph":
|
|
9678
|
+
return /* @__PURE__ */ jsx("p", { children: typeof props.text === "string" ? props.text : "" });
|
|
9679
|
+
case "alert":
|
|
9680
|
+
return /* @__PURE__ */ jsx(Alert$2, { variant: "default", children: /* @__PURE__ */ jsx(AlertDescription, { children: typeof props.message === "string" ? props.message : "" }) });
|
|
9681
|
+
case "progress-loader":
|
|
9682
|
+
return /* @__PURE__ */ jsx(
|
|
9683
|
+
ProgressLoaderBar,
|
|
9684
|
+
{
|
|
9685
|
+
mode: typeof props.mode === "string" ? props.mode : "indeterminate",
|
|
9686
|
+
status: "loading",
|
|
9687
|
+
label: typeof props.label === "string" ? props.label : void 0
|
|
9688
|
+
}
|
|
9689
|
+
);
|
|
9690
|
+
default:
|
|
9691
|
+
console.warn(
|
|
9692
|
+
`[wizardRenderer] Unsupported component type: ${component.type}`
|
|
9693
|
+
);
|
|
9694
|
+
return null;
|
|
9695
|
+
}
|
|
9364
9696
|
};
|
|
9365
9697
|
class ActionValidationError extends Error {
|
|
9366
9698
|
constructor(actionId, actionType, message, details) {
|
|
@@ -13619,45 +13951,45 @@ const memoryUtils = {
|
|
|
13619
13951
|
const formMachine = createMachine({
|
|
13620
13952
|
id: "formMachine",
|
|
13621
13953
|
types: {},
|
|
13622
|
-
context: ({ input }) => ({
|
|
13623
|
-
config:
|
|
13624
|
-
currentStepId:
|
|
13625
|
-
currentStepIndex:
|
|
13626
|
-
data:
|
|
13627
|
-
errors:
|
|
13628
|
-
dirtyFields:
|
|
13629
|
-
touchedFields:
|
|
13630
|
-
isValid:
|
|
13631
|
-
isSubmitting:
|
|
13632
|
-
fieldStates:
|
|
13633
|
-
sectionBackups:
|
|
13634
|
-
activeActions:
|
|
13635
|
-
actionResults:
|
|
13636
|
-
activeDialog:
|
|
13637
|
-
executingTrigger:
|
|
13638
|
-
pendingNavigation:
|
|
13639
|
-
canNavigate:
|
|
13640
|
-
waitingForActions:
|
|
13954
|
+
context: ({ input: input2 }) => ({
|
|
13955
|
+
config: input2.config || { id: "", title: "", steps: [] },
|
|
13956
|
+
currentStepId: input2.currentStepId || "",
|
|
13957
|
+
currentStepIndex: input2.currentStepIndex || 0,
|
|
13958
|
+
data: input2.data || {},
|
|
13959
|
+
errors: input2.errors || {},
|
|
13960
|
+
dirtyFields: input2.dirtyFields || {},
|
|
13961
|
+
touchedFields: input2.touchedFields || {},
|
|
13962
|
+
isValid: input2.isValid ?? true,
|
|
13963
|
+
isSubmitting: input2.isSubmitting ?? false,
|
|
13964
|
+
fieldStates: input2.fieldStates || {},
|
|
13965
|
+
sectionBackups: input2.sectionBackups || {},
|
|
13966
|
+
activeActions: input2.activeActions || {},
|
|
13967
|
+
actionResults: input2.actionResults || {},
|
|
13968
|
+
activeDialog: input2.activeDialog || null,
|
|
13969
|
+
executingTrigger: input2.executingTrigger || null,
|
|
13970
|
+
pendingNavigation: input2.pendingNavigation || null,
|
|
13971
|
+
canNavigate: input2.canNavigate ?? true,
|
|
13972
|
+
waitingForActions: input2.waitingForActions ?? false,
|
|
13641
13973
|
// Initialize field change validation state
|
|
13642
|
-
fieldChangeState:
|
|
13643
|
-
fieldValidationState:
|
|
13974
|
+
fieldChangeState: input2.fieldChangeState || {},
|
|
13975
|
+
fieldValidationState: input2.fieldValidationState || {
|
|
13644
13976
|
activeWarnings: [],
|
|
13645
13977
|
pendingVerifications: [],
|
|
13646
13978
|
verificationResults: {}
|
|
13647
13979
|
},
|
|
13648
13980
|
// Initialize component trigger-action system state
|
|
13649
|
-
componentTriggerState:
|
|
13650
|
-
activeComponentActions:
|
|
13651
|
-
componentAlerts:
|
|
13981
|
+
componentTriggerState: input2.componentTriggerState || {},
|
|
13982
|
+
activeComponentActions: input2.activeComponentActions || {},
|
|
13983
|
+
componentAlerts: input2.componentAlerts || {},
|
|
13652
13984
|
// Enhanced original value tracking
|
|
13653
|
-
componentOriginalValues:
|
|
13985
|
+
componentOriginalValues: input2.componentOriginalValues || {},
|
|
13654
13986
|
// New simplified state machine context
|
|
13655
|
-
activeExecutionPlan:
|
|
13656
|
-
executionResults:
|
|
13987
|
+
activeExecutionPlan: input2.activeExecutionPlan || null,
|
|
13988
|
+
executionResults: input2.executionResults || {},
|
|
13657
13989
|
// Track completed context actions
|
|
13658
|
-
contextActionCompletions:
|
|
13990
|
+
contextActionCompletions: input2.contextActionCompletions || {},
|
|
13659
13991
|
// Initialize enhanced save state tracking
|
|
13660
|
-
saveState:
|
|
13992
|
+
saveState: input2.saveState || {
|
|
13661
13993
|
saveInProgress: false,
|
|
13662
13994
|
saveInitiator: null,
|
|
13663
13995
|
savingSection: null,
|
|
@@ -19618,6 +19950,7 @@ const FormWizard = (props) => {
|
|
|
19618
19950
|
return /* @__PURE__ */ jsx(ThemeProvider, { config: themeConfig, children: /* @__PURE__ */ jsx(FormWizardCore, { ...props }) });
|
|
19619
19951
|
};
|
|
19620
19952
|
FormWizard.displayName = "FormWizard";
|
|
19953
|
+
registerRenderComponent(wizardDefaultRenderer);
|
|
19621
19954
|
export {
|
|
19622
19955
|
ActionDialog,
|
|
19623
19956
|
ActionExecutor,
|