@thoughtspot/visual-embed-sdk 1.6.0-alpha.3 → 1.6.0

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.
@@ -44,6 +44,10 @@ 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;
47
51
  /**
48
52
  * If set to true, the Search Assist feature is enabled.
49
53
  */
@@ -112,13 +112,13 @@ export interface EmbedConfig {
112
112
  * When there are multiple embeds, queue the render of embed to start
113
113
  * after the previous embed's render is complete. This helps in the load performance
114
114
  * by decreasing the load on the browser.
115
- * * _Version 1.5.0 or later _
115
+ * @version 1.5.0 or later
116
116
  * @default false
117
117
  */
118
118
  queueMultiRenders?: boolean;
119
119
  /**
120
120
  * Dynamic CSS Url to be injected in the loaded application.
121
- * * _Version 1.6.0 or later _
121
+ * @version 1.6.0 or later
122
122
  * @default ''
123
123
  */
124
124
  customCssUrl?: string;
@@ -266,7 +266,7 @@ export declare enum EmbedEvent {
266
266
  /**
267
267
  * A double click has been triggered on table/chart
268
268
  * @return ContextMenuInputPoints - data point that is double clicked
269
- * * _Version 1.5.0 or later _
269
+ * @version 1.5.0 or later
270
270
  */
271
271
  VizPointDoubleClick = "vizPointDoubleClick",
272
272
  /**
@@ -308,7 +308,7 @@ export declare enum EmbedEvent {
308
308
  * Emitted when the embed does not have cookie access. This
309
309
  * happens on Safari where third-party cookies are blocked by default.
310
310
  *
311
- * @version 1.1.0
311
+ * @version 1.1.0 or later
312
312
  */
313
313
  NoCookieAccess = "noCookieAccess",
314
314
  /**
@@ -319,12 +319,12 @@ export declare enum EmbedEvent {
319
319
  SAMLComplete = "samlComplete",
320
320
  /**
321
321
  * Emitted when any modal is opened in the app
322
- * * _Version 1.6.0 or later _
322
+ * @version 1.6.0 or later
323
323
  */
324
324
  DialogOpen = "dialog-open",
325
325
  /**
326
326
  * Emitted when any modal is closed in the app
327
- * * _Version 1.6.0 or later _
327
+ * @version 1.6.0 or later
328
328
  */
329
329
  DialogClose = "dialog-close"
330
330
  }
@@ -345,7 +345,7 @@ export declare enum HostEvent {
345
345
  * eg. { selectedPoints: []}
346
346
  * @param columnGuid - a string guid of the column to drill by. This is optional,
347
347
  * if not provided it will auto drill by the configured column. \
348
- * * _Version 1.5.0 or later _
348
+ * @version 1.5.0 or later
349
349
  */
350
350
  DrillDown = "triggerDrillDown",
351
351
  /**
@@ -362,7 +362,7 @@ export declare enum HostEvent {
362
362
  * Set the visible visualizations on a Liveboard.
363
363
  * @param - an array of ids of visualizations to show, the ids not passed
364
364
  * will be hidden.
365
- * * _Version 1.6.0 or later _
365
+ * @version 1.6.0 or later
366
366
  */
367
367
  SetVisibleVizs = "SetPinboardVisibleVizs"
368
368
  }
@@ -391,6 +391,7 @@ export declare enum DataSourceVisualMode {
391
391
  export declare enum Param {
392
392
  DataSources = "dataSources",
393
393
  DataSourceMode = "dataSourceMode",
394
+ ExpandAllDataSource = "expandAllDataSource",
394
395
  DisableActions = "disableAction",
395
396
  DisableActionReason = "disableHint",
396
397
  ForceTable = "forceTable",
@@ -264,7 +264,7 @@ var EmbedEvent;
264
264
  /**
265
265
  * A double click has been triggered on table/chart
266
266
  * @return ContextMenuInputPoints - data point that is double clicked
267
- * * _Version 1.5.0 or later _
267
+ * @version 1.5.0 or later
268
268
  */
269
269
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
270
270
  /**
@@ -306,7 +306,7 @@ var EmbedEvent;
306
306
  * Emitted when the embed does not have cookie access. This
307
307
  * happens on Safari where third-party cookies are blocked by default.
308
308
  *
309
- * @version 1.1.0
309
+ * @version 1.1.0 or later
310
310
  */
311
311
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
312
312
  /**
@@ -317,12 +317,12 @@ var EmbedEvent;
317
317
  EmbedEvent["SAMLComplete"] = "samlComplete";
318
318
  /**
319
319
  * Emitted when any modal is opened in the app
320
- * * _Version 1.6.0 or later _
320
+ * @version 1.6.0 or later
321
321
  */
322
322
  EmbedEvent["DialogOpen"] = "dialog-open";
323
323
  /**
324
324
  * Emitted when any modal is closed in the app
325
- * * _Version 1.6.0 or later _
325
+ * @version 1.6.0 or later
326
326
  */
327
327
  EmbedEvent["DialogClose"] = "dialog-close";
328
328
  })(EmbedEvent || (EmbedEvent = {}));
@@ -345,7 +345,7 @@ var HostEvent;
345
345
  * eg. { selectedPoints: []}
346
346
  * @param columnGuid - a string guid of the column to drill by. This is optional,
347
347
  * if not provided it will auto drill by the configured column. \
348
- * * _Version 1.5.0 or later _
348
+ * @version 1.5.0 or later
349
349
  */
350
350
  HostEvent["DrillDown"] = "triggerDrillDown";
351
351
  /**
@@ -362,7 +362,7 @@ var HostEvent;
362
362
  * Set the visible visualizations on a Liveboard.
363
363
  * @param - an array of ids of visualizations to show, the ids not passed
364
364
  * will be hidden.
365
- * * _Version 1.6.0 or later _
365
+ * @version 1.6.0 or later
366
366
  */
367
367
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
368
368
  })(HostEvent || (HostEvent = {}));
@@ -395,6 +395,7 @@ var Param;
395
395
  (function (Param) {
396
396
  Param["DataSources"] = "dataSources";
397
397
  Param["DataSourceMode"] = "dataSourceMode";
398
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
398
399
  Param["DisableActions"] = "disableAction";
399
400
  Param["DisableActionReason"] = "disableHint";
400
401
  Param["ForceTable"] = "forceTable";
@@ -8839,7 +8840,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
8839
8840
  }
8840
8841
  }
8841
8842
 
8842
- var version="1.6.0-alpha.3";
8843
+ var version="1.6.0";
8843
8844
 
8844
8845
  /**
8845
8846
  * Copyright (c) 2021
@@ -9568,7 +9569,7 @@ class SearchEmbed extends TsEmbed {
9568
9569
  * @param dataSources A list of data source GUIDs
9569
9570
  */
9570
9571
  getIFrameSrc(answerId, dataSources) {
9571
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9572
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9572
9573
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9573
9574
  const queryParams = this.getBaseQueryParams();
9574
9575
  if (dataSources && dataSources.length) {
package/dist/tsembed.js CHANGED
@@ -254,7 +254,7 @@
254
254
  /**
255
255
  * A double click has been triggered on table/chart
256
256
  * @return ContextMenuInputPoints - data point that is double clicked
257
- * * _Version 1.5.0 or later _
257
+ * @version 1.5.0 or later
258
258
  */
259
259
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
260
260
  /**
@@ -296,7 +296,7 @@
296
296
  * Emitted when the embed does not have cookie access. This
297
297
  * happens on Safari where third-party cookies are blocked by default.
298
298
  *
299
- * @version 1.1.0
299
+ * @version 1.1.0 or later
300
300
  */
301
301
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
302
302
  /**
@@ -307,12 +307,12 @@
307
307
  EmbedEvent["SAMLComplete"] = "samlComplete";
308
308
  /**
309
309
  * Emitted when any modal is opened in the app
310
- * * _Version 1.6.0 or later _
310
+ * @version 1.6.0 or later
311
311
  */
312
312
  EmbedEvent["DialogOpen"] = "dialog-open";
313
313
  /**
314
314
  * Emitted when any modal is closed in the app
315
- * * _Version 1.6.0 or later _
315
+ * @version 1.6.0 or later
316
316
  */
317
317
  EmbedEvent["DialogClose"] = "dialog-close";
318
318
  })(exports.EmbedEvent || (exports.EmbedEvent = {}));
@@ -329,7 +329,7 @@
329
329
  * eg. { selectedPoints: []}
330
330
  * @param columnGuid - a string guid of the column to drill by. This is optional,
331
331
  * if not provided it will auto drill by the configured column. \
332
- * * _Version 1.5.0 or later _
332
+ * @version 1.5.0 or later
333
333
  */
334
334
  HostEvent["DrillDown"] = "triggerDrillDown";
335
335
  /**
@@ -346,7 +346,7 @@
346
346
  * Set the visible visualizations on a Liveboard.
347
347
  * @param - an array of ids of visualizations to show, the ids not passed
348
348
  * will be hidden.
349
- * * _Version 1.6.0 or later _
349
+ * @version 1.6.0 or later
350
350
  */
351
351
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
352
352
  })(exports.HostEvent || (exports.HostEvent = {}));
@@ -373,6 +373,7 @@
373
373
  (function (Param) {
374
374
  Param["DataSources"] = "dataSources";
375
375
  Param["DataSourceMode"] = "dataSourceMode";
376
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
376
377
  Param["DisableActions"] = "disableAction";
377
378
  Param["DisableActionReason"] = "disableHint";
378
379
  Param["ForceTable"] = "forceTable";
@@ -8811,7 +8812,7 @@
8811
8812
  }
8812
8813
  }
8813
8814
 
8814
- var version="1.6.0-alpha.3";
8815
+ var version="1.6.0";
8815
8816
 
8816
8817
  /**
8817
8818
  * Copyright (c) 2021
@@ -9535,7 +9536,7 @@
9535
9536
  * @param dataSources A list of data source GUIDs
9536
9537
  */
9537
9538
  getIFrameSrc(answerId, dataSources) {
9538
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9539
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
9539
9540
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
9540
9541
  const queryParams = this.getBaseQueryParams();
9541
9542
  if (dataSources && dataSources.length) {
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.6.0-alpha.3",
3
+ "version": "1.6.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,6 +65,7 @@
65
65
  "asciidoctor": "^2.2.1",
66
66
  "babel-jest": "^26.6.3",
67
67
  "babel-preset-gatsby": "^1.10.0",
68
+ "classnames": "^2.3.1",
68
69
  "command-line-args": "^5.1.1",
69
70
  "coveralls": "^3.1.0",
70
71
  "dts-bundle": "0.7.3",
@@ -126,6 +127,9 @@
126
127
  "type": "git",
127
128
  "url": "git+https://github.com/thoughtspot/visual-embed-sdk.git"
128
129
  },
130
+ "publishConfig": {
131
+ "registry": "https://registry.npmjs.org"
132
+ },
129
133
  "keywords": [
130
134
  "thoughtspot",
131
135
  "everywhere",
@@ -44,6 +44,10 @@ 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;
47
51
  /**
48
52
  * If set to true, the Search Assist feature is enabled.
49
53
  */
@@ -40,7 +40,7 @@ export class SearchEmbed extends TsEmbed {
40
40
  * @param dataSources A list of data source GUIDs
41
41
  */
42
42
  getIFrameSrc(answerId, dataSources) {
43
- const { hideResults, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
43
+ const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, } = this.viewConfig;
44
44
  const answerPath = answerId ? `saved-answer/${answerId}` : 'answer';
45
45
  const queryParams = this.getBaseQueryParams();
46
46
  if (dataSources && dataSources.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/embed/search.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAe,KAAK,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAc,OAAO,EAAE,MAAM,YAAY,CAAC;AAoEjD;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAO;IAMpC,YAAY,WAAwB,EAAE,UAA4B;QAC9D,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED;;;OAGG;IACK,iBAAiB;QACrB,IAAI,cAAc,GAAG,oBAAoB,CAAC,QAAQ,CAAC;QACnD,IAAI,I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I,UAAU,EAAE;YACZ,WAAW,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;SACxC;QAED,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC7D,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,GAAG,KAAK,CAAC;QACrD,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,iBAAiB,EAAE;YACnB,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;SACnC;QAED,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,UAAU,EAAE,CAAC;IAC3D,CAAC;IAED;;OAEG;IACI,MAAM;QACT,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAElD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QACrD,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -112,13 +112,13 @@ export interface EmbedConfig {
112
112
  * When there are multiple embeds, queue the render of embed to start
113
113
  * after the previous embed's render is complete. This helps in the load performance
114
114
  * by decreasing the load on the browser.
115
- * * _Version 1.5.0 or later _
115
+ * @version 1.5.0 or later
116
116
  * @default false
117
117
  */
118
118
  queueMultiRenders?: boolean;
119
119
  /**
120
120
  * Dynamic CSS Url to be injected in the loaded application.
121
- * * _Version 1.6.0 or later _
121
+ * @version 1.6.0 or later
122
122
  * @default ''
123
123
  */
124
124
  customCssUrl?: string;
@@ -266,7 +266,7 @@ export declare enum EmbedEvent {
266
266
  /**
267
267
  * A double click has been triggered on table/chart
268
268
  * @return ContextMenuInputPoints - data point that is double clicked
269
- * * _Version 1.5.0 or later _
269
+ * @version 1.5.0 or later
270
270
  */
271
271
  VizPointDoubleClick = "vizPointDoubleClick",
272
272
  /**
@@ -308,7 +308,7 @@ export declare enum EmbedEvent {
308
308
  * Emitted when the embed does not have cookie access. This
309
309
  * happens on Safari where third-party cookies are blocked by default.
310
310
  *
311
- * @version 1.1.0
311
+ * @version 1.1.0 or later
312
312
  */
313
313
  NoCookieAccess = "noCookieAccess",
314
314
  /**
@@ -319,12 +319,12 @@ export declare enum EmbedEvent {
319
319
  SAMLComplete = "samlComplete",
320
320
  /**
321
321
  * Emitted when any modal is opened in the app
322
- * * _Version 1.6.0 or later _
322
+ * @version 1.6.0 or later
323
323
  */
324
324
  DialogOpen = "dialog-open",
325
325
  /**
326
326
  * Emitted when any modal is closed in the app
327
- * * _Version 1.6.0 or later _
327
+ * @version 1.6.0 or later
328
328
  */
329
329
  DialogClose = "dialog-close"
330
330
  }
@@ -345,7 +345,7 @@ export declare enum HostEvent {
345
345
  * eg. { selectedPoints: []}
346
346
  * @param columnGuid - a string guid of the column to drill by. This is optional,
347
347
  * if not provided it will auto drill by the configured column. \
348
- * * _Version 1.5.0 or later _
348
+ * @version 1.5.0 or later
349
349
  */
350
350
  DrillDown = "triggerDrillDown",
351
351
  /**
@@ -362,7 +362,7 @@ export declare enum HostEvent {
362
362
  * Set the visible visualizations on a Liveboard.
363
363
  * @param - an array of ids of visualizations to show, the ids not passed
364
364
  * will be hidden.
365
- * * _Version 1.6.0 or later _
365
+ * @version 1.6.0 or later
366
366
  */
367
367
  SetVisibleVizs = "SetPinboardVisibleVizs"
368
368
  }
@@ -391,6 +391,7 @@ export declare enum DataSourceVisualMode {
391
391
  export declare enum Param {
392
392
  DataSources = "dataSources",
393
393
  DataSourceMode = "dataSourceMode",
394
+ ExpandAllDataSource = "expandAllDataSource",
394
395
  DisableActions = "disableAction",
395
396
  DisableActionReason = "disableHint",
396
397
  ForceTable = "forceTable",
package/lib/src/types.js CHANGED
@@ -152,7 +152,7 @@ export var EmbedEvent;
152
152
  /**
153
153
  * A double click has been triggered on table/chart
154
154
  * @return ContextMenuInputPoints - data point that is double clicked
155
- * * _Version 1.5.0 or later _
155
+ * @version 1.5.0 or later
156
156
  */
157
157
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
158
158
  /**
@@ -194,7 +194,7 @@ export var EmbedEvent;
194
194
  * Emitted when the embed does not have cookie access. This
195
195
  * happens on Safari where third-party cookies are blocked by default.
196
196
  *
197
- * @version 1.1.0
197
+ * @version 1.1.0 or later
198
198
  */
199
199
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
200
200
  /**
@@ -205,12 +205,12 @@ export var EmbedEvent;
205
205
  EmbedEvent["SAMLComplete"] = "samlComplete";
206
206
  /**
207
207
  * Emitted when any modal is opened in the app
208
- * * _Version 1.6.0 or later _
208
+ * @version 1.6.0 or later
209
209
  */
210
210
  EmbedEvent["DialogOpen"] = "dialog-open";
211
211
  /**
212
212
  * Emitted when any modal is closed in the app
213
- * * _Version 1.6.0 or later _
213
+ * @version 1.6.0 or later
214
214
  */
215
215
  EmbedEvent["DialogClose"] = "dialog-close";
216
216
  })(EmbedEvent || (EmbedEvent = {}));
@@ -233,7 +233,7 @@ export var HostEvent;
233
233
  * eg. { selectedPoints: []}
234
234
  * @param columnGuid - a string guid of the column to drill by. This is optional,
235
235
  * if not provided it will auto drill by the configured column. \
236
- * * _Version 1.5.0 or later _
236
+ * @version 1.5.0 or later
237
237
  */
238
238
  HostEvent["DrillDown"] = "triggerDrillDown";
239
239
  /**
@@ -250,7 +250,7 @@ export var HostEvent;
250
250
  * Set the visible visualizations on a Liveboard.
251
251
  * @param - an array of ids of visualizations to show, the ids not passed
252
252
  * will be hidden.
253
- * * _Version 1.6.0 or later _
253
+ * @version 1.6.0 or later
254
254
  */
255
255
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
256
256
  })(HostEvent || (HostEvent = {}));
@@ -283,6 +283,7 @@ export var Param;
283
283
  (function (Param) {
284
284
  Param["DataSources"] = "dataSources";
285
285
  Param["DataSourceMode"] = "dataSourceMode";
286
+ Param["ExpandAllDataSource"] = "expandAllDataSource";
286
287
  Param["DisableActions"] = "disableAction";
287
288
  Param["DisableActionReason"] = "disableHint";
288
289
  Param["ForceTable"] = "forceTable";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAoBX;AApBD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EApBW,QAAQ,KAAR,QAAQ,QAoBnB;AAqHD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,eAyDX;AAzDD,WAAY,eAAe;IACvB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,wCAAqB,CAAA;IACrB;;OAEG;IACH,8CAA2B,CAAA;IAC3B;;OAEG;IACH,0CAAuB,CAAA;IACvB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,oCAAiB,CAAA;IACjB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;AACb,CAAC,EAzDW,eAAe,KAAf,eAAe,QAyD1B;AAsBD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,UAgHX;AAhHD,WAAY,UAAU;IAClB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0C,CAAA;IAC1C,iEAAuD,CAAA;IACvD,8CAAoC,CAAA;IACpC,wDAA8C,CAAA;IAC9C,mDAAyC,CAAA;IACzC,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;IAC/B,qDAA2C,CAAA;AAC/C,CAAC,EAhEW,MAAM,KAAN,MAAM,QAgEjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
@@ -275,6 +275,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
275
275
  * using raw answer data.
276
276
  */
277
277
  hideResults?: boolean;
278
+ /**
279
+ * If set to true, expands all the data sources panel.
280
+ */
281
+ expandAllDataSource?: boolean;
278
282
  /**
279
283
  * If set to true, the Search Assist feature is enabled.
280
284
  */
@@ -428,13 +432,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
428
432
  * When there are multiple embeds, queue the render of embed to start
429
433
  * after the previous embed's render is complete. This helps in the load performance
430
434
  * by decreasing the load on the browser.
431
- * * _Version 1.5.0 or later _
435
+ * @version 1.5.0 or later
432
436
  * @default false
433
437
  */
434
438
  queueMultiRenders?: boolean;
435
439
  /**
436
440
  * Dynamic CSS Url to be injected in the loaded application.
437
- * * _Version 1.6.0 or later _
441
+ * @version 1.6.0 or later
438
442
  * @default ''
439
443
  */
440
444
  customCssUrl?: string;
@@ -582,7 +586,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
582
586
  /**
583
587
  * A double click has been triggered on table/chart
584
588
  * @return ContextMenuInputPoints - data point that is double clicked
585
- * * _Version 1.5.0 or later _
589
+ * @version 1.5.0 or later
586
590
  */
587
591
  VizPointDoubleClick = "vizPointDoubleClick",
588
592
  /**
@@ -624,7 +628,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
624
628
  * Emitted when the embed does not have cookie access. This
625
629
  * happens on Safari where third-party cookies are blocked by default.
626
630
  *
627
- * @version 1.1.0
631
+ * @version 1.1.0 or later
628
632
  */
629
633
  NoCookieAccess = "noCookieAccess",
630
634
  /**
@@ -635,12 +639,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
635
639
  SAMLComplete = "samlComplete",
636
640
  /**
637
641
  * Emitted when any modal is opened in the app
638
- * * _Version 1.6.0 or later _
642
+ * @version 1.6.0 or later
639
643
  */
640
644
  DialogOpen = "dialog-open",
641
645
  /**
642
646
  * Emitted when any modal is closed in the app
643
- * * _Version 1.6.0 or later _
647
+ * @version 1.6.0 or later
644
648
  */
645
649
  DialogClose = "dialog-close"
646
650
  }
@@ -661,7 +665,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
661
665
  * eg. { selectedPoints: []}
662
666
  * @param columnGuid - a string guid of the column to drill by. This is optional,
663
667
  * if not provided it will auto drill by the configured column. \
664
- * * _Version 1.5.0 or later _
668
+ * @version 1.5.0 or later
665
669
  */
666
670
  DrillDown = "triggerDrillDown",
667
671
  /**
@@ -678,7 +682,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
678
682
  * Set the visible visualizations on a Liveboard.
679
683
  * @param - an array of ids of visualizations to show, the ids not passed
680
684
  * will be hidden.
681
- * * _Version 1.6.0 or later _
685
+ * @version 1.6.0 or later
682
686
  */
683
687
  SetVisibleVizs = "SetPinboardVisibleVizs"
684
688
  }
@@ -707,6 +711,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
707
711
  export enum Param {
708
712
  DataSources = "dataSources",
709
713
  DataSourceMode = "dataSourceMode",
714
+ ExpandAllDataSource = "expandAllDataSource",
710
715
  DisableActions = "disableAction",
711
716
  DisableActionReason = "disableHint",
712
717
  ForceTable = "forceTable",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.6.0-alpha.3",
3
+ "version": "1.6.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -65,6 +65,7 @@
65
65
  "asciidoctor": "^2.2.1",
66
66
  "babel-jest": "^26.6.3",
67
67
  "babel-preset-gatsby": "^1.10.0",
68
+ "classnames": "^2.3.1",
68
69
  "command-line-args": "^5.1.1",
69
70
  "coveralls": "^3.1.0",
70
71
  "dts-bundle": "0.7.3",
@@ -126,6 +127,9 @@
126
127
  "type": "git",
127
128
  "url": "git+https://github.com/thoughtspot/visual-embed-sdk.git"
128
129
  },
130
+ "publishConfig": {
131
+ "registry": "https://registry.npmjs.org"
132
+ },
129
133
  "keywords": [
130
134
  "thoughtspot",
131
135
  "everywhere",
@@ -49,6 +49,10 @@ export interface SearchViewConfig extends ViewConfig {
49
49
  * using raw answer data.
50
50
  */
51
51
  hideResults?: boolean;
52
+ /**
53
+ * If set to true, expands all the data sources panel.
54
+ */
55
+ expandAllDataSource?: boolean;
52
56
  /**
53
57
  * If set to true, the Search Assist feature is enabled.
54
58
  */
@@ -118,6 +122,7 @@ export class SearchEmbed extends TsEmbed {
118
122
  private getIFrameSrc(answerId: string, dataSources?: string[]) {
119
123
  const {
120
124
  hideResults,
125
+ expandAllDataSource,
121
126
  enableSearchAssist,
122
127
  forceTable,
123
128
  searchOptions,
package/src/types.ts CHANGED
@@ -124,14 +124,14 @@ export interface EmbedConfig {
124
124
  * When there are multiple embeds, queue the render of embed to start
125
125
  * after the previous embed's render is complete. This helps in the load performance
126
126
  * by decreasing the load on the browser.
127
- * * _Version 1.5.0 or later _
127
+ * @version 1.5.0 or later
128
128
  * @default false
129
129
  */
130
130
  queueMultiRenders?: boolean;
131
131
 
132
132
  /**
133
133
  * Dynamic CSS Url to be injected in the loaded application.
134
- * * _Version 1.6.0 or later _
134
+ * @version 1.6.0 or later
135
135
  * @default ''
136
136
  */
137
137
  customCssUrl?: string;
@@ -287,7 +287,7 @@ export enum EmbedEvent {
287
287
  /**
288
288
  * A double click has been triggered on table/chart
289
289
  * @return ContextMenuInputPoints - data point that is double clicked
290
- * * _Version 1.5.0 or later _
290
+ * @version 1.5.0 or later
291
291
  */
292
292
  VizPointDoubleClick = 'vizPointDoubleClick',
293
293
  /**
@@ -329,7 +329,7 @@ export enum EmbedEvent {
329
329
  * Emitted when the embed does not have cookie access. This
330
330
  * happens on Safari where third-party cookies are blocked by default.
331
331
  *
332
- * @version 1.1.0
332
+ * @version 1.1.0 or later
333
333
  */
334
334
  NoCookieAccess = 'noCookieAccess',
335
335
  /**
@@ -340,12 +340,12 @@ export enum EmbedEvent {
340
340
  SAMLComplete = 'samlComplete',
341
341
  /**
342
342
  * Emitted when any modal is opened in the app
343
- * * _Version 1.6.0 or later _
343
+ * @version 1.6.0 or later
344
344
  */
345
345
  DialogOpen = 'dialog-open',
346
346
  /**
347
347
  * Emitted when any modal is closed in the app
348
- * * _Version 1.6.0 or later _
348
+ * @version 1.6.0 or later
349
349
  */
350
350
  DialogClose = 'dialog-close',
351
351
  }
@@ -368,7 +368,7 @@ export enum HostEvent {
368
368
  * eg. { selectedPoints: []}
369
369
  * @param columnGuid - a string guid of the column to drill by. This is optional,
370
370
  * if not provided it will auto drill by the configured column. \
371
- * * _Version 1.5.0 or later _
371
+ * @version 1.5.0 or later
372
372
  */
373
373
  DrillDown = 'triggerDrillDown',
374
374
  /**
@@ -385,7 +385,7 @@ export enum HostEvent {
385
385
  * Set the visible visualizations on a Liveboard.
386
386
  * @param - an array of ids of visualizations to show, the ids not passed
387
387
  * will be hidden.
388
- * * _Version 1.6.0 or later _
388
+ * @version 1.6.0 or later
389
389
  */
390
390
  SetVisibleVizs = 'SetPinboardVisibleVizs',
391
391
  }
@@ -418,6 +418,7 @@ export enum DataSourceVisualMode {
418
418
  export enum Param {
419
419
  DataSources = 'dataSources',
420
420
  DataSourceMode = 'dataSourceMode',
421
+ ExpandAllDataSource = 'expandAllDataSource',
421
422
  DisableActions = 'disableAction',
422
423
  DisableActionReason = 'disableHint',
423
424
  ForceTable = 'forceTable',
@@ -1,85 +0,0 @@
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
- /**
50
- * Embed a ThoughtSpot pinboard or visualization
51
- * @Category Pinboards and Charts
52
- */
53
- export declare class PinboardEmbed extends V1Embed {
54
- protected viewConfig: PinboardViewConfig;
55
- private defaultHeight;
56
- constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
57
- /**
58
- * Construct a map of params to be passed on to the
59
- * embedded pinboard or visualization.
60
- */
61
- private getEmbedParams;
62
- /**
63
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
64
- * to be loaded within the iframe.
65
- * @param pinboardId The GUID of the pinboard.
66
- * @param vizId The optional GUID of a visualization within the pinboard.
67
- * @param runtimeFilters A list of runtime filters to be applied to
68
- * the pinboard or visualization on load.
69
- */
70
- private getIFrameSrc;
71
- /**
72
- * Set the iframe height as per the computed height received
73
- * from the ThoughtSpot app.
74
- * @param data The event payload
75
- */
76
- private updateIFrameHeight;
77
- private embedIframeCenter;
78
- private handleRouteChangeFullHeightPinboard;
79
- /**
80
- * Render an embedded ThoughtSpot pinboard or visualization
81
- * @param renderOptions An object specifying the pinboard ID,
82
- * visualization ID and the runtime filters.
83
- */
84
- render(): PinboardEmbed;
85
- }
@@ -1,85 +0,0 @@
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
- /**
50
- * Embed a ThoughtSpot pinboard or visualization
51
- * @Category Pinboards and Charts
52
- */
53
- export declare class PinboardEmbed extends V1Embed {
54
- protected viewConfig: PinboardViewConfig;
55
- private defaultHeight;
56
- constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
57
- /**
58
- * Construct a map of params to be passed on to the
59
- * embedded pinboard or visualization.
60
- */
61
- private getEmbedParams;
62
- /**
63
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
64
- * to be loaded within the iframe.
65
- * @param pinboardId The GUID of the pinboard.
66
- * @param vizId The optional GUID of a visualization within the pinboard.
67
- * @param runtimeFilters A list of runtime filters to be applied to
68
- * the pinboard or visualization on load.
69
- */
70
- private getIFrameSrc;
71
- /**
72
- * Set the iframe height as per the computed height received
73
- * from the ThoughtSpot app.
74
- * @param data The event payload
75
- */
76
- private updateIFrameHeight;
77
- private embedIframeCenter;
78
- private handleRouteChangeFullHeightPinboard;
79
- /**
80
- * Render an embedded ThoughtSpot pinboard or visualization
81
- * @param renderOptions An object specifying the pinboard ID,
82
- * visualization ID and the runtime filters.
83
- */
84
- render(): PinboardEmbed;
85
- }
@@ -1,107 +0,0 @@
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 { ERROR_MESSAGE } from '../errors';
12
- import { EmbedEvent, Param, } from '../types';
13
- import { getFilterQuery, getQueryParamString } from '../utils';
14
- import { V1Embed } from './ts-embed';
15
- /**
16
- * Embed a ThoughtSpot pinboard or visualization
17
- * @Category Pinboards and Charts
18
- */
19
- export class PinboardEmbed extends V1Embed {
20
- // eslint-disable-next-line no-useless-constructor
21
- constructor(domSelector, viewConfig) {
22
- super(domSelector, viewConfig);
23
- this.defaultHeight = 500;
24
- /**
25
- * Set the iframe height as per the computed height received
26
- * from the ThoughtSpot app.
27
- * @param data The event payload
28
- */
29
- this.updateIFrameHeight = (data) => {
30
- this.setIFrameHeight(Math.max(data.data, this.defaultHeight));
31
- };
32
- this.embedIframeCenter = (data, responder) => {
33
- const obj = this.getIframeCenter();
34
- responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
35
- };
36
- this.handleRouteChangeFullHeightPinboard = (data) => {
37
- if (data.data.canvasState !== 'EMBED' &&
38
- data.data.canvasState !== 'pinboard') {
39
- this.setIFrameHeight(this.defaultHeight);
40
- }
41
- };
42
- }
43
- /**
44
- * Construct a map of params to be passed on to the
45
- * embedded pinboard or visualization.
46
- */
47
- getEmbedParams() {
48
- const params = this.getBaseQueryParams();
49
- const { enableVizTransformations, fullHeight, preventPinboardFilterRemoval, defaultHeight, } = this.viewConfig;
50
- if (fullHeight === true) {
51
- params[Param.fullHeight] = true;
52
- }
53
- if (defaultHeight) {
54
- this.defaultHeight = defaultHeight;
55
- }
56
- if (enableVizTransformations !== undefined) {
57
- params[Param.EnableVizTransformations] = enableVizTransformations.toString();
58
- }
59
- if (preventPinboardFilterRemoval) {
60
- params[Param.preventPinboardFilterRemoval] = true;
61
- }
62
- params[Param.livedBoardEmbed] = true;
63
- const queryParams = getQueryParamString(params, true);
64
- return queryParams;
65
- }
66
- /**
67
- * Construct the URL of the embedded ThoughtSpot pinboard or visualization
68
- * to be loaded within the iframe.
69
- * @param pinboardId The GUID of the pinboard.
70
- * @param vizId The optional GUID of a visualization within the pinboard.
71
- * @param runtimeFilters A list of runtime filters to be applied to
72
- * the pinboard or visualization on load.
73
- */
74
- getIFrameSrc(pinboardId, vizId, runtimeFilters) {
75
- const filterQuery = getFilterQuery(runtimeFilters || []);
76
- const queryParams = this.getEmbedParams();
77
- const queryString = [filterQuery, queryParams]
78
- .filter(Boolean)
79
- .join('&');
80
- let url = `${this.getV1EmbedBasePath(queryString, true, false, false)}/viz/${pinboardId}`;
81
- if (vizId) {
82
- url = `${url}/${vizId}`;
83
- }
84
- return url;
85
- }
86
- /**
87
- * Render an embedded ThoughtSpot pinboard or visualization
88
- * @param renderOptions An object specifying the pinboard ID,
89
- * visualization ID and the runtime filters.
90
- */
91
- render() {
92
- const { pinboardId, vizId, runtimeFilters } = this.viewConfig;
93
- if (!pinboardId && !vizId) {
94
- this.handleError(ERROR_MESSAGE.PINBOARD_VIZ_ID_VALIDATION);
95
- }
96
- if (this.viewConfig.fullHeight === true) {
97
- this.on(EmbedEvent.RouteChange, this.handleRouteChangeFullHeightPinboard);
98
- this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
99
- this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
100
- }
101
- super.render();
102
- const src = this.getIFrameSrc(pinboardId, vizId, runtimeFilters);
103
- this.renderV1Embed(src);
104
- return this;
105
- }
106
- }
107
- //# sourceMappingURL=pinboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pinboard.js","sourceRoot":"","sources":["../../../src/embed/pinboard.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;AAuCjD;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,OAAO;IAKtC,kDAAkD;IAClD,YAAY,WAAwB,EAAE,UAA8B;QAChE,KAAK,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAJ3B,kBAAa,GAAG,GAAG,CAAC;QAuE5B;;;;WAIG;QACK,uBAAkB,GAAG,CAAC,IAAoB,EAAE,EAAE;YAClD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QA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AAC;QACjE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAExB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -1,3 +0,0 @@
1
- import { SessionInterface } from '../types';
2
- declare function FetchAnswers(session: SessionInterface, query: string, operation: string, thoughtSpotHost: string): any;
3
- export default FetchAnswers;
@@ -1,49 +0,0 @@
1
- import { OperationType } from '../types';
2
- function FetchAnswers(session, query, operation, thoughtSpotHost) {
3
- let variable;
4
- const fetchQuery = async (variables) => {
5
- try {
6
- const response = await fetch(`${thoughtSpotHost}/prism/?op=${operation}`, {
7
- method: 'POST',
8
- headers: {
9
- 'content-type': 'application/json;charset=UTF-8',
10
- 'x-requested-by': 'ThoughtSpot',
11
- accept: '*/*',
12
- 'accept-language': 'en-us',
13
- },
14
- body: JSON.stringify({
15
- operationName: operation,
16
- query,
17
- variables,
18
- }),
19
- credentials: 'include'
20
- });
21
- const result = await response.json();
22
- return result.data;
23
- }
24
- catch (error) {
25
- return error;
26
- }
27
- };
28
- const getAnswer = (offset, batchSize) => {
29
- if (operation === OperationType.GetChartWithData) {
30
- variable = { batchSize, offset };
31
- }
32
- else {
33
- variable = {
34
- dataPaginationParams: {
35
- isClientPaginated: true,
36
- offset,
37
- size: batchSize,
38
- },
39
- };
40
- }
41
- return fetchQuery({
42
- session,
43
- ...variable,
44
- });
45
- };
46
- return getAnswer;
47
- }
48
- export default FetchAnswers;
49
- //# sourceMappingURL=fetchAnswers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetchAnswers.js","sourceRoot":"","sources":["../../../src/utils/fetchAnswers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,SAAS,YAAY,CACjB,OAAyB,EACzB,KAAa,EACb,SAAiB,EACjB,eAAuB;IAEvB,IAAI,QAAa,CAAC;IAElB,MAAM,UAAU,GAAG,KAAK,EAAE,SAAc,EAAE,EAAE;QACxC,IAAI;YACA,MAAM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