@thoughtspot/visual-embed-sdk 1.6.0-alpha.1 → 1.7.0-alpha.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/README.md +8 -8
- package/dist/src/embed/app.d.ts +14 -3
- package/dist/src/embed/liveboard.d.ts +101 -0
- package/dist/src/embed/liveboard.spec.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts +2 -11
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/react/index.d.ts +4 -3
- package/dist/src/types.d.ts +23 -20
- package/dist/tsembed.es.js +83 -70
- package/dist/tsembed.js +82 -68
- package/lib/package.json +4 -1
- package/lib/src/embed/app.d.ts +14 -3
- package/lib/src/embed/app.js +25 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +32 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +55 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +101 -0
- package/lib/src/embed/{pinboard.js → liveboard.js} +34 -26
- package/lib/src/embed/liveboard.js.map +1 -0
- package/lib/src/embed/liveboard.spec.d.ts +1 -0
- package/lib/src/embed/liveboard.spec.js +159 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -0
- package/lib/src/embed/pinboard.spec.js +1 -1
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +2 -11
- package/lib/src/embed/ts-embed.js +2 -22
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +63 -6
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -1
- package/lib/src/errors.js +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/index.d.ts +4 -3
- package/lib/src/react/index.js +3 -2
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +23 -20
- package/lib/src/types.js +20 -18
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +79 -58
- package/package.json +4 -1
- package/src/embed/app.spec.ts +41 -0
- package/src/embed/app.ts +28 -3
- package/src/embed/events.spec.ts +64 -5
- package/src/embed/liveboard.spec.ts +199 -0
- package/src/embed/{pinboard.ts → liveboard.ts} +60 -42
- package/src/embed/pinboard.spec.ts +11 -11
- package/src/embed/ts-embed.spec.ts +81 -8
- package/src/embed/ts-embed.ts +3 -24
- package/src/errors.ts +2 -2
- package/src/index.ts +7 -2
- package/src/react/index.tsx +14 -8
- package/src/types.ts +23 -20
- package/dist/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.js.map +0 -1
package/dist/tsembed.js
CHANGED
|
@@ -220,12 +220,12 @@
|
|
|
220
220
|
*/
|
|
221
221
|
EmbedEvent["Load"] = "load";
|
|
222
222
|
/**
|
|
223
|
-
* Data pertaining to answer or
|
|
224
|
-
* @return data - The answer or
|
|
223
|
+
* Data pertaining to answer or Liveboard is received
|
|
224
|
+
* @return data - The answer or Liveboard data
|
|
225
225
|
*/
|
|
226
226
|
EmbedEvent["Data"] = "data";
|
|
227
227
|
/**
|
|
228
|
-
* Search/answer/
|
|
228
|
+
* Search/answer/Liveboard filters have been applied/updated
|
|
229
229
|
* @hidden
|
|
230
230
|
*/
|
|
231
231
|
EmbedEvent["FiltersChanged"] = "filtersChanged";
|
|
@@ -248,13 +248,13 @@
|
|
|
248
248
|
/**
|
|
249
249
|
* A custom action has been triggered
|
|
250
250
|
* @return actionId - The id of the custom action
|
|
251
|
-
* @return data - The answer or
|
|
251
|
+
* @return data - The answer or Liveboard data
|
|
252
252
|
*/
|
|
253
253
|
EmbedEvent["CustomAction"] = "customAction";
|
|
254
254
|
/**
|
|
255
255
|
* A double click has been triggered on table/chart
|
|
256
256
|
* @return ContextMenuInputPoints - data point that is double clicked
|
|
257
|
-
*
|
|
257
|
+
* @version 1.5.0 or later
|
|
258
258
|
*/
|
|
259
259
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
260
260
|
/**
|
|
@@ -272,8 +272,8 @@
|
|
|
272
272
|
*/
|
|
273
273
|
EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
|
|
274
274
|
/**
|
|
275
|
-
* The height of the embedded
|
|
276
|
-
* @return data - The height of the embedded
|
|
275
|
+
* The height of the embedded Liveboard or visualization has been computed.
|
|
276
|
+
* @return data - The height of the embedded Liveboard or visualization
|
|
277
277
|
* @hidden
|
|
278
278
|
*/
|
|
279
279
|
EmbedEvent["EmbedHeight"] = "EMBED_HEIGHT";
|
|
@@ -285,7 +285,6 @@
|
|
|
285
285
|
EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
|
|
286
286
|
/**
|
|
287
287
|
* Detects the route change.
|
|
288
|
-
* @hidden
|
|
289
288
|
*/
|
|
290
289
|
EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
|
|
291
290
|
/**
|
|
@@ -297,7 +296,7 @@
|
|
|
297
296
|
* Emitted when the embed does not have cookie access. This
|
|
298
297
|
* happens on Safari where third-party cookies are blocked by default.
|
|
299
298
|
*
|
|
300
|
-
* @version 1.1.0
|
|
299
|
+
* @version 1.1.0 or later
|
|
301
300
|
*/
|
|
302
301
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
303
302
|
/**
|
|
@@ -308,12 +307,12 @@
|
|
|
308
307
|
EmbedEvent["SAMLComplete"] = "samlComplete";
|
|
309
308
|
/**
|
|
310
309
|
* Emitted when any modal is opened in the app
|
|
311
|
-
*
|
|
310
|
+
* @version 1.6.0 or later
|
|
312
311
|
*/
|
|
313
312
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
314
313
|
/**
|
|
315
314
|
* Emitted when any modal is closed in the app
|
|
316
|
-
*
|
|
315
|
+
* @version 1.6.0 or later
|
|
317
316
|
*/
|
|
318
317
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
319
318
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -330,7 +329,7 @@
|
|
|
330
329
|
* eg. { selectedPoints: []}
|
|
331
330
|
* @param columnGuid - a string guid of the column to drill by. This is optional,
|
|
332
331
|
* if not provided it will auto drill by the configured column. \
|
|
333
|
-
*
|
|
332
|
+
* @version 1.5.0 or later
|
|
334
333
|
*/
|
|
335
334
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
336
335
|
/**
|
|
@@ -344,10 +343,10 @@
|
|
|
344
343
|
*/
|
|
345
344
|
HostEvent["Reload"] = "reload";
|
|
346
345
|
/**
|
|
347
|
-
* Set the visible
|
|
348
|
-
* @param - an array of ids of
|
|
346
|
+
* Set the visible visualizations on a Liveboard.
|
|
347
|
+
* @param - an array of ids of visualizations to show, the ids not passed
|
|
349
348
|
* will be hidden.
|
|
350
|
-
*
|
|
349
|
+
* @version 1.6.0 or later
|
|
351
350
|
*/
|
|
352
351
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
353
352
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
@@ -377,7 +376,7 @@
|
|
|
377
376
|
Param["DisableActions"] = "disableAction";
|
|
378
377
|
Param["DisableActionReason"] = "disableHint";
|
|
379
378
|
Param["ForceTable"] = "forceTable";
|
|
380
|
-
Param["
|
|
379
|
+
Param["preventLiveboardFilterRemoval"] = "preventPinboardFilterRemoval";
|
|
381
380
|
Param["SearchQuery"] = "searchQuery";
|
|
382
381
|
Param["HideActions"] = "hideAction";
|
|
383
382
|
Param["HideObjects"] = "hideObjects";
|
|
@@ -405,7 +404,6 @@
|
|
|
405
404
|
Action["MakeACopy"] = "makeACopy";
|
|
406
405
|
Action["EditACopy"] = "editACopy";
|
|
407
406
|
Action["CopyLink"] = "embedDocument";
|
|
408
|
-
Action["PinboardSnapshot"] = "pinboardSnapshot";
|
|
409
407
|
Action["ResetLayout"] = "resetLayout";
|
|
410
408
|
Action["Schedule"] = "schedule";
|
|
411
409
|
Action["SchedulesList"] = "schedule-list";
|
|
@@ -438,7 +436,11 @@
|
|
|
438
436
|
Action["Describe"] = "describe";
|
|
439
437
|
Action["Relate"] = "relate";
|
|
440
438
|
Action["CustomizeHeadlines"] = "customizeHeadlines";
|
|
439
|
+
/**
|
|
440
|
+
* @hidden
|
|
441
|
+
*/
|
|
441
442
|
Action["PinboardInfo"] = "pinboardInfo";
|
|
443
|
+
Action["LiveboardInfo"] = "pinboardInfo";
|
|
442
444
|
Action["SendAnswerFeedback"] = "sendFeedback";
|
|
443
445
|
/**
|
|
444
446
|
* @deprecated Will be removed in next version
|
|
@@ -468,7 +470,7 @@
|
|
|
468
470
|
|
|
469
471
|
const ERROR_MESSAGE = {
|
|
470
472
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
471
|
-
|
|
473
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
|
|
472
474
|
};
|
|
473
475
|
|
|
474
476
|
/**
|
|
@@ -8809,7 +8811,7 @@
|
|
|
8809
8811
|
}
|
|
8810
8812
|
}
|
|
8811
8813
|
|
|
8812
|
-
var version="1.
|
|
8814
|
+
var version="1.7.0-alpha.0";
|
|
8813
8815
|
|
|
8814
8816
|
/**
|
|
8815
8817
|
* Copyright (c) 2021
|
|
@@ -8975,7 +8977,7 @@
|
|
|
8975
8977
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
8976
8978
|
}
|
|
8977
8979
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
|
|
8978
|
-
if ((visibleActions
|
|
8980
|
+
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
8979
8981
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
8980
8982
|
return queryParams;
|
|
8981
8983
|
}
|
|
@@ -8995,7 +8997,7 @@
|
|
|
8995
8997
|
}
|
|
8996
8998
|
/**
|
|
8997
8999
|
* Constructs the base URL string to load v1 of the ThoughtSpot app.
|
|
8998
|
-
* This is used for embedding
|
|
9000
|
+
* This is used for embedding Liveboards, visualizations, and full application.
|
|
8999
9001
|
* @param queryString The query string to append to the URL.
|
|
9000
9002
|
* @param isAppEmbed A Boolean parameter to specify if you are embedding
|
|
9001
9003
|
* the full application.
|
|
@@ -9173,26 +9175,6 @@
|
|
|
9173
9175
|
this.eventHandlerMap.set(messageType, callbacks);
|
|
9174
9176
|
return this;
|
|
9175
9177
|
}
|
|
9176
|
-
/**
|
|
9177
|
-
* Navigates users to the specified application page.
|
|
9178
|
-
* Use this method to navigate users from the embedded
|
|
9179
|
-
* ThoughtSpot context to a specific page in your app.
|
|
9180
|
-
* @param path The page path string.
|
|
9181
|
-
* For example, to navigate users to a pinboard page,
|
|
9182
|
-
* define the method as navigateToPage('pinboard/<pinboardId>').
|
|
9183
|
-
*/
|
|
9184
|
-
navigateToPage(path) {
|
|
9185
|
-
var _a;
|
|
9186
|
-
const iframeSrc = (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.src;
|
|
9187
|
-
if (iframeSrc) {
|
|
9188
|
-
const embedPath = '#/embed';
|
|
9189
|
-
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
9190
|
-
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
9191
|
-
}
|
|
9192
|
-
else {
|
|
9193
|
-
console.log('Please call render before invoking this method');
|
|
9194
|
-
}
|
|
9195
|
-
}
|
|
9196
9178
|
/**
|
|
9197
9179
|
* Triggers an event on specific Port registered against
|
|
9198
9180
|
* for the EmbedEvent
|
|
@@ -9285,7 +9267,11 @@
|
|
|
9285
9267
|
*/
|
|
9286
9268
|
Page["Answers"] = "answers";
|
|
9287
9269
|
/**
|
|
9288
|
-
*
|
|
9270
|
+
* Liveboards listing page
|
|
9271
|
+
*/
|
|
9272
|
+
Page["Liveboards"] = "liveboards";
|
|
9273
|
+
/**
|
|
9274
|
+
* @hidden
|
|
9289
9275
|
*/
|
|
9290
9276
|
Page["Pinboards"] = "pinboards";
|
|
9291
9277
|
/**
|
|
@@ -9304,7 +9290,7 @@
|
|
|
9304
9290
|
}
|
|
9305
9291
|
/**
|
|
9306
9292
|
* Constructs a map of parameters to be passed on to the
|
|
9307
|
-
* embedded
|
|
9293
|
+
* embedded Liveboard or visualization.
|
|
9308
9294
|
*/
|
|
9309
9295
|
getEmbedParams() {
|
|
9310
9296
|
const params = this.getBaseQueryParams();
|
|
@@ -9341,6 +9327,8 @@
|
|
|
9341
9327
|
return 'answer';
|
|
9342
9328
|
case exports.Page.Answers:
|
|
9343
9329
|
return 'answers';
|
|
9330
|
+
case exports.Page.Liveboards:
|
|
9331
|
+
return 'pinboards';
|
|
9344
9332
|
case exports.Page.Pinboards:
|
|
9345
9333
|
return 'pinboards';
|
|
9346
9334
|
case exports.Page.Data:
|
|
@@ -9365,6 +9353,23 @@
|
|
|
9365
9353
|
}
|
|
9366
9354
|
return path;
|
|
9367
9355
|
}
|
|
9356
|
+
/**
|
|
9357
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
9358
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
9359
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
9360
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
9361
|
+
*/
|
|
9362
|
+
navigateToPage(path) {
|
|
9363
|
+
if (this.iFrame) {
|
|
9364
|
+
const iframeSrc = this.iFrame.src;
|
|
9365
|
+
const embedPath = '#/embed';
|
|
9366
|
+
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
9367
|
+
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
9368
|
+
}
|
|
9369
|
+
else {
|
|
9370
|
+
console.log('Please call render before invoking this method');
|
|
9371
|
+
}
|
|
9372
|
+
}
|
|
9368
9373
|
/**
|
|
9369
9374
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
9370
9375
|
* @param renderOptions An object containing the page ID
|
|
@@ -9383,18 +9388,18 @@
|
|
|
9383
9388
|
/**
|
|
9384
9389
|
* Copyright (c) 2021
|
|
9385
9390
|
*
|
|
9386
|
-
* Embed a ThoughtSpot
|
|
9391
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9387
9392
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
9388
9393
|
* https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
|
|
9389
9394
|
*
|
|
9390
|
-
* @summary
|
|
9395
|
+
* @summary Liveboard & visualization embed
|
|
9391
9396
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
9392
9397
|
*/
|
|
9393
9398
|
/**
|
|
9394
|
-
* Embed a ThoughtSpot
|
|
9395
|
-
* @Category
|
|
9399
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9400
|
+
* @Category Liveboards and Charts
|
|
9396
9401
|
*/
|
|
9397
|
-
class
|
|
9402
|
+
class LiveboardEmbed extends V1Embed {
|
|
9398
9403
|
// eslint-disable-next-line no-useless-constructor
|
|
9399
9404
|
constructor(domSelector, viewConfig) {
|
|
9400
9405
|
super(domSelector, viewConfig);
|
|
@@ -9411,20 +9416,21 @@
|
|
|
9411
9416
|
const obj = this.getIframeCenter();
|
|
9412
9417
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
9413
9418
|
};
|
|
9414
|
-
this.
|
|
9415
|
-
if (data.data.
|
|
9416
|
-
data.data.canvasState !== 'pinboard') {
|
|
9419
|
+
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
9420
|
+
if (!data.data.currentPath.startsWith('/embed/viz/')) {
|
|
9417
9421
|
this.setIFrameHeight(this.defaultHeight);
|
|
9418
9422
|
}
|
|
9419
9423
|
};
|
|
9420
9424
|
}
|
|
9421
9425
|
/**
|
|
9422
9426
|
* Construct a map of params to be passed on to the
|
|
9423
|
-
* embedded
|
|
9427
|
+
* embedded Liveboard or visualization.
|
|
9424
9428
|
*/
|
|
9425
9429
|
getEmbedParams() {
|
|
9426
9430
|
const params = this.getBaseQueryParams();
|
|
9427
|
-
const { enableVizTransformations, fullHeight,
|
|
9431
|
+
const { enableVizTransformations, fullHeight, defaultHeight, } = this.viewConfig;
|
|
9432
|
+
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval ||
|
|
9433
|
+
this.viewConfig.preventPinboardFilterRemoval;
|
|
9428
9434
|
if (fullHeight === true) {
|
|
9429
9435
|
params[Param.fullHeight] = true;
|
|
9430
9436
|
}
|
|
@@ -9434,53 +9440,60 @@
|
|
|
9434
9440
|
if (enableVizTransformations !== undefined) {
|
|
9435
9441
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
9436
9442
|
}
|
|
9437
|
-
if (
|
|
9438
|
-
params[Param.
|
|
9443
|
+
if (preventLiveboardFilterRemoval) {
|
|
9444
|
+
params[Param.preventLiveboardFilterRemoval] = true;
|
|
9439
9445
|
}
|
|
9440
9446
|
params[Param.livedBoardEmbed] = true;
|
|
9441
9447
|
const queryParams = getQueryParamString(params, true);
|
|
9442
9448
|
return queryParams;
|
|
9443
9449
|
}
|
|
9444
9450
|
/**
|
|
9445
|
-
* Construct the URL of the embedded ThoughtSpot
|
|
9451
|
+
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
9446
9452
|
* to be loaded within the iframe.
|
|
9447
|
-
* @param
|
|
9448
|
-
* @param vizId The optional GUID of a visualization within the
|
|
9453
|
+
* @param liveboardId The GUID of the Liveboard.
|
|
9454
|
+
* @param vizId The optional GUID of a visualization within the Liveboard.
|
|
9449
9455
|
* @param runtimeFilters A list of runtime filters to be applied to
|
|
9450
|
-
* the
|
|
9456
|
+
* the Liveboard or visualization on load.
|
|
9451
9457
|
*/
|
|
9452
|
-
getIFrameSrc(
|
|
9458
|
+
getIFrameSrc(liveboardId, vizId, runtimeFilters) {
|
|
9453
9459
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
9454
9460
|
const queryParams = this.getEmbedParams();
|
|
9455
9461
|
const queryString = [filterQuery, queryParams]
|
|
9456
9462
|
.filter(Boolean)
|
|
9457
9463
|
.join('&');
|
|
9458
|
-
let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${
|
|
9464
|
+
let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${liveboardId}`;
|
|
9459
9465
|
if (vizId) {
|
|
9460
9466
|
url = `${url}/${vizId}`;
|
|
9461
9467
|
}
|
|
9462
9468
|
return url;
|
|
9463
9469
|
}
|
|
9464
9470
|
/**
|
|
9465
|
-
* Render an embedded ThoughtSpot
|
|
9466
|
-
* @param renderOptions An object specifying the
|
|
9471
|
+
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
9472
|
+
* @param renderOptions An object specifying the Liveboard ID,
|
|
9467
9473
|
* visualization ID and the runtime filters.
|
|
9468
9474
|
*/
|
|
9469
9475
|
render() {
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9476
|
+
var _a;
|
|
9477
|
+
const { vizId, runtimeFilters } = this.viewConfig;
|
|
9478
|
+
const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
|
|
9479
|
+
if (!liveboardId) {
|
|
9480
|
+
this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
|
|
9473
9481
|
}
|
|
9474
9482
|
if (this.viewConfig.fullHeight === true) {
|
|
9475
|
-
this.on(exports.EmbedEvent.RouteChange, this.
|
|
9483
|
+
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
9476
9484
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
9477
9485
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
9478
9486
|
}
|
|
9479
9487
|
super.render();
|
|
9480
|
-
const src = this.getIFrameSrc(
|
|
9488
|
+
const src = this.getIFrameSrc(liveboardId, vizId, runtimeFilters);
|
|
9481
9489
|
this.renderV1Embed(src);
|
|
9482
9490
|
return this;
|
|
9483
9491
|
}
|
|
9492
|
+
}
|
|
9493
|
+
/**
|
|
9494
|
+
* @hidden
|
|
9495
|
+
*/
|
|
9496
|
+
class PinboardEmbed extends LiveboardEmbed {
|
|
9484
9497
|
}
|
|
9485
9498
|
|
|
9486
9499
|
/**
|
|
@@ -9565,6 +9578,7 @@
|
|
|
9565
9578
|
}
|
|
9566
9579
|
|
|
9567
9580
|
exports.AppEmbed = AppEmbed;
|
|
9581
|
+
exports.LiveboardEmbed = LiveboardEmbed;
|
|
9568
9582
|
exports.PinboardEmbed = PinboardEmbed;
|
|
9569
9583
|
exports.SearchEmbed = SearchEmbed;
|
|
9570
9584
|
exports.init = init;
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-alpha.0",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -126,6 +126,9 @@
|
|
|
126
126
|
"type": "git",
|
|
127
127
|
"url": "git+https://github.com/thoughtspot/visual-embed-sdk.git"
|
|
128
128
|
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"registry": "https://registry.npmjs.org"
|
|
131
|
+
},
|
|
129
132
|
"keywords": [
|
|
130
133
|
"thoughtspot",
|
|
131
134
|
"everywhere",
|
package/lib/src/embed/app.d.ts
CHANGED
|
@@ -27,7 +27,11 @@ export declare enum Page {
|
|
|
27
27
|
*/
|
|
28
28
|
Answers = "answers",
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Liveboards listing page
|
|
31
|
+
*/
|
|
32
|
+
Liveboards = "liveboards",
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
31
35
|
*/
|
|
32
36
|
Pinboards = "pinboards",
|
|
33
37
|
/**
|
|
@@ -63,7 +67,7 @@ export interface AppViewConfig extends ViewConfig {
|
|
|
63
67
|
pageId?: Page;
|
|
64
68
|
/**
|
|
65
69
|
* This puts a filter tag on the application. All metadata lists in the application, such as
|
|
66
|
-
*
|
|
70
|
+
* Liveboards and answers, would be filtered by this tag.
|
|
67
71
|
*/
|
|
68
72
|
tag?: string;
|
|
69
73
|
/**
|
|
@@ -80,7 +84,7 @@ export declare class AppEmbed extends V1Embed {
|
|
|
80
84
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
81
85
|
/**
|
|
82
86
|
* Constructs a map of parameters to be passed on to the
|
|
83
|
-
* embedded
|
|
87
|
+
* embedded Liveboard or visualization.
|
|
84
88
|
*/
|
|
85
89
|
private getEmbedParams;
|
|
86
90
|
/**
|
|
@@ -99,6 +103,13 @@ export declare class AppEmbed extends V1Embed {
|
|
|
99
103
|
* @returns The URL path that the embedded app understands.
|
|
100
104
|
*/
|
|
101
105
|
private formatPath;
|
|
106
|
+
/**
|
|
107
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
108
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
109
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
110
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
111
|
+
*/
|
|
112
|
+
navigateToPage(path: string): void;
|
|
102
113
|
/**
|
|
103
114
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
104
115
|
* @param renderOptions An object containing the page ID
|
package/lib/src/embed/app.js
CHANGED
|
@@ -30,7 +30,11 @@ export var Page;
|
|
|
30
30
|
*/
|
|
31
31
|
Page["Answers"] = "answers";
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Liveboards listing page
|
|
34
|
+
*/
|
|
35
|
+
Page["Liveboards"] = "liveboards";
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
34
38
|
*/
|
|
35
39
|
Page["Pinboards"] = "pinboards";
|
|
36
40
|
/**
|
|
@@ -49,7 +53,7 @@ export class AppEmbed extends V1Embed {
|
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* Constructs a map of parameters to be passed on to the
|
|
52
|
-
* embedded
|
|
56
|
+
* embedded Liveboard or visualization.
|
|
53
57
|
*/
|
|
54
58
|
getEmbedParams() {
|
|
55
59
|
const params = this.getBaseQueryParams();
|
|
@@ -86,6 +90,8 @@ export class AppEmbed extends V1Embed {
|
|
|
86
90
|
return 'answer';
|
|
87
91
|
case Page.Answers:
|
|
88
92
|
return 'answers';
|
|
93
|
+
case Page.Liveboards:
|
|
94
|
+
return 'pinboards';
|
|
89
95
|
case Page.Pinboards:
|
|
90
96
|
return 'pinboards';
|
|
91
97
|
case Page.Data:
|
|
@@ -110,6 +116,23 @@ export class AppEmbed extends V1Embed {
|
|
|
110
116
|
}
|
|
111
117
|
return path;
|
|
112
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Navigate to particular page for app embed. eg:answers/pinboards/home
|
|
121
|
+
* This is used for embedding answers, pinboards, visualizations and full application only.
|
|
122
|
+
* @param path The string, set to iframe src and navigate to new page
|
|
123
|
+
* eg: appEmbed.navigateToPage('pinboards')
|
|
124
|
+
*/
|
|
125
|
+
navigateToPage(path) {
|
|
126
|
+
if (this.iFrame) {
|
|
127
|
+
const iframeSrc = this.iFrame.src;
|
|
128
|
+
const embedPath = '#/embed';
|
|
129
|
+
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
130
|
+
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
console.log('Please call render before invoking this method');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
113
136
|
/**
|
|
114
137
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
115
138
|
* @param renderOptions An object containing the page ID
|
package/lib/src/embed/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/embed/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,KAAK,EAA8B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/embed/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,KAAK,EAA8B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,IAyBX;AAzBD,WAAY,IAAI;IACZ;;OAEG;IACH,qBAAa,CAAA;IACb;;OAEG;IACH,yBAAiB,CAAA;IACjB;;OAEG;IACH,2BAAmB,CAAA;IACnB;;OAEG;IACH,iCAAyB,CAAA;IACzB;;OAEG;IACH,+BAAuB,CAAA;IACvB;;OAEG;IACH,qBAAa,CAAA;AACjB,CAAC,EAzBW,IAAI,KAAJ,IAAI,QAyBf;AAuCD;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,OAAO;IAGjC,kDAAkD;IAClD,YAAY,WAAwB,EAAE,UAAyB;QAC3D,KAAK,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACK,cAA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ACrE,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QACzD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -3,6 +3,7 @@ import { init } from '../index';
|
|
|
3
3
|
import { Action, AuthType, RuntimeFilterOp } from '../types';
|
|
4
4
|
import { executeAfterWait, getDocumentBody, getIFrameSrc, getRootEl, } from '../test/test-utils';
|
|
5
5
|
import { version } from '../../package.json';
|
|
6
|
+
import * as config from '../config';
|
|
6
7
|
const defaultViewConfig = {
|
|
7
8
|
frameParams: {
|
|
8
9
|
width: 1280,
|
|
@@ -11,6 +12,7 @@ const defaultViewConfig = {
|
|
|
11
12
|
};
|
|
12
13
|
const thoughtSpotHost = 'tshost';
|
|
13
14
|
const defaultParams = `&hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}`;
|
|
15
|
+
const defaultParamsForPinboardEmbed = `hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}`;
|
|
14
16
|
beforeAll(() => {
|
|
15
17
|
init({
|
|
16
18
|
thoughtSpotHost,
|
|
@@ -57,6 +59,7 @@ describe('App embed tests', () => {
|
|
|
57
59
|
[Page.Search]: 'answer',
|
|
58
60
|
[Page.Answers]: 'answers',
|
|
59
61
|
[Page.Pinboards]: 'pinboards',
|
|
62
|
+
[Page.Liveboards]: 'pinboards',
|
|
60
63
|
[Page.Data]: 'data/tables',
|
|
61
64
|
[Page.Home]: 'home',
|
|
62
65
|
};
|
|
@@ -128,5 +131,34 @@ describe('App embed tests', () => {
|
|
|
128
131
|
expect(getIFrameSrc()).toBe(`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false${defaultParams}&tag=Finance#/home`);
|
|
129
132
|
});
|
|
130
133
|
});
|
|
134
|
+
describe('Naviage to Page API', () => {
|
|
135
|
+
const path = 'pinboard/e0836cad-4fdf-42d4-bd97-567a6b2a6058';
|
|
136
|
+
beforeEach(() => {
|
|
137
|
+
jest.spyOn(config, 'getThoughtSpotHost').mockImplementation(() => 'http://tshost');
|
|
138
|
+
});
|
|
139
|
+
test('when app is AppEmbed after navigateToPage function call, new path should be set to iframe', async () => {
|
|
140
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
141
|
+
frameParams: {
|
|
142
|
+
width: '100%',
|
|
143
|
+
height: '100%',
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
await appEmbed.render();
|
|
147
|
+
appEmbed.navigateToPage(path);
|
|
148
|
+
expect(getIFrameSrc()).toBe(`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}#/${path}`);
|
|
149
|
+
});
|
|
150
|
+
test('navigateToPage function use before render', async () => {
|
|
151
|
+
spyOn(console, 'log');
|
|
152
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
153
|
+
frameParams: {
|
|
154
|
+
width: '100%',
|
|
155
|
+
height: '100%',
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
appEmbed.navigateToPage(path);
|
|
159
|
+
await appEmbed.render();
|
|
160
|
+
expect(console.log).toHaveBeenCalledWith('Please call render before invoking this method');
|
|
161
|
+
});
|
|
162
|
+
});
|
|
131
163
|
});
|
|
132
164
|
//# sourceMappingURL=app.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.spec.js","sourceRoot":"","sources":["../../../src/embed/app.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,IAAI,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EACH,gBAAgB,EAChB,eAA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