@thoughtspot/visual-embed-sdk 1.7.0 → 1.8.0-plugins.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.
Files changed (41) hide show
  1. package/dist/src/embed/liveboard.d.ts +1 -1
  2. package/dist/src/embed/pinboard.d.ts +91 -0
  3. package/dist/src/embed/search.d.ts +0 -4
  4. package/dist/src/embed/ts-embed.d.ts +19 -2
  5. package/dist/src/types.d.ts +36 -7
  6. package/dist/src/utils/plugin.d.ts +0 -0
  7. package/dist/src/v1/api.d.ts +19 -0
  8. package/dist/tsembed.es.js +49 -9
  9. package/dist/tsembed.js +49 -9
  10. package/lib/package.json +2 -3
  11. package/lib/src/embed/liveboard.d.ts +1 -1
  12. package/lib/src/embed/pinboard.d.ts +91 -0
  13. package/lib/src/embed/pinboard.js +110 -0
  14. package/lib/src/embed/pinboard.js.map +1 -0
  15. package/lib/src/embed/search.d.ts +0 -4
  16. package/lib/src/embed/search.js +4 -1
  17. package/lib/src/embed/search.js.map +1 -1
  18. package/lib/src/embed/ts-embed.d.ts +19 -2
  19. package/lib/src/embed/ts-embed.js +17 -1
  20. package/lib/src/embed/ts-embed.js.map +1 -1
  21. package/lib/src/embed/ts-embed.spec.js +24 -5
  22. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  23. package/lib/src/index.js.map +1 -1
  24. package/lib/src/react/index.spec.js +1 -1
  25. package/lib/src/react/index.spec.js.map +1 -1
  26. package/lib/src/types.d.ts +36 -7
  27. package/lib/src/types.js +28 -6
  28. package/lib/src/types.js.map +1 -1
  29. package/lib/src/utils/plugin.d.ts +0 -0
  30. package/lib/src/utils/plugin.js +1 -0
  31. package/lib/src/utils/plugin.js.map +1 -0
  32. package/lib/src/visual-embed-sdk.d.ts +55 -14
  33. package/package.json +2 -3
  34. package/src/embed/liveboard.ts +1 -1
  35. package/src/embed/search.ts +3 -5
  36. package/src/embed/ts-embed.spec.ts +29 -6
  37. package/src/embed/ts-embed.ts +35 -1
  38. package/src/index.ts +1 -0
  39. package/src/react/index.spec.tsx +1 -1
  40. package/src/types.ts +36 -6
  41. package/src/utils/plugin.ts +2 -0
@@ -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
- * *_since 1.5.0_
27
+ * @version 1.5.0 or later
28
28
  * @default 500
29
29
  */
30
30
  defaultHeight?: number;
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Copyright (c) 2021
3
+ *
4
+ * Embed a ThoughtSpot pinboard or visualization
5
+ * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
6
+ * https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
7
+ *
8
+ * @summary Pinboard & visualization embed
9
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
10
+ */
11
+ import { DOMSelector } from '../types';
12
+ import { V1Embed, ViewConfig } from './ts-embed';
13
+ /**
14
+ * The configuration for the embedded pinboard or visualization page view.
15
+ * @Category Pinboards and Charts
16
+ */
17
+ export interface PinboardViewConfig extends ViewConfig {
18
+ /**
19
+ * If set to true, the embedded object container dynamically resizes
20
+ * according to the height of the pinboard.
21
+ */
22
+ fullHeight?: boolean;
23
+ /**
24
+ * This is the minimum height(in pixels) for a full height pinboard.
25
+ * Setting this height helps resolves issues with empty pinboards and
26
+ * other screens navigable from a pinboard.
27
+ * @default 500
28
+ * * _since 1.5.0_
29
+ */
30
+ defaultHeight?: number;
31
+ /**
32
+ * If set to true, the context menu in visualizations will be enabled.
33
+ */
34
+ enableVizTransformations?: boolean;
35
+ /**
36
+ * The pinboard to display in the embedded view.
37
+ */
38
+ pinboardId: string;
39
+ /**
40
+ * The visualization within the pinboard to display.
41
+ */
42
+ vizId?: string;
43
+ /**
44
+ * If set to true, all filter chips from a
45
+ * pinboard page will be read-only (no X buttons)
46
+ */
47
+ preventPinboardFilterRemoval?: boolean;
48
+ /**
49
+ * An array of vizids which should be visible when this pinboard loads.
50
+ * The ids not in this array are hidden from the pinboard.
51
+ * _since: 1.6.0_
52
+ */
53
+ pinboardVisibleVizs?: string[];
54
+ }
55
+ /**
56
+ * Embed a ThoughtSpot pinboard or visualization
57
+ * @Category Pinboards and Charts
58
+ */
59
+ export declare class PinboardEmbed extends V1Embed {
60
+ protected viewConfig: PinboardViewConfig;
61
+ private defaultHeight;
62
+ constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
63
+ /**
64
+ * Construct a map of params to be passed on to the
65
+ * embedded pinboard or visualization.
66
+ */
67
+ private getEmbedParams;
68
+ /**
69
+ * Construct the URL of the embedded ThoughtSpot pinboard or visualization
70
+ * to be loaded within the iframe.
71
+ * @param pinboardId The GUID of the pinboard.
72
+ * @param vizId The optional GUID of a visualization within the pinboard.
73
+ * @param runtimeFilters A list of runtime filters to be applied to
74
+ * the pinboard or visualization on load.
75
+ */
76
+ private getIFrameSrc;
77
+ /**
78
+ * Set the iframe height as per the computed height received
79
+ * from the ThoughtSpot app.
80
+ * @param data The event payload
81
+ */
82
+ private updateIFrameHeight;
83
+ private embedIframeCenter;
84
+ private handleRouteChangeFullHeightPinboard;
85
+ /**
86
+ * Render an embedded ThoughtSpot pinboard or visualization
87
+ * @param renderOptions An object specifying the pinboard ID,
88
+ * visualization ID and the runtime filters.
89
+ */
90
+ render(): PinboardEmbed;
91
+ }
@@ -44,10 +44,6 @@ export interface SearchViewConfig extends ViewConfig {
44
44
  * using raw answer data.
45
45
  */
46
46
  hideResults?: boolean;
47
- /**
48
- * If set to true, expands all the data sources panel.
49
- */
50
- expandAllDataSource?: boolean;
51
47
  /**
52
48
  * If set to true, the Search Assist feature is enabled.
53
49
  */
@@ -6,7 +6,7 @@
6
6
  * @summary Base classes
7
7
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8
8
  */
9
- import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig } from '../types';
9
+ import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig, Plugin } from '../types';
10
10
  export interface LayoutConfig {
11
11
  }
12
12
  /**
@@ -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
- * * _since 1.6.0_
62
+ * @version 1.6.0 or later
63
63
  */
64
64
  visibleActions?: Action[];
65
65
  /**
@@ -67,6 +67,22 @@ 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
+ };
79
+ /**
80
+ * Provide a list of plugins, the plugins are executed in the order
81
+ * provided below,
82
+ *
83
+ * @version alpha
84
+ */
85
+ plugins?: Plugin[];
70
86
  }
71
87
  /**
72
88
  * Base class for embedding v2 experience
@@ -112,6 +128,7 @@ export declare class TsEmbed {
112
128
  */
113
129
  private shouldEncodeUrlQueryParams;
114
130
  constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
131
+ private registerPlugins;
115
132
  /**
116
133
  * Gets a reference to the root DOM node where
117
134
  * the embedded content will appear.
@@ -122,6 +122,7 @@ export interface EmbedConfig {
122
122
  queueMultiRenders?: boolean;
123
123
  /**
124
124
  * Dynamic CSS Url to be injected in the loaded application.
125
+ * You would also need to set `style-src` in the CSP settings.
125
126
  * @version 1.6.0 or later
126
127
  * @default ''
127
128
  */
@@ -261,6 +262,12 @@ export declare enum EmbedEvent {
261
262
  * @return dataSourceIds - the list of data sources
262
263
  */
263
264
  DataSourceSelected = "dataSourceSelected",
265
+ /**
266
+ * One or more data columns have been selected.
267
+ * @return columnIds - the list of columns
268
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.2.0.cl
269
+ */
270
+ AddRemoveColumns = "addRemoveColumns",
264
271
  /**
265
272
  * A custom action has been triggered
266
273
  * @return actionId - The id of the custom action
@@ -373,7 +380,8 @@ export declare enum HostEvent {
373
380
  */
374
381
  SetVisibleVizs = "SetPinboardVisibleVizs",
375
382
  /**
376
- * Update the runtime filters
383
+ * Update the runtime filters. The runtime filters passed here are extended
384
+ * on to the existing runtime filters if they exist.
377
385
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
378
386
  * @version 1.8.0 or later
379
387
  */
@@ -404,7 +412,6 @@ export declare enum DataSourceVisualMode {
404
412
  export declare enum Param {
405
413
  DataSources = "dataSources",
406
414
  DataSourceMode = "dataSourceMode",
407
- ExpandAllDataSource = "expandAllDataSource",
408
415
  DisableActions = "disableAction",
409
416
  DisableActionReason = "disableHint",
410
417
  ForceTable = "forceTable",
@@ -479,10 +486,6 @@ export declare enum Action {
479
486
  PinboardInfo = "pinboardInfo",
480
487
  LiveboardInfo = "pinboardInfo",
481
488
  SendAnswerFeedback = "sendFeedback",
482
- /**
483
- * @deprecated Will be removed in next version
484
- */
485
- CustomAction = "customAction",
486
489
  DownloadEmbraceQueries = "downloadEmbraceQueries",
487
490
  Pin = "pin",
488
491
  AnalysisInfo = "analysisInfo",
@@ -497,7 +500,27 @@ export declare enum Action {
497
500
  Separator = "context-menu-item-separator",
498
501
  DrillDown = "DRILL",
499
502
  RequestAccess = "requestAccess",
500
- QueryDetailsButtons = "queryDetailsButtons"
503
+ QueryDetailsButtons = "queryDetailsButtons",
504
+ /**
505
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
506
+ */
507
+ Monitor = "createMonitor",
508
+ /**
509
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
510
+ */
511
+ AnswerDelete = "onDeleteAnswer",
512
+ /**
513
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
514
+ */
515
+ AnswerChartSwitcher = "answerChartSwitcher",
516
+ /**
517
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
518
+ */
519
+ AddToFavorites = "addToFavorites",
520
+ /**
521
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
522
+ */
523
+ EditDetails = "editDetails"
501
524
  }
502
525
  export interface SessionInterface {
503
526
  sessionId: string;
@@ -514,3 +537,9 @@ export declare enum OperationType {
514
537
  export interface AnswerServiceType {
515
538
  getAnswer?: (offset: number, batchSize: number) => any;
516
539
  }
540
+ export interface Plugin {
541
+ name: string;
542
+ handlers: {
543
+ [key in EmbedEvent]: (payload: any) => void;
544
+ };
545
+ }
File without changes
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright: ThoughtSpot Inc. 2012-2016
3
+ * Author: Shashank Singh (sunny@thoughtspot.com)
4
+ *
5
+ * @fileoverview ThoughtSpot Javascript API for use of ThoughtSpot in external webpages.
6
+ */
7
+ import { AuthType } from '../types';
8
+ export declare enum Events {
9
+ THOUGHTSPOT_AUTH_EXPIRED = "ThoughtspotAuthExpired",
10
+ EXPORT_VIZ_DATA_TO_PARENT = "exportVizDataToParent",
11
+ ALERT = "alert",
12
+ EXPORT_VIZ_DATA_TO_CHILD = "exportVizDataToChild",
13
+ GET_DATA = "getData"
14
+ }
15
+ declare type Callback = (...args: any[]) => void;
16
+ declare function checkIfLoggedIn(tsHost: string, callback: Callback): void;
17
+ declare function initialize(onInitialized: Callback, onAuthExpiration: Callback, _thoughtspotHost: string, authType: AuthType): void;
18
+ declare function notifyOnAuthExpiration(): void;
19
+ export { initialize, checkIfLoggedIn, notifyOnAuthExpiration };
@@ -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
@@ -373,7 +379,8 @@ var HostEvent;
373
379
  */
374
380
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
375
381
  /**
376
- * Update the runtime filters
382
+ * Update the runtime filters. The runtime filters passed here are extended
383
+ * on to the existing runtime filters if they exist.
377
384
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
378
385
  * @version 1.8.0 or later
379
386
  */
@@ -408,7 +415,6 @@ var Param;
408
415
  (function (Param) {
409
416
  Param["DataSources"] = "dataSources";
410
417
  Param["DataSourceMode"] = "dataSourceMode";
411
- Param["ExpandAllDataSource"] = "expandAllDataSource";
412
418
  Param["DisableActions"] = "disableAction";
413
419
  Param["DisableActionReason"] = "disableHint";
414
420
  Param["ForceTable"] = "forceTable";
@@ -485,10 +491,6 @@ var Action;
485
491
  Action["PinboardInfo"] = "pinboardInfo";
486
492
  Action["LiveboardInfo"] = "pinboardInfo";
487
493
  Action["SendAnswerFeedback"] = "sendFeedback";
488
- /**
489
- * @deprecated Will be removed in next version
490
- */
491
- Action["CustomAction"] = "customAction";
492
494
  Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
493
495
  Action["Pin"] = "pin";
494
496
  Action["AnalysisInfo"] = "analysisInfo";
@@ -504,6 +506,26 @@ var Action;
504
506
  Action["DrillDown"] = "DRILL";
505
507
  Action["RequestAccess"] = "requestAccess";
506
508
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
509
+ /**
510
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
511
+ */
512
+ Action["Monitor"] = "createMonitor";
513
+ /**
514
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
515
+ */
516
+ Action["AnswerDelete"] = "onDeleteAnswer";
517
+ /**
518
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
519
+ */
520
+ Action["AnswerChartSwitcher"] = "answerChartSwitcher";
521
+ /**
522
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
523
+ */
524
+ Action["AddToFavorites"] = "addToFavorites";
525
+ /**
526
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
527
+ */
528
+ Action["EditDetails"] = "editDetails";
507
529
  })(Action || (Action = {}));
508
530
  // eslint-disable-next-line no-shadow
509
531
  var OperationType;
@@ -8873,7 +8895,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8873
8895
  }
8874
8896
  }
8875
8897
 
8876
- var name="@thoughtspot/visual-embed-sdk";var version="1.7.0";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",classnames:"^2.3.1","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};
8898
+ var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-plugins.0";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 plugins","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};
8877
8899
 
8878
8900
  /**
8879
8901
  * Copyright (c) 2022
@@ -8916,6 +8938,7 @@ class TsEmbed {
8916
8938
  this.isError = false;
8917
8939
  this.viewConfig = viewConfig;
8918
8940
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
8941
+ this.registerPlugins(viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.plugins);
8919
8942
  if (!this.embedConfig.suppressNoCookieAccessAlert) {
8920
8943
  this.on(EmbedEvent.NoCookieAccess, () => {
8921
8944
  // eslint-disable-next-line no-alert
@@ -8923,6 +8946,17 @@ class TsEmbed {
8923
8946
  });
8924
8947
  }
8925
8948
  }
8949
+ registerPlugins(plugins) {
8950
+ if (!plugins) {
8951
+ return;
8952
+ }
8953
+ plugins.forEach((plugin) => {
8954
+ Object.keys(plugin.handlers).forEach((eventName) => {
8955
+ const listener = plugin[eventName];
8956
+ this.on(eventName, listener);
8957
+ });
8958
+ });
8959
+ }
8926
8960
  /**
8927
8961
  * Gets a reference to the root DOM node where
8928
8962
  * the embedded content will appear.
@@ -9039,7 +9073,7 @@ class TsEmbed {
9039
9073
  if (this.embedConfig.customCssUrl) {
9040
9074
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
9041
9075
  }
9042
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
9076
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
9043
9077
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
9044
9078
  this.handleError('You cannot have both hidden actions and visible actions');
9045
9079
  return queryParams;
@@ -9056,6 +9090,9 @@ class TsEmbed {
9056
9090
  if (Array.isArray(visibleActions)) {
9057
9091
  queryParams[Param.VisibleActions] = visibleActions;
9058
9092
  }
9093
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
9094
+ Object.assign(queryParams, additionalFlags);
9095
+ }
9059
9096
  return queryParams;
9060
9097
  }
9061
9098
  /**
@@ -9575,6 +9612,9 @@ class PinboardEmbed extends LiveboardEmbed {
9575
9612
  const HiddenActionItemByDefaultForSearchEmbed = [
9576
9613
  Action.EditACopy,
9577
9614
  Action.SaveAsView,
9615
+ Action.UpdateTML,
9616
+ Action.EditTML,
9617
+ Action.AnswerDelete,
9578
9618
  ];
9579
9619
  /**
9580
9620
  * Embed ThoughtSpot search
@@ -9608,7 +9648,7 @@ class SearchEmbed extends TsEmbed {
9608
9648
  */
9609
9649
  getIFrameSrc(answerId, dataSources) {
9610
9650
  var _a;
9611
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9651
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9612
9652
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9613
9653
  const queryParams = this.getBaseQueryParams();
9614
9654
  queryParams[Param.HideActions] = [
package/dist/tsembed.js CHANGED
@@ -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
@@ -354,7 +360,8 @@
354
360
  */
355
361
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
356
362
  /**
357
- * Update the runtime filters
363
+ * Update the runtime filters. The runtime filters passed here are extended
364
+ * on to the existing runtime filters if they exist.
358
365
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
359
366
  * @version 1.8.0 or later
360
367
  */
@@ -383,7 +390,6 @@
383
390
  (function (Param) {
384
391
  Param["DataSources"] = "dataSources";
385
392
  Param["DataSourceMode"] = "dataSourceMode";
386
- Param["ExpandAllDataSource"] = "expandAllDataSource";
387
393
  Param["DisableActions"] = "disableAction";
388
394
  Param["DisableActionReason"] = "disableHint";
389
395
  Param["ForceTable"] = "forceTable";
@@ -454,10 +460,6 @@
454
460
  Action["PinboardInfo"] = "pinboardInfo";
455
461
  Action["LiveboardInfo"] = "pinboardInfo";
456
462
  Action["SendAnswerFeedback"] = "sendFeedback";
457
- /**
458
- * @deprecated Will be removed in next version
459
- */
460
- Action["CustomAction"] = "customAction";
461
463
  Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
462
464
  Action["Pin"] = "pin";
463
465
  Action["AnalysisInfo"] = "analysisInfo";
@@ -473,6 +475,26 @@
473
475
  Action["DrillDown"] = "DRILL";
474
476
  Action["RequestAccess"] = "requestAccess";
475
477
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
478
+ /**
479
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
480
+ */
481
+ Action["Monitor"] = "createMonitor";
482
+ /**
483
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
484
+ */
485
+ Action["AnswerDelete"] = "onDeleteAnswer";
486
+ /**
487
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
488
+ */
489
+ Action["AnswerChartSwitcher"] = "answerChartSwitcher";
490
+ /**
491
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
492
+ */
493
+ Action["AddToFavorites"] = "addToFavorites";
494
+ /**
495
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
496
+ */
497
+ Action["EditDetails"] = "editDetails";
476
498
  })(exports.Action || (exports.Action = {}));
477
499
  // eslint-disable-next-line no-shadow
478
500
  var OperationType;
@@ -8842,7 +8864,7 @@
8842
8864
  }
8843
8865
  }
8844
8866
 
8845
- var name="@thoughtspot/visual-embed-sdk";var version="1.7.0";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",classnames:"^2.3.1","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};
8867
+ var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-plugins.0";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 plugins","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};
8846
8868
 
8847
8869
  /**
8848
8870
  * Copyright (c) 2022
@@ -8885,6 +8907,7 @@
8885
8907
  this.isError = false;
8886
8908
  this.viewConfig = viewConfig;
8887
8909
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
8910
+ this.registerPlugins(viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.plugins);
8888
8911
  if (!this.embedConfig.suppressNoCookieAccessAlert) {
8889
8912
  this.on(exports.EmbedEvent.NoCookieAccess, () => {
8890
8913
  // eslint-disable-next-line no-alert
@@ -8892,6 +8915,17 @@
8892
8915
  });
8893
8916
  }
8894
8917
  }
8918
+ registerPlugins(plugins) {
8919
+ if (!plugins) {
8920
+ return;
8921
+ }
8922
+ plugins.forEach((plugin) => {
8923
+ Object.keys(plugin.handlers).forEach((eventName) => {
8924
+ const listener = plugin[eventName];
8925
+ this.on(eventName, listener);
8926
+ });
8927
+ });
8928
+ }
8895
8929
  /**
8896
8930
  * Gets a reference to the root DOM node where
8897
8931
  * the embedded content will appear.
@@ -9008,7 +9042,7 @@
9008
9042
  if (this.embedConfig.customCssUrl) {
9009
9043
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
9010
9044
  }
9011
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
9045
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
9012
9046
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
9013
9047
  this.handleError('You cannot have both hidden actions and visible actions');
9014
9048
  return queryParams;
@@ -9025,6 +9059,9 @@
9025
9059
  if (Array.isArray(visibleActions)) {
9026
9060
  queryParams[Param.VisibleActions] = visibleActions;
9027
9061
  }
9062
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
9063
+ Object.assign(queryParams, additionalFlags);
9064
+ }
9028
9065
  return queryParams;
9029
9066
  }
9030
9067
  /**
@@ -9539,6 +9576,9 @@
9539
9576
  const HiddenActionItemByDefaultForSearchEmbed = [
9540
9577
  exports.Action.EditACopy,
9541
9578
  exports.Action.SaveAsView,
9579
+ exports.Action.UpdateTML,
9580
+ exports.Action.EditTML,
9581
+ exports.Action.AnswerDelete,
9542
9582
  ];
9543
9583
  /**
9544
9584
  * Embed ThoughtSpot search
@@ -9572,7 +9612,7 @@
9572
9612
  */
9573
9613
  getIFrameSrc(answerId, dataSources) {
9574
9614
  var _a;
9575
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9615
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9576
9616
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9577
9617
  const queryParams = this.getBaseQueryParams();
9578
9618
  queryParams[Param.HideActions] = [
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.8.0-plugins.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -34,7 +34,7 @@
34
34
  "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",
35
35
  "posttest": "cat ./coverage/lcov.info | coveralls",
36
36
  "prepublishOnly": "npm run test; npm run tsc; npm run bundle-dts; npm run build",
37
- "publish-dev": "npm publish --tag dev",
37
+ "publish-dev": "npm publish --tag plugins",
38
38
  "publish-prod": "npm publish --tag latest"
39
39
  },
40
40
  "peerDependencies": {
@@ -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",
@@ -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
- * *_since 1.5.0_
27
+ * @version 1.5.0 or later
28
28
  * @default 500
29
29
  */
30
30
  defaultHeight?: number;