@m4l/core 2.0.26 → 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 +52 -48
  4. package/contexts/AuthContext/constants.d.ts +1 -0
  5. package/contexts/AuthContext/constants.d.ts.map +1 -0
  6. package/contexts/AuthContext/constants.js +2 -2
  7. package/contexts/AuthContext/helpers.d.ts +1 -0
  8. package/contexts/AuthContext/helpers.d.ts.map +1 -0
  9. package/contexts/AuthContext/helpers.js +1 -1
  10. package/contexts/AuthContext/index.d.ts +1 -0
  11. package/contexts/AuthContext/index.d.ts.map +1 -0
  12. package/contexts/AuthContext/types.d.ts +1 -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
package/test/mocks.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- export declare const mock_addFlag: import('vitest').Mock<(...args: any[]) => any>;
2
- export declare const mock_networkOperation: import('vitest').Mock<(...args: any[]) => any>;
3
- export declare const mock_events_add_listener: import('vitest').Mock<(...args: any[]) => any>;
4
- export declare const mock_events_remove_listener: import('vitest').Mock<(...args: any[]) => any>;
5
- export declare const mock_events_emit: import('vitest').Mock<(...args: any[]) => any>;
6
- export declare const mock_startProgress: import('vitest').Mock<(...args: any[]) => any>;
7
- export declare const mock_stopProgress: import('vitest').Mock<(...args: any[]) => any>;
1
+ import { Mock } from 'vitest';
2
+ export declare const mock_addFlag: Mock;
3
+ export declare const mock_networkOperation: Mock;
4
+ export declare const mock_events_add_listener: Mock;
5
+ export declare const mock_events_remove_listener: Mock;
6
+ export declare const mock_events_emit: Mock;
7
+ export declare const mock_startProgress: Mock;
8
+ export declare const mock_stopProgress: Mock;
9
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,IAAc,CAAC;AAC1C,eAAO,MAAM,qBAAqB,EAAE,IAAc,CAAC;AACnD,eAAO,MAAM,wBAAwB,EAAE,IAAc,CAAC;AACtD,eAAO,MAAM,2BAA2B,EAAE,IAAc,CAAC;AACzD,eAAO,MAAM,gBAAgB,EAAE,IAAc,CAAC;AAC9C,eAAO,MAAM,kBAAkB,EAAE,IAAc,CAAC;AAChD,eAAO,MAAM,iBAAiB,EAAE,IAAc,CAAC"}
package/test/setup.d.ts CHANGED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
package/test/types.d.ts CHANGED
@@ -2,3 +2,4 @@ export interface BaseDataForTesting {
2
2
  a: string;
3
3
  b: number;
4
4
  }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX"}
package/test/utils.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { cleanup, screen } from '@testing-library/react';
2
- import { renderHook } from '@testing-library/react-hooks';
1
+ import { cleanup, screen, renderHook } from '@testing-library/react';
3
2
  import { default as React, act } from 'react';
4
3
  /**
5
4
  * customRender
@@ -7,3 +6,4 @@ import { default as React, act } from 'react';
7
6
  declare const customRender: (ui: React.ReactElement, options?: {}) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
8
7
  export { default as userEvent } from '@testing-library/user-event';
9
8
  export { customRender as render, renderHook, screen, cleanup, act };
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASnC;;GAEG;AACH,QAAA,MAAM,YAAY,GAAI,IAAI,KAAK,CAAC,YAAY,EAAE,YAAY,iIASzD,CAAC;AACF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -11,3 +11,4 @@ export interface DataDictionary extends ComponentDictionary {
11
11
  export interface ModuleDictionary extends Dictionary {
12
12
  data: DataDictionary;
13
13
  }
14
+ //# sourceMappingURL=dictionary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/types/dictionary.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC;AACjF,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AACD,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,IAAI,EAAE,cAAc,CAAC;CACtB"}
package/types/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { Id, ToastOptions } from 'react-toastify';
3
3
  import { BrowserHistory } from 'history';
4
4
  import { AxiosProgressEvent, ResponseType } from 'axios';
5
- import { DomainCountry } from '../contexts';
5
+ import { DomainCountry } from '../contexts/DomainCountryContext/types';
6
6
  import { AxiosOptions } from '../utils/axiosOperation/types';
7
7
  export type Maybe<T> = T | undefined | null;
8
8
  type MFProps = {
@@ -115,3 +115,4 @@ export declare enum CommonFlags {
115
115
  }
116
116
  export declare type AxiosOperation = (props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<any>;
117
117
  export {};
118
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa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AAS,EAAE,aAAa,KACrB,OAAO,CAAC,GAAG,CAAC,CAAC"}
package/types/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var E = /* @__PURE__ */ ((_) => (_.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED = "netsevice_unauthorized", _.EMMIT_EVENT_HOST_LOCALE_CHANGE = "host_locale_change", _.EMMIT_EVENT_HOST_THEME_CHANGE = "host_theme_change", _.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE = "domain_country_change", _.EMMIT_EVENT_HOST_FORMATTER_CHANGE = "formatter_change", _.EMMIT_EVENT_HOST_EMERGE_WINDOW = "host_emerge_window", _))(E || {}), T = /* @__PURE__ */ ((_) => (_.FLAG_PRIVILEGES_LOADED = "privileges_loaded", _.FLAG_DICTIONARY_LOADED = "dictionary_loaded", _.FLAG_DOMAIN_LOADED = "domain_loaded", _.FLAG_FORM_LOADED = "form_loaded", _.FLAG_AREAS_LOADED = "areas_loaded", _))(T || {});
2
2
  export {
3
- T as C,
4
- E
3
+ T as CommonFlags,
4
+ E as EmmitEvents
5
5
  };
@@ -3,3 +3,4 @@ import { EnvironmentType, HostToolsType, NetworkProps } from '../../types';
3
3
  * Esta función se encarga de realizar las operaciones de red.
4
4
  */
5
5
  export declare const axiosOperation: <T = any>(props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<T>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/axiosOperation/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiHhF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAU,CAAC,GAAG,GAAG,EAC1C,OAAO,YAAY,EACnB,YAAY,eAAe,EAC3B,WAAW,aAAa,KACvB,OAAO,CAAC,CAAC,CAmEX,CAAC"}
@@ -2,34 +2,34 @@ import R from "axios";
2
2
  import b from "qs";
3
3
  import j from "camelcase-keys";
4
4
  import v from "snakecase-keys";
5
- import { E as h } from "../../types/index.js";
6
- function x(e, t, a, i, o, s) {
5
+ import { EmmitEvents as h } from "../../types/index.js";
6
+ function x(e, s, a, i, o, t) {
7
7
  const { toast: r } = a;
8
- return i === "json" ? t && t.data && typeof t.data == "object" ? t.data.error && t.data.error?.code && t.data.error?.msg !== void 0 ? Promise.reject({ ...t.data.error, status: t.status }) : (t.data.message && o && r({ title: t.data.message }, { type: "success", autoClose: 1e4 }), s ? j(t.data, { deep: !0 }) : t.data) : Promise.reject({
8
+ return i === "json" ? s && s.data && typeof s.data == "object" ? s.data.error && s.data.error?.code && s.data.error?.msg !== void 0 ? Promise.reject({ ...s.data.error, status: s.status }) : (s.data.message && o && r({ title: s.data.message }, { type: "success", autoClose: 1e4 }), t ? j(s.data, { deep: !0 }) : s.data) : Promise.reject({
9
9
  code: 1,
10
10
  msg: `Incorrect endpoint: ${e}`,
11
- status: t.status
12
- }) : t.data;
11
+ status: s.status
12
+ }) : s.data;
13
13
  }
14
- function T(e, t, a = !0, i = !0) {
15
- const { toast: o } = t;
16
- let s = {
14
+ function T(e, s, a = !0, i = !0) {
15
+ const { toast: o } = s;
16
+ let t = {
17
17
  message: "",
18
18
  status: 1,
19
19
  code: 0
20
20
  };
21
- return e?.code !== void 0 && s.status !== void 0 && e.message !== void 0 && (s = { ...s, ...e }), e?.response ? e.response.data && typeof e.response.data == "object" && e.response.data.error && e.response.data.error?.code && e.response.data.error?.message !== void 0 ? s = { ...e.response.data.error, status: e.response.status } : (s.message = e.message, s.status = e.response.status, s.code = 0) : e?.request ? (s.message = `${e?.code} ${e.message}`, s.code = -1) : (s.message = `${e?.code} ${e.message}`, s.status = 0, s.code = -2), a && e?.response?.status === 401 && t.events_emit(h.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {}), e?.response?.data?.error?.message && (s.message = e?.response?.data?.error.message), a && (s.message.indexOf("ERR_CANCELED") > -1 ? console.log(s.message) : i && o(
22
- { title: `${s.message} - status: ${s.status} - code: ${s.code}` },
21
+ return e?.code !== void 0 && t.status !== void 0 && e.message !== void 0 && (t = { ...t, ...e }), e?.response ? e.response.data && typeof e.response.data == "object" && e.response.data.error && e.response.data.error?.code && e.response.data.error?.message !== void 0 ? t = { ...e.response.data.error, status: e.response.status } : (t.message = e.message, t.status = e.response.status, t.code = 0) : e?.request ? (t.message = `${e?.code} ${e.message}`, t.code = -1) : (t.message = `${e?.code} ${e.message}`, t.status = 0, t.code = -2), a && e?.response?.status === 401 && s.events_emit(h.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {}), e?.response?.data?.error?.message && (t.message = e?.response?.data?.error.message), a && (t.message.indexOf("ERR_CANCELED") > -1 ? console.log(t.message) : i && o(
22
+ { title: `${t.message} - status: ${t.status} - code: ${t.code}` },
23
23
  {
24
24
  type: "error"
25
25
  }
26
- )), s;
26
+ )), t;
27
27
  }
28
- const L = async (e, t, a) => {
28
+ const L = async (e, s, a) => {
29
29
  const {
30
30
  method: i,
31
31
  endPoint: o,
32
- database: s = t.database,
32
+ database: t = s.database,
33
33
  timeout: r = 6e4,
34
34
  parms: g = {},
35
35
  data: m = {},
@@ -46,7 +46,7 @@ const L = async (e, t, a) => {
46
46
  responseToCamelCase: C = !1
47
47
  } = e;
48
48
  let d;
49
- return u ? d = t.host_api_remote : d = t.host_api_local, d = d + "/" + s, e?.options?.startProgress && e?.options?.startProgress(), R({
49
+ return u ? d = s.host_api_remote : d = s.host_api_local, d = d + "/" + t, e?.options?.startProgress && e?.options?.startProgress(), R({
50
50
  baseURL: c ? void 0 : d,
51
51
  withCredentials: u,
52
52
  method: i,
@@ -74,5 +74,5 @@ const L = async (e, t, a) => {
74
74
  });
75
75
  };
76
76
  export {
77
- L as a
77
+ L as axiosOperation
78
78
  };
@@ -7,3 +7,4 @@ export type AxiosOperationError = {
7
7
  status: number;
8
8
  code: string | number;
9
9
  };
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/axiosOperation/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC"}
@@ -5,3 +5,4 @@
5
5
  * @returns El resultado de la evaluación como una cadena.
6
6
  */
7
7
  export declare function evaluateWithContext(context: any, code: string): string;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/evaluateWithContext/index.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAetE"}
@@ -7,5 +7,5 @@ function a(e, t) {
7
7
  }
8
8
  }
9
9
  export {
10
- a as e
10
+ a as evaluateWithContext
11
11
  };
@@ -2,3 +2,4 @@
2
2
  * Get value from local storage
3
3
  */
4
4
  export declare function getLocalStorage<ValueType>(key: string, initialValue: ValueType): ValueType;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/getLocalStorage/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,GAAG,SAAS,CAS1F"}
@@ -7,5 +7,5 @@ function o(r, e) {
7
7
  }
8
8
  }
9
9
  export {
10
- o as g
10
+ o as getLocalStorage
11
11
  };
@@ -5,3 +5,4 @@ export declare function getPropertyByString<T extends PropertyType>(object: any,
5
5
  export declare function getPropertyByString<T extends PropertyType>(object: any, key: string, defaultValue: null): T | null;
6
6
  export declare function getPropertyByString<T extends PropertyType>(object: any, key: string, defaultValue: undefined): T | undefined;
7
7
  export {};
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/getPropertyByString/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,KAAK,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAI,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1E,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,GACV,KAAK,CAAC,CAAC,CAAC,CAAC;AAGZ,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,CAAC,GACf,CAAC,CAAC;AAEL,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,IAAI,GAClB,CAAC,GAAG,IAAI,CAAC;AAEZ,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,SAAS,GACvB,CAAC,GAAG,SAAS,CAAC"}
@@ -1,7 +1,7 @@
1
- function f(y, a, n) {
2
- const g = a.split(".");
1
+ function g(y, a, n) {
2
+ const f = a.split(".");
3
3
  let r = y;
4
- for (const s of g) {
4
+ for (const s of f) {
5
5
  const c = s.match(/^(\w+)\[(\w+)\]$/);
6
6
  if (c) {
7
7
  const i = c[1], o = c[2];
@@ -21,5 +21,5 @@ function f(y, a, n) {
21
21
  return r;
22
22
  }
23
23
  export {
24
- f as g
24
+ g as getPropertyByString
25
25
  };
package/utils/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export { getLocalStorage } from './getLocalStorage';
5
5
  export { setLocalStorage } from './setLocalStorage';
6
6
  export { axiosOperation } from './axiosOperation';
7
7
  export type { AxiosOptions } from './axiosOperation/types';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
@@ -2,3 +2,4 @@
2
2
  * Graba en el localStorage un objeto con la key especificada. Si ya existe, lo mezcla con el objeto actual.
3
3
  */
4
4
  export declare function setLocalStorage<ValueType>(key: string, newValue: ValueType, mixCurrentLocalStorage?: boolean): void;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/setLocalStorage/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EACvC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,EACnB,sBAAsB,UAAQ,QAe/B"}
@@ -1,16 +1,16 @@
1
- function r(e, o, a = !1) {
1
+ function a(e, o, r = !1) {
2
2
  try {
3
3
  let t = null;
4
4
  if (typeof o == "string") {
5
5
  window.localStorage.setItem(e, o);
6
6
  return;
7
7
  }
8
- a && (t = window.localStorage.getItem(e));
8
+ r && (t = window.localStorage.getItem(e));
9
9
  let l = t !== null ? JSON.parse(t) : {};
10
10
  l = { ...l, ...o }, window.localStorage.setItem(e, JSON.stringify(l));
11
11
  } catch {
12
12
  }
13
13
  }
14
14
  export {
15
- r as s
15
+ a as setLocalStorage
16
16
  };
@@ -2,3 +2,4 @@
2
2
  * A function that does nothing.
3
3
  */
4
4
  export declare function voidFunction(): void;
5
+ //# sourceMappingURL=voidFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"voidFunction.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/utils/voidFunction.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,YAAY,SAAK"}
@@ -1,5 +1,5 @@
1
1
  function n() {
2
2
  }
3
3
  export {
4
- n as v
4
+ n as voidFunction
5
5
  };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const mock_useEffect: import('vitest').Mock<(...args: any[]) => any>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const mockUseFlagsPresent: jest.Mock;
@@ -1 +0,0 @@
1
- export {};
package/contexts/index.js DELETED
@@ -1 +0,0 @@
1
-
package/hooks/index.js DELETED
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const mockUseFlagsPresent: jest.Mock;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
package/utils/index.js DELETED
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- export {};
package/vite-env.d.ts DELETED
@@ -1,4 +0,0 @@
1
- /// <reference types="vite/client" />
2
- /// <reference types="vitest" />
3
- /// <reference types="vitest/globals" />
4
- /// <reference types="vitest/importMeta" />