@thoughtspot/visual-embed-sdk 1.27.0-alpha.2 → 1.27.0-alpha.4

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 (242) 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 +5 -4
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +3 -2
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +5 -4
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts.map +1 -1
  11. package/cjs/src/embed/base.js +5 -2
  12. package/cjs/src/embed/base.js.map +1 -1
  13. package/cjs/src/embed/base.spec.js +3 -2
  14. package/cjs/src/embed/base.spec.js.map +1 -1
  15. package/cjs/src/embed/embed.spec.js +2 -1
  16. package/cjs/src/embed/embed.spec.js.map +1 -1
  17. package/cjs/src/embed/embedConfig.d.ts +2 -1
  18. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  19. package/cjs/src/embed/embedConfig.js +2 -0
  20. package/cjs/src/embed/embedConfig.js.map +1 -1
  21. package/cjs/src/embed/events.spec.js +3 -2
  22. package/cjs/src/embed/events.spec.js.map +1 -1
  23. package/cjs/src/embed/liveboard.d.ts +7 -0
  24. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  25. package/cjs/src/embed/liveboard.js +4 -1
  26. package/cjs/src/embed/liveboard.js.map +1 -1
  27. package/cjs/src/embed/liveboard.spec.js +2 -1
  28. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  29. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  30. package/cjs/src/embed/ts-embed.js +13 -10
  31. package/cjs/src/embed/ts-embed.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +27 -26
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/index.d.ts +2 -2
  35. package/cjs/src/index.d.ts.map +1 -1
  36. package/cjs/src/index.js +2 -1
  37. package/cjs/src/index.js.map +1 -1
  38. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  39. package/cjs/src/mixpanel-service.js +2 -1
  40. package/cjs/src/mixpanel-service.js.map +1 -1
  41. package/cjs/src/react/index.d.ts +1 -1
  42. package/cjs/src/react/index.d.ts.map +1 -1
  43. package/cjs/src/react/index.js +2 -1
  44. package/cjs/src/react/index.js.map +1 -1
  45. package/cjs/src/react/index.spec.js +2 -2
  46. package/cjs/src/react/index.spec.js.map +1 -1
  47. package/cjs/src/types.d.ts +66 -4
  48. package/cjs/src/types.d.ts.map +1 -1
  49. package/cjs/src/types.js +50 -1
  50. package/cjs/src/types.js.map +1 -1
  51. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  52. package/cjs/src/utils/authService/authService.js +3 -2
  53. package/cjs/src/utils/authService/authService.js.map +1 -1
  54. package/cjs/src/utils/authService/authService.spec.js +3 -2
  55. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  56. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  57. package/cjs/src/utils/authService/tokenizedAuthService.js +2 -1
  58. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  59. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  60. package/cjs/src/utils/graphql/answerService/answerService.js +1 -1
  61. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  62. package/cjs/src/utils/graphql/answerService/answerService.spec.js +2 -0
  63. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  64. package/cjs/src/utils/logger.d.ts +18 -0
  65. package/cjs/src/utils/logger.d.ts.map +1 -0
  66. package/cjs/src/utils/logger.js +80 -0
  67. package/cjs/src/utils/logger.js.map +1 -0
  68. package/cjs/src/utils/logger.spec.d.ts +25 -0
  69. package/cjs/src/utils/logger.spec.d.ts.map +1 -0
  70. package/cjs/src/utils/logger.spec.js +116 -0
  71. package/cjs/src/utils/logger.spec.js.map +1 -0
  72. package/dist/src/auth.d.ts.map +1 -1
  73. package/dist/src/embed/app.d.ts.map +1 -1
  74. package/dist/src/embed/base.d.ts.map +1 -1
  75. package/dist/src/embed/embedConfig.d.ts +2 -1
  76. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  77. package/dist/src/embed/liveboard.d.ts +7 -0
  78. package/dist/src/embed/liveboard.d.ts.map +1 -1
  79. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  80. package/dist/src/index.d.ts +2 -2
  81. package/dist/src/index.d.ts.map +1 -1
  82. package/dist/src/mixpanel-service.d.ts.map +1 -1
  83. package/dist/src/react/index.d.ts +1 -1
  84. package/dist/src/react/index.d.ts.map +1 -1
  85. package/dist/src/types.d.ts +66 -4
  86. package/dist/src/types.d.ts.map +1 -1
  87. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  88. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  89. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  90. package/dist/src/utils/logger.d.ts +18 -0
  91. package/dist/src/utils/logger.d.ts.map +1 -0
  92. package/dist/src/utils/logger.spec.d.ts +25 -0
  93. package/dist/src/utils/logger.spec.d.ts.map +1 -0
  94. package/dist/tsembed-react.es.js +193 -48
  95. package/dist/tsembed-react.js +191 -47
  96. package/dist/tsembed.es.js +516 -365
  97. package/dist/tsembed.js +14959 -14809
  98. package/dist/visual-embed-sdk-react-full.d.ts +76 -6
  99. package/dist/visual-embed-sdk-react.d.ts +76 -6
  100. package/dist/visual-embed-sdk.d.ts +76 -6
  101. package/lib/package.json +1 -1
  102. package/lib/src/auth.d.ts.map +1 -1
  103. package/lib/src/auth.js +5 -4
  104. package/lib/src/auth.js.map +1 -1
  105. package/lib/src/embed/app.d.ts.map +1 -1
  106. package/lib/src/embed/app.js +3 -2
  107. package/lib/src/embed/app.js.map +1 -1
  108. package/lib/src/embed/app.spec.js +5 -4
  109. package/lib/src/embed/app.spec.js.map +1 -1
  110. package/lib/src/embed/base.d.ts.map +1 -1
  111. package/lib/src/embed/base.js +6 -3
  112. package/lib/src/embed/base.js.map +1 -1
  113. package/lib/src/embed/base.spec.js +3 -2
  114. package/lib/src/embed/base.spec.js.map +1 -1
  115. package/lib/src/embed/embed.spec.js +2 -1
  116. package/lib/src/embed/embed.spec.js.map +1 -1
  117. package/lib/src/embed/embedConfig.d.ts +2 -1
  118. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  119. package/lib/src/embed/embedConfig.js +2 -0
  120. package/lib/src/embed/embedConfig.js.map +1 -1
  121. package/lib/src/embed/events.spec.js +3 -2
  122. package/lib/src/embed/events.spec.js.map +1 -1
  123. package/lib/src/embed/liveboard.d.ts +7 -0
  124. package/lib/src/embed/liveboard.d.ts.map +1 -1
  125. package/lib/src/embed/liveboard.js +4 -1
  126. package/lib/src/embed/liveboard.js.map +1 -1
  127. package/lib/src/embed/liveboard.spec.js +2 -1
  128. package/lib/src/embed/liveboard.spec.js.map +1 -1
  129. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  130. package/lib/src/embed/ts-embed.js +13 -10
  131. package/lib/src/embed/ts-embed.js.map +1 -1
  132. package/lib/src/embed/ts-embed.spec.js +27 -26
  133. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  134. package/lib/src/index.d.ts +2 -2
  135. package/lib/src/index.d.ts.map +1 -1
  136. package/lib/src/index.js +2 -2
  137. package/lib/src/index.js.map +1 -1
  138. package/lib/src/mixpanel-service.d.ts.map +1 -1
  139. package/lib/src/mixpanel-service.js +2 -1
  140. package/lib/src/mixpanel-service.js.map +1 -1
  141. package/lib/src/react/index.d.ts +1 -1
  142. package/lib/src/react/index.d.ts.map +1 -1
  143. package/lib/src/react/index.js +1 -1
  144. package/lib/src/react/index.js.map +1 -1
  145. package/lib/src/react/index.spec.js +2 -2
  146. package/lib/src/react/index.spec.js.map +1 -1
  147. package/lib/src/types.d.ts +66 -4
  148. package/lib/src/types.d.ts.map +1 -1
  149. package/lib/src/types.js +49 -0
  150. package/lib/src/types.js.map +1 -1
  151. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  152. package/lib/src/utils/authService/authService.js +3 -2
  153. package/lib/src/utils/authService/authService.js.map +1 -1
  154. package/lib/src/utils/authService/authService.spec.js +3 -2
  155. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  156. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  157. package/lib/src/utils/authService/tokenizedAuthService.js +2 -1
  158. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  159. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  160. package/lib/src/utils/graphql/answerService/answerService.js +1 -1
  161. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  162. package/lib/src/utils/graphql/answerService/answerService.spec.js +2 -0
  163. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  164. package/lib/src/utils/logger.d.ts +18 -0
  165. package/lib/src/utils/logger.d.ts.map +1 -0
  166. package/lib/src/utils/logger.js +74 -0
  167. package/lib/src/utils/logger.js.map +1 -0
  168. package/lib/src/utils/logger.spec.d.ts +25 -0
  169. package/lib/src/utils/logger.spec.d.ts.map +1 -0
  170. package/lib/src/utils/logger.spec.js +93 -0
  171. package/lib/src/utils/logger.spec.js.map +1 -0
  172. package/lib/src/visual-embed-sdk.d.ts +77 -7
  173. package/package.json +1 -1
  174. package/src/auth.ts +5 -4
  175. package/src/embed/app.spec.ts +5 -4
  176. package/src/embed/app.ts +3 -2
  177. package/src/embed/base.spec.ts +3 -2
  178. package/src/embed/base.ts +10 -3
  179. package/src/embed/embed.spec.ts +2 -1
  180. package/src/embed/embedConfig.ts +2 -0
  181. package/src/embed/events.spec.ts +3 -2
  182. package/src/embed/liveboard.spec.ts +2 -1
  183. package/src/embed/liveboard.ts +11 -0
  184. package/src/embed/ts-embed.spec.ts +27 -26
  185. package/src/embed/ts-embed.ts +20 -16
  186. package/src/index.ts +2 -0
  187. package/src/mixpanel-service.ts +2 -1
  188. package/src/react/index.spec.tsx +2 -2
  189. package/src/react/index.tsx +1 -0
  190. package/src/types.ts +65 -0
  191. package/src/utils/authService/authService.spec.ts +3 -2
  192. package/src/utils/authService/authService.ts +4 -2
  193. package/src/utils/authService/tokenizedAuthService.ts +2 -1
  194. package/src/utils/graphql/answerService/answerService.spec.ts +2 -0
  195. package/src/utils/graphql/answerService/answerService.ts +3 -1
  196. package/src/utils/logger.spec.ts +108 -0
  197. package/src/utils/logger.ts +88 -0
  198. package/cjs/.DS_Store +0 -0
  199. package/cjs/src/.DS_Store +0 -0
  200. package/cjs/src/utils/answerService.d.ts +0 -10
  201. package/cjs/src/utils/answerService.d.ts.map +0 -1
  202. package/cjs/src/utils/answerService.js +0 -61
  203. package/cjs/src/utils/answerService.js.map +0 -1
  204. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  205. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  206. package/cjs/src/utils/answerService.spec.js +0 -31
  207. package/cjs/src/utils/answerService.spec.js.map +0 -1
  208. package/cjs/src/utils/authService.d.ts +0 -37
  209. package/cjs/src/utils/authService.d.ts.map +0 -1
  210. package/cjs/src/utils/authService.js +0 -106
  211. package/cjs/src/utils/authService.js.map +0 -1
  212. package/cjs/src/utils/authService.spec.d.ts +0 -2
  213. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  214. package/cjs/src/utils/authService.spec.js +0 -72
  215. package/cjs/src/utils/authService.spec.js.map +0 -1
  216. package/dist/src/utils/answerService.d.ts +0 -10
  217. package/dist/src/utils/answerService.d.ts.map +0 -1
  218. package/dist/src/utils/answerService.spec.d.ts +0 -2
  219. package/dist/src/utils/answerService.spec.d.ts.map +0 -1
  220. package/dist/src/utils/authService.d.ts +0 -37
  221. package/dist/src/utils/authService.d.ts.map +0 -1
  222. package/dist/src/utils/authService.spec.d.ts +0 -2
  223. package/dist/src/utils/authService.spec.d.ts.map +0 -1
  224. package/lib/.DS_Store +0 -0
  225. package/lib/src/.DS_Store +0 -0
  226. package/lib/src/utils/answerService.d.ts +0 -10
  227. package/lib/src/utils/answerService.d.ts.map +0 -1
  228. package/lib/src/utils/answerService.js +0 -57
  229. package/lib/src/utils/answerService.js.map +0 -1
  230. package/lib/src/utils/answerService.spec.d.ts +0 -2
  231. package/lib/src/utils/answerService.spec.d.ts.map +0 -1
  232. package/lib/src/utils/answerService.spec.js +0 -29
  233. package/lib/src/utils/answerService.spec.js.map +0 -1
  234. package/lib/src/utils/authService.d.ts +0 -37
  235. package/lib/src/utils/authService.d.ts.map +0 -1
  236. package/lib/src/utils/authService.js +0 -97
  237. package/lib/src/utils/authService.js.map +0 -1
  238. package/lib/src/utils/authService.spec.d.ts +0 -2
  239. package/lib/src/utils/authService.spec.d.ts.map +0 -1
  240. package/lib/src/utils/authService.spec.js +0 -70
  241. package/lib/src/utils/authService.spec.js.map +0 -1
  242. package/src/.DS_Store +0 -0
@@ -1584,6 +1584,22 @@
1584
1584
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1585
1585
  */
1586
1586
  EmbedEvent["CreateWorksheet"] = "createWorksheet";
1587
+ /**
1588
+ * Emitted when Ask Sage is initialized.
1589
+ *
1590
+ * @returns viewName: string
1591
+ * @returns viewId: string
1592
+ * @returns liveboardId: string
1593
+ * @returns isPublic: boolean
1594
+ * @version SDK : 1.29.0 | Thoughtspot: 9.12.0.cl
1595
+ */
1596
+ EmbedEvent["AskSageInit"] = "AskSageInit";
1597
+ /**
1598
+ * Emitted when a LB/viz is renamed
1599
+ *
1600
+ * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
1601
+ */
1602
+ EmbedEvent["Rename"] = "renameModalTitleDescription";
1587
1603
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
1588
1604
  (function (HostEvent) {
1589
1605
  /**
@@ -2323,6 +2339,17 @@
2323
2339
  * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
2324
2340
  */
2325
2341
  HostEvent["GetAnswerSession"] = "getAnswerSession";
2342
+ /**
2343
+ * Trigger Ask Sage for viz
2344
+ *
2345
+ * @example
2346
+ * ```js
2347
+ * liveboardEmbed.trigger(HostEvent.AskSage,
2348
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
2349
+ * ```
2350
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
2351
+ */
2352
+ HostEvent["AskSage"] = "AskSage";
2326
2353
  })(exports.HostEvent || (exports.HostEvent = {}));
2327
2354
  /**
2328
2355
  * The different visual modes that the data sources panel within
@@ -2421,6 +2448,9 @@
2421
2448
  Param["HideSearchBarTitle"] = "hideSearchBarTitle";
2422
2449
  Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
2423
2450
  Param["HideSearchBar"] = "hideSearchBar";
2451
+ Param["ClientLogLevel"] = "clientLogLevel";
2452
+ Param["OverrideNativeConsole"] = "overrideConsoleLogs";
2453
+ Param["enableAskSage"] = "enableAskSage";
2424
2454
  })(Param || (Param = {}));
2425
2455
  (function (Action) {
2426
2456
  /**
@@ -3253,6 +3283,16 @@
3253
3283
  * @version SDK: 1.29.0 | Thoughtspot: 9.10.0.cl
3254
3284
  */
3255
3285
  Action["VerifiedLiveboard"] = "verifiedLiveboard";
3286
+ /**
3287
+ * Action ID for ask sage button
3288
+ *
3289
+ * @example
3290
+ * ```js
3291
+ * hiddenAction: [Action.AskAi]
3292
+ * ```
3293
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
3294
+ */
3295
+ Action["AskAi"] = "AskAi";
3256
3296
  })(exports.Action || (exports.Action = {}));
3257
3297
  var PrefetchFeatures;
3258
3298
  (function (PrefetchFeatures) {
@@ -3268,7 +3308,15 @@
3268
3308
  (function (ContextMenuTriggerOptions) {
3269
3309
  ContextMenuTriggerOptions["LEFT_CLICK"] = "left-click";
3270
3310
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
3271
- })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
3311
+ })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
3312
+ (function (LogLevel) {
3313
+ LogLevel["SILENT"] = "SILENT";
3314
+ LogLevel["ERROR"] = "ERROR";
3315
+ LogLevel["WARN"] = "WARN";
3316
+ LogLevel["INFO"] = "INFO";
3317
+ LogLevel["DEBUG"] = "DEBUG";
3318
+ LogLevel["TRACE"] = "TRACE";
3319
+ })(exports.LogLevel || (exports.LogLevel = {}));
3272
3320
 
3273
3321
  /**
3274
3322
  * Removes all key-value entries from the list cache.
@@ -5475,6 +5523,114 @@
5475
5523
 
5476
5524
  var isEqual_1 = isEqual;
5477
5525
 
5526
+ /**
5527
+ * Checks if `value` is `undefined`.
5528
+ *
5529
+ * @static
5530
+ * @since 0.1.0
5531
+ * @memberOf _
5532
+ * @category Lang
5533
+ * @param {*} value The value to check.
5534
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
5535
+ * @example
5536
+ *
5537
+ * _.isUndefined(void 0);
5538
+ * // => true
5539
+ *
5540
+ * _.isUndefined(null);
5541
+ * // => false
5542
+ */
5543
+ function isUndefined$1(value) {
5544
+ return value === undefined;
5545
+ }
5546
+
5547
+ var isUndefined_1 = isUndefined$1;
5548
+
5549
+ /**
5550
+ * This method returns `undefined`.
5551
+ *
5552
+ * @static
5553
+ * @memberOf _
5554
+ * @since 2.3.0
5555
+ * @category Util
5556
+ * @example
5557
+ *
5558
+ * _.times(2, _.noop);
5559
+ * // => [undefined, undefined]
5560
+ */
5561
+ function noop() {
5562
+ // No operation performed.
5563
+ }
5564
+
5565
+ var noop_1 = noop;
5566
+
5567
+ const logFunctions = {
5568
+ [exports.LogLevel.SILENT]: noop_1,
5569
+ [exports.LogLevel.ERROR]: console.error,
5570
+ [exports.LogLevel.WARN]: console.warn,
5571
+ [exports.LogLevel.INFO]: console.info,
5572
+ [exports.LogLevel.DEBUG]: console.debug,
5573
+ [exports.LogLevel.TRACE]: console.trace,
5574
+ };
5575
+ let globalLogLevelOverride = exports.LogLevel.TRACE;
5576
+ const logLevelToNumber = {
5577
+ [exports.LogLevel.SILENT]: 0,
5578
+ [exports.LogLevel.ERROR]: 1,
5579
+ [exports.LogLevel.WARN]: 2,
5580
+ [exports.LogLevel.INFO]: 3,
5581
+ [exports.LogLevel.DEBUG]: 4,
5582
+ [exports.LogLevel.TRACE]: 5,
5583
+ };
5584
+ const compareLogLevels = (logLevel1, logLevel2) => {
5585
+ const logLevel1Index = logLevelToNumber[logLevel1];
5586
+ const logLevel2Index = logLevelToNumber[logLevel2];
5587
+ return logLevel1Index - logLevel2Index;
5588
+ };
5589
+ class Logger {
5590
+ constructor() {
5591
+ this.logLevel = exports.LogLevel.ERROR;
5592
+ this.setLogLevel = (newLogLevel) => {
5593
+ this.logLevel = newLogLevel;
5594
+ };
5595
+ this.getLogLevel = () => this.logLevel;
5596
+ }
5597
+ canLog(logLevel) {
5598
+ if (logLevel === exports.LogLevel.SILENT)
5599
+ return false;
5600
+ if (!isUndefined_1(globalLogLevelOverride)) {
5601
+ return compareLogLevels(globalLogLevelOverride, logLevel) >= 0;
5602
+ }
5603
+ return compareLogLevels(this.logLevel, logLevel) >= 0;
5604
+ }
5605
+ logMessages(args, logLevel) {
5606
+ if (this.canLog(logLevel)) {
5607
+ const logFn = logFunctions[logLevel];
5608
+ if (logFn) {
5609
+ logFn(...args);
5610
+ }
5611
+ }
5612
+ }
5613
+ log(...args) {
5614
+ this.info(args);
5615
+ }
5616
+ info(...args) {
5617
+ this.logMessages(args, exports.LogLevel.INFO);
5618
+ }
5619
+ debug(...args) {
5620
+ this.logMessages(args, exports.LogLevel.DEBUG);
5621
+ }
5622
+ trace(...args) {
5623
+ this.logMessages(args, exports.LogLevel.TRACE);
5624
+ }
5625
+ error(...args) {
5626
+ this.logMessages(args, exports.LogLevel.ERROR);
5627
+ }
5628
+ warn(...args) {
5629
+ this.logMessages(args, exports.LogLevel.WARN);
5630
+ }
5631
+ }
5632
+ const logger = new Logger();
5633
+
5478
5634
  const EndPoints = {
5479
5635
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5480
5636
  SAML_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
@@ -5495,7 +5651,7 @@
5495
5651
  return fetch(url, options).then(async (r) => {
5496
5652
  var _a;
5497
5653
  if (!r.ok && r.type !== 'opaqueredirect' && r.type !== 'opaque') {
5498
- console.error('Failure', await ((_a = r.text) === null || _a === void 0 ? void 0 : _a.call(r)));
5654
+ logger.error('Failure', await ((_a = r.text) === null || _a === void 0 ? void 0 : _a.call(r)));
5499
5655
  }
5500
5656
  return r;
5501
5657
  });
@@ -5519,7 +5675,7 @@
5519
5675
  return res.ok;
5520
5676
  }
5521
5677
  catch (e) {
5522
- console.error(`Token Verification Service failed : ${e.message}`);
5678
+ logger.error(`Token Verification Service failed : ${e.message}`);
5523
5679
  }
5524
5680
  return false;
5525
5681
  }
@@ -5893,7 +6049,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
5893
6049
  size,
5894
6050
  },
5895
6051
  });
5896
- const { columns, data } = answer.visualizations[0];
6052
+ const { columns, data } = answer.visualizations.find((viz) => !!viz.data) || {};
5897
6053
  return {
5898
6054
  columns,
5899
6055
  data,
@@ -8383,7 +8539,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8383
8539
  // maximum interval between request retries after exponential backoff
8384
8540
  var MAX_RETRY_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes
8385
8541
 
8386
- var logger = console_with_prefix('batch');
8542
+ var logger$3 = console_with_prefix('batch');
8387
8543
 
8388
8544
  /**
8389
8545
  * RequestBatcher: manages the queueing, flushing, retry etc of requests of one
@@ -8484,7 +8640,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8484
8640
  try {
8485
8641
 
8486
8642
  if (this.requestInProgress) {
8487
- logger.log('Flush: Request already in progress');
8643
+ logger$3.log('Flush: Request already in progress');
8488
8644
  return;
8489
8645
  }
8490
8646
 
@@ -8600,7 +8756,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8600
8756
  if (options.unloading) {
8601
8757
  requestOptions.transport = 'sendBeacon';
8602
8758
  }
8603
- logger.log('MIXPANEL REQUEST:', dataForRequest);
8759
+ logger$3.log('MIXPANEL REQUEST:', dataForRequest);
8604
8760
  this.sendRequest(dataForRequest, requestOptions, batchSendCallback);
8605
8761
 
8606
8762
  } catch(err) {
@@ -8613,7 +8769,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8613
8769
  * Log error to global logger and optional user-defined logger.
8614
8770
  */
8615
8771
  RequestBatcher.prototype.reportError = function(msg, err) {
8616
- logger.error.apply(logger.error, arguments);
8772
+ logger$3.error.apply(logger$3.error, arguments);
8617
8773
  if (this.errorReporter) {
8618
8774
  try {
8619
8775
  if (!(err instanceof Error)) {
@@ -8621,7 +8777,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
8621
8777
  }
8622
8778
  this.errorReporter(msg, err);
8623
8779
  } catch(err) {
8624
- logger.error(err);
8780
+ logger$3.error(err);
8625
8781
  }
8626
8782
  }
8627
8783
  };
@@ -12166,7 +12322,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12166
12322
  }
12167
12323
  }
12168
12324
  catch (e) {
12169
- console.error('Error initializing mixpanel', e);
12325
+ logger.error('Error initializing mixpanel', e);
12170
12326
  }
12171
12327
  }
12172
12328
 
@@ -12508,24 +12664,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12508
12664
  }
12509
12665
  });
12510
12666
 
12511
- /**
12512
- * This method returns `undefined`.
12513
- *
12514
- * @static
12515
- * @memberOf _
12516
- * @since 2.3.0
12517
- * @category Util
12518
- * @example
12519
- *
12520
- * _.times(2, _.noop);
12521
- * // => [undefined, undefined]
12522
- */
12523
- function noop() {
12524
- // No operation performed.
12525
- }
12526
-
12527
- var noop_1 = noop;
12528
-
12529
12667
  /** Used as references for various `Number` constants. */
12530
12668
  var INFINITY = 1 / 0;
12531
12669
 
@@ -12549,7 +12687,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12549
12687
  return tokenizedFetch(url, options).then(async (r) => {
12550
12688
  var _a;
12551
12689
  if (!r.ok && r.type !== 'opaqueredirect' && r.type !== 'opaque') {
12552
- console.error('Failure', await ((_a = r.text) === null || _a === void 0 ? void 0 : _a.call(r)));
12690
+ logger.error('Failure', await ((_a = r.text) === null || _a === void 0 ? void 0 : _a.call(r)));
12553
12691
  }
12554
12692
  return r;
12555
12693
  });
@@ -12640,7 +12778,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12640
12778
  */
12641
12779
  function notifyAuthSDKSuccess() {
12642
12780
  {
12643
- console.error('SDK not initialized');
12781
+ logger.error('SDK not initialized');
12644
12782
  return;
12645
12783
  }
12646
12784
  }
@@ -12649,7 +12787,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12649
12787
  */
12650
12788
  function notifyAuthSuccess() {
12651
12789
  {
12652
- console.error('SDK not initialized');
12790
+ logger.error('SDK not initialized');
12653
12791
  return;
12654
12792
  }
12655
12793
  }
@@ -12659,7 +12797,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12659
12797
  */
12660
12798
  function notifyAuthFailure(failureType) {
12661
12799
  {
12662
- console.error('SDK not initialized');
12800
+ logger.error('SDK not initialized');
12663
12801
  return;
12664
12802
  }
12665
12803
  }
@@ -12668,7 +12806,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12668
12806
  */
12669
12807
  function notifyLogout() {
12670
12808
  {
12671
- console.error('SDK not initialized');
12809
+ logger.error('SDK not initialized');
12672
12810
  return;
12673
12811
  }
12674
12812
  }
@@ -12935,6 +13073,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
12935
13073
  loginFailedMessage: 'Not logged in',
12936
13074
  authTriggerText: 'Authorize',
12937
13075
  authType: AuthType.None,
13076
+ logLevel: exports.LogLevel.ERROR,
12938
13077
  };
12939
13078
  let authPromise;
12940
13079
  const getAuthPromise = () => authPromise;
@@ -13142,7 +13281,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13142
13281
  });
13143
13282
  }
13144
13283
 
13145
- var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13284
+ var name="@thoughtspot/visual-embed-sdk";var version="1.27.0-alpha.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
13146
13285
 
13147
13286
  /**
13148
13287
  * Copyright (c) 2022
@@ -13269,7 +13408,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13269
13408
  allOtherKeys.forEach((key) => {
13270
13409
  if (!isUndefined(viewConfig[key])
13271
13410
  && !isEqual_1(viewConfig[key], preRenderedObject.viewConfig[key])) {
13272
- console.warn('TS Embed component was pre-rendered with '
13411
+ logger.warn(`${viewConfig.embedComponentType || 'Component'} was pre-rendered with `
13273
13412
  + `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
13274
13413
  + `but a different value "${JSON.stringify(viewConfig[key])}" `
13275
13414
  + 'was passed to the Embed component. '
@@ -13313,7 +13452,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13313
13452
  error,
13314
13453
  });
13315
13454
  // Log error
13316
- console.error(error);
13455
+ logger.error(error);
13317
13456
  }
13318
13457
  /**
13319
13458
  * Extracts the type field from the event payload
@@ -13381,7 +13520,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13381
13520
  this.executeCallbacks(exports.EmbedEvent.Error, {
13382
13521
  offlineWarning,
13383
13522
  });
13384
- console.warn(offlineWarning);
13523
+ logger.warn(offlineWarning);
13385
13524
  };
13386
13525
  window.addEventListener('offline', offlineEventListener);
13387
13526
  this.subscribedListeners = {
@@ -13503,6 +13642,8 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13503
13642
  if (insertInToSlide) {
13504
13643
  queryParams[Param.ShowInsertToSlide] = insertInToSlide;
13505
13644
  }
13645
+ queryParams[Param.OverrideNativeConsole] = true;
13646
+ queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
13506
13647
  return queryParams;
13507
13648
  }
13508
13649
  /**
@@ -13894,11 +14035,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13894
14035
  }
13895
14036
  catch (e) {
13896
14037
  eventPort.postMessage({ error: e });
13897
- console.log(e);
14038
+ logger.log(e);
13898
14039
  }
13899
14040
  }
13900
14041
  else {
13901
- console.log('Event Port is not defined');
14042
+ logger.log('Event Port is not defined');
13902
14043
  }
13903
14044
  }
13904
14045
  /**
@@ -13935,7 +14076,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13935
14076
  */
13936
14077
  preRender(showPreRenderByDefault = false) {
13937
14078
  if (!this.viewConfig.preRenderId) {
13938
- console.error('PreRender id is required for preRender');
14079
+ logger.error('PreRender id is required for preRender');
13939
14080
  return this;
13940
14081
  }
13941
14082
  this.isPreRendered = true;
@@ -13981,7 +14122,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13981
14122
  this.unsubscribeToEvents();
13982
14123
  }
13983
14124
  catch (e) {
13984
- console.log('Error destroying TS Embed', e);
14125
+ logger.log('Error destroying TS Embed', e);
13985
14126
  }
13986
14127
  }
13987
14128
  getUnderlyingFrameElement() {
@@ -14011,7 +14152,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14011
14152
  */
14012
14153
  showPreRender() {
14013
14154
  if (!this.viewConfig.preRenderId) {
14014
- console.error('PreRender id is required for preRender');
14155
+ logger.error('PreRender id is required for preRender');
14015
14156
  return;
14016
14157
  }
14017
14158
  if (!this.isPreRenderAvailable()) {
@@ -14054,7 +14195,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14054
14195
  */
14055
14196
  syncPreRenderStyle() {
14056
14197
  if (!this.isPreRenderAvailable() || !this.el) {
14057
- console.error('PreRender should be called before using syncPreRenderStyle');
14198
+ logger.error('PreRender should be called before using syncPreRenderStyle');
14058
14199
  return;
14059
14200
  }
14060
14201
  const elBoundingClient = this.el.getBoundingClientRect();
@@ -14072,7 +14213,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14072
14213
  hidePreRender() {
14073
14214
  if (!this.isPreRenderAvailable()) {
14074
14215
  // if the embed component is not preRendered , nothing to hide
14075
- console.warn('PreRender should be called before hiding it using hidePreRender.');
14216
+ logger.warn('PreRender should be called before hiding it using hidePreRender.');
14076
14217
  return;
14077
14218
  }
14078
14219
  const preRenderHideStyles = {
@@ -14636,7 +14777,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14636
14777
  */
14637
14778
  navigateToPage(path, noReload = false) {
14638
14779
  if (!this.iFrame) {
14639
- console.log('Please call render before invoking this method');
14780
+ logger.log('Please call render before invoking this method');
14640
14781
  return;
14641
14782
  }
14642
14783
  if (noReload) {
@@ -14644,7 +14785,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14644
14785
  }
14645
14786
  else {
14646
14787
  if (typeof path !== 'string') {
14647
- console.warn('Path can only by a string when triggered without noReload');
14788
+ logger.warn('Path can only by a string when triggered without noReload');
14648
14789
  return;
14649
14790
  }
14650
14791
  const iframeSrc = this.iFrame.src;
@@ -14731,7 +14872,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14731
14872
  let params = {};
14732
14873
  params[Param.EmbedApp] = true;
14733
14874
  params = this.getBaseQueryParams(params);
14734
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, } = this.viewConfig;
14875
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, enableAskSage, } = this.viewConfig;
14735
14876
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
14736
14877
  || this.viewConfig.preventPinboardFilterRemoval;
14737
14878
  if (fullHeight === true) {
@@ -14768,6 +14909,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14768
14909
  if (showLiveboardTitle) {
14769
14910
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
14770
14911
  }
14912
+ if (enableAskSage) {
14913
+ params[Param.enableAskSage] = enableAskSage;
14914
+ }
14771
14915
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
14772
14916
  const queryParams = getQueryParamString(params, true);
14773
14917
  return queryParams;