@thoughtspot/visual-embed-sdk 1.51.2 → 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/ts-embed.d.ts +4 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +23 -16
- 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/dist/{index-D8_Zs-Nr.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 +4 -3
- 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/tsembed-react.es.js +109 -32
- package/dist/tsembed-react.js +108 -31
- package/dist/tsembed.es.js +109 -32
- package/dist/tsembed.js +107 -30
- package/dist/visual-embed-sdk-react-full.d.ts +142 -53
- package/dist/visual-embed-sdk-react.d.ts +118 -52
- package/dist/visual-embed-sdk.d.ts +134 -45
- 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/ts-embed.d.ts +4 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +24 -17
- 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/visual-embed-sdk.d.ts +134 -45
- 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/ts-embed.spec.ts +70 -16
- package/src/embed/ts-embed.ts +24 -16
- 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
|
@@ -443,7 +443,7 @@ export interface CustomCssVariables {
|
|
|
443
443
|
* Left and right margin of the header and the tab/filter section of an
|
|
444
444
|
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
445
445
|
* keep the header aligned with a custom tile-grid gutter.
|
|
446
|
-
* @version SDK: 1.
|
|
446
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
447
447
|
*/
|
|
448
448
|
"--ts-var-liveboard-header-horizontal-margin"?: string;
|
|
449
449
|
/**
|
|
@@ -2154,9 +2154,11 @@ export interface FrameParams {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
/**
|
|
2156
2156
|
* Configuration for the pre-render wrapper element.
|
|
2157
|
-
*
|
|
2158
|
-
* {@link BaseViewConfig}
|
|
2159
|
-
*
|
|
2157
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2158
|
+
* {@link BaseViewConfig} — `id` over `preRenderId`, `containerSelector` over
|
|
2159
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2160
|
+
* and takes precedence when both are set, so existing top-level usage continues
|
|
2161
|
+
* to work without any changes.
|
|
2160
2162
|
*
|
|
2161
2163
|
* @version SDK: 1.52.0
|
|
2162
2164
|
* @example
|
|
@@ -2164,9 +2166,9 @@ export interface FrameParams {
|
|
|
2164
2166
|
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
2165
2167
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2166
2168
|
* preRenderConfig: {
|
|
2167
|
-
*
|
|
2168
|
-
*
|
|
2169
|
-
*
|
|
2169
|
+
* id: 'my-liveboard',
|
|
2170
|
+
* containerSelector: '#my-scroll-container',
|
|
2171
|
+
* doNotTrackSize: false,
|
|
2170
2172
|
* zIndex: -10,
|
|
2171
2173
|
* },
|
|
2172
2174
|
* });
|
|
@@ -2187,7 +2189,7 @@ export interface PreRenderConfig {
|
|
|
2187
2189
|
*
|
|
2188
2190
|
* @default undefined
|
|
2189
2191
|
*/
|
|
2190
|
-
|
|
2192
|
+
id?: string;
|
|
2191
2193
|
/**
|
|
2192
2194
|
* The DOM element or CSS selector string specifying the container into
|
|
2193
2195
|
* which the pre-rendered wrapper is inserted.
|
|
@@ -2203,7 +2205,7 @@ export interface PreRenderConfig {
|
|
|
2203
2205
|
*
|
|
2204
2206
|
* @default document.body
|
|
2205
2207
|
*/
|
|
2206
|
-
|
|
2208
|
+
containerSelector?: string | HTMLElement;
|
|
2207
2209
|
/**
|
|
2208
2210
|
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
2209
2211
|
* placeholder element.
|
|
@@ -2215,7 +2217,7 @@ export interface PreRenderConfig {
|
|
|
2215
2217
|
*
|
|
2216
2218
|
* @default false
|
|
2217
2219
|
*/
|
|
2218
|
-
|
|
2220
|
+
doNotTrackSize?: boolean;
|
|
2219
2221
|
/**
|
|
2220
2222
|
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
2221
2223
|
* Override this when the host page's stacking context does not reach `-1000`
|
|
@@ -2422,7 +2424,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2422
2424
|
*
|
|
2423
2425
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2424
2426
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
2425
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2427
|
+
* @deprecated Use {@link PreRenderConfig.id} via `preRenderConfig` instead.
|
|
2426
2428
|
* @example
|
|
2427
2429
|
* ```js
|
|
2428
2430
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -2442,7 +2444,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2442
2444
|
* @type {boolean}
|
|
2443
2445
|
* @default false
|
|
2444
2446
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
2445
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2447
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackSize} via `preRenderConfig` instead.
|
|
2446
2448
|
* @example
|
|
2447
2449
|
* ```js
|
|
2448
2450
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -2484,7 +2486,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2484
2486
|
*
|
|
2485
2487
|
* @type {string | HTMLElement}
|
|
2486
2488
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
2487
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2489
|
+
* @deprecated Use {@link PreRenderConfig.containerSelector} via `preRenderConfig` instead.
|
|
2488
2490
|
* @example
|
|
2489
2491
|
* ```js
|
|
2490
2492
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -2497,9 +2499,11 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2497
2499
|
preRenderContainer?: string | HTMLElement;
|
|
2498
2500
|
/**
|
|
2499
2501
|
* Configuration for the pre-render wrapper element.
|
|
2500
|
-
*
|
|
2501
|
-
* `BaseViewConfig`
|
|
2502
|
-
*
|
|
2502
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2503
|
+
* `BaseViewConfig` — `id` over `preRenderId`, `containerSelector` over
|
|
2504
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2505
|
+
* and takes precedence when both are set, so existing top-level usage
|
|
2506
|
+
* continues to work without any changes.
|
|
2503
2507
|
* See {@link PreRenderConfig} for available options.
|
|
2504
2508
|
*
|
|
2505
2509
|
* @version SDK: 1.52.0
|
|
@@ -2507,7 +2511,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2507
2511
|
* ```js
|
|
2508
2512
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2509
2513
|
* preRenderConfig: {
|
|
2510
|
-
*
|
|
2514
|
+
* id: 'my-liveboard',
|
|
2511
2515
|
* zIndex: -10,
|
|
2512
2516
|
* },
|
|
2513
2517
|
* });
|
|
@@ -3274,7 +3278,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3274
3278
|
*
|
|
3275
3279
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3276
3280
|
* @type {boolean}
|
|
3277
|
-
* @version SDK: 1.
|
|
3281
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3278
3282
|
* @default false
|
|
3279
3283
|
* @example
|
|
3280
3284
|
* ```js
|
|
@@ -3399,7 +3403,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3399
3403
|
*
|
|
3400
3404
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3401
3405
|
* @type {number}
|
|
3402
|
-
* @version SDK: 1.
|
|
3406
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3403
3407
|
* @example
|
|
3404
3408
|
* ```js
|
|
3405
3409
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -5047,7 +5051,32 @@ export declare enum EmbedEvent {
|
|
|
5047
5051
|
*/
|
|
5048
5052
|
OrgSwitched = "orgSwitched",
|
|
5049
5053
|
/**
|
|
5050
|
-
* Emitted
|
|
5054
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
5055
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
5056
|
+
* The request is held until you call `responder`, which decides whether the
|
|
5057
|
+
* real request goes out or a response you supply is used in its place.
|
|
5058
|
+
*
|
|
5059
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
5060
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
5061
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
5062
|
+
*
|
|
5063
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
5064
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
5065
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
5066
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
5067
|
+
* the recognized API groups.
|
|
5068
|
+
*
|
|
5069
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
5070
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
5071
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
5072
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
5073
|
+
* requests made through `fetch` are intercepted.
|
|
5074
|
+
*
|
|
5075
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
5076
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
5077
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
5078
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
5079
|
+
* `Content-Type: application/json` header.
|
|
5051
5080
|
*
|
|
5052
5081
|
* Supported on all embed types.
|
|
5053
5082
|
*
|
|
@@ -5856,7 +5885,7 @@ export declare enum HostEvent {
|
|
|
5856
5885
|
*
|
|
5857
5886
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
5858
5887
|
* existing filter, this event starts the creation of a new filter.
|
|
5859
|
-
* @version SDK: 1.
|
|
5888
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5860
5889
|
* @example
|
|
5861
5890
|
* ```js
|
|
5862
5891
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -5872,7 +5901,7 @@ export declare enum HostEvent {
|
|
|
5872
5901
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
5873
5902
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
5874
5903
|
* with `disabledActions` does.
|
|
5875
|
-
* @version SDK: 1.
|
|
5904
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5876
5905
|
* @example
|
|
5877
5906
|
* ```js
|
|
5878
5907
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -7749,7 +7778,13 @@ export declare enum HostEvent {
|
|
|
7749
7778
|
*/
|
|
7750
7779
|
UpdateEmbedParams = "updateEmbedParams",
|
|
7751
7780
|
/**
|
|
7752
|
-
*
|
|
7781
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
7782
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
7783
|
+
*
|
|
7784
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
7785
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
7786
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
7787
|
+
* removing the iframe.
|
|
7753
7788
|
* @example
|
|
7754
7789
|
* ```js
|
|
7755
7790
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -9699,7 +9734,7 @@ export declare enum Action {
|
|
|
9699
9734
|
* ```js
|
|
9700
9735
|
* hiddenActions: [Action.QuickSearchPill]
|
|
9701
9736
|
* ```
|
|
9702
|
-
* @version SDK: 1.
|
|
9737
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9703
9738
|
*/
|
|
9704
9739
|
QuickSearchPill = "quickSearchPill",
|
|
9705
9740
|
/**
|
|
@@ -9714,7 +9749,7 @@ export declare enum Action {
|
|
|
9714
9749
|
* ```js
|
|
9715
9750
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
9716
9751
|
* ```
|
|
9717
|
-
* @version SDK: 1.
|
|
9752
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9718
9753
|
*/
|
|
9719
9754
|
DeepAnalysisPill = "deepAnalysisPill",
|
|
9720
9755
|
/**
|
|
@@ -9729,7 +9764,7 @@ export declare enum Action {
|
|
|
9729
9764
|
* ```js
|
|
9730
9765
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
9731
9766
|
* ```
|
|
9732
|
-
* @version SDK: 1.
|
|
9767
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9733
9768
|
*/
|
|
9734
9769
|
DataLiteracyPill = "dataLiteracyPill",
|
|
9735
9770
|
/**
|
|
@@ -10310,9 +10345,40 @@ export interface EmbedErrorDetailsEvent {
|
|
|
10310
10345
|
message: string | string[];
|
|
10311
10346
|
/** Machine-readable error code for programmatic error handling */
|
|
10312
10347
|
code: EmbedErrorCodes;
|
|
10348
|
+
/** How badly the embed is affected. Defaults to {@link EmbedErrorSeverity.SEV3}. */
|
|
10349
|
+
severity?: EmbedErrorSeverity;
|
|
10313
10350
|
/** Additional context-specific for backward compatibility */
|
|
10314
10351
|
[key: string]: any;
|
|
10315
10352
|
}
|
|
10353
|
+
/**
|
|
10354
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
10355
|
+
* worth surfacing to the end user.
|
|
10356
|
+
*
|
|
10357
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
10358
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
10359
|
+
*
|
|
10360
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
10361
|
+
* @group Error Handling
|
|
10362
|
+
*
|
|
10363
|
+
* @example
|
|
10364
|
+
* Only surface errors that took the embed down
|
|
10365
|
+
*
|
|
10366
|
+
* ```js
|
|
10367
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
10368
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
10369
|
+
* showBanner(error.message);
|
|
10370
|
+
* }
|
|
10371
|
+
* });
|
|
10372
|
+
* ```
|
|
10373
|
+
*/
|
|
10374
|
+
export declare enum EmbedErrorSeverity {
|
|
10375
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
10376
|
+
SEV1 = 1,
|
|
10377
|
+
/** Something is degraded but the embed still works. */
|
|
10378
|
+
SEV2 = 2,
|
|
10379
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
10380
|
+
SEV3 = 3
|
|
10381
|
+
}
|
|
10316
10382
|
/**
|
|
10317
10383
|
* Context types for specifying the page context when triggering host events.
|
|
10318
10384
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -10370,25 +10436,40 @@ export interface DefaultAppInitData {
|
|
|
10370
10436
|
useHostEventsV2?: boolean;
|
|
10371
10437
|
}
|
|
10372
10438
|
/**
|
|
10373
|
-
*
|
|
10439
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
10440
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
10441
|
+
* not have to list them individually.
|
|
10374
10442
|
*/
|
|
10375
10443
|
export declare enum InterceptedApiType {
|
|
10376
10444
|
/**
|
|
10377
|
-
* The
|
|
10445
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
10446
|
+
* table, and headline data.
|
|
10378
10447
|
*/
|
|
10379
10448
|
AnswerData = "AnswerData",
|
|
10380
10449
|
/**
|
|
10381
|
-
*
|
|
10450
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
10451
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
10452
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
10453
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
10454
|
+
* supersedes them.
|
|
10382
10455
|
*/
|
|
10383
10456
|
ALL = "ALL",
|
|
10384
10457
|
/**
|
|
10385
|
-
* The
|
|
10458
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
10386
10459
|
*/
|
|
10387
10460
|
LiveboardData = "LiveboardData"
|
|
10388
10461
|
}
|
|
10389
10462
|
export type ApiInterceptFlags = {
|
|
10390
10463
|
/**
|
|
10391
|
-
*
|
|
10464
|
+
* Emits `EmbedEvent.OnBeforeGetVizDataIntercept` before the Answer data
|
|
10465
|
+
* APIs are called. This is the earlier, narrower form of interception, kept
|
|
10466
|
+
* for backward compatibility and implemented on top of
|
|
10467
|
+
* `EmbedEvent.ApiIntercept`. Prefer `interceptUrls` with
|
|
10468
|
+
* `InterceptedApiType.AnswerData` in new code.
|
|
10469
|
+
*
|
|
10470
|
+
* Setting this also intercepts the Answer data APIs, so both
|
|
10471
|
+
* `EmbedEvent.OnBeforeGetVizDataIntercept` and `EmbedEvent.ApiIntercept`
|
|
10472
|
+
* are emitted for those requests.
|
|
10392
10473
|
*
|
|
10393
10474
|
* Can be used for Search and App Embed from SDK 1.29.0
|
|
10394
10475
|
*
|
|
@@ -10396,14 +10477,21 @@ export type ApiInterceptFlags = {
|
|
|
10396
10477
|
*/
|
|
10397
10478
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
10398
10479
|
/**
|
|
10399
|
-
*
|
|
10400
|
-
*
|
|
10480
|
+
* The requests to intercept, given as `InterceptedApiType` groups, absolute
|
|
10481
|
+
* URLs, or paths beginning with `/` that are resolved against the
|
|
10482
|
+
* ThoughtSpot host. Setting this is what turns interception on.
|
|
10483
|
+
*
|
|
10484
|
+
* A URL matches only on exact equality with the request's fully resolved
|
|
10485
|
+
* URL, query string included, so prefer an `InterceptedApiType` group where
|
|
10486
|
+
* one covers the API you need.
|
|
10487
|
+
*
|
|
10488
|
+
* Each intercepted request pauses and emits `EmbedEvent.ApiIntercept`, then
|
|
10489
|
+
* proceeds according to the response passed to that event's responder.
|
|
10401
10490
|
*
|
|
10402
10491
|
* @example
|
|
10403
10492
|
* ```js
|
|
10404
10493
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10405
10494
|
* ...viewConfig,
|
|
10406
|
-
* enableApiIntercept: true,
|
|
10407
10495
|
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
10408
10496
|
* })
|
|
10409
10497
|
* ```
|
|
@@ -10412,14 +10500,14 @@ export type ApiInterceptFlags = {
|
|
|
10412
10500
|
*/
|
|
10413
10501
|
interceptUrls?: (string | InterceptedApiType)[];
|
|
10414
10502
|
/**
|
|
10415
|
-
*
|
|
10416
|
-
*
|
|
10503
|
+
* How long, in milliseconds, an intercepted request waits for the
|
|
10504
|
+
* `EmbedEvent.ApiIntercept` responder before it is abandoned. Defaults to
|
|
10505
|
+
* 30000. On timeout the request fails and `EmbedEvent.Error` is emitted.
|
|
10417
10506
|
*
|
|
10418
10507
|
* @example
|
|
10419
10508
|
* ```js
|
|
10420
10509
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10421
10510
|
* ...viewConfig,
|
|
10422
|
-
* enableApiIntercept: true,
|
|
10423
10511
|
* interceptUrls: [InterceptedApiType.ALL],
|
|
10424
10512
|
* interceptTimeout: 1000,
|
|
10425
10513
|
* })
|
|
@@ -11455,9 +11543,10 @@ declare class TsEmbed {
|
|
|
11455
11543
|
protected getRootIframeSrc(): string;
|
|
11456
11544
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11457
11545
|
/**
|
|
11458
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
11459
|
-
*
|
|
11460
|
-
*
|
|
11546
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
11547
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
11548
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
11549
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
11461
11550
|
*/
|
|
11462
11551
|
protected getPreRenderConfig(): PreRenderConfig;
|
|
11463
11552
|
/**
|
|
@@ -12061,7 +12150,7 @@ export interface SpotterShareConversationConfig {
|
|
|
12061
12150
|
}
|
|
12062
12151
|
/**
|
|
12063
12152
|
* A single starter prompt question shown under a category pill.
|
|
12064
|
-
* @version SDK: 1.
|
|
12153
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12065
12154
|
* @group Embed components
|
|
12066
12155
|
*/
|
|
12067
12156
|
export interface StarterPromptQuestion {
|
|
@@ -12079,7 +12168,7 @@ export interface StarterPromptQuestion {
|
|
|
12079
12168
|
/**
|
|
12080
12169
|
* Configuration for a starter prompt category with questions
|
|
12081
12170
|
* (`quick` and `research`).
|
|
12082
|
-
* @version SDK: 1.
|
|
12171
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12083
12172
|
* @group Embed components
|
|
12084
12173
|
*/
|
|
12085
12174
|
export interface StarterPromptCategory {
|
|
@@ -12097,7 +12186,7 @@ export interface StarterPromptCategory {
|
|
|
12097
12186
|
/**
|
|
12098
12187
|
* Configuration for the Data Literacy starter prompt category.
|
|
12099
12188
|
* Only the label is customizable; the prompt text comes from the backend.
|
|
12100
|
-
* @version SDK: 1.
|
|
12189
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12101
12190
|
* @group Embed components
|
|
12102
12191
|
*/
|
|
12103
12192
|
export interface StarterPreviewDataCategory {
|
|
@@ -12115,7 +12204,7 @@ export interface StarterPreviewDataCategory {
|
|
|
12115
12204
|
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
12116
12205
|
* the Liveboard SpotterViz surface are configured separately through
|
|
12117
12206
|
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
12118
|
-
* @version SDK: 1.
|
|
12207
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12119
12208
|
* @group Embed components
|
|
12120
12209
|
*/
|
|
12121
12210
|
export interface StarterPromptsConfig {
|
|
@@ -12195,7 +12284,7 @@ export interface SpotterChatViewConfig {
|
|
|
12195
12284
|
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
12196
12285
|
*
|
|
12197
12286
|
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12198
|
-
* @version SDK: 1.
|
|
12287
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12199
12288
|
* @example
|
|
12200
12289
|
* ```js
|
|
12201
12290
|
* const embed = new SpotterEmbed('#tsEmbed', {
|
package/lib/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-intercept.d.ts","sourceRoot":"","sources":["../../src/api-intercept.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,cAAc,EAAE,iBAAiB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"api-intercept.d.ts","sourceRoot":"","sources":["../../src/api-intercept.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAkF,MAAM,SAAS,CAAC;AAwC5K;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,eAAgB,cAAc,KAAG,SAAS,KAAK,iBAAiB,EAAE,sCAAsC,CAAC,CAgBzI,CAAA;AA6CD;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;eAClB,GAAG;8BACY,UAAU,QAAQ,GAAG,KAAK,IAAI;gBAC5C,cAAc;iCACG;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,QAAQ;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;mBA6CnG,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,YAAa,GAAG,QAQvD,CAAA;AAED,eAAO,MAAM,8BAA8B,YAAa,GAAG;;;;;;;;;;;;;;CAuB1D,CAAA"}
|
package/lib/src/api-intercept.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getThoughtSpotHost } from "./config";
|
|
2
2
|
import { getEmbedConfig } from "./embed/embedConfig";
|
|
3
3
|
import { ERROR_MESSAGE } from "./errors";
|
|
4
|
-
import { InterceptedApiType, EmbedEvent, EmbedErrorCodes, ErrorDetailsTypes } from "./types";
|
|
4
|
+
import { InterceptedApiType, EmbedEvent, EmbedErrorCodes, ErrorDetailsTypes, EmbedErrorSeverity } from "./types";
|
|
5
5
|
import { embedEventStatus } from "./utils";
|
|
6
6
|
import { logger } from "./utils/logger";
|
|
7
7
|
const DefaultInterceptUrlsMap = {
|
|
@@ -113,6 +113,7 @@ export const handleInterceptEvent = async (params) => {
|
|
|
113
113
|
errorType: ErrorDetailsTypes.API,
|
|
114
114
|
message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
115
115
|
code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
|
|
116
|
+
severity: EmbedErrorSeverity.SEV3,
|
|
116
117
|
error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
|
|
117
118
|
};
|
|
118
119
|
executeEvent(EmbedEvent.Error, errorDetails);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-intercept.js","sourceRoot":"","sources":["../../src/api-intercept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAqC,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAA0B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"api-intercept.js","sourceRoot":"","sources":["../../src/api-intercept.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAqC,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAA0B,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC5K,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,MAAM,uBAAuB,GAA0E;IACnG,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE;QAC7B,6BAA6B;QAC7B,qCAAqC;QACrC,6BAA6B;KACpB;IACb,CAAC,kBAAkB,CAAC,aAAa,CAAC,EAAE;QAChC,4BAA4B;KACnB;CAChB,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,MAAM,IAAI,GAAG,kBAAkB,CAAC,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,IAAI,GAAG,GAAG,EAAE,CAAC;IAChD,OAAO,GAAG,CAAC;AACf,CAAC,CAAA;AAKD;;;;;GAK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I,EAAE;gBACF,MAAM,EAAE;oBACJ;wBACI,KAAK,EAAE,SAAS;wBAChB,WAAW,EAAE,gBAAgB;wBAC7B,WAAW,EAAE,IAAI;qBACpB;iBACJ;gBACD,IAAI,EAAE,EAAE;aACX;SACJ;KACJ,CAAC;IAGF,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;AACnC,CAAC,CAAA"}
|
|
@@ -441,7 +441,7 @@ export interface CustomCssVariables {
|
|
|
441
441
|
* Left and right margin of the header and the tab/filter section of an
|
|
442
442
|
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
443
443
|
* keep the header aligned with a custom tile-grid gutter.
|
|
444
|
-
* @version SDK: 1.
|
|
444
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
445
445
|
*/
|
|
446
446
|
'--ts-var-liveboard-header-horizontal-margin'?: string;
|
|
447
447
|
/**
|
|
@@ -221,7 +221,7 @@ export interface SpotterShareConversationConfig {
|
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
223
|
* A single starter prompt question shown under a category pill.
|
|
224
|
-
* @version SDK: 1.
|
|
224
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
225
225
|
* @group Embed components
|
|
226
226
|
*/
|
|
227
227
|
export interface StarterPromptQuestion {
|
|
@@ -239,7 +239,7 @@ export interface StarterPromptQuestion {
|
|
|
239
239
|
/**
|
|
240
240
|
* Configuration for a starter prompt category with questions
|
|
241
241
|
* (`quick` and `research`).
|
|
242
|
-
* @version SDK: 1.
|
|
242
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
243
243
|
* @group Embed components
|
|
244
244
|
*/
|
|
245
245
|
export interface StarterPromptCategory {
|
|
@@ -257,7 +257,7 @@ export interface StarterPromptCategory {
|
|
|
257
257
|
/**
|
|
258
258
|
* Configuration for the Data Literacy starter prompt category.
|
|
259
259
|
* Only the label is customizable; the prompt text comes from the backend.
|
|
260
|
-
* @version SDK: 1.
|
|
260
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
261
261
|
* @group Embed components
|
|
262
262
|
*/
|
|
263
263
|
export interface StarterPreviewDataCategory {
|
|
@@ -275,7 +275,7 @@ export interface StarterPreviewDataCategory {
|
|
|
275
275
|
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
276
276
|
* the Liveboard SpotterViz surface are configured separately through
|
|
277
277
|
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
278
|
-
* @version SDK: 1.
|
|
278
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
279
279
|
* @group Embed components
|
|
280
280
|
*/
|
|
281
281
|
export interface StarterPromptsConfig {
|
|
@@ -355,7 +355,7 @@ export interface SpotterChatViewConfig {
|
|
|
355
355
|
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
356
356
|
*
|
|
357
357
|
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
358
|
-
* @version SDK: 1.
|
|
358
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
359
359
|
* @example
|
|
360
360
|
* ```js
|
|
361
361
|
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveboard.d.ts","sourceRoot":"","sources":["../../../src/embed/liveboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAKH,WAAW,EACX,SAAS,EACT,+BAA+B,IAAI,wBAAwB,EAC3D,cAAc,EACd,2BAA2B,
|
|
1
|
+
{"version":3,"file":"liveboard.d.ts","sourceRoot":"","sources":["../../../src/embed/liveboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAKH,WAAW,EACX,SAAS,EACT,+BAA+B,IAAI,wBAAwB,EAC3D,cAAc,EACd,2BAA2B,EAI3B,WAAW,E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CAAC,sBAAsB,IAAI,IAAI;cAsBxB,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC;IAO5D;;;;;OAKG;IACI,OAAO,CACV,UAAU,SAAS,SAAS,EAG5B,QAAQ,GAAG,gBAAgB,CAAC,UAAU,CAAC,EACvC,QAAQ,SAAS,WAAW,GAAG,WAAW,EAE1C,WAAW,EAAE,UAAU,EACvB,IAAI,GAAE,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAe,EACxD,OAAO,CAAC,EAAE,QAAQ,GACnB,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IAW3D;;;OAGG;IACI,OAAO;IAKd,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,sBAAsB;IA6B9B,OAAO,CAAC,wBAAwB;IAahC;;;;OAIG;IACU,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC;IAWvC,mBAAmB,CACtB,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,EACpB,kBAAkB,CAAC,EAAE,MAAM;IAgB/B;;;;OAIG;IACI,eAAe,IAAI,MAAM;CAgBnC;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,cAAc;CAAI"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { getPreview } from '../utils/graphql/preview-service';
|
|
11
11
|
import { ERROR_MESSAGE } from '../errors';
|
|
12
|
-
import { EmbedEvent, Param, HostEvent, ErrorDetailsTypes, EmbedErrorCodes, } from '../types';
|
|
12
|
+
import { EmbedEvent, Param, HostEvent, ErrorDetailsTypes, EmbedErrorCodes, EmbedErrorSeverity, } from '../types';
|
|
13
13
|
import { calculateVisibleElementData, getEffectiveClippingAncestors, getQueryParamString, getScrollableAncestors, isUndefined, isValidCssMargin, setParamIfDefined } from '../utils';
|
|
14
14
|
import { DEFAULT_LAZY_LOADING_MARGIN } from '../config';
|
|
15
15
|
import { V1Embed } from './ts-embed';
|
|
@@ -334,6 +334,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
334
334
|
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
335
335
|
message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
336
336
|
code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
|
|
337
|
+
severity: EmbedErrorSeverity.SEV1,
|
|
337
338
|
error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
|
|
338
339
|
});
|
|
339
340
|
}
|
|
@@ -485,7 +486,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
485
486
|
if (this.isRendered) {
|
|
486
487
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
487
488
|
}
|
|
488
|
-
else if (this.getPreRenderConfig().
|
|
489
|
+
else if (this.getPreRenderConfig().id) {
|
|
489
490
|
this.preRender(true);
|
|
490
491
|
}
|
|
491
492
|
else {
|