@thoughtspot/visual-embed-sdk 1.42.0 → 1.42.1-alpha.2

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 (154) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/api-intercept.d.ts +27 -0
  3. package/cjs/src/api-intercept.d.ts.map +1 -0
  4. package/cjs/src/api-intercept.js +115 -0
  5. package/cjs/src/api-intercept.js.map +1 -0
  6. package/cjs/src/api-intercept.spec.d.ts +2 -0
  7. package/cjs/src/api-intercept.spec.d.ts.map +1 -0
  8. package/cjs/src/api-intercept.spec.js +122 -0
  9. package/cjs/src/api-intercept.spec.js.map +1 -0
  10. package/cjs/src/embed/app.d.ts.map +1 -1
  11. package/cjs/src/embed/app.js +7 -2
  12. package/cjs/src/embed/app.js.map +1 -1
  13. package/cjs/src/embed/app.spec.js +20 -0
  14. package/cjs/src/embed/app.spec.js.map +1 -1
  15. package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
  16. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  17. package/cjs/src/embed/hostEventClient/contracts.js +1 -0
  18. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  19. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  20. package/cjs/src/embed/liveboard.js +4 -1
  21. package/cjs/src/embed/liveboard.js.map +1 -1
  22. package/cjs/src/embed/liveboard.spec.js +22 -0
  23. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  24. package/cjs/src/embed/search.d.ts.map +1 -1
  25. package/cjs/src/embed/search.js +3 -1
  26. package/cjs/src/embed/search.js.map +1 -1
  27. package/cjs/src/embed/ts-embed.d.ts +15 -0
  28. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  29. package/cjs/src/embed/ts-embed.js +94 -26
  30. package/cjs/src/embed/ts-embed.js.map +1 -1
  31. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +168 -0
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/errors.d.ts +1 -0
  35. package/cjs/src/errors.d.ts.map +1 -1
  36. package/cjs/src/errors.js +1 -0
  37. package/cjs/src/errors.js.map +1 -1
  38. package/cjs/src/index.d.ts +2 -2
  39. package/cjs/src/index.d.ts.map +1 -1
  40. package/cjs/src/index.js +2 -1
  41. package/cjs/src/index.js.map +1 -1
  42. package/cjs/src/react/all-types-export.d.ts +1 -1
  43. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  44. package/cjs/src/react/all-types-export.js +2 -1
  45. package/cjs/src/react/all-types-export.js.map +1 -1
  46. package/cjs/src/types.d.ts +100 -4
  47. package/cjs/src/types.d.ts.map +1 -1
  48. package/cjs/src/types.js +39 -1
  49. package/cjs/src/types.js.map +1 -1
  50. package/cjs/src/utils/processData.d.ts +1 -1
  51. package/cjs/src/utils/processData.d.ts.map +1 -1
  52. package/cjs/src/utils/processData.js +8 -8
  53. package/cjs/src/utils/processData.js.map +1 -1
  54. package/dist/index-BCC3Z072.js +7371 -0
  55. package/dist/index-BEzW4MDA.js +7371 -0
  56. package/dist/{index-BpSohedu.js → index-DvNA626T.js} +1 -1
  57. package/dist/src/api-intercept.d.ts +27 -0
  58. package/dist/src/api-intercept.d.ts.map +1 -0
  59. package/dist/src/api-intercept.spec.d.ts +2 -0
  60. package/dist/src/api-intercept.spec.d.ts.map +1 -0
  61. package/dist/src/embed/app.d.ts.map +1 -1
  62. package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
  63. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  64. package/dist/src/embed/liveboard.d.ts.map +1 -1
  65. package/dist/src/embed/search.d.ts.map +1 -1
  66. package/dist/src/embed/ts-embed.d.ts +15 -0
  67. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  68. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  69. package/dist/src/errors.d.ts +1 -0
  70. package/dist/src/errors.d.ts.map +1 -1
  71. package/dist/src/index.d.ts +2 -2
  72. package/dist/src/index.d.ts.map +1 -1
  73. package/dist/src/react/all-types-export.d.ts +1 -1
  74. package/dist/src/react/all-types-export.d.ts.map +1 -1
  75. package/dist/src/types.d.ts +100 -4
  76. package/dist/src/types.d.ts.map +1 -1
  77. package/dist/src/utils/processData.d.ts +1 -1
  78. package/dist/src/utils/processData.d.ts.map +1 -1
  79. package/dist/tsembed-react.es.js +266 -51
  80. package/dist/tsembed-react.js +265 -50
  81. package/dist/tsembed.es.js +267 -52
  82. package/dist/tsembed.js +265 -50
  83. package/dist/visual-embed-sdk-react-full.d.ts +124 -4
  84. package/dist/visual-embed-sdk-react.d.ts +121 -4
  85. package/dist/visual-embed-sdk.d.ts +124 -4
  86. package/lib/package.json +2 -2
  87. package/lib/src/api-intercept.d.ts +27 -0
  88. package/lib/src/api-intercept.d.ts.map +1 -0
  89. package/lib/src/api-intercept.js +108 -0
  90. package/lib/src/api-intercept.js.map +1 -0
  91. package/lib/src/api-intercept.spec.d.ts +2 -0
  92. package/lib/src/api-intercept.spec.d.ts.map +1 -0
  93. package/lib/src/api-intercept.spec.js +119 -0
  94. package/lib/src/api-intercept.spec.js.map +1 -0
  95. package/lib/src/embed/app.d.ts.map +1 -1
  96. package/lib/src/embed/app.js +7 -2
  97. package/lib/src/embed/app.js.map +1 -1
  98. package/lib/src/embed/app.spec.js +20 -0
  99. package/lib/src/embed/app.spec.js.map +1 -1
  100. package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
  101. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  102. package/lib/src/embed/hostEventClient/contracts.js +1 -0
  103. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  104. package/lib/src/embed/liveboard.d.ts.map +1 -1
  105. package/lib/src/embed/liveboard.js +4 -1
  106. package/lib/src/embed/liveboard.js.map +1 -1
  107. package/lib/src/embed/liveboard.spec.js +22 -0
  108. package/lib/src/embed/liveboard.spec.js.map +1 -1
  109. package/lib/src/embed/search.d.ts.map +1 -1
  110. package/lib/src/embed/search.js +3 -1
  111. package/lib/src/embed/search.js.map +1 -1
  112. package/lib/src/embed/ts-embed.d.ts +15 -0
  113. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  114. package/lib/src/embed/ts-embed.js +94 -26
  115. package/lib/src/embed/ts-embed.js.map +1 -1
  116. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  117. package/lib/src/embed/ts-embed.spec.js +168 -0
  118. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  119. package/lib/src/errors.d.ts +1 -0
  120. package/lib/src/errors.d.ts.map +1 -1
  121. package/lib/src/errors.js +1 -0
  122. package/lib/src/errors.js.map +1 -1
  123. package/lib/src/index.d.ts +2 -2
  124. package/lib/src/index.d.ts.map +1 -1
  125. package/lib/src/index.js +2 -2
  126. package/lib/src/index.js.map +1 -1
  127. package/lib/src/react/all-types-export.d.ts +1 -1
  128. package/lib/src/react/all-types-export.d.ts.map +1 -1
  129. package/lib/src/react/all-types-export.js +1 -1
  130. package/lib/src/react/all-types-export.js.map +1 -1
  131. package/lib/src/types.d.ts +100 -4
  132. package/lib/src/types.d.ts.map +1 -1
  133. package/lib/src/types.js +38 -0
  134. package/lib/src/types.js.map +1 -1
  135. package/lib/src/utils/processData.d.ts +1 -1
  136. package/lib/src/utils/processData.d.ts.map +1 -1
  137. package/lib/src/utils/processData.js +8 -8
  138. package/lib/src/utils/processData.js.map +1 -1
  139. package/package.json +2 -2
  140. package/src/api-intercept.spec.ts +147 -0
  141. package/src/api-intercept.ts +134 -0
  142. package/src/embed/app.spec.ts +28 -0
  143. package/src/embed/app.ts +9 -1
  144. package/src/embed/hostEventClient/contracts.ts +10 -0
  145. package/src/embed/liveboard.spec.ts +30 -0
  146. package/src/embed/liveboard.ts +5 -0
  147. package/src/embed/search.ts +3 -1
  148. package/src/embed/ts-embed.spec.ts +221 -5
  149. package/src/embed/ts-embed.ts +129 -43
  150. package/src/errors.ts +1 -0
  151. package/src/index.ts +2 -0
  152. package/src/react/all-types-export.ts +1 -0
  153. package/src/types.ts +102 -3
  154. package/src/utils/processData.ts +11 -11
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.42.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.1-alpha.2 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -2005,6 +2005,21 @@
2005
2005
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2006
2006
  */
2007
2007
  EmbedEvent["OrgSwitched"] = "orgSwitched";
2008
+ /**
2009
+ * Emitted when the user intercepts a URL.
2010
+ *
2011
+ * Supported on all embed types.
2012
+ *
2013
+ * @example
2014
+ * ```js
2015
+ * embed.on(EmbedEvent.ApiIntercept, (payload) => {
2016
+ * console.log('payload', payload);
2017
+ * })
2018
+ * ```
2019
+ *
2020
+ * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
2021
+ */
2022
+ EmbedEvent["ApiIntercept"] = "ApiIntercept";
2008
2023
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
2009
2024
  /**
2010
2025
  * Event types that can be triggered by the host application
@@ -3446,6 +3461,7 @@
3446
3461
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3447
3462
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3448
3463
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3464
+ Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3449
3465
  })(Param || (Param = {}));
3450
3466
  /**
3451
3467
  * ThoughtSpot application pages include actions and menu commands
@@ -4871,7 +4887,29 @@
4871
4887
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4872
4888
  */
4873
4889
  LogLevel["TRACE"] = "TRACE";
4874
- })(exports.LogLevel || (exports.LogLevel = {}));
4890
+ })(exports.LogLevel || (exports.LogLevel = {}));
4891
+ /**
4892
+ * Enum for the type of API intercepted
4893
+ */
4894
+ exports.InterceptedApiType = void 0;
4895
+ (function (InterceptedApiType) {
4896
+ /**
4897
+ * The apis that are use to get the metadata for the embed
4898
+ */
4899
+ InterceptedApiType["METADATA"] = "METADATA";
4900
+ /**
4901
+ * The apis that are use to get the data for the embed
4902
+ */
4903
+ InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
4904
+ /**
4905
+ * This will intercept all the apis
4906
+ */
4907
+ InterceptedApiType["ALL"] = "ALL";
4908
+ /**
4909
+ * The apis that are use to get the data for the liveboard
4910
+ */
4911
+ InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
4912
+ })(exports.InterceptedApiType || (exports.InterceptedApiType = {}));
4875
4913
 
4876
4914
  const logFunctions = {
4877
4915
  [exports.LogLevel.SILENT]: () => undefined,
@@ -7217,6 +7255,17 @@
7217
7255
 
7218
7256
  var isEmpty_1 = isEmpty$1;
7219
7257
 
7258
+ exports.UIPassthroughEvent = void 0;
7259
+ (function (UIPassthroughEvent) {
7260
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7261
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7262
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7263
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7264
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7265
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7266
+ UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7267
+ })(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
7268
+
7220
7269
  const ERROR_MESSAGE = {
7221
7270
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7222
7271
  SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
@@ -7238,6 +7287,7 @@
7238
7287
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7239
7288
  RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
7240
7289
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7290
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7241
7291
  };
7242
7292
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7243
7293
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -17466,27 +17516,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17466
17516
  * @param thoughtSpotHost
17467
17517
  * @param containerEl
17468
17518
  */
17469
- function processEventData(type, e, thoughtSpotHost, containerEl) {
17519
+ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17470
17520
  switch (type) {
17471
17521
  case exports.EmbedEvent.CustomAction:
17472
- return processCustomAction(e, thoughtSpotHost);
17522
+ return processCustomAction(eventData, thoughtSpotHost);
17473
17523
  case exports.EmbedEvent.AuthInit:
17474
- return processAuthInit(e);
17524
+ return processAuthInit(eventData);
17475
17525
  case exports.EmbedEvent.NoCookieAccess:
17476
- return processNoCookieAccess(e, containerEl);
17526
+ return processNoCookieAccess(eventData, containerEl);
17477
17527
  case exports.EmbedEvent.AuthFailure:
17478
- return processAuthFailure(e, containerEl);
17528
+ return processAuthFailure(eventData, containerEl);
17479
17529
  case exports.EmbedEvent.AuthLogout:
17480
- return processAuthLogout(e, containerEl);
17530
+ return processAuthLogout(eventData, containerEl);
17481
17531
  case exports.EmbedEvent.ExitPresentMode:
17482
17532
  return processExitPresentMode();
17483
17533
  case exports.EmbedEvent.CLEAR_INFO_CACHE:
17484
17534
  return processClearInfoCache();
17485
17535
  }
17486
- return e;
17536
+ return eventData;
17487
17537
  }
17488
17538
 
17489
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.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/**","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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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":"^11.2.0","@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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
17539
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-alpha.2";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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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":"^11.2.0","@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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
17490
17540
 
17491
17541
  /**
17492
17542
  * Reloads the ThoughtSpot iframe.
@@ -17558,16 +17608,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17558
17608
  });
17559
17609
  }
17560
17610
 
17561
- exports.UIPassthroughEvent = void 0;
17562
- (function (UIPassthroughEvent) {
17563
- UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17564
- UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17565
- UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17566
- UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17567
- UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17568
- UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17569
- })(exports.UIPassthroughEvent || (exports.UIPassthroughEvent = {}));
17570
-
17571
17611
  class HostEventClient {
17572
17612
  constructor(iFrame) {
17573
17613
  this.iFrame = iFrame;
@@ -17659,6 +17699,107 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17659
17699
  }
17660
17700
  }
17661
17701
 
17702
+ const defaultUrls = {
17703
+ [exports.InterceptedApiType.METADATA]: [
17704
+ '/prism/?op=CreateAnswerSession',
17705
+ '/prism/?op=GetV2SourceDetail',
17706
+ ],
17707
+ [exports.InterceptedApiType.ANSWER_DATA]: [
17708
+ '/prism/?op=GetChartWithData',
17709
+ '/prism/?op=GetTableWithHeadlineData',
17710
+ ],
17711
+ [exports.InterceptedApiType.LIVEBOARD_DATA]: [
17712
+ '/prism/?op=LoadContextBook'
17713
+ ],
17714
+ };
17715
+ const formatInterceptUrl = (url) => {
17716
+ const host = getThoughtSpotHost(getEmbedConfig());
17717
+ if (url.startsWith('/'))
17718
+ return `${host}${url}`;
17719
+ return url;
17720
+ };
17721
+ const processInterceptUrls = (interceptUrls) => {
17722
+ let processedUrls = [...interceptUrls];
17723
+ Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
17724
+ if (!processedUrls.includes(apiType))
17725
+ return;
17726
+ processedUrls = processedUrls.filter(url => url !== apiType);
17727
+ processedUrls = [...processedUrls, ...apiTypeUrls];
17728
+ });
17729
+ return processedUrls.map(url => formatInterceptUrl(url));
17730
+ };
17731
+ const getInterceptInitData = (embedConfig, viewConfig) => {
17732
+ const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
17733
+ if (!enableApiIntercept)
17734
+ return {
17735
+ enableApiIntercept: false,
17736
+ };
17737
+ const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
17738
+ if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17739
+ combinedUrls.push(exports.InterceptedApiType.ANSWER_DATA);
17740
+ }
17741
+ const shouldInterceptAll = combinedUrls.includes(exports.InterceptedApiType.ALL);
17742
+ const interceptUrls = shouldInterceptAll ? [exports.InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17743
+ const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
17744
+ return {
17745
+ interceptUrls,
17746
+ interceptTimeout,
17747
+ enableApiIntercept,
17748
+ };
17749
+ };
17750
+ /**
17751
+ *
17752
+ * @param fetchInit
17753
+ */
17754
+ const parseInterceptData = (eventDataString) => {
17755
+ try {
17756
+ const { input, init } = JSON.parse(eventDataString);
17757
+ init.body = JSON.parse(init.body);
17758
+ const parsedInit = { input, init };
17759
+ return [parsedInit, null];
17760
+ }
17761
+ catch (error) {
17762
+ return [null, error];
17763
+ }
17764
+ };
17765
+ const handleInterceptEvent = async (params) => {
17766
+ var _a, _b, _c, _d, _e;
17767
+ const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17768
+ const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17769
+ if (bodyParseError) {
17770
+ executeEvent(exports.EmbedEvent.Error, {
17771
+ error: 'Error parsing api intercept body',
17772
+ });
17773
+ logger$3.error('Error parsing request body', bodyParseError);
17774
+ return;
17775
+ }
17776
+ const { input: requestUrl, init } = interceptData;
17777
+ const sessionId = (_c = (_b = (_a = init === null || init === void 0 ? void 0 : init.body) === null || _a === void 0 ? void 0 : _a.variables) === null || _b === void 0 ? void 0 : _b.session) === null || _c === void 0 ? void 0 : _c.sessionId;
17778
+ const vizId = (_e = (_d = init === null || init === void 0 ? void 0 : init.body) === null || _d === void 0 ? void 0 : _d.variables) === null || _e === void 0 ? void 0 : _e.contextBookId;
17779
+ if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17780
+ const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17781
+ executeEvent(exports.EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
17782
+ }
17783
+ executeEvent(exports.EmbedEvent.ApiIntercept, interceptData);
17784
+ };
17785
+ const processLegacyInterceptResponse = (payload) => {
17786
+ var _a, _b, _c;
17787
+ const title = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.errorText;
17788
+ const desc = (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.errorDescription;
17789
+ const payloadToSend = {
17790
+ execute: (_c = payload === null || payload === void 0 ? void 0 : payload.data) === null || _c === void 0 ? void 0 : _c.execute,
17791
+ errors: [
17792
+ {
17793
+ errorObj: {
17794
+ title,
17795
+ desc
17796
+ }
17797
+ }
17798
+ ],
17799
+ };
17800
+ return { data: payloadToSend };
17801
+ };
17802
+
17662
17803
  /**
17663
17804
  * Copyright (c) 2022
17664
17805
  *
@@ -17712,6 +17853,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17712
17853
  */
17713
17854
  this.fullscreenChangeHandler = null;
17714
17855
  this.subscribedListeners = {};
17856
+ this.messageEventListener = async (event) => {
17857
+ const eventType = this.getEventType(event);
17858
+ const eventPort = this.getEventPort(event);
17859
+ const eventData = this.formatEventData(event, eventType);
17860
+ if (event.source === this.iFrame.contentWindow) {
17861
+ const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
17862
+ const executeEvent = (_eventType, data) => {
17863
+ this.executeCallbacks(_eventType, data, eventPort);
17864
+ };
17865
+ if (eventType === exports.EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
17866
+ const getUnsavedAnswerTml = async (props) => {
17867
+ var _a;
17868
+ const response = await this.triggerUIPassThrough(exports.UIPassthroughEvent.GetUnsavedAnswerTML, props);
17869
+ return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
17870
+ };
17871
+ handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
17872
+ return;
17873
+ }
17874
+ this.executeCallbacks(eventType, processedEventData, eventPort);
17875
+ }
17876
+ };
17715
17877
  /**
17716
17878
  * Send Custom style as part of payload of APP_INIT
17717
17879
  * @param _
@@ -17796,6 +17958,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17796
17958
  this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17797
17959
  };
17798
17960
  this.showPreRenderByDefault = false;
17961
+ this.createEmbedEventResponder = (eventPort, eventType) => {
17962
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
17963
+ if (eventType === exports.EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
17964
+ return (payload) => {
17965
+ const payloadToSend = processLegacyInterceptResponse(payload);
17966
+ this.triggerEventOnPort(eventPort, payloadToSend);
17967
+ };
17968
+ }
17969
+ return (payload) => {
17970
+ this.triggerEventOnPort(eventPort, payload);
17971
+ };
17972
+ };
17799
17973
  /**
17800
17974
  * @hidden
17801
17975
  * Internal state to track if the embed container is loaded.
@@ -17956,39 +18130,61 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17956
18130
  return eventData;
17957
18131
  }
17958
18132
  /**
17959
- * Adds a global event listener to window for "message" events.
17960
- * ThoughtSpot detects if a particular event is targeted to this
17961
- * embed instance through an identifier contained in the payload,
17962
- * and executes the registered callbacks accordingly.
18133
+ * Subscribe to network events (online/offline) that should
18134
+ * work regardless of auth status
17963
18135
  */
17964
- subscribeToEvents() {
17965
- this.unsubscribeToEvents();
17966
- const messageEventListener = (event) => {
17967
- const eventType = this.getEventType(event);
17968
- const eventPort = this.getEventPort(event);
17969
- const eventData = this.formatEventData(event, eventType);
17970
- if (event.source === this.iFrame.contentWindow) {
17971
- this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17972
- }
17973
- };
17974
- window.addEventListener('message', messageEventListener);
18136
+ subscribeToNetworkEvents() {
18137
+ this.unsubscribeToNetworkEvents();
17975
18138
  const onlineEventListener = (e) => {
17976
18139
  this.trigger(exports.HostEvent.Reload);
17977
18140
  };
17978
18141
  window.addEventListener('online', onlineEventListener);
17979
18142
  const offlineEventListener = (e) => {
17980
- const offlineWarning = 'Network not Detected. Embed is offline. Please reconnect and refresh';
18143
+ const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
17981
18144
  this.executeCallbacks(exports.EmbedEvent.Error, {
17982
18145
  offlineWarning,
17983
18146
  });
17984
18147
  logger$3.warn(offlineWarning);
17985
18148
  };
17986
18149
  window.addEventListener('offline', offlineEventListener);
17987
- this.subscribedListeners = {
17988
- message: messageEventListener,
17989
- online: onlineEventListener,
17990
- offline: offlineEventListener,
17991
- };
18150
+ this.subscribedListeners.online = onlineEventListener;
18151
+ this.subscribedListeners.offline = offlineEventListener;
18152
+ }
18153
+ /**
18154
+ * Subscribe to message events that depend on successful iframe setup
18155
+ */
18156
+ subscribeToMessageEvents() {
18157
+ this.unsubscribeToMessageEvents();
18158
+ window.addEventListener('message', this.messageEventListener);
18159
+ this.subscribedListeners.message = this.messageEventListener;
18160
+ }
18161
+ /**
18162
+ * Adds event listeners for both network and message events.
18163
+ * This maintains backward compatibility with the existing method.
18164
+ * Adds a global event listener to window for "message" events.
18165
+ * ThoughtSpot detects if a particular event is targeted to this
18166
+ * embed instance through an identifier contained in the payload,
18167
+ * and executes the registered callbacks accordingly.
18168
+ */
18169
+ subscribeToEvents() {
18170
+ this.subscribeToNetworkEvents();
18171
+ this.subscribeToMessageEvents();
18172
+ }
18173
+ unsubscribeToNetworkEvents() {
18174
+ if (this.subscribedListeners.online) {
18175
+ window.removeEventListener('online', this.subscribedListeners.online);
18176
+ delete this.subscribedListeners.online;
18177
+ }
18178
+ if (this.subscribedListeners.offline) {
18179
+ window.removeEventListener('offline', this.subscribedListeners.offline);
18180
+ delete this.subscribedListeners.offline;
18181
+ }
18182
+ }
18183
+ unsubscribeToMessageEvents() {
18184
+ if (this.subscribedListeners.message) {
18185
+ window.removeEventListener('message', this.subscribedListeners.message);
18186
+ delete this.subscribedListeners.message;
18187
+ }
17992
18188
  }
17993
18189
  unsubscribeToEvents() {
17994
18190
  Object.keys(this.subscribedListeners).forEach((key) => {
@@ -18021,7 +18217,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18021
18217
  message: customActionsResult.errors,
18022
18218
  });
18023
18219
  }
18024
- return {
18220
+ const baseInitData = {
18025
18221
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
18026
18222
  authToken,
18027
18223
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18039,7 +18235,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18039
18235
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18040
18236
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18041
18237
  customActions: customActionsResult.actions,
18238
+ ...getInterceptInitData(this.embedConfig, this.viewConfig),
18042
18239
  };
18240
+ return baseInitData;
18043
18241
  }
18044
18242
  async getAppInitData() {
18045
18243
  return this.getDefaultAppInitData();
@@ -18289,6 +18487,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18289
18487
  type: exports.EmbedEvent.Init,
18290
18488
  });
18291
18489
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
18490
+ // Always subscribe to network events, regardless of auth status
18491
+ this.subscribeToNetworkEvents();
18292
18492
  return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
18293
18493
  if (!isLoggedIn) {
18294
18494
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
@@ -18331,7 +18531,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18331
18531
  el.remove();
18332
18532
  });
18333
18533
  }
18334
- this.subscribeToEvents();
18534
+ // Subscribe to message events only after successful
18535
+ // auth and iframe setup
18536
+ this.subscribeToMessageEvents();
18335
18537
  }).catch((error) => {
18336
18538
  nextInQueue();
18337
18539
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
@@ -18464,9 +18666,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18464
18666
  // When start status is false it trigger only end releated
18465
18667
  // payload
18466
18668
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18467
- callbackObj.callback(data, (payload) => {
18468
- this.triggerEventOnPort(eventPort, payload);
18469
- });
18669
+ const responder = this.createEmbedEventResponder(eventPort, eventType);
18670
+ callbackObj.callback(data, responder);
18470
18671
  }
18471
18672
  });
18472
18673
  }
@@ -18651,6 +18852,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18651
18852
  this.handleError('Host event type is undefined');
18652
18853
  return null;
18653
18854
  }
18855
+ // Check if iframe exists before triggering -
18856
+ // this prevents the error when auth fails
18857
+ if (!this.iFrame) {
18858
+ logger$3.debug(`Cannot trigger ${messageType} - iframe not available (likely due to auth failure)`);
18859
+ return null;
18860
+ }
18654
18861
  // send an empty object, this is needed for liveboard default handlers
18655
18862
  return this.hostEventClient.triggerHostEvent(messageType, data);
18656
18863
  }
@@ -19170,7 +19377,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19170
19377
  * embedded Liveboard or visualization.
19171
19378
  */
19172
19379
  getEmbedParams() {
19173
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, } = this.viewConfig;
19380
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19174
19381
  let params = {};
19175
19382
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19176
19383
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19223,7 +19430,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19223
19430
  if (enableAskSage) {
19224
19431
  params[Param.enableAskSage] = enableAskSage;
19225
19432
  }
19226
- if (isOnBeforeGetVizDataInterceptEnabled) {
19433
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19434
+ if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19227
19435
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19228
19436
  }
19229
19437
  if (homePageSearchBarMode) {
@@ -19238,6 +19446,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19238
19446
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19239
19447
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19240
19448
  }
19449
+ if (isLinkParametersEnabled !== undefined) {
19450
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19451
+ }
19241
19452
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19242
19453
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19243
19454
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -19592,7 +19803,7 @@ query GetEurekaVizSnapshots(
19592
19803
  getEmbedParamsObject() {
19593
19804
  let params = {};
19594
19805
  params = this.getBaseQueryParams(params);
19595
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
19806
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isLinkParametersEnabled, } = this.viewConfig;
19596
19807
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
19597
19808
  || this.viewConfig.preventPinboardFilterRemoval;
19598
19809
  if (fullHeight === true) {
@@ -19657,6 +19868,9 @@ query GetEurekaVizSnapshots(
19657
19868
  if (showSpotterLimitations !== undefined) {
19658
19869
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
19659
19870
  }
19871
+ if (isLinkParametersEnabled !== undefined) {
19872
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19873
+ }
19660
19874
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19661
19875
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19662
19876
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
@@ -19943,7 +20157,8 @@ query GetEurekaVizSnapshots(
19943
20157
  if (hideSearchBar) {
19944
20158
  queryParams[Param.HideSearchBar] = true;
19945
20159
  }
19946
- if (isOnBeforeGetVizDataInterceptEnabled) {
20160
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
20161
+ if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19947
20162
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19948
20163
  }
19949
20164
  if (!focusSearchBarOnRender) {