@thoughtspot/visual-embed-sdk 1.7.0-alpha.2 → 1.8.0-alpha.2
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 +1 -1
- package/dist/src/embed/app.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/search.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts +11 -2
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types.d.ts +39 -7
- package/dist/src/utils.d.ts +1 -1
- package/dist/tsembed.es.js +52 -13
- package/dist/tsembed.js +49 -13
- package/lib/package.json +1 -1
- package/lib/src/config.js +1 -1
- package/lib/src/embed/app.d.ts +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/search.d.ts +1 -1
- package/lib/src/embed/search.js +5 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +13 -12
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +11 -2
- package/lib/src/embed/ts-embed.js +5 -2
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +24 -5
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/react/index.spec.js +1 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +39 -7
- package/lib/src/types.js +37 -5
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +1 -1
- package/lib/src/utils.js +1 -1
- package/lib/src/visual-embed-sdk.d.ts +54 -13
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/embed/app.ts +1 -1
- package/src/embed/base.ts +1 -1
- package/src/embed/liveboard.ts +2 -2
- package/src/embed/search.spec.ts +13 -12
- package/src/embed/search.ts +5 -1
- package/src/embed/ts-embed.spec.ts +29 -6
- package/src/embed/ts-embed.ts +13 -2
- package/src/index.ts +1 -1
- package/src/react/index.spec.tsx +1 -1
- package/src/types.ts +37 -5
- package/src/utils.ts +1 -1
- package/dist/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.d.ts +0 -85
- package/lib/src/embed/pinboard.js +0 -107
- package/lib/src/embed/pinboard.js.map +0 -1
- package/lib/src/utils/fetchAnswers.d.ts +0 -3
- package/lib/src/utils/fetchAnswers.js +0 -49
- package/lib/src/utils/fetchAnswers.js.map +0 -1
package/README.md
CHANGED
package/dist/src/embed/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022
|
|
3
3
|
*
|
|
4
4
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
5
5
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
@@ -24,7 +24,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
24
24
|
* This is the minimum height(in pixels) for a full height Liveboard.
|
|
25
25
|
* Setting this height helps resolves issues with empty Liveboards and
|
|
26
26
|
* other screens navigable from a Liveboard.
|
|
27
|
-
*
|
|
27
|
+
* @version 1.5.0 or later
|
|
28
28
|
* @default 500
|
|
29
29
|
*/
|
|
30
30
|
defaultHeight?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022
|
|
3
3
|
*
|
|
4
4
|
* Base classes
|
|
5
5
|
*
|
|
@@ -59,7 +59,7 @@ export interface ViewConfig {
|
|
|
59
59
|
/**
|
|
60
60
|
* The list of actions to display from the primary menu, more menu
|
|
61
61
|
* (...), and the contextual menu.
|
|
62
|
-
*
|
|
62
|
+
* @version 1.6.0 or later
|
|
63
63
|
*/
|
|
64
64
|
visibleActions?: Action[];
|
|
65
65
|
/**
|
|
@@ -67,6 +67,15 @@ export interface ViewConfig {
|
|
|
67
67
|
* visualization, or Liveboard.
|
|
68
68
|
*/
|
|
69
69
|
runtimeFilters?: RuntimeFilter[];
|
|
70
|
+
/**
|
|
71
|
+
* This is an object (key/val) of override flags which will be applied
|
|
72
|
+
* to the internal embedded object. This can be used to add any
|
|
73
|
+
* URL flag.
|
|
74
|
+
* @version 1.8.0
|
|
75
|
+
*/
|
|
76
|
+
additionalFlags?: {
|
|
77
|
+
[key: string]: string | number | boolean;
|
|
78
|
+
};
|
|
70
79
|
}
|
|
71
80
|
/**
|
|
72
81
|
* Base class for embedding v2 experience
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022
|
|
3
3
|
*
|
|
4
4
|
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
|
|
5
5
|
*
|
|
@@ -261,6 +261,12 @@ export declare enum EmbedEvent {
|
|
|
261
261
|
* @return dataSourceIds - the list of data sources
|
|
262
262
|
*/
|
|
263
263
|
DataSourceSelected = "dataSourceSelected",
|
|
264
|
+
/**
|
|
265
|
+
* One or more data columns have been selected.
|
|
266
|
+
* @return columnIds - the list of columns
|
|
267
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.2.0.cl
|
|
268
|
+
*/
|
|
269
|
+
AddRemoveColumns = "addRemoveColumns",
|
|
264
270
|
/**
|
|
265
271
|
* A custom action has been triggered
|
|
266
272
|
* @return actionId - The id of the custom action
|
|
@@ -335,6 +341,9 @@ export declare enum EmbedEvent {
|
|
|
335
341
|
/**
|
|
336
342
|
* Event types that can be triggered by the host application
|
|
337
343
|
* to the embedded ThoughtSpot app
|
|
344
|
+
*
|
|
345
|
+
* To trigger an event use the corresponding
|
|
346
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
|
|
338
347
|
*/
|
|
339
348
|
export declare enum HostEvent {
|
|
340
349
|
/**
|
|
@@ -368,7 +377,13 @@ export declare enum HostEvent {
|
|
|
368
377
|
* will be hidden.
|
|
369
378
|
* @version 1.6.0 or later
|
|
370
379
|
*/
|
|
371
|
-
SetVisibleVizs = "SetPinboardVisibleVizs"
|
|
380
|
+
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
381
|
+
/**
|
|
382
|
+
* Update the runtime filters
|
|
383
|
+
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
384
|
+
* @version 1.8.0 or later
|
|
385
|
+
*/
|
|
386
|
+
UpdateRuntimeFilters = "UpdateRuntimeFilters"
|
|
372
387
|
}
|
|
373
388
|
/**
|
|
374
389
|
* The different visual modes that the data sources panel within
|
|
@@ -412,6 +427,7 @@ export declare enum Param {
|
|
|
412
427
|
executeSearch = "executeSearch",
|
|
413
428
|
fullHeight = "isFullHeightPinboard",
|
|
414
429
|
livedBoardEmbed = "isLiveboardEmbed",
|
|
430
|
+
searchEmbed = "isSearchEmbed",
|
|
415
431
|
Version = "sdkVersion",
|
|
416
432
|
ViewPortHeight = "viewPortHeight",
|
|
417
433
|
ViewPortWidth = "viewPortWidth",
|
|
@@ -468,10 +484,6 @@ export declare enum Action {
|
|
|
468
484
|
PinboardInfo = "pinboardInfo",
|
|
469
485
|
LiveboardInfo = "pinboardInfo",
|
|
470
486
|
SendAnswerFeedback = "sendFeedback",
|
|
471
|
-
/**
|
|
472
|
-
* @deprecated Will be removed in next version
|
|
473
|
-
*/
|
|
474
|
-
CustomAction = "customAction",
|
|
475
487
|
DownloadEmbraceQueries = "downloadEmbraceQueries",
|
|
476
488
|
Pin = "pin",
|
|
477
489
|
AnalysisInfo = "analysisInfo",
|
|
@@ -486,7 +498,27 @@ export declare enum Action {
|
|
|
486
498
|
Separator = "context-menu-item-separator",
|
|
487
499
|
DrillDown = "DRILL",
|
|
488
500
|
RequestAccess = "requestAccess",
|
|
489
|
-
QueryDetailsButtons = "queryDetailsButtons"
|
|
501
|
+
QueryDetailsButtons = "queryDetailsButtons",
|
|
502
|
+
/**
|
|
503
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
504
|
+
*/
|
|
505
|
+
Monitor = "createMonitor",
|
|
506
|
+
/**
|
|
507
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
508
|
+
*/
|
|
509
|
+
AnswerDelete = "onDeleteAnswer",
|
|
510
|
+
/**
|
|
511
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
512
|
+
*/
|
|
513
|
+
AnswerChartSwitcher = "answerChartSwitcher",
|
|
514
|
+
/**
|
|
515
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
516
|
+
*/
|
|
517
|
+
AddToFavorites = "addToFavorites",
|
|
518
|
+
/**
|
|
519
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
520
|
+
*/
|
|
521
|
+
EditDetails = "editDetails"
|
|
490
522
|
}
|
|
491
523
|
export interface SessionInterface {
|
|
492
524
|
sessionId: string;
|
package/dist/src/utils.d.ts
CHANGED
package/dist/tsembed.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022
|
|
3
3
|
*
|
|
4
4
|
* Common utility functions for ThoughtSpot Visual Embed SDK
|
|
5
5
|
*
|
|
@@ -111,7 +111,7 @@ const getOffsetTop = (element) => {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Copyright (c)
|
|
114
|
+
* Copyright (c) 2022
|
|
115
115
|
*
|
|
116
116
|
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
|
|
117
117
|
*
|
|
@@ -259,6 +259,12 @@ var EmbedEvent;
|
|
|
259
259
|
* @return dataSourceIds - the list of data sources
|
|
260
260
|
*/
|
|
261
261
|
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
|
|
262
|
+
/**
|
|
263
|
+
* One or more data columns have been selected.
|
|
264
|
+
* @return columnIds - the list of columns
|
|
265
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.2.0.cl
|
|
266
|
+
*/
|
|
267
|
+
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
262
268
|
/**
|
|
263
269
|
* A custom action has been triggered
|
|
264
270
|
* @return actionId - The id of the custom action
|
|
@@ -333,6 +339,9 @@ var EmbedEvent;
|
|
|
333
339
|
/**
|
|
334
340
|
* Event types that can be triggered by the host application
|
|
335
341
|
* to the embedded ThoughtSpot app
|
|
342
|
+
*
|
|
343
|
+
* To trigger an event use the corresponding
|
|
344
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
|
|
336
345
|
*/
|
|
337
346
|
// eslint-disable-next-line no-shadow
|
|
338
347
|
var HostEvent;
|
|
@@ -369,6 +378,12 @@ var HostEvent;
|
|
|
369
378
|
* @version 1.6.0 or later
|
|
370
379
|
*/
|
|
371
380
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
381
|
+
/**
|
|
382
|
+
* Update the runtime filters
|
|
383
|
+
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
384
|
+
* @version 1.8.0 or later
|
|
385
|
+
*/
|
|
386
|
+
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
372
387
|
})(HostEvent || (HostEvent = {}));
|
|
373
388
|
/**
|
|
374
389
|
* The different visual modes that the data sources panel within
|
|
@@ -416,6 +431,7 @@ var Param;
|
|
|
416
431
|
Param["executeSearch"] = "executeSearch";
|
|
417
432
|
Param["fullHeight"] = "isFullHeightPinboard";
|
|
418
433
|
Param["livedBoardEmbed"] = "isLiveboardEmbed";
|
|
434
|
+
Param["searchEmbed"] = "isSearchEmbed";
|
|
419
435
|
Param["Version"] = "sdkVersion";
|
|
420
436
|
Param["ViewPortHeight"] = "viewPortHeight";
|
|
421
437
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
@@ -474,10 +490,6 @@ var Action;
|
|
|
474
490
|
Action["PinboardInfo"] = "pinboardInfo";
|
|
475
491
|
Action["LiveboardInfo"] = "pinboardInfo";
|
|
476
492
|
Action["SendAnswerFeedback"] = "sendFeedback";
|
|
477
|
-
/**
|
|
478
|
-
* @deprecated Will be removed in next version
|
|
479
|
-
*/
|
|
480
|
-
Action["CustomAction"] = "customAction";
|
|
481
493
|
Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
|
|
482
494
|
Action["Pin"] = "pin";
|
|
483
495
|
Action["AnalysisInfo"] = "analysisInfo";
|
|
@@ -493,6 +505,26 @@ var Action;
|
|
|
493
505
|
Action["DrillDown"] = "DRILL";
|
|
494
506
|
Action["RequestAccess"] = "requestAccess";
|
|
495
507
|
Action["QueryDetailsButtons"] = "queryDetailsButtons";
|
|
508
|
+
/**
|
|
509
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
510
|
+
*/
|
|
511
|
+
Action["Monitor"] = "createMonitor";
|
|
512
|
+
/**
|
|
513
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
514
|
+
*/
|
|
515
|
+
Action["AnswerDelete"] = "onDeleteAnswer";
|
|
516
|
+
/**
|
|
517
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
518
|
+
*/
|
|
519
|
+
Action["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
520
|
+
/**
|
|
521
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
522
|
+
*/
|
|
523
|
+
Action["AddToFavorites"] = "addToFavorites";
|
|
524
|
+
/**
|
|
525
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
526
|
+
*/
|
|
527
|
+
Action["EditDetails"] = "editDetails";
|
|
496
528
|
})(Action || (Action = {}));
|
|
497
529
|
// eslint-disable-next-line no-shadow
|
|
498
530
|
var OperationType;
|
|
@@ -507,7 +539,7 @@ const ERROR_MESSAGE = {
|
|
|
507
539
|
};
|
|
508
540
|
|
|
509
541
|
/**
|
|
510
|
-
* Copyright (c)
|
|
542
|
+
* Copyright (c) 2022
|
|
511
543
|
*
|
|
512
544
|
* Utilities related to reading configuration objects
|
|
513
545
|
*
|
|
@@ -8862,10 +8894,10 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
8862
8894
|
}
|
|
8863
8895
|
}
|
|
8864
8896
|
|
|
8865
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
8897
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**"];var exports={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1","mixpanel-browser":"^2.41.0"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","dts-bundle":"0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.1.0","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
8866
8898
|
|
|
8867
8899
|
/**
|
|
8868
|
-
* Copyright (c)
|
|
8900
|
+
* Copyright (c) 2022
|
|
8869
8901
|
*
|
|
8870
8902
|
* Base classes
|
|
8871
8903
|
*
|
|
@@ -9028,7 +9060,7 @@ class TsEmbed {
|
|
|
9028
9060
|
if (this.embedConfig.customCssUrl) {
|
|
9029
9061
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
9030
9062
|
}
|
|
9031
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
|
|
9063
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
|
|
9032
9064
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
9033
9065
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
9034
9066
|
return queryParams;
|
|
@@ -9045,6 +9077,9 @@ class TsEmbed {
|
|
|
9045
9077
|
if (Array.isArray(visibleActions)) {
|
|
9046
9078
|
queryParams[Param.VisibleActions] = visibleActions;
|
|
9047
9079
|
}
|
|
9080
|
+
if (additionalFlags && additionalFlags.constructor.name === 'Object') {
|
|
9081
|
+
Object.assign(queryParams, additionalFlags);
|
|
9082
|
+
}
|
|
9048
9083
|
return queryParams;
|
|
9049
9084
|
}
|
|
9050
9085
|
/**
|
|
@@ -9296,7 +9331,7 @@ class V1Embed extends TsEmbed {
|
|
|
9296
9331
|
}
|
|
9297
9332
|
|
|
9298
9333
|
/**
|
|
9299
|
-
* Copyright (c)
|
|
9334
|
+
* Copyright (c) 2022
|
|
9300
9335
|
*
|
|
9301
9336
|
* Full application embedding
|
|
9302
9337
|
* https://developers.thoughtspot.com/docs/?pageid=full-embed
|
|
@@ -9443,7 +9478,7 @@ class AppEmbed extends V1Embed {
|
|
|
9443
9478
|
}
|
|
9444
9479
|
|
|
9445
9480
|
/**
|
|
9446
|
-
* Copyright (c)
|
|
9481
|
+
* Copyright (c) 2022
|
|
9447
9482
|
*
|
|
9448
9483
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
9449
9484
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
@@ -9554,7 +9589,7 @@ class PinboardEmbed extends LiveboardEmbed {
|
|
|
9554
9589
|
}
|
|
9555
9590
|
|
|
9556
9591
|
/**
|
|
9557
|
-
* Copyright (c)
|
|
9592
|
+
* Copyright (c) 2022
|
|
9558
9593
|
*
|
|
9559
9594
|
* Embed ThoughtSpot search or a saved answer
|
|
9560
9595
|
*
|
|
@@ -9564,6 +9599,9 @@ class PinboardEmbed extends LiveboardEmbed {
|
|
|
9564
9599
|
const HiddenActionItemByDefaultForSearchEmbed = [
|
|
9565
9600
|
Action.EditACopy,
|
|
9566
9601
|
Action.SaveAsView,
|
|
9602
|
+
Action.UpdateTML,
|
|
9603
|
+
Action.EditTML,
|
|
9604
|
+
Action.AnswerDelete,
|
|
9567
9605
|
];
|
|
9568
9606
|
/**
|
|
9569
9607
|
* Embed ThoughtSpot search
|
|
@@ -9624,6 +9662,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
9624
9662
|
}
|
|
9625
9663
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
9626
9664
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
9665
|
+
queryParams[Param.searchEmbed] = true;
|
|
9627
9666
|
let query = '';
|
|
9628
9667
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
9629
9668
|
if (queryParamsString) {
|
package/dist/tsembed.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
}(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Copyright (c)
|
|
8
|
+
* Copyright (c) 2022
|
|
9
9
|
*
|
|
10
10
|
* Common utility functions for ThoughtSpot Visual Embed SDK
|
|
11
11
|
*
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* Copyright (c)
|
|
120
|
+
* Copyright (c) 2022
|
|
121
121
|
*
|
|
122
122
|
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
|
|
123
123
|
*
|
|
@@ -249,6 +249,12 @@
|
|
|
249
249
|
* @return dataSourceIds - the list of data sources
|
|
250
250
|
*/
|
|
251
251
|
EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
|
|
252
|
+
/**
|
|
253
|
+
* One or more data columns have been selected.
|
|
254
|
+
* @return columnIds - the list of columns
|
|
255
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.2.0.cl
|
|
256
|
+
*/
|
|
257
|
+
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
252
258
|
/**
|
|
253
259
|
* A custom action has been triggered
|
|
254
260
|
* @return actionId - The id of the custom action
|
|
@@ -353,6 +359,12 @@
|
|
|
353
359
|
* @version 1.6.0 or later
|
|
354
360
|
*/
|
|
355
361
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
362
|
+
/**
|
|
363
|
+
* Update the runtime filters
|
|
364
|
+
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
365
|
+
* @version 1.8.0 or later
|
|
366
|
+
*/
|
|
367
|
+
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
356
368
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
357
369
|
(function (DataSourceVisualMode) {
|
|
358
370
|
/**
|
|
@@ -394,6 +406,7 @@
|
|
|
394
406
|
Param["executeSearch"] = "executeSearch";
|
|
395
407
|
Param["fullHeight"] = "isFullHeightPinboard";
|
|
396
408
|
Param["livedBoardEmbed"] = "isLiveboardEmbed";
|
|
409
|
+
Param["searchEmbed"] = "isSearchEmbed";
|
|
397
410
|
Param["Version"] = "sdkVersion";
|
|
398
411
|
Param["ViewPortHeight"] = "viewPortHeight";
|
|
399
412
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
@@ -446,10 +459,6 @@
|
|
|
446
459
|
Action["PinboardInfo"] = "pinboardInfo";
|
|
447
460
|
Action["LiveboardInfo"] = "pinboardInfo";
|
|
448
461
|
Action["SendAnswerFeedback"] = "sendFeedback";
|
|
449
|
-
/**
|
|
450
|
-
* @deprecated Will be removed in next version
|
|
451
|
-
*/
|
|
452
|
-
Action["CustomAction"] = "customAction";
|
|
453
462
|
Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
|
|
454
463
|
Action["Pin"] = "pin";
|
|
455
464
|
Action["AnalysisInfo"] = "analysisInfo";
|
|
@@ -465,6 +474,26 @@
|
|
|
465
474
|
Action["DrillDown"] = "DRILL";
|
|
466
475
|
Action["RequestAccess"] = "requestAccess";
|
|
467
476
|
Action["QueryDetailsButtons"] = "queryDetailsButtons";
|
|
477
|
+
/**
|
|
478
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
479
|
+
*/
|
|
480
|
+
Action["Monitor"] = "createMonitor";
|
|
481
|
+
/**
|
|
482
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
483
|
+
*/
|
|
484
|
+
Action["AnswerDelete"] = "onDeleteAnswer";
|
|
485
|
+
/**
|
|
486
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
487
|
+
*/
|
|
488
|
+
Action["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
489
|
+
/**
|
|
490
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
491
|
+
*/
|
|
492
|
+
Action["AddToFavorites"] = "addToFavorites";
|
|
493
|
+
/**
|
|
494
|
+
* @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
|
|
495
|
+
*/
|
|
496
|
+
Action["EditDetails"] = "editDetails";
|
|
468
497
|
})(exports.Action || (exports.Action = {}));
|
|
469
498
|
// eslint-disable-next-line no-shadow
|
|
470
499
|
var OperationType;
|
|
@@ -479,7 +508,7 @@
|
|
|
479
508
|
};
|
|
480
509
|
|
|
481
510
|
/**
|
|
482
|
-
* Copyright (c)
|
|
511
|
+
* Copyright (c) 2022
|
|
483
512
|
*
|
|
484
513
|
* Utilities related to reading configuration objects
|
|
485
514
|
*
|
|
@@ -8834,10 +8863,10 @@
|
|
|
8834
8863
|
}
|
|
8835
8864
|
}
|
|
8836
8865
|
|
|
8837
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
8866
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-alpha.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**"];var exports$1={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1","mixpanel-browser":"^2.41.0"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","dts-bundle":"0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.1.0","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
8838
8867
|
|
|
8839
8868
|
/**
|
|
8840
|
-
* Copyright (c)
|
|
8869
|
+
* Copyright (c) 2022
|
|
8841
8870
|
*
|
|
8842
8871
|
* Base classes
|
|
8843
8872
|
*
|
|
@@ -9000,7 +9029,7 @@
|
|
|
9000
9029
|
if (this.embedConfig.customCssUrl) {
|
|
9001
9030
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
9002
9031
|
}
|
|
9003
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
|
|
9032
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
|
|
9004
9033
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
9005
9034
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
9006
9035
|
return queryParams;
|
|
@@ -9017,6 +9046,9 @@
|
|
|
9017
9046
|
if (Array.isArray(visibleActions)) {
|
|
9018
9047
|
queryParams[Param.VisibleActions] = visibleActions;
|
|
9019
9048
|
}
|
|
9049
|
+
if (additionalFlags && additionalFlags.constructor.name === 'Object') {
|
|
9050
|
+
Object.assign(queryParams, additionalFlags);
|
|
9051
|
+
}
|
|
9020
9052
|
return queryParams;
|
|
9021
9053
|
}
|
|
9022
9054
|
/**
|
|
@@ -9268,7 +9300,7 @@
|
|
|
9268
9300
|
}
|
|
9269
9301
|
|
|
9270
9302
|
/**
|
|
9271
|
-
* Copyright (c)
|
|
9303
|
+
* Copyright (c) 2022
|
|
9272
9304
|
*
|
|
9273
9305
|
* Full application embedding
|
|
9274
9306
|
* https://developers.thoughtspot.com/docs/?pageid=full-embed
|
|
@@ -9410,7 +9442,7 @@
|
|
|
9410
9442
|
}
|
|
9411
9443
|
|
|
9412
9444
|
/**
|
|
9413
|
-
* Copyright (c)
|
|
9445
|
+
* Copyright (c) 2022
|
|
9414
9446
|
*
|
|
9415
9447
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
9416
9448
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
@@ -9521,7 +9553,7 @@
|
|
|
9521
9553
|
}
|
|
9522
9554
|
|
|
9523
9555
|
/**
|
|
9524
|
-
* Copyright (c)
|
|
9556
|
+
* Copyright (c) 2022
|
|
9525
9557
|
*
|
|
9526
9558
|
* Embed ThoughtSpot search or a saved answer
|
|
9527
9559
|
*
|
|
@@ -9531,6 +9563,9 @@
|
|
|
9531
9563
|
const HiddenActionItemByDefaultForSearchEmbed = [
|
|
9532
9564
|
exports.Action.EditACopy,
|
|
9533
9565
|
exports.Action.SaveAsView,
|
|
9566
|
+
exports.Action.UpdateTML,
|
|
9567
|
+
exports.Action.EditTML,
|
|
9568
|
+
exports.Action.AnswerDelete,
|
|
9534
9569
|
];
|
|
9535
9570
|
/**
|
|
9536
9571
|
* Embed ThoughtSpot search
|
|
@@ -9591,6 +9626,7 @@
|
|
|
9591
9626
|
}
|
|
9592
9627
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
9593
9628
|
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
9629
|
+
queryParams[Param.searchEmbed] = true;
|
|
9594
9630
|
let query = '';
|
|
9595
9631
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
9596
9632
|
if (queryParamsString) {
|
package/lib/package.json
CHANGED
package/lib/src/config.js
CHANGED
package/lib/src/embed/app.d.ts
CHANGED
package/lib/src/embed/app.js
CHANGED
package/lib/src/embed/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2022
|
|
3
3
|
*
|
|
4
4
|
* Embed a ThoughtSpot Liveboard or visualization
|
|
5
5
|
* https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
|
|
@@ -24,7 +24,7 @@ export interface LiveboardViewConfig extends ViewConfig {
|
|
|
24
24
|
* This is the minimum height(in pixels) for a full height Liveboard.
|
|
25
25
|
* Setting this height helps resolves issues with empty Liveboards and
|
|
26
26
|
* other screens navigable from a Liveboard.
|
|
27
|
-
*
|
|
27
|
+
* @version 1.5.0 or later
|
|
28
28
|
* @default 500
|
|
29
29
|
*/
|
|
30
30
|
defaultHeight?: number;
|