@thoughtspot/visual-embed-sdk 1.5.0 → 1.6.0-alpha.3
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/search.d.ts +0 -4
- 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 +22 -20
- package/dist/tsembed.es.js +83 -71
- package/dist/tsembed.js +82 -69
- package/lib/package.json +1 -2
- 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/liveboard.js +115 -0
- 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/search.d.ts +0 -4
- 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 +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 +22 -20
- package/lib/src/types.js +19 -18
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/fetchAnswers.d.ts +3 -0
- package/lib/src/utils/fetchAnswers.js +49 -0
- package/lib/src/utils/fetchAnswers.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +78 -62
- package/package.json +1 -2
- 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/search.ts +0 -5
- 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 +22 -20
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
|
/**
|
|
@@ -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 = {}));
|
|
@@ -374,11 +373,10 @@
|
|
|
374
373
|
(function (Param) {
|
|
375
374
|
Param["DataSources"] = "dataSources";
|
|
376
375
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
377
|
-
Param["ExpandAllDataSource"] = "expandAllDataSource";
|
|
378
376
|
Param["DisableActions"] = "disableAction";
|
|
379
377
|
Param["DisableActionReason"] = "disableHint";
|
|
380
378
|
Param["ForceTable"] = "forceTable";
|
|
381
|
-
Param["
|
|
379
|
+
Param["preventLiveboardFilterRemoval"] = "preventPinboardFilterRemoval";
|
|
382
380
|
Param["SearchQuery"] = "searchQuery";
|
|
383
381
|
Param["HideActions"] = "hideAction";
|
|
384
382
|
Param["HideObjects"] = "hideObjects";
|
|
@@ -406,7 +404,6 @@
|
|
|
406
404
|
Action["MakeACopy"] = "makeACopy";
|
|
407
405
|
Action["EditACopy"] = "editACopy";
|
|
408
406
|
Action["CopyLink"] = "embedDocument";
|
|
409
|
-
Action["PinboardSnapshot"] = "pinboardSnapshot";
|
|
410
407
|
Action["ResetLayout"] = "resetLayout";
|
|
411
408
|
Action["Schedule"] = "schedule";
|
|
412
409
|
Action["SchedulesList"] = "schedule-list";
|
|
@@ -439,7 +436,11 @@
|
|
|
439
436
|
Action["Describe"] = "describe";
|
|
440
437
|
Action["Relate"] = "relate";
|
|
441
438
|
Action["CustomizeHeadlines"] = "customizeHeadlines";
|
|
439
|
+
/**
|
|
440
|
+
* @hidden
|
|
441
|
+
*/
|
|
442
442
|
Action["PinboardInfo"] = "pinboardInfo";
|
|
443
|
+
Action["LiveboardInfo"] = "pinboardInfo";
|
|
443
444
|
Action["SendAnswerFeedback"] = "sendFeedback";
|
|
444
445
|
/**
|
|
445
446
|
* @deprecated Will be removed in next version
|
|
@@ -469,7 +470,7 @@
|
|
|
469
470
|
|
|
470
471
|
const ERROR_MESSAGE = {
|
|
471
472
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
472
|
-
|
|
473
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please provide either liveboardId or pinboardId',
|
|
473
474
|
};
|
|
474
475
|
|
|
475
476
|
/**
|
|
@@ -8810,7 +8811,7 @@
|
|
|
8810
8811
|
}
|
|
8811
8812
|
}
|
|
8812
8813
|
|
|
8813
|
-
var version="1.
|
|
8814
|
+
var version="1.6.0-alpha.3";
|
|
8814
8815
|
|
|
8815
8816
|
/**
|
|
8816
8817
|
* Copyright (c) 2021
|
|
@@ -8976,7 +8977,7 @@
|
|
|
8976
8977
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
8977
8978
|
}
|
|
8978
8979
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
|
|
8979
|
-
if ((visibleActions
|
|
8980
|
+
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
8980
8981
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
8981
8982
|
return queryParams;
|
|
8982
8983
|
}
|
|
@@ -8996,7 +8997,7 @@
|
|
|
8996
8997
|
}
|
|
8997
8998
|
/**
|
|
8998
8999
|
* Constructs the base URL string to load v1 of the ThoughtSpot app.
|
|
8999
|
-
* This is used for embedding
|
|
9000
|
+
* This is used for embedding Liveboards, visualizations, and full application.
|
|
9000
9001
|
* @param queryString The query string to append to the URL.
|
|
9001
9002
|
* @param isAppEmbed A Boolean parameter to specify if you are embedding
|
|
9002
9003
|
* the full application.
|
|
@@ -9174,26 +9175,6 @@
|
|
|
9174
9175
|
this.eventHandlerMap.set(messageType, callbacks);
|
|
9175
9176
|
return this;
|
|
9176
9177
|
}
|
|
9177
|
-
/**
|
|
9178
|
-
* Navigates users to the specified application page.
|
|
9179
|
-
* Use this method to navigate users from the embedded
|
|
9180
|
-
* ThoughtSpot context to a specific page in your app.
|
|
9181
|
-
* @param path The page path string.
|
|
9182
|
-
* For example, to navigate users to a pinboard page,
|
|
9183
|
-
* define the method as navigateToPage('pinboard/<pinboardId>').
|
|
9184
|
-
*/
|
|
9185
|
-
navigateToPage(path) {
|
|
9186
|
-
var _a;
|
|
9187
|
-
const iframeSrc = (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.src;
|
|
9188
|
-
if (iframeSrc) {
|
|
9189
|
-
const embedPath = '#/embed';
|
|
9190
|
-
const currentPath = iframeSrc.includes(embedPath) ? embedPath : '#';
|
|
9191
|
-
this.iFrame.src = `${iframeSrc.split(currentPath)[0]}${currentPath}/${path.replace(/^\/?#?\//, '')}`;
|
|
9192
|
-
}
|
|
9193
|
-
else {
|
|
9194
|
-
console.log('Please call render before invoking this method');
|
|
9195
|
-
}
|
|
9196
|
-
}
|
|
9197
9178
|
/**
|
|
9198
9179
|
* Triggers an event on specific Port registered against
|
|
9199
9180
|
* for the EmbedEvent
|
|
@@ -9286,7 +9267,11 @@
|
|
|
9286
9267
|
*/
|
|
9287
9268
|
Page["Answers"] = "answers";
|
|
9288
9269
|
/**
|
|
9289
|
-
*
|
|
9270
|
+
* Liveboards listing page
|
|
9271
|
+
*/
|
|
9272
|
+
Page["Liveboards"] = "liveboards";
|
|
9273
|
+
/**
|
|
9274
|
+
* @hidden
|
|
9290
9275
|
*/
|
|
9291
9276
|
Page["Pinboards"] = "pinboards";
|
|
9292
9277
|
/**
|
|
@@ -9305,7 +9290,7 @@
|
|
|
9305
9290
|
}
|
|
9306
9291
|
/**
|
|
9307
9292
|
* Constructs a map of parameters to be passed on to the
|
|
9308
|
-
* embedded
|
|
9293
|
+
* embedded Liveboard or visualization.
|
|
9309
9294
|
*/
|
|
9310
9295
|
getEmbedParams() {
|
|
9311
9296
|
const params = this.getBaseQueryParams();
|
|
@@ -9342,6 +9327,8 @@
|
|
|
9342
9327
|
return 'answer';
|
|
9343
9328
|
case exports.Page.Answers:
|
|
9344
9329
|
return 'answers';
|
|
9330
|
+
case exports.Page.Liveboards:
|
|
9331
|
+
return 'pinboards';
|
|
9345
9332
|
case exports.Page.Pinboards:
|
|
9346
9333
|
return 'pinboards';
|
|
9347
9334
|
case exports.Page.Data:
|
|
@@ -9366,6 +9353,23 @@
|
|
|
9366
9353
|
}
|
|
9367
9354
|
return path;
|
|
9368
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
|
+
}
|
|
9369
9373
|
/**
|
|
9370
9374
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
9371
9375
|
* @param renderOptions An object containing the page ID
|
|
@@ -9384,18 +9388,18 @@
|
|
|
9384
9388
|
/**
|
|
9385
9389
|
* Copyright (c) 2021
|
|
9386
9390
|
*
|
|
9387
|
-
* Embed a ThoughtSpot
|
|
9391
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9388
9392
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
9389
9393
|
* https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
|
|
9390
9394
|
*
|
|
9391
|
-
* @summary
|
|
9395
|
+
* @summary Liveboard & visualization embed
|
|
9392
9396
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
9393
9397
|
*/
|
|
9394
9398
|
/**
|
|
9395
|
-
* Embed a ThoughtSpot
|
|
9396
|
-
* @Category
|
|
9399
|
+
* Embed a ThoughtSpot Liveboard or visualization
|
|
9400
|
+
* @Category Liveboards and Charts
|
|
9397
9401
|
*/
|
|
9398
|
-
class
|
|
9402
|
+
class LiveboardEmbed extends V1Embed {
|
|
9399
9403
|
// eslint-disable-next-line no-useless-constructor
|
|
9400
9404
|
constructor(domSelector, viewConfig) {
|
|
9401
9405
|
super(domSelector, viewConfig);
|
|
@@ -9412,20 +9416,21 @@
|
|
|
9412
9416
|
const obj = this.getIframeCenter();
|
|
9413
9417
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
9414
9418
|
};
|
|
9415
|
-
this.
|
|
9416
|
-
if (data.data.
|
|
9417
|
-
data.data.canvasState !== 'pinboard') {
|
|
9419
|
+
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
9420
|
+
if (!data.data.currentPath.startsWith('/embed/viz/')) {
|
|
9418
9421
|
this.setIFrameHeight(this.defaultHeight);
|
|
9419
9422
|
}
|
|
9420
9423
|
};
|
|
9421
9424
|
}
|
|
9422
9425
|
/**
|
|
9423
9426
|
* Construct a map of params to be passed on to the
|
|
9424
|
-
* embedded
|
|
9427
|
+
* embedded Liveboard or visualization.
|
|
9425
9428
|
*/
|
|
9426
9429
|
getEmbedParams() {
|
|
9427
9430
|
const params = this.getBaseQueryParams();
|
|
9428
|
-
const { enableVizTransformations, fullHeight,
|
|
9431
|
+
const { enableVizTransformations, fullHeight, defaultHeight, } = this.viewConfig;
|
|
9432
|
+
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval ||
|
|
9433
|
+
this.viewConfig.preventPinboardFilterRemoval;
|
|
9429
9434
|
if (fullHeight === true) {
|
|
9430
9435
|
params[Param.fullHeight] = true;
|
|
9431
9436
|
}
|
|
@@ -9435,53 +9440,60 @@
|
|
|
9435
9440
|
if (enableVizTransformations !== undefined) {
|
|
9436
9441
|
params[Param.EnableVizTransformations] = enableVizTransformations.toString();
|
|
9437
9442
|
}
|
|
9438
|
-
if (
|
|
9439
|
-
params[Param.
|
|
9443
|
+
if (preventLiveboardFilterRemoval) {
|
|
9444
|
+
params[Param.preventLiveboardFilterRemoval] = true;
|
|
9440
9445
|
}
|
|
9441
9446
|
params[Param.livedBoardEmbed] = true;
|
|
9442
9447
|
const queryParams = getQueryParamString(params, true);
|
|
9443
9448
|
return queryParams;
|
|
9444
9449
|
}
|
|
9445
9450
|
/**
|
|
9446
|
-
* Construct the URL of the embedded ThoughtSpot
|
|
9451
|
+
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
9447
9452
|
* to be loaded within the iframe.
|
|
9448
|
-
* @param
|
|
9449
|
-
* @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.
|
|
9450
9455
|
* @param runtimeFilters A list of runtime filters to be applied to
|
|
9451
|
-
* the
|
|
9456
|
+
* the Liveboard or visualization on load.
|
|
9452
9457
|
*/
|
|
9453
|
-
getIFrameSrc(
|
|
9458
|
+
getIFrameSrc(liveboardId, vizId, runtimeFilters) {
|
|
9454
9459
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
9455
9460
|
const queryParams = this.getEmbedParams();
|
|
9456
9461
|
const queryString = [filterQuery, queryParams]
|
|
9457
9462
|
.filter(Boolean)
|
|
9458
9463
|
.join('&');
|
|
9459
|
-
let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${
|
|
9464
|
+
let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${liveboardId}`;
|
|
9460
9465
|
if (vizId) {
|
|
9461
9466
|
url = `${url}/${vizId}`;
|
|
9462
9467
|
}
|
|
9463
9468
|
return url;
|
|
9464
9469
|
}
|
|
9465
9470
|
/**
|
|
9466
|
-
* Render an embedded ThoughtSpot
|
|
9467
|
-
* @param renderOptions An object specifying the
|
|
9471
|
+
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
9472
|
+
* @param renderOptions An object specifying the Liveboard ID,
|
|
9468
9473
|
* visualization ID and the runtime filters.
|
|
9469
9474
|
*/
|
|
9470
9475
|
render() {
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
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);
|
|
9474
9481
|
}
|
|
9475
9482
|
if (this.viewConfig.fullHeight === true) {
|
|
9476
|
-
this.on(exports.EmbedEvent.RouteChange, this.
|
|
9483
|
+
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
9477
9484
|
this.on(exports.EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
9478
9485
|
this.on(exports.EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
9479
9486
|
}
|
|
9480
9487
|
super.render();
|
|
9481
|
-
const src = this.getIFrameSrc(
|
|
9488
|
+
const src = this.getIFrameSrc(liveboardId, vizId, runtimeFilters);
|
|
9482
9489
|
this.renderV1Embed(src);
|
|
9483
9490
|
return this;
|
|
9484
9491
|
}
|
|
9492
|
+
}
|
|
9493
|
+
/**
|
|
9494
|
+
* @hidden
|
|
9495
|
+
*/
|
|
9496
|
+
class PinboardEmbed extends LiveboardEmbed {
|
|
9485
9497
|
}
|
|
9486
9498
|
|
|
9487
9499
|
/**
|
|
@@ -9523,7 +9535,7 @@
|
|
|
9523
9535
|
* @param dataSources A list of data source GUIDs
|
|
9524
9536
|
*/
|
|
9525
9537
|
getIFrameSrc(answerId, dataSources) {
|
|
9526
|
-
const { hideResults,
|
|
9538
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
|
|
9527
9539
|
const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
|
|
9528
9540
|
const queryParams = this.getBaseQueryParams();
|
|
9529
9541
|
if (dataSources && dataSources.length) {
|
|
@@ -9566,6 +9578,7 @@
|
|
|
9566
9578
|
}
|
|
9567
9579
|
|
|
9568
9580
|
exports.AppEmbed = AppEmbed;
|
|
9581
|
+
exports.LiveboardEmbed = LiveboardEmbed;
|
|
9569
9582
|
exports.PinboardEmbed = PinboardEmbed;
|
|
9570
9583
|
exports.SearchEmbed = SearchEmbed;
|
|
9571
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.6.0-alpha.3",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"asciidoctor": "^2.2.1",
|
|
66
66
|
"babel-jest": "^26.6.3",
|
|
67
67
|
"babel-preset-gatsby": "^1.10.0",
|
|
68
|
-
"classnames": "^2.3.1",
|
|
69
68
|
"command-line-args": "^5.1.1",
|
|
70
69
|
"coveralls": "^3.1.0",
|
|
71
70
|
"dts-bundle": "0.7.3",
|
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,C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EAAE,EAAE,CAAC,EAAE,CAAC;SACpD;aAAM;YACH,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;SACjE;IACL,CAAC;IAED;;;;OAIG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACrE,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,eAAe,EACf,YAAY,EACZ,SAAS,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
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,eAAe,EACf,YAAY,EACZ,SAAS,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,MAAM,iBAAiB,GAAG;IACtB,WAAW,EAAE;QACT,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,GAAG;KACd;CACJ,CAAC;AACF,MAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,MAAM,aAAa,GAAG,2EAA2E,OAAO,EAAE,CAAC;AAC3G,MAAM,6BAA6B,GAAG,0EAA0E,OAAO,EAAE,CAAC;AAE1H,SAAS,CAAC,GAAG,EAAE;IACX,IAAI,CAAC;QACD,eAAe;QACf,QAA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