simpo-component-library 1.4.9 → 1.4.10
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/esm2022/lib/ecommerce/json/user-cart.json +9 -22
- package/esm2022/lib/ecommerce/json/user-details.json +14 -0
- package/esm2022/lib/ecommerce/json/user-favourite.json +2 -14
- package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +3 -1
- package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +4 -4
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +1 -1
- package/esm2022/lib/ecommerce/sections/whislist/whislist.component.mjs +3 -3
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +2 -2
- package/esm2022/lib/ecommerce/styles/cart.modal.mjs +12 -2
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +13 -7
- package/esm2022/lib/services/cart.service.mjs +29 -8
- package/esm2022/lib/services/rest.service.mjs +12 -1
- package/fesm2022/simpo-component-library.mjs +96 -53
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/background-directive.d.ts +1 -1
- package/lib/directive/button-directive.directive.d.ts +1 -1
- package/lib/directive/color.directive.d.ts +1 -1
- package/lib/ecommerce/styles/cart.modal.d.ts +4 -2
- package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
- package/lib/services/cart.service.d.ts +7 -3
- package/lib/services/rest.service.d.ts +4 -0
- package/package.json +1 -1
- package/simpo-component-library-1.4.10.tgz +0 -0
- package/simpo-component-library-1.4.9.tgz +0 -0
|
@@ -2983,34 +2983,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
2983
2983
|
args: ['simpoSticky']
|
|
2984
2984
|
}] } });
|
|
2985
2985
|
|
|
2986
|
-
var cartId = "";
|
|
2987
2986
|
var orderedItems$1 = [
|
|
2988
|
-
{
|
|
2989
|
-
itemId: "1ef50089-2cf0-6bdf-8ea9-b51e0a912f33",
|
|
2990
|
-
businessId: "21",
|
|
2991
|
-
itemName: "Anime T-Shirt",
|
|
2992
|
-
brandName: "Excee",
|
|
2993
|
-
imgUrl: "https://dev-beeos.s3.amazonaws.com/library-media/291611c1707983189501product-details-2.jpg.jpg",
|
|
2994
|
-
price: 120,
|
|
2995
|
-
itemTax: 10,
|
|
2996
|
-
quantity: 2,
|
|
2997
|
-
discountedPrice: 20,
|
|
2998
|
-
taxAfterDiscount: 10
|
|
2999
|
-
}
|
|
3000
2987
|
];
|
|
2988
|
+
var cartType$1 = "CART";
|
|
3001
2989
|
var billdetails$1 = {
|
|
3002
|
-
totalNetValue:
|
|
2990
|
+
totalNetValue: 0,
|
|
3003
2991
|
totalGrossValue: 0,
|
|
3004
|
-
totalTax:
|
|
2992
|
+
totalTax: 0,
|
|
3005
2993
|
totalOfferedValue: 0,
|
|
3006
2994
|
deliveryCharges: 0,
|
|
3007
2995
|
couponId: "",
|
|
3008
|
-
discountAmount:
|
|
2996
|
+
discountAmount: 0,
|
|
3009
2997
|
afterDiscountAmount: 0,
|
|
3010
2998
|
taxBreakup: {
|
|
3011
|
-
cgstValue:
|
|
3012
|
-
sgstValue:
|
|
3013
|
-
igstValue:
|
|
2999
|
+
cgstValue: 0,
|
|
3000
|
+
sgstValue: 0,
|
|
3001
|
+
igstValue: 0
|
|
3014
3002
|
}
|
|
3015
3003
|
};
|
|
3016
3004
|
var locationDetails$1 = {
|
|
@@ -3025,16 +3013,33 @@ var locationDetails$1 = {
|
|
|
3025
3013
|
pinCode: ""
|
|
3026
3014
|
};
|
|
3027
3015
|
var platform$1 = "WEB";
|
|
3028
|
-
var totalAmount$1 =
|
|
3016
|
+
var totalAmount$1 = 0;
|
|
3029
3017
|
var UserCart = {
|
|
3030
|
-
cartId: cartId,
|
|
3031
3018
|
orderedItems: orderedItems$1,
|
|
3019
|
+
cartType: cartType$1,
|
|
3032
3020
|
billdetails: billdetails$1,
|
|
3033
3021
|
locationDetails: locationDetails$1,
|
|
3034
3022
|
platform: platform$1,
|
|
3035
3023
|
totalAmount: totalAmount$1
|
|
3036
3024
|
};
|
|
3037
3025
|
|
|
3026
|
+
var user = {
|
|
3027
|
+
address: {
|
|
3028
|
+
},
|
|
3029
|
+
businessId: "",
|
|
3030
|
+
gender: "",
|
|
3031
|
+
id: "",
|
|
3032
|
+
contact: {
|
|
3033
|
+
countryCode: "",
|
|
3034
|
+
email: "",
|
|
3035
|
+
mobile: "",
|
|
3036
|
+
name: ""
|
|
3037
|
+
}
|
|
3038
|
+
};
|
|
3039
|
+
var UserDetails = {
|
|
3040
|
+
user: user
|
|
3041
|
+
};
|
|
3042
|
+
|
|
3038
3043
|
class RestService {
|
|
3039
3044
|
constructor(http, eventService) {
|
|
3040
3045
|
this.http = http;
|
|
@@ -3107,6 +3112,17 @@ class RestService {
|
|
|
3107
3112
|
const businessId = localStorage.getItem("bId") ?? "";
|
|
3108
3113
|
return this.http.put(this.BASE_URL + `ecommerce/user/authenticate?mobile=${mobile}&otp=${otp}&businessId=${businessId}`, null);
|
|
3109
3114
|
}
|
|
3115
|
+
addItemToDB(userCart) {
|
|
3116
|
+
return this.http.post(this.BASE_URL + `ecommerce/order/cart`, userCart);
|
|
3117
|
+
}
|
|
3118
|
+
getUserItems(userId, cartType) {
|
|
3119
|
+
return this.http.get(this.BASE_URL + `ecommerce/order/cart?userId=${userId}&cartType=${cartType}`);
|
|
3120
|
+
}
|
|
3121
|
+
placeOrder(cartId) {
|
|
3122
|
+
return this.http.post(this.BASE_URL + `ecommerce/order/order?cartId=${cartId}`, null);
|
|
3123
|
+
}
|
|
3124
|
+
toggleItemCartToFav() {
|
|
3125
|
+
}
|
|
3110
3126
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: RestService, deps: [{ token: i1$1.HttpClient }, { token: EventsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3111
3127
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: RestService, providedIn: 'root' }); }
|
|
3112
3128
|
}
|
|
@@ -3156,6 +3172,7 @@ class AuthenticateUserComponent {
|
|
|
3156
3172
|
verifyOTP() {
|
|
3157
3173
|
this.restService.verifyOTP(this.mobile ?? "", this.otpString).subscribe((response) => {
|
|
3158
3174
|
// localStorage.setItem("userId", response.userId);
|
|
3175
|
+
UserDetails.user = response.data;
|
|
3159
3176
|
if (this.dialogRef)
|
|
3160
3177
|
this.dialogRef.close();
|
|
3161
3178
|
});
|
|
@@ -3211,14 +3228,19 @@ class NavbarSectionComponent {
|
|
|
3211
3228
|
this.router.navigate(['/whislist']);
|
|
3212
3229
|
}
|
|
3213
3230
|
goToAccount() {
|
|
3214
|
-
if (
|
|
3231
|
+
if (UserDetails.user.id.length > 0) {
|
|
3215
3232
|
this.router.navigate(['/profile']);
|
|
3233
|
+
}
|
|
3216
3234
|
else {
|
|
3217
|
-
this.
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3235
|
+
if (this.screenWidth <= 475)
|
|
3236
|
+
this.router.navigate(['/auth']);
|
|
3237
|
+
else {
|
|
3238
|
+
this.matDialog.open(AuthenticateUserComponent, {
|
|
3239
|
+
height: '50vh',
|
|
3240
|
+
width: '35vw',
|
|
3241
|
+
data: this.data
|
|
3242
|
+
});
|
|
3243
|
+
}
|
|
3222
3244
|
}
|
|
3223
3245
|
}
|
|
3224
3246
|
goToCart() {
|
|
@@ -4500,19 +4522,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4500
4522
|
}] } });
|
|
4501
4523
|
|
|
4502
4524
|
var orderedItems = [
|
|
4503
|
-
{
|
|
4504
|
-
itemId: "1ef50089-2cf0-6bdf-8ea9-b51e0a912f33",
|
|
4505
|
-
businessId: "21",
|
|
4506
|
-
itemName: "Anime T-Shirt",
|
|
4507
|
-
brandName: "Excee",
|
|
4508
|
-
imgUrl: "https://dev-beeos.s3.amazonaws.com/library-media/291611c1707983189501product-details-2.jpg.jpg",
|
|
4509
|
-
price: 120,
|
|
4510
|
-
itemTax: 10,
|
|
4511
|
-
quantity: 2,
|
|
4512
|
-
discountedPrice: 20,
|
|
4513
|
-
taxAfterDiscount: 10
|
|
4514
|
-
}
|
|
4515
4525
|
];
|
|
4526
|
+
var cartType = "WISHLIST";
|
|
4516
4527
|
var billdetails = {
|
|
4517
4528
|
totalNetValue: 0,
|
|
4518
4529
|
totalGrossValue: 0,
|
|
@@ -4543,6 +4554,7 @@ var platform = "WEB";
|
|
|
4543
4554
|
var totalAmount = 0;
|
|
4544
4555
|
var UserFavourite = {
|
|
4545
4556
|
orderedItems: orderedItems,
|
|
4557
|
+
cartType: cartType,
|
|
4546
4558
|
billdetails: billdetails,
|
|
4547
4559
|
locationDetails: locationDetails,
|
|
4548
4560
|
platform: platform,
|
|
@@ -4555,7 +4567,7 @@ class OrderedItems {
|
|
|
4555
4567
|
this.businessId = json?.["businessId"];
|
|
4556
4568
|
this.itemName = json?.["name"];
|
|
4557
4569
|
this.brandName = json?.["brandName"];
|
|
4558
|
-
this.imgUrl = json?.["itemImages"]?.[0];
|
|
4570
|
+
this.imgUrl = json?.["itemImages"]?.[0]?.["imgUrl"];
|
|
4559
4571
|
this.price = json?.["price"]?.["value"];
|
|
4560
4572
|
this.itemTax = json?.["price"]?.["taxAmount"];
|
|
4561
4573
|
this.quantity = json?.["quantity"];
|
|
@@ -4571,12 +4583,14 @@ class OrderedItems {
|
|
|
4571
4583
|
}
|
|
4572
4584
|
|
|
4573
4585
|
class CartService {
|
|
4574
|
-
constructor() {
|
|
4586
|
+
constructor(restService) {
|
|
4587
|
+
this.restService = restService;
|
|
4588
|
+
}
|
|
4575
4589
|
addItemToCart(product) {
|
|
4576
|
-
this.storeItemToJSON(UserCart, product);
|
|
4590
|
+
this.storeItemToJSON(UserCart, product, "CART");
|
|
4577
4591
|
}
|
|
4578
4592
|
addItemToFavourite(product) {
|
|
4579
|
-
this.storeItemToJSON(UserFavourite, product);
|
|
4593
|
+
this.storeItemToJSON(UserFavourite, product, "WISHLIST");
|
|
4580
4594
|
}
|
|
4581
4595
|
removeItemToFavourite(product) {
|
|
4582
4596
|
const index = this.getItemIdxJSON(product.itemId, UserFavourite);
|
|
@@ -4599,7 +4613,7 @@ class CartService {
|
|
|
4599
4613
|
UserFavourite.orderedItems.push(item);
|
|
4600
4614
|
}
|
|
4601
4615
|
}
|
|
4602
|
-
storeItemToJSON(json, product) {
|
|
4616
|
+
storeItemToJSON(json, product, type) {
|
|
4603
4617
|
const orderProduct = this.objectMapper(product);
|
|
4604
4618
|
let productIndex = -1;
|
|
4605
4619
|
json.orderedItems.forEach((p, idx) => {
|
|
@@ -4631,7 +4645,7 @@ class CartService {
|
|
|
4631
4645
|
if (productIndex == -1)
|
|
4632
4646
|
return 0;
|
|
4633
4647
|
else
|
|
4634
|
-
return UserCart.orderedItems[productIndex].
|
|
4648
|
+
return UserCart.orderedItems[productIndex].getQuantity;
|
|
4635
4649
|
}
|
|
4636
4650
|
getIsItemPresent(itemId, type) {
|
|
4637
4651
|
return type == "FAVOURITE" ? this.getItemIdxJSON(itemId, UserFavourite) >= 0 : this.getItemIdxJSON(itemId, UserCart) >= 0;
|
|
@@ -4647,7 +4661,24 @@ class CartService {
|
|
|
4647
4661
|
objectMapper(product) {
|
|
4648
4662
|
return new OrderedItems(product);
|
|
4649
4663
|
}
|
|
4650
|
-
|
|
4664
|
+
storeJSONToDB() {
|
|
4665
|
+
this.restService.addItemToDB(UserCart).subscribe((response) => { });
|
|
4666
|
+
this.restService.addItemToDB(UserFavourite).subscribe((response) => { });
|
|
4667
|
+
}
|
|
4668
|
+
storeDBToJSON() {
|
|
4669
|
+
const userId = UserDetails.user.id;
|
|
4670
|
+
this.restService.getUserItems(userId, "CART").subscribe((response) => {
|
|
4671
|
+
UserCart.orderedItems = response.data.orderedItems;
|
|
4672
|
+
UserCart.billdetails = response.data.billdetails;
|
|
4673
|
+
UserCart.totalAmount = response.totalAmount;
|
|
4674
|
+
});
|
|
4675
|
+
this.restService.getUserItems(userId, "WISHLIST").subscribe((response) => {
|
|
4676
|
+
UserFavourite.orderedItems = response.data.orderedItems;
|
|
4677
|
+
UserFavourite.billdetails = response.data.billdetails;
|
|
4678
|
+
UserFavourite.totalAmount = response.totalAmount;
|
|
4679
|
+
});
|
|
4680
|
+
}
|
|
4681
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, deps: [{ token: RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4651
4682
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, providedIn: 'root' }); }
|
|
4652
4683
|
}
|
|
4653
4684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartService, decorators: [{
|
|
@@ -4655,7 +4686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4655
4686
|
args: [{
|
|
4656
4687
|
providedIn: 'root',
|
|
4657
4688
|
}]
|
|
4658
|
-
}], ctorParameters: () => [] });
|
|
4689
|
+
}], ctorParameters: () => [{ type: RestService }] });
|
|
4659
4690
|
|
|
4660
4691
|
class FeaturedProductsComponent extends BaseSection {
|
|
4661
4692
|
constructor(platformId, _eventService, restService, router, cartService) {
|
|
@@ -5143,8 +5174,8 @@ class CartComponent extends BaseSection {
|
|
|
5143
5174
|
this.cartService = cartService;
|
|
5144
5175
|
}
|
|
5145
5176
|
ngOnInit() {
|
|
5177
|
+
this.cartService.storeDBToJSON();
|
|
5146
5178
|
this.responseData = UserCart;
|
|
5147
|
-
console.log(this.responseData);
|
|
5148
5179
|
this.styles = this.data?.styles;
|
|
5149
5180
|
}
|
|
5150
5181
|
proceedToCheckout() {
|
|
@@ -5169,7 +5200,7 @@ class CartComponent extends BaseSection {
|
|
|
5169
5200
|
this.cartService.addItemToCart(item);
|
|
5170
5201
|
}
|
|
5171
5202
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: CartComponent, deps: [{ token: EventsService }, { token: CartService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: CartComponent, isStandalone: true, selector: "simpo-cart", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl
|
|
5203
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: CartComponent, isStandalone: true, selector: "simpo-cart", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.billdetails?.totalNetValue\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.totalNetValue}}</div>\r\n </div>\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.billdetails?.totalTax\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{responseData?.billdetails?.totalTax}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.totalAmount\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{responseData.totalAmount}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n</section>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;width:90px;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged"], outputs: ["edit"] }, { kind: "component", type: DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "directive", type:
|
|
5173
5204
|
//DIRECTIVE
|
|
5174
5205
|
ButtonDirectiveDirective, selector: "[simpoButtonDirective]", inputs: ["buttonStyle", "color", "scrollValue"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }] }); }
|
|
5175
5206
|
}
|
|
@@ -5183,7 +5214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5183
5214
|
AnimationDirective,
|
|
5184
5215
|
ContentFitDirective,
|
|
5185
5216
|
HoverDirective
|
|
5186
|
-
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl
|
|
5217
|
+
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Bag <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n <div class=\"cart-items\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToCart(item, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-4 position-relative\" style=\"margin-left: auto;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"delete-item\" (click)=\"removeItem(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n <hr *ngIf=\"responseData?.orderedItems?.length != (idx +1)\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"right-panel\">\r\n <div class=\"my-bag\">\r\n Price Details\r\n </div>\r\n <div class=\"price-details\">\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.billdetails?.totalNetValue\">\r\n <div class=\"price-type\">Total Price</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.totalNetValue}}</div>\r\n </div>\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.billdetails?.totalTax\">\r\n <div class=\"price-type\">Total Tax</div>\r\n <div class=\"price-value\">₹ {{responseData?.billdetails?.totalTax}}</div>\r\n </div>\r\n <div class=\"price-parent-block\"\r\n *ngIf=\"responseData?.billdetails?.deliveryCharges && responseData.billdetails.deliveryCharges > 0\">\r\n <div class=\"price-type\">Delivery Charge</div>\r\n <div class=\"price-value\">₹ {{responseData.billdetails.deliveryCharges}}</div>\r\n </div>\r\n <hr>\r\n <div class=\"price-parent-block\" *ngIf=\"responseData?.totalAmount\">\r\n <div class=\"price-type\" style=\"color: black;font-weight: 600;\">Total Amount</div>\r\n <div class=\"price-value\" style=\"font-weight: 600;\">₹ {{responseData.totalAmount}}</div>\r\n </div>\r\n\r\n <div class=\"button-parent\">\r\n <div *ngFor=\"let button of data?.action?.buttons;let i = index\">\r\n <button class=\"btn\" (click)=\"i == 0 ? proceedToCheckout() : proceedToListPage()\" simpoButtonDirective [id]=\"data?.id+button.id\" [buttonStyle]=\"button?.styles\"\r\n [color]=\"styles?.background?.accentColor\">{{button?.content?.label}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your cart is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your cart. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n</section>\r\n", styles: [".cart-parent{display:flex;margin-top:15px;gap:20px}.left-panel{width:65%}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029}.right-panel{width:35%}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;width:90px;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.left-panel,.right-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}}\n"] }]
|
|
5187
5218
|
}], ctorParameters: () => [{ type: EventsService }, { type: CartService }], propDecorators: { data: [{
|
|
5188
5219
|
type: Input
|
|
5189
5220
|
}], responseData: [{
|
|
@@ -5260,7 +5291,7 @@ class WhislistComponent {
|
|
|
5260
5291
|
this.cartService.addItemToFavourite(item);
|
|
5261
5292
|
}
|
|
5262
5293
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: WhislistComponent, deps: [{ token: CartService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: WhislistComponent, isStandalone: true, selector: "simpo-whislist", inputs: { responseData: "responseData", data: "data", index: "index", edit: "edit", delete: "delete" }, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Whislist <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n \r\n <div class=\"d-flex flex-wrap justify-content-between\" style=\"gap: 10px;\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"cart-items\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl
|
|
5294
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: WhislistComponent, isStandalone: true, selector: "simpo-whislist", inputs: { responseData: "responseData", data: "data", index: "index", edit: "edit", delete: "delete" }, ngImport: i0, template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Whislist <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n \r\n <div class=\"d-flex flex-wrap justify-content-between\" style=\"gap: 10px;\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"cart-items\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100 item-desc\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <span class=\"cursor\" (click)=\"addToFav(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToFav(item, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"position-relative itemPrice\" style=\"margin-left: auto; width: 30%;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"cart-item\" (click)=\"moveToCart(item)\">add_shopping_cart</mat-icon>\r\n <mat-icon class=\"delete-item\" (click)=\"deleteFromWhislist(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your Whislist is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your Whislist. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n \r\n </section>", styles: [".cart-parent{display:flex;flex-wrap:wrap;margin-top:15px;gap:20px}.left-panel{width:100%}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;width:48%;display:flex;flex-wrap:wrap}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0;width:100%}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.cart-item{position:absolute;right:50px;bottom:10px;cursor:pointer}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;width:90px;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.item-parent{flex-direction:row!important;flex-wrap:nowrap!important}.cart-items,.left-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}.item-desc{width:50%}.itemPrice{width:25%}}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }] }); }
|
|
5264
5295
|
}
|
|
5265
5296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: WhislistComponent, decorators: [{
|
|
5266
5297
|
type: Component,
|
|
@@ -5273,7 +5304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5273
5304
|
AnimationDirective,
|
|
5274
5305
|
ContentFitDirective,
|
|
5275
5306
|
HoverDirective
|
|
5276
|
-
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Whislist <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n \r\n <div class=\"d-flex flex-wrap justify-content-between\" style=\"gap: 10px;\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"cart-items\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl
|
|
5307
|
+
], template: "<section class=\"total-container\" [id]=\"data?.id\" [simpoLayout]=\"styles?.layout\">\r\n <div class=\"cart-parent container\" *ngIf=\"(responseData?.orderedItems?.length || 0) > 0\" [id]=\"data?.id\" [simpoAnimation]=\"styles?.animation\">\r\n <div class=\"left-panel\">\r\n <div class=\"my-bag\">\r\n My Whislist <span>({{responseData?.orderedItems?.length}} Items)</span>\r\n </div>\r\n \r\n <div class=\"d-flex flex-wrap justify-content-between\" style=\"gap: 10px;\">\r\n <ng-container *ngFor=\"let item of responseData?.orderedItems; let idx = index\">\r\n <div class=\"cart-items\">\r\n <div class=\"row item-parent\">\r\n <div class=\"h-100\" style=\"padding: 0px; width: fit-content;\">\r\n <img class=\"product-img\" [src]=\"item.imgUrl\" alt=\"\">\r\n </div>\r\n <div class=\"col-md-6 h-100 item-desc\">\r\n <div class=\"lh-23\">\r\n <div class=\"item-name heading-large\">{{item.itemName}}</div>\r\n <div class=\"price-with-tax\">\r\n ₹ {{item.price + (item.itemTax ?? 0)}}\r\n </div>\r\n <div class=\"item-quantity\">\r\n <span class=\"cursor\" (click)=\"addToFav(item, 'SUBSTRACT')\">-</span>\r\n <span>{{item.quantity}}</span>\r\n <span class=\"cursor\" (click)=\"addToFav(item, 'ADD')\">+</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"position-relative itemPrice\" style=\"margin-left: auto; width: 30%;\">\r\n <div class=\"item-price\">₹ {{(item.price + (item.itemTax ?? 0)) * item.quantity}}</div>\r\n <div>\r\n <mat-icon class=\"cart-item\" (click)=\"moveToCart(item)\">add_shopping_cart</mat-icon>\r\n <mat-icon class=\"delete-item\" (click)=\"deleteFromWhislist(item)\">delete</mat-icon>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n \r\n <section class=\"empty-cart\" *ngIf=\"(responseData?.orderedItems?.length || 0) == 0\">\r\n <div>\r\n <div class=\"cart-image\">\r\n <img src=\"https://prod-simpo.s3.ap-south-1.amazonaws.com/prod-images/107213c1716543334040empty-cart.png\" alt=\"\">\r\n </div>\r\n <div class=\"cart-text\">\r\n <div class=\"heading-medium d-flex justify-content-center\">\r\n Your Whislist is empty\r\n </div>\r\n <div class=\"description d-flex mt-4\">\r\n Looks like you have not added anything to your Whislist. Go ahead & explore top categories.\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n \r\n </section>", styles: [".cart-parent{display:flex;flex-wrap:wrap;margin-top:15px;gap:20px}.left-panel{width:100%}.cart-items{padding:10px;margin-top:10px;margin-bottom:15px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;width:48%;display:flex;flex-wrap:wrap}.my-bag{font-size:16px;font-weight:600;color:#000}.my-bag span{color:#939393}.item-parent{margin:10px 0;width:100%}.lh-23{line-height:23px}.item-name{color:#141514;font-size:16px;line-height:30px;font-weight:600}.price-with-tax{font-weight:400;font-size:16px;color:#626262}.item-sku{font-weight:400;font-size:14px;color:#626262}.cart-item{position:absolute;right:50px;bottom:10px;cursor:pointer}.item-price{display:flex;justify-content:flex-end;font-weight:600;font-size:16px;color:#141514}.product-img{border-radius:5px;height:95px;width:100px;padding:0}.quantity-box{display:flex;gap:5px;align-items:center;border:1px solid #E8E8E8;width:45px;height:22px}.quantity-box input{outline:none;text-align:center;border:none;width:30px;height:100%}.quantity-box .plus{font-size:20px;position:relative;top:-3px;font-weight:500}.quantity-box .minus{font-size:30px;position:relative;top:-3px;font-weight:500}.delete-item{color:#626262;cursor:pointer}.item-quantity{margin-top:5px;display:flex;width:90px;border:1px solid lightgray;justify-content:space-between;align-items:center;padding:5px 10px;border-radius:3px}.coupon{display:flex;justify-content:space-between;border:1px solid #E8E8E8;border-radius:5px;padding:10px;margin-top:10px}.apply-coupon{font-weight:500;color:#626262;font-size:15px}.coupon-desc{color:#939393;font-size:12px;font-weight:500}.apply-coupon-btn{color:#0267c1;font-size:16px;font-weight:600}.price-details{padding:10px;margin-top:10px;border-radius:5px;box-shadow:0 0 1px #28293d14,0 0 2px #60617029;margin-bottom:15px}.price-parent-block{display:flex;justify-content:space-between;margin-top:5px}.price-type{font-weight:400;font-size:16px;color:#434443}.price-value{font-weight:500;font-size:18px;color:#141514}.button-parent{margin-top:20px;display:flex;flex-direction:column;gap:10px}hr{border:1px solid #E8E8E8}.btn{height:40px;font-size:16px!important}.cursor{cursor:pointer}.delete-item{text-align:right;position:absolute;right:16px;bottom:10px}.quantity{display:flex;border:2px solid #E6E6E6;align-items:center;gap:15px;height:47px;margin-top:1rem;border-radius:5px}.quantity .plus{position:relative;left:10px;font-size:18px;font-weight:600;cursor:pointer;color:#848484}.quantity .minus{position:relative;right:15px;font-size:18px;font-weight:600;color:#848484;cursor:pointer}.quantity input{width:60px;border:none;outline:none;text-align:center}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.cart-image{width:13%;display:flex;margin-right:auto;margin-left:auto}.cart-image img{width:100%}.heading-medium{font-weight:600;color:#000}.description{font-size:18px;color:#7f7676;margin-left:auto;margin-right:auto;width:30%;text-align:center}@media screen and (max-width: 475px){.cart-parent{flex-direction:column}.item-parent{flex-direction:row!important;flex-wrap:nowrap!important}.cart-items,.left-panel{width:100%}.cart-image{width:42%}.description{width:84%}.heading-medium{font-size:28px}.item-desc{width:50%}.itemPrice{width:25%}}\n"] }]
|
|
5277
5308
|
}], ctorParameters: () => [{ type: CartService }], propDecorators: { responseData: [{
|
|
5278
5309
|
type: Input
|
|
5279
5310
|
}], data: [{
|
|
@@ -5403,6 +5434,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5403
5434
|
type: Input
|
|
5404
5435
|
}] } });
|
|
5405
5436
|
|
|
5437
|
+
class Cart {
|
|
5438
|
+
constructor(json, type = null) {
|
|
5439
|
+
this.cartId = json?.["cartId"];
|
|
5440
|
+
this.pgOrderId = json?.["pgOrderId"];
|
|
5441
|
+
this.orderedItems = json?.["orderedItems"];
|
|
5442
|
+
this.billdetails = json?.["billdetails"];
|
|
5443
|
+
this.platform = json?.["platform"];
|
|
5444
|
+
this.locationDetails = json?.["locationDetails"];
|
|
5445
|
+
this.userDetails = json?.["userDetails"];
|
|
5446
|
+
}
|
|
5447
|
+
}
|
|
5448
|
+
|
|
5406
5449
|
class BaseCollection {
|
|
5407
5450
|
constructor(json) {
|
|
5408
5451
|
this.storeId = json?.["storeId"];
|
|
@@ -5484,5 +5527,5 @@ class Product {
|
|
|
5484
5527
|
* Generated bundle index. Do not edit.
|
|
5485
5528
|
*/
|
|
5486
5529
|
|
|
5487
|
-
export { AddNewSectionComponent, AlignContent, AnimationDirective, AuthenticateUserComponent, BANNERALIGNMENT, BANNERHALIGN, BackgroundDirective, BannerCarouselComponent, BannerContentFitDirective, BannerGridSectionComponent, BannerSectionComponent, BlogListComponent, BorderDirective, ButtonDirectiveDirective, CartComponent, Category, ChannelType, CheckoutComponent, ChooseUsSectionComponent, Collection, ColorDirective, ColumnDirectiveDirective, ContactUsComponent, ContainerFitDirective, ContentFitDirective, CornerDirective, Corners, EventsService, FaqSectionComponent, FeaturedCategoryComponent, FeaturedProductsComponent, FeaturesSectionComponent, FooterSectionComponent, FooterTypes, HALIGN, HeaderButtonStyle, HeaderTextComponent, HoverDirective, ImageCarouselSectionComponent, ImageDirectiveDirective, ImageFit, ImageGridSectionComponent, ImageRatio, ImageSectionComponent, LocationSectionComponent, LogoShowcaseComponent, MapType, NavbarSectionComponent, ObjectPositionDirective, OverlayDirective, OverlayValue, Padding, PositionLayoutDirectiveDirective, PricingSectionComponent, ProcessModernComponent, ProcessSectionComponent, Product, ProductDescComponent, ProductListComponent, RecentBlogPostSectionComponent, RedirectionLinkType, SPACING$1 as SPACING, ServiceSectionComponent, SimpoContainerAligment, SimpoFooterLayoutDirective, SimpoStickyDirective, SkeletonLoaderSectionComponent, Style, TEXT_SIZE, TeamMemberSectionComponent, TestimonialFullwidthComponent, TestimonialSectionComponent, TextBackgroundDirectiveDirective, TextImageSectionComponent, TextPosition, TextSectionComponent, UserProfileComponent, VALIGN, VideoSectionComponent, ViewBlogComponent, WhislistComponent, animation, applySpacing, applyStyle, contentAlignment, fitContent, fitScreen, fontSize, logoDirection, logoSpeed, logoType, mapStyle, showCaseType, simpoConetenAlignmentDirective };
|
|
5530
|
+
export { AddNewSectionComponent, AlignContent, AnimationDirective, AuthenticateUserComponent, BANNERALIGNMENT, BANNERHALIGN, BackgroundDirective, BannerCarouselComponent, BannerContentFitDirective, BannerGridSectionComponent, BannerSectionComponent, BlogListComponent, BorderDirective, ButtonDirectiveDirective, Cart, CartComponent, Category, ChannelType, CheckoutComponent, ChooseUsSectionComponent, Collection, ColorDirective, ColumnDirectiveDirective, ContactUsComponent, ContainerFitDirective, ContentFitDirective, CornerDirective, Corners, EventsService, FaqSectionComponent, FeaturedCategoryComponent, FeaturedProductsComponent, FeaturesSectionComponent, FooterSectionComponent, FooterTypes, HALIGN, HeaderButtonStyle, HeaderTextComponent, HoverDirective, ImageCarouselSectionComponent, ImageDirectiveDirective, ImageFit, ImageGridSectionComponent, ImageRatio, ImageSectionComponent, LocationSectionComponent, LogoShowcaseComponent, MapType, NavbarSectionComponent, ObjectPositionDirective, OverlayDirective, OverlayValue, Padding, PositionLayoutDirectiveDirective, PricingSectionComponent, ProcessModernComponent, ProcessSectionComponent, Product, ProductDescComponent, ProductListComponent, RecentBlogPostSectionComponent, RedirectionLinkType, SPACING$1 as SPACING, ServiceSectionComponent, SimpoContainerAligment, SimpoFooterLayoutDirective, SimpoStickyDirective, SkeletonLoaderSectionComponent, Style, TEXT_SIZE, TeamMemberSectionComponent, TestimonialFullwidthComponent, TestimonialSectionComponent, TextBackgroundDirectiveDirective, TextImageSectionComponent, TextPosition, TextSectionComponent, UserProfileComponent, VALIGN, VideoSectionComponent, ViewBlogComponent, WhislistComponent, animation, applySpacing, applyStyle, contentAlignment, fitContent, fitScreen, fontSize, logoDirection, logoSpeed, logoType, mapStyle, showCaseType, simpoConetenAlignmentDirective };
|
|
5488
5531
|
//# sourceMappingURL=simpo-component-library.mjs.map
|