@m4l/core 2.0.25 → 2.0.27-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/contexts/AuthContext/AuthContext.d.ts +3 -3
- package/contexts/AuthContext/AuthContext.d.ts.map +1 -0
- package/contexts/AuthContext/AuthContext.js +64 -88
- package/contexts/AuthContext/constants.d.ts +3 -0
- package/contexts/AuthContext/constants.d.ts.map +1 -0
- package/contexts/AuthContext/constants.js +8 -2
- package/contexts/AuthContext/helpers.d.ts +6 -0
- package/contexts/AuthContext/helpers.d.ts.map +1 -0
- package/contexts/AuthContext/helpers.js +27 -0
- package/contexts/AuthContext/index.d.ts +2 -1
- package/contexts/AuthContext/index.d.ts.map +1 -0
- package/contexts/AuthContext/types.d.ts +13 -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
|
@@ -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"}
|
|
@@ -21,9 +21,9 @@ const d = (e, o) => {
|
|
|
21
21
|
* Agrega una bandera.
|
|
22
22
|
*/
|
|
23
23
|
addFlag: (s) => {
|
|
24
|
-
r((
|
|
25
|
-
const
|
|
26
|
-
|
|
24
|
+
r((t) => {
|
|
25
|
+
const a = t.flags;
|
|
26
|
+
a.findIndex((l) => l === s) < 0 && (t.flags = [...a, s]);
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -32,5 +32,5 @@ const d = (e, o) => {
|
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
export {
|
|
35
|
-
v as
|
|
35
|
+
v as createFlagsStore
|
|
36
36
|
};
|
|
@@ -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"}
|
|
@@ -4,5 +4,6 @@ declare const HostToolsContext: import('react').Context<HostToolsType | null>;
|
|
|
4
4
|
/**
|
|
5
5
|
* Proveedor de contexto de herramientas del host
|
|
6
6
|
*/
|
|
7
|
-
declare function HostToolsProvider(props: HostToolsProviderProps): import("react").JSX.Element;
|
|
7
|
+
declare function HostToolsProvider(props: HostToolsProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
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,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { createContext as n, useState as l } from "react";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const { children: t, ...
|
|
6
|
-
return /* @__PURE__ */
|
|
3
|
+
const i = n(null);
|
|
4
|
+
function a(o) {
|
|
5
|
+
const { children: t, ...r } = o, [e] = l(r);
|
|
6
|
+
return /* @__PURE__ */ s(i.Provider, { value: e, children: t });
|
|
7
7
|
}
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
i as HostToolsContext,
|
|
10
|
+
a as HostToolsProvider
|
|
11
11
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const ModuleDictionaryContext: import('react').Context<ModuleDictionaryC
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor de contexto de diccionario de módulo
|
|
5
5
|
*/
|
|
6
|
-
declare function ModuleDictionaryProvider(props: ModuleDictionaryProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function ModuleDictionaryProvider(props: ModuleDictionaryProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,34 +1,34 @@
|
|
|
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
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useEnvironment as b } from "../../hooks/useEnvironment/index.js";
|
|
4
|
+
import { useFlagsStore as I } from "../../hooks/useFlagsStore/index.js";
|
|
5
|
+
import { useHostTools as T } from "../../hooks/useHostTools/index.js";
|
|
6
|
+
import { useNetwork as k } from "../../hooks/useNetwork/index.js";
|
|
7
|
+
import { CommonFlags as w } from "../../types/index.js";
|
|
8
8
|
const G = E(null);
|
|
9
9
|
function B(F) {
|
|
10
10
|
const {
|
|
11
11
|
children: L,
|
|
12
|
-
componentsDictionary:
|
|
13
|
-
moduleId:
|
|
14
|
-
moduleNameField:
|
|
15
|
-
currentLang:
|
|
12
|
+
componentsDictionary: s,
|
|
13
|
+
moduleId: d,
|
|
14
|
+
moduleNameField: u = "module_name",
|
|
15
|
+
currentLang: A = "en",
|
|
16
16
|
isAuth: c = !0,
|
|
17
|
-
moduleDictionaryLoaded:
|
|
18
|
-
} = F, m = I((t) => t.flagsActions.addFlag), [n, f] = l(void 0), { domain_token:
|
|
17
|
+
moduleDictionaryLoaded: C
|
|
18
|
+
} = F, m = I((t) => t.flagsActions.addFlag), [n, f] = l(void 0), { domain_token: M } = b(), { startProgress: S, stopProgress: _ } = T(), { networkOperation: x } = k(), [p, N] = l(C), [g, D] = l(!1), h = O(() => s ? s.filter(
|
|
19
19
|
(t, o, e) => e.indexOf(t) === o
|
|
20
|
-
) : [], [
|
|
20
|
+
) : [], [s]);
|
|
21
21
|
y(() => {
|
|
22
22
|
let t = !0;
|
|
23
23
|
return p ? (f({
|
|
24
24
|
...p
|
|
25
25
|
}), N(void 0), D(!0)) : (S(), x({
|
|
26
26
|
method: "GET",
|
|
27
|
-
endPoint: c ? `dictionaries/${
|
|
27
|
+
endPoint: c ? `dictionaries/${d}` : `na/dictionaries/${d}`,
|
|
28
28
|
parms: {
|
|
29
29
|
comps: h,
|
|
30
30
|
// lang: 'en',
|
|
31
|
-
...c ? {} : { domain_token:
|
|
31
|
+
...c ? {} : { domain_token: M }
|
|
32
32
|
}
|
|
33
33
|
// isRemote: false
|
|
34
34
|
}).then((o) => {
|
|
@@ -40,10 +40,10 @@ function B(F) {
|
|
|
40
40
|
})), function() {
|
|
41
41
|
t = !1;
|
|
42
42
|
};
|
|
43
|
-
}, [
|
|
43
|
+
}, [A, h]), y(() => {
|
|
44
44
|
g && m(w.FLAG_DICTIONARY_LOADED);
|
|
45
45
|
}, [m, g]);
|
|
46
|
-
const
|
|
46
|
+
const a = v(
|
|
47
47
|
(t, ...o) => {
|
|
48
48
|
if (n === void 0)
|
|
49
49
|
return "";
|
|
@@ -61,13 +61,13 @@ function B(F) {
|
|
|
61
61
|
return e || `N_D:[${t}]`;
|
|
62
62
|
},
|
|
63
63
|
[n]
|
|
64
|
-
), P = v(() =>
|
|
64
|
+
), P = v(() => a(u), [u, a]);
|
|
65
65
|
return /* @__PURE__ */ $(
|
|
66
66
|
G.Provider,
|
|
67
67
|
{
|
|
68
68
|
value: {
|
|
69
69
|
moduleDictionary: n,
|
|
70
|
-
getLabel:
|
|
70
|
+
getLabel: a,
|
|
71
71
|
getModuleLabel: P
|
|
72
72
|
},
|
|
73
73
|
children: L
|
|
@@ -75,6 +75,6 @@ function B(F) {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
export {
|
|
78
|
-
G as
|
|
79
|
-
B as
|
|
78
|
+
G as ModuleDictionaryContext,
|
|
79
|
+
B as ModuleDictionaryProvider
|
|
80
80
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const ModulePrivilegesContext: import('react').Context<ModulePrivilegesC
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor de contexto de privilegios
|
|
5
5
|
*/
|
|
6
|
-
declare function ModulePrivilegesProvider(props: ModulePrivilegesProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function ModulePrivilegesProvider(props: ModulePrivilegesProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,12 +1,12 @@
|
|
|
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
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useFlagsStore as E } from "../../hooks/useFlagsStore/index.js";
|
|
4
|
+
import { useHostTools as A } from "../../hooks/useHostTools/index.js";
|
|
5
|
+
import { useNetwork as h } from "../../hooks/useNetwork/index.js";
|
|
6
|
+
import { CommonFlags as i } from "../../types/index.js";
|
|
7
7
|
const F = d(null);
|
|
8
8
|
function S(n) {
|
|
9
|
-
const { children:
|
|
9
|
+
const { children: l, queryPrivileges: o } = n, s = E((e) => e.flagsActions.addFlag), [r, a] = p({}), { startProgress: u, stopProgress: m } = A(), { networkOperation: f } = h();
|
|
10
10
|
P(() => {
|
|
11
11
|
let e = !0;
|
|
12
12
|
if (o.length === 0) {
|
|
@@ -21,7 +21,7 @@ function S(n) {
|
|
|
21
21
|
}
|
|
22
22
|
// isRemote: false
|
|
23
23
|
}).then((t) => {
|
|
24
|
-
e && (
|
|
24
|
+
e && (a({
|
|
25
25
|
...t.data
|
|
26
26
|
}), s(i.FLAG_PRIVILEGES_LOADED));
|
|
27
27
|
}).finally(() => {
|
|
@@ -41,11 +41,11 @@ function S(n) {
|
|
|
41
41
|
hasPrivilege: g,
|
|
42
42
|
privileges: r
|
|
43
43
|
},
|
|
44
|
-
children:
|
|
44
|
+
children: l
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
48
|
export {
|
|
49
|
-
F as
|
|
50
|
-
S as
|
|
49
|
+
F as ModulePrivilegesContext,
|
|
50
|
+
S as ModulePrivilegesProvider
|
|
51
51
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const ModuleSkeletonContext: import('react').Context<ModuleSkeletonConte
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor de contexto de esqueleto de módulo
|
|
5
5
|
*/
|
|
6
|
-
declare function ModuleSkeletonProvider(props: ModuleSkeletonProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function ModuleSkeletonProvider(props: ModuleSkeletonProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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,11 +1,11 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
const { children: o, flags: t } = e, r = !
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as l } from "react";
|
|
3
|
+
import { useFlagsPresent as s } from "../../hooks/useFlagsStore/index.js";
|
|
4
|
+
const i = l(null);
|
|
5
|
+
function d(e) {
|
|
6
|
+
const { children: o, flags: t } = e, r = !s(t);
|
|
7
7
|
return /* @__PURE__ */ n(
|
|
8
|
-
|
|
8
|
+
i.Provider,
|
|
9
9
|
{
|
|
10
10
|
value: {
|
|
11
11
|
isSkeleton: r
|
|
@@ -15,6 +15,6 @@ function m(e) {
|
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
i as ModuleSkeletonContext,
|
|
19
|
+
d as ModuleSkeletonProvider
|
|
20
20
|
};
|
|
@@ -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"}
|
|
@@ -3,5 +3,6 @@ declare const NetworkContext: import('react').Context<import('./types').NetworkT
|
|
|
3
3
|
/**
|
|
4
4
|
* Proveedor de contexto de red
|
|
5
5
|
*/
|
|
6
|
-
declare function NetworkProvider(props: NetworkProviderProps): import("react").JSX.Element;
|
|
6
|
+
declare function NetworkProvider(props: NetworkProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
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"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const p =
|
|
1
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext as m, useCallback as a } from "react";
|
|
3
|
+
import { useEnvironment as l } from "../../hooks/useEnvironment/index.js";
|
|
4
|
+
import { useHostTools as u } from "../../hooks/useHostTools/index.js";
|
|
5
|
+
const p = m(null);
|
|
6
6
|
function d(n) {
|
|
7
|
-
const { children: e, axiosOperation: o } = n, t =
|
|
8
|
-
async (
|
|
7
|
+
const { children: e, axiosOperation: o } = n, t = l(), r = u(), s = a(
|
|
8
|
+
async (i) => o(i, t, r),
|
|
9
9
|
[t, o, r]
|
|
10
10
|
);
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ c(
|
|
12
12
|
p.Provider,
|
|
13
13
|
{
|
|
14
14
|
value: {
|
|
@@ -19,6 +19,6 @@ function d(n) {
|
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
|
-
p as
|
|
23
|
-
d as
|
|
22
|
+
p as NetworkContext,
|
|
23
|
+
d as NetworkProvider
|
|
24
24
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/NetworkContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3D,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AACxD,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAChE;AACD,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC"}
|
package/contexts/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export { ModulePrivilegesContext, ModulePrivilegesProvider } from './ModulePrivi
|
|
|
10
10
|
export { ModuleSkeletonContext, ModuleSkeletonProvider } from './ModuleSkeletonContext';
|
|
11
11
|
export { DomainCountryContext, DomainCountryProvider } from './DomainCountryContext';
|
|
12
12
|
export type { DomainCountryContextType, DomainCountry } from './DomainCountryContext/types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACrF,YAAY,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
|
package/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/hooks/useAuth/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useAuth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useAuth/useAuth.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,OAAO,qEAMnB,CAAC;AACF,eAAe,OAAO,CAAC"}
|
package/hooks/useAuth/useAuth.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
1
|
+
import { useContext as e } from "react";
|
|
2
|
+
import { AuthContext as o } from "../../contexts/AuthContext/AuthContext.js";
|
|
3
3
|
const n = () => {
|
|
4
|
-
const t = o
|
|
4
|
+
const t = e(o);
|
|
5
5
|
if (!t)
|
|
6
6
|
throw new Error("Auth context must be use inside AuthProvider");
|
|
7
7
|
return t;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
n as
|
|
10
|
+
n as default,
|
|
11
|
+
n as useAuth
|
|
11
12
|
};
|
package/hooks/useBase/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useBase/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBase.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useBase/useBase.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAIhG;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,SAAS,EAAC,GAAG,CAAC,EAAE,CAAC,EAC7D,QAAQ,EAAE,CAAC,KAAK,EAAE,iCAAiC,CAAC,CAAC,CAAC,KAAK,CAAC,EAC5D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,OAAO,GAC1C,CAAC,CAMH;AACD;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAC,GAAG,CAAC,KAAK,CAAC,CAEtD;AACD,eAAe,OAAO,CAAC"}
|
package/hooks/useBase/useBase.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { useContext as r } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { BaseContext as s } from "../../contexts/BaseContext/BaseContext.js";
|
|
3
|
+
import { useStore as n } from "zustand";
|
|
4
|
+
import { shallow as u } from "zustand/shallow";
|
|
5
5
|
function a(e, o) {
|
|
6
|
-
const t = r(
|
|
6
|
+
const t = r(s);
|
|
7
7
|
if (!t)
|
|
8
8
|
throw new Error("useBase context must be use inside BaseContext");
|
|
9
|
-
return
|
|
9
|
+
return n(t, e, o);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return a((e) => e.value,
|
|
11
|
+
function c() {
|
|
12
|
+
return a((e) => e.value, u);
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
c as default,
|
|
16
|
+
c as useBase,
|
|
17
|
+
a as useBaseStore
|
|
17
18
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useDomain/index.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,SAAS,2DAMrB,CAAC;AACF,eAAe,SAAS,CAAC"}
|
package/hooks/useDomain/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
if (!
|
|
1
|
+
import { useContext as o } from "react";
|
|
2
|
+
import { DomainContext as e } from "../../contexts/DomainContext/index.js";
|
|
3
|
+
const i = () => {
|
|
4
|
+
const t = o(e);
|
|
5
|
+
if (!t)
|
|
6
6
|
throw new Error("useDomain context must be use inside DomainContext");
|
|
7
|
-
return
|
|
7
|
+
return t;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
i as default,
|
|
11
|
+
i as useDomain
|
|
11
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useDomainCountry/index.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,gBAAgB,gDAM5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { DomainCountryContext as n } from "../../contexts/DomainCountryContext/index.js";
|
|
3
3
|
const u = () => {
|
|
4
4
|
const o = t(n);
|
|
5
5
|
if (!o)
|
|
@@ -7,5 +7,5 @@ const u = () => {
|
|
|
7
7
|
return o;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
u
|
|
10
|
+
u as useDomainCountry
|
|
11
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/hooks/useEnvironment/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF;;GAEG;AACH,eAAO,MAAM,cAAc,QAAO,sBAMjC,CAAC;AACF,eAAe,cAAc,CAAC"}
|