@thoughtspot/visual-embed-sdk 1.42.1-HE2.0 → 1.42.1-HE2.0.1
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.
- package/cjs/package.json +2 -2
- package/cjs/src/embed/conversation.d.ts +2 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -0
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -2
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -0
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +2 -0
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +4 -0
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts +2 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +4 -0
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +2 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -0
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +12 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/types.d.ts +10 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +9 -0
- package/cjs/src/types.js.map +1 -1
- package/dist/index-BFdRRz03.js +7371 -0
- package/dist/src/embed/conversation.d.ts +2 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +2 -0
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +2 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +2 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +10 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +66 -21
- package/dist/tsembed-react.js +65 -20
- package/dist/tsembed.es.js +66 -21
- package/dist/tsembed.js +65 -20
- package/dist/visual-embed-sdk-react-full.d.ts +39 -2
- package/dist/visual-embed-sdk-react.d.ts +39 -2
- package/dist/visual-embed-sdk.d.ts +39 -2
- package/lib/package.json +2 -2
- package/lib/src/embed/conversation.d.ts +2 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +4 -0
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +5 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +6 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -0
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/sage.d.ts +2 -0
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +4 -0
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +2 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +4 -0
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +2 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +4 -0
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +12 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/types.d.ts +10 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +9 -0
- package/lib/src/types.js.map +1 -1
- package/package.json +2 -2
- package/src/embed/conversation.ts +7 -0
- package/src/embed/hostEventClient/contracts.ts +6 -1
- package/src/embed/liveboard.ts +6 -0
- package/src/embed/sage.ts +6 -0
- package/src/embed/search-bar.tsx +6 -0
- package/src/embed/search.ts +7 -0
- package/src/embed/ts-embed.ts +14 -0
- package/src/types.ts +10 -0
package/src/embed/sage.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { PageContextOptions } from 'visual-embed-sdk';
|
|
9
10
|
import { DOMSelector, Param, BaseViewConfig, SearchLiveboardCommonViewConfig } from '../types';
|
|
10
11
|
import { getQueryParamString } from '../utils';
|
|
11
12
|
import { V1Embed } from './ts-embed';
|
|
@@ -229,4 +230,9 @@ export class SageEmbed extends V1Embed {
|
|
|
229
230
|
|
|
230
231
|
return this;
|
|
231
232
|
}
|
|
233
|
+
|
|
234
|
+
public async getCurrentContext(): Promise<PageContextOptions> {
|
|
235
|
+
const context = await super.getCurrentContext();
|
|
236
|
+
return context;
|
|
237
|
+
}
|
|
232
238
|
}
|
package/src/embed/search-bar.tsx
CHANGED
|
@@ -2,6 +2,7 @@ import { SearchLiveboardCommonViewConfig, BaseViewConfig, DefaultAppInitData, Pa
|
|
|
2
2
|
import { getQueryParamString } from '../utils';
|
|
3
3
|
import { TsEmbed } from './ts-embed';
|
|
4
4
|
import { SearchOptions } from './search';
|
|
5
|
+
import { PageContextOptions } from 'visual-embed-sdk';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @group Embed components
|
|
@@ -198,4 +199,9 @@ export class SearchBarEmbed extends TsEmbed {
|
|
|
198
199
|
const defaultAppInitData = await super.getAppInitData();
|
|
199
200
|
return { ...defaultAppInitData, ...this.getSearchInitData() };
|
|
200
201
|
}
|
|
202
|
+
|
|
203
|
+
public async getCurrentContext(): Promise<PageContextOptions> {
|
|
204
|
+
const context = await super.getCurrentContext();
|
|
205
|
+
return context;
|
|
206
|
+
}
|
|
201
207
|
}
|
package/src/embed/search.ts
CHANGED
|
@@ -26,6 +26,8 @@ import { ERROR_MESSAGE } from '../errors';
|
|
|
26
26
|
import { getAuthPromise } from './base';
|
|
27
27
|
import { getReleaseVersion } from '../auth';
|
|
28
28
|
import { getEmbedConfig } from './embedConfig';
|
|
29
|
+
import { PageContextOptions } from 'visual-embed-sdk';
|
|
30
|
+
import { ContextType, PageType } from './hostEventClient/contracts';
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Configuration for search options.
|
|
@@ -536,4 +538,9 @@ export class SearchEmbed extends TsEmbed {
|
|
|
536
538
|
});
|
|
537
539
|
return this;
|
|
538
540
|
}
|
|
541
|
+
|
|
542
|
+
public async getCurrentContext(): Promise<PageContextOptions> {
|
|
543
|
+
const context = await super.getCurrentContext();
|
|
544
|
+
return context;
|
|
545
|
+
}
|
|
539
546
|
}
|
package/src/embed/ts-embed.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
UIPassthroughArrayResponse,
|
|
17
17
|
UIPassthroughEvent,
|
|
18
18
|
UIPassthroughRequest,
|
|
19
|
+
PageType,
|
|
19
20
|
} from './hostEventClient/contracts';
|
|
20
21
|
import { logger } from '../utils/logger';
|
|
21
22
|
import { getAuthenticationToken } from '../authToken';
|
|
@@ -72,6 +73,7 @@ import { getEmbedConfig } from './embedConfig';
|
|
|
72
73
|
import { ERROR_MESSAGE } from '../errors';
|
|
73
74
|
import { getPreauthInfo } from '../utils/sessionInfoService';
|
|
74
75
|
import { HostEventClient } from './hostEventClient/host-event-client';
|
|
76
|
+
import { PageContextOptions } from '../../visual-embed-sdk';
|
|
75
77
|
|
|
76
78
|
const { version } = pkgInfo;
|
|
77
79
|
|
|
@@ -1338,6 +1340,18 @@ export class TsEmbed {
|
|
|
1338
1340
|
return this.render();
|
|
1339
1341
|
}
|
|
1340
1342
|
|
|
1343
|
+
public async getCurrentContext(): Promise<any> {
|
|
1344
|
+
this.executeAfterEmbedContainerLoaded(async () => {
|
|
1345
|
+
const context = await this.trigger(HostEvent.GetPageContext, {});
|
|
1346
|
+
return context;
|
|
1347
|
+
});
|
|
1348
|
+
return {
|
|
1349
|
+
page: ContextType.Default,
|
|
1350
|
+
pageType: PageType.PAGE,
|
|
1351
|
+
objectIds: {},
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1341
1355
|
/**
|
|
1342
1356
|
* Creates the preRender shell
|
|
1343
1357
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
package/src/types.ts
CHANGED
|
@@ -4257,6 +4257,16 @@ export enum HostEvent {
|
|
|
4257
4257
|
* ```
|
|
4258
4258
|
*/
|
|
4259
4259
|
UpdateEmbedParams = 'updateEmbedParams',
|
|
4260
|
+
|
|
4261
|
+
/**
|
|
4262
|
+
* @hidden
|
|
4263
|
+
* Triggers the get of the page context.
|
|
4264
|
+
* @example
|
|
4265
|
+
* ```js
|
|
4266
|
+
* liveboardEmbed.trigger(HostEvent.GetPageContext);
|
|
4267
|
+
* ```
|
|
4268
|
+
*/
|
|
4269
|
+
GetPageContext = 'GetPageContext',
|
|
4260
4270
|
}
|
|
4261
4271
|
|
|
4262
4272
|
/**
|