@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.
Files changed (143) hide show
  1. package/contexts/AuthContext/AuthContext.js +52 -48
  2. package/contexts/AuthContext/constants.js +2 -2
  3. package/contexts/AuthContext/helpers.js +1 -1
  4. package/contexts/BaseContext/BaseContext.js +11 -11
  5. package/contexts/BaseContext/store.js +1 -1
  6. package/contexts/DomainContext/index.js +23 -23
  7. package/contexts/DomainCountryContext/index.js +17 -17
  8. package/contexts/EnvironmentContext/index.js +8 -8
  9. package/contexts/FlagsContext/index.js +9 -9
  10. package/contexts/FlagsContext/store.js +4 -4
  11. package/contexts/HostToolsContext/index.js +7 -7
  12. package/contexts/ModuleDictionaryContext/index.js +20 -20
  13. package/contexts/ModulePrivilegesContext/index.js +9 -9
  14. package/contexts/ModuleSkeletonContext/index.js +8 -8
  15. package/contexts/NetworkContext/index.js +10 -10
  16. package/hooks/useAuth/useAuth.js +5 -4
  17. package/hooks/useBase/useBase.js +10 -9
  18. package/hooks/useDomain/index.js +8 -7
  19. package/hooks/useDomainCountry/index.js +2 -2
  20. package/hooks/useEnvironment/index.js +8 -7
  21. package/hooks/useFlagsStore/index.js +9 -9
  22. package/hooks/useHostTools/index.js +3 -2
  23. package/hooks/useLocalStorage/index.js +4 -4
  24. package/hooks/useLocalStorageWithListener/index.js +2 -1
  25. package/hooks/useModuleDictionary/index.js +2 -2
  26. package/hooks/useModulePrivileges/index.js +3 -3
  27. package/hooks/useModuleSkeleton/index.js +3 -3
  28. package/hooks/useNetwork/index.js +3 -2
  29. package/hooks/usePaginate/index.js +19 -19
  30. package/hooks/usePaginate/types.js +2 -2
  31. package/hooks/usePropageteMF/index.js +6 -6
  32. package/index.js +68 -68
  33. package/package.json +30 -52
  34. package/types/index.js +2 -2
  35. package/utils/axiosOperation/index.js +15 -15
  36. package/utils/evaluateWithContext/index.js +1 -1
  37. package/utils/getLocalStorage/index.js +1 -1
  38. package/utils/getPropertyByString/index.js +4 -4
  39. package/utils/setLocalStorage/index.js +3 -3
  40. package/utils/voidFunction.js +1 -1
  41. package/contexts/AuthContext/AuthContext.d.ts +0 -8
  42. package/contexts/AuthContext/AuthContext.test.d.ts +0 -1
  43. package/contexts/AuthContext/constants.d.ts +0 -7
  44. package/contexts/AuthContext/helpers.d.ts +0 -5
  45. package/contexts/AuthContext/index.d.ts +0 -2
  46. package/contexts/AuthContext/index.js +0 -1
  47. package/contexts/AuthContext/types.d.ts +0 -67
  48. package/contexts/BaseContext/BaseContext.d.ts +0 -7
  49. package/contexts/BaseContext/index.d.ts +0 -2
  50. package/contexts/BaseContext/index.js +0 -1
  51. package/contexts/BaseContext/index.test.d.ts +0 -1
  52. package/contexts/BaseContext/store.d.ts +0 -6
  53. package/contexts/BaseContext/types.d.ts +0 -37
  54. package/contexts/DomainContext/index.d.ts +0 -7
  55. package/contexts/DomainContext/index.test.d.ts +0 -1
  56. package/contexts/DomainContext/types.d.ts +0 -11
  57. package/contexts/DomainCountryContext/index.d.ts +0 -7
  58. package/contexts/DomainCountryContext/index.test.d.ts +0 -1
  59. package/contexts/DomainCountryContext/types.d.ts +0 -15
  60. package/contexts/EnvironmentContext/index.d.ts +0 -7
  61. package/contexts/EnvironmentContext/index.test.d.ts +0 -1
  62. package/contexts/EnvironmentContext/types.d.ts +0 -14
  63. package/contexts/FlagsContext/index.d.ts +0 -15
  64. package/contexts/FlagsContext/index.test.d.ts +0 -1
  65. package/contexts/FlagsContext/store.d.ts +0 -14
  66. package/contexts/FlagsContext/types.d.ts +0 -46
  67. package/contexts/HostToolsContext/index.d.ts +0 -8
  68. package/contexts/HostToolsContext/index.test.d.ts +0 -1
  69. package/contexts/HostToolsContext/types.d.ts +0 -6
  70. package/contexts/ModuleDictionaryContext/index.d.ts +0 -7
  71. package/contexts/ModuleDictionaryContext/index.test.d.ts +0 -1
  72. package/contexts/ModuleDictionaryContext/types.d.ts +0 -16
  73. package/contexts/ModulePrivilegesContext/index.d.ts +0 -7
  74. package/contexts/ModulePrivilegesContext/index.test.d.ts +0 -1
  75. package/contexts/ModulePrivilegesContext/types.d.ts +0 -9
  76. package/contexts/ModuleSkeletonContext/index.d.ts +0 -7
  77. package/contexts/ModuleSkeletonContext/index.test.d.ts +0 -1
  78. package/contexts/ModuleSkeletonContext/types.d.ts +0 -8
  79. package/contexts/NetworkContext/index.d.ts +0 -7
  80. package/contexts/NetworkContext/index.test.d.ts +0 -1
  81. package/contexts/NetworkContext/types.d.ts +0 -11
  82. package/contexts/index.d.ts +0 -12
  83. package/contexts/index.js +0 -1
  84. package/hooks/index.d.ts +0 -17
  85. package/hooks/index.js +0 -1
  86. package/hooks/useAuth/index.d.ts +0 -1
  87. package/hooks/useAuth/index.js +0 -1
  88. package/hooks/useAuth/useAuth.d.ts +0 -5
  89. package/hooks/useAuth/useAuth.test.d.ts +0 -1
  90. package/hooks/useBase/index.d.ts +0 -1
  91. package/hooks/useBase/index.js +0 -1
  92. package/hooks/useBase/index.test.d.ts +0 -1
  93. package/hooks/useBase/useBase.d.ts +0 -10
  94. package/hooks/useDomain/index.d.ts +0 -5
  95. package/hooks/useDomain/index.test.d.ts +0 -1
  96. package/hooks/useDomainCountry/index.d.ts +0 -4
  97. package/hooks/useDomainCountry/index.test.d.ts +0 -1
  98. package/hooks/useEnvironment/index.d.ts +0 -6
  99. package/hooks/useEnvironment/index.test.d.ts +0 -1
  100. package/hooks/useFlagsStore/index.d.ts +0 -9
  101. package/hooks/useFlagsStore/index.test.d.ts +0 -1
  102. package/hooks/useHostTools/index.d.ts +0 -5
  103. package/hooks/useHostTools/index.test.d.ts +0 -1
  104. package/hooks/useLocalStorage/index.d.ts +0 -4
  105. package/hooks/useLocalStorage/index.test.d.ts +0 -1
  106. package/hooks/useLocalStorageWithListener/index.d.ts +0 -7
  107. package/hooks/useLocalStorageWithListener/index.test.d.ts +0 -1
  108. package/hooks/useModuleDictionary/index.d.ts +0 -4
  109. package/hooks/useModuleDictionary/index.test.d.ts +0 -1
  110. package/hooks/useModulePrivileges/index.d.ts +0 -4
  111. package/hooks/useModulePrivileges/index.test.d.ts +0 -1
  112. package/hooks/useModuleSkeleton/index.d.ts +0 -4
  113. package/hooks/useModuleSkeleton/index.test.d.ts +0 -1
  114. package/hooks/useNetwork/index.d.ts +0 -5
  115. package/hooks/useNetwork/index.test.d.ts +0 -1
  116. package/hooks/usePaginate/index.d.ts +0 -14
  117. package/hooks/usePaginate/index.test.d.ts +0 -1
  118. package/hooks/usePaginate/types.d.ts +0 -17
  119. package/hooks/usePropageteMF/index.d.ts +0 -6
  120. package/hooks/usePropageteMF/types.d.ts +0 -6
  121. package/index.d.ts +0 -6
  122. package/test/constants.d.ts +0 -69
  123. package/test/index.d.ts +0 -3
  124. package/test/mocks.d.ts +0 -7
  125. package/test/setup.d.ts +0 -0
  126. package/test/types.d.ts +0 -4
  127. package/test/utils.d.ts +0 -9
  128. package/types/dictionary.d.ts +0 -13
  129. package/types/index.d.ts +0 -117
  130. package/utils/axiosOperation/index.d.ts +0 -5
  131. package/utils/axiosOperation/index.test.d.ts +0 -1
  132. package/utils/axiosOperation/types.d.ts +0 -9
  133. package/utils/evaluateWithContext/index.d.ts +0 -7
  134. package/utils/getLocalStorage/index.d.ts +0 -4
  135. package/utils/getLocalStorage/index.test.d.ts +0 -1
  136. package/utils/getPropertyByString/index.d.ts +0 -7
  137. package/utils/getPropertyByString/index.test.d.ts +0 -1
  138. package/utils/index.d.ts +0 -7
  139. package/utils/index.js +0 -1
  140. package/utils/setLocalStorage/index.d.ts +0 -4
  141. package/utils/setLocalStorage/index.test.d.ts +0 -1
  142. package/utils/voidFunction.d.ts +0 -4
  143. package/vite-env.d.ts +0 -4
@@ -1,17 +1,18 @@
1
1
  import { useContext as r } from "react";
2
- import { useStore as s } from "zustand";
3
- import { shallow as n } from "zustand/shallow";
4
- import { B as u } from "../../contexts/BaseContext/BaseContext.js";
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(u);
6
+ const t = r(s);
7
7
  if (!t)
8
8
  throw new Error("useBase context must be use inside BaseContext");
9
- return s(t, e, o);
9
+ return n(t, e, o);
10
10
  }
11
- function B() {
12
- return a((e) => e.value, n);
11
+ function c() {
12
+ return a((e) => e.value, u);
13
13
  }
14
14
  export {
15
- B as a,
16
- a as u
15
+ c as default,
16
+ c as useBase,
17
+ a as useBaseStore
17
18
  };
@@ -1,11 +1,12 @@
1
- import { useContext as t } from "react";
2
- import { D as e } from "../../contexts/DomainContext/index.js";
3
- const s = () => {
4
- const o = t(e);
5
- if (!o)
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 o;
7
+ return t;
8
8
  };
9
9
  export {
10
- s as u
10
+ i as default,
11
+ i as useDomain
11
12
  };
@@ -1,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { D as n } from "../../contexts/DomainCountryContext/index.js";
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 t } from "react";
2
- import { E as e } from "../../contexts/EnvironmentContext/index.js";
3
- const s = () => {
4
- const n = t(e);
5
- if (!n)
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 n;
7
+ return t;
8
8
  };
9
9
  export {
10
- s as u
10
+ i as default,
11
+ i as useEnvironment
11
12
  };
@@ -1,20 +1,20 @@
1
1
  import { useContext as o } from "react";
2
- import { F as i } from "../../contexts/FlagsContext/index.js";
2
+ import { FlagsContext as i } from "../../contexts/FlagsContext/index.js";
3
3
  import { useStore as l } from "zustand";
4
- import { shallow as u } from "zustand/shallow";
5
- function a(t, s) {
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, s);
9
+ return l(e, t, r);
10
10
  }
11
- function f(t, s) {
11
+ function g(t, r) {
12
12
  return t.filter(
13
- (r) => s.findIndex((n) => n === r) !== -1
13
+ (s) => r.findIndex((n) => n === s) !== -1
14
14
  ).length === t.length;
15
15
  }
16
- const x = (t) => a((e) => f(t, e.flags), u);
16
+ const x = (t) => u((e) => g(t, e.flags), f);
17
17
  export {
18
- x as a,
19
- a as u
18
+ x as useFlagsPresent,
19
+ u as useFlagsStore
20
20
  };
@@ -1,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { H as s } from "../../contexts/HostToolsContext/index.js";
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 u
10
+ n as default,
11
+ n as useHostTools
11
12
  };
@@ -1,6 +1,6 @@
1
- import { useState as c } from "react";
1
+ import { useState as s } from "react";
2
2
  function S(o, e) {
3
- const [r, s] = c(() => {
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
- ), s(t);
16
+ ), c(t);
17
17
  } catch {
18
18
  }
19
19
  }];
20
20
  }
21
21
  export {
22
- S as u
22
+ S as useLocalStorage
23
23
  };
@@ -29,5 +29,6 @@ function i(o, r) {
29
29
  }];
30
30
  }
31
31
  export {
32
- i as u
32
+ i as default,
33
+ i as useLocalStorageWithListener
33
34
  };
@@ -1,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { M as e } from "../../contexts/ModuleDictionaryContext/index.js";
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 u
10
+ n as useModuleDictionary
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModulePrivilegesContext/index.js";
3
- const i = () => {
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
- i as u
10
+ s as useModulePrivileges
11
11
  };
@@ -1,11 +1,11 @@
1
1
  import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModuleSkeletonContext/index.js";
3
- const s = () => {
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
- s as u
10
+ u as useModuleSkeleton
11
11
  };
@@ -1,5 +1,5 @@
1
1
  import { useContext as e } from "react";
2
- import { N as o } from "../../contexts/NetworkContext/index.js";
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 u
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 { i as s } from "./types.js";
3
- import { u as U } from "../useHostTools/index.js";
4
- import { u as j } from "../useNetwork/index.js";
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: i,
10
- fireOnChangeParms: u,
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: P = s.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: c = !0,
21
+ externalCondition: u = !0,
22
22
  onNetworkError: f
23
- } = h, [p, g] = n(u ? 1 : 0), [O, a] = n(E), [b, o] = n({ ...s, rowsPerPage: P }), t = H({ ...s, rowsPerPage: P }), [x, F] = n(R), { startProgress: N, stopProgress: Q } = U(), { networkOperation: q } = j(), m = L(() => {
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, u && m();
32
- }, [i]), l(() => {
31
+ t.current.page = 0, i && m();
32
+ }, [P]), l(() => {
33
33
  let r = !0;
34
- if (!(!c || p === 0))
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
- ...i,
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 && (a(e.data), t.current.page = e.pager.page, o((G) => ({
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
- a([]), o(s), f && f(e.status);
59
+ o([]), a(s), f && f(e.status);
60
60
  }), function() {
61
61
  r = !1;
62
62
  };
63
- }, [p, c]), { onPageChange: (r) => {
63
+ }, [p, u]), { onPageChange: (r) => {
64
64
  t.current.page = r, g((e) => e + 1);
65
65
  }, onRowsPerPageChange: (r) => {
66
- t.current.rowsPerPage = r, o((e) => ({ ...e, rowsPerPage: r })), g((e) => e + 1);
66
+ t.current.rowsPerPage = r, a((e) => ({ ...e, rowsPerPage: r })), g((e) => e + 1);
67
67
  }, pagerState: b, rows: O, clearRows: () => {
68
- a([]), o(s);
69
- }, Refresh: m, setRows: a };
68
+ o([]), a(s);
69
+ }, Refresh: m, setRows: o };
70
70
  };
71
71
  export {
72
- K as u
72
+ K as usePaginate
73
73
  };
@@ -1,8 +1,8 @@
1
- const a = {
1
+ const e = {
2
2
  page: 0,
3
3
  rowsPerPage: 25,
4
4
  totalRecords: 0
5
5
  };
6
6
  export {
7
- a as i
7
+ e as initialPagerState
8
8
  };
@@ -1,11 +1,11 @@
1
1
  import { useEffect as i } from "react";
2
- import { u as f } from "../useHostTools/index.js";
3
- function c(s) {
4
- const { isMicroFrontEnd: e, event: t, setHandler: o } = s, { events_add_listener: r, events_remove_listener: n } = f();
5
- i(() => (e && r(t, o), () => {
6
- e && n(t, o);
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
- c as u
10
+ u as usePropageteMF
11
11
  };
package/index.js CHANGED
@@ -1,73 +1,73 @@
1
- import { C as r, E as t } from "./types/index.js";
2
- import { E as s, a as u } from "./contexts/EnvironmentContext/index.js";
3
- import { H as i, a as m } from "./contexts/HostToolsContext/index.js";
4
- import { N as p, a as f } from "./contexts/NetworkContext/index.js";
5
- import { F as d, a as v } from "./contexts/FlagsContext/index.js";
6
- import { D as P, a as C } from "./contexts/DomainContext/index.js";
7
- import { M as D, a as S } from "./contexts/ModuleDictionaryContext/index.js";
8
- import { M as y, a as F } from "./contexts/ModulePrivilegesContext/index.js";
9
- import { M as k, a as B } from "./contexts/ModuleSkeletonContext/index.js";
10
- import { D as L, a as A } from "./contexts/DomainCountryContext/index.js";
11
- import { B as N, a as w } from "./contexts/BaseContext/BaseContext.js";
12
- import { A as W, a as O } from "./contexts/AuthContext/AuthContext.js";
13
- import { u as j } from "./hooks/useEnvironment/index.js";
14
- import { a as z, u as G } from "./hooks/useFlagsStore/index.js";
15
- import { u as J } from "./hooks/useHostTools/index.js";
16
- import { u as Q } from "./hooks/useDomain/index.js";
17
- import { u as U } from "./hooks/useLocalStorage/index.js";
18
- import { u as X } from "./hooks/useLocalStorageWithListener/index.js";
19
- import { u as Z } from "./hooks/useModuleDictionary/index.js";
20
- import { u as $ } from "./hooks/useModulePrivileges/index.js";
21
- import { u as eo } from "./hooks/useModuleSkeleton/index.js";
22
- import { u as to } from "./hooks/useNetwork/index.js";
23
- import { u as so } from "./hooks/usePaginate/index.js";
24
- import { u as xo } from "./hooks/usePropageteMF/index.js";
25
- import { u as mo } from "./hooks/useDomainCountry/index.js";
26
- import { u as po } from "./hooks/useAuth/useAuth.js";
27
- import { i as lo } from "./hooks/usePaginate/types.js";
28
- import { a as go, u as Po } from "./hooks/useBase/useBase.js";
29
- import { v as Mo } from "./utils/voidFunction.js";
30
- import { g as So } from "./utils/getPropertyByString/index.js";
31
- import { e as yo } from "./utils/evaluateWithContext/index.js";
32
- import { g as Eo } from "./utils/getLocalStorage/index.js";
33
- import { s as Bo } from "./utils/setLocalStorage/index.js";
34
- import { a as Lo } from "./utils/axiosOperation/index.js";
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
- W as AuthContext,
37
- O as AuthProvider,
38
- N as BaseContext,
39
- w as BaseProvider,
40
- r as CommonFlags,
41
- P as DomainContext,
42
- L as DomainCountryContext,
43
- A as DomainCountryProvider,
44
- C as DomainProvider,
45
- t as EmitEvents,
46
- s as EnvironmentContext,
47
- u as EnvironmentProvider,
48
- d as FlagsContext,
49
- v as FlagsProvider,
50
- i as HostToolsContext,
51
- m as HostToolsProvider,
52
- D as ModuleDictionaryContext,
53
- S as ModuleDictionaryProvider,
54
- y as ModulePrivilegesContext,
55
- F as ModulePrivilegesProvider,
56
- k as ModuleSkeletonContext,
57
- B as ModuleSkeletonProvider,
58
- p as NetworkContext,
59
- f as NetworkProvider,
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
- Eo as getLocalStorage,
63
- So as getPropertyByString,
62
+ Fo as getLocalStorage,
63
+ Do as getPropertyByString,
64
64
  lo as initialPagerState,
65
- Bo as setLocalStorage,
66
- po as useAuth,
67
- go as useBase,
68
- Po as useBaseStore,
65
+ ho as setLocalStorage,
66
+ fo as useAuth,
67
+ W as useBase,
68
+ O as useBaseStore,
69
69
  Q as useDomain,
70
- mo as useDomainCountry,
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
- so as usePaginate,
82
- xo as usePropageteMF,
83
- Mo as voidFunction
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.26",
4
- "license": "UNLICENSED",
5
- "author": "M4L Team",
3
+ "version": "2.0.27-beta.1",
6
4
  "publishConfig": {
7
5
  "access": "public"
8
6
  },
9
- "lint-staged": {
10
- "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
11
- },
12
- "dependencies": {
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
- "import": "./index.js"
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 C,
4
- E
3
+ T as CommonFlags,
4
+ E as EmmitEvents
5
5
  };