@thoughtspot/visual-embed-sdk 1.44.0 → 1.44.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/base.d.ts +7 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +16 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +21 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +54 -5
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +40 -0
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-B2QPwxuL.js → index-BE9gGzRX.js} +1 -1
- package/dist/src/embed/base.d.ts +7 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +54 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +113 -73
- package/dist/tsembed-react.js +112 -72
- package/dist/tsembed.es.js +127 -74
- package/dist/tsembed.js +126 -72
- package/dist/visual-embed-sdk-react-full.d.ts +61 -5
- package/dist/visual-embed-sdk-react.d.ts +54 -5
- package/dist/visual-embed-sdk.d.ts +61 -5
- package/lib/package.json +1 -1
- package/lib/src/embed/base.d.ts +7 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +14 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +21 -0
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +54 -5
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +40 -0
- package/lib/src/types.js.map +1 -1
- package/package.json +1 -1
- package/src/embed/base.spec.ts +28 -0
- package/src/embed/base.ts +15 -0
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +53 -5
package/dist/tsembed-react.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useRef, useCallback } from 'react';
|
|
@@ -4627,6 +4627,46 @@ var Action;
|
|
|
4627
4627
|
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4628
4628
|
*/
|
|
4629
4629
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4630
|
+
/**
|
|
4631
|
+
* The **Move to Group** menu action on a Liveboard.
|
|
4632
|
+
* Allows moving a visualization to a different group.
|
|
4633
|
+
* @example
|
|
4634
|
+
* ```js
|
|
4635
|
+
* disabledActions: [Action.MoveToGroup]
|
|
4636
|
+
* ```
|
|
4637
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4638
|
+
*/
|
|
4639
|
+
Action["MoveToGroup"] = "moveToGroup";
|
|
4640
|
+
/**
|
|
4641
|
+
* The **Move out of Group** menu action on a Liveboard.
|
|
4642
|
+
* Allows moving a visualization out of a group.
|
|
4643
|
+
* @example
|
|
4644
|
+
* ```js
|
|
4645
|
+
* disabledActions: [Action.MoveOutOfGroup]
|
|
4646
|
+
* ```
|
|
4647
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4648
|
+
*/
|
|
4649
|
+
Action["MoveOutOfGroup"] = "moveOutOfGroup";
|
|
4650
|
+
/**
|
|
4651
|
+
* The **Create Group** menu action on a Liveboard.
|
|
4652
|
+
* Allows creating a new group.
|
|
4653
|
+
* @example
|
|
4654
|
+
* ```js
|
|
4655
|
+
* disabledActions: [Action.CreateGroup]
|
|
4656
|
+
* ```
|
|
4657
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4658
|
+
*/
|
|
4659
|
+
Action["CreateGroup"] = "createGroup";
|
|
4660
|
+
/**
|
|
4661
|
+
* The **Ungroup Liveboard Group** menu action on a Liveboard.
|
|
4662
|
+
* Allows ungrouping a liveboard group.
|
|
4663
|
+
* @example
|
|
4664
|
+
* ```js
|
|
4665
|
+
* disabledActions: [Action.UngroupLiveboardGroup]
|
|
4666
|
+
* ```
|
|
4667
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4668
|
+
*/
|
|
4669
|
+
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4630
4670
|
})(Action || (Action = {}));
|
|
4631
4671
|
var PrefetchFeatures;
|
|
4632
4672
|
(function (PrefetchFeatures) {
|
|
@@ -8471,7 +8511,7 @@ class AnswerService {
|
|
|
8471
8511
|
async getTML() {
|
|
8472
8512
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
8473
8513
|
const edoc = object[0].edoc;
|
|
8474
|
-
const YAML = await import('./index-
|
|
8514
|
+
const YAML = await import('./index-BE9gGzRX.js');
|
|
8475
8515
|
const parsedDoc = YAML.parse(edoc);
|
|
8476
8516
|
return {
|
|
8477
8517
|
answer: {
|
|
@@ -17316,6 +17356,76 @@ if (typeof Promise.withResolvers === 'undefined') {
|
|
|
17316
17356
|
};
|
|
17317
17357
|
}
|
|
17318
17358
|
|
|
17359
|
+
/**
|
|
17360
|
+
* Reloads the ThoughtSpot iframe.
|
|
17361
|
+
* @param iFrame
|
|
17362
|
+
*/
|
|
17363
|
+
const reload = (iFrame) => {
|
|
17364
|
+
const src = iFrame.src;
|
|
17365
|
+
iFrame.src = '';
|
|
17366
|
+
setTimeout(() => {
|
|
17367
|
+
iFrame.src = src;
|
|
17368
|
+
}, 100);
|
|
17369
|
+
};
|
|
17370
|
+
/**
|
|
17371
|
+
* Post iframe message.
|
|
17372
|
+
* @param iFrame
|
|
17373
|
+
* @param message
|
|
17374
|
+
* @param message.type
|
|
17375
|
+
* @param message.data
|
|
17376
|
+
* @param thoughtSpotHost
|
|
17377
|
+
* @param channel
|
|
17378
|
+
*/
|
|
17379
|
+
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17380
|
+
var _a;
|
|
17381
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17382
|
+
}
|
|
17383
|
+
const TRIGGER_TIMEOUT = 30000;
|
|
17384
|
+
/**
|
|
17385
|
+
*
|
|
17386
|
+
* @param iFrame
|
|
17387
|
+
* @param messageType
|
|
17388
|
+
* @param thoughtSpotHost
|
|
17389
|
+
* @param data
|
|
17390
|
+
*/
|
|
17391
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17392
|
+
return new Promise((res, rej) => {
|
|
17393
|
+
var _a;
|
|
17394
|
+
if (messageType === HostEvent.Reload) {
|
|
17395
|
+
reload(iFrame);
|
|
17396
|
+
return res(null);
|
|
17397
|
+
}
|
|
17398
|
+
if (messageType === HostEvent.Present) {
|
|
17399
|
+
const embedConfig = getEmbedConfig();
|
|
17400
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17401
|
+
if (!disableFullscreenPresentation) {
|
|
17402
|
+
handlePresentEvent(iFrame);
|
|
17403
|
+
}
|
|
17404
|
+
else {
|
|
17405
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17406
|
+
}
|
|
17407
|
+
}
|
|
17408
|
+
const channel = new MessageChannel();
|
|
17409
|
+
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17410
|
+
var _a;
|
|
17411
|
+
channel.port1.close();
|
|
17412
|
+
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17413
|
+
if (error) {
|
|
17414
|
+
rej(error);
|
|
17415
|
+
}
|
|
17416
|
+
else {
|
|
17417
|
+
res(responseData);
|
|
17418
|
+
}
|
|
17419
|
+
};
|
|
17420
|
+
// Close the messageChannel and resolve the promise if timeout.
|
|
17421
|
+
setTimeout(() => {
|
|
17422
|
+
channel.port1.close();
|
|
17423
|
+
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17424
|
+
}, TRIGGER_TIMEOUT);
|
|
17425
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17426
|
+
});
|
|
17427
|
+
}
|
|
17428
|
+
|
|
17319
17429
|
/* eslint-disable camelcase */
|
|
17320
17430
|
/* eslint-disable import/no-mutable-exports */
|
|
17321
17431
|
/**
|
|
@@ -17654,77 +17764,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
|
|
|
17654
17764
|
return eventData;
|
|
17655
17765
|
}
|
|
17656
17766
|
|
|
17657
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17658
|
-
|
|
17659
|
-
/**
|
|
17660
|
-
* Reloads the ThoughtSpot iframe.
|
|
17661
|
-
* @param iFrame
|
|
17662
|
-
*/
|
|
17663
|
-
const reload = (iFrame) => {
|
|
17664
|
-
const src = iFrame.src;
|
|
17665
|
-
iFrame.src = '';
|
|
17666
|
-
setTimeout(() => {
|
|
17667
|
-
iFrame.src = src;
|
|
17668
|
-
}, 100);
|
|
17669
|
-
};
|
|
17670
|
-
/**
|
|
17671
|
-
* Post iframe message.
|
|
17672
|
-
* @param iFrame
|
|
17673
|
-
* @param message
|
|
17674
|
-
* @param message.type
|
|
17675
|
-
* @param message.data
|
|
17676
|
-
* @param thoughtSpotHost
|
|
17677
|
-
* @param channel
|
|
17678
|
-
*/
|
|
17679
|
-
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17680
|
-
var _a;
|
|
17681
|
-
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17682
|
-
}
|
|
17683
|
-
const TRIGGER_TIMEOUT = 30000;
|
|
17684
|
-
/**
|
|
17685
|
-
*
|
|
17686
|
-
* @param iFrame
|
|
17687
|
-
* @param messageType
|
|
17688
|
-
* @param thoughtSpotHost
|
|
17689
|
-
* @param data
|
|
17690
|
-
*/
|
|
17691
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17692
|
-
return new Promise((res, rej) => {
|
|
17693
|
-
var _a;
|
|
17694
|
-
if (messageType === HostEvent.Reload) {
|
|
17695
|
-
reload(iFrame);
|
|
17696
|
-
return res(null);
|
|
17697
|
-
}
|
|
17698
|
-
if (messageType === HostEvent.Present) {
|
|
17699
|
-
const embedConfig = getEmbedConfig();
|
|
17700
|
-
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17701
|
-
if (!disableFullscreenPresentation) {
|
|
17702
|
-
handlePresentEvent(iFrame);
|
|
17703
|
-
}
|
|
17704
|
-
else {
|
|
17705
|
-
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17706
|
-
}
|
|
17707
|
-
}
|
|
17708
|
-
const channel = new MessageChannel();
|
|
17709
|
-
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17710
|
-
var _a;
|
|
17711
|
-
channel.port1.close();
|
|
17712
|
-
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17713
|
-
if (error) {
|
|
17714
|
-
rej(error);
|
|
17715
|
-
}
|
|
17716
|
-
else {
|
|
17717
|
-
res(responseData);
|
|
17718
|
-
}
|
|
17719
|
-
};
|
|
17720
|
-
// Close the messageChannel and resolve the promise if timeout.
|
|
17721
|
-
setTimeout(() => {
|
|
17722
|
-
channel.port1.close();
|
|
17723
|
-
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17724
|
-
}, TRIGGER_TIMEOUT);
|
|
17725
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17726
|
-
});
|
|
17727
|
-
}
|
|
17767
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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":"^11.2.0","@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",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",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":"^2.0.0",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:"32 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};
|
|
17728
17768
|
|
|
17729
17769
|
class HostEventClient {
|
|
17730
17770
|
constructor(iFrame) {
|
package/dist/tsembed-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.44.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.44.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
|
|
@@ -4649,6 +4649,46 @@
|
|
|
4649
4649
|
* @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl
|
|
4650
4650
|
*/
|
|
4651
4651
|
Action["LiveboardStylePanel"] = "liveboardStylePanel";
|
|
4652
|
+
/**
|
|
4653
|
+
* The **Move to Group** menu action on a Liveboard.
|
|
4654
|
+
* Allows moving a visualization to a different group.
|
|
4655
|
+
* @example
|
|
4656
|
+
* ```js
|
|
4657
|
+
* disabledActions: [Action.MoveToGroup]
|
|
4658
|
+
* ```
|
|
4659
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4660
|
+
*/
|
|
4661
|
+
Action["MoveToGroup"] = "moveToGroup";
|
|
4662
|
+
/**
|
|
4663
|
+
* The **Move out of Group** menu action on a Liveboard.
|
|
4664
|
+
* Allows moving a visualization out of a group.
|
|
4665
|
+
* @example
|
|
4666
|
+
* ```js
|
|
4667
|
+
* disabledActions: [Action.MoveOutOfGroup]
|
|
4668
|
+
* ```
|
|
4669
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4670
|
+
*/
|
|
4671
|
+
Action["MoveOutOfGroup"] = "moveOutOfGroup";
|
|
4672
|
+
/**
|
|
4673
|
+
* The **Create Group** menu action on a Liveboard.
|
|
4674
|
+
* Allows creating a new group.
|
|
4675
|
+
* @example
|
|
4676
|
+
* ```js
|
|
4677
|
+
* disabledActions: [Action.CreateGroup]
|
|
4678
|
+
* ```
|
|
4679
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4680
|
+
*/
|
|
4681
|
+
Action["CreateGroup"] = "createGroup";
|
|
4682
|
+
/**
|
|
4683
|
+
* The **Ungroup Liveboard Group** menu action on a Liveboard.
|
|
4684
|
+
* Allows ungrouping a liveboard group.
|
|
4685
|
+
* @example
|
|
4686
|
+
* ```js
|
|
4687
|
+
* disabledActions: [Action.UngroupLiveboardGroup]
|
|
4688
|
+
* ```
|
|
4689
|
+
* @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
|
|
4690
|
+
*/
|
|
4691
|
+
Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
|
|
4652
4692
|
})(exports.Action || (exports.Action = {}));
|
|
4653
4693
|
var PrefetchFeatures;
|
|
4654
4694
|
(function (PrefetchFeatures) {
|
|
@@ -17338,6 +17378,76 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17338
17378
|
};
|
|
17339
17379
|
}
|
|
17340
17380
|
|
|
17381
|
+
/**
|
|
17382
|
+
* Reloads the ThoughtSpot iframe.
|
|
17383
|
+
* @param iFrame
|
|
17384
|
+
*/
|
|
17385
|
+
const reload = (iFrame) => {
|
|
17386
|
+
const src = iFrame.src;
|
|
17387
|
+
iFrame.src = '';
|
|
17388
|
+
setTimeout(() => {
|
|
17389
|
+
iFrame.src = src;
|
|
17390
|
+
}, 100);
|
|
17391
|
+
};
|
|
17392
|
+
/**
|
|
17393
|
+
* Post iframe message.
|
|
17394
|
+
* @param iFrame
|
|
17395
|
+
* @param message
|
|
17396
|
+
* @param message.type
|
|
17397
|
+
* @param message.data
|
|
17398
|
+
* @param thoughtSpotHost
|
|
17399
|
+
* @param channel
|
|
17400
|
+
*/
|
|
17401
|
+
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17402
|
+
var _a;
|
|
17403
|
+
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17404
|
+
}
|
|
17405
|
+
const TRIGGER_TIMEOUT = 30000;
|
|
17406
|
+
/**
|
|
17407
|
+
*
|
|
17408
|
+
* @param iFrame
|
|
17409
|
+
* @param messageType
|
|
17410
|
+
* @param thoughtSpotHost
|
|
17411
|
+
* @param data
|
|
17412
|
+
*/
|
|
17413
|
+
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17414
|
+
return new Promise((res, rej) => {
|
|
17415
|
+
var _a;
|
|
17416
|
+
if (messageType === exports.HostEvent.Reload) {
|
|
17417
|
+
reload(iFrame);
|
|
17418
|
+
return res(null);
|
|
17419
|
+
}
|
|
17420
|
+
if (messageType === exports.HostEvent.Present) {
|
|
17421
|
+
const embedConfig = getEmbedConfig();
|
|
17422
|
+
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17423
|
+
if (!disableFullscreenPresentation) {
|
|
17424
|
+
handlePresentEvent(iFrame);
|
|
17425
|
+
}
|
|
17426
|
+
else {
|
|
17427
|
+
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17428
|
+
}
|
|
17429
|
+
}
|
|
17430
|
+
const channel = new MessageChannel();
|
|
17431
|
+
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17432
|
+
var _a;
|
|
17433
|
+
channel.port1.close();
|
|
17434
|
+
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17435
|
+
if (error) {
|
|
17436
|
+
rej(error);
|
|
17437
|
+
}
|
|
17438
|
+
else {
|
|
17439
|
+
res(responseData);
|
|
17440
|
+
}
|
|
17441
|
+
};
|
|
17442
|
+
// Close the messageChannel and resolve the promise if timeout.
|
|
17443
|
+
setTimeout(() => {
|
|
17444
|
+
channel.port1.close();
|
|
17445
|
+
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17446
|
+
}, TRIGGER_TIMEOUT);
|
|
17447
|
+
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17448
|
+
});
|
|
17449
|
+
}
|
|
17450
|
+
|
|
17341
17451
|
/* eslint-disable camelcase */
|
|
17342
17452
|
/* eslint-disable import/no-mutable-exports */
|
|
17343
17453
|
/**
|
|
@@ -17676,77 +17786,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
|
|
|
17676
17786
|
return eventData;
|
|
17677
17787
|
}
|
|
17678
17788
|
|
|
17679
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.
|
|
17680
|
-
|
|
17681
|
-
/**
|
|
17682
|
-
* Reloads the ThoughtSpot iframe.
|
|
17683
|
-
* @param iFrame
|
|
17684
|
-
*/
|
|
17685
|
-
const reload = (iFrame) => {
|
|
17686
|
-
const src = iFrame.src;
|
|
17687
|
-
iFrame.src = '';
|
|
17688
|
-
setTimeout(() => {
|
|
17689
|
-
iFrame.src = src;
|
|
17690
|
-
}, 100);
|
|
17691
|
-
};
|
|
17692
|
-
/**
|
|
17693
|
-
* Post iframe message.
|
|
17694
|
-
* @param iFrame
|
|
17695
|
-
* @param message
|
|
17696
|
-
* @param message.type
|
|
17697
|
-
* @param message.data
|
|
17698
|
-
* @param thoughtSpotHost
|
|
17699
|
-
* @param channel
|
|
17700
|
-
*/
|
|
17701
|
-
function postIframeMessage(iFrame, message, thoughtSpotHost, channel) {
|
|
17702
|
-
var _a;
|
|
17703
|
-
return (_a = iFrame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(message, thoughtSpotHost, [channel === null || channel === void 0 ? void 0 : channel.port2]);
|
|
17704
|
-
}
|
|
17705
|
-
const TRIGGER_TIMEOUT = 30000;
|
|
17706
|
-
/**
|
|
17707
|
-
*
|
|
17708
|
-
* @param iFrame
|
|
17709
|
-
* @param messageType
|
|
17710
|
-
* @param thoughtSpotHost
|
|
17711
|
-
* @param data
|
|
17712
|
-
*/
|
|
17713
|
-
function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
17714
|
-
return new Promise((res, rej) => {
|
|
17715
|
-
var _a;
|
|
17716
|
-
if (messageType === exports.HostEvent.Reload) {
|
|
17717
|
-
reload(iFrame);
|
|
17718
|
-
return res(null);
|
|
17719
|
-
}
|
|
17720
|
-
if (messageType === exports.HostEvent.Present) {
|
|
17721
|
-
const embedConfig = getEmbedConfig();
|
|
17722
|
-
const disableFullscreenPresentation = (_a = embedConfig === null || embedConfig === void 0 ? void 0 : embedConfig.disableFullscreenPresentation) !== null && _a !== void 0 ? _a : true;
|
|
17723
|
-
if (!disableFullscreenPresentation) {
|
|
17724
|
-
handlePresentEvent(iFrame);
|
|
17725
|
-
}
|
|
17726
|
-
else {
|
|
17727
|
-
logger$3.warn('Fullscreen presentation mode is disabled. Set disableFullscreenPresentation: false to enable this feature.');
|
|
17728
|
-
}
|
|
17729
|
-
}
|
|
17730
|
-
const channel = new MessageChannel();
|
|
17731
|
-
channel.port1.onmessage = ({ data: responseData }) => {
|
|
17732
|
-
var _a;
|
|
17733
|
-
channel.port1.close();
|
|
17734
|
-
const error = responseData.error || ((_a = responseData === null || responseData === void 0 ? void 0 : responseData.data) === null || _a === void 0 ? void 0 : _a.error);
|
|
17735
|
-
if (error) {
|
|
17736
|
-
rej(error);
|
|
17737
|
-
}
|
|
17738
|
-
else {
|
|
17739
|
-
res(responseData);
|
|
17740
|
-
}
|
|
17741
|
-
};
|
|
17742
|
-
// Close the messageChannel and resolve the promise if timeout.
|
|
17743
|
-
setTimeout(() => {
|
|
17744
|
-
channel.port1.close();
|
|
17745
|
-
res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
|
|
17746
|
-
}, TRIGGER_TIMEOUT);
|
|
17747
|
-
return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
|
|
17748
|
-
});
|
|
17749
|
-
}
|
|
17789
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.44.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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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":"^11.2.0","@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",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",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":"^2.0.0",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:"32 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};
|
|
17750
17790
|
|
|
17751
17791
|
class HostEventClient {
|
|
17752
17792
|
constructor(iFrame) {
|