@m4l/components 9.27.0 → 9.28.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/AccountPopover/AccountPopover.d.ts.map +1 -1
- package/components/AccountPopover/AccountPopover.js +1 -1
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.js +2 -2
- package/components/AccountPopover/types.d.ts +1 -1
- package/components/AccountPopover/types.d.ts.map +1 -1
- package/components/DynamicFilter/helpers/formatToRowFilter.d.ts.map +1 -1
- package/components/DynamicFilter/helpers/getRawFiltersForNetwork.d.ts +2 -2
- package/components/DynamicFilter/helpers/getRawFiltersForNetwork.d.ts.map +1 -1
- package/components/DynamicFilter/helpers/getRawFiltersForNetwork.js +13 -6
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.d.ts +1 -1
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.d.ts.map +1 -1
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +55 -39
- package/components/MFLoader/MFLoader.d.ts.map +1 -1
- package/components/MFLoader/MFLoader.js +72 -71
- package/components/MFLoader/hooks/useMFRender/types.d.ts +6 -1
- package/components/MFLoader/hooks/useMFRender/types.d.ts.map +1 -1
- package/components/MFLoader/hooks/useMFRender/useMFRender.d.ts +1 -1
- package/components/MFLoader/hooks/useMFRender/useMFRender.d.ts.map +1 -1
- package/components/MFLoader/hooks/useMFRender/useMFRender.js +33 -30
- package/components/MFLoader/types.d.ts +2 -1
- package/components/MFLoader/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/test/mocks.d.ts +2 -3
- package/test/mocks.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountPopover.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/AccountPopover/AccountPopover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAA6B,MAAM,SAAS,CAAC;AAQzE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,
|
|
1
|
+
{"version":3,"file":"AccountPopover.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/AccountPopover/AccountPopover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAA6B,MAAM,SAAS,CAAC;AAQzE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,qDAkGxD,CAAC"}
|
|
@@ -18,7 +18,7 @@ const X = (p) => {
|
|
|
18
18
|
userData: i,
|
|
19
19
|
settingsHandleOpen: S,
|
|
20
20
|
size: g
|
|
21
|
-
} = p, { avatarUrl: v, firstName: A = "firstname", lastName: z = "lastname" } = i
|
|
21
|
+
} = p, { avatarUrl: v, firstName: A = "firstname", lastName: z = "lastname" } = i, [m, n] = c("unLoad"), [t, e] = c(null), [E, l] = c([]), { networkOperation: P } = x(), { currentSize: r } = b(g), k = {
|
|
22
22
|
size: r
|
|
23
23
|
};
|
|
24
24
|
D(() => {
|
|
@@ -20,7 +20,7 @@ const se = (_) => {
|
|
|
20
20
|
size: O,
|
|
21
21
|
anchorOrigin: N = R,
|
|
22
22
|
transformOrigin: I = D
|
|
23
|
-
} = _, { host_static_assets: s, environment_assets: c } = T(), { firstName: d, lastName: m,
|
|
23
|
+
} = _, { host_static_assets: s, environment_assets: c } = T(), { firstName: d, lastName: m, id: p, avatarUrl: C } = g, { getLabel: a } = k(), n = Y().size.baseSpacings.sp2, A = (t) => {
|
|
24
24
|
S(t), o();
|
|
25
25
|
}, b = () => {
|
|
26
26
|
o(), u();
|
|
@@ -42,7 +42,7 @@ const se = (_) => {
|
|
|
42
42
|
/* @__PURE__ */ e(X, { avatarUrl: C, firstName: d || "first name", lastName: m || "last name", slotAvatar: H }),
|
|
43
43
|
/* @__PURE__ */ l(L, { children: [
|
|
44
44
|
/* @__PURE__ */ e(W, { variant: "paragraphDens", skeletonWidth: `calc(${`${d} ${m}`.length}ex + ${n})`, children: `${d} ${m}` }),
|
|
45
|
-
/* @__PURE__ */ e(G, { variant: "bodyStandard", skeletonWidth: `calc(${p
|
|
45
|
+
/* @__PURE__ */ e(G, { variant: "bodyStandard", skeletonWidth: `calc(${p.length}ex + ${n})`, children: p })
|
|
46
46
|
] })
|
|
47
47
|
] }),
|
|
48
48
|
/* @__PURE__ */ l(j, { children: [
|
|
@@ -56,7 +56,7 @@ export interface AccountPopoverProps {
|
|
|
56
56
|
/**
|
|
57
57
|
* Es una colección de datos relacionados al cliente autenticado, puede contener datos como: nombre, apellido, módulos activos entre otros.
|
|
58
58
|
*/
|
|
59
|
-
userData: UserAuth
|
|
59
|
+
userData: UserAuth;
|
|
60
60
|
/**
|
|
61
61
|
* Opción de apariencia del componente.
|
|
62
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/AccountPopover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACzD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;CACtB;AAGD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/AccountPopover/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AACzD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,aAAa,CAAC;CACtB;AAGD,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,YAAY,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IACjD;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;IAC5C;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;AACxE,MAAM,MAAM,uBAAuB,GAAI,MAAM,OAAO,mBAAmB,CAAC;AACxE,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,uBAAuB,EAAE,OAAO,mBAAmB,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatToRowFilter.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/formatToRowFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"formatToRowFilter.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/formatToRowFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,gBAAgB,KAAK,CAAC,kBAAkB,CAAC,KACxC,KAAK,CAAC,mBAAmB,CA8B3B,CAAC"}
|
|
@@ -5,10 +5,10 @@ type FieldNameTransform = 'none' | 'snakeCase' | 'camelCase';
|
|
|
5
5
|
* depurando los campos que no son necesarios y convirtiendo los nombres de los campos a snake_case, camelCase si es necesario
|
|
6
6
|
*/
|
|
7
7
|
export declare const getRawFiltersForNetwork: (rawFilters: RawFilterFieldApply[] | undefined, fieldNameTransform?: FieldNameTransform) => {
|
|
8
|
+
o1: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
9
|
+
o2: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
8
10
|
n: string;
|
|
9
11
|
o: import('../types').Operator;
|
|
10
|
-
o1: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
11
|
-
o2?: import('@m4l/core').Maybe<import('../types').OperandType>;
|
|
12
12
|
oa?: import('@m4l/core').Maybe<import('../types').OperandType[]>;
|
|
13
13
|
}[];
|
|
14
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRawFiltersForNetwork.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/getRawFiltersForNetwork.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"getRawFiltersForNetwork.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/getRawFiltersForNetwork.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;AAgB7D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,YAAY,mBAAmB,EAAE,GAAG,SAAS,EAC7C,qBAAoB,kBAA2B;;;;;;GAqBtF,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import s from "lodash-es/snakeCase";
|
|
2
|
+
import c from "lodash-es/camelCase";
|
|
3
|
+
function i(n, e) {
|
|
4
|
+
return n === "datetime" && e instanceof Date ? e.toISOString() : e;
|
|
5
|
+
}
|
|
6
|
+
const l = (n, e = "none") => n ? n.map((a) => {
|
|
7
|
+
const { ft: r, ...o } = a, t = {
|
|
8
|
+
...o,
|
|
9
|
+
o1: i(r, o.o1),
|
|
10
|
+
o2: i(r, o.o2)
|
|
11
|
+
};
|
|
12
|
+
return e === "snakeCase" ? t.n = s(t.n) : e === "camelCase" && (t.n = c(t.n)), t;
|
|
6
13
|
}) : [];
|
|
7
14
|
export {
|
|
8
|
-
|
|
15
|
+
l as getRawFiltersForNetwork
|
|
9
16
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MFAuthAppProps } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Mount the authenticated isolation shell with the effective user-preferences contract.
|
|
4
4
|
*/
|
|
5
5
|
export declare function MFAuthApp(props: MFAuthAppProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
6
|
//# sourceMappingURL=MFAuthApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MFAuthApp.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MFAuthApp.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,oDA4G9C"}
|
|
@@ -1,47 +1,63 @@
|
|
|
1
1
|
import { jsx as o } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useEffect as l } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
import { useState as d, useRef as y, useMemo as m, useEffect as l } from "react";
|
|
3
|
+
import { useAuth as C, useNetwork as R, useLocalStorage as b, normalizeUserPreferences as p, UserPreferencesProvider as w } from "@m4l/core";
|
|
4
|
+
import { KEY_LOCAL_STORAGE_THEME_SETTINGS as _, defaultThemeSettings as x, buildFormattersFromUserPreferences as G, HostThemeProvider as I, FormatterProvider as L } from "@m4l/graphics";
|
|
5
|
+
import { getUserThemeOptions as k, fnComponentsOverrides as z } from "@m4l/styles";
|
|
6
|
+
function Y(h) {
|
|
7
|
+
const { children: P, user: E, pwd: T } = h, { isAuthenticated: e, isInitialized: t, login: v, user: c } = C(), { networkOperation: a } = R(), [u] = b(_, x), [U, n] = d(void 0), [A, r] = d(!1), i = y(!1), F = m(() => p(), []);
|
|
8
|
+
l(() => {
|
|
9
|
+
t && e === !1 && v(E, T, !1);
|
|
10
|
+
}, [t, e]), l(() => {
|
|
11
|
+
if (!t) {
|
|
12
|
+
r(!1);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!e || !c) {
|
|
16
|
+
i.current = !1, n(void 0), r(e === !1);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (i.current) {
|
|
20
|
+
r(!0);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let s = !1;
|
|
24
|
+
return n(void 0), r(!1), (async () => {
|
|
25
|
+
try {
|
|
26
|
+
const O = await a({
|
|
27
|
+
method: "GET",
|
|
28
|
+
endPoint: "users/me/preferences",
|
|
29
|
+
responseToCamelCase: !0
|
|
30
|
+
});
|
|
31
|
+
if (s)
|
|
32
|
+
return;
|
|
33
|
+
const g = p(O?.data);
|
|
34
|
+
n(g);
|
|
35
|
+
} catch {
|
|
36
|
+
if (s)
|
|
37
|
+
return;
|
|
38
|
+
} finally {
|
|
39
|
+
s || (i.current = !0, r(!0));
|
|
40
|
+
}
|
|
41
|
+
})(), () => {
|
|
42
|
+
s = !0;
|
|
43
|
+
};
|
|
44
|
+
}, [
|
|
45
|
+
c,
|
|
46
|
+
e,
|
|
47
|
+
t,
|
|
48
|
+
a
|
|
49
|
+
]);
|
|
50
|
+
const f = U ?? F, M = m(() => G(f), [f]), S = k(u.themeMode, u.themeColor);
|
|
51
|
+
return !e || !A ? /* @__PURE__ */ o("div", { children: "Pendiente por autenticarse" }) : /* @__PURE__ */ o(
|
|
52
|
+
I,
|
|
24
53
|
{
|
|
25
|
-
hostThemeOptions:
|
|
26
|
-
fnComponentsOverrides:
|
|
54
|
+
hostThemeOptions: S,
|
|
55
|
+
fnComponentsOverrides: z,
|
|
27
56
|
isMicroFrontEnd: !0,
|
|
28
|
-
children: /* @__PURE__ */ o(
|
|
29
|
-
E,
|
|
30
|
-
{
|
|
31
|
-
isMicroFrontEnd: !1,
|
|
32
|
-
dateFormatter: {
|
|
33
|
-
formatDate: y
|
|
34
|
-
},
|
|
35
|
-
currencyFormatter: {
|
|
36
|
-
code: r.currency,
|
|
37
|
-
decimalDigits: r.currency_decimal_digits
|
|
38
|
-
},
|
|
39
|
-
children: m
|
|
40
|
-
}
|
|
41
|
-
) })
|
|
57
|
+
children: /* @__PURE__ */ o(w, { isMicroFrontEnd: !1, ...f, children: /* @__PURE__ */ o(L, { isMicroFrontEnd: !1, ...M, children: P }) })
|
|
42
58
|
}
|
|
43
59
|
);
|
|
44
60
|
}
|
|
45
61
|
export {
|
|
46
|
-
|
|
62
|
+
Y as MFAuthApp
|
|
47
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MFLoader.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/MFLoader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MFLoader.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/MFLoader.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,aAAa,EAAU,MAAM,SAAS,CAAC;AAehD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,oDAoP5C;AACD,eAAe,QAAQ,CAAC"}
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useNetwork as
|
|
4
|
-
import { useHostTheme as
|
|
5
|
-
import { ProggessLoadingMF as
|
|
6
|
-
import { LoadingError as
|
|
7
|
-
import { useHostRuntime as
|
|
8
|
-
import { useShellObservability as
|
|
9
|
-
import { projectMFHostRuntimeTools as
|
|
10
|
-
import { useMFTelemetry as
|
|
11
|
-
import { useMFSwap as
|
|
12
|
-
import { useMFLifecycle as
|
|
13
|
-
import { useMFRender as
|
|
14
|
-
import { MFLoaderRootStyled as
|
|
15
|
-
function
|
|
1
|
+
import { jsxs as ee, jsx as r } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useEffect as te } from "react";
|
|
3
|
+
import { useNetwork as re, useEnvironment as oe, useHostTools as se, useUserPreferences as ne, resolveLocalLoopbackOrigin as ie } from "@m4l/core";
|
|
4
|
+
import { useHostTheme as ce, useFormatter as de, useLocales as ae } from "@m4l/graphics";
|
|
5
|
+
import { ProggessLoadingMF as le } from "./subcomponents/ProggessLoadingMF/index.js";
|
|
6
|
+
import { LoadingError as ue } from "../LoadingError/LoadingError.js";
|
|
7
|
+
import { useHostRuntime as me } from "../../contexts/HostRuntimeContext/HostRuntimeContext.js";
|
|
8
|
+
import { useShellObservability as pe } from "../../contexts/ShellObservabilityContext/ShellObservabilityContext.js";
|
|
9
|
+
import { projectMFHostRuntimeTools as fe } from "./helpers/projectMFHostRuntimeTools/projectMFHostRuntimeTools.js";
|
|
10
|
+
import { useMFTelemetry as Le } from "./hooks/useMFTelemetry/useMFTelemetry.js";
|
|
11
|
+
import { useMFSwap as Se } from "./hooks/useMFSwap/useMFSwap.js";
|
|
12
|
+
import { useMFLifecycle as he } from "./hooks/useMFLifecycle/useMFLifecycle.js";
|
|
13
|
+
import { useMFRender as ge } from "./hooks/useMFRender/useMFRender.js";
|
|
14
|
+
import { MFLoaderRootStyled as ve, MFLoaderMountContainerStyled as T, MFLoaderOverlayStyled as O } from "./slots/MFLoaderSlots.js";
|
|
15
|
+
function je(I) {
|
|
16
16
|
const {
|
|
17
|
-
prefix:
|
|
17
|
+
prefix: o,
|
|
18
18
|
moduleId: C,
|
|
19
|
-
cache:
|
|
20
|
-
debugPort:
|
|
19
|
+
cache: d = !0,
|
|
20
|
+
debugPort: s,
|
|
21
21
|
hostRuntime: H,
|
|
22
|
-
observability:
|
|
23
|
-
dynamicMFStore:
|
|
24
|
-
windowTools:
|
|
25
|
-
emergeType:
|
|
22
|
+
observability: P,
|
|
23
|
+
dynamicMFStore: x,
|
|
24
|
+
windowTools: E,
|
|
25
|
+
emergeType: q,
|
|
26
26
|
loggedUser: j
|
|
27
|
-
} = I, k =
|
|
27
|
+
} = I, k = me(), G = pe(), V = fe(H ?? k), A = P ?? G, { hostThemeOptions: B, fnComponentsOverrides: N } = ce(), { networkOperation: U } = re(), n = oe(), $ = se(), D = ne(), z = de(), J = { hostThemeOptions: B, fnComponentsOverrides: N }, p = c(null), f = c(null), L = c("progress"), S = c(
|
|
28
28
|
null
|
|
29
|
-
), { currentLocale:
|
|
29
|
+
), { currentLocale: K } = ae(), Q = !n.isLocalhost || Number.isInteger(s) && s > 0, {
|
|
30
30
|
activeSwapRef: h,
|
|
31
31
|
createTelemetryContext: a,
|
|
32
|
-
emitAbandonedLoadTelemetry:
|
|
32
|
+
emitAbandonedLoadTelemetry: W,
|
|
33
33
|
emitSwapStartedTelemetry: g,
|
|
34
34
|
emitSwapFailedTelemetry: l,
|
|
35
35
|
reportLoaderError: v
|
|
36
|
-
} =
|
|
37
|
-
cache:
|
|
38
|
-
prefix:
|
|
36
|
+
} = Le({
|
|
37
|
+
cache: d,
|
|
38
|
+
prefix: o,
|
|
39
39
|
mountedScriptRefBridge: p,
|
|
40
40
|
requestedScriptRefBridge: f,
|
|
41
41
|
setStatusLoaderRef: S,
|
|
42
42
|
statusLoaderRef: L
|
|
43
43
|
}), {
|
|
44
|
-
mountedScript:
|
|
44
|
+
mountedScript: u,
|
|
45
45
|
requestedScript: e,
|
|
46
|
-
isSwappingModule:
|
|
46
|
+
isSwappingModule: X,
|
|
47
47
|
mountedScriptRef: R,
|
|
48
48
|
requestedScriptRef: y,
|
|
49
49
|
promoteRequestedScript: b
|
|
50
|
-
} =
|
|
50
|
+
} = Se({
|
|
51
51
|
activeSwapRef: h,
|
|
52
|
-
cache:
|
|
52
|
+
cache: d,
|
|
53
53
|
createTelemetryContext: a,
|
|
54
|
-
emitAbandonedLoadTelemetry:
|
|
54
|
+
emitAbandonedLoadTelemetry: W,
|
|
55
55
|
emitSwapFailedTelemetry: l,
|
|
56
56
|
emitSwapStartedTelemetry: g,
|
|
57
57
|
moduleId: C,
|
|
58
|
-
prefix:
|
|
58
|
+
prefix: o,
|
|
59
59
|
reportLoaderError: v
|
|
60
60
|
});
|
|
61
61
|
p.current = R, f.current = y;
|
|
62
|
-
const
|
|
62
|
+
const Y = n.isLocalhost ? ie(s) : `https://${window.location.host}/mf/${e.moduleId}`, {
|
|
63
63
|
statusLoader: t,
|
|
64
64
|
setStatusLoader: F,
|
|
65
|
-
loadingProgress:
|
|
66
|
-
tryAgainOnError:
|
|
65
|
+
loadingProgress: Z,
|
|
66
|
+
tryAgainOnError: _,
|
|
67
67
|
loadGeneration: i,
|
|
68
68
|
completedGeneration: M,
|
|
69
|
-
renderedGeneration:
|
|
70
|
-
} =
|
|
71
|
-
activeHost:
|
|
72
|
-
cache:
|
|
69
|
+
renderedGeneration: m
|
|
70
|
+
} = he({
|
|
71
|
+
activeHost: Y,
|
|
72
|
+
cache: d,
|
|
73
73
|
createTelemetryContext: a,
|
|
74
|
-
environmentIsLocalhost:
|
|
75
|
-
hasValidLocalDebugPort:
|
|
74
|
+
environmentIsLocalhost: n.isLocalhost,
|
|
75
|
+
hasValidLocalDebugPort: Q,
|
|
76
76
|
mountedScriptRef: R,
|
|
77
|
-
networkOperation:
|
|
78
|
-
prefix:
|
|
77
|
+
networkOperation: U,
|
|
78
|
+
prefix: o,
|
|
79
79
|
requestedScript: e,
|
|
80
80
|
requestedScriptRef: y,
|
|
81
81
|
activeSwapRef: h,
|
|
@@ -83,18 +83,19 @@ function qe(I) {
|
|
|
83
83
|
emitSwapStartedTelemetry: g
|
|
84
84
|
});
|
|
85
85
|
L.current = t, S.current = F;
|
|
86
|
-
const { renderMicroFrontend: w } =
|
|
87
|
-
prefix:
|
|
88
|
-
debugPort:
|
|
89
|
-
dynamicMFStore:
|
|
90
|
-
windowTools:
|
|
91
|
-
emergeType:
|
|
86
|
+
const { renderMicroFrontend: w } = ge({
|
|
87
|
+
prefix: o,
|
|
88
|
+
debugPort: s,
|
|
89
|
+
dynamicMFStore: x,
|
|
90
|
+
windowTools: E,
|
|
91
|
+
emergeType: q,
|
|
92
92
|
loggedUser: j,
|
|
93
|
-
environment:
|
|
94
|
-
hostTools:
|
|
95
|
-
currentLocale:
|
|
96
|
-
hostTheme:
|
|
97
|
-
formatter:
|
|
93
|
+
environment: n,
|
|
94
|
+
hostTools: $,
|
|
95
|
+
currentLocale: K,
|
|
96
|
+
hostTheme: J,
|
|
97
|
+
formatter: z,
|
|
98
|
+
userPreferences: D,
|
|
98
99
|
resolvedHostRuntime: V,
|
|
99
100
|
resolvedObservability: A,
|
|
100
101
|
reportLoaderError: v,
|
|
@@ -102,32 +103,32 @@ function qe(I) {
|
|
|
102
103
|
setStatusLoader: F,
|
|
103
104
|
createTelemetryContext: a
|
|
104
105
|
});
|
|
105
|
-
return
|
|
106
|
-
if (t === "complete" && M.current === i.current &&
|
|
106
|
+
return te(() => {
|
|
107
|
+
if (t === "complete" && M.current === i.current && m.current !== i.current) {
|
|
107
108
|
if (!w(e))
|
|
108
109
|
return;
|
|
109
|
-
|
|
110
|
+
m.current = i.current, b();
|
|
110
111
|
}
|
|
111
112
|
}, [
|
|
112
113
|
M,
|
|
113
114
|
i,
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
u,
|
|
116
|
+
o,
|
|
116
117
|
b,
|
|
117
118
|
w,
|
|
118
|
-
|
|
119
|
+
m,
|
|
119
120
|
e,
|
|
120
121
|
t
|
|
121
|
-
]), /* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
]), /* @__PURE__ */ ee(ve, { children: [
|
|
123
|
+
/* @__PURE__ */ r(
|
|
123
124
|
T,
|
|
124
125
|
{
|
|
125
|
-
id:
|
|
126
|
+
id: u.divContainerId,
|
|
126
127
|
ownerState: { isVisible: !0 }
|
|
127
128
|
},
|
|
128
|
-
|
|
129
|
+
u.divContainerId
|
|
129
130
|
),
|
|
130
|
-
|
|
131
|
+
X ? /* @__PURE__ */ r(
|
|
131
132
|
T,
|
|
132
133
|
{
|
|
133
134
|
id: e.divContainerId,
|
|
@@ -135,11 +136,11 @@ function qe(I) {
|
|
|
135
136
|
},
|
|
136
137
|
e.divContainerId
|
|
137
138
|
) : null,
|
|
138
|
-
t === "progress" ? /* @__PURE__ */
|
|
139
|
-
t === "error" ? /* @__PURE__ */
|
|
139
|
+
t === "progress" ? /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(le, { loadingProgress: Z }) }) : null,
|
|
140
|
+
t === "error" ? /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(ue, { status: t, action: _ }) }) : null
|
|
140
141
|
] });
|
|
141
142
|
}
|
|
142
143
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
je as MFLoader,
|
|
145
|
+
je as default
|
|
145
146
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthUserType, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
1
|
+
import { AuthUserType, EnvironmentType, HostToolsType, UserPreferences } from '@m4l/core';
|
|
2
2
|
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
3
3
|
import { DynamicMFStore } from '../../../WindowBase/contexts/DynamicMFParmsContext/store';
|
|
4
4
|
import { WindowToolsMF } from '../../../WindowBase/contexts';
|
|
@@ -65,6 +65,11 @@ export interface UseMFRenderArgs {
|
|
|
65
65
|
* Conjunto de formatters reenviado al contrato de render del MF.
|
|
66
66
|
*/
|
|
67
67
|
formatter: Formatters;
|
|
68
|
+
/**
|
|
69
|
+
* Effective user-preferences snapshot forwarded into the MF render contract.
|
|
70
|
+
* Snapshot efectivo de preferencias de usuario reenviado al contrato de render del MF.
|
|
71
|
+
*/
|
|
72
|
+
userPreferences: UserPreferences;
|
|
68
73
|
/**
|
|
69
74
|
* Optional host runtime capability bag exposed to the MF instance.
|
|
70
75
|
* Contenedor opcional de capacidades de runtime del host expuesto a la instancia del MF.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/hooks/useMFRender/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,aAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MF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iB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D;;;OAGG;IACH,uBAAuB,EAAE,CACvB,aAAa,EAAE,uBAAuB,EACtC,aAAa,CAAC,EAAE,MAAM,KACnB,IAAI,CAAC;IACV;;;OAGG;IACH,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,OAAO,KAAK,IAAI,CAAC;IACrE;;;OAGG;IACH,sBAAsB,EAAE,wBAAwB,CAAC;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CACpD"}
|
|
@@ -3,5 +3,5 @@ import { UseMFRenderArgs, UseMFRenderResult } from './types.js';
|
|
|
3
3
|
* Assemble the MF render contract and execute the registered render global.
|
|
4
4
|
* Ensambla el contrato de render del MF y ejecuta el global de render registrado.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useMFRender({ prefix, debugPort, dynamicMFStore, windowTools, emergeType, loggedUser, environment, hostTools, currentLocale, hostTheme, formatter, resolvedHostRuntime, resolvedObservability, reportLoaderError, emitSwapFailedTelemetry, setStatusLoader, createTelemetryContext, }: UseMFRenderArgs): UseMFRenderResult;
|
|
6
|
+
export declare function useMFRender({ prefix, debugPort, dynamicMFStore, windowTools, emergeType, loggedUser, environment, hostTools, currentLocale, hostTheme, formatter, userPreferences, resolvedHostRuntime, resolvedObservability, reportLoaderError, emitSwapFailedTelemetry, setStatusLoader, createTelemetryContext, }: UseMFRenderArgs): UseMFRenderResult;
|
|
7
7
|
//# sourceMappingURL=useMFRender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMFRender.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/hooks/useMFRender/useMFRender.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAYpB;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,GACvB,EAAE,eAAe,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useMFRender.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/MFLoader/hooks/useMFRender/useMFRender.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAYpB;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,GACvB,EAAE,eAAe,GAAG,iBAAiB,CAsKrC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { axiosOperation as
|
|
3
|
-
import { getMFObservableLoader as
|
|
4
|
-
import { emitFrontendTelemetry as
|
|
5
|
-
function
|
|
1
|
+
import { useCallback as k } from "react";
|
|
2
|
+
import { axiosOperation as C } from "@m4l/core";
|
|
3
|
+
import { getMFObservableLoader as $, getMFRenderFunction as w } from "../../helpers/mfWindowRegistry/mfWindowRegistry.js";
|
|
4
|
+
import { emitFrontendTelemetry as m } from "../../helpers/emitFrontendTelemetry/emitFrontendTelemetry.js";
|
|
5
|
+
function V(e) {
|
|
6
6
|
const n = Reflect.get(e, "__version");
|
|
7
7
|
return typeof n == "string" ? n : void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function z({
|
|
10
10
|
prefix: e,
|
|
11
11
|
debugPort: n,
|
|
12
|
-
dynamicMFStore:
|
|
12
|
+
dynamicMFStore: s,
|
|
13
13
|
windowTools: f,
|
|
14
14
|
emergeType: p,
|
|
15
15
|
loggedUser: M,
|
|
@@ -18,19 +18,20 @@ function q({
|
|
|
18
18
|
currentLocale: I,
|
|
19
19
|
hostTheme: g,
|
|
20
20
|
formatter: F,
|
|
21
|
+
userPreferences: R,
|
|
21
22
|
resolvedHostRuntime: u,
|
|
22
23
|
resolvedObservability: c,
|
|
23
|
-
reportLoaderError:
|
|
24
|
+
reportLoaderError: S,
|
|
24
25
|
emitSwapFailedTelemetry: i,
|
|
25
|
-
setStatusLoader:
|
|
26
|
-
createTelemetryContext:
|
|
26
|
+
setStatusLoader: v,
|
|
27
|
+
createTelemetryContext: A
|
|
27
28
|
}) {
|
|
28
|
-
return { renderMicroFrontend:
|
|
29
|
+
return { renderMicroFrontend: k(
|
|
29
30
|
(r) => {
|
|
30
|
-
const l =
|
|
31
|
+
const l = A(r.moduleId, e), o = $(
|
|
31
32
|
e,
|
|
32
33
|
r.moduleId
|
|
33
|
-
)?.consumeResolvedLoadTelemetry(),
|
|
34
|
+
)?.consumeResolvedLoadTelemetry(), x = {
|
|
34
35
|
containerId: r.divContainerId,
|
|
35
36
|
environment: {
|
|
36
37
|
..._,
|
|
@@ -40,33 +41,34 @@ function q({
|
|
|
40
41
|
hostTools: D,
|
|
41
42
|
currentLocale: I,
|
|
42
43
|
hostTheme: g,
|
|
43
|
-
axiosOperation:
|
|
44
|
+
axiosOperation: C,
|
|
44
45
|
formatter: F,
|
|
45
|
-
|
|
46
|
+
userPreferences: R,
|
|
47
|
+
dynamicMFStore: s,
|
|
46
48
|
windowTools: f,
|
|
47
49
|
...u ? { hostRuntime: u } : {},
|
|
48
50
|
...c ? { observability: c } : {},
|
|
49
51
|
loggedUser: M,
|
|
50
52
|
emergeType: p
|
|
51
|
-
}, a =
|
|
53
|
+
}, a = w(e, r.moduleId);
|
|
52
54
|
if (typeof a != "function")
|
|
53
|
-
return o &&
|
|
55
|
+
return o && m({
|
|
54
56
|
type: "module_load_failed",
|
|
55
57
|
context: l,
|
|
56
58
|
loadSource: o.loadSource,
|
|
57
59
|
attempt: o.attempt,
|
|
58
60
|
totalDurationMs: performance.now() - o.loadStartedAt,
|
|
59
61
|
failureReason: "render_function_missing"
|
|
60
|
-
}), i("render_function_missing"),
|
|
62
|
+
}), i("render_function_missing"), v("error"), !1;
|
|
61
63
|
try {
|
|
62
64
|
const t = performance.now();
|
|
63
|
-
if (a(
|
|
64
|
-
const d = performance.now(),
|
|
65
|
-
|
|
65
|
+
if (a(x), o) {
|
|
66
|
+
const d = performance.now(), y = V(a) ?? "unknown";
|
|
67
|
+
m({
|
|
66
68
|
type: "module_load_succeeded",
|
|
67
69
|
context: {
|
|
68
70
|
...l,
|
|
69
|
-
moduleVersion:
|
|
71
|
+
moduleVersion: y
|
|
70
72
|
},
|
|
71
73
|
loadSource: o.loadSource,
|
|
72
74
|
attempt: o.attempt,
|
|
@@ -79,8 +81,8 @@ function q({
|
|
|
79
81
|
return !0;
|
|
80
82
|
} catch (t) {
|
|
81
83
|
if (o) {
|
|
82
|
-
const d =
|
|
83
|
-
|
|
84
|
+
const d = V(a);
|
|
85
|
+
m({
|
|
84
86
|
type: "module_load_failed",
|
|
85
87
|
context: {
|
|
86
88
|
...l,
|
|
@@ -96,17 +98,17 @@ function q({
|
|
|
96
98
|
return i(
|
|
97
99
|
"render_exception",
|
|
98
100
|
t instanceof Error ? t.message : void 0
|
|
99
|
-
),
|
|
101
|
+
), S(
|
|
100
102
|
`MFLoader render contract execution failed for ${e}/${r.moduleId}`,
|
|
101
103
|
t
|
|
102
104
|
), !1;
|
|
103
105
|
}
|
|
104
106
|
},
|
|
105
107
|
[
|
|
106
|
-
|
|
108
|
+
A,
|
|
107
109
|
I,
|
|
108
110
|
n,
|
|
109
|
-
|
|
111
|
+
s,
|
|
110
112
|
i,
|
|
111
113
|
p,
|
|
112
114
|
_,
|
|
@@ -115,14 +117,15 @@ function q({
|
|
|
115
117
|
D,
|
|
116
118
|
M,
|
|
117
119
|
e,
|
|
118
|
-
|
|
120
|
+
S,
|
|
119
121
|
c,
|
|
120
122
|
u,
|
|
121
|
-
|
|
123
|
+
v,
|
|
124
|
+
R,
|
|
122
125
|
f
|
|
123
126
|
]
|
|
124
127
|
) };
|
|
125
128
|
}
|
|
126
129
|
export {
|
|
127
|
-
|
|
130
|
+
z as useMFRender
|
|
128
131
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DynamicMFStore } from '../WindowBase/contexts/DynamicMFParmsContext/store';
|
|
2
2
|
import { WindowToolsMF } from '../WindowBase/contexts';
|
|
3
3
|
import { EmergeType } from '../areas/types';
|
|
4
|
-
import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
4
|
+
import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType, UserPreferences } from '@m4l/core';
|
|
5
5
|
import { Formatters, HostThemeType, LocaleType } from '@m4l/graphics';
|
|
6
6
|
import { Theme } from '@mui/material';
|
|
7
7
|
import { FrontendTelemetryContext, MFObservabilityService } from '../../../../../out-tsc/libs/observability/mf/index.d.ts';
|
|
@@ -246,6 +246,7 @@ export interface MFRenderContract {
|
|
|
246
246
|
hostTheme: HostThemeType;
|
|
247
247
|
axiosOperation: AxiosOperation;
|
|
248
248
|
formatter: Formatters;
|
|
249
|
+
userPreferences?: UserPreferences;
|
|
249
250
|
dynamicMFStore: DynamicMFStore;
|
|
250
251
|
windowTools: WindowToolsMF;
|
|
251
252
|
hostRuntime?: MFHostRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/MFLoader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oDAAoD,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;;;;;;;;;OAWG;IACH,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,CAAC;IACtC;;;;;;OAMG;IACH,2BAA2B,EAAE,CAAC,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 @@
|
|
|
51
51
|
"@hookform/resolvers": "2.9.11",
|
|
52
52
|
"nprogress": "0.2.0",
|
|
53
53
|
"react-transition-group": "4.4.5",
|
|
54
|
-
"react-color": "2.19.3",
|
|
55
54
|
"react-rnd": "10.5.2",
|
|
56
|
-
"react-draggable": "4.5.0",
|
|
57
|
-
"react-dropzone": "14.4.1",
|
|
58
55
|
"@mui/x-date-pickers": "6.20.2",
|
|
56
|
+
"react-color": "2.19.3",
|
|
57
|
+
"react-draggable": "4.5.0",
|
|
59
58
|
"react-spinners": "0.13.8",
|
|
60
|
-
"
|
|
61
|
-
"simplebar-react": "3.2.6",
|
|
62
|
-
"react-resizable-panels": "2.1.9",
|
|
59
|
+
"react-dropzone": "14.4.1",
|
|
63
60
|
"chart.js": "4.5.1",
|
|
64
61
|
"chartjs-chart-error-bars": "4.4.5",
|
|
65
62
|
"qrcode.react": "3.2.0",
|
|
63
|
+
"simplebar-react": "3.2.6",
|
|
64
|
+
"react-resizable-panels": "2.1.9",
|
|
66
65
|
"react-data-grid": "7.0.0-beta.47",
|
|
67
66
|
"react-dnd": "16.0.1",
|
|
68
67
|
"react-dnd-html5-backend": "16.0.1",
|
|
68
|
+
"date-fns": "2.30.0",
|
|
69
69
|
"react-resizable": "3.1.3",
|
|
70
70
|
"react-window": "1.8.11",
|
|
71
71
|
"@tanstack/react-virtual": "3.13.23"
|
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,7 +20,7 @@ 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
|
/**
|
|
@@ -29,6 +28,6 @@ export declare function restoreGraphicsMocked(): void;
|
|
|
29
28
|
*/
|
|
30
29
|
export declare const coreImplementation: typeof core;
|
|
31
30
|
export declare const graphicsImplementation: {
|
|
32
|
-
useFormatter: Mock<() => import('
|
|
31
|
+
useFormatter: Mock<() => import('../../../../dist/packages/@m4l/graphics/contexts/FormatterContext/types').FormatterContextProps>;
|
|
33
32
|
};
|
|
34
33
|
//# sourceMappingURL=mocks.d.ts.map
|
package/test/mocks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/components/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/components/src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAM,MAAM,QAAQ,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,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;AAoBD;;GAEG;AASH,eAAO,MAAM,kBAAkB,aAAO,CAAC;AACvC,eAAO,MAAM,sBAAsB;;CAAiB,CAAC"}
|