@thoughtspot/visual-embed-sdk 1.33.2 → 1.33.4
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/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +5 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +15 -3
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/css-variables.d.ts +2 -2
- package/cjs/src/embed/app.d.ts +20 -6
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +3 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.spec.js +13 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +13 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +0 -3
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +1 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +2 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +6 -6
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +10 -9
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -1
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts +0 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +0 -1
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/types.d.ts +40 -22
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +35 -17
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +0 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -4
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
- package/cjs/src/utils/sessionInfoService.js +0 -4
- package/cjs/src/utils/sessionInfoService.js.map +1 -1
- package/cjs/src/utils.d.ts +1 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +13 -3
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +6 -6
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-CqrIh3Vj.js → index-Cl8Rsh6W.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +2 -2
- package/dist/src/embed/app.d.ts +20 -6
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +0 -3
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts +0 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/types.d.ts +40 -22
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -4
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +1 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +72 -42
- package/dist/tsembed-react.js +71 -41
- package/dist/tsembed.es.js +72 -42
- package/dist/tsembed.js +71 -41
- package/dist/visual-embed-sdk-react-full.d.ts +62 -38
- package/dist/visual-embed-sdk-react.d.ts +62 -38
- package/dist/visual-embed-sdk.d.ts +62 -38
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +6 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +15 -3
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/css-variables.d.ts +2 -2
- package/lib/src/embed/app.d.ts +20 -6
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +3 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.spec.js +13 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +13 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +0 -3
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +2 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +6 -6
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +10 -9
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts +0 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +0 -1
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/types.d.ts +40 -22
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +35 -17
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +0 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -4
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
- package/lib/src/utils/sessionInfoService.js +0 -4
- package/lib/src/utils/sessionInfoService.js.map +1 -1
- package/lib/src/utils.d.ts +1 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +11 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +6 -6
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +62 -38
- package/package.json +1 -1
- package/src/auth.spec.ts +15 -3
- package/src/auth.ts +7 -3
- package/src/css-variables.ts +2 -2
- package/src/embed/app.spec.ts +15 -0
- package/src/embed/app.ts +23 -7
- package/src/embed/base.spec.ts +13 -1
- package/src/embed/conversation.spec.ts +16 -0
- package/src/embed/conversation.ts +4 -0
- package/src/embed/liveboard.spec.ts +2 -2
- package/src/embed/liveboard.ts +1 -4
- package/src/embed/search.spec.ts +6 -6
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/errors.ts +10 -9
- package/src/react/index.spec.tsx +1 -1
- package/src/tokenizedFetch.ts +0 -1
- package/src/types.ts +38 -20
- package/src/utils/processData.ts +0 -1
- package/src/utils/sessionInfoService.ts +0 -4
- package/src/utils.spec.ts +6 -6
- package/src/utils.ts +14 -2
|
@@ -1108,7 +1108,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1108
1108
|
*/
|
|
1109
1109
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
1110
1110
|
/**
|
|
1111
|
-
* This
|
|
1111
|
+
* This attribute can be used to enable the two-column layout on an embedded Liveboard
|
|
1112
1112
|
* @type {boolean}
|
|
1113
1113
|
* @default false
|
|
1114
1114
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -1122,17 +1122,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1122
1122
|
*/
|
|
1123
1123
|
enable2ColumnLayout?: boolean;
|
|
1124
1124
|
/**
|
|
1125
|
-
* Flag
|
|
1125
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
1126
1126
|
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
|
|
1127
1127
|
*/
|
|
1128
1128
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
1129
1129
|
/**
|
|
1130
1130
|
* Flag to use home page search bar mode
|
|
1131
|
-
* @version SDK : 1.33.0 | Thoughtspot : 10.
|
|
1131
|
+
* @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
|
|
1132
1132
|
*/
|
|
1133
1133
|
homePageSearchBarMode?: HomePageSearchBarMode;
|
|
1134
1134
|
/**
|
|
1135
|
-
* This flag
|
|
1135
|
+
* This flag can be used to enable the compact header in Liveboard
|
|
1136
1136
|
* @type {boolean}
|
|
1137
1137
|
* @default false
|
|
1138
1138
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -1146,7 +1146,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1146
1146
|
*/
|
|
1147
1147
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
1148
1148
|
/**
|
|
1149
|
-
* This flag
|
|
1149
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact header.
|
|
1150
1150
|
* @type {boolean}
|
|
1151
1151
|
* @default true
|
|
1152
1152
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1160,7 +1160,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1160
1160
|
*/
|
|
1161
1161
|
showLiveboardVerifiedBadge?: boolean;
|
|
1162
1162
|
/**
|
|
1163
|
-
* This flag
|
|
1163
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard compact header
|
|
1164
1164
|
* @type {boolean}
|
|
1165
1165
|
* @default true
|
|
1166
1166
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1173,6 +1173,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1173
1173
|
* ```
|
|
1174
1174
|
*/
|
|
1175
1175
|
showLiveboardReverifyBanner?: boolean;
|
|
1176
|
+
/**
|
|
1177
|
+
* This flag is used to enable unified search experience for full app embed.
|
|
1178
|
+
* @type {boolean}
|
|
1179
|
+
* @default true
|
|
1180
|
+
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
|
|
1181
|
+
* @example
|
|
1182
|
+
* ```js
|
|
1183
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
1184
|
+
* ... // other options
|
|
1185
|
+
* isUnifiedSearchExperienceEnabled: true,
|
|
1186
|
+
* })
|
|
1187
|
+
* ```
|
|
1188
|
+
*/
|
|
1189
|
+
isUnifiedSearchExperienceEnabled?: boolean;
|
|
1176
1190
|
}
|
|
1177
1191
|
/**
|
|
1178
1192
|
* Embeds full ThoughtSpot experience in a host application.
|
|
@@ -1468,7 +1482,6 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1468
1482
|
*
|
|
1469
1483
|
* Since, this will show preview images, be careful that it may show
|
|
1470
1484
|
* undesired data to the user when using row level security.
|
|
1471
|
-
*
|
|
1472
1485
|
* @example
|
|
1473
1486
|
* ```js
|
|
1474
1487
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -1478,7 +1491,6 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1478
1491
|
* });
|
|
1479
1492
|
* embed.render();
|
|
1480
1493
|
* ```
|
|
1481
|
-
*
|
|
1482
1494
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
1483
1495
|
*/
|
|
1484
1496
|
showPreviewLoader?: boolean;
|
|
@@ -1566,7 +1578,6 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
1566
1578
|
/**
|
|
1567
1579
|
* Returns the full url of the liveboard/viz which can be used to open
|
|
1568
1580
|
* this liveboard inside the full Thoughtspot application in a new tab.
|
|
1569
|
-
*
|
|
1570
1581
|
* @returns url string
|
|
1571
1582
|
*/
|
|
1572
1583
|
getLiveboardUrl(): string;
|
|
@@ -2631,7 +2642,7 @@ export interface ViewConfig {
|
|
|
2631
2642
|
*/
|
|
2632
2643
|
enableV2Shell_experimental?: boolean;
|
|
2633
2644
|
/**
|
|
2634
|
-
* To set the initial state of the search bar in case of saved
|
|
2645
|
+
* To set the initial state of the search bar in case of saved Answers.
|
|
2635
2646
|
* @default true
|
|
2636
2647
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2637
2648
|
* @example
|
|
@@ -2644,7 +2655,7 @@ export interface ViewConfig {
|
|
|
2644
2655
|
collapseSearchBar?: boolean;
|
|
2645
2656
|
/**
|
|
2646
2657
|
* This flag can be used to disable links inside the embedded app,
|
|
2647
|
-
* and
|
|
2658
|
+
* and disable redirection of links in a new tab.
|
|
2648
2659
|
* @example
|
|
2649
2660
|
* ```js
|
|
2650
2661
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -2656,7 +2667,7 @@ export interface ViewConfig {
|
|
|
2656
2667
|
disableRedirectionLinksInNewTab?: boolean;
|
|
2657
2668
|
/**
|
|
2658
2669
|
* Flag to control Data panel experience
|
|
2659
|
-
* @default
|
|
2670
|
+
* @default false
|
|
2660
2671
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2661
2672
|
* @example
|
|
2662
2673
|
* ```js
|
|
@@ -3764,22 +3775,26 @@ export declare enum EmbedEvent {
|
|
|
3764
3775
|
*/
|
|
3765
3776
|
Rename = "rename",
|
|
3766
3777
|
/**
|
|
3767
|
-
* Emitted if the user wants to intercept the search execution
|
|
3768
|
-
* and implement logic to decide whether to run the search or not
|
|
3769
3778
|
*
|
|
3770
|
-
*
|
|
3779
|
+
* This event can be emitted to intercept search execution initiated by
|
|
3780
|
+
* the users and implement the logic to allow or restrict search execution.
|
|
3781
|
+
* You can can also show custom error text if the search query must be
|
|
3782
|
+
* restricted due to your application or business requirements.
|
|
3783
|
+
|
|
3784
|
+
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3771
3785
|
* for this embed event to get emitted.
|
|
3772
3786
|
* @param: payload
|
|
3773
3787
|
* @param: responder
|
|
3774
3788
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3775
|
-
*
|
|
3789
|
+
* should run the search, and if not, what error message
|
|
3790
|
+
* should be shown to the user.
|
|
3776
3791
|
*
|
|
3777
|
-
* execute: When execute returns true
|
|
3778
|
-
* When execute returns false
|
|
3792
|
+
* execute: When execute returns `true`, the search will be run.
|
|
3793
|
+
* When execute returns `false`, the search will not be executed.
|
|
3779
3794
|
*
|
|
3780
|
-
* error: Developers can customize the
|
|
3781
|
-
*
|
|
3782
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3795
|
+
* error: Developers can customize the error message text when `execute`
|
|
3796
|
+
* returns `false` using the error parameter in responder.
|
|
3797
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3783
3798
|
* @example
|
|
3784
3799
|
*```js
|
|
3785
3800
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -3819,15 +3834,15 @@ export declare enum EmbedEvent {
|
|
|
3819
3834
|
*/
|
|
3820
3835
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
3821
3836
|
/**
|
|
3822
|
-
* Emitted when parameter changes in an
|
|
3823
|
-
* or
|
|
3837
|
+
* Emitted when parameter changes in an Answer
|
|
3838
|
+
* or Liveboard
|
|
3824
3839
|
*
|
|
3825
3840
|
* ```js
|
|
3826
3841
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
3827
3842
|
* console.log('payload', payload);
|
|
3828
3843
|
* })
|
|
3829
3844
|
*```
|
|
3830
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3845
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3831
3846
|
*/
|
|
3832
3847
|
ParameterChanged = "parameterChanged"
|
|
3833
3848
|
}
|
|
@@ -4556,8 +4571,12 @@ export declare enum HostEvent {
|
|
|
4556
4571
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
4557
4572
|
*
|
|
4558
4573
|
* `values` - An array of one or several values. The value definition on the
|
|
4559
|
-
* data type you choose to filter on. For a complete list of supported data types,
|
|
4560
|
-
*
|
|
4574
|
+
* data type you choose to filter on. For a complete list of supported data types, see
|
|
4575
|
+
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
|
|
4576
|
+
*
|
|
4577
|
+
* `type` - To update filters for date time, specify the date format type.
|
|
4578
|
+
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
4579
|
+
*
|
|
4561
4580
|
* @example
|
|
4562
4581
|
* ```js
|
|
4563
4582
|
*
|
|
@@ -4687,7 +4706,7 @@ export declare enum HostEvent {
|
|
|
4687
4706
|
*/
|
|
4688
4707
|
AskSage = "AskSage",
|
|
4689
4708
|
/**
|
|
4690
|
-
* Trigger
|
|
4709
|
+
* Trigger cross filter update action on a Liveboard
|
|
4691
4710
|
* @example
|
|
4692
4711
|
* ```js
|
|
4693
4712
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -4702,7 +4721,7 @@ export declare enum HostEvent {
|
|
|
4702
4721
|
*/
|
|
4703
4722
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
4704
4723
|
/**
|
|
4705
|
-
* Trigger
|
|
4724
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
4706
4725
|
* @example
|
|
4707
4726
|
* ```js
|
|
4708
4727
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -4842,7 +4861,8 @@ export declare enum Param {
|
|
|
4842
4861
|
ShowLiveboardVerifiedBadge = "showLiveboardVerifiedBadge",
|
|
4843
4862
|
ShowLiveboardReverifyBanner = "showLiveboardReverifyBanner",
|
|
4844
4863
|
LiveboardHeaderV2 = "isLiveboardHeaderV2Enabled",
|
|
4845
|
-
SpotterEnabled = "isSpotterExperienceEnabled"
|
|
4864
|
+
SpotterEnabled = "isSpotterExperienceEnabled",
|
|
4865
|
+
IsUnifiedSearchExperienceEnabled = "isUnifiedSearchExperienceEnabled"
|
|
4846
4866
|
}
|
|
4847
4867
|
/**
|
|
4848
4868
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -5812,7 +5832,7 @@ export declare enum Action {
|
|
|
5812
5832
|
*/
|
|
5813
5833
|
AIHighlights = "AIHighlights",
|
|
5814
5834
|
/**
|
|
5815
|
-
* Action ID for edit schedule action on schedule on homepage
|
|
5835
|
+
* Action ID for edit the schedule action on schedule on homepage
|
|
5816
5836
|
* @example
|
|
5817
5837
|
* ```js
|
|
5818
5838
|
* disabledActions: [Action.EditScheduleHomepage]
|
|
@@ -5873,7 +5893,16 @@ export declare enum Action {
|
|
|
5873
5893
|
* ```
|
|
5874
5894
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
5875
5895
|
*/
|
|
5876
|
-
KPIAnalysisCTA = "kpiAnalysisCTA"
|
|
5896
|
+
KPIAnalysisCTA = "kpiAnalysisCTA",
|
|
5897
|
+
/**
|
|
5898
|
+
* Action ID for disabling chip reorder in Answer and Liveboard
|
|
5899
|
+
* @example
|
|
5900
|
+
* ```js
|
|
5901
|
+
* const disabledActions = [Action.DisableChipReorder]
|
|
5902
|
+
* ```
|
|
5903
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
|
|
5904
|
+
*/
|
|
5905
|
+
DisableChipReorder = "disableChipReorder"
|
|
5877
5906
|
}
|
|
5878
5907
|
export interface AnswerServiceType {
|
|
5879
5908
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -6638,7 +6667,6 @@ export type SessionInfo = {
|
|
|
6638
6667
|
* Returns the session info object and caches it for future use.
|
|
6639
6668
|
* Once fetched the session info object is cached and returned from the cache on
|
|
6640
6669
|
* subsequent calls.
|
|
6641
|
-
*
|
|
6642
6670
|
* @example ```js
|
|
6643
6671
|
* const sessionInfo = await getSessionInfo();
|
|
6644
6672
|
* console.log(sessionInfo);
|
|
@@ -6650,7 +6678,6 @@ export declare function getSessionInfo(): Promise<SessionInfo>;
|
|
|
6650
6678
|
/**
|
|
6651
6679
|
* Returns the cached session info object. If the client is not authenticated the
|
|
6652
6680
|
* function will return null.
|
|
6653
|
-
*
|
|
6654
6681
|
* @example ```js
|
|
6655
6682
|
* const sessionInfo = getCachedSessionInfo();
|
|
6656
6683
|
* if (sessionInfo) {
|
|
@@ -6665,7 +6692,6 @@ export declare function getSessionInfo(): Promise<SessionInfo>;
|
|
|
6665
6692
|
export declare function getCachedSessionInfo(): SessionInfo | null;
|
|
6666
6693
|
/**
|
|
6667
6694
|
* Processes the session info response and returns the session info object.
|
|
6668
|
-
*
|
|
6669
6695
|
* @param sessionInfoResp {any} Response from the session info API.
|
|
6670
6696
|
* @returns {SessionInfo} The session info object.
|
|
6671
6697
|
* @example ```js
|
|
@@ -6678,7 +6704,6 @@ export declare function getCachedSessionInfo(): SessionInfo | null;
|
|
|
6678
6704
|
export declare const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
6679
6705
|
/**
|
|
6680
6706
|
* Resets the cached session info object and forces a new fetch on the next call.
|
|
6681
|
-
*
|
|
6682
6707
|
* @example ```js
|
|
6683
6708
|
* resetCachedSessionInfo();
|
|
6684
6709
|
* const sessionInfo = await getSessionInfo();
|
|
@@ -6713,8 +6738,8 @@ export interface CustomCssVariables {
|
|
|
6713
6738
|
/**
|
|
6714
6739
|
* Font color of the text on toggle buttons such as
|
|
6715
6740
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
6716
|
-
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6717
|
-
* and title text on the AI-generated charts and tables.
|
|
6741
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6742
|
+
* experience), and title text on the AI-generated charts and tables.
|
|
6718
6743
|
* The default color code is #2770EF.
|
|
6719
6744
|
*
|
|
6720
6745
|
*/
|
|
@@ -7301,7 +7326,6 @@ export declare function testResetMixpanel(): void;
|
|
|
7301
7326
|
* Fetch wrapper that adds the authentication token to the request.
|
|
7302
7327
|
* Use this to call the ThoughtSpot APIs when using the visual embed sdk.
|
|
7303
7328
|
* The interface for this method is the same as Web `Fetch`.
|
|
7304
|
-
*
|
|
7305
7329
|
* @param input
|
|
7306
7330
|
* @param init
|
|
7307
7331
|
* @example
|
|
@@ -366,7 +366,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
366
366
|
*/
|
|
367
367
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
368
368
|
/**
|
|
369
|
-
* This
|
|
369
|
+
* This attribute can be used to enable the two-column layout on an embedded Liveboard
|
|
370
370
|
* @type {boolean}
|
|
371
371
|
* @default false
|
|
372
372
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -380,17 +380,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
380
380
|
*/
|
|
381
381
|
enable2ColumnLayout?: boolean;
|
|
382
382
|
/**
|
|
383
|
-
* Flag
|
|
383
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
384
384
|
* @version SDK : 1.29.0 | Thoughtspot : 10.1.0.cl
|
|
385
385
|
*/
|
|
386
386
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
387
387
|
/**
|
|
388
388
|
* Flag to use home page search bar mode
|
|
389
|
-
* @version SDK : 1.33.0 | Thoughtspot : 10.
|
|
389
|
+
* @version SDK : 1.33.0 | Thoughtspot : 10.3.0.cl
|
|
390
390
|
*/
|
|
391
391
|
homePageSearchBarMode?: HomePageSearchBarMode;
|
|
392
392
|
/**
|
|
393
|
-
* This flag
|
|
393
|
+
* This flag can be used to enable the compact header in Liveboard
|
|
394
394
|
* @type {boolean}
|
|
395
395
|
* @default false
|
|
396
396
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -404,7 +404,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
404
404
|
*/
|
|
405
405
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
406
406
|
/**
|
|
407
|
-
* This flag
|
|
407
|
+
* This flag can be used to show or hide the Liveboard verified icon in the compact header.
|
|
408
408
|
* @type {boolean}
|
|
409
409
|
* @default true
|
|
410
410
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -418,7 +418,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
418
418
|
*/
|
|
419
419
|
showLiveboardVerifiedBadge?: boolean;
|
|
420
420
|
/**
|
|
421
|
-
* This flag
|
|
421
|
+
* This flag can be used to show or hide the re-verify banner on the Liveboard compact header
|
|
422
422
|
* @type {boolean}
|
|
423
423
|
* @default true
|
|
424
424
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -431,6 +431,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
431
431
|
* ```
|
|
432
432
|
*/
|
|
433
433
|
showLiveboardReverifyBanner?: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* This flag is used to enable unified search experience for full app embed.
|
|
436
|
+
* @type {boolean}
|
|
437
|
+
* @default true
|
|
438
|
+
* @version SDK: 1.34.0 | ThoughtSpot:10.5.0.cl
|
|
439
|
+
* @example
|
|
440
|
+
* ```js
|
|
441
|
+
* const embed = new AppEmbed('#embed-container', {
|
|
442
|
+
* ... // other options
|
|
443
|
+
* isUnifiedSearchExperienceEnabled: true,
|
|
444
|
+
* })
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
isUnifiedSearchExperienceEnabled?: boolean;
|
|
434
448
|
}
|
|
435
449
|
/**
|
|
436
450
|
* Embeds full ThoughtSpot experience in a host application.
|
|
@@ -860,7 +874,6 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
860
874
|
*
|
|
861
875
|
* Since, this will show preview images, be careful that it may show
|
|
862
876
|
* undesired data to the user when using row level security.
|
|
863
|
-
*
|
|
864
877
|
* @example
|
|
865
878
|
* ```js
|
|
866
879
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -870,7 +883,6 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
870
883
|
* });
|
|
871
884
|
* embed.render();
|
|
872
885
|
* ```
|
|
873
|
-
*
|
|
874
886
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
875
887
|
*/
|
|
876
888
|
showPreviewLoader?: boolean;
|
|
@@ -958,7 +970,6 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
958
970
|
/**
|
|
959
971
|
* Returns the full url of the liveboard/viz which can be used to open
|
|
960
972
|
* this liveboard inside the full Thoughtspot application in a new tab.
|
|
961
|
-
*
|
|
962
973
|
* @returns url string
|
|
963
974
|
*/
|
|
964
975
|
getLiveboardUrl(): string;
|
|
@@ -1576,7 +1587,6 @@ export type SessionInfo = {
|
|
|
1576
1587
|
* Returns the session info object and caches it for future use.
|
|
1577
1588
|
* Once fetched the session info object is cached and returned from the cache on
|
|
1578
1589
|
* subsequent calls.
|
|
1579
|
-
*
|
|
1580
1590
|
* @example ```js
|
|
1581
1591
|
* const sessionInfo = await getSessionInfo();
|
|
1582
1592
|
* console.log(sessionInfo);
|
|
@@ -1588,7 +1598,6 @@ export function getSessionInfo(): Promise<SessionInfo>;
|
|
|
1588
1598
|
/**
|
|
1589
1599
|
* Returns the cached session info object. If the client is not authenticated the
|
|
1590
1600
|
* function will return null.
|
|
1591
|
-
*
|
|
1592
1601
|
* @example ```js
|
|
1593
1602
|
* const sessionInfo = getCachedSessionInfo();
|
|
1594
1603
|
* if (sessionInfo) {
|
|
@@ -1603,7 +1612,6 @@ export function getSessionInfo(): Promise<SessionInfo>;
|
|
|
1603
1612
|
export function getCachedSessionInfo(): SessionInfo | null;
|
|
1604
1613
|
/**
|
|
1605
1614
|
* Processes the session info response and returns the session info object.
|
|
1606
|
-
*
|
|
1607
1615
|
* @param sessionInfoResp {any} Response from the session info API.
|
|
1608
1616
|
* @returns {SessionInfo} The session info object.
|
|
1609
1617
|
* @example ```js
|
|
@@ -1616,7 +1624,6 @@ export function getCachedSessionInfo(): SessionInfo | null;
|
|
|
1616
1624
|
export const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
1617
1625
|
/**
|
|
1618
1626
|
* Resets the cached session info object and forces a new fetch on the next call.
|
|
1619
|
-
*
|
|
1620
1627
|
* @example ```js
|
|
1621
1628
|
* resetCachedSessionInfo();
|
|
1622
1629
|
* const sessionInfo = await getSessionInfo();
|
|
@@ -2612,7 +2619,7 @@ export interface ViewConfig {
|
|
|
2612
2619
|
*/
|
|
2613
2620
|
enableV2Shell_experimental?: boolean;
|
|
2614
2621
|
/**
|
|
2615
|
-
* To set the initial state of the search bar in case of saved
|
|
2622
|
+
* To set the initial state of the search bar in case of saved Answers.
|
|
2616
2623
|
* @default true
|
|
2617
2624
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2618
2625
|
* @example
|
|
@@ -2625,7 +2632,7 @@ export interface ViewConfig {
|
|
|
2625
2632
|
collapseSearchBar?: boolean;
|
|
2626
2633
|
/**
|
|
2627
2634
|
* This flag can be used to disable links inside the embedded app,
|
|
2628
|
-
* and
|
|
2635
|
+
* and disable redirection of links in a new tab.
|
|
2629
2636
|
* @example
|
|
2630
2637
|
* ```js
|
|
2631
2638
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -2637,7 +2644,7 @@ export interface ViewConfig {
|
|
|
2637
2644
|
disableRedirectionLinksInNewTab?: boolean;
|
|
2638
2645
|
/**
|
|
2639
2646
|
* Flag to control Data panel experience
|
|
2640
|
-
* @default
|
|
2647
|
+
* @default false
|
|
2641
2648
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
2642
2649
|
* @example
|
|
2643
2650
|
* ```js
|
|
@@ -3745,22 +3752,26 @@ export enum EmbedEvent {
|
|
|
3745
3752
|
*/
|
|
3746
3753
|
Rename = "rename",
|
|
3747
3754
|
/**
|
|
3748
|
-
* Emitted if the user wants to intercept the search execution
|
|
3749
|
-
* and implement logic to decide whether to run the search or not
|
|
3750
3755
|
*
|
|
3751
|
-
*
|
|
3756
|
+
* This event can be emitted to intercept search execution initiated by
|
|
3757
|
+
* the users and implement the logic to allow or restrict search execution.
|
|
3758
|
+
* You can can also show custom error text if the search query must be
|
|
3759
|
+
* restricted due to your application or business requirements.
|
|
3760
|
+
|
|
3761
|
+
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3752
3762
|
* for this embed event to get emitted.
|
|
3753
3763
|
* @param: payload
|
|
3754
3764
|
* @param: responder
|
|
3755
3765
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3756
|
-
*
|
|
3766
|
+
* should run the search, and if not, what error message
|
|
3767
|
+
* should be shown to the user.
|
|
3757
3768
|
*
|
|
3758
|
-
* execute: When execute returns true
|
|
3759
|
-
* When execute returns false
|
|
3769
|
+
* execute: When execute returns `true`, the search will be run.
|
|
3770
|
+
* When execute returns `false`, the search will not be executed.
|
|
3760
3771
|
*
|
|
3761
|
-
* error: Developers can customize the
|
|
3762
|
-
*
|
|
3763
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3772
|
+
* error: Developers can customize the error message text when `execute`
|
|
3773
|
+
* returns `false` using the error parameter in responder.
|
|
3774
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3764
3775
|
* @example
|
|
3765
3776
|
*```js
|
|
3766
3777
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -3800,15 +3811,15 @@ export enum EmbedEvent {
|
|
|
3800
3811
|
*/
|
|
3801
3812
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
3802
3813
|
/**
|
|
3803
|
-
* Emitted when parameter changes in an
|
|
3804
|
-
* or
|
|
3814
|
+
* Emitted when parameter changes in an Answer
|
|
3815
|
+
* or Liveboard
|
|
3805
3816
|
*
|
|
3806
3817
|
* ```js
|
|
3807
3818
|
* liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
|
|
3808
3819
|
* console.log('payload', payload);
|
|
3809
3820
|
* })
|
|
3810
3821
|
*```
|
|
3811
|
-
* @version SDK : 1.29.0 | Thoughtspot : 10.
|
|
3822
|
+
* @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
|
|
3812
3823
|
*/
|
|
3813
3824
|
ParameterChanged = "parameterChanged"
|
|
3814
3825
|
}
|
|
@@ -4537,8 +4548,12 @@ export enum HostEvent {
|
|
|
4537
4548
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
4538
4549
|
*
|
|
4539
4550
|
* `values` - An array of one or several values. The value definition on the
|
|
4540
|
-
* data type you choose to filter on. For a complete list of supported data types,
|
|
4541
|
-
*
|
|
4551
|
+
* data type you choose to filter on. For a complete list of supported data types, see
|
|
4552
|
+
* link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types].
|
|
4553
|
+
*
|
|
4554
|
+
* `type` - To update filters for date time, specify the date format type.
|
|
4555
|
+
* For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
|
|
4556
|
+
*
|
|
4542
4557
|
* @example
|
|
4543
4558
|
* ```js
|
|
4544
4559
|
*
|
|
@@ -4668,7 +4683,7 @@ export enum HostEvent {
|
|
|
4668
4683
|
*/
|
|
4669
4684
|
AskSage = "AskSage",
|
|
4670
4685
|
/**
|
|
4671
|
-
* Trigger
|
|
4686
|
+
* Trigger cross filter update action on a Liveboard
|
|
4672
4687
|
* @example
|
|
4673
4688
|
* ```js
|
|
4674
4689
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -4683,7 +4698,7 @@ export enum HostEvent {
|
|
|
4683
4698
|
*/
|
|
4684
4699
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
4685
4700
|
/**
|
|
4686
|
-
* Trigger
|
|
4701
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
4687
4702
|
* @example
|
|
4688
4703
|
* ```js
|
|
4689
4704
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -4823,7 +4838,8 @@ export enum Param {
|
|
|
4823
4838
|
ShowLiveboardVerifiedBadge = "showLiveboardVerifiedBadge",
|
|
4824
4839
|
ShowLiveboardReverifyBanner = "showLiveboardReverifyBanner",
|
|
4825
4840
|
LiveboardHeaderV2 = "isLiveboardHeaderV2Enabled",
|
|
4826
|
-
SpotterEnabled = "isSpotterExperienceEnabled"
|
|
4841
|
+
SpotterEnabled = "isSpotterExperienceEnabled",
|
|
4842
|
+
IsUnifiedSearchExperienceEnabled = "isUnifiedSearchExperienceEnabled"
|
|
4827
4843
|
}
|
|
4828
4844
|
/**
|
|
4829
4845
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -5793,7 +5809,7 @@ export enum Action {
|
|
|
5793
5809
|
*/
|
|
5794
5810
|
AIHighlights = "AIHighlights",
|
|
5795
5811
|
/**
|
|
5796
|
-
* Action ID for edit schedule action on schedule on homepage
|
|
5812
|
+
* Action ID for edit the schedule action on schedule on homepage
|
|
5797
5813
|
* @example
|
|
5798
5814
|
* ```js
|
|
5799
5815
|
* disabledActions: [Action.EditScheduleHomepage]
|
|
@@ -5854,7 +5870,16 @@ export enum Action {
|
|
|
5854
5870
|
* ```
|
|
5855
5871
|
* @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
|
|
5856
5872
|
*/
|
|
5857
|
-
KPIAnalysisCTA = "kpiAnalysisCTA"
|
|
5873
|
+
KPIAnalysisCTA = "kpiAnalysisCTA",
|
|
5874
|
+
/**
|
|
5875
|
+
* Action ID for disabling chip reorder in Answer and Liveboard
|
|
5876
|
+
* @example
|
|
5877
|
+
* ```js
|
|
5878
|
+
* const disabledActions = [Action.DisableChipReorder]
|
|
5879
|
+
* ```
|
|
5880
|
+
* @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
|
|
5881
|
+
*/
|
|
5882
|
+
DisableChipReorder = "disableChipReorder"
|
|
5858
5883
|
}
|
|
5859
5884
|
export interface AnswerServiceType {
|
|
5860
5885
|
getAnswer?: (offset: number, batchSize: number) => any;
|
|
@@ -6012,8 +6037,8 @@ export interface CustomCssVariables {
|
|
|
6012
6037
|
/**
|
|
6013
6038
|
* Font color of the text on toggle buttons such as
|
|
6014
6039
|
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
6015
|
-
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6016
|
-
* and title text on the AI-generated charts and tables.
|
|
6040
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
6041
|
+
* experience), and title text on the AI-generated charts and tables.
|
|
6017
6042
|
* The default color code is #2770EF.
|
|
6018
6043
|
*
|
|
6019
6044
|
*/
|
|
@@ -6746,7 +6771,6 @@ export function testResetMixpanel(): void;
|
|
|
6746
6771
|
* Fetch wrapper that adds the authentication token to the request.
|
|
6747
6772
|
* Use this to call the ThoughtSpot APIs when using the visual embed sdk.
|
|
6748
6773
|
* The interface for this method is the same as Web `Fetch`.
|
|
6749
|
-
*
|
|
6750
6774
|
* @param input
|
|
6751
6775
|
* @param init
|
|
6752
6776
|
* @example
|
package/lib/package.json
CHANGED
package/lib/src/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AAIzC,OAAO,EACoB,WAAW,EACrC,MAAM,SAAS,CAAC;AAejB,eAAO,IAAI,cAAc,SAAQ,CAAC;AAElC,eAAO,IAAI,cAAc,EAAE,MAAa,CAAC;AAEzC,eAAO,IAAI,qBAAqB,EAAE,OAAO,CAAC,IAAI,CAAQ,CAAC;AAIvD,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF;;;;GAIG;AACH,oBAAY,eAAe;IACvB,GAAG,QAAQ;IACX,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED;;;GAGG;AACH,oBAAY,UAAU;IAClB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;;;;OAKG;IACH,iBAAiB,sBAAsB;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;OAIG;IACH,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI,CAAC;IACtF;;;;OAIG;IACH,EAAE,CACE,KAAK,EAAE,UAAU,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,GAAG,UAAU,CAAC,iBAAiB,EAChF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CAElF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAWvD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,CAMpE;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAeD;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAWtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,WAEhC;AAyBD;;;GAGG;AACH,eAAO,MAAM,WAAW,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAgC3E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAgBrF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAa3E,CAAC;AA2EF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAiBxD,CAAC;AAEF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAiBxD,CAAC;AAEF,eAAO,MAAM,MAAM,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAYtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAoB5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,OAAyB,CAAC"}
|
package/lib/src/auth.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getAuthenticationToken, resetCachedAuthToken } from './authToken';
|
|
|
2
2
|
import { getEmbedConfig } from './embed/embedConfig';
|
|
3
3
|
import { initMixpanel } from './mixpanel-service';
|
|
4
4
|
import { AuthType, EmbedEvent, } from './types';
|
|
5
|
-
import { getDOMNode, getRedirectUrl } from './utils';
|
|
5
|
+
import { getDOMNode, getRedirectUrl, getSSOMarker } from './utils';
|
|
6
6
|
import { EndPoints, fetchAuthPostService, fetchAuthService, fetchBasicAuthService, fetchLogoutService, } from './utils/authService';
|
|
7
7
|
import { isActiveService } from './utils/authService/tokenizedAuthService';
|
|
8
8
|
import { logger } from './utils/logger';
|
|
@@ -178,7 +178,7 @@ export function getReleaseVersion() {
|
|
|
178
178
|
* Check if we are stuck at the SSO redirect URL
|
|
179
179
|
*/
|
|
180
180
|
function isAtSSORedirectUrl() {
|
|
181
|
-
return window.location.href.indexOf(SSO_REDIRECTION_MARKER_GUID) >= 0;
|
|
181
|
+
return window.location.href.indexOf(getSSOMarker(SSO_REDIRECTION_MARKER_GUID)) >= 0;
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* Remove the SSO redirect URL marker
|
|
@@ -189,7 +189,10 @@ function removeSSORedirectUrlMarker() {
|
|
|
189
189
|
// reload the page which we don't want. We'll live with adding an
|
|
190
190
|
// unnecessary hash to the parent page URL until we find any use case where
|
|
191
191
|
// that creates an issue.
|
|
192
|
-
|
|
192
|
+
// Replace any occurences of ?ssoMarker=guid or &ssoMarker=guid.
|
|
193
|
+
let updatedHash = window.location.hash.replace(`?${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
194
|
+
updatedHash = updatedHash.replace(`&${getSSOMarker(SSO_REDIRECTION_MARKER_GUID)}`, '');
|
|
195
|
+
window.location.hash = updatedHash;
|
|
193
196
|
}
|
|
194
197
|
/**
|
|
195
198
|
* Perform token based authentication
|