@m4l/core 0.1.25 → 0.1.27
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/BaseContext/index.d.ts +5 -0
- package/contexts/BaseContext/types.d.ts +6 -0
- package/contexts/DomainCountryContext/{index.38c27388.js → index.de35d791.js} +13 -12
- package/contexts/ModuleDictionaryContext/{index.c7e01648.js → index.0c69445f.js} +12 -11
- package/contexts/ModulePrivilegesContext/{index.91ed5843.js → index.40fc9b6b.js} +10 -9
- package/contexts/ModuleSkeletonContext/index.1f894dc3.js +28 -0
- package/contexts/index.d.ts +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useBase/index.d.ts +2 -0
- package/hooks/useDomain/{index.7117ac32.js → index.1971480c.js} +1 -1
- package/hooks/useModuleDictionary/{index.5cabf2a3.js → index.2dc80b62.js} +1 -1
- package/hooks/useModulePrivileges/{index.93343e3e.js → index.f1272511.js} +1 -1
- package/hooks/useModuleSkeleton/{index.7df262f4.js → index.c1c6e2cc.js} +1 -1
- package/index.js +84 -63
- package/package.json +1 -1
- package/contexts/ModuleSkeletonContext/index.73a5f745.js +0 -27
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { createContext as
|
|
1
|
+
import { createContext as c, useState as T, useCallback as e, useEffect as d } from "react";
|
|
2
|
+
import "../../index.js";
|
|
2
3
|
import "../EnvironmentContext/index.7045c64f.js";
|
|
3
4
|
import "../FlagsContext/index.5f795859.js";
|
|
4
5
|
import { u as N } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
5
6
|
import "../DomainContext/index.d09ee435.js";
|
|
6
|
-
import "../ModuleDictionaryContext/index.
|
|
7
|
-
import "../ModulePrivilegesContext/index.
|
|
8
|
-
import "../ModuleSkeletonContext/index.
|
|
7
|
+
import "../ModuleDictionaryContext/index.0c69445f.js";
|
|
8
|
+
import "../ModulePrivilegesContext/index.40fc9b6b.js";
|
|
9
|
+
import "../ModuleSkeletonContext/index.1f894dc3.js";
|
|
9
10
|
import "../NetworkContext/index.d1dfbc3a.js";
|
|
10
11
|
import { E as n } from "../../types/index.5f1b0c45.js";
|
|
11
12
|
import { jsx as f } from "react/jsx-runtime";
|
|
12
|
-
const l =
|
|
13
|
-
function
|
|
13
|
+
const l = c(null);
|
|
14
|
+
function R(m) {
|
|
14
15
|
const {
|
|
15
16
|
children: s,
|
|
16
17
|
isMicroFrontEnd: t,
|
|
@@ -19,24 +20,24 @@ function G(m) {
|
|
|
19
20
|
events_add_listener: _,
|
|
20
21
|
events_remove_listener: u,
|
|
21
22
|
events_emit: E
|
|
22
|
-
} = N(), [C, r] = T(a),
|
|
23
|
+
} = N(), [C, r] = T(a), i = e((o) => {
|
|
23
24
|
r(o);
|
|
24
25
|
}, []);
|
|
25
|
-
d(() => (t && _(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE,
|
|
26
|
-
t && u(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE,
|
|
26
|
+
d(() => (t && _(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, i), () => {
|
|
27
|
+
t && u(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, i);
|
|
27
28
|
}), []);
|
|
28
|
-
const
|
|
29
|
+
const p = e((o) => {
|
|
29
30
|
t || (r(o), E(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, o));
|
|
30
31
|
}, []);
|
|
31
32
|
return /* @__PURE__ */ f(l.Provider, {
|
|
32
33
|
value: {
|
|
33
34
|
domainCountryId: C,
|
|
34
|
-
changeDomainCountryId:
|
|
35
|
+
changeDomainCountryId: p
|
|
35
36
|
},
|
|
36
37
|
children: s
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
export {
|
|
40
41
|
l as D,
|
|
41
|
-
|
|
42
|
+
R as a
|
|
42
43
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { createContext as y, useState as L, useEffect as M, useCallback as
|
|
1
|
+
import { createContext as y, useState as L, useEffect as M, useCallback as u } from "react";
|
|
2
|
+
import "../../index.js";
|
|
2
3
|
import { u as N } from "../../hooks/useEnvironment/index.04dca988.js";
|
|
3
4
|
import { u as P } from "../../hooks/useFlags/index.a986729d.js";
|
|
4
5
|
import { u as _ } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
5
6
|
import "../DomainContext/index.d09ee435.js";
|
|
6
|
-
import "../ModulePrivilegesContext/index.
|
|
7
|
-
import "../ModuleSkeletonContext/index.
|
|
7
|
+
import "../ModulePrivilegesContext/index.40fc9b6b.js";
|
|
8
|
+
import "../ModuleSkeletonContext/index.1f894dc3.js";
|
|
8
9
|
import { u as x } from "../../hooks/useNetwork/index.acbf28d5.js";
|
|
9
|
-
import "../DomainCountryContext/index.
|
|
10
|
+
import "../DomainCountryContext/index.de35d791.js";
|
|
10
11
|
import { C as A } from "../../types/index.5f1b0c45.js";
|
|
11
12
|
import { jsx as E } from "react/jsx-runtime";
|
|
12
13
|
const F = y(null);
|
|
13
|
-
function
|
|
14
|
+
function Y(l) {
|
|
14
15
|
const {
|
|
15
16
|
children: c,
|
|
16
17
|
componentsDictionary: d,
|
|
17
18
|
moduleId: i,
|
|
18
19
|
moduleName: s = "module_name",
|
|
19
20
|
currentLang: a = "en",
|
|
20
|
-
isAuth:
|
|
21
|
+
isAuth: m = !0
|
|
21
22
|
} = l, {
|
|
22
23
|
addFlag: p
|
|
23
24
|
} = P(), [r, f] = L(void 0), {
|
|
@@ -32,10 +33,10 @@ function U(l) {
|
|
|
32
33
|
let t = !0;
|
|
33
34
|
return D(), v({
|
|
34
35
|
method: "GET",
|
|
35
|
-
endPoint:
|
|
36
|
+
endPoint: m ? `dictionaries/${i}` : `na/dictionaries/${i}`,
|
|
36
37
|
parms: {
|
|
37
38
|
comps: d,
|
|
38
|
-
...
|
|
39
|
+
...m ? {} : {
|
|
39
40
|
domain_token: g,
|
|
40
41
|
lang: a
|
|
41
42
|
}
|
|
@@ -50,7 +51,7 @@ function U(l) {
|
|
|
50
51
|
t = !1;
|
|
51
52
|
};
|
|
52
53
|
}, [a]);
|
|
53
|
-
const n =
|
|
54
|
+
const n = u((t) => {
|
|
54
55
|
if (r === void 0)
|
|
55
56
|
return "";
|
|
56
57
|
if (t === "")
|
|
@@ -62,7 +63,7 @@ function U(l) {
|
|
|
62
63
|
} catch {
|
|
63
64
|
}
|
|
64
65
|
return o || `N_D:[${t}]`;
|
|
65
|
-
}, [r]), C =
|
|
66
|
+
}, [r]), C = u(() => n(s), [s, n]);
|
|
66
67
|
return /* @__PURE__ */ E(F.Provider, {
|
|
67
68
|
value: {
|
|
68
69
|
moduleDictionary: r,
|
|
@@ -74,5 +75,5 @@ function U(l) {
|
|
|
74
75
|
}
|
|
75
76
|
export {
|
|
76
77
|
F as M,
|
|
77
|
-
|
|
78
|
+
Y as a
|
|
78
79
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { createContext as f, useState as g, useEffect as P, useCallback as d } from "react";
|
|
2
|
+
import "../../index.js";
|
|
2
3
|
import "../EnvironmentContext/index.7045c64f.js";
|
|
3
4
|
import { u as v } from "../../hooks/useFlags/index.a986729d.js";
|
|
4
5
|
import { u as E } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
5
6
|
import "../DomainContext/index.d09ee435.js";
|
|
6
|
-
import "../ModuleDictionaryContext/index.
|
|
7
|
-
import "../ModuleSkeletonContext/index.
|
|
7
|
+
import "../ModuleDictionaryContext/index.0c69445f.js";
|
|
8
|
+
import "../ModuleSkeletonContext/index.1f894dc3.js";
|
|
8
9
|
import { u as h } from "../../hooks/useNetwork/index.acbf28d5.js";
|
|
9
|
-
import "../DomainCountryContext/index.
|
|
10
|
+
import "../DomainCountryContext/index.de35d791.js";
|
|
10
11
|
import { C as i } from "../../types/index.5f1b0c45.js";
|
|
11
12
|
import { jsx as L } from "react/jsx-runtime";
|
|
12
13
|
const C = f(null);
|
|
13
|
-
function
|
|
14
|
+
function y(n) {
|
|
14
15
|
const {
|
|
15
16
|
children: a,
|
|
16
17
|
queryPrivileges: t
|
|
17
18
|
} = n, {
|
|
18
19
|
addFlag: o
|
|
19
20
|
} = v(), [r, l] = g({}), {
|
|
20
|
-
startProgress:
|
|
21
|
-
stopProgress:
|
|
21
|
+
startProgress: m,
|
|
22
|
+
stopProgress: u
|
|
22
23
|
} = E(), {
|
|
23
24
|
networkOperation: p
|
|
24
25
|
} = h();
|
|
@@ -28,7 +29,7 @@ function w(n) {
|
|
|
28
29
|
o(i.FLAG_PRIVILEGES_LOADED);
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
31
|
-
return
|
|
32
|
+
return m(), p({
|
|
32
33
|
method: "GET",
|
|
33
34
|
endPoint: "auth/login",
|
|
34
35
|
parms: {
|
|
@@ -39,7 +40,7 @@ function w(n) {
|
|
|
39
40
|
...s.data
|
|
40
41
|
}), o(i.FLAG_PRIVILEGES_LOADED));
|
|
41
42
|
}).finally(() => {
|
|
42
|
-
|
|
43
|
+
u();
|
|
43
44
|
}), function() {
|
|
44
45
|
e = !1;
|
|
45
46
|
};
|
|
@@ -55,5 +56,5 @@ function w(n) {
|
|
|
55
56
|
}
|
|
56
57
|
export {
|
|
57
58
|
C as M,
|
|
58
|
-
|
|
59
|
+
y as a
|
|
59
60
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createContext as i } from "react";
|
|
2
|
+
import "../../index.js";
|
|
3
|
+
import "../EnvironmentContext/index.7045c64f.js";
|
|
4
|
+
import { a as m } from "../../hooks/useFlags/index.a986729d.js";
|
|
5
|
+
import "../HostToolsContext/index.499db832.js";
|
|
6
|
+
import "../DomainContext/index.d09ee435.js";
|
|
7
|
+
import "../ModuleDictionaryContext/index.0c69445f.js";
|
|
8
|
+
import "../ModulePrivilegesContext/index.40fc9b6b.js";
|
|
9
|
+
import "../NetworkContext/index.d1dfbc3a.js";
|
|
10
|
+
import "../DomainCountryContext/index.de35d791.js";
|
|
11
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
12
|
+
const p = i(null);
|
|
13
|
+
function P(o) {
|
|
14
|
+
const {
|
|
15
|
+
children: t,
|
|
16
|
+
flags: r
|
|
17
|
+
} = o, e = !m(r);
|
|
18
|
+
return /* @__PURE__ */ n(p.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
isSkeleton: e
|
|
21
|
+
},
|
|
22
|
+
children: t
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
p as M,
|
|
27
|
+
P as a
|
|
28
|
+
};
|
package/contexts/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { BaseContext, BaseProvider } from './BaseContext';
|
|
1
2
|
export { EnvironmentContext, EnvironmentProvider } from './EnvironmentContext';
|
|
2
3
|
export { HostToolsContext, HostToolsProvider } from './HostToolsContext';
|
|
3
4
|
export { NetworkContext, NetworkProvider } from './NetworkContext';
|
package/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
2
|
import { D as n } from "../../contexts/DomainContext/index.d09ee435.js";
|
|
3
|
-
import { D as e } from "../../contexts/DomainCountryContext/index.
|
|
3
|
+
import { D as e } from "../../contexts/DomainCountryContext/index.de35d791.js";
|
|
4
4
|
const m = () => {
|
|
5
5
|
const o = t(n);
|
|
6
6
|
if (!o)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as n, useContext as s, useEffect as u } from "react";
|
|
2
|
-
import { M as r } from "../../contexts/ModuleSkeletonContext/index.
|
|
2
|
+
import { M as r } from "../../contexts/ModuleSkeletonContext/index.1f894dc3.js";
|
|
3
3
|
const S = () => {
|
|
4
4
|
const [t, o] = n(!0), e = s(r);
|
|
5
5
|
if (!e)
|
package/index.js
CHANGED
|
@@ -1,67 +1,88 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import { E as
|
|
3
|
-
import { F as
|
|
4
|
-
import { H as
|
|
5
|
-
import { D as
|
|
6
|
-
import { M as
|
|
7
|
-
import { M as
|
|
8
|
-
import { M as
|
|
9
|
-
import { N as
|
|
10
|
-
import { D as
|
|
11
|
-
import {
|
|
12
|
-
import { u as
|
|
13
|
-
import { u as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { a as
|
|
24
|
-
import "
|
|
1
|
+
import { createContext as a, useContext as s } from "react";
|
|
2
|
+
import { E as g, a as C } from "./contexts/EnvironmentContext/index.7045c64f.js";
|
|
3
|
+
import { F as c, a as M } from "./contexts/FlagsContext/index.5f795859.js";
|
|
4
|
+
import { H as S, a as y } from "./contexts/HostToolsContext/index.499db832.js";
|
|
5
|
+
import { D as F, a as k } from "./contexts/DomainContext/index.d09ee435.js";
|
|
6
|
+
import { M as w, a as L } from "./contexts/ModuleDictionaryContext/index.0c69445f.js";
|
|
7
|
+
import { M as N, a as h } from "./contexts/ModulePrivilegesContext/index.40fc9b6b.js";
|
|
8
|
+
import { M as b, a as j } from "./contexts/ModuleSkeletonContext/index.1f894dc3.js";
|
|
9
|
+
import { N as W, a as q } from "./contexts/NetworkContext/index.d1dfbc3a.js";
|
|
10
|
+
import { D as A, a as G } from "./contexts/DomainCountryContext/index.de35d791.js";
|
|
11
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
12
|
+
import { u as J } from "./hooks/useEnvironment/index.04dca988.js";
|
|
13
|
+
import { u as Q, a as R } from "./hooks/useFlags/index.a986729d.js";
|
|
14
|
+
import { u as V } from "./hooks/useHostTools/index.66d9a667.js";
|
|
15
|
+
import { u as Y, a as Z } from "./hooks/useDomain/index.1971480c.js";
|
|
16
|
+
import { u as $, a as oo } from "./hooks/useLocalStorage/index.281b7ae8.js";
|
|
17
|
+
import { u as ro } from "./hooks/useModuleDictionary/index.2dc80b62.js";
|
|
18
|
+
import { u as ao } from "./hooks/useModulePrivileges/index.f1272511.js";
|
|
19
|
+
import { u as no } from "./hooks/useModuleSkeleton/index.c1c6e2cc.js";
|
|
20
|
+
import { u as uo } from "./hooks/useNetwork/index.acbf28d5.js";
|
|
21
|
+
import { i as xo, u as lo } from "./hooks/usePaginate/index.7cb17527.js";
|
|
22
|
+
import { C as fo, E as vo } from "./types/index.5f1b0c45.js";
|
|
23
|
+
import { a as Co, g as Po, s as co, v as Mo } from "./utils/index.4b6999c8.js";
|
|
24
|
+
import { a as So } from "./utils/axiosOperation.6118a64a.js";
|
|
25
|
+
import "./index.js";
|
|
25
26
|
import "axios";
|
|
26
27
|
import "qs";
|
|
28
|
+
const e = a(null);
|
|
29
|
+
function p(o) {
|
|
30
|
+
const {
|
|
31
|
+
children: r,
|
|
32
|
+
value: t
|
|
33
|
+
} = o;
|
|
34
|
+
return /* @__PURE__ */ n(e.Provider, {
|
|
35
|
+
value: t,
|
|
36
|
+
children: r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function f() {
|
|
40
|
+
const o = s(e);
|
|
41
|
+
if (!o)
|
|
42
|
+
throw new Error("useBase context must be use inside BaseContext");
|
|
43
|
+
return o;
|
|
44
|
+
}
|
|
27
45
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
e as BaseContext,
|
|
47
|
+
p as BaseProvider,
|
|
48
|
+
fo as CommonFlags,
|
|
49
|
+
F as DomainContext,
|
|
50
|
+
A as DomainCountryContext,
|
|
51
|
+
G as DomainCountryProvider,
|
|
52
|
+
k as DomainProvider,
|
|
53
|
+
vo as EmitEvents,
|
|
54
|
+
g as EnvironmentContext,
|
|
55
|
+
C as EnvironmentProvider,
|
|
56
|
+
c as FlagsContext,
|
|
57
|
+
M as FlagsProvider,
|
|
58
|
+
S as HostToolsContext,
|
|
59
|
+
y as HostToolsProvider,
|
|
60
|
+
w as ModuleDictionaryContext,
|
|
61
|
+
L as ModuleDictionaryProvider,
|
|
62
|
+
N as ModulePrivilegesContext,
|
|
63
|
+
h as ModulePrivilegesProvider,
|
|
64
|
+
b as ModuleSkeletonContext,
|
|
65
|
+
j as ModuleSkeletonProvider,
|
|
66
|
+
W as NetworkContext,
|
|
67
|
+
q as NetworkProvider,
|
|
68
|
+
So as axiosOperation,
|
|
69
|
+
Co as getLocalStorage,
|
|
70
|
+
Po as getPropertyByString,
|
|
71
|
+
xo as initialPagerState,
|
|
72
|
+
co as setLocalStorage,
|
|
73
|
+
f as useBase,
|
|
74
|
+
Y as useDomain,
|
|
75
|
+
Z as useDomainCountry,
|
|
76
|
+
J as useEnvironment,
|
|
77
|
+
Q as useFlags,
|
|
78
|
+
R as useFlagsPresent,
|
|
79
|
+
V as useHostTools,
|
|
80
|
+
$ as useLocalStorage,
|
|
81
|
+
oo as useLocalStorageWithListener,
|
|
82
|
+
ro as useModuleDictionary,
|
|
83
|
+
ao as useModulePrivileges,
|
|
84
|
+
no as useModuleSkeleton,
|
|
85
|
+
uo as useNetwork,
|
|
86
|
+
lo as usePaginate,
|
|
87
|
+
Mo as voidFunction
|
|
67
88
|
};
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createContext as i } from "react";
|
|
2
|
-
import "../EnvironmentContext/index.7045c64f.js";
|
|
3
|
-
import { a as n } from "../../hooks/useFlags/index.a986729d.js";
|
|
4
|
-
import "../HostToolsContext/index.499db832.js";
|
|
5
|
-
import "../DomainContext/index.d09ee435.js";
|
|
6
|
-
import "../ModuleDictionaryContext/index.c7e01648.js";
|
|
7
|
-
import "../ModulePrivilegesContext/index.91ed5843.js";
|
|
8
|
-
import "../NetworkContext/index.d1dfbc3a.js";
|
|
9
|
-
import "../DomainCountryContext/index.38c27388.js";
|
|
10
|
-
import { jsx as m } from "react/jsx-runtime";
|
|
11
|
-
const s = i(null);
|
|
12
|
-
function M(o) {
|
|
13
|
-
const {
|
|
14
|
-
children: t,
|
|
15
|
-
flags: r
|
|
16
|
-
} = o, e = !n(r);
|
|
17
|
-
return /* @__PURE__ */ m(s.Provider, {
|
|
18
|
-
value: {
|
|
19
|
-
isSkeleton: e
|
|
20
|
-
},
|
|
21
|
-
children: t
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
export {
|
|
25
|
-
s as M,
|
|
26
|
-
M as a
|
|
27
|
-
};
|