@global.engg/switcher-lib 0.0.52 → 0.0.62
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 +180 -6
- package/bundles/global.engg-switcher-lib.umd.js.map +1 -1
- package/esm2015/lib/switcher.component.js +180 -7
- package/fesm2015/global.engg-switcher-lib.js +179 -6
- package/fesm2015/global.engg-switcher-lib.js.map +1 -1
- package/lib/switcher.component.d.ts +11 -2
- package/package.json +1 -1
|
@@ -448,6 +448,7 @@
|
|
|
448
448
|
this.windowRef = windowRef;
|
|
449
449
|
this.data = '';
|
|
450
450
|
this.isModalOpen = false;
|
|
451
|
+
this.showProducts = false;
|
|
451
452
|
this.isDesktop = false;
|
|
452
453
|
this.company_id = '';
|
|
453
454
|
this.userData = user;
|
|
@@ -561,10 +562,141 @@
|
|
|
561
562
|
subText: 'Manage all sales channels - online + offline at one place'
|
|
562
563
|
}]
|
|
563
564
|
};
|
|
565
|
+
this.mobile_appSwitcherApps = {
|
|
566
|
+
india_logistics_platform: [
|
|
567
|
+
{
|
|
568
|
+
id: 1,
|
|
569
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/courier_app.png',
|
|
570
|
+
appName: 'express_parcel',
|
|
571
|
+
checkKey: 'Domestic Shipping',
|
|
572
|
+
displayName: 'Courier',
|
|
573
|
+
subText: 'Multiple couriers, SDD/NDD, widest reach'
|
|
574
|
+
}, {
|
|
575
|
+
id: 2,
|
|
576
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/quick_app.png',
|
|
577
|
+
appName: 'instant_deliveries',
|
|
578
|
+
checkKey: 'Instant deliveries',
|
|
579
|
+
displayName: 'Quick',
|
|
580
|
+
subText: 'Multiple couriers, Hyperlocal, Intracity'
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
id: 4,
|
|
584
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/cargo_app.png',
|
|
585
|
+
appName: 'rocketbox',
|
|
586
|
+
checkKey: 'allow_rocketbox',
|
|
587
|
+
displayName: 'Cargo',
|
|
588
|
+
subText: 'Heavy shipments, FTL & PTL '
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
id: 3,
|
|
592
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/fulfillment_app.png',
|
|
593
|
+
appName: 'fullfilment',
|
|
594
|
+
checkKey: 'Warehousing',
|
|
595
|
+
displayName: 'Fulfillment',
|
|
596
|
+
subText: 'End-to-end brand fulfilment '
|
|
597
|
+
},
|
|
598
|
+
],
|
|
599
|
+
cross_border_commerce: [{
|
|
600
|
+
id: 5,
|
|
601
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/parcel_app.png',
|
|
602
|
+
appName: 'internationalParcels',
|
|
603
|
+
checkKey: 'internationalParcels',
|
|
604
|
+
displayName: 'Parcel',
|
|
605
|
+
subText: 'Ship to 220+ countries'
|
|
606
|
+
}, {
|
|
607
|
+
id: 6,
|
|
608
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/cargo_int_app.png',
|
|
609
|
+
appName: 'i_rocketbox',
|
|
610
|
+
checkKey: 'i_allow_rocketbox',
|
|
611
|
+
displayName: 'Cargo X',
|
|
612
|
+
subText: 'Air & Ocean freight'
|
|
613
|
+
}],
|
|
614
|
+
growth_marketing_solutions: [
|
|
615
|
+
{
|
|
616
|
+
id: 9,
|
|
617
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/engage_app.png',
|
|
618
|
+
appName: 'whatsapp_solutions',
|
|
619
|
+
checkKey: 'whatsapp_solutions',
|
|
620
|
+
displayName: 'Engage',
|
|
621
|
+
subText: 'Marketing, commerce, chatbot - ',
|
|
622
|
+
nextLineLabel: ''
|
|
623
|
+
}, {
|
|
624
|
+
id: 11,
|
|
625
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/trends_app.png',
|
|
626
|
+
appName: 'trends',
|
|
627
|
+
checkKey: 'allow_trends',
|
|
628
|
+
displayName: 'Trends',
|
|
629
|
+
subText: 'E-commerce analytics for Bharat'
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
id: 8,
|
|
633
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/checkout_new_app.png',
|
|
634
|
+
appName: 'checkout',
|
|
635
|
+
checkKey: 'allow_checkout',
|
|
636
|
+
displayName: 'Checkout',
|
|
637
|
+
subText: 'Simplified one-click checkout'
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
id: 10,
|
|
641
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/ads_app.png',
|
|
642
|
+
appName: 'marketing',
|
|
643
|
+
checkKey: 'marketing',
|
|
644
|
+
displayName: 'Ads',
|
|
645
|
+
subText: 'Digital and influencer marketing & more '
|
|
646
|
+
}
|
|
647
|
+
],
|
|
648
|
+
financial_servicea: [{
|
|
649
|
+
id: 12,
|
|
650
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/capital_app.png',
|
|
651
|
+
appName: 'capital',
|
|
652
|
+
checkKey: 'Capital',
|
|
653
|
+
displayName: 'Capital',
|
|
654
|
+
subText: 'Flexible Business loan up to ₹20 Lakhs'
|
|
655
|
+
}, {
|
|
656
|
+
id: 13,
|
|
657
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/credit_score.png',
|
|
658
|
+
appName: 'creditScore',
|
|
659
|
+
checkKey: 'Credit Score',
|
|
660
|
+
displayName: 'Credit Score',
|
|
661
|
+
subText: 'Check your credit score for free '
|
|
662
|
+
}]
|
|
663
|
+
};
|
|
564
664
|
this.isMobileView = false;
|
|
565
665
|
this.MOBILE_BREAKPOINT = 768;
|
|
566
666
|
this.user = user;
|
|
567
667
|
this.appSwitchList = [];
|
|
668
|
+
this.coreStrengthImages = [
|
|
669
|
+
{
|
|
670
|
+
id: 1,
|
|
671
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_1.png',
|
|
672
|
+
altText: 'Core Strength 1'
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
id: 2,
|
|
676
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_2.png',
|
|
677
|
+
altText: 'Core Strength 2'
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
id: 3,
|
|
681
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_3.png',
|
|
682
|
+
altText: 'Core Strength 3'
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
id: 4,
|
|
686
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_4.png',
|
|
687
|
+
altText: 'Core Strength 4'
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
id: 5,
|
|
691
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_5.png',
|
|
692
|
+
altText: 'Core Strength 5'
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
id: 6,
|
|
696
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_6.png',
|
|
697
|
+
altText: 'Core Strength 6'
|
|
698
|
+
}
|
|
699
|
+
];
|
|
568
700
|
this.resizeListener = function () {
|
|
569
701
|
// Clear the timeout if it exists
|
|
570
702
|
if (_this.resizeTimeout) {
|
|
@@ -580,13 +712,27 @@
|
|
|
580
712
|
this.appSwitcherService.showAppSwitchListToDiffUser();
|
|
581
713
|
this.appSwitchList = this.appSwitcherService.appSwitchList;
|
|
582
714
|
}
|
|
583
|
-
SwitcherComponent.prototype.openModal = function () {
|
|
715
|
+
SwitcherComponent.prototype.openModal = function (param) {
|
|
716
|
+
var _this = this;
|
|
717
|
+
var _a;
|
|
584
718
|
this.isModalOpen = true;
|
|
719
|
+
this.showProducts = false;
|
|
585
720
|
var sidebar = document.querySelector('app-sidebar');
|
|
586
721
|
if (sidebar) {
|
|
587
722
|
sidebar.setAttribute('style', 'display: none');
|
|
588
723
|
}
|
|
589
724
|
this.getCompanyService();
|
|
725
|
+
setTimeout(function () {
|
|
726
|
+
_this.showProducts = true;
|
|
727
|
+
}, 200);
|
|
728
|
+
if (param == 'mobile') {
|
|
729
|
+
this.userJson = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
|
|
730
|
+
this.company_id = this.userJson != null ? (_a = this.userJson) === null || _a === void 0 ? void 0 : _a.company_id : '';
|
|
731
|
+
this.appSwitcherService.send('All Products', 'All Products Mobile', 'Company Id: ' + this.company_id);
|
|
732
|
+
}
|
|
733
|
+
else if (param == 'desktop') {
|
|
734
|
+
this.appSwitcherService.send('All Products', 'All Products Desktop', 'Company Id: ' + this.company_id);
|
|
735
|
+
}
|
|
590
736
|
};
|
|
591
737
|
SwitcherComponent.prototype.closeModal = function () {
|
|
592
738
|
this.isModalOpen = false;
|
|
@@ -614,8 +760,10 @@
|
|
|
614
760
|
}
|
|
615
761
|
};
|
|
616
762
|
SwitcherComponent.prototype.checkScreenSize = function () {
|
|
617
|
-
|
|
618
|
-
this.
|
|
763
|
+
var width = this.windowRef.nativeWindow.innerWidth;
|
|
764
|
+
this.isMobileView = width < this.MOBILE_BREAKPOINT;
|
|
765
|
+
this.isDesktop = width >= 768;
|
|
766
|
+
document.body.classList.toggle('mobile-view', this.isMobileView);
|
|
619
767
|
};
|
|
620
768
|
SwitcherComponent.prototype.getKYCData = function () {
|
|
621
769
|
var _this = this;
|
|
@@ -639,6 +787,12 @@
|
|
|
639
787
|
return 'https://apiv2.shiprocket.co/v1/';
|
|
640
788
|
}
|
|
641
789
|
};
|
|
790
|
+
SwitcherComponent.prototype.analyticsevent = function (item) {
|
|
791
|
+
this.appSwitcherService.send('Switcher Service Selection', 'Recent Used Product', 'App: ' + item.displayName);
|
|
792
|
+
};
|
|
793
|
+
SwitcherComponent.prototype.analyticsevent_mobile = function (item) {
|
|
794
|
+
this.appSwitcherService.send('Switcher Service Selection Mobile', 'Mobile Product Selection', 'App: ' + item.displayName);
|
|
795
|
+
};
|
|
642
796
|
SwitcherComponent.prototype.callEvent = function (type, displayName) {
|
|
643
797
|
var _this = this;
|
|
644
798
|
// List of apps that require API call before redirection
|
|
@@ -694,8 +848,14 @@
|
|
|
694
848
|
}
|
|
695
849
|
}, 500); // 500ms timeout
|
|
696
850
|
};
|
|
697
|
-
SwitcherComponent.prototype.appSwitch = function (app) {
|
|
698
|
-
|
|
851
|
+
SwitcherComponent.prototype.appSwitch = function (app, analyticsevent) {
|
|
852
|
+
if (analyticsevent == 'recentUsedProduct') {
|
|
853
|
+
this.analyticsevent(app);
|
|
854
|
+
}
|
|
855
|
+
else if (analyticsevent == 'mobileProductSelection') {
|
|
856
|
+
this.analyticsevent_mobile(app);
|
|
857
|
+
}
|
|
858
|
+
this.appSwitcherService.appSwitch(app.appName);
|
|
699
859
|
};
|
|
700
860
|
SwitcherComponent.prototype.getCompanyService = function () {
|
|
701
861
|
var _this = this;
|
|
@@ -728,7 +888,7 @@
|
|
|
728
888
|
return SwitcherComponent;
|
|
729
889
|
}());
|
|
730
890
|
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 });
|
|
731
|
-
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()\" *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()\"\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\">\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.appName)\" *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 \n\n\n </div>\n</div> ", styles: ["@import\"https://fonts.cdnfonts.com/css/sf-pro-display\";.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:20px;right:20px;font-size:24px;cursor:pointer;z-index:1001}::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}.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:40px}.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}}\n"], directives: [{ type: i4__namespace.NgIf, selector: "[ngIf]" }, { type: i4__namespace.NgForOf, selector: "[ngFor][ngForOf]" }], animations: [
|
|
891
|
+
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: [
|
|
732
892
|
animations.trigger('modalAnimation', [
|
|
733
893
|
animations.transition(':enter', [
|
|
734
894
|
animations.style({ opacity: 0, transform: 'scale(0.8)' }),
|
|
@@ -737,6 +897,13 @@
|
|
|
737
897
|
animations.transition(':leave', [
|
|
738
898
|
animations.animate('200ms ease-in', animations.style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
739
899
|
])
|
|
900
|
+
]),
|
|
901
|
+
// ... other animations ...
|
|
902
|
+
animations.trigger('slideDown', [
|
|
903
|
+
animations.transition(':enter', [
|
|
904
|
+
animations.style({ transform: 'translateY(-20px)', opacity: 0 }),
|
|
905
|
+
animations.animate('300ms ease-out', animations.style({ transform: 'translateY(0)', opacity: 1 }))
|
|
906
|
+
])
|
|
740
907
|
])
|
|
741
908
|
] });
|
|
742
909
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SwitcherComponent, decorators: [{
|
|
@@ -754,6 +921,13 @@
|
|
|
754
921
|
animations.transition(':leave', [
|
|
755
922
|
animations.animate('200ms ease-in', animations.style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
756
923
|
])
|
|
924
|
+
]),
|
|
925
|
+
// ... other animations ...
|
|
926
|
+
animations.trigger('slideDown', [
|
|
927
|
+
animations.transition(':enter', [
|
|
928
|
+
animations.style({ transform: 'translateY(-20px)', opacity: 0 }),
|
|
929
|
+
animations.animate('300ms ease-out', animations.style({ transform: 'translateY(0)', opacity: 1 }))
|
|
930
|
+
])
|
|
757
931
|
])
|
|
758
932
|
]
|
|
759
933
|
}]
|