@thoughtspot/visual-embed-sdk 1.51.0 → 1.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +16 -8
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +69 -32
- 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.spec.js +4 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-aBzH5ZwF.js → index-DxLfQxoT.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 +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/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/tsembed-react.es.js +330 -61
- package/dist/tsembed-react.js +329 -60
- package/dist/tsembed.es.js +390 -123
- package/dist/tsembed.js +392 -125
- package/dist/visual-embed-sdk-react-full.d.ts +696 -89
- package/dist/visual-embed-sdk-react.d.ts +692 -88
- package/dist/visual-embed-sdk.d.ts +632 -59
- 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/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 +16 -8
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +69 -32
- 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.spec.js +4 -0
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +632 -59
- 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/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 +83 -37
- 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 +5 -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.1 */
|
|
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.1";var pkg = {version:version$1};
|
|
7067
7237
|
|
|
7068
7238
|
const { version } = pkg;
|
|
7069
7239
|
|
|
@@ -7870,6 +8040,72 @@
|
|
|
7870
8040
|
}
|
|
7871
8041
|
};
|
|
7872
8042
|
|
|
8043
|
+
/**
|
|
8044
|
+
* Copyright (c) 2023
|
|
8045
|
+
*
|
|
8046
|
+
* Utilities related to reading configuration objects
|
|
8047
|
+
* @summary Config-related utils
|
|
8048
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8049
|
+
*/
|
|
8050
|
+
const urlRegex = new RegExp([
|
|
8051
|
+
'(^(https?:)//)?',
|
|
8052
|
+
'(([^:/?#]*)(?::([0-9]+))?)',
|
|
8053
|
+
'(/{0,1}[^?#]*)',
|
|
8054
|
+
'(\\?[^#]*|)',
|
|
8055
|
+
'(#.*|)$', // hash
|
|
8056
|
+
].join(''));
|
|
8057
|
+
/**
|
|
8058
|
+
* Parse and construct the ThoughtSpot hostname or IP address
|
|
8059
|
+
* from the embed configuration object.
|
|
8060
|
+
* @param config
|
|
8061
|
+
*/
|
|
8062
|
+
const getThoughtSpotHost = (config) => {
|
|
8063
|
+
if (!config.thoughtSpotHost) {
|
|
8064
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8065
|
+
}
|
|
8066
|
+
const urlParts = config.thoughtSpotHost.match(urlRegex);
|
|
8067
|
+
if (!urlParts) {
|
|
8068
|
+
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
|
|
8069
|
+
}
|
|
8070
|
+
const protocol = urlParts[2] || window.location.protocol;
|
|
8071
|
+
const host = urlParts[3];
|
|
8072
|
+
let path = urlParts[6];
|
|
8073
|
+
// Lose the trailing / if any
|
|
8074
|
+
if (path.charAt(path.length - 1) === '/') {
|
|
8075
|
+
path = path.substring(0, path.length - 1);
|
|
8076
|
+
}
|
|
8077
|
+
// const urlParams = urlParts[7];
|
|
8078
|
+
// const hash = urlParts[8];
|
|
8079
|
+
return `${protocol}//${host}${path}`;
|
|
8080
|
+
};
|
|
8081
|
+
const getV2BasePath = (config) => {
|
|
8082
|
+
if (config.basepath) {
|
|
8083
|
+
return config.basepath;
|
|
8084
|
+
}
|
|
8085
|
+
const tsHost = getThoughtSpotHost(config);
|
|
8086
|
+
// This is to handle when e2e's. Search is run on pods for
|
|
8087
|
+
// comp-blink-test-pipeline with baseUrl=https://localhost:8443.
|
|
8088
|
+
// This is to handle when the developer is developing in their local
|
|
8089
|
+
// environment.
|
|
8090
|
+
if (tsHost.includes('://localhost') && !tsHost.includes(':8443')) {
|
|
8091
|
+
return '';
|
|
8092
|
+
}
|
|
8093
|
+
return 'v2';
|
|
8094
|
+
};
|
|
8095
|
+
/**
|
|
8096
|
+
* It is a good idea to keep URLs under 2000 chars.
|
|
8097
|
+
* If this is ever breached, since we pass view configuration through
|
|
8098
|
+
* URL params, we would like to log a warning.
|
|
8099
|
+
* Reference: https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
|
|
8100
|
+
*/
|
|
8101
|
+
const URL_MAX_LENGTH = 2000;
|
|
8102
|
+
/**
|
|
8103
|
+
* The default CSS dimensions of the embedded app
|
|
8104
|
+
*/
|
|
8105
|
+
const DEFAULT_EMBED_WIDTH = '100%';
|
|
8106
|
+
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
8107
|
+
const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
|
|
8108
|
+
|
|
7873
8109
|
/** Used for built-in method references. */
|
|
7874
8110
|
var objectProto$d = Object.prototype;
|
|
7875
8111
|
|
|
@@ -8753,12 +8989,12 @@
|
|
|
8753
8989
|
/**
|
|
8754
8990
|
* Levels at which a filter or parameter can be applied.
|
|
8755
8991
|
*/
|
|
8756
|
-
|
|
8992
|
+
exports.ApplicabilityLevel = void 0;
|
|
8757
8993
|
(function (ApplicabilityLevel) {
|
|
8758
8994
|
ApplicabilityLevel["Liveboard"] = "LIVEBOARD";
|
|
8759
8995
|
ApplicabilityLevel["Tab"] = "TAB";
|
|
8760
8996
|
ApplicabilityLevel["Group"] = "GROUP";
|
|
8761
|
-
})(ApplicabilityLevel || (ApplicabilityLevel = {}));
|
|
8997
|
+
})(exports.ApplicabilityLevel || (exports.ApplicabilityLevel = {}));
|
|
8762
8998
|
exports.UIPassthroughEvent = void 0;
|
|
8763
8999
|
(function (UIPassthroughEvent) {
|
|
8764
9000
|
UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
|
|
@@ -12598,71 +12834,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
12598
12834
|
};
|
|
12599
12835
|
};
|
|
12600
12836
|
|
|
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
12837
|
var Config = {
|
|
12667
12838
|
DEBUG: false,
|
|
12668
12839
|
LIB_VERSION: '2.47.0'
|
|
@@ -20224,7 +20395,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20224
20395
|
/**
|
|
20225
20396
|
* Initializes the Visual Embed SDK globally and perform
|
|
20226
20397
|
* 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
|
|
20398
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
20228
20399
|
* to actually embed. That is handled internally.
|
|
20229
20400
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
20230
20401
|
* authentication mechanism and so on.
|
|
@@ -20720,8 +20891,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
20720
20891
|
return true;
|
|
20721
20892
|
// targetId is not required at LIVEBOARD level, since the filter applies to the whole Liveboard
|
|
20722
20893
|
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));
|
|
20894
|
+
&& Object.values(exports.ApplicabilityLevel).includes(a.level)
|
|
20895
|
+
&& (a.level === exports.ApplicabilityLevel.Liveboard || (isString_1(a.targetId) && a.targetId.trim().length > 0));
|
|
20725
20896
|
};
|
|
20726
20897
|
function isValidUpdateFiltersPayload(payload) {
|
|
20727
20898
|
if (!payload)
|
|
@@ -21204,7 +21375,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21204
21375
|
*/
|
|
21205
21376
|
this.shouldEncodeUrlQueryParams = false;
|
|
21206
21377
|
this.defaultHiddenActions = [exports.Action.ReportError];
|
|
21207
|
-
this.preRenderContainerEl =
|
|
21378
|
+
this.preRenderContainerEl = document.body;
|
|
21208
21379
|
this.containerScrollListener = null;
|
|
21209
21380
|
/**
|
|
21210
21381
|
* Handler for fullscreen change events
|
|
@@ -21892,11 +22063,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
21892
22063
|
iFrame.name = 'ThoughtSpot Embedded Analytics';
|
|
21893
22064
|
return iFrame;
|
|
21894
22065
|
}
|
|
22066
|
+
/**
|
|
22067
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
22068
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
22069
|
+
* backward compatibility.
|
|
22070
|
+
*/
|
|
22071
|
+
getPreRenderConfig() {
|
|
22072
|
+
var _a, _b, _c, _d;
|
|
22073
|
+
const viewCfg = this.viewConfig;
|
|
22074
|
+
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22075
|
+
return {
|
|
22076
|
+
...preRenderCfg,
|
|
22077
|
+
preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22078
|
+
preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22079
|
+
doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22080
|
+
};
|
|
22081
|
+
}
|
|
21895
22082
|
/**
|
|
21896
22083
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
21897
22084
|
*/
|
|
21898
22085
|
isPreRenderEmbed() {
|
|
21899
|
-
return !!this.
|
|
22086
|
+
return !!this.getPreRenderConfig().preRenderId;
|
|
21900
22087
|
}
|
|
21901
22088
|
handleInsertionIntoDOM(child) {
|
|
21902
22089
|
if (this.isPreRenderEmbed()) {
|
|
@@ -22032,6 +22219,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22032
22219
|
this.setIframeElement(this.preRenderChild);
|
|
22033
22220
|
}
|
|
22034
22221
|
this.isRendered = true;
|
|
22222
|
+
this.inheritPreRenderContainer();
|
|
22035
22223
|
}
|
|
22036
22224
|
return this.isPreRenderConnected();
|
|
22037
22225
|
}
|
|
@@ -22082,7 +22270,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22082
22270
|
*/
|
|
22083
22271
|
resolvePreRenderContainerTarget() {
|
|
22084
22272
|
var _a;
|
|
22085
|
-
const containerConfig = this.
|
|
22273
|
+
const containerConfig = this.getPreRenderConfig().preRenderContainer;
|
|
22086
22274
|
let container = null;
|
|
22087
22275
|
if (typeof containerConfig === 'string') {
|
|
22088
22276
|
try {
|
|
@@ -22100,15 +22288,35 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22100
22288
|
}
|
|
22101
22289
|
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
22102
22290
|
}
|
|
22291
|
+
inheritPreRenderContainer() {
|
|
22292
|
+
var _a;
|
|
22293
|
+
const preRenderedObject = this.getPreRenderObj();
|
|
22294
|
+
if (!preRenderedObject || preRenderedObject === this) {
|
|
22295
|
+
return;
|
|
22296
|
+
}
|
|
22297
|
+
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22298
|
+
if (this.getPreRenderConfig().preRenderContainer
|
|
22299
|
+
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22300
|
+
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22301
|
+
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
22302
|
+
}
|
|
22303
|
+
this.preRenderContainerEl = ownerContainer;
|
|
22304
|
+
this.applyPreRenderContainerPositioning();
|
|
22305
|
+
}
|
|
22306
|
+
getCustomPreRenderContainer() {
|
|
22307
|
+
const container = this.preRenderContainerEl;
|
|
22308
|
+
return container && container !== document.body ? container : null;
|
|
22309
|
+
}
|
|
22103
22310
|
/**
|
|
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.
|
|
22311
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
22312
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
22313
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
22314
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
22315
|
+
* when embeds share the same container.
|
|
22109
22316
|
*/
|
|
22110
|
-
applyPreRenderContainerPositioning(
|
|
22111
|
-
|
|
22317
|
+
applyPreRenderContainerPositioning() {
|
|
22318
|
+
const container = this.getCustomPreRenderContainer();
|
|
22319
|
+
if (!container) {
|
|
22112
22320
|
return;
|
|
22113
22321
|
}
|
|
22114
22322
|
const pos = window.getComputedStyle(container).position;
|
|
@@ -22151,11 +22359,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22151
22359
|
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
22152
22360
|
}
|
|
22153
22361
|
}
|
|
22154
|
-
this.
|
|
22362
|
+
this.preRenderContainerEl = resolved;
|
|
22363
|
+
this.applyPreRenderContainerPositioning();
|
|
22155
22364
|
if (wrapper.parentNode !== resolved) {
|
|
22156
22365
|
resolved.appendChild(wrapper);
|
|
22157
22366
|
}
|
|
22158
|
-
this.preRenderContainerEl = resolved;
|
|
22159
22367
|
}
|
|
22160
22368
|
insertIntoDOMForPreRender(child) {
|
|
22161
22369
|
const preRenderChild = this.createPreRenderChild(child);
|
|
@@ -22178,7 +22386,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22178
22386
|
}
|
|
22179
22387
|
const targetContainer = this.resolvePreRenderContainerTarget();
|
|
22180
22388
|
this.preRenderContainerEl = targetContainer;
|
|
22181
|
-
this.applyPreRenderContainerPositioning(
|
|
22389
|
+
this.applyPreRenderContainerPositioning();
|
|
22182
22390
|
targetContainer.appendChild(preRenderWrapper);
|
|
22183
22391
|
}
|
|
22184
22392
|
insertIntoDOM(child) {
|
|
@@ -22584,7 +22792,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22584
22792
|
showPreRenderByDefault,
|
|
22585
22793
|
replaceExistingPreRender,
|
|
22586
22794
|
});
|
|
22587
|
-
if (!this.
|
|
22795
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22588
22796
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22589
22797
|
return this;
|
|
22590
22798
|
}
|
|
@@ -22640,7 +22848,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22640
22848
|
}
|
|
22641
22849
|
// Drop our reference up front so a destroyed embed never pins a
|
|
22642
22850
|
// detached container in memory; restoration uses the local handle.
|
|
22643
|
-
this.preRenderContainerEl =
|
|
22851
|
+
this.preRenderContainerEl = document.body;
|
|
22644
22852
|
const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
22645
22853
|
if (originalPosition === undefined) {
|
|
22646
22854
|
// We never overrode this container's position; nothing to restore.
|
|
@@ -22663,9 +22871,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22663
22871
|
if (!this.containerScrollListener) {
|
|
22664
22872
|
return;
|
|
22665
22873
|
}
|
|
22666
|
-
const customContainer = this.
|
|
22667
|
-
? this.preRenderContainerEl
|
|
22668
|
-
: null;
|
|
22874
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22669
22875
|
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
22670
22876
|
this.containerScrollListener = null;
|
|
22671
22877
|
}
|
|
@@ -22762,12 +22968,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22762
22968
|
async showPreRender() {
|
|
22763
22969
|
var _a, _b;
|
|
22764
22970
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22765
|
-
preRenderId: this.
|
|
22971
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22766
22972
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22767
22973
|
});
|
|
22768
22974
|
if (this.shouldWaitForRenderPromise)
|
|
22769
22975
|
await this.isReadyForRenderPromise;
|
|
22770
|
-
if (!this.
|
|
22976
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22771
22977
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22772
22978
|
return this;
|
|
22773
22979
|
}
|
|
@@ -22798,14 +23004,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22798
23004
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
22799
23005
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
22800
23006
|
this.syncPreRenderStyle();
|
|
22801
|
-
const customContainer = this.
|
|
22802
|
-
? this.preRenderContainerEl
|
|
22803
|
-
: null;
|
|
23007
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22804
23008
|
if (customContainer && !this.containerScrollListener) {
|
|
22805
23009
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22806
23010
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22807
23011
|
}
|
|
22808
|
-
if (!this.
|
|
23012
|
+
if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
|
|
22809
23013
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22810
23014
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22811
23015
|
entries.forEach((entry) => {
|
|
@@ -22847,13 +23051,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22847
23051
|
logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
22848
23052
|
return;
|
|
22849
23053
|
}
|
|
23054
|
+
if (!this.getPreRenderPlaceHolderElement().isConnected) {
|
|
23055
|
+
logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
|
|
23056
|
+
return;
|
|
23057
|
+
}
|
|
22850
23058
|
// Self-heal if the resolved container was remounted/detached, so we
|
|
22851
23059
|
// never measure a stale node (which would collapse the wrapper).
|
|
22852
23060
|
this.reconcilePreRenderContainer();
|
|
22853
23061
|
const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
|
|
22854
|
-
const containerEl = this.
|
|
22855
|
-
? this.preRenderContainerEl
|
|
22856
|
-
: null;
|
|
23062
|
+
const containerEl = this.getCustomPreRenderContainer();
|
|
22857
23063
|
const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
|
|
22858
23064
|
const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
|
|
22859
23065
|
const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
|
|
@@ -22871,7 +23077,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22871
23077
|
*/
|
|
22872
23078
|
hidePreRender() {
|
|
22873
23079
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
22874
|
-
preRenderId: this.
|
|
23080
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22875
23081
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22876
23082
|
});
|
|
22877
23083
|
logger$3.debug('HidePreRender Called');
|
|
@@ -22880,10 +23086,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22880
23086
|
logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
|
|
22881
23087
|
return;
|
|
22882
23088
|
}
|
|
23089
|
+
const { zIndex } = this.getPreRenderConfig();
|
|
22883
23090
|
const preRenderHideStyles = {
|
|
22884
23091
|
opacity: '0',
|
|
22885
23092
|
pointerEvents: 'none',
|
|
22886
|
-
zIndex: '-1000',
|
|
23093
|
+
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
22887
23094
|
position: 'absolute',
|
|
22888
23095
|
top: '0',
|
|
22889
23096
|
left: '0',
|
|
@@ -22908,10 +23115,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
22908
23115
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
22909
23116
|
*/
|
|
22910
23117
|
getPreRenderIds() {
|
|
23118
|
+
const preRenderId = this.getPreRenderConfig().preRenderId;
|
|
22911
23119
|
return {
|
|
22912
|
-
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${
|
|
22913
|
-
child: `tsEmbed-pre-render-child-${
|
|
22914
|
-
placeHolder: `tsEmbed-pre-render-placeholder-${
|
|
23120
|
+
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23121
|
+
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
23122
|
+
placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
|
|
22915
23123
|
};
|
|
22916
23124
|
}
|
|
22917
23125
|
/**
|
|
@@ -23093,6 +23301,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23093
23301
|
spotterShareConversationConfig,
|
|
23094
23302
|
},
|
|
23095
23303
|
};
|
|
23304
|
+
}
|
|
23305
|
+
function buildStarterPromptsAppInitData(initData, viewConfig) {
|
|
23306
|
+
var _a;
|
|
23307
|
+
const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
|
|
23308
|
+
if (!starterPrompts)
|
|
23309
|
+
return initData;
|
|
23310
|
+
return {
|
|
23311
|
+
...initData,
|
|
23312
|
+
embedParams: {
|
|
23313
|
+
...(initData.embedParams || {}),
|
|
23314
|
+
starterPrompts,
|
|
23315
|
+
},
|
|
23316
|
+
};
|
|
23096
23317
|
}
|
|
23097
23318
|
|
|
23098
23319
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
@@ -23158,6 +23379,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23158
23379
|
* Collections listing page
|
|
23159
23380
|
*/
|
|
23160
23381
|
Page["Collections"] = "collections";
|
|
23382
|
+
/**
|
|
23383
|
+
* Liveboard schedules listing page
|
|
23384
|
+
*/
|
|
23385
|
+
Page["LiveboardSchedules"] = "liveboard-schedules";
|
|
23161
23386
|
})(exports.Page || (exports.Page = {}));
|
|
23162
23387
|
/**
|
|
23163
23388
|
* Define the initial state of column custom group accordions
|
|
@@ -23303,6 +23528,15 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23303
23528
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
23304
23529
|
};
|
|
23305
23530
|
if (this.viewConfig.fullHeight === true) {
|
|
23531
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
23532
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
23533
|
+
}
|
|
23534
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
23535
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
23536
|
+
}
|
|
23537
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
23538
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
23539
|
+
}
|
|
23306
23540
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23307
23541
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23308
23542
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23325,7 +23559,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23325
23559
|
const defaultAppInitData = await super.getAppInitData();
|
|
23326
23560
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23327
23561
|
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
23328
|
-
|
|
23562
|
+
const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
23563
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
23329
23564
|
}
|
|
23330
23565
|
/**
|
|
23331
23566
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -23336,7 +23571,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23336
23571
|
return getQueryParamString(params, true);
|
|
23337
23572
|
}
|
|
23338
23573
|
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;
|
|
23574
|
+
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
23575
|
let params = {};
|
|
23341
23576
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
23342
23577
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -23390,7 +23625,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23390
23625
|
}
|
|
23391
23626
|
// Handle spotterChatConfig params
|
|
23392
23627
|
if (spotterChatConfig) {
|
|
23393
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
23628
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23394
23629
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23395
23630
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23396
23631
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23399,6 +23634,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23399
23634
|
if (enableStarterPrompts !== undefined) {
|
|
23400
23635
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23401
23636
|
}
|
|
23637
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
23638
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
23639
|
+
}
|
|
23402
23640
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23403
23641
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23404
23642
|
}
|
|
@@ -23442,6 +23680,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23442
23680
|
if (enable2ColumnLayout !== undefined) {
|
|
23443
23681
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23444
23682
|
}
|
|
23683
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
23684
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
23685
|
+
}
|
|
23445
23686
|
if (enableAskSage) {
|
|
23446
23687
|
params[Param.enableAskSage] = enableAskSage;
|
|
23447
23688
|
}
|
|
@@ -23454,6 +23695,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23454
23695
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23455
23696
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23456
23697
|
}
|
|
23698
|
+
if (liveboardGutter !== undefined) {
|
|
23699
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
23700
|
+
}
|
|
23457
23701
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23458
23702
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23459
23703
|
}
|
|
@@ -23564,6 +23808,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
23564
23808
|
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
23565
23809
|
case exports.Page.Collections:
|
|
23566
23810
|
return 'collections';
|
|
23811
|
+
case exports.Page.LiveboardSchedules:
|
|
23812
|
+
return 'home/liveboard-schedules';
|
|
23567
23813
|
case exports.Page.Home:
|
|
23568
23814
|
default:
|
|
23569
23815
|
return 'home';
|
|
@@ -23849,6 +24095,15 @@ query GetEurekaVizSnapshots(
|
|
|
23849
24095
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
23850
24096
|
'Using full height with vizId might lead to unexpected behavior.');
|
|
23851
24097
|
}
|
|
24098
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
24099
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
24100
|
+
}
|
|
24101
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
24102
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
24103
|
+
}
|
|
24104
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
24105
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
24106
|
+
}
|
|
23852
24107
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23853
24108
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23854
24109
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23857,7 +24112,8 @@ query GetEurekaVizSnapshots(
|
|
|
23857
24112
|
}
|
|
23858
24113
|
async getAppInitData() {
|
|
23859
24114
|
const defaultAppInitData = await super.getAppInitData();
|
|
23860
|
-
|
|
24115
|
+
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
24116
|
+
return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
23861
24117
|
}
|
|
23862
24118
|
/**
|
|
23863
24119
|
* Construct a map of params to be passed on to the
|
|
@@ -23871,7 +24127,7 @@ query GetEurekaVizSnapshots(
|
|
|
23871
24127
|
getEmbedParamsObject() {
|
|
23872
24128
|
let params = {};
|
|
23873
24129
|
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;
|
|
24130
|
+
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
24131
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
23876
24132
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
23877
24133
|
if (fullHeight === true) {
|
|
@@ -23912,6 +24168,9 @@ query GetEurekaVizSnapshots(
|
|
|
23912
24168
|
if (enable2ColumnLayout !== undefined) {
|
|
23913
24169
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23914
24170
|
}
|
|
24171
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
24172
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
24173
|
+
}
|
|
23915
24174
|
if (hideTabPanel) {
|
|
23916
24175
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
23917
24176
|
}
|
|
@@ -23939,6 +24198,9 @@ query GetEurekaVizSnapshots(
|
|
|
23939
24198
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23940
24199
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23941
24200
|
}
|
|
24201
|
+
if (liveboardGutter !== undefined) {
|
|
24202
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
24203
|
+
}
|
|
23942
24204
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23943
24205
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23944
24206
|
}
|
|
@@ -23956,7 +24218,7 @@ query GetEurekaVizSnapshots(
|
|
|
23956
24218
|
}
|
|
23957
24219
|
// Handle spotterChatConfig params
|
|
23958
24220
|
if (spotterChatConfig) {
|
|
23959
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
24221
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23960
24222
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23961
24223
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23962
24224
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23965,6 +24227,9 @@ query GetEurekaVizSnapshots(
|
|
|
23965
24227
|
if (enableStarterPrompts !== undefined) {
|
|
23966
24228
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23967
24229
|
}
|
|
24230
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
24231
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
24232
|
+
}
|
|
23968
24233
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23969
24234
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23970
24235
|
}
|
|
@@ -24210,7 +24475,7 @@ query GetEurekaVizSnapshots(
|
|
|
24210
24475
|
if (this.isRendered) {
|
|
24211
24476
|
this.trigger(exports.HostEvent.Navigate, path.substring(1));
|
|
24212
24477
|
}
|
|
24213
|
-
else if (this.
|
|
24478
|
+
else if (this.getPreRenderConfig().preRenderId) {
|
|
24214
24479
|
this.preRender(true);
|
|
24215
24480
|
}
|
|
24216
24481
|
else {
|
|
@@ -25083,10 +25348,11 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
25083
25348
|
async getAppInitData() {
|
|
25084
25349
|
const defaultAppInitData = await super.getAppInitData();
|
|
25085
25350
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
25086
|
-
|
|
25351
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
25352
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
25087
25353
|
}
|
|
25088
25354
|
getEmbedParamsObject() {
|
|
25089
|
-
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
25355
|
+
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
|
|
25090
25356
|
const queryParams = this.getBaseQueryParams();
|
|
25091
25357
|
queryParams[Param.SpotterEnabled] = true;
|
|
25092
25358
|
// Boolean params
|
|
@@ -25099,6 +25365,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
25099
25365
|
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
25100
25366
|
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
25101
25367
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
25368
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
|
|
25102
25369
|
// Handle spotterChatConfig params
|
|
25103
25370
|
if (spotterChatConfig) {
|
|
25104
25371
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|