@thoughtspot/visual-embed-sdk 1.51.0 → 1.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/search.spec.js +28 -0
- package/cjs/src/embed/search.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 +97 -9
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +76 -35
- 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.d.ts +5 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +19 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +37 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-aBzH5ZwF.js → index-D8_Zs-Nr.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 +97 -9
- 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/src/utils.d.ts +5 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +354 -64
- package/dist/tsembed-react.js +353 -63
- package/dist/tsembed.es.js +414 -126
- package/dist/tsembed.js +416 -128
- package/dist/visual-embed-sdk-react-full.d.ts +777 -90
- package/dist/visual-embed-sdk-react.d.ts +773 -89
- package/dist/visual-embed-sdk.d.ts +713 -60
- 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/search.spec.js +28 -0
- package/lib/src/embed/search.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 +97 -9
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +77 -36
- 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.d.ts +5 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +17 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +38 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +713 -60
- 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/search.spec.ts +31 -0
- 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 +91 -41
- 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 +49 -0
- package/src/utils.ts +16 -0
|
@@ -441,6 +441,13 @@ export interface CustomCssVariables {
|
|
|
441
441
|
* Font color of the header in the Liveboard.
|
|
442
442
|
*/
|
|
443
443
|
"--ts-var-liveboard-header-font-color"?: string;
|
|
444
|
+
/**
|
|
445
|
+
* Left and right margin of the header and the tab/filter section of an
|
|
446
|
+
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
447
|
+
* keep the header aligned with a custom tile-grid gutter.
|
|
448
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
449
|
+
*/
|
|
450
|
+
"--ts-var-liveboard-header-horizontal-margin"?: string;
|
|
444
451
|
/**
|
|
445
452
|
* Border color of the tiles in the Liveboard.
|
|
446
453
|
*/
|
|
@@ -457,6 +464,18 @@ export interface CustomCssVariables {
|
|
|
457
464
|
* Background color of the insight tiles in the Liveboard.
|
|
458
465
|
*/
|
|
459
466
|
"--ts-var-liveboard-insight-tile-background"?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Icon color of the insight tiles in the Liveboard.
|
|
469
|
+
*/
|
|
470
|
+
"--ts-var-liveboard-insight-tile-icon-color"?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Font color of the success text in the insight tiles in the Liveboard.
|
|
473
|
+
*/
|
|
474
|
+
"--ts-var-liveboard-insight-tile-success-color"?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Font color of the failure text in the insight tiles in the Liveboard.
|
|
477
|
+
*/
|
|
478
|
+
"--ts-var-liveboard-insight-tile-failure-color"?: string;
|
|
460
479
|
/**
|
|
461
480
|
* Border radius of the tiles in the Liveboard.
|
|
462
481
|
*/
|
|
@@ -677,6 +696,14 @@ export interface CustomCssVariables {
|
|
|
677
696
|
* Font color of the parameter chips in the Liveboard on active.
|
|
678
697
|
*/
|
|
679
698
|
"--ts-var-parameter-chip-active-text-color"?: string;
|
|
699
|
+
/**
|
|
700
|
+
* Color of the dot indicator shown on a filter or parameter chip in the
|
|
701
|
+
* centralized filter modal on a Liveboard. The dot appears when the
|
|
702
|
+
* filter or parameter value has been modified but the changes are not
|
|
703
|
+
* yet applied to the Liveboard.
|
|
704
|
+
* @version SDK: 1.52.0 | ThoughtSpot: 26.10.0.cl
|
|
705
|
+
*/
|
|
706
|
+
"--ts-var-unsaved-filter-indicator-color"?: string;
|
|
680
707
|
/**
|
|
681
708
|
* Background color of the action button in the Liveboard header.
|
|
682
709
|
*/
|
|
@@ -2069,6 +2096,85 @@ export interface FrameParams {
|
|
|
2069
2096
|
*/
|
|
2070
2097
|
[key: string]: string | number | boolean | undefined;
|
|
2071
2098
|
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Configuration for the pre-render wrapper element.
|
|
2101
|
+
* All properties here mirror the top-level preRender properties on
|
|
2102
|
+
* {@link BaseViewConfig} and take precedence over them when both are set,
|
|
2103
|
+
* so existing top-level usage continues to work without any changes.
|
|
2104
|
+
*
|
|
2105
|
+
* @version SDK: 1.52.0
|
|
2106
|
+
* @example
|
|
2107
|
+
* ```js
|
|
2108
|
+
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
2109
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2110
|
+
* preRenderConfig: {
|
|
2111
|
+
* preRenderId: 'my-liveboard',
|
|
2112
|
+
* preRenderContainer: '#my-scroll-container',
|
|
2113
|
+
* doNotTrackPreRenderSize: false,
|
|
2114
|
+
* zIndex: -10,
|
|
2115
|
+
* },
|
|
2116
|
+
* });
|
|
2117
|
+
* embed.preRender();
|
|
2118
|
+
* embed.showPreRender();
|
|
2119
|
+
* ```
|
|
2120
|
+
*/
|
|
2121
|
+
export interface PreRenderConfig {
|
|
2122
|
+
/**
|
|
2123
|
+
* Pre-render ID to identify the pre-render instance.
|
|
2124
|
+
* Takes precedence over the top-level `preRenderId` when both are set.
|
|
2125
|
+
*
|
|
2126
|
+
* Matches the embed warmed by `preRender()` to the one revealed by
|
|
2127
|
+
* `showPreRender()`. Embeds sharing an ID share one loaded frame: reuse the ID for
|
|
2128
|
+
* the same view, and give unrelated views their own or they will collide.
|
|
2129
|
+
* Required by `preRender()`, `showPreRender()`, and `hidePreRender()`, which log
|
|
2130
|
+
* and do nothing without it.
|
|
2131
|
+
*
|
|
2132
|
+
* @default undefined
|
|
2133
|
+
*/
|
|
2134
|
+
preRenderId?: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* The DOM element or CSS selector string specifying the container into
|
|
2137
|
+
* which the pre-rendered wrapper is inserted.
|
|
2138
|
+
* Takes precedence over the top-level `preRenderContainer` when both are set.
|
|
2139
|
+
*
|
|
2140
|
+
* Set this when your app scrolls inside an element rather than the page (for
|
|
2141
|
+
* example `<body>` has `overflow: hidden`). Point it at the element that actually
|
|
2142
|
+
* scrolls, keep that element mounted while the embed is warm, and prefer a
|
|
2143
|
+
* selector string — it is re-resolved on reposition and so survives a remount,
|
|
2144
|
+
* while a detached element reference cannot be recovered. An invalid selector is
|
|
2145
|
+
* logged and falls back to `document.body`.
|
|
2146
|
+
* See {@link BaseViewConfig.preRenderContainer} for details, including Shadow DOM.
|
|
2147
|
+
*
|
|
2148
|
+
* @default document.body
|
|
2149
|
+
*/
|
|
2150
|
+
preRenderContainer?: string | HTMLElement;
|
|
2151
|
+
/**
|
|
2152
|
+
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
2153
|
+
* placeholder element.
|
|
2154
|
+
* Takes precedence over the top-level `doNotTrackPreRenderSize` when both are set.
|
|
2155
|
+
*
|
|
2156
|
+
* Set this only when you size the embed yourself; you then own alignment and must
|
|
2157
|
+
* call `syncPreRenderStyle()` after any change that moves or resizes it. Tracking
|
|
2158
|
+
* already pauses while hidden, so this is not needed to avoid work then.
|
|
2159
|
+
*
|
|
2160
|
+
* @default false
|
|
2161
|
+
*/
|
|
2162
|
+
doNotTrackPreRenderSize?: boolean;
|
|
2163
|
+
/**
|
|
2164
|
+
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
2165
|
+
* Override this when the host page's stacking context does not reach `-1000`
|
|
2166
|
+
* and the hidden wrapper still appears above other elements.
|
|
2167
|
+
*
|
|
2168
|
+
* A page that creates its own stacking context — a positioned app shell, a
|
|
2169
|
+
* transformed wrapper, a modal layer — can clamp `-1000`, and the hidden wrapper
|
|
2170
|
+
* then shows through or swallows clicks meant for your UI. Reach for this when you
|
|
2171
|
+
* see a faint panel behind your content, or clicks landing on nothing in the
|
|
2172
|
+
* region where the embed will eventually appear.
|
|
2173
|
+
*
|
|
2174
|
+
* @default -1000
|
|
2175
|
+
*/
|
|
2176
|
+
zIndex?: number;
|
|
2177
|
+
}
|
|
2072
2178
|
/**
|
|
2073
2179
|
* The common configuration object for an embedded view.
|
|
2074
2180
|
*/
|
|
@@ -2153,7 +2259,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2153
2259
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
2154
2260
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2155
2261
|
* ... // other embed view config
|
|
2156
|
-
* hiddenActions: [Action.Download, Action.
|
|
2262
|
+
* hiddenActions: [Action.Download, Action.ExportTML],
|
|
2157
2263
|
* });
|
|
2158
2264
|
* ```
|
|
2159
2265
|
* @important
|
|
@@ -2175,7 +2281,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2175
2281
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
2176
2282
|
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2177
2283
|
* ... // other embed view config
|
|
2178
|
-
* visibleActions: [Action.Download, Action.
|
|
2284
|
+
* visibleActions: [Action.Download, Action.ExportTML],
|
|
2179
2285
|
* });
|
|
2180
2286
|
* ```
|
|
2181
2287
|
*/
|
|
@@ -2260,6 +2366,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2260
2366
|
*
|
|
2261
2367
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2262
2368
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
2369
|
+
* @deprecated Use {@link PreRenderConfig.preRenderId} via `preRenderConfig` instead.
|
|
2263
2370
|
* @example
|
|
2264
2371
|
* ```js
|
|
2265
2372
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -2279,6 +2386,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2279
2386
|
* @type {boolean}
|
|
2280
2387
|
* @default false
|
|
2281
2388
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
2389
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackPreRenderSize} via `preRenderConfig` instead.
|
|
2282
2390
|
* @example
|
|
2283
2391
|
* ```js
|
|
2284
2392
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -2320,6 +2428,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2320
2428
|
*
|
|
2321
2429
|
* @type {string | HTMLElement}
|
|
2322
2430
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
2431
|
+
* @deprecated Use {@link PreRenderConfig.preRenderContainer} via `preRenderConfig` instead.
|
|
2323
2432
|
* @example
|
|
2324
2433
|
* ```js
|
|
2325
2434
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -2330,6 +2439,27 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2330
2439
|
* ```
|
|
2331
2440
|
*/
|
|
2332
2441
|
preRenderContainer?: string | HTMLElement;
|
|
2442
|
+
/**
|
|
2443
|
+
* Configuration for the pre-render wrapper element.
|
|
2444
|
+
* All properties here mirror the top-level preRender properties on
|
|
2445
|
+
* `BaseViewConfig` and take precedence over them when both are set,
|
|
2446
|
+
* so existing top-level usage continues to work without any changes.
|
|
2447
|
+
* See {@link PreRenderConfig} for available options.
|
|
2448
|
+
*
|
|
2449
|
+
* @version SDK: 1.52.0
|
|
2450
|
+
* @example
|
|
2451
|
+
* ```js
|
|
2452
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2453
|
+
* preRenderConfig: {
|
|
2454
|
+
* preRenderId: 'my-liveboard',
|
|
2455
|
+
* zIndex: -10,
|
|
2456
|
+
* },
|
|
2457
|
+
* });
|
|
2458
|
+
* embed.preRender();
|
|
2459
|
+
* embed.showPreRender();
|
|
2460
|
+
* ```
|
|
2461
|
+
*/
|
|
2462
|
+
preRenderConfig?: PreRenderConfig;
|
|
2333
2463
|
/**
|
|
2334
2464
|
* Enable the V2 shell. This can provide performance benefits
|
|
2335
2465
|
* due to a lighter-weight shell.
|
|
@@ -2753,7 +2883,7 @@ export interface HomePageConfig {
|
|
|
2753
2883
|
*
|
|
2754
2884
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
2755
2885
|
* ... //other embed view config
|
|
2756
|
-
* hiddenListColumns : [ListPageColumns.
|
|
2886
|
+
* hiddenListColumns : [ListPageColumns.Favorites,ListPageColumns.Author],
|
|
2757
2887
|
* })
|
|
2758
2888
|
* ```
|
|
2759
2889
|
*/
|
|
@@ -3066,6 +3196,25 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3066
3196
|
* ```
|
|
3067
3197
|
*/
|
|
3068
3198
|
enable2ColumnLayout?: boolean;
|
|
3199
|
+
/**
|
|
3200
|
+
* This attribute keeps an embedded Liveboard on the 12-column layout at
|
|
3201
|
+
* every width, instead of switching to the two-column or single-column
|
|
3202
|
+
* layout as the container narrows.
|
|
3203
|
+
*
|
|
3204
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3205
|
+
* @type {boolean}
|
|
3206
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
3207
|
+
* @default false
|
|
3208
|
+
* @example
|
|
3209
|
+
* ```js
|
|
3210
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3211
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3212
|
+
* ... // other embed view config
|
|
3213
|
+
* isLiveboardAlwaysOn12ColLayout: true,
|
|
3214
|
+
* })
|
|
3215
|
+
* ```
|
|
3216
|
+
*/
|
|
3217
|
+
isLiveboardAlwaysOn12ColLayout?: boolean;
|
|
3069
3218
|
/**
|
|
3070
3219
|
* This flag can be used to enable the compact header in Liveboard
|
|
3071
3220
|
*
|
|
@@ -3170,6 +3319,26 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3170
3319
|
* ```
|
|
3171
3320
|
*/
|
|
3172
3321
|
coverAndFilterOptionInPDF?: boolean;
|
|
3322
|
+
/**
|
|
3323
|
+
* Sets the gutter space (in pixels) between the visualization tiles of
|
|
3324
|
+
* an embedded Liveboard grid layout and its outer layout padding.
|
|
3325
|
+
* Accepts a non-negative integer; `0` renders the tiles without any gap
|
|
3326
|
+
* and removes the outer padding. When omitted, the gutter saved in the
|
|
3327
|
+
* Liveboard's styling settings (or the ThoughtSpot default) applies.
|
|
3328
|
+
*
|
|
3329
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3330
|
+
* @type {number}
|
|
3331
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
3332
|
+
* @example
|
|
3333
|
+
* ```js
|
|
3334
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
3335
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
3336
|
+
* ... // other embed view config
|
|
3337
|
+
* liveboardGutter: 8,
|
|
3338
|
+
* })
|
|
3339
|
+
* ```
|
|
3340
|
+
*/
|
|
3341
|
+
liveboardGutter?: number;
|
|
3173
3342
|
/**
|
|
3174
3343
|
* This flag is used to enable or disable the new centralized Liveboard filter UX
|
|
3175
3344
|
* (v2). When enabled, a unified modal is used to manage and update multiple filters
|
|
@@ -3585,7 +3754,7 @@ export declare enum EmbedEvent {
|
|
|
3585
3754
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
3586
3755
|
* @example
|
|
3587
3756
|
* ```js
|
|
3588
|
-
* searchEmbed.on(EmbedEvent.
|
|
3757
|
+
* searchEmbed.on(EmbedEvent.Drilldown, {
|
|
3589
3758
|
* points: {
|
|
3590
3759
|
* clickedPoint,
|
|
3591
3760
|
* selectedPoints: selectedPoint
|
|
@@ -3646,7 +3815,7 @@ export declare enum EmbedEvent {
|
|
|
3646
3815
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3647
3816
|
* @example
|
|
3648
3817
|
* ```js
|
|
3649
|
-
* appEmbed.on(EmbedEvent.
|
|
3818
|
+
* appEmbed.on(EmbedEvent.CustomAction, payload => {
|
|
3650
3819
|
* const data = payload.data;
|
|
3651
3820
|
* if (data.id === 'insert Custom Action ID here') {
|
|
3652
3821
|
* console.log('Custom Action event:', data.embedAnswerData);
|
|
@@ -3912,8 +4081,8 @@ export declare enum EmbedEvent {
|
|
|
3912
4081
|
*
|
|
3913
4082
|
* **Note**: This event is deprecated in v1.21.0.
|
|
3914
4083
|
* To fire an event when a download action is initiated on a chart or table,
|
|
3915
|
-
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.
|
|
3916
|
-
* `EmbedEvent.
|
|
4084
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
|
|
4085
|
+
* `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
|
|
3917
4086
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
3918
4087
|
* @example
|
|
3919
4088
|
* ```js
|
|
@@ -3963,10 +4132,10 @@ export declare enum EmbedEvent {
|
|
|
3963
4132
|
* @example
|
|
3964
4133
|
* ```js
|
|
3965
4134
|
* //emit when action starts
|
|
3966
|
-
* searchEmbed.on(EmbedEvent.
|
|
4135
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
3967
4136
|
* console.log('download CSV', payload)}, {start: true })
|
|
3968
4137
|
* //emit when action ends
|
|
3969
|
-
* searchEmbed.on(EmbedEvent.
|
|
4138
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
3970
4139
|
* console.log('download CSV', payload)})
|
|
3971
4140
|
* ```
|
|
3972
4141
|
*/
|
|
@@ -5422,6 +5591,7 @@ export declare enum HostEvent {
|
|
|
5422
5591
|
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
5423
5592
|
* console.log("iFrameURL", url);
|
|
5424
5593
|
* ```
|
|
5594
|
+
* @returns iframeUrl - The URL currently loaded in the embedded iframe.
|
|
5425
5595
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
5426
5596
|
*/
|
|
5427
5597
|
GetIframeUrl = "GetIframeUrl",
|
|
@@ -5588,6 +5758,41 @@ export declare enum HostEvent {
|
|
|
5588
5758
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
5589
5759
|
*/
|
|
5590
5760
|
OpenFilter = "openFilter",
|
|
5761
|
+
/**
|
|
5762
|
+
* Open the add-filter modal of a Liveboard, the same dialog that the
|
|
5763
|
+
* *Add filter* button in the Liveboard edit header opens, so the host
|
|
5764
|
+
* app can start the add-filter flow from its own UI.
|
|
5765
|
+
*
|
|
5766
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
5767
|
+
* Hiding the *Add filter* button with `hiddenActions:
|
|
5768
|
+
* [Action.AddFilter]` does not block this event, but disabling it with
|
|
5769
|
+
* `disabledActions` does.
|
|
5770
|
+
*
|
|
5771
|
+
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
5772
|
+
* existing filter, this event starts the creation of a new filter.
|
|
5773
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
5774
|
+
* @example
|
|
5775
|
+
* ```js
|
|
5776
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
5777
|
+
* ```
|
|
5778
|
+
*/
|
|
5779
|
+
OpenAddFilterModal = "openAddFilterModal",
|
|
5780
|
+
/**
|
|
5781
|
+
* Open the add-parameter panel of a Liveboard, the same panel that the
|
|
5782
|
+
* *Add parameter* button in the Liveboard edit header opens.
|
|
5783
|
+
* Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
|
|
5784
|
+
*
|
|
5785
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
5786
|
+
* Hiding the *Add parameter* button with `hiddenActions:
|
|
5787
|
+
* [Action.AddParameter]` does not block this event, but disabling it
|
|
5788
|
+
* with `disabledActions` does.
|
|
5789
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
5790
|
+
* @example
|
|
5791
|
+
* ```js
|
|
5792
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
5793
|
+
* ```
|
|
5794
|
+
*/
|
|
5795
|
+
OpenAddParameterModal = "openAddParameterModal",
|
|
5591
5796
|
/**
|
|
5592
5797
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
5593
5798
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
@@ -5669,6 +5874,10 @@ export declare enum HostEvent {
|
|
|
5669
5874
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
5670
5875
|
* data=>console.log(data))
|
|
5671
5876
|
* ```
|
|
5877
|
+
* @returns data - Object with a `v2Content` string: the export request
|
|
5878
|
+
* payload for the current Liveboard.
|
|
5879
|
+
* @returns type - The passthrough event name,
|
|
5880
|
+
* `getExportRequestForCurrentPinboard`.
|
|
5672
5881
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
5673
5882
|
*/
|
|
5674
5883
|
getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
|
|
@@ -5771,6 +5980,9 @@ export declare enum HostEvent {
|
|
|
5771
5980
|
* }, ContextType.Spotter);
|
|
5772
5981
|
* ```
|
|
5773
5982
|
*
|
|
5983
|
+
* @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
|
|
5984
|
+
* @returns tabId - GUID of the tab within that Liveboard.
|
|
5985
|
+
* @returns vizId - GUID of the newly created visualization.
|
|
5774
5986
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5775
5987
|
*/
|
|
5776
5988
|
Pin = "pin",
|
|
@@ -5809,13 +6021,13 @@ export declare enum HostEvent {
|
|
|
5809
6021
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
5810
6022
|
* @example
|
|
5811
6023
|
* ```js
|
|
5812
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
6024
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
5813
6025
|
* ```
|
|
5814
6026
|
* @example
|
|
5815
6027
|
* ```js
|
|
5816
6028
|
* // Manage schedules from liveboard context
|
|
5817
6029
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5818
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
6030
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
|
|
5819
6031
|
* ```
|
|
5820
6032
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
5821
6033
|
*/
|
|
@@ -6260,6 +6472,7 @@ export declare enum HostEvent {
|
|
|
6260
6472
|
* console.log(tml.answer);
|
|
6261
6473
|
* });
|
|
6262
6474
|
* ```
|
|
6475
|
+
* @returns The TML representation of the current Answer, as an object.
|
|
6263
6476
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
6264
6477
|
* @important
|
|
6265
6478
|
*/
|
|
@@ -6703,6 +6916,8 @@ export declare enum HostEvent {
|
|
|
6703
6916
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
6704
6917
|
* console.log('filters', data);
|
|
6705
6918
|
* ```
|
|
6919
|
+
* @returns liveboardFilters - Filters applied on the Liveboard.
|
|
6920
|
+
* @returns runtimeFilters - Runtime filters applied on the Liveboard.
|
|
6706
6921
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
6707
6922
|
*/
|
|
6708
6923
|
GetFilters = "getFilters",
|
|
@@ -6852,6 +7067,9 @@ export declare enum HostEvent {
|
|
|
6852
7067
|
* console.log('tabs', tabDetails);
|
|
6853
7068
|
* });
|
|
6854
7069
|
* ```
|
|
7070
|
+
* @returns orderedTabIds - Tab GUIDs in the order they appear.
|
|
7071
|
+
* @returns numberOfTabs - Total number of tabs on the Liveboard.
|
|
7072
|
+
* @returns Tabs - Tab details, each with at least `id` and `name`.
|
|
6855
7073
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
6856
7074
|
*/
|
|
6857
7075
|
GetTabs = "getTabs",
|
|
@@ -6874,6 +7092,9 @@ export declare enum HostEvent {
|
|
|
6874
7092
|
* console.log('groups', groupDetails);
|
|
6875
7093
|
* });
|
|
6876
7094
|
* ```
|
|
7095
|
+
* @returns orderedGroupIds - Group GUIDs in the order they appear.
|
|
7096
|
+
* @returns numberOfGroups - Total number of groups on the Liveboard.
|
|
7097
|
+
* @returns Groups - Group details, each with at least `id` and `name`.
|
|
6877
7098
|
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
6878
7099
|
*/
|
|
6879
7100
|
GetGroups = "getGroups",
|
|
@@ -6948,6 +7169,9 @@ export declare enum HostEvent {
|
|
|
6948
7169
|
* // Alternative direct usage (not recommended)
|
|
6949
7170
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
6950
7171
|
* ```
|
|
7172
|
+
* @returns session - Session identifier for the Answer, for use with the
|
|
7173
|
+
* `AnswerService`.
|
|
7174
|
+
* @returns embedAnswerData - Data backing the Answer, when available.
|
|
6951
7175
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
6952
7176
|
*/
|
|
6953
7177
|
GetAnswerSession = "getAnswerSession",
|
|
@@ -7081,12 +7305,16 @@ export declare enum HostEvent {
|
|
|
7081
7305
|
* console.log('parameters', parameters);
|
|
7082
7306
|
* });
|
|
7083
7307
|
* ```
|
|
7308
|
+
* @returns parameters - Parameters currently applied on the Liveboard.
|
|
7084
7309
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
7085
7310
|
*/
|
|
7086
7311
|
GetParameters = "GetParameters",
|
|
7087
7312
|
/**
|
|
7088
7313
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
7089
|
-
* This event is deprecated. Use {@link HostEvent.
|
|
7314
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
7315
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
7316
|
+
* called with an empty payload, and reports an error when a named view
|
|
7317
|
+
* cannot be found.
|
|
7090
7318
|
* ```js
|
|
7091
7319
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7092
7320
|
* ```
|
|
@@ -7104,10 +7332,15 @@ export declare enum HostEvent {
|
|
|
7104
7332
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
7105
7333
|
/**
|
|
7106
7334
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
7335
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
7336
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
7337
|
+
* called with an empty payload, and reports an error when a named view
|
|
7338
|
+
* cannot be found.
|
|
7107
7339
|
* ```js
|
|
7108
7340
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7109
7341
|
* ```
|
|
7110
7342
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7343
|
+
* @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
7111
7344
|
*/
|
|
7112
7345
|
UpdatePersonalizedView = "UpdatePersonalisedView",
|
|
7113
7346
|
/**
|
|
@@ -7210,6 +7443,10 @@ export declare enum HostEvent {
|
|
|
7210
7443
|
* description: "Generated from Spotter"
|
|
7211
7444
|
* }, ContextType.Spotter);
|
|
7212
7445
|
* ```
|
|
7446
|
+
* @returns answerId - GUID of the saved Answer.
|
|
7447
|
+
* @returns saveResponse - Raw response from the save operation.
|
|
7448
|
+
* @returns shareResponse - Raw response from the share operation, when the
|
|
7449
|
+
* Answer was also made discoverable.
|
|
7213
7450
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
7214
7451
|
*/
|
|
7215
7452
|
SaveAnswer = "saveAnswer",
|
|
@@ -7593,9 +7830,10 @@ export type SpotterFileUploadFileTypes = {
|
|
|
7593
7830
|
* ThoughtSpot application pages include actions and menu commands
|
|
7594
7831
|
* for various user-initiated operations. These actions are represented
|
|
7595
7832
|
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
7596
|
-
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
7597
|
-
* - hiddenActions — the action is completely removed from
|
|
7598
|
-
* - visibleActions — allowlist, only these actions
|
|
7833
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
7834
|
+
* (user can see but not click). - hiddenActions — the action is completely removed from
|
|
7835
|
+
* the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
|
|
7836
|
+
* are shown; all others are hidden.
|
|
7599
7837
|
*
|
|
7600
7838
|
* Use disabledActions to disable (gray out) an action.
|
|
7601
7839
|
* Use hiddenActions to hide (fully remove) an action.
|
|
@@ -7648,6 +7886,17 @@ export declare enum Action {
|
|
|
7648
7886
|
* ```
|
|
7649
7887
|
*/
|
|
7650
7888
|
SaveAsView = "saveAsView",
|
|
7889
|
+
/**
|
|
7890
|
+
* The **EditInputTable** action on a Liveboard
|
|
7891
|
+
* page. Allows users to edit an input table used in an Answer directly from
|
|
7892
|
+
* a Liveboard.
|
|
7893
|
+
* @example
|
|
7894
|
+
* ```js
|
|
7895
|
+
* disabledActions: [Action.EditInputTable]
|
|
7896
|
+
* ```
|
|
7897
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7898
|
+
*/
|
|
7899
|
+
EditInputTable = "editInputTable",
|
|
7651
7900
|
/**
|
|
7652
7901
|
* The **Make a copy** action on a Liveboard or Answer
|
|
7653
7902
|
* page. Creates a copy of the Liveboard.
|
|
@@ -8963,6 +9212,10 @@ export declare enum Action {
|
|
|
8963
9212
|
* The **Add to Coaching** feature allows adding reference questions and
|
|
8964
9213
|
* business terms to improve Spotter’s responses. This feature is generally available
|
|
8965
9214
|
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
9215
|
+
*
|
|
9216
|
+
* This action governs both the answer-card **Add to memory** CTA and its
|
|
9217
|
+
* Spotter 3 successor, the response-footer **Remember this** CTA
|
|
9218
|
+
* (they are mutually exclusive).
|
|
8966
9219
|
* @example
|
|
8967
9220
|
* ```js
|
|
8968
9221
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -9343,6 +9596,56 @@ export declare enum Action {
|
|
|
9343
9596
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
9344
9597
|
*/
|
|
9345
9598
|
SpotterChatModeSwitcher = "spotterChatModeSwitcher",
|
|
9599
|
+
/**
|
|
9600
|
+
* The **Basic Search** starter prompt pill.
|
|
9601
|
+
*
|
|
9602
|
+
* Starter prompt pills are the row of category buttons shown above the
|
|
9603
|
+
* Spotter chat input before a conversation starts. They give a new user
|
|
9604
|
+
* ready-made questions to click instead of typing one from scratch, and
|
|
9605
|
+
* disappear once the conversation begins. There are three, one per action
|
|
9606
|
+
* below.
|
|
9607
|
+
*
|
|
9608
|
+
* Clicking this pill opens a card of suggested simple questions; picking one
|
|
9609
|
+
* submits it to Spotter right away. Visible by default, and hidden along
|
|
9610
|
+
* with the other pills when the surface itself is off (see
|
|
9611
|
+
* {@link SpotterChatViewConfig.starterPrompts}).
|
|
9612
|
+
* @example
|
|
9613
|
+
* ```js
|
|
9614
|
+
* hiddenActions: [Action.QuickSearchPill]
|
|
9615
|
+
* ```
|
|
9616
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9617
|
+
*/
|
|
9618
|
+
QuickSearchPill = "quickSearchPill",
|
|
9619
|
+
/**
|
|
9620
|
+
* The **Deep Analysis** starter prompt pill, next to
|
|
9621
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
9622
|
+
*
|
|
9623
|
+
* Clicking it opens a card of suggested investigative questions ("why did
|
|
9624
|
+
* revenue drop?"). Picking one fills the chat input in Deep Analysis mode
|
|
9625
|
+
* rather than submitting immediately, so the user can edit it first.
|
|
9626
|
+
* Visible by default.
|
|
9627
|
+
* @example
|
|
9628
|
+
* ```js
|
|
9629
|
+
* hiddenActions: [Action.DeepAnalysisPill]
|
|
9630
|
+
* ```
|
|
9631
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9632
|
+
*/
|
|
9633
|
+
DeepAnalysisPill = "deepAnalysisPill",
|
|
9634
|
+
/**
|
|
9635
|
+
* The **Data Literacy** starter prompt pill, next to
|
|
9636
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
9637
|
+
*
|
|
9638
|
+
* Unlike the other two pills it opens no card: clicking it submits a prompt
|
|
9639
|
+
* that describes the data the model can answer over, helping a user who does
|
|
9640
|
+
* not yet know what is in the data source. The prompt text always comes from
|
|
9641
|
+
* ThoughtSpot, so only its label is customizable. Visible by default.
|
|
9642
|
+
* @example
|
|
9643
|
+
* ```js
|
|
9644
|
+
* hiddenActions: [Action.DataLiteracyPill]
|
|
9645
|
+
* ```
|
|
9646
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
9647
|
+
*/
|
|
9648
|
+
DataLiteracyPill = "dataLiteracyPill",
|
|
9346
9649
|
/**
|
|
9347
9650
|
* The **Include current period** checkbox for date filters.
|
|
9348
9651
|
* Controls the visibility and availability of the option to include
|
|
@@ -9490,7 +9793,39 @@ export declare enum Action {
|
|
|
9490
9793
|
* disabledActions: [Action.SpotterAnalystSidebar]
|
|
9491
9794
|
* ```
|
|
9492
9795
|
*/
|
|
9493
|
-
SpotterAnalystSidebar = "spotterAnalystSidebar"
|
|
9796
|
+
SpotterAnalystSidebar = "spotterAnalystSidebar",
|
|
9797
|
+
/**
|
|
9798
|
+
* Controls visibility and disable state of the analyst list
|
|
9799
|
+
* ("Show all") in the Spotter Analyst interface.
|
|
9800
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9801
|
+
* @example
|
|
9802
|
+
* ```js
|
|
9803
|
+
* hiddenActions: [Action.SpotterAnalystList]
|
|
9804
|
+
* disabledActions: [Action.SpotterAnalystList]
|
|
9805
|
+
* ```
|
|
9806
|
+
*/
|
|
9807
|
+
SpotterAnalystList = "spotterAnalystList",
|
|
9808
|
+
/**
|
|
9809
|
+
* Controls visibility and disable state of the default Spotter analyst
|
|
9810
|
+
* entry in the Spotter Analyst interface.
|
|
9811
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9812
|
+
* @example
|
|
9813
|
+
* ```js
|
|
9814
|
+
* hiddenActions: [Action.SpotterDefaultAnalyst]
|
|
9815
|
+
* disabledActions: [Action.SpotterDefaultAnalyst]
|
|
9816
|
+
* ```
|
|
9817
|
+
*/
|
|
9818
|
+
SpotterDefaultAnalyst = "spotterDefaultAnalyst",
|
|
9819
|
+
/**
|
|
9820
|
+
* The **Spotter** button in the Liveboard header.
|
|
9821
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9822
|
+
* @example
|
|
9823
|
+
* ```js
|
|
9824
|
+
* hiddenActions: [Action.SpotterOnLiveboard]
|
|
9825
|
+
* disabledActions: [Action.SpotterOnLiveboard]
|
|
9826
|
+
* ```
|
|
9827
|
+
*/
|
|
9828
|
+
SpotterOnLiveboard = "spotterOnLiveboard"
|
|
9494
9829
|
}
|
|
9495
9830
|
export declare enum PrefetchFeatures {
|
|
9496
9831
|
FullApp = "FullApp",
|
|
@@ -9874,7 +10209,7 @@ export type ApiInterceptFlags = {
|
|
|
9874
10209
|
* const embed = new LiveboardEmbed('#embed', {
|
|
9875
10210
|
* ...viewConfig,
|
|
9876
10211
|
* enableApiIntercept: true,
|
|
9877
|
-
* interceptUrls: [InterceptedApiType.
|
|
10212
|
+
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
9878
10213
|
* })
|
|
9879
10214
|
* ```
|
|
9880
10215
|
*
|
|
@@ -10505,7 +10840,10 @@ export interface LiveboardGroup {
|
|
|
10505
10840
|
name: string;
|
|
10506
10841
|
[key: string]: any;
|
|
10507
10842
|
}
|
|
10508
|
-
|
|
10843
|
+
/**
|
|
10844
|
+
* Levels at which a filter or parameter can be applied.
|
|
10845
|
+
*/
|
|
10846
|
+
export declare enum ApplicabilityLevel {
|
|
10509
10847
|
Liveboard = "LIVEBOARD",
|
|
10510
10848
|
Tab = "TAB",
|
|
10511
10849
|
Group = "GROUP"
|
|
@@ -10769,7 +11107,7 @@ declare class HostEventClient {
|
|
|
10769
11107
|
* @param payload - Optional payload for the event
|
|
10770
11108
|
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
10771
11109
|
*/
|
|
10772
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT
|
|
11110
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
|
|
10773
11111
|
}
|
|
10774
11112
|
declare class TsEmbed {
|
|
10775
11113
|
/**
|
|
@@ -10955,7 +11293,87 @@ declare class TsEmbed {
|
|
|
10955
11293
|
* @param query
|
|
10956
11294
|
*/
|
|
10957
11295
|
protected getEmbedBasePath(query: string): string;
|
|
10958
|
-
protected getUpdateEmbedParamsObject(): Promise<
|
|
11296
|
+
protected getUpdateEmbedParamsObject(): Promise<{
|
|
11297
|
+
customisations: CustomisationsInterface;
|
|
11298
|
+
authToken: string;
|
|
11299
|
+
runtimeFilterParams: string;
|
|
11300
|
+
runtimeParameterParams: string;
|
|
11301
|
+
hiddenHomepageModules: HomepageModule[];
|
|
11302
|
+
reorderedHomepageModules: string[];
|
|
11303
|
+
hostConfig: Record<string, any>;
|
|
11304
|
+
hiddenHomeLeftNavItems: string[];
|
|
11305
|
+
customVariablesForThirdPartyTools: Record<string, any>;
|
|
11306
|
+
hiddenListColumns: ListPageColumns[];
|
|
11307
|
+
customActions: CustomAction[];
|
|
11308
|
+
interceptTimeout: number;
|
|
11309
|
+
interceptUrls: string[];
|
|
11310
|
+
embedExpiryInAuthToken: boolean;
|
|
11311
|
+
shouldBypassPayloadValidation?: boolean;
|
|
11312
|
+
useHostEventsV2?: boolean;
|
|
11313
|
+
layoutConfig?: LayoutConfig;
|
|
11314
|
+
frameParams?: FrameParams;
|
|
11315
|
+
theme?: string;
|
|
11316
|
+
styleSheet__unstable?: string;
|
|
11317
|
+
disabledActions?: Action[];
|
|
11318
|
+
disabledActionReason?: string;
|
|
11319
|
+
hiddenActions?: Action[];
|
|
11320
|
+
visibleActions?: Action[];
|
|
11321
|
+
locale?: string;
|
|
11322
|
+
additionalFlags?: {
|
|
11323
|
+
[key: string]: string | number | boolean;
|
|
11324
|
+
};
|
|
11325
|
+
customizations?: CustomisationsInterface;
|
|
11326
|
+
insertAsSibling?: boolean;
|
|
11327
|
+
usePrerenderedIfAvailable?: boolean;
|
|
11328
|
+
preRenderId?: string;
|
|
11329
|
+
doNotTrackPreRenderSize?: boolean;
|
|
11330
|
+
preRenderContainer?: string | HTMLElement;
|
|
11331
|
+
preRenderConfig?: PreRenderConfig;
|
|
11332
|
+
enableV2Shell_experimental?: boolean;
|
|
11333
|
+
embedComponentType?: string;
|
|
11334
|
+
exposeTranslationIDs?: boolean;
|
|
11335
|
+
disableRedirectionLinksInNewTab?: boolean;
|
|
11336
|
+
overrideOrgId?: number;
|
|
11337
|
+
overrideHistoryState?: boolean;
|
|
11338
|
+
linkOverride?: boolean;
|
|
11339
|
+
enableLinkOverridesV2?: boolean;
|
|
11340
|
+
primaryAction?: string;
|
|
11341
|
+
insertInToSlide?: boolean;
|
|
11342
|
+
showAlerts?: boolean;
|
|
11343
|
+
refreshAuthTokenOnNearExpiry?: boolean;
|
|
11344
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
11345
|
+
runtimeFilters?: RuntimeFilter[];
|
|
11346
|
+
runtimeParameters?: RuntimeParameter[];
|
|
11347
|
+
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
11348
|
+
excludeRuntimeFiltersfromURL?: boolean;
|
|
11349
|
+
excludeRuntimeParametersfromURL?: boolean;
|
|
11350
|
+
collapseSearchBar?: boolean;
|
|
11351
|
+
dataPanelV2?: boolean;
|
|
11352
|
+
enableCustomColumnGroups?: boolean;
|
|
11353
|
+
isThisPeriodInDateFiltersEnabled?: boolean;
|
|
11354
|
+
hideLiveboardHeader?: boolean;
|
|
11355
|
+
showLiveboardTitle?: boolean;
|
|
11356
|
+
showLiveboardDescription?: boolean;
|
|
11357
|
+
isLiveboardHeaderSticky?: boolean;
|
|
11358
|
+
enable2ColumnLayout?: boolean;
|
|
11359
|
+
isLiveboardAlwaysOn12ColLayout?: boolean;
|
|
11360
|
+
isLiveboardCompactHeaderEnabled?: boolean;
|
|
11361
|
+
showLiveboardVerifiedBadge?: boolean;
|
|
11362
|
+
hideIrrelevantChipsInLiveboardTabs?: boolean;
|
|
11363
|
+
showLiveboardReverifyBanner?: boolean;
|
|
11364
|
+
enableAskSage?: boolean;
|
|
11365
|
+
coverAndFilterOptionInPDF?: boolean;
|
|
11366
|
+
liveboardGutter?: number;
|
|
11367
|
+
isCentralizedLiveboardFilterUXEnabled?: boolean;
|
|
11368
|
+
isScopedLiveboardFilteringEnabled?: boolean;
|
|
11369
|
+
isLinkParametersEnabled?: boolean;
|
|
11370
|
+
isEnhancedFilterInteractivityEnabled?: boolean;
|
|
11371
|
+
showMaskedFilterChip?: boolean;
|
|
11372
|
+
isLiveboardMasterpiecesEnabled?: boolean;
|
|
11373
|
+
newChartsLibrary?: boolean;
|
|
11374
|
+
visibleTabs?: string[];
|
|
11375
|
+
hiddenTabs?: string[];
|
|
11376
|
+
}>;
|
|
10959
11377
|
/**
|
|
10960
11378
|
* Common query params set for all the embed modes.
|
|
10961
11379
|
* @param queryParams
|
|
@@ -10974,6 +11392,12 @@ declare class TsEmbed {
|
|
|
10974
11392
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
10975
11393
|
protected getRootIframeSrc(): string;
|
|
10976
11394
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11395
|
+
/**
|
|
11396
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
11397
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
11398
|
+
* backward compatibility.
|
|
11399
|
+
*/
|
|
11400
|
+
protected getPreRenderConfig(): PreRenderConfig;
|
|
10977
11401
|
/**
|
|
10978
11402
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
10979
11403
|
*/
|
|
@@ -11012,12 +11436,14 @@ declare class TsEmbed {
|
|
|
11012
11436
|
* fresh element; an element passed directly cannot be re-resolved.
|
|
11013
11437
|
*/
|
|
11014
11438
|
private resolvePreRenderContainerTarget;
|
|
11439
|
+
private inheritPreRenderContainer;
|
|
11440
|
+
private getCustomPreRenderContainer;
|
|
11015
11441
|
/**
|
|
11016
|
-
* Makes the container a positioning context for the absolutely
|
|
11017
|
-
* wrapper, stashing the original inline `position` on the element
|
|
11018
|
-
* destroy() can restore it exactly, leaving no trace. Recording it
|
|
11019
|
-
* element rather than per-instance lets the override be reverted even
|
|
11020
|
-
* embeds share the same container.
|
|
11442
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
11443
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
11444
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
11445
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
11446
|
+
* when embeds share the same container.
|
|
11021
11447
|
*/
|
|
11022
11448
|
private applyPreRenderContainerPositioning;
|
|
11023
11449
|
/**
|
|
@@ -11165,7 +11591,7 @@ declare class TsEmbed {
|
|
|
11165
11591
|
* ```
|
|
11166
11592
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
11167
11593
|
*/
|
|
11168
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
11594
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11169
11595
|
/**
|
|
11170
11596
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
11171
11597
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -12021,6 +12447,87 @@ export interface SpotterShareConversationConfig {
|
|
|
12021
12447
|
*/
|
|
12022
12448
|
spotterSharedConversationExitLabel?: string;
|
|
12023
12449
|
}
|
|
12450
|
+
/**
|
|
12451
|
+
* A single starter prompt question shown under a category pill.
|
|
12452
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12453
|
+
* @group Embed components
|
|
12454
|
+
*/
|
|
12455
|
+
export interface StarterPromptQuestion {
|
|
12456
|
+
/**
|
|
12457
|
+
* Short label shown as a clickable suggestion. Falls back to `prompt` when
|
|
12458
|
+
* omitted. ThoughtSpot truncates it beyond 80 characters.
|
|
12459
|
+
*/
|
|
12460
|
+
label?: string;
|
|
12461
|
+
/**
|
|
12462
|
+
* Prompt text sent to Spotter on click. ThoughtSpot truncates it beyond
|
|
12463
|
+
* 300 characters.
|
|
12464
|
+
*/
|
|
12465
|
+
prompt: string;
|
|
12466
|
+
}
|
|
12467
|
+
/**
|
|
12468
|
+
* Configuration for a starter prompt category with questions
|
|
12469
|
+
* (`quick` and `research`).
|
|
12470
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12471
|
+
* @group Embed components
|
|
12472
|
+
*/
|
|
12473
|
+
export interface StarterPromptCategory {
|
|
12474
|
+
/**
|
|
12475
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
12476
|
+
* beyond 30 characters.
|
|
12477
|
+
*/
|
|
12478
|
+
label?: string;
|
|
12479
|
+
/**
|
|
12480
|
+
* Replaces the backend-generated prompts. ThoughtSpot renders the first 4
|
|
12481
|
+
* and drops any entry without a `prompt`.
|
|
12482
|
+
*/
|
|
12483
|
+
questions?: StarterPromptQuestion[];
|
|
12484
|
+
}
|
|
12485
|
+
/**
|
|
12486
|
+
* Configuration for the Data Literacy starter prompt category.
|
|
12487
|
+
* Only the label is customizable; the prompt text comes from the backend.
|
|
12488
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12489
|
+
* @group Embed components
|
|
12490
|
+
*/
|
|
12491
|
+
export interface StarterPreviewDataCategory {
|
|
12492
|
+
/**
|
|
12493
|
+
* Overrides the default category pill label. ThoughtSpot truncates it
|
|
12494
|
+
* beyond 30 characters.
|
|
12495
|
+
*/
|
|
12496
|
+
label?: string;
|
|
12497
|
+
}
|
|
12498
|
+
/**
|
|
12499
|
+
* Content configuration for the Spotter starter prompts.
|
|
12500
|
+
* Keys are fixed: `quick` (Basic Search), `research` (Deep Analysis),
|
|
12501
|
+
* `previewData` (Data Literacy) and `liveboard` (Liveboard chat panel).
|
|
12502
|
+
*
|
|
12503
|
+
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
12504
|
+
* the Liveboard SpotterViz surface are configured separately through
|
|
12505
|
+
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
12506
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12507
|
+
* @group Embed components
|
|
12508
|
+
*/
|
|
12509
|
+
export interface StarterPromptsConfig {
|
|
12510
|
+
/**
|
|
12511
|
+
* Turns the starter prompts surface on. Must be set explicitly, an
|
|
12512
|
+
* unset flag leaves the surface off.
|
|
12513
|
+
*
|
|
12514
|
+
* Either this or `enableStarterPrompts` turns the surface on, so `false`
|
|
12515
|
+
* here does not switch it off while `enableStarterPrompts` is `true`.
|
|
12516
|
+
* @default false
|
|
12517
|
+
*/
|
|
12518
|
+
enable?: boolean;
|
|
12519
|
+
/** Basic Search category configuration. */
|
|
12520
|
+
quick?: StarterPromptCategory;
|
|
12521
|
+
/** Deep Analysis category configuration. */
|
|
12522
|
+
research?: StarterPromptCategory;
|
|
12523
|
+
/** Data Literacy category configuration. */
|
|
12524
|
+
previewData?: StarterPreviewDataCategory;
|
|
12525
|
+
/**
|
|
12526
|
+
* Starter prompts for the Spotter chat panel on a Liveboard.
|
|
12527
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12528
|
+
*/
|
|
12529
|
+
liveboard?: StarterPromptQuestion[];
|
|
12530
|
+
}
|
|
12024
12531
|
/**
|
|
12025
12532
|
* Configuration for customizing Spotter chat UI branding.
|
|
12026
12533
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl
|
|
@@ -12061,11 +12568,83 @@ export interface SpotterChatViewConfig {
|
|
|
12061
12568
|
/**
|
|
12062
12569
|
* Enables starter prompts in the Spotter chat interface.
|
|
12063
12570
|
*
|
|
12064
|
-
*
|
|
12571
|
+
* Either this or `starterPrompts.enable` turns the surface on, so it stays
|
|
12572
|
+
* on while this is `true` even if `starterPrompts.enable` is `false`.
|
|
12573
|
+
*
|
|
12574
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12065
12575
|
* @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl
|
|
12066
12576
|
* @default false
|
|
12067
12577
|
*/
|
|
12068
12578
|
enableStarterPrompts?: boolean;
|
|
12579
|
+
/**
|
|
12580
|
+
* Customizes the labels and questions of the Spotter starter prompts.
|
|
12581
|
+
* Individual pills are hidden or shown with `hiddenActions` /
|
|
12582
|
+
* `visibleActions` using `Action.QuickSearchPill`,
|
|
12583
|
+
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
12584
|
+
*
|
|
12585
|
+
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12586
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12587
|
+
* @example
|
|
12588
|
+
* ```js
|
|
12589
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12590
|
+
* worksheetId: 'worksheet-id',
|
|
12591
|
+
* hiddenActions: [Action.DeepAnalysisPill],
|
|
12592
|
+
* spotterChatConfig: {
|
|
12593
|
+
* starterPrompts: {
|
|
12594
|
+
* enable: true,
|
|
12595
|
+
* quick: {
|
|
12596
|
+
* label: 'Quick questions',
|
|
12597
|
+
* questions: [
|
|
12598
|
+
* { label: 'Top products', prompt: 'What are the top products by revenue?' },
|
|
12599
|
+
* ],
|
|
12600
|
+
* },
|
|
12601
|
+
* previewData: { label: 'Explore your data' },
|
|
12602
|
+
* },
|
|
12603
|
+
* },
|
|
12604
|
+
* })
|
|
12605
|
+
* ```
|
|
12606
|
+
*/
|
|
12607
|
+
starterPrompts?: StarterPromptsConfig;
|
|
12608
|
+
/**
|
|
12609
|
+
* Opens the Spotter chat panel when the Liveboard loads.
|
|
12610
|
+
*
|
|
12611
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
12612
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12613
|
+
* @default true
|
|
12614
|
+
* @example
|
|
12615
|
+
* ```js
|
|
12616
|
+
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
12617
|
+
* liveboardId: 'liveboard-id',
|
|
12618
|
+
* spotterChatConfig: {
|
|
12619
|
+
* openSpotterOnLiveboardByDefault: false,
|
|
12620
|
+
* },
|
|
12621
|
+
* })
|
|
12622
|
+
* ```
|
|
12623
|
+
*/
|
|
12624
|
+
openSpotterOnLiveboardByDefault?: boolean;
|
|
12625
|
+
}
|
|
12626
|
+
/**
|
|
12627
|
+
* Configuration for the Spotter Analyst experience.
|
|
12628
|
+
* Can be used in SpotterEmbed.
|
|
12629
|
+
* @group Embed components
|
|
12630
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12631
|
+
* @example
|
|
12632
|
+
* ```js
|
|
12633
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12634
|
+
* ... //other embed view config
|
|
12635
|
+
* spotterAnalystConfig: {
|
|
12636
|
+
* analystId: 'analyst-id-1234',
|
|
12637
|
+
* },
|
|
12638
|
+
* })
|
|
12639
|
+
* ```
|
|
12640
|
+
*/
|
|
12641
|
+
export interface SpotterAnalystConfig {
|
|
12642
|
+
/**
|
|
12643
|
+
* Pins the embed to a single spotter analyst. Implies no default Spotter
|
|
12644
|
+
* and no "Show all".
|
|
12645
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12646
|
+
*/
|
|
12647
|
+
analystId?: string;
|
|
12069
12648
|
}
|
|
12070
12649
|
/**
|
|
12071
12650
|
* The configuration for the embedded spotterEmbed options.
|
|
@@ -12096,6 +12675,22 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
12096
12675
|
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12097
12676
|
*/
|
|
12098
12677
|
dataSources?: string[];
|
|
12678
|
+
/**
|
|
12679
|
+
* Configuration for the Spotter Analyst experience.
|
|
12680
|
+
*
|
|
12681
|
+
* Supported embed types: `SpotterEmbed`
|
|
12682
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12683
|
+
* @example
|
|
12684
|
+
* ```js
|
|
12685
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
12686
|
+
* ... //other embed view config
|
|
12687
|
+
* spotterAnalystConfig: {
|
|
12688
|
+
* analystId: 'analyst-id-1234',
|
|
12689
|
+
* },
|
|
12690
|
+
* })
|
|
12691
|
+
* ```
|
|
12692
|
+
*/
|
|
12693
|
+
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
12099
12694
|
/**
|
|
12100
12695
|
* Ability to pass a starting search query to the conversation.
|
|
12101
12696
|
*/
|
|
@@ -12417,6 +13012,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
|
|
|
12417
13012
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
12418
13013
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
12419
13014
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
13015
|
+
starterPrompts?: StarterPromptsConfig;
|
|
12420
13016
|
};
|
|
12421
13017
|
}
|
|
12422
13018
|
declare class SpotterEmbed extends TsEmbed {
|
|
@@ -12474,13 +13070,12 @@ export interface SpotterVizStarterPrompt {
|
|
|
12474
13070
|
* customStarterPrompts: [
|
|
12475
13071
|
* { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
|
|
12476
13072
|
* ],
|
|
12477
|
-
* //
|
|
13073
|
+
* // The options below require SDK: 1.51.0
|
|
12478
13074
|
* loaderHeadline: 'Crunching the numbers...',
|
|
12479
13075
|
* loaderTips: [
|
|
12480
13076
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
12481
13077
|
* { label: 'Tip', text: 'use natural language' },
|
|
12482
13078
|
* ],
|
|
12483
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
12484
13079
|
* liveboardBrandName: 'Reports',
|
|
12485
13080
|
* spotterBrandName: 'Analyst',
|
|
12486
13081
|
* insightTileBrandName: 'Insight card',
|
|
@@ -12533,47 +13128,47 @@ export interface SpotterVizConfig {
|
|
|
12533
13128
|
/**
|
|
12534
13129
|
* Custom headline text shown in the SpotterViz loading state.
|
|
12535
13130
|
* Replaces the default loading headline.
|
|
12536
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
13131
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12537
13132
|
*/
|
|
12538
13133
|
loaderHeadline?: string;
|
|
12539
13134
|
/**
|
|
12540
13135
|
* Custom tips shown in the SpotterViz loading state.
|
|
12541
13136
|
* Replaces the default loading tips with the provided list.
|
|
12542
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
13137
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12543
13138
|
*/
|
|
12544
13139
|
loaderTips?: SpotterVizLoaderTip[];
|
|
12545
13140
|
/**
|
|
12546
13141
|
* Custom term used to replace "Liveboard" in the agent's responses.
|
|
12547
|
-
* @version SDK: 1.
|
|
13142
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12548
13143
|
* @default ''
|
|
12549
13144
|
*/
|
|
12550
13145
|
liveboardBrandName?: string;
|
|
12551
13146
|
/**
|
|
12552
13147
|
* Custom term used to replace "Spotter" in the agent's responses.
|
|
12553
|
-
* @version SDK: 1.
|
|
13148
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12554
13149
|
* @default ''
|
|
12555
13150
|
*/
|
|
12556
13151
|
spotterBrandName?: string;
|
|
12557
13152
|
/**
|
|
12558
13153
|
* Custom term used to replace "Insight tile" in the UI and in the agent's responses.
|
|
12559
|
-
* @version SDK: 1.
|
|
13154
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12560
13155
|
* @default ''
|
|
12561
13156
|
*/
|
|
12562
13157
|
insightTileBrandName?: string;
|
|
12563
13158
|
/**
|
|
12564
13159
|
* Custom term used to replace "View plan" in the insight tile menu.
|
|
12565
|
-
* @version SDK: 1.
|
|
13160
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12566
13161
|
*/
|
|
12567
13162
|
insightTileViewPlanLabel?: string;
|
|
12568
13163
|
/**
|
|
12569
13164
|
* Custom loader text shown on the insight tile.
|
|
12570
|
-
* @version SDK: 1.
|
|
13165
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12571
13166
|
*/
|
|
12572
13167
|
insightTileLoaderText?: string;
|
|
12573
13168
|
}
|
|
12574
13169
|
/**
|
|
12575
13170
|
* A single tip shown in the SpotterViz loading state.
|
|
12576
|
-
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.
|
|
13171
|
+
* @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
12577
13172
|
* @group Embed components
|
|
12578
13173
|
*/
|
|
12579
13174
|
export interface SpotterVizLoaderTip {
|
|
@@ -12621,7 +13216,11 @@ export declare enum Page {
|
|
|
12621
13216
|
/**
|
|
12622
13217
|
* Collections listing page
|
|
12623
13218
|
*/
|
|
12624
|
-
Collections = "collections"
|
|
13219
|
+
Collections = "collections",
|
|
13220
|
+
/**
|
|
13221
|
+
* Liveboard schedules listing page
|
|
13222
|
+
*/
|
|
13223
|
+
LiveboardSchedules = "liveboard-schedules"
|
|
12625
13224
|
}
|
|
12626
13225
|
/**
|
|
12627
13226
|
* Define the initial state of column custom group accordions
|
|
@@ -13007,6 +13606,11 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13007
13606
|
* `false` fetches visualizations incrementally as
|
|
13008
13607
|
* users scroll the page to view the charts and tables.
|
|
13009
13608
|
*
|
|
13609
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
13610
|
+
* {@link lazyLoadingForFullHeight} and
|
|
13611
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
13612
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
13613
|
+
*
|
|
13010
13614
|
* Supported embed types: `AppEmbed`
|
|
13011
13615
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
|
|
13012
13616
|
* @example
|
|
@@ -13213,11 +13817,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13213
13817
|
*/
|
|
13214
13818
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
13215
13819
|
/**
|
|
13216
|
-
*
|
|
13820
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
13821
|
+
* loading the whole full-height Liveboard at once.
|
|
13822
|
+
*
|
|
13823
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13824
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13825
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
13826
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
13217
13827
|
*
|
|
13218
13828
|
* @type {boolean}
|
|
13219
13829
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13220
|
-
* @default
|
|
13830
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13221
13831
|
* @example
|
|
13222
13832
|
* ```js
|
|
13223
13833
|
* const embed = new AppEmbed('#embed-container', {
|
|
@@ -13229,27 +13839,43 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13229
13839
|
*/
|
|
13230
13840
|
lazyLoadingForFullHeight?: boolean;
|
|
13231
13841
|
/**
|
|
13232
|
-
*
|
|
13842
|
+
* Computes the visible region of the embed against its scrollable and
|
|
13843
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
13844
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
13233
13845
|
*
|
|
13234
|
-
*
|
|
13235
|
-
*
|
|
13846
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13847
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13848
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
13849
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
13850
|
+
* tracking.
|
|
13236
13851
|
*
|
|
13237
13852
|
* @type {boolean}
|
|
13238
|
-
* @default
|
|
13853
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13239
13854
|
* @hidden
|
|
13240
13855
|
*/
|
|
13241
13856
|
enableScrollableContainerLazyLoading?: boolean;
|
|
13242
13857
|
/**
|
|
13243
|
-
*
|
|
13858
|
+
* How far outside the viewport a visualization starts loading, when
|
|
13859
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
13244
13860
|
*
|
|
13245
13861
|
* For example, if the margin is set to '10px',
|
|
13246
13862
|
* the visualization will be loaded 10px before its top edge is visible in the
|
|
13247
13863
|
* viewport.
|
|
13248
13864
|
*
|
|
13249
|
-
* The format is similar to CSS margin
|
|
13865
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
13866
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
13867
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
13868
|
+
* `auto`; an invalid value is logged and ignored.
|
|
13869
|
+
*
|
|
13870
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
13871
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
13872
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
13873
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
13874
|
+
* only once it is actually visible.
|
|
13250
13875
|
*
|
|
13251
13876
|
* @type {string}
|
|
13252
13877
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13878
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
13253
13879
|
* @example
|
|
13254
13880
|
* ```js
|
|
13255
13881
|
* const embed = new AppEmbed('#embed-container', {
|
|
@@ -13424,13 +14050,12 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13424
14050
|
* inputChatPlaceholder: 'Ask a question...',
|
|
13425
14051
|
* hideStarterPrompts: false,
|
|
13426
14052
|
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
13427
|
-
* //
|
|
14053
|
+
* // The options below require SDK: 1.51.0
|
|
13428
14054
|
* loaderHeadline: 'Crunching the numbers...',
|
|
13429
14055
|
* loaderTips: [
|
|
13430
14056
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
13431
14057
|
* { label: 'Tip', text: 'use natural language' },
|
|
13432
14058
|
* ],
|
|
13433
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
13434
14059
|
* liveboardBrandName: 'Reports',
|
|
13435
14060
|
* spotterBrandName: 'Analyst',
|
|
13436
14061
|
* insightTileBrandName: 'Insight card',
|
|
@@ -13526,6 +14151,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
13526
14151
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
13527
14152
|
spotterVizConfig?: SpotterVizConfig;
|
|
13528
14153
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
14154
|
+
starterPrompts?: StarterPromptsConfig;
|
|
13529
14155
|
};
|
|
13530
14156
|
}
|
|
13531
14157
|
declare class AppEmbed extends V1Embed {
|
|
@@ -13620,6 +14246,7 @@ declare class AppEmbed extends V1Embed {
|
|
|
13620
14246
|
export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
13621
14247
|
embedParams?: {
|
|
13622
14248
|
spotterVizConfig?: SpotterVizConfig;
|
|
14249
|
+
starterPrompts?: StarterPromptsConfig;
|
|
13623
14250
|
};
|
|
13624
14251
|
}
|
|
13625
14252
|
/**
|
|
@@ -13638,6 +14265,11 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
13638
14265
|
* Setting `fullHeight` to `false` fetches visualizations
|
|
13639
14266
|
* incrementally as users scroll the page to view the charts and tables.
|
|
13640
14267
|
*
|
|
14268
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
14269
|
+
* {@link lazyLoadingForFullHeight} and
|
|
14270
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
14271
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
14272
|
+
*
|
|
13641
14273
|
*
|
|
13642
14274
|
* Supported embed types: `LiveboardEmbed`
|
|
13643
14275
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
@@ -14030,11 +14662,17 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14030
14662
|
*/
|
|
14031
14663
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
14032
14664
|
/**
|
|
14033
|
-
*
|
|
14665
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
14666
|
+
* loading the whole full-height Liveboard at once.
|
|
14667
|
+
*
|
|
14668
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14669
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14670
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
14671
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
14034
14672
|
*
|
|
14035
14673
|
* @type {boolean}
|
|
14036
14674
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14037
|
-
* @default
|
|
14675
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14038
14676
|
* @example
|
|
14039
14677
|
* ```js
|
|
14040
14678
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -14046,26 +14684,42 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14046
14684
|
*/
|
|
14047
14685
|
lazyLoadingForFullHeight?: boolean;
|
|
14048
14686
|
/**
|
|
14049
|
-
*
|
|
14687
|
+
* Computes the visible region of the embed against its scrollable and
|
|
14688
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
14689
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
14050
14690
|
*
|
|
14051
|
-
*
|
|
14052
|
-
*
|
|
14691
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14692
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14693
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
14694
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
14695
|
+
* tracking.
|
|
14053
14696
|
*
|
|
14054
14697
|
* @type {boolean}
|
|
14055
|
-
* @default
|
|
14698
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14056
14699
|
*/
|
|
14057
14700
|
enableScrollableContainerLazyLoading?: boolean;
|
|
14058
14701
|
/**
|
|
14059
|
-
*
|
|
14702
|
+
* How far outside the viewport a visualization starts loading, when
|
|
14703
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
14060
14704
|
*
|
|
14061
14705
|
* For example, if the margin is set to '10px',
|
|
14062
14706
|
* the visualization will be loaded 10px before its top edge is visible in the
|
|
14063
14707
|
* viewport.
|
|
14064
14708
|
*
|
|
14065
|
-
* The format is similar to CSS margin
|
|
14709
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
14710
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
14711
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
14712
|
+
* `auto`; an invalid value is logged and ignored.
|
|
14713
|
+
*
|
|
14714
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
14715
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
14716
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
14717
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
14718
|
+
* only once it is actually visible.
|
|
14066
14719
|
*
|
|
14067
14720
|
* @type {string}
|
|
14068
14721
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14722
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
14069
14723
|
* @example
|
|
14070
14724
|
* ```js
|
|
14071
14725
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -14169,13 +14823,12 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14169
14823
|
* inputChatPlaceholder: 'Ask a question...',
|
|
14170
14824
|
* hideStarterPrompts: false,
|
|
14171
14825
|
* customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
|
|
14172
|
-
* //
|
|
14826
|
+
* // The options below require SDK: 1.51.0
|
|
14173
14827
|
* loaderHeadline: 'Crunching the numbers...',
|
|
14174
14828
|
* loaderTips: [
|
|
14175
14829
|
* { label: 'Tip', text: 'try asking about revenue by region' },
|
|
14176
14830
|
* { label: 'Tip', text: 'use natural language' },
|
|
14177
14831
|
* ],
|
|
14178
|
-
* // liveboardBrandName, spotterBrandName, insightTileBrandName, insightTileViewPlanLabel and insightTileLoaderText require SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
14179
14832
|
* liveboardBrandName: 'Reports',
|
|
14180
14833
|
* spotterBrandName: 'Analyst',
|
|
14181
14834
|
* insightTileBrandName: 'Insight card',
|
|
@@ -14271,7 +14924,7 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
14271
14924
|
* @param {any} data The payload to send with the message
|
|
14272
14925
|
* @returns A promise that resolves with the response from the embedded app
|
|
14273
14926
|
*/
|
|
14274
|
-
trigger<HostEventT extends HostEvent, PayloadT
|
|
14927
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
14275
14928
|
/**
|
|
14276
14929
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
14277
14930
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
@@ -14349,7 +15002,7 @@ export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeature
|
|
|
14349
15002
|
/**
|
|
14350
15003
|
* Initializes the Visual Embed SDK globally and perform
|
|
14351
15004
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
14352
|
-
* component like Liveboard etc can be embedded. But need not wait for
|
|
15005
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
14353
15006
|
* to actually embed. That is handled internally.
|
|
14354
15007
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
14355
15008
|
* authentication mechanism and so on.
|
|
@@ -14480,35 +15133,69 @@ export declare function uploadMixpanelEvent(eventId: string, eventProps?: {}): v
|
|
|
14480
15133
|
export declare const resetCachedAuthToken: () => void;
|
|
14481
15134
|
export interface SearchProps extends EmbedProps, SearchViewConfig {
|
|
14482
15135
|
}
|
|
14483
|
-
|
|
15136
|
+
/**
|
|
15137
|
+
* The PreRendered components require a preRender id. It can be supplied either
|
|
15138
|
+
* through `preRenderConfig.preRenderId` (SDK: 1.52.0 and later) or through the
|
|
15139
|
+
* top-level `preRenderId` prop (SDK: 1.25.0 and later, now deprecated).
|
|
15140
|
+
* `preRenderConfig.preRenderId` takes precedence when both are set.
|
|
15141
|
+
*
|
|
15142
|
+
* Use PreRender to render the embed in the background and then
|
|
15143
|
+
* show or hide the rendered embed using showPreRender or hidePreRender respectively.
|
|
15144
|
+
* @example
|
|
15145
|
+
* ```tsx
|
|
15146
|
+
* // Preferred, SDK: 1.52.0 and later.
|
|
15147
|
+
* function LandingPageComponent() {
|
|
15148
|
+
* return <PreRenderedLiveboardEmbed
|
|
15149
|
+
* preRenderConfig={{ preRenderId: "someId" }}
|
|
15150
|
+
* liveboardId="libId"
|
|
15151
|
+
* />
|
|
15152
|
+
* }
|
|
15153
|
+
*
|
|
15154
|
+
* function MyComponent() {
|
|
15155
|
+
* return <LiveboardEmbed
|
|
15156
|
+
* preRenderConfig={{ preRenderId: "someId" }}
|
|
15157
|
+
* liveboardId="libId"
|
|
15158
|
+
* />
|
|
15159
|
+
* }
|
|
15160
|
+
* ```
|
|
15161
|
+
* @example
|
|
15162
|
+
* ```tsx
|
|
15163
|
+
* // Deprecated top-level preRenderId, still supported.
|
|
15164
|
+
* function LandingPageComponent() {
|
|
15165
|
+
* return <PreRenderedLiveboardEmbed preRenderId="someId" liveboardId="libId" />
|
|
15166
|
+
* }
|
|
15167
|
+
* ```
|
|
15168
|
+
*/
|
|
15169
|
+
export type PreRenderProps = {
|
|
14484
15170
|
/**
|
|
14485
15171
|
* PreRender id to be used for PreRendering the embed.
|
|
14486
|
-
* Use PreRender to render the embed in the background and then
|
|
14487
|
-
* show or hide the rendered embed using showPreRender or hidePreRender respectively.
|
|
14488
|
-
*
|
|
14489
|
-
* Use PreRendered react component for pre rendering embed components.
|
|
14490
15172
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
|
|
14491
|
-
* @
|
|
14492
|
-
* ```js
|
|
14493
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14494
|
-
* ... // other liveboard view config
|
|
14495
|
-
* preRenderId: "preRenderId-123"
|
|
14496
|
-
* });
|
|
14497
|
-
* embed.showPreRender();
|
|
14498
|
-
* ```
|
|
14499
|
-
* @example
|
|
14500
|
-
* ```tsx
|
|
14501
|
-
* function LandingPageComponent() {
|
|
14502
|
-
* return <PreRenderedLiveboardEmbed preRenderId="someId" liveboardId="libId" />
|
|
14503
|
-
* }
|
|
14504
|
-
* ```
|
|
14505
|
-
* function MyComponent() {
|
|
14506
|
-
* return <LiveboardEmbed preRenderId="someId" liveboardId="libId" />
|
|
14507
|
-
* }
|
|
14508
|
-
* ```
|
|
15173
|
+
* @deprecated Use `preRenderConfig.preRenderId` instead.
|
|
14509
15174
|
*/
|
|
14510
15175
|
preRenderId: string;
|
|
14511
|
-
|
|
15176
|
+
/**
|
|
15177
|
+
* Configuration for the pre-render wrapper element.
|
|
15178
|
+
* See {@link PreRenderConfig} for available options.
|
|
15179
|
+
* @version SDK: 1.52.0
|
|
15180
|
+
*/
|
|
15181
|
+
preRenderConfig?: PreRenderConfig;
|
|
15182
|
+
} | {
|
|
15183
|
+
/**
|
|
15184
|
+
* PreRender id to be used for PreRendering the embed.
|
|
15185
|
+
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
|
|
15186
|
+
* @deprecated Use `preRenderConfig.preRenderId` instead.
|
|
15187
|
+
*/
|
|
15188
|
+
preRenderId?: string;
|
|
15189
|
+
/**
|
|
15190
|
+
* Configuration for the pre-render wrapper element. `preRenderId` is
|
|
15191
|
+
* required here when the top-level `preRenderId` prop is not passed.
|
|
15192
|
+
* See {@link PreRenderConfig} for available options.
|
|
15193
|
+
* @version SDK: 1.52.0
|
|
15194
|
+
*/
|
|
15195
|
+
preRenderConfig: PreRenderConfig & {
|
|
15196
|
+
preRenderId: string;
|
|
15197
|
+
};
|
|
15198
|
+
};
|
|
14512
15199
|
/**
|
|
14513
15200
|
* React component for Search Embed.
|
|
14514
15201
|
* @example
|
|
@@ -14522,7 +15209,7 @@ export interface PreRenderProps {
|
|
|
14522
15209
|
* ```
|
|
14523
15210
|
*/
|
|
14524
15211
|
declare const SearchEmbed$1: React$1.ForwardRefExoticComponent<SearchProps & React$1.RefAttributes<SearchEmbed>>;
|
|
14525
|
-
export declare const PreRenderedSearchEmbed: React$1.ForwardRefExoticComponent<SearchProps & PreRenderProps & React$1.RefAttributes<SearchEmbed>>;
|
|
15212
|
+
export declare const PreRenderedSearchEmbed: React$1.ForwardRefExoticComponent<(SearchProps & PreRenderProps) & React$1.RefAttributes<SearchEmbed>>;
|
|
14526
15213
|
export interface AppProps extends EmbedProps, AppViewConfig {
|
|
14527
15214
|
}
|
|
14528
15215
|
/**
|
|
@@ -14557,7 +15244,7 @@ declare const AppEmbed$1: React$1.ForwardRefExoticComponent<AppProps & React$1.R
|
|
|
14557
15244
|
* }
|
|
14558
15245
|
* ```
|
|
14559
15246
|
*/
|
|
14560
|
-
export declare const PreRenderedAppEmbed: React$1.ForwardRefExoticComponent<AppProps & PreRenderProps & React$1.RefAttributes<AppEmbed>>;
|
|
15247
|
+
export declare const PreRenderedAppEmbed: React$1.ForwardRefExoticComponent<(AppProps & PreRenderProps) & React$1.RefAttributes<AppEmbed>>;
|
|
14561
15248
|
export interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
|
|
14562
15249
|
}
|
|
14563
15250
|
/**
|
|
@@ -14596,7 +15283,7 @@ declare const LiveboardEmbed$1: React$1.ForwardRefExoticComponent<LiveboardProps
|
|
|
14596
15283
|
* }
|
|
14597
15284
|
* ```
|
|
14598
15285
|
*/
|
|
14599
|
-
export declare const PreRenderedLiveboardEmbed: React$1.ForwardRefExoticComponent<LiveboardProps & PreRenderProps & React$1.RefAttributes<LiveboardEmbed>>;
|
|
15286
|
+
export declare const PreRenderedLiveboardEmbed: React$1.ForwardRefExoticComponent<(LiveboardProps & PreRenderProps) & React$1.RefAttributes<LiveboardEmbed>>;
|
|
14600
15287
|
export interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
|
|
14601
15288
|
}
|
|
14602
15289
|
/**
|
|
@@ -14630,7 +15317,7 @@ declare const SearchBarEmbed$1: React$1.ForwardRefExoticComponent<SearchBarEmbed
|
|
|
14630
15317
|
* }
|
|
14631
15318
|
* ```
|
|
14632
15319
|
*/
|
|
14633
|
-
export declare const PreRenderedSearchBarEmbed: React$1.ForwardRefExoticComponent<SearchBarEmbedProps & PreRenderProps & React$1.RefAttributes<SearchBarEmbed>>;
|
|
15320
|
+
export declare const PreRenderedSearchBarEmbed: React$1.ForwardRefExoticComponent<(SearchBarEmbedProps & PreRenderProps) & React$1.RefAttributes<SearchBarEmbed>>;
|
|
14634
15321
|
export interface SpotterEmbedProps extends EmbedProps, SpotterEmbedViewConfig {
|
|
14635
15322
|
}
|
|
14636
15323
|
export interface ConversationEmbedProps extends EmbedProps, ConversationViewConfig {
|
|
@@ -14723,7 +15410,7 @@ export declare const SpotterMessage: React$1.ForwardRefExoticComponent<{
|
|
|
14723
15410
|
* }
|
|
14724
15411
|
* ```
|
|
14725
15412
|
*/
|
|
14726
|
-
export declare const PreRenderedConversationEmbed: React$1.ForwardRefExoticComponent<SpotterEmbedProps & PreRenderProps & React$1.RefAttributes<SpotterEmbed>>;
|
|
15413
|
+
export declare const PreRenderedConversationEmbed: React$1.ForwardRefExoticComponent<(SpotterEmbedProps & PreRenderProps) & React$1.RefAttributes<SpotterEmbed>>;
|
|
14727
15414
|
export type EmbedComponent = typeof SearchEmbed$1 | typeof AppEmbed$1 | typeof LiveboardEmbed$1 | typeof SearchBarEmbed$1 | typeof ConversationMessage$1 | typeof SpotterMessage | typeof SpotterEmbed$1 | typeof ConversationEmbed$1;
|
|
14728
15415
|
/**
|
|
14729
15416
|
* Get a reference to the embed component to trigger events on the component.
|
|
@@ -14733,7 +15420,7 @@ export type EmbedComponent = typeof SearchEmbed$1 | typeof AppEmbed$1 | typeof L
|
|
|
14733
15420
|
* const ref = useEmbedRef();
|
|
14734
15421
|
* useEffect(() => {
|
|
14735
15422
|
* ref.current.trigger(
|
|
14736
|
-
*
|
|
15423
|
+
* HostEvent.UpdateRuntimeFilters,
|
|
14737
15424
|
* [{ columnName: 'name', operator: 'EQ', values: ['value']}]);
|
|
14738
15425
|
* }, [])
|
|
14739
15426
|
* return <LiveboardEmbed ref={ref} liveboardId={<id>} />
|