@thoughtspot/visual-embed-sdk 1.7.0 → 1.8.0-alpha.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.
@@ -0,0 +1,85 @@
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
+ }
@@ -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
  */
@@ -404,7 +404,6 @@ export declare enum DataSourceVisualMode {
404
404
  export declare enum Param {
405
405
  DataSources = "dataSources",
406
406
  DataSourceMode = "dataSourceMode",
407
- ExpandAllDataSource = "expandAllDataSource",
408
407
  DisableActions = "disableAction",
409
408
  DisableActionReason = "disableHint",
410
409
  ForceTable = "forceTable",
@@ -497,7 +496,27 @@ export declare enum Action {
497
496
  Separator = "context-menu-item-separator",
498
497
  DrillDown = "DRILL",
499
498
  RequestAccess = "requestAccess",
500
- QueryDetailsButtons = "queryDetailsButtons"
499
+ QueryDetailsButtons = "queryDetailsButtons",
500
+ /**
501
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
502
+ */
503
+ Monitor = "createMonitor",
504
+ /**
505
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
506
+ */
507
+ AnswerDelete = "onDeleteAnswer",
508
+ /**
509
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
510
+ */
511
+ AnswerChartSwitcher = "answerChartSwitcher",
512
+ /**
513
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
514
+ */
515
+ AddToFavorites = "addToFavorites",
516
+ /**
517
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
518
+ */
519
+ EditDetails = "editDetails"
501
520
  }
502
521
  export interface SessionInterface {
503
522
  sessionId: string;
@@ -408,7 +408,6 @@ var Param;
408
408
  (function (Param) {
409
409
  Param["DataSources"] = "dataSources";
410
410
  Param["DataSourceMode"] = "dataSourceMode";
411
- Param["ExpandAllDataSource"] = "expandAllDataSource";
412
411
  Param["DisableActions"] = "disableAction";
413
412
  Param["DisableActionReason"] = "disableHint";
414
413
  Param["ForceTable"] = "forceTable";
@@ -504,6 +503,26 @@ var Action;
504
503
  Action["DrillDown"] = "DRILL";
505
504
  Action["RequestAccess"] = "requestAccess";
506
505
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
506
+ /**
507
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
508
+ */
509
+ Action["Monitor"] = "createMonitor";
510
+ /**
511
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
512
+ */
513
+ Action["AnswerDelete"] = "onDeleteAnswer";
514
+ /**
515
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
516
+ */
517
+ Action["AnswerChartSwitcher"] = "answerChartSwitcher";
518
+ /**
519
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
520
+ */
521
+ Action["AddToFavorites"] = "addToFavorites";
522
+ /**
523
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
524
+ */
525
+ Action["EditDetails"] = "editDetails";
507
526
  })(Action || (Action = {}));
508
527
  // eslint-disable-next-line no-shadow
509
528
  var OperationType;
@@ -8873,7 +8892,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8873
8892
  }
8874
8893
  }
8875
8894
 
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};
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};
8877
8896
 
8878
8897
  /**
8879
8898
  * Copyright (c) 2022
@@ -9575,6 +9594,9 @@ class PinboardEmbed extends LiveboardEmbed {
9575
9594
  const HiddenActionItemByDefaultForSearchEmbed = [
9576
9595
  Action.EditACopy,
9577
9596
  Action.SaveAsView,
9597
+ Action.UpdateTML,
9598
+ Action.EditTML,
9599
+ Action.AnswerDelete,
9578
9600
  ];
9579
9601
  /**
9580
9602
  * Embed ThoughtSpot search
@@ -9608,7 +9630,7 @@ class SearchEmbed extends TsEmbed {
9608
9630
  */
9609
9631
  getIFrameSrc(answerId, dataSources) {
9610
9632
  var _a;
9611
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9633
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9612
9634
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9613
9635
  const queryParams = this.getBaseQueryParams();
9614
9636
  queryParams[Param.HideActions] = [
package/dist/tsembed.js CHANGED
@@ -383,7 +383,6 @@
383
383
  (function (Param) {
384
384
  Param["DataSources"] = "dataSources";
385
385
  Param["DataSourceMode"] = "dataSourceMode";
386
- Param["ExpandAllDataSource"] = "expandAllDataSource";
387
386
  Param["DisableActions"] = "disableAction";
388
387
  Param["DisableActionReason"] = "disableHint";
389
388
  Param["ForceTable"] = "forceTable";
@@ -473,6 +472,26 @@
473
472
  Action["DrillDown"] = "DRILL";
474
473
  Action["RequestAccess"] = "requestAccess";
475
474
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
475
+ /**
476
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
477
+ */
478
+ Action["Monitor"] = "createMonitor";
479
+ /**
480
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
481
+ */
482
+ Action["AnswerDelete"] = "onDeleteAnswer";
483
+ /**
484
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
485
+ */
486
+ Action["AnswerChartSwitcher"] = "answerChartSwitcher";
487
+ /**
488
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
489
+ */
490
+ Action["AddToFavorites"] = "addToFavorites";
491
+ /**
492
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
493
+ */
494
+ Action["EditDetails"] = "editDetails";
476
495
  })(exports.Action || (exports.Action = {}));
477
496
  // eslint-disable-next-line no-shadow
478
497
  var OperationType;
@@ -8842,7 +8861,7 @@
8842
8861
  }
8843
8862
  }
8844
8863
 
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};
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};
8846
8865
 
8847
8866
  /**
8848
8867
  * Copyright (c) 2022
@@ -9539,6 +9558,9 @@
9539
9558
  const HiddenActionItemByDefaultForSearchEmbed = [
9540
9559
  exports.Action.EditACopy,
9541
9560
  exports.Action.SaveAsView,
9561
+ exports.Action.UpdateTML,
9562
+ exports.Action.EditTML,
9563
+ exports.Action.AnswerDelete,
9542
9564
  ];
9543
9565
  /**
9544
9566
  * Embed ThoughtSpot search
@@ -9572,7 +9594,7 @@
9572
9594
  */
9573
9595
  getIFrameSrc(answerId, dataSources) {
9574
9596
  var _a;
9575
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9597
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9576
9598
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9577
9599
  const queryParams = this.getBaseQueryParams();
9578
9600
  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-alpha.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,7 +65,6 @@
65
65
  "asciidoctor": "^2.2.1",
66
66
  "babel-jest": "^26.6.3",
67
67
  "babel-preset-gatsby": "^1.10.0",
68
- "classnames": "^2.3.1",
69
68
  "command-line-args": "^5.1.1",
70
69
  "coveralls": "^3.1.0",
71
70
  "dts-bundle": "0.7.3",
@@ -0,0 +1,85 @@
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
+ }
@@ -0,0 +1,107 @@
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
@@ -0,0 +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,MAA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B,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"}
@@ -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
  */
@@ -12,6 +12,9 @@ import { TsEmbed } from './ts-embed';
12
12
  export const HiddenActionItemByDefaultForSearchEmbed = [
13
13
  Action.EditACopy,
14
14
  Action.SaveAsView,
15
+ Action.UpdateTML,
16
+ Action.EditTML,
17
+ Action.AnswerDelete,
15
18
  ];
16
19
  /**
17
20
  * Embed ThoughtSpot search
@@ -45,7 +48,7 @@ export class SearchEmbed extends TsEmbed {
45
48
  */
46
49
  getIFrameSrc(answerId, dataSources) {
47
50
  var _a;
48
- const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
51
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
49
52
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
50
53
  const queryParams = this.getBaseQueryParams();
51
54
  queryParams[Param.HideActions] = [
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/embed/search.ts"],"names":[],"mappings":"AAAA;;;;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C,cAAc,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC7D,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,KAAK,CAAC;QACrD,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;QACtC,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,iBAAiB,EAAE;YACnB,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;SACnC;QAED,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,UAAU,EAAE,CAAC;IAC3D,CAAC;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"}
@@ -19,7 +19,7 @@ describe('React Components', () => {
19
19
  it('Should Render the Iframe with props', async () => {
20
20
  const { container } = render(React.createElement(SearchEmbed, { hideDataSources: true }));
21
21
  await waitFor(() => getIFrameEl(container));
22
- expect(getIFrameSrc(container)).toBe(`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&hideAction=[%22editACopy%22,%22saveAsView%22]&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true#/embed/answer`);
22
+ expect(getIFrameSrc(container)).toBe(`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&hideAction=[%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true#/embed/answer`);
23
23
  });
24
24
  it('Should attach event listeners', async () => {
25
25
  const userGUID = 'absfdfgd';
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../src/react/index.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,2BAA2B,CAAC;AACnC,OAAO,yCAAyC,CAAC;AACjD,OAAO,EAAsB,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EACH,WAAW,EACX,YAAY,EACZ,mBAAmB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAA2B,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,eAAe,GAAG,WAAW,CAAC;AAEpC,SAAS,CAAC,GAAG,EAAE;IACX,IAAI,CAAC;QACD,eAAe;QACf,QAAQ,EAAE,QAAQ,CAAC,IAAI;KAC1B,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;YACjD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CACxB,oBAAC,WAAW,IAAC,eAAe,EAAE,IAAI,GAAI,CACzC,CAAC;YAEF,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;YAE5C,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CA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;gBAC/C,CAAC,EACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAC9C,CAAC,GACH,CACL,CAAC;YAEF,MAAM,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;YACtC,mBAAmB,CAAC,MAAM,CAAC,aAAa,EAAE;gBACtC,IAAI,EAAE,UAAU,CAAC,QAAQ;gBACzB,IAAI,EAAE;oBACF,QAAQ;iBACX;aACJ,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACtB,EAAE;IACN,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC3B,EAAE;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -404,7 +404,6 @@ export declare enum DataSourceVisualMode {
404
404
  export declare enum Param {
405
405
  DataSources = "dataSources",
406
406
  DataSourceMode = "dataSourceMode",
407
- ExpandAllDataSource = "expandAllDataSource",
408
407
  DisableActions = "disableAction",
409
408
  DisableActionReason = "disableHint",
410
409
  ForceTable = "forceTable",
@@ -497,7 +496,27 @@ export declare enum Action {
497
496
  Separator = "context-menu-item-separator",
498
497
  DrillDown = "DRILL",
499
498
  RequestAccess = "requestAccess",
500
- QueryDetailsButtons = "queryDetailsButtons"
499
+ QueryDetailsButtons = "queryDetailsButtons",
500
+ /**
501
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
502
+ */
503
+ Monitor = "createMonitor",
504
+ /**
505
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
506
+ */
507
+ AnswerDelete = "onDeleteAnswer",
508
+ /**
509
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
510
+ */
511
+ AnswerChartSwitcher = "answerChartSwitcher",
512
+ /**
513
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
514
+ */
515
+ AddToFavorites = "addToFavorites",
516
+ /**
517
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
518
+ */
519
+ EditDetails = "editDetails"
501
520
  }
502
521
  export interface SessionInterface {
503
522
  sessionId: string;
package/lib/src/types.js CHANGED
@@ -296,7 +296,6 @@ export var Param;
296
296
  (function (Param) {
297
297
  Param["DataSources"] = "dataSources";
298
298
  Param["DataSourceMode"] = "dataSourceMode";
299
- Param["ExpandAllDataSource"] = "expandAllDataSource";
300
299
  Param["DisableActions"] = "disableAction";
301
300
  Param["DisableActionReason"] = "disableHint";
302
301
  Param["ForceTable"] = "forceTable";
@@ -392,6 +391,26 @@ export var Action;
392
391
  Action["DrillDown"] = "DRILL";
393
392
  Action["RequestAccess"] = "requestAccess";
394
393
  Action["QueryDetailsButtons"] = "queryDetailsButtons";
394
+ /**
395
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
396
+ */
397
+ Action["Monitor"] = "createMonitor";
398
+ /**
399
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
400
+ */
401
+ Action["AnswerDelete"] = "onDeleteAnswer";
402
+ /**
403
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
404
+ */
405
+ Action["AnswerChartSwitcher"] = "answerChartSwitcher";
406
+ /**
407
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
408
+ */
409
+ Action["AddToFavorites"] = "addToFavorites";
410
+ /**
411
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
412
+ */
413
+ Action["EditDetails"] = "editDetails";
395
414
  })(Action || (Action = {}));
396
415
  // eslint-disable-next-line no-shadow
397
416
  export var OperationType;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRo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AA;IACpC,wDAA8C,CAAA;IAC9C,mDAAyC,CAAA;IACzC,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;IAC/B,qDAA2C,CAAA;IAC3C;;OAEG;IACH,mCAAyB,CAAA;IACzB;;OAEG;IACH,yCAA+B,CAAA;IAC/B;;OAEG;IACH,qDAA2C,CAAA;IAC3C;;OAEG;IACH,2CAAiC,CAAA;IACjC;;OAEG;IACH,qCAA2B,CAAA;AAC/B,CAAC,EArFW,MAAM,KAAN,MAAM,QAqFjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
@@ -0,0 +1,3 @@
1
+ import { SessionInterface } from '../types';
2
+ declare function FetchAnswers(session: SessionInterface, query: string, operation: string, thoughtSpotHost: string): any;
3
+ export default FetchAnswers;
@@ -0,0 +1,49 @@
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
@@ -0,0 +1 @@
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,KAAK;oBACb,iBAAiB,EAAE,OAAO;iBAC7B;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACjB,aAAa,EAAE,SAAS;oBACxB,KAAK;oBACL,SAAS;iBACZ,CAAC;gBACF,WAAW,EAAE,SAAS;aACzB,CACA,CAAC;YACF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACrC,OAAO,MAAM,CAAC,IAAI,CAAC;SACtB;QAAC,OAAO,KAAK,EAAE;YACZ,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE;QACpD,IAAI,SAAS,KAAK,aAAa,CAAC,gBAAgB,EAAE;YAC9C,QAAQ,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SACpC;aAAM;YACH,QAAQ,GAAG;gBACP,oBAAoB,EAAE;oBAClB,iBAAiB,EAAE,IAAI;oBACvB,MAAM;oBACN,IAAI,EAAE,SAAS;iBAClB;aACJ,CAAC;SACL;QACD,OAAO,UAAU,CAAC;YACd,OAAO;YACP,GAAG,QAAQ;SACd,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -275,10 +275,6 @@ 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;
282
278
  /**
283
279
  * If set to true, the Search Assist feature is enabled.
284
280
  */
@@ -725,7 +721,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
725
721
  export enum Param {
726
722
  DataSources = "dataSources",
727
723
  DataSourceMode = "dataSourceMode",
728
- ExpandAllDataSource = "expandAllDataSource",
729
724
  DisableActions = "disableAction",
730
725
  DisableActionReason = "disableHint",
731
726
  ForceTable = "forceTable",
@@ -818,7 +813,27 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
818
813
  Separator = "context-menu-item-separator",
819
814
  DrillDown = "DRILL",
820
815
  RequestAccess = "requestAccess",
821
- QueryDetailsButtons = "queryDetailsButtons"
816
+ QueryDetailsButtons = "queryDetailsButtons",
817
+ /**
818
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
819
+ */
820
+ Monitor = "createMonitor",
821
+ /**
822
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
823
+ */
824
+ AnswerDelete = "onDeleteAnswer",
825
+ /**
826
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
827
+ */
828
+ AnswerChartSwitcher = "answerChartSwitcher",
829
+ /**
830
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
831
+ */
832
+ AddToFavorites = "addToFavorites",
833
+ /**
834
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
835
+ */
836
+ EditDetails = "editDetails"
822
837
  }
823
838
  export interface SessionInterface {
824
839
  sessionId: string;
package/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-alpha.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,7 +65,6 @@
65
65
  "asciidoctor": "^2.2.1",
66
66
  "babel-jest": "^26.6.3",
67
67
  "babel-preset-gatsby": "^1.10.0",
68
- "classnames": "^2.3.1",
69
68
  "command-line-args": "^5.1.1",
70
69
  "coveralls": "^3.1.0",
71
70
  "dts-bundle": "0.7.3",
@@ -49,10 +49,6 @@ 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;
56
52
  /**
57
53
  * If set to true, the Search Assist feature is enabled.
58
54
  */
@@ -84,6 +80,9 @@ export interface SearchViewConfig extends ViewConfig {
84
80
  export const HiddenActionItemByDefaultForSearchEmbed = [
85
81
  Action.EditACopy,
86
82
  Action.SaveAsView,
83
+ Action.UpdateTML,
84
+ Action.EditTML,
85
+ Action.AnswerDelete,
87
86
  ];
88
87
 
89
88
  /**
@@ -127,7 +126,6 @@ export class SearchEmbed extends TsEmbed {
127
126
  private getIFrameSrc(answerId: string, dataSources?: string[]) {
128
127
  const {
129
128
  hideResults,
130
- expandAllDataSource,
131
129
  enableSearchAssist,
132
130
  forceTable,
133
131
  searchOptions,
@@ -31,7 +31,7 @@ describe('React Components', () => {
31
31
  await waitFor(() => getIFrameEl(container));
32
32
 
33
33
  expect(getIFrameSrc(container)).toBe(
34
- `http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&hideAction=[%22editACopy%22,%22saveAsView%22]&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true#/embed/answer`,
34
+ `http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&hideAction=[%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true#/embed/answer`,
35
35
  );
36
36
  });
37
37
 
package/src/types.ts CHANGED
@@ -431,7 +431,6 @@ export enum DataSourceVisualMode {
431
431
  export enum Param {
432
432
  DataSources = 'dataSources',
433
433
  DataSourceMode = 'dataSourceMode',
434
- ExpandAllDataSource = 'expandAllDataSource',
435
434
  DisableActions = 'disableAction',
436
435
  DisableActionReason = 'disableHint',
437
436
  ForceTable = 'forceTable',
@@ -527,6 +526,26 @@ export enum Action {
527
526
  DrillDown = 'DRILL',
528
527
  RequestAccess = 'requestAccess',
529
528
  QueryDetailsButtons = 'queryDetailsButtons',
529
+ /**
530
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
531
+ */
532
+ Monitor = 'createMonitor',
533
+ /**
534
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
535
+ */
536
+ AnswerDelete = 'onDeleteAnswer',
537
+ /**
538
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
539
+ */
540
+ AnswerChartSwitcher = 'answerChartSwitcher',
541
+ /**
542
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
543
+ */
544
+ AddToFavorites = 'addToFavorites',
545
+ /**
546
+ * @version SDK: 1.8.0 | ThoughtSpot: 8.1.0.cl
547
+ */
548
+ EditDetails = 'editDetails',
530
549
  }
531
550
 
532
551
  export interface SessionInterface {