@m4l/components 9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.0 → 9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.1
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/MFLoader/MFLoader.d.ts.map +1 -1
- package/components/MFLoader/MFLoader.js +112 -124
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.d.ts.map +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +47 -49
- package/components/areas/contexts/AreasContext/index.d.ts.map +1 -1
- package/components/areas/contexts/AreasContext/index.js +28 -29
- package/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.d.ts +2 -2
- package/components/extended/mui/AutocompleteAsync/tests/support/mockAutocompleteAnchor.d.ts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +222 -235
- package/package.json +9 -9
- package/components/MFLoader/hooks/useMFCallbackLifecycle.d.ts +0 -6
- package/components/MFLoader/hooks/useMFCallbackLifecycle.d.ts.map +0 -1
- package/components/MFLoader/hooks/useMFCallbackLifecycle.js +0 -25
- package/components/areas/components/AreasViewer/test/popupAuthenticationConstants.d.ts +0 -4
- package/components/areas/components/AreasViewer/test/popupAuthenticationConstants.d.ts.map +0 -1
- package/components/areas/contexts/AreasContext/tests/mfActionSupport.d.ts +0 -22
- package/components/areas/contexts/AreasContext/tests/mfActionSupport.d.ts.map +0 -1
- package/components/areas/contexts/AreasContext/useMFActionLifecycle.d.ts +0 -4
- package/components/areas/contexts/AreasContext/useMFActionLifecycle.d.ts.map +0 -1
- package/components/areas/contexts/AreasContext/useMFActionLifecycle.js +0 -49
- package/utils/mfActions/constants.d.ts +0 -6
- package/utils/mfActions/constants.d.ts.map +0 -1
- package/utils/mfActions/constants.js +0 -8
- package/utils/mfActions/index.d.ts +0 -5
- package/utils/mfActions/index.d.ts.map +0 -1
- package/utils/mfActions/mfActions.d.ts +0 -10
- package/utils/mfActions/mfActions.d.ts.map +0 -1
- package/utils/mfActions/mfActions.js +0 -47
- package/utils/mfActions/openMFCallbackAction.d.ts +0 -4
- package/utils/mfActions/openMFCallbackAction.d.ts.map +0 -1
- package/utils/mfActions/openMFCallbackAction.js +0 -36
- package/utils/mfActions/tests/callbackHelpers.d.ts +0 -9
- package/utils/mfActions/tests/callbackHelpers.d.ts.map +0 -1
- package/utils/mfActions/tests/constants.d.ts +0 -6
- package/utils/mfActions/tests/constants.d.ts.map +0 -1
- package/utils/mfActions/tests/helpers.d.ts +0 -4
- package/utils/mfActions/tests/helpers.d.ts.map +0 -1
- package/utils/mfActions/tests/types.d.ts +0 -8
- package/utils/mfActions/tests/types.d.ts.map +0 -1
- package/utils/mfActions/types.d.ts +0 -47
- package/utils/mfActions/types.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.
|
|
3
|
+
"version": "9.80.1-beta-docs-autocomplete-async-with-add-mf-sync.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,24 +53,24 @@
|
|
|
53
53
|
"@hookform/resolvers": "2.9.11",
|
|
54
54
|
"nprogress": "0.2.0",
|
|
55
55
|
"react-transition-group": "4.4.5",
|
|
56
|
-
"@tanstack/react-virtual": "3.13.23",
|
|
57
56
|
"react-color": "2.19.3",
|
|
57
|
+
"react-draggable": "4.5.0",
|
|
58
|
+
"@tanstack/react-virtual": "3.13.23",
|
|
59
|
+
"react-spinners": "0.13.8",
|
|
58
60
|
"@mui/x-date-pickers": "6.20.2",
|
|
59
61
|
"react-rnd": "10.5.2",
|
|
60
|
-
"react-spinners": "0.13.8",
|
|
61
62
|
"react-dropzone": "14.4.1",
|
|
62
|
-
"react-draggable": "4.5.0",
|
|
63
63
|
"chart.js": "4.5.1",
|
|
64
64
|
"chartjs-chart-error-bars": "4.4.5",
|
|
65
65
|
"qrcode.react": "3.2.0",
|
|
66
|
+
"simplebar-react": "3.2.6",
|
|
67
|
+
"react-resizable-panels": "2.1.9",
|
|
68
|
+
"react-simple-code-editor": "0.14.1",
|
|
66
69
|
"react-data-grid": "7.0.0-beta.47",
|
|
67
70
|
"react-dnd": "16.0.1",
|
|
68
71
|
"react-dnd-html5-backend": "16.0.1",
|
|
69
|
-
"react-resizable-panels": "2.1.9",
|
|
70
|
-
"react-simple-code-editor": "0.14.1",
|
|
71
|
-
"simplebar-react": "3.2.6",
|
|
72
72
|
"date-fns": "2.30.0",
|
|
73
|
-
"react-
|
|
74
|
-
"react-
|
|
73
|
+
"react-window": "1.8.11",
|
|
74
|
+
"react-resizable": "3.1.3"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deliver local loader lifecycle results without subscribing to or publishing host action events.
|
|
3
|
-
* Entrega el ciclo de vida local sin suscribirse ni publicar eventos de acción del host.
|
|
4
|
-
*/
|
|
5
|
-
export declare function useMFCallbackLifecycle(value: unknown, failed: boolean, close: (guard?: boolean) => void): void;
|
|
6
|
-
//# sourceMappingURL=useMFCallbackLifecycle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMFCallbackLifecycle.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/MFLoader/hooks/useMFCallbackLifecycle.ts"],"names":[],"mappings":"AAcA;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,QAwBvG"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useRef as i, useEffect as c } from "react";
|
|
2
|
-
function f(n) {
|
|
3
|
-
return !n || typeof n != "object" ? !1 : "onOpened" in n && typeof n.onOpened == "function" && "onClosed" in n && typeof n.onClosed == "function" && "onLoadError" in n && typeof n.onLoadError == "function";
|
|
4
|
-
}
|
|
5
|
-
function d(n, t, e) {
|
|
6
|
-
const o = f(n) ? n : void 0, r = i(void 0);
|
|
7
|
-
c(() => {
|
|
8
|
-
if (o)
|
|
9
|
-
return r.current = o, o.onOpened(), () => {
|
|
10
|
-
r.current = void 0, queueMicrotask(() => {
|
|
11
|
-
r.current !== o && o.onClosed();
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
}, [o]), c(() => {
|
|
15
|
-
if (!(!t || !o))
|
|
16
|
-
try {
|
|
17
|
-
o.onLoadError();
|
|
18
|
-
} finally {
|
|
19
|
-
e(!1);
|
|
20
|
-
}
|
|
21
|
-
}, [o, t, e]);
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
d as useMFCallbackLifecycle
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popupAuthenticationConstants.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/components/AreasViewer/test/popupAuthenticationConstants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,eAAO,MAAM,qBAAqB,EAAE,QAOnC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAOlC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/** Wire the real logical and visual popup registries without rendering geometry-dependent UI. */
|
|
2
|
-
export declare function createActionAreasStores(): {
|
|
3
|
-
store: Omit<Omit<import('zustand').StoreApi<import('../types').AreasStoreStateWithActions>, "setState"> & {
|
|
4
|
-
setState<A extends string | {
|
|
5
|
-
type: unknown;
|
|
6
|
-
}>(partial: import('../types').AreasStoreStateWithActions | Partial<import('../types').AreasStoreStateWithActions> | ((state: import('../types').AreasStoreStateWithActions) => import('../types').AreasStoreStateWithActions | Partial<import('../types').AreasStoreStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
7
|
-
}, "setState"> & {
|
|
8
|
-
setState(nextStateOrUpdater: import('../types').AreasStoreStateWithActions | Partial<import('../types').AreasStoreStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<import('../types').AreasStoreStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
9
|
-
type: unknown;
|
|
10
|
-
} | undefined): void;
|
|
11
|
-
};
|
|
12
|
-
popups: Omit<Omit<import('zustand').StoreApi<import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions>, "setState"> & {
|
|
13
|
-
setState<A extends string | {
|
|
14
|
-
type: unknown;
|
|
15
|
-
}>(partial: import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions | Partial<import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions> | ((state: import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions) => import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions | Partial<import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
16
|
-
}, "setState"> & {
|
|
17
|
-
setState(nextStateOrUpdater: import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions | Partial<import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions> | ((state: import('immer/dist/internal.js').WritableDraft<import('../../../../popups/components/PopupsProvider/contexts/PopupsContext/types').PopupsProviderStoreStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
18
|
-
type: unknown;
|
|
19
|
-
} | undefined): void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=mfActionSupport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mfActionSupport.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/tests/mfActionSupport.ts"],"names":[],"mappings":"AAIA,iGAAiG;AACjG,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;;;EAoBtC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMFActionLifecycle.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/areas/contexts/AreasContext/useMFActionLifecycle.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,gGAAgG;AAChG,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,QAgErD"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { useEffect as S } from "react";
|
|
2
|
-
import { useHostTools as A } from "@m4l/core";
|
|
3
|
-
import { MF_ACTION_RESULT as m, MF_ACTION_OPEN as I, MF_ACTION_REQUEST_PARAM as h } from "../../../../utils/mfActions/constants.js";
|
|
4
|
-
import { completeMFAction as i, isMFActionRequest as u, matchesMFAction as F } from "../../../../utils/mfActions/mfActions.js";
|
|
5
|
-
function b(n) {
|
|
6
|
-
const { events_emit: a, events_add_listener: c, events_remove_listener: d } = A();
|
|
7
|
-
S(() => {
|
|
8
|
-
const o = { events_emit: a, events_add_listener: c, events_remove_listener: d }, r = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set(), _ = () => {
|
|
9
|
-
const e = /* @__PURE__ */ new Set();
|
|
10
|
-
for (const t of Object.values(n.getState().hashWindows)) {
|
|
11
|
-
const s = t.dynamicMFStore.getState().dynamicMFParameters?.[h];
|
|
12
|
-
u(s) && (e.add(s.requestId), r.set(s.requestId, s));
|
|
13
|
-
}
|
|
14
|
-
for (const [t, s] of r)
|
|
15
|
-
e.has(t) || (r.delete(t), f.delete(t) || i(o, s, { status: "cancelled" }));
|
|
16
|
-
}, w = (e) => {
|
|
17
|
-
if (!u(e))
|
|
18
|
-
return;
|
|
19
|
-
const t = r.get(e.requestId);
|
|
20
|
-
t && F(t, e) && e.status !== "opened" && f.add(t.requestId);
|
|
21
|
-
}, q = (e) => {
|
|
22
|
-
if (u(e?.request))
|
|
23
|
-
try {
|
|
24
|
-
if (e.window.moduleId !== e.request.moduleId || !n.getState().currentAreaId) {
|
|
25
|
-
i(o, e.request, { status: "failed", errorCode: "host_action_invalid_window" });
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
n.getState().areaActions.addWindow(e.window), _();
|
|
29
|
-
const t = Object.values(n.getState().hashWindows).find((s) => {
|
|
30
|
-
const l = s.dynamicMFStore.getState().dynamicMFParameters?.[h];
|
|
31
|
-
return u(l) && l.requestId === e.request.requestId;
|
|
32
|
-
});
|
|
33
|
-
t ? a(m, { ...e.request, status: "opened", windowId: t.windowId }) : i(o, e.request, { status: "failed", errorCode: "host_action_open_failed" });
|
|
34
|
-
} catch {
|
|
35
|
-
i(o, e.request, { status: "failed", errorCode: "host_action_open_failed" });
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
_();
|
|
39
|
-
const M = n.subscribe(_);
|
|
40
|
-
return c(m, w), c(I, q), () => {
|
|
41
|
-
M(), d(I, q), d(m, w);
|
|
42
|
-
for (const [e, t] of r)
|
|
43
|
-
f.has(e) || i(o, t, { status: "cancelled" });
|
|
44
|
-
};
|
|
45
|
-
}, [n, a, c, d]);
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
b as useMFActionLifecycle
|
|
49
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const MF_ACTION_OPEN = "m4l:mf-action-open:v1";
|
|
2
|
-
export declare const MF_ACTION_RESULT = "m4l:mf-action-result:v1";
|
|
3
|
-
export declare const MF_ACTION_REQUEST_PARAM = "mfActionRequest";
|
|
4
|
-
export declare const MF_ACTION_OPEN_ACK_TIMEOUT = 5000;
|
|
5
|
-
export declare const MF_ACTION_CALLBACKS_PARAM = "mfActionCallbacks";
|
|
6
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/mfActions/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,0BAA0B,CAAC;AACtD,eAAO,MAAM,gBAAgB,4BAA4B,CAAC;AAC1D,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAC/C,eAAO,MAAM,yBAAyB,sBAAsB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const A = "m4l:mf-action-open:v1", _ = "m4l:mf-action-result:v1", t = "mfActionRequest", o = 5e3, c = "mfActionCallbacks";
|
|
2
|
-
export {
|
|
3
|
-
c as MF_ACTION_CALLBACKS_PARAM,
|
|
4
|
-
A as MF_ACTION_OPEN,
|
|
5
|
-
o as MF_ACTION_OPEN_ACK_TIMEOUT,
|
|
6
|
-
t as MF_ACTION_REQUEST_PARAM,
|
|
7
|
-
_ as MF_ACTION_RESULT
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/mfActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { MFActionHostTools, MFActionOpen, MFActionOutcome, MFActionRequest, MFActionResult } from './types';
|
|
2
|
-
/** Validate the serializable request shared by one opener and its managed window. */
|
|
3
|
-
export declare function isMFActionRequest(value: unknown): value is MFActionRequest;
|
|
4
|
-
/** Compare the whole correlation identity before delivering an action result. */
|
|
5
|
-
export declare function matchesMFAction(request: MFActionRequest, result: unknown): result is MFActionResult;
|
|
6
|
-
/** Publish a terminal result only when the window carries a valid action request. */
|
|
7
|
-
export declare function completeMFAction(hostTools: MFActionHostTools, request: unknown, outcome: MFActionOutcome): void;
|
|
8
|
-
/** Open one request-scoped MF and release all listeners when it settles or is aborted. */
|
|
9
|
-
export declare function openMFAction(hostTools: MFActionHostTools, payload: MFActionOpen, signal: AbortSignal): Promise<MFActionOutcome>;
|
|
10
|
-
//# sourceMappingURL=mfActions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mfActions.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/mfActions/mfActions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEjH,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAK1E;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,cAAc,CASnG;AAED,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAE/G;AAED,0FAA0F;AAC1F,wBAAgB,YAAY,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAyC/H"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { MF_ACTION_RESULT as r, MF_ACTION_OPEN_ACK_TIMEOUT as I, MF_ACTION_OPEN as _, MF_ACTION_REQUEST_PARAM as m } from "./constants.js";
|
|
2
|
-
function a(t) {
|
|
3
|
-
if (!t || typeof t != "object")
|
|
4
|
-
return !1;
|
|
5
|
-
const e = t;
|
|
6
|
-
return e.version === 1 && [e.requestId, e.requesterWindowId, e.moduleId, e.scopeKey].every((n) => typeof n == "string" && n.length > 0);
|
|
7
|
-
}
|
|
8
|
-
function w(t, e) {
|
|
9
|
-
return !a(e) || !("status" in e) || t.requestId !== e.requestId || t.requesterWindowId !== e.requesterWindowId || t.moduleId !== e.moduleId || t.scopeKey !== e.scopeKey ? !1 : e.status === "cancelled" ? !0 : e.status === "opened" ? "windowId" in e && typeof e.windowId == "string" && e.windowId.length > 0 : e.status === "failed" ? "errorCode" in e && typeof e.errorCode == "string" && e.errorCode.length > 0 : e.status === "created" && "entityId" in e && typeof e.entityId == "string" && e.entityId.length > 0 && "operationId" in e && typeof e.operationId == "string" && e.operationId.length > 0;
|
|
10
|
-
}
|
|
11
|
-
function A(t, e, n) {
|
|
12
|
-
a(e) && t.events_emit(r, { ...e, ...n });
|
|
13
|
-
}
|
|
14
|
-
function y(t, e, n) {
|
|
15
|
-
return n.aborted ? Promise.resolve({ status: "cancelled" }) : new Promise((u) => {
|
|
16
|
-
let d = !1;
|
|
17
|
-
const s = setTimeout(() => o({ status: "failed", errorCode: "host_action_unavailable" }), I);
|
|
18
|
-
function o(i) {
|
|
19
|
-
d || (d = !0, clearTimeout(s), t.events_remove_listener(r, c), n.removeEventListener("abort", f), u(i));
|
|
20
|
-
}
|
|
21
|
-
function c(i) {
|
|
22
|
-
w(e.request, i) && (i.status === "opened" ? clearTimeout(s) : o(i));
|
|
23
|
-
}
|
|
24
|
-
function f() {
|
|
25
|
-
o({ status: "cancelled" });
|
|
26
|
-
}
|
|
27
|
-
t.events_add_listener(r, c), n.addEventListener("abort", f, { once: !0 });
|
|
28
|
-
try {
|
|
29
|
-
t.events_emit(_, {
|
|
30
|
-
request: e.request,
|
|
31
|
-
window: {
|
|
32
|
-
...e.window,
|
|
33
|
-
replaceMeId: `mf-action:${e.request.requestId}`,
|
|
34
|
-
dynamicParams: { ...e.window.dynamicParams, [m]: e.request }
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
} catch {
|
|
38
|
-
o({ status: "failed", errorCode: "host_action_open_failed" });
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
A as completeMFAction,
|
|
44
|
-
a as isMFActionRequest,
|
|
45
|
-
w as matchesMFAction,
|
|
46
|
-
y as openMFAction
|
|
47
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { MFActionHostTools, MFActionOpen, MFActionOutcome } from './types';
|
|
2
|
-
/** Open an existing managed window and receive its saved ID through a local fullRefresh callback. */
|
|
3
|
-
export declare function openMFCallbackAction(hostTools: Pick<MFActionHostTools, 'events_emit'>, window: MFActionOpen['window'], requestId: string, signal: AbortSignal): Promise<MFActionOutcome>;
|
|
4
|
-
//# sourceMappingURL=openMFCallbackAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openMFCallbackAction.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/mfActions/openMFCallbackAction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEnG,qGAAqG;AACrG,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,aAAa,CAAC,EACjD,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,EAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,eAAe,CAAC,CA4C1B"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { EmitEvents as m } from "@m4l/core";
|
|
2
|
-
import { MF_ACTION_OPEN_ACK_TIMEOUT as u, MF_ACTION_CALLBACKS_PARAM as f, MF_ACTION_REQUEST_PARAM as E } from "./constants.js";
|
|
3
|
-
function A(c, s, i, o) {
|
|
4
|
-
return o.aborted ? Promise.resolve({ status: "cancelled" }) : new Promise((l) => {
|
|
5
|
-
let a = !1;
|
|
6
|
-
const e = (r) => {
|
|
7
|
-
a || (a = !0, clearTimeout(d), o.removeEventListener("abort", n), l(r));
|
|
8
|
-
}, n = () => e({ status: "cancelled" }), _ = {
|
|
9
|
-
onOpened: () => clearTimeout(d),
|
|
10
|
-
onClosed: () => e({ status: "cancelled" }),
|
|
11
|
-
onLoadError: () => e({ status: "failed", errorCode: "mf_load_failed" })
|
|
12
|
-
}, t = { ...s.dynamicParams };
|
|
13
|
-
delete t[E], delete t.resourceRefreshMode, delete t.requesterWindowId;
|
|
14
|
-
const d = setTimeout(() => e({ status: "failed", errorCode: "host_action_open_failed" }), u);
|
|
15
|
-
o.addEventListener("abort", n, { once: !0 });
|
|
16
|
-
try {
|
|
17
|
-
c.events_emit(m.EMMIT_EVENT_HOST_EMERGE_WINDOW, {
|
|
18
|
-
...s,
|
|
19
|
-
replaceMeId: i,
|
|
20
|
-
dynamicParams: {
|
|
21
|
-
...t,
|
|
22
|
-
[f]: _,
|
|
23
|
-
/** Deliver a committed ID once; a refresh without an ID does not complete creation. */
|
|
24
|
-
fullRefresh: (r) => {
|
|
25
|
-
r === void 0 || a || e({ status: "created", entityId: String(r), operationId: crypto.randomUUID() });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
} catch {
|
|
30
|
-
e({ status: "failed", errorCode: "host_action_open_failed" });
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
A as openMFCallbackAction
|
|
36
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MFActionCallbacks } from '../types';
|
|
2
|
-
import { ActionTestBus } from './types';
|
|
3
|
-
/** Read one local launch without depending on the implementation's promise state. */
|
|
4
|
-
export declare function getCallbackLaunch(bus: ActionTestBus, index?: number): {
|
|
5
|
-
window: import('../../../components/areas/types').EmmitNewPopupMFProps | Omit<import('../../../components/areas/types').AreaModalMFProps, "onClose" | "windowId" | "areaId">;
|
|
6
|
-
callbacks: MFActionCallbacks;
|
|
7
|
-
fullRefresh: (id?: number | string) => void;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=callbackHelpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callbackHelpers.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/utils/mfActions/tests/callbackHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,EAAE,KAAK,SAAI;;eAQG,iBAAiB;iBAC9B,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI;EAElF"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MFActionOpen, MFActionRequest } from '../types';
|
|
2
|
-
export declare const ACTION_REQUEST: MFActionRequest;
|
|
3
|
-
export declare const ACTION_OPEN: MFActionOpen;
|
|
4
|
-
export declare const ACTION_MODAL_OPEN: MFActionOpen;
|
|
5
|
-
export declare const INVALID_ACTION_REQUESTS: unknown[];
|
|
6
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/utils/mfActions/tests/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9D,eAAO,MAAM,cAAc,EAAE,eAM5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAazB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAQ/B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,OAAO,EAQ5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/utils/mfActions/tests/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,aAAa,EAAE,MAAM,SAAS,CAAC;AAElE,2FAA2F;AAC3F,wBAAgB,mBAAmB,IAAI,aAAa,CAsBnD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { MFActionHostTools } from '../types';
|
|
2
|
-
export type ActionEventListener = (payload: unknown) => void;
|
|
3
|
-
export interface ActionTestBus {
|
|
4
|
-
hostTools: MFActionHostTools;
|
|
5
|
-
emit: (event: string, payload: unknown) => void;
|
|
6
|
-
listenerCount: (event: string) => number;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/utils/mfActions/tests/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAE7D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC1C"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { HostToolsType } from '@m4l/core';
|
|
2
|
-
import { EmmitNewModalProps, EmmitNewPopupProps } from '../../components/areas/types';
|
|
3
|
-
export interface MFActionRequest {
|
|
4
|
-
version: 1;
|
|
5
|
-
requestId: string;
|
|
6
|
-
requesterWindowId: string;
|
|
7
|
-
moduleId: string;
|
|
8
|
-
scopeKey: string;
|
|
9
|
-
}
|
|
10
|
-
export type MFActionOutcome = {
|
|
11
|
-
status: 'created';
|
|
12
|
-
operationId: string;
|
|
13
|
-
entityId: string;
|
|
14
|
-
} | {
|
|
15
|
-
status: 'cancelled';
|
|
16
|
-
} | {
|
|
17
|
-
status: 'failed';
|
|
18
|
-
errorCode: string;
|
|
19
|
-
};
|
|
20
|
-
export type MFActionResult = MFActionRequest & (MFActionOutcome | {
|
|
21
|
-
status: 'opened';
|
|
22
|
-
windowId: string;
|
|
23
|
-
});
|
|
24
|
-
export interface MFActionOpen {
|
|
25
|
-
request: MFActionRequest;
|
|
26
|
-
window: Extract<EmmitNewPopupProps | EmmitNewModalProps, {
|
|
27
|
-
winType: 'microfrontend';
|
|
28
|
-
}>;
|
|
29
|
-
}
|
|
30
|
-
export type MFActionHostTools = Pick<HostToolsType, 'events_emit' | 'events_add_listener' | 'events_remove_listener'>;
|
|
31
|
-
/** Local lifecycle callbacks owned by one opener, separate from resource notifications. */
|
|
32
|
-
export interface MFActionCallbacks {
|
|
33
|
-
onOpened: () => void;
|
|
34
|
-
onClosed: () => void;
|
|
35
|
-
onLoadError: () => void;
|
|
36
|
-
}
|
|
37
|
-
declare module '@m4l/core' {
|
|
38
|
-
interface EmmitEventsGuard {
|
|
39
|
-
'm4l:mf-action-open:v1': MFActionOpen;
|
|
40
|
-
'm4l:mf-action-result:v1': MFActionResult;
|
|
41
|
-
}
|
|
42
|
-
interface EmmitListenerGuard {
|
|
43
|
-
'm4l:mf-action-open:v1': (payload: MFActionOpen) => void;
|
|
44
|
-
'm4l:mf-action-result:v1': (payload: MFActionResult) => void;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/utils/mfActions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE3F,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC5D;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,CAC7C,eAAe,GAAG;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CACzD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC,kBAAkB,GAAG,kBAAkB,EAAE;QAAE,OAAO,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;CACxF;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,qBAAqB,GAAG,wBAAwB,CAAC,CAAC;AAEtH,2FAA2F;AAC3F,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,OAAO,QAAQ,WAAW,CAAC;IACzB,UAAU,gBAAgB;QACxB,uBAAuB,EAAE,YAAY,CAAC;QACtC,yBAAyB,EAAE,cAAc,CAAC;KAC3C;IACD,UAAU,kBAAkB;QAC1B,uBAAuB,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;QACzD,yBAAyB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;KAC9D;CACF"}
|