@gooddata/sdk-ui-gen-ai 11.55.0-alpha.2 → 11.55.0-alpha.3
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 +4 -4
- package/esm/components/GenAIChatContextIndicator.d.ts +2 -2
- package/esm/components/GenAIChatContextIndicator.d.ts.map +1 -1
- package/esm/components/GenAIChatContextIndicator.js +81 -13
- package/esm/components/GenAiChatContextChooser.d.ts.map +1 -1
- package/esm/components/GenAiChatContextChooser.js +4 -3
- package/esm/components/GenAiChatContextChooserBody.d.ts +3 -1
- package/esm/components/GenAiChatContextChooserBody.d.ts.map +1 -1
- package/esm/components/GenAiChatContextChooserBody.js +7 -4
- package/esm/components/Input.js +1 -1
- package/esm/components/hooks/useContextChangeAnnouncement.d.ts +2 -2
- package/esm/components/hooks/useContextChangeAnnouncement.d.ts.map +1 -1
- package/esm/components/hooks/useContextChangeAnnouncement.js +9 -4
- package/esm/components/hooks/useContextItems.d.ts +9 -3
- package/esm/components/hooks/useContextItems.d.ts.map +1 -1
- package/esm/components/hooks/useContextItems.js +51 -8
- package/esm/context/addContextReference.d.ts +0 -2
- package/esm/context/addContextReference.d.ts.map +1 -1
- package/esm/context/addContextReference.js +12 -35
- package/esm/context/collectContextReferences.d.ts +2 -2
- package/esm/context/collectContextReferences.d.ts.map +1 -1
- package/esm/context/collectContextReferences.js +22 -20
- package/esm/context/removeContextReference.d.ts +2 -16
- package/esm/context/removeContextReference.d.ts.map +1 -1
- package/esm/context/removeContextReference.js +7 -70
- package/esm/context/selectContextReferences.d.ts +5 -0
- package/esm/context/selectContextReferences.d.ts.map +1 -0
- package/esm/context/selectContextReferences.js +68 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +8 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.js +8 -0
- package/esm/localization/bundles/zh-HK.localization-bundle.js +9 -9
- package/esm/store/chatWindow/chatWindowSelectors.d.ts +2 -1
- package/esm/store/chatWindow/chatWindowSelectors.d.ts.map +1 -1
- package/esm/store/chatWindow/chatWindowSelectors.js +1 -0
- package/esm/store/chatWindow/chatWindowSlice.d.ts +2 -2
- package/esm/store/chatWindow/chatWindowSlice.d.ts.map +1 -1
- package/esm/store/chatWindow/chatWindowSlice.js +11 -6
- package/esm/types.d.ts +22 -0
- package/esm/types.d.ts.map +1 -1
- package/package.json +20 -20
- package/styles/css/main.css +4 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/main.scss +5 -0
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
export declare function removeContextReference(context: IGenAIUserContext | undefined, reference?: IGenAIContextObject): IGenAIUserContext | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* Removes what `ambient` put in `context` on its own - the viewed dashboard and its own references.
|
|
6
|
-
* The user's own picks stay, the objects pinned from that dashboard included.
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export declare function removeAmbientContribution(context: IGenAIUserContext | undefined, ambient: IGenAIUserContext | undefined): IGenAIUserContext | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Removes the references the newly opened dashboard covers itself - its own ref and the
|
|
12
|
-
* visualizations it renders - so nothing added earlier sits in the context twice.
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function removeReferencesCoveredByAmbient(context: IGenAIUserContext | undefined, ambient: IGenAIUserContext | undefined): IGenAIUserContext | undefined;
|
|
16
|
-
export declare function removeUserContextReferences(context: IGenAIUserContext | undefined): IGenAIUserContext | undefined;
|
|
1
|
+
import { type IGenAIContextObject, type StoreContext } from "../types.js";
|
|
2
|
+
export declare function removeContextReference(context: StoreContext, reference?: IGenAIContextObject): StoreContext;
|
|
17
3
|
//# sourceMappingURL=removeContextReference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeContextReference.d.ts","sourceRoot":"","sources":["../../src/context/removeContextReference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"removeContextReference.d.ts","sourceRoot":"","sources":["../../src/context/removeContextReference.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAI1E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAyC3G"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { areObjRefsEqual,
|
|
2
|
+
import { areObjRefsEqual, } from "@gooddata/sdk-model";
|
|
3
3
|
import { undefinedIfEmpty } from "./build.js";
|
|
4
4
|
export function removeContextReference(context, reference) {
|
|
5
5
|
if (!context) {
|
|
6
|
-
return
|
|
6
|
+
return context;
|
|
7
7
|
}
|
|
8
8
|
if (!reference) {
|
|
9
9
|
return context;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const active = context.active;
|
|
12
|
+
const newContext = { ...active };
|
|
12
13
|
// remove dashboard reference
|
|
13
14
|
if (reference.where === "view.dashboard" &&
|
|
14
15
|
areObjRefsEqual(newContext.view?.dashboard?.ref, reference.ref)) {
|
|
@@ -30,65 +31,10 @@ export function removeContextReference(context, reference) {
|
|
|
30
31
|
})
|
|
31
32
|
.filter(Boolean);
|
|
32
33
|
}
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Removes what `ambient` put in `context` on its own - the viewed dashboard and its own references.
|
|
37
|
-
* The user's own picks stay, the objects pinned from that dashboard included.
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
export function removeAmbientContribution(context, ambient) {
|
|
41
|
-
const ambientDashboardRef = ambient?.view?.dashboard?.ref;
|
|
42
|
-
if (!context || !ambientDashboardRef) {
|
|
43
|
-
return context;
|
|
44
|
-
}
|
|
45
|
-
const newContext = { ...context };
|
|
46
|
-
if (areObjRefsEqual(newContext.view?.dashboard?.ref, ambientDashboardRef)) {
|
|
47
|
-
newContext.view = { ...newContext.view };
|
|
48
|
-
delete newContext.view.dashboard;
|
|
49
|
-
}
|
|
50
|
-
newContext.referencedObjects = withoutObjects(newContext.referencedObjects, collectRefKeys(ambient.referencedObjects?.flatMap((group) => group.objects)));
|
|
51
|
-
return normalizeContext(newContext);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Removes the references the newly opened dashboard covers itself - its own ref and the
|
|
55
|
-
* visualizations it renders - so nothing added earlier sits in the context twice.
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
export function removeReferencesCoveredByAmbient(context, ambient) {
|
|
59
|
-
const dashboard = ambient?.view?.dashboard;
|
|
60
|
-
if (!context?.referencedObjects || !dashboard) {
|
|
61
|
-
return context;
|
|
62
|
-
}
|
|
63
|
-
const covered = new Set([serializeObjRef(dashboard.ref)]);
|
|
64
|
-
dashboard.widgets?.forEach((widget) => {
|
|
65
|
-
[widget, ...(widget.visualizations ?? [])].forEach(({ widgetRef, insightRef }) => {
|
|
66
|
-
if (widgetRef) {
|
|
67
|
-
covered.add(serializeObjRef(widgetRef));
|
|
68
|
-
}
|
|
69
|
-
if (insightRef) {
|
|
70
|
-
covered.add(serializeObjRef(insightRef));
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
return normalizeContext({
|
|
34
|
+
return {
|
|
75
35
|
...context,
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function collectRefKeys(objects) {
|
|
80
|
-
return new Set(objects?.map((object) => serializeObjRef(object.ref)));
|
|
81
|
-
}
|
|
82
|
-
function withoutObjects(groups, removedRefKeys) {
|
|
83
|
-
if (!groups || removedRefKeys.size === 0) {
|
|
84
|
-
return groups;
|
|
85
|
-
}
|
|
86
|
-
return groups
|
|
87
|
-
.map((group) => ({
|
|
88
|
-
...group,
|
|
89
|
-
objects: group.objects.filter((object) => !removedRefKeys.has(serializeObjRef(object.ref))),
|
|
90
|
-
}))
|
|
91
|
-
.filter((group) => group.objects.length > 0);
|
|
36
|
+
active: normalizeContext(newContext),
|
|
37
|
+
};
|
|
92
38
|
}
|
|
93
39
|
function normalizeContext(context) {
|
|
94
40
|
const newContext = { ...context };
|
|
@@ -100,12 +46,3 @@ function normalizeContext(context) {
|
|
|
100
46
|
}
|
|
101
47
|
return undefinedIfEmpty(newContext);
|
|
102
48
|
}
|
|
103
|
-
export function removeUserContextReferences(context) {
|
|
104
|
-
if (!context) {
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
|
-
const newContext = { ...context };
|
|
108
|
-
delete newContext.referencedObjects;
|
|
109
|
-
delete newContext.activeObject;
|
|
110
|
-
return undefinedIfEmpty(newContext);
|
|
111
|
-
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type IGenAIUserContext } from "@gooddata/sdk-model";
|
|
2
|
+
import type { SelectedContext, StoreContext } from "../types.js";
|
|
3
|
+
export declare function selectContextReferences(context: StoreContext, selected: Partial<SelectedContext> | undefined): StoreContext;
|
|
4
|
+
export declare function updateAmbientContext(context: StoreContext, ambient?: IGenAIUserContext): StoreContext;
|
|
5
|
+
//# sourceMappingURL=selectContextReferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectContextReferences.d.ts","sourceRoot":"","sources":["../../src/context/selectContextReferences.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EAAuB,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMtF,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,GAC/C,YAAY,CAkBd;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,YAAY,CAUrG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { isIdentifierRef } from "@gooddata/sdk-model";
|
|
3
|
+
import { addContextReference } from "./addContextReference.js";
|
|
4
|
+
import { isReferenceChanged } from "./isReferenceChanged.js";
|
|
5
|
+
import { removeContextReference } from "./removeContextReference.js";
|
|
6
|
+
export function selectContextReferences(context, selected) {
|
|
7
|
+
let newContext = {
|
|
8
|
+
...context,
|
|
9
|
+
ambientSelected: {
|
|
10
|
+
...context.ambientSelected,
|
|
11
|
+
...selected,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
if (newContext.ambientSelected?.activated) {
|
|
15
|
+
newContext = addContextReference(newContext, newContext.ambientSelected?.dashboard);
|
|
16
|
+
newContext = addContextReference(newContext, newContext.ambientSelected?.visualization);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
newContext = removeContextReference(newContext, context.ambientSelected?.dashboard);
|
|
20
|
+
newContext = removeContextReference(newContext, context.ambientSelected?.visualization);
|
|
21
|
+
}
|
|
22
|
+
return newContext;
|
|
23
|
+
}
|
|
24
|
+
export function updateAmbientContext(context, ambient) {
|
|
25
|
+
const referenceChanged = isReferenceChanged(context.ambient, ambient);
|
|
26
|
+
const activated = !context.loaded;
|
|
27
|
+
let newContext = { ...context };
|
|
28
|
+
newContext.ambient = ambient;
|
|
29
|
+
newContext = removeContextReference(newContext, context.ambientSelected?.dashboard);
|
|
30
|
+
newContext = removeContextReference(newContext, context.ambientSelected?.visualization);
|
|
31
|
+
newContext = updateContextReference(newContext, ambient, referenceChanged, activated);
|
|
32
|
+
return newContext;
|
|
33
|
+
}
|
|
34
|
+
function updateContextReference(newContext, ambient, referenceChanged, activated) {
|
|
35
|
+
let reference = undefined;
|
|
36
|
+
if (ambient?.view?.dashboard) {
|
|
37
|
+
const dash = ambient.view.dashboard;
|
|
38
|
+
const ref = dash.ref;
|
|
39
|
+
const id = isIdentifierRef(ref) ? ref.identifier : ref.uri;
|
|
40
|
+
reference = {
|
|
41
|
+
id,
|
|
42
|
+
ref,
|
|
43
|
+
nesting: 0,
|
|
44
|
+
type: "dashboard",
|
|
45
|
+
where: "view.dashboard",
|
|
46
|
+
title: dash.title ?? "",
|
|
47
|
+
};
|
|
48
|
+
newContext.loaded = true;
|
|
49
|
+
newContext.ambientSelected = {
|
|
50
|
+
...newContext.ambientSelected,
|
|
51
|
+
dashboard: reference,
|
|
52
|
+
...(referenceChanged ? { visualization: undefined } : {}),
|
|
53
|
+
...(activated ? { activated: true } : {}),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
newContext.ambientSelected = {
|
|
58
|
+
...newContext.ambientSelected,
|
|
59
|
+
dashboard: undefined,
|
|
60
|
+
visualization: undefined,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (newContext.ambientSelected?.activated) {
|
|
64
|
+
newContext = addContextReference(newContext, newContext.ambientSelected?.dashboard);
|
|
65
|
+
newContext = addContextReference(newContext, newContext.ambientSelected?.visualization);
|
|
66
|
+
}
|
|
67
|
+
return newContext;
|
|
68
|
+
}
|
|
@@ -123,6 +123,10 @@ export declare const en_US: {
|
|
|
123
123
|
text: string;
|
|
124
124
|
crowdinContext: string;
|
|
125
125
|
};
|
|
126
|
+
"gd.gen-ai.context.focus_on": {
|
|
127
|
+
text: string;
|
|
128
|
+
crowdinContext: string;
|
|
129
|
+
};
|
|
126
130
|
"gd.gen-ai.context.close": {
|
|
127
131
|
text: string;
|
|
128
132
|
crowdinContext: string;
|
|
@@ -163,6 +167,10 @@ export declare const en_US: {
|
|
|
163
167
|
text: string;
|
|
164
168
|
crowdinContext: string;
|
|
165
169
|
};
|
|
170
|
+
"gd.gen-ai.context.this": {
|
|
171
|
+
text: string;
|
|
172
|
+
crowdinContext: string;
|
|
173
|
+
};
|
|
166
174
|
"gd.gen-ai.context.list.ariaLabel": {
|
|
167
175
|
text: string;
|
|
168
176
|
crowdinContext: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../src/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"en-US.localization-bundle.d.ts","sourceRoot":"","sources":["../../../src/localization/bundles/en-US.localization-bundle.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqlCjB,CAAC"}
|
|
@@ -125,6 +125,10 @@ export const en_US = {
|
|
|
125
125
|
"text": "Add context",
|
|
126
126
|
"crowdinContext": "Label for the button that adds a new context to the AI chatbot"
|
|
127
127
|
},
|
|
128
|
+
"gd.gen-ai.context.focus_on": {
|
|
129
|
+
"text": "Focus on",
|
|
130
|
+
"crowdinContext": "Label for popover that shows current view context"
|
|
131
|
+
},
|
|
128
132
|
"gd.gen-ai.context.close": {
|
|
129
133
|
"text": "Close add context",
|
|
130
134
|
"crowdinContext": "Accessibility label for the button that closes the AI chatbot add-context dialog"
|
|
@@ -165,6 +169,10 @@ export const en_US = {
|
|
|
165
169
|
"text": "Untitled",
|
|
166
170
|
"crowdinContext": "Label for untitled objects in the AI chatbot context"
|
|
167
171
|
},
|
|
172
|
+
"gd.gen-ai.context.this": {
|
|
173
|
+
"text": "Whole dashboard",
|
|
174
|
+
"crowdinContext": "Label for the dashboard context item that refers to the whole dashboard"
|
|
175
|
+
},
|
|
168
176
|
"gd.gen-ai.context.list.ariaLabel": {
|
|
169
177
|
"text": "Available context items",
|
|
170
178
|
"crowdinContext": "Accessible name for the list of dashboards and visualizations that can be added to the AI chatbot context"
|
|
@@ -11,7 +11,7 @@ export const zh_HK = {
|
|
|
11
11
|
"gd.gen-ai.global-error.show-less": "顯示簡要信息",
|
|
12
12
|
"gd.gen-ai.global-error.traceId.copy": "複製到剪貼板",
|
|
13
13
|
"gd.gen-ai.global-error.details.title": "原始錯誤響應",
|
|
14
|
-
"gd.gen-ai.global-error.details.title.tooltip": "
|
|
14
|
+
"gd.gen-ai.global-error.details.title.tooltip": "原始錯誤響應顯示有關已發生錯誤的後端信息。 它僅對管理員可見。",
|
|
15
15
|
"gd.gen-ai.global-error.button-clear": "重新啟動Chatbot",
|
|
16
16
|
"gd.gen-ai.global-no-llm": "未配置LLM提供程序",
|
|
17
17
|
"gd.gen-ai.global-no-llm.description": "配置提供商以啟用聊天機械人。",
|
|
@@ -34,7 +34,7 @@ export const zh_HK = {
|
|
|
34
34
|
"gd.gen-ai.context.add_context": "新增上下文",
|
|
35
35
|
"gd.gen-ai.context.close": "關閉新增背景資訊",
|
|
36
36
|
"gd.gen-ai.context.group.ariaLabel": "助理背景資料",
|
|
37
|
-
"gd.gen-ai.context.type.dashboard": "
|
|
37
|
+
"gd.gen-ai.context.type.dashboard": "儀表板",
|
|
38
38
|
"gd.gen-ai.context.type.visualization": "可視化",
|
|
39
39
|
"gd.gen-ai.context.announcement.added": "已將 {titles} 加入助理背景資料。",
|
|
40
40
|
"gd.gen-ai.context.announcement.removed": "已將 {titles} 從助理背景資料中移除。",
|
|
@@ -88,10 +88,10 @@ export const zh_HK = {
|
|
|
88
88
|
"gd.gen-ai.header.close-tooltip": "關閉助手",
|
|
89
89
|
"gd.gen-ai.welcome.line-1": "嘿,你好",
|
|
90
90
|
"gd.gen-ai.welcome.line-2": "我該點樣幫助你法?",
|
|
91
|
-
"gd.gen-ai.welcome.option-1.title": "
|
|
91
|
+
"gd.gen-ai.welcome.option-1.title": "搜索儀表板或可視化",
|
|
92
92
|
"gd.gen-ai.welcome.option-1.answer": "當然,你希望睇到点样嘅儀錶板或可視化效果?",
|
|
93
|
-
"gd.gen-ai.welcome.option-2.title": "
|
|
94
|
-
"gd.gen-ai.welcome.option-2.answer": "
|
|
93
|
+
"gd.gen-ai.welcome.option-2.title": "創建新的可視化",
|
|
94
|
+
"gd.gen-ai.welcome.option-2.answer": "當然,您想創建点样的可視化效果?",
|
|
95
95
|
"gd.gen-ai.welcome.option-3.title": "答業務問題",
|
|
96
96
|
"gd.gen-ai.welcome.option-3.answer": "當然,您想答乜嘢商業問題?",
|
|
97
97
|
"gd.gen-ai.semantic-search.title": "搜尋",
|
|
@@ -101,7 +101,7 @@ export const zh_HK = {
|
|
|
101
101
|
"gd.gen-ai.alert-proposal.summary.filters": "篩選器",
|
|
102
102
|
"gd.gen-ai.alert-proposal.summary.date": "日期",
|
|
103
103
|
"gd.gen-ai.alert-proposal.summary.notification-channel": "頻道",
|
|
104
|
-
"gd.gen-ai.alert-proposal.summary.dashboard": "
|
|
104
|
+
"gd.gen-ai.alert-proposal.summary.dashboard": "儀表板",
|
|
105
105
|
"gd.gen-ai.alert-proposal.summary.recipients": "收件人",
|
|
106
106
|
"gd.gen-ai.alert-proposal.summary.condition-comparison": "比較",
|
|
107
107
|
"gd.gen-ai.alert-proposal.summary.condition-relative": "相對",
|
|
@@ -133,7 +133,7 @@ export const zh_HK = {
|
|
|
133
133
|
"sdk.ui.genAi.alertProposal.triggerInterval.month": "每月",
|
|
134
134
|
"sdk.ui.genAi.alertProposal.triggerInterval.quarter": "每季",
|
|
135
135
|
"sdk.ui.genAi.alertProposal.triggerInterval.year": "每年",
|
|
136
|
-
"gd.gen-ai.dashboard.title": "
|
|
136
|
+
"gd.gen-ai.dashboard.title": "儀表板",
|
|
137
137
|
"gd.gen-ai.dashboard.name": "名字",
|
|
138
138
|
"gd.gen-ai.dashboard.description": "描述",
|
|
139
139
|
"gd.gen-ai.dashboard.open-dashboard": "開啟儀表板",
|
|
@@ -184,7 +184,7 @@ export const zh_HK = {
|
|
|
184
184
|
"gd.gen-ai.autocomplete.fact": "事實",
|
|
185
185
|
"gd.gen-ai.autocomplete.date": "數據",
|
|
186
186
|
"gd.gen-ai.autocomplete.insight": "可視化",
|
|
187
|
-
"gd.gen-ai.autocomplete.analyticalDashboard": "
|
|
187
|
+
"gd.gen-ai.autocomplete.analyticalDashboard": "儀表板",
|
|
188
188
|
"gd.gen-ai.autocomplete.displayForm": "標籤",
|
|
189
189
|
"gd.gen-ai.autocomplete.input-info.mac": "輸入 <code>@</code> 以取得建議",
|
|
190
190
|
"gd.gen-ai.autocomplete.input-info.win": "輸入 <code>@</code> 以取得建議",
|
|
@@ -265,7 +265,7 @@ export const zh_HK = {
|
|
|
265
265
|
"gd.gen-ai.interactionIntelligence.detail.matchScore": "({percent}% 相符)",
|
|
266
266
|
"gd.gen-ai.interactionIntelligence.detail.output.text": "文字答案",
|
|
267
267
|
"gd.gen-ai.interactionIntelligence.detail.output.visualization": "可視化",
|
|
268
|
-
"gd.gen-ai.interactionIntelligence.detail.output.dashboard": "
|
|
268
|
+
"gd.gen-ai.interactionIntelligence.detail.output.dashboard": "儀表板",
|
|
269
269
|
"gd.gen-ai.interactionIntelligence.detail.output.keyDriverAnalysis": "主要驅動因素分析",
|
|
270
270
|
"gd.gen-ai.interactionIntelligence.detail.output.whatIf": "假設情境",
|
|
271
271
|
"gd.gen-ai.interactionIntelligence.detail.output.searchResults": "搜尋結果",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
2
2
|
import { type CatalogItem, type GenAIObjectType, type IAllowedRelationshipType, type IColorPalette, type IGenAIUserContext } from "@gooddata/sdk-model";
|
|
3
3
|
import type { IKdaDefinition } from "@gooddata/sdk-ui-dashboard";
|
|
4
|
-
import { type ContextObjectsState } from "../../types.js";
|
|
4
|
+
import { type ContextObjectsState, type SelectedContext } from "../../types.js";
|
|
5
5
|
import { type RootState } from "../types.js";
|
|
6
6
|
export declare const isOpenSelector: (state: RootState) => boolean;
|
|
7
7
|
export declare const isFullscreenSelector: (state: RootState) => boolean;
|
|
@@ -29,5 +29,6 @@ export declare const keyDriverAnalysisSelector: (state: RootState) => IKdaDefini
|
|
|
29
29
|
export declare const keyDriverAnalysisMinimizedSelector: (state: RootState) => boolean | undefined;
|
|
30
30
|
export declare const userContextSelector: (state: RootState) => IGenAIUserContext | undefined;
|
|
31
31
|
export declare const ambientContextSelector: (state: RootState) => IGenAIUserContext | undefined;
|
|
32
|
+
export declare const selectedContextSelector: (state: RootState) => SelectedContext | undefined;
|
|
32
33
|
export declare const hasPinnedContextSelector: (state: RootState) => boolean;
|
|
33
34
|
//# sourceMappingURL=chatWindowSelectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatWindowSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"chatWindowSelectors.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAEzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,KAA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AAEvF,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK;IAC7C,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAMpC,CAAC;AAEH,eAAO,MAAM,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,WAAW,EAKnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,mBAG1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAGhE,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,cAAc,GAAG,SAG9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,GAAG,SAGhF,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG3E,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GAAG,SAG9E,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,eAAe,GAAG,SAG7E,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAe5D,CAAC"}
|
|
@@ -40,6 +40,7 @@ export const keyDriverAnalysisSelector = createSelector(chatWindowSliceSelector,
|
|
|
40
40
|
export const keyDriverAnalysisMinimizedSelector = createSelector(chatWindowSliceSelector, (state) => state.keyDriverAnalysisMinimized);
|
|
41
41
|
export const userContextSelector = createSelector(chatWindowSliceSelector, (state) => state.context.active);
|
|
42
42
|
export const ambientContextSelector = createSelector(chatWindowSliceSelector, (state) => state.context.ambient);
|
|
43
|
+
export const selectedContextSelector = createSelector(chatWindowSliceSelector, (state) => state.context.ambientSelected);
|
|
43
44
|
export const hasPinnedContextSelector = createSelector(userContextSelector, ambientContextSelector, (active, ambient) => {
|
|
44
45
|
if (!active) {
|
|
45
46
|
return false;
|
|
@@ -2,7 +2,7 @@ import { type Reducer } from "@reduxjs/toolkit";
|
|
|
2
2
|
import { type IUserWorkspaceSettings } from "@gooddata/sdk-backend-spi";
|
|
3
3
|
import { type CatalogItem, type GenAIObjectType, type IAllowedRelationshipType, type IColorPalette, type IDashboard, type IGenAIUserContext, type IInsight } from "@gooddata/sdk-model";
|
|
4
4
|
import type { IKdaDefinition } from "@gooddata/sdk-ui-dashboard";
|
|
5
|
-
import { type ContextObjectKind, type ContextObjectsState, type IGenAIContextListItem, type IGenAIContextObject, type StoreContext } from "../../types.js";
|
|
5
|
+
import { type ContextObjectKind, type ContextObjectsState, type IGenAIContextListItem, type IGenAIContextObject, type SelectedContext, type StoreContext } from "../../types.js";
|
|
6
6
|
type ChatWindowSliceState = {
|
|
7
7
|
/**
|
|
8
8
|
* Defines if the chat window is open.
|
|
@@ -129,7 +129,7 @@ export declare const setOpenAction: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
129
129
|
object: IGenAIContextObject;
|
|
130
130
|
}, "chatWindow/addContextReferenceAction">, removeContextReferenceAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
131
131
|
object: IGenAIContextObject;
|
|
132
|
-
}, "chatWindow/removeContextReferenceAction">, setIsPreviewAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
132
|
+
}, "chatWindow/removeContextReferenceAction">, selectedContextReferencesAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<SelectedContext, "chatWindow/selectedContextReferencesAction">, setIsPreviewAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
133
133
|
isPreview?: boolean | undefined;
|
|
134
134
|
}, "chatWindow/setIsPreviewAction">,
|
|
135
135
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatWindowSlice.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"chatWindowSlice.d.ts","sourceRoot":"","sources":["../../../src/store/chatWindow/chatWindowSlice.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,OAAO,EAAe,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EACH,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMjE,OAAO,EACH,KAAK,iBAAiB,EAEtB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,YAAY,EACpB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,oBAAoB,GAAG;IACxB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,aA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C/B,kBAAkB;;;AAClB;;;GAGG;AACH,mBAAmB;;;AACnB;;GAEG;AACH,2BAA2B;;;AAC3B;;GAEG;AACH,oBAAoB;;;qCACG,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { createSlice } from "@reduxjs/toolkit";
|
|
3
3
|
import { serializeObjRef, } from "@gooddata/sdk-model";
|
|
4
|
-
import {
|
|
4
|
+
import { addContextReference } from "../../context/addContextReference.js";
|
|
5
5
|
import { mergeContexts } from "../../context/build.js";
|
|
6
|
-
import { removeContextReference
|
|
6
|
+
import { removeContextReference } from "../../context/removeContextReference.js";
|
|
7
|
+
import { selectContextReferences, updateAmbientContext } from "../../context/selectContextReferences.js";
|
|
7
8
|
import { clearThreadAction, startNewConversationAction } from "../messages/messagesSlice.js";
|
|
8
9
|
export const chatWindowSliceName = "chatWindow";
|
|
9
10
|
function emptyContextObjectList(isExternal = false) {
|
|
@@ -131,7 +132,8 @@ const chatWindowSlice = createSlice({
|
|
|
131
132
|
},
|
|
132
133
|
setUserContextAction: (state, { payload: { userContext, replaceUserContext }, }) => {
|
|
133
134
|
if (replaceUserContext) {
|
|
134
|
-
state.context.active =
|
|
135
|
+
state.context.active = userContext;
|
|
136
|
+
state.context = selectContextReferences(state.context, state.context.ambientSelected);
|
|
135
137
|
}
|
|
136
138
|
else {
|
|
137
139
|
state.context.active = mergeContexts(state.context.active, userContext);
|
|
@@ -144,13 +146,16 @@ const chatWindowSlice = createSlice({
|
|
|
144
146
|
}
|
|
145
147
|
return;
|
|
146
148
|
}
|
|
147
|
-
state.context =
|
|
149
|
+
state.context = updateAmbientContext(state.context, userContext);
|
|
148
150
|
},
|
|
149
151
|
addContextReferenceAction: (state, { payload: { object } }) => {
|
|
150
152
|
state.context = addContextReference(state.context, object);
|
|
151
153
|
},
|
|
154
|
+
selectedContextReferencesAction: (state, { payload }) => {
|
|
155
|
+
state.context = selectContextReferences(state.context, payload);
|
|
156
|
+
},
|
|
152
157
|
removeContextReferenceAction: (state, { payload: { object } }) => {
|
|
153
|
-
state.context
|
|
158
|
+
state.context = removeContextReference(state.context, object);
|
|
154
159
|
},
|
|
155
160
|
setIsPreviewAction: (state, { payload: { isPreview } }) => {
|
|
156
161
|
state.isPreview = isPreview;
|
|
@@ -168,7 +173,7 @@ const chatWindowSlice = createSlice({
|
|
|
168
173
|
},
|
|
169
174
|
});
|
|
170
175
|
export const chatWindowSliceReducer = chatWindowSlice.reducer;
|
|
171
|
-
export const { setOpenAction, setHistoryAction, setColorPaletteAction, setSettingsAction, copyToClipboardAction, setKeyDriverAnalysisAction, setKeyDriverAnalysisMinimizedAction, setObjectTypesAction, setTagsAction, setCatalogItemsActions, initContextObjectsAction, loadContextObjectsNextPageAction, setContextObjectsAction, setContextObjectsSearchAction, contextObjectsLoadingAction, contextObjectsPageLoadedAction, contextObjectsLoadFailedAction, setAllowedRelationshipTypesAction, onDefinitionReceivedAction, addContextReferenceAction, removeContextReferenceAction, setIsPreviewAction,
|
|
176
|
+
export const { setOpenAction, setHistoryAction, setColorPaletteAction, setSettingsAction, copyToClipboardAction, setKeyDriverAnalysisAction, setKeyDriverAnalysisMinimizedAction, setObjectTypesAction, setTagsAction, setCatalogItemsActions, initContextObjectsAction, loadContextObjectsNextPageAction, setContextObjectsAction, setContextObjectsSearchAction, contextObjectsLoadingAction, contextObjectsPageLoadedAction, contextObjectsLoadFailedAction, setAllowedRelationshipTypesAction, onDefinitionReceivedAction, addContextReferenceAction, removeContextReferenceAction, selectedContextReferencesAction, setIsPreviewAction,
|
|
172
177
|
/**
|
|
173
178
|
* Switches the assistant between the docked and the fullscreen layout.
|
|
174
179
|
* @public
|
package/esm/types.d.ts
CHANGED
|
@@ -2,6 +2,20 @@ import { type IChatConversationInteractionStep, type IChatConversationItemDetail
|
|
|
2
2
|
import { type GenAIChatEffort, type GenAIObjectType, type IGenAIObjectReference, type IGenAIUserContext, type IGenAIVisualization, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { type IChatConversationLocalItem } from "./model.js";
|
|
4
4
|
export type Config = IGenAIVisualization["config"] | NonNullable<IChatConversationVisualisationContent["visualization"]>["insight"]["properties"]["controls"];
|
|
5
|
+
export type SelectedContext = {
|
|
6
|
+
/**
|
|
7
|
+
* Dashboard selected by the user.
|
|
8
|
+
*/
|
|
9
|
+
dashboard?: IGenAIContextObject;
|
|
10
|
+
/**
|
|
11
|
+
* Visualization or widget selected by the user.
|
|
12
|
+
*/
|
|
13
|
+
visualization?: IGenAIContextObject;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the selected objects are activated.
|
|
16
|
+
*/
|
|
17
|
+
activated?: boolean;
|
|
18
|
+
};
|
|
5
19
|
export type StoredConversation = {
|
|
6
20
|
/**
|
|
7
21
|
* A record containing chat conversation items indexed by string keys.
|
|
@@ -79,12 +93,20 @@ export type IChatConversationTracedAction = {
|
|
|
79
93
|
detail?: IChatConversationItemDetail;
|
|
80
94
|
};
|
|
81
95
|
export type StoreContext = {
|
|
96
|
+
/**
|
|
97
|
+
* Indicates whether some data has been loaded into the store.
|
|
98
|
+
*/
|
|
99
|
+
loaded?: boolean;
|
|
82
100
|
/**
|
|
83
101
|
* Ambient user context kept in sync by the host (e.g. the open dashboard and its
|
|
84
102
|
* live filter state). Unlike the one-shot userContext it persists across messages
|
|
85
103
|
* and is attached to every message that has no one-shot context.
|
|
86
104
|
*/
|
|
87
105
|
ambient?: IGenAIUserContext;
|
|
106
|
+
/**
|
|
107
|
+
* Selected objects from ambient context.
|
|
108
|
+
*/
|
|
109
|
+
ambientSelected?: SelectedContext;
|
|
88
110
|
/**
|
|
89
111
|
* Active context
|
|
90
112
|
*/
|
package/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK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M,iBAAiB,GAAG,WAAW,GAAG,eAAe,CAAC;AAE9D;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-gen-ai",
|
|
3
|
-
"version": "11.55.0-alpha.
|
|
3
|
+
"version": "11.55.0-alpha.3",
|
|
4
4
|
"description": "GoodData GenAI SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
"reselect": "5.1.1",
|
|
58
58
|
"tslib": "2.8.1",
|
|
59
59
|
"uuid": "11.1.1",
|
|
60
|
-
"@gooddata/api-client-tiger": "11.55.0-alpha.
|
|
61
|
-
"@gooddata/sdk-backend-spi": "11.55.0-alpha.
|
|
62
|
-
"@gooddata/sdk-
|
|
63
|
-
"@gooddata/sdk-
|
|
64
|
-
"@gooddata/sdk-ui
|
|
65
|
-
"@gooddata/sdk-ui-dashboard": "11.55.0-alpha.
|
|
66
|
-
"@gooddata/sdk-ui-filters": "11.55.0-alpha.
|
|
67
|
-
"@gooddata/sdk-ui-kit": "11.55.0-alpha.
|
|
68
|
-
"@gooddata/sdk-ui-pivot": "11.55.0-alpha.
|
|
69
|
-
"@gooddata/sdk-ui-semantic-search": "11.55.0-alpha.
|
|
70
|
-
"@gooddata/sdk-ui-theme-provider": "11.55.0-alpha.
|
|
71
|
-
"@gooddata/util": "11.55.0-alpha.
|
|
60
|
+
"@gooddata/api-client-tiger": "11.55.0-alpha.3",
|
|
61
|
+
"@gooddata/sdk-backend-spi": "11.55.0-alpha.3",
|
|
62
|
+
"@gooddata/sdk-model": "11.55.0-alpha.3",
|
|
63
|
+
"@gooddata/sdk-ui-charts": "11.55.0-alpha.3",
|
|
64
|
+
"@gooddata/sdk-ui": "11.55.0-alpha.3",
|
|
65
|
+
"@gooddata/sdk-ui-dashboard": "11.55.0-alpha.3",
|
|
66
|
+
"@gooddata/sdk-ui-filters": "11.55.0-alpha.3",
|
|
67
|
+
"@gooddata/sdk-ui-kit": "11.55.0-alpha.3",
|
|
68
|
+
"@gooddata/sdk-ui-pivot": "11.55.0-alpha.3",
|
|
69
|
+
"@gooddata/sdk-ui-semantic-search": "11.55.0-alpha.3",
|
|
70
|
+
"@gooddata/sdk-ui-theme-provider": "11.55.0-alpha.3",
|
|
71
|
+
"@gooddata/util": "11.55.0-alpha.3"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@microsoft/api-documenter": "7.30.10",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"happy-dom": "20.9.0",
|
|
99
99
|
"npm-run-all": "4.1.5",
|
|
100
100
|
"oxfmt": "0.52.0",
|
|
101
|
-
"oxlint": "1.
|
|
101
|
+
"oxlint": "1.57.0",
|
|
102
102
|
"oxlint-tsgolint": "0.15.0",
|
|
103
103
|
"raf": "3.4.1",
|
|
104
104
|
"react": "19.1.1",
|
|
@@ -109,12 +109,12 @@
|
|
|
109
109
|
"typescript": "5.9.3",
|
|
110
110
|
"vitest": "4.1.8",
|
|
111
111
|
"vitest-dom": "0.1.1",
|
|
112
|
-
"@gooddata/
|
|
113
|
-
"@gooddata/
|
|
114
|
-
"@gooddata/oxlint-config": "11.55.0-alpha.
|
|
115
|
-
"@gooddata/reference-workspace": "11.55.0-alpha.
|
|
116
|
-
"@gooddata/stylelint-config": "11.55.0-alpha.
|
|
117
|
-
"@gooddata/sdk-backend-mockingbird": "11.55.0-alpha.
|
|
112
|
+
"@gooddata/eslint-config": "11.55.0-alpha.3",
|
|
113
|
+
"@gooddata/i18n-toolkit": "11.55.0-alpha.3",
|
|
114
|
+
"@gooddata/oxlint-config": "11.55.0-alpha.3",
|
|
115
|
+
"@gooddata/reference-workspace": "11.55.0-alpha.3",
|
|
116
|
+
"@gooddata/stylelint-config": "11.55.0-alpha.3",
|
|
117
|
+
"@gooddata/sdk-backend-mockingbird": "11.55.0-alpha.3"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
120
|
"react": "^18.0.0 || ^19.0.0",
|
package/styles/css/main.css
CHANGED
|
@@ -14821,6 +14821,10 @@ body.gd-kda-dialog-opened .highcharts-tooltip-container {
|
|
|
14821
14821
|
min-width: 0;
|
|
14822
14822
|
overflow: hidden;
|
|
14823
14823
|
}
|
|
14824
|
+
.gd-gen-ai-chat__context-chooser .gd-list-item--selected {
|
|
14825
|
+
color: var(--gd-palette-primary-base);
|
|
14826
|
+
font-weight: bold;
|
|
14827
|
+
}
|
|
14824
14828
|
|
|
14825
14829
|
.gd-gen-ai-chat {
|
|
14826
14830
|
display: flex;
|