@thoughtspot/visual-embed-sdk 1.35.5-hostEvent.1 → 1.35.5-hostEvent.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 (52) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/hostEventClient/contracts.d.ts +6 -22
  3. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  4. package/cjs/src/embed/hostEventClient/contracts.js +0 -2
  5. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  6. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -6
  7. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  8. package/cjs/src/embed/hostEventClient/host-event-client.js +22 -22
  9. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  10. package/cjs/src/embed/ts-embed.d.ts +3 -3
  11. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  12. package/cjs/src/embed/ts-embed.js +11 -11
  13. package/cjs/src/embed/ts-embed.js.map +1 -1
  14. package/cjs/src/types.d.ts +1 -1
  15. package/cjs/src/types.js +1 -1
  16. package/dist/index-CENLvayL.js +7370 -0
  17. package/dist/index-DFwi_pV_.js +7370 -0
  18. package/dist/src/embed/hostEventClient/contracts.d.ts +6 -22
  19. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  20. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -6
  21. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  22. package/dist/src/embed/ts-embed.d.ts +3 -3
  23. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  24. package/dist/src/types.d.ts +1 -1
  25. package/dist/tsembed-react.es.js +37 -39
  26. package/dist/tsembed-react.js +36 -38
  27. package/dist/tsembed.es.js +37 -39
  28. package/dist/tsembed.js +36 -38
  29. package/dist/visual-embed-sdk-react-full.d.ts +10 -29
  30. package/dist/visual-embed-sdk-react.d.ts +10 -29
  31. package/dist/visual-embed-sdk.d.ts +10 -29
  32. package/lib/package.json +1 -1
  33. package/lib/src/embed/hostEventClient/contracts.d.ts +6 -22
  34. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  35. package/lib/src/embed/hostEventClient/contracts.js +0 -2
  36. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  37. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -6
  38. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  39. package/lib/src/embed/hostEventClient/host-event-client.js +22 -22
  40. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  41. package/lib/src/embed/ts-embed.d.ts +3 -3
  42. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  43. package/lib/src/embed/ts-embed.js +11 -11
  44. package/lib/src/embed/ts-embed.js.map +1 -1
  45. package/lib/src/types.d.ts +1 -1
  46. package/lib/src/types.js +1 -1
  47. package/lib/src/visual-embed-sdk.d.ts +13 -32
  48. package/package.json +1 -1
  49. package/src/embed/hostEventClient/contracts.ts +4 -20
  50. package/src/embed/hostEventClient/host-event-client.ts +31 -34
  51. package/src/embed/ts-embed.ts +13 -4
  52. package/src/types.ts +1 -1
@@ -2,12 +2,10 @@ import { HostEvent } from '../../types';
2
2
  export declare enum UiPassthroughEvent {
3
3
  addVizToPinboard = "addVizToPinboard",
4
4
  saveAnswer = "saveAnswer",
5
- getA3AnalysisColumns = "getA3AnalysisColumns",
6
5
  getDiscoverabilityStatus = "getDiscoverabilityStatus",
7
6
  getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
8
7
  getAnswerPageConfig = "getAnswerPageConfig",
9
- getPinboardPageConfig = "getPinboardPageConfig",
10
- UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
8
+ getPinboardPageConfig = "getPinboardPageConfig"
11
9
  }
12
10
  export type UiPassthroughContractBase = {
13
11
  [UiPassthroughEvent.addVizToPinboard]: {
@@ -38,15 +36,6 @@ export type UiPassthroughContractBase = {
38
36
  errors?: any;
39
37
  };
40
38
  };
41
- [UiPassthroughEvent.getA3AnalysisColumns]: {
42
- request: {
43
- vizId?: string;
44
- };
45
- response: {
46
- data?: any;
47
- errors?: any;
48
- };
49
- };
50
39
  [UiPassthroughEvent.getDiscoverabilityStatus]: {
51
40
  request: any;
52
41
  response: {
@@ -70,13 +59,12 @@ export type UiPassthroughContractBase = {
70
59
  request: any;
71
60
  response: any;
72
61
  };
73
- [UiPassthroughEvent.UiPassthroughEventNotFound]: {
74
- request: any;
75
- response: any;
76
- };
77
62
  };
78
- export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['request'];
79
- export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['response'];
63
+ export type FlattenType<T> = T extends infer R ? {
64
+ [K in keyof R]: R[K];
65
+ } : never;
66
+ export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['request']>;
67
+ export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['response']>;
80
68
  export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
81
69
  redId?: string;
82
70
  value?: UiPassthroughResponse<ApiName>;
@@ -85,11 +73,7 @@ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContra
85
73
  export type EmbedApiHostEventMapping = {
86
74
  [HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
87
75
  [HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
88
- 'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
89
76
  };
90
- export type FlattenType<T> = T extends infer R ? {
91
- [K in keyof R]: R[K];
92
- } : never;
93
77
  export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
94
78
  export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
95
79
  value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,oBAAY,kBAAkB;IAC5B,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,oBAAoB,yBAAyB;IAC7C,wBAAwB,6BAA6B;IACrD,0BAA0B,+BAA+B;IACzD,mBAAmB,wBAAwB;IAC3C,qBAAqB,0BAA0B;IAC/C,0BAA0B,+BAA+B;CAC1D;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,EAAE;QACrC,OAAO,EAAE;YACP,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,UAAU,EAAE,MAAM,CAAC;YACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;YAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,eAAe,CAAC,EAAE,MAAM,CAAC;YACzB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;QACF,QAAQ,EAAE;YACR,UAAU,EAAE,MAAM,CAAC;YACnB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE;QAC/B,OAAO,EAAE;YACP,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,EAAE,MAAM,CAAC;YACpB,KAAK,EAAE,MAAM,CAAC;YACd,cAAc,CAAC,EAAE,OAAO,CAAC;SAC1B,CAAC;QACF,QAAQ,EAAE;YACR,QAAQ,EAAE,MAAM,CAAC;YACjB,MAAM,CAAC,EAAE,GAAG,CAAC;SACd,CAAC;KACH,CAAC;IACF,CAAC,kBAAk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M,wBAAwB,GACjD;IACE,KAAK,CAAC,EAAE,qBAAqB,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAA;CACpE,GACC,GAAG,CAAC"}
@@ -1,14 +1,11 @@
1
1
  import { HostEvent } from '../../types';
2
- import { UiPassthroughArrayResponse, UiPassthroughEvent, HostEventRequest, HostEventResponse, UiPassthroughRequest, FlattenType } from './contracts';
3
- type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
4
- export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
2
+ import { UiPassthroughArrayResponse, UiPassthroughEvent, HostEventRequest, HostEventResponse, UiPassthroughRequest, UiPassthroughResponse } from './contracts';
5
3
  export declare class HostEventClient {
6
4
  thoughtSpotHost: string;
7
5
  constructor(thoughtSpotHost: string);
8
- executeUiPassthroughApi: UiPassthroughHandlerWithIframe;
9
- handleUiPassthroughForHostEvent: UiPassthroughHandlerWithIframe;
6
+ executeUiPassthroughApi<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
7
+ handleUiPassthroughForHostEvent<UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): Promise<UiPassthroughResponse<UiPassthroughEventT>>;
10
8
  hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
11
9
  executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
12
10
  }
13
- export {};
14
11
  //# sourceMappingURL=host-event-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"host-event-client.d.ts","sourceRoot":"","sources":["host-event-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EACvD,oBAAoB,EACpB,WAAW,EACd,MAAM,aAAa,CAAC;AAErB,KAAK,8BAA8B,GAAG,CAAC,mBAAmB,SAAS,kBAAkB,EACjF,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,WAAW,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC,KACjE,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;AAErD,MAAM,MAAM,oBAAoB,GAAG,CAAC,mBAAmB,SAAS,kBAAkB,EAChF,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,WAAW,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC,KAC/D,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;AAErD,qBAAa,eAAe;IAC1B,eAAe,EAAE,MAAM,CAAC;gBAEZ,eAAe,EAAE,MAAM;IAInC,uBAAuB,EAAC,8BAA8B,CAOrD;IAED,+BAA+B,EAAC,8BAA8B,CAkB1D;IAEE,iBAAiB,CACnB,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAC3D,OAAO,CAAC,GAAG,CAAC;IAIT,gBAAgB,CAAC,CAAC,SAAS,SAAS,EACtC,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAEhF,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;CAexC"}
1
+ {"version":3,"file":"host-event-client.d.ts","sourceRoot":"","sources":["host-event-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EACH,0BAA0B,EAC1B,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,EACvD,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,aAAa,CAAC;AAErB,qBAAa,eAAe;IAC1B,eAAe,EAAE,MAAM,CAAC;gBAEZ,eAAe,EAAE,MAAM;IAItB,uBAAuB,CAAC,mBAAmB,SAAS,kBAAkB,EAC/E,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GACtD,0BAA0B,CAAC,mBAAmB,CAAC;IASrC,+BAA+B,CAAC,mBAAmB,SAAS,kBAAkB,EACvF,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GACtD,OAAO,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,CAAC;IAmBzC,iBAAiB,CAC1B,MAAM,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAC3D,OAAO,CAAC,GAAG,CAAC;IAIF,gBAAgB,CAAC,CAAC,SAAS,SAAS,EAC7C,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;CAezC"}
@@ -5,10 +5,10 @@
5
5
  * @summary Base classes
6
6
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
7
7
  */
8
- import { HostEventRequest, HostEventResponse } from './hostEventClient/contracts';
8
+ import { HostEventRequest, HostEventResponse, UiPassthroughArrayResponse, UiPassthroughEvent, UiPassthroughRequest } from './hostEventClient/contracts';
9
9
  import { AnswerService } from '../utils/graphql/answerService/answerService';
10
10
  import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, EmbedConfig, MessageOptions, ViewConfig } from '../types';
11
- import { HostEventClient, UiPassthroughHandler } from './hostEventClient/host-event-client';
11
+ import { HostEventClient } from './hostEventClient/host-event-client';
12
12
  /**
13
13
  * Global prefix for all Thoughtspot postHash Params.
14
14
  */
@@ -264,7 +264,7 @@ export declare class TsEmbed {
264
264
  * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
265
265
  * from the embedded app.
266
266
  */
267
- triggerUiPassThrough: UiPassthroughHandler;
267
+ triggerUiPassThrough<UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: UiPassthroughRequest<UiPassthroughEventT>): UiPassthroughArrayResponse<UiPassthroughEventT>;
268
268
  /**
269
269
  * Marks the ThoughtSpot object to have been rendered
270
270
  * Needs to be overridden by subclasses to do the actual
@@ -1 +1 @@
1
- {"version":3,"file":"ts-embed.d.ts","sourceRoot":"","sources":["ts-embed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGlF,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAwB7E,OAAO,EAEH,WAAW,EACX,SAAS,EACT,UAAU,EACV,eAAe,EAGf,WAAW,EACX,cAAc,EAGd,UAAU,EAIb,MAAM,UAAU,CAAC;AAWlB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAI5F;;GAEG;AACH,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAW9C;;;;GAIG;AACH,qBAAa,OAAO;IAChB;;;;;OAKG;IACH,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,WAAW,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,YAAY,SA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AAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAO,GAC1D,MAAM;IAwBT;;;OAGG;IACI,OAAO,IAAI,IAAI;IASf,yBAAyB,IAAI,iBAAiB;IAIrD;;;;;;OAMG;IACU,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC;IAM7C,SAAS,CAAC,sBAAsB,IAAI,IAAI;IAIxC,OAAO,CAAC,2BAA2B,CAyBjC;IAEF;;;;;OAKG;IACI,aAAa,IAAI,IAAI;IAwC5B;;;;;;;OAOG;IACI,kBAAkB,IAAI,IAAI;IAejC;;;OAGG;IACI,aAAa,IAAI,IAAI;IAqB5B;;;;;;OAMG;IACI,eAAe;;;;IAOtB;;;;;OAKG;IACU,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAIxE;AAED;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,OAAO;IAChC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC;gBAErB,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU;IAK5D;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD,SAAS,CAAC,gBAAgB,IAAI,MAAM;IAqBpC;;;;;;;;;;;;;;;;OAgBG;IACI,EAAE,CACL,WAAW,EAAE,UAAU,EACvB,QAAQ,EAAE,eAAe,EACzB,OAAO,GAAE,cAAiC,GAC3C,OAAO,OAAO,CAAC,SAAS;IAK3B;;;OAGG;IAEI,sBAAsB,6EAAyB;CACzD"}
@@ -3152,7 +3152,7 @@ export declare enum HostEvent {
3152
3152
  UpdatePersonalisedView = "UpdatePersonalisedView",
3153
3153
  /**
3154
3154
  * Triggers the action to get the current view of the liveboard
3155
- * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
3155
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
3156
3156
  */
3157
3157
  SaveAnswer = "saveAnswer",
3158
3158
  /**
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.3 */
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
4
 
@@ -2665,7 +2665,7 @@ var HostEvent;
2665
2665
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
2666
2666
  /**
2667
2667
  * Triggers the action to get the current view of the liveboard
2668
- * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
2668
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2669
2669
  */
2670
2670
  HostEvent["SaveAnswer"] = "saveAnswer";
2671
2671
  /**
@@ -7160,7 +7160,7 @@ class AnswerService {
7160
7160
  async getTML() {
7161
7161
  const { object } = await this.executeQuery(getAnswerTML, {});
7162
7162
  const edoc = object[0].edoc;
7163
- const YAML = await import('./index-CzwzS0P4.js');
7163
+ const YAML = await import('./index-CENLvayL.js');
7164
7164
  const parsedDoc = YAML.parse(edoc);
7165
7165
  return {
7166
7166
  answer: {
@@ -14503,7 +14503,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
14503
14503
  return e;
14504
14504
  }
14505
14505
 
14506
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.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={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
14506
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
14507
14507
 
14508
14508
  /**
14509
14509
  * Reloads the ThoughtSpot iframe.
@@ -14567,40 +14567,38 @@ var UiPassthroughEvent;
14567
14567
  (function (UiPassthroughEvent) {
14568
14568
  UiPassthroughEvent["addVizToPinboard"] = "addVizToPinboard";
14569
14569
  UiPassthroughEvent["saveAnswer"] = "saveAnswer";
14570
- UiPassthroughEvent["getA3AnalysisColumns"] = "getA3AnalysisColumns";
14571
14570
  UiPassthroughEvent["getDiscoverabilityStatus"] = "getDiscoverabilityStatus";
14572
14571
  UiPassthroughEvent["getAvailableUiPassthroughs"] = "getAvailableUiPassthroughs";
14573
14572
  UiPassthroughEvent["getAnswerPageConfig"] = "getAnswerPageConfig";
14574
14573
  UiPassthroughEvent["getPinboardPageConfig"] = "getPinboardPageConfig";
14575
- UiPassthroughEvent["UiPassthroughEventNotFound"] = "UiPassthroughEventNotFound";
14576
14574
  })(UiPassthroughEvent || (UiPassthroughEvent = {}));
14577
14575
 
14578
14576
  class HostEventClient {
14579
14577
  constructor(thoughtSpotHost) {
14580
- this.executeUiPassthroughApi = async (iFrame, apiName, parameters) => {
14581
- const res = await processTrigger(iFrame, HostEvent.UiPassthrough, this.thoughtSpotHost, {
14582
- type: apiName,
14583
- parameters,
14584
- });
14585
- return res;
14586
- };
14587
- this.handleUiPassthroughForHostEvent = async (iFrame, apiName, parameters) => {
14588
- var _a, _b, _c;
14589
- const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
14590
- if (!response) {
14591
- const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
14592
- // eslint-disable-next-line no-throw-literal
14593
- throw { error };
14594
- }
14595
- const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
14596
- if (errors) {
14597
- // eslint-disable-next-line no-throw-literal
14598
- throw { error: response.error };
14599
- }
14600
- return { ...response.value };
14601
- };
14602
14578
  this.thoughtSpotHost = thoughtSpotHost;
14603
14579
  }
14580
+ async executeUiPassthroughApi(iFrame, apiName, parameters) {
14581
+ const res = await processTrigger(iFrame, HostEvent.UiPassthrough, this.thoughtSpotHost, {
14582
+ type: apiName,
14583
+ parameters,
14584
+ });
14585
+ return res;
14586
+ }
14587
+ async handleUiPassthroughForHostEvent(iFrame, apiName, parameters) {
14588
+ var _a, _b, _c;
14589
+ const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
14590
+ if (!response) {
14591
+ const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
14592
+ // eslint-disable-next-line no-throw-literal
14593
+ throw { error };
14594
+ }
14595
+ const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
14596
+ if (errors) {
14597
+ // eslint-disable-next-line no-throw-literal
14598
+ throw { error: response.error };
14599
+ }
14600
+ return { ...response.value };
14601
+ }
14604
14602
  async hostEventFallback(iFrame, hostEvent, data) {
14605
14603
  return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
14606
14604
  }
@@ -14731,17 +14729,6 @@ class TsEmbed {
14731
14729
  this.on(EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
14732
14730
  };
14733
14731
  this.showPreRenderByDefault = false;
14734
- /**
14735
- * Triggers an event to the embedded app, skipping the UI flow.
14736
- * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
14737
- * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
14738
- * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
14739
- * from the embedded app.
14740
- */
14741
- // eslint-disable-next-line arrow-body-style
14742
- this.triggerUiPassThrough = (apiName, parameters) => {
14743
- return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
14744
- };
14745
14732
  this.validatePreRenderViewConfig = (viewConfig) => {
14746
14733
  var _a;
14747
14734
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
@@ -15416,6 +15403,17 @@ class TsEmbed {
15416
15403
  }
15417
15404
  return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
15418
15405
  }
15406
+ /**
15407
+ * Triggers an event to the embedded app, skipping the UI flow.
15408
+ * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
15409
+ * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
15410
+ * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
15411
+ * from the embedded app.
15412
+ */
15413
+ // eslint-disable-next-line arrow-body-style
15414
+ triggerUiPassThrough(apiName, parameters) {
15415
+ return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
15416
+ }
15419
15417
  /**
15420
15418
  * Marks the ThoughtSpot object to have been rendered
15421
15419
  * Needs to be overridden by subclasses to do the actual
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.3 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
4
4
  typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
@@ -2687,7 +2687,7 @@
2687
2687
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
2688
2688
  /**
2689
2689
  * Triggers the action to get the current view of the liveboard
2690
- * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
2690
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2691
2691
  */
2692
2692
  HostEvent["SaveAnswer"] = "saveAnswer";
2693
2693
  /**
@@ -14525,7 +14525,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14525
14525
  return e;
14526
14526
  }
14527
14527
 
14528
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.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 . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
14528
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.3";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
14529
14529
 
14530
14530
  /**
14531
14531
  * Reloads the ThoughtSpot iframe.
@@ -14589,40 +14589,38 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14589
14589
  (function (UiPassthroughEvent) {
14590
14590
  UiPassthroughEvent["addVizToPinboard"] = "addVizToPinboard";
14591
14591
  UiPassthroughEvent["saveAnswer"] = "saveAnswer";
14592
- UiPassthroughEvent["getA3AnalysisColumns"] = "getA3AnalysisColumns";
14593
14592
  UiPassthroughEvent["getDiscoverabilityStatus"] = "getDiscoverabilityStatus";
14594
14593
  UiPassthroughEvent["getAvailableUiPassthroughs"] = "getAvailableUiPassthroughs";
14595
14594
  UiPassthroughEvent["getAnswerPageConfig"] = "getAnswerPageConfig";
14596
14595
  UiPassthroughEvent["getPinboardPageConfig"] = "getPinboardPageConfig";
14597
- UiPassthroughEvent["UiPassthroughEventNotFound"] = "UiPassthroughEventNotFound";
14598
14596
  })(UiPassthroughEvent || (UiPassthroughEvent = {}));
14599
14597
 
14600
14598
  class HostEventClient {
14601
14599
  constructor(thoughtSpotHost) {
14602
- this.executeUiPassthroughApi = async (iFrame, apiName, parameters) => {
14603
- const res = await processTrigger(iFrame, exports.HostEvent.UiPassthrough, this.thoughtSpotHost, {
14604
- type: apiName,
14605
- parameters,
14606
- });
14607
- return res;
14608
- };
14609
- this.handleUiPassthroughForHostEvent = async (iFrame, apiName, parameters) => {
14610
- var _a, _b, _c;
14611
- const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
14612
- if (!response) {
14613
- const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
14614
- // eslint-disable-next-line no-throw-literal
14615
- throw { error };
14616
- }
14617
- const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
14618
- if (errors) {
14619
- // eslint-disable-next-line no-throw-literal
14620
- throw { error: response.error };
14621
- }
14622
- return { ...response.value };
14623
- };
14624
14600
  this.thoughtSpotHost = thoughtSpotHost;
14625
14601
  }
14602
+ async executeUiPassthroughApi(iFrame, apiName, parameters) {
14603
+ const res = await processTrigger(iFrame, exports.HostEvent.UiPassthrough, this.thoughtSpotHost, {
14604
+ type: apiName,
14605
+ parameters,
14606
+ });
14607
+ return res;
14608
+ }
14609
+ async handleUiPassthroughForHostEvent(iFrame, apiName, parameters) {
14610
+ var _a, _b, _c;
14611
+ const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
14612
+ if (!response) {
14613
+ const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
14614
+ // eslint-disable-next-line no-throw-literal
14615
+ throw { error };
14616
+ }
14617
+ const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
14618
+ if (errors) {
14619
+ // eslint-disable-next-line no-throw-literal
14620
+ throw { error: response.error };
14621
+ }
14622
+ return { ...response.value };
14623
+ }
14626
14624
  async hostEventFallback(iFrame, hostEvent, data) {
14627
14625
  return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
14628
14626
  }
@@ -14753,17 +14751,6 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14753
14751
  this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
14754
14752
  };
14755
14753
  this.showPreRenderByDefault = false;
14756
- /**
14757
- * Triggers an event to the embedded app, skipping the UI flow.
14758
- * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
14759
- * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
14760
- * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
14761
- * from the embedded app.
14762
- */
14763
- // eslint-disable-next-line arrow-body-style
14764
- this.triggerUiPassThrough = (apiName, parameters) => {
14765
- return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
14766
- };
14767
14754
  this.validatePreRenderViewConfig = (viewConfig) => {
14768
14755
  var _a;
14769
14756
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
@@ -15438,6 +15425,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15438
15425
  }
15439
15426
  return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
15440
15427
  }
15428
+ /**
15429
+ * Triggers an event to the embedded app, skipping the UI flow.
15430
+ * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
15431
+ * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
15432
+ * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
15433
+ * from the embedded app.
15434
+ */
15435
+ // eslint-disable-next-line arrow-body-style
15436
+ triggerUiPassThrough(apiName, parameters) {
15437
+ return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
15438
+ }
15441
15439
  /**
15442
15440
  * Marks the ThoughtSpot object to have been rendered
15443
15441
  * Needs to be overridden by subclasses to do the actual