@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.
Files changed (70) hide show
  1. package/@types/types.d.ts +207 -61
  2. package/components/DataGrid/contexts/DataGridContext/index.js +3 -3
  3. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +0 -2
  4. package/components/DataGrid/types.d.ts +1 -2
  5. package/components/DynamicFilter/types.d.ts +1 -0
  6. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
  7. package/components/Stepper/Stepper.d.ts +8 -0
  8. package/components/Stepper/Stepper.styles.d.ts +2 -0
  9. package/components/Stepper/constants.d.ts +2 -0
  10. package/components/Stepper/dictionary.d.ts +8 -0
  11. package/components/Stepper/helpers/evaluateVisibilityStepCondition/index.d.ts +9 -0
  12. package/components/Stepper/helpers/findNextVisibleValidStep/index.d.ts +10 -0
  13. package/components/Stepper/helpers/findPrevVisibleValidStep/index.d.ts +10 -0
  14. package/components/Stepper/helpers/index.d.ts +4 -0
  15. package/components/Stepper/helpers/isLastVisibleValidStep/index.d.ts +10 -0
  16. package/components/Stepper/hooks/useIsLastVisibleValidStep/index.d.ts +6 -0
  17. package/components/Stepper/hooks/useStepper/index.d.ts +5 -0
  18. package/components/Stepper/hooks/useStepperActions/index.d.ts +1 -0
  19. package/components/Stepper/hooks/useStepperActions/useStepperActions.d.ts +8 -0
  20. package/components/Stepper/icons.d.ts +9 -0
  21. package/components/Stepper/index.d.ts +9 -0
  22. package/components/Stepper/slots/StepperEnum.d.ts +26 -0
  23. package/components/Stepper/slots/StepperSlot.d.ts +57 -0
  24. package/components/Stepper/store/StepperContext/index.d.ts +12 -0
  25. package/components/Stepper/store/StepperStore/index.d.ts +16 -0
  26. package/components/Stepper/store/types.d.ts +78 -0
  27. package/components/Stepper/subcomponents/ContentArea/index.d.ts +6 -0
  28. package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperIcon/index.d.ts +4 -0
  29. package/components/Stepper/subcomponents/ContentArea/subcomponents/WrapperTitle/index.d.ts +4 -0
  30. package/components/Stepper/subcomponents/StepArea/index.d.ts +6 -0
  31. package/components/Stepper/subcomponents/StepArea/subcomponents/Inidicator/index.d.ts +5 -0
  32. package/components/Stepper/subcomponents/StepperButtons/StepperCancelButton/index.d.ts +4 -0
  33. package/components/Stepper/subcomponents/StepperButtons/StepperNextButton/index.d.ts +4 -0
  34. package/components/Stepper/subcomponents/StepperButtons/StepperPrevButton/index.d.ts +4 -0
  35. package/components/Stepper/subcomponents/StepperButtons/StepperSubmitButton/index.d.ts +4 -0
  36. package/components/Stepper/subcomponents/StepperButtons/index.d.ts +4 -0
  37. package/components/Stepper/subcomponents/StepperContent/index.d.ts +7 -0
  38. package/components/Stepper/subcomponents/StepperContent/subcomponents/Step/index.d.ts +6 -0
  39. package/components/Stepper/subcomponents/StepperFooter/index.d.ts +6 -0
  40. package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterLeftActions/index.d.ts +6 -0
  41. package/components/Stepper/subcomponents/StepperFooter/subcomponents/StepperFooterRightActions/index.d.ts +6 -0
  42. package/components/Stepper/types.d.ts +156 -0
  43. package/components/areas/contexts/AreasContext/store.js +2 -2
  44. package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
  45. package/components/hook-form/RHFormContext/index.d.ts +1 -1
  46. package/components/hook-form/RHFormContext/index.js +5 -4
  47. package/components/hook-form/RHFormContext/types.d.ts +3 -1
  48. package/components/mui_extended/Select/Select.js +1 -0
  49. package/components/mui_extended/Select/Select.styles.js +11 -3
  50. package/helpers/getStepsAndValidationSchema/getStepsAndValidationSchema.d.ts +11 -0
  51. package/helpers/getStepsAndValidationSchema/index.d.ts +1 -0
  52. package/helpers/getStepsAndValidationSchema/types.d.ts +21 -0
  53. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +2 -1
  54. package/package.json +1 -1
  55. package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +0 -2
  56. package/storybook/components/Stepper/Stepper.stories.d.ts +28 -0
  57. package/storybook/components/Stepper/api/userApi.d.ts +6 -0
  58. package/storybook/components/Stepper/components/AdminPermissionsStep.d.ts +4 -0
  59. package/storybook/components/Stepper/components/CompanySocialMediaStep.d.ts +4 -0
  60. package/storybook/components/Stepper/components/CompanyStep.d.ts +4 -0
  61. package/storybook/components/Stepper/components/ContactStep.d.ts +4 -0
  62. package/storybook/components/Stepper/components/ExtraInformationStep.d.ts +4 -0
  63. package/storybook/components/Stepper/components/ModulePermissionsStep.d.ts +4 -0
  64. package/storybook/components/Stepper/components/PrivilegesStep.d.ts +4 -0
  65. package/storybook/components/Stepper/helpers/useSteps.d.ts +43 -0
  66. package/storybook/components/Stepper/subcomponents/StepperDecorator.d.ts +9 -0
  67. package/storybook/components/Stepper/validations/CompanyData.d.ts +18 -0
  68. package/storybook/components/Stepper/validations/ContactData.d.ts +11 -0
  69. package/storybook/components/Stepper/validations/ExtraInformationData.d.ts +9 -0
  70. 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,6 @@
1
+ /**
2
+ * Simula la creación de un nuevo usuario
3
+ * @param formData - Datos del formulario de usuario
4
+ * @returns Promise con el usuario creado incluyendo el ID generado
5
+ */
6
+ export declare const createUser: (formData: any) => Promise<any>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente para permisos de administración.
3
+ */
4
+ export declare function AdminPermissionsStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente para redes sociales de la empresa.
3
+ */
4
+ export declare function CompanySocialMediaStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Paso de datos de empresa para el Stepper que contiene campos de formulario para información empresarial.
3
+ */
4
+ export declare function CompanyStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Paso de contacto para el Stepper que contiene campos de formulario para datos de contacto.
3
+ */
4
+ export declare function ContactStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Paso de información adicional para el Stepper que contiene campos de formulario para exta información del usuario
3
+ */
4
+ export declare function ExtraInformationStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Componente para permisos de módulos.
3
+ */
4
+ export declare function ModulePermissionsStep(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Paso de privilegios para el Stepper que contiene campos de formulario para los privilegios del usuario.
3
+ */
4
+ export declare function PrivilegesStep(): import("react/jsx-runtime").JSX.Element;
@@ -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
+ };