@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.
Files changed (58) hide show
  1. package/contexts/AuthContext/constants.d.ts +5 -0
  2. package/contexts/AuthContext/index.d.ts +1 -1
  3. package/contexts/AuthContext/index.dd2ed9e6.js +137 -0
  4. package/contexts/AuthContext/types.d.ts +17 -18
  5. package/contexts/BaseContext/index.d.ts +1 -0
  6. package/contexts/DomainContext/{index-D24R5afH.js → index.2ed56159.js} +5 -7
  7. package/contexts/DomainContext/index.d.ts +1 -0
  8. package/contexts/DomainCountryContext/{index-Gjy6Za6i.js → index.3cdf9462.js} +3 -3
  9. package/contexts/DomainCountryContext/index.d.ts +1 -0
  10. package/contexts/EnvironmentContext/index.d.ts +1 -0
  11. package/contexts/FlagsContext/{index-DcIX8FKd.js → index.5b096265.js} +1 -1
  12. package/contexts/FlagsContext/index.d.ts +1 -0
  13. package/contexts/HostToolsContext/index.d.ts +1 -0
  14. package/contexts/ModuleDictionaryContext/index.63e1dbbd.js +74 -0
  15. package/contexts/ModuleDictionaryContext/index.d.ts +1 -0
  16. package/contexts/ModulePrivilegesContext/{index-DsoWo0kK.js → index.1274092a.js} +4 -5
  17. package/contexts/ModulePrivilegesContext/index.d.ts +1 -0
  18. package/contexts/ModuleSkeletonContext/{index-CkhzuYKp.js → index.9267d86a.js} +1 -1
  19. package/contexts/ModuleSkeletonContext/index.d.ts +1 -0
  20. package/contexts/NetworkContext/index.d.ts +1 -0
  21. package/contexts/NetworkContext/{index-C8wX3ESG.js → index.ec7405cd.js} +2 -2
  22. package/contexts/index.d.ts +1 -1
  23. package/hooks/useAuth/index.94b696a7.js +11 -0
  24. package/hooks/useAuth/useAuth.d.ts +1 -1
  25. package/hooks/useBase/index.4375dcef.js +11 -0
  26. package/hooks/useDomain/{index-Bct5KNcv.js → index.dd6909f6.js} +4 -3
  27. package/hooks/useEnvironment/index.25f83176.js +11 -0
  28. package/hooks/useFlagsStore/{index-EagkUnqK.js → index.f7c613ac.js} +4 -3
  29. package/hooks/useHostTools/index.66d9a667.js +11 -0
  30. package/hooks/useModuleDictionary/{index-C1BKVxpe.js → index.80b52ae5.js} +1 -1
  31. package/hooks/useModulePrivileges/{index-D14YH0TD.js → index.e93abed8.js} +1 -1
  32. package/hooks/useModuleSkeleton/{index-CBPHGKDR.js → index.a8238d1d.js} +1 -1
  33. package/hooks/useNetwork/index.3d79002b.js +11 -0
  34. package/hooks/usePaginate/{index-DOOXkJPW.js → index.0a5d70e5.js} +2 -5
  35. package/hooks/usePaginate/index.d.ts +1 -0
  36. package/hooks/usePropageteMF/{index-DEVKsg4w.js → index.c440b829.js} +1 -1
  37. package/index.js +83 -74
  38. package/{node_modules-C59GSzS1.js → node_modules.04fac7e9.js} +60 -36
  39. package/package.json +1 -1
  40. package/types/dictionary.d.ts +1 -1
  41. package/types/index.d.ts +1 -0
  42. package/utils/{axiosOperation-CEky_K0E.js → axiosOperation.ac6c8eef.js} +1 -1
  43. package/utils/getPropertyByString/index.d.ts +3 -1
  44. package/utils/index.54ccec2f.js +61 -0
  45. package/vite-env.d.ts +4 -4
  46. package/contexts/AuthContext/index-cvUlEja1.js +0 -136
  47. package/contexts/ModuleDictionaryContext/index-kBzBlTUI.js +0 -71
  48. package/hooks/useAuth/index-BmbX0ftD.js +0 -10
  49. package/hooks/useBase/index-gThCdRe-.js +0 -10
  50. package/hooks/useEnvironment/index-D1xRKaoe.js +0 -10
  51. package/hooks/useHostTools/index-CL3d7qFm.js +0 -10
  52. package/hooks/useNetwork/index--IzMsMJ2.js +0 -10
  53. package/utils/index-BNOjc4WT.js +0 -61
  54. /package/contexts/BaseContext/{index-BZehLjuv.js → index.f9cdc955.js} +0 -0
  55. /package/contexts/EnvironmentContext/{index-CQz-FvKh.js → index.b33784cd.js} +0 -0
  56. /package/contexts/HostToolsContext/{index-DikGcxz8.js → index.499db832.js} +0 -0
  57. /package/hooks/useLocalStorage/{index-CsLmjbAr.js → index.91bc0791.js} +0 -0
  58. /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
- };
@@ -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