@thoughtspot/visual-embed-sdk 1.42.0 → 1.42.1-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 (139) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/api-intercept.d.ts +25 -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/embed/app.d.ts.map +1 -1
  7. package/cjs/src/embed/app.js +7 -2
  8. package/cjs/src/embed/app.js.map +1 -1
  9. package/cjs/src/embed/app.spec.js +20 -0
  10. package/cjs/src/embed/app.spec.js.map +1 -1
  11. package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
  12. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  13. package/cjs/src/embed/hostEventClient/contracts.js +1 -0
  14. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  15. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  16. package/cjs/src/embed/liveboard.js +4 -1
  17. package/cjs/src/embed/liveboard.js.map +1 -1
  18. package/cjs/src/embed/liveboard.spec.js +22 -0
  19. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  20. package/cjs/src/embed/search.d.ts.map +1 -1
  21. package/cjs/src/embed/search.js +3 -1
  22. package/cjs/src/embed/search.js.map +1 -1
  23. package/cjs/src/embed/ts-embed.d.ts +15 -0
  24. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  25. package/cjs/src/embed/ts-embed.js +94 -26
  26. package/cjs/src/embed/ts-embed.js.map +1 -1
  27. package/cjs/src/embed/ts-embed.spec.js +83 -0
  28. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  29. package/cjs/src/errors.d.ts +1 -0
  30. package/cjs/src/errors.d.ts.map +1 -1
  31. package/cjs/src/errors.js +1 -0
  32. package/cjs/src/errors.js.map +1 -1
  33. package/cjs/src/index.d.ts +2 -2
  34. package/cjs/src/index.d.ts.map +1 -1
  35. package/cjs/src/index.js +2 -1
  36. package/cjs/src/index.js.map +1 -1
  37. package/cjs/src/react/all-types-export.d.ts +1 -1
  38. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  39. package/cjs/src/react/all-types-export.js +2 -1
  40. package/cjs/src/react/all-types-export.js.map +1 -1
  41. package/cjs/src/types.d.ts +100 -4
  42. package/cjs/src/types.d.ts.map +1 -1
  43. package/cjs/src/types.js +39 -1
  44. package/cjs/src/types.js.map +1 -1
  45. package/cjs/src/utils/processData.d.ts +1 -1
  46. package/cjs/src/utils/processData.d.ts.map +1 -1
  47. package/cjs/src/utils/processData.js +8 -8
  48. package/cjs/src/utils/processData.js.map +1 -1
  49. package/dist/index-BEzW4MDA.js +7371 -0
  50. package/dist/{index-BpSohedu.js → index-DvNA626T.js} +1 -1
  51. package/dist/src/api-intercept.d.ts +25 -0
  52. package/dist/src/api-intercept.d.ts.map +1 -0
  53. package/dist/src/embed/app.d.ts.map +1 -1
  54. package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
  55. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  56. package/dist/src/embed/liveboard.d.ts.map +1 -1
  57. package/dist/src/embed/search.d.ts.map +1 -1
  58. package/dist/src/embed/ts-embed.d.ts +15 -0
  59. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  60. package/dist/src/errors.d.ts +1 -0
  61. package/dist/src/errors.d.ts.map +1 -1
  62. package/dist/src/index.d.ts +2 -2
  63. package/dist/src/index.d.ts.map +1 -1
  64. package/dist/src/react/all-types-export.d.ts +1 -1
  65. package/dist/src/react/all-types-export.d.ts.map +1 -1
  66. package/dist/src/types.d.ts +100 -4
  67. package/dist/src/types.d.ts.map +1 -1
  68. package/dist/src/utils/processData.d.ts +1 -1
  69. package/dist/src/utils/processData.d.ts.map +1 -1
  70. package/dist/tsembed-react.es.js +266 -51
  71. package/dist/tsembed-react.js +265 -50
  72. package/dist/tsembed.es.js +267 -52
  73. package/dist/tsembed.js +265 -50
  74. package/dist/visual-embed-sdk-react-full.d.ts +124 -4
  75. package/dist/visual-embed-sdk-react.d.ts +121 -4
  76. package/dist/visual-embed-sdk.d.ts +124 -4
  77. package/lib/package.json +2 -2
  78. package/lib/src/api-intercept.d.ts +25 -0
  79. package/lib/src/api-intercept.d.ts.map +1 -0
  80. package/lib/src/api-intercept.js +108 -0
  81. package/lib/src/api-intercept.js.map +1 -0
  82. package/lib/src/embed/app.d.ts.map +1 -1
  83. package/lib/src/embed/app.js +7 -2
  84. package/lib/src/embed/app.js.map +1 -1
  85. package/lib/src/embed/app.spec.js +20 -0
  86. package/lib/src/embed/app.spec.js.map +1 -1
  87. package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
  88. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  89. package/lib/src/embed/hostEventClient/contracts.js +1 -0
  90. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  91. package/lib/src/embed/liveboard.d.ts.map +1 -1
  92. package/lib/src/embed/liveboard.js +4 -1
  93. package/lib/src/embed/liveboard.js.map +1 -1
  94. package/lib/src/embed/liveboard.spec.js +22 -0
  95. package/lib/src/embed/liveboard.spec.js.map +1 -1
  96. package/lib/src/embed/search.d.ts.map +1 -1
  97. package/lib/src/embed/search.js +3 -1
  98. package/lib/src/embed/search.js.map +1 -1
  99. package/lib/src/embed/ts-embed.d.ts +15 -0
  100. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  101. package/lib/src/embed/ts-embed.js +94 -26
  102. package/lib/src/embed/ts-embed.js.map +1 -1
  103. package/lib/src/embed/ts-embed.spec.js +83 -0
  104. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  105. package/lib/src/errors.d.ts +1 -0
  106. package/lib/src/errors.d.ts.map +1 -1
  107. package/lib/src/errors.js +1 -0
  108. package/lib/src/errors.js.map +1 -1
  109. package/lib/src/index.d.ts +2 -2
  110. package/lib/src/index.d.ts.map +1 -1
  111. package/lib/src/index.js +2 -2
  112. package/lib/src/index.js.map +1 -1
  113. package/lib/src/react/all-types-export.d.ts +1 -1
  114. package/lib/src/react/all-types-export.d.ts.map +1 -1
  115. package/lib/src/react/all-types-export.js +1 -1
  116. package/lib/src/react/all-types-export.js.map +1 -1
  117. package/lib/src/types.d.ts +100 -4
  118. package/lib/src/types.d.ts.map +1 -1
  119. package/lib/src/types.js +38 -0
  120. package/lib/src/types.js.map +1 -1
  121. package/lib/src/utils/processData.d.ts +1 -1
  122. package/lib/src/utils/processData.d.ts.map +1 -1
  123. package/lib/src/utils/processData.js +8 -8
  124. package/lib/src/utils/processData.js.map +1 -1
  125. package/package.json +2 -2
  126. package/src/api-intercept.ts +134 -0
  127. package/src/embed/app.spec.ts +28 -0
  128. package/src/embed/app.ts +9 -1
  129. package/src/embed/hostEventClient/contracts.ts +10 -0
  130. package/src/embed/liveboard.spec.ts +30 -0
  131. package/src/embed/liveboard.ts +5 -0
  132. package/src/embed/search.ts +3 -1
  133. package/src/embed/ts-embed.spec.ts +116 -5
  134. package/src/embed/ts-embed.ts +129 -43
  135. package/src/errors.ts +1 -0
  136. package/src/index.ts +2 -0
  137. package/src/react/all-types-export.ts +1 -0
  138. package/src/types.ts +102 -3
  139. package/src/utils/processData.ts +11 -11
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.42.0 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.42.1-alpha.1 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1719,6 +1719,21 @@
1719
1719
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
1720
1720
  */
1721
1721
  EmbedEvent["OrgSwitched"] = "orgSwitched";
1722
+ /**
1723
+ * Emitted when the user intercepts a URL.
1724
+ *
1725
+ * Supported on all embed types.
1726
+ *
1727
+ * @example
1728
+ * ```js
1729
+ * embed.on(EmbedEvent.ApiIntercept, (payload) => {
1730
+ * console.log('payload', payload);
1731
+ * })
1732
+ * ```
1733
+ *
1734
+ * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl
1735
+ */
1736
+ EmbedEvent["ApiIntercept"] = "ApiIntercept";
1722
1737
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
1723
1738
  /**
1724
1739
  * Event types that can be triggered by the host application
@@ -3160,6 +3175,7 @@
3160
3175
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3161
3176
  Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3162
3177
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3178
+ Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3163
3179
  })(Param || (Param = {}));
3164
3180
  /**
3165
3181
  * ThoughtSpot application pages include actions and menu commands
@@ -4585,7 +4601,29 @@
4585
4601
  * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl
4586
4602
  */
4587
4603
  LogLevel["TRACE"] = "TRACE";
4588
- })(exports.LogLevel || (exports.LogLevel = {}));
4604
+ })(exports.LogLevel || (exports.LogLevel = {}));
4605
+ /**
4606
+ * Enum for the type of API intercepted
4607
+ */
4608
+ var InterceptedApiType;
4609
+ (function (InterceptedApiType) {
4610
+ /**
4611
+ * The apis that are use to get the metadata for the embed
4612
+ */
4613
+ InterceptedApiType["METADATA"] = "METADATA";
4614
+ /**
4615
+ * The apis that are use to get the data for the embed
4616
+ */
4617
+ InterceptedApiType["ANSWER_DATA"] = "ANSWER_DATA";
4618
+ /**
4619
+ * This will intercept all the apis
4620
+ */
4621
+ InterceptedApiType["ALL"] = "ALL";
4622
+ /**
4623
+ * The apis that are use to get the data for the liveboard
4624
+ */
4625
+ InterceptedApiType["LIVEBOARD_DATA"] = "LIVEBOARD_DATA";
4626
+ })(InterceptedApiType || (InterceptedApiType = {}));
4589
4627
 
4590
4628
  const logFunctions = {
4591
4629
  [exports.LogLevel.SILENT]: () => undefined,
@@ -7348,6 +7386,17 @@
7348
7386
 
7349
7387
  var isEmpty_1 = isEmpty$1;
7350
7388
 
7389
+ var UIPassthroughEvent;
7390
+ (function (UIPassthroughEvent) {
7391
+ UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
7392
+ UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
7393
+ UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
7394
+ UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
7395
+ UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
7396
+ UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
7397
+ UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
7398
+ })(UIPassthroughEvent || (UIPassthroughEvent = {}));
7399
+
7351
7400
  const ERROR_MESSAGE = {
7352
7401
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
7353
7402
  SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
@@ -7369,6 +7418,7 @@
7369
7418
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7370
7419
  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',
7371
7420
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7421
+ OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7372
7422
  };
7373
7423
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7374
7424
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -17431,27 +17481,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17431
17481
  * @param thoughtSpotHost
17432
17482
  * @param containerEl
17433
17483
  */
17434
- function processEventData(type, e, thoughtSpotHost, containerEl) {
17484
+ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
17435
17485
  switch (type) {
17436
17486
  case exports.EmbedEvent.CustomAction:
17437
- return processCustomAction(e, thoughtSpotHost);
17487
+ return processCustomAction(eventData, thoughtSpotHost);
17438
17488
  case exports.EmbedEvent.AuthInit:
17439
- return processAuthInit(e);
17489
+ return processAuthInit(eventData);
17440
17490
  case exports.EmbedEvent.NoCookieAccess:
17441
- return processNoCookieAccess(e, containerEl);
17491
+ return processNoCookieAccess(eventData, containerEl);
17442
17492
  case exports.EmbedEvent.AuthFailure:
17443
- return processAuthFailure(e, containerEl);
17493
+ return processAuthFailure(eventData, containerEl);
17444
17494
  case exports.EmbedEvent.AuthLogout:
17445
- return processAuthLogout(e, containerEl);
17495
+ return processAuthLogout(eventData, containerEl);
17446
17496
  case exports.EmbedEvent.ExitPresentMode:
17447
17497
  return processExitPresentMode();
17448
17498
  case exports.EmbedEvent.CLEAR_INFO_CACHE:
17449
17499
  return processClearInfoCache();
17450
17500
  }
17451
- return e;
17501
+ return eventData;
17452
17502
  }
17453
17503
 
17454
- 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};
17504
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.42.1-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 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};
17455
17505
 
17456
17506
  /**
17457
17507
  * Reloads the ThoughtSpot iframe.
@@ -17523,16 +17573,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17523
17573
  });
17524
17574
  }
17525
17575
 
17526
- var UIPassthroughEvent;
17527
- (function (UIPassthroughEvent) {
17528
- UIPassthroughEvent["PinAnswerToLiveboard"] = "addVizToPinboard";
17529
- UIPassthroughEvent["SaveAnswer"] = "saveAnswer";
17530
- UIPassthroughEvent["GetDiscoverabilityStatus"] = "getDiscoverabilityStatus";
17531
- UIPassthroughEvent["GetAvailableUIPassthroughs"] = "getAvailableUiPassthroughs";
17532
- UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
17533
- UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
17534
- })(UIPassthroughEvent || (UIPassthroughEvent = {}));
17535
-
17536
17576
  class HostEventClient {
17537
17577
  constructor(iFrame) {
17538
17578
  this.iFrame = iFrame;
@@ -17624,6 +17664,107 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17624
17664
  }
17625
17665
  }
17626
17666
 
17667
+ const defaultUrls = {
17668
+ [InterceptedApiType.METADATA]: [
17669
+ '/prism/?op=CreateAnswerSession',
17670
+ '/prism/?op=GetV2SourceDetail',
17671
+ ],
17672
+ [InterceptedApiType.ANSWER_DATA]: [
17673
+ '/prism/?op=GetChartWithData',
17674
+ '/prism/?op=GetTableWithHeadlineData',
17675
+ ],
17676
+ [InterceptedApiType.LIVEBOARD_DATA]: [
17677
+ '/prism/?op=LoadContextBook'
17678
+ ],
17679
+ };
17680
+ const formatInterceptUrl = (url) => {
17681
+ const host = getThoughtSpotHost(getEmbedConfig());
17682
+ if (url.startsWith('/'))
17683
+ return `${host}${url}`;
17684
+ return url;
17685
+ };
17686
+ const processInterceptUrls = (interceptUrls) => {
17687
+ let processedUrls = [...interceptUrls];
17688
+ Object.entries(defaultUrls).forEach(([apiType, apiTypeUrls]) => {
17689
+ if (!processedUrls.includes(apiType))
17690
+ return;
17691
+ processedUrls = processedUrls.filter(url => url !== apiType);
17692
+ processedUrls = [...processedUrls, ...apiTypeUrls];
17693
+ });
17694
+ return processedUrls.map(url => formatInterceptUrl(url));
17695
+ };
17696
+ const getInterceptInitData = (embedConfig, viewConfig) => {
17697
+ const enableApiIntercept = (embedConfig.enableApiIntercept || viewConfig.enableApiIntercept) && (viewConfig.enableApiIntercept !== false);
17698
+ if (!enableApiIntercept)
17699
+ return {
17700
+ enableApiIntercept: false,
17701
+ };
17702
+ const combinedUrls = [...(embedConfig.interceptUrls || []), ...(viewConfig.interceptUrls || [])];
17703
+ if (viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17704
+ combinedUrls.push(InterceptedApiType.ANSWER_DATA);
17705
+ }
17706
+ const shouldInterceptAll = combinedUrls.includes(InterceptedApiType.ALL);
17707
+ const interceptUrls = shouldInterceptAll ? [InterceptedApiType.ALL] : processInterceptUrls(combinedUrls);
17708
+ const interceptTimeout = embedConfig.interceptTimeout || viewConfig.interceptTimeout;
17709
+ return {
17710
+ interceptUrls,
17711
+ interceptTimeout,
17712
+ enableApiIntercept,
17713
+ };
17714
+ };
17715
+ /**
17716
+ *
17717
+ * @param fetchInit
17718
+ */
17719
+ const parseInterceptData = (eventDataString) => {
17720
+ try {
17721
+ const { input, init } = JSON.parse(eventDataString);
17722
+ init.body = JSON.parse(init.body);
17723
+ const parsedInit = { input, init };
17724
+ return [parsedInit, null];
17725
+ }
17726
+ catch (error) {
17727
+ return [null, error];
17728
+ }
17729
+ };
17730
+ const handleInterceptEvent = async (params) => {
17731
+ var _a, _b, _c, _d, _e;
17732
+ const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17733
+ const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17734
+ if (bodyParseError) {
17735
+ executeEvent(exports.EmbedEvent.Error, {
17736
+ error: 'Error parsing api intercept body',
17737
+ });
17738
+ logger$3.error('Error parsing request body', bodyParseError);
17739
+ return;
17740
+ }
17741
+ const { input: requestUrl, init } = interceptData;
17742
+ 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;
17743
+ 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;
17744
+ if (defaultUrls.ANSWER_DATA.includes(requestUrl) && viewConfig.isOnBeforeGetVizDataInterceptEnabled) {
17745
+ const answerTml = await getUnsavedAnswerTml({ sessionId, vizId });
17746
+ executeEvent(exports.EmbedEvent.OnBeforeGetVizDataIntercept, { data: { data: answerTml } });
17747
+ }
17748
+ executeEvent(exports.EmbedEvent.ApiIntercept, interceptData);
17749
+ };
17750
+ const processLegacyInterceptResponse = (payload) => {
17751
+ var _a, _b;
17752
+ const title = (_a = payload === null || payload === void 0 ? void 0 : payload.data) === null || _a === void 0 ? void 0 : _a.errorText;
17753
+ const desc = (_b = payload === null || payload === void 0 ? void 0 : payload.data) === null || _b === void 0 ? void 0 : _b.errorDescription;
17754
+ const payloadToSend = [{
17755
+ data: {},
17756
+ errors: [
17757
+ {
17758
+ errorObj: {
17759
+ title,
17760
+ desc
17761
+ }
17762
+ }
17763
+ ],
17764
+ }];
17765
+ return payloadToSend;
17766
+ };
17767
+
17627
17768
  /**
17628
17769
  * Copyright (c) 2022
17629
17770
  *
@@ -17677,6 +17818,27 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17677
17818
  */
17678
17819
  this.fullscreenChangeHandler = null;
17679
17820
  this.subscribedListeners = {};
17821
+ this.messageEventListener = async (event) => {
17822
+ const eventType = this.getEventType(event);
17823
+ const eventPort = this.getEventPort(event);
17824
+ const eventData = this.formatEventData(event, eventType);
17825
+ if (event.source === this.iFrame.contentWindow) {
17826
+ const processedEventData = await processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el);
17827
+ const executeEvent = (_eventType, data) => {
17828
+ this.executeCallbacks(_eventType, data, eventPort);
17829
+ };
17830
+ if (eventType === exports.EmbedEvent.ApiIntercept && this.viewConfig.enableApiIntercept) {
17831
+ const getUnsavedAnswerTml = async (props) => {
17832
+ var _a;
17833
+ const response = await this.triggerUIPassThrough(UIPassthroughEvent.GetUnsavedAnswerTML, props);
17834
+ return (_a = response[0]) === null || _a === void 0 ? void 0 : _a.value;
17835
+ };
17836
+ handleInterceptEvent({ eventData: processedEventData, executeEvent, embedConfig: this.embedConfig, viewConfig: this.viewConfig, getUnsavedAnswerTml });
17837
+ return;
17838
+ }
17839
+ this.executeCallbacks(eventType, processedEventData, eventPort);
17840
+ }
17841
+ };
17680
17842
  /**
17681
17843
  * Send Custom style as part of payload of APP_INIT
17682
17844
  * @param _
@@ -17761,6 +17923,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17761
17923
  this.on(exports.EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
17762
17924
  };
17763
17925
  this.showPreRenderByDefault = false;
17926
+ this.createEmbedEventResponder = (eventPort, eventType) => {
17927
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
17928
+ if (eventType === exports.EmbedEvent.OnBeforeGetVizDataIntercept && enableApiIntercept) {
17929
+ return (payload) => {
17930
+ const payloadToSend = processLegacyInterceptResponse(payload);
17931
+ this.triggerEventOnPort(eventPort, payloadToSend);
17932
+ };
17933
+ }
17934
+ return (payload) => {
17935
+ this.triggerEventOnPort(eventPort, payload);
17936
+ };
17937
+ };
17764
17938
  /**
17765
17939
  * @hidden
17766
17940
  * Internal state to track if the embed container is loaded.
@@ -17921,39 +18095,61 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17921
18095
  return eventData;
17922
18096
  }
17923
18097
  /**
17924
- * Adds a global event listener to window for "message" events.
17925
- * ThoughtSpot detects if a particular event is targeted to this
17926
- * embed instance through an identifier contained in the payload,
17927
- * and executes the registered callbacks accordingly.
18098
+ * Subscribe to network events (online/offline) that should
18099
+ * work regardless of auth status
17928
18100
  */
17929
- subscribeToEvents() {
17930
- this.unsubscribeToEvents();
17931
- const messageEventListener = (event) => {
17932
- const eventType = this.getEventType(event);
17933
- const eventPort = this.getEventPort(event);
17934
- const eventData = this.formatEventData(event, eventType);
17935
- if (event.source === this.iFrame.contentWindow) {
17936
- this.executeCallbacks(eventType, processEventData(eventType, eventData, this.thoughtSpotHost, this.isPreRendered ? this.preRenderWrapper : this.el), eventPort);
17937
- }
17938
- };
17939
- window.addEventListener('message', messageEventListener);
18101
+ subscribeToNetworkEvents() {
18102
+ this.unsubscribeToNetworkEvents();
17940
18103
  const onlineEventListener = (e) => {
17941
18104
  this.trigger(exports.HostEvent.Reload);
17942
18105
  };
17943
18106
  window.addEventListener('online', onlineEventListener);
17944
18107
  const offlineEventListener = (e) => {
17945
- const offlineWarning = 'Network not Detected. Embed is offline. Please reconnect and refresh';
18108
+ const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
17946
18109
  this.executeCallbacks(exports.EmbedEvent.Error, {
17947
18110
  offlineWarning,
17948
18111
  });
17949
18112
  logger$3.warn(offlineWarning);
17950
18113
  };
17951
18114
  window.addEventListener('offline', offlineEventListener);
17952
- this.subscribedListeners = {
17953
- message: messageEventListener,
17954
- online: onlineEventListener,
17955
- offline: offlineEventListener,
17956
- };
18115
+ this.subscribedListeners.online = onlineEventListener;
18116
+ this.subscribedListeners.offline = offlineEventListener;
18117
+ }
18118
+ /**
18119
+ * Subscribe to message events that depend on successful iframe setup
18120
+ */
18121
+ subscribeToMessageEvents() {
18122
+ this.unsubscribeToMessageEvents();
18123
+ window.addEventListener('message', this.messageEventListener);
18124
+ this.subscribedListeners.message = this.messageEventListener;
18125
+ }
18126
+ /**
18127
+ * Adds event listeners for both network and message events.
18128
+ * This maintains backward compatibility with the existing method.
18129
+ * Adds a global event listener to window for "message" events.
18130
+ * ThoughtSpot detects if a particular event is targeted to this
18131
+ * embed instance through an identifier contained in the payload,
18132
+ * and executes the registered callbacks accordingly.
18133
+ */
18134
+ subscribeToEvents() {
18135
+ this.subscribeToNetworkEvents();
18136
+ this.subscribeToMessageEvents();
18137
+ }
18138
+ unsubscribeToNetworkEvents() {
18139
+ if (this.subscribedListeners.online) {
18140
+ window.removeEventListener('online', this.subscribedListeners.online);
18141
+ delete this.subscribedListeners.online;
18142
+ }
18143
+ if (this.subscribedListeners.offline) {
18144
+ window.removeEventListener('offline', this.subscribedListeners.offline);
18145
+ delete this.subscribedListeners.offline;
18146
+ }
18147
+ }
18148
+ unsubscribeToMessageEvents() {
18149
+ if (this.subscribedListeners.message) {
18150
+ window.removeEventListener('message', this.subscribedListeners.message);
18151
+ delete this.subscribedListeners.message;
18152
+ }
17957
18153
  }
17958
18154
  unsubscribeToEvents() {
17959
18155
  Object.keys(this.subscribedListeners).forEach((key) => {
@@ -17986,7 +18182,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17986
18182
  message: customActionsResult.errors,
17987
18183
  });
17988
18184
  }
17989
- return {
18185
+ const baseInitData = {
17990
18186
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
17991
18187
  authToken,
17992
18188
  runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
@@ -18004,7 +18200,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18004
18200
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18005
18201
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18006
18202
  customActions: customActionsResult.actions,
18203
+ ...getInterceptInitData(this.embedConfig, this.viewConfig),
18007
18204
  };
18205
+ return baseInitData;
18008
18206
  }
18009
18207
  async getAppInitData() {
18010
18208
  return this.getDefaultAppInitData();
@@ -18254,6 +18452,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18254
18452
  type: exports.EmbedEvent.Init,
18255
18453
  });
18256
18454
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
18455
+ // Always subscribe to network events, regardless of auth status
18456
+ this.subscribeToNetworkEvents();
18257
18457
  return (_a = getAuthPromise()) === null || _a === void 0 ? void 0 : _a.then((isLoggedIn) => {
18258
18458
  if (!isLoggedIn) {
18259
18459
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
@@ -18296,7 +18496,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18296
18496
  el.remove();
18297
18497
  });
18298
18498
  }
18299
- this.subscribeToEvents();
18499
+ // Subscribe to message events only after successful
18500
+ // auth and iframe setup
18501
+ this.subscribeToMessageEvents();
18300
18502
  }).catch((error) => {
18301
18503
  nextInQueue();
18302
18504
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_FAILED, {
@@ -18429,9 +18631,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18429
18631
  // When start status is false it trigger only end releated
18430
18632
  // payload
18431
18633
  || (!callbackObj.options.start && dataStatus === embedEventStatus.END)) {
18432
- callbackObj.callback(data, (payload) => {
18433
- this.triggerEventOnPort(eventPort, payload);
18434
- });
18634
+ const responder = this.createEmbedEventResponder(eventPort, eventType);
18635
+ callbackObj.callback(data, responder);
18435
18636
  }
18436
18637
  });
18437
18638
  }
@@ -18616,6 +18817,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18616
18817
  this.handleError('Host event type is undefined');
18617
18818
  return null;
18618
18819
  }
18820
+ // Check if iframe exists before triggering -
18821
+ // this prevents the error when auth fails
18822
+ if (!this.iFrame) {
18823
+ logger$3.debug(`Cannot trigger ${messageType} - iframe not available (likely due to auth failure)`);
18824
+ return null;
18825
+ }
18619
18826
  // send an empty object, this is needed for liveboard default handlers
18620
18827
  return this.hostEventClient.triggerHostEvent(messageType, data);
18621
18828
  }
@@ -19209,7 +19416,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19209
19416
  if (hideSearchBar) {
19210
19417
  queryParams[Param.HideSearchBar] = true;
19211
19418
  }
19212
- if (isOnBeforeGetVizDataInterceptEnabled) {
19419
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19420
+ if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19213
19421
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19214
19422
  }
19215
19423
  if (!focusSearchBarOnRender) {
@@ -19470,7 +19678,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19470
19678
  * embedded Liveboard or visualization.
19471
19679
  */
19472
19680
  getEmbedParams() {
19473
- 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 = 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;
19681
+ 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 = 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;
19474
19682
  let params = {};
19475
19683
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19476
19684
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19523,7 +19731,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19523
19731
  if (enableAskSage) {
19524
19732
  params[Param.enableAskSage] = enableAskSage;
19525
19733
  }
19526
- if (isOnBeforeGetVizDataInterceptEnabled) {
19734
+ const { enableApiIntercept } = getInterceptInitData(this.embedConfig, this.viewConfig);
19735
+ if (isOnBeforeGetVizDataInterceptEnabled && !enableApiIntercept) {
19527
19736
  params[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
19528
19737
  }
19529
19738
  if (homePageSearchBarMode) {
@@ -19538,6 +19747,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19538
19747
  if (isPNGInScheduledEmailsEnabled !== undefined) {
19539
19748
  params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19540
19749
  }
19750
+ if (isLinkParametersEnabled !== undefined) {
19751
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
19752
+ }
19541
19753
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19542
19754
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19543
19755
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -19892,7 +20104,7 @@ query GetEurekaVizSnapshots(
19892
20104
  getEmbedParamsObject() {
19893
20105
  let params = {};
19894
20106
  params = this.getBaseQueryParams(params);
19895
- 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;
20107
+ 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;
19896
20108
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
19897
20109
  || this.viewConfig.preventPinboardFilterRemoval;
19898
20110
  if (fullHeight === true) {
@@ -19957,6 +20169,9 @@ query GetEurekaVizSnapshots(
19957
20169
  if (showSpotterLimitations !== undefined) {
19958
20170
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
19959
20171
  }
20172
+ if (isLinkParametersEnabled !== undefined) {
20173
+ params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20174
+ }
19960
20175
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19961
20176
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
19962
20177
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;