@thoughtspot/visual-embed-sdk 1.8.0-alpha.1 → 1.8.0-plugins.1

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.
@@ -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;
@@ -45,6 +45,12 @@ export interface PinboardViewConfig extends ViewConfig {
45
45
  * pinboard page will be read-only (no X buttons)
46
46
  */
47
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[];
48
54
  }
49
55
  /**
50
56
  * Embed a ThoughtSpot pinboard or visualization
@@ -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.
@@ -11,5 +11,5 @@ import { AppEmbed, Page, AppViewConfig } from './embed/app';
11
11
  import { init, prefetch } from './embed/base';
12
12
  import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from './embed/liveboard';
13
13
  import { SearchEmbed, SearchViewConfig } from './embed/search';
14
- import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig } from './types';
15
- export { init, prefetch, SearchEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, LiveboardViewConfig, AppViewConfig, };
14
+ import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, Plugin } from './types';
15
+ export { init, prefetch, SearchEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, LiveboardViewConfig, AppViewConfig, Plugin, };
@@ -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
  */
@@ -478,10 +486,6 @@ export declare enum Action {
478
486
  PinboardInfo = "pinboardInfo",
479
487
  LiveboardInfo = "pinboardInfo",
480
488
  SendAnswerFeedback = "sendFeedback",
481
- /**
482
- * @deprecated Will be removed in next version
483
- */
484
- CustomAction = "customAction",
485
489
  DownloadEmbraceQueries = "downloadEmbraceQueries",
486
490
  Pin = "pin",
487
491
  AnalysisInfo = "analysisInfo",
@@ -533,3 +537,9 @@ export declare enum OperationType {
533
537
  export interface AnswerServiceType {
534
538
  getAnswer?: (offset: number, batchSize: number) => any;
535
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
  */
@@ -484,10 +491,6 @@ var Action;
484
491
  Action["PinboardInfo"] = "pinboardInfo";
485
492
  Action["LiveboardInfo"] = "pinboardInfo";
486
493
  Action["SendAnswerFeedback"] = "sendFeedback";
487
- /**
488
- * @deprecated Will be removed in next version
489
- */
490
- Action["CustomAction"] = "customAction";
491
494
  Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
492
495
  Action["Pin"] = "pin";
493
496
  Action["AnalysisInfo"] = "analysisInfo";
@@ -8892,7 +8895,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8892
8895
  }
8893
8896
  }
8894
8897
 
8895
- var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-alpha.1";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};
8898
+ var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-plugins.1";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};
8896
8899
 
8897
8900
  /**
8898
8901
  * Copyright (c) 2022
@@ -8935,6 +8938,7 @@ class TsEmbed {
8935
8938
  this.isError = false;
8936
8939
  this.viewConfig = viewConfig;
8937
8940
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
8941
+ this.registerPlugins(viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.plugins);
8938
8942
  if (!this.embedConfig.suppressNoCookieAccessAlert) {
8939
8943
  this.on(EmbedEvent.NoCookieAccess, () => {
8940
8944
  // eslint-disable-next-line no-alert
@@ -8942,6 +8946,17 @@ class TsEmbed {
8942
8946
  });
8943
8947
  }
8944
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
+ }
8945
8960
  /**
8946
8961
  * Gets a reference to the root DOM node where
8947
8962
  * the embedded content will appear.
@@ -9058,7 +9073,7 @@ class TsEmbed {
9058
9073
  if (this.embedConfig.customCssUrl) {
9059
9074
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
9060
9075
  }
9061
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
9076
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
9062
9077
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
9063
9078
  this.handleError('You cannot have both hidden actions and visible actions');
9064
9079
  return queryParams;
@@ -9075,6 +9090,9 @@ class TsEmbed {
9075
9090
  if (Array.isArray(visibleActions)) {
9076
9091
  queryParams[Param.VisibleActions] = visibleActions;
9077
9092
  }
9093
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
9094
+ Object.assign(queryParams, additionalFlags);
9095
+ }
9078
9096
  return queryParams;
9079
9097
  }
9080
9098
  /**
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
  */
@@ -453,10 +460,6 @@
453
460
  Action["PinboardInfo"] = "pinboardInfo";
454
461
  Action["LiveboardInfo"] = "pinboardInfo";
455
462
  Action["SendAnswerFeedback"] = "sendFeedback";
456
- /**
457
- * @deprecated Will be removed in next version
458
- */
459
- Action["CustomAction"] = "customAction";
460
463
  Action["DownloadEmbraceQueries"] = "downloadEmbraceQueries";
461
464
  Action["Pin"] = "pin";
462
465
  Action["AnalysisInfo"] = "analysisInfo";
@@ -8861,7 +8864,7 @@
8861
8864
  }
8862
8865
  }
8863
8866
 
8864
- var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-alpha.1";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};
8867
+ var name="@thoughtspot/visual-embed-sdk";var version="1.8.0-plugins.1";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};
8865
8868
 
8866
8869
  /**
8867
8870
  * Copyright (c) 2022
@@ -8904,6 +8907,7 @@
8904
8907
  this.isError = false;
8905
8908
  this.viewConfig = viewConfig;
8906
8909
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
8910
+ this.registerPlugins(viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.plugins);
8907
8911
  if (!this.embedConfig.suppressNoCookieAccessAlert) {
8908
8912
  this.on(exports.EmbedEvent.NoCookieAccess, () => {
8909
8913
  // eslint-disable-next-line no-alert
@@ -8911,6 +8915,17 @@
8911
8915
  });
8912
8916
  }
8913
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
+ }
8914
8929
  /**
8915
8930
  * Gets a reference to the root DOM node where
8916
8931
  * the embedded content will appear.
@@ -9027,7 +9042,7 @@
9027
9042
  if (this.embedConfig.customCssUrl) {
9028
9043
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
9029
9044
  }
9030
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
9045
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
9031
9046
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
9032
9047
  this.handleError('You cannot have both hidden actions and visible actions');
9033
9048
  return queryParams;
@@ -9044,6 +9059,9 @@
9044
9059
  if (Array.isArray(visibleActions)) {
9045
9060
  queryParams[Param.VisibleActions] = visibleActions;
9046
9061
  }
9062
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
9063
+ Object.assign(queryParams, additionalFlags);
9064
+ }
9047
9065
  return queryParams;
9048
9066
  }
9049
9067
  /**
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.8.0-alpha.1",
3
+ "version": "1.8.0-plugins.1",
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": {
@@ -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;
@@ -45,6 +45,12 @@ export interface PinboardViewConfig extends ViewConfig {
45
45
  * pinboard page will be read-only (no X buttons)
46
46
  */
47
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[];
48
54
  }
49
55
  /**
50
56
  * Embed a ThoughtSpot pinboard or visualization
@@ -46,7 +46,7 @@ export class PinboardEmbed extends V1Embed {
46
46
  */
47
47
  getEmbedParams() {
48
48
  const params = this.getBaseQueryParams();
49
- const { enableVizTransformations, fullHeight, preventPinboardFilterRemoval, defaultHeight, } = this.viewConfig;
49
+ const { enableVizTransformations, fullHeight, preventPinboardFilterRemoval, defaultHeight, pinboardVisibleVizs, } = this.viewConfig;
50
50
  if (fullHeight === true) {
51
51
  params[Param.fullHeight] = true;
52
52
  }
@@ -59,6 +59,9 @@ export class PinboardEmbed extends V1Embed {
59
59
  if (preventPinboardFilterRemoval) {
60
60
  params[Param.preventPinboardFilterRemoval] = true;
61
61
  }
62
+ if (pinboardVisibleVizs) {
63
+ params[Param.PinboardVisibleVizs] = pinboardVisibleVizs;
64
+ }
62
65
  params[Param.livedBoardEmbed] = true;
63
66
  const queryParams = getQueryParamString(params, true);
64
67
  return queryParams;
@@ -1 +1 @@
1
- {"version":3,"file":"pinboard.js","sourceRoot":"","sources":["../../../src/embed/pinboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACH,UAAU,EAEV,KAAK,GAIR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;AAuCjD;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAKtC,kDAAkD;IAClD,YAAY,WAAwB,EAAE,UAA8B;QAChE,KAAK,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAJ3B,kBAAa,GAAG,GAAG,CAAC;QAuE5B;;;;WAIG;QACK,uBAAkB,GAAG,CAAC,IAAoB,EAAE,EAAE;YAClD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC;QAEM,sBAAiB,GAAG,CAAC,IAAoB,EAAE,SAAc,EAAE,EAAE;YACjE,MAAM,GAAG,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YACnC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC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;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAyBD;;;;OAIG;IACI,MAAM;QACT,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAE9D,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;SAC9D;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,KAAK,IAAI,EAAE;YACrC,IAAI,CAAC,EAAE,CACH,UAAU,CAAC,WAAW,EACtB,IAAI,CAAC,mCAAmC,CAC3C,CAAC;YACF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACjE;QAED,KAAK,CAAC,MAAM,EAAE,CAAC;QAEf,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;QACjE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -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.
@@ -12,6 +12,7 @@ import { EmbedEvent, Param, } from '../types';
12
12
  import { uploadMixpanelEvent, MIXPANEL_EVENT } from '../mixpanel-service';
13
13
  import { getProcessData } from '../utils/processData';
14
14
  import { processTrigger } from '../utils/processTrigger';
15
+ // eslint-disable-next-line import/no-cycle
15
16
  import pkgInfo from '../../package.json';
16
17
  import { getAuthPromise, getEmbedConfig, renderInQueue } from './base';
17
18
  const { version } = pkgInfo;
@@ -47,6 +48,7 @@ export class TsEmbed {
47
48
  this.isError = false;
48
49
  this.viewConfig = viewConfig;
49
50
  this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
51
+ this.registerPlugins(viewConfig === null || viewConfig === void 0 ? void 0 : viewConfig.plugins);
50
52
  if (!this.embedConfig.suppressNoCookieAccessAlert) {
51
53
  this.on(EmbedEvent.NoCookieAccess, () => {
52
54
  // eslint-disable-next-line no-alert
@@ -54,6 +56,17 @@ export class TsEmbed {
54
56
  });
55
57
  }
56
58
  }
59
+ registerPlugins(plugins) {
60
+ if (!plugins) {
61
+ return;
62
+ }
63
+ plugins.forEach((plugin) => {
64
+ Object.keys(plugin.handlers).forEach((eventName) => {
65
+ const listener = plugin[eventName];
66
+ this.on(eventName, listener);
67
+ });
68
+ });
69
+ }
57
70
  /**
58
71
  * Gets a reference to the root DOM node where
59
72
  * the embedded content will appear.
@@ -170,7 +183,7 @@ export class TsEmbed {
170
183
  if (this.embedConfig.customCssUrl) {
171
184
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
172
185
  }
173
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, } = this.viewConfig;
186
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, additionalFlags, } = this.viewConfig;
174
187
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
175
188
  this.handleError('You cannot have both hidden actions and visible actions');
176
189
  return queryParams;
@@ -187,6 +200,9 @@ export class TsEmbed {
187
200
  if (Array.isArray(visibleActions)) {
188
201
  queryParams[Param.VisibleActions] = visibleActions;
189
202
  }
203
+ if (additionalFlags && additionalFlags.constructor.name === 'Object') {
204
+ Object.assign(queryParams, additionalFlags);
205
+ }
190
206
  return queryParams;
191
207
  }
192
208
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ts-embed.js","sourceRoot":"","sources":["../../../src/embed/ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACH,2BAA2B,EAC3B,eAAe,EACf,YAAY,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EACH,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAGH,UAAU,EAIV,KAAK,GAER,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB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