@trackunit/react-form-wizard 1.23.15 → 1.24.0

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/index.cjs.js CHANGED
@@ -271,13 +271,13 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
271
271
  callback();
272
272
  }, [initialFullFormState, setFullFormState]);
273
273
  const isEmptyStep = sharedUtils.objectKeys(form.getValues()).length === 0;
274
- const emptyStepSubmitHandler = react.useCallback(() => {
274
+ const emptyStepSubmitHandler = react.useCallback(async () => {
275
275
  beforeSubmitInternal?.(fullFormState);
276
276
  if (isLastStep) {
277
277
  submitHandlerInternal?.(fullFormState);
278
278
  }
279
279
  else if (nextStepPath) {
280
- void navigate({ to: basePath, params: { stepPath: nextStepPath } });
280
+ await navigate({ to: basePath, params: { stepPath: nextStepPath } });
281
281
  }
282
282
  }, [basePath, beforeSubmitInternal, fullFormState, isLastStep, navigate, nextStepPath, submitHandlerInternal]);
283
283
  const stepSubmitHandler = react.useMemo(() => form.handleSubmit(async (data) => {
@@ -289,7 +289,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
289
289
  await submitHandlerInternal?.({ ...fullFormState, [stepKey]: data });
290
290
  }
291
291
  else if (nextStepPath) {
292
- void navigate({ to: basePath, params: { stepPath: nextStepPath } });
292
+ await navigate({ to: basePath, params: { stepPath: nextStepPath } });
293
293
  }
294
294
  }), [
295
295
  basePath,
@@ -327,7 +327,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
327
327
  catch {
328
328
  sharedUtils.doNothing();
329
329
  }
330
- void handleSubmit();
330
+ await handleSubmit();
331
331
  }, children: [jsxRuntime.jsx(FormWizardHeader, { title, description }), jsxRuntime.jsx("div", { className: cvaFormWizardComponentContainer({ className: containerClassName }), children: jsxRuntime.jsx(reactHookForm.FormProvider, { ...form, children: component({
332
332
  form,
333
333
  fullForm,
package/index.esm.js CHANGED
@@ -269,13 +269,13 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
269
269
  callback();
270
270
  }, [initialFullFormState, setFullFormState]);
271
271
  const isEmptyStep = objectKeys(form.getValues()).length === 0;
272
- const emptyStepSubmitHandler = useCallback(() => {
272
+ const emptyStepSubmitHandler = useCallback(async () => {
273
273
  beforeSubmitInternal?.(fullFormState);
274
274
  if (isLastStep) {
275
275
  submitHandlerInternal?.(fullFormState);
276
276
  }
277
277
  else if (nextStepPath) {
278
- void navigate({ to: basePath, params: { stepPath: nextStepPath } });
278
+ await navigate({ to: basePath, params: { stepPath: nextStepPath } });
279
279
  }
280
280
  }, [basePath, beforeSubmitInternal, fullFormState, isLastStep, navigate, nextStepPath, submitHandlerInternal]);
281
281
  const stepSubmitHandler = useMemo(() => form.handleSubmit(async (data) => {
@@ -287,7 +287,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
287
287
  await submitHandlerInternal?.({ ...fullFormState, [stepKey]: data });
288
288
  }
289
289
  else if (nextStepPath) {
290
- void navigate({ to: basePath, params: { stepPath: nextStepPath } });
290
+ await navigate({ to: basePath, params: { stepPath: nextStepPath } });
291
291
  }
292
292
  }), [
293
293
  basePath,
@@ -325,7 +325,7 @@ const FormWizardStepWrapper = ({ stepKey, onCancel, description, title, componen
325
325
  catch {
326
326
  doNothing();
327
327
  }
328
- void handleSubmit();
328
+ await handleSubmit();
329
329
  }, children: [jsx(FormWizardHeader, { title, description }), jsx("div", { className: cvaFormWizardComponentContainer({ className: containerClassName }), children: jsx(FormProvider, { ...form, children: component({
330
330
  form,
331
331
  fullForm,
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@trackunit/react-form-wizard",
3
- "version": "1.23.15",
3
+ "version": "1.24.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
7
7
  "zod": "^3.25.76",
8
8
  "@hookform/resolvers": "^3.3.4",
9
9
  "@tanstack/router-core": "1.114.29",
10
- "@trackunit/shared-utils": "1.14.8",
11
- "@trackunit/css-class-variance-utilities": "1.12.7",
12
- "@trackunit/react-components": "1.23.10",
13
- "@trackunit/i18n-library-translation": "1.20.11"
10
+ "@trackunit/shared-utils": "1.15.0",
11
+ "@trackunit/css-class-variance-utilities": "1.13.0",
12
+ "@trackunit/react-components": "1.24.0",
13
+ "@trackunit/i18n-library-translation": "1.21.0"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=24.x",
@@ -1,16 +1,16 @@
1
1
  export declare const cvaFormWizardSidebarStep: (props?: ({
2
- state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
2
+ state?: "active" | "done" | "invalid" | "disabled" | "ready" | null | undefined;
3
3
  isSubStep?: boolean | null | undefined;
4
4
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
5
  export declare const cvaSectionHeaderContainer: (props?: ({
6
- state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
7
- cursor?: "withCursor" | "default" | null | undefined;
6
+ state?: "active" | "done" | "invalid" | "disabled" | "ready" | null | undefined;
7
+ cursor?: "default" | "withCursor" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export declare const cvaHeader: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
10
  export declare const cvaSubtitle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
11
  export declare const cvaStepNumberContainer: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
12
  export declare const cvaStepNumber: (props?: ({
13
- state?: "ready" | "active" | "done" | "invalid" | "disabled" | null | undefined;
13
+ state?: "active" | "done" | "invalid" | "disabled" | "ready" | null | undefined;
14
14
  isSubStep?: boolean | null | undefined;
15
15
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
16
  export declare const cvaTitleAndDescription: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;