@thoughtspot/visual-embed-sdk 1.50.0 → 1.51.0-test
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/cjs/package.json +1 -1
- package/cjs/src/config.d.ts +1 -0
- package/cjs/src/config.d.ts.map +1 -1
- package/cjs/src/config.js +2 -1
- package/cjs/src/config.js.map +1 -1
- package/cjs/src/css-variables.d.ts +122 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +176 -24
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +86 -38
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +672 -150
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.js +1 -1
- package/cjs/src/embed/conversation.d.ts +401 -2
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +32 -16
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +346 -17
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +638 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +187 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +51 -14
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +11 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +2 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +9 -0
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +236 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +2 -0
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +32 -2
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.spec.js +178 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +81 -13
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +50 -9
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +432 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +15 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +28 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +129 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +37 -4
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.spec.js +17 -0
- package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +16 -8
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +96 -37
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +683 -3
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/index.d.ts +3 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +4 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +4 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/cjs/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/cjs/src/react/all-types-export.parity.spec.js +194 -0
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -0
- package/cjs/src/react/index.d.ts +66 -32
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +5 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +101 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/react/util.spec.js +251 -0
- package/cjs/src/react/util.spec.js.map +1 -1
- package/cjs/src/types.d.ts +902 -28
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +701 -14
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +93 -0
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.spec.js +61 -0
- package/cjs/src/utils/processTrigger.spec.js.map +1 -1
- package/cjs/src/utils.spec.js +4 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-B5xoN6Cp.js → index-Bivg-mDx.js} +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +122 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +176 -24
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +401 -2
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +51 -14
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +2 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +2 -0
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +81 -13
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +15 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +37 -4
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +16 -8
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/dist/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +66 -32
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +902 -28
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1269 -206
- package/dist/tsembed-react.js +1268 -205
- package/dist/tsembed.es.js +1364 -304
- package/dist/tsembed.js +1362 -302
- package/dist/visual-embed-sdk-react-full.d.ts +1867 -157
- package/dist/visual-embed-sdk-react.d.ts +1872 -161
- package/dist/visual-embed-sdk.d.ts +1815 -127
- package/lib/package.json +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +1 -0
- package/lib/src/config.js.map +1 -1
- package/lib/src/css-variables.d.ts +122 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +176 -24
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +87 -39
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +673 -151
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/conversation.d.ts +401 -2
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +33 -17
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +347 -18
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +638 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +188 -1
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +51 -14
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +10 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +2 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +10 -1
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +236 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +2 -0
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +28 -1
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.spec.js +179 -1
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +81 -13
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +50 -9
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +432 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +15 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +25 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +130 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +37 -4
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-viz-utils.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.spec.js +17 -0
- package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +16 -8
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +96 -37
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +683 -3
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -3
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +4 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/lib/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/lib/src/react/all-types-export.parity.spec.js +191 -0
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -0
- package/lib/src/react/index.d.ts +66 -32
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +5 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +102 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.spec.js +251 -0
- package/lib/src/react/util.spec.js.map +1 -1
- package/lib/src/types.d.ts +902 -28
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +701 -14
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.spec.js +93 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js +61 -0
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.spec.js +4 -0
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1815 -127
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/css-variables.ts +150 -0
- package/src/embed/app.spec.ts +877 -196
- package/src/embed/app.ts +276 -75
- package/src/embed/base.ts +1 -1
- package/src/embed/conversation.spec.ts +411 -21
- package/src/embed/conversation.ts +441 -18
- package/src/embed/events.spec.ts +761 -1
- package/src/embed/host-events.spec.ts +242 -0
- package/src/embed/hostEventClient/contracts.ts +57 -14
- package/src/embed/hostEventClient/host-event-client.spec.ts +372 -0
- package/src/embed/hostEventClient/host-event-client.ts +18 -2
- package/src/embed/hostEventClient/utils.spec.ts +204 -0
- package/src/embed/hostEventClient/utils.ts +37 -10
- package/src/embed/liveboard.spec.ts +565 -4
- package/src/embed/liveboard.ts +155 -28
- package/src/embed/spotter-utils.spec.ts +140 -1
- package/src/embed/spotter-utils.ts +36 -1
- package/src/embed/spotter-viz-utils.spec.ts +17 -0
- package/src/embed/spotter-viz-utils.ts +37 -4
- package/src/embed/ts-embed.spec.ts +885 -3
- package/src/embed/ts-embed.ts +111 -39
- package/src/errors.ts +1 -0
- package/src/index.ts +45 -2
- package/src/mixpanel-service.ts +4 -0
- package/src/react/all-types-export.parity.spec.ts +208 -0
- package/src/react/all-types-export.ts +22 -0
- package/src/react/index.spec.tsx +158 -0
- package/src/react/index.tsx +70 -33
- package/src/react/util.spec.tsx +255 -0
- package/src/types.ts +904 -24
- package/src/utils/processData.spec.ts +97 -0
- package/src/utils/processTrigger.spec.ts +91 -0
- package/src/utils.spec.ts +5 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import isUndefined from 'lodash/isUndefined';
|
|
2
|
-
import { ERROR_MESSAGE } from '../errors';
|
|
3
1
|
import { Param, BaseViewConfig, RuntimeFilter, RuntimeParameter, ErrorDetailsTypes, EmbedErrorCodes, DefaultAppInitData, VisualizationOverrides, SpotterFileUploadFileTypes } from '../types';
|
|
4
2
|
import { TsEmbed } from './ts-embed';
|
|
5
|
-
import { buildSpotterSidebarAppInitData } from './spotter-utils';
|
|
3
|
+
import { buildSpotterSidebarAppInitData, buildSpotterShareConversationAppInitData, buildStarterPromptsAppInitData } from './spotter-utils';
|
|
6
4
|
import { getQueryParamString, getFilterQuery, getRuntimeParameters, setParamIfDefined } from '../utils';
|
|
7
5
|
|
|
8
6
|
/**
|
|
@@ -15,6 +13,47 @@ export interface SearchOptions {
|
|
|
15
13
|
searchQuery: string;
|
|
16
14
|
}
|
|
17
15
|
|
|
16
|
+
/**
|
|
17
|
+
* The query mode Spotter uses when answering a question.
|
|
18
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
19
|
+
*/
|
|
20
|
+
export enum SpotterQueryMode {
|
|
21
|
+
FAST_SEARCH = 'fastSearch',
|
|
22
|
+
RESEARCH = 'research',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for the pin/unpin conversation feature in the Spotter sidebar.
|
|
27
|
+
* Grouped into one object because pin exposes several related settings
|
|
28
|
+
* (enable + label overrides), unlike single-item actions like rename or
|
|
29
|
+
* delete.
|
|
30
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
31
|
+
*/
|
|
32
|
+
export interface SpotterChatPinConfig {
|
|
33
|
+
/**
|
|
34
|
+
* Enables the pin/unpin conversation feature in embedded Spotter. Disabled
|
|
35
|
+
* by default — hosts must opt in. When off, the Pin/Unpin menu entry and
|
|
36
|
+
* the pin glyph are hidden and the PinSpotterConversation /
|
|
37
|
+
* UnpinSpotterConversation host events are no-ops. Native (non-embedded)
|
|
38
|
+
* Spotter is unaffected and ships pin enabled.
|
|
39
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Custom label text for the pin action in the conversation edit menu.
|
|
45
|
+
* Defaults to translated "Pin" text.
|
|
46
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
47
|
+
*/
|
|
48
|
+
pinLabel?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Custom label text for the unpin action in the conversation edit menu.
|
|
51
|
+
* Defaults to translated "Unpin" text.
|
|
52
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
53
|
+
*/
|
|
54
|
+
unpinLabel?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
18
57
|
/**
|
|
19
58
|
* Configuration for the Spotter sidebar.
|
|
20
59
|
* Can be used in SpotterEmbed and AppEmbed.
|
|
@@ -52,6 +91,12 @@ export interface SpotterSidebarViewConfig {
|
|
|
52
91
|
* @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl
|
|
53
92
|
*/
|
|
54
93
|
spotterChatDeleteLabel?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Pin/unpin conversation feature config (enable + label overrides).
|
|
96
|
+
* Off by default in embed — hosts opt in via `enabled`.
|
|
97
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
98
|
+
*/
|
|
99
|
+
spotterChatPinConfig?: SpotterChatPinConfig;
|
|
55
100
|
/**
|
|
56
101
|
* Custom title text for the delete conversation confirmation modal.
|
|
57
102
|
* Defaults to translated "Delete chat" text.
|
|
@@ -103,6 +148,170 @@ export interface SpotterSidebarViewConfig {
|
|
|
103
148
|
spotterAnalystsLabel?: string;
|
|
104
149
|
}
|
|
105
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Configuration for the Spotter conversation sharing feature.
|
|
153
|
+
* Can be used in SpotterEmbed and AppEmbed.
|
|
154
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
155
|
+
* @group Embed components
|
|
156
|
+
*/
|
|
157
|
+
export interface SpotterShareConversationConfig {
|
|
158
|
+
/**
|
|
159
|
+
* Enables sharing of the conversation.
|
|
160
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
161
|
+
* @default false
|
|
162
|
+
*/
|
|
163
|
+
enableShareConversation?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Header Share button + sidebar Share item label.
|
|
166
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
167
|
+
* @default "Share"
|
|
168
|
+
*/
|
|
169
|
+
spotterShareLabel?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Share modal title.
|
|
172
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
173
|
+
*/
|
|
174
|
+
spotterShareModalTitle?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Modal confirm button label.
|
|
177
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
178
|
+
* @default "Share"
|
|
179
|
+
*/
|
|
180
|
+
spotterShareConfirmLabel?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Modal cancel button label.
|
|
183
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
184
|
+
* @default "Cancel"
|
|
185
|
+
*/
|
|
186
|
+
spotterShareCancelLabel?: string;
|
|
187
|
+
/**
|
|
188
|
+
* "Add users or groups" label.
|
|
189
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
190
|
+
*/
|
|
191
|
+
spotterShareAddUsersLabel?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Empty-state title ("No users added yet").
|
|
194
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
195
|
+
*/
|
|
196
|
+
spotterShareEmptyTitle?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Empty-state subtitle ("Not shared with any user").
|
|
199
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
200
|
+
*/
|
|
201
|
+
spotterShareEmptySubtitle?: string;
|
|
202
|
+
/**
|
|
203
|
+
* "Include new messages since last shared version" checkbox label.
|
|
204
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
205
|
+
*/
|
|
206
|
+
spotterShareIncludeNewMessagesLabel?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Footer note when the snapshot is current ("…up to the current moment…").
|
|
209
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
210
|
+
*/
|
|
211
|
+
spotterShareUpToCurrentLabel?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Stale-snapshot info banner text ("All added users and groups will receive…").
|
|
214
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
215
|
+
*/
|
|
216
|
+
spotterShareStaleInfoLabel?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Read-only shared-view data-access banner message.
|
|
219
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
220
|
+
*/
|
|
221
|
+
spotterSharedConversationBannerMessage?: string;
|
|
222
|
+
/**
|
|
223
|
+
* Read-only shared-view Exit button label.
|
|
224
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
225
|
+
* @default "Exit"
|
|
226
|
+
*/
|
|
227
|
+
spotterSharedConversationExitLabel?: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* A single starter prompt question shown under a category pill.
|
|
232
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
233
|
+
* @group Embed components
|
|
234
|
+
*/
|
|
235
|
+
export interface StarterPromptQuestion {
|
|
236
|
+
/**
|
|
237
|
+
* Short label shown as a clickable suggestion. Falls back to `prompt` when
|
|
238
|
+
* omitted. ThoughtSpot truncates it beyond 80 characters.
|
|
239
|
+
*/
|
|
240
|
+
label?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Prompt text sent to Spotter on click. ThoughtSpot truncates it beyond
|
|
243
|
+
* 300 characters.
|
|
244
|
+
*/
|
|
245
|
+
prompt: string;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Configuration for a starter prompt category with questions
|
|
250
|
+
* (`quick` and `research`).
|
|
251
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
252
|
+
* @group Embed components
|
|
253
|
+
*/
|
|
254
|
+
export interface StarterPromptCategory {
|
|
255
|
+
/**
|
|
256
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
257
|
+
* beyond 30 characters.
|
|
258
|
+
*/
|
|
259
|
+
label?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Replaces the backend-generated prompts. ThoughtSpot renders the first 4
|
|
262
|
+
* and drops any entry without a `prompt`.
|
|
263
|
+
*/
|
|
264
|
+
questions?: StarterPromptQuestion[];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Configuration for the Data Literacy starter prompt category.
|
|
269
|
+
* Only the label is customizable; the prompt text comes from the backend.
|
|
270
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
271
|
+
* @group Embed components
|
|
272
|
+
*/
|
|
273
|
+
export interface StarterPreviewDataCategory {
|
|
274
|
+
/**
|
|
275
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
276
|
+
* beyond 30 characters.
|
|
277
|
+
*/
|
|
278
|
+
label?: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Content configuration for the Spotter starter prompts.
|
|
283
|
+
* Keys are fixed: `quick` (Basic Search), `research` (Deep Analysis),
|
|
284
|
+
* `previewData` (Data Literacy) and `liveboard` (Liveboard chat panel).
|
|
285
|
+
*
|
|
286
|
+
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
287
|
+
* the Liveboard SpotterViz surface are configured separately through
|
|
288
|
+
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
289
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
290
|
+
* @group Embed components
|
|
291
|
+
*/
|
|
292
|
+
export interface StarterPromptsConfig {
|
|
293
|
+
/**
|
|
294
|
+
* Turns the starter prompts surface on. Must be set explicitly, an
|
|
295
|
+
* unset flag leaves the surface off.
|
|
296
|
+
*
|
|
297
|
+
* Either this or `enableStarterPrompts` turns the surface on, so `false`
|
|
298
|
+
* here does not switch it off while `enableStarterPrompts` is `true`.
|
|
299
|
+
* @default false
|
|
300
|
+
*/
|
|
301
|
+
enable?: boolean;
|
|
302
|
+
/** Basic Search category configuration. */
|
|
303
|
+
quick?: StarterPromptCategory;
|
|
304
|
+
/** Deep Analysis category configuration. */
|
|
305
|
+
research?: StarterPromptCategory;
|
|
306
|
+
/** Data Literacy category configuration. */
|
|
307
|
+
previewData?: StarterPreviewDataCategory;
|
|
308
|
+
/**
|
|
309
|
+
* Starter prompts for the Spotter chat panel on a Liveboard.
|
|
310
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
311
|
+
*/
|
|
312
|
+
liveboard?: StarterPromptQuestion[];
|
|
313
|
+
}
|
|
314
|
+
|
|
106
315
|
/**
|
|
107
316
|
* Configuration for customizing Spotter chat UI branding.
|
|
108
317
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl
|
|
@@ -143,11 +352,84 @@ export interface SpotterChatViewConfig {
|
|
|
143
352
|
/**
|
|
144
353
|
* Enables starter prompts in the Spotter chat interface.
|
|
145
354
|
*
|
|
146
|
-
*
|
|
355
|
+
* Either this or `starterPrompts.enable` turns the surface on, so it stays
|
|
356
|
+
* on while this is `true` even if `starterPrompts.enable` is `false`.
|
|
357
|
+
*
|
|
358
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
147
359
|
* @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl
|
|
148
360
|
* @default false
|
|
149
361
|
*/
|
|
150
362
|
enableStarterPrompts?: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* Customizes the labels and questions of the Spotter starter prompts.
|
|
365
|
+
* Individual pills are hidden or shown with `hiddenActions` /
|
|
366
|
+
* `visibleActions` using `Action.QuickSearchPill`,
|
|
367
|
+
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
368
|
+
*
|
|
369
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
370
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
371
|
+
* @example
|
|
372
|
+
* ```js
|
|
373
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
374
|
+
* worksheetId: 'worksheet-id',
|
|
375
|
+
* hiddenActions: [Action.DeepAnalysisPill],
|
|
376
|
+
* spotterChatConfig: {
|
|
377
|
+
* starterPrompts: {
|
|
378
|
+
* enable: true,
|
|
379
|
+
* quick: {
|
|
380
|
+
* label: 'Quick questions',
|
|
381
|
+
* questions: [
|
|
382
|
+
* { label: 'Top products', prompt: 'What are the top products by revenue?' },
|
|
383
|
+
* ],
|
|
384
|
+
* },
|
|
385
|
+
* previewData: { label: 'Explore your data' },
|
|
386
|
+
* },
|
|
387
|
+
* },
|
|
388
|
+
* })
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
starterPrompts?: StarterPromptsConfig;
|
|
392
|
+
/**
|
|
393
|
+
* Opens the Spotter chat panel when the Liveboard loads.
|
|
394
|
+
*
|
|
395
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
396
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
397
|
+
* @default true
|
|
398
|
+
* @example
|
|
399
|
+
* ```js
|
|
400
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
401
|
+
* liveboardId: 'liveboard-id',
|
|
402
|
+
* spotterChatConfig: {
|
|
403
|
+
* openSpotterOnLiveboardByDefault: false,
|
|
404
|
+
* },
|
|
405
|
+
* })
|
|
406
|
+
* ```
|
|
407
|
+
*/
|
|
408
|
+
openSpotterOnLiveboardByDefault?: boolean;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Configuration for the Spotter Analyst experience.
|
|
413
|
+
* Can be used in SpotterEmbed.
|
|
414
|
+
* @group Embed components
|
|
415
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
416
|
+
* @example
|
|
417
|
+
* ```js
|
|
418
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
419
|
+
* ... //other embed view config
|
|
420
|
+
* spotterAnalystConfig: {
|
|
421
|
+
* analystId: 'analyst-id-1234',
|
|
422
|
+
* },
|
|
423
|
+
* })
|
|
424
|
+
* ```
|
|
425
|
+
*/
|
|
426
|
+
export interface SpotterAnalystConfig {
|
|
427
|
+
/**
|
|
428
|
+
* Pins the embed to a single spotter analyst. Implies no default Spotter
|
|
429
|
+
* and no "Show all".
|
|
430
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
431
|
+
*/
|
|
432
|
+
analystId?: string;
|
|
151
433
|
}
|
|
152
434
|
|
|
153
435
|
/**
|
|
@@ -158,8 +440,43 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
|
|
|
158
440
|
/**
|
|
159
441
|
* The ID of the data source object. For example, Model, View, or Table. Spotter uses
|
|
160
442
|
* this object to query data and generate Answers.
|
|
443
|
+
* This field is optional. If not provided, Spotter loads using the
|
|
444
|
+
* previously selected user data source.
|
|
161
445
|
*/
|
|
162
|
-
worksheetId
|
|
446
|
+
worksheetId?: string;
|
|
447
|
+
/**
|
|
448
|
+
* The array of data source GUIDs to set on load. Spotter uses
|
|
449
|
+
* these GUIDs to query data and generate Answers.
|
|
450
|
+
* dataSources is preferred over worksheetId if both are provided.
|
|
451
|
+
* The feature is currently behind a feature flag.
|
|
452
|
+
*
|
|
453
|
+
* Supported embed types: `SpotterEmbed`
|
|
454
|
+
* @example
|
|
455
|
+
* ```js
|
|
456
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
457
|
+
* // ...other embed view config
|
|
458
|
+
* dataSources: ['id-2345', 'id-2345'],
|
|
459
|
+
* });
|
|
460
|
+
* ```
|
|
461
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
462
|
+
*/
|
|
463
|
+
dataSources?: string[];
|
|
464
|
+
/**
|
|
465
|
+
* Configuration for the Spotter Analyst experience.
|
|
466
|
+
*
|
|
467
|
+
* Supported embed types: `SpotterEmbed`
|
|
468
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
469
|
+
* @example
|
|
470
|
+
* ```js
|
|
471
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
472
|
+
* ... //other embed view config
|
|
473
|
+
* spotterAnalystConfig: {
|
|
474
|
+
* analystId: 'analyst-id-1234',
|
|
475
|
+
* },
|
|
476
|
+
* })
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
163
480
|
/**
|
|
164
481
|
* Ability to pass a starting search query to the conversation.
|
|
165
482
|
*/
|
|
@@ -319,6 +636,39 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
|
|
|
319
636
|
* ```
|
|
320
637
|
*/
|
|
321
638
|
updatedSpotterChatPrompt?: boolean;
|
|
639
|
+
/**
|
|
640
|
+
* showSpotterRadiance : Controls the radiance on the Spotter page.
|
|
641
|
+
*
|
|
642
|
+
* Supported embed types: `SpotterEmbed`
|
|
643
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
644
|
+
* @default false
|
|
645
|
+
* @example
|
|
646
|
+
* ```js
|
|
647
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
648
|
+
* ... //other embed view config
|
|
649
|
+
* showSpotterRadiance : true,
|
|
650
|
+
* })
|
|
651
|
+
* ```
|
|
652
|
+
*/
|
|
653
|
+
showSpotterRadiance?: boolean;
|
|
654
|
+
/**
|
|
655
|
+
* Sets the default query mode when Spotter loads — Fast Search or
|
|
656
|
+
* Research Mode. Applies fresh on every new session for this embed
|
|
657
|
+
* instance only; it does not persist as a user preference and does
|
|
658
|
+
* not affect other embeds or native ThoughtSpot usage.
|
|
659
|
+
*
|
|
660
|
+
* Supported embed types: `SpotterEmbed`, `AppEmbed`
|
|
661
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
662
|
+
* @default SpotterQueryMode.FAST_SEARCH
|
|
663
|
+
* @example
|
|
664
|
+
* ```js
|
|
665
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
666
|
+
* ... //other embed view config
|
|
667
|
+
* defaultQueryMode: SpotterQueryMode.RESEARCH,
|
|
668
|
+
* })
|
|
669
|
+
* ```
|
|
670
|
+
*/
|
|
671
|
+
defaultQueryMode?: SpotterQueryMode;
|
|
322
672
|
/**
|
|
323
673
|
* Enables the stop answer generation button in the Spotter embed UI,
|
|
324
674
|
* allowing users to interrupt an ongoing answer generation.
|
|
@@ -377,6 +727,59 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
|
|
|
377
727
|
* ```
|
|
378
728
|
*/
|
|
379
729
|
spotterChatConfig?: SpotterChatViewConfig;
|
|
730
|
+
/**
|
|
731
|
+
* Configuration for the Spotter conversation sharing feature.
|
|
732
|
+
*
|
|
733
|
+
* Supported embed types: `SpotterEmbed`, `AppEmbed`
|
|
734
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
735
|
+
* @example
|
|
736
|
+
* ```js
|
|
737
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
738
|
+
* ... //other embed view config
|
|
739
|
+
* spotterShareConversationConfig: {
|
|
740
|
+
* enableShareConversation: true,
|
|
741
|
+
* },
|
|
742
|
+
* })
|
|
743
|
+
* ```
|
|
744
|
+
*/
|
|
745
|
+
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
746
|
+
/**
|
|
747
|
+
* The ID of a shared Spotter conversation to open directly in the read-only
|
|
748
|
+
* reader view. Use this to land a share recipient in the shared conversation
|
|
749
|
+
* when they open a host-configured `CONVERSATION_URL` share link: read the
|
|
750
|
+
* `{conversation-id}` from your page URL and pass it here.
|
|
751
|
+
*
|
|
752
|
+
* Requires the Spotter conversation-sharing feature to be enabled
|
|
753
|
+
* (`spotterShareConversationConfig.enableShareConversation`). The recipient
|
|
754
|
+
* must be an authorized sharee — the server returns access-denied otherwise.
|
|
755
|
+
*
|
|
756
|
+
* Supported embed types: `SpotterEmbed`
|
|
757
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
758
|
+
* @example
|
|
759
|
+
* ```js
|
|
760
|
+
* const convId = new URLSearchParams(window.location.search).get('conversation-id');
|
|
761
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
762
|
+
* ... //other embed view config
|
|
763
|
+
* sharedConversationId: convId,
|
|
764
|
+
* })
|
|
765
|
+
* ```
|
|
766
|
+
*/
|
|
767
|
+
sharedConversationId?: string;
|
|
768
|
+
/**
|
|
769
|
+
* updatedSpotterExperience : Controls the updated Spotter experience.
|
|
770
|
+
*
|
|
771
|
+
* Supported embed types: `SpotterEmbed`
|
|
772
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
773
|
+
* @default false
|
|
774
|
+
* @example
|
|
775
|
+
* ```js
|
|
776
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
777
|
+
* ... //other embed view config
|
|
778
|
+
* updatedSpotterExperience : true,
|
|
779
|
+
* })
|
|
780
|
+
* ```
|
|
781
|
+
*/
|
|
782
|
+
updatedSpotterExperience?: boolean;
|
|
380
783
|
}
|
|
381
784
|
|
|
382
785
|
/**
|
|
@@ -395,7 +798,9 @@ export interface ConversationViewConfig extends SpotterEmbedViewConfig {}
|
|
|
395
798
|
export interface SpotterAppInitData extends DefaultAppInitData {
|
|
396
799
|
embedParams?: {
|
|
397
800
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
801
|
+
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
398
802
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
803
|
+
starterPrompts?: StarterPromptsConfig;
|
|
399
804
|
};
|
|
400
805
|
}
|
|
401
806
|
|
|
@@ -439,16 +844,22 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
439
844
|
*/
|
|
440
845
|
protected async getAppInitData(): Promise<SpotterAppInitData> {
|
|
441
846
|
const defaultAppInitData = await super.getAppInitData();
|
|
442
|
-
|
|
847
|
+
const sidebarInitData = buildSpotterSidebarAppInitData(
|
|
848
|
+
defaultAppInitData,
|
|
849
|
+
this.viewConfig,
|
|
850
|
+
this.handleError.bind(this),
|
|
851
|
+
);
|
|
852
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
853
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
443
854
|
}
|
|
444
855
|
|
|
445
856
|
protected getEmbedParamsObject() {
|
|
446
857
|
const {
|
|
447
|
-
worksheetId,
|
|
448
858
|
searchOptions,
|
|
449
859
|
disableSourceSelection,
|
|
450
860
|
hideSourceSelection,
|
|
451
861
|
dataPanelV2,
|
|
862
|
+
updatedSpotterExperience,
|
|
452
863
|
showSpotterLimitations,
|
|
453
864
|
hideSampleQuestions,
|
|
454
865
|
runtimeFilters,
|
|
@@ -456,18 +867,13 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
456
867
|
runtimeParameters,
|
|
457
868
|
excludeRuntimeParametersfromURL,
|
|
458
869
|
updatedSpotterChatPrompt,
|
|
870
|
+
showSpotterRadiance,
|
|
871
|
+
defaultQueryMode,
|
|
459
872
|
enableStopAnswerGenerationEmbed,
|
|
460
873
|
spotterChatConfig,
|
|
874
|
+
spotterAnalystConfig,
|
|
461
875
|
} = this.viewConfig;
|
|
462
876
|
|
|
463
|
-
if (!worksheetId) {
|
|
464
|
-
this.handleError({
|
|
465
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
466
|
-
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
467
|
-
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
468
|
-
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
877
|
const queryParams = this.getBaseQueryParams();
|
|
472
878
|
queryParams[Param.SpotterEnabled] = true;
|
|
473
879
|
|
|
@@ -478,7 +884,10 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
478
884
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
479
885
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
480
886
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
887
|
+
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
888
|
+
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
481
889
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
890
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig?.analystId);
|
|
482
891
|
|
|
483
892
|
// Handle spotterChatConfig params
|
|
484
893
|
if (spotterChatConfig) {
|
|
@@ -499,6 +908,8 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
499
908
|
}
|
|
500
909
|
}
|
|
501
910
|
|
|
911
|
+
setParamIfDefined(queryParams, Param.UpdatedSpotterExperience, updatedSpotterExperience, true);
|
|
912
|
+
|
|
502
913
|
return queryParams;
|
|
503
914
|
}
|
|
504
915
|
|
|
@@ -510,8 +921,16 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
510
921
|
excludeRuntimeFiltersfromURL,
|
|
511
922
|
runtimeParameters,
|
|
512
923
|
excludeRuntimeParametersfromURL,
|
|
924
|
+
sharedConversationId,
|
|
925
|
+
dataSources,
|
|
513
926
|
} = this.viewConfig;
|
|
514
|
-
|
|
927
|
+
// Deep-link into the read-only shared-conversation reader view when a
|
|
928
|
+
// shared conversation id is supplied (e.g. a recipient landing from a
|
|
929
|
+
// host-configured CONVERSATION_URL share link); otherwise the normal
|
|
930
|
+
// Spotter conversation surface.
|
|
931
|
+
const path = sharedConversationId
|
|
932
|
+
? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
|
|
933
|
+
: 'insights/conv-assist';
|
|
515
934
|
const queryParams = this.getEmbedParamsObject();
|
|
516
935
|
|
|
517
936
|
let query = '';
|
|
@@ -531,8 +950,12 @@ export class SpotterEmbed extends TsEmbed {
|
|
|
531
950
|
}
|
|
532
951
|
|
|
533
952
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
534
|
-
|
|
535
|
-
|
|
953
|
+
...(!(Array.isArray(dataSources) && dataSources.length > 0) && worksheetId
|
|
954
|
+
&& { worksheet: worksheetId }),
|
|
955
|
+
...(searchOptions?.searchQuery && { query: searchOptions.searchQuery }),
|
|
956
|
+
...(Array.isArray(dataSources)
|
|
957
|
+
&& dataSources.length > 0
|
|
958
|
+
&& { dataSources: JSON.stringify(dataSources) }),
|
|
536
959
|
});
|
|
537
960
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
538
961
|
}
|