@thoughtspot/visual-embed-sdk 1.10.0-alpha.0 → 1.10.0-alpha.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 (75) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +50 -20
  3. package/dist/src/embed/app.d.ts +13 -1
  4. package/dist/src/embed/base.d.ts +1 -1
  5. package/dist/src/embed/liveboard.d.ts +15 -0
  6. package/dist/src/embed/pinboard.d.ts +91 -0
  7. package/dist/src/embed/ts-embed.d.ts +33 -4
  8. package/dist/src/react/index.d.ts +7 -5
  9. package/dist/src/react/util.d.ts +1 -1
  10. package/dist/src/types.d.ts +201 -7
  11. package/dist/src/utils/plugin.d.ts +0 -0
  12. package/dist/src/utils.d.ts +7 -0
  13. package/dist/src/v1/api.d.ts +19 -0
  14. package/dist/tsembed.es.js +262 -20
  15. package/dist/tsembed.js +262 -20
  16. package/lib/package.json +2 -2
  17. package/lib/src/embed/app.d.ts +13 -1
  18. package/lib/src/embed/app.js +11 -2
  19. package/lib/src/embed/app.js.map +1 -1
  20. package/lib/src/embed/app.spec.js +11 -10
  21. package/lib/src/embed/app.spec.js.map +1 -1
  22. package/lib/src/embed/base.d.ts +1 -1
  23. package/lib/src/embed/base.js +1 -1
  24. package/lib/src/embed/base.spec.js +13 -1
  25. package/lib/src/embed/base.spec.js.map +1 -1
  26. package/lib/src/embed/liveboard.d.ts +15 -0
  27. package/lib/src/embed/liveboard.js +7 -1
  28. package/lib/src/embed/liveboard.js.map +1 -1
  29. package/lib/src/embed/liveboard.spec.js +12 -1
  30. package/lib/src/embed/liveboard.spec.js.map +1 -1
  31. package/lib/src/embed/pinboard.d.ts +91 -0
  32. package/lib/src/embed/pinboard.js +110 -0
  33. package/lib/src/embed/pinboard.js.map +1 -0
  34. package/lib/src/embed/pinboard.spec.js +1 -1
  35. package/lib/src/embed/pinboard.spec.js.map +1 -1
  36. package/lib/src/embed/search.js +2 -1
  37. package/lib/src/embed/search.js.map +1 -1
  38. package/lib/src/embed/ts-embed.d.ts +33 -4
  39. package/lib/src/embed/ts-embed.js +61 -11
  40. package/lib/src/embed/ts-embed.js.map +1 -1
  41. package/lib/src/embed/ts-embed.spec.js +162 -8
  42. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  43. package/lib/src/react/index.d.ts +7 -5
  44. package/lib/src/react/index.js +10 -3
  45. package/lib/src/react/index.js.map +1 -1
  46. package/lib/src/react/index.spec.js +36 -6
  47. package/lib/src/react/index.spec.js.map +1 -1
  48. package/lib/src/react/util.d.ts +1 -1
  49. package/lib/src/react/util.js.map +1 -1
  50. package/lib/src/types.d.ts +201 -7
  51. package/lib/src/types.js +171 -4
  52. package/lib/src/types.js.map +1 -1
  53. package/lib/src/utils/plugin.d.ts +0 -0
  54. package/lib/src/utils/plugin.js +1 -0
  55. package/lib/src/utils/plugin.js.map +1 -0
  56. package/lib/src/utils.d.ts +7 -0
  57. package/lib/src/utils.js +9 -0
  58. package/lib/src/utils.js.map +1 -1
  59. package/lib/src/visual-embed-sdk.d.ts +263 -13
  60. package/package.json +2 -2
  61. package/src/embed/app.spec.ts +11 -10
  62. package/src/embed/app.ts +20 -2
  63. package/src/embed/base.spec.ts +14 -0
  64. package/src/embed/base.ts +1 -1
  65. package/src/embed/liveboard.spec.ts +14 -1
  66. package/src/embed/liveboard.ts +24 -0
  67. package/src/embed/pinboard.spec.ts +1 -1
  68. package/src/embed/search.ts +4 -1
  69. package/src/embed/ts-embed.spec.ts +228 -8
  70. package/src/embed/ts-embed.ts +97 -13
  71. package/src/react/index.spec.tsx +52 -5
  72. package/src/react/index.tsx +39 -22
  73. package/src/react/util.ts +2 -1
  74. package/src/types.ts +211 -5
  75. package/src/utils.ts +14 -0
package/CHANGELOG.md CHANGED
@@ -1,6 +1,54 @@
1
1
  # Changelog
2
2
 
3
3
  Please find the comprehensive list of changes for ThoughtSpot releases and SDK [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
4
+ This project follows Semantic Versioning.
5
+
6
+ ## Unreleased
7
+
8
+ ### New Features
9
+ - Events for all actions on Search Embed
10
+
11
+ ## 1.9.5 (04-06-2022)
12
+
13
+ ### New Features
14
+ - `locale` param to set Locale/language for the embedded view.
15
+
16
+
17
+ ## 1.9.4 (04-06-2022)
18
+
19
+ ### Fixed
20
+ - [React] `className` should be forwarded to the iframe container div.
21
+
22
+
23
+ ## 1.9.3 (03-22-2022)
24
+
25
+ ### New Features
26
+ - `disableLoginRedirect` option in `EmbedConfig`
27
+
28
+ ## 1.9.2 (03-17-2022)
29
+
30
+ ### New Features
31
+ - Ability to trigger events on React components
32
+ - Added new `useEmbedRef` hook, check README for usage.
33
+
34
+ ### Fixed
35
+
36
+ - Typings for `on*` event handlers for React components
37
+
38
+
39
+ ## 1.9.1 (03-15-2022)
40
+
41
+ ### New Features
42
+
43
+ - `visibleVizs` option in the `LiveboardEmbed`
44
+ - `LiveboardRendered` new `EmbedEvent` emitted when a liveboard completes rendering.
45
+
46
+
47
+ ## 1.9.0
48
+
49
+ - Release to support TS version 8.1.0.cl
50
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
51
+
4
52
 
5
53
  ## 1.8.1
6
54
 
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
-
2
1
  <p align="center">
3
2
  <img src="https://raw.githubusercontent.com/thoughtspot/visual-embed-sdk/main/static/doc-images/images/TS-Logo-black-no-bg.svg" width=100 align="center" alt="ThoughtSpot" />
4
3
  </p>
5
4
 
6
5
  <br/>
7
6
 
8
- # ThoughtSpot Visual Embed SDK [![Coverage Status](https://coveralls.io/repos/github/ts-blink/embed-sdk/badge.svg?branch=main)](https://coveralls.io/github/ts-blink/embed-sdk?branch=main) ![npm (scoped with tag)](https://img.shields.io/npm/v/@thoughtspot/visual-embed-sdk) [![](https://data.jsdelivr.com/v1/package/npm/@thoughtspot/visual-embed-sdk/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@thoughtspot/visual-embed-sdk)
7
+ # ThoughtSpot Visual Embed SDK [![Coverage Status](https://coveralls.io/repos/github/ts-blink/embed-sdk/badge.svg?branch=main)](https://coveralls.io/github/ts-blink/embed-sdk?branch=main) ![npm (scoped with tag)](https://img.shields.io/npm/v/@thoughtspot/visual-embed-sdk) [![](https://data.jsdelivr.com/v1/package/npm/@thoughtspot/visual-embed-sdk/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@thoughtspot/visual-embed-sdk)
9
8
 
10
9
  SDK to embed ThoughtSpot into your web apps.
11
10
 
@@ -28,11 +27,16 @@ The SDK is written in TypeScript and is also provided both as ES Module (ESM) an
28
27
  import * as TsEmbedSDK from '@thoughtspot/visual-embed-sdk';
29
28
 
30
29
  // NPM <script>
31
- <script src='https://cdn.jsdelivr.net/npm/@thoughtspot/visual-embed-sdk/dist/tsembed.js'></script>
30
+ <script src="https://cdn.jsdelivr.net/npm/@thoughtspot/visual-embed-sdk/dist/tsembed.js"></script>;
32
31
 
33
32
  // ES6 from web
34
- import { LiveboardEmbed, AuthType, init } from 'https://cdn.jsdelivr.net/npm/@thoughtspot/visual-embed-sdk/dist/tsembed.es.js';
33
+ import {
34
+ LiveboardEmbed,
35
+ AuthType,
36
+ init,
37
+ } from 'https://cdn.jsdelivr.net/npm/@thoughtspot/visual-embed-sdk/dist/tsembed.es.js';
35
38
  ```
39
+
36
40
  <br/>
37
41
 
38
42
  ## Live Playground
@@ -43,8 +47,8 @@ Visit our [code playground](https://try-everywhere.thoughtspot.cloud/v2/#/everyw
43
47
 
44
48
  ## Full API Reference
45
49
 
46
- - Detailed [developer guide](https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/documentation/en/?pageid=getting-started).
47
- - Please visit our [API reference docs](https://developers.thoughtspot.com/docs/typedoc/modules.html).
50
+ - Detailed [developer guide](https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/documentation/en/?pageid=getting-started).
51
+ - Please visit our [API reference docs](https://developers.thoughtspot.com/docs/typedoc/modules.html).
48
52
 
49
53
  <br/>
50
54
 
@@ -55,7 +59,7 @@ liveboards, visualizations or the even full app version.
55
59
 
56
60
  ### Embedded Search
57
61
 
58
- ```js
62
+ ```js
59
63
  // NPM
60
64
  import { SearchEmbed, AuthType, init } from '@thoughtspot/visual-embed-sdk';
61
65
  // or ES6
@@ -117,15 +121,13 @@ init({
117
121
  authType: AuthType.None,
118
122
  });
119
123
 
120
- const appEmbed = new AppEmbed(
121
- document.getElementById('ts-embed'),
122
- {
123
- frameParams: {
124
- width: '100%',
125
- height: '100%',
126
- },
127
- pageId: Page.Data,
128
- });
124
+ const appEmbed = new AppEmbed(document.getElementById('ts-embed'), {
125
+ frameParams: {
126
+ width: '100%',
127
+ height: '100%',
128
+ },
129
+ pageId: Page.Data,
130
+ });
129
131
 
130
132
  appEmbed.render();
131
133
  ```
@@ -136,6 +138,7 @@ All the above flavors of embedding are also provided as React components for you
136
138
  The constructor options are passed as props and the event listeners can be attached using `on<EventName>` convention.
137
139
 
138
140
  ### Search Component
141
+
139
142
  ```js
140
143
  import { init } from '@thoughtspot/visual-embed-sdk';
141
144
  import { SearchEmbed } from '@thoughtspot/visual-embed-sdk/react';
@@ -153,12 +156,39 @@ const MyComponent = ({ dataSources }) => {
153
156
  const onCustomAction = (actionEvent) => {
154
157
  // Do something with actionEvent.
155
158
  };
156
-
157
- return <SearchEmbed dataSources={dataSources} onCustomAction={onCustomAction} />
158
- }
159
+
160
+ return (
161
+ <SearchEmbed
162
+ dataSources={dataSources}
163
+ onCustomAction={onCustomAction}
164
+ />
165
+ );
166
+ };
167
+ ```
168
+
169
+ ### Triggering events on React components
170
+
171
+ ```jsx
172
+ import { HostEvent } from '@thoughtspot/visual-embed-sdk';
173
+ import { LiveboardEmbed, useEmbedRef } from '@thoughtspot/visual-embed-sdk/react';
174
+
175
+ const MyComponent = () => {
176
+ const embedRef = useEmbedRef();
177
+ const onLiveboardRendered = () => {
178
+ embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
179
+ };
180
+
181
+ return (
182
+ <LiveboardEmbed
183
+ ref={embedRef}
184
+ liveboardId="<liveboard-guid>"
185
+ onLiveboardRendered={onLiveboardRendered}
186
+ />
187
+ );
188
+ };
159
189
  ```
160
190
 
161
- ###
191
+ ###
162
192
 
163
193
  <br/>
164
194
  <br/>
@@ -37,7 +37,11 @@ export declare enum Page {
37
37
  /**
38
38
  * Data management page
39
39
  */
40
- Data = "data"
40
+ Data = "data",
41
+ /**
42
+ * SpotIQ listing page
43
+ */
44
+ SpotIQ = "spotiq"
41
45
  }
42
46
  /**
43
47
  * The view configuration for full app embedding.
@@ -74,6 +78,14 @@ export interface AppViewConfig extends ViewConfig {
74
78
  * The array of GUIDs to be hidden
75
79
  */
76
80
  hideObjects?: string[];
81
+ /**
82
+ * Render liveboards using the new v2 rendering mode
83
+ * This is a transient flag which is primarily meant for internal use
84
+ * @default false
85
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
86
+ * @hidden
87
+ */
88
+ liveboardV2?: boolean;
77
89
  }
78
90
  /**
79
91
  * Embeds full ThoughtSpot experience in a host application.
@@ -12,7 +12,7 @@ export declare const getAuthPromise: () => Promise<void>;
12
12
  */
13
13
  export declare const prefetch: (url?: string) => void;
14
14
  /**
15
- * Initialize the ThoughtSpot embed settings globally and perform
15
+ * Initialize the ThoughtSpot embed SDK globally and perform
16
16
  * authentication if applicable.
17
17
  * @param embedConfig The configuration object containing ThoughtSpot host,
18
18
  * authentication mechanism and so on.
@@ -51,11 +51,26 @@ export interface LiveboardViewConfig extends ViewConfig {
51
51
  * Liveboard page will be read-only (no X buttons)
52
52
  */
53
53
  preventLiveboardFilterRemoval?: boolean;
54
+ /**
55
+ * Array of viz ids which should be visible when the liveboard
56
+ * first renders. This can be changed by triggering the "SetVisibleVizs"
57
+ * event.
58
+ * @version 1.9.1 or later
59
+ */
60
+ visibleVizs?: string[];
54
61
  /**
55
62
  * To support backward compatibilty
56
63
  * @hidden
57
64
  */
58
65
  preventPinboardFilterRemoval?: boolean;
66
+ /**
67
+ * Render embedded liveboards and visualizations using the new v2 rendering mode
68
+ * This is a transient flag which is primarily meant for internal use
69
+ * @default false
70
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
71
+ * @hidden
72
+ */
73
+ liveboardV2?: boolean;
59
74
  }
60
75
  /**
61
76
  * Embed a ThoughtSpot Liveboard or visualization
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Copyright (c) 2021
3
+ *
4
+ * Embed a ThoughtSpot pinboard or visualization
5
+ * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
6
+ * https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
7
+ *
8
+ * @summary Pinboard & visualization embed
9
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
10
+ */
11
+ import { DOMSelector } from '../types';
12
+ import { V1Embed, ViewConfig } from './ts-embed';
13
+ /**
14
+ * The configuration for the embedded pinboard or visualization page view.
15
+ * @Category Pinboards and Charts
16
+ */
17
+ export interface PinboardViewConfig extends ViewConfig {
18
+ /**
19
+ * If set to true, the embedded object container dynamically resizes
20
+ * according to the height of the pinboard.
21
+ */
22
+ fullHeight?: boolean;
23
+ /**
24
+ * This is the minimum height(in pixels) for a full height pinboard.
25
+ * Setting this height helps resolves issues with empty pinboards and
26
+ * other screens navigable from a pinboard.
27
+ * @default 500
28
+ * * _since 1.5.0_
29
+ */
30
+ defaultHeight?: number;
31
+ /**
32
+ * If set to true, the context menu in visualizations will be enabled.
33
+ */
34
+ enableVizTransformations?: boolean;
35
+ /**
36
+ * The pinboard to display in the embedded view.
37
+ */
38
+ pinboardId: string;
39
+ /**
40
+ * The visualization within the pinboard to display.
41
+ */
42
+ vizId?: string;
43
+ /**
44
+ * If set to true, all filter chips from a
45
+ * pinboard page will be read-only (no X buttons)
46
+ */
47
+ preventPinboardFilterRemoval?: boolean;
48
+ /**
49
+ * An array of vizids which should be visible when this pinboard loads.
50
+ * The ids not in this array are hidden from the pinboard.
51
+ * _since: 1.6.0_
52
+ */
53
+ pinboardVisibleVizs?: string[];
54
+ }
55
+ /**
56
+ * Embed a ThoughtSpot pinboard or visualization
57
+ * @Category Pinboards and Charts
58
+ */
59
+ export declare class PinboardEmbed extends V1Embed {
60
+ protected viewConfig: PinboardViewConfig;
61
+ private defaultHeight;
62
+ constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
63
+ /**
64
+ * Construct a map of params to be passed on to the
65
+ * embedded pinboard or visualization.
66
+ */
67
+ private getEmbedParams;
68
+ /**
69
+ * Construct the URL of the embedded ThoughtSpot pinboard or visualization
70
+ * to be loaded within the iframe.
71
+ * @param pinboardId The GUID of the pinboard.
72
+ * @param vizId The optional GUID of a visualization within the pinboard.
73
+ * @param runtimeFilters A list of runtime filters to be applied to
74
+ * the pinboard or visualization on load.
75
+ */
76
+ private getIFrameSrc;
77
+ /**
78
+ * Set the iframe height as per the computed height received
79
+ * from the ThoughtSpot app.
80
+ * @param data The event payload
81
+ */
82
+ private updateIFrameHeight;
83
+ private embedIframeCenter;
84
+ private handleRouteChangeFullHeightPinboard;
85
+ /**
86
+ * Render an embedded ThoughtSpot pinboard or visualization
87
+ * @param renderOptions An object specifying the pinboard ID,
88
+ * visualization ID and the runtime filters.
89
+ */
90
+ render(): PinboardEmbed;
91
+ }
@@ -6,7 +6,11 @@
6
6
  * @summary Base classes
7
7
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8
8
  */
9
- import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig } from '../types';
9
+ import { DOMSelector, HostEvent, EmbedEvent, MessageCallback, Action, RuntimeFilter, EmbedConfig, MessageOptions } from '../types';
10
+ /**
11
+ * Global prefix for all Thoughtspot postHash Params.
12
+ */
13
+ export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
10
14
  export interface LayoutConfig {
11
15
  }
12
16
  /**
@@ -21,6 +25,11 @@ export interface FrameParams {
21
25
  * The height of the iFrame (unit is pixels if numeric).
22
26
  */
23
27
  height?: number | string;
28
+ /**
29
+ * This parameters will be passed on the iframe
30
+ * as is.
31
+ */
32
+ [key: string]: string | number | boolean;
24
33
  }
25
34
  /**
26
35
  * The configuration object for an embedded view.
@@ -62,15 +71,28 @@ export interface ViewConfig {
62
71
  * @version 1.6.0 or later
63
72
  */
64
73
  visibleActions?: Action[];
74
+ /**
75
+ * Show alert messages and toast messages in the embedded view.
76
+ * @version 1.11.0 | ThoughtSpot: 8.3.0.cl
77
+ */
78
+ showAlerts?: boolean;
65
79
  /**
66
80
  * The list of runtime filters to apply to a search answer,
67
81
  * visualization, or Liveboard.
68
82
  */
69
83
  runtimeFilters?: RuntimeFilter[];
84
+ /**
85
+ * The locale/language to use for the embedded view.
86
+ * @version 1.9.4 or later
87
+ */
88
+ locale?: string;
70
89
  /**
71
90
  * This is an object (key/val) of override flags which will be applied
72
91
  * to the internal embedded object. This can be used to add any
73
92
  * URL flag.
93
+ * Warning: This option is for advanced use only and is used internally
94
+ * to control embed behavior in non-regular ways. We do not publish the
95
+ * list of supported keys and values associated with each.
74
96
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
75
97
  */
76
98
  additionalFlags?: {
@@ -183,7 +205,7 @@ export declare class TsEmbed {
183
205
  * @param url
184
206
  * @param frameOptions
185
207
  */
186
- protected renderIFrame(url: string, frameOptions: FrameParams): void;
208
+ protected renderIFrame(url: string, frameOptions?: FrameParams): void;
187
209
  /**
188
210
  * Sets the height of the iframe
189
211
  * @param height The height in pixels
@@ -227,9 +249,10 @@ export declare class TsEmbed {
227
249
  * sends an event of a particular message type to the host application.
228
250
  *
229
251
  * @param messageType The message type
230
- * @param callback A callback function
252
+ * @param callback A callback as a function
253
+ * @param options The message options
231
254
  */
232
- on(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
255
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
233
256
  /**
234
257
  * Triggers an event on specific Port registered against
235
258
  * for the EmbedEvent
@@ -250,6 +273,12 @@ export declare class TsEmbed {
250
273
  * @param args
251
274
  */
252
275
  render(): TsEmbed;
276
+ /**
277
+ * Get the Post Url Params for THOUGHTSPOT from the current
278
+ * host app URL.
279
+ * THOUGHTSPOT URL params starts with a prefix "ts-"
280
+ */
281
+ getThoughtSpotPostUrlParams(): string;
253
282
  }
254
283
  /**
255
284
  * Base class for embedding v1 experience
@@ -1,16 +1,18 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { SearchViewConfig } from '../embed/search';
3
3
  import { AppViewConfig } from '../embed/app';
4
4
  import { LiveboardViewConfig } from '../embed/liveboard';
5
+ import { TsEmbed } from '../embed/ts-embed';
5
6
  import { EmbedProps } from './util';
6
7
  interface SearchProps extends EmbedProps, SearchViewConfig {
7
8
  }
8
- export declare const SearchEmbed: (props: SearchProps) => JSX.Element;
9
+ export declare const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<TsEmbed>>;
9
10
  interface AppProps extends EmbedProps, AppViewConfig {
10
11
  }
11
- export declare const AppEmbed: (props: AppProps) => JSX.Element;
12
+ export declare const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<TsEmbed>>;
12
13
  interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
13
14
  }
14
- export declare const LiveboardEmbed: (props: LiveboardProps) => JSX.Element;
15
- export declare const PinboardEmbed: (props: LiveboardProps) => JSX.Element;
15
+ export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
16
+ export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
17
+ export declare const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
16
18
  export {};
@@ -1,7 +1,7 @@
1
1
  import { EmbedEvent, MessageCallback } from '../types';
2
2
  import { ViewConfig } from '../embed/ts-embed';
3
3
  export declare type EmbedEventHandlers = {
4
- [key in EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
4
+ [key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
5
5
  };
6
6
  export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
7
7
  className?: string;