@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.
- package/bundles/global.engg-switcher-lib.umd.js +330 -44
- package/bundles/global.engg-switcher-lib.umd.js.map +1 -1
- package/esm2015/lib/switcher.component.js +292 -17
- package/esm2015/lib/switcher.service.js +37 -29
- package/fesm2015/global.engg-switcher-lib.js +327 -44
- package/fesm2015/global.engg-switcher-lib.js.map +1 -1
- package/lib/switcher.component.d.ts +21 -3
- package/lib/switcher.service.d.ts +1 -0
- package/package.json +1 -5
|
@@ -28,23 +28,29 @@ class AppSwitcherService {
|
|
|
28
28
|
this.router = router;
|
|
29
29
|
this._http = _http;
|
|
30
30
|
this.windowRef = windowRef;
|
|
31
|
+
// {
|
|
32
|
+
// "name": "@jitender_sharma/switcher-lib",
|
|
33
|
+
// "version": "0.0.28",
|
|
34
|
+
// "peerDependencies": {
|
|
35
|
+
// "@angular/common": "^12.2.0",
|
|
36
|
+
// "@angular/core": "^12.2.0"
|
|
37
|
+
// },
|
|
38
|
+
// "dependencies": {
|
|
39
|
+
// "tslib": "^2.3.0"
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
31
42
|
this.SR_CONSTANTS = {
|
|
32
|
-
QuickWebBaseUrl:
|
|
33
|
-
|
|
34
|
-
: 'https://sr-quick-courier-qa-1-web.kartrocket.com/',
|
|
35
|
-
EngageWebBaseUrl: window.location.host == 'app.shiprocket.in'
|
|
36
|
-
? 'https://app-engage.shiprocket.in/'
|
|
37
|
-
: 'https://sr-engage-web-stage.kartrocket.com/',
|
|
43
|
+
QuickWebBaseUrl: 'https://quick.shiprocket.in/',
|
|
44
|
+
EngageWebBaseUrl: 'https://app-engage.shiprocket.in/',
|
|
38
45
|
CheckoutWebBaseUrl: 'https://checkout-app.shiprocket.in/',
|
|
39
46
|
SrfWebBaseUrl: 'https://srf-app.shiprocket.in/',
|
|
40
47
|
FulfillmentWebBaseUrl: 'https://fulfillment.shiprocket.in',
|
|
41
48
|
WigzoWebBaseUrl: 'https://convert.shiprocket.in/wigzo/lite/auth/shiprocket/login',
|
|
42
|
-
PickrrWebBaseUrl:
|
|
43
|
-
|
|
44
|
-
: 'https://shiprocket-to-pickrr.netlify.app/',
|
|
45
|
-
EngagePlusWebBaseURL: window.location.host == 'app.shiprocket.in' ? 'https://app-engage.shiprocket.in/' : 'https://sr-engage-web-qa-3.kartrocket.com/'
|
|
49
|
+
PickrrWebBaseUrl: 'https://dashboard.pickrr.com/',
|
|
50
|
+
EngagePlusWebBaseURL: 'https://app-engage.shiprocket.in/'
|
|
46
51
|
};
|
|
47
|
-
this.
|
|
52
|
+
this.DOMAIN = 'https://app.shiprocket.in';
|
|
53
|
+
this.userData = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
|
|
48
54
|
this.isDesktop = false;
|
|
49
55
|
this.appSwitchList = [
|
|
50
56
|
{
|
|
@@ -162,10 +168,10 @@ class AppSwitcherService {
|
|
|
162
168
|
}
|
|
163
169
|
else if (app === 'rocketbox') {
|
|
164
170
|
if (this.userData.allow_rb_panel || this.userData.is_rb_user) {
|
|
165
|
-
window.location.href =
|
|
171
|
+
window.location.href = `${this.DOMAIN}/rocketbox`;
|
|
166
172
|
}
|
|
167
173
|
else {
|
|
168
|
-
window.location.href =
|
|
174
|
+
window.location.href = `${this.DOMAIN}/seller/settings/internationalsettings/internationalkyc`;
|
|
169
175
|
}
|
|
170
176
|
}
|
|
171
177
|
else if (((_a = this.userData) === null || _a === void 0 ? void 0 : _a.allow_sr_convert) &&
|
|
@@ -210,17 +216,17 @@ class AppSwitcherService {
|
|
|
210
216
|
}
|
|
211
217
|
else if (app === 'creditScore') {
|
|
212
218
|
if ((_c = this.userData) === null || _c === void 0 ? void 0 : _c.is_crif_enabled) {
|
|
213
|
-
window.open(`https://
|
|
219
|
+
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');
|
|
214
220
|
}
|
|
215
221
|
else {
|
|
216
222
|
window.open(`https://www.shiprocket.in/capital/`, '_blank');
|
|
217
223
|
}
|
|
218
224
|
}
|
|
219
225
|
else if (app === 'capital') {
|
|
220
|
-
window.open(`https://
|
|
226
|
+
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');
|
|
221
227
|
}
|
|
222
228
|
else if (app === 'marketing') {
|
|
223
|
-
window.location.href =
|
|
229
|
+
window.location.href = `${this.DOMAIN}/seller/home`;
|
|
224
230
|
}
|
|
225
231
|
else if (app === 'whatsapp_solutions') {
|
|
226
232
|
if (this.userData.allow_engage) {
|
|
@@ -232,20 +238,20 @@ class AppSwitcherService {
|
|
|
232
238
|
}
|
|
233
239
|
else if (app === 'internationalParcels') {
|
|
234
240
|
if (kyc_status == 0 || kyc_status == 1 || kyc_status == 2 || kyc_status == 4) {
|
|
235
|
-
window.location.href =
|
|
241
|
+
window.location.href = `${this.DOMAIN}/seller/internationalDashboard/overview`;
|
|
236
242
|
}
|
|
237
243
|
else {
|
|
238
|
-
window.location.href =
|
|
244
|
+
window.location.href = `${this.DOMAIN}/seller/settings/internationalsettings/internationalkyc`;
|
|
239
245
|
}
|
|
240
246
|
}
|
|
241
247
|
else if (app === 'i_rocketbox') {
|
|
242
|
-
window.location.href =
|
|
248
|
+
window.location.href = `${this.DOMAIN}/seller/settings/internationalsettings/internationalkyc`;
|
|
243
249
|
}
|
|
244
250
|
else if (app === 'brand_launch') {
|
|
245
|
-
window.location.href =
|
|
251
|
+
window.location.href = `${this.DOMAIN}/seller/settings/internationalsettings/internationalkyc`;
|
|
246
252
|
}
|
|
247
253
|
else if (app === 'express_parcel') {
|
|
248
|
-
window.location.href =
|
|
254
|
+
window.location.href = `${this.DOMAIN}/seller/home`;
|
|
249
255
|
}
|
|
250
256
|
else if (app === 'instant_deliveries') {
|
|
251
257
|
window.open(`${this.SR_CONSTANTS.QuickWebBaseUrl}gate-keeper?token=${this.userData.token}`, '_blank');
|
|
@@ -255,10 +261,10 @@ class AppSwitcherService {
|
|
|
255
261
|
window.open(`https://fulfillment.shiprocket.in/`, '_blank');
|
|
256
262
|
}
|
|
257
263
|
else if (app == 'srocketbox') {
|
|
258
|
-
window.location.href =
|
|
264
|
+
window.location.href = `${this.DOMAIN}/seller/settings/internationalsettings/internationalkyc`;
|
|
259
265
|
}
|
|
260
266
|
else if (app == 'somuni') {
|
|
261
|
-
window.location.href =
|
|
267
|
+
window.location.href = `${this.DOMAIN}/seller/home`;
|
|
262
268
|
}
|
|
263
269
|
}
|
|
264
270
|
sendGaEvent(event) {
|
|
@@ -354,7 +360,7 @@ class AppSwitcherService {
|
|
|
354
360
|
this.send(category, eventName, label);
|
|
355
361
|
}
|
|
356
362
|
send(eventCategory, eventAction, eventLabel) {
|
|
357
|
-
var _a;
|
|
363
|
+
var _a, _b, _c;
|
|
358
364
|
const source = ((_a = document.cookie
|
|
359
365
|
.split('; ')
|
|
360
366
|
.find(row => row.startsWith('UTM='))) === null || _a === void 0 ? void 0 : _a.split('=')[1]) || '';
|
|
@@ -363,10 +369,12 @@ class AppSwitcherService {
|
|
|
363
369
|
eventAction: eventAction,
|
|
364
370
|
eventLabel: eventLabel ? eventLabel : source,
|
|
365
371
|
});
|
|
366
|
-
this.windowRef.nativeWindow.gtag_g4
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
372
|
+
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') {
|
|
373
|
+
this.windowRef.nativeWindow.gtag_g4('event', eventAction, {
|
|
374
|
+
event_category: eventCategory,
|
|
375
|
+
event_label: eventLabel ? eventLabel : source,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
370
378
|
}
|
|
371
379
|
fetchOpenInAppLink() {
|
|
372
380
|
this._http.get('oneimpression/open-app-redirection_url')
|
|
@@ -401,7 +409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
401
409
|
}]
|
|
402
410
|
}], ctorParameters: function () { return [{ type: i1.Router }, { type: i2.HttpClient }, { type: WindowRef }]; } });
|
|
403
411
|
|
|
404
|
-
const user = JSON.parse(localStorage.getItem('ngStorage-USER') || '{}');
|
|
412
|
+
const user = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
|
|
405
413
|
class SwitcherComponent {
|
|
406
414
|
constructor(appSwitcherService, _http, windowRef) {
|
|
407
415
|
this.appSwitcherService = appSwitcherService;
|
|
@@ -409,24 +417,29 @@ class SwitcherComponent {
|
|
|
409
417
|
this.windowRef = windowRef;
|
|
410
418
|
this.data = '';
|
|
411
419
|
this.isModalOpen = false;
|
|
420
|
+
this.showProducts = false;
|
|
412
421
|
this.isDesktop = false;
|
|
413
422
|
this.company_id = '';
|
|
414
423
|
this.userData = user;
|
|
424
|
+
this.recentUsedProducts = [];
|
|
415
425
|
this.appSwitcherApps = {
|
|
416
426
|
shipping_fulfilment_india: [
|
|
417
427
|
{
|
|
428
|
+
id: 1,
|
|
418
429
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Express-Parcel.png',
|
|
419
430
|
appName: 'express_parcel',
|
|
420
431
|
checkKey: 'Domestic Shipping',
|
|
421
432
|
displayName: 'Domestic Shipping',
|
|
422
433
|
subText: 'Multiple couriers, SDD/NDD, widest reach'
|
|
423
434
|
}, {
|
|
435
|
+
id: 2,
|
|
424
436
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Instant-deliveries.png',
|
|
425
437
|
appName: 'instant_deliveries',
|
|
426
438
|
checkKey: 'Instant deliveries',
|
|
427
439
|
displayName: 'Instant deliveries',
|
|
428
440
|
subText: 'Multiple couriers, Hyperlocal, Intracity'
|
|
429
441
|
}, {
|
|
442
|
+
id: 3,
|
|
430
443
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Warehousing.png',
|
|
431
444
|
appName: 'fullfilment',
|
|
432
445
|
checkKey: 'Warehousing',
|
|
@@ -434,6 +447,7 @@ class SwitcherComponent {
|
|
|
434
447
|
subText: 'End-to-end brand fulfilment '
|
|
435
448
|
},
|
|
436
449
|
{
|
|
450
|
+
id: 4,
|
|
437
451
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Cargo.png',
|
|
438
452
|
appName: 'rocketbox',
|
|
439
453
|
checkKey: 'allow_rocketbox',
|
|
@@ -442,18 +456,21 @@ class SwitcherComponent {
|
|
|
442
456
|
},
|
|
443
457
|
],
|
|
444
458
|
cross_border_commerce: [{
|
|
459
|
+
id: 5,
|
|
445
460
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/International-Parcels.png',
|
|
446
461
|
appName: 'internationalParcels',
|
|
447
462
|
checkKey: 'internationalParcels',
|
|
448
463
|
displayName: 'International Parcels',
|
|
449
464
|
subText: 'Ship to 220+ countries'
|
|
450
465
|
}, {
|
|
466
|
+
id: 6,
|
|
451
467
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/International-Cargo.png',
|
|
452
468
|
appName: 'i_rocketbox',
|
|
453
469
|
checkKey: 'i_allow_rocketbox',
|
|
454
470
|
displayName: 'International Cargo',
|
|
455
471
|
subText: 'Air & Ocean freight'
|
|
456
472
|
}, {
|
|
473
|
+
id: 7,
|
|
457
474
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Brand-Launch.png',
|
|
458
475
|
appName: 'brand_launch',
|
|
459
476
|
checkKey: 'brand_launch',
|
|
@@ -461,12 +478,14 @@ class SwitcherComponent {
|
|
|
461
478
|
subText: 'Expand your brand globally '
|
|
462
479
|
}],
|
|
463
480
|
growth_marketing_solutions: [{
|
|
481
|
+
id: 8,
|
|
464
482
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Checkout.png',
|
|
465
483
|
appName: 'checkout',
|
|
466
484
|
checkKey: 'allow_checkout',
|
|
467
485
|
displayName: 'Checkout',
|
|
468
486
|
subText: 'Simplified one-click checkout'
|
|
469
487
|
}, {
|
|
488
|
+
id: 9,
|
|
470
489
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Whatsapp-Solutions.png',
|
|
471
490
|
appName: 'whatsapp_solutions',
|
|
472
491
|
checkKey: 'whatsapp_solutions',
|
|
@@ -474,12 +493,14 @@ class SwitcherComponent {
|
|
|
474
493
|
subText: 'Marketing, commerce, chatbot - ',
|
|
475
494
|
nextLineLabel: ''
|
|
476
495
|
}, {
|
|
496
|
+
id: 10,
|
|
477
497
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Marketing.png',
|
|
478
498
|
appName: 'marketing',
|
|
479
499
|
checkKey: 'marketing',
|
|
480
500
|
displayName: 'Marketing',
|
|
481
501
|
subText: 'Digital and influencer marketing & more '
|
|
482
502
|
}, {
|
|
503
|
+
id: 11,
|
|
483
504
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/trends.png',
|
|
484
505
|
appName: 'trends',
|
|
485
506
|
checkKey: 'allow_trends',
|
|
@@ -487,12 +508,14 @@ class SwitcherComponent {
|
|
|
487
508
|
subText: 'E-commerce analytics for Bharat'
|
|
488
509
|
}],
|
|
489
510
|
financial_servicea: [{
|
|
511
|
+
id: 12,
|
|
490
512
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Capital.png',
|
|
491
513
|
appName: 'capital',
|
|
492
514
|
checkKey: 'Capital',
|
|
493
515
|
displayName: 'Business Loan',
|
|
494
516
|
subText: 'Flexible Business loan up to ₹20 Lakhs'
|
|
495
517
|
}, {
|
|
518
|
+
id: 13,
|
|
496
519
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Credit-Score.png',
|
|
497
520
|
appName: 'creditScore',
|
|
498
521
|
checkKey: 'Credit Score',
|
|
@@ -500,6 +523,7 @@ class SwitcherComponent {
|
|
|
500
523
|
subText: 'Check your credit score for free '
|
|
501
524
|
}],
|
|
502
525
|
other_services: [{
|
|
526
|
+
id: 14,
|
|
503
527
|
appLogo: 'https://sr-cdn-1.shiprocket.in/img/Web_New/Omnichannel.png',
|
|
504
528
|
appName: 'omuni',
|
|
505
529
|
checkKey: 'allow_omuni',
|
|
@@ -507,11 +531,141 @@ class SwitcherComponent {
|
|
|
507
531
|
subText: 'Manage all sales channels - online + offline at one place'
|
|
508
532
|
}]
|
|
509
533
|
};
|
|
534
|
+
this.mobile_appSwitcherApps = {
|
|
535
|
+
india_logistics_platform: [
|
|
536
|
+
{
|
|
537
|
+
id: 1,
|
|
538
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/courier_app.png',
|
|
539
|
+
appName: 'express_parcel',
|
|
540
|
+
checkKey: 'Domestic Shipping',
|
|
541
|
+
displayName: 'Courier',
|
|
542
|
+
subText: 'Multiple couriers, SDD/NDD, widest reach'
|
|
543
|
+
}, {
|
|
544
|
+
id: 2,
|
|
545
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/quick_app.png',
|
|
546
|
+
appName: 'instant_deliveries',
|
|
547
|
+
checkKey: 'Instant deliveries',
|
|
548
|
+
displayName: 'Quick',
|
|
549
|
+
subText: 'Multiple couriers, Hyperlocal, Intracity'
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 4,
|
|
553
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/cargo_app.png',
|
|
554
|
+
appName: 'rocketbox',
|
|
555
|
+
checkKey: 'allow_rocketbox',
|
|
556
|
+
displayName: 'Cargo',
|
|
557
|
+
subText: 'Heavy shipments, FTL & PTL '
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
id: 3,
|
|
561
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/fulfillment_app.png',
|
|
562
|
+
appName: 'fullfilment',
|
|
563
|
+
checkKey: 'Warehousing',
|
|
564
|
+
displayName: 'Fulfillment',
|
|
565
|
+
subText: 'End-to-end brand fulfilment '
|
|
566
|
+
},
|
|
567
|
+
],
|
|
568
|
+
cross_border_commerce: [{
|
|
569
|
+
id: 5,
|
|
570
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/parcel_app.png',
|
|
571
|
+
appName: 'internationalParcels',
|
|
572
|
+
checkKey: 'internationalParcels',
|
|
573
|
+
displayName: 'Parcel',
|
|
574
|
+
subText: 'Ship to 220+ countries'
|
|
575
|
+
}, {
|
|
576
|
+
id: 6,
|
|
577
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/cargo_int_app.png',
|
|
578
|
+
appName: 'i_rocketbox',
|
|
579
|
+
checkKey: 'i_allow_rocketbox',
|
|
580
|
+
displayName: 'Cargo X',
|
|
581
|
+
subText: 'Air & Ocean freight'
|
|
582
|
+
}],
|
|
583
|
+
growth_marketing_solutions: [
|
|
584
|
+
{
|
|
585
|
+
id: 9,
|
|
586
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/engage_app.png',
|
|
587
|
+
appName: 'whatsapp_solutions',
|
|
588
|
+
checkKey: 'whatsapp_solutions',
|
|
589
|
+
displayName: 'Engage',
|
|
590
|
+
subText: 'Marketing, commerce, chatbot - ',
|
|
591
|
+
nextLineLabel: ''
|
|
592
|
+
}, {
|
|
593
|
+
id: 11,
|
|
594
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/trends_app.png',
|
|
595
|
+
appName: 'trends',
|
|
596
|
+
checkKey: 'allow_trends',
|
|
597
|
+
displayName: 'Trends',
|
|
598
|
+
subText: 'E-commerce analytics for Bharat'
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: 8,
|
|
602
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/checkout_new_app.png',
|
|
603
|
+
appName: 'checkout',
|
|
604
|
+
checkKey: 'allow_checkout',
|
|
605
|
+
displayName: 'Checkout',
|
|
606
|
+
subText: 'Simplified one-click checkout'
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
id: 10,
|
|
610
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/ads_app.png',
|
|
611
|
+
appName: 'marketing',
|
|
612
|
+
checkKey: 'marketing',
|
|
613
|
+
displayName: 'Ads',
|
|
614
|
+
subText: 'Digital and influencer marketing & more '
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
financial_servicea: [{
|
|
618
|
+
id: 12,
|
|
619
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/capital_app.png',
|
|
620
|
+
appName: 'capital',
|
|
621
|
+
checkKey: 'Capital',
|
|
622
|
+
displayName: 'Capital',
|
|
623
|
+
subText: 'Flexible Business loan up to ₹20 Lakhs'
|
|
624
|
+
}, {
|
|
625
|
+
id: 13,
|
|
626
|
+
appLogo: 'https://sr-cdn-1.shiprocket.in/img/credit_score.png',
|
|
627
|
+
appName: 'creditScore',
|
|
628
|
+
checkKey: 'Credit Score',
|
|
629
|
+
displayName: 'Credit Score',
|
|
630
|
+
subText: 'Check your credit score for free '
|
|
631
|
+
}]
|
|
632
|
+
};
|
|
510
633
|
this.isMobileView = false;
|
|
511
634
|
this.MOBILE_BREAKPOINT = 768;
|
|
512
635
|
this.user = user;
|
|
513
636
|
this.appSwitchList = [];
|
|
514
|
-
|
|
637
|
+
this.coreStrengthImages = [
|
|
638
|
+
{
|
|
639
|
+
id: 1,
|
|
640
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_1.png',
|
|
641
|
+
altText: 'Core Strength 1'
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
id: 2,
|
|
645
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_2.png',
|
|
646
|
+
altText: 'Core Strength 2'
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
id: 3,
|
|
650
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_3.png',
|
|
651
|
+
altText: 'Core Strength 3'
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
id: 4,
|
|
655
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_4.png',
|
|
656
|
+
altText: 'Core Strength 4'
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: 5,
|
|
660
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_5.png',
|
|
661
|
+
altText: 'Core Strength 5'
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
id: 6,
|
|
665
|
+
imgSrc: 'https://sr-cdn-1.shiprocket.in/img/switcher_6.png',
|
|
666
|
+
altText: 'Core Strength 6'
|
|
667
|
+
}
|
|
668
|
+
];
|
|
515
669
|
this.resizeListener = () => {
|
|
516
670
|
// Clear the timeout if it exists
|
|
517
671
|
if (this.resizeTimeout) {
|
|
@@ -527,12 +681,26 @@ class SwitcherComponent {
|
|
|
527
681
|
this.appSwitcherService.showAppSwitchListToDiffUser();
|
|
528
682
|
this.appSwitchList = this.appSwitcherService.appSwitchList;
|
|
529
683
|
}
|
|
530
|
-
openModal() {
|
|
684
|
+
openModal(param) {
|
|
685
|
+
var _a;
|
|
531
686
|
this.isModalOpen = true;
|
|
687
|
+
this.showProducts = false;
|
|
532
688
|
const sidebar = document.querySelector('app-sidebar');
|
|
533
689
|
if (sidebar) {
|
|
534
690
|
sidebar.setAttribute('style', 'display: none');
|
|
535
691
|
}
|
|
692
|
+
this.getCompanyService();
|
|
693
|
+
setTimeout(() => {
|
|
694
|
+
this.showProducts = true;
|
|
695
|
+
}, 200);
|
|
696
|
+
if (param == 'mobile') {
|
|
697
|
+
this.userJson = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
|
|
698
|
+
this.company_id = this.userJson != null ? (_a = this.userJson) === null || _a === void 0 ? void 0 : _a.company_id : '';
|
|
699
|
+
this.appSwitcherService.send('All Products', 'All Products Mobile', 'Company Id: ' + this.company_id);
|
|
700
|
+
}
|
|
701
|
+
else if (param == 'desktop') {
|
|
702
|
+
this.appSwitcherService.send('All Products', 'All Products Desktop', 'Company Id: ' + this.company_id);
|
|
703
|
+
}
|
|
536
704
|
}
|
|
537
705
|
closeModal() {
|
|
538
706
|
this.isModalOpen = false;
|
|
@@ -542,17 +710,15 @@ class SwitcherComponent {
|
|
|
542
710
|
}
|
|
543
711
|
}
|
|
544
712
|
ngOnInit() {
|
|
545
|
-
|
|
546
|
-
this.
|
|
547
|
-
|
|
713
|
+
var _a;
|
|
714
|
+
this.userJson = JSON.parse(localStorage.getItem('ngStorage-USER') || localStorage.getItem('_userData') || '{}');
|
|
715
|
+
this.company_id = this.userJson != null ? (_a = this.userJson) === null || _a === void 0 ? void 0 : _a.company_id : '';
|
|
548
716
|
if (this.data) {
|
|
549
717
|
const appsToRemove = this.data.split(',').map(app => app.trim());
|
|
550
|
-
// Filter each category in appSwitcherApps
|
|
551
718
|
Object.keys(this.appSwitcherApps).forEach((category) => {
|
|
552
719
|
this.appSwitcherApps[category] = this.appSwitcherApps[category].filter((app) => !appsToRemove.includes(app.appName));
|
|
553
720
|
});
|
|
554
721
|
}
|
|
555
|
-
this.getKYCData();
|
|
556
722
|
}
|
|
557
723
|
ngOnDestroy() {
|
|
558
724
|
this.windowRef.nativeWindow.removeEventListener('resize', this.resizeListener);
|
|
@@ -561,8 +727,10 @@ class SwitcherComponent {
|
|
|
561
727
|
}
|
|
562
728
|
}
|
|
563
729
|
checkScreenSize() {
|
|
564
|
-
|
|
565
|
-
this.
|
|
730
|
+
const width = this.windowRef.nativeWindow.innerWidth;
|
|
731
|
+
this.isMobileView = width < this.MOBILE_BREAKPOINT;
|
|
732
|
+
this.isDesktop = width >= 768;
|
|
733
|
+
document.body.classList.toggle('mobile-view', this.isMobileView);
|
|
566
734
|
}
|
|
567
735
|
getKYCData() {
|
|
568
736
|
this._http.get(`settings/international/kyc/details?company_id=${this.userData.company_id}`).subscribe((res) => {
|
|
@@ -573,16 +741,117 @@ class SwitcherComponent {
|
|
|
573
741
|
}, (error) => {
|
|
574
742
|
});
|
|
575
743
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
744
|
+
getBaseUrl() {
|
|
745
|
+
const currentUrl = window.location.hostname;
|
|
746
|
+
if (currentUrl.includes('multichannel-channels-partnerships-qa-web.kartrocket.com')) {
|
|
747
|
+
return 'https://multichannel-channels-partnerships-qa-api.kartrocket.com/v1/';
|
|
748
|
+
}
|
|
749
|
+
else if (currentUrl.includes('app.shiprocket.in')) {
|
|
750
|
+
return 'https://apiv2.shiprocket.co/v1/';
|
|
751
|
+
}
|
|
752
|
+
else {
|
|
753
|
+
return 'https://apiv2.shiprocket.co/v1/';
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
analyticsevent(item) {
|
|
757
|
+
this.appSwitcherService.send('Switcher Service Selection', 'Recent Used Product', 'App: ' + item.displayName);
|
|
758
|
+
}
|
|
759
|
+
analyticsevent_mobile(item) {
|
|
760
|
+
this.appSwitcherService.send('Switcher Service Selection Mobile', 'Mobile Product Selection', 'App: ' + item.displayName);
|
|
761
|
+
}
|
|
762
|
+
callEvent(type, displayName) {
|
|
763
|
+
// List of apps that require API call before redirection
|
|
764
|
+
const apiFirstApps = [
|
|
765
|
+
'rocketbox', 'marketing', 'internationalParcels',
|
|
766
|
+
'i_rocketbox', 'brand_launch', 'express_parcel',
|
|
767
|
+
'srocketbox', 'somuni'
|
|
768
|
+
];
|
|
769
|
+
// If not in apiFirstApps list, redirect immediately
|
|
770
|
+
if (!apiFirstApps.includes(type)) {
|
|
771
|
+
this.appSwitcherService.appSwitch(type, this.kycStatus);
|
|
772
|
+
}
|
|
773
|
+
this.appSwitcherService.send('Swithcer Service Selection', displayName, 'Company Id : ' + this.company_id);
|
|
774
|
+
// Find the app object across all categories that matches the displayName
|
|
775
|
+
let appId;
|
|
776
|
+
let clickedApp;
|
|
777
|
+
Object.values(this.appSwitcherApps).forEach((category) => {
|
|
778
|
+
const categoryArray = category;
|
|
779
|
+
const app = categoryArray.find(app => app.displayName === displayName);
|
|
780
|
+
if (app) {
|
|
781
|
+
appId = app.id;
|
|
782
|
+
clickedApp = app;
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
const data = {
|
|
786
|
+
service_id: appId.toString()
|
|
787
|
+
};
|
|
788
|
+
const headers = {
|
|
789
|
+
'Content-Type': 'application/json',
|
|
790
|
+
'Authorization': 'Bearer ' + this.userData.token
|
|
791
|
+
};
|
|
792
|
+
this._http.post(`${this.getBaseUrl()}settings/company-service`, data, { headers }).subscribe((res) => {
|
|
793
|
+
// API call complete, but we don't wait for it
|
|
794
|
+
}, (error) => { });
|
|
795
|
+
// Handle UI updates and navigation independently with timeout
|
|
796
|
+
setTimeout(() => {
|
|
797
|
+
if (clickedApp) {
|
|
798
|
+
const newRecentProduct = {
|
|
799
|
+
appName: clickedApp.appName,
|
|
800
|
+
appLogo: clickedApp.appLogo,
|
|
801
|
+
displayName: clickedApp.displayName
|
|
802
|
+
};
|
|
803
|
+
// Remove the clicked item if it exists
|
|
804
|
+
this.recentUsedProducts = this.recentUsedProducts.filter(item => item.displayName !== displayName);
|
|
805
|
+
// Add new item at the beginning
|
|
806
|
+
this.recentUsedProducts.unshift(newRecentProduct);
|
|
807
|
+
// Keep only the first 4 elements
|
|
808
|
+
this.recentUsedProducts = this.recentUsedProducts.slice(0, 4);
|
|
809
|
+
// For apps in apiFirstApps list, redirect after timeout
|
|
810
|
+
if (apiFirstApps.includes(type)) {
|
|
811
|
+
this.appSwitcherService.appSwitch(type, this.kycStatus);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}, 500); // 500ms timeout
|
|
815
|
+
}
|
|
816
|
+
appSwitch(app, analyticsevent) {
|
|
817
|
+
if (analyticsevent == 'recentUsedProduct') {
|
|
818
|
+
this.analyticsevent(app);
|
|
819
|
+
}
|
|
820
|
+
else if (analyticsevent == 'mobileProductSelection') {
|
|
821
|
+
this.analyticsevent_mobile(app);
|
|
822
|
+
}
|
|
823
|
+
this.appSwitcherService.appSwitch(app.appName);
|
|
579
824
|
}
|
|
580
|
-
|
|
581
|
-
|
|
825
|
+
getCompanyService() {
|
|
826
|
+
const headers = {
|
|
827
|
+
'Content-Type': 'application/json',
|
|
828
|
+
'Authorization': 'Bearer ' + this.userData.token
|
|
829
|
+
};
|
|
830
|
+
this._http.get(`${this.getBaseUrl()}settings/company-service`, { headers }).subscribe((res) => {
|
|
831
|
+
this.appSwitchList = res.data;
|
|
832
|
+
// Map the API response to recentUsedProducts
|
|
833
|
+
this.recentUsedProducts = res.data.map((item) => {
|
|
834
|
+
// Search for matching app across all categories
|
|
835
|
+
let matchedApp;
|
|
836
|
+
Object.values(this.appSwitcherApps).forEach((category) => {
|
|
837
|
+
const categoryArray = category;
|
|
838
|
+
const app = categoryArray.find(app => app.id === item.service_id);
|
|
839
|
+
if (app) {
|
|
840
|
+
matchedApp = app;
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
// Return mapped object if match found, otherwise return null
|
|
844
|
+
return matchedApp ? {
|
|
845
|
+
appName: matchedApp.appName,
|
|
846
|
+
appLogo: matchedApp.appLogo,
|
|
847
|
+
displayName: matchedApp.displayName
|
|
848
|
+
} : null;
|
|
849
|
+
}).filter((item) => item !== null);
|
|
850
|
+
});
|
|
582
851
|
}
|
|
583
852
|
}
|
|
584
853
|
SwitcherComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SwitcherComponent, deps: [{ token: AppSwitcherService }, { token: i2.HttpClient }, { token: WindowRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
585
|
-
SwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SwitcherComponent, selector: "lib-switcher", inputs: { data: "data" }, ngImport: i0, 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.NgIf, selector: "[ngIf]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]" }], animations: [
|
|
854
|
+
SwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SwitcherComponent, selector: "lib-switcher", inputs: { data: "data" }, ngImport: i0, 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.NgIf, selector: "[ngIf]" }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]" }], animations: [
|
|
586
855
|
trigger('modalAnimation', [
|
|
587
856
|
transition(':enter', [
|
|
588
857
|
style({ opacity: 0, transform: 'scale(0.8)' }),
|
|
@@ -591,6 +860,13 @@ SwitcherComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
591
860
|
transition(':leave', [
|
|
592
861
|
animate('200ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
593
862
|
])
|
|
863
|
+
]),
|
|
864
|
+
// ... other animations ...
|
|
865
|
+
trigger('slideDown', [
|
|
866
|
+
transition(':enter', [
|
|
867
|
+
style({ transform: 'translateY(-20px)', opacity: 0 }),
|
|
868
|
+
animate('300ms ease-out', style({ transform: 'translateY(0)', opacity: 1 }))
|
|
869
|
+
])
|
|
594
870
|
])
|
|
595
871
|
] });
|
|
596
872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SwitcherComponent, decorators: [{
|
|
@@ -608,6 +884,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
608
884
|
transition(':leave', [
|
|
609
885
|
animate('200ms ease-in', style({ opacity: 0, transform: 'scale(0.8)' }))
|
|
610
886
|
])
|
|
887
|
+
]),
|
|
888
|
+
// ... other animations ...
|
|
889
|
+
trigger('slideDown', [
|
|
890
|
+
transition(':enter', [
|
|
891
|
+
style({ transform: 'translateY(-20px)', opacity: 0 }),
|
|
892
|
+
animate('300ms ease-out', style({ transform: 'translateY(0)', opacity: 1 }))
|
|
893
|
+
])
|
|
611
894
|
])
|
|
612
895
|
]
|
|
613
896
|
}]
|