simpo-component-library 1.4.48 → 1.4.49
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/sections/cart/cart.component.mjs +38 -36
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +38 -27
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +37 -23
- package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +37 -11
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +3 -3
- package/esm2022/lib/services/cart.service.mjs +35 -106
- package/esm2022/lib/services/storage.service.mjs +22 -25
- package/fesm2022/simpo-component-library.mjs +223 -294
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/cart/cart.component.d.ts +3 -0
- package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +5 -2
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +6 -2
- package/lib/ecommerce/sections/product-list/product-list.component.d.ts +5 -1
- package/lib/services/cart.service.d.ts +6 -5
- package/lib/services/storage.service.d.ts +3 -42
- package/package.json +1 -1
- package/simpo-component-library-1.4.47.tgz +0 -0
- package/simpo-component-library-1.4.48.tgz +0 -0
- package/simpo-component-library-1.4.49.tgz +0 -0
- package/esm2022/lib/ecommerce/json/user-cart.json +0 -40
|
@@ -27,6 +27,9 @@ export declare class CartComponent extends BaseSection {
|
|
|
27
27
|
currentTab: 'BAG' | 'ADDRESS' | 'PAYMENT';
|
|
28
28
|
constructor(_eventService: EventsService, cartService: CartService, router: Router, restService: RestService, matDialog: MatDialog, storageService: StorageServiceService, cookieService: CookieService);
|
|
29
29
|
private loadingItems;
|
|
30
|
+
private userDetails;
|
|
31
|
+
private userCart;
|
|
32
|
+
private USER_CART_ITEMS;
|
|
30
33
|
ngOnInit(): void;
|
|
31
34
|
proceedToCheckout(): void;
|
|
32
35
|
proceedToListPage(): void;
|
|
@@ -7,6 +7,7 @@ import { ButtonModel } from '../../../styles/style.model';
|
|
|
7
7
|
import { RestService } from '../../../services/rest.service';
|
|
8
8
|
import { Router } from '@angular/router';
|
|
9
9
|
import { CartService } from '../../../services/cart.service';
|
|
10
|
+
import { StorageServiceService } from '../../../services/storage.service';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class FeaturedProductsComponent extends BaseSection implements OnDestroy {
|
|
12
13
|
private platformId;
|
|
@@ -14,6 +15,7 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
|
|
|
14
15
|
private readonly restService;
|
|
15
16
|
private readonly router;
|
|
16
17
|
private readonly cartService;
|
|
18
|
+
private readonly storageService;
|
|
17
19
|
data?: FeaturedProductModal;
|
|
18
20
|
responseData?: Product[];
|
|
19
21
|
index?: number;
|
|
@@ -25,8 +27,10 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
|
|
|
25
27
|
styles?: FeaturedProductStylesModel;
|
|
26
28
|
button?: ButtonModel;
|
|
27
29
|
private _eventSubscriber;
|
|
28
|
-
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, cartService: CartService);
|
|
30
|
+
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, cartService: CartService, storageService: StorageServiceService);
|
|
29
31
|
screenWidth: number;
|
|
32
|
+
private USER_CART;
|
|
33
|
+
private USER_WISHLIST;
|
|
30
34
|
getScreenSize(): void;
|
|
31
35
|
ngOnInit(): void;
|
|
32
36
|
ngOnDestroy(): void;
|
|
@@ -36,7 +40,6 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
|
|
|
36
40
|
addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
|
|
37
41
|
toggleItemToFav(product: Product, type: 'ADD' | 'REMOVE'): void;
|
|
38
42
|
proceedToProductDesc(productId: any): void;
|
|
39
|
-
isItemFav(product: Product): boolean;
|
|
40
43
|
togglePreviewImage(product: Product, idx: number): void;
|
|
41
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedProductsComponent, never>;
|
|
42
45
|
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>;
|
|
@@ -7,6 +7,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|
|
7
7
|
import { RestService } from '../../../services/rest.service';
|
|
8
8
|
import { CartService } from '../../../services/cart.service';
|
|
9
9
|
import { FeaturedProductModal } from '../featured-products/featured-products.modal';
|
|
10
|
+
import { StorageServiceService } from '../../../services/storage.service';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class ProductDescComponent extends BaseSection {
|
|
12
13
|
private platformId;
|
|
@@ -15,6 +16,7 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
15
16
|
private readonly activatedRoute;
|
|
16
17
|
private readonly restService;
|
|
17
18
|
private readonly cartService;
|
|
19
|
+
private readonly storageService;
|
|
18
20
|
data?: ProductDescModal;
|
|
19
21
|
responseData: Product;
|
|
20
22
|
index?: number;
|
|
@@ -22,10 +24,13 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
22
24
|
delete?: boolean;
|
|
23
25
|
isLoading: boolean;
|
|
24
26
|
relatedProductData: Product[];
|
|
25
|
-
constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService);
|
|
27
|
+
constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService, storageService: StorageServiceService);
|
|
26
28
|
buttonId?: string;
|
|
27
29
|
button?: ButtonModel;
|
|
28
30
|
styles?: ProductDescStylesModal;
|
|
31
|
+
isItemAsFavorite: boolean;
|
|
32
|
+
private USER_CART;
|
|
33
|
+
private USER_WISHLIST;
|
|
29
34
|
ngOnInit(): void;
|
|
30
35
|
routeToHome(): void;
|
|
31
36
|
screenWidth: any;
|
|
@@ -36,7 +41,6 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
36
41
|
goToFilter(category: string): void;
|
|
37
42
|
addToFavourite(): void;
|
|
38
43
|
removeToFavourite(): void;
|
|
39
|
-
get isItemAsFavorite(): boolean;
|
|
40
44
|
get getFeatureProductData(): FeaturedProductModal;
|
|
41
45
|
getProductByCategory(): void;
|
|
42
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProductDescComponent, never>;
|
|
@@ -5,6 +5,7 @@ import { EventsService } from '.././../../services/events.service';
|
|
|
5
5
|
import { RestService } from '.././../../services/rest.service';
|
|
6
6
|
import { ButtonModel } from '../../../styles/style.model';
|
|
7
7
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
8
|
+
import { StorageServiceService } from '../../../services/storage.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
interface BaseModel {
|
|
10
11
|
option: string;
|
|
@@ -17,6 +18,7 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
17
18
|
private readonly restService;
|
|
18
19
|
private readonly router;
|
|
19
20
|
private readonly activatedRoute;
|
|
21
|
+
private readonly storageService;
|
|
20
22
|
responseData?: Product[];
|
|
21
23
|
data?: ProductListModal;
|
|
22
24
|
index?: number;
|
|
@@ -25,10 +27,12 @@ export declare class ProductListComponent extends BaseSection {
|
|
|
25
27
|
isLoading: boolean;
|
|
26
28
|
content?: ProductListContentModal;
|
|
27
29
|
button?: ButtonModel;
|
|
28
|
-
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, activatedRoute: ActivatedRoute);
|
|
30
|
+
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router, activatedRoute: ActivatedRoute, storageService: StorageServiceService);
|
|
29
31
|
pricingMin: number;
|
|
30
32
|
pricingMax: number;
|
|
31
33
|
sortBy: string | null;
|
|
34
|
+
private USER_CART;
|
|
35
|
+
private USER_WISHLIST;
|
|
32
36
|
filteringArray: {
|
|
33
37
|
name: string;
|
|
34
38
|
value: string;
|
|
@@ -2,22 +2,23 @@ import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
|
|
|
2
2
|
import { Product } from '../ecommerce/styles/product.modal';
|
|
3
3
|
import { RestService } from './rest.service';
|
|
4
4
|
import { StorageServiceService } from './storage.service';
|
|
5
|
+
import { Cart } from '../ecommerce/styles/cart.modal';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class CartService {
|
|
7
8
|
private readonly storageService;
|
|
8
9
|
private readonly restService;
|
|
9
10
|
constructor(storageService: StorageServiceService, restService: RestService);
|
|
10
|
-
addItemFromCartPage(product: OrderedItems):
|
|
11
|
-
addItemToCart(product: Product | OrderedItems
|
|
11
|
+
addItemFromCartPage(product: OrderedItems): void;
|
|
12
|
+
addItemToCart(product: Product | OrderedItems): void | IDBRequest<IDBValidKey>;
|
|
12
13
|
addItemToFavourite(product: Product): void;
|
|
13
14
|
removeItemFromFavourite(product: Product): void;
|
|
14
15
|
removeItemFromCart(product: Product | OrderedItems): void;
|
|
16
|
+
getItemIdxJSON(id: string, type: 'FAVOURITE' | 'CART'): Promise<IDBRequest<any>>;
|
|
15
17
|
storeItemToDB(product: Product, type: 'CART' | 'WISHLIST'): void;
|
|
16
|
-
getItemIdxJSON(itemId: string, type: 'FAVOURITE' | 'CART'): number;
|
|
17
18
|
getItemByIdx(itemId: string, type: 'FAVOURITE' | 'CART'): OrderedItems | null;
|
|
18
19
|
private objectMapper;
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
storeCartDataToServer(cart: Cart): void;
|
|
21
|
+
storeDataToServer(): void;
|
|
21
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
22
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
23
24
|
}
|
|
@@ -20,52 +20,13 @@ export declare class StorageServiceService {
|
|
|
20
20
|
userCollectionRef: IDBObjectStore | null;
|
|
21
21
|
createDataBase(): Promise<void>;
|
|
22
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
|
-
};
|
|
23
|
+
calculateBillingDetails(): void;
|
|
63
24
|
updateAllData(): void;
|
|
64
|
-
getUserCart(): Promise<IDBRequest<
|
|
25
|
+
getUserCart(): Promise<IDBRequest<OrderedItems[]>>;
|
|
65
26
|
addProductToCart(product: OrderedItems): IDBRequest<IDBValidKey>;
|
|
66
27
|
removeProductFromCart(productId: string): IDBRequest<undefined>;
|
|
67
28
|
getProductFromCart(productId: string): Promise<IDBRequest<any>>;
|
|
68
|
-
getUserWhishlist(): Promise<IDBRequest<
|
|
29
|
+
getUserWhishlist(): Promise<IDBRequest<OrderedItems[]>>;
|
|
69
30
|
addProductToWishlist(product: OrderedItems): IDBRequest<IDBValidKey>;
|
|
70
31
|
removeProductFromWishlist(productId: string): IDBRequest<undefined>;
|
|
71
32
|
getProductFromWishlist(productId: string): Promise<IDBRequest<any>>;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"orderedItems": [],
|
|
3
|
-
"cartType": "CART",
|
|
4
|
-
"billdetails": {
|
|
5
|
-
"totalNetValue": 0,
|
|
6
|
-
"totalGrossValue": 0,
|
|
7
|
-
"totalTax": 0,
|
|
8
|
-
"totalOfferedValue": 0,
|
|
9
|
-
"deliveryCharges": 0,
|
|
10
|
-
"couponId": "",
|
|
11
|
-
"discountAmount": 0,
|
|
12
|
-
"afterDiscountAmount": 0,
|
|
13
|
-
"taxBreakup": {
|
|
14
|
-
"cgstValue": 0,
|
|
15
|
-
"sgstValue": 0,
|
|
16
|
-
"igstValue": 0
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"userDetails": {
|
|
20
|
-
"userId": "",
|
|
21
|
-
"userName": "",
|
|
22
|
-
"mobile": "",
|
|
23
|
-
"email": "",
|
|
24
|
-
"pinCode": ""
|
|
25
|
-
},
|
|
26
|
-
"locationDetails": {
|
|
27
|
-
"countryId": "",
|
|
28
|
-
"cityId": "",
|
|
29
|
-
"stateId": "",
|
|
30
|
-
"localityId": "",
|
|
31
|
-
"countryName": "",
|
|
32
|
-
"cityName": "",
|
|
33
|
-
"stateName": "",
|
|
34
|
-
"localityName": "",
|
|
35
|
-
"pinCode": ""
|
|
36
|
-
},
|
|
37
|
-
"platform": "WEB",
|
|
38
|
-
"totalAmount": 0,
|
|
39
|
-
"cartId": ""
|
|
40
|
-
}
|