@thoughtspot/visual-embed-sdk 1.24.0-alpha.5 → 1.24.0-alpha.7
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 +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +8 -7
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +26 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +5 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +5 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +23 -7
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +5 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +15 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +8 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +54 -1
- package/cjs/src/embed/ts-embed.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 +3 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +3 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +90 -8
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +62 -5
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils.d.ts +7 -1
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +20 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +24 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +5 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +5 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.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/index.d.ts +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +90 -8
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils.d.ts +7 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +107 -19
- package/dist/tsembed-react.js +108 -26
- package/dist/tsembed.es.js +107 -19
- package/dist/tsembed.js +108 -26
- package/dist/visual-embed-sdk-react-full.d.ts +99 -9
- package/dist/visual-embed-sdk-react.d.ts +99 -9
- package/dist/visual-embed-sdk.d.ts +99 -9
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +8 -7
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +26 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +5 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +6 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +23 -7
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +5 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +5 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +15 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +8 -2
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +54 -1
- package/lib/src/embed/ts-embed.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/index.d.ts +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +90 -8
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +62 -5
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils.d.ts +7 -1
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +18 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +25 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +102 -12
- package/package.json +1 -1
- package/src/embed/app.spec.ts +33 -0
- package/src/embed/app.ts +8 -7
- package/src/embed/liveboard.spec.ts +29 -10
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/search.spec.ts +18 -0
- package/src/embed/search.ts +16 -1
- package/src/embed/ts-embed.spec.ts +59 -1
- package/src/embed/ts-embed.ts +8 -2
- package/src/index.ts +4 -0
- package/src/react/index.tsx +2 -0
- package/src/types.ts +173 -90
- package/src/utils.spec.ts +31 -0
- package/src/utils.ts +23 -0
package/dist/tsembed-react.js
CHANGED
|
@@ -194,6 +194,24 @@
|
|
|
194
194
|
}
|
|
195
195
|
return null;
|
|
196
196
|
};
|
|
197
|
+
/**
|
|
198
|
+
* Construct a runtime parameter override query string from the given option.
|
|
199
|
+
*
|
|
200
|
+
* @param runtimeParameters
|
|
201
|
+
*/
|
|
202
|
+
const getRuntimeParameters = (runtimeParameters) => {
|
|
203
|
+
if (runtimeParameters && runtimeParameters.length) {
|
|
204
|
+
const params = runtimeParameters.map((param, valueIndex) => {
|
|
205
|
+
const index = valueIndex + 1;
|
|
206
|
+
const filterExpr = [];
|
|
207
|
+
filterExpr.push(`param${index}=${encodeURIComponent(param.name)}`);
|
|
208
|
+
filterExpr.push(`paramVal${index}=${encodeURIComponent(param.value)}`);
|
|
209
|
+
return filterExpr.join('&');
|
|
210
|
+
});
|
|
211
|
+
return `${params.join('&')}`;
|
|
212
|
+
}
|
|
213
|
+
return null;
|
|
214
|
+
};
|
|
197
215
|
/**
|
|
198
216
|
* Convert a value to a string representation to be sent as a query
|
|
199
217
|
* parameter to the ThoughtSpot app.
|
|
@@ -521,8 +539,8 @@
|
|
|
521
539
|
*/
|
|
522
540
|
AuthType["Basic"] = "Basic";
|
|
523
541
|
})(AuthType || (AuthType = {}));
|
|
524
|
-
var HomeLeftNavItem;
|
|
525
542
|
(function (HomeLeftNavItem) {
|
|
543
|
+
HomeLeftNavItem["QueryBuilder"] = "query-builder";
|
|
526
544
|
HomeLeftNavItem["Home"] = "insights-home";
|
|
527
545
|
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
528
546
|
HomeLeftNavItem["Answers"] = "answers";
|
|
@@ -531,7 +549,7 @@
|
|
|
531
549
|
HomeLeftNavItem["Tutorials"] = "tutorials";
|
|
532
550
|
HomeLeftNavItem["Documentation"] = "documentation";
|
|
533
551
|
HomeLeftNavItem["Community"] = "community";
|
|
534
|
-
})(HomeLeftNavItem || (HomeLeftNavItem = {}));
|
|
552
|
+
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
535
553
|
(function (RuntimeFilterOp) {
|
|
536
554
|
/**
|
|
537
555
|
* Equals
|
|
@@ -590,11 +608,6 @@
|
|
|
590
608
|
*/
|
|
591
609
|
RuntimeFilterOp["IN"] = "IN";
|
|
592
610
|
})(exports.RuntimeFilterOp || (exports.RuntimeFilterOp = {}));
|
|
593
|
-
/**
|
|
594
|
-
* Home page module that can be hide
|
|
595
|
-
*/
|
|
596
|
-
// eslint-disable-next-line no-shadow
|
|
597
|
-
var HomepageModule;
|
|
598
611
|
(function (HomepageModule) {
|
|
599
612
|
/**
|
|
600
613
|
* Search bar
|
|
@@ -620,7 +633,7 @@
|
|
|
620
633
|
* Learning videos
|
|
621
634
|
*/
|
|
622
635
|
HomepageModule["Learning"] = "learning";
|
|
623
|
-
})(HomepageModule || (HomepageModule = {}));
|
|
636
|
+
})(exports.HomepageModule || (exports.HomepageModule = {}));
|
|
624
637
|
(function (EmbedEvent) {
|
|
625
638
|
/**
|
|
626
639
|
* Rendering has initialized.
|
|
@@ -1025,21 +1038,21 @@
|
|
|
1025
1038
|
*/
|
|
1026
1039
|
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
1027
1040
|
/**
|
|
1041
|
+
* @hidden
|
|
1028
1042
|
* Emitted when a user changes any filter on a Liveboard.
|
|
1029
|
-
*
|
|
1030
1043
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1031
1044
|
*/
|
|
1032
1045
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
1033
1046
|
/**
|
|
1034
1047
|
* Emitted when a user click on Go button in Sage Embed
|
|
1035
1048
|
*
|
|
1036
|
-
* @version SDK : 1.
|
|
1049
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1037
1050
|
*/
|
|
1038
1051
|
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
1039
1052
|
/**
|
|
1040
1053
|
* Emitten when a user select data source in Sage Embed
|
|
1041
1054
|
*
|
|
1042
|
-
* @version SDK : 1.
|
|
1055
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1043
1056
|
*/
|
|
1044
1057
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
1045
1058
|
/**
|
|
@@ -1048,6 +1061,51 @@
|
|
|
1048
1061
|
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1049
1062
|
*/
|
|
1050
1063
|
EmbedEvent["UpdateConnection"] = "updateConnection";
|
|
1064
|
+
/**
|
|
1065
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
1066
|
+
* PersonalisedView is updated.
|
|
1067
|
+
*
|
|
1068
|
+
* @returns viewName: string
|
|
1069
|
+
* @returns viewId: string
|
|
1070
|
+
* @returns liveboardId: string
|
|
1071
|
+
* @returns isPublic: boolean
|
|
1072
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1073
|
+
*/
|
|
1074
|
+
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
1075
|
+
/**
|
|
1076
|
+
* Emitted when a PersonalisedView is saved.
|
|
1077
|
+
*
|
|
1078
|
+
* @returns viewName: string
|
|
1079
|
+
* @returns viewId: string
|
|
1080
|
+
* @returns liveboardId: string
|
|
1081
|
+
* @returns isPublic: boolean
|
|
1082
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1083
|
+
*/
|
|
1084
|
+
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
1085
|
+
/**
|
|
1086
|
+
* Emitted when a Liveboard is reset.
|
|
1087
|
+
*
|
|
1088
|
+
* @returns viewName: string
|
|
1089
|
+
* @returns viewId: string
|
|
1090
|
+
* @returns liveboardId: string
|
|
1091
|
+
* @returns isPublic: boolean
|
|
1092
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1093
|
+
*/
|
|
1094
|
+
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
1095
|
+
/**
|
|
1096
|
+
* Emitted when a PersonalisedView is deleted.
|
|
1097
|
+
*
|
|
1098
|
+
* @returns views: string[]
|
|
1099
|
+
* @returns liveboardId: string
|
|
1100
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
1101
|
+
*/
|
|
1102
|
+
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
1103
|
+
/**
|
|
1104
|
+
* Emitten when a user creates a new worksheet
|
|
1105
|
+
*
|
|
1106
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
1107
|
+
*/
|
|
1108
|
+
EmbedEvent["CreateWorksheet"] = "createWorksheet";
|
|
1051
1109
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
1052
1110
|
(function (HostEvent) {
|
|
1053
1111
|
/**
|
|
@@ -1668,16 +1726,16 @@
|
|
|
1668
1726
|
*/
|
|
1669
1727
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1670
1728
|
/**
|
|
1729
|
+
* @hidden
|
|
1671
1730
|
* Gets the currents visible and runtime filters applied on a Liveboard
|
|
1672
|
-
*
|
|
1673
1731
|
* @example
|
|
1674
1732
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1675
1733
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1676
1734
|
*/
|
|
1677
1735
|
HostEvent["GetFilters"] = "getFilters";
|
|
1678
1736
|
/**
|
|
1737
|
+
* @hidden
|
|
1679
1738
|
* Updates the visible filters on the Liveboard.
|
|
1680
|
-
*
|
|
1681
1739
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1682
1740
|
* @example
|
|
1683
1741
|
*
|
|
@@ -1836,6 +1894,7 @@
|
|
|
1836
1894
|
Param["Query"] = "query";
|
|
1837
1895
|
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
1838
1896
|
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
1897
|
+
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
1839
1898
|
})(Param || (Param = {}));
|
|
1840
1899
|
(function (Action) {
|
|
1841
1900
|
/**
|
|
@@ -2635,6 +2694,16 @@
|
|
|
2635
2694
|
* ```
|
|
2636
2695
|
*/
|
|
2637
2696
|
Action["ManageMonitor"] = "ManageMonitor";
|
|
2697
|
+
/**
|
|
2698
|
+
* Action ID for Liveboard Personalised Views dropdown
|
|
2699
|
+
*
|
|
2700
|
+
* @example
|
|
2701
|
+
* ```js
|
|
2702
|
+
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
2703
|
+
* ```
|
|
2704
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
2705
|
+
*/
|
|
2706
|
+
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
2638
2707
|
})(exports.Action || (exports.Action = {}));
|
|
2639
2708
|
// eslint-disable-next-line no-shadow
|
|
2640
2709
|
var OperationType;
|
|
@@ -10249,7 +10318,7 @@
|
|
|
10249
10318
|
});
|
|
10250
10319
|
}
|
|
10251
10320
|
|
|
10252
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0-alpha.
|
|
10321
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0-alpha.7";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"40 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};
|
|
10253
10322
|
|
|
10254
10323
|
/**
|
|
10255
10324
|
* Copyright (c) 2022
|
|
@@ -10308,11 +10377,14 @@
|
|
|
10308
10377
|
data: {
|
|
10309
10378
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
10310
10379
|
authToken,
|
|
10311
|
-
runtimeFilterParams:
|
|
10380
|
+
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
10381
|
+
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
10382
|
+
: null,
|
|
10312
10383
|
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
10313
10384
|
hostConfig: this.embedConfig.hostConfig,
|
|
10314
10385
|
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
10315
|
-
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
10386
|
+
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
10387
|
+
: [],
|
|
10316
10388
|
},
|
|
10317
10389
|
});
|
|
10318
10390
|
};
|
|
@@ -10489,6 +10561,9 @@
|
|
|
10489
10561
|
if (this.embedConfig.authType === AuthType.TrustedAuthTokenCookieless) {
|
|
10490
10562
|
queryParams[Param.cookieless] = true;
|
|
10491
10563
|
}
|
|
10564
|
+
if (this.embedConfig.pendoTrackingKey) {
|
|
10565
|
+
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
10566
|
+
}
|
|
10492
10567
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, } = this.viewConfig;
|
|
10493
10568
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
10494
10569
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -11190,7 +11265,7 @@
|
|
|
11190
11265
|
}
|
|
11191
11266
|
getEmbedParams() {
|
|
11192
11267
|
var _a;
|
|
11193
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, } = this.viewConfig;
|
|
11268
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
|
|
11194
11269
|
const queryParams = this.getBaseQueryParams();
|
|
11195
11270
|
queryParams[Param.HideActions] = [
|
|
11196
11271
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -11229,6 +11304,9 @@
|
|
|
11229
11304
|
if (queryParamsString) {
|
|
11230
11305
|
query = `?${queryParamsString}`;
|
|
11231
11306
|
}
|
|
11307
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
11308
|
+
if (parameterQuery)
|
|
11309
|
+
query += `&${parameterQuery}`;
|
|
11232
11310
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
11233
11311
|
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
11234
11312
|
query += `&${filterQuery}`;
|
|
@@ -11380,8 +11458,8 @@
|
|
|
11380
11458
|
* @param pageId The ID of the page to be embedded.
|
|
11381
11459
|
*/
|
|
11382
11460
|
getIFrameSrc() {
|
|
11383
|
-
const { pageId, path } = this.viewConfig;
|
|
11384
|
-
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId);
|
|
11461
|
+
const { pageId, path, modularHomeExperience } = this.viewConfig;
|
|
11462
|
+
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
|
|
11385
11463
|
let url = `${this.getRootIframeSrc()}/${pageRoute}`;
|
|
11386
11464
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
11387
11465
|
url = `${url}${tsPostHashParams}`;
|
|
@@ -11391,21 +11469,22 @@
|
|
|
11391
11469
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
11392
11470
|
*
|
|
11393
11471
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
11472
|
+
* @param modularHomeExperience
|
|
11394
11473
|
*/
|
|
11395
|
-
getPageRoute(pageId) {
|
|
11474
|
+
getPageRoute(pageId, modularHomeExperience = false) {
|
|
11396
11475
|
switch (pageId) {
|
|
11397
11476
|
case exports.Page.Search:
|
|
11398
11477
|
return 'answer';
|
|
11399
11478
|
case exports.Page.Answers:
|
|
11400
|
-
return 'answers';
|
|
11479
|
+
return modularHomeExperience ? 'home/answers' : 'answers';
|
|
11401
11480
|
case exports.Page.Liveboards:
|
|
11402
|
-
return 'pinboards';
|
|
11481
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
11403
11482
|
case exports.Page.Pinboards:
|
|
11404
|
-
return 'pinboards';
|
|
11483
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
11405
11484
|
case exports.Page.Data:
|
|
11406
11485
|
return 'data/tables';
|
|
11407
11486
|
case exports.Page.SpotIQ:
|
|
11408
|
-
return 'insights/results';
|
|
11487
|
+
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
11409
11488
|
case exports.Page.Home:
|
|
11410
11489
|
default:
|
|
11411
11490
|
return 'home';
|
|
@@ -11534,7 +11613,7 @@
|
|
|
11534
11613
|
let params = {};
|
|
11535
11614
|
params[Param.EmbedApp] = true;
|
|
11536
11615
|
params = this.getBaseQueryParams(params);
|
|
11537
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, } = this.viewConfig;
|
|
11616
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, runtimeParameters, } = this.viewConfig;
|
|
11538
11617
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
11539
11618
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
11540
11619
|
if (fullHeight === true) {
|
|
@@ -11562,7 +11641,10 @@
|
|
|
11562
11641
|
if (hideTabPanel) {
|
|
11563
11642
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
11564
11643
|
}
|
|
11565
|
-
|
|
11644
|
+
let queryParams = getQueryParamString(params, true);
|
|
11645
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
11646
|
+
if (parameterQuery)
|
|
11647
|
+
queryParams += `&${parameterQuery}`;
|
|
11566
11648
|
return queryParams;
|
|
11567
11649
|
}
|
|
11568
11650
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
package/dist/tsembed.es.js
CHANGED
|
@@ -28,6 +28,24 @@ const getFilterQuery = (runtimeFilters) => {
|
|
|
28
28
|
}
|
|
29
29
|
return null;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Construct a runtime parameter override query string from the given option.
|
|
33
|
+
*
|
|
34
|
+
* @param runtimeParameters
|
|
35
|
+
*/
|
|
36
|
+
const getRuntimeParameters = (runtimeParameters) => {
|
|
37
|
+
if (runtimeParameters && runtimeParameters.length) {
|
|
38
|
+
const params = runtimeParameters.map((param, valueIndex) => {
|
|
39
|
+
const index = valueIndex + 1;
|
|
40
|
+
const filterExpr = [];
|
|
41
|
+
filterExpr.push(`param${index}=${encodeURIComponent(param.name)}`);
|
|
42
|
+
filterExpr.push(`paramVal${index}=${encodeURIComponent(param.value)}`);
|
|
43
|
+
return filterExpr.join('&');
|
|
44
|
+
});
|
|
45
|
+
return `${params.join('&')}`;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
31
49
|
/**
|
|
32
50
|
* Convert a value to a string representation to be sent as a query
|
|
33
51
|
* parameter to the ThoughtSpot app.
|
|
@@ -356,6 +374,7 @@ var AuthType;
|
|
|
356
374
|
})(AuthType || (AuthType = {}));
|
|
357
375
|
var HomeLeftNavItem;
|
|
358
376
|
(function (HomeLeftNavItem) {
|
|
377
|
+
HomeLeftNavItem["QueryBuilder"] = "query-builder";
|
|
359
378
|
HomeLeftNavItem["Home"] = "insights-home";
|
|
360
379
|
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
361
380
|
HomeLeftNavItem["Answers"] = "answers";
|
|
@@ -885,21 +904,21 @@ var EmbedEvent;
|
|
|
885
904
|
*/
|
|
886
905
|
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
887
906
|
/**
|
|
907
|
+
* @hidden
|
|
888
908
|
* Emitted when a user changes any filter on a Liveboard.
|
|
889
|
-
*
|
|
890
909
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
891
910
|
*/
|
|
892
911
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
893
912
|
/**
|
|
894
913
|
* Emitted when a user click on Go button in Sage Embed
|
|
895
914
|
*
|
|
896
|
-
* @version SDK : 1.
|
|
915
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
897
916
|
*/
|
|
898
917
|
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
899
918
|
/**
|
|
900
919
|
* Emitten when a user select data source in Sage Embed
|
|
901
920
|
*
|
|
902
|
-
* @version SDK : 1.
|
|
921
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
903
922
|
*/
|
|
904
923
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
905
924
|
/**
|
|
@@ -908,6 +927,51 @@ var EmbedEvent;
|
|
|
908
927
|
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
909
928
|
*/
|
|
910
929
|
EmbedEvent["UpdateConnection"] = "updateConnection";
|
|
930
|
+
/**
|
|
931
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
932
|
+
* PersonalisedView is updated.
|
|
933
|
+
*
|
|
934
|
+
* @returns viewName: string
|
|
935
|
+
* @returns viewId: string
|
|
936
|
+
* @returns liveboardId: string
|
|
937
|
+
* @returns isPublic: boolean
|
|
938
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
939
|
+
*/
|
|
940
|
+
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
941
|
+
/**
|
|
942
|
+
* Emitted when a PersonalisedView is saved.
|
|
943
|
+
*
|
|
944
|
+
* @returns viewName: string
|
|
945
|
+
* @returns viewId: string
|
|
946
|
+
* @returns liveboardId: string
|
|
947
|
+
* @returns isPublic: boolean
|
|
948
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
949
|
+
*/
|
|
950
|
+
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
951
|
+
/**
|
|
952
|
+
* Emitted when a Liveboard is reset.
|
|
953
|
+
*
|
|
954
|
+
* @returns viewName: string
|
|
955
|
+
* @returns viewId: string
|
|
956
|
+
* @returns liveboardId: string
|
|
957
|
+
* @returns isPublic: boolean
|
|
958
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
959
|
+
*/
|
|
960
|
+
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
961
|
+
/**
|
|
962
|
+
* Emitted when a PersonalisedView is deleted.
|
|
963
|
+
*
|
|
964
|
+
* @returns views: string[]
|
|
965
|
+
* @returns liveboardId: string
|
|
966
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
967
|
+
*/
|
|
968
|
+
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
969
|
+
/**
|
|
970
|
+
* Emitten when a user creates a new worksheet
|
|
971
|
+
*
|
|
972
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
973
|
+
*/
|
|
974
|
+
EmbedEvent["CreateWorksheet"] = "createWorksheet";
|
|
911
975
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
912
976
|
/**
|
|
913
977
|
* Event types that can be triggered by the host application
|
|
@@ -1552,16 +1616,16 @@ var HostEvent;
|
|
|
1552
1616
|
*/
|
|
1553
1617
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1554
1618
|
/**
|
|
1619
|
+
* @hidden
|
|
1555
1620
|
* Gets the currents visible and runtime filters applied on a Liveboard
|
|
1556
|
-
*
|
|
1557
1621
|
* @example
|
|
1558
1622
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1559
1623
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1560
1624
|
*/
|
|
1561
1625
|
HostEvent["GetFilters"] = "getFilters";
|
|
1562
1626
|
/**
|
|
1627
|
+
* @hidden
|
|
1563
1628
|
* Updates the visible filters on the Liveboard.
|
|
1564
|
-
*
|
|
1565
1629
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1566
1630
|
* @example
|
|
1567
1631
|
*
|
|
@@ -1720,6 +1784,7 @@ var Param;
|
|
|
1720
1784
|
Param["Query"] = "query";
|
|
1721
1785
|
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
1722
1786
|
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
1787
|
+
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
1723
1788
|
})(Param || (Param = {}));
|
|
1724
1789
|
/**
|
|
1725
1790
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -2548,6 +2613,16 @@ var Action;
|
|
|
2548
2613
|
* ```
|
|
2549
2614
|
*/
|
|
2550
2615
|
Action["ManageMonitor"] = "ManageMonitor";
|
|
2616
|
+
/**
|
|
2617
|
+
* Action ID for Liveboard Personalised Views dropdown
|
|
2618
|
+
*
|
|
2619
|
+
* @example
|
|
2620
|
+
* ```js
|
|
2621
|
+
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
2622
|
+
* ```
|
|
2623
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
2624
|
+
*/
|
|
2625
|
+
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
2551
2626
|
})(Action || (Action = {}));
|
|
2552
2627
|
// eslint-disable-next-line no-shadow
|
|
2553
2628
|
var OperationType;
|
|
@@ -11181,7 +11256,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
11181
11256
|
});
|
|
11182
11257
|
}
|
|
11183
11258
|
|
|
11184
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0-alpha.
|
|
11259
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0-alpha.7";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs",start:"gatsby develop","build:gatsby":"npm run clean:gatsby && gatsby build --prefix-paths","build:gatsby:noprefix":"npm run clean:gatsby && gatsby build","serve:gatsby":"gatsby serve","clean:gatsby":"gatsby clean","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw","docs-cmd":"node scripts/gatsby-commands.js",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme","test-sdk":"jest -c jest.config.sdk.js --runInBand","test-docs":"jest -c jest.config.docs.js",test:"npm run test-sdk && npm run test-docs",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4","eslint-plugin-comment-length":"^0.9.2","eslint-plugin-jsdoc":"^40.1.0",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"^2.45.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^10.0.0",gatsby:"3.13.1","gatsby-plugin-algolia":"^0.22.2","gatsby-plugin-catch-links":"^3.1.0","gatsby-plugin-env-variables":"^2.1.0","gatsby-plugin-intl":"^0.3.3","gatsby-plugin-manifest":"^3.2.0","gatsby-plugin-output":"^0.1.3","gatsby-plugin-sass":"6.7.0","gatsby-plugin-sitemap":"^4.10.0","gatsby-source-filesystem":"3.1.0","gatsby-transformer-asciidoc":"2.1.0","gatsby-transformer-rehype":"2.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-puppeteer":"^4.4.0",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",puppeteer:"^7.0.1",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"2.30.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.js",limit:"40 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};
|
|
11185
11260
|
|
|
11186
11261
|
/**
|
|
11187
11262
|
* Copyright (c) 2022
|
|
@@ -11240,11 +11315,14 @@ class TsEmbed {
|
|
|
11240
11315
|
data: {
|
|
11241
11316
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
11242
11317
|
authToken,
|
|
11243
|
-
runtimeFilterParams:
|
|
11318
|
+
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
11319
|
+
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
11320
|
+
: null,
|
|
11244
11321
|
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
11245
11322
|
hostConfig: this.embedConfig.hostConfig,
|
|
11246
11323
|
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
11247
|
-
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
11324
|
+
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
11325
|
+
: [],
|
|
11248
11326
|
},
|
|
11249
11327
|
});
|
|
11250
11328
|
};
|
|
@@ -11421,6 +11499,9 @@ class TsEmbed {
|
|
|
11421
11499
|
if (this.embedConfig.authType === AuthType.TrustedAuthTokenCookieless) {
|
|
11422
11500
|
queryParams[Param.cookieless] = true;
|
|
11423
11501
|
}
|
|
11502
|
+
if (this.embedConfig.pendoTrackingKey) {
|
|
11503
|
+
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
11504
|
+
}
|
|
11424
11505
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, } = this.viewConfig;
|
|
11425
11506
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
11426
11507
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -12054,8 +12135,8 @@ class AppEmbed extends V1Embed {
|
|
|
12054
12135
|
* @param pageId The ID of the page to be embedded.
|
|
12055
12136
|
*/
|
|
12056
12137
|
getIFrameSrc() {
|
|
12057
|
-
const { pageId, path } = this.viewConfig;
|
|
12058
|
-
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId);
|
|
12138
|
+
const { pageId, path, modularHomeExperience } = this.viewConfig;
|
|
12139
|
+
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
|
|
12059
12140
|
let url = `${this.getRootIframeSrc()}/${pageRoute}`;
|
|
12060
12141
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
12061
12142
|
url = `${url}${tsPostHashParams}`;
|
|
@@ -12065,21 +12146,22 @@ class AppEmbed extends V1Embed {
|
|
|
12065
12146
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
12066
12147
|
*
|
|
12067
12148
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
12149
|
+
* @param modularHomeExperience
|
|
12068
12150
|
*/
|
|
12069
|
-
getPageRoute(pageId) {
|
|
12151
|
+
getPageRoute(pageId, modularHomeExperience = false) {
|
|
12070
12152
|
switch (pageId) {
|
|
12071
12153
|
case Page.Search:
|
|
12072
12154
|
return 'answer';
|
|
12073
12155
|
case Page.Answers:
|
|
12074
|
-
return 'answers';
|
|
12156
|
+
return modularHomeExperience ? 'home/answers' : 'answers';
|
|
12075
12157
|
case Page.Liveboards:
|
|
12076
|
-
return 'pinboards';
|
|
12158
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
12077
12159
|
case Page.Pinboards:
|
|
12078
|
-
return 'pinboards';
|
|
12160
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
12079
12161
|
case Page.Data:
|
|
12080
12162
|
return 'data/tables';
|
|
12081
12163
|
case Page.SpotIQ:
|
|
12082
|
-
return 'insights/results';
|
|
12164
|
+
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
12083
12165
|
case Page.Home:
|
|
12084
12166
|
default:
|
|
12085
12167
|
return 'home';
|
|
@@ -12208,7 +12290,7 @@ class LiveboardEmbed extends V1Embed {
|
|
|
12208
12290
|
let params = {};
|
|
12209
12291
|
params[Param.EmbedApp] = true;
|
|
12210
12292
|
params = this.getBaseQueryParams(params);
|
|
12211
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, } = this.viewConfig;
|
|
12293
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, runtimeParameters, } = this.viewConfig;
|
|
12212
12294
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
12213
12295
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
12214
12296
|
if (fullHeight === true) {
|
|
@@ -12236,7 +12318,10 @@ class LiveboardEmbed extends V1Embed {
|
|
|
12236
12318
|
if (hideTabPanel) {
|
|
12237
12319
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
12238
12320
|
}
|
|
12239
|
-
|
|
12321
|
+
let queryParams = getQueryParamString(params, true);
|
|
12322
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
12323
|
+
if (parameterQuery)
|
|
12324
|
+
queryParams += `&${parameterQuery}`;
|
|
12240
12325
|
return queryParams;
|
|
12241
12326
|
}
|
|
12242
12327
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
@@ -12360,7 +12445,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
12360
12445
|
}
|
|
12361
12446
|
getEmbedParams() {
|
|
12362
12447
|
var _a;
|
|
12363
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, } = this.viewConfig;
|
|
12448
|
+
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
|
|
12364
12449
|
const queryParams = this.getBaseQueryParams();
|
|
12365
12450
|
queryParams[Param.HideActions] = [
|
|
12366
12451
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -12399,6 +12484,9 @@ class SearchEmbed extends TsEmbed {
|
|
|
12399
12484
|
if (queryParamsString) {
|
|
12400
12485
|
query = `?${queryParamsString}`;
|
|
12401
12486
|
}
|
|
12487
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
12488
|
+
if (parameterQuery)
|
|
12489
|
+
query += `&${parameterQuery}`;
|
|
12402
12490
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
12403
12491
|
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
12404
12492
|
query += `&${filterQuery}`;
|
|
@@ -12582,4 +12670,4 @@ class SageEmbed extends V1Embed {
|
|
|
12582
12670
|
}
|
|
12583
12671
|
}
|
|
12584
12672
|
|
|
12585
|
-
export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
|
|
12673
|
+
export { Action, AppEmbed, AuthEvent, AuthFailureType, AuthStatus, AuthType, ContextMenuTriggerOptions, DataSourceVisualMode, EmbedEvent, HomeLeftNavItem, HomepageModule, HostEvent, LiveboardEmbed, Page, PinboardEmbed, PrefetchFeatures, RuntimeFilterOp, SageEmbed, SearchBarEmbed, SearchEmbed, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, init, logout$1 as logout, prefetch };
|