@thoughtspot/visual-embed-sdk 1.53.0 → 1.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/contracts/contracts.spec.js +4 -0
- package/cjs/src/contracts/contracts.spec.js.map +1 -1
- package/cjs/src/contracts/host-event-contracts.d.ts +10 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +14 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +22 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +32 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -16
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +29 -10
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +97 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +1 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +7 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +19 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +21 -16
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +77 -63
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +240 -7
- 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.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.map +1 -1
- package/cjs/src/types.d.ts +69 -2
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +67 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/runtimeTelemetry.d.ts +11 -0
- package/cjs/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.js +34 -0
- package/cjs/src/utils/runtimeTelemetry.js.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/cjs/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/cjs/src/utils/runtimeTelemetry.spec.js +124 -0
- package/cjs/src/utils/runtimeTelemetry.spec.js.map +1 -0
- package/dist/{index-CyDR8j_0.js → index-CrBnZBZv.js} +1 -1
- package/dist/src/contracts/host-event-contracts.d.ts +10 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +14 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -16
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +1 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +21 -16
- package/dist/src/embed/ts-embed.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/types.d.ts +69 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/runtimeTelemetry.d.ts +11 -0
- package/dist/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/dist/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/dist/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +247 -78
- package/dist/tsembed-react.js +246 -77
- package/dist/tsembed.es.js +247 -78
- package/dist/tsembed.js +246 -77
- package/dist/visual-embed-sdk-react-full.d.ts +116 -18
- package/dist/visual-embed-sdk-react.d.ts +116 -18
- package/dist/visual-embed-sdk.d.ts +116 -33
- package/lib/package.json +1 -1
- package/lib/src/contracts/contracts.spec.js +4 -0
- package/lib/src/contracts/contracts.spec.js.map +1 -1
- package/lib/src/contracts/host-event-contracts.d.ts +10 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +14 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +22 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +32 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -16
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +28 -10
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +97 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +1 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +7 -1
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +19 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +21 -16
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +78 -64
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +240 -7
- 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.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.map +1 -1
- package/lib/src/types.d.ts +69 -2
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +67 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/runtimeTelemetry.d.ts +11 -0
- package/lib/src/utils/runtimeTelemetry.d.ts.map +1 -0
- package/lib/src/utils/runtimeTelemetry.js +28 -0
- package/lib/src/utils/runtimeTelemetry.js.map +1 -0
- package/lib/src/utils/runtimeTelemetry.spec.d.ts +2 -0
- package/lib/src/utils/runtimeTelemetry.spec.d.ts.map +1 -0
- package/lib/src/utils/runtimeTelemetry.spec.js +122 -0
- package/lib/src/utils/runtimeTelemetry.spec.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +116 -33
- package/package.json +1 -1
- package/src/contracts/contracts.spec.ts +4 -0
- package/src/contracts/host-event-contracts.ts +13 -0
- package/src/embed/app.ts +1 -0
- package/src/embed/conversation.spec.ts +24 -0
- package/src/embed/conversation.ts +14 -0
- package/src/embed/host-events.spec.ts +44 -0
- package/src/embed/liveboard.spec.ts +111 -0
- package/src/embed/liveboard.ts +34 -10
- package/src/embed/spotter-utils.spec.ts +20 -0
- package/src/embed/spotter-utils.ts +12 -1
- package/src/embed/ts-embed.spec.ts +297 -8
- package/src/embed/ts-embed.ts +79 -64
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +68 -0
- package/src/utils/runtimeTelemetry.spec.ts +148 -0
- package/src/utils/runtimeTelemetry.ts +50 -0
|
@@ -7198,6 +7198,17 @@ export declare enum HostEvent {
|
|
|
7198
7198
|
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
7199
7199
|
*/
|
|
7200
7200
|
EditVisualization = "editVisualization",
|
|
7201
|
+
/**
|
|
7202
|
+
* Exits Liveboard edit mode , equivalent to clicking the
|
|
7203
|
+
* *Cancel* button in the Liveboard edit header. The Liveboard returns to
|
|
7204
|
+
* view mode and the embedded app emits the {@link EmbedEvent.Cancel} event.
|
|
7205
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
7206
|
+
* @example
|
|
7207
|
+
* ```js
|
|
7208
|
+
* liveboardEmbed.trigger(HostEvent.ExitEditMode);
|
|
7209
|
+
* ```
|
|
7210
|
+
*/
|
|
7211
|
+
ExitEditMode = "exitEditMode",
|
|
7201
7212
|
/**
|
|
7202
7213
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
7203
7214
|
* Payload: {@link VizScopedRequest}.
|
|
@@ -8731,7 +8742,40 @@ export declare enum HostEvent {
|
|
|
8731
8742
|
* ```
|
|
8732
8743
|
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
8733
8744
|
*/
|
|
8734
|
-
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
8745
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache",
|
|
8746
|
+
/**
|
|
8747
|
+
* Switch the embed between dark appearance and its default appearance
|
|
8748
|
+
* while it is open, without reloading it.
|
|
8749
|
+
* Payload: {@link UpdateThemeRequest}.
|
|
8750
|
+
*
|
|
8751
|
+
* Use it to keep the embed in step with a theme switch in your
|
|
8752
|
+
* application; the appearance the embed loads with is set by `isDarkMode`.
|
|
8753
|
+
* The event resolves with the applied value, such as `{ isDarkMode: true }`.
|
|
8754
|
+
* When dark appearance is not available in the embed, the embed does not
|
|
8755
|
+
* change and the event rejects with an error message instead.
|
|
8756
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
8757
|
+
* @param - `isDarkMode` - `true` for dark appearance, `false` for the
|
|
8758
|
+
* default appearance.
|
|
8759
|
+
* @example
|
|
8760
|
+
* ```js
|
|
8761
|
+
* appEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: true });
|
|
8762
|
+
* ```
|
|
8763
|
+
* @example
|
|
8764
|
+
* ```js
|
|
8765
|
+
* // Follow a theme switch in your application
|
|
8766
|
+
* const themeSwitch = document.querySelector('#theme-switch');
|
|
8767
|
+
* themeSwitch.addEventListener('change', async (event) => {
|
|
8768
|
+
* try {
|
|
8769
|
+
* await appEmbed.trigger(HostEvent.UpdateTheme, {
|
|
8770
|
+
* isDarkMode: event.target.checked,
|
|
8771
|
+
* });
|
|
8772
|
+
* } catch (error) {
|
|
8773
|
+
* console.warn(error);
|
|
8774
|
+
* }
|
|
8775
|
+
* });
|
|
8776
|
+
* ```
|
|
8777
|
+
*/
|
|
8778
|
+
UpdateTheme = "UpdateTheme"
|
|
8735
8779
|
}
|
|
8736
8780
|
/**
|
|
8737
8781
|
* The different visual modes that the data sources panel within
|
|
@@ -11019,7 +11063,30 @@ export declare enum Action {
|
|
|
11019
11063
|
* }
|
|
11020
11064
|
* ```
|
|
11021
11065
|
*/
|
|
11022
|
-
CustomizeHomepage = "customizeHomepage"
|
|
11066
|
+
CustomizeHomepage = "customizeHomepage",
|
|
11067
|
+
/**
|
|
11068
|
+
* Controls the visibility and disabled state of the *Cancel* button in the
|
|
11069
|
+
* Liveboard edit header, the button that discards the changes made in edit
|
|
11070
|
+
* mode and returns the Liveboard to view mode. The button is shown only
|
|
11071
|
+
* while the Liveboard is in edit mode.
|
|
11072
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
11073
|
+
* @example
|
|
11074
|
+
* ```js
|
|
11075
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
11076
|
+
* ... // other embed view config
|
|
11077
|
+
* hiddenActions: [Action.Cancel],
|
|
11078
|
+
* });
|
|
11079
|
+
* ```
|
|
11080
|
+
* @example
|
|
11081
|
+
* ```js
|
|
11082
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
11083
|
+
* ... // other embed view config
|
|
11084
|
+
* disabledActions: [Action.Cancel],
|
|
11085
|
+
* disabledActionReason: 'Save your changes to leave edit mode',
|
|
11086
|
+
* });
|
|
11087
|
+
* ```
|
|
11088
|
+
*/
|
|
11089
|
+
Cancel = "cancel"
|
|
11023
11090
|
}
|
|
11024
11091
|
export declare enum PrefetchFeatures {
|
|
11025
11092
|
FullApp = "FullApp",
|
|
@@ -12542,6 +12609,15 @@ export interface SetActiveTabRequest {
|
|
|
12542
12609
|
*/
|
|
12543
12610
|
tabId: string;
|
|
12544
12611
|
}
|
|
12612
|
+
/**
|
|
12613
|
+
* Request payload for {@link HostEvent.UpdateTheme}.
|
|
12614
|
+
*/
|
|
12615
|
+
export interface UpdateThemeRequest {
|
|
12616
|
+
/**
|
|
12617
|
+
* `true` for dark appearance, `false` for the default appearance.
|
|
12618
|
+
*/
|
|
12619
|
+
isDarkMode: boolean;
|
|
12620
|
+
}
|
|
12545
12621
|
/**
|
|
12546
12622
|
* Typed request payloads for host events that do not go through the UI
|
|
12547
12623
|
* passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
|
|
@@ -12632,6 +12708,7 @@ export interface HostEventRequestMap {
|
|
|
12632
12708
|
[HostEvent.InitSpotterVizConversation]: void;
|
|
12633
12709
|
[HostEvent.OpenSpotterVizPanel]: void;
|
|
12634
12710
|
[HostEvent.CloseSpotterVizPanel]: void;
|
|
12711
|
+
[HostEvent.UpdateTheme]: UpdateThemeRequest;
|
|
12635
12712
|
}
|
|
12636
12713
|
/**
|
|
12637
12714
|
* Per-context request shapes for events whose payload varies by
|
|
@@ -12824,7 +12901,7 @@ declare class TsEmbed {
|
|
|
12824
12901
|
private defaultHiddenActions;
|
|
12825
12902
|
private resizeObserver;
|
|
12826
12903
|
private preRenderContainerEl;
|
|
12827
|
-
|
|
12904
|
+
/** Last height the embedded app reported, once fullHeight has measured one. */
|
|
12828
12905
|
protected hostEventClient: HostEventClient;
|
|
12829
12906
|
protected isReadyForRenderPromise: Promise<void>;
|
|
12830
12907
|
protected shouldWaitForRenderPromise: boolean;
|
|
@@ -13004,12 +13081,6 @@ declare class TsEmbed {
|
|
|
13004
13081
|
isThisPeriodInDateFiltersEnabled?: boolean;
|
|
13005
13082
|
hideLiveboardHeader?: boolean;
|
|
13006
13083
|
showLiveboardTitle?: boolean;
|
|
13007
|
-
/**
|
|
13008
|
-
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
13009
|
-
* host app URL.
|
|
13010
|
-
* THOUGHTSPOT URL params starts with a prefix "ts-"
|
|
13011
|
-
* @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
13012
|
-
*/
|
|
13013
13084
|
showLiveboardDescription?: boolean;
|
|
13014
13085
|
isLiveboardHeaderSticky?: boolean;
|
|
13015
13086
|
enable2ColumnLayout?: boolean;
|
|
@@ -13089,10 +13160,12 @@ declare class TsEmbed {
|
|
|
13089
13160
|
*/
|
|
13090
13161
|
private createPreRenderPlaceholder;
|
|
13091
13162
|
/**
|
|
13092
|
-
* Resolves the configured preRenderContainer
|
|
13093
|
-
*
|
|
13094
|
-
*
|
|
13095
|
-
*
|
|
13163
|
+
* Resolves the configured preRenderContainer, or defaults to the host's
|
|
13164
|
+
* nearest scrolling ancestor (document.body if none). The absolutely
|
|
13165
|
+
* positioned wrapper only follows the page while it sits inside what
|
|
13166
|
+
* scrolls, so body is right only when the document itself scrolls — an inner
|
|
13167
|
+
* scroller left the frame pinned to the viewport (SCAL-338563). A string
|
|
13168
|
+
* selector is re-queried each call so a remounted container resolves fresh.
|
|
13096
13169
|
*/
|
|
13097
13170
|
private resolvePreRenderContainerTarget;
|
|
13098
13171
|
private inheritPreRenderContainer;
|
|
@@ -13109,8 +13182,9 @@ declare class TsEmbed {
|
|
|
13109
13182
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
13110
13183
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
13111
13184
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
13112
|
-
* reference and collapse the wrapper.
|
|
13113
|
-
* re-resolved; a container passed as an element
|
|
13185
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
13186
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
13187
|
+
* is left untouched, as there is nothing to re-query.
|
|
13114
13188
|
*/
|
|
13115
13189
|
private reconcilePreRenderContainer;
|
|
13116
13190
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
@@ -13326,9 +13400,17 @@ declare class TsEmbed {
|
|
|
13326
13400
|
*/
|
|
13327
13401
|
private restorePreRenderContainerPosition;
|
|
13328
13402
|
/**
|
|
13329
|
-
*
|
|
13403
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
13404
|
+
*
|
|
13405
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
13406
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
13407
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
13408
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
13409
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
13410
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
13411
|
+
* wrapper has to be told.
|
|
13330
13412
|
*/
|
|
13331
|
-
private
|
|
13413
|
+
private observePreRenderSize;
|
|
13332
13414
|
/**
|
|
13333
13415
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
13334
13416
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
@@ -14046,6 +14128,19 @@ export interface SpotterSidebarViewConfig {
|
|
|
14046
14128
|
* @default Analysts
|
|
14047
14129
|
*/
|
|
14048
14130
|
spotterAnalystsLabel?: string;
|
|
14131
|
+
/**
|
|
14132
|
+
* Shows the connector marketplace option in the settings menu of the
|
|
14133
|
+
* Spotter sidebar footer. When not set, the cluster setting applies.
|
|
14134
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
14135
|
+
*/
|
|
14136
|
+
enableConnectorMarketplace?: boolean;
|
|
14137
|
+
/**
|
|
14138
|
+
* Shows the Spotter instructions and more settings options in the
|
|
14139
|
+
* settings menu of the Spotter sidebar footer.
|
|
14140
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
14141
|
+
* @default false
|
|
14142
|
+
*/
|
|
14143
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
14049
14144
|
}
|
|
14050
14145
|
/**
|
|
14051
14146
|
* Configuration for the Spotter conversation sharing feature.
|
|
@@ -14706,6 +14801,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
|
|
|
14706
14801
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
14707
14802
|
starterPrompts?: StarterPromptsConfig;
|
|
14708
14803
|
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
14804
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
14709
14805
|
};
|
|
14710
14806
|
}
|
|
14711
14807
|
declare class SpotterEmbed extends TsEmbed {
|
|
@@ -15771,6 +15867,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
15771
15867
|
spotterVizConfig?: SpotterVizConfig;
|
|
15772
15868
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
15773
15869
|
starterPrompts?: StarterPromptsConfig;
|
|
15870
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
15774
15871
|
};
|
|
15775
15872
|
}
|
|
15776
15873
|
declare class AppEmbed extends V1Embed {
|
|
@@ -16455,7 +16552,8 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
16455
16552
|
personalizedViewId: string;
|
|
16456
16553
|
};
|
|
16457
16554
|
protected beforePrerenderVisible(): void;
|
|
16458
|
-
private
|
|
16555
|
+
private isSameEmbedConfig;
|
|
16556
|
+
private isAlreadyOnSameRoute;
|
|
16459
16557
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
16460
16558
|
/**
|
|
16461
16559
|
* Triggers an event to the embedded app
|
|
@@ -7212,6 +7212,17 @@ export declare enum HostEvent {
|
|
|
7212
7212
|
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
7213
7213
|
*/
|
|
7214
7214
|
EditVisualization = "editVisualization",
|
|
7215
|
+
/**
|
|
7216
|
+
* Exits Liveboard edit mode , equivalent to clicking the
|
|
7217
|
+
* *Cancel* button in the Liveboard edit header. The Liveboard returns to
|
|
7218
|
+
* view mode and the embedded app emits the {@link EmbedEvent.Cancel} event.
|
|
7219
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
7220
|
+
* @example
|
|
7221
|
+
* ```js
|
|
7222
|
+
* liveboardEmbed.trigger(HostEvent.ExitEditMode);
|
|
7223
|
+
* ```
|
|
7224
|
+
*/
|
|
7225
|
+
ExitEditMode = "exitEditMode",
|
|
7215
7226
|
/**
|
|
7216
7227
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
7217
7228
|
* Payload: {@link VizScopedRequest}.
|
|
@@ -8745,7 +8756,40 @@ export declare enum HostEvent {
|
|
|
8745
8756
|
* ```
|
|
8746
8757
|
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
8747
8758
|
*/
|
|
8748
|
-
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
|
|
8759
|
+
RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache",
|
|
8760
|
+
/**
|
|
8761
|
+
* Switch the embed between dark appearance and its default appearance
|
|
8762
|
+
* while it is open, without reloading it.
|
|
8763
|
+
* Payload: {@link UpdateThemeRequest}.
|
|
8764
|
+
*
|
|
8765
|
+
* Use it to keep the embed in step with a theme switch in your
|
|
8766
|
+
* application; the appearance the embed loads with is set by `isDarkMode`.
|
|
8767
|
+
* The event resolves with the applied value, such as `{ isDarkMode: true }`.
|
|
8768
|
+
* When dark appearance is not available in the embed, the embed does not
|
|
8769
|
+
* change and the event rejects with an error message instead.
|
|
8770
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
8771
|
+
* @param - `isDarkMode` - `true` for dark appearance, `false` for the
|
|
8772
|
+
* default appearance.
|
|
8773
|
+
* @example
|
|
8774
|
+
* ```js
|
|
8775
|
+
* appEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: true });
|
|
8776
|
+
* ```
|
|
8777
|
+
* @example
|
|
8778
|
+
* ```js
|
|
8779
|
+
* // Follow a theme switch in your application
|
|
8780
|
+
* const themeSwitch = document.querySelector('#theme-switch');
|
|
8781
|
+
* themeSwitch.addEventListener('change', async (event) => {
|
|
8782
|
+
* try {
|
|
8783
|
+
* await appEmbed.trigger(HostEvent.UpdateTheme, {
|
|
8784
|
+
* isDarkMode: event.target.checked,
|
|
8785
|
+
* });
|
|
8786
|
+
* } catch (error) {
|
|
8787
|
+
* console.warn(error);
|
|
8788
|
+
* }
|
|
8789
|
+
* });
|
|
8790
|
+
* ```
|
|
8791
|
+
*/
|
|
8792
|
+
UpdateTheme = "UpdateTheme"
|
|
8749
8793
|
}
|
|
8750
8794
|
/**
|
|
8751
8795
|
* Configuration for allowed file types in Spotter file upload.
|
|
@@ -11015,7 +11059,30 @@ export declare enum Action {
|
|
|
11015
11059
|
* }
|
|
11016
11060
|
* ```
|
|
11017
11061
|
*/
|
|
11018
|
-
CustomizeHomepage = "customizeHomepage"
|
|
11062
|
+
CustomizeHomepage = "customizeHomepage",
|
|
11063
|
+
/**
|
|
11064
|
+
* Controls the visibility and disabled state of the *Cancel* button in the
|
|
11065
|
+
* Liveboard edit header, the button that discards the changes made in edit
|
|
11066
|
+
* mode and returns the Liveboard to view mode. The button is shown only
|
|
11067
|
+
* while the Liveboard is in edit mode.
|
|
11068
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
11069
|
+
* @example
|
|
11070
|
+
* ```js
|
|
11071
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
11072
|
+
* ... // other embed view config
|
|
11073
|
+
* hiddenActions: [Action.Cancel],
|
|
11074
|
+
* });
|
|
11075
|
+
* ```
|
|
11076
|
+
* @example
|
|
11077
|
+
* ```js
|
|
11078
|
+
* const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
|
|
11079
|
+
* ... // other embed view config
|
|
11080
|
+
* disabledActions: [Action.Cancel],
|
|
11081
|
+
* disabledActionReason: 'Save your changes to leave edit mode',
|
|
11082
|
+
* });
|
|
11083
|
+
* ```
|
|
11084
|
+
*/
|
|
11085
|
+
Cancel = "cancel"
|
|
11019
11086
|
}
|
|
11020
11087
|
declare enum ContextMenuTriggerOptions {
|
|
11021
11088
|
LEFT_CLICK = "left-click",
|
|
@@ -12443,6 +12510,15 @@ export interface SetActiveTabRequest {
|
|
|
12443
12510
|
*/
|
|
12444
12511
|
tabId: string;
|
|
12445
12512
|
}
|
|
12513
|
+
/**
|
|
12514
|
+
* Request payload for {@link HostEvent.UpdateTheme}.
|
|
12515
|
+
*/
|
|
12516
|
+
export interface UpdateThemeRequest {
|
|
12517
|
+
/**
|
|
12518
|
+
* `true` for dark appearance, `false` for the default appearance.
|
|
12519
|
+
*/
|
|
12520
|
+
isDarkMode: boolean;
|
|
12521
|
+
}
|
|
12446
12522
|
/**
|
|
12447
12523
|
* Typed request payloads for host events that do not go through the UI
|
|
12448
12524
|
* passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
|
|
@@ -12533,6 +12609,7 @@ export interface HostEventRequestMap {
|
|
|
12533
12609
|
[HostEvent.InitSpotterVizConversation]: void;
|
|
12534
12610
|
[HostEvent.OpenSpotterVizPanel]: void;
|
|
12535
12611
|
[HostEvent.CloseSpotterVizPanel]: void;
|
|
12612
|
+
[HostEvent.UpdateTheme]: UpdateThemeRequest;
|
|
12536
12613
|
}
|
|
12537
12614
|
/**
|
|
12538
12615
|
* Per-context request shapes for events whose payload varies by
|
|
@@ -12725,7 +12802,7 @@ declare class TsEmbed {
|
|
|
12725
12802
|
private defaultHiddenActions;
|
|
12726
12803
|
private resizeObserver;
|
|
12727
12804
|
private preRenderContainerEl;
|
|
12728
|
-
|
|
12805
|
+
/** Last height the embedded app reported, once fullHeight has measured one. */
|
|
12729
12806
|
protected hostEventClient: HostEventClient;
|
|
12730
12807
|
protected isReadyForRenderPromise: Promise<void>;
|
|
12731
12808
|
protected shouldWaitForRenderPromise: boolean;
|
|
@@ -12905,12 +12982,6 @@ declare class TsEmbed {
|
|
|
12905
12982
|
isThisPeriodInDateFiltersEnabled?: boolean;
|
|
12906
12983
|
hideLiveboardHeader?: boolean;
|
|
12907
12984
|
showLiveboardTitle?: boolean;
|
|
12908
|
-
/**
|
|
12909
|
-
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
12910
|
-
* host app URL.
|
|
12911
|
-
* THOUGHTSPOT URL params starts with a prefix "ts-"
|
|
12912
|
-
* @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
12913
|
-
*/
|
|
12914
12985
|
showLiveboardDescription?: boolean;
|
|
12915
12986
|
isLiveboardHeaderSticky?: boolean;
|
|
12916
12987
|
enable2ColumnLayout?: boolean;
|
|
@@ -12990,10 +13061,12 @@ declare class TsEmbed {
|
|
|
12990
13061
|
*/
|
|
12991
13062
|
private createPreRenderPlaceholder;
|
|
12992
13063
|
/**
|
|
12993
|
-
* Resolves the configured preRenderContainer
|
|
12994
|
-
*
|
|
12995
|
-
*
|
|
12996
|
-
*
|
|
13064
|
+
* Resolves the configured preRenderContainer, or defaults to the host's
|
|
13065
|
+
* nearest scrolling ancestor (document.body if none). The absolutely
|
|
13066
|
+
* positioned wrapper only follows the page while it sits inside what
|
|
13067
|
+
* scrolls, so body is right only when the document itself scrolls — an inner
|
|
13068
|
+
* scroller left the frame pinned to the viewport (SCAL-338563). A string
|
|
13069
|
+
* selector is re-queried each call so a remounted container resolves fresh.
|
|
12997
13070
|
*/
|
|
12998
13071
|
private resolvePreRenderContainerTarget;
|
|
12999
13072
|
private inheritPreRenderContainer;
|
|
@@ -13010,8 +13083,9 @@ declare class TsEmbed {
|
|
|
13010
13083
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
13011
13084
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
13012
13085
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
13013
|
-
* reference and collapse the wrapper.
|
|
13014
|
-
* re-resolved; a container passed as an element
|
|
13086
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
13087
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
13088
|
+
* is left untouched, as there is nothing to re-query.
|
|
13015
13089
|
*/
|
|
13016
13090
|
private reconcilePreRenderContainer;
|
|
13017
13091
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
@@ -13227,9 +13301,17 @@ declare class TsEmbed {
|
|
|
13227
13301
|
*/
|
|
13228
13302
|
private restorePreRenderContainerPosition;
|
|
13229
13303
|
/**
|
|
13230
|
-
*
|
|
13304
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
13305
|
+
*
|
|
13306
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
13307
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
13308
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
13309
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
13310
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
13311
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
13312
|
+
* wrapper has to be told.
|
|
13231
13313
|
*/
|
|
13232
|
-
private
|
|
13314
|
+
private observePreRenderSize;
|
|
13233
13315
|
/**
|
|
13234
13316
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
13235
13317
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
@@ -13942,6 +14024,19 @@ export interface SpotterSidebarViewConfig {
|
|
|
13942
14024
|
* @default Analysts
|
|
13943
14025
|
*/
|
|
13944
14026
|
spotterAnalystsLabel?: string;
|
|
14027
|
+
/**
|
|
14028
|
+
* Shows the connector marketplace option in the settings menu of the
|
|
14029
|
+
* Spotter sidebar footer. When not set, the cluster setting applies.
|
|
14030
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
14031
|
+
*/
|
|
14032
|
+
enableConnectorMarketplace?: boolean;
|
|
14033
|
+
/**
|
|
14034
|
+
* Shows the Spotter instructions and more settings options in the
|
|
14035
|
+
* settings menu of the Spotter sidebar footer.
|
|
14036
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
14037
|
+
* @default false
|
|
14038
|
+
*/
|
|
14039
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
13945
14040
|
}
|
|
13946
14041
|
/**
|
|
13947
14042
|
* Configuration for the Spotter conversation sharing feature.
|
|
@@ -14602,6 +14697,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
|
|
|
14602
14697
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
14603
14698
|
starterPrompts?: StarterPromptsConfig;
|
|
14604
14699
|
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
14700
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
14605
14701
|
};
|
|
14606
14702
|
}
|
|
14607
14703
|
declare class SpotterEmbed extends TsEmbed {
|
|
@@ -15663,6 +15759,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
15663
15759
|
spotterVizConfig?: SpotterVizConfig;
|
|
15664
15760
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
15665
15761
|
starterPrompts?: StarterPromptsConfig;
|
|
15762
|
+
enableSpotterInstructionAndMoreSettings?: boolean;
|
|
15666
15763
|
};
|
|
15667
15764
|
}
|
|
15668
15765
|
declare class AppEmbed extends V1Embed {
|
|
@@ -16347,7 +16444,8 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
16347
16444
|
personalizedViewId: string;
|
|
16348
16445
|
};
|
|
16349
16446
|
protected beforePrerenderVisible(): void;
|
|
16350
|
-
private
|
|
16447
|
+
private isSameEmbedConfig;
|
|
16448
|
+
private isAlreadyOnSameRoute;
|
|
16351
16449
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
16352
16450
|
/**
|
|
16353
16451
|
* Triggers an event to the embedded app
|