simpo-component-library 1.5.24 → 1.5.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,97 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input } from '@angular/core';
3
+ import { MatIcon } from '@angular/material/icon';
4
+ import { FeaturedProductsComponent } from '../featured-products/featured-products.component';
5
+ import { FeaturedProductModal } from '../featured-products/featured-products.modal';
6
+ import BaseSection from '../../../sections/BaseSection';
7
+ import { BackgroundDirective } from '../../../directive/background-directive';
8
+ import { HoverDirective } from '../../../directive/hover-element-directive';
9
+ import { PositionLayoutDirectiveDirective } from '../../../directive/position-layout-directive.directive';
10
+ import { SimpoComponentModule } from '../../../components/index';
11
+ import { ContentFitDirective } from '../../../directive/content-fit-directive';
12
+ import { SmallProductListingComponent } from '../small-product-listing/small-product-listing.component';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "../../../services/rest.service";
15
+ import * as i2 from "../../../services/cart.service";
16
+ import * as i3 from "../../../services/events.service";
17
+ import * as i4 from "@angular/router";
18
+ import * as i5 from "@angular/common";
19
+ import * as i6 from "../../../components/hover-elements/hover-elements.component";
20
+ import * as i7 from "../../../components/delete-hover-element/delete-hover-element.component";
21
+ export class CategoryProductComponent extends BaseSection {
22
+ constructor(restService, cartService, _eventService, activatedRoute) {
23
+ super();
24
+ this.restService = restService;
25
+ this.cartService = cartService;
26
+ this._eventService = _eventService;
27
+ this.activatedRoute = activatedRoute;
28
+ this.categories = [
29
+ { name: "Kajal", imgUrl: "" },
30
+ { name: "BB/CC Cream", imgUrl: "" },
31
+ { name: "Fake Nails", imgUrl: "" },
32
+ { name: "Eye Liner", imgUrl: "" },
33
+ { name: "Lipstick", imgUrl: "" },
34
+ { name: "Primer", imgUrl: "" },
35
+ { name: "Compact Powder", imgUrl: "" },
36
+ ];
37
+ this.selectCategoryId = null;
38
+ this.categoryList = [];
39
+ this.USER_CART = null;
40
+ this.collectionId = null;
41
+ this.featureProductData = null;
42
+ this.dataList = [];
43
+ }
44
+ ngOnInit() {
45
+ this.featureProductData = new FeaturedProductModal(this.data);
46
+ this.styles = this.data?.styles;
47
+ this.content = this.data?.content;
48
+ this.activatedRoute.queryParams.subscribe((qParam) => {
49
+ this.collectionId = qParam["collectionId"];
50
+ });
51
+ this.getAllCategories(); // should be replaced by getAllCategories by collectionId
52
+ }
53
+ getAllCategories() {
54
+ this.restService.getAllCategories().subscribe((response) => {
55
+ this.categoryList = response;
56
+ this.selectCategoryId = this.categoryList?.[0]?.categoryId;
57
+ this.selectCategory(this.selectCategoryId);
58
+ });
59
+ }
60
+ selectCategory(categoryId) {
61
+ this.selectCategoryId = categoryId;
62
+ this.restService.getProductByCategoryId(categoryId).subscribe((response) => {
63
+ this.dataList = response.data;
64
+ });
65
+ }
66
+ editSection() {
67
+ this._eventService.toggleEditorEvent.emit(false);
68
+ setTimeout(() => {
69
+ this._eventService.editSection.emit({ data: this.data });
70
+ }, 100);
71
+ }
72
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CategoryProductComponent, deps: [{ token: i1.RestService }, { token: i2.CartService }, { token: i3.EventsService }, { token: i4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
73
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: CategoryProductComponent, isStandalone: true, selector: "simpo-category-product", inputs: { data: "data", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" [simpoBackground]=\"styles?.background\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of data?.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 <section class=\"m-auto\">\r\n <section class=\"d-flex\">\r\n <ng-container *ngFor=\"let category of categoryList; let idx = index\">\r\n <div class=\"d-flex flex-column align-items-center category-tag position-relative\" style=\"gap: 5px;\" [ngClass]=\"{'category-tag-selected': selectCategoryId == category.categoryId}\" (click)=\"selectCategory(category.categoryId)\">\r\n <mat-icon>face</mat-icon>\r\n <span class=\"text-center\" style=\"font-size: 14px;\">{{ category.categoryName | titlecase }}</span>\r\n <!-- <div class=\"styling\"></div> -->\r\n </div>\r\n </ng-container>\r\n </section>\r\n <section class=\"d-flex product-list\">\r\n <ng-container *ngFor=\"let product of dataList\">\r\n <simpo-small-product-listing [product]=\"product\" [data]=\"data\"></simpo-small-product-listing>\r\n </ng-container>\r\n </section>\r\n </section>\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</section>", styles: [".category-tag{padding:15px 10px;height:120px;width:80px;border-top-left-radius:10px;border-top-right-radius:10px;cursor:pointer;border-top:8px solid transparent}.category-tag-selected{background-color:#eef4f6;border-top:8px solid #1467A8}.product-list{background-color:#f5eaff;padding:40px 20px;overflow-x:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.TitleCasePipe, name: "titlecase" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: SmallProductListingComponent, selector: "simpo-small-product-listing", inputs: ["product", "data"] }, { kind: "directive", type: BackgroundDirective, selector: "[simpoBackground]", inputs: ["simpoBackground", "scrollValue"] }, { kind: "directive", type: HoverDirective, selector: "[simpoHover]", outputs: ["hovering"] }, { kind: "directive", type: ContentFitDirective, selector: "[simpoLayout]", inputs: ["simpoLayout"] }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: i6.HoverElementsComponent, selector: "simpo-hover-elements", inputs: ["data", "index", "editOptions", "isMerged", "isEcommerce"], outputs: ["edit"] }, { kind: "component", type: i7.DeleteHoverElementComponent, selector: "simpo-delete-hover-element", inputs: ["index", "data"], outputs: ["edit"] }] }); }
74
+ }
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: CategoryProductComponent, decorators: [{
76
+ type: Component,
77
+ args: [{ selector: 'simpo-category-product', standalone: true, imports: [
78
+ CommonModule,
79
+ MatIcon,
80
+ PositionLayoutDirectiveDirective,
81
+ FeaturedProductsComponent,
82
+ SmallProductListingComponent,
83
+ BackgroundDirective,
84
+ HoverDirective,
85
+ ContentFitDirective,
86
+ SimpoComponentModule
87
+ ], template: "<section class=\"container-fluid total-container\" [id]=\"data?.id\" simpoHover (hovering)=\"showEditTabs($event)\" [simpoBackground]=\"styles?.background\" [simpoLayout]=\"styles?.layout\">\r\n <div *ngFor=\"let item of data?.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 <section class=\"m-auto\">\r\n <section class=\"d-flex\">\r\n <ng-container *ngFor=\"let category of categoryList; let idx = index\">\r\n <div class=\"d-flex flex-column align-items-center category-tag position-relative\" style=\"gap: 5px;\" [ngClass]=\"{'category-tag-selected': selectCategoryId == category.categoryId}\" (click)=\"selectCategory(category.categoryId)\">\r\n <mat-icon>face</mat-icon>\r\n <span class=\"text-center\" style=\"font-size: 14px;\">{{ category.categoryName | titlecase }}</span>\r\n <!-- <div class=\"styling\"></div> -->\r\n </div>\r\n </ng-container>\r\n </section>\r\n <section class=\"d-flex product-list\">\r\n <ng-container *ngFor=\"let product of dataList\">\r\n <simpo-small-product-listing [product]=\"product\" [data]=\"data\"></simpo-small-product-listing>\r\n </ng-container>\r\n </section>\r\n </section>\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</section>", styles: [".category-tag{padding:15px 10px;height:120px;width:80px;border-top-left-radius:10px;border-top-right-radius:10px;cursor:pointer;border-top:8px solid transparent}.category-tag-selected{background-color:#eef4f6;border-top:8px solid #1467A8}.product-list{background-color:#f5eaff;padding:40px 20px;overflow-x:auto}\n"] }]
88
+ }], ctorParameters: () => [{ type: i1.RestService }, { type: i2.CartService }, { type: i3.EventsService }, { type: i4.ActivatedRoute }], propDecorators: { data: [{
89
+ type: Input
90
+ }], index: [{
91
+ type: Input
92
+ }], edit: [{
93
+ type: Input
94
+ }], delete: [{
95
+ type: Input
96
+ }] } });
97
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnktcHJvZHVjdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zaW1wby11aS9zcmMvbGliL2Vjb21tZXJjZS9zZWN0aW9ucy9jYXRlZ29yeS1wcm9kdWN0L2NhdGVnb3J5LXByb2R1Y3QuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9lY29tbWVyY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bCBleHRlbmRzIFN0eWxlc01vZGVse1xyXG4gIGltYWdlOiBJbWFnZVN0eWxlO1xyXG4gIGNvcm5lcnM6IENvcm5lcnM7XHJcbiAgbWF4aW11bVByb2R1Y3Q6IG51bWJlcjtcclxuICBlbGVtZW50SW5Sb3c6IG51bWJlcjtcclxuICBtb2JpbGVDb2x1bW46IG51bWJlcjtcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBDYXRlZ29yeVByb2R1Y3REYXRhIHtcclxuICAgIGNvbGxlY3Rpb25JZDogc3RyaW5nO1xyXG59XHJcbiJdfQ==
@@ -0,0 +1,100 @@
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
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVhdHVyZWQtY29sbGVjdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNl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JyxcclxuICAnYm9yZGVyLXJhZGl1cyc6ICcxMHB4JyxcclxuICAncG9zaXRpb24nOiAncmVsYXRpdmUnLFxyXG4gICdyaWdodCc6ICc1cHgnXHJcbn1cIj5cclxuPC9uZ3gtc2tlbGV0b24tbG9hZGVyPlxyXG4iXX0=
@@ -0,0 +1,112 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input } from '@angular/core';
3
+ import { SimpoComponentModule } from '../../../components/index';
4
+ import BaseSection from '../../../sections/BaseSection';
5
+ import { OrderedItems } from '../../styles/OrderedItems.modal';
6
+ import { MatIcon } from '@angular/material/icon';
7
+ import { BUSINESS_CONSTANTS } from '../../../constants/business.constant';
8
+ import { SmallProductListingComponent } from '../small-product-listing/small-product-listing.component';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "../../../services/rest.service";
11
+ import * as i2 from "../../../services/cart.service";
12
+ import * as i3 from "@angular/common";
13
+ export class ProductCategoryListComponent extends BaseSection {
14
+ constructor(restService, cartService) {
15
+ super();
16
+ this.restService = restService;
17
+ this.cartService = cartService;
18
+ this.categories = [];
19
+ this.productList = [];
20
+ this.USER_CART = [];
21
+ this.selectedCategory = null;
22
+ }
23
+ ngOnInit() {
24
+ this.getAllCategories();
25
+ }
26
+ getAllCategories() {
27
+ this.restService.getAllCategories().subscribe((response) => {
28
+ this.categories = response;
29
+ this.selectCategory(this.categories[0]);
30
+ });
31
+ }
32
+ selectCategory(category) {
33
+ this.selectedCategory = category;
34
+ this.restService.getProductByCategoryId(this.selectedCategory.categoryId).subscribe((response) => {
35
+ this.productList = response.data;
36
+ });
37
+ }
38
+ addItemToCart(product, type) {
39
+ // if (this.isItemOutOfStock(product)) {
40
+ // this.messageService.add({ severity: 'warn', summary: 'Cart', detail: 'Item is not available as of now. We will notify you once available' });
41
+ // return;
42
+ // }
43
+ if (!product?.quantity)
44
+ product.quantity = 0;
45
+ if (type == 'ADD') {
46
+ product.quantity += 1;
47
+ }
48
+ else {
49
+ product.quantity -= 1;
50
+ }
51
+ if (product?.itemVariant?.length) {
52
+ const itemVarient = this.getItemVarient(product, product.varientId);
53
+ if (itemVarient) {
54
+ itemVarient.quantity = product.quantity;
55
+ this.cartService.addItemToCart(product, itemVarient.variantId);
56
+ }
57
+ }
58
+ else {
59
+ this.cartService.addItemToCart(product);
60
+ }
61
+ if (product.quantity) {
62
+ let isPresent = false;
63
+ this.USER_CART?.forEach((item) => {
64
+ if (item.varientId == product.varientId) {
65
+ item.quantity = product.quantity;
66
+ isPresent = true;
67
+ }
68
+ });
69
+ if (!isPresent)
70
+ this.USER_CART?.push(new OrderedItems(product, product.varientId));
71
+ }
72
+ else {
73
+ this.USER_CART = this.USER_CART?.filter((item) => item.varientId != product.varientId) ?? [];
74
+ }
75
+ }
76
+ getItemVarient(product, varientId) {
77
+ let selectedVarient = null;
78
+ product?.itemVariant?.forEach((varient) => {
79
+ if (varient.variantId == varientId)
80
+ selectedVarient = varient;
81
+ });
82
+ return selectedVarient;
83
+ }
84
+ getPercentage(product) {
85
+ return ((product.price.sellingPrice - product.price.discountedPrice) / 100).toFixed(0);
86
+ }
87
+ get currency() {
88
+ return BUSINESS_CONSTANTS.CURRENCY;
89
+ }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ProductCategoryListComponent, deps: [{ token: i1.RestService }, { token: i2.CartService }], target: i0.ɵɵFactoryTarget.Component }); }
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: ProductCategoryListComponent, isStandalone: true, selector: "simpo-product-category-list", inputs: { responseData: "responseData", data: "data", index: "index", edit: "edit", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<section class=\"d-flex\">\r\n <div class=\"filter-panel\">\r\n <ng-container *ngFor=\"let category of categories\">\r\n <div class=\"category\" [ngClass]=\"{'category-selected': category.categoryId == selectedCategory?.categoryId}\" (click)=\"selectCategory(category)\">\r\n <div class=\"product-img\">\r\n <img [src]=\"category.imgUrl?.[0]\" alt=\"\">\r\n </div>\r\n <span>{{ category.categoryName }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-list-container\">\r\n <h2>Buy {{ selectedCategory?.categoryName | titlecase }} Online</h2>\r\n \r\n <section class=\"d-flex product-list\">\r\n <ng-container *ngFor=\"let product of productList\">\r\n <simpo-small-product-listing [product]=\"product\" [data]=\"data\"></simpo-small-product-listing>\r\n \r\n </ng-container>\r\n </section>\r\n </div>\r\n</section>", styles: [".filter-panel{border-right:2px solid rgba(211,211,211,.297);width:25%}.category{display:flex;align-items:center;gap:10px;padding:10px;border-left:5px solid transparent;cursor:pointer}.category-selected{border-left:5px solid #ef4c7b;background-color:#ef4c7b1f}.product-img{height:45px;width:45px;padding:5px;border-radius:50%;background-color:#d3d3d3}.product-img img{height:100%;width:100%;border-radius:50%}.product-list-container{padding:40px 20px;width:80%;background-color:#f5eaff}.product-list{overflow:auto;flex-wrap:wrap;height:90vh}.product{position:relative;display:flex;flex-direction:column;cursor:pointer;border-radius:10px;overflow:hidden;min-width:195px;max-width:195px;margin:10px;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)}}@media screen and (max-width: 475px){.product-list-container{padding:5px!important}.category{flex-direction:column!important;text-align:center!important}.product{min-width:135px!important;max-width:135px!important;margin-left:0!important;margin-right:8px!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i3.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: SimpoComponentModule }, { kind: "component", type: SmallProductListingComponent, selector: "simpo-small-product-listing", inputs: ["product", "data"] }] }); }
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ProductCategoryListComponent, decorators: [{
94
+ type: Component,
95
+ args: [{ selector: 'simpo-product-category-list', standalone: true, imports: [
96
+ CommonModule,
97
+ MatIcon,
98
+ SimpoComponentModule,
99
+ SmallProductListingComponent
100
+ ], template: "<section class=\"d-flex\">\r\n <div class=\"filter-panel\">\r\n <ng-container *ngFor=\"let category of categories\">\r\n <div class=\"category\" [ngClass]=\"{'category-selected': category.categoryId == selectedCategory?.categoryId}\" (click)=\"selectCategory(category)\">\r\n <div class=\"product-img\">\r\n <img [src]=\"category.imgUrl?.[0]\" alt=\"\">\r\n </div>\r\n <span>{{ category.categoryName }}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"product-list-container\">\r\n <h2>Buy {{ selectedCategory?.categoryName | titlecase }} Online</h2>\r\n \r\n <section class=\"d-flex product-list\">\r\n <ng-container *ngFor=\"let product of productList\">\r\n <simpo-small-product-listing [product]=\"product\" [data]=\"data\"></simpo-small-product-listing>\r\n \r\n </ng-container>\r\n </section>\r\n </div>\r\n</section>", styles: [".filter-panel{border-right:2px solid rgba(211,211,211,.297);width:25%}.category{display:flex;align-items:center;gap:10px;padding:10px;border-left:5px solid transparent;cursor:pointer}.category-selected{border-left:5px solid #ef4c7b;background-color:#ef4c7b1f}.product-img{height:45px;width:45px;padding:5px;border-radius:50%;background-color:#d3d3d3}.product-img img{height:100%;width:100%;border-radius:50%}.product-list-container{padding:40px 20px;width:80%;background-color:#f5eaff}.product-list{overflow:auto;flex-wrap:wrap;height:90vh}.product{position:relative;display:flex;flex-direction:column;cursor:pointer;border-radius:10px;overflow:hidden;min-width:195px;max-width:195px;margin:10px;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)}}@media screen and (max-width: 475px){.product-list-container{padding:5px!important}.category{flex-direction:column!important;text-align:center!important}.product{min-width:135px!important;max-width:135px!important;margin-left:0!important;margin-right:8px!important}}\n"] }]
101
+ }], ctorParameters: () => [{ type: i1.RestService }, { type: i2.CartService }], propDecorators: { responseData: [{
102
+ type: Input
103
+ }], data: [{
104
+ type: Input
105
+ }], index: [{
106
+ type: Input
107
+ }], edit: [{
108
+ type: Input
109
+ }], delete: [{
110
+ type: Input
111
+ }] } });
112
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1jYXRlZ29yeS1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NpbXBvLXVpL3NyYy9saWIvZWNvbW1lcmNlL3NlY3Rpb25zL3Byb2R1Y3QtY2F0ZWdvcnktbGlzdC9wcm9kdWN0LWNhdGVnb3J5LWxpc3QuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2ltcG8tdWkvc3JjL2xpYi9lY29tbWVyY2Uvc2VjdGlvbnMvcHJvZHVjdC1jYXRlZ29yeS1saXN0L3Byb2R1Y3QtY2F0ZWdvcnktbGlzdC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDekQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDakUsT0FBTyxXQUFXLE1BQU0sK0JBQStCLENBQUM7QUFJeEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRS9ELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUNqRCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQUUxRSxPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSwwREFBMEQsQ0FB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jdC1saXN0aW5nPlxyXG4gICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICA8L3NlY3Rpb24+XHJcbiAgICA8L2Rpdj5cclxuPC9zZWN0aW9uPiJdfQ==
@@ -0,0 +1,80 @@
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hbGwtcHJvZHVjdC1saXN0aW5nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NpbXBvLXVpL3NyYy9saWIvZWNvbW1lcmNlL3NlY3Rpb25zL3NtYWxsLXByb2R1Y3QtbGlzdGluZy9zbWFsbC1wcm9kdWN0LW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gICAgICAgICAgICAgICAgPC9zcGFuPlxyXG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICA8L2Rpdj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj4iXX0=