simpo-component-library 1.5.27 → 1.5.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/esm2022/lib/directive/border-directive.mjs +1 -1
  2. package/esm2022/lib/ecommerce/sections/category-product/category-product.component.mjs +56 -69
  3. package/esm2022/lib/ecommerce/sections/category-product/category-product.model.mjs +1 -1
  4. package/esm2022/lib/ecommerce/sections/featured-category/featured-category.component.mjs +4 -4
  5. package/esm2022/lib/ecommerce/sections/featured-category/featured-category.modal.mjs +1 -1
  6. package/esm2022/lib/ecommerce/sections/featured-category/featured-collection.component.mjs +100 -0
  7. package/esm2022/lib/ecommerce/sections/product-category-list/product-category-list.component.mjs +23 -11
  8. package/esm2022/lib/ecommerce/sections/small-product-listing/small-product-listing.component.mjs +80 -0
  9. package/esm2022/lib/services/events.service.mjs +2 -1
  10. package/esm2022/lib/services/rest.service.mjs +7 -1
  11. package/esm2022/public-api.mjs +2 -1
  12. package/fesm2022/simpo-component-library.mjs +228 -73
  13. package/fesm2022/simpo-component-library.mjs.map +1 -1
  14. package/lib/directive/background-directive.d.ts +1 -1
  15. package/lib/directive/button-directive.directive.d.ts +1 -1
  16. package/lib/directive/color.directive.d.ts +1 -1
  17. package/lib/ecommerce/sections/category-product/category-product.component.d.ts +11 -8
  18. package/lib/ecommerce/sections/category-product/category-product.model.d.ts +0 -4
  19. package/lib/ecommerce/sections/featured-category/featured-category.modal.d.ts +3 -0
  20. package/lib/ecommerce/sections/featured-category/featured-collection.component.d.ts +29 -0
  21. package/lib/ecommerce/sections/product-category-list/product-category-list.component.d.ts +8 -4
  22. package/lib/ecommerce/sections/small-product-listing/small-product-listing.component.d.ts +16 -0
  23. package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
  24. package/lib/services/events.service.d.ts +1 -0
  25. package/lib/services/rest.service.d.ts +1 -0
  26. package/package.json +1 -1
  27. package/public-api.d.ts +1 -0
  28. package/simpo-component-library-1.5.31.tgz +0 -0
  29. package/simpo-component-library-1.5.27.tgz +0 -0
@@ -11,7 +11,7 @@ export declare class BackgroundDirective implements OnChanges {
11
11
  constructor(el: ElementRef, eventService: EventsService);
12
12
  ngOnDestroy(): void;
13
13
  ngOnChanges(change: SimpleChanges): void;
14
- getTextColor(bgColor: string): "#ffffff" | "#000000" | "#ffffff;";
14
+ getTextColor(bgColor: string): "#000000" | "#ffffff" | "#ffffff;";
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<BackgroundDirective, never>;
16
16
  static ɵdir: i0.ɵɵDirectiveDeclaration<BackgroundDirective, "[simpoBackground]", never, { "simpoBackground": { "alias": "simpoBackground"; "required": false; }; "scrollValue": { "alias": "scrollValue"; "required": false; }; }, {}, never, never, true, never>;
17
17
  }
@@ -15,7 +15,7 @@ export declare class ButtonDirectiveDirective implements OnChanges {
15
15
  applyButtonStyleChanges(): void;
16
16
  applyButtonType(style: ButtonStyleModel, color: string): void;
17
17
  applyButtonShape(style: ButtonStyleModel): void;
18
- getTextColor(bgColor: string): "#ffffff" | "#000000" | "#ffffff;";
18
+ getTextColor(bgColor: string): "#000000" | "#ffffff" | "#ffffff;";
19
19
  buttonStyleSubscription?: Subscription;
20
20
  buttonStyleChangeCheck(): void;
21
21
  changeButtonStyle(id: any, style: ButtonStyleModel, bgColor: string): void;
@@ -12,7 +12,7 @@ export declare class ColorDirective implements OnChanges {
12
12
  ngOnDestroy(): void;
13
13
  applyColor(): void;
14
14
  bgColorChangeCheck(): void;
15
- getTextColor(): "#ffffff" | "#000000" | "#ffffff;";
15
+ getTextColor(): "#000000" | "#ffffff" | "#ffffff;";
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ColorDirective, never>;
17
17
  static ɵdir: i0.ɵɵDirectiveDeclaration<ColorDirective, "[simpoColor]", never, { "bgColor": { "alias": "simpoColor"; "required": false; }; }, {}, never, never, true, never>;
18
18
  }
@@ -1,9 +1,9 @@
1
- import { OnInit } from '@angular/core';
1
+ import { ElementRef, OnInit } from '@angular/core';
2
2
  import { CategoryProductContentModal, CategoryProductModal, CategoryProductStylesModel } from './category-product.model';
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 { ItemVariant, Product } from '../../styles/product.modal';
6
+ import { 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';
@@ -18,9 +18,9 @@ export declare class CategoryProductComponent extends BaseSection implements OnI
18
18
  index?: number;
19
19
  edit?: boolean;
20
20
  delete?: boolean;
21
+ containerRef: ElementRef<HTMLDivElement> | undefined;
21
22
  styles?: CategoryProductStylesModel;
22
23
  content?: CategoryProductContentModal;
23
- categories: any[];
24
24
  selectCategoryId: string | null;
25
25
  categoryList: Category[];
26
26
  private USER_CART;
@@ -28,13 +28,16 @@ export declare class CategoryProductComponent extends BaseSection implements OnI
28
28
  private collectionId;
29
29
  featureProductData: FeaturedProductModal | null;
30
30
  ngOnInit(): void;
31
- getAllCategories(): void;
31
+ ngAfterViewInit(): void;
32
+ getAllCategoriesById(): void;
32
33
  dataList: Product[];
33
34
  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;
35
+ scrollRight(): void;
36
+ scrollLeft(): void;
37
+ showRightArrow: boolean;
38
+ showLeftArrow: boolean;
39
+ isFirstTime: boolean;
40
+ updateArrows(): void;
38
41
  editSection(): void;
39
42
  static ɵfac: i0.ɵɵFactoryDeclaration<CategoryProductComponent, never>;
40
43
  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>;
@@ -7,7 +7,6 @@ export interface CategoryProductModal {
7
7
  content: CategoryProductContentModal;
8
8
  styles: CategoryProductStylesModel;
9
9
  action: ActionModel;
10
- data: CategoryProductData;
11
10
  }
12
11
  export interface CategoryProductContentModal {
13
12
  inputText: InputTextModel[];
@@ -27,6 +26,3 @@ export interface CategoryProductStylesModel extends StylesModel {
27
26
  elementInRow: number;
28
27
  mobileColumn: number;
29
28
  }
30
- export interface CategoryProductData {
31
- collectionId: string;
32
- }
@@ -11,4 +11,7 @@ export interface FeaturedCategoryContentModal {
11
11
  }
12
12
  export interface FeaturedCategoryStylesModel extends StylesModel {
13
13
  maximumProduct: number;
14
+ direction: "ROW" | "COLUMN";
15
+ containerHeight: number;
16
+ containerWidth: number;
14
17
  }
@@ -0,0 +1,29 @@
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,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import BaseSection from '../../../sections/BaseSection';
3
3
  import { RestService } from '../../../services/rest.service';
4
4
  import { Category } from '../../styles/category.modal';
@@ -6,10 +6,12 @@ import { ItemVariant, Product } from '../../styles/product.modal';
6
6
  import { OrderedItems } from '../../styles/OrderedItems.modal';
7
7
  import { CartService } from '../../../services/cart.service';
8
8
  import { CategoryProductModal } from '../category-product/category-product.model';
9
+ import { ActivatedRoute } from '@angular/router';
9
10
  import * as i0 from "@angular/core";
10
- export declare class ProductCategoryListComponent extends BaseSection implements OnInit {
11
+ export declare class ProductCategoryListComponent extends BaseSection implements OnInit, OnDestroy {
11
12
  private readonly restService;
12
13
  private readonly cartService;
14
+ private readonly activatedRoute;
13
15
  responseData?: any[];
14
16
  data?: CategoryProductModal;
15
17
  index?: number;
@@ -19,9 +21,11 @@ export declare class ProductCategoryListComponent extends BaseSection implements
19
21
  productList: Product[];
20
22
  USER_CART: OrderedItems[];
21
23
  selectedCategory: Category | null;
22
- constructor(restService: RestService, cartService: CartService);
24
+ constructor(restService: RestService, cartService: CartService, activatedRoute: ActivatedRoute);
25
+ collectionId: string | null;
23
26
  ngOnInit(): void;
24
- getAllCategories(): void;
27
+ ngOnDestroy(): void;
28
+ getAllCategoriesById(): void;
25
29
  selectCategory(category: Category): void;
26
30
  addItemToCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
27
31
  getItemVarient(product: Product, varientId: string): ItemVariant | null;
@@ -0,0 +1,16 @@
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
+ }
@@ -15,7 +15,7 @@ export declare class PricingSectionComponent extends BaseSection {
15
15
  style?: PricingSectionStylesModel;
16
16
  constructor(_eventService: EventsService);
17
17
  ngOnInit(): void;
18
- getTextColor(): "#ffffff" | "#000000";
18
+ getTextColor(): "#000000" | "#ffffff";
19
19
  get headingSpace(): SPACING;
20
20
  editSection(): void;
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<PricingSectionComponent, never>;
@@ -40,6 +40,7 @@ export declare class EventsService implements OnInit {
40
40
  placeOrder: EventEmitter<unknown>;
41
41
  featureCollectionList: EventEmitter<unknown>;
42
42
  environmentType: EventEmitter<string>;
43
+ categoryProductList: EventEmitter<string>;
43
44
  showLoadingScreen: EventEmitter<boolean>;
44
45
  cashFreeEvent: EventEmitter<unknown>;
45
46
  addressAddedIdx: EventEmitter<number>;
@@ -12,6 +12,7 @@ export declare class RestService implements OnDestroy {
12
12
  constructor(http: HttpClient, eventService: EventsService);
13
13
  ngOnDestroy(): void;
14
14
  getFeaturedProduct(collectionId: string | undefined | null): Observable<any>;
15
+ getCategoriesByCollectionId(collectionId: string): Observable<any>;
15
16
  getProductDetails(productId?: string | null): Observable<any>;
16
17
  getAllCategories(): Observable<any>;
17
18
  getAllCollections(): Observable<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "1.5.27",
3
+ "version": "1.5.31",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
package/public-api.d.ts CHANGED
@@ -42,6 +42,7 @@ 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';
45
46
  export * from './lib/services/events.service';
46
47
  export * from './lib/services/endUser.service';
47
48
  export * from './lib/services/sanitizeHtml';
Binary file