@thoughtspot/visual-embed-sdk 1.27.8 → 1.27.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts +16 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +5 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.d.ts.map +1 -1
- package/cjs/src/auth.spec.js +9 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/types.d.ts +47 -11
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +38 -8
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/authService.js +1 -1
- package/cjs/src/utils/authService/authService.js.map +1 -1
- package/dist/src/auth.d.ts +16 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/auth.spec.d.ts.map +1 -1
- package/dist/src/types.d.ts +47 -11
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +44 -11
- package/dist/tsembed-react.js +44 -11
- package/dist/tsembed.es.js +44 -11
- package/dist/tsembed.js +44 -11
- package/dist/visual-embed-sdk-react-full.d.ts +63 -12
- package/dist/visual-embed-sdk-react.d.ts +63 -12
- package/dist/visual-embed-sdk.d.ts +63 -12
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts +16 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +5 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.d.ts.map +1 -1
- package/lib/src/auth.spec.js +9 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/types.d.ts +47 -11
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +38 -8
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/authService.js +1 -1
- package/lib/src/utils/authService/authService.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +63 -12
- package/package.json +1 -1
- package/src/auth.spec.ts +10 -0
- package/src/auth.ts +21 -2
- package/src/types.ts +47 -11
- package/src/utils/authService/authService.ts +1 -1
package/dist/tsembed.es.js
CHANGED
|
@@ -183,6 +183,7 @@ var AuthType;
|
|
|
183
183
|
* .then((response) => response.json())
|
|
184
184
|
* .then((data) => data.token);
|
|
185
185
|
* }
|
|
186
|
+
* });
|
|
186
187
|
* ```
|
|
187
188
|
*/
|
|
188
189
|
AuthType["TrustedAuthToken"] = "AuthServer";
|
|
@@ -524,15 +525,42 @@ var EmbedEvent;
|
|
|
524
525
|
*/
|
|
525
526
|
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
526
527
|
/**
|
|
527
|
-
* An error has occurred.
|
|
528
|
+
* An error has occurred. This event is fired for the following error types:
|
|
529
|
+
*
|
|
530
|
+
* `API` - API call failure error.
|
|
531
|
+
*
|
|
532
|
+
* `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
|
|
533
|
+
* mode.
|
|
534
|
+
*
|
|
535
|
+
* `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
|
|
536
|
+
*
|
|
537
|
+
* `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
538
|
+
*
|
|
539
|
+
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
540
|
+
*
|
|
541
|
+
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
542
|
+
*
|
|
543
|
+
* For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
|
|
528
544
|
*
|
|
529
545
|
* @returns error - An error object or message
|
|
530
546
|
* @example
|
|
531
547
|
* ```js
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
548
|
+
* // API error
|
|
549
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
550
|
+
* console.log(error);
|
|
551
|
+
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
552
|
+
* });
|
|
553
|
+
* ```
|
|
554
|
+
* @example
|
|
555
|
+
* ```js
|
|
556
|
+
* // Fullscreen error (Errors during presenting of a liveboard)
|
|
557
|
+
* LiveboardEmbed.on(EmbedEvent.Error, (error) => {
|
|
558
|
+
* console.log(error);
|
|
559
|
+
* // { type: "Error", data: { errorType: "FULLSCREEN", error: {
|
|
560
|
+
* // message: "Fullscreen API is not enabled",
|
|
561
|
+
* // stack: "..."
|
|
562
|
+
* // } }}
|
|
563
|
+
* })
|
|
536
564
|
* ```
|
|
537
565
|
*/
|
|
538
566
|
EmbedEvent["Error"] = "Error";
|
|
@@ -1242,7 +1270,7 @@ var EmbedEvent;
|
|
|
1242
1270
|
/**
|
|
1243
1271
|
* Emitted when a LB/viz is renamed
|
|
1244
1272
|
*
|
|
1245
|
-
* @version SDK : 1.28.0 | ThoughtSpot: 9.
|
|
1273
|
+
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
|
|
1246
1274
|
*/
|
|
1247
1275
|
EmbedEvent["Rename"] = "rename";
|
|
1248
1276
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -1917,16 +1945,18 @@ var HostEvent;
|
|
|
1917
1945
|
*/
|
|
1918
1946
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1919
1947
|
/**
|
|
1920
|
-
*
|
|
1948
|
+
*
|
|
1921
1949
|
* Get the currents visible and runtime filters applied on a Liveboard
|
|
1950
|
+
*
|
|
1922
1951
|
* @example
|
|
1923
1952
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1924
1953
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1925
1954
|
*/
|
|
1926
1955
|
HostEvent["GetFilters"] = "getFilters";
|
|
1927
1956
|
/**
|
|
1928
|
-
*
|
|
1957
|
+
*
|
|
1929
1958
|
* Update the visible filters on the Liveboard.
|
|
1959
|
+
*
|
|
1930
1960
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1931
1961
|
* @example
|
|
1932
1962
|
*
|
|
@@ -5671,7 +5701,7 @@ function isEqual(value, other) {
|
|
|
5671
5701
|
|
|
5672
5702
|
var isEqual_1 = isEqual;
|
|
5673
5703
|
|
|
5674
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.27.
|
|
5704
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.27.9";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
5675
5705
|
|
|
5676
5706
|
const EndPoints = {
|
|
5677
5707
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -5717,7 +5747,7 @@ async function verifyTokenService(thoughtSpotHost, authToken) {
|
|
|
5717
5747
|
return res.ok;
|
|
5718
5748
|
}
|
|
5719
5749
|
catch (e) {
|
|
5720
|
-
logger.
|
|
5750
|
+
logger.warn(`Token Verification Service failed : ${e.message}`);
|
|
5721
5751
|
}
|
|
5722
5752
|
return false;
|
|
5723
5753
|
}
|
|
@@ -12084,9 +12114,12 @@ function notifyLogout() {
|
|
|
12084
12114
|
authEE.emit(AuthStatus.LOGOUT);
|
|
12085
12115
|
}
|
|
12086
12116
|
const initSession = (sessionDetails) => {
|
|
12117
|
+
const embedConfig = getEmbedConfig();
|
|
12087
12118
|
if (sessionInfo == null) {
|
|
12088
12119
|
sessionInfo = sessionDetails;
|
|
12089
|
-
|
|
12120
|
+
if (!embedConfig.disableSDKTracking) {
|
|
12121
|
+
initMixpanel(sessionInfo);
|
|
12122
|
+
}
|
|
12090
12123
|
sessionInfoResolver(sessionInfo);
|
|
12091
12124
|
}
|
|
12092
12125
|
};
|
package/dist/tsembed.js
CHANGED
|
@@ -181,6 +181,7 @@
|
|
|
181
181
|
* .then((response) => response.json())
|
|
182
182
|
* .then((data) => data.token);
|
|
183
183
|
* }
|
|
184
|
+
* });
|
|
184
185
|
* ```
|
|
185
186
|
*/
|
|
186
187
|
AuthType["TrustedAuthToken"] = "AuthServer";
|
|
@@ -489,15 +490,42 @@
|
|
|
489
490
|
*/
|
|
490
491
|
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
491
492
|
/**
|
|
492
|
-
* An error has occurred.
|
|
493
|
+
* An error has occurred. This event is fired for the following error types:
|
|
494
|
+
*
|
|
495
|
+
* `API` - API call failure error.
|
|
496
|
+
*
|
|
497
|
+
* `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
|
|
498
|
+
* mode.
|
|
499
|
+
*
|
|
500
|
+
* `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
|
|
501
|
+
*
|
|
502
|
+
* `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
503
|
+
*
|
|
504
|
+
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
505
|
+
*
|
|
506
|
+
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
507
|
+
*
|
|
508
|
+
* For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
|
|
493
509
|
*
|
|
494
510
|
* @returns error - An error object or message
|
|
495
511
|
* @example
|
|
496
512
|
* ```js
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
*
|
|
513
|
+
* // API error
|
|
514
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
515
|
+
* console.log(error);
|
|
516
|
+
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
517
|
+
* });
|
|
518
|
+
* ```
|
|
519
|
+
* @example
|
|
520
|
+
* ```js
|
|
521
|
+
* // Fullscreen error (Errors during presenting of a liveboard)
|
|
522
|
+
* LiveboardEmbed.on(EmbedEvent.Error, (error) => {
|
|
523
|
+
* console.log(error);
|
|
524
|
+
* // { type: "Error", data: { errorType: "FULLSCREEN", error: {
|
|
525
|
+
* // message: "Fullscreen API is not enabled",
|
|
526
|
+
* // stack: "..."
|
|
527
|
+
* // } }}
|
|
528
|
+
* })
|
|
501
529
|
* ```
|
|
502
530
|
*/
|
|
503
531
|
EmbedEvent["Error"] = "Error";
|
|
@@ -1207,7 +1235,7 @@
|
|
|
1207
1235
|
/**
|
|
1208
1236
|
* Emitted when a LB/viz is renamed
|
|
1209
1237
|
*
|
|
1210
|
-
* @version SDK : 1.28.0 | ThoughtSpot: 9.
|
|
1238
|
+
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
|
|
1211
1239
|
*/
|
|
1212
1240
|
EmbedEvent["Rename"] = "rename";
|
|
1213
1241
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -1858,16 +1886,18 @@
|
|
|
1858
1886
|
*/
|
|
1859
1887
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1860
1888
|
/**
|
|
1861
|
-
*
|
|
1889
|
+
*
|
|
1862
1890
|
* Get the currents visible and runtime filters applied on a Liveboard
|
|
1891
|
+
*
|
|
1863
1892
|
* @example
|
|
1864
1893
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1865
1894
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1866
1895
|
*/
|
|
1867
1896
|
HostEvent["GetFilters"] = "getFilters";
|
|
1868
1897
|
/**
|
|
1869
|
-
*
|
|
1898
|
+
*
|
|
1870
1899
|
* Update the visible filters on the Liveboard.
|
|
1900
|
+
*
|
|
1871
1901
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1872
1902
|
* @example
|
|
1873
1903
|
*
|
|
@@ -5571,7 +5601,7 @@
|
|
|
5571
5601
|
|
|
5572
5602
|
var isEqual_1 = isEqual;
|
|
5573
5603
|
|
|
5574
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.27.
|
|
5604
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.27.9";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^46.9.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"44 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
|
|
5575
5605
|
|
|
5576
5606
|
const EndPoints = {
|
|
5577
5607
|
AUTH_VERIFICATION: '/callosum/v1/session/info',
|
|
@@ -5617,7 +5647,7 @@
|
|
|
5617
5647
|
return res.ok;
|
|
5618
5648
|
}
|
|
5619
5649
|
catch (e) {
|
|
5620
|
-
logger.
|
|
5650
|
+
logger.warn(`Token Verification Service failed : ${e.message}`);
|
|
5621
5651
|
}
|
|
5622
5652
|
return false;
|
|
5623
5653
|
}
|
|
@@ -11965,9 +11995,12 @@
|
|
|
11965
11995
|
authEE.emit(exports.AuthStatus.LOGOUT);
|
|
11966
11996
|
}
|
|
11967
11997
|
const initSession = (sessionDetails) => {
|
|
11998
|
+
const embedConfig = getEmbedConfig();
|
|
11968
11999
|
if (sessionInfo == null) {
|
|
11969
12000
|
sessionInfo = sessionDetails;
|
|
11970
|
-
|
|
12001
|
+
if (!embedConfig.disableSDKTracking) {
|
|
12002
|
+
initMixpanel(sessionInfo);
|
|
12003
|
+
}
|
|
11971
12004
|
sessionInfoResolver(sessionInfo);
|
|
11972
12005
|
}
|
|
11973
12006
|
};
|
|
@@ -1278,7 +1278,22 @@ export interface AuthEventEmitter {
|
|
|
1278
1278
|
*
|
|
1279
1279
|
* @param {@link AuthEvent}
|
|
1280
1280
|
*/
|
|
1281
|
-
emit(event: AuthEvent):
|
|
1281
|
+
emit(event: AuthEvent, ...args: any[]): boolean;
|
|
1282
|
+
/**
|
|
1283
|
+
* Remove listener from the emitter returned from init.
|
|
1284
|
+
*
|
|
1285
|
+
* @param event
|
|
1286
|
+
* @param listener
|
|
1287
|
+
* @param context
|
|
1288
|
+
* @param once
|
|
1289
|
+
*/
|
|
1290
|
+
off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
|
|
1291
|
+
/**
|
|
1292
|
+
* Remove all the event listeners
|
|
1293
|
+
*
|
|
1294
|
+
* @param event
|
|
1295
|
+
*/
|
|
1296
|
+
removeAllListeners(event: AuthStatus): this;
|
|
1282
1297
|
}
|
|
1283
1298
|
/**
|
|
1284
1299
|
* Events which can be triggered on the emitter returned from {@link init}.
|
|
@@ -1510,6 +1525,7 @@ export declare enum AuthType {
|
|
|
1510
1525
|
* .then((response) => response.json())
|
|
1511
1526
|
* .then((data) => data.token);
|
|
1512
1527
|
* }
|
|
1528
|
+
* });
|
|
1513
1529
|
* ```
|
|
1514
1530
|
*/
|
|
1515
1531
|
TrustedAuthToken = "AuthServer",
|
|
@@ -1903,6 +1919,12 @@ export interface EmbedConfig {
|
|
|
1903
1919
|
* @version SDK: 1.26.7 | ThoughtSpot: 9.10.0.cl
|
|
1904
1920
|
*/
|
|
1905
1921
|
logLevel?: LogLevel;
|
|
1922
|
+
/**
|
|
1923
|
+
* Disables the Mixpanel tracking from the SDK.
|
|
1924
|
+
*
|
|
1925
|
+
* @version SDK: 1.27.9
|
|
1926
|
+
*/
|
|
1927
|
+
disableSDKTracking?: boolean;
|
|
1906
1928
|
}
|
|
1907
1929
|
export interface LayoutConfig {
|
|
1908
1930
|
}
|
|
@@ -2106,14 +2128,14 @@ export interface ViewConfig {
|
|
|
2106
2128
|
* Hide the home page modules
|
|
2107
2129
|
* eg: hiddenHomepageModules = [HomepageModule.MyLibrary]
|
|
2108
2130
|
*
|
|
2109
|
-
* @version SDK: 1.27.0 | Thoughtspot: 9.
|
|
2131
|
+
* @version SDK: 1.27.0 | Thoughtspot: 9.12.0.cl
|
|
2110
2132
|
*/
|
|
2111
2133
|
hiddenHomepageModules?: HomepageModule[];
|
|
2112
2134
|
/**
|
|
2113
2135
|
* reordering the home page modules
|
|
2114
2136
|
* eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
|
|
2115
2137
|
*
|
|
2116
|
-
* @version SDK: 1.28.0 | Thoughtspot: 9.
|
|
2138
|
+
* @version SDK: 1.28.0 | Thoughtspot: 9.12.0.cl
|
|
2117
2139
|
*/
|
|
2118
2140
|
reorderedHomepageModules?: HomepageModule[];
|
|
2119
2141
|
/**
|
|
@@ -2140,7 +2162,7 @@ export interface ViewConfig {
|
|
|
2140
2162
|
* hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
|
|
2141
2163
|
* ```
|
|
2142
2164
|
*
|
|
2143
|
-
* @version SDK: 1.27.0 | Thoughtspot: 9.
|
|
2165
|
+
* @version SDK: 1.27.0 | Thoughtspot: 9.12.0.cl
|
|
2144
2166
|
*/
|
|
2145
2167
|
hiddenHomeLeftNavItems?: HomeLeftNavItem[];
|
|
2146
2168
|
/**
|
|
@@ -2558,15 +2580,42 @@ export declare enum EmbedEvent {
|
|
|
2558
2580
|
*/
|
|
2559
2581
|
VizPointClick = "vizPointClick",
|
|
2560
2582
|
/**
|
|
2561
|
-
* An error has occurred.
|
|
2583
|
+
* An error has occurred. This event is fired for the following error types:
|
|
2584
|
+
*
|
|
2585
|
+
* `API` - API call failure error.
|
|
2586
|
+
*
|
|
2587
|
+
* `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
|
|
2588
|
+
* mode.
|
|
2589
|
+
*
|
|
2590
|
+
* `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
|
|
2591
|
+
*
|
|
2592
|
+
* `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
2593
|
+
*
|
|
2594
|
+
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
2595
|
+
*
|
|
2596
|
+
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
2597
|
+
*
|
|
2598
|
+
* For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
|
|
2562
2599
|
*
|
|
2563
2600
|
* @returns error - An error object or message
|
|
2564
2601
|
* @example
|
|
2565
2602
|
* ```js
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2568
|
-
*
|
|
2569
|
-
*
|
|
2603
|
+
* // API error
|
|
2604
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
2605
|
+
* console.log(error);
|
|
2606
|
+
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
2607
|
+
* });
|
|
2608
|
+
* ```
|
|
2609
|
+
* @example
|
|
2610
|
+
* ```js
|
|
2611
|
+
* // Fullscreen error (Errors during presenting of a liveboard)
|
|
2612
|
+
* LiveboardEmbed.on(EmbedEvent.Error, (error) => {
|
|
2613
|
+
* console.log(error);
|
|
2614
|
+
* // { type: "Error", data: { errorType: "FULLSCREEN", error: {
|
|
2615
|
+
* // message: "Fullscreen API is not enabled",
|
|
2616
|
+
* // stack: "..."
|
|
2617
|
+
* // } }}
|
|
2618
|
+
* })
|
|
2570
2619
|
* ```
|
|
2571
2620
|
*/
|
|
2572
2621
|
Error = "Error",
|
|
@@ -3276,7 +3325,7 @@ export declare enum EmbedEvent {
|
|
|
3276
3325
|
/**
|
|
3277
3326
|
* Emitted when a LB/viz is renamed
|
|
3278
3327
|
*
|
|
3279
|
-
* @version SDK : 1.28.0 | ThoughtSpot: 9.
|
|
3328
|
+
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
|
|
3280
3329
|
*/
|
|
3281
3330
|
Rename = "rename"
|
|
3282
3331
|
}
|
|
@@ -3949,16 +3998,18 @@ export declare enum HostEvent {
|
|
|
3949
3998
|
*/
|
|
3950
3999
|
ResetSearch = "resetSearch",
|
|
3951
4000
|
/**
|
|
3952
|
-
*
|
|
4001
|
+
*
|
|
3953
4002
|
* Get the currents visible and runtime filters applied on a Liveboard
|
|
4003
|
+
*
|
|
3954
4004
|
* @example
|
|
3955
4005
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
3956
4006
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
3957
4007
|
*/
|
|
3958
4008
|
GetFilters = "getFilters",
|
|
3959
4009
|
/**
|
|
3960
|
-
*
|
|
4010
|
+
*
|
|
3961
4011
|
* Update the visible filters on the Liveboard.
|
|
4012
|
+
*
|
|
3962
4013
|
* @param - filter: filter object containing column name and filter operation and values
|
|
3963
4014
|
* @example
|
|
3964
4015
|
*
|
|
@@ -1200,6 +1200,7 @@ export declare enum AuthType {
|
|
|
1200
1200
|
* .then((response) => response.json())
|
|
1201
1201
|
* .then((data) => data.token);
|
|
1202
1202
|
* }
|
|
1203
|
+
* });
|
|
1203
1204
|
* ```
|
|
1204
1205
|
*/
|
|
1205
1206
|
TrustedAuthToken = "AuthServer",
|
|
@@ -1593,6 +1594,12 @@ export interface EmbedConfig {
|
|
|
1593
1594
|
* @version SDK: 1.26.7 | ThoughtSpot: 9.10.0.cl
|
|
1594
1595
|
*/
|
|
1595
1596
|
logLevel?: LogLevel;
|
|
1597
|
+
/**
|
|
1598
|
+
* Disables the Mixpanel tracking from the SDK.
|
|
1599
|
+
*
|
|
1600
|
+
* @version SDK: 1.27.9
|
|
1601
|
+
*/
|
|
1602
|
+
disableSDKTracking?: boolean;
|
|
1596
1603
|
}
|
|
1597
1604
|
export interface LayoutConfig {
|
|
1598
1605
|
}
|
|
@@ -1796,14 +1803,14 @@ export interface ViewConfig {
|
|
|
1796
1803
|
* Hide the home page modules
|
|
1797
1804
|
* eg: hiddenHomepageModules = [HomepageModule.MyLibrary]
|
|
1798
1805
|
*
|
|
1799
|
-
* @version SDK: 1.27.0 | Thoughtspot: 9.
|
|
1806
|
+
* @version SDK: 1.27.0 | Thoughtspot: 9.12.0.cl
|
|
1800
1807
|
*/
|
|
1801
1808
|
hiddenHomepageModules?: HomepageModule[];
|
|
1802
1809
|
/**
|
|
1803
1810
|
* reordering the home page modules
|
|
1804
1811
|
* eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
|
|
1805
1812
|
*
|
|
1806
|
-
* @version SDK: 1.28.0 | Thoughtspot: 9.
|
|
1813
|
+
* @version SDK: 1.28.0 | Thoughtspot: 9.12.0.cl
|
|
1807
1814
|
*/
|
|
1808
1815
|
reorderedHomepageModules?: HomepageModule[];
|
|
1809
1816
|
/**
|
|
@@ -1830,7 +1837,7 @@ export interface ViewConfig {
|
|
|
1830
1837
|
* hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
|
|
1831
1838
|
* ```
|
|
1832
1839
|
*
|
|
1833
|
-
* @version SDK: 1.27.0 | Thoughtspot: 9.
|
|
1840
|
+
* @version SDK: 1.27.0 | Thoughtspot: 9.12.0.cl
|
|
1834
1841
|
*/
|
|
1835
1842
|
hiddenHomeLeftNavItems?: HomeLeftNavItem[];
|
|
1836
1843
|
/**
|
|
@@ -2248,15 +2255,42 @@ export declare enum EmbedEvent {
|
|
|
2248
2255
|
*/
|
|
2249
2256
|
VizPointClick = "vizPointClick",
|
|
2250
2257
|
/**
|
|
2251
|
-
* An error has occurred.
|
|
2258
|
+
* An error has occurred. This event is fired for the following error types:
|
|
2259
|
+
*
|
|
2260
|
+
* `API` - API call failure error.
|
|
2261
|
+
*
|
|
2262
|
+
* `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
|
|
2263
|
+
* mode.
|
|
2264
|
+
*
|
|
2265
|
+
* `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
|
|
2266
|
+
*
|
|
2267
|
+
* `NON_EXIST_FILTER` - Error due to a non-existent filter.
|
|
2268
|
+
*
|
|
2269
|
+
* `INVALID_DATE_VALUE` - Invalid date value error.
|
|
2270
|
+
*
|
|
2271
|
+
* `INVALID_OPERATOR` - Use of invalid operator during filter application.
|
|
2272
|
+
*
|
|
2273
|
+
* For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
|
|
2252
2274
|
*
|
|
2253
2275
|
* @returns error - An error object or message
|
|
2254
2276
|
* @example
|
|
2255
2277
|
* ```js
|
|
2256
|
-
*
|
|
2257
|
-
*
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2278
|
+
* // API error
|
|
2279
|
+
* SearchEmbed.on(EmbedEvent.Error, (error) => {
|
|
2280
|
+
* console.log(error);
|
|
2281
|
+
* // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
|
|
2282
|
+
* });
|
|
2283
|
+
* ```
|
|
2284
|
+
* @example
|
|
2285
|
+
* ```js
|
|
2286
|
+
* // Fullscreen error (Errors during presenting of a liveboard)
|
|
2287
|
+
* LiveboardEmbed.on(EmbedEvent.Error, (error) => {
|
|
2288
|
+
* console.log(error);
|
|
2289
|
+
* // { type: "Error", data: { errorType: "FULLSCREEN", error: {
|
|
2290
|
+
* // message: "Fullscreen API is not enabled",
|
|
2291
|
+
* // stack: "..."
|
|
2292
|
+
* // } }}
|
|
2293
|
+
* })
|
|
2260
2294
|
* ```
|
|
2261
2295
|
*/
|
|
2262
2296
|
Error = "Error",
|
|
@@ -2966,7 +3000,7 @@ export declare enum EmbedEvent {
|
|
|
2966
3000
|
/**
|
|
2967
3001
|
* Emitted when a LB/viz is renamed
|
|
2968
3002
|
*
|
|
2969
|
-
* @version SDK : 1.28.0 | ThoughtSpot: 9.
|
|
3003
|
+
* @version SDK : 1.28.0 | ThoughtSpot: 9.10.5.cl
|
|
2970
3004
|
*/
|
|
2971
3005
|
Rename = "rename"
|
|
2972
3006
|
}
|
|
@@ -3639,16 +3673,18 @@ export declare enum HostEvent {
|
|
|
3639
3673
|
*/
|
|
3640
3674
|
ResetSearch = "resetSearch",
|
|
3641
3675
|
/**
|
|
3642
|
-
*
|
|
3676
|
+
*
|
|
3643
3677
|
* Get the currents visible and runtime filters applied on a Liveboard
|
|
3678
|
+
*
|
|
3644
3679
|
* @example
|
|
3645
3680
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
3646
3681
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
3647
3682
|
*/
|
|
3648
3683
|
GetFilters = "getFilters",
|
|
3649
3684
|
/**
|
|
3650
|
-
*
|
|
3685
|
+
*
|
|
3651
3686
|
* Update the visible filters on the Liveboard.
|
|
3687
|
+
*
|
|
3652
3688
|
* @param - filter: filter object containing column name and filter operation and values
|
|
3653
3689
|
* @example
|
|
3654
3690
|
*
|
|
@@ -5368,7 +5404,22 @@ export interface AuthEventEmitter {
|
|
|
5368
5404
|
*
|
|
5369
5405
|
* @param {@link AuthEvent}
|
|
5370
5406
|
*/
|
|
5371
|
-
emit(event: AuthEvent):
|
|
5407
|
+
emit(event: AuthEvent, ...args: any[]): boolean;
|
|
5408
|
+
/**
|
|
5409
|
+
* Remove listener from the emitter returned from init.
|
|
5410
|
+
*
|
|
5411
|
+
* @param event
|
|
5412
|
+
* @param listener
|
|
5413
|
+
* @param context
|
|
5414
|
+
* @param once
|
|
5415
|
+
*/
|
|
5416
|
+
off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
|
|
5417
|
+
/**
|
|
5418
|
+
* Remove all the event listeners
|
|
5419
|
+
*
|
|
5420
|
+
* @param event
|
|
5421
|
+
*/
|
|
5422
|
+
removeAllListeners(event: AuthStatus): this;
|
|
5372
5423
|
}
|
|
5373
5424
|
/**
|
|
5374
5425
|
* Events which can be triggered on the emitter returned from {@link init}.
|