@thoughtspot/visual-embed-sdk 1.17.0-alpha.5 → 1.17.0-customcss-embed
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/dist/src/embed/search-bar.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts +7 -0
- package/dist/src/types.d.ts +17 -17
- package/dist/tsembed.es.js +30 -26
- package/dist/tsembed.js +30 -26
- package/lib/package.json +1 -1
- package/lib/src/embed/base.js +4 -4
- package/lib/src/embed/search-bar.d.ts +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/ts-embed.d.ts +7 -0
- package/lib/src/embed/ts-embed.js +4 -1
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +1 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/types.d.ts +17 -17
- package/lib/src/types.js +13 -13
- package/lib/src/utils.js +7 -6
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +25 -18
- package/package.json +1 -1
- package/src/embed/base.ts +4 -4
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/ts-embed.spec.ts +1 -1
- package/src/embed/ts-embed.ts +11 -1
- package/src/types.ts +18 -18
- package/src/utils.ts +8 -6
|
@@ -18,7 +18,7 @@ export interface SearchBarViewConfig extends ViewConfig {
|
|
|
18
18
|
* Embed ThoughtSpot search bar
|
|
19
19
|
*
|
|
20
20
|
* @Category Search Embed
|
|
21
|
-
* @version: SDK: 1.
|
|
21
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
22
22
|
*/
|
|
23
23
|
export declare class SearchBarEmbed extends TsEmbed {
|
|
24
24
|
/**
|
|
@@ -98,6 +98,13 @@ export interface ViewConfig {
|
|
|
98
98
|
additionalFlags?: {
|
|
99
99
|
[key: string]: string | number | boolean;
|
|
100
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Dynamic CSS Url to be injected in the embedded view.
|
|
103
|
+
* You would also need to set `style-src` in the CSP settings.
|
|
104
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
105
|
+
* @default ''
|
|
106
|
+
*/
|
|
107
|
+
customCssUrl?: string;
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
110
|
* Base class for embedding v2 experience
|
package/dist/src/types.d.ts
CHANGED
|
@@ -82,11 +82,11 @@ interface customCssInterface {
|
|
|
82
82
|
}
|
|
83
83
|
interface CustomStyles {
|
|
84
84
|
customCSSUrl?: string;
|
|
85
|
-
|
|
85
|
+
customCSS?: customCssInterface;
|
|
86
86
|
}
|
|
87
87
|
export interface CustomisationsInterface {
|
|
88
|
-
style
|
|
89
|
-
content
|
|
88
|
+
style?: CustomStyles;
|
|
89
|
+
content?: {
|
|
90
90
|
[key: string]: string;
|
|
91
91
|
};
|
|
92
92
|
}
|
|
@@ -226,7 +226,7 @@ export interface EmbedConfig {
|
|
|
226
226
|
*
|
|
227
227
|
* @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
|
|
228
228
|
*/
|
|
229
|
-
|
|
229
|
+
customizations?: CustomisationsInterface;
|
|
230
230
|
/**
|
|
231
231
|
* For noRedirect SSO Auth, we need a button which the user
|
|
232
232
|
* click to trigger the flow. This is the containing element
|
|
@@ -714,8 +714,8 @@ export declare enum HostEvent {
|
|
|
714
714
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
715
715
|
* @example
|
|
716
716
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
717
|
-
* {columnName: "state",operator:
|
|
718
|
-
* {columnName: "item type",operator:
|
|
717
|
+
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
718
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
719
719
|
* ])
|
|
720
720
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
721
721
|
*/
|
|
@@ -866,7 +866,7 @@ export declare enum HostEvent {
|
|
|
866
866
|
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
867
867
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
868
868
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
869
|
-
* @version SDK: 1.
|
|
869
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
870
870
|
*/
|
|
871
871
|
ShowUnderlyingData = "showUnderlyingData",
|
|
872
872
|
/**
|
|
@@ -877,7 +877,7 @@ export declare enum HostEvent {
|
|
|
877
877
|
* liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
878
878
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
879
879
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
880
|
-
* @version SDK: 1.
|
|
880
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
881
881
|
*/
|
|
882
882
|
Delete = "delete",
|
|
883
883
|
/**
|
|
@@ -888,7 +888,7 @@ export declare enum HostEvent {
|
|
|
888
888
|
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
889
889
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
890
890
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
891
|
-
* @version SDK: 1.
|
|
891
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
892
892
|
*/
|
|
893
893
|
SpotIQAnalyze = "spotIQAnalyze",
|
|
894
894
|
/**
|
|
@@ -897,7 +897,7 @@ export declare enum HostEvent {
|
|
|
897
897
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
898
898
|
* vizEmbed.trigger(HostEvent.Download)
|
|
899
899
|
* searchEmbed.trigger(HostEvent.Download)
|
|
900
|
-
* @version SDK: 1.
|
|
900
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
901
901
|
*/
|
|
902
902
|
Download = "download",
|
|
903
903
|
/**
|
|
@@ -906,7 +906,7 @@ export declare enum HostEvent {
|
|
|
906
906
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
907
907
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
908
908
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
909
|
-
* @version SDK: 1.
|
|
909
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
910
910
|
*/
|
|
911
911
|
DownloadAsCsv = "downloadAsCSV",
|
|
912
912
|
/**
|
|
@@ -915,7 +915,7 @@ export declare enum HostEvent {
|
|
|
915
915
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
916
916
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
917
917
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
918
|
-
* @version SDK: 1.
|
|
918
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
919
919
|
*/
|
|
920
920
|
DownloadAsXlsx = "downloadAsXLSX",
|
|
921
921
|
/**
|
|
@@ -923,7 +923,7 @@ export declare enum HostEvent {
|
|
|
923
923
|
* @example
|
|
924
924
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
925
925
|
* searchEmbed.trigger(HostEvent.Share)
|
|
926
|
-
* @version SDK: 1.
|
|
926
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
927
927
|
*/
|
|
928
928
|
Share = "share",
|
|
929
929
|
/**
|
|
@@ -931,7 +931,7 @@ export declare enum HostEvent {
|
|
|
931
931
|
* @example
|
|
932
932
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
933
933
|
* searchEmbed.trigger(HostEvent.Save)
|
|
934
|
-
* @version SDK: 1.
|
|
934
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
935
935
|
*/
|
|
936
936
|
Save = "save",
|
|
937
937
|
/**
|
|
@@ -940,7 +940,7 @@ export declare enum HostEvent {
|
|
|
940
940
|
* @example
|
|
941
941
|
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
942
942
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
943
|
-
* @version SDK: 1.
|
|
943
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
944
944
|
*/
|
|
945
945
|
SyncToSheets = "sync-to-sheets",
|
|
946
946
|
/**
|
|
@@ -949,7 +949,7 @@ export declare enum HostEvent {
|
|
|
949
949
|
* @example
|
|
950
950
|
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
951
951
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
952
|
-
* @version SDK: 1.
|
|
952
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
953
953
|
*/
|
|
954
954
|
SyncToOtherApps = "sync-to-other-apps",
|
|
955
955
|
/**
|
|
@@ -958,7 +958,7 @@ export declare enum HostEvent {
|
|
|
958
958
|
* @example
|
|
959
959
|
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
960
960
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
961
|
-
* @version SDK: 1.
|
|
961
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
962
962
|
*/
|
|
963
963
|
ManagePipelines = "manage-pipeline"
|
|
964
964
|
}
|
package/dist/tsembed.es.js
CHANGED
|
@@ -135,12 +135,13 @@ const checkReleaseVersionInBeta = (releaseVersion, suppressBetaWarning) => {
|
|
|
135
135
|
};
|
|
136
136
|
const getCustomisations = (embedConfig) => {
|
|
137
137
|
const { customCssUrl } = embedConfig;
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
let customizations = embedConfig.customizations ||
|
|
139
|
+
embedConfig.customisations;
|
|
140
|
+
customizations = customizations || {};
|
|
141
|
+
customizations.style = customizations.style || {};
|
|
142
|
+
customizations.style.customCSSUrl =
|
|
143
|
+
customizations.style.customCSSUrl || customCssUrl;
|
|
144
|
+
return customizations;
|
|
144
145
|
};
|
|
145
146
|
/**
|
|
146
147
|
* Gets a reference to the DOM node given
|
|
@@ -656,8 +657,8 @@ var HostEvent;
|
|
|
656
657
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
657
658
|
* @example
|
|
658
659
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
659
|
-
* {columnName: "state",operator:
|
|
660
|
-
* {columnName: "item type",operator:
|
|
660
|
+
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
661
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
661
662
|
* ])
|
|
662
663
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
663
664
|
*/
|
|
@@ -808,7 +809,7 @@ var HostEvent;
|
|
|
808
809
|
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
809
810
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
810
811
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
811
|
-
* @version SDK: 1.
|
|
812
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
812
813
|
*/
|
|
813
814
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
814
815
|
/**
|
|
@@ -819,7 +820,7 @@ var HostEvent;
|
|
|
819
820
|
* liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
820
821
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
821
822
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
822
|
-
* @version SDK: 1.
|
|
823
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
823
824
|
*/
|
|
824
825
|
HostEvent["Delete"] = "delete";
|
|
825
826
|
/**
|
|
@@ -830,7 +831,7 @@ var HostEvent;
|
|
|
830
831
|
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
831
832
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
832
833
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
833
|
-
* @version SDK: 1.
|
|
834
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
834
835
|
*/
|
|
835
836
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
836
837
|
/**
|
|
@@ -839,7 +840,7 @@ var HostEvent;
|
|
|
839
840
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
840
841
|
* vizEmbed.trigger(HostEvent.Download)
|
|
841
842
|
* searchEmbed.trigger(HostEvent.Download)
|
|
842
|
-
* @version SDK: 1.
|
|
843
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
843
844
|
*/
|
|
844
845
|
HostEvent["Download"] = "download";
|
|
845
846
|
/**
|
|
@@ -848,7 +849,7 @@ var HostEvent;
|
|
|
848
849
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
849
850
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
850
851
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
851
|
-
* @version SDK: 1.
|
|
852
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
852
853
|
*/
|
|
853
854
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
854
855
|
/**
|
|
@@ -857,7 +858,7 @@ var HostEvent;
|
|
|
857
858
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
858
859
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
859
860
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
860
|
-
* @version SDK: 1.
|
|
861
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
861
862
|
*/
|
|
862
863
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
863
864
|
/**
|
|
@@ -865,7 +866,7 @@ var HostEvent;
|
|
|
865
866
|
* @example
|
|
866
867
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
867
868
|
* searchEmbed.trigger(HostEvent.Share)
|
|
868
|
-
* @version SDK: 1.
|
|
869
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
869
870
|
*/
|
|
870
871
|
HostEvent["Share"] = "share";
|
|
871
872
|
/**
|
|
@@ -873,7 +874,7 @@ var HostEvent;
|
|
|
873
874
|
* @example
|
|
874
875
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
875
876
|
* searchEmbed.trigger(HostEvent.Save)
|
|
876
|
-
* @version SDK: 1.
|
|
877
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
877
878
|
*/
|
|
878
879
|
HostEvent["Save"] = "save";
|
|
879
880
|
/**
|
|
@@ -882,7 +883,7 @@ var HostEvent;
|
|
|
882
883
|
* @example
|
|
883
884
|
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
884
885
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
885
|
-
* @version SDK: 1.
|
|
886
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
886
887
|
*/
|
|
887
888
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
888
889
|
/**
|
|
@@ -891,7 +892,7 @@ var HostEvent;
|
|
|
891
892
|
* @example
|
|
892
893
|
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
893
894
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
894
|
-
* @version SDK: 1.
|
|
895
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
895
896
|
*/
|
|
896
897
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
897
898
|
/**
|
|
@@ -900,7 +901,7 @@ var HostEvent;
|
|
|
900
901
|
* @example
|
|
901
902
|
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
902
903
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
903
|
-
* @version SDK: 1.
|
|
904
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
904
905
|
*/
|
|
905
906
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
906
907
|
})(HostEvent || (HostEvent = {}));
|
|
@@ -9114,7 +9115,7 @@ function sanity(embedConfig) {
|
|
|
9114
9115
|
if (!embedConfig.username) {
|
|
9115
9116
|
throw new Error('Username not provided with Trusted auth');
|
|
9116
9117
|
}
|
|
9117
|
-
if (!embedConfig.authEndpoint
|
|
9118
|
+
if (!embedConfig.authEndpoint &&
|
|
9118
9119
|
typeof embedConfig.getAuthToken !== 'function') {
|
|
9119
9120
|
throw new Error('Trusted auth should provide either authEndpoint or getAuthToken');
|
|
9120
9121
|
}
|
|
@@ -9146,9 +9147,9 @@ const init = (embedConfig) => {
|
|
|
9146
9147
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
9147
9148
|
authType: config.authType,
|
|
9148
9149
|
host: config.thoughtSpotHost,
|
|
9149
|
-
usedCustomizationSheet: ((_b = (_a = embedConfig.
|
|
9150
|
-
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.
|
|
9151
|
-
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.
|
|
9150
|
+
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
9151
|
+
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
|
|
9152
|
+
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) !=
|
|
9152
9153
|
null,
|
|
9153
9154
|
});
|
|
9154
9155
|
if (config.callPrefetch) {
|
|
@@ -9368,7 +9369,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
|
|
|
9368
9369
|
});
|
|
9369
9370
|
}
|
|
9370
9371
|
|
|
9371
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.17.0-
|
|
9372
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.17.0-customcss-embed";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/**"];var exports={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",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":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",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",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","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",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","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","@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","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":"4.1.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":"^4.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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","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,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};
|
|
9372
9373
|
|
|
9373
9374
|
/**
|
|
9374
9375
|
* Copyright (c) 2022
|
|
@@ -9549,11 +9550,14 @@ class TsEmbed {
|
|
|
9549
9550
|
if (this.embedConfig.authType === AuthType.EmbeddedSSO) {
|
|
9550
9551
|
queryParams[Param.ForceSAMLAutoRedirect] = true;
|
|
9551
9552
|
}
|
|
9552
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, showAlerts, additionalFlags, locale, } = this.viewConfig;
|
|
9553
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, showAlerts, additionalFlags, locale, customCssUrl, } = this.viewConfig;
|
|
9553
9554
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
9554
9555
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
9555
9556
|
return queryParams;
|
|
9556
9557
|
}
|
|
9558
|
+
if (customCssUrl) {
|
|
9559
|
+
queryParams[Param.CustomCSSUrl] = customCssUrl;
|
|
9560
|
+
}
|
|
9557
9561
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
9558
9562
|
queryParams[Param.DisableActions] = disabledActions;
|
|
9559
9563
|
}
|
|
@@ -10285,7 +10289,7 @@ class SearchEmbed extends TsEmbed {
|
|
|
10285
10289
|
* Embed ThoughtSpot search bar
|
|
10286
10290
|
*
|
|
10287
10291
|
* @Category Search Embed
|
|
10288
|
-
* @version: SDK: 1.
|
|
10292
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
10289
10293
|
*/
|
|
10290
10294
|
class SearchBarEmbed extends TsEmbed {
|
|
10291
10295
|
constructor(domSelector, viewConfig) {
|
package/dist/tsembed.js
CHANGED
|
@@ -141,12 +141,13 @@
|
|
|
141
141
|
};
|
|
142
142
|
const getCustomisations = (embedConfig) => {
|
|
143
143
|
const { customCssUrl } = embedConfig;
|
|
144
|
-
let
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
let customizations = embedConfig.customizations ||
|
|
145
|
+
embedConfig.customisations;
|
|
146
|
+
customizations = customizations || {};
|
|
147
|
+
customizations.style = customizations.style || {};
|
|
148
|
+
customizations.style.customCSSUrl =
|
|
149
|
+
customizations.style.customCSSUrl || customCssUrl;
|
|
150
|
+
return customizations;
|
|
150
151
|
};
|
|
151
152
|
/**
|
|
152
153
|
* Gets a reference to the DOM node given
|
|
@@ -637,8 +638,8 @@
|
|
|
637
638
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
638
639
|
* @example
|
|
639
640
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
640
|
-
* {columnName: "state",operator:
|
|
641
|
-
* {columnName: "item type",operator:
|
|
641
|
+
* {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
|
|
642
|
+
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
642
643
|
* ])
|
|
643
644
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
644
645
|
*/
|
|
@@ -789,7 +790,7 @@
|
|
|
789
790
|
* liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
790
791
|
* vizEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
791
792
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
792
|
-
* @version SDK: 1.
|
|
793
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
793
794
|
*/
|
|
794
795
|
HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
795
796
|
/**
|
|
@@ -800,7 +801,7 @@
|
|
|
800
801
|
* liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
801
802
|
* vizEmbed.trigger(HostEvent.Delete)
|
|
802
803
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
803
|
-
* @version SDK: 1.
|
|
804
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
804
805
|
*/
|
|
805
806
|
HostEvent["Delete"] = "delete";
|
|
806
807
|
/**
|
|
@@ -811,7 +812,7 @@
|
|
|
811
812
|
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
812
813
|
* vizEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
813
814
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
814
|
-
* @version SDK: 1.
|
|
815
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
815
816
|
*/
|
|
816
817
|
HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
817
818
|
/**
|
|
@@ -820,7 +821,7 @@
|
|
|
820
821
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
821
822
|
* vizEmbed.trigger(HostEvent.Download)
|
|
822
823
|
* searchEmbed.trigger(HostEvent.Download)
|
|
823
|
-
* @version SDK: 1.
|
|
824
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
824
825
|
*/
|
|
825
826
|
HostEvent["Download"] = "download";
|
|
826
827
|
/**
|
|
@@ -829,7 +830,7 @@
|
|
|
829
830
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
830
831
|
* vizEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
831
832
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
832
|
-
* @version SDK: 1.
|
|
833
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
833
834
|
*/
|
|
834
835
|
HostEvent["DownloadAsCsv"] = "downloadAsCSV";
|
|
835
836
|
/**
|
|
@@ -838,7 +839,7 @@
|
|
|
838
839
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
839
840
|
* vizEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
840
841
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
841
|
-
* @version SDK: 1.
|
|
842
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
842
843
|
*/
|
|
843
844
|
HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
|
|
844
845
|
/**
|
|
@@ -846,7 +847,7 @@
|
|
|
846
847
|
* @example
|
|
847
848
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
848
849
|
* searchEmbed.trigger(HostEvent.Share)
|
|
849
|
-
* @version SDK: 1.
|
|
850
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
850
851
|
*/
|
|
851
852
|
HostEvent["Share"] = "share";
|
|
852
853
|
/**
|
|
@@ -854,7 +855,7 @@
|
|
|
854
855
|
* @example
|
|
855
856
|
* liveboardEmbed.trigger(HostEvent.Save)
|
|
856
857
|
* searchEmbed.trigger(HostEvent.Save)
|
|
857
|
-
* @version SDK: 1.
|
|
858
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
858
859
|
*/
|
|
859
860
|
HostEvent["Save"] = "save";
|
|
860
861
|
/**
|
|
@@ -863,7 +864,7 @@
|
|
|
863
864
|
* @example
|
|
864
865
|
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
865
866
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
866
|
-
* @version SDK: 1.
|
|
867
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
867
868
|
*/
|
|
868
869
|
HostEvent["SyncToSheets"] = "sync-to-sheets";
|
|
869
870
|
/**
|
|
@@ -872,7 +873,7 @@
|
|
|
872
873
|
* @example
|
|
873
874
|
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
874
875
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
875
|
-
* @version SDK: 1.
|
|
876
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
876
877
|
*/
|
|
877
878
|
HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
|
|
878
879
|
/**
|
|
@@ -881,7 +882,7 @@
|
|
|
881
882
|
* @example
|
|
882
883
|
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
883
884
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
884
|
-
* @version SDK: 1.
|
|
885
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
|
|
885
886
|
*/
|
|
886
887
|
HostEvent["ManagePipelines"] = "manage-pipeline";
|
|
887
888
|
})(exports.HostEvent || (exports.HostEvent = {}));
|
|
@@ -9080,7 +9081,7 @@
|
|
|
9080
9081
|
if (!embedConfig.username) {
|
|
9081
9082
|
throw new Error('Username not provided with Trusted auth');
|
|
9082
9083
|
}
|
|
9083
|
-
if (!embedConfig.authEndpoint
|
|
9084
|
+
if (!embedConfig.authEndpoint &&
|
|
9084
9085
|
typeof embedConfig.getAuthToken !== 'function') {
|
|
9085
9086
|
throw new Error('Trusted auth should provide either authEndpoint or getAuthToken');
|
|
9086
9087
|
}
|
|
@@ -9112,9 +9113,9 @@
|
|
|
9112
9113
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
9113
9114
|
authType: config.authType,
|
|
9114
9115
|
host: config.thoughtSpotHost,
|
|
9115
|
-
usedCustomizationSheet: ((_b = (_a = embedConfig.
|
|
9116
|
-
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.
|
|
9117
|
-
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.
|
|
9116
|
+
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
9117
|
+
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
|
|
9118
|
+
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) !=
|
|
9118
9119
|
null,
|
|
9119
9120
|
});
|
|
9120
9121
|
if (config.callPrefetch) {
|
|
@@ -9334,7 +9335,7 @@
|
|
|
9334
9335
|
});
|
|
9335
9336
|
}
|
|
9336
9337
|
|
|
9337
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.17.0-
|
|
9338
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.17.0-customcss-embed";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/**"];var exports$1={".":"./lib/src/index.js","./react":"./lib/src/react/index.js"};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false",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":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts",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",prepublishOnly:"npm run test; npm run tsc; npm run bundle-dts; npm run build","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",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","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","@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","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":"4.1.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":"^4.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-neo-theme":"^1.1.0","typedoc-plugin-toc-group":"0.0.5",typescript:"^4.1.0","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,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};
|
|
9338
9339
|
|
|
9339
9340
|
/**
|
|
9340
9341
|
* Copyright (c) 2022
|
|
@@ -9515,11 +9516,14 @@
|
|
|
9515
9516
|
if (this.embedConfig.authType === exports.AuthType.EmbeddedSSO) {
|
|
9516
9517
|
queryParams[Param.ForceSAMLAutoRedirect] = true;
|
|
9517
9518
|
}
|
|
9518
|
-
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, showAlerts, additionalFlags, locale, } = this.viewConfig;
|
|
9519
|
+
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, showAlerts, additionalFlags, locale, customCssUrl, } = this.viewConfig;
|
|
9519
9520
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
9520
9521
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
9521
9522
|
return queryParams;
|
|
9522
9523
|
}
|
|
9524
|
+
if (customCssUrl) {
|
|
9525
|
+
queryParams[Param.CustomCSSUrl] = customCssUrl;
|
|
9526
|
+
}
|
|
9523
9527
|
if (disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions.length) {
|
|
9524
9528
|
queryParams[Param.DisableActions] = disabledActions;
|
|
9525
9529
|
}
|
|
@@ -10246,7 +10250,7 @@
|
|
|
10246
10250
|
* Embed ThoughtSpot search bar
|
|
10247
10251
|
*
|
|
10248
10252
|
* @Category Search Embed
|
|
10249
|
-
* @version: SDK: 1.
|
|
10253
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
10250
10254
|
*/
|
|
10251
10255
|
class SearchBarEmbed extends TsEmbed {
|
|
10252
10256
|
constructor(domSelector, viewConfig) {
|
package/lib/package.json
CHANGED
package/lib/src/embed/base.js
CHANGED
|
@@ -109,7 +109,7 @@ function sanity(embedConfig) {
|
|
|
109
109
|
if (!embedConfig.username) {
|
|
110
110
|
throw new Error('Username not provided with Trusted auth');
|
|
111
111
|
}
|
|
112
|
-
if (!embedConfig.authEndpoint
|
|
112
|
+
if (!embedConfig.authEndpoint &&
|
|
113
113
|
typeof embedConfig.getAuthToken !== 'function') {
|
|
114
114
|
throw new Error('Trusted auth should provide either authEndpoint or getAuthToken');
|
|
115
115
|
}
|
|
@@ -141,9 +141,9 @@ export const init = (embedConfig) => {
|
|
|
141
141
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
142
142
|
authType: config.authType,
|
|
143
143
|
host: config.thoughtSpotHost,
|
|
144
|
-
usedCustomizationSheet: ((_b = (_a = embedConfig.
|
|
145
|
-
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.
|
|
146
|
-
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.
|
|
144
|
+
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
145
|
+
usedCustomizationVariables: ((_e = (_d = (_c = embedConfig.customizations) === null || _c === void 0 ? void 0 : _c.style) === null || _d === void 0 ? void 0 : _d.customCSS) === null || _e === void 0 ? void 0 : _e.variables) != null,
|
|
146
|
+
usedCustomizationRules: ((_h = (_g = (_f = embedConfig.customizations) === null || _f === void 0 ? void 0 : _f.style) === null || _g === void 0 ? void 0 : _g.customCSS) === null || _h === void 0 ? void 0 : _h.rules_UNSTABLE) !=
|
|
147
147
|
null,
|
|
148
148
|
});
|
|
149
149
|
if (config.callPrefetch) {
|
|
@@ -18,7 +18,7 @@ export interface SearchBarViewConfig extends ViewConfig {
|
|
|
18
18
|
* Embed ThoughtSpot search bar
|
|
19
19
|
*
|
|
20
20
|
* @Category Search Embed
|
|
21
|
-
* @version: SDK: 1.
|
|
21
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
22
22
|
*/
|
|
23
23
|
export declare class SearchBarEmbed extends TsEmbed {
|
|
24
24
|
/**
|
|
@@ -5,7 +5,7 @@ import { TsEmbed } from './ts-embed';
|
|
|
5
5
|
* Embed ThoughtSpot search bar
|
|
6
6
|
*
|
|
7
7
|
* @Category Search Embed
|
|
8
|
-
* @version: SDK: 1.
|
|
8
|
+
* @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
|
|
9
9
|
*/
|
|
10
10
|
export class SearchBarEmbed extends TsEmbed {
|
|
11
11
|
constructor(domSelector, viewConfig) {
|
|
@@ -98,6 +98,13 @@ export interface ViewConfig {
|
|
|
98
98
|
additionalFlags?: {
|
|
99
99
|
[key: string]: string | number | boolean;
|
|
100
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* Dynamic CSS Url to be injected in the embedded view.
|
|
103
|
+
* You would also need to set `style-src` in the CSP settings.
|
|
104
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
105
|
+
* @default ''
|
|
106
|
+
*/
|
|
107
|
+
customCssUrl?: string;
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
110
|
* Base class for embedding v2 experience
|