@global.engg/switcher-lib 0.0.72 → 0.1.16
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/bundles/global.engg-switcher-lib.umd.js +226 -7
- package/bundles/global.engg-switcher-lib.umd.js.map +1 -1
- package/esm2015/lib/switcher.component.js +220 -8
- package/esm2015/lib/switcher.service.js +6 -1
- package/fesm2015/global.engg-switcher-lib.js +224 -7
- package/fesm2015/global.engg-switcher-lib.js.map +1 -1
- package/lib/switcher.component.d.ts +18 -0
- package/lib/switcher.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
AppSwitcherService.prototype.appSwitch = function (app, kyc_status) {
|
|
176
176
|
var _a, _b, _c;
|
|
177
177
|
this.sendGaEvent(app);
|
|
178
|
+
this.moengageEvent(app);
|
|
178
179
|
if (this.userData.allow_engage && app === 'engage') {
|
|
179
180
|
window.open(this.SR_CONSTANTS.EngageWebBaseUrl + "gate-keeper?token=" + this.userData.token, '_blank');
|
|
180
181
|
}
|
|
@@ -388,6 +389,10 @@
|
|
|
388
389
|
}
|
|
389
390
|
this.send(category, eventName, label);
|
|
390
391
|
};
|
|
392
|
+
AppSwitcherService.prototype.moengageEvent = function (event) {
|
|
393
|
+
var _a, _b;
|
|
394
|
+
(_b = (_a = this.windowRef.nativeWindow) === null || _a === void 0 ? void 0 : _a.Moengage) === null || _b === void 0 ? void 0 : _b.track_event("product_navigation_icon_clicked", { icon_name: event, company_id: this.userData.company_id });
|
|
395
|
+
};
|
|
391
396
|
AppSwitcherService.prototype.send = function (eventCategory, eventAction, eventLabel) {
|
|
392
397
|
var _a, _b, _c;
|
|
393
398
|
var source = ((_a = document.cookie
|
|
@@ -453,6 +458,14 @@
|
|
|
453
458
|
this.company_id = '';
|
|
454
459
|
this.userData = user;
|
|
455
460
|
this.recentUsedProducts = [];
|
|
461
|
+
this.isLoadingRecentProducts = false; // Start as false since we'll load from cache first
|
|
462
|
+
this.shouldShowRecentSection = false;
|
|
463
|
+
this.hasLoadedData = false; // Track if we've loaded data at least once
|
|
464
|
+
this.isApiCallInProgress = false; // Prevent duplicate API calls
|
|
465
|
+
this.apiRetryCount = 0; // Track API retry attempts
|
|
466
|
+
this.modalHasBeenOpened = false; // Track if modal has been opened at least once
|
|
467
|
+
this.skeletonMinDuration = 1000; // Minimum skeleton loader duration (1 second)
|
|
468
|
+
this.skeletonStartTime = 0; // Track when skeleton started showing
|
|
456
469
|
this.appSwitcherApps = {
|
|
457
470
|
shipping_fulfilment_india: [
|
|
458
471
|
{
|
|
@@ -715,14 +728,23 @@
|
|
|
715
728
|
SwitcherComponent.prototype.openModal = function (param) {
|
|
716
729
|
var _this = this;
|
|
717
730
|
var _a;
|
|
718
|
-
console.log('package version is 0.0.
|
|
731
|
+
console.log('package version is 0.0.71 move to update 4 sep ======');
|
|
719
732
|
this.isModalOpen = true;
|
|
720
733
|
this.showProducts = false;
|
|
734
|
+
this.modalHasBeenOpened = true; // Mark that modal has been opened
|
|
721
735
|
var sidebar = document.querySelector('app-sidebar');
|
|
722
736
|
if (sidebar) {
|
|
723
737
|
sidebar.setAttribute('style', 'display: none');
|
|
724
738
|
}
|
|
725
|
-
|
|
739
|
+
// Hide Intercom chat widget
|
|
740
|
+
var intercomWidget = document.querySelector('.intercom-lightweight-app');
|
|
741
|
+
if (intercomWidget) {
|
|
742
|
+
intercomWidget.style.display = 'none';
|
|
743
|
+
}
|
|
744
|
+
// Only load data if we haven't loaded it before AND modal has been opened
|
|
745
|
+
if (!this.hasLoadedData) {
|
|
746
|
+
this.loadRecentProductsData();
|
|
747
|
+
}
|
|
726
748
|
setTimeout(function () {
|
|
727
749
|
_this.showProducts = true;
|
|
728
750
|
}, 200);
|
|
@@ -741,6 +763,11 @@
|
|
|
741
763
|
if (sidebar) {
|
|
742
764
|
sidebar.setAttribute('style', 'display: block');
|
|
743
765
|
}
|
|
766
|
+
// Show Intercom chat widget
|
|
767
|
+
var intercomWidget = document.querySelector('.intercom-lightweight-app');
|
|
768
|
+
if (intercomWidget) {
|
|
769
|
+
intercomWidget.style.display = 'block';
|
|
770
|
+
}
|
|
744
771
|
};
|
|
745
772
|
SwitcherComponent.prototype.ngOnInit = function () {
|
|
746
773
|
var _this = this;
|
|
@@ -753,12 +780,18 @@
|
|
|
753
780
|
_this.appSwitcherApps[category] = _this.appSwitcherApps[category].filter(function (app) { return !appsToRemove_1.includes(app.appName); });
|
|
754
781
|
});
|
|
755
782
|
}
|
|
783
|
+
// CRITICAL: Do NOT load data here - only load when modal is explicitly opened
|
|
784
|
+
// this.loadRecentProductsData(); // This should NEVER be uncommented
|
|
785
|
+
console.log('SwitcherComponent initialized - NO API calls should happen until modal is opened');
|
|
756
786
|
};
|
|
757
787
|
SwitcherComponent.prototype.ngOnDestroy = function () {
|
|
758
788
|
this.windowRef.nativeWindow.removeEventListener('resize', this.resizeListener);
|
|
759
789
|
if (this.resizeTimeout) {
|
|
760
790
|
clearTimeout(this.resizeTimeout);
|
|
761
791
|
}
|
|
792
|
+
if (this.apiCallTimeout) {
|
|
793
|
+
clearTimeout(this.apiCallTimeout);
|
|
794
|
+
}
|
|
762
795
|
};
|
|
763
796
|
SwitcherComponent.prototype.checkScreenSize = function () {
|
|
764
797
|
var width = this.windowRef.nativeWindow.innerWidth;
|
|
@@ -784,8 +817,25 @@
|
|
|
784
817
|
else if (currentUrl.includes('app.shiprocket.in')) {
|
|
785
818
|
return 'https://apiv2.shiprocket.co/v1/';
|
|
786
819
|
}
|
|
820
|
+
else if (currentUrl.includes('multichannel-web-lastmile-stage.kartrocket.com')) {
|
|
821
|
+
return 'https://multichannel-api-stage.kartrocket.com/v1/';
|
|
822
|
+
}
|
|
787
823
|
else {
|
|
788
|
-
return '';
|
|
824
|
+
return 'https://apiv2.shiprocket.co/v1/';
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
SwitcherComponent.prototype.isTokenValid = function () {
|
|
828
|
+
try {
|
|
829
|
+
var token = this.userData.token;
|
|
830
|
+
if (!token)
|
|
831
|
+
return false;
|
|
832
|
+
var payload = JSON.parse(atob(token.split('.')[1]));
|
|
833
|
+
var now = Math.floor(Date.now() / 1000);
|
|
834
|
+
return payload.exp > now;
|
|
835
|
+
}
|
|
836
|
+
catch (error) {
|
|
837
|
+
console.warn('Invalid JWT token:', error);
|
|
838
|
+
return false;
|
|
789
839
|
}
|
|
790
840
|
};
|
|
791
841
|
SwitcherComponent.prototype.analyticsevent = function (item) {
|
|
@@ -827,7 +877,11 @@
|
|
|
827
877
|
};
|
|
828
878
|
this._http.post(this.getBaseUrl() + "settings/company-service", data, { headers: headers }).subscribe(function (res) {
|
|
829
879
|
// API call complete, but we don't wait for it
|
|
830
|
-
|
|
880
|
+
console.log('POST API call successful for:', displayName);
|
|
881
|
+
}, function (error) {
|
|
882
|
+
// Log error but don't retry for POST calls
|
|
883
|
+
console.warn('POST API call failed for:', displayName, error);
|
|
884
|
+
});
|
|
831
885
|
// Handle UI updates and navigation independently with timeout
|
|
832
886
|
setTimeout(function () {
|
|
833
887
|
if (clickedApp) {
|
|
@@ -842,6 +896,8 @@
|
|
|
842
896
|
_this.recentUsedProducts.unshift(newRecentProduct);
|
|
843
897
|
// Keep only the first 4 elements
|
|
844
898
|
_this.recentUsedProducts = _this.recentUsedProducts.slice(0, 4);
|
|
899
|
+
// Update localStorage with new recent products
|
|
900
|
+
localStorage.setItem('recentUsedProducts', JSON.stringify(_this.recentUsedProducts));
|
|
845
901
|
// For apps in apiFirstApps list, redirect after timeout
|
|
846
902
|
if (apiFirstApps.includes(type)) {
|
|
847
903
|
_this.appSwitcherService.appSwitch(type, _this.kycStatus);
|
|
@@ -858,16 +914,137 @@
|
|
|
858
914
|
}
|
|
859
915
|
this.appSwitcherService.appSwitch(app.appName);
|
|
860
916
|
};
|
|
861
|
-
SwitcherComponent.prototype.
|
|
917
|
+
SwitcherComponent.prototype.loadRecentProductsData = function () {
|
|
918
|
+
// First, try to load from localStorage for immediate display
|
|
919
|
+
this.loadFromCache();
|
|
920
|
+
// Only fetch from API if we don't have cached data
|
|
921
|
+
if (this.recentUsedProducts.length === 0) {
|
|
922
|
+
// Show skeleton loader while fetching from API
|
|
923
|
+
this.shouldShowRecentSection = true;
|
|
924
|
+
this.isLoadingRecentProducts = true;
|
|
925
|
+
this.skeletonStartTime = Date.now(); // Track when skeleton started
|
|
926
|
+
// Debounce API calls to prevent rapid successive calls
|
|
927
|
+
this.debouncedFetchFromAPI();
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
// We have cached data, just mark as loaded
|
|
931
|
+
this.hasLoadedData = true;
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
SwitcherComponent.prototype.debouncedFetchFromAPI = function () {
|
|
862
935
|
var _this = this;
|
|
936
|
+
// Clear previous timeout
|
|
937
|
+
if (this.apiCallTimeout) {
|
|
938
|
+
clearTimeout(this.apiCallTimeout);
|
|
939
|
+
}
|
|
940
|
+
// Debounce API calls by 500ms to prevent rapid successive calls
|
|
941
|
+
this.apiCallTimeout = setTimeout(function () {
|
|
942
|
+
_this.fetchRecentProductsFromAPI();
|
|
943
|
+
}, 500);
|
|
944
|
+
};
|
|
945
|
+
SwitcherComponent.prototype.hideSkeletonWithMinDuration = function () {
|
|
946
|
+
var _this = this;
|
|
947
|
+
var elapsedTime = Date.now() - this.skeletonStartTime;
|
|
948
|
+
var remainingTime = Math.max(0, this.skeletonMinDuration - elapsedTime);
|
|
949
|
+
setTimeout(function () {
|
|
950
|
+
_this.isLoadingRecentProducts = false;
|
|
951
|
+
}, remainingTime);
|
|
952
|
+
};
|
|
953
|
+
SwitcherComponent.prototype.loadFromCache = function () {
|
|
954
|
+
// Check if we have recent products stored in localStorage from previous sessions
|
|
955
|
+
var storedRecentProducts = localStorage.getItem('recentUsedProducts');
|
|
956
|
+
if (storedRecentProducts) {
|
|
957
|
+
try {
|
|
958
|
+
var parsed = JSON.parse(storedRecentProducts);
|
|
959
|
+
if (parsed && parsed.length > 0) {
|
|
960
|
+
this.recentUsedProducts = parsed;
|
|
961
|
+
this.shouldShowRecentSection = true;
|
|
962
|
+
this.isLoadingRecentProducts = false;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
catch (e) {
|
|
966
|
+
// Invalid JSON, ignore
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
SwitcherComponent.prototype.checkForExistingRecentProducts = function () {
|
|
971
|
+
// Check if we have recent products stored in localStorage from previous sessions
|
|
972
|
+
var storedRecentProducts = localStorage.getItem('recentUsedProducts');
|
|
973
|
+
if (storedRecentProducts) {
|
|
974
|
+
try {
|
|
975
|
+
var parsed = JSON.parse(storedRecentProducts);
|
|
976
|
+
if (parsed && parsed.length > 0) {
|
|
977
|
+
this.shouldShowRecentSection = true;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
catch (e) {
|
|
981
|
+
// Invalid JSON, ignore
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
SwitcherComponent.prototype.onImageLoad = function (event) {
|
|
986
|
+
// Image loaded successfully
|
|
987
|
+
event.target.classList.remove('loading');
|
|
988
|
+
event.target.classList.add('loaded');
|
|
989
|
+
// Remove loading animation from container
|
|
990
|
+
var container = event.target.closest('.image-container');
|
|
991
|
+
if (container) {
|
|
992
|
+
container.style.background = 'none';
|
|
993
|
+
container.style.animation = 'none';
|
|
994
|
+
}
|
|
995
|
+
};
|
|
996
|
+
SwitcherComponent.prototype.onImageError = function (event) {
|
|
997
|
+
// Image failed to load, show placeholder or default
|
|
998
|
+
event.target.classList.remove('loading');
|
|
999
|
+
event.target.classList.add('loaded');
|
|
1000
|
+
// Remove loading animation from container
|
|
1001
|
+
var container = event.target.closest('.image-container');
|
|
1002
|
+
if (container) {
|
|
1003
|
+
container.style.background = 'none';
|
|
1004
|
+
container.style.animation = 'none';
|
|
1005
|
+
}
|
|
1006
|
+
// You can set a default image here if needed
|
|
1007
|
+
// event.target.src = 'path/to/default-image.png';
|
|
1008
|
+
};
|
|
1009
|
+
SwitcherComponent.prototype.fetchRecentProductsFromAPI = function () {
|
|
1010
|
+
var _this = this;
|
|
1011
|
+
// CRITICAL: Only allow API calls when modal has been explicitly opened
|
|
1012
|
+
if (!this.modalHasBeenOpened) {
|
|
1013
|
+
console.warn('API call blocked: Modal has not been opened yet');
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
// Prevent duplicate API calls
|
|
1017
|
+
if (this.isApiCallInProgress || this.hasLoadedData) {
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
// Check if token is valid before making API call
|
|
1021
|
+
if (!this.isTokenValid()) {
|
|
1022
|
+
console.warn('Invalid or expired JWT token, skipping API call');
|
|
1023
|
+
this.isLoadingRecentProducts = false;
|
|
1024
|
+
this.hasLoadedData = true;
|
|
1025
|
+
this.shouldShowRecentSection = false;
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
// Check retry limit
|
|
1029
|
+
if (this.apiRetryCount >= 3) {
|
|
1030
|
+
console.log('Max API retries reached, stopping API calls');
|
|
1031
|
+
this.isLoadingRecentProducts = false;
|
|
1032
|
+
this.hasLoadedData = true;
|
|
1033
|
+
this.shouldShowRecentSection = false;
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
this.isApiCallInProgress = true;
|
|
1037
|
+
// Loading state is already set in loadRecentProductsData() if needed
|
|
863
1038
|
var headers = {
|
|
864
1039
|
'Content-Type': 'application/json',
|
|
865
1040
|
'Authorization': 'Bearer ' + this.userData.token
|
|
866
1041
|
};
|
|
867
1042
|
this._http.get(this.getBaseUrl() + "settings/company-service", { headers: headers }).subscribe(function (res) {
|
|
1043
|
+
// Success - reset retry count
|
|
1044
|
+
_this.apiRetryCount = 0;
|
|
868
1045
|
_this.appSwitchList = res.data;
|
|
869
1046
|
// Map the API response to recentUsedProducts
|
|
870
|
-
|
|
1047
|
+
var newRecentProducts = res.data.map(function (item) {
|
|
871
1048
|
// Search for matching app across all categories
|
|
872
1049
|
var matchedApp;
|
|
873
1050
|
Object.values(_this.appSwitcherApps).forEach(function (category) {
|
|
@@ -884,12 +1061,54 @@
|
|
|
884
1061
|
displayName: matchedApp.displayName
|
|
885
1062
|
} : null;
|
|
886
1063
|
}).filter(function (item) { return item !== null; });
|
|
1064
|
+
// Only update if we have new data or no cached data
|
|
1065
|
+
if (newRecentProducts.length > 0 || _this.recentUsedProducts.length === 0) {
|
|
1066
|
+
_this.recentUsedProducts = newRecentProducts;
|
|
1067
|
+
_this.shouldShowRecentSection = _this.recentUsedProducts && _this.recentUsedProducts.length > 0;
|
|
1068
|
+
// Store recent products in localStorage for future reference
|
|
1069
|
+
if (_this.shouldShowRecentSection) {
|
|
1070
|
+
localStorage.setItem('recentUsedProducts', JSON.stringify(_this.recentUsedProducts));
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
localStorage.removeItem('recentUsedProducts');
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
// Hide skeleton with minimum duration to prevent flicker
|
|
1077
|
+
_this.hideSkeletonWithMinDuration();
|
|
1078
|
+
_this.hasLoadedData = true;
|
|
1079
|
+
_this.isApiCallInProgress = false;
|
|
1080
|
+
}, function (error) {
|
|
1081
|
+
// Increment retry count
|
|
1082
|
+
_this.apiRetryCount++;
|
|
1083
|
+
console.warn("API call failed (attempt " + _this.apiRetryCount + "/3):", error);
|
|
1084
|
+
// If 403 error, don't retry immediately
|
|
1085
|
+
if (error.status === 403) {
|
|
1086
|
+
console.log('403 Forbidden - stopping retries immediately');
|
|
1087
|
+
_this.apiRetryCount = 3; // Max out retries
|
|
1088
|
+
}
|
|
1089
|
+
// Hide skeleton with minimum duration even on error
|
|
1090
|
+
_this.hideSkeletonWithMinDuration();
|
|
1091
|
+
_this.hasLoadedData = true;
|
|
1092
|
+
_this.isApiCallInProgress = false;
|
|
1093
|
+
// Don't change shouldShowRecentSection if we have cached data
|
|
1094
|
+
if (_this.recentUsedProducts.length === 0) {
|
|
1095
|
+
_this.shouldShowRecentSection = false;
|
|
1096
|
+
}
|
|
887
1097
|
});
|
|
888
1098
|
};
|
|
1099
|
+
SwitcherComponent.prototype.getCompanyService = function () {
|
|
1100
|
+
// This method is kept for backward compatibility but only calls API if modal has been opened
|
|
1101
|
+
if (this.modalHasBeenOpened) {
|
|
1102
|
+
this.fetchRecentProductsFromAPI();
|
|
1103
|
+
}
|
|
1104
|
+
else {
|
|
1105
|
+
console.warn('getCompanyService() blocked: Modal has not been opened yet');
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
889
1108
|
return SwitcherComponent;
|
|
890
1109
|
}());
|
|
891
1110
|
SwitcherComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SwitcherComponent, deps: [{ token: AppSwitcherService }, { token: i2__namespace.HttpClient }, { token: WindowRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
892
|
-
SwitcherComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SwitcherComponent, selector: "lib-switcher", inputs: { data: "data" }, ngImport: i0__namespace, template: "<div class=\"\" [style.display]=\"!isMobileView ? 'block' : 'none'\">\n <button class=\"appSwitcherBtn\" style=\"padding: 0 !important; margin-right: .5em !important;\" (click)=\"openModal('desktop')\" *ngIf=\"userData.allow_checkout || userData.allow_engage || userData.allow_fbs || !userData.allow_fbs\">\n <div class=\"appSwitcherTxt\" style=\"display: flex; align-items: center;\">\n <span>ALL PRODUCTS</span>\n <img style=\"top: -1px; width: 15px; position: relative; margin-left: 4px;\" src=\"https://sr-sidebar.shiprocket.in/assets/svg/apps.svg\" />\n </div>\n </button>\n</div>\n\n<div [style.display]=\"isMobileView ? 'block' : 'none'\">\n <button\n (click)=\"openModal('mobile')\"\n class=\"switcher_icon\"\n >\n <img\n src=\"https://sr-sidebar.shiprocket.in/assets/svg/apps.svg\"\n alt=\"apps\"\n class=\"logo\"\n />\n </button>\n</div>\n\n<div *ngIf=\"isModalOpen\" class=\"modal\" [@modalAnimation]>\n <div class=\"modal-content_new\">\n <span class=\"close\" (click)=\"closeModal()\"><img src=\"https://sr-sidebar.shiprocket.in/assets/svg/cross-dark.svg\" /></span>\n \n <!-- ------------------------------------------------------------------------------------------------- -->\n\n\n <div class=\"mobileScreen\" [style.display]=\"!isMobileView ? 'block' : 'none'\">\n\n\n <div class=\"Topheader\">\n <h1>Select the product you would like to experience </h1>\n <p>Elevate your business with our industry-leading products.</p>\n </div>\n\n\n <ng-container *ngIf=\"recentUsedProducts && recentUsedProducts.length\">\n <h5 class=\"section_heading\">Recently Used Products</h5>\n <div class=\"d-flex gap-4 flex-wrap\">\n <div class=\"box_section featured_section mob_box_section h-195px\" (click)=\"appSwitch(item, 'recentUsedProduct')\" *ngFor=\"let item of recentUsedProducts; let i = index\">\n <img class=\"icon\" [src]=\"item.appLogo\" />\n <h6>{{item.displayName}}</h6>\n <span class=\"getstarted mob_getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\" /></span>\n </div>\n </div>\n </ng-container>\n\n\n <!-- <ng-container *ngIf=\"appSwitchList && appSwitchList.length\">\n <h5 class=\"section_heading\">Featured Products</h5>\n <div class=\"d-flex gap-4 flex-wrap\">\n <div class=\"box_section featured_section mob_box_section\" (click)=\"appSwitch(item.appName)\" *ngFor=\"let item of appSwitchList; let i = index\">\n <img class=\"icon\" [src]=\"item.appLogo\" />\n <h6>{{item.displayName}}</h6>\n <span class=\"getstarted mob_getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\" /></span>\n </div>\n </div>\n </ng-container> -->\n \n <!-- ------------------------------------------------------------------------------------------------- -->\n \n\n\n \n <h5 class=\"section_heading\">Shipping & Fulfilment in India</h5>\n <div class=\"d-flex flex-wrap gap-4\" >\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.shipping_fulfilment_india\" (click)=\"callEvent(app.appName, app.displayName)\">\n <img class=\"icon\" [src]=\"app.appLogo\"/>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n \n \n \n <h5 class=\"section_heading\">Cross Border Commerce</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.cross_border_commerce\" (click)=\"callEvent(app.appName, app.displayName)\">\n <img class=\"icon\" [src]=\"app.appLogo\"/>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n \n </div>\n \n \n \n <h5 class=\"section_heading\">Growth & Marketing Solutions</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.growth_marketing_solutions\" (click)=\"callEvent(app.appName, app.displayName)\">\n <img class=\"icon\" [src]=\"app.appLogo\"/>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}} <span *ngIf=\"app.nextLineLabel\"><br>{{app.nextLineLabel}} </span></p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n \n \n <h5 class=\"section_heading\">Financial Services</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.financial_servicea\" (click)=\"callEvent(app.appName, app.displayName)\">\n <span class=\"newtag\" *ngIf=\"app.appName === 'capital' || (app.appName === 'creditScore' && userData.is_crif_enabled)\"><em>New</em></span>\n <span class=\"newtag\" *ngIf=\"app.appName === 'creditScore' && !userData.is_crif_enabled\"><em>Coming Soon</em></span>\n <img class=\"icon\" [src]=\"app.appLogo\"/>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n <h5 class=\"section_heading\">Other services</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section other_ser\" *ngFor=\"let app of appSwitcherApps.other_services\" (click)=\"callEvent(app.appName, app.displayName)\">\n <img class=\"icon\" src=\"https://sr-cdn-1.shiprocket.in/img/Web_New/Omnichannel.png\"/>\n <h6>Omnichannel</h6>\n <p style=\"text-wrap: wrap;\">Manage all sales channels - online + offline at one place</p>\n <span class=\"getstarted\" style=\"bottom: 5px;\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n </div>\n\n <div class=\"mobileScreen_new\" [style.display]=\"isMobileView ? 'block' : 'none'\">\n <div class=\"mobile-container\">\n <!-- Header Section -->\n <div class=\"mobile-header\">\n <h2 class=\"welcome-text\">Hi {{userJson?.first_name || 'User'}}</h2>\n <p class=\"subtitle\">Power your business with our industry-leading products.</p>\n </div>\n\n <!-- Products Grid -->\n <div class=\"products-section\">\n <h3 class=\"section-title\">Shipping</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card product_card_shadow\"\n *ngFor=\"let product of mobile_appSwitcherApps.india_logistics_platform; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Cross Border</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.cross_border_commerce; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Marketing</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.growth_marketing_solutions; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Financing</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.financial_servicea; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Our Core Strengths</h3>\n <div class=\"strength-container\">\n <div class=\"strength-scroll\">\n <ng-container >\n <div class=\"strength-card\"\n *ngFor=\"let image of coreStrengthImages; let i = index\">\n <img [src]=\"image.imgSrc\" [alt]=\"image.altText\">\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n</div> ", styles: ["@import\"https://fonts.cdnfonts.com/css/sf-pro-display\";@import\"https://fonts.cdnfonts.com/css/twk-lausanne\";.modal{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000;display:flex;justify-content:center;align-items:center}.modal-content_new{position:relative;width:100%;height:100%;background-color:#f7f5fb;overflow-y:scroll}.h-195px{height:195px!important}.close{position:absolute;top:10px;right:10px;font-size:24px;cursor:pointer;z-index:1001;padding:0 10px}::ng-deep .ad-padding-b{min-height:0!important}.d-flex{display:flex;flex-wrap:wrap}.gap-4{grid-gap:16px;gap:16px}.mobileScreen{background:#F7F5FB;padding:80px;background-image:url(https://sr-cdn-1.shiprocket.in/img/Web/Bg-Pattern.svg);background-repeat:no-repeat;background-size:contain;background-position:top right}.mobileScreen_new{background:#F7F5FB;padding:20px;background-image:url(https://sr-cdn-1.shiprocket.in/img/BG.svg);background-repeat:no-repeat;background-size:cover;background-position:top right}.Topheader{margin-bottom:35px}.Topheader h1{color:#1d1d1d;font-size:36px!important;line-height:32px!important;letter-spacing:-.48px;margin-top:0;font-family:\"SF Pro Display\",sans-serif;font-weight:500}.Topheader h1 span{color:#745be7}.Topheader p{color:#757575;font-size:18px;line-height:normal;margin-top:10px}.section_heading{color:#676767;font-size:20px!important;text-transform:uppercase;margin-bottom:0;margin-top:60px}.featured_section{width:225px!important}.box_section{height:242px;padding:12px;border-radius:16px;background:#FBFBFB;box-shadow:0 5px 20px #1b1f440d;cursor:pointer;margin-top:16px;margin-bottom:0;position:relative;width:268px}.box_section img.icon{width:100%;border-radius:10px}.box_section h6{color:#1d1d1d;font-size:18px!important;margin-top:14px;font-family:\"SF Pro Display\",sans-serif;font-weight:500;margin-bottom:8px;text-transform:capitalize;line-height:22px!important;text-wrap:wrap}.box_section p{color:#828488;font-size:14px;line-height:18px;margin-bottom:0;font-family:\"SF Pro Display\",sans-serif;font-weight:400}.box_section span.getstarted{color:#745be7;font-size:16px;position:absolute;bottom:18px;font-family:\"SF Pro Display\",sans-serif;font-weight:500}.box_section span img{margin-left:5px}.box_section .newtag{position:absolute;right:5px;padding:3px 8px 1px;background:#DDFFE8;top:5px;border-radius:30px}.box_section .newtag em{position:relative;border-radius:4px;padding:1px 8px;color:#3fc06a;font-size:10px;top:-1px;font-style:normal;text-align:center;width:100%;display:block;left:0px;line-height:20px}.appSwitcherBtn{border-radius:4px;border:0;cursor:pointer;line-height:12px;color:#1d1d1d;font-size:12px;background:linear-gradient(169deg,#12c2e999 40.8%,#12c2e999 45%,#c471ed99 60%);font-weight:400;transition:background-color .3s}.appSwitcherBtn:hover{background-color:#fff}.appSwitcherTxt{background:linear-gradient(150.38deg,#fefefe -5.2%,#e7f9fd 7.94%,#f9f1fd 40.98%);padding:8px 12px 6px;border-radius:4px;margin:1px;transition:background-color .5s}.appSwitcherTxt:hover{background-color:#f9f8fe!important}.appSwitcherTxt:hover{background-color:#f9f8fe!important;transition:.5s}@media only screen and (max-width:362px){.box_section h6{font-size:12px!important}.box_section p,.box_section span.getstarted{font-size:11px}}@media (min-width: 768px) and (max-width: 1059px){.box_section h6{font-size:16px!important}.box_section p{font-size:13px!important}.box_section{height:206px!important;width:188px!important}.box_section span.getstarted{font-size:12px!important}.section_heading{font-size:16px!important}}@media (max-width: 767px){.h-195px{height:142px!important}.mob_box_section.h-195px{min-height:142px!important}.mob_box_section.h-195px h6{min-height:auto!important}.mob_box_section{width:100%!important;padding:12px!important;border-radius:16px!important;background:#FBFBFB!important;box-shadow:0 5px 20px #1b1f440d!important;cursor:pointer!important;margin-top:16px!important;margin-bottom:0!important;position:relative!important;line-height:18px!important;min-height:160px!important}.mob_box_section img.mob_icon{width:100%!important;border-radius:6px!important}.mob_box_section h6{color:#1b1f44!important;font-size:14px!important;margin-top:10px!important;font-family:\"SF Pro Display\",sans-serif!important;margin-bottom:5px!important;text-transform:capitalize!important;min-height:34px!important;font-weight:500!important;line-height:20px!important}.mob_getstarted{color:#745be7!important}.switcher_icon{border:none;background:#fff;position:relative;top:0px;box-shadow:0 -1px 4px #0000000f;padding:11px 7px}.mobileScreen{padding:20px;background-size:auto}.box_section{flex:0 0 calc(50% - 16px);box-sizing:border-box}.box_section span.getstarted{bottom:10px;font-size:14px}.box_section{padding:10px;margin-top:0;height:auto}.box_section h6{font-size:14px;margin-top:10px}.box_section p{font-size:12px;line-height:1.3;max-height:70px;min-height:55px}.other_ser p{min-height:65px!important}.box_section .icon{height:auto}.getstarted{font-size:12px}.Topheader h1{font-size:25px!important;line-height:30px!important}.Topheader p{font-size:14px}.section_heading{font-size:16px!important;margin:45px 0 10px}}.mobile-container{min-height:100vh;font-family:\"TWK Lausanne\",sans-serif}.mobile-header{margin-bottom:24px}.welcome-text{font-size:22px!important;margin-bottom:8px;font-weight:600;text-transform:capitalize;margin-top:10px}.subtitle{font-size:14px;color:#888;line-height:1.4}.section-title{font-size:18px;margin:24px 0 16px;text-transform:capitalize;color:#191919;font-weight:600}.products-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-gap:16px;gap:16px;margin-bottom:30px}.product-card{background:#fff;border-radius:12px;padding:15px 10px;display:flex;flex-direction:column;align-items:center;grid-gap:8px;gap:8px;cursor:pointer;box-shadow:0 0 20px #1b1f440d}.product_card_shadow{box-shadow:0 0 20px #0a0b111a!important}@keyframes slideDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.product-card.show{animation-play-state:running}.product-card:active{transform:scale(.98)}.product-card.ng-enter{opacity:0;transform:translateY(-20px)}.product-card.ng-enter-active{opacity:1;transform:translateY(0)}.icon-circle{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center}.icon-circle img{width:50px;height:50px}.product-name{font-size:12px;color:#333;text-align:center;font-weight:600;display:inline-block;white-space:nowrap;margin-top:5px;font-family:\"TWK Lausanne\",sans-serif}.recharge-banner{background:linear-gradient(45deg,#745BE7,#12C2E9);border-radius:16px;padding:20px;margin:24px 0;position:relative;overflow:hidden}.banner-content{display:flex;justify-content:space-between;align-items:center;z-index:1;position:relative}.banner-text h3{font-size:16px;margin-bottom:4px;color:#fff}.banner-text h2{font-size:24px;color:#4ade80;margin:0}.recharge-btn{background:#4ADE80;color:#000;border:none;padding:8px 16px;border-radius:8px;font-weight:500;cursor:pointer;transition:background-color .2s}.recharge-btn:hover{background:#22C55E}.wallet-image{position:absolute;right:-20px;bottom:-20px;width:120px;opacity:.8}.pagination-dots{display:flex;justify-content:center;align-items:center;grid-gap:4px;gap:4px;margin-top:16px;position:relative}.dot{height:4px;width:16px;background:rgba(115,91,231,.3);cursor:pointer;transition:all .3s ease;border-radius:2px}.dot.active{background:#745BE7;position:relative}.dot.active:after{content:\"\";position:absolute;bottom:-4px;left:50%;transform:translate(-50%);width:4px;height:4px;background:#745BE7;border-radius:50%}@media (min-width: 361px) and (max-width: 380px){.product-card{min-width:70px;width:100%;padding:10px}}@media (max-width: 360px){.product-card{min-width:60px;width:100%;padding:10px}.product-name{font-size:12px;margin-top:5px}.mobile-container{padding:0}.welcome-text{font-size:22px}.subtitle{font-size:13px}.icon-circle{width:40px;height:40px}.icon-circle img{width:40px;height:40px}}@media (max-width: 767px){.products-grid{grid-gap:12px;gap:12px}.recharge-banner{padding:16px}.banner-text h2{font-size:20px}.recharge-btn{padding:6px 12px;font-size:14px}}.strength-container{width:100%;overflow:hidden;position:relative;padding:0;margin-bottom:50px}.strength-scroll{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;grid-gap:16px;gap:16px;padding:0 16px;scrollbar-width:none;-ms-overflow-style:none}.strength-scroll::-webkit-scrollbar{display:none}.strength-card{flex:0 0 220px;scroll-snap-align:start;border-radius:12px;overflow:hidden}.strength-card img{width:100%;height:auto;display:block;object-fit:cover}@media (hover: none){.strength-scroll{touch-action:pan-x}}.mobile-container{font-family:\"TWK Lausanne\",sans-serif}.mobile-header .welcome-text,.mobile-header .subtitle,.section-title,.product-name{font-family:\"TWK Lausanne\",sans-serif}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]" }], animations: [
|
|
1111
|
+
SwitcherComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SwitcherComponent, selector: "lib-switcher", inputs: { data: "data" }, ngImport: i0__namespace, template: "<div class=\"\" [style.display]=\"!isMobileView ? 'block' : 'none'\">\n <button class=\"appSwitcherBtn\" style=\"padding: 0 !important; margin-right: .5em !important;\" (click)=\"openModal('desktop')\" *ngIf=\"userData.allow_checkout || userData.allow_engage || userData.allow_fbs || !userData.allow_fbs\">\n <div class=\"appSwitcherTxt\" style=\"display: flex; align-items: center;\">\n <span>ALL PRODUCTS</span>\n <img style=\"top: -1px; width: 15px; position: relative; margin-left: 4px;\" src=\"https://sr-sidebar.shiprocket.in/assets/svg/apps.svg\" />\n </div>\n </button>\n</div>\n\n<div [style.display]=\"isMobileView ? 'block' : 'none'\">\n <button\n (click)=\"openModal('mobile')\"\n class=\"switcher_icon\"\n >\n <img\n src=\"https://sr-sidebar.shiprocket.in/assets/svg/apps.svg\"\n alt=\"apps\"\n class=\"logo\"\n />\n </button>\n</div>\n\n<div *ngIf=\"isModalOpen\" class=\"modal\" [@modalAnimation]>\n <div class=\"modal-content_new\">\n <span class=\"close\" (click)=\"closeModal()\"><img src=\"https://sr-sidebar.shiprocket.in/assets/svg/cross-dark.svg\" /></span>\n \n <!-- ------------------------------------------------------------------------------------------------- -->\n\n\n <div class=\"mobileScreen\" [style.display]=\"!isMobileView ? 'block' : 'none'\">\n\n\n <div class=\"Topheader\">\n <h1 class=\"sfpro-bold\">Select the product you would like to experience </h1>\n <p>Elevate your business with our industry-leading products.</p>\n </div>\n\n\n <!-- Loading skeleton for recently used products - only show if we expect to have data -->\n <ng-container *ngIf=\"isLoadingRecentProducts && shouldShowRecentSection\">\n <h5 class=\"section_heading\">Recently Used Products</h5>\n <div class=\"d-flex gap-4 flex-wrap\">\n <div class=\"box_section featured_section mob_box_section h-195px\" *ngFor=\"let i of [1,2,3,4]\">\n <div class=\"skeleton-loader\">\n <div class=\"skeleton-icon featured-skeleton-icon\"></div>\n <div class=\"skeleton-text\"></div>\n <div class=\"skeleton-button\"></div>\n </div>\n </div>\n </div>\n </ng-container>\n\n <!-- Show recent products only when loaded and have data -->\n <ng-container *ngIf=\"!isLoadingRecentProducts && recentUsedProducts && recentUsedProducts.length\">\n <h5 class=\"section_heading\">Recently Used Products</h5>\n <div class=\"d-flex gap-4 flex-wrap\">\n <div class=\"box_section featured_section mob_box_section h-195px\" (click)=\"appSwitch(item, 'recentUsedProduct')\" *ngFor=\"let item of recentUsedProducts; let i = index\">\n <div class=\"image-container featured-image-container\">\n <img class=\"icon h-95px\" [src]=\"item.appLogo\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\" />\n </div>\n <h6>{{item.displayName}}</h6>\n <span class=\"getstarted mob_getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\" /></span>\n </div>\n </div>\n </ng-container>\n\n <!-- No recent products message (optional - only show if you want to inform users) -->\n <!-- <ng-container *ngIf=\"!isLoadingRecentProducts && (!recentUsedProducts || recentUsedProducts.length === 0)\">\n <h5 class=\"section_heading\">Recently Used Products</h5>\n <div class=\"no-recent-products\">\n <p>No recently used products found. Start using our services to see them here!</p>\n </div>\n </ng-container> -->\n\n\n <!-- <ng-container *ngIf=\"appSwitchList && appSwitchList.length\">\n <h5 class=\"section_heading\">Featured Products</h5>\n <div class=\"d-flex gap-4 flex-wrap\">\n <div class=\"box_section featured_section mob_box_section\" (click)=\"appSwitch(item.appName)\" *ngFor=\"let item of appSwitchList; let i = index\">\n <img class=\"icon\" [src]=\"item.appLogo\" />\n <h6>{{item.displayName}}</h6>\n <span class=\"getstarted mob_getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\" /></span>\n </div>\n </div>\n </ng-container> -->\n \n <!-- ------------------------------------------------------------------------------------------------- -->\n \n\n\n \n <h5 class=\"section_heading\">Shipping & Fulfilment in India</h5>\n <div class=\"d-flex flex-wrap gap-4\" >\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.shipping_fulfilment_india\" (click)=\"callEvent(app.appName, app.displayName)\">\n <div class=\"image-container\">\n <img class=\"icon\" [src]=\"app.appLogo\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\"/>\n </div>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n \n \n \n <h5 class=\"section_heading\">Cross Border Commerce</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.cross_border_commerce\" (click)=\"callEvent(app.appName, app.displayName)\">\n <div class=\"image-container\">\n <img class=\"icon\" [src]=\"app.appLogo\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\"/>\n </div>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n \n </div>\n \n \n \n <h5 class=\"section_heading\">Growth & Marketing Solutions</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.growth_marketing_solutions\" (click)=\"callEvent(app.appName, app.displayName)\">\n <div class=\"image-container\">\n <img class=\"icon\" [src]=\"app.appLogo\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\"/>\n </div>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}} <span *ngIf=\"app.nextLineLabel\"><br>{{app.nextLineLabel}} </span></p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n \n \n <h5 class=\"section_heading\">Financial Services</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section\" *ngFor=\"let app of appSwitcherApps.financial_servicea\" (click)=\"callEvent(app.appName, app.displayName)\">\n <span class=\"newtag\" *ngIf=\"app.appName === 'capital' || (app.appName === 'creditScore' && userData.is_crif_enabled)\"><em>New</em></span>\n <span class=\"newtag\" *ngIf=\"app.appName === 'creditScore' && !userData.is_crif_enabled\"><em>Coming Soon</em></span>\n <div class=\"image-container\">\n <img class=\"icon\" [src]=\"app.appLogo\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\"/>\n </div>\n <h6>{{app.displayName}}</h6>\n <p>{{app.subText}}</p>\n <span class=\"getstarted\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n <h5 class=\"section_heading\">Other services</h5>\n <div class=\"d-flex flex-wrap gap-4\">\n <div class=\"box_section other_ser\" *ngFor=\"let app of appSwitcherApps.other_services\" (click)=\"callEvent(app.appName, app.displayName)\">\n <div class=\"image-container\">\n <img class=\"icon\" src=\"https://sr-cdn-1.shiprocket.in/img/Web_New/Omnichannel.png\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\"/>\n </div>\n <h6>Omnichannel</h6>\n <p style=\"text-wrap: wrap;\">Manage all sales channels - online + offline at one place</p>\n <span class=\"getstarted\" style=\"bottom: 5px;\">Get Started <img src=\"https://app.shiprocket.in/seller/assets/images/arrow-small-left.svg\"/></span>\n </div>\n </div>\n </div>\n\n <div class=\"mobileScreen_new\" [style.display]=\"isMobileView ? 'block' : 'none'\">\n <div class=\"mobile-container\">\n <!-- Header Section -->\n <div class=\"mobile-header\">\n <h2 class=\"welcome-text\">Hi {{userJson?.first_name || 'User'}}</h2>\n <p class=\"subtitle\">Power your business with our industry-leading products.</p>\n </div>\n\n <!-- Products Grid -->\n <div class=\"products-section\">\n <h3 class=\"section-title\">Shipping</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card product_card_shadow\"\n *ngFor=\"let product of mobile_appSwitcherApps.india_logistics_platform; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Cross Border</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.cross_border_commerce; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Marketing</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.growth_marketing_solutions; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Financing</h3>\n <div class=\"products-grid\">\n <ng-container >\n <div class=\"product-card\"\n *ngFor=\"let product of mobile_appSwitcherApps.financial_servicea; let i = index\" \n (click)=\"appSwitch(product, 'mobileProductSelection')\">\n <div class=\"icon-circle\">\n <img [src]=\"product.appLogo\" [alt]=\"product.displayName\" (load)=\"onImageLoad($event)\" (error)=\"onImageError($event)\">\n </div>\n <span class=\"product-name\">{{product.displayName}}</span>\n </div>\n </ng-container>\n </div>\n\n <h3 class=\"section-title\">Our Core Strengths</h3>\n <div class=\"strength-container\">\n <div class=\"strength-scroll\">\n <ng-container >\n <div class=\"strength-card\"\n *ngFor=\"let image of coreStrengthImages; let i = index\">\n <img [src]=\"image.imgSrc\" [alt]=\"image.altText\">\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n</div> ", styles: ["@import\"https://fonts.cdnfonts.com/css/sf-pro-display\";@import\"https://fonts.cdnfonts.com/css/twk-lausanne\";.modal{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:1000;display:flex;justify-content:center;align-items:center}.modal-content_new{position:relative;width:100%;height:100%;background-color:#f7f5fb;overflow-y:scroll}.h-195px{height:195px!important}.h-180px{height:180px!important}.h-95px{height:95px!important}.skeleton-loader{display:flex;flex-direction:column;height:100%;padding:12px}.skeleton-icon{width:100%;height:80px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:loading 1.5s infinite;border-radius:10px;margin-bottom:14px}.featured-skeleton-icon{height:95px}.skeleton-text{width:80%;height:22px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:loading 1.5s infinite;border-radius:4px;margin-bottom:8px}.skeleton-button{width:120px;height:16px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:loading 1.5s infinite;border-radius:4px;position:absolute;bottom:18px}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.close{position:absolute;top:10px;right:10px;font-size:24px;cursor:pointer;z-index:1001;padding:0 10px}::ng-deep .ad-padding-b{min-height:0!important}.d-flex{display:flex;flex-wrap:wrap}.gap-4{grid-gap:16px;gap:16px}.mobileScreen{background:#F7F5FB;padding:80px;background-image:url(https://sr-cdn-1.shiprocket.in/img/Web/Bg-Pattern.svg);background-repeat:no-repeat;background-size:contain;background-position:top right}.mobileScreen_new{background:#F7F5FB;padding:20px;background-image:url(https://sr-cdn-1.shiprocket.in/img/BG.svg);background-repeat:no-repeat;background-size:cover;background-position:top right}.Topheader{margin-bottom:35px}.Topheader h1{color:#1d1d1d;font-size:36px!important;line-height:32px!important;letter-spacing:-.48px;margin-top:0;font-weight:500}.Topheader h1 span{color:#745be7}.Topheader p{color:#757575;font-size:18px;line-height:normal;margin-top:10px}.section_heading{color:#676767;font-size:20px!important;text-transform:uppercase;margin-bottom:0;margin-top:60px}.featured_section{width:225px!important}.box_section{height:242px;padding:12px;border-radius:16px;background:#FBFBFB;box-shadow:0 5px 20px #1b1f440d;cursor:pointer;margin-top:16px;margin-bottom:0;position:relative;width:268px}.box_section img.icon{width:100%;height:120px;object-fit:cover;border-radius:10px}.image-container{width:100%;height:120px;position:relative;border-radius:10px;overflow:hidden;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:loading 1.5s infinite}.image-container img{width:100%;height:120px;object-fit:cover;border-radius:10px}.image-container img.loaded{background:none;animation:none}.featured-image-container{width:100%;height:95px;position:relative;border-radius:10px;overflow:hidden;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:loading 1.5s infinite}.featured-image-container img{width:100%;height:95px;object-fit:cover;border-radius:10px}.featured-image-container img.loaded{background:none;animation:none}.box_section h6{color:#1d1d1d;font-size:18px!important;margin-top:14px;font-weight:500;font-family:\"SFProDisplay-Regular\";margin-bottom:3px;text-transform:capitalize;line-height:22px!important;text-wrap:wrap}.box_section p{color:#828488;font-size:14px;line-height:18px;margin-bottom:0;font-family:\"SFProDisplay-Regular\";font-weight:400;margin-top:0}.box_section span.getstarted{color:#745be7;font-size:16px;position:absolute;bottom:18px;font-family:\"SFProDisplay-Medium\";font-weight:500}.box_section span img{margin-left:5px}.box_section .newtag{position:absolute;right:5px;padding:3px 8px 1px;background:#DDFFE8;top:5px;border-radius:30px}.box_section .newtag em{position:relative;border-radius:4px;padding:1px 8px;color:#3fc06a;font-size:10px;top:-1px;font-style:normal;text-align:center;width:100%;display:block;left:0px;line-height:20px}.appSwitcherBtn{border-radius:4px;border:0;cursor:pointer;line-height:12px;color:#1d1d1d;font-size:12px;background:linear-gradient(169deg,#12c2e999 40.8%,#12c2e999 45%,#c471ed99 60%);font-weight:400;transition:background-color .3s}.appSwitcherBtn:hover{background-color:#fff}.appSwitcherTxt{background:linear-gradient(150.38deg,#fefefe -5.2%,#e7f9fd 7.94%,#f9f1fd 40.98%);padding:8px 12px 6px;border-radius:4px;margin:1px;transition:background-color .5s}.appSwitcherTxt:hover{background-color:#f9f8fe!important}.appSwitcherTxt:hover{background-color:#f9f8fe!important;transition:.5s}@media only screen and (max-width:362px){.box_section h6{font-size:12px!important}.box_section p,.box_section span.getstarted{font-size:11px}}@media (min-width: 768px) and (max-width: 1059px){.box_section h6{font-size:16px!important}.box_section p{font-size:13px!important}.box_section span.getstarted{font-size:12px!important}.section_heading{font-size:16px!important}}@media (max-width: 767px){.h-195px{height:142px!important}.mob_box_section.h-195px{min-height:142px!important}.mob_box_section.h-195px h6{min-height:auto!important}.mob_box_section{width:100%!important;padding:12px!important;border-radius:16px!important;background:#FBFBFB!important;box-shadow:0 5px 20px #1b1f440d!important;cursor:pointer!important;margin-top:16px!important;margin-bottom:0!important;position:relative!important;line-height:18px!important;min-height:160px!important}.mob_box_section img.mob_icon{width:100%!important;border-radius:6px!important}.mob_box_section h6{color:#1b1f44!important;font-size:14px!important;margin-top:10px!important;font-family:\"SF Pro Display\",sans-serif!important;margin-bottom:5px!important;text-transform:capitalize!important;min-height:34px!important;font-weight:500!important;line-height:20px!important}.mob_getstarted{color:#745be7!important}.switcher_icon{border:none;background:#fff;position:relative;top:0px;box-shadow:0 -1px 4px #0000000f;padding:11px 7px}.mobileScreen{padding:20px;background-size:auto}.box_section{flex:0 0 calc(50% - 16px);box-sizing:border-box}.box_section span.getstarted{bottom:10px;font-size:14px}.box_section{padding:10px;margin-top:0;height:auto}.box_section h6{font-size:14px;margin-top:10px}.box_section p{font-size:12px;line-height:1.3;max-height:70px;min-height:55px}.other_ser p{min-height:65px!important}.box_section .icon{height:auto}.getstarted{font-size:12px}.Topheader h1{font-size:25px!important;line-height:30px!important}.Topheader p{font-size:14px}.section_heading{font-size:16px!important;margin:45px 0 10px}}.mobile-container{min-height:100vh;font-family:\"TWK Lausanne\",sans-serif}.mobile-header{margin-bottom:24px}.welcome-text{font-size:22px!important;margin-bottom:8px;font-weight:600;text-transform:capitalize;margin-top:10px}.subtitle{font-size:14px;color:#888;line-height:1.4}.section-title{font-size:18px;margin:24px 0 16px;text-transform:capitalize;color:#191919;font-weight:600}.products-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-gap:16px;gap:16px;margin-bottom:30px}.product-card{background:#fff;border-radius:12px;padding:15px 10px;display:flex;flex-direction:column;align-items:center;grid-gap:8px;gap:8px;cursor:pointer;box-shadow:0 0 20px #1b1f440d}.product_card_shadow{box-shadow:0 0 20px #0a0b111a!important}@keyframes slideDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.product-card.show{animation-play-state:running}.product-card:active{transform:scale(.98)}.product-card.ng-enter{opacity:0;transform:translateY(-20px)}.product-card.ng-enter-active{opacity:1;transform:translateY(0)}.icon-circle{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center}.icon-circle img{width:50px;height:50px}.product-name{font-size:12px;color:#333;text-align:center;font-weight:600;display:inline-block;white-space:nowrap;margin-top:5px;font-family:\"TWK Lausanne\",sans-serif}.recharge-banner{background:linear-gradient(45deg,#745BE7,#12C2E9);border-radius:16px;padding:20px;margin:24px 0;position:relative;overflow:hidden}.banner-content{display:flex;justify-content:space-between;align-items:center;z-index:1;position:relative}.banner-text h3{font-size:16px;margin-bottom:4px;color:#fff}.banner-text h2{font-size:24px;color:#4ade80;margin:0}.recharge-btn{background:#4ADE80;color:#000;border:none;padding:8px 16px;border-radius:8px;font-weight:500;cursor:pointer;transition:background-color .2s}.recharge-btn:hover{background:#22C55E}.wallet-image{position:absolute;right:-20px;bottom:-20px;width:120px;opacity:.8}.pagination-dots{display:flex;justify-content:center;align-items:center;grid-gap:4px;gap:4px;margin-top:16px;position:relative}.dot{height:4px;width:16px;background:rgba(115,91,231,.3);cursor:pointer;transition:all .3s ease;border-radius:2px}.dot.active{background:#745BE7;position:relative}.dot.active:after{content:\"\";position:absolute;bottom:-4px;left:50%;transform:translate(-50%);width:4px;height:4px;background:#745BE7;border-radius:50%}@media (min-width: 361px) and (max-width: 380px){.product-card{min-width:70px;width:100%;padding:10px}}@media (max-width: 360px){.product-card{min-width:60px;width:100%;padding:10px}.product-name{font-size:12px;margin-top:5px}.mobile-container{padding:0}.welcome-text{font-size:22px}.subtitle{font-size:13px}.icon-circle{width:40px;height:40px}.icon-circle img{width:40px;height:40px}}@media (max-width: 767px){.products-grid{grid-gap:12px;gap:12px}.recharge-banner{padding:16px}.banner-text h2{font-size:20px}.recharge-btn{padding:6px 12px;font-size:14px}}.strength-container{width:100%;overflow:hidden;position:relative;padding:0;margin-bottom:50px}.strength-scroll{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;grid-gap:16px;gap:16px;padding:0 16px;scrollbar-width:none;-ms-overflow-style:none}.strength-scroll::-webkit-scrollbar{display:none}.strength-card{flex:0 0 220px;scroll-snap-align:start;border-radius:12px;overflow:hidden}.strength-card img{width:100%;height:auto;display:block;object-fit:cover}@media (hover: none){.strength-scroll{touch-action:pan-x}}.mobile-container{font-family:\"TWK Lausanne\",sans-serif}.mobile-header .welcome-text,.mobile-header .subtitle,.section-title,.product-name{font-family:\"TWK Lausanne\",sans-serif}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]" }], animations: [
|
|
893
1112
|
animations.trigger('modalAnimation', [
|
|
894
1113
|
animations.transition(':enter', [
|
|
895
1114
|
animations.style({ opacity: 0, transform: 'scale(0.8)' }),
|