@thoughtspot/visual-embed-sdk 1.24.0-sage.3 → 1.24.0
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 +9 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +3 -0
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/css-variables.d.ts +38 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +32 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +11 -8
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts +4 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -3
- package/cjs/src/embed/base.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-bar.d.ts +6 -0
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +5 -2
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +15 -2
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +8 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +49 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +3 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +28 -8
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +139 -3
- 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/mixpanel-service.d.ts +1 -0
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +10 -3
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +12 -3
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +15 -15
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +7 -3
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +12 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +176 -9
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +133 -7
- 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/auth.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +38 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +32 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +4 -1
- package/dist/src/embed/base.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-bar.d.ts +6 -0
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +15 -2
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +3 -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/mixpanel-service.d.ts +1 -0
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +15 -15
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +176 -9
- 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 +226 -35
- package/dist/tsembed-react.js +219 -34
- package/dist/tsembed.es.js +228 -36
- package/dist/tsembed.js +221 -35
- package/dist/visual-embed-sdk-react-full.d.ts +512 -248
- package/dist/visual-embed-sdk-react.d.ts +514 -250
- package/dist/visual-embed-sdk.d.ts +277 -14
- package/lib/package.json +9 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +3 -0
- package/lib/src/auth.js.map +1 -1
- package/lib/src/css-variables.d.ts +38 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +32 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +11 -8
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts +4 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +6 -3
- package/lib/src/embed/base.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-bar.d.ts +6 -0
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +6 -3
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +15 -2
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +9 -3
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +49 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +3 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +29 -9
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +140 -4
- 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/mixpanel-service.d.ts +1 -0
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +10 -3
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +12 -3
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +15 -15
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +5 -3
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +13 -1
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +176 -9
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +132 -6
- 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 +280 -17
- package/package.json +9 -1
- package/src/auth.ts +6 -3
- package/src/css-variables.ts +47 -0
- package/src/embed/app.spec.ts +63 -0
- package/src/embed/app.ts +50 -15
- package/src/embed/base.ts +9 -6
- package/src/embed/liveboard.spec.ts +29 -10
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/search-bar.tsx +19 -6
- package/src/embed/search.spec.ts +61 -0
- package/src/embed/search.ts +34 -3
- package/src/embed/ts-embed.spec.ts +162 -8
- package/src/embed/ts-embed.ts +30 -9
- package/src/index.ts +4 -0
- package/src/mixpanel-service.spec.ts +12 -3
- package/src/mixpanel-service.ts +10 -3
- package/src/react/index.spec.tsx +33 -2
- package/src/react/index.tsx +37 -26
- package/src/types.ts +263 -92
- package/src/utils.spec.ts +31 -0
- package/src/utils.ts +23 -0
package/dist/tsembed.js
CHANGED
|
@@ -34,6 +34,24 @@
|
|
|
34
34
|
}
|
|
35
35
|
return null;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Construct a runtime parameter override query string from the given option.
|
|
39
|
+
*
|
|
40
|
+
* @param runtimeParameters
|
|
41
|
+
*/
|
|
42
|
+
const getRuntimeParameters = (runtimeParameters) => {
|
|
43
|
+
if (runtimeParameters && runtimeParameters.length) {
|
|
44
|
+
const params = runtimeParameters.map((param, valueIndex) => {
|
|
45
|
+
const index = valueIndex + 1;
|
|
46
|
+
const filterExpr = [];
|
|
47
|
+
filterExpr.push(`param${index}=${encodeURIComponent(param.name)}`);
|
|
48
|
+
filterExpr.push(`paramVal${index}=${encodeURIComponent(param.value)}`);
|
|
49
|
+
return filterExpr.join('&');
|
|
50
|
+
});
|
|
51
|
+
return `${params.join('&')}`;
|
|
52
|
+
}
|
|
53
|
+
return null;
|
|
54
|
+
};
|
|
37
55
|
/**
|
|
38
56
|
* Convert a value to a string representation to be sent as a query
|
|
39
57
|
* parameter to the ThoughtSpot app.
|
|
@@ -352,6 +370,17 @@
|
|
|
352
370
|
*/
|
|
353
371
|
AuthType["Basic"] = "Basic";
|
|
354
372
|
})(exports.AuthType || (exports.AuthType = {}));
|
|
373
|
+
(function (HomeLeftNavItem) {
|
|
374
|
+
HomeLeftNavItem["QueryBuilder"] = "query-builder";
|
|
375
|
+
HomeLeftNavItem["Home"] = "insights-home";
|
|
376
|
+
HomeLeftNavItem["Liveboards"] = "liveboards";
|
|
377
|
+
HomeLeftNavItem["Answers"] = "answers";
|
|
378
|
+
HomeLeftNavItem["MonitorSubscription"] = "monitor-alerts";
|
|
379
|
+
HomeLeftNavItem["SpotIQAnalysis"] = "spotiq-analysis";
|
|
380
|
+
HomeLeftNavItem["Tutorials"] = "tutorials";
|
|
381
|
+
HomeLeftNavItem["Documentation"] = "documentation";
|
|
382
|
+
HomeLeftNavItem["Community"] = "community";
|
|
383
|
+
})(exports.HomeLeftNavItem || (exports.HomeLeftNavItem = {}));
|
|
355
384
|
(function (RuntimeFilterOp) {
|
|
356
385
|
/**
|
|
357
386
|
* Equals
|
|
@@ -410,6 +439,32 @@
|
|
|
410
439
|
*/
|
|
411
440
|
RuntimeFilterOp["IN"] = "IN";
|
|
412
441
|
})(exports.RuntimeFilterOp || (exports.RuntimeFilterOp = {}));
|
|
442
|
+
(function (HomepageModule) {
|
|
443
|
+
/**
|
|
444
|
+
* Search bar
|
|
445
|
+
*/
|
|
446
|
+
HomepageModule["Search"] = "search";
|
|
447
|
+
/**
|
|
448
|
+
* kPI watchlist module
|
|
449
|
+
*/
|
|
450
|
+
HomepageModule["Watchlist"] = "watchlist";
|
|
451
|
+
/**
|
|
452
|
+
* favorite objects
|
|
453
|
+
*/
|
|
454
|
+
HomepageModule["Favorite"] = "favorite";
|
|
455
|
+
/**
|
|
456
|
+
* List of answers and liveboards
|
|
457
|
+
*/
|
|
458
|
+
HomepageModule["MyLibrary"] = "mylibrary";
|
|
459
|
+
/**
|
|
460
|
+
* Trending list
|
|
461
|
+
*/
|
|
462
|
+
HomepageModule["Trending"] = "trending";
|
|
463
|
+
/**
|
|
464
|
+
* Learning videos
|
|
465
|
+
*/
|
|
466
|
+
HomepageModule["Learning"] = "learning";
|
|
467
|
+
})(exports.HomepageModule || (exports.HomepageModule = {}));
|
|
413
468
|
(function (EmbedEvent) {
|
|
414
469
|
/**
|
|
415
470
|
* Rendering has initialized.
|
|
@@ -814,23 +869,74 @@
|
|
|
814
869
|
*/
|
|
815
870
|
EmbedEvent["InsertIntoSlide"] = "insertInToSlide";
|
|
816
871
|
/**
|
|
872
|
+
* @hidden
|
|
817
873
|
* Emitted when a user changes any filter on a Liveboard.
|
|
818
|
-
*
|
|
819
874
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
820
875
|
*/
|
|
821
876
|
EmbedEvent["FilterChanged"] = "filterChanged";
|
|
822
877
|
/**
|
|
823
878
|
* Emitted when a user click on Go button in Sage Embed
|
|
824
879
|
*
|
|
825
|
-
* @version SDK : 1.
|
|
880
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
826
881
|
*/
|
|
827
882
|
EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
|
|
828
883
|
/**
|
|
829
884
|
* Emitten when a user select data source in Sage Embed
|
|
830
885
|
*
|
|
831
|
-
* @version SDK : 1.
|
|
886
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
832
887
|
*/
|
|
833
888
|
EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
|
|
889
|
+
/**
|
|
890
|
+
* Emitten when a user updates a connection in Data tab
|
|
891
|
+
*
|
|
892
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
893
|
+
*/
|
|
894
|
+
EmbedEvent["UpdateConnection"] = "updateConnection";
|
|
895
|
+
/**
|
|
896
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
897
|
+
* PersonalisedView is updated.
|
|
898
|
+
*
|
|
899
|
+
* @returns viewName: string
|
|
900
|
+
* @returns viewId: string
|
|
901
|
+
* @returns liveboardId: string
|
|
902
|
+
* @returns isPublic: boolean
|
|
903
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
904
|
+
*/
|
|
905
|
+
EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
|
|
906
|
+
/**
|
|
907
|
+
* Emitted when a PersonalisedView is saved.
|
|
908
|
+
*
|
|
909
|
+
* @returns viewName: string
|
|
910
|
+
* @returns viewId: string
|
|
911
|
+
* @returns liveboardId: string
|
|
912
|
+
* @returns isPublic: boolean
|
|
913
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
914
|
+
*/
|
|
915
|
+
EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
|
|
916
|
+
/**
|
|
917
|
+
* Emitted when a Liveboard is reset.
|
|
918
|
+
*
|
|
919
|
+
* @returns viewName: string
|
|
920
|
+
* @returns viewId: string
|
|
921
|
+
* @returns liveboardId: string
|
|
922
|
+
* @returns isPublic: boolean
|
|
923
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
924
|
+
*/
|
|
925
|
+
EmbedEvent["ResetLiveboard"] = "resetLiveboard";
|
|
926
|
+
/**
|
|
927
|
+
* Emitted when a PersonalisedView is deleted.
|
|
928
|
+
*
|
|
929
|
+
* @returns views: string[]
|
|
930
|
+
* @returns liveboardId: string
|
|
931
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
932
|
+
*/
|
|
933
|
+
EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
|
|
934
|
+
/**
|
|
935
|
+
* Emitten when a user creates a new worksheet
|
|
936
|
+
*
|
|
937
|
+
* @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
|
|
938
|
+
*/
|
|
939
|
+
EmbedEvent["CreateWorksheet"] = "createWorksheet";
|
|
834
940
|
})(exports.EmbedEvent || (exports.EmbedEvent = {}));
|
|
835
941
|
(function (HostEvent) {
|
|
836
942
|
/**
|
|
@@ -1451,16 +1557,16 @@
|
|
|
1451
1557
|
*/
|
|
1452
1558
|
HostEvent["ResetSearch"] = "resetSearch";
|
|
1453
1559
|
/**
|
|
1560
|
+
* @hidden
|
|
1454
1561
|
* Gets the currents visible and runtime filters applied on a Liveboard
|
|
1455
|
-
*
|
|
1456
1562
|
* @example
|
|
1457
1563
|
* liveboardEmbed.trigger(HostEvent.GetFilters)
|
|
1458
1564
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
1459
1565
|
*/
|
|
1460
1566
|
HostEvent["GetFilters"] = "getFilters";
|
|
1461
1567
|
/**
|
|
1568
|
+
* @hidden
|
|
1462
1569
|
* Updates the visible filters on the Liveboard.
|
|
1463
|
-
*
|
|
1464
1570
|
* @param - filter: filter object containing column name and filter operation and values
|
|
1465
1571
|
* @example
|
|
1466
1572
|
*
|
|
@@ -1611,6 +1717,9 @@
|
|
|
1611
1717
|
Param["HideSampleQuestions"] = "hideSampleQuestions";
|
|
1612
1718
|
Param["WorksheetId"] = "worksheet";
|
|
1613
1719
|
Param["Query"] = "query";
|
|
1720
|
+
Param["HideHomepageLeftNav"] = "hideHomepageLeftNav";
|
|
1721
|
+
Param["ModularHomeExperienceEnabled"] = "modularHomeExperience";
|
|
1722
|
+
Param["PendoTrackingKey"] = "additionalPendoKey";
|
|
1614
1723
|
})(Param || (Param = {}));
|
|
1615
1724
|
(function (Action) {
|
|
1616
1725
|
/**
|
|
@@ -2086,7 +2195,7 @@
|
|
|
2086
2195
|
* disabledActions: [Action.QueryDetailsButtons]
|
|
2087
2196
|
* ```
|
|
2088
2197
|
*/
|
|
2089
|
-
Action["QueryDetailsButtons"] = "
|
|
2198
|
+
Action["QueryDetailsButtons"] = "queryDetailsButtons";
|
|
2090
2199
|
/**
|
|
2091
2200
|
* The **Delete** action for Answers.
|
|
2092
2201
|
*
|
|
@@ -2391,6 +2500,35 @@
|
|
|
2391
2500
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
2392
2501
|
*/
|
|
2393
2502
|
Action["ModifySageAnswer"] = "modifySageAnswer";
|
|
2503
|
+
/**
|
|
2504
|
+
* The **Move to Tab** menu action on visualizations in liveboard edit mode.
|
|
2505
|
+
* Allows moving a visualization to a different tab.
|
|
2506
|
+
*
|
|
2507
|
+
* @example
|
|
2508
|
+
* ```js
|
|
2509
|
+
* disabledActions: [Action.MoveToTab]
|
|
2510
|
+
* ```
|
|
2511
|
+
*/
|
|
2512
|
+
Action["MoveToTab"] = "onContainerMove";
|
|
2513
|
+
/**
|
|
2514
|
+
* The **Manage Alertsb** menu action on KPI visualizations.
|
|
2515
|
+
*
|
|
2516
|
+
* @example
|
|
2517
|
+
* ```js
|
|
2518
|
+
* disabledActions: [Action.ManageMonitor]
|
|
2519
|
+
* ```
|
|
2520
|
+
*/
|
|
2521
|
+
Action["ManageMonitor"] = "ManageMonitor";
|
|
2522
|
+
/**
|
|
2523
|
+
* Action ID for Liveboard Personalised Views dropdown
|
|
2524
|
+
*
|
|
2525
|
+
* @example
|
|
2526
|
+
* ```js
|
|
2527
|
+
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
2528
|
+
* ```
|
|
2529
|
+
* @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
2530
|
+
*/
|
|
2531
|
+
Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
|
|
2394
2532
|
})(exports.Action || (exports.Action = {}));
|
|
2395
2533
|
// eslint-disable-next-line no-shadow
|
|
2396
2534
|
var OperationType;
|
|
@@ -8465,6 +8603,7 @@
|
|
|
8465
8603
|
|
|
8466
8604
|
// Needed to avoid error in CJS builds on some bundlers.
|
|
8467
8605
|
const mixpanelLib = mixpanel_cjs || mixpanel$1;
|
|
8606
|
+
let mixpanelInstance;
|
|
8468
8607
|
const MIXPANEL_EVENT = {
|
|
8469
8608
|
VISUAL_SDK_RENDER_START: 'visual-sdk-render-start',
|
|
8470
8609
|
VISUAL_SDK_CALLED_INIT: 'visual-sdk-called-init',
|
|
@@ -8473,6 +8612,7 @@
|
|
|
8473
8612
|
VISUAL_SDK_TRIGGER: 'visual-sdk-trigger',
|
|
8474
8613
|
VISUAL_SDK_ON: 'visual-sdk-on',
|
|
8475
8614
|
VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: 'visual-sdk-iframe-load-performance',
|
|
8615
|
+
VISUAL_SDK_EMBED_CREATE: 'visual-sdk-embed-create',
|
|
8476
8616
|
};
|
|
8477
8617
|
let isMixpanelInitialized = false;
|
|
8478
8618
|
let eventQueue = [];
|
|
@@ -8487,7 +8627,7 @@
|
|
|
8487
8627
|
eventQueue.push({ eventId, eventProps });
|
|
8488
8628
|
return;
|
|
8489
8629
|
}
|
|
8490
|
-
|
|
8630
|
+
mixpanelInstance.track(eventId, eventProps);
|
|
8491
8631
|
}
|
|
8492
8632
|
/**
|
|
8493
8633
|
*
|
|
@@ -8515,10 +8655,15 @@
|
|
|
8515
8655
|
const token = sessionInfo.mixpanelToken;
|
|
8516
8656
|
try {
|
|
8517
8657
|
if (token) {
|
|
8518
|
-
mixpanelLib.init(token);
|
|
8658
|
+
mixpanelInstance = mixpanelLib.init(token, undefined, 'tsEmbed');
|
|
8519
8659
|
if (!isPublicCluster) {
|
|
8520
|
-
|
|
8660
|
+
mixpanelInstance.identify(sessionInfo.userGUID);
|
|
8521
8661
|
}
|
|
8662
|
+
mixpanelInstance.register_once({
|
|
8663
|
+
clusterId: sessionInfo.clusterId,
|
|
8664
|
+
clusterName: sessionInfo.clusterName,
|
|
8665
|
+
releaseVersion: sessionInfo.releaseVersion,
|
|
8666
|
+
});
|
|
8522
8667
|
isMixpanelInitialized = true;
|
|
8523
8668
|
emptyQueue();
|
|
8524
8669
|
}
|
|
@@ -10217,6 +10362,9 @@
|
|
|
10217
10362
|
userGUID: sessionInfoResp.userGUID,
|
|
10218
10363
|
mixpanelToken,
|
|
10219
10364
|
isPublicUser: sessionInfoResp.configInfo.isPublicUser,
|
|
10365
|
+
releaseVersion: sessionInfoResp.releaseVersion,
|
|
10366
|
+
clusterId: sessionInfoResp.configInfo.selfClusterId,
|
|
10367
|
+
clusterName: sessionInfoResp.configInfo.selfClusterName,
|
|
10220
10368
|
...sessionInfoResp,
|
|
10221
10369
|
};
|
|
10222
10370
|
};
|
|
@@ -10622,9 +10770,9 @@
|
|
|
10622
10770
|
const authEE = new eventemitter3();
|
|
10623
10771
|
setAuthEE(authEE);
|
|
10624
10772
|
handleAuth();
|
|
10773
|
+
const { password, ...configToTrack } = config;
|
|
10625
10774
|
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_CALLED_INIT, {
|
|
10626
|
-
|
|
10627
|
-
host: config.thoughtSpotHost,
|
|
10775
|
+
...configToTrack,
|
|
10628
10776
|
usedCustomizationSheet: ((_b = (_a = embedConfig.customizations) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.customCSSUrl) != null,
|
|
10629
10777
|
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,
|
|
10630
10778
|
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) != null,
|
|
@@ -10681,6 +10829,7 @@
|
|
|
10681
10829
|
};
|
|
10682
10830
|
/**
|
|
10683
10831
|
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
10832
|
+
*
|
|
10684
10833
|
* @param data
|
|
10685
10834
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
10686
10835
|
*/
|
|
@@ -10725,7 +10874,9 @@
|
|
|
10725
10874
|
});
|
|
10726
10875
|
};
|
|
10727
10876
|
/**
|
|
10728
|
-
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
10877
|
+
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
10878
|
+
* format.
|
|
10879
|
+
*
|
|
10729
10880
|
* @param data
|
|
10730
10881
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
10731
10882
|
*/
|
|
@@ -10987,7 +11138,7 @@
|
|
|
10987
11138
|
});
|
|
10988
11139
|
}
|
|
10989
11140
|
|
|
10990
|
-
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0
|
|
11141
|
+
var name="@thoughtspot/visual-embed-sdk";var version="1.24.0";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};
|
|
10991
11142
|
|
|
10992
11143
|
/**
|
|
10993
11144
|
* Copyright (c) 2022
|
|
@@ -11035,6 +11186,7 @@
|
|
|
11035
11186
|
* @param responder
|
|
11036
11187
|
*/
|
|
11037
11188
|
this.appInitCb = async (_, responder) => {
|
|
11189
|
+
var _a, _b;
|
|
11038
11190
|
let authToken = '';
|
|
11039
11191
|
if (this.embedConfig.authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
11040
11192
|
authToken = await getAuthenticaionToken(this.embedConfig);
|
|
@@ -11045,8 +11197,14 @@
|
|
|
11045
11197
|
data: {
|
|
11046
11198
|
customisations: getCustomisations(this.embedConfig, this.viewConfig),
|
|
11047
11199
|
authToken,
|
|
11048
|
-
runtimeFilterParams:
|
|
11200
|
+
runtimeFilterParams: this.viewConfig.excludeRuntimeFiltersfromURL
|
|
11201
|
+
? getRuntimeFilters(this.viewConfig.runtimeFilters)
|
|
11202
|
+
: null,
|
|
11203
|
+
hiddenHomepageModules: this.viewConfig.hiddenHomepageModules || [],
|
|
11049
11204
|
hostConfig: this.embedConfig.hostConfig,
|
|
11205
|
+
hiddenHomeLeftNavItems: ((_a = this.viewConfig) === null || _a === void 0 ? void 0 : _a.hiddenHomeLeftNavItems)
|
|
11206
|
+
? (_b = this.viewConfig) === null || _b === void 0 ? void 0 : _b.hiddenHomeLeftNavItems
|
|
11207
|
+
: [],
|
|
11050
11208
|
},
|
|
11051
11209
|
});
|
|
11052
11210
|
};
|
|
@@ -11074,8 +11232,8 @@
|
|
|
11074
11232
|
* Register APP_INIT event and sendback init payload
|
|
11075
11233
|
*/
|
|
11076
11234
|
this.registerAppInit = () => {
|
|
11077
|
-
this.on(exports.EmbedEvent.APP_INIT, this.appInitCb);
|
|
11078
|
-
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken);
|
|
11235
|
+
this.on(exports.EmbedEvent.APP_INIT, this.appInitCb, { start: false }, true);
|
|
11236
|
+
this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
|
|
11079
11237
|
};
|
|
11080
11238
|
this.el = getDOMNode(domSelector);
|
|
11081
11239
|
// TODO: handle error
|
|
@@ -11090,6 +11248,9 @@
|
|
|
11090
11248
|
this.viewConfig = viewConfig;
|
|
11091
11249
|
this.shouldEncodeUrlQueryParams = this.embedConfig.shouldEncodeUrlQueryParams;
|
|
11092
11250
|
this.registerAppInit();
|
|
11251
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
|
|
11252
|
+
...viewConfig,
|
|
11253
|
+
});
|
|
11093
11254
|
}
|
|
11094
11255
|
/**
|
|
11095
11256
|
* Throws error encountered during initialization.
|
|
@@ -11220,6 +11381,9 @@
|
|
|
11220
11381
|
if (this.embedConfig.authType === exports.AuthType.TrustedAuthTokenCookieless) {
|
|
11221
11382
|
queryParams[Param.cookieless] = true;
|
|
11222
11383
|
}
|
|
11384
|
+
if (this.embedConfig.pendoTrackingKey) {
|
|
11385
|
+
queryParams[Param.PendoTrackingKey] = this.embedConfig.pendoTrackingKey;
|
|
11386
|
+
}
|
|
11223
11387
|
const { disabledActions, disabledActionReason, hiddenActions, visibleActions, hiddenTabs, visibleTabs, showAlerts, additionalFlags, locale, customizations, contextMenuTrigger, linkOverride, insertInToSlide, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, } = this.viewConfig;
|
|
11224
11388
|
if (Array.isArray(visibleActions) && Array.isArray(hiddenActions)) {
|
|
11225
11389
|
this.handleError('You cannot have both hidden actions and visible actions');
|
|
@@ -11372,7 +11536,6 @@
|
|
|
11372
11536
|
this.insertIntoDOM(this.embedConfig.loginFailedMessage);
|
|
11373
11537
|
return;
|
|
11374
11538
|
}
|
|
11375
|
-
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE);
|
|
11376
11539
|
this.iFrame = this.iFrame || this.createIframeEl(url);
|
|
11377
11540
|
this.iFrame.addEventListener('load', () => {
|
|
11378
11541
|
nextInQueue();
|
|
@@ -11383,7 +11546,9 @@
|
|
|
11383
11546
|
},
|
|
11384
11547
|
type: exports.EmbedEvent.Load,
|
|
11385
11548
|
});
|
|
11386
|
-
uploadMixpanelEvent(MIXPANEL_EVENT.
|
|
11549
|
+
uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_RENDER_COMPLETE, {
|
|
11550
|
+
elWidth: this.iFrame.clientWidth,
|
|
11551
|
+
elHeight: this.iFrame.clientHeight,
|
|
11387
11552
|
timeTookToLoad: loadTimestamp - initTimestamp,
|
|
11388
11553
|
});
|
|
11389
11554
|
});
|
|
@@ -11526,6 +11691,8 @@
|
|
|
11526
11691
|
* @param messageType The message type
|
|
11527
11692
|
* @param callback A callback as a function
|
|
11528
11693
|
* @param options The message options
|
|
11694
|
+
* @param isSelf
|
|
11695
|
+
* @param isRegisteredBySDK
|
|
11529
11696
|
* @example
|
|
11530
11697
|
* ```js
|
|
11531
11698
|
* tsEmbed.on(EmbedEvent.Error, (data) => {
|
|
@@ -11541,7 +11708,10 @@
|
|
|
11541
11708
|
* });
|
|
11542
11709
|
* ```
|
|
11543
11710
|
*/
|
|
11544
|
-
on(messageType, callback, options = { start: false }) {
|
|
11711
|
+
on(messageType, callback, options = { start: false }, isRegisteredBySDK = false) {
|
|
11712
|
+
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`, {
|
|
11713
|
+
isRegisteredBySDK,
|
|
11714
|
+
});
|
|
11545
11715
|
if (this.isRendered) {
|
|
11546
11716
|
this.handleError('Please register event handlers before calling render');
|
|
11547
11717
|
}
|
|
@@ -11698,8 +11868,10 @@
|
|
|
11698
11868
|
let queryString = queryParams;
|
|
11699
11869
|
if (!this.viewConfig.excludeRuntimeFiltersfromURL) {
|
|
11700
11870
|
const runtimeFilters = this.viewConfig.runtimeFilters;
|
|
11871
|
+
const runtimeParameters = this.viewConfig.runtimeParameters;
|
|
11872
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
11701
11873
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
11702
|
-
queryString = [filterQuery, queryParams].filter(Boolean).join('&');
|
|
11874
|
+
queryString = [parameterQuery, filterQuery, queryParams].filter(Boolean).join('&');
|
|
11703
11875
|
}
|
|
11704
11876
|
return this.getV1EmbedBasePath(queryString);
|
|
11705
11877
|
}
|
|
@@ -11722,7 +11894,6 @@
|
|
|
11722
11894
|
*/
|
|
11723
11895
|
on(messageType, callback, options = { start: false }) {
|
|
11724
11896
|
const eventType = this.getCompatibleEventType(messageType);
|
|
11725
|
-
uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_ON}-${messageType}`);
|
|
11726
11897
|
return super.on(eventType, callback, options);
|
|
11727
11898
|
}
|
|
11728
11899
|
}
|
|
@@ -11808,7 +11979,7 @@
|
|
|
11808
11979
|
* embedded Liveboard or visualization.
|
|
11809
11980
|
*/
|
|
11810
11981
|
getEmbedParams() {
|
|
11811
|
-
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, } = this.viewConfig;
|
|
11982
|
+
const { tag, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = false, hideHomepageLeftNav = false, modularHomeExperience = false, } = this.viewConfig;
|
|
11812
11983
|
let params = {};
|
|
11813
11984
|
params[Param.EmbedApp] = true;
|
|
11814
11985
|
params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
|
|
@@ -11832,6 +12003,8 @@
|
|
|
11832
12003
|
params[Param.EnableSearchAssist] = enableSearchAssist;
|
|
11833
12004
|
}
|
|
11834
12005
|
params[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
12006
|
+
params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
|
|
12007
|
+
params[Param.ModularHomeExperienceEnabled] = modularHomeExperience;
|
|
11835
12008
|
const queryParams = getQueryParamString(params, true);
|
|
11836
12009
|
return queryParams;
|
|
11837
12010
|
}
|
|
@@ -11841,8 +12014,8 @@
|
|
|
11841
12014
|
* @param pageId The ID of the page to be embedded.
|
|
11842
12015
|
*/
|
|
11843
12016
|
getIFrameSrc() {
|
|
11844
|
-
const { pageId, path } = this.viewConfig;
|
|
11845
|
-
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId);
|
|
12017
|
+
const { pageId, path, modularHomeExperience } = this.viewConfig;
|
|
12018
|
+
const pageRoute = this.formatPath(path) || this.getPageRoute(pageId, modularHomeExperience);
|
|
11846
12019
|
let url = `${this.getRootIframeSrc()}/${pageRoute}`;
|
|
11847
12020
|
const tsPostHashParams = this.getThoughtSpotPostUrlParams();
|
|
11848
12021
|
url = `${url}${tsPostHashParams}`;
|
|
@@ -11852,21 +12025,22 @@
|
|
|
11852
12025
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
11853
12026
|
*
|
|
11854
12027
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
12028
|
+
* @param modularHomeExperience
|
|
11855
12029
|
*/
|
|
11856
|
-
getPageRoute(pageId) {
|
|
12030
|
+
getPageRoute(pageId, modularHomeExperience = false) {
|
|
11857
12031
|
switch (pageId) {
|
|
11858
12032
|
case exports.Page.Search:
|
|
11859
12033
|
return 'answer';
|
|
11860
12034
|
case exports.Page.Answers:
|
|
11861
|
-
return 'answers';
|
|
12035
|
+
return modularHomeExperience ? 'home/answers' : 'answers';
|
|
11862
12036
|
case exports.Page.Liveboards:
|
|
11863
|
-
return 'pinboards';
|
|
12037
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
11864
12038
|
case exports.Page.Pinboards:
|
|
11865
|
-
return 'pinboards';
|
|
12039
|
+
return modularHomeExperience ? 'home/liveboards' : 'pinboards';
|
|
11866
12040
|
case exports.Page.Data:
|
|
11867
12041
|
return 'data/tables';
|
|
11868
12042
|
case exports.Page.SpotIQ:
|
|
11869
|
-
return 'insights/results';
|
|
12043
|
+
return modularHomeExperience ? 'home/spotiq-analysis' : 'insights/results';
|
|
11870
12044
|
case exports.Page.Home:
|
|
11871
12045
|
default:
|
|
11872
12046
|
return 'home';
|
|
@@ -11995,7 +12169,7 @@
|
|
|
11995
12169
|
let params = {};
|
|
11996
12170
|
params[Param.EmbedApp] = true;
|
|
11997
12171
|
params = this.getBaseQueryParams(params);
|
|
11998
|
-
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, } = this.viewConfig;
|
|
12172
|
+
const { enableVizTransformations, fullHeight, defaultHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, runtimeParameters, } = this.viewConfig;
|
|
11999
12173
|
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
|
|
12000
12174
|
|| this.viewConfig.preventPinboardFilterRemoval;
|
|
12001
12175
|
if (fullHeight === true) {
|
|
@@ -12023,7 +12197,10 @@
|
|
|
12023
12197
|
if (hideTabPanel) {
|
|
12024
12198
|
params[Param.HideTabPanel] = hideTabPanel;
|
|
12025
12199
|
}
|
|
12026
|
-
|
|
12200
|
+
let queryParams = getQueryParamString(params, true);
|
|
12201
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
12202
|
+
if (parameterQuery)
|
|
12203
|
+
queryParams += `&${parameterQuery}`;
|
|
12027
12204
|
return queryParams;
|
|
12028
12205
|
}
|
|
12029
12206
|
getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
|
|
@@ -12147,7 +12324,7 @@
|
|
|
12147
12324
|
}
|
|
12148
12325
|
getEmbedParams() {
|
|
12149
12326
|
var _a;
|
|
12150
|
-
const { hideResults, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, } = this.viewConfig;
|
|
12327
|
+
const { hideResults, expandAllDataSource, enableSearchAssist, forceTable, searchOptions, runtimeFilters, dataSource, dataSources, excludeRuntimeFiltersfromURL, dataPanelV2 = false, useLastSelectedSources = false, runtimeParameters, } = this.viewConfig;
|
|
12151
12328
|
const queryParams = this.getBaseQueryParams();
|
|
12152
12329
|
queryParams[Param.HideActions] = [
|
|
12153
12330
|
...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : []),
|
|
@@ -12176,13 +12353,19 @@
|
|
|
12176
12353
|
}
|
|
12177
12354
|
queryParams[Param.DataPanelV2Enabled] = dataPanelV2;
|
|
12178
12355
|
queryParams[Param.DataSourceMode] = this.getDataSourceMode();
|
|
12179
|
-
queryParams[Param.UseLastSelectedDataSource] =
|
|
12356
|
+
queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
|
|
12357
|
+
if (dataSource || dataSources) {
|
|
12358
|
+
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
12359
|
+
}
|
|
12180
12360
|
queryParams[Param.searchEmbed] = true;
|
|
12181
12361
|
let query = '';
|
|
12182
12362
|
const queryParamsString = getQueryParamString(queryParams, true);
|
|
12183
12363
|
if (queryParamsString) {
|
|
12184
12364
|
query = `?${queryParamsString}`;
|
|
12185
12365
|
}
|
|
12366
|
+
const parameterQuery = getRuntimeParameters(runtimeParameters || []);
|
|
12367
|
+
if (parameterQuery)
|
|
12368
|
+
query += `&${parameterQuery}`;
|
|
12186
12369
|
const filterQuery = getFilterQuery(runtimeFilters || []);
|
|
12187
12370
|
if (filterQuery && !excludeRuntimeFiltersfromURL) {
|
|
12188
12371
|
query += `&${filterQuery}`;
|
|
@@ -12237,7 +12420,7 @@
|
|
|
12237
12420
|
*/
|
|
12238
12421
|
getIFrameSrc() {
|
|
12239
12422
|
var _a;
|
|
12240
|
-
const { searchOptions, dataSource, dataSources } = this.viewConfig;
|
|
12423
|
+
const { searchOptions, dataSource, dataSources, useLastSelectedSources = false, } = this.viewConfig;
|
|
12241
12424
|
const path = 'search-bar-embed';
|
|
12242
12425
|
const queryParams = this.getBaseQueryParams();
|
|
12243
12426
|
queryParams[Param.HideActions] = [...((_a = queryParams[Param.HideActions]) !== null && _a !== void 0 ? _a : [])];
|
|
@@ -12253,7 +12436,10 @@
|
|
|
12253
12436
|
queryParams[Param.executeSearch] = true;
|
|
12254
12437
|
}
|
|
12255
12438
|
}
|
|
12256
|
-
queryParams[Param.UseLastSelectedDataSource] =
|
|
12439
|
+
queryParams[Param.UseLastSelectedDataSource] = useLastSelectedSources;
|
|
12440
|
+
if (dataSource || dataSources) {
|
|
12441
|
+
queryParams[Param.UseLastSelectedDataSource] = false;
|
|
12442
|
+
}
|
|
12257
12443
|
queryParams[Param.searchEmbed] = true;
|
|
12258
12444
|
let query = '';
|
|
12259
12445
|
const queryParamsString = getQueryParamString(queryParams, true);
|