@thoughtspot/visual-embed-sdk 1.33.3 → 1.33.5

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 (145) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/config.d.ts.map +1 -1
  3. package/cjs/src/config.js.map +1 -1
  4. package/cjs/src/embed/app.d.ts +20 -6
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +3 -3
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +10 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts +4 -1
  11. package/cjs/src/embed/base.d.ts.map +1 -1
  12. package/cjs/src/embed/base.js +14 -6
  13. package/cjs/src/embed/base.js.map +1 -1
  14. package/cjs/src/embed/base.spec.js +58 -4
  15. package/cjs/src/embed/base.spec.js.map +1 -1
  16. package/cjs/src/embed/bodyless-conversation.d.ts +17 -0
  17. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/bodyless-conversation.js +13 -0
  19. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.d.ts.map +1 -1
  21. package/cjs/src/embed/conversation.js +4 -0
  22. package/cjs/src/embed/conversation.js.map +1 -1
  23. package/cjs/src/embed/conversation.spec.js +13 -0
  24. package/cjs/src/embed/conversation.spec.js.map +1 -1
  25. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  26. package/cjs/src/embed/liveboard.js +1 -2
  27. package/cjs/src/embed/liveboard.js.map +1 -1
  28. package/cjs/src/embed/liveboard.spec.js +2 -2
  29. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  30. package/cjs/src/embed/sage.d.ts.map +1 -1
  31. package/cjs/src/embed/sage.js +0 -1
  32. package/cjs/src/embed/sage.js.map +1 -1
  33. package/cjs/src/embed/search.js +1 -1
  34. package/cjs/src/embed/search.js.map +1 -1
  35. package/cjs/src/embed/search.spec.js +6 -6
  36. package/cjs/src/embed/search.spec.js.map +1 -1
  37. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  38. package/cjs/src/embed/ts-embed.js +13 -2
  39. package/cjs/src/embed/ts-embed.js.map +1 -1
  40. package/cjs/src/embed/ts-embed.spec.js +41 -1
  41. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  42. package/cjs/src/errors.d.ts +1 -0
  43. package/cjs/src/errors.d.ts.map +1 -1
  44. package/cjs/src/errors.js +10 -9
  45. package/cjs/src/errors.js.map +1 -1
  46. package/cjs/src/react/index.spec.js +2 -2
  47. package/cjs/src/react/index.spec.js.map +1 -1
  48. package/cjs/src/types.d.ts +75 -22
  49. package/cjs/src/types.d.ts.map +1 -1
  50. package/cjs/src/types.js +33 -16
  51. package/cjs/src/types.js.map +1 -1
  52. package/dist/{index-Ck3m4Sis.js → index-CAHz286m.js} +1 -1
  53. package/dist/src/config.d.ts.map +1 -1
  54. package/dist/src/embed/app.d.ts +20 -6
  55. package/dist/src/embed/app.d.ts.map +1 -1
  56. package/dist/src/embed/base.d.ts +4 -1
  57. package/dist/src/embed/base.d.ts.map +1 -1
  58. package/dist/src/embed/bodyless-conversation.d.ts +17 -0
  59. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  60. package/dist/src/embed/conversation.d.ts.map +1 -1
  61. package/dist/src/embed/liveboard.d.ts.map +1 -1
  62. package/dist/src/embed/sage.d.ts.map +1 -1
  63. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  64. package/dist/src/errors.d.ts +1 -0
  65. package/dist/src/errors.d.ts.map +1 -1
  66. package/dist/src/types.d.ts +75 -22
  67. package/dist/src/types.d.ts.map +1 -1
  68. package/dist/tsembed-react.es.js +188 -91
  69. package/dist/tsembed-react.js +187 -90
  70. package/dist/tsembed.es.js +210 -93
  71. package/dist/tsembed.js +209 -92
  72. package/dist/visual-embed-sdk-react-full.d.ts +116 -29
  73. package/dist/visual-embed-sdk-react.d.ts +116 -29
  74. package/dist/visual-embed-sdk.d.ts +116 -29
  75. package/lib/package.json +1 -1
  76. package/lib/src/config.d.ts.map +1 -1
  77. package/lib/src/config.js.map +1 -1
  78. package/lib/src/embed/app.d.ts +20 -6
  79. package/lib/src/embed/app.d.ts.map +1 -1
  80. package/lib/src/embed/app.js +3 -3
  81. package/lib/src/embed/app.js.map +1 -1
  82. package/lib/src/embed/app.spec.js +10 -0
  83. package/lib/src/embed/app.spec.js.map +1 -1
  84. package/lib/src/embed/base.d.ts +4 -1
  85. package/lib/src/embed/base.d.ts.map +1 -1
  86. package/lib/src/embed/base.js +15 -7
  87. package/lib/src/embed/base.js.map +1 -1
  88. package/lib/src/embed/base.spec.js +58 -4
  89. package/lib/src/embed/base.spec.js.map +1 -1
  90. package/lib/src/embed/bodyless-conversation.d.ts +17 -0
  91. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  92. package/lib/src/embed/bodyless-conversation.js +13 -0
  93. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  94. package/lib/src/embed/conversation.d.ts.map +1 -1
  95. package/lib/src/embed/conversation.js +4 -0
  96. package/lib/src/embed/conversation.js.map +1 -1
  97. package/lib/src/embed/conversation.spec.js +13 -0
  98. package/lib/src/embed/conversation.spec.js.map +1 -1
  99. package/lib/src/embed/liveboard.d.ts.map +1 -1
  100. package/lib/src/embed/liveboard.js +1 -2
  101. package/lib/src/embed/liveboard.js.map +1 -1
  102. package/lib/src/embed/liveboard.spec.js +2 -2
  103. package/lib/src/embed/liveboard.spec.js.map +1 -1
  104. package/lib/src/embed/sage.d.ts.map +1 -1
  105. package/lib/src/embed/sage.js +0 -1
  106. package/lib/src/embed/sage.js.map +1 -1
  107. package/lib/src/embed/search.js +1 -1
  108. package/lib/src/embed/search.js.map +1 -1
  109. package/lib/src/embed/search.spec.js +6 -6
  110. package/lib/src/embed/search.spec.js.map +1 -1
  111. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  112. package/lib/src/embed/ts-embed.js +13 -2
  113. package/lib/src/embed/ts-embed.js.map +1 -1
  114. package/lib/src/embed/ts-embed.spec.js +42 -2
  115. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  116. package/lib/src/errors.d.ts +1 -0
  117. package/lib/src/errors.d.ts.map +1 -1
  118. package/lib/src/errors.js +10 -9
  119. package/lib/src/errors.js.map +1 -1
  120. package/lib/src/react/index.spec.js +2 -2
  121. package/lib/src/react/index.spec.js.map +1 -1
  122. package/lib/src/types.d.ts +75 -22
  123. package/lib/src/types.d.ts.map +1 -1
  124. package/lib/src/types.js +33 -16
  125. package/lib/src/types.js.map +1 -1
  126. package/lib/src/visual-embed-sdk.d.ts +116 -29
  127. package/package.json +1 -1
  128. package/src/config.ts +0 -1
  129. package/src/embed/app.spec.ts +15 -0
  130. package/src/embed/app.ts +23 -8
  131. package/src/embed/base.spec.ts +61 -4
  132. package/src/embed/base.ts +21 -7
  133. package/src/embed/bodyless-conversation.ts +17 -0
  134. package/src/embed/conversation.spec.ts +16 -0
  135. package/src/embed/conversation.ts +4 -0
  136. package/src/embed/liveboard.spec.ts +2 -2
  137. package/src/embed/liveboard.ts +1 -2
  138. package/src/embed/sage.ts +0 -1
  139. package/src/embed/search.spec.ts +6 -6
  140. package/src/embed/search.ts +1 -1
  141. package/src/embed/ts-embed.spec.ts +48 -1
  142. package/src/embed/ts-embed.ts +16 -2
  143. package/src/errors.ts +10 -9
  144. package/src/react/index.spec.tsx +2 -2
  145. package/src/types.ts +71 -20
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.33.3 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.33.5 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1562,22 +1562,26 @@
1562
1562
  */
1563
1563
  EmbedEvent["Rename"] = "rename";
1564
1564
  /**
1565
- * Emitted if the user wants to intercept the search execution
1566
- * and implement logic to decide whether to run the search or not
1567
1565
  *
1568
- * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
1566
+ * This event can be emitted to intercept search execution initiated by
1567
+ * the users and implement the logic to allow or restrict search execution.
1568
+ * You can can also show custom error text if the search query must be
1569
+ * restricted due to your application or business requirements.
1570
+
1571
+ * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
1569
1572
  * for this embed event to get emitted.
1570
1573
  * @param: payload
1571
1574
  * @param: responder
1572
1575
  * Contains elements that lets developers define whether ThoughtSpot
1573
- * will run the search or not, and if not, which error message to provide.
1576
+ * should run the search, and if not, what error message
1577
+ * should be shown to the user.
1574
1578
  *
1575
- * execute: When execute returns true, the search will be run.
1576
- * When execute returns false, the search will not be executed.
1579
+ * execute: When execute returns `true`, the search will be run.
1580
+ * When execute returns `false`, the search will not be executed.
1577
1581
  *
1578
- * error: Developers can customize the user facing message when execute is
1579
- * set to false using the error parameter in responder
1580
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1582
+ * error: Developers can customize the error message text when `execute`
1583
+ * returns `false` using the error parameter in responder.
1584
+ * @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
1581
1585
  * @example
1582
1586
  *```js
1583
1587
  * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
@@ -1617,15 +1621,15 @@
1617
1621
  */
1618
1622
  EmbedEvent["OnBeforeGetVizDataIntercept"] = "onBeforeGetVizDataIntercept";
1619
1623
  /**
1620
- * Emitted when parameter changes in an answer
1621
- * or liveboard
1624
+ * Emitted when parameter changes in an Answer
1625
+ * or Liveboard
1622
1626
  *
1623
1627
  * ```js
1624
1628
  * liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => {
1625
1629
  * console.log('payload', payload);
1626
1630
  * })
1627
1631
  *```
1628
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
1632
+ * @version SDK : 1.29.0 | Thoughtspot : 10.3.0.cl
1629
1633
  */
1630
1634
  EmbedEvent["ParameterChanged"] = "parameterChanged";
1631
1635
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
@@ -2356,11 +2360,13 @@
2356
2360
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
2357
2361
  *
2358
2362
  * `values` - An array of one or several values. The value definition on the
2359
- * data type you choose to filter on. For a complete list of supported data types, see
2360
- * link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported data types]
2363
+ * data type you choose to filter on. For a complete list of supported data types,
2364
+ * see
2365
+ * link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported
2366
+ * data types].
2367
+ *
2361
2368
  * `type` - To update filters for date time, specify the date format type.
2362
2369
  * For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
2363
- *
2364
2370
  * @example
2365
2371
  * ```js
2366
2372
  *
@@ -2651,6 +2657,8 @@
2651
2657
  Param["ShowLiveboardReverifyBanner"] = "showLiveboardReverifyBanner";
2652
2658
  Param["LiveboardHeaderV2"] = "isLiveboardHeaderV2Enabled";
2653
2659
  Param["SpotterEnabled"] = "isSpotterExperienceEnabled";
2660
+ Param["IsUnifiedSearchExperienceEnabled"] = "isUnifiedSearchExperienceEnabled";
2661
+ Param["OverrideOrgId"] = "orgId";
2654
2662
  })(Param || (Param = {}));
2655
2663
  /**
2656
2664
  * ThoughtSpot application pages include actions and menu commands
@@ -3622,7 +3630,7 @@
3622
3630
  */
3623
3631
  Action["AIHighlights"] = "AIHighlights";
3624
3632
  /**
3625
- * Action ID for edit schedule action on schedule on homepage
3633
+ * Action ID for edit the schedule action on schedule on homepage
3626
3634
  * @example
3627
3635
  * ```js
3628
3636
  * disabledActions: [Action.EditScheduleHomepage]
@@ -3684,6 +3692,15 @@
3684
3692
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
3685
3693
  */
3686
3694
  Action["KPIAnalysisCTA"] = "kpiAnalysisCTA";
3695
+ /**
3696
+ * Action ID for disabling chip reorder in Answer and Liveboard
3697
+ * @example
3698
+ * ```js
3699
+ * const disabledActions = [Action.DisableChipReorder]
3700
+ * ```
3701
+ * @version SDK: 1.35.0 | Thoughtspot: 10.5.0.cl
3702
+ */
3703
+ Action["DisableChipReorder"] = "disableChipReorder";
3687
3704
  })(exports.Action || (exports.Action = {}));
3688
3705
  exports.PrefetchFeatures = void 0;
3689
3706
  (function (PrefetchFeatures) {
@@ -4127,17 +4144,17 @@
4127
4144
  var _Symbol = Symbol$1;
4128
4145
 
4129
4146
  /** Used for built-in method references. */
4130
- var objectProto$b = Object.prototype;
4147
+ var objectProto$c = Object.prototype;
4131
4148
 
4132
4149
  /** Used to check objects for own properties. */
4133
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
4150
+ var hasOwnProperty$a = objectProto$c.hasOwnProperty;
4134
4151
 
4135
4152
  /**
4136
4153
  * Used to resolve the
4137
4154
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4138
4155
  * of values.
4139
4156
  */
4140
- var nativeObjectToString$1 = objectProto$b.toString;
4157
+ var nativeObjectToString$1 = objectProto$c.toString;
4141
4158
 
4142
4159
  /** Built-in value references. */
4143
4160
  var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
@@ -4150,7 +4167,7 @@
4150
4167
  * @returns {string} Returns the raw `toStringTag`.
4151
4168
  */
4152
4169
  function getRawTag(value) {
4153
- var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
4170
+ var isOwn = hasOwnProperty$a.call(value, symToStringTag$1),
4154
4171
  tag = value[symToStringTag$1];
4155
4172
 
4156
4173
  try {
@@ -4172,14 +4189,14 @@
4172
4189
  var _getRawTag = getRawTag;
4173
4190
 
4174
4191
  /** Used for built-in method references. */
4175
- var objectProto$a = Object.prototype;
4192
+ var objectProto$b = Object.prototype;
4176
4193
 
4177
4194
  /**
4178
4195
  * Used to resolve the
4179
4196
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4180
4197
  * of values.
4181
4198
  */
4182
- var nativeObjectToString = objectProto$a.toString;
4199
+ var nativeObjectToString = objectProto$b.toString;
4183
4200
 
4184
4201
  /**
4185
4202
  * Converts `value` to a string using `Object.prototype.toString`.
@@ -4348,17 +4365,17 @@
4348
4365
 
4349
4366
  /** Used for built-in method references. */
4350
4367
  var funcProto = Function.prototype,
4351
- objectProto$9 = Object.prototype;
4368
+ objectProto$a = Object.prototype;
4352
4369
 
4353
4370
  /** Used to resolve the decompiled source of functions. */
4354
4371
  var funcToString = funcProto.toString;
4355
4372
 
4356
4373
  /** Used to check objects for own properties. */
4357
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
4374
+ var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
4358
4375
 
4359
4376
  /** Used to detect if a method is native. */
4360
4377
  var reIsNative = RegExp('^' +
4361
- funcToString.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
4378
+ funcToString.call(hasOwnProperty$9).replace(reRegExpChar, '\\$&')
4362
4379
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
4363
4380
  );
4364
4381
 
@@ -4455,10 +4472,10 @@
4455
4472
  var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
4456
4473
 
4457
4474
  /** Used for built-in method references. */
4458
- var objectProto$8 = Object.prototype;
4475
+ var objectProto$9 = Object.prototype;
4459
4476
 
4460
4477
  /** Used to check objects for own properties. */
4461
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
4478
+ var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
4462
4479
 
4463
4480
  /**
4464
4481
  * Gets the hash value for `key`.
@@ -4475,16 +4492,16 @@
4475
4492
  var result = data[key];
4476
4493
  return result === HASH_UNDEFINED$2 ? undefined : result;
4477
4494
  }
4478
- return hasOwnProperty$7.call(data, key) ? data[key] : undefined;
4495
+ return hasOwnProperty$8.call(data, key) ? data[key] : undefined;
4479
4496
  }
4480
4497
 
4481
4498
  var _hashGet = hashGet;
4482
4499
 
4483
4500
  /** Used for built-in method references. */
4484
- var objectProto$7 = Object.prototype;
4501
+ var objectProto$8 = Object.prototype;
4485
4502
 
4486
4503
  /** Used to check objects for own properties. */
4487
- var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
4504
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
4488
4505
 
4489
4506
  /**
4490
4507
  * Checks if a hash value for `key` exists.
@@ -4497,7 +4514,7 @@
4497
4514
  */
4498
4515
  function hashHas(key) {
4499
4516
  var data = this.__data__;
4500
- return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$6.call(data, key);
4517
+ return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$7.call(data, key);
4501
4518
  }
4502
4519
 
4503
4520
  var _hashHas = hashHas;
@@ -4978,10 +4995,10 @@
4978
4995
  var boolTag$2 = '[object Boolean]',
4979
4996
  dateTag$1 = '[object Date]',
4980
4997
  errorTag$1 = '[object Error]',
4981
- mapTag$2 = '[object Map]',
4998
+ mapTag$3 = '[object Map]',
4982
4999
  numberTag$1 = '[object Number]',
4983
5000
  regexpTag$1 = '[object RegExp]',
4984
- setTag$2 = '[object Set]',
5001
+ setTag$3 = '[object Set]',
4985
5002
  stringTag$1 = '[object String]',
4986
5003
  symbolTag = '[object Symbol]';
4987
5004
 
@@ -5043,10 +5060,10 @@
5043
5060
  // for more details.
5044
5061
  return object == (other + '');
5045
5062
 
5046
- case mapTag$2:
5063
+ case mapTag$3:
5047
5064
  var convert = _mapToArray;
5048
5065
 
5049
- case setTag$2:
5066
+ case setTag$3:
5050
5067
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
5051
5068
  convert || (convert = _setToArray);
5052
5069
 
@@ -5193,10 +5210,10 @@
5193
5210
  var stubArray_1 = stubArray;
5194
5211
 
5195
5212
  /** Used for built-in method references. */
5196
- var objectProto$6 = Object.prototype;
5213
+ var objectProto$7 = Object.prototype;
5197
5214
 
5198
5215
  /** Built-in value references. */
5199
- var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable;
5216
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
5200
5217
 
5201
5218
  /* Built-in method references for those with the same name as other `lodash` methods. */
5202
5219
  var nativeGetSymbols = Object.getOwnPropertySymbols;
@@ -5288,13 +5305,13 @@
5288
5305
  var _baseIsArguments = baseIsArguments;
5289
5306
 
5290
5307
  /** Used for built-in method references. */
5291
- var objectProto$5 = Object.prototype;
5308
+ var objectProto$6 = Object.prototype;
5292
5309
 
5293
5310
  /** Used to check objects for own properties. */
5294
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
5311
+ var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
5295
5312
 
5296
5313
  /** Built-in value references. */
5297
- var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
5314
+ var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
5298
5315
 
5299
5316
  /**
5300
5317
  * Checks if `value` is likely an `arguments` object.
@@ -5315,7 +5332,7 @@
5315
5332
  * // => false
5316
5333
  */
5317
5334
  var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
5318
- return isObjectLike_1(value) && hasOwnProperty$5.call(value, 'callee') &&
5335
+ return isObjectLike_1(value) && hasOwnProperty$6.call(value, 'callee') &&
5319
5336
  !propertyIsEnumerable.call(value, 'callee');
5320
5337
  };
5321
5338
 
@@ -5447,11 +5464,11 @@
5447
5464
  dateTag = '[object Date]',
5448
5465
  errorTag = '[object Error]',
5449
5466
  funcTag = '[object Function]',
5450
- mapTag$1 = '[object Map]',
5467
+ mapTag$2 = '[object Map]',
5451
5468
  numberTag = '[object Number]',
5452
5469
  objectTag$2 = '[object Object]',
5453
5470
  regexpTag = '[object RegExp]',
5454
- setTag$1 = '[object Set]',
5471
+ setTag$2 = '[object Set]',
5455
5472
  stringTag = '[object String]',
5456
5473
  weakMapTag$1 = '[object WeakMap]';
5457
5474
 
@@ -5478,9 +5495,9 @@
5478
5495
  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag$1] =
5479
5496
  typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
5480
5497
  typedArrayTags[errorTag] = typedArrayTags[funcTag] =
5481
- typedArrayTags[mapTag$1] = typedArrayTags[numberTag] =
5498
+ typedArrayTags[mapTag$2] = typedArrayTags[numberTag] =
5482
5499
  typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] =
5483
- typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
5500
+ typedArrayTags[setTag$2] = typedArrayTags[stringTag] =
5484
5501
  typedArrayTags[weakMapTag$1] = false;
5485
5502
 
5486
5503
  /**
@@ -5568,10 +5585,10 @@
5568
5585
  var isTypedArray_1 = isTypedArray;
5569
5586
 
5570
5587
  /** Used for built-in method references. */
5571
- var objectProto$4 = Object.prototype;
5588
+ var objectProto$5 = Object.prototype;
5572
5589
 
5573
5590
  /** Used to check objects for own properties. */
5574
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
5591
+ var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
5575
5592
 
5576
5593
  /**
5577
5594
  * Creates an array of the enumerable property names of the array-like `value`.
@@ -5591,7 +5608,7 @@
5591
5608
  length = result.length;
5592
5609
 
5593
5610
  for (var key in value) {
5594
- if ((inherited || hasOwnProperty$4.call(value, key)) &&
5611
+ if ((inherited || hasOwnProperty$5.call(value, key)) &&
5595
5612
  !(skipIndexes && (
5596
5613
  // Safari 9 has enumerable `arguments.length` in strict mode.
5597
5614
  key == 'length' ||
@@ -5611,7 +5628,7 @@
5611
5628
  var _arrayLikeKeys = arrayLikeKeys;
5612
5629
 
5613
5630
  /** Used for built-in method references. */
5614
- var objectProto$3 = Object.prototype;
5631
+ var objectProto$4 = Object.prototype;
5615
5632
 
5616
5633
  /**
5617
5634
  * Checks if `value` is likely a prototype object.
@@ -5622,7 +5639,7 @@
5622
5639
  */
5623
5640
  function isPrototype(value) {
5624
5641
  var Ctor = value && value.constructor,
5625
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
5642
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
5626
5643
 
5627
5644
  return value === proto;
5628
5645
  }
@@ -5651,10 +5668,10 @@
5651
5668
  var _nativeKeys = nativeKeys;
5652
5669
 
5653
5670
  /** Used for built-in method references. */
5654
- var objectProto$2 = Object.prototype;
5671
+ var objectProto$3 = Object.prototype;
5655
5672
 
5656
5673
  /** Used to check objects for own properties. */
5657
- var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
5674
+ var hasOwnProperty$4 = objectProto$3.hasOwnProperty;
5658
5675
 
5659
5676
  /**
5660
5677
  * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
@@ -5669,7 +5686,7 @@
5669
5686
  }
5670
5687
  var result = [];
5671
5688
  for (var key in Object(object)) {
5672
- if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
5689
+ if (hasOwnProperty$4.call(object, key) && key != 'constructor') {
5673
5690
  result.push(key);
5674
5691
  }
5675
5692
  }
@@ -5760,10 +5777,10 @@
5760
5777
  var COMPARE_PARTIAL_FLAG$1 = 1;
5761
5778
 
5762
5779
  /** Used for built-in method references. */
5763
- var objectProto$1 = Object.prototype;
5780
+ var objectProto$2 = Object.prototype;
5764
5781
 
5765
5782
  /** Used to check objects for own properties. */
5766
- var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
5783
+ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
5767
5784
 
5768
5785
  /**
5769
5786
  * A specialized version of `baseIsEqualDeep` for objects with support for
@@ -5791,7 +5808,7 @@
5791
5808
  var index = objLength;
5792
5809
  while (index--) {
5793
5810
  var key = objProps[index];
5794
- if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
5811
+ if (!(isPartial ? key in other : hasOwnProperty$3.call(other, key))) {
5795
5812
  return false;
5796
5813
  }
5797
5814
  }
@@ -5866,10 +5883,10 @@
5866
5883
  var _WeakMap = WeakMap;
5867
5884
 
5868
5885
  /** `Object#toString` result references. */
5869
- var mapTag = '[object Map]',
5886
+ var mapTag$1 = '[object Map]',
5870
5887
  objectTag$1 = '[object Object]',
5871
5888
  promiseTag = '[object Promise]',
5872
- setTag = '[object Set]',
5889
+ setTag$1 = '[object Set]',
5873
5890
  weakMapTag = '[object WeakMap]';
5874
5891
 
5875
5892
  var dataViewTag = '[object DataView]';
@@ -5892,9 +5909,9 @@
5892
5909
 
5893
5910
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
5894
5911
  if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
5895
- (_Map && getTag(new _Map) != mapTag) ||
5912
+ (_Map && getTag(new _Map) != mapTag$1) ||
5896
5913
  (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
5897
- (_Set && getTag(new _Set) != setTag) ||
5914
+ (_Set && getTag(new _Set) != setTag$1) ||
5898
5915
  (_WeakMap && getTag(new _WeakMap) != weakMapTag)) {
5899
5916
  getTag = function(value) {
5900
5917
  var result = _baseGetTag(value),
@@ -5904,9 +5921,9 @@
5904
5921
  if (ctorString) {
5905
5922
  switch (ctorString) {
5906
5923
  case dataViewCtorString: return dataViewTag;
5907
- case mapCtorString: return mapTag;
5924
+ case mapCtorString: return mapTag$1;
5908
5925
  case promiseCtorString: return promiseTag;
5909
- case setCtorString: return setTag;
5926
+ case setCtorString: return setTag$1;
5910
5927
  case weakMapCtorString: return weakMapTag;
5911
5928
  }
5912
5929
  }
@@ -5925,10 +5942,10 @@
5925
5942
  objectTag = '[object Object]';
5926
5943
 
5927
5944
  /** Used for built-in method references. */
5928
- var objectProto = Object.prototype;
5945
+ var objectProto$1 = Object.prototype;
5929
5946
 
5930
5947
  /** Used to check objects for own properties. */
5931
- var hasOwnProperty$1 = objectProto.hasOwnProperty;
5948
+ var hasOwnProperty$2 = objectProto$1.hasOwnProperty;
5932
5949
 
5933
5950
  /**
5934
5951
  * A specialized version of `baseIsEqual` for arrays and objects which performs
@@ -5971,8 +5988,8 @@
5971
5988
  : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
5972
5989
  }
5973
5990
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
5974
- var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, '__wrapped__'),
5975
- othIsWrapped = othIsObj && hasOwnProperty$1.call(other, '__wrapped__');
5991
+ var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
5992
+ othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
5976
5993
 
5977
5994
  if (objIsWrapped || othIsWrapped) {
5978
5995
  var objUnwrapped = objIsWrapped ? object.value() : object,
@@ -6051,22 +6068,92 @@
6051
6068
 
6052
6069
  var isEqual_1 = isEqual;
6053
6070
 
6071
+ /** `Object#toString` result references. */
6072
+ var mapTag = '[object Map]',
6073
+ setTag = '[object Set]';
6074
+
6075
+ /** Used for built-in method references. */
6076
+ var objectProto = Object.prototype;
6077
+
6078
+ /** Used to check objects for own properties. */
6079
+ var hasOwnProperty$1 = objectProto.hasOwnProperty;
6080
+
6081
+ /**
6082
+ * Checks if `value` is an empty object, collection, map, or set.
6083
+ *
6084
+ * Objects are considered empty if they have no own enumerable string keyed
6085
+ * properties.
6086
+ *
6087
+ * Array-like values such as `arguments` objects, arrays, buffers, strings, or
6088
+ * jQuery-like collections are considered empty if they have a `length` of `0`.
6089
+ * Similarly, maps and sets are considered empty if they have a `size` of `0`.
6090
+ *
6091
+ * @static
6092
+ * @memberOf _
6093
+ * @since 0.1.0
6094
+ * @category Lang
6095
+ * @param {*} value The value to check.
6096
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
6097
+ * @example
6098
+ *
6099
+ * _.isEmpty(null);
6100
+ * // => true
6101
+ *
6102
+ * _.isEmpty(true);
6103
+ * // => true
6104
+ *
6105
+ * _.isEmpty(1);
6106
+ * // => true
6107
+ *
6108
+ * _.isEmpty([1, 2, 3]);
6109
+ * // => false
6110
+ *
6111
+ * _.isEmpty({ 'a': 1 });
6112
+ * // => false
6113
+ */
6114
+ function isEmpty$1(value) {
6115
+ if (value == null) {
6116
+ return true;
6117
+ }
6118
+ if (isArrayLike_1(value) &&
6119
+ (isArray_1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
6120
+ isBuffer_1(value) || isTypedArray_1(value) || isArguments_1(value))) {
6121
+ return !value.length;
6122
+ }
6123
+ var tag = _getTag(value);
6124
+ if (tag == mapTag || tag == setTag) {
6125
+ return !value.size;
6126
+ }
6127
+ if (_isPrototype(value)) {
6128
+ return !_baseKeys(value).length;
6129
+ }
6130
+ for (var key in value) {
6131
+ if (hasOwnProperty$1.call(value, key)) {
6132
+ return false;
6133
+ }
6134
+ }
6135
+ return true;
6136
+ }
6137
+
6138
+ var isEmpty_1 = isEmpty$1;
6139
+
6054
6140
  const ERROR_MESSAGE = {
6055
6141
  INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
6056
- LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
6057
- TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
6058
- SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
6059
- SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
6060
- 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.',
6061
- 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.',
6142
+ SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started',
6143
+ LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.',
6144
+ TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response',
6145
+ SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.',
6146
+ SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.',
6147
+ 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.',
6148
+ 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.',
6062
6149
  SDK_NOT_INITIALIZED: 'SDK not initialized',
6063
- SESSION_INFO_FAILED: 'Failed to get session info',
6150
+ SESSION_INFO_FAILED: 'Failed to get session information',
6064
6151
  INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
6065
6152
  MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
6066
- PRERENDER_ID_MISSING: 'PreRender id is required for preRender',
6153
+ PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
6067
6154
  SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
6068
6155
  CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.',
6069
- CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please setup CSP Correctly for the Application to start working. You can know more about setting CSP Correctly here: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n In case you are still facing error, please read: https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
6156
+ CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts',
6070
6157
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
6071
6158
  };
6072
6159
 
@@ -14193,10 +14280,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14193
14280
  return authPromise;
14194
14281
  };
14195
14282
  const hostUrlToFeatureUrl = {
14196
- [exports.PrefetchFeatures.SearchEmbed]: (url) => `${url}v2/#/embed/answer`,
14197
- [exports.PrefetchFeatures.LiveboardEmbed]: (url) => url,
14198
- [exports.PrefetchFeatures.FullApp]: (url) => url,
14199
- [exports.PrefetchFeatures.VizEmbed]: (url) => url,
14283
+ [exports.PrefetchFeatures.SearchEmbed]: (url, flags) => `${url}v2/?${flags}#/embed/answer`,
14284
+ [exports.PrefetchFeatures.LiveboardEmbed]: (url, flags) => `${url}?${flags}`,
14285
+ [exports.PrefetchFeatures.FullApp]: (url, flags) => `${url}?${flags}`,
14286
+ [exports.PrefetchFeatures.VizEmbed]: (url, flags) => `${url}?${flags}`,
14200
14287
  };
14201
14288
  /**
14202
14289
  * Prefetches static resources from the specified URL. Web browsers can then cache the
@@ -14204,10 +14291,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14204
14291
  * to your app.
14205
14292
  * @param url The URL provided for prefetch
14206
14293
  * @param prefetchFeatures Specify features which needs to be prefetched.
14294
+ * @param additionalFlags This can be used to add any URL flag.
14207
14295
  * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
14208
14296
  * @group Global methods
14209
14297
  */
14210
- const prefetch = (url, prefetchFeatures) => {
14298
+ const prefetch = (url, prefetchFeatures, additionalFlags) => {
14299
+ var _a;
14211
14300
  if (url === '') {
14212
14301
  // eslint-disable-next-line no-console
14213
14302
  logger$3.warn('The prefetch method does not have a valid URL');
@@ -14215,9 +14304,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14215
14304
  else {
14216
14305
  const features = prefetchFeatures || [exports.PrefetchFeatures.FullApp];
14217
14306
  let hostUrl = url || getEmbedConfig().thoughtSpotHost;
14307
+ const prefetchFlags = {
14308
+ [Param.EmbedApp]: true,
14309
+ ...(_a = getEmbedConfig()) === null || _a === void 0 ? void 0 : _a.additionalFlags,
14310
+ ...additionalFlags,
14311
+ };
14218
14312
  hostUrl = hostUrl[hostUrl.length - 1] === '/' ? hostUrl : `${hostUrl}/`;
14219
14313
  Array.from(new Set(features
14220
- .map((feature) => hostUrlToFeatureUrl[feature](hostUrl))))
14314
+ .map((feature) => hostUrlToFeatureUrl[feature](hostUrl, getQueryParamString(prefetchFlags)))))
14221
14315
  .forEach((prefetchUrl, index) => {
14222
14316
  const iFrame = document.createElement('iframe');
14223
14317
  iFrame.src = prefetchUrl;
@@ -14620,7 +14714,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14620
14714
  });
14621
14715
  }
14622
14716
 
14623
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.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 | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"30 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};
14717
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.33.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.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 | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.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":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"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","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"30 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};
14624
14718
 
14625
14719
  /**
14626
14720
  * Copyright (c) 2022
@@ -14899,6 +14993,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14899
14993
  if (hostAppUrl.includes('localhost') || hostAppUrl.includes('127.0.0.1')) {
14900
14994
  hostAppUrl = 'local-host';
14901
14995
  }
14996
+ queryParams[Param.EmbedApp] = true;
14902
14997
  queryParams[Param.HostAppUrl] = encodeURIComponent(hostAppUrl);
14903
14998
  queryParams[Param.ViewPortHeight] = window.innerHeight;
14904
14999
  queryParams[Param.ViewPortWidth] = window.innerWidth;
@@ -14926,7 +15021,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14926
15021
  if (this.embedConfig.currencyFormat) {
14927
15022
  queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
14928
15023
  }
14929
- const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, } = this.viewConfig;
15024
+ const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags: additionalFlagsFromView, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, disableRedirectionLinksInNewTab, overrideOrgId, } = this.viewConfig;
15025
+ const { additionalFlags: additionalFlagsFromInit } = this.embedConfig;
15026
+ const additionalFlags = {
15027
+ ...additionalFlagsFromInit,
15028
+ ...additionalFlagsFromView,
15029
+ };
14930
15030
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
14931
15031
  this.handleError('You cannot have both hidden actions and visible actions');
14932
15032
  return queryParams;
@@ -14982,9 +15082,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14982
15082
  if (disableRedirectionLinksInNewTab) {
14983
15083
  queryParams[Param.DisableRedirectionLinksInNewTab] = disableRedirectionLinksInNewTab;
14984
15084
  }
15085
+ if (overrideOrgId !== undefined) {
15086
+ queryParams[Param.OverrideOrgId] = overrideOrgId;
15087
+ }
14985
15088
  queryParams[Param.OverrideNativeConsole] = true;
14986
15089
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
14987
- if (additionalFlags && additionalFlags.constructor.name === 'Object') {
15090
+ if (isObject_1(additionalFlags) && !isEmpty_1(additionalFlags)) {
14988
15091
  Object.assign(queryParams, additionalFlags);
14989
15092
  }
14990
15093
  // Do not add any flags below this, as we want additional flags to
@@ -15764,11 +15867,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15764
15867
  * embedded Liveboard or visualization.
15765
15868
  */
15766
15869
  getEmbedParams() {
15767
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, 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,
15870
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
15768
15871
  /* eslint-disable-next-line max-len */
15769
- dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, } = this.viewConfig;
15872
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, } = this.viewConfig;
15770
15873
  let params = {};
15771
- params[Param.EmbedApp] = true;
15772
15874
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
15773
15875
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
15774
15876
  params[Param.HideApplicationSwitcher] = !!hideApplicationSwitcher;
@@ -15781,6 +15883,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15781
15883
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
15782
15884
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
15783
15885
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
15886
+ params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
15784
15887
  params = this.getBaseQueryParams(params);
15785
15888
  if (fullHeight === true) {
15786
15889
  params[Param.fullHeight] = true;
@@ -16057,9 +16160,8 @@ query GetEurekaVizSnapshots(
16057
16160
  */
16058
16161
  getEmbedParams() {
16059
16162
  let params = {};
16060
- params[Param.EmbedApp] = true;
16061
16163
  params = this.getBaseQueryParams(params);
16062
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, } = this.viewConfig;
16164
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, } = this.viewConfig;
16063
16165
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
16064
16166
  || this.viewConfig.preventPinboardFilterRemoval;
16065
16167
  if (fullHeight === true) {
@@ -16313,7 +16415,7 @@ query GetEurekaVizSnapshots(
16313
16415
  }
16314
16416
  getEmbedParams() {
16315
16417
  var _a;
16316
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
16418
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
16317
16419
  /* eslint-disable-next-line max-len */
16318
16420
  dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, collapseSearchBar = true, } = this.viewConfig;
16319
16421
  const queryParams = this.getBaseQueryParams();
@@ -16887,6 +16989,19 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
16887
16989
  /**
16888
16990
  * Create a conversation embed, which can be integrated inside
16889
16991
  * chatbots or other conversational interfaces.
16992
+ * @example
16993
+ * ```js
16994
+ * import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
16995
+ *
16996
+ * const conversation = new BodylessConversation({
16997
+ * worksheetId: 'worksheetId',
16998
+ * });
16999
+ *
17000
+ * const { container, error } = await conversation.sendMessage('show me sales by region');
17001
+ *
17002
+ * // append the container to the DOM
17003
+ * document.body.appendChild(container); // or to any other element
17004
+ * ```
16890
17005
  * @group Embed components
16891
17006
  * @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
16892
17007
  */
@@ -16937,6 +17052,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
16937
17052
  getIframeSrc() {
16938
17053
  const { worksheetId, searchOptions, } = this.viewConfig;
16939
17054
  const path = 'insights/conv-assist';
17055
+ if (!worksheetId) {
17056
+ this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
17057
+ }
16940
17058
  const queryParams = this.getBaseQueryParams();
16941
17059
  queryParams[Param.SpotterEnabled] = true;
16942
17060
  let query = '';
@@ -16984,7 +17102,6 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
16984
17102
  getEmbedParams() {
16985
17103
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
16986
17104
  const params = this.getBaseQueryParams();
16987
- params[Param.EmbedApp] = true;
16988
17105
  params[Param.IsSageEmbed] = true;
16989
17106
  params[Param.DisableWorksheetChange] = !!disableWorksheetChange;
16990
17107
  params[Param.HideWorksheetSelector] = !!hideWorksheetSelector;