@m4l/components 0.1.64 → 0.1.66

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 (126) hide show
  1. package/@types/export.d.ts +8 -0
  2. package/components/CommonActions/components/ActionCancel/{index.2eb2c1e1.js → index.4d0333c0.js} +1 -1
  3. package/components/CommonActions/components/ActionFormCancel/{index.2864d574.js → index.298e0109.js} +11 -18
  4. package/components/CommonActions/components/ActionFormIntro/{index.e7f83ddd.js → index.b45922ff.js} +1 -1
  5. package/components/CommonActions/components/ActionIntro/{index.0d138cb3.js → index.138101aa.js} +2 -2
  6. package/components/CommonActions/components/Actions/{index.433cd345.js → index.77574633.js} +11 -18
  7. package/components/DataGrid/{index.42521a55.js → index.ef23d0a9.js} +28 -35
  8. package/components/DynamicFilter/{index.442bda79.js → index.04ed3d58.js} +34 -46
  9. package/components/DynamicFilter/index.d.ts +1 -1
  10. package/components/HelperText/{index.3c07ca2a.js → index.c35dcb93.js} +10 -10
  11. package/components/Icon/{index.0f9b360e.js → index.fbeeacc8.js} +2 -2
  12. package/components/Icon/tests/utils.d.ts +1 -1
  13. package/components/Image/{index.1a9c0327.js → index.77396f79.js} +1 -1
  14. package/components/LanguagePopover/{index.68de7176.js → index.c0fc94c7.js} +11 -11
  15. package/components/ModalDialog/{index.3efe049b.js → index.e600b43a.js} +5 -5
  16. package/components/NavLink/{index.ae9f1cc9.js → index.3f4e2417.js} +11 -11
  17. package/components/NoItemSelected/{index.7cfd7613.js → index.609c3c20.js} +1 -1
  18. package/components/ObjectLogs/{index.b50726fb.js → index.7f93ba51.js} +14 -21
  19. package/components/PaperForm/{index.44bf4469.js → index.fb4fa784.js} +1 -1
  20. package/components/Period/{index.99feb99e.js → index.0c5bf66f.js} +12 -19
  21. package/components/Resizeable/{index.b5d42efb.js → index.4545dd6a.js} +3 -3
  22. package/components/SideBar/{index.011880b6.js → index.7d970041.js} +7 -7
  23. package/components/areas/components/AreasAdmin/classes/index.d.ts +5 -0
  24. package/components/areas/components/AreasAdmin/classes/types.d.ts +11 -0
  25. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +1 -1
  26. package/components/areas/components/AreasViewer/classes/index.d.ts +5 -0
  27. package/components/areas/components/AreasViewer/classes/types.d.ts +19 -0
  28. package/components/areas/components/AreasViewer/index.d.ts +7 -0
  29. package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/contexts}/AreaContext/helper.d.ts +2 -2
  30. package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/contexts}/AreaContext/index.d.ts +3 -3
  31. package/components/areas/components/AreasViewer/subcomponents/Area/contexts/AreaContext/store.d.ts +11 -0
  32. package/components/areas/{contexts/AreaContext/store.d.ts → components/AreasViewer/subcomponents/Area/contexts/AreaContext/types.d.ts} +29 -16
  33. package/components/areas/components/AreasViewer/subcomponents/Area/index.d.ts +12 -0
  34. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/GridLayout/index.d.ts +5 -0
  35. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index.d.ts +6 -0
  36. package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts}/WindowContext/store.d.ts +8 -3
  37. package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts}/WindowContext/types.d.ts +1 -1
  38. package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/index.d.ts +1 -1
  39. package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/index.d.ts +1 -1
  40. package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/Component/index.d.ts +1 -1
  41. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/helper.d.ts +3 -0
  42. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/Header/subcomponents/MainActions/index.d.ts +1 -0
  43. package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/index.d.ts +1 -1
  44. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/types.d.ts +8 -0
  45. package/components/areas/components/{WindowModal → AreasViewer/subcomponents/Area/subcomponents/WindowModal}/index.d.ts +1 -1
  46. package/components/areas/components/{WindowPopUp → AreasViewer/subcomponents/Area/subcomponents/WindowPopUp}/index.d.ts +1 -1
  47. package/components/areas/components/{Area → AreasViewer/subcomponents/Area}/types.d.ts +6 -11
  48. package/components/areas/components/index.d.ts +3 -4
  49. package/components/areas/constants.d.ts +3 -0
  50. package/components/areas/contexts/AreasContext/index.d.ts +10 -4
  51. package/components/areas/contexts/AreasContext/store.d.ts +8 -29
  52. package/components/areas/contexts/AreasContext/types.d.ts +119 -0
  53. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +3 -2
  54. package/components/areas/dictionary.d.ts +9 -14
  55. package/components/areas/hooks/useArea/index.d.ts +1 -1
  56. package/components/areas/hooks/useAreas/index.d.ts +1 -1
  57. package/components/areas/hooks/useWindow/index.d.ts +1 -1
  58. package/components/areas/icons.d.ts +8 -0
  59. package/components/areas/index.d.ts +1 -0
  60. package/components/areas/index.d7519516.js +2416 -0
  61. package/components/formatters/BooleanFormatter/{index.cd00c8e1.js → index.0edacc9b.js} +1 -1
  62. package/components/formatters/{index.deae4701.js → index.879170b2.js} +2 -2
  63. package/components/hook-form/RHFAutocomplete/{index.083e23c1.js → index.5f27e28c.js} +13 -12
  64. package/components/hook-form/RHFAutocomplete/test/constants.d.ts +1 -0
  65. package/components/hook-form/RHFAutocomplete/test/utils.d.ts +1 -1
  66. package/components/hook-form/RHFAutocompleteAsync/{index.ba751be9.js → index.35e17cd6.js} +2 -2
  67. package/components/hook-form/RHFCheckbox/{index.c19393b1.js → index.4f134f09.js} +3 -3
  68. package/components/hook-form/RHFPeriod/{index.c0a80aeb.js → index.dcaa0c87.js} +2 -2
  69. package/components/hook-form/RHFTextField/{index.97485ff2.js → index.fc90a570.js} +13 -13
  70. package/components/hook-form/RHFUpload/{index.798eb11d.js → index.654ad316.js} +1 -1
  71. package/components/index.d.ts +1 -3
  72. package/components/modal/{WindowBase.59f50553.js → WindowBase.230a498f.js} +3 -3
  73. package/components/modal/{WindowConfirm.c1339cf8.js → WindowConfirm.575b4d41.js} +14 -21
  74. package/components/modal/index.237881ea.js +23 -0
  75. package/components/mui_extended/Accordion/{index.b7487e37.js → index.0b15f939.js} +2 -2
  76. package/components/mui_extended/Button/{index.d9e0ae2e.js → index.b7b70e5f.js} +3 -3
  77. package/components/mui_extended/IconButton/{index.be9c2ce5.js → index.a5072cd3.js} +15 -11
  78. package/components/mui_extended/IconButton/types.d.ts +1 -1
  79. package/components/mui_extended/MenuActions/icons.d.ts +3 -0
  80. package/components/mui_extended/MenuActions/{index.ec654122.js → index.3a275abb.js} +21 -20
  81. package/components/mui_extended/MenuActions/types.d.ts +5 -6
  82. package/components/mui_extended/Pager/{index.9e123670.js → index.5a69ab10.js} +5 -5
  83. package/components/mui_extended/Popover/{index.260aae81.js → index.e271e4f0.js} +1 -0
  84. package/components/mui_extended/Typography/{index.41b60a6b.js → index.eab3d85c.js} +1 -1
  85. package/components/mui_extended/index.35f74599.js +19 -0
  86. package/contexts/ModalContext/{index.ae8041f3.js → index.de0a3457.js} +1 -1
  87. package/hooks/useModal/{index.5c159ed2.js → index.e103db09.js} +1 -1
  88. package/index.js +118 -132
  89. package/package.json +2 -3
  90. package/{react-draggable.1aa81436.js → react-draggable.4d08d714.js} +1 -1
  91. package/{react-resizable.e86cb01e.js → react-resizable.23b980cb.js} +5 -4
  92. package/utils/{index.e199226a.js → index.c2e62d8f.js} +32 -32
  93. package/{vendor.a15d263e.js → vendor.be57c149.js} +43 -52
  94. package/components/areas/components/Area/index.d.ts +0 -5
  95. package/components/areas/components/AreasAdmin/index.51e28f63.js +0 -120
  96. package/components/areas/components/AreasContainer/index.1e5e6e91.js +0 -37
  97. package/components/areas/components/AreasContainer/index.d.ts +0 -1
  98. package/components/areas/components/GridLayout/index.5bf8d5e4.js +0 -103
  99. package/components/areas/components/GridLayout/index.d.ts +0 -1
  100. package/components/areas/components/Window/icons.d.ts +0 -3
  101. package/components/areas/components/Window/index.416a874f.js +0 -855
  102. package/components/areas/components/Window/subcomponents/InnerForHooks/subcomponents/MicroFrontend/types.d.ts +0 -8
  103. package/components/areas/components/WindowPopUp/index.f053fca7.js +0 -118
  104. package/components/areas/components/WindowsPanel/index.d.ts +0 -1
  105. package/components/areas/components/index.eace295a.js +0 -77
  106. package/components/areas/contexts/AreaContext/index.7890e58d.js +0 -509
  107. package/components/areas/contexts/AreaContext/types.d.ts +0 -20
  108. package/components/areas/contexts/AreasContext/index.0792a8d1.js +0 -197
  109. package/components/areas/contexts/DynamicMFParmsContext/index.c19cb8cc.js +0 -43
  110. package/components/areas/contexts/index.2a915acf.js +0 -198
  111. package/components/areas/hooks/index.f4d78492.js +0 -27
  112. package/components/areas/hooks/useArea/index.d6263051.js +0 -20
  113. package/components/areas/hooks/useDynamicMFParameters/index.041a666b.js +0 -14
  114. package/components/areas/index.8fca0f8f.js +0 -20
  115. package/components/modal/index.7a84f64d.js +0 -30
  116. package/components/mui_extended/index.459cbd6c.js +0 -19
  117. /package/components/areas/components/{Area → AreasViewer/subcomponents/Area}/subcomponents/InnerForHooks/index.d.ts +0 -0
  118. /package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts}/WindowContext/helper.d.ts +0 -0
  119. /package/components/areas/{contexts → components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts}/WindowContext/index.d.ts +0 -0
  120. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/Header/index.d.ts +0 -0
  121. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/Header/skeleton.d.ts +0 -0
  122. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/index.d.ts +0 -0
  123. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/index.d.ts +0 -0
  124. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/index.d.ts +0 -0
  125. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/subcomponents/NotFound/types.d.ts +0 -0
  126. /package/components/areas/components/{Window → AreasViewer/subcomponents/Area/subcomponents/Window}/subcomponents/InnerForHooks/subcomponents/MicroFrontend/subcomponents/MFLoader/subcomponents/LoadingMF/types.d.ts +0 -0
@@ -1,6 +1,125 @@
1
+ import { GetLabelType, NetworkProps } from '@m4l/core';
1
2
  import { ReactNode } from 'react';
3
+ import { AreaStore } from '../../components/AreasViewer/subcomponents/Area/contexts/AreaContext/store';
4
+ import { AreaType } from '../../components/AreasViewer/subcomponents/Area/types';
5
+ import { ViwerClasses } from '../../components/AreasViewer/classes';
6
+ import { AdminClasses } from '../../components/AreasAdmin/classes';
7
+ /**
8
+ * @description estado de carga de las areaS de trabajo.
9
+ */
10
+ export declare type AreasStatus = 'init' | 'loading' | 'loaded' | 'error';
11
+ export declare type OwnerState = {
12
+ /**
13
+ * "isSkeleton" indica si el componente está en skeleton.
14
+ */
15
+ status: AreasStatus;
16
+ /**
17
+ * "isMobile" cuando el navegador está en modo celular
18
+ */
19
+ isMobile: boolean;
20
+ /**
21
+ * "isSkeleton" indica si el componente está en skeleton.
22
+ */
23
+ isSkeleton: boolean;
24
+ };
25
+ /**
26
+ * @type
27
+ * @name ExternalOwnerState
28
+ * @description Estados que se actulizan por fuera del store, a través de hooks
29
+ */
30
+ export declare type ExternalOwnerState = Pick<OwnerState, 'isMobile' | 'isSkeleton'>;
31
+ /**
32
+ * @interface
33
+ * @description Interface que define el estado del componente (variables y funciones )
34
+ */
35
+ export interface AreasState {
36
+ /**
37
+ * "loadAreasFromNetwork" Indica si se deben cargar/grabar las áreas de trabajo en la API
38
+ */
39
+ loadAreasFromNetwork: boolean;
40
+ /**
41
+ * "loadCookiesFromNetwork" Indica si se deben cargar/grabar las cookies en la API
42
+ */
43
+ loadCookiesFromNetwork: boolean;
44
+ /**
45
+ * "currentArea" Area de trabajo seleccionada
46
+ */
47
+ currentArea: string;
48
+ /**
49
+ * "ownerState" enfocado al funcionamiento de las clases
50
+ */
51
+ ownerState: OwnerState;
52
+ /**
53
+ * "viwerClasses" enfocado al funcionamiento de las clases a nivel de viewer
54
+ */
55
+ viwerClasses: ViwerClasses;
56
+ /**
57
+ * "adminClasses" enfocado al funcionamiento de las clases a nivel de Admin
58
+ */
59
+ adminClasses: AdminClasses;
60
+ /**
61
+ * "areas" Areas de trabajo
62
+ */
63
+ areas: AreaType[];
64
+ /**
65
+ * "networkOperation" funcion que usará el Store para enviar las peticiones de red
66
+ */
67
+ networkOperation: (props: NetworkProps) => Promise<any>;
68
+ /**
69
+ * "getLabel" funcion que usará para traducir las etiquetas de diccionario
70
+ */
71
+ getLabel: GetLabelType;
72
+ }
73
+ export interface AreasStateWithActions extends AreasState {
74
+ actions: {
75
+ /**
76
+ * @description inicializa el componente, si la función onLoad está seteada, se invoca
77
+ */
78
+ init: () => void;
79
+ /**
80
+ * @description Agrega un area de trabajo, si esta activa "loadAreasFromNetwork" llama al API de agregado
81
+ * @returns id del ara de trabajo
82
+ */
83
+ addArea: () => string;
84
+ /**
85
+ *
86
+ * @param newAreaId Id de area a seleccionar
87
+ * @returns
88
+ */
89
+ selectArea: (newAreaId: string) => void;
90
+ /**
91
+ * @description Borra un area de trabajo, si esta activa "loadAreasFromNetwork" llama al API
92
+ * @param areaId Id de area a borrar
93
+ * @returns void
94
+ */
95
+ deleteArea: (areaId: string) => void;
96
+ };
97
+ internalActions: {
98
+ /**
99
+ * @description Actualiza la variable de estado "getLabel"
100
+ * @param newHandler handle o función que va a traducir las etiquetas, esto es necesario debido que getLabel de useModuleDictionary
101
+ * cambia por el useCallback, cuando el diccionario se carga.
102
+ * @returns void
103
+ */
104
+ setHandlerGetLabel: (newHandler: GetLabelType) => void;
105
+ /**
106
+ * @description conecta el store de una Area con el Store de AreaS, para poder lanzar ventanas.
107
+ * @returns void
108
+ */
109
+ setAreaLink: (areaId: string, store: AreaStore) => void;
110
+ /**
111
+ * @description Modifica los estados que se actualizan externamente al Store
112
+ * @param newIsMobile
113
+ * @returns
114
+ */
115
+ setExternalState: (newExternalState: ExternalOwnerState) => void;
116
+ };
117
+ }
118
+ export declare type DefaultAreasStoreProps = Omit<AreasState, 'currentArea'>;
119
+ export declare type InitialAreasStoreProps = Pick<AreasState, 'networkOperation' | 'loadAreasFromNetwork' | 'loadCookiesFromNetwork' | 'getLabel' | 'ownerState'> & Partial<DefaultAreasStoreProps>;
2
120
  export interface AreasProviderProps {
3
121
  children: ReactNode;
4
122
  loadAreasFromNetwork: boolean;
123
+ loadCookiesFromNetwork: boolean;
5
124
  onLoad?: () => void;
6
125
  }
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { MenuAction } from '../../../mui_extended';
3
- import { CookieType } from '../../components/Area/types';
3
+ import { CookieType } from '../../components/AreasViewer/subcomponents/Area/types';
4
4
  export declare type WindowActionType = 'main' | 'allways' | 'normal';
5
5
  export interface ModuleAction extends MenuAction {
6
6
  visibility: WindowActionType;
7
+ key: string;
7
8
  tag?: any;
8
9
  className?: string;
9
10
  }
@@ -11,7 +12,7 @@ export interface WindowToolsMF {
11
12
  getCookie: (id: string) => Record<string, any> | undefined;
12
13
  getWindowId: () => string;
13
14
  getCookies: (type: CookieType) => Record<string, any>;
14
- setActions: (newActions: ModuleAction[]) => void;
15
+ setActions: (newActions: ModuleAction[], version?: string) => void;
15
16
  setCookie: (id: string, type: CookieType, cookie: Record<string, any>) => void;
16
17
  close: () => void;
17
18
  }
@@ -1,14 +1,9 @@
1
- export declare const MODULE_NAME_ADD = "module_name_add";
2
- export declare const MODULE_NAME_EDIT = "module_name_edit";
3
- export declare const LABEL_NEW_AREA = "label_new_area";
4
- export declare const LABEL_DELETE_AREA = "label_delete_area";
5
- export declare const MODAL_DELETE_MESSAGE = "modal_delete_message";
6
- export declare const MODAL_DELETE_TITLE = "modal_delete_title";
7
- export declare const ROW_ACTION_EDIT = "row_action_edit";
8
- export declare const ROW_ACTION_DELETE = "row_action_delete";
9
- export declare const LABEL_ID = "label_id";
10
- export declare const ACCORDION_BASIC_INFORMATION = "accordion_basic_information";
11
- export declare const ACCORDION_CONTACT_DATA = "accordion_contact_data";
12
- export declare const LABEL_ROLE_NAME = "label_role_name";
13
- export declare const LABEL_PRIVILEGE_NAME = "label_privilege_name";
14
- export declare const LABEL_PRIVILEGE_ACTIVE = "label_privilege_active";
1
+ export declare const AREAS_DICTIONARY_ID = "areas";
2
+ export declare function getAreasComponentsDictionary(): string[];
3
+ export declare const LABEL_FILTER_BUTTON = "filter_tooltip";
4
+ export declare const DICCTIONARY: {
5
+ readonly label_new_area: "label_new_area";
6
+ readonly label_persist_module_cookies: "label_persist_module_cookies";
7
+ };
8
+ export declare type TypeDictionary = typeof DICCTIONARY;
9
+ export declare const getAreasDictionary: (key: keyof TypeDictionary) => string;
@@ -1,4 +1,4 @@
1
- import { AreaStateWithActions } from '../../contexts/AreaContext/store';
1
+ import { AreaStateWithActions } from '../../components/AreasViewer/subcomponents/Area/contexts/AreaContext/types';
2
2
  export declare const useArea: () => Omit<Omit<import("zustand").StoreApi<AreaStateWithActions>, "setState"> & {
3
3
  setState<A extends string | {
4
4
  type: unknown;
@@ -1,4 +1,4 @@
1
- import { AreasStateWithActions } from '../../contexts/AreasContext/store';
1
+ import { AreasStateWithActions } from '../../contexts/AreasContext/types';
2
2
  export declare function useAreas(): Omit<Omit<import("zustand").StoreApi<AreasStateWithActions>, "setState"> & {
3
3
  setState<A extends string | {
4
4
  type: unknown;
@@ -1,4 +1,4 @@
1
- import { WindowStateWithActions } from '../../contexts/WindowContext/store';
1
+ import { WindowStateWithActions } from '../../components/AreasViewer/subcomponents/Area/subcomponents/Window/contexts/WindowContext/store';
2
2
  export declare const useWindow: () => Omit<Omit<import("zustand").StoreApi<WindowStateWithActions>, "setState"> & {
3
3
  setState<A extends string | {
4
4
  type: unknown;
@@ -0,0 +1,8 @@
1
+ export declare const ICONS: {
2
+ CLOSE: string;
3
+ MAXIMIZE: string;
4
+ NORMALIZE: string;
5
+ DELETE_AREA: string;
6
+ ADD_AREA: string;
7
+ EDIT_AREA: string;
8
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './contexts';
3
3
  export * from './hooks';
4
+ export * from './dictionary';