simpo-component-library 1.2.6 → 1.2.7
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 +32 -0
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +11 -11
- package/esm2022/lib/ecommerce/sections/featured-products/featured-products.modal.mjs +1 -1
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +38 -12
- package/esm2022/lib/ecommerce/sections/product-list/product-list.component.mjs +2 -2
- package/esm2022/lib/ecommerce/styles/OrderedItems.modal.mjs +20 -0
- package/esm2022/lib/ecommerce/styles/product.modal.mjs +2 -1
- package/esm2022/lib/services/cart.service.mjs +35 -0
- package/esm2022/lib/services/rest.service.mjs +14 -3
- package/fesm2022/simpo-component-library.mjs +128 -21
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +3 -1
- package/lib/ecommerce/sections/featured-products/featured-products.modal.d.ts +1 -0
- package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +11 -5
- package/lib/ecommerce/styles/OrderedItems.modal.d.ts +18 -0
- package/lib/ecommerce/styles/product.modal.d.ts +1 -0
- package/lib/services/cart.service.d.ts +9 -0
- package/lib/services/rest.service.d.ts +2 -1
- package/package.json +1 -1
- package/simpo-component-library-1.2.7.tgz +0 -0
- package/simpo-component-library-1.2.6.tgz +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
1
2
|
import { FeaturedProductContentModal, FeaturedProductModal, FeaturedProductStylesModel } from './featured-products.modal';
|
|
2
3
|
import { Product } from '../../styles/product.modal';
|
|
3
4
|
import { EventsService } from '.././../../services/events.service';
|
|
@@ -6,7 +7,7 @@ import { ButtonModel } from '../../../styles/style.model';
|
|
|
6
7
|
import { RestService } from '../../../services/rest.service';
|
|
7
8
|
import { Router } from '@angular/router';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class FeaturedProductsComponent extends BaseSection {
|
|
10
|
+
export declare class FeaturedProductsComponent extends BaseSection implements OnChanges {
|
|
10
11
|
private platformId;
|
|
11
12
|
private readonly _eventService;
|
|
12
13
|
private readonly restService;
|
|
@@ -22,6 +23,7 @@ export declare class FeaturedProductsComponent extends BaseSection {
|
|
|
22
23
|
constructor(platformId: Object, _eventService: EventsService, restService: RestService, router: Router);
|
|
23
24
|
screenWidth: number;
|
|
24
25
|
getScreenSize(): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
27
|
ngOnInit(): void;
|
|
26
28
|
getProductWidth(): string;
|
|
27
29
|
getSliceParameters(): number[];
|
|
@@ -4,17 +4,23 @@ import { ButtonModel } from '../../../styles/style.model';
|
|
|
4
4
|
import BaseSection from '../../../sections/BaseSection';
|
|
5
5
|
import { EventsService } from '.././../../services/events.service';
|
|
6
6
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
7
|
+
import { ActivatedRoute } from '@angular/router';
|
|
8
|
+
import { RestService } from '../../../services/rest.service';
|
|
9
|
+
import { CartService } from '../../../services/cart.service';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
export declare class ProductDescComponent extends BaseSection {
|
|
9
12
|
private platformId;
|
|
10
|
-
private _eventService;
|
|
11
|
-
private snackBar;
|
|
13
|
+
private readonly _eventService;
|
|
14
|
+
private readonly snackBar;
|
|
15
|
+
private readonly activatedRoute;
|
|
16
|
+
private readonly restService;
|
|
17
|
+
private readonly cartService;
|
|
12
18
|
data?: ProductDescModal;
|
|
13
|
-
responseData
|
|
19
|
+
responseData: Product;
|
|
14
20
|
index?: number;
|
|
15
21
|
edit?: boolean;
|
|
16
22
|
delete?: boolean;
|
|
17
|
-
constructor(platformId: Object, _eventService: EventsService, snackBar: MatSnackBar);
|
|
23
|
+
constructor(platformId: Object, _eventService: EventsService, snackBar: MatSnackBar, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService);
|
|
18
24
|
buttonId?: string;
|
|
19
25
|
button?: ButtonModel;
|
|
20
26
|
styles?: ProductDescStylesModal;
|
|
@@ -26,7 +32,7 @@ export declare class ProductDescComponent extends BaseSection {
|
|
|
26
32
|
addedQuantity: number;
|
|
27
33
|
changeQuantity(quantity: any): void;
|
|
28
34
|
addOrSubtractQuantity(type: 'ADD' | 'SUBSTRACT'): void;
|
|
29
|
-
addToCart(): void;
|
|
35
|
+
addToCart(type?: 'ADD' | 'SUBSTRACT'): void;
|
|
30
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProductDescComponent, never>;
|
|
31
37
|
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>;
|
|
32
38
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class OrderedItems {
|
|
2
|
+
private itemId;
|
|
3
|
+
private businessId;
|
|
4
|
+
private itemName;
|
|
5
|
+
private brandName;
|
|
6
|
+
private imgUrl;
|
|
7
|
+
private price;
|
|
8
|
+
private itemTax;
|
|
9
|
+
private quantity;
|
|
10
|
+
private discountedPrice;
|
|
11
|
+
private taxAfterDiscount;
|
|
12
|
+
constructor(json?: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
});
|
|
15
|
+
set setQuantity(quantity: any);
|
|
16
|
+
get getQuantity(): number;
|
|
17
|
+
get getItemId(): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Product } from '../../public-api';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CartService {
|
|
4
|
+
constructor();
|
|
5
|
+
addItemToCart(product: Product): void;
|
|
6
|
+
private objectMapper;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
9
|
+
}
|
|
@@ -5,7 +5,8 @@ export declare class RestService {
|
|
|
5
5
|
private readonly http;
|
|
6
6
|
private readonly BASE_URL;
|
|
7
7
|
constructor(http: HttpClient);
|
|
8
|
-
getProductByBusiness(searchTxt?: string): Observable<any>;
|
|
8
|
+
getProductByBusiness(searchTxt?: string, productId?: string | null): Observable<any>;
|
|
9
|
+
getFeaturedProduct(collectionId: string | null): Observable<any>;
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
|
|
10
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<RestService>;
|
|
11
12
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|