@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.
Files changed (71) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/embed/app.js +1 -1
  3. package/cjs/src/embed/app.js.map +1 -1
  4. package/cjs/src/embed/auto-frame-renderer.js +1 -1
  5. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  6. package/cjs/src/embed/bodyless-conversation.js +1 -1
  7. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  8. package/cjs/src/embed/conversation.js +1 -1
  9. package/cjs/src/embed/conversation.js.map +1 -1
  10. package/cjs/src/embed/liveboard.js +1 -1
  11. package/cjs/src/embed/liveboard.js.map +1 -1
  12. package/cjs/src/embed/search-bar.js +1 -1
  13. package/cjs/src/embed/search-bar.js.map +1 -1
  14. package/cjs/src/embed/search.js +1 -1
  15. package/cjs/src/embed/search.js.map +1 -1
  16. package/cjs/src/embed/search.spec.js +0 -20
  17. package/cjs/src/embed/search.spec.js.map +1 -1
  18. package/cjs/src/embed/ts-embed.d.ts +34 -12
  19. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  20. package/cjs/src/embed/ts-embed.js +98 -142
  21. package/cjs/src/embed/ts-embed.js.map +1 -1
  22. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  23. package/cjs/src/embed/ts-embed.spec.js +171 -138
  24. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  25. package/dist/{index-CcBYlGo9.js → index-BrJMbt8r.js} +1 -1
  26. package/dist/src/embed/ts-embed.d.ts +34 -12
  27. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  28. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  29. package/dist/tsembed-react.es.js +108 -152
  30. package/dist/tsembed-react.js +107 -151
  31. package/dist/tsembed.es.js +109 -153
  32. package/dist/tsembed.js +108 -152
  33. package/dist/visual-embed-sdk-react-full.d.ts +34 -12
  34. package/dist/visual-embed-sdk-react.d.ts +34 -12
  35. package/dist/visual-embed-sdk.d.ts +34 -12
  36. package/lib/package.json +2 -2
  37. package/lib/src/embed/app.js +1 -1
  38. package/lib/src/embed/app.js.map +1 -1
  39. package/lib/src/embed/auto-frame-renderer.js +1 -1
  40. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  41. package/lib/src/embed/bodyless-conversation.js +1 -1
  42. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  43. package/lib/src/embed/conversation.js +1 -1
  44. package/lib/src/embed/conversation.js.map +1 -1
  45. package/lib/src/embed/liveboard.js +1 -1
  46. package/lib/src/embed/liveboard.js.map +1 -1
  47. package/lib/src/embed/search-bar.js +1 -1
  48. package/lib/src/embed/search-bar.js.map +1 -1
  49. package/lib/src/embed/search.js +1 -1
  50. package/lib/src/embed/search.js.map +1 -1
  51. package/lib/src/embed/search.spec.js +0 -20
  52. package/lib/src/embed/search.spec.js.map +1 -1
  53. package/lib/src/embed/ts-embed.d.ts +34 -12
  54. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  55. package/lib/src/embed/ts-embed.js +99 -143
  56. package/lib/src/embed/ts-embed.js.map +1 -1
  57. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  58. package/lib/src/embed/ts-embed.spec.js +172 -139
  59. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  60. package/lib/src/visual-embed-sdk.d.ts +34 -12
  61. package/package.json +2 -2
  62. package/src/embed/app.ts +1 -1
  63. package/src/embed/auto-frame-renderer.ts +1 -1
  64. package/src/embed/bodyless-conversation.ts +1 -1
  65. package/src/embed/conversation.ts +1 -1
  66. package/src/embed/liveboard.ts +1 -1
  67. package/src/embed/search-bar.tsx +1 -1
  68. package/src/embed/search.spec.ts +0 -23
  69. package/src/embed/search.ts +1 -1
  70. package/src/embed/ts-embed.spec.ts +213 -179
  71. 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
- private containerScrollListener;
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, falling
348
- * back to `document.body`. A string selector is re-queried on every call so
349
- * a remounted container (E.g.: React replacing the node) resolves to the
350
- * fresh element; an element passed directly cannot be re-resolved.
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. Only string selectors can be
368
- * re-resolved; a container passed as an element is left untouched.
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
- * Detaches and clears the container scroll listener, if one is attached.
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 removeContainerScrollListener;
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":["../../../src/embed/ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;GAM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,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU;IAS5D;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD,SAAS,CAAC,gBAAgB,IAAI,MAAM;IAqBpC;;;;;;;;;;;;;;;;OAgBG;IACI,EAAE,CAAC,WAAW,SAAS,UAAU,EACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CACN,OAAO,EAAE,iBAAiB,CAAC,WAAW,CAAC,EACvC,SAAS,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"}
@@ -12,7 +12,7 @@ import { isMessageFromIframe } from '../utils/transport/iframe-transport';
12
12
  import { logger } from '../utils/logger';
13
13
  import { getAuthenticationToken } from '../authToken';
14
14
  import { AnswerService } from '../utils/graphql/answerService/answerService';
15
- import { getEncodedQueryParamsString, getCssDimension, embedEventStatus, setAttributes, getCustomisations, getRuntimeFilters, getDOMNode, querySelectorAcrossShadowRoot, getFilterQuery, getQueryParamString, getRuntimeParameters, setStyleProperties, removeStyleProperties, getHostEventsConfig, deserializeParam, } from '../utils';
15
+ import { getEncodedQueryParamsString, getCssDimension, embedEventStatus, setAttributes, getCustomisations, getRuntimeFilters, getDOMNode, querySelectorAcrossShadowRoot, getFilterQuery, getQueryParamString, getRuntimeParameters, setStyleProperties, removeStyleProperties, getHostEventsConfig, deserializeParam, getScrollableAncestors, } from '../utils';
16
16
  import { getCustomActions } from '../utils/custom-actions';
17
17
  import { getThoughtSpotHost, URL_MAX_LENGTH, DEFAULT_EMBED_WIDTH, DEFAULT_EMBED_HEIGHT, getV2BasePath, } from '../config';
18
18
  import { AuthType, HostEvent, EmbedEvent, Action, Param, ContextMenuTriggerOptions, EmbedErrorSeverity, ErrorDetailsTypes, EmbedErrorCodes, } from '../types';
@@ -39,6 +39,9 @@ const TS_EMBED_ID = '_thoughtspot-embed';
39
39
  */
40
40
  const PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY = 'tsEmbedOriginalPosition';
41
41
  const PRERENDER_WRAPPER_ID_PREFIX = 'tsEmbed-pre-render-wrapper-';
42
+ const PRERENDER_PARKED_TRANSFORM = 'translateY(-100%)';
43
+ /** The height createPreRenderWrapper() seeds before anything is measured. */
44
+ const UNMEASURED_WRAPPER_HEIGHT = '100vh';
42
45
  // The container applies UpdateEmbedParams through React state, so a delivered
43
46
  // post is not the same as the params being in effect.
44
47
  const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
@@ -46,56 +49,6 @@ const UPDATE_EMBED_PARAMS_SETTLE_MS = 200;
46
49
  // truthy, so null or '' leaves the previous embed's values in place. '&' is
47
50
  // truthy and parses to {}.
48
51
  const NO_RUNTIME_PARAMS = '&';
49
- /**
50
- * Query parameters that stay on the iframe `src` while config is excluded from
51
- * the URL, which is the default unless the embed sets the
52
- * `excludeConfigFromURL` additional flag to `false`. These are the parameters the
53
- * application shell needs before it can receive a postMessage at all: the
54
- * embed marker, the host application URL used to validate the message origin,
55
- * the SDK version, the flags that pick the authentication flow, and the
56
- * boot-time settings that would otherwise be applied a frame late (viewport,
57
- * log level, locale, formatting and org). Everything else is delivered over
58
- * `HostEvent.UpdateEmbedParams`.
59
- * @internal
60
- */
61
- const BOOTSTRAP_URL_PARAMS = new Set([
62
- Param.EmbedApp,
63
- Param.HostAppUrl,
64
- Param.Version,
65
- Param.AuthType,
66
- Param.AutoLogin,
67
- Param.DisableLoginRedirect,
68
- Param.ForceSAMLAutoRedirect,
69
- Param.cookieless,
70
- Param.preAuthCache,
71
- Param.blockNonEmbedFullAppAccess,
72
- Param.OverrideOrgId,
73
- Param.ViewPortHeight,
74
- Param.ViewPortWidth,
75
- Param.ClientLogLevel,
76
- Param.OverrideNativeConsole,
77
- Param.PendoTrackingKey,
78
- Param.NumberFormatLocale,
79
- Param.DateFormatLocale,
80
- Param.CurrencyFormat,
81
- Param.Locale,
82
- Param.searchEmbed,
83
- Param.livedBoardEmbed,
84
- Param.isSpotterAgentEmbed,
85
- Param.SpotterEnabled,
86
- Param.IsFullAppEmbed,
87
- Param.IsOnBeforeGetVizDataInterceptEnabled,
88
- Param.LinkOverride,
89
- Param.EnableLinkOverridesV2,
90
- Param.DisableRedirectionLinksInNewTab,
91
- Param.OverrideHistoryState,
92
- Param.ForceTable,
93
- Param.StringIDsUrl,
94
- Param.DataSources,
95
- Param.ExposeTranslationIDs,
96
- Param.IconSpriteUrl,
97
- Param.Tag,
98
- ]);
99
52
  /**
100
53
  * The event id map from v2 event names to v1 event id
101
54
  * v1 events are the classic embed events implemented in Blink v1
@@ -133,7 +86,6 @@ export class TsEmbed {
133
86
  this.shouldEncodeUrlQueryParams = false;
134
87
  this.defaultHiddenActions = [Action.ReportError];
135
88
  this.preRenderContainerEl = document.body;
136
- this.containerScrollListener = null;
137
89
  /**
138
90
  * Handler for fullscreen change events
139
91
  */
@@ -298,9 +250,6 @@ export class TsEmbed {
298
250
  }
299
251
  else if (source === EmbedEvent.EmbedListenerReady) {
300
252
  processEmbedContainerReady();
301
- if (this.isConfigExcludedFromUrl()) {
302
- this.triggerUpdateEmbedParams();
303
- }
304
253
  }
305
254
  };
306
255
  // Subclasses that navigate the pre-render on show must await this before
@@ -805,20 +754,13 @@ export class TsEmbed {
805
754
  return path;
806
755
  }
807
756
  getEmbedParams() {
808
- const queryParams = this.getUrlQueryParamsObject();
757
+ const queryParams = this.getEmbedParamsObject();
809
758
  return getQueryParamString(queryParams);
810
759
  }
811
760
  getEmbedParamsObject() {
812
761
  const params = this.getBaseQueryParams();
813
762
  return params;
814
763
  }
815
- getUrlQueryParamsObject() {
816
- const queryParams = this.getEmbedParamsObject();
817
- if (!this.isConfigExcludedFromUrl()) {
818
- return queryParams;
819
- }
820
- return Object.fromEntries(Object.entries(queryParams).filter(([key]) => BOOTSTRAP_URL_PARAMS.has(key)));
821
- }
822
764
  getRootIframeSrc() {
823
765
  const query = this.getEmbedParams();
824
766
  return this.getEmbedBasePath(query);
@@ -991,7 +933,7 @@ export class TsEmbed {
991
933
  top: '0',
992
934
  left: '0',
993
935
  width: '100vw',
994
- height: '100vh',
936
+ height: UNMEASURED_WRAPPER_HEIGHT,
995
937
  };
996
938
  setStyleProperties(preRenderWrapper, initialPreRenderWrapperStyle);
997
939
  return preRenderWrapper;
@@ -1059,10 +1001,26 @@ export class TsEmbed {
1059
1001
  return placeholder;
1060
1002
  }
1061
1003
  /**
1062
- * Resolves the configured preRenderContainer to a live element, falling
1063
- * back to `document.body`. A string selector is re-queried on every call so
1064
- * a remounted container (E.g.: React replacing the node) resolves to the
1065
- * fresh element; an element passed directly cannot be re-resolved.
1004
+ * Resolves the configured preRenderContainer to a live element. A string
1005
+ * selector is re-queried on every call so a remounted container (E.g.: React
1006
+ * replacing the node) resolves to the fresh element; an element passed
1007
+ * directly cannot be re-resolved.
1008
+ *
1009
+ * With nothing configured the frame goes into the host element's nearest
1010
+ * scrolling ancestor, falling back to `document.body`.
1011
+ *
1012
+ * The wrapper is absolutely positioned, so it follows the page for free —
1013
+ * but only while it sits inside whatever scrolls. `document.body` is right
1014
+ * only when the document itself is the scroller; an app that scrolls an
1015
+ * inner element instead left the frame pinned to the viewport while the page
1016
+ * moved under it (SCAL-338563). Being inside the scroller also lets wheel
1017
+ * events chain out of the frame into it, which they cannot do from
1018
+ * `document.body`.
1019
+ *
1020
+ * A scrolling ancestor is layout chrome rather than route content, so it
1021
+ * outlives the embed in practice; and if it does go, the host element goes
1022
+ * with it and this instance is remounting anyway.
1023
+ * `reconcilePreRenderContainer` re-runs this on a detached container.
1066
1024
  */
1067
1025
  resolvePreRenderContainerTarget() {
1068
1026
  var _a;
@@ -1082,7 +1040,13 @@ export class TsEmbed {
1082
1040
  else if (containerConfig) {
1083
1041
  container = containerConfig;
1084
1042
  }
1085
- return (_a = container) !== null && _a !== void 0 ? _a : document.body;
1043
+ if (container) {
1044
+ return container;
1045
+ }
1046
+ if (!this.hostElement) {
1047
+ return document.body;
1048
+ }
1049
+ return (_a = getScrollableAncestors(this.hostElement)[0]) !== null && _a !== void 0 ? _a : document.body;
1086
1050
  }
1087
1051
  inheritPreRenderContainer() {
1088
1052
  var _a;
@@ -1127,8 +1091,9 @@ export class TsEmbed {
1127
1091
  * Re-attaches the wrapper to a live container when the previously resolved
1128
1092
  * one has been detached or no longer holds the wrapper — e.g. the host app
1129
1093
  * remounted a custom preRenderContainer, which would otherwise leave a stale
1130
- * reference and collapse the wrapper. Only string selectors can be
1131
- * re-resolved; a container passed as an element is left untouched.
1094
+ * reference and collapse the wrapper. Selectors and the auto-resolved
1095
+ * scrolling ancestor are both re-resolved; a container passed as an element
1096
+ * is left untouched, as there is nothing to re-query.
1132
1097
  */
1133
1098
  reconcilePreRenderContainer() {
1134
1099
  const wrapper = this.preRenderWrapper;
@@ -1147,14 +1112,6 @@ export class TsEmbed {
1147
1112
  if (resolved === stored && stored.contains(wrapper)) {
1148
1113
  return;
1149
1114
  }
1150
- if (this.containerScrollListener && stored !== resolved) {
1151
- if (stored !== document.body) {
1152
- stored.removeEventListener('scroll', this.containerScrollListener);
1153
- }
1154
- if (resolved !== document.body) {
1155
- resolved.addEventListener('scroll', this.containerScrollListener);
1156
- }
1157
- }
1158
1115
  this.preRenderContainerEl = resolved;
1159
1116
  this.applyPreRenderContainerPositioning();
1160
1117
  if (wrapper.parentNode !== resolved) {
@@ -1216,11 +1173,12 @@ export class TsEmbed {
1216
1173
  */
1217
1174
  setIFrameHeight(height) {
1218
1175
  if (this.isPreRendered) {
1176
+ const next = getCssDimension(height);
1219
1177
  if (this.insertedDomEl) {
1220
- this.insertedDomEl.style.height = getCssDimension(height);
1178
+ this.insertedDomEl.style.height = next;
1221
1179
  }
1222
1180
  else if (this.preRenderWrapper) {
1223
- this.preRenderWrapper.style.height = getCssDimension(height);
1181
+ this.preRenderWrapper.style.height = next;
1224
1182
  }
1225
1183
  }
1226
1184
  else {
@@ -1655,34 +1613,47 @@ export class TsEmbed {
1655
1613
  delete container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
1656
1614
  }
1657
1615
  /**
1658
- * Detaches and clears the container scroll listener, if one is attached.
1616
+ * Re-sizes the wrapper when its placeholder changes size.
1617
+ *
1618
+ * Position deliberately has no equivalent. An absolutely positioned wrapper
1619
+ * follows its containing block for free, so a correctly placed frame is the
1620
+ * browser's job and costs nothing; repositioning it on scroll would mean a
1621
+ * layout read and a style write per frame to compensate for placing it in
1622
+ * the wrong box. Size is the one thing the browser will not do for us: the
1623
+ * placeholder grows when the embedded app reports a new height, and the
1624
+ * wrapper has to be told.
1659
1625
  */
1660
- removeContainerScrollListener() {
1661
- if (!this.containerScrollListener) {
1626
+ observePreRenderSize() {
1627
+ var _a;
1628
+ if (this.getPreRenderConfig().doNotTrackSize || typeof ResizeObserver === 'undefined') {
1629
+ return;
1630
+ }
1631
+ const placeholder = this.getPreRenderPlaceHolderElement();
1632
+ if (!placeholder) {
1662
1633
  return;
1663
1634
  }
1664
- const customContainer = this.getCustomPreRenderContainer();
1665
- customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
1666
- this.containerScrollListener = null;
1635
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1636
+ this.resizeObserver = new ResizeObserver(() => this.syncPreRenderStyle());
1637
+ this.resizeObserver.observe(placeholder);
1667
1638
  }
1668
1639
  /**
1669
1640
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
1670
1641
  * @version SDK: 1.19.1 | ThoughtSpot: *
1671
1642
  */
1672
1643
  destroy() {
1673
- var _a, _b, _c;
1644
+ var _a, _b, _c, _d;
1674
1645
  try {
1675
1646
  this.removeFullscreenChangeHandler();
1676
- this.removeContainerScrollListener();
1647
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1677
1648
  this.unsubscribeToEvents();
1678
- (_a = this.preRenderWrapper) === null || _a === void 0 ? void 0 : _a.remove();
1649
+ (_b = this.preRenderWrapper) === null || _b === void 0 ? void 0 : _b.remove();
1679
1650
  this.restorePreRenderContainerPosition();
1680
1651
  if (!this.isRendered) {
1681
1652
  return;
1682
1653
  }
1683
1654
  if (!getEmbedConfig().waitForCleanupOnDestroy) {
1684
1655
  this.trigger(HostEvent.DestroyEmbed);
1685
- (_c = (_b = this.insertedDomEl) === null || _b === void 0 ? void 0 : _b.parentNode) === null || _c === void 0 ? void 0 : _c.removeChild(this.insertedDomEl);
1656
+ (_d = (_c = this.insertedDomEl) === null || _c === void 0 ? void 0 : _c.parentNode) === null || _d === void 0 ? void 0 : _d.removeChild(this.insertedDomEl);
1686
1657
  }
1687
1658
  else {
1688
1659
  const cleanupTimeout = getEmbedConfig().cleanupTimeout;
@@ -1728,27 +1699,6 @@ export class TsEmbed {
1728
1699
  this.isRendered = true;
1729
1700
  return this.renderIFrame(prerenderFrameSrc);
1730
1701
  }
1731
- isConfigExcludedFromUrl() {
1732
- var _a, _b, _c;
1733
- 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;
1734
- // Enabled by default; only an explicit false opts out.
1735
- return flag !== false && flag !== 'false';
1736
- }
1737
- async triggerUpdateEmbedParams() {
1738
- try {
1739
- const params = await this.getUpdateEmbedParamsObject();
1740
- this.trigger(HostEvent.UpdateEmbedParams, params);
1741
- }
1742
- catch (error) {
1743
- logger.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
1744
- this.handleError({
1745
- errorType: ErrorDetailsTypes.API,
1746
- message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
1747
- code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
1748
- error: (error === null || error === void 0 ? void 0 : error.message) || error,
1749
- });
1750
- }
1751
- }
1752
1702
  beforePrerenderVisible() {
1753
1703
  // We can ignore this as its a bit expensive and the newer customers
1754
1704
  // have moved on to UpdateEmbedParams supported clusters
@@ -1759,7 +1709,17 @@ export class TsEmbed {
1759
1709
  this.preRenderParamsApplied = new Promise((resolve) => {
1760
1710
  this.executeAfterEmbedContainerLoaded(async () => {
1761
1711
  try {
1762
- await this.triggerUpdateEmbedParams();
1712
+ const params = await this.getUpdateEmbedParamsObject();
1713
+ this.trigger(HostEvent.UpdateEmbedParams, params);
1714
+ }
1715
+ catch (error) {
1716
+ logger.error(ERROR_MESSAGE.UPDATE_PARAMS_FAILED, error);
1717
+ this.handleError({
1718
+ errorType: ErrorDetailsTypes.API,
1719
+ message: (error === null || error === void 0 ? void 0 : error.message) || ERROR_MESSAGE.UPDATE_PARAMS_FAILED,
1720
+ code: EmbedErrorCodes.UPDATE_PARAMS_FAILED,
1721
+ error: (error === null || error === void 0 ? void 0 : error.message) || error,
1722
+ });
1763
1723
  }
1764
1724
  finally {
1765
1725
  setTimeout(resolve, UPDATE_EMBED_PARAMS_SETTLE_MS);
@@ -1774,7 +1734,7 @@ export class TsEmbed {
1774
1734
  * wrapper to overlay it.
1775
1735
  */
1776
1736
  async showPreRender() {
1777
- var _a, _b;
1737
+ var _a;
1778
1738
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
1779
1739
  preRenderId: this.getPreRenderConfig().id,
1780
1740
  embedComponentType: this.viewConfig.embedComponentType,
@@ -1793,14 +1753,16 @@ export class TsEmbed {
1793
1753
  this.beforePrerenderVisible();
1794
1754
  if (this.hostElement) {
1795
1755
  this.insertedDomEl = this.createPreRenderPlaceholder();
1796
- if (this.viewConfig.fullHeight) {
1797
- // If fullHeight has already sized the wrapper, seed the
1798
- // placeholder with the same height so syncPreRenderStyle gets
1799
- // an accurate rect.
1800
- const existingHeight = this.preRenderWrapper.style.height;
1801
- if (existingHeight) {
1802
- this.insertedDomEl.style.height = existingHeight;
1803
- }
1756
+ // Carry a height fullHeight has already measured onto the fresh
1757
+ // placeholder, so a re-show does not flash at frameParams height.
1758
+ // UNMEASURED_WRAPPER_HEIGHT is what createPreRenderWrapper() seeds
1759
+ // before anything has been measured; treating that as a measurement
1760
+ // is what made a first reveal overshoot to a full viewport.
1761
+ const wrapperHeight = this.preRenderWrapper.style.height;
1762
+ if (this.viewConfig.fullHeight
1763
+ && wrapperHeight
1764
+ && wrapperHeight !== UNMEASURED_WRAPPER_HEIGHT) {
1765
+ this.insertedDomEl.style.height = wrapperHeight;
1804
1766
  }
1805
1767
  const placeHolderId = this.getPreRenderIds().placeHolder;
1806
1768
  // Remove any stale placeholder from a previous cycle. It is located
@@ -1814,29 +1776,19 @@ export class TsEmbed {
1814
1776
  (_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
1815
1777
  this.hostElement.appendChild(this.insertedDomEl);
1816
1778
  this.syncPreRenderStyle();
1817
- const customContainer = this.getCustomPreRenderContainer();
1818
- if (customContainer && !this.containerScrollListener) {
1819
- this.containerScrollListener = () => this.syncPreRenderStyle();
1820
- customContainer.addEventListener('scroll', this.containerScrollListener);
1821
- }
1822
- if (!this.getPreRenderConfig().doNotTrackSize) {
1823
- const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
1824
- this.resizeObserver = new ResizeObserver((entries) => {
1825
- entries.forEach((entry) => {
1826
- if (entry.target === observeTarget) {
1827
- this.syncPreRenderStyle();
1828
- }
1829
- });
1830
- });
1831
- this.resizeObserver.observe(observeTarget);
1832
- }
1779
+ this.observePreRenderSize();
1833
1780
  }
1834
1781
  removeStyleProperties(this.preRenderWrapper, [
1835
1782
  'z-index',
1836
1783
  'opacity',
1837
- 'pointer-events',
1838
1784
  'overflow',
1785
+ 'transform',
1839
1786
  ]);
1787
+ // Set rather than removed: a container that carries `pointer-events:
1788
+ // none` — the usual styling for a parking root that must not swallow
1789
+ // clicks — passes it down, and dropping the property here would leave
1790
+ // the inherited `none` in force and the frame dead to input.
1791
+ setStyleProperties(this.preRenderWrapper, { pointerEvents: 'auto' });
1840
1792
  this.subscribeToEvents();
1841
1793
  // Setup fullscreen change handler for prerendered components
1842
1794
  if (this.iFrame) {
@@ -1889,6 +1841,7 @@ export class TsEmbed {
1889
1841
  * If the component is not preRendered, it issues a warning.
1890
1842
  */
1891
1843
  hidePreRender() {
1844
+ var _a;
1892
1845
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
1893
1846
  preRenderId: this.getPreRenderConfig().id,
1894
1847
  embedComponentType: this.viewConfig.embedComponentType,
@@ -1908,12 +1861,15 @@ export class TsEmbed {
1908
1861
  top: '0',
1909
1862
  left: '0',
1910
1863
  overflow: 'hidden',
1864
+ // Keeps the measured size — so the next show needs no resize, which
1865
+ // is the point of pre-rendering — while lifting the box out of
1866
+ // the container's scrollable area. Overflow only extends
1867
+ // downwards, so a hidden frame parked above the top edge adds
1868
+ // none, where one left at full height shows as blank scroll space.
1869
+ transform: PRERENDER_PARKED_TRANSFORM,
1911
1870
  };
1912
1871
  setStyleProperties(this.preRenderWrapper, preRenderHideStyles);
1913
- this.removeContainerScrollListener();
1914
- if (this.resizeObserver) {
1915
- this.resizeObserver.disconnect();
1916
- }
1872
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1917
1873
  const placeHolderEle = this.getPreRenderPlaceHolderElement();
1918
1874
  if (placeHolderEle) {
1919
1875
  placeHolderEle.parentElement.removeChild(placeHolderEle);