@thoughtspot/visual-embed-sdk 1.39.0 → 1.39.2
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/embed/app.d.ts +13 -13
- package/cjs/src/embed/conversation.d.ts +4 -4
- package/cjs/src/embed/embedConfig.d.ts +47 -4
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +47 -4
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -2
- package/cjs/src/embed/liveboard.js +1 -1
- package/cjs/src/embed/sage.d.ts +10 -10
- package/cjs/src/embed/search.d.ts +4 -4
- package/cjs/src/embed/ts-embed.d.ts +5 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +16 -1
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +164 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/types.d.ts +7 -6
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +6 -5
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-sSREbWM-.js → index-CmEQfuE3.js} +1 -1
- package/dist/src/embed/app.d.ts +13 -13
- package/dist/src/embed/conversation.d.ts +4 -4
- package/dist/src/embed/embedConfig.d.ts +47 -4
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/sage.d.ts +10 -10
- package/dist/src/embed/search.d.ts +4 -4
- package/dist/src/embed/ts-embed.d.ts +5 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +7 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +73 -14
- package/dist/tsembed-react.js +72 -13
- package/dist/tsembed.es.js +73 -14
- package/dist/tsembed.js +72 -13
- package/dist/visual-embed-sdk-react-full.d.ts +87 -43
- package/dist/visual-embed-sdk-react.d.ts +87 -43
- package/dist/visual-embed-sdk.d.ts +87 -43
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +13 -13
- package/lib/src/embed/conversation.d.ts +4 -4
- package/lib/src/embed/embedConfig.d.ts +47 -4
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +47 -4
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/sage.d.ts +10 -10
- package/lib/src/embed/search.d.ts +4 -4
- package/lib/src/embed/ts-embed.d.ts +5 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +16 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +164 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +7 -6
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +6 -5
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +87 -43
- package/package.json +1 -1
- package/src/embed/app.ts +13 -13
- package/src/embed/conversation.ts +4 -4
- package/src/embed/embedConfig.ts +48 -5
- package/src/embed/liveboard.ts +2 -2
- package/src/embed/sage.ts +10 -10
- package/src/embed/search.ts +4 -4
- package/src/embed/ts-embed.spec.ts +225 -0
- package/src/embed/ts-embed.ts +19 -0
- package/src/types.ts +7 -6
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.39.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef } from 'react';
|
|
@@ -1468,7 +1468,7 @@ var EmbedEvent;
|
|
|
1468
1468
|
*
|
|
1469
1469
|
* error: Developers can customize the error message text when `execute`
|
|
1470
1470
|
* returns `false` using the error parameter in responder.
|
|
1471
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1471
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1472
1472
|
* @example
|
|
1473
1473
|
*```js
|
|
1474
1474
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -1515,7 +1515,7 @@ var EmbedEvent;
|
|
|
1515
1515
|
* console.log('payload', payload);
|
|
1516
1516
|
* })
|
|
1517
1517
|
*```
|
|
1518
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1518
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1519
1519
|
*/
|
|
1520
1520
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1521
1521
|
/**
|
|
@@ -1571,18 +1571,18 @@ var EmbedEvent;
|
|
|
1571
1571
|
* console.log('payload', payload);
|
|
1572
1572
|
* })
|
|
1573
1573
|
*```
|
|
1574
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1574
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1575
1575
|
*/
|
|
1576
1576
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1577
1577
|
/**
|
|
1578
1578
|
* Emitted when a user creates a Model.
|
|
1579
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1579
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1580
1580
|
*/
|
|
1581
1581
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1582
1582
|
/**
|
|
1583
1583
|
* @hidden
|
|
1584
1584
|
* Emitted when a user exits present mode.
|
|
1585
|
-
* @version SDK : 1.40.0 | ThoughtSpot
|
|
1585
|
+
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1586
1586
|
*/
|
|
1587
1587
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1588
1588
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -2838,6 +2838,7 @@ var Param;
|
|
|
2838
2838
|
* hiddenActions: [Action.Edit, ActionAction.Explore],
|
|
2839
2839
|
* })
|
|
2840
2840
|
* ```
|
|
2841
|
+
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
2841
2842
|
*/
|
|
2842
2843
|
// eslint-disable-next-line no-shadow
|
|
2843
2844
|
var Action;
|
|
@@ -7069,9 +7070,52 @@ const resetCachedAuthToken = () => {
|
|
|
7069
7070
|
|
|
7070
7071
|
const configKey = 'embedConfig';
|
|
7071
7072
|
/**
|
|
7072
|
-
* Gets the configuration
|
|
7073
|
-
*
|
|
7074
|
-
* @
|
|
7073
|
+
* Gets the embed configuration settings that were used to
|
|
7074
|
+
* initialize the SDK.
|
|
7075
|
+
* @returns {@link EmbedConfig}
|
|
7076
|
+
*
|
|
7077
|
+
* @example
|
|
7078
|
+
* ```js
|
|
7079
|
+
* const config = getInitConfig();
|
|
7080
|
+
* console.log(config);
|
|
7081
|
+
* ```
|
|
7082
|
+
* @example
|
|
7083
|
+
*
|
|
7084
|
+
* Returns the `EmbedConfig` object, which
|
|
7085
|
+
* contains the configuration settings used to
|
|
7086
|
+
* initialize the SDK, including the following:
|
|
7087
|
+
*
|
|
7088
|
+
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
7089
|
+
* - `authType`: The authentication method used. For example,
|
|
7090
|
+
* `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
|
|
7091
|
+
* - `customizations` - Style, text, and icon customization settings
|
|
7092
|
+
* that were applied during the SDK initialization.
|
|
7093
|
+
*
|
|
7094
|
+
* For a comprehensive list of embed configuration settings,
|
|
7095
|
+
* see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
|
|
7096
|
+
*
|
|
7097
|
+
* ```json
|
|
7098
|
+
* {
|
|
7099
|
+
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
7100
|
+
* "authType": "AuthServerCookieless",
|
|
7101
|
+
* "customizations": {
|
|
7102
|
+
* "style": {
|
|
7103
|
+
* "customCSS": {
|
|
7104
|
+
* "variables": {
|
|
7105
|
+
* "--ts-var-button--secondary-background": "#7492d5",
|
|
7106
|
+
* "--ts-var-button--secondary--hovers-background": "#aac2f8",
|
|
7107
|
+
* "--ts-var-root-background": "#f1f4f8"
|
|
7108
|
+
* }
|
|
7109
|
+
* }
|
|
7110
|
+
* }
|
|
7111
|
+
* },
|
|
7112
|
+
* "loginFailedMessage": "Login failed, please try again",
|
|
7113
|
+
* "authTriggerText": "Authorize",
|
|
7114
|
+
* "disableTokenVerification": true,
|
|
7115
|
+
* "authTriggerContainer": "#your-own-div"
|
|
7116
|
+
* }
|
|
7117
|
+
* ```
|
|
7118
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
|
|
7075
7119
|
* @group Global methods
|
|
7076
7120
|
*/
|
|
7077
7121
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -7079,7 +7123,7 @@ const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
|
7079
7123
|
* Sets the configuration embed was initialized with.
|
|
7080
7124
|
* And returns the new configuration.
|
|
7081
7125
|
* @param newConfig The configuration to set.
|
|
7082
|
-
* @version SDK: 1.27.0 | ThoughtSpot:
|
|
7126
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
|
|
7083
7127
|
* @group Global methods
|
|
7084
7128
|
*/
|
|
7085
7129
|
const setEmbedConfig = (newConfig) => {
|
|
@@ -7713,7 +7757,7 @@ class AnswerService {
|
|
|
7713
7757
|
async getTML() {
|
|
7714
7758
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7715
7759
|
const edoc = object[0].edoc;
|
|
7716
|
-
const YAML = await import('./index-
|
|
7760
|
+
const YAML = await import('./index-CmEQfuE3.js');
|
|
7717
7761
|
const parsedDoc = YAML.parse(edoc);
|
|
7718
7762
|
return {
|
|
7719
7763
|
answer: {
|
|
@@ -15447,7 +15491,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15447
15491
|
return e;
|
|
15448
15492
|
}
|
|
15449
15493
|
|
|
15450
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15494
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2";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","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",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",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",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
|
|
15451
15495
|
|
|
15452
15496
|
/**
|
|
15453
15497
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15845,10 +15889,25 @@ class TsEmbed {
|
|
|
15845
15889
|
// - cached auth info would be for wrong org
|
|
15846
15890
|
// - info call response changes for each different overrideOrgId
|
|
15847
15891
|
// 2. disablePreauthCache is explicitly set to true
|
|
15892
|
+
// 3. FullAppEmbed has primary navbar visible since:
|
|
15893
|
+
// - primary navbar requires fresh auth state for navigation
|
|
15894
|
+
// - cached auth may not reflect current user permissions
|
|
15848
15895
|
const isDisabled = (this.viewConfig.overrideOrgId !== undefined
|
|
15849
|
-
|| this.embedConfig.disablePreauthCache === true
|
|
15896
|
+
|| this.embedConfig.disablePreauthCache === true
|
|
15897
|
+
|| this.isFullAppEmbedWithVisiblePrimaryNavbar());
|
|
15850
15898
|
return !isDisabled;
|
|
15851
15899
|
}
|
|
15900
|
+
/**
|
|
15901
|
+
* Checks if current embed is FullAppEmbed with visible primary navbar
|
|
15902
|
+
* @returns boolean
|
|
15903
|
+
*/
|
|
15904
|
+
isFullAppEmbedWithVisiblePrimaryNavbar() {
|
|
15905
|
+
const appViewConfig = this.viewConfig;
|
|
15906
|
+
// Check if this is a FullAppEmbed (AppEmbed)
|
|
15907
|
+
// showPrimaryNavbar defaults to true if not explicitly set to false
|
|
15908
|
+
return (appViewConfig.embedComponentType === 'AppEmbed'
|
|
15909
|
+
&& appViewConfig.showPrimaryNavbar === true);
|
|
15910
|
+
}
|
|
15852
15911
|
/**
|
|
15853
15912
|
* fix for ts7.sep.cl
|
|
15854
15913
|
* will be removed for ts7.oct.cl
|
|
@@ -17836,7 +17895,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
|
|
|
17836
17895
|
}
|
|
17837
17896
|
/**
|
|
17838
17897
|
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
17839
|
-
* this Liveboard inside the full
|
|
17898
|
+
* this Liveboard inside the full ThoughtSpot application in a new tab.
|
|
17840
17899
|
* @returns url string
|
|
17841
17900
|
*/
|
|
17842
17901
|
getLiveboardUrl() {
|
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.39.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
*
|
|
1491
1491
|
* error: Developers can customize the error message text when `execute`
|
|
1492
1492
|
* returns `false` using the error parameter in responder.
|
|
1493
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1493
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1494
1494
|
* @example
|
|
1495
1495
|
*```js
|
|
1496
1496
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -1537,7 +1537,7 @@
|
|
|
1537
1537
|
* console.log('payload', payload);
|
|
1538
1538
|
* })
|
|
1539
1539
|
*```
|
|
1540
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1540
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1541
1541
|
*/
|
|
1542
1542
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1543
1543
|
/**
|
|
@@ -1593,18 +1593,18 @@
|
|
|
1593
1593
|
* console.log('payload', payload);
|
|
1594
1594
|
* })
|
|
1595
1595
|
*```
|
|
1596
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1596
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1597
1597
|
*/
|
|
1598
1598
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1599
1599
|
/**
|
|
1600
1600
|
* Emitted when a user creates a Model.
|
|
1601
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1601
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1602
1602
|
*/
|
|
1603
1603
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1604
1604
|
/**
|
|
1605
1605
|
* @hidden
|
|
1606
1606
|
* Emitted when a user exits present mode.
|
|
1607
|
-
* @version SDK : 1.40.0 | ThoughtSpot
|
|
1607
|
+
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1608
1608
|
*/
|
|
1609
1609
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1610
1610
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
@@ -2860,6 +2860,7 @@
|
|
|
2860
2860
|
* hiddenActions: [Action.Edit, ActionAction.Explore],
|
|
2861
2861
|
* })
|
|
2862
2862
|
* ```
|
|
2863
|
+
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
2863
2864
|
*/
|
|
2864
2865
|
// eslint-disable-next-line no-shadow
|
|
2865
2866
|
exports.Action = void 0;
|
|
@@ -7091,9 +7092,52 @@
|
|
|
7091
7092
|
|
|
7092
7093
|
const configKey = 'embedConfig';
|
|
7093
7094
|
/**
|
|
7094
|
-
* Gets the configuration
|
|
7095
|
-
*
|
|
7096
|
-
* @
|
|
7095
|
+
* Gets the embed configuration settings that were used to
|
|
7096
|
+
* initialize the SDK.
|
|
7097
|
+
* @returns {@link EmbedConfig}
|
|
7098
|
+
*
|
|
7099
|
+
* @example
|
|
7100
|
+
* ```js
|
|
7101
|
+
* const config = getInitConfig();
|
|
7102
|
+
* console.log(config);
|
|
7103
|
+
* ```
|
|
7104
|
+
* @example
|
|
7105
|
+
*
|
|
7106
|
+
* Returns the `EmbedConfig` object, which
|
|
7107
|
+
* contains the configuration settings used to
|
|
7108
|
+
* initialize the SDK, including the following:
|
|
7109
|
+
*
|
|
7110
|
+
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
7111
|
+
* - `authType`: The authentication method used. For example,
|
|
7112
|
+
* `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
|
|
7113
|
+
* - `customizations` - Style, text, and icon customization settings
|
|
7114
|
+
* that were applied during the SDK initialization.
|
|
7115
|
+
*
|
|
7116
|
+
* For a comprehensive list of embed configuration settings,
|
|
7117
|
+
* see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
|
|
7118
|
+
*
|
|
7119
|
+
* ```json
|
|
7120
|
+
* {
|
|
7121
|
+
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
7122
|
+
* "authType": "AuthServerCookieless",
|
|
7123
|
+
* "customizations": {
|
|
7124
|
+
* "style": {
|
|
7125
|
+
* "customCSS": {
|
|
7126
|
+
* "variables": {
|
|
7127
|
+
* "--ts-var-button--secondary-background": "#7492d5",
|
|
7128
|
+
* "--ts-var-button--secondary--hovers-background": "#aac2f8",
|
|
7129
|
+
* "--ts-var-root-background": "#f1f4f8"
|
|
7130
|
+
* }
|
|
7131
|
+
* }
|
|
7132
|
+
* }
|
|
7133
|
+
* },
|
|
7134
|
+
* "loginFailedMessage": "Login failed, please try again",
|
|
7135
|
+
* "authTriggerText": "Authorize",
|
|
7136
|
+
* "disableTokenVerification": true,
|
|
7137
|
+
* "authTriggerContainer": "#your-own-div"
|
|
7138
|
+
* }
|
|
7139
|
+
* ```
|
|
7140
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
|
|
7097
7141
|
* @group Global methods
|
|
7098
7142
|
*/
|
|
7099
7143
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -7101,7 +7145,7 @@
|
|
|
7101
7145
|
* Sets the configuration embed was initialized with.
|
|
7102
7146
|
* And returns the new configuration.
|
|
7103
7147
|
* @param newConfig The configuration to set.
|
|
7104
|
-
* @version SDK: 1.27.0 | ThoughtSpot:
|
|
7148
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
|
|
7105
7149
|
* @group Global methods
|
|
7106
7150
|
*/
|
|
7107
7151
|
const setEmbedConfig = (newConfig) => {
|
|
@@ -15469,7 +15513,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15469
15513
|
return e;
|
|
15470
15514
|
}
|
|
15471
15515
|
|
|
15472
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15516
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2";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","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",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",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",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
|
|
15473
15517
|
|
|
15474
15518
|
/**
|
|
15475
15519
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15867,10 +15911,25 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15867
15911
|
// - cached auth info would be for wrong org
|
|
15868
15912
|
// - info call response changes for each different overrideOrgId
|
|
15869
15913
|
// 2. disablePreauthCache is explicitly set to true
|
|
15914
|
+
// 3. FullAppEmbed has primary navbar visible since:
|
|
15915
|
+
// - primary navbar requires fresh auth state for navigation
|
|
15916
|
+
// - cached auth may not reflect current user permissions
|
|
15870
15917
|
const isDisabled = (this.viewConfig.overrideOrgId !== undefined
|
|
15871
|
-
|| this.embedConfig.disablePreauthCache === true
|
|
15918
|
+
|| this.embedConfig.disablePreauthCache === true
|
|
15919
|
+
|| this.isFullAppEmbedWithVisiblePrimaryNavbar());
|
|
15872
15920
|
return !isDisabled;
|
|
15873
15921
|
}
|
|
15922
|
+
/**
|
|
15923
|
+
* Checks if current embed is FullAppEmbed with visible primary navbar
|
|
15924
|
+
* @returns boolean
|
|
15925
|
+
*/
|
|
15926
|
+
isFullAppEmbedWithVisiblePrimaryNavbar() {
|
|
15927
|
+
const appViewConfig = this.viewConfig;
|
|
15928
|
+
// Check if this is a FullAppEmbed (AppEmbed)
|
|
15929
|
+
// showPrimaryNavbar defaults to true if not explicitly set to false
|
|
15930
|
+
return (appViewConfig.embedComponentType === 'AppEmbed'
|
|
15931
|
+
&& appViewConfig.showPrimaryNavbar === true);
|
|
15932
|
+
}
|
|
15874
15933
|
/**
|
|
15875
15934
|
* fix for ts7.sep.cl
|
|
15876
15935
|
* will be removed for ts7.oct.cl
|
|
@@ -17858,7 +17917,7 @@ query GetEurekaVizSnapshots(
|
|
|
17858
17917
|
}
|
|
17859
17918
|
/**
|
|
17860
17919
|
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
17861
|
-
* this Liveboard inside the full
|
|
17920
|
+
* this Liveboard inside the full ThoughtSpot application in a new tab.
|
|
17862
17921
|
* @returns url string
|
|
17863
17922
|
*/
|
|
17864
17923
|
getLiveboardUrl() {
|
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.39.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.39.2 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1722,7 +1722,7 @@ var EmbedEvent;
|
|
|
1722
1722
|
*
|
|
1723
1723
|
* error: Developers can customize the error message text when `execute`
|
|
1724
1724
|
* returns `false` using the error parameter in responder.
|
|
1725
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1725
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1726
1726
|
* @example
|
|
1727
1727
|
*```js
|
|
1728
1728
|
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
@@ -1769,7 +1769,7 @@ var EmbedEvent;
|
|
|
1769
1769
|
* console.log('payload', payload);
|
|
1770
1770
|
* })
|
|
1771
1771
|
*```
|
|
1772
|
-
* @version SDK : 1.29.0 | ThoughtSpot
|
|
1772
|
+
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
1773
1773
|
*/
|
|
1774
1774
|
EmbedEvent["ParameterChanged"] = "parameterChanged";
|
|
1775
1775
|
/**
|
|
@@ -1825,18 +1825,18 @@ var EmbedEvent;
|
|
|
1825
1825
|
* console.log('payload', payload);
|
|
1826
1826
|
* })
|
|
1827
1827
|
*```
|
|
1828
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1828
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1829
1829
|
*/
|
|
1830
1830
|
EmbedEvent["CreateLiveboard"] = "createLiveboard";
|
|
1831
1831
|
/**
|
|
1832
1832
|
* Emitted when a user creates a Model.
|
|
1833
|
-
* @version SDK : 1.37.0 | ThoughtSpot
|
|
1833
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
1834
1834
|
*/
|
|
1835
1835
|
EmbedEvent["CreateModel"] = "createModel";
|
|
1836
1836
|
/**
|
|
1837
1837
|
* @hidden
|
|
1838
1838
|
* Emitted when a user exits present mode.
|
|
1839
|
-
* @version SDK : 1.40.0 | ThoughtSpot
|
|
1839
|
+
* @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
1840
1840
|
*/
|
|
1841
1841
|
EmbedEvent["ExitPresentMode"] = "exitPresentMode";
|
|
1842
1842
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -3092,6 +3092,7 @@ var Param;
|
|
|
3092
3092
|
* hiddenActions: [Action.Edit, ActionAction.Explore],
|
|
3093
3093
|
* })
|
|
3094
3094
|
* ```
|
|
3095
|
+
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
3095
3096
|
*/
|
|
3096
3097
|
// eslint-disable-next-line no-shadow
|
|
3097
3098
|
var Action;
|
|
@@ -6954,9 +6955,52 @@ const resetCachedAuthToken = () => {
|
|
|
6954
6955
|
|
|
6955
6956
|
const configKey = 'embedConfig';
|
|
6956
6957
|
/**
|
|
6957
|
-
* Gets the configuration
|
|
6958
|
-
*
|
|
6959
|
-
* @
|
|
6958
|
+
* Gets the embed configuration settings that were used to
|
|
6959
|
+
* initialize the SDK.
|
|
6960
|
+
* @returns {@link EmbedConfig}
|
|
6961
|
+
*
|
|
6962
|
+
* @example
|
|
6963
|
+
* ```js
|
|
6964
|
+
* const config = getInitConfig();
|
|
6965
|
+
* console.log(config);
|
|
6966
|
+
* ```
|
|
6967
|
+
* @example
|
|
6968
|
+
*
|
|
6969
|
+
* Returns the `EmbedConfig` object, which
|
|
6970
|
+
* contains the configuration settings used to
|
|
6971
|
+
* initialize the SDK, including the following:
|
|
6972
|
+
*
|
|
6973
|
+
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
6974
|
+
* - `authType`: The authentication method used. For example,
|
|
6975
|
+
* `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
|
|
6976
|
+
* - `customizations` - Style, text, and icon customization settings
|
|
6977
|
+
* that were applied during the SDK initialization.
|
|
6978
|
+
*
|
|
6979
|
+
* For a comprehensive list of embed configuration settings,
|
|
6980
|
+
* see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
|
|
6981
|
+
*
|
|
6982
|
+
* ```json
|
|
6983
|
+
* {
|
|
6984
|
+
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
6985
|
+
* "authType": "AuthServerCookieless",
|
|
6986
|
+
* "customizations": {
|
|
6987
|
+
* "style": {
|
|
6988
|
+
* "customCSS": {
|
|
6989
|
+
* "variables": {
|
|
6990
|
+
* "--ts-var-button--secondary-background": "#7492d5",
|
|
6991
|
+
* "--ts-var-button--secondary--hovers-background": "#aac2f8",
|
|
6992
|
+
* "--ts-var-root-background": "#f1f4f8"
|
|
6993
|
+
* }
|
|
6994
|
+
* }
|
|
6995
|
+
* }
|
|
6996
|
+
* },
|
|
6997
|
+
* "loginFailedMessage": "Login failed, please try again",
|
|
6998
|
+
* "authTriggerText": "Authorize",
|
|
6999
|
+
* "disableTokenVerification": true,
|
|
7000
|
+
* "authTriggerContainer": "#your-own-div"
|
|
7001
|
+
* }
|
|
7002
|
+
* ```
|
|
7003
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
|
|
6960
7004
|
* @group Global methods
|
|
6961
7005
|
*/
|
|
6962
7006
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -6964,7 +7008,7 @@ const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
|
6964
7008
|
* Sets the configuration embed was initialized with.
|
|
6965
7009
|
* And returns the new configuration.
|
|
6966
7010
|
* @param newConfig The configuration to set.
|
|
6967
|
-
* @version SDK: 1.27.0 | ThoughtSpot:
|
|
7011
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
|
|
6968
7012
|
* @group Global methods
|
|
6969
7013
|
*/
|
|
6970
7014
|
const setEmbedConfig = (newConfig) => {
|
|
@@ -7598,7 +7642,7 @@ class AnswerService {
|
|
|
7598
7642
|
async getTML() {
|
|
7599
7643
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7600
7644
|
const edoc = object[0].edoc;
|
|
7601
|
-
const YAML = await import('./index-
|
|
7645
|
+
const YAML = await import('./index-CmEQfuE3.js');
|
|
7602
7646
|
const parsedDoc = YAML.parse(edoc);
|
|
7603
7647
|
return {
|
|
7604
7648
|
answer: {
|
|
@@ -15498,7 +15542,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15498
15542
|
return e;
|
|
15499
15543
|
}
|
|
15500
15544
|
|
|
15501
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15545
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2";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","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",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",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",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.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/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.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",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.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",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:"4.24.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","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 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};
|
|
15502
15546
|
|
|
15503
15547
|
/**
|
|
15504
15548
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15896,10 +15940,25 @@ class TsEmbed {
|
|
|
15896
15940
|
// - cached auth info would be for wrong org
|
|
15897
15941
|
// - info call response changes for each different overrideOrgId
|
|
15898
15942
|
// 2. disablePreauthCache is explicitly set to true
|
|
15943
|
+
// 3. FullAppEmbed has primary navbar visible since:
|
|
15944
|
+
// - primary navbar requires fresh auth state for navigation
|
|
15945
|
+
// - cached auth may not reflect current user permissions
|
|
15899
15946
|
const isDisabled = (this.viewConfig.overrideOrgId !== undefined
|
|
15900
|
-
|| this.embedConfig.disablePreauthCache === true
|
|
15947
|
+
|| this.embedConfig.disablePreauthCache === true
|
|
15948
|
+
|| this.isFullAppEmbedWithVisiblePrimaryNavbar());
|
|
15901
15949
|
return !isDisabled;
|
|
15902
15950
|
}
|
|
15951
|
+
/**
|
|
15952
|
+
* Checks if current embed is FullAppEmbed with visible primary navbar
|
|
15953
|
+
* @returns boolean
|
|
15954
|
+
*/
|
|
15955
|
+
isFullAppEmbedWithVisiblePrimaryNavbar() {
|
|
15956
|
+
const appViewConfig = this.viewConfig;
|
|
15957
|
+
// Check if this is a FullAppEmbed (AppEmbed)
|
|
15958
|
+
// showPrimaryNavbar defaults to true if not explicitly set to false
|
|
15959
|
+
return (appViewConfig.embedComponentType === 'AppEmbed'
|
|
15960
|
+
&& appViewConfig.showPrimaryNavbar === true);
|
|
15961
|
+
}
|
|
15903
15962
|
/**
|
|
15904
15963
|
* fix for ts7.sep.cl
|
|
15905
15964
|
* will be removed for ts7.oct.cl
|
|
@@ -17559,7 +17618,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17559
17618
|
}
|
|
17560
17619
|
/**
|
|
17561
17620
|
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
17562
|
-
* this Liveboard inside the full
|
|
17621
|
+
* this Liveboard inside the full ThoughtSpot application in a new tab.
|
|
17563
17622
|
* @returns url string
|
|
17564
17623
|
*/
|
|
17565
17624
|
getLiveboardUrl() {
|