@m4l/core 2.0.3 → 2.0.4
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/constants.d.ts +5 -0
- package/contexts/AuthContext/index.d.ts +1 -1
- package/contexts/AuthContext/index.dd2ed9e6.js +137 -0
- package/contexts/AuthContext/types.d.ts +17 -18
- package/contexts/BaseContext/index.d.ts +1 -0
- package/contexts/DomainContext/{index-D24R5afH.js → index.2ed56159.js} +5 -7
- package/contexts/DomainContext/index.d.ts +1 -0
- package/contexts/DomainCountryContext/{index-Gjy6Za6i.js → index.3cdf9462.js} +3 -3
- package/contexts/DomainCountryContext/index.d.ts +1 -0
- package/contexts/EnvironmentContext/index.d.ts +1 -0
- package/contexts/FlagsContext/{index-DcIX8FKd.js → index.5b096265.js} +1 -1
- package/contexts/FlagsContext/index.d.ts +1 -0
- package/contexts/HostToolsContext/index.d.ts +1 -0
- package/contexts/ModuleDictionaryContext/index.63e1dbbd.js +74 -0
- package/contexts/ModuleDictionaryContext/index.d.ts +1 -0
- package/contexts/ModulePrivilegesContext/{index-DsoWo0kK.js → index.1274092a.js} +4 -5
- package/contexts/ModulePrivilegesContext/index.d.ts +1 -0
- package/contexts/ModuleSkeletonContext/{index-CkhzuYKp.js → index.9267d86a.js} +1 -1
- package/contexts/ModuleSkeletonContext/index.d.ts +1 -0
- package/contexts/NetworkContext/index.d.ts +1 -0
- package/contexts/NetworkContext/{index-C8wX3ESG.js → index.ec7405cd.js} +2 -2
- package/contexts/index.d.ts +1 -1
- package/hooks/useAuth/index.94b696a7.js +11 -0
- package/hooks/useAuth/useAuth.d.ts +1 -1
- package/hooks/useBase/index.4375dcef.js +11 -0
- package/hooks/useDomain/{index-Bct5KNcv.js → index.dd6909f6.js} +4 -3
- package/hooks/useEnvironment/index.25f83176.js +11 -0
- package/hooks/useFlagsStore/{index-EagkUnqK.js → index.f7c613ac.js} +4 -3
- package/hooks/useHostTools/index.66d9a667.js +11 -0
- package/hooks/useModuleDictionary/{index-C1BKVxpe.js → index.80b52ae5.js} +1 -1
- package/hooks/useModulePrivileges/{index-D14YH0TD.js → index.e93abed8.js} +1 -1
- package/hooks/useModuleSkeleton/{index-CBPHGKDR.js → index.a8238d1d.js} +1 -1
- package/hooks/useNetwork/index.3d79002b.js +11 -0
- package/hooks/usePaginate/{index-DOOXkJPW.js → index.0a5d70e5.js} +2 -5
- package/hooks/usePaginate/index.d.ts +1 -0
- package/hooks/usePropageteMF/{index-DEVKsg4w.js → index.c440b829.js} +1 -1
- package/index.js +83 -74
- package/{node_modules-C59GSzS1.js → node_modules.04fac7e9.js} +60 -36
- package/package.json +1 -1
- package/types/dictionary.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/utils/{axiosOperation-CEky_K0E.js → axiosOperation.ac6c8eef.js} +1 -1
- package/utils/getPropertyByString/index.d.ts +3 -1
- package/utils/index.54ccec2f.js +61 -0
- package/vite-env.d.ts +4 -4
- package/contexts/AuthContext/index-cvUlEja1.js +0 -136
- package/contexts/ModuleDictionaryContext/index-kBzBlTUI.js +0 -71
- package/hooks/useAuth/index-BmbX0ftD.js +0 -10
- package/hooks/useBase/index-gThCdRe-.js +0 -10
- package/hooks/useEnvironment/index-D1xRKaoe.js +0 -10
- package/hooks/useHostTools/index-CL3d7qFm.js +0 -10
- package/hooks/useNetwork/index--IzMsMJ2.js +0 -10
- package/utils/index-BNOjc4WT.js +0 -61
- /package/contexts/BaseContext/{index-BZehLjuv.js → index.f9cdc955.js} +0 -0
- /package/contexts/EnvironmentContext/{index-CQz-FvKh.js → index.b33784cd.js} +0 -0
- /package/contexts/HostToolsContext/{index-DikGcxz8.js → index.499db832.js} +0 -0
- /package/hooks/useLocalStorage/{index-CsLmjbAr.js → index.91bc0791.js} +0 -0
- /package/types/{index-TbOJOhBX.js → index.42c24946.js} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext as t } from "react";
|
|
2
|
-
import { B as o } from "../../contexts/BaseContext/index-BZehLjuv.js";
|
|
3
|
-
function r() {
|
|
4
|
-
const e = t(o);
|
|
5
|
-
if (!e) throw new Error("useBase context must be use inside BaseContext");
|
|
6
|
-
return e;
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
r as u
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext as t } from "react";
|
|
2
|
-
import { E as e } from "../../contexts/EnvironmentContext/index-CQz-FvKh.js";
|
|
3
|
-
const s = () => {
|
|
4
|
-
const n = t(e);
|
|
5
|
-
if (!n) throw new Error("useEnvironment context must be use inside EnvironmentContext");
|
|
6
|
-
return n;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
s as u
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext as t } from "react";
|
|
2
|
-
import { H as s } from "../../contexts/HostToolsContext/index-DikGcxz8.js";
|
|
3
|
-
const n = () => {
|
|
4
|
-
const o = t(s);
|
|
5
|
-
if (!o) throw new Error("useHostTools context must be use inside HostToolsContext");
|
|
6
|
-
return o;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
n as u
|
|
10
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext as e } from "react";
|
|
2
|
-
import { N as o } from "../../contexts/NetworkContext/index-C8wX3ESG.js";
|
|
3
|
-
const s = () => {
|
|
4
|
-
const t = e(o);
|
|
5
|
-
if (!t) throw new Error("useNetwork context must be use inside NetworkContext");
|
|
6
|
-
return t;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
s as u
|
|
10
|
-
};
|
package/utils/index-BNOjc4WT.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
function l() {
|
|
2
|
-
}
|
|
3
|
-
function u(n, e) {
|
|
4
|
-
const r = e.split(".");
|
|
5
|
-
let t = n;
|
|
6
|
-
for (const o of r) {
|
|
7
|
-
const a = o.match(/^(\w+)\[(\w+)\]$/);
|
|
8
|
-
if (a) {
|
|
9
|
-
const s = a[1], c = a[2];
|
|
10
|
-
if (t[s] && Array.isArray(t[s])) {
|
|
11
|
-
if (c === "lastIndex")
|
|
12
|
-
return t[s][t[s].length - 1];
|
|
13
|
-
{
|
|
14
|
-
const i = parseInt(c);
|
|
15
|
-
return t[s][i];
|
|
16
|
-
}
|
|
17
|
-
} else
|
|
18
|
-
return;
|
|
19
|
-
} else if (t[o] !== void 0)
|
|
20
|
-
t = t[o];
|
|
21
|
-
else
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
}
|
|
26
|
-
function g(n, e) {
|
|
27
|
-
try {
|
|
28
|
-
const t = new Function(...Object.keys(n), `return \`${e}\``)(...Object.values(n));
|
|
29
|
-
return String(t).replace(/`/g, "");
|
|
30
|
-
} catch (r) {
|
|
31
|
-
return console.error(`Error evaluating expression: ${r}`), "";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function f(n, e) {
|
|
35
|
-
try {
|
|
36
|
-
const r = window.localStorage.getItem(n);
|
|
37
|
-
return r !== null ? typeof e == "string" ? r : JSON.parse(r) : e;
|
|
38
|
-
} catch {
|
|
39
|
-
return e;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function y(n, e, r = !1) {
|
|
43
|
-
try {
|
|
44
|
-
let t = null;
|
|
45
|
-
if (typeof e == "string") {
|
|
46
|
-
window.localStorage.setItem(n, e);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
r && (t = window.localStorage.getItem(n));
|
|
50
|
-
let o = t !== null ? JSON.parse(t) : {};
|
|
51
|
-
o = { ...o, ...e }, window.localStorage.setItem(n, JSON.stringify(o));
|
|
52
|
-
} catch {
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
u as a,
|
|
57
|
-
g as e,
|
|
58
|
-
f as g,
|
|
59
|
-
y as s,
|
|
60
|
-
l as v
|
|
61
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|