@m4l/core 2.0.27-beta.1 → 2.0.27-beta.2

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 (144) hide show
  1. package/contexts/AuthContext/AuthContext.d.ts +8 -0
  2. package/contexts/AuthContext/AuthContext.d.ts.map +1 -0
  3. package/contexts/AuthContext/AuthContext.js +1 -1
  4. package/contexts/AuthContext/constants.d.ts +8 -0
  5. package/contexts/AuthContext/constants.d.ts.map +1 -0
  6. package/contexts/AuthContext/helpers.d.ts +6 -0
  7. package/contexts/AuthContext/helpers.d.ts.map +1 -0
  8. package/contexts/AuthContext/index.d.ts +3 -0
  9. package/contexts/AuthContext/index.d.ts.map +1 -0
  10. package/contexts/AuthContext/types.d.ts +68 -0
  11. package/contexts/AuthContext/types.d.ts.map +1 -0
  12. package/contexts/BaseContext/BaseContext.d.ts +8 -0
  13. package/contexts/BaseContext/BaseContext.d.ts.map +1 -0
  14. package/contexts/BaseContext/BaseContext.js +1 -1
  15. package/contexts/BaseContext/index.d.ts +3 -0
  16. package/contexts/BaseContext/index.d.ts.map +1 -0
  17. package/contexts/BaseContext/store.d.ts +7 -0
  18. package/contexts/BaseContext/store.d.ts.map +1 -0
  19. package/contexts/BaseContext/types.d.ts +38 -0
  20. package/contexts/BaseContext/types.d.ts.map +1 -0
  21. package/contexts/DomainContext/index.d.ts +8 -0
  22. package/contexts/DomainContext/index.d.ts.map +1 -0
  23. package/contexts/DomainContext/index.js +1 -1
  24. package/contexts/DomainContext/types.d.ts +12 -0
  25. package/contexts/DomainContext/types.d.ts.map +1 -0
  26. package/contexts/DomainCountryContext/index.d.ts +8 -0
  27. package/contexts/DomainCountryContext/index.d.ts.map +1 -0
  28. package/contexts/DomainCountryContext/index.js +1 -1
  29. package/contexts/DomainCountryContext/types.d.ts +16 -0
  30. package/contexts/DomainCountryContext/types.d.ts.map +1 -0
  31. package/contexts/EnvironmentContext/index.d.ts +8 -0
  32. package/contexts/EnvironmentContext/index.d.ts.map +1 -0
  33. package/contexts/EnvironmentContext/index.js +1 -1
  34. package/contexts/EnvironmentContext/types.d.ts +15 -0
  35. package/contexts/EnvironmentContext/types.d.ts.map +1 -0
  36. package/contexts/FlagsContext/index.d.ts +16 -0
  37. package/contexts/FlagsContext/index.d.ts.map +1 -0
  38. package/contexts/FlagsContext/index.js +1 -1
  39. package/contexts/FlagsContext/store.d.ts +15 -0
  40. package/contexts/FlagsContext/store.d.ts.map +1 -0
  41. package/contexts/FlagsContext/types.d.ts +47 -0
  42. package/contexts/FlagsContext/types.d.ts.map +1 -0
  43. package/contexts/HostToolsContext/index.d.ts +9 -0
  44. package/contexts/HostToolsContext/index.d.ts.map +1 -0
  45. package/contexts/HostToolsContext/index.js +1 -1
  46. package/contexts/HostToolsContext/types.d.ts +7 -0
  47. package/contexts/HostToolsContext/types.d.ts.map +1 -0
  48. package/contexts/ModuleDictionaryContext/index.d.ts +8 -0
  49. package/contexts/ModuleDictionaryContext/index.d.ts.map +1 -0
  50. package/contexts/ModuleDictionaryContext/index.js +1 -1
  51. package/contexts/ModuleDictionaryContext/types.d.ts +17 -0
  52. package/contexts/ModuleDictionaryContext/types.d.ts.map +1 -0
  53. package/contexts/ModulePrivilegesContext/index.d.ts +8 -0
  54. package/contexts/ModulePrivilegesContext/index.d.ts.map +1 -0
  55. package/contexts/ModulePrivilegesContext/index.js +1 -1
  56. package/contexts/ModulePrivilegesContext/types.d.ts +10 -0
  57. package/contexts/ModulePrivilegesContext/types.d.ts.map +1 -0
  58. package/contexts/ModuleSkeletonContext/index.d.ts +8 -0
  59. package/contexts/ModuleSkeletonContext/index.d.ts.map +1 -0
  60. package/contexts/ModuleSkeletonContext/index.js +1 -1
  61. package/contexts/ModuleSkeletonContext/types.d.ts +9 -0
  62. package/contexts/ModuleSkeletonContext/types.d.ts.map +1 -0
  63. package/contexts/NetworkContext/index.d.ts +8 -0
  64. package/contexts/NetworkContext/index.d.ts.map +1 -0
  65. package/contexts/NetworkContext/index.js +1 -1
  66. package/contexts/NetworkContext/types.d.ts +12 -0
  67. package/contexts/NetworkContext/types.d.ts.map +1 -0
  68. package/contexts/index.d.ts +13 -0
  69. package/contexts/index.d.ts.map +1 -0
  70. package/hooks/index.d.ts +18 -0
  71. package/hooks/index.d.ts.map +1 -0
  72. package/hooks/useAuth/index.d.ts +2 -0
  73. package/hooks/useAuth/index.d.ts.map +1 -0
  74. package/hooks/useAuth/useAuth.d.ts +6 -0
  75. package/hooks/useAuth/useAuth.d.ts.map +1 -0
  76. package/hooks/useBase/index.d.ts +2 -0
  77. package/hooks/useBase/index.d.ts.map +1 -0
  78. package/hooks/useBase/useBase.d.ts +11 -0
  79. package/hooks/useBase/useBase.d.ts.map +1 -0
  80. package/hooks/useDomain/index.d.ts +6 -0
  81. package/hooks/useDomain/index.d.ts.map +1 -0
  82. package/hooks/useDomainCountry/index.d.ts +5 -0
  83. package/hooks/useDomainCountry/index.d.ts.map +1 -0
  84. package/hooks/useEnvironment/index.d.ts +7 -0
  85. package/hooks/useEnvironment/index.d.ts.map +1 -0
  86. package/hooks/useFlagsStore/index.d.ts +10 -0
  87. package/hooks/useFlagsStore/index.d.ts.map +1 -0
  88. package/hooks/useHostTools/index.d.ts +6 -0
  89. package/hooks/useHostTools/index.d.ts.map +1 -0
  90. package/hooks/useLocalStorage/index.d.ts +5 -0
  91. package/hooks/useLocalStorage/index.d.ts.map +1 -0
  92. package/hooks/useLocalStorageWithListener/index.d.ts +8 -0
  93. package/hooks/useLocalStorageWithListener/index.d.ts.map +1 -0
  94. package/hooks/useModuleDictionary/index.d.ts +5 -0
  95. package/hooks/useModuleDictionary/index.d.ts.map +1 -0
  96. package/hooks/useModulePrivileges/index.d.ts +5 -0
  97. package/hooks/useModulePrivileges/index.d.ts.map +1 -0
  98. package/hooks/useModuleSkeleton/index.d.ts +5 -0
  99. package/hooks/useModuleSkeleton/index.d.ts.map +1 -0
  100. package/hooks/useNetwork/index.d.ts +6 -0
  101. package/hooks/useNetwork/index.d.ts.map +1 -0
  102. package/hooks/usePaginate/index.d.ts +15 -0
  103. package/hooks/usePaginate/index.d.ts.map +1 -0
  104. package/hooks/usePaginate/types.d.ts +18 -0
  105. package/hooks/usePaginate/types.d.ts.map +1 -0
  106. package/hooks/usePropageteMF/index.d.ts +7 -0
  107. package/hooks/usePropageteMF/index.d.ts.map +1 -0
  108. package/hooks/usePropageteMF/types.d.ts +7 -0
  109. package/hooks/usePropageteMF/types.d.ts.map +1 -0
  110. package/index.d.ts +7 -0
  111. package/index.d.ts.map +1 -0
  112. package/package.json +2 -1
  113. package/test/constants.d.ts +71 -0
  114. package/test/constants.d.ts.map +1 -0
  115. package/test/index.d.ts +4 -0
  116. package/test/index.d.ts.map +1 -0
  117. package/test/mocks.d.ts +9 -0
  118. package/test/mocks.d.ts.map +1 -0
  119. package/test/setup.d.ts +1 -0
  120. package/test/setup.d.ts.map +1 -0
  121. package/test/types.d.ts +5 -0
  122. package/test/types.d.ts.map +1 -0
  123. package/test/utils.d.ts +9 -0
  124. package/test/utils.d.ts.map +1 -0
  125. package/types/dictionary.d.ts +14 -0
  126. package/types/dictionary.d.ts.map +1 -0
  127. package/types/index.d.ts +118 -0
  128. package/types/index.d.ts.map +1 -0
  129. package/utils/axiosOperation/index.d.ts +6 -0
  130. package/utils/axiosOperation/index.d.ts.map +1 -0
  131. package/utils/axiosOperation/types.d.ts +10 -0
  132. package/utils/axiosOperation/types.d.ts.map +1 -0
  133. package/utils/evaluateWithContext/index.d.ts +8 -0
  134. package/utils/evaluateWithContext/index.d.ts.map +1 -0
  135. package/utils/getLocalStorage/index.d.ts +5 -0
  136. package/utils/getLocalStorage/index.d.ts.map +1 -0
  137. package/utils/getPropertyByString/index.d.ts +8 -0
  138. package/utils/getPropertyByString/index.d.ts.map +1 -0
  139. package/utils/index.d.ts +8 -0
  140. package/utils/index.d.ts.map +1 -0
  141. package/utils/setLocalStorage/index.d.ts +5 -0
  142. package/utils/setLocalStorage/index.d.ts.map +1 -0
  143. package/utils/voidFunction.d.ts +5 -0
  144. package/utils/voidFunction.d.ts.map +1 -0
@@ -0,0 +1,8 @@
1
+ import { AuthProviderProps, SessionContextType } from './types';
2
+ declare const AuthContext: import('react').Context<SessionContextType | null>;
3
+ /**
4
+ * Proveedor de autenticación
5
+ */
6
+ declare function AuthProvider(props: AuthProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { AuthContext, AuthProvider };
8
+ //# sourceMappingURL=AuthContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthContext.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/AuthContext.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAG,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMtE,QAAA,MAAM,WAAW,oDAAiD,CAAC;AAEnE;;GAEG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,oDA8H7C;AACD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as U } from "react/jsx-runtime";
1
+ import { jsx as U } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as _, useReducer as w, useEffect as p, useCallback as m } from "react";
3
3
  import { useEnvironment as A } from "../../hooks/useEnvironment/index.js";
4
4
  import { useHostTools as I } from "../../hooks/useHostTools/index.js";
@@ -0,0 +1,8 @@
1
+ import { AuthState } from './types';
2
+ export declare enum EnumTypes {
3
+ Initial = "INITIALIZE",
4
+ Login = "LOGIN",
5
+ Logout = "LOGOUT"
6
+ }
7
+ export declare const initialState: AuthState;
8
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,oBAAY,SAAS;IACnB,OAAO,eAAe;IACtB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAGD,eAAO,MAAM,YAAY,EAAE,SAI1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { AuthState, SessionActions } from './types';
2
+ /**
3
+ * Reducer para el contexto de autenticación
4
+ */
5
+ export declare const JWTReducer: (state: AuthState, action: SessionActions) => AuthState;
6
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,EAAE,QAAQ,cAAc,cAuBlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './AuthContext';
2
+ export type { UserAuth, AuthState, AuthUserType } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { ReactNode } from 'react';
2
+ import { DomainCountry } from '../DomainCountryContext/types';
3
+ import { Maybe } from '../../types';
4
+ import { EnumTypes } from './constants';
5
+ export interface UserAuth {
6
+ email: string;
7
+ id: number;
8
+ firstName: string;
9
+ lastName: string;
10
+ accountId: number;
11
+ domainCountry: DomainCountry;
12
+ avatarUrl?: Maybe<string>;
13
+ userTypeId?: number;
14
+ preferences?: {
15
+ deviceLabel?: string;
16
+ };
17
+ /**
18
+ * sessionId: id de la sesión del usuario, puede o no retornala el backend en gclick (si)
19
+ */
20
+ sessionId?: string;
21
+ }
22
+ export type AuthUserType = Maybe<UserAuth>;
23
+ export type AuthProviderProps = {
24
+ /**
25
+ * isMicroFrontEnd: indica si la aplicación es un microfrontend
26
+ * default: false
27
+ */
28
+ isMicroFrontEnd?: boolean;
29
+ /**
30
+ * loggedUser: usuario de la aplicación, solo aplica para Microfrontends, porque se pasa la información del usuario directamente desde el host
31
+ */
32
+ loggedUser?: AuthUserType;
33
+ /**
34
+ * children: hijos del componente
35
+ */
36
+ children: ReactNode;
37
+ };
38
+ export type ActionMap<M extends {
39
+ [index: string]: any;
40
+ }> = {
41
+ [Key in keyof M]: M[Key] extends undefined ? {
42
+ type: Key;
43
+ } : {
44
+ type: Key;
45
+ payload: M[Key];
46
+ };
47
+ };
48
+ export type SessionAuthPayload = {
49
+ [EnumTypes.Initial]: {
50
+ isAuthenticated: boolean;
51
+ user: AuthUserType;
52
+ };
53
+ [EnumTypes.Login]: {
54
+ user: AuthUserType;
55
+ };
56
+ [EnumTypes.Logout]: undefined;
57
+ };
58
+ export type SessionActions = ActionMap<SessionAuthPayload>[keyof ActionMap<SessionAuthPayload>];
59
+ export type AuthState = {
60
+ isAuthenticated: boolean;
61
+ isInitialized: boolean;
62
+ user: Maybe<UserAuth>;
63
+ };
64
+ export interface SessionContextType extends AuthState {
65
+ login: (email: string, password: string, remember: boolean) => object | undefined;
66
+ logout: (isAuthenticated: boolean) => Promise<void>;
67
+ }
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,IAAI;KACzD,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,SAAS,SAAS,GACtC;QACE,IAAI,EAAE,GAAG,CAAC;KACX,GACD;QACE,IAAI,EAAE,GAAG,CAAC;QACV,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;KACjB;CACN,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;QACnB,eAAe,EAAE,OAAO,CAAC;QACzB,IAAI,EAAE,YAAY,CAAC;KACpB,CAAC;IACF,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACjB,IAAI,EAAE,YAAY,CAAC;KACpB,CAAC;IACF,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;CAE/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC,MAAM,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAGhG,MAAM,MAAM,SAAS,GAAG;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;IAClF,MAAM,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
@@ -0,0 +1,8 @@
1
+ import { BaseProviderProps } from './types';
2
+ declare const BaseContext: import('react').Context<import('zustand').StoreApi<import('./types').BaseProviderStoreStateWithActions<Record<any, any>>> | null>;
3
+ /**
4
+ * Proveedor base para los contextos.
5
+ */
6
+ declare function BaseProvider<T extends Record<any, any>>(props: BaseProviderProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { BaseProvider, BaseContext };
8
+ //# sourceMappingURL=BaseContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseContext.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/BaseContext/BaseContext.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAK5C,QAAA,MAAM,WAAW,mIAA2E,CAAC;AAE7F;;GAEG;AACH,iBAAS,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAC,GAAG,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,oDAmB3E;AACD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { jsx as u } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as s, useRef as c, useEffect as l } from "react";
3
3
  import { createBaseProviderStore as i } from "./store.js";
4
4
  import { deepEqual as f } from "fast-equals";
@@ -0,0 +1,3 @@
1
+ export * from './BaseContext';
2
+ export type { BaseProviderStoreStateWithActions } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/BaseContext/index.tsx"],"names":[],"mappings":"AAAA,cAAe,eAAe,CAAC;AAC/B,YAAY,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { BaseProviderStoreStateWithActions, InitialBaseProviderStoreProps, KeyOFHash } from './types';
2
+ /**
3
+ * TODO: Documentar
4
+ */
5
+ export declare function createBaseProviderStore<T extends Record<KeyOFHash, any>>(initProps: InitialBaseProviderStoreProps<T>, storeDevtoolsEnabled?: boolean): import('zustand').StoreApi<BaseProviderStoreStateWithActions<T>>;
6
+ export type BaseProviderStoreReturnType<T extends Record<any, any>> = ReturnType<typeof createBaseProviderStore<T>>;
7
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/BaseContext/store.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA0B,iCAAiC,EAAE,6BAA6B,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAe9H;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,EAAI,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAC,EAAE,oBAAoB,UAAQ,oEAwCpJ;AACD,MAAM,MAAM,2BAA2B,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAC,GAAG,CAAC,IAAK,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { ReactNode } from 'react';
2
+ export type KeyOFHash = string | number;
3
+ /**
4
+ * Store del tiempo real, actualizado por sockets
5
+ */
6
+ export interface BaseProviderStoreState<T extends Record<KeyOFHash, any>> {
7
+ /**
8
+ * Id del store
9
+ */
10
+ storeId: string;
11
+ /**
12
+ * Lugar donde se almancena los datos del prveedor
13
+ */
14
+ value: T;
15
+ }
16
+ export interface BaseProviderStoreStateWithActions<T extends Record<KeyOFHash, any>> extends BaseProviderStoreState<T> {
17
+ actions: {
18
+ /**
19
+ * Modifica parcialmente el custom data.
20
+ */
21
+ setPartialValue: (customData: Partial<T>) => void;
22
+ /**
23
+ * Modifica parcialmente el custom data.
24
+ */
25
+ mergeValue: (customData: Partial<T>) => void;
26
+ /**
27
+ * Modifica una propidadparcialmente el custom data.
28
+ */
29
+ setKeyValue: (key: KeyOFHash, value: T[KeyOFHash]) => void;
30
+ };
31
+ }
32
+ export type InitialBaseProviderStoreProps<T extends Record<KeyOFHash, any>> = BaseProviderStoreState<T>;
33
+ export interface BaseProviderProps<T extends Record<KeyOFHash, any>> extends Omit<InitialBaseProviderStoreProps<T>, 'storeId'> {
34
+ storeId?: string;
35
+ storeDevtoolsEnabled?: boolean;
36
+ children: ReactNode;
37
+ }
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/BaseContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAE;AACzC;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAU,MAAM,CAAC,SAAS,EAAC,GAAG,CAAC;IACtE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,CAAC,CAAE;CACX;AACD,MAAM,WAAW,iCAAiC,CAAE,CAAC,SAAS,MAAM,CAAC,SAAS,EAAC,GAAG,CAAC,CAAG,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IACrH,OAAO,EAAE;QACP;;WAEG;QACH,eAAe,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;QAClD;;WAEG;QACH,UAAU,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;QAC7C;;WAEG;QACH,WAAW,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;KAC5D,CAAC;CACH;AACD,MAAM,MAAM,6BAA6B,CAAE,CAAC,SAAU,MAAM,CAAC,SAAS,EAAC,GAAG,CAAC,IAAM,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC3G,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAW,MAAM,CAAC,SAAS,EAAC,GAAG,CAAC,CAAG,SAAQ,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;IAC9H,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB"}
@@ -0,0 +1,8 @@
1
+ import { DomainProviderProps, Domain } from './types';
2
+ declare const DomainContext: import('react').Context<Domain | null>;
3
+ /**
4
+ * Proveedor del contexto de dominio.
5
+ */
6
+ declare function DomainProvider(props: DomainProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { DomainProvider, DomainContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/DomainContext/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAI1E,QAAA,MAAM,aAAa,wCAAiD,CAAC;AACrE;;GAEG;AACH,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,oDA6DjD;AACD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as g } from "react/jsx-runtime";
1
+ import { jsx as g } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as d, useState as u, useEffect as f } from "react";
3
3
  import { useFlagsStore as p } from "../../hooks/useFlagsStore/index.js";
4
4
  import { useEnvironment as v } from "../../hooks/useEnvironment/index.js";
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface Domain {
3
+ name: string;
4
+ company_logo_small_url: string;
5
+ company_logo_normal_url: string;
6
+ slogan: string;
7
+ }
8
+ export interface DomainProviderProps {
9
+ children: ReactNode;
10
+ }
11
+ export type DomainContextProps = Domain;
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/DomainContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB,EAAE,MAAM,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAKD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DomainCountryContextType, DomainCountryProviderProps } from './types';
2
+ declare const DomainCountryContext: import('react').Context<DomainCountryContextType | null>;
3
+ /**
4
+ * Proveedor del contexto de país de dominio.
5
+ */
6
+ declare function DomainCountryProvider(props: DomainCountryProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { DomainCountryProvider, DomainCountryContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/DomainCountryContext/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAiB,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE9F,QAAA,MAAM,oBAAoB,0DAAuD,CAAC;AAClF;;GAEG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,oDAgD/D;AACD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as d } from "react/jsx-runtime";
1
+ import { jsx as d } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as y, useState as T, useCallback as f } from "react";
3
3
  import { useHostTools as M } from "../../hooks/useHostTools/index.js";
4
4
  import { usePropageteMF as N } from "../../hooks/usePropageteMF/index.js";
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DomainCountry {
3
+ id: number;
4
+ currency: string;
5
+ currency_decimal_digits: number;
6
+ decimal_symbol: string;
7
+ thousands_symbol: string;
8
+ }
9
+ export interface DomainCountryProviderProps extends DomainCountry {
10
+ isMicroFrontEnd: boolean;
11
+ children: ReactNode;
12
+ }
13
+ export interface DomainCountryContextType extends DomainCountry {
14
+ changeDomainCountry: (newDomainCountry: DomainCountry) => void;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/DomainCountryContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC7D,mBAAmB,EAAE,CAAC,gBAAgB,EAAE,aAAa,KAAK,IAAI,CAAC;CAChE"}
@@ -0,0 +1,8 @@
1
+ import { EnvironmentContextType, EnvironmentProviderProps } from './types';
2
+ declare const EnvironmentContext: import('react').Context<EnvironmentContextType | null>;
3
+ /**
4
+ * Proveedor del contexto de entorno.
5
+ */
6
+ declare function EnvironmentProvider(props: EnvironmentProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { EnvironmentProvider, EnvironmentContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmB3E,QAAA,MAAM,kBAAkB,wDAAqD,CAAC;AAC9E;;GAEG;AACH,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,oDAmC3D;AACD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as i } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as l, useCallback as u, useState as m } from "react";
3
3
  const d = l(null);
4
4
  function a(e) {
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { EnvironmentType } from '../../types';
3
+ export interface EnvironmentProviderProps extends Omit<EnvironmentType, 'getMfUrlIconAsset'> {
4
+ children: ReactNode;
5
+ }
6
+ export type EnvironmentContextType = EnvironmentType & {
7
+ /**
8
+ * "getModuleUrlIconAsset" función encargada de obtener la url de un recurso de un microfrontend
9
+ * basado
10
+ * @param iconName
11
+ * @returns
12
+ */
13
+ getModuleUrlIconAsset: (iconName: string) => string;
14
+ };
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC1F,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG;IACrD;;;;;OAKG;IACH,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CACrD,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { FlagsProviderProps } from './types';
2
+ declare const FlagsContext: import('react').Context<(Omit<Omit<import('zustand').StoreApi<import('./types').FlagsStateWithActions>, "setState"> & {
3
+ setState<A extends string | {
4
+ type: unknown;
5
+ }>(partial: import('./types').FlagsStateWithActions | Partial<import('./types').FlagsStateWithActions> | ((state: import('./types').FlagsStateWithActions) => import('./types').FlagsStateWithActions | Partial<import('./types').FlagsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
6
+ }, "setState"> & {
7
+ setState(nextStateOrUpdater: import('./types').FlagsStateWithActions | Partial<import('./types').FlagsStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<import('./types').FlagsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
8
+ type: unknown;
9
+ } | undefined): void;
10
+ }) | null>;
11
+ /**
12
+ * Proveedor del contexto de banderas.
13
+ */
14
+ declare function FlagsProvider({ children, storeId, storeDevtoolsEnabled }: FlagsProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export { FlagsProvider, FlagsContext };
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/FlagsContext/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,QAAA,MAAM,YAAY;;;;;;;;UAAyC,CAAC;AAC5D;;GAEG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAAE,kBAAkB,oDASrF;AACD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as n } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as s, useRef as c } from "react";
3
3
  import { createFlagsStore as f } from "./store.js";
4
4
  const i = s(null);
@@ -0,0 +1,15 @@
1
+ import { FlagsStateWithActions, FlagsStoreState } from './types';
2
+ /**
3
+ * Crea el store de banderas.
4
+ */
5
+ export declare const createFlagsStore: (initialState: FlagsStoreState, storeDevtoolsEnabled?: boolean) => Omit<Omit<import('zustand').StoreApi<FlagsStateWithActions>, "setState"> & {
6
+ setState<A extends string | {
7
+ type: unknown;
8
+ }>(partial: FlagsStateWithActions | Partial<FlagsStateWithActions> | ((state: FlagsStateWithActions) => FlagsStateWithActions | Partial<FlagsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
9
+ }, "setState"> & {
10
+ setState(nextStateOrUpdater: FlagsStateWithActions | Partial<FlagsStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<FlagsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
11
+ type: unknown;
12
+ } | undefined): void;
13
+ };
14
+ export type FlagsStore = ReturnType<typeof createFlagsStore>;
15
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/FlagsContext/store.ts"],"names":[],"mappings":"AAGA,OAAO,EAAQ,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAgBvE;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,eAAe,EAAE,8BAA4B;;;;;;;;CAiC3F,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ export interface FlagsProviderProps {
3
+ /**
4
+ * "storeId" Id del store
5
+ */
6
+ storeId?: string;
7
+ /**
8
+ * "storeDevtoolsEnabled" Determina si se debe usar devtools para el store
9
+ */
10
+ storeDevtoolsEnabled?: boolean;
11
+ /**
12
+ * "children" Componentes hijos
13
+ */
14
+ children: ReactNode;
15
+ }
16
+ export type Flag = string;
17
+ export interface FlagsContextProps {
18
+ /**
19
+ * "flags" Banderas
20
+ */
21
+ flags: Array<Flag>;
22
+ /**
23
+ * "clearFlags" Limpia las banderas
24
+ */
25
+ clearFlags: () => void;
26
+ /**
27
+ * "addFlag" Agrega una bandera
28
+ */
29
+ addFlag: (flag: Flag) => void;
30
+ }
31
+ export interface FlagsStoreState {
32
+ /**
33
+ * "storeId" Id del store
34
+ */
35
+ storeId?: string;
36
+ /**
37
+ * "flags" Banderas
38
+ */
39
+ flags: Array<Flag>;
40
+ }
41
+ export interface FlagsStateWithActions extends FlagsStoreState {
42
+ flagsActions: {
43
+ clearFlags: () => void;
44
+ addFlag: (flag: Flag) => void;
45
+ };
46
+ }
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/FlagsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAEhC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AACD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACpB;AACD,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,YAAY,EAAE;QACZ,UAAU,EAAE,MAAM,IAAI,CAAC;QACvB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;KAC/B,CAAC;CACH"}
@@ -0,0 +1,9 @@
1
+ import { HostToolsType } from '../../types';
2
+ import { HostToolsProviderProps } from './types';
3
+ declare const HostToolsContext: import('react').Context<HostToolsType | null>;
4
+ /**
5
+ * Proveedor de contexto de herramientas del host
6
+ */
7
+ declare function HostToolsProvider(props: HostToolsProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export { HostToolsProvider, HostToolsContext };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/HostToolsContext/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM5C,OAAO,KAAK,EAAwB,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAE5E,QAAA,MAAM,gBAAgB,+CAAmD,CAAC;AAC1E;;GAEG;AACH,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,oDAIvD;AACD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as s } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as n, useState as l } from "react";
3
3
  const i = n(null);
4
4
  function a(o) {
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ import { HostToolsType } from '../../types';
3
+ export interface HostToolsProviderProps extends HostToolsType {
4
+ children: ReactNode;
5
+ }
6
+ export type HostToolsContextType = HostToolsType;
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/HostToolsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,MAAM,WAAW,sBAAuB,SAAQ,aAAa;IAC3D,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ModuleDictionaryContextProps, ModuleDictionaryProviderProps } from './types';
2
+ declare const ModuleDictionaryContext: import('react').Context<ModuleDictionaryContextProps | null>;
3
+ /**
4
+ * Proveedor de contexto de diccionario de módulo
5
+ */
6
+ declare function ModuleDictionaryProvider(props: ModuleDictionaryProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { ModuleDictionaryProvider, ModuleDictionaryContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModuleDictionaryContext/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAQtF,QAAA,MAAM,uBAAuB,8DAA2D,CAAC;AACzF;;GAEG;AACH,iBAAS,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,oDAoIrE;AACD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as $ } from "react/jsx-runtime";
1
+ import { jsx as $ } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as E, useState as l, useMemo as O, useEffect as y, useCallback as v } from "react";
3
3
  import { useEnvironment as b } from "../../hooks/useEnvironment/index.js";
4
4
  import { useFlagsStore as I } from "../../hooks/useFlagsStore/index.js";
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { GetLabelType, ModuleDictionary } from '../../types/dictionary';
3
+ export interface ModuleDictionaryProviderProps {
4
+ currentLang?: string;
5
+ isAuth?: boolean;
6
+ moduleId: string;
7
+ moduleNameField?: string;
8
+ componentsDictionary: string[];
9
+ children: ReactNode;
10
+ moduleDictionaryLoaded?: ModuleDictionary;
11
+ }
12
+ export interface ModuleDictionaryContextProps {
13
+ moduleDictionary?: ModuleDictionary;
14
+ getLabel: GetLabelType;
15
+ getModuleLabel: () => string;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModuleDictionaryContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;CAC3C;AACD,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,EAAE,YAAY,CAAC;IACvB,cAAc,EAAE,MAAM,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,8 @@
1
+ import { ModulePrivilegesContextProps, ModulePrivilegesProviderProps } from './types';
2
+ declare const ModulePrivilegesContext: import('react').Context<ModulePrivilegesContextProps | null>;
3
+ /**
4
+ * Proveedor de contexto de privilegios
5
+ */
6
+ declare function ModulePrivilegesProvider(props: ModulePrivilegesProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { ModulePrivilegesProvider, ModulePrivilegesContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModulePrivilegesContext/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,uBAAuB,8DAA2D,CAAC;AACzF;;GAEG;AACH,iBAAS,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,oDAyDrE;AACD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as c } from "react/jsx-runtime";
1
+ import { jsx as c } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as d, useState as p, useEffect as P, useCallback as v } from "react";
3
3
  import { useFlagsStore as E } from "../../hooks/useFlagsStore/index.js";
4
4
  import { useHostTools as A } from "../../hooks/useHostTools/index.js";
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ModulePrivilegesProviderProps {
3
+ queryPrivileges: string[];
4
+ children: ReactNode;
5
+ }
6
+ export interface ModulePrivilegesContextProps {
7
+ privileges: Record<string, boolean>;
8
+ hasPrivilege: (id: string | string[]) => boolean;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModulePrivilegesContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,OAAO,CAAC;CAClD"}
@@ -0,0 +1,8 @@
1
+ import { ModuleSkeletonContextProps, ModuleSkeletonProviderProps } from './types';
2
+ declare const ModuleSkeletonContext: import('react').Context<ModuleSkeletonContextProps | null>;
3
+ /**
4
+ * Proveedor de contexto de esqueleto de módulo
5
+ */
6
+ declare function ModuleSkeletonProvider(props: ModuleSkeletonProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { ModuleSkeletonProvider, ModuleSkeletonContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModuleSkeletonContext/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAElF,QAAA,MAAM,qBAAqB,4DAAyD,CAAC;AACrF;;GAEG;AACH,iBAAS,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,oDAYjE;AACD,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as n } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as l } from "react";
3
3
  import { useFlagsPresent as s } from "../../hooks/useFlagsStore/index.js";
4
4
  const i = l(null);
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ModuleSkeletonProviderProps {
3
+ flags: string[];
4
+ children: ReactNode;
5
+ }
6
+ export interface ModuleSkeletonContextProps {
7
+ isSkeleton: boolean;
8
+ }
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/ModuleSkeletonContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,8 @@
1
+ import { NetworkProviderProps } from './types';
2
+ declare const NetworkContext: import('react').Context<import('./types').NetworkType | null>;
3
+ /**
4
+ * Proveedor de contexto de red
5
+ */
6
+ declare function NetworkProvider(props: NetworkProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export { NetworkProvider, NetworkContext };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/NetworkContext/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAsB,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAExE,QAAA,MAAM,cAAc,+DAAiD,CAAC;AACtE;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,oDAmBnD;AACD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}