@thoughtspot/visual-embed-sdk 1.9.1 → 1.10.0-alpha.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/CHANGELOG.md +32 -0
- package/README.md +50 -20
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts +7 -0
- package/dist/src/embed/search.d.ts +0 -4
- package/dist/src/react/index.d.ts +7 -5
- package/dist/src/react/util.d.ts +1 -1
- package/dist/src/types.d.ts +23 -4
- package/dist/tsembed.es.js +23 -5
- package/dist/tsembed.js +23 -5
- package/lib/package.json +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/liveboard.d.ts +7 -0
- package/lib/src/embed/liveboard.js +4 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -4
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.js +3 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts +7 -5
- package/lib/src/react/index.js +10 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +36 -6
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +1 -1
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/types.d.ts +23 -4
- package/lib/src/types.js +13 -1
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +31 -9
- package/package.json +1 -1
- package/src/embed/base.ts +1 -1
- package/src/embed/liveboard.spec.ts +13 -0
- package/src/embed/liveboard.ts +11 -0
- package/src/embed/search.ts +0 -5
- package/src/embed/ts-embed.ts +5 -1
- package/src/react/index.spec.tsx +52 -5
- package/src/react/index.tsx +39 -22
- package/src/react/util.ts +2 -1
- package/src/types.ts +21 -1
- package/dist/src/embed/pinboard.d.ts +0 -91
- package/dist/src/utils/plugin.d.ts +0 -0
- package/dist/src/v1/api.d.ts +0 -19
- package/lib/src/embed/pinboard.d.ts +0 -91
- package/lib/src/embed/pinboard.js +0 -110
- package/lib/src/embed/pinboard.js.map +0 -1
- package/lib/src/utils/plugin.d.ts +0 -0
- package/lib/src/utils/plugin.js +0 -1
- package/lib/src/utils/plugin.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
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
|
+
|
|
12
|
+
## 1.9.2 (03-17-2022)
|
|
13
|
+
|
|
14
|
+
### New Features
|
|
15
|
+
- Ability to trigger events on React components
|
|
16
|
+
- Added new `useEmbedRef` hook, check README for usage.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Typings for `on*` event handlers for React components
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## 1.9.1 (03-15-2022)
|
|
24
|
+
|
|
25
|
+
### New Features
|
|
26
|
+
|
|
27
|
+
- `visibleVizs` option in the `LiveboardEmbed`
|
|
28
|
+
- `LiveboardRendered` new `EmbedEvent` emitted when a liveboard completes rendering.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## 1.9.0
|
|
32
|
+
|
|
33
|
+
- Release to support TS version 8.1.0.cl
|
|
34
|
+
- Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
|
|
35
|
+
|
|
4
36
|
|
|
5
37
|
## 1.8.1
|
|
6
38
|
|
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
|
|
7
|
+
# ThoughtSpot Visual Embed SDK [](https://coveralls.io/github/ts-blink/embed-sdk?branch=main)  [](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=
|
|
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 {
|
|
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
|
-
-
|
|
47
|
-
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
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/>
|
package/dist/src/embed/base.d.ts
CHANGED
|
@@ -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
|
|
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,6 +51,13 @@ 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
|
|
@@ -44,10 +44,6 @@ export interface SearchViewConfig extends ViewConfig {
|
|
|
44
44
|
* using raw answer data.
|
|
45
45
|
*/
|
|
46
46
|
hideResults?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* If set to true, expands all the data sources panel.
|
|
49
|
-
*/
|
|
50
|
-
expandAllDataSource?: boolean;
|
|
51
47
|
/**
|
|
52
48
|
* If set to true, the Search Assist feature is enabled.
|
|
53
49
|
*/
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
15
|
-
export declare const PinboardEmbed:
|
|
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 {};
|
package/dist/src/react/util.d.ts
CHANGED
|
@@ -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;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -112,6 +112,13 @@ export interface EmbedConfig {
|
|
|
112
112
|
* @default false
|
|
113
113
|
*/
|
|
114
114
|
autoLogin?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Disable redirection to the login page when the embedded session expires
|
|
117
|
+
* This flag is typically used alongside the combination of auth modes such as {@link AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
|
|
118
|
+
* @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl
|
|
119
|
+
* @default false
|
|
120
|
+
*/
|
|
121
|
+
disableLoginRedirect?: boolean;
|
|
115
122
|
/**
|
|
116
123
|
* Calls the prefetch method internally when set to true
|
|
117
124
|
* @default false
|
|
@@ -342,7 +349,14 @@ export declare enum EmbedEvent {
|
|
|
342
349
|
* Emitted when any modal is closed in the app
|
|
343
350
|
* @version 1.6.0 or later
|
|
344
351
|
*/
|
|
345
|
-
DialogClose = "dialog-close"
|
|
352
|
+
DialogClose = "dialog-close",
|
|
353
|
+
/**
|
|
354
|
+
* Emitted when a liveboard has completed rendering,
|
|
355
|
+
* this event can be used as a hook to trigger events on the
|
|
356
|
+
* rendered liveboard
|
|
357
|
+
* @version 1.9.1 or later
|
|
358
|
+
*/
|
|
359
|
+
LiveboardRendered = "PinboardRendered"
|
|
346
360
|
}
|
|
347
361
|
/**
|
|
348
362
|
* Event types that can be triggered by the host application
|
|
@@ -417,7 +431,6 @@ export declare enum DataSourceVisualMode {
|
|
|
417
431
|
export declare enum Param {
|
|
418
432
|
DataSources = "dataSources",
|
|
419
433
|
DataSourceMode = "dataSourceMode",
|
|
420
|
-
ExpandAllDataSource = "expandAllDataSource",
|
|
421
434
|
DisableActions = "disableAction",
|
|
422
435
|
DisableActionReason = "disableHint",
|
|
423
436
|
ForceTable = "forceTable",
|
|
@@ -440,7 +453,9 @@ export declare enum Param {
|
|
|
440
453
|
ViewPortHeight = "viewPortHeight",
|
|
441
454
|
ViewPortWidth = "viewPortWidth",
|
|
442
455
|
VisibleActions = "visibleAction",
|
|
443
|
-
CustomCSSUrl = "customCssUrl"
|
|
456
|
+
CustomCSSUrl = "customCssUrl",
|
|
457
|
+
DisableLoginRedirect = "disableLoginRedirect",
|
|
458
|
+
visibleVizs = "pinboardVisibleVizs"
|
|
444
459
|
}
|
|
445
460
|
/**
|
|
446
461
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
@@ -526,7 +541,11 @@ export declare enum Action {
|
|
|
526
541
|
/**
|
|
527
542
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
528
543
|
*/
|
|
529
|
-
EditDetails = "editDetails"
|
|
544
|
+
EditDetails = "editDetails",
|
|
545
|
+
/**
|
|
546
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
547
|
+
*/
|
|
548
|
+
CreateMonitor = "createMonitor"
|
|
530
549
|
}
|
|
531
550
|
export interface SessionInterface {
|
|
532
551
|
sessionId: string;
|
package/dist/tsembed.es.js
CHANGED
|
@@ -335,6 +335,13 @@ var EmbedEvent;
|
|
|
335
335
|
* @version 1.6.0 or later
|
|
336
336
|
*/
|
|
337
337
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
338
|
+
/**
|
|
339
|
+
* Emitted when a liveboard has completed rendering,
|
|
340
|
+
* this event can be used as a hook to trigger events on the
|
|
341
|
+
* rendered liveboard
|
|
342
|
+
* @version 1.9.1 or later
|
|
343
|
+
*/
|
|
344
|
+
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
338
345
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
339
346
|
/**
|
|
340
347
|
* Event types that can be triggered by the host application
|
|
@@ -415,7 +422,6 @@ var Param;
|
|
|
415
422
|
(function (Param) {
|
|
416
423
|
Param["DataSources"] = "dataSources";
|
|
417
424
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
418
|
-
Param["ExpandAllDataSource"] = "expandAllDataSource";
|
|
419
425
|
Param["DisableActions"] = "disableAction";
|
|
420
426
|
Param["DisableActionReason"] = "disableHint";
|
|
421
427
|
Param["ForceTable"] = "forceTable";
|
|
@@ -439,6 +445,8 @@ var Param;
|
|
|
439
445
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
440
446
|
Param["VisibleActions"] = "visibleAction";
|
|
441
447
|
Param["CustomCSSUrl"] = "customCssUrl";
|
|
448
|
+
Param["DisableLoginRedirect"] = "disableLoginRedirect";
|
|
449
|
+
Param["visibleVizs"] = "pinboardVisibleVizs";
|
|
442
450
|
})(Param || (Param = {}));
|
|
443
451
|
/**
|
|
444
452
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
@@ -527,6 +535,10 @@ var Action;
|
|
|
527
535
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
528
536
|
*/
|
|
529
537
|
Action["EditDetails"] = "editDetails";
|
|
538
|
+
/**
|
|
539
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
540
|
+
*/
|
|
541
|
+
Action["CreateMonitor"] = "createMonitor";
|
|
530
542
|
})(Action || (Action = {}));
|
|
531
543
|
// eslint-disable-next-line no-shadow
|
|
532
544
|
var OperationType;
|
|
@@ -8746,7 +8758,7 @@ const prefetch = (url) => {
|
|
|
8746
8758
|
}
|
|
8747
8759
|
};
|
|
8748
8760
|
/**
|
|
8749
|
-
* Initialize the ThoughtSpot embed
|
|
8761
|
+
* Initialize the ThoughtSpot embed SDK globally and perform
|
|
8750
8762
|
* authentication if applicable.
|
|
8751
8763
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
8752
8764
|
* authentication mechanism and so on.
|
|
@@ -8900,7 +8912,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
8900
8912
|
}
|
|
8901
8913
|
}
|
|
8902
8914
|
|
|
8903
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
8915
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.10.0-alpha.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/**"];var exports={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1","mixpanel-browser":"^2.41.0"};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","@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/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","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","fs-extra":"^10.0.0",gatsby:"3.1.0","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.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","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,description:description,module:module,main:main,types:types,files:files,exports:exports,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};
|
|
8904
8916
|
|
|
8905
8917
|
/**
|
|
8906
8918
|
* Copyright (c) 2022
|
|
@@ -9063,6 +9075,9 @@ class TsEmbed {
|
|
|
9063
9075
|
queryParams[Param.ViewPortHeight] = window.innerHeight;
|
|
9064
9076
|
queryParams[Param.ViewPortWidth] = window.innerWidth;
|
|
9065
9077
|
queryParams[Param.Version] = version$1;
|
|
9078
|
+
if (this.embedConfig.disableLoginRedirect === true) {
|
|
9079
|
+
queryParams[Param.DisableLoginRedirect] = this.embedConfig.disableLoginRedirect;
|
|
9080
|
+
}
|
|
9066
9081
|
if (this.embedConfig.customCssUrl) {
|
|
9067
9082
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
9068
9083
|
}
|
|
@@ -9526,7 +9541,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
9526
9541
|
*/
|
|
9527
9542
|
getEmbedParams() {
|
|
9528
9543
|
const params = this.getBaseQueryParams();
|
|
9529
|
-
const { enableVizTransformations, fullHeight, defaultHeight, } = this.viewConfig;
|
|
9544
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, } = this.viewConfig;
|
|
9530
9545
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval ||
|
|
9531
9546
|
this.viewConfig.preventPinboardFilterRemoval;
|
|
9532
9547
|
if (fullHeight === true) {
|
|
@@ -9541,6 +9556,9 @@ class LiveboardEmbed extends V1Embed {
|
|
|
9541
9556
|
if (preventLiveboardFilterRemoval) {
|
|
9542
9557
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
9543
9558
|
}
|
|
9559
|
+
if (visibleVizs) {
|
|
9560
|
+
params[Param.visibleVizs] = visibleVizs;
|
|
9561
|
+
}
|
|
9544
9562
|
params[Param.livedBoardEmbed] = true;
|
|
9545
9563
|
const queryParams = getQueryParamString(params, true);
|
|
9546
9564
|
return queryParams;
|
|
@@ -9641,7 +9659,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
9641
9659
|
*/
|
|
9642
9660
|
getIFrameSrc(answerId, dataSources) {
|
|
9643
9661
|
var _a;
|
|
9644
|
-
const { hideResults,
|
|
9662
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
|
|
9645
9663
|
const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
|
|
9646
9664
|
const queryParams = this.getBaseQueryParams();
|
|
9647
9665
|
queryParams[Param.HideActions] = [
|
package/dist/tsembed.js
CHANGED
|
@@ -325,6 +325,13 @@
|
|
|
325
325
|
* @version 1.6.0 or later
|
|
326
326
|
*/
|
|
327
327
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
328
|
+
/**
|
|
329
|
+
* Emitted when a liveboard has completed rendering,
|
|
330
|
+
* this event can be used as a hook to trigger events on the
|
|
331
|
+
* rendered liveboard
|
|
332
|
+
* @version 1.9.1 or later
|
|
333
|
+
*/
|
|
334
|
+
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
328
335
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
329
336
|
(function (HostEvent) {
|
|
330
337
|
/**
|
|
@@ -390,7 +397,6 @@
|
|
|
390
397
|
(function (Param) {
|
|
391
398
|
Param["DataSources"] = "dataSources";
|
|
392
399
|
Param["DataSourceMode"] = "dataSourceMode";
|
|
393
|
-
Param["ExpandAllDataSource"] = "expandAllDataSource";
|
|
394
400
|
Param["DisableActions"] = "disableAction";
|
|
395
401
|
Param["DisableActionReason"] = "disableHint";
|
|
396
402
|
Param["ForceTable"] = "forceTable";
|
|
@@ -414,6 +420,8 @@
|
|
|
414
420
|
Param["ViewPortWidth"] = "viewPortWidth";
|
|
415
421
|
Param["VisibleActions"] = "visibleAction";
|
|
416
422
|
Param["CustomCSSUrl"] = "customCssUrl";
|
|
423
|
+
Param["DisableLoginRedirect"] = "disableLoginRedirect";
|
|
424
|
+
Param["visibleVizs"] = "pinboardVisibleVizs";
|
|
417
425
|
})(Param || (Param = {}));
|
|
418
426
|
(function (Action) {
|
|
419
427
|
Action["Save"] = "save";
|
|
@@ -496,6 +504,10 @@
|
|
|
496
504
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
497
505
|
*/
|
|
498
506
|
Action["EditDetails"] = "editDetails";
|
|
507
|
+
/**
|
|
508
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
509
|
+
*/
|
|
510
|
+
Action["CreateMonitor"] = "createMonitor";
|
|
499
511
|
})(exports.Action || (exports.Action = {}));
|
|
500
512
|
// eslint-disable-next-line no-shadow
|
|
501
513
|
var OperationType;
|
|
@@ -8715,7 +8727,7 @@
|
|
|
8715
8727
|
}
|
|
8716
8728
|
};
|
|
8717
8729
|
/**
|
|
8718
|
-
* Initialize the ThoughtSpot embed
|
|
8730
|
+
* Initialize the ThoughtSpot embed SDK globally and perform
|
|
8719
8731
|
* authentication if applicable.
|
|
8720
8732
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
8721
8733
|
* authentication mechanism and so on.
|
|
@@ -8869,7 +8881,7 @@
|
|
|
8869
8881
|
}
|
|
8870
8882
|
}
|
|
8871
8883
|
|
|
8872
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.
|
|
8884
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.10.0-alpha.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/**"];var exports$1={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs && npx istanbul-merge --out ./coverage/coverage.json ./coverage/docs/coverage-final.json ./coverage/sdk/coverage-final.json && npx istanbul report --include ./coverage/coverage.json --dir ./coverage lcov",posttest:"cat ./coverage/lcov.info | coveralls",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1","mixpanel-browser":"^2.41.0"};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","@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/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","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","fs-extra":"^10.0.0",gatsby:"3.1.0","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"4.1.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.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-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^4.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",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:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","url-search-params-polyfill":"^8.1.0",util:"^0.12.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","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,description:description,module:module,main:main,types:types,files:files,exports:exports$1,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};
|
|
8873
8885
|
|
|
8874
8886
|
/**
|
|
8875
8887
|
* Copyright (c) 2022
|
|
@@ -9032,6 +9044,9 @@
|
|
|
9032
9044
|
queryParams[Param.ViewPortHeight] = window.innerHeight;
|
|
9033
9045
|
queryParams[Param.ViewPortWidth] = window.innerWidth;
|
|
9034
9046
|
queryParams[Param.Version] = version$1;
|
|
9047
|
+
if (this.embedConfig.disableLoginRedirect === true) {
|
|
9048
|
+
queryParams[Param.DisableLoginRedirect] = this.embedConfig.disableLoginRedirect;
|
|
9049
|
+
}
|
|
9035
9050
|
if (this.embedConfig.customCssUrl) {
|
|
9036
9051
|
queryParams[Param.CustomCSSUrl] = this.embedConfig.customCssUrl;
|
|
9037
9052
|
}
|
|
@@ -9490,7 +9505,7 @@
|
|
|
9490
9505
|
*/
|
|
9491
9506
|
getEmbedParams() {
|
|
9492
9507
|
const params = this.getBaseQueryParams();
|
|
9493
|
-
const { enableVizTransformations, fullHeight, defaultHeight, } = this.viewConfig;
|
|
9508
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, } = this.viewConfig;
|
|
9494
9509
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval ||
|
|
9495
9510
|
this.viewConfig.preventPinboardFilterRemoval;
|
|
9496
9511
|
if (fullHeight === true) {
|
|
@@ -9505,6 +9520,9 @@
|
|
|
9505
9520
|
if (preventLiveboardFilterRemoval) {
|
|
9506
9521
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
9507
9522
|
}
|
|
9523
|
+
if (visibleVizs) {
|
|
9524
|
+
params[Param.visibleVizs] = visibleVizs;
|
|
9525
|
+
}
|
|
9508
9526
|
params[Param.livedBoardEmbed] = true;
|
|
9509
9527
|
const queryParams = getQueryParamString(params, true);
|
|
9510
9528
|
return queryParams;
|
|
@@ -9605,7 +9623,7 @@
|
|
|
9605
9623
|
*/
|
|
9606
9624
|
getIFrameSrc(answerId, dataSources) {
|
|
9607
9625
|
var _a;
|
|
9608
|
-
const { hideResults,
|
|
9626
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
|
|
9609
9627
|
const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
|
|
9610
9628
|
const queryParams = this.getBaseQueryParams();
|
|
9611
9629
|
queryParams[Param.HideActions] = [
|
package/lib/package.json
CHANGED
package/lib/src/embed/base.d.ts
CHANGED
|
@@ -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
|
|
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.
|
package/lib/src/embed/base.js
CHANGED
|
@@ -45,7 +45,7 @@ export const prefetch = (url) => {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
* Initialize the ThoughtSpot embed
|
|
48
|
+
* Initialize the ThoughtSpot embed SDK globally and perform
|
|
49
49
|
* authentication if applicable.
|
|
50
50
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
51
51
|
* authentication mechanism and so on.
|
|
@@ -51,6 +51,13 @@ 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
|
|
@@ -45,7 +45,7 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
45
45
|
*/
|
|
46
46
|
getEmbedParams() {
|
|
47
47
|
const params = this.getBaseQueryParams();
|
|
48
|
-
const { enableVizTransformations, fullHeight, defaultHeight, } = this.viewConfig;
|
|
48
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, } = this.viewConfig;
|
|
49
49
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval ||
|
|
50
50
|
this.viewConfig.preventPinboardFilterRemoval;
|
|
51
51
|
if (fullHeight === true) {
|
|
@@ -60,6 +60,9 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
60
60
|
if (preventLiveboardFilterRemoval) {
|
|
61
61
|
params[Param.preventLiveboardFilterRemoval] = true;
|
|
62
62
|
}
|
|
63
|
+
if (visibleVizs) {
|
|
64
|
+
params[Param.visibleVizs] = visibleVizs;
|
|
65
|
+
}
|
|
63
66
|
params[Param.livedBoardEmbed] = true;
|
|
64
67
|
const queryParams = getQueryParamString(params, true);
|
|
65
68
|
return queryParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveboard.js","sourceRoot":"","sources":["../../../src/embed/liveboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACH,UAAU,EAEV,KAAK,GAIR,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAc,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"liveboard.js","sourceRoot":"","sources":["../../../src/embed/liveboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -155,5 +155,16 @@ describe('Liveboard/viz embed tests', () => {
|
|
|
155
155
|
expect(onSpy).toHaveBeenCalledWith(EmbedEvent.EmbedHeight, expect.anything());
|
|
156
156
|
});
|
|
157
157
|
});
|
|
158
|
+
test('Should set the visible vizs', async () => {
|
|
159
|
+
const liveboardEmbed = new LiveboardEmbed(getRootEl(), {
|
|
160
|
+
...defaultViewConfig,
|
|
161
|
+
liveboardId,
|
|
162
|
+
visibleVizs: ['abcd', 'pqrs'],
|
|
163
|
+
});
|
|
164
|
+
liveboardEmbed.render();
|
|
165
|
+
await executeAfterWait(() => {
|
|
166
|
+
expect(getIFrameSrc()).toBe(`http://${thoughtSpotHost}/?embedApp=true${defaultParams}&pinboardVisibleVizs=[%22abcd%22,%22pqrs%22]${prefixParams}#/embed/viz/${liveboardId}`);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
158
169
|
});
|
|
159
170
|
//# sourceMappingURL=liveboard.spec.js.map
|