@thoughtspot/visual-embed-sdk 1.51.1 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +1 -0
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/css-variables.d.ts +1 -1
  6. package/cjs/src/embed/conversation.d.ts +5 -5
  7. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  8. package/cjs/src/embed/liveboard.js +2 -1
  9. package/cjs/src/embed/liveboard.js.map +1 -1
  10. package/cjs/src/embed/liveboard.spec.js +4 -4
  11. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  12. package/cjs/src/embed/search.spec.js +28 -0
  13. package/cjs/src/embed/search.spec.js.map +1 -1
  14. package/cjs/src/embed/ts-embed.d.ts +86 -5
  15. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  16. package/cjs/src/embed/ts-embed.js +30 -19
  17. package/cjs/src/embed/ts-embed.js.map +1 -1
  18. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  19. package/cjs/src/embed/ts-embed.spec.js +55 -16
  20. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  21. package/cjs/src/index.d.ts +2 -2
  22. package/cjs/src/index.d.ts.map +1 -1
  23. package/cjs/src/index.js +2 -1
  24. package/cjs/src/index.js.map +1 -1
  25. package/cjs/src/react/all-types-export.d.ts +1 -1
  26. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  27. package/cjs/src/react/all-types-export.js +2 -1
  28. package/cjs/src/react/all-types-export.js.map +1 -1
  29. package/cjs/src/react/index.d.ts +8 -8
  30. package/cjs/src/react/index.d.ts.map +1 -1
  31. package/cjs/src/react/index.js +1 -1
  32. package/cjs/src/react/index.js.map +1 -1
  33. package/cjs/src/react/index.spec.js +7 -7
  34. package/cjs/src/react/index.spec.js.map +1 -1
  35. package/cjs/src/types.d.ts +124 -36
  36. package/cjs/src/types.d.ts.map +1 -1
  37. package/cjs/src/types.js +80 -12
  38. package/cjs/src/types.js.map +1 -1
  39. package/cjs/src/utils.d.ts +5 -0
  40. package/cjs/src/utils.d.ts.map +1 -1
  41. package/cjs/src/utils.js +19 -1
  42. package/cjs/src/utils.js.map +1 -1
  43. package/cjs/src/utils.spec.js +33 -0
  44. package/cjs/src/utils.spec.js.map +1 -1
  45. package/dist/{index-DxLfQxoT.js → index-BMppCU63.js} +1 -1
  46. package/dist/src/api-intercept.d.ts.map +1 -1
  47. package/dist/src/css-variables.d.ts +1 -1
  48. package/dist/src/embed/conversation.d.ts +5 -5
  49. package/dist/src/embed/liveboard.d.ts.map +1 -1
  50. package/dist/src/embed/ts-embed.d.ts +86 -5
  51. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  52. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  53. package/dist/src/index.d.ts +2 -2
  54. package/dist/src/index.d.ts.map +1 -1
  55. package/dist/src/react/all-types-export.d.ts +1 -1
  56. package/dist/src/react/all-types-export.d.ts.map +1 -1
  57. package/dist/src/react/index.d.ts +8 -8
  58. package/dist/src/react/index.d.ts.map +1 -1
  59. package/dist/src/types.d.ts +124 -36
  60. package/dist/src/types.d.ts.map +1 -1
  61. package/dist/src/utils.d.ts +5 -0
  62. package/dist/src/utils.d.ts.map +1 -1
  63. package/dist/tsembed-react.es.js +133 -35
  64. package/dist/tsembed-react.js +132 -34
  65. package/dist/tsembed.es.js +133 -35
  66. package/dist/tsembed.js +131 -33
  67. package/dist/visual-embed-sdk-react-full.d.ts +223 -54
  68. package/dist/visual-embed-sdk-react.d.ts +199 -53
  69. package/dist/visual-embed-sdk.d.ts +215 -46
  70. package/lib/package.json +1 -1
  71. package/lib/src/api-intercept.d.ts.map +1 -1
  72. package/lib/src/api-intercept.js +2 -1
  73. package/lib/src/api-intercept.js.map +1 -1
  74. package/lib/src/css-variables.d.ts +1 -1
  75. package/lib/src/embed/conversation.d.ts +5 -5
  76. package/lib/src/embed/liveboard.d.ts.map +1 -1
  77. package/lib/src/embed/liveboard.js +3 -2
  78. package/lib/src/embed/liveboard.js.map +1 -1
  79. package/lib/src/embed/liveboard.spec.js +4 -4
  80. package/lib/src/embed/liveboard.spec.js.map +1 -1
  81. package/lib/src/embed/search.spec.js +28 -0
  82. package/lib/src/embed/search.spec.js.map +1 -1
  83. package/lib/src/embed/ts-embed.d.ts +86 -5
  84. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  85. package/lib/src/embed/ts-embed.js +32 -21
  86. package/lib/src/embed/ts-embed.js.map +1 -1
  87. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  88. package/lib/src/embed/ts-embed.spec.js +56 -17
  89. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  90. package/lib/src/index.d.ts +2 -2
  91. package/lib/src/index.d.ts.map +1 -1
  92. package/lib/src/index.js +2 -2
  93. package/lib/src/index.js.map +1 -1
  94. package/lib/src/react/all-types-export.d.ts +1 -1
  95. package/lib/src/react/all-types-export.d.ts.map +1 -1
  96. package/lib/src/react/all-types-export.js +1 -1
  97. package/lib/src/react/all-types-export.js.map +1 -1
  98. package/lib/src/react/index.d.ts +8 -8
  99. package/lib/src/react/index.d.ts.map +1 -1
  100. package/lib/src/react/index.js +1 -1
  101. package/lib/src/react/index.js.map +1 -1
  102. package/lib/src/react/index.spec.js +7 -7
  103. package/lib/src/react/index.spec.js.map +1 -1
  104. package/lib/src/types.d.ts +124 -36
  105. package/lib/src/types.d.ts.map +1 -1
  106. package/lib/src/types.js +79 -11
  107. package/lib/src/types.js.map +1 -1
  108. package/lib/src/utils.d.ts +5 -0
  109. package/lib/src/utils.d.ts.map +1 -1
  110. package/lib/src/utils.js +17 -0
  111. package/lib/src/utils.js.map +1 -1
  112. package/lib/src/utils.spec.js +34 -1
  113. package/lib/src/utils.spec.js.map +1 -1
  114. package/lib/src/visual-embed-sdk.d.ts +215 -46
  115. package/package.json +1 -1
  116. package/src/api-intercept.ts +2 -1
  117. package/src/css-variables.ts +1 -1
  118. package/src/embed/conversation.ts +5 -5
  119. package/src/embed/liveboard.spec.ts +4 -4
  120. package/src/embed/liveboard.ts +3 -1
  121. package/src/embed/search.spec.ts +31 -0
  122. package/src/embed/ts-embed.spec.ts +70 -16
  123. package/src/embed/ts-embed.ts +32 -20
  124. package/src/index.ts +2 -0
  125. package/src/react/all-types-export.ts +1 -0
  126. package/src/react/index.spec.tsx +7 -7
  127. package/src/react/index.tsx +9 -9
  128. package/src/types.ts +125 -36
  129. package/src/utils.spec.ts +44 -0
  130. package/src/utils.ts +16 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.51.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.52.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1932,7 +1932,32 @@
1932
1932
  */
1933
1933
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1934
1934
  /**
1935
- * Emitted when the user intercepts a URL.
1935
+ * Emitted before the embedded ThoughtSpot app sends a network request whose
1936
+ * fully resolved URL matches one of the `interceptUrls` in the view config.
1937
+ * The request is held until you call `responder`, which decides whether the
1938
+ * real request goes out or a response you supply is used in its place.
1939
+ *
1940
+ * Setting `interceptUrls` is what enables this; there is no separate enable
1941
+ * flag. If `responder` is not called within `interceptTimeout` (30000 ms by
1942
+ * default) the request fails and `EmbedEvent.Error` is emitted.
1943
+ *
1944
+ * The payload is `{ input, init, urlType }`, where `input` is the request
1945
+ * URL and `init` is the `fetch` init object, with `init.body` parsed into an
1946
+ * object when it is valid JSON. `urlType` is the matching
1947
+ * `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
1948
+ * the recognized API groups.
1949
+ *
1950
+ * Interception wraps the outermost layer of `fetch`, so `init` holds the
1951
+ * request as the application composed it, before ThoughtSpot attaches its
1952
+ * authentication headers. Those headers, and any token refresh and retry,
1953
+ * are applied afterwards and only when you pass `execute: true`. Only
1954
+ * requests made through `fetch` are intercepted.
1955
+ *
1956
+ * Pass `execute: true` to let the original request proceed untouched, in
1957
+ * which case any `response` you supply alongside it is ignored. With
1958
+ * `execute: false` the request is never sent, and your `response.body` is
1959
+ * returned to the app as JSON, defaulting to status 200 and a
1960
+ * `Content-Type: application/json` header.
1936
1961
  *
1937
1962
  * Supported on all embed types.
1938
1963
  *
@@ -2742,7 +2767,7 @@
2742
2767
  *
2743
2768
  * Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
2744
2769
  * existing filter, this event starts the creation of a new filter.
2745
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2770
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2746
2771
  * @example
2747
2772
  * ```js
2748
2773
  * liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
@@ -2758,7 +2783,7 @@
2758
2783
  * Hiding the *Add parameter* button with `hiddenActions:
2759
2784
  * [Action.AddParameter]` does not block this event, but disabling it
2760
2785
  * with `disabledActions` does.
2761
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2786
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2762
2787
  * @example
2763
2788
  * ```js
2764
2789
  * liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
@@ -4636,7 +4661,13 @@
4636
4661
  */
4637
4662
  HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
4638
4663
  /**
4639
- * Triggered when the embed needs to be destroyed. This is used to clean up any embed-related resources internally.
4664
+ * Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
4665
+ * it can release any resources it holds before the iframe is removed from the DOM.
4666
+ *
4667
+ * This is triggered for you by `embed.destroy()`; you rarely need to trigger it
4668
+ * directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
4669
+ * waits for the app to acknowledge this event (up to `cleanupTimeout`) before
4670
+ * removing the iframe.
4640
4671
  * @example
4641
4672
  * ```js
4642
4673
  * liveboardEmbed.trigger(HostEvent.DestroyEmbed);
@@ -6754,7 +6785,7 @@
6754
6785
  * ```js
6755
6786
  * hiddenActions: [Action.QuickSearchPill]
6756
6787
  * ```
6757
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6788
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6758
6789
  */
6759
6790
  Action["QuickSearchPill"] = "quickSearchPill";
6760
6791
  /**
@@ -6769,7 +6800,7 @@
6769
6800
  * ```js
6770
6801
  * hiddenActions: [Action.DeepAnalysisPill]
6771
6802
  * ```
6772
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6803
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6773
6804
  */
6774
6805
  Action["DeepAnalysisPill"] = "deepAnalysisPill";
6775
6806
  /**
@@ -6784,7 +6815,7 @@
6784
6815
  * ```js
6785
6816
  * hiddenActions: [Action.DataLiteracyPill]
6786
6817
  * ```
6787
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6818
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6788
6819
  */
6789
6820
  Action["DataLiteracyPill"] = "dataLiteracyPill";
6790
6821
  /**
@@ -7257,6 +7288,36 @@
7257
7288
  /** UpdateParameters payload is invalid - malformed applicability */
7258
7289
  EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
7259
7290
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
7291
+ /**
7292
+ * How badly an error affects the embed, so the host can decide whether it is
7293
+ * worth surfacing to the end user.
7294
+ *
7295
+ * Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
7296
+ * the embedded app, so a host can apply one rule to both sources.
7297
+ *
7298
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
7299
+ * @group Error Handling
7300
+ *
7301
+ * @example
7302
+ * Only surface errors that took the embed down
7303
+ *
7304
+ * ```js
7305
+ * embed.on(EmbedEvent.Error, (error) => {
7306
+ * if (error.severity === EmbedErrorSeverity.SEV1) {
7307
+ * showBanner(error.message);
7308
+ * }
7309
+ * });
7310
+ * ```
7311
+ */
7312
+ var EmbedErrorSeverity;
7313
+ (function (EmbedErrorSeverity) {
7314
+ /** The embed cannot render. Nothing usable is on screen. */
7315
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
7316
+ /** Something is degraded but the embed still works. */
7317
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
7318
+ /** Everything else, including validation of the embedder's own input. */
7319
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
7320
+ })(EmbedErrorSeverity || (EmbedErrorSeverity = {}));
7260
7321
  /**
7261
7322
  * Context types for specifying the page context when triggering host events.
7262
7323
  * Used as the third parameter in the `trigger` method to help ThoughtSpot
@@ -7297,20 +7358,27 @@
7297
7358
  ContextType["Other"] = "other";
7298
7359
  })(ContextType || (ContextType = {}));
7299
7360
  /**
7300
- * Enum for the type of API intercepted
7361
+ * Named groups of ThoughtSpot APIs that can be intercepted, for use in
7362
+ * `interceptUrls`. Each group expands to the underlying request URLs, so you do
7363
+ * not have to list them individually.
7301
7364
  */
7302
7365
  var InterceptedApiType;
7303
7366
  (function (InterceptedApiType) {
7304
7367
  /**
7305
- * The apis that are use to get the data for the embed
7368
+ * The APIs that fetch the data backing an Answer, including its chart,
7369
+ * table, and headline data.
7306
7370
  */
7307
7371
  InterceptedApiType["AnswerData"] = "AnswerData";
7308
7372
  /**
7309
- * This will intercept all the apis
7373
+ * Intercepts every `fetch` request the embedded application makes, not only
7374
+ * the data APIs. This includes authentication, session, and metadata calls,
7375
+ * so the handler must respond to requests it does not recognize by passing
7376
+ * `execute: true`. Listing this alongside other entries in `interceptUrls`
7377
+ * supersedes them.
7310
7378
  */
7311
7379
  InterceptedApiType["ALL"] = "ALL";
7312
7380
  /**
7313
- * The apis that are use to get the data for the liveboard
7381
+ * The APIs that fetch the data backing a Liveboard.
7314
7382
  */
7315
7383
  InterceptedApiType["LiveboardData"] = "LiveboardData";
7316
7384
  })(InterceptedApiType || (InterceptedApiType = {}));
@@ -7434,7 +7502,7 @@
7434
7502
  TableContentDensity["Compact"] = "COMPACT";
7435
7503
  })(TableContentDensity || (TableContentDensity = {}));
7436
7504
 
7437
- var version$1="1.51.1";var pkg = {version:version$1};
7505
+ var version$1="1.52.0";var pkg = {version:version$1};
7438
7506
 
7439
7507
  const { version } = pkg;
7440
7508
 
@@ -7613,6 +7681,23 @@
7613
7681
  }
7614
7682
  return JSON.stringify(value);
7615
7683
  };
7684
+ /**
7685
+ * Inverse of serializeParam: JSON.parse with fallback to the raw string,
7686
+ * matching how the app parses the same values from the iframe URL.
7687
+ */
7688
+ const deserializeParam = (value) => {
7689
+ if (typeof value !== 'string')
7690
+ return value;
7691
+ try {
7692
+ const parsed = JSON.parse(value);
7693
+ // Numeric strings stay strings ('123' !== 123), same as the app's
7694
+ // URL parser — param consumers expect string ids/versions.
7695
+ return typeof parsed === 'number' ? value : parsed;
7696
+ }
7697
+ catch (e) {
7698
+ return value;
7699
+ }
7700
+ };
7616
7701
  /**
7617
7702
  * Convert a value to a string:
7618
7703
  * in case of an array, we convert it to CSV.
@@ -21208,6 +21293,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21208
21293
  errorType: ErrorDetailsTypes.API,
21209
21294
  message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21210
21295
  code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
21296
+ severity: EmbedErrorSeverity.SEV3,
21211
21297
  error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21212
21298
  };
21213
21299
  executeEvent(exports.EmbedEvent.Error, errorDetails);
@@ -21552,6 +21638,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21552
21638
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21553
21639
  message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21554
21640
  code: EmbedErrorCodes.INIT_ERROR,
21641
+ severity: EmbedErrorSeverity.SEV1,
21555
21642
  error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21556
21643
  });
21557
21644
  }
@@ -21562,7 +21649,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21562
21649
  */
21563
21650
  handleError(errorDetails) {
21564
21651
  this.isError = true;
21565
- this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
21652
+ this.executeCallbacks(exports.EmbedEvent.Error, {
21653
+ severity: EmbedErrorSeverity.SEV3,
21654
+ ...errorDetails,
21655
+ });
21566
21656
  // Log error
21567
21657
  logger$3.error(errorDetails);
21568
21658
  }
@@ -21647,6 +21737,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21647
21737
  errorType: ErrorDetailsTypes.NETWORK,
21648
21738
  message: ERROR_MESSAGE.OFFLINE_WARNING,
21649
21739
  code: EmbedErrorCodes.NETWORK_ERROR,
21740
+ severity: EmbedErrorSeverity.SEV2,
21650
21741
  offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
21651
21742
  };
21652
21743
  this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
@@ -21804,10 +21895,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21804
21895
  return `${basePath}#`;
21805
21896
  }
21806
21897
  async getUpdateEmbedParamsObject() {
21807
- let queryParams = this.getEmbedParamsObject();
21898
+ const queryParams = this.getEmbedParamsObject();
21899
+ // Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
21900
+ // them back so the event payload matches a URL load (SCAL-334713).
21901
+ Object.keys(queryParams).forEach((key) => {
21902
+ queryParams[key] = deserializeParam(queryParams[key]);
21903
+ });
21808
21904
  const appInitData = await this.getAppInitData();
21809
- queryParams = { ...this.viewConfig, ...queryParams, ...appInitData };
21810
- return queryParams;
21905
+ return { ...this.viewConfig, ...queryParams, ...appInitData };
21811
21906
  }
21812
21907
  /**
21813
21908
  * Common query params set for all the embed modes.
@@ -22015,9 +22110,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22015
22110
  return iFrame;
22016
22111
  }
22017
22112
  /**
22018
- * Returns a merged {@link PreRenderConfig} object where each shared key
22019
- * prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
22020
- * backward compatibility.
22113
+ * Returns a merged {@link PreRenderConfig} object where each key prefers the
22114
+ * value from `preRenderConfig` over its deprecated top-level `viewConfig`
22115
+ * counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
22116
+ * `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
22021
22117
  */
22022
22118
  getPreRenderConfig() {
22023
22119
  var _a, _b, _c, _d;
@@ -22025,16 +22121,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22025
22121
  const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
22026
22122
  return {
22027
22123
  ...preRenderCfg,
22028
- preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22029
- preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22030
- doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22124
+ id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22125
+ containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22126
+ doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22031
22127
  };
22032
22128
  }
22033
22129
  /**
22034
22130
  * Returns true if this embed instance is configured for pre-rendering.
22035
22131
  */
22036
22132
  isPreRenderEmbed() {
22037
- return !!this.getPreRenderConfig().preRenderId;
22133
+ return !!this.getPreRenderConfig().id;
22038
22134
  }
22039
22135
  handleInsertionIntoDOM(child) {
22040
22136
  if (this.isPreRenderEmbed()) {
@@ -22130,6 +22226,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22130
22226
  errorType: ErrorDetailsTypes.API,
22131
22227
  message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
22132
22228
  code: EmbedErrorCodes.LOGIN_FAILED,
22229
+ severity: EmbedErrorSeverity.SEV1,
22133
22230
  error: error,
22134
22231
  });
22135
22232
  });
@@ -22221,7 +22318,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22221
22318
  */
22222
22319
  resolvePreRenderContainerTarget() {
22223
22320
  var _a;
22224
- const containerConfig = this.getPreRenderConfig().preRenderContainer;
22321
+ const containerConfig = this.getPreRenderConfig().containerSelector;
22225
22322
  let container = null;
22226
22323
  if (typeof containerConfig === 'string') {
22227
22324
  try {
@@ -22246,7 +22343,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22246
22343
  return;
22247
22344
  }
22248
22345
  const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
22249
- if (this.getPreRenderConfig().preRenderContainer
22346
+ if (this.getPreRenderConfig().containerSelector
22250
22347
  && this.resolvePreRenderContainerTarget() !== ownerContainer) {
22251
22348
  logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
22252
22349
  + 'the one passed here is ignored. Set it on the PreRender component instead.');
@@ -22743,7 +22840,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22743
22840
  showPreRenderByDefault,
22744
22841
  replaceExistingPreRender,
22745
22842
  });
22746
- if (!this.getPreRenderConfig().preRenderId) {
22843
+ if (!this.getPreRenderConfig().id) {
22747
22844
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22748
22845
  return this;
22749
22846
  }
@@ -22919,12 +23016,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22919
23016
  async showPreRender() {
22920
23017
  var _a, _b;
22921
23018
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
22922
- preRenderId: this.getPreRenderConfig().preRenderId,
23019
+ preRenderId: this.getPreRenderConfig().id,
22923
23020
  embedComponentType: this.viewConfig.embedComponentType,
22924
23021
  });
22925
23022
  if (this.shouldWaitForRenderPromise)
22926
23023
  await this.isReadyForRenderPromise;
22927
- if (!this.getPreRenderConfig().preRenderId) {
23024
+ if (!this.getPreRenderConfig().id) {
22928
23025
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22929
23026
  return this;
22930
23027
  }
@@ -22960,7 +23057,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
22960
23057
  this.containerScrollListener = () => this.syncPreRenderStyle();
22961
23058
  customContainer.addEventListener('scroll', this.containerScrollListener);
22962
23059
  }
22963
- if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
23060
+ if (!this.getPreRenderConfig().doNotTrackSize) {
22964
23061
  const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
22965
23062
  this.resizeObserver = new ResizeObserver((entries) => {
22966
23063
  entries.forEach((entry) => {
@@ -23028,7 +23125,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23028
23125
  */
23029
23126
  hidePreRender() {
23030
23127
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23031
- preRenderId: this.getPreRenderConfig().preRenderId,
23128
+ preRenderId: this.getPreRenderConfig().id,
23032
23129
  embedComponentType: this.viewConfig.embedComponentType,
23033
23130
  });
23034
23131
  logger$3.debug('HidePreRender Called');
@@ -23066,7 +23163,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
23066
23163
  * @property {string} child - The HTML element ID for the PreRender child.
23067
23164
  */
23068
23165
  getPreRenderIds() {
23069
- const preRenderId = this.getPreRenderConfig().preRenderId;
23166
+ const preRenderId = this.getPreRenderConfig().id;
23070
23167
  return {
23071
23168
  wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
23072
23169
  child: `tsEmbed-pre-render-child-${preRenderId}`,
@@ -24547,6 +24644,7 @@ query GetEurekaVizSnapshots(
24547
24644
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
24548
24645
  message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24549
24646
  code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
24647
+ severity: EmbedErrorSeverity.SEV1,
24550
24648
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24551
24649
  });
24552
24650
  }
@@ -24698,7 +24796,7 @@ query GetEurekaVizSnapshots(
24698
24796
  if (this.isRendered) {
24699
24797
  this.trigger(exports.HostEvent.Navigate, path.substring(1));
24700
24798
  }
24701
- else if (this.getPreRenderConfig().preRenderId) {
24799
+ else if (this.getPreRenderConfig().id) {
24702
24800
  this.preRender(true);
24703
24801
  }
24704
24802
  else {
@@ -25402,7 +25500,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
25402
25500
  const ref = React.useRef(null);
25403
25501
  const { className, style, ...embedProps } = props;
25404
25502
  const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
25405
- const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.preRenderId) !== null && _b !== void 0 ? _b : props.preRenderId;
25503
+ const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : props.preRenderId;
25406
25504
  const handleDestroy = (tsEmbed) => {
25407
25505
  // do not destroy if it is a preRender component
25408
25506
  if (isPreRenderedComponent)