@thoughtspot/visual-embed-sdk 1.10.0-alpha.2 → 1.10.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/CHANGELOG.md +14 -2
- package/README.md +22 -3
- package/dist/src/embed/app.d.ts +9 -3
- package/dist/src/embed/search.d.ts +4 -0
- package/dist/src/embed/ts-embed.d.ts +18 -4
- package/dist/src/types.d.ts +139 -3
- package/dist/src/utils.d.ts +4 -0
- package/dist/tsembed.es.js +179 -21
- package/dist/tsembed.js +179 -21
- package/lib/package.json +2 -2
- package/lib/src/embed/app.d.ts +9 -3
- package/lib/src/embed/app.js +23 -7
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +36 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.spec.js +13 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +30 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +4 -0
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +18 -4
- package/lib/src/embed/ts-embed.js +36 -14
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +123 -14
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +139 -3
- package/lib/src/types.js +116 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +4 -0
- package/lib/src/utils.js +4 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +170 -10
- package/package.json +2 -2
- package/src/embed/app.spec.ts +49 -1
- package/src/embed/app.ts +24 -6
- package/src/embed/base.spec.ts +14 -0
- package/src/embed/events.spec.ts +32 -0
- package/src/embed/search.ts +5 -0
- package/src/embed/ts-embed.spec.ts +166 -14
- package/src/embed/ts-embed.ts +56 -16
- package/src/types.ts +148 -1
- package/src/utils.ts +5 -0
package/lib/src/types.d.ts
CHANGED
|
@@ -140,11 +140,31 @@ export interface EmbedConfig {
|
|
|
140
140
|
*/
|
|
141
141
|
customCssUrl?: string;
|
|
142
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
145
|
+
*/
|
|
143
146
|
export declare type MessagePayload = {
|
|
144
147
|
type: string;
|
|
145
148
|
data: any;
|
|
149
|
+
status?: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* MessageOptions: By Providing options, getting specific event start / end based on option
|
|
153
|
+
*/
|
|
154
|
+
export declare type MessageOptions = {
|
|
155
|
+
start?: boolean;
|
|
146
156
|
};
|
|
157
|
+
/**
|
|
158
|
+
* MessageCallback: Embed event message callback
|
|
159
|
+
*/
|
|
147
160
|
export declare type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
|
|
161
|
+
/**
|
|
162
|
+
* MessageCallbackObj: contains message options & callback function
|
|
163
|
+
*/
|
|
164
|
+
export declare type MessageCallbackObj = {
|
|
165
|
+
options: MessageOptions;
|
|
166
|
+
callback: MessageCallback;
|
|
167
|
+
};
|
|
148
168
|
export declare type GenericCallbackFn = (...args: any[]) => any;
|
|
149
169
|
export declare type QueryParams = {
|
|
150
170
|
[key: string]: string;
|
|
@@ -292,6 +312,12 @@ export declare enum EmbedEvent {
|
|
|
292
312
|
* @version 1.5.0 or later
|
|
293
313
|
*/
|
|
294
314
|
VizPointDoubleClick = "vizPointDoubleClick",
|
|
315
|
+
/**
|
|
316
|
+
* A click has been triggered on table/chart
|
|
317
|
+
* @return ContextMenuInputPoints - data point that is clicked
|
|
318
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
319
|
+
*/
|
|
320
|
+
VizPointClick = "vizPointClick",
|
|
295
321
|
/**
|
|
296
322
|
* An error has occurred.
|
|
297
323
|
* @return error - An error object or message
|
|
@@ -356,7 +382,108 @@ export declare enum EmbedEvent {
|
|
|
356
382
|
* rendered liveboard
|
|
357
383
|
* @version 1.9.1 or later
|
|
358
384
|
*/
|
|
359
|
-
LiveboardRendered = "PinboardRendered"
|
|
385
|
+
LiveboardRendered = "PinboardRendered",
|
|
386
|
+
/**
|
|
387
|
+
* This can be used to register an event listener which
|
|
388
|
+
* is triggered on all events.
|
|
389
|
+
* @version SDK: 1.10.0 | ThoughtSpot: any
|
|
390
|
+
*/
|
|
391
|
+
ALL = "*",
|
|
392
|
+
/**
|
|
393
|
+
* Emitted when answer is saved in the app
|
|
394
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
395
|
+
*/
|
|
396
|
+
Save = "save",
|
|
397
|
+
/**
|
|
398
|
+
* Emitted when the download action is triggered on an answer
|
|
399
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
400
|
+
*/
|
|
401
|
+
Download = "download",
|
|
402
|
+
/**
|
|
403
|
+
* Emitted when the Download as PDF action is triggered on an answer
|
|
404
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
405
|
+
*/
|
|
406
|
+
DownloadAsPdf = "downloadAsPdf",
|
|
407
|
+
/**
|
|
408
|
+
* Emitted when the Download as CSV action is triggered on an answer
|
|
409
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
410
|
+
*/
|
|
411
|
+
DownloadAsCsv = "downloadAsCsv",
|
|
412
|
+
/**
|
|
413
|
+
* Emitted when the Download as XLSX action is triggered on an answer
|
|
414
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
415
|
+
*/
|
|
416
|
+
DownloadAsXlsx = "downloadAsXlsx",
|
|
417
|
+
/**
|
|
418
|
+
* Emitted when an answer is deleted in the app
|
|
419
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
420
|
+
*/
|
|
421
|
+
AnswerDelete = "answerDelete",
|
|
422
|
+
/**
|
|
423
|
+
* Emitted when an answer is pinned to a Liveboard
|
|
424
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
425
|
+
*/
|
|
426
|
+
Pin = "pin",
|
|
427
|
+
/**
|
|
428
|
+
* Emitted when SpotIQ analysis is triggered
|
|
429
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
430
|
+
*/
|
|
431
|
+
SpotIQAnalyze = "spotIQAnalyze",
|
|
432
|
+
/**
|
|
433
|
+
* Emitted when a user shares an object with another user or group
|
|
434
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
435
|
+
*/
|
|
436
|
+
Share = "share",
|
|
437
|
+
/**
|
|
438
|
+
* Emitted when a user clicks the Include action to include a specific value or data on a chart or table
|
|
439
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
440
|
+
*/
|
|
441
|
+
DrillInclude = "context-menu-item-include",
|
|
442
|
+
/**
|
|
443
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
|
|
444
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
445
|
+
*/
|
|
446
|
+
DrillExclude = "context-menu-item-exclude",
|
|
447
|
+
/**
|
|
448
|
+
* Emitted when copied column value on the app
|
|
449
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
450
|
+
*/
|
|
451
|
+
CopyToClipboard = "context-menu-item-copy-to-clipboard",
|
|
452
|
+
/**
|
|
453
|
+
* Emitted when a user clicks the Update TML action
|
|
454
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
455
|
+
*/
|
|
456
|
+
UpdateTML = "updateTSL",
|
|
457
|
+
/**
|
|
458
|
+
* Emitted when a user clicks the Edit TML action
|
|
459
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
460
|
+
*/
|
|
461
|
+
EditTML = "editTSL",
|
|
462
|
+
/**
|
|
463
|
+
* Emitted when ExportTML trigger in answer on the app
|
|
464
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
465
|
+
*/
|
|
466
|
+
ExportTML = "exportTSL",
|
|
467
|
+
/**
|
|
468
|
+
* Emitted when an answer is saved as a view
|
|
469
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
470
|
+
*/
|
|
471
|
+
SaveAsView = "saveAsView",
|
|
472
|
+
/**
|
|
473
|
+
* Emitted when copy of existing answer on the app
|
|
474
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
475
|
+
*/
|
|
476
|
+
CopyAEdit = "copyAEdit",
|
|
477
|
+
/**
|
|
478
|
+
* Emitted when a user clicks Show underlying data on an answe
|
|
479
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
480
|
+
*/
|
|
481
|
+
ShowUnderlyingData = "showUnderlyingData",
|
|
482
|
+
/**
|
|
483
|
+
* Emitted when an answer is switched to a chart or table view
|
|
484
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
485
|
+
*/
|
|
486
|
+
AnswerChartSwitcher = "answerChartSwitcher"
|
|
360
487
|
}
|
|
361
488
|
/**
|
|
362
489
|
* Event types that can be triggered by the host application
|
|
@@ -404,7 +531,14 @@ export declare enum HostEvent {
|
|
|
404
531
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
405
532
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
406
533
|
*/
|
|
407
|
-
UpdateRuntimeFilters = "UpdateRuntimeFilters"
|
|
534
|
+
UpdateRuntimeFilters = "UpdateRuntimeFilters",
|
|
535
|
+
/**
|
|
536
|
+
* Navigate to a specific page in App embed without any reload.
|
|
537
|
+
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
538
|
+
* @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
539
|
+
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl
|
|
540
|
+
*/
|
|
541
|
+
Navigate = "Navigate"
|
|
408
542
|
}
|
|
409
543
|
/**
|
|
410
544
|
* The different visual modes that the data sources panel within
|
|
@@ -456,7 +590,9 @@ export declare enum Param {
|
|
|
456
590
|
CustomCSSUrl = "customCssUrl",
|
|
457
591
|
DisableLoginRedirect = "disableLoginRedirect",
|
|
458
592
|
visibleVizs = "pinboardVisibleVizs",
|
|
459
|
-
LiveboardV2Enabled = "isPinboardV2Enabled"
|
|
593
|
+
LiveboardV2Enabled = "isPinboardV2Enabled",
|
|
594
|
+
ShowAlerts = "showAlerts",
|
|
595
|
+
Locale = "locale"
|
|
460
596
|
}
|
|
461
597
|
/**
|
|
462
598
|
* The list of actions that can be performed on visual ThoughtSpot
|
package/lib/src/types.js
CHANGED
|
@@ -165,6 +165,12 @@ export var EmbedEvent;
|
|
|
165
165
|
* @version 1.5.0 or later
|
|
166
166
|
*/
|
|
167
167
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
168
|
+
/**
|
|
169
|
+
* A click has been triggered on table/chart
|
|
170
|
+
* @return ContextMenuInputPoints - data point that is clicked
|
|
171
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
172
|
+
*/
|
|
173
|
+
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
168
174
|
/**
|
|
169
175
|
* An error has occurred.
|
|
170
176
|
* @return error - An error object or message
|
|
@@ -230,6 +236,107 @@ export var EmbedEvent;
|
|
|
230
236
|
* @version 1.9.1 or later
|
|
231
237
|
*/
|
|
232
238
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
239
|
+
/**
|
|
240
|
+
* This can be used to register an event listener which
|
|
241
|
+
* is triggered on all events.
|
|
242
|
+
* @version SDK: 1.10.0 | ThoughtSpot: any
|
|
243
|
+
*/
|
|
244
|
+
EmbedEvent["ALL"] = "*";
|
|
245
|
+
/**
|
|
246
|
+
* Emitted when answer is saved in the app
|
|
247
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
248
|
+
*/
|
|
249
|
+
EmbedEvent["Save"] = "save";
|
|
250
|
+
/**
|
|
251
|
+
* Emitted when the download action is triggered on an answer
|
|
252
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
253
|
+
*/
|
|
254
|
+
EmbedEvent["Download"] = "download";
|
|
255
|
+
/**
|
|
256
|
+
* Emitted when the Download as PDF action is triggered on an answer
|
|
257
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
258
|
+
*/
|
|
259
|
+
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
260
|
+
/**
|
|
261
|
+
* Emitted when the Download as CSV action is triggered on an answer
|
|
262
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
263
|
+
*/
|
|
264
|
+
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
265
|
+
/**
|
|
266
|
+
* Emitted when the Download as XLSX action is triggered on an answer
|
|
267
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
268
|
+
*/
|
|
269
|
+
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
270
|
+
/**
|
|
271
|
+
* Emitted when an answer is deleted in the app
|
|
272
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
273
|
+
*/
|
|
274
|
+
EmbedEvent["AnswerDelete"] = "answerDelete";
|
|
275
|
+
/**
|
|
276
|
+
* Emitted when an answer is pinned to a Liveboard
|
|
277
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
278
|
+
*/
|
|
279
|
+
EmbedEvent["Pin"] = "pin";
|
|
280
|
+
/**
|
|
281
|
+
* Emitted when SpotIQ analysis is triggered
|
|
282
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
283
|
+
*/
|
|
284
|
+
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
285
|
+
/**
|
|
286
|
+
* Emitted when a user shares an object with another user or group
|
|
287
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
288
|
+
*/
|
|
289
|
+
EmbedEvent["Share"] = "share";
|
|
290
|
+
/**
|
|
291
|
+
* Emitted when a user clicks the Include action to include a specific value or data on a chart or table
|
|
292
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
293
|
+
*/
|
|
294
|
+
EmbedEvent["DrillInclude"] = "context-menu-item-include";
|
|
295
|
+
/**
|
|
296
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
|
|
297
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
298
|
+
*/
|
|
299
|
+
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
|
|
300
|
+
/**
|
|
301
|
+
* Emitted when copied column value on the app
|
|
302
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
303
|
+
*/
|
|
304
|
+
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
|
|
305
|
+
/**
|
|
306
|
+
* Emitted when a user clicks the Update TML action
|
|
307
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
308
|
+
*/
|
|
309
|
+
EmbedEvent["UpdateTML"] = "updateTSL";
|
|
310
|
+
/**
|
|
311
|
+
* Emitted when a user clicks the Edit TML action
|
|
312
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
313
|
+
*/
|
|
314
|
+
EmbedEvent["EditTML"] = "editTSL";
|
|
315
|
+
/**
|
|
316
|
+
* Emitted when ExportTML trigger in answer on the app
|
|
317
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
318
|
+
*/
|
|
319
|
+
EmbedEvent["ExportTML"] = "exportTSL";
|
|
320
|
+
/**
|
|
321
|
+
* Emitted when an answer is saved as a view
|
|
322
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
323
|
+
*/
|
|
324
|
+
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
325
|
+
/**
|
|
326
|
+
* Emitted when copy of existing answer on the app
|
|
327
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
328
|
+
*/
|
|
329
|
+
EmbedEvent["CopyAEdit"] = "copyAEdit";
|
|
330
|
+
/**
|
|
331
|
+
* Emitted when a user clicks Show underlying data on an answe
|
|
332
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
333
|
+
*/
|
|
334
|
+
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
335
|
+
/**
|
|
336
|
+
* Emitted when an answer is switched to a chart or table view
|
|
337
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
338
|
+
*/
|
|
339
|
+
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
233
340
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
234
341
|
/**
|
|
235
342
|
* Event types that can be triggered by the host application
|
|
@@ -280,6 +387,13 @@ export var HostEvent;
|
|
|
280
387
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
281
388
|
*/
|
|
282
389
|
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
390
|
+
/**
|
|
391
|
+
* Navigate to a specific page in App embed without any reload.
|
|
392
|
+
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
393
|
+
* @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
394
|
+
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl
|
|
395
|
+
*/
|
|
396
|
+
HostEvent["Navigate"] = "Navigate";
|
|
283
397
|
})(HostEvent || (HostEvent = {}));
|
|
284
398
|
/**
|
|
285
399
|
* The different visual modes that the data sources panel within
|
|
@@ -336,6 +450,8 @@ export var Param;
|
|
|
336
450
|
Param["DisableLoginRedirect"] = "disableLoginRedirect";
|
|
337
451
|
Param["visibleVizs"] = "pinboardVisibleVizs";
|
|
338
452
|
Param["LiveboardV2Enabled"] = "isPinboardV2Enabled";
|
|
453
|
+
Param["ShowAlerts"] = "showAlerts";
|
|
454
|
+
Param["Locale"] = "locale";
|
|
339
455
|
})(Param || (Param = {}));
|
|
340
456
|
/**
|
|
341
457
|
* The list of actions that can be performed on visual ThoughtSpot
|
package/lib/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAwBX;AAxBD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EAxBW,QAAQ,KAAR,QAAQ,QAwBnB;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAwBX;AAxBD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EAxBW,QAAQ,KAAR,QAAQ,QAwBnB;AAkKD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,eAyDX;AAzDD,WAAY,eAAe;IACvB;;OAEG;IACH,4BAAS,CAAA;IACT;;O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C/B;;OAEG;IACH,qDAA2C,CAAA;IAC3C;;OAEG;IACH,2CAAiC,CAAA;IACjC;;OAEG;IACH,qCAA2B,CAAA;IAC3B;;OAEG;IACH,yCAA+B,CAAA;AACnC,CAAC,EAvIW,MAAM,KAAN,MAAM,QAuIjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
|
package/lib/src/utils.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ export declare const getCssDimension: (value: number | string) => string;
|
|
|
34
34
|
export declare const appendToUrlHash: (url: string, stringToAppend: string) => string;
|
|
35
35
|
export declare const getEncodedQueryParamsString: (queryString: string) => string;
|
|
36
36
|
export declare const getOffsetTop: (element: any) => any;
|
|
37
|
+
export declare const embedEventStatus: {
|
|
38
|
+
START: string;
|
|
39
|
+
END: string;
|
|
40
|
+
};
|
|
37
41
|
export declare const setAttributes: (element: HTMLElement, attributes: {
|
|
38
42
|
[key: string]: string | number | boolean;
|
|
39
43
|
}) => void;
|
package/lib/src/utils.js
CHANGED
|
@@ -109,6 +109,10 @@ export const getOffsetTop = (element) => {
|
|
|
109
109
|
const rect = element.getBoundingClientRect();
|
|
110
110
|
return rect.top + window.scrollY;
|
|
111
111
|
};
|
|
112
|
+
export const embedEventStatus = {
|
|
113
|
+
START: 'start',
|
|
114
|
+
END: 'end',
|
|
115
|
+
};
|
|
112
116
|
export const setAttributes = (element, attributes) => {
|
|
113
117
|
Object.keys(attributes).forEach((key) => {
|
|
114
118
|
element.setAttribute(key, attributes[key].toString());
|
package/lib/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAA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B,GAAG,CAAC,WAAmB,EAAE,EAAE;IAC/D,IAAI,CAAC,WAAW,EAAE;QACd,OAAO,WAAW,CAAC;KACtB;IACD,OAAO,IAAI,CAAC,WAAW,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAY,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAC7C,OAAO,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,OAAoB,EACpB,UAAwD,EACpD,EAAE;IACN,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACpC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -58,7 +58,11 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
58
58
|
/**
|
|
59
59
|
* Data management page
|
|
60
60
|
*/
|
|
61
|
-
Data = "data"
|
|
61
|
+
Data = "data",
|
|
62
|
+
/**
|
|
63
|
+
* SpotIQ listing page
|
|
64
|
+
*/
|
|
65
|
+
SpotIQ = "spotiq"
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* The view configuration for full app embedding.
|
|
@@ -114,10 +118,12 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
|
|
|
114
118
|
/**
|
|
115
119
|
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
116
120
|
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
117
|
-
* @param path The string, set to iframe src and navigate to new page
|
|
121
|
+
* @param path string | number The string, set to iframe src and navigate to new page
|
|
118
122
|
* eg: appEmbed.navigateToPage('pinboards')
|
|
123
|
+
* When used with `noReload` this can also be a number like 1/-1 to go forward/back.
|
|
124
|
+
* @param noReload boolean Trigger the navigation without reloading the page (version: 1.12.0 | 8.4.0.cl)
|
|
119
125
|
*/
|
|
120
|
-
navigateToPage(path: string): void;
|
|
126
|
+
navigateToPage(path: string | number, noReload?: boolean): void;
|
|
121
127
|
/**
|
|
122
128
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
123
129
|
* @param renderOptions An object containing the page ID
|
|
@@ -300,6 +306,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
|
|
|
300
306
|
* using raw answer data.
|
|
301
307
|
*/
|
|
302
308
|
hideResults?: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* If set to true, expands all the data sources panel.
|
|
311
|
+
*/
|
|
312
|
+
expandAllDataSource?: boolean;
|
|
303
313
|
/**
|
|
304
314
|
* If set to true, the Search Assist feature is enabled.
|
|
305
315
|
*/
|
|
@@ -482,11 +492,31 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
482
492
|
*/
|
|
483
493
|
customCssUrl?: string;
|
|
484
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
497
|
+
*/
|
|
485
498
|
export type MessagePayload = {
|
|
486
499
|
type: string;
|
|
487
500
|
data: any;
|
|
501
|
+
status?: string;
|
|
488
502
|
};
|
|
503
|
+
/**
|
|
504
|
+
* MessageOptions: By Providing options, getting specific event start / end based on option
|
|
505
|
+
*/
|
|
506
|
+
export type MessageOptions = {
|
|
507
|
+
start?: boolean;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* MessageCallback: Embed event message callback
|
|
511
|
+
*/
|
|
489
512
|
export type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
|
|
513
|
+
/**
|
|
514
|
+
* MessageCallbackObj: contains message options & callback function
|
|
515
|
+
*/
|
|
516
|
+
export type MessageCallbackObj = {
|
|
517
|
+
options: MessageOptions;
|
|
518
|
+
callback: MessageCallback;
|
|
519
|
+
};
|
|
490
520
|
export type GenericCallbackFn = (...args: any[]) => any;
|
|
491
521
|
export type QueryParams = {
|
|
492
522
|
[key: string]: string;
|
|
@@ -634,6 +664,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
634
664
|
* @version 1.5.0 or later
|
|
635
665
|
*/
|
|
636
666
|
VizPointDoubleClick = "vizPointDoubleClick",
|
|
667
|
+
/**
|
|
668
|
+
* A click has been triggered on table/chart
|
|
669
|
+
* @return ContextMenuInputPoints - data point that is clicked
|
|
670
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
671
|
+
*/
|
|
672
|
+
VizPointClick = "vizPointClick",
|
|
637
673
|
/**
|
|
638
674
|
* An error has occurred.
|
|
639
675
|
* @return error - An error object or message
|
|
@@ -698,7 +734,108 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
698
734
|
* rendered liveboard
|
|
699
735
|
* @version 1.9.1 or later
|
|
700
736
|
*/
|
|
701
|
-
LiveboardRendered = "PinboardRendered"
|
|
737
|
+
LiveboardRendered = "PinboardRendered",
|
|
738
|
+
/**
|
|
739
|
+
* This can be used to register an event listener which
|
|
740
|
+
* is triggered on all events.
|
|
741
|
+
* @version SDK: 1.10.0 | ThoughtSpot: any
|
|
742
|
+
*/
|
|
743
|
+
ALL = "*",
|
|
744
|
+
/**
|
|
745
|
+
* Emitted when answer is saved in the app
|
|
746
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
747
|
+
*/
|
|
748
|
+
Save = "save",
|
|
749
|
+
/**
|
|
750
|
+
* Emitted when the download action is triggered on an answer
|
|
751
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
752
|
+
*/
|
|
753
|
+
Download = "download",
|
|
754
|
+
/**
|
|
755
|
+
* Emitted when the Download as PDF action is triggered on an answer
|
|
756
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
757
|
+
*/
|
|
758
|
+
DownloadAsPdf = "downloadAsPdf",
|
|
759
|
+
/**
|
|
760
|
+
* Emitted when the Download as CSV action is triggered on an answer
|
|
761
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
762
|
+
*/
|
|
763
|
+
DownloadAsCsv = "downloadAsCsv",
|
|
764
|
+
/**
|
|
765
|
+
* Emitted when the Download as XLSX action is triggered on an answer
|
|
766
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
767
|
+
*/
|
|
768
|
+
DownloadAsXlsx = "downloadAsXlsx",
|
|
769
|
+
/**
|
|
770
|
+
* Emitted when an answer is deleted in the app
|
|
771
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
772
|
+
*/
|
|
773
|
+
AnswerDelete = "answerDelete",
|
|
774
|
+
/**
|
|
775
|
+
* Emitted when an answer is pinned to a Liveboard
|
|
776
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
777
|
+
*/
|
|
778
|
+
Pin = "pin",
|
|
779
|
+
/**
|
|
780
|
+
* Emitted when SpotIQ analysis is triggered
|
|
781
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
782
|
+
*/
|
|
783
|
+
SpotIQAnalyze = "spotIQAnalyze",
|
|
784
|
+
/**
|
|
785
|
+
* Emitted when a user shares an object with another user or group
|
|
786
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
787
|
+
*/
|
|
788
|
+
Share = "share",
|
|
789
|
+
/**
|
|
790
|
+
* Emitted when a user clicks the Include action to include a specific value or data on a chart or table
|
|
791
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
792
|
+
*/
|
|
793
|
+
DrillInclude = "context-menu-item-include",
|
|
794
|
+
/**
|
|
795
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
|
|
796
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
797
|
+
*/
|
|
798
|
+
DrillExclude = "context-menu-item-exclude",
|
|
799
|
+
/**
|
|
800
|
+
* Emitted when copied column value on the app
|
|
801
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
802
|
+
*/
|
|
803
|
+
CopyToClipboard = "context-menu-item-copy-to-clipboard",
|
|
804
|
+
/**
|
|
805
|
+
* Emitted when a user clicks the Update TML action
|
|
806
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
807
|
+
*/
|
|
808
|
+
UpdateTML = "updateTSL",
|
|
809
|
+
/**
|
|
810
|
+
* Emitted when a user clicks the Edit TML action
|
|
811
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
812
|
+
*/
|
|
813
|
+
EditTML = "editTSL",
|
|
814
|
+
/**
|
|
815
|
+
* Emitted when ExportTML trigger in answer on the app
|
|
816
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
817
|
+
*/
|
|
818
|
+
ExportTML = "exportTSL",
|
|
819
|
+
/**
|
|
820
|
+
* Emitted when an answer is saved as a view
|
|
821
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
822
|
+
*/
|
|
823
|
+
SaveAsView = "saveAsView",
|
|
824
|
+
/**
|
|
825
|
+
* Emitted when copy of existing answer on the app
|
|
826
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
827
|
+
*/
|
|
828
|
+
CopyAEdit = "copyAEdit",
|
|
829
|
+
/**
|
|
830
|
+
* Emitted when a user clicks Show underlying data on an answe
|
|
831
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
832
|
+
*/
|
|
833
|
+
ShowUnderlyingData = "showUnderlyingData",
|
|
834
|
+
/**
|
|
835
|
+
* Emitted when an answer is switched to a chart or table view
|
|
836
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
837
|
+
*/
|
|
838
|
+
AnswerChartSwitcher = "answerChartSwitcher"
|
|
702
839
|
}
|
|
703
840
|
/**
|
|
704
841
|
* Event types that can be triggered by the host application
|
|
@@ -746,7 +883,14 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
746
883
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
747
884
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
748
885
|
*/
|
|
749
|
-
UpdateRuntimeFilters = "UpdateRuntimeFilters"
|
|
886
|
+
UpdateRuntimeFilters = "UpdateRuntimeFilters",
|
|
887
|
+
/**
|
|
888
|
+
* Navigate to a specific page in App embed without any reload.
|
|
889
|
+
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
890
|
+
* @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
891
|
+
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl
|
|
892
|
+
*/
|
|
893
|
+
Navigate = "Navigate"
|
|
750
894
|
}
|
|
751
895
|
/**
|
|
752
896
|
* The different visual modes that the data sources panel within
|
|
@@ -798,7 +942,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
|
|
|
798
942
|
CustomCSSUrl = "customCssUrl",
|
|
799
943
|
DisableLoginRedirect = "disableLoginRedirect",
|
|
800
944
|
visibleVizs = "pinboardVisibleVizs",
|
|
801
|
-
LiveboardV2Enabled = "isPinboardV2Enabled"
|
|
945
|
+
LiveboardV2Enabled = "isPinboardV2Enabled",
|
|
946
|
+
ShowAlerts = "showAlerts",
|
|
947
|
+
Locale = "locale"
|
|
802
948
|
}
|
|
803
949
|
/**
|
|
804
950
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
@@ -966,7 +1112,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
966
1112
|
* @summary Base classes
|
|
967
1113
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
968
1114
|
*/
|
|
969
|
-
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig } from '@thoughtspot/visual-embed-sdk/types';
|
|
1115
|
+
import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig, MessageOptions } from '@thoughtspot/visual-embed-sdk/types';
|
|
970
1116
|
/**
|
|
971
1117
|
* Global prefix for all Thoughtspot postHash Params.
|
|
972
1118
|
*/
|
|
@@ -1031,15 +1177,28 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
1031
1177
|
* @version 1.6.0 or later
|
|
1032
1178
|
*/
|
|
1033
1179
|
visibleActions?: Action[];
|
|
1180
|
+
/**
|
|
1181
|
+
* Show alert messages and toast messages in the embedded view.
|
|
1182
|
+
* @version 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
1183
|
+
*/
|
|
1184
|
+
showAlerts?: boolean;
|
|
1034
1185
|
/**
|
|
1035
1186
|
* The list of runtime filters to apply to a search answer,
|
|
1036
1187
|
* visualization, or Liveboard.
|
|
1037
1188
|
*/
|
|
1038
1189
|
runtimeFilters?: RuntimeFilter[];
|
|
1190
|
+
/**
|
|
1191
|
+
* The locale/language to use for the embedded view.
|
|
1192
|
+
* @version 1.9.4 or later
|
|
1193
|
+
*/
|
|
1194
|
+
locale?: string;
|
|
1039
1195
|
/**
|
|
1040
1196
|
* This is an object (key/val) of override flags which will be applied
|
|
1041
1197
|
* to the internal embedded object. This can be used to add any
|
|
1042
1198
|
* URL flag.
|
|
1199
|
+
* Warning: This option is for advanced use only and is used internally
|
|
1200
|
+
* to control embed behavior in non-regular ways. We do not publish the
|
|
1201
|
+
* list of supported keys and values associated with each.
|
|
1043
1202
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
1044
1203
|
*/
|
|
1045
1204
|
additionalFlags?: {
|
|
@@ -1137,9 +1296,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
1137
1296
|
* sends an event of a particular message type to the host application.
|
|
1138
1297
|
*
|
|
1139
1298
|
* @param messageType The message type
|
|
1140
|
-
* @param callback A callback function
|
|
1299
|
+
* @param callback A callback as a function
|
|
1300
|
+
* @param options The message options
|
|
1141
1301
|
*/
|
|
1142
|
-
on(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
|
|
1302
|
+
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
1143
1303
|
/**
|
|
1144
1304
|
* Triggers an event to the embedded app
|
|
1145
1305
|
* @param messageType The event type
|
|
@@ -1173,7 +1333,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
|
|
|
1173
1333
|
* @param iframeSrc
|
|
1174
1334
|
*/
|
|
1175
1335
|
protected renderV1Embed(iframeSrc: string): void;
|
|
1176
|
-
on(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
|
|
1336
|
+
on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
1177
1337
|
}
|
|
1178
1338
|
}
|
|
1179
1339
|
|