@m4l/core 0.1.31 → 0.1.33
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/DomainContext/{index.1d8ec226.js → index.5da377f5.js} +1 -1
- package/contexts/DomainCountryContext/index.f904fe2a.js +54 -0
- package/contexts/DomainCountryContext/types.d.ts +7 -3
- package/contexts/ModuleDictionaryContext/{index.a705fc17.js → index.3ca2f244.js} +5 -5
- package/contexts/ModulePrivilegesContext/{index.b5ea3bc2.js → index.813909e9.js} +5 -5
- package/contexts/ModuleSkeletonContext/{index.02a06776.js → index.28283eb3.js} +4 -4
- package/contexts/index.d.ts +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useDomain/{index.e567d819.js → index.a3ddf40d.js} +2 -2
- package/hooks/useDomainCountry/index.d.ts +1 -1
- package/hooks/useModuleDictionary/{index.4aaa524e.js → index.55dc31b0.js} +1 -1
- package/hooks/useModulePrivileges/{index.34087161.js → index.7f8d29b0.js} +1 -1
- package/hooks/useModuleSkeleton/{index.b333ef86.js → index.50e84d72.js} +1 -1
- package/hooks/usePropageteMF/index.7e7914ad.js +11 -0
- package/hooks/usePropageteMF/index.d.ts +2 -0
- package/hooks/usePropageteMF/types.d.ts +6 -0
- package/index.d.ts +1 -1
- package/index.js +26 -24
- package/package.json +2 -2
- package/types/index.d.ts +3 -16
- package/types/{index.38eca705.js → index.d9c95d2a.js} +1 -1
- package/utils/{axiosOperation.6efd68f1.js → axiosOperation.2b6d10ea.js} +1 -1
- package/contexts/DomainCountryContext/index.e195de3c.js +0 -43
|
@@ -2,7 +2,7 @@ import { createContext as f, useState as s, useEffect as p } from "react";
|
|
|
2
2
|
import { u as g } from "../../hooks/useFlags/index.a986729d.js";
|
|
3
3
|
import { u as D } from "../../hooks/useEnvironment/index.04dca988.js";
|
|
4
4
|
import { u as v } from "../../hooks/useNetwork/index.acbf28d5.js";
|
|
5
|
-
import { C as y } from "../../types/index.
|
|
5
|
+
import { C as y } from "../../types/index.d9c95d2a.js";
|
|
6
6
|
import { jsx as h } from "react/jsx-runtime";
|
|
7
7
|
const $ = f(null);
|
|
8
8
|
function A(e) {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { createContext as d, useState as E, useCallback as y } from "react";
|
|
2
|
+
import "../BaseContext/index.f9cdc955.js";
|
|
3
|
+
import "../EnvironmentContext/index.7045c64f.js";
|
|
4
|
+
import "../FlagsContext/index.5f795859.js";
|
|
5
|
+
import { u as D } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
6
|
+
import "../DomainContext/index.5da377f5.js";
|
|
7
|
+
import "../ModuleDictionaryContext/index.3ca2f244.js";
|
|
8
|
+
import "../ModulePrivilegesContext/index.813909e9.js";
|
|
9
|
+
import "../ModuleSkeletonContext/index.28283eb3.js";
|
|
10
|
+
import "../NetworkContext/index.d1dfbc3a.js";
|
|
11
|
+
import { u as T } from "../../hooks/usePropageteMF/index.7e7914ad.js";
|
|
12
|
+
import { E as n } from "../../types/index.d9c95d2a.js";
|
|
13
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
14
|
+
const M = d(null);
|
|
15
|
+
function S(e) {
|
|
16
|
+
const {
|
|
17
|
+
children: i,
|
|
18
|
+
isMicroFrontEnd: t,
|
|
19
|
+
id: s,
|
|
20
|
+
currency: m,
|
|
21
|
+
currency_decimal_digits: a,
|
|
22
|
+
decimal_symbol: c,
|
|
23
|
+
thousands_symbol: l
|
|
24
|
+
} = e, {
|
|
25
|
+
events_emit: u
|
|
26
|
+
} = D(), [p, _] = E({
|
|
27
|
+
id: s,
|
|
28
|
+
currency: m,
|
|
29
|
+
currency_decimal_digits: a,
|
|
30
|
+
decimal_symbol: c,
|
|
31
|
+
thousands_symbol: l
|
|
32
|
+
}), r = (o) => {
|
|
33
|
+
console.log("setLocalDomainCountry", o), _(o);
|
|
34
|
+
};
|
|
35
|
+
T({
|
|
36
|
+
isMicroFrontEnd: t,
|
|
37
|
+
event: n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE,
|
|
38
|
+
setHandler: r
|
|
39
|
+
});
|
|
40
|
+
const C = y((o) => {
|
|
41
|
+
t || (r(o), u(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, o));
|
|
42
|
+
}, []);
|
|
43
|
+
return console.log("Render DomainCountryProvider"), /* @__PURE__ */ f(M.Provider, {
|
|
44
|
+
value: {
|
|
45
|
+
...p,
|
|
46
|
+
changeDomainCountry: C
|
|
47
|
+
},
|
|
48
|
+
children: i
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
M as D,
|
|
53
|
+
S as a
|
|
54
|
+
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export interface DomainCountry {
|
|
3
|
+
id: number;
|
|
4
|
+
currency: string;
|
|
5
|
+
currency_decimal_digits: number;
|
|
6
|
+
decimal_symbol: string;
|
|
7
|
+
thousands_symbol: string;
|
|
4
8
|
}
|
|
5
9
|
export interface DomainCountryProviderProps extends DomainCountry {
|
|
6
10
|
isMicroFrontEnd: boolean;
|
|
7
11
|
children: ReactNode;
|
|
8
12
|
}
|
|
9
13
|
export interface DomainCountryContextType extends DomainCountry {
|
|
10
|
-
|
|
14
|
+
changeDomainCountry: (newDomainCountry: DomainCountry) => void;
|
|
11
15
|
}
|
|
@@ -3,12 +3,12 @@ import "../BaseContext/index.f9cdc955.js";
|
|
|
3
3
|
import { u as M } from "../../hooks/useEnvironment/index.04dca988.js";
|
|
4
4
|
import { u as N } from "../../hooks/useFlags/index.a986729d.js";
|
|
5
5
|
import { u as P } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
6
|
-
import "../DomainContext/index.
|
|
7
|
-
import "../ModulePrivilegesContext/index.
|
|
8
|
-
import "../ModuleSkeletonContext/index.
|
|
6
|
+
import "../DomainContext/index.5da377f5.js";
|
|
7
|
+
import "../ModulePrivilegesContext/index.813909e9.js";
|
|
8
|
+
import "../ModuleSkeletonContext/index.28283eb3.js";
|
|
9
9
|
import { u as _ } from "../../hooks/useNetwork/index.acbf28d5.js";
|
|
10
|
-
import "../DomainCountryContext/index.
|
|
11
|
-
import { C as x } from "../../types/index.
|
|
10
|
+
import "../DomainCountryContext/index.f904fe2a.js";
|
|
11
|
+
import { C as x } from "../../types/index.d9c95d2a.js";
|
|
12
12
|
import { jsx as A } from "react/jsx-runtime";
|
|
13
13
|
const E = y(null);
|
|
14
14
|
function Y(u) {
|
|
@@ -3,12 +3,12 @@ import "../BaseContext/index.f9cdc955.js";
|
|
|
3
3
|
import "../EnvironmentContext/index.7045c64f.js";
|
|
4
4
|
import { u as v } from "../../hooks/useFlags/index.a986729d.js";
|
|
5
5
|
import { u as E } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
6
|
-
import "../DomainContext/index.
|
|
7
|
-
import "../ModuleDictionaryContext/index.
|
|
8
|
-
import "../ModuleSkeletonContext/index.
|
|
6
|
+
import "../DomainContext/index.5da377f5.js";
|
|
7
|
+
import "../ModuleDictionaryContext/index.3ca2f244.js";
|
|
8
|
+
import "../ModuleSkeletonContext/index.28283eb3.js";
|
|
9
9
|
import { u as h } from "../../hooks/useNetwork/index.acbf28d5.js";
|
|
10
|
-
import "../DomainCountryContext/index.
|
|
11
|
-
import { C as i } from "../../types/index.
|
|
10
|
+
import "../DomainCountryContext/index.f904fe2a.js";
|
|
11
|
+
import { C as i } from "../../types/index.d9c95d2a.js";
|
|
12
12
|
import { jsx as L } from "react/jsx-runtime";
|
|
13
13
|
const C = f(null);
|
|
14
14
|
function y(n) {
|
|
@@ -3,11 +3,11 @@ import "../BaseContext/index.f9cdc955.js";
|
|
|
3
3
|
import "../EnvironmentContext/index.7045c64f.js";
|
|
4
4
|
import { a as m } from "../../hooks/useFlags/index.a986729d.js";
|
|
5
5
|
import "../HostToolsContext/index.499db832.js";
|
|
6
|
-
import "../DomainContext/index.
|
|
7
|
-
import "../ModuleDictionaryContext/index.
|
|
8
|
-
import "../ModulePrivilegesContext/index.
|
|
6
|
+
import "../DomainContext/index.5da377f5.js";
|
|
7
|
+
import "../ModuleDictionaryContext/index.3ca2f244.js";
|
|
8
|
+
import "../ModulePrivilegesContext/index.813909e9.js";
|
|
9
9
|
import "../NetworkContext/index.d1dfbc3a.js";
|
|
10
|
-
import "../DomainCountryContext/index.
|
|
10
|
+
import "../DomainCountryContext/index.f904fe2a.js";
|
|
11
11
|
import { jsx as n } from "react/jsx-runtime";
|
|
12
12
|
const p = i(null);
|
|
13
13
|
function P(o) {
|
package/contexts/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { ModuleDictionaryContext, ModuleDictionaryProvider } from './ModuleDicti
|
|
|
8
8
|
export { ModulePrivilegesContext, ModulePrivilegesProvider } from './ModulePrivilegesContext';
|
|
9
9
|
export { ModuleSkeletonContext, ModuleSkeletonProvider } from './ModuleSkeletonContext';
|
|
10
10
|
export { DomainCountryContext, DomainCountryProvider } from './DomainCountryContext';
|
|
11
|
+
export type { DomainCountryContextType, DomainCountry } from './DomainCountryContext/types';
|
package/hooks/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export { useModulePrivileges } from './useModulePrivileges';
|
|
|
10
10
|
export { useModuleSkeleton } from './useModuleSkeleton';
|
|
11
11
|
export { useNetwork } from './useNetwork';
|
|
12
12
|
export { usePaginate } from './usePaginate';
|
|
13
|
+
export { usePropageteMF } from './usePropageteMF';
|
|
13
14
|
export { useDomainCountry } from './useDomainCountry';
|
|
14
15
|
export type { PagerState } from './usePaginate/types';
|
|
15
16
|
export { initialPagerState } from './usePaginate/types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext as t } from "react";
|
|
2
|
-
import { D as n } from "../../contexts/DomainContext/index.
|
|
3
|
-
import { D as e } from "../../contexts/DomainCountryContext/index.
|
|
2
|
+
import { D as n } from "../../contexts/DomainContext/index.5da377f5.js";
|
|
3
|
+
import { D as e } from "../../contexts/DomainCountryContext/index.f904fe2a.js";
|
|
4
4
|
const m = () => {
|
|
5
5
|
const o = t(n);
|
|
6
6
|
if (!o)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useDomainCountry: () => import("
|
|
1
|
+
export declare const useDomainCountry: () => import("../..").DomainCountryContextType;
|
|
@@ -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.28283eb3.js";
|
|
3
3
|
const S = () => {
|
|
4
4
|
const [t, o] = n(!0), e = s(r);
|
|
5
5
|
if (!e)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useEffect as f } from "react";
|
|
2
|
+
import { u as i } from "../useHostTools/index.66d9a667.js";
|
|
3
|
+
function a(s) {
|
|
4
|
+
const { isMicroFrontEnd: e, event: o, setHandler: t } = s, { events_add_listener: r, events_remove_listener: n } = i();
|
|
5
|
+
f(() => (console.log("useEffect usePropageteMF", e), e && r(o, t), () => {
|
|
6
|
+
e && n(o, t);
|
|
7
|
+
}), []);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
a as u
|
|
11
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './contexts';
|
|
2
2
|
export * from './hooks';
|
|
3
3
|
export { EmitEvents, CommonFlags } from './types';
|
|
4
|
-
export type { Maybe, HostToolsType, NetworkProps, EnvironmentType, AxiosOperation, EventFunListener,
|
|
4
|
+
export type { Maybe, HostToolsType, NetworkProps, EnvironmentType, AxiosOperation, EventFunListener, } from './types';
|
|
5
5
|
export type { GetLabelType, Dictionary, ModuleDictionary, ComponentDictionary, } from './types/dictionary';
|
|
6
6
|
export * from './utils';
|
package/index.js
CHANGED
|
@@ -2,58 +2,59 @@ import "react";
|
|
|
2
2
|
import { B as i, a as n } from "./contexts/BaseContext/index.f9cdc955.js";
|
|
3
3
|
import { E as u, a as x } from "./contexts/EnvironmentContext/index.7045c64f.js";
|
|
4
4
|
import { F as l, a as f } from "./contexts/FlagsContext/index.5f795859.js";
|
|
5
|
-
import { H as
|
|
6
|
-
import { D as C, a as M } from "./contexts/DomainContext/index.
|
|
7
|
-
import { M as S, a as c } from "./contexts/ModuleDictionaryContext/index.
|
|
8
|
-
import { M as
|
|
9
|
-
import { M as B, a as L } from "./contexts/ModuleSkeletonContext/index.
|
|
5
|
+
import { H as g, a as v } from "./contexts/HostToolsContext/index.499db832.js";
|
|
6
|
+
import { D as C, a as M } from "./contexts/DomainContext/index.5da377f5.js";
|
|
7
|
+
import { M as S, a as c } from "./contexts/ModuleDictionaryContext/index.3ca2f244.js";
|
|
8
|
+
import { M as F, a as E } from "./contexts/ModulePrivilegesContext/index.813909e9.js";
|
|
9
|
+
import { M as B, a as L } from "./contexts/ModuleSkeletonContext/index.28283eb3.js";
|
|
10
10
|
import { N, a as w } from "./contexts/NetworkContext/index.d1dfbc3a.js";
|
|
11
|
-
import { D as h, a as O } from "./contexts/DomainCountryContext/index.
|
|
11
|
+
import { D as h, a as O } from "./contexts/DomainCountryContext/index.f904fe2a.js";
|
|
12
12
|
import { u as b } from "./hooks/useBase/index.4375dcef.js";
|
|
13
13
|
import { u as q } from "./hooks/useEnvironment/index.04dca988.js";
|
|
14
14
|
import { u as A, a as G } from "./hooks/useFlags/index.a986729d.js";
|
|
15
15
|
import { u as J } from "./hooks/useHostTools/index.66d9a667.js";
|
|
16
|
-
import { u as Q, a as R } from "./hooks/useDomain/index.
|
|
16
|
+
import { u as Q, a as R } from "./hooks/useDomain/index.a3ddf40d.js";
|
|
17
17
|
import { u as V, a as X } from "./hooks/useLocalStorage/index.c9f47e01.js";
|
|
18
|
-
import { u as Z } from "./hooks/useModuleDictionary/index.
|
|
19
|
-
import { u as $ } from "./hooks/useModulePrivileges/index.
|
|
20
|
-
import { u as eo } from "./hooks/useModuleSkeleton/index.
|
|
18
|
+
import { u as Z } from "./hooks/useModuleDictionary/index.55dc31b0.js";
|
|
19
|
+
import { u as $ } from "./hooks/useModulePrivileges/index.7f8d29b0.js";
|
|
20
|
+
import { u as eo } from "./hooks/useModuleSkeleton/index.50e84d72.js";
|
|
21
21
|
import { u as ao } from "./hooks/useNetwork/index.acbf28d5.js";
|
|
22
22
|
import { i as so, u as io } from "./hooks/usePaginate/index.7cb17527.js";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { a as Po } from "./utils/
|
|
23
|
+
import { u as mo } from "./hooks/usePropageteMF/index.7e7914ad.js";
|
|
24
|
+
import { C as xo, E as po } from "./types/index.d9c95d2a.js";
|
|
25
|
+
import { a as fo, g as go, s as vo, v as Po } from "./utils/index.6c53abe1.js";
|
|
26
|
+
import { a as Mo } from "./utils/axiosOperation.2b6d10ea.js";
|
|
26
27
|
import "react/jsx-runtime";
|
|
27
28
|
import "axios";
|
|
28
29
|
import "qs";
|
|
29
30
|
export {
|
|
30
31
|
i as BaseContext,
|
|
31
32
|
n as BaseProvider,
|
|
32
|
-
|
|
33
|
+
xo as CommonFlags,
|
|
33
34
|
C as DomainContext,
|
|
34
35
|
h as DomainCountryContext,
|
|
35
36
|
O as DomainCountryProvider,
|
|
36
37
|
M as DomainProvider,
|
|
37
|
-
|
|
38
|
+
po as EmitEvents,
|
|
38
39
|
u as EnvironmentContext,
|
|
39
40
|
x as EnvironmentProvider,
|
|
40
41
|
l as FlagsContext,
|
|
41
42
|
f as FlagsProvider,
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
g as HostToolsContext,
|
|
44
|
+
v as HostToolsProvider,
|
|
44
45
|
S as ModuleDictionaryContext,
|
|
45
46
|
c as ModuleDictionaryProvider,
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
F as ModulePrivilegesContext,
|
|
48
|
+
E as ModulePrivilegesProvider,
|
|
48
49
|
B as ModuleSkeletonContext,
|
|
49
50
|
L as ModuleSkeletonProvider,
|
|
50
51
|
N as NetworkContext,
|
|
51
52
|
w as NetworkProvider,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
Mo as axiosOperation,
|
|
54
|
+
fo as getLocalStorage,
|
|
55
|
+
go as getPropertyByString,
|
|
55
56
|
so as initialPagerState,
|
|
56
|
-
|
|
57
|
+
vo as setLocalStorage,
|
|
57
58
|
b as useBase,
|
|
58
59
|
Q as useDomain,
|
|
59
60
|
R as useDomainCountry,
|
|
@@ -68,5 +69,6 @@ export {
|
|
|
68
69
|
eo as useModuleSkeleton,
|
|
69
70
|
ao as useNetwork,
|
|
70
71
|
io as usePaginate,
|
|
71
|
-
|
|
72
|
+
mo as usePropageteMF,
|
|
73
|
+
Po as voidFunction
|
|
72
74
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "M4L Team",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"history": "5.3.0",
|
|
12
12
|
"qs": "^6.11.0",
|
|
13
13
|
"react": "^17.0.0 || ^18.0.0",
|
|
14
|
-
"react-toastify": "
|
|
14
|
+
"react-toastify": "9.0.5"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"*"
|
package/types/index.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import type { Id, ToastContent, ToastOptions } from 'react-toastify';
|
|
2
2
|
import type { BrowserHistory } from 'history';
|
|
3
3
|
export declare type Maybe<T> = T | undefined | null;
|
|
4
|
-
export declare interface DfnFormat {
|
|
5
|
-
date_format: string;
|
|
6
|
-
date_mask: string;
|
|
7
|
-
time_format: string;
|
|
8
|
-
time_mask: string;
|
|
9
|
-
datetime_format: string;
|
|
10
|
-
datetime_mask: string;
|
|
11
|
-
}
|
|
12
4
|
export declare interface EnvironmentType {
|
|
13
5
|
isLocalhost: boolean;
|
|
14
6
|
host: string;
|
|
@@ -17,7 +9,6 @@ export declare interface EnvironmentType {
|
|
|
17
9
|
host_api_local: string;
|
|
18
10
|
host_static_assets: string;
|
|
19
11
|
environment_assets: string;
|
|
20
|
-
dfnsFormat: DfnFormat;
|
|
21
12
|
}
|
|
22
13
|
export declare type NetworkProps = {
|
|
23
14
|
method: any;
|
|
@@ -33,11 +24,10 @@ export declare type NetworkProps = {
|
|
|
33
24
|
export declare type ToastFunction = (content: ToastContent, options?: ToastOptions) => Id;
|
|
34
25
|
export declare type EventFunListener = (...args: any[]) => void;
|
|
35
26
|
export declare interface HostToolsType {
|
|
36
|
-
history
|
|
27
|
+
history: BrowserHistory;
|
|
37
28
|
toast: ToastFunction;
|
|
38
29
|
startProgress: VoidFunction;
|
|
39
30
|
stopProgress: VoidFunction;
|
|
40
|
-
formatDate: (date: Date | number, format: string, options?: any) => string;
|
|
41
31
|
events_add_listener: (eventName: string, handler: EventFunListener) => void;
|
|
42
32
|
events_remove_listener: (eventName: string, handler: Maybe<EventFunListener>) => void;
|
|
43
33
|
events_emit: (eventName: string, arg: any) => void;
|
|
@@ -46,7 +36,8 @@ export declare enum EmitEvents {
|
|
|
46
36
|
EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED = "netsevice_unauthorized",
|
|
47
37
|
EMMIT_EVENT_HOST_LOCALE_CHANGE = "host_locale_change",
|
|
48
38
|
EMMIT_EVENT_HOST_THEME_CHANGE = "host_theme_change",
|
|
49
|
-
EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE = "domain_country_change"
|
|
39
|
+
EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE = "domain_country_change",
|
|
40
|
+
EMMIT_EVENT_HOST_FORMATTER_CHANGE = "formatter_change"
|
|
50
41
|
}
|
|
51
42
|
export declare enum CommonFlags {
|
|
52
43
|
FLAG_PRIVILEGES_LOADED = "privileges_loaded",
|
|
@@ -54,7 +45,3 @@ export declare enum CommonFlags {
|
|
|
54
45
|
FLAG_DOMAIN_LOADED = "domain_loaded"
|
|
55
46
|
}
|
|
56
47
|
export declare type AxiosOperation = (props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<any>;
|
|
57
|
-
export declare interface MicrofrontendParms {
|
|
58
|
-
version: number;
|
|
59
|
-
domainCountryId: number;
|
|
60
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
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", _))(E || {}), T = /* @__PURE__ */ ((_) => (_.FLAG_PRIVILEGES_LOADED = "privileges_loaded", _.FLAG_DICTIONARY_LOADED = "dictionary_loaded", _.FLAG_DOMAIN_LOADED = "domain_loaded", _))(T || {});
|
|
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", _))(E || {}), T = /* @__PURE__ */ ((_) => (_.FLAG_PRIVILEGES_LOADED = "privileges_loaded", _.FLAG_DICTIONARY_LOADED = "dictionary_loaded", _.FLAG_DOMAIN_LOADED = "domain_loaded", _))(T || {});
|
|
2
2
|
export {
|
|
3
3
|
T as C,
|
|
4
4
|
E
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import f from "axios";
|
|
2
2
|
import p from "qs";
|
|
3
|
-
import { E } from "../types/index.
|
|
3
|
+
import { E } from "../types/index.d9c95d2a.js";
|
|
4
4
|
function l(e, s, a) {
|
|
5
5
|
const { toast: d } = a;
|
|
6
6
|
return s && s.data && typeof s.data == "object" ? s.data.error && s.data.error?.code && s.data.error?.msg !== void 0 ? Promise.reject({ ...s.data.error, status: s.status }) : (s.data.message && d(s.data.message, { type: "success", autoClose: 1e4 }), s.data) : Promise.reject({
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { createContext as c, useState as T, useCallback as e, useEffect as d } from "react";
|
|
2
|
-
import "../BaseContext/index.f9cdc955.js";
|
|
3
|
-
import "../EnvironmentContext/index.7045c64f.js";
|
|
4
|
-
import "../FlagsContext/index.5f795859.js";
|
|
5
|
-
import { u as N } from "../../hooks/useHostTools/index.66d9a667.js";
|
|
6
|
-
import "../DomainContext/index.1d8ec226.js";
|
|
7
|
-
import "../ModuleDictionaryContext/index.a705fc17.js";
|
|
8
|
-
import "../ModulePrivilegesContext/index.b5ea3bc2.js";
|
|
9
|
-
import "../ModuleSkeletonContext/index.02a06776.js";
|
|
10
|
-
import "../NetworkContext/index.d1dfbc3a.js";
|
|
11
|
-
import { E as n } from "../../types/index.38eca705.js";
|
|
12
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
13
|
-
const l = c(null);
|
|
14
|
-
function R(m) {
|
|
15
|
-
const {
|
|
16
|
-
children: s,
|
|
17
|
-
isMicroFrontEnd: t,
|
|
18
|
-
domainCountryId: a
|
|
19
|
-
} = m, {
|
|
20
|
-
events_add_listener: _,
|
|
21
|
-
events_remove_listener: u,
|
|
22
|
-
events_emit: E
|
|
23
|
-
} = N(), [C, r] = T(a), i = e((o) => {
|
|
24
|
-
r(o);
|
|
25
|
-
}, []);
|
|
26
|
-
d(() => (t && _(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, i), () => {
|
|
27
|
-
t && u(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, i);
|
|
28
|
-
}), []);
|
|
29
|
-
const p = e((o) => {
|
|
30
|
-
t || (r(o), E(n.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE, o));
|
|
31
|
-
}, []);
|
|
32
|
-
return /* @__PURE__ */ f(l.Provider, {
|
|
33
|
-
value: {
|
|
34
|
-
domainCountryId: C,
|
|
35
|
-
changeDomainCountryId: p
|
|
36
|
-
},
|
|
37
|
-
children: s
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
l as D,
|
|
42
|
-
R as a
|
|
43
|
-
};
|