simpo-component-library 2.0.18 → 2.0.19

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.
@@ -1,13 +1,15 @@
1
1
  import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
2
- import { Product } from '../ecommerce/styles/product.modal';
2
+ import { ItemVariant, Product } from '../ecommerce/styles/product.modal';
3
3
  import { RestService } from './rest.service';
4
4
  import { StorageServiceService } from './storage.service';
5
5
  import { Cart } from '../ecommerce/styles/cart.modal';
6
+ import { MessageService } from 'primeng/api';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class CartService {
8
9
  private readonly storageService;
9
10
  private readonly restService;
10
- constructor(storageService: StorageServiceService, restService: RestService);
11
+ private readonly messageService;
12
+ constructor(storageService: StorageServiceService, restService: RestService, messageService: MessageService);
11
13
  addItemFromCartPage(product: OrderedItems, userCart: any): import("rxjs").Observable<Object>;
12
14
  addItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
13
15
  removeItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
@@ -22,6 +24,9 @@ export declare class CartService {
22
24
  private objectMapper;
23
25
  storeCartDataToServer(cart: Cart): void;
24
26
  clearCartItems(): void;
27
+ addItemToLocalCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
28
+ isItemOutOfStock(product: Product): boolean;
29
+ getItemVarient(product: Product, varientId: string): ItemVariant | null;
25
30
  storeDataToServer(): void;
26
31
  static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
27
32
  static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
@@ -4,13 +4,15 @@ import { EventsService } from './events.service';
4
4
  import { CookieService } from 'ngx-cookie-service';
5
5
  import { RestService } from './rest.service';
6
6
  import { Router } from '@angular/router';
7
+ import { MessageService } from 'primeng/api';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class StorageServiceService {
9
10
  private readonly eventService;
10
11
  private readonly cookieService;
11
12
  private readonly restService;
12
13
  private router;
13
- constructor(eventService: EventsService, cookieService: CookieService, restService: RestService, router: Router);
14
+ private readonly messageService;
15
+ constructor(eventService: EventsService, cookieService: CookieService, restService: RestService, router: Router, messageService: MessageService);
14
16
  private totalCartItems;
15
17
  get getTotalCartItems(): number;
16
18
  databaseName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "2.0.18",
3
+ "version": "2.0.19",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file