@thoughtspot/visual-embed-sdk 1.52.2-beta → 1.52.2-beta.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 +2 -2
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +1 -1
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +0 -20
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +34 -12
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +98 -142
- 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 +171 -138
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/dist/{index-CcBYlGo9.js → index-BrJMbt8r.js} +1 -1
- package/dist/src/embed/ts-embed.d.ts +34 -12
- 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/tsembed-react.es.js +108 -152
- package/dist/tsembed-react.js +107 -151
- package/dist/tsembed.es.js +109 -153
- package/dist/tsembed.js +108 -152
- package/dist/visual-embed-sdk-react-full.d.ts +34 -12
- package/dist/visual-embed-sdk-react.d.ts +34 -12
- package/dist/visual-embed-sdk.d.ts +34 -12
- package/lib/package.json +2 -2
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +1 -1
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +0 -20
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +34 -12
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +99 -143
- 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 +172 -139
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +34 -12
- package/package.json +2 -2
- package/src/embed/app.ts +1 -1
- package/src/embed/auto-frame-renderer.ts +1 -1
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/conversation.ts +1 -1
- package/src/embed/liveboard.ts +1 -1
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/search.spec.ts +0 -23
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +213 -179
- package/src/embed/ts-embed.ts +96 -149
|
@@ -87,7 +87,7 @@ export declare class TsEmbed {
|
|
|
87
87
|
private defaultHiddenActions;
|
|
88
88
|
private resizeObserver;
|
|
89
89
|
private preRenderContainerEl;
|
|
90
|
-
|
|
90
|
+
/** Last height the embedded app reported, once fullHeight has measured one. */
|
|
91
91
|
protected hostEventClient: HostEventClient;
|
|
92
92
|
protected isReadyForRenderPromise: Promise<void>;
|
|
93
93
|
protected shouldWaitForRenderPromise: boolean;
|
|
@@ -302,7 +302,6 @@ export declare class TsEmbed {
|
|
|
302
302
|
protected getV1EmbedBasePath(queryString: string): string;
|
|
303
303
|
protected getEmbedParams(): string;
|
|
304
304
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
305
|
-
protected getUrlQueryParamsObject(): Record<any, any>;
|
|
306
305
|
protected getRootIframeSrc(): string;
|
|
307
306
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
308
307
|
/**
|
|
@@ -344,10 +343,26 @@ export declare class TsEmbed {
|
|
|
344
343
|
*/
|
|
345
344
|
private createPreRenderPlaceholder;
|
|
346
345
|
/**
|
|
347
|
-
* Resolves the configured preRenderContainer to a live element
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
346
|
+
* Resolves the configured preRenderContainer to a live element. A string
|
|
347
|
+
* selector is re-queried on every call so a remounted container (E.g.: React
|
|
348
|
+
* replacing the node) resolves to the fresh element; an element passed
|
|
349
|
+
* directly cannot be re-resolved.
|
|
350
|
+
*
|
|
351
|
+
* With nothing configured the frame goes into the host element's nearest
|
|
352
|
+
* scrolling ancestor, falling back to `document.body`.
|
|
353
|
+
*
|
|
354
|
+
* The wrapper is absolutely positioned, so it follows the page for free —
|
|
355
|
+
* but only while it sits inside whatever scrolls. `document.body` is right
|
|
356
|
+
* only when the document itself is the scroller; an app that scrolls an
|
|
357
|
+
* inner element instead left the frame pinned to the viewport while the page
|
|
358
|
+
* moved under it (SCAL-338563). Being inside the scroller also lets wheel
|
|
359
|
+
* events chain out of the frame into it, which they cannot do from
|
|
360
|
+
* `document.body`.
|
|
361
|
+
*
|
|
362
|
+
* A scrolling ancestor is layout chrome rather than route content, so it
|
|
363
|
+
* outlives the embed in practice; and if it does go, the host element goes
|
|
364
|
+
* with it and this instance is remounting anyway.
|
|
365
|
+
* `reconcilePreRenderContainer` re-runs this on a detached container.
|
|
351
366
|
*/
|
|
352
367
|
private resolvePreRenderContainerTarget;
|
|
353
368
|
private inheritPreRenderContainer;
|
|
@@ -364,8 +379,9 @@ export declare class TsEmbed {
|
|
|
364
379
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
365
380
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
366
381
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
367
|
-
* reference and collapse the wrapper.
|
|
368
|
-
* re-resolved; a container passed as an element
|
|
382
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
383
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
384
|
+
* is left untouched, as there is nothing to re-query.
|
|
369
385
|
*/
|
|
370
386
|
private reconcilePreRenderContainer;
|
|
371
387
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
@@ -581,9 +597,17 @@ export declare class TsEmbed {
|
|
|
581
597
|
*/
|
|
582
598
|
private restorePreRenderContainerPosition;
|
|
583
599
|
/**
|
|
584
|
-
*
|
|
600
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
601
|
+
*
|
|
602
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
603
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
604
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
605
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
606
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
607
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
608
|
+
* wrapper has to be told.
|
|
585
609
|
*/
|
|
586
|
-
private
|
|
610
|
+
private observePreRenderSize;
|
|
587
611
|
/**
|
|
588
612
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
589
613
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
@@ -599,8 +623,6 @@ export declare class TsEmbed {
|
|
|
599
623
|
*/
|
|
600
624
|
prerenderGeneric(): Promise<any>;
|
|
601
625
|
protected preRenderParamsApplied: Promise<void>;
|
|
602
|
-
protected isConfigExcludedFromUrl(): boolean;
|
|
603
|
-
protected triggerUpdateEmbedParams(): Promise<void>;
|
|
604
626
|
protected beforePrerenderVisible(): void;
|
|
605
627
|
/**
|
|
606
628
|
* Displays the pre-rendered component inside the host element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,eAAe,EAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,eAAe,EAClB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AA6B7E,OAAO,EAEH,WAAW,EACX,SAAS,EACT,UAAU,EACV,eAAe,EACf,MAAM,EAEN,WAAW,EACX,cAAc,EAEd,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,IAAI,UAAU,EAChC,sBAAsB,EAKtB,WAAW,EACX,aAAa,EACb,eAAe,EAElB,MAAM,UAAU,CAAC;AAiBlB,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAQtE;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAA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AS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,KAC9B,IAAI,EACT,OAAO,GAAE,cAAiC,GAC3C,OAAO,OAAO,CAAC,SAAS;IAQ3B;;;OAGG;IAEI,sBAAsB,6EAAyB;CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-embed.spec.d.ts","sourceRoot":"","sources":["ts-embed.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ts-embed.spec.d.ts","sourceRoot":"","sources":["ts-embed.spec.ts"],"names":[],"mappings":"AA0FA,eAAO,MAAM,iCAAiC,QAAgJ,CAAC;AAC/L,eAAO,MAAM,aAAa,QAAmF,CAAC"}
|
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.52.2-beta */
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.52.2-beta.0 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -7828,7 +7828,7 @@ var TableContentDensity;
|
|
|
7828
7828
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7829
7829
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7830
7830
|
|
|
7831
|
-
var version$1="1.52.2-beta";var pkg = {version:version$1};
|
|
7831
|
+
var version$1="1.52.2-beta.0";var pkg = {version:version$1};
|
|
7832
7832
|
|
|
7833
7833
|
const { version } = pkg;
|
|
7834
7834
|
|
|
@@ -10565,7 +10565,7 @@ class AnswerService {
|
|
|
10565
10565
|
async getTML() {
|
|
10566
10566
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
10567
10567
|
const edoc = object[0].edoc;
|
|
10568
|
-
const YAML = await import('./index-
|
|
10568
|
+
const YAML = await import('./index-BrJMbt8r.js');
|
|
10569
10569
|
const parsedDoc = YAML.parse(edoc);
|
|
10570
10570
|
return {
|
|
10571
10571
|
answer: {
|
|
@@ -21867,6 +21867,9 @@ const TS_EMBED_ID = '_thoughtspot-embed';
|
|
|
21867
21867
|
*/
|
|
21868
21868
|
const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
|
|
21869
21869
|
const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
|
|
21870
|
+
const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
|
|
21871
|
+
/** The height createPreRenderWrapper() seeds before anything is measured. */
|
|
21872
|
+
const UNMEASURED_WRAPPER_HEIGHT = '100vh';
|
|
21870
21873
|
// The container applies UpdateEmbedParams through React state, so a delivered
|
|
21871
21874
|
// post is not the same as the params being in effect.
|
|
21872
21875
|
const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
@@ -21874,56 +21877,6 @@ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
|
21874
21877
|
// truthy, so null or '' leaves the previous embed's values in place. '&' is
|
|
21875
21878
|
// truthy and parses to {}.
|
|
21876
21879
|
const NO_RUNTIME_PARAMS = '&';
|
|
21877
|
-
/**
|
|
21878
|
-
* Query parameters that stay on the iframe `src` while config is excluded from
|
|
21879
|
-
* the URL, which is the default unless the embed sets the
|
|
21880
|
-
* `excludeConfigFromURL` additional flag to `false`. These are the parameters the
|
|
21881
|
-
* application shell needs before it can receive a postMessage at all: the
|
|
21882
|
-
* embed marker, the host application URL used to validate the message origin,
|
|
21883
|
-
* the SDK version, the flags that pick the authentication flow, and the
|
|
21884
|
-
* boot-time settings that would otherwise be applied a frame late (viewport,
|
|
21885
|
-
* log level, locale, formatting and org). Everything else is delivered over
|
|
21886
|
-
* `HostEvent.UpdateEmbedParams`.
|
|
21887
|
-
* @internal
|
|
21888
|
-
*/
|
|
21889
|
-
const BOOTSTRAP_URL_PARAMS = new Set([
|
|
21890
|
-
Param.EmbedApp,
|
|
21891
|
-
Param.HostAppUrl,
|
|
21892
|
-
Param.Version,
|
|
21893
|
-
Param.AuthType,
|
|
21894
|
-
Param.AutoLogin,
|
|
21895
|
-
Param.DisableLoginRedirect,
|
|
21896
|
-
Param.ForceSAMLAutoRedirect,
|
|
21897
|
-
Param.cookieless,
|
|
21898
|
-
Param.preAuthCache,
|
|
21899
|
-
Param.blockNonEmbedFullAppAccess,
|
|
21900
|
-
Param.OverrideOrgId,
|
|
21901
|
-
Param.ViewPortHeight,
|
|
21902
|
-
Param.ViewPortWidth,
|
|
21903
|
-
Param.ClientLogLevel,
|
|
21904
|
-
Param.OverrideNativeConsole,
|
|
21905
|
-
Param.PendoTrackingKey,
|
|
21906
|
-
Param.NumberFormatLocale,
|
|
21907
|
-
Param.DateFormatLocale,
|
|
21908
|
-
Param.CurrencyFormat,
|
|
21909
|
-
Param.Locale,
|
|
21910
|
-
Param.searchEmbed,
|
|
21911
|
-
Param.livedBoardEmbed,
|
|
21912
|
-
Param.isSpotterAgentEmbed,
|
|
21913
|
-
Param.SpotterEnabled,
|
|
21914
|
-
Param.IsFullAppEmbed,
|
|
21915
|
-
Param.IsOnBeforeGetVizDataInterceptEnabled,
|
|
21916
|
-
Param.LinkOverride,
|
|
21917
|
-
Param.EnableLinkOverridesV2,
|
|
21918
|
-
Param.DisableRedirectionLinksInNewTab,
|
|
21919
|
-
Param.OverrideHistoryState,
|
|
21920
|
-
Param.ForceTable,
|
|
21921
|
-
Param.StringIDsUrl,
|
|
21922
|
-
Param.DataSources,
|
|
21923
|
-
Param.ExposeTranslationIDs,
|
|
21924
|
-
Param.IconSpriteUrl,
|
|
21925
|
-
Param.Tag,
|
|
21926
|
-
]);
|
|
21927
21880
|
/**
|
|
21928
21881
|
* The event id map from v2 event names to v1 event id
|
|
21929
21882
|
* v1 events are the classic embed events implemented in Blink v1
|
|
@@ -21961,7 +21914,6 @@ class TsEmbed {
|
|
|
21961
21914
|
this.shouldEncodeUrlQueryParams = false;
|
|
21962
21915
|
this.defaultHiddenActions = [Action.ReportError];
|
|
21963
21916
|
this.preRenderContainerEl = document.body;
|
|
21964
|
-
this.containerScrollListener = null;
|
|
21965
21917
|
/**
|
|
21966
21918
|
* Handler for fullscreen change events
|
|
21967
21919
|
*/
|
|
@@ -22126,9 +22078,6 @@ class TsEmbed {
|
|
|
22126
22078
|
}
|
|
22127
22079
|
else if (source === EmbedEvent.EmbedListenerReady) {
|
|
22128
22080
|
processEmbedContainerReady();
|
|
22129
|
-
if (this.isConfigExcludedFromUrl()) {
|
|
22130
|
-
this.triggerUpdateEmbedParams();
|
|
22131
|
-
}
|
|
22132
22081
|
}
|
|
22133
22082
|
};
|
|
22134
22083
|
// Subclasses that navigate the pre-render on show must await this before
|
|
@@ -22633,20 +22582,13 @@ class TsEmbed {
|
|
|
22633
22582
|
return path;
|
|
22634
22583
|
}
|
|
22635
22584
|
getEmbedParams() {
|
|
22636
|
-
const queryParams = this.
|
|
22585
|
+
const queryParams = this.getEmbedParamsObject();
|
|
22637
22586
|
return getQueryParamString(queryParams);
|
|
22638
22587
|
}
|
|
22639
22588
|
getEmbedParamsObject() {
|
|
22640
22589
|
const params = this.getBaseQueryParams();
|
|
22641
22590
|
return params;
|
|
22642
22591
|
}
|
|
22643
|
-
getUrlQueryParamsObject() {
|
|
22644
|
-
const queryParams = this.getEmbedParamsObject();
|
|
22645
|
-
if (!this.isConfigExcludedFromUrl()) {
|
|
22646
|
-
return queryParams;
|
|
22647
|
-
}
|
|
22648
|
-
return Object.fromEntries(Object.entries(queryParams).filter(([key]) => BOOTSTRAP_URL_PARAMS.has(key)));
|
|
22649
|
-
}
|
|
22650
22592
|
getRootIframeSrc() {
|
|
22651
22593
|
const query = this.getEmbedParams();
|
|
22652
22594
|
return this.getEmbedBasePath(query);
|
|
@@ -22817,7 +22759,7 @@ class TsEmbed {
|
|
|
22817
22759
|
top: '0',
|
|
22818
22760
|
left: '0',
|
|
22819
22761
|
width: '100vw',
|
|
22820
|
-
height:
|
|
22762
|
+
height: UNMEASURED_WRAPPER_HEIGHT,
|
|
22821
22763
|
};
|
|
22822
22764
|
setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
|
|
22823
22765
|
return preRenderWrapper;
|
|
@@ -22885,10 +22827,26 @@ class TsEmbed {
|
|
|
22885
22827
|
return placeholder;
|
|
22886
22828
|
}
|
|
22887
22829
|
/**
|
|
22888
|
-
* Resolves the configured preRenderContainer to a live element
|
|
22889
|
-
*
|
|
22890
|
-
*
|
|
22891
|
-
*
|
|
22830
|
+
* Resolves the configured preRenderContainer to a live element. A string
|
|
22831
|
+
* selector is re-queried on every call so a remounted container (E.g.: React
|
|
22832
|
+
* replacing the node) resolves to the fresh element; an element passed
|
|
22833
|
+
* directly cannot be re-resolved.
|
|
22834
|
+
*
|
|
22835
|
+
* With nothing configured the frame goes into the host element's nearest
|
|
22836
|
+
* scrolling ancestor, falling back to `document.body`.
|
|
22837
|
+
*
|
|
22838
|
+
* The wrapper is absolutely positioned, so it follows the page for free —
|
|
22839
|
+
* but only while it sits inside whatever scrolls. `document.body` is right
|
|
22840
|
+
* only when the document itself is the scroller; an app that scrolls an
|
|
22841
|
+
* inner element instead left the frame pinned to the viewport while the page
|
|
22842
|
+
* moved under it (SCAL-338563). Being inside the scroller also lets wheel
|
|
22843
|
+
* events chain out of the frame into it, which they cannot do from
|
|
22844
|
+
* `document.body`.
|
|
22845
|
+
*
|
|
22846
|
+
* A scrolling ancestor is layout chrome rather than route content, so it
|
|
22847
|
+
* outlives the embed in practice; and if it does go, the host element goes
|
|
22848
|
+
* with it and this instance is remounting anyway.
|
|
22849
|
+
* `reconcilePreRenderContainer` re-runs this on a detached container.
|
|
22892
22850
|
*/
|
|
22893
22851
|
resolvePreRenderContainerTarget() {
|
|
22894
22852
|
var _a;
|
|
@@ -22908,7 +22866,13 @@ class TsEmbed {
|
|
|
22908
22866
|
else if (containerConfig) {
|
|
22909
22867
|
container = containerConfig;
|
|
22910
22868
|
}
|
|
22911
|
-
|
|
22869
|
+
if (container) {
|
|
22870
|
+
return container;
|
|
22871
|
+
}
|
|
22872
|
+
if (!this.hostElement) {
|
|
22873
|
+
return document.body;
|
|
22874
|
+
}
|
|
22875
|
+
return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
|
|
22912
22876
|
}
|
|
22913
22877
|
inheritPreRenderContainer() {
|
|
22914
22878
|
var _a;
|
|
@@ -22953,8 +22917,9 @@ class TsEmbed {
|
|
|
22953
22917
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
22954
22918
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
22955
22919
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
22956
|
-
* reference and collapse the wrapper.
|
|
22957
|
-
* re-resolved; a container passed as an element
|
|
22920
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
22921
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
22922
|
+
* is left untouched, as there is nothing to re-query.
|
|
22958
22923
|
*/
|
|
22959
22924
|
reconcilePreRenderContainer() {
|
|
22960
22925
|
const wrapper = this.preRenderWrapper;
|
|
@@ -22973,14 +22938,6 @@ class TsEmbed {
|
|
|
22973
22938
|
if (resolved === stored && stored.contains(wrapper)) {
|
|
22974
22939
|
return;
|
|
22975
22940
|
}
|
|
22976
|
-
if (this.containerScrollListener && stored !== resolved) {
|
|
22977
|
-
if (stored !== document.body) {
|
|
22978
|
-
stored.removeEventListener('scroll', this.containerScrollListener);
|
|
22979
|
-
}
|
|
22980
|
-
if (resolved !== document.body) {
|
|
22981
|
-
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
22982
|
-
}
|
|
22983
|
-
}
|
|
22984
22941
|
this.preRenderContainerEl = resolved;
|
|
22985
22942
|
this.applyPreRenderContainerPositioning();
|
|
22986
22943
|
if (wrapper.parentNode !== resolved) {
|
|
@@ -23042,11 +22999,12 @@ class TsEmbed {
|
|
|
23042
22999
|
*/
|
|
23043
23000
|
setIFrameHeight(height) {
|
|
23044
23001
|
if (this.isPreRendered) {
|
|
23002
|
+
const next = getCssDimension(height);
|
|
23045
23003
|
if (this.insertedDomEl) {
|
|
23046
|
-
this.insertedDomEl.style.height =
|
|
23004
|
+
this.insertedDomEl.style.height = next;
|
|
23047
23005
|
}
|
|
23048
23006
|
else if (this.preRenderWrapper) {
|
|
23049
|
-
this.preRenderWrapper.style.height =
|
|
23007
|
+
this.preRenderWrapper.style.height = next;
|
|
23050
23008
|
}
|
|
23051
23009
|
}
|
|
23052
23010
|
else {
|
|
@@ -23481,34 +23439,47 @@ class TsEmbed {
|
|
|
23481
23439
|
delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
23482
23440
|
}
|
|
23483
23441
|
/**
|
|
23484
|
-
*
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23442
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
23443
|
+
*
|
|
23444
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
23445
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
23446
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
23447
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
23448
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
23449
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
23450
|
+
* wrapper has to be told.
|
|
23451
|
+
*/
|
|
23452
|
+
observePreRenderSize() {
|
|
23453
|
+
var _a;
|
|
23454
|
+
if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
|
|
23488
23455
|
return;
|
|
23489
23456
|
}
|
|
23490
|
-
const
|
|
23491
|
-
|
|
23492
|
-
|
|
23457
|
+
const placeholder = this.getPreRenderPlaceHolderElement();
|
|
23458
|
+
if (!placeholder) {
|
|
23459
|
+
return;
|
|
23460
|
+
}
|
|
23461
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
23462
|
+
this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
|
|
23463
|
+
this.resizeObserver.observe(placeholder);
|
|
23493
23464
|
}
|
|
23494
23465
|
/**
|
|
23495
23466
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
23496
23467
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
23497
23468
|
*/
|
|
23498
23469
|
destroy() {
|
|
23499
|
-
var _a, _b, _c;
|
|
23470
|
+
var _a, _b, _c, _d;
|
|
23500
23471
|
try {
|
|
23501
23472
|
this.removeFullscreenChangeHandler();
|
|
23502
|
-
this.
|
|
23473
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
23503
23474
|
this.unsubscribeToEvents();
|
|
23504
|
-
(
|
|
23475
|
+
(_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
|
|
23505
23476
|
this.restorePreRenderContainerPosition();
|
|
23506
23477
|
if (!this.isRendered) {
|
|
23507
23478
|
return;
|
|
23508
23479
|
}
|
|
23509
23480
|
if (!getEmbedConfig().waitForCleanupOnDestroy) {
|
|
23510
23481
|
this.trigger(HostEvent.DestroyEmbed);
|
|
23511
|
-
(
|
|
23482
|
+
(_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
|
|
23512
23483
|
}
|
|
23513
23484
|
else {
|
|
23514
23485
|
const cleanupTimeout = getEmbedConfig().cleanupTimeout;
|
|
@@ -23554,27 +23525,6 @@ class TsEmbed {
|
|
|
23554
23525
|
this.isRendered = true;
|
|
23555
23526
|
return this.renderIFrame(prerenderFrameSrc);
|
|
23556
23527
|
}
|
|
23557
|
-
isConfigExcludedFromUrl() {
|
|
23558
|
-
var _a, _b, _c;
|
|
23559
|
-
const flag = (_b = (_a = this.viewConfig.additionalFlags) === null || _a === void 0 ? void 0 : _a.excludeConfigFromURL) !== null && _b !== void 0 ? _b : (_c = this.embedConfig.additionalFlags) === null || _c === void 0 ? void 0 : _c.excludeConfigFromURL;
|
|
23560
|
-
// Enabled by default; only an explicit false opts out.
|
|
23561
|
-
return flag !== false && flag !== 'false';
|
|
23562
|
-
}
|
|
23563
|
-
async triggerUpdateEmbedParams() {
|
|
23564
|
-
try {
|
|
23565
|
-
const params = await this.getUpdateEmbedParamsObject();
|
|
23566
|
-
this.trigger(HostEvent.UpdateEmbedParams, params);
|
|
23567
|
-
}
|
|
23568
|
-
catch (error) {
|
|
23569
|
-
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
23570
|
-
this.handleError({
|
|
23571
|
-
errorType: ErrorDetailsTypes.API,
|
|
23572
|
-
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
23573
|
-
code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
23574
|
-
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
23575
|
-
});
|
|
23576
|
-
}
|
|
23577
|
-
}
|
|
23578
23528
|
beforePrerenderVisible() {
|
|
23579
23529
|
// We can ignore this as its a bit expensive and the newer customers
|
|
23580
23530
|
// have moved on to UpdateEmbedParams supported clusters
|
|
@@ -23585,7 +23535,17 @@ class TsEmbed {
|
|
|
23585
23535
|
this.preRenderParamsApplied = new Promise((resolve) => {
|
|
23586
23536
|
this.executeAfterEmbedContainerLoaded(async () => {
|
|
23587
23537
|
try {
|
|
23588
|
-
await this.
|
|
23538
|
+
const params = await this.getUpdateEmbedParamsObject();
|
|
23539
|
+
this.trigger(HostEvent.UpdateEmbedParams, params);
|
|
23540
|
+
}
|
|
23541
|
+
catch (error) {
|
|
23542
|
+
logger$3.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
|
|
23543
|
+
this.handleError({
|
|
23544
|
+
errorType: ErrorDetailsTypes.API,
|
|
23545
|
+
message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
|
|
23546
|
+
code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
|
|
23547
|
+
error: (error === null || error === void 0 ? void 0 : error.message) || error,
|
|
23548
|
+
});
|
|
23589
23549
|
}
|
|
23590
23550
|
finally {
|
|
23591
23551
|
setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
|
|
@@ -23600,7 +23560,7 @@ class TsEmbed {
|
|
|
23600
23560
|
* wrapper to overlay it.
|
|
23601
23561
|
*/
|
|
23602
23562
|
async showPreRender() {
|
|
23603
|
-
var _a
|
|
23563
|
+
var _a;
|
|
23604
23564
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
23605
23565
|
preRenderId: this.getPreRenderConfig().id,
|
|
23606
23566
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -23619,14 +23579,16 @@ class TsEmbed {
|
|
|
23619
23579
|
this.beforePrerenderVisible();
|
|
23620
23580
|
if (this.hostElement) {
|
|
23621
23581
|
this.insertedDomEl = this.createPreRenderPlaceholder();
|
|
23622
|
-
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23582
|
+
// Carry a height fullHeight has already measured onto the fresh
|
|
23583
|
+
// placeholder, so a re-show does not flash at frameParams height.
|
|
23584
|
+
// UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
|
|
23585
|
+
// before anything has been measured; treating that as a measurement
|
|
23586
|
+
// is what made a first reveal overshoot to a full viewport.
|
|
23587
|
+
const wrapperHeight = this.preRenderWrapper.style.height;
|
|
23588
|
+
if (this.viewConfig.fullHeight
|
|
23589
|
+
&& wrapperHeight
|
|
23590
|
+
&& wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
|
|
23591
|
+
this.insertedDomEl.style.height = wrapperHeight;
|
|
23630
23592
|
}
|
|
23631
23593
|
const placeHolderId = this.getPreRenderIds().placeHolder;
|
|
23632
23594
|
// Remove any stale placeholder from a previous cycle. It is located
|
|
@@ -23640,29 +23602,19 @@ class TsEmbed {
|
|
|
23640
23602
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
23641
23603
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
23642
23604
|
this.syncPreRenderStyle();
|
|
23643
|
-
|
|
23644
|
-
if (customContainer && !this.containerScrollListener) {
|
|
23645
|
-
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
23646
|
-
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
23647
|
-
}
|
|
23648
|
-
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
23649
|
-
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
23650
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
23651
|
-
entries.forEach((entry) => {
|
|
23652
|
-
if (entry.target === observeTarget) {
|
|
23653
|
-
this.syncPreRenderStyle();
|
|
23654
|
-
}
|
|
23655
|
-
});
|
|
23656
|
-
});
|
|
23657
|
-
this.resizeObserver.observe(observeTarget);
|
|
23658
|
-
}
|
|
23605
|
+
this.observePreRenderSize();
|
|
23659
23606
|
}
|
|
23660
23607
|
removeStyleProperties(this.preRenderWrapper, [
|
|
23661
23608
|
'z-index',
|
|
23662
23609
|
'opacity',
|
|
23663
|
-
'pointer-events',
|
|
23664
23610
|
'overflow',
|
|
23611
|
+
'transform',
|
|
23665
23612
|
]);
|
|
23613
|
+
// Set rather than removed: a container that carries `pointer-events:
|
|
23614
|
+
// none` — the usual styling for a parking root that must not swallow
|
|
23615
|
+
// clicks — passes it down, and dropping the property here would leave
|
|
23616
|
+
// the inherited `none` in force and the frame dead to input.
|
|
23617
|
+
setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
|
|
23666
23618
|
this.subscribeToEvents();
|
|
23667
23619
|
// Setup fullscreen change handler for prerendered components
|
|
23668
23620
|
if (this.iFrame) {
|
|
@@ -23715,6 +23667,7 @@ class TsEmbed {
|
|
|
23715
23667
|
* If the component is not preRendered, it issues a warning.
|
|
23716
23668
|
*/
|
|
23717
23669
|
hidePreRender() {
|
|
23670
|
+
var _a;
|
|
23718
23671
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23719
23672
|
preRenderId: this.getPreRenderConfig().id,
|
|
23720
23673
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -23734,12 +23687,15 @@ class TsEmbed {
|
|
|
23734
23687
|
top: '0',
|
|
23735
23688
|
left: '0',
|
|
23736
23689
|
overflow: 'hidden',
|
|
23690
|
+
// Keeps the measured size — so the next show needs no resize, which
|
|
23691
|
+
// is the point of pre-rendering — while lifting the box out of
|
|
23692
|
+
// the container's scrollable area. Overflow only extends
|
|
23693
|
+
// downwards, so a hidden frame parked above the top edge adds
|
|
23694
|
+
// none, where one left at full height shows as blank scroll space.
|
|
23695
|
+
transform: PRERENDER_PARKED_TRANSFORM,
|
|
23737
23696
|
};
|
|
23738
23697
|
setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
|
|
23739
|
-
this.
|
|
23740
|
-
if (this.resizeObserver) {
|
|
23741
|
-
this.resizeObserver.disconnect();
|
|
23742
|
-
}
|
|
23698
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
23743
23699
|
const placeHolderEle = this.getPreRenderPlaceHolderElement();
|
|
23744
23700
|
if (placeHolderEle) {
|
|
23745
23701
|
placeHolderEle.parentElement.removeChild(placeHolderEle);
|
|
@@ -23924,7 +23880,7 @@ let SearchBarEmbed$1 = class SearchBarEmbed extends TsEmbed {
|
|
|
23924
23880
|
* @param dataSources A list of data source GUIDs
|
|
23925
23881
|
*/
|
|
23926
23882
|
getIFrameSrc() {
|
|
23927
|
-
const queryParams = this.
|
|
23883
|
+
const queryParams = this.getEmbedParamsObject();
|
|
23928
23884
|
const path = 'search-bar-embed';
|
|
23929
23885
|
let query = '';
|
|
23930
23886
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
@@ -24111,7 +24067,7 @@ let SearchEmbed$1 = class SearchEmbed extends TsEmbed {
|
|
|
24111
24067
|
}
|
|
24112
24068
|
getEmbedParams() {
|
|
24113
24069
|
const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
|
|
24114
|
-
const queryParams = this.
|
|
24070
|
+
const queryParams = this.getEmbedParamsObject();
|
|
24115
24071
|
let query = '';
|
|
24116
24072
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
24117
24073
|
if (queryParamsString) {
|
|
@@ -24704,7 +24660,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
24704
24660
|
* embedded Liveboard or visualization.
|
|
24705
24661
|
*/
|
|
24706
24662
|
getEmbedParams() {
|
|
24707
|
-
const params = this.
|
|
24663
|
+
const params = this.getEmbedParamsObject();
|
|
24708
24664
|
return getQueryParamString(params, true);
|
|
24709
24665
|
}
|
|
24710
24666
|
getEmbedParamsObject() {
|
|
@@ -25162,7 +25118,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
25162
25118
|
* embedded Liveboard or visualization.
|
|
25163
25119
|
*/
|
|
25164
25120
|
getEmbedParams() {
|
|
25165
|
-
const params = this.
|
|
25121
|
+
const params = this.getEmbedParamsObject();
|
|
25166
25122
|
const queryParams = getQueryParamString(params, true);
|
|
25167
25123
|
return queryParams;
|
|
25168
25124
|
}
|
|
@@ -25935,7 +25891,7 @@ let ConversationMessage$1 = class ConversationMessage extends TsEmbed {
|
|
|
25935
25891
|
getIframeSrc() {
|
|
25936
25892
|
const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
|
|
25937
25893
|
const path = 'conv-assist-answer';
|
|
25938
|
-
const queryParams = this.
|
|
25894
|
+
const queryParams = this.getEmbedParamsObject();
|
|
25939
25895
|
let query = '';
|
|
25940
25896
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
25941
25897
|
if (queryParamsString) {
|
|
@@ -26138,7 +26094,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
26138
26094
|
const path = sharedConversationId
|
|
26139
26095
|
? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
|
|
26140
26096
|
: 'insights/conv-assist';
|
|
26141
|
-
const queryParams = this.
|
|
26097
|
+
const queryParams = this.getEmbedParamsObject();
|
|
26142
26098
|
let query = '';
|
|
26143
26099
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
26144
26100
|
if (queryParamsString) {
|