@trackunit/react-form-wizard 1.7.137 → 1.7.141
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-wizard",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.141",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"react-hook-form": "7.62.0",
|
|
11
11
|
"@tanstack/react-router": "1.114.29",
|
|
12
12
|
"@tanstack/router-core": "1.114.29",
|
|
13
|
-
"@trackunit/shared-utils": "1.9.
|
|
14
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
15
|
-
"@trackunit/react-components": "1.10.
|
|
16
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
13
|
+
"@trackunit/shared-utils": "1.9.93",
|
|
14
|
+
"@trackunit/css-class-variance-utilities": "1.7.93",
|
|
15
|
+
"@trackunit/react-components": "1.10.68",
|
|
16
|
+
"@trackunit/i18n-library-translation": "1.7.111"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=24.x",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RegisteredRouter, RouteIds } from "@tanstack/react-router";
|
|
2
2
|
import { CommonProps } from "@trackunit/react-components";
|
|
3
3
|
import { MappedOmit } from "@trackunit/shared-utils";
|
|
4
|
+
import { ReactNode } from "react";
|
|
4
5
|
import { UseFormReturn } from "react-hook-form";
|
|
5
6
|
import { AnyZodObject, SomeZodObject, z } from "zod";
|
|
6
7
|
export type StepState = "active" | "done" | "invalid" | "disabled" | "ready";
|
|
@@ -18,12 +19,12 @@ export type StepComponentPropsInner<TStepSchema extends TFullSchemaValue[keyof T
|
|
|
18
19
|
};
|
|
19
20
|
export interface SimpleStepProps {
|
|
20
21
|
title: string;
|
|
21
|
-
description: string |
|
|
22
|
+
description: string | ReactNode;
|
|
22
23
|
sidebarDescription?: string;
|
|
23
24
|
containerClassName?: string;
|
|
24
25
|
}
|
|
25
26
|
interface DefinedStep<TStepSchema extends TFullSchemaValue[keyof TFullSchemaValue], TFullSchemaValue extends z.TypeOf<AnyZodObject>> extends SimpleStepProps {
|
|
26
|
-
component: (props: StepComponentPropsInner<TStepSchema, TFullSchemaValue>) =>
|
|
27
|
+
component: (props: StepComponentPropsInner<TStepSchema, TFullSchemaValue>) => ReactNode;
|
|
27
28
|
onPrimaryAction?: (form: UseFormReturn<TStepSchema>) => Promise<unknown> | void;
|
|
28
29
|
defaultValues?: Partial<TStepSchema>;
|
|
29
30
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CommonProps } from "@trackunit/react-components";
|
|
2
|
+
import { ReactNode } from "react";
|
|
2
3
|
interface FormWizardHeaderProps extends CommonProps {
|
|
3
4
|
title: string;
|
|
4
|
-
description?: string |
|
|
5
|
+
description?: string | ReactNode;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* The header component for the FormWizard.
|
|
@@ -7,7 +7,7 @@ import { FormWizardStepFormReturnMap } from "../FormWizard/FormWizard";
|
|
|
7
7
|
import { SimpleStepProps, StepComponentPropsInner, StepDefinitions, StringWithStepKey } from "../FormWizard/useFormWizard";
|
|
8
8
|
export type StepFormValidity = "valid" | "invalid";
|
|
9
9
|
export interface FormWizardStepWrapperProps<TStepKey extends keyof z.TypeOf<TFullSchema>, TFullSchema extends AnyZodObject> extends SimpleStepProps {
|
|
10
|
-
description: string |
|
|
10
|
+
description: string | ReactNode;
|
|
11
11
|
lastStepPrimaryActionLabel: string;
|
|
12
12
|
nextStepPath: string | null;
|
|
13
13
|
basePath: StringWithStepKey<`${RoutePaths<RegisteredRouter["routeTree"]>}`>;
|