@thoughtspot/visual-embed-sdk 1.35.5-hostEvent.5 → 1.35.5-hostEvent.7

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 (79) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/embed/hostEventClient/contracts.d.ts +27 -31
  3. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  4. package/cjs/src/embed/hostEventClient/contracts.js +10 -10
  5. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  6. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +21 -7
  7. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  8. package/cjs/src/embed/hostEventClient/host-event-client.js +61 -27
  9. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  10. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +43 -39
  11. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  12. package/cjs/src/embed/liveboard.spec.js +4 -2
  13. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  14. package/cjs/src/embed/ts-embed.d.ts +13 -8
  15. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  16. package/cjs/src/embed/ts-embed.js +22 -14
  17. package/cjs/src/embed/ts-embed.js.map +1 -1
  18. package/cjs/src/embed/ts-embed.spec.js +4 -4
  19. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  20. package/cjs/src/index.d.ts +2 -2
  21. package/cjs/src/index.js +2 -2
  22. package/cjs/src/react/all-types-export.d.ts +1 -1
  23. package/cjs/src/react/all-types-export.js +2 -2
  24. package/cjs/src/types.d.ts +1 -1
  25. package/cjs/src/types.js +1 -1
  26. package/dist/index-DOIjN0N_.js +7370 -0
  27. package/dist/index-DaLHJaLd.js +7370 -0
  28. package/dist/src/embed/hostEventClient/contracts.d.ts +27 -31
  29. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  30. package/dist/src/embed/hostEventClient/host-event-client.d.ts +21 -7
  31. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  32. package/dist/src/embed/ts-embed.d.ts +13 -8
  33. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  34. package/dist/src/index.d.ts +2 -2
  35. package/dist/src/react/all-types-export.d.ts +1 -1
  36. package/dist/src/types.d.ts +1 -1
  37. package/dist/tsembed-react.es.js +95 -54
  38. package/dist/tsembed-react.js +94 -53
  39. package/dist/tsembed.es.js +96 -55
  40. package/dist/tsembed.js +94 -53
  41. package/dist/visual-embed-sdk-react-full.d.ts +61 -46
  42. package/dist/visual-embed-sdk-react.d.ts +61 -46
  43. package/dist/visual-embed-sdk.d.ts +61 -46
  44. package/lib/package.json +1 -1
  45. package/lib/src/embed/hostEventClient/contracts.d.ts +27 -31
  46. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  47. package/lib/src/embed/hostEventClient/contracts.js +9 -9
  48. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  49. package/lib/src/embed/hostEventClient/host-event-client.d.ts +21 -7
  50. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  51. package/lib/src/embed/hostEventClient/host-event-client.js +63 -29
  52. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  53. package/lib/src/embed/hostEventClient/host-event-client.spec.js +43 -40
  54. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  55. package/lib/src/embed/liveboard.spec.js +4 -2
  56. package/lib/src/embed/liveboard.spec.js.map +1 -1
  57. package/lib/src/embed/ts-embed.d.ts +13 -8
  58. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  59. package/lib/src/embed/ts-embed.js +22 -14
  60. package/lib/src/embed/ts-embed.js.map +1 -1
  61. package/lib/src/embed/ts-embed.spec.js +5 -5
  62. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  63. package/lib/src/index.d.ts +2 -2
  64. package/lib/src/index.js +2 -2
  65. package/lib/src/react/all-types-export.d.ts +1 -1
  66. package/lib/src/react/all-types-export.js +1 -1
  67. package/lib/src/types.d.ts +1 -1
  68. package/lib/src/types.js +1 -1
  69. package/lib/src/visual-embed-sdk.d.ts +64 -49
  70. package/package.json +1 -1
  71. package/src/embed/hostEventClient/contracts.ts +44 -33
  72. package/src/embed/hostEventClient/host-event-client.spec.ts +58 -54
  73. package/src/embed/hostEventClient/host-event-client.ts +109 -47
  74. package/src/embed/liveboard.spec.ts +4 -2
  75. package/src/embed/ts-embed.spec.ts +6 -6
  76. package/src/embed/ts-embed.ts +38 -27
  77. package/src/index.ts +2 -2
  78. package/src/react/all-types-export.ts +1 -1
  79. package/src/types.ts +1 -1
@@ -1,38 +1,52 @@
1
1
  import { HostEvent } from '../../types';
2
- import { processTrigger } from '../../utils/processTrigger';
2
+ import { processTrigger as processTriggerService } from '../../utils/processTrigger';
3
+ import { getEmbedConfig } from '../embedConfig';
3
4
  import {
4
- UiPassthroughArrayResponse,
5
- UiPassthroughEvent, HostEventRequest, HostEventResponse,
6
- UiPassthroughRequest,
7
- UiPassthroughResponse,
5
+ UIPassthroughArrayResponse,
6
+ UIPassthroughEvent, HostEventRequest, HostEventResponse,
7
+ UIPassthroughRequest,
8
+ UIPassthroughResponse,
9
+ TriggerPayload,
10
+ TriggerResponse,
8
11
  } from './contracts';
9
12
 
13
+ // Define a type for the eventHandlerMap
14
+ type EventHandlerMap = {
15
+ [K in HostEvent]: any;
16
+ };
17
+
10
18
  export class HostEventClient {
11
- thoughtSpotHost: string;
19
+ iFrame: HTMLIFrameElement;
12
20
 
13
- constructor(thoughtSpotHost: string) {
14
- this.thoughtSpotHost = thoughtSpotHost;
21
+ constructor(iFrame?: HTMLIFrameElement) {
22
+ this.iFrame = iFrame;
15
23
  }
16
24
 
17
- public async executeUiPassthroughApi<UiPassthroughEventT extends UiPassthroughEvent>(
18
- iFrame: HTMLIFrameElement,
19
- apiName: UiPassthroughEventT,
20
- parameters: UiPassthroughRequest<UiPassthroughEventT>,
21
- ): UiPassthroughArrayResponse<UiPassthroughEventT> {
22
- const res = await processTrigger(iFrame, HostEvent.UiPassthrough, this.thoughtSpotHost, {
23
- type: apiName,
24
- parameters,
25
- });
25
+ /**
26
+ * A wrapper over process trigger to
27
+ * @param {HostEvent} message Host event to send
28
+ * @param {any} data Data to send with the host event
29
+ * @returns {Promise<any>} - the response from the process trigger
30
+ */
31
+ protected async processTrigger(message: HostEvent, data: any): Promise<any> {
32
+ if (!this.iFrame) {
33
+ throw new Error('Iframe element is not set');
34
+ }
26
35
 
27
- return res;
36
+ const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
37
+ return processTriggerService(
38
+ this.iFrame,
39
+ message,
40
+ thoughtspotHost,
41
+ data,
42
+ );
28
43
  }
29
44
 
30
- public async handleUiPassthroughForHostEvent<UiPassthroughEventT extends UiPassthroughEvent>(
31
- iFrame: HTMLIFrameElement,
32
- apiName: UiPassthroughEventT,
33
- parameters: UiPassthroughRequest<UiPassthroughEventT>,
34
- ): Promise<UiPassthroughResponse<UiPassthroughEventT>> {
35
- const response = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))
45
+ public async handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(
46
+ apiName: UIPassthroughEventT,
47
+ parameters: UIPassthroughRequest<UIPassthroughEventT>,
48
+ ): Promise<UIPassthroughResponse<UIPassthroughEventT>> {
49
+ const response = (await this.triggerUIPassthroughApi(apiName, parameters))
36
50
  ?.filter?.((r) => r.error || r.value)[0];
37
51
 
38
52
  if (!response) {
@@ -41,7 +55,10 @@ export class HostEventClient {
41
55
  throw { error };
42
56
  }
43
57
 
44
- const errors = response.error || (response.value as any)?.errors;
58
+ const errors = response.error
59
+ || (response.value as any)?.errors
60
+ || (response.value as any)?.error;
61
+
45
62
  if (errors) {
46
63
  // eslint-disable-next-line no-throw-literal
47
64
  throw { error: response.error };
@@ -51,32 +68,77 @@ export class HostEventClient {
51
68
  }
52
69
 
53
70
  public async hostEventFallback(
54
- iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any,
71
+ hostEvent: HostEvent,
72
+ data: any,
55
73
  ): Promise<any> {
56
- return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
74
+ return this.processTrigger(hostEvent, data);
57
75
  }
58
76
 
59
- public async executeHostEvent<T extends HostEvent>(
60
- iFrame: HTMLIFrameElement,
61
- hostEvent: HostEvent,
62
- payload?: HostEventRequest<T>,
63
- ): Promise<HostEventResponse<HostEvent>> {
64
- if (hostEvent === HostEvent.Pin && payload?.newVizName) {
65
- return this.handleUiPassthroughForHostEvent(
66
- iFrame, UiPassthroughEvent.addVizToPinboard, payload,
67
- );
77
+ /**
78
+ * Setter for the iframe element used for host events
79
+ * @param {HTMLIFrameElement} iFrame - the iframe element to set
80
+ */
81
+ public setIframeElement(iFrame: HTMLIFrameElement): void {
82
+ this.iFrame = iFrame;
83
+ }
84
+
85
+ public async triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(
86
+ apiName: UIPassthroughEventT,
87
+ parameters: UIPassthroughRequest<UIPassthroughEventT>,
88
+ ): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>> {
89
+ const res = await this.processTrigger(HostEvent.UIPassthrough, {
90
+ type: apiName,
91
+ parameters,
92
+ });
93
+
94
+ return res;
95
+ }
96
+
97
+ protected async handlePinEvent(
98
+ payload: HostEventRequest<HostEvent.Pin>,
99
+ ): Promise<HostEventResponse<HostEvent.Pin>> {
100
+ if (!payload || !('newVizName' in payload)) {
101
+ return this.hostEventFallback(HostEvent.Pin, payload);
68
102
  }
69
- if (hostEvent === HostEvent.SaveAnswer && payload?.name) {
70
- const data = await this.handleUiPassthroughForHostEvent(
71
- iFrame, UiPassthroughEvent.saveAnswer, payload,
72
- );
73
- return {
74
- ...data,
75
- answerId: data?.saveResponse?.data?.Answer__save?.answer?.id,
76
- };
103
+
104
+ return this.handleHostEventWithParam(
105
+ UIPassthroughEvent.PinAnswerToLiveboard, payload,
106
+ );
107
+ }
108
+
109
+ protected async handleSaveAnswerEvent(
110
+ payload: HostEventRequest<HostEvent.SaveAnswer>,
111
+ ): Promise<any> {
112
+ if (!payload || !('name' in payload) || !('description' in payload)) {
113
+ // Save is the fallback for SaveAnswer
114
+ return this.hostEventFallback(HostEvent.Save, payload);
115
+ }
116
+
117
+ const data = await this.handleHostEventWithParam(
118
+ UIPassthroughEvent.SaveAnswer, payload,
119
+ );
120
+ return {
121
+ ...data,
122
+ answerId: data?.saveResponse?.data?.Answer__save?.answer?.id,
123
+ };
124
+ }
125
+
126
+ public async triggerHostEvent<
127
+ HostEventT extends HostEvent,
128
+ PayloadT,
129
+ >(
130
+ hostEvent: HostEventT,
131
+ payload?: TriggerPayload<PayloadT, HostEventT>,
132
+ ): Promise<TriggerResponse<PayloadT, HostEventT>> {
133
+ switch (hostEvent) {
134
+ case HostEvent.Pin:
135
+ return this.handlePinEvent(payload as HostEventRequest<HostEvent.Pin>) as any;
136
+ case HostEvent.SaveAnswer:
137
+ return this.handleSaveAnswerEvent(
138
+ payload as HostEventRequest<HostEvent.SaveAnswer>,
139
+ ) as any;
140
+ default:
141
+ return this.hostEventFallback(hostEvent, payload);
77
142
  }
78
- // fallback for save answer is Save
79
- if (hostEvent === HostEvent.SaveAnswer) hostEvent = HostEvent.Save;
80
- return this.hostEventFallback(iFrame, hostEvent, payload);
81
143
  }
82
144
  }
@@ -484,8 +484,10 @@ describe('Liveboard/viz embed tests', () => {
484
484
  liveboardId,
485
485
  } as LiveboardViewConfig);
486
486
  liveboardEmbed.render();
487
- const result = await liveboardEmbed.trigger(HostEvent.Pin);
488
- expect(mockProcessTrigger).toBeCalled();
487
+ await executeAfterWait(async () => {
488
+ await liveboardEmbed.trigger(HostEvent.Pin);
489
+ expect(mockProcessTrigger).toBeCalled();
490
+ });
489
491
  });
490
492
 
491
493
  test('should render active tab when activeTab present', async () => {
@@ -50,7 +50,7 @@ import { logger } from '../utils/logger';
50
50
  import { version } from '../../package.json';
51
51
  import { HiddenActionItemByDefaultForSearchEmbed } from './search';
52
52
  import { processTrigger } from '../utils/processTrigger';
53
- import { UiPassthroughEvent } from './hostEventClient/contracts';
53
+ import { UIPassthroughEvent } from './hostEventClient/contracts';
54
54
 
55
55
  jest.mock('../utils/processTrigger');
56
56
 
@@ -142,25 +142,25 @@ describe('Unit test case for ts embed', () => {
142
142
  });
143
143
  });
144
144
 
145
- test('triggerUiPassThrough with params', async () => {
145
+ test('triggerUIPassThrough with params', async () => {
146
146
  const searchEmbed = new SearchEmbed(getRootEl(), defaultViewConfig);
147
147
  searchEmbed.render();
148
148
  mockProcessTrigger.mockResolvedValue({ session: 'test' });
149
149
  await executeAfterWait(async () => {
150
150
  const payload = { newVizName: 'test' };
151
151
  expect(
152
- await searchEmbed.triggerUiPassThrough(
153
- UiPassthroughEvent.addVizToPinboard,
152
+ await searchEmbed.triggerUIPassThrough(
153
+ UIPassthroughEvent.PinAnswerToLiveboard,
154
154
  payload,
155
155
  ),
156
156
  );
157
157
  expect(mockProcessTrigger).toHaveBeenCalledWith(
158
158
  getIFrameEl(),
159
- HostEvent.UiPassthrough,
159
+ HostEvent.UIPassthrough,
160
160
  'http://tshost',
161
161
  {
162
162
  parameters: payload,
163
- type: UiPassthroughEvent.addVizToPinboard,
163
+ type: UIPassthroughEvent.PinAnswerToLiveboard,
164
164
  },
165
165
  );
166
166
  });
@@ -12,9 +12,11 @@ import isObject from 'lodash/isObject';
12
12
  import {
13
13
  HostEventRequest,
14
14
  HostEventResponse,
15
- UiPassthroughArrayResponse,
16
- UiPassthroughEvent,
17
- UiPassthroughRequest,
15
+ TriggerPayload,
16
+ TriggerResponse,
17
+ UIPassthroughArrayResponse,
18
+ UIPassthroughEvent,
19
+ UIPassthroughRequest,
18
20
  } from './hostEventClient/contracts';
19
21
  import { logger } from '../utils/logger';
20
22
  import { getAuthenticationToken } from '../authToken';
@@ -85,7 +87,7 @@ const TS_EMBED_ID = '_thoughtspot-embed';
85
87
  * We cannot rename v1 event types to maintain backward compatibility
86
88
  * @internal
87
89
  */
88
- const V1EventMap = {};
90
+ const V1EventMap: Record<string, any> = {};
89
91
 
90
92
  /**
91
93
  * Base class for embedding v2 experience
@@ -119,6 +121,15 @@ export class TsEmbed {
119
121
  */
120
122
  protected iFrame: HTMLIFrameElement;
121
123
 
124
+ /**
125
+ * Setter for the iframe element
126
+ * @param {HTMLIFrameElement} iFrame HTMLIFrameElement
127
+ */
128
+ protected setIframeElement(iFrame: HTMLIFrameElement): void {
129
+ this.iFrame = iFrame;
130
+ this.hostEventClient.setIframeElement(iFrame);
131
+ }
132
+
122
133
  protected viewConfig: ViewConfig;
123
134
 
124
135
  protected embedConfig: EmbedConfig;
@@ -190,7 +201,7 @@ export class TsEmbed {
190
201
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
191
202
  ...viewConfig,
192
203
  });
193
- this.hostEventClient = new HostEventClient(this.embedConfig.thoughtSpotHost);
204
+ this.hostEventClient = new HostEventClient(this.iFrame);
194
205
  }
195
206
 
196
207
  /**
@@ -252,7 +263,7 @@ export class TsEmbed {
252
263
  return eventData;
253
264
  }
254
265
 
255
- private subscribedListeners = {};
266
+ private subscribedListeners: Record<string, any> = {};
256
267
 
257
268
  /**
258
269
  * Adds a global event listener to window for "message" events.
@@ -620,7 +631,7 @@ export class TsEmbed {
620
631
  this.insertIntoDOM(child);
621
632
  }
622
633
  if (this.insertedDomEl instanceof Node) {
623
- this.insertedDomEl[this.embedNodeKey] = this;
634
+ (this.insertedDomEl as any)[this.embedNodeKey] = this;
624
635
  }
625
636
  }
626
637
 
@@ -658,7 +669,7 @@ export class TsEmbed {
658
669
  return;
659
670
  }
660
671
 
661
- this.iFrame = this.iFrame || this.createIframeEl(url);
672
+ this.setIframeElement(this.iFrame || this.createIframeEl(url));
662
673
  this.iFrame.addEventListener('load', () => {
663
674
  nextInQueue();
664
675
  const loadTimestamp = Date.now();
@@ -728,7 +739,7 @@ export class TsEmbed {
728
739
  if (this.preRenderWrapper && this.preRenderChild) {
729
740
  this.isPreRendered = true;
730
741
  if (this.preRenderChild instanceof HTMLIFrameElement) {
731
- this.iFrame = this.preRenderChild;
742
+ this.setIframeElement(this.preRenderChild);
732
743
  }
733
744
  this.insertedDomEl = this.preRenderWrapper;
734
745
  this.isRendered = true;
@@ -777,7 +788,7 @@ export class TsEmbed {
777
788
  this.preRenderWrapper = preRenderWrapper;
778
789
 
779
790
  if (preRenderChild instanceof HTMLIFrameElement) {
780
- this.iFrame = preRenderChild;
791
+ this.setIframeElement(preRenderChild);
781
792
  }
782
793
  this.insertedDomEl = preRenderWrapper;
783
794
 
@@ -994,14 +1005,14 @@ export class TsEmbed {
994
1005
 
995
1006
  /**
996
1007
  * Triggers an event to the embedded app
997
- * @param messageType The event type
998
- * @param data The payload to send with the message
1008
+ * @param {HostEvent} messageType The event type
1009
+ * @param {any} data The payload to send with the message
999
1010
  * @returns A promise that resolves with the response from the embedded app
1000
1011
  */
1001
- public trigger<HostEventT extends HostEvent>(
1012
+ public async trigger<HostEventT extends HostEvent, PayloadT>(
1002
1013
  messageType: HostEventT,
1003
- data?: HostEventRequest<HostEventT>,
1004
- ): Promise<HostEventResponse<HostEventT>> {
1014
+ data?: TriggerPayload<PayloadT, HostEventT>,
1015
+ ): Promise<TriggerResponse<PayloadT, HostEventT>> {
1005
1016
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
1006
1017
 
1007
1018
  if (!this.isRendered) {
@@ -1014,22 +1025,22 @@ export class TsEmbed {
1014
1025
  return null;
1015
1026
  }
1016
1027
 
1017
- return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
1028
+ return this.hostEventClient.triggerHostEvent(messageType, data);
1018
1029
  }
1019
1030
 
1020
1031
  /**
1021
1032
  * Triggers an event to the embedded app, skipping the UI flow.
1022
- * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
1023
- * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
1024
- * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
1033
+ * @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
1034
+ * @param {UIPassthroughRequest} parameters - The parameters to be passed to the API.
1035
+ * @returns {Promise<UIPassthroughRequest>} - A promise that resolves with the response
1025
1036
  * from the embedded app.
1026
1037
  */
1027
- // eslint-disable-next-line arrow-body-style
1028
- public triggerUiPassThrough<UiPassthroughEventT extends UiPassthroughEvent>(
1029
- apiName: UiPassthroughEventT,
1030
- parameters: UiPassthroughRequest<UiPassthroughEventT>,
1031
- ): UiPassthroughArrayResponse<UiPassthroughEventT> {
1032
- return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
1038
+ public async triggerUIPassThrough<UIPassthroughEventT extends UIPassthroughEvent>(
1039
+ apiName: UIPassthroughEventT,
1040
+ parameters: UIPassthroughRequest<UIPassthroughEventT>,
1041
+ ): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>> {
1042
+ const response = this.hostEventClient.triggerUIPassthroughApi(apiName, parameters);
1043
+ return response;
1033
1044
  }
1034
1045
 
1035
1046
  /**
@@ -1135,14 +1146,14 @@ export class TsEmbed {
1135
1146
 
1136
1147
  private validatePreRenderViewConfig = (viewConfig: ViewConfig) => {
1137
1148
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
1138
- const preRenderedObject = this.insertedDomEl?.[this.embedNodeKey] as TsEmbed;
1149
+ const preRenderedObject = (this.insertedDomEl as any)?.[this.embedNodeKey] as TsEmbed;
1139
1150
  if (!preRenderedObject) return;
1140
1151
  if (viewConfig.preRenderId) {
1141
1152
  const allOtherKeys = Object.keys(viewConfig).filter(
1142
1153
  (key) => !preRenderAllowedKeys.includes(key) && !key.startsWith('on'),
1143
1154
  );
1144
1155
 
1145
- allOtherKeys.forEach((key) => {
1156
+ allOtherKeys.forEach((key: keyof ViewConfig) => {
1146
1157
  if (
1147
1158
  !isUndefined(viewConfig[key])
1148
1159
  && !isEqual(viewConfig[key], preRenderedObject.viewConfig[key])
package/src/index.ts CHANGED
@@ -61,7 +61,7 @@ import { uploadMixpanelEvent, MIXPANEL_EVENT } from './mixpanel-service';
61
61
  import { tokenizedFetch } from './tokenizedFetch';
62
62
  import { getAnswerFromQuery } from './utils/graphql/nlsService/nls-answer-service';
63
63
  import { createLiveboardWithAnswers } from './utils/liveboardService/liveboardService';
64
- import { UiPassthroughEvent } from './embed/hostEventClient/contracts';
64
+ import { UIPassthroughEvent } from './embed/hostEventClient/contracts';
65
65
 
66
66
  export {
67
67
  init,
@@ -128,7 +128,7 @@ export {
128
128
  HomePageSearchBarMode,
129
129
  VizPoint,
130
130
  CustomActionPayload,
131
- UiPassthroughEvent,
131
+ UIPassthroughEvent,
132
132
  };
133
133
 
134
134
  export { resetCachedAuthToken } from './authToken';
@@ -51,5 +51,5 @@ export {
51
51
  CustomCssVariables,
52
52
  RuntimeParameter,
53
53
  resetCachedAuthToken,
54
- UiPassthroughEvent,
54
+ UIPassthroughEvent,
55
55
  } from '../index';
package/src/types.ts CHANGED
@@ -3208,7 +3208,7 @@ export enum HostEvent {
3208
3208
  * EmbedApi
3209
3209
  * @hidden
3210
3210
  */
3211
- UiPassthrough = 'UiPassthrough',
3211
+ UIPassthrough = 'UiPassthrough',
3212
3212
  }
3213
3213
 
3214
3214
  /**