@thoughtspot/visual-embed-sdk 1.29.0-alpha.2 → 1.29.0-alpha.4
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 +2 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +1 -0
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +50 -4
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts +4 -4
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +2 -18
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +20 -31
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +9 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +18 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.js +1 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/types.d.ts +23 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +4 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +32 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
- package/cjs/src/utils/sessionInfoService.d.ts +66 -0
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -0
- package/cjs/src/utils/sessionInfoService.js +92 -0
- package/cjs/src/utils/sessionInfoService.js.map +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts +4 -4
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +23 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/dist/src/utils/sessionInfoService.d.ts +66 -0
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +21 -21
- package/dist/tsembed-react.js +21 -21
- package/dist/tsembed.es.js +21 -21
- package/dist/tsembed.js +21 -21
- package/dist/visual-embed-sdk-react-full.d.ts +26 -4
- package/dist/visual-embed-sdk-react.d.ts +26 -4
- package/dist/visual-embed-sdk.d.ts +26 -4
- package/lib/package.json +2 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +1 -0
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +50 -4
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts +4 -4
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +2 -18
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/sage.spec.js +20 -31
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +9 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +18 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.js +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/types.d.ts +23 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +4 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +29 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
- package/lib/src/utils/sessionInfoService.d.ts +66 -0
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -0
- package/lib/src/utils/sessionInfoService.js +85 -0
- package/lib/src/utils/sessionInfoService.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +27 -5
- package/package.json +2 -1
- package/src/embed/app.ts +1 -0
- package/src/embed/liveboard.spec.ts +67 -9
- package/src/embed/liveboard.ts +6 -2
- package/src/embed/sage.spec.ts +20 -35
- package/src/embed/sage.ts +4 -21
- package/src/embed/ts-embed.spec.ts +22 -0
- package/src/embed/ts-embed.ts +9 -0
- package/src/errors.ts +1 -1
- package/src/types.ts +22 -0
package/dist/tsembed-react.es.js
CHANGED
|
@@ -2588,6 +2588,10 @@ var Param;
|
|
|
2588
2588
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
2589
2589
|
Param["enableAskSage"] = "enableAskSage";
|
|
2590
2590
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
2591
|
+
Param["DateFormatLocale"] = "dateFormatLocale";
|
|
2592
|
+
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
2593
|
+
Param["CurrencyFormat"] = "currencyFormat";
|
|
2594
|
+
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2591
2595
|
})(Param || (Param = {}));
|
|
2592
2596
|
/**
|
|
2593
2597
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6642,7 +6646,7 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
|
|
|
6642
6646
|
|
|
6643
6647
|
const ERROR_MESSAGE = {
|
|
6644
6648
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6645
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please
|
|
6649
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6646
6650
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6647
6651
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6648
6652
|
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
@@ -13730,7 +13734,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
13730
13734
|
});
|
|
13731
13735
|
}
|
|
13732
13736
|
|
|
13733
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.
|
|
13737
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.4";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","embedded","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:"45 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};
|
|
13734
13738
|
|
|
13735
13739
|
/**
|
|
13736
13740
|
* Copyright (c) 2022
|
|
@@ -14030,6 +14034,15 @@ class TsEmbed {
|
|
|
14030
14034
|
if (this.embedConfig.pendoTrackingKey) {
|
|
14031
14035
|
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
14032
14036
|
}
|
|
14037
|
+
if (this.embedConfig.numberFormatLocale) {
|
|
14038
|
+
queryParams[Param.NumberFormatLocale] = this.embedConfig.numberFormatLocale;
|
|
14039
|
+
}
|
|
14040
|
+
if (this.embedConfig.dateFormatLocale) {
|
|
14041
|
+
queryParams[Param.DateFormatLocale] = this.embedConfig.dateFormatLocale;
|
|
14042
|
+
}
|
|
14043
|
+
if (this.embedConfig.currencyFormat) {
|
|
14044
|
+
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14045
|
+
}
|
|
14033
14046
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14034
14047
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14035
14048
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -14834,16 +14847,6 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
14834
14847
|
* @summary TS Sage embed
|
|
14835
14848
|
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
14836
14849
|
*/
|
|
14837
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
14838
|
-
Action.Save,
|
|
14839
|
-
Action.Pin,
|
|
14840
|
-
Action.EditACopy,
|
|
14841
|
-
Action.SaveAsView,
|
|
14842
|
-
Action.UpdateTML,
|
|
14843
|
-
Action.EditTML,
|
|
14844
|
-
Action.AnswerDelete,
|
|
14845
|
-
Action.Share,
|
|
14846
|
-
];
|
|
14847
14850
|
/**
|
|
14848
14851
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
14849
14852
|
*
|
|
@@ -14863,8 +14866,7 @@ class SageEmbed extends V1Embed {
|
|
|
14863
14866
|
* @returns {string} query string
|
|
14864
14867
|
*/
|
|
14865
14868
|
getEmbedParams() {
|
|
14866
|
-
|
|
14867
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSearchBarTitle, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
14869
|
+
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
14868
14870
|
const params = this.getBaseQueryParams();
|
|
14869
14871
|
params[Param.EmbedApp] = true;
|
|
14870
14872
|
params[Param.IsSageEmbed] = true;
|
|
@@ -14877,12 +14879,7 @@ class SageEmbed extends V1Embed {
|
|
|
14877
14879
|
}
|
|
14878
14880
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
14879
14881
|
params[Param.IsProductTour] = !!isProductTour;
|
|
14880
|
-
params[Param.HideSearchBarTitle] = !!hideSearchBarTitle;
|
|
14881
14882
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
14882
|
-
params[Param.HideActions] = [
|
|
14883
|
-
...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
14884
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
14885
|
-
];
|
|
14886
14883
|
return getQueryParamString(params, true);
|
|
14887
14884
|
}
|
|
14888
14885
|
/**
|
|
@@ -15145,6 +15142,7 @@ class AppEmbed extends V1Embed {
|
|
|
15145
15142
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
15146
15143
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
15147
15144
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15145
|
+
params[Param.IsFullAppEmbed] = true;
|
|
15148
15146
|
params = this.getBaseQueryParams(params);
|
|
15149
15147
|
if (fullHeight === true) {
|
|
15150
15148
|
params[Param.fullHeight] = true;
|
|
@@ -15316,9 +15314,11 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15316
15314
|
responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
|
|
15317
15315
|
};
|
|
15318
15316
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
15319
|
-
if (
|
|
15320
|
-
|
|
15317
|
+
if (data.data.currentPath.startsWith('/embed/viz/')
|
|
15318
|
+
|| data.data.currentPath.startsWith('/embed/insights/viz/')) {
|
|
15319
|
+
return;
|
|
15321
15320
|
}
|
|
15321
|
+
this.setIFrameHeight(this.defaultHeight);
|
|
15322
15322
|
};
|
|
15323
15323
|
if (this.viewConfig.fullHeight === true) {
|
|
15324
15324
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
package/dist/tsembed-react.js
CHANGED
|
@@ -2526,6 +2526,10 @@
|
|
|
2526
2526
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
2527
2527
|
Param["enableAskSage"] = "enableAskSage";
|
|
2528
2528
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
2529
|
+
Param["DateFormatLocale"] = "dateFormatLocale";
|
|
2530
|
+
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
2531
|
+
Param["CurrencyFormat"] = "currencyFormat";
|
|
2532
|
+
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2529
2533
|
})(Param || (Param = {}));
|
|
2530
2534
|
(function (Action) {
|
|
2531
2535
|
/**
|
|
@@ -6550,7 +6554,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
6550
6554
|
|
|
6551
6555
|
const ERROR_MESSAGE = {
|
|
6552
6556
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6553
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please
|
|
6557
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6554
6558
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6555
6559
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6556
6560
|
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
@@ -13638,7 +13642,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13638
13642
|
});
|
|
13639
13643
|
}
|
|
13640
13644
|
|
|
13641
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.
|
|
13645
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.4";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","embedded","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:"45 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};
|
|
13642
13646
|
|
|
13643
13647
|
/**
|
|
13644
13648
|
* Copyright (c) 2022
|
|
@@ -13938,6 +13942,15 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
13938
13942
|
if (this.embedConfig.pendoTrackingKey) {
|
|
13939
13943
|
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
13940
13944
|
}
|
|
13945
|
+
if (this.embedConfig.numberFormatLocale) {
|
|
13946
|
+
queryParams[Param.NumberFormatLocale] = this.embedConfig.numberFormatLocale;
|
|
13947
|
+
}
|
|
13948
|
+
if (this.embedConfig.dateFormatLocale) {
|
|
13949
|
+
queryParams[Param.DateFormatLocale] = this.embedConfig.dateFormatLocale;
|
|
13950
|
+
}
|
|
13951
|
+
if (this.embedConfig.currencyFormat) {
|
|
13952
|
+
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
13953
|
+
}
|
|
13941
13954
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
13942
13955
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
13943
13956
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -14742,16 +14755,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14742
14755
|
* @summary TS Sage embed
|
|
14743
14756
|
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
14744
14757
|
*/
|
|
14745
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
14746
|
-
exports.Action.Save,
|
|
14747
|
-
exports.Action.Pin,
|
|
14748
|
-
exports.Action.EditACopy,
|
|
14749
|
-
exports.Action.SaveAsView,
|
|
14750
|
-
exports.Action.UpdateTML,
|
|
14751
|
-
exports.Action.EditTML,
|
|
14752
|
-
exports.Action.AnswerDelete,
|
|
14753
|
-
exports.Action.Share,
|
|
14754
|
-
];
|
|
14755
14758
|
/**
|
|
14756
14759
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
14757
14760
|
*
|
|
@@ -14771,8 +14774,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14771
14774
|
* @returns {string} query string
|
|
14772
14775
|
*/
|
|
14773
14776
|
getEmbedParams() {
|
|
14774
|
-
|
|
14775
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSearchBarTitle, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
14777
|
+
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
14776
14778
|
const params = this.getBaseQueryParams();
|
|
14777
14779
|
params[Param.EmbedApp] = true;
|
|
14778
14780
|
params[Param.IsSageEmbed] = true;
|
|
@@ -14785,12 +14787,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14785
14787
|
}
|
|
14786
14788
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
14787
14789
|
params[Param.IsProductTour] = !!isProductTour;
|
|
14788
|
-
params[Param.HideSearchBarTitle] = !!hideSearchBarTitle;
|
|
14789
14790
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
14790
|
-
params[Param.HideActions] = [
|
|
14791
|
-
...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
14792
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
14793
|
-
];
|
|
14794
14791
|
return getQueryParamString(params, true);
|
|
14795
14792
|
}
|
|
14796
14793
|
/**
|
|
@@ -15048,6 +15045,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15048
15045
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
15049
15046
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
15050
15047
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15048
|
+
params[Param.IsFullAppEmbed] = true;
|
|
15051
15049
|
params = this.getBaseQueryParams(params);
|
|
15052
15050
|
if (fullHeight === true) {
|
|
15053
15051
|
params[Param.fullHeight] = true;
|
|
@@ -15219,9 +15217,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15219
15217
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
15220
15218
|
};
|
|
15221
15219
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
15222
|
-
if (
|
|
15223
|
-
|
|
15220
|
+
if (data.data.currentPath.startsWith('/embed/viz/')
|
|
15221
|
+
|| data.data.currentPath.startsWith('/embed/insights/viz/')) {
|
|
15222
|
+
return;
|
|
15224
15223
|
}
|
|
15224
|
+
this.setIFrameHeight(this.defaultHeight);
|
|
15225
15225
|
};
|
|
15226
15226
|
if (this.viewConfig.fullHeight === true) {
|
|
15227
15227
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
package/dist/tsembed.es.js
CHANGED
|
@@ -2208,6 +2208,10 @@ var Param;
|
|
|
2208
2208
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
2209
2209
|
Param["enableAskSage"] = "enableAskSage";
|
|
2210
2210
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
2211
|
+
Param["DateFormatLocale"] = "dateFormatLocale";
|
|
2212
|
+
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
2213
|
+
Param["CurrencyFormat"] = "currencyFormat";
|
|
2214
|
+
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2211
2215
|
})(Param || (Param = {}));
|
|
2212
2216
|
/**
|
|
2213
2217
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6543,7 +6547,7 @@ function getSelectedPointsForUnderlyingDataQuery(selectedPoints) {
|
|
|
6543
6547
|
|
|
6544
6548
|
const ERROR_MESSAGE = {
|
|
6545
6549
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6546
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please
|
|
6550
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6547
6551
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6548
6552
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6549
6553
|
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
@@ -14135,7 +14139,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
14135
14139
|
});
|
|
14136
14140
|
}
|
|
14137
14141
|
|
|
14138
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.
|
|
14142
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.4";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","embedded","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:"45 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};
|
|
14139
14143
|
|
|
14140
14144
|
/**
|
|
14141
14145
|
* Copyright (c) 2022
|
|
@@ -14435,6 +14439,15 @@ class TsEmbed {
|
|
|
14435
14439
|
if (this.embedConfig.pendoTrackingKey) {
|
|
14436
14440
|
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
14437
14441
|
}
|
|
14442
|
+
if (this.embedConfig.numberFormatLocale) {
|
|
14443
|
+
queryParams[Param.NumberFormatLocale] = this.embedConfig.numberFormatLocale;
|
|
14444
|
+
}
|
|
14445
|
+
if (this.embedConfig.dateFormatLocale) {
|
|
14446
|
+
queryParams[Param.DateFormatLocale] = this.embedConfig.dateFormatLocale;
|
|
14447
|
+
}
|
|
14448
|
+
if (this.embedConfig.currencyFormat) {
|
|
14449
|
+
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14450
|
+
}
|
|
14438
14451
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14439
14452
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14440
14453
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -15269,6 +15282,7 @@ class AppEmbed extends V1Embed {
|
|
|
15269
15282
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
15270
15283
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
15271
15284
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15285
|
+
params[Param.IsFullAppEmbed] = true;
|
|
15272
15286
|
params = this.getBaseQueryParams(params);
|
|
15273
15287
|
if (fullHeight === true) {
|
|
15274
15288
|
params[Param.fullHeight] = true;
|
|
@@ -15440,9 +15454,11 @@ class LiveboardEmbed extends V1Embed {
|
|
|
15440
15454
|
responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
|
|
15441
15455
|
};
|
|
15442
15456
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
15443
|
-
if (
|
|
15444
|
-
|
|
15457
|
+
if (data.data.currentPath.startsWith('/embed/viz/')
|
|
15458
|
+
|| data.data.currentPath.startsWith('/embed/insights/viz/')) {
|
|
15459
|
+
return;
|
|
15445
15460
|
}
|
|
15461
|
+
this.setIFrameHeight(this.defaultHeight);
|
|
15446
15462
|
};
|
|
15447
15463
|
if (this.viewConfig.fullHeight === true) {
|
|
15448
15464
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
@@ -15796,16 +15812,6 @@ class SearchBarEmbed extends TsEmbed {
|
|
|
15796
15812
|
* @summary TS Sage embed
|
|
15797
15813
|
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
15798
15814
|
*/
|
|
15799
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
15800
|
-
Action.Save,
|
|
15801
|
-
Action.Pin,
|
|
15802
|
-
Action.EditACopy,
|
|
15803
|
-
Action.SaveAsView,
|
|
15804
|
-
Action.UpdateTML,
|
|
15805
|
-
Action.EditTML,
|
|
15806
|
-
Action.AnswerDelete,
|
|
15807
|
-
Action.Share,
|
|
15808
|
-
];
|
|
15809
15815
|
/**
|
|
15810
15816
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
15811
15817
|
*
|
|
@@ -15825,8 +15831,7 @@ class SageEmbed extends V1Embed {
|
|
|
15825
15831
|
* @returns {string} query string
|
|
15826
15832
|
*/
|
|
15827
15833
|
getEmbedParams() {
|
|
15828
|
-
|
|
15829
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSearchBarTitle, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
15834
|
+
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
15830
15835
|
const params = this.getBaseQueryParams();
|
|
15831
15836
|
params[Param.EmbedApp] = true;
|
|
15832
15837
|
params[Param.IsSageEmbed] = true;
|
|
@@ -15839,12 +15844,7 @@ class SageEmbed extends V1Embed {
|
|
|
15839
15844
|
}
|
|
15840
15845
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
15841
15846
|
params[Param.IsProductTour] = !!isProductTour;
|
|
15842
|
-
params[Param.HideSearchBarTitle] = !!hideSearchBarTitle;
|
|
15843
15847
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
15844
|
-
params[Param.HideActions] = [
|
|
15845
|
-
...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
15846
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
15847
|
-
];
|
|
15848
15848
|
return getQueryParamString(params, true);
|
|
15849
15849
|
}
|
|
15850
15850
|
/**
|
package/dist/tsembed.js
CHANGED
|
@@ -2130,6 +2130,10 @@
|
|
|
2130
2130
|
Param["OverrideNativeConsole"] = "overrideConsoleLogs";
|
|
2131
2131
|
Param["enableAskSage"] = "enableAskSage";
|
|
2132
2132
|
Param["CollapseSearchBarInitially"] = "collapseSearchBarInitially";
|
|
2133
|
+
Param["DateFormatLocale"] = "dateFormatLocale";
|
|
2134
|
+
Param["NumberFormatLocale"] = "numberFormatLocale";
|
|
2135
|
+
Param["CurrencyFormat"] = "currencyFormat";
|
|
2136
|
+
Param["IsFullAppEmbed"] = "isFullAppEmbed";
|
|
2133
2137
|
})(Param || (Param = {}));
|
|
2134
2138
|
(function (Action) {
|
|
2135
2139
|
/**
|
|
@@ -6430,7 +6434,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
6430
6434
|
|
|
6431
6435
|
const ERROR_MESSAGE = {
|
|
6432
6436
|
INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.',
|
|
6433
|
-
LIVEBOARD_VIZ_ID_VALIDATION: 'Please
|
|
6437
|
+
LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a liveboard to embed.',
|
|
6434
6438
|
TRIGGER_TIMED_OUT: 'Trigger timedout in getting response',
|
|
6435
6439
|
SEARCHEMBED_BETA_WRANING_MESSAGE: 'Search Embed is in Beta in this release.',
|
|
6436
6440
|
SAGE_EMBED_BETA_WARNING_MESSAGE: 'Sage Embed is in Beta in this release.',
|
|
@@ -14003,7 +14007,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14003
14007
|
});
|
|
14004
14008
|
}
|
|
14005
14009
|
|
|
14006
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.
|
|
14010
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.29.0-alpha.4";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","embedded","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:"45 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};
|
|
14007
14011
|
|
|
14008
14012
|
/**
|
|
14009
14013
|
* Copyright (c) 2022
|
|
@@ -14303,6 +14307,15 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
14303
14307
|
if (this.embedConfig.pendoTrackingKey) {
|
|
14304
14308
|
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
14305
14309
|
}
|
|
14310
|
+
if (this.embedConfig.numberFormatLocale) {
|
|
14311
|
+
queryParams[Param.NumberFormatLocale] = this.embedConfig.numberFormatLocale;
|
|
14312
|
+
}
|
|
14313
|
+
if (this.embedConfig.dateFormatLocale) {
|
|
14314
|
+
queryParams[Param.DateFormatLocale] = this.embedConfig.dateFormatLocale;
|
|
14315
|
+
}
|
|
14316
|
+
if (this.embedConfig.currencyFormat) {
|
|
14317
|
+
queryParams[Param.CurrencyFormat] = this.embedConfig.currencyFormat;
|
|
14318
|
+
}
|
|
14306
14319
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, } = this.viewConfig;
|
|
14307
14320
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
14308
14321
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -15132,6 +15145,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15132
15145
|
params[Param.ShowLiveboardTitle] = showLiveboardTitle;
|
|
15133
15146
|
params[Param.ShowLiveboardDescription] = !!showLiveboardDescription;
|
|
15134
15147
|
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
|
|
15148
|
+
params[Param.IsFullAppEmbed] = true;
|
|
15135
15149
|
params = this.getBaseQueryParams(params);
|
|
15136
15150
|
if (fullHeight === true) {
|
|
15137
15151
|
params[Param.fullHeight] = true;
|
|
@@ -15303,9 +15317,11 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15303
15317
|
responder({ type: exports.EmbedEvent.EmbedIframeCenter, data: obj });
|
|
15304
15318
|
};
|
|
15305
15319
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
15306
|
-
if (
|
|
15307
|
-
|
|
15320
|
+
if (data.data.currentPath.startsWith('/embed/viz/')
|
|
15321
|
+
|| data.data.currentPath.startsWith('/embed/insights/viz/')) {
|
|
15322
|
+
return;
|
|
15308
15323
|
}
|
|
15324
|
+
this.setIFrameHeight(this.defaultHeight);
|
|
15309
15325
|
};
|
|
15310
15326
|
if (this.viewConfig.fullHeight === true) {
|
|
15311
15327
|
this.on(exports.EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
@@ -15659,16 +15675,6 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15659
15675
|
* @summary TS Sage embed
|
|
15660
15676
|
* @author Mourya Balabhadra <mourya.balabhadra@thoughtspot.com>
|
|
15661
15677
|
*/
|
|
15662
|
-
const HiddenActionItemByDefaultForSageEmbed = [
|
|
15663
|
-
exports.Action.Save,
|
|
15664
|
-
exports.Action.Pin,
|
|
15665
|
-
exports.Action.EditACopy,
|
|
15666
|
-
exports.Action.SaveAsView,
|
|
15667
|
-
exports.Action.UpdateTML,
|
|
15668
|
-
exports.Action.EditTML,
|
|
15669
|
-
exports.Action.AnswerDelete,
|
|
15670
|
-
exports.Action.Share,
|
|
15671
|
-
];
|
|
15672
15678
|
/**
|
|
15673
15679
|
* Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
|
|
15674
15680
|
*
|
|
@@ -15688,8 +15694,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15688
15694
|
* @returns {string} query string
|
|
15689
15695
|
*/
|
|
15690
15696
|
getEmbedParams() {
|
|
15691
|
-
|
|
15692
|
-
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSearchBarTitle, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
15697
|
+
const { disableWorksheetChange, hideWorksheetSelector, showObjectSuggestions, hideSampleQuestions, isProductTour, hideSageAnswerHeader, hideAutocompleteSuggestions, } = this.viewConfig;
|
|
15693
15698
|
const params = this.getBaseQueryParams();
|
|
15694
15699
|
params[Param.EmbedApp] = true;
|
|
15695
15700
|
params[Param.IsSageEmbed] = true;
|
|
@@ -15702,12 +15707,7 @@ mutation RemoveColumns($session: BachSessionIdInput!, $logicalColumnIds: [GUID!]
|
|
|
15702
15707
|
}
|
|
15703
15708
|
params[Param.HideSampleQuestions] = !!hideSampleQuestions;
|
|
15704
15709
|
params[Param.IsProductTour] = !!isProductTour;
|
|
15705
|
-
params[Param.HideSearchBarTitle] = !!hideSearchBarTitle;
|
|
15706
15710
|
params[Param.HideSageAnswerHeader] = !!hideSageAnswerHeader;
|
|
15707
|
-
params[Param.HideActions] = [
|
|
15708
|
-
...((_a = params[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
15709
|
-
...HiddenActionItemByDefaultForSageEmbed,
|
|
15710
|
-
];
|
|
15711
15711
|
return getQueryParamString(params, true);
|
|
15712
15712
|
}
|
|
15713
15713
|
/**
|