@m4l/layouts 9.5.0 → 9.5.1-beta-feat-mfloader-observability-prep-20260506.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 +33 -31
- package/components/MFHostApp/MFHostAppErrorBoundary.d.ts +30 -0
- package/components/MFHostApp/MFHostAppErrorBoundary.d.ts.map +1 -0
- package/components/MFHostApp/MFHostAppErrorBoundary.js +35 -0
- package/components/MFHostApp/types.d.ts +4 -0
- package/components/MFHostApp/types.d.ts.map +1 -1
- package/components/MFNoAuthApp/index.d.ts.map +1 -1
- package/components/MFNoAuthApp/index.js +15 -14
- package/index.js +33 -29
- package/package.json +1 -1
- package/utils/createAppMF.d.ts.map +1 -1
- package/utils/createAppMF.js +32 -30
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/mfRuntimeErrors.d.ts +20 -0
- package/utils/mfRuntimeErrors.d.ts.map +1 -0
- package/utils/mfRuntimeErrors.js +18 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MFHostApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/MFHostApp.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MFHostApp.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/MFHostApp.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDAuF9C;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,56 +1,58 @@
|
|
|
1
1
|
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { unstable_HistoryRouter as T } from "react-router-dom";
|
|
3
|
-
import { EnvironmentProvider as
|
|
4
|
-
import { DeviceTypeProvider as D, LocalesProvider as R, HostThemeProvider as _, FormatterProvider as w, AppearanceComponentProvider as
|
|
5
|
-
import { projectMFHostRuntimeTools as
|
|
6
|
-
|
|
3
|
+
import { EnvironmentProvider as H, HostToolsProvider as b, NetworkProvider as g, AuthProvider as E, DomainCountryProvider as A } from "@m4l/core";
|
|
4
|
+
import { DeviceTypeProvider as D, LocalesProvider as R, HostThemeProvider as _, FormatterProvider as w, AppearanceComponentProvider as S } from "@m4l/graphics";
|
|
5
|
+
import { projectMFHostRuntimeTools as x, BaseModule as j, WindowToolsMFProvider as k, MFHostRuntimeToolsProvider as B, DynamicMFParmsProvider as C } from "@m4l/components";
|
|
6
|
+
import { MFHostAppErrorBoundary as L } from "./MFHostAppErrorBoundary.js";
|
|
7
|
+
function q(n) {
|
|
7
8
|
const {
|
|
8
|
-
children:
|
|
9
|
-
currentLocale:
|
|
10
|
-
hostTheme:
|
|
11
|
-
environment:
|
|
9
|
+
children: d,
|
|
10
|
+
currentLocale: s,
|
|
11
|
+
hostTheme: c,
|
|
12
|
+
environment: m,
|
|
12
13
|
hostTools: e,
|
|
13
|
-
axiosOperation:
|
|
14
|
+
axiosOperation: l,
|
|
14
15
|
formatters: o,
|
|
15
|
-
isAuth:
|
|
16
|
-
moduleId:
|
|
16
|
+
isAuth: a = !0,
|
|
17
|
+
moduleId: i,
|
|
17
18
|
moduleNameField: u,
|
|
18
19
|
skeletonFlags: h,
|
|
19
20
|
privileges: F,
|
|
20
|
-
componentsDictionary:
|
|
21
|
-
dynamicMFStore:
|
|
22
|
-
windowTools:
|
|
23
|
-
hostRuntime:
|
|
21
|
+
componentsDictionary: p,
|
|
22
|
+
dynamicMFStore: t,
|
|
23
|
+
windowTools: v,
|
|
24
|
+
hostRuntime: y,
|
|
24
25
|
// overrideContainerStyles,
|
|
25
|
-
loggedUser: P
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
loggedUser: P,
|
|
27
|
+
moduleVersion: M
|
|
28
|
+
} = n, f = x(y);
|
|
29
|
+
return /* @__PURE__ */ r(H, { ...m, children: /* @__PURE__ */ r(L, { moduleId: i, moduleVersion: M, children: /* @__PURE__ */ r(b, { ...e, children: /* @__PURE__ */ r(g, { axiosOperation: l, children: /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(E, { isMicroFrontEnd: !0, loggedUser: P, children: /* @__PURE__ */ r(R, { isMicroFrontEnd: !0, localeHost: s, children: /* @__PURE__ */ r(_, { isMicroFrontEnd: !0, ...c, children: /* @__PURE__ */ r(
|
|
28
30
|
T,
|
|
29
31
|
{
|
|
30
32
|
history: e.history,
|
|
31
33
|
children: /* @__PURE__ */ r(
|
|
32
|
-
|
|
34
|
+
A,
|
|
33
35
|
{
|
|
34
36
|
isMicroFrontEnd: !0,
|
|
35
|
-
id:
|
|
37
|
+
id: t?.getState().dynamicMFParameters?.id || 1,
|
|
36
38
|
currency: o.currencyFormatter.code,
|
|
37
39
|
currency_decimal_digits: o.currencyFormatter.decimalDigits,
|
|
38
40
|
decimal_symbol: o.numberFormatter.decimalSymbol,
|
|
39
41
|
thousands_symbol: o.numberFormatter.thousandsSymbol,
|
|
40
42
|
children: /* @__PURE__ */ r(
|
|
41
|
-
|
|
43
|
+
j,
|
|
42
44
|
{
|
|
43
|
-
isAuth:
|
|
44
|
-
moduleId:
|
|
45
|
+
isAuth: a,
|
|
46
|
+
moduleId: i,
|
|
45
47
|
moduleNameField: u,
|
|
46
|
-
componentsDictionary:
|
|
48
|
+
componentsDictionary: p,
|
|
47
49
|
skeletonFlags: h,
|
|
48
50
|
privileges: F,
|
|
49
|
-
children: /* @__PURE__ */ r(w, { isMicroFrontEnd: !0, ...o, children: /* @__PURE__ */ r(
|
|
50
|
-
|
|
51
|
+
children: /* @__PURE__ */ r(w, { isMicroFrontEnd: !0, ...o, children: /* @__PURE__ */ r(k, { ...v, children: /* @__PURE__ */ r(
|
|
52
|
+
B,
|
|
51
53
|
{
|
|
52
|
-
value:
|
|
53
|
-
children: /* @__PURE__ */ r(C, { store:
|
|
54
|
+
value: f,
|
|
55
|
+
children: /* @__PURE__ */ r(C, { store: t, children: /* @__PURE__ */ r(S, { children: d }) })
|
|
54
56
|
}
|
|
55
57
|
) }) })
|
|
56
58
|
}
|
|
@@ -58,9 +60,9 @@ function U(t) {
|
|
|
58
60
|
}
|
|
59
61
|
)
|
|
60
62
|
}
|
|
61
|
-
) }) }) }) }) }) }) });
|
|
63
|
+
) }) }) }) }) }) }) }) });
|
|
62
64
|
}
|
|
63
65
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
q as MFHostApp,
|
|
67
|
+
q as default
|
|
66
68
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface MFHostAppErrorBoundaryProps {
|
|
3
|
+
moduleId: string;
|
|
4
|
+
moduleVersion?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface MFHostAppErrorBoundaryState {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Contain runtime crashes inside one MF tree and surface a safe local fallback.
|
|
12
|
+
*/
|
|
13
|
+
export declare class MFHostAppErrorBoundary extends Component<MFHostAppErrorBoundaryProps, MFHostAppErrorBoundaryState> {
|
|
14
|
+
state: MFHostAppErrorBoundaryState;
|
|
15
|
+
/**
|
|
16
|
+
* Switch the MF tree into its fallback state after a runtime render failure.
|
|
17
|
+
*/
|
|
18
|
+
static getDerivedStateFromError(): MFHostAppErrorBoundaryState;
|
|
19
|
+
/**
|
|
20
|
+
* Forward the caught runtime error to the registered host handler, if any.
|
|
21
|
+
*/
|
|
22
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
23
|
+
/**
|
|
24
|
+
* Render the MF children or a safe fallback if a runtime error was caught.
|
|
25
|
+
* The fallback should be as minimal and static as possible to avoid any risk of causing another error during rendering.
|
|
26
|
+
*/
|
|
27
|
+
render(): ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=MFHostAppErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MFHostAppErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/MFHostAppErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlE,UAAU,2BAA2B;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,UAAU,2BAA2B;IACnC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,SAAS,CACnD,2BAA2B,EAC3B,2BAA2B,CAC5B;IACiB,KAAK,EAAE,2BAA2B,CAEhD;IAEF;;OAEG;WACW,wBAAwB,IAAI,2BAA2B;IAIrE;;OAEG;IACa,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAS3E;;;OAGG;IACa,MAAM,IAAI,SAAS;CAWpC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Component as t } from "react";
|
|
3
|
+
import { reportMFRuntimeError as n } from "../../utils/mfRuntimeErrors.js";
|
|
4
|
+
class a extends t {
|
|
5
|
+
state = {
|
|
6
|
+
hasError: !1
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Switch the MF tree into its fallback state after a runtime render failure.
|
|
10
|
+
*/
|
|
11
|
+
static getDerivedStateFromError() {
|
|
12
|
+
return { hasError: !0 };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Forward the caught runtime error to the registered host handler, if any.
|
|
16
|
+
*/
|
|
17
|
+
componentDidCatch(r, o) {
|
|
18
|
+
n({
|
|
19
|
+
moduleId: this.props.moduleId,
|
|
20
|
+
moduleVersion: this.props.moduleVersion,
|
|
21
|
+
error: r,
|
|
22
|
+
componentStack: o.componentStack ?? void 0
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Render the MF children or a safe fallback if a runtime error was caught.
|
|
27
|
+
* The fallback should be as minimal and static as possible to avoid any risk of causing another error during rendering.
|
|
28
|
+
*/
|
|
29
|
+
render() {
|
|
30
|
+
return this.state.hasError ? /* @__PURE__ */ e("div", { role: "alert", "data-testid": "mf-runtime-error-fallback", children: "This microfrontend could not be rendered." }) : this.props.children;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
a as MFHostAppErrorBoundary
|
|
35
|
+
};
|
|
@@ -28,6 +28,10 @@ export interface ByHostProps {
|
|
|
28
28
|
* loggedUser: usuario logueado, para los microfrontends que necesitan el usuario logueado
|
|
29
29
|
*/
|
|
30
30
|
loggedUser?: AuthUserType;
|
|
31
|
+
/**
|
|
32
|
+
* Deployed MF bundle version exposed by the registered render_v2 contract.
|
|
33
|
+
*/
|
|
34
|
+
moduleVersion?: string;
|
|
31
35
|
}
|
|
32
36
|
export type MFHostAppProps = ByHostProps & BaseModuleProps;
|
|
33
37
|
export type MFHostAppOwnerState = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAG,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,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,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/layouts/src/components/MFHostApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAG,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,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,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC;;;;OAIG;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;AAG3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAA;AAGD,MAAM,MAAM,kBAAkB,GAAI,MAAM,OAAO,cAAc,CAAC;AAE9D,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":"AAIA,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":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAI3C;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,oDAyClD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { DomainCountryProvider as l } from "@m4l/core";
|
|
3
3
|
import { DeviceTypeProvider as a, FormatterProvider as p } from "@m4l/graphics";
|
|
4
4
|
import { HostRuntimeProvider as h, BaseModule as f } from "@m4l/components";
|
|
5
5
|
import { useMemo as y } from "react";
|
|
6
|
-
import { createMFNoAuthHostRuntime as
|
|
7
|
-
|
|
6
|
+
import { createMFNoAuthHostRuntime as F } from "./createMFNoAuthHostRuntime.js";
|
|
7
|
+
import { MFHostAppErrorBoundary as v } from "../MFHostApp/MFHostAppErrorBoundary.js";
|
|
8
|
+
function H(e) {
|
|
8
9
|
const {
|
|
9
|
-
children:
|
|
10
|
-
formatters:
|
|
11
|
-
moduleId:
|
|
10
|
+
children: t,
|
|
11
|
+
formatters: i,
|
|
12
|
+
moduleId: o,
|
|
12
13
|
moduleNameField: n,
|
|
13
14
|
skeletonFlags: m,
|
|
14
15
|
privileges: d,
|
|
15
16
|
componentsDictionary: s,
|
|
16
17
|
isAuth: u
|
|
17
|
-
} =
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
} = e, c = y(() => F(), []);
|
|
19
|
+
return /* @__PURE__ */ r(h, { value: c, children: /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(l, { isMicroFrontEnd: !0, ...{
|
|
19
20
|
id: 1,
|
|
20
21
|
currency: "USD",
|
|
21
22
|
currency_decimal_digits: 2,
|
|
22
23
|
decimal_symbol: ".",
|
|
23
24
|
thousands_symbol: ","
|
|
24
|
-
}, children: /* @__PURE__ */ o(
|
|
25
|
+
}, children: /* @__PURE__ */ r(v, { moduleId: o, children: /* @__PURE__ */ r(
|
|
25
26
|
f,
|
|
26
27
|
{
|
|
27
28
|
isAuth: u,
|
|
28
|
-
moduleId:
|
|
29
|
+
moduleId: o,
|
|
29
30
|
moduleNameField: n,
|
|
30
31
|
componentsDictionary: s,
|
|
31
32
|
skeletonFlags: m,
|
|
32
33
|
privileges: d,
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ r(p, { isMicroFrontEnd: !0, ...i, children: t })
|
|
34
35
|
}
|
|
35
|
-
) }) }) });
|
|
36
|
+
) }) }) }) });
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
H as MFNoAuthApp,
|
|
40
|
+
H as default
|
|
40
41
|
};
|
package/index.js
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import { LIMIT_RECORDS_500_CONFIG as
|
|
2
|
-
import { MFNoAuthApp as
|
|
1
|
+
import { LIMIT_RECORDS_500_CONFIG as e } from "./constants.js";
|
|
2
|
+
import { MFNoAuthApp as m } from "./components/MFNoAuthApp/index.js";
|
|
3
3
|
import { MFHostApp as a } from "./components/MFHostApp/MFHostApp.js";
|
|
4
|
-
import { ModuleDetailTabs as
|
|
5
|
-
import { DynamicTabs as
|
|
4
|
+
import { ModuleDetailTabs as i } from "./components/ModuleDetailTabs/ModuleDetailTabs.js";
|
|
5
|
+
import { DynamicTabs as n } from "./components/DynamicTabs/DynamicTabs.js";
|
|
6
6
|
import { NoAuthModuleLayout as s } from "./layouts/NoAuthModuleLayout/index.js";
|
|
7
|
-
import { ModuleLayout as
|
|
7
|
+
import { ModuleLayout as d } from "./layouts/ModuleLayout/ModuleLayout.js";
|
|
8
8
|
import { ModuleProvider as y } from "./layouts/ModuleLayout/contexts/ModuleContext/index.js";
|
|
9
9
|
import { getModuleLayoutComponentsDictionary as c } from "./layouts/ModuleLayout/dicctionary.js";
|
|
10
|
-
import { MasterDetailLayout as
|
|
11
|
-
import { getMasterDetailLayoutComponentsDictionary as
|
|
12
|
-
import { defaultNoAuthModuleLayoutDictionary as
|
|
13
|
-
import { useMasterDetail as
|
|
14
|
-
import { useModule as
|
|
15
|
-
import { useDynamicAccordions as
|
|
16
|
-
import { createComponentField as
|
|
17
|
-
import { useNetworkActionConfirm as
|
|
18
|
-
import { useFormAddEdit as
|
|
10
|
+
import { MasterDetailLayout as F } from "./layouts/MasterDetailLayout/MasterDetailLayout.js";
|
|
11
|
+
import { getMasterDetailLayoutComponentsDictionary as C } from "./layouts/MasterDetailLayout/dicctionary.js";
|
|
12
|
+
import { defaultNoAuthModuleLayoutDictionary as R, getNoAuthModuleLayoutComponentsDictionary as g } from "./layouts/NoAuthModuleLayout/dicctionary.js";
|
|
13
|
+
import { useMasterDetail as E } from "./hooks/useMasterDetail/index.js";
|
|
14
|
+
import { useModule as I } from "./hooks/useModule/index.js";
|
|
15
|
+
import { useDynamicAccordions as _ } from "./hooks/useDynamicAccordions/useDynamicAccordions.js";
|
|
16
|
+
import { createComponentField as O, useDynamicPaperForm as P } from "./hooks/useDynamicPaperForm/useDynamicPaperForm.js";
|
|
17
|
+
import { useNetworkActionConfirm as v } from "./hooks/useNetworkActionConfirm/useNetworkActionConfirm.js";
|
|
18
|
+
import { useFormAddEdit as G } from "./hooks/useFormAddEdit/useFormAddEdit.js";
|
|
19
19
|
import { useRefreshData as j } from "./hooks/useRefreshData/useRefreshData.js";
|
|
20
20
|
import { createAppMF as z } from "./utils/createAppMF.js";
|
|
21
|
+
import { registerMFRuntimeErrorHandler as J, reportMFRuntimeError as K, unregisterMFRuntimeErrorHandler as Q } from "./utils/mfRuntimeErrors.js";
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
n as DynamicTabs,
|
|
24
|
+
e as LIMIT_RECORDS_500_CONFIG,
|
|
24
25
|
a as MFHostApp,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
m as MFNoAuthApp,
|
|
27
|
+
F as MasterDetailLayout,
|
|
28
|
+
i as ModuleDetailTabs,
|
|
29
|
+
d as ModuleLayout,
|
|
29
30
|
y as ModuleProvider,
|
|
30
31
|
s as NoAuthModuleLayout,
|
|
31
32
|
z as createAppMF,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
O as createComponentField,
|
|
34
|
+
R as defaultNoAuthModuleLayoutDictionary,
|
|
35
|
+
C as getMasterDetailLayoutComponentsDictionary,
|
|
35
36
|
c as getModuleLayoutComponentsDictionary,
|
|
36
37
|
g as getNoAuthModuleLayoutComponentsDictionary,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
J as registerMFRuntimeErrorHandler,
|
|
39
|
+
K as reportMFRuntimeError,
|
|
40
|
+
Q as unregisterMFRuntimeErrorHandler,
|
|
41
|
+
_ as useDynamicAccordions,
|
|
42
|
+
P as useDynamicPaperForm,
|
|
43
|
+
G as useFormAddEdit,
|
|
44
|
+
E as useMasterDetail,
|
|
45
|
+
I as useModule,
|
|
46
|
+
v as useNetworkActionConfirm,
|
|
43
47
|
j as useRefreshData
|
|
44
48
|
};
|
package/package.json
CHANGED
|
@@ -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;
|
|
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,QAiFlD"}
|
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
|
-
import { createRoot as
|
|
4
|
-
function
|
|
3
|
+
import { createRoot as R } from "react-dom/client";
|
|
4
|
+
function s(n, o) {
|
|
5
5
|
return `__root_${n}_${o}`;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return window[
|
|
7
|
+
function $(n, o) {
|
|
8
|
+
return window[s(n, o)];
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
window[
|
|
10
|
+
function h(n, o, r) {
|
|
11
|
+
window[s(n, o)] = r;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
delete window[
|
|
13
|
+
function v(n, o) {
|
|
14
|
+
delete window[s(n, o)];
|
|
15
15
|
}
|
|
16
16
|
function y(n) {
|
|
17
17
|
const {
|
|
18
18
|
prefixMF: o,
|
|
19
|
-
moduleId:
|
|
20
|
-
App:
|
|
19
|
+
moduleId: r,
|
|
20
|
+
App: l,
|
|
21
21
|
privileges: p,
|
|
22
|
-
appVersion:
|
|
23
|
-
componentsDictionary:
|
|
24
|
-
skeletonFlags:
|
|
22
|
+
appVersion: t,
|
|
23
|
+
componentsDictionary: g,
|
|
24
|
+
skeletonFlags: f
|
|
25
25
|
} = n;
|
|
26
|
-
function
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
/* @__PURE__ */
|
|
26
|
+
function _(e) {
|
|
27
|
+
const i = document.getElementById(e.containerId);
|
|
28
|
+
if (i) {
|
|
29
|
+
const m = R(i);
|
|
30
|
+
h(o, e.containerId, m), m.render(
|
|
31
|
+
/* @__PURE__ */ u(
|
|
32
32
|
w,
|
|
33
33
|
{
|
|
34
34
|
environment: e.environment,
|
|
@@ -38,26 +38,28 @@ function y(n) {
|
|
|
38
38
|
hostTheme: e.hostTheme,
|
|
39
39
|
formatters: e.formatter,
|
|
40
40
|
dynamicMFStore: e.dynamicMFStore,
|
|
41
|
-
moduleId:
|
|
41
|
+
moduleId: r,
|
|
42
|
+
moduleVersion: t,
|
|
42
43
|
privileges: p,
|
|
43
|
-
skeletonFlags:
|
|
44
|
-
componentsDictionary:
|
|
44
|
+
skeletonFlags: f,
|
|
45
|
+
componentsDictionary: g,
|
|
45
46
|
windowTools: e.windowTools,
|
|
46
47
|
hostRuntime: e.hostRuntime,
|
|
47
48
|
loggedUser: e.loggedUser,
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ u(l, { emergeType: e.emergeType })
|
|
49
50
|
}
|
|
50
51
|
)
|
|
51
52
|
);
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const d = ((e) => {
|
|
56
|
+
_(e);
|
|
57
|
+
});
|
|
58
|
+
d.__version = t, window[`render_v2_${o}_${r}`] = d, window[`unmount_${o}_${r}`] = (e) => {
|
|
59
|
+
const i = $(o, e);
|
|
60
|
+
i && (i.unmount(), process.env.NODE_ENV === "development" && console.debug(`unmount_${o}_${r}`, e), v(o, e));
|
|
59
61
|
}, process.env.NODE_ENV === "development" && console.debug(
|
|
60
|
-
`******* Module ESM: ${o}_${
|
|
62
|
+
`******* Module ESM: ${o}_${r} - Version ${t} loaded ******* `
|
|
61
63
|
);
|
|
62
64
|
}
|
|
63
65
|
export {
|
package/utils/index.d.ts
CHANGED
package/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/layouts/src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface MFRuntimeErrorEvent {
|
|
2
|
+
moduleId: string;
|
|
3
|
+
moduleVersion?: string;
|
|
4
|
+
error: Error;
|
|
5
|
+
componentStack?: string;
|
|
6
|
+
}
|
|
7
|
+
export type MFRuntimeErrorHandler = (event: MFRuntimeErrorEvent) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Register a host-owned handler for MF runtime errors caught inside MFHostApp.
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerMFRuntimeErrorHandler(handler: MFRuntimeErrorHandler): void;
|
|
12
|
+
/**
|
|
13
|
+
* Remove the currently registered MF runtime error handler.
|
|
14
|
+
*/
|
|
15
|
+
export declare function unregisterMFRuntimeErrorHandler(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Report a caught MF runtime error to the registered host handler, if any.
|
|
18
|
+
*/
|
|
19
|
+
export declare function reportMFRuntimeError(event: MFRuntimeErrorEvent): void;
|
|
20
|
+
//# sourceMappingURL=mfRuntimeErrors.d.ts.map
|
|
@@ -0,0 +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;AAIzE;;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,CAMrE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
let e;
|
|
2
|
+
function n(r) {
|
|
3
|
+
e = r;
|
|
4
|
+
}
|
|
5
|
+
function t() {
|
|
6
|
+
e = void 0;
|
|
7
|
+
}
|
|
8
|
+
function i(r) {
|
|
9
|
+
try {
|
|
10
|
+
e?.(r);
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
n as registerMFRuntimeErrorHandler,
|
|
16
|
+
i as reportMFRuntimeError,
|
|
17
|
+
t as unregisterMFRuntimeErrorHandler
|
|
18
|
+
};
|