@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +3 -3
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +87 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +41 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +25 -36
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +35 -23
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +23 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +18 -33
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +129 -97
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +105 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +9 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +106 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.js +51 -0
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js +115 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +18 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +10 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +54 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +20 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.js +52 -0
- package/cjs/src/embed/spotter-utils.js.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.js +54 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +54 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/errors.d.ts +2 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +2 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +832 -33
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +835 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils.d.ts +0 -9
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -10
- package/cjs/src/utils.js.map +1 -1
- package/dist/index-ChNydfIz.js +7371 -0
- package/dist/index-DW2wEHqy.js +7371 -0
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +87 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +41 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +23 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +105 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +18 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +20 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -0
- package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
- package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +2 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +832 -33
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils.d.ts +0 -9
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1208 -154
- package/dist/tsembed-react.js +1206 -152
- package/dist/tsembed.es.js +1150 -101
- package/dist/tsembed.js +1148 -99
- package/dist/visual-embed-sdk-react-full.d.ts +1156 -55
- package/dist/visual-embed-sdk-react.d.ts +1156 -55
- package/dist/visual-embed-sdk.d.ts +1179 -60
- package/lib/package.json +3 -3
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +87 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +41 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +27 -38
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +35 -23
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +23 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +19 -34
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +131 -99
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +105 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +9 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +106 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.js +43 -0
- package/lib/src/embed/hostEventClient/utils.js.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.js +113 -0
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +18 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +10 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +54 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +20 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.js +47 -0
- package/lib/src/embed/spotter-utils.js.map +1 -0
- package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
- package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.spec.js +52 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -0
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +55 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/errors.d.ts +2 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +2 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +832 -33
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +835 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils.d.ts +0 -9
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +0 -8
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1179 -60
- package/package.json +3 -3
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +96 -17
- package/src/embed/app.spec.ts +48 -30
- package/src/embed/app.ts +59 -54
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/conversation.spec.ts +150 -119
- package/src/embed/conversation.ts +30 -54
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +105 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +504 -6
- package/src/embed/hostEventClient/host-event-client.ts +146 -15
- package/src/embed/hostEventClient/utils.spec.ts +137 -0
- package/src/embed/hostEventClient/utils.ts +61 -0
- package/src/embed/liveboard.spec.ts +71 -2
- package/src/embed/liveboard.ts +29 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/spotter-utils.spec.ts +56 -0
- package/src/embed/spotter-utils.ts +65 -0
- package/src/embed/ts-embed.ts +58 -4
- package/src/errors.ts +2 -0
- package/src/react/index.tsx +76 -72
- package/src/types.ts +843 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
- package/src/utils.ts +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thoughtspot/visual-embed-sdk",
|
|
3
|
-
"version": "1.46.
|
|
3
|
+
"version": "1.46.5",
|
|
4
4
|
"description": "ThoughtSpot Embed SDK",
|
|
5
5
|
"module": "lib/src/index.js",
|
|
6
6
|
"main": "dist/tsembed.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"size-limit": [
|
|
39
39
|
{
|
|
40
40
|
"path": "dist/tsembed.es.js",
|
|
41
|
-
"limit": "
|
|
41
|
+
"limit": "34 kB"
|
|
42
42
|
}
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"react-resize-detector": "^6.6.0",
|
|
134
134
|
"react-test-renderer": "^17.0.2",
|
|
135
135
|
"react-use-flexsearch": "^0.1.1",
|
|
136
|
-
"rollup": "4.
|
|
136
|
+
"rollup": "4.59.0",
|
|
137
137
|
"rollup-plugin-typescript2": "0.27.3",
|
|
138
138
|
"ts-jest": "^29.4.6",
|
|
139
139
|
"ts-loader": "8.0.4",
|
package/src/auth.spec.ts
CHANGED
package/src/auth.ts
CHANGED
|
@@ -54,7 +54,8 @@ export enum AuthFailureType {
|
|
|
54
54
|
/**
|
|
55
55
|
* The current authentication token or session has expired.
|
|
56
56
|
*
|
|
57
|
-
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
57
|
+
* Emitted when the embed receives an auth-expiry signal and starts auth refresh
|
|
58
|
+
* handling.
|
|
58
59
|
*/
|
|
59
60
|
EXPIRY = 'EXPIRY',
|
|
60
61
|
/**
|
package/src/authToken.ts
CHANGED
|
@@ -83,7 +83,6 @@ export const validateAuthToken = async (
|
|
|
83
83
|
|
|
84
84
|
if (cachedAuthToken && cachedAuthToken === authToken) {
|
|
85
85
|
if (!embedConfig.suppressErrorAlerts && !suppressAlert) {
|
|
86
|
-
|
|
87
86
|
alert(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
|
88
87
|
}
|
|
89
88
|
throw new Error(ERROR_MESSAGE.DUPLICATE_TOKEN_ERR);
|
package/src/css-variables.ts
CHANGED
|
@@ -517,42 +517,54 @@ export interface CustomCssVariables {
|
|
|
517
517
|
/**
|
|
518
518
|
* Padding of the groups in the Liveboard.
|
|
519
519
|
*
|
|
520
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
520
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
521
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
522
|
+
* this CSS variable.
|
|
521
523
|
*/
|
|
522
524
|
'--ts-var-liveboard-group-padding'?: string;
|
|
523
525
|
|
|
524
526
|
/**
|
|
525
527
|
* Font size of the title of the groups in the Liveboard.
|
|
526
528
|
*
|
|
527
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
529
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
530
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
531
|
+
* this CSS variable.
|
|
528
532
|
*/
|
|
529
533
|
'--ts-var-liveboard-group-title-font-size'?: string;
|
|
530
534
|
|
|
531
535
|
/**
|
|
532
536
|
* Font weight of the title of the groups in the Liveboard.
|
|
533
537
|
*
|
|
534
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
538
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
539
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
540
|
+
* this CSS variable.
|
|
535
541
|
*/
|
|
536
542
|
'--ts-var-liveboard-group-title-font-weight'?: string;
|
|
537
543
|
|
|
538
544
|
/**
|
|
539
545
|
* Font size of the title of the tiles inside the groups in the Liveboard.
|
|
540
546
|
*
|
|
541
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
547
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
548
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
549
|
+
* this CSS variable.
|
|
542
550
|
*/
|
|
543
551
|
'--ts-var-liveboard-group-tile-title-font-size'?: string;
|
|
544
552
|
|
|
545
553
|
/**
|
|
546
554
|
* Font weight of the title of the tiles inside the groups in the Liveboard.
|
|
547
555
|
*
|
|
548
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
556
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
557
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
558
|
+
* this CSS variable.
|
|
549
559
|
*/
|
|
550
560
|
'--ts-var-liveboard-group-tile-title-font-weight'?: string;
|
|
551
561
|
|
|
552
562
|
/**
|
|
553
563
|
* Padding of the group tiles in the Liveboard.
|
|
554
564
|
*
|
|
555
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
565
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
566
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
567
|
+
* this CSS variable.
|
|
556
568
|
*/
|
|
557
569
|
'--ts-var-liveboard-group-tile-padding'?: string;
|
|
558
570
|
|
|
@@ -564,14 +576,18 @@ export interface CustomCssVariables {
|
|
|
564
576
|
/**
|
|
565
577
|
* Background color of the groups in the Liveboard.
|
|
566
578
|
*
|
|
567
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
579
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
580
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
581
|
+
* this CSS variable.
|
|
568
582
|
*/
|
|
569
583
|
'--ts-var-liveboard-group-background'?: string;
|
|
570
584
|
|
|
571
585
|
/**
|
|
572
586
|
* Border color of the groups in the Liveboard.
|
|
573
587
|
*
|
|
574
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
588
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
589
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
590
|
+
* this CSS variable.
|
|
575
591
|
*/
|
|
576
592
|
'--ts-var-liveboard-group-border-color'?: string;
|
|
577
593
|
|
|
@@ -588,63 +604,81 @@ export interface CustomCssVariables {
|
|
|
588
604
|
/**
|
|
589
605
|
* Font color of the title of the groups in the Liveboard.
|
|
590
606
|
*
|
|
591
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
607
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
608
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
609
|
+
* this CSS variable.
|
|
592
610
|
*/
|
|
593
611
|
'--ts-var-liveboard-group-title-font-color'?: string;
|
|
594
612
|
|
|
595
613
|
/**
|
|
596
614
|
* Font color of the description of the groups in the Liveboard.
|
|
597
615
|
*
|
|
598
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
616
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
617
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
618
|
+
* this CSS variable.
|
|
599
619
|
*/
|
|
600
620
|
'--ts-var-liveboard-group-description-font-color'?: string;
|
|
601
621
|
|
|
602
622
|
/**
|
|
603
623
|
* Font color of the title of the tiles inside the groups in the Liveboard.
|
|
604
624
|
*
|
|
605
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
625
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
626
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
627
|
+
* this CSS variable.
|
|
606
628
|
*/
|
|
607
629
|
'--ts-var-liveboard-group-tile-title-font-color'?: string;
|
|
608
630
|
|
|
609
631
|
/**
|
|
610
632
|
* Font color of the description of the tiles inside the groups in the Liveboard.
|
|
611
633
|
*
|
|
612
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
634
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
635
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
636
|
+
* this CSS variable.
|
|
613
637
|
*/
|
|
614
638
|
'--ts-var-liveboard-group-tile-description-font-color'?: string;
|
|
615
639
|
|
|
616
640
|
/**
|
|
617
641
|
* Background color of the tiles inside the groups in the Liveboard.
|
|
618
642
|
*
|
|
619
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
643
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
644
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
645
|
+
* this CSS variable.
|
|
620
646
|
*/
|
|
621
647
|
'--ts-var-liveboard-group-tile-background'?: string;
|
|
622
648
|
|
|
623
649
|
/**
|
|
624
650
|
* Background color of the filter chips in the Liveboard.
|
|
625
651
|
*
|
|
626
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
652
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
653
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
654
|
+
* this CSS variable.
|
|
627
655
|
*/
|
|
628
656
|
'--ts-var-liveboard-chip-background'?: string;
|
|
629
657
|
|
|
630
658
|
/**
|
|
631
659
|
* Font color of the filter chips in the Liveboard.
|
|
632
660
|
*
|
|
633
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
661
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
662
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
663
|
+
* this CSS variable.
|
|
634
664
|
*/
|
|
635
665
|
'--ts-var-liveboard-chip-color'?: string;
|
|
636
666
|
|
|
637
667
|
/**
|
|
638
668
|
* Background color of the filter chips in the Liveboard on hover.
|
|
639
669
|
*
|
|
640
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
670
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
671
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
672
|
+
* this CSS variable.
|
|
641
673
|
*/
|
|
642
674
|
'--ts-var-liveboard-chip--hover-background'?: string;
|
|
643
675
|
|
|
644
676
|
/**
|
|
645
677
|
* Background color of the filter chips in the Liveboard on active.
|
|
646
678
|
*
|
|
647
|
-
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
679
|
+
* Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
|
|
680
|
+
* then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
|
|
681
|
+
* this CSS variable.
|
|
648
682
|
*/
|
|
649
683
|
'--ts-var-liveboard-chip--active-background'?: string;
|
|
650
684
|
|
|
@@ -912,4 +946,49 @@ export interface CustomCssVariables {
|
|
|
912
946
|
* Color for section title text (e.g., "Recent", "Older") in the saved chats sidebar.
|
|
913
947
|
*/
|
|
914
948
|
'--ts-var-saved-chats-section-title-color'?: string;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Text color of the styling panel in the Liveboard.
|
|
952
|
+
*/
|
|
953
|
+
'--ts-var-liveboard-styling-panel-text-color'?: string;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Border color of the styling panel in the Liveboard.
|
|
957
|
+
*/
|
|
958
|
+
'--ts-var-liveboard-styling-panel-border-color'?: string;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Background color of the styling button in the Liveboard.
|
|
962
|
+
*/
|
|
963
|
+
'--ts-var-liveboard-styling-button-background'?: string;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Text color of the styling button in the Liveboard.
|
|
967
|
+
*/
|
|
968
|
+
'--ts-var-liveboard-styling-button-text-color'?: string;
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Background color of the styling button in the Liveboard on hover.
|
|
972
|
+
*/
|
|
973
|
+
'--ts-var-liveboard-styling-button-hover-background'?: string;
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Background color of the styling button in the Liveboard when active.
|
|
977
|
+
*/
|
|
978
|
+
'--ts-var-liveboard-styling-button-active-background'?: string;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Text color of the styling button in the Liveboard on hover.
|
|
982
|
+
*/
|
|
983
|
+
'--ts-var-liveboard-styling-button-hover-text-color'?: string;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* Box shadow of the styling button in the Liveboard.
|
|
987
|
+
*/
|
|
988
|
+
'--ts-var-liveboard-styling-button-shadow'?: string;
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* Background color of the color palette in the Liveboard styling panel.
|
|
992
|
+
*/
|
|
993
|
+
'--ts-var-liveboard-styling-color-palette-background'?: string;
|
|
915
994
|
}
|
package/src/embed/app.spec.ts
CHANGED
|
@@ -439,117 +439,111 @@ describe('App embed tests', () => {
|
|
|
439
439
|
});
|
|
440
440
|
});
|
|
441
441
|
|
|
442
|
-
test('should set
|
|
443
|
-
const appEmbed = new AppEmbed(getRootEl(),
|
|
444
|
-
...defaultViewConfig,
|
|
445
|
-
isPNGInScheduledEmailsEnabled: true,
|
|
446
|
-
} as AppViewConfig);
|
|
442
|
+
test('should set enableHomepageAnnouncement to false in url when not provided in AppViewConfig', async () => {
|
|
443
|
+
const appEmbed = new AppEmbed(getRootEl(), defaultViewConfig);
|
|
447
444
|
appEmbed.render();
|
|
448
445
|
await executeAfterWait(() => {
|
|
449
446
|
expectUrlMatchesWithParams(
|
|
450
447
|
getIFrameSrc(),
|
|
451
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
448
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&enableHomepageAnnouncement=false${defaultParamsPost}#/home`,
|
|
452
449
|
);
|
|
453
450
|
});
|
|
454
451
|
});
|
|
455
452
|
|
|
456
|
-
test('should set
|
|
453
|
+
test('should set isPNGInScheduledEmailsEnabled to true in url', async () => {
|
|
457
454
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
458
455
|
...defaultViewConfig,
|
|
459
|
-
|
|
456
|
+
isPNGInScheduledEmailsEnabled: true,
|
|
460
457
|
} as AppViewConfig);
|
|
461
458
|
appEmbed.render();
|
|
462
459
|
await executeAfterWait(() => {
|
|
463
460
|
expectUrlMatchesWithParams(
|
|
464
461
|
getIFrameSrc(),
|
|
465
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
462
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isPNGInScheduledEmailsEnabled=true${defaultParamsPost}#/home`,
|
|
466
463
|
);
|
|
467
464
|
});
|
|
468
465
|
});
|
|
469
466
|
|
|
470
|
-
test('should set
|
|
467
|
+
test('should set isWYSIWYGLiveboardPDFEnabled to true in url', async () => {
|
|
471
468
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
472
469
|
...defaultViewConfig,
|
|
473
|
-
|
|
470
|
+
isContinuousLiveboardPDFEnabled: true,
|
|
474
471
|
} as AppViewConfig);
|
|
475
472
|
appEmbed.render();
|
|
476
473
|
await executeAfterWait(() => {
|
|
477
474
|
expectUrlMatchesWithParams(
|
|
478
475
|
getIFrameSrc(),
|
|
479
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
476
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isWYSIWYGLiveboardPDFEnabled=true${defaultParamsPost}#/home`,
|
|
480
477
|
);
|
|
481
478
|
});
|
|
482
479
|
});
|
|
483
480
|
|
|
484
|
-
test('should set
|
|
481
|
+
test('should set isLinkParametersEnabled to true in url', async () => {
|
|
485
482
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
486
483
|
...defaultViewConfig,
|
|
487
|
-
|
|
484
|
+
isLinkParametersEnabled: true,
|
|
488
485
|
} as AppViewConfig);
|
|
489
486
|
appEmbed.render();
|
|
490
487
|
await executeAfterWait(() => {
|
|
491
488
|
expectUrlMatchesWithParams(
|
|
492
489
|
getIFrameSrc(),
|
|
493
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
490
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=true${defaultParamsPost}#/home`,
|
|
494
491
|
);
|
|
495
492
|
});
|
|
496
493
|
});
|
|
497
494
|
|
|
498
|
-
test('should set
|
|
495
|
+
test('should set isLinkParametersEnabled to false in url', async () => {
|
|
499
496
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
500
497
|
...defaultViewConfig,
|
|
501
|
-
|
|
498
|
+
isLinkParametersEnabled: false,
|
|
502
499
|
} as AppViewConfig);
|
|
503
500
|
appEmbed.render();
|
|
504
501
|
await executeAfterWait(() => {
|
|
505
502
|
expectUrlMatchesWithParams(
|
|
506
503
|
getIFrameSrc(),
|
|
507
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
504
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLinkParametersEnabled=false${defaultParamsPost}#/home`,
|
|
508
505
|
);
|
|
509
506
|
});
|
|
510
507
|
});
|
|
511
508
|
|
|
512
|
-
test('should set
|
|
509
|
+
test('should set isLiveboardXLSXCSVDownloadEnabled to true in url', async () => {
|
|
513
510
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
514
511
|
...defaultViewConfig,
|
|
515
|
-
|
|
512
|
+
isLiveboardXLSXCSVDownloadEnabled: true,
|
|
516
513
|
} as AppViewConfig);
|
|
517
514
|
appEmbed.render();
|
|
518
515
|
await executeAfterWait(() => {
|
|
519
516
|
expectUrlMatchesWithParams(
|
|
520
517
|
getIFrameSrc(),
|
|
521
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
518
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&isLiveboardXLSXCSVDownloadEnabled=true${defaultParamsPost}#/home`,
|
|
522
519
|
);
|
|
523
520
|
});
|
|
524
521
|
});
|
|
525
522
|
|
|
526
|
-
test('should set
|
|
523
|
+
test('should set updatedSpotterChatPrompt to true in url', async () => {
|
|
527
524
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
528
525
|
...defaultViewConfig,
|
|
529
|
-
|
|
526
|
+
updatedSpotterChatPrompt: true,
|
|
530
527
|
} as AppViewConfig);
|
|
531
528
|
appEmbed.render();
|
|
532
529
|
await executeAfterWait(() => {
|
|
533
530
|
expectUrlMatchesWithParams(
|
|
534
531
|
getIFrameSrc(),
|
|
535
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
532
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=true${defaultParamsPost}#/home`,
|
|
536
533
|
);
|
|
537
534
|
});
|
|
538
535
|
});
|
|
539
536
|
|
|
540
|
-
test('should
|
|
537
|
+
test('should set updatedSpotterChatPrompt to false in url', async () => {
|
|
541
538
|
const appEmbed = new AppEmbed(getRootEl(), {
|
|
542
539
|
...defaultViewConfig,
|
|
543
|
-
|
|
544
|
-
spotterSidebarConfig: {
|
|
545
|
-
enablePastConversationsSidebar: true,
|
|
546
|
-
},
|
|
540
|
+
updatedSpotterChatPrompt: false,
|
|
547
541
|
} as AppViewConfig);
|
|
548
542
|
appEmbed.render();
|
|
549
543
|
await executeAfterWait(() => {
|
|
550
544
|
expectUrlMatchesWithParams(
|
|
551
545
|
getIFrameSrc(),
|
|
552
|
-
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&
|
|
546
|
+
`http://${thoughtSpotHost}/?embedApp=true&profileAndHelpInNavBarHidden=false&updatedSpotterChatPrompt=false${defaultParamsPost}#/home`,
|
|
553
547
|
);
|
|
554
548
|
});
|
|
555
549
|
});
|
|
@@ -1519,6 +1513,28 @@ describe('App embed tests', () => {
|
|
|
1519
1513
|
width: 650,
|
|
1520
1514
|
});
|
|
1521
1515
|
});
|
|
1516
|
+
test('should not send correct visible data when RequestFullHeightLazyLoadData is triggered if lazyLoadingForFullHeight is false', async () => {
|
|
1517
|
+
const appEmbed = new AppEmbed(getRootEl(), {
|
|
1518
|
+
...defaultViewConfig,
|
|
1519
|
+
fullHeight: true,
|
|
1520
|
+
lazyLoadingForFullHeight: false,
|
|
1521
|
+
lazyLoadingMargin: '10px',
|
|
1522
|
+
} as AppViewConfig);
|
|
1523
|
+
|
|
1524
|
+
const mockTrigger = jest.spyOn(appEmbed, 'trigger');
|
|
1525
|
+
|
|
1526
|
+
await appEmbed.render();
|
|
1527
|
+
|
|
1528
|
+
// Trigger the lazy load data calculation
|
|
1529
|
+
(appEmbed as any).sendFullHeightLazyLoadData();
|
|
1530
|
+
|
|
1531
|
+
expect(mockTrigger).not.toHaveBeenCalledWith(HostEvent.VisibleEmbedCoordinates, {
|
|
1532
|
+
top: 0,
|
|
1533
|
+
height: 500,
|
|
1534
|
+
left: 0,
|
|
1535
|
+
width: 650,
|
|
1536
|
+
});
|
|
1537
|
+
});
|
|
1522
1538
|
|
|
1523
1539
|
test('should calculate correct visible data for partially visible full height element', async () => {
|
|
1524
1540
|
// Mock iframe partially clipped from top and left
|
|
@@ -1727,3 +1743,5 @@ describe('App Embed Default Height and Minimum Height Handling', () => {
|
|
|
1727
1743
|
expect(appEmbed['defaultHeight']).toBe(700);
|
|
1728
1744
|
});
|
|
1729
1745
|
});
|
|
1746
|
+
|
|
1747
|
+
|
package/src/embed/app.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { logger } from '../utils/logger';
|
|
12
|
-
import { calculateVisibleElementData, getQueryParamString, isUndefined, isValidCssMargin, setParamIfDefined
|
|
12
|
+
import { calculateVisibleElementData, getQueryParamString, isUndefined, isValidCssMargin, setParamIfDefined } from '../utils';
|
|
13
13
|
import {
|
|
14
14
|
Param,
|
|
15
15
|
DOMSelector,
|
|
@@ -17,12 +17,11 @@ import {
|
|
|
17
17
|
EmbedEvent,
|
|
18
18
|
MessagePayload,
|
|
19
19
|
AllEmbedViewConfig,
|
|
20
|
-
|
|
21
|
-
EmbedErrorCodes,
|
|
20
|
+
DefaultAppInitData,
|
|
22
21
|
} from '../types';
|
|
23
22
|
import { V1Embed } from './ts-embed';
|
|
24
23
|
import { SpotterChatViewConfig, SpotterSidebarViewConfig } from './conversation';
|
|
25
|
-
import {
|
|
24
|
+
import { buildSpotterSidebarAppInitData } from './spotter-utils';
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* Pages within the ThoughtSpot app that can be embedded.
|
|
@@ -587,6 +586,25 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
587
586
|
*/
|
|
588
587
|
isPNGInScheduledEmailsEnabled?: boolean;
|
|
589
588
|
|
|
589
|
+
/**
|
|
590
|
+
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
|
|
591
|
+
* following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
|
|
592
|
+
* This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
|
|
593
|
+
*
|
|
594
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
595
|
+
* @type {boolean}
|
|
596
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
597
|
+
* @example
|
|
598
|
+
* ```js
|
|
599
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
600
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
601
|
+
* ... // other embed view config
|
|
602
|
+
* isContinuousLiveboardPDFEnabled: true,
|
|
603
|
+
* })
|
|
604
|
+
* ```
|
|
605
|
+
*/
|
|
606
|
+
isContinuousLiveboardPDFEnabled?: boolean;
|
|
607
|
+
|
|
590
608
|
/**
|
|
591
609
|
* This flag is used to enable/disable the XLSX/CSV download option for Liveboards
|
|
592
610
|
*
|
|
@@ -760,6 +778,16 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
760
778
|
enableHomepageAnnouncement?: boolean;
|
|
761
779
|
}
|
|
762
780
|
|
|
781
|
+
/**
|
|
782
|
+
* APP_INIT data shape for AppEmbed.
|
|
783
|
+
* @internal
|
|
784
|
+
*/
|
|
785
|
+
export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
786
|
+
embedParams?: {
|
|
787
|
+
spotterSidebarConfig?: SpotterSidebarViewConfig;
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
|
|
763
791
|
/**
|
|
764
792
|
* Embeds full ThoughtSpot experience in a host application.
|
|
765
793
|
* @group Embed components
|
|
@@ -783,6 +811,23 @@ export class AppEmbed extends V1Embed {
|
|
|
783
811
|
}
|
|
784
812
|
}
|
|
785
813
|
|
|
814
|
+
/**
|
|
815
|
+
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
816
|
+
* so the conv-assist app can read sidebar configuration on initialisation.
|
|
817
|
+
*
|
|
818
|
+
* Precedence for `enablePastConversationsSidebar`:
|
|
819
|
+
* `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
|
|
820
|
+
* deprecated top-level `enablePastConversationsSidebar` flag; if the former
|
|
821
|
+
* is absent the latter is used as a fallback.
|
|
822
|
+
*
|
|
823
|
+
* An invalid `spotterDocumentationUrl` triggers a validation error and is
|
|
824
|
+
* excluded from the payload rather than forwarded to the app.
|
|
825
|
+
*/
|
|
826
|
+
protected async getAppInitData(): Promise<AppEmbedAppInitData> {
|
|
827
|
+
const defaultAppInitData = await super.getAppInitData();
|
|
828
|
+
return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
|
|
829
|
+
}
|
|
830
|
+
|
|
786
831
|
/**
|
|
787
832
|
* Constructs a map of parameters to be passed on to the
|
|
788
833
|
* embedded Liveboard or visualization.
|
|
@@ -834,11 +879,11 @@ export class AppEmbed extends V1Embed {
|
|
|
834
879
|
isCentralizedLiveboardFilterUXEnabled = false,
|
|
835
880
|
isLinkParametersEnabled,
|
|
836
881
|
updatedSpotterChatPrompt,
|
|
837
|
-
spotterSidebarConfig,
|
|
838
882
|
spotterChatConfig,
|
|
839
883
|
minimumHeight,
|
|
840
884
|
isThisPeriodInDateFiltersEnabled,
|
|
841
|
-
enableHomepageAnnouncement,
|
|
885
|
+
enableHomepageAnnouncement = false,
|
|
886
|
+
isContinuousLiveboardPDFEnabled,
|
|
842
887
|
} = this.viewConfig;
|
|
843
888
|
|
|
844
889
|
let params: any = {};
|
|
@@ -867,53 +912,6 @@ export class AppEmbed extends V1Embed {
|
|
|
867
912
|
params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
|
|
868
913
|
}
|
|
869
914
|
|
|
870
|
-
const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
|
|
871
|
-
spotterSidebarConfigValue: spotterSidebarConfig?.enablePastConversationsSidebar,
|
|
872
|
-
standaloneValue: this.viewConfig.enablePastConversationsSidebar,
|
|
873
|
-
});
|
|
874
|
-
setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
|
|
875
|
-
|
|
876
|
-
// Handle spotterSidebarConfig params
|
|
877
|
-
if (spotterSidebarConfig) {
|
|
878
|
-
const {
|
|
879
|
-
spotterSidebarTitle,
|
|
880
|
-
spotterSidebarDefaultExpanded,
|
|
881
|
-
spotterChatRenameLabel,
|
|
882
|
-
spotterChatDeleteLabel,
|
|
883
|
-
spotterDeleteConversationModalTitle,
|
|
884
|
-
spotterPastConversationAlertMessage,
|
|
885
|
-
spotterDocumentationUrl,
|
|
886
|
-
spotterBestPracticesLabel,
|
|
887
|
-
spotterConversationsBatchSize,
|
|
888
|
-
spotterNewChatButtonTitle,
|
|
889
|
-
} = spotterSidebarConfig;
|
|
890
|
-
|
|
891
|
-
setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
|
|
892
|
-
setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
|
|
893
|
-
setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
|
|
894
|
-
setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
|
|
895
|
-
setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
|
|
896
|
-
setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
|
|
897
|
-
setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
|
|
898
|
-
setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
|
|
899
|
-
setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
|
|
900
|
-
|
|
901
|
-
// URL param with validation
|
|
902
|
-
if (spotterDocumentationUrl !== undefined) {
|
|
903
|
-
const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
|
|
904
|
-
if (isValid) {
|
|
905
|
-
params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
|
|
906
|
-
} else {
|
|
907
|
-
this.handleError({
|
|
908
|
-
errorType: ErrorDetailsTypes.VALIDATION_ERROR,
|
|
909
|
-
message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
910
|
-
code: EmbedErrorCodes.INVALID_URL,
|
|
911
|
-
error: validationError?.message || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
|
|
917
915
|
// Handle spotterChatConfig params
|
|
918
916
|
if (spotterChatConfig) {
|
|
919
917
|
const {
|
|
@@ -1017,6 +1015,10 @@ export class AppEmbed extends V1Embed {
|
|
|
1017
1015
|
params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
|
|
1018
1016
|
}
|
|
1019
1017
|
|
|
1018
|
+
if (isContinuousLiveboardPDFEnabled !== undefined) {
|
|
1019
|
+
params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1020
1022
|
this.defaultHeight = minimumHeight || this.defaultHeight;
|
|
1021
1023
|
|
|
1022
1024
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
@@ -1085,7 +1087,10 @@ export class AppEmbed extends V1Embed {
|
|
|
1085
1087
|
|
|
1086
1088
|
private sendFullHeightLazyLoadData = () => {
|
|
1087
1089
|
const data = calculateVisibleElementData(this.iFrame);
|
|
1088
|
-
this
|
|
1090
|
+
// this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
|
|
1091
|
+
if(this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight){
|
|
1092
|
+
this.trigger(HostEvent.VisibleEmbedCoordinates, data);
|
|
1093
|
+
}
|
|
1089
1094
|
}
|
|
1090
1095
|
|
|
1091
1096
|
/**
|
package/src/embed/base.spec.ts
CHANGED
package/src/embed/base.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Copyright (c) 2022
|
|
5
3
|
*
|
|
@@ -115,7 +113,6 @@ export const prefetch = (
|
|
|
115
113
|
additionalFlags?: { [key: string]: string | number | boolean },
|
|
116
114
|
): void => {
|
|
117
115
|
if (url === '') {
|
|
118
|
-
|
|
119
116
|
logger.warn('The prefetch method does not have a valid URL');
|
|
120
117
|
} else {
|
|
121
118
|
const features = prefetchFeatures || [PrefetchFeatures.FullApp];
|
|
@@ -322,7 +319,7 @@ export const renderInQueue = (fn: (next?: (val?: any) => void) => Promise<any>):
|
|
|
322
319
|
return renderQueue;
|
|
323
320
|
}
|
|
324
321
|
// Sending an empty function to keep it consistent with the above usage.
|
|
325
|
-
return fn(() => {});
|
|
322
|
+
return fn(() => {});
|
|
326
323
|
};
|
|
327
324
|
|
|
328
325
|
/**
|