@thoughtspot/visual-embed-sdk 1.50.1 → 1.51.0-test
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.
- package/cjs/package.json +1 -1
- package/cjs/src/config.d.ts +1 -0
- package/cjs/src/config.d.ts.map +1 -1
- package/cjs/src/config.js +2 -1
- package/cjs/src/config.js.map +1 -1
- package/cjs/src/css-variables.d.ts +63 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +148 -25
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +74 -37
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +571 -150
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.js +1 -1
- package/cjs/src/embed/conversation.d.ts +375 -2
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +21 -15
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +323 -17
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +45 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +81 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +1 -0
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +27 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +76 -14
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +50 -9
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +432 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +15 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +28 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +129 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +9 -10
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +16 -8
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +82 -30
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +537 -3
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +3 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +4 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +4 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/cjs/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/cjs/src/react/all-types-export.parity.spec.js +194 -0
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -0
- package/cjs/src/react/index.d.ts +66 -32
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +5 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +101 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +789 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +610 -20
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.spec.js +4 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-fCne7kmU.js → index-Bivg-mDx.js} +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +63 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +148 -25
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +375 -2
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +76 -14
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +15 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +9 -10
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +16 -8
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +4 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/dist/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +66 -32
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +789 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +878 -120
- package/dist/tsembed-react.js +877 -119
- package/dist/tsembed.es.js +936 -181
- package/dist/tsembed.js +938 -183
- package/dist/visual-embed-sdk-react-full.d.ts +1553 -128
- package/dist/visual-embed-sdk-react.d.ts +1555 -129
- package/dist/visual-embed-sdk.d.ts +1499 -100
- package/lib/package.json +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +1 -0
- package/lib/src/config.js.map +1 -1
- package/lib/src/css-variables.d.ts +63 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +148 -25
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +75 -38
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +572 -151
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/conversation.d.ts +375 -2
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +23 -17
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +323 -17
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +45 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +81 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +15 -0
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +1 -0
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +27 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +76 -14
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +50 -9
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +432 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +15 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +25 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +130 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +9 -10
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-viz-utils.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +16 -8
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +82 -30
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +537 -3
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +4 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +4 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/lib/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/lib/src/react/all-types-export.parity.spec.js +191 -0
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -0
- package/lib/src/react/index.d.ts +66 -32
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +5 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +102 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +789 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +610 -20
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.spec.js +4 -0
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1499 -100
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/css-variables.ts +77 -0
- package/src/embed/app.spec.ts +729 -188
- package/src/embed/app.ts +240 -75
- package/src/embed/base.ts +1 -1
- package/src/embed/conversation.spec.ts +379 -20
- package/src/embed/conversation.ts +412 -18
- package/src/embed/events.spec.ts +56 -0
- package/src/embed/host-events.spec.ts +118 -0
- package/src/embed/hostEventClient/contracts.ts +16 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +46 -0
- package/src/embed/hostEventClient/host-event-client.ts +3 -2
- package/src/embed/liveboard.spec.ts +565 -4
- package/src/embed/liveboard.ts +150 -29
- package/src/embed/spotter-utils.spec.ts +140 -1
- package/src/embed/spotter-utils.ts +36 -1
- package/src/embed/spotter-viz-utils.ts +9 -10
- package/src/embed/ts-embed.spec.ts +699 -3
- package/src/embed/ts-embed.ts +99 -35
- package/src/index.ts +44 -2
- package/src/mixpanel-service.ts +4 -0
- package/src/react/all-types-export.parity.spec.ts +208 -0
- package/src/react/all-types-export.ts +22 -0
- package/src/react/index.spec.tsx +158 -0
- package/src/react/index.tsx +70 -33
- package/src/types.ts +791 -30
- package/src/utils.spec.ts +5 -0
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.51.0-test */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -189,7 +189,9 @@ var AuthType;
|
|
|
189
189
|
})(AuthType || (AuthType = {}));
|
|
190
190
|
/**
|
|
191
191
|
*
|
|
192
|
-
* **Note**:
|
|
192
|
+
* **Note**: The classic (V1) and Modular (V2) home page experiences are
|
|
193
|
+
* deprecated. This attribute applies to V3 (ModularWithStylingChanges) and
|
|
194
|
+
* V4 (Focused) home page experiences.
|
|
193
195
|
*
|
|
194
196
|
*/
|
|
195
197
|
var HomeLeftNavItem;
|
|
@@ -336,7 +338,9 @@ var RuntimeFilterOp;
|
|
|
336
338
|
* via `hiddenHomepageModules` and reordered via
|
|
337
339
|
* `reorderedHomepageModules`.
|
|
338
340
|
*
|
|
339
|
-
* **Note**:
|
|
341
|
+
* **Note**: The classic (V1) and Modular (V2) home page experiences are
|
|
342
|
+
* deprecated. These modules apply to V3 (ModularWithStylingChanges) and
|
|
343
|
+
* V4 (Focused) home page experiences.
|
|
340
344
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
341
345
|
*/
|
|
342
346
|
var HomepageModule;
|
|
@@ -514,7 +518,7 @@ var EmbedEvent;
|
|
|
514
518
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
515
519
|
* @example
|
|
516
520
|
* ```js
|
|
517
|
-
* searchEmbed.on(EmbedEvent.
|
|
521
|
+
* searchEmbed.on(EmbedEvent.Drilldown, {
|
|
518
522
|
* points: {
|
|
519
523
|
* clickedPoint,
|
|
520
524
|
* selectedPoints: selectedPoint
|
|
@@ -575,7 +579,7 @@ var EmbedEvent;
|
|
|
575
579
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
576
580
|
* @example
|
|
577
581
|
* ```js
|
|
578
|
-
* appEmbed.on(EmbedEvent.
|
|
582
|
+
* appEmbed.on(EmbedEvent.CustomAction, payload => {
|
|
579
583
|
* const data = payload.data;
|
|
580
584
|
* if (data.id === 'insert Custom Action ID here') {
|
|
581
585
|
* console.log('Custom Action event:', data.embedAnswerData);
|
|
@@ -841,8 +845,8 @@ var EmbedEvent;
|
|
|
841
845
|
*
|
|
842
846
|
* **Note**: This event is deprecated in v1.21.0.
|
|
843
847
|
* To fire an event when a download action is initiated on a chart or table,
|
|
844
|
-
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.
|
|
845
|
-
* `EmbedEvent.
|
|
848
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
|
|
849
|
+
* `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
|
|
846
850
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
847
851
|
* @example
|
|
848
852
|
* ```js
|
|
@@ -892,10 +896,10 @@ var EmbedEvent;
|
|
|
892
896
|
* @example
|
|
893
897
|
* ```js
|
|
894
898
|
* //emit when action starts
|
|
895
|
-
* searchEmbed.on(EmbedEvent.
|
|
899
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
896
900
|
* console.log('download CSV', payload)}, {start: true })
|
|
897
901
|
* //emit when action ends
|
|
898
|
-
* searchEmbed.on(EmbedEvent.
|
|
902
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
899
903
|
* console.log('download CSV', payload)})
|
|
900
904
|
* ```
|
|
901
905
|
*/
|
|
@@ -1294,11 +1298,19 @@ var EmbedEvent;
|
|
|
1294
1298
|
* Emitted when a user changes any filter on a Liveboard.
|
|
1295
1299
|
* Returns filter type and name, column name and ID, and runtime
|
|
1296
1300
|
* filter details.
|
|
1301
|
+
* The payload includes an optional `applicability` attribute indicating the
|
|
1302
|
+
* scope of the changed filter. It contains a `level` (`LIVEBOARD`,
|
|
1303
|
+
* `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a
|
|
1304
|
+
* `targetId` with the GUID of the target. At `LIVEBOARD` level there
|
|
1305
|
+
* is no `targetId`, since the filter applies to the whole Liveboard.
|
|
1306
|
+
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
1307
|
+
* ThoughtSpot: 26.10.0.cl.
|
|
1297
1308
|
* @example
|
|
1298
1309
|
*
|
|
1299
1310
|
* ```js
|
|
1300
1311
|
* LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
|
|
1301
1312
|
* console.log('payload', payload);
|
|
1313
|
+
* // payload.data optionally includes applicability: { level, targetId }
|
|
1302
1314
|
* })
|
|
1303
1315
|
* ```
|
|
1304
1316
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
|
|
@@ -1490,9 +1502,17 @@ var EmbedEvent;
|
|
|
1490
1502
|
/**
|
|
1491
1503
|
* Emitted when parameter changes in an Answer
|
|
1492
1504
|
* or Liveboard.
|
|
1505
|
+
* The payload includes an optional `applicability` attribute indicating the
|
|
1506
|
+
* scope of the changed parameter. It contains a `level` (`LIVEBOARD`,
|
|
1507
|
+
* `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a
|
|
1508
|
+
* `targetId` with the GUID of the target. At `LIVEBOARD` level there
|
|
1509
|
+
* is no `targetId`, since the parameter applies to the whole Liveboard.
|
|
1510
|
+
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
1511
|
+
* ThoughtSpot: 26.10.0.cl.
|
|
1493
1512
|
* ```js
|
|
1494
1513
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
1495
1514
|
* console.log('payload', payload);
|
|
1515
|
+
* // payload.data optionally includes applicability: { level, targetId }
|
|
1496
1516
|
* })
|
|
1497
1517
|
* ```
|
|
1498
1518
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
@@ -1794,6 +1814,158 @@ var EmbedEvent;
|
|
|
1794
1814
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
1795
1815
|
*/
|
|
1796
1816
|
EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
|
|
1817
|
+
/**
|
|
1818
|
+
* Emitted when the header Share button is clicked. Fires `Start` then `End`
|
|
1819
|
+
* to bracket the interaction. App→host counterpart of the
|
|
1820
|
+
* `ShareSpotterConversation` host event (user-driven vs programmatic open).
|
|
1821
|
+
* @example
|
|
1822
|
+
* ```js
|
|
1823
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareConversationButtonHeaderClicked, (payload) => {
|
|
1824
|
+
* // payload: { convId: string }
|
|
1825
|
+
* })
|
|
1826
|
+
* ```
|
|
1827
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1828
|
+
*/
|
|
1829
|
+
EmbedEvent["SpotterShareConversationButtonHeaderClicked"] = "spotterShareConversationButtonHeaderClicked";
|
|
1830
|
+
/**
|
|
1831
|
+
* Emitted when the sidebar Share item is clicked. Fires `Start` then `End`
|
|
1832
|
+
* to bracket the interaction.
|
|
1833
|
+
* @example
|
|
1834
|
+
* ```js
|
|
1835
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareConversationMenuItemSidebarClicked, (payload) => {
|
|
1836
|
+
* // payload: { convId: string }
|
|
1837
|
+
* })
|
|
1838
|
+
* ```
|
|
1839
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1840
|
+
*/
|
|
1841
|
+
EmbedEvent["SpotterShareConversationMenuItemSidebarClicked"] = "spotterShareConversationMenuItemSidebarClicked";
|
|
1842
|
+
/**
|
|
1843
|
+
* Emitted when a Spotter conversation is shared (recipients added, or a new
|
|
1844
|
+
* share created). The host builds its own link from shareId/convId + its
|
|
1845
|
+
* configured CONVERSATION_URL — no link string is sent. Distinct from
|
|
1846
|
+
* `SpotterShareModalConfirmButtonClicked`, which fires at click time before
|
|
1847
|
+
* the save resolves.
|
|
1848
|
+
* @example
|
|
1849
|
+
* ```js
|
|
1850
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationShared, (payload) => {
|
|
1851
|
+
* // payload: { convId: string, shareId: string,
|
|
1852
|
+
* // recipientsAdded: string[], recipientsRemoved: string[] }
|
|
1853
|
+
* })
|
|
1854
|
+
* ```
|
|
1855
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1856
|
+
*/
|
|
1857
|
+
EmbedEvent["SpotterConversationShared"] = "spotterConversationShared";
|
|
1858
|
+
/**
|
|
1859
|
+
* Emitted when access to a shared Spotter conversation is revoked
|
|
1860
|
+
* (recipients removed). `fullyRevoked` is true when the last sharee is removed
|
|
1861
|
+
* and the share is deleted entirely.
|
|
1862
|
+
* @example
|
|
1863
|
+
* ```js
|
|
1864
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationShareRevoked, (payload) => {
|
|
1865
|
+
* // payload: { convId: string, shareId: string,
|
|
1866
|
+
* // recipientsRemoved: string[], fullyRevoked: boolean }
|
|
1867
|
+
* })
|
|
1868
|
+
* ```
|
|
1869
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1870
|
+
*/
|
|
1871
|
+
EmbedEvent["SpotterConversationShareRevoked"] = "spotterConversationShareRevoked";
|
|
1872
|
+
/**
|
|
1873
|
+
* Emitted when a recipient opens a shared Spotter conversation (read-only
|
|
1874
|
+
* view). No shareId available viewer-side.
|
|
1875
|
+
* @example
|
|
1876
|
+
* ```js
|
|
1877
|
+
* spotterEmbed.on(EmbedEvent.SpotterSharedConversationViewed, (payload) => {
|
|
1878
|
+
* // payload: { convId: string, sourceConvId: string }
|
|
1879
|
+
* // convId = resolved snapshot conv id; sourceConvId = the shared URL id
|
|
1880
|
+
* })
|
|
1881
|
+
* ```
|
|
1882
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1883
|
+
*/
|
|
1884
|
+
EmbedEvent["SpotterSharedConversationViewed"] = "spotterSharedConversationViewed";
|
|
1885
|
+
/**
|
|
1886
|
+
* Emitted when the user toggles the share-modal "include new messages since
|
|
1887
|
+
* last shared version" checkbox.
|
|
1888
|
+
* @example
|
|
1889
|
+
* ```js
|
|
1890
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareIncludeNewMessagesCheckboxToggled, (payload) => {
|
|
1891
|
+
* // payload: { convId: string, includeNewMessages: boolean }
|
|
1892
|
+
* })
|
|
1893
|
+
* ```
|
|
1894
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1895
|
+
*/
|
|
1896
|
+
EmbedEvent["SpotterShareIncludeNewMessagesCheckboxToggled"] = "spotterShareIncludeNewMessagesCheckboxToggled";
|
|
1897
|
+
/**
|
|
1898
|
+
* Emitted when the user dismisses the stale-snapshot info banner via its
|
|
1899
|
+
* cross (distinct from the include-new-messages checkbox toggle).
|
|
1900
|
+
* @example
|
|
1901
|
+
* ```js
|
|
1902
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareStaleInfoBannerDismissed, (payload) => {
|
|
1903
|
+
* // payload: { convId: string }
|
|
1904
|
+
* })
|
|
1905
|
+
* ```
|
|
1906
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1907
|
+
*/
|
|
1908
|
+
EmbedEvent["SpotterShareStaleInfoBannerDismissed"] = "spotterShareStaleInfoBannerDismissed";
|
|
1909
|
+
/**
|
|
1910
|
+
* Emitted when the modal Share (confirm) button is clicked — fires at click
|
|
1911
|
+
* time, before the save resolves. Distinct from the `SpotterConversationShared`
|
|
1912
|
+
* / `SpotterConversationShareRevoked` result events.
|
|
1913
|
+
* @example
|
|
1914
|
+
* ```js
|
|
1915
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareModalConfirmButtonClicked, (payload) => {
|
|
1916
|
+
* // payload: { convId: string }
|
|
1917
|
+
* })
|
|
1918
|
+
* ```
|
|
1919
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1920
|
+
*/
|
|
1921
|
+
EmbedEvent["SpotterShareModalConfirmButtonClicked"] = "spotterShareModalConfirmButtonClicked";
|
|
1922
|
+
/**
|
|
1923
|
+
* Emitted when the share modal is dismissed via the Cancel button.
|
|
1924
|
+
* @example
|
|
1925
|
+
* ```js
|
|
1926
|
+
* spotterEmbed.on(EmbedEvent.SpotterShareModalCancelButtonClicked, (payload) => {
|
|
1927
|
+
* // payload: { convId: string }
|
|
1928
|
+
* })
|
|
1929
|
+
* ```
|
|
1930
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1931
|
+
*/
|
|
1932
|
+
EmbedEvent["SpotterShareModalCancelButtonClicked"] = "spotterShareModalCancelButtonClicked";
|
|
1933
|
+
/**
|
|
1934
|
+
* Emitted when a recipient leaves the read-only shared view via the Exit
|
|
1935
|
+
* button.
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```js
|
|
1938
|
+
* spotterEmbed.on(EmbedEvent.SpotterSharedConversationExitButtonClicked, (payload) => {
|
|
1939
|
+
* // payload: { convId: string }
|
|
1940
|
+
* })
|
|
1941
|
+
* ```
|
|
1942
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
1943
|
+
*/
|
|
1944
|
+
EmbedEvent["SpotterSharedConversationExitButtonClicked"] = "spotterSharedConversationExitButtonClicked";
|
|
1945
|
+
/**
|
|
1946
|
+
* Emitted when a Spotter conversation is pinned.
|
|
1947
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
1948
|
+
* @example
|
|
1949
|
+
* ```js
|
|
1950
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationPinned, (payload) => {
|
|
1951
|
+
* console.log('Conversation pinned', payload);
|
|
1952
|
+
* // payload: { conversationId: string, pinnedAt: string (ISO 8601) }
|
|
1953
|
+
* })
|
|
1954
|
+
* ```
|
|
1955
|
+
*/
|
|
1956
|
+
EmbedEvent["SpotterConversationPinned"] = "spotterConversationPinned";
|
|
1957
|
+
/**
|
|
1958
|
+
* Emitted when a Spotter conversation is unpinned.
|
|
1959
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
1960
|
+
* @example
|
|
1961
|
+
* ```js
|
|
1962
|
+
* spotterEmbed.on(EmbedEvent.SpotterConversationUnpinned, (payload) => {
|
|
1963
|
+
* console.log('Conversation unpinned', payload);
|
|
1964
|
+
* // payload: { conversationId: string, unpinnedAt: string (ISO 8601) }
|
|
1965
|
+
* })
|
|
1966
|
+
* ```
|
|
1967
|
+
*/
|
|
1968
|
+
EmbedEvent["SpotterConversationUnpinned"] = "spotterConversationUnpinned";
|
|
1797
1969
|
/**
|
|
1798
1970
|
* Emitted when a Spotter conversation is selected/clicked.
|
|
1799
1971
|
* @example
|
|
@@ -2184,6 +2356,7 @@ var HostEvent;
|
|
|
2184
2356
|
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
2185
2357
|
* console.log("iFrameURL", url);
|
|
2186
2358
|
* ```
|
|
2359
|
+
* @returns iframeUrl - The URL currently loaded in the embedded iframe.
|
|
2187
2360
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
2188
2361
|
*/
|
|
2189
2362
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -2310,6 +2483,17 @@ var HostEvent;
|
|
|
2310
2483
|
* name: string,
|
|
2311
2484
|
* type: ATTRIBUTE/MEASURE,
|
|
2312
2485
|
* dataType: INT64/CHAR/DATE }
|
|
2486
|
+
*
|
|
2487
|
+
* `applicability` - Optional. Scopes the filter to a specific target,
|
|
2488
|
+
* for example, a single Liveboard tab, so the panel for the correct
|
|
2489
|
+
* scoped filter is opened. Available from SDK: 1.53.0 |
|
|
2490
|
+
* ThoughtSpot: 26.10.0.cl. Includes the following attributes:
|
|
2491
|
+
*
|
|
2492
|
+
* - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`.
|
|
2493
|
+
* - `targetId`: The GUID of the target, for example, the tab GUID.
|
|
2494
|
+
* Required when `level` is `TAB` or `GROUP`. Do not pass it when
|
|
2495
|
+
* `level` is `LIVEBOARD`, since the filter applies to the whole
|
|
2496
|
+
* Liveboard. Omitting `applicability` targets the `LIVEBOARD` level.
|
|
2313
2497
|
* @example
|
|
2314
2498
|
* ```js
|
|
2315
2499
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
@@ -2322,6 +2506,14 @@ var HostEvent;
|
|
|
2322
2506
|
* ```
|
|
2323
2507
|
* @example
|
|
2324
2508
|
* ```js
|
|
2509
|
+
* // Open a filter scoped to a specific Liveboard tab
|
|
2510
|
+
* liveboardEmbed.trigger(HostEvent.OpenFilter, {
|
|
2511
|
+
* column: { columnId: '<column-GUID>' },
|
|
2512
|
+
* applicability: { level: 'TAB', targetId: '<tab-GUID>' }
|
|
2513
|
+
* });
|
|
2514
|
+
* ```
|
|
2515
|
+
* @example
|
|
2516
|
+
* ```js
|
|
2325
2517
|
* // Open filter from search context
|
|
2326
2518
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2327
2519
|
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
@@ -2331,6 +2523,73 @@ var HostEvent;
|
|
|
2331
2523
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2332
2524
|
*/
|
|
2333
2525
|
HostEvent["OpenFilter"] = "openFilter";
|
|
2526
|
+
/**
|
|
2527
|
+
* Open the add-filter modal of a Liveboard, the same dialog that the
|
|
2528
|
+
* *Add filter* button in the Liveboard edit header opens, so the host
|
|
2529
|
+
* app can start the add-filter flow from its own UI.
|
|
2530
|
+
*
|
|
2531
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2532
|
+
* Hiding the *Add filter* button with `hiddenActions:
|
|
2533
|
+
* [Action.AddFilter]` does not block this event, but disabling it with
|
|
2534
|
+
* `disabledActions` does.
|
|
2535
|
+
*
|
|
2536
|
+
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2537
|
+
* existing filter, this event starts the creation of a new filter.
|
|
2538
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2539
|
+
* @example
|
|
2540
|
+
* ```js
|
|
2541
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
2542
|
+
* ```
|
|
2543
|
+
*/
|
|
2544
|
+
HostEvent["OpenAddFilterModal"] = "openAddFilterModal";
|
|
2545
|
+
/**
|
|
2546
|
+
* Open the add-parameter panel of a Liveboard, the same panel that the
|
|
2547
|
+
* *Add parameter* button in the Liveboard edit header opens.
|
|
2548
|
+
* Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
|
|
2549
|
+
*
|
|
2550
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2551
|
+
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2552
|
+
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2553
|
+
* with `disabledActions` does.
|
|
2554
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2555
|
+
* @example
|
|
2556
|
+
* ```js
|
|
2557
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
2558
|
+
* ```
|
|
2559
|
+
*/
|
|
2560
|
+
HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
|
|
2561
|
+
/**
|
|
2562
|
+
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
2563
|
+
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
2564
|
+
* @param - Includes the following keys:
|
|
2565
|
+
* - `parameter`: An object identifying the parameter to open, for
|
|
2566
|
+
* example, `{ parameterId: '<parameter-GUID>' }`.
|
|
2567
|
+
* - `applicability`: Optional. Scopes the parameter to a specific target,
|
|
2568
|
+
* for example, a single Liveboard tab, so the panel for the correct
|
|
2569
|
+
* scoped parameter is opened. Includes the following attributes:
|
|
2570
|
+
*
|
|
2571
|
+
* - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`.
|
|
2572
|
+
* - `targetId`: The GUID of the target, for example, the tab GUID.
|
|
2573
|
+
* Required when `level` is `TAB` or `GROUP`. Do not pass it when
|
|
2574
|
+
* `level` is `LIVEBOARD`, since the parameter applies to the whole
|
|
2575
|
+
* Liveboard. Omitting `applicability` targets the `LIVEBOARD` level.
|
|
2576
|
+
* @example
|
|
2577
|
+
* ```js
|
|
2578
|
+
* liveboardEmbed.trigger(HostEvent.OpenParameter, {
|
|
2579
|
+
* parameter: { parameterId: '<parameter-GUID>' }
|
|
2580
|
+
* });
|
|
2581
|
+
* ```
|
|
2582
|
+
* @example
|
|
2583
|
+
* ```js
|
|
2584
|
+
* // Open a parameter scoped to a specific group
|
|
2585
|
+
* liveboardEmbed.trigger(HostEvent.OpenParameter, {
|
|
2586
|
+
* parameter: { parameterId: '<parameter-GUID>' },
|
|
2587
|
+
* applicability: { level: 'GROUP', targetId: '<group-GUID>' }
|
|
2588
|
+
* });
|
|
2589
|
+
* ```
|
|
2590
|
+
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
2591
|
+
*/
|
|
2592
|
+
HostEvent["OpenParameter"] = "openParameter";
|
|
2334
2593
|
/**
|
|
2335
2594
|
* Add columns to the current search query.
|
|
2336
2595
|
* @param - { columnIds: string[] }
|
|
@@ -2380,6 +2639,10 @@ var HostEvent;
|
|
|
2380
2639
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
2381
2640
|
* data=>console.log(data))
|
|
2382
2641
|
* ```
|
|
2642
|
+
* @returns data - Object with a `v2Content` string: the export request
|
|
2643
|
+
* payload for the current Liveboard.
|
|
2644
|
+
* @returns type - The passthrough event name,
|
|
2645
|
+
* `getExportRequestForCurrentPinboard`.
|
|
2383
2646
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
2384
2647
|
*/
|
|
2385
2648
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
@@ -2482,6 +2745,9 @@ var HostEvent;
|
|
|
2482
2745
|
* }, ContextType.Spotter);
|
|
2483
2746
|
* ```
|
|
2484
2747
|
*
|
|
2748
|
+
* @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
|
|
2749
|
+
* @returns tabId - GUID of the tab within that Liveboard.
|
|
2750
|
+
* @returns vizId - GUID of the newly created visualization.
|
|
2485
2751
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2486
2752
|
*/
|
|
2487
2753
|
HostEvent["Pin"] = "pin";
|
|
@@ -2520,13 +2786,13 @@ var HostEvent;
|
|
|
2520
2786
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
2521
2787
|
* @example
|
|
2522
2788
|
* ```js
|
|
2523
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2789
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
2524
2790
|
* ```
|
|
2525
2791
|
* @example
|
|
2526
2792
|
* ```js
|
|
2527
2793
|
* // Manage schedules from liveboard context
|
|
2528
2794
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2529
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2795
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
|
|
2530
2796
|
* ```
|
|
2531
2797
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2532
2798
|
*/
|
|
@@ -2971,6 +3237,7 @@ var HostEvent;
|
|
|
2971
3237
|
* console.log(tml.answer);
|
|
2972
3238
|
* });
|
|
2973
3239
|
* ```
|
|
3240
|
+
* @returns The TML representation of the current Answer, as an object.
|
|
2974
3241
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
2975
3242
|
* @important
|
|
2976
3243
|
*/
|
|
@@ -3395,13 +3662,13 @@ var HostEvent;
|
|
|
3395
3662
|
/**
|
|
3396
3663
|
* Get details of filters applied on the Liveboard.
|
|
3397
3664
|
* Returns arrays containing Liveboard filter and runtime filter elements.
|
|
3398
|
-
* Each Liveboard filter
|
|
3665
|
+
* Each Liveboard filter includes an optional `applicability` attribute
|
|
3399
3666
|
* indicating the scope of the filter. It contains a `level`
|
|
3400
3667
|
* (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
|
|
3401
3668
|
* `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
|
|
3402
3669
|
* level there is no `targetId`, since the filter applies to the
|
|
3403
3670
|
* whole Liveboard.
|
|
3404
|
-
* The `applicability` attribute is available from SDK: 1.
|
|
3671
|
+
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
3405
3672
|
* ThoughtSpot: 26.10.0.cl.
|
|
3406
3673
|
* @example
|
|
3407
3674
|
* ```js
|
|
@@ -3415,6 +3682,8 @@ var HostEvent;
|
|
|
3415
3682
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3416
3683
|
* console.log('filters', data);
|
|
3417
3684
|
* ```
|
|
3685
|
+
* @returns liveboardFilters - Filters applied on the Liveboard.
|
|
3686
|
+
* @returns runtimeFilters - Runtime filters applied on the Liveboard.
|
|
3418
3687
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
3419
3688
|
*/
|
|
3420
3689
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -3444,7 +3713,7 @@ var HostEvent;
|
|
|
3444
3713
|
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
3445
3714
|
*
|
|
3446
3715
|
* `applicability` - Optional. Scopes the filter to a specific target,
|
|
3447
|
-
* for example, a single Liveboard tab. Available from SDK: 1.
|
|
3716
|
+
* for example, a single Liveboard tab. Available from SDK: 1.53.0 |
|
|
3448
3717
|
* ThoughtSpot: 26.10.0.cl. Includes the following attributes:
|
|
3449
3718
|
*
|
|
3450
3719
|
* - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`.
|
|
@@ -3564,9 +3833,37 @@ var HostEvent;
|
|
|
3564
3833
|
* console.log('tabs', tabDetails);
|
|
3565
3834
|
* });
|
|
3566
3835
|
* ```
|
|
3836
|
+
* @returns orderedTabIds - Tab GUIDs in the order they appear.
|
|
3837
|
+
* @returns numberOfTabs - Total number of tabs on the Liveboard.
|
|
3838
|
+
* @returns Tabs - Tab details, each with at least `id` and `name`.
|
|
3567
3839
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
3568
3840
|
*/
|
|
3569
3841
|
HostEvent["GetTabs"] = "getTabs";
|
|
3842
|
+
/**
|
|
3843
|
+
* Get group details for the current Liveboard.
|
|
3844
|
+
* Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
|
|
3845
|
+
* @example
|
|
3846
|
+
* ```js
|
|
3847
|
+
* liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
|
|
3848
|
+
* console.log(
|
|
3849
|
+
* groupDetails // GroupDetails of current Liveboard
|
|
3850
|
+
* );
|
|
3851
|
+
* })
|
|
3852
|
+
* ```
|
|
3853
|
+
* @example
|
|
3854
|
+
* ```js
|
|
3855
|
+
* // Get groups from liveboard context
|
|
3856
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3857
|
+
* liveboardEmbed.trigger(HostEvent.GetGroups, {}, ContextType.Liveboard).then((groupDetails) => {
|
|
3858
|
+
* console.log('groups', groupDetails);
|
|
3859
|
+
* });
|
|
3860
|
+
* ```
|
|
3861
|
+
* @returns orderedGroupIds - Group GUIDs in the order they appear.
|
|
3862
|
+
* @returns numberOfGroups - Total number of groups on the Liveboard.
|
|
3863
|
+
* @returns Groups - Group details, each with at least `id` and `name`.
|
|
3864
|
+
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
3865
|
+
*/
|
|
3866
|
+
HostEvent["GetGroups"] = "getGroups";
|
|
3570
3867
|
/**
|
|
3571
3868
|
* Set the visible tabs on a Liveboard.
|
|
3572
3869
|
* @param - an array of ids of tabs to show, the IDs not passed
|
|
@@ -3638,6 +3935,9 @@ var HostEvent;
|
|
|
3638
3935
|
* // Alternative direct usage (not recommended)
|
|
3639
3936
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
3640
3937
|
* ```
|
|
3938
|
+
* @returns session - Session identifier for the Answer, for use with the
|
|
3939
|
+
* `AnswerService`.
|
|
3940
|
+
* @returns embedAnswerData - Data backing the Answer, when available.
|
|
3641
3941
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
3642
3942
|
*/
|
|
3643
3943
|
HostEvent["GetAnswerSession"] = "getAnswerSession";
|
|
@@ -3695,7 +3995,7 @@ var HostEvent;
|
|
|
3695
3995
|
* - `value`: The value to set for the parameter.
|
|
3696
3996
|
* - `isVisibleToUser`: Optional. To control the visibility of the parameter chip.
|
|
3697
3997
|
* - `applicability`: Optional. Scopes the parameter to a specific target,
|
|
3698
|
-
* for example, a single Liveboard tab. Available from SDK: 1.
|
|
3998
|
+
* for example, a single Liveboard tab. Available from SDK: 1.53.0 |
|
|
3699
3999
|
* ThoughtSpot: 26.10.0.cl. Includes the following attributes:
|
|
3700
4000
|
*
|
|
3701
4001
|
* - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`.
|
|
@@ -3739,13 +4039,13 @@ var HostEvent;
|
|
|
3739
4039
|
HostEvent["UpdateParameters"] = "UpdateParameters";
|
|
3740
4040
|
/**
|
|
3741
4041
|
* Triggers GetParameters to fetch the runtime Parameters.
|
|
3742
|
-
* Each parameter
|
|
4042
|
+
* Each parameter includes an optional `applicability` attribute
|
|
3743
4043
|
* indicating the scope of the parameter. It contains a `level`
|
|
3744
4044
|
* (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
|
|
3745
4045
|
* `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
|
|
3746
4046
|
* level there is no `targetId`, since the parameter applies to the
|
|
3747
4047
|
* whole Liveboard.
|
|
3748
|
-
* The `applicability` attribute is available from SDK: 1.
|
|
4048
|
+
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
3749
4049
|
* ThoughtSpot: 26.10.0.cl.
|
|
3750
4050
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3751
4051
|
* ```js
|
|
@@ -3771,12 +4071,16 @@ var HostEvent;
|
|
|
3771
4071
|
* console.log('parameters', parameters);
|
|
3772
4072
|
* });
|
|
3773
4073
|
* ```
|
|
4074
|
+
* @returns parameters - Parameters currently applied on the Liveboard.
|
|
3774
4075
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
3775
4076
|
*/
|
|
3776
4077
|
HostEvent["GetParameters"] = "GetParameters";
|
|
3777
4078
|
/**
|
|
3778
4079
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
3779
|
-
* This event is deprecated. Use {@link HostEvent.
|
|
4080
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4081
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4082
|
+
* called with an empty payload, and reports an error when a named view
|
|
4083
|
+
* cannot be found.
|
|
3780
4084
|
* ```js
|
|
3781
4085
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3782
4086
|
* ```
|
|
@@ -3794,10 +4098,15 @@ var HostEvent;
|
|
|
3794
4098
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
3795
4099
|
/**
|
|
3796
4100
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
4101
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4102
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4103
|
+
* called with an empty payload, and reports an error when a named view
|
|
4104
|
+
* cannot be found.
|
|
3797
4105
|
* ```js
|
|
3798
4106
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
3799
4107
|
* ```
|
|
3800
4108
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4109
|
+
* @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
3801
4110
|
*/
|
|
3802
4111
|
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
3803
4112
|
/**
|
|
@@ -3900,6 +4209,10 @@ var HostEvent;
|
|
|
3900
4209
|
* description: "Generated from Spotter"
|
|
3901
4210
|
* }, ContextType.Spotter);
|
|
3902
4211
|
* ```
|
|
4212
|
+
* @returns answerId - GUID of the saved Answer.
|
|
4213
|
+
* @returns saveResponse - Raw response from the save operation.
|
|
4214
|
+
* @returns shareResponse - Raw response from the share operation, when the
|
|
4215
|
+
* Answer was also made discoverable.
|
|
3903
4216
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
3904
4217
|
*/
|
|
3905
4218
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -4013,6 +4326,36 @@ var HostEvent;
|
|
|
4013
4326
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4014
4327
|
*/
|
|
4015
4328
|
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
4329
|
+
/**
|
|
4330
|
+
* Opens the Spotter share-conversation modal for the given conversation.
|
|
4331
|
+
* `conversationId` is **mandatory** — you must pass the id of the
|
|
4332
|
+
* conversation to share. Also no-op when sharing is disabled
|
|
4333
|
+
* (enableShareConversation off) or when already in the read-only shared view.
|
|
4334
|
+
* @example
|
|
4335
|
+
* ```js
|
|
4336
|
+
* spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
|
|
4337
|
+
* ```
|
|
4338
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
4339
|
+
*/
|
|
4340
|
+
HostEvent["ShareSpotterConversation"] = "ShareSpotterConversation";
|
|
4341
|
+
/**
|
|
4342
|
+
* Closes the Spotter share-conversation modal. No-op if none is open.
|
|
4343
|
+
* @example
|
|
4344
|
+
* ```js
|
|
4345
|
+
* spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
|
|
4346
|
+
* ```
|
|
4347
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
4348
|
+
*/
|
|
4349
|
+
HostEvent["CloseSpotterShareConversation"] = "CloseSpotterShareConversation";
|
|
4350
|
+
/**
|
|
4351
|
+
* Exits the read-only shared-conversation view.
|
|
4352
|
+
* @example
|
|
4353
|
+
* ```js
|
|
4354
|
+
* spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
|
|
4355
|
+
* ```
|
|
4356
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
4357
|
+
*/
|
|
4358
|
+
HostEvent["ExitSpotterSharedConversation"] = "ExitSpotterSharedConversation";
|
|
4016
4359
|
/**
|
|
4017
4360
|
* Deletes the last prompt in spotter embed.
|
|
4018
4361
|
* @example
|
|
@@ -4108,6 +4451,41 @@ var HostEvent;
|
|
|
4108
4451
|
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
4109
4452
|
*/
|
|
4110
4453
|
HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
|
|
4454
|
+
/**
|
|
4455
|
+
* Pins a saved Spotter conversation so it floats to the top of the past
|
|
4456
|
+
* conversations sidebar. The `conversationId` of the conversation to pin is
|
|
4457
|
+
* required.
|
|
4458
|
+
*
|
|
4459
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
4460
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
4461
|
+
* instance.
|
|
4462
|
+
*
|
|
4463
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
4464
|
+
* @example
|
|
4465
|
+
* ```js
|
|
4466
|
+
* spotterEmbed.trigger(HostEvent.PinSpotterConversation, {
|
|
4467
|
+
* conversationId: '<conversation-id>',
|
|
4468
|
+
* });
|
|
4469
|
+
* ```
|
|
4470
|
+
*/
|
|
4471
|
+
HostEvent["PinSpotterConversation"] = "PinSpotterConversation";
|
|
4472
|
+
/**
|
|
4473
|
+
* Unpins a previously pinned Spotter conversation. The `conversationId` of the
|
|
4474
|
+
* conversation to unpin is required.
|
|
4475
|
+
*
|
|
4476
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot
|
|
4477
|
+
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
4478
|
+
* instance.
|
|
4479
|
+
*
|
|
4480
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
4481
|
+
* @example
|
|
4482
|
+
* ```js
|
|
4483
|
+
* spotterEmbed.trigger(HostEvent.UnpinSpotterConversation, {
|
|
4484
|
+
* conversationId: '<conversation-id>',
|
|
4485
|
+
* });
|
|
4486
|
+
* ```
|
|
4487
|
+
*/
|
|
4488
|
+
HostEvent["UnpinSpotterConversation"] = "UnpinSpotterConversation";
|
|
4111
4489
|
/**
|
|
4112
4490
|
* @hidden
|
|
4113
4491
|
* Get the current context of the embedded page.
|
|
@@ -4316,6 +4694,7 @@ var Param;
|
|
|
4316
4694
|
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
4317
4695
|
Param["CurrencyFormat"] = "currencyFormat";
|
|
4318
4696
|
Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
|
|
4697
|
+
Param["IsLiveboardAlwaysOn12ColLayout"] = "isLiveboardAlwaysOn12ColLayout";
|
|
4319
4698
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
4320
4699
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
4321
4700
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
@@ -4339,6 +4718,7 @@ var Param;
|
|
|
4339
4718
|
Param["PrimaryAction"] = "primaryAction";
|
|
4340
4719
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
4341
4720
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
4721
|
+
Param["LiveboardGutter"] = "liveboardGutter";
|
|
4342
4722
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
4343
4723
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
4344
4724
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
@@ -4347,9 +4727,11 @@ var Param;
|
|
|
4347
4727
|
Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
|
|
4348
4728
|
Param["isSendNowLiveboardSchedulingEnabled"] = "isSendNowLiveboardSchedulingEnabled";
|
|
4349
4729
|
Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
|
|
4730
|
+
Param["isScopedLiveboardFilteringEnabled"] = "isScopedLiveboardFilteringEnabled";
|
|
4350
4731
|
Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
|
|
4351
4732
|
Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
|
|
4352
4733
|
Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
|
|
4734
|
+
Param["ShowSpotterRadiance"] = "showSpotterRadiance";
|
|
4353
4735
|
Param["DefaultQueryMode"] = "defaultQueryMode";
|
|
4354
4736
|
Param["EnableStopAnswerGenerationEmbed"] = "enableStopAnswerGenerationEmbed";
|
|
4355
4737
|
Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
|
|
@@ -4370,14 +4752,19 @@ var Param;
|
|
|
4370
4752
|
Param["SpotterFileUploadEnabled"] = "spotterFileUploadEnabled";
|
|
4371
4753
|
Param["SpotterFileUploadFileTypes"] = "spotterFileUploadFileTypes";
|
|
4372
4754
|
Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
|
|
4755
|
+
Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
|
|
4756
|
+
Param["SpotterDataSources"] = "spotterDataSources";
|
|
4757
|
+
Param["AnalystId"] = "analystId";
|
|
4758
|
+
Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
|
|
4373
4759
|
})(Param || (Param = {}));
|
|
4374
4760
|
/**
|
|
4375
4761
|
* ThoughtSpot application pages include actions and menu commands
|
|
4376
4762
|
* for various user-initiated operations. These actions are represented
|
|
4377
4763
|
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
4378
|
-
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4379
|
-
* - hiddenActions — the action is completely removed from
|
|
4380
|
-
* - visibleActions — allowlist, only these actions
|
|
4764
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4765
|
+
* (user can see but not click). - hiddenActions — the action is completely removed from
|
|
4766
|
+
* the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
|
|
4767
|
+
* are shown; all others are hidden.
|
|
4381
4768
|
*
|
|
4382
4769
|
* Use disabledActions to disable (gray out) an action.
|
|
4383
4770
|
* Use hiddenActions to hide (fully remove) an action.
|
|
@@ -4431,6 +4818,17 @@ var Action;
|
|
|
4431
4818
|
* ```
|
|
4432
4819
|
*/
|
|
4433
4820
|
Action["SaveAsView"] = "saveAsView";
|
|
4821
|
+
/**
|
|
4822
|
+
* The **EditInputTable** action on a Liveboard
|
|
4823
|
+
* page. Allows users to edit an input table used in an Answer directly from
|
|
4824
|
+
* a Liveboard.
|
|
4825
|
+
* @example
|
|
4826
|
+
* ```js
|
|
4827
|
+
* disabledActions: [Action.EditInputTable]
|
|
4828
|
+
* ```
|
|
4829
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
4830
|
+
*/
|
|
4831
|
+
Action["EditInputTable"] = "editInputTable";
|
|
4434
4832
|
/**
|
|
4435
4833
|
* The **Make a copy** action on a Liveboard or Answer
|
|
4436
4834
|
* page. Creates a copy of the Liveboard.
|
|
@@ -5634,6 +6032,19 @@ var Action;
|
|
|
5634
6032
|
* @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl
|
|
5635
6033
|
*/
|
|
5636
6034
|
Action["ChangeFilterVisibilityInTab"] = "changeFilterVisibilityInTab";
|
|
6035
|
+
/**
|
|
6036
|
+
* Action ID to show, hide, or disable all filter surfaces on a Liveboard,
|
|
6037
|
+
* including filter, parameter, and cross-filter chips at the liveboard,
|
|
6038
|
+
* tab, and group levels. Parameter and cross-filter chips are hide-only.
|
|
6039
|
+
*
|
|
6040
|
+
* @example
|
|
6041
|
+
* ```js
|
|
6042
|
+
* hiddenActions: [Action.AllLiveboardFilters]
|
|
6043
|
+
* disabledActions: [Action.AllLiveboardFilters]
|
|
6044
|
+
* ```
|
|
6045
|
+
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
6046
|
+
*/
|
|
6047
|
+
Action["AllLiveboardFilters"] = "allLiveboardFilters";
|
|
5637
6048
|
/**
|
|
5638
6049
|
* The **Data model instructions** button on the Spotter interface.
|
|
5639
6050
|
* Allows opening the data model instructions modal.
|
|
@@ -5735,6 +6146,10 @@ var Action;
|
|
|
5735
6146
|
* The **Add to Coaching** feature allows adding reference questions and
|
|
5736
6147
|
* business terms to improve Spotter’s responses. This feature is generally available
|
|
5737
6148
|
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
6149
|
+
*
|
|
6150
|
+
* This action governs both the answer-card **Add to memory** CTA and its
|
|
6151
|
+
* Spotter 3 successor, the response-footer **Remember this** CTA
|
|
6152
|
+
* (they are mutually exclusive).
|
|
5738
6153
|
* @example
|
|
5739
6154
|
* ```js
|
|
5740
6155
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -5969,6 +6384,89 @@ var Action;
|
|
|
5969
6384
|
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
5970
6385
|
*/
|
|
5971
6386
|
Action["SpotterChatRename"] = "spotterChatRename";
|
|
6387
|
+
/**
|
|
6388
|
+
* Controls visibility and disable state of the Spotter conversation Share
|
|
6389
|
+
* button in the chat header. Only takes effect once sharing is enabled
|
|
6390
|
+
* (enableShareConversation on).
|
|
6391
|
+
* @example
|
|
6392
|
+
* ```js
|
|
6393
|
+
* disabledActions: [Action.SpotterShareConversationButtonHeader]
|
|
6394
|
+
* ```
|
|
6395
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6396
|
+
*/
|
|
6397
|
+
Action["SpotterShareConversationButtonHeader"] = "spotterShareConversationButtonHeader";
|
|
6398
|
+
/**
|
|
6399
|
+
* Controls visibility and disable state of the Share item in the Spotter
|
|
6400
|
+
* conversation history (sidebar) edit menu. Independent of the header button
|
|
6401
|
+
* above, so a host can show Share in one entry point and hide it in the other.
|
|
6402
|
+
* @example
|
|
6403
|
+
* ```js
|
|
6404
|
+
* disabledActions: [Action.SpotterShareConversationMenuItemSidebar]
|
|
6405
|
+
* ```
|
|
6406
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6407
|
+
*/
|
|
6408
|
+
Action["SpotterShareConversationMenuItemSidebar"] = "spotterShareConversationMenuItemSidebar";
|
|
6409
|
+
/**
|
|
6410
|
+
* Controls visibility of the entire read-only shared-conversation data-access
|
|
6411
|
+
* banner shown when a recipient opens a shared view. Hide-only.
|
|
6412
|
+
* @example
|
|
6413
|
+
* ```js
|
|
6414
|
+
* hiddenActions: [Action.SpotterSharedConversationBanner]
|
|
6415
|
+
* ```
|
|
6416
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6417
|
+
*/
|
|
6418
|
+
Action["SpotterSharedConversationBanner"] = "spotterSharedConversationBanner";
|
|
6419
|
+
/**
|
|
6420
|
+
* Controls visibility and disable state of the cross/close button on the
|
|
6421
|
+
* read-only shared-conversation data-access banner (keeps the banner itself).
|
|
6422
|
+
* @example
|
|
6423
|
+
* ```js
|
|
6424
|
+
* hiddenActions: [Action.SpotterSharedConversationBannerDismissButton]
|
|
6425
|
+
* ```
|
|
6426
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6427
|
+
*/
|
|
6428
|
+
Action["SpotterSharedConversationBannerDismissButton"] = "spotterSharedConversationBannerDismissButton";
|
|
6429
|
+
/**
|
|
6430
|
+
* Controls visibility and disable state of the Exit button in the read-only
|
|
6431
|
+
* shared-view header. Hiding it does not disable the ExitSpotterSharedConversation
|
|
6432
|
+
* host event.
|
|
6433
|
+
* @example
|
|
6434
|
+
* ```js
|
|
6435
|
+
* hiddenActions: [Action.SpotterSharedConversationExitButton]
|
|
6436
|
+
* ```
|
|
6437
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6438
|
+
*/
|
|
6439
|
+
Action["SpotterSharedConversationExitButton"] = "spotterSharedConversationExitButton";
|
|
6440
|
+
/**
|
|
6441
|
+
* Controls visibility of the share-modal footer note ("Chat will be shared up
|
|
6442
|
+
* to the current moment…"). Hide-only.
|
|
6443
|
+
* @example
|
|
6444
|
+
* ```js
|
|
6445
|
+
* hiddenActions: [Action.SpotterShareUpToCurrentInfo]
|
|
6446
|
+
* ```
|
|
6447
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6448
|
+
*/
|
|
6449
|
+
Action["SpotterShareUpToCurrentInfo"] = "spotterShareUpToCurrentInfo";
|
|
6450
|
+
/**
|
|
6451
|
+
* Controls visibility and disable state of the share-modal "include new
|
|
6452
|
+
* messages since last shared version" checkbox.
|
|
6453
|
+
* @example
|
|
6454
|
+
* ```js
|
|
6455
|
+
* disabledActions: [Action.SpotterShareIncludeNewMessagesCheckbox]
|
|
6456
|
+
* ```
|
|
6457
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6458
|
+
*/
|
|
6459
|
+
Action["SpotterShareIncludeNewMessagesCheckbox"] = "spotterShareIncludeNewMessagesCheckbox";
|
|
6460
|
+
/**
|
|
6461
|
+
* Controls visibility and disable state of the cross on the share-modal
|
|
6462
|
+
* stale-snapshot info banner.
|
|
6463
|
+
* @example
|
|
6464
|
+
* ```js
|
|
6465
|
+
* hiddenActions: [Action.SpotterShareStaleInfoBannerDismissButton]
|
|
6466
|
+
* ```
|
|
6467
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6468
|
+
*/
|
|
6469
|
+
Action["SpotterShareStaleInfoBannerDismissButton"] = "spotterShareStaleInfoBannerDismissButton";
|
|
5972
6470
|
/**
|
|
5973
6471
|
* Controls visibility and disable state of the delete action
|
|
5974
6472
|
* in the Spotter conversation edit menu.
|
|
@@ -5979,6 +6477,16 @@ var Action;
|
|
|
5979
6477
|
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
5980
6478
|
*/
|
|
5981
6479
|
Action["SpotterChatDelete"] = "spotterChatDelete";
|
|
6480
|
+
/**
|
|
6481
|
+
* Controls visibility and disable state of the pin/unpin action
|
|
6482
|
+
* in the Spotter conversation edit menu.
|
|
6483
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6484
|
+
* @example
|
|
6485
|
+
* ```js
|
|
6486
|
+
* disabledActions: [Action.SpotterChatPin]
|
|
6487
|
+
* ```
|
|
6488
|
+
*/
|
|
6489
|
+
Action["SpotterChatPin"] = "spotterChatPin";
|
|
5982
6490
|
/**
|
|
5983
6491
|
* Controls visibility and disable state of the documentation/best practices
|
|
5984
6492
|
* link in the Spotter sidebar footer.
|
|
@@ -6022,6 +6530,56 @@ var Action;
|
|
|
6022
6530
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6023
6531
|
*/
|
|
6024
6532
|
Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
|
|
6533
|
+
/**
|
|
6534
|
+
* The **Basic Search** starter prompt pill.
|
|
6535
|
+
*
|
|
6536
|
+
* Starter prompt pills are the row of category buttons shown above the
|
|
6537
|
+
* Spotter chat input before a conversation starts. They give a new user
|
|
6538
|
+
* ready-made questions to click instead of typing one from scratch, and
|
|
6539
|
+
* disappear once the conversation begins. There are three, one per action
|
|
6540
|
+
* below.
|
|
6541
|
+
*
|
|
6542
|
+
* Clicking this pill opens a card of suggested simple questions; picking one
|
|
6543
|
+
* submits it to Spotter right away. Visible by default, and hidden along
|
|
6544
|
+
* with the other pills when the surface itself is off (see
|
|
6545
|
+
* {@link SpotterChatViewConfig.starterPrompts}).
|
|
6546
|
+
* @example
|
|
6547
|
+
* ```js
|
|
6548
|
+
* hiddenActions: [Action.QuickSearchPill]
|
|
6549
|
+
* ```
|
|
6550
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6551
|
+
*/
|
|
6552
|
+
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6553
|
+
/**
|
|
6554
|
+
* The **Deep Analysis** starter prompt pill, next to
|
|
6555
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6556
|
+
*
|
|
6557
|
+
* Clicking it opens a card of suggested investigative questions ("why did
|
|
6558
|
+
* revenue drop?"). Picking one fills the chat input in Deep Analysis mode
|
|
6559
|
+
* rather than submitting immediately, so the user can edit it first.
|
|
6560
|
+
* Visible by default.
|
|
6561
|
+
* @example
|
|
6562
|
+
* ```js
|
|
6563
|
+
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6564
|
+
* ```
|
|
6565
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6566
|
+
*/
|
|
6567
|
+
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6568
|
+
/**
|
|
6569
|
+
* The **Data Literacy** starter prompt pill, next to
|
|
6570
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6571
|
+
*
|
|
6572
|
+
* Unlike the other two pills it opens no card: clicking it submits a prompt
|
|
6573
|
+
* that describes the data the model can answer over, helping a user who does
|
|
6574
|
+
* not yet know what is in the data source. The prompt text always comes from
|
|
6575
|
+
* ThoughtSpot, so only its label is customizable. Visible by default.
|
|
6576
|
+
* @example
|
|
6577
|
+
* ```js
|
|
6578
|
+
* hiddenActions: [Action.DataLiteracyPill]
|
|
6579
|
+
* ```
|
|
6580
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6581
|
+
*/
|
|
6582
|
+
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6025
6583
|
/**
|
|
6026
6584
|
* The **Include current period** checkbox for date filters.
|
|
6027
6585
|
* Controls the visibility and availability of the option to include
|
|
@@ -6170,6 +6728,38 @@ var Action;
|
|
|
6170
6728
|
* ```
|
|
6171
6729
|
*/
|
|
6172
6730
|
Action["SpotterAnalystSidebar"] = "spotterAnalystSidebar";
|
|
6731
|
+
/**
|
|
6732
|
+
* Controls visibility and disable state of the analyst list
|
|
6733
|
+
* ("Show all") in the Spotter Analyst interface.
|
|
6734
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6735
|
+
* @example
|
|
6736
|
+
* ```js
|
|
6737
|
+
* hiddenActions: [Action.SpotterAnalystList]
|
|
6738
|
+
* disabledActions: [Action.SpotterAnalystList]
|
|
6739
|
+
* ```
|
|
6740
|
+
*/
|
|
6741
|
+
Action["SpotterAnalystList"] = "spotterAnalystList";
|
|
6742
|
+
/**
|
|
6743
|
+
* Controls visibility and disable state of the default Spotter analyst
|
|
6744
|
+
* entry in the Spotter Analyst interface.
|
|
6745
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6746
|
+
* @example
|
|
6747
|
+
* ```js
|
|
6748
|
+
* hiddenActions: [Action.SpotterDefaultAnalyst]
|
|
6749
|
+
* disabledActions: [Action.SpotterDefaultAnalyst]
|
|
6750
|
+
* ```
|
|
6751
|
+
*/
|
|
6752
|
+
Action["SpotterDefaultAnalyst"] = "spotterDefaultAnalyst";
|
|
6753
|
+
/**
|
|
6754
|
+
* The **Spotter** button in the Liveboard header.
|
|
6755
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6756
|
+
* @example
|
|
6757
|
+
* ```js
|
|
6758
|
+
* hiddenActions: [Action.SpotterOnLiveboard]
|
|
6759
|
+
* disabledActions: [Action.SpotterOnLiveboard]
|
|
6760
|
+
* ```
|
|
6761
|
+
*/
|
|
6762
|
+
Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
|
|
6173
6763
|
})(Action || (Action = {}));
|
|
6174
6764
|
var PrefetchFeatures;
|
|
6175
6765
|
(function (PrefetchFeatures) {
|
|
@@ -6637,7 +7227,7 @@ var TableContentDensity;
|
|
|
6637
7227
|
TableContentDensity["Compact"] = "COMPACT";
|
|
6638
7228
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
6639
7229
|
|
|
6640
|
-
var version$1="1.
|
|
7230
|
+
var version$1="1.51.0-test";var pkg = {version:version$1};
|
|
6641
7231
|
|
|
6642
7232
|
const { version } = pkg;
|
|
6643
7233
|
|
|
@@ -6783,7 +7373,6 @@ merge$1.withOptions = (options, ...objects) => {
|
|
|
6783
7373
|
|
|
6784
7374
|
const ERROR_MESSAGE = {
|
|
6785
7375
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6786
|
-
SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a Model to get started',
|
|
6787
7376
|
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
|
|
6788
7377
|
TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
|
|
6789
7378
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
|
|
@@ -7445,6 +8034,72 @@ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
|
|
|
7445
8034
|
}
|
|
7446
8035
|
};
|
|
7447
8036
|
|
|
8037
|
+
/**
|
|
8038
|
+
* Copyright (c) 2023
|
|
8039
|
+
*
|
|
8040
|
+
* Utilities related to reading configuration objects
|
|
8041
|
+
* @summary Config-related utils
|
|
8042
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8043
|
+
*/
|
|
8044
|
+
const urlRegex = new RegExp([
|
|
8045
|
+
'(^(https?:)//)?',
|
|
8046
|
+
'(([^:/?#]*)(?::([0-9]+))?)',
|
|
8047
|
+
'(/{0,1}[^?#]*)',
|
|
8048
|
+
'(\\?[^#]*|)',
|
|
8049
|
+
'(#.*|)$', // hash
|
|
8050
|
+
].join(''));
|
|
8051
|
+
/**
|
|
8052
|
+
* Parse and construct the ThoughtSpot hostname or IP address
|
|
8053
|
+
* from the embed configuration object.
|
|
8054
|
+
* @param config
|
|
8055
|
+
*/
|
|
8056
|
+
const getThoughtSpotHost = (config) => {
|
|
8057
|
+
if (!config.thoughtSpotHost) {
|
|
8058
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8059
|
+
}
|
|
8060
|
+
const urlParts = config.thoughtSpotHost.match(urlRegex);
|
|
8061
|
+
if (!urlParts) {
|
|
8062
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8063
|
+
}
|
|
8064
|
+
const protocol = urlParts[2] || window.location.protocol;
|
|
8065
|
+
const host = urlParts[3];
|
|
8066
|
+
let path = urlParts[6];
|
|
8067
|
+
// Lose the trailing / if any
|
|
8068
|
+
if (path.charAt(path.length - 1) === '/') {
|
|
8069
|
+
path = path.substring(0, path.length - 1);
|
|
8070
|
+
}
|
|
8071
|
+
// const urlParams = urlParts[7];
|
|
8072
|
+
// const hash = urlParts[8];
|
|
8073
|
+
return `${protocol}//${host}${path}`;
|
|
8074
|
+
};
|
|
8075
|
+
const getV2BasePath = (config) => {
|
|
8076
|
+
if (config.basepath) {
|
|
8077
|
+
return config.basepath;
|
|
8078
|
+
}
|
|
8079
|
+
const tsHost = getThoughtSpotHost(config);
|
|
8080
|
+
// This is to handle when e2e's. Search is run on pods for
|
|
8081
|
+
// comp-blink-test-pipeline with baseUrl=https://localhost:8443.
|
|
8082
|
+
// This is to handle when the developer is developing in their local
|
|
8083
|
+
// environment.
|
|
8084
|
+
if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
|
|
8085
|
+
return '';
|
|
8086
|
+
}
|
|
8087
|
+
return 'v2';
|
|
8088
|
+
};
|
|
8089
|
+
/**
|
|
8090
|
+
* It is a good idea to keep URLs under 2000 chars.
|
|
8091
|
+
* If this is ever breached, since we pass view configuration through
|
|
8092
|
+
* URL params, we would like to log a warning.
|
|
8093
|
+
* Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
|
8094
|
+
*/
|
|
8095
|
+
const URL_MAX_LENGTH = 2000;
|
|
8096
|
+
/**
|
|
8097
|
+
* The default CSS dimensions of the embedded app
|
|
8098
|
+
*/
|
|
8099
|
+
const DEFAULT_EMBED_WIDTH = '100%';
|
|
8100
|
+
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
8101
|
+
const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
|
|
8102
|
+
|
|
7448
8103
|
/** Used for built-in method references. */
|
|
7449
8104
|
var objectProto$d = Object.prototype;
|
|
7450
8105
|
|
|
@@ -8351,6 +9006,7 @@ var UIPassthroughEvent;
|
|
|
8351
9006
|
UIPassthroughEvent["GetParameters"] = "getParameters";
|
|
8352
9007
|
UIPassthroughEvent["GetTML"] = "getTML";
|
|
8353
9008
|
UIPassthroughEvent["GetTabs"] = "getTabs";
|
|
9009
|
+
UIPassthroughEvent["GetGroups"] = "getGroups";
|
|
8354
9010
|
UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
8355
9011
|
})(UIPassthroughEvent || (UIPassthroughEvent = {}));
|
|
8356
9012
|
|
|
@@ -9286,7 +9942,7 @@ class AnswerService {
|
|
|
9286
9942
|
async getTML() {
|
|
9287
9943
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9288
9944
|
const edoc = object[0].edoc;
|
|
9289
|
-
const YAML = await import('./index-
|
|
9945
|
+
const YAML = await import('./index-Bivg-mDx.js');
|
|
9290
9946
|
const parsedDoc = YAML.parse(edoc);
|
|
9291
9947
|
return {
|
|
9292
9948
|
answer: {
|
|
@@ -12172,71 +12828,6 @@ const getCustomActions = (customActions) => {
|
|
|
12172
12828
|
};
|
|
12173
12829
|
};
|
|
12174
12830
|
|
|
12175
|
-
/**
|
|
12176
|
-
* Copyright (c) 2023
|
|
12177
|
-
*
|
|
12178
|
-
* Utilities related to reading configuration objects
|
|
12179
|
-
* @summary Config-related utils
|
|
12180
|
-
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
12181
|
-
*/
|
|
12182
|
-
const urlRegex = new RegExp([
|
|
12183
|
-
'(^(https?:)//)?',
|
|
12184
|
-
'(([^:/?#]*)(?::([0-9]+))?)',
|
|
12185
|
-
'(/{0,1}[^?#]*)',
|
|
12186
|
-
'(\\?[^#]*|)',
|
|
12187
|
-
'(#.*|)$', // hash
|
|
12188
|
-
].join(''));
|
|
12189
|
-
/**
|
|
12190
|
-
* Parse and construct the ThoughtSpot hostname or IP address
|
|
12191
|
-
* from the embed configuration object.
|
|
12192
|
-
* @param config
|
|
12193
|
-
*/
|
|
12194
|
-
const getThoughtSpotHost = (config) => {
|
|
12195
|
-
if (!config.thoughtSpotHost) {
|
|
12196
|
-
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
12197
|
-
}
|
|
12198
|
-
const urlParts = config.thoughtSpotHost.match(urlRegex);
|
|
12199
|
-
if (!urlParts) {
|
|
12200
|
-
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
12201
|
-
}
|
|
12202
|
-
const protocol = urlParts[2] || window.location.protocol;
|
|
12203
|
-
const host = urlParts[3];
|
|
12204
|
-
let path = urlParts[6];
|
|
12205
|
-
// Lose the trailing / if any
|
|
12206
|
-
if (path.charAt(path.length - 1) === '/') {
|
|
12207
|
-
path = path.substring(0, path.length - 1);
|
|
12208
|
-
}
|
|
12209
|
-
// const urlParams = urlParts[7];
|
|
12210
|
-
// const hash = urlParts[8];
|
|
12211
|
-
return `${protocol}//${host}${path}`;
|
|
12212
|
-
};
|
|
12213
|
-
const getV2BasePath = (config) => {
|
|
12214
|
-
if (config.basepath) {
|
|
12215
|
-
return config.basepath;
|
|
12216
|
-
}
|
|
12217
|
-
const tsHost = getThoughtSpotHost(config);
|
|
12218
|
-
// This is to handle when e2e's. Search is run on pods for
|
|
12219
|
-
// comp-blink-test-pipeline with baseUrl=https://localhost:8443.
|
|
12220
|
-
// This is to handle when the developer is developing in their local
|
|
12221
|
-
// environment.
|
|
12222
|
-
if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
|
|
12223
|
-
return '';
|
|
12224
|
-
}
|
|
12225
|
-
return 'v2';
|
|
12226
|
-
};
|
|
12227
|
-
/**
|
|
12228
|
-
* It is a good idea to keep URLs under 2000 chars.
|
|
12229
|
-
* If this is ever breached, since we pass view configuration through
|
|
12230
|
-
* URL params, we would like to log a warning.
|
|
12231
|
-
* Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
|
12232
|
-
*/
|
|
12233
|
-
const URL_MAX_LENGTH = 2000;
|
|
12234
|
-
/**
|
|
12235
|
-
* The default CSS dimensions of the embedded app
|
|
12236
|
-
*/
|
|
12237
|
-
const DEFAULT_EMBED_WIDTH = '100%';
|
|
12238
|
-
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12239
|
-
|
|
12240
12831
|
var Config = {
|
|
12241
12832
|
DEBUG: false,
|
|
12242
12833
|
LIB_VERSION: '2.47.0'
|
|
@@ -18393,6 +18984,10 @@ const MIXPANEL_EVENT = {
|
|
|
18393
18984
|
VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
|
|
18394
18985
|
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
|
|
18395
18986
|
VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
|
|
18987
|
+
VISUAL_SDK_RENDER_CALLED: 'visual-sdk-render-called',
|
|
18988
|
+
VISUAL_SDK_PRE_RENDER: 'visual-sdk-pre-render',
|
|
18989
|
+
VISUAL_SDK_SHOW_PRE_RENDER: 'visual-sdk-show-pre-render',
|
|
18990
|
+
VISUAL_SDK_HIDE_PRE_RENDER: 'visual-sdk-hide-pre-render',
|
|
18396
18991
|
};
|
|
18397
18992
|
let isMixpanelInitialized = false;
|
|
18398
18993
|
let eventQueue = [];
|
|
@@ -19794,7 +20389,7 @@ const getIsInitCalled = () => { var _a; return !!((_a = getValueFromWindow(initF
|
|
|
19794
20389
|
/**
|
|
19795
20390
|
* Initializes the Visual Embed SDK globally and perform
|
|
19796
20391
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
19797
|
-
* component like Liveboard etc can be embedded. But need not wait for
|
|
20392
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
19798
20393
|
* to actually embed. That is handled internally.
|
|
19799
20394
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
19800
20395
|
* authentication mechanism and so on.
|
|
@@ -20371,6 +20966,7 @@ const PASSTHROUGH_MAP = {
|
|
|
20371
20966
|
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters,
|
|
20372
20967
|
[HostEvent.GetTML]: UIPassthroughEvent.GetTML,
|
|
20373
20968
|
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs,
|
|
20969
|
+
[HostEvent.GetGroups]: UIPassthroughEvent.GetGroups,
|
|
20374
20970
|
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard,
|
|
20375
20971
|
};
|
|
20376
20972
|
class HostEventClient {
|
|
@@ -20773,7 +21369,7 @@ class TsEmbed {
|
|
|
20773
21369
|
*/
|
|
20774
21370
|
this.shouldEncodeUrlQueryParams = false;
|
|
20775
21371
|
this.defaultHiddenActions = [Action.ReportError];
|
|
20776
|
-
this.preRenderContainerEl =
|
|
21372
|
+
this.preRenderContainerEl = document.body;
|
|
20777
21373
|
this.containerScrollListener = null;
|
|
20778
21374
|
/**
|
|
20779
21375
|
* Handler for fullscreen change events
|
|
@@ -21461,11 +22057,27 @@ class TsEmbed {
|
|
|
21461
22057
|
iFrame.name = 'ThoughtSpot Embedded Analytics';
|
|
21462
22058
|
return iFrame;
|
|
21463
22059
|
}
|
|
22060
|
+
/**
|
|
22061
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
22062
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
22063
|
+
* backward compatibility.
|
|
22064
|
+
*/
|
|
22065
|
+
getPreRenderConfig() {
|
|
22066
|
+
var _a, _b, _c, _d;
|
|
22067
|
+
const viewCfg = this.viewConfig;
|
|
22068
|
+
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22069
|
+
return {
|
|
22070
|
+
...preRenderCfg,
|
|
22071
|
+
preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22072
|
+
preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22073
|
+
doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22074
|
+
};
|
|
22075
|
+
}
|
|
21464
22076
|
/**
|
|
21465
22077
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
21466
22078
|
*/
|
|
21467
22079
|
isPreRenderEmbed() {
|
|
21468
|
-
return !!this.
|
|
22080
|
+
return !!this.getPreRenderConfig().preRenderId;
|
|
21469
22081
|
}
|
|
21470
22082
|
handleInsertionIntoDOM(child) {
|
|
21471
22083
|
if (this.isPreRenderEmbed()) {
|
|
@@ -21601,6 +22213,7 @@ class TsEmbed {
|
|
|
21601
22213
|
this.setIframeElement(this.preRenderChild);
|
|
21602
22214
|
}
|
|
21603
22215
|
this.isRendered = true;
|
|
22216
|
+
this.inheritPreRenderContainer();
|
|
21604
22217
|
}
|
|
21605
22218
|
return this.isPreRenderConnected();
|
|
21606
22219
|
}
|
|
@@ -21651,7 +22264,7 @@ class TsEmbed {
|
|
|
21651
22264
|
*/
|
|
21652
22265
|
resolvePreRenderContainerTarget() {
|
|
21653
22266
|
var _a;
|
|
21654
|
-
const containerConfig = this.
|
|
22267
|
+
const containerConfig = this.getPreRenderConfig().preRenderContainer;
|
|
21655
22268
|
let container = null;
|
|
21656
22269
|
if (typeof containerConfig === 'string') {
|
|
21657
22270
|
try {
|
|
@@ -21669,15 +22282,35 @@ class TsEmbed {
|
|
|
21669
22282
|
}
|
|
21670
22283
|
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
21671
22284
|
}
|
|
22285
|
+
inheritPreRenderContainer() {
|
|
22286
|
+
var _a;
|
|
22287
|
+
const preRenderedObject = this.getPreRenderObj();
|
|
22288
|
+
if (!preRenderedObject || preRenderedObject === this) {
|
|
22289
|
+
return;
|
|
22290
|
+
}
|
|
22291
|
+
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22292
|
+
if (this.getPreRenderConfig().preRenderContainer
|
|
22293
|
+
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22294
|
+
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22295
|
+
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
22296
|
+
}
|
|
22297
|
+
this.preRenderContainerEl = ownerContainer;
|
|
22298
|
+
this.applyPreRenderContainerPositioning();
|
|
22299
|
+
}
|
|
22300
|
+
getCustomPreRenderContainer() {
|
|
22301
|
+
const container = this.preRenderContainerEl;
|
|
22302
|
+
return container && container !== document.body ? container : null;
|
|
22303
|
+
}
|
|
21672
22304
|
/**
|
|
21673
|
-
* Makes the container a positioning context for the absolutely
|
|
21674
|
-
* wrapper, stashing the original inline `position` on the element
|
|
21675
|
-
* destroy() can restore it exactly, leaving no trace. Recording it
|
|
21676
|
-
* element rather than per-instance lets the override be reverted even
|
|
21677
|
-
* embeds share the same container.
|
|
22305
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
22306
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
22307
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
22308
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
22309
|
+
* when embeds share the same container.
|
|
21678
22310
|
*/
|
|
21679
|
-
applyPreRenderContainerPositioning(
|
|
21680
|
-
|
|
22311
|
+
applyPreRenderContainerPositioning() {
|
|
22312
|
+
const container = this.getCustomPreRenderContainer();
|
|
22313
|
+
if (!container) {
|
|
21681
22314
|
return;
|
|
21682
22315
|
}
|
|
21683
22316
|
const pos = window.getComputedStyle(container).position;
|
|
@@ -21720,11 +22353,11 @@ class TsEmbed {
|
|
|
21720
22353
|
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
21721
22354
|
}
|
|
21722
22355
|
}
|
|
21723
|
-
this.
|
|
22356
|
+
this.preRenderContainerEl = resolved;
|
|
22357
|
+
this.applyPreRenderContainerPositioning();
|
|
21724
22358
|
if (wrapper.parentNode !== resolved) {
|
|
21725
22359
|
resolved.appendChild(wrapper);
|
|
21726
22360
|
}
|
|
21727
|
-
this.preRenderContainerEl = resolved;
|
|
21728
22361
|
}
|
|
21729
22362
|
insertIntoDOMForPreRender(child) {
|
|
21730
22363
|
const preRenderChild = this.createPreRenderChild(child);
|
|
@@ -21747,7 +22380,7 @@ class TsEmbed {
|
|
|
21747
22380
|
}
|
|
21748
22381
|
const targetContainer = this.resolvePreRenderContainerTarget();
|
|
21749
22382
|
this.preRenderContainerEl = targetContainer;
|
|
21750
|
-
this.applyPreRenderContainerPositioning(
|
|
22383
|
+
this.applyPreRenderContainerPositioning();
|
|
21751
22384
|
targetContainer.appendChild(preRenderWrapper);
|
|
21752
22385
|
}
|
|
21753
22386
|
insertIntoDOM(child) {
|
|
@@ -22075,6 +22708,9 @@ class TsEmbed {
|
|
|
22075
22708
|
* @param args
|
|
22076
22709
|
*/
|
|
22077
22710
|
async render() {
|
|
22711
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_CALLED, {
|
|
22712
|
+
embedComponentType: this.viewConfig.embedComponentType,
|
|
22713
|
+
});
|
|
22078
22714
|
if (!getIsInitCalled()) {
|
|
22079
22715
|
logger$3.error(ERROR_MESSAGE.RENDER_CALLED_BEFORE_INIT);
|
|
22080
22716
|
}
|
|
@@ -22146,7 +22782,11 @@ class TsEmbed {
|
|
|
22146
22782
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
22147
22783
|
*/
|
|
22148
22784
|
async preRender(showPreRenderByDefault = false, replaceExistingPreRender = false) {
|
|
22149
|
-
|
|
22785
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_PRE_RENDER, {
|
|
22786
|
+
showPreRenderByDefault,
|
|
22787
|
+
replaceExistingPreRender,
|
|
22788
|
+
});
|
|
22789
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22150
22790
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22151
22791
|
return this;
|
|
22152
22792
|
}
|
|
@@ -22202,7 +22842,7 @@ class TsEmbed {
|
|
|
22202
22842
|
}
|
|
22203
22843
|
// Drop our reference up front so a destroyed embed never pins a
|
|
22204
22844
|
// detached container in memory; restoration uses the local handle.
|
|
22205
|
-
this.preRenderContainerEl =
|
|
22845
|
+
this.preRenderContainerEl = document.body;
|
|
22206
22846
|
const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
22207
22847
|
if (originalPosition === undefined) {
|
|
22208
22848
|
// We never overrode this container's position; nothing to restore.
|
|
@@ -22225,9 +22865,7 @@ class TsEmbed {
|
|
|
22225
22865
|
if (!this.containerScrollListener) {
|
|
22226
22866
|
return;
|
|
22227
22867
|
}
|
|
22228
|
-
const customContainer = this.
|
|
22229
|
-
? this.preRenderContainerEl
|
|
22230
|
-
: null;
|
|
22868
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22231
22869
|
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
22232
22870
|
this.containerScrollListener = null;
|
|
22233
22871
|
}
|
|
@@ -22323,9 +22961,13 @@ class TsEmbed {
|
|
|
22323
22961
|
*/
|
|
22324
22962
|
async showPreRender() {
|
|
22325
22963
|
var _a, _b;
|
|
22964
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22965
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22966
|
+
embedComponentType: this.viewConfig.embedComponentType,
|
|
22967
|
+
});
|
|
22326
22968
|
if (this.shouldWaitForRenderPromise)
|
|
22327
22969
|
await this.isReadyForRenderPromise;
|
|
22328
|
-
if (!this.
|
|
22970
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22329
22971
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22330
22972
|
return this;
|
|
22331
22973
|
}
|
|
@@ -22356,14 +22998,12 @@ class TsEmbed {
|
|
|
22356
22998
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
22357
22999
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
22358
23000
|
this.syncPreRenderStyle();
|
|
22359
|
-
const customContainer = this.
|
|
22360
|
-
? this.preRenderContainerEl
|
|
22361
|
-
: null;
|
|
23001
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22362
23002
|
if (customContainer && !this.containerScrollListener) {
|
|
22363
23003
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22364
23004
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22365
23005
|
}
|
|
22366
|
-
if (!this.
|
|
23006
|
+
if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
|
|
22367
23007
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22368
23008
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22369
23009
|
entries.forEach((entry) => {
|
|
@@ -22405,13 +23045,15 @@ class TsEmbed {
|
|
|
22405
23045
|
logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
22406
23046
|
return;
|
|
22407
23047
|
}
|
|
23048
|
+
if (!this.getPreRenderPlaceHolderElement().isConnected) {
|
|
23049
|
+
logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
|
|
23050
|
+
return;
|
|
23051
|
+
}
|
|
22408
23052
|
// Self-heal if the resolved container was remounted/detached, so we
|
|
22409
23053
|
// never measure a stale node (which would collapse the wrapper).
|
|
22410
23054
|
this.reconcilePreRenderContainer();
|
|
22411
23055
|
const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
|
|
22412
|
-
const containerEl = this.
|
|
22413
|
-
? this.preRenderContainerEl
|
|
22414
|
-
: null;
|
|
23056
|
+
const containerEl = this.getCustomPreRenderContainer();
|
|
22415
23057
|
const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
|
|
22416
23058
|
const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
|
|
22417
23059
|
const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
|
|
@@ -22428,16 +23070,21 @@ class TsEmbed {
|
|
|
22428
23070
|
* If the component is not preRendered, it issues a warning.
|
|
22429
23071
|
*/
|
|
22430
23072
|
hidePreRender() {
|
|
23073
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
23074
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
23075
|
+
embedComponentType: this.viewConfig.embedComponentType,
|
|
23076
|
+
});
|
|
22431
23077
|
logger$3.debug('HidePreRender Called');
|
|
22432
23078
|
if (!this.isPreRenderConnected()) {
|
|
22433
23079
|
// if the embed component is not preRendered , nothing to hide
|
|
22434
23080
|
logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
|
|
22435
23081
|
return;
|
|
22436
23082
|
}
|
|
23083
|
+
const { zIndex } = this.getPreRenderConfig();
|
|
22437
23084
|
const preRenderHideStyles = {
|
|
22438
23085
|
opacity: '0',
|
|
22439
23086
|
pointerEvents: 'none',
|
|
22440
|
-
zIndex: '-1000',
|
|
23087
|
+
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
22441
23088
|
position: 'absolute',
|
|
22442
23089
|
top: '0',
|
|
22443
23090
|
left: '0',
|
|
@@ -22462,10 +23109,11 @@ class TsEmbed {
|
|
|
22462
23109
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
22463
23110
|
*/
|
|
22464
23111
|
getPreRenderIds() {
|
|
23112
|
+
const preRenderId = this.getPreRenderConfig().preRenderId;
|
|
22465
23113
|
return {
|
|
22466
|
-
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${
|
|
22467
|
-
child: `tsEmbed-pre-render-child-${
|
|
22468
|
-
placeHolder: `tsEmbed-pre-render-placeholder-${
|
|
23114
|
+
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23115
|
+
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
23116
|
+
placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
|
|
22469
23117
|
};
|
|
22470
23118
|
}
|
|
22471
23119
|
/**
|
|
@@ -22635,6 +23283,31 @@ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleEr
|
|
|
22635
23283
|
...(visualOverrides !== undefined ? { visualOverridesParams: visualOverrides } : {}),
|
|
22636
23284
|
},
|
|
22637
23285
|
};
|
|
23286
|
+
}
|
|
23287
|
+
function buildSpotterShareConversationAppInitData(initData, viewConfig) {
|
|
23288
|
+
const { spotterShareConversationConfig } = viewConfig;
|
|
23289
|
+
if (!spotterShareConversationConfig)
|
|
23290
|
+
return initData;
|
|
23291
|
+
return {
|
|
23292
|
+
...initData,
|
|
23293
|
+
embedParams: {
|
|
23294
|
+
...(initData.embedParams || {}),
|
|
23295
|
+
spotterShareConversationConfig,
|
|
23296
|
+
},
|
|
23297
|
+
};
|
|
23298
|
+
}
|
|
23299
|
+
function buildStarterPromptsAppInitData(initData, viewConfig) {
|
|
23300
|
+
var _a;
|
|
23301
|
+
const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
|
|
23302
|
+
if (!starterPrompts)
|
|
23303
|
+
return initData;
|
|
23304
|
+
return {
|
|
23305
|
+
...initData,
|
|
23306
|
+
embedParams: {
|
|
23307
|
+
...(initData.embedParams || {}),
|
|
23308
|
+
starterPrompts,
|
|
23309
|
+
},
|
|
23310
|
+
};
|
|
22638
23311
|
}
|
|
22639
23312
|
|
|
22640
23313
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
@@ -22700,6 +23373,10 @@ var Page;
|
|
|
22700
23373
|
* Collections listing page
|
|
22701
23374
|
*/
|
|
22702
23375
|
Page["Collections"] = "collections";
|
|
23376
|
+
/**
|
|
23377
|
+
* Liveboard schedules listing page
|
|
23378
|
+
*/
|
|
23379
|
+
Page["LiveboardSchedules"] = "liveboard-schedules";
|
|
22703
23380
|
})(Page || (Page = {}));
|
|
22704
23381
|
/**
|
|
22705
23382
|
* Define the initial state of column custom group accordions
|
|
@@ -22748,6 +23425,9 @@ var HomePage;
|
|
|
22748
23425
|
/**
|
|
22749
23426
|
* Modular (v2) introduces the updated Modular Home Experience.
|
|
22750
23427
|
* It serves as the foundational version of the home page.
|
|
23428
|
+
* Use {@link HomePage.ModularWithStylingChanges} (V3) or
|
|
23429
|
+
* {@link HomePage.Focused} (V4) instead.
|
|
23430
|
+
* @deprecated V1 and V2 home page experiences are deprecated.
|
|
22751
23431
|
*/
|
|
22752
23432
|
HomePage["Modular"] = "v2";
|
|
22753
23433
|
/**
|
|
@@ -22842,6 +23522,15 @@ class AppEmbed extends V1Embed {
|
|
|
22842
23522
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
22843
23523
|
};
|
|
22844
23524
|
if (this.viewConfig.fullHeight === true) {
|
|
23525
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
23526
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
23527
|
+
}
|
|
23528
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
23529
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
23530
|
+
}
|
|
23531
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
23532
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
23533
|
+
}
|
|
22845
23534
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
22846
23535
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
22847
23536
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -22863,14 +23552,20 @@ class AppEmbed extends V1Embed {
|
|
|
22863
23552
|
async getAppInitData() {
|
|
22864
23553
|
const defaultAppInitData = await super.getAppInitData();
|
|
22865
23554
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
22866
|
-
|
|
23555
|
+
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
23556
|
+
const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
23557
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
22867
23558
|
}
|
|
22868
23559
|
/**
|
|
22869
23560
|
* Constructs a map of parameters to be passed on to the
|
|
22870
23561
|
* embedded Liveboard or visualization.
|
|
22871
23562
|
*/
|
|
22872
23563
|
getEmbedParams() {
|
|
22873
|
-
const
|
|
23564
|
+
const params = this.getEmbedParamsObject();
|
|
23565
|
+
return getQueryParamString(params, true);
|
|
23566
|
+
}
|
|
23567
|
+
getEmbedParamsObject() {
|
|
23568
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, fullHeight, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
22874
23569
|
let params = {};
|
|
22875
23570
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
22876
23571
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -22880,34 +23575,51 @@ class AppEmbed extends V1Embed {
|
|
|
22880
23575
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
22881
23576
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
22882
23577
|
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
22883
|
-
|
|
23578
|
+
if (!isUndefined$1(isLiveboardMasterpiecesEnabled)) {
|
|
23579
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
23580
|
+
}
|
|
22884
23581
|
if (newChartsLibrary !== undefined) {
|
|
22885
23582
|
params[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
22886
23583
|
}
|
|
22887
23584
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
22888
23585
|
params[Param.IsFullAppEmbed] = true;
|
|
22889
|
-
|
|
22890
|
-
|
|
23586
|
+
if (!isUndefined$1(isLiveboardCompactHeaderEnabled)) {
|
|
23587
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
23588
|
+
}
|
|
23589
|
+
if (!isUndefined$1(isEnhancedFilterInteractivityEnabled)) {
|
|
23590
|
+
params[Param.IsEnhancedFilterInteractivityEnabled] =
|
|
23591
|
+
isEnhancedFilterInteractivityEnabled;
|
|
23592
|
+
}
|
|
22891
23593
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
22892
23594
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
22893
|
-
|
|
23595
|
+
if (!isUndefined$1(hideIrrelevantChipsInLiveboardTabs)) {
|
|
23596
|
+
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
23597
|
+
}
|
|
22894
23598
|
if (isUnifiedSearchExperienceEnabled !== undefined) {
|
|
22895
23599
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
22896
23600
|
}
|
|
22897
|
-
|
|
23601
|
+
if (!isUndefined$1(coverAndFilterOptionInPDF)) {
|
|
23602
|
+
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
23603
|
+
}
|
|
22898
23604
|
params = this.getBaseQueryParams(params);
|
|
22899
23605
|
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
22900
23606
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
22901
23607
|
}
|
|
23608
|
+
if (!isUndefined$1(showSpotterRadiance)) {
|
|
23609
|
+
params[Param.ShowSpotterRadiance] = !!showSpotterRadiance;
|
|
23610
|
+
}
|
|
22902
23611
|
if (!isUndefined$1(defaultQueryMode)) {
|
|
22903
23612
|
params[Param.DefaultQueryMode] = defaultQueryMode;
|
|
22904
23613
|
}
|
|
22905
23614
|
if (!isUndefined$1(enableStopAnswerGenerationEmbed)) {
|
|
22906
23615
|
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
22907
23616
|
}
|
|
23617
|
+
if (spotterDataSources && spotterDataSources.length) {
|
|
23618
|
+
params[Param.SpotterDataSources] = JSON.stringify(spotterDataSources);
|
|
23619
|
+
}
|
|
22908
23620
|
// Handle spotterChatConfig params
|
|
22909
23621
|
if (spotterChatConfig) {
|
|
22910
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
23622
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
22911
23623
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
22912
23624
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
22913
23625
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -22916,10 +23628,16 @@ class AppEmbed extends V1Embed {
|
|
|
22916
23628
|
if (enableStarterPrompts !== undefined) {
|
|
22917
23629
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
22918
23630
|
}
|
|
23631
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
23632
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
23633
|
+
}
|
|
22919
23634
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
22920
23635
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
22921
23636
|
}
|
|
22922
23637
|
}
|
|
23638
|
+
if (!isUndefined$1(updatedSpotterExperience)) {
|
|
23639
|
+
params[Param.UpdatedSpotterExperience] = !!updatedSpotterExperience;
|
|
23640
|
+
}
|
|
22923
23641
|
if (hideObjectSearch) {
|
|
22924
23642
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
22925
23643
|
}
|
|
@@ -22956,6 +23674,9 @@ class AppEmbed extends V1Embed {
|
|
|
22956
23674
|
if (enable2ColumnLayout !== undefined) {
|
|
22957
23675
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
22958
23676
|
}
|
|
23677
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
23678
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
23679
|
+
}
|
|
22959
23680
|
if (enableAskSage) {
|
|
22960
23681
|
params[Param.enableAskSage] = enableAskSage;
|
|
22961
23682
|
}
|
|
@@ -22968,6 +23689,9 @@ class AppEmbed extends V1Embed {
|
|
|
22968
23689
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
22969
23690
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
22970
23691
|
}
|
|
23692
|
+
if (liveboardGutter !== undefined) {
|
|
23693
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
23694
|
+
}
|
|
22971
23695
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
22972
23696
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
22973
23697
|
}
|
|
@@ -22986,6 +23710,9 @@ class AppEmbed extends V1Embed {
|
|
|
22986
23710
|
if (isCentralizedLiveboardFilterUXEnabled != undefined) {
|
|
22987
23711
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
22988
23712
|
}
|
|
23713
|
+
if (isScopedLiveboardFilteringEnabled !== undefined) {
|
|
23714
|
+
params[Param.isScopedLiveboardFilteringEnabled] = isScopedLiveboardFilteringEnabled;
|
|
23715
|
+
}
|
|
22989
23716
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
22990
23717
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
22991
23718
|
}
|
|
@@ -23001,7 +23728,6 @@ class AppEmbed extends V1Embed {
|
|
|
23001
23728
|
}
|
|
23002
23729
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
23003
23730
|
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
23004
|
-
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
23005
23731
|
params[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
|
|
23006
23732
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
23007
23733
|
if (dataPanelCustomGroupsAccordionInitialState
|
|
@@ -23016,33 +23742,15 @@ class AppEmbed extends V1Embed {
|
|
|
23016
23742
|
if (modularHomeExperience !== undefined) {
|
|
23017
23743
|
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
23018
23744
|
}
|
|
23019
|
-
//
|
|
23020
|
-
//
|
|
23021
|
-
//
|
|
23022
|
-
//
|
|
23023
|
-
//
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
params[Param.HomepageVersion] = 'v2';
|
|
23745
|
+
// Navigation V1/V2 and home page V1/V2 are deprecated. V3 is now the
|
|
23746
|
+
// default experience, Need to send navigationVersion=v3 and
|
|
23747
|
+
// homepageVersion=v3 even when the no discoveryExperience /
|
|
23748
|
+
// modularHomeExperience config is set. Without these
|
|
23749
|
+
// params, older TSA versions (< 26.7) fall back to V2 for nav and
|
|
23750
|
+
// home page, so the defaults must be sent explicitly from the SDK.
|
|
23751
|
+
params[Param.NavigationVersion] = PrimaryNavbarVersion.Sliding;
|
|
23752
|
+
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
23028
23753
|
if (discoveryExperience) {
|
|
23029
|
-
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
23030
|
-
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
23031
|
-
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
23032
|
-
// Enable the modularHomeExperience when Sliding is enabled.
|
|
23033
|
-
params[Param.ModularHomeExperienceEnabled] = true;
|
|
23034
|
-
}
|
|
23035
|
-
// homePage v2 will enable the modular home page
|
|
23036
|
-
// and it will override the modularHomeExperience value
|
|
23037
|
-
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
23038
|
-
params[Param.ModularHomeExperienceEnabled] = true;
|
|
23039
|
-
}
|
|
23040
|
-
// ModularWithStylingChanges (v3) introduces the styling changes
|
|
23041
|
-
// to the Modular Homepage.
|
|
23042
|
-
// v3 will be the base version of homePageVersion.
|
|
23043
|
-
if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
|
|
23044
|
-
params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
|
|
23045
|
-
}
|
|
23046
23754
|
// listPageVersion can be changed to v2 or v3
|
|
23047
23755
|
if (discoveryExperience.listPageVersion !== undefined) {
|
|
23048
23756
|
params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
|
|
@@ -23057,8 +23765,7 @@ class AppEmbed extends V1Embed {
|
|
|
23057
23765
|
}
|
|
23058
23766
|
}
|
|
23059
23767
|
}
|
|
23060
|
-
|
|
23061
|
-
return queryParams;
|
|
23768
|
+
return params;
|
|
23062
23769
|
}
|
|
23063
23770
|
/**
|
|
23064
23771
|
* Constructs the URL of the ThoughtSpot app page to be rendered.
|
|
@@ -23095,6 +23802,8 @@ class AppEmbed extends V1Embed {
|
|
|
23095
23802
|
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
23096
23803
|
case Page.Collections:
|
|
23097
23804
|
return 'collections';
|
|
23805
|
+
case Page.LiveboardSchedules:
|
|
23806
|
+
return 'home/liveboard-schedules';
|
|
23098
23807
|
case Page.Home:
|
|
23099
23808
|
default:
|
|
23100
23809
|
return 'home';
|
|
@@ -23380,6 +24089,15 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23380
24089
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
23381
24090
|
'Using full height with vizId might lead to unexpected behavior.');
|
|
23382
24091
|
}
|
|
24092
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
24093
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
24094
|
+
}
|
|
24095
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
24096
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
24097
|
+
}
|
|
24098
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
24099
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
24100
|
+
}
|
|
23383
24101
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23384
24102
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23385
24103
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23388,7 +24106,8 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23388
24106
|
}
|
|
23389
24107
|
async getAppInitData() {
|
|
23390
24108
|
const defaultAppInitData = await super.getAppInitData();
|
|
23391
|
-
|
|
24109
|
+
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
24110
|
+
return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
23392
24111
|
}
|
|
23393
24112
|
/**
|
|
23394
24113
|
* Construct a map of params to be passed on to the
|
|
@@ -23402,7 +24121,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23402
24121
|
getEmbedParamsObject() {
|
|
23403
24122
|
let params = {};
|
|
23404
24123
|
params = this.getBaseQueryParams(params);
|
|
23405
|
-
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled
|
|
24124
|
+
const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, isEnhancedFilterInteractivityEnabled, enableAskSage, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, liveboardGutter, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
23406
24125
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
23407
24126
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
23408
24127
|
if (fullHeight === true) {
|
|
@@ -23424,6 +24143,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23424
24143
|
if (!isUndefined$1(updatedSpotterChatPrompt)) {
|
|
23425
24144
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
23426
24145
|
}
|
|
24146
|
+
if (!isUndefined$1(showSpotterRadiance)) {
|
|
24147
|
+
params[Param.ShowSpotterRadiance] = !!showSpotterRadiance;
|
|
24148
|
+
}
|
|
23427
24149
|
if (!isUndefined$1(enableStopAnswerGenerationEmbed)) {
|
|
23428
24150
|
params[Param.EnableStopAnswerGenerationEmbed] = !!enableStopAnswerGenerationEmbed;
|
|
23429
24151
|
}
|
|
@@ -23440,6 +24162,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23440
24162
|
if (enable2ColumnLayout !== undefined) {
|
|
23441
24163
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23442
24164
|
}
|
|
24165
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
24166
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
24167
|
+
}
|
|
23443
24168
|
if (hideTabPanel) {
|
|
23444
24169
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
23445
24170
|
}
|
|
@@ -23467,6 +24192,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23467
24192
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23468
24193
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23469
24194
|
}
|
|
24195
|
+
if (liveboardGutter !== undefined) {
|
|
24196
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
24197
|
+
}
|
|
23470
24198
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23471
24199
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23472
24200
|
}
|
|
@@ -23479,9 +24207,12 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23479
24207
|
if (showSpotterLimitations !== undefined) {
|
|
23480
24208
|
params[Param.ShowSpotterLimitations] = showSpotterLimitations;
|
|
23481
24209
|
}
|
|
24210
|
+
if (!isUndefined$1(updatedSpotterExperience)) {
|
|
24211
|
+
params[Param.UpdatedSpotterExperience] = !!updatedSpotterExperience;
|
|
24212
|
+
}
|
|
23482
24213
|
// Handle spotterChatConfig params
|
|
23483
24214
|
if (spotterChatConfig) {
|
|
23484
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
24215
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23485
24216
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23486
24217
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23487
24218
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23490,6 +24221,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23490
24221
|
if (enableStarterPrompts !== undefined) {
|
|
23491
24222
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23492
24223
|
}
|
|
24224
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
24225
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
24226
|
+
}
|
|
23493
24227
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23494
24228
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23495
24229
|
}
|
|
@@ -23500,6 +24234,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23500
24234
|
if (isCentralizedLiveboardFilterUXEnabled !== undefined) {
|
|
23501
24235
|
params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
|
|
23502
24236
|
}
|
|
24237
|
+
if (isScopedLiveboardFilteringEnabled !== undefined) {
|
|
24238
|
+
params[Param.isScopedLiveboardFilteringEnabled] = isScopedLiveboardFilteringEnabled;
|
|
24239
|
+
}
|
|
23503
24240
|
if (isThisPeriodInDateFiltersEnabled !== undefined) {
|
|
23504
24241
|
params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
|
|
23505
24242
|
}
|
|
@@ -23513,16 +24250,27 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23513
24250
|
params[Param.EnableNewChartLibrary] = newChartsLibrary;
|
|
23514
24251
|
}
|
|
23515
24252
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
23516
|
-
|
|
24253
|
+
if (!isUndefined$1(isLiveboardCompactHeaderEnabled)) {
|
|
24254
|
+
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
|
|
24255
|
+
}
|
|
23517
24256
|
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
|
|
23518
24257
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
23519
|
-
|
|
24258
|
+
if (!isUndefined$1(hideIrrelevantChipsInLiveboardTabs)) {
|
|
24259
|
+
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
24260
|
+
}
|
|
23520
24261
|
params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
|
|
23521
|
-
|
|
23522
|
-
|
|
24262
|
+
if (!isUndefined$1(isLiveboardMasterpiecesEnabled)) {
|
|
24263
|
+
params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
|
|
24264
|
+
}
|
|
24265
|
+
if (!isUndefined$1(isEnhancedFilterInteractivityEnabled)) {
|
|
24266
|
+
params[Param.IsEnhancedFilterInteractivityEnabled] =
|
|
24267
|
+
isEnhancedFilterInteractivityEnabled;
|
|
24268
|
+
}
|
|
23523
24269
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
23524
24270
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
23525
|
-
|
|
24271
|
+
if (!isUndefined$1(coverAndFilterOptionInPDF)) {
|
|
24272
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
24273
|
+
}
|
|
23526
24274
|
getQueryParamString(params, true);
|
|
23527
24275
|
return params;
|
|
23528
24276
|
}
|
|
@@ -23721,7 +24469,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
23721
24469
|
if (this.isRendered) {
|
|
23722
24470
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
23723
24471
|
}
|
|
23724
|
-
else if (this.
|
|
24472
|
+
else if (this.getPreRenderConfig().preRenderId) {
|
|
23725
24473
|
this.preRender(true);
|
|
23726
24474
|
}
|
|
23727
24475
|
else {
|
|
@@ -24593,18 +25341,12 @@ class SpotterEmbed extends TsEmbed {
|
|
|
24593
25341
|
*/
|
|
24594
25342
|
async getAppInitData() {
|
|
24595
25343
|
const defaultAppInitData = await super.getAppInitData();
|
|
24596
|
-
|
|
25344
|
+
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
25345
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
25346
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
24597
25347
|
}
|
|
24598
25348
|
getEmbedParamsObject() {
|
|
24599
|
-
const {
|
|
24600
|
-
if (!worksheetId) {
|
|
24601
|
-
this.handleError({
|
|
24602
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
24603
|
-
message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
24604
|
-
code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
|
|
24605
|
-
error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
|
|
24606
|
-
});
|
|
24607
|
-
}
|
|
25349
|
+
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
|
|
24608
25350
|
const queryParams = this.getBaseQueryParams();
|
|
24609
25351
|
queryParams[Param.SpotterEnabled] = true;
|
|
24610
25352
|
// Boolean params
|
|
@@ -24614,8 +25356,10 @@ class SpotterEmbed extends TsEmbed {
|
|
|
24614
25356
|
setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
|
|
24615
25357
|
setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
|
|
24616
25358
|
setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
|
|
25359
|
+
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
24617
25360
|
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
24618
25361
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
25362
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
|
|
24619
25363
|
// Handle spotterChatConfig params
|
|
24620
25364
|
if (spotterChatConfig) {
|
|
24621
25365
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
@@ -24627,11 +25371,18 @@ class SpotterEmbed extends TsEmbed {
|
|
|
24627
25371
|
queryParams[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
24628
25372
|
}
|
|
24629
25373
|
}
|
|
25374
|
+
setParamIfDefined(queryParams, Param.UpdatedSpotterExperience, updatedSpotterExperience, true);
|
|
24630
25375
|
return queryParams;
|
|
24631
25376
|
}
|
|
24632
25377
|
getIframeSrc() {
|
|
24633
|
-
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
24634
|
-
|
|
25378
|
+
const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, sharedConversationId, dataSources, } = this.viewConfig;
|
|
25379
|
+
// Deep-link into the read-only shared-conversation reader view when a
|
|
25380
|
+
// shared conversation id is supplied (e.g. a recipient landing from a
|
|
25381
|
+
// host-configured CONVERSATION_URL share link); otherwise the normal
|
|
25382
|
+
// Spotter conversation surface.
|
|
25383
|
+
const path = sharedConversationId
|
|
25384
|
+
? `insights/conv-assist/s/${encodeURIComponent(sharedConversationId)}`
|
|
25385
|
+
: 'insights/conv-assist';
|
|
24635
25386
|
const queryParams = this.getEmbedParamsObject();
|
|
24636
25387
|
let query = '';
|
|
24637
25388
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
@@ -24647,8 +25398,12 @@ class SpotterEmbed extends TsEmbed {
|
|
|
24647
25398
|
query += `&${parameterQuery}`;
|
|
24648
25399
|
}
|
|
24649
25400
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
24650
|
-
|
|
24651
|
-
|
|
25401
|
+
...(!(Array.isArray(dataSources) && dataSources.length > 0) && worksheetId
|
|
25402
|
+
&& { worksheet: worksheetId }),
|
|
25403
|
+
...((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && { query: searchOptions.searchQuery }),
|
|
25404
|
+
...(Array.isArray(dataSources)
|
|
25405
|
+
&& dataSources.length > 0
|
|
25406
|
+
&& { dataSources: JSON.stringify(dataSources) }),
|
|
24652
25407
|
});
|
|
24653
25408
|
return `${this.getEmbedBasePath(query)}/embed/${path}${tsPostHashParams}`;
|
|
24654
25409
|
}
|
|
@@ -25354,4 +26109,4 @@ class AutoFrameRenderer extends TsEmbed {
|
|
|
25354
26109
|
}
|
|
25355
26110
|
}
|
|
25356
26111
|
|
|
25357
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
|
|
26112
|
+
export { Action, AnswerService, AppEmbed, ApplicabilityLevel, AuthEvent, AuthFailureType, AuthStatus, AuthType, BackgroundFormatType, BodylessConversation, ConditionalFormattingComparisonType, ConditionalFormattingOperator, ContextMenuTriggerOptions, ContextType, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataLabelFilterOperator, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedErrorCodes, EmbedEvent, ErrorDetailsTypes, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, InterceptedApiType, LegendPosition, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, SpotterQueryMode, TableContentDensity, TableTheme, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, reloadIframe, resetCachedAuthToken, startAutoMCPFrameRenderer, tokenizedFetch, uploadMixpanelEvent };
|