@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-react.es.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
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -703,7 +703,7 @@ var EmbedEvent;
|
|
|
703
703
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
704
704
|
* @example
|
|
705
705
|
* ```js
|
|
706
|
-
* searchEmbed.on(EmbedEvent.
|
|
706
|
+
* searchEmbed.on(EmbedEvent.Drilldown, {
|
|
707
707
|
* points: {
|
|
708
708
|
* clickedPoint,
|
|
709
709
|
* selectedPoints: selectedPoint
|
|
@@ -764,7 +764,7 @@ var EmbedEvent;
|
|
|
764
764
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
765
765
|
* @example
|
|
766
766
|
* ```js
|
|
767
|
-
* appEmbed.on(EmbedEvent.
|
|
767
|
+
* appEmbed.on(EmbedEvent.CustomAction, payload => {
|
|
768
768
|
* const data = payload.data;
|
|
769
769
|
* if (data.id === 'insert Custom Action ID here') {
|
|
770
770
|
* console.log('Custom Action event:', data.embedAnswerData);
|
|
@@ -1030,8 +1030,8 @@ var EmbedEvent;
|
|
|
1030
1030
|
*
|
|
1031
1031
|
* **Note**: This event is deprecated in v1.21.0.
|
|
1032
1032
|
* To fire an event when a download action is initiated on a chart or table,
|
|
1033
|
-
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.
|
|
1034
|
-
* `EmbedEvent.
|
|
1033
|
+
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`,
|
|
1034
|
+
* `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx`
|
|
1035
1035
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1036
1036
|
* @example
|
|
1037
1037
|
* ```js
|
|
@@ -1081,10 +1081,10 @@ var EmbedEvent;
|
|
|
1081
1081
|
* @example
|
|
1082
1082
|
* ```js
|
|
1083
1083
|
* //emit when action starts
|
|
1084
|
-
* searchEmbed.on(EmbedEvent.
|
|
1084
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
1085
1085
|
* console.log('download CSV', payload)}, {start: true })
|
|
1086
1086
|
* //emit when action ends
|
|
1087
|
-
* searchEmbed.on(EmbedEvent.
|
|
1087
|
+
* searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => {
|
|
1088
1088
|
* console.log('download CSV', payload)})
|
|
1089
1089
|
* ```
|
|
1090
1090
|
*/
|
|
@@ -2541,6 +2541,7 @@ var HostEvent;
|
|
|
2541
2541
|
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
2542
2542
|
* console.log("iFrameURL", url);
|
|
2543
2543
|
* ```
|
|
2544
|
+
* @returns iframeUrl - The URL currently loaded in the embedded iframe.
|
|
2544
2545
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
2545
2546
|
*/
|
|
2546
2547
|
HostEvent["GetIframeUrl"] = "GetIframeUrl";
|
|
@@ -2707,6 +2708,41 @@ var HostEvent;
|
|
|
2707
2708
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2708
2709
|
*/
|
|
2709
2710
|
HostEvent["OpenFilter"] = "openFilter";
|
|
2711
|
+
/**
|
|
2712
|
+
* Open the add-filter modal of a Liveboard, the same dialog that the
|
|
2713
|
+
* *Add filter* button in the Liveboard edit header opens, so the host
|
|
2714
|
+
* app can start the add-filter flow from its own UI.
|
|
2715
|
+
*
|
|
2716
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2717
|
+
* Hiding the *Add filter* button with `hiddenActions:
|
|
2718
|
+
* [Action.AddFilter]` does not block this event, but disabling it with
|
|
2719
|
+
* `disabledActions` does.
|
|
2720
|
+
*
|
|
2721
|
+
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
2722
|
+
* existing filter, this event starts the creation of a new filter.
|
|
2723
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2724
|
+
* @example
|
|
2725
|
+
* ```js
|
|
2726
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
2727
|
+
* ```
|
|
2728
|
+
*/
|
|
2729
|
+
HostEvent["OpenAddFilterModal"] = "openAddFilterModal";
|
|
2730
|
+
/**
|
|
2731
|
+
* Open the add-parameter panel of a Liveboard, the same panel that the
|
|
2732
|
+
* *Add parameter* button in the Liveboard edit header opens.
|
|
2733
|
+
* Mirrors {@link HostEvent.OpenAddFilterModal} for parameters.
|
|
2734
|
+
*
|
|
2735
|
+
* The Liveboard must be in edit mode; the event is ignored otherwise.
|
|
2736
|
+
* Hiding the *Add parameter* button with `hiddenActions:
|
|
2737
|
+
* [Action.AddParameter]` does not block this event, but disabling it
|
|
2738
|
+
* with `disabledActions` does.
|
|
2739
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
2740
|
+
* @example
|
|
2741
|
+
* ```js
|
|
2742
|
+
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
2743
|
+
* ```
|
|
2744
|
+
*/
|
|
2745
|
+
HostEvent["OpenAddParameterModal"] = "openAddParameterModal";
|
|
2710
2746
|
/**
|
|
2711
2747
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
2712
2748
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
@@ -2788,6 +2824,10 @@ var HostEvent;
|
|
|
2788
2824
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
2789
2825
|
* data=>console.log(data))
|
|
2790
2826
|
* ```
|
|
2827
|
+
* @returns data - Object with a `v2Content` string: the export request
|
|
2828
|
+
* payload for the current Liveboard.
|
|
2829
|
+
* @returns type - The passthrough event name,
|
|
2830
|
+
* `getExportRequestForCurrentPinboard`.
|
|
2791
2831
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
2792
2832
|
*/
|
|
2793
2833
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
@@ -2890,6 +2930,9 @@ var HostEvent;
|
|
|
2890
2930
|
* }, ContextType.Spotter);
|
|
2891
2931
|
* ```
|
|
2892
2932
|
*
|
|
2933
|
+
* @returns liveboardId - GUID of the Liveboard the Answer was pinned to.
|
|
2934
|
+
* @returns tabId - GUID of the tab within that Liveboard.
|
|
2935
|
+
* @returns vizId - GUID of the newly created visualization.
|
|
2893
2936
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2894
2937
|
*/
|
|
2895
2938
|
HostEvent["Pin"] = "pin";
|
|
@@ -2928,13 +2971,13 @@ var HostEvent;
|
|
|
2928
2971
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
2929
2972
|
* @example
|
|
2930
2973
|
* ```js
|
|
2931
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2974
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
2932
2975
|
* ```
|
|
2933
2976
|
* @example
|
|
2934
2977
|
* ```js
|
|
2935
2978
|
* // Manage schedules from liveboard context
|
|
2936
2979
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
2937
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
2980
|
+
* liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard);
|
|
2938
2981
|
* ```
|
|
2939
2982
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2940
2983
|
*/
|
|
@@ -3379,6 +3422,7 @@ var HostEvent;
|
|
|
3379
3422
|
* console.log(tml.answer);
|
|
3380
3423
|
* });
|
|
3381
3424
|
* ```
|
|
3425
|
+
* @returns The TML representation of the current Answer, as an object.
|
|
3382
3426
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3383
3427
|
* @important
|
|
3384
3428
|
*/
|
|
@@ -3823,6 +3867,8 @@ var HostEvent;
|
|
|
3823
3867
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
3824
3868
|
* console.log('filters', data);
|
|
3825
3869
|
* ```
|
|
3870
|
+
* @returns liveboardFilters - Filters applied on the Liveboard.
|
|
3871
|
+
* @returns runtimeFilters - Runtime filters applied on the Liveboard.
|
|
3826
3872
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
3827
3873
|
*/
|
|
3828
3874
|
HostEvent["GetFilters"] = "getFilters";
|
|
@@ -3972,6 +4018,9 @@ var HostEvent;
|
|
|
3972
4018
|
* console.log('tabs', tabDetails);
|
|
3973
4019
|
* });
|
|
3974
4020
|
* ```
|
|
4021
|
+
* @returns orderedTabIds - Tab GUIDs in the order they appear.
|
|
4022
|
+
* @returns numberOfTabs - Total number of tabs on the Liveboard.
|
|
4023
|
+
* @returns Tabs - Tab details, each with at least `id` and `name`.
|
|
3975
4024
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
3976
4025
|
*/
|
|
3977
4026
|
HostEvent["GetTabs"] = "getTabs";
|
|
@@ -3994,6 +4043,9 @@ var HostEvent;
|
|
|
3994
4043
|
* console.log('groups', groupDetails);
|
|
3995
4044
|
* });
|
|
3996
4045
|
* ```
|
|
4046
|
+
* @returns orderedGroupIds - Group GUIDs in the order they appear.
|
|
4047
|
+
* @returns numberOfGroups - Total number of groups on the Liveboard.
|
|
4048
|
+
* @returns Groups - Group details, each with at least `id` and `name`.
|
|
3997
4049
|
* @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
3998
4050
|
*/
|
|
3999
4051
|
HostEvent["GetGroups"] = "getGroups";
|
|
@@ -4068,6 +4120,9 @@ var HostEvent;
|
|
|
4068
4120
|
* // Alternative direct usage (not recommended)
|
|
4069
4121
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
4070
4122
|
* ```
|
|
4123
|
+
* @returns session - Session identifier for the Answer, for use with the
|
|
4124
|
+
* `AnswerService`.
|
|
4125
|
+
* @returns embedAnswerData - Data backing the Answer, when available.
|
|
4071
4126
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
4072
4127
|
*/
|
|
4073
4128
|
HostEvent["GetAnswerSession"] = "getAnswerSession";
|
|
@@ -4201,12 +4256,16 @@ var HostEvent;
|
|
|
4201
4256
|
* console.log('parameters', parameters);
|
|
4202
4257
|
* });
|
|
4203
4258
|
* ```
|
|
4259
|
+
* @returns parameters - Parameters currently applied on the Liveboard.
|
|
4204
4260
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4205
4261
|
*/
|
|
4206
4262
|
HostEvent["GetParameters"] = "GetParameters";
|
|
4207
4263
|
/**
|
|
4208
4264
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
4209
|
-
* This event is deprecated. Use {@link HostEvent.
|
|
4265
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4266
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4267
|
+
* called with an empty payload, and reports an error when a named view
|
|
4268
|
+
* cannot be found.
|
|
4210
4269
|
* ```js
|
|
4211
4270
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4212
4271
|
* ```
|
|
@@ -4224,10 +4283,15 @@ var HostEvent;
|
|
|
4224
4283
|
HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
|
|
4225
4284
|
/**
|
|
4226
4285
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
4286
|
+
* This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead,
|
|
4287
|
+
* which additionally accepts a `viewName`, resets to the original view when
|
|
4288
|
+
* called with an empty payload, and reports an error when a named view
|
|
4289
|
+
* cannot be found.
|
|
4227
4290
|
* ```js
|
|
4228
4291
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4229
4292
|
* ```
|
|
4230
4293
|
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4294
|
+
* @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl
|
|
4231
4295
|
*/
|
|
4232
4296
|
HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
|
|
4233
4297
|
/**
|
|
@@ -4330,6 +4394,10 @@ var HostEvent;
|
|
|
4330
4394
|
* description: "Generated from Spotter"
|
|
4331
4395
|
* }, ContextType.Spotter);
|
|
4332
4396
|
* ```
|
|
4397
|
+
* @returns answerId - GUID of the saved Answer.
|
|
4398
|
+
* @returns saveResponse - Raw response from the save operation.
|
|
4399
|
+
* @returns shareResponse - Raw response from the share operation, when the
|
|
4400
|
+
* Answer was also made discoverable.
|
|
4333
4401
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4334
4402
|
*/
|
|
4335
4403
|
HostEvent["SaveAnswer"] = "saveAnswer";
|
|
@@ -4811,6 +4879,7 @@ var Param;
|
|
|
4811
4879
|
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
4812
4880
|
Param["CurrencyFormat"] = "currencyFormat";
|
|
4813
4881
|
Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
|
|
4882
|
+
Param["IsLiveboardAlwaysOn12ColLayout"] = "isLiveboardAlwaysOn12ColLayout";
|
|
4814
4883
|
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
4815
4884
|
Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
|
|
4816
4885
|
Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
|
|
@@ -4834,6 +4903,7 @@ var Param;
|
|
|
4834
4903
|
Param["PrimaryAction"] = "primaryAction";
|
|
4835
4904
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
4836
4905
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
4906
|
+
Param["LiveboardGutter"] = "liveboardGutter";
|
|
4837
4907
|
Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
|
|
4838
4908
|
Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
|
|
4839
4909
|
Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
|
|
@@ -4869,14 +4939,17 @@ var Param;
|
|
|
4869
4939
|
Param["IsStarterPromptsEnabled"] = "enableStarterPrompts";
|
|
4870
4940
|
Param["UpdatedSpotterExperience"] = "updatedSpotterExperience";
|
|
4871
4941
|
Param["SpotterDataSources"] = "spotterDataSources";
|
|
4942
|
+
Param["AnalystId"] = "analystId";
|
|
4943
|
+
Param["OpenSpotterOnLiveboardByDefault"] = "openSpotterOnLiveboardByDefault";
|
|
4872
4944
|
})(Param || (Param = {}));
|
|
4873
4945
|
/**
|
|
4874
4946
|
* ThoughtSpot application pages include actions and menu commands
|
|
4875
4947
|
* for various user-initiated operations. These actions are represented
|
|
4876
4948
|
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
4877
|
-
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4878
|
-
* - hiddenActions — the action is completely removed from
|
|
4879
|
-
* - visibleActions — allowlist, only these actions
|
|
4949
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive
|
|
4950
|
+
* (user can see but not click). - hiddenActions — the action is completely removed from
|
|
4951
|
+
* the UI (user cannot see it at all). - visibleActions — allowlist, only these actions
|
|
4952
|
+
* are shown; all others are hidden.
|
|
4880
4953
|
*
|
|
4881
4954
|
* Use disabledActions to disable (gray out) an action.
|
|
4882
4955
|
* Use hiddenActions to hide (fully remove) an action.
|
|
@@ -4930,6 +5003,17 @@ var Action;
|
|
|
4930
5003
|
* ```
|
|
4931
5004
|
*/
|
|
4932
5005
|
Action["SaveAsView"] = "saveAsView";
|
|
5006
|
+
/**
|
|
5007
|
+
* The **EditInputTable** action on a Liveboard
|
|
5008
|
+
* page. Allows users to edit an input table used in an Answer directly from
|
|
5009
|
+
* a Liveboard.
|
|
5010
|
+
* @example
|
|
5011
|
+
* ```js
|
|
5012
|
+
* disabledActions: [Action.EditInputTable]
|
|
5013
|
+
* ```
|
|
5014
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
5015
|
+
*/
|
|
5016
|
+
Action["EditInputTable"] = "editInputTable";
|
|
4933
5017
|
/**
|
|
4934
5018
|
* The **Make a copy** action on a Liveboard or Answer
|
|
4935
5019
|
* page. Creates a copy of the Liveboard.
|
|
@@ -6247,6 +6331,10 @@ var Action;
|
|
|
6247
6331
|
* The **Add to Coaching** feature allows adding reference questions and
|
|
6248
6332
|
* business terms to improve Spotter’s responses. This feature is generally available
|
|
6249
6333
|
* (GA) from version 26.2.0.cl and enabled by default on embed deployments.
|
|
6334
|
+
*
|
|
6335
|
+
* This action governs both the answer-card **Add to memory** CTA and its
|
|
6336
|
+
* Spotter 3 successor, the response-footer **Remember this** CTA
|
|
6337
|
+
* (they are mutually exclusive).
|
|
6250
6338
|
* @example
|
|
6251
6339
|
* ```js
|
|
6252
6340
|
* hiddenAction: [Action.InConversationTraining]
|
|
@@ -6627,6 +6715,56 @@ var Action;
|
|
|
6627
6715
|
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
6628
6716
|
*/
|
|
6629
6717
|
Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
|
|
6718
|
+
/**
|
|
6719
|
+
* The **Basic Search** starter prompt pill.
|
|
6720
|
+
*
|
|
6721
|
+
* Starter prompt pills are the row of category buttons shown above the
|
|
6722
|
+
* Spotter chat input before a conversation starts. They give a new user
|
|
6723
|
+
* ready-made questions to click instead of typing one from scratch, and
|
|
6724
|
+
* disappear once the conversation begins. There are three, one per action
|
|
6725
|
+
* below.
|
|
6726
|
+
*
|
|
6727
|
+
* Clicking this pill opens a card of suggested simple questions; picking one
|
|
6728
|
+
* submits it to Spotter right away. Visible by default, and hidden along
|
|
6729
|
+
* with the other pills when the surface itself is off (see
|
|
6730
|
+
* {@link SpotterChatViewConfig.starterPrompts}).
|
|
6731
|
+
* @example
|
|
6732
|
+
* ```js
|
|
6733
|
+
* hiddenActions: [Action.QuickSearchPill]
|
|
6734
|
+
* ```
|
|
6735
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6736
|
+
*/
|
|
6737
|
+
Action["QuickSearchPill"] = "quickSearchPill";
|
|
6738
|
+
/**
|
|
6739
|
+
* The **Deep Analysis** starter prompt pill, next to
|
|
6740
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6741
|
+
*
|
|
6742
|
+
* Clicking it opens a card of suggested investigative questions ("why did
|
|
6743
|
+
* revenue drop?"). Picking one fills the chat input in Deep Analysis mode
|
|
6744
|
+
* rather than submitting immediately, so the user can edit it first.
|
|
6745
|
+
* Visible by default.
|
|
6746
|
+
* @example
|
|
6747
|
+
* ```js
|
|
6748
|
+
* hiddenActions: [Action.DeepAnalysisPill]
|
|
6749
|
+
* ```
|
|
6750
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6751
|
+
*/
|
|
6752
|
+
Action["DeepAnalysisPill"] = "deepAnalysisPill";
|
|
6753
|
+
/**
|
|
6754
|
+
* The **Data Literacy** starter prompt pill, next to
|
|
6755
|
+
* {@link Action.QuickSearchPill} above the Spotter chat input.
|
|
6756
|
+
*
|
|
6757
|
+
* Unlike the other two pills it opens no card: clicking it submits a prompt
|
|
6758
|
+
* that describes the data the model can answer over, helping a user who does
|
|
6759
|
+
* not yet know what is in the data source. The prompt text always comes from
|
|
6760
|
+
* ThoughtSpot, so only its label is customizable. Visible by default.
|
|
6761
|
+
* @example
|
|
6762
|
+
* ```js
|
|
6763
|
+
* hiddenActions: [Action.DataLiteracyPill]
|
|
6764
|
+
* ```
|
|
6765
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
6766
|
+
*/
|
|
6767
|
+
Action["DataLiteracyPill"] = "dataLiteracyPill";
|
|
6630
6768
|
/**
|
|
6631
6769
|
* The **Include current period** checkbox for date filters.
|
|
6632
6770
|
* Controls the visibility and availability of the option to include
|
|
@@ -6775,6 +6913,38 @@ var Action;
|
|
|
6775
6913
|
* ```
|
|
6776
6914
|
*/
|
|
6777
6915
|
Action["SpotterAnalystSidebar"] = "spotterAnalystSidebar";
|
|
6916
|
+
/**
|
|
6917
|
+
* Controls visibility and disable state of the analyst list
|
|
6918
|
+
* ("Show all") in the Spotter Analyst interface.
|
|
6919
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6920
|
+
* @example
|
|
6921
|
+
* ```js
|
|
6922
|
+
* hiddenActions: [Action.SpotterAnalystList]
|
|
6923
|
+
* disabledActions: [Action.SpotterAnalystList]
|
|
6924
|
+
* ```
|
|
6925
|
+
*/
|
|
6926
|
+
Action["SpotterAnalystList"] = "spotterAnalystList";
|
|
6927
|
+
/**
|
|
6928
|
+
* Controls visibility and disable state of the default Spotter analyst
|
|
6929
|
+
* entry in the Spotter Analyst interface.
|
|
6930
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6931
|
+
* @example
|
|
6932
|
+
* ```js
|
|
6933
|
+
* hiddenActions: [Action.SpotterDefaultAnalyst]
|
|
6934
|
+
* disabledActions: [Action.SpotterDefaultAnalyst]
|
|
6935
|
+
* ```
|
|
6936
|
+
*/
|
|
6937
|
+
Action["SpotterDefaultAnalyst"] = "spotterDefaultAnalyst";
|
|
6938
|
+
/**
|
|
6939
|
+
* The **Spotter** button in the Liveboard header.
|
|
6940
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
6941
|
+
* @example
|
|
6942
|
+
* ```js
|
|
6943
|
+
* hiddenActions: [Action.SpotterOnLiveboard]
|
|
6944
|
+
* disabledActions: [Action.SpotterOnLiveboard]
|
|
6945
|
+
* ```
|
|
6946
|
+
*/
|
|
6947
|
+
Action["SpotterOnLiveboard"] = "spotterOnLiveboard";
|
|
6778
6948
|
})(Action || (Action = {}));
|
|
6779
6949
|
var PrefetchFeatures;
|
|
6780
6950
|
(function (PrefetchFeatures) {
|
|
@@ -7242,7 +7412,7 @@ var TableContentDensity;
|
|
|
7242
7412
|
TableContentDensity["Compact"] = "COMPACT";
|
|
7243
7413
|
})(TableContentDensity || (TableContentDensity = {}));
|
|
7244
7414
|
|
|
7245
|
-
var version$1="1.51.
|
|
7415
|
+
var version$1="1.51.1";var pkg = {version:version$1};
|
|
7246
7416
|
|
|
7247
7417
|
const { version } = pkg;
|
|
7248
7418
|
|
|
@@ -9822,7 +9992,7 @@ class AnswerService {
|
|
|
9822
9992
|
async getTML() {
|
|
9823
9993
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9824
9994
|
const edoc = object[0].edoc;
|
|
9825
|
-
const YAML = await import('./index-
|
|
9995
|
+
const YAML = await import('./index-DxLfQxoT.js');
|
|
9826
9996
|
const parsedDoc = YAML.parse(edoc);
|
|
9827
9997
|
return {
|
|
9828
9998
|
answer: {
|
|
@@ -12771,7 +12941,8 @@ const URL_MAX_LENGTH = 2000;
|
|
|
12771
12941
|
* The default CSS dimensions of the embedded app
|
|
12772
12942
|
*/
|
|
12773
12943
|
const DEFAULT_EMBED_WIDTH = '100%';
|
|
12774
|
-
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12944
|
+
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12945
|
+
const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
|
|
12775
12946
|
|
|
12776
12947
|
var Config = {
|
|
12777
12948
|
DEBUG: false,
|
|
@@ -20306,7 +20477,7 @@ const getIsInitCalled = () => { var _a; return !!((_a = getValueFromWindow(initF
|
|
|
20306
20477
|
/**
|
|
20307
20478
|
* Initializes the Visual Embed SDK globally and perform
|
|
20308
20479
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
20309
|
-
* component like Liveboard etc can be embedded. But need not wait for
|
|
20480
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
20310
20481
|
* to actually embed. That is handled internally.
|
|
20311
20482
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
20312
20483
|
* authentication mechanism and so on.
|
|
@@ -21133,7 +21304,7 @@ class TsEmbed {
|
|
|
21133
21304
|
*/
|
|
21134
21305
|
this.shouldEncodeUrlQueryParams = false;
|
|
21135
21306
|
this.defaultHiddenActions = [Action.ReportError];
|
|
21136
|
-
this.preRenderContainerEl =
|
|
21307
|
+
this.preRenderContainerEl = document.body;
|
|
21137
21308
|
this.containerScrollListener = null;
|
|
21138
21309
|
/**
|
|
21139
21310
|
* Handler for fullscreen change events
|
|
@@ -21821,11 +21992,27 @@ class TsEmbed {
|
|
|
21821
21992
|
iFrame.name = 'ThoughtSpot Embedded Analytics';
|
|
21822
21993
|
return iFrame;
|
|
21823
21994
|
}
|
|
21995
|
+
/**
|
|
21996
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
21997
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
21998
|
+
* backward compatibility.
|
|
21999
|
+
*/
|
|
22000
|
+
getPreRenderConfig() {
|
|
22001
|
+
var _a, _b, _c, _d;
|
|
22002
|
+
const viewCfg = this.viewConfig;
|
|
22003
|
+
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22004
|
+
return {
|
|
22005
|
+
...preRenderCfg,
|
|
22006
|
+
preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22007
|
+
preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22008
|
+
doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22009
|
+
};
|
|
22010
|
+
}
|
|
21824
22011
|
/**
|
|
21825
22012
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
21826
22013
|
*/
|
|
21827
22014
|
isPreRenderEmbed() {
|
|
21828
|
-
return !!this.
|
|
22015
|
+
return !!this.getPreRenderConfig().preRenderId;
|
|
21829
22016
|
}
|
|
21830
22017
|
handleInsertionIntoDOM(child) {
|
|
21831
22018
|
if (this.isPreRenderEmbed()) {
|
|
@@ -21961,6 +22148,7 @@ class TsEmbed {
|
|
|
21961
22148
|
this.setIframeElement(this.preRenderChild);
|
|
21962
22149
|
}
|
|
21963
22150
|
this.isRendered = true;
|
|
22151
|
+
this.inheritPreRenderContainer();
|
|
21964
22152
|
}
|
|
21965
22153
|
return this.isPreRenderConnected();
|
|
21966
22154
|
}
|
|
@@ -22011,7 +22199,7 @@ class TsEmbed {
|
|
|
22011
22199
|
*/
|
|
22012
22200
|
resolvePreRenderContainerTarget() {
|
|
22013
22201
|
var _a;
|
|
22014
|
-
const containerConfig = this.
|
|
22202
|
+
const containerConfig = this.getPreRenderConfig().preRenderContainer;
|
|
22015
22203
|
let container = null;
|
|
22016
22204
|
if (typeof containerConfig === 'string') {
|
|
22017
22205
|
try {
|
|
@@ -22029,15 +22217,35 @@ class TsEmbed {
|
|
|
22029
22217
|
}
|
|
22030
22218
|
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
22031
22219
|
}
|
|
22220
|
+
inheritPreRenderContainer() {
|
|
22221
|
+
var _a;
|
|
22222
|
+
const preRenderedObject = this.getPreRenderObj();
|
|
22223
|
+
if (!preRenderedObject || preRenderedObject === this) {
|
|
22224
|
+
return;
|
|
22225
|
+
}
|
|
22226
|
+
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22227
|
+
if (this.getPreRenderConfig().preRenderContainer
|
|
22228
|
+
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22229
|
+
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22230
|
+
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
22231
|
+
}
|
|
22232
|
+
this.preRenderContainerEl = ownerContainer;
|
|
22233
|
+
this.applyPreRenderContainerPositioning();
|
|
22234
|
+
}
|
|
22235
|
+
getCustomPreRenderContainer() {
|
|
22236
|
+
const container = this.preRenderContainerEl;
|
|
22237
|
+
return container && container !== document.body ? container : null;
|
|
22238
|
+
}
|
|
22032
22239
|
/**
|
|
22033
|
-
* Makes the container a positioning context for the absolutely
|
|
22034
|
-
* wrapper, stashing the original inline `position` on the element
|
|
22035
|
-
* destroy() can restore it exactly, leaving no trace. Recording it
|
|
22036
|
-
* element rather than per-instance lets the override be reverted even
|
|
22037
|
-
* embeds share the same container.
|
|
22240
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
22241
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
22242
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
22243
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
22244
|
+
* when embeds share the same container.
|
|
22038
22245
|
*/
|
|
22039
|
-
applyPreRenderContainerPositioning(
|
|
22040
|
-
|
|
22246
|
+
applyPreRenderContainerPositioning() {
|
|
22247
|
+
const container = this.getCustomPreRenderContainer();
|
|
22248
|
+
if (!container) {
|
|
22041
22249
|
return;
|
|
22042
22250
|
}
|
|
22043
22251
|
const pos = window.getComputedStyle(container).position;
|
|
@@ -22080,11 +22288,11 @@ class TsEmbed {
|
|
|
22080
22288
|
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
22081
22289
|
}
|
|
22082
22290
|
}
|
|
22083
|
-
this.
|
|
22291
|
+
this.preRenderContainerEl = resolved;
|
|
22292
|
+
this.applyPreRenderContainerPositioning();
|
|
22084
22293
|
if (wrapper.parentNode !== resolved) {
|
|
22085
22294
|
resolved.appendChild(wrapper);
|
|
22086
22295
|
}
|
|
22087
|
-
this.preRenderContainerEl = resolved;
|
|
22088
22296
|
}
|
|
22089
22297
|
insertIntoDOMForPreRender(child) {
|
|
22090
22298
|
const preRenderChild = this.createPreRenderChild(child);
|
|
@@ -22107,7 +22315,7 @@ class TsEmbed {
|
|
|
22107
22315
|
}
|
|
22108
22316
|
const targetContainer = this.resolvePreRenderContainerTarget();
|
|
22109
22317
|
this.preRenderContainerEl = targetContainer;
|
|
22110
|
-
this.applyPreRenderContainerPositioning(
|
|
22318
|
+
this.applyPreRenderContainerPositioning();
|
|
22111
22319
|
targetContainer.appendChild(preRenderWrapper);
|
|
22112
22320
|
}
|
|
22113
22321
|
insertIntoDOM(child) {
|
|
@@ -22513,7 +22721,7 @@ class TsEmbed {
|
|
|
22513
22721
|
showPreRenderByDefault,
|
|
22514
22722
|
replaceExistingPreRender,
|
|
22515
22723
|
});
|
|
22516
|
-
if (!this.
|
|
22724
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22517
22725
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22518
22726
|
return this;
|
|
22519
22727
|
}
|
|
@@ -22569,7 +22777,7 @@ class TsEmbed {
|
|
|
22569
22777
|
}
|
|
22570
22778
|
// Drop our reference up front so a destroyed embed never pins a
|
|
22571
22779
|
// detached container in memory; restoration uses the local handle.
|
|
22572
|
-
this.preRenderContainerEl =
|
|
22780
|
+
this.preRenderContainerEl = document.body;
|
|
22573
22781
|
const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
22574
22782
|
if (originalPosition === undefined) {
|
|
22575
22783
|
// We never overrode this container's position; nothing to restore.
|
|
@@ -22592,9 +22800,7 @@ class TsEmbed {
|
|
|
22592
22800
|
if (!this.containerScrollListener) {
|
|
22593
22801
|
return;
|
|
22594
22802
|
}
|
|
22595
|
-
const customContainer = this.
|
|
22596
|
-
? this.preRenderContainerEl
|
|
22597
|
-
: null;
|
|
22803
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22598
22804
|
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
22599
22805
|
this.containerScrollListener = null;
|
|
22600
22806
|
}
|
|
@@ -22691,12 +22897,12 @@ class TsEmbed {
|
|
|
22691
22897
|
async showPreRender() {
|
|
22692
22898
|
var _a, _b;
|
|
22693
22899
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22694
|
-
preRenderId: this.
|
|
22900
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22695
22901
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22696
22902
|
});
|
|
22697
22903
|
if (this.shouldWaitForRenderPromise)
|
|
22698
22904
|
await this.isReadyForRenderPromise;
|
|
22699
|
-
if (!this.
|
|
22905
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22700
22906
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22701
22907
|
return this;
|
|
22702
22908
|
}
|
|
@@ -22727,14 +22933,12 @@ class TsEmbed {
|
|
|
22727
22933
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
22728
22934
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
22729
22935
|
this.syncPreRenderStyle();
|
|
22730
|
-
const customContainer = this.
|
|
22731
|
-
? this.preRenderContainerEl
|
|
22732
|
-
: null;
|
|
22936
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22733
22937
|
if (customContainer && !this.containerScrollListener) {
|
|
22734
22938
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22735
22939
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22736
22940
|
}
|
|
22737
|
-
if (!this.
|
|
22941
|
+
if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
|
|
22738
22942
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22739
22943
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22740
22944
|
entries.forEach((entry) => {
|
|
@@ -22776,13 +22980,15 @@ class TsEmbed {
|
|
|
22776
22980
|
logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
22777
22981
|
return;
|
|
22778
22982
|
}
|
|
22983
|
+
if (!this.getPreRenderPlaceHolderElement().isConnected) {
|
|
22984
|
+
logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
|
|
22985
|
+
return;
|
|
22986
|
+
}
|
|
22779
22987
|
// Self-heal if the resolved container was remounted/detached, so we
|
|
22780
22988
|
// never measure a stale node (which would collapse the wrapper).
|
|
22781
22989
|
this.reconcilePreRenderContainer();
|
|
22782
22990
|
const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
|
|
22783
|
-
const containerEl = this.
|
|
22784
|
-
? this.preRenderContainerEl
|
|
22785
|
-
: null;
|
|
22991
|
+
const containerEl = this.getCustomPreRenderContainer();
|
|
22786
22992
|
const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
|
|
22787
22993
|
const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
|
|
22788
22994
|
const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
|
|
@@ -22800,7 +23006,7 @@ class TsEmbed {
|
|
|
22800
23006
|
*/
|
|
22801
23007
|
hidePreRender() {
|
|
22802
23008
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
22803
|
-
preRenderId: this.
|
|
23009
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22804
23010
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22805
23011
|
});
|
|
22806
23012
|
logger$3.debug('HidePreRender Called');
|
|
@@ -22809,10 +23015,11 @@ class TsEmbed {
|
|
|
22809
23015
|
logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
|
|
22810
23016
|
return;
|
|
22811
23017
|
}
|
|
23018
|
+
const { zIndex } = this.getPreRenderConfig();
|
|
22812
23019
|
const preRenderHideStyles = {
|
|
22813
23020
|
opacity: '0',
|
|
22814
23021
|
pointerEvents: 'none',
|
|
22815
|
-
zIndex: '-1000',
|
|
23022
|
+
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
22816
23023
|
position: 'absolute',
|
|
22817
23024
|
top: '0',
|
|
22818
23025
|
left: '0',
|
|
@@ -22837,10 +23044,11 @@ class TsEmbed {
|
|
|
22837
23044
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
22838
23045
|
*/
|
|
22839
23046
|
getPreRenderIds() {
|
|
23047
|
+
const preRenderId = this.getPreRenderConfig().preRenderId;
|
|
22840
23048
|
return {
|
|
22841
|
-
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${
|
|
22842
|
-
child: `tsEmbed-pre-render-child-${
|
|
22843
|
-
placeHolder: `tsEmbed-pre-render-placeholder-${
|
|
23049
|
+
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23050
|
+
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
23051
|
+
placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
|
|
22844
23052
|
};
|
|
22845
23053
|
}
|
|
22846
23054
|
/**
|
|
@@ -23294,6 +23502,19 @@ function buildSpotterShareConversationAppInitData(initData, viewConfig) {
|
|
|
23294
23502
|
spotterShareConversationConfig,
|
|
23295
23503
|
},
|
|
23296
23504
|
};
|
|
23505
|
+
}
|
|
23506
|
+
function buildStarterPromptsAppInitData(initData, viewConfig) {
|
|
23507
|
+
var _a;
|
|
23508
|
+
const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
|
|
23509
|
+
if (!starterPrompts)
|
|
23510
|
+
return initData;
|
|
23511
|
+
return {
|
|
23512
|
+
...initData,
|
|
23513
|
+
embedParams: {
|
|
23514
|
+
...(initData.embedParams || {}),
|
|
23515
|
+
starterPrompts,
|
|
23516
|
+
},
|
|
23517
|
+
};
|
|
23297
23518
|
}
|
|
23298
23519
|
|
|
23299
23520
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
@@ -23359,6 +23580,10 @@ var Page;
|
|
|
23359
23580
|
* Collections listing page
|
|
23360
23581
|
*/
|
|
23361
23582
|
Page["Collections"] = "collections";
|
|
23583
|
+
/**
|
|
23584
|
+
* Liveboard schedules listing page
|
|
23585
|
+
*/
|
|
23586
|
+
Page["LiveboardSchedules"] = "liveboard-schedules";
|
|
23362
23587
|
})(Page || (Page = {}));
|
|
23363
23588
|
/**
|
|
23364
23589
|
* Define the initial state of column custom group accordions
|
|
@@ -23504,6 +23729,15 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23504
23729
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
23505
23730
|
};
|
|
23506
23731
|
if (this.viewConfig.fullHeight === true) {
|
|
23732
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
23733
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
23734
|
+
}
|
|
23735
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
23736
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
23737
|
+
}
|
|
23738
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
23739
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
23740
|
+
}
|
|
23507
23741
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23508
23742
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23509
23743
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23526,7 +23760,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23526
23760
|
const defaultAppInitData = await super.getAppInitData();
|
|
23527
23761
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23528
23762
|
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
23529
|
-
|
|
23763
|
+
const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
23764
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
23530
23765
|
}
|
|
23531
23766
|
/**
|
|
23532
23767
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -23537,7 +23772,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23537
23772
|
return getQueryParamString(params, true);
|
|
23538
23773
|
}
|
|
23539
23774
|
getEmbedParamsObject() {
|
|
23540
|
-
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 = 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;
|
|
23775
|
+
const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, newConnectionsExperience, fullHeight, dataPanelV2 = true, updatedSpotterExperience, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled, newChartsLibrary, hideHomepageLeftNav = false, modularHomeExperience, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, isLiveboardAlwaysOn12ColLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.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;
|
|
23541
23776
|
let params = {};
|
|
23542
23777
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
23543
23778
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -23591,7 +23826,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23591
23826
|
}
|
|
23592
23827
|
// Handle spotterChatConfig params
|
|
23593
23828
|
if (spotterChatConfig) {
|
|
23594
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
23829
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23595
23830
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23596
23831
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23597
23832
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23600,6 +23835,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23600
23835
|
if (enableStarterPrompts !== undefined) {
|
|
23601
23836
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23602
23837
|
}
|
|
23838
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
23839
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
23840
|
+
}
|
|
23603
23841
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23604
23842
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23605
23843
|
}
|
|
@@ -23643,6 +23881,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23643
23881
|
if (enable2ColumnLayout !== undefined) {
|
|
23644
23882
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23645
23883
|
}
|
|
23884
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
23885
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
23886
|
+
}
|
|
23646
23887
|
if (enableAskSage) {
|
|
23647
23888
|
params[Param.enableAskSage] = enableAskSage;
|
|
23648
23889
|
}
|
|
@@ -23655,6 +23896,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23655
23896
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23656
23897
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23657
23898
|
}
|
|
23899
|
+
if (liveboardGutter !== undefined) {
|
|
23900
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
23901
|
+
}
|
|
23658
23902
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23659
23903
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23660
23904
|
}
|
|
@@ -23765,6 +24009,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23765
24009
|
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
23766
24010
|
case Page.Collections:
|
|
23767
24011
|
return 'collections';
|
|
24012
|
+
case Page.LiveboardSchedules:
|
|
24013
|
+
return 'home/liveboard-schedules';
|
|
23768
24014
|
case Page.Home:
|
|
23769
24015
|
default:
|
|
23770
24016
|
return 'home';
|
|
@@ -24050,6 +24296,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24050
24296
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
24051
24297
|
'Using full height with vizId might lead to unexpected behavior.');
|
|
24052
24298
|
}
|
|
24299
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
24300
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
24301
|
+
}
|
|
24302
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
24303
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
24304
|
+
}
|
|
24305
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
24306
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
24307
|
+
}
|
|
24053
24308
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
24054
24309
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
24055
24310
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -24058,7 +24313,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24058
24313
|
}
|
|
24059
24314
|
async getAppInitData() {
|
|
24060
24315
|
const defaultAppInitData = await super.getAppInitData();
|
|
24061
|
-
|
|
24316
|
+
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
24317
|
+
return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
24062
24318
|
}
|
|
24063
24319
|
/**
|
|
24064
24320
|
* Construct a map of params to be passed on to the
|
|
@@ -24072,7 +24328,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24072
24328
|
getEmbedParamsObject() {
|
|
24073
24329
|
let params = {};
|
|
24074
24330
|
params = this.getBaseQueryParams(params);
|
|
24075
|
-
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;
|
|
24331
|
+
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;
|
|
24076
24332
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
24077
24333
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
24078
24334
|
if (fullHeight === true) {
|
|
@@ -24113,6 +24369,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24113
24369
|
if (enable2ColumnLayout !== undefined) {
|
|
24114
24370
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
24115
24371
|
}
|
|
24372
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
24373
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
24374
|
+
}
|
|
24116
24375
|
if (hideTabPanel) {
|
|
24117
24376
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
24118
24377
|
}
|
|
@@ -24140,6 +24399,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24140
24399
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
24141
24400
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
24142
24401
|
}
|
|
24402
|
+
if (liveboardGutter !== undefined) {
|
|
24403
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
24404
|
+
}
|
|
24143
24405
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
24144
24406
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
24145
24407
|
}
|
|
@@ -24157,7 +24419,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24157
24419
|
}
|
|
24158
24420
|
// Handle spotterChatConfig params
|
|
24159
24421
|
if (spotterChatConfig) {
|
|
24160
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
24422
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
24161
24423
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
24162
24424
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
24163
24425
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -24166,6 +24428,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24166
24428
|
if (enableStarterPrompts !== undefined) {
|
|
24167
24429
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
24168
24430
|
}
|
|
24431
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
24432
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
24433
|
+
}
|
|
24169
24434
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
24170
24435
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
24171
24436
|
}
|
|
@@ -24411,7 +24676,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24411
24676
|
if (this.isRendered) {
|
|
24412
24677
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
24413
24678
|
}
|
|
24414
|
-
else if (this.
|
|
24679
|
+
else if (this.getPreRenderConfig().preRenderId) {
|
|
24415
24680
|
this.preRender(true);
|
|
24416
24681
|
}
|
|
24417
24682
|
else {
|
|
@@ -25002,10 +25267,11 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
25002
25267
|
async getAppInitData() {
|
|
25003
25268
|
const defaultAppInitData = await super.getAppInitData();
|
|
25004
25269
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
25005
|
-
|
|
25270
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
25271
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
25006
25272
|
}
|
|
25007
25273
|
getEmbedParamsObject() {
|
|
25008
|
-
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
25274
|
+
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
|
|
25009
25275
|
const queryParams = this.getBaseQueryParams();
|
|
25010
25276
|
queryParams[Param.SpotterEnabled] = true;
|
|
25011
25277
|
// Boolean params
|
|
@@ -25018,6 +25284,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
25018
25284
|
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
25019
25285
|
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
25020
25286
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
25287
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
|
|
25021
25288
|
// Handle spotterChatConfig params
|
|
25022
25289
|
if (spotterChatConfig) {
|
|
25023
25290
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
@@ -25109,15 +25376,17 @@ const componentFactory = (EmbedConstructor,
|
|
|
25109
25376
|
// not be destroyed when the component is unmounted.
|
|
25110
25377
|
isPreRenderedComponent = false) => {
|
|
25111
25378
|
const Component = React__default.forwardRef((props, forwardedRef) => {
|
|
25379
|
+
var _a, _b;
|
|
25112
25380
|
const ref = React__default.useRef(null);
|
|
25113
25381
|
const { className, style, ...embedProps } = props;
|
|
25114
25382
|
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
25383
|
+
const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.preRenderId) !== null && _b !== void 0 ? _b : props.preRenderId;
|
|
25115
25384
|
const handleDestroy = (tsEmbed) => {
|
|
25116
25385
|
// do not destroy if it is a preRender component
|
|
25117
25386
|
if (isPreRenderedComponent)
|
|
25118
25387
|
return;
|
|
25119
25388
|
// if component is connected to a preRendered component
|
|
25120
|
-
if (
|
|
25389
|
+
if (preRenderId) {
|
|
25121
25390
|
tsEmbed.hidePreRender();
|
|
25122
25391
|
return;
|
|
25123
25392
|
}
|
|
@@ -25128,7 +25397,7 @@ isPreRenderedComponent = false) => {
|
|
|
25128
25397
|
};
|
|
25129
25398
|
const handleDefaultRendering = (tsEmbed) => {
|
|
25130
25399
|
// if component is connected to a preRendered component
|
|
25131
|
-
if (
|
|
25400
|
+
if (preRenderId) {
|
|
25132
25401
|
tsEmbed.showPreRender();
|
|
25133
25402
|
return;
|
|
25134
25403
|
}
|
|
@@ -25377,7 +25646,7 @@ const PreRenderedConversationEmbed = componentFactory(SpotterEmbed$1, true);
|
|
|
25377
25646
|
* const ref = useEmbedRef();
|
|
25378
25647
|
* useEffect(() => {
|
|
25379
25648
|
* ref.current.trigger(
|
|
25380
|
-
*
|
|
25649
|
+
* HostEvent.UpdateRuntimeFilters,
|
|
25381
25650
|
* [{ columnName: 'name', operator: 'EQ', values: ['value']}]);
|
|
25382
25651
|
* }, [])
|
|
25383
25652
|
* return <LiveboardEmbed ref={ref} liveboardId={<id>} />
|