@thoughtspot/visual-embed-sdk 1.23.2 → 1.23.3

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 (73) hide show
  1. package/cjs/package.json +8 -7
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +3 -0
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/embed/base.d.ts +2 -0
  6. package/cjs/src/embed/base.d.ts.map +1 -1
  7. package/cjs/src/embed/base.js +4 -2
  8. package/cjs/src/embed/base.js.map +1 -1
  9. package/cjs/src/embed/ts-embed.d.ts +3 -1
  10. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  11. package/cjs/src/embed/ts-embed.js +11 -4
  12. package/cjs/src/embed/ts-embed.js.map +1 -1
  13. package/cjs/src/mixpanel-service.d.ts +1 -0
  14. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  15. package/cjs/src/mixpanel-service.js +10 -3
  16. package/cjs/src/mixpanel-service.js.map +1 -1
  17. package/cjs/src/mixpanel-service.spec.js +12 -3
  18. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  19. package/cjs/src/react/index.d.ts +14 -14
  20. package/cjs/src/react/index.d.ts.map +1 -1
  21. package/cjs/src/react/index.js +4 -2
  22. package/cjs/src/react/index.js.map +1 -1
  23. package/cjs/src/react/index.spec.js.map +1 -1
  24. package/dist/src/auth.d.ts.map +1 -1
  25. package/dist/src/embed/base.d.ts +2 -0
  26. package/dist/src/embed/base.d.ts.map +1 -1
  27. package/dist/src/embed/ts-embed.d.ts +3 -1
  28. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  29. package/dist/src/mixpanel-service.d.ts +1 -0
  30. package/dist/src/mixpanel-service.d.ts.map +1 -1
  31. package/dist/src/react/index.d.ts +14 -14
  32. package/dist/src/react/index.d.ts.map +1 -1
  33. package/dist/tsembed-react.es.js +29 -10
  34. package/dist/tsembed-react.js +29 -10
  35. package/dist/tsembed.es.js +29 -10
  36. package/dist/tsembed.js +29 -10
  37. package/dist/visual-embed-sdk-react-full.d.ts +240 -235
  38. package/dist/visual-embed-sdk-react.d.ts +240 -235
  39. package/dist/visual-embed-sdk.d.ts +5 -1
  40. package/lib/package.json +8 -7
  41. package/lib/src/.index.d.ts.swp +0 -0
  42. package/lib/src/auth.d.ts.map +1 -1
  43. package/lib/src/auth.js +3 -0
  44. package/lib/src/auth.js.map +1 -1
  45. package/lib/src/embed/base.d.ts +2 -0
  46. package/lib/src/embed/base.d.ts.map +1 -1
  47. package/lib/src/embed/base.js +4 -2
  48. package/lib/src/embed/base.js.map +1 -1
  49. package/lib/src/embed/ts-embed.d.ts +3 -1
  50. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  51. package/lib/src/embed/ts-embed.js +11 -4
  52. package/lib/src/embed/ts-embed.js.map +1 -1
  53. package/lib/src/mixpanel-service.d.ts +1 -0
  54. package/lib/src/mixpanel-service.d.ts.map +1 -1
  55. package/lib/src/mixpanel-service.js +10 -3
  56. package/lib/src/mixpanel-service.js.map +1 -1
  57. package/lib/src/mixpanel-service.spec.js +12 -3
  58. package/lib/src/mixpanel-service.spec.js.map +1 -1
  59. package/lib/src/react/index.d.ts +14 -14
  60. package/lib/src/react/index.d.ts.map +1 -1
  61. package/lib/src/react/index.js +4 -2
  62. package/lib/src/react/index.js.map +1 -1
  63. package/lib/src/react/index.spec.js +1 -1
  64. package/lib/src/react/index.spec.js.map +1 -1
  65. package/lib/src/visual-embed-sdk.d.ts +5 -1
  66. package/package.json +8 -7
  67. package/src/auth.ts +6 -3
  68. package/src/embed/base.ts +7 -5
  69. package/src/embed/ts-embed.ts +15 -3
  70. package/src/mixpanel-service.spec.ts +12 -3
  71. package/src/mixpanel-service.ts +10 -3
  72. package/src/react/index.spec.tsx +4 -2
  73. package/src/react/index.tsx +35 -26
@@ -21,7 +21,7 @@ interface SearchProps extends EmbedProps, SearchViewConfig {
21
21
  * }
22
22
  * ```
23
23
  */
24
- export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<TsEmbed>>;
24
+ export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<_SearchEmbed>>;
25
25
  interface AppProps extends EmbedProps, AppViewConfig {
26
26
  }
27
27
  /**
@@ -38,7 +38,7 @@ interface AppProps extends EmbedProps, AppViewConfig {
38
38
  * }
39
39
  * ```
40
40
  */
41
- export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<TsEmbed>>;
41
+ export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<_AppEmbed>>;
42
42
  interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
43
43
  }
44
44
  /**
@@ -56,8 +56,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
56
56
  * }
57
57
  * ```
58
58
  */
59
- export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
60
- export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
59
+ export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
60
+ export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<_LiveboardEmbed>>;
61
61
  interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
62
62
  }
63
63
  /**
@@ -73,7 +73,7 @@ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
73
73
  * }
74
74
  * ```
75
75
  */
76
- export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
76
+ export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<_SearchBarEmbed>>;
77
77
  interface SageEmbedProps extends EmbedProps, SageViewConfig {
78
78
  }
79
79
  /**
@@ -89,7 +89,8 @@ interface SageEmbedProps extends EmbedProps, SageViewConfig {
89
89
  * }
90
90
  * ```
91
91
  */
92
- export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<TsEmbed>>;
92
+ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.RefAttributes<_SageEmbed>>;
93
+ type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed;
93
94
  /**
94
95
  * Get a reference to the embed component to trigger events on the component.
95
96
  *
@@ -105,9 +106,9 @@ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.R
105
106
  * return <LiveboardEmbed ref={ref} liveboardId={<id>} />
106
107
  * }
107
108
  * ```
108
- * @returns {React.MutableRefObject<TsEmbed>} ref
109
+ * @returns {React.MutableRefObject<T extends TsEmbed>} ref
109
110
  */
110
- export const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
111
+ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<React.ComponentRef<T>>;
111
112
 
112
113
  /**
113
114
  * Copyright (c) 2023
@@ -681,233 +682,6 @@ export declare class LiveboardEmbed extends V1Embed {
681
682
  export declare class PinboardEmbed extends LiveboardEmbed {
682
683
  }
683
684
 
684
- /**
685
- * Copyright (c) 2022
686
- *
687
- * Base classes
688
- *
689
- * @summary Base classes
690
- * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
691
- */
692
- /**
693
- * Global prefix for all Thoughtspot postHash Params.
694
- */
695
- export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
696
- /**
697
- * Base class for embedding v2 experience
698
- * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
699
- * React+GraphQL
700
- */
701
- export declare class TsEmbed {
702
- protected isAppInitialized: boolean;
703
- /**
704
- * A reference to the iframe within which the ThoughtSpot app
705
- * will be rendered.
706
- */
707
- protected iFrame: HTMLIFrameElement;
708
- protected viewConfig: ViewConfig;
709
- protected embedConfig: EmbedConfig;
710
- /**
711
- * The ThoughtSpot hostname or IP address
712
- */
713
- protected thoughtSpotHost: string;
714
- protected thoughtSpotV2Base: string;
715
- constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
716
- /**
717
- * Handles errors within the SDK
718
- *
719
- * @param error The error message or object
720
- */
721
- protected handleError(error: string | Record<string, unknown>): void;
722
- /**
723
- * Constructs the base URL string to load the ThoughtSpot app.
724
- *
725
- * @param query
726
- */
727
- protected getEmbedBasePath(query: string): string;
728
- /**
729
- * Common query params set for all the embed modes.
730
- *
731
- * @param queryParams
732
- * @returns queryParams
733
- */
734
- protected getBaseQueryParams(queryParams?: {}): {};
735
- /**
736
- * Constructs the base URL string to load v1 of the ThoughtSpot app.
737
- * This is used for embedding Liveboards, visualizations, and full application.
738
- *
739
- * @param queryString The query string to append to the URL.
740
- * @param isAppEmbed A Boolean parameter to specify if you are embedding
741
- * the full application.
742
- */
743
- protected getV1EmbedBasePath(queryString: string): string;
744
- protected getEmbedParams(): string;
745
- protected getRootIframeSrc(): string;
746
- protected createIframeEl(frameSrc: string): HTMLIFrameElement;
747
- /**
748
- * Renders the embedded ThoughtSpot app in an iframe and sets up
749
- * event listeners.
750
- *
751
- * @param url
752
- * @param frameOptions
753
- */
754
- protected renderIFrame(url: string): Promise<any>;
755
- protected insertIntoDOM(child: string | Node): void;
756
- /**
757
- * Sets the height of the iframe
758
- *
759
- * @param height The height in pixels
760
- */
761
- protected setIFrameHeight(height: number | string): void;
762
- /**
763
- * Executes all registered event handlers for a particular event type
764
- *
765
- * @param eventType The event type
766
- * @param data The payload invoked with the event handler
767
- * @param eventPort The event Port for a specific MessageChannel
768
- */
769
- protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
770
- /**
771
- * Returns the ThoughtSpot hostname or IP address.
772
- */
773
- protected getThoughtSpotHost(): string;
774
- /**
775
- * Gets the v1 event type (if applicable) for the EmbedEvent type
776
- *
777
- * @param eventType The v2 event type
778
- * @returns The corresponding v1 event type if one exists
779
- * or else the v2 event type itself
780
- */
781
- protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
782
- /**
783
- * Calculates the iframe center for the current visible viewPort
784
- * of iframe using Scroll position of Host App, offsetTop for iframe
785
- * in Host app. ViewPort height of the tab.
786
- *
787
- * @returns iframe Center in visible viewport,
788
- * Iframe height,
789
- * View port height.
790
- */
791
- protected getIframeCenter(): {
792
- iframeCenter: number;
793
- iframeScrolled: number;
794
- iframeHeight: number;
795
- viewPortHeight: number;
796
- iframeVisibleViewPort: number;
797
- };
798
- /**
799
- * Registers an event listener to trigger an alert when the ThoughtSpot app
800
- * sends an event of a particular message type to the host application.
801
- *
802
- * @param messageType The message type
803
- * @param callback A callback as a function
804
- * @param options The message options
805
- * @example
806
- * ```js
807
- * tsEmbed.on(EmbedEvent.Error, (data) => {
808
- * console.error(data);
809
- * });
810
- * ```
811
- * @example
812
- * ```js
813
- * tsEmbed.on(EmbedEvent.Save, (data) => {
814
- * console.log("Answer save clicked", data);
815
- * }, {
816
- * start: true // This will trigger the callback on start of save
817
- * });
818
- * ```
819
- */
820
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
821
- /**
822
- * Removes an event listener for a particular event type.
823
- *
824
- * @param messageType The message type
825
- * @param callback The callback to remove
826
- * @example
827
- * ```js
828
- * const errorHandler = (data) => { console.error(data); };
829
- * tsEmbed.on(EmbedEvent.Error, errorHandler);
830
- * tsEmbed.off(EmbedEvent.Error, errorHandler);
831
- * ```
832
- */
833
- off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
834
- /**
835
- * Triggers an event to the embedded app
836
- *
837
- * @param messageType The event type
838
- * @param data The payload to send with the message
839
- */
840
- trigger(messageType: HostEvent, data?: any): Promise<any>;
841
- /**
842
- * Marks the ThoughtSpot object to have been rendered
843
- * Needs to be overridden by subclasses to do the actual
844
- * rendering of the iframe.
845
- *
846
- * @param args
847
- */
848
- render(): TsEmbed;
849
- /**
850
- * Get the Post Url Params for THOUGHTSPOT from the current
851
- * host app URL.
852
- * THOUGHTSPOT URL params starts with a prefix "ts-"
853
- *
854
- * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
855
- */
856
- getThoughtSpotPostUrlParams(): string;
857
- /**
858
- * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
859
- *
860
- * @version SDK: 1.19.1 | ThoughtSpot: *
861
- */
862
- destroy(): void;
863
- getUnderlyingFrameElement(): HTMLIFrameElement;
864
- /**
865
- * Prerenders a generic instance of the TS component.
866
- * This means without the path but with the flags already applied.
867
- * This is useful for prerendering the component in the background.
868
- *
869
- * @version SDK: 1.22.0
870
- * @returns
871
- */
872
- prerenderGeneric(): Promise<any>;
873
- }
874
- /**
875
- * Base class for embedding v1 experience
876
- * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
877
- * which is currently under migration to v2
878
- *
879
- * @inheritdoc
880
- */
881
- export declare class V1Embed extends TsEmbed {
882
- protected viewConfig: ViewConfig;
883
- constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
884
- /**
885
- * Render the app in an iframe and set up event handlers
886
- *
887
- * @param iframeSrc
888
- */
889
- protected renderV1Embed(iframeSrc: string): any;
890
- protected getRootIframeSrc(): string;
891
- /**
892
- * @inheritdoc
893
- * @example
894
- * ```js
895
- * tsEmbed.on(EmbedEvent.Error, (data) => {
896
- * console.error(data);
897
- * });
898
- * ```
899
- * @example
900
- * ```js
901
- * tsEmbed.on(EmbedEvent.Save, (data) => {
902
- * console.log("Answer save clicked", data);
903
- * }, {
904
- * start: true // This will trigger the callback on start of save
905
- * });
906
- * ```
907
- */
908
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
909
- }
910
-
911
685
  export type EmbedEventHandlers = {
912
686
  [key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
913
687
  };
@@ -1013,11 +787,13 @@ export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolea
1013
787
  */
1014
788
  export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
1015
789
  /**
790
+ * Imports TML representation of the metadata objects into ThoughtSpot.
1016
791
  * @param data
1017
792
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1018
793
  */
1019
794
  export declare const executeTML: (data: executeTMLInput) => Promise<any>;
1020
795
  /**
796
+ * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML format.
1021
797
  * @param data
1022
798
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1023
799
  */
@@ -4443,3 +4219,232 @@ export interface CustomCssVariables {
4443
4219
  '--ts-var-dialog-footer-background'?: string;
4444
4220
  }
4445
4221
 
4222
+ /**
4223
+ * Copyright (c) 2022
4224
+ *
4225
+ * Base classes
4226
+ *
4227
+ * @summary Base classes
4228
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
4229
+ */
4230
+ /**
4231
+ * Global prefix for all Thoughtspot postHash Params.
4232
+ */
4233
+ export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
4234
+ /**
4235
+ * Base class for embedding v2 experience
4236
+ * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
4237
+ * React+GraphQL
4238
+ */
4239
+ export declare class TsEmbed {
4240
+ protected isAppInitialized: boolean;
4241
+ /**
4242
+ * A reference to the iframe within which the ThoughtSpot app
4243
+ * will be rendered.
4244
+ */
4245
+ protected iFrame: HTMLIFrameElement;
4246
+ protected viewConfig: ViewConfig;
4247
+ protected embedConfig: EmbedConfig;
4248
+ /**
4249
+ * The ThoughtSpot hostname or IP address
4250
+ */
4251
+ protected thoughtSpotHost: string;
4252
+ protected thoughtSpotV2Base: string;
4253
+ constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
4254
+ /**
4255
+ * Handles errors within the SDK
4256
+ *
4257
+ * @param error The error message or object
4258
+ */
4259
+ protected handleError(error: string | Record<string, unknown>): void;
4260
+ /**
4261
+ * Constructs the base URL string to load the ThoughtSpot app.
4262
+ *
4263
+ * @param query
4264
+ */
4265
+ protected getEmbedBasePath(query: string): string;
4266
+ /**
4267
+ * Common query params set for all the embed modes.
4268
+ *
4269
+ * @param queryParams
4270
+ * @returns queryParams
4271
+ */
4272
+ protected getBaseQueryParams(queryParams?: {}): {};
4273
+ /**
4274
+ * Constructs the base URL string to load v1 of the ThoughtSpot app.
4275
+ * This is used for embedding Liveboards, visualizations, and full application.
4276
+ *
4277
+ * @param queryString The query string to append to the URL.
4278
+ * @param isAppEmbed A Boolean parameter to specify if you are embedding
4279
+ * the full application.
4280
+ */
4281
+ protected getV1EmbedBasePath(queryString: string): string;
4282
+ protected getEmbedParams(): string;
4283
+ protected getRootIframeSrc(): string;
4284
+ protected createIframeEl(frameSrc: string): HTMLIFrameElement;
4285
+ /**
4286
+ * Renders the embedded ThoughtSpot app in an iframe and sets up
4287
+ * event listeners.
4288
+ *
4289
+ * @param url
4290
+ * @param frameOptions
4291
+ */
4292
+ protected renderIFrame(url: string): Promise<any>;
4293
+ protected insertIntoDOM(child: string | Node): void;
4294
+ /**
4295
+ * Sets the height of the iframe
4296
+ *
4297
+ * @param height The height in pixels
4298
+ */
4299
+ protected setIFrameHeight(height: number | string): void;
4300
+ /**
4301
+ * Executes all registered event handlers for a particular event type
4302
+ *
4303
+ * @param eventType The event type
4304
+ * @param data The payload invoked with the event handler
4305
+ * @param eventPort The event Port for a specific MessageChannel
4306
+ */
4307
+ protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
4308
+ /**
4309
+ * Returns the ThoughtSpot hostname or IP address.
4310
+ */
4311
+ protected getThoughtSpotHost(): string;
4312
+ /**
4313
+ * Gets the v1 event type (if applicable) for the EmbedEvent type
4314
+ *
4315
+ * @param eventType The v2 event type
4316
+ * @returns The corresponding v1 event type if one exists
4317
+ * or else the v2 event type itself
4318
+ */
4319
+ protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
4320
+ /**
4321
+ * Calculates the iframe center for the current visible viewPort
4322
+ * of iframe using Scroll position of Host App, offsetTop for iframe
4323
+ * in Host app. ViewPort height of the tab.
4324
+ *
4325
+ * @returns iframe Center in visible viewport,
4326
+ * Iframe height,
4327
+ * View port height.
4328
+ */
4329
+ protected getIframeCenter(): {
4330
+ iframeCenter: number;
4331
+ iframeScrolled: number;
4332
+ iframeHeight: number;
4333
+ viewPortHeight: number;
4334
+ iframeVisibleViewPort: number;
4335
+ };
4336
+ /**
4337
+ * Registers an event listener to trigger an alert when the ThoughtSpot app
4338
+ * sends an event of a particular message type to the host application.
4339
+ *
4340
+ * @param messageType The message type
4341
+ * @param callback A callback as a function
4342
+ * @param options The message options
4343
+ * @param isSelf
4344
+ * @param isRegisteredBySDK
4345
+ * @example
4346
+ * ```js
4347
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
4348
+ * console.error(data);
4349
+ * });
4350
+ * ```
4351
+ * @example
4352
+ * ```js
4353
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
4354
+ * console.log("Answer save clicked", data);
4355
+ * }, {
4356
+ * start: true // This will trigger the callback on start of save
4357
+ * });
4358
+ * ```
4359
+ */
4360
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
4361
+ /**
4362
+ * Removes an event listener for a particular event type.
4363
+ *
4364
+ * @param messageType The message type
4365
+ * @param callback The callback to remove
4366
+ * @example
4367
+ * ```js
4368
+ * const errorHandler = (data) => { console.error(data); };
4369
+ * tsEmbed.on(EmbedEvent.Error, errorHandler);
4370
+ * tsEmbed.off(EmbedEvent.Error, errorHandler);
4371
+ * ```
4372
+ */
4373
+ off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
4374
+ /**
4375
+ * Triggers an event to the embedded app
4376
+ *
4377
+ * @param messageType The event type
4378
+ * @param data The payload to send with the message
4379
+ */
4380
+ trigger(messageType: HostEvent, data?: any): Promise<any>;
4381
+ /**
4382
+ * Marks the ThoughtSpot object to have been rendered
4383
+ * Needs to be overridden by subclasses to do the actual
4384
+ * rendering of the iframe.
4385
+ *
4386
+ * @param args
4387
+ */
4388
+ render(): TsEmbed;
4389
+ /**
4390
+ * Get the Post Url Params for THOUGHTSPOT from the current
4391
+ * host app URL.
4392
+ * THOUGHTSPOT URL params starts with a prefix "ts-"
4393
+ *
4394
+ * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
4395
+ */
4396
+ getThoughtSpotPostUrlParams(): string;
4397
+ /**
4398
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
4399
+ *
4400
+ * @version SDK: 1.19.1 | ThoughtSpot: *
4401
+ */
4402
+ destroy(): void;
4403
+ getUnderlyingFrameElement(): HTMLIFrameElement;
4404
+ /**
4405
+ * Prerenders a generic instance of the TS component.
4406
+ * This means without the path but with the flags already applied.
4407
+ * This is useful for prerendering the component in the background.
4408
+ *
4409
+ * @version SDK: 1.22.0
4410
+ * @returns
4411
+ */
4412
+ prerenderGeneric(): Promise<any>;
4413
+ }
4414
+ /**
4415
+ * Base class for embedding v1 experience
4416
+ * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
4417
+ * which is currently under migration to v2
4418
+ *
4419
+ * @inheritdoc
4420
+ */
4421
+ export declare class V1Embed extends TsEmbed {
4422
+ protected viewConfig: ViewConfig;
4423
+ constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
4424
+ /**
4425
+ * Render the app in an iframe and set up event handlers
4426
+ *
4427
+ * @param iframeSrc
4428
+ */
4429
+ protected renderV1Embed(iframeSrc: string): any;
4430
+ protected getRootIframeSrc(): string;
4431
+ /**
4432
+ * @inheritdoc
4433
+ * @example
4434
+ * ```js
4435
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
4436
+ * console.error(data);
4437
+ * });
4438
+ * ```
4439
+ * @example
4440
+ * ```js
4441
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
4442
+ * console.log("Answer save clicked", data);
4443
+ * }, {
4444
+ * start: true // This will trigger the callback on start of save
4445
+ * });
4446
+ * ```
4447
+ */
4448
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
4449
+ }
4450
+