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