@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 _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1725,7 +1725,32 @@ var EmbedEvent;
1725
1725
  */
1726
1726
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1727
1727
  /**
1728
- * Emitted when the user intercepts a URL.
1728
+ * Emitted before the embedded ThoughtSpot app sends a network request whose
1729
+ * fully resolved URL matches one of the `interceptUrls` in the view config.
1730
+ * The request is held until you call `responder`, which decides whether the
1731
+ * real request goes out or a response you supply is used in its place.
1732
+ *
1733
+ * Setting `interceptUrls` is what enables this; there is no separate enable
1734
+ * flag. If `responder` is not called within `interceptTimeout` (30000 ms by
1735
+ * default) the request fails and `EmbedEvent.Error` is emitted.
1736
+ *
1737
+ * The payload is `{ input, init, urlType }`, where `input` is the request
1738
+ * URL and `init` is the `fetch` init object, with `init.body` parsed into an
1739
+ * object when it is valid JSON. `urlType` is the matching
1740
+ * `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
1741
+ * the recognized API groups.
1742
+ *
1743
+ * Interception wraps the outermost layer of `fetch`, so `init` holds the
1744
+ * request as the application composed it, before ThoughtSpot attaches its
1745
+ * authentication headers. Those headers, and any token refresh and retry,
1746
+ * are applied afterwards and only when you pass `execute: true`. Only
1747
+ * requests made through `fetch` are intercepted.
1748
+ *
1749
+ * Pass `execute: true` to let the original request proceed untouched, in
1750
+ * which case any `response` you supply alongside it is ignored. With
1751
+ * `execute: false` the request is never sent, and your `response.body` is
1752
+ * returned to the app as JSON, defaulting to status 200 and a
1753
+ * `Content-Type: application/json` header.
1729
1754
  *
1730
1755
  * Supported on all embed types.
1731
1756
  *
@@ -2535,7 +2560,7 @@ var HostEvent;
2535
2560
  *
2536
2561
  * Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
2537
2562
  * existing filter, this event starts the creation of a new filter.
2538
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2563
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2539
2564
  * @example
2540
2565
  * ```js
2541
2566
  * liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
@@ -2551,7 +2576,7 @@ var HostEvent;
2551
2576
  * Hiding the *Add parameter* button with `hiddenActions:
2552
2577
  * [Action.AddParameter]` does not block this event, but disabling it
2553
2578
  * with `disabledActions` does.
2554
- * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
2579
+ * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
2555
2580
  * @example
2556
2581
  * ```js
2557
2582
  * liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
@@ -4429,7 +4454,13 @@ var HostEvent;
4429
4454
  */
4430
4455
  HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
4431
4456
  /**
4432
- * Triggered when the embed needs to be destroyed. This is used to clean up any embed-related resources internally.
4457
+ * Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
4458
+ * it can release any resources it holds before the iframe is removed from the DOM.
4459
+ *
4460
+ * This is triggered for you by `embed.destroy()`; you rarely need to trigger it
4461
+ * directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
4462
+ * waits for the app to acknowledge this event (up to `cleanupTimeout`) before
4463
+ * removing the iframe.
4433
4464
  * @example
4434
4465
  * ```js
4435
4466
  * liveboardEmbed.trigger(HostEvent.DestroyEmbed);
@@ -6547,7 +6578,7 @@ var Action;
6547
6578
  * ```js
6548
6579
  * hiddenActions: [Action.QuickSearchPill]
6549
6580
  * ```
6550
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6581
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6551
6582
  */
6552
6583
  Action["QuickSearchPill"] = "quickSearchPill";
6553
6584
  /**
@@ -6562,7 +6593,7 @@ var Action;
6562
6593
  * ```js
6563
6594
  * hiddenActions: [Action.DeepAnalysisPill]
6564
6595
  * ```
6565
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6596
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6566
6597
  */
6567
6598
  Action["DeepAnalysisPill"] = "deepAnalysisPill";
6568
6599
  /**
@@ -6577,7 +6608,7 @@ var Action;
6577
6608
  * ```js
6578
6609
  * hiddenActions: [Action.DataLiteracyPill]
6579
6610
  * ```
6580
- * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
6611
+ * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
6581
6612
  */
6582
6613
  Action["DataLiteracyPill"] = "dataLiteracyPill";
6583
6614
  /**
@@ -7050,6 +7081,36 @@ var EmbedErrorCodes;
7050
7081
  /** UpdateParameters payload is invalid - malformed applicability */
7051
7082
  EmbedErrorCodes["UPDATEPARAMETERS_INVALID_PAYLOAD"] = "UPDATEPARAMETERS_INVALID_PAYLOAD";
7052
7083
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
7084
+ /**
7085
+ * How badly an error affects the embed, so the host can decide whether it is
7086
+ * worth surfacing to the end user.
7087
+ *
7088
+ * Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
7089
+ * the embedded app, so a host can apply one rule to both sources.
7090
+ *
7091
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
7092
+ * @group Error Handling
7093
+ *
7094
+ * @example
7095
+ * Only surface errors that took the embed down
7096
+ *
7097
+ * ```js
7098
+ * embed.on(EmbedEvent.Error, (error) => {
7099
+ * if (error.severity === EmbedErrorSeverity.SEV1) {
7100
+ * showBanner(error.message);
7101
+ * }
7102
+ * });
7103
+ * ```
7104
+ */
7105
+ var EmbedErrorSeverity;
7106
+ (function (EmbedErrorSeverity) {
7107
+ /** The embed cannot render. Nothing usable is on screen. */
7108
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV1"] = 1] = "SEV1";
7109
+ /** Something is degraded but the embed still works. */
7110
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV2"] = 2] = "SEV2";
7111
+ /** Everything else, including validation of the embedder's own input. */
7112
+ EmbedErrorSeverity[EmbedErrorSeverity["SEV3"] = 3] = "SEV3";
7113
+ })(EmbedErrorSeverity || (EmbedErrorSeverity = {}));
7053
7114
  /**
7054
7115
  * Context types for specifying the page context when triggering host events.
7055
7116
  * Used as the third parameter in the `trigger` method to help ThoughtSpot
@@ -7090,20 +7151,27 @@ var ContextType;
7090
7151
  ContextType["Other"] = "other";
7091
7152
  })(ContextType || (ContextType = {}));
7092
7153
  /**
7093
- * Enum for the type of API intercepted
7154
+ * Named groups of ThoughtSpot APIs that can be intercepted, for use in
7155
+ * `interceptUrls`. Each group expands to the underlying request URLs, so you do
7156
+ * not have to list them individually.
7094
7157
  */
7095
7158
  var InterceptedApiType;
7096
7159
  (function (InterceptedApiType) {
7097
7160
  /**
7098
- * The apis that are use to get the data for the embed
7161
+ * The APIs that fetch the data backing an Answer, including its chart,
7162
+ * table, and headline data.
7099
7163
  */
7100
7164
  InterceptedApiType["AnswerData"] = "AnswerData";
7101
7165
  /**
7102
- * This will intercept all the apis
7166
+ * Intercepts every `fetch` request the embedded application makes, not only
7167
+ * the data APIs. This includes authentication, session, and metadata calls,
7168
+ * so the handler must respond to requests it does not recognize by passing
7169
+ * `execute: true`. Listing this alongside other entries in `interceptUrls`
7170
+ * supersedes them.
7103
7171
  */
7104
7172
  InterceptedApiType["ALL"] = "ALL";
7105
7173
  /**
7106
- * The apis that are use to get the data for the liveboard
7174
+ * The APIs that fetch the data backing a Liveboard.
7107
7175
  */
7108
7176
  InterceptedApiType["LiveboardData"] = "LiveboardData";
7109
7177
  })(InterceptedApiType || (InterceptedApiType = {}));
@@ -7227,7 +7295,7 @@ var TableContentDensity;
7227
7295
  TableContentDensity["Compact"] = "COMPACT";
7228
7296
  })(TableContentDensity || (TableContentDensity = {}));
7229
7297
 
7230
- var version$1="1.51.1";var pkg = {version:version$1};
7298
+ var version$1="1.52.0";var pkg = {version:version$1};
7231
7299
 
7232
7300
  const { version } = pkg;
7233
7301
 
@@ -7475,6 +7543,23 @@ const serializeParam = (value) => {
7475
7543
  }
7476
7544
  return JSON.stringify(value);
7477
7545
  };
7546
+ /**
7547
+ * Inverse of serializeParam: JSON.parse with fallback to the raw string,
7548
+ * matching how the app parses the same values from the iframe URL.
7549
+ */
7550
+ const deserializeParam = (value) => {
7551
+ if (typeof value !== 'string')
7552
+ return value;
7553
+ try {
7554
+ const parsed = JSON.parse(value);
7555
+ // Numeric strings stay strings ('123' !== 123), same as the app's
7556
+ // URL parser — param consumers expect string ids/versions.
7557
+ return typeof parsed === 'number' ? value : parsed;
7558
+ }
7559
+ catch (e) {
7560
+ return value;
7561
+ }
7562
+ };
7478
7563
  /**
7479
7564
  * Convert a value to a string:
7480
7565
  * in case of an array, we convert it to CSV.
@@ -9942,7 +10027,7 @@ class AnswerService {
9942
10027
  async getTML() {
9943
10028
  const { object } = await this.executeQuery(getAnswerTML, {});
9944
10029
  const edoc = object[0].edoc;
9945
- const YAML = await import('./index-DxLfQxoT.js');
10030
+ const YAML = await import('./index-BMppCU63.js');
9946
10031
  const parsedDoc = YAML.parse(edoc);
9947
10032
  return {
9948
10033
  answer: {
@@ -21251,6 +21336,7 @@ const handleInterceptEvent = async (params) => {
21251
21336
  errorType: ErrorDetailsTypes.API,
21252
21337
  message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21253
21338
  code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
21339
+ severity: EmbedErrorSeverity.SEV3,
21254
21340
  error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
21255
21341
  };
21256
21342
  executeEvent(EmbedEvent.Error, errorDetails);
@@ -21595,6 +21681,7 @@ class TsEmbed {
21595
21681
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21596
21682
  message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21597
21683
  code: EmbedErrorCodes.INIT_ERROR,
21684
+ severity: EmbedErrorSeverity.SEV1,
21598
21685
  error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
21599
21686
  });
21600
21687
  }
@@ -21605,7 +21692,10 @@ class TsEmbed {
21605
21692
  */
21606
21693
  handleError(errorDetails) {
21607
21694
  this.isError = true;
21608
- this.executeCallbacks(EmbedEvent.Error, errorDetails);
21695
+ this.executeCallbacks(EmbedEvent.Error, {
21696
+ severity: EmbedErrorSeverity.SEV3,
21697
+ ...errorDetails,
21698
+ });
21609
21699
  // Log error
21610
21700
  logger$3.error(errorDetails);
21611
21701
  }
@@ -21690,6 +21780,7 @@ class TsEmbed {
21690
21780
  errorType: ErrorDetailsTypes.NETWORK,
21691
21781
  message: ERROR_MESSAGE.OFFLINE_WARNING,
21692
21782
  code: EmbedErrorCodes.NETWORK_ERROR,
21783
+ severity: EmbedErrorSeverity.SEV2,
21693
21784
  offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
21694
21785
  };
21695
21786
  this.executeCallbacks(EmbedEvent.Error, errorDetails);
@@ -21847,10 +21938,14 @@ class TsEmbed {
21847
21938
  return `${basePath}#`;
21848
21939
  }
21849
21940
  async getUpdateEmbedParamsObject() {
21850
- let queryParams = this.getEmbedParamsObject();
21941
+ const queryParams = this.getEmbedParamsObject();
21942
+ // Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
21943
+ // them back so the event payload matches a URL load (SCAL-334713).
21944
+ Object.keys(queryParams).forEach((key) => {
21945
+ queryParams[key] = deserializeParam(queryParams[key]);
21946
+ });
21851
21947
  const appInitData = await this.getAppInitData();
21852
- queryParams = { ...this.viewConfig, ...queryParams, ...appInitData };
21853
- return queryParams;
21948
+ return { ...this.viewConfig, ...queryParams, ...appInitData };
21854
21949
  }
21855
21950
  /**
21856
21951
  * Common query params set for all the embed modes.
@@ -22058,9 +22153,10 @@ class TsEmbed {
22058
22153
  return iFrame;
22059
22154
  }
22060
22155
  /**
22061
- * Returns a merged {@link PreRenderConfig} object where each shared key
22062
- * prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
22063
- * backward compatibility.
22156
+ * Returns a merged {@link PreRenderConfig} object where each key prefers the
22157
+ * value from `preRenderConfig` over its deprecated top-level `viewConfig`
22158
+ * counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
22159
+ * `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
22064
22160
  */
22065
22161
  getPreRenderConfig() {
22066
22162
  var _a, _b, _c, _d;
@@ -22068,16 +22164,16 @@ class TsEmbed {
22068
22164
  const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
22069
22165
  return {
22070
22166
  ...preRenderCfg,
22071
- preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22072
- preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22073
- doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22167
+ id: (_b = preRenderCfg.id) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
22168
+ containerSelector: (_c = preRenderCfg.containerSelector) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
22169
+ doNotTrackSize: (_d = preRenderCfg.doNotTrackSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
22074
22170
  };
22075
22171
  }
22076
22172
  /**
22077
22173
  * Returns true if this embed instance is configured for pre-rendering.
22078
22174
  */
22079
22175
  isPreRenderEmbed() {
22080
- return !!this.getPreRenderConfig().preRenderId;
22176
+ return !!this.getPreRenderConfig().id;
22081
22177
  }
22082
22178
  handleInsertionIntoDOM(child) {
22083
22179
  if (this.isPreRenderEmbed()) {
@@ -22173,6 +22269,7 @@ class TsEmbed {
22173
22269
  errorType: ErrorDetailsTypes.API,
22174
22270
  message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
22175
22271
  code: EmbedErrorCodes.LOGIN_FAILED,
22272
+ severity: EmbedErrorSeverity.SEV1,
22176
22273
  error: error,
22177
22274
  });
22178
22275
  });
@@ -22264,7 +22361,7 @@ class TsEmbed {
22264
22361
  */
22265
22362
  resolvePreRenderContainerTarget() {
22266
22363
  var _a;
22267
- const containerConfig = this.getPreRenderConfig().preRenderContainer;
22364
+ const containerConfig = this.getPreRenderConfig().containerSelector;
22268
22365
  let container = null;
22269
22366
  if (typeof containerConfig === 'string') {
22270
22367
  try {
@@ -22289,7 +22386,7 @@ class TsEmbed {
22289
22386
  return;
22290
22387
  }
22291
22388
  const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
22292
- if (this.getPreRenderConfig().preRenderContainer
22389
+ if (this.getPreRenderConfig().containerSelector
22293
22390
  && this.resolvePreRenderContainerTarget() !== ownerContainer) {
22294
22391
  logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
22295
22392
  + 'the one passed here is ignored. Set it on the PreRender component instead.');
@@ -22786,7 +22883,7 @@ class TsEmbed {
22786
22883
  showPreRenderByDefault,
22787
22884
  replaceExistingPreRender,
22788
22885
  });
22789
- if (!this.getPreRenderConfig().preRenderId) {
22886
+ if (!this.getPreRenderConfig().id) {
22790
22887
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22791
22888
  return this;
22792
22889
  }
@@ -22962,12 +23059,12 @@ class TsEmbed {
22962
23059
  async showPreRender() {
22963
23060
  var _a, _b;
22964
23061
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
22965
- preRenderId: this.getPreRenderConfig().preRenderId,
23062
+ preRenderId: this.getPreRenderConfig().id,
22966
23063
  embedComponentType: this.viewConfig.embedComponentType,
22967
23064
  });
22968
23065
  if (this.shouldWaitForRenderPromise)
22969
23066
  await this.isReadyForRenderPromise;
22970
- if (!this.getPreRenderConfig().preRenderId) {
23067
+ if (!this.getPreRenderConfig().id) {
22971
23068
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
22972
23069
  return this;
22973
23070
  }
@@ -23003,7 +23100,7 @@ class TsEmbed {
23003
23100
  this.containerScrollListener = () => this.syncPreRenderStyle();
23004
23101
  customContainer.addEventListener('scroll', this.containerScrollListener);
23005
23102
  }
23006
- if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
23103
+ if (!this.getPreRenderConfig().doNotTrackSize) {
23007
23104
  const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
23008
23105
  this.resizeObserver = new ResizeObserver((entries) => {
23009
23106
  entries.forEach((entry) => {
@@ -23071,7 +23168,7 @@ class TsEmbed {
23071
23168
  */
23072
23169
  hidePreRender() {
23073
23170
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
23074
- preRenderId: this.getPreRenderConfig().preRenderId,
23171
+ preRenderId: this.getPreRenderConfig().id,
23075
23172
  embedComponentType: this.viewConfig.embedComponentType,
23076
23173
  });
23077
23174
  logger$3.debug('HidePreRender Called');
@@ -23109,7 +23206,7 @@ class TsEmbed {
23109
23206
  * @property {string} child - The HTML element ID for the PreRender child.
23110
23207
  */
23111
23208
  getPreRenderIds() {
23112
- const preRenderId = this.getPreRenderConfig().preRenderId;
23209
+ const preRenderId = this.getPreRenderConfig().id;
23113
23210
  return {
23114
23211
  wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
23115
23212
  child: `tsEmbed-pre-render-child-${preRenderId}`,
@@ -24318,6 +24415,7 @@ class LiveboardEmbed extends V1Embed {
24318
24415
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
24319
24416
  message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24320
24417
  code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
24418
+ severity: EmbedErrorSeverity.SEV1,
24321
24419
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
24322
24420
  });
24323
24421
  }
@@ -24469,7 +24567,7 @@ class LiveboardEmbed extends V1Embed {
24469
24567
  if (this.isRendered) {
24470
24568
  this.trigger(HostEvent.Navigate, path.substring(1));
24471
24569
  }
24472
- else if (this.getPreRenderConfig().preRenderId) {
24570
+ else if (this.getPreRenderConfig().id) {
24473
24571
  this.preRender(true);
24474
24572
  }
24475
24573
  else {
@@ -26109,4 +26207,4 @@ class AutoFrameRenderer extends TsEmbed {
26109
26207
  }
26110
26208
  }
26111
26209
 
26112
- export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
26210
+ export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedErrorSeverity, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };