simpo-component-library 1.5.26 → 1.5.27
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/ecommerce/sections/category-product/category-product.component.mjs +57 -5
- package/esm2022/lib/ecommerce/sections/product-category-list/product-category-list.component.mjs +4 -6
- package/esm2022/lib/sections/banner-section/banner-section.component.mjs +7 -5
- package/esm2022/lib/services/rest.service.mjs +2 -2
- package/esm2022/lib/services/sanitizeHtml.mjs +21 -0
- package/esm2022/public-api.mjs +2 -2
- package/fesm2022/simpo-component-library.mjs +109 -190
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/category-product/category-product.component.d.ts +5 -1
- package/lib/services/sanitizeHtml.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/simpo-component-library-1.5.27.tgz +0 -0
- package/esm2022/lib/ecommerce/sections/featured-category/featured-collection.component.mjs +0 -100
- package/esm2022/lib/ecommerce/sections/small-product-listing/small-product-listing.component.mjs +0 -80
- package/lib/ecommerce/sections/featured-category/featured-collection.component.d.ts +0 -29
- package/lib/ecommerce/sections/small-product-listing/small-product-listing.component.d.ts +0 -16
- package/simpo-component-library-1.5.25.tgz +0 -0
- package/simpo-component-library-1.5.26.tgz +0 -0
@@ -3,7 +3,7 @@ import { CategoryProductContentModal, CategoryProductModal, CategoryProductStyle
|
|
3
3
|
import { RestService } from '../../../services/rest.service';
|
4
4
|
import { EventsService } from '../../../services/events.service';
|
5
5
|
import { Category } from '../../styles/category.modal';
|
6
|
-
import { Product } from '../../styles/product.modal';
|
6
|
+
import { ItemVariant, Product } from '../../styles/product.modal';
|
7
7
|
import { FeaturedProductModal } from '../featured-products/featured-products.modal';
|
8
8
|
import { CartService } from '../../../services/cart.service';
|
9
9
|
import BaseSection from '../../../sections/BaseSection';
|
@@ -31,6 +31,10 @@ export declare class CategoryProductComponent extends BaseSection implements OnI
|
|
31
31
|
getAllCategories(): void;
|
32
32
|
dataList: Product[];
|
33
33
|
selectCategory(categoryId: string): void;
|
34
|
+
addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
|
35
|
+
getItemVarient(product: Product, varientId: string): ItemVariant | null;
|
36
|
+
getPercentage(product: Product): string;
|
37
|
+
get currency(): string;
|
34
38
|
editSection(): void;
|
35
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<CategoryProductComponent, never>;
|
36
40
|
static ɵcmp: i0.ɵɵComponentDeclaration<CategoryProductComponent, "simpo-category-product", 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>;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PipeTransform } from "@angular/core";
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class SanitizeHtmlPipe implements PipeTransform {
|
5
|
+
private _sanitizer;
|
6
|
+
constructor(_sanitizer: DomSanitizer);
|
7
|
+
transform(v: string): SafeHtml;
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SanitizeHtmlPipe, never>;
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SanitizeHtmlPipe, "sanitizeHtml", true>;
|
10
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
@@ -42,9 +42,9 @@ export * from './lib/ecommerce/sections/verify-payment/verify-payment.component'
|
|
42
42
|
export * from './lib/ecommerce/sections/verify-payment/verify-payment.component';
|
43
43
|
export * from './lib/ecommerce/sections/product-category-list/product-category-list.component';
|
44
44
|
export * from './lib/ecommerce/sections/category-product/category-product.component';
|
45
|
-
export * from './lib/ecommerce/sections/featured-category/featured-collection.component';
|
46
45
|
export * from './lib/services/events.service';
|
47
46
|
export * from './lib/services/endUser.service';
|
47
|
+
export * from './lib/services/sanitizeHtml';
|
48
48
|
export * from './lib/directive/animation-directive';
|
49
49
|
export * from './lib/directive/background-directive';
|
50
50
|
export * from './lib/directive/banner-content-fit-directive';
|
Binary file
|
@@ -1,100 +0,0 @@
|
|
1
|
-
import { Component, Inject, Input, PLATFORM_ID } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { FormsModule } from '@angular/forms';
|
4
|
-
import { AnimationDirective } from '../../../directive/animation-directive';
|
5
|
-
import { BackgroundDirective } from '../../../directive/background-directive';
|
6
|
-
import { BorderDirective } from '../../../directive/border-directive';
|
7
|
-
import { CornerDirective } from '../../../directive/corner-directive';
|
8
|
-
import { HoverDirective } from '../../../directive/hover-element-directive';
|
9
|
-
import { OverlayDirective } from '../../../directive/overlay-directive';
|
10
|
-
import { ContentFitDirective } from '../../../directive/content-fit-directive';
|
11
|
-
import { TextBackgroundDirectiveDirective } from '../../../directive/text-background-directive.directive';
|
12
|
-
import { SimpoComponentModule } from '../../../components/index';
|
13
|
-
import BaseSection from '../../../sections/BaseSection';
|
14
|
-
import { ColorDirective } from '../../../directive/color.directive';
|
15
|
-
import * as i0 from "@angular/core";
|
16
|
-
import * as i1 from "@angular/router";
|
17
|
-
import * as i2 from "../../../services/rest.service";
|
18
|
-
import * as i3 from ".././../../services/events.service";
|
19
|
-
import * as i4 from "@angular/common";
|
20
|
-
import * as i5 from "../../../components/hover-elements/hover-elements.component";
|
21
|
-
import * as i6 from "../../../components/delete-hover-element/delete-hover-element.component";
|
22
|
-
import * as i7 from "ngx-skeleton-loader";
|
23
|
-
export class FeaturedCollectionComponent extends BaseSection {
|
24
|
-
constructor(platformId, router, restService, _eventService) {
|
25
|
-
super();
|
26
|
-
this.platformId = platformId;
|
27
|
-
this.router = router;
|
28
|
-
this.restService = restService;
|
29
|
-
this._eventService = _eventService;
|
30
|
-
this.isLoading = false;
|
31
|
-
}
|
32
|
-
ngOnInit() {
|
33
|
-
this.content = this.data?.content;
|
34
|
-
this.styles = this.data?.styles;
|
35
|
-
this.getAllCollections();
|
36
|
-
this._eventService.showLoadingScreen.subscribe((response) => {
|
37
|
-
this.isLoading = response;
|
38
|
-
});
|
39
|
-
}
|
40
|
-
getSliceParameters() {
|
41
|
-
return [0, (this.styles?.maximumProduct || 0)];
|
42
|
-
}
|
43
|
-
redirectToListPage(collection) {
|
44
|
-
collection = collection.replaceAll(" ", "_");
|
45
|
-
this.router.navigate(['/list-category'], { queryParams: { collectionId: collection } });
|
46
|
-
}
|
47
|
-
getAllCollections() {
|
48
|
-
this.restService.getAllCollections().subscribe((response) => {
|
49
|
-
this.responseData = response.filter((category) => category.featuredCollection || true).map((collection) => {
|
50
|
-
return {
|
51
|
-
...collection,
|
52
|
-
categoryName: collection.collectionName,
|
53
|
-
categoryId: collection.collectionId
|
54
|
-
};
|
55
|
-
});
|
56
|
-
});
|
57
|
-
}
|
58
|
-
editSection() {
|
59
|
-
this._eventService.toggleEditorEvent.emit(false);
|
60
|
-
setTimeout(() => {
|
61
|
-
this._eventService.editSection.emit({ data: this.data });
|
62
|
-
}, 100);
|
63
|
-
}
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: FeaturedCollectionComponent, deps: [{ token: PLATFORM_ID }, { token: i1.Router }, { token: i2.RestService }, { token: i3.EventsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
65
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: FeaturedCollectionComponent, isStandalone: true, selector: "simpo-featured-collection", inputs: { data: "data", responseData: "responseData", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" [simpoBackground]=\"styles?.background\"\r\n [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\" (click)=\"editSection()\">\r\n <div [id]=\"data?.id\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img loading=\"lazy\" src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"category-parent\">\r\n <div *ngFor=\"let data of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]\" (click)=\"redirectToListPage(data.categoryName)\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" [src]=\"data.imgUrl?.[0] ?? 'https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" alt=\"\" class=\"category-image\">\r\n <div class=\"category-name body-large\">{{data.categoryName}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".mt-15{margin-top:15px}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.category-parent{display:flex;margin-top:25px;gap:25px;overflow-x:scroll;justify-content:center;cursor:pointer}.category-image{height:230px;width:230px;border-radius:100%;margin-bottom:15px}.category-parent::-webkit-scrollbar{display:none}.span{width:141px;height:15px}.category-name{color:#222;font-size:16px;line-height:normal;font-weight:600}@media screen and (max-width : 475px){.main-container{padding-left:10px;padding-right:10px}.total-container{height:fit-content!important;padding-top:5px!important;padding-bottom:5px!important}.category-image{height:100px;width:100px}.header{gap:7px}.category-parent{gap:15px;margin-top:15px;padding-left:0!important;padding-right:0!important}.span{width:70.5px;height:7.5px}.category-name{font-size:12px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.SlicePipe, name: "slice" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: i5.HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged", "isEcommerce"], outputs: ["edit"] }, { kind: "component", type: i6.DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }, { kind: "component", type: i7.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme"] }, { kind: "directive", type:
|
66
|
-
//directive
|
67
|
-
AnimationDirective, selector: "[simpoAnimation]", inputs: ["simpoAnimation"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: BorderDirective, selector: "[simpoBorder]", inputs: ["simpoBorder"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: OverlayDirective, selector: "[simpoOverlay]", inputs: ["simpoOverlay"] }] }); }
|
68
|
-
}
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: FeaturedCollectionComponent, decorators: [{
|
70
|
-
type: Component,
|
71
|
-
args: [{ selector: 'simpo-featured-collection', standalone: true, imports: [
|
72
|
-
CommonModule,
|
73
|
-
FormsModule,
|
74
|
-
SimpoComponentModule,
|
75
|
-
//directive
|
76
|
-
AnimationDirective,
|
77
|
-
ContentFitDirective,
|
78
|
-
BackgroundDirective,
|
79
|
-
BorderDirective,
|
80
|
-
CornerDirective,
|
81
|
-
HoverDirective,
|
82
|
-
OverlayDirective,
|
83
|
-
TextBackgroundDirectiveDirective,
|
84
|
-
ColorDirective
|
85
|
-
], template: "<ng-container *ngIf=\"!isLoading\">\r\n <section class=\"container-fluid total-container\" [id]=\"data?.id\" [simpoBackground]=\"styles?.background\"\r\n [simpoLayout]=\"styles?.layout\" simpoHover (hovering)=\"showEditTabs($event)\" (click)=\"editSection()\">\r\n <div [id]=\"data?.id\" #mainContainer [simpoOverlay]=\"styles?.background\" [simpoBorder]=\"styles?.border\"\r\n [simpoAnimation]=\"styles?.animation\">\r\n <div *ngFor=\"let item of content?.inputText\">\r\n <div [innerHTML]=\"item.value\" [ngClass]=\"item.label === 'Heading' ? 'heading-large lh-2 mb-3' : 'body-large'\">\r\n </div>\r\n </div>\r\n <img loading=\"lazy\" src=\"https://dev-beeos.s3.amazonaws.com/library-media/714126c1707378935732span.png\" alt=\"\"\r\n class=\"span-img mt-15\">\r\n <div class=\"category-parent\">\r\n <div *ngFor=\"let data of responseData | slice:getSliceParameters()[0]:getSliceParameters()[1]\" (click)=\"redirectToListPage(data.categoryName)\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" [src]=\"data.imgUrl?.[0] ?? 'https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" alt=\"\" class=\"category-image\">\r\n <div class=\"category-name body-large\">{{data.categoryName}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <div [ngClass]=\"{'hover_effect': edit}\" *ngIf=\"showEditors\">\r\n <simpo-hover-elements [data]=\"data\" [index]=\"index\" [editOptions]=\"edit\"></simpo-hover-elements>\r\n </div>\r\n <div *ngIf=\"showDelete\" [ngClass]=\"{'hover_effect': delete}\">\r\n <simpo-delete-hover-element [data]=\"data\" [index]=\"index\"></simpo-delete-hover-element>\r\n </div>\r\n\r\n </section>\r\n</ng-container>\r\n\r\n<ngx-skeleton-loader *ngIf=\"isLoading\" count=\"1\" appearance=\"circle\" [theme]=\"{\r\n width: '100%',\r\n height: '40vh',\r\n 'border-radius': '10px',\r\n 'position': 'relative',\r\n 'right': '5px'\r\n}\">\r\n</ngx-skeleton-loader>\r\n", styles: [".mt-15{margin-top:15px}.total-container{height:auto;position:relative;display:block!important}.hover_effect{position:absolute;width:100%;top:0;left:0;height:100%}.category-parent{display:flex;margin-top:25px;gap:25px;overflow-x:scroll;justify-content:center;cursor:pointer}.category-image{height:230px;width:230px;border-radius:100%;margin-bottom:15px}.category-parent::-webkit-scrollbar{display:none}.span{width:141px;height:15px}.category-name{color:#222;font-size:16px;line-height:normal;font-weight:600}@media screen and (max-width : 475px){.main-container{padding-left:10px;padding-right:10px}.total-container{height:fit-content!important;padding-top:5px!important;padding-bottom:5px!important}.category-image{height:100px;width:100px}.header{gap:7px}.category-parent{gap:15px;margin-top:15px;padding-left:0!important;padding-right:0!important}.span{width:70.5px;height:7.5px}.category-name{font-size:12px}}\n"] }]
|
86
|
-
}], ctorParameters: () => [{ type: Object, decorators: [{
|
87
|
-
type: Inject,
|
88
|
-
args: [PLATFORM_ID]
|
89
|
-
}] }, { type: i1.Router }, { type: i2.RestService }, { type: i3.EventsService }], propDecorators: { data: [{
|
90
|
-
type: Input
|
91
|
-
}], responseData: [{
|
92
|
-
type: Input
|
93
|
-
}], index: [{
|
94
|
-
type: Input
|
95
|
-
}], edit: [{
|
96
|
-
type: Input
|
97
|
-
}], delete: [{
|
98
|
-
type: Input
|
99
|
-
}] } });
|
100
|
-
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W5nXCIgY291bnQ9XCIxXCIgYXBwZWFyYW5jZT1cImNpcmNsZVwiIFt0aGVtZV09XCJ7XHJcbiAgd2lkdGg6ICcxMDAlJyxcclxuICBoZWlnaHQ6ICc0MHZoJyxcclxuICAnYm9yZGVyLXJhZGl1cyc6ICcxMHB4JyxcclxuICAncG9zaXRpb24nOiAncmVsYXRpdmUnLFxyXG4gICdyaWdodCc6ICc1cHgnXHJcbn1cIj5cclxuPC9uZ3gtc2tlbGV0b24tbG9hZGVyPlxyXG4iXX0=
|
package/esm2022/lib/ecommerce/sections/small-product-listing/small-product-listing.component.mjs
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { BUSINESS_CONSTANTS } from '../../../constants/business.constant';
|
4
|
-
import { MatIcon } from '@angular/material/icon';
|
5
|
-
import { OrderedItems } from '../../styles/OrderedItems.modal';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
import * as i1 from "../../../services/cart.service";
|
8
|
-
import * as i2 from "@angular/common";
|
9
|
-
export class SmallProductListingComponent {
|
10
|
-
constructor(cartService) {
|
11
|
-
this.cartService = cartService;
|
12
|
-
this.USER_CART = null;
|
13
|
-
}
|
14
|
-
addItemToCart(product, type) {
|
15
|
-
// if (this.isItemOutOfStock(product)) {
|
16
|
-
// this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
|
17
|
-
// return;
|
18
|
-
// }
|
19
|
-
if (!product?.quantity)
|
20
|
-
product.quantity = 0;
|
21
|
-
if (type == 'ADD') {
|
22
|
-
product.quantity += 1;
|
23
|
-
}
|
24
|
-
else {
|
25
|
-
product.quantity -= 1;
|
26
|
-
}
|
27
|
-
if (product?.itemVariant?.length) {
|
28
|
-
const itemVarient = this.getItemVarient(product, product.varientId);
|
29
|
-
if (itemVarient) {
|
30
|
-
itemVarient.quantity = product.quantity;
|
31
|
-
this.cartService.addItemToCart(product, itemVarient.variantId);
|
32
|
-
}
|
33
|
-
}
|
34
|
-
else {
|
35
|
-
this.cartService.addItemToCart(product);
|
36
|
-
}
|
37
|
-
if (product.quantity) {
|
38
|
-
let isPresent = false;
|
39
|
-
this.USER_CART?.forEach((item) => {
|
40
|
-
if (item.varientId == product.varientId) {
|
41
|
-
item.quantity = product.quantity;
|
42
|
-
isPresent = true;
|
43
|
-
}
|
44
|
-
});
|
45
|
-
if (!isPresent)
|
46
|
-
this.USER_CART?.push(new OrderedItems(product, product.varientId));
|
47
|
-
}
|
48
|
-
else {
|
49
|
-
this.USER_CART = this.USER_CART?.filter((item) => item.varientId != product.varientId) ?? [];
|
50
|
-
}
|
51
|
-
}
|
52
|
-
getItemVarient(product, varientId) {
|
53
|
-
let selectedVarient = null;
|
54
|
-
product?.itemVariant?.forEach((varient) => {
|
55
|
-
if (varient.variantId == varientId)
|
56
|
-
selectedVarient = varient;
|
57
|
-
});
|
58
|
-
return selectedVarient;
|
59
|
-
}
|
60
|
-
getPercentage(product) {
|
61
|
-
return ((product.price.sellingPrice - product.price.discountedPrice) / 100).toFixed(0);
|
62
|
-
}
|
63
|
-
get currency() {
|
64
|
-
return BUSINESS_CONSTANTS.CURRENCY;
|
65
|
-
}
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: SmallProductListingComponent, deps: [{ token: i1.CartService }], target: i0.ɵɵFactoryTarget.Component }); }
|
67
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: SmallProductListingComponent, isStandalone: true, selector: "simpo-small-product-listing", inputs: { product: "product", data: "data" }, ngImport: i0, template: "<div class=\"product\" [style.opacity]=\"product?.itemInventory?.openingStock == 0 ? 0.5 : 1\">\r\n <div class=\"prod-img\">\r\n <img [src]=\"product.itemImages?.[0]?.imgUrl\" alt=\"\">\r\n <div class=\"discount\" [style.backgroundColor]=\"data?.styles?.background?.color\" style=\"color: white;\" *ngIf=\"product.price?.sellingPrice != product.price?.discountedPrice\">{{getPercentage(product)}}% off</div>\r\n </div>\r\n <div class=\"d-flex flex-column p-2\">\r\n <span>{{product.name}}</span>\r\n <span class=\"m-1\">\r\n <span><span [innerHTML]=\"currency\"></span> {{product.price.discountedPrice}}</span>\r\n <span class=\"strike-through\"><span [innerHTML]=\"currency\"></span> {{product.price.sellingPrice}}</span>\r\n </span>\r\n <div class=\"add-to-cart\" [ngClass]=\"{'justify-content-between p-0': product.quantity, 'justify-content-center': !product.quantity}\">\r\n <ng-container *ngIf=\"product?.itemInventory?.openingStock\">\r\n <ng-container *ngIf=\"!product.quantity\">\r\n <span (click)=\"addItemToCart(product, 'ADD')\">Add to Cart</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"product.quantity\">\r\n <span class=\"quantity-btn\" (click)=\"addItemToCart(product, 'SUBSTRACT')\">-</span>\r\n <span class=\"quantity\">{{product.quantity}}</span>\r\n <span class=\"quantity-btn\" (click)=\"addItemToCart(product, 'ADD')\">+</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"product?.itemInventory?.openingStock == 0\">\r\n <span (click)=\"addItemToCart(product, 'ADD')\" class=\"d-flex align-items-center\">\r\n <mat-icon>notification_important</mat-icon>\r\n <span class=\"ml-2\">Notify</span>\r\n </span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [".product{position:relative;display:flex;flex-direction:column;cursor:pointer;margin-right:10px;border-radius:10px;overflow:hidden;min-width:195px;max-width:195px;background-color:#fff}.product .prod-img{position:relative;height:200px;width:100%;overflow:hidden}.product .prod-img img{height:100%;width:100%;object-fit:cover}.product img:hover{-webkit-animation:scale-up-center .2s linear both;animation:scale-up-center .2s linear both}.styling{height:30px;width:30px;border-radius:50%;background-color:#fff;position:absolute;bottom:0;right:-12px}.strike-through{text-decoration:line-through;color:#d3d3d3;font-size:12px;margin-left:5px;position:relative}.add-to-cart{width:100%;cursor:pointer;background-color:#fff;border:1.5px solid #EF4C7B;border-radius:5px;color:#ef4c7b;padding:5px;text-align:center;display:flex;align-items:center}.add-to-cart .quantity-btn{background-color:#fb8dac7d;padding:5px}.add-to-cart .quantity{color:#ef4c7b}.discount{position:absolute;top:0;padding:5px;width:60px;text-align:center;font-size:12px;border-bottom-right-radius:3px}@-webkit-keyframes scale-up-center{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(1.08);transform:scale(1.08)}}@keyframes scale-up-center{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(1.08);transform:scale(1.08)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
68
|
-
}
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: SmallProductListingComponent, decorators: [{
|
70
|
-
type: Component,
|
71
|
-
args: [{ selector: 'simpo-small-product-listing', standalone: true, imports: [
|
72
|
-
CommonModule,
|
73
|
-
MatIcon
|
74
|
-
], template: "<div class=\"product\" [style.opacity]=\"product?.itemInventory?.openingStock == 0 ? 0.5 : 1\">\r\n <div class=\"prod-img\">\r\n <img [src]=\"product.itemImages?.[0]?.imgUrl\" alt=\"\">\r\n <div class=\"discount\" [style.backgroundColor]=\"data?.styles?.background?.color\" style=\"color: white;\" *ngIf=\"product.price?.sellingPrice != product.price?.discountedPrice\">{{getPercentage(product)}}% off</div>\r\n </div>\r\n <div class=\"d-flex flex-column p-2\">\r\n <span>{{product.name}}</span>\r\n <span class=\"m-1\">\r\n <span><span [innerHTML]=\"currency\"></span> {{product.price.discountedPrice}}</span>\r\n <span class=\"strike-through\"><span [innerHTML]=\"currency\"></span> {{product.price.sellingPrice}}</span>\r\n </span>\r\n <div class=\"add-to-cart\" [ngClass]=\"{'justify-content-between p-0': product.quantity, 'justify-content-center': !product.quantity}\">\r\n <ng-container *ngIf=\"product?.itemInventory?.openingStock\">\r\n <ng-container *ngIf=\"!product.quantity\">\r\n <span (click)=\"addItemToCart(product, 'ADD')\">Add to Cart</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"product.quantity\">\r\n <span class=\"quantity-btn\" (click)=\"addItemToCart(product, 'SUBSTRACT')\">-</span>\r\n <span class=\"quantity\">{{product.quantity}}</span>\r\n <span class=\"quantity-btn\" (click)=\"addItemToCart(product, 'ADD')\">+</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"product?.itemInventory?.openingStock == 0\">\r\n <span (click)=\"addItemToCart(product, 'ADD')\" class=\"d-flex align-items-center\">\r\n <mat-icon>notification_important</mat-icon>\r\n <span class=\"ml-2\">Notify</span>\r\n </span>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [".product{position:relative;display:flex;flex-direction:column;cursor:pointer;margin-right:10px;border-radius:10px;overflow:hidden;min-width:195px;max-width:195px;background-color:#fff}.product .prod-img{position:relative;height:200px;width:100%;overflow:hidden}.product .prod-img img{height:100%;width:100%;object-fit:cover}.product img:hover{-webkit-animation:scale-up-center .2s linear both;animation:scale-up-center .2s linear both}.styling{height:30px;width:30px;border-radius:50%;background-color:#fff;position:absolute;bottom:0;right:-12px}.strike-through{text-decoration:line-through;color:#d3d3d3;font-size:12px;margin-left:5px;position:relative}.add-to-cart{width:100%;cursor:pointer;background-color:#fff;border:1.5px solid #EF4C7B;border-radius:5px;color:#ef4c7b;padding:5px;text-align:center;display:flex;align-items:center}.add-to-cart .quantity-btn{background-color:#fb8dac7d;padding:5px}.add-to-cart .quantity{color:#ef4c7b}.discount{position:absolute;top:0;padding:5px;width:60px;text-align:center;font-size:12px;border-bottom-right-radius:3px}@-webkit-keyframes scale-up-center{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(1.08);transform:scale(1.08)}}@keyframes scale-up-center{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(1.08);transform:scale(1.08)}}\n"] }]
|
75
|
-
}], ctorParameters: () => [{ type: i1.CartService }], propDecorators: { product: [{
|
76
|
-
type: Input
|
77
|
-
}], data: [{
|
78
|
-
type: Input
|
79
|
-
}] } });
|
80
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hbGwtcHJvZHVjdC1saXN0aW5nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NpbXBvLXVpL3NyYy9saWIvZWNvbW1lcmNlL3NlY3Rpb25zL3NtYWxsLXByb2R1Y3QtbGlzdGluZy9zbWFsbC1wcm9kdWN0LWxpc3RpbmcuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9lY29tbWVyY2Uvc2VjdGlvbnMvc21hbGwtcHJvZHVjdC1saXN0aW5nL3NtYWxsLXByb2R1Y3QtbGlzdGluZy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUVqRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDMUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ2pELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQzs7OztBQWEvR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cnQocHJvZHVjdCwgJ0FERCcpXCI+Kzwvc3Bhbj5cclxuICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cInByb2R1Y3Q/Lml0ZW1JbnZlbnRvcnk/Lm9wZW5pbmdTdG9jayA9PSAwXCI+XHJcbiAgICAgICAgICAgICAgICA8c3BhbiAoY2xpY2spPVwiYWRkSXRlbVRvQ2FydChwcm9kdWN0LCAnQUREJylcIiBjbGFzcz1cImQtZmxleCBhbGlnbi1pdGVtcy1jZW50ZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICA8bWF0LWljb24+bm90aWZpY2F0aW9uX2ltcG9ydGFudDwvbWF0LWljb24+XHJcbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJtbC0yXCI+Tm90aWZ5PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgPC9zcGFuPlxyXG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj4iXX0=
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { EventsService } from '.././../../services/events.service';
|
2
|
-
import BaseSection from '../../../sections/BaseSection';
|
3
|
-
import { FeaturedCategoryContentModal, FeaturedCategoryModal, FeaturedCategoryStylesModel } from './featured-category.modal';
|
4
|
-
import { Category } from '../../styles/category.modal';
|
5
|
-
import { RestService } from '../../../services/rest.service';
|
6
|
-
import { Router } from '@angular/router';
|
7
|
-
import * as i0 from "@angular/core";
|
8
|
-
export declare class FeaturedCollectionComponent extends BaseSection {
|
9
|
-
private platformId;
|
10
|
-
private readonly router;
|
11
|
-
private readonly restService;
|
12
|
-
private readonly _eventService;
|
13
|
-
data?: FeaturedCategoryModal;
|
14
|
-
responseData?: Category[];
|
15
|
-
index?: number;
|
16
|
-
edit?: boolean;
|
17
|
-
delete?: boolean;
|
18
|
-
isLoading: boolean;
|
19
|
-
content?: FeaturedCategoryContentModal;
|
20
|
-
styles?: FeaturedCategoryStylesModel;
|
21
|
-
constructor(platformId: Object, router: Router, restService: RestService, _eventService: EventsService);
|
22
|
-
ngOnInit(): void;
|
23
|
-
getSliceParameters(): number[];
|
24
|
-
redirectToListPage(collection: string): void;
|
25
|
-
getAllCollections(): void;
|
26
|
-
editSection(): void;
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedCollectionComponent, never>;
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedCollectionComponent, "simpo-featured-collection", 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>;
|
29
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { ItemVariant, Product } from '../../styles/product.modal';
|
2
|
-
import { CartService } from '../../../services/cart.service';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export declare class SmallProductListingComponent {
|
5
|
-
private readonly cartService;
|
6
|
-
constructor(cartService: CartService);
|
7
|
-
private USER_CART;
|
8
|
-
product: Product;
|
9
|
-
data?: any;
|
10
|
-
addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
|
11
|
-
getItemVarient(product: Product, varientId: string): ItemVariant | null;
|
12
|
-
getPercentage(product: Product): string;
|
13
|
-
get currency(): string;
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SmallProductListingComponent, never>;
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SmallProductListingComponent, "simpo-small-product-listing", never, { "product": { "alias": "product"; "required": false; }; "data": { "alias": "data"; "required": false; }; }, {}, never, never, true, never>;
|
16
|
-
}
|
Binary file
|
Binary file
|