@trackunit/react-form-wizard 1.17.3 → 1.17.4
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 +2 -2
- package/index.esm.js +2 -2
- package/package.json +3 -3
package/index.cjs.js
CHANGED
|
@@ -169,7 +169,7 @@ const getStateIcon = (state) => {
|
|
|
169
169
|
* A sidebar step component used by the FormWizard component to render each step.
|
|
170
170
|
* This component is generally used internally by the FormWizard component.
|
|
171
171
|
*/
|
|
172
|
-
const FormWizardSidebarStep = ({ stepNumber, state, basePath, title, subTitle, path, "data-testid": dataTestId, onClickNavigate, isSubStep, }) => {
|
|
172
|
+
const FormWizardSidebarStep = ({ stepNumber, state, basePath, title, subTitle, path, "data-testid": dataTestId, onClickNavigate, isSubStep = false, }) => {
|
|
173
173
|
const stateIcon = getStateIcon(state);
|
|
174
174
|
return (jsxRuntime.jsx(reactRouter.Link, { className: cvaFormWizardSidebarStep({ state, isSubStep }), "data-testid": dataTestId ?? `form-wizard-sidebar-step-${path}`, onClick: onClickNavigate, params: prev => ({ ...prev, stepPath: path }), search: prev => ({ ...prev }), to: basePath, children: jsxRuntime.jsxs("div", { className: cvaSectionHeaderContainer({ state }), children: [jsxRuntime.jsx("div", { className: cvaStepNumberContainer(), children: stateIcon ?? (jsxRuntime.jsx("span", { className: cvaStepNumber({ state, isSubStep }), "data-testid": isSubStep ? `form-wizard-sidebar-substep` : `form-wizard-sidebar-step-number-${stepNumber}`, children: stepNumber })) }), jsxRuntime.jsxs("div", { className: cvaTitleAndDescription(), children: [jsxRuntime.jsx("h3", { className: cvaHeader(), children: title }), subTitle ? jsxRuntime.jsx("p", { className: cvaSubtitle(), children: subTitle }) : null] })] }) }));
|
|
175
175
|
};
|
|
@@ -459,7 +459,7 @@ const cvaStepContainer = cssClassVarianceUtilities.cvaMerge(["h-full", "grid", "
|
|
|
459
459
|
* });
|
|
460
460
|
* ```
|
|
461
461
|
*/
|
|
462
|
-
const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
|
|
462
|
+
const FormWizard = ({ lastStepPrimaryActionLabel, isEdit = false, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
|
|
463
463
|
const navigate = reactRouter.useNavigate();
|
|
464
464
|
const { stepPath, subStepPath } = reactRouter.useParams({ strict: false });
|
|
465
465
|
const initialFullFormState = react.useMemo(() => sharedUtils.objectFromEntries(sharedUtils.objectEntries(steps)
|
package/index.esm.js
CHANGED
|
@@ -167,7 +167,7 @@ const getStateIcon = (state) => {
|
|
|
167
167
|
* A sidebar step component used by the FormWizard component to render each step.
|
|
168
168
|
* This component is generally used internally by the FormWizard component.
|
|
169
169
|
*/
|
|
170
|
-
const FormWizardSidebarStep = ({ stepNumber, state, basePath, title, subTitle, path, "data-testid": dataTestId, onClickNavigate, isSubStep, }) => {
|
|
170
|
+
const FormWizardSidebarStep = ({ stepNumber, state, basePath, title, subTitle, path, "data-testid": dataTestId, onClickNavigate, isSubStep = false, }) => {
|
|
171
171
|
const stateIcon = getStateIcon(state);
|
|
172
172
|
return (jsx(Link, { className: cvaFormWizardSidebarStep({ state, isSubStep }), "data-testid": dataTestId ?? `form-wizard-sidebar-step-${path}`, onClick: onClickNavigate, params: prev => ({ ...prev, stepPath: path }), search: prev => ({ ...prev }), to: basePath, children: jsxs("div", { className: cvaSectionHeaderContainer({ state }), children: [jsx("div", { className: cvaStepNumberContainer(), children: stateIcon ?? (jsx("span", { className: cvaStepNumber({ state, isSubStep }), "data-testid": isSubStep ? `form-wizard-sidebar-substep` : `form-wizard-sidebar-step-number-${stepNumber}`, children: stepNumber })) }), jsxs("div", { className: cvaTitleAndDescription(), children: [jsx("h3", { className: cvaHeader(), children: title }), subTitle ? jsx("p", { className: cvaSubtitle(), children: subTitle }) : null] })] }) }));
|
|
173
173
|
};
|
|
@@ -457,7 +457,7 @@ const cvaStepContainer = cvaMerge(["h-full", "grid", "bg-white", "overflow-hidde
|
|
|
457
457
|
* });
|
|
458
458
|
* ```
|
|
459
459
|
*/
|
|
460
|
-
const FormWizard = ({ lastStepPrimaryActionLabel, isEdit, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
|
|
460
|
+
const FormWizard = ({ lastStepPrimaryActionLabel, isEdit = false, steps, fullFormSchema, onCancel, className, "data-testid": dataTestId, basePath, ref, }) => {
|
|
461
461
|
const navigate = useNavigate();
|
|
462
462
|
const { stepPath, subStepPath } = useParams({ strict: false });
|
|
463
463
|
const initialFullFormState = useMemo(() => objectFromEntries(objectEntries(steps)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-form-wizard",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@tanstack/router-core": "1.114.29",
|
|
10
10
|
"@trackunit/shared-utils": "1.13.77",
|
|
11
11
|
"@trackunit/css-class-variance-utilities": "1.11.77",
|
|
12
|
-
"@trackunit/react-components": "1.20.
|
|
13
|
-
"@trackunit/i18n-library-translation": "1.15.
|
|
12
|
+
"@trackunit/react-components": "1.20.4",
|
|
13
|
+
"@trackunit/i18n-library-translation": "1.15.4"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=24.x",
|