simpo-component-library 1.4.19 → 1.4.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.
@@ -5,6 +5,8 @@ import { CartService } from '../../../services/cart.service';
5
5
  import { Router } from '@angular/router';
6
6
  import { MatDialog } from '@angular/material/dialog';
7
7
  import { RestService } from "../../../services/rest.service";
8
+ import { StorageServiceService } from '../../../services/storage.service';
9
+ import { CookieService } from 'ngx-cookie-service';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare class CartComponent extends BaseSection {
10
12
  private readonly _eventService;
@@ -12,6 +14,8 @@ export declare class CartComponent extends BaseSection {
12
14
  private readonly router;
13
15
  private readonly restService;
14
16
  private readonly matDialog;
17
+ private readonly storageService;
18
+ private readonly cookieService;
15
19
  data?: CartSectionModal;
16
20
  responseData?: any;
17
21
  index?: number;
@@ -20,7 +24,7 @@ export declare class CartComponent extends BaseSection {
20
24
  selectedAddressIdx: number;
21
25
  styles?: CartSectionStylesModel;
22
26
  currentTab: 'BAG' | 'ADDRESS' | 'PAYMENT';
23
- constructor(_eventService: EventsService, cartService: CartService, router: Router, restService: RestService, matDialog: MatDialog);
27
+ constructor(_eventService: EventsService, cartService: CartService, router: Router, restService: RestService, matDialog: MatDialog, storageService: StorageServiceService, cookieService: CookieService);
24
28
  ngOnInit(): void;
25
29
  proceedToCheckout(): void;
26
30
  proceedToListPage(): void;
@@ -35,7 +35,7 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
35
35
  addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
36
36
  toggleItemToFav(product: Product, type: 'ADD' | 'REMOVE'): void;
37
37
  proceedToProductDesc(productId: any): void;
38
- isItemFav(product: Product): number;
38
+ isItemFav(product: Product): boolean;
39
39
  togglePreviewImage(product: Product, idx: number): void;
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedProductsComponent, never>;
41
41
  static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedProductsComponent, "simpo-featured-products", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "isRelatedProduct": { "alias": "isRelatedProduct"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
@@ -1,6 +1,6 @@
1
1
  import { OrderedItems } from "./OrderedItems.modal";
2
2
  export declare class Cart {
3
- cartId: string;
3
+ cartId?: string;
4
4
  pgOrderId: string;
5
5
  orderedItems: OrderedItems[];
6
6
  billdetails: Billdetails;
@@ -23,8 +23,8 @@ export declare class BannerCarouselComponent extends BaseSection implements OnIn
23
23
  get stylesLayout(): LayOutModel;
24
24
  get getBlurValue(): OverlayValue | undefined;
25
25
  get getBackgroundColor(): BackgroundModel;
26
- get getBackgroundOpacity(): "0.2" | "0.3" | "0.5" | "0.7" | "0";
27
- opacityValue(value: OverlayValue): "0.2" | "0.3" | "0.5" | "0.7" | "0";
26
+ get getBackgroundOpacity(): "0" | "0.2" | "0.3" | "0.5" | "0.7";
27
+ opacityValue(value: OverlayValue): "0" | "0.2" | "0.3" | "0.5" | "0.7";
28
28
  editSection(): void;
29
29
  static ɵfac: i0.ɵɵFactoryDeclaration<BannerCarouselComponent, never>;
30
30
  static ɵcmp: i0.ɵɵComponentDeclaration<BannerCarouselComponent, "simpo-banner-carousel", never, { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
@@ -1,10 +1,12 @@
1
1
  import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
2
2
  import { Product } from '../ecommerce/styles/product.modal';
3
+ import { RestService } from './rest.service';
3
4
  import { StorageServiceService } from './storage.service';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class CartService {
6
7
  private readonly storageService;
7
- constructor(storageService: StorageServiceService);
8
+ private readonly restService;
9
+ constructor(storageService: StorageServiceService, restService: RestService);
8
10
  addItemToCart(product: Product): void;
9
11
  addItemToFavourite(product: Product): void;
10
12
  removeItemFromFavourite(product: Product): void;
@@ -13,7 +15,7 @@ export declare class CartService {
13
15
  getItemIdxJSON(itemId: string, type: 'FAVOURITE' | 'CART'): number;
14
16
  getItemByIdx(itemId: string, type: 'FAVOURITE' | 'CART'): OrderedItems | null;
15
17
  private objectMapper;
16
- storeDataToServer(): void;
18
+ storeDataToServer(): import("rxjs").Observable<[Object, Object]>;
17
19
  storeDBToJSON(): void;
18
20
  static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
19
21
  static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
@@ -20,7 +20,7 @@ export declare class RestService implements OnDestroy {
20
20
  verifyOTP(mobile: string, otp: string): Observable<Object>;
21
21
  resendOTP(mobile: string, countryCode: string): Observable<Object>;
22
22
  addItemToDB(userCart: any): Observable<Object>;
23
- getUserItems(userId: string, cartType: 'CART' | 'WISHLIST'): Observable<Object>;
23
+ getUserItems(userId: string, cartType: 'CART' | 'WISHLIST'): any;
24
24
  placeOrder(cartId: string): Observable<Object>;
25
25
  getUserInfo(userId: string): Observable<Object>;
26
26
  addUserAddress(user: any): Observable<Object>;
@@ -1,10 +1,14 @@
1
1
  import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
2
2
  import { User } from '../ecommerce/styles/user.modal';
3
3
  import { EventsService } from './events.service';
4
+ import { CookieService } from 'ngx-cookie-service';
5
+ import { RestService } from './rest.service';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class StorageServiceService {
6
8
  private readonly eventService;
7
- constructor(eventService: EventsService);
9
+ private readonly cookieService;
10
+ private readonly restService;
11
+ constructor(eventService: EventsService, cookieService: CookieService, restService: RestService);
8
12
  databaseName: string;
9
13
  databaseVersion: number;
10
14
  cartCollectionName: string;
@@ -16,6 +20,47 @@ export declare class StorageServiceService {
16
20
  userCollectionRef: IDBObjectStore | null;
17
21
  createDataBase(): Promise<void>;
18
22
  storeDataToJSON(): Promise<void>;
23
+ calculateBillingDetails(): {
24
+ orderedItems: never[];
25
+ cartType: string;
26
+ billdetails: {
27
+ totalNetValue: number;
28
+ totalGrossValue: number;
29
+ totalTax: number;
30
+ totalOfferedValue: number;
31
+ deliveryCharges: number;
32
+ couponId: string;
33
+ discountAmount: number;
34
+ afterDiscountAmount: number;
35
+ taxBreakup: {
36
+ cgstValue: number;
37
+ sgstValue: number;
38
+ igstValue: number;
39
+ };
40
+ };
41
+ userDetails: {
42
+ userId: string;
43
+ userName: string;
44
+ mobile: string;
45
+ email: string;
46
+ pinCode: string;
47
+ };
48
+ locationDetails: {
49
+ countryId: string;
50
+ cityId: string;
51
+ stateId: string;
52
+ localityId: string;
53
+ countryName: string;
54
+ cityName: string;
55
+ stateName: string;
56
+ localityName: string;
57
+ pinCode: string;
58
+ };
59
+ platform: string;
60
+ totalAmount: number;
61
+ cartId: string;
62
+ };
63
+ updateAllData(): void;
19
64
  getUserCart(): Promise<IDBRequest<any[]>>;
20
65
  addProductToCart(product: OrderedItems): IDBRequest<IDBValidKey>;
21
66
  removeProductFromCart(productId: string): IDBRequest<undefined>;
@@ -25,7 +70,7 @@ export declare class StorageServiceService {
25
70
  removeProductFromWishlist(productId: string): IDBRequest<undefined>;
26
71
  getProductFromWishlist(productId: string): Promise<IDBRequest<any>>;
27
72
  addUser(user: User): User;
28
- getUser(): User;
73
+ getUser(): any;
29
74
  static ɵfac: i0.ɵɵFactoryDeclaration<StorageServiceService, never>;
30
75
  static ɵprov: i0.ɵɵInjectableDeclaration<StorageServiceService>;
31
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "1.4.19",
3
+ "version": "1.4.21",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file