@thoughtspot/visual-embed-sdk 1.51.0 → 1.51.2
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 +27 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +43 -12
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +29 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +253 -1
- 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 +171 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +125 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +3 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +36 -0
- package/cjs/src/embed/host-events.spec.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.spec.js +18 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +40 -13
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +25 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +349 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.spec.js +28 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +15 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +68 -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 +97 -9
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +76 -35
- 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/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 +330 -18
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +182 -12
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +5 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +19 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +37 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-aBzH5ZwF.js → index-D8_Zs-Nr.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 +27 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +43 -12
- 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 +171 -1
- package/dist/src/embed/conversation.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 +40 -13
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -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 +97 -9
- 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/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 +330 -18
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +5 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +354 -64
- package/dist/tsembed-react.js +353 -63
- package/dist/tsembed.es.js +414 -126
- package/dist/tsembed.js +416 -128
- package/dist/visual-embed-sdk-react-full.d.ts +777 -90
- package/dist/visual-embed-sdk-react.d.ts +773 -89
- package/dist/visual-embed-sdk.d.ts +713 -60
- 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 +27 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +43 -12
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +30 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +253 -1
- 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 +171 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +125 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +3 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +36 -0
- package/lib/src/embed/host-events.spec.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.spec.js +18 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +40 -13
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +25 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +349 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.spec.js +28 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +13 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +69 -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 +97 -9
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +77 -36
- 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/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 +330 -18
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +182 -12
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +5 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +17 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +38 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +713 -60
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/css-variables.ts +32 -0
- package/src/embed/app.spec.ts +335 -1
- package/src/embed/app.ts +71 -13
- package/src/embed/base.ts +1 -1
- package/src/embed/conversation.spec.ts +136 -0
- package/src/embed/conversation.ts +181 -3
- package/src/embed/events.spec.ts +4 -0
- package/src/embed/host-events.spec.ts +48 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +34 -0
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +457 -2
- package/src/embed/liveboard.ts +74 -15
- package/src/embed/search.spec.ts +31 -0
- package/src/embed/spotter-utils.spec.ts +72 -0
- package/src/embed/spotter-utils.ts +21 -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 +91 -41
- package/src/index.ts +43 -2
- 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 +329 -16
- package/src/utils.spec.ts +49 -0
- package/src/utils.ts +16 -0
package/dist/tsembed.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.51.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.51.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
525
525
|
* @example
|
|
526
526
|
* ```js
|
|
527
|
-
* searchEmbed.on(EmbedEvent.
|
|
527
|
+
* searchEmbed.on(EmbedEvent.Drilldown, {
|
|
528
528
|
* points: {
|
|
529
529
|
* clickedPoint,
|
|
530
530
|
* selectedPoints: selectedPoint
|
|
@@ -585,7 +585,7 @@
|
|
|
585
585
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
586
586
|
* @example
|
|
587
587
|
* ```js
|
|
588
|
-
* appEmbed.on(EmbedEvent.
|
|
588
|
+
* appEmbed.on(EmbedEvent.CustomAction, payload => {
|
|
589
589
|
* const data = payload.data;
|
|
590
590
|
* if (data.id === 'insert Custom Action ID here') {
|
|
591
591
|
* console.log('Custom Action event:', data.embedAnswerData);
|
|
@@ -851,8 +851,8 @@
|
|
|
851
851
|
*
|
|
852
852
|
* **Note**: This event is deprecated in v1.21.0.
|
|
853
853
|
* To fire an event when a download action is initiated on a chart or table,
|
|
854
|
-
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.
|
|
855
|
-
* `EmbedEvent.
|
|
854
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
|
|
855
|
+
* `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
|
|
856
856
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
857
857
|
* @example
|
|
858
858
|
* ```js
|
|
@@ -902,10 +902,10 @@
|
|
|
902
902
|
* @example
|
|
903
903
|
* ```js
|
|
904
904
|
* //emit when action starts
|
|
905
|
-
* searchEmbed.on(EmbedEvent.
|
|
905
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
906
906
|
* console.log('download CSV', payload)}, {start: true })
|
|
907
907
|
* //emit when action ends
|
|
908
|
-
* searchEmbed.on(EmbedEvent.
|
|
908
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
909
909
|
* console.log('download CSV', payload)})
|
|
910
910
|
* ```
|
|
911
911
|
*/
|
|
@@ -2362,6 +2362,7 @@
|
|
|
2362
2362
|
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
2363
2363
|
* console.log("iFrameURL", url);
|
|
2364
2364
|
* ```
|
|
2365
|
+
* @returns iframeUrl - The URL currently loaded in the embedded iframe.
|
|
2365
2366
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
2366
2367
|
*/
|
|
2367
2368
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -2528,6 +2529,41 @@
|
|
|
2528
2529
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2529
2530
|
*/
|
|
2530
2531
|
HostEvent["OpenFilter"] = "openFilter";
|
|
2532
|
+
/**
|
|
2533
|
+
* Open the add-filter modal of a Liveboard, the same dialog that the
|
|
2534
|
+
* *Add filter* button in the Liveboard edit header opens, so the host
|
|
2535
|
+
* app can start the add-filter flow from its own UI.
|
|
2536
|
+
*
|
|
2537
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2538
|
+
* Hiding the *Add filter* button with `hiddenActions:
|
|
2539
|
+
* [Action.AddFilter]` does not block this event, but disabling it with
|
|
2540
|
+
* `disabledActions` does.
|
|
2541
|
+
*
|
|
2542
|
+
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2543
|
+
* existing filter, this event starts the creation of a new filter.
|
|
2544
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2545
|
+
* @example
|
|
2546
|
+
* ```js
|
|
2547
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
2548
|
+
* ```
|
|
2549
|
+
*/
|
|
2550
|
+
HostEvent["OpenAddFilterModal"] = "openAddFilterModal";
|
|
2551
|
+
/**
|
|
2552
|
+
* Open the add-parameter panel of a Liveboard, the same panel that the
|
|
2553
|
+
* *Add parameter* button in the Liveboard edit header opens.
|
|
2554
|
+
* Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
|
|
2555
|
+
*
|
|
2556
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2557
|
+
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2558
|
+
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2559
|
+
* with `disabledActions` does.
|
|
2560
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2561
|
+
* @example
|
|
2562
|
+
* ```js
|
|
2563
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
2564
|
+
* ```
|
|
2565
|
+
*/
|
|
2566
|
+
HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
|
|
2531
2567
|
/**
|
|
2532
2568
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
2533
2569
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
@@ -2609,6 +2645,10 @@
|
|
|
2609
2645
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
2610
2646
|
* data=>console.log(data))
|
|
2611
2647
|
* ```
|
|
2648
|
+
* @returns data - Object with a `v2Content` string: the export request
|
|
2649
|
+
* payload for the current Liveboard.
|
|
2650
|
+
* @returns type - The passthrough event name,
|
|
2651
|
+
* `getExportRequestForCurrentPinboard`.
|
|
2612
2652
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
2613
2653
|
*/
|
|
2614
2654
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
@@ -2711,6 +2751,9 @@
|
|
|
2711
2751
|
* }, ContextType.Spotter);
|
|
2712
2752
|
* ```
|
|
2713
2753
|
*
|
|
2754
|
+
* @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
|
|
2755
|
+
* @returns tabId - GUID of the tab within that Liveboard.
|
|
2756
|
+
* @returns vizId - GUID of the newly created visualization.
|
|
2714
2757
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2715
2758
|
*/
|
|
2716
2759
|
HostEvent["Pin"] = "pin";
|
|
@@ -2749,13 +2792,13 @@
|
|
|
2749
2792
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
2750
2793
|
* @example
|
|
2751
2794
|
* ```js
|
|
2752
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2795
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
2753
2796
|
* ```
|
|
2754
2797
|
* @example
|
|
2755
2798
|
* ```js
|
|
2756
2799
|
* // Manage schedules from liveboard context
|
|
2757
2800
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2758
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2801
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
|
|
2759
2802
|
* ```
|
|
2760
2803
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2761
2804
|
*/
|
|
@@ -3200,6 +3243,7 @@
|
|
|
3200
3243
|
* console.log(tml.answer);
|
|
3201
3244
|
* });
|
|
3202
3245
|
* ```
|
|
3246
|
+
* @returns The TML representation of the current Answer, as an object.
|
|
3203
3247
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3204
3248
|
* @important
|
|
3205
3249
|
*/
|
|
@@ -3644,6 +3688,8 @@
|
|
|
3644
3688
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3645
3689
|
* console.log('filters', data);
|
|
3646
3690
|
* ```
|
|
3691
|
+
* @returns liveboardFilters - Filters applied on the Liveboard.
|
|
3692
|
+
* @returns runtimeFilters - Runtime filters applied on the Liveboard.
|
|
3647
3693
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
3648
3694
|
*/
|
|
3649
3695
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -3793,6 +3839,9 @@
|
|
|
3793
3839
|
* console.log('tabs', tabDetails);
|
|
3794
3840
|
* });
|
|
3795
3841
|
* ```
|
|
3842
|
+
* @returns orderedTabIds - Tab GUIDs in the order they appear.
|
|
3843
|
+
* @returns numberOfTabs - Total number of tabs on the Liveboard.
|
|
3844
|
+
* @returns Tabs - Tab details, each with at least `id` and `name`.
|
|
3796
3845
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
3797
3846
|
*/
|
|
3798
3847
|
HostEvent["GetTabs"] = "getTabs";
|
|
@@ -3815,6 +3864,9 @@
|
|
|
3815
3864
|
* console.log('groups', groupDetails);
|
|
3816
3865
|
* });
|
|
3817
3866
|
* ```
|
|
3867
|
+
* @returns orderedGroupIds - Group GUIDs in the order they appear.
|
|
3868
|
+
* @returns numberOfGroups - Total number of groups on the Liveboard.
|
|
3869
|
+
* @returns Groups - Group details, each with at least `id` and `name`.
|
|
3818
3870
|
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
3819
3871
|
*/
|
|
3820
3872
|
HostEvent["GetGroups"] = "getGroups";
|
|
@@ -3889,6 +3941,9 @@
|
|
|
3889
3941
|
* // Alternative direct usage (not recommended)
|
|
3890
3942
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
3891
3943
|
* ```
|
|
3944
|
+
* @returns session - Session identifier for the Answer, for use with the
|
|
3945
|
+
* `AnswerService`.
|
|
3946
|
+
* @returns embedAnswerData - Data backing the Answer, when available.
|
|
3892
3947
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
3893
3948
|
*/
|
|
3894
3949
|
HostEvent["GetAnswerSession"] = "getAnswerSession";
|
|
@@ -4022,12 +4077,16 @@
|
|
|
4022
4077
|
* console.log('parameters', parameters);
|
|
4023
4078
|
* });
|
|
4024
4079
|
* ```
|
|
4080
|
+
* @returns parameters - Parameters currently applied on the Liveboard.
|
|
4025
4081
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4026
4082
|
*/
|
|
4027
4083
|
HostEvent["GetParameters"] = "GetParameters";
|
|
4028
4084
|
/**
|
|
4029
4085
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
4030
|
-
* This event is deprecated. Use {@link HostEvent.
|
|
4086
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4087
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4088
|
+
* called with an empty payload, and reports an error when a named view
|
|
4089
|
+
* cannot be found.
|
|
4031
4090
|
* ```js
|
|
4032
4091
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4033
4092
|
* ```
|
|
@@ -4045,10 +4104,15 @@
|
|
|
4045
4104
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
4046
4105
|
/**
|
|
4047
4106
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
4107
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4108
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4109
|
+
* called with an empty payload, and reports an error when a named view
|
|
4110
|
+
* cannot be found.
|
|
4048
4111
|
* ```js
|
|
4049
4112
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4050
4113
|
* ```
|
|
4051
4114
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4115
|
+
* @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
4052
4116
|
*/
|
|
4053
4117
|
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
4054
4118
|
/**
|
|
@@ -4151,6 +4215,10 @@
|
|
|
4151
4215
|
* description: "Generated from Spotter"
|
|
4152
4216
|
* }, ContextType.Spotter);
|
|
4153
4217
|
* ```
|
|
4218
|
+
* @returns answerId - GUID of the saved Answer.
|
|
4219
|
+
* @returns saveResponse - Raw response from the save operation.
|
|
4220
|
+
* @returns shareResponse - Raw response from the share operation, when the
|
|
4221
|
+
* Answer was also made discoverable.
|
|
4154
4222
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4155
4223
|
*/
|
|
4156
4224
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -4632,6 +4700,7 @@
|
|
|
4632
4700
|
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
4633
4701
|
Param["CurrencyFormat"] = "currencyFormat";
|
|
4634
4702
|
Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
|
|
4703
|
+
Param["IsLiveboardAlwaysOn12ColLayout"] = "isLiveboardAlwaysOn12ColLayout";
|
|
4635
4704
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
4636
4705
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
4637
4706
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
@@ -4655,6 +4724,7 @@
|
|
|
4655
4724
|
Param["PrimaryAction"] = "primaryAction";
|
|
4656
4725
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
4657
4726
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
4727
|
+
Param["LiveboardGutter"] = "liveboardGutter";
|
|
4658
4728
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
4659
4729
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
4660
4730
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
@@ -4690,14 +4760,17 @@
|
|
|
4690
4760
|
Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
|
|
4691
4761
|
Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
|
|
4692
4762
|
Param["SpotterDataSources"] = "spotterDataSources";
|
|
4763
|
+
Param["AnalystId"] = "analystId";
|
|
4764
|
+
Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
|
|
4693
4765
|
})(Param || (Param = {}));
|
|
4694
4766
|
/**
|
|
4695
4767
|
* ThoughtSpot application pages include actions and menu commands
|
|
4696
4768
|
* for various user-initiated operations. These actions are represented
|
|
4697
4769
|
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
4698
|
-
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4699
|
-
* - hiddenActions — the action is completely removed from
|
|
4700
|
-
* - visibleActions — allowlist, only these actions
|
|
4770
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4771
|
+
* (user can see but not click). - hiddenActions — the action is completely removed from
|
|
4772
|
+
* the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
|
|
4773
|
+
* are shown; all others are hidden.
|
|
4701
4774
|
*
|
|
4702
4775
|
* Use disabledActions to disable (gray out) an action.
|
|
4703
4776
|
* Use hiddenActions to hide (fully remove) an action.
|
|
@@ -4751,6 +4824,17 @@
|
|
|
4751
4824
|
* ```
|
|
4752
4825
|
*/
|
|
4753
4826
|
Action["SaveAsView"] = "saveAsView";
|
|
4827
|
+
/**
|
|
4828
|
+
* The **EditInputTable** action on a Liveboard
|
|
4829
|
+
* page. Allows users to edit an input table used in an Answer directly from
|
|
4830
|
+
* a Liveboard.
|
|
4831
|
+
* @example
|
|
4832
|
+
* ```js
|
|
4833
|
+
* disabledActions: [Action.EditInputTable]
|
|
4834
|
+
* ```
|
|
4835
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
4836
|
+
*/
|
|
4837
|
+
Action["EditInputTable"] = "editInputTable";
|
|
4754
4838
|
/**
|
|
4755
4839
|
* The **Make a copy** action on a Liveboard or Answer
|
|
4756
4840
|
* page. Creates a copy of the Liveboard.
|
|
@@ -6068,6 +6152,10 @@
|
|
|
6068
6152
|
* The **Add to Coaching** feature allows adding reference questions and
|
|
6069
6153
|
* business terms to improve Spotter’s responses. This feature is generally available
|
|
6070
6154
|
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
6155
|
+
*
|
|
6156
|
+
* This action governs both the answer-card **Add to memory** CTA and its
|
|
6157
|
+
* Spotter 3 successor, the response-footer **Remember this** CTA
|
|
6158
|
+
* (they are mutually exclusive).
|
|
6071
6159
|
* @example
|
|
6072
6160
|
* ```js
|
|
6073
6161
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -6448,6 +6536,56 @@
|
|
|
6448
6536
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6449
6537
|
*/
|
|
6450
6538
|
Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
|
|
6539
|
+
/**
|
|
6540
|
+
* The **Basic Search** starter prompt pill.
|
|
6541
|
+
*
|
|
6542
|
+
* Starter prompt pills are the row of category buttons shown above the
|
|
6543
|
+
* Spotter chat input before a conversation starts. They give a new user
|
|
6544
|
+
* ready-made questions to click instead of typing one from scratch, and
|
|
6545
|
+
* disappear once the conversation begins. There are three, one per action
|
|
6546
|
+
* below.
|
|
6547
|
+
*
|
|
6548
|
+
* Clicking this pill opens a card of suggested simple questions; picking one
|
|
6549
|
+
* submits it to Spotter right away. Visible by default, and hidden along
|
|
6550
|
+
* with the other pills when the surface itself is off (see
|
|
6551
|
+
* {@link SpotterChatViewConfig.starterPrompts}).
|
|
6552
|
+
* @example
|
|
6553
|
+
* ```js
|
|
6554
|
+
* hiddenActions: [Action.QuickSearchPill]
|
|
6555
|
+
* ```
|
|
6556
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6557
|
+
*/
|
|
6558
|
+
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6559
|
+
/**
|
|
6560
|
+
* The **Deep Analysis** starter prompt pill, next to
|
|
6561
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6562
|
+
*
|
|
6563
|
+
* Clicking it opens a card of suggested investigative questions ("why did
|
|
6564
|
+
* revenue drop?"). Picking one fills the chat input in Deep Analysis mode
|
|
6565
|
+
* rather than submitting immediately, so the user can edit it first.
|
|
6566
|
+
* Visible by default.
|
|
6567
|
+
* @example
|
|
6568
|
+
* ```js
|
|
6569
|
+
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6570
|
+
* ```
|
|
6571
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6572
|
+
*/
|
|
6573
|
+
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6574
|
+
/**
|
|
6575
|
+
* The **Data Literacy** starter prompt pill, next to
|
|
6576
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6577
|
+
*
|
|
6578
|
+
* Unlike the other two pills it opens no card: clicking it submits a prompt
|
|
6579
|
+
* that describes the data the model can answer over, helping a user who does
|
|
6580
|
+
* not yet know what is in the data source. The prompt text always comes from
|
|
6581
|
+
* ThoughtSpot, so only its label is customizable. Visible by default.
|
|
6582
|
+
* @example
|
|
6583
|
+
* ```js
|
|
6584
|
+
* hiddenActions: [Action.DataLiteracyPill]
|
|
6585
|
+
* ```
|
|
6586
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6587
|
+
*/
|
|
6588
|
+
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6451
6589
|
/**
|
|
6452
6590
|
* The **Include current period** checkbox for date filters.
|
|
6453
6591
|
* Controls the visibility and availability of the option to include
|
|
@@ -6596,6 +6734,38 @@
|
|
|
6596
6734
|
* ```
|
|
6597
6735
|
*/
|
|
6598
6736
|
Action["SpotterAnalystSidebar"] = "spotterAnalystSidebar";
|
|
6737
|
+
/**
|
|
6738
|
+
* Controls visibility and disable state of the analyst list
|
|
6739
|
+
* ("Show all") in the Spotter Analyst interface.
|
|
6740
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6741
|
+
* @example
|
|
6742
|
+
* ```js
|
|
6743
|
+
* hiddenActions: [Action.SpotterAnalystList]
|
|
6744
|
+
* disabledActions: [Action.SpotterAnalystList]
|
|
6745
|
+
* ```
|
|
6746
|
+
*/
|
|
6747
|
+
Action["SpotterAnalystList"] = "spotterAnalystList";
|
|
6748
|
+
/**
|
|
6749
|
+
* Controls visibility and disable state of the default Spotter analyst
|
|
6750
|
+
* entry in the Spotter Analyst interface.
|
|
6751
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6752
|
+
* @example
|
|
6753
|
+
* ```js
|
|
6754
|
+
* hiddenActions: [Action.SpotterDefaultAnalyst]
|
|
6755
|
+
* disabledActions: [Action.SpotterDefaultAnalyst]
|
|
6756
|
+
* ```
|
|
6757
|
+
*/
|
|
6758
|
+
Action["SpotterDefaultAnalyst"] = "spotterDefaultAnalyst";
|
|
6759
|
+
/**
|
|
6760
|
+
* The **Spotter** button in the Liveboard header.
|
|
6761
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6762
|
+
* @example
|
|
6763
|
+
* ```js
|
|
6764
|
+
* hiddenActions: [Action.SpotterOnLiveboard]
|
|
6765
|
+
* disabledActions: [Action.SpotterOnLiveboard]
|
|
6766
|
+
* ```
|
|
6767
|
+
*/
|
|
6768
|
+
Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
|
|
6599
6769
|
})(exports.Action || (exports.Action = {}));
|
|
6600
6770
|
exports.PrefetchFeatures = void 0;
|
|
6601
6771
|
(function (PrefetchFeatures) {
|
|
@@ -7063,7 +7233,7 @@
|
|
|
7063
7233
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7064
7234
|
})(exports.TableContentDensity || (exports.TableContentDensity = {}));
|
|
7065
7235
|
|
|
7066
|
-
var version$1="1.51.
|
|
7236
|
+
var version$1="1.51.2";var pkg = {version:version$1};
|
|
7067
7237
|
|
|
7068
7238
|
const { version } = pkg;
|
|
7069
7239
|
|
|
@@ -7311,6 +7481,23 @@
|
|
|
7311
7481
|
}
|
|
7312
7482
|
return JSON.stringify(value);
|
|
7313
7483
|
};
|
|
7484
|
+
/**
|
|
7485
|
+
* Inverse of serializeParam: JSON.parse with fallback to the raw string,
|
|
7486
|
+
* matching how the app parses the same values from the iframe URL.
|
|
7487
|
+
*/
|
|
7488
|
+
const deserializeParam = (value) => {
|
|
7489
|
+
if (typeof value !== 'string')
|
|
7490
|
+
return value;
|
|
7491
|
+
try {
|
|
7492
|
+
const parsed = JSON.parse(value);
|
|
7493
|
+
// Numeric strings stay strings ('123' !== 123), same as the app's
|
|
7494
|
+
// URL parser — param consumers expect string ids/versions.
|
|
7495
|
+
return typeof parsed === 'number' ? value : parsed;
|
|
7496
|
+
}
|
|
7497
|
+
catch (e) {
|
|
7498
|
+
return value;
|
|
7499
|
+
}
|
|
7500
|
+
};
|
|
7314
7501
|
/**
|
|
7315
7502
|
* Convert a value to a string:
|
|
7316
7503
|
* in case of an array, we convert it to CSV.
|
|
@@ -7870,6 +8057,72 @@
|
|
|
7870
8057
|
}
|
|
7871
8058
|
};
|
|
7872
8059
|
|
|
8060
|
+
/**
|
|
8061
|
+
* Copyright (c) 2023
|
|
8062
|
+
*
|
|
8063
|
+
* Utilities related to reading configuration objects
|
|
8064
|
+
* @summary Config-related utils
|
|
8065
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8066
|
+
*/
|
|
8067
|
+
const urlRegex = new RegExp([
|
|
8068
|
+
'(^(https?:)//)?',
|
|
8069
|
+
'(([^:/?#]*)(?::([0-9]+))?)',
|
|
8070
|
+
'(/{0,1}[^?#]*)',
|
|
8071
|
+
'(\\?[^#]*|)',
|
|
8072
|
+
'(#.*|)$', // hash
|
|
8073
|
+
].join(''));
|
|
8074
|
+
/**
|
|
8075
|
+
* Parse and construct the ThoughtSpot hostname or IP address
|
|
8076
|
+
* from the embed configuration object.
|
|
8077
|
+
* @param config
|
|
8078
|
+
*/
|
|
8079
|
+
const getThoughtSpotHost = (config) => {
|
|
8080
|
+
if (!config.thoughtSpotHost) {
|
|
8081
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8082
|
+
}
|
|
8083
|
+
const urlParts = config.thoughtSpotHost.match(urlRegex);
|
|
8084
|
+
if (!urlParts) {
|
|
8085
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8086
|
+
}
|
|
8087
|
+
const protocol = urlParts[2] || window.location.protocol;
|
|
8088
|
+
const host = urlParts[3];
|
|
8089
|
+
let path = urlParts[6];
|
|
8090
|
+
// Lose the trailing / if any
|
|
8091
|
+
if (path.charAt(path.length - 1) === '/') {
|
|
8092
|
+
path = path.substring(0, path.length - 1);
|
|
8093
|
+
}
|
|
8094
|
+
// const urlParams = urlParts[7];
|
|
8095
|
+
// const hash = urlParts[8];
|
|
8096
|
+
return `${protocol}//${host}${path}`;
|
|
8097
|
+
};
|
|
8098
|
+
const getV2BasePath = (config) => {
|
|
8099
|
+
if (config.basepath) {
|
|
8100
|
+
return config.basepath;
|
|
8101
|
+
}
|
|
8102
|
+
const tsHost = getThoughtSpotHost(config);
|
|
8103
|
+
// This is to handle when e2e's. Search is run on pods for
|
|
8104
|
+
// comp-blink-test-pipeline with baseUrl=https://localhost:8443.
|
|
8105
|
+
// This is to handle when the developer is developing in their local
|
|
8106
|
+
// environment.
|
|
8107
|
+
if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
|
|
8108
|
+
return '';
|
|
8109
|
+
}
|
|
8110
|
+
return 'v2';
|
|
8111
|
+
};
|
|
8112
|
+
/**
|
|
8113
|
+
* It is a good idea to keep URLs under 2000 chars.
|
|
8114
|
+
* If this is ever breached, since we pass view configuration through
|
|
8115
|
+
* URL params, we would like to log a warning.
|
|
8116
|
+
* Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
|
8117
|
+
*/
|
|
8118
|
+
const URL_MAX_LENGTH = 2000;
|
|
8119
|
+
/**
|
|
8120
|
+
* The default CSS dimensions of the embedded app
|
|
8121
|
+
*/
|
|
8122
|
+
const DEFAULT_EMBED_WIDTH = '100%';
|
|
8123
|
+
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
8124
|
+
const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
|
|
8125
|
+
|
|
7873
8126
|
/** Used for built-in method references. */
|
|
7874
8127
|
var objectProto$d = Object.prototype;
|
|
7875
8128
|
|
|
@@ -8753,12 +9006,12 @@
|
|
|
8753
9006
|
/**
|
|
8754
9007
|
* Levels at which a filter or parameter can be applied.
|
|
8755
9008
|
*/
|
|
8756
|
-
|
|
9009
|
+
exports.ApplicabilityLevel = void 0;
|
|
8757
9010
|
(function (ApplicabilityLevel) {
|
|
8758
9011
|
ApplicabilityLevel["Liveboard"] = "LIVEBOARD";
|
|
8759
9012
|
ApplicabilityLevel["Tab"] = "TAB";
|
|
8760
9013
|
ApplicabilityLevel["Group"] = "GROUP";
|
|
8761
|
-
})(ApplicabilityLevel || (ApplicabilityLevel = {}));
|
|
9014
|
+
})(exports.ApplicabilityLevel || (exports.ApplicabilityLevel = {}));
|
|
8762
9015
|
exports.UIPassthroughEvent = void 0;
|
|
8763
9016
|
(function (UIPassthroughEvent) {
|
|
8764
9017
|
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
@@ -12598,71 +12851,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
12598
12851
|
};
|
|
12599
12852
|
};
|
|
12600
12853
|
|
|
12601
|
-
/**
|
|
12602
|
-
* Copyright (c) 2023
|
|
12603
|
-
*
|
|
12604
|
-
* Utilities related to reading configuration objects
|
|
12605
|
-
* @summary Config-related utils
|
|
12606
|
-
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
12607
|
-
*/
|
|
12608
|
-
const urlRegex = new RegExp([
|
|
12609
|
-
'(^(https?:)//)?',
|
|
12610
|
-
'(([^:/?#]*)(?::([0-9]+))?)',
|
|
12611
|
-
'(/{0,1}[^?#]*)',
|
|
12612
|
-
'(\\?[^#]*|)',
|
|
12613
|
-
'(#.*|)$', // hash
|
|
12614
|
-
].join(''));
|
|
12615
|
-
/**
|
|
12616
|
-
* Parse and construct the ThoughtSpot hostname or IP address
|
|
12617
|
-
* from the embed configuration object.
|
|
12618
|
-
* @param config
|
|
12619
|
-
*/
|
|
12620
|
-
const getThoughtSpotHost = (config) => {
|
|
12621
|
-
if (!config.thoughtSpotHost) {
|
|
12622
|
-
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
12623
|
-
}
|
|
12624
|
-
const urlParts = config.thoughtSpotHost.match(urlRegex);
|
|
12625
|
-
if (!urlParts) {
|
|
12626
|
-
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
12627
|
-
}
|
|
12628
|
-
const protocol = urlParts[2] || window.location.protocol;
|
|
12629
|
-
const host = urlParts[3];
|
|
12630
|
-
let path = urlParts[6];
|
|
12631
|
-
// Lose the trailing / if any
|
|
12632
|
-
if (path.charAt(path.length - 1) === '/') {
|
|
12633
|
-
path = path.substring(0, path.length - 1);
|
|
12634
|
-
}
|
|
12635
|
-
// const urlParams = urlParts[7];
|
|
12636
|
-
// const hash = urlParts[8];
|
|
12637
|
-
return `${protocol}//${host}${path}`;
|
|
12638
|
-
};
|
|
12639
|
-
const getV2BasePath = (config) => {
|
|
12640
|
-
if (config.basepath) {
|
|
12641
|
-
return config.basepath;
|
|
12642
|
-
}
|
|
12643
|
-
const tsHost = getThoughtSpotHost(config);
|
|
12644
|
-
// This is to handle when e2e's. Search is run on pods for
|
|
12645
|
-
// comp-blink-test-pipeline with baseUrl=https://localhost:8443.
|
|
12646
|
-
// This is to handle when the developer is developing in their local
|
|
12647
|
-
// environment.
|
|
12648
|
-
if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
|
|
12649
|
-
return '';
|
|
12650
|
-
}
|
|
12651
|
-
return 'v2';
|
|
12652
|
-
};
|
|
12653
|
-
/**
|
|
12654
|
-
* It is a good idea to keep URLs under 2000 chars.
|
|
12655
|
-
* If this is ever breached, since we pass view configuration through
|
|
12656
|
-
* URL params, we would like to log a warning.
|
|
12657
|
-
* Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
|
12658
|
-
*/
|
|
12659
|
-
const URL_MAX_LENGTH = 2000;
|
|
12660
|
-
/**
|
|
12661
|
-
* The default CSS dimensions of the embedded app
|
|
12662
|
-
*/
|
|
12663
|
-
const DEFAULT_EMBED_WIDTH = '100%';
|
|
12664
|
-
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12665
|
-
|
|
12666
12854
|
var Config = {
|
|
12667
12855
|
DEBUG: false,
|
|
12668
12856
|
LIB_VERSION: '2.47.0'
|
|
@@ -20224,7 +20412,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20224
20412
|
/**
|
|
20225
20413
|
* Initializes the Visual Embed SDK globally and perform
|
|
20226
20414
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
20227
|
-
* component like Liveboard etc can be embedded. But need not wait for
|
|
20415
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
20228
20416
|
* to actually embed. That is handled internally.
|
|
20229
20417
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
20230
20418
|
* authentication mechanism and so on.
|
|
@@ -20720,8 +20908,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20720
20908
|
return true;
|
|
20721
20909
|
// targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
|
|
20722
20910
|
return isPlainObject_1(a)
|
|
20723
|
-
&& Object.values(ApplicabilityLevel).includes(a.level)
|
|
20724
|
-
&& (a.level === ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
|
|
20911
|
+
&& Object.values(exports.ApplicabilityLevel).includes(a.level)
|
|
20912
|
+
&& (a.level === exports.ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
|
|
20725
20913
|
};
|
|
20726
20914
|
function isValidUpdateFiltersPayload(payload) {
|
|
20727
20915
|
if (!payload)
|
|
@@ -21204,7 +21392,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21204
21392
|
*/
|
|
21205
21393
|
this.shouldEncodeUrlQueryParams = false;
|
|
21206
21394
|
this.defaultHiddenActions = [exports.Action.ReportError];
|
|
21207
|
-
this.preRenderContainerEl =
|
|
21395
|
+
this.preRenderContainerEl = document.body;
|
|
21208
21396
|
this.containerScrollListener = null;
|
|
21209
21397
|
/**
|
|
21210
21398
|
* Handler for fullscreen change events
|
|
@@ -21682,10 +21870,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21682
21870
|
return `${basePath}#`;
|
|
21683
21871
|
}
|
|
21684
21872
|
async getUpdateEmbedParamsObject() {
|
|
21685
|
-
|
|
21873
|
+
const queryParams = this.getEmbedParamsObject();
|
|
21874
|
+
// Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
|
|
21875
|
+
// them back so the event payload matches a URL load (SCAL-334713).
|
|
21876
|
+
Object.keys(queryParams).forEach((key) => {
|
|
21877
|
+
queryParams[key] = deserializeParam(queryParams[key]);
|
|
21878
|
+
});
|
|
21686
21879
|
const appInitData = await this.getAppInitData();
|
|
21687
|
-
|
|
21688
|
-
return queryParams;
|
|
21880
|
+
return { ...this.viewConfig, ...queryParams, ...appInitData };
|
|
21689
21881
|
}
|
|
21690
21882
|
/**
|
|
21691
21883
|
* Common query params set for all the embed modes.
|
|
@@ -21892,11 +22084,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21892
22084
|
iFrame.name = 'ThoughtSpot Embedded Analytics';
|
|
21893
22085
|
return iFrame;
|
|
21894
22086
|
}
|
|
22087
|
+
/**
|
|
22088
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
22089
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
22090
|
+
* backward compatibility.
|
|
22091
|
+
*/
|
|
22092
|
+
getPreRenderConfig() {
|
|
22093
|
+
var _a, _b, _c, _d;
|
|
22094
|
+
const viewCfg = this.viewConfig;
|
|
22095
|
+
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22096
|
+
return {
|
|
22097
|
+
...preRenderCfg,
|
|
22098
|
+
preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22099
|
+
preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22100
|
+
doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22101
|
+
};
|
|
22102
|
+
}
|
|
21895
22103
|
/**
|
|
21896
22104
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
21897
22105
|
*/
|
|
21898
22106
|
isPreRenderEmbed() {
|
|
21899
|
-
return !!this.
|
|
22107
|
+
return !!this.getPreRenderConfig().preRenderId;
|
|
21900
22108
|
}
|
|
21901
22109
|
handleInsertionIntoDOM(child) {
|
|
21902
22110
|
if (this.isPreRenderEmbed()) {
|
|
@@ -22032,6 +22240,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22032
22240
|
this.setIframeElement(this.preRenderChild);
|
|
22033
22241
|
}
|
|
22034
22242
|
this.isRendered = true;
|
|
22243
|
+
this.inheritPreRenderContainer();
|
|
22035
22244
|
}
|
|
22036
22245
|
return this.isPreRenderConnected();
|
|
22037
22246
|
}
|
|
@@ -22082,7 +22291,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22082
22291
|
*/
|
|
22083
22292
|
resolvePreRenderContainerTarget() {
|
|
22084
22293
|
var _a;
|
|
22085
|
-
const containerConfig = this.
|
|
22294
|
+
const containerConfig = this.getPreRenderConfig().preRenderContainer;
|
|
22086
22295
|
let container = null;
|
|
22087
22296
|
if (typeof containerConfig === 'string') {
|
|
22088
22297
|
try {
|
|
@@ -22100,15 +22309,35 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22100
22309
|
}
|
|
22101
22310
|
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
22102
22311
|
}
|
|
22312
|
+
inheritPreRenderContainer() {
|
|
22313
|
+
var _a;
|
|
22314
|
+
const preRenderedObject = this.getPreRenderObj();
|
|
22315
|
+
if (!preRenderedObject || preRenderedObject === this) {
|
|
22316
|
+
return;
|
|
22317
|
+
}
|
|
22318
|
+
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22319
|
+
if (this.getPreRenderConfig().preRenderContainer
|
|
22320
|
+
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22321
|
+
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22322
|
+
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
22323
|
+
}
|
|
22324
|
+
this.preRenderContainerEl = ownerContainer;
|
|
22325
|
+
this.applyPreRenderContainerPositioning();
|
|
22326
|
+
}
|
|
22327
|
+
getCustomPreRenderContainer() {
|
|
22328
|
+
const container = this.preRenderContainerEl;
|
|
22329
|
+
return container && container !== document.body ? container : null;
|
|
22330
|
+
}
|
|
22103
22331
|
/**
|
|
22104
|
-
* Makes the container a positioning context for the absolutely
|
|
22105
|
-
* wrapper, stashing the original inline `position` on the element
|
|
22106
|
-
* destroy() can restore it exactly, leaving no trace. Recording it
|
|
22107
|
-
* element rather than per-instance lets the override be reverted even
|
|
22108
|
-
* embeds share the same container.
|
|
22332
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
22333
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
22334
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
22335
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
22336
|
+
* when embeds share the same container.
|
|
22109
22337
|
*/
|
|
22110
|
-
applyPreRenderContainerPositioning(
|
|
22111
|
-
|
|
22338
|
+
applyPreRenderContainerPositioning() {
|
|
22339
|
+
const container = this.getCustomPreRenderContainer();
|
|
22340
|
+
if (!container) {
|
|
22112
22341
|
return;
|
|
22113
22342
|
}
|
|
22114
22343
|
const pos = window.getComputedStyle(container).position;
|
|
@@ -22151,11 +22380,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22151
22380
|
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
22152
22381
|
}
|
|
22153
22382
|
}
|
|
22154
|
-
this.
|
|
22383
|
+
this.preRenderContainerEl = resolved;
|
|
22384
|
+
this.applyPreRenderContainerPositioning();
|
|
22155
22385
|
if (wrapper.parentNode !== resolved) {
|
|
22156
22386
|
resolved.appendChild(wrapper);
|
|
22157
22387
|
}
|
|
22158
|
-
this.preRenderContainerEl = resolved;
|
|
22159
22388
|
}
|
|
22160
22389
|
insertIntoDOMForPreRender(child) {
|
|
22161
22390
|
const preRenderChild = this.createPreRenderChild(child);
|
|
@@ -22178,7 +22407,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22178
22407
|
}
|
|
22179
22408
|
const targetContainer = this.resolvePreRenderContainerTarget();
|
|
22180
22409
|
this.preRenderContainerEl = targetContainer;
|
|
22181
|
-
this.applyPreRenderContainerPositioning(
|
|
22410
|
+
this.applyPreRenderContainerPositioning();
|
|
22182
22411
|
targetContainer.appendChild(preRenderWrapper);
|
|
22183
22412
|
}
|
|
22184
22413
|
insertIntoDOM(child) {
|
|
@@ -22584,7 +22813,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22584
22813
|
showPreRenderByDefault,
|
|
22585
22814
|
replaceExistingPreRender,
|
|
22586
22815
|
});
|
|
22587
|
-
if (!this.
|
|
22816
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22588
22817
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22589
22818
|
return this;
|
|
22590
22819
|
}
|
|
@@ -22640,7 +22869,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22640
22869
|
}
|
|
22641
22870
|
// Drop our reference up front so a destroyed embed never pins a
|
|
22642
22871
|
// detached container in memory; restoration uses the local handle.
|
|
22643
|
-
this.preRenderContainerEl =
|
|
22872
|
+
this.preRenderContainerEl = document.body;
|
|
22644
22873
|
const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
22645
22874
|
if (originalPosition === undefined) {
|
|
22646
22875
|
// We never overrode this container's position; nothing to restore.
|
|
@@ -22663,9 +22892,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22663
22892
|
if (!this.containerScrollListener) {
|
|
22664
22893
|
return;
|
|
22665
22894
|
}
|
|
22666
|
-
const customContainer = this.
|
|
22667
|
-
? this.preRenderContainerEl
|
|
22668
|
-
: null;
|
|
22895
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22669
22896
|
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
22670
22897
|
this.containerScrollListener = null;
|
|
22671
22898
|
}
|
|
@@ -22762,12 +22989,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22762
22989
|
async showPreRender() {
|
|
22763
22990
|
var _a, _b;
|
|
22764
22991
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22765
|
-
preRenderId: this.
|
|
22992
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22766
22993
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22767
22994
|
});
|
|
22768
22995
|
if (this.shouldWaitForRenderPromise)
|
|
22769
22996
|
await this.isReadyForRenderPromise;
|
|
22770
|
-
if (!this.
|
|
22997
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22771
22998
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22772
22999
|
return this;
|
|
22773
23000
|
}
|
|
@@ -22798,14 +23025,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22798
23025
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
22799
23026
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
22800
23027
|
this.syncPreRenderStyle();
|
|
22801
|
-
const customContainer = this.
|
|
22802
|
-
? this.preRenderContainerEl
|
|
22803
|
-
: null;
|
|
23028
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22804
23029
|
if (customContainer && !this.containerScrollListener) {
|
|
22805
23030
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22806
23031
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22807
23032
|
}
|
|
22808
|
-
if (!this.
|
|
23033
|
+
if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
|
|
22809
23034
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22810
23035
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22811
23036
|
entries.forEach((entry) => {
|
|
@@ -22847,13 +23072,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22847
23072
|
logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
22848
23073
|
return;
|
|
22849
23074
|
}
|
|
23075
|
+
if (!this.getPreRenderPlaceHolderElement().isConnected) {
|
|
23076
|
+
logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
|
|
23077
|
+
return;
|
|
23078
|
+
}
|
|
22850
23079
|
// Self-heal if the resolved container was remounted/detached, so we
|
|
22851
23080
|
// never measure a stale node (which would collapse the wrapper).
|
|
22852
23081
|
this.reconcilePreRenderContainer();
|
|
22853
23082
|
const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
|
|
22854
|
-
const containerEl = this.
|
|
22855
|
-
? this.preRenderContainerEl
|
|
22856
|
-
: null;
|
|
23083
|
+
const containerEl = this.getCustomPreRenderContainer();
|
|
22857
23084
|
const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
|
|
22858
23085
|
const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
|
|
22859
23086
|
const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
|
|
@@ -22871,7 +23098,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22871
23098
|
*/
|
|
22872
23099
|
hidePreRender() {
|
|
22873
23100
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
22874
|
-
preRenderId: this.
|
|
23101
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22875
23102
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22876
23103
|
});
|
|
22877
23104
|
logger$3.debug('HidePreRender Called');
|
|
@@ -22880,10 +23107,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22880
23107
|
logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
|
|
22881
23108
|
return;
|
|
22882
23109
|
}
|
|
23110
|
+
const { zIndex } = this.getPreRenderConfig();
|
|
22883
23111
|
const preRenderHideStyles = {
|
|
22884
23112
|
opacity: '0',
|
|
22885
23113
|
pointerEvents: 'none',
|
|
22886
|
-
zIndex: '-1000',
|
|
23114
|
+
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
22887
23115
|
position: 'absolute',
|
|
22888
23116
|
top: '0',
|
|
22889
23117
|
left: '0',
|
|
@@ -22908,10 +23136,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22908
23136
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
22909
23137
|
*/
|
|
22910
23138
|
getPreRenderIds() {
|
|
23139
|
+
const preRenderId = this.getPreRenderConfig().preRenderId;
|
|
22911
23140
|
return {
|
|
22912
|
-
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${
|
|
22913
|
-
child: `tsEmbed-pre-render-child-${
|
|
22914
|
-
placeHolder: `tsEmbed-pre-render-placeholder-${
|
|
23141
|
+
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23142
|
+
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
23143
|
+
placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
|
|
22915
23144
|
};
|
|
22916
23145
|
}
|
|
22917
23146
|
/**
|
|
@@ -23093,6 +23322,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23093
23322
|
spotterShareConversationConfig,
|
|
23094
23323
|
},
|
|
23095
23324
|
};
|
|
23325
|
+
}
|
|
23326
|
+
function buildStarterPromptsAppInitData(initData, viewConfig) {
|
|
23327
|
+
var _a;
|
|
23328
|
+
const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
|
|
23329
|
+
if (!starterPrompts)
|
|
23330
|
+
return initData;
|
|
23331
|
+
return {
|
|
23332
|
+
...initData,
|
|
23333
|
+
embedParams: {
|
|
23334
|
+
...(initData.embedParams || {}),
|
|
23335
|
+
starterPrompts,
|
|
23336
|
+
},
|
|
23337
|
+
};
|
|
23096
23338
|
}
|
|
23097
23339
|
|
|
23098
23340
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
@@ -23158,6 +23400,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23158
23400
|
* Collections listing page
|
|
23159
23401
|
*/
|
|
23160
23402
|
Page["Collections"] = "collections";
|
|
23403
|
+
/**
|
|
23404
|
+
* Liveboard schedules listing page
|
|
23405
|
+
*/
|
|
23406
|
+
Page["LiveboardSchedules"] = "liveboard-schedules";
|
|
23161
23407
|
})(exports.Page || (exports.Page = {}));
|
|
23162
23408
|
/**
|
|
23163
23409
|
* Define the initial state of column custom group accordions
|
|
@@ -23303,6 +23549,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23303
23549
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
23304
23550
|
};
|
|
23305
23551
|
if (this.viewConfig.fullHeight === true) {
|
|
23552
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
23553
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
23554
|
+
}
|
|
23555
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
23556
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
23557
|
+
}
|
|
23558
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
23559
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
23560
|
+
}
|
|
23306
23561
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23307
23562
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23308
23563
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23325,7 +23580,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23325
23580
|
const defaultAppInitData = await super.getAppInitData();
|
|
23326
23581
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23327
23582
|
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
23328
|
-
|
|
23583
|
+
const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
23584
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
23329
23585
|
}
|
|
23330
23586
|
/**
|
|
23331
23587
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -23336,7 +23592,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23336
23592
|
return getQueryParamString(params, true);
|
|
23337
23593
|
}
|
|
23338
23594
|
getEmbedParamsObject() {
|
|
23339
|
-
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, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs, isEnhancedFilterInteractivityEnabled, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterDataSources, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
23595
|
+
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 = exports.DataPanelCustomColumnGroupsAccordionState.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;
|
|
23340
23596
|
let params = {};
|
|
23341
23597
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
23342
23598
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -23390,7 +23646,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23390
23646
|
}
|
|
23391
23647
|
// Handle spotterChatConfig params
|
|
23392
23648
|
if (spotterChatConfig) {
|
|
23393
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
23649
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23394
23650
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23395
23651
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23396
23652
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23399,6 +23655,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23399
23655
|
if (enableStarterPrompts !== undefined) {
|
|
23400
23656
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23401
23657
|
}
|
|
23658
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
23659
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
23660
|
+
}
|
|
23402
23661
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23403
23662
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23404
23663
|
}
|
|
@@ -23442,6 +23701,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23442
23701
|
if (enable2ColumnLayout !== undefined) {
|
|
23443
23702
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23444
23703
|
}
|
|
23704
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
23705
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
23706
|
+
}
|
|
23445
23707
|
if (enableAskSage) {
|
|
23446
23708
|
params[Param.enableAskSage] = enableAskSage;
|
|
23447
23709
|
}
|
|
@@ -23454,6 +23716,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23454
23716
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23455
23717
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23456
23718
|
}
|
|
23719
|
+
if (liveboardGutter !== undefined) {
|
|
23720
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
23721
|
+
}
|
|
23457
23722
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23458
23723
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23459
23724
|
}
|
|
@@ -23564,6 +23829,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23564
23829
|
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
23565
23830
|
case exports.Page.Collections:
|
|
23566
23831
|
return 'collections';
|
|
23832
|
+
case exports.Page.LiveboardSchedules:
|
|
23833
|
+
return 'home/liveboard-schedules';
|
|
23567
23834
|
case exports.Page.Home:
|
|
23568
23835
|
default:
|
|
23569
23836
|
return 'home';
|
|
@@ -23849,6 +24116,15 @@ query GetEurekaVizSnapshots(
|
|
|
23849
24116
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
23850
24117
|
'Using full height with vizId might lead to unexpected behavior.');
|
|
23851
24118
|
}
|
|
24119
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
24120
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
24121
|
+
}
|
|
24122
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
24123
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
24124
|
+
}
|
|
24125
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
24126
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
24127
|
+
}
|
|
23852
24128
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23853
24129
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23854
24130
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23857,7 +24133,8 @@ query GetEurekaVizSnapshots(
|
|
|
23857
24133
|
}
|
|
23858
24134
|
async getAppInitData() {
|
|
23859
24135
|
const defaultAppInitData = await super.getAppInitData();
|
|
23860
|
-
|
|
24136
|
+
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
24137
|
+
return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
23861
24138
|
}
|
|
23862
24139
|
/**
|
|
23863
24140
|
* Construct a map of params to be passed on to the
|
|
@@ -23871,7 +24148,7 @@ query GetEurekaVizSnapshots(
|
|
|
23871
24148
|
getEmbedParamsObject() {
|
|
23872
24149
|
let params = {};
|
|
23873
24150
|
params = this.getBaseQueryParams(params);
|
|
23874
|
-
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, dataPanelV2 = true, updatedSpotterExperience, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled, isGranularXLSXCSVSchedulesEnabled, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isScopedLiveboardFilteringEnabled, isLinkParametersEnabled, updatedSpotterChatPrompt, showSpotterRadiance, enableStopAnswerGenerationEmbed, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, enableLiveboardDataCache, } = this.viewConfig;
|
|
24151
|
+
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;
|
|
23875
24152
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
23876
24153
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
23877
24154
|
if (fullHeight === true) {
|
|
@@ -23912,6 +24189,9 @@ query GetEurekaVizSnapshots(
|
|
|
23912
24189
|
if (enable2ColumnLayout !== undefined) {
|
|
23913
24190
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23914
24191
|
}
|
|
24192
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
24193
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
24194
|
+
}
|
|
23915
24195
|
if (hideTabPanel) {
|
|
23916
24196
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
23917
24197
|
}
|
|
@@ -23939,6 +24219,9 @@ query GetEurekaVizSnapshots(
|
|
|
23939
24219
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23940
24220
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23941
24221
|
}
|
|
24222
|
+
if (liveboardGutter !== undefined) {
|
|
24223
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
24224
|
+
}
|
|
23942
24225
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23943
24226
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23944
24227
|
}
|
|
@@ -23956,7 +24239,7 @@ query GetEurekaVizSnapshots(
|
|
|
23956
24239
|
}
|
|
23957
24240
|
// Handle spotterChatConfig params
|
|
23958
24241
|
if (spotterChatConfig) {
|
|
23959
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
24242
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23960
24243
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23961
24244
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23962
24245
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23965,6 +24248,9 @@ query GetEurekaVizSnapshots(
|
|
|
23965
24248
|
if (enableStarterPrompts !== undefined) {
|
|
23966
24249
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23967
24250
|
}
|
|
24251
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
24252
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
24253
|
+
}
|
|
23968
24254
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23969
24255
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23970
24256
|
}
|
|
@@ -24210,7 +24496,7 @@ query GetEurekaVizSnapshots(
|
|
|
24210
24496
|
if (this.isRendered) {
|
|
24211
24497
|
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
24212
24498
|
}
|
|
24213
|
-
else if (this.
|
|
24499
|
+
else if (this.getPreRenderConfig().preRenderId) {
|
|
24214
24500
|
this.preRender(true);
|
|
24215
24501
|
}
|
|
24216
24502
|
else {
|
|
@@ -25083,10 +25369,11 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
25083
25369
|
async getAppInitData() {
|
|
25084
25370
|
const defaultAppInitData = await super.getAppInitData();
|
|
25085
25371
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
25086
|
-
|
|
25372
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
25373
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
25087
25374
|
}
|
|
25088
25375
|
getEmbedParamsObject() {
|
|
25089
|
-
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
25376
|
+
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
|
|
25090
25377
|
const queryParams = this.getBaseQueryParams();
|
|
25091
25378
|
queryParams[Param.SpotterEnabled] = true;
|
|
25092
25379
|
// Boolean params
|
|
@@ -25099,6 +25386,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
25099
25386
|
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
25100
25387
|
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
25101
25388
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
25389
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
|
|
25102
25390
|
// Handle spotterChatConfig params
|
|
25103
25391
|
if (spotterChatConfig) {
|
|
25104
25392
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|