@thoughtspot/visual-embed-sdk 1.45.3-mcp.2 → 1.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/auth.d.ts +35 -2
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +35 -2
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/embed/app.d.ts.map +1 -1
  7. package/cjs/src/embed/app.js +5 -5
  8. package/cjs/src/embed/app.js.map +1 -1
  9. package/cjs/src/embed/app.spec.js +87 -119
  10. package/cjs/src/embed/app.spec.js.map +1 -1
  11. package/cjs/src/embed/base.d.ts.map +1 -1
  12. package/cjs/src/embed/base.js.map +1 -1
  13. package/cjs/src/index.d.ts +2 -3
  14. package/cjs/src/index.d.ts.map +1 -1
  15. package/cjs/src/index.js +1 -3
  16. package/cjs/src/index.js.map +1 -1
  17. package/cjs/src/types.d.ts +55 -54
  18. package/cjs/src/types.d.ts.map +1 -1
  19. package/cjs/src/types.js +55 -52
  20. package/cjs/src/types.js.map +1 -1
  21. package/dist/{index-0serzuii.js → index-BQvLEoxp.js} +1 -1
  22. package/dist/src/auth.d.ts +35 -2
  23. package/dist/src/auth.d.ts.map +1 -1
  24. package/dist/src/embed/app.d.ts.map +1 -1
  25. package/dist/src/embed/base.d.ts.map +1 -1
  26. package/dist/src/index.d.ts +2 -3
  27. package/dist/src/index.d.ts.map +1 -1
  28. package/dist/src/types.d.ts +55 -54
  29. package/dist/src/types.d.ts.map +1 -1
  30. package/dist/tsembed-react.es.js +98 -62
  31. package/dist/tsembed-react.js +97 -61
  32. package/dist/tsembed.es.js +99 -126
  33. package/dist/tsembed.js +97 -125
  34. package/dist/visual-embed-sdk-react-full.d.ts +90 -53
  35. package/dist/visual-embed-sdk-react.d.ts +88 -51
  36. package/dist/visual-embed-sdk.d.ts +90 -56
  37. package/lib/package.json +2 -2
  38. package/lib/src/auth.d.ts +35 -2
  39. package/lib/src/auth.d.ts.map +1 -1
  40. package/lib/src/auth.js +35 -2
  41. package/lib/src/auth.js.map +1 -1
  42. package/lib/src/embed/app.d.ts.map +1 -1
  43. package/lib/src/embed/app.js +5 -5
  44. package/lib/src/embed/app.js.map +1 -1
  45. package/lib/src/embed/app.spec.js +87 -119
  46. package/lib/src/embed/app.spec.js.map +1 -1
  47. package/lib/src/embed/base.d.ts.map +1 -1
  48. package/lib/src/embed/base.js.map +1 -1
  49. package/lib/src/index.d.ts +2 -3
  50. package/lib/src/index.d.ts.map +1 -1
  51. package/lib/src/index.js +0 -1
  52. package/lib/src/index.js.map +1 -1
  53. package/lib/src/types.d.ts +55 -54
  54. package/lib/src/types.d.ts.map +1 -1
  55. package/lib/src/types.js +55 -52
  56. package/lib/src/types.js.map +1 -1
  57. package/package.json +3 -3
  58. package/src/auth.ts +35 -2
  59. package/src/embed/app.spec.ts +171 -211
  60. package/src/embed/app.ts +15 -10
  61. package/src/embed/base.ts +0 -1
  62. package/src/index.ts +0 -3
  63. package/src/types.ts +55 -54
  64. package/cjs/src/embed/auto-frame-renderer.d.ts +0 -3
  65. package/cjs/src/embed/auto-frame-renderer.d.ts.map +0 -1
  66. package/cjs/src/embed/auto-frame-renderer.js +0 -70
  67. package/cjs/src/embed/auto-frame-renderer.js.map +0 -1
  68. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  69. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  70. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +0 -104
  71. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  72. package/cjs/src/utils/answerService/answerService.d.ts +0 -34
  73. package/cjs/src/utils/answerService/answerService.d.ts.map +0 -1
  74. package/cjs/src/utils/answerService/answerService.js +0 -142
  75. package/cjs/src/utils/answerService/answerService.js.map +0 -1
  76. package/cjs/src/utils/answerService/answerService.spec.d.ts +0 -1
  77. package/cjs/src/utils/answerService/answerService.spec.d.ts.map +0 -1
  78. package/cjs/src/utils/answerService/answerService.spec.js +0 -1
  79. package/cjs/src/utils/answerService/answerService.spec.js.map +0 -1
  80. package/cjs/src/utils/answerService/graphql-queries.d.ts +0 -6
  81. package/cjs/src/utils/answerService/graphql-queries.d.ts.map +0 -1
  82. package/cjs/src/utils/answerService/graphql-queries.js +0 -123
  83. package/cjs/src/utils/answerService/graphql-queries.js.map +0 -1
  84. package/cjs/src/utils/answerService.d.ts +0 -10
  85. package/cjs/src/utils/answerService.d.ts.map +0 -1
  86. package/cjs/src/utils/answerService.js +0 -61
  87. package/cjs/src/utils/answerService.js.map +0 -1
  88. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  89. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  90. package/cjs/src/utils/answerService.spec.js +0 -31
  91. package/cjs/src/utils/answerService.spec.js.map +0 -1
  92. package/cjs/src/utils/authService.d.ts +0 -37
  93. package/cjs/src/utils/authService.d.ts.map +0 -1
  94. package/cjs/src/utils/authService.js +0 -106
  95. package/cjs/src/utils/authService.js.map +0 -1
  96. package/cjs/src/utils/authService.spec.d.ts +0 -2
  97. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  98. package/cjs/src/utils/authService.spec.js +0 -72
  99. package/cjs/src/utils/authService.spec.js.map +0 -1
  100. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +0 -5
  101. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +0 -1
  102. package/cjs/src/utils/graphql/answerService/graphql-queries.js +0 -80
  103. package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +0 -1
  104. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts +0 -3
  105. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts.map +0 -1
  106. package/cjs/src/utils/graphql/conversationService/conversation-queries.js +0 -318
  107. package/cjs/src/utils/graphql/conversationService/conversation-queries.js.map +0 -1
  108. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts +0 -12
  109. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts.map +0 -1
  110. package/cjs/src/utils/graphql/conversationService/conversation-service.js +0 -89
  111. package/cjs/src/utils/graphql/conversationService/conversation-service.js.map +0 -1
  112. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +0 -3
  113. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +0 -1
  114. package/cjs/src/utils/graphql/spotterService/conversation-queries.js +0 -318
  115. package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +0 -1
  116. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +0 -12
  117. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +0 -1
  118. package/cjs/src/utils/graphql/spotterService/conversation-service.js +0 -89
  119. package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +0 -1
  120. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +0 -2
  121. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +0 -1
  122. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +0 -403
  123. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +0 -1
  124. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +0 -12
  125. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +0 -1
  126. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +0 -55
  127. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +0 -1
  128. package/dist/index-CqrIh3Vj.js +0 -7370
  129. package/dist/index-aFN9fe8V.js +0 -7371
  130. package/dist/src/embed/auto-frame-renderer.d.ts +0 -3
  131. package/dist/src/embed/auto-frame-renderer.d.ts.map +0 -1
  132. package/lib/src/embed/auto-frame-renderer.d.ts +0 -3
  133. package/lib/src/embed/auto-frame-renderer.d.ts.map +0 -1
  134. package/lib/src/embed/auto-frame-renderer.js +0 -66
  135. package/lib/src/embed/auto-frame-renderer.js.map +0 -1
  136. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  137. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  138. package/lib/src/embed/searchEmbed-basic-auth.spec.js +0 -101
  139. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  140. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts +0 -3
  141. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts.map +0 -1
  142. package/lib/src/utils/graphql/conversationService/conversation-queries.js +0 -315
  143. package/lib/src/utils/graphql/conversationService/conversation-queries.js.map +0 -1
  144. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts +0 -12
  145. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts.map +0 -1
  146. package/lib/src/utils/graphql/conversationService/conversation-service.js +0 -84
  147. package/lib/src/utils/graphql/conversationService/conversation-service.js.map +0 -1
  148. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +0 -3
  149. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +0 -1
  150. package/lib/src/utils/graphql/spotterService/conversation-queries.js +0 -315
  151. package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +0 -1
  152. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +0 -12
  153. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +0 -1
  154. package/lib/src/utils/graphql/spotterService/conversation-service.js +0 -84
  155. package/lib/src/utils/graphql/spotterService/conversation-service.js.map +0 -1
  156. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +0 -2
  157. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +0 -1
  158. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +0 -400
  159. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +0 -1
  160. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +0 -12
  161. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +0 -1
  162. package/lib/src/utils/graphql/spotterService/nls-answer-service.js +0 -50
  163. package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +0 -1
  164. package/lib/src/visual-embed-sdk.d.ts +0 -7186
  165. package/src/embed/auto-frame-renderer.ts +0 -78
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.45.3-mcp.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.46.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -1339,65 +1339,69 @@
1339
1339
  EmbedEvent["Rename"] = "rename";
1340
1340
  /**
1341
1341
  *
1342
- * This event can be emitted to intercept search execution initiated by
1343
- * users and implement logic to allow or restrict search execution.
1344
- * You can also show custom error text if the search query must be
1345
- * restricted due to your application or business requirements.
1346
-
1347
- * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
1348
- * for this embed event to get emitted.
1349
- * @param - Includes the following event listener parameters:
1342
+ * This event allows developers to intercept search execution
1343
+ * and implement logic that decides whether Search Data should return
1344
+ * data or block the search operation.
1345
+ *
1346
+ * **Prerequisite**: Set`isOnBeforeGetVizDataInterceptEnabled` to `true`
1347
+ * to ensure that `EmbedEvent.OnBeforeGetVizDataIntercept` is emitted
1348
+ * when the embedding application user tries to run a search query.
1349
+ *
1350
+ * This framework applies only to `AppEmbed` and `SearchEmbed`.
1351
+ * @param - Includes the following parameters:
1350
1352
  * - `payload`: The payload received from the embed related to the Data API call.
1351
1353
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
1352
- * should run the search, and if not, what error message
1353
- * should be shown to the user.
1354
+ * will run or block the search operation, and if blocked, which error message to provide.
1354
1355
  *
1355
- * `execute` - When `execute` returns `true`, the search will be run.
1356
- * When `execute` returns `false`, the search will not be executed.
1356
+ * `execute` - When `execute` returns `true`, the search is run.
1357
+ * When `execute` returns `false`, the search is not executed.
1357
1358
  *
1358
- * `error` - Developers can customize the error message text when `execute`
1359
- * is `false` using the `errorText` and `errorDescription` parameters in responder.
1360
- *
1361
- * `errorText` - The error message text to be shown to the user.
1362
- * `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
1359
+ * `error` - Developers can customize the user-facing error message when `execute`
1360
+ * is `false` by using the `error` parameters in `responder`.
1361
+ * `errorText` - The error message text shown to the user.
1363
1362
  * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
1364
1363
  * @example
1365
- *```js
1366
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1367
- * (payload, responder) => {
1368
- * responder({
1369
- * data: {
1370
- * execute:false,
1371
- * error: {
1372
- * //Provide a custom error message to explain to your end user
1373
- * //why their search did not run
1374
- * errorText: "This search query cannot be run.
1375
- * Please contact your administrator for more details."
1376
- * }
1377
- * }})
1378
- * })
1364
+ *
1365
+ * This example blocks search operation and returns a custom error message:
1366
+ * ```js
1367
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
1368
+ * responder({
1369
+ * data: {
1370
+ * execute: false,
1371
+ * error: {
1372
+ * // Provide a custom error message to explain why the search did not run.
1373
+ * errorText: 'This search query cannot be run. Please contact your administrator for more details.',
1374
+ * },
1375
+ * },
1376
+ * });
1377
+ * });
1379
1378
  * ```
1379
+ * @example
1380
1380
  *
1381
- *```js
1382
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
1383
- * (payload, responder) => {
1384
- * const query = payload.data.data.answer.search_query
1385
- * responder({
1386
- * data: {
1387
- * // returns true as long as the query does not include
1388
- * // both the 'sales' AND the 'county' column
1389
- * execute: !(query.includes("sales")&&query.includes("county")),
1390
- * error: {
1391
- * //Provide a custom error message to explain to your end user
1392
- * // why their search did not run, and which searches are accepted by your custom logic.
1393
- * errorText: "Error Occurred",
1394
- * errorDescription: "You can't use this query :" + query + ".
1395
- * The 'sales' measures can never be used at the 'county' level.
1396
- * Please try another measure, or remove 'county' from your search."
1397
- * }
1398
- * }})
1399
- * })
1400
- *```
1381
+ * This example allows the search operation to run
1382
+ * unless the query contains both `sales` and `county`,
1383
+ * and returns a custom error message if the query is rejected:
1384
+ * ```js
1385
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
1386
+ * // Record the search query submitted by the end user.
1387
+ * const query = payload.data.data.answer.search_query;
1388
+ *
1389
+ * responder({
1390
+ * data: {
1391
+ * // Returns true as long as the query does not include both `sales` and `county`.
1392
+ * execute: !(query.includes('sales') && query.includes('county')),
1393
+ * error: {
1394
+ * // Provide a custom error message when the query is blocked by your logic.
1395
+ * errorText:
1396
+ * "You can't use this query: "
1397
+ * + query
1398
+ * + ". The 'sales' measure can never be used at the 'county' level. "
1399
+ * + "Please try another measure or remove 'county' from your search.",
1400
+ * },
1401
+ * },
1402
+ * });
1403
+ * });
1404
+ * ```
1401
1405
  */
1402
1406
  EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
1403
1407
  /**
@@ -3151,7 +3155,6 @@
3151
3155
  */
3152
3156
  var Param;
3153
3157
  (function (Param) {
3154
- Param["Tsmcp"] = "tsmcp";
3155
3158
  Param["EmbedApp"] = "embedApp";
3156
3159
  Param["DataSources"] = "dataSources";
3157
3160
  Param["DataSourceMode"] = "dataSourceMode";
@@ -17411,17 +17414,50 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17411
17414
  let releaseVersion = '';
17412
17415
  const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
17413
17416
  /**
17414
- * Enum for auth failure types. This is the parameter passed to the listner
17415
- * of {@link AuthStatus.FAILURE}.
17417
+ * Enum for auth failure types.
17418
+ * This value is passed to the listener for {@link AuthStatus.FAILURE}.
17416
17419
  * @group Authentication / Init
17417
17420
  */
17418
17421
  exports.AuthFailureType = void 0;
17419
17422
  (function (AuthFailureType) {
17423
+ /**
17424
+ * Authentication failed in the SDK authentication flow.
17425
+ *
17426
+ * Emitted when `init()` or auto-authentication cannot establish a logged-in session.
17427
+ * For example, this can happen because of an invalid token, an auth request failure,
17428
+ * or an auth promise rejection.
17429
+ */
17420
17430
  AuthFailureType["SDK"] = "SDK";
17431
+ /**
17432
+ * Browser cookie access is blocked for the embedded app.
17433
+ *
17434
+ * Emitted when the iframe reports that required cookies
17435
+ * cannot be read or sent, commonly due to third-party cookie restrictions.
17436
+ */
17421
17437
  AuthFailureType["NO_COOKIE_ACCESS"] = "NO_COOKIE_ACCESS";
17438
+ /**
17439
+ * The current authentication token or session has expired.
17440
+ *
17441
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
17442
+ */
17422
17443
  AuthFailureType["EXPIRY"] = "EXPIRY";
17444
+ /**
17445
+ * A generic authentication failure that does not match a more specific type.
17446
+ *
17447
+ * Emitted as a fallback for app-reported auth failures in standard auth flows.
17448
+ */
17423
17449
  AuthFailureType["OTHER"] = "OTHER";
17450
+ /**
17451
+ * The user session timed out due to inactivity.
17452
+ *
17453
+ * Emitted when the app reports an idle-session timeout.
17454
+ */
17424
17455
  AuthFailureType["IDLE_SESSION_TIMEOUT"] = "IDLE_SESSION_TIMEOUT";
17456
+ /**
17457
+ * The app reports that the user is unauthenticated.
17458
+ *
17459
+ * Used primarily to classify unauthenticated failures in Embedded SSO flows.
17460
+ */
17425
17461
  AuthFailureType["UNAUTHENTICATED_FAILURE"] = "UNAUTHENTICATED_FAILURE";
17426
17462
  })(exports.AuthFailureType || (exports.AuthFailureType = {}));
17427
17463
  /**
@@ -18398,7 +18434,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18398
18434
  return eventData;
18399
18435
  }
18400
18436
 
18401
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.3-mcp.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 is-publish-allowed && 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.23","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":"^30.0.0","@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":"^30.2.0","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:"^30.2.0","jest-environment-jsdom":"^29.7.0","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":"^29.4.6","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};
18437
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.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.23","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":"^30.0.0","@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":"^30.2.0","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:"^30.2.0","jest-environment-jsdom":"^29.7.0","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":"^29.4.6","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};
18402
18438
 
18403
18439
  class HostEventClient {
18404
18440
  constructor(iFrame) {
@@ -20504,6 +20540,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20504
20540
  else {
20505
20541
  params[Param.DataPanelCustomGroupsAccordionInitialState] = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
20506
20542
  }
20543
+ if (modularHomeExperience !== undefined) {
20544
+ params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
20545
+ }
20507
20546
  // Set navigation to v2 by default to avoid problems like the app
20508
20547
  // switcher (9-dot menu) not showing when v3 navigation is turned on
20509
20548
  // at the cluster level.
@@ -20513,9 +20552,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20513
20552
  // Set homePageVersion to v2 by default to reset the LD flag value
20514
20553
  // for the homepageVersion.
20515
20554
  params[Param.HomepageVersion] = 'v2';
20516
- // Set listpageVersion to v2 by default to reset the LD flag value
20517
- // for the listpageVersion.
20518
- params[Param.ListPageVersion] = exports.ListPage.List;
20519
20555
  if (discoveryExperience) {
20520
20556
  // primaryNavbarVersion v3 will enabled the new left navigation
20521
20557
  if (discoveryExperience.primaryNavbarVersion === exports.PrimaryNavbarVersion.Sliding) {
@@ -20534,8 +20570,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
20534
20570
  if (discoveryExperience.homePage === exports.HomePage.ModularWithStylingChanges) {
20535
20571
  params[Param.HomepageVersion] = exports.HomePage.ModularWithStylingChanges;
20536
20572
  }
20537
- // listPageVersion v3 will enable the new list page
20538
- if (discoveryExperience.listPageVersion === exports.ListPage.ListWithUXChanges) {
20573
+ // listPageVersion can be changed to v2 or v3
20574
+ if (discoveryExperience.listPageVersion !== undefined) {
20539
20575
  params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
20540
20576
  }
20541
20577
  }
@@ -22691,69 +22727,6 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
22691
22727
  return result;
22692
22728
  };
22693
22729
 
22694
- function startAutoMCPFrameRenderer(viewConfig = {}) {
22695
- const replaceWithMCPIframe = (iframe) => {
22696
- const autoMCPFrameRenderer = new AutoFrameRenderer(viewConfig);
22697
- autoMCPFrameRenderer.replaceIframe(iframe);
22698
- };
22699
- const observer = new MutationObserver((mutations) => {
22700
- for (const mutation of mutations) {
22701
- for (const node of Array.from(mutation.addedNodes)) {
22702
- if (node instanceof HTMLIFrameElement && isTSMCPIframe(node)) {
22703
- replaceWithMCPIframe(node);
22704
- }
22705
- if (node instanceof HTMLElement) {
22706
- node.querySelectorAll('iframe').forEach((iframe) => {
22707
- if (isTSMCPIframe(iframe)) {
22708
- replaceWithMCPIframe(iframe);
22709
- }
22710
- });
22711
- }
22712
- }
22713
- }
22714
- });
22715
- observer.observe(document.body, { childList: true, subtree: true });
22716
- return observer;
22717
- }
22718
- function isTSMCPIframe(iframe) {
22719
- const src = iframe.src;
22720
- return src.includes(`${Param.Tsmcp}=true`);
22721
- }
22722
- class AutoFrameRenderer extends TsEmbed {
22723
- constructor(viewConfig) {
22724
- viewConfig.embedComponentType = 'auto-frame-renderer';
22725
- const container = document.createElement('div');
22726
- super(container, viewConfig);
22727
- this.viewConfig = viewConfig;
22728
- }
22729
- getMCPIframeSrc(sourceSrc) {
22730
- const queryParams = this.getEmbedParamsObject();
22731
- const sourceURL = new URL(sourceSrc);
22732
- const existingQueryParams = sourceURL.searchParams;
22733
- // convert existing query params to an object
22734
- const existingQueryParamsObject = Object.fromEntries(existingQueryParams);
22735
- delete existingQueryParamsObject[Param.Tsmcp];
22736
- // merge the existing query params with the new query params
22737
- const mergedQueryParams = { ...queryParams, ...existingQueryParamsObject };
22738
- const mergedQueryParamsString = getQueryParamString(mergedQueryParams);
22739
- const frameSrc = `${sourceURL.origin}${sourceURL.pathname}?${mergedQueryParamsString}/${sourceURL.hash}`;
22740
- return frameSrc;
22741
- }
22742
- handleInsertionIntoDOM(child) {
22743
- if (this.frameToReplace) {
22744
- this.frameToReplace.replaceWith(child);
22745
- }
22746
- else {
22747
- super.handleInsertionIntoDOM(child);
22748
- }
22749
- }
22750
- async replaceIframe(iframe) {
22751
- this.frameToReplace = iframe;
22752
- const src = this.getMCPIframeSrc(iframe.src);
22753
- await this.renderIFrame(src);
22754
- }
22755
- }
22756
-
22757
22730
  const ALIAS = Symbol.for('yaml.alias');
22758
22731
  const DOC = Symbol.for('yaml.document');
22759
22732
  const MAP = Symbol.for('yaml.map');
@@ -30179,7 +30152,6 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
30179
30152
  exports.prefetch = prefetch;
30180
30153
  exports.reloadIframe = reloadIframe;
30181
30154
  exports.resetCachedAuthToken = resetCachedAuthToken;
30182
- exports.startAutoMCPFrameRenderer = startAutoMCPFrameRenderer;
30183
30155
  exports.tokenizedFetch = tokenizedFetch;
30184
30156
  exports.uploadMixpanelEvent = uploadMixpanelEvent;
30185
30157
 
@@ -3653,65 +3653,69 @@ export declare enum EmbedEvent {
3653
3653
  Rename = "rename",
3654
3654
  /**
3655
3655
  *
3656
- * This event can be emitted to intercept search execution initiated by
3657
- * users and implement logic to allow or restrict search execution.
3658
- * You can also show custom error text if the search query must be
3659
- * restricted due to your application or business requirements.
3660
-
3661
- * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
3662
- * for this embed event to get emitted.
3663
- * @param - Includes the following event listener parameters:
3656
+ * This event allows developers to intercept search execution
3657
+ * and implement logic that decides whether Search Data should return
3658
+ * data or block the search operation.
3659
+ *
3660
+ * **Prerequisite**: Set`isOnBeforeGetVizDataInterceptEnabled` to `true`
3661
+ * to ensure that `EmbedEvent.OnBeforeGetVizDataIntercept` is emitted
3662
+ * when the embedding application user tries to run a search query.
3663
+ *
3664
+ * This framework applies only to `AppEmbed` and `SearchEmbed`.
3665
+ * @param - Includes the following parameters:
3664
3666
  * - `payload`: The payload received from the embed related to the Data API call.
3665
3667
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
3666
- * should run the search, and if not, what error message
3667
- * should be shown to the user.
3668
+ * will run or block the search operation, and if blocked, which error message to provide.
3668
3669
  *
3669
- * `execute` - When `execute` returns `true`, the search will be run.
3670
- * When `execute` returns `false`, the search will not be executed.
3670
+ * `execute` - When `execute` returns `true`, the search is run.
3671
+ * When `execute` returns `false`, the search is not executed.
3671
3672
  *
3672
- * `error` - Developers can customize the error message text when `execute`
3673
- * is `false` using the `errorText` and `errorDescription` parameters in responder.
3674
- *
3675
- * `errorText` - The error message text to be shown to the user.
3676
- * `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
3673
+ * `error` - Developers can customize the user-facing error message when `execute`
3674
+ * is `false` by using the `error` parameters in `responder`.
3675
+ * `errorText` - The error message text shown to the user.
3677
3676
  * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
3678
3677
  * @example
3679
- *```js
3680
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
3681
- * (payload, responder) => {
3682
- * responder({
3683
- * data: {
3684
- * execute:false,
3685
- * error: {
3686
- * //Provide a custom error message to explain to your end user
3687
- * //why their search did not run
3688
- * errorText: "This search query cannot be run.
3689
- * Please contact your administrator for more details."
3690
- * }
3691
- * }})
3692
- * })
3678
+ *
3679
+ * This example blocks search operation and returns a custom error message:
3680
+ * ```js
3681
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
3682
+ * responder({
3683
+ * data: {
3684
+ * execute: false,
3685
+ * error: {
3686
+ * // Provide a custom error message to explain why the search did not run.
3687
+ * errorText: 'This search query cannot be run. Please contact your administrator for more details.',
3688
+ * },
3689
+ * },
3690
+ * });
3691
+ * });
3693
3692
  * ```
3693
+ * @example
3694
3694
  *
3695
- *```js
3696
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
3697
- * (payload, responder) => {
3698
- * const query = payload.data.data.answer.search_query
3699
- * responder({
3700
- * data: {
3701
- * // returns true as long as the query does not include
3702
- * // both the 'sales' AND the 'county' column
3703
- * execute: !(query.includes("sales")&&query.includes("county")),
3704
- * error: {
3705
- * //Provide a custom error message to explain to your end user
3706
- * // why their search did not run, and which searches are accepted by your custom logic.
3707
- * errorText: "Error Occurred",
3708
- * errorDescription: "You can't use this query :" + query + ".
3709
- * The 'sales' measures can never be used at the 'county' level.
3710
- * Please try another measure, or remove 'county' from your search."
3711
- * }
3712
- * }})
3713
- * })
3714
- *```
3695
+ * This example allows the search operation to run
3696
+ * unless the query contains both `sales` and `county`,
3697
+ * and returns a custom error message if the query is rejected:
3698
+ * ```js
3699
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
3700
+ * // Record the search query submitted by the end user.
3701
+ * const query = payload.data.data.answer.search_query;
3702
+ *
3703
+ * responder({
3704
+ * data: {
3705
+ * // Returns true as long as the query does not include both `sales` and `county`.
3706
+ * execute: !(query.includes('sales') && query.includes('county')),
3707
+ * error: {
3708
+ * // Provide a custom error message when the query is blocked by your logic.
3709
+ * errorText:
3710
+ * "You can't use this query: "
3711
+ * + query
3712
+ * + ". The 'sales' measure can never be used at the 'county' level. "
3713
+ * + "Please try another measure or remove 'county' from your search.",
3714
+ * },
3715
+ * },
3716
+ * });
3717
+ * });
3718
+ * ```
3715
3719
  */
3716
3720
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
3717
3721
  /**
@@ -7395,16 +7399,49 @@ export interface ContextObject {
7395
7399
  };
7396
7400
  }
7397
7401
  /**
7398
- * Enum for auth failure types. This is the parameter passed to the listner
7399
- * of {@link AuthStatus.FAILURE}.
7402
+ * Enum for auth failure types.
7403
+ * This value is passed to the listener for {@link AuthStatus.FAILURE}.
7400
7404
  * @group Authentication / Init
7401
7405
  */
7402
7406
  export declare enum AuthFailureType {
7407
+ /**
7408
+ * Authentication failed in the SDK authentication flow.
7409
+ *
7410
+ * Emitted when `init()` or auto-authentication cannot establish a logged-in session.
7411
+ * For example, this can happen because of an invalid token, an auth request failure,
7412
+ * or an auth promise rejection.
7413
+ */
7403
7414
  SDK = "SDK",
7415
+ /**
7416
+ * Browser cookie access is blocked for the embedded app.
7417
+ *
7418
+ * Emitted when the iframe reports that required cookies
7419
+ * cannot be read or sent, commonly due to third-party cookie restrictions.
7420
+ */
7404
7421
  NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
7422
+ /**
7423
+ * The current authentication token or session has expired.
7424
+ *
7425
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
7426
+ */
7405
7427
  EXPIRY = "EXPIRY",
7428
+ /**
7429
+ * A generic authentication failure that does not match a more specific type.
7430
+ *
7431
+ * Emitted as a fallback for app-reported auth failures in standard auth flows.
7432
+ */
7406
7433
  OTHER = "OTHER",
7434
+ /**
7435
+ * The user session timed out due to inactivity.
7436
+ *
7437
+ * Emitted when the app reports an idle-session timeout.
7438
+ */
7407
7439
  IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
7440
+ /**
7441
+ * The app reports that the user is unauthenticated.
7442
+ *
7443
+ * Used primarily to classify unauthenticated failures in Embedded SSO flows.
7444
+ */
7408
7445
  UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
7409
7446
  }
7410
7447
  /**