@thoughtspot/visual-embed-sdk 1.41.0-pre-render-1 → 1.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +2 -4
  2. package/cjs/package.json +3 -3
  3. package/cjs/src/authToken.d.ts +1 -0
  4. package/cjs/src/authToken.d.ts.map +1 -1
  5. package/cjs/src/authToken.js +13 -3
  6. package/cjs/src/authToken.js.map +1 -1
  7. package/cjs/src/authToken.spec.js +29 -0
  8. package/cjs/src/authToken.spec.js.map +1 -1
  9. package/cjs/src/css-variables.d.ts +2 -1
  10. package/cjs/src/css-variables.d.ts.map +1 -1
  11. package/cjs/src/embed/app.d.ts +22 -1
  12. package/cjs/src/embed/app.d.ts.map +1 -1
  13. package/cjs/src/embed/app.js +22 -1
  14. package/cjs/src/embed/app.js.map +1 -1
  15. package/cjs/src/embed/app.spec.js +70 -3
  16. package/cjs/src/embed/app.spec.js.map +1 -1
  17. package/cjs/src/embed/bodyless-conversation.d.ts +0 -1
  18. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  19. package/cjs/src/embed/bodyless-conversation.js +3 -7
  20. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  21. package/cjs/src/embed/conversation.d.ts +2 -3
  22. package/cjs/src/embed/conversation.d.ts.map +1 -1
  23. package/cjs/src/embed/conversation.js +2 -7
  24. package/cjs/src/embed/conversation.js.map +1 -1
  25. package/cjs/src/embed/liveboard.d.ts +32 -1
  26. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  27. package/cjs/src/embed/liveboard.js +8 -25
  28. package/cjs/src/embed/liveboard.js.map +1 -1
  29. package/cjs/src/embed/liveboard.spec.js +96 -28
  30. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  31. package/cjs/src/embed/sage.d.ts +0 -1
  32. package/cjs/src/embed/sage.d.ts.map +1 -1
  33. package/cjs/src/embed/sage.js +6 -10
  34. package/cjs/src/embed/sage.js.map +1 -1
  35. package/cjs/src/embed/sage.spec.js +20 -10
  36. package/cjs/src/embed/sage.spec.js.map +1 -1
  37. package/cjs/src/embed/search-bar.d.ts +0 -1
  38. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  39. package/cjs/src/embed/search-bar.js +7 -11
  40. package/cjs/src/embed/search-bar.js.map +1 -1
  41. package/cjs/src/embed/search.d.ts +0 -1
  42. package/cjs/src/embed/search.d.ts.map +1 -1
  43. package/cjs/src/embed/search.js +8 -7
  44. package/cjs/src/embed/search.js.map +1 -1
  45. package/cjs/src/embed/search.spec.js +10 -10
  46. package/cjs/src/embed/search.spec.js.map +1 -1
  47. package/cjs/src/embed/ts-embed.d.ts +5 -7
  48. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  49. package/cjs/src/embed/ts-embed.js +25 -22
  50. package/cjs/src/embed/ts-embed.js.map +1 -1
  51. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  52. package/cjs/src/embed/ts-embed.spec.js +122 -0
  53. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  54. package/cjs/src/errors.d.ts +11 -0
  55. package/cjs/src/errors.d.ts.map +1 -1
  56. package/cjs/src/errors.js +12 -1
  57. package/cjs/src/errors.js.map +1 -1
  58. package/cjs/src/index.d.ts +2 -2
  59. package/cjs/src/index.d.ts.map +1 -1
  60. package/cjs/src/index.js +3 -1
  61. package/cjs/src/index.js.map +1 -1
  62. package/cjs/src/react/index.d.ts +1 -1
  63. package/cjs/src/react/index.d.ts.map +1 -1
  64. package/cjs/src/react/index.js +4 -2
  65. package/cjs/src/react/index.js.map +1 -1
  66. package/cjs/src/react/index.spec.js +1 -1
  67. package/cjs/src/react/index.spec.js.map +1 -1
  68. package/cjs/src/types.d.ts +163 -21
  69. package/cjs/src/types.d.ts.map +1 -1
  70. package/cjs/src/types.js +65 -22
  71. package/cjs/src/types.js.map +1 -1
  72. package/cjs/src/utils/custom-actions.d.ts +12 -0
  73. package/cjs/src/utils/custom-actions.d.ts.map +1 -0
  74. package/cjs/src/utils/custom-actions.js +180 -0
  75. package/cjs/src/utils/custom-actions.js.map +1 -0
  76. package/cjs/src/utils/custom-actions.spec.d.ts +2 -0
  77. package/cjs/src/utils/custom-actions.spec.d.ts.map +1 -0
  78. package/cjs/src/utils/custom-actions.spec.js +399 -0
  79. package/cjs/src/utils/custom-actions.spec.js.map +1 -0
  80. package/cjs/src/utils/processData.d.ts.map +1 -1
  81. package/cjs/src/utils/processData.js +10 -0
  82. package/cjs/src/utils/processData.js.map +1 -1
  83. package/cjs/src/utils/processData.spec.js +11 -0
  84. package/cjs/src/utils/processData.spec.js.map +1 -1
  85. package/cjs/src/utils.d.ts +21 -0
  86. package/cjs/src/utils.d.ts.map +1 -1
  87. package/cjs/src/utils.js +32 -1
  88. package/cjs/src/utils.js.map +1 -1
  89. package/cjs/src/utils.spec.js +38 -0
  90. package/cjs/src/utils.spec.js.map +1 -1
  91. package/dist/{index-CmEQfuE3.js → index-DQueHwfQ.js} +1 -1
  92. package/dist/src/authToken.d.ts +1 -0
  93. package/dist/src/authToken.d.ts.map +1 -1
  94. package/dist/src/css-variables.d.ts +2 -1
  95. package/dist/src/css-variables.d.ts.map +1 -1
  96. package/dist/src/embed/app.d.ts +22 -1
  97. package/dist/src/embed/app.d.ts.map +1 -1
  98. package/dist/src/embed/bodyless-conversation.d.ts +0 -1
  99. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  100. package/dist/src/embed/conversation.d.ts +2 -3
  101. package/dist/src/embed/conversation.d.ts.map +1 -1
  102. package/dist/src/embed/liveboard.d.ts +32 -1
  103. package/dist/src/embed/liveboard.d.ts.map +1 -1
  104. package/dist/src/embed/sage.d.ts +0 -1
  105. package/dist/src/embed/sage.d.ts.map +1 -1
  106. package/dist/src/embed/search-bar.d.ts +0 -1
  107. package/dist/src/embed/search-bar.d.ts.map +1 -1
  108. package/dist/src/embed/search.d.ts +0 -1
  109. package/dist/src/embed/search.d.ts.map +1 -1
  110. package/dist/src/embed/ts-embed.d.ts +5 -7
  111. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  112. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  113. package/dist/src/errors.d.ts +11 -0
  114. package/dist/src/errors.d.ts.map +1 -1
  115. package/dist/src/index.d.ts +2 -2
  116. package/dist/src/index.d.ts.map +1 -1
  117. package/dist/src/react/index.d.ts +1 -1
  118. package/dist/src/react/index.d.ts.map +1 -1
  119. package/dist/src/types.d.ts +163 -21
  120. package/dist/src/types.d.ts.map +1 -1
  121. package/dist/src/utils/custom-actions.d.ts +12 -0
  122. package/dist/src/utils/custom-actions.d.ts.map +1 -0
  123. package/dist/src/utils/custom-actions.spec.d.ts +2 -0
  124. package/dist/src/utils/custom-actions.spec.d.ts.map +1 -0
  125. package/dist/src/utils/processData.d.ts.map +1 -1
  126. package/dist/src/utils.d.ts +21 -0
  127. package/dist/src/utils.d.ts.map +1 -1
  128. package/dist/tsembed-react.es.js +1773 -251
  129. package/dist/tsembed-react.js +1772 -250
  130. package/dist/tsembed.es.js +1771 -250
  131. package/dist/tsembed.js +1770 -249
  132. package/dist/visual-embed-sdk-react-full.d.ts +228 -39
  133. package/dist/visual-embed-sdk-react.d.ts +228 -39
  134. package/dist/visual-embed-sdk.d.ts +228 -39
  135. package/lib/package.json +3 -3
  136. package/lib/src/authToken.d.ts +1 -0
  137. package/lib/src/authToken.d.ts.map +1 -1
  138. package/lib/src/authToken.js +11 -2
  139. package/lib/src/authToken.js.map +1 -1
  140. package/lib/src/authToken.spec.js +30 -1
  141. package/lib/src/authToken.spec.js.map +1 -1
  142. package/lib/src/css-variables.d.ts +2 -1
  143. package/lib/src/css-variables.d.ts.map +1 -1
  144. package/lib/src/embed/app.d.ts +22 -1
  145. package/lib/src/embed/app.d.ts.map +1 -1
  146. package/lib/src/embed/app.js +22 -1
  147. package/lib/src/embed/app.js.map +1 -1
  148. package/lib/src/embed/app.spec.js +70 -3
  149. package/lib/src/embed/app.spec.js.map +1 -1
  150. package/lib/src/embed/bodyless-conversation.d.ts +0 -1
  151. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  152. package/lib/src/embed/bodyless-conversation.js +3 -7
  153. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  154. package/lib/src/embed/conversation.d.ts +2 -3
  155. package/lib/src/embed/conversation.d.ts.map +1 -1
  156. package/lib/src/embed/conversation.js +2 -7
  157. package/lib/src/embed/conversation.js.map +1 -1
  158. package/lib/src/embed/liveboard.d.ts +32 -1
  159. package/lib/src/embed/liveboard.d.ts.map +1 -1
  160. package/lib/src/embed/liveboard.js +8 -25
  161. package/lib/src/embed/liveboard.js.map +1 -1
  162. package/lib/src/embed/liveboard.spec.js +96 -28
  163. package/lib/src/embed/liveboard.spec.js.map +1 -1
  164. package/lib/src/embed/sage.d.ts +0 -1
  165. package/lib/src/embed/sage.d.ts.map +1 -1
  166. package/lib/src/embed/sage.js +6 -10
  167. package/lib/src/embed/sage.js.map +1 -1
  168. package/lib/src/embed/sage.spec.js +20 -10
  169. package/lib/src/embed/sage.spec.js.map +1 -1
  170. package/lib/src/embed/search-bar.d.ts +0 -1
  171. package/lib/src/embed/search-bar.d.ts.map +1 -1
  172. package/lib/src/embed/search-bar.js +7 -11
  173. package/lib/src/embed/search-bar.js.map +1 -1
  174. package/lib/src/embed/search.d.ts +0 -1
  175. package/lib/src/embed/search.d.ts.map +1 -1
  176. package/lib/src/embed/search.js +8 -7
  177. package/lib/src/embed/search.js.map +1 -1
  178. package/lib/src/embed/search.spec.js +11 -11
  179. package/lib/src/embed/search.spec.js.map +1 -1
  180. package/lib/src/embed/ts-embed.d.ts +5 -7
  181. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  182. package/lib/src/embed/ts-embed.js +25 -22
  183. package/lib/src/embed/ts-embed.js.map +1 -1
  184. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  185. package/lib/src/embed/ts-embed.spec.js +123 -1
  186. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  187. package/lib/src/errors.d.ts +11 -0
  188. package/lib/src/errors.d.ts.map +1 -1
  189. package/lib/src/errors.js +11 -0
  190. package/lib/src/errors.js.map +1 -1
  191. package/lib/src/index.d.ts +2 -2
  192. package/lib/src/index.d.ts.map +1 -1
  193. package/lib/src/index.js +2 -2
  194. package/lib/src/index.js.map +1 -1
  195. package/lib/src/react/index.d.ts +1 -1
  196. package/lib/src/react/index.d.ts.map +1 -1
  197. package/lib/src/react/index.js +3 -2
  198. package/lib/src/react/index.js.map +1 -1
  199. package/lib/src/react/index.spec.js +1 -1
  200. package/lib/src/react/index.spec.js.map +1 -1
  201. package/lib/src/types.d.ts +163 -21
  202. package/lib/src/types.d.ts.map +1 -1
  203. package/lib/src/types.js +64 -21
  204. package/lib/src/types.js.map +1 -1
  205. package/lib/src/utils/custom-actions.d.ts +12 -0
  206. package/lib/src/utils/custom-actions.d.ts.map +1 -0
  207. package/lib/src/utils/custom-actions.js +175 -0
  208. package/lib/src/utils/custom-actions.js.map +1 -0
  209. package/lib/src/utils/custom-actions.spec.d.ts +2 -0
  210. package/lib/src/utils/custom-actions.spec.d.ts.map +1 -0
  211. package/lib/src/utils/custom-actions.spec.js +397 -0
  212. package/lib/src/utils/custom-actions.spec.js.map +1 -0
  213. package/lib/src/utils/processData.d.ts.map +1 -1
  214. package/lib/src/utils/processData.js +10 -0
  215. package/lib/src/utils/processData.js.map +1 -1
  216. package/lib/src/utils/processData.spec.js +11 -0
  217. package/lib/src/utils/processData.spec.js.map +1 -1
  218. package/lib/src/utils.d.ts +21 -0
  219. package/lib/src/utils.d.ts.map +1 -1
  220. package/lib/src/utils.js +29 -0
  221. package/lib/src/utils.js.map +1 -1
  222. package/lib/src/utils.spec.js +39 -1
  223. package/lib/src/utils.spec.js.map +1 -1
  224. package/lib/src/visual-embed-sdk.d.ts +229 -40
  225. package/package.json +3 -3
  226. package/src/authToken.spec.ts +48 -1
  227. package/src/authToken.ts +13 -2
  228. package/src/css-variables.ts +2 -1
  229. package/src/embed/app.spec.ts +99 -3
  230. package/src/embed/app.ts +44 -1
  231. package/src/embed/bodyless-conversation.ts +3 -8
  232. package/src/embed/conversation.ts +4 -19
  233. package/src/embed/liveboard.spec.ts +128 -30
  234. package/src/embed/liveboard.ts +66 -52
  235. package/src/embed/sage.spec.ts +24 -10
  236. package/src/embed/sage.ts +7 -12
  237. package/src/embed/search-bar.tsx +7 -14
  238. package/src/embed/search.spec.ts +13 -14
  239. package/src/embed/search.ts +8 -19
  240. package/src/embed/ts-embed.spec.ts +136 -2
  241. package/src/embed/ts-embed.ts +31 -28
  242. package/src/errors.ts +12 -0
  243. package/src/index.ts +4 -0
  244. package/src/react/index.spec.tsx +1 -1
  245. package/src/react/index.tsx +5 -2
  246. package/src/types.ts +225 -79
  247. package/src/utils/custom-actions.spec.ts +431 -0
  248. package/src/utils/custom-actions.ts +217 -0
  249. package/src/utils/processData.spec.ts +12 -0
  250. package/src/utils/processData.ts +10 -0
  251. package/src/utils.spec.ts +52 -0
  252. package/src/utils.ts +31 -0
  253. package/dist/index-BDlM0f0T.js +0 -7371
  254. package/dist/index-D1pyb7RG.js +0 -7371
  255. package/dist/index-DeFzsyFF.js +0 -7371
  256. package/dist/index-Dpf0rd6w.js +0 -7371
  257. package/dist/index-UuEbsISo.js +0 -7447
  258. package/dist/index-e3Uw3YFO.js +0 -7371
  259. package/dist/index-k7pkZMhx.js +0 -7371
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.41.0-pre-render-1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.41.1 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -373,6 +373,15 @@ function storeValueInWindow(key, value, options = {}) {
373
373
  * @returns The stored value or `undefined` if the key is not found.
374
374
  */
375
375
  const getValueFromWindow = (key) => { var _a; return (_a = window === null || window === void 0 ? void 0 : window[sdkWindowKey]) === null || _a === void 0 ? void 0 : _a[key]; };
376
+ /**
377
+ * Check if an array includes a string value
378
+ * @param arr - The array to check
379
+ * @param key - The string to search for
380
+ * @returns boolean indicating if the string is found in the array
381
+ */
382
+ const arrayIncludesString = (arr, key) => {
383
+ return arr.some(item => typeof item === 'string' && item === key);
384
+ };
376
385
  /**
377
386
  * Check if the document is currently in fullscreen mode
378
387
  */
@@ -454,6 +463,26 @@ const calculateVisibleElementData = (element) => {
454
463
  width: Math.max(0, frameRelativeRight - frameRelativeLeft),
455
464
  };
456
465
  return data;
466
+ };
467
+ /**
468
+ * Replaces placeholders in a template string with provided values.
469
+ * Placeholders should be in the format {key}.
470
+ * @param template - The template string with placeholders
471
+ * @param values - An object containing key-value pairs to replace placeholders
472
+ * @returns The template string with placeholders replaced
473
+ * @example
474
+ * formatTemplate('Hello {name}, you are {age} years old', { name: 'John', age: 30 })
475
+ * // Returns: 'Hello John, you are 30 years old'
476
+ *
477
+ * formatTemplate('Expected {type}, but received {actual}', { type: 'string', actual: 'number' })
478
+ * // Returns: 'Expected string, but received number'
479
+ */
480
+ const formatTemplate = (template, values) => {
481
+ // This regex /\{(\w+)\}/g finds all placeholders in the format {word}
482
+ // and captures the word inside the braces for replacement.
483
+ return template.replace(/\{(\w+)\}/g, (match, key) => {
484
+ return values[key] !== undefined ? String(values[key]) : match;
485
+ });
457
486
  };
458
487
 
459
488
  /**
@@ -468,7 +497,6 @@ const calculateVisibleElementData = (element) => {
468
497
  * the embedded app
469
498
  * @group Authentication / Init
470
499
  */
471
- // eslint-disable-next-line no-shadow
472
500
  var AuthType;
473
501
  (function (AuthType) {
474
502
  /**
@@ -682,7 +710,6 @@ var HomeLeftNavItem;
682
710
  /**
683
711
  * A map of the supported runtime filter operations
684
712
  */
685
- // eslint-disable-next-line no-shadow
686
713
  var RuntimeFilterOp;
687
714
  (function (RuntimeFilterOp) {
688
715
  /**
@@ -753,7 +780,6 @@ var RuntimeFilterOp;
753
780
  * `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
754
781
  * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
755
782
  */
756
- // eslint-disable-next-line no-shadow
757
783
  var HomepageModule;
758
784
  (function (HomepageModule) {
759
785
  /**
@@ -786,7 +812,6 @@ var HomepageModule;
786
812
  * **Note**: This option is applicable to full app embedding only.
787
813
  * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
788
814
  */
789
- // eslint-disable-next-line no-shadow
790
815
  var ListPageColumns;
791
816
  (function (ListPageColumns) {
792
817
  /**
@@ -849,7 +874,6 @@ var ListPageColumns;
849
874
  * ```
850
875
  * @group Events
851
876
  */
852
- // eslint-disable-next-line no-shadow
853
877
  var EmbedEvent;
854
878
  (function (EmbedEvent) {
855
879
  /**
@@ -1491,6 +1515,11 @@ var EmbedEvent;
1491
1515
  * @hidden
1492
1516
  */
1493
1517
  EmbedEvent["APP_INIT"] = "appInit";
1518
+ /**
1519
+ * Internal event to clear the cached info
1520
+ * @hidden
1521
+ */
1522
+ EmbedEvent["CLEAR_INFO_CACHE"] = "clearInfoCache";
1494
1523
  /**
1495
1524
  * Emitted when a user clicks **Show Liveboard details** on a Liveboard
1496
1525
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
@@ -1959,6 +1988,17 @@ var EmbedEvent;
1959
1988
  * ```
1960
1989
  */
1961
1990
  EmbedEvent["EmbedListenerReady"] = "EmbedListenerReady";
1991
+ /**
1992
+ * Emitted when the organization is switched.
1993
+ * @example
1994
+ * ```js
1995
+ * appEmbed.on(EmbedEvent.OrgSwitched, (payload) => {
1996
+ * console.log('payload', payload);
1997
+ * })
1998
+ * ```
1999
+ * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2000
+ */
2001
+ EmbedEvent["OrgSwitched"] = "orgSwitched";
1962
2002
  })(EmbedEvent || (EmbedEvent = {}));
1963
2003
  /**
1964
2004
  * Event types that can be triggered by the host application
@@ -2013,7 +2053,6 @@ var EmbedEvent;
2013
2053
  * ```
2014
2054
  * @group Events
2015
2055
  */
2016
- // eslint-disable-next-line no-shadow
2017
2056
  var HostEvent;
2018
2057
  (function (HostEvent) {
2019
2058
  /**
@@ -2877,7 +2916,7 @@ var HostEvent;
2877
2916
  * column: "Date",
2878
2917
  * oper: 'EQ',
2879
2918
  * values: ["2023-07-31"],
2880
- * types: "EXACT_DATE"
2919
+ * type: "EXACT_DATE"
2881
2920
  * }]
2882
2921
  * });
2883
2922
  * ```
@@ -3223,22 +3262,11 @@ var HostEvent;
3223
3262
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
3224
3263
  */
3225
3264
  HostEvent["AskSpotter"] = "AskSpotter";
3226
- /**
3227
- * @hidden
3228
- * Triggers the update of the embed params.
3229
- *
3230
- * @example
3231
- * ```js
3232
- * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
3233
- * ```
3234
- */
3235
- HostEvent["UpdateEmbedParams"] = "updateEmbedParams";
3236
3265
  })(HostEvent || (HostEvent = {}));
3237
3266
  /**
3238
3267
  * The different visual modes that the data sources panel within
3239
3268
  * search could appear in, such as hidden, collapsed, or expanded.
3240
3269
  */
3241
- // eslint-disable-next-line no-shadow
3242
3270
  var DataSourceVisualMode;
3243
3271
  (function (DataSourceVisualMode) {
3244
3272
  /**
@@ -3258,7 +3286,6 @@ var DataSourceVisualMode;
3258
3286
  * The query params passed down to the embedded ThoughtSpot app
3259
3287
  * containing configuration and/or visual information.
3260
3288
  */
3261
- // eslint-disable-next-line no-shadow
3262
3289
  var Param;
3263
3290
  (function (Param) {
3264
3291
  Param["EmbedApp"] = "embedApp";
@@ -3338,6 +3365,7 @@ var Param;
3338
3365
  Param["Query"] = "query";
3339
3366
  Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
3340
3367
  Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
3368
+ Param["HomepageVersion"] = "homepageVersion";
3341
3369
  Param["ListPageVersion"] = "listpageVersion";
3342
3370
  Param["PendoTrackingKey"] = "additionalPendoKey";
3343
3371
  Param["LiveboardHeaderSticky"] = "isLiveboardHeaderSticky";
@@ -3379,6 +3407,8 @@ var Param;
3379
3407
  Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
3380
3408
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
3381
3409
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3410
+ Param["LiveboardXLSXCSVDownload"] = "isLiveboardXLSXCSVDownloadEnabled";
3411
+ Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
3382
3412
  })(Param || (Param = {}));
3383
3413
  /**
3384
3414
  * ThoughtSpot application pages include actions and menu commands
@@ -3407,7 +3437,6 @@ var Param;
3407
3437
  * ```
3408
3438
  * See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
3409
3439
  */
3410
- // eslint-disable-next-line no-shadow
3411
3440
  var Action;
3412
3441
  (function (Action) {
3413
3442
  /**
@@ -3952,7 +3981,7 @@ var Action;
3952
3981
  * The Favorites icon (*) for Answers,
3953
3982
  * Liveboard, and data objects like Worksheet, Model,
3954
3983
  * Tables and Views.
3955
- * Allows adding an object to the users favorites list.
3984
+ * Allows adding an object to the user's favorites list.
3956
3985
  * @example
3957
3986
  * ```js
3958
3987
  * disabledActions: [Action.AddToFavorites]
@@ -4661,6 +4690,29 @@ var Action;
4661
4690
  * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl
4662
4691
  */
4663
4692
  Action["SpotterTokenQuickEdit"] = "SpotterTokenQuickEdit";
4693
+ /**
4694
+ * The **PNG screenshot in email** option in the schedule email dialog.
4695
+ * Includes a PNG screenshot in the notification email body.
4696
+ * @example
4697
+ * ```js
4698
+ * disabledActions: [Action.PngScreenshotInEmail]
4699
+ * ```
4700
+ * ```
4701
+ * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
4702
+ */
4703
+ Action["PngScreenshotInEmail"] = "pngScreenshotInEmail";
4704
+ /**
4705
+ * The **Remove attachment** action in the schedule email dialog.
4706
+ * Removes an attachment from the email configuration.
4707
+ * @example
4708
+ * ```js
4709
+ * disabledActions: [Action.RemoveAttachment]
4710
+ * ```
4711
+ * ```
4712
+ * ```
4713
+ * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl
4714
+ */
4715
+ Action["RemoveAttachment"] = "removeAttachment";
4664
4716
  })(Action || (Action = {}));
4665
4717
  var PrefetchFeatures;
4666
4718
  (function (PrefetchFeatures) {
@@ -4679,6 +4731,26 @@ var ContextMenuTriggerOptions;
4679
4731
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
4680
4732
  ContextMenuTriggerOptions["BOTH_CLICKS"] = "both-clicks";
4681
4733
  })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
4734
+ /**
4735
+ * Enum options to show custom actions at different
4736
+ * positions in the application.
4737
+ */
4738
+ var CustomActionsPosition;
4739
+ (function (CustomActionsPosition) {
4740
+ CustomActionsPosition["PRIMARY"] = "PRIMARY";
4741
+ CustomActionsPosition["MENU"] = "MENU";
4742
+ CustomActionsPosition["CONTEXTMENU"] = "CONTEXTMENU";
4743
+ })(CustomActionsPosition || (CustomActionsPosition = {}));
4744
+ /**
4745
+ * Enum options to mention the target of the custom action.
4746
+ */
4747
+ var CustomActionTarget;
4748
+ (function (CustomActionTarget) {
4749
+ CustomActionTarget["LIVEBOARD"] = "LIVEBOARD";
4750
+ CustomActionTarget["VIZ"] = "VIZ";
4751
+ CustomActionTarget["ANSWER"] = "ANSWER";
4752
+ CustomActionTarget["SPOTTER"] = "SPOTTER";
4753
+ })(CustomActionTarget || (CustomActionTarget = {}));
4682
4754
  /**
4683
4755
  * Enum options to show or suppress Visual Embed SDK and
4684
4756
  * ThoughtSpot application logs in the console output.
@@ -5835,8 +5907,8 @@ function cacheHas(cache, key) {
5835
5907
  var _cacheHas = cacheHas;
5836
5908
 
5837
5909
  /** Used to compose bitmasks for value comparisons. */
5838
- var COMPARE_PARTIAL_FLAG$3 = 1,
5839
- COMPARE_UNORDERED_FLAG$1 = 2;
5910
+ var COMPARE_PARTIAL_FLAG$5 = 1,
5911
+ COMPARE_UNORDERED_FLAG$3 = 2;
5840
5912
 
5841
5913
  /**
5842
5914
  * A specialized version of `baseIsEqualDeep` for arrays with support for
@@ -5852,7 +5924,7 @@ var COMPARE_PARTIAL_FLAG$3 = 1,
5852
5924
  * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
5853
5925
  */
5854
5926
  function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5855
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
5927
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5,
5856
5928
  arrLength = array.length,
5857
5929
  othLength = other.length;
5858
5930
 
@@ -5867,7 +5939,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5867
5939
  }
5868
5940
  var index = -1,
5869
5941
  result = true,
5870
- seen = (bitmask & COMPARE_UNORDERED_FLAG$1) ? new _SetCache : undefined;
5942
+ seen = (bitmask & COMPARE_UNORDERED_FLAG$3) ? new _SetCache : undefined;
5871
5943
 
5872
5944
  stack.set(array, other);
5873
5945
  stack.set(other, array);
@@ -5959,8 +6031,8 @@ function setToArray(set) {
5959
6031
  var _setToArray = setToArray;
5960
6032
 
5961
6033
  /** Used to compose bitmasks for value comparisons. */
5962
- var COMPARE_PARTIAL_FLAG$2 = 1,
5963
- COMPARE_UNORDERED_FLAG = 2;
6034
+ var COMPARE_PARTIAL_FLAG$4 = 1,
6035
+ COMPARE_UNORDERED_FLAG$2 = 2;
5964
6036
 
5965
6037
  /** `Object#toString` result references. */
5966
6038
  var boolTag$1 = '[object Boolean]',
@@ -5971,14 +6043,14 @@ var boolTag$1 = '[object Boolean]',
5971
6043
  regexpTag$1 = '[object RegExp]',
5972
6044
  setTag$3 = '[object Set]',
5973
6045
  stringTag$1 = '[object String]',
5974
- symbolTag = '[object Symbol]';
6046
+ symbolTag$1 = '[object Symbol]';
5975
6047
 
5976
6048
  var arrayBufferTag$1 = '[object ArrayBuffer]',
5977
6049
  dataViewTag$2 = '[object DataView]';
5978
6050
 
5979
6051
  /** Used to convert symbols to primitives and strings. */
5980
- var symbolProto = _Symbol ? _Symbol.prototype : undefined,
5981
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
6052
+ var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined,
6053
+ symbolValueOf = symbolProto$1 ? symbolProto$1.valueOf : undefined;
5982
6054
 
5983
6055
  /**
5984
6056
  * A specialized version of `baseIsEqualDeep` for comparing objects of
@@ -6035,7 +6107,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6035
6107
  var convert = _mapToArray;
6036
6108
 
6037
6109
  case setTag$3:
6038
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
6110
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
6039
6111
  convert || (convert = _setToArray);
6040
6112
 
6041
6113
  if (object.size != other.size && !isPartial) {
@@ -6046,7 +6118,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6046
6118
  if (stacked) {
6047
6119
  return stacked == other;
6048
6120
  }
6049
- bitmask |= COMPARE_UNORDERED_FLAG;
6121
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
6050
6122
 
6051
6123
  // Recursively compare objects (susceptible to call stack limits).
6052
6124
  stack.set(object, other);
@@ -6054,7 +6126,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
6054
6126
  stack['delete'](object);
6055
6127
  return result;
6056
6128
 
6057
- case symbolTag:
6129
+ case symbolTag$1:
6058
6130
  if (symbolValueOf) {
6059
6131
  return symbolValueOf.call(object) == symbolValueOf.call(other);
6060
6132
  }
@@ -6745,7 +6817,7 @@ function getAllKeys(object) {
6745
6817
  var _getAllKeys = getAllKeys;
6746
6818
 
6747
6819
  /** Used to compose bitmasks for value comparisons. */
6748
- var COMPARE_PARTIAL_FLAG$1 = 1;
6820
+ var COMPARE_PARTIAL_FLAG$3 = 1;
6749
6821
 
6750
6822
  /** Used for built-in method references. */
6751
6823
  var objectProto$2 = Object.prototype;
@@ -6767,7 +6839,7 @@ var hasOwnProperty$3 = objectProto$2.hasOwnProperty;
6767
6839
  * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
6768
6840
  */
6769
6841
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
6770
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1,
6842
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3,
6771
6843
  objProps = _getAllKeys(object),
6772
6844
  objLength = objProps.length,
6773
6845
  othProps = _getAllKeys(other),
@@ -6905,7 +6977,7 @@ if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag) ||
6905
6977
  var _getTag = getTag;
6906
6978
 
6907
6979
  /** Used to compose bitmasks for value comparisons. */
6908
- var COMPARE_PARTIAL_FLAG = 1;
6980
+ var COMPARE_PARTIAL_FLAG$2 = 1;
6909
6981
 
6910
6982
  /** `Object#toString` result references. */
6911
6983
  var argsTag = '[object Arguments]',
@@ -6958,7 +7030,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
6958
7030
  ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
6959
7031
  : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
6960
7032
  }
6961
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
7033
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
6962
7034
  var objIsWrapped = objIsObj && hasOwnProperty$2.call(object, '__wrapped__'),
6963
7035
  othIsWrapped = othIsObj && hasOwnProperty$2.call(other, '__wrapped__');
6964
7036
 
@@ -7120,6 +7192,7 @@ const ERROR_MESSAGE = {
7120
7192
  SDK_NOT_INITIALIZED: 'SDK not initialized',
7121
7193
  SESSION_INFO_FAILED: 'Failed to get session information',
7122
7194
  INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.',
7195
+ INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.',
7123
7196
  MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info',
7124
7197
  PRERENDER_ID_MISSING: 'PreRender ID is required for preRender',
7125
7198
  SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle',
@@ -7128,6 +7201,16 @@ const ERROR_MESSAGE = {
7128
7201
  MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported',
7129
7202
  RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk',
7130
7203
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7204
+ };
7205
+ const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7206
+ INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
7207
+ MISSING_REQUIRED_FIELDS: (id, missingFields) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`,
7208
+ UNSUPPORTED_TARGET: (id, targetType) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`,
7209
+ INVALID_POSITION: (position, targetType, supportedPositions) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`,
7210
+ INVALID_METADATA_IDS: (targetType, invalidIds, supportedIds) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`,
7211
+ INVALID_DATA_MODEL_IDS: (targetType, invalidIds, supportedIds) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`,
7212
+ INVALID_FIELDS: (targetType, invalidFields, supportedFields) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`,
7213
+ DUPLICATE_IDS: (id, duplicateNames, keptName) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`,
7131
7214
  };
7132
7215
 
7133
7216
  const EndPoints = {
@@ -7290,6 +7373,15 @@ async function getAuthenticationToken(embedConfig) {
7290
7373
  return authToken;
7291
7374
  }
7292
7375
  const validateAuthToken = async (embedConfig, authToken, suppressAlert) => {
7376
+ // even if token verification is disabled, we will still validate
7377
+ // that the token is a string before proceeding.
7378
+ if (typeof authToken !== 'string') {
7379
+ const errorMessage = formatTemplate(ERROR_MESSAGE.INVALID_TOKEN_TYPE_ERROR, {
7380
+ invalidType: typeof authToken,
7381
+ });
7382
+ logger$3.error(errorMessage);
7383
+ throw new Error(errorMessage);
7384
+ }
7293
7385
  const cachedAuthToken = getCacheAuthToken();
7294
7386
  if (embedConfig.disableTokenVerification) {
7295
7387
  logger$3.info('Token verification is disabled. Assuming token is valid.');
@@ -7980,141 +8072,1571 @@ class AnswerService {
7980
8072
  if (columnsToRemove.length) {
7981
8073
  await unaggAnswerSession.removeColumns(columnsToRemove);
7982
8074
  }
7983
- return unaggAnswerSession;
7984
- }
7985
- /**
7986
- * Execute a custom graphql query in the context of the answer.
7987
- * @param query graphql query
7988
- * @param variables graphql variables
7989
- * @returns
7990
- */
7991
- async executeQuery(query, variables) {
7992
- const data = await graphqlQuery({
7993
- query,
7994
- variables: {
7995
- session: this.session,
7996
- ...variables,
7997
- },
7998
- thoughtSpotHost: this.thoughtSpotHost,
7999
- isCompositeQuery: false,
8000
- });
8001
- this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8002
- return data;
8003
- }
8004
- /**
8005
- * Get the internal session details for the answer.
8006
- * @returns
8007
- */
8008
- getSession() {
8009
- return this.session;
8075
+ return unaggAnswerSession;
8076
+ }
8077
+ /**
8078
+ * Execute a custom graphql query in the context of the answer.
8079
+ * @param query graphql query
8080
+ * @param variables graphql variables
8081
+ * @returns
8082
+ */
8083
+ async executeQuery(query, variables) {
8084
+ const data = await graphqlQuery({
8085
+ query,
8086
+ variables: {
8087
+ session: this.session,
8088
+ ...variables,
8089
+ },
8090
+ thoughtSpotHost: this.thoughtSpotHost,
8091
+ isCompositeQuery: false,
8092
+ });
8093
+ this.session = deepMerge(this.session, (data === null || data === void 0 ? void 0 : data.id) || {});
8094
+ return data;
8095
+ }
8096
+ /**
8097
+ * Get the internal session details for the answer.
8098
+ * @returns
8099
+ */
8100
+ getSession() {
8101
+ return this.session;
8102
+ }
8103
+ async getAnswer() {
8104
+ if (this.answer) {
8105
+ return this.answer;
8106
+ }
8107
+ this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8108
+ return this.answer;
8109
+ }
8110
+ async getTML() {
8111
+ const { object } = await this.executeQuery(getAnswerTML, {});
8112
+ const edoc = object[0].edoc;
8113
+ const YAML = await import('./index-DQueHwfQ.js');
8114
+ const parsedDoc = YAML.parse(edoc);
8115
+ return {
8116
+ answer: {
8117
+ ...parsedDoc.answer,
8118
+ ...this.tmlOverride,
8119
+ },
8120
+ };
8121
+ }
8122
+ async addDisplayedVizToLiveboard(liveboardId) {
8123
+ const { displayMode, visualizations } = await this.getAnswer();
8124
+ const viz = getDisplayedViz(visualizations, displayMode);
8125
+ return this.executeQuery(addVizToLiveboard, {
8126
+ liveboardId,
8127
+ vizId: viz.id,
8128
+ });
8129
+ }
8130
+ setTMLOverride(override) {
8131
+ this.tmlOverride = override;
8132
+ }
8133
+ }
8134
+ /**
8135
+ *
8136
+ * @param sourceDetail
8137
+ * @param colNames
8138
+ */
8139
+ function getGuidsFromColumnNames(sourceDetail, colNames) {
8140
+ const cols = sourceDetail.columns.reduce((colSet, col) => {
8141
+ colSet[col.name.toLowerCase()] = col;
8142
+ return colSet;
8143
+ }, {});
8144
+ return new Set(colNames.map((colName) => {
8145
+ const col = cols[colName.toLowerCase()];
8146
+ return col.id;
8147
+ }));
8148
+ }
8149
+ /**
8150
+ *
8151
+ * @param selectedPoints
8152
+ */
8153
+ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8154
+ const underlyingDataPoint = [];
8155
+ /**
8156
+ *
8157
+ * @param colVal
8158
+ */
8159
+ function addPointFromColVal(colVal) {
8160
+ var _a;
8161
+ const dataType = colVal.column.dataType;
8162
+ colVal.column.id;
8163
+ let dataValue;
8164
+ if (dataType === 'DATE') {
8165
+ if (Number.isFinite(colVal.value)) {
8166
+ dataValue = [{
8167
+ epochRange: {
8168
+ startEpoch: colVal.value,
8169
+ },
8170
+ }];
8171
+ // Case for custom calendar.
8172
+ }
8173
+ else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8174
+ dataValue = [{
8175
+ epochRange: {
8176
+ startEpoch: colVal.value.v.s,
8177
+ endEpoch: colVal.value.v.e,
8178
+ },
8179
+ }];
8180
+ }
8181
+ }
8182
+ else {
8183
+ dataValue = [{ value: colVal.value }];
8184
+ }
8185
+ underlyingDataPoint.push({
8186
+ columnId: colVal.column.id,
8187
+ dataValue,
8188
+ });
8189
+ }
8190
+ selectedPoints.forEach((p) => {
8191
+ p.selectedAttributes.forEach(addPointFromColVal);
8192
+ });
8193
+ return underlyingDataPoint;
8194
+ }
8195
+ /**
8196
+ *
8197
+ * @param visualizations
8198
+ * @param displayMode
8199
+ */
8200
+ function getDisplayedViz(visualizations, displayMode) {
8201
+ if (displayMode === 'CHART_MODE') {
8202
+ return visualizations.find(
8203
+ // eslint-disable-next-line no-underscore-dangle
8204
+ (viz) => viz.__typename === 'ChartViz');
8205
+ }
8206
+ return visualizations.find(
8207
+ // eslint-disable-next-line no-underscore-dangle
8208
+ (viz) => viz.__typename === 'TableViz');
8209
+ }
8210
+
8211
+ /** Built-in value references. */
8212
+ var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
8213
+
8214
+ /**
8215
+ * Checks if `value` is a flattenable `arguments` object or array.
8216
+ *
8217
+ * @private
8218
+ * @param {*} value The value to check.
8219
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
8220
+ */
8221
+ function isFlattenable(value) {
8222
+ return isArray_1(value) || isArguments_1(value) ||
8223
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
8224
+ }
8225
+
8226
+ var _isFlattenable = isFlattenable;
8227
+
8228
+ /**
8229
+ * The base implementation of `_.flatten` with support for restricting flattening.
8230
+ *
8231
+ * @private
8232
+ * @param {Array} array The array to flatten.
8233
+ * @param {number} depth The maximum recursion depth.
8234
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
8235
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
8236
+ * @param {Array} [result=[]] The initial result value.
8237
+ * @returns {Array} Returns the new flattened array.
8238
+ */
8239
+ function baseFlatten(array, depth, predicate, isStrict, result) {
8240
+ var index = -1,
8241
+ length = array.length;
8242
+
8243
+ predicate || (predicate = _isFlattenable);
8244
+ result || (result = []);
8245
+
8246
+ while (++index < length) {
8247
+ var value = array[index];
8248
+ if (depth > 0 && predicate(value)) {
8249
+ if (depth > 1) {
8250
+ // Recursively flatten arrays (susceptible to call stack limits).
8251
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
8252
+ } else {
8253
+ _arrayPush(result, value);
8254
+ }
8255
+ } else if (!isStrict) {
8256
+ result[result.length] = value;
8257
+ }
8258
+ }
8259
+ return result;
8260
+ }
8261
+
8262
+ var _baseFlatten = baseFlatten;
8263
+
8264
+ /**
8265
+ * A specialized version of `_.map` for arrays without support for iteratee
8266
+ * shorthands.
8267
+ *
8268
+ * @private
8269
+ * @param {Array} [array] The array to iterate over.
8270
+ * @param {Function} iteratee The function invoked per iteration.
8271
+ * @returns {Array} Returns the new mapped array.
8272
+ */
8273
+ function arrayMap(array, iteratee) {
8274
+ var index = -1,
8275
+ length = array == null ? 0 : array.length,
8276
+ result = Array(length);
8277
+
8278
+ while (++index < length) {
8279
+ result[index] = iteratee(array[index], index, array);
8280
+ }
8281
+ return result;
8282
+ }
8283
+
8284
+ var _arrayMap = arrayMap;
8285
+
8286
+ /** `Object#toString` result references. */
8287
+ var symbolTag = '[object Symbol]';
8288
+
8289
+ /**
8290
+ * Checks if `value` is classified as a `Symbol` primitive or object.
8291
+ *
8292
+ * @static
8293
+ * @memberOf _
8294
+ * @since 4.0.0
8295
+ * @category Lang
8296
+ * @param {*} value The value to check.
8297
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
8298
+ * @example
8299
+ *
8300
+ * _.isSymbol(Symbol.iterator);
8301
+ * // => true
8302
+ *
8303
+ * _.isSymbol('abc');
8304
+ * // => false
8305
+ */
8306
+ function isSymbol(value) {
8307
+ return typeof value == 'symbol' ||
8308
+ (isObjectLike_1(value) && _baseGetTag(value) == symbolTag);
8309
+ }
8310
+
8311
+ var isSymbol_1 = isSymbol;
8312
+
8313
+ /** Used to match property names within property paths. */
8314
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
8315
+ reIsPlainProp = /^\w*$/;
8316
+
8317
+ /**
8318
+ * Checks if `value` is a property name and not a property path.
8319
+ *
8320
+ * @private
8321
+ * @param {*} value The value to check.
8322
+ * @param {Object} [object] The object to query keys on.
8323
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
8324
+ */
8325
+ function isKey(value, object) {
8326
+ if (isArray_1(value)) {
8327
+ return false;
8328
+ }
8329
+ var type = typeof value;
8330
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
8331
+ value == null || isSymbol_1(value)) {
8332
+ return true;
8333
+ }
8334
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
8335
+ (object != null && value in Object(object));
8336
+ }
8337
+
8338
+ var _isKey = isKey;
8339
+
8340
+ /** Error message constants. */
8341
+ var FUNC_ERROR_TEXT = 'Expected a function';
8342
+
8343
+ /**
8344
+ * Creates a function that memoizes the result of `func`. If `resolver` is
8345
+ * provided, it determines the cache key for storing the result based on the
8346
+ * arguments provided to the memoized function. By default, the first argument
8347
+ * provided to the memoized function is used as the map cache key. The `func`
8348
+ * is invoked with the `this` binding of the memoized function.
8349
+ *
8350
+ * **Note:** The cache is exposed as the `cache` property on the memoized
8351
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
8352
+ * constructor with one whose instances implement the
8353
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
8354
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
8355
+ *
8356
+ * @static
8357
+ * @memberOf _
8358
+ * @since 0.1.0
8359
+ * @category Function
8360
+ * @param {Function} func The function to have its output memoized.
8361
+ * @param {Function} [resolver] The function to resolve the cache key.
8362
+ * @returns {Function} Returns the new memoized function.
8363
+ * @example
8364
+ *
8365
+ * var object = { 'a': 1, 'b': 2 };
8366
+ * var other = { 'c': 3, 'd': 4 };
8367
+ *
8368
+ * var values = _.memoize(_.values);
8369
+ * values(object);
8370
+ * // => [1, 2]
8371
+ *
8372
+ * values(other);
8373
+ * // => [3, 4]
8374
+ *
8375
+ * object.a = 2;
8376
+ * values(object);
8377
+ * // => [1, 2]
8378
+ *
8379
+ * // Modify the result cache.
8380
+ * values.cache.set(object, ['a', 'b']);
8381
+ * values(object);
8382
+ * // => ['a', 'b']
8383
+ *
8384
+ * // Replace `_.memoize.Cache`.
8385
+ * _.memoize.Cache = WeakMap;
8386
+ */
8387
+ function memoize(func, resolver) {
8388
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
8389
+ throw new TypeError(FUNC_ERROR_TEXT);
8390
+ }
8391
+ var memoized = function() {
8392
+ var args = arguments,
8393
+ key = resolver ? resolver.apply(this, args) : args[0],
8394
+ cache = memoized.cache;
8395
+
8396
+ if (cache.has(key)) {
8397
+ return cache.get(key);
8398
+ }
8399
+ var result = func.apply(this, args);
8400
+ memoized.cache = cache.set(key, result) || cache;
8401
+ return result;
8402
+ };
8403
+ memoized.cache = new (memoize.Cache || _MapCache);
8404
+ return memoized;
8405
+ }
8406
+
8407
+ // Expose `MapCache`.
8408
+ memoize.Cache = _MapCache;
8409
+
8410
+ var memoize_1 = memoize;
8411
+
8412
+ /** Used as the maximum memoize cache size. */
8413
+ var MAX_MEMOIZE_SIZE = 500;
8414
+
8415
+ /**
8416
+ * A specialized version of `_.memoize` which clears the memoized function's
8417
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
8418
+ *
8419
+ * @private
8420
+ * @param {Function} func The function to have its output memoized.
8421
+ * @returns {Function} Returns the new memoized function.
8422
+ */
8423
+ function memoizeCapped(func) {
8424
+ var result = memoize_1(func, function(key) {
8425
+ if (cache.size === MAX_MEMOIZE_SIZE) {
8426
+ cache.clear();
8427
+ }
8428
+ return key;
8429
+ });
8430
+
8431
+ var cache = result.cache;
8432
+ return result;
8433
+ }
8434
+
8435
+ var _memoizeCapped = memoizeCapped;
8436
+
8437
+ /** Used to match property names within property paths. */
8438
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
8439
+
8440
+ /** Used to match backslashes in property paths. */
8441
+ var reEscapeChar = /\\(\\)?/g;
8442
+
8443
+ /**
8444
+ * Converts `string` to a property path array.
8445
+ *
8446
+ * @private
8447
+ * @param {string} string The string to convert.
8448
+ * @returns {Array} Returns the property path array.
8449
+ */
8450
+ var stringToPath = _memoizeCapped(function(string) {
8451
+ var result = [];
8452
+ if (string.charCodeAt(0) === 46 /* . */) {
8453
+ result.push('');
8454
+ }
8455
+ string.replace(rePropName, function(match, number, quote, subString) {
8456
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
8457
+ });
8458
+ return result;
8459
+ });
8460
+
8461
+ var _stringToPath = stringToPath;
8462
+
8463
+ /** Used as references for various `Number` constants. */
8464
+ var INFINITY$1 = 1 / 0;
8465
+
8466
+ /** Used to convert symbols to primitives and strings. */
8467
+ var symbolProto = _Symbol ? _Symbol.prototype : undefined,
8468
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
8469
+
8470
+ /**
8471
+ * The base implementation of `_.toString` which doesn't convert nullish
8472
+ * values to empty strings.
8473
+ *
8474
+ * @private
8475
+ * @param {*} value The value to process.
8476
+ * @returns {string} Returns the string.
8477
+ */
8478
+ function baseToString(value) {
8479
+ // Exit early for strings to avoid a performance hit in some environments.
8480
+ if (typeof value == 'string') {
8481
+ return value;
8482
+ }
8483
+ if (isArray_1(value)) {
8484
+ // Recursively convert values (susceptible to call stack limits).
8485
+ return _arrayMap(value, baseToString) + '';
8486
+ }
8487
+ if (isSymbol_1(value)) {
8488
+ return symbolToString ? symbolToString.call(value) : '';
8489
+ }
8490
+ var result = (value + '');
8491
+ return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
8492
+ }
8493
+
8494
+ var _baseToString = baseToString;
8495
+
8496
+ /**
8497
+ * Converts `value` to a string. An empty string is returned for `null`
8498
+ * and `undefined` values. The sign of `-0` is preserved.
8499
+ *
8500
+ * @static
8501
+ * @memberOf _
8502
+ * @since 4.0.0
8503
+ * @category Lang
8504
+ * @param {*} value The value to convert.
8505
+ * @returns {string} Returns the converted string.
8506
+ * @example
8507
+ *
8508
+ * _.toString(null);
8509
+ * // => ''
8510
+ *
8511
+ * _.toString(-0);
8512
+ * // => '-0'
8513
+ *
8514
+ * _.toString([1, 2, 3]);
8515
+ * // => '1,2,3'
8516
+ */
8517
+ function toString$1(value) {
8518
+ return value == null ? '' : _baseToString(value);
8519
+ }
8520
+
8521
+ var toString_1 = toString$1;
8522
+
8523
+ /**
8524
+ * Casts `value` to a path array if it's not one.
8525
+ *
8526
+ * @private
8527
+ * @param {*} value The value to inspect.
8528
+ * @param {Object} [object] The object to query keys on.
8529
+ * @returns {Array} Returns the cast property path array.
8530
+ */
8531
+ function castPath(value, object) {
8532
+ if (isArray_1(value)) {
8533
+ return value;
8534
+ }
8535
+ return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
8536
+ }
8537
+
8538
+ var _castPath = castPath;
8539
+
8540
+ /** Used as references for various `Number` constants. */
8541
+ var INFINITY = 1 / 0;
8542
+
8543
+ /**
8544
+ * Converts `value` to a string key if it's not a string or symbol.
8545
+ *
8546
+ * @private
8547
+ * @param {*} value The value to inspect.
8548
+ * @returns {string|symbol} Returns the key.
8549
+ */
8550
+ function toKey(value) {
8551
+ if (typeof value == 'string' || isSymbol_1(value)) {
8552
+ return value;
8553
+ }
8554
+ var result = (value + '');
8555
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
8556
+ }
8557
+
8558
+ var _toKey = toKey;
8559
+
8560
+ /**
8561
+ * The base implementation of `_.get` without support for default values.
8562
+ *
8563
+ * @private
8564
+ * @param {Object} object The object to query.
8565
+ * @param {Array|string} path The path of the property to get.
8566
+ * @returns {*} Returns the resolved value.
8567
+ */
8568
+ function baseGet(object, path) {
8569
+ path = _castPath(path, object);
8570
+
8571
+ var index = 0,
8572
+ length = path.length;
8573
+
8574
+ while (object != null && index < length) {
8575
+ object = object[_toKey(path[index++])];
8576
+ }
8577
+ return (index && index == length) ? object : undefined;
8578
+ }
8579
+
8580
+ var _baseGet = baseGet;
8581
+
8582
+ /** Used to compose bitmasks for value comparisons. */
8583
+ var COMPARE_PARTIAL_FLAG$1 = 1,
8584
+ COMPARE_UNORDERED_FLAG$1 = 2;
8585
+
8586
+ /**
8587
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
8588
+ *
8589
+ * @private
8590
+ * @param {Object} object The object to inspect.
8591
+ * @param {Object} source The object of property values to match.
8592
+ * @param {Array} matchData The property names, values, and compare flags to match.
8593
+ * @param {Function} [customizer] The function to customize comparisons.
8594
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
8595
+ */
8596
+ function baseIsMatch(object, source, matchData, customizer) {
8597
+ var index = matchData.length,
8598
+ length = index,
8599
+ noCustomizer = !customizer;
8600
+
8601
+ if (object == null) {
8602
+ return !length;
8603
+ }
8604
+ object = Object(object);
8605
+ while (index--) {
8606
+ var data = matchData[index];
8607
+ if ((noCustomizer && data[2])
8608
+ ? data[1] !== object[data[0]]
8609
+ : !(data[0] in object)
8610
+ ) {
8611
+ return false;
8612
+ }
8613
+ }
8614
+ while (++index < length) {
8615
+ data = matchData[index];
8616
+ var key = data[0],
8617
+ objValue = object[key],
8618
+ srcValue = data[1];
8619
+
8620
+ if (noCustomizer && data[2]) {
8621
+ if (objValue === undefined && !(key in object)) {
8622
+ return false;
8623
+ }
8624
+ } else {
8625
+ var stack = new _Stack;
8626
+ if (customizer) {
8627
+ var result = customizer(objValue, srcValue, key, object, source, stack);
8628
+ }
8629
+ if (!(result === undefined
8630
+ ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack)
8631
+ : result
8632
+ )) {
8633
+ return false;
8634
+ }
8635
+ }
8636
+ }
8637
+ return true;
8638
+ }
8639
+
8640
+ var _baseIsMatch = baseIsMatch;
8641
+
8642
+ /**
8643
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
8644
+ *
8645
+ * @private
8646
+ * @param {*} value The value to check.
8647
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
8648
+ * equality comparisons, else `false`.
8649
+ */
8650
+ function isStrictComparable(value) {
8651
+ return value === value && !isObject_1(value);
8652
+ }
8653
+
8654
+ var _isStrictComparable = isStrictComparable;
8655
+
8656
+ /**
8657
+ * Gets the property names, values, and compare flags of `object`.
8658
+ *
8659
+ * @private
8660
+ * @param {Object} object The object to query.
8661
+ * @returns {Array} Returns the match data of `object`.
8662
+ */
8663
+ function getMatchData(object) {
8664
+ var result = keys_1(object),
8665
+ length = result.length;
8666
+
8667
+ while (length--) {
8668
+ var key = result[length],
8669
+ value = object[key];
8670
+
8671
+ result[length] = [key, value, _isStrictComparable(value)];
8672
+ }
8673
+ return result;
8674
+ }
8675
+
8676
+ var _getMatchData = getMatchData;
8677
+
8678
+ /**
8679
+ * A specialized version of `matchesProperty` for source values suitable
8680
+ * for strict equality comparisons, i.e. `===`.
8681
+ *
8682
+ * @private
8683
+ * @param {string} key The key of the property to get.
8684
+ * @param {*} srcValue The value to match.
8685
+ * @returns {Function} Returns the new spec function.
8686
+ */
8687
+ function matchesStrictComparable(key, srcValue) {
8688
+ return function(object) {
8689
+ if (object == null) {
8690
+ return false;
8691
+ }
8692
+ return object[key] === srcValue &&
8693
+ (srcValue !== undefined || (key in Object(object)));
8694
+ };
8695
+ }
8696
+
8697
+ var _matchesStrictComparable = matchesStrictComparable;
8698
+
8699
+ /**
8700
+ * The base implementation of `_.matches` which doesn't clone `source`.
8701
+ *
8702
+ * @private
8703
+ * @param {Object} source The object of property values to match.
8704
+ * @returns {Function} Returns the new spec function.
8705
+ */
8706
+ function baseMatches(source) {
8707
+ var matchData = _getMatchData(source);
8708
+ if (matchData.length == 1 && matchData[0][2]) {
8709
+ return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
8710
+ }
8711
+ return function(object) {
8712
+ return object === source || _baseIsMatch(object, source, matchData);
8713
+ };
8714
+ }
8715
+
8716
+ var _baseMatches = baseMatches;
8717
+
8718
+ /**
8719
+ * Gets the value at `path` of `object`. If the resolved value is
8720
+ * `undefined`, the `defaultValue` is returned in its place.
8721
+ *
8722
+ * @static
8723
+ * @memberOf _
8724
+ * @since 3.7.0
8725
+ * @category Object
8726
+ * @param {Object} object The object to query.
8727
+ * @param {Array|string} path The path of the property to get.
8728
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
8729
+ * @returns {*} Returns the resolved value.
8730
+ * @example
8731
+ *
8732
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
8733
+ *
8734
+ * _.get(object, 'a[0].b.c');
8735
+ * // => 3
8736
+ *
8737
+ * _.get(object, ['a', '0', 'b', 'c']);
8738
+ * // => 3
8739
+ *
8740
+ * _.get(object, 'a.b.c', 'default');
8741
+ * // => 'default'
8742
+ */
8743
+ function get(object, path, defaultValue) {
8744
+ var result = object == null ? undefined : _baseGet(object, path);
8745
+ return result === undefined ? defaultValue : result;
8746
+ }
8747
+
8748
+ var get_1 = get;
8749
+
8750
+ /**
8751
+ * The base implementation of `_.hasIn` without support for deep paths.
8752
+ *
8753
+ * @private
8754
+ * @param {Object} [object] The object to query.
8755
+ * @param {Array|string} key The key to check.
8756
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
8757
+ */
8758
+ function baseHasIn(object, key) {
8759
+ return object != null && key in Object(object);
8760
+ }
8761
+
8762
+ var _baseHasIn = baseHasIn;
8763
+
8764
+ /**
8765
+ * Checks if `path` exists on `object`.
8766
+ *
8767
+ * @private
8768
+ * @param {Object} object The object to query.
8769
+ * @param {Array|string} path The path to check.
8770
+ * @param {Function} hasFunc The function to check properties.
8771
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8772
+ */
8773
+ function hasPath(object, path, hasFunc) {
8774
+ path = _castPath(path, object);
8775
+
8776
+ var index = -1,
8777
+ length = path.length,
8778
+ result = false;
8779
+
8780
+ while (++index < length) {
8781
+ var key = _toKey(path[index]);
8782
+ if (!(result = object != null && hasFunc(object, key))) {
8783
+ break;
8784
+ }
8785
+ object = object[key];
8786
+ }
8787
+ if (result || ++index != length) {
8788
+ return result;
8789
+ }
8790
+ length = object == null ? 0 : object.length;
8791
+ return !!length && isLength_1(length) && _isIndex(key, length) &&
8792
+ (isArray_1(object) || isArguments_1(object));
8793
+ }
8794
+
8795
+ var _hasPath = hasPath;
8796
+
8797
+ /**
8798
+ * Checks if `path` is a direct or inherited property of `object`.
8799
+ *
8800
+ * @static
8801
+ * @memberOf _
8802
+ * @since 4.0.0
8803
+ * @category Object
8804
+ * @param {Object} object The object to query.
8805
+ * @param {Array|string} path The path to check.
8806
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
8807
+ * @example
8808
+ *
8809
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
8810
+ *
8811
+ * _.hasIn(object, 'a');
8812
+ * // => true
8813
+ *
8814
+ * _.hasIn(object, 'a.b');
8815
+ * // => true
8816
+ *
8817
+ * _.hasIn(object, ['a', 'b']);
8818
+ * // => true
8819
+ *
8820
+ * _.hasIn(object, 'b');
8821
+ * // => false
8822
+ */
8823
+ function hasIn(object, path) {
8824
+ return object != null && _hasPath(object, path, _baseHasIn);
8825
+ }
8826
+
8827
+ var hasIn_1 = hasIn;
8828
+
8829
+ /** Used to compose bitmasks for value comparisons. */
8830
+ var COMPARE_PARTIAL_FLAG = 1,
8831
+ COMPARE_UNORDERED_FLAG = 2;
8832
+
8833
+ /**
8834
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
8835
+ *
8836
+ * @private
8837
+ * @param {string} path The path of the property to get.
8838
+ * @param {*} srcValue The value to match.
8839
+ * @returns {Function} Returns the new spec function.
8840
+ */
8841
+ function baseMatchesProperty(path, srcValue) {
8842
+ if (_isKey(path) && _isStrictComparable(srcValue)) {
8843
+ return _matchesStrictComparable(_toKey(path), srcValue);
8844
+ }
8845
+ return function(object) {
8846
+ var objValue = get_1(object, path);
8847
+ return (objValue === undefined && objValue === srcValue)
8848
+ ? hasIn_1(object, path)
8849
+ : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
8850
+ };
8851
+ }
8852
+
8853
+ var _baseMatchesProperty = baseMatchesProperty;
8854
+
8855
+ /**
8856
+ * This method returns the first argument it receives.
8857
+ *
8858
+ * @static
8859
+ * @since 0.1.0
8860
+ * @memberOf _
8861
+ * @category Util
8862
+ * @param {*} value Any value.
8863
+ * @returns {*} Returns `value`.
8864
+ * @example
8865
+ *
8866
+ * var object = { 'a': 1 };
8867
+ *
8868
+ * console.log(_.identity(object) === object);
8869
+ * // => true
8870
+ */
8871
+ function identity(value) {
8872
+ return value;
8873
+ }
8874
+
8875
+ var identity_1 = identity;
8876
+
8877
+ /**
8878
+ * The base implementation of `_.property` without support for deep paths.
8879
+ *
8880
+ * @private
8881
+ * @param {string} key The key of the property to get.
8882
+ * @returns {Function} Returns the new accessor function.
8883
+ */
8884
+ function baseProperty(key) {
8885
+ return function(object) {
8886
+ return object == null ? undefined : object[key];
8887
+ };
8888
+ }
8889
+
8890
+ var _baseProperty = baseProperty;
8891
+
8892
+ /**
8893
+ * A specialized version of `baseProperty` which supports deep paths.
8894
+ *
8895
+ * @private
8896
+ * @param {Array|string} path The path of the property to get.
8897
+ * @returns {Function} Returns the new accessor function.
8898
+ */
8899
+ function basePropertyDeep(path) {
8900
+ return function(object) {
8901
+ return _baseGet(object, path);
8902
+ };
8903
+ }
8904
+
8905
+ var _basePropertyDeep = basePropertyDeep;
8906
+
8907
+ /**
8908
+ * Creates a function that returns the value at `path` of a given object.
8909
+ *
8910
+ * @static
8911
+ * @memberOf _
8912
+ * @since 2.4.0
8913
+ * @category Util
8914
+ * @param {Array|string} path The path of the property to get.
8915
+ * @returns {Function} Returns the new accessor function.
8916
+ * @example
8917
+ *
8918
+ * var objects = [
8919
+ * { 'a': { 'b': 2 } },
8920
+ * { 'a': { 'b': 1 } }
8921
+ * ];
8922
+ *
8923
+ * _.map(objects, _.property('a.b'));
8924
+ * // => [2, 1]
8925
+ *
8926
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
8927
+ * // => [1, 2]
8928
+ */
8929
+ function property(path) {
8930
+ return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
8931
+ }
8932
+
8933
+ var property_1 = property;
8934
+
8935
+ /**
8936
+ * The base implementation of `_.iteratee`.
8937
+ *
8938
+ * @private
8939
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
8940
+ * @returns {Function} Returns the iteratee.
8941
+ */
8942
+ function baseIteratee(value) {
8943
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
8944
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
8945
+ if (typeof value == 'function') {
8946
+ return value;
8947
+ }
8948
+ if (value == null) {
8949
+ return identity_1;
8950
+ }
8951
+ if (typeof value == 'object') {
8952
+ return isArray_1(value)
8953
+ ? _baseMatchesProperty(value[0], value[1])
8954
+ : _baseMatches(value);
8955
+ }
8956
+ return property_1(value);
8957
+ }
8958
+
8959
+ var _baseIteratee = baseIteratee;
8960
+
8961
+ /**
8962
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
8963
+ *
8964
+ * @private
8965
+ * @param {boolean} [fromRight] Specify iterating from right to left.
8966
+ * @returns {Function} Returns the new base function.
8967
+ */
8968
+ function createBaseFor(fromRight) {
8969
+ return function(object, iteratee, keysFunc) {
8970
+ var index = -1,
8971
+ iterable = Object(object),
8972
+ props = keysFunc(object),
8973
+ length = props.length;
8974
+
8975
+ while (length--) {
8976
+ var key = props[fromRight ? length : ++index];
8977
+ if (iteratee(iterable[key], key, iterable) === false) {
8978
+ break;
8979
+ }
8980
+ }
8981
+ return object;
8982
+ };
8983
+ }
8984
+
8985
+ var _createBaseFor = createBaseFor;
8986
+
8987
+ /**
8988
+ * The base implementation of `baseForOwn` which iterates over `object`
8989
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
8990
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
8991
+ *
8992
+ * @private
8993
+ * @param {Object} object The object to iterate over.
8994
+ * @param {Function} iteratee The function invoked per iteration.
8995
+ * @param {Function} keysFunc The function to get the keys of `object`.
8996
+ * @returns {Object} Returns `object`.
8997
+ */
8998
+ var baseFor = _createBaseFor();
8999
+
9000
+ var _baseFor = baseFor;
9001
+
9002
+ /**
9003
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
9004
+ *
9005
+ * @private
9006
+ * @param {Object} object The object to iterate over.
9007
+ * @param {Function} iteratee The function invoked per iteration.
9008
+ * @returns {Object} Returns `object`.
9009
+ */
9010
+ function baseForOwn(object, iteratee) {
9011
+ return object && _baseFor(object, iteratee, keys_1);
9012
+ }
9013
+
9014
+ var _baseForOwn = baseForOwn;
9015
+
9016
+ /**
9017
+ * Creates a `baseEach` or `baseEachRight` function.
9018
+ *
9019
+ * @private
9020
+ * @param {Function} eachFunc The function to iterate over a collection.
9021
+ * @param {boolean} [fromRight] Specify iterating from right to left.
9022
+ * @returns {Function} Returns the new base function.
9023
+ */
9024
+ function createBaseEach(eachFunc, fromRight) {
9025
+ return function(collection, iteratee) {
9026
+ if (collection == null) {
9027
+ return collection;
9028
+ }
9029
+ if (!isArrayLike_1(collection)) {
9030
+ return eachFunc(collection, iteratee);
9031
+ }
9032
+ var length = collection.length,
9033
+ index = fromRight ? length : -1,
9034
+ iterable = Object(collection);
9035
+
9036
+ while ((fromRight ? index-- : ++index < length)) {
9037
+ if (iteratee(iterable[index], index, iterable) === false) {
9038
+ break;
9039
+ }
9040
+ }
9041
+ return collection;
9042
+ };
9043
+ }
9044
+
9045
+ var _createBaseEach = createBaseEach;
9046
+
9047
+ /**
9048
+ * The base implementation of `_.forEach` without support for iteratee shorthands.
9049
+ *
9050
+ * @private
9051
+ * @param {Array|Object} collection The collection to iterate over.
9052
+ * @param {Function} iteratee The function invoked per iteration.
9053
+ * @returns {Array|Object} Returns `collection`.
9054
+ */
9055
+ var baseEach = _createBaseEach(_baseForOwn);
9056
+
9057
+ var _baseEach = baseEach;
9058
+
9059
+ /**
9060
+ * The base implementation of `_.map` without support for iteratee shorthands.
9061
+ *
9062
+ * @private
9063
+ * @param {Array|Object} collection The collection to iterate over.
9064
+ * @param {Function} iteratee The function invoked per iteration.
9065
+ * @returns {Array} Returns the new mapped array.
9066
+ */
9067
+ function baseMap(collection, iteratee) {
9068
+ var index = -1,
9069
+ result = isArrayLike_1(collection) ? Array(collection.length) : [];
9070
+
9071
+ _baseEach(collection, function(value, key, collection) {
9072
+ result[++index] = iteratee(value, key, collection);
9073
+ });
9074
+ return result;
9075
+ }
9076
+
9077
+ var _baseMap = baseMap;
9078
+
9079
+ /**
9080
+ * The base implementation of `_.sortBy` which uses `comparer` to define the
9081
+ * sort order of `array` and replaces criteria objects with their corresponding
9082
+ * values.
9083
+ *
9084
+ * @private
9085
+ * @param {Array} array The array to sort.
9086
+ * @param {Function} comparer The function to define sort order.
9087
+ * @returns {Array} Returns `array`.
9088
+ */
9089
+ function baseSortBy(array, comparer) {
9090
+ var length = array.length;
9091
+
9092
+ array.sort(comparer);
9093
+ while (length--) {
9094
+ array[length] = array[length].value;
9095
+ }
9096
+ return array;
9097
+ }
9098
+
9099
+ var _baseSortBy = baseSortBy;
9100
+
9101
+ /**
9102
+ * Compares values to sort them in ascending order.
9103
+ *
9104
+ * @private
9105
+ * @param {*} value The value to compare.
9106
+ * @param {*} other The other value to compare.
9107
+ * @returns {number} Returns the sort order indicator for `value`.
9108
+ */
9109
+ function compareAscending(value, other) {
9110
+ if (value !== other) {
9111
+ var valIsDefined = value !== undefined,
9112
+ valIsNull = value === null,
9113
+ valIsReflexive = value === value,
9114
+ valIsSymbol = isSymbol_1(value);
9115
+
9116
+ var othIsDefined = other !== undefined,
9117
+ othIsNull = other === null,
9118
+ othIsReflexive = other === other,
9119
+ othIsSymbol = isSymbol_1(other);
9120
+
9121
+ if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
9122
+ (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
9123
+ (valIsNull && othIsDefined && othIsReflexive) ||
9124
+ (!valIsDefined && othIsReflexive) ||
9125
+ !valIsReflexive) {
9126
+ return 1;
9127
+ }
9128
+ if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
9129
+ (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
9130
+ (othIsNull && valIsDefined && valIsReflexive) ||
9131
+ (!othIsDefined && valIsReflexive) ||
9132
+ !othIsReflexive) {
9133
+ return -1;
9134
+ }
9135
+ }
9136
+ return 0;
9137
+ }
9138
+
9139
+ var _compareAscending = compareAscending;
9140
+
9141
+ /**
9142
+ * Used by `_.orderBy` to compare multiple properties of a value to another
9143
+ * and stable sort them.
9144
+ *
9145
+ * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
9146
+ * specify an order of "desc" for descending or "asc" for ascending sort order
9147
+ * of corresponding values.
9148
+ *
9149
+ * @private
9150
+ * @param {Object} object The object to compare.
9151
+ * @param {Object} other The other object to compare.
9152
+ * @param {boolean[]|string[]} orders The order to sort by for each property.
9153
+ * @returns {number} Returns the sort order indicator for `object`.
9154
+ */
9155
+ function compareMultiple(object, other, orders) {
9156
+ var index = -1,
9157
+ objCriteria = object.criteria,
9158
+ othCriteria = other.criteria,
9159
+ length = objCriteria.length,
9160
+ ordersLength = orders.length;
9161
+
9162
+ while (++index < length) {
9163
+ var result = _compareAscending(objCriteria[index], othCriteria[index]);
9164
+ if (result) {
9165
+ if (index >= ordersLength) {
9166
+ return result;
9167
+ }
9168
+ var order = orders[index];
9169
+ return result * (order == 'desc' ? -1 : 1);
9170
+ }
9171
+ }
9172
+ // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
9173
+ // that causes it, under certain circumstances, to provide the same value for
9174
+ // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
9175
+ // for more details.
9176
+ //
9177
+ // This also ensures a stable sort in V8 and other engines.
9178
+ // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
9179
+ return object.index - other.index;
9180
+ }
9181
+
9182
+ var _compareMultiple = compareMultiple;
9183
+
9184
+ /**
9185
+ * The base implementation of `_.orderBy` without param guards.
9186
+ *
9187
+ * @private
9188
+ * @param {Array|Object} collection The collection to iterate over.
9189
+ * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
9190
+ * @param {string[]} orders The sort orders of `iteratees`.
9191
+ * @returns {Array} Returns the new sorted array.
9192
+ */
9193
+ function baseOrderBy(collection, iteratees, orders) {
9194
+ if (iteratees.length) {
9195
+ iteratees = _arrayMap(iteratees, function(iteratee) {
9196
+ if (isArray_1(iteratee)) {
9197
+ return function(value) {
9198
+ return _baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
9199
+ }
9200
+ }
9201
+ return iteratee;
9202
+ });
9203
+ } else {
9204
+ iteratees = [identity_1];
9205
+ }
9206
+
9207
+ var index = -1;
9208
+ iteratees = _arrayMap(iteratees, _baseUnary(_baseIteratee));
9209
+
9210
+ var result = _baseMap(collection, function(value, key, collection) {
9211
+ var criteria = _arrayMap(iteratees, function(iteratee) {
9212
+ return iteratee(value);
9213
+ });
9214
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
9215
+ });
9216
+
9217
+ return _baseSortBy(result, function(object, other) {
9218
+ return _compareMultiple(object, other, orders);
9219
+ });
9220
+ }
9221
+
9222
+ var _baseOrderBy = baseOrderBy;
9223
+
9224
+ /**
9225
+ * A faster alternative to `Function#apply`, this function invokes `func`
9226
+ * with the `this` binding of `thisArg` and the arguments of `args`.
9227
+ *
9228
+ * @private
9229
+ * @param {Function} func The function to invoke.
9230
+ * @param {*} thisArg The `this` binding of `func`.
9231
+ * @param {Array} args The arguments to invoke `func` with.
9232
+ * @returns {*} Returns the result of `func`.
9233
+ */
9234
+ function apply(func, thisArg, args) {
9235
+ switch (args.length) {
9236
+ case 0: return func.call(thisArg);
9237
+ case 1: return func.call(thisArg, args[0]);
9238
+ case 2: return func.call(thisArg, args[0], args[1]);
9239
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
9240
+ }
9241
+ return func.apply(thisArg, args);
9242
+ }
9243
+
9244
+ var _apply = apply;
9245
+
9246
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9247
+ var nativeMax = Math.max;
9248
+
9249
+ /**
9250
+ * A specialized version of `baseRest` which transforms the rest array.
9251
+ *
9252
+ * @private
9253
+ * @param {Function} func The function to apply a rest parameter to.
9254
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9255
+ * @param {Function} transform The rest array transform.
9256
+ * @returns {Function} Returns the new function.
9257
+ */
9258
+ function overRest(func, start, transform) {
9259
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
9260
+ return function() {
9261
+ var args = arguments,
9262
+ index = -1,
9263
+ length = nativeMax(args.length - start, 0),
9264
+ array = Array(length);
9265
+
9266
+ while (++index < length) {
9267
+ array[index] = args[start + index];
9268
+ }
9269
+ index = -1;
9270
+ var otherArgs = Array(start + 1);
9271
+ while (++index < start) {
9272
+ otherArgs[index] = args[index];
9273
+ }
9274
+ otherArgs[start] = transform(array);
9275
+ return _apply(func, this, otherArgs);
9276
+ };
9277
+ }
9278
+
9279
+ var _overRest = overRest;
9280
+
9281
+ /**
9282
+ * Creates a function that returns `value`.
9283
+ *
9284
+ * @static
9285
+ * @memberOf _
9286
+ * @since 2.4.0
9287
+ * @category Util
9288
+ * @param {*} value The value to return from the new function.
9289
+ * @returns {Function} Returns the new constant function.
9290
+ * @example
9291
+ *
9292
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
9293
+ *
9294
+ * console.log(objects);
9295
+ * // => [{ 'a': 1 }, { 'a': 1 }]
9296
+ *
9297
+ * console.log(objects[0] === objects[1]);
9298
+ * // => true
9299
+ */
9300
+ function constant(value) {
9301
+ return function() {
9302
+ return value;
9303
+ };
9304
+ }
9305
+
9306
+ var constant_1 = constant;
9307
+
9308
+ var defineProperty = (function() {
9309
+ try {
9310
+ var func = _getNative(Object, 'defineProperty');
9311
+ func({}, '', {});
9312
+ return func;
9313
+ } catch (e) {}
9314
+ }());
9315
+
9316
+ var _defineProperty = defineProperty;
9317
+
9318
+ /**
9319
+ * The base implementation of `setToString` without support for hot loop shorting.
9320
+ *
9321
+ * @private
9322
+ * @param {Function} func The function to modify.
9323
+ * @param {Function} string The `toString` result.
9324
+ * @returns {Function} Returns `func`.
9325
+ */
9326
+ var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
9327
+ return _defineProperty(func, 'toString', {
9328
+ 'configurable': true,
9329
+ 'enumerable': false,
9330
+ 'value': constant_1(string),
9331
+ 'writable': true
9332
+ });
9333
+ };
9334
+
9335
+ var _baseSetToString = baseSetToString;
9336
+
9337
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
9338
+ var HOT_COUNT = 800,
9339
+ HOT_SPAN = 16;
9340
+
9341
+ /* Built-in method references for those with the same name as other `lodash` methods. */
9342
+ var nativeNow = Date.now;
9343
+
9344
+ /**
9345
+ * Creates a function that'll short out and invoke `identity` instead
9346
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
9347
+ * milliseconds.
9348
+ *
9349
+ * @private
9350
+ * @param {Function} func The function to restrict.
9351
+ * @returns {Function} Returns the new shortable function.
9352
+ */
9353
+ function shortOut(func) {
9354
+ var count = 0,
9355
+ lastCalled = 0;
9356
+
9357
+ return function() {
9358
+ var stamp = nativeNow(),
9359
+ remaining = HOT_SPAN - (stamp - lastCalled);
9360
+
9361
+ lastCalled = stamp;
9362
+ if (remaining > 0) {
9363
+ if (++count >= HOT_COUNT) {
9364
+ return arguments[0];
9365
+ }
9366
+ } else {
9367
+ count = 0;
9368
+ }
9369
+ return func.apply(undefined, arguments);
9370
+ };
9371
+ }
9372
+
9373
+ var _shortOut = shortOut;
9374
+
9375
+ /**
9376
+ * Sets the `toString` method of `func` to return `string`.
9377
+ *
9378
+ * @private
9379
+ * @param {Function} func The function to modify.
9380
+ * @param {Function} string The `toString` result.
9381
+ * @returns {Function} Returns `func`.
9382
+ */
9383
+ var setToString = _shortOut(_baseSetToString);
9384
+
9385
+ var _setToString = setToString;
9386
+
9387
+ /**
9388
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
9389
+ *
9390
+ * @private
9391
+ * @param {Function} func The function to apply a rest parameter to.
9392
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
9393
+ * @returns {Function} Returns the new function.
9394
+ */
9395
+ function baseRest(func, start) {
9396
+ return _setToString(_overRest(func, start, identity_1), func + '');
9397
+ }
9398
+
9399
+ var _baseRest = baseRest;
9400
+
9401
+ /**
9402
+ * Checks if the given arguments are from an iteratee call.
9403
+ *
9404
+ * @private
9405
+ * @param {*} value The potential iteratee value argument.
9406
+ * @param {*} index The potential iteratee index or key argument.
9407
+ * @param {*} object The potential iteratee object argument.
9408
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
9409
+ * else `false`.
9410
+ */
9411
+ function isIterateeCall(value, index, object) {
9412
+ if (!isObject_1(object)) {
9413
+ return false;
9414
+ }
9415
+ var type = typeof index;
9416
+ if (type == 'number'
9417
+ ? (isArrayLike_1(object) && _isIndex(index, object.length))
9418
+ : (type == 'string' && index in object)
9419
+ ) {
9420
+ return eq_1(object[index], value);
9421
+ }
9422
+ return false;
9423
+ }
9424
+
9425
+ var _isIterateeCall = isIterateeCall;
9426
+
9427
+ /**
9428
+ * Creates an array of elements, sorted in ascending order by the results of
9429
+ * running each element in a collection thru each iteratee. This method
9430
+ * performs a stable sort, that is, it preserves the original sort order of
9431
+ * equal elements. The iteratees are invoked with one argument: (value).
9432
+ *
9433
+ * @static
9434
+ * @memberOf _
9435
+ * @since 0.1.0
9436
+ * @category Collection
9437
+ * @param {Array|Object} collection The collection to iterate over.
9438
+ * @param {...(Function|Function[])} [iteratees=[_.identity]]
9439
+ * The iteratees to sort by.
9440
+ * @returns {Array} Returns the new sorted array.
9441
+ * @example
9442
+ *
9443
+ * var users = [
9444
+ * { 'user': 'fred', 'age': 48 },
9445
+ * { 'user': 'barney', 'age': 36 },
9446
+ * { 'user': 'fred', 'age': 30 },
9447
+ * { 'user': 'barney', 'age': 34 }
9448
+ * ];
9449
+ *
9450
+ * _.sortBy(users, [function(o) { return o.user; }]);
9451
+ * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
9452
+ *
9453
+ * _.sortBy(users, ['user', 'age']);
9454
+ * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
9455
+ */
9456
+ var sortBy = _baseRest(function(collection, iteratees) {
9457
+ if (collection == null) {
9458
+ return [];
9459
+ }
9460
+ var length = iteratees.length;
9461
+ if (length > 1 && _isIterateeCall(collection, iteratees[0], iteratees[1])) {
9462
+ iteratees = [];
9463
+ } else if (length > 2 && _isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
9464
+ iteratees = [iteratees[0]];
9465
+ }
9466
+ return _baseOrderBy(collection, _baseFlatten(iteratees, 1), []);
9467
+ });
9468
+
9469
+ var sortBy_1 = sortBy;
9470
+
9471
+ /**
9472
+ * Configuration for custom action validation rules.
9473
+ * Defines allowed positions, metadata IDs, data model IDs, and fields for each target
9474
+ * type.
9475
+ *
9476
+ */
9477
+ const customActionValidationConfig = {
9478
+ [CustomActionTarget.LIVEBOARD]: {
9479
+ positions: [CustomActionsPosition.PRIMARY, CustomActionsPosition.MENU],
9480
+ allowedMetadataIds: ['liveboardIds'],
9481
+ allowedDataModelIds: [],
9482
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds'],
9483
+ },
9484
+ [CustomActionTarget.VIZ]: {
9485
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9486
+ allowedMetadataIds: ['liveboardIds', 'vizIds', 'answerIds'],
9487
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9488
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9489
+ },
9490
+ [CustomActionTarget.ANSWER]: {
9491
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.PRIMARY, CustomActionsPosition.CONTEXTMENU],
9492
+ allowedMetadataIds: ['answerIds'],
9493
+ allowedDataModelIds: ['modelIds', 'modelColumnNames'],
9494
+ allowedFields: ['name', 'id', 'position', 'target', 'metadataIds', 'orgIds', 'groupIds', 'dataModelIds'],
9495
+ },
9496
+ [CustomActionTarget.SPOTTER]: {
9497
+ positions: [CustomActionsPosition.MENU, CustomActionsPosition.CONTEXTMENU],
9498
+ allowedMetadataIds: [],
9499
+ allowedDataModelIds: ['modelIds'],
9500
+ allowedFields: ['name', 'id', 'position', 'target', 'orgIds', 'groupIds', 'dataModelIds'],
9501
+ },
9502
+ };
9503
+ /**
9504
+ * Validates a single custom action based on its target type
9505
+ * @param action - The custom action to validate
9506
+ * @param primaryActionsPerTarget - Map to track primary actions per target
9507
+ * @returns CustomActionValidation with isValid flag and reason string
9508
+ *
9509
+ * @hidden
9510
+ */
9511
+ const validateCustomAction = (action, primaryActionsPerTarget) => {
9512
+ const { id: actionId, target: targetType, position, metadataIds, dataModelIds } = action;
9513
+ // Check if target type is supported
9514
+ if (!customActionValidationConfig[targetType]) {
9515
+ const errorMessage = CUSTOM_ACTIONS_ERROR_MESSAGE.UNSUPPORTED_TARGET(actionId, targetType);
9516
+ return { isValid: false, errors: [errorMessage] };
9517
+ }
9518
+ const config = customActionValidationConfig[targetType];
9519
+ const errors = [];
9520
+ // Validate position
9521
+ if (!arrayIncludesString(config.positions, position)) {
9522
+ const supportedPositions = config.positions.join(', ');
9523
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_POSITION(position, targetType, supportedPositions));
9524
+ }
9525
+ // Validate metadata IDs
9526
+ if (metadataIds) {
9527
+ const invalidMetadataIds = Object.keys(metadataIds).filter((key) => !arrayIncludesString(config.allowedMetadataIds, key));
9528
+ if (invalidMetadataIds.length > 0) {
9529
+ const supportedMetadataIds = config.allowedMetadataIds.length > 0 ? config.allowedMetadataIds.join(', ') : 'none';
9530
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_METADATA_IDS(targetType, invalidMetadataIds, supportedMetadataIds));
9531
+ }
8010
9532
  }
8011
- async getAnswer() {
8012
- if (this.answer) {
8013
- return this.answer;
9533
+ // Validate data model IDs
9534
+ if (dataModelIds) {
9535
+ const invalidDataModelIds = Object.keys(dataModelIds).filter((key) => !arrayIncludesString(config.allowedDataModelIds, key));
9536
+ if (invalidDataModelIds.length > 0) {
9537
+ const supportedDataModelIds = config.allowedDataModelIds.length > 0 ? config.allowedDataModelIds.join(', ') : 'none';
9538
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_DATA_MODEL_IDS(targetType, invalidDataModelIds, supportedDataModelIds));
8014
9539
  }
8015
- this.answer = this.executeQuery(getAnswer, {}).then((data) => data === null || data === void 0 ? void 0 : data.answer);
8016
- return this.answer;
8017
- }
8018
- async getTML() {
8019
- const { object } = await this.executeQuery(getAnswerTML, {});
8020
- const edoc = object[0].edoc;
8021
- const YAML = await import('./index-BDlM0f0T.js');
8022
- const parsedDoc = YAML.parse(edoc);
8023
- return {
8024
- answer: {
8025
- ...parsedDoc.answer,
8026
- ...this.tmlOverride,
8027
- },
8028
- };
8029
9540
  }
8030
- async addDisplayedVizToLiveboard(liveboardId) {
8031
- const { displayMode, visualizations } = await this.getAnswer();
8032
- const viz = getDisplayedViz(visualizations, displayMode);
8033
- return this.executeQuery(addVizToLiveboard, {
8034
- liveboardId,
8035
- vizId: viz.id,
8036
- });
8037
- }
8038
- setTMLOverride(override) {
8039
- this.tmlOverride = override;
9541
+ // Validate allowed fields
9542
+ const actionKeys = Object.keys(action);
9543
+ const invalidFields = actionKeys.filter((key) => !arrayIncludesString(config.allowedFields, key));
9544
+ if (invalidFields.length > 0) {
9545
+ const supportedFields = config.allowedFields.join(', ');
9546
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_FIELDS(targetType, invalidFields, supportedFields));
8040
9547
  }
8041
- }
9548
+ return {
9549
+ isValid: errors.length === 0,
9550
+ errors,
9551
+ };
9552
+ };
8042
9553
  /**
9554
+ * Validates basic action structure and required fields
9555
+ * @param action - The action to validate
9556
+ * @returns Object containing validation result and missing fields
8043
9557
  *
8044
- * @param sourceDetail
8045
- * @param colNames
9558
+ * @hidden
8046
9559
  */
8047
- function getGuidsFromColumnNames(sourceDetail, colNames) {
8048
- const cols = sourceDetail.columns.reduce((colSet, col) => {
8049
- colSet[col.name.toLowerCase()] = col;
8050
- return colSet;
8051
- }, {});
8052
- return new Set(colNames.map((colName) => {
8053
- const col = cols[colName.toLowerCase()];
8054
- return col.id;
8055
- }));
8056
- }
9560
+ const validateActionStructure = (action) => {
9561
+ if (!action || typeof action !== 'object') {
9562
+ return { isValid: false, missingFields: [] };
9563
+ }
9564
+ // Check for all missing required fields
9565
+ const missingFields = ['id', 'name', 'target', 'position'].filter(field => !action[field]);
9566
+ return { isValid: missingFields.length === 0, missingFields };
9567
+ };
8057
9568
  /**
9569
+ * Checks for duplicate IDs among actions
9570
+ * @param actions - Array of actions to check
9571
+ * @returns Object containing filtered actions and duplicate errors
8058
9572
  *
8059
- * @param selectedPoints
9573
+ * @hidden
8060
9574
  */
8061
- function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
8062
- const underlyingDataPoint = [];
8063
- /**
8064
- *
8065
- * @param colVal
8066
- */
8067
- function addPointFromColVal(colVal) {
8068
- var _a;
8069
- const dataType = colVal.column.dataType;
8070
- colVal.column.id;
8071
- let dataValue;
8072
- if (dataType === 'DATE') {
8073
- if (Number.isFinite(colVal.value)) {
8074
- dataValue = [{
8075
- epochRange: {
8076
- startEpoch: colVal.value,
8077
- },
8078
- }];
8079
- // Case for custom calendar.
8080
- }
8081
- else if ((_a = colVal.value) === null || _a === void 0 ? void 0 : _a.v) {
8082
- dataValue = [{
8083
- epochRange: {
8084
- startEpoch: colVal.value.v.s,
8085
- endEpoch: colVal.value.v.e,
8086
- },
8087
- }];
8088
- }
9575
+ const filterDuplicateIds = (actions) => {
9576
+ const idMap = actions.reduce((map, action) => {
9577
+ const list = map.get(action.id) || [];
9578
+ list.push(action);
9579
+ map.set(action.id, list);
9580
+ return map;
9581
+ }, new Map());
9582
+ const { actions: actionsWithUniqueIds, errors } = Array.from(idMap.entries()).reduce((acc, [id, actionsWithSameId]) => {
9583
+ if (actionsWithSameId.length === 1) {
9584
+ acc.actions.push(actionsWithSameId[0]);
8089
9585
  }
8090
9586
  else {
8091
- dataValue = [{ value: colVal.value }];
9587
+ // Keep the first action and add error for duplicates
9588
+ acc.actions.push(actionsWithSameId[0]);
9589
+ const duplicateNames = actionsWithSameId.slice(1).map(action => action.name);
9590
+ acc.errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.DUPLICATE_IDS(id, duplicateNames, actionsWithSameId[0].name));
8092
9591
  }
8093
- underlyingDataPoint.push({
8094
- columnId: colVal.column.id,
8095
- dataValue,
8096
- });
8097
- }
8098
- selectedPoints.forEach((p) => {
8099
- p.selectedAttributes.forEach(addPointFromColVal);
8100
- });
8101
- return underlyingDataPoint;
8102
- }
9592
+ return acc;
9593
+ }, { actions: [], errors: [] });
9594
+ return { actions: actionsWithUniqueIds, errors };
9595
+ };
8103
9596
  /**
8104
- *
8105
- * @param visualizations
8106
- * @param displayMode
9597
+ * Validates and processes custom actions
9598
+ * @param customActions - Array of custom actions to validate
9599
+ * @returns Object containing valid actions and any validation errors
8107
9600
  */
8108
- function getDisplayedViz(visualizations, displayMode) {
8109
- if (displayMode === 'CHART_MODE') {
8110
- return visualizations.find(
8111
- // eslint-disable-next-line no-underscore-dangle
8112
- (viz) => viz.__typename === 'ChartViz');
8113
- }
8114
- return visualizations.find(
8115
- // eslint-disable-next-line no-underscore-dangle
8116
- (viz) => viz.__typename === 'TableViz');
8117
- }
9601
+ const getCustomActions = (customActions) => {
9602
+ const errors = [];
9603
+ if (!customActions || !Array.isArray(customActions)) {
9604
+ return { actions: [], errors: [] };
9605
+ }
9606
+ // Step 1: Handle invalid actions first (null, undefined, missing required
9607
+ // fields)
9608
+ const validActions = customActions.filter(action => {
9609
+ const validation = validateActionStructure(action);
9610
+ if (!validation.isValid) {
9611
+ if (!action || typeof action !== 'object') {
9612
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.INVALID_ACTION_OBJECT);
9613
+ }
9614
+ else {
9615
+ errors.push(CUSTOM_ACTIONS_ERROR_MESSAGE.MISSING_REQUIRED_FIELDS(action.id, validation.missingFields));
9616
+ }
9617
+ return false;
9618
+ }
9619
+ return true;
9620
+ });
9621
+ // Step 2: Check for duplicate IDs among valid actions
9622
+ const { actions: actionsWithUniqueIds, errors: duplicateErrors } = filterDuplicateIds(validActions);
9623
+ // Add duplicate errors to the errors array
9624
+ duplicateErrors.forEach(error => errors.push(error));
9625
+ // Step 3: Validate actions with unique IDs
9626
+ const finalValidActions = [];
9627
+ actionsWithUniqueIds.forEach((action) => {
9628
+ const { isValid, errors: validationErrors } = validateCustomAction(action);
9629
+ validationErrors.forEach(error => errors.push(error));
9630
+ if (isValid) {
9631
+ finalValidActions.push(action);
9632
+ }
9633
+ });
9634
+ const sortedActions = sortBy_1(finalValidActions, (a) => a.name.toLocaleLowerCase());
9635
+ return {
9636
+ actions: sortedActions,
9637
+ errors: errors,
9638
+ };
9639
+ };
8118
9640
 
8119
9641
  /**
8120
9642
  * Copyright (c) 2023
@@ -15808,6 +17330,13 @@ function processExitPresentMode(e) {
15808
17330
  handleExitPresentMode();
15809
17331
  }
15810
17332
  }
17333
+ /**
17334
+ * Clears the cached preauth and session info.
17335
+ */
17336
+ function processClearInfoCache() {
17337
+ resetCachedPreauthInfo();
17338
+ resetCachedSessionInfo();
17339
+ }
15811
17340
  /**
15812
17341
  *
15813
17342
  * @param e
@@ -15914,11 +17443,13 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
15914
17443
  return processAuthLogout(e, containerEl);
15915
17444
  case EmbedEvent.ExitPresentMode:
15916
17445
  return processExitPresentMode();
17446
+ case EmbedEvent.CLEAR_INFO_CACHE:
17447
+ return processClearInfoCache();
15917
17448
  }
15918
17449
  return e;
15919
17450
  }
15920
17451
 
15921
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.41.0-pre-render-1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
17452
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.41.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"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 | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
15922
17453
 
15923
17454
  /**
15924
17455
  * Reloads the ThoughtSpot iframe.
@@ -16229,10 +17760,10 @@ class TsEmbed {
16229
17760
  };
16230
17761
  this.showPreRenderByDefault = false;
16231
17762
  /**
16232
- * @hidden
16233
- * Internal state to track if the embed container is loaded.
16234
- * This is used to trigger events after the embed container is loaded.
16235
- */
17763
+ * @hidden
17764
+ * Internal state to track if the embed container is loaded.
17765
+ * This is used to trigger events after the embed container is loaded.
17766
+ */
16236
17767
  this.isEmbedContainerLoaded = false;
16237
17768
  /**
16238
17769
  * @hidden
@@ -16291,10 +17822,10 @@ class TsEmbed {
16291
17822
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
16292
17823
  ...viewConfig,
16293
17824
  });
16294
- const embedConfig = getEmbedConfig();
16295
- this.embedConfig = embedConfig;
16296
17825
  this.hostEventClient = new HostEventClient(this.iFrame);
16297
17826
  this.isReadyForRenderPromise = getInitPromise().then(async () => {
17827
+ const embedConfig = getEmbedConfig();
17828
+ this.embedConfig = embedConfig;
16298
17829
  if (!embedConfig.authTriggerContainer && !embedConfig.useEventForSAMLPopup) {
16299
17830
  this.embedConfig.authTriggerContainer = domSelector;
16300
17831
  }
@@ -16443,6 +17974,16 @@ class TsEmbed {
16443
17974
  async getDefaultAppInitData() {
16444
17975
  var _a, _b;
16445
17976
  const authToken = await this.getAuthTokenForCookielessInit();
17977
+ const customActionsResult = getCustomActions([
17978
+ ...(this.viewConfig.customActions || []),
17979
+ ...(this.embedConfig.customActions || [])
17980
+ ]);
17981
+ if (customActionsResult.errors.length > 0) {
17982
+ this.handleError({
17983
+ type: 'CUSTOM_ACTION_VALIDATION',
17984
+ message: customActionsResult.errors,
17985
+ });
17986
+ }
16446
17987
  return {
16447
17988
  customisations: getCustomisations(this.embedConfig, this.viewConfig),
16448
17989
  authToken,
@@ -16460,6 +18001,7 @@ class TsEmbed {
16460
18001
  : [],
16461
18002
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
16462
18003
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18004
+ customActions: customActionsResult.actions,
16463
18005
  };
16464
18006
  }
16465
18007
  async getAppInitData() {
@@ -16479,11 +18021,6 @@ class TsEmbed {
16479
18021
  .join('/');
16480
18022
  return `${basePath}#`;
16481
18023
  }
16482
- getUpdateEmbedParamsObject() {
16483
- let queryParams = this.getEmbedParamsObject();
16484
- queryParams = { ...this.viewConfig, ...queryParams };
16485
- return queryParams;
16486
- }
16487
18024
  /**
16488
18025
  * Common query params set for all the embed modes.
16489
18026
  * @param queryParams
@@ -16633,13 +18170,9 @@ class TsEmbed {
16633
18170
  return path;
16634
18171
  }
16635
18172
  getEmbedParams() {
16636
- const queryParams = this.getEmbedParamsObject();
18173
+ const queryParams = this.getBaseQueryParams();
16637
18174
  return getQueryParamString(queryParams);
16638
18175
  }
16639
- getEmbedParamsObject() {
16640
- const params = this.getBaseQueryParams();
16641
- return params;
16642
- }
16643
18176
  getRootIframeSrc() {
16644
18177
  const query = this.getEmbedParams();
16645
18178
  return this.getEmbedBasePath(query);
@@ -17110,13 +18643,17 @@ class TsEmbed {
17110
18643
  * Creates the preRender shell
17111
18644
  * @param showPreRenderByDefault - Show the preRender after render, hidden by default
17112
18645
  */
17113
- async preRender(showPreRenderByDefault = false) {
18646
+ async preRender(showPreRenderByDefault = false, replaceExistingPreRender = false) {
17114
18647
  if (!this.viewConfig.preRenderId) {
17115
18648
  logger$3.error(ERROR_MESSAGE.PRERENDER_ID_MISSING);
17116
18649
  return this;
17117
18650
  }
17118
18651
  this.isPreRendered = true;
17119
18652
  this.showPreRenderByDefault = showPreRenderByDefault;
18653
+ const isAlreadyRendered = this.connectPreRendered();
18654
+ if (isAlreadyRendered && !replaceExistingPreRender) {
18655
+ return this;
18656
+ }
17120
18657
  return this.handleRenderForPrerender();
17121
18658
  }
17122
18659
  /**
@@ -17200,12 +18737,7 @@ class TsEmbed {
17200
18737
  return this.preRender(true);
17201
18738
  }
17202
18739
  this.validatePreRenderViewConfig(this.viewConfig);
17203
- logger$3.debug('triggering UpdateEmbedParams', this.viewConfig);
17204
- this.executeAfterEmbedContainerLoaded(() => {
17205
- this.trigger(HostEvent.UpdateEmbedParams, this.getUpdateEmbedParamsObject());
17206
- });
17207
18740
  }
17208
- this.beforePrerenderVisible();
17209
18741
  if (this.el) {
17210
18742
  this.syncPreRenderStyle();
17211
18743
  if (!this.viewConfig.doNotTrackPreRenderSize) {
@@ -17222,6 +18754,7 @@ class TsEmbed {
17222
18754
  this.resizeObserver.observe(this.el);
17223
18755
  }
17224
18756
  }
18757
+ this.beforePrerenderVisible();
17225
18758
  removeStyleProperties(this.preRenderWrapper, ['z-index', 'opacity', 'pointer-events']);
17226
18759
  this.subscribeToEvents();
17227
18760
  // Setup fullscreen change handler for prerendered components
@@ -17495,6 +19028,11 @@ var HomePage;
17495
19028
  * It serves as the foundational version of the home page.
17496
19029
  */
17497
19030
  HomePage["Modular"] = "v2";
19031
+ /**
19032
+ * ModularWithStylingChanges (v3) introduces Modular Home Experience
19033
+ * with styling changes.
19034
+ */
19035
+ HomePage["ModularWithStylingChanges"] = "v3";
17498
19036
  })(HomePage || (HomePage = {}));
17499
19037
  /**
17500
19038
  * Define the version of the list page
@@ -17582,7 +19120,7 @@ class AppEmbed extends V1Embed {
17582
19120
  * embedded Liveboard or visualization.
17583
19121
  */
17584
19122
  getEmbedParams() {
17585
- const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, 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, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
19123
+ const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, } = this.viewConfig;
17586
19124
  let params = {};
17587
19125
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
17588
19126
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -17599,6 +19137,7 @@ class AppEmbed extends V1Embed {
17599
19137
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
17600
19138
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
17601
19139
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
19140
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
17602
19141
  params = this.getBaseQueryParams(params);
17603
19142
  if (hideObjectSearch) {
17604
19143
  params[Param.HideObjectSearch] = !!hideObjectSearch;
@@ -17646,6 +19185,9 @@ class AppEmbed extends V1Embed {
17646
19185
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
17647
19186
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
17648
19187
  }
19188
+ if (isPNGInScheduledEmailsEnabled !== undefined) {
19189
+ params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
19190
+ }
17649
19191
  params[Param.DataPanelV2Enabled] = dataPanelV2;
17650
19192
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
17651
19193
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -17666,6 +19208,12 @@ class AppEmbed extends V1Embed {
17666
19208
  // To use v3 navigation, we must manually set the discoveryExperience
17667
19209
  // settings.
17668
19210
  params[Param.NavigationVersion] = 'v2';
19211
+ // Set homePageVersion to v2 by default to reset the LD flag value
19212
+ // for the homepageVersion.
19213
+ params[Param.HomepageVersion] = 'v2';
19214
+ // Set listpageVersion to v2 by default to reset the LD flag value
19215
+ // for the listpageVersion.
19216
+ params[Param.ListPageVersion] = ListPage.List;
17669
19217
  if (discoveryExperience) {
17670
19218
  // primaryNavbarVersion v3 will enabled the new left navigation
17671
19219
  if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
@@ -17678,6 +19226,12 @@ class AppEmbed extends V1Embed {
17678
19226
  if (discoveryExperience.homePage === HomePage.Modular) {
17679
19227
  params[Param.ModularHomeExperienceEnabled] = true;
17680
19228
  }
19229
+ // ModularWithStylingChanges (v3) introduces the styling changes
19230
+ // to the Modular Homepage.
19231
+ // v3 will be the base version of homePageVersion.
19232
+ if (discoveryExperience.homePage === HomePage.ModularWithStylingChanges) {
19233
+ params[Param.HomepageVersion] = HomePage.ModularWithStylingChanges;
19234
+ }
17681
19235
  // listPageVersion v3 will enable the new list page
17682
19236
  if (discoveryExperience.listPageVersion === ListPage.ListWithUXChanges) {
17683
19237
  params[Param.ListPageVersion] = discoveryExperience.listPageVersion;
@@ -17981,14 +19535,9 @@ class LiveboardEmbed extends V1Embed {
17981
19535
  * embedded Liveboard or visualization.
17982
19536
  */
17983
19537
  getEmbedParams() {
17984
- const params = this.getEmbedParamsObject();
17985
- const queryParams = getQueryParamString(params, true);
17986
- return queryParams;
17987
- }
17988
- getEmbedParamsObject() {
17989
19538
  let params = {};
17990
19539
  params = this.getBaseQueryParams(params);
17991
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
19540
+ const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, } = this.viewConfig;
17992
19541
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
17993
19542
  || this.viewConfig.preventPinboardFilterRemoval;
17994
19543
  if (fullHeight === true) {
@@ -18047,25 +19596,11 @@ class LiveboardEmbed extends V1Embed {
18047
19596
  if (isLiveboardStylingAndGroupingEnabled !== undefined) {
18048
19597
  params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
18049
19598
  }
18050
- params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
18051
- params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
18052
- params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
18053
- params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
18054
- params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
18055
- params[Param.DataPanelV2Enabled] = dataPanelV2;
18056
- params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18057
- params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
18058
- if (oAuthPollingInterval !== undefined) {
18059
- params[Param.OauthPollingInterval] = oAuthPollingInterval;
18060
- }
18061
- if (isForceRedirect) {
18062
- params[Param.IsForceRedirect] = isForceRedirect;
18063
- }
18064
- if (dataSourceId !== undefined) {
18065
- params[Param.DataSourceId] = dataSourceId;
19599
+ if (isPNGInScheduledEmailsEnabled !== undefined) {
19600
+ params[Param.isPNGInScheduledEmailsEnabled] = isPNGInScheduledEmailsEnabled;
18066
19601
  }
18067
- if (isLiveboardStylingAndGroupingEnabled !== undefined) {
18068
- params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
19602
+ if (showSpotterLimitations !== undefined) {
19603
+ params[Param.ShowSpotterLimitations] = showSpotterLimitations;
18069
19604
  }
18070
19605
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
18071
19606
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -18075,7 +19610,9 @@ class LiveboardEmbed extends V1Embed {
18075
19610
  params[Param.DataPanelV2Enabled] = dataPanelV2;
18076
19611
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18077
19612
  params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
18078
- return params;
19613
+ params[Param.LiveboardXLSXCSVDownload] = !!liveboardXLSXCSVDownload;
19614
+ const queryParams = getQueryParamString(params, true);
19615
+ return queryParams;
18079
19616
  }
18080
19617
  getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
18081
19618
  let suffix = `/embed/viz/${liveboardId}`;
@@ -18317,9 +19854,11 @@ class SearchEmbed extends TsEmbed {
18317
19854
  const defaultAppInitData = await super.getAppInitData();
18318
19855
  return { ...defaultAppInitData, ...this.getSearchInitData() };
18319
19856
  }
18320
- getEmbedParamsObject() {
19857
+ getEmbedParams() {
18321
19858
  var _a;
18322
- const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
19859
+ const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, hideSearchBar, dataPanelV2 = true, useLastSelectedSources = false, runtimeParameters, collapseSearchBarInitially = false, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
19860
+ /* eslint-disable-next-line max-len */
19861
+ dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, focusSearchBarOnRender = true, excludeRuntimeParametersfromURL, excludeSearchTokenStringFromURL, collapseSearchBar = true, } = this.viewConfig;
18323
19862
  const queryParams = this.getBaseQueryParams();
18324
19863
  queryParams[Param.HideActions] = [
18325
19864
  ...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
@@ -18352,6 +19891,7 @@ class SearchEmbed extends TsEmbed {
18352
19891
  queryParams[Param.HideSearchBar] = true;
18353
19892
  }
18354
19893
  if (isOnBeforeGetVizDataInterceptEnabled) {
19894
+ /* eslint-disable-next-line max-len */
18355
19895
  queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
18356
19896
  }
18357
19897
  if (!focusSearchBarOnRender) {
@@ -18364,22 +19904,20 @@ class SearchEmbed extends TsEmbed {
18364
19904
  queryParams[Param.UseLastSelectedDataSource] = false;
18365
19905
  }
18366
19906
  queryParams[Param.searchEmbed] = true;
19907
+ /* eslint-disable-next-line max-len */
18367
19908
  queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially || collapseSearchBar;
18368
19909
  queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
18369
19910
  if (dataPanelCustomGroupsAccordionInitialState
18370
19911
  === DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
18371
19912
  || dataPanelCustomGroupsAccordionInitialState
18372
19913
  === DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST) {
19914
+ /* eslint-disable-next-line max-len */
18373
19915
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
18374
19916
  }
18375
19917
  else {
19918
+ /* eslint-disable-next-line max-len */
18376
19919
  queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
18377
19920
  }
18378
- return queryParams;
18379
- }
18380
- getEmbedParams() {
18381
- const { runtimeParameters, runtimeFilters, excludeRuntimeParametersfromURL, excludeRuntimeFiltersfromURL, } = this.viewConfig;
18382
- const queryParams = this.getEmbedParamsObject();
18383
19921
  let query = '';
18384
19922
  const queryParamsString = getQueryParamString(queryParams, true);
18385
19923
  if (queryParamsString) {
@@ -18435,9 +19973,15 @@ class SearchBarEmbed extends TsEmbed {
18435
19973
  this.embedComponentType = 'SearchBarEmbed';
18436
19974
  this.viewConfig = viewConfig;
18437
19975
  }
18438
- getEmbedParamsObject() {
19976
+ /**
19977
+ * Construct the URL of the embedded ThoughtSpot search to be
19978
+ * loaded in the iframe
19979
+ * @param dataSources A list of data source GUIDs
19980
+ */
19981
+ getIFrameSrc() {
18439
19982
  var _a;
18440
19983
  const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, excludeSearchTokenStringFromURL, } = this.viewConfig;
19984
+ const path = 'search-bar-embed';
18441
19985
  const queryParams = this.getBaseQueryParams();
18442
19986
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18443
19987
  if (dataSources && dataSources.length) {
@@ -18459,16 +20003,6 @@ class SearchBarEmbed extends TsEmbed {
18459
20003
  queryParams[Param.UseLastSelectedDataSource] = false;
18460
20004
  }
18461
20005
  queryParams[Param.searchEmbed] = true;
18462
- return queryParams;
18463
- }
18464
- /**
18465
- * Construct the URL of the embedded ThoughtSpot search to be
18466
- * loaded in the iframe
18467
- * @param dataSources A list of data source GUIDs
18468
- */
18469
- getIFrameSrc() {
18470
- const queryParams = this.getEmbedParamsObject();
18471
- const path = 'search-bar-embed';
18472
20006
  let query = '';
18473
20007
  const queryParamsString = getQueryParamString(queryParams, true);
18474
20008
  if (queryParamsString) {
@@ -18891,17 +20425,13 @@ class ConversationMessage extends TsEmbed {
18891
20425
  super(container, viewConfig);
18892
20426
  this.viewConfig = viewConfig;
18893
20427
  }
18894
- getEmbedParamsObject() {
20428
+ getIframeSrc() {
18895
20429
  var _a;
20430
+ const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
20431
+ const path = 'conv-assist-answer';
18896
20432
  const queryParams = this.getBaseQueryParams();
18897
20433
  queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
18898
20434
  queryParams[Param.isSpotterAgentEmbed] = true;
18899
- return queryParams;
18900
- }
18901
- getIframeSrc() {
18902
- const { sessionId, genNo, acSessionId, acGenNo, convId, messageId, } = this.viewConfig;
18903
- const path = 'conv-assist-answer';
18904
- const queryParams = this.getEmbedParamsObject();
18905
20435
  let query = '';
18906
20436
  const queryParamsString = getQueryParamString(queryParams, true);
18907
20437
  if (queryParamsString) {
@@ -19062,8 +20592,9 @@ class SpotterEmbed extends TsEmbed {
19062
20592
  super(container, viewConfig);
19063
20593
  this.viewConfig = viewConfig;
19064
20594
  }
19065
- getEmbedParamsObject() {
20595
+ getIframeSrc() {
19066
20596
  const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
20597
+ const path = 'insights/conv-assist';
19067
20598
  if (!worksheetId) {
19068
20599
  this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
19069
20600
  }
@@ -19084,12 +20615,6 @@ class SpotterEmbed extends TsEmbed {
19084
20615
  if (!isUndefined_1(hideSampleQuestions)) {
19085
20616
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
19086
20617
  }
19087
- return queryParams;
19088
- }
19089
- getIframeSrc() {
19090
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
19091
- const path = 'insights/conv-assist';
19092
- const queryParams = this.getEmbedParamsObject();
19093
20618
  let query = '';
19094
20619
  const queryParamsString = getQueryParamString(queryParams, true);
19095
20620
  if (queryParamsString) {
@@ -19161,7 +20686,12 @@ class SageEmbed extends V1Embed {
19161
20686
  viewConfig.embedComponentType = 'SageEmbed';
19162
20687
  super(domSelector, viewConfig);
19163
20688
  }
19164
- getEmbedParamsObject() {
20689
+ /**
20690
+ * Constructs a map of parameters to be passed on to the
20691
+ * embedded Eureka or Sage search page.
20692
+ * @returns {string} query string
20693
+ */
20694
+ getEmbedParams() {
19165
20695
  const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, dataPanelV2, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
19166
20696
  const params = this.getBaseQueryParams();
19167
20697
  params[Param.DataPanelV2Enabled] = !!dataPanelV2;
@@ -19176,15 +20706,6 @@ class SageEmbed extends V1Embed {
19176
20706
  params[Param.HideSampleQuestions] = !!hideSampleQuestions;
19177
20707
  params[Param.IsProductTour] = !!isProductTour;
19178
20708
  params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
19179
- return params;
19180
- }
19181
- /**
19182
- * Constructs a map of parameters to be passed on to the
19183
- * embedded Eureka or Sage search page.
19184
- * @returns {string} query string
19185
- */
19186
- getEmbedParams() {
19187
- const params = this.getEmbedParamsObject();
19188
20709
  return getQueryParamString(params, true);
19189
20710
  }
19190
20711
  /**
@@ -19745,4 +21266,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
19745
21266
  return result;
19746
21267
  };
19747
21268
 
19748
- export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
21269
+ export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, CustomActionTarget, CustomActionsPosition, DataPanelCustomColumnGroupsAccordionState$1 as DataPanelCustomColumnGroupsAccordionState, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPage, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };