@thoughtspot/visual-embed-sdk 1.47.2 → 1.48.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 (190) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +11 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/auth.spec.js +38 -0
  6. package/cjs/src/auth.spec.js.map +1 -1
  7. package/cjs/src/authToken.d.ts +2 -0
  8. package/cjs/src/authToken.d.ts.map +1 -1
  9. package/cjs/src/authToken.js +7 -5
  10. package/cjs/src/authToken.js.map +1 -1
  11. package/cjs/src/embed/app.d.ts +7 -2
  12. package/cjs/src/embed/app.d.ts.map +1 -1
  13. package/cjs/src/embed/app.js +4 -1
  14. package/cjs/src/embed/app.js.map +1 -1
  15. package/cjs/src/embed/app.spec.js +121 -0
  16. package/cjs/src/embed/app.spec.js.map +1 -1
  17. package/cjs/src/embed/conversation.d.ts +2 -1
  18. package/cjs/src/embed/conversation.d.ts.map +1 -1
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/liveboard.d.ts +1 -1
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js +4 -1
  23. package/cjs/src/embed/liveboard.js.map +1 -1
  24. package/cjs/src/embed/liveboard.spec.js +32 -0
  25. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  26. package/cjs/src/embed/search.d.ts +24 -1
  27. package/cjs/src/embed/search.d.ts.map +1 -1
  28. package/cjs/src/embed/search.js +15 -2
  29. package/cjs/src/embed/search.js.map +1 -1
  30. package/cjs/src/embed/search.spec.js +99 -0
  31. package/cjs/src/embed/search.spec.js.map +1 -1
  32. package/cjs/src/embed/spotter-utils.d.ts +3 -0
  33. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  34. package/cjs/src/embed/spotter-utils.js +11 -3
  35. package/cjs/src/embed/spotter-utils.js.map +1 -1
  36. package/cjs/src/embed/spotter-utils.spec.js +51 -0
  37. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  38. package/cjs/src/embed/ts-embed.d.ts +1 -0
  39. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  40. package/cjs/src/embed/ts-embed.js +17 -5
  41. package/cjs/src/embed/ts-embed.js.map +1 -1
  42. package/cjs/src/embed/ts-embed.spec.js +168 -0
  43. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  44. package/cjs/src/index.d.ts +2 -2
  45. package/cjs/src/index.d.ts.map +1 -1
  46. package/cjs/src/index.js +8 -1
  47. package/cjs/src/index.js.map +1 -1
  48. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  49. package/cjs/src/mixpanel-service.js +2 -0
  50. package/cjs/src/mixpanel-service.js.map +1 -1
  51. package/cjs/src/mixpanel-service.spec.js +2 -0
  52. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  53. package/cjs/src/test/test-utils.d.ts +1 -0
  54. package/cjs/src/test/test-utils.d.ts.map +1 -1
  55. package/cjs/src/test/test-utils.js +26 -1
  56. package/cjs/src/test/test-utils.js.map +1 -1
  57. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  58. package/cjs/src/tokenizedFetch.js +12 -9
  59. package/cjs/src/tokenizedFetch.js.map +1 -1
  60. package/cjs/src/tokenizedFetch.spec.d.ts +2 -0
  61. package/cjs/src/tokenizedFetch.spec.d.ts.map +1 -0
  62. package/cjs/src/tokenizedFetch.spec.js +68 -0
  63. package/cjs/src/tokenizedFetch.spec.js.map +1 -0
  64. package/cjs/src/types.d.ts +466 -13
  65. package/cjs/src/types.d.ts.map +1 -1
  66. package/cjs/src/types.js +149 -5
  67. package/cjs/src/types.js.map +1 -1
  68. package/dist/{index-CFZ7RDZ9.js → index-Ck-r09gt.js} +1 -1
  69. package/dist/src/auth.d.ts.map +1 -1
  70. package/dist/src/authToken.d.ts +2 -0
  71. package/dist/src/authToken.d.ts.map +1 -1
  72. package/dist/src/embed/app.d.ts +7 -2
  73. package/dist/src/embed/app.d.ts.map +1 -1
  74. package/dist/src/embed/conversation.d.ts +2 -1
  75. package/dist/src/embed/conversation.d.ts.map +1 -1
  76. package/dist/src/embed/liveboard.d.ts +1 -1
  77. package/dist/src/embed/liveboard.d.ts.map +1 -1
  78. package/dist/src/embed/search.d.ts +24 -1
  79. package/dist/src/embed/search.d.ts.map +1 -1
  80. package/dist/src/embed/spotter-utils.d.ts +3 -0
  81. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  82. package/dist/src/embed/ts-embed.d.ts +1 -0
  83. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  84. package/dist/src/index.d.ts +2 -2
  85. package/dist/src/index.d.ts.map +1 -1
  86. package/dist/src/mixpanel-service.d.ts.map +1 -1
  87. package/dist/src/test/test-utils.d.ts +1 -0
  88. package/dist/src/test/test-utils.d.ts.map +1 -1
  89. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  90. package/dist/src/tokenizedFetch.spec.d.ts +2 -0
  91. package/dist/src/tokenizedFetch.spec.d.ts.map +1 -0
  92. package/dist/src/types.d.ts +466 -13
  93. package/dist/src/types.d.ts.map +1 -1
  94. package/dist/tsembed-react.es.js +226 -29
  95. package/dist/tsembed-react.js +225 -28
  96. package/dist/tsembed.es.js +227 -30
  97. package/dist/tsembed.js +225 -28
  98. package/dist/visual-embed-sdk-react-full.d.ts +469 -15
  99. package/dist/visual-embed-sdk-react.d.ts +469 -15
  100. package/dist/visual-embed-sdk.d.ts +497 -15
  101. package/lib/package.json +1 -1
  102. package/lib/src/auth.d.ts.map +1 -1
  103. package/lib/src/auth.js +12 -2
  104. package/lib/src/auth.js.map +1 -1
  105. package/lib/src/auth.spec.js +38 -0
  106. package/lib/src/auth.spec.js.map +1 -1
  107. package/lib/src/authToken.d.ts +2 -0
  108. package/lib/src/authToken.d.ts.map +1 -1
  109. package/lib/src/authToken.js +2 -2
  110. package/lib/src/authToken.js.map +1 -1
  111. package/lib/src/embed/app.d.ts +7 -2
  112. package/lib/src/embed/app.d.ts.map +1 -1
  113. package/lib/src/embed/app.js +4 -1
  114. package/lib/src/embed/app.js.map +1 -1
  115. package/lib/src/embed/app.spec.js +122 -1
  116. package/lib/src/embed/app.spec.js.map +1 -1
  117. package/lib/src/embed/conversation.d.ts +2 -1
  118. package/lib/src/embed/conversation.d.ts.map +1 -1
  119. package/lib/src/embed/conversation.js.map +1 -1
  120. package/lib/src/embed/liveboard.d.ts +1 -1
  121. package/lib/src/embed/liveboard.d.ts.map +1 -1
  122. package/lib/src/embed/liveboard.js +4 -1
  123. package/lib/src/embed/liveboard.js.map +1 -1
  124. package/lib/src/embed/liveboard.spec.js +32 -0
  125. package/lib/src/embed/liveboard.spec.js.map +1 -1
  126. package/lib/src/embed/search.d.ts +24 -1
  127. package/lib/src/embed/search.d.ts.map +1 -1
  128. package/lib/src/embed/search.js +15 -2
  129. package/lib/src/embed/search.js.map +1 -1
  130. package/lib/src/embed/search.spec.js +100 -1
  131. package/lib/src/embed/search.spec.js.map +1 -1
  132. package/lib/src/embed/spotter-utils.d.ts +3 -0
  133. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  134. package/lib/src/embed/spotter-utils.js +11 -3
  135. package/lib/src/embed/spotter-utils.js.map +1 -1
  136. package/lib/src/embed/spotter-utils.spec.js +51 -0
  137. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  138. package/lib/src/embed/ts-embed.d.ts +1 -0
  139. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  140. package/lib/src/embed/ts-embed.js +16 -4
  141. package/lib/src/embed/ts-embed.js.map +1 -1
  142. package/lib/src/embed/ts-embed.spec.js +168 -0
  143. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  144. package/lib/src/index.d.ts +2 -2
  145. package/lib/src/index.d.ts.map +1 -1
  146. package/lib/src/index.js +2 -2
  147. package/lib/src/index.js.map +1 -1
  148. package/lib/src/mixpanel-service.d.ts.map +1 -1
  149. package/lib/src/mixpanel-service.js +2 -0
  150. package/lib/src/mixpanel-service.js.map +1 -1
  151. package/lib/src/mixpanel-service.spec.js +2 -0
  152. package/lib/src/mixpanel-service.spec.js.map +1 -1
  153. package/lib/src/test/test-utils.d.ts +1 -0
  154. package/lib/src/test/test-utils.d.ts.map +1 -1
  155. package/lib/src/test/test-utils.js +25 -1
  156. package/lib/src/test/test-utils.js.map +1 -1
  157. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  158. package/lib/src/tokenizedFetch.js +13 -10
  159. package/lib/src/tokenizedFetch.js.map +1 -1
  160. package/lib/src/tokenizedFetch.spec.d.ts +2 -0
  161. package/lib/src/tokenizedFetch.spec.d.ts.map +1 -0
  162. package/lib/src/tokenizedFetch.spec.js +65 -0
  163. package/lib/src/tokenizedFetch.spec.js.map +1 -0
  164. package/lib/src/types.d.ts +466 -13
  165. package/lib/src/types.d.ts.map +1 -1
  166. package/lib/src/types.js +148 -4
  167. package/lib/src/types.js.map +1 -1
  168. package/lib/src/visual-embed-sdk.d.ts +497 -15
  169. package/package.json +1 -1
  170. package/src/auth.spec.ts +55 -1
  171. package/src/auth.ts +11 -2
  172. package/src/authToken.ts +2 -2
  173. package/src/embed/app.spec.ts +154 -0
  174. package/src/embed/app.ts +13 -2
  175. package/src/embed/conversation.ts +2 -1
  176. package/src/embed/liveboard.spec.ts +46 -0
  177. package/src/embed/liveboard.ts +9 -4
  178. package/src/embed/search.spec.ts +118 -0
  179. package/src/embed/search.ts +43 -1
  180. package/src/embed/spotter-utils.spec.ts +52 -0
  181. package/src/embed/spotter-utils.ts +19 -3
  182. package/src/embed/ts-embed.spec.ts +220 -0
  183. package/src/embed/ts-embed.ts +15 -4
  184. package/src/index.ts +16 -0
  185. package/src/mixpanel-service.spec.ts +2 -0
  186. package/src/mixpanel-service.ts +2 -0
  187. package/src/test/test-utils.ts +33 -1
  188. package/src/tokenizedFetch.spec.ts +81 -0
  189. package/src/tokenizedFetch.ts +14 -11
  190. package/src/types.ts +496 -13
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.47.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.48.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -4203,6 +4203,7 @@
4203
4203
  Param["ShowLiveboardTitle"] = "showLiveboardTitle";
4204
4204
  Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
4205
4205
  Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
4206
+ Param["EnableNewChartLibrary"] = "muzeChartPhase1EnabledGA";
4206
4207
  Param["HiddenTabs"] = "hideTabs";
4207
4208
  Param["VisibleTabs"] = "visibleTabs";
4208
4209
  Param["HideTabPanel"] = "hideTabPanel";
@@ -4283,10 +4284,14 @@
4283
4284
  /**
4284
4285
  * ThoughtSpot application pages include actions and menu commands
4285
4286
  * for various user-initiated operations. These actions are represented
4286
- * as enumeration members in the SDK. To show, hide, or disable
4287
- * specific actions in the embedded view, define the Action
4288
- * enumeration members in the `disabledActions`, `visibleActions`,
4289
- * or `hiddenActions` array.
4287
+ * as enumeration members in the SDK. To control actions in the embedded view:
4288
+ * - disabledActions the action is grayed out and still visible, but non-interactive (user can see but not click).
4289
+ * - hiddenActions the action is completely removed from the UI (user cannot see it at all).
4290
+ * - visibleActions — allowlist, only these actions are shown; all others are hidden.
4291
+ *
4292
+ * Use disabledActions to disable (gray out) an action.
4293
+ * Use hiddenActions to hide (fully remove) an action.
4294
+ * Use visibleActions to show only specific actions.
4290
4295
  * @example
4291
4296
  * ```js
4292
4297
  * const embed = new LiveboardEmbed('#tsEmbed', {
@@ -5136,6 +5141,26 @@
5136
5141
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw
5137
5142
  */
5138
5143
  Action["AxisMenuRemove"] = "axisMenuRemove";
5144
+ /**
5145
+ * The **Compare with** action in the chart axis customization menu.
5146
+ * Allows comparing data across dimensions or measures.
5147
+ * @example
5148
+ * ```js
5149
+ * disabledActions: [Action.AxisMenuCompare]
5150
+ * ```
5151
+ * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
5152
+ */
5153
+ Action["AxisMenuCompare"] = "axisMenuCompare";
5154
+ /**
5155
+ * The **Merge with** action in the chart axis customization menu.
5156
+ * Allows merging data across dimensions or measures.
5157
+ * @example
5158
+ * ```js
5159
+ * disabledActions: [Action.AxisMenuMerge]
5160
+ * ```
5161
+ * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
5162
+ */
5163
+ Action["AxisMenuMerge"] = "axisMenuMerge";
5139
5164
  /**
5140
5165
  * @hidden
5141
5166
  */
@@ -6251,7 +6276,126 @@
6251
6276
  * The apis that are use to get the data for the liveboard
6252
6277
  */
6253
6278
  InterceptedApiType["LiveboardData"] = "LiveboardData";
6254
- })(InterceptedApiType || (InterceptedApiType = {}));
6279
+ })(InterceptedApiType || (InterceptedApiType = {}));
6280
+ /**
6281
+ * Data label filter operators
6282
+ * @group Visual Overrides
6283
+ */
6284
+ var DataLabelFilterOperator;
6285
+ (function (DataLabelFilterOperator) {
6286
+ /** Greater than */
6287
+ DataLabelFilterOperator["GreaterThan"] = "GREATER_THAN";
6288
+ /** Less than */
6289
+ DataLabelFilterOperator["LessThan"] = "LESS_THAN";
6290
+ /** Greater than or equal to */
6291
+ DataLabelFilterOperator["GreaterThanOrEqualTo"] = "GREATER_THAN_OR_EQUAL_TO";
6292
+ /** Less than or equal to */
6293
+ DataLabelFilterOperator["LessThanOrEqualTo"] = "LESS_THAN_OR_EQUAL_TO";
6294
+ /** Equal to */
6295
+ DataLabelFilterOperator["EqualTo"] = "EQUAL_TO";
6296
+ /** Not equal to */
6297
+ DataLabelFilterOperator["NotEqualTo"] = "NOT_EQUAL_TO";
6298
+ })(DataLabelFilterOperator || (DataLabelFilterOperator = {}));
6299
+ /**
6300
+ * Conditional formatting operators
6301
+ * @group Visual Overrides
6302
+ */
6303
+ var ConditionalFormattingOperator;
6304
+ (function (ConditionalFormattingOperator) {
6305
+ /** Is equal to */
6306
+ ConditionalFormattingOperator["Is"] = "IS";
6307
+ /** Is not equal to */
6308
+ ConditionalFormattingOperator["IsNot"] = "IS_NOT";
6309
+ /** Contains */
6310
+ ConditionalFormattingOperator["Contains"] = "CONTAINS";
6311
+ /** Does not contain */
6312
+ ConditionalFormattingOperator["DoesNotContain"] = "DOES_NOT_CONTAIN";
6313
+ /** Starts with */
6314
+ ConditionalFormattingOperator["StartsWith"] = "STARTS_WITH";
6315
+ /** Ends with */
6316
+ ConditionalFormattingOperator["EndsWith"] = "ENDS_WITH";
6317
+ /** Greater than */
6318
+ ConditionalFormattingOperator["GreaterThan"] = "GREATER_THAN";
6319
+ /** Less than */
6320
+ ConditionalFormattingOperator["LessThan"] = "LESS_THAN";
6321
+ /** Greater than or equal to */
6322
+ ConditionalFormattingOperator["GreaterThanEqualTo"] = "GREATER_THAN_EQUAL_TO";
6323
+ /** Less than or equal to */
6324
+ ConditionalFormattingOperator["LessThanEqualTo"] = "LESS_THAN_EQUAL_TO";
6325
+ /** Equal to */
6326
+ ConditionalFormattingOperator["EqualTo"] = "EQUAL_TO";
6327
+ /** Not equal to */
6328
+ ConditionalFormattingOperator["NotEqualTo"] = "NOT_EQUAL_TO";
6329
+ /** Is between */
6330
+ ConditionalFormattingOperator["IsBetween"] = "IS_BETWEEN";
6331
+ /** Is null */
6332
+ ConditionalFormattingOperator["IsNull"] = "IS_NULL";
6333
+ /** Is not null */
6334
+ ConditionalFormattingOperator["IsNotNull"] = "IS_NOT_NULL";
6335
+ })(ConditionalFormattingOperator || (ConditionalFormattingOperator = {}));
6336
+ /**
6337
+ * Background format types for conditional formatting
6338
+ * @group Visual Overrides
6339
+ */
6340
+ var BackgroundFormatType;
6341
+ (function (BackgroundFormatType) {
6342
+ /** Solid color background */
6343
+ BackgroundFormatType["Solid"] = "SOLID";
6344
+ /** Gradient background */
6345
+ BackgroundFormatType["Gradient"] = "GRADIENT";
6346
+ })(BackgroundFormatType || (BackgroundFormatType = {}));
6347
+ /**
6348
+ * Comparison types for conditional formatting
6349
+ * @group Visual Overrides
6350
+ */
6351
+ var ConditionalFormattingComparisonType;
6352
+ (function (ConditionalFormattingComparisonType) {
6353
+ /** Value-based comparison */
6354
+ ConditionalFormattingComparisonType["ValueBased"] = "VALUE_BASED";
6355
+ /** Column-based comparison */
6356
+ ConditionalFormattingComparisonType["ColumnBased"] = "COLUMN_BASED";
6357
+ /** Parameter-based comparison */
6358
+ ConditionalFormattingComparisonType["ParameterBased"] = "PARAMETER_BASED";
6359
+ })(ConditionalFormattingComparisonType || (ConditionalFormattingComparisonType = {}));
6360
+ /**
6361
+ * Legend position options
6362
+ * @group Visual Overrides
6363
+ */
6364
+ var LegendPosition;
6365
+ (function (LegendPosition) {
6366
+ /** Position legend at the top */
6367
+ LegendPosition["Top"] = "top";
6368
+ /** Position legend at the bottom */
6369
+ LegendPosition["Bottom"] = "bottom";
6370
+ /** Position legend on the left */
6371
+ LegendPosition["Left"] = "left";
6372
+ /** Position legend on the right */
6373
+ LegendPosition["Right"] = "right";
6374
+ })(LegendPosition || (LegendPosition = {}));
6375
+ /**
6376
+ * Table theme options
6377
+ * @group Visual Overrides
6378
+ */
6379
+ var TableTheme;
6380
+ (function (TableTheme) {
6381
+ /** Outline theme */
6382
+ TableTheme["Outline"] = "OUTLINE";
6383
+ /** Row theme */
6384
+ TableTheme["Row"] = "ROW";
6385
+ /** Zebra theme */
6386
+ TableTheme["Zebra"] = "ZEBRA";
6387
+ })(TableTheme || (TableTheme = {}));
6388
+ /**
6389
+ * Table content density options
6390
+ * @group Visual Overrides
6391
+ */
6392
+ var TableContentDensity;
6393
+ (function (TableContentDensity) {
6394
+ /** Regular density */
6395
+ TableContentDensity["Regular"] = "REGULAR";
6396
+ /** Compact density */
6397
+ TableContentDensity["Compact"] = "COMPACT";
6398
+ })(TableContentDensity || (TableContentDensity = {}));
6255
6399
 
6256
6400
  const logFunctions = {
6257
6401
  [exports.LogLevel.SILENT]: () => undefined,
@@ -9453,17 +9597,20 @@
9453
9597
  */
9454
9598
  const tokenizedFetch = async (input, init) => {
9455
9599
  const embedConfig = getEmbedConfig();
9600
+ const options = { ...init };
9601
+ let token;
9456
9602
  if (embedConfig.authType !== AuthType.TrustedAuthTokenCookieless) {
9457
- return fetch(input, {
9458
- // ensure cookies are included for the non cookie-less api calls.
9459
- credentials: 'include',
9460
- ...init,
9461
- });
9603
+ token = getCacheAuthToken();
9604
+ if (!token) {
9605
+ return fetch(input, { ...options, credentials: 'include' });
9606
+ }
9462
9607
  }
9463
- const req = new Request(input, init);
9464
- const authToken = await getAuthenticationToken(embedConfig);
9465
- if (authToken) {
9466
- req.headers.append('Authorization', `Bearer ${authToken}`);
9608
+ else {
9609
+ token = await getAuthenticationToken(embedConfig);
9610
+ }
9611
+ const req = new Request(input, options);
9612
+ if (token) {
9613
+ req.headers.append('Authorization', `Bearer ${token}`);
9467
9614
  }
9468
9615
  return fetch(req);
9469
9616
  };
@@ -17825,6 +17972,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17825
17972
  default: mixpanel_cjs
17826
17973
  }, [mixpanel_cjs]);
17827
17974
 
17975
+ var version="1.48.0";
17976
+
17828
17977
  // Needed to avoid error in CJS builds on some bundlers.
17829
17978
  const mixpanelLib = mixpanel_cjs || mixpanel$1;
17830
17979
  let mixpanelInstance;
@@ -17891,6 +18040,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17891
18040
  clusterName: sessionInfo.clusterName,
17892
18041
  releaseVersion: sessionInfo.releaseVersion,
17893
18042
  hostAppUrl: ((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.host) || '',
18043
+ sdkVersion: version,
17894
18044
  });
17895
18045
  isMixpanelInitialized = true;
17896
18046
  emptyQueue();
@@ -18878,6 +19028,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18878
19028
  samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
18879
19029
  window.addEventListener('message', (e) => {
18880
19030
  if (e.data.type === exports.EmbedEvent.SAMLComplete) {
19031
+ if (e.data.accessToken) {
19032
+ const decodedToken = decodeURIComponent(e.data.accessToken);
19033
+ storeAuthTokenInCache(decodedToken);
19034
+ }
18881
19035
  samlCompletionResolved = true;
18882
19036
  if (popupClosedCheck) {
18883
19037
  clearInterval(popupClosedCheck);
@@ -18915,7 +19069,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18915
19069
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
18916
19070
  if (embedConfig.inPopup) {
18917
19071
  await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
18918
- loggedInStatus = await isLoggedIn(thoughtSpotHost);
19072
+ const cachedToken = getCacheAuthToken();
19073
+ if (cachedToken) {
19074
+ loggedInStatus = true;
19075
+ }
19076
+ else {
19077
+ loggedInStatus = await isLoggedIn(thoughtSpotHost);
19078
+ }
18919
19079
  return;
18920
19080
  }
18921
19081
  window.location.href = ssoURL;
@@ -19389,8 +19549,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19389
19549
  return eventData;
19390
19550
  }
19391
19551
 
19392
- var version$1="1.47.2";var pkgInfo = {version:version$1};
19393
-
19394
19552
  function isValidUpdateFiltersPayload(payload) {
19395
19553
  if (!payload)
19396
19554
  return false;
@@ -19801,7 +19959,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19801
19959
  * @summary Base classes
19802
19960
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
19803
19961
  */
19804
- const { version } = pkgInfo;
19805
19962
  /**
19806
19963
  * Global prefix for all ThoughtSpot postHash Params.
19807
19964
  */
@@ -20228,7 +20385,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20228
20385
  return authToken;
20229
20386
  }
20230
20387
  async getDefaultAppInitData() {
20231
- var _a, _b;
20388
+ var _a, _b, _c;
20232
20389
  const authToken = await this.getAuthTokenForCookielessInit();
20233
20390
  const customActionsResult = getCustomActions([
20234
20391
  ...(this.viewConfig.customActions || []),
@@ -20260,7 +20417,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20260
20417
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
20261
20418
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
20262
20419
  customActions: customActionsResult.actions,
20263
- embedExpiryInAuthToken: this.viewConfig.refreshAuthTokenOnNearExpiry,
20420
+ embedExpiryInAuthToken: (_c = this.viewConfig.refreshAuthTokenOnNearExpiry) !== null && _c !== void 0 ? _c : true,
20264
20421
  ...getInterceptInitData(this.viewConfig),
20265
20422
  ...getHostEventsConfig(this.viewConfig),
20266
20423
  };
@@ -20716,6 +20873,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20716
20873
  setIFrameHeight(height) {
20717
20874
  this.iFrame.style.height = getCssDimension(height);
20718
20875
  }
20876
+ shouldSkipEvent(eventType, data) {
20877
+ var _a, _b, _c;
20878
+ const errorType = (_a = data === null || data === void 0 ? void 0 : data.errorType) !== null && _a !== void 0 ? _a : (_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.code;
20879
+ if (eventType === exports.EmbedEvent.Error
20880
+ && errorType === EmbedErrorCodes.HOST_EVENT_VALIDATION
20881
+ && (!getHostEventsConfig(this.viewConfig).useHostEventsV2 || getHostEventsConfig(this.viewConfig).shouldBypassPayloadValidation)) {
20882
+ logger$3.warn(`Host Event Validation failed: ${(_c = data === null || data === void 0 ? void 0 : data.data) === null || _c === void 0 ? void 0 : _c.message}`);
20883
+ return true;
20884
+ }
20885
+ return false;
20886
+ }
20719
20887
  /**
20720
20888
  * Executes all registered event handlers for a particular event type
20721
20889
  * @param eventType The event type
@@ -20723,6 +20891,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20723
20891
  * @param eventPort The event Port for a specific MessageChannel
20724
20892
  */
20725
20893
  executeCallbacks(eventType, data, eventPort) {
20894
+ if (this.shouldSkipEvent(eventType, data))
20895
+ return;
20726
20896
  const eventHandlers = this.eventHandlerMap.get(eventType) || [];
20727
20897
  const allHandlers = this.eventHandlerMap.get(exports.EmbedEvent.ALL) || [];
20728
20898
  const callbacks = [...eventHandlers, ...allHandlers];
@@ -21538,11 +21708,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21538
21708
  }
21539
21709
  async getAppInitData() {
21540
21710
  const defaultAppInitData = await super.getAppInitData();
21541
- return { ...defaultAppInitData, ...this.getSearchInitData() };
21711
+ const result = {
21712
+ ...defaultAppInitData,
21713
+ ...this.getSearchInitData(),
21714
+ };
21715
+ if (this.viewConfig.visualOverrides) {
21716
+ result.embedParams = {
21717
+ ...(defaultAppInitData.embedParams || {}),
21718
+ visualOverridesParams: this.viewConfig.visualOverrides,
21719
+ };
21720
+ }
21721
+ return result;
21542
21722
  }
21543
21723
  getEmbedParamsObject() {
21544
21724
  var _a;
21545
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
21725
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, isThisPeriodInDateFiltersEnabled, newChartsLibrary, } = this.viewConfig;
21546
21726
  const queryParams = this.getBaseQueryParams();
21547
21727
  queryParams[Param.HideActions] = [
21548
21728
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -21580,6 +21760,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21580
21760
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
21581
21761
  queryParams[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
21582
21762
  }
21763
+ if (newChartsLibrary !== undefined) {
21764
+ queryParams[Param.EnableNewChartLibrary] = newChartsLibrary;
21765
+ }
21583
21766
  queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
21584
21767
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
21585
21768
  queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
@@ -21656,14 +21839,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21656
21839
  ? params.spotterSidebarConfigValue
21657
21840
  : params.standaloneValue);
21658
21841
  function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
21659
- const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
21842
+ const { spotterSidebarConfig, enablePastConversationsSidebar, visualOverrides } = viewConfig;
21660
21843
  const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
21661
21844
  spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21662
21845
  standaloneValue: enablePastConversationsSidebar,
21663
21846
  });
21664
21847
  const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
21665
- if (!hasConfig)
21666
- return defaultAppInitData;
21848
+ if (!hasConfig) {
21849
+ if (visualOverrides === undefined) {
21850
+ return defaultAppInitData;
21851
+ }
21852
+ return {
21853
+ ...defaultAppInitData,
21854
+ embedParams: { visualOverridesParams: visualOverrides },
21855
+ };
21856
+ }
21667
21857
  const resolvedSidebarConfig = {
21668
21858
  ...spotterSidebarConfig,
21669
21859
  ...(resolvedEnablePastConversations !== undefined && {
@@ -21687,6 +21877,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21687
21877
  embedParams: {
21688
21878
  ...(defaultAppInitData.embedParams || {}),
21689
21879
  spotterSidebarConfig: resolvedSidebarConfig,
21880
+ ...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
21690
21881
  },
21691
21882
  };
21692
21883
  }
@@ -21897,7 +22088,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21897
22088
  * embedded Liveboard or visualization.
21898
22089
  */
21899
22090
  getEmbedParams() {
21900
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
22091
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
21901
22092
  let params = {};
21902
22093
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
21903
22094
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -21908,6 +22099,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21908
22099
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
21909
22100
  params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
21910
22101
  params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
22102
+ if (newChartsLibrary !== undefined) {
22103
+ params[Param.EnableNewChartLibrary] = newChartsLibrary;
22104
+ }
21911
22105
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
21912
22106
  params[Param.IsFullAppEmbed] = true;
21913
22107
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -22365,7 +22559,7 @@ query GetEurekaVizSnapshots(
22365
22559
  getEmbedParamsObject() {
22366
22560
  let params = {};
22367
22561
  params = this.getBaseQueryParams(params);
22368
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
22562
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, newChartsLibrary, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled = false, enableLiveboardDataCache, } = this.viewConfig;
22369
22563
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
22370
22564
  || this.viewConfig.preventPinboardFilterRemoval;
22371
22565
  if (fullHeight === true) {
@@ -22463,6 +22657,9 @@ query GetEurekaVizSnapshots(
22463
22657
  if (enableLiveboardDataCache !== undefined) {
22464
22658
  params[Param.EnableLiveboardDataCache] = enableLiveboardDataCache;
22465
22659
  }
22660
+ if (newChartsLibrary !== undefined) {
22661
+ params[Param.EnableNewChartLibrary] = newChartsLibrary;
22662
+ }
22466
22663
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
22467
22664
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
22468
22665
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;