@thoughtspot/visual-embed-sdk 1.32.0-alpha.1 → 1.33.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.
Files changed (110) hide show
  1. package/README.md +21 -1
  2. package/cjs/package.json +6 -4
  3. package/cjs/src/embed/app.d.ts +7 -1
  4. package/cjs/src/embed/app.d.ts.map +1 -1
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/liveboard.d.ts +24 -0
  7. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  8. package/cjs/src/embed/liveboard.js +30 -0
  9. package/cjs/src/embed/liveboard.js.map +1 -1
  10. package/cjs/src/embed/liveboard.spec.js +31 -0
  11. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  12. package/cjs/src/embed/search.d.ts +14 -0
  13. package/cjs/src/embed/search.d.ts.map +1 -1
  14. package/cjs/src/embed/search.js +4 -1
  15. package/cjs/src/embed/search.js.map +1 -1
  16. package/cjs/src/embed/search.spec.js +13 -0
  17. package/cjs/src/embed/search.spec.js.map +1 -1
  18. package/cjs/src/embed/ts-embed.d.ts +7 -1
  19. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  20. package/cjs/src/embed/ts-embed.js +12 -3
  21. package/cjs/src/embed/ts-embed.js.map +1 -1
  22. package/cjs/src/embed/ts-embed.spec.js +16 -3
  23. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  24. package/cjs/src/types.d.ts +18 -8
  25. package/cjs/src/types.d.ts.map +1 -1
  26. package/cjs/src/types.js +4 -7
  27. package/cjs/src/types.js.map +1 -1
  28. package/cjs/src/utils/global-styles.d.ts +2 -0
  29. package/cjs/src/utils/global-styles.d.ts.map +1 -0
  30. package/cjs/src/utils/global-styles.js +44 -0
  31. package/cjs/src/utils/global-styles.js.map +1 -0
  32. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  33. package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -0
  34. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  35. package/cjs/src/utils/graphql/preview-service.d.ts +3 -0
  36. package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -0
  37. package/cjs/src/utils/graphql/preview-service.js +30 -0
  38. package/cjs/src/utils/graphql/preview-service.js.map +1 -0
  39. package/dist/src/embed/app.d.ts +7 -1
  40. package/dist/src/embed/app.d.ts.map +1 -1
  41. package/dist/src/embed/liveboard.d.ts +24 -0
  42. package/dist/src/embed/liveboard.d.ts.map +1 -1
  43. package/dist/src/embed/search.d.ts +14 -0
  44. package/dist/src/embed/search.d.ts.map +1 -1
  45. package/dist/src/embed/ts-embed.d.ts +7 -1
  46. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  47. package/dist/src/types.d.ts +18 -8
  48. package/dist/src/types.d.ts.map +1 -1
  49. package/dist/src/utils/global-styles.d.ts +2 -0
  50. package/dist/src/utils/global-styles.d.ts.map +1 -0
  51. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  52. package/dist/src/utils/graphql/preview-service.d.ts +3 -0
  53. package/dist/src/utils/graphql/preview-service.d.ts.map +1 -0
  54. package/dist/tsembed-react.es.js +123 -12
  55. package/dist/tsembed-react.js +123 -12
  56. package/dist/tsembed.es.js +123 -12
  57. package/dist/tsembed.js +123 -12
  58. package/dist/visual-embed-sdk-react-full.d.ts +69 -10
  59. package/dist/visual-embed-sdk-react.d.ts +69 -10
  60. package/dist/visual-embed-sdk.d.ts +69 -10
  61. package/lib/package.json +6 -4
  62. package/lib/src/embed/app.d.ts +7 -1
  63. package/lib/src/embed/app.d.ts.map +1 -1
  64. package/lib/src/embed/app.js.map +1 -1
  65. package/lib/src/embed/liveboard.d.ts +24 -0
  66. package/lib/src/embed/liveboard.d.ts.map +1 -1
  67. package/lib/src/embed/liveboard.js +30 -0
  68. package/lib/src/embed/liveboard.js.map +1 -1
  69. package/lib/src/embed/liveboard.spec.js +31 -0
  70. package/lib/src/embed/liveboard.spec.js.map +1 -1
  71. package/lib/src/embed/search.d.ts +14 -0
  72. package/lib/src/embed/search.d.ts.map +1 -1
  73. package/lib/src/embed/search.js +4 -1
  74. package/lib/src/embed/search.js.map +1 -1
  75. package/lib/src/embed/search.spec.js +13 -0
  76. package/lib/src/embed/search.spec.js.map +1 -1
  77. package/lib/src/embed/ts-embed.d.ts +7 -1
  78. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  79. package/lib/src/embed/ts-embed.js +12 -3
  80. package/lib/src/embed/ts-embed.js.map +1 -1
  81. package/lib/src/embed/ts-embed.spec.js +16 -3
  82. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  83. package/lib/src/types.d.ts +18 -8
  84. package/lib/src/types.d.ts.map +1 -1
  85. package/lib/src/types.js +4 -7
  86. package/lib/src/types.js.map +1 -1
  87. package/lib/src/utils/global-styles.d.ts +2 -0
  88. package/lib/src/utils/global-styles.d.ts.map +1 -0
  89. package/lib/src/utils/global-styles.js +40 -0
  90. package/lib/src/utils/global-styles.js.map +1 -0
  91. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  92. package/lib/src/utils/graphql/answerService/answer-queries.js +9 -0
  93. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  94. package/lib/src/utils/graphql/preview-service.d.ts +3 -0
  95. package/lib/src/utils/graphql/preview-service.d.ts.map +1 -0
  96. package/lib/src/utils/graphql/preview-service.js +26 -0
  97. package/lib/src/utils/graphql/preview-service.js.map +1 -0
  98. package/lib/src/visual-embed-sdk.d.ts +69 -10
  99. package/package.json +6 -4
  100. package/src/embed/app.ts +13 -4
  101. package/src/embed/liveboard.spec.ts +34 -0
  102. package/src/embed/liveboard.ts +61 -1
  103. package/src/embed/search.spec.ts +17 -0
  104. package/src/embed/search.ts +19 -0
  105. package/src/embed/ts-embed.spec.ts +18 -3
  106. package/src/embed/ts-embed.ts +14 -4
  107. package/src/types.ts +31 -20
  108. package/src/utils/global-styles.ts +40 -0
  109. package/src/utils/graphql/answerService/answer-queries.ts +9 -0
  110. package/src/utils/graphql/preview-service.ts +31 -0
@@ -801,11 +801,6 @@ var EmbedEvent;
801
801
  * @important
802
802
  */
803
803
  EmbedEvent["Data"] = "data";
804
- /**
805
- * Search/Answer/Liveboard filters have been applied/updated by the user.
806
- * @hidden
807
- */
808
- EmbedEvent["FiltersChanged"] = "filtersChanged";
809
804
  /**
810
805
  * Search query has been updated by the user.
811
806
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
@@ -2609,6 +2604,7 @@ var Param;
2609
2604
  Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
2610
2605
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2611
2606
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2607
+ Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2612
2608
  })(Param || (Param = {}));
2613
2609
  /**
2614
2610
  * ThoughtSpot application pages include actions and menu commands
@@ -3432,7 +3428,7 @@ var Action;
3432
3428
  * disabledActions: [Action.ManageMonitor]
3433
3429
  * ```
3434
3430
  */
3435
- Action["ManageMonitor"] = "ManageMonitor";
3431
+ Action["ManageMonitor"] = "manageMonitor";
3436
3432
  /**
3437
3433
  * Action ID for Liveboard Personalised Views dropdown
3438
3434
  * @example
@@ -3475,8 +3471,9 @@ var Action;
3475
3471
  * ```js
3476
3472
  * hiddenAction: [Action.CreateLiveboard]
3477
3473
  * disabledActions: [Action.CreateLiveboard]
3474
+ * ```
3478
3475
  *
3479
- * @version SDK: 1.31.1 | Thoughtspot: 10.1.0.cl
3476
+ * @version SDK: 1.32.0 | Thoughtspot: 10.1.0.cl
3480
3477
  */
3481
3478
  Action["CreateLiveboard"] = "CreateLiveboard";
3482
3479
  /**
@@ -6316,6 +6313,15 @@ const getAnswer = `
6316
6313
  }
6317
6314
  }
6318
6315
  }
6316
+ metadata {
6317
+ author
6318
+ authorId
6319
+ createdAt
6320
+ isDiscoverable
6321
+ isHidden
6322
+ modifiedAt
6323
+ tags
6324
+ }
6319
6325
  visualizations {
6320
6326
  ... on TableViz {
6321
6327
  columns {
@@ -13809,7 +13815,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
13809
13815
  });
13810
13816
  }
13811
13817
 
13812
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.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/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",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 --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","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",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};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","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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.13.1","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":"6.7.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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","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","embedded","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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"46 kB"}],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};
13818
+ var name="@thoughtspot/visual-embed-sdk";var version="1.33.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/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",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 --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};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","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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.13.1","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":"6.7.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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.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","embedded","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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],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};
13813
13819
 
13814
13820
  /**
13815
13821
  * Copyright (c) 2022
@@ -14066,7 +14072,7 @@ class TsEmbed {
14066
14072
  * @param query
14067
14073
  */
14068
14074
  getEmbedBasePath(query) {
14069
- let queryString = query;
14075
+ let queryString = (query.startsWith('?')) ? query : `?${query}`;
14070
14076
  if (this.shouldEncodeUrlQueryParams) {
14071
14077
  queryString = `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString.substr(1))}`;
14072
14078
  }
@@ -14513,7 +14519,7 @@ class TsEmbed {
14513
14519
  isRegisteredBySDK,
14514
14520
  });
14515
14521
  if (this.isRendered) {
14516
- this.handleError('Please register event handlers before calling render');
14522
+ logger.warn('Please register event handlers before calling render');
14517
14523
  }
14518
14524
  const callbacks = this.eventHandlerMap.get(messageType) || [];
14519
14525
  callbacks.push({ options, callback });
@@ -14784,6 +14790,13 @@ class TsEmbed {
14784
14790
  class V1Embed extends TsEmbed {
14785
14791
  constructor(domSelector, viewConfig) {
14786
14792
  super(domSelector, viewConfig);
14793
+ /**
14794
+ * Only for testing purposes.
14795
+ *
14796
+ * @hidden
14797
+ */
14798
+ // eslint-disable-next-line camelcase
14799
+ this.test__executeCallbacks = this.executeCallbacks;
14787
14800
  this.viewConfig = { excludeRuntimeFiltersfromURL: false, ...viewConfig };
14788
14801
  }
14789
14802
  /**
@@ -14806,7 +14819,9 @@ class V1Embed extends TsEmbed {
14806
14819
  const filterQuery = getFilterQuery(runtimeFilters || []);
14807
14820
  queryString = [filterQuery, queryString].filter(Boolean).join('&');
14808
14821
  }
14809
- return this.getV1EmbedBasePath(queryString);
14822
+ return (this.viewConfig.enableV2Shell_experimental)
14823
+ ? this.getEmbedBasePath(queryString)
14824
+ : this.getV1EmbedBasePath(queryString);
14810
14825
  }
14811
14826
  /**
14812
14827
  * @inheritdoc
@@ -15025,7 +15040,7 @@ class SearchEmbed extends TsEmbed {
15025
15040
  var _a;
15026
15041
  const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15027
15042
  /* eslint-disable-next-line max-len */
15028
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, excludeRuntimeParametersfromURL, } = this.viewConfig;
15043
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
15029
15044
  const queryParams = this.getBaseQueryParams();
15030
15045
  queryParams[Param.HideActions] = [
15031
15046
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -15059,6 +15074,9 @@ class SearchEmbed extends TsEmbed {
15059
15074
  /* eslint-disable-next-line max-len */
15060
15075
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
15061
15076
  }
15077
+ if (!focusSearchBarOnRender) {
15078
+ queryParams[Param.FocusSearchBarOnRender] = focusSearchBarOnRender;
15079
+ }
15062
15080
  queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
15063
15081
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
15064
15082
  queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
@@ -15379,6 +15397,71 @@ class AppEmbed extends V1Embed {
15379
15397
  }
15380
15398
  }
15381
15399
 
15400
+ /* eslint-disable quotes */
15401
+ const getPreviewQuery = `
15402
+ query GetEurekaVizSnapshots(
15403
+ $vizId: String!, $liveboardId: String!) {
15404
+ getEurekaVizSnapshot(
15405
+ id: $vizId
15406
+ reportBookId: $liveboardId
15407
+ reportBookType: "PINBOARD_ANSWER_BOOK"
15408
+ version: 9999999
15409
+ ) {
15410
+ id
15411
+ vizContent
15412
+ snapshotType
15413
+ createdMs
15414
+ }
15415
+ }
15416
+ `;
15417
+ async function getPreview(thoughtSpotHost, vizId, liveboardId) {
15418
+ return graphqlQuery({
15419
+ query: getPreviewQuery,
15420
+ variables: { vizId, liveboardId },
15421
+ thoughtSpotHost,
15422
+ });
15423
+ }
15424
+
15425
+ const addPreviewStylesIfNotPresent = () => {
15426
+ const styleEl = document.getElementById('ts-preview-style');
15427
+ if (styleEl) {
15428
+ return;
15429
+ }
15430
+ const previewStyles = `
15431
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
15432
+ <style id="ts-preview-style">
15433
+ .ts-viz-preview-loader {
15434
+ position: absolute;
15435
+ top: 0;
15436
+ left: 0;
15437
+ right: 0;
15438
+ bottom: 0;
15439
+ display: flex;
15440
+ justify-content: center;
15441
+ align-items: center;
15442
+ background: linear-gradient(-45deg, #eee 40%, #fafafa 50%, #eee 60%);
15443
+ background-size: 300%;
15444
+ background-position-x: 100%;
15445
+ animation: shimmer 1s infinite linear;
15446
+ z-index: 999;
15447
+ filter: grayscale(0.2);
15448
+ }
15449
+
15450
+ @keyframes shimmer {
15451
+ to {
15452
+ background-position-x: 0%
15453
+ }
15454
+ }
15455
+
15456
+ .ts-viz-preview-loader .table-module__fullContainer {
15457
+ width: 100%;
15458
+ height: 100%;
15459
+ }
15460
+ </style>
15461
+ `;
15462
+ document.head.insertAdjacentHTML('beforeend', previewStyles);
15463
+ };
15464
+
15382
15465
  /**
15383
15466
  * Copyright (c) 2022
15384
15467
  *
@@ -15521,6 +15604,33 @@ class LiveboardEmbed extends V1Embed {
15521
15604
  super.trigger(HostEvent.Navigate, path);
15522
15605
  }
15523
15606
  }
15607
+ async showPreviewLoader() {
15608
+ if (!this.viewConfig.showPreviewLoader || !this.viewConfig.vizId) {
15609
+ return;
15610
+ }
15611
+ try {
15612
+ const preview = await getPreview(this.thoughtSpotHost, this.viewConfig.vizId, this.viewConfig.liveboardId);
15613
+ if (!preview.vizContent) {
15614
+ return;
15615
+ }
15616
+ addPreviewStylesIfNotPresent();
15617
+ const div = document.createElement('div');
15618
+ div.innerHTML = `
15619
+ <div class=ts-viz-preview-loader>
15620
+ ${preview.vizContent}
15621
+ </div>
15622
+ `;
15623
+ const previewDiv = div.firstElementChild;
15624
+ this.el.appendChild(previewDiv);
15625
+ this.el.style.position = 'relative';
15626
+ this.on(EmbedEvent.Data, () => {
15627
+ previewDiv.remove();
15628
+ });
15629
+ }
15630
+ catch (error) {
15631
+ console.error('Error fetching preview', error);
15632
+ }
15633
+ }
15524
15634
  beforePrerenderVisible() {
15525
15635
  var _a;
15526
15636
  const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
@@ -15565,6 +15675,7 @@ class LiveboardEmbed extends V1Embed {
15565
15675
  super.render();
15566
15676
  const src = this.getIFrameSrc();
15567
15677
  await this.renderV1Embed(src);
15678
+ this.showPreviewLoader();
15568
15679
  return this;
15569
15680
  }
15570
15681
  navigateToLiveboard(liveboardId, vizId, activeTabId) {
@@ -765,11 +765,6 @@
765
765
  * @important
766
766
  */
767
767
  EmbedEvent["Data"] = "data";
768
- /**
769
- * Search/Answer/Liveboard filters have been applied/updated by the user.
770
- * @hidden
771
- */
772
- EmbedEvent["FiltersChanged"] = "filtersChanged";
773
768
  /**
774
769
  * Search query has been updated by the user.
775
770
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
@@ -2550,6 +2545,7 @@
2550
2545
  Param["Enable2ColumnLayout"] = "enable2ColumnLayout";
2551
2546
  Param["IsFullAppEmbed"] = "isFullAppEmbed";
2552
2547
  Param["IsOnBeforeGetVizDataInterceptEnabled"] = "isOnBeforeGetVizDataInterceptEnabled";
2548
+ Param["FocusSearchBarOnRender"] = "focusSearchBarOnRender";
2553
2549
  })(Param || (Param = {}));
2554
2550
  (function (Action) {
2555
2551
  /**
@@ -3345,7 +3341,7 @@
3345
3341
  * disabledActions: [Action.ManageMonitor]
3346
3342
  * ```
3347
3343
  */
3348
- Action["ManageMonitor"] = "ManageMonitor";
3344
+ Action["ManageMonitor"] = "manageMonitor";
3349
3345
  /**
3350
3346
  * Action ID for Liveboard Personalised Views dropdown
3351
3347
  * @example
@@ -3388,8 +3384,9 @@
3388
3384
  * ```js
3389
3385
  * hiddenAction: [Action.CreateLiveboard]
3390
3386
  * disabledActions: [Action.CreateLiveboard]
3387
+ * ```
3391
3388
  *
3392
- * @version SDK: 1.31.1 | Thoughtspot: 10.1.0.cl
3389
+ * @version SDK: 1.32.0 | Thoughtspot: 10.1.0.cl
3393
3390
  */
3394
3391
  Action["CreateLiveboard"] = "CreateLiveboard";
3395
3392
  /**
@@ -6228,6 +6225,15 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
6228
6225
  }
6229
6226
  }
6230
6227
  }
6228
+ metadata {
6229
+ author
6230
+ authorId
6231
+ createdAt
6232
+ isDiscoverable
6233
+ isHidden
6234
+ modifiedAt
6235
+ tags
6236
+ }
6231
6237
  visualizations {
6232
6238
  ... on TableViz {
6233
6239
  columns {
@@ -13721,7 +13727,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13721
13727
  });
13722
13728
  }
13723
13729
 
13724
- var name="@thoughtspot/visual-embed-sdk";var version="1.32.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/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",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 --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","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",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};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","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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.13.1","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":"6.7.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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","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","embedded","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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"46 kB"}],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};
13730
+ var name="@thoughtspot/visual-embed-sdk";var version="1.33.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/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",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-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",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 --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};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","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@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","current-git-branch":"^1.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.13.1","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":"6.7.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-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",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-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.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","embedded","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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"48 kB"}],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};
13725
13731
 
13726
13732
  /**
13727
13733
  * Copyright (c) 2022
@@ -13978,7 +13984,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
13978
13984
  * @param query
13979
13985
  */
13980
13986
  getEmbedBasePath(query) {
13981
- let queryString = query;
13987
+ let queryString = (query.startsWith('?')) ? query : `?${query}`;
13982
13988
  if (this.shouldEncodeUrlQueryParams) {
13983
13989
  queryString = `?base64UrlEncodedFlags=${getEncodedQueryParamsString(queryString.substr(1))}`;
13984
13990
  }
@@ -14425,7 +14431,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14425
14431
  isRegisteredBySDK,
14426
14432
  });
14427
14433
  if (this.isRendered) {
14428
- this.handleError('Please register event handlers before calling render');
14434
+ logger.warn('Please register event handlers before calling render');
14429
14435
  }
14430
14436
  const callbacks = this.eventHandlerMap.get(messageType) || [];
14431
14437
  callbacks.push({ options, callback });
@@ -14696,6 +14702,13 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14696
14702
  class V1Embed extends TsEmbed {
14697
14703
  constructor(domSelector, viewConfig) {
14698
14704
  super(domSelector, viewConfig);
14705
+ /**
14706
+ * Only for testing purposes.
14707
+ *
14708
+ * @hidden
14709
+ */
14710
+ // eslint-disable-next-line camelcase
14711
+ this.test__executeCallbacks = this.executeCallbacks;
14699
14712
  this.viewConfig = { excludeRuntimeFiltersfromURL: false, ...viewConfig };
14700
14713
  }
14701
14714
  /**
@@ -14718,7 +14731,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14718
14731
  const filterQuery = getFilterQuery(runtimeFilters || []);
14719
14732
  queryString = [filterQuery, queryString].filter(Boolean).join('&');
14720
14733
  }
14721
- return this.getV1EmbedBasePath(queryString);
14734
+ return (this.viewConfig.enableV2Shell_experimental)
14735
+ ? this.getEmbedBasePath(queryString)
14736
+ : this.getV1EmbedBasePath(queryString);
14722
14737
  }
14723
14738
  /**
14724
14739
  * @inheritdoc
@@ -14937,7 +14952,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14937
14952
  var _a;
14938
14953
  const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
14939
14954
  /* eslint-disable-next-line max-len */
14940
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, excludeRuntimeParametersfromURL, } = this.viewConfig;
14955
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, } = this.viewConfig;
14941
14956
  const queryParams = this.getBaseQueryParams();
14942
14957
  queryParams[Param.HideActions] = [
14943
14958
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -14971,6 +14986,9 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
14971
14986
  /* eslint-disable-next-line max-len */
14972
14987
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
14973
14988
  }
14989
+ if (!focusSearchBarOnRender) {
14990
+ queryParams[Param.FocusSearchBarOnRender] = focusSearchBarOnRender;
14991
+ }
14974
14992
  queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
14975
14993
  queryParams[Param.DataSourceMode] = this.getDataSourceMode();
14976
14994
  queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
@@ -15286,6 +15304,71 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15286
15304
  }
15287
15305
  }
15288
15306
 
15307
+ /* eslint-disable quotes */
15308
+ const getPreviewQuery = `
15309
+ query GetEurekaVizSnapshots(
15310
+ $vizId: String!, $liveboardId: String!) {
15311
+ getEurekaVizSnapshot(
15312
+ id: $vizId
15313
+ reportBookId: $liveboardId
15314
+ reportBookType: "PINBOARD_ANSWER_BOOK"
15315
+ version: 9999999
15316
+ ) {
15317
+ id
15318
+ vizContent
15319
+ snapshotType
15320
+ createdMs
15321
+ }
15322
+ }
15323
+ `;
15324
+ async function getPreview(thoughtSpotHost, vizId, liveboardId) {
15325
+ return graphqlQuery({
15326
+ query: getPreviewQuery,
15327
+ variables: { vizId, liveboardId },
15328
+ thoughtSpotHost,
15329
+ });
15330
+ }
15331
+
15332
+ const addPreviewStylesIfNotPresent = () => {
15333
+ const styleEl = document.getElementById('ts-preview-style');
15334
+ if (styleEl) {
15335
+ return;
15336
+ }
15337
+ const previewStyles = `
15338
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ag-grid-community@32.0.2/styles/ag-grid.min.css">
15339
+ <style id="ts-preview-style">
15340
+ .ts-viz-preview-loader {
15341
+ position: absolute;
15342
+ top: 0;
15343
+ left: 0;
15344
+ right: 0;
15345
+ bottom: 0;
15346
+ display: flex;
15347
+ justify-content: center;
15348
+ align-items: center;
15349
+ background: linear-gradient(-45deg, #eee 40%, #fafafa 50%, #eee 60%);
15350
+ background-size: 300%;
15351
+ background-position-x: 100%;
15352
+ animation: shimmer 1s infinite linear;
15353
+ z-index: 999;
15354
+ filter: grayscale(0.2);
15355
+ }
15356
+
15357
+ @keyframes shimmer {
15358
+ to {
15359
+ background-position-x: 0%
15360
+ }
15361
+ }
15362
+
15363
+ .ts-viz-preview-loader .table-module__fullContainer {
15364
+ width: 100%;
15365
+ height: 100%;
15366
+ }
15367
+ </style>
15368
+ `;
15369
+ document.head.insertAdjacentHTML('beforeend', previewStyles);
15370
+ };
15371
+
15289
15372
  /**
15290
15373
  * Copyright (c) 2022
15291
15374
  *
@@ -15428,6 +15511,33 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15428
15511
  super.trigger(exports.HostEvent.Navigate, path);
15429
15512
  }
15430
15513
  }
15514
+ async showPreviewLoader() {
15515
+ if (!this.viewConfig.showPreviewLoader || !this.viewConfig.vizId) {
15516
+ return;
15517
+ }
15518
+ try {
15519
+ const preview = await getPreview(this.thoughtSpotHost, this.viewConfig.vizId, this.viewConfig.liveboardId);
15520
+ if (!preview.vizContent) {
15521
+ return;
15522
+ }
15523
+ addPreviewStylesIfNotPresent();
15524
+ const div = document.createElement('div');
15525
+ div.innerHTML = `
15526
+ <div class=ts-viz-preview-loader>
15527
+ ${preview.vizContent}
15528
+ </div>
15529
+ `;
15530
+ const previewDiv = div.firstElementChild;
15531
+ this.el.appendChild(previewDiv);
15532
+ this.el.style.position = 'relative';
15533
+ this.on(exports.EmbedEvent.Data, () => {
15534
+ previewDiv.remove();
15535
+ });
15536
+ }
15537
+ catch (error) {
15538
+ console.error('Error fetching preview', error);
15539
+ }
15540
+ }
15431
15541
  beforePrerenderVisible() {
15432
15542
  var _a;
15433
15543
  const embedObj = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a[this.embedNodeKey];
@@ -15472,6 +15582,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
15472
15582
  super.render();
15473
15583
  const src = this.getIFrameSrc();
15474
15584
  await this.renderV1Embed(src);
15585
+ this.showPreviewLoader();
15475
15586
  return this;
15476
15587
  }
15477
15588
  navigateToLiveboard(liveboardId, vizId, activeTabId) {