@thoughtspot/visual-embed-sdk 1.20.0-alpha.2 → 1.20.0-prerender.1
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/dist/src/auth.d.ts +75 -5
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +19 -7
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +39 -19
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +19 -7
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +7 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +11 -3
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +76 -5
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.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/mixpanel-service.d.ts +8 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +4 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +11 -2
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/types.d.ts +429 -97
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +7 -0
- package/dist/src/utils/answerService.d.ts.map +1 -1
- package/dist/src/utils/authService.d.ts +30 -0
- package/dist/src/utils/authService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +12 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +7 -0
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed.es.js +818 -285
- package/dist/tsembed.js +791 -284
- package/lib/package.json +4 -3
- package/lib/src/auth.d.ts +75 -5
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +86 -26
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +14 -5
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +5 -3
- package/lib/src/config.js.map +1 -1
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +19 -7
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +26 -16
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +12 -12
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +39 -19
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +49 -15
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +1 -1
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +19 -7
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +50 -38
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +37 -30
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +14 -26
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +7 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +6 -7
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +11 -3
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +19 -15
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +16 -19
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +76 -5
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +150 -72
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +23 -24
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.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/mixpanel-service.d.ts +8 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +13 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +9 -7
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +29 -8
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +4 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js +4 -0
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +11 -2
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +36 -25
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +429 -97
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +310 -72
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +7 -0
- package/lib/src/utils/answerService.d.ts.map +1 -1
- package/lib/src/utils/answerService.js +7 -0
- package/lib/src/utils/answerService.js.map +1 -1
- package/lib/src/utils/answerService.spec.js.map +1 -1
- package/lib/src/utils/authService.d.ts +30 -0
- package/lib/src/utils/authService.d.ts.map +1 -1
- package/lib/src/utils/authService.js +39 -2
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/processData.d.ts +12 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +33 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +7 -0
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +17 -3
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +12 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +24 -19
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +664 -141
- package/package.json +4 -3
- package/src/auth.spec.ts +68 -150
- package/src/auth.ts +141 -101
- package/src/config.spec.ts +2 -4
- package/src/config.ts +5 -3
- package/src/embed/app.spec.ts +25 -14
- package/src/embed/app.ts +49 -37
- package/src/embed/base.spec.ts +6 -12
- package/src/embed/base.ts +74 -57
- package/src/embed/embed.spec.ts +5 -6
- package/src/embed/liveboard.spec.ts +56 -37
- package/src/embed/liveboard.ts +67 -65
- package/src/embed/pinboard.spec.ts +26 -29
- package/src/embed/search-bar.tsx +14 -9
- package/src/embed/search.spec.ts +31 -21
- package/src/embed/search.ts +28 -22
- package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
- package/src/embed/ts-embed.spec.ts +70 -148
- package/src/embed/ts-embed.ts +180 -157
- package/src/errors.ts +3 -6
- package/src/index.ts +23 -7
- package/src/mixpanel-service.spec.ts +1 -3
- package/src/mixpanel-service.ts +13 -1
- package/src/react/index.spec.tsx +72 -15
- package/src/react/index.tsx +43 -54
- package/src/react/util.ts +8 -4
- package/src/test/test-utils.ts +43 -39
- package/src/types.ts +427 -97
- package/src/utils/answerService.spec.ts +3 -5
- package/src/utils/answerService.ts +21 -17
- package/src/utils/authService.spec.ts +26 -41
- package/src/utils/authService.ts +47 -21
- package/src/utils/processData.spec.ts +26 -59
- package/src/utils/processData.ts +36 -14
- package/src/utils/processTrigger.spec.ts +1 -6
- package/src/utils/processTrigger.ts +18 -9
- package/src/utils.spec.ts +8 -12
- package/src/utils.ts +25 -26
package/dist/src/auth.d.ts
CHANGED
|
@@ -12,12 +12,23 @@ export declare const EndPoints: {
|
|
|
12
12
|
BASIC_LOGIN: string;
|
|
13
13
|
LOGOUT: string;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Enum for auth failure types. This is the parameter passed to the listner
|
|
17
|
+
* of {@link AuthStatus.FAILURE}.
|
|
18
|
+
*
|
|
19
|
+
* @group Authentication / Init
|
|
20
|
+
*/
|
|
15
21
|
export declare enum AuthFailureType {
|
|
16
22
|
SDK = "SDK",
|
|
17
23
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
18
24
|
EXPIRY = "EXPIRY",
|
|
19
25
|
OTHER = "OTHER"
|
|
20
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
29
|
+
*
|
|
30
|
+
* @group Authentication / Init
|
|
31
|
+
*/
|
|
21
32
|
export declare enum AuthStatus {
|
|
22
33
|
/**
|
|
23
34
|
* Emits when the SDK fails to authenticate
|
|
@@ -39,40 +50,97 @@ export declare enum AuthStatus {
|
|
|
39
50
|
* Emitted when inPopup: true in the SAMLRedirect flow.
|
|
40
51
|
* And, we are waiting for popup to be triggered either programatically
|
|
41
52
|
* or by the trigger button.
|
|
53
|
+
*
|
|
42
54
|
* @version SDK: 1.19.0
|
|
43
55
|
*/
|
|
44
56
|
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
45
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Event emitter returned from {@link init}.
|
|
60
|
+
*
|
|
61
|
+
* @group Authentication / Init
|
|
62
|
+
*/
|
|
63
|
+
export interface AuthEventEmitter {
|
|
64
|
+
/**
|
|
65
|
+
* Registed a listener on Auth failure.
|
|
66
|
+
*
|
|
67
|
+
* @param event
|
|
68
|
+
* @param listener
|
|
69
|
+
*/
|
|
70
|
+
on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
71
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
72
|
+
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
73
|
+
/**
|
|
74
|
+
* Trigger an event on the emitter returned from init.
|
|
75
|
+
*
|
|
76
|
+
* @param {@link AuthEvent}
|
|
77
|
+
*/
|
|
78
|
+
emit(event: AuthEvent): void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Events which can be triggered on the emitter returned from {@link init}.
|
|
82
|
+
*
|
|
83
|
+
* @group Authentication / Init
|
|
84
|
+
*/
|
|
46
85
|
export declare enum AuthEvent {
|
|
47
86
|
/**
|
|
48
|
-
* Manually trigger the SSO popup.
|
|
87
|
+
* Manually trigger the SSO popup. This is useful with
|
|
88
|
+
* authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
|
|
49
89
|
*/
|
|
50
90
|
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
51
91
|
}
|
|
52
|
-
|
|
53
|
-
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
*/
|
|
95
|
+
export declare function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @param eventEmitter
|
|
99
|
+
*/
|
|
100
|
+
export declare function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
54
104
|
export declare function notifyAuthSDKSuccess(): void;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
55
108
|
export declare function notifyAuthSuccess(): void;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @param failureType
|
|
112
|
+
*/
|
|
56
113
|
export declare function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
57
117
|
export declare function notifyLogout(): void;
|
|
58
118
|
/**
|
|
59
119
|
* Return releaseVersion if available
|
|
60
120
|
*/
|
|
61
121
|
export declare function getReleaseVersion(): string;
|
|
62
122
|
/**
|
|
63
|
-
* Return a promise that resolves with the session
|
|
64
|
-
* successful. And info is available.
|
|
123
|
+
* Return a promise that resolves with the session information when
|
|
124
|
+
* authentication is successful. And info is available.
|
|
125
|
+
*
|
|
126
|
+
* @group Global methods
|
|
65
127
|
*/
|
|
66
128
|
export declare function getSessionInfo(): Promise<any>;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @param sessionDetails
|
|
132
|
+
*/
|
|
67
133
|
export declare function initSession(sessionDetails: any): void;
|
|
68
134
|
export declare const getAuthenticaionToken: (embedConfig: EmbedConfig) => Promise<any>;
|
|
69
135
|
/**
|
|
70
136
|
* Perform token based authentication
|
|
137
|
+
*
|
|
71
138
|
* @param embedConfig The embed configuration
|
|
72
139
|
*/
|
|
73
140
|
export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
74
141
|
/**
|
|
75
142
|
* Validate embedConfig parameters required for cookielessTokenAuth
|
|
143
|
+
*
|
|
76
144
|
* @param embedConfig The embed configuration
|
|
77
145
|
*/
|
|
78
146
|
export declare const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
@@ -82,6 +150,7 @@ export declare const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promis
|
|
|
82
150
|
*
|
|
83
151
|
* Warning: This feature is primarily intended for developer testing. It is
|
|
84
152
|
* strongly advised not to use this authentication method in production.
|
|
153
|
+
*
|
|
85
154
|
* @param embedConfig The embed configuration
|
|
86
155
|
*/
|
|
87
156
|
export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
@@ -90,6 +159,7 @@ export declare const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
|
90
159
|
export declare const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
91
160
|
/**
|
|
92
161
|
* Perform authentication on the ThoughtSpot cluster
|
|
162
|
+
*
|
|
93
163
|
* @param embedConfig The embed configuration
|
|
94
164
|
*/
|
|
95
165
|
export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
|
package/dist/src/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["auth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["auth.ts"],"names":[],"mappings":"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"}
|
package/dist/src/config.d.ts
CHANGED
package/dist/src/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqBtC
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqBtC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WAAY,WAAW,KAAG,MAiBxD,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,WAAW,KAAG,MAgBnD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,eAAO,MAAM,oBAAoB,SAAS,CAAC"}
|
package/dist/src/embed/app.d.ts
CHANGED
|
@@ -45,7 +45,8 @@ export declare enum Page {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* The view configuration for full app embedding.
|
|
48
|
-
*
|
|
48
|
+
*
|
|
49
|
+
* @group Embed components
|
|
49
50
|
*/
|
|
50
51
|
export interface AppViewConfig extends ViewConfig {
|
|
51
52
|
/**
|
|
@@ -70,8 +71,9 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
70
71
|
*/
|
|
71
72
|
pageId?: Page;
|
|
72
73
|
/**
|
|
73
|
-
* This puts a filter tag on the application. All metadata lists in the
|
|
74
|
-
* Liveboards and answers, would be filtered by this
|
|
74
|
+
* This puts a filter tag on the application. All metadata lists in the
|
|
75
|
+
* application, such as Liveboards and answers, would be filtered by this
|
|
76
|
+
* tag.
|
|
75
77
|
*/
|
|
76
78
|
tag?: string;
|
|
77
79
|
/**
|
|
@@ -81,19 +83,22 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
81
83
|
/**
|
|
82
84
|
* Render liveboards using the new v2 rendering mode
|
|
83
85
|
* This is a transient flag which is primarily meant for internal use
|
|
86
|
+
*
|
|
84
87
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
85
88
|
* @hidden
|
|
86
89
|
*/
|
|
87
90
|
liveboardV2?: boolean;
|
|
88
91
|
/**
|
|
89
92
|
* If set to true, the Search Assist feature is enabled.
|
|
93
|
+
*
|
|
90
94
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
91
95
|
*/
|
|
92
96
|
enableSearchAssist?: boolean;
|
|
93
97
|
}
|
|
94
98
|
/**
|
|
95
99
|
* Embeds full ThoughtSpot experience in a host application.
|
|
96
|
-
*
|
|
100
|
+
*
|
|
101
|
+
* @group Embed components
|
|
97
102
|
*/
|
|
98
103
|
export declare class AppEmbed extends V1Embed {
|
|
99
104
|
protected viewConfig: AppViewConfig;
|
|
@@ -102,35 +107,42 @@ export declare class AppEmbed extends V1Embed {
|
|
|
102
107
|
* Constructs a map of parameters to be passed on to the
|
|
103
108
|
* embedded Liveboard or visualization.
|
|
104
109
|
*/
|
|
105
|
-
|
|
110
|
+
protected getEmbedParams(): string;
|
|
106
111
|
/**
|
|
107
112
|
* Constructs the URL of the ThoughtSpot app page to be rendered.
|
|
113
|
+
*
|
|
108
114
|
* @param pageId The ID of the page to be embedded.
|
|
109
115
|
*/
|
|
110
116
|
private getIFrameSrc;
|
|
111
117
|
/**
|
|
112
118
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
119
|
+
*
|
|
113
120
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
114
121
|
*/
|
|
115
122
|
private getPageRoute;
|
|
116
123
|
/**
|
|
117
124
|
* Formats the path provided by the user.
|
|
125
|
+
*
|
|
118
126
|
* @param path The URL path.
|
|
119
127
|
* @returns The URL path that the embedded app understands.
|
|
120
128
|
*/
|
|
121
129
|
private formatPath;
|
|
122
130
|
/**
|
|
123
131
|
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
124
|
-
* This is used for embedding answers, pinboards, visualizations and full application
|
|
132
|
+
* This is used for embedding answers, pinboards, visualizations and full application
|
|
133
|
+
* only.
|
|
134
|
+
*
|
|
125
135
|
* @param path string | number The string, set to iframe src and navigate to new page
|
|
126
136
|
* eg: appEmbed.navigateToPage('pinboards')
|
|
127
|
-
* When used with `noReload` this can also be a number
|
|
137
|
+
* When used with `noReload` (default: true) this can also be a number
|
|
138
|
+
* like 1/-1 to go forward/back.
|
|
128
139
|
* @param noReload boolean Trigger the navigation without reloading the page
|
|
129
140
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
130
141
|
*/
|
|
131
142
|
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
132
143
|
/**
|
|
133
144
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
145
|
+
*
|
|
134
146
|
* @param renderOptions An object containing the page ID
|
|
135
147
|
* to be embedded.
|
|
136
148
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACmB,WAAW,EAAa,UAAU,EAC3D,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;GAEG;AAEH,oBAAY,IAAI;IACZ;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,UAAU,eAAe;IACzB;;OAEG;IACH,SAAS,cAAc;IACvB;;OAEG;IACH,IAAI,SAAS;IACb;;OAEG;IACH,MAAM,WAAW;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC7C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,OAAO;IACjC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAC;gBAGxB,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa;IAI/D;;;OAGG;IACH,SAAS,CAAC,cAAc;IAoCxB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAWpB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAoBpB;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IAalB;;;;;;;;;;;OAWG;IACI,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,UAAQ,GAAG,IAAI;IAsBpE;;;;;OAKG;IACI,MAAM,IAAI,QAAQ;CAO5B"}
|
package/dist/src/embed/base.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import { EmbedConfig, PrefetchFeatures } from '../types';
|
|
2
|
+
import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, AuthEventEmitter } from '../auth';
|
|
3
|
+
export declare let authPromise: Promise<boolean>;
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Gets the configuration embed was initialized with.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
7
|
-
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
7
|
+
* @returns {@link EmbedConfig} The configuration embed was initialized with.
|
|
8
|
+
* @version SDK: 1.19.0 | ThoughtSpot: *
|
|
9
|
+
* @group Global methods
|
|
8
10
|
*/
|
|
9
|
-
import EventEmitter from 'eventemitter3';
|
|
10
|
-
import { EmbedConfig, PrefetchFeatures } from '../types';
|
|
11
|
-
import { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout } from '../auth';
|
|
12
|
-
export declare let authPromise: Promise<boolean>;
|
|
13
11
|
export declare const getEmbedConfig: () => EmbedConfig;
|
|
14
12
|
export declare const getAuthPromise: () => Promise<boolean>;
|
|
15
13
|
export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
|
|
@@ -18,40 +16,62 @@ export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogou
|
|
|
18
16
|
*/
|
|
19
17
|
export declare const handleAuth: () => Promise<boolean>;
|
|
20
18
|
/**
|
|
21
|
-
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
19
|
+
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
20
|
+
* prefetched resources and serve them from the user's local disk to provide faster access
|
|
21
|
+
* to your app.
|
|
22
|
+
*
|
|
22
23
|
* @param url The URL provided for prefetch
|
|
23
24
|
* @param prefetchFeatures Specify features which needs to be prefetched.
|
|
24
25
|
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
|
|
26
|
+
* @group Global methods
|
|
25
27
|
*/
|
|
26
28
|
export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[]) => void;
|
|
27
29
|
/**
|
|
28
30
|
* Initializes the Visual Embed SDK globally and perform
|
|
29
31
|
* authentication if applicable.
|
|
32
|
+
*
|
|
30
33
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
31
34
|
* authentication mechanism and so on.
|
|
32
|
-
* example
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```js
|
|
37
|
+
* const authStatus = init({
|
|
38
|
+
* thoughtSpotHost: 'https://my.thoughtspot.cloud',
|
|
39
|
+
* authType: AuthType.None,
|
|
40
|
+
* });
|
|
41
|
+
* authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
|
|
42
|
+
* ```
|
|
43
|
+
* @returns {@link AuthEventEmitter} event emitter which emits events on authentication success,
|
|
44
|
+
* failure and logout. See {@link AuthStatus}
|
|
35
45
|
* @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
46
|
+
* @group Authentication / Init
|
|
47
|
+
*/
|
|
48
|
+
export declare const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
36
51
|
*/
|
|
37
|
-
export declare const init: (embedConfig: EmbedConfig) => EventEmitter;
|
|
38
52
|
export declare function disableAutoLogin(): void;
|
|
39
53
|
/**
|
|
40
|
-
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
41
|
-
* the SDK from automatically logging in again.
|
|
54
|
+
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
55
|
+
* prevent the SDK from automatically logging in again.
|
|
42
56
|
*
|
|
43
|
-
* You can call the `init` method again to re login, if autoLogin is set to
|
|
44
|
-
* second call it will be honored.
|
|
57
|
+
* You can call the `init` method again to re login, if autoLogin is set to
|
|
58
|
+
* true in this second call it will be honored.
|
|
45
59
|
*
|
|
46
60
|
* @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
|
|
47
61
|
* @returns Promise which resolves when logout completes.
|
|
48
62
|
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
63
|
+
* @group Global methods
|
|
49
64
|
*/
|
|
50
65
|
export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
|
|
51
66
|
/**
|
|
52
|
-
* Renders functions in a queue, resolves to next function only after the callback next
|
|
67
|
+
* Renders functions in a queue, resolves to next function only after the callback next
|
|
68
|
+
* is called
|
|
69
|
+
*
|
|
53
70
|
* @param fn The function being registered
|
|
54
71
|
*/
|
|
55
72
|
export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
56
76
|
export declare function reset(): void;
|
|
57
77
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAYA,OAAO,EAAY,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAMH,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EAEZ,gBAAgB,EACnB,MAAM,SAAS,CAAC;AAUjB,eAAO,IAAI,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAO,WAAqB,CAAC;AAExD,eAAO,MAAM,cAAc,QAAO,QAAQ,OAAO,CAAgB,CAAC;AAElE,OAAO,EACH,iBAAiB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,YAAY,GAC3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,QAAO,QAAQ,OAAO,CAe5C,CAAC;AASF;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,SAAU,MAAM,qBAAqB,gBAAgB,EAAE,KAAG,IAqB9E,CAAC;AAiCF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,gBAAiB,WAAW,KAAG,gBA2B/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,uCAAoC,QAAQ,OAAO,CAQrE,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,sBAAuB,GAAG,KAAK,IAAI,KAAK,QAAQ,GAAG,CAAC,KAAG,QAAQ,GAAG,CAQ3F,CAAC;AAGF;;GAEG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAI5B"}
|
|
@@ -12,12 +12,14 @@ import { DOMSelector, HostEvent, ViewConfig } from '../types';
|
|
|
12
12
|
import { V1Embed } from './ts-embed';
|
|
13
13
|
/**
|
|
14
14
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @group Embed components
|
|
16
17
|
*/
|
|
17
18
|
export interface LiveboardViewConfig extends ViewConfig {
|
|
18
19
|
/**
|
|
19
20
|
* If set to true, the embedded object container dynamically resizes
|
|
20
21
|
* according to the height of the Liveboard.
|
|
22
|
+
*
|
|
21
23
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
22
24
|
*/
|
|
23
25
|
fullHeight?: boolean;
|
|
@@ -25,6 +27,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
25
27
|
* This is the minimum height(in pixels) for a full height Liveboard.
|
|
26
28
|
* Setting this height helps resolves issues with empty Liveboards and
|
|
27
29
|
* other screens navigable from a Liveboard.
|
|
30
|
+
*
|
|
28
31
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
29
32
|
* @default 500
|
|
30
33
|
*/
|
|
@@ -36,11 +39,13 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
36
39
|
/**
|
|
37
40
|
* The Liveboard to display in the embedded view.
|
|
38
41
|
* Use either of liveboardId or pinboardId to reference the Liveboard to embed.
|
|
42
|
+
*
|
|
39
43
|
* @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
|
|
40
44
|
*/
|
|
41
45
|
liveboardId?: string;
|
|
42
46
|
/**
|
|
43
47
|
* To support backward compatibility
|
|
48
|
+
*
|
|
44
49
|
* @hidden
|
|
45
50
|
*/
|
|
46
51
|
pinboardId?: string;
|
|
@@ -51,6 +56,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
51
56
|
/**
|
|
52
57
|
* If set to true, all filter chips from a
|
|
53
58
|
* Liveboard page will be read-only (no X buttons)
|
|
59
|
+
*
|
|
54
60
|
* @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
|
|
55
61
|
*/
|
|
56
62
|
preventLiveboardFilterRemoval?: boolean;
|
|
@@ -58,28 +64,33 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
58
64
|
* Array of viz ids which should be visible when the liveboard
|
|
59
65
|
* first renders. This can be changed by triggering the "SetVisibleVizs"
|
|
60
66
|
* event.
|
|
67
|
+
*
|
|
61
68
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
62
69
|
*/
|
|
63
70
|
visibleVizs?: string[];
|
|
64
71
|
/**
|
|
65
72
|
* To support backward compatibilty
|
|
73
|
+
*
|
|
66
74
|
* @hidden
|
|
67
75
|
*/
|
|
68
76
|
preventPinboardFilterRemoval?: boolean;
|
|
69
77
|
/**
|
|
70
78
|
* Render embedded Liveboards and visualizations in the new Liveboard experience mode
|
|
79
|
+
*
|
|
71
80
|
* @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
|
|
72
81
|
*/
|
|
73
82
|
liveboardV2?: boolean;
|
|
74
83
|
/**
|
|
75
84
|
* Tab Id of the Liveboard that is supposed to be active
|
|
85
|
+
*
|
|
76
86
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
77
87
|
*/
|
|
78
88
|
activeTabId?: string;
|
|
79
89
|
}
|
|
80
90
|
/**
|
|
81
91
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
82
|
-
*
|
|
92
|
+
*
|
|
93
|
+
* @group Embed components
|
|
83
94
|
*/
|
|
84
95
|
export declare class LiveboardEmbed extends V1Embed {
|
|
85
96
|
protected viewConfig: LiveboardViewConfig;
|
|
@@ -89,19 +100,17 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
89
100
|
* Construct a map of params to be passed on to the
|
|
90
101
|
* embedded Liveboard or visualization.
|
|
91
102
|
*/
|
|
92
|
-
|
|
103
|
+
protected getEmbedParams(): string;
|
|
104
|
+
private getIframeSuffixSrc;
|
|
93
105
|
/**
|
|
94
106
|
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
95
107
|
* to be loaded within the iframe.
|
|
96
|
-
* @param liveboardId The GUID of the Liveboard.
|
|
97
|
-
* @param vizId The optional GUID of a visualization within the Liveboard.
|
|
98
|
-
* @param runtimeFilters A list of runtime filters to be applied to
|
|
99
|
-
* the Liveboard or visualization on load.
|
|
100
108
|
*/
|
|
101
109
|
private getIFrameSrc;
|
|
102
110
|
/**
|
|
103
111
|
* Set the iframe height as per the computed height received
|
|
104
112
|
* from the ThoughtSpot app.
|
|
113
|
+
*
|
|
105
114
|
* @param data The event payload
|
|
106
115
|
*/
|
|
107
116
|
private updateIFrameHeight;
|
|
@@ -109,16 +118,19 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
109
118
|
private setIframeHeightForNonEmbedLiveboard;
|
|
110
119
|
/**
|
|
111
120
|
* Triggers an event to the embedded app
|
|
121
|
+
*
|
|
112
122
|
* @param messageType The event type
|
|
113
123
|
* @param data The payload to send with the message
|
|
114
124
|
*/
|
|
115
125
|
trigger(messageType: HostEvent, data?: any): Promise<any>;
|
|
116
126
|
/**
|
|
117
127
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
128
|
+
*
|
|
118
129
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
119
130
|
* visualization ID and the runtime filters.
|
|
120
131
|
*/
|
|
121
132
|
render(): LiveboardEmbed;
|
|
133
|
+
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
122
134
|
}
|
|
123
135
|
/**
|
|
124
136
|
* @hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveboard.d.ts","sourceRoot":"","sources":["liveboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAKH,WAAW,EACX,SAAS,EACT,UAAU,EACb,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"liveboard.d.ts","sourceRoot":"","sources":["liveboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAKH,WAAW,EACX,SAAS,EACT,UAAU,EACb,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACnD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;OAIG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,OAAO;IACvC,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAE1C,OAAO,CAAC,aAAa,CAAO;gBAGhB,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB;IASrE;;;OAGG;IACH,SAAS,CAAC,cAAc;IA4CxB,OAAO,CAAC,kBAAkB;IAa1B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAcpB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB,CAExB;IAEF,OAAO,CAAC,iBAAiB,CAGvB;IAEF,OAAO,CAAC,mCAAmC,CAIzC;IAEF;;;;;OAKG;IACI,OAAO,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,GAAE,GAAQ,GAAG,OAAO,CAAC,GAAG,CAAC;IAQpE;;;;;OAKG;IACI,MAAM,IAAI,cAAc;IASxB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAWvF;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,cAAc;CAAG"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { ViewConfig } from '../types';
|
|
2
2
|
import { TsEmbed } from './ts-embed';
|
|
3
3
|
import { SearchOptions } from './search';
|
|
4
|
+
/**
|
|
5
|
+
* @group Embed components
|
|
6
|
+
*/
|
|
4
7
|
export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts'> {
|
|
5
8
|
/**
|
|
6
9
|
* The array of data source GUIDs to set on load.
|
|
7
10
|
* Only a single dataSource supported currently.
|
|
11
|
+
*
|
|
8
12
|
* @deprecated Use dataSource instead
|
|
9
13
|
*/
|
|
10
14
|
dataSources?: string[];
|
|
11
15
|
/**
|
|
12
16
|
* The array of data source GUIDs to set on load.
|
|
17
|
+
*
|
|
13
18
|
* @version: SDK: 1.19.0
|
|
14
19
|
*/
|
|
15
20
|
dataSource?: string;
|
|
@@ -21,8 +26,8 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
|
|
|
21
26
|
/**
|
|
22
27
|
* Embed ThoughtSpot search bar
|
|
23
28
|
*
|
|
24
|
-
* @Category Search Embed
|
|
25
29
|
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
30
|
+
* @group Embed components
|
|
26
31
|
*/
|
|
27
32
|
export declare class SearchBarEmbed extends TsEmbed {
|
|
28
33
|
/**
|
|
@@ -33,6 +38,7 @@ export declare class SearchBarEmbed extends TsEmbed {
|
|
|
33
38
|
/**
|
|
34
39
|
* Construct the URL of the embedded ThoughtSpot search to be
|
|
35
40
|
* loaded in the iframe
|
|
41
|
+
*
|
|
36
42
|
* @param dataSources A list of data source GUIDs
|
|
37
43
|
*/
|
|
38
44
|
private getIFrameSrc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"search-bar.d.ts","sourceRoot":"","sources":["search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EACyB,UAAU,EACzC,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,YAAY,CAAC;IAC1F;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CACjC;AAED;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,OAAO;IACvC;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC;gBAE9B,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB;IAKhE;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAmCpB;;OAEG;IACI,MAAM,IAAI,cAAc;CAOlC"}
|
|
@@ -19,14 +19,15 @@ export interface SearchOptions {
|
|
|
19
19
|
/**
|
|
20
20
|
* Boolean to determine if the search should be executed or not.
|
|
21
21
|
* if it is executed, put the focus on the results.
|
|
22
|
-
* if it’s not executed, put the focus in the search bar - at the end of
|
|
22
|
+
* if it’s not executed, put the focus in the search bar - at the end of
|
|
23
|
+
* the tokens
|
|
23
24
|
*/
|
|
24
25
|
executeSearch?: boolean;
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
28
|
* The configuration attributes for the embedded search view.
|
|
28
29
|
*
|
|
29
|
-
* @
|
|
30
|
+
* @group Embed components
|
|
30
31
|
*/
|
|
31
32
|
export interface SearchViewConfig extends ViewConfig {
|
|
32
33
|
/**
|
|
@@ -46,6 +47,7 @@ export interface SearchViewConfig extends ViewConfig {
|
|
|
46
47
|
hideResults?: boolean;
|
|
47
48
|
/**
|
|
48
49
|
* If set to true, the Search Assist feature is enabled.
|
|
50
|
+
*
|
|
49
51
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
50
52
|
*/
|
|
51
53
|
enableSearchAssist?: boolean;
|
|
@@ -57,16 +59,19 @@ export interface SearchViewConfig extends ViewConfig {
|
|
|
57
59
|
/**
|
|
58
60
|
* The array of data source GUIDs to set on load.
|
|
59
61
|
* Only a single dataSource supported currently.
|
|
62
|
+
*
|
|
60
63
|
* @deprecated Use dataSource instead
|
|
61
64
|
*/
|
|
62
65
|
dataSources?: string[];
|
|
63
66
|
/**
|
|
64
67
|
* The array of data source GUIDs to set on load.
|
|
68
|
+
*
|
|
65
69
|
* @version: SDK: 1.19.0
|
|
66
70
|
*/
|
|
67
71
|
dataSource?: string;
|
|
68
72
|
/**
|
|
69
73
|
* The initial search query to load the answer with.
|
|
74
|
+
*
|
|
70
75
|
* @deprecated Use {@link searchOptions} instead
|
|
71
76
|
*/
|
|
72
77
|
searchQuery?: string;
|
|
@@ -81,6 +86,7 @@ export interface SearchViewConfig extends ViewConfig {
|
|
|
81
86
|
/**
|
|
82
87
|
* If set to true, search page will render without the Search Bar
|
|
83
88
|
* The chart/table should still be visible.
|
|
89
|
+
*
|
|
84
90
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
85
91
|
*/
|
|
86
92
|
hideSearchBar?: boolean;
|
|
@@ -89,7 +95,7 @@ export declare const HiddenActionItemByDefaultForSearchEmbed: Action[];
|
|
|
89
95
|
/**
|
|
90
96
|
* Embed ThoughtSpot search
|
|
91
97
|
*
|
|
92
|
-
* @
|
|
98
|
+
* @group Embed components
|
|
93
99
|
*/
|
|
94
100
|
export declare class SearchEmbed extends TsEmbed {
|
|
95
101
|
/**
|
|
@@ -102,9 +108,11 @@ export declare class SearchEmbed extends TsEmbed {
|
|
|
102
108
|
* ThoughtSpot search will be initialized with.
|
|
103
109
|
*/
|
|
104
110
|
private getDataSourceMode;
|
|
111
|
+
protected getEmbedParams(): string;
|
|
105
112
|
/**
|
|
106
113
|
* Construct the URL of the embedded ThoughtSpot search to be
|
|
107
114
|
* loaded in the iframe
|
|
115
|
+
*
|
|
108
116
|
* @param answerId The GUID of a saved answer
|
|
109
117
|
* @param dataSources A list of data source GUIDs
|
|
110
118
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEH,WAAW,EAEX,MAAM,EACN,UAAU,EAEb,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEH,WAAW,EAEX,MAAM,EACN,UAAU,EAEb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,uCAAuC,UAMnD,CAAC;AAEF;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,OAAO;IACpC;;OAEG;IACH,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC;gBAE3B,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB;IAKlE;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAYzB,SAAS,CAAC,cAAc,IAAI,MAAM;IAyDlC;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACI,MAAM,IAAI,WAAW;CAkB/B"}
|