@thoughtspot/visual-embed-sdk 1.51.0 → 1.51.1
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 +27 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +43 -12
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +29 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +253 -1
- 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 +171 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +125 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +3 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +36 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +18 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +40 -13
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +25 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +349 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +15 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +68 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +9 -10
- 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/ts-embed.d.ts +16 -8
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +69 -32
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +537 -3
- package/cjs/src/embed/ts-embed.spec.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 +3 -2
- package/cjs/src/index.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/types.d.ts +330 -18
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +182 -12
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.spec.js +4 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-aBzH5ZwF.js → index-DxLfQxoT.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 +27 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +43 -12
- 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 +171 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +40 -13
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +9 -10
- 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/index.d.ts +3 -3
- package/dist/src/index.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 +330 -18
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +330 -61
- package/dist/tsembed-react.js +329 -60
- package/dist/tsembed.es.js +390 -123
- package/dist/tsembed.js +392 -125
- package/dist/visual-embed-sdk-react-full.d.ts +696 -89
- package/dist/visual-embed-sdk-react.d.ts +692 -88
- package/dist/visual-embed-sdk.d.ts +632 -59
- 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 +27 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +43 -12
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +30 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +253 -1
- 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 +171 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +125 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +3 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +36 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +18 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +40 -13
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +25 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +349 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +13 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +69 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +9 -10
- 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/ts-embed.d.ts +16 -8
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +69 -32
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +537 -3
- package/lib/src/embed/ts-embed.spec.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 +2 -2
- package/lib/src/index.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/types.d.ts +330 -18
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +182 -12
- package/lib/src/types.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 +632 -59
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/css-variables.ts +32 -0
- package/src/embed/app.spec.ts +335 -1
- package/src/embed/app.ts +71 -13
- package/src/embed/base.ts +1 -1
- package/src/embed/conversation.spec.ts +136 -0
- package/src/embed/conversation.ts +181 -3
- package/src/embed/events.spec.ts +4 -0
- package/src/embed/host-events.spec.ts +48 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +34 -0
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +457 -2
- package/src/embed/liveboard.ts +74 -15
- package/src/embed/spotter-utils.spec.ts +72 -0
- package/src/embed/spotter-utils.ts +21 -1
- package/src/embed/spotter-viz-utils.ts +9 -10
- package/src/embed/ts-embed.spec.ts +699 -3
- package/src/embed/ts-embed.ts +83 -37
- package/src/index.ts +43 -2
- 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/types.ts +329 -16
- package/src/utils.spec.ts +5 -0
|
@@ -440,6 +440,13 @@ export interface CustomCssVariables {
|
|
|
440
440
|
* Font color of the header in the Liveboard.
|
|
441
441
|
*/
|
|
442
442
|
"--ts-var-liveboard-header-font-color"?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Left and right margin of the header and the tab/filter section of an
|
|
445
|
+
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
446
|
+
* keep the header aligned with a custom tile-grid gutter.
|
|
447
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
448
|
+
*/
|
|
449
|
+
"--ts-var-liveboard-header-horizontal-margin"?: string;
|
|
443
450
|
/**
|
|
444
451
|
* Border color of the tiles in the Liveboard.
|
|
445
452
|
*/
|
|
@@ -456,6 +463,18 @@ export interface CustomCssVariables {
|
|
|
456
463
|
* Background color of the insight tiles in the Liveboard.
|
|
457
464
|
*/
|
|
458
465
|
"--ts-var-liveboard-insight-tile-background"?: string;
|
|
466
|
+
/**
|
|
467
|
+
* Icon color of the insight tiles in the Liveboard.
|
|
468
|
+
*/
|
|
469
|
+
"--ts-var-liveboard-insight-tile-icon-color"?: string;
|
|
470
|
+
/**
|
|
471
|
+
* Font color of the success text in the insight tiles in the Liveboard.
|
|
472
|
+
*/
|
|
473
|
+
"--ts-var-liveboard-insight-tile-success-color"?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Font color of the failure text in the insight tiles in the Liveboard.
|
|
476
|
+
*/
|
|
477
|
+
"--ts-var-liveboard-insight-tile-failure-color"?: string;
|
|
459
478
|
/**
|
|
460
479
|
* Border radius of the tiles in the Liveboard.
|
|
461
480
|
*/
|
|
@@ -676,6 +695,14 @@ export interface CustomCssVariables {
|
|
|
676
695
|
* Font color of the parameter chips in the Liveboard on active.
|
|
677
696
|
*/
|
|
678
697
|
"--ts-var-parameter-chip-active-text-color"?: string;
|
|
698
|
+
/**
|
|
699
|
+
* Color of the dot indicator shown on a filter or parameter chip in the
|
|
700
|
+
* centralized filter modal on a Liveboard. The dot appears when the
|
|
701
|
+
* filter or parameter value has been modified but the changes are not
|
|
702
|
+
* yet applied to the Liveboard.
|
|
703
|
+
* @version SDK: 1.52.0 | ThoughtSpot: 26.10.0.cl
|
|
704
|
+
*/
|
|
705
|
+
"--ts-var-unsaved-filter-indicator-color"?: string;
|
|
679
706
|
/**
|
|
680
707
|
* Background color of the action button in the Liveboard header.
|
|
681
708
|
*/
|
|
@@ -2126,6 +2153,85 @@ export interface FrameParams {
|
|
|
2126
2153
|
*/
|
|
2127
2154
|
[key: string]: string | number | boolean | undefined;
|
|
2128
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* Configuration for the pre-render wrapper element.
|
|
2158
|
+
* All properties here mirror the top-level preRender properties on
|
|
2159
|
+
* {@link BaseViewConfig} and take precedence over them when both are set,
|
|
2160
|
+
* so existing top-level usage continues to work without any changes.
|
|
2161
|
+
*
|
|
2162
|
+
* @version SDK: 1.52.0
|
|
2163
|
+
* @example
|
|
2164
|
+
* ```js
|
|
2165
|
+
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
2166
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2167
|
+
* preRenderConfig: {
|
|
2168
|
+
* preRenderId: 'my-liveboard',
|
|
2169
|
+
* preRenderContainer: '#my-scroll-container',
|
|
2170
|
+
* doNotTrackPreRenderSize: false,
|
|
2171
|
+
* zIndex: -10,
|
|
2172
|
+
* },
|
|
2173
|
+
* });
|
|
2174
|
+
* embed.preRender();
|
|
2175
|
+
* embed.showPreRender();
|
|
2176
|
+
* ```
|
|
2177
|
+
*/
|
|
2178
|
+
export interface PreRenderConfig {
|
|
2179
|
+
/**
|
|
2180
|
+
* Pre-render ID to identify the pre-render instance.
|
|
2181
|
+
* Takes precedence over the top-level `preRenderId` when both are set.
|
|
2182
|
+
*
|
|
2183
|
+
* Matches the embed warmed by `preRender()` to the one revealed by
|
|
2184
|
+
* `showPreRender()`. Embeds sharing an ID share one loaded frame: reuse the ID for
|
|
2185
|
+
* the same view, and give unrelated views their own or they will collide.
|
|
2186
|
+
* Required by `preRender()`, `showPreRender()`, and `hidePreRender()`, which log
|
|
2187
|
+
* and do nothing without it.
|
|
2188
|
+
*
|
|
2189
|
+
* @default undefined
|
|
2190
|
+
*/
|
|
2191
|
+
preRenderId?: string;
|
|
2192
|
+
/**
|
|
2193
|
+
* The DOM element or CSS selector string specifying the container into
|
|
2194
|
+
* which the pre-rendered wrapper is inserted.
|
|
2195
|
+
* Takes precedence over the top-level `preRenderContainer` when both are set.
|
|
2196
|
+
*
|
|
2197
|
+
* Set this when your app scrolls inside an element rather than the page (for
|
|
2198
|
+
* example `<body>` has `overflow: hidden`). Point it at the element that actually
|
|
2199
|
+
* scrolls, keep that element mounted while the embed is warm, and prefer a
|
|
2200
|
+
* selector string — it is re-resolved on reposition and so survives a remount,
|
|
2201
|
+
* while a detached element reference cannot be recovered. An invalid selector is
|
|
2202
|
+
* logged and falls back to `document.body`.
|
|
2203
|
+
* See {@link BaseViewConfig.preRenderContainer} for details, including Shadow DOM.
|
|
2204
|
+
*
|
|
2205
|
+
* @default document.body
|
|
2206
|
+
*/
|
|
2207
|
+
preRenderContainer?: string | HTMLElement;
|
|
2208
|
+
/**
|
|
2209
|
+
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
2210
|
+
* placeholder element.
|
|
2211
|
+
* Takes precedence over the top-level `doNotTrackPreRenderSize` when both are set.
|
|
2212
|
+
*
|
|
2213
|
+
* Set this only when you size the embed yourself; you then own alignment and must
|
|
2214
|
+
* call `syncPreRenderStyle()` after any change that moves or resizes it. Tracking
|
|
2215
|
+
* already pauses while hidden, so this is not needed to avoid work then.
|
|
2216
|
+
*
|
|
2217
|
+
* @default false
|
|
2218
|
+
*/
|
|
2219
|
+
doNotTrackPreRenderSize?: boolean;
|
|
2220
|
+
/**
|
|
2221
|
+
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
2222
|
+
* Override this when the host page's stacking context does not reach `-1000`
|
|
2223
|
+
* and the hidden wrapper still appears above other elements.
|
|
2224
|
+
*
|
|
2225
|
+
* A page that creates its own stacking context — a positioned app shell, a
|
|
2226
|
+
* transformed wrapper, a modal layer — can clamp `-1000`, and the hidden wrapper
|
|
2227
|
+
* then shows through or swallows clicks meant for your UI. Reach for this when you
|
|
2228
|
+
* see a faint panel behind your content, or clicks landing on nothing in the
|
|
2229
|
+
* region where the embed will eventually appear.
|
|
2230
|
+
*
|
|
2231
|
+
* @default -1000
|
|
2232
|
+
*/
|
|
2233
|
+
zIndex?: number;
|
|
2234
|
+
}
|
|
2129
2235
|
/**
|
|
2130
2236
|
* The common configuration object for an embedded view.
|
|
2131
2237
|
*/
|
|
@@ -2210,7 +2316,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2210
2316
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
2211
2317
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2212
2318
|
* ... // other embed view config
|
|
2213
|
-
* hiddenActions: [Action.Download, Action.
|
|
2319
|
+
* hiddenActions: [Action.Download, Action.ExportTML],
|
|
2214
2320
|
* });
|
|
2215
2321
|
* ```
|
|
2216
2322
|
* @important
|
|
@@ -2232,7 +2338,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2232
2338
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
2233
2339
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2234
2340
|
* ... // other embed view config
|
|
2235
|
-
* visibleActions: [Action.Download, Action.
|
|
2341
|
+
* visibleActions: [Action.Download, Action.ExportTML],
|
|
2236
2342
|
* });
|
|
2237
2343
|
* ```
|
|
2238
2344
|
*/
|
|
@@ -2317,6 +2423,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2317
2423
|
*
|
|
2318
2424
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2319
2425
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
2426
|
+
* @deprecated Use {@link PreRenderConfig.preRenderId} via `preRenderConfig` instead.
|
|
2320
2427
|
* @example
|
|
2321
2428
|
* ```js
|
|
2322
2429
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -2336,6 +2443,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2336
2443
|
* @type {boolean}
|
|
2337
2444
|
* @default false
|
|
2338
2445
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
2446
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackPreRenderSize} via `preRenderConfig` instead.
|
|
2339
2447
|
* @example
|
|
2340
2448
|
* ```js
|
|
2341
2449
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -2377,6 +2485,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2377
2485
|
*
|
|
2378
2486
|
* @type {string | HTMLElement}
|
|
2379
2487
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
2488
|
+
* @deprecated Use {@link PreRenderConfig.preRenderContainer} via `preRenderConfig` instead.
|
|
2380
2489
|
* @example
|
|
2381
2490
|
* ```js
|
|
2382
2491
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -2387,6 +2496,27 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2387
2496
|
* ```
|
|
2388
2497
|
*/
|
|
2389
2498
|
preRenderContainer?: string | HTMLElement;
|
|
2499
|
+
/**
|
|
2500
|
+
* Configuration for the pre-render wrapper element.
|
|
2501
|
+
* All properties here mirror the top-level preRender properties on
|
|
2502
|
+
* `BaseViewConfig` and take precedence over them when both are set,
|
|
2503
|
+
* so existing top-level usage continues to work without any changes.
|
|
2504
|
+
* See {@link PreRenderConfig} for available options.
|
|
2505
|
+
*
|
|
2506
|
+
* @version SDK: 1.52.0
|
|
2507
|
+
* @example
|
|
2508
|
+
* ```js
|
|
2509
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2510
|
+
* preRenderConfig: {
|
|
2511
|
+
* preRenderId: 'my-liveboard',
|
|
2512
|
+
* zIndex: -10,
|
|
2513
|
+
* },
|
|
2514
|
+
* });
|
|
2515
|
+
* embed.preRender();
|
|
2516
|
+
* embed.showPreRender();
|
|
2517
|
+
* ```
|
|
2518
|
+
*/
|
|
2519
|
+
preRenderConfig?: PreRenderConfig;
|
|
2390
2520
|
/**
|
|
2391
2521
|
* Enable the V2 shell. This can provide performance benefits
|
|
2392
2522
|
* due to a lighter-weight shell.
|
|
@@ -2825,7 +2955,7 @@ export interface HomePageConfig {
|
|
|
2825
2955
|
*
|
|
2826
2956
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
2827
2957
|
* ... //other embed view config
|
|
2828
|
-
* hiddenListColumns : [ListPageColumns.
|
|
2958
|
+
* hiddenListColumns : [ListPageColumns.Favorites,ListPageColumns.Author],
|
|
2829
2959
|
* })
|
|
2830
2960
|
* ```
|
|
2831
2961
|
*/
|
|
@@ -3138,6 +3268,25 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3138
3268
|
* ```
|
|
3139
3269
|
*/
|
|
3140
3270
|
enable2ColumnLayout?: boolean;
|
|
3271
|
+
/**
|
|
3272
|
+
* This attribute keeps an embedded Liveboard on the 12-column layout at
|
|
3273
|
+
* every width, instead of switching to the two-column or single-column
|
|
3274
|
+
* layout as the container narrows.
|
|
3275
|
+
*
|
|
3276
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3277
|
+
* @type {boolean}
|
|
3278
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
3279
|
+
* @default false
|
|
3280
|
+
* @example
|
|
3281
|
+
* ```js
|
|
3282
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3283
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3284
|
+
* ... // other embed view config
|
|
3285
|
+
* isLiveboardAlwaysOn12ColLayout: true,
|
|
3286
|
+
* })
|
|
3287
|
+
* ```
|
|
3288
|
+
*/
|
|
3289
|
+
isLiveboardAlwaysOn12ColLayout?: boolean;
|
|
3141
3290
|
/**
|
|
3142
3291
|
* This flag can be used to enable the compact header in Liveboard
|
|
3143
3292
|
*
|
|
@@ -3242,6 +3391,26 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3242
3391
|
* ```
|
|
3243
3392
|
*/
|
|
3244
3393
|
coverAndFilterOptionInPDF?: boolean;
|
|
3394
|
+
/**
|
|
3395
|
+
* Sets the gutter space (in pixels) between the visualization tiles of
|
|
3396
|
+
* an embedded Liveboard grid layout and its outer layout padding.
|
|
3397
|
+
* Accepts a non-negative integer; `0` renders the tiles without any gap
|
|
3398
|
+
* and removes the outer padding. When omitted, the gutter saved in the
|
|
3399
|
+
* Liveboard's styling settings (or the ThoughtSpot default) applies.
|
|
3400
|
+
*
|
|
3401
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3402
|
+
* @type {number}
|
|
3403
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
3404
|
+
* @example
|
|
3405
|
+
* ```js
|
|
3406
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3407
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3408
|
+
* ... // other embed view config
|
|
3409
|
+
* liveboardGutter: 8,
|
|
3410
|
+
* })
|
|
3411
|
+
* ```
|
|
3412
|
+
*/
|
|
3413
|
+
liveboardGutter?: number;
|
|
3245
3414
|
/**
|
|
3246
3415
|
* This flag is used to enable or disable the new centralized Liveboard filter UX
|
|
3247
3416
|
* (v2). When enabled, a unified modal is used to manage and update multiple filters
|
|
@@ -3672,7 +3841,7 @@ export enum EmbedEvent {
|
|
|
3672
3841
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
3673
3842
|
* @example
|
|
3674
3843
|
* ```js
|
|
3675
|
-
* searchEmbed.on(EmbedEvent.
|
|
3844
|
+
* searchEmbed.on(EmbedEvent.Drilldown, {
|
|
3676
3845
|
* points: {
|
|
3677
3846
|
* clickedPoint,
|
|
3678
3847
|
* selectedPoints: selectedPoint
|
|
@@ -3733,7 +3902,7 @@ export enum EmbedEvent {
|
|
|
3733
3902
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3734
3903
|
* @example
|
|
3735
3904
|
* ```js
|
|
3736
|
-
* appEmbed.on(EmbedEvent.
|
|
3905
|
+
* appEmbed.on(EmbedEvent.CustomAction, payload => {
|
|
3737
3906
|
* const data = payload.data;
|
|
3738
3907
|
* if (data.id === 'insert Custom Action ID here') {
|
|
3739
3908
|
* console.log('Custom Action event:', data.embedAnswerData);
|
|
@@ -3999,8 +4168,8 @@ export enum EmbedEvent {
|
|
|
3999
4168
|
*
|
|
4000
4169
|
* **Note**: This event is deprecated in v1.21.0.
|
|
4001
4170
|
* To fire an event when a download action is initiated on a chart or table,
|
|
4002
|
-
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.
|
|
4003
|
-
* `EmbedEvent.
|
|
4171
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
|
|
4172
|
+
* `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
|
|
4004
4173
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
4005
4174
|
* @example
|
|
4006
4175
|
* ```js
|
|
@@ -4050,10 +4219,10 @@ export enum EmbedEvent {
|
|
|
4050
4219
|
* @example
|
|
4051
4220
|
* ```js
|
|
4052
4221
|
* //emit when action starts
|
|
4053
|
-
* searchEmbed.on(EmbedEvent.
|
|
4222
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
4054
4223
|
* console.log('download CSV', payload)}, {start: true })
|
|
4055
4224
|
* //emit when action ends
|
|
4056
|
-
* searchEmbed.on(EmbedEvent.
|
|
4225
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
4057
4226
|
* console.log('download CSV', payload)})
|
|
4058
4227
|
* ```
|
|
4059
4228
|
*/
|
|
@@ -5509,6 +5678,7 @@ export enum HostEvent {
|
|
|
5509
5678
|
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
5510
5679
|
* console.log("iFrameURL", url);
|
|
5511
5680
|
* ```
|
|
5681
|
+
* @returns iframeUrl - The URL currently loaded in the embedded iframe.
|
|
5512
5682
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
5513
5683
|
*/
|
|
5514
5684
|
GetIframeUrl = "GetIframeUrl",
|
|
@@ -5675,6 +5845,41 @@ export enum HostEvent {
|
|
|
5675
5845
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
5676
5846
|
*/
|
|
5677
5847
|
OpenFilter = "openFilter",
|
|
5848
|
+
/**
|
|
5849
|
+
* Open the add-filter modal of a Liveboard, the same dialog that the
|
|
5850
|
+
* *Add filter* button in the Liveboard edit header opens, so the host
|
|
5851
|
+
* app can start the add-filter flow from its own UI.
|
|
5852
|
+
*
|
|
5853
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
5854
|
+
* Hiding the *Add filter* button with `hiddenActions:
|
|
5855
|
+
* [Action.AddFilter]` does not block this event, but disabling it with
|
|
5856
|
+
* `disabledActions` does.
|
|
5857
|
+
*
|
|
5858
|
+
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
5859
|
+
* existing filter, this event starts the creation of a new filter.
|
|
5860
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
5861
|
+
* @example
|
|
5862
|
+
* ```js
|
|
5863
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
5864
|
+
* ```
|
|
5865
|
+
*/
|
|
5866
|
+
OpenAddFilterModal = "openAddFilterModal",
|
|
5867
|
+
/**
|
|
5868
|
+
* Open the add-parameter panel of a Liveboard, the same panel that the
|
|
5869
|
+
* *Add parameter* button in the Liveboard edit header opens.
|
|
5870
|
+
* Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
|
|
5871
|
+
*
|
|
5872
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
5873
|
+
* Hiding the *Add parameter* button with `hiddenActions:
|
|
5874
|
+
* [Action.AddParameter]` does not block this event, but disabling it
|
|
5875
|
+
* with `disabledActions` does.
|
|
5876
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
5877
|
+
* @example
|
|
5878
|
+
* ```js
|
|
5879
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
5880
|
+
* ```
|
|
5881
|
+
*/
|
|
5882
|
+
OpenAddParameterModal = "openAddParameterModal",
|
|
5678
5883
|
/**
|
|
5679
5884
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
5680
5885
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
@@ -5756,6 +5961,10 @@ export enum HostEvent {
|
|
|
5756
5961
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
5757
5962
|
* data=>console.log(data))
|
|
5758
5963
|
* ```
|
|
5964
|
+
* @returns data - Object with a `v2Content` string: the export request
|
|
5965
|
+
* payload for the current Liveboard.
|
|
5966
|
+
* @returns type - The passthrough event name,
|
|
5967
|
+
* `getExportRequestForCurrentPinboard`.
|
|
5759
5968
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
5760
5969
|
*/
|
|
5761
5970
|
getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
|
|
@@ -5858,6 +6067,9 @@ export enum HostEvent {
|
|
|
5858
6067
|
* }, ContextType.Spotter);
|
|
5859
6068
|
* ```
|
|
5860
6069
|
*
|
|
6070
|
+
* @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
|
|
6071
|
+
* @returns tabId - GUID of the tab within that Liveboard.
|
|
6072
|
+
* @returns vizId - GUID of the newly created visualization.
|
|
5861
6073
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5862
6074
|
*/
|
|
5863
6075
|
Pin = "pin",
|
|
@@ -5896,13 +6108,13 @@ export enum HostEvent {
|
|
|
5896
6108
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
5897
6109
|
* @example
|
|
5898
6110
|
* ```js
|
|
5899
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
6111
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
5900
6112
|
* ```
|
|
5901
6113
|
* @example
|
|
5902
6114
|
* ```js
|
|
5903
6115
|
* // Manage schedules from liveboard context
|
|
5904
6116
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5905
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
6117
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
|
|
5906
6118
|
* ```
|
|
5907
6119
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5908
6120
|
*/
|
|
@@ -6347,6 +6559,7 @@ export enum HostEvent {
|
|
|
6347
6559
|
* console.log(tml.answer);
|
|
6348
6560
|
* });
|
|
6349
6561
|
* ```
|
|
6562
|
+
* @returns The TML representation of the current Answer, as an object.
|
|
6350
6563
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
6351
6564
|
* @important
|
|
6352
6565
|
*/
|
|
@@ -6790,6 +7003,8 @@ export enum HostEvent {
|
|
|
6790
7003
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
6791
7004
|
* console.log('filters', data);
|
|
6792
7005
|
* ```
|
|
7006
|
+
* @returns liveboardFilters - Filters applied on the Liveboard.
|
|
7007
|
+
* @returns runtimeFilters - Runtime filters applied on the Liveboard.
|
|
6793
7008
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
6794
7009
|
*/
|
|
6795
7010
|
GetFilters = "getFilters",
|
|
@@ -6939,6 +7154,9 @@ export enum HostEvent {
|
|
|
6939
7154
|
* console.log('tabs', tabDetails);
|
|
6940
7155
|
* });
|
|
6941
7156
|
* ```
|
|
7157
|
+
* @returns orderedTabIds - Tab GUIDs in the order they appear.
|
|
7158
|
+
* @returns numberOfTabs - Total number of tabs on the Liveboard.
|
|
7159
|
+
* @returns Tabs - Tab details, each with at least `id` and `name`.
|
|
6942
7160
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
6943
7161
|
*/
|
|
6944
7162
|
GetTabs = "getTabs",
|
|
@@ -6961,6 +7179,9 @@ export enum HostEvent {
|
|
|
6961
7179
|
* console.log('groups', groupDetails);
|
|
6962
7180
|
* });
|
|
6963
7181
|
* ```
|
|
7182
|
+
* @returns orderedGroupIds - Group GUIDs in the order they appear.
|
|
7183
|
+
* @returns numberOfGroups - Total number of groups on the Liveboard.
|
|
7184
|
+
* @returns Groups - Group details, each with at least `id` and `name`.
|
|
6964
7185
|
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
6965
7186
|
*/
|
|
6966
7187
|
GetGroups = "getGroups",
|
|
@@ -7035,6 +7256,9 @@ export enum HostEvent {
|
|
|
7035
7256
|
* // Alternative direct usage (not recommended)
|
|
7036
7257
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
7037
7258
|
* ```
|
|
7259
|
+
* @returns session - Session identifier for the Answer, for use with the
|
|
7260
|
+
* `AnswerService`.
|
|
7261
|
+
* @returns embedAnswerData - Data backing the Answer, when available.
|
|
7038
7262
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
7039
7263
|
*/
|
|
7040
7264
|
GetAnswerSession = "getAnswerSession",
|
|
@@ -7168,12 +7392,16 @@ export enum HostEvent {
|
|
|
7168
7392
|
* console.log('parameters', parameters);
|
|
7169
7393
|
* });
|
|
7170
7394
|
* ```
|
|
7395
|
+
* @returns parameters - Parameters currently applied on the Liveboard.
|
|
7171
7396
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
7172
7397
|
*/
|
|
7173
7398
|
GetParameters = "GetParameters",
|
|
7174
7399
|
/**
|
|
7175
7400
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
7176
|
-
* This event is deprecated. Use {@link HostEvent.
|
|
7401
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
7402
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
7403
|
+
* called with an empty payload, and reports an error when a named view
|
|
7404
|
+
* cannot be found.
|
|
7177
7405
|
* ```js
|
|
7178
7406
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7179
7407
|
* ```
|
|
@@ -7191,10 +7419,15 @@ export enum HostEvent {
|
|
|
7191
7419
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
7192
7420
|
/**
|
|
7193
7421
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
7422
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
7423
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
7424
|
+
* called with an empty payload, and reports an error when a named view
|
|
7425
|
+
* cannot be found.
|
|
7194
7426
|
* ```js
|
|
7195
7427
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7196
7428
|
* ```
|
|
7197
7429
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7430
|
+
* @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
7198
7431
|
*/
|
|
7199
7432
|
UpdatePersonalizedView = "UpdatePersonalisedView",
|
|
7200
7433
|
/**
|
|
@@ -7297,6 +7530,10 @@ export enum HostEvent {
|
|
|
7297
7530
|
* description: "Generated from Spotter"
|
|
7298
7531
|
* }, ContextType.Spotter);
|
|
7299
7532
|
* ```
|
|
7533
|
+
* @returns answerId - GUID of the saved Answer.
|
|
7534
|
+
* @returns saveResponse - Raw response from the save operation.
|
|
7535
|
+
* @returns shareResponse - Raw response from the share operation, when the
|
|
7536
|
+
* Answer was also made discoverable.
|
|
7300
7537
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
7301
7538
|
*/
|
|
7302
7539
|
SaveAnswer = "saveAnswer",
|
|
@@ -7680,9 +7917,10 @@ export type SpotterFileUploadFileTypes = {
|
|
|
7680
7917
|
* ThoughtSpot application pages include actions and menu commands
|
|
7681
7918
|
* for various user-initiated operations. These actions are represented
|
|
7682
7919
|
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
7683
|
-
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
7684
|
-
* - hiddenActions — the action is completely removed from
|
|
7685
|
-
* - visibleActions — allowlist, only these actions
|
|
7920
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
7921
|
+
* (user can see but not click). - hiddenActions — the action is completely removed from
|
|
7922
|
+
* the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
|
|
7923
|
+
* are shown; all others are hidden.
|
|
7686
7924
|
*
|
|
7687
7925
|
* Use disabledActions to disable (gray out) an action.
|
|
7688
7926
|
* Use hiddenActions to hide (fully remove) an action.
|
|
@@ -7735,6 +7973,17 @@ export enum Action {
|
|
|
7735
7973
|
* ```
|
|
7736
7974
|
*/
|
|
7737
7975
|
SaveAsView = "saveAsView",
|
|
7976
|
+
/**
|
|
7977
|
+
* The **EditInputTable** action on a Liveboard
|
|
7978
|
+
* page. Allows users to edit an input table used in an Answer directly from
|
|
7979
|
+
* a Liveboard.
|
|
7980
|
+
* @example
|
|
7981
|
+
* ```js
|
|
7982
|
+
* disabledActions: [Action.EditInputTable]
|
|
7983
|
+
* ```
|
|
7984
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7985
|
+
*/
|
|
7986
|
+
EditInputTable = "editInputTable",
|
|
7738
7987
|
/**
|
|
7739
7988
|
* The **Make a copy** action on a Liveboard or Answer
|
|
7740
7989
|
* page. Creates a copy of the Liveboard.
|
|
@@ -9050,6 +9299,10 @@ export enum Action {
|
|
|
9050
9299
|
* The **Add to Coaching** feature allows adding reference questions and
|
|
9051
9300
|
* business terms to improve Spotter’s responses. This feature is generally available
|
|
9052
9301
|
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
9302
|
+
*
|
|
9303
|
+
* This action governs both the answer-card **Add to memory** CTA and its
|
|
9304
|
+
* Spotter 3 successor, the response-footer **Remember this** CTA
|
|
9305
|
+
* (they are mutually exclusive).
|
|
9053
9306
|
* @example
|
|
9054
9307
|
* ```js
|
|
9055
9308
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -9430,6 +9683,56 @@ export enum Action {
|
|
|
9430
9683
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9431
9684
|
*/
|
|
9432
9685
|
SpotterChatModeSwitcher = "spotterChatModeSwitcher",
|
|
9686
|
+
/**
|
|
9687
|
+
* The **Basic Search** starter prompt pill.
|
|
9688
|
+
*
|
|
9689
|
+
* Starter prompt pills are the row of category buttons shown above the
|
|
9690
|
+
* Spotter chat input before a conversation starts. They give a new user
|
|
9691
|
+
* ready-made questions to click instead of typing one from scratch, and
|
|
9692
|
+
* disappear once the conversation begins. There are three, one per action
|
|
9693
|
+
* below.
|
|
9694
|
+
*
|
|
9695
|
+
* Clicking this pill opens a card of suggested simple questions; picking one
|
|
9696
|
+
* submits it to Spotter right away. Visible by default, and hidden along
|
|
9697
|
+
* with the other pills when the surface itself is off (see
|
|
9698
|
+
* {@link SpotterChatViewConfig.starterPrompts}).
|
|
9699
|
+
* @example
|
|
9700
|
+
* ```js
|
|
9701
|
+
* hiddenActions: [Action.QuickSearchPill]
|
|
9702
|
+
* ```
|
|
9703
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9704
|
+
*/
|
|
9705
|
+
QuickSearchPill = "quickSearchPill",
|
|
9706
|
+
/**
|
|
9707
|
+
* The **Deep Analysis** starter prompt pill, next to
|
|
9708
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
9709
|
+
*
|
|
9710
|
+
* Clicking it opens a card of suggested investigative questions ("why did
|
|
9711
|
+
* revenue drop?"). Picking one fills the chat input in Deep Analysis mode
|
|
9712
|
+
* rather than submitting immediately, so the user can edit it first.
|
|
9713
|
+
* Visible by default.
|
|
9714
|
+
* @example
|
|
9715
|
+
* ```js
|
|
9716
|
+
* hiddenActions: [Action.DeepAnalysisPill]
|
|
9717
|
+
* ```
|
|
9718
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9719
|
+
*/
|
|
9720
|
+
DeepAnalysisPill = "deepAnalysisPill",
|
|
9721
|
+
/**
|
|
9722
|
+
* The **Data Literacy** starter prompt pill, next to
|
|
9723
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
9724
|
+
*
|
|
9725
|
+
* Unlike the other two pills it opens no card: clicking it submits a prompt
|
|
9726
|
+
* that describes the data the model can answer over, helping a user who does
|
|
9727
|
+
* not yet know what is in the data source. The prompt text always comes from
|
|
9728
|
+
* ThoughtSpot, so only its label is customizable. Visible by default.
|
|
9729
|
+
* @example
|
|
9730
|
+
* ```js
|
|
9731
|
+
* hiddenActions: [Action.DataLiteracyPill]
|
|
9732
|
+
* ```
|
|
9733
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9734
|
+
*/
|
|
9735
|
+
DataLiteracyPill = "dataLiteracyPill",
|
|
9433
9736
|
/**
|
|
9434
9737
|
* The **Include current period** checkbox for date filters.
|
|
9435
9738
|
* Controls the visibility and availability of the option to include
|
|
@@ -9577,7 +9880,39 @@ export enum Action {
|
|
|
9577
9880
|
* disabledActions: [Action.SpotterAnalystSidebar]
|
|
9578
9881
|
* ```
|
|
9579
9882
|
*/
|
|
9580
|
-
SpotterAnalystSidebar = "spotterAnalystSidebar"
|
|
9883
|
+
SpotterAnalystSidebar = "spotterAnalystSidebar",
|
|
9884
|
+
/**
|
|
9885
|
+
* Controls visibility and disable state of the analyst list
|
|
9886
|
+
* ("Show all") in the Spotter Analyst interface.
|
|
9887
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9888
|
+
* @example
|
|
9889
|
+
* ```js
|
|
9890
|
+
* hiddenActions: [Action.SpotterAnalystList]
|
|
9891
|
+
* disabledActions: [Action.SpotterAnalystList]
|
|
9892
|
+
* ```
|
|
9893
|
+
*/
|
|
9894
|
+
SpotterAnalystList = "spotterAnalystList",
|
|
9895
|
+
/**
|
|
9896
|
+
* Controls visibility and disable state of the default Spotter analyst
|
|
9897
|
+
* entry in the Spotter Analyst interface.
|
|
9898
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9899
|
+
* @example
|
|
9900
|
+
* ```js
|
|
9901
|
+
* hiddenActions: [Action.SpotterDefaultAnalyst]
|
|
9902
|
+
* disabledActions: [Action.SpotterDefaultAnalyst]
|
|
9903
|
+
* ```
|
|
9904
|
+
*/
|
|
9905
|
+
SpotterDefaultAnalyst = "spotterDefaultAnalyst",
|
|
9906
|
+
/**
|
|
9907
|
+
* The **Spotter** button in the Liveboard header.
|
|
9908
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9909
|
+
* @example
|
|
9910
|
+
* ```js
|
|
9911
|
+
* hiddenActions: [Action.SpotterOnLiveboard]
|
|
9912
|
+
* disabledActions: [Action.SpotterOnLiveboard]
|
|
9913
|
+
* ```
|
|
9914
|
+
*/
|
|
9915
|
+
SpotterOnLiveboard = "spotterOnLiveboard"
|
|
9581
9916
|
}
|
|
9582
9917
|
export enum PrefetchFeatures {
|
|
9583
9918
|
FullApp = "FullApp",
|
|
@@ -10070,7 +10405,7 @@ export type ApiInterceptFlags = {
|
|
|
10070
10405
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10071
10406
|
* ...viewConfig,
|
|
10072
10407
|
* enableApiIntercept: true,
|
|
10073
|
-
* interceptUrls: [InterceptedApiType.
|
|
10408
|
+
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
10074
10409
|
* })
|
|
10075
10410
|
* ```
|
|
10076
10411
|
*
|
|
@@ -10568,7 +10903,10 @@ export interface LiveboardGroup {
|
|
|
10568
10903
|
name: string;
|
|
10569
10904
|
[key: string]: any;
|
|
10570
10905
|
}
|
|
10571
|
-
|
|
10906
|
+
/**
|
|
10907
|
+
* Levels at which a filter or parameter can be applied.
|
|
10908
|
+
*/
|
|
10909
|
+
export enum ApplicabilityLevel {
|
|
10572
10910
|
Liveboard = "LIVEBOARD",
|
|
10573
10911
|
Tab = "TAB",
|
|
10574
10912
|
Group = "GROUP"
|
|
@@ -10832,7 +11170,7 @@ class HostEventClient {
|
|
|
10832
11170
|
* @param payload - Optional payload for the event
|
|
10833
11171
|
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
10834
11172
|
*/
|
|
10835
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT
|
|
11173
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
|
|
10836
11174
|
}
|
|
10837
11175
|
class TsEmbed {
|
|
10838
11176
|
/**
|
|
@@ -11037,6 +11375,12 @@ class TsEmbed {
|
|
|
11037
11375
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
11038
11376
|
protected getRootIframeSrc(): string;
|
|
11039
11377
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11378
|
+
/**
|
|
11379
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
11380
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
11381
|
+
* backward compatibility.
|
|
11382
|
+
*/
|
|
11383
|
+
protected getPreRenderConfig(): PreRenderConfig;
|
|
11040
11384
|
/**
|
|
11041
11385
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
11042
11386
|
*/
|
|
@@ -11075,12 +11419,14 @@ class TsEmbed {
|
|
|
11075
11419
|
* fresh element; an element passed directly cannot be re-resolved.
|
|
11076
11420
|
*/
|
|
11077
11421
|
private resolvePreRenderContainerTarget;
|
|
11422
|
+
private inheritPreRenderContainer;
|
|
11423
|
+
private getCustomPreRenderContainer;
|
|
11078
11424
|
/**
|
|
11079
|
-
* Makes the container a positioning context for the absolutely
|
|
11080
|
-
* wrapper, stashing the original inline `position` on the element
|
|
11081
|
-
* destroy() can restore it exactly, leaving no trace. Recording it
|
|
11082
|
-
* element rather than per-instance lets the override be reverted even
|
|
11083
|
-
* embeds share the same container.
|
|
11425
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
11426
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
11427
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
11428
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
11429
|
+
* when embeds share the same container.
|
|
11084
11430
|
*/
|
|
11085
11431
|
private applyPreRenderContainerPositioning;
|
|
11086
11432
|
/**
|
|
@@ -11228,7 +11574,7 @@ class TsEmbed {
|
|
|
11228
11574
|
* ```
|
|
11229
11575
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
11230
11576
|
*/
|
|
11231
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
11577
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11232
11578
|
/**
|
|
11233
11579
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
11234
11580
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -11634,6 +11980,87 @@ export interface SpotterShareConversationConfig {
|
|
|
11634
11980
|
*/
|
|
11635
11981
|
spotterSharedConversationExitLabel?: string;
|
|
11636
11982
|
}
|
|
11983
|
+
/**
|
|
11984
|
+
* A single starter prompt question shown under a category pill.
|
|
11985
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11986
|
+
* @group Embed components
|
|
11987
|
+
*/
|
|
11988
|
+
export interface StarterPromptQuestion {
|
|
11989
|
+
/**
|
|
11990
|
+
* Short label shown as a clickable suggestion. Falls back to `prompt` when
|
|
11991
|
+
* omitted. ThoughtSpot truncates it beyond 80 characters.
|
|
11992
|
+
*/
|
|
11993
|
+
label?: string;
|
|
11994
|
+
/**
|
|
11995
|
+
* Prompt text sent to Spotter on click. ThoughtSpot truncates it beyond
|
|
11996
|
+
* 300 characters.
|
|
11997
|
+
*/
|
|
11998
|
+
prompt: string;
|
|
11999
|
+
}
|
|
12000
|
+
/**
|
|
12001
|
+
* Configuration for a starter prompt category with questions
|
|
12002
|
+
* (`quick` and `research`).
|
|
12003
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12004
|
+
* @group Embed components
|
|
12005
|
+
*/
|
|
12006
|
+
export interface StarterPromptCategory {
|
|
12007
|
+
/**
|
|
12008
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
12009
|
+
* beyond 30 characters.
|
|
12010
|
+
*/
|
|
12011
|
+
label?: string;
|
|
12012
|
+
/**
|
|
12013
|
+
* Replaces the backend-generated prompts. ThoughtSpot renders the first 4
|
|
12014
|
+
* and drops any entry without a `prompt`.
|
|
12015
|
+
*/
|
|
12016
|
+
questions?: StarterPromptQuestion[];
|
|
12017
|
+
}
|
|
12018
|
+
/**
|
|
12019
|
+
* Configuration for the Data Literacy starter prompt category.
|
|
12020
|
+
* Only the label is customizable; the prompt text comes from the backend.
|
|
12021
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12022
|
+
* @group Embed components
|
|
12023
|
+
*/
|
|
12024
|
+
export interface StarterPreviewDataCategory {
|
|
12025
|
+
/**
|
|
12026
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
12027
|
+
* beyond 30 characters.
|
|
12028
|
+
*/
|
|
12029
|
+
label?: string;
|
|
12030
|
+
}
|
|
12031
|
+
/**
|
|
12032
|
+
* Content configuration for the Spotter starter prompts.
|
|
12033
|
+
* Keys are fixed: `quick` (Basic Search), `research` (Deep Analysis),
|
|
12034
|
+
* `previewData` (Data Literacy) and `liveboard` (Liveboard chat panel).
|
|
12035
|
+
*
|
|
12036
|
+
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
12037
|
+
* the Liveboard SpotterViz surface are configured separately through
|
|
12038
|
+
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
12039
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12040
|
+
* @group Embed components
|
|
12041
|
+
*/
|
|
12042
|
+
export interface StarterPromptsConfig {
|
|
12043
|
+
/**
|
|
12044
|
+
* Turns the starter prompts surface on. Must be set explicitly, an
|
|
12045
|
+
* unset flag leaves the surface off.
|
|
12046
|
+
*
|
|
12047
|
+
* Either this or `enableStarterPrompts` turns the surface on, so `false`
|
|
12048
|
+
* here does not switch it off while `enableStarterPrompts` is `true`.
|
|
12049
|
+
* @default false
|
|
12050
|
+
*/
|
|
12051
|
+
enable?: boolean;
|
|
12052
|
+
/** Basic Search category configuration. */
|
|
12053
|
+
quick?: StarterPromptCategory;
|
|
12054
|
+
/** Deep Analysis category configuration. */
|
|
12055
|
+
research?: StarterPromptCategory;
|
|
12056
|
+
/** Data Literacy category configuration. */
|
|
12057
|
+
previewData?: StarterPreviewDataCategory;
|
|
12058
|
+
/**
|
|
12059
|
+
* Starter prompts for the Spotter chat panel on a Liveboard.
|
|
12060
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12061
|
+
*/
|
|
12062
|
+
liveboard?: StarterPromptQuestion[];
|
|
12063
|
+
}
|
|
11637
12064
|
/**
|
|
11638
12065
|
* Configuration for customizing Spotter chat UI branding.
|
|
11639
12066
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl
|
|
@@ -11674,11 +12101,83 @@ export interface SpotterChatViewConfig {
|
|
|
11674
12101
|
/**
|
|
11675
12102
|
* Enables starter prompts in the Spotter chat interface.
|
|
11676
12103
|
*
|
|
11677
|
-
*
|
|
12104
|
+
* Either this or `starterPrompts.enable` turns the surface on, so it stays
|
|
12105
|
+
* on while this is `true` even if `starterPrompts.enable` is `false`.
|
|
12106
|
+
*
|
|
12107
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
11678
12108
|
* @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl
|
|
11679
12109
|
* @default false
|
|
11680
12110
|
*/
|
|
11681
12111
|
enableStarterPrompts?: boolean;
|
|
12112
|
+
/**
|
|
12113
|
+
* Customizes the labels and questions of the Spotter starter prompts.
|
|
12114
|
+
* Individual pills are hidden or shown with `hiddenActions` /
|
|
12115
|
+
* `visibleActions` using `Action.QuickSearchPill`,
|
|
12116
|
+
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
12117
|
+
*
|
|
12118
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12119
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12120
|
+
* @example
|
|
12121
|
+
* ```js
|
|
12122
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12123
|
+
* worksheetId: 'worksheet-id',
|
|
12124
|
+
* hiddenActions: [Action.DeepAnalysisPill],
|
|
12125
|
+
* spotterChatConfig: {
|
|
12126
|
+
* starterPrompts: {
|
|
12127
|
+
* enable: true,
|
|
12128
|
+
* quick: {
|
|
12129
|
+
* label: 'Quick questions',
|
|
12130
|
+
* questions: [
|
|
12131
|
+
* { label: 'Top products', prompt: 'What are the top products by revenue?' },
|
|
12132
|
+
* ],
|
|
12133
|
+
* },
|
|
12134
|
+
* previewData: { label: 'Explore your data' },
|
|
12135
|
+
* },
|
|
12136
|
+
* },
|
|
12137
|
+
* })
|
|
12138
|
+
* ```
|
|
12139
|
+
*/
|
|
12140
|
+
starterPrompts?: StarterPromptsConfig;
|
|
12141
|
+
/**
|
|
12142
|
+
* Opens the Spotter chat panel when the Liveboard loads.
|
|
12143
|
+
*
|
|
12144
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
12145
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12146
|
+
* @default true
|
|
12147
|
+
* @example
|
|
12148
|
+
* ```js
|
|
12149
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
12150
|
+
* liveboardId: 'liveboard-id',
|
|
12151
|
+
* spotterChatConfig: {
|
|
12152
|
+
* openSpotterOnLiveboardByDefault: false,
|
|
12153
|
+
* },
|
|
12154
|
+
* })
|
|
12155
|
+
* ```
|
|
12156
|
+
*/
|
|
12157
|
+
openSpotterOnLiveboardByDefault?: boolean;
|
|
12158
|
+
}
|
|
12159
|
+
/**
|
|
12160
|
+
* Configuration for the Spotter Analyst experience.
|
|
12161
|
+
* Can be used in SpotterEmbed.
|
|
12162
|
+
* @group Embed components
|
|
12163
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12164
|
+
* @example
|
|
12165
|
+
* ```js
|
|
12166
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12167
|
+
* ... //other embed view config
|
|
12168
|
+
* spotterAnalystConfig: {
|
|
12169
|
+
* analystId: 'analyst-id-1234',
|
|
12170
|
+
* },
|
|
12171
|
+
* })
|
|
12172
|
+
* ```
|
|
12173
|
+
*/
|
|
12174
|
+
export interface SpotterAnalystConfig {
|
|
12175
|
+
/**
|
|
12176
|
+
* Pins the embed to a single spotter analyst. Implies no default Spotter
|
|
12177
|
+
* and no "Show all".
|
|
12178
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12179
|
+
*/
|
|
12180
|
+
analystId?: string;
|
|
11682
12181
|
}
|
|
11683
12182
|
/**
|
|
11684
12183
|
* The configuration for the embedded spotterEmbed options.
|
|
@@ -11709,6 +12208,22 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
11709
12208
|
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11710
12209
|
*/
|
|
11711
12210
|
dataSources?: string[];
|
|
12211
|
+
/**
|
|
12212
|
+
* Configuration for the Spotter Analyst experience.
|
|
12213
|
+
*
|
|
12214
|
+
* Supported embed types: `SpotterEmbed`
|
|
12215
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12216
|
+
* @example
|
|
12217
|
+
* ```js
|
|
12218
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12219
|
+
* ... //other embed view config
|
|
12220
|
+
* spotterAnalystConfig: {
|
|
12221
|
+
* analystId: 'analyst-id-1234',
|
|
12222
|
+
* },
|
|
12223
|
+
* })
|
|
12224
|
+
* ```
|
|
12225
|
+
*/
|
|
12226
|
+
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
11712
12227
|
/**
|
|
11713
12228
|
* Ability to pass a starting search query to the conversation.
|
|
11714
12229
|
*/
|
|
@@ -12030,6 +12545,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
|
|
|
12030
12545
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
12031
12546
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
12032
12547
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
12548
|
+
starterPrompts?: StarterPromptsConfig;
|
|
12033
12549
|
};
|
|
12034
12550
|
}
|
|
12035
12551
|
/**
|
|
@@ -12119,13 +12635,12 @@ export interface SpotterVizStarterPrompt {
|
|
|
12119
12635
|
* customStarterPrompts: [
|
|
12120
12636
|
* { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
|
|
12121
12637
|
* ],
|
|
12122
|
-
* //
|
|
12638
|
+
* // The options below require SDK: 1.51.0
|
|
12123
12639
|
* loaderHeadline: 'Crunching the numbers...',
|
|
12124
12640
|
* loaderTips: [
|
|
12125
12641
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
12126
12642
|
* { label: 'Tip', text: 'use natural language' },
|
|
12127
12643
|
* ],
|
|
12128
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12129
12644
|
* liveboardBrandName: 'Reports',
|
|
12130
12645
|
* spotterBrandName: 'Analyst',
|
|
12131
12646
|
* insightTileBrandName: 'Insight card',
|
|
@@ -12178,47 +12693,47 @@ export interface SpotterVizConfig {
|
|
|
12178
12693
|
/**
|
|
12179
12694
|
* Custom headline text shown in the SpotterViz loading state.
|
|
12180
12695
|
* Replaces the default loading headline.
|
|
12181
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
12696
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12182
12697
|
*/
|
|
12183
12698
|
loaderHeadline?: string;
|
|
12184
12699
|
/**
|
|
12185
12700
|
* Custom tips shown in the SpotterViz loading state.
|
|
12186
12701
|
* Replaces the default loading tips with the provided list.
|
|
12187
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
12702
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12188
12703
|
*/
|
|
12189
12704
|
loaderTips?: SpotterVizLoaderTip[];
|
|
12190
12705
|
/**
|
|
12191
12706
|
* Custom term used to replace "Liveboard" in the agent's responses.
|
|
12192
|
-
* @version SDK: 1.
|
|
12707
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12193
12708
|
* @default ''
|
|
12194
12709
|
*/
|
|
12195
12710
|
liveboardBrandName?: string;
|
|
12196
12711
|
/**
|
|
12197
12712
|
* Custom term used to replace "Spotter" in the agent's responses.
|
|
12198
|
-
* @version SDK: 1.
|
|
12713
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12199
12714
|
* @default ''
|
|
12200
12715
|
*/
|
|
12201
12716
|
spotterBrandName?: string;
|
|
12202
12717
|
/**
|
|
12203
12718
|
* Custom term used to replace "Insight tile" in the UI and in the agent's responses.
|
|
12204
|
-
* @version SDK: 1.
|
|
12719
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12205
12720
|
* @default ''
|
|
12206
12721
|
*/
|
|
12207
12722
|
insightTileBrandName?: string;
|
|
12208
12723
|
/**
|
|
12209
12724
|
* Custom term used to replace "View plan" in the insight tile menu.
|
|
12210
|
-
* @version SDK: 1.
|
|
12725
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12211
12726
|
*/
|
|
12212
12727
|
insightTileViewPlanLabel?: string;
|
|
12213
12728
|
/**
|
|
12214
12729
|
* Custom loader text shown on the insight tile.
|
|
12215
|
-
* @version SDK: 1.
|
|
12730
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12216
12731
|
*/
|
|
12217
12732
|
insightTileLoaderText?: string;
|
|
12218
12733
|
}
|
|
12219
12734
|
/**
|
|
12220
12735
|
* A single tip shown in the SpotterViz loading state.
|
|
12221
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
12736
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12222
12737
|
* @group Embed components
|
|
12223
12738
|
*/
|
|
12224
12739
|
export interface SpotterVizLoaderTip {
|
|
@@ -12266,7 +12781,11 @@ export enum Page {
|
|
|
12266
12781
|
/**
|
|
12267
12782
|
* Collections listing page
|
|
12268
12783
|
*/
|
|
12269
|
-
Collections = "collections"
|
|
12784
|
+
Collections = "collections",
|
|
12785
|
+
/**
|
|
12786
|
+
* Liveboard schedules listing page
|
|
12787
|
+
*/
|
|
12788
|
+
LiveboardSchedules = "liveboard-schedules"
|
|
12270
12789
|
}
|
|
12271
12790
|
/**
|
|
12272
12791
|
* Define the initial state of column custom group accordions
|
|
@@ -12664,6 +13183,11 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
12664
13183
|
* `false` fetches visualizations incrementally as
|
|
12665
13184
|
* users scroll the page to view the charts and tables.
|
|
12666
13185
|
*
|
|
13186
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
13187
|
+
* {@link lazyLoadingForFullHeight} and
|
|
13188
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
13189
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
13190
|
+
*
|
|
12667
13191
|
* Supported embed types: `AppEmbed`
|
|
12668
13192
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
|
|
12669
13193
|
* @example
|
|
@@ -12870,11 +13394,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
12870
13394
|
*/
|
|
12871
13395
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
12872
13396
|
/**
|
|
12873
|
-
*
|
|
13397
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
13398
|
+
* loading the whole full-height Liveboard at once.
|
|
13399
|
+
*
|
|
13400
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13401
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13402
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
13403
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
12874
13404
|
*
|
|
12875
13405
|
* @type {boolean}
|
|
12876
13406
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
12877
|
-
* @default
|
|
13407
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
12878
13408
|
* @example
|
|
12879
13409
|
* ```js
|
|
12880
13410
|
* const embed = new AppEmbed('#embed-container', {
|
|
@@ -12886,27 +13416,43 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
12886
13416
|
*/
|
|
12887
13417
|
lazyLoadingForFullHeight?: boolean;
|
|
12888
13418
|
/**
|
|
12889
|
-
*
|
|
13419
|
+
* Computes the visible region of the embed against its scrollable and
|
|
13420
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
13421
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
12890
13422
|
*
|
|
12891
|
-
*
|
|
12892
|
-
*
|
|
13423
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13424
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13425
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
13426
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
13427
|
+
* tracking.
|
|
12893
13428
|
*
|
|
12894
13429
|
* @type {boolean}
|
|
12895
|
-
* @default
|
|
13430
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
12896
13431
|
* @hidden
|
|
12897
13432
|
*/
|
|
12898
13433
|
enableScrollableContainerLazyLoading?: boolean;
|
|
12899
13434
|
/**
|
|
12900
|
-
*
|
|
13435
|
+
* How far outside the viewport a visualization starts loading, when
|
|
13436
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
12901
13437
|
*
|
|
12902
13438
|
* For example, if the margin is set to '10px',
|
|
12903
13439
|
* the visualization will be loaded 10px before its top edge is visible in the
|
|
12904
13440
|
* viewport.
|
|
12905
13441
|
*
|
|
12906
|
-
* The format is similar to CSS margin
|
|
13442
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
13443
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
13444
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
13445
|
+
* `auto`; an invalid value is logged and ignored.
|
|
13446
|
+
*
|
|
13447
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
13448
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
13449
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
13450
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
13451
|
+
* only once it is actually visible.
|
|
12907
13452
|
*
|
|
12908
13453
|
* @type {string}
|
|
12909
13454
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13455
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
12910
13456
|
* @example
|
|
12911
13457
|
* ```js
|
|
12912
13458
|
* const embed = new AppEmbed('#embed-container', {
|
|
@@ -13081,13 +13627,12 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13081
13627
|
* inputChatPlaceholder: 'Ask a question...',
|
|
13082
13628
|
* hideStarterPrompts: false,
|
|
13083
13629
|
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
13084
|
-
* //
|
|
13630
|
+
* // The options below require SDK: 1.51.0
|
|
13085
13631
|
* loaderHeadline: 'Crunching the numbers...',
|
|
13086
13632
|
* loaderTips: [
|
|
13087
13633
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
13088
13634
|
* { label: 'Tip', text: 'use natural language' },
|
|
13089
13635
|
* ],
|
|
13090
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
13091
13636
|
* liveboardBrandName: 'Reports',
|
|
13092
13637
|
* spotterBrandName: 'Analyst',
|
|
13093
13638
|
* insightTileBrandName: 'Insight card',
|
|
@@ -13183,6 +13728,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
13183
13728
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
13184
13729
|
spotterVizConfig?: SpotterVizConfig;
|
|
13185
13730
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
13731
|
+
starterPrompts?: StarterPromptsConfig;
|
|
13186
13732
|
};
|
|
13187
13733
|
}
|
|
13188
13734
|
/**
|
|
@@ -13465,7 +14011,7 @@ export const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[], add
|
|
|
13465
14011
|
/**
|
|
13466
14012
|
* Initializes the Visual Embed SDK globally and perform
|
|
13467
14013
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
13468
|
-
* component like Liveboard etc can be embedded. But need not wait for
|
|
14014
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
13469
14015
|
* to actually embed. That is handled internally.
|
|
13470
14016
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
13471
14017
|
* authentication mechanism and so on.
|
|
@@ -13564,6 +14110,7 @@ export const reloadIframe: (iFrame: HTMLIFrameElement) => void;
|
|
|
13564
14110
|
export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
13565
14111
|
embedParams?: {
|
|
13566
14112
|
spotterVizConfig?: SpotterVizConfig;
|
|
14113
|
+
starterPrompts?: StarterPromptsConfig;
|
|
13567
14114
|
};
|
|
13568
14115
|
}
|
|
13569
14116
|
/**
|
|
@@ -13582,6 +14129,11 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
13582
14129
|
* Setting `fullHeight` to `false` fetches visualizations
|
|
13583
14130
|
* incrementally as users scroll the page to view the charts and tables.
|
|
13584
14131
|
*
|
|
14132
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
14133
|
+
* {@link lazyLoadingForFullHeight} and
|
|
14134
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
14135
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
14136
|
+
*
|
|
13585
14137
|
*
|
|
13586
14138
|
* Supported embed types: `LiveboardEmbed`
|
|
13587
14139
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
@@ -13974,11 +14526,17 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
13974
14526
|
*/
|
|
13975
14527
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
13976
14528
|
/**
|
|
13977
|
-
*
|
|
14529
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
14530
|
+
* loading the whole full-height Liveboard at once.
|
|
14531
|
+
*
|
|
14532
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14533
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14534
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
14535
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
13978
14536
|
*
|
|
13979
14537
|
* @type {boolean}
|
|
13980
14538
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13981
|
-
* @default
|
|
14539
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13982
14540
|
* @example
|
|
13983
14541
|
* ```js
|
|
13984
14542
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -13990,26 +14548,42 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
13990
14548
|
*/
|
|
13991
14549
|
lazyLoadingForFullHeight?: boolean;
|
|
13992
14550
|
/**
|
|
13993
|
-
*
|
|
14551
|
+
* Computes the visible region of the embed against its scrollable and
|
|
14552
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
14553
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
13994
14554
|
*
|
|
13995
|
-
*
|
|
13996
|
-
*
|
|
14555
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14556
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14557
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
14558
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
14559
|
+
* tracking.
|
|
13997
14560
|
*
|
|
13998
14561
|
* @type {boolean}
|
|
13999
|
-
* @default
|
|
14562
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14000
14563
|
*/
|
|
14001
14564
|
enableScrollableContainerLazyLoading?: boolean;
|
|
14002
14565
|
/**
|
|
14003
|
-
*
|
|
14566
|
+
* How far outside the viewport a visualization starts loading, when
|
|
14567
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
14004
14568
|
*
|
|
14005
14569
|
* For example, if the margin is set to '10px',
|
|
14006
14570
|
* the visualization will be loaded 10px before its top edge is visible in the
|
|
14007
14571
|
* viewport.
|
|
14008
14572
|
*
|
|
14009
|
-
* The format is similar to CSS margin
|
|
14573
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
14574
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
14575
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
14576
|
+
* `auto`; an invalid value is logged and ignored.
|
|
14577
|
+
*
|
|
14578
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
14579
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
14580
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
14581
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
14582
|
+
* only once it is actually visible.
|
|
14010
14583
|
*
|
|
14011
14584
|
* @type {string}
|
|
14012
14585
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14586
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
14013
14587
|
* @example
|
|
14014
14588
|
* ```js
|
|
14015
14589
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -14113,13 +14687,12 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14113
14687
|
* inputChatPlaceholder: 'Ask a question...',
|
|
14114
14688
|
* hideStarterPrompts: false,
|
|
14115
14689
|
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
14116
|
-
* //
|
|
14690
|
+
* // The options below require SDK: 1.51.0
|
|
14117
14691
|
* loaderHeadline: 'Crunching the numbers...',
|
|
14118
14692
|
* loaderTips: [
|
|
14119
14693
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
14120
14694
|
* { label: 'Tip', text: 'use natural language' },
|
|
14121
14695
|
* ],
|
|
14122
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
14123
14696
|
* liveboardBrandName: 'Reports',
|
|
14124
14697
|
* spotterBrandName: 'Analyst',
|
|
14125
14698
|
* insightTileBrandName: 'Insight card',
|
|
@@ -14230,7 +14803,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
14230
14803
|
* @param {any} data The payload to send with the message
|
|
14231
14804
|
* @returns A promise that resolves with the response from the embedded app
|
|
14232
14805
|
*/
|
|
14233
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
14806
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
14234
14807
|
/**
|
|
14235
14808
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
14236
14809
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|