@thoughtspot/visual-embed-sdk 1.46.5 → 1.47.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 (140) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/app.d.ts +0 -15
  3. package/cjs/src/embed/app.d.ts.map +1 -1
  4. package/cjs/src/embed/app.js +1 -2
  5. package/cjs/src/embed/app.js.map +1 -1
  6. package/cjs/src/embed/app.spec.js +0 -10
  7. package/cjs/src/embed/app.spec.js.map +1 -1
  8. package/cjs/src/embed/conversation.d.ts +1 -1
  9. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  10. package/cjs/src/embed/hostEventClient/utils.js +7 -1
  11. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  12. package/cjs/src/embed/hostEventClient/utils.spec.js +80 -5
  13. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  14. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  15. package/cjs/src/embed/ts-embed.js +12 -4
  16. package/cjs/src/embed/ts-embed.js.map +1 -1
  17. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  18. package/cjs/src/embed/ts-embed.spec.js +28 -67
  19. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  20. package/cjs/src/errors.d.ts +0 -1
  21. package/cjs/src/errors.d.ts.map +1 -1
  22. package/cjs/src/errors.js +0 -1
  23. package/cjs/src/errors.js.map +1 -1
  24. package/cjs/src/index.d.ts +1 -2
  25. package/cjs/src/index.d.ts.map +1 -1
  26. package/cjs/src/index.js +2 -4
  27. package/cjs/src/index.js.map +1 -1
  28. package/cjs/src/react/all-types-export.d.ts +2 -2
  29. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  30. package/cjs/src/react/all-types-export.js +1 -3
  31. package/cjs/src/react/all-types-export.js.map +1 -1
  32. package/cjs/src/react/index.d.ts +1 -36
  33. package/cjs/src/react/index.d.ts.map +1 -1
  34. package/cjs/src/react/index.js +1 -34
  35. package/cjs/src/react/index.js.map +1 -1
  36. package/cjs/src/types.d.ts +41 -75
  37. package/cjs/src/types.d.ts.map +1 -1
  38. package/cjs/src/types.js +17 -47
  39. package/cjs/src/types.js.map +1 -1
  40. package/dist/{index-ChNydfIz.js → index-Bm2Hck8q.js} +1 -1
  41. package/dist/src/embed/app.d.ts +0 -15
  42. package/dist/src/embed/app.d.ts.map +1 -1
  43. package/dist/src/embed/conversation.d.ts +1 -1
  44. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  45. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  46. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  47. package/dist/src/errors.d.ts +0 -1
  48. package/dist/src/errors.d.ts.map +1 -1
  49. package/dist/src/index.d.ts +1 -2
  50. package/dist/src/index.d.ts.map +1 -1
  51. package/dist/src/react/all-types-export.d.ts +2 -2
  52. package/dist/src/react/all-types-export.d.ts.map +1 -1
  53. package/dist/src/react/index.d.ts +1 -36
  54. package/dist/src/react/index.d.ts.map +1 -1
  55. package/dist/src/types.d.ts +41 -75
  56. package/dist/src/types.d.ts.map +1 -1
  57. package/dist/tsembed-react.es.js +59 -199
  58. package/dist/tsembed-react.js +47 -189
  59. package/dist/tsembed.es.js +74 -180
  60. package/dist/tsembed.js +30800 -30907
  61. package/dist/visual-embed-sdk-react-full.d.ts +44 -270
  62. package/dist/visual-embed-sdk-react.d.ts +44 -270
  63. package/dist/visual-embed-sdk.d.ts +42 -240
  64. package/lib/package.json +1 -1
  65. package/lib/src/embed/app.d.ts +0 -15
  66. package/lib/src/embed/app.d.ts.map +1 -1
  67. package/lib/src/embed/app.js +1 -2
  68. package/lib/src/embed/app.js.map +1 -1
  69. package/lib/src/embed/app.spec.js +0 -10
  70. package/lib/src/embed/app.spec.js.map +1 -1
  71. package/lib/src/embed/conversation.d.ts +1 -1
  72. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  73. package/lib/src/embed/hostEventClient/utils.js +7 -1
  74. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  75. package/lib/src/embed/hostEventClient/utils.spec.js +80 -5
  76. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  77. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  78. package/lib/src/embed/ts-embed.js +12 -4
  79. package/lib/src/embed/ts-embed.js.map +1 -1
  80. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  81. package/lib/src/embed/ts-embed.spec.js +30 -69
  82. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  83. package/lib/src/errors.d.ts +0 -1
  84. package/lib/src/errors.d.ts.map +1 -1
  85. package/lib/src/errors.js +0 -1
  86. package/lib/src/errors.js.map +1 -1
  87. package/lib/src/index.d.ts +1 -2
  88. package/lib/src/index.d.ts.map +1 -1
  89. package/lib/src/index.js +1 -2
  90. package/lib/src/index.js.map +1 -1
  91. package/lib/src/react/all-types-export.d.ts +2 -2
  92. package/lib/src/react/all-types-export.d.ts.map +1 -1
  93. package/lib/src/react/all-types-export.js +1 -1
  94. package/lib/src/react/all-types-export.js.map +1 -1
  95. package/lib/src/react/index.d.ts +1 -36
  96. package/lib/src/react/index.d.ts.map +1 -1
  97. package/lib/src/react/index.js +0 -33
  98. package/lib/src/react/index.js.map +1 -1
  99. package/lib/src/types.d.ts +41 -75
  100. package/lib/src/types.d.ts.map +1 -1
  101. package/lib/src/types.js +17 -47
  102. package/lib/src/types.js.map +1 -1
  103. package/lib/src/visual-embed-sdk.d.ts +42 -240
  104. package/package.json +1 -1
  105. package/src/embed/app.spec.ts +0 -15
  106. package/src/embed/app.ts +2 -20
  107. package/src/embed/conversation.ts +4 -4
  108. package/src/embed/hostEventClient/utils.spec.ts +94 -6
  109. package/src/embed/hostEventClient/utils.ts +15 -2
  110. package/src/embed/ts-embed.spec.ts +56 -108
  111. package/src/embed/ts-embed.ts +10 -3
  112. package/src/errors.ts +0 -1
  113. package/src/index.ts +2 -5
  114. package/src/react/all-types-export.ts +0 -3
  115. package/src/react/index.tsx +15 -59
  116. package/src/types.ts +102 -138
  117. package/cjs/src/embed/sage.d.ts +0 -164
  118. package/cjs/src/embed/sage.d.ts.map +0 -1
  119. package/cjs/src/embed/sage.js +0 -88
  120. package/cjs/src/embed/sage.js.map +0 -1
  121. package/cjs/src/embed/sage.spec.d.ts +0 -2
  122. package/cjs/src/embed/sage.spec.d.ts.map +0 -1
  123. package/cjs/src/embed/sage.spec.js +0 -151
  124. package/cjs/src/embed/sage.spec.js.map +0 -1
  125. package/dist/index-DGV_zh53.js +0 -7371
  126. package/dist/index-DW2wEHqy.js +0 -7371
  127. package/dist/src/embed/sage.d.ts +0 -164
  128. package/dist/src/embed/sage.d.ts.map +0 -1
  129. package/dist/src/embed/sage.spec.d.ts +0 -2
  130. package/dist/src/embed/sage.spec.d.ts.map +0 -1
  131. package/lib/src/embed/sage.d.ts +0 -164
  132. package/lib/src/embed/sage.d.ts.map +0 -1
  133. package/lib/src/embed/sage.js +0 -84
  134. package/lib/src/embed/sage.js.map +0 -1
  135. package/lib/src/embed/sage.spec.d.ts +0 -2
  136. package/lib/src/embed/sage.spec.d.ts.map +0 -1
  137. package/lib/src/embed/sage.spec.js +0 -148
  138. package/lib/src/embed/sage.spec.js.map +0 -1
  139. package/src/embed/sage.spec.ts +0 -206
  140. package/src/embed/sage.ts +0 -231
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.46.5 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.47.0 */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
@@ -1471,19 +1471,6 @@
1471
1471
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1472
1472
  */
1473
1473
  EmbedEvent["FilterChanged"] = "filterChanged";
1474
- /**
1475
- * Emitted when a user clicks the **Go** button to initiate
1476
- * a Natural Language Search query
1477
- * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1478
- */
1479
- EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
1480
- /**
1481
- * Emitted when a user selects a data source on the embedded
1482
- * Natural Language Search interface.
1483
- *
1484
- * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1485
- */
1486
- EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
1487
1474
  /**
1488
1475
  * Emitted when a user updates a connection on the **Data** page
1489
1476
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -2947,7 +2934,7 @@
2947
2934
  * tml.answer.search_query // TML representation of the search query
2948
2935
  * );
2949
2936
  * })
2950
- * ```
2937
+ * ```
2951
2938
  * @example
2952
2939
  * ```js
2953
2940
  * // Get TML from search context
@@ -3571,21 +3558,6 @@
3571
3558
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
3572
3559
  */
3573
3560
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
3574
- /**
3575
- * Updates the search query string for Natural Language Search operations.
3576
- * @param - Includes the following keys:
3577
- * - `queryString`: Text string in Natural Language format.
3578
- * - `executeSearch`: Boolean to execute search and update search query.
3579
- * @example
3580
- * ```js
3581
- * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
3582
- * queryString: 'revenue per year',
3583
- * executeSearch: true,
3584
- * })
3585
- * ```
3586
- * @version SDK: 1.26.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
3587
- */
3588
- HostEvent["UpdateSageQuery"] = "updateSageQuery";
3589
3561
  /**
3590
3562
  * Get the Answer session for a Search or
3591
3563
  * Liveboard visualization.
@@ -4151,7 +4123,6 @@
4151
4123
  Param["HideNotification"] = "hideNotification";
4152
4124
  Param["HideApplicationSwitcher"] = "applicationSwitcherHidden";
4153
4125
  Param["HideOrgSwitcher"] = "orgSwitcherHidden";
4154
- Param["IsSageEmbed"] = "isSageEmbed";
4155
4126
  Param["HideWorksheetSelector"] = "hideWorksheetSelector";
4156
4127
  Param["DisableWorksheetChange"] = "disableWorksheetChange";
4157
4128
  Param["HideSourceSelection"] = "hideSourceSelection";
@@ -4202,7 +4173,6 @@
4202
4173
  Param["HideIrrelevantFiltersInTab"] = "hideIrrelevantFiltersAtTabLevel";
4203
4174
  Param["IsEnhancedFilterInteractivityEnabled"] = "isLiveboardPermissionV2Enabled";
4204
4175
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
4205
- Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
4206
4176
  Param["OverrideOrgId"] = "orgId";
4207
4177
  Param["OauthPollingInterval"] = "oAuthPollingInterval";
4208
4178
  Param["IsForceRedirect"] = "isForceRedirect";
@@ -5529,11 +5499,11 @@
5529
5499
  */
5530
5500
  Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
5531
5501
  /**
5532
- * Action ID to hide or disable the Coaching workflow in Spotter conversations.
5533
- * When disabled, users cannot access **Add to Coaching** workflow in conversation.
5534
- * The **Add to Coaching** feature allows adding reference questions and
5535
- * business terms to improve Spotter’s responses. This feature is generally available
5536
- * (GA) from version 26.2.0.cl and enabled by default on embed deployments.
5502
+ * Action ID to hide or disable the Coaching workflow in Spotter conversations.
5503
+ * When disabled, users cannot access **Add to Coaching** workflow in conversation.
5504
+ * The **Add to Coaching** feature allows adding reference questions and
5505
+ * business terms to improve Spotter’s responses. This feature is generally available
5506
+ * (GA) from version 26.2.0.cl and enabled by default on embed deployments.
5537
5507
  * @example
5538
5508
  * ```js
5539
5509
  * hiddenAction: [Action.InConversationTraining]
@@ -5610,17 +5580,17 @@
5610
5580
  */
5611
5581
  Action["LiveboardStylePanel"] = "liveboardStylePanel";
5612
5582
  /**
5613
- * The **Publish** action for Liveboards, Answers and Models.
5614
- * Opens the publishing modal. It's a parent action for the
5615
- * **Manage Publishing** and **Unpublish** actions if the object
5616
- * is already published, otherwise appears standalone.
5617
- * @example
5618
- * ```js
5619
- * hiddenActions: [Action.Publish]
5620
- * disabledActions: [Action.Publish]
5621
- * ```
5622
- * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl
5623
- */
5583
+ * The **Publish** action for Liveboards, Answers and Models.
5584
+ * Opens the publishing modal. It's a parent action for the
5585
+ * **Manage Publishing** and **Unpublish** actions if the object
5586
+ * is already published, otherwise appears standalone.
5587
+ * @example
5588
+ * ```js
5589
+ * hiddenActions: [Action.Publish]
5590
+ * disabledActions: [Action.Publish]
5591
+ * ```
5592
+ * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl
5593
+ */
5624
5594
  Action["Publish"] = "publish";
5625
5595
  /**
5626
5596
  * The **Manage Publishing** action for Liveboards, Answers and Models.
@@ -6255,7 +6225,6 @@
6255
6225
  LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
6256
6226
  TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
6257
6227
  SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
6258
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
6259
6228
  THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.',
6260
6229
  DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.',
6261
6230
  SDK_NOT_INITIALIZED: 'SDK not initialized',
@@ -8293,9 +8262,9 @@
8293
8262
 
8294
8263
  var stubFalse_1 = stubFalse;
8295
8264
 
8296
- var isBuffer_1 = createCommonjsModule(function (module, exports) {
8265
+ var isBuffer_1 = createCommonjsModule(function (module, exports$1) {
8297
8266
  /** Detect free variable `exports`. */
8298
- var freeExports = exports && !exports.nodeType && exports;
8267
+ var freeExports = exports$1 && !exports$1.nodeType && exports$1;
8299
8268
 
8300
8269
  /** Detect free variable `module`. */
8301
8270
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
@@ -8465,9 +8434,9 @@
8465
8434
 
8466
8435
  var _baseUnary = baseUnary;
8467
8436
 
8468
- var _nodeUtil = createCommonjsModule(function (module, exports) {
8437
+ var _nodeUtil = createCommonjsModule(function (module, exports$1) {
8469
8438
  /** Detect free variable `exports`. */
8470
- var freeExports = exports && !exports.nodeType && exports;
8439
+ var freeExports = exports$1 && !exports$1.nodeType && exports$1;
8471
8440
 
8472
8441
  /** Detect free variable `module`. */
8473
8442
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
@@ -10368,9 +10337,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10368
10337
 
10369
10338
  var _stringToPath = stringToPath;
10370
10339
 
10371
- /** Used as references for various `Number` constants. */
10372
- var INFINITY$1 = 1 / 0;
10373
-
10374
10340
  /** Used to convert symbols to primitives and strings. */
10375
10341
  var symbolProto = _Symbol ? _Symbol.prototype : undefined,
10376
10342
  symbolToString = symbolProto ? symbolProto.toString : undefined;
@@ -10396,7 +10362,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10396
10362
  return symbolToString ? symbolToString.call(value) : '';
10397
10363
  }
10398
10364
  var result = (value + '');
10399
- return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
10365
+ return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
10400
10366
  }
10401
10367
 
10402
10368
  var _baseToString = baseToString;
@@ -10445,9 +10411,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10445
10411
 
10446
10412
  var _castPath = castPath;
10447
10413
 
10448
- /** Used as references for various `Number` constants. */
10449
- var INFINITY = 1 / 0;
10450
-
10451
10414
  /**
10452
10415
  * Converts `value` to a string key if it's not a string or symbol.
10453
10416
  *
@@ -10460,7 +10423,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
10460
10423
  return value;
10461
10424
  }
10462
10425
  var result = (value + '');
10463
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
10426
+ return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
10464
10427
  }
10465
10428
 
10466
10429
  var _toKey = toKey;
@@ -17772,10 +17735,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17772
17735
  VISUAL_SDK_RENDER_FAILED: 'visual-sdk-render-failed',
17773
17736
  VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
17774
17737
  VISUAL_SDK_ON: 'visual-sdk-on',
17775
- VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
17776
- VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
17777
- VERCEL_INTEGRATION_COMPLETED: 'vercel-integration-completed',
17778
- };
17738
+ VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create'};
17779
17739
  let isMixpanelInitialized = false;
17780
17740
  let eventQueue = [];
17781
17741
  /**
@@ -19325,12 +19285,18 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19325
19285
  return eventData;
19326
19286
  }
19327
19287
 
19328
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5";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 && node dts-config/wrap-ambient-module.mjs","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 || echo 'Warning: Coveralls upload failed but not breaking the build.'","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.59.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:"34 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};
19288
+ var version$1="1.47.0";var pkgInfo = {version:version$1};
19329
19289
 
19330
19290
  function isValidUpdateFiltersPayload(payload) {
19331
19291
  if (!payload)
19332
19292
  return false;
19333
- const isValidFilter = (f) => !!f && typeof f.column === 'string' && typeof f.oper === 'string' && Array.isArray(f.values);
19293
+ const isValidFilter = (f) => {
19294
+ const hasColumn = typeof f.column === 'string' || typeof f.columnName === 'string';
19295
+ const hasOperator = typeof f.oper === 'string' || typeof f.operator === 'string';
19296
+ const hasValues = Array.isArray(f.values);
19297
+ const validType = !f.type || typeof f.type === 'string';
19298
+ return hasColumn && hasOperator && hasValues && validType;
19299
+ };
19334
19300
  const hasValidFilter = payload.filter && isValidFilter(payload.filter);
19335
19301
  const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
19336
19302
  return !!(hasValidFilter || hasValidFilters);
@@ -21017,6 +20983,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21017
20983
  try {
21018
20984
  this.removeFullscreenChangeHandler();
21019
20985
  this.unsubscribeToEvents();
20986
+ if (!this.isRendered) {
20987
+ return;
20988
+ }
21020
20989
  if (!getEmbedConfig().waitForCleanupOnDestroy) {
21021
20990
  this.trigger(exports.HostEvent.DestroyEmbed);
21022
20991
  (_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
@@ -21026,11 +20995,16 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21026
20995
  Promise.race([
21027
20996
  this.trigger(exports.HostEvent.DestroyEmbed),
21028
20997
  new Promise((resolve) => setTimeout(resolve, cleanupTimeout)),
21029
- ]).then(() => {
21030
- var _a, _b;
21031
- (_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
21032
- }).catch((e) => {
20998
+ ]).catch((e) => {
21033
20999
  logger$3.log('Error destroying TS Embed', e);
21000
+ }).finally(() => {
21001
+ var _a, _b;
21002
+ try {
21003
+ (_b = (_a = this.insertedDomEl) === null || _a === void 0 ? void 0 : _a.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.insertedDomEl);
21004
+ }
21005
+ catch (e) {
21006
+ logger$3.log('Error removing DOM element on destroy', e);
21007
+ }
21034
21008
  });
21035
21009
  }
21036
21010
  }
@@ -21371,87 +21345,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21371
21345
  }
21372
21346
  };
21373
21347
 
21374
- /**
21375
- * Copyright (c) 2023
21376
- *
21377
- * Embed ThoughtSpot Sage
21378
- * @summary TS Sage embed
21379
- * @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
21380
- */
21381
- /**
21382
- * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
21383
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
21384
- *
21385
- * Note: This embed will be deprecated from SDK: 1.40.0 | ThoughtSpot: 10.13.0.cl
21386
- * @group Embed components
21387
- */
21388
- let SageEmbed$1 = class SageEmbed extends V1Embed {
21389
- constructor(domSelector, viewConfig) {
21390
- viewConfig.embedComponentType = 'SageEmbed';
21391
- super(domSelector, viewConfig);
21392
- }
21393
- getEmbedParamsObject() {
21394
- const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
21395
- const params = this.getBaseQueryParams();
21396
- params[Param.DataPanelV2Enabled] = !!dataPanelV2;
21397
- params[Param.IsSageEmbed] = true;
21398
- params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
21399
- params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;
21400
- params[Param.HideEurekaSuggestions] = !!hideAutocompleteSuggestions;
21401
- if (showObjectSuggestions) {
21402
- params[Param.HideEurekaSuggestions] = !showObjectSuggestions;
21403
- // support backwards compatibility
21404
- }
21405
- params[Param.HideSampleQuestions] = !!hideSampleQuestions;
21406
- params[Param.IsProductTour] = !!isProductTour;
21407
- params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
21408
- return params;
21409
- }
21410
- /**
21411
- * Constructs a map of parameters to be passed on to the
21412
- * embedded Eureka or Sage search page.
21413
- * @returns {string} query string
21414
- */
21415
- getEmbedParams() {
21416
- const params = this.getEmbedParamsObject();
21417
- return getQueryParamString(params, true);
21418
- }
21419
- /**
21420
- * Construct the URL of the embedded ThoughtSpot sage to be
21421
- * loaded in the iframe
21422
- * @returns {string} iframe url
21423
- */
21424
- getIFrameSrc() {
21425
- const path = 'eureka';
21426
- const postHashObj = {};
21427
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
21428
- const { dataSource, searchOptions, } = this.viewConfig;
21429
- if (dataSource)
21430
- postHashObj[Param.WorksheetId] = dataSource;
21431
- if ((searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) && searchOptions.executeSearch) {
21432
- postHashObj[Param.executeSearch] = true;
21433
- }
21434
- let sagePostHashParams = new URLSearchParams(postHashObj).toString();
21435
- if (sagePostHashParams)
21436
- sagePostHashParams = `${tsPostHashParams ? '&' : '?'}${sagePostHashParams}`;
21437
- if (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery)
21438
- sagePostHashParams += `${sagePostHashParams ? '&' : '?'}${[Param.Query]}=${encodeURIComponent(searchOptions.searchQuery)}`;
21439
- // use encodeURIComponent for query instead of URLSearchParams
21440
- // as it adds + instead of %20 for spaces
21441
- return `${this.getRootIframeSrc()}/embed/${path}${tsPostHashParams}${sagePostHashParams}`;
21442
- }
21443
- /**
21444
- * Render the embedded ThoughtSpot Sage
21445
- * @returns {SageEmbed} Eureka/Sage embed
21446
- */
21447
- async render() {
21448
- await super.render();
21449
- const src = this.getIFrameSrc();
21450
- await this.renderV1Embed(src);
21451
- return this;
21452
- }
21453
- };
21454
-
21455
21348
  /**
21456
21349
  * Copyright (c) 2022
21457
21350
  *
@@ -21623,7 +21516,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21623
21516
  */
21624
21517
  async render() {
21625
21518
  await super.render();
21626
- this.viewConfig;
21519
+ const { answerId } = this.viewConfig;
21627
21520
  const src = this.getIFrameSrc();
21628
21521
  await this.renderIFrame(src);
21629
21522
  getAuthPromise().then(() => {
@@ -21886,7 +21779,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21886
21779
  * embedded Liveboard or visualization.
21887
21780
  */
21888
21781
  getEmbedParams() {
21889
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
21782
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
21890
21783
  let params = {};
21891
21784
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
21892
21785
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -21904,7 +21797,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
21904
21797
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
21905
21798
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
21906
21799
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
21907
- params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
21908
21800
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
21909
21801
  params = this.getBaseQueryParams(params);
21910
21802
  if (!isUndefined(updatedSpotterChatPrompt)) {
@@ -23469,38 +23361,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
23469
23361
  * ```
23470
23362
  */
23471
23363
  const PreRenderedSearchBarEmbed = componentFactory(SearchBarEmbed$1, true);
23472
- /**
23473
- * React component for LLM based search Sage embed.
23474
- * @example
23475
- * ```tsx
23476
- * function Sage() {
23477
- * return <SageEmbed
23478
- * showObjectResults={true}
23479
- * ... other view config props or event listeners.
23480
- * />
23481
- * }
23482
- * ```
23483
- */
23484
- const SageEmbed = componentFactory(SageEmbed$1);
23485
- /**
23486
- * React component for PreRendered Sage embed.
23487
- *
23488
- * PreRenderedSageEmbed will preRender the SageEmbed and will be hidden by
23489
- * default.
23490
- *
23491
- * SageEmbed with preRenderId passed will call showPreRender on the embed.
23492
- * @example
23493
- * ```tsx
23494
- * function LandingPageComponent() {
23495
- * return <PreRenderedSageEmbed preRenderId="someId" showObjectResults={true} />
23496
- * }
23497
- * ```
23498
- * function MyComponent() {
23499
- * return <SageEmbed preRenderId="someId" showObjectResults={true} />
23500
- * }
23501
- * ```
23502
- */
23503
- const PreRenderedSageEmbed = componentFactory(SageEmbed$1, true);
23504
23364
  /**
23505
23365
  * React component for LLM based conversation BI.
23506
23366
  * @example
@@ -31092,10 +30952,8 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
31092
30952
  exports.PreRenderedConversationEmbed = PreRenderedConversationEmbed;
31093
30953
  exports.PreRenderedLiveboardEmbed = PreRenderedLiveboardEmbed;
31094
30954
  exports.PreRenderedPinboardEmbed = PreRenderedPinboardEmbed;
31095
- exports.PreRenderedSageEmbed = PreRenderedSageEmbed;
31096
30955
  exports.PreRenderedSearchBarEmbed = PreRenderedSearchBarEmbed;
31097
30956
  exports.PreRenderedSearchEmbed = PreRenderedSearchEmbed;
31098
- exports.SageEmbed = SageEmbed;
31099
30957
  exports.SearchBarEmbed = SearchBarEmbed;
31100
30958
  exports.SearchEmbed = SearchEmbed;
31101
30959
  exports.SpotterEmbed = SpotterEmbed;