@thoughtspot/visual-embed-sdk 1.20.2 → 1.20.3
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 +171 -0
- package/cjs/src/auth.d.ts +183 -0
- package/cjs/src/auth.d.ts.map +1 -0
- package/cjs/src/auth.js +457 -0
- package/cjs/src/auth.js.map +1 -0
- package/cjs/src/auth.spec.d.ts +13 -0
- package/cjs/src/auth.spec.d.ts.map +1 -0
- package/cjs/src/auth.spec.js +397 -0
- package/cjs/src/auth.spec.js.map +1 -0
- package/cjs/src/config.d.ts +22 -0
- package/cjs/src/config.d.ts.map +1 -0
- package/cjs/src/config.js +70 -0
- package/cjs/src/config.js.map +1 -0
- package/cjs/src/config.spec.d.ts +5 -0
- package/cjs/src/config.spec.d.ts.map +1 -0
- package/cjs/src/config.spec.js +65 -0
- package/cjs/src/config.spec.js.map +1 -0
- package/cjs/src/embed/app.d.ts +168 -0
- package/cjs/src/embed/app.d.ts.map +1 -0
- package/cjs/src/embed/app.js +215 -0
- package/cjs/src/embed/app.js.map +1 -0
- package/cjs/src/embed/app.spec.d.ts +2 -0
- package/cjs/src/embed/app.spec.d.ts.map +1 -0
- package/cjs/src/embed/app.spec.js +239 -0
- package/cjs/src/embed/app.spec.js.map +1 -0
- package/cjs/src/embed/base.d.ts +79 -0
- package/cjs/src/embed/base.d.ts.map +1 -0
- package/cjs/src/embed/base.js +229 -0
- package/cjs/src/embed/base.js.map +1 -0
- package/cjs/src/embed/base.spec.d.ts +2 -0
- package/cjs/src/embed/base.spec.d.ts.map +1 -0
- package/cjs/src/embed/base.spec.js +198 -0
- package/cjs/src/embed/base.spec.js.map +1 -0
- package/cjs/src/embed/embed.spec.d.ts +2 -0
- package/cjs/src/embed/embed.spec.d.ts.map +1 -0
- package/cjs/src/embed/embed.spec.js +74 -0
- package/cjs/src/embed/embed.spec.js.map +1 -0
- package/cjs/src/embed/events.spec.d.ts +2 -0
- package/cjs/src/embed/events.spec.d.ts.map +1 -0
- package/cjs/src/embed/events.spec.js +238 -0
- package/cjs/src/embed/events.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +150 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -0
- package/cjs/src/embed/liveboard.js +168 -0
- package/cjs/src/embed/liveboard.js.map +1 -0
- package/cjs/src/embed/liveboard.spec.d.ts +2 -0
- package/cjs/src/embed/liveboard.spec.d.ts.map +1 -0
- package/cjs/src/embed/liveboard.spec.js +229 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -0
- package/cjs/src/embed/pinboard.spec.d.ts +2 -0
- package/cjs/src/embed/pinboard.spec.d.ts.map +1 -0
- package/cjs/src/embed/pinboard.spec.js +148 -0
- package/cjs/src/embed/pinboard.spec.js.map +1 -0
- package/cjs/src/embed/search-bar.d.ts +50 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -0
- package/cjs/src/embed/search-bar.js +63 -0
- package/cjs/src/embed/search-bar.js.map +1 -0
- package/cjs/src/embed/search.d.ts +129 -0
- package/cjs/src/embed/search.d.ts.map +1 -0
- package/cjs/src/embed/search.js +121 -0
- package/cjs/src/embed/search.js.map +1 -0
- package/cjs/src/embed/search.spec.d.ts +2 -0
- package/cjs/src/embed/search.spec.d.ts.map +1 -0
- package/cjs/src/embed/search.spec.js +238 -0
- package/cjs/src/embed/search.spec.js.map +1 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js +103 -0
- package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
- package/cjs/src/embed/ts-embed.d.ts +323 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -0
- package/cjs/src/embed/ts-embed.js +719 -0
- package/cjs/src/embed/ts-embed.js.map +1 -0
- package/cjs/src/embed/ts-embed.spec.d.ts +2 -0
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -0
- package/cjs/src/embed/ts-embed.spec.js +771 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -0
- package/cjs/src/errors.d.ts +7 -0
- package/cjs/src/errors.d.ts.map +1 -0
- package/cjs/src/errors.js +10 -0
- package/cjs/src/errors.js.map +1 -0
- package/cjs/src/index.d.ts +18 -0
- package/cjs/src/index.d.ts.map +1 -0
- package/cjs/src/index.js +42 -0
- package/cjs/src/index.js.map +1 -0
- package/cjs/src/mixpanel-service.d.ts +29 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -0
- package/cjs/src/mixpanel-service.js +76 -0
- package/cjs/src/mixpanel-service.js.map +1 -0
- package/cjs/src/mixpanel-service.spec.d.ts +2 -0
- package/cjs/src/mixpanel-service.spec.d.ts.map +1 -0
- package/cjs/src/mixpanel-service.spec.js +63 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -0
- package/cjs/src/react/all-types-export.d.ts +3 -0
- package/cjs/src/react/all-types-export.d.ts.map +1 -0
- package/cjs/src/react/all-types-export.js +29 -0
- package/cjs/src/react/all-types-export.js.map +1 -0
- package/cjs/src/react/all-types-export.spec.d.ts +2 -0
- package/cjs/src/react/all-types-export.spec.d.ts.map +1 -0
- package/cjs/src/react/all-types-export.spec.js +13 -0
- package/cjs/src/react/all-types-export.spec.js.map +1 -0
- package/cjs/src/react/index.d.ts +95 -0
- package/cjs/src/react/index.d.ts.map +1 -0
- package/cjs/src/react/index.js +121 -0
- package/cjs/src/react/index.js.map +1 -0
- package/cjs/src/react/index.spec.d.ts +3 -0
- package/cjs/src/react/index.spec.d.ts.map +1 -0
- package/cjs/src/react/index.spec.js +138 -0
- package/cjs/src/react/index.spec.js.map +1 -0
- package/cjs/src/react/util.d.ts +19 -0
- package/cjs/src/react/util.d.ts.map +1 -0
- package/cjs/src/react/util.js +25 -0
- package/cjs/src/react/util.js.map +1 -0
- package/cjs/src/test/test-utils.d.ts +48 -0
- package/cjs/src/test/test-utils.d.ts.map +1 -0
- package/cjs/src/test/test-utils.js +108 -0
- package/cjs/src/test/test-utils.js.map +1 -0
- package/cjs/src/types.d.ts +2020 -0
- package/cjs/src/types.d.ts.map +1 -0
- package/cjs/src/types.js +1543 -0
- package/cjs/src/types.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/processData.d.ts +16 -0
- package/cjs/src/utils/processData.d.ts.map +1 -0
- package/cjs/src/utils/processData.js +110 -0
- package/cjs/src/utils/processData.js.map +1 -0
- package/cjs/src/utils/processData.spec.d.ts +2 -0
- package/cjs/src/utils/processData.spec.d.ts.map +1 -0
- package/cjs/src/utils/processData.spec.js +142 -0
- package/cjs/src/utils/processData.spec.js.map +1 -0
- package/cjs/src/utils/processTrigger.d.ts +10 -0
- package/cjs/src/utils/processTrigger.d.ts.map +1 -0
- package/cjs/src/utils/processTrigger.js +63 -0
- package/cjs/src/utils/processTrigger.js.map +1 -0
- package/cjs/src/utils/processTrigger.spec.d.ts +2 -0
- package/cjs/src/utils/processTrigger.spec.d.ts.map +1 -0
- package/cjs/src/utils/processTrigger.spec.js +58 -0
- package/cjs/src/utils/processTrigger.spec.js.map +1 -0
- package/cjs/src/utils.d.ts +68 -0
- package/cjs/src/utils.d.ts.map +1 -0
- package/cjs/src/utils.js +196 -0
- package/cjs/src/utils.js.map +1 -0
- package/cjs/src/utils.spec.d.ts +5 -0
- package/cjs/src/utils.spec.d.ts.map +1 -0
- package/cjs/src/utils.spec.js +98 -0
- package/cjs/src/utils.spec.js.map +1 -0
- package/dist/src/auth.d.ts +54 -5
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/auth.spec.d.ts +3 -0
- package/dist/src/auth.spec.d.ts.map +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +35 -6
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +20 -9
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +17 -5
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts +3 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +9 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +65 -7
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +8 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +3 -0
- package/dist/src/react/all-types-export.d.ts.map +1 -0
- package/dist/src/react/all-types-export.spec.d.ts +2 -0
- package/dist/src/react/all-types-export.spec.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +72 -0
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/util.d.ts +4 -0
- package/dist/src/react/util.d.ts.map +1 -1
- package/dist/src/test/test-utils.d.ts +11 -2
- package/dist/src/test/test-utils.d.ts.map +1 -1
- package/dist/src/types.d.ts +499 -96
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/answerService.d.ts +7 -0
- package/dist/src/utils/answerService.d.ts.map +1 -1
- package/dist/src/utils/authService.d.ts +30 -0
- package/dist/src/utils/authService.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +12 -0
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +7 -0
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils.d.ts +12 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +28024 -0
- package/dist/tsembed-react.js +27966 -0
- package/dist/tsembed.es.js +18114 -305
- package/dist/tsembed.js +18088 -327
- package/dist/visual-embed-sdk-react-full.d.ts +3092 -0
- package/dist/visual-embed-sdk-react.d.ts +2781 -0
- package/dist/visual-embed-sdk.d.ts +2944 -0
- package/lib/package.json +15 -14
- package/lib/src/auth.d.ts +54 -5
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +91 -31
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.d.ts +3 -0
- package/lib/src/auth.spec.d.ts.map +1 -1
- package/lib/src/auth.spec.js +37 -6
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/config.d.ts +1 -0
- package/lib/src/config.d.ts.map +1 -1
- package/lib/src/config.js +5 -3
- package/lib/src/config.js.map +1 -1
- package/lib/src/config.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +35 -6
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +55 -16
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +41 -12
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +20 -9
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +31 -15
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +1 -1
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +17 -5
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +49 -37
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +37 -30
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +14 -26
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts +3 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +5 -6
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +9 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +18 -14
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +16 -19
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
- package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +65 -7
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +154 -77
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +46 -24
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +4 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +8 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +13 -1
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +3 -0
- package/lib/src/react/all-types-export.d.ts.map +1 -0
- package/lib/src/react/all-types-export.js +5 -0
- package/lib/src/react/all-types-export.js.map +1 -0
- package/lib/src/react/all-types-export.spec.d.ts +2 -0
- package/lib/src/react/all-types-export.spec.d.ts.map +1 -0
- package/lib/src/react/all-types-export.spec.js +10 -0
- package/lib/src/react/all-types-export.spec.js.map +1 -0
- package/lib/src/react/index.d.ts +72 -0
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +79 -7
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +27 -6
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/react/util.d.ts +4 -0
- package/lib/src/react/util.d.ts.map +1 -1
- package/lib/src/react/util.js +4 -0
- package/lib/src/react/util.js.map +1 -1
- package/lib/src/test/test-utils.d.ts +11 -2
- package/lib/src/test/test-utils.d.ts.map +1 -1
- package/lib/src/test/test-utils.js +36 -25
- package/lib/src/test/test-utils.js.map +1 -1
- package/lib/src/types.d.ts +499 -96
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +374 -68
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/answerService.d.ts +7 -0
- package/lib/src/utils/answerService.d.ts.map +1 -1
- package/lib/src/utils/answerService.js +7 -0
- package/lib/src/utils/answerService.js.map +1 -1
- package/lib/src/utils/answerService.spec.js.map +1 -1
- package/lib/src/utils/authService.d.ts +30 -0
- package/lib/src/utils/authService.d.ts.map +1 -1
- package/lib/src/utils/authService.js +39 -2
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/processData.d.ts +12 -0
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +33 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +7 -0
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +17 -3
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/processTrigger.spec.js.map +1 -1
- package/lib/src/utils.d.ts +12 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +24 -19
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/package.json +15 -14
- package/src/auth.spec.ts +83 -133
- package/src/auth.ts +148 -115
- package/src/config.spec.ts +2 -4
- package/src/config.ts +5 -3
- package/src/embed/app.spec.ts +57 -14
- package/src/embed/app.ts +91 -36
- package/src/embed/base.spec.ts +3 -9
- package/src/embed/base.ts +51 -53
- package/src/embed/embed.spec.ts +5 -6
- package/src/embed/liveboard.spec.ts +56 -37
- package/src/embed/liveboard.ts +66 -64
- package/src/embed/pinboard.spec.ts +26 -29
- package/src/embed/search-bar.tsx +10 -8
- package/src/embed/search.spec.ts +31 -21
- package/src/embed/search.ts +26 -20
- package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
- package/src/embed/ts-embed.spec.ts +99 -144
- package/src/embed/ts-embed.ts +188 -162
- package/src/errors.ts +3 -6
- package/src/index.ts +6 -10
- package/src/mixpanel-service.spec.ts +1 -3
- package/src/mixpanel-service.ts +13 -1
- package/src/react/index.spec.tsx +66 -13
- package/src/react/index.tsx +111 -62
- package/src/react/util.ts +8 -4
- package/src/test/test-utils.ts +43 -39
- package/src/types.ts +498 -98
- package/src/utils/answerService.spec.ts +3 -5
- package/src/utils/answerService.ts +21 -17
- package/src/utils/authService.spec.ts +26 -41
- package/src/utils/authService.ts +47 -21
- package/src/utils/processData.spec.ts +26 -59
- package/src/utils/processData.ts +36 -14
- package/src/utils/processTrigger.spec.ts +1 -6
- package/src/utils/processTrigger.ts +18 -9
- package/src/utils.spec.ts +8 -12
- package/src/utils.ts +25 -26
- package/lib/src/visual-embed-sdk.d.ts +0 -2419
package/src/types.ts
CHANGED
|
@@ -10,28 +10,42 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* The authentication mechanism for allowing access to the
|
|
12
12
|
* the embedded app
|
|
13
|
+
*
|
|
13
14
|
* @group Authentication / Init
|
|
14
15
|
*/
|
|
15
16
|
// eslint-disable-next-line no-shadow
|
|
16
17
|
export enum AuthType {
|
|
17
18
|
/**
|
|
18
|
-
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
19
|
+
* No authentication on the SDK. Passthrough to the embedded App. Alias for
|
|
20
|
+
* `Passthrough`.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```js
|
|
24
|
+
* init({
|
|
25
|
+
* // ...
|
|
26
|
+
* authType: AuthType.None,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
19
29
|
*/
|
|
20
30
|
None = 'None',
|
|
21
31
|
/**
|
|
22
|
-
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
23
|
-
* be supported by all IDPs. This will behave like `None`
|
|
32
|
+
* Passthrough SSO to the embedded App within the iframe. Requires least
|
|
33
|
+
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
34
|
+
* if SSO is not configured on ThoughtSpot.
|
|
35
|
+
*
|
|
24
36
|
* @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
|
|
25
37
|
*/
|
|
26
38
|
EmbeddedSSO = 'EmbeddedSSO',
|
|
27
39
|
/**
|
|
28
40
|
* SSO using SAML
|
|
41
|
+
*
|
|
29
42
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
30
43
|
* @hidden
|
|
31
44
|
*/
|
|
32
45
|
SSO = 'SSO_SAML',
|
|
33
46
|
/**
|
|
34
47
|
* SSO using SAML
|
|
48
|
+
*
|
|
35
49
|
* @deprecated Use {@link SAMLRedirect} instead
|
|
36
50
|
* @hidden
|
|
37
51
|
*/
|
|
@@ -43,6 +57,7 @@ export enum AuthType {
|
|
|
43
57
|
*
|
|
44
58
|
* This redirects the host application to the SAML Idp. The host application
|
|
45
59
|
* will be redirected back to the ThoughtSpot app after authentication.
|
|
60
|
+
*
|
|
46
61
|
* @example
|
|
47
62
|
* ```js
|
|
48
63
|
* init({
|
|
@@ -83,6 +98,7 @@ export enum AuthType {
|
|
|
83
98
|
SAMLRedirect = 'SSO_SAML',
|
|
84
99
|
/**
|
|
85
100
|
* SSO using OIDC
|
|
101
|
+
*
|
|
86
102
|
* @hidden
|
|
87
103
|
* @deprecated Use {@link OIDCRedirect} instead
|
|
88
104
|
*/
|
|
@@ -95,14 +111,15 @@ export enum AuthType {
|
|
|
95
111
|
OIDCRedirect = 'SSO_OIDC',
|
|
96
112
|
/**
|
|
97
113
|
* Trusted authentication server
|
|
114
|
+
*
|
|
98
115
|
* @hidden
|
|
99
116
|
* @deprecated Use {@link TrustedAuth} instead
|
|
100
117
|
*/
|
|
101
118
|
AuthServer = 'AuthServer',
|
|
102
119
|
/**
|
|
103
120
|
* Trusted authentication server, Use your own authentication server
|
|
104
|
-
* which returns a bearer token, generated using the secret_key obtained
|
|
105
|
-
* ThoughtSpot.
|
|
121
|
+
* which returns a bearer token, generated using the secret_key obtained
|
|
122
|
+
* from ThoughtSpot.
|
|
106
123
|
*
|
|
107
124
|
* @example
|
|
108
125
|
* ```js
|
|
@@ -118,10 +135,24 @@ export enum AuthType {
|
|
|
118
135
|
*/
|
|
119
136
|
TrustedAuthToken = 'AuthServer',
|
|
120
137
|
/**
|
|
121
|
-
* Trusted authentication server Cookieless, Use you own authentication
|
|
122
|
-
* which returns a bearer token, generated using the secret_key
|
|
123
|
-
* ThoughtSpot. This uses a cookieless authentication
|
|
124
|
-
* to by pass third-party cookie-blocking restriction
|
|
138
|
+
* Trusted authentication server Cookieless, Use you own authentication
|
|
139
|
+
* server which returns a bearer token, generated using the secret_key
|
|
140
|
+
* obtained from ThoughtSpot. This uses a cookieless authentication
|
|
141
|
+
* approach, recommended to by pass third-party cookie-blocking restriction
|
|
142
|
+
* implemented by some browsers
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```js
|
|
146
|
+
* init({
|
|
147
|
+
* // ...
|
|
148
|
+
* authType: AuthType.TrustedAuthTokenCookieless,
|
|
149
|
+
* getAuthToken: () => {
|
|
150
|
+
* return fetch('https://my-backend.app/ts-token')
|
|
151
|
+
* .then((response) => response.json())
|
|
152
|
+
* .then((data) => data.token);
|
|
153
|
+
* }
|
|
154
|
+
* ```
|
|
155
|
+
* @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1-sw
|
|
125
156
|
*/
|
|
126
157
|
TrustedAuthTokenCookieless = 'AuthServerCookieless',
|
|
127
158
|
/**
|
|
@@ -229,8 +260,8 @@ export interface EmbedConfig {
|
|
|
229
260
|
*/
|
|
230
261
|
getAuthToken?: () => Promise<string>;
|
|
231
262
|
/**
|
|
232
|
-
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
233
|
-
* required for trusted authentication.
|
|
263
|
+
* [AuthServer / Basic] The user name of the ThoughtSpot user. This
|
|
264
|
+
* attribute is required for trusted authentication.
|
|
234
265
|
*/
|
|
235
266
|
username?: string;
|
|
236
267
|
|
|
@@ -243,8 +274,9 @@ export interface EmbedConfig {
|
|
|
243
274
|
password?: string;
|
|
244
275
|
|
|
245
276
|
/**
|
|
246
|
-
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
247
|
-
* flow in a popup, instead of redirecting browser in
|
|
277
|
+
* [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
|
|
278
|
+
* open the SAML auth flow in a popup, instead of redirecting browser in
|
|
279
|
+
* place.
|
|
248
280
|
*
|
|
249
281
|
* @default false
|
|
250
282
|
* @deprecated
|
|
@@ -252,8 +284,11 @@ export interface EmbedConfig {
|
|
|
252
284
|
noRedirect?: boolean;
|
|
253
285
|
|
|
254
286
|
/**
|
|
255
|
-
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
256
|
-
* flow in a popup, instead of redirecting browser in place.
|
|
287
|
+
* [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
|
|
288
|
+
* the SAML auth flow in a popup, instead of redirecting browser in place.
|
|
289
|
+
*
|
|
290
|
+
* Need to use this with authTriggerContainer. Or manually trigger
|
|
291
|
+
* the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
|
|
257
292
|
*
|
|
258
293
|
* @default false
|
|
259
294
|
* @version SDK: 1.18.0
|
|
@@ -266,6 +301,7 @@ export interface EmbedConfig {
|
|
|
266
301
|
* terminated.
|
|
267
302
|
*
|
|
268
303
|
* Eg: "/dashboard", "#/foo" [Do not include the host]
|
|
304
|
+
*
|
|
269
305
|
* @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
|
|
270
306
|
*/
|
|
271
307
|
redirectPath?: string;
|
|
@@ -277,28 +313,34 @@ export interface EmbedConfig {
|
|
|
277
313
|
* Should we encode URL Query Params using base64 encoding which thoughtspot
|
|
278
314
|
* will generate for embedding. This provides additional security to
|
|
279
315
|
* thoughtspot clusters against Cross site scripting attacks.
|
|
316
|
+
*
|
|
280
317
|
* @default false
|
|
281
318
|
*/
|
|
282
319
|
shouldEncodeUrlQueryParams?: boolean;
|
|
283
320
|
|
|
284
321
|
/**
|
|
285
|
-
* Suppress cookie access alert when third party cookies are blocked by the
|
|
286
|
-
* Third party cookie blocking is the default behaviour on
|
|
287
|
-
* If you set this to `true`, you are
|
|
322
|
+
* Suppress cookie access alert when third party cookies are blocked by the
|
|
323
|
+
* user's browser. Third party cookie blocking is the default behaviour on
|
|
324
|
+
* Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
|
|
325
|
+
* encouraged to handle `noCookieAccess` event, to show your own treatment
|
|
288
326
|
* in this case.
|
|
327
|
+
*
|
|
289
328
|
* @default false
|
|
290
329
|
*/
|
|
291
330
|
suppressNoCookieAccessAlert?: boolean;
|
|
292
331
|
|
|
293
332
|
/**
|
|
294
333
|
* Re-login when session expires with the previous login options
|
|
334
|
+
*
|
|
295
335
|
* @default false
|
|
296
336
|
*/
|
|
297
337
|
autoLogin?: boolean;
|
|
298
338
|
|
|
299
339
|
/**
|
|
300
340
|
* Disable redirection to the login page when the embedded session expires
|
|
301
|
-
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
341
|
+
* This flag is typically used alongside the combination of auth modes such as {@link
|
|
342
|
+
* AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
|
|
343
|
+
*
|
|
302
344
|
* @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
303
345
|
* @default false
|
|
304
346
|
*/
|
|
@@ -306,20 +348,23 @@ export interface EmbedConfig {
|
|
|
306
348
|
|
|
307
349
|
/**
|
|
308
350
|
* This message is displayed on the embed view when the login fails.
|
|
351
|
+
*
|
|
309
352
|
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
310
353
|
*/
|
|
311
354
|
loginFailedMessage?: string;
|
|
312
355
|
|
|
313
356
|
/**
|
|
314
357
|
* Calls the prefetch method internally when set to true
|
|
358
|
+
*
|
|
315
359
|
* @default false
|
|
316
360
|
*/
|
|
317
361
|
callPrefetch?: boolean;
|
|
318
362
|
|
|
319
363
|
/**
|
|
320
364
|
* When there are multiple embeds, queue the render of embed to start
|
|
321
|
-
* after the previous embed's render is complete. This helps in the load
|
|
322
|
-
* by decreasing the load on the browser.
|
|
365
|
+
* after the previous embed's render is complete. This helps in the load
|
|
366
|
+
* performance by decreasing the load on the browser.
|
|
367
|
+
*
|
|
323
368
|
* @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
324
369
|
* @default false
|
|
325
370
|
*/
|
|
@@ -328,15 +373,19 @@ export interface EmbedConfig {
|
|
|
328
373
|
/**
|
|
329
374
|
* Dynamic CSS Url to be injected in the loaded application.
|
|
330
375
|
* You would also need to set `style-src` in the CSP settings.
|
|
376
|
+
*
|
|
331
377
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
332
378
|
* @default ''
|
|
333
379
|
*/
|
|
334
380
|
customCssUrl?: string;
|
|
335
381
|
/**
|
|
336
|
-
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
337
|
-
* and should be avoided. Listen to the
|
|
382
|
+
* [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
|
|
383
|
+
* additional call. This is slower and should be avoided. Listen to the
|
|
384
|
+
* NO_COOKIE_ACCESS event to handle the situation.
|
|
385
|
+
*
|
|
386
|
+
* This is slightly slower than letting the browser handle the cookie check, as it
|
|
387
|
+
* involves an extra network call.
|
|
338
388
|
*
|
|
339
|
-
* This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
|
|
340
389
|
* @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
341
390
|
*/
|
|
342
391
|
detectCookieAccessSlow?: boolean;
|
|
@@ -354,23 +403,39 @@ export interface EmbedConfig {
|
|
|
354
403
|
*/
|
|
355
404
|
customizations?: CustomisationsInterface;
|
|
356
405
|
/**
|
|
357
|
-
* For
|
|
406
|
+
* For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
|
|
358
407
|
* click to trigger the flow. This is the containing element
|
|
359
408
|
* for that button.
|
|
360
409
|
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```js
|
|
412
|
+
* init({
|
|
413
|
+
* authType: AuthType.SAMLRedirect,
|
|
414
|
+
* inPopup: true,
|
|
415
|
+
* authTriggerContainer: '#auth-trigger-container'
|
|
416
|
+
* })
|
|
417
|
+
* ```
|
|
361
418
|
* @version SDK: 1.17.0 | ThoughtSpot: *
|
|
362
419
|
*/
|
|
363
420
|
authTriggerContainer?: string | HTMLElement;
|
|
421
|
+
/**
|
|
422
|
+
* Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
|
|
423
|
+
* SAML popup. This is useful when you want to trigger the popup on a custom user
|
|
424
|
+
* action.
|
|
425
|
+
*
|
|
426
|
+
*/
|
|
427
|
+
useEventForSAMLPopup?: boolean;
|
|
364
428
|
/**
|
|
365
429
|
* Text to show in the button which triggers the popup auth flow.
|
|
366
430
|
* Default: "Authorize".
|
|
431
|
+
*
|
|
367
432
|
* @version SDK: 1.17.0 | ThoughtSpot: *
|
|
368
433
|
*/
|
|
369
434
|
authTriggerText?: string;
|
|
370
435
|
}
|
|
371
436
|
|
|
372
437
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
373
|
-
export interface LayoutConfig {}
|
|
438
|
+
export interface LayoutConfig { }
|
|
374
439
|
|
|
375
440
|
/**
|
|
376
441
|
* Embedded iFrame configuration
|
|
@@ -408,7 +473,8 @@ export interface ViewConfig {
|
|
|
408
473
|
*/
|
|
409
474
|
layoutConfig?: LayoutConfig;
|
|
410
475
|
/**
|
|
411
|
-
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
476
|
+
* The <b>width</b> and <b>height</b> dimensions to render an embedded
|
|
477
|
+
* object inside your app. Specify the values in pixels or percentage.
|
|
412
478
|
*/
|
|
413
479
|
frameParams?: FrameParams;
|
|
414
480
|
/**
|
|
@@ -422,7 +488,17 @@ export interface ViewConfig {
|
|
|
422
488
|
styleSheet__unstable?: string;
|
|
423
489
|
/**
|
|
424
490
|
* The list of actions to disable from the primary menu, more menu
|
|
425
|
-
* (...), and the contextual menu.
|
|
491
|
+
* (...), and the contextual menu. These actions will be disabled
|
|
492
|
+
* for the user.
|
|
493
|
+
* Use this to disable actions.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```js
|
|
497
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
498
|
+
* ... // other liveboard view config
|
|
499
|
+
* disabledActions: [Action.Download, Action.Save]
|
|
500
|
+
* });
|
|
501
|
+
* ```
|
|
426
502
|
*/
|
|
427
503
|
disabledActions?: Action[];
|
|
428
504
|
/**
|
|
@@ -430,18 +506,35 @@ export interface ViewConfig {
|
|
|
430
506
|
*/
|
|
431
507
|
disabledActionReason?: string;
|
|
432
508
|
/**
|
|
433
|
-
* The list of actions to hide from the
|
|
434
|
-
*
|
|
509
|
+
* The list of actions to hide from the embedded.
|
|
510
|
+
* This actions will be hidden from the user.
|
|
511
|
+
* Use this to hide an action.
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```js
|
|
515
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
516
|
+
* ... // other liveboard view config
|
|
517
|
+
* hiddenActions: [Action.Download, Action.Export]
|
|
518
|
+
* });
|
|
519
|
+
* ```
|
|
520
|
+
* @important
|
|
435
521
|
*/
|
|
436
522
|
hiddenActions?: Action[];
|
|
437
523
|
/**
|
|
438
524
|
* The list of actions to display from the primary menu, more menu
|
|
439
|
-
* (...), and the contextual menu.
|
|
525
|
+
* (...), and the contextual menu. These will be only actions that
|
|
526
|
+
* are visible to the user.
|
|
527
|
+
* Use this to hide all actions except the ones you want to show.
|
|
528
|
+
*
|
|
529
|
+
* Use either this or hiddenActions.
|
|
530
|
+
*
|
|
440
531
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
532
|
+
* @important
|
|
441
533
|
*/
|
|
442
534
|
visibleActions?: Action[];
|
|
443
535
|
/**
|
|
444
536
|
* Show alert messages and toast messages in the embedded view.
|
|
537
|
+
*
|
|
445
538
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
446
539
|
*/
|
|
447
540
|
showAlerts?: boolean;
|
|
@@ -452,6 +545,7 @@ export interface ViewConfig {
|
|
|
452
545
|
runtimeFilters?: RuntimeFilter[];
|
|
453
546
|
/**
|
|
454
547
|
* The locale/language to use for the embedded view.
|
|
548
|
+
*
|
|
455
549
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
|
|
456
550
|
*/
|
|
457
551
|
locale?: string;
|
|
@@ -462,40 +556,57 @@ export interface ViewConfig {
|
|
|
462
556
|
* Warning: This option is for advanced use only and is used internally
|
|
463
557
|
* to control embed behavior in non-regular ways. We do not publish the
|
|
464
558
|
* list of supported keys and values associated with each.
|
|
559
|
+
*
|
|
465
560
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
466
561
|
*/
|
|
467
562
|
additionalFlags?: { [key: string]: string | number | boolean };
|
|
468
563
|
/**
|
|
469
564
|
* Dynamic CSSUrl and customCSS to be injected in the loaded application.
|
|
470
565
|
* You would also need to set `style-src` in the CSP settings.
|
|
566
|
+
*
|
|
471
567
|
* @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
|
|
472
568
|
* @default ''
|
|
473
569
|
*/
|
|
474
570
|
customizations?: CustomisationsInterface;
|
|
475
571
|
/**
|
|
476
|
-
* Insert as a sibling of the target container, instead of appending to a
|
|
572
|
+
* Insert as a sibling of the target container, instead of appending to a
|
|
573
|
+
* child inside it.
|
|
477
574
|
*/
|
|
478
575
|
insertAsSibling?: boolean;
|
|
479
576
|
/**
|
|
480
577
|
* flag to set ContextMenu Trigger to either left or right click.
|
|
578
|
+
*
|
|
481
579
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
482
580
|
*/
|
|
483
581
|
contextMenuTrigger?: ContextMenuTriggerOptions;
|
|
484
582
|
/**
|
|
485
583
|
* flag to override openNew tab context menu link
|
|
584
|
+
*
|
|
486
585
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
487
586
|
*/
|
|
488
587
|
linkOverride?: boolean;
|
|
489
588
|
/**
|
|
490
589
|
* flag to enable insert into slides action
|
|
590
|
+
*
|
|
491
591
|
* @hidden
|
|
492
592
|
* @private
|
|
493
593
|
*/
|
|
494
594
|
insertInToSlide?: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* Use a pre-rendered iframe from a pool of pre-rendered iframes
|
|
597
|
+
* if available and matches the configuration.
|
|
598
|
+
*
|
|
599
|
+
* @version SDK: 1.22.0
|
|
600
|
+
* @hidden
|
|
601
|
+
*
|
|
602
|
+
* See [docs]() on how to create a prerender pool.
|
|
603
|
+
*/
|
|
604
|
+
usePrerenderedIfAvailable?: boolean;
|
|
495
605
|
}
|
|
496
606
|
|
|
497
607
|
/**
|
|
498
608
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
609
|
+
*
|
|
499
610
|
* @group Events
|
|
500
611
|
*/
|
|
501
612
|
export type MessagePayload = {
|
|
@@ -507,28 +618,40 @@ export type MessagePayload = {
|
|
|
507
618
|
status?: string;
|
|
508
619
|
};
|
|
509
620
|
/**
|
|
510
|
-
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
621
|
+
* MessageOptions: By Providing options, getting specific event start / end based on
|
|
622
|
+
* option
|
|
623
|
+
*
|
|
511
624
|
* @group Events
|
|
512
625
|
*/
|
|
513
626
|
export type MessageOptions = {
|
|
514
|
-
|
|
627
|
+
/**
|
|
628
|
+
* A boolean value indicating that start status events of this type
|
|
629
|
+
* will be dispatched
|
|
630
|
+
*/
|
|
515
631
|
start?: boolean;
|
|
516
632
|
};
|
|
517
633
|
/**
|
|
518
634
|
* MessageCallback: Embed event message callback
|
|
635
|
+
*
|
|
519
636
|
* @group Events
|
|
520
637
|
*/
|
|
521
638
|
export type MessageCallback = (
|
|
522
639
|
/* payload: Message payload contain type, data and status */
|
|
523
640
|
payload: MessagePayload,
|
|
524
|
-
|
|
641
|
+
/**
|
|
642
|
+
* responder: Message callback function triggered when embed event
|
|
643
|
+
* initiated
|
|
644
|
+
*/
|
|
525
645
|
responder?: (data: any) => void,
|
|
526
646
|
) => void;
|
|
527
647
|
/**
|
|
528
648
|
* MessageCallbackObj: contains message options & callback function
|
|
529
649
|
*/
|
|
530
650
|
export type MessageCallbackObj = {
|
|
531
|
-
|
|
651
|
+
/**
|
|
652
|
+
* options: It contains start, A boolean value indicating that start
|
|
653
|
+
* status events of this type will be dispatched
|
|
654
|
+
*/
|
|
532
655
|
/* callback: Embed event message callback */
|
|
533
656
|
options: MessageOptions;
|
|
534
657
|
callback: MessageCallback;
|
|
@@ -618,7 +741,8 @@ export interface RuntimeFilter {
|
|
|
618
741
|
operator: RuntimeFilterOp;
|
|
619
742
|
/**
|
|
620
743
|
* The list of operands. Some operators like EQ, LE accept
|
|
621
|
-
* a single operand, whereas other operators like BW and IN accept multiple
|
|
744
|
+
* a single operand, whereas other operators like BW and IN accept multiple
|
|
745
|
+
* operands.
|
|
622
746
|
*/
|
|
623
747
|
values: (number | boolean | string)[];
|
|
624
748
|
}
|
|
@@ -628,83 +752,123 @@ export interface RuntimeFilter {
|
|
|
628
752
|
*
|
|
629
753
|
* To add an event listener use the corresponding
|
|
630
754
|
* {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
|
|
755
|
+
*
|
|
756
|
+
* @example
|
|
757
|
+
* ```js
|
|
758
|
+
* import { EmbedEvent } from '@thoughtspot/visual-embed-sdk';
|
|
759
|
+
* // Or
|
|
760
|
+
* // const { EmbedEvent } = window.tsembed;
|
|
761
|
+
*
|
|
762
|
+
* // create the liveboard embed.
|
|
763
|
+
*
|
|
764
|
+
* liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => {
|
|
765
|
+
* console.log('Drilldown event', drilldown);
|
|
766
|
+
* }));
|
|
767
|
+
* ```
|
|
631
768
|
* @group Events
|
|
632
769
|
*/
|
|
633
770
|
// eslint-disable-next-line no-shadow
|
|
634
771
|
export enum EmbedEvent {
|
|
635
772
|
/**
|
|
636
773
|
* Rendering has initialized.
|
|
637
|
-
*
|
|
774
|
+
*
|
|
775
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
638
776
|
*/
|
|
639
777
|
Init = 'init',
|
|
640
778
|
/**
|
|
641
779
|
* Authentication has either succeeded or failed.
|
|
642
|
-
*
|
|
780
|
+
*
|
|
781
|
+
* @returns isLoggedIn - A Boolean specifying whether authentication was successful.
|
|
643
782
|
*/
|
|
644
783
|
AuthInit = 'authInit',
|
|
645
784
|
/**
|
|
646
785
|
* The embed object container has loaded.
|
|
647
|
-
*
|
|
786
|
+
*
|
|
787
|
+
* @returns timestamp - The timestamp when the event was generated.
|
|
648
788
|
*/
|
|
649
789
|
Load = 'load',
|
|
650
790
|
/**
|
|
651
791
|
* Data pertaining to answer or Liveboard is received
|
|
792
|
+
*
|
|
652
793
|
* @return data - The answer or Liveboard data
|
|
794
|
+
* @important
|
|
653
795
|
*/
|
|
654
796
|
Data = 'data',
|
|
655
797
|
/**
|
|
656
|
-
* Search/answer/Liveboard filters have been applied/updated
|
|
798
|
+
* Search/answer/Liveboard filters have been applied/updated by the user.
|
|
799
|
+
*
|
|
657
800
|
* @hidden
|
|
658
801
|
*/
|
|
659
802
|
FiltersChanged = 'filtersChanged',
|
|
660
803
|
/**
|
|
661
|
-
* Search query has been updated
|
|
804
|
+
* Search query has been updated by the user.
|
|
662
805
|
*/
|
|
663
806
|
QueryChanged = 'queryChanged',
|
|
664
807
|
/**
|
|
665
808
|
* A drill down operation has been performed.
|
|
666
|
-
*
|
|
667
|
-
* @
|
|
668
|
-
* @
|
|
809
|
+
*
|
|
810
|
+
* @returns additionalFilters - Any additional filters applied
|
|
811
|
+
* @returns drillDownColumns - The columns on which drill down was performed
|
|
812
|
+
* @returns nonFilteredColumns - The columns that were not filtered
|
|
669
813
|
*/
|
|
670
814
|
Drilldown = 'drillDown',
|
|
671
815
|
/**
|
|
672
816
|
* One or more data sources have been selected.
|
|
673
|
-
*
|
|
817
|
+
*
|
|
818
|
+
* @returns dataSourceIds - the list of data sources
|
|
674
819
|
*/
|
|
675
820
|
DataSourceSelected = 'dataSourceSelected',
|
|
676
821
|
/**
|
|
677
822
|
* One or more data columns have been selected.
|
|
678
|
-
*
|
|
823
|
+
*
|
|
824
|
+
* @returns columnIds - the list of columns
|
|
679
825
|
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
680
826
|
*/
|
|
681
827
|
AddRemoveColumns = 'addRemoveColumns',
|
|
682
828
|
/**
|
|
683
829
|
* A custom action has been triggered
|
|
684
|
-
*
|
|
685
|
-
* @
|
|
830
|
+
*
|
|
831
|
+
* @returns actionId - The id of the custom action
|
|
832
|
+
* @returns data - The answer or Liveboard data
|
|
686
833
|
*/
|
|
687
834
|
CustomAction = 'customAction',
|
|
688
835
|
/**
|
|
689
|
-
*
|
|
836
|
+
* Listen to double clicks on a visualization
|
|
837
|
+
*
|
|
690
838
|
* @return ContextMenuInputPoints - data point that is double clicked
|
|
691
839
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
692
840
|
*/
|
|
693
841
|
VizPointDoubleClick = 'vizPointDoubleClick',
|
|
694
842
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
843
|
+
* Listen to clicks on a visualization in a liveboard or Search result.
|
|
844
|
+
*
|
|
845
|
+
* @example
|
|
846
|
+
* ```js
|
|
847
|
+
* embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
|
|
848
|
+
* console.log(
|
|
849
|
+
* data.vizId, // viz id
|
|
850
|
+
* data.clickedPoint.selectedAttributes[0].value,
|
|
851
|
+
* data.clickedPoint.selectedAttributes[0].column.name,
|
|
852
|
+
* data.clickedPoint.selectedMeasures[0].value,
|
|
853
|
+
* data.clickedPoint.selectedMeasures[0].column.name,
|
|
854
|
+
* )
|
|
855
|
+
* });
|
|
856
|
+
* ```
|
|
857
|
+
* @return viz, clickedPoint - metadata about point that is clicked
|
|
697
858
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
859
|
+
* @important
|
|
698
860
|
*/
|
|
699
861
|
VizPointClick = 'vizPointClick',
|
|
700
862
|
/**
|
|
701
863
|
* An error has occurred.
|
|
702
|
-
*
|
|
864
|
+
*
|
|
865
|
+
* @returns error - An error object or message
|
|
703
866
|
*/
|
|
704
867
|
Error = 'Error',
|
|
705
868
|
/**
|
|
706
869
|
* The embedded object has sent an alert
|
|
707
|
-
*
|
|
870
|
+
*
|
|
871
|
+
* @returns alert - An alert object
|
|
708
872
|
*/
|
|
709
873
|
Alert = 'alert',
|
|
710
874
|
/**
|
|
@@ -713,29 +877,34 @@ export enum EmbedEvent {
|
|
|
713
877
|
AuthExpire = 'ThoughtspotAuthExpired',
|
|
714
878
|
/**
|
|
715
879
|
* ThoughtSpot failed to validate the auth session.
|
|
880
|
+
*
|
|
716
881
|
* @hidden
|
|
717
882
|
*/
|
|
718
883
|
AuthFailure = 'ThoughtspotAuthFailure',
|
|
719
884
|
/**
|
|
720
885
|
* ThoughtSpot failed to validate the auth session.
|
|
886
|
+
*
|
|
721
887
|
* @hidden
|
|
722
888
|
*/
|
|
723
889
|
AuthLogout = 'ThoughtspotAuthLogout',
|
|
724
890
|
/**
|
|
725
891
|
* The height of the embedded Liveboard or visualization has been computed.
|
|
726
|
-
*
|
|
892
|
+
*
|
|
893
|
+
* @returns data - The height of the embedded Liveboard or visualization
|
|
727
894
|
* @hidden
|
|
728
895
|
*/
|
|
729
896
|
EmbedHeight = 'EMBED_HEIGHT',
|
|
730
897
|
/**
|
|
731
898
|
* The center of visible iframe viewport is calculated.
|
|
732
|
-
*
|
|
899
|
+
*
|
|
900
|
+
* @returns data - The center of the visible Iframe viewport.
|
|
733
901
|
* @hidden
|
|
734
902
|
*/
|
|
735
903
|
EmbedIframeCenter = 'EmbedIframeCenter',
|
|
736
904
|
/**
|
|
737
905
|
* Emitted when the "Get Data" button in Search Bar embed
|
|
738
906
|
* is clicked.
|
|
907
|
+
*
|
|
739
908
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
|
|
740
909
|
*/
|
|
741
910
|
GetDataClick = 'getDataClick',
|
|
@@ -745,6 +914,7 @@ export enum EmbedEvent {
|
|
|
745
914
|
RouteChange = 'ROUTE_CHANGE',
|
|
746
915
|
/**
|
|
747
916
|
* The v1 event type for Data
|
|
917
|
+
*
|
|
748
918
|
* @hidden
|
|
749
919
|
*/
|
|
750
920
|
V1Data = 'exportVizDataToParent',
|
|
@@ -757,17 +927,20 @@ export enum EmbedEvent {
|
|
|
757
927
|
NoCookieAccess = 'noCookieAccess',
|
|
758
928
|
/**
|
|
759
929
|
* Emitted when SAML is complete
|
|
930
|
+
*
|
|
760
931
|
* @private
|
|
761
932
|
* @hidden
|
|
762
933
|
*/
|
|
763
934
|
SAMLComplete = 'samlComplete',
|
|
764
935
|
/**
|
|
765
936
|
* Emitted when any modal is opened in the app
|
|
937
|
+
*
|
|
766
938
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
767
939
|
*/
|
|
768
940
|
DialogOpen = 'dialog-open',
|
|
769
941
|
/**
|
|
770
942
|
* Emitted when any modal is closed in the app
|
|
943
|
+
*
|
|
771
944
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
772
945
|
*/
|
|
773
946
|
DialogClose = 'dialog-close',
|
|
@@ -775,22 +948,26 @@ export enum EmbedEvent {
|
|
|
775
948
|
* Emitted when the Liveboard shell loads.
|
|
776
949
|
* You can use this event as a hook to trigger
|
|
777
950
|
* other events on the rendered Liveboard.
|
|
951
|
+
*
|
|
778
952
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
779
953
|
*/
|
|
780
954
|
LiveboardRendered = 'PinboardRendered',
|
|
781
955
|
/**
|
|
782
956
|
* This can be used to register an event listener which
|
|
783
957
|
* is triggered on all events.
|
|
958
|
+
*
|
|
784
959
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
785
960
|
*/
|
|
786
961
|
ALL = '*',
|
|
787
962
|
/**
|
|
788
963
|
* Emitted when answer is saved in the app
|
|
964
|
+
*
|
|
789
965
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
790
966
|
*/
|
|
791
967
|
Save = 'save',
|
|
792
968
|
/**
|
|
793
969
|
* Emitted when the download action is triggered on an answer
|
|
970
|
+
*
|
|
794
971
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
795
972
|
*/
|
|
796
973
|
Download = 'download',
|
|
@@ -799,162 +976,201 @@ export enum EmbedEvent {
|
|
|
799
976
|
*
|
|
800
977
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0-sw
|
|
801
978
|
*/
|
|
802
|
-
DownloadAsPng='downloadAsPng',
|
|
979
|
+
DownloadAsPng = 'downloadAsPng',
|
|
803
980
|
/**
|
|
804
981
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
982
|
+
*
|
|
805
983
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
806
984
|
*/
|
|
807
985
|
DownloadAsPdf = 'downloadAsPdf',
|
|
808
986
|
/**
|
|
809
987
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
988
|
+
*
|
|
810
989
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
811
990
|
*/
|
|
812
991
|
DownloadAsCsv = 'downloadAsCsv',
|
|
813
992
|
/**
|
|
814
993
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
994
|
+
*
|
|
815
995
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
816
996
|
*/
|
|
817
997
|
DownloadAsXlsx = 'downloadAsXlsx',
|
|
818
998
|
/**
|
|
819
999
|
* Emitted when an answer is deleted in the app
|
|
1000
|
+
*
|
|
820
1001
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
821
1002
|
*/
|
|
822
1003
|
AnswerDelete = 'answerDelete',
|
|
823
1004
|
/**
|
|
824
1005
|
* Emitted when an answer is pinned to a Liveboard
|
|
1006
|
+
*
|
|
825
1007
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
826
1008
|
*/
|
|
827
1009
|
Pin = 'pin',
|
|
828
1010
|
/**
|
|
829
1011
|
* Emitted when SpotIQ analysis is triggered
|
|
1012
|
+
*
|
|
830
1013
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
831
1014
|
*/
|
|
832
1015
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
833
1016
|
/**
|
|
834
1017
|
* Emitted when a user shares an object with another user or group
|
|
1018
|
+
*
|
|
835
1019
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
836
1020
|
*/
|
|
837
1021
|
Share = 'share',
|
|
838
1022
|
/**
|
|
839
|
-
* Emitted when a user clicks the Include action to include a specific value or data
|
|
1023
|
+
* Emitted when a user clicks the Include action to include a specific value or data
|
|
1024
|
+
* on a chart or table
|
|
1025
|
+
*
|
|
840
1026
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
841
1027
|
*/
|
|
842
1028
|
DrillInclude = 'context-menu-item-include',
|
|
843
1029
|
/**
|
|
844
|
-
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
1030
|
+
* Emitted when a user clicks the Exclude action to exclude a specific value or data
|
|
1031
|
+
* on a chart or table
|
|
1032
|
+
*
|
|
845
1033
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
846
1034
|
*/
|
|
847
1035
|
DrillExclude = 'context-menu-item-exclude',
|
|
848
1036
|
/**
|
|
849
1037
|
* Emitted when copied column value on the app
|
|
1038
|
+
*
|
|
850
1039
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
851
1040
|
*/
|
|
852
1041
|
CopyToClipboard = 'context-menu-item-copy-to-clipboard',
|
|
853
1042
|
/**
|
|
854
1043
|
* Emitted when a user clicks the Update TML action
|
|
1044
|
+
*
|
|
855
1045
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
856
1046
|
*/
|
|
857
1047
|
UpdateTML = 'updateTSL',
|
|
858
1048
|
/**
|
|
859
1049
|
* Emitted when a user clicks the Edit TML action
|
|
1050
|
+
*
|
|
860
1051
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
861
1052
|
*/
|
|
862
1053
|
EditTML = 'editTSL',
|
|
863
1054
|
/**
|
|
864
1055
|
* Emitted when ExportTML trigger in answer on the app
|
|
1056
|
+
*
|
|
865
1057
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
866
1058
|
*/
|
|
867
1059
|
ExportTML = 'exportTSL',
|
|
868
1060
|
/**
|
|
869
1061
|
* Emitted when an answer is saved as a view
|
|
1062
|
+
*
|
|
870
1063
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
871
1064
|
*/
|
|
872
1065
|
SaveAsView = 'saveAsView',
|
|
873
1066
|
/**
|
|
874
1067
|
* Emitted when copy of existing answer on the app
|
|
1068
|
+
*
|
|
875
1069
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
876
1070
|
*/
|
|
877
1071
|
CopyAEdit = 'copyAEdit',
|
|
878
1072
|
/**
|
|
879
1073
|
* Emitted when a user clicks Show underlying data on an answe
|
|
1074
|
+
*
|
|
880
1075
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
881
1076
|
*/
|
|
882
1077
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
883
1078
|
/**
|
|
884
1079
|
* Emitted when an answer is switched to a chart or table view
|
|
1080
|
+
*
|
|
885
1081
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
886
1082
|
*/
|
|
887
1083
|
AnswerChartSwitcher = 'answerChartSwitcher',
|
|
888
1084
|
/**
|
|
889
1085
|
* Internal event to communicate the initial settings back to the TS APP
|
|
1086
|
+
*
|
|
890
1087
|
* @hidden
|
|
891
1088
|
*/
|
|
892
1089
|
APP_INIT = 'appInit',
|
|
893
1090
|
/**
|
|
894
1091
|
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
1092
|
+
*
|
|
895
1093
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
896
1094
|
*/
|
|
897
1095
|
LiveboardInfo = 'pinboardInfo',
|
|
898
1096
|
/**
|
|
899
1097
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
1098
|
+
*
|
|
900
1099
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
901
1100
|
*/
|
|
902
1101
|
AddToFavorites = 'addToFavorites',
|
|
903
1102
|
/**
|
|
904
1103
|
* Emitted when a user clicks Schedule on a Liveboard
|
|
1104
|
+
*
|
|
905
1105
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
906
1106
|
*/
|
|
907
1107
|
Schedule = 'subscription',
|
|
908
1108
|
/**
|
|
909
1109
|
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
1110
|
+
*
|
|
910
1111
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
911
1112
|
*/
|
|
912
1113
|
Edit = 'edit',
|
|
913
1114
|
/**
|
|
914
1115
|
* Emitted when a user clicks Make a copy on a Liveboard
|
|
1116
|
+
*
|
|
915
1117
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
916
1118
|
*/
|
|
917
1119
|
MakeACopy = 'makeACopy',
|
|
918
1120
|
/**
|
|
919
1121
|
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
1122
|
+
*
|
|
920
1123
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
921
1124
|
*/
|
|
922
1125
|
Present = 'present',
|
|
923
1126
|
/**
|
|
924
1127
|
* Emitted when a user clicks Delete on a Liveboard
|
|
1128
|
+
*
|
|
925
1129
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
926
1130
|
*/
|
|
927
1131
|
Delete = 'delete',
|
|
928
1132
|
/**
|
|
929
1133
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
1134
|
+
*
|
|
930
1135
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
931
1136
|
*/
|
|
932
1137
|
SchedulesList = 'schedule-list',
|
|
933
1138
|
/**
|
|
934
1139
|
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
1140
|
+
*
|
|
935
1141
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
936
1142
|
*/
|
|
937
1143
|
Cancel = 'cancel',
|
|
938
1144
|
/**
|
|
939
1145
|
* Emitted when a user clicks Explore on a visualization
|
|
1146
|
+
*
|
|
940
1147
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
941
1148
|
*/
|
|
942
1149
|
Explore = 'explore',
|
|
943
1150
|
/**
|
|
944
1151
|
* Emitted when a user clicks Copy link action on a visualization
|
|
1152
|
+
*
|
|
945
1153
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
946
1154
|
*/
|
|
947
1155
|
CopyLink = 'embedDocument',
|
|
948
1156
|
/**
|
|
949
1157
|
* Emitted when a user interacts with cross filters on a visualization or liveboard
|
|
1158
|
+
*
|
|
950
1159
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
951
1160
|
*/
|
|
952
1161
|
CrossFilterChanged = 'cross-filter-changed',
|
|
953
1162
|
/**
|
|
954
|
-
* Emitted when a user right clicks on chart or table
|
|
1163
|
+
* Emitted when a user right clicks on a visualization (chart or table)
|
|
1164
|
+
*
|
|
955
1165
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
956
1166
|
*/
|
|
957
1167
|
VizPointRightClick = 'vizPointRightClick',
|
|
1168
|
+
/**
|
|
1169
|
+
* Emitted when a user clicks on Insert to slide on a visualization
|
|
1170
|
+
*
|
|
1171
|
+
* @hidden
|
|
1172
|
+
*/
|
|
1173
|
+
InsertIntoSlide = 'insertInToSlide',
|
|
958
1174
|
}
|
|
959
1175
|
|
|
960
1176
|
/**
|
|
@@ -962,13 +1178,28 @@ export enum EmbedEvent {
|
|
|
962
1178
|
* to the embedded ThoughtSpot app
|
|
963
1179
|
*
|
|
964
1180
|
* To trigger an event use the corresponding
|
|
965
|
-
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1181
|
+
* {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
|
|
1182
|
+
* SearchEmbed.trigger} method.
|
|
1183
|
+
*
|
|
1184
|
+
* @example
|
|
1185
|
+
* ```js
|
|
1186
|
+
* import { HostEvent } from '@thoughtspot/visual-embed-sdk';
|
|
1187
|
+
* // Or
|
|
1188
|
+
* // const { HostEvent } = window.tsembed;
|
|
1189
|
+
*
|
|
1190
|
+
* // create the liveboard embed.
|
|
1191
|
+
*
|
|
1192
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1193
|
+
* { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
|
|
1194
|
+
* ]);
|
|
1195
|
+
* ```
|
|
966
1196
|
* @group Events
|
|
967
1197
|
*/
|
|
968
1198
|
// eslint-disable-next-line no-shadow
|
|
969
1199
|
export enum HostEvent {
|
|
970
1200
|
/**
|
|
971
1201
|
* Trigger a search
|
|
1202
|
+
*
|
|
972
1203
|
* @param - dataSourceIds - The data source GUID to Search on
|
|
973
1204
|
* - Although an array, only a single source
|
|
974
1205
|
* is supported at this time.
|
|
@@ -978,7 +1209,7 @@ export enum HostEvent {
|
|
|
978
1209
|
* ```js
|
|
979
1210
|
* searchEmbed.trigger(HostEvent.Search, {
|
|
980
1211
|
* searchQuery: "[sales] by [item type],
|
|
981
|
-
*
|
|
1212
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
|
|
982
1213
|
* execute: true
|
|
983
1214
|
* })
|
|
984
1215
|
* ```
|
|
@@ -986,55 +1217,77 @@ export enum HostEvent {
|
|
|
986
1217
|
Search = 'search',
|
|
987
1218
|
/**
|
|
988
1219
|
* Trigger a drill on certain points by certain column
|
|
1220
|
+
*
|
|
989
1221
|
* @param - points - an object containing selectedPoints/clickedPoints
|
|
990
1222
|
* eg. { selectedPoints: []}
|
|
991
1223
|
* @param - columnGuid - a string guid of the column to drill by. This is optional,
|
|
992
|
-
* if not provided it will auto drill by the configured
|
|
1224
|
+
* if not provided it will auto drill by the configured
|
|
1225
|
+
* column.
|
|
993
1226
|
* @example
|
|
994
1227
|
* ```js
|
|
995
|
-
* searchEmbed.
|
|
996
|
-
*
|
|
997
|
-
*
|
|
1228
|
+
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
1229
|
+
* console.log(payload);
|
|
1230
|
+
* const clickedPoint = payload.data.clickedPoint;
|
|
1231
|
+
* const selectedPoint = payload.data.selectedPoints;
|
|
1232
|
+
* console.log('>>> called', clickedPoint);
|
|
1233
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
1234
|
+
* points: {
|
|
1235
|
+
* clickedPoint,
|
|
1236
|
+
* selectedPoints: selectedPoint
|
|
1237
|
+
* },
|
|
1238
|
+
* autoDrillDown: true,
|
|
1239
|
+
* });
|
|
998
1240
|
* })
|
|
999
1241
|
* ```
|
|
1000
|
-
*
|
|
1001
1242
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
1002
1243
|
*/
|
|
1003
1244
|
DrillDown = 'triggerDrillDown',
|
|
1004
1245
|
/**
|
|
1005
1246
|
* Apply filters
|
|
1247
|
+
*
|
|
1006
1248
|
* @hidden
|
|
1007
1249
|
*/
|
|
1008
1250
|
Filter = 'filter',
|
|
1009
1251
|
/**
|
|
1010
1252
|
* Reload the answer or visualization
|
|
1253
|
+
*
|
|
1011
1254
|
* @hidden
|
|
1012
1255
|
*/
|
|
1013
1256
|
Reload = 'reload',
|
|
1014
1257
|
/**
|
|
1015
1258
|
* Set the visible visualizations on a Liveboard.
|
|
1259
|
+
*
|
|
1016
1260
|
* @param - an array of ids of visualizations to show, the ids not passed
|
|
1017
1261
|
* will be hidden.
|
|
1018
1262
|
* @example
|
|
1019
|
-
*
|
|
1263
|
+
* ```js
|
|
1264
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
1265
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
1266
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
1267
|
+
* ```
|
|
1020
1268
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
1021
1269
|
*/
|
|
1022
1270
|
SetVisibleVizs = 'SetPinboardVisibleVizs',
|
|
1023
1271
|
/**
|
|
1024
1272
|
* Update the runtime filters. The runtime filters passed here are extended
|
|
1025
1273
|
* on to the existing runtime filters if they exist.
|
|
1274
|
+
*
|
|
1026
1275
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
1027
1276
|
* @example
|
|
1277
|
+
* ```js
|
|
1028
1278
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1279
|
+
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
1280
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
1031
1281
|
* ])
|
|
1282
|
+
* ```
|
|
1032
1283
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
1284
|
+
* @important
|
|
1033
1285
|
*/
|
|
1034
1286
|
UpdateRuntimeFilters = 'UpdateRuntimeFilters',
|
|
1035
1287
|
/**
|
|
1036
1288
|
* Navigate to a specific page in App embed without any reload.
|
|
1037
1289
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
1290
|
+
*
|
|
1038
1291
|
* @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
1039
1292
|
* @example
|
|
1040
1293
|
* ```js
|
|
@@ -1046,16 +1299,22 @@ export enum HostEvent {
|
|
|
1046
1299
|
/**
|
|
1047
1300
|
* Opens the filter panel for a particular column.
|
|
1048
1301
|
* Works with Search embed.
|
|
1049
|
-
*
|
|
1302
|
+
*
|
|
1303
|
+
* @param - { columnId: string,
|
|
1304
|
+
* name: string,
|
|
1305
|
+
* type: INT64/CHAR/DATE,
|
|
1306
|
+
* dataType: ATTRIBUTE/MEASURE }
|
|
1050
1307
|
* @example
|
|
1051
1308
|
* ```js
|
|
1052
|
-
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
1309
|
+
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
1310
|
+
* { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
|
|
1053
1311
|
* ```
|
|
1054
1312
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
1055
1313
|
*/
|
|
1056
1314
|
OpenFilter = 'openFilter',
|
|
1057
1315
|
/**
|
|
1058
1316
|
* Adds the columns to the current Search.
|
|
1317
|
+
*
|
|
1059
1318
|
* @param - { columnIds: string[] }
|
|
1060
1319
|
* @example
|
|
1061
1320
|
* ```js
|
|
@@ -1066,6 +1325,7 @@ export enum HostEvent {
|
|
|
1066
1325
|
AddColumns = 'addColumns',
|
|
1067
1326
|
/**
|
|
1068
1327
|
* Removes a column from the current Search.
|
|
1328
|
+
*
|
|
1069
1329
|
* @param - { columnId: string }
|
|
1070
1330
|
* @example
|
|
1071
1331
|
* ```js
|
|
@@ -1076,6 +1336,7 @@ export enum HostEvent {
|
|
|
1076
1336
|
RemoveColumn = 'removeColumn',
|
|
1077
1337
|
/**
|
|
1078
1338
|
* Gets the current pinboard content.
|
|
1339
|
+
*
|
|
1079
1340
|
* @example
|
|
1080
1341
|
* ```js
|
|
1081
1342
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
|
|
@@ -1085,6 +1346,7 @@ export enum HostEvent {
|
|
|
1085
1346
|
getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
|
|
1086
1347
|
/**
|
|
1087
1348
|
* Triggers the Pin action on an embedded object
|
|
1349
|
+
*
|
|
1088
1350
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1089
1351
|
* can be left empty for search and visualization embeds
|
|
1090
1352
|
* @example
|
|
@@ -1098,6 +1360,7 @@ export enum HostEvent {
|
|
|
1098
1360
|
Pin = 'pin',
|
|
1099
1361
|
/**
|
|
1100
1362
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
1363
|
+
*
|
|
1101
1364
|
* @example
|
|
1102
1365
|
* ```js
|
|
1103
1366
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
@@ -1107,6 +1370,7 @@ export enum HostEvent {
|
|
|
1107
1370
|
LiveboardInfo = 'pinboardInfo',
|
|
1108
1371
|
/**
|
|
1109
1372
|
* Triggers the Schedule action on a Liveboard
|
|
1373
|
+
*
|
|
1110
1374
|
* @example
|
|
1111
1375
|
* ```js
|
|
1112
1376
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
@@ -1116,6 +1380,7 @@ export enum HostEvent {
|
|
|
1116
1380
|
Schedule = 'subscription',
|
|
1117
1381
|
/**
|
|
1118
1382
|
* Triggers the Manage schedule action on a Liveboard
|
|
1383
|
+
*
|
|
1119
1384
|
* @example
|
|
1120
1385
|
* ```js
|
|
1121
1386
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
@@ -1125,6 +1390,7 @@ export enum HostEvent {
|
|
|
1125
1390
|
SchedulesList = 'schedule-list',
|
|
1126
1391
|
/**
|
|
1127
1392
|
* Triggers the Export TML action on a Liveboard
|
|
1393
|
+
*
|
|
1128
1394
|
* @example
|
|
1129
1395
|
* ```js
|
|
1130
1396
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
@@ -1134,6 +1400,7 @@ export enum HostEvent {
|
|
|
1134
1400
|
ExportTML = 'exportTSL',
|
|
1135
1401
|
/**
|
|
1136
1402
|
* Triggers the Edit TML action on a Liveboard
|
|
1403
|
+
*
|
|
1137
1404
|
* @example
|
|
1138
1405
|
* ```js
|
|
1139
1406
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
@@ -1143,6 +1410,7 @@ export enum HostEvent {
|
|
|
1143
1410
|
EditTML = 'editTSL',
|
|
1144
1411
|
/**
|
|
1145
1412
|
* Triggers the Update TML action on a Liveboard
|
|
1413
|
+
*
|
|
1146
1414
|
* @example
|
|
1147
1415
|
* ```js
|
|
1148
1416
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
@@ -1152,15 +1420,17 @@ export enum HostEvent {
|
|
|
1152
1420
|
UpdateTML = 'updateTSL',
|
|
1153
1421
|
/**
|
|
1154
1422
|
* Triggers the Download PDF action on a Liveboard
|
|
1423
|
+
*
|
|
1155
1424
|
* @example
|
|
1156
1425
|
* ```js
|
|
1157
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
1426
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
|
|
1158
1427
|
* ```
|
|
1159
1428
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1160
1429
|
*/
|
|
1161
1430
|
DownloadAsPdf = 'downloadAsPdf',
|
|
1162
1431
|
/**
|
|
1163
1432
|
* Triggers the Make a copy action on a Liveboard, search or visualization
|
|
1433
|
+
*
|
|
1164
1434
|
* @example
|
|
1165
1435
|
* ```js
|
|
1166
1436
|
* liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
@@ -1172,6 +1442,7 @@ export enum HostEvent {
|
|
|
1172
1442
|
MakeACopy = 'makeACopy',
|
|
1173
1443
|
/**
|
|
1174
1444
|
* Triggers the Delete action on a Liveboard
|
|
1445
|
+
*
|
|
1175
1446
|
* @example
|
|
1176
1447
|
* ```js
|
|
1177
1448
|
* appEmbed.trigger(HostEvent.Remove)
|
|
@@ -1181,6 +1452,7 @@ export enum HostEvent {
|
|
|
1181
1452
|
Remove = 'delete',
|
|
1182
1453
|
/**
|
|
1183
1454
|
* Triggers the Explore action on a visualization
|
|
1455
|
+
*
|
|
1184
1456
|
* @param - an object with vizId as a key
|
|
1185
1457
|
* @example
|
|
1186
1458
|
* ```js
|
|
@@ -1191,37 +1463,52 @@ export enum HostEvent {
|
|
|
1191
1463
|
Explore = 'explore',
|
|
1192
1464
|
/**
|
|
1193
1465
|
* Triggers the Create alert action on a visualization
|
|
1466
|
+
*
|
|
1194
1467
|
* @param - an object with vizId as a key
|
|
1195
1468
|
* @example
|
|
1196
1469
|
* ```js
|
|
1197
|
-
* liveboardEmbed.trigger(HostEvent.CreateMonitor {
|
|
1470
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor {
|
|
1471
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1472
|
+
* })
|
|
1198
1473
|
* ```
|
|
1199
1474
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1200
1475
|
*/
|
|
1201
1476
|
CreateMonitor = 'createMonitor',
|
|
1202
1477
|
/**
|
|
1203
1478
|
* Triggers the Manage alert action on a visualization
|
|
1479
|
+
*
|
|
1204
1480
|
* @param - an object with vizId as a key
|
|
1205
1481
|
* @example
|
|
1206
1482
|
* ```js
|
|
1207
|
-
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
1483
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
1484
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1485
|
+
* })
|
|
1208
1486
|
* ```
|
|
1209
1487
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1210
1488
|
*/
|
|
1211
1489
|
ManageMonitor = 'manageMonitor',
|
|
1212
1490
|
/**
|
|
1213
1491
|
* Triggers the Edit action on a Liveboard or visualization
|
|
1214
|
-
*
|
|
1492
|
+
*
|
|
1493
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
1494
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1215
1495
|
* @example
|
|
1496
|
+
* ```js
|
|
1216
1497
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
1217
|
-
*
|
|
1498
|
+
*
|
|
1499
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {vizId:
|
|
1500
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1501
|
+
*
|
|
1218
1502
|
* vizEmbed.trigger((HostEvent.Edit)
|
|
1503
|
+
* ```
|
|
1219
1504
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
1220
1505
|
*/
|
|
1221
1506
|
Edit = 'edit',
|
|
1222
1507
|
/**
|
|
1223
1508
|
* Triggers the Copy link action on a Liveboard or visualization
|
|
1224
|
-
*
|
|
1509
|
+
*
|
|
1510
|
+
* @param - object - to trigger the action for a s
|
|
1511
|
+
* pecfic visualization in Liveboard embed, pass in vizId as a key
|
|
1225
1512
|
* @example
|
|
1226
1513
|
* ```js
|
|
1227
1514
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
@@ -1233,7 +1520,9 @@ export enum HostEvent {
|
|
|
1233
1520
|
CopyLink = 'embedDocument',
|
|
1234
1521
|
/**
|
|
1235
1522
|
* Triggers the Present action on a Liveboard or visualization
|
|
1236
|
-
*
|
|
1523
|
+
*
|
|
1524
|
+
* @param - object - to trigger the action for a specfic visualization
|
|
1525
|
+
* in Liveboard embed, pass in vizId as a key
|
|
1237
1526
|
* @example
|
|
1238
1527
|
* ```js
|
|
1239
1528
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
@@ -1245,119 +1534,203 @@ export enum HostEvent {
|
|
|
1245
1534
|
Present = 'present',
|
|
1246
1535
|
/**
|
|
1247
1536
|
* Get TML for the current search.
|
|
1537
|
+
*
|
|
1248
1538
|
* @example
|
|
1249
1539
|
* ```js
|
|
1250
|
-
* searchEmbed.trigger(HostEvent.GetTML)
|
|
1540
|
+
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
1541
|
+
* console.log(
|
|
1542
|
+
* tml.search_query // TML representation of the search query
|
|
1543
|
+
* );
|
|
1544
|
+
* })
|
|
1251
1545
|
* ```
|
|
1252
1546
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
1547
|
+
* @important
|
|
1253
1548
|
*/
|
|
1254
1549
|
GetTML = 'getTML',
|
|
1255
1550
|
/**
|
|
1256
1551
|
* Triggers the ShowUnderlyingData action on visualization or search
|
|
1552
|
+
*
|
|
1257
1553
|
* @param - an object with vizId as a key
|
|
1258
1554
|
* @example
|
|
1259
|
-
*
|
|
1555
|
+
* ```js
|
|
1556
|
+
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
|
|
1557
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1558
|
+
*
|
|
1260
1559
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1560
|
+
*
|
|
1261
1561
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
1562
|
+
* ```
|
|
1262
1563
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1263
1564
|
*/
|
|
1264
1565
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
1265
1566
|
/**
|
|
1266
1567
|
* Triggers the Delete action on visualization or search
|
|
1568
|
+
*
|
|
1267
1569
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1268
1570
|
* can be left empty for search and visualization embeds
|
|
1269
1571
|
* @example
|
|
1270
|
-
*
|
|
1572
|
+
* ```js
|
|
1573
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {vizId:
|
|
1574
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1575
|
+
*
|
|
1271
1576
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
1577
|
+
*
|
|
1272
1578
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
1579
|
+
* ```
|
|
1273
1580
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1274
1581
|
*/
|
|
1275
|
-
Delete = '
|
|
1582
|
+
Delete = 'onDeleteAnswer',
|
|
1276
1583
|
/**
|
|
1277
1584
|
* Triggers the SpotIQAnalyze action on visualization or search
|
|
1585
|
+
*
|
|
1278
1586
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
1279
1587
|
* can be left empty for search and visualization embeds
|
|
1280
1588
|
* @example
|
|
1281
|
-
*
|
|
1589
|
+
* ```js
|
|
1590
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
|
|
1591
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1592
|
+
*
|
|
1282
1593
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1594
|
+
*
|
|
1283
1595
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
1596
|
+
* ```
|
|
1284
1597
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1285
1598
|
*/
|
|
1286
1599
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
1287
1600
|
/**
|
|
1288
1601
|
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
1602
|
+
*
|
|
1289
1603
|
* @example
|
|
1290
|
-
*
|
|
1604
|
+
* ```js
|
|
1605
|
+
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
1606
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1607
|
+
*
|
|
1291
1608
|
* vizEmbed.trigger(HostEvent.Download)
|
|
1609
|
+
*
|
|
1292
1610
|
* searchEmbed.trigger(HostEvent.Download)
|
|
1611
|
+
* ```
|
|
1612
|
+
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1-sw ,Use {@link DownloadAsPng}
|
|
1293
1613
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1294
1614
|
*/
|
|
1295
|
-
Download = '
|
|
1615
|
+
Download = 'downloadAsPng',
|
|
1296
1616
|
/**
|
|
1297
|
-
* Triggers the
|
|
1617
|
+
* Triggers the Download action on visualization or search when Displaymode is Chart
|
|
1618
|
+
*
|
|
1298
1619
|
* @example
|
|
1299
|
-
*
|
|
1620
|
+
* ```js
|
|
1621
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPng,
|
|
1622
|
+
* {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
|
|
1623
|
+
*
|
|
1624
|
+
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
1625
|
+
*
|
|
1626
|
+
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
1627
|
+
* ```
|
|
1628
|
+
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1-sw
|
|
1629
|
+
*/
|
|
1630
|
+
DownloadAsPng = 'downloadAsPng',
|
|
1631
|
+
/**
|
|
1632
|
+
* Triggers the downloadAsCSV action on visualization or search
|
|
1633
|
+
*
|
|
1634
|
+
* @example
|
|
1635
|
+
* ```js
|
|
1636
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
1637
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1638
|
+
*
|
|
1300
1639
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1640
|
+
*
|
|
1301
1641
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
1642
|
+
* ```
|
|
1302
1643
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1303
1644
|
*/
|
|
1304
1645
|
DownloadAsCsv = 'downloadAsCSV',
|
|
1305
1646
|
/**
|
|
1306
|
-
* Triggers the downloadAsXLSX action on visualization or search
|
|
1647
|
+
* Triggers the downloadAsXLSX action on visualization or search
|
|
1648
|
+
*
|
|
1307
1649
|
* @example
|
|
1308
|
-
*
|
|
1650
|
+
* ```js
|
|
1651
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
1652
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1653
|
+
*
|
|
1309
1654
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1655
|
+
*
|
|
1310
1656
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
1657
|
+
* ```
|
|
1311
1658
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1312
1659
|
*/
|
|
1313
1660
|
DownloadAsXlsx = 'downloadAsXLSX',
|
|
1314
1661
|
/**
|
|
1315
1662
|
* Triggers the Share action on a liveboard or answer
|
|
1663
|
+
*
|
|
1316
1664
|
* @example
|
|
1665
|
+
* ```js
|
|
1317
1666
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
1667
|
+
*
|
|
1318
1668
|
* searchEmbed.trigger(HostEvent.Share)
|
|
1669
|
+
* ```
|
|
1319
1670
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1320
1671
|
*/
|
|
1321
1672
|
Share = 'share',
|
|
1322
1673
|
/**
|
|
1323
1674
|
* Trigger the Save action on a liveboard or answer
|
|
1675
|
+
*
|
|
1324
1676
|
* @example
|
|
1677
|
+
* ```js
|
|
1325
1678
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
1679
|
+
*
|
|
1326
1680
|
* searchEmbed.trigger(HostEvent.Save)
|
|
1681
|
+
* ```
|
|
1327
1682
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1328
1683
|
*/
|
|
1329
1684
|
Save = 'save',
|
|
1330
1685
|
/**
|
|
1331
1686
|
* Triggers the SyncToSheets action on visualization
|
|
1687
|
+
*
|
|
1332
1688
|
* @param - an object with vizId as a key
|
|
1333
1689
|
* @example
|
|
1334
|
-
*
|
|
1690
|
+
* ```js
|
|
1691
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
|
|
1692
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1693
|
+
*
|
|
1335
1694
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
1695
|
+
* ```
|
|
1336
1696
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1337
1697
|
*/
|
|
1338
1698
|
SyncToSheets = 'sync-to-sheets',
|
|
1339
1699
|
/**
|
|
1340
1700
|
* Triggers the SyncToOtherApps action on visualization
|
|
1701
|
+
*
|
|
1341
1702
|
* @param - an object with vizId as a key
|
|
1342
1703
|
* @example
|
|
1343
|
-
*
|
|
1704
|
+
* ```js
|
|
1705
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
|
|
1706
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1707
|
+
*
|
|
1344
1708
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
1709
|
+
* ```
|
|
1345
1710
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1346
1711
|
*/
|
|
1347
1712
|
SyncToOtherApps = 'sync-to-other-apps',
|
|
1348
1713
|
/**
|
|
1349
1714
|
* Triggers the ManagePipelines action on visualization
|
|
1715
|
+
*
|
|
1350
1716
|
* @param - an object with vizId as a key
|
|
1351
1717
|
* @example
|
|
1352
|
-
*
|
|
1718
|
+
* ```js
|
|
1719
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
|
|
1720
|
+
* '730496d6-6903-4601-937e-2c691821af3c'})
|
|
1721
|
+
*
|
|
1353
1722
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
1723
|
+
* ```
|
|
1354
1724
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
1355
1725
|
*/
|
|
1356
1726
|
ManagePipelines = 'manage-pipeline',
|
|
1357
1727
|
/**
|
|
1358
1728
|
* Triggers the Reset search in answer
|
|
1729
|
+
*
|
|
1359
1730
|
* @example
|
|
1360
|
-
*
|
|
1731
|
+
* ```js
|
|
1732
|
+
* searchEmbed.trigger(HostEvent.ResetSearch)
|
|
1733
|
+
* ```
|
|
1361
1734
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
|
|
1362
1735
|
*/
|
|
1363
1736
|
ResetSearch = 'resetSearch',
|
|
@@ -1389,6 +1762,7 @@ export enum DataSourceVisualMode {
|
|
|
1389
1762
|
*/
|
|
1390
1763
|
// eslint-disable-next-line no-shadow
|
|
1391
1764
|
export enum Param {
|
|
1765
|
+
EmbedApp = 'embedApp',
|
|
1392
1766
|
DataSources = 'dataSources',
|
|
1393
1767
|
DataSourceMode = 'dataSourceMode',
|
|
1394
1768
|
DisableActions = 'disableAction',
|
|
@@ -1429,11 +1803,26 @@ export enum Param {
|
|
|
1429
1803
|
ContextMenuTrigger = 'isContextMenuEnabledOnLeftClick',
|
|
1430
1804
|
LinkOverride = 'linkOverride',
|
|
1431
1805
|
ShowInsertToSlide = 'insertInToSlide',
|
|
1806
|
+
PrimaryNavHidden = 'primaryNavHidden',
|
|
1807
|
+
HideProfleAndHelp = 'profileAndHelpInNavBarHidden',
|
|
1432
1808
|
}
|
|
1433
1809
|
|
|
1434
1810
|
/**
|
|
1435
1811
|
* The list of actions that can be performed on visual ThoughtSpot
|
|
1436
1812
|
* entities, such as answers and Liveboards.
|
|
1813
|
+
*
|
|
1814
|
+
* This enum is used to specify the actions that could be disabled,
|
|
1815
|
+
* hidden or made visible.
|
|
1816
|
+
*
|
|
1817
|
+
* @example
|
|
1818
|
+
* ```js
|
|
1819
|
+
* const embed = new LiveboardEmbed('#embed-container', {
|
|
1820
|
+
* ... // other options
|
|
1821
|
+
* visibleActions: [Action.Save, Action.Explore],
|
|
1822
|
+
* disableActions: [Action.Save],
|
|
1823
|
+
* hiddenActions: [Action.Download], // Set either this or visibleActions
|
|
1824
|
+
* })
|
|
1825
|
+
* ```
|
|
1437
1826
|
*/
|
|
1438
1827
|
// eslint-disable-next-line no-shadow
|
|
1439
1828
|
export enum Action {
|
|
@@ -1483,7 +1872,7 @@ export enum Action {
|
|
|
1483
1872
|
ReplaySearch = 'replaySearch',
|
|
1484
1873
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
1485
1874
|
Download = 'download',
|
|
1486
|
-
DownloadAsPng='downloadAsPng',
|
|
1875
|
+
DownloadAsPng = 'downloadAsPng',
|
|
1487
1876
|
DownloadAsPdf = 'downloadAsPdf',
|
|
1488
1877
|
DownloadAsCsv = 'downloadAsCSV',
|
|
1489
1878
|
DownloadAsXlsx = 'downloadAsXLSX',
|
|
@@ -1529,12 +1918,18 @@ export enum Action {
|
|
|
1529
1918
|
* @hidden
|
|
1530
1919
|
*/
|
|
1531
1920
|
DownloadEmbraceQueries = 'downloadEmbraceQueries',
|
|
1921
|
+
/**
|
|
1922
|
+
* Pin action.
|
|
1923
|
+
*/
|
|
1532
1924
|
Pin = 'pin',
|
|
1533
1925
|
/**
|
|
1534
1926
|
* @hidden
|
|
1535
1927
|
*/
|
|
1536
1928
|
AnalysisInfo = 'analysisInfo',
|
|
1537
1929
|
Subscription = 'subscription',
|
|
1930
|
+
/**
|
|
1931
|
+
* Explore action.
|
|
1932
|
+
*/
|
|
1538
1933
|
Explore = 'explore',
|
|
1539
1934
|
DrillInclude = 'context-menu-item-include',
|
|
1540
1935
|
DrillExclude = 'context-menu-item-exclude',
|
|
@@ -1546,9 +1941,6 @@ export enum Action {
|
|
|
1546
1941
|
DrillEdit = 'context-menu-item-edit',
|
|
1547
1942
|
EditMeasure = 'context-menu-item-edit-measure',
|
|
1548
1943
|
Separator = 'context-menu-item-separator',
|
|
1549
|
-
/**
|
|
1550
|
-
* @hidden
|
|
1551
|
-
*/
|
|
1552
1944
|
DrillDown = 'DRILL',
|
|
1553
1945
|
RequestAccess = 'requestAccess',
|
|
1554
1946
|
QueryDetailsButtons = 'queryDetailsButtons',
|
|
@@ -1639,6 +2031,11 @@ export enum Action {
|
|
|
1639
2031
|
* @hidden
|
|
1640
2032
|
*/
|
|
1641
2033
|
InsertInToSlide = 'insertInToSlide',
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2037
|
+
*/
|
|
2038
|
+
RenameModalTitleDescription = 'renameModalTitleDescription',
|
|
1642
2039
|
}
|
|
1643
2040
|
|
|
1644
2041
|
export interface SessionInterface {
|
|
@@ -1664,6 +2061,9 @@ export enum PrefetchFeatures {
|
|
|
1664
2061
|
VizEmbed = 'VizEmbed',
|
|
1665
2062
|
}
|
|
1666
2063
|
|
|
2064
|
+
/**
|
|
2065
|
+
* Enum for options to change context trigger
|
|
2066
|
+
*/
|
|
1667
2067
|
export enum ContextMenuTriggerOptions {
|
|
1668
2068
|
LEFT_CLICK = 'left-click',
|
|
1669
2069
|
RIGHT_CLICK = 'right-click',
|