@m4l/core 2.0.26 → 2.0.27-beta.1
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.js +52 -48
- package/contexts/AuthContext/constants.js +2 -2
- package/contexts/AuthContext/helpers.js +1 -1
- package/contexts/BaseContext/BaseContext.js +11 -11
- package/contexts/BaseContext/store.js +1 -1
- package/contexts/DomainContext/index.js +23 -23
- package/contexts/DomainCountryContext/index.js +17 -17
- package/contexts/EnvironmentContext/index.js +8 -8
- package/contexts/FlagsContext/index.js +9 -9
- package/contexts/FlagsContext/store.js +4 -4
- package/contexts/HostToolsContext/index.js +7 -7
- package/contexts/ModuleDictionaryContext/index.js +20 -20
- package/contexts/ModulePrivilegesContext/index.js +9 -9
- package/contexts/ModuleSkeletonContext/index.js +8 -8
- package/contexts/NetworkContext/index.js +10 -10
- package/hooks/useAuth/useAuth.js +5 -4
- package/hooks/useBase/useBase.js +10 -9
- package/hooks/useDomain/index.js +8 -7
- package/hooks/useDomainCountry/index.js +2 -2
- package/hooks/useEnvironment/index.js +8 -7
- package/hooks/useFlagsStore/index.js +9 -9
- package/hooks/useHostTools/index.js +3 -2
- package/hooks/useLocalStorage/index.js +4 -4
- package/hooks/useLocalStorageWithListener/index.js +2 -1
- package/hooks/useModuleDictionary/index.js +2 -2
- package/hooks/useModulePrivileges/index.js +3 -3
- package/hooks/useModuleSkeleton/index.js +3 -3
- package/hooks/useNetwork/index.js +3 -2
- package/hooks/usePaginate/index.js +19 -19
- package/hooks/usePaginate/types.js +2 -2
- package/hooks/usePropageteMF/index.js +6 -6
- package/index.js +68 -68
- package/package.json +30 -52
- package/types/index.js +2 -2
- package/utils/axiosOperation/index.js +15 -15
- package/utils/evaluateWithContext/index.js +1 -1
- package/utils/getLocalStorage/index.js +1 -1
- package/utils/getPropertyByString/index.js +4 -4
- package/utils/setLocalStorage/index.js +3 -3
- package/utils/voidFunction.js +1 -1
- package/contexts/AuthContext/AuthContext.d.ts +0 -8
- package/contexts/AuthContext/AuthContext.test.d.ts +0 -1
- package/contexts/AuthContext/constants.d.ts +0 -7
- package/contexts/AuthContext/helpers.d.ts +0 -5
- package/contexts/AuthContext/index.d.ts +0 -2
- package/contexts/AuthContext/index.js +0 -1
- package/contexts/AuthContext/types.d.ts +0 -67
- package/contexts/BaseContext/BaseContext.d.ts +0 -7
- package/contexts/BaseContext/index.d.ts +0 -2
- package/contexts/BaseContext/index.js +0 -1
- package/contexts/BaseContext/index.test.d.ts +0 -1
- package/contexts/BaseContext/store.d.ts +0 -6
- package/contexts/BaseContext/types.d.ts +0 -37
- package/contexts/DomainContext/index.d.ts +0 -7
- package/contexts/DomainContext/index.test.d.ts +0 -1
- package/contexts/DomainContext/types.d.ts +0 -11
- package/contexts/DomainCountryContext/index.d.ts +0 -7
- package/contexts/DomainCountryContext/index.test.d.ts +0 -1
- package/contexts/DomainCountryContext/types.d.ts +0 -15
- package/contexts/EnvironmentContext/index.d.ts +0 -7
- package/contexts/EnvironmentContext/index.test.d.ts +0 -1
- package/contexts/EnvironmentContext/types.d.ts +0 -14
- package/contexts/FlagsContext/index.d.ts +0 -15
- package/contexts/FlagsContext/index.test.d.ts +0 -1
- package/contexts/FlagsContext/store.d.ts +0 -14
- package/contexts/FlagsContext/types.d.ts +0 -46
- package/contexts/HostToolsContext/index.d.ts +0 -8
- package/contexts/HostToolsContext/index.test.d.ts +0 -1
- package/contexts/HostToolsContext/types.d.ts +0 -6
- package/contexts/ModuleDictionaryContext/index.d.ts +0 -7
- package/contexts/ModuleDictionaryContext/index.test.d.ts +0 -1
- package/contexts/ModuleDictionaryContext/types.d.ts +0 -16
- package/contexts/ModulePrivilegesContext/index.d.ts +0 -7
- package/contexts/ModulePrivilegesContext/index.test.d.ts +0 -1
- package/contexts/ModulePrivilegesContext/types.d.ts +0 -9
- package/contexts/ModuleSkeletonContext/index.d.ts +0 -7
- package/contexts/ModuleSkeletonContext/index.test.d.ts +0 -1
- package/contexts/ModuleSkeletonContext/types.d.ts +0 -8
- package/contexts/NetworkContext/index.d.ts +0 -7
- package/contexts/NetworkContext/index.test.d.ts +0 -1
- package/contexts/NetworkContext/types.d.ts +0 -11
- package/contexts/index.d.ts +0 -12
- package/contexts/index.js +0 -1
- package/hooks/index.d.ts +0 -17
- package/hooks/index.js +0 -1
- package/hooks/useAuth/index.d.ts +0 -1
- package/hooks/useAuth/index.js +0 -1
- package/hooks/useAuth/useAuth.d.ts +0 -5
- package/hooks/useAuth/useAuth.test.d.ts +0 -1
- package/hooks/useBase/index.d.ts +0 -1
- package/hooks/useBase/index.js +0 -1
- package/hooks/useBase/index.test.d.ts +0 -1
- package/hooks/useBase/useBase.d.ts +0 -10
- package/hooks/useDomain/index.d.ts +0 -5
- package/hooks/useDomain/index.test.d.ts +0 -1
- package/hooks/useDomainCountry/index.d.ts +0 -4
- package/hooks/useDomainCountry/index.test.d.ts +0 -1
- package/hooks/useEnvironment/index.d.ts +0 -6
- package/hooks/useEnvironment/index.test.d.ts +0 -1
- package/hooks/useFlagsStore/index.d.ts +0 -9
- package/hooks/useFlagsStore/index.test.d.ts +0 -1
- package/hooks/useHostTools/index.d.ts +0 -5
- package/hooks/useHostTools/index.test.d.ts +0 -1
- package/hooks/useLocalStorage/index.d.ts +0 -4
- package/hooks/useLocalStorage/index.test.d.ts +0 -1
- package/hooks/useLocalStorageWithListener/index.d.ts +0 -7
- package/hooks/useLocalStorageWithListener/index.test.d.ts +0 -1
- package/hooks/useModuleDictionary/index.d.ts +0 -4
- package/hooks/useModuleDictionary/index.test.d.ts +0 -1
- package/hooks/useModulePrivileges/index.d.ts +0 -4
- package/hooks/useModulePrivileges/index.test.d.ts +0 -1
- package/hooks/useModuleSkeleton/index.d.ts +0 -4
- package/hooks/useModuleSkeleton/index.test.d.ts +0 -1
- package/hooks/useNetwork/index.d.ts +0 -5
- package/hooks/useNetwork/index.test.d.ts +0 -1
- package/hooks/usePaginate/index.d.ts +0 -14
- package/hooks/usePaginate/index.test.d.ts +0 -1
- package/hooks/usePaginate/types.d.ts +0 -17
- package/hooks/usePropageteMF/index.d.ts +0 -6
- package/hooks/usePropageteMF/types.d.ts +0 -6
- package/index.d.ts +0 -6
- package/test/constants.d.ts +0 -69
- package/test/index.d.ts +0 -3
- package/test/mocks.d.ts +0 -7
- package/test/setup.d.ts +0 -0
- package/test/types.d.ts +0 -4
- package/test/utils.d.ts +0 -9
- package/types/dictionary.d.ts +0 -13
- package/types/index.d.ts +0 -117
- package/utils/axiosOperation/index.d.ts +0 -5
- package/utils/axiosOperation/index.test.d.ts +0 -1
- package/utils/axiosOperation/types.d.ts +0 -9
- package/utils/evaluateWithContext/index.d.ts +0 -7
- package/utils/getLocalStorage/index.d.ts +0 -4
- package/utils/getLocalStorage/index.test.d.ts +0 -1
- package/utils/getPropertyByString/index.d.ts +0 -7
- package/utils/getPropertyByString/index.test.d.ts +0 -1
- package/utils/index.d.ts +0 -7
- package/utils/index.js +0 -1
- package/utils/setLocalStorage/index.d.ts +0 -4
- package/utils/setLocalStorage/index.test.d.ts +0 -1
- package/utils/voidFunction.d.ts +0 -4
- package/vite-env.d.ts +0 -4
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
|
};
|
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
|
};
|
|
@@ -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
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
if (!
|
|
1
|
+
import { useContext as n } from "react";
|
|
2
|
+
import { EnvironmentContext as e } from "../../contexts/EnvironmentContext/index.js";
|
|
3
|
+
const i = () => {
|
|
4
|
+
const t = n(e);
|
|
5
|
+
if (!t)
|
|
6
6
|
throw new Error("useEnvironment context must be use inside EnvironmentContext");
|
|
7
|
-
return
|
|
7
|
+
return t;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
i as default,
|
|
11
|
+
i as useEnvironment
|
|
11
12
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useContext as o } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { FlagsContext as i } from "../../contexts/FlagsContext/index.js";
|
|
3
3
|
import { useStore as l } from "zustand";
|
|
4
|
-
import { shallow as
|
|
5
|
-
function
|
|
4
|
+
import { shallow as f } from "zustand/shallow";
|
|
5
|
+
function u(t, r) {
|
|
6
6
|
const e = o(i);
|
|
7
7
|
if (!e)
|
|
8
8
|
throw new Error("useFlagsStore context must be use inside FlagsProvider");
|
|
9
|
-
return l(e, t,
|
|
9
|
+
return l(e, t, r);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function g(t, r) {
|
|
12
12
|
return t.filter(
|
|
13
|
-
(
|
|
13
|
+
(s) => r.findIndex((n) => n === s) !== -1
|
|
14
14
|
).length === t.length;
|
|
15
15
|
}
|
|
16
|
-
const x = (t) =>
|
|
16
|
+
const x = (t) => u((e) => g(t, e.flags), f);
|
|
17
17
|
export {
|
|
18
|
-
x as
|
|
19
|
-
|
|
18
|
+
x as useFlagsPresent,
|
|
19
|
+
u as useFlagsStore
|
|
20
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { HostToolsContext as s } from "../../contexts/HostToolsContext/index.js";
|
|
3
3
|
const n = () => {
|
|
4
4
|
const o = t(s);
|
|
5
5
|
if (!o)
|
|
@@ -7,5 +7,6 @@ const n = () => {
|
|
|
7
7
|
return o;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
n as
|
|
10
|
+
n as default,
|
|
11
|
+
n as useHostTools
|
|
11
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useState as
|
|
1
|
+
import { useState as s } from "react";
|
|
2
2
|
function S(o, e) {
|
|
3
|
-
const [r,
|
|
3
|
+
const [r, c] = s(() => {
|
|
4
4
|
try {
|
|
5
5
|
const t = window.localStorage.getItem(o);
|
|
6
6
|
return t !== null ? typeof e == "string" ? t : JSON.parse(t) : e;
|
|
@@ -13,11 +13,11 @@ function S(o, e) {
|
|
|
13
13
|
window.localStorage.setItem(
|
|
14
14
|
o,
|
|
15
15
|
typeof e == "string" ? String(t) : JSON.stringify(t)
|
|
16
|
-
),
|
|
16
|
+
), c(t);
|
|
17
17
|
} catch {
|
|
18
18
|
}
|
|
19
19
|
}];
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
|
-
S as
|
|
22
|
+
S as useLocalStorage
|
|
23
23
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ModuleDictionaryContext as e } from "../../contexts/ModuleDictionaryContext/index.js";
|
|
3
3
|
const n = () => {
|
|
4
4
|
const o = t(e);
|
|
5
5
|
if (!o)
|
|
@@ -7,5 +7,5 @@ const n = () => {
|
|
|
7
7
|
return o;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
n as
|
|
10
|
+
n as useModuleDictionary
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useContext as o } from "react";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { ModulePrivilegesContext as t } from "../../contexts/ModulePrivilegesContext/index.js";
|
|
3
|
+
const s = () => {
|
|
4
4
|
const e = o(t);
|
|
5
5
|
if (!e)
|
|
6
6
|
throw new Error("useModulePrivileges context must be use inside ModulePrivilegesContext");
|
|
7
7
|
return e;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
s as useModulePrivileges
|
|
11
11
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useContext as o } from "react";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { ModuleSkeletonContext as t } from "../../contexts/ModuleSkeletonContext/index.js";
|
|
3
|
+
const u = () => {
|
|
4
4
|
const e = o(t);
|
|
5
5
|
if (!e)
|
|
6
6
|
throw new Error("useModuleSkeleton context must be use inside ModuleSkeletonContext");
|
|
7
7
|
return e.isSkeleton;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
u as useModuleSkeleton
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext as e } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { NetworkContext as o } from "../../contexts/NetworkContext/index.js";
|
|
3
3
|
const s = () => {
|
|
4
4
|
const t = e(o);
|
|
5
5
|
if (!t)
|
|
@@ -7,5 +7,6 @@ const s = () => {
|
|
|
7
7
|
return t;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
s as
|
|
10
|
+
s as default,
|
|
11
|
+
s as useNetwork
|
|
11
12
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { useState as n, useRef as H, useCallback as L, useEffect as l } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { initialPagerState as s } from "./types.js";
|
|
3
|
+
import { useHostTools as U } from "../useHostTools/index.js";
|
|
4
|
+
import { useNetwork as j } from "../useNetwork/index.js";
|
|
5
5
|
const K = (h) => {
|
|
6
6
|
const {
|
|
7
7
|
endPoint: w,
|
|
8
8
|
timeout: C = 5e3,
|
|
9
|
-
queryParams:
|
|
10
|
-
fireOnChangeParms:
|
|
9
|
+
queryParams: P,
|
|
10
|
+
fireOnChangeParms: i,
|
|
11
11
|
// Propiedad para permitir que un cambio en los parametros de la consulta dispare la recarga de la red
|
|
12
12
|
fireOnFirstLoad: R = !0,
|
|
13
13
|
// propiedad que evita que se cargue la red la en el primer render del hook
|
|
14
|
-
rowsPerPage:
|
|
14
|
+
rowsPerPage: c = s.rowsPerPage,
|
|
15
15
|
startProgress: d,
|
|
16
16
|
stopProgress: S,
|
|
17
17
|
isRemote: k = !0,
|
|
18
18
|
bodyToSnakeCase: y = !1,
|
|
19
19
|
responseToCamelCase: T = !1,
|
|
20
20
|
initialRows: E = [],
|
|
21
|
-
externalCondition:
|
|
21
|
+
externalCondition: u = !0,
|
|
22
22
|
onNetworkError: f
|
|
23
|
-
} = h, [p, g] = n(
|
|
23
|
+
} = h, [p, g] = n(i ? 1 : 0), [O, o] = n(E), [b, a] = n({ ...s, rowsPerPage: c }), t = H({ ...s, rowsPerPage: c }), [x, F] = n(R), { startProgress: N, stopProgress: Q } = U(), { networkOperation: q } = j(), m = L(() => {
|
|
24
24
|
g((r) => r + 1);
|
|
25
25
|
}, []);
|
|
26
26
|
return l(() => {
|
|
@@ -28,16 +28,16 @@ const K = (h) => {
|
|
|
28
28
|
F(!1);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
t.current.page = 0,
|
|
32
|
-
}, [
|
|
31
|
+
t.current.page = 0, i && m();
|
|
32
|
+
}, [P]), l(() => {
|
|
33
33
|
let r = !0;
|
|
34
|
-
if (!(!
|
|
34
|
+
if (!(!u || p === 0))
|
|
35
35
|
return q({
|
|
36
36
|
method: "GET",
|
|
37
37
|
endPoint: w,
|
|
38
38
|
timeout: C,
|
|
39
39
|
parms: {
|
|
40
|
-
...
|
|
40
|
+
...P,
|
|
41
41
|
page: t.current.page,
|
|
42
42
|
limit: t.current.rowsPerPage
|
|
43
43
|
},
|
|
@@ -49,25 +49,25 @@ const K = (h) => {
|
|
|
49
49
|
},
|
|
50
50
|
isRemote: k
|
|
51
51
|
}).then((e) => {
|
|
52
|
-
r && (
|
|
52
|
+
r && (o(e.data), t.current.page = e.pager.page, a((G) => ({
|
|
53
53
|
...G,
|
|
54
54
|
page: e.pager.page,
|
|
55
55
|
// rowsPerPage: response.pager.limit,
|
|
56
56
|
totalRecords: e.pager.total
|
|
57
57
|
})));
|
|
58
58
|
}).catch((e) => {
|
|
59
|
-
|
|
59
|
+
o([]), a(s), f && f(e.status);
|
|
60
60
|
}), function() {
|
|
61
61
|
r = !1;
|
|
62
62
|
};
|
|
63
|
-
}, [p,
|
|
63
|
+
}, [p, u]), { onPageChange: (r) => {
|
|
64
64
|
t.current.page = r, g((e) => e + 1);
|
|
65
65
|
}, onRowsPerPageChange: (r) => {
|
|
66
|
-
t.current.rowsPerPage = r,
|
|
66
|
+
t.current.rowsPerPage = r, a((e) => ({ ...e, rowsPerPage: r })), g((e) => e + 1);
|
|
67
67
|
}, pagerState: b, rows: O, clearRows: () => {
|
|
68
|
-
|
|
69
|
-
}, Refresh: m, setRows:
|
|
68
|
+
o([]), a(s);
|
|
69
|
+
}, Refresh: m, setRows: o };
|
|
70
70
|
};
|
|
71
71
|
export {
|
|
72
|
-
K as
|
|
72
|
+
K as usePaginate
|
|
73
73
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useEffect as i } from "react";
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
const { isMicroFrontEnd: e, event: t, setHandler: o } =
|
|
5
|
-
i(() => (e &&
|
|
6
|
-
e &&
|
|
2
|
+
import { useHostTools as f } from "../useHostTools/index.js";
|
|
3
|
+
function u(r) {
|
|
4
|
+
const { isMicroFrontEnd: e, event: t, setHandler: o } = r, { events_add_listener: n, events_remove_listener: s } = f();
|
|
5
|
+
i(() => (e && n(t, o), () => {
|
|
6
|
+
e && s(t, o);
|
|
7
7
|
}), []);
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
u as usePropageteMF
|
|
11
11
|
};
|
package/index.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
1
|
+
import { BaseContext as r, BaseProvider as t } from "./contexts/BaseContext/BaseContext.js";
|
|
2
|
+
import { EnvironmentContext as n, EnvironmentProvider as x } from "./contexts/EnvironmentContext/index.js";
|
|
3
|
+
import { HostToolsContext as s, HostToolsProvider as a } from "./contexts/HostToolsContext/index.js";
|
|
4
|
+
import { NetworkContext as f, NetworkProvider as u } from "./contexts/NetworkContext/index.js";
|
|
5
|
+
import { AuthContext as d, AuthProvider as v } from "./contexts/AuthContext/AuthContext.js";
|
|
6
|
+
import { FlagsContext as g, FlagsProvider as C } from "./contexts/FlagsContext/index.js";
|
|
7
|
+
import { DomainContext as M, DomainProvider as D } from "./contexts/DomainContext/index.js";
|
|
8
|
+
import { ModuleDictionaryContext as y, ModuleDictionaryProvider as E } from "./contexts/ModuleDictionaryContext/index.js";
|
|
9
|
+
import { ModulePrivilegesContext as k, ModulePrivilegesProvider as h } from "./contexts/ModulePrivilegesContext/index.js";
|
|
10
|
+
import { ModuleSkeletonContext as L, ModuleSkeletonProvider as w } from "./contexts/ModuleSkeletonContext/index.js";
|
|
11
|
+
import { DomainCountryContext as H, DomainCountryProvider as N } from "./contexts/DomainCountryContext/index.js";
|
|
12
|
+
import { useBase as W, useBaseStore as O } from "./hooks/useBase/useBase.js";
|
|
13
|
+
import { useEnvironment as j } from "./hooks/useEnvironment/index.js";
|
|
14
|
+
import { useFlagsPresent as z, useFlagsStore as G } from "./hooks/useFlagsStore/index.js";
|
|
15
|
+
import { useHostTools as J } from "./hooks/useHostTools/index.js";
|
|
16
|
+
import { useDomain as Q } from "./hooks/useDomain/index.js";
|
|
17
|
+
import { useLocalStorage as U } from "./hooks/useLocalStorage/index.js";
|
|
18
|
+
import { useLocalStorageWithListener as X } from "./hooks/useLocalStorageWithListener/index.js";
|
|
19
|
+
import { useModuleDictionary as Z } from "./hooks/useModuleDictionary/index.js";
|
|
20
|
+
import { useModulePrivileges as $ } from "./hooks/useModulePrivileges/index.js";
|
|
21
|
+
import { useModuleSkeleton as eo } from "./hooks/useModuleSkeleton/index.js";
|
|
22
|
+
import { useNetwork as to } from "./hooks/useNetwork/index.js";
|
|
23
|
+
import { usePaginate as no } from "./hooks/usePaginate/index.js";
|
|
24
|
+
import { usePropageteMF as io } from "./hooks/usePropageteMF/index.js";
|
|
25
|
+
import { useDomainCountry as ao } from "./hooks/useDomainCountry/index.js";
|
|
26
|
+
import { useAuth as fo } from "./hooks/useAuth/useAuth.js";
|
|
27
|
+
import { initialPagerState as lo } from "./hooks/usePaginate/types.js";
|
|
28
|
+
import { CommonFlags as Po, EmmitEvents as go } from "./types/index.js";
|
|
29
|
+
import { voidFunction as So } from "./utils/voidFunction.js";
|
|
30
|
+
import { getPropertyByString as Do } from "./utils/getPropertyByString/index.js";
|
|
31
|
+
import { evaluateWithContext as yo } from "./utils/evaluateWithContext/index.js";
|
|
32
|
+
import { getLocalStorage as Fo } from "./utils/getLocalStorage/index.js";
|
|
33
|
+
import { setLocalStorage as ho } from "./utils/setLocalStorage/index.js";
|
|
34
|
+
import { axiosOperation as Lo } from "./utils/axiosOperation/index.js";
|
|
35
35
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
36
|
+
d as AuthContext,
|
|
37
|
+
v as AuthProvider,
|
|
38
|
+
r as BaseContext,
|
|
39
|
+
t as BaseProvider,
|
|
40
|
+
Po as CommonFlags,
|
|
41
|
+
M as DomainContext,
|
|
42
|
+
H as DomainCountryContext,
|
|
43
|
+
N as DomainCountryProvider,
|
|
44
|
+
D as DomainProvider,
|
|
45
|
+
go as EmitEvents,
|
|
46
|
+
n as EnvironmentContext,
|
|
47
|
+
x as EnvironmentProvider,
|
|
48
|
+
g as FlagsContext,
|
|
49
|
+
C as FlagsProvider,
|
|
50
|
+
s as HostToolsContext,
|
|
51
|
+
a as HostToolsProvider,
|
|
52
|
+
y as ModuleDictionaryContext,
|
|
53
|
+
E as ModuleDictionaryProvider,
|
|
54
|
+
k as ModulePrivilegesContext,
|
|
55
|
+
h as ModulePrivilegesProvider,
|
|
56
|
+
L as ModuleSkeletonContext,
|
|
57
|
+
w as ModuleSkeletonProvider,
|
|
58
|
+
f as NetworkContext,
|
|
59
|
+
u as NetworkProvider,
|
|
60
60
|
Lo as axiosOperation,
|
|
61
61
|
yo as evaluateWithContext,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
Fo as getLocalStorage,
|
|
63
|
+
Do as getPropertyByString,
|
|
64
64
|
lo as initialPagerState,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
ho as setLocalStorage,
|
|
66
|
+
fo as useAuth,
|
|
67
|
+
W as useBase,
|
|
68
|
+
O as useBaseStore,
|
|
69
69
|
Q as useDomain,
|
|
70
|
-
|
|
70
|
+
ao as useDomainCountry,
|
|
71
71
|
j as useEnvironment,
|
|
72
72
|
z as useFlagsPresent,
|
|
73
73
|
G as useFlagsStore,
|
|
@@ -78,7 +78,7 @@ export {
|
|
|
78
78
|
$ as useModulePrivileges,
|
|
79
79
|
eo as useModuleSkeleton,
|
|
80
80
|
to as useNetwork,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
no as usePaginate,
|
|
82
|
+
io as usePropageteMF,
|
|
83
|
+
So as voidFunction
|
|
84
84
|
};
|
package/package.json
CHANGED
|
@@ -1,64 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/core",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"license": "UNLICENSED",
|
|
5
|
-
"author": "M4L Team",
|
|
3
|
+
"version": "2.0.27-beta.1",
|
|
6
4
|
"publishConfig": {
|
|
7
5
|
"access": "public"
|
|
8
6
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"axios": "^1.8.4",
|
|
14
|
-
"camelcase-keys": "^9.1.3",
|
|
15
|
-
"fast-equals": "^5.0.1",
|
|
16
|
-
"history": "5.3.0",
|
|
17
|
-
"immer": "^9.0.21",
|
|
18
|
-
"lodash-es": "^4.17.21",
|
|
19
|
-
"qs": "^6.0.0",
|
|
20
|
-
"react-toastify": "10.0.5",
|
|
21
|
-
"snakecase-keys": "^8.0.1",
|
|
22
|
-
"zustand": "4.3.6"
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@types/react": "^18.0.0",
|
|
26
|
-
"react": "^18.0.0"
|
|
27
|
-
},
|
|
28
|
-
"resolutions": {
|
|
29
|
-
"glob": "^10.4.5",
|
|
30
|
-
"react": "^18.0.0",
|
|
31
|
-
"@types/react": "^18.0.0",
|
|
32
|
-
"@types/react-dom": "^18.0.0",
|
|
33
|
-
"react-dom": "^18.0.0",
|
|
34
|
-
"vite": "^6.3.5"
|
|
35
|
-
},
|
|
36
|
-
"overrides": {
|
|
37
|
-
"glob": "^10.4.5",
|
|
38
|
-
"eslint": "^9.0.0",
|
|
39
|
-
"react": "^18.0.0",
|
|
40
|
-
"@types/react": "^18.0.0",
|
|
41
|
-
"@types/react-dom": "^18.0.0",
|
|
42
|
-
"react-dom": "^18.0.0",
|
|
43
|
-
"vite": "^6.3.5"
|
|
44
|
-
},
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./index.js",
|
|
9
|
+
"module": "./index.js",
|
|
10
|
+
"types": "./index.d.ts",
|
|
45
11
|
"files": [
|
|
12
|
+
"index.js",
|
|
13
|
+
"index.d.ts",
|
|
46
14
|
"*"
|
|
47
15
|
],
|
|
48
|
-
"source": "./index.js",
|
|
49
|
-
"main": "./dist/index.js",
|
|
50
|
-
"module": "./index.js",
|
|
51
|
-
"type": "module",
|
|
52
|
-
"types": "./index.d.ts",
|
|
53
|
-
"sideEffects": false,
|
|
54
|
-
"engines": {
|
|
55
|
-
"node": ">=12.0.0"
|
|
56
|
-
},
|
|
57
|
-
"packageManager": "yarn@4.5.0",
|
|
58
|
-
"private": false,
|
|
59
16
|
"exports": {
|
|
17
|
+
"./package.json": "./package.json",
|
|
60
18
|
".": {
|
|
61
|
-
"
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"import": "./index.js",
|
|
21
|
+
"default": "./index.js"
|
|
62
22
|
}
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@emotion/react": "11.14.0",
|
|
26
|
+
"@emotion/styled": "11.14.1",
|
|
27
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
28
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"immer": "^9.0.21",
|
|
32
|
+
"react-toastify": "10.0.5",
|
|
33
|
+
"react": "^19.0.0",
|
|
34
|
+
"fast-equals": "^5.0.1",
|
|
35
|
+
"axios": "^1.8.4",
|
|
36
|
+
"qs": "^6.0.0",
|
|
37
|
+
"camelcase-keys": "^9.1.3",
|
|
38
|
+
"snakecase-keys": "^8.0.1",
|
|
39
|
+
"zustand": "4.3.6",
|
|
40
|
+
"lodash-es": "^4.17.21"
|
|
63
41
|
}
|
|
64
|
-
}
|
|
42
|
+
}
|
package/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var E = /* @__PURE__ */ ((_) => (_.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED = "netsevice_unauthorized", _.EMMIT_EVENT_HOST_LOCALE_CHANGE = "host_locale_change", _.EMMIT_EVENT_HOST_THEME_CHANGE = "host_theme_change", _.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE = "domain_country_change", _.EMMIT_EVENT_HOST_FORMATTER_CHANGE = "formatter_change", _.EMMIT_EVENT_HOST_EMERGE_WINDOW = "host_emerge_window", _))(E || {}), T = /* @__PURE__ */ ((_) => (_.FLAG_PRIVILEGES_LOADED = "privileges_loaded", _.FLAG_DICTIONARY_LOADED = "dictionary_loaded", _.FLAG_DOMAIN_LOADED = "domain_loaded", _.FLAG_FORM_LOADED = "form_loaded", _.FLAG_AREAS_LOADED = "areas_loaded", _))(T || {});
|
|
2
2
|
export {
|
|
3
|
-
T as
|
|
4
|
-
E
|
|
3
|
+
T as CommonFlags,
|
|
4
|
+
E as EmmitEvents
|
|
5
5
|
};
|