@trackunit/react-form-wizard 0.1.95 → 0.1.97
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 +3 -1
- package/index.esm.js +3 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -362,7 +362,9 @@ const FormWizard = ({ lastStepPrimaryActionLabel, steps, fullFormSchema, onCance
|
|
|
362
362
|
.filter(([_, { defaultValues }]) => defaultValues)
|
|
363
363
|
.map(([key, { defaultValues }]) => [key, defaultValues])));
|
|
364
364
|
const currentVisibleStepKey = (_a = sharedUtils.objectEntries(steps).find(([, { path }]) => subStepPath ? path === `${stepPath}/${subStepPath}` : path === stepPath)) === null || _a === void 0 ? void 0 : _a[0];
|
|
365
|
-
const currentVisibleStepIndex = sharedUtils.objectKeys(steps)
|
|
365
|
+
const currentVisibleStepIndex = sharedUtils.objectKeys(steps)
|
|
366
|
+
.filter(key => { var _a, _b, _c; return (_c = (_b = (_a = steps[key]).shouldRender) === null || _b === void 0 ? void 0 : _b.call(_a, fullFormState)) !== null && _c !== void 0 ? _c : true; })
|
|
367
|
+
.findIndex(key => key === currentVisibleStepKey);
|
|
366
368
|
return (jsxRuntime.jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, children: jsxRuntime.jsxs("div", { className: cvaFormWizardLayout(), children: [jsxRuntime.jsx(FormWizardSidebar, { children: sharedUtils.objectEntries(steps)
|
|
367
369
|
.filter(([_, step]) => { var _a, _b; return (_b = (_a = step.shouldRender) === null || _a === void 0 ? void 0 : _a.call(step, fullFormState)) !== null && _b !== void 0 ? _b : true; })
|
|
368
370
|
.map(([key, { path, title, sidebarDescription, parent }], index) => {
|
package/index.esm.js
CHANGED
|
@@ -358,7 +358,9 @@ const FormWizard = ({ lastStepPrimaryActionLabel, steps, fullFormSchema, onCance
|
|
|
358
358
|
.filter(([_, { defaultValues }]) => defaultValues)
|
|
359
359
|
.map(([key, { defaultValues }]) => [key, defaultValues])));
|
|
360
360
|
const currentVisibleStepKey = (_a = objectEntries(steps).find(([, { path }]) => subStepPath ? path === `${stepPath}/${subStepPath}` : path === stepPath)) === null || _a === void 0 ? void 0 : _a[0];
|
|
361
|
-
const currentVisibleStepIndex = objectKeys(steps)
|
|
361
|
+
const currentVisibleStepIndex = objectKeys(steps)
|
|
362
|
+
.filter(key => { var _a, _b, _c; return (_c = (_b = (_a = steps[key]).shouldRender) === null || _b === void 0 ? void 0 : _b.call(_a, fullFormState)) !== null && _c !== void 0 ? _c : true; })
|
|
363
|
+
.findIndex(key => key === currentVisibleStepKey);
|
|
362
364
|
return (jsx("div", { className: cvaFormWizardContainer({ className }), "data-testid": dataTestId, children: jsxs("div", { className: cvaFormWizardLayout(), children: [jsx(FormWizardSidebar, { children: objectEntries(steps)
|
|
363
365
|
.filter(([_, step]) => { var _a, _b; return (_b = (_a = step.shouldRender) === null || _a === void 0 ? void 0 : _a.call(step, fullFormState)) !== null && _b !== void 0 ? _b : true; })
|
|
364
366
|
.map(([key, { path, title, sidebarDescription, parent }], index) => {
|