@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.
- package/contexts/AuthContext/AuthContext.d.ts +3 -3
- package/contexts/AuthContext/AuthContext.d.ts.map +1 -0
- package/contexts/AuthContext/AuthContext.js +52 -48
- package/contexts/AuthContext/constants.d.ts +1 -0
- package/contexts/AuthContext/constants.d.ts.map +1 -0
- package/contexts/AuthContext/constants.js +2 -2
- package/contexts/AuthContext/helpers.d.ts +1 -0
- package/contexts/AuthContext/helpers.d.ts.map +1 -0
- package/contexts/AuthContext/helpers.js +1 -1
- package/contexts/AuthContext/index.d.ts +1 -0
- package/contexts/AuthContext/index.d.ts.map +1 -0
- package/contexts/AuthContext/types.d.ts +1 -0
- package/contexts/AuthContext/types.d.ts.map +1 -0
- package/contexts/BaseContext/BaseContext.d.ts +2 -1
- package/contexts/BaseContext/BaseContext.d.ts.map +1 -0
- package/contexts/BaseContext/BaseContext.js +11 -11
- package/contexts/BaseContext/index.d.ts +1 -0
- package/contexts/BaseContext/index.d.ts.map +1 -0
- package/contexts/BaseContext/store.d.ts +1 -0
- package/contexts/BaseContext/store.d.ts.map +1 -0
- package/contexts/BaseContext/store.js +1 -1
- package/contexts/BaseContext/types.d.ts +1 -0
- package/contexts/BaseContext/types.d.ts.map +1 -0
- package/contexts/DomainContext/index.d.ts +2 -1
- package/contexts/DomainContext/index.d.ts.map +1 -0
- package/contexts/DomainContext/index.js +23 -23
- package/contexts/DomainContext/types.d.ts +1 -0
- package/contexts/DomainContext/types.d.ts.map +1 -0
- package/contexts/DomainCountryContext/index.d.ts +2 -1
- package/contexts/DomainCountryContext/index.d.ts.map +1 -0
- package/contexts/DomainCountryContext/index.js +18 -18
- package/contexts/DomainCountryContext/types.d.ts +1 -0
- package/contexts/DomainCountryContext/types.d.ts.map +1 -0
- package/contexts/EnvironmentContext/index.d.ts +2 -1
- package/contexts/EnvironmentContext/index.d.ts.map +1 -0
- package/contexts/EnvironmentContext/index.js +9 -9
- package/contexts/EnvironmentContext/types.d.ts +1 -0
- package/contexts/EnvironmentContext/types.d.ts.map +1 -0
- package/contexts/FlagsContext/index.d.ts +3 -2
- package/contexts/FlagsContext/index.d.ts.map +1 -0
- package/contexts/FlagsContext/index.js +9 -9
- package/contexts/FlagsContext/store.d.ts +2 -1
- package/contexts/FlagsContext/store.d.ts.map +1 -0
- package/contexts/FlagsContext/store.js +4 -4
- package/contexts/FlagsContext/types.d.ts +1 -0
- package/contexts/FlagsContext/types.d.ts.map +1 -0
- package/contexts/HostToolsContext/index.d.ts +2 -1
- package/contexts/HostToolsContext/index.d.ts.map +1 -0
- package/contexts/HostToolsContext/index.js +7 -7
- package/contexts/HostToolsContext/types.d.ts +1 -0
- package/contexts/HostToolsContext/types.d.ts.map +1 -0
- package/contexts/ModuleDictionaryContext/index.d.ts +2 -1
- package/contexts/ModuleDictionaryContext/index.d.ts.map +1 -0
- package/contexts/ModuleDictionaryContext/index.js +21 -21
- package/contexts/ModuleDictionaryContext/types.d.ts +1 -0
- package/contexts/ModuleDictionaryContext/types.d.ts.map +1 -0
- package/contexts/ModulePrivilegesContext/index.d.ts +2 -1
- package/contexts/ModulePrivilegesContext/index.d.ts.map +1 -0
- package/contexts/ModulePrivilegesContext/index.js +10 -10
- package/contexts/ModulePrivilegesContext/types.d.ts +1 -0
- package/contexts/ModulePrivilegesContext/types.d.ts.map +1 -0
- package/contexts/ModuleSkeletonContext/index.d.ts +2 -1
- package/contexts/ModuleSkeletonContext/index.d.ts.map +1 -0
- package/contexts/ModuleSkeletonContext/index.js +9 -9
- package/contexts/ModuleSkeletonContext/types.d.ts +1 -0
- package/contexts/ModuleSkeletonContext/types.d.ts.map +1 -0
- package/contexts/NetworkContext/index.d.ts +2 -1
- package/contexts/NetworkContext/index.d.ts.map +1 -0
- package/contexts/NetworkContext/index.js +10 -10
- package/contexts/NetworkContext/types.d.ts +1 -0
- package/contexts/NetworkContext/types.d.ts.map +1 -0
- package/contexts/index.d.ts +1 -0
- package/contexts/index.d.ts.map +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/useAuth/index.d.ts +1 -0
- package/hooks/useAuth/index.d.ts.map +1 -0
- package/hooks/useAuth/useAuth.d.ts +1 -0
- package/hooks/useAuth/useAuth.d.ts.map +1 -0
- package/hooks/useAuth/useAuth.js +5 -4
- package/hooks/useBase/index.d.ts +1 -0
- package/hooks/useBase/index.d.ts.map +1 -0
- package/hooks/useBase/useBase.d.ts +1 -0
- package/hooks/useBase/useBase.d.ts.map +1 -0
- package/hooks/useBase/useBase.js +10 -9
- package/hooks/useDomain/index.d.ts +1 -0
- package/hooks/useDomain/index.d.ts.map +1 -0
- package/hooks/useDomain/index.js +8 -7
- package/hooks/useDomainCountry/index.d.ts +1 -0
- package/hooks/useDomainCountry/index.d.ts.map +1 -0
- package/hooks/useDomainCountry/index.js +2 -2
- package/hooks/useEnvironment/index.d.ts +1 -0
- package/hooks/useEnvironment/index.d.ts.map +1 -0
- package/hooks/useEnvironment/index.js +8 -7
- package/hooks/useFlagsStore/index.d.ts +1 -0
- package/hooks/useFlagsStore/index.d.ts.map +1 -0
- package/hooks/useFlagsStore/index.js +9 -9
- package/hooks/useHostTools/index.d.ts +1 -0
- package/hooks/useHostTools/index.d.ts.map +1 -0
- package/hooks/useHostTools/index.js +3 -2
- package/hooks/useLocalStorage/index.d.ts +1 -0
- package/hooks/useLocalStorage/index.d.ts.map +1 -0
- package/hooks/useLocalStorage/index.js +4 -4
- package/hooks/useLocalStorageWithListener/index.d.ts +1 -0
- package/hooks/useLocalStorageWithListener/index.d.ts.map +1 -0
- package/hooks/useLocalStorageWithListener/index.js +2 -1
- package/hooks/useModuleDictionary/index.d.ts +1 -0
- package/hooks/useModuleDictionary/index.d.ts.map +1 -0
- package/hooks/useModuleDictionary/index.js +2 -2
- package/hooks/useModulePrivileges/index.d.ts +1 -0
- package/hooks/useModulePrivileges/index.d.ts.map +1 -0
- package/hooks/useModulePrivileges/index.js +3 -3
- package/hooks/useModuleSkeleton/index.d.ts +1 -0
- package/hooks/useModuleSkeleton/index.d.ts.map +1 -0
- package/hooks/useModuleSkeleton/index.js +3 -3
- package/hooks/useNetwork/index.d.ts +1 -0
- package/hooks/useNetwork/index.d.ts.map +1 -0
- package/hooks/useNetwork/index.js +3 -2
- package/hooks/usePaginate/index.d.ts +1 -0
- package/hooks/usePaginate/index.d.ts.map +1 -0
- package/hooks/usePaginate/index.js +19 -19
- package/hooks/usePaginate/types.d.ts +1 -0
- package/hooks/usePaginate/types.d.ts.map +1 -0
- package/hooks/usePaginate/types.js +2 -2
- package/hooks/usePropageteMF/index.d.ts +1 -0
- package/hooks/usePropageteMF/index.d.ts.map +1 -0
- package/hooks/usePropageteMF/index.js +6 -6
- package/hooks/usePropageteMF/types.d.ts +1 -0
- package/hooks/usePropageteMF/types.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -0
- package/index.js +68 -68
- package/package.json +29 -52
- package/test/constants.d.ts +2 -0
- package/test/constants.d.ts.map +1 -0
- package/test/index.d.ts +1 -0
- package/test/index.d.ts.map +1 -0
- package/test/mocks.d.ts +9 -7
- package/test/mocks.d.ts.map +1 -0
- package/test/setup.d.ts +1 -0
- package/test/setup.d.ts.map +1 -0
- package/test/types.d.ts +1 -0
- package/test/types.d.ts.map +1 -0
- package/test/utils.d.ts +2 -2
- package/test/utils.d.ts.map +1 -0
- package/types/dictionary.d.ts +1 -0
- package/types/dictionary.d.ts.map +1 -0
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -0
- package/types/index.js +2 -2
- package/utils/axiosOperation/index.d.ts +1 -0
- package/utils/axiosOperation/index.d.ts.map +1 -0
- package/utils/axiosOperation/index.js +15 -15
- package/utils/axiosOperation/types.d.ts +1 -0
- package/utils/axiosOperation/types.d.ts.map +1 -0
- package/utils/evaluateWithContext/index.d.ts +1 -0
- package/utils/evaluateWithContext/index.d.ts.map +1 -0
- package/utils/evaluateWithContext/index.js +1 -1
- package/utils/getLocalStorage/index.d.ts +1 -0
- package/utils/getLocalStorage/index.d.ts.map +1 -0
- package/utils/getLocalStorage/index.js +1 -1
- package/utils/getPropertyByString/index.d.ts +1 -0
- package/utils/getPropertyByString/index.d.ts.map +1 -0
- package/utils/getPropertyByString/index.js +4 -4
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/setLocalStorage/index.d.ts +1 -0
- package/utils/setLocalStorage/index.d.ts.map +1 -0
- package/utils/setLocalStorage/index.js +3 -3
- package/utils/voidFunction.d.ts +1 -0
- package/utils/voidFunction.d.ts.map +1 -0
- package/utils/voidFunction.js +1 -1
- package/contexts/AuthContext/AuthContext.test.d.ts +0 -1
- package/contexts/AuthContext/index.js +0 -1
- package/contexts/BaseContext/index.js +0 -1
- package/contexts/BaseContext/index.test.d.ts +0 -1
- package/contexts/DomainContext/index.test.d.ts +0 -1
- package/contexts/DomainCountryContext/index.test.d.ts +0 -1
- package/contexts/EnvironmentContext/index.test.d.ts +0 -1
- package/contexts/FlagsContext/index.test.d.ts +0 -1
- package/contexts/HostToolsContext/index.test.d.ts +0 -1
- package/contexts/ModuleDictionaryContext/index.test.d.ts +0 -1
- package/contexts/ModulePrivilegesContext/index.test.d.ts +0 -1
- package/contexts/ModuleSkeletonContext/index.test.d.ts +0 -1
- package/contexts/NetworkContext/index.test.d.ts +0 -1
- package/contexts/index.js +0 -1
- package/hooks/index.js +0 -1
- package/hooks/useAuth/index.js +0 -1
- package/hooks/useAuth/useAuth.test.d.ts +0 -1
- package/hooks/useBase/index.js +0 -1
- package/hooks/useBase/index.test.d.ts +0 -1
- package/hooks/useDomain/index.test.d.ts +0 -1
- package/hooks/useDomainCountry/index.test.d.ts +0 -1
- package/hooks/useEnvironment/index.test.d.ts +0 -1
- package/hooks/useFlagsStore/index.test.d.ts +0 -1
- package/hooks/useHostTools/index.test.d.ts +0 -1
- package/hooks/useLocalStorage/index.test.d.ts +0 -1
- package/hooks/useLocalStorageWithListener/index.test.d.ts +0 -1
- package/hooks/useModuleDictionary/index.test.d.ts +0 -1
- package/hooks/useModulePrivileges/index.test.d.ts +0 -1
- package/hooks/useModuleSkeleton/index.test.d.ts +0 -1
- package/hooks/useNetwork/index.test.d.ts +0 -1
- package/hooks/usePaginate/index.test.d.ts +0 -1
- package/utils/axiosOperation/index.test.d.ts +0 -1
- package/utils/getLocalStorage/index.test.d.ts +0 -1
- package/utils/getPropertyByString/index.test.d.ts +0 -1
- package/utils/index.js +0 -1
- package/utils/setLocalStorage/index.test.d.ts +0 -1
- package/vite-env.d.ts +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { AuthProviderProps, SessionContextType } from './types';
|
|
3
|
-
declare const AuthContext:
|
|
2
|
+
declare const AuthContext: import('react').Context<SessionContextType | null>;
|
|
4
3
|
/**
|
|
5
4
|
* Proveedor de autenticación
|
|
6
5
|
*/
|
|
7
|
-
declare function AuthProvider(props: AuthProviderProps):
|
|
6
|
+
declare function AuthProvider(props: AuthProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
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,43 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as U } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as _, useReducer as w, useEffect as p, useCallback as m } from "react";
|
|
3
|
+
import { useEnvironment as A } from "../../hooks/useEnvironment/index.js";
|
|
4
|
+
import { useHostTools as I } from "../../hooks/useHostTools/index.js";
|
|
5
|
+
import { useLocalStorageWithListener as L } from "../../hooks/useLocalStorageWithListener/index.js";
|
|
6
|
+
import { useNetwork as P } from "../../hooks/useNetwork/index.js";
|
|
7
|
+
import { initialState as f, EnumTypes as s } from "./constants.js";
|
|
8
|
+
import { getLocalStorage as x } from "../../utils/getLocalStorage/index.js";
|
|
9
|
+
import { setLocalStorage as l } from "../../utils/setLocalStorage/index.js";
|
|
10
|
+
import "axios";
|
|
11
|
+
import "qs";
|
|
12
|
+
import "camelcase-keys";
|
|
13
|
+
import "snakecase-keys";
|
|
14
|
+
import { EmmitEvents as N } from "../../types/index.js";
|
|
15
|
+
import { JWTReducer as k } from "./helpers.js";
|
|
16
|
+
const z = _(null);
|
|
17
|
+
function Q(h) {
|
|
18
|
+
const { children: g, isMicroFrontEnd: r = !1, loggedUser: c } = h, [T, i] = w(k, r ? { ...f, user: c, isAuthenticated: !0, isInitialized: !0 } : f), { events_add_listener: E } = I(), { networkOperation: e } = P(), { domain_token: d } = A(), [y, a] = L(
|
|
15
19
|
// Variable para saber si ha cambiado la session en otro navegador
|
|
16
20
|
"vSession",
|
|
17
21
|
(/* @__PURE__ */ new Date()).getTime() + ""
|
|
18
22
|
);
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
23
|
+
p(() => {
|
|
24
|
+
const t = async () => {
|
|
25
|
+
e({
|
|
22
26
|
method: "GET",
|
|
23
27
|
endPoint: "auth/login",
|
|
24
28
|
parms: { user_data: !0 },
|
|
25
29
|
checkUnAuthorized: !1,
|
|
26
30
|
responseToCamelCase: !0
|
|
27
|
-
}).then((
|
|
28
|
-
|
|
29
|
-
type:
|
|
31
|
+
}).then((o) => {
|
|
32
|
+
i({
|
|
33
|
+
type: s.Initial,
|
|
30
34
|
payload: {
|
|
31
35
|
isAuthenticated: !0,
|
|
32
|
-
user:
|
|
36
|
+
user: o.user
|
|
33
37
|
}
|
|
34
|
-
}),
|
|
35
|
-
email:
|
|
38
|
+
}), x("userData", {
|
|
39
|
+
email: o.user.email,
|
|
36
40
|
remember: !0
|
|
37
|
-
})?.email !==
|
|
41
|
+
})?.email !== o.user.email && l("userData", { email: o.user.email }, !0);
|
|
38
42
|
}).catch(() => {
|
|
39
|
-
|
|
40
|
-
type:
|
|
43
|
+
i({
|
|
44
|
+
type: s.Initial,
|
|
41
45
|
payload: {
|
|
42
46
|
isAuthenticated: !1,
|
|
43
47
|
user: null
|
|
@@ -45,50 +49,50 @@ function b(g) {
|
|
|
45
49
|
});
|
|
46
50
|
});
|
|
47
51
|
};
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
const D =
|
|
51
|
-
await
|
|
52
|
+
r || t();
|
|
53
|
+
}, [e, y, r, c]);
|
|
54
|
+
const D = m(async (t, o, n) => {
|
|
55
|
+
await e({
|
|
52
56
|
endPoint: "auth/login",
|
|
53
57
|
method: "POST",
|
|
54
58
|
data: {
|
|
55
|
-
email:
|
|
56
|
-
password:
|
|
59
|
+
email: t,
|
|
60
|
+
password: o,
|
|
57
61
|
domain_token: d
|
|
58
62
|
},
|
|
59
63
|
responseToCamelCase: !0
|
|
60
64
|
}).then((v) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
type:
|
|
65
|
+
const C = v.data;
|
|
66
|
+
n ? l("userData", { email: t, remember: n }) : l("userData", { email: "", remember: n }), i({
|
|
67
|
+
type: s.Login,
|
|
64
68
|
payload: {
|
|
65
|
-
user:
|
|
69
|
+
user: C
|
|
66
70
|
}
|
|
67
|
-
}),
|
|
71
|
+
}), a((/* @__PURE__ */ new Date()).getTime() + "");
|
|
68
72
|
});
|
|
69
|
-
}, [
|
|
70
|
-
|
|
73
|
+
}, [e, a, d]), u = m(async (t) => {
|
|
74
|
+
t && await e({
|
|
71
75
|
endPoint: "auth/logout",
|
|
72
76
|
method: "POST"
|
|
73
|
-
}),
|
|
74
|
-
}, [
|
|
77
|
+
}), i({ type: s.Logout }), a((/* @__PURE__ */ new Date()).getTime() + "");
|
|
78
|
+
}, [e, a]), S = m(() => {
|
|
75
79
|
u(!1);
|
|
76
80
|
}, [u]);
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
}, [
|
|
81
|
+
return p(function() {
|
|
82
|
+
r || E(N.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, S);
|
|
83
|
+
}, [r]), /* @__PURE__ */ U(
|
|
80
84
|
z.Provider,
|
|
81
85
|
{
|
|
82
86
|
value: {
|
|
83
|
-
...
|
|
87
|
+
...T,
|
|
84
88
|
login: D,
|
|
85
89
|
logout: u
|
|
86
90
|
},
|
|
87
|
-
children:
|
|
91
|
+
children: g
|
|
88
92
|
}
|
|
89
93
|
);
|
|
90
94
|
}
|
|
91
95
|
export {
|
|
92
|
-
z as
|
|
93
|
-
|
|
96
|
+
z as AuthContext,
|
|
97
|
+
Q as AuthProvider
|
|
94
98
|
};
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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"}
|
|
@@ -3,5 +3,6 @@ declare const BaseContext: import('react').Context<import('zustand').StoreApi<im
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor base para los contextos.
|
|
5
5
|
*/
|
|
6
|
-
declare function BaseProvider<T extends Record<any, any>>(props: BaseProviderProps<T>): import("react").JSX.Element;
|
|
6
|
+
declare function BaseProvider<T extends Record<any, any>>(props: BaseProviderProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useRef as c, useEffect as l } from "react";
|
|
3
|
+
import { createBaseProviderStore as i } from "./store.js";
|
|
4
4
|
import { deepEqual as f } from "fast-equals";
|
|
5
|
-
const d =
|
|
5
|
+
const d = s(null);
|
|
6
6
|
function x(t) {
|
|
7
|
-
const { children: o, value: r, storeId:
|
|
8
|
-
return e.current || (e.current =
|
|
9
|
-
storeId:
|
|
7
|
+
const { children: o, value: r, storeId: n = "general", storeDevtoolsEnabled: a = !1 } = t, e = c(null);
|
|
8
|
+
return e.current || (e.current = i({
|
|
9
|
+
storeId: n,
|
|
10
10
|
value: r
|
|
11
|
-
},
|
|
11
|
+
}, a)), l(() => {
|
|
12
12
|
if (e.current && !f(r, e.current.getState().value)) {
|
|
13
13
|
e.current.getState().actions.setPartialValue(r);
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
}, [r]), /* @__PURE__ */
|
|
16
|
+
}, [r]), /* @__PURE__ */ u(d.Provider, { value: e.current, children: o });
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
d as
|
|
20
|
-
x as
|
|
19
|
+
d as BaseContext,
|
|
20
|
+
x as BaseProvider
|
|
21
21
|
};
|
|
@@ -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"}
|
|
@@ -4,3 +4,4 @@ import { BaseProviderStoreStateWithActions, InitialBaseProviderStoreProps, KeyOF
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function createBaseProviderStore<T extends Record<KeyOFHash, any>>(initProps: InitialBaseProviderStoreProps<T>, storeDevtoolsEnabled?: boolean): import('zustand').StoreApi<BaseProviderStoreStateWithActions<T>>;
|
|
6
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 @@
|
|
|
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"}
|
|
@@ -3,5 +3,6 @@ declare const DomainContext: import('react').Context<Domain | null>;
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor del contexto de dominio.
|
|
5
5
|
*/
|
|
6
|
-
declare function DomainProvider(props: DomainProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function DomainProvider(props: DomainProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,41 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { shallow as
|
|
8
|
-
const $ =
|
|
9
|
-
function
|
|
10
|
-
const { children: e } = r, { domain_token: i, host_static_assets: o, environment_assets: n } =
|
|
1
|
+
import { jsx as g } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as d, useState as u, useEffect as f } from "react";
|
|
3
|
+
import { useFlagsStore as p } from "../../hooks/useFlagsStore/index.js";
|
|
4
|
+
import { useEnvironment as v } from "../../hooks/useEnvironment/index.js";
|
|
5
|
+
import { useNetwork as y } from "../../hooks/useNetwork/index.js";
|
|
6
|
+
import { CommonFlags as l } from "../../types/index.js";
|
|
7
|
+
import { shallow as D } from "zustand/shallow";
|
|
8
|
+
const $ = d(null);
|
|
9
|
+
function L(r) {
|
|
10
|
+
const { children: e } = r, { domain_token: i, host_static_assets: o, environment_assets: n } = v(), a = p((t) => t.flagsActions.addFlag, D), [_, m] = u({
|
|
11
11
|
company_logo_small_url: "",
|
|
12
12
|
company_logo_normal_url: "",
|
|
13
13
|
name: "",
|
|
14
14
|
slogan: ""
|
|
15
|
-
}), { networkOperation: c } =
|
|
15
|
+
}), { networkOperation: c } = y();
|
|
16
16
|
return f(() => {
|
|
17
|
-
let
|
|
17
|
+
let t = !0;
|
|
18
18
|
return c({
|
|
19
19
|
method: "GET",
|
|
20
20
|
endPoint: `na/info/${i}`
|
|
21
|
-
}).then((
|
|
22
|
-
|
|
23
|
-
...
|
|
24
|
-
company_logo_normal_url:
|
|
25
|
-
company_logo_small_url:
|
|
26
|
-
}),
|
|
21
|
+
}).then((s) => {
|
|
22
|
+
t && (m({
|
|
23
|
+
...s.data,
|
|
24
|
+
company_logo_normal_url: s.data.company_logo_normal_url ?? `${o}/${n}/frontend/commons/assets/icons/isologo.svg`,
|
|
25
|
+
company_logo_small_url: s.data.company_logo_small_url ?? `${o}/${n}/frontend/commons/assets/icons/isotipo_m4l.svg`
|
|
26
|
+
}), a(l.FLAG_DOMAIN_LOADED));
|
|
27
27
|
}).catch(() => {
|
|
28
28
|
m({
|
|
29
29
|
company_logo_normal_url: `${o}/${n}/frontend/commons/assets/icons/isologo.svg`,
|
|
30
30
|
company_logo_small_url: `${o}/${n}/frontend/commons/assets/icons/isotipo_m4l.svg`,
|
|
31
31
|
name: "Pending",
|
|
32
32
|
slogan: "Pending"
|
|
33
|
-
}),
|
|
33
|
+
}), a(l.FLAG_DOMAIN_LOADED);
|
|
34
34
|
}).finally(() => {
|
|
35
35
|
}), function() {
|
|
36
|
-
|
|
36
|
+
t = !1;
|
|
37
37
|
};
|
|
38
|
-
}, []), /* @__PURE__ */
|
|
38
|
+
}, []), /* @__PURE__ */ g(
|
|
39
39
|
$.Provider,
|
|
40
40
|
{
|
|
41
41
|
value: {
|
|
@@ -48,6 +48,6 @@ function C(r) {
|
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
$ as
|
|
52
|
-
|
|
51
|
+
$ as DomainContext,
|
|
52
|
+
L as DomainProvider
|
|
53
53
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const DomainCountryContext: import('react').Context<DomainCountryContext
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor del contexto de país de dominio.
|
|
5
5
|
*/
|
|
6
|
-
declare function DomainCountryProvider(props: DomainCountryProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function DomainCountryProvider(props: DomainCountryProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,28 +1,28 @@
|
|
|
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
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
3
|
+
import { useHostTools as M } from "../../hooks/useHostTools/index.js";
|
|
4
|
+
import { usePropageteMF as N } from "../../hooks/usePropageteMF/index.js";
|
|
5
|
+
import { EmmitEvents as r } from "../../types/index.js";
|
|
6
|
+
const p = y(null);
|
|
7
7
|
function A(e) {
|
|
8
8
|
const {
|
|
9
|
-
children:
|
|
9
|
+
children: i,
|
|
10
10
|
isMicroFrontEnd: t,
|
|
11
|
-
id:
|
|
12
|
-
currency:
|
|
13
|
-
currency_decimal_digits:
|
|
11
|
+
id: s,
|
|
12
|
+
currency: m,
|
|
13
|
+
currency_decimal_digits: a,
|
|
14
14
|
decimal_symbol: c,
|
|
15
15
|
thousands_symbol: u
|
|
16
|
-
} = e, { events_emit: _ } =
|
|
17
|
-
id:
|
|
18
|
-
currency:
|
|
19
|
-
currency_decimal_digits:
|
|
16
|
+
} = e, { events_emit: _ } = M(), [l, C] = T({
|
|
17
|
+
id: s,
|
|
18
|
+
currency: m,
|
|
19
|
+
currency_decimal_digits: a,
|
|
20
20
|
decimal_symbol: c,
|
|
21
21
|
thousands_symbol: u
|
|
22
22
|
}), n = (o) => {
|
|
23
23
|
C(o);
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
N({
|
|
26
26
|
isMicroFrontEnd: t,
|
|
27
27
|
event: r.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE,
|
|
28
28
|
setHandler: n
|
|
@@ -31,17 +31,17 @@ function A(e) {
|
|
|
31
31
|
t || (n(o), _(r.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, o));
|
|
32
32
|
}, []);
|
|
33
33
|
return /* @__PURE__ */ d(
|
|
34
|
-
|
|
34
|
+
p.Provider,
|
|
35
35
|
{
|
|
36
36
|
value: {
|
|
37
37
|
...l,
|
|
38
38
|
changeDomainCountry: E
|
|
39
39
|
},
|
|
40
|
-
children:
|
|
40
|
+
children: i
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
export {
|
|
45
|
-
|
|
46
|
-
A as
|
|
45
|
+
p as DomainCountryContext,
|
|
46
|
+
A as DomainCountryProvider
|
|
47
47
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const EnvironmentContext: import('react').Context<EnvironmentContextType
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor del contexto de entorno.
|
|
5
5
|
*/
|
|
6
|
-
declare function EnvironmentProvider(props: EnvironmentProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function EnvironmentProvider(props: EnvironmentProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,8 +1,8 @@
|
|
|
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
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const { children: o, ...
|
|
3
|
+
const d = l(null);
|
|
4
|
+
function a(e) {
|
|
5
|
+
const { children: o, ...n } = e, s = u((t) => {
|
|
6
6
|
if (e.isIsolatation)
|
|
7
7
|
return `${e.host}/module/assets/icons/${t}`;
|
|
8
8
|
if (e?.isMicroFrontend) {
|
|
@@ -12,12 +12,12 @@ function c(e) {
|
|
|
12
12
|
} else
|
|
13
13
|
return `mf/module/assets/icons/${t}`;
|
|
14
14
|
}, []), [r] = m({
|
|
15
|
-
...
|
|
16
|
-
getModuleUrlIconAsset:
|
|
15
|
+
...n,
|
|
16
|
+
getModuleUrlIconAsset: s
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */ i(
|
|
18
|
+
return /* @__PURE__ */ i(d.Provider, { value: r, children: o });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
d as EnvironmentContext,
|
|
22
|
+
a as EnvironmentProvider
|
|
23
23
|
};
|
|
@@ -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"}
|
|
@@ -4,12 +4,13 @@ declare const FlagsContext: import('react').Context<(Omit<Omit<import('zustand')
|
|
|
4
4
|
type: unknown;
|
|
5
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
6
|
}, "setState"> & {
|
|
7
|
-
setState(nextStateOrUpdater: import('./types').FlagsStateWithActions | Partial<import('./types').FlagsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<import('./types').FlagsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
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
8
|
type: unknown;
|
|
9
9
|
} | undefined): void;
|
|
10
10
|
}) | null>;
|
|
11
11
|
/**
|
|
12
12
|
* Proveedor del contexto de banderas.
|
|
13
13
|
*/
|
|
14
|
-
declare function FlagsProvider({ children, storeId, storeDevtoolsEnabled }: FlagsProviderProps): import("react").JSX.Element;
|
|
14
|
+
declare function FlagsProvider({ children, storeId, storeDevtoolsEnabled }: FlagsProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
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,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as s, useRef as c } from "react";
|
|
3
|
+
import { createFlagsStore as f } from "./store.js";
|
|
4
|
+
const i = s(null);
|
|
5
5
|
function m({ children: e, storeId: t, storeDevtoolsEnabled: o }) {
|
|
6
|
-
const r =
|
|
7
|
-
return r.current || (r.current =
|
|
6
|
+
const r = c(void 0);
|
|
7
|
+
return r.current || (r.current = f({
|
|
8
8
|
flags: [],
|
|
9
9
|
storeId: t
|
|
10
|
-
}, o)), /* @__PURE__ */
|
|
10
|
+
}, o)), /* @__PURE__ */ n(i.Provider, { value: r.current, children: e });
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
m as
|
|
13
|
+
i as FlagsContext,
|
|
14
|
+
m as FlagsProvider
|
|
15
15
|
};
|
|
@@ -7,8 +7,9 @@ export declare const createFlagsStore: (initialState: FlagsStoreState, storeDevt
|
|
|
7
7
|
type: unknown;
|
|
8
8
|
}>(partial: FlagsStateWithActions | Partial<FlagsStateWithActions> | ((state: FlagsStateWithActions) => FlagsStateWithActions | Partial<FlagsStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
9
9
|
}, "setState"> & {
|
|
10
|
-
setState(nextStateOrUpdater: FlagsStateWithActions | Partial<FlagsStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<FlagsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
10
|
+
setState(nextStateOrUpdater: FlagsStateWithActions | Partial<FlagsStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<FlagsStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
11
11
|
type: unknown;
|
|
12
12
|
} | undefined): void;
|
|
13
13
|
};
|
|
14
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"}
|