impact-nova 2.5.4 → 2.5.6

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 (39) hide show
  1. package/dist/components/data/ag-grid-react/index.js +64 -64
  2. package/dist/components/data/data-table/data-table-column-state.d.ts +7 -0
  3. package/dist/components/data/data-table/data-table-column-state.js +48 -23
  4. package/dist/form-engine/field-dependency-graph.d.ts +1 -4
  5. package/dist/form-engine/field-dependency-graph.js +53 -57
  6. package/dist/form-engine/field-groups.d.ts +15 -0
  7. package/dist/form-engine/field-groups.js +60 -0
  8. package/dist/form-engine/index.d.ts +3 -2
  9. package/dist/form-engine/index.js +17 -14
  10. package/dist/form-engine/types.d.ts +17 -0
  11. package/dist/form-react/Fields/RichTextField.d.ts +3 -0
  12. package/dist/form-react/Fields/RichTextField.js +214 -0
  13. package/dist/form-react/Fields/SelectField.js +27 -28
  14. package/dist/form-react/Fields/SliderRangeField.d.ts +3 -0
  15. package/dist/form-react/Fields/SliderRangeField.js +69 -0
  16. package/dist/form-react/ReactHooksForm.js +149 -87
  17. package/dist/form-react/fields.d.ts +2 -0
  18. package/dist/form-react/fields.js +22 -18
  19. package/dist/form-react/hooks/useCascadingForm.d.ts +1 -2
  20. package/dist/form-react/hooks/useCascadingForm.js +59 -67
  21. package/dist/form-react/hooks/useFieldVisibility.d.ts +1 -2
  22. package/dist/form-react/hooks/useFieldVisibility.js +36 -43
  23. package/dist/form-react/hooks/useFormSteps.d.ts +29 -0
  24. package/dist/form-react/hooks/useFormSteps.js +96 -0
  25. package/dist/form-react/hooks/useReactHookForm.js +17 -18
  26. package/dist/form-react/hooks/useSelectOptions.d.ts +1 -1
  27. package/dist/form-react/hooks/useSelectOptions.js +80 -83
  28. package/dist/form-react/index.d.ts +5 -3
  29. package/dist/form-react/index.js +93 -88
  30. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  31. package/dist/form-react/registry/defaultFieldRegistrations.js +11 -9
  32. package/dist/form-react/types/fields.types.d.ts +31 -12
  33. package/dist/form-react/types/fieldsOutput.types.d.ts +5 -1
  34. package/dist/form-react/types/reactHookForm.types.d.ts +31 -2
  35. package/dist/form-react/utils/fieldDefaults.utils.js +28 -13
  36. package/dist/impact-nova.css +1 -1
  37. package/dist/llms/rules/installation.js +1 -1
  38. package/dist/llms/rules/requirements.js +1 -1
  39. package/package.json +17 -2
@@ -1,60 +1,53 @@
1
- import { useCallback as c, useRef as y, useEffect as I } from "react";
1
+ import { useCallback as r, useRef as h, useEffect as y } from "react";
2
2
  import { getFieldDefaultValue as g } from "../utils/fieldDefaults.utils.js";
3
- import { computeIsFieldVisible as w, computeIsFieldDisabled as a } from "../../form-engine/field-dependency-graph.js";
4
- function R({
3
+ import { computeIsFieldVisible as I, computeIsFieldDisabled as c } from "../../form-engine/field-dependency-graph.js";
4
+ function E({
5
5
  form: e,
6
- formConfig: u,
7
- isCascadingDisabled: n
6
+ formConfig: d
8
7
  }) {
9
- const p = c(
10
- (t) => w(t, e.getValues()),
8
+ const f = r(
9
+ (i) => I(i, e.getValues()),
11
10
  [e]
12
- ), D = c(
13
- (t) => a(t, e.getValues(), {
14
- isCascadingDisabled: n
15
- }),
16
- [e, n]
17
- ), F = c(
18
- (t) => a(t, e.getValues(), {
19
- isCascadingDisabled: () => !1
20
- }),
11
+ ), D = r(
12
+ (i) => c(i, e.getValues()),
21
13
  [e]
22
- ), r = y(/* @__PURE__ */ new Set());
23
- return I(() => {
24
- const t = u.fields.filter(
25
- (i) => i.disableDependency && i.disableDependency.length > 0
14
+ ), p = r(
15
+ (i) => c(i, e.getValues()),
16
+ [e]
17
+ ), u = h(/* @__PURE__ */ new Set());
18
+ return y(() => {
19
+ const i = d.fields.filter(
20
+ (s) => s.disableDependency && s.disableDependency.length > 0
26
21
  );
27
- if (t.length === 0)
22
+ if (i.length === 0)
28
23
  return;
29
- const o = (i) => {
30
- const d = /* @__PURE__ */ new Set();
31
- for (const l of t)
32
- a(l, i ?? e.getValues(), {
33
- isCascadingDisabled: n
34
- }) && d.add(l.id);
35
- return d;
24
+ const a = (s) => {
25
+ const n = /* @__PURE__ */ new Set();
26
+ for (const l of i)
27
+ c(l, s ?? e.getValues()) && n.add(l.id);
28
+ return n;
36
29
  };
37
- r.current = o(void 0);
38
- const V = e.watch((i, d) => {
39
- if (!d.name)
30
+ u.current = a(void 0);
31
+ const F = e.watch((s, n) => {
32
+ if (!n.name)
40
33
  return;
41
- const l = o(i), f = [];
42
- for (const s of l)
43
- r.current.has(s) || f.push(s);
44
- r.current = l;
45
- for (const s of f) {
46
- const b = u.fields.find(
47
- (h) => h.id === s
34
+ const l = a(s), o = [];
35
+ for (const t of l)
36
+ u.current.has(t) || o.push(t);
37
+ u.current = l;
38
+ for (const t of o) {
39
+ const b = d.fields.find(
40
+ (V) => V.id === t
48
41
  );
49
- b && (e.setValue(s, g(b), {
42
+ b && (e.setValue(t, g(b), {
50
43
  shouldValidate: !1,
51
44
  shouldDirty: !0
52
- }), e.clearErrors(s));
45
+ }), e.clearErrors(t));
53
46
  }
54
47
  });
55
- return () => V.unsubscribe();
56
- }, [e, u.fields, n]), { isFieldVisible: p, isFieldDisabled: D, isFieldDisabledForSubmitValidation: F };
48
+ return () => F.unsubscribe();
49
+ }, [e, d.fields]), { isFieldVisible: f, isFieldDisabled: D, isFieldDisabledForSubmitValidation: p };
57
50
  }
58
51
  export {
59
- R as useFieldVisibility
52
+ E as useFieldVisibility
60
53
  };
@@ -0,0 +1,29 @@
1
+ import { FieldGroup } from '../../form-engine';
2
+ import { IField } from '../types/fields.types';
3
+ import { IFormConfig, UseReactHookFormReturn } from '../types/reactHookForm.types';
4
+ export interface UseFormStepsReturn {
5
+ groups: FieldGroup[];
6
+ currentStep: number;
7
+ totalSteps: number;
8
+ isFirstStep: boolean;
9
+ isLastStep: boolean;
10
+ /** Whether current step has no validation errors and all required fields are filled. */
11
+ canProceed: boolean;
12
+ /** Fields belonging to the current step. */
13
+ currentStepFields: IField[];
14
+ /** Advance to the next step. Validates current step first if `validateBeforeNext` is true. Returns false if blocked. */
15
+ goNext: () => boolean;
16
+ /** Go back one step (never gated by validation). */
17
+ goPrev: () => void;
18
+ /** Jump to a specific step index. Forward jumps validate intermediate steps. */
19
+ goToStep: (index: number) => void;
20
+ /** Check if a specific step is complete. */
21
+ isStepComplete: (stepIndex: number) => boolean;
22
+ /** Check if a step has been visited. */
23
+ isStepVisited: (stepIndex: number) => boolean;
24
+ }
25
+ /**
26
+ * Manages multi-step / grouped form navigation.
27
+ * Returns `null` when `formConfig.formType` is `'default'` or absent.
28
+ */
29
+ export declare function useFormSteps(formConfig: IFormConfig, formHelpers: UseReactHookFormReturn): UseFormStepsReturn | null;
@@ -0,0 +1,96 @@
1
+ import { useMemo as m, useState as F, useRef as N, useCallback as u } from "react";
2
+ import { buildFieldGroups as k, isStepComplete as P } from "../../form-engine/field-groups.js";
3
+ function L(i, g) {
4
+ const { formType: d } = i, s = m(() => !d || d === "default" ? [] : k(i.fields, i.steps), [d, i.fields, i.steps]), [r, o] = F(0), [w, c] = F(
5
+ () => /* @__PURE__ */ new Set([0])
6
+ ), I = m(() => {
7
+ if (s.length === 0) return /* @__PURE__ */ new Map();
8
+ const t = new Map(i.fields.map((n) => [n.id, n])), e = /* @__PURE__ */ new Map();
9
+ for (const n of s)
10
+ e.set(
11
+ n.groupId,
12
+ n.fieldIds.map((l) => t.get(l)).filter(Boolean)
13
+ );
14
+ return e;
15
+ }, [s, i.fields]), a = N(g);
16
+ a.current = g;
17
+ const p = u(
18
+ (t) => {
19
+ const e = s[t];
20
+ if (!e) return !1;
21
+ const n = a.current.form;
22
+ return P(
23
+ e.fieldIds,
24
+ i.fields,
25
+ n.getValues(),
26
+ n.formState.errors
27
+ );
28
+ },
29
+ [s, i.fields]
30
+ ), f = u(
31
+ async (t) => {
32
+ const e = s[t];
33
+ if (!e) return !1;
34
+ const n = e.fieldIds.filter((l) => {
35
+ const S = i.fields.find((G) => G.id === l);
36
+ return S ? a.current.isFieldVisible(S) : !1;
37
+ });
38
+ return n.length === 0 ? !0 : a.current.form.trigger(n);
39
+ },
40
+ [s, i.fields]
41
+ ), M = u(() => {
42
+ const t = s[r];
43
+ if (!t || r >= s.length - 1) return !1;
44
+ if (t.validateBeforeNext)
45
+ return f(r).then((n) => {
46
+ if (n) {
47
+ const l = r + 1;
48
+ o(l), c((S) => new Set(S).add(l));
49
+ }
50
+ }), p(r);
51
+ const e = r + 1;
52
+ return o(e), c((n) => new Set(n).add(e)), !0;
53
+ }, [r, s, f, p]), V = u(() => {
54
+ r > 0 && o(r - 1);
55
+ }, [r]), b = u(
56
+ (t) => {
57
+ if (!(t < 0 || t >= s.length || t === r)) {
58
+ if (t < r) {
59
+ o(t), c((e) => new Set(e).add(t));
60
+ return;
61
+ }
62
+ (async () => {
63
+ for (let e = r; e < t; e++)
64
+ if (s[e].validateBeforeNext && !await f(e)) {
65
+ o(e), c((l) => new Set(l).add(e));
66
+ return;
67
+ }
68
+ o(t), c((e) => new Set(e).add(t));
69
+ })();
70
+ }
71
+ },
72
+ [r, s, f]
73
+ ), y = u(
74
+ (t) => w.has(t),
75
+ [w]
76
+ );
77
+ if (!d || d === "default") return null;
78
+ const v = s.length, h = s[r], B = h ? I.get(h.groupId) ?? [] : [];
79
+ return {
80
+ groups: s,
81
+ currentStep: r,
82
+ totalSteps: v,
83
+ isFirstStep: r === 0,
84
+ isLastStep: r === v - 1,
85
+ canProceed: p(r),
86
+ currentStepFields: B,
87
+ goNext: M,
88
+ goPrev: V,
89
+ goToStep: b,
90
+ isStepComplete: p,
91
+ isStepVisited: y
92
+ };
93
+ }
94
+ export {
95
+ L as useFormSteps
96
+ };
@@ -6,9 +6,9 @@ import { useFieldVisibility as Z } from "./useFieldVisibility.js";
6
6
  import { useFormFieldChangeSubscription as _ } from "./useFormFieldChangeSubscription.js";
7
7
  import { getFieldDefaultValue as m } from "../utils/fieldDefaults.utils.js";
8
8
  import { focusFirstFormValidationError as $ } from "../utils/formValidationFeedback.utils.js";
9
- import { getFieldTestId as k } from "../utils/fieldTestIds.js";
10
- import { buildEvaluateFieldValidationOptions as x } from "../utils/evaluateFieldValidation.js";
11
- const de = (i, u, a, f, S, v) => {
9
+ import { getFieldTestId as g } from "../utils/fieldTestIds.js";
10
+ import { buildEvaluateFieldValidationOptions as k } from "../utils/evaluateFieldValidation.js";
11
+ const de = (i, u, d, f, S, v) => {
12
12
  const y = l(() => {
13
13
  const e = {};
14
14
  return i.fields.forEach((t) => {
@@ -24,14 +24,14 @@ const de = (i, u, a, f, S, v) => {
24
24
  return Object.keys(u ?? {}).filter(
25
25
  (t) => !e.has(t)
26
26
  );
27
- }, [i.fields, u]), d = P(() => {
27
+ }, [i.fields, u]), a = P(() => {
28
28
  const e = y(), t = T();
29
29
  return { ...e, ...t };
30
30
  }, [y, T]), r = X({
31
- defaultValues: d,
31
+ defaultValues: a,
32
32
  mode: "onTouched",
33
33
  reValidateMode: "onChange"
34
- }), I = c(d), R = c(null), w = c(() => {
34
+ }), I = c(a), R = c(null), w = c(() => {
35
35
  }), K = l((e) => I.current[e], []), H = c(
36
36
  new Set(i.fields.map((e) => e.id))
37
37
  );
@@ -60,19 +60,18 @@ const de = (i, u, a, f, S, v) => {
60
60
  $({
61
61
  fieldErrors: r.formState.errors,
62
62
  fieldsInOrder: i.fields,
63
- getFieldTestId: k
63
+ getFieldTestId: g
64
64
  });
65
65
  }, [r.formState.errors, i.fields]);
66
66
  b(() => {
67
67
  F && p();
68
68
  }, [F, p]);
69
- const { isCascadingDisabled: W, getEarlierFieldsIds: g, setValueWithCascading: q } = Y(r, i, {
69
+ const { getEarlierFieldsIds: W, setValueWithCascading: q } = Y(r, i, {
70
70
  getFieldDefaultValue: m,
71
71
  resolveFieldValidationEvaluationOptions: (e) => w.current(e)
72
72
  }), { isFieldVisible: E, isFieldDisabled: B, isFieldDisabledForSubmitValidation: G } = Z({
73
73
  form: r,
74
- formConfig: i,
75
- isCascadingDisabled: W
74
+ formConfig: i
76
75
  });
77
76
  _({
78
77
  form: r,
@@ -108,28 +107,28 @@ const de = (i, u, a, f, S, v) => {
108
107
  (t) => {
109
108
  j(!1);
110
109
  const s = n(t);
111
- e?.(s), a?.(s);
110
+ e?.(s), d?.(s);
112
111
  },
113
112
  () => {
114
113
  j(!0);
115
114
  }
116
115
  ),
117
- [r, n, a]
116
+ [r, n, d]
118
117
  ), L = l(
119
118
  (e) => {
120
- const t = e || d;
119
+ const t = e || a;
121
120
  r.reset(t), S?.(t);
122
121
  },
123
- [r, d, S]
122
+ [r, a, S]
124
123
  ), Q = l(() => {
125
124
  const e = r.getValues();
126
125
  f?.(e);
127
126
  }, [r, f]), U = l(
128
127
  (e) => {
129
128
  const t = r.getValues(), s = n(t);
130
- e?.(s), a?.(s);
129
+ e?.(s), d?.(s);
131
130
  },
132
- [r, n, a]
131
+ [r, n, d]
133
132
  ), h = {
134
133
  formId: i.formId,
135
134
  formConfig: i,
@@ -144,7 +143,7 @@ const de = (i, u, a, f, S, v) => {
144
143
  isFieldDisabled: B,
145
144
  isFieldDisabledForSubmitValidation: G,
146
145
  submitValidatedForm: U,
147
- getEarlierFieldsIds: g,
146
+ getEarlierFieldsIds: W,
148
147
  scrollToFirstError: p,
149
148
  setToEmptyFields: V,
150
149
  markFieldAsEmpty: N,
@@ -153,7 +152,7 @@ const de = (i, u, a, f, S, v) => {
153
152
  formContext: v
154
153
  };
155
154
  return b(() => {
156
- R.current = h, w.current = (e) => x(h, e);
155
+ R.current = h, w.current = (e) => k(h, e);
157
156
  }), h;
158
157
  };
159
158
  export {
@@ -1,6 +1,6 @@
1
1
  import { Option } from '../../components/forms/select';
2
2
  import { UseSelectOptionsProps } from '../types/reactHookForm.types';
3
- export declare const useSelectOptions: ({ apiConfig, formHelpers, formConfig, initialOptions, id, isEnabled, getSelectOptionsName, fieldSupportedValues, }: UseSelectOptionsProps) => {
3
+ export declare const useSelectOptions: ({ apiConfig, formHelpers, initialOptions, id, isEnabled, getSelectOptionsName, fieldSupportedValues, cascadingDependency, }: UseSelectOptionsProps) => {
4
4
  options: Option[];
5
5
  isLoading: boolean;
6
6
  error: Error | null;
@@ -1,116 +1,113 @@
1
- import { useMemo as V, useState as v, useRef as l, useEffect as N, useCallback as P } from "react";
2
- import { useWatch as j } from "react-hook-form";
3
- import { serializeFormStateForQueryKey as q } from "../utils/serializeFormStateForQueryKey.js";
4
- const X = ({
5
- apiConfig: t,
6
- formHelpers: o,
7
- formConfig: k,
1
+ import { useMemo as m, useState as E, useRef as a, useEffect as z, useCallback as L } from "react";
2
+ import { useWatch as W } from "react-hook-form";
3
+ import { serializeFormStateForQueryKey as _ } from "../utils/serializeFormStateForQueryKey.js";
4
+ const B = ({
5
+ apiConfig: r,
6
+ formHelpers: c,
8
7
  initialOptions: d = [],
9
- id: r,
10
- isEnabled: D,
8
+ id: s,
9
+ isEnabled: N,
11
10
  getSelectOptionsName: i,
12
- fieldSupportedValues: u
11
+ fieldSupportedValues: l,
12
+ cascadingDependency: y
13
13
  }) => {
14
- const h = !!(k?.isCascading || t?.isCascading), p = o?.getEarlierFieldsIds, E = o?.form.getValues, y = j({
15
- control: o?.form.control,
16
- name: t?.cascadeFromFields ?? [],
17
- disabled: !h || !o?.form.control || !t?.cascadeFromFields?.length
18
- }), f = V(() => {
19
- if (!h || !p || !E)
14
+ const u = m(() => {
15
+ const e = r?.fieldsToPassInApi ?? [];
16
+ if (!(r?.passCascadingDependencyFields !== !1))
17
+ return e;
18
+ const o = [...y?.map((t) => t.fieldId) ?? []];
19
+ return e.forEach((t) => {
20
+ o.includes(t) || o.push(t);
21
+ }), o;
22
+ }, [
23
+ r?.fieldsToPassInApi,
24
+ r?.passCascadingDependencyFields,
25
+ y
26
+ ]), f = W({
27
+ control: c?.form.control,
28
+ name: u,
29
+ disabled: !c?.form.control || !u.length
30
+ }), p = m(() => {
31
+ if (!u.length)
20
32
  return {};
21
- const e = {};
22
- if (t?.cascadeFromFields && t.cascadeFromFields.length > 0) {
23
- const c = Array.isArray(y) ? y : [];
24
- return t.cascadeFromFields.forEach((s, m) => {
25
- const a = c[m];
26
- a != null && a !== "" && (e[s] = a);
27
- }), e;
28
- }
29
- const n = E(), O = t?.includeOnlyMandatoryFieldsInPayload || !1;
30
- return p(r, O).forEach((c) => {
31
- const s = n[c];
32
- s != null && s !== "" && (e[c] = s);
33
+ const e = {}, n = Array.isArray(f) ? f : [f];
34
+ return u.forEach((F, o) => {
35
+ const t = n[o];
36
+ t != null && t !== "" && (e[F] = t);
33
37
  }), e;
34
- }, [
35
- t,
36
- h,
37
- y,
38
- p,
39
- E,
40
- r
41
- ]), G = V(
42
- () => q(f),
43
- [f]
44
- ), J = V(
45
- () => u ? JSON.stringify(u) : "",
46
- [u]
47
- ), [S, w] = v(d), [K, x] = v(!1), [Q, I] = v(null), R = l(o), g = l(t), b = l(f), C = l(u), z = l(d), A = l(i);
48
- N(() => {
49
- R.current = o, g.current = t, b.current = f, C.current = u, z.current = d, A.current = i;
38
+ }, [u, f]), T = m(
39
+ () => _(p),
40
+ [p]
41
+ ), k = m(
42
+ () => l ? JSON.stringify(l) : "",
43
+ [l]
44
+ ), [I, O] = E(d), [G, S] = E(!1), [J, g] = E(null), v = a(c), V = a(r), w = a(p), x = a(l), C = a(d), R = a(i);
45
+ z(() => {
46
+ v.current = c, V.current = r, w.current = p, x.current = l, C.current = d, R.current = i;
50
47
  });
51
- const F = P(async () => {
52
- const e = R.current, n = g.current, O = b.current, L = C.current, c = z.current, s = A.current;
48
+ const h = L(async () => {
49
+ const e = v.current, n = V.current, F = w.current, o = x.current, t = C.current, P = R.current;
53
50
  if (e) {
54
- const a = s ? e.formContext?.getSelectOptions?.[s] : void 0;
55
- if (a)
56
- return await a({
51
+ const b = P ? e.formContext?.getSelectOptions?.[P] : void 0;
52
+ if (b)
53
+ return await b({
57
54
  formHelpers: e,
58
- fieldId: r,
59
- newValue: e.form.getValues(r),
60
- oldValue: e.getPreviousFieldValue(r)
55
+ fieldId: s,
56
+ newValue: e.form.getValues(s),
57
+ oldValue: e.getPreviousFieldValue(s)
61
58
  });
62
59
  }
63
60
  if (!n?.apiEndpoint)
64
- return c;
65
- const m = e?.formContext?.transport?.fetchSelectOptions;
66
- return m ? m({
67
- fieldId: r,
61
+ return t;
62
+ const D = e?.formContext?.transport?.fetchSelectOptions;
63
+ return D ? D({
64
+ fieldId: s,
68
65
  apiConfig: n,
69
- earlierFieldsValues: O,
70
- fieldSupportedValues: L
66
+ earlierFieldsValues: F,
67
+ fieldSupportedValues: o
71
68
  }) : (process.env.NODE_ENV !== "production" && console.warn(
72
- `[form-react] Select field "${r}" has apiConfig but no formContext.transport.fetchSelectOptions was provided.`
73
- ), c);
74
- }, [r]), W = !!(i && o?.formContext?.getSelectOptions?.[i]), M = D && (W || !!t?.apiEndpoint && !!o?.formContext?.transport?.fetchSelectOptions), _ = t?.apiEndpoint;
75
- N(() => {
76
- if (!M)
69
+ `[form-react] Select field "${s}" has apiConfig but no formContext.transport.fetchSelectOptions was provided.`
70
+ ), t);
71
+ }, [s]), K = !!(i && c?.formContext?.getSelectOptions?.[i]), A = N && (K || !!r?.apiEndpoint && !!c?.formContext?.transport?.fetchSelectOptions), M = r?.apiEndpoint;
72
+ z(() => {
73
+ if (!A)
77
74
  return;
78
75
  let e = !1;
79
76
  return (async () => {
80
- x(!0), I(null);
77
+ S(!0), g(null);
81
78
  try {
82
- const n = await F();
83
- e || w(n);
79
+ const n = await h();
80
+ e || O(n);
84
81
  } catch (n) {
85
- e || I(
82
+ e || g(
86
83
  n instanceof Error ? n : new Error("Failed to fetch options")
87
84
  );
88
85
  } finally {
89
- e || x(!1);
86
+ e || S(!1);
90
87
  }
91
88
  })(), () => {
92
89
  e = !0;
93
90
  };
94
91
  }, [
95
- M,
96
- F,
97
- G,
98
- J,
92
+ A,
93
+ h,
94
+ T,
95
+ k,
99
96
  i,
100
- _,
101
- r
97
+ M,
98
+ s
102
99
  ]);
103
- const $ = P(async () => {
104
- const e = await F();
105
- return w(e), e;
106
- }, [F]);
100
+ const Q = L(async () => {
101
+ const e = await h();
102
+ return O(e), e;
103
+ }, [h]);
107
104
  return {
108
- options: S.length > 0 ? S : d,
109
- isLoading: K,
110
- error: Q,
111
- refetch: $
105
+ options: I.length > 0 ? I : d,
106
+ isLoading: G,
107
+ error: J,
108
+ refetch: Q
112
109
  };
113
110
  };
114
111
  export {
115
- X as useSelectOptions
112
+ B as useSelectOptions
116
113
  };
@@ -18,6 +18,8 @@ export { useFieldVisibility } from './hooks/useFieldVisibility';
18
18
  export type { UseFieldVisibilityReturn } from './hooks/useFieldVisibility';
19
19
  export { useCascadingForm } from './hooks/useCascadingForm';
20
20
  export type { UseCascadingFormReturn } from './hooks/useCascadingForm';
21
+ export { useFormSteps } from './hooks/useFormSteps';
22
+ export type { UseFormStepsReturn } from './hooks/useFormSteps';
21
23
  export { useSelectOptions } from './hooks/useSelectOptions';
22
24
  export { useFillFormByPaste } from './hooks/useFillFormByPaste';
23
25
  export { useFillFormByFileUpload } from './hooks/useFillFormByFileUpload';
@@ -34,12 +36,12 @@ export { FormFileUploadWrapper } from './components/FormFileUploadWrapper';
34
36
  export { registerFieldType, getFieldComponent, hasRegisteredFieldType, listRegisteredFieldTypes, } from './registry/fieldRegistry';
35
37
  export { registerDefaultFieldTypes } from './registry/defaultFieldRegistrations';
36
38
  export { resolveFieldComponent, renderRegisteredField } from './registry/resolveFieldComponent';
37
- export type { IFormConfig, FormFieldProps, FieldVisibilityBase, ReactHooksFormProps, UseSelectOptionsProps, FormContext, FormValidationMeta, FormTransport, CustomFieldTypesMap, FetchSelectOptionsParams, PastedValuesValidationResult, ValidatePastedValuesParams, ValidateUploadedFileParams, UploadedFileValidationResult, ValidateTextFieldWithBackendParams, TextFieldBackendValidationResult, SupportedValuesMap, } from './types/reactHookForm.types';
39
+ export type { IFormConfig, FormFieldProps, FormType, FormStepConfig, FormStepStateMeta, ReactHooksFormStepActions, FieldVisibilityBase, ReactHooksFormProps, UseSelectOptionsProps, FormContext, FormValidationMeta, FormTransport, CustomFieldTypesMap, FetchSelectOptionsParams, PastedValuesValidationResult, ValidatePastedValuesParams, ValidateUploadedFileParams, UploadedFileValidationResult, ValidateTextFieldWithBackendParams, TextFieldBackendValidationResult, SupportedValuesMap, } from './types/reactHookForm.types';
38
40
  export type { IField } from './types/fields.types';
39
41
  export type * from './types/fields.types';
40
42
  export type * from './types/fieldsOutput.types';
41
- export { isEmptyValue, buildCascadeParentFormState, collectFieldDependencyIds, collectFormWatchFieldIds, collectFilterSidebarWatchFieldIds, collectSectionWatchFieldIds, collectVisibleFieldIds, computeIsCascadingDisabled, computeIsFieldDisabled, computeIsFieldVisible, getDependentFieldIds, hasVisibleFieldErrors, } from '../form-engine';
42
- export type { FieldDependency, FormValuesSnapshot, } from '../form-engine';
43
+ export { isEmptyValue, buildCascadeParentFormState, buildFieldGroups, collectFieldDependencyIds, collectFormWatchFieldIds, collectFilterSidebarWatchFieldIds, collectSectionWatchFieldIds, collectVisibleFieldIds, computeIsFieldDisabled, computeIsFieldVisible, getDependentFieldIds, getFirstIncompleteStep, hasVisibleFieldErrors, isStepComplete, } from '../form-engine';
44
+ export type { FieldDependency, FieldGroup, FormValuesSnapshot, } from '../form-engine';
43
45
  export { getFieldDefaultValue } from './utils/fieldDefaults.utils';
44
46
  export { batchSetFormFieldValues } from './utils/batchFormFieldUpdates';
45
47
  export { serializeFormStateForQueryKey } from './utils/serializeFormStateForQueryKey';