@thoughtspot/visual-embed-sdk 1.39.0 → 1.39.2-alpha.1

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 (109) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +13 -13
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +2 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +18 -8
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/conversation.d.ts +64 -6
  9. package/cjs/src/embed/conversation.d.ts.map +1 -1
  10. package/cjs/src/embed/conversation.js +9 -1
  11. package/cjs/src/embed/conversation.js.map +1 -1
  12. package/cjs/src/embed/conversation.spec.js +130 -0
  13. package/cjs/src/embed/conversation.spec.js.map +1 -1
  14. package/cjs/src/embed/embedConfig.d.ts +49 -4
  15. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  16. package/cjs/src/embed/embedConfig.js +49 -4
  17. package/cjs/src/embed/embedConfig.js.map +1 -1
  18. package/cjs/src/embed/liveboard.d.ts +2 -19
  19. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  20. package/cjs/src/embed/liveboard.js +3 -5
  21. package/cjs/src/embed/liveboard.js.map +1 -1
  22. package/cjs/src/embed/liveboard.spec.js +12 -11
  23. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  24. package/cjs/src/embed/sage.d.ts +10 -10
  25. package/cjs/src/embed/search.d.ts +4 -4
  26. package/cjs/src/embed/ts-embed.d.ts +5 -0
  27. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  28. package/cjs/src/embed/ts-embed.js +16 -1
  29. package/cjs/src/embed/ts-embed.js.map +1 -1
  30. package/cjs/src/embed/ts-embed.spec.js +164 -0
  31. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  32. package/cjs/src/types.d.ts +41 -8
  33. package/cjs/src/types.d.ts.map +1 -1
  34. package/cjs/src/types.js +23 -6
  35. package/cjs/src/types.js.map +1 -1
  36. package/dist/{index-sSREbWM-.js → index-CmEQfuE3.js} +1 -1
  37. package/dist/index-DeFzsyFF.js +7371 -0
  38. package/dist/index-Dpf0rd6w.js +7371 -0
  39. package/dist/index-UuEbsISo.js +7447 -0
  40. package/dist/src/embed/app.d.ts +13 -13
  41. package/dist/src/embed/app.d.ts.map +1 -1
  42. package/dist/src/embed/conversation.d.ts +64 -6
  43. package/dist/src/embed/conversation.d.ts.map +1 -1
  44. package/dist/src/embed/embedConfig.d.ts +49 -4
  45. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  46. package/dist/src/embed/liveboard.d.ts +2 -19
  47. package/dist/src/embed/liveboard.d.ts.map +1 -1
  48. package/dist/src/embed/sage.d.ts +10 -10
  49. package/dist/src/embed/search.d.ts +4 -4
  50. package/dist/src/embed/ts-embed.d.ts +5 -0
  51. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  52. package/dist/src/types.d.ts +41 -8
  53. package/dist/src/types.d.ts.map +1 -1
  54. package/dist/tsembed-react.es.js +105 -21
  55. package/dist/tsembed-react.js +104 -20
  56. package/dist/tsembed.es.js +105 -21
  57. package/dist/tsembed.js +104 -20
  58. package/dist/visual-embed-sdk-react-full.d.ts +182 -63
  59. package/dist/visual-embed-sdk-react.d.ts +182 -63
  60. package/dist/visual-embed-sdk.d.ts +182 -63
  61. package/lib/package.json +1 -1
  62. package/lib/src/embed/app.d.ts +13 -13
  63. package/lib/src/embed/app.d.ts.map +1 -1
  64. package/lib/src/embed/app.js +2 -1
  65. package/lib/src/embed/app.js.map +1 -1
  66. package/lib/src/embed/app.spec.js +19 -9
  67. package/lib/src/embed/app.spec.js.map +1 -1
  68. package/lib/src/embed/conversation.d.ts +64 -6
  69. package/lib/src/embed/conversation.d.ts.map +1 -1
  70. package/lib/src/embed/conversation.js +10 -2
  71. package/lib/src/embed/conversation.js.map +1 -1
  72. package/lib/src/embed/conversation.spec.js +133 -3
  73. package/lib/src/embed/conversation.spec.js.map +1 -1
  74. package/lib/src/embed/embedConfig.d.ts +49 -4
  75. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  76. package/lib/src/embed/embedConfig.js +49 -4
  77. package/lib/src/embed/embedConfig.js.map +1 -1
  78. package/lib/src/embed/liveboard.d.ts +2 -19
  79. package/lib/src/embed/liveboard.d.ts.map +1 -1
  80. package/lib/src/embed/liveboard.js +3 -5
  81. package/lib/src/embed/liveboard.js.map +1 -1
  82. package/lib/src/embed/liveboard.spec.js +12 -11
  83. package/lib/src/embed/liveboard.spec.js.map +1 -1
  84. package/lib/src/embed/sage.d.ts +10 -10
  85. package/lib/src/embed/search.d.ts +4 -4
  86. package/lib/src/embed/ts-embed.d.ts +5 -0
  87. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  88. package/lib/src/embed/ts-embed.js +16 -1
  89. package/lib/src/embed/ts-embed.js.map +1 -1
  90. package/lib/src/embed/ts-embed.spec.js +164 -0
  91. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  92. package/lib/src/types.d.ts +41 -8
  93. package/lib/src/types.d.ts.map +1 -1
  94. package/lib/src/types.js +23 -6
  95. package/lib/src/types.js.map +1 -1
  96. package/lib/src/visual-embed-sdk.d.ts +183 -64
  97. package/package.json +1 -1
  98. package/src/embed/app.spec.ts +36 -23
  99. package/src/embed/app.ts +15 -13
  100. package/src/embed/conversation.spec.ts +170 -6
  101. package/src/embed/conversation.ts +86 -14
  102. package/src/embed/embedConfig.ts +50 -5
  103. package/src/embed/liveboard.spec.ts +5 -4
  104. package/src/embed/liveboard.ts +4 -24
  105. package/src/embed/sage.ts +10 -10
  106. package/src/embed/search.ts +4 -4
  107. package/src/embed/ts-embed.spec.ts +225 -0
  108. package/src/embed/ts-embed.ts +19 -0
  109. package/src/types.ts +82 -49
@@ -155,7 +155,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
155
155
  *
156
156
  * Supported embed types: `AppEmbed`
157
157
  * @default true
158
- * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
158
+ * @version SDK: 1.2.0 | ThoughtSpot: 8.4.0.cl
159
159
  * @example
160
160
  * ```js
161
161
  * const embed = new AppEmbed('#tsEmbed', {
@@ -177,7 +177,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
177
177
  *
178
178
  * Supported embed types: `AppEmbed`
179
179
  * @default false
180
- * @version SDK: 1.28.0 | Thoughtspot: 9.12.5.cl
180
+ * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
181
181
  * @example
182
182
  * ```js
183
183
  * const embed = new AppEmbed('#tsEmbed', {
@@ -193,7 +193,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
193
193
  *
194
194
  * Supported embed types: `AppEmbed`
195
195
  * @default false
196
- * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
196
+ * @version SDK: 1.2.0 | ThoughtSpot: 8.4.0.cl
197
197
  * @example
198
198
  * ```js
199
199
  * const embed = new AppEmbed('#tsEmbed', {
@@ -276,7 +276,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
276
276
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
277
277
  *
278
278
  * Supported embed types: `AppEmbed`
279
- * @version SDK: 1.28.0 | Thoughtspot: 9.12.5.cl
279
+ * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
280
280
  * @default false
281
281
  * @example
282
282
  * ```js
@@ -296,7 +296,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
296
296
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
297
297
  *
298
298
  * Supported embed types: `AppEmbed`
299
- * @version SDK: 1.28.0 | Thoughtspot: 9.12.5.cl
299
+ * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
300
300
  * @default true
301
301
  * @example
302
302
  * ```js
@@ -317,7 +317,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
317
317
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
318
318
  *
319
319
  * Supported embed types: `AppEmbed`
320
- * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
320
+ * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl
321
321
  * @example
322
322
  * ```js
323
323
  * const embed = new AppEmbed('#tsEmbed', {
@@ -335,7 +335,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
335
335
  * path within the app, use the `path` attribute which is more flexible.
336
336
  *
337
337
  * Supported embed types: `AppEmbed`
338
- * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
338
+ * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl
339
339
  * @example
340
340
  * ```js
341
341
  * const embed = new AppEmbed('#tsEmbed', {
@@ -351,7 +351,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
351
351
  * tag.
352
352
  *
353
353
  * Supported embed types: `AppEmbed`
354
- * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
354
+ * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl
355
355
  * @example
356
356
  * ```js
357
357
  * const embed = new AppEmbed('#tsEmbed', {
@@ -430,7 +430,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
430
430
  *
431
431
  * Supported embed types: `AppEmbed`
432
432
  * @default false
433
- * @version SDK: 1.28.0 | Thoughtspot: 9.12.5.cl
433
+ * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl
434
434
  * @example
435
435
  * ```js
436
436
  * const embed = new AppEmbed('#tsEmbed', {
@@ -460,7 +460,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
460
460
  discoveryExperience?: DiscoveryExperience;
461
461
  /**
462
462
  * To set the initial state of the search bar in case of saved-answers.
463
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
463
+ * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
464
464
  * @default false
465
465
  * @deprecated Use {@link collapseSearchBar} instead
466
466
  */
@@ -474,7 +474,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
474
474
  * - EXPAND_FIRST: Expand the first accordion and collapse the rest.
475
475
  *
476
476
  * Supported embed types: `AppEmbed`
477
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
477
+ * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
478
478
  * @default DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL
479
479
  * @example
480
480
  * ```js
@@ -488,14 +488,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
488
488
  dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
489
489
  /**
490
490
  * Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
491
- * @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
491
+ * @version SDK : 1.29.0 | ThoughtSpot: 10.1.0.cl
492
492
  */
493
493
  isOnBeforeGetVizDataInterceptEnabled?: boolean;
494
494
  /**
495
495
  * Flag to use home page search bar mode
496
496
  *
497
497
  * Supported embed types: `AppEmbed`
498
- * @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
498
+ * @version SDK : 1.33.0 | ThoughtSpot: 10.3.0.cl
499
499
  */
500
500
  homePageSearchBarMode?: HomePageSearchBarMode;
501
501
  /**
@@ -910,7 +910,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
910
910
  * Show or hide the tab panel of the embedded Liveboard.
911
911
  *
912
912
  * Supported embed types: `LiveboardEmbed`
913
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
913
+ * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
914
914
  * @example
915
915
  * ```js
916
916
  * const embed = new LiveboardEmbed('#tsEmbed', {
@@ -985,23 +985,6 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
985
985
  * })
986
986
  */
987
987
  dataSourceId?: string;
988
- /**
989
- * This flag is for show/hide checkboxes for include or exclude
990
- * cover page and filters in the Liveboard PDF.
991
- *
992
- * Supported embed types: `LiveboardEmbed`
993
- * @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
994
- * @default true
995
- * Supported embed types: `LiveboardEmbed`
996
- * @example
997
- * ```js
998
- * const embed = new LiveboardEmbed('#tsEmbed', {
999
- * ... //other embed view config
1000
- * coverAndFilterOptionInPDF: false,
1001
- * })
1002
- * ```
1003
- */
1004
- coverAndFilterOptionInPDF?: boolean;
1005
988
  /**
1006
989
  * The list of tab IDs to hide from the embedded.
1007
990
  * This Tabs will be hidden from their respective LBs.
@@ -1099,7 +1082,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
1099
1082
  navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
1100
1083
  /**
1101
1084
  * Returns the full url of the Liveboard/visualization which can be used to open
1102
- * this Liveboard inside the full Thoughtspot application in a new tab.
1085
+ * this Liveboard inside the full ThoughtSpot application in a new tab.
1103
1086
  * @returns url string
1104
1087
  */
1105
1088
  getLiveboardUrl(): string;
@@ -1363,7 +1346,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1363
1346
  /**
1364
1347
  * To set the initial state of the search bar in case of saved-answers.
1365
1348
  * @default false
1366
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
1349
+ * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
1367
1350
  * @deprecated Use {@link collapseSearchBar} instead
1368
1351
  */
1369
1352
  collapseSearchBarInitially?: boolean;
@@ -1371,7 +1354,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1371
1354
  * Flag to enable onBeforeSearchExecute Embed Event
1372
1355
  *
1373
1356
  * Supported embed types: `SearchEmbed`
1374
- * @version: SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
1357
+ * @version: SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl
1375
1358
  */
1376
1359
  isOnBeforeGetVizDataInterceptEnabled?: boolean;
1377
1360
  /**
@@ -1383,7 +1366,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1383
1366
  * - EXPAND_FIRST: Expand the first accordion and collapse the rest.
1384
1367
  *
1385
1368
  * Supported embed types: `SearchEmbed`
1386
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
1369
+ * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
1387
1370
  * @default DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL
1388
1371
  * @example
1389
1372
  * ```js
@@ -1400,7 +1383,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
1400
1383
  * lands on search embed page.
1401
1384
  *
1402
1385
  * Supported embed types: `SearchEmbed`
1403
- * @version SDK: 1.32.0 | Thoughtspot: 10.3.0.cl
1386
+ * @version SDK: 1.32.0 | ThoughtSpot: 10.3.0.cl
1404
1387
  * @default true
1405
1388
  * @example
1406
1389
  * ```js
@@ -1664,7 +1647,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/bodyless-conversation' {
1664
1647
  }
1665
1648
 
1666
1649
  declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1667
- import { BaseViewConfig } from '@thoughtspot/visual-embed-sdk/types';
1650
+ import { BaseViewConfig, RuntimeFilter, RuntimeParameter } from '@thoughtspot/visual-embed-sdk/types';
1668
1651
  import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
1669
1652
  /**
1670
1653
  * Configuration for search options
@@ -1681,7 +1664,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1681
1664
  */
1682
1665
  export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> {
1683
1666
  /**
1684
- * The ID of the data source object. For example, Model, View, or Table. Spotter uses this object to query data and generate Answers.
1667
+ * The ID of the data source object. For example, Model, View, or Table. Spotter uses
1668
+ * this object to query data and generate Answers.
1685
1669
  */
1686
1670
  worksheetId: string;
1687
1671
  /**
@@ -1700,7 +1684,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1700
1684
  * disableSourceSelection : true,
1701
1685
  * })
1702
1686
  * ```
1703
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
1687
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
1704
1688
  */
1705
1689
  disableSourceSelection?: boolean;
1706
1690
  /**
@@ -1714,7 +1698,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1714
1698
  * hideSourceSelection : true,
1715
1699
  * })
1716
1700
  * ```
1717
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
1701
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
1718
1702
  */
1719
1703
  hideSourceSelection?: boolean;
1720
1704
  /**
@@ -1746,7 +1730,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1746
1730
  * showSpotterLimitations : true,
1747
1731
  * })
1748
1732
  * ```
1749
- * @version SDK: 1.36.0 | Thoughtspot: 10.5.0.cl
1733
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl
1750
1734
  */
1751
1735
  showSpotterLimitations?: boolean;
1752
1736
  /**
@@ -1761,9 +1745,66 @@ declare module '@thoughtspot/visual-embed-sdk/embed/conversation' {
1761
1745
  * hideSampleQuestions : true,
1762
1746
  * })
1763
1747
  * ```
1764
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
1748
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
1765
1749
  */
1766
1750
  hideSampleQuestions?: boolean;
1751
+ /**
1752
+ * The list of runtime filters to apply to a search Answer,
1753
+ * visualization, or Liveboard.
1754
+ *
1755
+ * Supported embed types: `SpotterEmbed`
1756
+ * @example
1757
+ * ```js
1758
+ * const embed = new SpotterEmbed('#tsEmbed', {
1759
+ * ... // other embed view config
1760
+ * runtimeFilters: [
1761
+ * {
1762
+ * columnName: 'value',
1763
+ * operator: RuntimeFilterOp.EQ,
1764
+ * values: ['string' | 123 | true],
1765
+ * },
1766
+ * ],
1767
+ * })
1768
+ * ```
1769
+ */
1770
+ runtimeFilters?: RuntimeFilter[];
1771
+ /**
1772
+ * Flag to control whether runtime filters should be included in the URL.
1773
+ * If true, filters will be passed via app initialization payload instead.
1774
+ * If false/undefined, filters will be added to URL (default behavior).
1775
+ *
1776
+ * Supported embed types: `SpotterEmbed`
1777
+ * @default false
1778
+ */
1779
+ excludeRuntimeFiltersfromURL?: boolean;
1780
+ /**
1781
+ * The list of runtime parameters to apply to the conversation.
1782
+ *
1783
+ * Supported embed types: `SpotterEmbed`
1784
+ * @example
1785
+ * ```js
1786
+ * const embed = new SpotterEmbed('#tsEmbed', {
1787
+ * ... // other embed view config
1788
+ * runtimeParameters: [
1789
+ * {
1790
+ * name: 'Parameter Name',
1791
+ * value: 'Parameter Value',
1792
+ * },
1793
+ * ],
1794
+ * })
1795
+ * ```
1796
+ */
1797
+ runtimeParameters?: RuntimeParameter[];
1798
+ /**
1799
+ * Flag to control whether runtime parameters should be included in the URL.
1800
+ * If true, parameters will be passed via app initialization payload instead.
1801
+ * If false/undefined, parameters will be added to URL (default behavior).
1802
+ *
1803
+ * Supported embed types: `SpotterEmbed`
1804
+ * @default false
1805
+ *
1806
+ */
1807
+ excludeRuntimeParametersfromURL?: boolean;
1767
1808
  }
1768
1809
  /**
1769
1810
  * The configuration for the embedded spotterEmbed options.
@@ -2378,7 +2419,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2378
2419
  * Configuration to define the customization on the Embedded
2379
2420
  * ThoughtSpot components.
2380
2421
  * You can customize styles, text strings, and icons.
2381
- * For more information, see https://developers.thoughtspot.com/docs/custom-css.
2422
+ * For more information, see link:https://developers.thoughtspot.com/docs/custom-css[CSS customization framework].
2382
2423
  * @example
2383
2424
  * ```js
2384
2425
  * init({
@@ -3465,6 +3506,22 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3465
3506
  * ```
3466
3507
  */
3467
3508
  enableAskSage?: boolean;
3509
+ /**
3510
+ * This flag is used to show or hide checkboxes for including or excluding
3511
+ * the cover and filters pages in the Liveboard PDF.
3512
+ *
3513
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
3514
+ * @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
3515
+ * @example
3516
+ * ```js
3517
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
3518
+ * const embed = new <EmbedComponent>('#tsEmbed', {
3519
+ * ... // other embed view config
3520
+ * coverAndFilterOptionInPDF: false,
3521
+ * })
3522
+ * ```
3523
+ */
3524
+ coverAndFilterOptionInPDF?: boolean;
3468
3525
  }
3469
3526
  export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
3470
3527
  }
@@ -4608,7 +4665,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4608
4665
  *
4609
4666
  * error: Developers can customize the error message text when `execute`
4610
4667
  * returns `false` using the error parameter in responder.
4611
- * @version SDK : 1.29.0 | ThoughtSpot : 10.3.0.cl
4668
+ * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
4612
4669
  * @example
4613
4670
  *```js
4614
4671
  * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
@@ -4655,7 +4712,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4655
4712
  * console.log('payload', payload);
4656
4713
  * })
4657
4714
  *```
4658
- * @version SDK : 1.29.0 | ThoughtSpot : 10.3.0.cl
4715
+ * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
4659
4716
  */
4660
4717
  ParameterChanged = "parameterChanged",
4661
4718
  /**
@@ -4711,18 +4768,18 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4711
4768
  * console.log('payload', payload);
4712
4769
  * })
4713
4770
  *```
4714
- * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4771
+ * @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
4715
4772
  */
4716
4773
  CreateLiveboard = "createLiveboard",
4717
4774
  /**
4718
4775
  * Emitted when a user creates a Model.
4719
- * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4776
+ * @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
4720
4777
  */
4721
4778
  CreateModel = "createModel",
4722
4779
  /**
4723
4780
  * @hidden
4724
4781
  * Emitted when a user exits present mode.
4725
- * @version SDK : 1.40.0 | ThoughtSpot : 10.11.0.cl
4782
+ * @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
4726
4783
  */
4727
4784
  ExitPresentMode = "exitPresentMode"
4728
4785
  }
@@ -5936,7 +5993,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5936
5993
  DataSourceId = "dataSourceId",
5937
5994
  preAuthCache = "preAuthCache",
5938
5995
  ShowSpotterLimitations = "showSpotterLimitations",
5939
- CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
5996
+ CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
5940
5997
  PrimaryAction = "primaryAction",
5941
5998
  isSpotterAgentEmbed = "isSpotterAgentEmbed",
5942
5999
  IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
@@ -5966,6 +6023,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
5966
6023
  * hiddenActions: [Action.Edit, ActionAction.Explore],
5967
6024
  * })
5968
6025
  * ```
6026
+ * See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
5969
6027
  */
5970
6028
  export enum Action {
5971
6029
  /**
@@ -7158,7 +7216,23 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
7158
7216
  * ```
7159
7217
  * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
7160
7218
  */
7161
- CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
7219
+ CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
7220
+ /**
7221
+ * Action ID for hide or disable the
7222
+ * Spotter in conversation training widget.
7223
+ * The Add to Coaching feature is currently in beta
7224
+ * and is disabled by default on embed deployments.
7225
+ * To enable this feature on your instance,
7226
+ * contact ThoughtSpot Support.
7227
+ * @example
7228
+ * ```js
7229
+ * hiddenAction: [Action.InConversationTraining]
7230
+ * disabledActions: [Action.InConversationTraining]
7231
+ *
7232
+ * ```
7233
+ * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
7234
+ */
7235
+ InConversationTraining = "InConversationTraining"
7162
7236
  }
7163
7237
  export interface AnswerServiceType {
7164
7238
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -7756,39 +7830,39 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
7756
7830
  showObjectResults?: boolean;
7757
7831
  /**
7758
7832
  * flag used by the TS product tour page to show the blue search bar
7759
- * even after the search is completed. This is different from Thoughtspot Embedded
7833
+ * even after the search is completed. This is different from ThoughtSpot Embedded
7760
7834
  * Sage Embed experience where it mimics closer to the non-embed case.
7761
7835
  * The Sample questions container is collapsed when this value is set after
7762
7836
  * does a search.
7763
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl
7837
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl
7764
7838
  * @hidden
7765
7839
  */
7766
7840
  isProductTour?: boolean;
7767
7841
  /**
7768
7842
  * Show or hide the search bar title.
7769
- * @version SDK: 1.29.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7770
- * @deprecated Thoughtspot: 9.10.0.cl | search bar doesn't have the title from 9.10.0.cl
7843
+ * @version SDK: 1.29.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7844
+ * @deprecated ThoughtSpot: 9.10.0.cl | search bar doesn't have the title from 9.10.0.cl
7771
7845
  */
7772
7846
  hideSearchBarTitle?: boolean;
7773
7847
  /**
7774
7848
  * Show or hide the Answer header, that is, the `AI Answer` title
7775
7849
  * at the top of the Answer page.
7776
- * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
7850
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl
7777
7851
  */
7778
7852
  hideSageAnswerHeader?: boolean;
7779
7853
  /**
7780
7854
  * Disable the worksheet selection option.
7781
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7855
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7782
7856
  */
7783
7857
  disableWorksheetChange?: boolean;
7784
7858
  /**
7785
7859
  * Hide the worksheet selection panel.
7786
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7860
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7787
7861
  */
7788
7862
  hideWorksheetSelector?: boolean;
7789
7863
  /**
7790
7864
  * Show or hide autocomplete suggestions for the search query string.
7791
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7865
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7792
7866
  */
7793
7867
  hideAutocompleteSuggestions?: boolean;
7794
7868
  /**
@@ -7804,7 +7878,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
7804
7878
  * selected for the search operation.
7805
7879
  *
7806
7880
  * Supported embed types: `SageEmbed`
7807
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7881
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7808
7882
  * @example
7809
7883
  * ```js
7810
7884
  * const embed = new SageEmbed('#tsEmbed', {
@@ -7837,7 +7911,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
7837
7911
  * executeSearch: true,
7838
7912
  * }
7839
7913
  * ```
7840
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
7914
+ * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
7841
7915
  */
7842
7916
  searchOptions?: SearchOptions;
7843
7917
  }
@@ -8076,9 +8150,54 @@ declare module '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answer
8076
8150
  declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
8077
8151
  import { EmbedConfig } from '@thoughtspot/visual-embed-sdk/types';
8078
8152
  /**
8079
- * Gets the configuration embed was initialized with.
8080
- * @returns {@link EmbedConfig} The configuration embed was initialized with.
8081
- * @version SDK: 1.19.0 | ThoughtSpot: *
8153
+ * Gets the embed configuration settings that were used to
8154
+ * initialize the SDK.
8155
+ * @returns {@link EmbedConfig}
8156
+ *
8157
+ * @example
8158
+ * ```js
8159
+ * import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
8160
+ * // Call the getInitConfig method to retrieve the embed configuration
8161
+ * const config = getInitConfig();
8162
+ * // Log the configuration settings
8163
+ * console.log(config);
8164
+ * ```
8165
+ * Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
8166
+ * object, which contains the configuration settings used to
8167
+ * initialize the SDK, including the following:
8168
+ *
8169
+ * - `thoughtSpotHost` - ThoughtSpot host URL
8170
+ * - `authType`: The authentication method used. For example,
8171
+ * `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
8172
+ * - `customizations` - Style, text, and icon customization settings
8173
+ * that were applied during the SDK initialization.
8174
+ *
8175
+ * The following JSON output shows the embed configuration
8176
+ * settings returned from the code in the previous example:
8177
+ *
8178
+ * @example
8179
+ * ```json
8180
+ * {
8181
+ * "thoughtSpotHost": "https://{ThoughtSpot-Host}",
8182
+ * "authType": "AuthServerCookieless",
8183
+ * "customizations": {
8184
+ * "style": {
8185
+ * "customCSS": {
8186
+ * "variables": {
8187
+ * "--ts-var-button--secondary-background": "#7492d5",
8188
+ * "--ts-var-button--secondary--hovers-background": "#aac2f8",
8189
+ * "--ts-var-root-background": "#f1f4f8"
8190
+ * }
8191
+ * }
8192
+ * }
8193
+ * },
8194
+ * "loginFailedMessage": "Login failed, please try again",
8195
+ * "authTriggerText": "Authorize",
8196
+ * "disableTokenVerification": true,
8197
+ * "authTriggerContainer": "#your-own-div"
8198
+ * }
8199
+ * ```
8200
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
8082
8201
  * @group Global methods
8083
8202
  */
8084
8203
  export const getEmbedConfig: () => EmbedConfig;
@@ -8086,7 +8205,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/embedConfig' {
8086
8205
  * Sets the configuration embed was initialized with.
8087
8206
  * And returns the new configuration.
8088
8207
  * @param newConfig The configuration to set.
8089
- * @version SDK: 1.27.0 | ThoughtSpot: *
8208
+ * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
8090
8209
  * @group Global methods
8091
8210
  */
8092
8211
  export const setEmbedConfig: (newConfig: EmbedConfig) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.39.0",
3
+ "version": "1.39.2-alpha.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -8,9 +8,7 @@ import {
8
8
  HomePage,
9
9
  } from './app';
10
10
  import { init } from '../index';
11
- import {
12
- Action, AuthType, EmbedEvent, HostEvent, RuntimeFilterOp,
13
- } from '../types';
11
+ import { Action, AuthType, EmbedEvent, HostEvent, RuntimeFilterOp } from '../types';
14
12
  import {
15
13
  executeAfterWait,
16
14
  getDocumentBody,
@@ -45,12 +43,13 @@ beforeAll(() => {
45
43
  authType: AuthType.None,
46
44
  });
47
45
  jest.spyOn(auth, 'postLoginService').mockImplementation(() => Promise.resolve({}));
48
- (window as any).ResizeObserver = window.ResizeObserver
49
- || jest.fn().mockImplementation(() => ({
50
- disconnect: jest.fn(),
51
- observe: jest.fn(),
52
- unobserve: jest.fn(),
53
- }));
46
+ (window as any).ResizeObserver =
47
+ window.ResizeObserver ||
48
+ jest.fn().mockImplementation(() => ({
49
+ disconnect: jest.fn(),
50
+ observe: jest.fn(),
51
+ unobserve: jest.fn(),
52
+ }));
54
53
  });
55
54
 
56
55
  const cleanUp = () => {
@@ -316,6 +315,20 @@ describe('App embed tests', () => {
316
315
  });
317
316
  });
318
317
 
318
+ test('should set coverAndFilterOptionInPDF to false in url', async () => {
319
+ const appEmbed = new AppEmbed(getRootEl(), {
320
+ ...defaultViewConfig,
321
+ coverAndFilterOptionInPDF: false,
322
+ } as AppViewConfig);
323
+ appEmbed.render();
324
+ await executeAfterWait(() => {
325
+ expectUrlMatchesWithParams(
326
+ getIFrameSrc(),
327
+ `http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&arePdfCoverFilterPageCheckboxesEnabled=false${defaultParamsPost}#/home`,
328
+ );
329
+ });
330
+ });
331
+
319
332
  test('should set isLiveboardStylingAndGroupingEnabled to true in url', async () => {
320
333
  const appEmbed = new AppEmbed(getRootEl(), {
321
334
  ...defaultViewConfig,
@@ -687,7 +700,8 @@ describe('App embed tests', () => {
687
700
  const appEmbed = new AppEmbed(getRootEl(), {
688
701
  ...defaultViewConfig,
689
702
  // eslint-disable-next-line max-len
690
- dataPanelCustomGroupsAccordionInitialState: DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST,
703
+ dataPanelCustomGroupsAccordionInitialState:
704
+ DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST,
691
705
  } as AppViewConfig);
692
706
 
693
707
  appEmbed.render();
@@ -700,19 +714,18 @@ describe('App embed tests', () => {
700
714
  });
701
715
 
702
716
  test('should register event handlers to adjust iframe height', async () => {
703
- const onSpy = jest.spyOn(AppEmbed.prototype, 'on')
704
- .mockImplementation((event, callback) => {
705
- if (event === EmbedEvent.RouteChange) {
706
- callback({ data: { currentPath: '/answers' } }, jest.fn());
707
- }
708
- if (event === EmbedEvent.EmbedHeight) {
709
- callback({ data: '100%' });
710
- }
711
- if (event === EmbedEvent.EmbedIframeCenter) {
712
- callback({}, jest.fn());
713
- }
714
- return null;
715
- });
717
+ const onSpy = jest.spyOn(AppEmbed.prototype, 'on').mockImplementation((event, callback) => {
718
+ if (event === EmbedEvent.RouteChange) {
719
+ callback({ data: { currentPath: '/answers' } }, jest.fn());
720
+ }
721
+ if (event === EmbedEvent.EmbedHeight) {
722
+ callback({ data: '100%' });
723
+ }
724
+ if (event === EmbedEvent.EmbedIframeCenter) {
725
+ callback({}, jest.fn());
726
+ }
727
+ return null;
728
+ });
716
729
  jest.spyOn(TsEmbed.prototype as any, 'getIframeCenter').mockReturnValue({});
717
730
  jest.spyOn(TsEmbed.prototype as any, 'setIFrameHeight').mockReturnValue({});
718
731
  const appEmbed = new AppEmbed(getRootEl(), {