simpo-component-library 2.0.19 → 2.0.21

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.
@@ -3603,12 +3603,11 @@ var cartType;
3603
3603
  })(cartType || (cartType = {}));
3604
3604
 
3605
3605
  class StorageServiceService {
3606
- constructor(eventService, cookieService, restService, router, messageService) {
3606
+ constructor(eventService, cookieService, restService, router) {
3607
3607
  this.eventService = eventService;
3608
3608
  this.cookieService = cookieService;
3609
3609
  this.restService = restService;
3610
3610
  this.router = router;
3611
- this.messageService = messageService;
3612
3611
  this.totalCartItems = 0;
3613
3612
  this.databaseName = "USER";
3614
3613
  this.databaseVersion = 1;
@@ -3879,7 +3878,7 @@ class StorageServiceService {
3879
3878
  storePaymentFor(paymentFor) {
3880
3879
  this.cookieService.set("paymentFor", paymentFor, 7);
3881
3880
  }
3882
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: EventsService }, { token: i2$2.CookieService }, { token: RestService }, { token: i2$3.Router }, { token: i5$1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, deps: [{ token: EventsService }, { token: i2$2.CookieService }, { token: RestService }, { token: i2$3.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
3883
3882
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, providedIn: 'root' }); }
3884
3883
  }
3885
3884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: StorageServiceService, decorators: [{
@@ -3887,7 +3886,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
3887
3886
  args: [{
3888
3887
  providedIn: 'root'
3889
3888
  }]
3890
- }], ctorParameters: () => [{ type: EventsService }, { type: i2$2.CookieService }, { type: RestService }, { type: i2$3.Router }, { type: i5$1.MessageService }] });
3889
+ }], ctorParameters: () => [{ type: EventsService }, { type: i2$2.CookieService }, { type: RestService }, { type: i2$3.Router }] });
3891
3890
 
3892
3891
  class UserBasicInfoComponent {
3893
3892
  constructor(restService, router, dialogRef, storageService, messageService) {
@@ -4589,10 +4588,9 @@ class OrderedItems {
4589
4588
  }
4590
4589
 
4591
4590
  class CartService {
4592
- constructor(storageService, restService, messageService) {
4591
+ constructor(storageService, restService) {
4593
4592
  this.storageService = storageService;
4594
4593
  this.restService = restService;
4595
- this.messageService = messageService;
4596
4594
  }
4597
4595
  addItemFromCartPage(product, userCart) {
4598
4596
  if (product.quantity) {
@@ -4669,10 +4667,10 @@ class CartService {
4669
4667
  this.storageService.clearUserCart();
4670
4668
  }
4671
4669
  addItemToLocalCart(product, type) {
4672
- if (this.isItemOutOfStock(product)) {
4673
- this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
4674
- return;
4675
- }
4670
+ // if (this.isItemOutOfStock(product)) {
4671
+ // // this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
4672
+ // return;
4673
+ // }
4676
4674
  if (!product?.quantity)
4677
4675
  product.quantity = 0;
4678
4676
  if (type == 'ADD') {
@@ -4739,7 +4737,7 @@ class CartService {
4739
4737
  // this.restService.addItemToDB(UserFavourites)
4740
4738
  // ]);
4741
4739
  }
4742
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, deps: [{ token: StorageServiceService }, { token: RestService }, { token: i5$1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4740
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, deps: [{ token: StorageServiceService }, { token: RestService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4743
4741
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, providedIn: 'root' }); }
4744
4742
  }
4745
4743
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CartService, decorators: [{
@@ -4747,7 +4745,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
4747
4745
  args: [{
4748
4746
  providedIn: 'root',
4749
4747
  }]
4750
- }], ctorParameters: () => [{ type: StorageServiceService }, { type: RestService }, { type: i5$1.MessageService }] });
4748
+ }], ctorParameters: () => [{ type: StorageServiceService }, { type: RestService }] });
4751
4749
 
4752
4750
  class CartComponent extends BaseSection {
4753
4751
  constructor(_eventService, cartService, router, restService, matDialog, storageService, messageService, bottomSheet, matDialogData, dialogRef) {
@@ -7850,6 +7848,10 @@ class FeaturedProductsComponent extends BaseSection {
7850
7848
  });
7851
7849
  }
7852
7850
  addItemToCart(product, type) {
7851
+ if (this.isItemOutOfStock(product)) {
7852
+ this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
7853
+ return;
7854
+ }
7853
7855
  this.cartService.addItemToLocalCart(product, type);
7854
7856
  }
7855
7857
  // addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT') {