@m4l/core 2.0.25 → 2.0.27-beta.0

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 (209) hide show
  1. package/contexts/AuthContext/AuthContext.d.ts +3 -3
  2. package/contexts/AuthContext/AuthContext.d.ts.map +1 -0
  3. package/contexts/AuthContext/AuthContext.js +64 -88
  4. package/contexts/AuthContext/constants.d.ts +3 -0
  5. package/contexts/AuthContext/constants.d.ts.map +1 -0
  6. package/contexts/AuthContext/constants.js +8 -2
  7. package/contexts/AuthContext/helpers.d.ts +6 -0
  8. package/contexts/AuthContext/helpers.d.ts.map +1 -0
  9. package/contexts/AuthContext/helpers.js +27 -0
  10. package/contexts/AuthContext/index.d.ts +2 -1
  11. package/contexts/AuthContext/index.d.ts.map +1 -0
  12. package/contexts/AuthContext/types.d.ts +13 -0
  13. package/contexts/AuthContext/types.d.ts.map +1 -0
  14. package/contexts/BaseContext/BaseContext.d.ts +2 -1
  15. package/contexts/BaseContext/BaseContext.d.ts.map +1 -0
  16. package/contexts/BaseContext/BaseContext.js +11 -11
  17. package/contexts/BaseContext/index.d.ts +1 -0
  18. package/contexts/BaseContext/index.d.ts.map +1 -0
  19. package/contexts/BaseContext/store.d.ts +1 -0
  20. package/contexts/BaseContext/store.d.ts.map +1 -0
  21. package/contexts/BaseContext/store.js +1 -1
  22. package/contexts/BaseContext/types.d.ts +1 -0
  23. package/contexts/BaseContext/types.d.ts.map +1 -0
  24. package/contexts/DomainContext/index.d.ts +2 -1
  25. package/contexts/DomainContext/index.d.ts.map +1 -0
  26. package/contexts/DomainContext/index.js +23 -23
  27. package/contexts/DomainContext/types.d.ts +1 -0
  28. package/contexts/DomainContext/types.d.ts.map +1 -0
  29. package/contexts/DomainCountryContext/index.d.ts +2 -1
  30. package/contexts/DomainCountryContext/index.d.ts.map +1 -0
  31. package/contexts/DomainCountryContext/index.js +18 -18
  32. package/contexts/DomainCountryContext/types.d.ts +1 -0
  33. package/contexts/DomainCountryContext/types.d.ts.map +1 -0
  34. package/contexts/EnvironmentContext/index.d.ts +2 -1
  35. package/contexts/EnvironmentContext/index.d.ts.map +1 -0
  36. package/contexts/EnvironmentContext/index.js +9 -9
  37. package/contexts/EnvironmentContext/types.d.ts +1 -0
  38. package/contexts/EnvironmentContext/types.d.ts.map +1 -0
  39. package/contexts/FlagsContext/index.d.ts +3 -2
  40. package/contexts/FlagsContext/index.d.ts.map +1 -0
  41. package/contexts/FlagsContext/index.js +9 -9
  42. package/contexts/FlagsContext/store.d.ts +2 -1
  43. package/contexts/FlagsContext/store.d.ts.map +1 -0
  44. package/contexts/FlagsContext/store.js +4 -4
  45. package/contexts/FlagsContext/types.d.ts +1 -0
  46. package/contexts/FlagsContext/types.d.ts.map +1 -0
  47. package/contexts/HostToolsContext/index.d.ts +2 -1
  48. package/contexts/HostToolsContext/index.d.ts.map +1 -0
  49. package/contexts/HostToolsContext/index.js +7 -7
  50. package/contexts/HostToolsContext/types.d.ts +1 -0
  51. package/contexts/HostToolsContext/types.d.ts.map +1 -0
  52. package/contexts/ModuleDictionaryContext/index.d.ts +2 -1
  53. package/contexts/ModuleDictionaryContext/index.d.ts.map +1 -0
  54. package/contexts/ModuleDictionaryContext/index.js +21 -21
  55. package/contexts/ModuleDictionaryContext/types.d.ts +1 -0
  56. package/contexts/ModuleDictionaryContext/types.d.ts.map +1 -0
  57. package/contexts/ModulePrivilegesContext/index.d.ts +2 -1
  58. package/contexts/ModulePrivilegesContext/index.d.ts.map +1 -0
  59. package/contexts/ModulePrivilegesContext/index.js +10 -10
  60. package/contexts/ModulePrivilegesContext/types.d.ts +1 -0
  61. package/contexts/ModulePrivilegesContext/types.d.ts.map +1 -0
  62. package/contexts/ModuleSkeletonContext/index.d.ts +2 -1
  63. package/contexts/ModuleSkeletonContext/index.d.ts.map +1 -0
  64. package/contexts/ModuleSkeletonContext/index.js +9 -9
  65. package/contexts/ModuleSkeletonContext/types.d.ts +1 -0
  66. package/contexts/ModuleSkeletonContext/types.d.ts.map +1 -0
  67. package/contexts/NetworkContext/index.d.ts +2 -1
  68. package/contexts/NetworkContext/index.d.ts.map +1 -0
  69. package/contexts/NetworkContext/index.js +10 -10
  70. package/contexts/NetworkContext/types.d.ts +1 -0
  71. package/contexts/NetworkContext/types.d.ts.map +1 -0
  72. package/contexts/index.d.ts +1 -0
  73. package/contexts/index.d.ts.map +1 -0
  74. package/hooks/index.d.ts +1 -0
  75. package/hooks/index.d.ts.map +1 -0
  76. package/hooks/useAuth/index.d.ts +1 -0
  77. package/hooks/useAuth/index.d.ts.map +1 -0
  78. package/hooks/useAuth/useAuth.d.ts +1 -0
  79. package/hooks/useAuth/useAuth.d.ts.map +1 -0
  80. package/hooks/useAuth/useAuth.js +5 -4
  81. package/hooks/useBase/index.d.ts +1 -0
  82. package/hooks/useBase/index.d.ts.map +1 -0
  83. package/hooks/useBase/useBase.d.ts +1 -0
  84. package/hooks/useBase/useBase.d.ts.map +1 -0
  85. package/hooks/useBase/useBase.js +10 -9
  86. package/hooks/useDomain/index.d.ts +1 -0
  87. package/hooks/useDomain/index.d.ts.map +1 -0
  88. package/hooks/useDomain/index.js +8 -7
  89. package/hooks/useDomainCountry/index.d.ts +1 -0
  90. package/hooks/useDomainCountry/index.d.ts.map +1 -0
  91. package/hooks/useDomainCountry/index.js +2 -2
  92. package/hooks/useEnvironment/index.d.ts +1 -0
  93. package/hooks/useEnvironment/index.d.ts.map +1 -0
  94. package/hooks/useEnvironment/index.js +8 -7
  95. package/hooks/useFlagsStore/index.d.ts +1 -0
  96. package/hooks/useFlagsStore/index.d.ts.map +1 -0
  97. package/hooks/useFlagsStore/index.js +9 -9
  98. package/hooks/useHostTools/index.d.ts +1 -0
  99. package/hooks/useHostTools/index.d.ts.map +1 -0
  100. package/hooks/useHostTools/index.js +3 -2
  101. package/hooks/useLocalStorage/index.d.ts +1 -0
  102. package/hooks/useLocalStorage/index.d.ts.map +1 -0
  103. package/hooks/useLocalStorage/index.js +4 -4
  104. package/hooks/useLocalStorageWithListener/index.d.ts +1 -0
  105. package/hooks/useLocalStorageWithListener/index.d.ts.map +1 -0
  106. package/hooks/useLocalStorageWithListener/index.js +2 -1
  107. package/hooks/useModuleDictionary/index.d.ts +1 -0
  108. package/hooks/useModuleDictionary/index.d.ts.map +1 -0
  109. package/hooks/useModuleDictionary/index.js +2 -2
  110. package/hooks/useModulePrivileges/index.d.ts +1 -0
  111. package/hooks/useModulePrivileges/index.d.ts.map +1 -0
  112. package/hooks/useModulePrivileges/index.js +3 -3
  113. package/hooks/useModuleSkeleton/index.d.ts +1 -0
  114. package/hooks/useModuleSkeleton/index.d.ts.map +1 -0
  115. package/hooks/useModuleSkeleton/index.js +3 -3
  116. package/hooks/useNetwork/index.d.ts +1 -0
  117. package/hooks/useNetwork/index.d.ts.map +1 -0
  118. package/hooks/useNetwork/index.js +3 -2
  119. package/hooks/usePaginate/index.d.ts +1 -0
  120. package/hooks/usePaginate/index.d.ts.map +1 -0
  121. package/hooks/usePaginate/index.js +19 -19
  122. package/hooks/usePaginate/types.d.ts +1 -0
  123. package/hooks/usePaginate/types.d.ts.map +1 -0
  124. package/hooks/usePaginate/types.js +2 -2
  125. package/hooks/usePropageteMF/index.d.ts +1 -0
  126. package/hooks/usePropageteMF/index.d.ts.map +1 -0
  127. package/hooks/usePropageteMF/index.js +6 -6
  128. package/hooks/usePropageteMF/types.d.ts +1 -0
  129. package/hooks/usePropageteMF/types.d.ts.map +1 -0
  130. package/index.d.ts +1 -0
  131. package/index.d.ts.map +1 -0
  132. package/index.js +68 -68
  133. package/package.json +29 -52
  134. package/test/constants.d.ts +2 -0
  135. package/test/constants.d.ts.map +1 -0
  136. package/test/index.d.ts +1 -0
  137. package/test/index.d.ts.map +1 -0
  138. package/test/mocks.d.ts +9 -7
  139. package/test/mocks.d.ts.map +1 -0
  140. package/test/setup.d.ts +1 -0
  141. package/test/setup.d.ts.map +1 -0
  142. package/test/types.d.ts +1 -0
  143. package/test/types.d.ts.map +1 -0
  144. package/test/utils.d.ts +2 -2
  145. package/test/utils.d.ts.map +1 -0
  146. package/types/dictionary.d.ts +1 -0
  147. package/types/dictionary.d.ts.map +1 -0
  148. package/types/index.d.ts +2 -1
  149. package/types/index.d.ts.map +1 -0
  150. package/types/index.js +2 -2
  151. package/utils/axiosOperation/index.d.ts +1 -0
  152. package/utils/axiosOperation/index.d.ts.map +1 -0
  153. package/utils/axiosOperation/index.js +15 -15
  154. package/utils/axiosOperation/types.d.ts +1 -0
  155. package/utils/axiosOperation/types.d.ts.map +1 -0
  156. package/utils/evaluateWithContext/index.d.ts +1 -0
  157. package/utils/evaluateWithContext/index.d.ts.map +1 -0
  158. package/utils/evaluateWithContext/index.js +1 -1
  159. package/utils/getLocalStorage/index.d.ts +1 -0
  160. package/utils/getLocalStorage/index.d.ts.map +1 -0
  161. package/utils/getLocalStorage/index.js +1 -1
  162. package/utils/getPropertyByString/index.d.ts +1 -0
  163. package/utils/getPropertyByString/index.d.ts.map +1 -0
  164. package/utils/getPropertyByString/index.js +4 -4
  165. package/utils/index.d.ts +1 -0
  166. package/utils/index.d.ts.map +1 -0
  167. package/utils/setLocalStorage/index.d.ts +1 -0
  168. package/utils/setLocalStorage/index.d.ts.map +1 -0
  169. package/utils/setLocalStorage/index.js +3 -3
  170. package/utils/voidFunction.d.ts +1 -0
  171. package/utils/voidFunction.d.ts.map +1 -0
  172. package/utils/voidFunction.js +1 -1
  173. package/contexts/AuthContext/AuthContext.test.d.ts +0 -1
  174. package/contexts/AuthContext/index.js +0 -1
  175. package/contexts/BaseContext/index.js +0 -1
  176. package/contexts/BaseContext/index.test.d.ts +0 -1
  177. package/contexts/DomainContext/index.test.d.ts +0 -1
  178. package/contexts/DomainCountryContext/index.test.d.ts +0 -1
  179. package/contexts/EnvironmentContext/index.test.d.ts +0 -1
  180. package/contexts/FlagsContext/index.test.d.ts +0 -1
  181. package/contexts/HostToolsContext/index.test.d.ts +0 -1
  182. package/contexts/ModuleDictionaryContext/index.test.d.ts +0 -1
  183. package/contexts/ModulePrivilegesContext/index.test.d.ts +0 -1
  184. package/contexts/ModuleSkeletonContext/index.test.d.ts +0 -1
  185. package/contexts/NetworkContext/index.test.d.ts +0 -1
  186. package/contexts/index.js +0 -1
  187. package/hooks/index.js +0 -1
  188. package/hooks/useAuth/index.js +0 -1
  189. package/hooks/useAuth/useAuth.test.d.ts +0 -1
  190. package/hooks/useBase/index.js +0 -1
  191. package/hooks/useBase/index.test.d.ts +0 -1
  192. package/hooks/useDomain/index.test.d.ts +0 -1
  193. package/hooks/useDomainCountry/index.test.d.ts +0 -1
  194. package/hooks/useEnvironment/index.test.d.ts +0 -1
  195. package/hooks/useFlagsStore/index.test.d.ts +0 -1
  196. package/hooks/useHostTools/index.test.d.ts +0 -1
  197. package/hooks/useLocalStorage/index.test.d.ts +0 -1
  198. package/hooks/useLocalStorageWithListener/index.test.d.ts +0 -1
  199. package/hooks/useModuleDictionary/index.test.d.ts +0 -1
  200. package/hooks/useModulePrivileges/index.test.d.ts +0 -1
  201. package/hooks/useModuleSkeleton/index.test.d.ts +0 -1
  202. package/hooks/useNetwork/index.test.d.ts +0 -1
  203. package/hooks/usePaginate/index.test.d.ts +0 -1
  204. package/utils/axiosOperation/index.test.d.ts +0 -1
  205. package/utils/getLocalStorage/index.test.d.ts +0 -1
  206. package/utils/getPropertyByString/index.test.d.ts +0 -1
  207. package/utils/index.js +0 -1
  208. package/utils/setLocalStorage/index.test.d.ts +0 -1
  209. package/vite-env.d.ts +0 -4
@@ -1,11 +1,12 @@
1
- import { useContext as t } from "react";
2
- import { E as e } from "../../contexts/EnvironmentContext/index.js";
3
- const s = () => {
4
- const n = t(e);
5
- if (!n)
1
+ import { useContext as n } from "react";
2
+ import { EnvironmentContext as e } from "../../contexts/EnvironmentContext/index.js";
3
+ const i = () => {
4
+ const t = n(e);
5
+ if (!t)
6
6
  throw new Error("useEnvironment context must be use inside EnvironmentContext");
7
- return n;
7
+ return t;
8
8
  };
9
9
  export {
10
- s as u
10
+ i as default,
11
+ i as useEnvironment
11
12
  };
@@ -7,3 +7,4 @@ export declare function useFlagsStore<T>(selector: (state: FlagsStateWithActions
7
7
  * Hook to check if the flags are present
8
8
  */
9
9
  export declare const useFlagsPresent: (compareFlags: Array<Flag>) => boolean;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useFlagsStore/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAIrF;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,CAAC,EAC7C,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,GAC1C,CAAC,CAMH;AAYD;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,cAAc,KAAK,CAAC,IAAI,CAAC,KAAG,OAI3D,CAAC"}
@@ -1,20 +1,20 @@
1
1
  import { useContext as o } from "react";
2
- import { F as i } from "../../contexts/FlagsContext/index.js";
2
+ import { FlagsContext as i } from "../../contexts/FlagsContext/index.js";
3
3
  import { useStore as l } from "zustand";
4
- import { shallow as u } from "zustand/shallow";
5
- function a(t, s) {
4
+ import { shallow as f } from "zustand/shallow";
5
+ function u(t, r) {
6
6
  const e = o(i);
7
7
  if (!e)
8
8
  throw new Error("useFlagsStore context must be use inside FlagsProvider");
9
- return l(e, t, s);
9
+ return l(e, t, r);
10
10
  }
11
- function f(t, s) {
11
+ function g(t, r) {
12
12
  return t.filter(
13
- (r) => s.findIndex((n) => n === r) !== -1
13
+ (s) => r.findIndex((n) => n === s) !== -1
14
14
  ).length === t.length;
15
15
  }
16
- const x = (t) => a((e) => f(t, e.flags), u);
16
+ const x = (t) => u((e) => g(t, e.flags), f);
17
17
  export {
18
- x as a,
19
- a as u
18
+ x as useFlagsPresent,
19
+ u as useFlagsStore
20
20
  };
@@ -3,3 +3,4 @@
3
3
  */
4
4
  export declare const useHostTools: () => import('../..').HostToolsType;
5
5
  export default useHostTools;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useHostTools/index.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,YAAY,qCAMxB,CAAC;AACF,eAAe,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { H as s } from "../../contexts/HostToolsContext/index.js";
2
+ import { HostToolsContext as s } from "../../contexts/HostToolsContext/index.js";
3
3
  const n = () => {
4
4
  const o = t(s);
5
5
  if (!o)
@@ -7,5 +7,6 @@ const n = () => {
7
7
  return o;
8
8
  };
9
9
  export {
10
- n as u
10
+ n as default,
11
+ n as useHostTools
11
12
  };
@@ -2,3 +2,4 @@
2
2
  * Hook to use local storage
3
3
  */
4
4
  export declare function useLocalStorage<ValueType>(key: string, initialValue: ValueType): any[];
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useLocalStorage/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,SA0B9E"}
@@ -1,6 +1,6 @@
1
- import { useState as c } from "react";
1
+ import { useState as s } from "react";
2
2
  function S(o, e) {
3
- const [r, s] = c(() => {
3
+ const [r, c] = s(() => {
4
4
  try {
5
5
  const t = window.localStorage.getItem(o);
6
6
  return t !== null ? typeof e == "string" ? t : JSON.parse(t) : e;
@@ -13,11 +13,11 @@ function S(o, e) {
13
13
  window.localStorage.setItem(
14
14
  o,
15
15
  typeof e == "string" ? String(t) : JSON.stringify(t)
16
- ), s(t);
16
+ ), c(t);
17
17
  } catch {
18
18
  }
19
19
  }];
20
20
  }
21
21
  export {
22
- S as u
22
+ S as useLocalStorage
23
23
  };
@@ -5,3 +5,4 @@ export type SetStateType<ValueType> = (newValue: ValueType) => void;
5
5
  */
6
6
  export declare function useLocalStorageWithListener<ValueType>(key: string, initialValue: ValueType): [ValueType, SetStateType<ValueType>];
7
7
  export default useLocalStorageWithListener;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useLocalStorageWithListener/index.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,CAAC,SAAS,IAAI,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI,CAAC;AACpE;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EACnD,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,SAAS,GACtB,CAAC,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAmDtC;AACD,eAAe,2BAA2B,CAAC"}
@@ -29,5 +29,6 @@ function i(o, r) {
29
29
  }];
30
30
  }
31
31
  export {
32
- i as u
32
+ i as default,
33
+ i as useLocalStorageWithListener
33
34
  };
@@ -2,3 +2,4 @@
2
2
  * Hook para obtener el diccionario de un modulo
3
3
  */
4
4
  export declare const useModuleDictionary: () => import('../../contexts/ModuleDictionaryContext/types').ModuleDictionaryContextProps;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useModuleDictionary/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,mBAAmB,2FAM/B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { M as e } from "../../contexts/ModuleDictionaryContext/index.js";
2
+ import { ModuleDictionaryContext as e } from "../../contexts/ModuleDictionaryContext/index.js";
3
3
  const n = () => {
4
4
  const o = t(e);
5
5
  if (!o)
@@ -7,5 +7,5 @@ const n = () => {
7
7
  return o;
8
8
  };
9
9
  export {
10
- n as u
10
+ n as useModuleDictionary
11
11
  };
@@ -2,3 +2,4 @@
2
2
  * Hook para obtener el contexto de privilegios de un modulo
3
3
  */
4
4
  export declare const useModulePrivileges: () => import('../../contexts/ModulePrivilegesContext/types').ModulePrivilegesContextProps;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useModulePrivileges/index.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,mBAAmB,2FAM/B,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModulePrivilegesContext/index.js";
3
- const i = () => {
2
+ import { ModulePrivilegesContext as t } from "../../contexts/ModulePrivilegesContext/index.js";
3
+ const s = () => {
4
4
  const e = o(t);
5
5
  if (!e)
6
6
  throw new Error("useModulePrivileges context must be use inside ModulePrivilegesContext");
7
7
  return e;
8
8
  };
9
9
  export {
10
- i as u
10
+ s as useModulePrivileges
11
11
  };
@@ -2,3 +2,4 @@
2
2
  * Hook para obtener el estado del esqueleto de un modulo
3
3
  */
4
4
  export declare const useModuleSkeleton: () => boolean;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useModuleSkeleton/index.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAM7B,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModuleSkeletonContext/index.js";
3
- const s = () => {
2
+ import { ModuleSkeletonContext as t } from "../../contexts/ModuleSkeletonContext/index.js";
3
+ const u = () => {
4
4
  const e = o(t);
5
5
  if (!e)
6
6
  throw new Error("useModuleSkeleton context must be use inside ModuleSkeletonContext");
7
7
  return e.isSkeleton;
8
8
  };
9
9
  export {
10
- s as u
10
+ u as useModuleSkeleton
11
11
  };
@@ -3,3 +3,4 @@
3
3
  */
4
4
  export declare const useNetwork: () => import('../../contexts/NetworkContext/types').NetworkType;
5
5
  export default useNetwork;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useNetwork/index.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,UAAU,iEAMtB,CAAC;AACF,eAAe,UAAU,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useContext as e } from "react";
2
- import { N as o } from "../../contexts/NetworkContext/index.js";
2
+ import { NetworkContext as o } from "../../contexts/NetworkContext/index.js";
3
3
  const s = () => {
4
4
  const t = e(o);
5
5
  if (!t)
@@ -7,5 +7,6 @@ const s = () => {
7
7
  return t;
8
8
  };
9
9
  export {
10
- s as u
10
+ s as default,
11
+ s as useNetwork
11
12
  };
@@ -12,3 +12,4 @@ export declare const usePaginate: <TRow>(props: UsePaginateProps<TRow>) => {
12
12
  Refresh: () => void;
13
13
  setRows: import('react').Dispatch<import('react').SetStateAction<TRow[]>>;
14
14
  };
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/usePaginate/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,IAAI,EAAE,OAAO,gBAAgB,CAAC,IAAI,CAAC;4BAwF9B,MAAM;0CAOQ,MAAM;;;;;;CAapD,CAAC"}
@@ -1,26 +1,26 @@
1
1
  import { useState as n, useRef as H, useCallback as L, useEffect as l } from "react";
2
- import { i as s } from "./types.js";
3
- import { u as U } from "../useHostTools/index.js";
4
- import { u as j } from "../useNetwork/index.js";
2
+ import { initialPagerState as s } from "./types.js";
3
+ import { useHostTools as U } from "../useHostTools/index.js";
4
+ import { useNetwork as j } from "../useNetwork/index.js";
5
5
  const K = (h) => {
6
6
  const {
7
7
  endPoint: w,
8
8
  timeout: C = 5e3,
9
- queryParams: i,
10
- fireOnChangeParms: u,
9
+ queryParams: P,
10
+ fireOnChangeParms: i,
11
11
  // Propiedad para permitir que un cambio en los parametros de la consulta dispare la recarga de la red
12
12
  fireOnFirstLoad: R = !0,
13
13
  // propiedad que evita que se cargue la red la en el primer render del hook
14
- rowsPerPage: P = s.rowsPerPage,
14
+ rowsPerPage: c = s.rowsPerPage,
15
15
  startProgress: d,
16
16
  stopProgress: S,
17
17
  isRemote: k = !0,
18
18
  bodyToSnakeCase: y = !1,
19
19
  responseToCamelCase: T = !1,
20
20
  initialRows: E = [],
21
- externalCondition: c = !0,
21
+ externalCondition: u = !0,
22
22
  onNetworkError: f
23
- } = h, [p, g] = n(u ? 1 : 0), [O, a] = n(E), [b, o] = n({ ...s, rowsPerPage: P }), t = H({ ...s, rowsPerPage: P }), [x, F] = n(R), { startProgress: N, stopProgress: Q } = U(), { networkOperation: q } = j(), m = L(() => {
23
+ } = h, [p, g] = n(i ? 1 : 0), [O, o] = n(E), [b, a] = n({ ...s, rowsPerPage: c }), t = H({ ...s, rowsPerPage: c }), [x, F] = n(R), { startProgress: N, stopProgress: Q } = U(), { networkOperation: q } = j(), m = L(() => {
24
24
  g((r) => r + 1);
25
25
  }, []);
26
26
  return l(() => {
@@ -28,16 +28,16 @@ const K = (h) => {
28
28
  F(!1);
29
29
  return;
30
30
  }
31
- t.current.page = 0, u && m();
32
- }, [i]), l(() => {
31
+ t.current.page = 0, i && m();
32
+ }, [P]), l(() => {
33
33
  let r = !0;
34
- if (!(!c || p === 0))
34
+ if (!(!u || p === 0))
35
35
  return q({
36
36
  method: "GET",
37
37
  endPoint: w,
38
38
  timeout: C,
39
39
  parms: {
40
- ...i,
40
+ ...P,
41
41
  page: t.current.page,
42
42
  limit: t.current.rowsPerPage
43
43
  },
@@ -49,25 +49,25 @@ const K = (h) => {
49
49
  },
50
50
  isRemote: k
51
51
  }).then((e) => {
52
- r && (a(e.data), t.current.page = e.pager.page, o((G) => ({
52
+ r && (o(e.data), t.current.page = e.pager.page, a((G) => ({
53
53
  ...G,
54
54
  page: e.pager.page,
55
55
  // rowsPerPage: response.pager.limit,
56
56
  totalRecords: e.pager.total
57
57
  })));
58
58
  }).catch((e) => {
59
- a([]), o(s), f && f(e.status);
59
+ o([]), a(s), f && f(e.status);
60
60
  }), function() {
61
61
  r = !1;
62
62
  };
63
- }, [p, c]), { onPageChange: (r) => {
63
+ }, [p, u]), { onPageChange: (r) => {
64
64
  t.current.page = r, g((e) => e + 1);
65
65
  }, onRowsPerPageChange: (r) => {
66
- t.current.rowsPerPage = r, o((e) => ({ ...e, rowsPerPage: r })), g((e) => e + 1);
66
+ t.current.rowsPerPage = r, a((e) => ({ ...e, rowsPerPage: r })), g((e) => e + 1);
67
67
  }, pagerState: b, rows: O, clearRows: () => {
68
- a([]), o(s);
69
- }, Refresh: m, setRows: a };
68
+ o([]), a(s);
69
+ }, Refresh: m, setRows: o };
70
70
  };
71
71
  export {
72
- K as u
72
+ K as usePaginate
73
73
  };
@@ -15,3 +15,4 @@ export interface UsePaginateProps<TRow> extends Pick<NetworkProps, 'endPoint' |
15
15
  externalCondition?: boolean;
16
16
  onNetworkError?: (code: number) => void;
17
17
  }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/usePaginate/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,MAAM,CAAC,OAAO,WAAW,UAAU;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AACD,eAAO,MAAM,iBAAiB,EAAE,UAI/B,CAAC;AACF,MAAM,WAAW,gBAAgB,CAAC,IAAI,CACpC,SAAQ,IAAI,CACR,YAAY,EACZ,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,iBAAiB,GAAG,qBAAqB,CAChF,EACD,YAAY;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC"}
@@ -1,8 +1,8 @@
1
- const a = {
1
+ const e = {
2
2
  page: 0,
3
3
  rowsPerPage: 25,
4
4
  totalRecords: 0
5
5
  };
6
6
  export {
7
- a as i
7
+ e as initialPagerState
8
8
  };
@@ -4,3 +4,4 @@ import { usePropagateProps } from './types';
4
4
  * Hook para propagar eventos entre microfrontends
5
5
  */
6
6
  export declare function usePropageteMF<E extends keyof EmmitListenerGuard>(props: usePropagateProps<E>): void;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/usePropageteMF/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,QAc7F"}
@@ -1,11 +1,11 @@
1
1
  import { useEffect as i } from "react";
2
- import { u as f } from "../useHostTools/index.js";
3
- function c(s) {
4
- const { isMicroFrontEnd: e, event: t, setHandler: o } = s, { events_add_listener: r, events_remove_listener: n } = f();
5
- i(() => (e && r(t, o), () => {
6
- e && n(t, o);
2
+ import { useHostTools as f } from "../useHostTools/index.js";
3
+ function u(r) {
4
+ const { isMicroFrontEnd: e, event: t, setHandler: o } = r, { events_add_listener: n, events_remove_listener: s } = f();
5
+ i(() => (e && n(t, o), () => {
6
+ e && s(t, o);
7
7
  }), []);
8
8
  }
9
9
  export {
10
- c as u
10
+ u as usePropageteMF
11
11
  };
@@ -4,3 +4,4 @@ export interface usePropagateProps<E extends keyof EmmitListenerGuard> {
4
4
  event: E;
5
5
  setHandler: EmmitListenerGuard[E];
6
6
  }
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/usePropageteMF/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,kBAAkB;IACnE,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CACnC"}
package/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export { EmmitEvents as EmitEvents, CommonFlags } from './types';
4
4
  export type { Maybe, HostToolsType, NetworkProps, EnvironmentType, AxiosOperation, EventListenerBase, EmmitEventsGuard, ToasterFunctionProps, Toaster, } from './types';
5
5
  export type { GetLabelType, Dictionary, ModuleDictionary, ComponentDictionary, } from './types/dictionary';
6
6
  export * from './utils';
7
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEjE,YAAY,EACV,KAAK,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,OAAO,GACR,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,cAAc,SAAS,CAAC"}
package/index.js CHANGED
@@ -1,73 +1,73 @@
1
- import { C as r, E as t } from "./types/index.js";
2
- import { E as s, a as u } from "./contexts/EnvironmentContext/index.js";
3
- import { H as i, a as m } from "./contexts/HostToolsContext/index.js";
4
- import { N as p, a as f } from "./contexts/NetworkContext/index.js";
5
- import { F as d, a as v } from "./contexts/FlagsContext/index.js";
6
- import { D as P, a as C } from "./contexts/DomainContext/index.js";
7
- import { M as D, a as S } from "./contexts/ModuleDictionaryContext/index.js";
8
- import { M as y, a as F } from "./contexts/ModulePrivilegesContext/index.js";
9
- import { M as k, a as B } from "./contexts/ModuleSkeletonContext/index.js";
10
- import { D as L, a as A } from "./contexts/DomainCountryContext/index.js";
11
- import { B as N, a as w } from "./contexts/BaseContext/BaseContext.js";
12
- import { A as W, a as O } from "./contexts/AuthContext/AuthContext.js";
13
- import { u as j } from "./hooks/useEnvironment/index.js";
14
- import { a as z, u as G } from "./hooks/useFlagsStore/index.js";
15
- import { u as J } from "./hooks/useHostTools/index.js";
16
- import { u as Q } from "./hooks/useDomain/index.js";
17
- import { u as U } from "./hooks/useLocalStorage/index.js";
18
- import { u as X } from "./hooks/useLocalStorageWithListener/index.js";
19
- import { u as Z } from "./hooks/useModuleDictionary/index.js";
20
- import { u as $ } from "./hooks/useModulePrivileges/index.js";
21
- import { u as eo } from "./hooks/useModuleSkeleton/index.js";
22
- import { u as to } from "./hooks/useNetwork/index.js";
23
- import { u as so } from "./hooks/usePaginate/index.js";
24
- import { u as xo } from "./hooks/usePropageteMF/index.js";
25
- import { u as mo } from "./hooks/useDomainCountry/index.js";
26
- import { u as po } from "./hooks/useAuth/useAuth.js";
27
- import { i as lo } from "./hooks/usePaginate/types.js";
28
- import { a as go, u as Po } from "./hooks/useBase/useBase.js";
29
- import { v as Mo } from "./utils/voidFunction.js";
30
- import { g as So } from "./utils/getPropertyByString/index.js";
31
- import { e as yo } from "./utils/evaluateWithContext/index.js";
32
- import { g as Eo } from "./utils/getLocalStorage/index.js";
33
- import { s as Bo } from "./utils/setLocalStorage/index.js";
34
- import { a as Lo } from "./utils/axiosOperation/index.js";
1
+ import { BaseContext as r, BaseProvider as t } from "./contexts/BaseContext/BaseContext.js";
2
+ import { EnvironmentContext as n, EnvironmentProvider as x } from "./contexts/EnvironmentContext/index.js";
3
+ import { HostToolsContext as s, HostToolsProvider as a } from "./contexts/HostToolsContext/index.js";
4
+ import { NetworkContext as f, NetworkProvider as u } from "./contexts/NetworkContext/index.js";
5
+ import { AuthContext as d, AuthProvider as v } from "./contexts/AuthContext/AuthContext.js";
6
+ import { FlagsContext as g, FlagsProvider as C } from "./contexts/FlagsContext/index.js";
7
+ import { DomainContext as M, DomainProvider as D } from "./contexts/DomainContext/index.js";
8
+ import { ModuleDictionaryContext as y, ModuleDictionaryProvider as E } from "./contexts/ModuleDictionaryContext/index.js";
9
+ import { ModulePrivilegesContext as k, ModulePrivilegesProvider as h } from "./contexts/ModulePrivilegesContext/index.js";
10
+ import { ModuleSkeletonContext as L, ModuleSkeletonProvider as w } from "./contexts/ModuleSkeletonContext/index.js";
11
+ import { DomainCountryContext as H, DomainCountryProvider as N } from "./contexts/DomainCountryContext/index.js";
12
+ import { useBase as W, useBaseStore as O } from "./hooks/useBase/useBase.js";
13
+ import { useEnvironment as j } from "./hooks/useEnvironment/index.js";
14
+ import { useFlagsPresent as z, useFlagsStore as G } from "./hooks/useFlagsStore/index.js";
15
+ import { useHostTools as J } from "./hooks/useHostTools/index.js";
16
+ import { useDomain as Q } from "./hooks/useDomain/index.js";
17
+ import { useLocalStorage as U } from "./hooks/useLocalStorage/index.js";
18
+ import { useLocalStorageWithListener as X } from "./hooks/useLocalStorageWithListener/index.js";
19
+ import { useModuleDictionary as Z } from "./hooks/useModuleDictionary/index.js";
20
+ import { useModulePrivileges as $ } from "./hooks/useModulePrivileges/index.js";
21
+ import { useModuleSkeleton as eo } from "./hooks/useModuleSkeleton/index.js";
22
+ import { useNetwork as to } from "./hooks/useNetwork/index.js";
23
+ import { usePaginate as no } from "./hooks/usePaginate/index.js";
24
+ import { usePropageteMF as io } from "./hooks/usePropageteMF/index.js";
25
+ import { useDomainCountry as ao } from "./hooks/useDomainCountry/index.js";
26
+ import { useAuth as fo } from "./hooks/useAuth/useAuth.js";
27
+ import { initialPagerState as lo } from "./hooks/usePaginate/types.js";
28
+ import { CommonFlags as Po, EmmitEvents as go } from "./types/index.js";
29
+ import { voidFunction as So } from "./utils/voidFunction.js";
30
+ import { getPropertyByString as Do } from "./utils/getPropertyByString/index.js";
31
+ import { evaluateWithContext as yo } from "./utils/evaluateWithContext/index.js";
32
+ import { getLocalStorage as Fo } from "./utils/getLocalStorage/index.js";
33
+ import { setLocalStorage as ho } from "./utils/setLocalStorage/index.js";
34
+ import { axiosOperation as Lo } from "./utils/axiosOperation/index.js";
35
35
  export {
36
- W as AuthContext,
37
- O as AuthProvider,
38
- N as BaseContext,
39
- w as BaseProvider,
40
- r as CommonFlags,
41
- P as DomainContext,
42
- L as DomainCountryContext,
43
- A as DomainCountryProvider,
44
- C as DomainProvider,
45
- t as EmitEvents,
46
- s as EnvironmentContext,
47
- u as EnvironmentProvider,
48
- d as FlagsContext,
49
- v as FlagsProvider,
50
- i as HostToolsContext,
51
- m as HostToolsProvider,
52
- D as ModuleDictionaryContext,
53
- S as ModuleDictionaryProvider,
54
- y as ModulePrivilegesContext,
55
- F as ModulePrivilegesProvider,
56
- k as ModuleSkeletonContext,
57
- B as ModuleSkeletonProvider,
58
- p as NetworkContext,
59
- f as NetworkProvider,
36
+ d as AuthContext,
37
+ v as AuthProvider,
38
+ r as BaseContext,
39
+ t as BaseProvider,
40
+ Po as CommonFlags,
41
+ M as DomainContext,
42
+ H as DomainCountryContext,
43
+ N as DomainCountryProvider,
44
+ D as DomainProvider,
45
+ go as EmitEvents,
46
+ n as EnvironmentContext,
47
+ x as EnvironmentProvider,
48
+ g as FlagsContext,
49
+ C as FlagsProvider,
50
+ s as HostToolsContext,
51
+ a as HostToolsProvider,
52
+ y as ModuleDictionaryContext,
53
+ E as ModuleDictionaryProvider,
54
+ k as ModulePrivilegesContext,
55
+ h as ModulePrivilegesProvider,
56
+ L as ModuleSkeletonContext,
57
+ w as ModuleSkeletonProvider,
58
+ f as NetworkContext,
59
+ u as NetworkProvider,
60
60
  Lo as axiosOperation,
61
61
  yo as evaluateWithContext,
62
- Eo as getLocalStorage,
63
- So as getPropertyByString,
62
+ Fo as getLocalStorage,
63
+ Do as getPropertyByString,
64
64
  lo as initialPagerState,
65
- Bo as setLocalStorage,
66
- po as useAuth,
67
- go as useBase,
68
- Po as useBaseStore,
65
+ ho as setLocalStorage,
66
+ fo as useAuth,
67
+ W as useBase,
68
+ O as useBaseStore,
69
69
  Q as useDomain,
70
- mo as useDomainCountry,
70
+ ao as useDomainCountry,
71
71
  j as useEnvironment,
72
72
  z as useFlagsPresent,
73
73
  G as useFlagsStore,
@@ -78,7 +78,7 @@ export {
78
78
  $ as useModulePrivileges,
79
79
  eo as useModuleSkeleton,
80
80
  to as useNetwork,
81
- so as usePaginate,
82
- xo as usePropageteMF,
83
- Mo as voidFunction
81
+ no as usePaginate,
82
+ io as usePropageteMF,
83
+ So as voidFunction
84
84
  };