@thoughtspot/visual-embed-sdk 1.51.0 → 1.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/config.d.ts +1 -0
- package/cjs/src/config.d.ts.map +1 -1
- package/cjs/src/config.js +2 -1
- package/cjs/src/config.js.map +1 -1
- package/cjs/src/css-variables.d.ts +27 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +43 -12
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +29 -3
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +253 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.js +1 -1
- package/cjs/src/embed/conversation.d.ts +171 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +125 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +3 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/host-events.spec.js +36 -0
- package/cjs/src/embed/host-events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +18 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +40 -13
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +25 -4
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +349 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.spec.js +28 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +15 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +68 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.d.ts +9 -10
- package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +97 -9
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +76 -35
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +537 -3
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +3 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +3 -2
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/cjs/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/cjs/src/react/all-types-export.parity.spec.js +194 -0
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -0
- package/cjs/src/react/index.d.ts +66 -32
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +5 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +101 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +330 -18
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +182 -12
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +5 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +19 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +37 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-aBzH5ZwF.js → index-D8_Zs-Nr.js} +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +27 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +43 -12
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/conversation.d.ts +171 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +40 -13
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/spotter-viz-utils.d.ts +9 -10
- package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +97 -9
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/dist/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +66 -32
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +330 -18
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +5 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +354 -64
- package/dist/tsembed-react.js +353 -63
- package/dist/tsembed.es.js +414 -126
- package/dist/tsembed.js +416 -128
- package/dist/visual-embed-sdk-react-full.d.ts +777 -90
- package/dist/visual-embed-sdk-react.d.ts +773 -89
- package/dist/visual-embed-sdk.d.ts +713 -60
- package/lib/package.json +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +1 -0
- package/lib/src/config.js.map +1 -1
- package/lib/src/css-variables.d.ts +27 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +43 -12
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +30 -4
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +253 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/conversation.d.ts +171 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +125 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +3 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/host-events.spec.js +36 -0
- package/lib/src/embed/host-events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +18 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +40 -13
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +25 -4
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +349 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.spec.js +28 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +13 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +69 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/spotter-viz-utils.d.ts +9 -10
- package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-viz-utils.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +97 -9
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +77 -36
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +537 -3
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.d.ts +2 -0
- package/lib/src/react/all-types-export.parity.spec.d.ts.map +1 -0
- package/lib/src/react/all-types-export.parity.spec.js +191 -0
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -0
- package/lib/src/react/index.d.ts +66 -32
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +5 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +102 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +330 -18
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +182 -12
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +5 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +17 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +38 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +713 -60
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/css-variables.ts +32 -0
- package/src/embed/app.spec.ts +335 -1
- package/src/embed/app.ts +71 -13
- package/src/embed/base.ts +1 -1
- package/src/embed/conversation.spec.ts +136 -0
- package/src/embed/conversation.ts +181 -3
- package/src/embed/events.spec.ts +4 -0
- package/src/embed/host-events.spec.ts +48 -0
- package/src/embed/hostEventClient/host-event-client.spec.ts +34 -0
- package/src/embed/hostEventClient/host-event-client.ts +2 -2
- package/src/embed/liveboard.spec.ts +457 -2
- package/src/embed/liveboard.ts +74 -15
- package/src/embed/search.spec.ts +31 -0
- package/src/embed/spotter-utils.spec.ts +72 -0
- package/src/embed/spotter-utils.ts +21 -1
- package/src/embed/spotter-viz-utils.ts +9 -10
- package/src/embed/ts-embed.spec.ts +699 -3
- package/src/embed/ts-embed.ts +91 -41
- package/src/index.ts +43 -2
- package/src/react/all-types-export.parity.spec.ts +208 -0
- package/src/react/all-types-export.ts +22 -0
- package/src/react/index.spec.tsx +158 -0
- package/src/react/index.tsx +70 -33
- package/src/types.ts +329 -16
- package/src/utils.spec.ts +49 -0
- package/src/utils.ts +16 -0
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.51.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.51.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
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.2";var pkg = {version:version$1};
|
|
7246
7416
|
|
|
7247
7417
|
const { version } = pkg;
|
|
7248
7418
|
|
|
@@ -7421,6 +7591,23 @@ const serializeParam = (value) => {
|
|
|
7421
7591
|
}
|
|
7422
7592
|
return JSON.stringify(value);
|
|
7423
7593
|
};
|
|
7594
|
+
/**
|
|
7595
|
+
* Inverse of serializeParam: JSON.parse with fallback to the raw string,
|
|
7596
|
+
* matching how the app parses the same values from the iframe URL.
|
|
7597
|
+
*/
|
|
7598
|
+
const deserializeParam = (value) => {
|
|
7599
|
+
if (typeof value !== 'string')
|
|
7600
|
+
return value;
|
|
7601
|
+
try {
|
|
7602
|
+
const parsed = JSON.parse(value);
|
|
7603
|
+
// Numeric strings stay strings ('123' !== 123), same as the app's
|
|
7604
|
+
// URL parser — param consumers expect string ids/versions.
|
|
7605
|
+
return typeof parsed === 'number' ? value : parsed;
|
|
7606
|
+
}
|
|
7607
|
+
catch (e) {
|
|
7608
|
+
return value;
|
|
7609
|
+
}
|
|
7610
|
+
};
|
|
7424
7611
|
/**
|
|
7425
7612
|
* Convert a value to a string:
|
|
7426
7613
|
* in case of an array, we convert it to CSV.
|
|
@@ -9822,7 +10009,7 @@ class AnswerService {
|
|
|
9822
10009
|
async getTML() {
|
|
9823
10010
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
9824
10011
|
const edoc = object[0].edoc;
|
|
9825
|
-
const YAML = await import('./index-
|
|
10012
|
+
const YAML = await import('./index-D8_Zs-Nr.js');
|
|
9826
10013
|
const parsedDoc = YAML.parse(edoc);
|
|
9827
10014
|
return {
|
|
9828
10015
|
answer: {
|
|
@@ -12771,7 +12958,8 @@ const URL_MAX_LENGTH = 2000;
|
|
|
12771
12958
|
* The default CSS dimensions of the embedded app
|
|
12772
12959
|
*/
|
|
12773
12960
|
const DEFAULT_EMBED_WIDTH = '100%';
|
|
12774
|
-
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12961
|
+
const DEFAULT_EMBED_HEIGHT = '100%';
|
|
12962
|
+
const DEFAULT_LAZY_LOADING_MARGIN = '500px 0px';
|
|
12775
12963
|
|
|
12776
12964
|
var Config = {
|
|
12777
12965
|
DEBUG: false,
|
|
@@ -20306,7 +20494,7 @@ const getIsInitCalled = () => { var _a; return !!((_a = getValueFromWindow(initF
|
|
|
20306
20494
|
/**
|
|
20307
20495
|
* Initializes the Visual Embed SDK globally and perform
|
|
20308
20496
|
* 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
|
|
20497
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS
|
|
20310
20498
|
* to actually embed. That is handled internally.
|
|
20311
20499
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
20312
20500
|
* authentication mechanism and so on.
|
|
@@ -21133,7 +21321,7 @@ class TsEmbed {
|
|
|
21133
21321
|
*/
|
|
21134
21322
|
this.shouldEncodeUrlQueryParams = false;
|
|
21135
21323
|
this.defaultHiddenActions = [Action.ReportError];
|
|
21136
|
-
this.preRenderContainerEl =
|
|
21324
|
+
this.preRenderContainerEl = document.body;
|
|
21137
21325
|
this.containerScrollListener = null;
|
|
21138
21326
|
/**
|
|
21139
21327
|
* Handler for fullscreen change events
|
|
@@ -21611,10 +21799,14 @@ class TsEmbed {
|
|
|
21611
21799
|
return `${basePath}#`;
|
|
21612
21800
|
}
|
|
21613
21801
|
async getUpdateEmbedParamsObject() {
|
|
21614
|
-
|
|
21802
|
+
const queryParams = this.getEmbedParamsObject();
|
|
21803
|
+
// Values are URL-serialized (e.g. dataSources as '["guid"]'); parse
|
|
21804
|
+
// them back so the event payload matches a URL load (SCAL-334713).
|
|
21805
|
+
Object.keys(queryParams).forEach((key) => {
|
|
21806
|
+
queryParams[key] = deserializeParam(queryParams[key]);
|
|
21807
|
+
});
|
|
21615
21808
|
const appInitData = await this.getAppInitData();
|
|
21616
|
-
|
|
21617
|
-
return queryParams;
|
|
21809
|
+
return { ...this.viewConfig, ...queryParams, ...appInitData };
|
|
21618
21810
|
}
|
|
21619
21811
|
/**
|
|
21620
21812
|
* Common query params set for all the embed modes.
|
|
@@ -21821,11 +22013,27 @@ class TsEmbed {
|
|
|
21821
22013
|
iFrame.name = 'ThoughtSpot Embedded Analytics';
|
|
21822
22014
|
return iFrame;
|
|
21823
22015
|
}
|
|
22016
|
+
/**
|
|
22017
|
+
* Returns a merged {@link PreRenderConfig} object where each shared key
|
|
22018
|
+
* prefers `preRenderConfig.key` over the top-level `viewConfig.key` for
|
|
22019
|
+
* backward compatibility.
|
|
22020
|
+
*/
|
|
22021
|
+
getPreRenderConfig() {
|
|
22022
|
+
var _a, _b, _c, _d;
|
|
22023
|
+
const viewCfg = this.viewConfig;
|
|
22024
|
+
const preRenderCfg = (_a = viewCfg.preRenderConfig) !== null && _a !== void 0 ? _a : {};
|
|
22025
|
+
return {
|
|
22026
|
+
...preRenderCfg,
|
|
22027
|
+
preRenderId: (_b = preRenderCfg.preRenderId) !== null && _b !== void 0 ? _b : viewCfg.preRenderId,
|
|
22028
|
+
preRenderContainer: (_c = preRenderCfg.preRenderContainer) !== null && _c !== void 0 ? _c : viewCfg.preRenderContainer,
|
|
22029
|
+
doNotTrackPreRenderSize: (_d = preRenderCfg.doNotTrackPreRenderSize) !== null && _d !== void 0 ? _d : viewCfg.doNotTrackPreRenderSize,
|
|
22030
|
+
};
|
|
22031
|
+
}
|
|
21824
22032
|
/**
|
|
21825
22033
|
* Returns true if this embed instance is configured for pre-rendering.
|
|
21826
22034
|
*/
|
|
21827
22035
|
isPreRenderEmbed() {
|
|
21828
|
-
return !!this.
|
|
22036
|
+
return !!this.getPreRenderConfig().preRenderId;
|
|
21829
22037
|
}
|
|
21830
22038
|
handleInsertionIntoDOM(child) {
|
|
21831
22039
|
if (this.isPreRenderEmbed()) {
|
|
@@ -21961,6 +22169,7 @@ class TsEmbed {
|
|
|
21961
22169
|
this.setIframeElement(this.preRenderChild);
|
|
21962
22170
|
}
|
|
21963
22171
|
this.isRendered = true;
|
|
22172
|
+
this.inheritPreRenderContainer();
|
|
21964
22173
|
}
|
|
21965
22174
|
return this.isPreRenderConnected();
|
|
21966
22175
|
}
|
|
@@ -22011,7 +22220,7 @@ class TsEmbed {
|
|
|
22011
22220
|
*/
|
|
22012
22221
|
resolvePreRenderContainerTarget() {
|
|
22013
22222
|
var _a;
|
|
22014
|
-
const containerConfig = this.
|
|
22223
|
+
const containerConfig = this.getPreRenderConfig().preRenderContainer;
|
|
22015
22224
|
let container = null;
|
|
22016
22225
|
if (typeof containerConfig === 'string') {
|
|
22017
22226
|
try {
|
|
@@ -22029,15 +22238,35 @@ class TsEmbed {
|
|
|
22029
22238
|
}
|
|
22030
22239
|
return (_a = container) !== null && _a !== void 0 ? _a : document.body;
|
|
22031
22240
|
}
|
|
22241
|
+
inheritPreRenderContainer() {
|
|
22242
|
+
var _a;
|
|
22243
|
+
const preRenderedObject = this.getPreRenderObj();
|
|
22244
|
+
if (!preRenderedObject || preRenderedObject === this) {
|
|
22245
|
+
return;
|
|
22246
|
+
}
|
|
22247
|
+
const ownerContainer = (_a = preRenderedObject.preRenderContainerEl) !== null && _a !== void 0 ? _a : document.body;
|
|
22248
|
+
if (this.getPreRenderConfig().preRenderContainer
|
|
22249
|
+
&& this.resolvePreRenderContainerTarget() !== ownerContainer) {
|
|
22250
|
+
logger$3.warn('preRenderContainer is applied only by the component that creates the preRender; '
|
|
22251
|
+
+ 'the one passed here is ignored. Set it on the PreRender component instead.');
|
|
22252
|
+
}
|
|
22253
|
+
this.preRenderContainerEl = ownerContainer;
|
|
22254
|
+
this.applyPreRenderContainerPositioning();
|
|
22255
|
+
}
|
|
22256
|
+
getCustomPreRenderContainer() {
|
|
22257
|
+
const container = this.preRenderContainerEl;
|
|
22258
|
+
return container && container !== document.body ? container : null;
|
|
22259
|
+
}
|
|
22032
22260
|
/**
|
|
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.
|
|
22261
|
+
* Makes the resolved container a positioning context for the absolutely
|
|
22262
|
+
* positioned wrapper, stashing the original inline `position` on the element
|
|
22263
|
+
* (once) so destroy() can restore it exactly, leaving no trace. Recording it
|
|
22264
|
+
* on the element rather than per-instance lets the override be reverted even
|
|
22265
|
+
* when embeds share the same container.
|
|
22038
22266
|
*/
|
|
22039
|
-
applyPreRenderContainerPositioning(
|
|
22040
|
-
|
|
22267
|
+
applyPreRenderContainerPositioning() {
|
|
22268
|
+
const container = this.getCustomPreRenderContainer();
|
|
22269
|
+
if (!container) {
|
|
22041
22270
|
return;
|
|
22042
22271
|
}
|
|
22043
22272
|
const pos = window.getComputedStyle(container).position;
|
|
@@ -22080,11 +22309,11 @@ class TsEmbed {
|
|
|
22080
22309
|
resolved.addEventListener('scroll', this.containerScrollListener);
|
|
22081
22310
|
}
|
|
22082
22311
|
}
|
|
22083
|
-
this.
|
|
22312
|
+
this.preRenderContainerEl = resolved;
|
|
22313
|
+
this.applyPreRenderContainerPositioning();
|
|
22084
22314
|
if (wrapper.parentNode !== resolved) {
|
|
22085
22315
|
resolved.appendChild(wrapper);
|
|
22086
22316
|
}
|
|
22087
|
-
this.preRenderContainerEl = resolved;
|
|
22088
22317
|
}
|
|
22089
22318
|
insertIntoDOMForPreRender(child) {
|
|
22090
22319
|
const preRenderChild = this.createPreRenderChild(child);
|
|
@@ -22107,7 +22336,7 @@ class TsEmbed {
|
|
|
22107
22336
|
}
|
|
22108
22337
|
const targetContainer = this.resolvePreRenderContainerTarget();
|
|
22109
22338
|
this.preRenderContainerEl = targetContainer;
|
|
22110
|
-
this.applyPreRenderContainerPositioning(
|
|
22339
|
+
this.applyPreRenderContainerPositioning();
|
|
22111
22340
|
targetContainer.appendChild(preRenderWrapper);
|
|
22112
22341
|
}
|
|
22113
22342
|
insertIntoDOM(child) {
|
|
@@ -22513,7 +22742,7 @@ class TsEmbed {
|
|
|
22513
22742
|
showPreRenderByDefault,
|
|
22514
22743
|
replaceExistingPreRender,
|
|
22515
22744
|
});
|
|
22516
|
-
if (!this.
|
|
22745
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22517
22746
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22518
22747
|
return this;
|
|
22519
22748
|
}
|
|
@@ -22569,7 +22798,7 @@ class TsEmbed {
|
|
|
22569
22798
|
}
|
|
22570
22799
|
// Drop our reference up front so a destroyed embed never pins a
|
|
22571
22800
|
// detached container in memory; restoration uses the local handle.
|
|
22572
|
-
this.preRenderContainerEl =
|
|
22801
|
+
this.preRenderContainerEl = document.body;
|
|
22573
22802
|
const originalPosition = container.dataset[PRERENDER_CONTAINER_ORIGINAL_POSITION_KEY];
|
|
22574
22803
|
if (originalPosition === undefined) {
|
|
22575
22804
|
// We never overrode this container's position; nothing to restore.
|
|
@@ -22592,9 +22821,7 @@ class TsEmbed {
|
|
|
22592
22821
|
if (!this.containerScrollListener) {
|
|
22593
22822
|
return;
|
|
22594
22823
|
}
|
|
22595
|
-
const customContainer = this.
|
|
22596
|
-
? this.preRenderContainerEl
|
|
22597
|
-
: null;
|
|
22824
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22598
22825
|
customContainer === null || customContainer === void 0 ? void 0 : customContainer.removeEventListener('scroll', this.containerScrollListener);
|
|
22599
22826
|
this.containerScrollListener = null;
|
|
22600
22827
|
}
|
|
@@ -22691,12 +22918,12 @@ class TsEmbed {
|
|
|
22691
22918
|
async showPreRender() {
|
|
22692
22919
|
var _a, _b;
|
|
22693
22920
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_SHOW_PRE_RENDER, {
|
|
22694
|
-
preRenderId: this.
|
|
22921
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22695
22922
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22696
22923
|
});
|
|
22697
22924
|
if (this.shouldWaitForRenderPromise)
|
|
22698
22925
|
await this.isReadyForRenderPromise;
|
|
22699
|
-
if (!this.
|
|
22926
|
+
if (!this.getPreRenderConfig().preRenderId) {
|
|
22700
22927
|
logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
|
|
22701
22928
|
return this;
|
|
22702
22929
|
}
|
|
@@ -22727,14 +22954,12 @@ class TsEmbed {
|
|
|
22727
22954
|
(_a = this.hostElement.querySelector(`#${placeHolderId}`)) === null || _a === void 0 ? void 0 : _a.remove();
|
|
22728
22955
|
this.hostElement.appendChild(this.insertedDomEl);
|
|
22729
22956
|
this.syncPreRenderStyle();
|
|
22730
|
-
const customContainer = this.
|
|
22731
|
-
? this.preRenderContainerEl
|
|
22732
|
-
: null;
|
|
22957
|
+
const customContainer = this.getCustomPreRenderContainer();
|
|
22733
22958
|
if (customContainer && !this.containerScrollListener) {
|
|
22734
22959
|
this.containerScrollListener = () => this.syncPreRenderStyle();
|
|
22735
22960
|
customContainer.addEventListener('scroll', this.containerScrollListener);
|
|
22736
22961
|
}
|
|
22737
|
-
if (!this.
|
|
22962
|
+
if (!this.getPreRenderConfig().doNotTrackPreRenderSize) {
|
|
22738
22963
|
const observeTarget = (_b = this.insertedDomEl) !== null && _b !== void 0 ? _b : this.hostElement;
|
|
22739
22964
|
this.resizeObserver = new ResizeObserver((entries) => {
|
|
22740
22965
|
entries.forEach((entry) => {
|
|
@@ -22776,13 +23001,15 @@ class TsEmbed {
|
|
|
22776
23001
|
logger$3.error(ERROR_MESSAGE.SYNC_STYLE_CALLED_BEFORE_RENDER);
|
|
22777
23002
|
return;
|
|
22778
23003
|
}
|
|
23004
|
+
if (!this.getPreRenderPlaceHolderElement().isConnected) {
|
|
23005
|
+
logger$3.debug('syncPreRenderStyle skipped: placeholder is detached');
|
|
23006
|
+
return;
|
|
23007
|
+
}
|
|
22779
23008
|
// Self-heal if the resolved container was remounted/detached, so we
|
|
22780
23009
|
// never measure a stale node (which would collapse the wrapper).
|
|
22781
23010
|
this.reconcilePreRenderContainer();
|
|
22782
23011
|
const elBoundingClient = this.getPreRenderPlaceHolderElement().getBoundingClientRect();
|
|
22783
|
-
const containerEl = this.
|
|
22784
|
-
? this.preRenderContainerEl
|
|
22785
|
-
: null;
|
|
23012
|
+
const containerEl = this.getCustomPreRenderContainer();
|
|
22786
23013
|
const containerRect = (_a = containerEl === null || containerEl === void 0 ? void 0 : containerEl.getBoundingClientRect()) !== null && _a !== void 0 ? _a : { x: 0, y: 0 };
|
|
22787
23014
|
const scrollX = containerEl ? containerEl.scrollLeft : window.scrollX;
|
|
22788
23015
|
const scrollY = containerEl ? containerEl.scrollTop : window.scrollY;
|
|
@@ -22800,7 +23027,7 @@ class TsEmbed {
|
|
|
22800
23027
|
*/
|
|
22801
23028
|
hidePreRender() {
|
|
22802
23029
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_HIDE_PRE_RENDER, {
|
|
22803
|
-
preRenderId: this.
|
|
23030
|
+
preRenderId: this.getPreRenderConfig().preRenderId,
|
|
22804
23031
|
embedComponentType: this.viewConfig.embedComponentType,
|
|
22805
23032
|
});
|
|
22806
23033
|
logger$3.debug('HidePreRender Called');
|
|
@@ -22809,10 +23036,11 @@ class TsEmbed {
|
|
|
22809
23036
|
logger$3.warn('PreRender should be called before hiding it using hidePreRender.');
|
|
22810
23037
|
return;
|
|
22811
23038
|
}
|
|
23039
|
+
const { zIndex } = this.getPreRenderConfig();
|
|
22812
23040
|
const preRenderHideStyles = {
|
|
22813
23041
|
opacity: '0',
|
|
22814
23042
|
pointerEvents: 'none',
|
|
22815
|
-
zIndex: '-1000',
|
|
23043
|
+
zIndex: zIndex !== undefined ? String(zIndex) : '-1000',
|
|
22816
23044
|
position: 'absolute',
|
|
22817
23045
|
top: '0',
|
|
22818
23046
|
left: '0',
|
|
@@ -22837,10 +23065,11 @@ class TsEmbed {
|
|
|
22837
23065
|
* @property {string} child - The HTML element ID for the PreRender child.
|
|
22838
23066
|
*/
|
|
22839
23067
|
getPreRenderIds() {
|
|
23068
|
+
const preRenderId = this.getPreRenderConfig().preRenderId;
|
|
22840
23069
|
return {
|
|
22841
|
-
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${
|
|
22842
|
-
child: `tsEmbed-pre-render-child-${
|
|
22843
|
-
placeHolder: `tsEmbed-pre-render-placeholder-${
|
|
23070
|
+
wrapper: `${PRERENDER_WRAPPER_ID_PREFIX}${preRenderId}`,
|
|
23071
|
+
child: `tsEmbed-pre-render-child-${preRenderId}`,
|
|
23072
|
+
placeHolder: `tsEmbed-pre-render-placeholder-${preRenderId}`,
|
|
22844
23073
|
};
|
|
22845
23074
|
}
|
|
22846
23075
|
/**
|
|
@@ -23294,6 +23523,19 @@ function buildSpotterShareConversationAppInitData(initData, viewConfig) {
|
|
|
23294
23523
|
spotterShareConversationConfig,
|
|
23295
23524
|
},
|
|
23296
23525
|
};
|
|
23526
|
+
}
|
|
23527
|
+
function buildStarterPromptsAppInitData(initData, viewConfig) {
|
|
23528
|
+
var _a;
|
|
23529
|
+
const starterPrompts = (_a = viewConfig.spotterChatConfig) === null || _a === void 0 ? void 0 : _a.starterPrompts;
|
|
23530
|
+
if (!starterPrompts)
|
|
23531
|
+
return initData;
|
|
23532
|
+
return {
|
|
23533
|
+
...initData,
|
|
23534
|
+
embedParams: {
|
|
23535
|
+
...(initData.embedParams || {}),
|
|
23536
|
+
starterPrompts,
|
|
23537
|
+
},
|
|
23538
|
+
};
|
|
23297
23539
|
}
|
|
23298
23540
|
|
|
23299
23541
|
function buildSpotterVizAppInitData(initData, viewConfig) {
|
|
@@ -23359,6 +23601,10 @@ var Page;
|
|
|
23359
23601
|
* Collections listing page
|
|
23360
23602
|
*/
|
|
23361
23603
|
Page["Collections"] = "collections";
|
|
23604
|
+
/**
|
|
23605
|
+
* Liveboard schedules listing page
|
|
23606
|
+
*/
|
|
23607
|
+
Page["LiveboardSchedules"] = "liveboard-schedules";
|
|
23362
23608
|
})(Page || (Page = {}));
|
|
23363
23609
|
/**
|
|
23364
23610
|
* Define the initial state of column custom group accordions
|
|
@@ -23504,6 +23750,15 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23504
23750
|
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
23505
23751
|
};
|
|
23506
23752
|
if (this.viewConfig.fullHeight === true) {
|
|
23753
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
23754
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
23755
|
+
}
|
|
23756
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
23757
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
23758
|
+
}
|
|
23759
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
23760
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
23761
|
+
}
|
|
23507
23762
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
23508
23763
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
23509
23764
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -23526,7 +23781,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23526
23781
|
const defaultAppInitData = await super.getAppInitData();
|
|
23527
23782
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
23528
23783
|
const vizInitData = buildSpotterVizAppInitData(sidebarInitData, this.viewConfig);
|
|
23529
|
-
|
|
23784
|
+
const shareInitData = buildSpotterShareConversationAppInitData(vizInitData, this.viewConfig);
|
|
23785
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
23530
23786
|
}
|
|
23531
23787
|
/**
|
|
23532
23788
|
* Constructs a map of parameters to be passed on to the
|
|
@@ -23537,7 +23793,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23537
23793
|
return getQueryParamString(params, true);
|
|
23538
23794
|
}
|
|
23539
23795
|
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;
|
|
23796
|
+
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
23797
|
let params = {};
|
|
23542
23798
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
23543
23799
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -23591,7 +23847,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23591
23847
|
}
|
|
23592
23848
|
// Handle spotterChatConfig params
|
|
23593
23849
|
if (spotterChatConfig) {
|
|
23594
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
23850
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
23595
23851
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
23596
23852
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
23597
23853
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -23600,6 +23856,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23600
23856
|
if (enableStarterPrompts !== undefined) {
|
|
23601
23857
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
23602
23858
|
}
|
|
23859
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
23860
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
23861
|
+
}
|
|
23603
23862
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
23604
23863
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
23605
23864
|
}
|
|
@@ -23643,6 +23902,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23643
23902
|
if (enable2ColumnLayout !== undefined) {
|
|
23644
23903
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
23645
23904
|
}
|
|
23905
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
23906
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
23907
|
+
}
|
|
23646
23908
|
if (enableAskSage) {
|
|
23647
23909
|
params[Param.enableAskSage] = enableAskSage;
|
|
23648
23910
|
}
|
|
@@ -23655,6 +23917,9 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23655
23917
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
23656
23918
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
23657
23919
|
}
|
|
23920
|
+
if (liveboardGutter !== undefined) {
|
|
23921
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
23922
|
+
}
|
|
23658
23923
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
23659
23924
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
23660
23925
|
}
|
|
@@ -23765,6 +24030,8 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
23765
24030
|
return modularHomeExperience ? 'home/monitor-alerts' : 'insights/monitor-alerts';
|
|
23766
24031
|
case Page.Collections:
|
|
23767
24032
|
return 'collections';
|
|
24033
|
+
case Page.LiveboardSchedules:
|
|
24034
|
+
return 'home/liveboard-schedules';
|
|
23768
24035
|
case Page.Home:
|
|
23769
24036
|
default:
|
|
23770
24037
|
return 'home';
|
|
@@ -24050,6 +24317,15 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24050
24317
|
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
24051
24318
|
'Using full height with vizId might lead to unexpected behavior.');
|
|
24052
24319
|
}
|
|
24320
|
+
if (this.viewConfig.lazyLoadingForFullHeight === undefined) {
|
|
24321
|
+
this.viewConfig.lazyLoadingForFullHeight = true;
|
|
24322
|
+
}
|
|
24323
|
+
if (this.viewConfig.enableScrollableContainerLazyLoading === undefined) {
|
|
24324
|
+
this.viewConfig.enableScrollableContainerLazyLoading = true;
|
|
24325
|
+
}
|
|
24326
|
+
if (this.viewConfig.lazyLoadingMargin === undefined) {
|
|
24327
|
+
this.viewConfig.lazyLoadingMargin = DEFAULT_LAZY_LOADING_MARGIN;
|
|
24328
|
+
}
|
|
24053
24329
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
24054
24330
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
24055
24331
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -24058,7 +24334,8 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24058
24334
|
}
|
|
24059
24335
|
async getAppInitData() {
|
|
24060
24336
|
const defaultAppInitData = await super.getAppInitData();
|
|
24061
|
-
|
|
24337
|
+
const vizInitData = buildSpotterVizAppInitData(defaultAppInitData, this.viewConfig);
|
|
24338
|
+
return buildStarterPromptsAppInitData(vizInitData, this.viewConfig);
|
|
24062
24339
|
}
|
|
24063
24340
|
/**
|
|
24064
24341
|
* Construct a map of params to be passed on to the
|
|
@@ -24072,7 +24349,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24072
24349
|
getEmbedParamsObject() {
|
|
24073
24350
|
let params = {};
|
|
24074
24351
|
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;
|
|
24352
|
+
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
24353
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
24077
24354
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
24078
24355
|
if (fullHeight === true) {
|
|
@@ -24113,6 +24390,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24113
24390
|
if (enable2ColumnLayout !== undefined) {
|
|
24114
24391
|
params[Param.Enable2ColumnLayout] = enable2ColumnLayout;
|
|
24115
24392
|
}
|
|
24393
|
+
if (isLiveboardAlwaysOn12ColLayout !== undefined) {
|
|
24394
|
+
params[Param.IsLiveboardAlwaysOn12ColLayout] = isLiveboardAlwaysOn12ColLayout;
|
|
24395
|
+
}
|
|
24116
24396
|
if (hideTabPanel) {
|
|
24117
24397
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
24118
24398
|
}
|
|
@@ -24140,6 +24420,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24140
24420
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
24141
24421
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
24142
24422
|
}
|
|
24423
|
+
if (liveboardGutter !== undefined) {
|
|
24424
|
+
params[Param.LiveboardGutter] = liveboardGutter;
|
|
24425
|
+
}
|
|
24143
24426
|
if (isPNGInScheduledEmailsEnabled !== undefined) {
|
|
24144
24427
|
params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
|
|
24145
24428
|
}
|
|
@@ -24157,7 +24440,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24157
24440
|
}
|
|
24158
24441
|
// Handle spotterChatConfig params
|
|
24159
24442
|
if (spotterChatConfig) {
|
|
24160
|
-
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
24443
|
+
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, openSpotterOnLiveboardByDefault, } = spotterChatConfig;
|
|
24161
24444
|
setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
|
|
24162
24445
|
setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
|
|
24163
24446
|
if (spotterFileUploadEnabled !== undefined) {
|
|
@@ -24166,6 +24449,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24166
24449
|
if (enableStarterPrompts !== undefined) {
|
|
24167
24450
|
params[Param.IsStarterPromptsEnabled] = enableStarterPrompts;
|
|
24168
24451
|
}
|
|
24452
|
+
if (openSpotterOnLiveboardByDefault !== undefined) {
|
|
24453
|
+
params[Param.OpenSpotterOnLiveboardByDefault] = openSpotterOnLiveboardByDefault;
|
|
24454
|
+
}
|
|
24169
24455
|
if (spotterFileUploadFileTypes !== undefined) {
|
|
24170
24456
|
params[Param.SpotterFileUploadFileTypes] = JSON.stringify(spotterFileUploadFileTypes);
|
|
24171
24457
|
}
|
|
@@ -24411,7 +24697,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
24411
24697
|
if (this.isRendered) {
|
|
24412
24698
|
this.trigger(HostEvent.Navigate, path.substring(1));
|
|
24413
24699
|
}
|
|
24414
|
-
else if (this.
|
|
24700
|
+
else if (this.getPreRenderConfig().preRenderId) {
|
|
24415
24701
|
this.preRender(true);
|
|
24416
24702
|
}
|
|
24417
24703
|
else {
|
|
@@ -25002,10 +25288,11 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
25002
25288
|
async getAppInitData() {
|
|
25003
25289
|
const defaultAppInitData = await super.getAppInitData();
|
|
25004
25290
|
const sidebarInitData = buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
25005
|
-
|
|
25291
|
+
const shareInitData = buildSpotterShareConversationAppInitData(sidebarInitData, this.viewConfig);
|
|
25292
|
+
return buildStarterPromptsAppInitData(shareInitData, this.viewConfig);
|
|
25006
25293
|
}
|
|
25007
25294
|
getEmbedParamsObject() {
|
|
25008
|
-
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, } = this.viewConfig;
|
|
25295
|
+
const { searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, updatedSpotterExperience, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, showSpotterRadiance, defaultQueryMode, enableStopAnswerGenerationEmbed, spotterChatConfig, spotterAnalystConfig, } = this.viewConfig;
|
|
25009
25296
|
const queryParams = this.getBaseQueryParams();
|
|
25010
25297
|
queryParams[Param.SpotterEnabled] = true;
|
|
25011
25298
|
// Boolean params
|
|
@@ -25018,6 +25305,7 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
|
25018
25305
|
setParamIfDefined(queryParams, Param.ShowSpotterRadiance, showSpotterRadiance, true);
|
|
25019
25306
|
setParamIfDefined(queryParams, Param.DefaultQueryMode, defaultQueryMode);
|
|
25020
25307
|
setParamIfDefined(queryParams, Param.EnableStopAnswerGenerationEmbed, enableStopAnswerGenerationEmbed, true);
|
|
25308
|
+
setParamIfDefined(queryParams, Param.AnalystId, spotterAnalystConfig === null || spotterAnalystConfig === void 0 ? void 0 : spotterAnalystConfig.analystId);
|
|
25021
25309
|
// Handle spotterChatConfig params
|
|
25022
25310
|
if (spotterChatConfig) {
|
|
25023
25311
|
const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, spotterFileUploadEnabled, spotterFileUploadFileTypes, enableStarterPrompts, } = spotterChatConfig;
|
|
@@ -25109,15 +25397,17 @@ const componentFactory = (EmbedConstructor,
|
|
|
25109
25397
|
// not be destroyed when the component is unmounted.
|
|
25110
25398
|
isPreRenderedComponent = false) => {
|
|
25111
25399
|
const Component = React__default.forwardRef((props, forwardedRef) => {
|
|
25400
|
+
var _a, _b;
|
|
25112
25401
|
const ref = React__default.useRef(null);
|
|
25113
25402
|
const { className, style, ...embedProps } = props;
|
|
25114
25403
|
const { viewConfig, listeners } = getViewPropsAndListeners(embedProps);
|
|
25404
|
+
const preRenderId = (_b = (_a = props.preRenderConfig) === null || _a === void 0 ? void 0 : _a.preRenderId) !== null && _b !== void 0 ? _b : props.preRenderId;
|
|
25115
25405
|
const handleDestroy = (tsEmbed) => {
|
|
25116
25406
|
// do not destroy if it is a preRender component
|
|
25117
25407
|
if (isPreRenderedComponent)
|
|
25118
25408
|
return;
|
|
25119
25409
|
// if component is connected to a preRendered component
|
|
25120
|
-
if (
|
|
25410
|
+
if (preRenderId) {
|
|
25121
25411
|
tsEmbed.hidePreRender();
|
|
25122
25412
|
return;
|
|
25123
25413
|
}
|
|
@@ -25128,7 +25418,7 @@ isPreRenderedComponent = false) => {
|
|
|
25128
25418
|
};
|
|
25129
25419
|
const handleDefaultRendering = (tsEmbed) => {
|
|
25130
25420
|
// if component is connected to a preRendered component
|
|
25131
|
-
if (
|
|
25421
|
+
if (preRenderId) {
|
|
25132
25422
|
tsEmbed.showPreRender();
|
|
25133
25423
|
return;
|
|
25134
25424
|
}
|
|
@@ -25377,7 +25667,7 @@ const PreRenderedConversationEmbed = componentFactory(SpotterEmbed$1, true);
|
|
|
25377
25667
|
* const ref = useEmbedRef();
|
|
25378
25668
|
* useEffect(() => {
|
|
25379
25669
|
* ref.current.trigger(
|
|
25380
|
-
*
|
|
25670
|
+
* HostEvent.UpdateRuntimeFilters,
|
|
25381
25671
|
* [{ columnName: 'name', operator: 'EQ', values: ['value']}]);
|
|
25382
25672
|
* }, [])
|
|
25383
25673
|
* return <LiveboardEmbed ref={ref} liveboardId={<id>} />
|