@thoughtspot/visual-embed-sdk 1.43.1 → 1.44.1-test

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 (151) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/api-intercept.d.ts.map +1 -1
  3. package/cjs/src/api-intercept.js +8 -3
  4. package/cjs/src/api-intercept.js.map +1 -1
  5. package/cjs/src/api-intercept.spec.js +19 -3
  6. package/cjs/src/api-intercept.spec.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +32 -0
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +9 -4
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/app.spec.js +104 -1
  12. package/cjs/src/embed/app.spec.js.map +1 -1
  13. package/cjs/src/embed/base.d.ts +7 -0
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +16 -1
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/base.spec.js +21 -0
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/conversation.d.ts +15 -0
  20. package/cjs/src/embed/conversation.d.ts.map +1 -1
  21. package/cjs/src/embed/conversation.js +10 -2
  22. package/cjs/src/embed/conversation.js.map +1 -1
  23. package/cjs/src/embed/conversation.spec.js +30 -1
  24. package/cjs/src/embed/conversation.spec.js.map +1 -1
  25. package/cjs/src/embed/liveboard.d.ts +33 -0
  26. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  27. package/cjs/src/embed/liveboard.js +13 -5
  28. package/cjs/src/embed/liveboard.js.map +1 -1
  29. package/cjs/src/embed/liveboard.spec.js +108 -0
  30. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  31. package/cjs/src/embed/ts-embed.d.ts +3 -2
  32. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  33. package/cjs/src/embed/ts-embed.js +51 -17
  34. package/cjs/src/embed/ts-embed.js.map +1 -1
  35. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  36. package/cjs/src/embed/ts-embed.spec.js +93 -5
  37. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  38. package/cjs/src/errors.d.ts +7 -0
  39. package/cjs/src/errors.d.ts.map +1 -1
  40. package/cjs/src/errors.js +7 -0
  41. package/cjs/src/errors.js.map +1 -1
  42. package/cjs/src/index.d.ts +2 -2
  43. package/cjs/src/index.d.ts.map +1 -1
  44. package/cjs/src/index.js +2 -1
  45. package/cjs/src/index.js.map +1 -1
  46. package/cjs/src/react/all-types-export.d.ts +1 -1
  47. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  48. package/cjs/src/react/all-types-export.js +2 -1
  49. package/cjs/src/react/all-types-export.js.map +1 -1
  50. package/cjs/src/types.d.ts +250 -7
  51. package/cjs/src/types.d.ts.map +1 -1
  52. package/cjs/src/types.js +135 -2
  53. package/cjs/src/types.js.map +1 -1
  54. package/dist/{index-CpkMygsc.js → index-BXCUJ09L.js} +1 -1
  55. package/dist/src/api-intercept.d.ts.map +1 -1
  56. package/dist/src/embed/app.d.ts +32 -0
  57. package/dist/src/embed/app.d.ts.map +1 -1
  58. package/dist/src/embed/base.d.ts +7 -0
  59. package/dist/src/embed/base.d.ts.map +1 -1
  60. package/dist/src/embed/conversation.d.ts +15 -0
  61. package/dist/src/embed/conversation.d.ts.map +1 -1
  62. package/dist/src/embed/liveboard.d.ts +33 -0
  63. package/dist/src/embed/liveboard.d.ts.map +1 -1
  64. package/dist/src/embed/ts-embed.d.ts +3 -2
  65. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  66. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  67. package/dist/src/errors.d.ts +7 -0
  68. package/dist/src/errors.d.ts.map +1 -1
  69. package/dist/src/index.d.ts +2 -2
  70. package/dist/src/index.d.ts.map +1 -1
  71. package/dist/src/react/all-types-export.d.ts +1 -1
  72. package/dist/src/react/all-types-export.d.ts.map +1 -1
  73. package/dist/src/types.d.ts +250 -7
  74. package/dist/src/types.d.ts.map +1 -1
  75. package/dist/tsembed-react.es.js +304 -105
  76. package/dist/tsembed-react.js +303 -104
  77. package/dist/tsembed.es.js +318 -106
  78. package/dist/tsembed.js +317 -104
  79. package/dist/visual-embed-sdk-react-full.d.ts +290 -7
  80. package/dist/visual-embed-sdk-react.d.ts +283 -7
  81. package/dist/visual-embed-sdk.d.ts +290 -7
  82. package/lib/package.json +1 -1
  83. package/lib/src/api-intercept.d.ts.map +1 -1
  84. package/lib/src/api-intercept.js +9 -4
  85. package/lib/src/api-intercept.js.map +1 -1
  86. package/lib/src/api-intercept.spec.js +20 -4
  87. package/lib/src/api-intercept.spec.js.map +1 -1
  88. package/lib/src/embed/app.d.ts +32 -0
  89. package/lib/src/embed/app.d.ts.map +1 -1
  90. package/lib/src/embed/app.js +10 -5
  91. package/lib/src/embed/app.js.map +1 -1
  92. package/lib/src/embed/app.spec.js +104 -1
  93. package/lib/src/embed/app.spec.js.map +1 -1
  94. package/lib/src/embed/base.d.ts +7 -0
  95. package/lib/src/embed/base.d.ts.map +1 -1
  96. package/lib/src/embed/base.js +14 -0
  97. package/lib/src/embed/base.js.map +1 -1
  98. package/lib/src/embed/base.spec.js +21 -0
  99. package/lib/src/embed/base.spec.js.map +1 -1
  100. package/lib/src/embed/conversation.d.ts +15 -0
  101. package/lib/src/embed/conversation.d.ts.map +1 -1
  102. package/lib/src/embed/conversation.js +11 -3
  103. package/lib/src/embed/conversation.js.map +1 -1
  104. package/lib/src/embed/conversation.spec.js +31 -2
  105. package/lib/src/embed/conversation.spec.js.map +1 -1
  106. package/lib/src/embed/liveboard.d.ts +33 -0
  107. package/lib/src/embed/liveboard.d.ts.map +1 -1
  108. package/lib/src/embed/liveboard.js +14 -6
  109. package/lib/src/embed/liveboard.js.map +1 -1
  110. package/lib/src/embed/liveboard.spec.js +108 -0
  111. package/lib/src/embed/liveboard.spec.js.map +1 -1
  112. package/lib/src/embed/ts-embed.d.ts +3 -2
  113. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  114. package/lib/src/embed/ts-embed.js +52 -18
  115. package/lib/src/embed/ts-embed.js.map +1 -1
  116. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  117. package/lib/src/embed/ts-embed.spec.js +94 -6
  118. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  119. package/lib/src/errors.d.ts +7 -0
  120. package/lib/src/errors.d.ts.map +1 -1
  121. package/lib/src/errors.js +7 -0
  122. package/lib/src/errors.js.map +1 -1
  123. package/lib/src/index.d.ts +2 -2
  124. package/lib/src/index.d.ts.map +1 -1
  125. package/lib/src/index.js +2 -2
  126. package/lib/src/index.js.map +1 -1
  127. package/lib/src/react/all-types-export.d.ts +1 -1
  128. package/lib/src/react/all-types-export.d.ts.map +1 -1
  129. package/lib/src/react/all-types-export.js +1 -1
  130. package/lib/src/react/all-types-export.js.map +1 -1
  131. package/lib/src/types.d.ts +250 -7
  132. package/lib/src/types.d.ts.map +1 -1
  133. package/lib/src/types.js +134 -1
  134. package/lib/src/types.js.map +1 -1
  135. package/package.json +1 -1
  136. package/src/api-intercept.spec.ts +23 -10
  137. package/src/api-intercept.ts +9 -4
  138. package/src/embed/app.spec.ts +146 -4
  139. package/src/embed/app.ts +69 -24
  140. package/src/embed/base.spec.ts +28 -0
  141. package/src/embed/base.ts +15 -0
  142. package/src/embed/conversation.spec.ts +39 -2
  143. package/src/embed/conversation.ts +28 -2
  144. package/src/embed/liveboard.spec.ts +136 -0
  145. package/src/embed/liveboard.ts +51 -4
  146. package/src/embed/ts-embed.spec.ts +107 -15
  147. package/src/embed/ts-embed.ts +56 -19
  148. package/src/errors.ts +7 -0
  149. package/src/index.ts +2 -0
  150. package/src/react/all-types-export.ts +1 -0
  151. package/src/types.ts +260 -6
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.43.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.44.1-test */
2
2
  'use client';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -602,6 +602,7 @@
602
602
  * SearchEmbed.on(EmbedEvent.Error, (error) => {
603
603
  * console.log(error);
604
604
  * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
605
+ * // { errorType: "API", message: '...', code: '...' } new format
605
606
  * });
606
607
  * ```
607
608
  * @example
@@ -613,6 +614,7 @@
613
614
  * // message: "Fullscreen API is not enabled",
614
615
  * // stack: "..."
615
616
  * // } }}
617
+ * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
616
618
  * })
617
619
  * ```
618
620
  */
@@ -768,7 +770,8 @@
768
770
  */
769
771
  EmbedEvent["ALL"] = "*";
770
772
  /**
771
- * Emitted when an Answer is saved in the app
773
+ * Emitted when an Answer is saved in the app.
774
+ * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true.
772
775
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
773
776
  * @example
774
777
  *```js
@@ -803,6 +806,7 @@
803
806
  EmbedEvent["Download"] = "download";
804
807
  /**
805
808
  * Emitted when the download action is triggered on an Answer.
809
+ * Use start:true to subscribe to when download is initiated, or end:true to subscribe to when download is completed. Default is end:true.
806
810
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
807
811
  * @example
808
812
  *```js
@@ -817,6 +821,7 @@
817
821
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
818
822
  /**
819
823
  * Emitted when the Download as PDF action is triggered on an Answer
824
+ * Use start:true to subscribe to when download as PDF is initiated, or end:true to subscribe to when download as PDF is completed. Default is end:true.
820
825
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
821
826
  * @example
822
827
  *```js
@@ -831,6 +836,7 @@
831
836
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
832
837
  /**
833
838
  * Emitted when the Download as CSV action is triggered on an Answer.
839
+ * Use start:true to subscribe to when download as CSV is initiated, or end:true to subscribe to when download as CSV is completed. Default is end:true.
834
840
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
835
841
  * @example
836
842
  *```js
@@ -845,6 +851,7 @@
845
851
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
846
852
  /**
847
853
  * Emitted when the Download as XLSX action is triggered on an Answer.
854
+ * Use start:true to subscribe to when download as XLSX is initiated, or end:true to subscribe to when download as XLSX is completed. Default is end:true.
848
855
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
849
856
  * @example
850
857
  *```js
@@ -859,6 +866,7 @@
859
866
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
860
867
  /**
861
868
  * Emitted when an Answer is deleted in the app
869
+ * Use start:true to subscribe to when delete is initiated, or end:true to subscribe to when delete is completed. Default is end:true.
862
870
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
863
871
  * @example
864
872
  *```js
@@ -885,6 +893,7 @@
885
893
  /**
886
894
  * Emitted when a user initiates the Pin action to
887
895
  * add an Answer to a Liveboard.
896
+ * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to when pin is completed. Default is end:true.
888
897
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
889
898
  * @example
890
899
  *```js
@@ -998,6 +1007,7 @@
998
1007
  /**
999
1008
  * Emitted when the **Export TML** action is triggered on an
1000
1009
  * an embedded object in the app
1010
+ * Use start:true to subscribe to when export is initiated, or end:true to subscribe to when export is completed. Default is end:true.
1001
1011
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1002
1012
  * @example
1003
1013
  *```js
@@ -1023,6 +1033,7 @@
1023
1033
  EmbedEvent["SaveAsView"] = "saveAsView";
1024
1034
  /**
1025
1035
  * Emitted when the user creates a copy of an Answer.
1036
+ * Use start:true to subscribe to when copy and edit is initiated, or end:true to subscribe to when copy and edit is completed. Default is end:true.
1026
1037
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1027
1038
  * @example
1028
1039
  *```js
@@ -3094,6 +3105,8 @@
3094
3105
  Param["HideLiveboardHeader"] = "hideLiveboardHeader";
3095
3106
  Param["ShowLiveboardDescription"] = "showLiveboardDescription";
3096
3107
  Param["ShowLiveboardTitle"] = "showLiveboardTitle";
3108
+ Param["ShowMaskedFilterChip"] = "showMaskedFilterChip";
3109
+ Param["IsLiveboardMasterpiecesEnabled"] = "isLiveboardMasterpiecesEnabled";
3097
3110
  Param["HiddenTabs"] = "hideTabs";
3098
3111
  Param["VisibleTabs"] = "visibleTabs";
3099
3112
  Param["HideTabPanel"] = "hideTabPanel";
@@ -3150,6 +3163,7 @@
3150
3163
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
3151
3164
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3152
3165
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3166
+ Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3153
3167
  })(Param || (Param = {}));
3154
3168
  /**
3155
3169
  * ThoughtSpot application pages include actions and menu commands
@@ -4464,6 +4478,46 @@
4464
4478
  * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
4465
4479
  */
4466
4480
  Action["LiveboardStylePanel"] = "liveboardStylePanel";
4481
+ /**
4482
+ * The **Move to Group** menu action on a Liveboard.
4483
+ * Allows moving a visualization to a different group.
4484
+ * @example
4485
+ * ```js
4486
+ * disabledActions: [Action.MoveToGroup]
4487
+ * ```
4488
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4489
+ */
4490
+ Action["MoveToGroup"] = "moveToGroup";
4491
+ /**
4492
+ * The **Move out of Group** menu action on a Liveboard.
4493
+ * Allows moving a visualization out of a group.
4494
+ * @example
4495
+ * ```js
4496
+ * disabledActions: [Action.MoveOutOfGroup]
4497
+ * ```
4498
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4499
+ */
4500
+ Action["MoveOutOfGroup"] = "moveOutOfGroup";
4501
+ /**
4502
+ * The **Create Group** menu action on a Liveboard.
4503
+ * Allows creating a new group.
4504
+ * @example
4505
+ * ```js
4506
+ * disabledActions: [Action.CreateGroup]
4507
+ * ```
4508
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4509
+ */
4510
+ Action["CreateGroup"] = "createGroup";
4511
+ /**
4512
+ * The **Ungroup Liveboard Group** menu action on a Liveboard.
4513
+ * Allows ungrouping a liveboard group.
4514
+ * @example
4515
+ * ```js
4516
+ * disabledActions: [Action.UngroupLiveboardGroup]
4517
+ * ```
4518
+ * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4519
+ */
4520
+ Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4467
4521
  })(exports.Action || (exports.Action = {}));
4468
4522
  exports.PrefetchFeatures = void 0;
4469
4523
  (function (PrefetchFeatures) {
@@ -4586,6 +4640,85 @@
4586
4640
  */
4587
4641
  LogLevel["TRACE"] = "TRACE";
4588
4642
  })(exports.LogLevel || (exports.LogLevel = {}));
4643
+ /**
4644
+ * Error types emitted by embedded components.
4645
+ *
4646
+ * These enum values categorize different types of errors that can occur during
4647
+ * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4648
+ * specific error handling logic based on the error category.
4649
+ *
4650
+ * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4651
+ * @see {@link EmbedEvent.Error} - The event that emits these errors
4652
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4653
+ * @group Error Handling
4654
+ */
4655
+ var ErrorDetailsTypes;
4656
+ (function (ErrorDetailsTypes) {
4657
+ /** API call failure */
4658
+ ErrorDetailsTypes["API"] = "API";
4659
+ /** General validation error */
4660
+ ErrorDetailsTypes["VALIDATION_ERROR"] = "VALIDATION_ERROR";
4661
+ /** Network connectivity or request error */
4662
+ ErrorDetailsTypes["NETWORK"] = "NETWORK";
4663
+ })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4664
+ /**
4665
+ * Specific error codes for embedded component errors.
4666
+ *
4667
+ * These codes provide granular identification of errors that occur in embedded components.
4668
+ * They are returned in the {@link EmbedErrorDetailsEvent.code} property and allow for
4669
+ * precise error handling and debugging.
4670
+ *
4671
+ * The codes are organized into categories:
4672
+ * - **Worksheet ID not found or does not exist**: Errors related to applying or updating filters
4673
+ * - **Liveboard ID missing**: Errors related to missing liveboard ID
4674
+ * - **Conflicting actions configuration**: Errors related to conflicting actions configuration
4675
+ * - **Conflicting tabs configuration**: Errors related to conflicting tabs configuration
4676
+ * - **Initialization error**: Errors related to initialization error
4677
+ * - **Network error**: Errors related to network error
4678
+ * - **Custom action validation**: Errors related to custom action validation
4679
+ * - **Login failed**: Errors related to login failed
4680
+ * - **Render not called**: Errors related to render not called
4681
+ * - **Host event type undefined or invalid**: Errors related to host event type undefined or invalid
4682
+ *
4683
+ * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4684
+ * @group Error Handling
4685
+ * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4686
+ * @see {@link ErrorDetailsTypes} - General error type categories
4687
+ *
4688
+ * @example
4689
+ * Handle specific error codes
4690
+ *
4691
+ * embed.on(EmbedEvent.Error, (error) => {
4692
+ * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4693
+ * console.error('Worksheet ID not found:', error.message);
4694
+ * }
4695
+ * });
4696
+ * */
4697
+ var EmbedErrorCodes;
4698
+ (function (EmbedErrorCodes) {
4699
+ /** Worksheet ID not found or does not exist */
4700
+ EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4701
+ /** Required Liveboard ID is missing from configuration */
4702
+ EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4703
+ /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
4704
+ EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4705
+ /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
4706
+ EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4707
+ /** Error during component initialization */
4708
+ EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
4709
+ /** Network connectivity or request error */
4710
+ EmbedErrorCodes["NETWORK_ERROR"] = "NETWORK_ERROR";
4711
+ /** Custom action validation failed */
4712
+ EmbedErrorCodes["CUSTOM_ACTION_VALIDATION"] = "CUSTOM_ACTION_VALIDATION";
4713
+ /** Authentication/login failed */
4714
+ EmbedErrorCodes["LOGIN_FAILED"] = "LOGIN_FAILED";
4715
+ /** Render method was not called before attempting to use the component */
4716
+ EmbedErrorCodes["RENDER_NOT_CALLED"] = "RENDER_NOT_CALLED";
4717
+ /** Host event type is undefined or invalid */
4718
+ EmbedErrorCodes["HOST_EVENT_TYPE_UNDEFINED"] = "HOST_EVENT_TYPE_UNDEFINED";
4719
+ /** Error parsing api intercept body */
4720
+ EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
4721
+ })(EmbedErrorCodes || (EmbedErrorCodes = {}));
4589
4722
  /**
4590
4723
  * Enum for the type of API intercepted
4591
4724
  */
@@ -7452,6 +7585,13 @@
7452
7585
  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',
7453
7586
  SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized',
7454
7587
  OFFLINE_WARNING: 'Network not Detected. Embed is offline. Please reconnect and refresh',
7588
+ INIT_SDK_REQUIRED: 'You need to init the ThoughtSpot SDK module first',
7589
+ CONFLICTING_ACTIONS_CONFIG: 'You cannot have both hidden actions and visible actions',
7590
+ CONFLICTING_TABS_CONFIG: 'You cannot have both hidden Tabs and visible Tabs',
7591
+ RENDER_BEFORE_EVENTS_REQUIRED: 'Please call render before triggering events',
7592
+ HOST_EVENT_TYPE_UNDEFINED: 'Host event type is undefined',
7593
+ LOGIN_FAILED: 'Login failed',
7594
+ ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
7455
7595
  };
7456
7596
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
7457
7597
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -17232,6 +17372,76 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17232
17372
  };
17233
17373
  }
17234
17374
 
17375
+ /**
17376
+ * Reloads the ThoughtSpot iframe.
17377
+ * @param iFrame
17378
+ */
17379
+ const reload = (iFrame) => {
17380
+ const src = iFrame.src;
17381
+ iFrame.src = '';
17382
+ setTimeout(() => {
17383
+ iFrame.src = src;
17384
+ }, 100);
17385
+ };
17386
+ /**
17387
+ * Post iframe message.
17388
+ * @param iFrame
17389
+ * @param message
17390
+ * @param message.type
17391
+ * @param message.data
17392
+ * @param thoughtSpotHost
17393
+ * @param channel
17394
+ */
17395
+ function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
17396
+ var _a;
17397
+ return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
17398
+ }
17399
+ const TRIGGER_TIMEOUT = 30000;
17400
+ /**
17401
+ *
17402
+ * @param iFrame
17403
+ * @param messageType
17404
+ * @param thoughtSpotHost
17405
+ * @param data
17406
+ */
17407
+ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17408
+ return new Promise((res, rej) => {
17409
+ var _a;
17410
+ if (messageType === exports.HostEvent.Reload) {
17411
+ reload(iFrame);
17412
+ return res(null);
17413
+ }
17414
+ if (messageType === exports.HostEvent.Present) {
17415
+ const embedConfig = getEmbedConfig();
17416
+ const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
17417
+ if (!disableFullscreenPresentation) {
17418
+ handlePresentEvent(iFrame);
17419
+ }
17420
+ else {
17421
+ logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
17422
+ }
17423
+ }
17424
+ const channel = new MessageChannel();
17425
+ channel.port1.onmessage = ({ data: responseData }) => {
17426
+ var _a;
17427
+ channel.port1.close();
17428
+ const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
17429
+ if (error) {
17430
+ rej(error);
17431
+ }
17432
+ else {
17433
+ res(responseData);
17434
+ }
17435
+ };
17436
+ // Close the messageChannel and resolve the promise if timeout.
17437
+ setTimeout(() => {
17438
+ channel.port1.close();
17439
+ res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
17440
+ }, TRIGGER_TIMEOUT);
17441
+ return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
17442
+ });
17443
+ }
17444
+
17235
17445
  /* eslint-disable camelcase */
17236
17446
  /* eslint-disable import/no-mutable-exports */
17237
17447
  /**
@@ -17577,6 +17787,19 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17577
17787
  .catch((error) => {
17578
17788
  throw error;
17579
17789
  });
17790
+ };
17791
+ /**
17792
+ * Reloads the ThoughtSpot iframe.
17793
+ * @param iFrame
17794
+ * @group Global methods
17795
+ * @version SDK: 1.43.1
17796
+ */
17797
+ const reloadIframe = (iFrame) => {
17798
+ if (!iFrame) {
17799
+ logger$3.warn('reloadIframe called with no iFrame element.');
17800
+ return;
17801
+ }
17802
+ reload(iFrame);
17580
17803
  };
17581
17804
 
17582
17805
  /**
@@ -17710,77 +17933,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17710
17933
  return eventData;
17711
17934
  }
17712
17935
 
17713
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.43.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17714
-
17715
- /**
17716
- * Reloads the ThoughtSpot iframe.
17717
- * @param iFrame
17718
- */
17719
- const reload = (iFrame) => {
17720
- const src = iFrame.src;
17721
- iFrame.src = '';
17722
- setTimeout(() => {
17723
- iFrame.src = src;
17724
- }, 100);
17725
- };
17726
- /**
17727
- * Post iframe message.
17728
- * @param iFrame
17729
- * @param message
17730
- * @param message.type
17731
- * @param message.data
17732
- * @param thoughtSpotHost
17733
- * @param channel
17734
- */
17735
- function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
17736
- var _a;
17737
- return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
17738
- }
17739
- const TRIGGER_TIMEOUT = 30000;
17740
- /**
17741
- *
17742
- * @param iFrame
17743
- * @param messageType
17744
- * @param thoughtSpotHost
17745
- * @param data
17746
- */
17747
- function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17748
- return new Promise((res, rej) => {
17749
- var _a;
17750
- if (messageType === exports.HostEvent.Reload) {
17751
- reload(iFrame);
17752
- return res(null);
17753
- }
17754
- if (messageType === exports.HostEvent.Present) {
17755
- const embedConfig = getEmbedConfig();
17756
- const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
17757
- if (!disableFullscreenPresentation) {
17758
- handlePresentEvent(iFrame);
17759
- }
17760
- else {
17761
- logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
17762
- }
17763
- }
17764
- const channel = new MessageChannel();
17765
- channel.port1.onmessage = ({ data: responseData }) => {
17766
- var _a;
17767
- channel.port1.close();
17768
- const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
17769
- if (error) {
17770
- rej(error);
17771
- }
17772
- else {
17773
- res(responseData);
17774
- }
17775
- };
17776
- // Close the messageChannel and resolve the promise if timeout.
17777
- setTimeout(() => {
17778
- channel.port1.close();
17779
- res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
17780
- }, TRIGGER_TIMEOUT);
17781
- return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
17782
- });
17783
- }
17936
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.1-test";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
17784
17937
 
17785
17938
  class HostEventClient {
17786
17939
  constructor(iFrame) {
@@ -17978,9 +18131,13 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
17978
18131
  const { eventData, executeEvent, viewConfig, getUnsavedAnswerTml } = params;
17979
18132
  const [interceptData, bodyParseError] = parseInterceptData(eventData.data);
17980
18133
  if (bodyParseError) {
17981
- executeEvent(exports.EmbedEvent.Error, {
17982
- error: 'Error parsing api intercept body',
17983
- });
18134
+ const errorDetails = {
18135
+ errorType: ErrorDetailsTypes.API,
18136
+ message: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18137
+ code: EmbedErrorCodes.PARSING_API_INTERCEPT_BODY_ERROR,
18138
+ error: ERROR_MESSAGE.ERROR_PARSING_API_INTERCEPT_BODY,
18139
+ };
18140
+ executeEvent(exports.EmbedEvent.Error, errorDetails);
17984
18141
  logger$3.error('Error parsing request body', bodyParseError);
17985
18142
  return;
17986
18143
  }
@@ -18292,19 +18449,23 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18292
18449
  * Throws error encountered during initialization.
18293
18450
  */
18294
18451
  throwInitError() {
18295
- this.handleError('You need to init the ThoughtSpot SDK module first');
18452
+ this.handleError({
18453
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18454
+ message: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18455
+ code: EmbedErrorCodes.INIT_ERROR,
18456
+ error: ERROR_MESSAGE.INIT_SDK_REQUIRED,
18457
+ });
18296
18458
  }
18297
18459
  /**
18298
18460
  * Handles errors within the SDK
18299
18461
  * @param error The error message or object
18462
+ * @param errorDetails The error details
18300
18463
  */
18301
- handleError(error) {
18464
+ handleError(errorDetails) {
18302
18465
  this.isError = true;
18303
- this.executeCallbacks(exports.EmbedEvent.Error, {
18304
- error,
18305
- });
18466
+ this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
18306
18467
  // Log error
18307
- logger$3.error(error);
18468
+ logger$3.error(errorDetails);
18308
18469
  }
18309
18470
  /**
18310
18471
  * Extracts the type field from the event payload
@@ -18383,11 +18544,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18383
18544
  };
18384
18545
  window.addEventListener('online', onlineEventListener);
18385
18546
  const offlineEventListener = (e) => {
18386
- const offlineWarning = ERROR_MESSAGE.OFFLINE_WARNING;
18387
- this.executeCallbacks(exports.EmbedEvent.Error, {
18388
- offlineWarning,
18389
- });
18390
- logger$3.warn(offlineWarning);
18547
+ const errorDetails = {
18548
+ errorType: ErrorDetailsTypes.NETWORK,
18549
+ message: ERROR_MESSAGE.OFFLINE_WARNING,
18550
+ code: EmbedErrorCodes.NETWORK_ERROR,
18551
+ offlineWarning: ERROR_MESSAGE.OFFLINE_WARNING,
18552
+ };
18553
+ this.executeCallbacks(exports.EmbedEvent.Error, errorDetails);
18554
+ logger$3.warn(errorDetails);
18391
18555
  };
18392
18556
  window.addEventListener('offline', offlineEventListener);
18393
18557
  this.subscribedListeners.online = onlineEventListener;
@@ -18467,8 +18631,10 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18467
18631
  ]);
18468
18632
  if (customActionsResult.errors.length > 0) {
18469
18633
  this.handleError({
18470
- type: 'CUSTOM_ACTION_VALIDATION',
18634
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18471
18635
  message: customActionsResult.errors,
18636
+ code: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION,
18637
+ error: { type: EmbedErrorCodes.CUSTOM_ACTION_VALIDATION, message: customActionsResult.errors }
18472
18638
  });
18473
18639
  }
18474
18640
  const baseInitData = {
@@ -18565,11 +18731,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18565
18731
  ...additionalFlagsFromView,
18566
18732
  };
18567
18733
  if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
18568
- this.handleError('You cannot have both hidden actions and visible actions');
18734
+ this.handleError({
18735
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18736
+ message: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18737
+ code: EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG,
18738
+ error: ERROR_MESSAGE.CONFLICTING_ACTIONS_CONFIG,
18739
+ });
18569
18740
  return queryParams;
18570
18741
  }
18571
18742
  if (Array.isArray(visibleTabs) && Array.isArray(hiddenTabs)) {
18572
- this.handleError('You cannot have both hidden Tabs and visible Tabs');
18743
+ this.handleError({
18744
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
18745
+ message: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18746
+ code: EmbedErrorCodes.CONFLICTING_TABS_CONFIG,
18747
+ error: ERROR_MESSAGE.CONFLICTING_TABS_CONFIG,
18748
+ });
18573
18749
  return queryParams;
18574
18750
  }
18575
18751
  if (primaryAction) {
@@ -18794,7 +18970,12 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
18794
18970
  error: JSON.stringify(error),
18795
18971
  });
18796
18972
  this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
18797
- this.handleError(error);
18973
+ this.handleError({
18974
+ errorType: ErrorDetailsTypes.API,
18975
+ message: error.message || ERROR_MESSAGE.LOGIN_FAILED,
18976
+ code: EmbedErrorCodes.LOGIN_FAILED,
18977
+ error: error,
18978
+ });
18798
18979
  });
18799
18980
  });
18800
18981
  }
@@ -19099,11 +19280,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19099
19280
  async trigger(messageType, data = {}) {
19100
19281
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
19101
19282
  if (!this.isRendered) {
19102
- this.handleError('Please call render before triggering events');
19283
+ this.handleError({
19284
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19285
+ message: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19286
+ code: EmbedErrorCodes.RENDER_NOT_CALLED,
19287
+ error: ERROR_MESSAGE.RENDER_BEFORE_EVENTS_REQUIRED,
19288
+ });
19103
19289
  return null;
19104
19290
  }
19105
19291
  if (!messageType) {
19106
- this.handleError('Host event type is undefined');
19292
+ this.handleError({
19293
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19294
+ message: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19295
+ code: EmbedErrorCodes.HOST_EVENT_TYPE_UNDEFINED,
19296
+ error: ERROR_MESSAGE.HOST_EVENT_TYPE_UNDEFINED,
19297
+ });
19107
19298
  return null;
19108
19299
  }
19109
19300
  // Check if iframe exists before triggering -
@@ -19584,7 +19775,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19584
19775
  constructor(domSelector, viewConfig) {
19585
19776
  viewConfig.embedComponentType = 'AppEmbed';
19586
19777
  super(domSelector, viewConfig);
19587
- this.defaultHeight = '100%';
19778
+ this.defaultHeight = 500;
19588
19779
  this.sendFullHeightLazyLoadData = () => {
19589
19780
  const data = calculateVisibleElementData(this.iFrame);
19590
19781
  this.trigger(exports.HostEvent.VisibleEmbedCoordinates, data);
@@ -19606,8 +19797,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19606
19797
  * @param data The event payload
19607
19798
  */
19608
19799
  this.updateIFrameHeight = (data) => {
19609
- var _a;
19610
- this.setIFrameHeight(Math.max(data.data, (_a = this.iFrame) === null || _a === void 0 ? void 0 : _a.scrollHeight));
19800
+ this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
19611
19801
  this.sendFullHeightLazyLoadData();
19612
19802
  };
19613
19803
  this.embedIframeCenter = (data, responder) => {
@@ -19646,7 +19836,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19646
19836
  * embedded Liveboard or visualization.
19647
19837
  */
19648
19838
  getEmbedParams() {
19649
- const { tag, hideTagFilterChips, 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, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
19839
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = exports.DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, } = this.viewConfig;
19650
19840
  let params = {};
19651
19841
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
19652
19842
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -19655,6 +19845,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19655
19845
  params[Param.HideLiveboardHeader] = hideLiveboardHeader;
19656
19846
  params[Param.ShowLiveboardTitle] = showLiveboardTitle;
19657
19847
  params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
19848
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
19849
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
19658
19850
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
19659
19851
  params[Param.IsFullAppEmbed] = true;
19660
19852
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
@@ -19665,6 +19857,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19665
19857
  params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
19666
19858
  params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
19667
19859
  params = this.getBaseQueryParams(params);
19860
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
19861
+ params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
19862
+ }
19668
19863
  if (hideObjectSearch) {
19669
19864
  params[Param.HideObjectSearch] = !!hideObjectSearch;
19670
19865
  }
@@ -19723,6 +19918,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
19723
19918
  if (isCentralizedLiveboardFilterUXEnabled != undefined) {
19724
19919
  params[Param.isCentralizedLiveboardFilterUXEnabled] = isCentralizedLiveboardFilterUXEnabled;
19725
19920
  }
19921
+ this.defaultHeight = minimumHeight || this.defaultHeight;
19726
19922
  params[Param.DataPanelV2Enabled] = dataPanelV2;
19727
19923
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
19728
19924
  params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
@@ -20077,7 +20273,7 @@ query GetEurekaVizSnapshots(
20077
20273
  getEmbedParamsObject() {
20078
20274
  let params = {};
20079
20275
  params = this.getBaseQueryParams(params);
20080
- const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, } = this.viewConfig;
20276
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, liveboardXLSXCSVDownload, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, } = this.viewConfig;
20081
20277
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20082
20278
  || this.viewConfig.preventPinboardFilterRemoval;
20083
20279
  if (fullHeight === true) {
@@ -20087,15 +20283,16 @@ query GetEurekaVizSnapshots(
20087
20283
  params[Param.RootMarginForLazyLoad] = this.viewConfig.lazyLoadingMargin;
20088
20284
  }
20089
20285
  }
20090
- if (defaultHeight) {
20091
- this.defaultHeight = defaultHeight;
20092
- }
20286
+ this.defaultHeight = minimumHeight || defaultHeight || this.defaultHeight;
20093
20287
  if (enableVizTransformations !== undefined) {
20094
20288
  params[Param.EnableVizTransformations] = enableVizTransformations.toString();
20095
20289
  }
20096
20290
  if (preventLiveboardFilterRemoval) {
20097
20291
  params[Param.preventLiveboardFilterRemoval] = true;
20098
20292
  }
20293
+ if (!isUndefined$1(updatedSpotterChatPrompt)) {
20294
+ params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20295
+ }
20099
20296
  if (visibleVizs) {
20100
20297
  params[Param.visibleVizs] = visibleVizs;
20101
20298
  }
@@ -20153,6 +20350,8 @@ query GetEurekaVizSnapshots(
20153
20350
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
20154
20351
  params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
20155
20352
  params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
20353
+ params[Param.ShowMaskedFilterChip] = showMaskedFilterChip;
20354
+ params[Param.IsLiveboardMasterpiecesEnabled] = isLiveboardMasterpiecesEnabled;
20156
20355
  params[Param.IsEnhancedFilterInteractivityEnabled] = isEnhancedFilterInteractivityEnabled;
20157
20356
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20158
20357
  params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
@@ -20184,7 +20383,12 @@ query GetEurekaVizSnapshots(
20184
20383
  const { vizId, activeTabId } = this.viewConfig;
20185
20384
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20186
20385
  if (!liveboardId) {
20187
- this.handleError(ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION);
20386
+ this.handleError({
20387
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20388
+ message: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20389
+ code: EmbedErrorCodes.LIVEBOARD_ID_MISSING,
20390
+ error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20391
+ });
20188
20392
  }
20189
20393
  return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
20190
20394
  }
@@ -21146,9 +21350,14 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21146
21350
  this.viewConfig = viewConfig;
21147
21351
  }
21148
21352
  getEmbedParamsObject() {
21149
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
21353
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21150
21354
  if (!worksheetId) {
21151
- this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
21355
+ this.handleError({
21356
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21357
+ message: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21358
+ code: EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND,
21359
+ error: ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND,
21360
+ });
21152
21361
  }
21153
21362
  const queryParams = this.getBaseQueryParams();
21154
21363
  queryParams[Param.SpotterEnabled] = true;
@@ -21167,6 +21376,9 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
21167
21376
  if (!isUndefined_1(hideSampleQuestions)) {
21168
21377
  queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
21169
21378
  }
21379
+ if (!isUndefined_1(updatedSpotterChatPrompt)) {
21380
+ queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
21381
+ }
21170
21382
  return queryParams;
21171
21383
  }
21172
21384
  getIframeSrc() {
@@ -29254,6 +29466,7 @@ query GetEurekaResults($params: Input_eureka_SearchRequest) {
29254
29466
  exports.init = init;
29255
29467
  exports.logout = logout;
29256
29468
  exports.prefetch = prefetch;
29469
+ exports.reloadIframe = reloadIframe;
29257
29470
  exports.resetCachedAuthToken = resetCachedAuthToken;
29258
29471
  exports.tokenizedFetch = tokenizedFetch;
29259
29472
  exports.uploadMixpanelEvent = uploadMixpanelEvent;