@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-react.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
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef } from 'react';
|
|
@@ -690,6 +690,18 @@ var HomeLeftNavItem;
|
|
|
690
690
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
691
691
|
*/
|
|
692
692
|
HomeLeftNavItem["LiveboardSchedules"] = "liveboard-schedules";
|
|
693
|
+
/**
|
|
694
|
+
* Create new options in the insights left navigation,
|
|
695
|
+
* available when new navigation V3 is enabled.
|
|
696
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
697
|
+
*/
|
|
698
|
+
HomeLeftNavItem["Create"] = "create";
|
|
699
|
+
/**
|
|
700
|
+
* Spotter option in the insights left navigation,
|
|
701
|
+
* available when new navigation V3 is enabled.
|
|
702
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
703
|
+
*/
|
|
704
|
+
HomeLeftNavItem["Spotter"] = "spotter";
|
|
693
705
|
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
694
706
|
/**
|
|
695
707
|
* A map of the supported runtime filter operations
|
|
@@ -2772,8 +2784,17 @@ var HostEvent;
|
|
|
2772
2784
|
/**
|
|
2773
2785
|
* Get the Answer session for a Search or
|
|
2774
2786
|
* Liveboard visualization.
|
|
2787
|
+
*
|
|
2788
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
2789
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
2790
|
+
* object that provides a more convenient interface for working with answers.
|
|
2791
|
+
*
|
|
2775
2792
|
* @example
|
|
2776
2793
|
* ```js
|
|
2794
|
+
* // Preferred way to get an AnswerService
|
|
2795
|
+
* const service = await embed.getAnswerService();
|
|
2796
|
+
*
|
|
2797
|
+
* // Alternative direct usage (not recommended)
|
|
2777
2798
|
* const {session} = await embed.trigger(
|
|
2778
2799
|
* HostEvent.GetAnswerSession, {
|
|
2779
2800
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -2781,6 +2802,10 @@ var HostEvent;
|
|
|
2781
2802
|
* ```
|
|
2782
2803
|
* @example
|
|
2783
2804
|
* ```js
|
|
2805
|
+
* // Preferred way to get an AnswerService
|
|
2806
|
+
* const service = await embed.getAnswerService();
|
|
2807
|
+
*
|
|
2808
|
+
* // Alternative direct usage (not recommended)
|
|
2784
2809
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
2785
2810
|
* ```
|
|
2786
2811
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -2909,6 +2934,54 @@ var HostEvent;
|
|
|
2909
2934
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2910
2935
|
*/
|
|
2911
2936
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2937
|
+
/**
|
|
2938
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2939
|
+
* Includes the following properties:
|
|
2940
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2941
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2942
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2943
|
+
*/
|
|
2944
|
+
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2945
|
+
/**
|
|
2946
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2947
|
+
* Includes the following properties:
|
|
2948
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2949
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2950
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2951
|
+
*/
|
|
2952
|
+
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2953
|
+
/**
|
|
2954
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2955
|
+
* Includes the following properties:
|
|
2956
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2957
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2958
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2959
|
+
*/
|
|
2960
|
+
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2961
|
+
/**
|
|
2962
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2963
|
+
* Includes the following properties:
|
|
2964
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2965
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2966
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2967
|
+
*/
|
|
2968
|
+
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2969
|
+
/**
|
|
2970
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2971
|
+
* Includes the following properties:
|
|
2972
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2973
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2974
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2975
|
+
*/
|
|
2976
|
+
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2977
|
+
/**
|
|
2978
|
+
* Triggers the table visualization re-render with the updated data.
|
|
2979
|
+
* Includes the following properties:
|
|
2980
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
2981
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2982
|
+
* payload.For example, { columnDataLite: []}`.
|
|
2983
|
+
*/
|
|
2984
|
+
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2912
2985
|
})(HostEvent || (HostEvent = {}));
|
|
2913
2986
|
/**
|
|
2914
2987
|
* The different visual modes that the data sources panel within
|
|
@@ -2989,6 +3062,10 @@ var Param;
|
|
|
2989
3062
|
Param["ShowInsertToSlide"] = "insertInToSlide";
|
|
2990
3063
|
Param["PrimaryNavHidden"] = "primaryNavHidden";
|
|
2991
3064
|
Param["HideProfleAndHelp"] = "profileAndHelpInNavBarHidden";
|
|
3065
|
+
Param["NavigationVersion"] = "navigationVersion";
|
|
3066
|
+
Param["HideHamburger"] = "hideHamburger";
|
|
3067
|
+
Param["HideObjectSearch"] = "hideObjectSearch";
|
|
3068
|
+
Param["HideNotification"] = "hideNotification";
|
|
2992
3069
|
Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
|
|
2993
3070
|
Param["HideOrgSwitcher"] = "orgSwitcherHidden";
|
|
2994
3071
|
Param["IsSageEmbed"] = "isSageEmbed";
|
|
@@ -3045,6 +3122,8 @@ var Param;
|
|
|
3045
3122
|
Param["preAuthCache"] = "preAuthCache";
|
|
3046
3123
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3047
3124
|
Param["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
3125
|
+
Param["PrimaryAction"] = "primaryAction";
|
|
3126
|
+
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
3048
3127
|
})(Param || (Param = {}));
|
|
3049
3128
|
/**
|
|
3050
3129
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7282,29 +7361,49 @@ var OperationType;
|
|
|
7282
7361
|
OperationType["GetTableWithHeadlineData"] = "GetTableWithHeadlineData";
|
|
7283
7362
|
})(OperationType || (OperationType = {}));
|
|
7284
7363
|
/**
|
|
7285
|
-
*
|
|
7286
|
-
*
|
|
7287
|
-
*
|
|
7288
|
-
*
|
|
7364
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7365
|
+
*
|
|
7366
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7367
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7368
|
+
* directly from your application.
|
|
7369
|
+
*
|
|
7370
|
+
* You can use this service to:
|
|
7371
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7372
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7373
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7374
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7375
|
+
* - Run custom queries (`executeQuery`)
|
|
7376
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7377
|
+
*
|
|
7289
7378
|
* @example
|
|
7290
7379
|
* ```js
|
|
7291
|
-
*
|
|
7292
|
-
*
|
|
7293
|
-
*
|
|
7294
|
-
*
|
|
7295
|
-
*
|
|
7296
|
-
*
|
|
7380
|
+
* // Get the answer service
|
|
7381
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7382
|
+
* const service = await embed.getAnswerService();
|
|
7383
|
+
*
|
|
7384
|
+
* // Add columns to the answer
|
|
7385
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7386
|
+
*
|
|
7387
|
+
* // Get the data
|
|
7388
|
+
* const data = await service.fetchData();
|
|
7389
|
+
* console.log(data);
|
|
7390
|
+
* });
|
|
7297
7391
|
* ```
|
|
7392
|
+
*
|
|
7298
7393
|
* @example
|
|
7299
7394
|
* ```js
|
|
7300
|
-
*
|
|
7301
|
-
*
|
|
7302
|
-
* await
|
|
7303
|
-
*
|
|
7395
|
+
* // Get data for a point in a visualization
|
|
7396
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7397
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7398
|
+
* 'Product Name',
|
|
7399
|
+
* 'Sales Amount'
|
|
7304
7400
|
* ]);
|
|
7305
|
-
*
|
|
7401
|
+
*
|
|
7402
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7403
|
+
* console.log(data);
|
|
7306
7404
|
* });
|
|
7307
7405
|
* ```
|
|
7406
|
+
*
|
|
7308
7407
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7309
7408
|
* @group Events
|
|
7310
7409
|
*/
|
|
@@ -7556,7 +7655,7 @@ class AnswerService {
|
|
|
7556
7655
|
async getTML() {
|
|
7557
7656
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7558
7657
|
const edoc = object[0].edoc;
|
|
7559
|
-
const YAML = await import('./index-
|
|
7658
|
+
const YAML = await import('./index-DUaG1OG2.js');
|
|
7560
7659
|
const parsedDoc = YAML.parse(edoc);
|
|
7561
7660
|
return {
|
|
7562
7661
|
answer: {
|
|
@@ -14567,6 +14666,7 @@ var AuthFailureType;
|
|
|
14567
14666
|
AuthFailureType["EXPIRY"] = "EXPIRY";
|
|
14568
14667
|
AuthFailureType["OTHER"] = "OTHER";
|
|
14569
14668
|
AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
|
|
14669
|
+
AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
|
|
14570
14670
|
})(AuthFailureType || (AuthFailureType = {}));
|
|
14571
14671
|
/**
|
|
14572
14672
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -14602,6 +14702,10 @@ var AuthStatus;
|
|
|
14602
14702
|
* @version SDK: 1.19.0
|
|
14603
14703
|
*/
|
|
14604
14704
|
AuthStatus["WAITING_FOR_POPUP"] = "WAITING_FOR_POPUP";
|
|
14705
|
+
/**
|
|
14706
|
+
* Emitted when the SAML popup is closed without authentication
|
|
14707
|
+
*/
|
|
14708
|
+
AuthStatus["SAML_POPUP_CLOSED_NO_AUTH"] = "SAML_POPUP_CLOSED_NO_AUTH";
|
|
14605
14709
|
})(AuthStatus || (AuthStatus = {}));
|
|
14606
14710
|
/**
|
|
14607
14711
|
* Events which can be triggered on the emitter returned from {@link init}.
|
|
@@ -14822,14 +14926,26 @@ const doBasicAuth = async (embedConfig) => {
|
|
|
14822
14926
|
* @param triggerText
|
|
14823
14927
|
*/
|
|
14824
14928
|
async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
14929
|
+
let popupClosedCheck;
|
|
14825
14930
|
const openPopup = () => {
|
|
14826
14931
|
if (samlAuthWindow === null || samlAuthWindow.closed) {
|
|
14827
14932
|
samlAuthWindow = window.open(ssoURL, '_blank', 'location=no,height=570,width=520,scrollbars=yes,status=yes');
|
|
14933
|
+
if (samlAuthWindow) {
|
|
14934
|
+
popupClosedCheck = setInterval(() => {
|
|
14935
|
+
if (samlAuthWindow.closed) {
|
|
14936
|
+
clearInterval(popupClosedCheck);
|
|
14937
|
+
if (samlCompletionPromise && !samlCompletionResolved) {
|
|
14938
|
+
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.SAML_POPUP_CLOSED_NO_AUTH);
|
|
14939
|
+
}
|
|
14940
|
+
}
|
|
14941
|
+
}, 500);
|
|
14942
|
+
}
|
|
14828
14943
|
}
|
|
14829
14944
|
else {
|
|
14830
14945
|
samlAuthWindow.focus();
|
|
14831
14946
|
}
|
|
14832
14947
|
};
|
|
14948
|
+
let samlCompletionResolved = false;
|
|
14833
14949
|
authEE === null || authEE === void 0 ? void 0 : authEE.emit(AuthStatus.WAITING_FOR_POPUP);
|
|
14834
14950
|
const containerEl = getDOMNode(triggerContainer);
|
|
14835
14951
|
if (containerEl) {
|
|
@@ -14841,6 +14957,10 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
|
14841
14957
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
14842
14958
|
window.addEventListener('message', (e) => {
|
|
14843
14959
|
if (e.data.type === EmbedEvent.SAMLComplete) {
|
|
14960
|
+
samlCompletionResolved = true;
|
|
14961
|
+
if (popupClosedCheck) {
|
|
14962
|
+
clearInterval(popupClosedCheck);
|
|
14963
|
+
}
|
|
14844
14964
|
e.source.close();
|
|
14845
14965
|
resolve();
|
|
14846
14966
|
}
|
|
@@ -15193,15 +15313,17 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
15193
15313
|
* @param containerEl
|
|
15194
15314
|
*/
|
|
15195
15315
|
function processAuthFailure(e, containerEl) {
|
|
15316
|
+
var _a;
|
|
15196
15317
|
const { loginFailedMessage, authType, disableLoginFailurePage, autoLogin, } = getEmbedConfig();
|
|
15197
|
-
|
|
15198
|
-
|
|
15199
|
-
|
|
15318
|
+
const isEmbeddedSSO = authType === AuthType.EmbeddedSSO;
|
|
15319
|
+
const isTrustedAuth = authType === AuthType.TrustedAuthToken || authType === AuthType.TrustedAuthTokenCookieless;
|
|
15320
|
+
const isEmbeddedSSOInfoFailure = isEmbeddedSSO && ((_a = e === null || e === void 0 ? void 0 : e.data) === null || _a === void 0 ? void 0 : _a.type) === AuthFailureType.UNAUTHENTICATED_FAILURE;
|
|
15321
|
+
if (autoLogin && isTrustedAuth) {
|
|
15200
15322
|
// eslint-disable-next-line no-param-reassign
|
|
15201
15323
|
containerEl.innerHTML = loginFailedMessage;
|
|
15202
15324
|
notifyAuthFailure(AuthFailureType.IDLE_SESSION_TIMEOUT);
|
|
15203
15325
|
}
|
|
15204
|
-
else if (authType !== AuthType.None && !disableLoginFailurePage) {
|
|
15326
|
+
else if (authType !== AuthType.None && !disableLoginFailurePage && !isEmbeddedSSOInfoFailure) {
|
|
15205
15327
|
// eslint-disable-next-line no-param-reassign
|
|
15206
15328
|
containerEl.innerHTML = loginFailedMessage;
|
|
15207
15329
|
notifyAuthFailure(AuthFailureType.OTHER);
|
|
@@ -15246,7 +15368,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15246
15368
|
return e;
|
|
15247
15369
|
}
|
|
15248
15370
|
|
|
15249
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.37.
|
|
15371
|
+
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};
|
|
15250
15372
|
|
|
15251
15373
|
/**
|
|
15252
15374
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15783,7 +15905,7 @@ class TsEmbed {
|
|
|
15783
15905
|
if (this.embedConfig.currencyFormat) {
|
|
15784
15906
|
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
15785
15907
|
}
|
|
15786
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, } = this.viewConfig;
|
|
15908
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, exposeTranslationIDs, primaryAction, } = this.viewConfig;
|
|
15787
15909
|
const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
|
|
15788
15910
|
const additionalFlags = {
|
|
15789
15911
|
...additionalFlagsFromInit,
|
|
@@ -15797,6 +15919,9 @@ class TsEmbed {
|
|
|
15797
15919
|
this.handleError('You cannot have both hidden Tabs and visible Tabs');
|
|
15798
15920
|
return queryParams;
|
|
15799
15921
|
}
|
|
15922
|
+
if (primaryAction) {
|
|
15923
|
+
queryParams[Param.PrimaryAction] = primaryAction;
|
|
15924
|
+
}
|
|
15800
15925
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
15801
15926
|
queryParams[Param.DisableActions] = disabledActions;
|
|
15802
15927
|
}
|
|
@@ -17015,7 +17140,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17015
17140
|
* embedded Liveboard or visualization.
|
|
17016
17141
|
*/
|
|
17017
17142
|
getEmbedParams() {
|
|
17018
|
-
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,
|
|
17143
|
+
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,
|
|
17019
17144
|
/* eslint-disable-next-line max-len */
|
|
17020
17145
|
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
17021
17146
|
let params = {};
|
|
@@ -17034,6 +17159,18 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
|
|
|
17034
17159
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17035
17160
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17036
17161
|
params = this.getBaseQueryParams(params);
|
|
17162
|
+
if (modularHomeExperienceV3) {
|
|
17163
|
+
params[Param.NavigationVersion] = 'v3';
|
|
17164
|
+
}
|
|
17165
|
+
if (hideObjectSearch) {
|
|
17166
|
+
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
17167
|
+
}
|
|
17168
|
+
if (hideHamburger) {
|
|
17169
|
+
params[Param.HideHamburger] = !!hideHamburger;
|
|
17170
|
+
}
|
|
17171
|
+
if (hideNotification) {
|
|
17172
|
+
params[Param.HideNotification] = !!hideNotification;
|
|
17173
|
+
}
|
|
17037
17174
|
if (fullHeight === true) {
|
|
17038
17175
|
params[Param.fullHeight] = true;
|
|
17039
17176
|
}
|
|
@@ -17570,7 +17707,7 @@ var isUndefined_1 = isUndefined;
|
|
|
17570
17707
|
* @group Embed components
|
|
17571
17708
|
* @example
|
|
17572
17709
|
* ```js
|
|
17573
|
-
* const conversation = new
|
|
17710
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
17574
17711
|
* worksheetId: 'worksheetId',
|
|
17575
17712
|
* searchOptions: {
|
|
17576
17713
|
* searchQuery: 'searchQuery',
|
|
@@ -17578,9 +17715,9 @@ var isUndefined_1 = isUndefined;
|
|
|
17578
17715
|
* });
|
|
17579
17716
|
* conversation.render();
|
|
17580
17717
|
* ```
|
|
17581
|
-
* @version SDK: 1.
|
|
17718
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
17582
17719
|
*/
|
|
17583
|
-
let
|
|
17720
|
+
let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
|
|
17584
17721
|
constructor(container, viewConfig) {
|
|
17585
17722
|
viewConfig.embedComponentType = 'conversation';
|
|
17586
17723
|
super(container, viewConfig);
|
|
@@ -17626,6 +17763,29 @@ let ConversationEmbed$1 = class ConversationEmbed extends TsEmbed {
|
|
|
17626
17763
|
await this.renderIFrame(src);
|
|
17627
17764
|
return this;
|
|
17628
17765
|
}
|
|
17766
|
+
};
|
|
17767
|
+
/**
|
|
17768
|
+
* Embed ThoughtSpot AI Conversation.
|
|
17769
|
+
* @deprecated Renamed to SpotterEmbed
|
|
17770
|
+
* @group Embed components
|
|
17771
|
+
* @example
|
|
17772
|
+
* ```js
|
|
17773
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
17774
|
+
* worksheetId: 'worksheetId',
|
|
17775
|
+
* searchOptions: {
|
|
17776
|
+
* searchQuery: 'searchQuery',
|
|
17777
|
+
* },
|
|
17778
|
+
* });
|
|
17779
|
+
* conversation.render();
|
|
17780
|
+
* ```
|
|
17781
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
17782
|
+
*/
|
|
17783
|
+
let ConversationEmbed$1 = class ConversationEmbed extends SpotterEmbed$1 {
|
|
17784
|
+
constructor(container, viewConfig) {
|
|
17785
|
+
viewConfig.embedComponentType = 'conversation';
|
|
17786
|
+
super(container, viewConfig);
|
|
17787
|
+
this.viewConfig = viewConfig;
|
|
17788
|
+
}
|
|
17629
17789
|
};
|
|
17630
17790
|
|
|
17631
17791
|
const componentFactory = (EmbedConstructor,
|
|
@@ -17842,6 +18002,23 @@ const PreRenderedSageEmbed = componentFactory(SageEmbed$1, true);
|
|
|
17842
18002
|
* @example
|
|
17843
18003
|
* ```tsx
|
|
17844
18004
|
* function Sage() {
|
|
18005
|
+
* return <SpotterEmbed
|
|
18006
|
+
* worksheetId="<worksheet-id-here>"
|
|
18007
|
+
* searchOptions={{
|
|
18008
|
+
* searchQuery: "<search query to start with>"
|
|
18009
|
+
* }}
|
|
18010
|
+
* ... other view config props or event listeners.
|
|
18011
|
+
* />
|
|
18012
|
+
* }
|
|
18013
|
+
* ```
|
|
18014
|
+
*/
|
|
18015
|
+
const SpotterEmbed = componentFactory(SpotterEmbed$1);
|
|
18016
|
+
/**
|
|
18017
|
+
* React component for LLM based conversation BI.
|
|
18018
|
+
* @deprecated This component is renamed to SpotterEmbed. Use {@link SpotterEmbed} instead.
|
|
18019
|
+
* @example
|
|
18020
|
+
* ```tsx
|
|
18021
|
+
* function Sage() {
|
|
17845
18022
|
* return <ConversationEmbed
|
|
17846
18023
|
* worksheetId="<worksheet-id-here>"
|
|
17847
18024
|
* searchOptions={{
|
|
@@ -17856,7 +18033,7 @@ const ConversationEmbed = componentFactory(ConversationEmbed$1);
|
|
|
17856
18033
|
/**
|
|
17857
18034
|
* React component for PreRendered Conversation embed.
|
|
17858
18035
|
*
|
|
17859
|
-
* PreRenderedConversationEmbed will preRender the
|
|
18036
|
+
* PreRenderedConversationEmbed will preRender the SpotterEmbed and will be hidden by
|
|
17860
18037
|
* default.
|
|
17861
18038
|
*
|
|
17862
18039
|
* SageEmbed with preRenderId passed will call showPreRender on the embed.
|
|
@@ -17867,11 +18044,11 @@ const ConversationEmbed = componentFactory(ConversationEmbed$1);
|
|
|
17867
18044
|
* }
|
|
17868
18045
|
* ```
|
|
17869
18046
|
* function MyComponent() {
|
|
17870
|
-
* return <
|
|
18047
|
+
* return <SpotterEmbed preRenderId="someId" worksheetId="id" />
|
|
17871
18048
|
* }
|
|
17872
18049
|
* ```
|
|
17873
18050
|
*/
|
|
17874
|
-
const PreRenderedConversationEmbed = componentFactory(
|
|
18051
|
+
const PreRenderedConversationEmbed = componentFactory(SpotterEmbed$1, true);
|
|
17875
18052
|
/**
|
|
17876
18053
|
* Get a reference to the embed component to trigger events on the component.
|
|
17877
18054
|
* @example
|
|
@@ -17913,4 +18090,4 @@ function useInit(config) {
|
|
|
17913
18090
|
return ref;
|
|
17914
18091
|
}
|
|
17915
18092
|
|
|
17916
|
-
export { Action, AppEmbed, ConversationEmbed, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, getSessionInfo, useEmbedRef, useInit };
|
|
18093
|
+
export { Action, AppEmbed, ConversationEmbed, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, Page, PinboardEmbed, PreRenderedAppEmbed, PreRenderedConversationEmbed, PreRenderedLiveboardEmbed, PreRenderedPinboardEmbed, PreRenderedSageEmbed, PreRenderedSearchBarEmbed, PreRenderedSearchEmbed, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterEmbed, getSessionInfo, useEmbedRef, useInit };
|