@gooddata/sdk-ui-pluggable-host 11.57.0-alpha.0 → 11.57.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/debug.js +1 -1
- package/esm/translations/zh-HK.json +2 -2
- package/esm/ui/GenAIChat.d.ts +2 -6
- package/esm/ui/GenAIChat.d.ts.map +1 -1
- package/esm/ui/GenAIChat.js +2 -2
- package/esm/ui/HostChat.d.ts.map +1 -1
- package/esm/ui/HostChat.js +1 -4
- package/esm/ui/HostChrome.d.ts.map +1 -1
- package/esm/ui/HostChrome.js +1 -1
- package/esm/ui/useGenAiRightPanel.d.ts +1 -2
- package/esm/ui/useGenAiRightPanel.d.ts.map +1 -1
- package/esm/ui/useGenAiRightPanel.js +2 -5
- package/esm/ui/useHostChromeChat.d.ts +2 -3
- package/esm/ui/useHostChromeChat.d.ts.map +1 -1
- package/esm/ui/useHostChromeChat.js +2 -2
- package/package.json +21 -20
package/esm/debug.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"gs.host.contractExpired.trial.description": "如果您想繼續使用GoodData Cloud,請聯繫我們。",
|
|
19
19
|
"gs.host.contractExpired.nonTrial.title": "您的存取權限已被鎖定。",
|
|
20
20
|
"gs.host.contractExpired.nonTrial.description": "請與帳戶管理員聯繫以重新獲得存取權限。",
|
|
21
|
-
"gs.host.contractExpired.buttonTitle": "
|
|
21
|
+
"gs.host.contractExpired.buttonTitle": "聯絡我們",
|
|
22
22
|
"gs.host.error.failedToLoad": "無法載入",
|
|
23
23
|
"gs.host.error.pageNotFound": "找不到頁面",
|
|
24
24
|
"gs.host.error.pageNotFoundDescription": "您正在尋找的頁面不存在,或者您沒有權限存取該頁面。",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"gs.host.error.appBuildExpired": "此應用程式已過期,必須由其作者重新建置後才能再次執行。",
|
|
28
28
|
"gs.host.error.appSecurityMetadataMissing": "此應用程式缺少必要的安全性中繼資料,無法載入。",
|
|
29
29
|
"gs.host.demoApp.validUntil": "示範應用程式有效期至 {date}",
|
|
30
|
-
"messages.genAi.visualisation.saved.success": "
|
|
30
|
+
"messages.genAi.visualisation.saved.success": "很好!我們已儲存您的可視化。",
|
|
31
31
|
"messages.genAi.visualisation.saved.error": "糟糕,保存可視化時出現問題。",
|
|
32
32
|
"messages.genAi.visualisation.saved.error.detail": "{errorType}: {errorMessage}",
|
|
33
33
|
"messages.genAi.visualisation.link.copied": "可視化連結已複製到剪貼板。",
|
package/esm/ui/GenAIChat.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import type { IGenAIUserContext
|
|
2
|
+
import type { IGenAIUserContext } from "@gooddata/sdk-model";
|
|
3
3
|
import { type ChatDefinitionReceivedEvent, type ChatAssistantMessageEvent, type ChatClosedEvent, type ChatFeedbackEvent, type ChatOpenedEvent, type ChatResetEvent, type ChatUserMessageEvent } from "@gooddata/sdk-ui-gen-ai";
|
|
4
4
|
/**
|
|
5
5
|
* Discriminated union of GenAI chat events that are forwarded to the host
|
|
@@ -70,10 +70,6 @@ export interface IGenAIChatProps {
|
|
|
70
70
|
* Whether the ambient user context is currently loading.
|
|
71
71
|
*/
|
|
72
72
|
ambientUserContextLoading?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Active application registry item.
|
|
75
|
-
*/
|
|
76
|
-
activeApplication?: PluggableApplicationRegistryItem;
|
|
77
73
|
/**
|
|
78
74
|
* Tag identifiers the assistant's object search/autocomplete should be restricted to,
|
|
79
75
|
* reflecting the active hosted application's current view.
|
|
@@ -106,5 +102,5 @@ export interface IGenAIChatProps {
|
|
|
106
102
|
* (`@gooddata/sdk-ui-gen-ai/internal`); this adapter only supplies the host's data sources, renders the
|
|
107
103
|
* host's own save-visualization / copy toasts, and forwards telemetry events through `onEvent`.
|
|
108
104
|
*/
|
|
109
|
-
export declare function GenAIChat({ workspaceId, open, disabled, onOpen, onClose, askedQuestion, askSeq, appendToChat, agentId, userContext, replaceUserContext, ambientUserContext, ambientUserContextLoading, includeTags, excludeTags, canManageProject, canAnalyzeProject, canFullControl, settings, dialogPosition,
|
|
105
|
+
export declare function GenAIChat({ workspaceId, open, disabled, onOpen, onClose, askedQuestion, askSeq, appendToChat, agentId, userContext, replaceUserContext, ambientUserContext, ambientUserContextLoading, includeTags, excludeTags, canManageProject, canAnalyzeProject, canFullControl, settings, dialogPosition, embedded, onAppLinkClick, onEvent, }: IGenAIChatProps): import("react/jsx-runtime").JSX.Element;
|
|
110
106
|
//# sourceMappingURL=GenAIChat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/ui/GenAIChat.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/ui/GenAIChat.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EACH,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAE5B,MAAM,yBAAyB,CAAC;AAYjC;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GACpB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,YAAY,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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;IACvG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACtB,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,EACZ,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,cAAc,EACd,OAAO,GACV,EAAE,eAAe,2CAmHjB"}
|
package/esm/ui/GenAIChat.js
CHANGED
|
@@ -17,7 +17,7 @@ const EMBEDDED_CHAT_CLASS = "gd-gen-ai-chat-embedded";
|
|
|
17
17
|
* (`@gooddata/sdk-ui-gen-ai/internal`); this adapter only supplies the host's data sources, renders the
|
|
18
18
|
* host's own save-visualization / copy toasts, and forwards telemetry events through `onEvent`.
|
|
19
19
|
*/
|
|
20
|
-
export function GenAIChat({ workspaceId, open, disabled, onOpen, onClose, askedQuestion, askSeq, appendToChat, agentId, userContext, replaceUserContext, ambientUserContext, ambientUserContextLoading, includeTags, excludeTags, canManageProject, canAnalyzeProject, canFullControl, settings, dialogPosition,
|
|
20
|
+
export function GenAIChat({ workspaceId, open, disabled, onOpen, onClose, askedQuestion, askSeq, appendToChat, agentId, userContext, replaceUserContext, ambientUserContext, ambientUserContextLoading, includeTags, excludeTags, canManageProject, canAnalyzeProject, canFullControl, settings, dialogPosition, embedded, onAppLinkClick, onEvent, }) {
|
|
21
21
|
const { addSuccess, addError } = useToastMessage();
|
|
22
22
|
const intl = useIntl();
|
|
23
23
|
const backend = useBackendStrict();
|
|
@@ -85,6 +85,6 @@ export function GenAIChat({ workspaceId, open, disabled, onOpen, onClose, askedQ
|
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
87
|
}, [addError, addSuccess, intl, onEvent]);
|
|
88
|
-
const enableRightPanel = useGenAiRightPanel(settings?.["enableGenAiRightPanel"], embedded
|
|
88
|
+
const enableRightPanel = useGenAiRightPanel(settings?.["enableGenAiRightPanel"], embedded);
|
|
89
89
|
return (_jsx(GenAIChatDialogConnected, { backend: backend, workspace: workspaceId, locale: intl.locale, isOpen: open, isDisabled: disabled, onOpen: onOpen, onClose: onClose, askedQuestion: askedQuestion, askSeq: askSeq, userContext: userContext, appendToChat: appendToChat, agentId: agentId, replaceUserContext: replaceUserContext, ambientUserContext: ambientUserContext, ambientUserContextLoading: ambientUserContextLoading, includeTags: includeTags, excludeTags: excludeTags, canManage: canManageProject, canAnalyze: canAnalyzeProject, canFullControl: canFullControl, settings: settings, dialogPosition: dialogPosition, className: embedded ? EMBEDDED_CHAT_CLASS : undefined, allowNativeLinks: false, onLinkClick: onLinkClick, onEvent: handleEvent, displayMode: enableRightPanel ? "inline" : "modal", returnFocusTo: embedded ? EMBEDDED_AI_TRIGGER_ID : HEADER_CHAT_BUTTON_ID }));
|
|
90
90
|
}
|
package/esm/ui/HostChat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostChat.d.ts","sourceRoot":"","sources":["../../src/ui/HostChat.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,KAAK,gBAAgB,EA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3B,GAAG,EAAE,gBAAgB,CAAC;IACtB,oBAAoB,EAAE,gCAAgC,EAAE,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACxC,oFAAoF;IACpF,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,mFAAmF;IACnF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAChF;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACrB,GAAG,EACH,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,UAAiB,EACjB,OAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GACpB,EAAE,cAAc,2CA+HhB"}
|
package/esm/ui/HostChat.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useCallback, useEffect, useMemo } from "react";
|
|
|
4
4
|
import { BackendProvider, resolveLocale } from "@gooddata/sdk-ui";
|
|
5
5
|
import { ToastsCenterContextProvider } from "@gooddata/sdk-ui-kit";
|
|
6
6
|
import { getAppLifecycleCallbacks } from "../loader/pluggableApplicationsLoader.js";
|
|
7
|
-
import { getActiveInternalApplication } from "../loader/routing.js";
|
|
8
7
|
import { getBackend } from "../platformContext/backend.js";
|
|
9
8
|
import { e } from "./hostChromeBem.js";
|
|
10
9
|
import { HostIntlProvider } from "./HostIntlProvider.js";
|
|
@@ -24,12 +23,10 @@ import { useHostChromeWorkspaceFeatures } from "./useHostChromeWorkspaceFeatures
|
|
|
24
23
|
*/
|
|
25
24
|
export function HostChat({ ctx, resolvedApplications, pathname, activeAppId, visibility = null, context = null, onOpenChange, onChatStateChange, onAppLinkClick, onAppEventReceive, }) {
|
|
26
25
|
const features = useHostChromeWorkspaceFeatures(resolvedApplications, ctx, pathname);
|
|
27
|
-
const activeApplication = getActiveInternalApplication(resolvedApplications, ctx, pathname);
|
|
28
26
|
const shellTelemetry = useMemo(() => getAppLifecycleCallbacks()?.createTelemetryCallbacks?.("host-ui"), []);
|
|
29
27
|
const chat = useHostChromeChat({
|
|
30
28
|
features,
|
|
31
29
|
ctx,
|
|
32
|
-
activeApplication,
|
|
33
30
|
telemetry: shellTelemetry,
|
|
34
31
|
dialogPosition: context?.dialogPosition,
|
|
35
32
|
embedded: context?.embedded,
|
|
@@ -87,7 +84,7 @@ export function HostChat({ ctx, resolvedApplications, pathname, activeAppId, vis
|
|
|
87
84
|
// `seq` changes on every request, so a repeated identical open/ask/toggle still re-runs this.
|
|
88
85
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
89
86
|
}, [visibilitySeq, chatAskAiAssistant, chatOpenAiAssistant, chatOpen, chatClose, chatToggle]);
|
|
90
|
-
const enablePanel = useGenAiRightPanel(features.settings["enableGenAiRightPanel"], context?.embedded
|
|
87
|
+
const enablePanel = useGenAiRightPanel(features.settings["enableGenAiRightPanel"], context?.embedded);
|
|
91
88
|
const Wrapper = useCallback(({ chatIsOpen, children, enablePanel, }) => {
|
|
92
89
|
return (_jsx("div", { className: e("ai-chat", {
|
|
93
90
|
chatIsOpen,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HostChrome.d.ts","sourceRoot":"","sources":["../../src/ui/HostChrome.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuC,KAAK,SAAS,EAAwB,MAAM,OA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C,EAAE,OAAO,EACtB,kBAAkB,CAAC,EAAE,OAAO,KAC3B,IAAI,CAAC;IACV;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,wBAAgB,UAAU,CAAC,EACvB,GAAG,EACH,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,SAAS,EAAE,UAAU,EACrB,aAAa,EACb,YAAmB,EACnB,YAAoB,EACpB,UAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,QAAQ,GACX,EAAE,gBAAgB,2CA8OlB"}
|
package/esm/ui/HostChrome.js
CHANGED
|
@@ -139,7 +139,7 @@ export function HostChrome({ ctx, resolvedApplications, pathname, onNavigate, on
|
|
|
139
139
|
const headerTextColor = ctx.theme?.header?.color ?? defaultHeaderTheme.color;
|
|
140
140
|
const activeColor = ctx.theme?.header?.activeColor ?? defaultHeaderTheme.activeColor;
|
|
141
141
|
const hideChrome = ctx.embeddingMode === "iframe" || ctx.isExportMode === true;
|
|
142
|
-
const enablePanel = useGenAiRightPanel(features.settings["enableGenAiRightPanel"], ctx.embeddingMode !== "none"
|
|
142
|
+
const enablePanel = useGenAiRightPanel(features.settings["enableGenAiRightPanel"], ctx.embeddingMode !== "none");
|
|
143
143
|
const Wrapper = useCallback(({ children, chatIsOpen }) => {
|
|
144
144
|
return (_jsx("main", { className: e("content", {
|
|
145
145
|
chatIsOpen,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function useGenAiRightPanel(enableGenAiRightPanel?: boolean, embedded?: boolean, app?: PluggableApplicationRegistryItem): boolean;
|
|
1
|
+
export declare function useGenAiRightPanel(enableGenAiRightPanel?: boolean, embedded?: boolean): boolean;
|
|
3
2
|
//# sourceMappingURL=useGenAiRightPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGenAiRightPanel.d.ts","sourceRoot":"","sources":["../../src/ui/useGenAiRightPanel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGenAiRightPanel.d.ts","sourceRoot":"","sources":["../../src/ui/useGenAiRightPanel.ts"],"names":[],"mappings":"AAIA,wBAAgB,kBAAkB,CAAC,qBAAqB,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,WAIrF"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { DefaultApplicationId } from "@gooddata/sdk-pluggable-application-model";
|
|
3
2
|
import { useMediaQuery } from "@gooddata/sdk-ui-kit";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const isBiggerApp = app?.id ? BIGGER_APPS.includes(app.id) : false;
|
|
7
|
-
const isSmall = useMediaQuery(isBiggerApp ? "<=xl" : "<=lg");
|
|
3
|
+
export function useGenAiRightPanel(enableGenAiRightPanel, embedded) {
|
|
4
|
+
const isSmall = useMediaQuery("<=lg");
|
|
8
5
|
return Boolean(enableGenAiRightPanel && !embedded && !isSmall);
|
|
9
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { type IGenAIUserContext } from "@gooddata/sdk-model";
|
|
3
3
|
import { type IPlatformContext, type IPluggableAppTelemetryCallbacks } from "@gooddata/sdk-pluggable-application-model";
|
|
4
4
|
import { type GenAIChatEvent } from "./GenAIChat.js";
|
|
5
5
|
import { type IHostChromeWorkspaceFeatures } from "./useHostChromeWorkspaceFeatures.js";
|
|
@@ -48,7 +48,6 @@ export interface IUseHostChromeChatArgs {
|
|
|
48
48
|
features: IHostChromeWorkspaceFeatures;
|
|
49
49
|
ctx: IPlatformContext;
|
|
50
50
|
telemetry: IPluggableAppTelemetryCallbacks | undefined;
|
|
51
|
-
activeApplication?: PluggableApplicationRegistryItem;
|
|
52
51
|
/** Where to place the chat (e.g. an embedded dashboard's left/right `showassistant` param). */
|
|
53
52
|
dialogPosition?: "left" | "right";
|
|
54
53
|
/** Whether the active app is embedded; switches the chat to the embedded presentation. */
|
|
@@ -74,5 +73,5 @@ export interface IUseHostChromeChatArgs {
|
|
|
74
73
|
* points, the runtime availability probe (`useGenAiChatAvailability`) and forwarding chat
|
|
75
74
|
* events to the host telemetry callbacks.
|
|
76
75
|
*/
|
|
77
|
-
export declare function useHostChromeChat({ features, ctx, telemetry, dialogPosition,
|
|
76
|
+
export declare function useHostChromeChat({ features, ctx, telemetry, dialogPosition, embedded, disabled, onAppLinkClick, onAppEventReceive, }: IUseHostChromeChatArgs): IHostChromeChat;
|
|
78
77
|
//# 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,
|
|
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;AAKnD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAExF,MAAM,WAAW,eAAe;IAC5B,4EAA4E;IAC5E,OAAO,EAAE,SAAS,CAAC;IACnB,iDAAiD;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,IAAI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,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IACvG,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACvD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,QAAQ,EACR,GAAG,EACH,SAAS,EACT,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,iBAAiB,GACpB,EAAE,sBAAsB,GAAG,eAAe,CA6H1C"}
|
|
@@ -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, dialogPosition,
|
|
14
|
+
export function useHostChromeChat({ features, ctx, telemetry, dialogPosition, embedded, disabled, onAppLinkClick, onAppEventReceive, }) {
|
|
15
15
|
const [isChatOpen, setIsChatOpen] = useState(false);
|
|
16
16
|
const [askedQuestion, setAskedQuestion] = useState(null);
|
|
17
17
|
const [appendToChat, setAppendToChat] = useState(false);
|
|
@@ -65,7 +65,7 @@ export function useHostChromeChat({ features, ctx, telemetry, dialogPosition, ac
|
|
|
65
65
|
onAppEventReceive?.(event);
|
|
66
66
|
}, [telemetry, onAppEventReceive]);
|
|
67
67
|
const showChatItem = useGenAiChatAvailability(getBackend(), features.workspaceId, features.showChat, features.canManageProject);
|
|
68
|
-
const element = features.showChat && features.workspaceId ? (_jsx(GenAIChat, { workspaceId: features.workspaceId,
|
|
68
|
+
const element = features.showChat && features.workspaceId ? (_jsx(GenAIChat, { workspaceId: features.workspaceId, open: isChatOpen, disabled: disabled, onOpen: open, onClose: close, askedQuestion: askedQuestion, appendToChat: appendToChat, agentId: agentId, replaceUserContext: replaceUserContext, askSeq: askSeq, userContext: userContext, ambientUserContext: ambientUserContext, ambientUserContextLoading: ambientUserContextLoading, includeTags: includeTags, excludeTags: excludeTags, canManageProject: features.canManageProject, canAnalyzeProject: features.canCreateVisualization, canFullControl: features.canFullControl, settings: ctx.workspaceSettings, dialogPosition: dialogPosition, embedded: embedded, onAppLinkClick: onAppLinkClick, onEvent: handleChatEvent })) : null;
|
|
69
69
|
return {
|
|
70
70
|
element,
|
|
71
71
|
isOpen: isChatOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-pluggable-host",
|
|
3
|
-
"version": "11.57.0-alpha.
|
|
3
|
+
"version": "11.57.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-
|
|
33
|
-
"@gooddata/sdk-backend-
|
|
34
|
-
"@gooddata/sdk-
|
|
35
|
-
"@gooddata/sdk-
|
|
36
|
-
"@gooddata/sdk-
|
|
37
|
-
"@gooddata/sdk-pluggable-application-model": "11.57.0-alpha.
|
|
38
|
-
"@gooddata/sdk-ui": "11.57.0-alpha.
|
|
39
|
-
"@gooddata/sdk-ui-
|
|
40
|
-
"@gooddata/sdk-ui-ext": "11.57.0-alpha.
|
|
41
|
-
"@gooddata/sdk-ui
|
|
42
|
-
"@gooddata/sdk-ui-kit": "11.57.0-alpha.
|
|
43
|
-
"@gooddata/sdk-ui-
|
|
44
|
-
"@gooddata/
|
|
45
|
-
"@gooddata/
|
|
32
|
+
"@gooddata/sdk-backend-spi": "11.57.0-alpha.2",
|
|
33
|
+
"@gooddata/sdk-backend-tiger": "11.57.0-alpha.2",
|
|
34
|
+
"@gooddata/sdk-backend-base": "11.57.0-alpha.2",
|
|
35
|
+
"@gooddata/sdk-embedding": "11.57.0-alpha.2",
|
|
36
|
+
"@gooddata/sdk-model": "11.57.0-alpha.2",
|
|
37
|
+
"@gooddata/sdk-pluggable-application-model": "11.57.0-alpha.2",
|
|
38
|
+
"@gooddata/sdk-ui-application-header": "11.57.0-alpha.2",
|
|
39
|
+
"@gooddata/sdk-ui-gen-ai": "11.57.0-alpha.2",
|
|
40
|
+
"@gooddata/sdk-ui-ext": "11.57.0-alpha.2",
|
|
41
|
+
"@gooddata/sdk-ui": "11.57.0-alpha.2",
|
|
42
|
+
"@gooddata/sdk-ui-kit": "11.57.0-alpha.2",
|
|
43
|
+
"@gooddata/sdk-ui-semantic-search": "11.57.0-alpha.2",
|
|
44
|
+
"@gooddata/util": "11.57.0-alpha.2",
|
|
45
|
+
"@gooddata/sdk-ui-theme-provider": "11.57.0-alpha.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@microsoft/api-documenter": "7.30.10",
|
|
@@ -68,21 +68,22 @@
|
|
|
68
68
|
"jiti": "2.6.1",
|
|
69
69
|
"npm-run-all": "4.1.5",
|
|
70
70
|
"oxfmt": "0.66.0",
|
|
71
|
-
"oxlint": "1.
|
|
72
|
-
"oxlint-
|
|
71
|
+
"oxlint": "1.66.0",
|
|
72
|
+
"oxlint-plugin-eslint": "1.82.0",
|
|
73
|
+
"oxlint-tsgolint": "0.18.1",
|
|
73
74
|
"react": "19.1.1",
|
|
74
75
|
"react-dom": "19.1.1",
|
|
75
76
|
"react-intl": "10.1.25",
|
|
76
77
|
"react-router": "7.18.1",
|
|
77
78
|
"rolldown": "1.0.3",
|
|
78
|
-
"sass": "1.
|
|
79
|
+
"sass": "1.104.0",
|
|
79
80
|
"tslib": "2.8.1",
|
|
80
81
|
"typescript": "7.0.2",
|
|
81
82
|
"vite": "8.0.16",
|
|
82
83
|
"vitest": "4.1.8",
|
|
83
84
|
"vitest-dom": "0.1.1",
|
|
84
|
-
"@gooddata/eslint-config": "11.57.0-alpha.
|
|
85
|
-
"@gooddata/oxlint-config": "11.57.0-alpha.
|
|
85
|
+
"@gooddata/eslint-config": "11.57.0-alpha.2",
|
|
86
|
+
"@gooddata/oxlint-config": "11.57.0-alpha.2"
|
|
86
87
|
},
|
|
87
88
|
"peerDependencies": {
|
|
88
89
|
"react": ">=18.3.1",
|