@thoughtspot/visual-embed-sdk 1.37.0 → 1.37.1-spotter-embed
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 +3 -3
- package/cjs/src/auth.d.ts +9 -4
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +21 -0
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +48 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +59 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +13 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +44 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +39 -9
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +32 -5
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +4 -4
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +38 -11
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +28 -4
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +7 -7
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +4 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- 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 +5 -3
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/pages/embed-test.page.d.ts +8 -0
- package/cjs/src/pages/embed-test.page.d.ts.map +1 -0
- package/cjs/src/pages/embed-test.page.js +20 -0
- package/cjs/src/pages/embed-test.page.js.map +1 -0
- package/cjs/src/pages/home.page.d.ts +6 -0
- package/cjs/src/pages/home.page.d.ts.map +1 -0
- package/cjs/src/pages/home.page.js +12 -0
- package/cjs/src/pages/home.page.js.map +1 -0
- package/cjs/src/pages/login.page.d.ts +15 -0
- package/cjs/src/pages/login.page.d.ts.map +1 -0
- package/cjs/src/pages/login.page.js +22 -0
- package/cjs/src/pages/login.page.js.map +1 -0
- 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/index.d.ts +24 -5
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +21 -4
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/tests/auth.test.d.ts +1 -0
- package/cjs/src/tests/auth.test.d.ts.map +1 -0
- package/cjs/src/tests/auth.test.js +1 -0
- package/cjs/src/tests/auth.test.js.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts +2 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.js +54 -0
- package/cjs/src/tests/e2e/auth.spec.js.map +1 -0
- package/cjs/src/types.d.ts +95 -3
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +79 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.js +6 -4
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/index-Cj4BVGHL.js +7371 -0
- package/dist/index-DUaG1OG2.js +7447 -0
- package/dist/index-Fhk1V_Gw.js +7371 -0
- package/dist/index-OuiZF3zE.js +7371 -0
- package/dist/src/auth.d.ts +9 -4
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +59 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +39 -9
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +38 -11
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.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/index.d.ts +24 -5
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +95 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +208 -31
- package/dist/tsembed-react.js +428 -174
- package/dist/tsembed.es.js +170 -32
- package/dist/tsembed.js +392 -176
- package/dist/visual-embed-sdk-react-full.d.ts +299 -47
- package/dist/visual-embed-sdk-react.d.ts +299 -47
- package/dist/visual-embed-sdk.d.ts +276 -43
- package/lib/package.json +3 -3
- package/lib/src/auth.d.ts +9 -4
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +21 -0
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +48 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +59 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +13 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +44 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +39 -9
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +30 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +5 -5
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +38 -11
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +26 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +8 -8
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +4 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- 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 +3 -3
- 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/index.d.ts +24 -5
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +21 -4
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +95 -3
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +79 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +35 -15
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.js +6 -4
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +278 -45
- package/package.json +3 -3
- package/src/auth.spec.ts +52 -0
- package/src/auth.ts +25 -3
- package/src/embed/app.spec.ts +64 -0
- package/src/embed/app.ts +80 -0
- package/src/embed/bodyless-conversation.spec.ts +6 -6
- package/src/embed/bodyless-conversation.ts +43 -8
- package/src/embed/conversation.spec.ts +16 -16
- package/src/embed/conversation.ts +42 -11
- package/src/embed/ts-embed.spec.ts +0 -2
- package/src/embed/ts-embed.ts +4 -0
- package/src/index.ts +8 -4
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.tsx +36 -10
- package/src/types.ts +99 -1
- package/src/utils/graphql/answerService/answerService.ts +35 -15
- package/src/utils/processData.ts +6 -6
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.37.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.37.1-spotter-embed */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -575,6 +575,18 @@ var HomeLeftNavItem;
|
|
|
575
575
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
576
576
|
*/
|
|
577
577
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
578
|
+
/**
|
|
579
|
+
* Create new options in the insights left navigation,
|
|
580
|
+
* available when new navigation V3 is enabled.
|
|
581
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
582
|
+
*/
|
|
583
|
+
HomeLeftNavItem["Create"] = "create";
|
|
584
|
+
/**
|
|
585
|
+
* Spotter option in the insights left navigation,
|
|
586
|
+
* available when new navigation V3 is enabled.
|
|
587
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
588
|
+
*/
|
|
589
|
+
HomeLeftNavItem["Spotter"] = "spotter";
|
|
578
590
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
579
591
|
/**
|
|
580
592
|
* A map of the supported runtime filter operations
|
|
@@ -2657,8 +2669,17 @@ var HostEvent;
|
|
|
2657
2669
|
/**
|
|
2658
2670
|
* Get the Answer session for a Search or
|
|
2659
2671
|
* Liveboard visualization.
|
|
2672
|
+
*
|
|
2673
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
2674
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
2675
|
+
* object that provides a more convenient interface for working with answers.
|
|
2676
|
+
*
|
|
2660
2677
|
* @example
|
|
2661
2678
|
* ```js
|
|
2679
|
+
* // Preferred way to get an AnswerService
|
|
2680
|
+
* const service = await embed.getAnswerService();
|
|
2681
|
+
*
|
|
2682
|
+
* // Alternative direct usage (not recommended)
|
|
2662
2683
|
* const {session} = await embed.trigger(
|
|
2663
2684
|
* HostEvent.GetAnswerSession, {
|
|
2664
2685
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -2666,6 +2687,10 @@ var HostEvent;
|
|
|
2666
2687
|
* ```
|
|
2667
2688
|
* @example
|
|
2668
2689
|
* ```js
|
|
2690
|
+
* // Preferred way to get an AnswerService
|
|
2691
|
+
* const service = await embed.getAnswerService();
|
|
2692
|
+
*
|
|
2693
|
+
* // Alternative direct usage (not recommended)
|
|
2669
2694
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
2670
2695
|
* ```
|
|
2671
2696
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -2794,6 +2819,54 @@ var HostEvent;
|
|
|
2794
2819
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2795
2820
|
*/
|
|
2796
2821
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2822
|
+
/**
|
|
2823
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2824
|
+
* Includes the following properties:
|
|
2825
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2826
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2827
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2828
|
+
*/
|
|
2829
|
+
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2830
|
+
/**
|
|
2831
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2832
|
+
* Includes the following properties:
|
|
2833
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2834
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2835
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2836
|
+
*/
|
|
2837
|
+
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2838
|
+
/**
|
|
2839
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2840
|
+
* Includes the following properties:
|
|
2841
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2842
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2843
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2844
|
+
*/
|
|
2845
|
+
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2846
|
+
/**
|
|
2847
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2848
|
+
* Includes the following properties:
|
|
2849
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2850
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2851
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2852
|
+
*/
|
|
2853
|
+
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2854
|
+
/**
|
|
2855
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2856
|
+
* Includes the following properties:
|
|
2857
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2858
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2859
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2860
|
+
*/
|
|
2861
|
+
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2862
|
+
/**
|
|
2863
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2864
|
+
* Includes the following properties:
|
|
2865
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2866
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2867
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2868
|
+
*/
|
|
2869
|
+
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2797
2870
|
})(HostEvent || (HostEvent = {}));
|
|
2798
2871
|
/**
|
|
2799
2872
|
* The different visual modes that the data sources panel within
|
|
@@ -2874,6 +2947,10 @@ var Param;
|
|
|
2874
2947
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
2875
2948
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
2876
2949
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
2950
|
+
Param["NavigationVersion"] = "navigationVersion";
|
|
2951
|
+
Param["HideHamburger"] = "hideHamburger";
|
|
2952
|
+
Param["HideObjectSearch"] = "hideObjectSearch";
|
|
2953
|
+
Param["HideNotification"] = "hideNotification";
|
|
2877
2954
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
2878
2955
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
2879
2956
|
Param["IsSageEmbed"] = "isSageEmbed";
|
|
@@ -2930,6 +3007,8 @@ var Param;
|
|
|
2930
3007
|
Param["preAuthCache"] = "preAuthCache";
|
|
2931
3008
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
2932
3009
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3010
|
+
Param["PrimaryAction"] = "primaryAction";
|
|
3011
|
+
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
2933
3012
|
})(Param || (Param = {}));
|
|
2934
3013
|
/**
|
|
2935
3014
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7167,29 +7246,49 @@ var OperationType;
|
|
|
7167
7246
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
7168
7247
|
})(OperationType || (OperationType = {}));
|
|
7169
7248
|
/**
|
|
7170
|
-
*
|
|
7171
|
-
*
|
|
7172
|
-
*
|
|
7173
|
-
*
|
|
7249
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7250
|
+
*
|
|
7251
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7252
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7253
|
+
* directly from your application.
|
|
7254
|
+
*
|
|
7255
|
+
* You can use this service to:
|
|
7256
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7257
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7258
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7259
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7260
|
+
* - Run custom queries (`executeQuery`)
|
|
7261
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7262
|
+
*
|
|
7174
7263
|
* @example
|
|
7175
7264
|
* ```js
|
|
7176
|
-
*
|
|
7177
|
-
*
|
|
7178
|
-
*
|
|
7179
|
-
*
|
|
7180
|
-
*
|
|
7181
|
-
*
|
|
7265
|
+
* // Get the answer service
|
|
7266
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7267
|
+
* const service = await embed.getAnswerService();
|
|
7268
|
+
*
|
|
7269
|
+
* // Add columns to the answer
|
|
7270
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7271
|
+
*
|
|
7272
|
+
* // Get the data
|
|
7273
|
+
* const data = await service.fetchData();
|
|
7274
|
+
* console.log(data);
|
|
7275
|
+
* });
|
|
7182
7276
|
* ```
|
|
7277
|
+
*
|
|
7183
7278
|
* @example
|
|
7184
7279
|
* ```js
|
|
7185
|
-
*
|
|
7186
|
-
*
|
|
7187
|
-
* await
|
|
7188
|
-
*
|
|
7280
|
+
* // Get data for a point in a visualization
|
|
7281
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7282
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7283
|
+
* 'Product Name',
|
|
7284
|
+
* 'Sales Amount'
|
|
7189
7285
|
* ]);
|
|
7190
|
-
*
|
|
7286
|
+
*
|
|
7287
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7288
|
+
* console.log(data);
|
|
7191
7289
|
* });
|
|
7192
7290
|
* ```
|
|
7291
|
+
*
|
|
7193
7292
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7194
7293
|
* @group Events
|
|
7195
7294
|
*/
|
|
@@ -7441,7 +7540,7 @@ class AnswerService {
|
|
|
7441
7540
|
async getTML() {
|
|
7442
7541
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7443
7542
|
const edoc = object[0].edoc;
|
|
7444
|
-
const YAML = await import('./index-
|
|
7543
|
+
const YAML = await import('./index-DUaG1OG2.js');
|
|
7445
7544
|
const parsedDoc = YAML.parse(edoc);
|
|
7446
7545
|
return {
|
|
7447
7546
|
answer: {
|
|
@@ -14465,6 +14564,7 @@ var AuthFailureType;
|
|
|
14465
14564
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
14466
14565
|
AuthFailureType["OTHER"] = "OTHER";
|
|
14467
14566
|
AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
|
|
14567
|
+
AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
|
|
14468
14568
|
})(AuthFailureType || (AuthFailureType = {}));
|
|
14469
14569
|
/**
|
|
14470
14570
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -14500,6 +14600,10 @@ var AuthStatus;
|
|
|
14500
14600
|
* @version SDK: 1.19.0
|
|
14501
14601
|
*/
|
|
14502
14602
|
AuthStatus["WAITING_FOR_POPUP"] = "WAITING_FOR_POPUP";
|
|
14603
|
+
/**
|
|
14604
|
+
* Emitted when the SAML popup is closed without authentication
|
|
14605
|
+
*/
|
|
14606
|
+
AuthStatus["SAML_POPUP_CLOSED_NO_AUTH"] = "SAML_POPUP_CLOSED_NO_AUTH";
|
|
14503
14607
|
})(AuthStatus || (AuthStatus = {}));
|
|
14504
14608
|
/**
|
|
14505
14609
|
* Events which can be triggered on the emitter returned from {@link init}.
|
|
@@ -14720,14 +14824,26 @@ const doBasicAuth = async (embedConfig) => {
|
|
|
14720
14824
|
* @param triggerText
|
|
14721
14825
|
*/
|
|
14722
14826
|
async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
14827
|
+
let popupClosedCheck;
|
|
14723
14828
|
const openPopup = () => {
|
|
14724
14829
|
if (samlAuthWindow === null || samlAuthWindow.closed) {
|
|
14725
14830
|
samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
|
|
14831
|
+
if (samlAuthWindow) {
|
|
14832
|
+
popupClosedCheck = setInterval(() => {
|
|
14833
|
+
if (samlAuthWindow.closed) {
|
|
14834
|
+
clearInterval(popupClosedCheck);
|
|
14835
|
+
if (samlCompletionPromise && !samlCompletionResolved) {
|
|
14836
|
+
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.SAML_POPUP_CLOSED_NO_AUTH);
|
|
14837
|
+
}
|
|
14838
|
+
}
|
|
14839
|
+
}, 500);
|
|
14840
|
+
}
|
|
14726
14841
|
}
|
|
14727
14842
|
else {
|
|
14728
14843
|
samlAuthWindow.focus();
|
|
14729
14844
|
}
|
|
14730
14845
|
};
|
|
14846
|
+
let samlCompletionResolved = false;
|
|
14731
14847
|
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.WAITING_FOR_POPUP);
|
|
14732
14848
|
const containerEl = getDOMNode(triggerContainer);
|
|
14733
14849
|
if (containerEl) {
|
|
@@ -14739,6 +14855,10 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
|
14739
14855
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
14740
14856
|
window.addEventListener('message', (e) => {
|
|
14741
14857
|
if (e.data.type === EmbedEvent.SAMLComplete) {
|
|
14858
|
+
samlCompletionResolved = true;
|
|
14859
|
+
if (popupClosedCheck) {
|
|
14860
|
+
clearInterval(popupClosedCheck);
|
|
14861
|
+
}
|
|
14742
14862
|
e.source.close();
|
|
14743
14863
|
resolve();
|
|
14744
14864
|
}
|
|
@@ -15244,15 +15364,17 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
15244
15364
|
* @param containerEl
|
|
15245
15365
|
*/
|
|
15246
15366
|
function processAuthFailure(e, containerEl) {
|
|
15367
|
+
var _a;
|
|
15247
15368
|
const { loginFailedMessage, authType, disableLoginFailurePage, autoLogin, } = getEmbedConfig();
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15369
|
+
const isEmbeddedSSO = authType === AuthType.EmbeddedSSO;
|
|
15370
|
+
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
15371
|
+
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
15372
|
+
if (autoLogin && isTrustedAuth) {
|
|
15251
15373
|
// eslint-disable-next-line no-param-reassign
|
|
15252
15374
|
containerEl.innerHTML = loginFailedMessage;
|
|
15253
15375
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15254
15376
|
}
|
|
15255
|
-
else if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
15377
|
+
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
15256
15378
|
// eslint-disable-next-line no-param-reassign
|
|
15257
15379
|
containerEl.innerHTML = loginFailedMessage;
|
|
15258
15380
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -15297,7 +15419,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15297
15419
|
return e;
|
|
15298
15420
|
}
|
|
15299
15421
|
|
|
15300
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.
|
|
15422
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.1-spotter-embed";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
15301
15423
|
|
|
15302
15424
|
/**
|
|
15303
15425
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15834,7 +15956,7 @@ class TsEmbed {
|
|
|
15834
15956
|
if (this.embedConfig.currencyFormat) {
|
|
15835
15957
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15836
15958
|
}
|
|
15837
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, } = this.viewConfig;
|
|
15959
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
15838
15960
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15839
15961
|
const additionalFlags = {
|
|
15840
15962
|
...additionalFlagsFromInit,
|
|
@@ -15848,6 +15970,9 @@ class TsEmbed {
|
|
|
15848
15970
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
15849
15971
|
return queryParams;
|
|
15850
15972
|
}
|
|
15973
|
+
if (primaryAction) {
|
|
15974
|
+
queryParams[Param.PrimaryAction] = primaryAction;
|
|
15975
|
+
}
|
|
15851
15976
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15852
15977
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15853
15978
|
}
|
|
@@ -16740,7 +16865,7 @@ class AppEmbed extends V1Embed {
|
|
|
16740
16865
|
* embedded Liveboard or visualization.
|
|
16741
16866
|
*/
|
|
16742
16867
|
getEmbedParams() {
|
|
16743
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16868
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, modularHomeExperienceV3 = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
16744
16869
|
/* eslint-disable-next-line max-len */
|
|
16745
16870
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
16746
16871
|
let params = {};
|
|
@@ -16759,6 +16884,18 @@ class AppEmbed extends V1Embed {
|
|
|
16759
16884
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
16760
16885
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
16761
16886
|
params = this.getBaseQueryParams(params);
|
|
16887
|
+
if (modularHomeExperienceV3) {
|
|
16888
|
+
params[Param.NavigationVersion] = 'v3';
|
|
16889
|
+
}
|
|
16890
|
+
if (hideObjectSearch) {
|
|
16891
|
+
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
16892
|
+
}
|
|
16893
|
+
if (hideHamburger) {
|
|
16894
|
+
params[Param.HideHamburger] = !!hideHamburger;
|
|
16895
|
+
}
|
|
16896
|
+
if (hideNotification) {
|
|
16897
|
+
params[Param.HideNotification] = !!hideNotification;
|
|
16898
|
+
}
|
|
16762
16899
|
if (fullHeight === true) {
|
|
16763
16900
|
params[Param.fullHeight] = true;
|
|
16764
16901
|
}
|
|
@@ -17894,6 +18031,7 @@ class ConversationMessage extends TsEmbed {
|
|
|
17894
18031
|
const path = 'conv-assist-answer';
|
|
17895
18032
|
const queryParams = this.getBaseQueryParams();
|
|
17896
18033
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
18034
|
+
queryParams[Param.isSpotterAgentEmbed] = true;
|
|
17897
18035
|
let query = '';
|
|
17898
18036
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
17899
18037
|
if (queryParamsString) {
|
|
@@ -17919,9 +18057,9 @@ class ConversationMessage extends TsEmbed {
|
|
|
17919
18057
|
* chatbots or other conversational interfaces.
|
|
17920
18058
|
* @example
|
|
17921
18059
|
* ```js
|
|
17922
|
-
* import {
|
|
18060
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
17923
18061
|
*
|
|
17924
|
-
* const conversation = new
|
|
18062
|
+
* const conversation = new SpotterAgentEmbed({
|
|
17925
18063
|
* worksheetId: 'worksheetId',
|
|
17926
18064
|
* });
|
|
17927
18065
|
*
|
|
@@ -17931,9 +18069,9 @@ class ConversationMessage extends TsEmbed {
|
|
|
17931
18069
|
* document.body.appendChild(container); // or to any other element
|
|
17932
18070
|
* ```
|
|
17933
18071
|
* @group Embed components
|
|
17934
|
-
* @version SDK: 1.
|
|
18072
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
17935
18073
|
*/
|
|
17936
|
-
class
|
|
18074
|
+
class SpotterAgentEmbed {
|
|
17937
18075
|
constructor(viewConfig) {
|
|
17938
18076
|
this.viewConfig = viewConfig;
|
|
17939
18077
|
const embedConfig = getEmbedConfig();
|
|
@@ -17985,7 +18123,7 @@ var isUndefined_1 = isUndefined;
|
|
|
17985
18123
|
* @group Embed components
|
|
17986
18124
|
* @example
|
|
17987
18125
|
* ```js
|
|
17988
|
-
* const conversation = new
|
|
18126
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
17989
18127
|
* worksheetId: 'worksheetId',
|
|
17990
18128
|
* searchOptions: {
|
|
17991
18129
|
* searchQuery: 'searchQuery',
|
|
@@ -17993,9 +18131,9 @@ var isUndefined_1 = isUndefined;
|
|
|
17993
18131
|
* });
|
|
17994
18132
|
* conversation.render();
|
|
17995
18133
|
* ```
|
|
17996
|
-
* @version SDK: 1.
|
|
18134
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
17997
18135
|
*/
|
|
17998
|
-
class
|
|
18136
|
+
class SpotterEmbed extends TsEmbed {
|
|
17999
18137
|
constructor(container, viewConfig) {
|
|
18000
18138
|
viewConfig.embedComponentType = 'conversation';
|
|
18001
18139
|
super(container, viewConfig);
|
|
@@ -18626,4 +18764,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
18626
18764
|
return result;
|
|
18627
18765
|
};
|
|
18628
18766
|
|
|
18629
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|
|
18767
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, SpotterAgentEmbed as BodylessConversation, ContextMenuTriggerOptions, SpotterEmbed as ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|