@thoughtspot/visual-embed-sdk 1.20.0-alpha.2 → 1.20.0-prerender.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/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 +4 -6
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +3 -6
- 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 +11 -20
- package/src/react/index.tsx +40 -71
- 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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @summary Base classes
|
|
7
7
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8
8
|
*/
|
|
9
|
-
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig
|
|
9
|
+
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig } from '../types';
|
|
10
10
|
/**
|
|
11
11
|
* Global prefix for all Thoughtspot postHash Params.
|
|
12
12
|
*/
|
|
@@ -28,6 +28,7 @@ export declare class TsEmbed {
|
|
|
28
28
|
* The DOM node where the ThoughtSpot app is to be embedded.
|
|
29
29
|
*/
|
|
30
30
|
private el;
|
|
31
|
+
protected isAppInitialized: boolean;
|
|
31
32
|
/**
|
|
32
33
|
* A reference to the iframe within which the ThoughtSpot app
|
|
33
34
|
* will be rendered.
|
|
@@ -58,6 +59,7 @@ export declare class TsEmbed {
|
|
|
58
59
|
* Should we encode URL Query Params using base64 encoding which thoughtspot
|
|
59
60
|
* will generate for embedding. This provides additional security to
|
|
60
61
|
* thoughtspot clusters against Cross site scripting attacks.
|
|
62
|
+
*
|
|
61
63
|
* @default false
|
|
62
64
|
*/
|
|
63
65
|
private shouldEncodeUrlQueryParams;
|
|
@@ -69,16 +71,19 @@ export declare class TsEmbed {
|
|
|
69
71
|
private throwInitError;
|
|
70
72
|
/**
|
|
71
73
|
* Handles errors within the SDK
|
|
74
|
+
*
|
|
72
75
|
* @param error The error message or object
|
|
73
76
|
*/
|
|
74
77
|
protected handleError(error: string | Record<string, unknown>): void;
|
|
75
78
|
/**
|
|
76
79
|
* Extracts the type field from the event payload
|
|
80
|
+
*
|
|
77
81
|
* @param event The window message event
|
|
78
82
|
*/
|
|
79
83
|
private getEventType;
|
|
80
84
|
/**
|
|
81
85
|
* Extracts the port field from the event payload
|
|
86
|
+
*
|
|
82
87
|
* @param event The window message event
|
|
83
88
|
* @returns
|
|
84
89
|
*/
|
|
@@ -86,6 +91,9 @@ export declare class TsEmbed {
|
|
|
86
91
|
/**
|
|
87
92
|
* fix for ts7.sep.cl
|
|
88
93
|
* will be removed for ts7.oct.cl
|
|
94
|
+
*
|
|
95
|
+
* @param event
|
|
96
|
+
* @param eventType
|
|
89
97
|
* @hidden
|
|
90
98
|
*/
|
|
91
99
|
private formatEventData;
|
|
@@ -98,10 +106,16 @@ export declare class TsEmbed {
|
|
|
98
106
|
private subscribeToEvents;
|
|
99
107
|
/**
|
|
100
108
|
* Send Custom style as part of payload of APP_INIT
|
|
109
|
+
*
|
|
110
|
+
* @param _
|
|
111
|
+
* @param responder
|
|
101
112
|
*/
|
|
102
113
|
private appInitCb;
|
|
103
114
|
/**
|
|
104
115
|
* Sends updated auth token to the iFrame to avoid user logout
|
|
116
|
+
*
|
|
117
|
+
* @param _
|
|
118
|
+
* @param responder
|
|
105
119
|
*/
|
|
106
120
|
private updateAuthToken;
|
|
107
121
|
/**
|
|
@@ -110,36 +124,47 @@ export declare class TsEmbed {
|
|
|
110
124
|
private registerAppInit;
|
|
111
125
|
/**
|
|
112
126
|
* Constructs the base URL string to load the ThoughtSpot app.
|
|
127
|
+
*
|
|
128
|
+
* @param query
|
|
113
129
|
*/
|
|
114
130
|
protected getEmbedBasePath(query: string): string;
|
|
115
131
|
/**
|
|
116
132
|
* Common query params set for all the embed modes.
|
|
133
|
+
*
|
|
134
|
+
* @param queryParams
|
|
117
135
|
* @returns queryParams
|
|
118
136
|
*/
|
|
119
|
-
protected getBaseQueryParams(): {};
|
|
137
|
+
protected getBaseQueryParams(queryParams?: {}): {};
|
|
120
138
|
/**
|
|
121
139
|
* Constructs the base URL string to load v1 of the ThoughtSpot app.
|
|
122
140
|
* This is used for embedding Liveboards, visualizations, and full application.
|
|
141
|
+
*
|
|
123
142
|
* @param queryString The query string to append to the URL.
|
|
124
143
|
* @param isAppEmbed A Boolean parameter to specify if you are embedding
|
|
125
144
|
* the full application.
|
|
126
145
|
*/
|
|
127
|
-
protected getV1EmbedBasePath(queryString: string
|
|
146
|
+
protected getV1EmbedBasePath(queryString: string): string;
|
|
147
|
+
protected getEmbedParams(): string;
|
|
148
|
+
protected getRootIframeSrc(): string;
|
|
149
|
+
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
128
150
|
/**
|
|
129
151
|
* Renders the embedded ThoughtSpot app in an iframe and sets up
|
|
130
152
|
* event listeners.
|
|
153
|
+
*
|
|
131
154
|
* @param url
|
|
132
155
|
* @param frameOptions
|
|
133
156
|
*/
|
|
134
|
-
protected renderIFrame(url: string
|
|
157
|
+
protected renderIFrame(url: string): Promise<any>;
|
|
135
158
|
protected insertIntoDOM(child: string | Node): void;
|
|
136
159
|
/**
|
|
137
160
|
* Sets the height of the iframe
|
|
161
|
+
*
|
|
138
162
|
* @param height The height in pixels
|
|
139
163
|
*/
|
|
140
164
|
protected setIFrameHeight(height: number): void;
|
|
141
165
|
/**
|
|
142
166
|
* Executes all registered event handlers for a particular event type
|
|
167
|
+
*
|
|
143
168
|
* @param eventType The event type
|
|
144
169
|
* @param data The payload invoked with the event handler
|
|
145
170
|
* @param eventPort The event Port for a specific MessageChannel
|
|
@@ -151,6 +176,7 @@ export declare class TsEmbed {
|
|
|
151
176
|
protected getThoughtSpotHost(): string;
|
|
152
177
|
/**
|
|
153
178
|
* Gets the v1 event type (if applicable) for the EmbedEvent type
|
|
179
|
+
*
|
|
154
180
|
* @param eventType The v2 event type
|
|
155
181
|
* @returns The corresponding v1 event type if one exists
|
|
156
182
|
* or else the v2 event type itself
|
|
@@ -160,6 +186,7 @@ export declare class TsEmbed {
|
|
|
160
186
|
* Calculates the iframe center for the current visible viewPort
|
|
161
187
|
* of iframe using Scroll position of Host App, offsetTop for iframe
|
|
162
188
|
* in Host app. ViewPort height of the tab.
|
|
189
|
+
*
|
|
163
190
|
* @returns iframe Center in visible viewport,
|
|
164
191
|
* Iframe height,
|
|
165
192
|
* View port height.
|
|
@@ -178,17 +205,35 @@ export declare class TsEmbed {
|
|
|
178
205
|
* @param messageType The message type
|
|
179
206
|
* @param callback A callback as a function
|
|
180
207
|
* @param options The message options
|
|
208
|
+
* @example
|
|
209
|
+
* ```js
|
|
210
|
+
* tsEmbed.on(EmbedEvent.Error, (data) => {
|
|
211
|
+
* console.error(data);
|
|
212
|
+
* });
|
|
213
|
+
* ```
|
|
214
|
+
* @example
|
|
215
|
+
* ```js
|
|
216
|
+
* tsEmbed.on(EmbedEvent.Save, (data) => {
|
|
217
|
+
* console.log("Answer save clicked", data);
|
|
218
|
+
* }, {
|
|
219
|
+
* start: true // This will trigger the callback on start of save
|
|
220
|
+
* });
|
|
221
|
+
* ```
|
|
181
222
|
*/
|
|
182
223
|
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
183
224
|
/**
|
|
184
225
|
* Triggers an event on specific Port registered against
|
|
185
226
|
* for the EmbedEvent
|
|
227
|
+
*
|
|
186
228
|
* @param eventType The message type
|
|
187
229
|
* @param data The payload to send
|
|
230
|
+
* @param eventPort
|
|
231
|
+
* @param payload
|
|
188
232
|
*/
|
|
189
233
|
private triggerEventOnPort;
|
|
190
234
|
/**
|
|
191
235
|
* Triggers an event to the embedded app
|
|
236
|
+
*
|
|
192
237
|
* @param messageType The event type
|
|
193
238
|
* @param data The payload to send with the message
|
|
194
239
|
*/
|
|
@@ -197,6 +242,7 @@ export declare class TsEmbed {
|
|
|
197
242
|
* Marks the ThoughtSpot object to have been rendered
|
|
198
243
|
* Needs to be overridden by subclasses to do the actual
|
|
199
244
|
* rendering of the iframe.
|
|
245
|
+
*
|
|
200
246
|
* @param args
|
|
201
247
|
*/
|
|
202
248
|
render(): TsEmbed;
|
|
@@ -204,28 +250,53 @@ export declare class TsEmbed {
|
|
|
204
250
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
205
251
|
* host app URL.
|
|
206
252
|
* THOUGHTSPOT URL params starts with a prefix "ts-"
|
|
253
|
+
*
|
|
207
254
|
* @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
|
|
208
255
|
*/
|
|
209
256
|
getThoughtSpotPostUrlParams(): string;
|
|
210
257
|
/**
|
|
211
258
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
259
|
+
*
|
|
212
260
|
* @version SDK: 1.19.1 | ThoughtSpot: *
|
|
213
261
|
*/
|
|
214
262
|
destroy(): void;
|
|
263
|
+
getUnderlyingFrameElement(): HTMLIFrameElement;
|
|
264
|
+
prerenderGeneric(): Promise<any>;
|
|
215
265
|
}
|
|
216
266
|
/**
|
|
217
267
|
* Base class for embedding v1 experience
|
|
218
268
|
* Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
|
|
219
269
|
* which is currently under migration to v2
|
|
270
|
+
*
|
|
271
|
+
* @inheritdoc
|
|
220
272
|
*/
|
|
221
273
|
export declare class V1Embed extends TsEmbed {
|
|
222
274
|
protected viewConfig: ViewConfig;
|
|
223
275
|
constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
|
|
224
276
|
/**
|
|
225
|
-
* Render the
|
|
277
|
+
* Render the ap p in an iframe and set up event handlers
|
|
278
|
+
*
|
|
226
279
|
* @param iframeSrc
|
|
227
280
|
*/
|
|
228
281
|
protected renderV1Embed(iframeSrc: string): any;
|
|
282
|
+
protected getRootIframeSrc(): string;
|
|
283
|
+
/**
|
|
284
|
+
* @inheritdoc
|
|
285
|
+
* @example
|
|
286
|
+
* ```js
|
|
287
|
+
* tsEmbed.on(EmbedEvent.Error, (data) => {
|
|
288
|
+
* console.error(data);
|
|
289
|
+
* });
|
|
290
|
+
* ```
|
|
291
|
+
* @example
|
|
292
|
+
* ```js
|
|
293
|
+
* tsEmbed.on(EmbedEvent.Save, (data) => {
|
|
294
|
+
* console.log("Answer save clicked", data);
|
|
295
|
+
* }, {
|
|
296
|
+
* start: true // This will trigger the callback on start of save
|
|
297
|
+
* });
|
|
298
|
+
* ```
|
|
299
|
+
*/
|
|
229
300
|
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
230
301
|
}
|
|
231
302
|
//# sourceMappingURL=ts-embed.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoBH,OAAO,EAEH,WAAW,EACX,SAAS,EACT,UAAU,EACV,eAAe,EAGf,WAAW,EACX,cAAc,EAGd,UAAU,EAIb,MAAM,UAAU,CAAC;AAgBlB;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAY9C;;;;GAIG;AACH,qBAAa,OAAO;IAChB;;;;;OAKG;IACH,OAAO,CAAC,aAAa,CAAO;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAU;IAEpB,SAAS,CAAC,gBAAgB,UAAS;IAEnC;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;IAEjC,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC;IAEnC;;OAEG;IACH,SAAS,CAAC,eAAe,EAAE,MAAM,CAAC;IAKlC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IACH,OAAO,CAA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zB,OAAO,GAAE,cAAiC,GAC3C,OAAO,OAAO,CAAC,SAAS;CAK9B"}
|
package/dist/src/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { init, prefetch, logout, getEmbedConfig } from './embed/base';
|
|
|
12
12
|
import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from './embed/liveboard';
|
|
13
13
|
import { SearchEmbed, SearchViewConfig } from './embed/search';
|
|
14
14
|
import { SearchBarEmbed, SearchBarViewConfig } from './embed/search-bar';
|
|
15
|
-
import { AuthFailureType, AuthStatus, AuthEvent, getSessionInfo } from './auth';
|
|
16
|
-
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures } from './types';
|
|
17
|
-
export { init, logout, prefetch, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, };
|
|
15
|
+
import { AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, getSessionInfo } from './auth';
|
|
16
|
+
import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface } from './types';
|
|
17
|
+
export { init, logout, prefetch, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, };
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EACH,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EACzC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACH,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,cAAc,EAC3E,MAAM,QAAQ,CAAC;AAChB,OAAO,EACH,QAAQ,EACR,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACH,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,cAAc,IAAI,aAAa,EAC/B,cAAc,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,cAAc,EACd,QAAQ,EACR,eAAe,EACf,UAAU,EACV,SAAS,EACT,gBAAgB,EAEhB,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,eAAe,EACf,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,GACrB,CAAC"}
|
|
@@ -12,10 +12,18 @@ export declare const MIXPANEL_EVENT: {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Pushes the event with its Property key-value map to mixpanel.
|
|
15
|
+
*
|
|
15
16
|
* @param eventId
|
|
16
17
|
* @param eventProps
|
|
17
18
|
*/
|
|
18
19
|
export declare function uploadMixpanelEvent(eventId: string, eventProps?: {}): void;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param sessionInfo
|
|
23
|
+
*/
|
|
19
24
|
export declare function initMixpanel(sessionInfo: any): void;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
20
28
|
export declare function testResetMixpanel(): void;
|
|
21
29
|
//# sourceMappingURL=mixpanel-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF
|
|
1
|
+
{"version":3,"file":"mixpanel-service.d.ts","sourceRoot":"","sources":["mixpanel-service.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;CAErB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAKF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,IAAI,CAM1E;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,GAAG,GAAG,IAAI,CAgBnD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAqC,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7F,OAAO,EAA+B,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAqC,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAA4B,MAAM,QAAQ,CAAC;AAuC9D,UAAU,WAAY,SAAQ,UAAU,EAAE,gBAAgB;CAAG;AAE7D,eAAO,MAAM,WAAW,6EAEvB,CAAC;AAEF,UAAU,QAAS,SAAQ,UAAU,EAAE,aAAa;CAAG;AAEvD,eAAO,MAAM,QAAQ,0EAAyE,CAAC;AAE/F,UAAU,cAAe,SAAQ,UAAU,EAAE,mBAAmB;CAAG;AAEnE,eAAO,MAAM,cAAc,gFAIT,CAAC;AAEnB,eAAO,MAAM,aAAa,gFAIR,CAAC;AAEnB,UAAU,mBAAoB,SAAQ,UAAU,EAAE,mBAAmB;CAAG;AAExE,eAAO,MAAM,cAAc,qFAIT,CAAC;AAEnB,eAAO,MAAM,WAAW,QAAO,MAAM,gBAAgB,CAAC,OAAO,CAAgC,CAAC"}
|
package/dist/src/react/util.d.ts
CHANGED
|
@@ -11,5 +11,9 @@ export interface ViewConfigAndListeners<T extends ViewConfig> {
|
|
|
11
11
|
[key in EmbedEvent]?: MessageCallback;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param props
|
|
17
|
+
*/
|
|
14
18
|
export declare function getViewPropsAndListeners<T extends EmbedProps, U extends ViewConfig>(props: T): ViewConfigAndListeners<U>;
|
|
15
19
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG;KAAG,GAAG,IAAI,MAAM,OAAO,UAAU,IAAI,KAAK,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,eAAe;CAAE,CAAC;AAElH,MAAM,WAAW,UAAW,SAAQ,UAAU,EAAE,kBAAkB;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,UAAU;IACxD,UAAU,EAAE,CAAC,CAAC;IACd,SAAS,EAAE;SAAG,GAAG,IAAI,UAAU,CAAC,CAAC,EAAE,eAAe;KAAE,CAAC;CACxD;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACpC,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAgB7D"}
|
|
@@ -14,12 +14,15 @@ export declare const waitFor: (fn: () => boolean) => Promise<void>;
|
|
|
14
14
|
* programmatically and use dispatchEvent instead of the
|
|
15
15
|
* postMessage API
|
|
16
16
|
* Reference: https://github.com/jsdom/jsdom/issues/2745
|
|
17
|
+
*
|
|
17
18
|
* @param window
|
|
18
19
|
* @param data
|
|
20
|
+
* @param port
|
|
19
21
|
*/
|
|
20
22
|
export declare const postMessageToParent: (window: WindowProxy, data: any, port?: any) => void;
|
|
21
23
|
/**
|
|
22
24
|
* Execute a given function after a certain time has elapsed
|
|
25
|
+
*
|
|
23
26
|
* @param fn The function to be executed after the wait period
|
|
24
27
|
* @param waitTime The wait period in milliseconds
|
|
25
28
|
*/
|
|
@@ -28,12 +31,18 @@ export declare const executeAfterWait: (fn: (...args: any[]) => void, waitTime?:
|
|
|
28
31
|
* Time (in milliseconds) to wait for async events to be triggered
|
|
29
32
|
*/
|
|
30
33
|
export declare const EVENT_WAIT_TIME = 1000;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @param str
|
|
37
|
+
*/
|
|
31
38
|
export declare function fixedEncodeURI(str: string): string;
|
|
32
39
|
/**
|
|
33
|
-
* MessageChannel is available in Node > 15.0.0. Since the current node
|
|
34
|
-
* used for github actions is not above 14, we are mocking this
|
|
40
|
+
* MessageChannel is available in Node > 15.0.0. Since the current node
|
|
41
|
+
* environment's used for github actions is not above 14, we are mocking this
|
|
42
|
+
* for the current unit tests.
|
|
35
43
|
*/
|
|
36
44
|
export declare const messageChannelMock: any;
|
|
37
45
|
export declare const mockMessageChannel: () => void;
|
|
46
|
+
export declare const expectUrlMatchesWithParams: (source: string, target: string) => void;
|
|
38
47
|
export {};
|
|
39
48
|
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["test-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["test-utils.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iCAAiC,QAAgH,CAAC;AAC/J,eAAO,MAAM,aAAa,QAAmF,CAAC;AAC9G,eAAO,MAAM,6BAA6B,QAA6I,CAAC;AACxL,eAAO,MAAM,eAAe,cAAyD,CAAC;AAEtF,KAAK,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzC,eAAO,MAAM,SAAS,mBAAyC,CAAC;AAEhE,eAAO,MAAM,UAAU,mBAA2C,CAAC;AAEnE,eAAO,MAAM,WAAW,eAAe,UAAU,sBAAiD,CAAC;AAEnG,eAAO,MAAM,cAAc,qCAA4C,CAAC;AAExE,eAAO,MAAM,YAAY,eAAe,UAAU,WAA0C,CAAC;AAE7F,eAAO,MAAM,OAAO,OAAQ,MAAM,OAAO,KAAG,QAAQ,IAAI,CAQtD,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,WAAY,WAAW,QAAQ,GAAG,SAAS,GAAG,SAO7E,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,iBACX,GAAG,EAAE,KAAK,IAAI,wCAO9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,UAEzC;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,GAGhC,CAAC;AACF,eAAO,MAAM,kBAAkB,YAM9B,CAAC;AAEF,eAAO,MAAM,0BAA0B,WAAY,MAAM,UAAU,MAAM,SAQxE,CAAC"}
|