@thoughtspot/visual-embed-sdk 1.7.0-alpha.3 → 1.7.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.
@@ -44,6 +44,10 @@ 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;
47
51
  /**
48
52
  * If set to true, the Search Assist feature is enabled.
49
53
  */
@@ -335,6 +335,9 @@ export declare enum EmbedEvent {
335
335
  /**
336
336
  * Event types that can be triggered by the host application
337
337
  * to the embedded ThoughtSpot app
338
+ *
339
+ * To trigger an event use the corresponding
340
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
338
341
  */
339
342
  export declare enum HostEvent {
340
343
  /**
@@ -368,7 +371,13 @@ export declare enum HostEvent {
368
371
  * will be hidden.
369
372
  * @version 1.6.0 or later
370
373
  */
371
- SetVisibleVizs = "SetPinboardVisibleVizs"
374
+ SetVisibleVizs = "SetPinboardVisibleVizs",
375
+ /**
376
+ * Update the runtime filters
377
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
378
+ * @version 1.8.0 or later
379
+ */
380
+ UpdateRuntimeFilters = "UpdateRuntimeFilters"
372
381
  }
373
382
  /**
374
383
  * The different visual modes that the data sources panel within
@@ -395,6 +404,7 @@ export declare enum DataSourceVisualMode {
395
404
  export declare enum Param {
396
405
  DataSources = "dataSources",
397
406
  DataSourceMode = "dataSourceMode",
407
+ ExpandAllDataSource = "expandAllDataSource",
398
408
  DisableActions = "disableAction",
399
409
  DisableActionReason = "disableHint",
400
410
  ForceTable = "forceTable",
@@ -333,6 +333,9 @@ var EmbedEvent;
333
333
  /**
334
334
  * Event types that can be triggered by the host application
335
335
  * to the embedded ThoughtSpot app
336
+ *
337
+ * To trigger an event use the corresponding
338
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
336
339
  */
337
340
  // eslint-disable-next-line no-shadow
338
341
  var HostEvent;
@@ -369,6 +372,12 @@ var HostEvent;
369
372
  * @version 1.6.0 or later
370
373
  */
371
374
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
375
+ /**
376
+ * Update the runtime filters
377
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
378
+ * @version 1.8.0 or later
379
+ */
380
+ HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
372
381
  })(HostEvent || (HostEvent = {}));
373
382
  /**
374
383
  * The different visual modes that the data sources panel within
@@ -399,6 +408,7 @@ var Param;
399
408
  (function (Param) {
400
409
  Param["DataSources"] = "dataSources";
401
410
  Param["DataSourceMode"] = "dataSourceMode";
411
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
402
412
  Param["DisableActions"] = "disableAction";
403
413
  Param["DisableActionReason"] = "disableHint";
404
414
  Param["ForceTable"] = "forceTable";
@@ -8863,7 +8873,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8863
8873
  }
8864
8874
  }
8865
8875
 
8866
- var name="@thoughtspot/visual-embed-sdk";var version="1.7.0-alpha.3";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};
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};
8867
8877
 
8868
8878
  /**
8869
8879
  * Copyright (c) 2022
@@ -9598,7 +9608,7 @@ class SearchEmbed extends TsEmbed {
9598
9608
  */
9599
9609
  getIFrameSrc(answerId, dataSources) {
9600
9610
  var _a;
9601
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9611
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9602
9612
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9603
9613
  const queryParams = this.getBaseQueryParams();
9604
9614
  queryParams[Param.HideActions] = [
package/dist/tsembed.js CHANGED
@@ -353,6 +353,12 @@
353
353
  * @version 1.6.0 or later
354
354
  */
355
355
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
356
+ /**
357
+ * Update the runtime filters
358
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
359
+ * @version 1.8.0 or later
360
+ */
361
+ HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
356
362
  })(exports.HostEvent || (exports.HostEvent = {}));
357
363
  (function (DataSourceVisualMode) {
358
364
  /**
@@ -377,6 +383,7 @@
377
383
  (function (Param) {
378
384
  Param["DataSources"] = "dataSources";
379
385
  Param["DataSourceMode"] = "dataSourceMode";
386
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
380
387
  Param["DisableActions"] = "disableAction";
381
388
  Param["DisableActionReason"] = "disableHint";
382
389
  Param["ForceTable"] = "forceTable";
@@ -8835,7 +8842,7 @@
8835
8842
  }
8836
8843
  }
8837
8844
 
8838
- var name="@thoughtspot/visual-embed-sdk";var version="1.7.0-alpha.3";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};
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};
8839
8846
 
8840
8847
  /**
8841
8848
  * Copyright (c) 2022
@@ -9565,7 +9572,7 @@
9565
9572
  */
9566
9573
  getIFrameSrc(answerId, dataSources) {
9567
9574
  var _a;
9568
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9575
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9569
9576
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9570
9577
  const queryParams = this.getBaseQueryParams();
9571
9578
  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-alpha.3",
3
+ "version": "1.7.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,6 +65,7 @@
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",
68
69
  "command-line-args": "^5.1.1",
69
70
  "coveralls": "^3.1.0",
70
71
  "dts-bundle": "0.7.3",
@@ -44,6 +44,10 @@ 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;
47
51
  /**
48
52
  * If set to true, the Search Assist feature is enabled.
49
53
  */
@@ -45,7 +45,7 @@ export class SearchEmbed extends TsEmbed {
45
45
  */
46
46
  getIFrameSrc(answerId, dataSources) {
47
47
  var _a;
48
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
48
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
49
49
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
50
50
  const queryParams = this.getBaseQueryParams();
51
51
  queryParams[Param.HideActions] = [
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/embed/search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAe,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAc,OAAO,EAAE,MAAM,YAAY,CAAC;AAoEjD,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACnD,MAAM,CAAC,SAAS;IAChB,MAAM,CAAC,UAAU;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAMpC,YAAY,WAAwB,EAAE,UAA4B;QAC9D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AC;IAED;;OAEG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAElD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -335,6 +335,9 @@ export declare enum EmbedEvent {
335
335
  /**
336
336
  * Event types that can be triggered by the host application
337
337
  * to the embedded ThoughtSpot app
338
+ *
339
+ * To trigger an event use the corresponding
340
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
338
341
  */
339
342
  export declare enum HostEvent {
340
343
  /**
@@ -368,7 +371,13 @@ export declare enum HostEvent {
368
371
  * will be hidden.
369
372
  * @version 1.6.0 or later
370
373
  */
371
- SetVisibleVizs = "SetPinboardVisibleVizs"
374
+ SetVisibleVizs = "SetPinboardVisibleVizs",
375
+ /**
376
+ * Update the runtime filters
377
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
378
+ * @version 1.8.0 or later
379
+ */
380
+ UpdateRuntimeFilters = "UpdateRuntimeFilters"
372
381
  }
373
382
  /**
374
383
  * The different visual modes that the data sources panel within
@@ -395,6 +404,7 @@ export declare enum DataSourceVisualMode {
395
404
  export declare enum Param {
396
405
  DataSources = "dataSources",
397
406
  DataSourceMode = "dataSourceMode",
407
+ ExpandAllDataSource = "expandAllDataSource",
398
408
  DisableActions = "disableAction",
399
409
  DisableActionReason = "disableHint",
400
410
  ForceTable = "forceTable",
package/lib/src/types.js CHANGED
@@ -221,6 +221,9 @@ export var EmbedEvent;
221
221
  /**
222
222
  * Event types that can be triggered by the host application
223
223
  * to the embedded ThoughtSpot app
224
+ *
225
+ * To trigger an event use the corresponding
226
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
224
227
  */
225
228
  // eslint-disable-next-line no-shadow
226
229
  export var HostEvent;
@@ -257,6 +260,12 @@ export var HostEvent;
257
260
  * @version 1.6.0 or later
258
261
  */
259
262
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
263
+ /**
264
+ * Update the runtime filters
265
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
266
+ * @version 1.8.0 or later
267
+ */
268
+ HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
260
269
  })(HostEvent || (HostEvent = {}));
261
270
  /**
262
271
  * The different visual modes that the data sources panel within
@@ -287,6 +296,7 @@ export var Param;
287
296
  (function (Param) {
288
297
  Param["DataSources"] = "dataSources";
289
298
  Param["DataSourceMode"] = "dataSourceMode";
299
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
290
300
  Param["DisableActions"] = "disableAction";
291
301
  Param["DisableActionReason"] = "disableHint";
292
302
  Param["ForceTable"] = "forceTable";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAwBX;AAxBD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EAxBW,QAAQ,KAAR,QAAQ,QAwBnB;AAqHD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,eAyDX;AAzDD,WAAY,eAAe;IACvB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,C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;AAC/C,CAAC,EAjEW,MAAM,KAAN,MAAM,QAiEjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAwBX;AAxBD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EAxBW,QAAQ,KAAR,QAAQ,QAwBnB;AAqHD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,eAyDX;AAzDD,WAAY,eAAe;IACvB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,wCAAqB,CAAA;IACrB;;OAEG;IACH,8CAA2B,CAAA;IAC3B;;OAEG;IACH,0CAAuB,CAAA;IACvB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,oCAAiB,CAAA;IACjB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;AACb,CAAC,EAzDW,eAAe,KAAf,eAAe,QAyD1B;AAsBD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,UAgHX;AAhHD,WAAY,UAAU;IAClB;;;OAGG;IACH,2BAA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A;IACzC,+BAAqB,CAAA;IACrB,yCAA+B,CAAA;IAC/B,yCAA+B,CAAA;IAC/B,2CAAiC,CAAA;IACjC,yCAA+B,CAAA;IAC/B,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,6BAAmB,CAAA;IACnB,6BAAmB,CAAA;IACnB,mCAAyB,CAAA;IACzB,uBAAa,CAAA;IACb,iCAAuB,CAAA;IACvB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,mDAAyC,CAAA;IACzC;;OAEG;IACH,uCAA6B,CAAA;IAC7B,wCAA8B,CAAA;IAC9B,6CAAmC,CAAA;IACnC;;OAEG;IACH,uCAA6B,CAAA;IAC7B,2DAAiD,CAAA;IACjD,qBAAW,CAAA;IACX,uCAA6B,CAAA;IAC7B,uCAA6B,CAAA;IAC7B,6BAAmB,CAAA;IACnB,oDAA0C,CAAA;IAC1C,oDAA0C,CAAA;IAC1C,iEAAuD,CAAA;IACvD,yDAA+C,CAAA;IAC/C,8CAAoC,CAAA;IACpC,wDAA8C,CAAA;IAC9C,mDAAyC,CAAA;IACzC,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;IAC/B,qDAA2C,CAAA;AAC/C,CAAC,EAjEW,MAAM,KAAN,MAAM,QAiEjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
@@ -275,6 +275,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
275
275
  * using raw answer data.
276
276
  */
277
277
  hideResults?: boolean;
278
+ /**
279
+ * If set to true, expands all the data sources panel.
280
+ */
281
+ expandAllDataSource?: boolean;
278
282
  /**
279
283
  * If set to true, the Search Assist feature is enabled.
280
284
  */
@@ -652,6 +656,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
652
656
  /**
653
657
  * Event types that can be triggered by the host application
654
658
  * to the embedded ThoughtSpot app
659
+ *
660
+ * To trigger an event use the corresponding
661
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
655
662
  */
656
663
  export enum HostEvent {
657
664
  /**
@@ -685,7 +692,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
685
692
  * will be hidden.
686
693
  * @version 1.6.0 or later
687
694
  */
688
- SetVisibleVizs = "SetPinboardVisibleVizs"
695
+ SetVisibleVizs = "SetPinboardVisibleVizs",
696
+ /**
697
+ * Update the runtime filters
698
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
699
+ * @version 1.8.0 or later
700
+ */
701
+ UpdateRuntimeFilters = "UpdateRuntimeFilters"
689
702
  }
690
703
  /**
691
704
  * The different visual modes that the data sources panel within
@@ -712,6 +725,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
712
725
  export enum Param {
713
726
  DataSources = "dataSources",
714
727
  DataSourceMode = "dataSourceMode",
728
+ ExpandAllDataSource = "expandAllDataSource",
715
729
  DisableActions = "disableAction",
716
730
  DisableActionReason = "disableHint",
717
731
  ForceTable = "forceTable",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.7.0-alpha.3",
3
+ "version": "1.7.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,6 +65,7 @@
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",
68
69
  "command-line-args": "^5.1.1",
69
70
  "coveralls": "^3.1.0",
70
71
  "dts-bundle": "0.7.3",
@@ -49,6 +49,10 @@ export interface SearchViewConfig extends ViewConfig {
49
49
  * using raw answer data.
50
50
  */
51
51
  hideResults?: boolean;
52
+ /**
53
+ * If set to true, expands all the data sources panel.
54
+ */
55
+ expandAllDataSource?: boolean;
52
56
  /**
53
57
  * If set to true, the Search Assist feature is enabled.
54
58
  */
@@ -123,6 +127,7 @@ export class SearchEmbed extends TsEmbed {
123
127
  private getIFrameSrc(answerId: string, dataSources?: string[]) {
124
128
  const {
125
129
  hideResults,
130
+ expandAllDataSource,
126
131
  enableSearchAssist,
127
132
  forceTable,
128
133
  searchOptions,
package/src/types.ts CHANGED
@@ -357,6 +357,9 @@ export enum EmbedEvent {
357
357
  /**
358
358
  * Event types that can be triggered by the host application
359
359
  * to the embedded ThoughtSpot app
360
+ *
361
+ * To trigger an event use the corresponding
362
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
360
363
  */
361
364
  // eslint-disable-next-line no-shadow
362
365
  export enum HostEvent {
@@ -392,6 +395,12 @@ export enum HostEvent {
392
395
  * @version 1.6.0 or later
393
396
  */
394
397
  SetVisibleVizs = 'SetPinboardVisibleVizs',
398
+ /**
399
+ * Update the runtime filters
400
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
401
+ * @version 1.8.0 or later
402
+ */
403
+ UpdateRuntimeFilters = 'UpdateRuntimeFilters',
395
404
  }
396
405
 
397
406
  /**
@@ -422,6 +431,7 @@ export enum DataSourceVisualMode {
422
431
  export enum Param {
423
432
  DataSources = 'dataSources',
424
433
  DataSourceMode = 'dataSourceMode',
434
+ ExpandAllDataSource = 'expandAllDataSource',
425
435
  DisableActions = 'disableAction',
426
436
  DisableActionReason = 'disableHint',
427
437
  ForceTable = 'forceTable',
@@ -1,85 +0,0 @@
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
- /**
50
- * Embed a ThoughtSpot pinboard or visualization
51
- * @Category Pinboards and Charts
52
- */
53
- export declare class PinboardEmbed extends V1Embed {
54
- protected viewConfig: PinboardViewConfig;
55
- private defaultHeight;
56
- constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
57
- /**
58
- * Construct a map of params to be passed on to the
59
- * embedded pinboard or visualization.
60
- */
61
- private getEmbedParams;
62
- /**
63
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
64
- * to be loaded within the iframe.
65
- * @param pinboardId The GUID of the pinboard.
66
- * @param vizId The optional GUID of a visualization within the pinboard.
67
- * @param runtimeFilters A list of runtime filters to be applied to
68
- * the pinboard or visualization on load.
69
- */
70
- private getIFrameSrc;
71
- /**
72
- * Set the iframe height as per the computed height received
73
- * from the ThoughtSpot app.
74
- * @param data The event payload
75
- */
76
- private updateIFrameHeight;
77
- private embedIframeCenter;
78
- private handleRouteChangeFullHeightPinboard;
79
- /**
80
- * Render an embedded ThoughtSpot pinboard or visualization
81
- * @param renderOptions An object specifying the pinboard ID,
82
- * visualization ID and the runtime filters.
83
- */
84
- render(): PinboardEmbed;
85
- }
@@ -1,85 +0,0 @@
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
- /**
50
- * Embed a ThoughtSpot pinboard or visualization
51
- * @Category Pinboards and Charts
52
- */
53
- export declare class PinboardEmbed extends V1Embed {
54
- protected viewConfig: PinboardViewConfig;
55
- private defaultHeight;
56
- constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
57
- /**
58
- * Construct a map of params to be passed on to the
59
- * embedded pinboard or visualization.
60
- */
61
- private getEmbedParams;
62
- /**
63
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
64
- * to be loaded within the iframe.
65
- * @param pinboardId The GUID of the pinboard.
66
- * @param vizId The optional GUID of a visualization within the pinboard.
67
- * @param runtimeFilters A list of runtime filters to be applied to
68
- * the pinboard or visualization on load.
69
- */
70
- private getIFrameSrc;
71
- /**
72
- * Set the iframe height as per the computed height received
73
- * from the ThoughtSpot app.
74
- * @param data The event payload
75
- */
76
- private updateIFrameHeight;
77
- private embedIframeCenter;
78
- private handleRouteChangeFullHeightPinboard;
79
- /**
80
- * Render an embedded ThoughtSpot pinboard or visualization
81
- * @param renderOptions An object specifying the pinboard ID,
82
- * visualization ID and the runtime filters.
83
- */
84
- render(): PinboardEmbed;
85
- }
@@ -1,107 +0,0 @@
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 { ERROR_MESSAGE } from '../errors';
12
- import { EmbedEvent, Param, } from '../types';
13
- import { getFilterQuery, getQueryParamString } from '../utils';
14
- import { V1Embed } from './ts-embed';
15
- /**
16
- * Embed a ThoughtSpot pinboard or visualization
17
- * @Category Pinboards and Charts
18
- */
19
- export class PinboardEmbed extends V1Embed {
20
- // eslint-disable-next-line no-useless-constructor
21
- constructor(domSelector, viewConfig) {
22
- super(domSelector, viewConfig);
23
- this.defaultHeight = 500;
24
- /**
25
- * Set the iframe height as per the computed height received
26
- * from the ThoughtSpot app.
27
- * @param data The event payload
28
- */
29
- this.updateIFrameHeight = (data) => {
30
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
31
- };
32
- this.embedIframeCenter = (data, responder) => {
33
- const obj = this.getIframeCenter();
34
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
35
- };
36
- this.handleRouteChangeFullHeightPinboard = (data) => {
37
- if (data.data.canvasState !== 'EMBED' &&
38
- data.data.canvasState !== 'pinboard') {
39
- this.setIFrameHeight(this.defaultHeight);
40
- }
41
- };
42
- }
43
- /**
44
- * Construct a map of params to be passed on to the
45
- * embedded pinboard or visualization.
46
- */
47
- getEmbedParams() {
48
- const params = this.getBaseQueryParams();
49
- const { enableVizTransformations, fullHeight, preventPinboardFilterRemoval, defaultHeight, } = this.viewConfig;
50
- if (fullHeight === true) {
51
- params[Param.fullHeight] = true;
52
- }
53
- if (defaultHeight) {
54
- this.defaultHeight = defaultHeight;
55
- }
56
- if (enableVizTransformations !== undefined) {
57
- params[Param.EnableVizTransformations] = enableVizTransformations.toString();
58
- }
59
- if (preventPinboardFilterRemoval) {
60
- params[Param.preventPinboardFilterRemoval] = true;
61
- }
62
- params[Param.livedBoardEmbed] = true;
63
- const queryParams = getQueryParamString(params, true);
64
- return queryParams;
65
- }
66
- /**
67
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
68
- * to be loaded within the iframe.
69
- * @param pinboardId The GUID of the pinboard.
70
- * @param vizId The optional GUID of a visualization within the pinboard.
71
- * @param runtimeFilters A list of runtime filters to be applied to
72
- * the pinboard or visualization on load.
73
- */
74
- getIFrameSrc(pinboardId, vizId, runtimeFilters) {
75
- const filterQuery = getFilterQuery(runtimeFilters || []);
76
- const queryParams = this.getEmbedParams();
77
- const queryString = [filterQuery, queryParams]
78
- .filter(Boolean)
79
- .join('&');
80
- let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${pinboardId}`;
81
- if (vizId) {
82
- url = `${url}/${vizId}`;
83
- }
84
- return url;
85
- }
86
- /**
87
- * Render an embedded ThoughtSpot pinboard or visualization
88
- * @param renderOptions An object specifying the pinboard ID,
89
- * visualization ID and the runtime filters.
90
- */
91
- render() {
92
- const { pinboardId, vizId, runtimeFilters } = this.viewConfig;
93
- if (!pinboardId && !vizId) {
94
- this.handleError(ERROR_MESSAGE.PINBOARD_VIZ_ID_VALIDATION);
95
- }
96
- if (this.viewConfig.fullHeight === true) {
97
- this.on(EmbedEvent.RouteChange, this.handleRouteChangeFullHeightPinboard);
98
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
99
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
100
- }
101
- super.render();
102
- const src = this.getIFrameSrc(pinboardId, vizId, runtimeFilters);
103
- this.renderV1Embed(src);
104
- return this;
105
- }
106
- }
107
- //# sourceMappingURL=pinboard.js.map
@@ -1 +0,0 @@
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,iBAAiB,E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,CAAC;QAC1C,MAAM,WAAW,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC;aACzC,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,kBAAkB,CAChC,WAAW,EACX,IAAI,EACJ,KAAK,EACL,KAAK,CACR,QAAQ,UAAU,EAAE,CAAC;QACtB,IAAI,KAAK,EAAE;YACP,GAAG,GAAG,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;SAC3B;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"}
@@ -1,3 +0,0 @@
1
- import { SessionInterface } from '../types';
2
- declare function FetchAnswers(session: SessionInterface, query: string, operation: string, thoughtSpotHost: string): any;
3
- export default FetchAnswers;
@@ -1,49 +0,0 @@
1
- import { OperationType } from '../types';
2
- function FetchAnswers(session, query, operation, thoughtSpotHost) {
3
- let variable;
4
- const fetchQuery = async (variables) => {
5
- try {
6
- const response = await fetch(`${thoughtSpotHost}/prism/?op=${operation}`, {
7
- method: 'POST',
8
- headers: {
9
- 'content-type': 'application/json;charset=UTF-8',
10
- 'x-requested-by': 'ThoughtSpot',
11
- accept: '*/*',
12
- 'accept-language': 'en-us',
13
- },
14
- body: JSON.stringify({
15
- operationName: operation,
16
- query,
17
- variables,
18
- }),
19
- credentials: 'include'
20
- });
21
- const result = await response.json();
22
- return result.data;
23
- }
24
- catch (error) {
25
- return error;
26
- }
27
- };
28
- const getAnswer = (offset, batchSize) => {
29
- if (operation === OperationType.GetChartWithData) {
30
- variable = { batchSize, offset };
31
- }
32
- else {
33
- variable = {
34
- dataPaginationParams: {
35
- isClientPaginated: true,
36
- offset,
37
- size: batchSize,
38
- },
39
- };
40
- }
41
- return fetchQuery({
42
- session,
43
- ...variable,
44
- });
45
- };
46
- return getAnswer;
47
- }
48
- export default FetchAnswers;
49
- //# sourceMappingURL=fetchAnswers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchAnswers.js","sourceRoot":"","sources":["../../../src/utils/fetchAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,SAAS,YAAY,CACjB,OAAyB,EACzB,KAAa,EACb,SAAiB,EACjB,eAAuB;IAEvB,IAAI,QAAa,CAAC;IAElB,MAAM,UAAU,GAAG,KAAK,EAAE,SAAc,EAAE,EAAE;QACxC,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CACxB,GAAG,eAAe,cAAc,SAAS,EAAE,EAC3C;gBACI,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACL,cAAc,EAAE,gCAAgC;oBAChD,gBAAgB,EAAE,aAAa;oBAC/B,MAAM,EAAE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