@thoughtspot/visual-embed-sdk 1.7.0-alpha.0 → 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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/dist/src/auth.d.ts +3 -5
  3. package/dist/src/embed/app.d.ts +1 -1
  4. package/dist/src/embed/liveboard.d.ts +1 -1
  5. package/dist/src/embed/search.d.ts +7 -2
  6. package/dist/src/embed/ts-embed.d.ts +1 -1
  7. package/dist/src/index.d.ts +1 -1
  8. package/dist/src/test/test-utils.d.ts +1 -0
  9. package/dist/src/types.d.ts +19 -3
  10. package/dist/src/utils.d.ts +1 -1
  11. package/dist/tsembed.es.js +65 -20
  12. package/dist/tsembed.js +62 -20
  13. package/lib/package.json +2 -1
  14. package/lib/src/auth.d.ts +3 -5
  15. package/lib/src/auth.js +27 -9
  16. package/lib/src/auth.js.map +1 -1
  17. package/lib/src/auth.spec.js +2 -2
  18. package/lib/src/auth.spec.js.map +1 -1
  19. package/lib/src/config.js +1 -1
  20. package/lib/src/embed/app.d.ts +1 -1
  21. package/lib/src/embed/app.js +1 -1
  22. package/lib/src/embed/base.js +1 -1
  23. package/lib/src/embed/liveboard.d.ts +1 -1
  24. package/lib/src/embed/liveboard.js +1 -1
  25. package/lib/src/embed/search.d.ts +7 -2
  26. package/lib/src/embed/search.js +13 -3
  27. package/lib/src/embed/search.js.map +1 -1
  28. package/lib/src/embed/search.spec.js +33 -20
  29. package/lib/src/embed/search.spec.js.map +1 -1
  30. package/lib/src/embed/ts-embed.d.ts +1 -1
  31. package/lib/src/embed/ts-embed.js +3 -2
  32. package/lib/src/embed/ts-embed.js.map +1 -1
  33. package/lib/src/index.d.ts +1 -1
  34. package/lib/src/index.js +1 -1
  35. package/lib/src/react/index.spec.js +1 -1
  36. package/lib/src/react/index.spec.js.map +1 -1
  37. package/lib/src/test/test-utils.d.ts +1 -0
  38. package/lib/src/test/test-utils.js +3 -0
  39. package/lib/src/test/test-utils.js.map +1 -1
  40. package/lib/src/types.d.ts +19 -3
  41. package/lib/src/types.js +18 -2
  42. package/lib/src/types.js.map +1 -1
  43. package/lib/src/utils.d.ts +1 -1
  44. package/lib/src/utils.js +1 -1
  45. package/lib/src/visual-embed-sdk.d.ts +29 -8
  46. package/package.json +2 -1
  47. package/src/auth.spec.ts +2 -2
  48. package/src/auth.ts +37 -9
  49. package/src/config.ts +1 -1
  50. package/src/embed/app.ts +1 -1
  51. package/src/embed/base.ts +1 -1
  52. package/src/embed/liveboard.ts +1 -1
  53. package/src/embed/search.spec.ts +39 -19
  54. package/src/embed/search.ts +19 -2
  55. package/src/embed/ts-embed.ts +4 -2
  56. package/src/index.ts +1 -1
  57. package/src/react/index.spec.tsx +1 -1
  58. package/src/test/test-utils.ts +4 -0
  59. package/src/types.ts +18 -2
  60. package/src/utils.ts +1 -1
package/README.md CHANGED
@@ -163,4 +163,4 @@ const MyComponent = ({ dataSources }) => {
163
163
  <br/>
164
164
  <br/>
165
165
 
166
- Visual-Embed-SDK, © ThoughtSpot, Inc. 2021
166
+ Visual-Embed-SDK, © ThoughtSpot, Inc. 2022
@@ -6,7 +6,8 @@ export declare let sessionInfo: any;
6
6
  export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
7
7
  export declare const EndPoints: {
8
8
  AUTH_VERIFICATION: string;
9
- SSO_LOGIN_TEMPLATE: (targetUrl: string) => string;
9
+ SAML_LOGIN_TEMPLATE: (targetUrl: string) => string;
10
+ OIDC_LOGIN_TEMPLATE: (targetUrl: string) => string;
10
11
  TOKEN_LOGIN: string;
11
12
  BASIC_LOGIN: string;
12
13
  };
@@ -29,11 +30,8 @@ export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<void>;
29
30
  * @param embedConfig The embed configuration
30
31
  */
31
32
  export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<void>;
32
- /**
33
- * Perform SAML authentication
34
- * @param embedConfig The embed configuration
35
- */
36
33
  export declare const doSamlAuth: (embedConfig: EmbedConfig) => Promise<void>;
34
+ export declare const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<void>;
37
35
  /**
38
36
  * Perform authentication on the ThoughtSpot cluster
39
37
  * @param embedConfig The embed configuration
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Full application embedding
5
5
  * https://developers.thoughtspot.com/docs/?pageid=full-embed
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Embed a ThoughtSpot Liveboard or visualization
5
5
  * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Copyright (c) 2021
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Embed ThoughtSpot search or a saved answer
5
5
  *
6
6
  * @summary Search embed
7
7
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8
8
  */
9
- import { DOMSelector } from '../types';
9
+ import { DOMSelector, Action } from '../types';
10
10
  import { ViewConfig, TsEmbed } from './ts-embed';
11
11
  /**
12
12
  * Configuration for search options
@@ -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
  */
@@ -71,6 +75,7 @@ export interface SearchViewConfig extends ViewConfig {
71
75
  */
72
76
  answerId?: string;
73
77
  }
78
+ export declare const HiddenActionItemByDefaultForSearchEmbed: Action[];
74
79
  /**
75
80
  * Embed ThoughtSpot search
76
81
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2021
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Base classes
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * ThoughtSpot Visual Embed SDK for embedding ThoughtSpot analytics
5
5
  * in other web applications.
@@ -24,4 +24,5 @@ export declare const executeAfterWait: (fn: (...args: any[]) => void, waitTime?:
24
24
  * Time (in milliseconds) to wait for async events to be triggered
25
25
  */
26
26
  export declare const EVENT_WAIT_TIME = 1000;
27
+ export declare function fixedEncodeURI(str: string): string;
27
28
  export {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * TypeScript type definitions for ThoughtSpot Visual Embed SDK
5
5
  *
@@ -19,6 +19,10 @@ export declare enum AuthType {
19
19
  * SSO using SAML
20
20
  */
21
21
  SSO = "SSO_SAML",
22
+ /**
23
+ * SSO using OIDC
24
+ */
25
+ OIDC = "SSO_OIDC",
22
26
  /**
23
27
  * Trusted authentication server
24
28
  */
@@ -331,6 +335,9 @@ export declare enum EmbedEvent {
331
335
  /**
332
336
  * Event types that can be triggered by the host application
333
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.
334
341
  */
335
342
  export declare enum HostEvent {
336
343
  /**
@@ -364,7 +371,13 @@ export declare enum HostEvent {
364
371
  * will be hidden.
365
372
  * @version 1.6.0 or later
366
373
  */
367
- 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"
368
381
  }
369
382
  /**
370
383
  * The different visual modes that the data sources panel within
@@ -391,6 +404,7 @@ export declare enum DataSourceVisualMode {
391
404
  export declare enum Param {
392
405
  DataSources = "dataSources",
393
406
  DataSourceMode = "dataSourceMode",
407
+ ExpandAllDataSource = "expandAllDataSource",
394
408
  DisableActions = "disableAction",
395
409
  DisableActionReason = "disableHint",
396
410
  ForceTable = "forceTable",
@@ -408,6 +422,7 @@ export declare enum Param {
408
422
  executeSearch = "executeSearch",
409
423
  fullHeight = "isFullHeightPinboard",
410
424
  livedBoardEmbed = "isLiveboardEmbed",
425
+ searchEmbed = "isSearchEmbed",
411
426
  Version = "sdkVersion",
412
427
  ViewPortHeight = "viewPortHeight",
413
428
  ViewPortWidth = "viewPortWidth",
@@ -427,7 +442,7 @@ export declare enum Action {
427
442
  EditACopy = "editACopy",
428
443
  CopyLink = "embedDocument",
429
444
  ResetLayout = "resetLayout",
430
- Schedule = "schedule",
445
+ Schedule = "subscription",
431
446
  SchedulesList = "schedule-list",
432
447
  Share = "share",
433
448
  AddFilter = "addFilter",
@@ -476,6 +491,7 @@ export declare enum Action {
476
491
  DrillInclude = "context-menu-item-include",
477
492
  DrillExclude = "context-menu-item-exclude",
478
493
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
494
+ CopyAndEdit = "context-menu-item-copy-and-edit",
479
495
  DrillEdit = "context-menu-item-edit",
480
496
  EditMeasure = "context-menu-item-edit-measure",
481
497
  Separator = "context-menu-item-separator",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Common utility functions for ThoughtSpot Visual Embed SDK
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) 2020
2
+ * Copyright (c) 2022
3
3
  *
4
4
  * Common utility functions for ThoughtSpot Visual Embed SDK
5
5
  *
@@ -111,7 +111,7 @@ const getOffsetTop = (element) => {
111
111
  };
112
112
 
113
113
  /**
114
- * Copyright (c) 2020
114
+ * Copyright (c) 2022
115
115
  *
116
116
  * TypeScript type definitions for ThoughtSpot Visual Embed SDK
117
117
  *
@@ -133,6 +133,10 @@ var AuthType;
133
133
  * SSO using SAML
134
134
  */
135
135
  AuthType["SSO"] = "SSO_SAML";
136
+ /**
137
+ * SSO using OIDC
138
+ */
139
+ AuthType["OIDC"] = "SSO_OIDC";
136
140
  /**
137
141
  * Trusted authentication server
138
142
  */
@@ -329,6 +333,9 @@ var EmbedEvent;
329
333
  /**
330
334
  * Event types that can be triggered by the host application
331
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.
332
339
  */
333
340
  // eslint-disable-next-line no-shadow
334
341
  var HostEvent;
@@ -365,6 +372,12 @@ var HostEvent;
365
372
  * @version 1.6.0 or later
366
373
  */
367
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";
368
381
  })(HostEvent || (HostEvent = {}));
369
382
  /**
370
383
  * The different visual modes that the data sources panel within
@@ -395,6 +408,7 @@ var Param;
395
408
  (function (Param) {
396
409
  Param["DataSources"] = "dataSources";
397
410
  Param["DataSourceMode"] = "dataSourceMode";
411
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
398
412
  Param["DisableActions"] = "disableAction";
399
413
  Param["DisableActionReason"] = "disableHint";
400
414
  Param["ForceTable"] = "forceTable";
@@ -412,6 +426,7 @@ var Param;
412
426
  Param["executeSearch"] = "executeSearch";
413
427
  Param["fullHeight"] = "isFullHeightPinboard";
414
428
  Param["livedBoardEmbed"] = "isLiveboardEmbed";
429
+ Param["searchEmbed"] = "isSearchEmbed";
415
430
  Param["Version"] = "sdkVersion";
416
431
  Param["ViewPortHeight"] = "viewPortHeight";
417
432
  Param["ViewPortWidth"] = "viewPortWidth";
@@ -433,7 +448,7 @@ var Action;
433
448
  Action["EditACopy"] = "editACopy";
434
449
  Action["CopyLink"] = "embedDocument";
435
450
  Action["ResetLayout"] = "resetLayout";
436
- Action["Schedule"] = "schedule";
451
+ Action["Schedule"] = "subscription";
437
452
  Action["SchedulesList"] = "schedule-list";
438
453
  Action["Share"] = "share";
439
454
  Action["AddFilter"] = "addFilter";
@@ -482,6 +497,7 @@ var Action;
482
497
  Action["DrillInclude"] = "context-menu-item-include";
483
498
  Action["DrillExclude"] = "context-menu-item-exclude";
484
499
  Action["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
500
+ Action["CopyAndEdit"] = "context-menu-item-copy-and-edit";
485
501
  Action["DrillEdit"] = "context-menu-item-edit";
486
502
  Action["EditMeasure"] = "context-menu-item-edit-measure";
487
503
  Action["Separator"] = "context-menu-item-separator";
@@ -502,7 +518,7 @@ const ERROR_MESSAGE = {
502
518
  };
503
519
 
504
520
  /**
505
- * Copyright (c) 2020
521
+ * Copyright (c) 2022
506
522
  *
507
523
  * Utilities related to reading configuration objects
508
524
  *
@@ -8496,7 +8512,8 @@ let sessionInfo = null;
8496
8512
  const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
8497
8513
  const EndPoints = {
8498
8514
  AUTH_VERIFICATION: '/callosum/v1/session/info',
8499
- SSO_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
8515
+ SAML_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
8516
+ OIDC_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
8500
8517
  TOKEN_LOGIN: '/callosum/v1/session/login/token',
8501
8518
  BASIC_LOGIN: '/callosum/v1/session/login',
8502
8519
  };
@@ -8604,7 +8621,7 @@ async function samlPopupFlow(ssoURL) {
8604
8621
  * Perform SAML authentication
8605
8622
  * @param embedConfig The embed configuration
8606
8623
  */
8607
- const doSamlAuth = async (embedConfig) => {
8624
+ const doSSOAuth = async (embedConfig, ssoEndPoint) => {
8608
8625
  const { thoughtSpotHost } = embedConfig;
8609
8626
  const loggedIn = await isLoggedIn(thoughtSpotHost);
8610
8627
  if (loggedIn) {
@@ -8621,13 +8638,6 @@ const doSamlAuth = async (embedConfig) => {
8621
8638
  loggedInStatus = false;
8622
8639
  return;
8623
8640
  }
8624
- // redirect for SSO, when the SSO authentication is done, this page will be loaded
8625
- // again and the same JS will execute again.
8626
- const ssoRedirectUrl = embedConfig.noRedirect
8627
- ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
8628
- : appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
8629
- // bring back the page to the same URL
8630
- const ssoEndPoint = `${EndPoints.SSO_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
8631
8641
  const ssoURL = `${thoughtSpotHost}${ssoEndPoint}`;
8632
8642
  if (embedConfig.noRedirect) {
8633
8643
  await samlPopupFlow(ssoURL);
@@ -8635,6 +8645,28 @@ const doSamlAuth = async (embedConfig) => {
8635
8645
  }
8636
8646
  window.location.href = ssoURL;
8637
8647
  };
8648
+ const doSamlAuth = async (embedConfig) => {
8649
+ const { thoughtSpotHost } = embedConfig;
8650
+ // redirect for SSO, when the SSO authentication is done, this page will be loaded
8651
+ // again and the same JS will execute again.
8652
+ const ssoRedirectUrl = embedConfig.noRedirect
8653
+ ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
8654
+ : appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
8655
+ // bring back the page to the same URL
8656
+ const ssoEndPoint = `${EndPoints.SAML_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
8657
+ await doSSOAuth(embedConfig, ssoEndPoint);
8658
+ };
8659
+ const doOIDCAuth = async (embedConfig) => {
8660
+ const { thoughtSpotHost } = embedConfig;
8661
+ // redirect for SSO, when the SSO authentication is done, this page will be loaded
8662
+ // again and the same JS will execute again.
8663
+ const ssoRedirectUrl = embedConfig.noRedirect
8664
+ ? `${thoughtSpotHost}/v2/#/embed/saml-complete`
8665
+ : appendToUrlHash(window.location.href, SSO_REDIRECTION_MARKER_GUID);
8666
+ // bring back the page to the same URL
8667
+ const ssoEndPoint = `${EndPoints.OIDC_LOGIN_TEMPLATE(encodeURIComponent(ssoRedirectUrl))}`;
8668
+ await doSSOAuth(embedConfig, ssoEndPoint);
8669
+ };
8638
8670
  /**
8639
8671
  * Perform authentication on the ThoughtSpot cluster
8640
8672
  * @param embedConfig The embed configuration
@@ -8644,6 +8676,8 @@ const authenticate = async (embedConfig) => {
8644
8676
  switch (authType) {
8645
8677
  case AuthType.SSO:
8646
8678
  return doSamlAuth(embedConfig);
8679
+ case AuthType.OIDC:
8680
+ return doOIDCAuth(embedConfig);
8647
8681
  case AuthType.AuthServer:
8648
8682
  return doTokenAuth(embedConfig);
8649
8683
  case AuthType.Basic:
@@ -8839,16 +8873,17 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8839
8873
  }
8840
8874
  }
8841
8875
 
8842
- var version="1.7.0-alpha.0";
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};
8843
8877
 
8844
8878
  /**
8845
- * Copyright (c) 2021
8879
+ * Copyright (c) 2022
8846
8880
  *
8847
8881
  * Base classes
8848
8882
  *
8849
8883
  * @summary Base classes
8850
8884
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8851
8885
  */
8886
+ const { version: version$1 } = pkgInfo;
8852
8887
  /**
8853
8888
  * The event id map from v2 event names to v1 event id
8854
8889
  * v1 events are the classic embed events implemented in Blink v1
@@ -9000,7 +9035,7 @@ class TsEmbed {
9000
9035
  queryParams[Param.HostAppUrl] = encodeURIComponent(hostAppUrl);
9001
9036
  queryParams[Param.ViewPortHeight] = window.innerHeight;
9002
9037
  queryParams[Param.ViewPortWidth] = window.innerWidth;
9003
- queryParams[Param.Version] = version;
9038
+ queryParams[Param.Version] = version$1;
9004
9039
  if (this.embedConfig.customCssUrl) {
9005
9040
  queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
9006
9041
  }
@@ -9272,7 +9307,7 @@ class V1Embed extends TsEmbed {
9272
9307
  }
9273
9308
 
9274
9309
  /**
9275
- * Copyright (c) 2021
9310
+ * Copyright (c) 2022
9276
9311
  *
9277
9312
  * Full application embedding
9278
9313
  * https://developers.thoughtspot.com/docs/?pageid=full-embed
@@ -9419,7 +9454,7 @@ class AppEmbed extends V1Embed {
9419
9454
  }
9420
9455
 
9421
9456
  /**
9422
- * Copyright (c) 2021
9457
+ * Copyright (c) 2022
9423
9458
  *
9424
9459
  * Embed a ThoughtSpot Liveboard or visualization
9425
9460
  * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
@@ -9530,13 +9565,17 @@ class PinboardEmbed extends LiveboardEmbed {
9530
9565
  }
9531
9566
 
9532
9567
  /**
9533
- * Copyright (c) 2021
9568
+ * Copyright (c) 2022
9534
9569
  *
9535
9570
  * Embed ThoughtSpot search or a saved answer
9536
9571
  *
9537
9572
  * @summary Search embed
9538
9573
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
9539
9574
  */
9575
+ const HiddenActionItemByDefaultForSearchEmbed = [
9576
+ Action.EditACopy,
9577
+ Action.SaveAsView,
9578
+ ];
9540
9579
  /**
9541
9580
  * Embed ThoughtSpot search
9542
9581
  *
@@ -9568,9 +9607,14 @@ class SearchEmbed extends TsEmbed {
9568
9607
  * @param dataSources A list of data source GUIDs
9569
9608
  */
9570
9609
  getIFrameSrc(answerId, dataSources) {
9571
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9610
+ var _a;
9611
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9572
9612
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9573
9613
  const queryParams = this.getBaseQueryParams();
9614
+ queryParams[Param.HideActions] = [
9615
+ ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
9616
+ ...HiddenActionItemByDefaultForSearchEmbed,
9617
+ ];
9574
9618
  if (dataSources && dataSources.length) {
9575
9619
  queryParams[Param.DataSources] = JSON.stringify(dataSources);
9576
9620
  }
@@ -9591,6 +9635,7 @@ class SearchEmbed extends TsEmbed {
9591
9635
  }
9592
9636
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
9593
9637
  queryParams[Param.UseLastSelectedDataSource] = false;
9638
+ queryParams[Param.searchEmbed] = true;
9594
9639
  let query = '';
9595
9640
  const queryParamsString = getQueryParamString(queryParams, true);
9596
9641
  if (queryParamsString) {