simpo-component-library 1.4.9 → 1.4.11
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 +9 -22
- package/esm2022/lib/ecommerce/json/user-details.json +15 -0
- package/esm2022/lib/ecommerce/json/user-favourite.json +2 -14
- package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +3 -1
- package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +4 -4
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +8 -3
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +23 -6
- package/esm2022/lib/ecommerce/sections/user-profile/user-profile.component.mjs +4 -9
- package/esm2022/lib/ecommerce/sections/whislist/whislist.component.mjs +3 -3
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +2 -2
- package/esm2022/lib/ecommerce/styles/cart.modal.mjs +12 -2
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +15 -9
- package/esm2022/lib/services/cart.service.mjs +29 -8
- package/esm2022/lib/services/rest.service.mjs +23 -4
- package/fesm2022/simpo-component-library.mjs +143 -75
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +2 -1
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +4 -0
- package/lib/ecommerce/styles/cart.modal.d.ts +7 -4
- package/lib/services/cart.service.d.ts +7 -3
- package/lib/services/rest.service.d.ts +5 -0
- package/package.json +1 -1
- package/simpo-component-library-1.4.11.tgz +0 -0
- package/simpo-component-library-1.4.9.tgz +0 -0
|
@@ -17,6 +17,7 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
|
|
|
17
17
|
data?: FeaturedProductModal;
|
|
18
18
|
responseData?: Product[];
|
|
19
19
|
index?: number;
|
|
20
|
+
isRelatedProduct: boolean;
|
|
20
21
|
edit?: boolean;
|
|
21
22
|
delete?: boolean;
|
|
22
23
|
content?: FeaturedProductContentModal;
|
|
@@ -37,5 +38,5 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
|
|
|
37
38
|
isItemFav(product: Product): boolean;
|
|
38
39
|
togglePreviewImage(product: Product, idx: number): void;
|
|
39
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedProductsComponent, never>;
|
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedProductsComponent, "simpo-featured-products", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
|
|
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>;
|
|
41
42
|
}
|
|
@@ -6,6 +6,7 @@ import { EventsService } from '.././../../services/events.service';
|
|
|
6
6
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
7
7
|
import { RestService } from '../../../services/rest.service';
|
|
8
8
|
import { CartService } from '../../../services/cart.service';
|
|
9
|
+
import { FeaturedProductModal } from '../featured-products/featured-products.modal';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class ProductDescComponent extends BaseSection {
|
|
11
12
|
private platformId;
|
|
@@ -19,6 +20,7 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
19
20
|
index?: number;
|
|
20
21
|
edit?: boolean;
|
|
21
22
|
delete?: boolean;
|
|
23
|
+
relatedProductData: Product[];
|
|
22
24
|
constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService);
|
|
23
25
|
buttonId?: string;
|
|
24
26
|
button?: ButtonModel;
|
|
@@ -34,6 +36,8 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
34
36
|
addToFavourite(): void;
|
|
35
37
|
removeToFavourite(): void;
|
|
36
38
|
get isItemAsFavorite(): boolean;
|
|
39
|
+
get getFeatureProductData(): FeaturedProductModal;
|
|
40
|
+
getProductByCategory(): void;
|
|
37
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProductDescComponent, never>;
|
|
38
42
|
static ɵcmp: i0.ɵɵComponentDeclaration<ProductDescComponent, "simpo-product-desc", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ItemVariant } from "./product.modal";
|
|
2
|
-
export
|
|
2
|
+
export declare class Cart {
|
|
3
3
|
cartId: string;
|
|
4
4
|
pgOrderId: string;
|
|
5
5
|
orderedItems: OrderedItem[];
|
|
@@ -7,7 +7,9 @@ export interface Cart {
|
|
|
7
7
|
platform: string;
|
|
8
8
|
locationDetails: LocationDetails;
|
|
9
9
|
userDetails: UserDetails;
|
|
10
|
-
|
|
10
|
+
constructor(json: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}, type?: 'MAPPER' | null);
|
|
11
13
|
}
|
|
12
14
|
export interface OrderedItem {
|
|
13
15
|
itemId: string;
|
|
@@ -47,12 +49,13 @@ export interface LocationDetails {
|
|
|
47
49
|
stateName: string;
|
|
48
50
|
}
|
|
49
51
|
export interface UserDetails {
|
|
50
|
-
|
|
52
|
+
id: string;
|
|
51
53
|
userName: string;
|
|
52
54
|
mobile: string;
|
|
53
55
|
email: string;
|
|
54
56
|
profilePic: string;
|
|
55
|
-
|
|
57
|
+
address: DeliveryAddress;
|
|
58
|
+
gender: string;
|
|
56
59
|
}
|
|
57
60
|
export interface DeliveryAddress {
|
|
58
61
|
countryName: string;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { Product } from '../../public-api';
|
|
2
1
|
import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
|
|
2
|
+
import { Product } from '../ecommerce/styles/product.modal';
|
|
3
|
+
import { RestService } from './rest.service';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class CartService {
|
|
5
|
-
|
|
6
|
+
private readonly restService;
|
|
7
|
+
constructor(restService: RestService);
|
|
6
8
|
addItemToCart(product: Product): void;
|
|
7
9
|
addItemToFavourite(product: Product): void;
|
|
8
10
|
removeItemToFavourite(product: Product): void;
|
|
9
11
|
convertFavToCart(product: OrderedItems): void;
|
|
10
12
|
convertCartToFav(product: OrderedItems): void;
|
|
11
|
-
storeItemToJSON(json: any, product: Product): void;
|
|
13
|
+
storeItemToJSON(json: any, product: Product, type: 'CART' | 'WISHLIST'): void;
|
|
12
14
|
getItemQuantity(itemId: string): number;
|
|
13
15
|
getIsItemPresent(itemId: string, type: 'FAVOURITE' | 'CART'): boolean;
|
|
14
16
|
private getItemIdxJSON;
|
|
15
17
|
private objectMapper;
|
|
18
|
+
storeJSONToDB(): void;
|
|
19
|
+
storeDBToJSON(): void;
|
|
16
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
17
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
18
22
|
}
|
|
@@ -15,8 +15,13 @@ export declare class RestService implements OnDestroy {
|
|
|
15
15
|
getAllCategories(): Observable<any>;
|
|
16
16
|
getAllCollections(): Observable<any>;
|
|
17
17
|
getFilteredProduct(collectionIds: string[], categoryIds: string[], searchText: string, minPrice: number, maxPrice: number, sortBy: string, pageNo: number, size: number): Observable<Object>;
|
|
18
|
+
getProductByCategoryId(categoryId: string): Observable<Object>;
|
|
18
19
|
generateOTP(mobile: string, countryCode: string): Observable<Object>;
|
|
19
20
|
verifyOTP(mobile: string, otp: string): Observable<Object>;
|
|
21
|
+
addItemToDB(userCart: any): Observable<Object>;
|
|
22
|
+
getUserItems(userId: string, cartType: 'CART' | 'WISHLIST'): Observable<Object>;
|
|
23
|
+
placeOrder(cartId: string): Observable<Object>;
|
|
24
|
+
toggleItemCartToFav(): void;
|
|
20
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
|
|
21
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<RestService>;
|
|
22
27
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|