@gooddata/sdk-ui-gen-ai 11.62.0-alpha.2 → 11.62.0-alpha.4
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/NOTICE +33 -610
- package/esm/components/CustomizationContext.d.ts +2 -1
- package/esm/components/CustomizationContext.d.ts.map +1 -1
- package/esm/components/CustomizationProvider.d.ts.map +1 -1
- package/esm/components/CustomizationProvider.js +10 -0
- package/esm/components/GenAIChat.d.ts.map +1 -1
- package/esm/components/GenAIChat.js +2 -1
- package/esm/components/GenAiConversations.d.ts.map +1 -1
- package/esm/components/GenAiConversations.js +2 -1
- package/esm/components/GenAiKeyDriverAnalysis.d.ts +10 -1
- package/esm/components/GenAiKeyDriverAnalysis.d.ts.map +1 -1
- package/esm/components/GenAiKeyDriverAnalysis.js +4 -5
- package/esm/components/customized/ConversationKdaContent.d.ts +8 -0
- package/esm/components/customized/ConversationKdaContent.d.ts.map +1 -0
- package/esm/components/customized/ConversationKdaContent.js +11 -0
- package/esm/components/customized/types.d.ts +25 -1
- package/esm/components/customized/types.d.ts.map +1 -1
- package/esm/components/messages/contents/CustomHyperlink.d.ts.map +1 -1
- package/esm/components/messages/contents/CustomHyperlink.js +3 -0
- package/esm/components/messages/conversationContents/ConversationDashboardContent.js +1 -1
- package/esm/components/messages/conversationContents/ConversationKdaContent.d.ts +2 -1
- package/esm/components/messages/conversationContents/ConversationKdaContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationKdaContent.js +6 -1
- package/esm/components/messages/conversationContents/ConversationMultipartContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationMultipartContent.js +2 -3
- package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.js +10 -7
- package/esm/components/messages/conversationContents/ConversationVisualisation.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualisation.js +16 -3
- package/esm/components/messages/conversationContents/ConversationVisualisationV2.d.ts +26 -0
- package/esm/components/messages/conversationContents/ConversationVisualisationV2.d.ts.map +1 -0
- package/esm/components/messages/conversationContents/ConversationVisualisationV2.js +147 -0
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.d.ts.map +1 -1
- package/esm/components/messages/conversationContents/ConversationVisualizationContent.js +15 -10
- package/esm/components/messages/conversationContents/useKdaEnabled.d.ts +2 -0
- package/esm/components/messages/conversationContents/useKdaEnabled.d.ts.map +1 -0
- package/esm/components/messages/conversationContents/useKdaEnabled.js +8 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -1
- package/esm/localization/bundles/de-DE.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/de-DE.localization-bundle.js +7 -6
- package/esm/localization/bundles/en-AU.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-AU.localization-bundle.js +7 -6
- package/esm/localization/bundles/en-GB.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-GB.localization-bundle.js +7 -6
- package/esm/localization/bundles/es-419.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-419.localization-bundle.js +7 -6
- package/esm/localization/bundles/es-ES.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-ES.localization-bundle.js +7 -6
- package/esm/localization/bundles/fi-FI.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fi-FI.localization-bundle.js +7 -6
- package/esm/localization/bundles/fr-CA.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-CA.localization-bundle.js +7 -6
- package/esm/localization/bundles/fr-FR.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-FR.localization-bundle.js +7 -6
- package/esm/localization/bundles/id-ID.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/id-ID.localization-bundle.js +7 -6
- package/esm/localization/bundles/it-IT.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/it-IT.localization-bundle.js +7 -6
- package/esm/localization/bundles/ja-JP.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ja-JP.localization-bundle.js +7 -6
- package/esm/localization/bundles/ko-KR.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ko-KR.localization-bundle.js +7 -6
- package/esm/localization/bundles/nl-NL.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/nl-NL.localization-bundle.js +7 -6
- package/esm/localization/bundles/pl-PL.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pl-PL.localization-bundle.js +7 -6
- package/esm/localization/bundles/pt-BR.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-BR.localization-bundle.js +7 -6
- package/esm/localization/bundles/pt-PT.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-PT.localization-bundle.js +7 -6
- package/esm/localization/bundles/ru-RU.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ru-RU.localization-bundle.js +7 -6
- package/esm/localization/bundles/sl-SI.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/sl-SI.localization-bundle.js +7 -6
- package/esm/localization/bundles/th-TH.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/th-TH.localization-bundle.js +7 -6
- package/esm/localization/bundles/tr-TR.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/tr-TR.localization-bundle.js +7 -6
- package/esm/localization/bundles/uk-UA.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/uk-UA.localization-bundle.js +7 -6
- package/esm/localization/bundles/vi-VN.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/vi-VN.localization-bundle.js +7 -6
- package/esm/localization/bundles/zh-HK.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-HK.localization-bundle.js +7 -6
- package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hans.localization-bundle.js +7 -6
- package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts +7 -6
- package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hant.localization-bundle.js +7 -6
- package/esm/sdk-ui-gen-ai.d.ts +44 -1
- package/package.json +23 -22
- package/styles/css/main.css +11 -6
- package/styles/css/main.css.map +1 -1
- package/styles/css/messages.css +11 -6
- package/styles/css/messages.css.map +1 -1
- package/styles/scss/messages.scss +14 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
|
-
import { type IGenAIAssistantAgentChooserProps, type IGenAIAssistantAgentItemProps, type IGenAIAssistantAssistantMessageProps, type IGenAIAssistantConversationDateGroupingProps, type IGenAIAssistantConversationDrawerHeaderProps, type IGenAIAssistantConversationFooterProps, type IGenAIAssistantConversationHeaderProps, type IGenAIAssistantConversationItemProps, type IGenAIAssistantConversationVisualizationContentProps, type IGenAIAssistantFeedbackProps, type IGenAIAssistantFollowUpButtonsProps, type IGenAIAssistantFollowUpQuestionProps, type IGenAIAssistantMessageErrorContentProps, type IGenAIAssistantMessageMultipartContentProps, type IGenAIAssistantMessageReasoningContentProps, type IGenAIAssistantMessageTextContentProps, type IGenAIAssistantSlots, type IGenAIAssistantUserMessageProps } from "./customized/types.js";
|
|
2
|
+
import { type IGenAIAssistantAgentChooserProps, type IGenAIAssistantAgentItemProps, type IGenAIAssistantAssistantMessageProps, type IGenAIAssistantConversationDateGroupingProps, type IGenAIAssistantConversationDrawerHeaderProps, type IGenAIAssistantConversationFooterProps, type IGenAIAssistantConversationHeaderProps, type IGenAIAssistantConversationItemProps, type IGenAIAssistantConversationKdaContentProps, type IGenAIAssistantConversationVisualizationContentProps, type IGenAIAssistantFeedbackProps, type IGenAIAssistantFollowUpButtonsProps, type IGenAIAssistantFollowUpQuestionProps, type IGenAIAssistantMessageErrorContentProps, type IGenAIAssistantMessageMultipartContentProps, type IGenAIAssistantMessageReasoningContentProps, type IGenAIAssistantMessageTextContentProps, type IGenAIAssistantSlots, type IGenAIAssistantUserMessageProps } from "./customized/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
@@ -19,6 +19,7 @@ export interface IGenAIAssistantComponents {
|
|
|
19
19
|
MessageReasoningContentComponent: ComponentType<IGenAIAssistantMessageReasoningContentProps>;
|
|
20
20
|
MessageMultipartContentComponent: ComponentType<IGenAIAssistantMessageMultipartContentProps>;
|
|
21
21
|
ConversationVisualizationContentComponent: ComponentType<IGenAIAssistantConversationVisualizationContentProps>;
|
|
22
|
+
ConversationKdaContentComponent: ComponentType<IGenAIAssistantConversationKdaContentProps>;
|
|
22
23
|
FollowUpButtonsComponent: ComponentType<IGenAIAssistantFollowUpButtonsProps>;
|
|
23
24
|
FollowUpQuestionComponent: ComponentType<IGenAIAssistantFollowUpQuestionProps>;
|
|
24
25
|
FeedbackComponent: ComponentType<IGenAIAssistantFeedbackProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomizationContext.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAA6B,MAAM,OAAO,CAAC;AAEtE,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,oCAAoC,EACzC,KAAK,4CAA4C,EACjD,KAAK,4CAA4C,EACjD,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC3C,KAAK,oCAAoC,EACzC,KAAK,oDAAoD,EACzD,KAAK,4BAA4B,EACjC,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,uCAAuC,EAC5C,KAAK,2CAA2C,EAChD,KAAK,2CAA2C,EAChD,KAAK,sCAAsC,EAC3C,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACvC,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,sBAAsB,EAAE,aAAa,CAAC;IACtC,mBAAmB,EAAE,aAAa,CAAC;IACnC,kBAAkB,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;IACjE,yBAAyB,EAAE,aAAa,CAAC,oCAAoC,CAAC,CAAC;IAC/E,iCAAiC,EAAE,aAAa,CAAC,4CAA4C,CAAC,CAAC;IAC/F,2BAA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mC,CAAC,CAAC;IAC7E,yBAAyB,EAAE,aAAa,CAAC,oCAAoC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;IAC/D,qBAAqB,EAAE,aAAa,CAAC,gCAAgC,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,UAAU,CAAC,EAAE,yBAAyB,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,+CAE/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,iCAM5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomizationProvider.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CustomizationProvider.d.ts","sourceRoot":"","sources":["../../src/components/CustomizationProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAsBpE,OAAO,EAkBH,KAAK,oBAAoB,EAE5B,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,0BAA0B,GAAG;IACrC,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AA2NF,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,2CAoCvG"}
|
|
@@ -10,6 +10,7 @@ import { DefaultConversationDrawerHeader } from "./customized/ConversationDrawer
|
|
|
10
10
|
import { DefaultConversationFooter } from "./customized/ConversationFooter.js";
|
|
11
11
|
import { DefaultConversationHeader } from "./customized/ConversationHeader.js";
|
|
12
12
|
import { DefaultConversationItem } from "./customized/ConversationItem.js";
|
|
13
|
+
import { DefaultConversationKdaContent } from "./customized/ConversationKdaContent.js";
|
|
13
14
|
import { DefaultConversationVisualizationContent } from "./customized/ConversationVisualizationContent.js";
|
|
14
15
|
import { DefaultDisclaimer } from "./customized/Disclaimer.js";
|
|
15
16
|
import { DefaultFeedback } from "./customized/Feedback.js";
|
|
@@ -147,6 +148,14 @@ function ConversationVisualizationContentSlotRenderer(props) {
|
|
|
147
148
|
}
|
|
148
149
|
return _jsx(DefaultConversationVisualizationContent, { ...props });
|
|
149
150
|
}
|
|
151
|
+
function ConversationKdaContentSlotRenderer(props) {
|
|
152
|
+
const { slots } = useContext(customizationContext);
|
|
153
|
+
const ConversationKdaContentSlot = slots?.ConversationKdaContent;
|
|
154
|
+
if (ConversationKdaContentSlot) {
|
|
155
|
+
return _jsx(ConversationKdaContentSlot, { Default: DefaultConversationKdaContent, defaultProps: props });
|
|
156
|
+
}
|
|
157
|
+
return _jsx(DefaultConversationKdaContent, { ...props });
|
|
158
|
+
}
|
|
150
159
|
function FollowUpButtonsSlotRenderer(props) {
|
|
151
160
|
const { slots } = useContext(customizationContext);
|
|
152
161
|
const FollowUpButtonsSlot = slots?.FollowUpButtons;
|
|
@@ -196,6 +205,7 @@ export function CustomizationProvider({ children, slots }) {
|
|
|
196
205
|
MessageReasoningContentComponent: MessageReasoningContentSlotRenderer,
|
|
197
206
|
MessageMultipartContentComponent: MessageMultipartContentSlotRenderer,
|
|
198
207
|
ConversationVisualizationContentComponent: ConversationVisualizationContentSlotRenderer,
|
|
208
|
+
ConversationKdaContentComponent: ConversationKdaContentSlotRenderer,
|
|
199
209
|
FollowUpButtonsComponent: FollowUpButtonsSlotRenderer,
|
|
200
210
|
FollowUpQuestionComponent: FollowUpQuestionSlotRenderer,
|
|
201
211
|
FeedbackComponent: FeedbackSlotRenderer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAIChat.d.ts","sourceRoot":"","sources":["../../src/components/GenAIChat.tsx"],"names":[],"mappings":"AAGA,OAAO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AAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAyDxD;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,uBAAiB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2024-2026 GoodData Corporation
|
|
3
3
|
import { BackendProvider, WorkspaceProvider, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
4
|
+
import { OverlayAlignOnParentScrollProvider } from "@gooddata/sdk-ui-kit";
|
|
4
5
|
import { useDashboardAmbientContext } from "../context/hooks/useDashboardAmbientContext.js";
|
|
5
6
|
import { IntlWrapper } from "../localization/IntlWrapper.js";
|
|
6
7
|
import { PermissionsProvider } from "../permissions/PermissionsContext.js";
|
|
@@ -31,5 +32,5 @@ function GenAIContent(props) {
|
|
|
31
32
|
const { permissions, loading } = usePermissions();
|
|
32
33
|
useDashboardAmbientContext(dashboardSelector);
|
|
33
34
|
useDataLoad();
|
|
34
|
-
return (_jsx(ConfigProvider, { catalogItems: catalogItems, canFullControl: props.disableFullControl ? false : (permissions.canManageProject ?? false), canManage: props.disableManage ? false : (permissions.canManageProject ?? false), canAnalyze: props.disableAnalyze ? false : (permissions.canAnalyzeWorkspace ?? false), children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(GenAIChatWrapper, { initializing: loading, className: className }) }) }));
|
|
35
|
+
return (_jsx(ConfigProvider, { catalogItems: catalogItems, canFullControl: props.disableFullControl ? false : (permissions.canManageProject ?? false), canManage: props.disableManage ? false : (permissions.canManageProject ?? false), canAnalyze: props.disableAnalyze ? false : (permissions.canAnalyzeWorkspace ?? false), children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(OverlayAlignOnParentScrollProvider, { children: _jsx(GenAIChatWrapper, { initializing: loading, className: className }) }) }) }));
|
|
35
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAiConversations.d.ts","sourceRoot":"","sources":["../../src/components/GenAiConversations.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenAiConversations.d.ts","sourceRoot":"","sources":["../../src/components/GenAiConversations.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAY1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAInE;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IACtE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAiDhE"}
|
|
@@ -5,6 +5,7 @@ import cx from "classnames";
|
|
|
5
5
|
import noop from "lodash-es/noop.js";
|
|
6
6
|
import { useDispatch, useSelector } from "react-redux";
|
|
7
7
|
import { BackendProvider, WorkspaceProvider, useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
8
|
+
import { OverlayAlignOnParentScrollProvider } from "@gooddata/sdk-ui-kit";
|
|
8
9
|
import { IntlWrapper } from "../localization/IntlWrapper.js";
|
|
9
10
|
import { PermissionsProvider } from "../permissions/PermissionsContext.js";
|
|
10
11
|
import { usePermissions } from "../permissions/usePermissions.js";
|
|
@@ -48,5 +49,5 @@ function GenAIConversationsContent(props) {
|
|
|
48
49
|
dispatch(setCurrentConversationAction({ conversation }));
|
|
49
50
|
onConversationSelect(conversation);
|
|
50
51
|
}, [dispatch, onConversationSelect]);
|
|
51
|
-
return (_jsx(ConfigProvider, { catalogItems: catalogItems, allowNativeLinks: false, canFullControl: false, canManage: false, canAnalyze: false, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(GenAIChatConversations, { wrapper: _jsx("div", { className: classNames }), onSelect: onSelectConversation }) }) }));
|
|
52
|
+
return (_jsx(ConfigProvider, { catalogItems: catalogItems, allowNativeLinks: false, canFullControl: false, canManage: false, canAnalyze: false, children: _jsx(CustomizationProvider, { slots: slots, children: _jsx(OverlayAlignOnParentScrollProvider, { children: _jsx(GenAIChatConversations, { wrapper: _jsx("div", { className: classNames }), onSelect: onSelectConversation }) }) }) }));
|
|
52
53
|
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
export type GenAiKeyDriverAnalysisProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Locale to use for the dialog.
|
|
7
|
+
*/
|
|
8
|
+
locale?: string;
|
|
9
|
+
};
|
|
1
10
|
/**
|
|
2
11
|
* UI component that renders the Key Driver Analysis dialog when requested in the GenAI store.
|
|
3
12
|
*
|
|
4
13
|
* @public
|
|
5
14
|
*/
|
|
6
|
-
export declare function GenAiKeyDriverAnalysis(): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export declare function GenAiKeyDriverAnalysis({ locale }: GenAiKeyDriverAnalysisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
16
|
//# sourceMappingURL=GenAiKeyDriverAnalysis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenAiKeyDriverAnalysis.d.ts","sourceRoot":"","sources":["../../src/components/GenAiKeyDriverAnalysis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenAiKeyDriverAnalysis.d.ts","sourceRoot":"","sources":["../../src/components/GenAiKeyDriverAnalysis.tsx"],"names":[],"mappings":"AAwBA;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE,2BAA2B,kDAqF7E"}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useEffect, useMemo } from "react";
|
|
4
|
-
import { useIntl } from "react-intl";
|
|
5
4
|
import { useDispatch, useSelector } from "react-redux";
|
|
6
5
|
import { IntlWrapper, KdaDialogController, KdaStoreProvider } from "@gooddata/sdk-ui-dashboard/internal";
|
|
7
6
|
import { useOverlayController } from "@gooddata/sdk-ui-kit";
|
|
8
7
|
import { keyDriverAnalysisSelector, settingsSelector, tagsSelector, } from "../store/chatWindow/chatWindowSelectors.js";
|
|
9
8
|
import { setKeyDriverAnalysisAction, setKeyDriverAnalysisMinimizedAction, setKeyDriverAnalysisMountedAction, } from "../store/chatWindow/chatWindowSlice.js";
|
|
10
9
|
import { returnFocusToKdaTrigger } from "../utils/kdaReturnFocus.js";
|
|
10
|
+
const DEFAULT_LOCALE = "en-US";
|
|
11
11
|
/**
|
|
12
12
|
* UI component that renders the Key Driver Analysis dialog when requested in the GenAI store.
|
|
13
13
|
*
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
export function GenAiKeyDriverAnalysis() {
|
|
17
|
-
const intl = useIntl();
|
|
16
|
+
export function GenAiKeyDriverAnalysis({ locale }) {
|
|
18
17
|
const parentOverlayController = useOverlayController();
|
|
19
18
|
const settings = useSelector(settingsSelector);
|
|
20
19
|
const tags = useSelector(tagsSelector);
|
|
21
20
|
const keyDriverAnalysis = useSelector(keyDriverAnalysisSelector);
|
|
22
|
-
const
|
|
21
|
+
const loc = locale ?? settings?.locale ?? DEFAULT_LOCALE;
|
|
23
22
|
const separators = settings?.separators;
|
|
24
23
|
const includeTags = tags?.includeTags;
|
|
25
24
|
const excludeTags = tags?.excludeTags;
|
|
@@ -54,5 +53,5 @@ export function GenAiKeyDriverAnalysis() {
|
|
|
54
53
|
if (!keyDriverAnalysis) {
|
|
55
54
|
return null;
|
|
56
55
|
}
|
|
57
|
-
return (_jsx(IntlWrapper, { locale:
|
|
56
|
+
return (_jsx(IntlWrapper, { locale: loc, children: _jsx(KdaStoreProvider, { config: config, children: _jsx(KdaDialogController, { requestedDefinition: keyDriverAnalysis, parentOverlayController: parentOverlayController, separators: separators, showCloseButton: true, locale: loc, includeTags: includeTags, excludeTags: excludeTags, onRequestedDefinitionChange: onRequestedDefinitionChange, onClose: onCloseKeyDriverAnalysis, onToggle: onToggleKeyDriverAnalysis }) }) }));
|
|
58
57
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IGenAIAssistantConversationKdaContentProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default implementation of the ConversationKdaContent slot.
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export declare function DefaultConversationKdaContent(props: IGenAIAssistantConversationKdaContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ConversationKdaContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationKdaContent.d.ts","sourceRoot":"","sources":["../../../src/components/customized/ConversationKdaContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0CAA0C,EAAE,MAAM,YAAY,CAAC;AAE7E;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,0CAA0C,2CAE9F"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { ConversationKdaContent } from "../messages/conversationContents/ConversationKdaContent.js";
|
|
4
|
+
/**
|
|
5
|
+
* Default implementation of the ConversationKdaContent slot.
|
|
6
|
+
*
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export function DefaultConversationKdaContent(props) {
|
|
10
|
+
return _jsx(ConversationKdaContent, { ...props });
|
|
11
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType } from "react";
|
|
2
|
-
import { type IChatConversationVisualisationContent, type IChatSuggestion } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type IChatConversationVisualisationContent, type IChatKdaDefinition, type IChatSuggestion } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import { type GenAIChatEffort } from "@gooddata/sdk-model";
|
|
4
4
|
import { type ISlotProps, type IUiMenuGroupItemProps, type IUiMenuInteractiveItemProps, type IUiMenuInteractiveItemWrapperProps, type IUiMenuItem } from "@gooddata/sdk-ui-kit";
|
|
5
5
|
import { type GenAIAgent, type IChatConversationErrorContent, type IChatConversationLocal, type IChatConversationLocalItem, type IChatConversationMultipartLocalPart, type TextContentObject } from "../../model.js";
|
|
@@ -264,6 +264,25 @@ export type IGenAIAssistantConversationVisualizationContentProps = {
|
|
|
264
264
|
*/
|
|
265
265
|
enableKeyDriverAnalysis?: boolean;
|
|
266
266
|
};
|
|
267
|
+
/**
|
|
268
|
+
* Properties for the ConversationKdaContent slot.
|
|
269
|
+
* @alpha
|
|
270
|
+
*/
|
|
271
|
+
export type IGenAIAssistantConversationKdaContentProps = {
|
|
272
|
+
/**
|
|
273
|
+
* The key driver analysis definition to render.
|
|
274
|
+
*/
|
|
275
|
+
kda: IChatKdaDefinition;
|
|
276
|
+
/**
|
|
277
|
+
* Additional CSS class name.
|
|
278
|
+
*/
|
|
279
|
+
className?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Controls whether key driver analysis content is enabled.
|
|
282
|
+
* When undefined, defaults to whether KeyDriverAnalysis is mounted and the enableChangeAnalysis setting is active.
|
|
283
|
+
*/
|
|
284
|
+
enableKeyDriverAnalysis?: boolean;
|
|
285
|
+
};
|
|
267
286
|
/**
|
|
268
287
|
* Properties for the FollowUpButtons slot.
|
|
269
288
|
* @alpha
|
|
@@ -448,6 +467,11 @@ export interface IGenAIAssistantSlots {
|
|
|
448
467
|
* Custom React component rendered for a visualization part in multipart content.
|
|
449
468
|
*/
|
|
450
469
|
ConversationVisualizationContent?: ComponentType<ISlotProps<IGenAIAssistantConversationVisualizationContentProps>>;
|
|
470
|
+
/**
|
|
471
|
+
* @alpha
|
|
472
|
+
* Custom React component rendered for a key driver analysis part in multipart content.
|
|
473
|
+
*/
|
|
474
|
+
ConversationKdaContent?: ComponentType<ISlotProps<IGenAIAssistantConversationKdaContentProps>>;
|
|
451
475
|
/**
|
|
452
476
|
* @alpha
|
|
453
477
|
* Custom React component rendered for follow up buttons of a message.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/customized/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/customized/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACH,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,kCAAkC,EACvC,KAAK,WAAW,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,KAAK,UAAU,EACf,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACzB,MAAM,gBAAgB,CAAC;A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AmC,CAAC,CAAC,CAAC;IAEjF;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAEnE;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAEnF;;;OAGG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC,CAAC;CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomHyperlink.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/CustomHyperlink.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAOhE,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,oBAAoB,GAAG,uBAAuB,GAAG;IAClD,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CustomHyperlink.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/contents/CustomHyperlink.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAOhE,MAAM,MAAM,uBAAuB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,oBAAoB,GAAG,uBAAuB,GAAG;IAClD,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,YAAY,CAAC,EAAE,sBAAsB,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,oBAAoB,oDA8FpG;AAwBD,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,uBAAuB,2CAOtE"}
|
|
@@ -77,6 +77,9 @@ export function CustomHyperlinkComponent({ href, text, settings, conversation })
|
|
|
77
77
|
if (parsedRef.type === "visualization" && !canManageVisualisations) {
|
|
78
78
|
return plainText;
|
|
79
79
|
}
|
|
80
|
+
if (parsedRef.type === "report" && !canManage) {
|
|
81
|
+
return plainText;
|
|
82
|
+
}
|
|
80
83
|
if (allowNativeLinks) {
|
|
81
84
|
return (_jsx("a", { className: "gd-hyperlink", href: parsedRef.itemUrl, onClick: handleLinkClick, children: _jsx("span", { className: "gd-hyperlink-text", children: plainText }) }));
|
|
82
85
|
}
|
|
@@ -19,7 +19,7 @@ export function ConversationDashboardContent(props) {
|
|
|
19
19
|
const useHostedDashboards = Boolean(useSelector(settingsSelector)?.enableShellApplication_dashboards);
|
|
20
20
|
const conversation = useSelector(conversationSelector);
|
|
21
21
|
const { dashboardCheckLoading, dashboardSaved } = useDashboardSaveCheck(part, dashboard, true);
|
|
22
|
-
const isDashboardSaved = dashboardSaved
|
|
22
|
+
const isDashboardSaved = dashboardSaved && part.saved;
|
|
23
23
|
const handleOpenDashboard = useMemo(() => {
|
|
24
24
|
if (!dashboard) {
|
|
25
25
|
return undefined;
|
|
@@ -2,6 +2,7 @@ import { type IChatKdaDefinition } from "@gooddata/sdk-backend-spi";
|
|
|
2
2
|
export type ConversationKdaContentProps = {
|
|
3
3
|
kda: IChatKdaDefinition;
|
|
4
4
|
className?: string;
|
|
5
|
+
enableKeyDriverAnalysis?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function ConversationKdaContent({ className, kda }: ConversationKdaContentProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ConversationKdaContent({ className, kda, enableKeyDriverAnalysis, }: ConversationKdaContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
8
|
//# sourceMappingURL=ConversationKdaContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationKdaContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationKdaContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationKdaContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationKdaContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAapE,MAAM,MAAM,2BAA2B,GAAG;IACtC,GAAG,EAAE,kBAAkB,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,EACnC,SAAS,EACT,GAAG,EACH,uBAAuB,GAC1B,EAAE,2BAA2B,kDAgD7B"}
|
|
@@ -11,13 +11,15 @@ import { storeKdaReturnFocusFromActiveElement } from "../../../utils/kdaReturnFo
|
|
|
11
11
|
import { collectReferences } from "../../completion/references.js";
|
|
12
12
|
import { MarkdownComponent } from "../contents/Markdown.js";
|
|
13
13
|
import { useKdaDefinition, useKdaInfo } from "./useKdaDefinition.js";
|
|
14
|
-
|
|
14
|
+
import { useKdaEnabled } from "./useKdaEnabled.js";
|
|
15
|
+
export function ConversationKdaContent({ className, kda, enableKeyDriverAnalysis, }) {
|
|
15
16
|
const intl = useIntl();
|
|
16
17
|
const dispatch = useDispatch();
|
|
17
18
|
const classNames = cx("gd-gen-ai-chat__conversation__item__content", "gd-gen-ai-chat__conversation__item__content--kda", className);
|
|
18
19
|
const catalogItems = useSelector(catalogItemsSelector);
|
|
19
20
|
const locale = useSelector((state) => settingsSelector(state)?.locale);
|
|
20
21
|
const format = useSelector((state) => settingsSelector(state)?.responsiveUiDateFormat);
|
|
22
|
+
const enableChangeAnalysis = useKdaEnabled(enableKeyDriverAnalysis);
|
|
21
23
|
const splitter = intl.formatMessage({ id: "gd.gen-ai.changeAnalysis.splitter" });
|
|
22
24
|
const definition = useKdaDefinition(kda, format, locale);
|
|
23
25
|
const { range, title } = useKdaInfo(catalogItems, definition, splitter);
|
|
@@ -29,5 +31,8 @@ export function ConversationKdaContent({ className, kda }) {
|
|
|
29
31
|
storeKdaReturnFocusFromActiveElement();
|
|
30
32
|
dispatch(setKeyDriverAnalysisAction({ keyDriverAnalysis: definition }));
|
|
31
33
|
}, [dispatch, definition]);
|
|
34
|
+
if (!enableChangeAnalysis) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
32
37
|
return (_jsxs("div", { className: classNames, children: [_jsx(MarkdownComponent, { allowMarkdown: true, references: references, children: intl.formatMessage({ id: "gd.gen-ai.kda.default_message" }, { range, title }) }), _jsx("div", { className: "gd-gen-ai-chat__conversation__item__content--kda__button", children: _jsx(UiButton, { label: intl.formatMessage({ id: "gd.gen-ai.changeAnalysis.explain_the_change" }), variant: "secondary", iconBefore: "explainai", onClick: handleExplainTheChange }) })] }));
|
|
33
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationMultipartContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationMultipartContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACzB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConversationMultipartContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationMultipartContent.tsx"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACzB,MAAM,mBAAmB,CAAC;AAY3B,MAAM,MAAM,iCAAiC,GAAG;IAC5C,OAAO,EAAE,0BAA0B,CAAC;IACpC,KAAK,EAAE,mCAAmC,EAAE,CAAC;IAC7C,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EACzC,OAAO,EACP,KAAK,EACL,UAAU,EACV,MAAM,GACT,EAAE,iCAAiC,2CA0GnC"}
|
|
@@ -6,14 +6,13 @@ import { useCustomization } from "../../CustomizationContext.js";
|
|
|
6
6
|
import { ConversationAlertProposalContent } from "./ConversationAlertProposalContent.js";
|
|
7
7
|
import { ConversationClarifyingQuestionsContent } from "./ConversationClarifyingQuestionsContent.js";
|
|
8
8
|
import { ConversationDashboardContent } from "./ConversationDashboardContent.js";
|
|
9
|
-
import { ConversationKdaContent } from "./ConversationKdaContent.js";
|
|
10
9
|
import { ConversationPublisherDocumentContent } from "./ConversationPublisherDocumentContent.js";
|
|
11
10
|
import { ConversationSearchContent } from "./ConversationSearchContent.js";
|
|
12
11
|
import { ConversationTextContent } from "./ConversationTextContent.js";
|
|
13
12
|
import { ConversationWhatIfContent } from "./ConversationWhatIfContent.js";
|
|
14
13
|
export function ConversationMultipartContent({ message, parts, references, isLast, }) {
|
|
15
14
|
const intl = useIntl();
|
|
16
|
-
const { ConversationVisualizationContentComponent } = useCustomization();
|
|
15
|
+
const { ConversationKdaContentComponent, ConversationVisualizationContentComponent } = useCustomization();
|
|
17
16
|
const whatIf = loadWhatIfScenarios(parts);
|
|
18
17
|
return (_jsx(_Fragment, { children: parts?.map((part, index) => {
|
|
19
18
|
if (part.type === "text") {
|
|
@@ -32,7 +31,7 @@ export function ConversationMultipartContent({ message, parts, references, isLas
|
|
|
32
31
|
return (_jsx(ConversationSearchContent, { results: part.searchResults, relationships: part.relationships, keywords: part.keywords }, index));
|
|
33
32
|
}
|
|
34
33
|
if (part.type === "kda") {
|
|
35
|
-
return _jsx(
|
|
34
|
+
return _jsx(ConversationKdaContentComponent, { kda: part.kda }, index);
|
|
36
35
|
}
|
|
37
36
|
if (part.type === "whatIf") {
|
|
38
37
|
return (_jsx(ConversationWhatIfContent, { message: message, part: part, whatIf: whatIf }, index));
|
package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationPublisherDocumentContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationPublisherDocumentContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAMpE,MAAM,MAAM,yCAAyC,GAAG;IACpD,OAAO,EAAE,0BAA0B,CAAC;IACpC,iBAAiB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,oCAAoC,CAAC,EACjD,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,cAAc,EACd,SAAS,GACZ,EAAE,yCAAyC,
|
|
1
|
+
{"version":3,"file":"ConversationPublisherDocumentContent.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationPublisherDocumentContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAIxE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAMpE,MAAM,MAAM,yCAAyC,GAAG;IACpD,OAAO,EAAE,0BAA0B,CAAC;IACpC,iBAAiB,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,oCAAoC,CAAC,EACjD,OAAO,EACP,iBAAiB,EACjB,KAAK,EACL,cAAc,EACd,SAAS,GACZ,EAAE,yCAAyC,kDAmG3C"}
|
package/esm/components/messages/conversationContents/ConversationPublisherDocumentContent.js
CHANGED
|
@@ -21,13 +21,16 @@ export function ConversationPublisherDocumentContent({ message, publisherDocumen
|
|
|
21
21
|
if (!publisherDocument) {
|
|
22
22
|
return (_jsx("div", { className: "gd-gen-ai-chat__conversation__item__content--error", children: intl.formatMessage({ id: "gd.gen-ai.publisherDocument.unavailable" }) }));
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
// The Publisher app needs workspace manage; a user who has lost it gets a disabled Open button.
|
|
25
|
+
const itemUrl = config.canManage
|
|
26
|
+
? getPublisherDocumentItemUrl({
|
|
27
|
+
workspaceId,
|
|
28
|
+
saved,
|
|
29
|
+
baseDocumentId,
|
|
30
|
+
conversationId,
|
|
31
|
+
itemId: message.id,
|
|
32
|
+
})
|
|
33
|
+
: undefined;
|
|
31
34
|
// The card only opens the version: a change to the document in the editor is applied there by the editor.
|
|
32
35
|
const buttonLabel = intl.formatMessage({ id: "gd.gen-ai.publisherDocument.open" });
|
|
33
36
|
const handleOpen = itemUrl
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAGH,KAAK,aAAa,EAElB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ConversationVisualisation.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisation.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAGH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAIrB,KAAK,WAAW,EAWnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAInB,MAAM,kBAAkB,CAAC;AAwB1B,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAkBpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AA2CpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EACtC,OAAO,EACP,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,cAAqB,EACrB,oBAA4B,EAC5B,yBAAiC,EACjC,mBAA0B,EAC1B,4BAAoC,GACvC,EAAE,8BAA8B,2CAmdhC"}
|
|
@@ -3,7 +3,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useDispatch } from "react-redux";
|
|
6
|
-
import { attributeAlias, attributeLocalId, idRef, isAttribute, isMeasure, newAttribute, } from "@gooddata/sdk-model";
|
|
6
|
+
import { attributeAlias, attributeLocalId, idRef, isAttribute, isMeasure, measureLocalId, newAttribute, sortEntityIds, } from "@gooddata/sdk-model";
|
|
7
7
|
import { AreaChart, BarChart, BubbleChart, BulletChart, ColumnChart, ComboChart, DependencyWheelChart, DonutChart, FunnelChart, Headline, Heatmap, LineChart, PieChart, PyramidChart, RadarChart, Repeater, SankeyChart, ScatterPlot, Treemap, WaterfallChart, } from "@gooddata/sdk-ui-charts";
|
|
8
8
|
import { getKdaKeyDriverCombinations, } from "@gooddata/sdk-ui-dashboard";
|
|
9
9
|
import { GeoAreaChart, GeoPushpinChart } from "@gooddata/sdk-ui-geo";
|
|
@@ -303,7 +303,8 @@ const renderAreaChart = (locale, visualization, buckets, filters, sortBy, colorP
|
|
|
303
303
|
};
|
|
304
304
|
const renderBarChart = (locale, buckets, filters, sortBy, colorPalette, onError, onSuccess, onDrill, props) => {
|
|
305
305
|
const { metrics, view, stack } = buckets;
|
|
306
|
-
|
|
306
|
+
const measures = stack[0] ? metrics.slice(0, 1) : metrics;
|
|
307
|
+
return (_jsx(BarChart, { locale: locale, height: VIS_HEIGHT, measures: measures, viewBy: view, stackBy: stack[0], sortBy: sortsOver(sortBy, [...view, ...stack.slice(0, 1)], measures), config: {
|
|
307
308
|
...defaultsChartOptions,
|
|
308
309
|
...visualizationTooltipOptions,
|
|
309
310
|
...legendTooltipOptions,
|
|
@@ -316,7 +317,8 @@ const renderBarChart = (locale, buckets, filters, sortBy, colorPalette, onError,
|
|
|
316
317
|
};
|
|
317
318
|
const renderColumnChart = (locale, buckets, filters, sortBy, colorPalette, onError, onSuccess, onDrill, props) => {
|
|
318
319
|
const { metrics, view, stack } = buckets;
|
|
319
|
-
|
|
320
|
+
const measures = stack[0] ? metrics.slice(0, 1) : metrics;
|
|
321
|
+
return (_jsx(ColumnChart, { locale: locale, height: VIS_HEIGHT, measures: measures, viewBy: view, stackBy: stack[0], sortBy: sortsOver(sortBy, [...view, ...stack.slice(0, 1)], measures), config: {
|
|
320
322
|
...defaultsChartOptions,
|
|
321
323
|
...visualizationTooltipOptions,
|
|
322
324
|
...legendTooltipOptions,
|
|
@@ -536,6 +538,17 @@ const renderHeadline = (locale, theme, buckets, filters, colorPalette, onError,
|
|
|
536
538
|
separators: props.separators,
|
|
537
539
|
}, drillableItems: props.drillableItems, onDrill: onDrill, onError: onError, onExportReady: onSuccess, execConfig: props.execConfig }) }));
|
|
538
540
|
};
|
|
541
|
+
// Keeps only the sorts the chart can execute: a sort that references an attribute or measure
|
|
542
|
+
// the chart does not receive (e.g. the extra measures a stacked bar drops) fails the whole render.
|
|
543
|
+
function sortsOver(sortBy, attributes, measures) {
|
|
544
|
+
const attributeIds = attributes.map(attributeLocalId);
|
|
545
|
+
const measureIds = measures.map(measureLocalId);
|
|
546
|
+
return sortBy.filter((sort) => {
|
|
547
|
+
const { attributeIdentifiers, measureIdentifiers } = sortEntityIds(sort);
|
|
548
|
+
return (attributeIdentifiers.every((id) => attributeIds.includes(id)) &&
|
|
549
|
+
measureIdentifiers.every((id) => measureIds.includes(id)));
|
|
550
|
+
});
|
|
551
|
+
}
|
|
539
552
|
function useBucketData(buckets) {
|
|
540
553
|
return useMemo(() => {
|
|
541
554
|
const metrics = buckets.find((b) => b.localIdentifier === "measures")?.items.filter(isMeasure) ?? [];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type IChatConversationVisualisationContent, type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type IColorPalette, type IExecutionConfig, type ISeparators } from "@gooddata/sdk-model";
|
|
3
|
+
import { type GoodDataSdkError, type IDrillEvent } from "@gooddata/sdk-ui";
|
|
4
|
+
import { type IDashboardKeyDriverCombinationItem } from "@gooddata/sdk-ui-dashboard";
|
|
5
|
+
import { type IChatConversationLocalItem } from "../../../model.js";
|
|
6
|
+
export type ConversationVisualisationProps = {
|
|
7
|
+
message: IChatConversationLocalItem;
|
|
8
|
+
visualization: NonNullable<IChatConversationVisualisationContent["visualization"]>;
|
|
9
|
+
colorPalette?: IColorPalette;
|
|
10
|
+
separators?: ISeparators;
|
|
11
|
+
execConfig?: IExecutionConfig;
|
|
12
|
+
settings?: IUserWorkspaceSettings;
|
|
13
|
+
agGridToken?: string;
|
|
14
|
+
isTable?: boolean;
|
|
15
|
+
onVisualisationError?: (error: GoodDataSdkError) => void;
|
|
16
|
+
onDrillFired?: (data: {
|
|
17
|
+
keyDriverData: IDashboardKeyDriverCombinationItem[];
|
|
18
|
+
event: IDrillEvent;
|
|
19
|
+
} | null) => void;
|
|
20
|
+
enableDrilling?: boolean;
|
|
21
|
+
enableChangeAnalysis?: boolean;
|
|
22
|
+
enableSecondGranularities?: boolean;
|
|
23
|
+
enableAccessibleChartTooltip?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare function ConversationVisualisation({ message, colorPalette, separators, visualization, execConfig, settings, agGridToken, isTable, onVisualisationError, onDrillFired, enableDrilling, enableChangeAnalysis, enableSecondGranularities, enableAccessibleChartTooltip, }: ConversationVisualisationProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=ConversationVisualisationV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationVisualisationV2.d.ts","sourceRoot":"","sources":["../../../../src/components/messages/conversationContents/ConversationVisualisationV2.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,qCAAqC,EAC1C,KAAK,sBAAsB,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,KAAK,aAAa,EAElB,KAAK,gBAAgB,EAGrB,KAAK,WAAW,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EACH,KAAK,kCAAkC,EAE1C,MAAM,4BAA4B,CAAC;AAQpC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAiDpE,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,0BAA0B,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC,qCAAqC,CAAC,eAAe,CAAC,CAAC,CAAC;IACnF,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CACX,IAAI,EAAE;QACF,aAAa,EAAE,kCAAkC,EAAE,CAAC;QACpD,KAAK,EAAE,WAAW,CAAC;KACtB,GAAG,IAAI,KACP,IAAI,CAAC;IACV,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC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