@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
|
@@ -94,7 +94,7 @@ export declare class TsEmbed {
|
|
|
94
94
|
private defaultHiddenActions;
|
|
95
95
|
private resizeObserver;
|
|
96
96
|
private preRenderContainerEl;
|
|
97
|
-
|
|
97
|
+
/** Last height the embedded app reported, once fullHeight has measured one. */
|
|
98
98
|
protected hostEventClient: HostEventClient;
|
|
99
99
|
protected isReadyForRenderPromise: Promise<void>;
|
|
100
100
|
protected shouldWaitForRenderPromise: boolean;
|
|
@@ -274,12 +274,6 @@ export declare class TsEmbed {
|
|
|
274
274
|
isThisPeriodInDateFiltersEnabled?: boolean;
|
|
275
275
|
hideLiveboardHeader?: boolean;
|
|
276
276
|
showLiveboardTitle?: boolean;
|
|
277
|
-
/**
|
|
278
|
-
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
279
|
-
* host app URL.
|
|
280
|
-
* THOUGHTSPOT URL params starts with a prefix "ts-"
|
|
281
|
-
* @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
282
|
-
*/
|
|
283
277
|
showLiveboardDescription?: boolean;
|
|
284
278
|
isLiveboardHeaderSticky?: boolean;
|
|
285
279
|
enable2ColumnLayout?: boolean;
|
|
@@ -359,10 +353,12 @@ export declare class TsEmbed {
|
|
|
359
353
|
*/
|
|
360
354
|
private createPreRenderPlaceholder;
|
|
361
355
|
/**
|
|
362
|
-
* Resolves the configured preRenderContainer
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
356
|
+
* Resolves the configured preRenderContainer, or defaults to the host's
|
|
357
|
+
* nearest scrolling ancestor (document.body if none). The absolutely
|
|
358
|
+
* positioned wrapper only follows the page while it sits inside what
|
|
359
|
+
* scrolls, so body is right only when the document itself scrolls — an inner
|
|
360
|
+
* scroller left the frame pinned to the viewport (SCAL-338563). A string
|
|
361
|
+
* selector is re-queried each call so a remounted container resolves fresh.
|
|
366
362
|
*/
|
|
367
363
|
private resolvePreRenderContainerTarget;
|
|
368
364
|
private inheritPreRenderContainer;
|
|
@@ -379,8 +375,9 @@ export declare class TsEmbed {
|
|
|
379
375
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
380
376
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
381
377
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
382
|
-
* reference and collapse the wrapper.
|
|
383
|
-
* re-resolved; a container passed as an element
|
|
378
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
379
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
380
|
+
* is left untouched, as there is nothing to re-query.
|
|
384
381
|
*/
|
|
385
382
|
private reconcilePreRenderContainer;
|
|
386
383
|
protected insertIntoDOMForPreRender(child: string | Node): void;
|
|
@@ -596,9 +593,17 @@ export declare class TsEmbed {
|
|
|
596
593
|
*/
|
|
597
594
|
private restorePreRenderContainerPosition;
|
|
598
595
|
/**
|
|
599
|
-
*
|
|
600
|
-
|
|
601
|
-
|
|
596
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
597
|
+
*
|
|
598
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
599
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
600
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
601
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
602
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
603
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
604
|
+
* wrapper has to be told.
|
|
605
|
+
*/
|
|
606
|
+
private observePreRenderSize;
|
|
602
607
|
/**
|
|
603
608
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
604
609
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["../../../src/embed/ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,E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AO,OAAO,CAAC,SAAS;IAQ3B;;;OAGG;IAEI,sBAAsB,6EAAyB;CACzD"}
|
|
@@ -21,6 +21,7 @@ const custom_actions_1 = require("../utils/custom-actions");
|
|
|
21
21
|
const config_1 = require("../config");
|
|
22
22
|
const types_1 = require("../types");
|
|
23
23
|
const mixpanel_service_1 = require("../mixpanel-service");
|
|
24
|
+
const runtimeTelemetry_1 = require("../utils/runtimeTelemetry");
|
|
24
25
|
const processData_1 = require("../utils/processData");
|
|
25
26
|
const sdk_version_1 = require("../utils/sdk-version");
|
|
26
27
|
const base_1 = require("./base");
|
|
@@ -43,6 +44,9 @@ const TS_EMBED_ID = '_thoughtspot-embed';
|
|
|
43
44
|
*/
|
|
44
45
|
const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
|
|
45
46
|
const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
|
|
47
|
+
const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
|
|
48
|
+
/** The height createPreRenderWrapper() seeds before anything is measured. */
|
|
49
|
+
const UNMEASURED_WRAPPER_HEIGHT = '100vh';
|
|
46
50
|
// The container applies UpdateEmbedParams through React state, so a delivered
|
|
47
51
|
// post is not the same as the params being in effect.
|
|
48
52
|
const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
|
|
@@ -179,7 +183,6 @@ class TsEmbed {
|
|
|
179
183
|
this.shouldEncodeUrlQueryParams = false;
|
|
180
184
|
this.defaultHiddenActions = [types_1.Action.ReportError];
|
|
181
185
|
this.preRenderContainerEl = document.body;
|
|
182
|
-
this.containerScrollListener = null;
|
|
183
186
|
/**
|
|
184
187
|
* Handler for fullscreen change events
|
|
185
188
|
*/
|
|
@@ -359,9 +362,7 @@ class TsEmbed {
|
|
|
359
362
|
...viewConfig,
|
|
360
363
|
};
|
|
361
364
|
this.registerAppInit();
|
|
362
|
-
(0, mixpanel_service_1.uploadMixpanelEvent)(mixpanel_service_1.MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE,
|
|
363
|
-
...viewConfig,
|
|
364
|
-
});
|
|
365
|
+
(0, mixpanel_service_1.uploadMixpanelEvent)(mixpanel_service_1.MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, (0, runtimeTelemetry_1.summarizeRuntimeDataForTelemetry)(viewConfig));
|
|
365
366
|
const embedConfig = (0, embedConfig_1.getEmbedConfig)();
|
|
366
367
|
if (embedConfig) {
|
|
367
368
|
this.embedConfig = embedConfig;
|
|
@@ -1067,7 +1068,7 @@ class TsEmbed {
|
|
|
1067
1068
|
top: '0',
|
|
1068
1069
|
left: '0',
|
|
1069
1070
|
width: '100vw',
|
|
1070
|
-
height:
|
|
1071
|
+
height: UNMEASURED_WRAPPER_HEIGHT,
|
|
1071
1072
|
};
|
|
1072
1073
|
(0, utils_1.setStyleProperties)(preRenderWrapper, initialPreRenderWrapperStyle);
|
|
1073
1074
|
return preRenderWrapper;
|
|
@@ -1135,10 +1136,12 @@ class TsEmbed {
|
|
|
1135
1136
|
return placeholder;
|
|
1136
1137
|
}
|
|
1137
1138
|
/**
|
|
1138
|
-
* Resolves the configured preRenderContainer
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
*
|
|
1139
|
+
* Resolves the configured preRenderContainer, or defaults to the host's
|
|
1140
|
+
* nearest scrolling ancestor (document.body if none). The absolutely
|
|
1141
|
+
* positioned wrapper only follows the page while it sits inside what
|
|
1142
|
+
* scrolls, so body is right only when the document itself scrolls — an inner
|
|
1143
|
+
* scroller left the frame pinned to the viewport (SCAL-338563). A string
|
|
1144
|
+
* selector is re-queried each call so a remounted container resolves fresh.
|
|
1142
1145
|
*/
|
|
1143
1146
|
resolvePreRenderContainerTarget() {
|
|
1144
1147
|
var _a;
|
|
@@ -1158,7 +1161,13 @@ class TsEmbed {
|
|
|
1158
1161
|
else if (containerConfig) {
|
|
1159
1162
|
container = containerConfig;
|
|
1160
1163
|
}
|
|
1161
|
-
|
|
1164
|
+
if (container) {
|
|
1165
|
+
return container;
|
|
1166
|
+
}
|
|
1167
|
+
if (!this.hostElement) {
|
|
1168
|
+
return document.body;
|
|
1169
|
+
}
|
|
1170
|
+
return (_a = (0, utils_1.getScrollableAncestors)(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
|
|
1162
1171
|
}
|
|
1163
1172
|
inheritPreRenderContainer() {
|
|
1164
1173
|
var _a;
|
|
@@ -1203,8 +1212,9 @@ class TsEmbed {
|
|
|
1203
1212
|
* Re-attaches the wrapper to a live container when the previously resolved
|
|
1204
1213
|
* one has been detached or no longer holds the wrapper — e.g. the host app
|
|
1205
1214
|
* remounted a custom preRenderContainer, which would otherwise leave a stale
|
|
1206
|
-
* reference and collapse the wrapper.
|
|
1207
|
-
* re-resolved; a container passed as an element
|
|
1215
|
+
* reference and collapse the wrapper. Selectors and the auto-resolved
|
|
1216
|
+
* scrolling ancestor are both re-resolved; a container passed as an element
|
|
1217
|
+
* is left untouched, as there is nothing to re-query.
|
|
1208
1218
|
*/
|
|
1209
1219
|
reconcilePreRenderContainer() {
|
|
1210
1220
|
const wrapper = this.preRenderWrapper;
|
|
@@ -1223,14 +1233,6 @@ class TsEmbed {
|
|
|
1223
1233
|
if (resolved === stored && stored.contains(wrapper)) {
|
|
1224
1234
|
return;
|
|
1225
1235
|
}
|
|
1226
|
-
if (this.containerScrollListener && stored !== resolved) {
|
|
1227
|
-
if (stored !== document.body) {
|
|
1228
|
-
stored.removeEventListener('scroll', this.containerScrollListener);
|
|
1229
|
-
}
|
|
1230
|
-
if (resolved !== document.body) {
|
|
1231
|
-
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
1236
|
this.preRenderContainerEl = resolved;
|
|
1235
1237
|
this.applyPreRenderContainerPositioning();
|
|
1236
1238
|
if (wrapper.parentNode !== resolved) {
|
|
@@ -1292,11 +1294,12 @@ class TsEmbed {
|
|
|
1292
1294
|
*/
|
|
1293
1295
|
setIFrameHeight(height) {
|
|
1294
1296
|
if (this.isPreRendered) {
|
|
1297
|
+
const next = (0, utils_1.getCssDimension)(height);
|
|
1295
1298
|
if (this.insertedDomEl) {
|
|
1296
|
-
this.insertedDomEl.style.height =
|
|
1299
|
+
this.insertedDomEl.style.height = next;
|
|
1297
1300
|
}
|
|
1298
1301
|
else if (this.preRenderWrapper) {
|
|
1299
|
-
this.preRenderWrapper.style.height =
|
|
1302
|
+
this.preRenderWrapper.style.height = next;
|
|
1300
1303
|
}
|
|
1301
1304
|
}
|
|
1302
1305
|
else {
|
|
@@ -1738,34 +1741,47 @@ class TsEmbed {
|
|
|
1738
1741
|
delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
1739
1742
|
}
|
|
1740
1743
|
/**
|
|
1741
|
-
*
|
|
1744
|
+
* Re-sizes the wrapper when its placeholder changes size.
|
|
1745
|
+
*
|
|
1746
|
+
* Position deliberately has no equivalent. An absolutely positioned wrapper
|
|
1747
|
+
* follows its containing block for free, so a correctly placed frame is the
|
|
1748
|
+
* browser's job and costs nothing; repositioning it on scroll would mean a
|
|
1749
|
+
* layout read and a style write per frame to compensate for placing it in
|
|
1750
|
+
* the wrong box. Size is the one thing the browser will not do for us: the
|
|
1751
|
+
* placeholder grows when the embedded app reports a new height, and the
|
|
1752
|
+
* wrapper has to be told.
|
|
1742
1753
|
*/
|
|
1743
|
-
|
|
1744
|
-
|
|
1754
|
+
observePreRenderSize() {
|
|
1755
|
+
var _a;
|
|
1756
|
+
if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
|
|
1745
1757
|
return;
|
|
1746
1758
|
}
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1749
|
-
|
|
1759
|
+
const placeholder = this.getPreRenderPlaceHolderElement();
|
|
1760
|
+
if (!placeholder) {
|
|
1761
|
+
return;
|
|
1762
|
+
}
|
|
1763
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1764
|
+
this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
|
|
1765
|
+
this.resizeObserver.observe(placeholder);
|
|
1750
1766
|
}
|
|
1751
1767
|
/**
|
|
1752
1768
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
1753
1769
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
1754
1770
|
*/
|
|
1755
1771
|
destroy() {
|
|
1756
|
-
var _a, _b, _c;
|
|
1772
|
+
var _a, _b, _c, _d;
|
|
1757
1773
|
try {
|
|
1758
1774
|
this.removeFullscreenChangeHandler();
|
|
1759
|
-
this.
|
|
1775
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1760
1776
|
this.unsubscribeToEvents();
|
|
1761
|
-
(
|
|
1777
|
+
(_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
|
|
1762
1778
|
this.restorePreRenderContainerPosition();
|
|
1763
1779
|
if (!this.isRendered) {
|
|
1764
1780
|
return;
|
|
1765
1781
|
}
|
|
1766
1782
|
if (!(0, embedConfig_1.getEmbedConfig)().waitForCleanupOnDestroy) {
|
|
1767
1783
|
this.trigger(types_1.HostEvent.DestroyEmbed);
|
|
1768
|
-
(
|
|
1784
|
+
(_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
|
|
1769
1785
|
}
|
|
1770
1786
|
else {
|
|
1771
1787
|
const cleanupTimeout = (0, embedConfig_1.getEmbedConfig)().cleanupTimeout;
|
|
@@ -1856,7 +1872,7 @@ class TsEmbed {
|
|
|
1856
1872
|
* wrapper to overlay it.
|
|
1857
1873
|
*/
|
|
1858
1874
|
async showPreRender() {
|
|
1859
|
-
var _a
|
|
1875
|
+
var _a;
|
|
1860
1876
|
(0, mixpanel_service_1.uploadMixpanelEvent)(mixpanel_service_1.MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
1861
1877
|
preRenderId: this.getPreRenderConfig().id,
|
|
1862
1878
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -1875,14 +1891,16 @@ class TsEmbed {
|
|
|
1875
1891
|
this.beforePrerenderVisible();
|
|
1876
1892
|
if (this.hostElement) {
|
|
1877
1893
|
this.insertedDomEl = this.createPreRenderPlaceholder();
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1894
|
+
// Carry a height fullHeight has already measured onto the fresh
|
|
1895
|
+
// placeholder, so a re-show does not flash at frameParams height.
|
|
1896
|
+
// UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
|
|
1897
|
+
// before anything has been measured; treating that as a measurement
|
|
1898
|
+
// is what made a first reveal overshoot to a full viewport.
|
|
1899
|
+
const wrapperHeight = this.preRenderWrapper.style.height;
|
|
1900
|
+
if (this.viewConfig.fullHeight
|
|
1901
|
+
&& wrapperHeight
|
|
1902
|
+
&& wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
|
|
1903
|
+
this.insertedDomEl.style.height = wrapperHeight;
|
|
1886
1904
|
}
|
|
1887
1905
|
const placeHolderId = this.getPreRenderIds().placeHolder;
|
|
1888
1906
|
// Remove any stale placeholder from a previous cycle. It is located
|
|
@@ -1896,29 +1914,19 @@ class TsEmbed {
|
|
|
1896
1914
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
1897
1915
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
1898
1916
|
this.syncPreRenderStyle();
|
|
1899
|
-
|
|
1900
|
-
if (customContainer && !this.containerScrollListener) {
|
|
1901
|
-
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
1902
|
-
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
1903
|
-
}
|
|
1904
|
-
if (!this.getPreRenderConfig().doNotTrackSize) {
|
|
1905
|
-
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
1906
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
1907
|
-
entries.forEach((entry) => {
|
|
1908
|
-
if (entry.target === observeTarget) {
|
|
1909
|
-
this.syncPreRenderStyle();
|
|
1910
|
-
}
|
|
1911
|
-
});
|
|
1912
|
-
});
|
|
1913
|
-
this.resizeObserver.observe(observeTarget);
|
|
1914
|
-
}
|
|
1917
|
+
this.observePreRenderSize();
|
|
1915
1918
|
}
|
|
1916
1919
|
(0, utils_1.removeStyleProperties)(this.preRenderWrapper, [
|
|
1917
1920
|
'z-index',
|
|
1918
1921
|
'opacity',
|
|
1919
|
-
'pointer-events',
|
|
1920
1922
|
'overflow',
|
|
1923
|
+
'transform',
|
|
1921
1924
|
]);
|
|
1925
|
+
// Set rather than removed: a container that carries `pointer-events:
|
|
1926
|
+
// none` — the usual styling for a parking root that must not swallow
|
|
1927
|
+
// clicks — passes it down, and dropping the property here would leave
|
|
1928
|
+
// the inherited `none` in force and the frame dead to input.
|
|
1929
|
+
(0, utils_1.setStyleProperties)(this.preRenderWrapper, { pointerEvents: 'auto' });
|
|
1922
1930
|
this.subscribeToEvents();
|
|
1923
1931
|
// Setup fullscreen change handler for prerendered components
|
|
1924
1932
|
if (this.iFrame) {
|
|
@@ -1971,6 +1979,7 @@ class TsEmbed {
|
|
|
1971
1979
|
* If the component is not preRendered, it issues a warning.
|
|
1972
1980
|
*/
|
|
1973
1981
|
hidePreRender() {
|
|
1982
|
+
var _a;
|
|
1974
1983
|
(0, mixpanel_service_1.uploadMixpanelEvent)(mixpanel_service_1.MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
1975
1984
|
preRenderId: this.getPreRenderConfig().id,
|
|
1976
1985
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
@@ -1982,20 +1991,25 @@ class TsEmbed {
|
|
|
1982
1991
|
return;
|
|
1983
1992
|
}
|
|
1984
1993
|
const { zIndex } = this.getPreRenderConfig();
|
|
1994
|
+
// A hidden pre-render frame must add no scroll space to the host page.
|
|
1985
1995
|
const preRenderHideStyles = {
|
|
1986
1996
|
opacity: '0',
|
|
1987
1997
|
pointerEvents: 'none',
|
|
1988
1998
|
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
1989
|
-
|
|
1999
|
+
// Resolves to the viewport, so the hidden frame belongs to no
|
|
2000
|
+
// scroll container's overflow; syncPreRenderStyle restores absolute
|
|
2001
|
+
// on show.
|
|
2002
|
+
position: 'fixed',
|
|
1990
2003
|
top: '0',
|
|
1991
2004
|
left: '0',
|
|
1992
2005
|
overflow: 'hidden',
|
|
2006
|
+
// The one exception: a transformed or contained ancestor captures
|
|
2007
|
+
// `fixed`; parking above the top edge keeps it out of that
|
|
2008
|
+
// overflow.
|
|
2009
|
+
transform: PRERENDER_PARKED_TRANSFORM,
|
|
1993
2010
|
};
|
|
1994
2011
|
(0, utils_1.setStyleProperties)(this.preRenderWrapper, preRenderHideStyles);
|
|
1995
|
-
this.
|
|
1996
|
-
if (this.resizeObserver) {
|
|
1997
|
-
this.resizeObserver.disconnect();
|
|
1998
|
-
}
|
|
2012
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
1999
2013
|
const placeHolderEle = this.getPreRenderPlaceHolderElement();
|
|
2000
2014
|
if (placeHolderEle) {
|
|
2001
2015
|
placeHolderEle.parentElement.removeChild(placeHolderEle);
|