@m4l/layouts 9.8.1 → 9.9.0
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/components/MFHostApp/MFHostApp.d.ts.map +1 -1
- package/components/MFHostApp/MFHostApp.js +44 -37
- package/components/MFHostApp/types.d.ts +2 -1
- package/components/MFHostApp/types.d.ts.map +1 -1
- package/components/MFNoAuthApp/index.d.ts.map +1 -1
- package/components/MFNoAuthApp/index.js +24 -29
- package/components/MFNoAuthApp/types.d.ts +3 -1
- package/components/MFNoAuthApp/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/test/mocks.d.ts +2 -3
- package/test/mocks.d.ts.map +1 -1
- package/utils/createAppMF.d.ts.map +1 -1
- package/utils/createAppMF.js +23 -22
- package/utils/mfRuntimeErrors.d.ts.map +1 -1
- package/utils/mfRuntimeErrors.js +49 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MFHostApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/MFHostApp.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MFHostApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/MFHostApp.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDA8F9C;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,59 +1,66 @@
|
|
|
1
1
|
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { unstable_HistoryRouter as
|
|
3
|
-
import { EnvironmentProvider as
|
|
4
|
-
import { DeviceTypeProvider as
|
|
5
|
-
import { projectMFHostRuntimeTools as
|
|
6
|
-
import { MFHostAppErrorBoundary as
|
|
7
|
-
function
|
|
2
|
+
import { unstable_HistoryRouter as g } from "react-router-dom";
|
|
3
|
+
import { normalizeUserPreferences as E, EnvironmentProvider as D, HostToolsProvider as S, NetworkProvider as w, AuthProvider as A, UserPreferencesProvider as R } from "@m4l/core";
|
|
4
|
+
import { DeviceTypeProvider as U, LocalesProvider as x, HostThemeProvider as j, FormatterProvider as k, AppearanceComponentProvider as B } from "@m4l/graphics";
|
|
5
|
+
import { projectMFHostRuntimeTools as L, BaseModule as N, WindowToolsMFProvider as O, MFHostRuntimeToolsProvider as z, MFObservabilityProvider as C, DynamicMFParmsProvider as I } from "@m4l/components";
|
|
6
|
+
import { MFHostAppErrorBoundary as V } from "./MFHostAppErrorBoundary.js";
|
|
7
|
+
function Q(n) {
|
|
8
8
|
const {
|
|
9
|
-
children:
|
|
10
|
-
currentLocale:
|
|
11
|
-
hostTheme:
|
|
9
|
+
children: s,
|
|
10
|
+
currentLocale: o,
|
|
11
|
+
hostTheme: d,
|
|
12
12
|
environment: c,
|
|
13
|
-
hostTools:
|
|
14
|
-
axiosOperation:
|
|
15
|
-
formatters:
|
|
13
|
+
hostTools: t,
|
|
14
|
+
axiosOperation: l,
|
|
15
|
+
formatters: e,
|
|
16
|
+
userPreferences: m,
|
|
16
17
|
isAuth: a = !0,
|
|
17
18
|
moduleId: i,
|
|
18
19
|
moduleNameField: u,
|
|
19
20
|
skeletonFlags: h,
|
|
20
|
-
privileges:
|
|
21
|
-
componentsDictionary:
|
|
22
|
-
dynamicMFStore:
|
|
23
|
-
windowTools:
|
|
24
|
-
hostRuntime:
|
|
25
|
-
observability:
|
|
21
|
+
privileges: F,
|
|
22
|
+
componentsDictionary: v,
|
|
23
|
+
dynamicMFStore: P,
|
|
24
|
+
windowTools: p,
|
|
25
|
+
hostRuntime: y,
|
|
26
|
+
observability: f,
|
|
26
27
|
// overrideContainerStyles,
|
|
27
28
|
loggedUser: M,
|
|
28
29
|
moduleVersion: b
|
|
29
|
-
} = n,
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
} = n, T = L(y), H = E(
|
|
31
|
+
m ?? {
|
|
32
|
+
currency: e.currencyFormatter.code,
|
|
33
|
+
currencyDecimalDigits: e.currencyFormatter.decimalDigits,
|
|
34
|
+
decimalSymbol: e.numberFormatter.decimalSymbol,
|
|
35
|
+
thousandsSymbol: e.numberFormatter.thousandsSymbol,
|
|
36
|
+
locale: o.localeString,
|
|
37
|
+
dateFormat: e.dateFormatter.dateFormat,
|
|
38
|
+
timeFormat: e.dateFormatter.timeFormat
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
return /* @__PURE__ */ r(D, { ...c, children: /* @__PURE__ */ r(V, { moduleId: i, moduleVersion: b, children: /* @__PURE__ */ r(S, { ...t, children: /* @__PURE__ */ r(w, { axiosOperation: l, children: /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(A, { isMicroFrontEnd: !0, loggedUser: M, children: /* @__PURE__ */ r(x, { isMicroFrontEnd: !0, localeHost: o, children: /* @__PURE__ */ r(j, { isMicroFrontEnd: !0, ...d, children: /* @__PURE__ */ r(
|
|
42
|
+
g,
|
|
32
43
|
{
|
|
33
|
-
history:
|
|
44
|
+
history: t.history,
|
|
34
45
|
children: /* @__PURE__ */ r(
|
|
35
|
-
|
|
46
|
+
R,
|
|
36
47
|
{
|
|
37
48
|
isMicroFrontEnd: !0,
|
|
38
|
-
|
|
39
|
-
currency: o.currencyFormatter.code,
|
|
40
|
-
currency_decimal_digits: o.currencyFormatter.decimalDigits,
|
|
41
|
-
decimal_symbol: o.numberFormatter.decimalSymbol,
|
|
42
|
-
thousands_symbol: o.numberFormatter.thousandsSymbol,
|
|
49
|
+
...H,
|
|
43
50
|
children: /* @__PURE__ */ r(
|
|
44
|
-
|
|
51
|
+
N,
|
|
45
52
|
{
|
|
46
53
|
isAuth: a,
|
|
47
54
|
moduleId: i,
|
|
48
55
|
moduleNameField: u,
|
|
49
|
-
componentsDictionary:
|
|
56
|
+
componentsDictionary: v,
|
|
50
57
|
skeletonFlags: h,
|
|
51
|
-
privileges:
|
|
52
|
-
children: /* @__PURE__ */ r(
|
|
53
|
-
|
|
58
|
+
privileges: F,
|
|
59
|
+
children: /* @__PURE__ */ r(k, { isMicroFrontEnd: !0, ...e, children: /* @__PURE__ */ r(O, { ...p, children: /* @__PURE__ */ r(
|
|
60
|
+
z,
|
|
54
61
|
{
|
|
55
|
-
value:
|
|
56
|
-
children: /* @__PURE__ */ r(
|
|
62
|
+
value: T,
|
|
63
|
+
children: /* @__PURE__ */ r(C, { value: f, children: /* @__PURE__ */ r(I, { store: P, children: /* @__PURE__ */ r(B, { children: s }) }) })
|
|
57
64
|
}
|
|
58
65
|
) }) })
|
|
59
66
|
}
|
|
@@ -64,6 +71,6 @@ function G(n) {
|
|
|
64
71
|
) }) }) }) }) }) }) }) });
|
|
65
72
|
}
|
|
66
73
|
export {
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
Q as MFHostApp,
|
|
75
|
+
Q as default
|
|
69
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
1
|
+
import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType, UserPreferences } from '@m4l/core';
|
|
2
2
|
import { BaseModuleProps, DynamicMFStore, EmergeType, M4LOverridesStyleRules, MFHostRuntime, WindowToolsMF } from '@m4l/components';
|
|
3
3
|
import { MFObservabilityService } from '../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
4
4
|
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
@@ -12,6 +12,7 @@ export interface ByHostProps {
|
|
|
12
12
|
currentLocale: LocaleType;
|
|
13
13
|
axiosOperation: AxiosOperation;
|
|
14
14
|
formatters: Formatters;
|
|
15
|
+
userPreferences?: UserPreferences;
|
|
15
16
|
dynamicMFStore: DynamicMFStore;
|
|
16
17
|
windowTools: WindowToolsMF;
|
|
17
18
|
hostRuntime?: MFHostRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,eAAe,EACf,cAAc,EACd,UAAU,EACV,sBAAsB,EACtB,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,aAAa,CAAC;IACzB,SAAS,EAAE,aAAa,CAAC;IACzB,aAAa,EAAE,UAAU,CAAC;IAC1B,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IAEvC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,eAAe,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,cAAc,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC,kBAAkB,EAAE,OAAO,eAAe,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFNoAuthApp/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFNoAuthApp/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,oDAuClD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,41 +1,36 @@
|
|
|
1
1
|
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { DeviceTypeProvider as
|
|
4
|
-
import { useShellObservability as
|
|
2
|
+
import { UserPreferencesProvider as p } from "@m4l/core";
|
|
3
|
+
import { DeviceTypeProvider as h, FormatterProvider as f } from "@m4l/graphics";
|
|
4
|
+
import { useShellObservability as v, HostRuntimeProvider as F, BaseModule as M, MFObservabilityProvider as P } from "@m4l/components";
|
|
5
5
|
import { useMemo as b } from "react";
|
|
6
|
-
import { createMFNoAuthHostRuntime as
|
|
6
|
+
import { createMFNoAuthHostRuntime as y } from "./createMFNoAuthHostRuntime.js";
|
|
7
7
|
import { MFHostAppErrorBoundary as A } from "../MFHostApp/MFHostAppErrorBoundary.js";
|
|
8
|
-
function
|
|
8
|
+
function B(o) {
|
|
9
9
|
const {
|
|
10
10
|
children: i,
|
|
11
11
|
formatters: t,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
currency_decimal_digits: 2,
|
|
23
|
-
decimal_symbol: ".",
|
|
24
|
-
thousands_symbol: ","
|
|
25
|
-
}, children: /* @__PURE__ */ r(A, { moduleId: o, children: /* @__PURE__ */ r(
|
|
26
|
-
f,
|
|
12
|
+
userPreferences: s,
|
|
13
|
+
isAuth: n,
|
|
14
|
+
componentsDictionary: l,
|
|
15
|
+
moduleId: e,
|
|
16
|
+
moduleNameField: m,
|
|
17
|
+
privileges: d,
|
|
18
|
+
skeletonFlags: u
|
|
19
|
+
} = o, c = b(() => y(), []), a = v();
|
|
20
|
+
return /* @__PURE__ */ r(F, { value: c, children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(p, { isMicroFrontEnd: !0, ...s, children: /* @__PURE__ */ r(A, { moduleId: e, children: /* @__PURE__ */ r(
|
|
21
|
+
M,
|
|
27
22
|
{
|
|
28
|
-
isAuth:
|
|
29
|
-
moduleId:
|
|
30
|
-
moduleNameField:
|
|
31
|
-
componentsDictionary:
|
|
32
|
-
skeletonFlags:
|
|
33
|
-
privileges:
|
|
34
|
-
children: /* @__PURE__ */ r(
|
|
23
|
+
isAuth: n,
|
|
24
|
+
moduleId: e,
|
|
25
|
+
moduleNameField: m,
|
|
26
|
+
componentsDictionary: l,
|
|
27
|
+
skeletonFlags: u,
|
|
28
|
+
privileges: d,
|
|
29
|
+
children: /* @__PURE__ */ r(f, { isMicroFrontEnd: !0, ...t, children: /* @__PURE__ */ r(P, { value: a, children: i }) })
|
|
35
30
|
}
|
|
36
31
|
) }) }) }) });
|
|
37
32
|
}
|
|
38
33
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
B as MFNoAuthApp,
|
|
35
|
+
B as default
|
|
41
36
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { UserPreferences } from '@m4l/core';
|
|
1
2
|
import { Formatters } from '@m4l/graphics';
|
|
2
|
-
import {
|
|
3
|
+
import { BaseModuleProps, WindowToolsMF } from '@m4l/components';
|
|
3
4
|
export interface ByHostProps {
|
|
4
5
|
formatters: Formatters;
|
|
6
|
+
userPreferences: UserPreferences;
|
|
5
7
|
windowTools: WindowToolsMF;
|
|
6
8
|
}
|
|
7
9
|
export interface MFNoAuthAppProps extends ByHostProps, BaseModuleProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFNoAuthApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFNoAuthApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,eAAe;IACpE;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;CACxC"}
|
package/package.json
CHANGED
package/test/mocks.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Mock } from 'vitest';
|
|
2
2
|
import { Formatters } from '@m4l/graphics';
|
|
3
3
|
import * as core from '@m4l/core';
|
|
4
|
-
import * as graphics from '@m4l/graphics';
|
|
5
4
|
export declare const mock_addFlag: Mock;
|
|
6
5
|
export declare const mock_networkOperation: Mock;
|
|
7
6
|
export declare const mock_useFormatter: Mock;
|
|
@@ -21,11 +20,11 @@ export declare const mock_useEnvironment: {
|
|
|
21
20
|
};
|
|
22
21
|
export declare const formatterValues: Formatters;
|
|
23
22
|
export declare const mockedGraphics: {
|
|
24
|
-
useFormatter: Mock<() => import('
|
|
23
|
+
useFormatter: Mock<() => import('../../../../dist/packages/@m4l/graphics/contexts/FormatterContext/types').FormatterContextProps>;
|
|
25
24
|
};
|
|
26
25
|
export declare function restoreGraphicsMocked(): void;
|
|
27
26
|
export declare const coreImplementation: typeof core;
|
|
28
27
|
export declare const graphicsImplementation: {
|
|
29
|
-
useFormatter: Mock<() => import('
|
|
28
|
+
useFormatter: Mock<() => import('../../../../dist/packages/@m4l/graphics/contexts/FormatterContext/types').FormatterContextProps>;
|
|
30
29
|
};
|
|
31
30
|
//# sourceMappingURL=mocks.d.ts.map
|
package/test/mocks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAM,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAM,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,eAAO,MAAM,YAAY,EAAC,IAAc,CAAC;AACzC,eAAO,MAAM,qBAAqB,EAAC,IAAc,CAAC;AAClD,eAAO,MAAM,iBAAiB,EAAC,IAAc,CAAC;AAC9C,eAAO,MAAM,wBAAwB,EAAC,IAAc,CAAC;AACrD,eAAO,MAAM,2BAA2B,EAAC,IAAc,CAAC;AACxD,eAAO,MAAM,gBAAgB,EAAC,IAAc,CAAC;AAC7C,eAAO,MAAM,kBAAkB,EAAC,IAAc,CAAC;AAC/C,eAAO,MAAM,iBAAiB,EAAC,IAAc,CAAC;AAC9C,eAAO,MAAM,wBAAwB,EAAC,IAAc,CAAC;AACrD,eAAO,MAAM,mBAAmB;;;;;;;CAO/B,CAAC;AACF,eAAO,MAAM,eAAe,EAAE,UAY7B,CAAC;AAyBF,eAAO,MAAM,cAAc;;CAE1B,CAAC;AACF,wBAAgB,qBAAqB,SAEpC;AACD,eAAO,MAAM,kBAAkB,aAAO,CAAC;AACvC,eAAO,MAAM,sBAAsB;;CAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAppMF.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/createAppMF.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACzD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA6BF;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"createAppMF.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/createAppMF.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAA;KAAE,KAAK,GAAG,CAAC,OAAO,CAAC;IACzD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA6BF;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,QAmFlD"}
|
package/utils/createAppMF.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as u } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { MFHostApp as w } from "../components/MFHostApp/MFHostApp.js";
|
|
3
3
|
import { createRoot as R } from "react-dom/client";
|
|
4
|
-
function
|
|
4
|
+
function t(n, o) {
|
|
5
5
|
return `__root_${n}_${o}`;
|
|
6
6
|
}
|
|
7
7
|
function v(n, o) {
|
|
8
|
-
return window[
|
|
8
|
+
return window[t(n, o)];
|
|
9
9
|
}
|
|
10
|
-
function $(n, o,
|
|
11
|
-
window[
|
|
10
|
+
function $(n, o, r) {
|
|
11
|
+
window[t(n, o)] = r;
|
|
12
12
|
}
|
|
13
13
|
function h(n, o) {
|
|
14
|
-
delete window[
|
|
14
|
+
delete window[t(n, o)];
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function F(n) {
|
|
17
17
|
const {
|
|
18
18
|
prefixMF: o,
|
|
19
|
-
moduleId:
|
|
20
|
-
App:
|
|
19
|
+
moduleId: r,
|
|
20
|
+
App: l,
|
|
21
21
|
privileges: p,
|
|
22
|
-
appVersion:
|
|
22
|
+
appVersion: s,
|
|
23
23
|
componentsDictionary: g,
|
|
24
24
|
skeletonFlags: f
|
|
25
25
|
} = n;
|
|
26
26
|
function _(e) {
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const m = R(
|
|
27
|
+
const i = document.getElementById(e.containerId);
|
|
28
|
+
if (i) {
|
|
29
|
+
const m = R(i);
|
|
30
30
|
$(o, e.containerId, m), m.render(
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ u(
|
|
32
32
|
w,
|
|
33
33
|
{
|
|
34
34
|
environment: e.environment,
|
|
@@ -37,9 +37,10 @@ function a(n) {
|
|
|
37
37
|
currentLocale: e.currentLocale,
|
|
38
38
|
hostTheme: e.hostTheme,
|
|
39
39
|
formatters: e.formatter,
|
|
40
|
+
userPreferences: e.userPreferences,
|
|
40
41
|
dynamicMFStore: e.dynamicMFStore,
|
|
41
|
-
moduleId:
|
|
42
|
-
moduleVersion:
|
|
42
|
+
moduleId: r,
|
|
43
|
+
moduleVersion: s,
|
|
43
44
|
privileges: p,
|
|
44
45
|
skeletonFlags: f,
|
|
45
46
|
componentsDictionary: g,
|
|
@@ -47,7 +48,7 @@ function a(n) {
|
|
|
47
48
|
hostRuntime: e.hostRuntime,
|
|
48
49
|
observability: e.observability,
|
|
49
50
|
loggedUser: e.loggedUser,
|
|
50
|
-
children: /* @__PURE__ */ l
|
|
51
|
+
children: /* @__PURE__ */ u(l, { emergeType: e.emergeType })
|
|
51
52
|
}
|
|
52
53
|
)
|
|
53
54
|
);
|
|
@@ -56,13 +57,13 @@ function a(n) {
|
|
|
56
57
|
const d = ((e) => {
|
|
57
58
|
_(e);
|
|
58
59
|
});
|
|
59
|
-
d.__version =
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
d.__version = s, window[`render_v2_${o}_${r}`] = d, window[`unmount_${o}_${r}`] = (e) => {
|
|
61
|
+
const i = v(o, e);
|
|
62
|
+
i && (i.unmount(), process.env.NODE_ENV === "development" && console.debug(`unmount_${o}_${r}`, e), h(o, e));
|
|
62
63
|
}, process.env.NODE_ENV === "development" && console.debug(
|
|
63
|
-
`******* Module ESM: ${o}_${
|
|
64
|
+
`******* Module ESM: ${o}_${r} - Version ${s} loaded ******* `
|
|
64
65
|
);
|
|
65
66
|
}
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
F as createAppMF
|
|
68
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfRuntimeErrors.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/mfRuntimeErrors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"mfRuntimeErrors.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/mfRuntimeErrors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAgEzE;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,qBAAqB,GAC7B,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,IAAI,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAarE"}
|
package/utils/mfRuntimeErrors.js
CHANGED
|
@@ -1,18 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const o = /* @__PURE__ */ Symbol.for(
|
|
2
|
+
"m4l.layouts.mfRuntimeErrors"
|
|
3
|
+
);
|
|
4
|
+
function i(r) {
|
|
5
|
+
console.warn(
|
|
6
|
+
"MF runtime boundary crash was captured locally, but no host observability handler is registered.",
|
|
7
|
+
{
|
|
8
|
+
componentStack: r.componentStack,
|
|
9
|
+
instrumentationStatus: "missing-host-handler",
|
|
10
|
+
moduleId: r.moduleId,
|
|
11
|
+
moduleVersion: r.moduleVersion
|
|
12
|
+
},
|
|
13
|
+
r.error
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function a(r, n) {
|
|
17
|
+
console.warn(
|
|
18
|
+
"MF runtime boundary crash was captured locally, but the host observability handler failed.",
|
|
19
|
+
{
|
|
20
|
+
componentStack: r.componentStack,
|
|
21
|
+
instrumentationStatus: "host-handler-failed",
|
|
22
|
+
moduleId: r.moduleId,
|
|
23
|
+
moduleVersion: r.moduleVersion
|
|
24
|
+
},
|
|
25
|
+
n
|
|
26
|
+
);
|
|
4
27
|
}
|
|
5
28
|
function t() {
|
|
6
|
-
|
|
29
|
+
const r = globalThis;
|
|
30
|
+
if (r[o])
|
|
31
|
+
return r[o];
|
|
32
|
+
const n = {};
|
|
33
|
+
return r[o] = n, n;
|
|
7
34
|
}
|
|
8
|
-
function
|
|
35
|
+
function l(r) {
|
|
36
|
+
t().handler = r;
|
|
37
|
+
}
|
|
38
|
+
function u() {
|
|
39
|
+
t().handler = void 0;
|
|
40
|
+
}
|
|
41
|
+
function s(r) {
|
|
42
|
+
const n = t().handler;
|
|
43
|
+
if (!n) {
|
|
44
|
+
i(r);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
9
47
|
try {
|
|
10
|
-
|
|
11
|
-
} catch {
|
|
48
|
+
n(r);
|
|
49
|
+
} catch (e) {
|
|
50
|
+
a(r, e);
|
|
12
51
|
}
|
|
13
52
|
}
|
|
14
53
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
54
|
+
l as registerMFRuntimeErrorHandler,
|
|
55
|
+
s as reportMFRuntimeError,
|
|
56
|
+
u as unregisterMFRuntimeErrorHandler
|
|
18
57
|
};
|