@global.engg/switcher-lib 0.0.33 → 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.
@@ -56,23 +56,29 @@
56
56
  this.router = router;
57
57
  this._http = _http;
58
58
  this.windowRef = windowRef;
59
+ // {
60
+ // "name": "@jitender_sharma/switcher-lib",
61
+ // "version": "0.0.28",
62
+ // "peerDependencies": {
63
+ // "@angular/common": "^12.2.0",
64
+ // "@angular/core": "^12.2.0"
65
+ // },
66
+ // "dependencies": {
67
+ // "tslib": "^2.3.0"
68
+ // }
69
+ // }
59
70
  this.SR_CONSTANTS = {
60
- QuickWebBaseUrl: window.location.host == 'app.shiprocket.in'
61
- ? 'https://quick.shiprocket.in/'
62
- : 'https://sr-quick-courier-qa-1-web.kartrocket.com/',
63
- EngageWebBaseUrl: window.location.host == 'app.shiprocket.in'
64
- ? 'https://app-engage.shiprocket.in/'
65
- : 'https://sr-engage-web-stage.kartrocket.com/',
71
+ QuickWebBaseUrl: 'https://quick.shiprocket.in/',
72
+ EngageWebBaseUrl: 'https://app-engage.shiprocket.in/',
66
73
  CheckoutWebBaseUrl: 'https://checkout-app.shiprocket.in/',
67
74
  SrfWebBaseUrl: 'https://srf-app.shiprocket.in/',
68
75
  FulfillmentWebBaseUrl: 'https://fulfillment.shiprocket.in',
69
76
  WigzoWebBaseUrl: 'https://convert.shiprocket.in/wigzo/lite/auth/shiprocket/login',
70
- PickrrWebBaseUrl: window.location.host == 'app.shiprocket.in'
71
- ? 'https://dashboard.pickrr.com/'
72
- : 'https://shiprocket-to-pickrr.netlify.app/',
73
- EngagePlusWebBaseURL: window.location.host == 'app.shiprocket.in' ? 'https://app-engage.shiprocket.in/' : 'https://sr-engage-web-qa-3.kartrocket.com/'
77
+ PickrrWebBaseUrl: 'https://dashboard.pickrr.com/',
78
+ EngagePlusWebBaseURL: 'https://app-engage.shiprocket.in/'
74
79
  };
75
- this.userData = JSON.parse(localStorage.getItem('ngStorage-USER') || '{}');
80
+ this.DOMAIN = 'https://app.shiprocket.in';
81
+ this.userData = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
76
82
  this.isDesktop = false;
77
83
  this.appSwitchList = [
78
84
  {
@@ -191,10 +197,10 @@
191
197
  }
192
198
  else if (app === 'rocketbox') {
193
199
  if (this.userData.allow_rb_panel || this.userData.is_rb_user) {
194
- window.location.href = window.location.origin + '/rocketbox';
200
+ window.location.href = this.DOMAIN + "/rocketbox";
195
201
  }
196
202
  else {
197
- window.location.href = window.location.origin + '/seller' + '/settings/internationalsettings/internationalkyc';
203
+ window.location.href = this.DOMAIN + "/seller/settings/internationalsettings/internationalkyc";
198
204
  }
199
205
  }
200
206
  else if (((_a = this.userData) === null || _a === void 0 ? void 0 : _a.allow_sr_convert) &&
@@ -239,17 +245,17 @@
239
245
  }
240
246
  else if (app === 'creditScore') {
241
247
  if ((_c = this.userData) === null || _c === void 0 ? void 0 : _c.is_crif_enabled) {
242
- window.open("https://app.shiprocket.in/capital/crif-home/?utm_source=App-Switcher&utm_medium=Manual-Adhoc&utm_content=crif_credit_score&utm_term=app_switcher_click", '_blank');
248
+ window.open("https://capital-web.shiprocket.in/crif-home/?utm_source=App-Switcher&utm_medium=Manual-Adhoc&utm_content=crif_credit_score&utm_term=app_switcher_click&authToken=" + this.userData.token, '_blank');
243
249
  }
244
250
  else {
245
251
  window.open("https://www.shiprocket.in/capital/", '_blank');
246
252
  }
247
253
  }
248
254
  else if (app === 'capital') {
249
- window.open("https://app.shiprocket.in/capital/home/?utm_source=App-Switcher&utm_medium=Manual-Adhoc&utm_content=capital&utm_term=flexi_business_loan", '_blank');
255
+ window.open("https://capital-web.shiprocket.in/home/?utm_source=App-Switcher&utm_medium=Manual-Adhoc&utm_content=capital&utm_term=flexi_business_loan&authToken=" + this.userData.token, '_blank');
250
256
  }
251
257
  else if (app === 'marketing') {
252
- window.location.href = window.location.origin + '/seller' + '/home';
258
+ window.location.href = this.DOMAIN + "/seller/home";
253
259
  }
254
260
  else if (app === 'whatsapp_solutions') {
255
261
  if (this.userData.allow_engage) {
@@ -261,20 +267,20 @@
261
267
  }
262
268
  else if (app === 'internationalParcels') {
263
269
  if (kyc_status == 0 || kyc_status == 1 || kyc_status == 2 || kyc_status == 4) {
264
- window.location.href = window.location.origin + '/seller' + '/internationalDashboard/overview';
270
+ window.location.href = this.DOMAIN + "/seller/internationalDashboard/overview";
265
271
  }
266
272
  else {
267
- window.location.href = window.location.origin + '/seller' + '/settings/internationalsettings/internationalkyc';
273
+ window.location.href = this.DOMAIN + "/seller/settings/internationalsettings/internationalkyc";
268
274
  }
269
275
  }
270
276
  else if (app === 'i_rocketbox') {
271
- window.location.href = window.location.origin + '/seller' + '/settings/internationalsettings/internationalkyc';
277
+ window.location.href = this.DOMAIN + "/seller/settings/internationalsettings/internationalkyc";
272
278
  }
273
279
  else if (app === 'brand_launch') {
274
- window.location.href = window.location.origin + '/seller' + '/settings/internationalsettings/internationalkyc';
280
+ window.location.href = this.DOMAIN + "/seller/settings/internationalsettings/internationalkyc";
275
281
  }
276
282
  else if (app === 'express_parcel') {
277
- window.location.href = window.location.origin + '/seller' + '/home';
283
+ window.location.href = this.DOMAIN + "/seller/home";
278
284
  }
279
285
  else if (app === 'instant_deliveries') {
280
286
  window.open(this.SR_CONSTANTS.QuickWebBaseUrl + "gate-keeper?token=" + this.userData.token, '_blank');
@@ -284,10 +290,10 @@
284
290
  window.open("https://fulfillment.shiprocket.in/", '_blank');
285
291
  }
286
292
  else if (app == 'srocketbox') {
287
- window.location.href = window.location.origin + '/seller' + '/settings/internationalsettings/internationalkyc';
293
+ window.location.href = this.DOMAIN + "/seller/settings/internationalsettings/internationalkyc";
288
294
  }
289
295
  else if (app == 'somuni') {
290
- window.location.href = window.location.origin + '/seller' + '/home';
296
+ window.location.href = this.DOMAIN + "/seller/home";
291
297
  }
292
298
  };
293
299
  AppSwitcherService.prototype.sendGaEvent = function (event) {
@@ -383,7 +389,7 @@
383
389
  this.send(category, eventName, label);
384
390
  };
385
391
  AppSwitcherService.prototype.send = function (eventCategory, eventAction, eventLabel) {
386
- var _a;
392
+ var _a, _b, _c;
387
393
  var source = ((_a = document.cookie
388
394
  .split('; ')
389
395
  .find(function (row) { return row.startsWith('UTM='); })) === null || _a === void 0 ? void 0 : _a.split('=')[1]) || '';
@@ -392,10 +398,12 @@
392
398
  eventAction: eventAction,
393
399
  eventLabel: eventLabel ? eventLabel : source,
394
400
  });
395
- this.windowRef.nativeWindow.gtag_g4('event', eventAction, {
396
- event_category: eventCategory,
397
- event_label: eventLabel ? eventLabel : source,
398
- });
401
+ if (((_c = (_b = this.windowRef) === null || _b === void 0 ? void 0 : _b.nativeWindow) === null || _c === void 0 ? void 0 : _c.gtag_g4) && typeof this.windowRef.nativeWindow.gtag_g4 === 'function') {
402
+ this.windowRef.nativeWindow.gtag_g4('event', eventAction, {
403
+ event_category: eventCategory,
404
+ event_label: eventLabel ? eventLabel : source,
405
+ });
406
+ }
399
407
  };
400
408
  AppSwitcherService.prototype.fetchOpenInAppLink = function () {
401
409
  this._http.get('oneimpression/open-app-redirection_url')
@@ -431,7 +439,7 @@
431
439
  }]
432
440
  }], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i2__namespace.HttpClient }, { type: WindowRef }]; } });
433
441
 
434
- var user = JSON.parse(localStorage.getItem('ngStorage-USER') || '{}');
442
+ var user = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
435
443
  var SwitcherComponent = /** @class */ (function () {
436
444
  function SwitcherComponent(appSwitcherService, _http, windowRef) {
437
445
  var _this = this;
@@ -440,24 +448,29 @@
440
448
  this.windowRef = windowRef;
441
449
  this.data = '';
442
450
  this.isModalOpen = false;
451
+ this.showProducts = false;
443
452
  this.isDesktop = false;
444
453
  this.company_id = '';
445
454
  this.userData = user;
455
+ this.recentUsedProducts = [];
446
456
  this.appSwitcherApps = {
447
457
  shipping_fulfilment_india: [
448
458
  {
459
+ id: 1,
449
460
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Express-Parcel.png',
450
461
  appName: 'express_parcel',
451
462
  checkKey: 'Domestic Shipping',
452
463
  displayName: 'Domestic Shipping',
453
464
  subText: 'Multiple couriers, SDD/NDD, widest reach'
454
465
  }, {
466
+ id: 2,
455
467
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Instant-deliveries.png',
456
468
  appName: 'instant_deliveries',
457
469
  checkKey: 'Instant deliveries',
458
470
  displayName: 'Instant deliveries',
459
471
  subText: 'Multiple couriers, Hyperlocal, Intracity'
460
472
  }, {
473
+ id: 3,
461
474
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Warehousing.png',
462
475
  appName: 'fullfilment',
463
476
  checkKey: 'Warehousing',
@@ -465,6 +478,7 @@
465
478
  subText: 'End-to-end brand fulfilment '
466
479
  },
467
480
  {
481
+ id: 4,
468
482
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Cargo.png',
469
483
  appName: 'rocketbox',
470
484
  checkKey: 'allow_rocketbox',
@@ -473,18 +487,21 @@
473
487
  },
474
488
  ],
475
489
  cross_border_commerce: [{
490
+ id: 5,
476
491
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/International-Parcels.png',
477
492
  appName: 'internationalParcels',
478
493
  checkKey: 'internationalParcels',
479
494
  displayName: 'International Parcels',
480
495
  subText: 'Ship to 220+ countries'
481
496
  }, {
497
+ id: 6,
482
498
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/International-Cargo.png',
483
499
  appName: 'i_rocketbox',
484
500
  checkKey: 'i_allow_rocketbox',
485
501
  displayName: 'International Cargo',
486
502
  subText: 'Air & Ocean freight'
487
503
  }, {
504
+ id: 7,
488
505
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Brand-Launch.png',
489
506
  appName: 'brand_launch',
490
507
  checkKey: 'brand_launch',
@@ -492,12 +509,14 @@
492
509
  subText: 'Expand your brand globally '
493
510
  }],
494
511
  growth_marketing_solutions: [{
512
+ id: 8,
495
513
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Checkout.png',
496
514
  appName: 'checkout',
497
515
  checkKey: 'allow_checkout',
498
516
  displayName: 'Checkout',
499
517
  subText: 'Simplified one-click checkout'
500
518
  }, {
519
+ id: 9,
501
520
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Whatsapp-Solutions.png',
502
521
  appName: 'whatsapp_solutions',
503
522
  checkKey: 'whatsapp_solutions',
@@ -505,12 +524,14 @@
505
524
  subText: 'Marketing, commerce, chatbot - ',
506
525
  nextLineLabel: ''
507
526
  }, {
527
+ id: 10,
508
528
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Marketing.png',
509
529
  appName: 'marketing',
510
530
  checkKey: 'marketing',
511
531
  displayName: 'Marketing',
512
532
  subText: 'Digital and influencer marketing & more '
513
533
  }, {
534
+ id: 11,
514
535
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/trends.png',
515
536
  appName: 'trends',
516
537
  checkKey: 'allow_trends',
@@ -518,12 +539,14 @@
518
539
  subText: 'E-commerce analytics for Bharat'
519
540
  }],
520
541
  financial_servicea: [{
542
+ id: 12,
521
543
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Capital.png',
522
544
  appName: 'capital',
523
545
  checkKey: 'Capital',
524
546
  displayName: 'Business Loan',
525
547
  subText: 'Flexible Business loan up to ₹20 Lakhs'
526
548
  }, {
549
+ id: 13,
527
550
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Credit-Score.png',
528
551
  appName: 'creditScore',
529
552
  checkKey: 'Credit Score',
@@ -531,6 +554,7 @@
531
554
  subText: 'Check your credit score for free '
532
555
  }],
533
556
  other_services: [{
557
+ id: 14,
534
558
  appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Omnichannel.png',
535
559
  appName: 'omuni',
536
560
  checkKey: 'allow_omuni',
@@ -538,11 +562,141 @@
538
562
  subText: 'Manage all sales channels - online + offline at one place'
539
563
  }]
540
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
+ };
541
664
  this.isMobileView = false;
542
665
  this.MOBILE_BREAKPOINT = 768;
543
666
  this.user = user;
544
667
  this.appSwitchList = [];
545
- console.log(this.data);
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
+ ];
546
700
  this.resizeListener = function () {
547
701
  // Clear the timeout if it exists
548
702
  if (_this.resizeTimeout) {
@@ -558,12 +712,27 @@
558
712
  this.appSwitcherService.showAppSwitchListToDiffUser();
559
713
  this.appSwitchList = this.appSwitcherService.appSwitchList;
560
714
  }
561
- SwitcherComponent.prototype.openModal = function () {
715
+ SwitcherComponent.prototype.openModal = function (param) {
716
+ var _this = this;
717
+ var _a;
562
718
  this.isModalOpen = true;
719
+ this.showProducts = false;
563
720
  var sidebar = document.querySelector('app-sidebar');
564
721
  if (sidebar) {
565
722
  sidebar.setAttribute('style', 'display: none');
566
723
  }
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
+ }
567
736
  };
568
737
  SwitcherComponent.prototype.closeModal = function () {
569
738
  this.isModalOpen = false;
@@ -574,17 +743,15 @@
574
743
  };
575
744
  SwitcherComponent.prototype.ngOnInit = function () {
576
745
  var _this = this;
577
- this.userJson = localStorage.getItem('ngStorage-USER');
578
- this.company_id = this.userJson != null ? JSON.parse(this.userJson).company_id : '';
579
- // Filter out apps based on input data
746
+ var _a;
747
+ this.userJson = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
748
+ this.company_id = this.userJson != null ? (_a = this.userJson) === null || _a === void 0 ? void 0 : _a.company_id : '';
580
749
  if (this.data) {
581
750
  var appsToRemove_1 = this.data.split(',').map(function (app) { return app.trim(); });
582
- // Filter each category in appSwitcherApps
583
751
  Object.keys(this.appSwitcherApps).forEach(function (category) {
584
752
  _this.appSwitcherApps[category] = _this.appSwitcherApps[category].filter(function (app) { return !appsToRemove_1.includes(app.appName); });
585
753
  });
586
754
  }
587
- this.getKYCData();
588
755
  };
589
756
  SwitcherComponent.prototype.ngOnDestroy = function () {
590
757
  this.windowRef.nativeWindow.removeEventListener('resize', this.resizeListener);
@@ -593,8 +760,10 @@
593
760
  }
594
761
  };
595
762
  SwitcherComponent.prototype.checkScreenSize = function () {
596
- this.isMobileView = this.windowRef.nativeWindow.innerWidth < this.MOBILE_BREAKPOINT;
597
- this.isDesktop = this.windowRef.nativeWindow.innerWidth >= 768;
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);
598
767
  };
599
768
  SwitcherComponent.prototype.getKYCData = function () {
600
769
  var _this = this;
@@ -606,17 +775,120 @@
606
775
  }, function (error) {
607
776
  });
608
777
  };
609
- SwitcherComponent.prototype.callEvent = function (type, id) {
610
- this.appSwitcherService.appSwitch(type, this.kycStatus);
611
- this.appSwitcherService.send('Swithcer Service Selection', id, 'Company Id : ' + this.company_id);
778
+ SwitcherComponent.prototype.getBaseUrl = function () {
779
+ var currentUrl = window.location.hostname;
780
+ if (currentUrl.includes('multichannel-channels-partnerships-qa-web.kartrocket.com')) {
781
+ return 'https://multichannel-channels-partnerships-qa-api.kartrocket.com/v1/';
782
+ }
783
+ else if (currentUrl.includes('app.shiprocket.in')) {
784
+ return 'https://apiv2.shiprocket.co/v1/';
785
+ }
786
+ else {
787
+ return 'https://apiv2.shiprocket.co/v1/';
788
+ }
789
+ };
790
+ SwitcherComponent.prototype.analyticsevent = function (item) {
791
+ this.appSwitcherService.send('Switcher Service Selection', 'Recent Used Product', 'App: ' + item.displayName);
612
792
  };
613
- SwitcherComponent.prototype.appSwitch = function (app) {
614
- this.appSwitcherService.appSwitch(app);
793
+ SwitcherComponent.prototype.analyticsevent_mobile = function (item) {
794
+ this.appSwitcherService.send('Switcher Service Selection Mobile', 'Mobile Product Selection', 'App: ' + item.displayName);
795
+ };
796
+ SwitcherComponent.prototype.callEvent = function (type, displayName) {
797
+ var _this = this;
798
+ // List of apps that require API call before redirection
799
+ var apiFirstApps = [
800
+ 'rocketbox', 'marketing', 'internationalParcels',
801
+ 'i_rocketbox', 'brand_launch', 'express_parcel',
802
+ 'srocketbox', 'somuni'
803
+ ];
804
+ // If not in apiFirstApps list, redirect immediately
805
+ if (!apiFirstApps.includes(type)) {
806
+ this.appSwitcherService.appSwitch(type, this.kycStatus);
807
+ }
808
+ this.appSwitcherService.send('Swithcer Service Selection', displayName, 'Company Id : ' + this.company_id);
809
+ // Find the app object across all categories that matches the displayName
810
+ var appId;
811
+ var clickedApp;
812
+ Object.values(this.appSwitcherApps).forEach(function (category) {
813
+ var categoryArray = category;
814
+ var app = categoryArray.find(function (app) { return app.displayName === displayName; });
815
+ if (app) {
816
+ appId = app.id;
817
+ clickedApp = app;
818
+ }
819
+ });
820
+ var data = {
821
+ service_id: appId.toString()
822
+ };
823
+ var headers = {
824
+ 'Content-Type': 'application/json',
825
+ 'Authorization': 'Bearer ' + this.userData.token
826
+ };
827
+ this._http.post(this.getBaseUrl() + "settings/company-service", data, { headers: headers }).subscribe(function (res) {
828
+ // API call complete, but we don't wait for it
829
+ }, function (error) { });
830
+ // Handle UI updates and navigation independently with timeout
831
+ setTimeout(function () {
832
+ if (clickedApp) {
833
+ var newRecentProduct = {
834
+ appName: clickedApp.appName,
835
+ appLogo: clickedApp.appLogo,
836
+ displayName: clickedApp.displayName
837
+ };
838
+ // Remove the clicked item if it exists
839
+ _this.recentUsedProducts = _this.recentUsedProducts.filter(function (item) { return item.displayName !== displayName; });
840
+ // Add new item at the beginning
841
+ _this.recentUsedProducts.unshift(newRecentProduct);
842
+ // Keep only the first 4 elements
843
+ _this.recentUsedProducts = _this.recentUsedProducts.slice(0, 4);
844
+ // For apps in apiFirstApps list, redirect after timeout
845
+ if (apiFirstApps.includes(type)) {
846
+ _this.appSwitcherService.appSwitch(type, _this.kycStatus);
847
+ }
848
+ }
849
+ }, 500); // 500ms timeout
850
+ };
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);
859
+ };
860
+ SwitcherComponent.prototype.getCompanyService = function () {
861
+ var _this = this;
862
+ var headers = {
863
+ 'Content-Type': 'application/json',
864
+ 'Authorization': 'Bearer ' + this.userData.token
865
+ };
866
+ this._http.get(this.getBaseUrl() + "settings/company-service", { headers: headers }).subscribe(function (res) {
867
+ _this.appSwitchList = res.data;
868
+ // Map the API response to recentUsedProducts
869
+ _this.recentUsedProducts = res.data.map(function (item) {
870
+ // Search for matching app across all categories
871
+ var matchedApp;
872
+ Object.values(_this.appSwitcherApps).forEach(function (category) {
873
+ var categoryArray = category;
874
+ var app = categoryArray.find(function (app) { return app.id === item.service_id; });
875
+ if (app) {
876
+ matchedApp = app;
877
+ }
878
+ });
879
+ // Return mapped object if match found, otherwise return null
880
+ return matchedApp ? {
881
+ appName: matchedApp.appName,
882
+ appLogo: matchedApp.appLogo,
883
+ displayName: matchedApp.displayName
884
+ } : null;
885
+ }).filter(function (item) { return item !== null; });
886
+ });
615
887
  };
616
888
  return SwitcherComponent;
617
889
  }());
618
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 });
619
- 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=\"p-0 me-2 appSwitcherBtn\" (click)=\"openModal()\" *ngIf=\"userData.allow_checkout || userData.allow_engage || userData.allow_fbs || !userData.allow_fbs\">\n <div class=\"appSwitcherTxt\">\n ALL PRODUCTS\n <img class=\"ml-2 position-relative w-15\" style=\"top: -1px\" 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=\"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}.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){.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: [
620
892
  animations.trigger('modalAnimation', [
621
893
  animations.transition(':enter', [
622
894
  animations.style({ opacity: 0, transform: 'scale(0.8)' }),
@@ -625,6 +897,13 @@
625
897
  animations.transition(':leave', [
626
898
  animations.animate('200ms ease-in', animations.style({ opacity: 0, transform: 'scale(0.8)' }))
627
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
+ ])
628
907
  ])
629
908
  ] });
630
909
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SwitcherComponent, decorators: [{
@@ -642,6 +921,13 @@
642
921
  animations.transition(':leave', [
643
922
  animations.animate('200ms ease-in', animations.style({ opacity: 0, transform: 'scale(0.8)' }))
644
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
+ ])
645
931
  ])
646
932
  ]
647
933
  }]