@digiform/wizard 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/features/form-runtime/components/FormFooter.d.ts +5 -0
  2. package/features/form-runtime/hooks/useValidationEvents.d.ts +0 -1
  3. package/features/form-runtime/index.d.ts +0 -1
  4. package/features/state-management/machines/formMachine.d.ts +3 -0
  5. package/features/state-management/machines/types.d.ts +4 -0
  6. package/features/state-management/machines/useFormMachine.d.ts +24 -6
  7. package/package.json +31 -15
  8. package/styles.css +1 -1
  9. package/ui/src/lib/types/guards.js +1 -5
  10. package/wizard/src/features/api-integration/services/ApiCallService.js +65 -74
  11. package/wizard/src/features/dialog-system/components/ActionDialog/ActionDialog.js +39 -43
  12. package/wizard/src/features/dialog-system/components/ConfirmationDialog/ConfirmationDialog.js +37 -41
  13. package/wizard/src/features/dialog-system/components/EmailVerificationDialog/EmailVerificationDialog.js +44 -45
  14. package/wizard/src/features/form-runtime/FormWizard/FormWizard.js +48 -95
  15. package/wizard/src/features/form-runtime/FormWizard/FormWizard.module.css.js +4 -12
  16. package/wizard/src/features/form-runtime/components/FormFooter.js +53 -184
  17. package/wizard/src/features/form-runtime/components/FormSection/FormSection.js +150 -194
  18. package/wizard/src/features/form-runtime/components/FormStep/FormStep.js +92 -108
  19. package/wizard/src/features/form-runtime/components/StepProgressIndicator/StepProgressIndicator.js +24 -30
  20. package/wizard/src/features/form-runtime/hooks/useComponentTriggers.js +44 -63
  21. package/wizard/src/features/form-runtime/hooks/useFieldEventHandlers.js +26 -40
  22. package/wizard/src/features/form-runtime/hooks/useValidationEvents.js +22 -25
  23. package/wizard/src/features/form-runtime/utils/formDirtyStateSync.js +26 -37
  24. package/wizard/src/features/form-runtime/utils/logger.js +12 -12
  25. package/wizard/src/features/state-management/machines/actions/navigationActions.js +13 -8
  26. package/wizard/src/features/state-management/machines/componentTriggerEngine.js +167 -432
  27. package/wizard/src/features/state-management/machines/formMachine.js +558 -677
  28. package/wizard/src/features/state-management/machines/useFormMachine.js +173 -191
  29. package/wizard/src/features/trigger-action-system/components/ActionManager.js +35 -86
  30. package/wizard/src/features/validation-system/validation/SchemaBuilder.js +28 -82
  31. package/wizard/src/features/validation-system/validation/ValidationCache.js +11 -27
  32. package/wizard/src/features/validation-system/validation/ValidationExecutor.js +47 -87
  33. package/core/src/types/guards.js +0 -7
  34. package/features/form-runtime/config/configResolver.d.ts +0 -14
  35. package/features/form-runtime/config/index.d.ts +0 -9
  36. package/features/form-runtime/config/templateConfig.d.ts +0 -148
  37. package/features/form-runtime/config/templateLoader.d.ts +0 -25
  38. package/features/form-runtime/config/templateUtils.d.ts +0 -12
  39. package/features/form-runtime/utils/formSaver.d.ts +0 -22
  40. package/features/state-management/components/ValidationBuilder/ValidationBuilder.d.ts +0 -9
  41. package/features/state-management/machines/__tests__/setup.d.ts +0 -0
  42. package/features/state-management/machines/__tests__/vitest.config.d.ts +0 -2
  43. package/features/state-management/machines/actions/validationActions.d.ts +0 -68
  44. package/features/state-management/machines/lazyLoading.d.ts +0 -34
  45. package/features/state-management/machines/validation/index.d.ts +0 -5
  46. package/features/state-management/machines/validation/validateField.d.ts +0 -2
  47. package/features/state-management/machines/validation/validateForm.d.ts +0 -2
  48. package/features/state-management/machines/validation/validateSection.d.ts +0 -2
  49. package/features/state-management/machines/validation/validateStep.d.ts +0 -2
  50. package/features/state-management/machines/validation/validationTypes.d.ts +0 -1
  51. package/features/trigger-action-system/components/FieldWarning/FieldWarning.d.ts +0 -20
  52. package/ui/src/lib/utils/templateUtils.js +0 -20
  53. package/wizard/src/features/form-runtime/config/configResolver.js +0 -34
  54. package/wizard/src/features/form-runtime/config/templateLoader.js +0 -235
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- import { useMachine as me } from "@xstate/react";
3
- import fe, { useMemo as f, useCallback as o, createContext as Ee, useContext as Ce } from "react";
2
+ import { useMachine as gt } from "@xstate/react";
3
+ import ft, { useMemo as g, useCallback as o, createContext as Et, useContext as Ct } from "react";
4
4
  import { ComponentTriggerEngine as V } from "./componentTriggerEngine.js";
5
- import { formMachine as he } from "./formMachine.js";
6
- import { ValidationEngine as Fe } from "../../validation-system/validation/ValidationEngine.js";
7
- const ve = ({
5
+ import { formMachine as ht } from "./formMachine.js";
6
+ import { ValidationEngine as Tt } from "../../validation-system/validation/ValidationEngine.js";
7
+ const vt = ({
8
8
  config: i,
9
- initialData: g = {},
9
+ initialData: m = {},
10
10
  onSubmit: p
11
11
  }) => {
12
- const d = f(() => new Fe({
12
+ const d = g(() => new Tt({
13
13
  messageStyle: i.validationMessageStyle || "withLabel",
14
14
  debounceMs: 300
15
- }), [i.validationMessageStyle]), [m, n] = me(he, {
15
+ }), [i.validationMessageStyle]), [f, n] = gt(ht, {
16
16
  input: {
17
17
  config: i,
18
18
  currentStepId: i.steps[0]?.id || "",
19
19
  currentStepIndex: 0,
20
- data: g,
20
+ data: m,
21
21
  errors: {},
22
22
  dirtyFields: {},
23
23
  touchedFields: {},
@@ -25,16 +25,16 @@ const ve = ({
25
25
  isSubmitting: !1
26
26
  }
27
27
  // Reduced inspection logging for performance
28
- }), { context: s } = m, v = s.currentStepId, E = s.currentStepIndex, u = s.data, M = s.errors, h = s.isValid, O = s.isSubmitting, I = s.dirtyFields, R = s.touchedFields, N = f(
28
+ }), { context: s } = f, v = s.currentStepId, E = s.currentStepIndex, u = s.data, I = s.errors, h = s.isValid, O = s.isSubmitting, M = s.dirtyFields, R = s.touchedFields, N = g(
29
29
  () => i.steps[E],
30
30
  [i.steps, E]
31
- ), D = f(() => i.steps, [i.steps]), L = E === 0, P = E === i.steps.length - 1, F = o(
32
- (e) => {
33
- for (const t of i.steps) {
34
- const r = "sections" in t ? t.sections : [];
35
- for (const c of r || []) {
36
- const a = c.components?.find(
37
- (l) => l.id === e
31
+ ), D = g(() => i.steps, [i.steps]), L = E === 0, P = E === i.steps.length - 1, T = o(
32
+ (t) => {
33
+ for (const e of i.steps) {
34
+ const r = e.sections || [];
35
+ for (const l of r || []) {
36
+ const a = l.components?.find(
37
+ (c) => c.id === t
38
38
  );
39
39
  if (a)
40
40
  return a;
@@ -44,121 +44,121 @@ const ve = ({
44
44
  },
45
45
  [i.steps]
46
46
  ), S = o(
47
- (e, t) => {
47
+ (t, e) => {
48
48
  n({
49
49
  type: "SET_FIELD_STATE",
50
- componentId: e,
51
- state: { error: t }
50
+ componentId: t,
51
+ state: { error: e }
52
52
  });
53
53
  },
54
54
  [n]
55
55
  ), C = o(
56
- (e) => {
56
+ (t) => {
57
57
  n({
58
58
  type: "SET_FIELD_STATE",
59
- componentId: e,
59
+ componentId: t,
60
60
  state: { error: null }
61
61
  });
62
62
  },
63
63
  [n]
64
64
  ), x = o(
65
- (e, t) => {
66
- n({ type: "SET_DATA", key: e, value: t });
65
+ (t, e) => {
66
+ n({ type: "SET_DATA", key: t, value: e });
67
67
  },
68
68
  [n]
69
- ), T = o(
70
- (e) => {
71
- const t = F(e);
72
- if (!t) return !0;
69
+ ), F = o(
70
+ (t) => {
71
+ const e = T(t);
72
+ if (!e) return !0;
73
73
  const r = d.validateField(
74
- t,
75
- u[e]
74
+ e,
75
+ u[t]
76
76
  );
77
77
  if (!r.isValid) {
78
- const c = r.errors?.[0] || "Validation error";
79
- return S(e, c), !1;
78
+ const l = r.errors?.[0] || "Validation error";
79
+ return S(t, l), !1;
80
80
  }
81
- return C(e), !0;
81
+ return C(t), !0;
82
82
  },
83
- [u, F, S, C, d]
83
+ [u, T, S, C, d]
84
84
  ), w = o(
85
- (e) => {
86
- let t = !0;
85
+ (t) => {
86
+ let e = !0;
87
87
  for (const r of i.steps) {
88
- const a = ("sections" in r ? r.sections : [])?.find(
89
- (l) => l.id === e
88
+ const a = (r.sections || []).find(
89
+ (c) => c.id === t
90
90
  );
91
91
  if (a) {
92
- for (const l of a.components || [])
93
- T(l.id) || (t = !1);
92
+ for (const c of a.components || [])
93
+ F(c.id) || (e = !1);
94
94
  break;
95
95
  }
96
96
  }
97
- return t;
97
+ return e;
98
98
  },
99
- [i.steps, T]
100
- ), b = o(
101
- async (e) => {
102
- const t = i.steps.find((a) => a.id === e);
103
- if (!t || !("sections" in t)) return !0;
104
- const r = await d.validateStep(t, u);
105
- for (const [a, l] of Object.entries(
99
+ [i.steps, F]
100
+ ), W = o(
101
+ async (t) => {
102
+ const e = i.steps.find((a) => a.id === t);
103
+ if (!e) return !0;
104
+ const r = await d.validateStep(e, u);
105
+ for (const [a, c] of Object.entries(
106
106
  r.fieldErrors
107
107
  ))
108
- l.length > 0 && S(a, l[0]);
109
- const c = t.sections?.flatMap(
108
+ c.length > 0 && S(a, c[0]);
109
+ const l = e.sections?.flatMap(
110
110
  (a) => a.components || []
111
111
  ) || [];
112
- for (const a of c)
112
+ for (const a of l)
113
113
  r.fieldErrors[a.id] || C(a.id);
114
114
  return r.isValid;
115
115
  },
116
116
  [i.steps, d, u, S, C]
117
- ), G = o(async () => {
118
- const e = await d.validateForm(i, u);
119
- for (const [t, r] of Object.entries(
120
- e.fieldErrors
117
+ ), b = o(async () => {
118
+ const t = await d.validateForm(i, u);
119
+ for (const [e, r] of Object.entries(
120
+ t.fieldErrors
121
121
  ))
122
- r.length > 0 && S(t, r[0]);
123
- return e.isValid;
124
- }, [i, d, u, S]), W = o(() => {
122
+ r.length > 0 && S(e, r[0]);
123
+ return t.isValid;
124
+ }, [i, d, u, S]), G = o(() => {
125
125
  n({ type: "NEXT" });
126
126
  }, [n]), U = o(() => {
127
127
  n({ type: "PREVIOUS" });
128
128
  }, [n]), k = o(
129
- (e) => {
130
- n({ type: "GO_TO_STEP", stepId: e });
129
+ (t) => {
130
+ n({ type: "GO_TO_STEP", stepId: t });
131
131
  },
132
132
  [n]
133
- ), $ = o(async () => {
133
+ ), j = o(async () => {
134
134
  if (n({ type: "SUBMIT" }), h && p)
135
135
  try {
136
136
  await p(u), n({ type: "SUBMIT_SUCCESS" });
137
- } catch (e) {
137
+ } catch (t) {
138
138
  n({
139
139
  type: "SUBMIT_ERROR",
140
- error: e instanceof Error ? e : new Error("Unknown error occurred")
140
+ error: t instanceof Error ? t : new Error("Unknown error occurred")
141
141
  });
142
142
  }
143
- }, [n, h, p, u]), j = o(() => {
143
+ }, [n, h, p, u]), B = o(() => {
144
144
  n({ type: "RESET" });
145
- }, [n]), B = o(
146
- (e, t) => {
147
- n({ type: "START_SECTION_EDIT", sectionId: e, componentIds: t });
145
+ }, [n]), z = o(
146
+ (t, e) => {
147
+ n({ type: "START_SECTION_EDIT", sectionId: t, componentIds: e });
148
148
  },
149
149
  [n]
150
- ), z = o(
151
- (e) => {
152
- n({ type: "CANCEL_SECTION_EDIT", sectionId: e });
150
+ ), H = o(
151
+ (t) => {
152
+ n({ type: "CANCEL_SECTION_EDIT", sectionId: t });
153
153
  },
154
154
  [n]
155
- ), H = o(
156
- (e, t, r) => {
157
- n({ type: "FIELD_CHANGED", fieldId: e, oldValue: t, newValue: r });
155
+ ), $ = o(
156
+ (t, e, r) => {
157
+ n({ type: "FIELD_CHANGED", fieldId: t, oldValue: e, newValue: r });
158
158
  },
159
159
  [n]
160
160
  ), K = o(
161
- (e) => e ? s.fieldChangeState[e] || {
161
+ (t) => t ? s.fieldChangeState[t] || {
162
162
  originalValue: void 0,
163
163
  currentValue: void 0,
164
164
  hasChanged: !1,
@@ -166,146 +166,128 @@ const ve = ({
166
166
  } : s.fieldChangeState,
167
167
  [s.fieldChangeState]
168
168
  ), X = o(
169
- (e) => {
170
- n({ type: "CLEAR_FIELD_CHANGES", fieldId: e });
169
+ (t) => {
170
+ n({ type: "CLEAR_FIELD_CHANGES", fieldId: t });
171
171
  },
172
172
  [n]
173
173
  ), q = o(
174
- (e, t) => {
175
- n({ type: "TRIGGER_FIELD_WARNING", fieldId: e, warning: t });
174
+ (t, e) => {
175
+ n({ type: "TRIGGER_FIELD_WARNING", fieldId: t, warning: e });
176
176
  },
177
177
  [n]
178
178
  ), J = o(
179
- (e, t) => {
180
- n({ type: "DISMISS_FIELD_WARNING", fieldId: e, warningId: t });
179
+ (t, e) => {
180
+ n({ type: "DISMISS_FIELD_WARNING", fieldId: t, warningId: e });
181
181
  },
182
182
  [n]
183
183
  ), Q = o(
184
- (e) => s.fieldChangeState[e]?.validationWarnings || [],
184
+ (t) => s.fieldChangeState[t]?.validationWarnings || [],
185
185
  [s.fieldChangeState]
186
186
  ), Y = o(
187
- async (e, t) => (n({ type: "START_FIELD_VERIFICATION", fieldId: e, config: t }), new Promise((r) => {
187
+ async (t, e) => (n({ type: "START_FIELD_VERIFICATION", fieldId: t, config: e }), new Promise((r) => {
188
188
  setTimeout(() => {
189
- const c = {
189
+ const l = {
190
190
  status: "success",
191
191
  timestamp: Date.now(),
192
192
  result: { verified: !0 }
193
193
  };
194
194
  n({
195
195
  type: "FIELD_VERIFICATION_COMPLETE",
196
- fieldId: e,
197
- result: c,
196
+ fieldId: t,
197
+ result: l,
198
198
  success: !0
199
- }), r(c);
199
+ }), r(l);
200
200
  }, 1e3);
201
201
  })),
202
202
  [n]
203
203
  ), Z = o(
204
- (e) => s.fieldValidationState.verificationResults[e] || null,
204
+ (t) => s.fieldValidationState.verificationResults[t] || null,
205
205
  [s.fieldValidationState.verificationResults]
206
- ), ee = f(() => s.fieldValidationState.activeWarnings.length > 0, [s.fieldValidationState.activeWarnings]), te = f(() => s.fieldValidationState.pendingVerifications.length > 0, [s.fieldValidationState.pendingVerifications]), ne = f(() => Object.keys(s.fieldChangeState).length > 0, [s.fieldChangeState]), se = o(
207
- (e, t, r) => {
208
- console.log(
209
- `🚀 [useFormMachine] evaluateComponentTriggers called for ${e}:`,
210
- {
211
- eventType: t,
212
- value: r,
213
- componentId: e,
214
- sendFunction: !!n,
215
- currentState: m.value
216
- }
217
- );
218
- const c = {
206
+ ), tt = g(() => s.fieldValidationState.activeWarnings.length > 0, [s.fieldValidationState.activeWarnings]), et = g(() => s.fieldValidationState.pendingVerifications.length > 0, [s.fieldValidationState.pendingVerifications]), nt = g(() => Object.keys(s.fieldChangeState).length > 0, [s.fieldChangeState]), st = o(
207
+ (t, e, r) => {
208
+ n({
219
209
  type: "EVALUATE_COMPONENT_TRIGGERS",
220
- componentId: e,
221
- eventType: t,
210
+ componentId: t,
211
+ eventType: e,
222
212
  value: r
223
- };
224
- console.log("🚀 [useFormMachine] About to send event:", c), n(c), console.log(
225
- `🚀 [useFormMachine] EVALUATE_COMPONENT_TRIGGERS event sent for ${e}`
226
- );
213
+ });
227
214
  },
228
- [n, m.value]
229
- ), re = o(
230
- (e, t, r = "initialized") => {
215
+ [n, f.value]
216
+ ), rt = o(
217
+ (t, e, r = "initialized") => {
231
218
  n({
232
219
  type: "SET_COMPONENT_ORIGINAL_VALUE",
233
- componentId: e,
234
- value: t,
220
+ componentId: t,
221
+ value: e,
235
222
  source: r
236
223
  });
237
224
  },
238
225
  [n]
239
- ), oe = o(
240
- (e, t) => {
226
+ ), ot = o(
227
+ (t, e) => {
241
228
  n({
242
229
  type: "MARK_COMPONENT_AS_POPULATED",
243
- componentId: e,
244
- value: t
230
+ componentId: t,
231
+ value: e
245
232
  });
246
233
  },
247
234
  [n]
248
- ), ie = o(
249
- (e) => s.componentOriginalValues[e]?.value,
235
+ ), it = o(
236
+ (t) => s.componentOriginalValues[t]?.value,
250
237
  [s.componentOriginalValues]
251
- ), ae = o(
252
- (e, t) => {
253
- const r = s.componentOriginalValues[e];
254
- return !r || !r.isPopulated ? !1 : r.value !== t;
238
+ ), at = o(
239
+ (t, e) => {
240
+ const r = s.componentOriginalValues[t];
241
+ return !r || !r.isPopulated ? !1 : r.value !== e;
255
242
  },
256
243
  [s.componentOriginalValues]
257
- ), ce = o(
258
- (e) => s.componentAlerts[e] || [],
244
+ ), ct = o(
245
+ (t) => s.componentAlerts[t] || [],
259
246
  [s.componentAlerts]
260
- ), le = o(
261
- (e, t) => {
247
+ ), lt = o(
248
+ (t, e) => {
262
249
  n({
263
250
  type: "DISMISS_COMPONENT_ALERT",
264
- componentId: e,
265
- alertId: t
251
+ componentId: t,
252
+ alertId: e
266
253
  });
267
254
  },
268
255
  [n]
269
- ), de = o(
270
- (e, t) => {
256
+ ), dt = o(
257
+ (t, e) => {
271
258
  try {
272
- const r = e.getFieldValue(t);
273
- console.log(
274
- `🔄 [useFormMachine] Resetting dirty state for field ${t}:`,
275
- { currentValue: r }
276
- ), e.resetField(t), r != null && r !== "" && e.setFieldValue(t, r, {
259
+ const r = t.getFieldValue(e);
260
+ t.resetField(e), r != null && r !== "" && t.setFieldValue(e, r, {
277
261
  dontUpdateMeta: !0
278
262
  // This prevents marking as dirty/touched
279
- }), console.log(
280
- `✅ [useFormMachine] Field ${t} dirty state reset complete`
281
- );
263
+ });
282
264
  } catch (r) {
283
265
  console.error(
284
- `❌ [useFormMachine] Error resetting dirty state for field ${t}:`,
266
+ `❌ [useFormMachine] Error resetting dirty state for field ${e}:`,
285
267
  r
286
268
  );
287
269
  }
288
270
  },
289
271
  []
290
- ), ue = o(
291
- (e) => V.hasComponentTriggers(i, e),
272
+ ), ut = o(
273
+ (t) => V.hasComponentTriggers(i, t),
292
274
  [i]
293
- ), pe = o(
294
- (e) => V.hasComponentActions(i, e),
275
+ ), pt = o(
276
+ (t) => V.hasComponentActions(i, t),
295
277
  [i]
296
- ), Se = o(
297
- (e) => {
298
- const t = V.findComponentTriggers(
278
+ ), St = o(
279
+ (t) => {
280
+ const e = V.findComponentTriggers(
299
281
  i,
300
- e
301
- ), r = Object.entries(s.componentTriggerState).filter(([l]) => l.startsWith(`${e}-`)).reduce(
302
- (l, [y, ge]) => (l[y] = ge, l),
282
+ t
283
+ ), r = Object.entries(s.componentTriggerState).filter(([c]) => c.startsWith(`${t}-`)).reduce(
284
+ (c, [A, mt]) => (c[A] = mt, c),
303
285
  {}
304
- ), c = s.activeComponentActions[e] || [], a = s.componentAlerts[e] || [];
286
+ ), l = s.activeComponentActions[t] || [], a = s.componentAlerts[t] || [];
305
287
  return {
306
- triggers: t,
288
+ triggers: e,
307
289
  triggerStates: r,
308
- activeActions: c,
290
+ activeActions: l,
309
291
  alerts: a
310
292
  };
311
293
  },
@@ -318,17 +300,17 @@ const ve = ({
318
300
  );
319
301
  return {
320
302
  // XState primitives - for direct machine access
321
- state: m,
303
+ state: f,
322
304
  send: n,
323
305
  // Computed state values
324
306
  currentStep: N,
325
307
  currentStepId: v,
326
308
  currentStepIndex: E,
327
309
  data: u,
328
- errors: M,
310
+ errors: I,
329
311
  isValid: h,
330
312
  isSubmitting: O,
331
- dirtyFields: I,
313
+ dirtyFields: M,
332
314
  touchedFields: R,
333
315
  isFirstStep: L,
334
316
  isLastStep: P,
@@ -337,24 +319,24 @@ const ve = ({
337
319
  // Shared validation engine
338
320
  validationEngine: d,
339
321
  // Helper functions
340
- findComponentById: F,
322
+ findComponentById: T,
341
323
  setFieldError: S,
342
324
  clearFieldError: C,
343
325
  // Actions
344
326
  setData: x,
345
- validateField: T,
327
+ validateField: F,
346
328
  validateSection: w,
347
- validateStep: b,
348
- validateForm: G,
349
- nextStep: W,
329
+ validateStep: W,
330
+ validateForm: b,
331
+ nextStep: G,
350
332
  previousStep: U,
351
333
  goToStep: k,
352
- submitForm: $,
353
- resetForm: j,
354
- startSectionEdit: B,
355
- cancelSectionEdit: z,
334
+ submitForm: j,
335
+ resetForm: B,
336
+ startSectionEdit: z,
337
+ cancelSectionEdit: H,
356
338
  // Field change validation helpers
357
- trackFieldChange: H,
339
+ trackFieldChange: $,
358
340
  getFieldChanges: K,
359
341
  clearFieldChanges: X,
360
342
  showFieldWarning: q,
@@ -363,50 +345,50 @@ const ve = ({
363
345
  startFieldVerification: Y,
364
346
  getVerificationStatus: Z,
365
347
  // Computed validation state
366
- hasActiveWarnings: ee,
367
- hasPendingVerifications: te,
368
- hasFieldChanges: ne,
348
+ hasActiveWarnings: tt,
349
+ hasPendingVerifications: et,
350
+ hasFieldChanges: nt,
369
351
  fieldChangeState: s.fieldChangeState,
370
352
  fieldValidationState: s.fieldValidationState,
371
353
  // Component trigger-action system
372
- evaluateComponentTriggers: se,
373
- setComponentOriginalValue: re,
374
- markComponentAsPopulated: oe,
375
- getComponentOriginalValue: ie,
376
- isComponentDirty: ae,
377
- getComponentAlerts: ce,
378
- dismissComponentAlert: le,
379
- resetFieldDirtyState: de,
380
- hasComponentTriggers: ue,
381
- hasComponentActions: pe,
382
- getComponentTriggerState: Se,
354
+ evaluateComponentTriggers: st,
355
+ setComponentOriginalValue: rt,
356
+ markComponentAsPopulated: ot,
357
+ getComponentOriginalValue: it,
358
+ isComponentDirty: at,
359
+ getComponentAlerts: ct,
360
+ dismissComponentAlert: lt,
361
+ resetFieldDirtyState: dt,
362
+ hasComponentTriggers: ut,
363
+ hasComponentActions: pt,
364
+ getComponentTriggerState: St,
383
365
  componentTriggerState: s.componentTriggerState,
384
366
  activeComponentActions: s.activeComponentActions,
385
367
  componentAlerts: s.componentAlerts,
386
368
  componentOriginalValues: s.componentOriginalValues
387
369
  };
388
370
  };
389
- let A = null;
390
- const _ = () => (A || (A = Ee(null)), A), Me = {
371
+ let y = null;
372
+ const _ = () => (y || (y = Et(null)), y), It = {
391
373
  Provider: ({
392
374
  children: i,
393
- value: g
375
+ value: m
394
376
  }) => {
395
377
  const p = _();
396
- return fe.createElement(p.Provider, { value: g }, i);
378
+ return ft.createElement(p.Provider, { value: m }, i);
397
379
  }
398
- }, Oe = () => {
399
- const i = _(), g = Ce(i);
400
- if (!g)
380
+ }, Ot = () => {
381
+ const i = _(), m = Ct(i);
382
+ if (!m)
401
383
  throw new Error(
402
384
  "useFormMachine must be used within a FormWizard component"
403
385
  );
404
- const { state: p, send: d, ...m } = g;
405
- return [p, d, m];
386
+ const { state: p, send: d, ...f } = m;
387
+ return [p, d, f];
406
388
  };
407
389
  export {
408
- Me as FormMachineContext,
409
- Oe as default,
410
- Oe as useFormMachine,
411
- ve as useFormMachineProvider
390
+ It as FormMachineContext,
391
+ Ot as default,
392
+ Ot as useFormMachine,
393
+ vt as useFormMachineProvider
412
394
  };