@gooddata/sdk-ui-pluggable-host 11.45.0-alpha.0 → 11.45.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.
- package/esm/components/HostUiContainer.d.ts.map +1 -1
- package/esm/components/HostUiContainer.js +54 -7
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/loader/legacyRedirect.d.ts +17 -0
- package/esm/loader/legacyRedirect.d.ts.map +1 -0
- package/esm/loader/legacyRedirect.js +51 -0
- package/esm/platformContext/backend.d.ts.map +1 -1
- package/esm/platformContext/backend.js +20 -1
- package/esm/registry/pluggableApplicationsRegistry.d.ts.map +1 -1
- package/esm/registry/pluggableApplicationsRegistry.js +14 -1
- package/esm/sdk-ui-pluggable-host.d.ts +18 -0
- package/esm/ui/DefaultHostUi.js +16 -43
- package/esm/ui/GenAIChat.d.ts +18 -1
- package/esm/ui/GenAIChat.d.ts.map +1 -1
- package/esm/ui/GenAIChat.js +69 -97
- package/esm/ui/HostChat.d.ts +64 -0
- package/esm/ui/HostChat.d.ts.map +1 -0
- package/esm/ui/HostChat.js +75 -0
- package/esm/ui/HostChrome.d.ts +12 -24
- package/esm/ui/HostChrome.d.ts.map +1 -1
- package/esm/ui/HostChrome.js +11 -52
- package/esm/ui/PluggableApplicationRenderer.d.ts +24 -2
- package/esm/ui/PluggableApplicationRenderer.d.ts.map +1 -1
- package/esm/ui/PluggableApplicationRenderer.js +31 -13
- package/esm/ui/useHostChromeChat.d.ts +12 -1
- package/esm/ui/useHostChromeChat.d.ts.map +1 -1
- package/esm/ui/useHostChromeChat.js +2 -2
- package/package.json +17 -17
|
@@ -33,6 +33,17 @@ export interface IUseHostChromeChatArgs {
|
|
|
33
33
|
features: IHostChromeWorkspaceFeatures;
|
|
34
34
|
ctx: IPlatformContext;
|
|
35
35
|
telemetry: IPluggableAppTelemetryCallbacks | undefined;
|
|
36
|
+
/** Where to place the chat (e.g. an embedded dashboard's left/right `showassistant` param). */
|
|
37
|
+
dialogPosition?: "left" | "right";
|
|
38
|
+
/** Whether the active app is embedded; switches the chat to the embedded presentation. */
|
|
39
|
+
embedded?: boolean;
|
|
40
|
+
/** Delegates a chat link click to the active app; returns true if the app handled it. */
|
|
41
|
+
onAppLinkClick?: (link: {
|
|
42
|
+
type?: string;
|
|
43
|
+
id?: string;
|
|
44
|
+
itemUrl?: string;
|
|
45
|
+
newTab?: boolean;
|
|
46
|
+
}) => boolean;
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
49
|
* Owns the GenAI chat state and renders the `<GenAIChat>` element for the host chrome.
|
|
@@ -41,5 +52,5 @@ export interface IUseHostChromeChatArgs {
|
|
|
41
52
|
* points, the runtime availability probe (`useGenAiChatAvailability`) and forwarding chat
|
|
42
53
|
* events to the host telemetry callbacks.
|
|
43
54
|
*/
|
|
44
|
-
export declare function useHostChromeChat({ features, ctx, telemetry }: IUseHostChromeChatArgs): IHostChromeChat;
|
|
55
|
+
export declare function useHostChromeChat({ features, ctx, telemetry, dialogPosition, embedded, onAppLinkClick }: IUseHostChromeChatArgs): IHostChromeChat;
|
|
45
56
|
//# sourceMappingURL=useHostChromeChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useHostChromeChat.d.ts","sourceRoot":"","sources":["../../src/ui/useHostChromeChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,+BAA+B,EACvC,MAAM,2CAA2C,CAAC;AAMnD,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAExF,MAAM,WAAW,eAAe;IAC5B,4EAA4E;IAC5E,OAAO,EAAE,SAAS,CAAC;IACnB,iDAAiD;IACjD,MAA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EAAE,MAAM,IAAI,CAAC;IACnB;;;OAGG;IACH,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5E;;;OAGG;IACH,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACrE;AAED,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,4BAA4B,CAAC;IACvC,GAAG,EAAE,gBAAgB,CAAC;IACtB,SAAS,EAAE,+BAA+B,GAAG,SAAS,CAAC;IACvD,+FAA+F;IAC/F,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;CAC1G;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,QAAQ,EACR,GAAG,EACH,SAAS,EACT,cAAc,EACd,QAAQ,EACR,cAAc,EACjB,EAAE,sBAAsB,GAAG,eAAe,CAqF1C"}
|
|
@@ -11,7 +11,7 @@ import { GenAIChat } from "./GenAIChat.js";
|
|
|
11
11
|
* points, the runtime availability probe (`useGenAiChatAvailability`) and forwarding chat
|
|
12
12
|
* events to the host telemetry callbacks.
|
|
13
13
|
*/
|
|
14
|
-
export function useHostChromeChat({ features, ctx, telemetry }) {
|
|
14
|
+
export function useHostChromeChat({ features, ctx, telemetry, dialogPosition, embedded, onAppLinkClick, }) {
|
|
15
15
|
const [isChatOpen, setIsChatOpen] = useState(false);
|
|
16
16
|
const [askedQuestion, setAskedQuestion] = useState(null);
|
|
17
17
|
// Bumped on every ask so the chat re-seeds (clears the thread + sends the message) even when the
|
|
@@ -47,7 +47,7 @@ export function useHostChromeChat({ features, ctx, telemetry }) {
|
|
|
47
47
|
telemetry?.trackEvent(event.name, event.payload);
|
|
48
48
|
}, [telemetry]);
|
|
49
49
|
const showChatItem = useGenAiChatAvailability(getBackend(), features.workspaceId, features.showChat, features.canManageProject);
|
|
50
|
-
const element = features.showChat && features.workspaceId ? (_jsx(GenAIChat, { workspaceId: features.workspaceId, open: isChatOpen, onOpen: open, onClose: close, askedQuestion: askedQuestion, askSeq: askSeq, userContext: userContext, includeTags: includeTags, excludeTags: excludeTags, canManageProject: features.canManageProject, canAnalyzeProject: features.canAccessWorkbench, canFullControl: features.canFullControl, settings: ctx.workspaceSettings, onEvent: handleChatEvent })) : null;
|
|
50
|
+
const element = features.showChat && features.workspaceId ? (_jsx(GenAIChat, { workspaceId: features.workspaceId, open: isChatOpen, onOpen: open, onClose: close, askedQuestion: askedQuestion, askSeq: askSeq, userContext: userContext, includeTags: includeTags, excludeTags: excludeTags, canManageProject: features.canManageProject, canAnalyzeProject: features.canAccessWorkbench, canFullControl: features.canFullControl, settings: ctx.workspaceSettings, dialogPosition: dialogPosition, embedded: embedded, onAppLinkClick: onAppLinkClick, onEvent: handleChatEvent })) : null;
|
|
51
51
|
return {
|
|
52
52
|
element,
|
|
53
53
|
isOpen: isChatOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-pluggable-host",
|
|
3
|
-
"version": "11.45.0-alpha.
|
|
3
|
+
"version": "11.45.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.3.1",
|
|
31
31
|
"lodash-es": "^4.17.23",
|
|
32
|
-
"@gooddata/sdk-backend-base": "11.45.0-alpha.
|
|
33
|
-
"@gooddata/sdk-backend-
|
|
34
|
-
"@gooddata/sdk-
|
|
35
|
-
"@gooddata/sdk-
|
|
36
|
-
"@gooddata/sdk-
|
|
37
|
-
"@gooddata/sdk-
|
|
38
|
-
"@gooddata/sdk-
|
|
39
|
-
"@gooddata/sdk-ui-application-header": "11.45.0-alpha.
|
|
40
|
-
"@gooddata/sdk-ui-ext": "11.45.0-alpha.
|
|
41
|
-
"@gooddata/sdk-ui-
|
|
42
|
-
"@gooddata/sdk-ui-
|
|
43
|
-
"@gooddata/sdk-ui-
|
|
44
|
-
"@gooddata/
|
|
45
|
-
"@gooddata/
|
|
32
|
+
"@gooddata/sdk-backend-base": "11.45.0-alpha.2",
|
|
33
|
+
"@gooddata/sdk-backend-tiger": "11.45.0-alpha.2",
|
|
34
|
+
"@gooddata/sdk-backend-spi": "11.45.0-alpha.2",
|
|
35
|
+
"@gooddata/sdk-model": "11.45.0-alpha.2",
|
|
36
|
+
"@gooddata/sdk-embedding": "11.45.0-alpha.2",
|
|
37
|
+
"@gooddata/sdk-ui": "11.45.0-alpha.2",
|
|
38
|
+
"@gooddata/sdk-pluggable-application-model": "11.45.0-alpha.2",
|
|
39
|
+
"@gooddata/sdk-ui-application-header": "11.45.0-alpha.2",
|
|
40
|
+
"@gooddata/sdk-ui-ext": "11.45.0-alpha.2",
|
|
41
|
+
"@gooddata/sdk-ui-kit": "11.45.0-alpha.2",
|
|
42
|
+
"@gooddata/sdk-ui-semantic-search": "11.45.0-alpha.2",
|
|
43
|
+
"@gooddata/sdk-ui-theme-provider": "11.45.0-alpha.2",
|
|
44
|
+
"@gooddata/util": "11.45.0-alpha.2",
|
|
45
|
+
"@gooddata/sdk-ui-gen-ai": "11.45.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.45.0-alpha.2",
|
|
89
|
+
"@gooddata/eslint-config": "11.45.0-alpha.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"react": ">=18.3.1",
|