@thoughtspot/visual-embed-sdk 1.47.2 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +11 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +38 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.d.ts +2 -0
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +7 -5
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/embed/app.d.ts +7 -2
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +121 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +32 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +24 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +15 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +99 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +3 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +11 -3
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +51 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +17 -5
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +168 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +8 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +2 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +2 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/test/test-utils.d.ts +1 -0
- package/cjs/src/test/test-utils.d.ts.map +1 -1
- package/cjs/src/test/test-utils.js +26 -1
- package/cjs/src/test/test-utils.js.map +1 -1
- package/cjs/src/tokenizedFetch.d.ts.map +1 -1
- package/cjs/src/tokenizedFetch.js +12 -9
- package/cjs/src/tokenizedFetch.js.map +1 -1
- package/cjs/src/tokenizedFetch.spec.d.ts +2 -0
- package/cjs/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/cjs/src/tokenizedFetch.spec.js +68 -0
- package/cjs/src/tokenizedFetch.spec.js.map +1 -0
- package/cjs/src/types.d.ts +466 -13
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +149 -5
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-CFZ7RDZ9.js → index-Ck-r09gt.js} +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +2 -0
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +7 -2
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +24 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +3 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +1 -0
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.d.ts.map +1 -1
- package/dist/src/tokenizedFetch.spec.d.ts +2 -0
- package/dist/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/dist/src/types.d.ts +466 -13
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +226 -29
- package/dist/tsembed-react.js +225 -28
- package/dist/tsembed.es.js +227 -30
- package/dist/tsembed.js +225 -28
- package/dist/visual-embed-sdk-react-full.d.ts +469 -15
- package/dist/visual-embed-sdk-react.d.ts +469 -15
- package/dist/visual-embed-sdk.d.ts +497 -15
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +12 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +38 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.d.ts +2 -0
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +2 -2
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/embed/app.d.ts +7 -2
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +122 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +32 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +24 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +15 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +100 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +3 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +11 -3
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +51 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +168 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +2 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +2 -0
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +1 -0
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +25 -1
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/tokenizedFetch.d.ts.map +1 -1
- package/lib/src/tokenizedFetch.js +13 -10
- package/lib/src/tokenizedFetch.js.map +1 -1
- package/lib/src/tokenizedFetch.spec.d.ts +2 -0
- package/lib/src/tokenizedFetch.spec.d.ts.map +1 -0
- package/lib/src/tokenizedFetch.spec.js +65 -0
- package/lib/src/tokenizedFetch.spec.js.map +1 -0
- package/lib/src/types.d.ts +466 -13
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +148 -4
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +497 -15
- package/package.json +1 -1
- package/src/auth.spec.ts +55 -1
- package/src/auth.ts +11 -2
- package/src/authToken.ts +2 -2
- package/src/embed/app.spec.ts +154 -0
- package/src/embed/app.ts +13 -2
- package/src/embed/conversation.ts +2 -1
- package/src/embed/liveboard.spec.ts +46 -0
- package/src/embed/liveboard.ts +9 -4
- package/src/embed/search.spec.ts +118 -0
- package/src/embed/search.ts +43 -1
- package/src/embed/spotter-utils.spec.ts +52 -0
- package/src/embed/spotter-utils.ts +19 -3
- package/src/embed/ts-embed.spec.ts +220 -0
- package/src/embed/ts-embed.ts +15 -4
- package/src/index.ts +16 -0
- package/src/mixpanel-service.spec.ts +2 -0
- package/src/mixpanel-service.ts +2 -0
- package/src/test/test-utils.ts +33 -1
- package/src/tokenizedFetch.spec.ts +81 -0
- package/src/tokenizedFetch.ts +14 -11
- package/src/types.ts +496 -13
|
@@ -1901,9 +1901,10 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1901
1901
|
styleSheet__unstable?: string;
|
|
1902
1902
|
/**
|
|
1903
1903
|
* The list of actions to disable from the primary menu, more menu
|
|
1904
|
-
* (...), and the contextual menu.
|
|
1905
|
-
*
|
|
1906
|
-
* Use this to disable
|
|
1904
|
+
* (...), and the contextual menu. Disabled actions are grayed out
|
|
1905
|
+
* and still visible to the user, but cannot be clicked.
|
|
1906
|
+
* Use this when you want to disable an action (keep it visible but non-interactive).
|
|
1907
|
+
* To completely remove an action from the UI, use {@link hiddenActions} instead.
|
|
1907
1908
|
*
|
|
1908
1909
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
1909
1910
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
@@ -1934,9 +1935,10 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1934
1935
|
*/
|
|
1935
1936
|
disabledActionReason?: string;
|
|
1936
1937
|
/**
|
|
1937
|
-
* The list of actions to
|
|
1938
|
-
*
|
|
1939
|
-
* Use this to
|
|
1938
|
+
* The list of actions to completely remove from the embedded view.
|
|
1939
|
+
* Hidden actions are not visible to the user at all (fully removed from the UI).
|
|
1940
|
+
* Use this when you want to remove an action entirely.
|
|
1941
|
+
* To keep an action visible but non-interactive (grayed out), use {@link disabledActions} instead.
|
|
1940
1942
|
*
|
|
1941
1943
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
1942
1944
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
@@ -1955,9 +1957,8 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
1955
1957
|
* The list of actions to display from the primary menu, more menu
|
|
1956
1958
|
* (...), and the contextual menu. These will be only actions that
|
|
1957
1959
|
* are visible to the user.
|
|
1958
|
-
* Use this
|
|
1959
|
-
*
|
|
1960
|
-
* Use either this or hiddenActions.
|
|
1960
|
+
* Use this as an allowlist — only the actions listed here will be shown.
|
|
1961
|
+
* All other actions will be hidden. Use either this or {@link hiddenActions}, not both.
|
|
1961
1962
|
*
|
|
1962
1963
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
1963
1964
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
@@ -2411,6 +2412,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2411
2412
|
/**
|
|
2412
2413
|
* Refresh the auth token when the token is near expiry.
|
|
2413
2414
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
2415
|
+
* @default true
|
|
2414
2416
|
* @example
|
|
2415
2417
|
* ```js
|
|
2416
2418
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
@@ -2962,6 +2964,22 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2962
2964
|
* ```
|
|
2963
2965
|
*/
|
|
2964
2966
|
isLiveboardMasterpiecesEnabled?: boolean;
|
|
2967
|
+
/**
|
|
2968
|
+
* Enable or disable Muze chart phase 1 GA
|
|
2969
|
+
*
|
|
2970
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2971
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
2972
|
+
* @default false
|
|
2973
|
+
* @example
|
|
2974
|
+
* ```js
|
|
2975
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
2976
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2977
|
+
* ... // other embed view config
|
|
2978
|
+
* newChartsLibrary: true,
|
|
2979
|
+
* })
|
|
2980
|
+
* ```
|
|
2981
|
+
*/
|
|
2982
|
+
newChartsLibrary?: boolean;
|
|
2965
2983
|
}
|
|
2966
2984
|
export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
|
|
2967
2985
|
}
|
|
@@ -6702,10 +6720,14 @@ export declare enum DataSourceVisualMode {
|
|
|
6702
6720
|
/**
|
|
6703
6721
|
* ThoughtSpot application pages include actions and menu commands
|
|
6704
6722
|
* for various user-initiated operations. These actions are represented
|
|
6705
|
-
* as enumeration members in the SDK. To
|
|
6706
|
-
*
|
|
6707
|
-
*
|
|
6708
|
-
*
|
|
6723
|
+
* as enumeration members in the SDK. To control actions in the embedded view:
|
|
6724
|
+
* - disabledActions — the action is grayed out and still visible, but non-interactive (user can see but not click).
|
|
6725
|
+
* - hiddenActions — the action is completely removed from the UI (user cannot see it at all).
|
|
6726
|
+
* - visibleActions — allowlist, only these actions are shown; all others are hidden.
|
|
6727
|
+
*
|
|
6728
|
+
* Use disabledActions to disable (gray out) an action.
|
|
6729
|
+
* Use hiddenActions to hide (fully remove) an action.
|
|
6730
|
+
* Use visibleActions to show only specific actions.
|
|
6709
6731
|
* @example
|
|
6710
6732
|
* ```js
|
|
6711
6733
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -7552,6 +7574,26 @@ export declare enum Action {
|
|
|
7552
7574
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw
|
|
7553
7575
|
*/
|
|
7554
7576
|
AxisMenuRemove = "axisMenuRemove",
|
|
7577
|
+
/**
|
|
7578
|
+
* The **Compare with** action in the chart axis customization menu.
|
|
7579
|
+
* Allows comparing data across dimensions or measures.
|
|
7580
|
+
* @example
|
|
7581
|
+
* ```js
|
|
7582
|
+
* disabledActions: [Action.AxisMenuCompare]
|
|
7583
|
+
* ```
|
|
7584
|
+
* @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
|
|
7585
|
+
*/
|
|
7586
|
+
AxisMenuCompare = "axisMenuCompare",
|
|
7587
|
+
/**
|
|
7588
|
+
* The **Merge with** action in the chart axis customization menu.
|
|
7589
|
+
* Allows merging data across dimensions or measures.
|
|
7590
|
+
* @example
|
|
7591
|
+
* ```js
|
|
7592
|
+
* disabledActions: [Action.AxisMenuMerge]
|
|
7593
|
+
* ```
|
|
7594
|
+
* @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
|
|
7595
|
+
*/
|
|
7596
|
+
AxisMenuMerge = "axisMenuMerge",
|
|
7555
7597
|
/**
|
|
7556
7598
|
* @hidden
|
|
7557
7599
|
*/
|
|
@@ -8774,6 +8816,9 @@ export interface DefaultAppInitData {
|
|
|
8774
8816
|
customActions: CustomAction[];
|
|
8775
8817
|
interceptTimeout: number | undefined;
|
|
8776
8818
|
interceptUrls: (string | InterceptedApiType)[];
|
|
8819
|
+
embedExpiryInAuthToken: boolean;
|
|
8820
|
+
shouldBypassPayloadValidation?: boolean;
|
|
8821
|
+
useHostEventsV2?: boolean;
|
|
8777
8822
|
}
|
|
8778
8823
|
/**
|
|
8779
8824
|
* Enum for the type of API intercepted
|
|
@@ -8891,6 +8936,413 @@ export interface ContextObject {
|
|
|
8891
8936
|
objectIds: ObjectIds;
|
|
8892
8937
|
};
|
|
8893
8938
|
}
|
|
8939
|
+
export interface FontProperties {
|
|
8940
|
+
color?: string;
|
|
8941
|
+
bold?: boolean;
|
|
8942
|
+
italic?: boolean;
|
|
8943
|
+
strikeThrough?: boolean;
|
|
8944
|
+
underline?: boolean;
|
|
8945
|
+
}
|
|
8946
|
+
export interface SolidBackgroundAttrs {
|
|
8947
|
+
color?: string;
|
|
8948
|
+
}
|
|
8949
|
+
export interface GradientBackgroundAttrs {
|
|
8950
|
+
backgroundFormatMidpoint?: number;
|
|
8951
|
+
colors?: string[];
|
|
8952
|
+
backgroundFormatRange?: number[];
|
|
8953
|
+
isAutoScaled?: boolean;
|
|
8954
|
+
}
|
|
8955
|
+
/**
|
|
8956
|
+
* Data label filter operators
|
|
8957
|
+
* @group Visual Overrides
|
|
8958
|
+
*/
|
|
8959
|
+
export declare enum DataLabelFilterOperator {
|
|
8960
|
+
/** Greater than */
|
|
8961
|
+
GreaterThan = "GREATER_THAN",
|
|
8962
|
+
/** Less than */
|
|
8963
|
+
LessThan = "LESS_THAN",
|
|
8964
|
+
/** Greater than or equal to */
|
|
8965
|
+
GreaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO",
|
|
8966
|
+
/** Less than or equal to */
|
|
8967
|
+
LessThanOrEqualTo = "LESS_THAN_OR_EQUAL_TO",
|
|
8968
|
+
/** Equal to */
|
|
8969
|
+
EqualTo = "EQUAL_TO",
|
|
8970
|
+
/** Not equal to */
|
|
8971
|
+
NotEqualTo = "NOT_EQUAL_TO"
|
|
8972
|
+
}
|
|
8973
|
+
/**
|
|
8974
|
+
* Conditional formatting operators
|
|
8975
|
+
* @group Visual Overrides
|
|
8976
|
+
*/
|
|
8977
|
+
export declare enum ConditionalFormattingOperator {
|
|
8978
|
+
/** Is equal to */
|
|
8979
|
+
Is = "IS",
|
|
8980
|
+
/** Is not equal to */
|
|
8981
|
+
IsNot = "IS_NOT",
|
|
8982
|
+
/** Contains */
|
|
8983
|
+
Contains = "CONTAINS",
|
|
8984
|
+
/** Does not contain */
|
|
8985
|
+
DoesNotContain = "DOES_NOT_CONTAIN",
|
|
8986
|
+
/** Starts with */
|
|
8987
|
+
StartsWith = "STARTS_WITH",
|
|
8988
|
+
/** Ends with */
|
|
8989
|
+
EndsWith = "ENDS_WITH",
|
|
8990
|
+
/** Greater than */
|
|
8991
|
+
GreaterThan = "GREATER_THAN",
|
|
8992
|
+
/** Less than */
|
|
8993
|
+
LessThan = "LESS_THAN",
|
|
8994
|
+
/** Greater than or equal to */
|
|
8995
|
+
GreaterThanEqualTo = "GREATER_THAN_EQUAL_TO",
|
|
8996
|
+
/** Less than or equal to */
|
|
8997
|
+
LessThanEqualTo = "LESS_THAN_EQUAL_TO",
|
|
8998
|
+
/** Equal to */
|
|
8999
|
+
EqualTo = "EQUAL_TO",
|
|
9000
|
+
/** Not equal to */
|
|
9001
|
+
NotEqualTo = "NOT_EQUAL_TO",
|
|
9002
|
+
/** Is between */
|
|
9003
|
+
IsBetween = "IS_BETWEEN",
|
|
9004
|
+
/** Is null */
|
|
9005
|
+
IsNull = "IS_NULL",
|
|
9006
|
+
/** Is not null */
|
|
9007
|
+
IsNotNull = "IS_NOT_NULL"
|
|
9008
|
+
}
|
|
9009
|
+
/**
|
|
9010
|
+
* Background format types for conditional formatting
|
|
9011
|
+
* @group Visual Overrides
|
|
9012
|
+
*/
|
|
9013
|
+
export declare enum BackgroundFormatType {
|
|
9014
|
+
/** Solid color background */
|
|
9015
|
+
Solid = "SOLID",
|
|
9016
|
+
/** Gradient background */
|
|
9017
|
+
Gradient = "GRADIENT"
|
|
9018
|
+
}
|
|
9019
|
+
/**
|
|
9020
|
+
* Comparison types for conditional formatting
|
|
9021
|
+
* @group Visual Overrides
|
|
9022
|
+
*/
|
|
9023
|
+
export declare enum ConditionalFormattingComparisonType {
|
|
9024
|
+
/** Value-based comparison */
|
|
9025
|
+
ValueBased = "VALUE_BASED",
|
|
9026
|
+
/** Column-based comparison */
|
|
9027
|
+
ColumnBased = "COLUMN_BASED",
|
|
9028
|
+
/** Parameter-based comparison */
|
|
9029
|
+
ParameterBased = "PARAMETER_BASED"
|
|
9030
|
+
}
|
|
9031
|
+
/**
|
|
9032
|
+
* A single conditional formatting rule row
|
|
9033
|
+
* @group Visual Overrides
|
|
9034
|
+
*/
|
|
9035
|
+
export interface ConditionalFormattingRow {
|
|
9036
|
+
/** Comparison operator */
|
|
9037
|
+
operator: ConditionalFormattingOperator | string;
|
|
9038
|
+
/** Value to compare against */
|
|
9039
|
+
value?: string;
|
|
9040
|
+
/** Range values for range-based comparisons */
|
|
9041
|
+
rangeValues?: {
|
|
9042
|
+
min: number;
|
|
9043
|
+
max: number;
|
|
9044
|
+
};
|
|
9045
|
+
/** Plot the formatting as a band/area */
|
|
9046
|
+
plotAsBand?: boolean;
|
|
9047
|
+
/** Highlight this row if the condition is met */
|
|
9048
|
+
isHighlightRow?: boolean;
|
|
9049
|
+
/** Type of comparison: value-based, column-based, or parameter-based */
|
|
9050
|
+
comparisonType?: ConditionalFormattingComparisonType | string;
|
|
9051
|
+
/** Column ID to apply the formatting to (left-hand side) */
|
|
9052
|
+
lhsColumnId?: string;
|
|
9053
|
+
/** Column name to compare against (right-hand side) */
|
|
9054
|
+
columnToCompare?: string;
|
|
9055
|
+
/** Parameter ID to compare against */
|
|
9056
|
+
comparisonParameterId?: string;
|
|
9057
|
+
/** Font properties to apply (color, bold, italic, etc.) */
|
|
9058
|
+
fontProperties?: FontProperties;
|
|
9059
|
+
/** Background format type: solid color or gradient */
|
|
9060
|
+
backgroundFormatType?: BackgroundFormatType | string;
|
|
9061
|
+
/** Solid background color attributes */
|
|
9062
|
+
solidBackgroundAttrs?: SolidBackgroundAttrs;
|
|
9063
|
+
/** Gradient background attributes */
|
|
9064
|
+
gradientBackgroundAttrs?: GradientBackgroundAttrs;
|
|
9065
|
+
}
|
|
9066
|
+
/**
|
|
9067
|
+
* Conditional formatting configuration
|
|
9068
|
+
* @group Visual Overrides
|
|
9069
|
+
*/
|
|
9070
|
+
export interface ConditionalFormatting {
|
|
9071
|
+
/** Array of conditional formatting rules */
|
|
9072
|
+
rows?: ConditionalFormattingRow[];
|
|
9073
|
+
}
|
|
9074
|
+
/**
|
|
9075
|
+
* Color palette for charts
|
|
9076
|
+
* @group Visual Overrides
|
|
9077
|
+
*/
|
|
9078
|
+
export interface ColorPalette {
|
|
9079
|
+
/** Array of color values (hex codes or color names) */
|
|
9080
|
+
colors?: string[];
|
|
9081
|
+
}
|
|
9082
|
+
/**
|
|
9083
|
+
* Legend position options
|
|
9084
|
+
* @group Visual Overrides
|
|
9085
|
+
*/
|
|
9086
|
+
export declare enum LegendPosition {
|
|
9087
|
+
/** Position legend at the top */
|
|
9088
|
+
Top = "top",
|
|
9089
|
+
/** Position legend at the bottom */
|
|
9090
|
+
Bottom = "bottom",
|
|
9091
|
+
/** Position legend on the left */
|
|
9092
|
+
Left = "left",
|
|
9093
|
+
/** Position legend on the right */
|
|
9094
|
+
Right = "right"
|
|
9095
|
+
}
|
|
9096
|
+
/**
|
|
9097
|
+
* Table theme options
|
|
9098
|
+
* @group Visual Overrides
|
|
9099
|
+
*/
|
|
9100
|
+
export declare enum TableTheme {
|
|
9101
|
+
/** Outline theme */
|
|
9102
|
+
Outline = "OUTLINE",
|
|
9103
|
+
/** Row theme */
|
|
9104
|
+
Row = "ROW",
|
|
9105
|
+
/** Zebra theme */
|
|
9106
|
+
Zebra = "ZEBRA"
|
|
9107
|
+
}
|
|
9108
|
+
/**
|
|
9109
|
+
* Table content density options
|
|
9110
|
+
* @group Visual Overrides
|
|
9111
|
+
*/
|
|
9112
|
+
export declare enum TableContentDensity {
|
|
9113
|
+
/** Regular density */
|
|
9114
|
+
Regular = "REGULAR",
|
|
9115
|
+
/** Compact density */
|
|
9116
|
+
Compact = "COMPACT"
|
|
9117
|
+
}
|
|
9118
|
+
/**
|
|
9119
|
+
* Chart legend configuration
|
|
9120
|
+
* @group Visual Overrides
|
|
9121
|
+
*/
|
|
9122
|
+
export interface ChartLegend {
|
|
9123
|
+
/** Show or hide the legend */
|
|
9124
|
+
show?: boolean;
|
|
9125
|
+
/** Position of the legend */
|
|
9126
|
+
position?: LegendPosition | string;
|
|
9127
|
+
/** Color palette to use for legend colors */
|
|
9128
|
+
colorPalette?: ColorPalette;
|
|
9129
|
+
}
|
|
9130
|
+
/**
|
|
9131
|
+
* Filter for data labels
|
|
9132
|
+
* @group Visual Overrides
|
|
9133
|
+
*/
|
|
9134
|
+
export interface DataLabelFilter {
|
|
9135
|
+
/** Filter threshold value */
|
|
9136
|
+
value?: number;
|
|
9137
|
+
/** Filter operator */
|
|
9138
|
+
operator?: DataLabelFilterOperator | string;
|
|
9139
|
+
}
|
|
9140
|
+
/**
|
|
9141
|
+
* Data label configuration for a specific column
|
|
9142
|
+
* @group Visual Overrides
|
|
9143
|
+
*/
|
|
9144
|
+
export interface ColumnDataLabel {
|
|
9145
|
+
/** Column name to apply data label overrides to */
|
|
9146
|
+
name: string;
|
|
9147
|
+
/** Show or hide data labels for this column */
|
|
9148
|
+
visible?: boolean;
|
|
9149
|
+
/** Filter to apply to data labels */
|
|
9150
|
+
filter?: DataLabelFilter | null;
|
|
9151
|
+
}
|
|
9152
|
+
/**
|
|
9153
|
+
* Chart data label configuration
|
|
9154
|
+
* @group Visual Overrides
|
|
9155
|
+
*/
|
|
9156
|
+
export interface ChartDataLabel {
|
|
9157
|
+
/** Show labels for all data points */
|
|
9158
|
+
allLabels?: boolean;
|
|
9159
|
+
/** Show labels for stacked values */
|
|
9160
|
+
stackLabels?: boolean;
|
|
9161
|
+
/** Per-column data label configurations */
|
|
9162
|
+
columnDataLabel?: ColumnDataLabel[];
|
|
9163
|
+
}
|
|
9164
|
+
/**
|
|
9165
|
+
* Chart summaries and totals configuration
|
|
9166
|
+
* @group Visual Overrides
|
|
9167
|
+
*/
|
|
9168
|
+
export interface ChartSummaries {
|
|
9169
|
+
/** Show row totals */
|
|
9170
|
+
showRowTotals?: boolean;
|
|
9171
|
+
/** Show column totals */
|
|
9172
|
+
showColumnTotals?: boolean;
|
|
9173
|
+
/** Show row grand totals */
|
|
9174
|
+
showRowGrandTotals?: boolean;
|
|
9175
|
+
/** Show column grand totals */
|
|
9176
|
+
showColumnGrandTotals?: boolean;
|
|
9177
|
+
}
|
|
9178
|
+
/**
|
|
9179
|
+
* Gridline configuration
|
|
9180
|
+
* @group Visual Overrides
|
|
9181
|
+
*/
|
|
9182
|
+
export interface GridLine {
|
|
9183
|
+
/** Show vertical gridlines */
|
|
9184
|
+
x?: boolean;
|
|
9185
|
+
/** Show horizontal gridlines */
|
|
9186
|
+
y?: boolean;
|
|
9187
|
+
}
|
|
9188
|
+
/**
|
|
9189
|
+
* Chart display configuration
|
|
9190
|
+
* @group Visual Overrides
|
|
9191
|
+
*/
|
|
9192
|
+
export interface ChartDisplay {
|
|
9193
|
+
/** Summary and totals configuration */
|
|
9194
|
+
summaries?: ChartSummaries;
|
|
9195
|
+
/** Show regression line on chart */
|
|
9196
|
+
regressionLine?: boolean;
|
|
9197
|
+
/** Gridline visibility configuration */
|
|
9198
|
+
gridLine?: GridLine;
|
|
9199
|
+
}
|
|
9200
|
+
/**
|
|
9201
|
+
* Y-axis range configuration
|
|
9202
|
+
* @group Visual Overrides
|
|
9203
|
+
*/
|
|
9204
|
+
export interface YAxisRange {
|
|
9205
|
+
/** Minimum value for Y-axis */
|
|
9206
|
+
min?: number;
|
|
9207
|
+
/** Maximum value for Y-axis */
|
|
9208
|
+
max?: number;
|
|
9209
|
+
}
|
|
9210
|
+
/**
|
|
9211
|
+
* Chart axis configuration
|
|
9212
|
+
* @group Visual Overrides
|
|
9213
|
+
*/
|
|
9214
|
+
export interface ChartAxis {
|
|
9215
|
+
/** Column names to link to this axis */
|
|
9216
|
+
linkedColumns?: string[];
|
|
9217
|
+
/** Show the axis name */
|
|
9218
|
+
showName?: boolean;
|
|
9219
|
+
/** Show the axis label values */
|
|
9220
|
+
showLabelValue?: boolean;
|
|
9221
|
+
/** Y-axis range configuration */
|
|
9222
|
+
yAxisRange?: YAxisRange;
|
|
9223
|
+
}
|
|
9224
|
+
/**
|
|
9225
|
+
* Chart column override configuration
|
|
9226
|
+
* @group Visual Overrides
|
|
9227
|
+
*/
|
|
9228
|
+
export interface ChartColumn {
|
|
9229
|
+
/** Column name to apply overrides to */
|
|
9230
|
+
name: string;
|
|
9231
|
+
/** Color for the column (hex code) */
|
|
9232
|
+
color?: string;
|
|
9233
|
+
/** Conditional formatting rules to apply to the column */
|
|
9234
|
+
conditionalFormatting?: ConditionalFormatting;
|
|
9235
|
+
}
|
|
9236
|
+
/**
|
|
9237
|
+
* Chart visualization overrides
|
|
9238
|
+
* @group Visual Overrides
|
|
9239
|
+
*/
|
|
9240
|
+
export interface ChartOverrides {
|
|
9241
|
+
/** Legend configuration */
|
|
9242
|
+
legend?: ChartLegend;
|
|
9243
|
+
/** Data label configuration */
|
|
9244
|
+
dataLabel?: ChartDataLabel;
|
|
9245
|
+
/** Display properties (summaries, regression line, gridlines) */
|
|
9246
|
+
display?: ChartDisplay;
|
|
9247
|
+
/** Per-axis configurations */
|
|
9248
|
+
axis?: ChartAxis[];
|
|
9249
|
+
/** Per-column configurations */
|
|
9250
|
+
columns?: ChartColumn[];
|
|
9251
|
+
/** Update mask paths for partial updates */
|
|
9252
|
+
updateMaskPaths?: string[];
|
|
9253
|
+
}
|
|
9254
|
+
/**
|
|
9255
|
+
* Table column override configuration
|
|
9256
|
+
* @group Visual Overrides
|
|
9257
|
+
*/
|
|
9258
|
+
export interface TableColumn {
|
|
9259
|
+
/**
|
|
9260
|
+
* Name of the column to apply overrides to
|
|
9261
|
+
*/
|
|
9262
|
+
name: string;
|
|
9263
|
+
/**
|
|
9264
|
+
* Enable or disable text wrapping for the column
|
|
9265
|
+
*/
|
|
9266
|
+
wrapText?: boolean;
|
|
9267
|
+
/**
|
|
9268
|
+
* Show or hide the column
|
|
9269
|
+
*/
|
|
9270
|
+
show?: boolean;
|
|
9271
|
+
/**
|
|
9272
|
+
* Conditional formatting rules to apply to the column
|
|
9273
|
+
*/
|
|
9274
|
+
conditionalFormatting?: ConditionalFormatting;
|
|
9275
|
+
}
|
|
9276
|
+
/**
|
|
9277
|
+
* Table display configuration
|
|
9278
|
+
* @group Visual Overrides
|
|
9279
|
+
*/
|
|
9280
|
+
export interface TableDisplay {
|
|
9281
|
+
/** Table theme */
|
|
9282
|
+
tableTheme?: TableTheme | string;
|
|
9283
|
+
/** Table content density */
|
|
9284
|
+
tableContentDensity?: TableContentDensity | string;
|
|
9285
|
+
}
|
|
9286
|
+
/**
|
|
9287
|
+
* Column summary visibility configuration
|
|
9288
|
+
* @group Visual Overrides
|
|
9289
|
+
*/
|
|
9290
|
+
export interface ColumnSummaryVisibility {
|
|
9291
|
+
/** Column ID to control summary visibility for */
|
|
9292
|
+
columnId: string;
|
|
9293
|
+
/** Show or hide summary for this column */
|
|
9294
|
+
visible: boolean;
|
|
9295
|
+
}
|
|
9296
|
+
/**
|
|
9297
|
+
* Display summary configuration
|
|
9298
|
+
* @group Visual Overrides
|
|
9299
|
+
*/
|
|
9300
|
+
export interface DisplaySummaryConfig {
|
|
9301
|
+
/** Show all column summaries by default */
|
|
9302
|
+
showAllSummaries?: boolean;
|
|
9303
|
+
/** Per-column summary visibility overrides */
|
|
9304
|
+
columnVisibility?: ColumnSummaryVisibility[];
|
|
9305
|
+
}
|
|
9306
|
+
/**
|
|
9307
|
+
* Table visualization overrides
|
|
9308
|
+
* @group Visual Overrides
|
|
9309
|
+
*/
|
|
9310
|
+
export interface TableOverrides {
|
|
9311
|
+
/** Per-column configurations (properties, conditional formatting) */
|
|
9312
|
+
columns?: TableColumn[];
|
|
9313
|
+
/** Table display properties (theme, density) */
|
|
9314
|
+
display?: TableDisplay;
|
|
9315
|
+
/** Summary/headline column visibility configuration */
|
|
9316
|
+
displaySummaryConfig?: DisplaySummaryConfig;
|
|
9317
|
+
/** Update mask paths for partial updates */
|
|
9318
|
+
updateMaskPaths?: string[];
|
|
9319
|
+
}
|
|
9320
|
+
/**
|
|
9321
|
+
* Visualization overrides to customize chart and table rendering
|
|
9322
|
+
* within embedded ThoughtSpot components.
|
|
9323
|
+
*
|
|
9324
|
+
* @group Visual Overrides
|
|
9325
|
+
* @example
|
|
9326
|
+
* ```js
|
|
9327
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
9328
|
+
* visualOverrides: {
|
|
9329
|
+
* chart: {
|
|
9330
|
+
* legend: { show: true, position: 'bottom' },
|
|
9331
|
+
* columns: [{ name: 'Revenue', color: '#1f77b4' }],
|
|
9332
|
+
* },
|
|
9333
|
+
* table: {
|
|
9334
|
+
* display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
|
|
9335
|
+
* },
|
|
9336
|
+
* },
|
|
9337
|
+
* });
|
|
9338
|
+
* ```
|
|
9339
|
+
*/
|
|
9340
|
+
export interface VisualizationOverrides {
|
|
9341
|
+
/** Chart visualization overrides */
|
|
9342
|
+
chart?: ChartOverrides;
|
|
9343
|
+
/** Table visualization overrides */
|
|
9344
|
+
table?: TableOverrides;
|
|
9345
|
+
}
|
|
8894
9346
|
export interface LiveboardTab {
|
|
8895
9347
|
id: string;
|
|
8896
9348
|
name: string;
|
|
@@ -9361,6 +9813,7 @@ declare class TsEmbed {
|
|
|
9361
9813
|
* @returns
|
|
9362
9814
|
*/
|
|
9363
9815
|
protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void;
|
|
9816
|
+
private shouldSkipEvent;
|
|
9364
9817
|
/**
|
|
9365
9818
|
* Executes all registered event handlers for a particular event type
|
|
9366
9819
|
* @param eventType The event type
|
|
@@ -10004,6 +10457,7 @@ export interface ConversationViewConfig extends SpotterEmbedViewConfig {
|
|
|
10004
10457
|
export interface SpotterAppInitData extends DefaultAppInitData {
|
|
10005
10458
|
embedParams?: {
|
|
10006
10459
|
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
10460
|
+
visualOverridesParams?: VisualizationOverrides | null;
|
|
10007
10461
|
};
|
|
10008
10462
|
}
|
|
10009
10463
|
/**
|
|
@@ -10617,7 +11071,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
10617
11071
|
/**
|
|
10618
11072
|
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
|
|
10619
11073
|
* following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
|
|
10620
|
-
* This feature is GA from version 26.5.0.cl
|
|
11074
|
+
* This feature is GA from version 26.5.0.cl. It is disabled by default in embed deployments.
|
|
10621
11075
|
*
|
|
10622
11076
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
10623
11077
|
* @type {boolean}
|
|
@@ -10821,6 +11275,11 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
10821
11275
|
* ```
|
|
10822
11276
|
*/
|
|
10823
11277
|
enableLiveboardDataCache?: boolean;
|
|
11278
|
+
/**
|
|
11279
|
+
* Visual overrides to customize the chart or table properties.
|
|
11280
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
11281
|
+
*/
|
|
11282
|
+
visualOverrides?: VisualizationOverrides;
|
|
10824
11283
|
}
|
|
10825
11284
|
/**
|
|
10826
11285
|
* APP_INIT data shape for AppEmbed.
|
|
@@ -11555,7 +12014,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
11555
12014
|
/**
|
|
11556
12015
|
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
|
|
11557
12016
|
* following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
|
|
11558
|
-
* This feature is GA from version 26.5.0.cl
|
|
12017
|
+
* This feature is GA from version 26.5.0.cl. It is disabled by default in embed deployments.
|
|
11559
12018
|
*
|
|
11560
12019
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
11561
12020
|
* @type {boolean}
|
|
@@ -12086,9 +12545,32 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
12086
12545
|
* ```
|
|
12087
12546
|
*/
|
|
12088
12547
|
focusSearchBarOnRender?: boolean;
|
|
12548
|
+
/**
|
|
12549
|
+
* Enable or disable Muze chart phase 1 GA
|
|
12550
|
+
*
|
|
12551
|
+
* Supported embed types: `SearchEmbed`
|
|
12552
|
+
* @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
|
|
12553
|
+
* @default false
|
|
12554
|
+
* @example
|
|
12555
|
+
* ```js
|
|
12556
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
12557
|
+
* ... // other embed view config
|
|
12558
|
+
* newChartsLibrary: true,
|
|
12559
|
+
* })
|
|
12560
|
+
* ```
|
|
12561
|
+
*/
|
|
12562
|
+
newChartsLibrary?: boolean;
|
|
12563
|
+
/**
|
|
12564
|
+
* Visual overrides to customize the chart or table properties.
|
|
12565
|
+
* @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
|
|
12566
|
+
*/
|
|
12567
|
+
visualOverrides?: VisualizationOverrides;
|
|
12089
12568
|
}
|
|
12090
12569
|
export interface SearchAppInitData extends DefaultAppInitData {
|
|
12091
12570
|
searchOptions?: SearchOptions$1;
|
|
12571
|
+
embedParams?: {
|
|
12572
|
+
visualOverridesParams?: VisualizationOverrides | null;
|
|
12573
|
+
};
|
|
12092
12574
|
}
|
|
12093
12575
|
/**
|
|
12094
12576
|
* Embed ThoughtSpot search
|
package/lib/package.json
CHANGED
package/lib/src/auth.d.ts.map
CHANGED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,CAa3E,CAAC;AAoGF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAiBxD,CAAC;AAEF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAkBxD,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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAuthenticationToken } from './authToken';
|
|
1
|
+
import { getAuthenticationToken, storeAuthTokenInCache, getCacheAuthToken } from './authToken';
|
|
2
2
|
import { getEmbedConfig } from './embed/embedConfig';
|
|
3
3
|
import { initMixpanel } from './mixpanel-service';
|
|
4
4
|
import { AuthType, EmbedEvent, } from './types';
|
|
@@ -382,6 +382,10 @@ async function samlPopupFlow(ssoURL, triggerContainer, triggerText) {
|
|
|
382
382
|
samlCompletionPromise = samlCompletionPromise || new Promise((resolve, reject) => {
|
|
383
383
|
window.addEventListener('message', (e) => {
|
|
384
384
|
if (e.data.type === EmbedEvent.SAMLComplete) {
|
|
385
|
+
if (e.data.accessToken) {
|
|
386
|
+
const decodedToken = decodeURIComponent(e.data.accessToken);
|
|
387
|
+
storeAuthTokenInCache(decodedToken);
|
|
388
|
+
}
|
|
385
389
|
samlCompletionResolved = true;
|
|
386
390
|
if (popupClosedCheck) {
|
|
387
391
|
clearInterval(popupClosedCheck);
|
|
@@ -419,7 +423,13 @@ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
|
|
|
419
423
|
const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
|
|
420
424
|
if (embedConfig.inPopup) {
|
|
421
425
|
await samlPopupFlow(ssoURL, embedConfig.authTriggerContainer, embedConfig.authTriggerText);
|
|
422
|
-
|
|
426
|
+
const cachedToken = getCacheAuthToken();
|
|
427
|
+
if (cachedToken) {
|
|
428
|
+
loggedInStatus = true;
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
loggedInStatus = await isLoggedIn(thoughtSpotHost);
|
|
432
|
+
}
|
|
423
433
|
return;
|
|
424
434
|
}
|
|
425
435
|
window.location.href = ssoURL;
|