@gooddata/sdk-ui-pluggable-host 11.54.0-alpha.1 → 11.54.0-alpha.2
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activeAppAttribute.d.ts","sourceRoot":"","sources":["../../src/lib/activeAppAttribute.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAMrE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
const ACTIVE_APP_ATTRIBUTE = "data-activeApp";
|
|
3
|
+
export function setActiveAppAttribute(appId) {
|
|
4
|
+
if (appId) {
|
|
5
|
+
document.documentElement.setAttribute(ACTIVE_APP_ATTRIBUTE, appId);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
document.documentElement.removeAttribute(ACTIVE_APP_ATTRIBUTE);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluggableApplicationRenderer.d.ts","sourceRoot":"","sources":["../../src/ui/PluggableApplicationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"PluggableApplicationRenderer.d.ts","sourceRoot":"","sources":["../../src/ui/PluggableApplicationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAsE,MAAM,OAAO,CAAC;AAI3G,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EASxB,MAAM,2CAA2C,CAAC;AAenD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAA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S,CAAC,CAAC,CAAC,OAAO,EAAE,sBAAsB,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IAC7F,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpE,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAClF;AAED,wBAAgB,4BAA4B,CAAC,EACzC,GAAG,EACH,GAAG,EACH,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACxB,EAAE,kCAAkC,2CAuTpC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { FormattedMessage, defineMessage, useIntl } from "react-intl";
|
|
5
5
|
import { isAiAssistantContextChangedEvent, isCloseAiAssistantRequestedEvent, isDocumentTitleChangedEvent, isOpenAiAssistantRequestedEvent, isReloadPlatformContextRequestedEvent, } from "@gooddata/sdk-pluggable-application-model";
|
|
6
6
|
import { LoadingComponent, useAutoupdateRef } from "@gooddata/sdk-ui";
|
|
7
7
|
import { bemFactory } from "@gooddata/sdk-ui-kit";
|
|
8
8
|
import { now } from "../debug.js";
|
|
9
|
+
import { setActiveAppAttribute } from "../lib/activeAppAttribute.js";
|
|
9
10
|
import { getSecuredRemoteAppValidUntil, validateAppSecurity, } from "../loader/appSecurityValidation.js";
|
|
10
11
|
import { getAppLifecycleCallbacks, loadPluggableApplication } from "../loader/pluggableApplicationsLoader.js";
|
|
11
12
|
import { getApplicationHref } from "../loader/routing.js";
|
|
@@ -207,6 +208,15 @@ export function PluggableApplicationRenderer({ app, ctx, pathname, aiAssistantOp
|
|
|
207
208
|
}
|
|
208
209
|
handle.updateContext?.(ctx);
|
|
209
210
|
}, [ctx, intlRef, lifecycle, navigationRequestRef]);
|
|
211
|
+
// Keep the write here, not in the host container: the call site keys this component by app
|
|
212
|
+
// id, so the attribute changes in the same commit that swaps the app container. Driven from
|
|
213
|
+
// the container's own root it could name the incoming app while the outgoing app's DOM is
|
|
214
|
+
// still in the document. Must stay a layout effect — a passive one can run after the browser
|
|
215
|
+
// has already painted the incoming app under the outgoing app's id.
|
|
216
|
+
useLayoutEffect(() => {
|
|
217
|
+
setActiveAppAttribute(app.id);
|
|
218
|
+
return () => setActiveAppAttribute(undefined);
|
|
219
|
+
}, [app.id]);
|
|
210
220
|
// Forward the host-owned chat open-state to the mounted app once it is ready, and on every
|
|
211
221
|
// change, so app-side assistant controls stay aligned with the real (host) state (LX-2544).
|
|
212
222
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-pluggable-host",
|
|
3
|
-
"version": "11.54.0-alpha.
|
|
3
|
+
"version": "11.54.0-alpha.2",
|
|
4
4
|
"description": "GoodData SDK runtime for hosting pluggable applications — registry, loader, routing, platform context, default UI chrome",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@module-federation/runtime": "2.6.0",
|
|
31
31
|
"lodash-es": "^4.17.23",
|
|
32
|
-
"@gooddata/sdk-backend-base": "11.54.0-alpha.
|
|
33
|
-
"@gooddata/sdk-backend-
|
|
34
|
-
"@gooddata/sdk-backend-
|
|
35
|
-
"@gooddata/sdk-
|
|
36
|
-
"@gooddata/sdk-
|
|
37
|
-
"@gooddata/sdk-
|
|
38
|
-
"@gooddata/sdk-
|
|
39
|
-
"@gooddata/sdk-ui-application-header": "11.54.0-alpha.
|
|
40
|
-
"@gooddata/sdk-ui-ext": "11.54.0-alpha.
|
|
41
|
-
"@gooddata/sdk-ui-gen-ai": "11.54.0-alpha.
|
|
42
|
-
"@gooddata/sdk-ui-
|
|
43
|
-
"@gooddata/sdk-ui-theme-provider": "11.54.0-alpha.
|
|
44
|
-
"@gooddata/sdk-ui-
|
|
45
|
-
"@gooddata/util": "11.54.0-alpha.
|
|
32
|
+
"@gooddata/sdk-backend-base": "11.54.0-alpha.2",
|
|
33
|
+
"@gooddata/sdk-backend-tiger": "11.54.0-alpha.2",
|
|
34
|
+
"@gooddata/sdk-backend-spi": "11.54.0-alpha.2",
|
|
35
|
+
"@gooddata/sdk-embedding": "11.54.0-alpha.2",
|
|
36
|
+
"@gooddata/sdk-pluggable-application-model": "11.54.0-alpha.2",
|
|
37
|
+
"@gooddata/sdk-ui": "11.54.0-alpha.2",
|
|
38
|
+
"@gooddata/sdk-model": "11.54.0-alpha.2",
|
|
39
|
+
"@gooddata/sdk-ui-application-header": "11.54.0-alpha.2",
|
|
40
|
+
"@gooddata/sdk-ui-ext": "11.54.0-alpha.2",
|
|
41
|
+
"@gooddata/sdk-ui-gen-ai": "11.54.0-alpha.2",
|
|
42
|
+
"@gooddata/sdk-ui-semantic-search": "11.54.0-alpha.2",
|
|
43
|
+
"@gooddata/sdk-ui-theme-provider": "11.54.0-alpha.2",
|
|
44
|
+
"@gooddata/sdk-ui-kit": "11.54.0-alpha.2",
|
|
45
|
+
"@gooddata/util": "11.54.0-alpha.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"vite": "8.0.16",
|
|
86
86
|
"vitest": "4.1.8",
|
|
87
87
|
"vitest-dom": "0.1.1",
|
|
88
|
-
"@gooddata/
|
|
89
|
-
"@gooddata/
|
|
88
|
+
"@gooddata/oxlint-config": "11.54.0-alpha.2",
|
|
89
|
+
"@gooddata/eslint-config": "11.54.0-alpha.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"react": ">=18.3.1",
|