@thoughtspot/visual-embed-sdk 1.51.1 → 1.52.0
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/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +1 -0
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/css-variables.d.ts +1 -1
- package/cjs/src/embed/conversation.d.ts +5 -5
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +4 -4
- 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/ts-embed.d.ts +86 -5
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +30 -19
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +55 -16
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- 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/index.d.ts +8 -8
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +7 -7
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +124 -36
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +80 -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 +33 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-DxLfQxoT.js → index-BMppCU63.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +5 -5
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +86 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- 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/index.d.ts +8 -8
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +124 -36
- 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 +133 -35
- package/dist/tsembed-react.js +132 -34
- package/dist/tsembed.es.js +133 -35
- package/dist/tsembed.js +131 -33
- package/dist/visual-embed-sdk-react-full.d.ts +223 -54
- package/dist/visual-embed-sdk-react.d.ts +199 -53
- package/dist/visual-embed-sdk.d.ts +215 -46
- package/lib/package.json +1 -1
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +2 -1
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/css-variables.d.ts +1 -1
- package/lib/src/embed/conversation.d.ts +5 -5
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +3 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +4 -4
- 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/ts-embed.d.ts +86 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +32 -21
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +56 -17
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- 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/index.d.ts +8 -8
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +7 -7
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +124 -36
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +79 -11
- 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 +34 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +215 -46
- package/package.json +1 -1
- package/src/api-intercept.ts +2 -1
- package/src/css-variables.ts +1 -1
- package/src/embed/conversation.ts +5 -5
- package/src/embed/liveboard.spec.ts +4 -4
- package/src/embed/liveboard.ts +3 -1
- package/src/embed/search.spec.ts +31 -0
- package/src/embed/ts-embed.spec.ts +70 -16
- package/src/embed/ts-embed.ts +32 -20
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.spec.tsx +7 -7
- package/src/react/index.tsx +9 -9
- package/src/types.ts +125 -36
- package/src/utils.spec.ts +44 -0
- package/src/utils.ts +16 -0
|
@@ -445,7 +445,7 @@ export interface CustomCssVariables {
|
|
|
445
445
|
* Left and right margin of the header and the tab/filter section of an
|
|
446
446
|
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
447
447
|
* keep the header aligned with a custom tile-grid gutter.
|
|
448
|
-
* @version SDK: 1.
|
|
448
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
449
449
|
*/
|
|
450
450
|
"--ts-var-liveboard-header-horizontal-margin"?: string;
|
|
451
451
|
/**
|
|
@@ -2098,9 +2098,11 @@ export interface FrameParams {
|
|
|
2098
2098
|
}
|
|
2099
2099
|
/**
|
|
2100
2100
|
* Configuration for the pre-render wrapper element.
|
|
2101
|
-
*
|
|
2102
|
-
* {@link BaseViewConfig}
|
|
2103
|
-
*
|
|
2101
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2102
|
+
* {@link BaseViewConfig} — `id` over `preRenderId`, `containerSelector` over
|
|
2103
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2104
|
+
* and takes precedence when both are set, so existing top-level usage continues
|
|
2105
|
+
* to work without any changes.
|
|
2104
2106
|
*
|
|
2105
2107
|
* @version SDK: 1.52.0
|
|
2106
2108
|
* @example
|
|
@@ -2108,9 +2110,9 @@ export interface FrameParams {
|
|
|
2108
2110
|
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
2109
2111
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2110
2112
|
* preRenderConfig: {
|
|
2111
|
-
*
|
|
2112
|
-
*
|
|
2113
|
-
*
|
|
2113
|
+
* id: 'my-liveboard',
|
|
2114
|
+
* containerSelector: '#my-scroll-container',
|
|
2115
|
+
* doNotTrackSize: false,
|
|
2114
2116
|
* zIndex: -10,
|
|
2115
2117
|
* },
|
|
2116
2118
|
* });
|
|
@@ -2131,7 +2133,7 @@ export interface PreRenderConfig {
|
|
|
2131
2133
|
*
|
|
2132
2134
|
* @default undefined
|
|
2133
2135
|
*/
|
|
2134
|
-
|
|
2136
|
+
id?: string;
|
|
2135
2137
|
/**
|
|
2136
2138
|
* The DOM element or CSS selector string specifying the container into
|
|
2137
2139
|
* which the pre-rendered wrapper is inserted.
|
|
@@ -2147,7 +2149,7 @@ export interface PreRenderConfig {
|
|
|
2147
2149
|
*
|
|
2148
2150
|
* @default document.body
|
|
2149
2151
|
*/
|
|
2150
|
-
|
|
2152
|
+
containerSelector?: string | HTMLElement;
|
|
2151
2153
|
/**
|
|
2152
2154
|
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
2153
2155
|
* placeholder element.
|
|
@@ -2159,7 +2161,7 @@ export interface PreRenderConfig {
|
|
|
2159
2161
|
*
|
|
2160
2162
|
* @default false
|
|
2161
2163
|
*/
|
|
2162
|
-
|
|
2164
|
+
doNotTrackSize?: boolean;
|
|
2163
2165
|
/**
|
|
2164
2166
|
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
2165
2167
|
* Override this when the host page's stacking context does not reach `-1000`
|
|
@@ -2366,7 +2368,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2366
2368
|
*
|
|
2367
2369
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2368
2370
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
2369
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2371
|
+
* @deprecated Use {@link PreRenderConfig.id} via `preRenderConfig` instead.
|
|
2370
2372
|
* @example
|
|
2371
2373
|
* ```js
|
|
2372
2374
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -2386,7 +2388,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2386
2388
|
* @type {boolean}
|
|
2387
2389
|
* @default false
|
|
2388
2390
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
2389
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2391
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackSize} via `preRenderConfig` instead.
|
|
2390
2392
|
* @example
|
|
2391
2393
|
* ```js
|
|
2392
2394
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -2428,7 +2430,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2428
2430
|
*
|
|
2429
2431
|
* @type {string | HTMLElement}
|
|
2430
2432
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
2431
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2433
|
+
* @deprecated Use {@link PreRenderConfig.containerSelector} via `preRenderConfig` instead.
|
|
2432
2434
|
* @example
|
|
2433
2435
|
* ```js
|
|
2434
2436
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -2441,9 +2443,11 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2441
2443
|
preRenderContainer?: string | HTMLElement;
|
|
2442
2444
|
/**
|
|
2443
2445
|
* Configuration for the pre-render wrapper element.
|
|
2444
|
-
*
|
|
2445
|
-
* `BaseViewConfig`
|
|
2446
|
-
*
|
|
2446
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2447
|
+
* `BaseViewConfig` — `id` over `preRenderId`, `containerSelector` over
|
|
2448
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2449
|
+
* and takes precedence when both are set, so existing top-level usage
|
|
2450
|
+
* continues to work without any changes.
|
|
2447
2451
|
* See {@link PreRenderConfig} for available options.
|
|
2448
2452
|
*
|
|
2449
2453
|
* @version SDK: 1.52.0
|
|
@@ -2451,7 +2455,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2451
2455
|
* ```js
|
|
2452
2456
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2453
2457
|
* preRenderConfig: {
|
|
2454
|
-
*
|
|
2458
|
+
* id: 'my-liveboard',
|
|
2455
2459
|
* zIndex: -10,
|
|
2456
2460
|
* },
|
|
2457
2461
|
* });
|
|
@@ -3203,7 +3207,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3203
3207
|
*
|
|
3204
3208
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3205
3209
|
* @type {boolean}
|
|
3206
|
-
* @version SDK: 1.
|
|
3210
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3207
3211
|
* @default false
|
|
3208
3212
|
* @example
|
|
3209
3213
|
* ```js
|
|
@@ -3328,7 +3332,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3328
3332
|
*
|
|
3329
3333
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3330
3334
|
* @type {number}
|
|
3331
|
-
* @version SDK: 1.
|
|
3335
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3332
3336
|
* @example
|
|
3333
3337
|
* ```js
|
|
3334
3338
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -4961,7 +4965,32 @@ export declare enum EmbedEvent {
|
|
|
4961
4965
|
*/
|
|
4962
4966
|
OrgSwitched = "orgSwitched",
|
|
4963
4967
|
/**
|
|
4964
|
-
* Emitted
|
|
4968
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
4969
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
4970
|
+
* The request is held until you call `responder`, which decides whether the
|
|
4971
|
+
* real request goes out or a response you supply is used in its place.
|
|
4972
|
+
*
|
|
4973
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
4974
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
4975
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
4976
|
+
*
|
|
4977
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
4978
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
4979
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
4980
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
4981
|
+
* the recognized API groups.
|
|
4982
|
+
*
|
|
4983
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
4984
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
4985
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
4986
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
4987
|
+
* requests made through `fetch` are intercepted.
|
|
4988
|
+
*
|
|
4989
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
4990
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
4991
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
4992
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
4993
|
+
* `Content-Type: application/json` header.
|
|
4965
4994
|
*
|
|
4966
4995
|
* Supported on all embed types.
|
|
4967
4996
|
*
|
|
@@ -5770,7 +5799,7 @@ export declare enum HostEvent {
|
|
|
5770
5799
|
*
|
|
5771
5800
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
5772
5801
|
* existing filter, this event starts the creation of a new filter.
|
|
5773
|
-
* @version SDK: 1.
|
|
5802
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5774
5803
|
* @example
|
|
5775
5804
|
* ```js
|
|
5776
5805
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -5786,7 +5815,7 @@ export declare enum HostEvent {
|
|
|
5786
5815
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
5787
5816
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
5788
5817
|
* with `disabledActions` does.
|
|
5789
|
-
* @version SDK: 1.
|
|
5818
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5790
5819
|
* @example
|
|
5791
5820
|
* ```js
|
|
5792
5821
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -7663,7 +7692,13 @@ export declare enum HostEvent {
|
|
|
7663
7692
|
*/
|
|
7664
7693
|
UpdateEmbedParams = "updateEmbedParams",
|
|
7665
7694
|
/**
|
|
7666
|
-
*
|
|
7695
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
7696
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
7697
|
+
*
|
|
7698
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
7699
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
7700
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
7701
|
+
* removing the iframe.
|
|
7667
7702
|
* @example
|
|
7668
7703
|
* ```js
|
|
7669
7704
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -9613,7 +9648,7 @@ export declare enum Action {
|
|
|
9613
9648
|
* ```js
|
|
9614
9649
|
* hiddenActions: [Action.QuickSearchPill]
|
|
9615
9650
|
* ```
|
|
9616
|
-
* @version SDK: 1.
|
|
9651
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9617
9652
|
*/
|
|
9618
9653
|
QuickSearchPill = "quickSearchPill",
|
|
9619
9654
|
/**
|
|
@@ -9628,7 +9663,7 @@ export declare enum Action {
|
|
|
9628
9663
|
* ```js
|
|
9629
9664
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
9630
9665
|
* ```
|
|
9631
|
-
* @version SDK: 1.
|
|
9666
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9632
9667
|
*/
|
|
9633
9668
|
DeepAnalysisPill = "deepAnalysisPill",
|
|
9634
9669
|
/**
|
|
@@ -9643,7 +9678,7 @@ export declare enum Action {
|
|
|
9643
9678
|
* ```js
|
|
9644
9679
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
9645
9680
|
* ```
|
|
9646
|
-
* @version SDK: 1.
|
|
9681
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9647
9682
|
*/
|
|
9648
9683
|
DataLiteracyPill = "dataLiteracyPill",
|
|
9649
9684
|
/**
|
|
@@ -10131,9 +10166,40 @@ export interface EmbedErrorDetailsEvent {
|
|
|
10131
10166
|
message: string | string[];
|
|
10132
10167
|
/** Machine-readable error code for programmatic error handling */
|
|
10133
10168
|
code: EmbedErrorCodes;
|
|
10169
|
+
/** How badly the embed is affected. Defaults to {@link EmbedErrorSeverity.SEV3}. */
|
|
10170
|
+
severity?: EmbedErrorSeverity;
|
|
10134
10171
|
/** Additional context-specific for backward compatibility */
|
|
10135
10172
|
[key: string]: any;
|
|
10136
10173
|
}
|
|
10174
|
+
/**
|
|
10175
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
10176
|
+
* worth surfacing to the end user.
|
|
10177
|
+
*
|
|
10178
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
10179
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
10180
|
+
*
|
|
10181
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
10182
|
+
* @group Error Handling
|
|
10183
|
+
*
|
|
10184
|
+
* @example
|
|
10185
|
+
* Only surface errors that took the embed down
|
|
10186
|
+
*
|
|
10187
|
+
* ```js
|
|
10188
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
10189
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
10190
|
+
* showBanner(error.message);
|
|
10191
|
+
* }
|
|
10192
|
+
* });
|
|
10193
|
+
* ```
|
|
10194
|
+
*/
|
|
10195
|
+
export declare enum EmbedErrorSeverity {
|
|
10196
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
10197
|
+
SEV1 = 1,
|
|
10198
|
+
/** Something is degraded but the embed still works. */
|
|
10199
|
+
SEV2 = 2,
|
|
10200
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
10201
|
+
SEV3 = 3
|
|
10202
|
+
}
|
|
10137
10203
|
declare enum ContextType {
|
|
10138
10204
|
/**
|
|
10139
10205
|
* Search answer context for search page or edit viz dialog on liveboard page.
|
|
@@ -10175,25 +10241,40 @@ export interface DefaultAppInitData {
|
|
|
10175
10241
|
useHostEventsV2?: boolean;
|
|
10176
10242
|
}
|
|
10177
10243
|
/**
|
|
10178
|
-
*
|
|
10244
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
10245
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
10246
|
+
* not have to list them individually.
|
|
10179
10247
|
*/
|
|
10180
10248
|
export declare enum InterceptedApiType {
|
|
10181
10249
|
/**
|
|
10182
|
-
* The
|
|
10250
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
10251
|
+
* table, and headline data.
|
|
10183
10252
|
*/
|
|
10184
10253
|
AnswerData = "AnswerData",
|
|
10185
10254
|
/**
|
|
10186
|
-
*
|
|
10255
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
10256
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
10257
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
10258
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
10259
|
+
* supersedes them.
|
|
10187
10260
|
*/
|
|
10188
10261
|
ALL = "ALL",
|
|
10189
10262
|
/**
|
|
10190
|
-
* The
|
|
10263
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
10191
10264
|
*/
|
|
10192
10265
|
LiveboardData = "LiveboardData"
|
|
10193
10266
|
}
|
|
10194
10267
|
export type ApiInterceptFlags = {
|
|
10195
10268
|
/**
|
|
10196
|
-
*
|
|
10269
|
+
* Emits `EmbedEvent.OnBeforeGetVizDataIntercept` before the Answer data
|
|
10270
|
+
* APIs are called. This is the earlier, narrower form of interception, kept
|
|
10271
|
+
* for backward compatibility and implemented on top of
|
|
10272
|
+
* `EmbedEvent.ApiIntercept`. Prefer `interceptUrls` with
|
|
10273
|
+
* `InterceptedApiType.AnswerData` in new code.
|
|
10274
|
+
*
|
|
10275
|
+
* Setting this also intercepts the Answer data APIs, so both
|
|
10276
|
+
* `EmbedEvent.OnBeforeGetVizDataIntercept` and `EmbedEvent.ApiIntercept`
|
|
10277
|
+
* are emitted for those requests.
|
|
10197
10278
|
*
|
|
10198
10279
|
* Can be used for Search and App Embed from SDK 1.29.0
|
|
10199
10280
|
*
|
|
@@ -10201,14 +10282,21 @@ export type ApiInterceptFlags = {
|
|
|
10201
10282
|
*/
|
|
10202
10283
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
10203
10284
|
/**
|
|
10204
|
-
*
|
|
10205
|
-
*
|
|
10285
|
+
* The requests to intercept, given as `InterceptedApiType` groups, absolute
|
|
10286
|
+
* URLs, or paths beginning with `/` that are resolved against the
|
|
10287
|
+
* ThoughtSpot host. Setting this is what turns interception on.
|
|
10288
|
+
*
|
|
10289
|
+
* A URL matches only on exact equality with the request's fully resolved
|
|
10290
|
+
* URL, query string included, so prefer an `InterceptedApiType` group where
|
|
10291
|
+
* one covers the API you need.
|
|
10292
|
+
*
|
|
10293
|
+
* Each intercepted request pauses and emits `EmbedEvent.ApiIntercept`, then
|
|
10294
|
+
* proceeds according to the response passed to that event's responder.
|
|
10206
10295
|
*
|
|
10207
10296
|
* @example
|
|
10208
10297
|
* ```js
|
|
10209
10298
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10210
10299
|
* ...viewConfig,
|
|
10211
|
-
* enableApiIntercept: true,
|
|
10212
10300
|
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
10213
10301
|
* })
|
|
10214
10302
|
* ```
|
|
@@ -10217,14 +10305,14 @@ export type ApiInterceptFlags = {
|
|
|
10217
10305
|
*/
|
|
10218
10306
|
interceptUrls?: (string | InterceptedApiType)[];
|
|
10219
10307
|
/**
|
|
10220
|
-
*
|
|
10221
|
-
*
|
|
10308
|
+
* How long, in milliseconds, an intercepted request waits for the
|
|
10309
|
+
* `EmbedEvent.ApiIntercept` responder before it is abandoned. Defaults to
|
|
10310
|
+
* 30000. On timeout the request fails and `EmbedEvent.Error` is emitted.
|
|
10222
10311
|
*
|
|
10223
10312
|
* @example
|
|
10224
10313
|
* ```js
|
|
10225
10314
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10226
10315
|
* ...viewConfig,
|
|
10227
|
-
* enableApiIntercept: true,
|
|
10228
10316
|
* interceptUrls: [InterceptedApiType.ALL],
|
|
10229
10317
|
* interceptTimeout: 1000,
|
|
10230
10318
|
* })
|
|
@@ -11293,7 +11381,87 @@ declare class TsEmbed {
|
|
|
11293
11381
|
* @param query
|
|
11294
11382
|
*/
|
|
11295
11383
|
protected getEmbedBasePath(query: string): string;
|
|
11296
|
-
protected getUpdateEmbedParamsObject(): Promise<
|
|
11384
|
+
protected getUpdateEmbedParamsObject(): Promise<{
|
|
11385
|
+
customisations: CustomisationsInterface;
|
|
11386
|
+
authToken: string;
|
|
11387
|
+
runtimeFilterParams: string;
|
|
11388
|
+
runtimeParameterParams: string;
|
|
11389
|
+
hiddenHomepageModules: HomepageModule[];
|
|
11390
|
+
reorderedHomepageModules: string[];
|
|
11391
|
+
hostConfig: Record<string, any>;
|
|
11392
|
+
hiddenHomeLeftNavItems: string[];
|
|
11393
|
+
customVariablesForThirdPartyTools: Record<string, any>;
|
|
11394
|
+
hiddenListColumns: ListPageColumns[];
|
|
11395
|
+
customActions: CustomAction[];
|
|
11396
|
+
interceptTimeout: number;
|
|
11397
|
+
interceptUrls: string[];
|
|
11398
|
+
embedExpiryInAuthToken: boolean;
|
|
11399
|
+
shouldBypassPayloadValidation?: boolean;
|
|
11400
|
+
useHostEventsV2?: boolean;
|
|
11401
|
+
layoutConfig?: LayoutConfig;
|
|
11402
|
+
frameParams?: FrameParams;
|
|
11403
|
+
theme?: string;
|
|
11404
|
+
styleSheet__unstable?: string;
|
|
11405
|
+
disabledActions?: Action[];
|
|
11406
|
+
disabledActionReason?: string;
|
|
11407
|
+
hiddenActions?: Action[];
|
|
11408
|
+
visibleActions?: Action[];
|
|
11409
|
+
locale?: string;
|
|
11410
|
+
additionalFlags?: {
|
|
11411
|
+
[key: string]: string | number | boolean;
|
|
11412
|
+
};
|
|
11413
|
+
customizations?: CustomisationsInterface;
|
|
11414
|
+
insertAsSibling?: boolean;
|
|
11415
|
+
usePrerenderedIfAvailable?: boolean;
|
|
11416
|
+
preRenderId?: string;
|
|
11417
|
+
doNotTrackPreRenderSize?: boolean;
|
|
11418
|
+
preRenderContainer?: string | HTMLElement;
|
|
11419
|
+
preRenderConfig?: PreRenderConfig;
|
|
11420
|
+
enableV2Shell_experimental?: boolean;
|
|
11421
|
+
embedComponentType?: string;
|
|
11422
|
+
exposeTranslationIDs?: boolean;
|
|
11423
|
+
disableRedirectionLinksInNewTab?: boolean;
|
|
11424
|
+
overrideOrgId?: number;
|
|
11425
|
+
overrideHistoryState?: boolean;
|
|
11426
|
+
linkOverride?: boolean;
|
|
11427
|
+
enableLinkOverridesV2?: boolean;
|
|
11428
|
+
primaryAction?: string;
|
|
11429
|
+
insertInToSlide?: boolean;
|
|
11430
|
+
showAlerts?: boolean;
|
|
11431
|
+
refreshAuthTokenOnNearExpiry?: boolean;
|
|
11432
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
11433
|
+
runtimeFilters?: RuntimeFilter[];
|
|
11434
|
+
runtimeParameters?: RuntimeParameter[];
|
|
11435
|
+
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
11436
|
+
excludeRuntimeFiltersfromURL?: boolean;
|
|
11437
|
+
excludeRuntimeParametersfromURL?: boolean;
|
|
11438
|
+
collapseSearchBar?: boolean;
|
|
11439
|
+
dataPanelV2?: boolean;
|
|
11440
|
+
enableCustomColumnGroups?: boolean;
|
|
11441
|
+
isThisPeriodInDateFiltersEnabled?: boolean;
|
|
11442
|
+
hideLiveboardHeader?: boolean;
|
|
11443
|
+
showLiveboardTitle?: boolean;
|
|
11444
|
+
showLiveboardDescription?: boolean;
|
|
11445
|
+
isLiveboardHeaderSticky?: boolean;
|
|
11446
|
+
enable2ColumnLayout?: boolean;
|
|
11447
|
+
isLiveboardAlwaysOn12ColLayout?: boolean;
|
|
11448
|
+
isLiveboardCompactHeaderEnabled?: boolean;
|
|
11449
|
+
showLiveboardVerifiedBadge?: boolean;
|
|
11450
|
+
hideIrrelevantChipsInLiveboardTabs?: boolean;
|
|
11451
|
+
showLiveboardReverifyBanner?: boolean;
|
|
11452
|
+
enableAskSage?: boolean;
|
|
11453
|
+
coverAndFilterOptionInPDF?: boolean;
|
|
11454
|
+
liveboardGutter?: number;
|
|
11455
|
+
isCentralizedLiveboardFilterUXEnabled?: boolean;
|
|
11456
|
+
isScopedLiveboardFilteringEnabled?: boolean;
|
|
11457
|
+
isLinkParametersEnabled?: boolean;
|
|
11458
|
+
isEnhancedFilterInteractivityEnabled?: boolean;
|
|
11459
|
+
showMaskedFilterChip?: boolean;
|
|
11460
|
+
isLiveboardMasterpiecesEnabled?: boolean;
|
|
11461
|
+
newChartsLibrary?: boolean;
|
|
11462
|
+
visibleTabs?: string[];
|
|
11463
|
+
hiddenTabs?: string[];
|
|
11464
|
+
}>;
|
|
11297
11465
|
/**
|
|
11298
11466
|
* Common query params set for all the embed modes.
|
|
11299
11467
|
* @param queryParams
|
|
@@ -11313,9 +11481,10 @@ declare class TsEmbed {
|
|
|
11313
11481
|
protected getRootIframeSrc(): string;
|
|
11314
11482
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11315
11483
|
/**
|
|
11316
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
11317
|
-
*
|
|
11318
|
-
*
|
|
11484
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
11485
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
11486
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
11487
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
11319
11488
|
*/
|
|
11320
11489
|
protected getPreRenderConfig(): PreRenderConfig;
|
|
11321
11490
|
/**
|
|
@@ -12369,7 +12538,7 @@ export interface SpotterShareConversationConfig {
|
|
|
12369
12538
|
}
|
|
12370
12539
|
/**
|
|
12371
12540
|
* A single starter prompt question shown under a category pill.
|
|
12372
|
-
* @version SDK: 1.
|
|
12541
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12373
12542
|
* @group Embed components
|
|
12374
12543
|
*/
|
|
12375
12544
|
export interface StarterPromptQuestion {
|
|
@@ -12387,7 +12556,7 @@ export interface StarterPromptQuestion {
|
|
|
12387
12556
|
/**
|
|
12388
12557
|
* Configuration for a starter prompt category with questions
|
|
12389
12558
|
* (`quick` and `research`).
|
|
12390
|
-
* @version SDK: 1.
|
|
12559
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12391
12560
|
* @group Embed components
|
|
12392
12561
|
*/
|
|
12393
12562
|
export interface StarterPromptCategory {
|
|
@@ -12405,7 +12574,7 @@ export interface StarterPromptCategory {
|
|
|
12405
12574
|
/**
|
|
12406
12575
|
* Configuration for the Data Literacy starter prompt category.
|
|
12407
12576
|
* Only the label is customizable; the prompt text comes from the backend.
|
|
12408
|
-
* @version SDK: 1.
|
|
12577
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12409
12578
|
* @group Embed components
|
|
12410
12579
|
*/
|
|
12411
12580
|
export interface StarterPreviewDataCategory {
|
|
@@ -12423,7 +12592,7 @@ export interface StarterPreviewDataCategory {
|
|
|
12423
12592
|
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
12424
12593
|
* the Liveboard SpotterViz surface are configured separately through
|
|
12425
12594
|
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
12426
|
-
* @version SDK: 1.
|
|
12595
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12427
12596
|
* @group Embed components
|
|
12428
12597
|
*/
|
|
12429
12598
|
export interface StarterPromptsConfig {
|
|
@@ -12503,7 +12672,7 @@ export interface SpotterChatViewConfig {
|
|
|
12503
12672
|
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
12504
12673
|
*
|
|
12505
12674
|
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12506
|
-
* @version SDK: 1.
|
|
12675
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12507
12676
|
* @example
|
|
12508
12677
|
* ```js
|
|
12509
12678
|
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
@@ -15055,9 +15224,9 @@ export interface SearchProps extends EmbedProps, SearchViewConfig {
|
|
|
15055
15224
|
}
|
|
15056
15225
|
/**
|
|
15057
15226
|
* The PreRendered components require a preRender id. It can be supplied either
|
|
15058
|
-
* through `preRenderConfig.
|
|
15227
|
+
* through `preRenderConfig.id` (SDK: 1.52.0 and later) or through the
|
|
15059
15228
|
* top-level `preRenderId` prop (SDK: 1.25.0 and later, now deprecated).
|
|
15060
|
-
* `preRenderConfig.
|
|
15229
|
+
* `preRenderConfig.id` takes precedence when both are set.
|
|
15061
15230
|
*
|
|
15062
15231
|
* Use PreRender to render the embed in the background and then
|
|
15063
15232
|
* show or hide the rendered embed using showPreRender or hidePreRender respectively.
|
|
@@ -15066,14 +15235,14 @@ export interface SearchProps extends EmbedProps, SearchViewConfig {
|
|
|
15066
15235
|
* // Preferred, SDK: 1.52.0 and later.
|
|
15067
15236
|
* function LandingPageComponent() {
|
|
15068
15237
|
* return <PreRenderedLiveboardEmbed
|
|
15069
|
-
* preRenderConfig={{
|
|
15238
|
+
* preRenderConfig={{ id: "someId" }}
|
|
15070
15239
|
* liveboardId="libId"
|
|
15071
15240
|
* />
|
|
15072
15241
|
* }
|
|
15073
15242
|
*
|
|
15074
15243
|
* function MyComponent() {
|
|
15075
15244
|
* return <LiveboardEmbed
|
|
15076
|
-
* preRenderConfig={{
|
|
15245
|
+
* preRenderConfig={{ id: "someId" }}
|
|
15077
15246
|
* liveboardId="libId"
|
|
15078
15247
|
* />
|
|
15079
15248
|
* }
|
|
@@ -15090,7 +15259,7 @@ export type PreRenderProps = {
|
|
|
15090
15259
|
/**
|
|
15091
15260
|
* PreRender id to be used for PreRendering the embed.
|
|
15092
15261
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
|
|
15093
|
-
* @deprecated Use `preRenderConfig.
|
|
15262
|
+
* @deprecated Use `preRenderConfig.id` instead.
|
|
15094
15263
|
*/
|
|
15095
15264
|
preRenderId: string;
|
|
15096
15265
|
/**
|
|
@@ -15103,17 +15272,17 @@ export type PreRenderProps = {
|
|
|
15103
15272
|
/**
|
|
15104
15273
|
* PreRender id to be used for PreRendering the embed.
|
|
15105
15274
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
|
|
15106
|
-
* @deprecated Use `preRenderConfig.
|
|
15275
|
+
* @deprecated Use `preRenderConfig.id` instead.
|
|
15107
15276
|
*/
|
|
15108
15277
|
preRenderId?: string;
|
|
15109
15278
|
/**
|
|
15110
|
-
* Configuration for the pre-render wrapper element. `
|
|
15279
|
+
* Configuration for the pre-render wrapper element. `id` is
|
|
15111
15280
|
* required here when the top-level `preRenderId` prop is not passed.
|
|
15112
15281
|
* See {@link PreRenderConfig} for available options.
|
|
15113
15282
|
* @version SDK: 1.52.0
|
|
15114
15283
|
*/
|
|
15115
15284
|
preRenderConfig: PreRenderConfig & {
|
|
15116
|
-
|
|
15285
|
+
id: string;
|
|
15117
15286
|
};
|
|
15118
15287
|
};
|
|
15119
15288
|
/**
|