@m4l/components 9.3.10 → 9.3.12-JT270825.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/@types/types.d.ts +207 -61
- package/components/DataGrid/contexts/DataGridContext/index.js +3 -3
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
- package/components/DataGrid/types.d.ts +1 -2
- package/components/DynamicFilter/types.d.ts +1 -0
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
- package/components/Stepper/Stepper.d.ts +8 -0
- package/components/Stepper/Stepper.styles.d.ts +2 -0
- package/components/Stepper/constants.d.ts +2 -0
- package/components/Stepper/dictionary.d.ts +8 -0
- package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.d.ts +9 -0
- package/components/Stepper/helpers/findNextVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/findPrevVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/helpers/index.d.ts +4 -0
- package/components/Stepper/helpers/isLastVisibleValidStep/index.d.ts +10 -0
- package/components/Stepper/hooks/useIsLastVisibleValidStep/index.d.ts +6 -0
- package/components/Stepper/hooks/useStepper/index.d.ts +5 -0
- package/components/Stepper/hooks/useStepperActions/index.d.ts +1 -0
- package/components/Stepper/hooks/useStepperActions/useStepperActions.d.ts +8 -0
- package/components/Stepper/icons.d.ts +9 -0
- package/components/Stepper/index.d.ts +9 -0
- package/components/Stepper/slots/StepperEnum.d.ts +26 -0
- package/components/Stepper/slots/StepperSlot.d.ts +57 -0
- package/components/Stepper/store/StepperContext/index.d.ts +12 -0
- package/components/Stepper/store/StepperStore/index.d.ts +16 -0
- package/components/Stepper/store/types.d.ts +78 -0
- package/components/Stepper/subcomponents/ContentArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.d.ts +4 -0
- package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepArea/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts +5 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperButtons/index.d.ts +4 -0
- package/components/Stepper/subcomponents/StepperContent/index.d.ts +7 -0
- package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.d.ts +6 -0
- package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.d.ts +6 -0
- package/components/Stepper/types.d.ts +156 -0
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
- package/components/hook-form/RHFormContext/index.d.ts +1 -1
- package/components/hook-form/RHFormContext/index.js +5 -4
- package/components/hook-form/RHFormContext/types.d.ts +3 -1
- package/components/mui_extended/Select/Select.js +1 -0
- package/components/mui_extended/Select/Select.styles.js +11 -3
- package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.d.ts +11 -0
- package/helpers/getStepsAndValidationSchema/index.d.ts +1 -0
- package/helpers/getStepsAndValidationSchema/types.d.ts +21 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +2 -1
- package/package.json +1 -1
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +0 -2
- package/storybook/components/Stepper/Stepper.stories.d.ts +28 -0
- package/storybook/components/Stepper/api/userApi.d.ts +6 -0
- package/storybook/components/Stepper/components/AdminPermissionsStep.d.ts +4 -0
- package/storybook/components/Stepper/components/CompanySocialMediaStep.d.ts +4 -0
- package/storybook/components/Stepper/components/CompanyStep.d.ts +4 -0
- package/storybook/components/Stepper/components/ContactStep.d.ts +4 -0
- package/storybook/components/Stepper/components/ExtraInformationStep.d.ts +4 -0
- package/storybook/components/Stepper/components/ModulePermissionsStep.d.ts +4 -0
- package/storybook/components/Stepper/components/PrivilegesStep.d.ts +4 -0
- package/storybook/components/Stepper/helpers/useSteps.d.ts +43 -0
- package/storybook/components/Stepper/subcomponents/StepperDecorator.d.ts +9 -0
- package/storybook/components/Stepper/validations/CompanyData.d.ts +18 -0
- package/storybook/components/Stepper/validations/ContactData.d.ts +11 -0
- package/storybook/components/Stepper/validations/ExtraInformationData.d.ts +9 -0
- package/storybook/components/Stepper/validations/PrivilegesData.d.ts +14 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { StepperDecorator } from './subcomponents/StepperDecorator';
|
|
3
|
+
declare const meta: Meta<typeof StepperDecorator>;
|
|
4
|
+
type Story = StoryObj<typeof StepperDecorator>;
|
|
5
|
+
/**
|
|
6
|
+
* Historia por default - Stepper básico sin visibilityConditions
|
|
7
|
+
*/
|
|
8
|
+
export declare const Default: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Historia con visibilityConditions - Stepper completo con submit intermedio y visibilityCondition
|
|
11
|
+
*/
|
|
12
|
+
export declare const WithVisibilityConditions: Story;
|
|
13
|
+
/**
|
|
14
|
+
* Story que demuestra automáticamente errores de validación
|
|
15
|
+
* Play para mostrar errores cuando se hace submit sin llenar campos
|
|
16
|
+
*/
|
|
17
|
+
export declare const PVStepperValidationErrors: Story;
|
|
18
|
+
/**
|
|
19
|
+
* Story que demuestra automáticamente el flujo de submit intermedio
|
|
20
|
+
* Play para llenar cada formulario, hacer submit y mostrar cómo aparecen los siguientes pasos
|
|
21
|
+
*/
|
|
22
|
+
export declare const PVStepperIntermediateSubmitFlow: Story;
|
|
23
|
+
/**
|
|
24
|
+
* Story que demuestra automáticamente la navegación entre steps
|
|
25
|
+
* Play para mostrar el flujo de navegación con botones Siguiente y Anterior
|
|
26
|
+
*/
|
|
27
|
+
export declare const PVStepperNavigationFlow: Story;
|
|
28
|
+
export default meta;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook personalizado para manejar la configuración de steps del Stepper en Storybook
|
|
3
|
+
*/
|
|
4
|
+
export declare function useSteps(withVisibilityConditions?: boolean): {
|
|
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/components/Stepper/types').Step[];
|
|
7
|
+
visibilityData: {
|
|
8
|
+
objectId: any;
|
|
9
|
+
};
|
|
10
|
+
onSubmit: (data: any) => Promise<void>;
|
|
11
|
+
formValues: {
|
|
12
|
+
first_name: string;
|
|
13
|
+
last_name: string;
|
|
14
|
+
email: string;
|
|
15
|
+
first_phone: string;
|
|
16
|
+
second_phone: string;
|
|
17
|
+
requires_permissions: boolean;
|
|
18
|
+
user_type: string;
|
|
19
|
+
role: string;
|
|
20
|
+
can_manage_users: boolean;
|
|
21
|
+
can_manage_roles: boolean;
|
|
22
|
+
can_access_system_config: boolean;
|
|
23
|
+
can_view_reports: boolean;
|
|
24
|
+
can_edit_content: boolean;
|
|
25
|
+
can_delete_records: boolean;
|
|
26
|
+
address: string;
|
|
27
|
+
country: string;
|
|
28
|
+
city: string;
|
|
29
|
+
postal_code: string;
|
|
30
|
+
company_name: string;
|
|
31
|
+
company_position: string;
|
|
32
|
+
company_department: string;
|
|
33
|
+
company_phone: string;
|
|
34
|
+
company_email: string;
|
|
35
|
+
company_website: string;
|
|
36
|
+
company_facebook: string;
|
|
37
|
+
company_twitter: string;
|
|
38
|
+
company_linkedin: string;
|
|
39
|
+
company_instagram: string;
|
|
40
|
+
company_youtube: string;
|
|
41
|
+
company_tiktok: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StepperProps } from '../../../../src/components/Stepper/types';
|
|
2
|
+
interface StepperDecoratorProps extends Omit<StepperProps, 'steps'> {
|
|
3
|
+
withVisibilityConditions?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Decorator para Storybook
|
|
7
|
+
*/
|
|
8
|
+
export declare function StepperDecorator({ withVisibilityConditions, }: StepperDecoratorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* Validaciones para el formulario de datos de empresa
|
|
4
|
+
*/
|
|
5
|
+
export declare function CompanyDataValidation(): {
|
|
6
|
+
company_name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
7
|
+
company_position: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
8
|
+
company_department: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
9
|
+
company_phone: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
10
|
+
company_email: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
11
|
+
company_website: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
12
|
+
company_facebook: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
13
|
+
company_twitter: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
14
|
+
company_linkedin: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
15
|
+
company_instagram: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
16
|
+
company_youtube: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
17
|
+
company_tiktok: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* Validaciones para el formulario de datos de contacto
|
|
4
|
+
*/
|
|
5
|
+
export declare function ContactDataValidation(): {
|
|
6
|
+
first_name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
7
|
+
last_name: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
8
|
+
email: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
9
|
+
first_phone: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
10
|
+
second_phone: Yup.StringSchema<string | null | undefined, import('yup/lib/types').AnyObject, string | null | undefined>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validaciones para el formulario de extra información del usuario.
|
|
3
|
+
*/
|
|
4
|
+
export declare function ExtraInformationDataValidation(): {
|
|
5
|
+
address: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
6
|
+
country: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
7
|
+
city: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
8
|
+
postal_code: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
2
|
+
/**
|
|
3
|
+
* Validaciones para el formulario de privilegios de usuario
|
|
4
|
+
*/
|
|
5
|
+
export declare function PrivilegesDataValidation(): {
|
|
6
|
+
user_type: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
7
|
+
role: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
8
|
+
can_manage_users: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
9
|
+
can_manage_roles: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
10
|
+
can_access_system_config: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
11
|
+
can_view_reports: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
12
|
+
can_edit_content: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
13
|
+
can_delete_records: Yup.BooleanSchema<boolean | undefined, import('yup/lib/types').AnyObject, boolean | undefined>;
|
|
14
|
+
};
|