@thoughtspot/visual-embed-sdk 1.37.1-spotter-embed → 1.38.0-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/README.md +1 -1
- package/cjs/package.json +2 -2
- package/cjs/src/embed/app.d.ts +43 -3
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +40 -7
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +23 -6
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +7 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +8 -3
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +5 -2
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +286 -1
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +5 -3
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +3 -2
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +21 -10
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +6 -4
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +105 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +4 -4
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -3
- 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/react/index.d.ts +32 -3
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +54 -2
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +94 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +25 -51
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +24 -50
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-Cj4BVGHL.js → index-DeFzsyFF.js} +1 -1
- package/dist/{index-DnIvX1FR.js → index-NZYq1Tu3.js} +1 -2
- package/dist/src/embed/app.d.ts +43 -3
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +8 -3
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +5 -3
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -4
- 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/react/index.d.ts +32 -3
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +25 -51
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +614 -77
- package/dist/tsembed-react.js +758 -296
- package/dist/tsembed.es.js +153 -75
- package/dist/tsembed.js +297 -295
- package/dist/visual-embed-sdk-react-full.d.ts +194 -145
- package/dist/visual-embed-sdk-react.d.ts +194 -145
- package/dist/visual-embed-sdk.d.ts +82 -61
- package/lib/package.json +2 -2
- package/lib/src/embed/app.d.ts +43 -3
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +39 -6
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +24 -7
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +7 -0
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +8 -3
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +5 -2
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +287 -2
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +5 -3
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +3 -2
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +21 -10
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +6 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +105 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +4 -4
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +4 -4
- 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/react/index.d.ts +32 -3
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +53 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +96 -2
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +25 -51
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +24 -50
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +85 -64
- package/package.json +2 -2
- package/src/embed/app.spec.ts +30 -6
- package/src/embed/app.ts +62 -9
- package/src/embed/base.ts +9 -0
- package/src/embed/bodyless-conversation.spec.ts +308 -1
- package/src/embed/bodyless-conversation.ts +13 -3
- package/src/embed/conversation.ts +5 -3
- package/src/embed/liveboard.ts +25 -10
- package/src/embed/ts-embed.spec.ts +130 -0
- package/src/embed/ts-embed.ts +6 -4
- package/src/index.ts +10 -3
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.spec.tsx +157 -1
- package/src/react/index.tsx +64 -3
- package/src/types.ts +24 -56
- package/cjs/src/pages/embed-test.page.d.ts +0 -8
- package/cjs/src/pages/embed-test.page.d.ts.map +0 -1
- package/cjs/src/pages/embed-test.page.js +0 -20
- package/cjs/src/pages/embed-test.page.js.map +0 -1
- package/cjs/src/pages/home.page.d.ts +0 -6
- package/cjs/src/pages/home.page.d.ts.map +0 -1
- package/cjs/src/pages/home.page.js +0 -12
- package/cjs/src/pages/home.page.js.map +0 -1
- package/cjs/src/pages/login.page.d.ts +0 -15
- package/cjs/src/pages/login.page.d.ts.map +0 -1
- package/cjs/src/pages/login.page.js +0 -22
- package/cjs/src/pages/login.page.js.map +0 -1
- package/cjs/src/tests/auth.test.d.ts +0 -1
- package/cjs/src/tests/auth.test.d.ts.map +0 -1
- package/cjs/src/tests/auth.test.js +0 -1
- package/cjs/src/tests/auth.test.js.map +0 -1
- package/cjs/src/tests/e2e/auth.spec.d.ts +0 -2
- package/cjs/src/tests/e2e/auth.spec.d.ts.map +0 -1
- package/cjs/src/tests/e2e/auth.spec.js +0 -54
- package/cjs/src/tests/e2e/auth.spec.js.map +0 -1
- package/dist/index-DUaG1OG2.js +0 -7447
- package/dist/index-Fhk1V_Gw.js +0 -7371
- package/dist/index-OuiZF3zE.js +0 -7371
package/dist/tsembed.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @thoughtspot/visual-embed-sdk version 1.
|
|
1
|
+
/* @thoughtspot/visual-embed-sdk version 1.38.0-alpha.1 */
|
|
2
2
|
'use client';
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
@@ -1999,9 +1999,12 @@ var HostEvent;
|
|
|
1999
1999
|
* @example
|
|
2000
2000
|
* ```js
|
|
2001
2001
|
* searchEmbed.trigger(HostEvent.OpenFilter,
|
|
2002
|
-
* { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'})
|
|
2002
|
+
* {column: { columnId: '<column-GUID>', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE'}})
|
|
2003
|
+
* ```
|
|
2004
|
+
* @example
|
|
2005
|
+
* ```js
|
|
2003
2006
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
2004
|
-
*
|
|
2007
|
+
* { column: {columnId: '<column-GUID>'}})
|
|
2005
2008
|
* ```
|
|
2006
2009
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
2007
2010
|
*/
|
|
@@ -2610,6 +2613,25 @@ var HostEvent;
|
|
|
2610
2613
|
* }]
|
|
2611
2614
|
* });
|
|
2612
2615
|
* ```
|
|
2616
|
+
* If there are multiple columns with the same name, consider
|
|
2617
|
+
* using `WORKSHEET_NAME::COLUMN_NAME` format.
|
|
2618
|
+
*
|
|
2619
|
+
* @example
|
|
2620
|
+
*
|
|
2621
|
+
* ```js
|
|
2622
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
2623
|
+
* filters: [{
|
|
2624
|
+
* column: "(Sample) Retail - Apparel::city",
|
|
2625
|
+
* oper: 'IN',
|
|
2626
|
+
* values: ["atlanta"]
|
|
2627
|
+
* },
|
|
2628
|
+
* {
|
|
2629
|
+
* column: "(Sample) Retail - Apparel::Region",
|
|
2630
|
+
* oper: 'IN',
|
|
2631
|
+
* values: ["West","Midwest"]
|
|
2632
|
+
* }]
|
|
2633
|
+
* });
|
|
2634
|
+
* ```
|
|
2613
2635
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
2614
2636
|
*/
|
|
2615
2637
|
HostEvent["UpdateFilters"] = "updateFilters";
|
|
@@ -2819,54 +2841,6 @@ var HostEvent;
|
|
|
2819
2841
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2820
2842
|
*/
|
|
2821
2843
|
HostEvent["TransformTableVizData"] = "TransformTableVizData";
|
|
2822
|
-
/**
|
|
2823
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2824
|
-
* Includes the following properties:
|
|
2825
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2826
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2827
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2828
|
-
*/
|
|
2829
|
-
HostEvent["SpotterSearch"] = "SpotterSearch";
|
|
2830
|
-
/**
|
|
2831
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2832
|
-
* Includes the following properties:
|
|
2833
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2834
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2835
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2836
|
-
*/
|
|
2837
|
-
HostEvent["EditLastPrompt"] = "EditLastPrompt";
|
|
2838
|
-
/**
|
|
2839
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2840
|
-
* Includes the following properties:
|
|
2841
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2842
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2843
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2844
|
-
*/
|
|
2845
|
-
HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
|
|
2846
|
-
/**
|
|
2847
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2848
|
-
* Includes the following properties:
|
|
2849
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2850
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2851
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2852
|
-
*/
|
|
2853
|
-
HostEvent["ResetSpotterConversation"] = "ResetSpotterConversation";
|
|
2854
|
-
/**
|
|
2855
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2856
|
-
* Includes the following properties:
|
|
2857
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2858
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2859
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2860
|
-
*/
|
|
2861
|
-
HostEvent["DeleteLastPrompt"] = "DeleteLastPrompt";
|
|
2862
|
-
/**
|
|
2863
|
-
* Triggers the table visualization re-render with the updated data.
|
|
2864
|
-
* Includes the following properties:
|
|
2865
|
-
* @param - `columnDataLite` - an array of object containing the
|
|
2866
|
-
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
2867
|
-
* payload.For example, { columnDataLite: []}`.
|
|
2868
|
-
*/
|
|
2869
|
-
HostEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
2870
2844
|
})(HostEvent || (HostEvent = {}));
|
|
2871
2845
|
/**
|
|
2872
2846
|
* The different visual modes that the data sources panel within
|
|
@@ -7540,7 +7514,7 @@ class AnswerService {
|
|
|
7540
7514
|
async getTML() {
|
|
7541
7515
|
const { object } = await this.executeQuery(getAnswerTML, {});
|
|
7542
7516
|
const edoc = object[0].edoc;
|
|
7543
|
-
const YAML = await import('./index-
|
|
7517
|
+
const YAML = await import('./index-DeFzsyFF.js');
|
|
7544
7518
|
const parsedDoc = YAML.parse(edoc);
|
|
7545
7519
|
return {
|
|
7546
7520
|
answer: {
|
|
@@ -15048,6 +15022,13 @@ const prefetch = (url, prefetchFeatures, additionalFlags) => {
|
|
|
15048
15022
|
iFrame.style.width = '0';
|
|
15049
15023
|
iFrame.style.height = '0';
|
|
15050
15024
|
iFrame.style.border = '0';
|
|
15025
|
+
// Make it 'fixed' to keep it in a different stacking context.
|
|
15026
|
+
// This should solve the focus behaviours inside the iframe from
|
|
15027
|
+
// interfering with main body.
|
|
15028
|
+
iFrame.style.position = 'fixed';
|
|
15029
|
+
// Push it out of viewport.
|
|
15030
|
+
iFrame.style.top = '100vh';
|
|
15031
|
+
iFrame.style.left = '100vw';
|
|
15051
15032
|
iFrame.classList.add('prefetchIframe');
|
|
15052
15033
|
iFrame.classList.add(`prefetchIframeNum-${index}`);
|
|
15053
15034
|
document.body.appendChild(iFrame);
|
|
@@ -15419,7 +15400,7 @@ function processEventData(type, e, thoughtSpotHost, containerEl) {
|
|
|
15419
15400
|
return e;
|
|
15420
15401
|
}
|
|
15421
15402
|
|
|
15422
|
-
var name="@thoughtspot/visual-embed-sdk";var version$1="1.
|
|
15403
|
+
var name="@thoughtspot/visual-embed-sdk";var version$1="1.38.0-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};
|
|
15423
15404
|
|
|
15424
15405
|
/**
|
|
15425
15406
|
* Reloads the ThoughtSpot iframe.
|
|
@@ -15653,11 +15634,13 @@ class TsEmbed {
|
|
|
15653
15634
|
* @param responder
|
|
15654
15635
|
*/
|
|
15655
15636
|
this.updateAuthToken = async (_, responder) => {
|
|
15656
|
-
const {
|
|
15657
|
-
|
|
15658
|
-
|
|
15637
|
+
const { authType } = this.embedConfig;
|
|
15638
|
+
let { autoLogin } = this.embedConfig;
|
|
15639
|
+
// Default autoLogin: true for cookieless if undefined/null, otherwise false
|
|
15640
|
+
autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === AuthType.TrustedAuthTokenCookieless);
|
|
15641
|
+
if (autoLogin && authType === AuthType.TrustedAuthTokenCookieless) {
|
|
15659
15642
|
try {
|
|
15660
|
-
authToken = await getAuthenticationToken(this.embedConfig);
|
|
15643
|
+
const authToken = await getAuthenticationToken(this.embedConfig);
|
|
15661
15644
|
responder({
|
|
15662
15645
|
type: EmbedEvent.AuthExpire,
|
|
15663
15646
|
data: { authToken },
|
|
@@ -16811,6 +16794,31 @@ var HomePageSearchBarMode;
|
|
|
16811
16794
|
HomePageSearchBarMode["AI_ANSWER"] = "aiAnswer";
|
|
16812
16795
|
HomePageSearchBarMode["NONE"] = "none";
|
|
16813
16796
|
})(HomePageSearchBarMode || (HomePageSearchBarMode = {}));
|
|
16797
|
+
/**
|
|
16798
|
+
* Define the version of the primary navbar
|
|
16799
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16800
|
+
*/
|
|
16801
|
+
var PrimaryNavbarVersion;
|
|
16802
|
+
(function (PrimaryNavbarVersion) {
|
|
16803
|
+
/**
|
|
16804
|
+
* Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher,
|
|
16805
|
+
* along with updates to the top navigation bar.
|
|
16806
|
+
* It serves as the foundational version of the PrimaryNavBar.
|
|
16807
|
+
*/
|
|
16808
|
+
PrimaryNavbarVersion["Sliding"] = "v3";
|
|
16809
|
+
})(PrimaryNavbarVersion || (PrimaryNavbarVersion = {}));
|
|
16810
|
+
/**
|
|
16811
|
+
* Define the version of the home page
|
|
16812
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
16813
|
+
*/
|
|
16814
|
+
var HomePage;
|
|
16815
|
+
(function (HomePage) {
|
|
16816
|
+
/**
|
|
16817
|
+
* Modular (v2) introduces the updated Modular Home Experience.
|
|
16818
|
+
* It serves as the foundational version of the home page.
|
|
16819
|
+
*/
|
|
16820
|
+
HomePage["Modular"] = "v2";
|
|
16821
|
+
})(HomePage || (HomePage = {}));
|
|
16814
16822
|
/**
|
|
16815
16823
|
* Embeds full ThoughtSpot experience in a host application.
|
|
16816
16824
|
* @group Embed components
|
|
@@ -16835,7 +16843,7 @@ class AppEmbed extends V1Embed {
|
|
|
16835
16843
|
responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
|
|
16836
16844
|
};
|
|
16837
16845
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
16838
|
-
const { height: frameHeight
|
|
16846
|
+
const { height: frameHeight } = this.viewConfig.frameParams || {};
|
|
16839
16847
|
const liveboardRelatedRoutes = [
|
|
16840
16848
|
'/pinboard/',
|
|
16841
16849
|
'/insights/pinboard/',
|
|
@@ -16865,9 +16873,9 @@ class AppEmbed extends V1Embed {
|
|
|
16865
16873
|
* embedded Liveboard or visualization.
|
|
16866
16874
|
*/
|
|
16867
16875
|
getEmbedParams() {
|
|
16868
|
-
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,
|
|
16876
|
+
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,
|
|
16869
16877
|
/* eslint-disable-next-line max-len */
|
|
16870
|
-
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, } = this.viewConfig;
|
|
16878
|
+
dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, } = this.viewConfig;
|
|
16871
16879
|
let params = {};
|
|
16872
16880
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
16873
16881
|
params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
|
|
@@ -16884,9 +16892,6 @@ class AppEmbed extends V1Embed {
|
|
|
16884
16892
|
params[Param.HideIrrelevantFiltersInTab] = hideIrrelevantChipsInLiveboardTabs;
|
|
16885
16893
|
params[Param.IsUnifiedSearchExperienceEnabled] = isUnifiedSearchExperienceEnabled;
|
|
16886
16894
|
params = this.getBaseQueryParams(params);
|
|
16887
|
-
if (modularHomeExperienceV3) {
|
|
16888
|
-
params[Param.NavigationVersion] = 'v3';
|
|
16889
|
-
}
|
|
16890
16895
|
if (hideObjectSearch) {
|
|
16891
16896
|
params[Param.HideObjectSearch] = !!hideObjectSearch;
|
|
16892
16897
|
}
|
|
@@ -16943,6 +16948,17 @@ class AppEmbed extends V1Embed {
|
|
|
16943
16948
|
/* eslint-disable-next-line max-len */
|
|
16944
16949
|
params[Param.DataPanelCustomGroupsAccordionInitialState] = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL;
|
|
16945
16950
|
}
|
|
16951
|
+
if (discoveryExperience) {
|
|
16952
|
+
// primaryNavbarVersion v3 will enabled the new left navigation
|
|
16953
|
+
if (discoveryExperience.primaryNavbarVersion === PrimaryNavbarVersion.Sliding) {
|
|
16954
|
+
params[Param.NavigationVersion] = discoveryExperience.primaryNavbarVersion;
|
|
16955
|
+
}
|
|
16956
|
+
// homePage v2 will enable the modular home page
|
|
16957
|
+
// and it will override the modularHomeExperience value
|
|
16958
|
+
if (discoveryExperience.homePage === HomePage.Modular) {
|
|
16959
|
+
params[Param.ModularHomeExperienceEnabled] = true;
|
|
16960
|
+
}
|
|
16961
|
+
}
|
|
16946
16962
|
const queryParams = getQueryParamString(params, true);
|
|
16947
16963
|
return queryParams;
|
|
16948
16964
|
}
|
|
@@ -17122,12 +17138,6 @@ const addPreviewStylesIfNotPresent = () => {
|
|
|
17122
17138
|
* @summary Liveboard & visualization embed
|
|
17123
17139
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
17124
17140
|
*/
|
|
17125
|
-
const liveboardHeightWhitelistedRoutes = [
|
|
17126
|
-
'/embed/viz/',
|
|
17127
|
-
'/embed/insights/viz/',
|
|
17128
|
-
'/tsl-editor/PINBOARD_ANSWER_BOOK/',
|
|
17129
|
-
'/import-tsl/PINBOARD_ANSWER_BOOK/',
|
|
17130
|
-
];
|
|
17131
17141
|
/**
|
|
17132
17142
|
* Embed a ThoughtSpot Liveboard or visualization. When rendered it already
|
|
17133
17143
|
* waits for the authentication to complete, so you need not wait for
|
|
@@ -17144,7 +17154,6 @@ const liveboardHeightWhitelistedRoutes = [
|
|
|
17144
17154
|
* @group Embed components
|
|
17145
17155
|
*/
|
|
17146
17156
|
class LiveboardEmbed extends V1Embed {
|
|
17147
|
-
// eslint-disable-next-line no-useless-constructor
|
|
17148
17157
|
constructor(domSelector, viewConfig) {
|
|
17149
17158
|
viewConfig.embedComponentType = 'LiveboardEmbed';
|
|
17150
17159
|
super(domSelector, viewConfig);
|
|
@@ -17162,13 +17171,30 @@ class LiveboardEmbed extends V1Embed {
|
|
|
17162
17171
|
responder({ type: EmbedEvent.EmbedIframeCenter, data: obj });
|
|
17163
17172
|
};
|
|
17164
17173
|
this.setIframeHeightForNonEmbedLiveboard = (data) => {
|
|
17165
|
-
const
|
|
17166
|
-
|
|
17174
|
+
const { height: frameHeight } = this.viewConfig.frameParams || {};
|
|
17175
|
+
const liveboardRelatedRoutes = [
|
|
17176
|
+
'/pinboard/',
|
|
17177
|
+
'/insights/pinboard/',
|
|
17178
|
+
'/schedules/',
|
|
17179
|
+
'/embed/viz/',
|
|
17180
|
+
'/embed/insights/viz/',
|
|
17181
|
+
'/liveboard/',
|
|
17182
|
+
'/insights/liveboard/',
|
|
17183
|
+
'/tsl-editor/PINBOARD_ANSWER_BOOK/',
|
|
17184
|
+
'/import-tsl/PINBOARD_ANSWER_BOOK/',
|
|
17185
|
+
];
|
|
17186
|
+
if (liveboardRelatedRoutes.some((path) => data.data.currentPath.startsWith(path))) {
|
|
17187
|
+
// Ignore the height reset of the frame, if the navigation is
|
|
17188
|
+
// only within the liveboard page.
|
|
17167
17189
|
return;
|
|
17168
17190
|
}
|
|
17169
|
-
this.setIFrameHeight(this.defaultHeight);
|
|
17191
|
+
this.setIFrameHeight(frameHeight || this.defaultHeight);
|
|
17170
17192
|
};
|
|
17171
17193
|
if (this.viewConfig.fullHeight === true) {
|
|
17194
|
+
if (this.viewConfig.vizId) {
|
|
17195
|
+
logger$3.warn('Full height is currently only supported for Liveboard embeds.' +
|
|
17196
|
+
'Using full height with vizId might lead to unexpected behavior.');
|
|
17197
|
+
}
|
|
17172
17198
|
this.on(EmbedEvent.RouteChange, this.setIframeHeightForNonEmbedLiveboard);
|
|
17173
17199
|
this.on(EmbedEvent.EmbedHeight, this.updateIFrameHeight);
|
|
17174
17200
|
this.on(EmbedEvent.EmbedIframeCenter, this.embedIframeCenter);
|
|
@@ -18083,6 +18109,9 @@ class SpotterAgentEmbed {
|
|
|
18083
18109
|
return { error };
|
|
18084
18110
|
}
|
|
18085
18111
|
const container = document.createElement('div');
|
|
18112
|
+
if (this.viewConfig.containerClassName) {
|
|
18113
|
+
container.className = this.viewConfig.containerClassName;
|
|
18114
|
+
}
|
|
18086
18115
|
const embed = new ConversationMessage(container, {
|
|
18087
18116
|
...this.viewConfig,
|
|
18088
18117
|
sessionId: data.sessionId,
|
|
@@ -18093,6 +18122,31 @@ class SpotterAgentEmbed {
|
|
|
18093
18122
|
await embed.render();
|
|
18094
18123
|
return { container, viz: embed };
|
|
18095
18124
|
}
|
|
18125
|
+
}
|
|
18126
|
+
/**
|
|
18127
|
+
* Create a conversation embed, which can be integrated inside
|
|
18128
|
+
* chatbots or other conversational interfaces.
|
|
18129
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
18130
|
+
* Use {@link SpotterAgentEmbed} instead
|
|
18131
|
+
* @example
|
|
18132
|
+
* ```js
|
|
18133
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
18134
|
+
*
|
|
18135
|
+
* const conversation = new SpotterAgentEmbed({
|
|
18136
|
+
* worksheetId: 'worksheetId',
|
|
18137
|
+
* });
|
|
18138
|
+
*
|
|
18139
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
18140
|
+
*
|
|
18141
|
+
* // append the container to the DOM
|
|
18142
|
+
* document.body.appendChild(container); // or to any other element
|
|
18143
|
+
* ```
|
|
18144
|
+
* @group Embed components
|
|
18145
|
+
*/
|
|
18146
|
+
class BodylessConversation extends SpotterAgentEmbed {
|
|
18147
|
+
constructor(viewConfig) {
|
|
18148
|
+
super(viewConfig);
|
|
18149
|
+
}
|
|
18096
18150
|
}
|
|
18097
18151
|
|
|
18098
18152
|
/**
|
|
@@ -18131,7 +18185,7 @@ var isUndefined_1 = isUndefined;
|
|
|
18131
18185
|
* });
|
|
18132
18186
|
* conversation.render();
|
|
18133
18187
|
* ```
|
|
18134
|
-
* @version SDK: 1.
|
|
18188
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
18135
18189
|
*/
|
|
18136
18190
|
class SpotterEmbed extends TsEmbed {
|
|
18137
18191
|
constructor(container, viewConfig) {
|
|
@@ -18179,6 +18233,30 @@ class SpotterEmbed extends TsEmbed {
|
|
|
18179
18233
|
await this.renderIFrame(src);
|
|
18180
18234
|
return this;
|
|
18181
18235
|
}
|
|
18236
|
+
}
|
|
18237
|
+
/**
|
|
18238
|
+
* Embed ThoughtSpot AI Conversation.
|
|
18239
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
18240
|
+
* Use {@link SpotterEmbed} instead
|
|
18241
|
+
* @group Embed components
|
|
18242
|
+
* @example
|
|
18243
|
+
* ```js
|
|
18244
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
18245
|
+
* worksheetId: 'worksheetId',
|
|
18246
|
+
* searchOptions: {
|
|
18247
|
+
* searchQuery: 'searchQuery',
|
|
18248
|
+
* },
|
|
18249
|
+
* });
|
|
18250
|
+
* conversation.render();
|
|
18251
|
+
* ```
|
|
18252
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
18253
|
+
*/
|
|
18254
|
+
class ConversationEmbed extends SpotterEmbed {
|
|
18255
|
+
constructor(container, viewConfig) {
|
|
18256
|
+
viewConfig.embedComponentType = 'conversation';
|
|
18257
|
+
super(container, viewConfig);
|
|
18258
|
+
this.viewConfig = viewConfig;
|
|
18259
|
+
}
|
|
18182
18260
|
}
|
|
18183
18261
|
|
|
18184
18262
|
/**
|
|
@@ -18764,4 +18842,4 @@ const createLiveboardWithAnswers = async (answers, name) => {
|
|
|
18764
18842
|
return result;
|
|
18765
18843
|
};
|
|
18766
18844
|
|
|
18767
|
-
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType,
|
|
18845
|
+
export { Action, AnswerService, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, BodylessConversation, ContextMenuTriggerOptions, ConversationEmbed, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomePage, HomePageSearchBarMode, HomepageModule, HostEvent, ListPageColumns, LiveboardEmbed, LogLevel, MIXPANEL_EVENT, Page, PinboardEmbed, PrefetchFeatures, PrimaryNavbarVersion, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, SpotterAgentEmbed, SpotterEmbed, UIPassthroughEvent, createLiveboardWithAnswers, executeTML, exportTML, getAnswerFromQuery, getEmbedConfig as getInitConfig, getSessionInfo, init, logout, prefetch, resetCachedAuthToken, tokenizedFetch, uploadMixpanelEvent };
|