@thoughtspot/visual-embed-sdk 1.28.5 → 1.29.0-addfilter.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/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts +1 -1
- package/cjs/src/authToken.js +1 -1
- package/cjs/src/embed/app.d.ts +58 -7
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +40 -4
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +11 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -6
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +8 -2
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/search.d.ts +56 -5
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +41 -5
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +11 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +14 -8
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +9 -18
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +1 -13
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +58 -31
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +44 -20
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/answerService/answerService.d.ts +34 -0
- package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService/answerService.js +142 -0
- package/cjs/src/utils/answerService/answerService.js.map +1 -0
- package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
- package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService/answerService.spec.js +1 -0
- package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
- package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
- package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
- package/cjs/src/utils/answerService/graphql-queries.js +123 -0
- package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
- package/cjs/src/utils/answerService.d.ts +10 -0
- package/cjs/src/utils/answerService.d.ts.map +1 -0
- package/cjs/src/utils/answerService.js +61 -0
- package/cjs/src/utils/answerService.js.map +1 -0
- package/cjs/src/utils/answerService.spec.d.ts +2 -0
- package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
- package/cjs/src/utils/answerService.spec.js +31 -0
- package/cjs/src/utils/answerService.spec.js.map +1 -0
- package/cjs/src/utils/authService.d.ts +37 -0
- package/cjs/src/utils/authService.d.ts.map +1 -0
- package/cjs/src/utils/authService.js +106 -0
- package/cjs/src/utils/authService.js.map +1 -0
- package/cjs/src/utils/authService.spec.d.ts +2 -0
- package/cjs/src/utils/authService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService.spec.js +72 -0
- package/cjs/src/utils/authService.spec.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
- package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js +57 -1
- package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +39 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +70 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.spec.js +78 -0
- package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
- package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
- package/cjs/src/utils/processData.js +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils.d.ts +2 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +19 -2
- package/cjs/src/utils.js.map +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +1 -1
- package/dist/src/embed/app.d.ts +58 -7
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +8 -2
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +56 -5
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +58 -31
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +10 -0
- package/dist/src/utils/answerService.d.ts.map +1 -0
- package/dist/src/utils/answerService.spec.d.ts +2 -0
- package/dist/src/utils/answerService.spec.d.ts.map +1 -0
- package/dist/src/utils/authService.d.ts +37 -0
- package/dist/src/utils/authService.d.ts.map +1 -0
- package/dist/src/utils/authService.spec.d.ts +2 -0
- package/dist/src/utils/authService.spec.d.ts.map +1 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
- package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +39 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils.d.ts +2 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +7164 -6922
- package/dist/tsembed-react.js +7204 -6962
- package/dist/tsembed.es.js +7427 -7185
- package/dist/tsembed.js +15698 -15456
- package/dist/visual-embed-sdk-react-full.d.ts +216 -44
- package/dist/visual-embed-sdk-react.d.ts +216 -44
- package/dist/visual-embed-sdk.d.ts +216 -44
- package/lib/package.json +1 -1
- package/lib/src/.index.d.ts.swp +0 -0
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +3 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts +1 -1
- package/lib/src/authToken.js +1 -1
- package/lib/src/embed/app.d.ts +58 -7
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +39 -3
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +12 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +5 -5
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +8 -2
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/search.d.ts +56 -5
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +41 -5
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +12 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +17 -11
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +9 -18
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +1 -13
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +58 -31
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +44 -20
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService/answerService.d.ts +34 -0
- package/lib/src/utils/answerService/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService/answerService.js +137 -0
- package/lib/src/utils/answerService/answerService.js.map +1 -0
- package/lib/src/utils/answerService/answerService.spec.d.ts +1 -0
- package/lib/src/utils/answerService/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService/answerService.spec.js +1 -0
- package/lib/src/utils/answerService/answerService.spec.js.map +1 -0
- package/lib/src/utils/answerService/graphql-queries.d.ts +6 -0
- package/lib/src/utils/answerService/graphql-queries.d.ts.map +1 -0
- package/lib/src/utils/answerService/graphql-queries.js +120 -0
- package/lib/src/utils/answerService/graphql-queries.js.map +1 -0
- package/lib/src/utils/answerService.d.ts +10 -0
- package/lib/src/utils/answerService.d.ts.map +1 -0
- package/lib/src/utils/answerService.js +57 -0
- package/lib/src/utils/answerService.js.map +1 -0
- package/lib/src/utils/answerService.spec.d.ts +2 -0
- package/lib/src/utils/answerService.spec.d.ts.map +1 -0
- package/lib/src/utils/answerService.spec.js +29 -0
- package/lib/src/utils/answerService.spec.js.map +1 -0
- package/lib/src/utils/authService/authService.spec.js +1 -1
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/utils/authService.d.ts +37 -0
- package/lib/src/utils/authService.d.ts.map +1 -0
- package/lib/src/utils/authService.js +97 -0
- package/lib/src/utils/authService.js.map +1 -0
- package/lib/src/utils/authService.spec.d.ts +2 -0
- package/lib/src/utils/authService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService.spec.js +70 -0
- package/lib/src/utils/authService.spec.js.map +1 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts +2 -0
- package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answer-queries.js +56 -0
- package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +39 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +71 -3
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.spec.js +80 -2
- package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
- package/lib/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
- package/lib/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
- package/lib/src/utils/graphql/answerService/graphql-queries.js +77 -0
- package/lib/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
- package/lib/src/utils/processData.js +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils.d.ts +2 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +17 -1
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +221 -49
- package/package.json +1 -1
- package/src/auth.ts +6 -6
- package/src/authToken.ts +1 -1
- package/src/embed/app.spec.ts +22 -1
- package/src/embed/app.ts +86 -9
- package/src/embed/base.spec.ts +3 -3
- package/src/embed/base.ts +14 -14
- package/src/embed/liveboard.ts +16 -3
- package/src/embed/search.spec.ts +20 -1
- package/src/embed/search.ts +85 -11
- package/src/embed/ts-embed.spec.ts +26 -34
- package/src/embed/ts-embed.ts +52 -41
- package/src/react/index.spec.tsx +1 -30
- package/src/types.ts +56 -30
- package/src/utils/authService/authService.spec.ts +4 -4
- package/src/utils/graphql/answerService/answer-queries.ts +58 -0
- package/src/utils/graphql/answerService/answerService.spec.ts +88 -2
- package/src/utils/graphql/answerService/answerService.ts +87 -4
- package/src/utils/processData.spec.ts +1 -1
- package/src/utils/processData.ts +1 -1
- package/src/utils.ts +21 -2
package/src/embed/search.ts
CHANGED
|
@@ -7,20 +7,24 @@
|
|
|
7
7
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { getReleaseVersion } from '../auth';
|
|
11
|
-
import { ERROR_MESSAGE } from '../errors';
|
|
12
10
|
import {
|
|
13
|
-
|
|
11
|
+
DataSourceVisualMode,
|
|
12
|
+
DOMSelector,
|
|
13
|
+
Param,
|
|
14
|
+
Action,
|
|
15
|
+
ViewConfig,
|
|
14
16
|
} from '../types';
|
|
15
17
|
import {
|
|
18
|
+
getQueryParamString,
|
|
16
19
|
checkReleaseVersionInBeta,
|
|
17
20
|
getFilterQuery,
|
|
18
|
-
getQueryParamString,
|
|
19
21
|
getRuntimeParameters,
|
|
20
22
|
} from '../utils';
|
|
23
|
+
import { TsEmbed } from './ts-embed';
|
|
24
|
+
import { ERROR_MESSAGE } from '../errors';
|
|
21
25
|
import { getAuthPromise } from './base';
|
|
26
|
+
import { getReleaseVersion } from '../auth';
|
|
22
27
|
import { getEmbedConfig } from './embedConfig';
|
|
23
|
-
import { TsEmbed } from './ts-embed';
|
|
24
28
|
|
|
25
29
|
/**
|
|
26
30
|
* Configuration for search options.
|
|
@@ -40,6 +44,25 @@ export interface SearchOptions {
|
|
|
40
44
|
executeSearch?: boolean;
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Define the initial state os column custom group accordions
|
|
49
|
+
* in data panel v2.
|
|
50
|
+
*/
|
|
51
|
+
export enum DataPanelCustomColumnGroupsAccordionState {
|
|
52
|
+
/**
|
|
53
|
+
* Expand all the accordion initially in data panel v2.
|
|
54
|
+
*/
|
|
55
|
+
EXPAND_ALL = 'EXPAND_ALL',
|
|
56
|
+
/**
|
|
57
|
+
* Collapse all the accordions initially in data panel v2.
|
|
58
|
+
*/
|
|
59
|
+
COLLAPSE_ALL = 'COLLAPSE_ALL',
|
|
60
|
+
/**
|
|
61
|
+
* Expand the first accordion and collapse the rest.
|
|
62
|
+
*/
|
|
63
|
+
EXPAND_FIRST = 'EXPAND_FIRST',
|
|
64
|
+
}
|
|
65
|
+
|
|
43
66
|
/**
|
|
44
67
|
* The configuration attributes for the embedded search view.
|
|
45
68
|
*
|
|
@@ -59,6 +82,7 @@ export interface SearchViewConfig
|
|
|
59
82
|
* but can be expanded manually.
|
|
60
83
|
*
|
|
61
84
|
* @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
85
|
+
*
|
|
62
86
|
* @example
|
|
63
87
|
* ```js
|
|
64
88
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -72,6 +96,7 @@ export interface SearchViewConfig
|
|
|
72
96
|
* Show or hide the data sources panel.
|
|
73
97
|
*
|
|
74
98
|
* @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
|
|
99
|
+
*
|
|
75
100
|
* @example
|
|
76
101
|
* ```js
|
|
77
102
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -87,6 +112,7 @@ export interface SearchViewConfig
|
|
|
87
112
|
* using raw answer data.
|
|
88
113
|
*
|
|
89
114
|
* @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
|
|
115
|
+
*
|
|
90
116
|
* @example
|
|
91
117
|
* ```js
|
|
92
118
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -96,14 +122,11 @@ export interface SearchViewConfig
|
|
|
96
122
|
* ```
|
|
97
123
|
*/
|
|
98
124
|
hideResults?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* If set to true, expands all the data sources panel.
|
|
101
|
-
*/
|
|
102
|
-
expandAllDataSource?: boolean;
|
|
103
125
|
/**
|
|
104
126
|
* If set to true, the Search Assist feature is enabled.
|
|
105
127
|
*
|
|
106
128
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
129
|
+
*
|
|
107
130
|
* @example
|
|
108
131
|
* ```js
|
|
109
132
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -118,6 +141,7 @@ export interface SearchViewConfig
|
|
|
118
141
|
* format for presenting search data.
|
|
119
142
|
*
|
|
120
143
|
* @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
144
|
+
*
|
|
121
145
|
* @example
|
|
122
146
|
* ```js
|
|
123
147
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -131,6 +155,7 @@ export interface SearchViewConfig
|
|
|
131
155
|
* Only a single data source is supported currently.
|
|
132
156
|
*
|
|
133
157
|
* @deprecated Use `dataSource` instead.
|
|
158
|
+
*
|
|
134
159
|
* @example
|
|
135
160
|
* ```js
|
|
136
161
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -144,6 +169,7 @@ export interface SearchViewConfig
|
|
|
144
169
|
* The array of data source GUIDs to set on load.
|
|
145
170
|
*
|
|
146
171
|
* @version: SDK: 1.19.0
|
|
172
|
+
*
|
|
147
173
|
* @example
|
|
148
174
|
* ```js
|
|
149
175
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -185,6 +211,7 @@ export interface SearchViewConfig
|
|
|
185
211
|
* The GUID of a saved answer to load initially.
|
|
186
212
|
*
|
|
187
213
|
* @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
214
|
+
*
|
|
188
215
|
* @example
|
|
189
216
|
* ```js
|
|
190
217
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -199,6 +226,7 @@ export interface SearchViewConfig
|
|
|
199
226
|
* The chart/table should still be visible.
|
|
200
227
|
*
|
|
201
228
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
229
|
+
*
|
|
202
230
|
* @example
|
|
203
231
|
* ```js
|
|
204
232
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -213,6 +241,7 @@ export interface SearchViewConfig
|
|
|
213
241
|
*
|
|
214
242
|
* @default false
|
|
215
243
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
244
|
+
*
|
|
216
245
|
* @example
|
|
217
246
|
* ```js
|
|
218
247
|
* const embed = new SearchEmbed('#tsEmbed', {
|
|
@@ -250,6 +279,33 @@ export interface SearchViewConfig
|
|
|
250
279
|
* ```
|
|
251
280
|
*/
|
|
252
281
|
enableCustomColumnGroups?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Flag to enable onBeforeSearchExecute Embed Event
|
|
284
|
+
*
|
|
285
|
+
* @version: SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
|
|
286
|
+
*/
|
|
287
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* This controls the initial behaviour of custom column groups accordion.
|
|
290
|
+
* It takes DataPanelCustomColumnGroupsAccordionState enum values as input.
|
|
291
|
+
* List of different enum values:-
|
|
292
|
+
* - EXPAND_ALL: Expand all the accordion initially in data panel v2.
|
|
293
|
+
* - COLLAPSE_ALL: Collapse all the accordions initially in data panel v2.
|
|
294
|
+
* - EXPAND_FIRST: Expand the first accordion and collapse the rest.
|
|
295
|
+
*
|
|
296
|
+
* @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
|
|
297
|
+
* @default DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```js
|
|
301
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
302
|
+
* ... // other options
|
|
303
|
+
* dataPanelCustomGroupsAccordionInitialState:
|
|
304
|
+
* DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
|
|
305
|
+
* });
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
308
|
+
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
253
309
|
}
|
|
254
310
|
|
|
255
311
|
export const HiddenActionItemByDefaultForSearchEmbed = [
|
|
@@ -295,7 +351,6 @@ export class SearchEmbed extends TsEmbed {
|
|
|
295
351
|
protected getEmbedParams(): string {
|
|
296
352
|
const {
|
|
297
353
|
hideResults,
|
|
298
|
-
expandAllDataSource,
|
|
299
354
|
enableSearchAssist,
|
|
300
355
|
forceTable,
|
|
301
356
|
searchOptions,
|
|
@@ -309,6 +364,9 @@ export class SearchEmbed extends TsEmbed {
|
|
|
309
364
|
runtimeParameters,
|
|
310
365
|
collapseSearchBarInitially = false,
|
|
311
366
|
enableCustomColumnGroups = false,
|
|
367
|
+
isOnBeforeGetVizDataInterceptEnabled = false,
|
|
368
|
+
/* eslint-disable-next-line max-len */
|
|
369
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL,
|
|
312
370
|
} = this.viewConfig;
|
|
313
371
|
const queryParams = this.getBaseQueryParams();
|
|
314
372
|
|
|
@@ -346,6 +404,11 @@ export class SearchEmbed extends TsEmbed {
|
|
|
346
404
|
queryParams[Param.HideSearchBar] = true;
|
|
347
405
|
}
|
|
348
406
|
|
|
407
|
+
if (isOnBeforeGetVizDataInterceptEnabled) {
|
|
408
|
+
/* eslint-disable-next-line max-len */
|
|
409
|
+
queryParams[Param.IsOnBeforeGetVizDataInterceptEnabled] = isOnBeforeGetVizDataInterceptEnabled;
|
|
410
|
+
}
|
|
411
|
+
|
|
349
412
|
queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
350
413
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
351
414
|
|
|
@@ -357,6 +420,17 @@ export class SearchEmbed extends TsEmbed {
|
|
|
357
420
|
queryParams[Param.searchEmbed] = true;
|
|
358
421
|
queryParams[Param.CollapseSearchBarInitially] = collapseSearchBarInitially;
|
|
359
422
|
queryParams[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
423
|
+
if (dataPanelCustomGroupsAccordionInitialState
|
|
424
|
+
=== DataPanelCustomColumnGroupsAccordionState.COLLAPSE_ALL
|
|
425
|
+
|| dataPanelCustomGroupsAccordionInitialState
|
|
426
|
+
=== DataPanelCustomColumnGroupsAccordionState.EXPAND_FIRST
|
|
427
|
+
) {
|
|
428
|
+
/* eslint-disable-next-line max-len */
|
|
429
|
+
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = dataPanelCustomGroupsAccordionInitialState;
|
|
430
|
+
} else {
|
|
431
|
+
/* eslint-disable-next-line max-len */
|
|
432
|
+
queryParams[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL;
|
|
433
|
+
}
|
|
360
434
|
let query = '';
|
|
361
435
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
362
436
|
if (queryParamsString) {
|
|
@@ -402,7 +476,7 @@ export class SearchEmbed extends TsEmbed {
|
|
|
402
476
|
checkReleaseVersionInBeta(
|
|
403
477
|
getReleaseVersion(),
|
|
404
478
|
getEmbedConfig().suppressSearchEmbedBetaWarning
|
|
405
|
-
|
|
479
|
+
|| getEmbedConfig().suppressErrorAlerts,
|
|
406
480
|
)
|
|
407
481
|
) {
|
|
408
482
|
alert(ERROR_MESSAGE.SEARCHEMBED_BETA_WRANING_MESSAGE);
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
/* eslint-disable dot-notation */
|
|
2
|
-
import * as authInstance from '../auth';
|
|
3
2
|
import { resetCachedAuthToken } from '../authToken';
|
|
4
|
-
import * as config from '../config';
|
|
5
3
|
import {
|
|
6
|
-
AppEmbed,
|
|
7
4
|
AuthType,
|
|
5
|
+
init,
|
|
8
6
|
EmbedEvent,
|
|
9
|
-
LiveboardEmbed,
|
|
10
|
-
LiveboardViewConfig,
|
|
11
|
-
PinboardEmbed,
|
|
12
7
|
SearchEmbed,
|
|
13
|
-
|
|
8
|
+
PinboardEmbed,
|
|
9
|
+
LiveboardViewConfig,
|
|
10
|
+
AppEmbed,
|
|
11
|
+
LiveboardEmbed,
|
|
14
12
|
} from '../index';
|
|
15
|
-
import * as mixpanelInstance from '../mixpanel-service';
|
|
16
|
-
import { MIXPANEL_EVENT } from '../mixpanel-service';
|
|
17
13
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
Action, HomeLeftNavItem, RuntimeFilter, RuntimeFilterOp, HomepageModule, HostEvent,
|
|
15
|
+
} from '../types';
|
|
16
|
+
import {
|
|
20
17
|
executeAfterWait,
|
|
21
|
-
expectUrlMatchesWithParams,
|
|
22
18
|
getDocumentBody,
|
|
23
19
|
getIFrameEl,
|
|
24
20
|
getIFrameSrc,
|
|
25
21
|
getRootEl,
|
|
26
|
-
mockMessageChannel,
|
|
27
22
|
postMessageToParent,
|
|
23
|
+
defaultParamsForPinboardEmbed,
|
|
28
24
|
waitFor,
|
|
25
|
+
expectUrlMatchesWithParams,
|
|
26
|
+
mockMessageChannel,
|
|
27
|
+
createRootEleForEmbed,
|
|
29
28
|
} from '../test/test-utils';
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
import * as config from '../config';
|
|
30
|
+
import * as tsEmbedInstance from './ts-embed';
|
|
31
|
+
import * as mixpanelInstance from '../mixpanel-service';
|
|
32
|
+
import * as authInstance from '../auth';
|
|
33
|
+
import * as baseInstance from './base';
|
|
34
|
+
import { MIXPANEL_EVENT } from '../mixpanel-service';
|
|
33
35
|
import * as authService from '../utils/authService/authService';
|
|
34
36
|
import { logger } from '../utils/logger';
|
|
35
|
-
import * as baseInstance from './base';
|
|
36
|
-
import * as tsEmbedInstance from './ts-embed';
|
|
37
37
|
|
|
38
38
|
const defaultViewConfig = {
|
|
39
39
|
frameParams: {
|
|
@@ -417,10 +417,8 @@ describe('Unit test case for ts embed', () => {
|
|
|
417
417
|
authToken: '',
|
|
418
418
|
hostConfig: undefined,
|
|
419
419
|
runtimeFilterParams: null,
|
|
420
|
-
hiddenHomeLeftNavItems:
|
|
421
|
-
HomeLeftNavItem.Home,
|
|
422
|
-
HomeLeftNavItem.MonitorSubscription,
|
|
423
|
-
],
|
|
420
|
+
hiddenHomeLeftNavItems:
|
|
421
|
+
[HomeLeftNavItem.Home, HomeLeftNavItem.MonitorSubscription],
|
|
424
422
|
hiddenHomepageModules: [],
|
|
425
423
|
reorderedHomepageModules: [],
|
|
426
424
|
},
|
|
@@ -649,10 +647,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
649
647
|
type: EmbedEvent.APP_INIT,
|
|
650
648
|
data: {},
|
|
651
649
|
};
|
|
652
|
-
const searchEmbed = new SearchEmbed(getRootEl(), {
|
|
653
|
-
...defaultViewConfig,
|
|
654
|
-
preRenderId: 'test',
|
|
655
|
-
});
|
|
650
|
+
const searchEmbed = new SearchEmbed(getRootEl(), { ...defaultViewConfig, preRenderId: 'test' });
|
|
656
651
|
searchEmbed.preRender();
|
|
657
652
|
const mockPort: any = {
|
|
658
653
|
postMessage: jest.fn(),
|
|
@@ -709,10 +704,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
709
704
|
type: EmbedEvent.AuthExpire,
|
|
710
705
|
data: {},
|
|
711
706
|
};
|
|
712
|
-
const searchEmbed = new SearchEmbed(getRootEl(), {
|
|
713
|
-
...defaultViewConfig,
|
|
714
|
-
preRenderId: 'test',
|
|
715
|
-
});
|
|
707
|
+
const searchEmbed = new SearchEmbed(getRootEl(), { ...defaultViewConfig, preRenderId: 'test' });
|
|
716
708
|
jest.spyOn(baseInstance, 'notifyAuthFailure');
|
|
717
709
|
searchEmbed.preRender();
|
|
718
710
|
const mockPort: any = {
|
|
@@ -1216,7 +1208,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
1216
1208
|
expectUrlMatchesWithParams(
|
|
1217
1209
|
getIFrameSrc(),
|
|
1218
1210
|
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}`
|
|
1219
|
-
|
|
1211
|
+
+ `&foo=bar&baz=1&bool=true${defaultParamsPost}#/home`,
|
|
1220
1212
|
);
|
|
1221
1213
|
});
|
|
1222
1214
|
|
|
@@ -1232,7 +1224,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
1232
1224
|
expectUrlMatchesWithParams(
|
|
1233
1225
|
getIFrameSrc(),
|
|
1234
1226
|
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}`
|
|
1235
|
-
|
|
1227
|
+
+ `&showAlerts=true${defaultParamsPost}#/home`,
|
|
1236
1228
|
);
|
|
1237
1229
|
});
|
|
1238
1230
|
it('Sets the locale param', async () => {
|
|
@@ -1247,7 +1239,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
1247
1239
|
expectUrlMatchesWithParams(
|
|
1248
1240
|
getIFrameSrc(),
|
|
1249
1241
|
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}`
|
|
1250
|
-
|
|
1242
|
+
+ `&locale=ja-JP${defaultParamsPost}#/home`,
|
|
1251
1243
|
);
|
|
1252
1244
|
});
|
|
1253
1245
|
it('Sets the iconSprite url', async () => {
|
|
@@ -1264,7 +1256,7 @@ describe('Unit test case for ts embed', () => {
|
|
|
1264
1256
|
expectUrlMatchesWithParams(
|
|
1265
1257
|
getIFrameSrc(),
|
|
1266
1258
|
`http://${thoughtSpotHost}/?embedApp=true&primaryNavHidden=true&profileAndHelpInNavBarHidden=false&${defaultParamsForPinboardEmbed}`
|
|
1267
|
-
|
|
1259
|
+
+ `&iconSprite=iconSprite.com${defaultParamsPost}#/home`,
|
|
1268
1260
|
);
|
|
1269
1261
|
});
|
|
1270
1262
|
|
package/src/embed/ts-embed.ts
CHANGED
|
@@ -8,54 +8,57 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import isEqual from 'lodash/isEqual';
|
|
11
|
-
import
|
|
12
|
-
import { AuthFailureType } from '../auth';
|
|
11
|
+
import { logger } from '../utils/logger';
|
|
13
12
|
import { getAuthenticationToken } from '../authToken';
|
|
13
|
+
import { AnswerService } from '../utils/graphql/answerService/answerService';
|
|
14
|
+
import {
|
|
15
|
+
getEncodedQueryParamsString,
|
|
16
|
+
getCssDimension,
|
|
17
|
+
getOffsetTop,
|
|
18
|
+
embedEventStatus,
|
|
19
|
+
setAttributes,
|
|
20
|
+
getCustomisations,
|
|
21
|
+
getRuntimeFilters,
|
|
22
|
+
getDOMNode,
|
|
23
|
+
getFilterQuery,
|
|
24
|
+
getQueryParamString,
|
|
25
|
+
getRuntimeParameters,
|
|
26
|
+
setStyleProperties,
|
|
27
|
+
removeStyleProperties,
|
|
28
|
+
isUndefined,
|
|
29
|
+
} from '../utils';
|
|
14
30
|
import {
|
|
15
|
-
DEFAULT_EMBED_HEIGHT,
|
|
16
|
-
DEFAULT_EMBED_WIDTH,
|
|
17
|
-
URL_MAX_LENGTH,
|
|
18
31
|
getThoughtSpotHost,
|
|
32
|
+
URL_MAX_LENGTH,
|
|
33
|
+
DEFAULT_EMBED_WIDTH,
|
|
34
|
+
DEFAULT_EMBED_HEIGHT,
|
|
19
35
|
getV2BasePath,
|
|
20
36
|
} from '../config';
|
|
21
|
-
import { MIXPANEL_EVENT, uploadMixpanelEvent } from '../mixpanel-service';
|
|
22
37
|
import {
|
|
23
|
-
Action,
|
|
24
38
|
AuthType,
|
|
25
|
-
ContextMenuTriggerOptions,
|
|
26
39
|
DOMSelector,
|
|
27
|
-
EmbedConfig,
|
|
28
|
-
EmbedEvent,
|
|
29
40
|
HostEvent,
|
|
41
|
+
EmbedEvent,
|
|
30
42
|
MessageCallback,
|
|
31
|
-
|
|
32
|
-
MessageOptions,
|
|
43
|
+
Action,
|
|
33
44
|
Param,
|
|
45
|
+
EmbedConfig,
|
|
46
|
+
MessageOptions,
|
|
47
|
+
MessagePayload,
|
|
48
|
+
MessageCallbackObj,
|
|
34
49
|
ViewConfig,
|
|
50
|
+
FrameParams,
|
|
51
|
+
ContextMenuTriggerOptions,
|
|
52
|
+
RuntimeFilter,
|
|
35
53
|
} from '../types';
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
getCssDimension,
|
|
39
|
-
getCustomisations,
|
|
40
|
-
getDOMNode,
|
|
41
|
-
getEncodedQueryParamsString,
|
|
42
|
-
getFilterQuery,
|
|
43
|
-
getOffsetTop,
|
|
44
|
-
getQueryParamString,
|
|
45
|
-
getRuntimeFilters,
|
|
46
|
-
getRuntimeParameters,
|
|
47
|
-
isUndefined,
|
|
48
|
-
removeStyleProperties,
|
|
49
|
-
setAttributes,
|
|
50
|
-
setStyleProperties,
|
|
51
|
-
} from '../utils';
|
|
52
|
-
import { AnswerService } from '../utils/graphql/answerService/answerService';
|
|
53
|
-
import { logger } from '../utils/logger';
|
|
54
|
-
import { processAuthFailure, processEventData } from '../utils/processData';
|
|
54
|
+
import { uploadMixpanelEvent, MIXPANEL_EVENT } from '../mixpanel-service';
|
|
55
|
+
import { processEventData, processAuthFailure } from '../utils/processData';
|
|
55
56
|
import { processTrigger } from '../utils/processTrigger';
|
|
57
|
+
import pkgInfo from '../../package.json';
|
|
56
58
|
import {
|
|
57
|
-
getAuthPromise, handleAuth, notifyAuthFailure,
|
|
59
|
+
getAuthPromise, renderInQueue, handleAuth, notifyAuthFailure,
|
|
58
60
|
} from './base';
|
|
61
|
+
import { AuthFailureType } from '../auth';
|
|
59
62
|
import { getEmbedConfig } from './embedConfig';
|
|
60
63
|
|
|
61
64
|
const { version } = pkgInfo;
|
|
@@ -562,7 +565,8 @@ export class TsEmbed {
|
|
|
562
565
|
|
|
563
566
|
const {
|
|
564
567
|
height: frameHeight,
|
|
565
|
-
width: frameWidth,
|
|
568
|
+
width: frameWidth,
|
|
569
|
+
...restParams
|
|
566
570
|
} = this.viewConfig.frameParams || {};
|
|
567
571
|
const width = getCssDimension(frameWidth || DEFAULT_EMBED_WIDTH);
|
|
568
572
|
const height = getCssDimension(frameHeight || DEFAULT_EMBED_HEIGHT);
|
|
@@ -593,6 +597,7 @@ export class TsEmbed {
|
|
|
593
597
|
* @param url - The URL of the embedded ThoughtSpot app.
|
|
594
598
|
*/
|
|
595
599
|
protected async renderIFrame(url: string): Promise<any> {
|
|
600
|
+
console.log('here 7');
|
|
596
601
|
if (this.isError) {
|
|
597
602
|
return null;
|
|
598
603
|
}
|
|
@@ -602,8 +607,10 @@ export class TsEmbed {
|
|
|
602
607
|
if (url.length > URL_MAX_LENGTH) {
|
|
603
608
|
// warn: The URL is too long
|
|
604
609
|
}
|
|
610
|
+
console.log('here 8');
|
|
605
611
|
|
|
606
612
|
return renderInQueue((nextInQueue) => {
|
|
613
|
+
console.log('here 6');
|
|
607
614
|
const initTimestamp = Date.now();
|
|
608
615
|
|
|
609
616
|
this.executeCallbacks(EmbedEvent.Init, {
|
|
@@ -616,6 +623,7 @@ export class TsEmbed {
|
|
|
616
623
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_START);
|
|
617
624
|
return getAuthPromise()
|
|
618
625
|
?.then((isLoggedIn: boolean) => {
|
|
626
|
+
console.log('here 9', isLoggedIn);
|
|
619
627
|
if (!isLoggedIn) {
|
|
620
628
|
this.handleInsertionIntoDOM(this.embedConfig.loginFailedMessage);
|
|
621
629
|
return;
|
|
@@ -640,7 +648,9 @@ export class TsEmbed {
|
|
|
640
648
|
this.iFrame.addEventListener('error', () => {
|
|
641
649
|
nextInQueue();
|
|
642
650
|
});
|
|
651
|
+
console.log('here 10', this.iFrame);
|
|
643
652
|
this.handleInsertionIntoDOM(this.iFrame);
|
|
653
|
+
console.log('here 11', document.body.innerHTML);
|
|
644
654
|
const prefetchIframe = document.querySelectorAll('.prefetchIframe');
|
|
645
655
|
if (prefetchIframe.length) {
|
|
646
656
|
prefetchIframe.forEach((el) => {
|
|
@@ -684,7 +694,7 @@ export class TsEmbed {
|
|
|
684
694
|
protected connectPreRendered(): boolean {
|
|
685
695
|
const preRenderIds = this.getPreRenderIds();
|
|
686
696
|
this.preRenderWrapper = this.preRenderWrapper
|
|
687
|
-
|
|
697
|
+
|| document.getElementById(preRenderIds.wrapper);
|
|
688
698
|
|
|
689
699
|
this.preRenderChild = this.preRenderChild || document.getElementById(preRenderIds.child);
|
|
690
700
|
|
|
@@ -1102,11 +1112,11 @@ export class TsEmbed {
|
|
|
1102
1112
|
) {
|
|
1103
1113
|
logger.warn(
|
|
1104
1114
|
`${viewConfig.embedComponentType || 'Component'} was pre-rendered with `
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1115
|
+
+ `"${key}" as "${JSON.stringify(preRenderedObject.viewConfig[key])}" `
|
|
1116
|
+
+ `but a different value "${JSON.stringify(viewConfig[key])}" `
|
|
1117
|
+
+ 'was passed to the Embed component. '
|
|
1118
|
+
+ 'The new value provided is ignored, the value provided during '
|
|
1119
|
+
+ 'preRender is used.',
|
|
1110
1120
|
);
|
|
1111
1121
|
}
|
|
1112
1122
|
});
|
|
@@ -1231,8 +1241,9 @@ export class TsEmbed {
|
|
|
1231
1241
|
* @version SDK: 1.25.0 / ThoughtSpot 9.10.0
|
|
1232
1242
|
*/
|
|
1233
1243
|
public async getAnswerService(vizId?: string): Promise<AnswerService> {
|
|
1234
|
-
const { session
|
|
1235
|
-
|
|
1244
|
+
const { session } = await this.trigger(HostEvent.GetAnswerSession, vizId);
|
|
1245
|
+
|
|
1246
|
+
return new AnswerService(session, null, this.embedConfig.thoughtSpotHost);
|
|
1236
1247
|
}
|
|
1237
1248
|
}
|
|
1238
1249
|
|
package/src/react/index.spec.tsx
CHANGED
|
@@ -49,7 +49,7 @@ describe('React Components', () => {
|
|
|
49
49
|
),
|
|
50
50
|
).toBe(true);
|
|
51
51
|
expect(getIFrameSrc(container)).toBe(
|
|
52
|
-
`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=false&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true&collapseSearchBarInitially=false&enableCustomColumnGroups=false#/embed/answer`,
|
|
52
|
+
`http://${thoughtSpotHost}/?hostAppUrl=local-host&viewPortHeight=768&viewPortWidth=1024&sdkVersion=${version}&authType=None&blockNonEmbedFullAppAccess=true&hideAction=[%22${Action.ReportError}%22,%22editACopy%22,%22saveAsView%22,%22updateTSL%22,%22editTSL%22,%22onDeleteAnswer%22]&overrideConsoleLogs=true&clientLogLevel=ERROR&enableDataPanelV2=false&dataSourceMode=hide&useLastSelectedSources=false&isSearchEmbed=true&collapseSearchBarInitially=false&enableCustomColumnGroups=false&dataPanelCustomGroupsAccordionInitialState=EXPAND_ALL#/embed/answer`,
|
|
53
53
|
);
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -200,35 +200,6 @@ describe('React Components', () => {
|
|
|
200
200
|
).toBe(true);
|
|
201
201
|
expect(containerSibling.querySelector('div')).toBe(null);
|
|
202
202
|
});
|
|
203
|
-
|
|
204
|
-
it('Should have the correct container element', async () => {
|
|
205
|
-
const { container } = render(
|
|
206
|
-
<LiveboardEmbed liveboardId="abcd" className="def" />,
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
await waitFor(() => getIFrameEl(container));
|
|
210
|
-
expect(container.querySelector('div')).not.toBe(null);
|
|
211
|
-
expect(
|
|
212
|
-
container.querySelector('div').classList.contains('def'),
|
|
213
|
-
).toBe(true);
|
|
214
|
-
|
|
215
|
-
const { container: containerSibling } = render(
|
|
216
|
-
<LiveboardEmbed
|
|
217
|
-
liveboardId="abcd"
|
|
218
|
-
className="def"
|
|
219
|
-
insertAsSibling={true}
|
|
220
|
-
/>,
|
|
221
|
-
);
|
|
222
|
-
await waitFor(() => getIFrameEl(containerSibling));
|
|
223
|
-
expect(containerSibling.querySelector('span')).not.toBe(null);
|
|
224
|
-
expect(containerSibling.querySelector('span').style.position).toBe(
|
|
225
|
-
'absolute',
|
|
226
|
-
);
|
|
227
|
-
expect(
|
|
228
|
-
getIFrameEl(containerSibling).classList.contains('def'),
|
|
229
|
-
).toBe(true);
|
|
230
|
-
expect(containerSibling.querySelector('div')).toBe(null);
|
|
231
|
-
});
|
|
232
203
|
});
|
|
233
204
|
|
|
234
205
|
describe('SearchBarEmbed', () => {
|