simpo-component-library 1.4.14 → 1.4.16
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 +1 -14
- package/esm2022/lib/ecommerce/sections/address/address.component.mjs +3 -2
- package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +13 -10
- package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +2 -2
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +3 -3
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +10 -4
- package/esm2022/lib/ecommerce/sections/whislist/whislist.component.mjs +3 -3
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +3 -8
- package/esm2022/lib/ecommerce/styles/cart.modal.mjs +2 -1
- package/esm2022/lib/ecommerce/styles/user.modal.mjs +11 -0
- package/esm2022/lib/services/cart.service.mjs +86 -69
- package/esm2022/lib/services/storage.service.mjs +80 -0
- package/fesm2022/simpo-component-library.mjs +190 -100
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/authenticate-user/authenticate-user.component.d.ts +4 -2
- package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +1 -1
- package/lib/ecommerce/styles/OrderedItems.modal.d.ts +10 -14
- package/lib/ecommerce/styles/cart.modal.d.ts +3 -18
- package/lib/ecommerce/styles/user.modal.d.ts +38 -0
- package/lib/services/cart.service.d.ts +9 -9
- package/lib/services/storage.service.d.ts +28 -0
- package/package.json +1 -1
- package/simpo-component-library-1.4.16.tgz +0 -0
- package/simpo-component-library-1.4.12.tgz +0 -0
- package/simpo-component-library-1.4.13.tgz +0 -0
- package/simpo-component-library-1.4.14.tgz +0 -0
|
@@ -2,12 +2,14 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { RestService } from '../../../services/rest.service';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
5
|
+
import { StorageServiceService } from '@simpo-ui/services/storage.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class AuthenticateUserComponent implements OnInit {
|
|
7
8
|
matData: any;
|
|
8
9
|
private readonly restService;
|
|
9
10
|
private readonly router;
|
|
10
11
|
private readonly matDialog;
|
|
12
|
+
private readonly storageService;
|
|
11
13
|
private readonly dialogRef;
|
|
12
14
|
data?: any;
|
|
13
15
|
responseData?: any;
|
|
@@ -15,7 +17,7 @@ export declare class AuthenticateUserComponent implements OnInit {
|
|
|
15
17
|
screen: 'LOGIN' | 'OTP';
|
|
16
18
|
mobile: string | null;
|
|
17
19
|
countryCode: string | null;
|
|
18
|
-
constructor(matData: any, restService: RestService, router: Router, matDialog: MatDialog, dialogRef: MatDialogRef<AuthenticateUserComponent>);
|
|
20
|
+
constructor(matData: any, restService: RestService, router: Router, matDialog: MatDialog, storageService: StorageServiceService, dialogRef: MatDialogRef<AuthenticateUserComponent>);
|
|
19
21
|
styles: any;
|
|
20
22
|
ngOnInit(): void;
|
|
21
23
|
move(event: any, idx: number): void;
|
|
@@ -25,6 +27,6 @@ export declare class AuthenticateUserComponent implements OnInit {
|
|
|
25
27
|
verifyOTP(): void;
|
|
26
28
|
resendOTP(): void;
|
|
27
29
|
get isMobile(): boolean;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateUserComponent, [{ optional: true; }, null, null, null, { optional: true; }]>;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateUserComponent, [{ optional: true; }, null, null, null, null, { optional: true; }]>;
|
|
29
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticateUserComponent, "simpo-authenticate-user", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
32
|
}
|
|
@@ -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):
|
|
38
|
+
isItemFav(product: Product): number;
|
|
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,19 +1,15 @@
|
|
|
1
1
|
export declare class OrderedItems {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
itemId: string;
|
|
3
|
+
businessId: string;
|
|
4
|
+
itemName: string;
|
|
5
|
+
brandName: string;
|
|
6
|
+
imgUrl: string;
|
|
7
|
+
price: number;
|
|
8
|
+
itemTax: number;
|
|
9
|
+
quantity: number;
|
|
10
|
+
discountedPrice: number;
|
|
11
|
+
taxAfterDiscount: number;
|
|
12
12
|
constructor(json?: {
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
});
|
|
15
|
-
set setQuantity(quantity: any);
|
|
16
|
-
get getQuantity(): number;
|
|
17
|
-
get getItemId(): string;
|
|
18
|
-
get getPrice(): number;
|
|
19
15
|
}
|
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OrderedItems } from "./OrderedItems.modal";
|
|
2
2
|
export declare class Cart {
|
|
3
3
|
cartId: string;
|
|
4
4
|
pgOrderId: string;
|
|
5
|
-
orderedItems:
|
|
5
|
+
orderedItems: OrderedItems[];
|
|
6
6
|
billdetails: Billdetails;
|
|
7
7
|
platform: string;
|
|
8
8
|
locationDetails: LocationDetails;
|
|
9
9
|
userDetails: UserDetails;
|
|
10
|
+
totalAmount: number;
|
|
10
11
|
constructor(json: {
|
|
11
12
|
[key: string]: any;
|
|
12
13
|
}, type?: 'MAPPER' | null);
|
|
13
14
|
}
|
|
14
|
-
export interface OrderedItem {
|
|
15
|
-
itemId: string;
|
|
16
|
-
businessId: string;
|
|
17
|
-
itemName: string;
|
|
18
|
-
brandName: string;
|
|
19
|
-
imgUrl: string;
|
|
20
|
-
price: number;
|
|
21
|
-
itemTax: number;
|
|
22
|
-
quantity: number;
|
|
23
|
-
cancelledQuantity: number;
|
|
24
|
-
discountedPrice: number;
|
|
25
|
-
taxAfterDiscount: number;
|
|
26
|
-
itemVariant: ItemVariant;
|
|
27
|
-
orderedItemStatus: string;
|
|
28
|
-
itemDistributorType: string;
|
|
29
|
-
}
|
|
30
15
|
export interface Billdetails {
|
|
31
16
|
totalNetValue: number;
|
|
32
17
|
totalGrossValue: number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare class User {
|
|
2
|
+
userId: string;
|
|
3
|
+
businessId: string;
|
|
4
|
+
gender: GENDER;
|
|
5
|
+
profilePic: string;
|
|
6
|
+
contact: Contact;
|
|
7
|
+
addressDetailsList: AddressDetails[];
|
|
8
|
+
constructor(json?: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export interface Contact {
|
|
13
|
+
countryCode: string;
|
|
14
|
+
email: string;
|
|
15
|
+
name: string;
|
|
16
|
+
mobile: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AddressDetails {
|
|
19
|
+
receiverName: string;
|
|
20
|
+
receiverPhone: string;
|
|
21
|
+
receiverEmail: string;
|
|
22
|
+
countryName: string;
|
|
23
|
+
stateName: string;
|
|
24
|
+
cityName: string;
|
|
25
|
+
localityName: string;
|
|
26
|
+
addressLine1: string;
|
|
27
|
+
landmark: string;
|
|
28
|
+
zipCode: string;
|
|
29
|
+
addressType: ADDRESS_TYPE;
|
|
30
|
+
geolocation: Geolocation;
|
|
31
|
+
}
|
|
32
|
+
export interface Geolocation {
|
|
33
|
+
latitude: number;
|
|
34
|
+
longitude: number;
|
|
35
|
+
}
|
|
36
|
+
declare type ADDRESS_TYPE = "HOME" | "WORK" | "OTHER";
|
|
37
|
+
declare type GENDER = "MALE" | "FEMALE" | "OTHERS";
|
|
38
|
+
export {};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
|
|
2
2
|
import { Product } from '../ecommerce/styles/product.modal';
|
|
3
3
|
import { RestService } from './rest.service';
|
|
4
|
+
import { StorageServiceService } from './storage.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class CartService {
|
|
6
7
|
private readonly restService;
|
|
7
|
-
|
|
8
|
+
private readonly storageService;
|
|
9
|
+
constructor(restService: RestService, storageService: StorageServiceService);
|
|
8
10
|
addItemToCart(product: Product): void;
|
|
9
11
|
addItemToFavourite(product: Product): void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
getIsItemPresent(itemId: string, type: 'FAVOURITE' | 'CART'): boolean;
|
|
16
|
-
private getItemIdxJSON;
|
|
12
|
+
removeItemFromFavourite(product: Product): void;
|
|
13
|
+
removeItemFromCart(product: Product): void;
|
|
14
|
+
storeItemToDB(product: Product, type: 'CART' | 'WISHLIST'): void;
|
|
15
|
+
getItemIdxJSON(itemId: string, type: 'FAVOURITE' | 'CART'): number;
|
|
16
|
+
getItemByIdx(itemId: string, type: 'FAVOURITE' | 'CART'): OrderedItems | null;
|
|
17
17
|
private objectMapper;
|
|
18
|
-
|
|
18
|
+
storeDataToServer(): void;
|
|
19
19
|
storeDBToJSON(): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
21
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OrderedItems } from '@simpo-ui/ecommerce/styles/OrderedItems.modal';
|
|
2
|
+
import { User } from '@simpo-ui/ecommerce/styles/user.modal';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StorageServiceService {
|
|
5
|
+
constructor();
|
|
6
|
+
databaseName: string;
|
|
7
|
+
databaseVersion: number;
|
|
8
|
+
cartCollectionName: string;
|
|
9
|
+
favouriteCollectionName: string;
|
|
10
|
+
userCollectionName: string;
|
|
11
|
+
database: IDBDatabase;
|
|
12
|
+
cartCollectionRef: IDBObjectStore | null;
|
|
13
|
+
favouriteCollectionRef: IDBObjectStore | null;
|
|
14
|
+
userCollectionRef: IDBObjectStore | null;
|
|
15
|
+
createDataBase(): Promise<void>;
|
|
16
|
+
getUserCart(): Promise<IDBRequest<any[]> | undefined>;
|
|
17
|
+
addProductToCart(product: OrderedItems): IDBRequest<IDBValidKey>;
|
|
18
|
+
removeProductFromCart(productId: string): IDBRequest<undefined>;
|
|
19
|
+
getProductFromCart(productId: string): Promise<IDBRequest<any>>;
|
|
20
|
+
getUserWhishlist(): Promise<IDBRequest<any[]> | undefined>;
|
|
21
|
+
addProductToWishlist(product: OrderedItems): IDBRequest<IDBValidKey>;
|
|
22
|
+
removeProductFromWishlist(productId: string): IDBRequest<undefined>;
|
|
23
|
+
getProductFromWishlist(productId: string): Promise<IDBRequest<any>>;
|
|
24
|
+
addUser(user: User): User;
|
|
25
|
+
getUser(): User;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageServiceService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StorageServiceService>;
|
|
28
|
+
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|