@m4l/components 9.3.12-JT270825.beta.1 → 9.3.12-JT290825.beta.1
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/components/Stepper/Stepper.js +77 -0
- package/components/Stepper/Stepper.styles.js +289 -0
- package/components/Stepper/constants.js +6 -0
- package/components/Stepper/dictionary.js +14 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.js +17 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.js +13 -0
- package/components/Stepper/helpers/index.js +1 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.js +16 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.js +16 -0
- package/components/Stepper/hooks/useStepper/index.js +20 -0
- package/components/Stepper/hooks/useStepperActions/index.js +1 -0
- package/components/Stepper/hooks/useStepperActions/useStepperActions.js +63 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.d.ts +7 -0
- package/components/Stepper/hooks/useStickyStepperFooter/index.js +20 -0
- package/components/Stepper/icons.js +12 -0
- package/components/Stepper/index.d.ts +9 -4
- package/components/Stepper/index.js +1 -0
- package/components/Stepper/slots/StepperEnum.js +36 -0
- package/components/Stepper/slots/StepperSlot.js +97 -0
- package/components/Stepper/store/StepperContext/index.js +103 -0
- package/components/Stepper/store/StepperStore/index.js +152 -0
- package/components/Stepper/subcomponents/ContentArea/index.js +24 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.js +26 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.js +23 -0
- package/components/Stepper/subcomponents/StepArea/index.js +135 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.js +85 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js +25 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js +46 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js +52 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js +20 -0
- package/components/Stepper/subcomponents/StepperButtons/index.js +1 -0
- package/components/Stepper/subcomponents/StepperContent/index.js +23 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js +42 -0
- package/components/Stepper/subcomponents/StepperFooter/index.js +48 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.js +9 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.js +33 -0
- package/components/Stepper/types.d.ts +7 -1
- package/components/index.d.ts +1 -0
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.js +44 -0
- package/helpers/getStepsAndValidationSchema/index.d.ts +1 -0
- package/helpers/getStepsAndValidationSchema/index.js +1 -0
- package/helpers/getStepsAndValidationSchema/types.js +1 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +80 -52
- package/package.json +1 -1
- package/storybook/components/Stepper/helpers/useSteps.d.ts +1 -1
- package/storybook/components/Stepper/subcomponents/StepperDecorator.d.ts +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { u as useStepper } from "../../../hooks/useStepper/index.js";
|
|
3
|
+
import { p as pathIcons } from "../../../icons.js";
|
|
4
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
5
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
6
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
7
|
+
import { u as useStepperActions } from "../../../hooks/useStepperActions/useStepperActions.js";
|
|
8
|
+
import { I as IconButton } from "../../../../mui_extended/IconButton/IconButton.js";
|
|
9
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
10
|
+
function StepperNextButton() {
|
|
11
|
+
const { nextStepAction } = useStepperActions();
|
|
12
|
+
const isMobile = useIsMobile();
|
|
13
|
+
const { getLabel } = useModuleDictionary();
|
|
14
|
+
const { host_static_assets, environment_assets } = useStepper((state) => ({
|
|
15
|
+
host_static_assets: state.host_static_assets,
|
|
16
|
+
environment_assets: state.environment_assets
|
|
17
|
+
}));
|
|
18
|
+
const handleNext = async () => {
|
|
19
|
+
await nextStepAction();
|
|
20
|
+
};
|
|
21
|
+
return isMobile ? /* @__PURE__ */ jsx(
|
|
22
|
+
IconButton,
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
onClick: handleNext,
|
|
26
|
+
icon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowRight}`,
|
|
27
|
+
"data-testid": "stepper-next-button",
|
|
28
|
+
variant: "contained",
|
|
29
|
+
color: "primary"
|
|
30
|
+
}
|
|
31
|
+
) : /* @__PURE__ */ jsx(
|
|
32
|
+
Button,
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
label: getLabel(DICTIONARY.LABEL_NEXT_BUTTON),
|
|
36
|
+
variant: "contained",
|
|
37
|
+
color: "primary",
|
|
38
|
+
onClick: handleNext,
|
|
39
|
+
endIcon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowRight}`,
|
|
40
|
+
"data-testid": "stepper-next-button"
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
StepperNextButton as S
|
|
46
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { u as useStepper } from "../../../hooks/useStepper/index.js";
|
|
4
|
+
import { p as pathIcons } from "../../../icons.js";
|
|
5
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
6
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
7
|
+
import { u as useStepperActions } from "../../../hooks/useStepperActions/useStepperActions.js";
|
|
8
|
+
import { I as IconButton } from "../../../../mui_extended/IconButton/IconButton.js";
|
|
9
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
10
|
+
function StepperPrevButton() {
|
|
11
|
+
const { host_static_assets, environment_assets, currentStep } = useStepper(
|
|
12
|
+
(state) => ({
|
|
13
|
+
host_static_assets: state.host_static_assets,
|
|
14
|
+
environment_assets: state.environment_assets,
|
|
15
|
+
currentStep: state.currentStep
|
|
16
|
+
})
|
|
17
|
+
);
|
|
18
|
+
const isMobile = useIsMobile();
|
|
19
|
+
const { getLabel } = useModuleDictionary();
|
|
20
|
+
const { prevStepAction } = useStepperActions();
|
|
21
|
+
const handlePrev = () => {
|
|
22
|
+
prevStepAction();
|
|
23
|
+
};
|
|
24
|
+
if (currentStep === 0) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return isMobile ? /* @__PURE__ */ jsx(
|
|
28
|
+
IconButton,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: handlePrev,
|
|
32
|
+
icon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowLeft}`,
|
|
33
|
+
"data-testid": "stepper-prev-button",
|
|
34
|
+
variant: "outline",
|
|
35
|
+
color: "default"
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ jsx(
|
|
38
|
+
Button,
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
label: !isMobile ? getLabel(DICTIONARY.LABEL_PREV_BUTTON) : "",
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
color: "default",
|
|
44
|
+
onClick: handlePrev,
|
|
45
|
+
startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.arrowLeft}`,
|
|
46
|
+
"data-testid": "stepper-prev-button"
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
StepperPrevButton as S
|
|
52
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { D as DICTIONARY } from "../../../dictionary.js";
|
|
3
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
+
import { B as Button } from "../../../../mui_extended/Button/Button.js";
|
|
5
|
+
function StepperSubmitButton() {
|
|
6
|
+
const { getLabel } = useModuleDictionary();
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Button,
|
|
9
|
+
{
|
|
10
|
+
type: "submit",
|
|
11
|
+
label: getLabel(DICTIONARY.LABEL_SUBMIT_BUTTON),
|
|
12
|
+
variant: "contained",
|
|
13
|
+
color: "primary",
|
|
14
|
+
"data-testid": "stepper-submit-button"
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
StepperSubmitButton as S
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, Children, isValidElement } from "react";
|
|
3
|
+
import { S as Step } from "./subcomponents/Step/index.js";
|
|
4
|
+
function StepperContent(props) {
|
|
5
|
+
const { children } = props;
|
|
6
|
+
const validSteps = useMemo(() => {
|
|
7
|
+
const steps = [];
|
|
8
|
+
Children.forEach(children, (child) => {
|
|
9
|
+
if (isValidElement(child) && child.type === Step) {
|
|
10
|
+
steps.push(child);
|
|
11
|
+
} else {
|
|
12
|
+
throw new Error(
|
|
13
|
+
"StepperContent: Solo se permiten componentes Step como hijos."
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return steps;
|
|
18
|
+
}, [children]);
|
|
19
|
+
return /* @__PURE__ */ jsx(Fragment, { children: validSteps });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
StepperContent as S
|
|
23
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { u as useStepper } from "../../../../hooks/useStepper/index.js";
|
|
4
|
+
import { useWatch } from "react-hook-form";
|
|
5
|
+
import { e as evaluateVisibilityStepCondition } from "../../../../helpers/evaluateVisibilityStepCondition/index.js";
|
|
6
|
+
function Step(props) {
|
|
7
|
+
const { stepKey, children } = props;
|
|
8
|
+
const formValues = useWatch();
|
|
9
|
+
const { currentStep, steps, visibilityData } = useStepper((state) => ({
|
|
10
|
+
currentStep: state.currentStep,
|
|
11
|
+
steps: state.steps,
|
|
12
|
+
visibilityData: state.visibilityData
|
|
13
|
+
}));
|
|
14
|
+
const currentStepConfig = useMemo(() => {
|
|
15
|
+
return steps[currentStep];
|
|
16
|
+
}, [steps, currentStep]);
|
|
17
|
+
const stepConfig = useMemo(() => {
|
|
18
|
+
return steps.find((step) => step.key === stepKey);
|
|
19
|
+
}, [steps, stepKey]);
|
|
20
|
+
const isStepVisible = useMemo(() => {
|
|
21
|
+
if (!currentStepConfig) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (stepKey !== currentStepConfig.key) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
if (stepConfig && !evaluateVisibilityStepCondition(stepConfig, formValues || {}, visibilityData)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}, [currentStepConfig, stepKey, stepConfig, formValues, visibilityData]);
|
|
32
|
+
const renderedContent = useMemo(() => {
|
|
33
|
+
if (!isStepVisible) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
37
|
+
}, [isStepVisible, children]);
|
|
38
|
+
return renderedContent;
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
Step as S
|
|
42
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo, Children, isValidElement } from "react";
|
|
3
|
+
import { i as StepperFooterSectionStyled } from "../../slots/StepperSlot.js";
|
|
4
|
+
import { S as StepperFooterLeftActions } from "./subcomponents/StepperFooterLeftActions/index.js";
|
|
5
|
+
import { S as StepperFooterRightActions } from "./subcomponents/StepperFooterRightActions/index.js";
|
|
6
|
+
function StepperFooter(props) {
|
|
7
|
+
const { children, ownerState } = props;
|
|
8
|
+
const { stepperFooterLeftActions, stepperFooterRightActions } = useMemo(() => {
|
|
9
|
+
let parsedLeftActions = null;
|
|
10
|
+
let parsedRightActions = null;
|
|
11
|
+
let leftActionsCount = 0;
|
|
12
|
+
let rightActionsCount = 0;
|
|
13
|
+
if (children) {
|
|
14
|
+
Children.forEach(children, (child) => {
|
|
15
|
+
if (isValidElement(child)) {
|
|
16
|
+
if (child.type === StepperFooterLeftActions) {
|
|
17
|
+
leftActionsCount++;
|
|
18
|
+
if (leftActionsCount > 1) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
"StepperFooter: Solo se permite un componente StepperFooterLeftActions. Se encontraron múltiples StepperFooterLeftActions."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
parsedLeftActions = child;
|
|
24
|
+
} else if (child.type === StepperFooterRightActions) {
|
|
25
|
+
rightActionsCount++;
|
|
26
|
+
if (rightActionsCount > 1) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
"StepperFooter: Solo se permite un componente StepperFooterRightActions. Se encontraron múltiples StepperFooterRightActions."
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
parsedRightActions = child;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
stepperFooterLeftActions: parsedLeftActions,
|
|
38
|
+
stepperFooterRightActions: parsedRightActions
|
|
39
|
+
};
|
|
40
|
+
}, [children]);
|
|
41
|
+
return /* @__PURE__ */ jsxs(StepperFooterSectionStyled, { ownerState, children: [
|
|
42
|
+
stepperFooterLeftActions,
|
|
43
|
+
stepperFooterRightActions
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
StepperFooter as S
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { j as StepperFooterLeftActionsStyled } from "../../../../slots/StepperSlot.js";
|
|
3
|
+
function StepperFooterLeftActions(props) {
|
|
4
|
+
const { children } = props;
|
|
5
|
+
return /* @__PURE__ */ jsx(StepperFooterLeftActionsStyled, { children });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
StepperFooterLeftActions as S
|
|
9
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { u as useIsLastVisibleValidStep } from "../../../../hooks/useIsLastVisibleValidStep/index.js";
|
|
4
|
+
import { k as StepperFooterRightActionsStyled } from "../../../../slots/StepperSlot.js";
|
|
5
|
+
import { S as StepperNextButton } from "../../../StepperButtons/StepperNextButton/index.js";
|
|
6
|
+
import { S as StepperSubmitButton } from "../../../StepperButtons/StepperSubmitButton/index.js";
|
|
7
|
+
function StepperFooterRightActions(props) {
|
|
8
|
+
const { children } = props;
|
|
9
|
+
const isLastVisibleValidStep = useIsLastVisibleValidStep();
|
|
10
|
+
const childrenWithoutNextButton = useMemo(() => {
|
|
11
|
+
if (!isLastVisibleValidStep) {
|
|
12
|
+
return children;
|
|
13
|
+
}
|
|
14
|
+
return React.Children.toArray(children).filter((child) => {
|
|
15
|
+
if (React.isValidElement(child)) {
|
|
16
|
+
if (child.type === StepperNextButton) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
});
|
|
22
|
+
}, [children, isLastVisibleValidStep]);
|
|
23
|
+
const submitButton = useMemo(() => {
|
|
24
|
+
return isLastVisibleValidStep ? /* @__PURE__ */ jsx(StepperSubmitButton, {}) : null;
|
|
25
|
+
}, [isLastVisibleValidStep]);
|
|
26
|
+
return /* @__PURE__ */ jsxs(StepperFooterRightActionsStyled, { children: [
|
|
27
|
+
childrenWithoutNextButton,
|
|
28
|
+
submitButton
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
StepperFooterRightActions as S
|
|
33
|
+
};
|
|
@@ -22,6 +22,10 @@ export type Step = {
|
|
|
22
22
|
* Descripción del step.
|
|
23
23
|
*/
|
|
24
24
|
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Icono del step.
|
|
27
|
+
*/
|
|
28
|
+
icon?: string;
|
|
25
29
|
/**
|
|
26
30
|
* Array con los campos que se deben validar en el step.
|
|
27
31
|
*/
|
|
@@ -130,6 +134,7 @@ export interface IndicatorProps {
|
|
|
130
134
|
*/
|
|
131
135
|
export interface StepperFooterProps {
|
|
132
136
|
children?: ReactNode;
|
|
137
|
+
ownerState?: StepperOwnerState;
|
|
133
138
|
}
|
|
134
139
|
/**
|
|
135
140
|
* Props del StepperFooterLeftActions
|
|
@@ -143,7 +148,7 @@ export interface StepperFooterLeftActionsProps {
|
|
|
143
148
|
export interface StepperFooterRightActionsProps {
|
|
144
149
|
children?: ReactNode;
|
|
145
150
|
}
|
|
146
|
-
export interface StepperOwnerState extends Pick<StepperProps, 'visibleTitle'> {
|
|
151
|
+
export interface StepperOwnerState extends Pick<StepperProps, 'visibleTitle'>, Record<string, unknown> {
|
|
147
152
|
step?: number;
|
|
148
153
|
currentStep?: number;
|
|
149
154
|
totalSteps?: number;
|
|
@@ -151,6 +156,7 @@ export interface StepperOwnerState extends Pick<StepperProps, 'visibleTitle'> {
|
|
|
151
156
|
indicatorType?: IndicatorType;
|
|
152
157
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
153
158
|
stepValidationStatus?: Record<number, boolean>;
|
|
159
|
+
stepperFooterSticky?: boolean;
|
|
154
160
|
}
|
|
155
161
|
export type StepperSlotsType = StepperSlots | ContentSlots | ContentAreaSlots | StepperFooterSlots;
|
|
156
162
|
export type StepperStyles = M4LOverridesStyleRules<StepperSlotsType, typeof STEPPER_PREFIX_NAME, Theme>;
|
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Yup from "yup";
|
|
2
|
+
import { e as evaluateVisibilityStepCondition } from "../../components/Stepper/helpers/evaluateVisibilityStepCondition/index.js";
|
|
3
|
+
function getStepsAndValidationSchema({
|
|
4
|
+
steps,
|
|
5
|
+
visibilityData
|
|
6
|
+
}) {
|
|
7
|
+
const validationSchema = (() => {
|
|
8
|
+
const combinedValidations = {};
|
|
9
|
+
const visibleSteps = steps.filter((step) => {
|
|
10
|
+
if (!step.visibilityCondition) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return evaluateVisibilityStepCondition(step, void 0, visibilityData);
|
|
14
|
+
});
|
|
15
|
+
visibleSteps.forEach((step) => {
|
|
16
|
+
if (step.validationFunction) {
|
|
17
|
+
const validationResult = step.validationFunction();
|
|
18
|
+
Object.assign(combinedValidations, validationResult);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return Yup.object().shape(combinedValidations);
|
|
22
|
+
})();
|
|
23
|
+
const processedSteps = steps.map((step) => {
|
|
24
|
+
let validationFields = [];
|
|
25
|
+
if (step.validationFunction) {
|
|
26
|
+
const validationResult = step.validationFunction();
|
|
27
|
+
validationFields = Object.keys(validationResult);
|
|
28
|
+
}
|
|
29
|
+
const processedStep = {
|
|
30
|
+
...step,
|
|
31
|
+
// Incluir todas las propiedades del step original
|
|
32
|
+
validationFields
|
|
33
|
+
// Agregar validationFields calculados
|
|
34
|
+
};
|
|
35
|
+
return processedStep;
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
validationSchema,
|
|
39
|
+
steps: processedSteps
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
getStepsAndValidationSchema as g
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getStepsAndValidationSchema';
|
package/helpers/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -194,38 +194,52 @@ import { a as a14, g as g28 } from "./components/ModalDialog/dictionary.js";
|
|
|
194
194
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
195
195
|
import { S as S10 } from "./components/SettingsLayout/SettingsLayout.js";
|
|
196
196
|
import { P as P13 } from "./components/Pager/Pager.js";
|
|
197
|
-
import {
|
|
198
|
-
import {
|
|
199
|
-
import {
|
|
197
|
+
import { u as u16 } from "./components/Stepper/hooks/useStepper/index.js";
|
|
198
|
+
import { S as S11 } from "./components/Stepper/Stepper.js";
|
|
199
|
+
import { S as S12 } from "./components/Stepper/subcomponents/StepperContent/index.js";
|
|
200
|
+
import { S as S13 } from "./components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.js";
|
|
201
|
+
import { S as S14 } from "./components/Stepper/subcomponents/StepperFooter/index.js";
|
|
202
|
+
import { S as S15 } from "./components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.js";
|
|
203
|
+
import { S as S16 } from "./components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.js";
|
|
204
|
+
import { S as S17 } from "./components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.js";
|
|
205
|
+
import { S as S18 } from "./components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.js";
|
|
206
|
+
import { S as S19 } from "./components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.js";
|
|
207
|
+
import { S as S20 } from "./components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.js";
|
|
208
|
+
import { e as e3 } from "./components/Stepper/helpers/evaluateVisibilityStepCondition/index.js";
|
|
209
|
+
import { g as g29 } from "./components/Stepper/dictionary.js";
|
|
210
|
+
import { F as F3, R as R23, u as u17 } from "./components/hook-form/RHFormContext/index.js";
|
|
211
|
+
import { g as g30 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
212
|
+
import { u as u18 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
200
213
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
201
214
|
import { a as a15, M as M9 } from "./contexts/ModalContext/index.js";
|
|
202
|
-
import { u as
|
|
203
|
-
import { u as
|
|
204
|
-
import { u as
|
|
205
|
-
import { g as
|
|
206
|
-
import { u as
|
|
207
|
-
import { u as
|
|
208
|
-
import { u as
|
|
209
|
-
import { u as
|
|
210
|
-
import { u as
|
|
211
|
-
import { S as
|
|
212
|
-
import { u as
|
|
213
|
-
import { u as
|
|
214
|
-
import { u as
|
|
215
|
-
import { u as
|
|
216
|
-
import { u as
|
|
215
|
+
import { u as u19 } from "./hooks/useFormAddEdit/index.js";
|
|
216
|
+
import { u as u20 } from "./hooks/useModal/index.js";
|
|
217
|
+
import { u as u21 } from "./hooks/useTab/index.js";
|
|
218
|
+
import { g as g31 } from "./hooks/useFormAddEdit/dictionary.js";
|
|
219
|
+
import { u as u22 } from "./hooks/useFormFocus/index.js";
|
|
220
|
+
import { u as u23 } from "./hooks/useInterval/index.js";
|
|
221
|
+
import { u as u24 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
222
|
+
import { u as u25 } from "./hooks/useFormReadyForUpdate/index.js";
|
|
223
|
+
import { u as u26 } from "./hooks/useStateRef/index.js";
|
|
224
|
+
import { S as S21 } from "./hooks/useSvgColor/constants.js";
|
|
225
|
+
import { u as u27 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
226
|
+
import { u as u28 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
227
|
+
import { u as u29 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
228
|
+
import { u as u30 } from "./hooks/usePopoverContainer/usePopoverContainer.js";
|
|
229
|
+
import { u as u31 } from "./hooks/useIsVisible/useIsVisible.js";
|
|
217
230
|
import { c as c4 } from "./utils/capitalizeFirstLetter.js";
|
|
218
231
|
import { i as i2 } from "./utils/isValidDate.js";
|
|
219
|
-
import { g as
|
|
220
|
-
import { g as
|
|
221
|
-
import { g as
|
|
222
|
-
import { g as
|
|
223
|
-
import { a as a16, g as
|
|
232
|
+
import { g as g32 } from "./utils/getComponentUtilityClass.js";
|
|
233
|
+
import { g as g33 } from "./utils/getPaletteColor.js";
|
|
234
|
+
import { g as g34 } from "./utils/getTypographyStyles.js";
|
|
235
|
+
import { g as g35 } from "./utils/getIconColor.js";
|
|
236
|
+
import { a as a16, g as g36 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
224
237
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
225
|
-
import { g as
|
|
238
|
+
import { g as g37, a as a17 } from "./utils/getComponentSlotRoot.js";
|
|
226
239
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
227
|
-
import { g as
|
|
228
|
-
import { g as
|
|
240
|
+
import { g as g38 } from "./utils/getValidDate.js";
|
|
241
|
+
import { g as g39 } from "./utils/getNullGuard.js";
|
|
242
|
+
import { g as g40 } from "./helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.js";
|
|
229
243
|
export {
|
|
230
244
|
A7 as AREAS_DICCTIONARY,
|
|
231
245
|
a3 as AREAS_DICTIONARY_ID,
|
|
@@ -360,7 +374,7 @@ export {
|
|
|
360
374
|
R as Resizable,
|
|
361
375
|
R2 as ResizableBox,
|
|
362
376
|
R4 as Responsive,
|
|
363
|
-
|
|
377
|
+
S21 as SKELETON_SVG_ICON,
|
|
364
378
|
S8 as ScrollBar,
|
|
365
379
|
S as SectionCommercial,
|
|
366
380
|
S4 as Select,
|
|
@@ -371,6 +385,16 @@ export {
|
|
|
371
385
|
S2 as SortCompareValues,
|
|
372
386
|
S3 as SplitLayout,
|
|
373
387
|
S6 as Stack,
|
|
388
|
+
S13 as Step,
|
|
389
|
+
S11 as Stepper,
|
|
390
|
+
S19 as StepperCancelButton,
|
|
391
|
+
S12 as StepperContent,
|
|
392
|
+
S14 as StepperFooter,
|
|
393
|
+
S15 as StepperFooterLeftActions,
|
|
394
|
+
S16 as StepperFooterRightActions,
|
|
395
|
+
S17 as StepperNextButton,
|
|
396
|
+
S18 as StepperPrevButton,
|
|
397
|
+
S20 as StepperSubmitButton,
|
|
374
398
|
T10 as TOGGLE_BUTTON_KEY_COMPONENT,
|
|
375
399
|
a8 as TOGGLE_ICON_BUTTON_CLASS_NAME_SPECIFY,
|
|
376
400
|
T14 as TOGGLE_ICON_BUTTON_KEY_COMPONENT,
|
|
@@ -406,29 +430,30 @@ export {
|
|
|
406
430
|
c as createToaster,
|
|
407
431
|
d as defaultCommonActionsDictionary,
|
|
408
432
|
d2 as dragResizeWindowRNDClasses,
|
|
433
|
+
e3 as evaluateVisibilityStepCondition,
|
|
409
434
|
f as formatDistanceToNow,
|
|
410
435
|
g as getAccountPopoverDictionary,
|
|
411
436
|
g2 as getAppBarDictionary,
|
|
412
437
|
b2 as getAreasComponentsDictionary,
|
|
413
438
|
g3 as getAreasDictionary,
|
|
414
439
|
g4 as getCommonActionsDictionary,
|
|
415
|
-
|
|
440
|
+
g37 as getComponentClasses,
|
|
416
441
|
a17 as getComponentSlotRoot,
|
|
417
|
-
|
|
442
|
+
g32 as getComponentUtilityClass,
|
|
418
443
|
g5 as getDataGridComponentsDictionary,
|
|
419
444
|
g6 as getDataGridRowsFromSet,
|
|
420
445
|
g17 as getDistanceToNowFormatterComponentsDictionary,
|
|
421
446
|
g7 as getDynamicFilterComponentsDictionary,
|
|
422
447
|
a6 as getDynamicSortComponentsDictionary,
|
|
423
448
|
a5 as getFilterGroupFieldsByName,
|
|
424
|
-
|
|
449
|
+
g30 as getFormComponentsDictionary,
|
|
425
450
|
g15 as getFormatConcatenated,
|
|
426
451
|
g12 as getFormatDate,
|
|
427
452
|
g14 as getFormatPoints,
|
|
428
453
|
g16 as getFormatPrice,
|
|
429
454
|
g18 as getFormattersComponentsDictionary,
|
|
430
455
|
a16 as getHeightSizeStyles,
|
|
431
|
-
|
|
456
|
+
g35 as getIconColor,
|
|
432
457
|
g8 as getIsIfInDynamicFilter,
|
|
433
458
|
g22 as getLoadingErrorComponentsDictionary,
|
|
434
459
|
g24 as getMFLoaderComponentsDictionary,
|
|
@@ -437,27 +462,29 @@ export {
|
|
|
437
462
|
g28 as getModalDictionary,
|
|
438
463
|
g26 as getNoItemPrivilegesComponentsDictionary,
|
|
439
464
|
g25 as getNoItemSelectedComponentsDictionary,
|
|
440
|
-
|
|
465
|
+
g39 as getNullGuard,
|
|
441
466
|
g27 as getObjectLogsComponentsDictionary,
|
|
442
467
|
g11 as getPagerComponentsDictionary,
|
|
443
|
-
|
|
468
|
+
g33 as getPaletteColor,
|
|
444
469
|
g21 as getPeriodComponetsDictionary,
|
|
445
470
|
g20 as getRHFAutocompleteAsyncComponentsDictionary,
|
|
446
471
|
g19 as getRHFAutocompleteComponentsDictionary,
|
|
447
472
|
g9 as getRawFiltersForNetwork,
|
|
448
473
|
g10 as getRawSortsForNetwork,
|
|
449
|
-
|
|
450
|
-
|
|
474
|
+
g36 as getSizeStyles,
|
|
475
|
+
g29 as getStepperComponentsDictionary,
|
|
476
|
+
g40 as getStepsAndValidationSchema,
|
|
477
|
+
g34 as getTypographyStyles,
|
|
451
478
|
g13 as getUncertaintyFormat,
|
|
452
|
-
|
|
453
|
-
|
|
479
|
+
g38 as getValidDate,
|
|
480
|
+
g31 as getformAddEditDictionary,
|
|
454
481
|
i as isEqualLayout,
|
|
455
482
|
k as isEqualLayouts,
|
|
456
483
|
i2 as isValidDate,
|
|
457
484
|
r as rhfPeriodStyles,
|
|
458
485
|
t as toggleButtonStyles,
|
|
459
486
|
t2 as toggleIconButtonStyles,
|
|
460
|
-
|
|
487
|
+
u18 as useAppearanceComponentStore,
|
|
461
488
|
u as useAreasStore,
|
|
462
489
|
u2 as useColumnBoolean,
|
|
463
490
|
u11 as useColumnChipStatus,
|
|
@@ -469,24 +496,25 @@ export {
|
|
|
469
496
|
u8 as useColumnPrice,
|
|
470
497
|
u9 as useColumnSetCheck,
|
|
471
498
|
u10 as useColumnUncertanity,
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
499
|
+
u24 as useComponentSize,
|
|
500
|
+
u17 as useCustomForm,
|
|
501
|
+
u29 as useDataGridPersistence,
|
|
502
|
+
u28 as useDynamicFilterAndSort,
|
|
476
503
|
u15 as useDynamicMFParameters,
|
|
477
504
|
a11 as useDynamicMFParametersStore,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
505
|
+
u19 as useFormAddEdit,
|
|
506
|
+
u22 as useFormFocus,
|
|
507
|
+
u25 as useFormReadyForUpdate,
|
|
481
508
|
u12 as useFormatPeriod,
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
509
|
+
u23 as useInterval,
|
|
510
|
+
u31 as useIsVisible,
|
|
511
|
+
u20 as useModal,
|
|
512
|
+
u30 as usePopoverContainer,
|
|
486
513
|
u13 as usePopupsStore,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
514
|
+
u26 as useStateRef,
|
|
515
|
+
u16 as useStepper,
|
|
516
|
+
u27 as useSvgColor,
|
|
517
|
+
u21 as useTab,
|
|
490
518
|
u14 as useWindowToolsMF,
|
|
491
519
|
v2 as varBounce,
|
|
492
520
|
v3 as varContainer,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare function useSteps(withVisibilityConditions?: boolean): {
|
|
5
5
|
validationSchema: import('yup').ObjectSchema<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, Record<string, any>>, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, Record<string, any>>>, import('yup/lib/object').AssertsShape<import('yup/lib/object').Assign<import('yup/lib/object').ObjectShape, Record<string, any>>>>;
|
|
6
|
-
steps: import('../../../../src
|
|
6
|
+
steps: import('../../../../src').TypeStep[];
|
|
7
7
|
visibilityData: {
|
|
8
8
|
objectId: any;
|
|
9
9
|
};
|
|
@@ -5,5 +5,5 @@ interface StepperDecoratorProps extends Omit<StepperProps, 'steps'> {
|
|
|
5
5
|
/**
|
|
6
6
|
* Decorator para Storybook
|
|
7
7
|
*/
|
|
8
|
-
export declare function StepperDecorator({ withVisibilityConditions, }: StepperDecoratorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function StepperDecorator({ withVisibilityConditions, orientation, visibleTitle, indicatorType, }: StepperDecoratorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|