@thoughtspot/visual-embed-sdk 1.39.0 → 1.39.2-alpha.1
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/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +2 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +18 -8
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +64 -6
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +9 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +130 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts +49 -4
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js +49 -4
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -19
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +3 -5
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +12 -11
- package/cjs/src/embed/liveboard.spec.js.map +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 +41 -8
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +23 -6
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-sSREbWM-.js → index-CmEQfuE3.js} +1 -1
- package/dist/index-DeFzsyFF.js +7371 -0
- package/dist/index-Dpf0rd6w.js +7371 -0
- package/dist/index-UuEbsISo.js +7447 -0
- package/dist/src/embed/app.d.ts +13 -13
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +64 -6
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts +49 -4
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -19
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- 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 +41 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +105 -21
- package/dist/tsembed-react.js +104 -20
- package/dist/tsembed.es.js +105 -21
- package/dist/tsembed.js +104 -20
- package/dist/visual-embed-sdk-react-full.d.ts +182 -63
- package/dist/visual-embed-sdk-react.d.ts +182 -63
- package/dist/visual-embed-sdk.d.ts +182 -63
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +13 -13
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +2 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +19 -9
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +64 -6
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +10 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +133 -3
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts +49 -4
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js +49 -4
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -19
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +3 -5
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +12 -11
- package/lib/src/embed/liveboard.spec.js.map +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 +41 -8
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +23 -6
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +183 -64
- package/package.json +1 -1
- package/src/embed/app.spec.ts +36 -23
- package/src/embed/app.ts +15 -13
- package/src/embed/conversation.spec.ts +170 -6
- package/src/embed/conversation.ts +86 -14
- package/src/embed/embedConfig.ts +50 -5
- package/src/embed/liveboard.spec.ts +5 -4
- package/src/embed/liveboard.ts +4 -24
- 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 +82 -49
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-alpha.1 */
|
|
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 = {}));
|
|
@@ -2830,7 +2830,7 @@
|
|
|
2830
2830
|
Param["DataSourceId"] = "dataSourceId";
|
|
2831
2831
|
Param["preAuthCache"] = "preAuthCache";
|
|
2832
2832
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
2833
|
-
Param["CoverAndFilterOptionInPDF"] = "
|
|
2833
|
+
Param["CoverAndFilterOptionInPDF"] = "arePdfCoverFilterPageCheckboxesEnabled";
|
|
2834
2834
|
Param["PrimaryAction"] = "primaryAction";
|
|
2835
2835
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
2836
2836
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
@@ -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;
|
|
@@ -4055,6 +4056,22 @@
|
|
|
4055
4056
|
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4056
4057
|
*/
|
|
4057
4058
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4059
|
+
/**
|
|
4060
|
+
* Action ID for hide or disable the
|
|
4061
|
+
* Spotter in conversation training widget.
|
|
4062
|
+
* The Add to Coaching feature is currently in beta
|
|
4063
|
+
* and is disabled by default on embed deployments.
|
|
4064
|
+
* To enable this feature on your instance,
|
|
4065
|
+
* contact ThoughtSpot Support.
|
|
4066
|
+
* @example
|
|
4067
|
+
* ```js
|
|
4068
|
+
* hiddenAction: [Action.InConversationTraining]
|
|
4069
|
+
* disabledActions: [Action.InConversationTraining]
|
|
4070
|
+
*
|
|
4071
|
+
* ```
|
|
4072
|
+
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
4073
|
+
*/
|
|
4074
|
+
Action["InConversationTraining"] = "InConversationTraining";
|
|
4058
4075
|
})(exports.Action || (exports.Action = {}));
|
|
4059
4076
|
var PrefetchFeatures;
|
|
4060
4077
|
(function (PrefetchFeatures) {
|
|
@@ -7091,9 +7108,54 @@
|
|
|
7091
7108
|
|
|
7092
7109
|
const configKey = 'embedConfig';
|
|
7093
7110
|
/**
|
|
7094
|
-
* Gets the configuration
|
|
7095
|
-
*
|
|
7096
|
-
* @
|
|
7111
|
+
* Gets the embed configuration settings that were used to
|
|
7112
|
+
* initialize the SDK.
|
|
7113
|
+
* @returns {@link EmbedConfig}
|
|
7114
|
+
*
|
|
7115
|
+
* @example
|
|
7116
|
+
* ```js
|
|
7117
|
+
* import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
|
|
7118
|
+
* // Call the getInitConfig method to retrieve the embed configuration
|
|
7119
|
+
* const config = getInitConfig();
|
|
7120
|
+
* // Log the configuration settings
|
|
7121
|
+
* console.log(config);
|
|
7122
|
+
* ```
|
|
7123
|
+
* Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
|
|
7124
|
+
* object, which contains the configuration settings used to
|
|
7125
|
+
* initialize the SDK, including the following:
|
|
7126
|
+
*
|
|
7127
|
+
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
7128
|
+
* - `authType`: The authentication method used. For example,
|
|
7129
|
+
* `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
|
|
7130
|
+
* - `customizations` - Style, text, and icon customization settings
|
|
7131
|
+
* that were applied during the SDK initialization.
|
|
7132
|
+
*
|
|
7133
|
+
* The following JSON output shows the embed configuration
|
|
7134
|
+
* settings returned from the code in the previous example:
|
|
7135
|
+
*
|
|
7136
|
+
* @example
|
|
7137
|
+
* ```json
|
|
7138
|
+
* {
|
|
7139
|
+
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
7140
|
+
* "authType": "AuthServerCookieless",
|
|
7141
|
+
* "customizations": {
|
|
7142
|
+
* "style": {
|
|
7143
|
+
* "customCSS": {
|
|
7144
|
+
* "variables": {
|
|
7145
|
+
* "--ts-var-button--secondary-background": "#7492d5",
|
|
7146
|
+
* "--ts-var-button--secondary--hovers-background": "#aac2f8",
|
|
7147
|
+
* "--ts-var-root-background": "#f1f4f8"
|
|
7148
|
+
* }
|
|
7149
|
+
* }
|
|
7150
|
+
* }
|
|
7151
|
+
* },
|
|
7152
|
+
* "loginFailedMessage": "Login failed, please try again",
|
|
7153
|
+
* "authTriggerText": "Authorize",
|
|
7154
|
+
* "disableTokenVerification": true,
|
|
7155
|
+
* "authTriggerContainer": "#your-own-div"
|
|
7156
|
+
* }
|
|
7157
|
+
* ```
|
|
7158
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
|
|
7097
7159
|
* @group Global methods
|
|
7098
7160
|
*/
|
|
7099
7161
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -7101,7 +7163,7 @@
|
|
|
7101
7163
|
* Sets the configuration embed was initialized with.
|
|
7102
7164
|
* And returns the new configuration.
|
|
7103
7165
|
* @param newConfig The configuration to set.
|
|
7104
|
-
* @version SDK: 1.27.0 | ThoughtSpot:
|
|
7166
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
|
|
7105
7167
|
* @group Global methods
|
|
7106
7168
|
*/
|
|
7107
7169
|
const setEmbedConfig = (newConfig) => {
|
|
@@ -15469,7 +15531,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15469
15531
|
return e;
|
|
15470
15532
|
}
|
|
15471
15533
|
|
|
15472
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15534
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-alpha.1";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
15535
|
|
|
15474
15536
|
/**
|
|
15475
15537
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15867,10 +15929,25 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
15867
15929
|
// - cached auth info would be for wrong org
|
|
15868
15930
|
// - info call response changes for each different overrideOrgId
|
|
15869
15931
|
// 2. disablePreauthCache is explicitly set to true
|
|
15932
|
+
// 3. FullAppEmbed has primary navbar visible since:
|
|
15933
|
+
// - primary navbar requires fresh auth state for navigation
|
|
15934
|
+
// - cached auth may not reflect current user permissions
|
|
15870
15935
|
const isDisabled = (this.viewConfig.overrideOrgId !== undefined
|
|
15871
|
-
|| this.embedConfig.disablePreauthCache === true
|
|
15936
|
+
|| this.embedConfig.disablePreauthCache === true
|
|
15937
|
+
|| this.isFullAppEmbedWithVisiblePrimaryNavbar());
|
|
15872
15938
|
return !isDisabled;
|
|
15873
15939
|
}
|
|
15940
|
+
/**
|
|
15941
|
+
* Checks if current embed is FullAppEmbed with visible primary navbar
|
|
15942
|
+
* @returns boolean
|
|
15943
|
+
*/
|
|
15944
|
+
isFullAppEmbedWithVisiblePrimaryNavbar() {
|
|
15945
|
+
const appViewConfig = this.viewConfig;
|
|
15946
|
+
// Check if this is a FullAppEmbed (AppEmbed)
|
|
15947
|
+
// showPrimaryNavbar defaults to true if not explicitly set to false
|
|
15948
|
+
return (appViewConfig.embedComponentType === 'AppEmbed'
|
|
15949
|
+
&& appViewConfig.showPrimaryNavbar === true);
|
|
15950
|
+
}
|
|
15874
15951
|
/**
|
|
15875
15952
|
* fix for ts7.sep.cl
|
|
15876
15953
|
* will be removed for ts7.oct.cl
|
|
@@ -17332,7 +17409,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17332
17409
|
getEmbedParams() {
|
|
17333
17410
|
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17334
17411
|
/* eslint-disable-next-line max-len */
|
|
17335
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17412
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17336
17413
|
let params = {};
|
|
17337
17414
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
17338
17415
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -17348,6 +17425,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17348
17425
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
17349
17426
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17350
17427
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17428
|
+
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
17351
17429
|
params = this.getBaseQueryParams(params);
|
|
17352
17430
|
if (hideObjectSearch) {
|
|
17353
17431
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
@@ -17667,7 +17745,7 @@ query GetEurekaVizSnapshots(
|
|
|
17667
17745
|
getEmbedParams() {
|
|
17668
17746
|
let params = {};
|
|
17669
17747
|
params = this.getBaseQueryParams(params);
|
|
17670
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17748
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17671
17749
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17672
17750
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17673
17751
|
if (fullHeight === true) {
|
|
@@ -17719,9 +17797,6 @@ query GetEurekaVizSnapshots(
|
|
|
17719
17797
|
if (dataSourceId !== undefined) {
|
|
17720
17798
|
params[Param.DataSourceId] = dataSourceId;
|
|
17721
17799
|
}
|
|
17722
|
-
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17723
|
-
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17724
|
-
}
|
|
17725
17800
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17726
17801
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17727
17802
|
}
|
|
@@ -17732,6 +17807,7 @@ query GetEurekaVizSnapshots(
|
|
|
17732
17807
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17733
17808
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17734
17809
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17810
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17735
17811
|
const queryParams = getQueryParamString(params, true);
|
|
17736
17812
|
return queryParams;
|
|
17737
17813
|
}
|
|
@@ -17858,7 +17934,7 @@ query GetEurekaVizSnapshots(
|
|
|
17858
17934
|
}
|
|
17859
17935
|
/**
|
|
17860
17936
|
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
17861
|
-
* this Liveboard inside the full
|
|
17937
|
+
* this Liveboard inside the full ThoughtSpot application in a new tab.
|
|
17862
17938
|
* @returns url string
|
|
17863
17939
|
*/
|
|
17864
17940
|
getLiveboardUrl() {
|
|
@@ -18397,7 +18473,7 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18397
18473
|
this.viewConfig = viewConfig;
|
|
18398
18474
|
}
|
|
18399
18475
|
getIframeSrc() {
|
|
18400
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
18476
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
18401
18477
|
const path = 'insights/conv-assist';
|
|
18402
18478
|
if (!worksheetId) {
|
|
18403
18479
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
@@ -18424,6 +18500,14 @@ query SendMessage($params: Input_convassist_SendMessageRequest) {
|
|
|
18424
18500
|
if (queryParamsString) {
|
|
18425
18501
|
query = `?${queryParamsString}`;
|
|
18426
18502
|
}
|
|
18503
|
+
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
18504
|
+
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
18505
|
+
query += `&${filterQuery}`;
|
|
18506
|
+
}
|
|
18507
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
18508
|
+
if (parameterQuery && !excludeRuntimeParametersfromURL) {
|
|
18509
|
+
query += `&${parameterQuery}`;
|
|
18510
|
+
}
|
|
18427
18511
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
18428
18512
|
worksheet: worksheetId,
|
|
18429
18513
|
query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
|
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-alpha.1 */
|
|
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 = {}));
|
|
@@ -3062,7 +3062,7 @@ var Param;
|
|
|
3062
3062
|
Param["DataSourceId"] = "dataSourceId";
|
|
3063
3063
|
Param["preAuthCache"] = "preAuthCache";
|
|
3064
3064
|
Param["ShowSpotterLimitations"] = "showSpotterLimitations";
|
|
3065
|
-
Param["CoverAndFilterOptionInPDF"] = "
|
|
3065
|
+
Param["CoverAndFilterOptionInPDF"] = "arePdfCoverFilterPageCheckboxesEnabled";
|
|
3066
3066
|
Param["PrimaryAction"] = "primaryAction";
|
|
3067
3067
|
Param["isSpotterAgentEmbed"] = "isSpotterAgentEmbed";
|
|
3068
3068
|
Param["IsLiveboardStylingAndGroupingEnabled"] = "isLiveboardStylingAndGroupingEnabled";
|
|
@@ -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;
|
|
@@ -4287,6 +4288,22 @@ var Action;
|
|
|
4287
4288
|
* @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
|
|
4288
4289
|
*/
|
|
4289
4290
|
Action["CoverAndFilterOptionInPDF"] = "coverAndFilterOptionInPDF";
|
|
4291
|
+
/**
|
|
4292
|
+
* Action ID for hide or disable the
|
|
4293
|
+
* Spotter in conversation training widget.
|
|
4294
|
+
* The Add to Coaching feature is currently in beta
|
|
4295
|
+
* and is disabled by default on embed deployments.
|
|
4296
|
+
* To enable this feature on your instance,
|
|
4297
|
+
* contact ThoughtSpot Support.
|
|
4298
|
+
* @example
|
|
4299
|
+
* ```js
|
|
4300
|
+
* hiddenAction: [Action.InConversationTraining]
|
|
4301
|
+
* disabledActions: [Action.InConversationTraining]
|
|
4302
|
+
*
|
|
4303
|
+
* ```
|
|
4304
|
+
* @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
|
|
4305
|
+
*/
|
|
4306
|
+
Action["InConversationTraining"] = "InConversationTraining";
|
|
4290
4307
|
})(Action || (Action = {}));
|
|
4291
4308
|
var PrefetchFeatures;
|
|
4292
4309
|
(function (PrefetchFeatures) {
|
|
@@ -6954,9 +6971,54 @@ const resetCachedAuthToken = () => {
|
|
|
6954
6971
|
|
|
6955
6972
|
const configKey = 'embedConfig';
|
|
6956
6973
|
/**
|
|
6957
|
-
* Gets the configuration
|
|
6958
|
-
*
|
|
6959
|
-
* @
|
|
6974
|
+
* Gets the embed configuration settings that were used to
|
|
6975
|
+
* initialize the SDK.
|
|
6976
|
+
* @returns {@link EmbedConfig}
|
|
6977
|
+
*
|
|
6978
|
+
* @example
|
|
6979
|
+
* ```js
|
|
6980
|
+
* import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
|
|
6981
|
+
* // Call the getInitConfig method to retrieve the embed configuration
|
|
6982
|
+
* const config = getInitConfig();
|
|
6983
|
+
* // Log the configuration settings
|
|
6984
|
+
* console.log(config);
|
|
6985
|
+
* ```
|
|
6986
|
+
* Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
|
|
6987
|
+
* object, which contains the configuration settings used to
|
|
6988
|
+
* initialize the SDK, including the following:
|
|
6989
|
+
*
|
|
6990
|
+
* - `thoughtSpotHost` - ThoughtSpot host URL
|
|
6991
|
+
* - `authType`: The authentication method used. For example,
|
|
6992
|
+
* `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless`
|
|
6993
|
+
* - `customizations` - Style, text, and icon customization settings
|
|
6994
|
+
* that were applied during the SDK initialization.
|
|
6995
|
+
*
|
|
6996
|
+
* The following JSON output shows the embed configuration
|
|
6997
|
+
* settings returned from the code in the previous example:
|
|
6998
|
+
*
|
|
6999
|
+
* @example
|
|
7000
|
+
* ```json
|
|
7001
|
+
* {
|
|
7002
|
+
* "thoughtSpotHost": "https://{ThoughtSpot-Host}",
|
|
7003
|
+
* "authType": "AuthServerCookieless",
|
|
7004
|
+
* "customizations": {
|
|
7005
|
+
* "style": {
|
|
7006
|
+
* "customCSS": {
|
|
7007
|
+
* "variables": {
|
|
7008
|
+
* "--ts-var-button--secondary-background": "#7492d5",
|
|
7009
|
+
* "--ts-var-button--secondary--hovers-background": "#aac2f8",
|
|
7010
|
+
* "--ts-var-root-background": "#f1f4f8"
|
|
7011
|
+
* }
|
|
7012
|
+
* }
|
|
7013
|
+
* }
|
|
7014
|
+
* },
|
|
7015
|
+
* "loginFailedMessage": "Login failed, please try again",
|
|
7016
|
+
* "authTriggerText": "Authorize",
|
|
7017
|
+
* "disableTokenVerification": true,
|
|
7018
|
+
* "authTriggerContainer": "#your-own-div"
|
|
7019
|
+
* }
|
|
7020
|
+
* ```
|
|
7021
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
|
|
6960
7022
|
* @group Global methods
|
|
6961
7023
|
*/
|
|
6962
7024
|
const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
@@ -6964,7 +7026,7 @@ const getEmbedConfig = () => getValueFromWindow(configKey) || {};
|
|
|
6964
7026
|
* Sets the configuration embed was initialized with.
|
|
6965
7027
|
* And returns the new configuration.
|
|
6966
7028
|
* @param newConfig The configuration to set.
|
|
6967
|
-
* @version SDK: 1.27.0 | ThoughtSpot:
|
|
7029
|
+
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.1.sw, and later
|
|
6968
7030
|
* @group Global methods
|
|
6969
7031
|
*/
|
|
6970
7032
|
const setEmbedConfig = (newConfig) => {
|
|
@@ -7598,7 +7660,7 @@ class AnswerService {
|
|
|
7598
7660
|
async getTML() {
|
|
7599
7661
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7600
7662
|
const edoc = object[0].edoc;
|
|
7601
|
-
const YAML = await import('./index-
|
|
7663
|
+
const YAML = await import('./index-Dpf0rd6w.js');
|
|
7602
7664
|
const parsedDoc = YAML.parse(edoc);
|
|
7603
7665
|
return {
|
|
7604
7666
|
answer: {
|
|
@@ -15498,7 +15560,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15498
15560
|
return e;
|
|
15499
15561
|
}
|
|
15500
15562
|
|
|
15501
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.
|
|
15563
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.39.2-alpha.1";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
15564
|
|
|
15503
15565
|
/**
|
|
15504
15566
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15896,10 +15958,25 @@ class TsEmbed {
|
|
|
15896
15958
|
// - cached auth info would be for wrong org
|
|
15897
15959
|
// - info call response changes for each different overrideOrgId
|
|
15898
15960
|
// 2. disablePreauthCache is explicitly set to true
|
|
15961
|
+
// 3. FullAppEmbed has primary navbar visible since:
|
|
15962
|
+
// - primary navbar requires fresh auth state for navigation
|
|
15963
|
+
// - cached auth may not reflect current user permissions
|
|
15899
15964
|
const isDisabled = (this.viewConfig.overrideOrgId !== undefined
|
|
15900
|
-
|| this.embedConfig.disablePreauthCache === true
|
|
15965
|
+
|| this.embedConfig.disablePreauthCache === true
|
|
15966
|
+
|| this.isFullAppEmbedWithVisiblePrimaryNavbar());
|
|
15901
15967
|
return !isDisabled;
|
|
15902
15968
|
}
|
|
15969
|
+
/**
|
|
15970
|
+
* Checks if current embed is FullAppEmbed with visible primary navbar
|
|
15971
|
+
* @returns boolean
|
|
15972
|
+
*/
|
|
15973
|
+
isFullAppEmbedWithVisiblePrimaryNavbar() {
|
|
15974
|
+
const appViewConfig = this.viewConfig;
|
|
15975
|
+
// Check if this is a FullAppEmbed (AppEmbed)
|
|
15976
|
+
// showPrimaryNavbar defaults to true if not explicitly set to false
|
|
15977
|
+
return (appViewConfig.embedComponentType === 'AppEmbed'
|
|
15978
|
+
&& appViewConfig.showPrimaryNavbar === true);
|
|
15979
|
+
}
|
|
15903
15980
|
/**
|
|
15904
15981
|
* fix for ts7.sep.cl
|
|
15905
15982
|
* will be removed for ts7.oct.cl
|
|
@@ -17033,7 +17110,7 @@ class AppEmbed extends V1Embed {
|
|
|
17033
17110
|
getEmbedParams() {
|
|
17034
17111
|
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, isOnBeforeGetVizDataInterceptEnabled = false,
|
|
17035
17112
|
/* eslint-disable-next-line max-len */
|
|
17036
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17113
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17037
17114
|
let params = {};
|
|
17038
17115
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
17039
17116
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -17049,6 +17126,7 @@ class AppEmbed extends V1Embed {
|
|
|
17049
17126
|
params[Param.ShowLiveboardReverifyBanner] = showLiveboardReverifyBanner;
|
|
17050
17127
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17051
17128
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
17129
|
+
params[Param.CoverAndFilterOptionInPDF] = !!coverAndFilterOptionInPDF;
|
|
17052
17130
|
params = this.getBaseQueryParams(params);
|
|
17053
17131
|
if (hideObjectSearch) {
|
|
17054
17132
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
@@ -17368,7 +17446,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17368
17446
|
getEmbedParams() {
|
|
17369
17447
|
let params = {};
|
|
17370
17448
|
params = this.getBaseQueryParams(params);
|
|
17371
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17449
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = false, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, } = this.viewConfig;
|
|
17372
17450
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
17373
17451
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
17374
17452
|
if (fullHeight === true) {
|
|
@@ -17420,9 +17498,6 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17420
17498
|
if (dataSourceId !== undefined) {
|
|
17421
17499
|
params[Param.DataSourceId] = dataSourceId;
|
|
17422
17500
|
}
|
|
17423
|
-
if (coverAndFilterOptionInPDF !== undefined) {
|
|
17424
|
-
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17425
|
-
}
|
|
17426
17501
|
if (isLiveboardStylingAndGroupingEnabled !== undefined) {
|
|
17427
17502
|
params[Param.IsLiveboardStylingAndGroupingEnabled] = isLiveboardStylingAndGroupingEnabled;
|
|
17428
17503
|
}
|
|
@@ -17433,6 +17508,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17433
17508
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
17434
17509
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
17435
17510
|
params[Param.EnableCustomColumnGroups] = enableCustomColumnGroups;
|
|
17511
|
+
params[Param.CoverAndFilterOptionInPDF] = coverAndFilterOptionInPDF;
|
|
17436
17512
|
const queryParams = getQueryParamString(params, true);
|
|
17437
17513
|
return queryParams;
|
|
17438
17514
|
}
|
|
@@ -17559,7 +17635,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17559
17635
|
}
|
|
17560
17636
|
/**
|
|
17561
17637
|
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
17562
|
-
* this Liveboard inside the full
|
|
17638
|
+
* this Liveboard inside the full ThoughtSpot application in a new tab.
|
|
17563
17639
|
* @returns url string
|
|
17564
17640
|
*/
|
|
17565
17641
|
getLiveboardUrl() {
|
|
@@ -18358,7 +18434,7 @@ class SpotterEmbed extends TsEmbed {
|
|
|
18358
18434
|
this.viewConfig = viewConfig;
|
|
18359
18435
|
}
|
|
18360
18436
|
getIframeSrc() {
|
|
18361
|
-
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, } = this.viewConfig;
|
|
18437
|
+
const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, } = this.viewConfig;
|
|
18362
18438
|
const path = 'insights/conv-assist';
|
|
18363
18439
|
if (!worksheetId) {
|
|
18364
18440
|
this.handleError(ERROR_MESSAGE.SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND);
|
|
@@ -18385,6 +18461,14 @@ class SpotterEmbed extends TsEmbed {
|
|
|
18385
18461
|
if (queryParamsString) {
|
|
18386
18462
|
query = `?${queryParamsString}`;
|
|
18387
18463
|
}
|
|
18464
|
+
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
18465
|
+
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
18466
|
+
query += `&${filterQuery}`;
|
|
18467
|
+
}
|
|
18468
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
18469
|
+
if (parameterQuery && !excludeRuntimeParametersfromURL) {
|
|
18470
|
+
query += `&${parameterQuery}`;
|
|
18471
|
+
}
|
|
18388
18472
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams({
|
|
18389
18473
|
worksheet: worksheetId,
|
|
18390
18474
|
query: (searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.searchQuery) || '',
|