simpo-component-library 1.4.10 → 1.4.12

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.
Files changed (32) hide show
  1. package/esm2022/lib/ecommerce/json/user-cart.json +14 -1
  2. package/esm2022/lib/ecommerce/json/user-details.json +2 -1
  3. package/esm2022/lib/ecommerce/sections/address/address.component.mjs +148 -0
  4. package/esm2022/lib/ecommerce/sections/authenticate-user/authenticate-user.component.mjs +15 -9
  5. package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +49 -13
  6. package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +8 -3
  7. package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +23 -6
  8. package/esm2022/lib/ecommerce/sections/user-profile/user-profile.component.mjs +15 -16
  9. package/esm2022/lib/ecommerce/sections/user-profile/user-profile.modal.mjs +1 -1
  10. package/esm2022/lib/ecommerce/styles/cart.modal.mjs +1 -1
  11. package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +4 -4
  12. package/esm2022/lib/services/cart.service.mjs +4 -2
  13. package/esm2022/lib/services/rest.service.mjs +32 -4
  14. package/fesm2022/simpo-component-library.mjs +315 -78
  15. package/fesm2022/simpo-component-library.mjs.map +1 -1
  16. package/lib/directive/background-directive.d.ts +1 -1
  17. package/lib/directive/button-directive.directive.d.ts +1 -1
  18. package/lib/directive/color.directive.d.ts +1 -1
  19. package/lib/ecommerce/sections/address/address.component.d.ts +38 -0
  20. package/lib/ecommerce/sections/authenticate-user/authenticate-user.component.d.ts +4 -2
  21. package/lib/ecommerce/sections/cart/cart.component.d.ts +8 -1
  22. package/lib/ecommerce/sections/featured-products/featured-products.component.d.ts +2 -1
  23. package/lib/ecommerce/sections/product-desc/product-desc.component.d.ts +4 -0
  24. package/lib/ecommerce/sections/user-profile/user-profile.component.d.ts +6 -5
  25. package/lib/ecommerce/sections/user-profile/user-profile.modal.d.ts +14 -0
  26. package/lib/ecommerce/styles/cart.modal.d.ts +3 -2
  27. package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
  28. package/lib/services/rest.service.d.ts +7 -0
  29. package/package.json +1 -1
  30. package/simpo-component-library-1.4.11.tgz +0 -0
  31. package/simpo-component-library-1.4.12.tgz +0 -0
  32. package/simpo-component-library-1.4.10.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): "#000000" | "#ffffff" | "#ffffff;";
14
+ getTextColor(bgColor: string): "#ffffff" | "#000000" | "#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): "#000000" | "#ffffff" | "#ffffff;";
18
+ getTextColor(bgColor: string): "#ffffff" | "#000000" | "#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(): "#000000" | "#ffffff" | "#ffffff;";
15
+ getTextColor(): "#ffffff" | "#000000" | "#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
  }
@@ -0,0 +1,38 @@
1
+ /// <reference types="googlemaps" />
2
+ /// <reference types="googlemaps" />
3
+ import { OnInit, NgZone, OnChanges, SimpleChanges } from '@angular/core';
4
+ import { RestService } from '../../../services/rest.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class AddressComponent implements OnInit, OnChanges {
7
+ private readonly ngZone;
8
+ private readonly restService;
9
+ responseData: any;
10
+ constructor(ngZone: NgZone, restService: RestService);
11
+ addressList: any[];
12
+ address: any;
13
+ isCart: boolean;
14
+ private latitute;
15
+ private longitute;
16
+ mapCenter: google.maps.LatLngLiteral;
17
+ markerPosition: google.maps.LatLngLiteral;
18
+ markerOptions: google.maps.MarkerOptions;
19
+ private geocoder;
20
+ addessType: {
21
+ key: string;
22
+ status: boolean;
23
+ }[];
24
+ ngOnInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ checkAddressType(address: {
27
+ key: string;
28
+ status: boolean;
29
+ }): void;
30
+ close(): void;
31
+ getCurrentLocation(): void;
32
+ getAddress(): void;
33
+ onLocationSelected(location: any): void;
34
+ onAutocompleteSelected(result: any): void;
35
+ updateAddress(): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<AddressComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<AddressComponent, "simpo-address", never, { "responseData": { "alias": "responseData"; "required": false; }; "isCart": { "alias": "isCart"; "required": false; }; }, {}, never, never, true, never>;
38
+ }
@@ -1,10 +1,12 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { MatDialogRef } from '@angular/material/dialog';
3
3
  import { RestService } from '../../../services/rest.service';
4
+ import { Router } from '@angular/router';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class AuthenticateUserComponent implements OnInit {
6
7
  matData: any;
7
8
  private readonly restService;
9
+ private readonly router;
8
10
  private readonly dialogRef;
9
11
  data?: any;
10
12
  responseData?: any;
@@ -12,7 +14,7 @@ export declare class AuthenticateUserComponent implements OnInit {
12
14
  screen: 'LOGIN' | 'OTP';
13
15
  mobile: string | null;
14
16
  countryCode: string | null;
15
- constructor(matData: any, restService: RestService, dialogRef: MatDialogRef<AuthenticateUserComponent>);
17
+ constructor(matData: any, restService: RestService, router: Router, dialogRef: MatDialogRef<AuthenticateUserComponent>);
16
18
  styles: any;
17
19
  ngOnInit(): void;
18
20
  move(event: any, idx: number): void;
@@ -22,6 +24,6 @@ export declare class AuthenticateUserComponent implements OnInit {
22
24
  verifyOTP(): void;
23
25
  resendOTP(): void;
24
26
  get isMobile(): boolean;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateUserComponent, [{ optional: true; }, null, { optional: true; }]>;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthenticateUserComponent, [{ optional: true; }, null, null, { optional: true; }]>;
26
28
  static ɵcmp: i0.ɵɵComponentDeclaration<AuthenticateUserComponent, "simpo-authenticate-user", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; }, {}, never, never, true, never>;
27
29
  }
@@ -2,22 +2,29 @@ import { CartSectionModal, CartSectionStylesModel } from './cart.modal';
2
2
  import BaseSection from '../../../sections/BaseSection';
3
3
  import { EventsService } from '.././../../services/events.service';
4
4
  import { CartService } from '../../../services/cart.service';
5
+ import { Router } from '@angular/router';
6
+ import { RestService } from "../../../services/rest.service";
5
7
  import * as i0 from "@angular/core";
6
8
  export declare class CartComponent extends BaseSection {
7
9
  private readonly _eventService;
8
10
  private readonly cartService;
11
+ private readonly router;
12
+ private readonly restService;
9
13
  data?: CartSectionModal;
10
14
  responseData?: any;
11
15
  index?: number;
12
16
  edit?: boolean;
13
17
  delete?: boolean;
14
18
  styles?: CartSectionStylesModel;
15
- constructor(_eventService: EventsService, cartService: CartService);
19
+ currentTab: 'BAG' | 'ADDRESS' | 'PAYMENT';
20
+ constructor(_eventService: EventsService, cartService: CartService, router: Router, restService: RestService);
16
21
  ngOnInit(): void;
22
+ userDetails: any;
17
23
  proceedToCheckout(): void;
18
24
  proceedToListPage(): void;
19
25
  removeItem(item: any): void;
20
26
  addToCart(item: any, type: 'ADD' | 'SUBSTRACT'): void;
27
+ get getAddressList(): any[];
21
28
  static ɵfac: i0.ɵɵFactoryDeclaration<CartComponent, never>;
22
29
  static ɵcmp: i0.ɵɵComponentDeclaration<CartComponent, "simpo-cart", 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>;
23
30
  }
@@ -17,6 +17,7 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
17
17
  data?: FeaturedProductModal;
18
18
  responseData?: Product[];
19
19
  index?: number;
20
+ isRelatedProduct: boolean;
20
21
  edit?: boolean;
21
22
  delete?: boolean;
22
23
  content?: FeaturedProductContentModal;
@@ -37,5 +38,5 @@ export declare class FeaturedProductsComponent extends BaseSection implements On
37
38
  isItemFav(product: Product): boolean;
38
39
  togglePreviewImage(product: Product, idx: number): void;
39
40
  static ɵfac: i0.ɵɵFactoryDeclaration<FeaturedProductsComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedProductsComponent, "simpo-featured-products", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<FeaturedProductsComponent, "simpo-featured-products", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "isRelatedProduct": { "alias": "isRelatedProduct"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
41
42
  }
@@ -6,6 +6,7 @@ import { EventsService } from '.././../../services/events.service';
6
6
  import { ActivatedRoute, Router } from '@angular/router';
7
7
  import { RestService } from '../../../services/rest.service';
8
8
  import { CartService } from '../../../services/cart.service';
9
+ import { FeaturedProductModal } from '../featured-products/featured-products.modal';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class ProductDescComponent extends BaseSection {
11
12
  private platformId;
@@ -19,6 +20,7 @@ export declare class ProductDescComponent extends BaseSection {
19
20
  index?: number;
20
21
  edit?: boolean;
21
22
  delete?: boolean;
23
+ relatedProductData: Product[];
22
24
  constructor(platformId: Object, _eventService: EventsService, router: Router, activatedRoute: ActivatedRoute, restService: RestService, cartService: CartService);
23
25
  buttonId?: string;
24
26
  button?: ButtonModel;
@@ -34,6 +36,8 @@ export declare class ProductDescComponent extends BaseSection {
34
36
  addToFavourite(): void;
35
37
  removeToFavourite(): void;
36
38
  get isItemAsFavorite(): boolean;
39
+ get getFeatureProductData(): FeaturedProductModal;
40
+ getProductByCategory(): void;
37
41
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductDescComponent, never>;
38
42
  static ɵcmp: i0.ɵɵComponentDeclaration<ProductDescComponent, "simpo-product-desc", never, { "data": { "alias": "data"; "required": false; }; "responseData": { "alias": "responseData"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
39
43
  }
@@ -1,12 +1,13 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { UserDetails } from '../../styles/cart.modal';
3
- import { ResponseData, Tabs } from './user-profile.modal';
2
+ import { ResponseData, Tabs, UserProfile } from './user-profile.modal';
4
3
  import { OrderItem } from '../../styles/order.modal';
5
4
  import { Router } from '@angular/router';
5
+ import { RestService } from "../../../services/rest.service";
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class UserProfileComponent implements OnInit {
8
8
  private readonly router;
9
- constructor(router: Router);
9
+ private readonly restService;
10
+ constructor(router: Router, restService: RestService);
10
11
  responseData?: ResponseData;
11
12
  data?: any;
12
13
  index?: number;
@@ -14,7 +15,7 @@ export declare class UserProfileComponent implements OnInit {
14
15
  delete?: boolean;
15
16
  button: any;
16
17
  selectedSidePanelTab: string | null;
17
- userDetails: UserDetails | null;
18
+ userDetails: UserProfile | null;
18
19
  addressList: any;
19
20
  sidePanelList: Tabs[];
20
21
  tabs: Tabs[];
@@ -26,7 +27,7 @@ export declare class UserProfileComponent implements OnInit {
26
27
  goToHome(): void;
27
28
  selectTab(tab: Tabs): void;
28
29
  toggleSidepanelTab(tab: Tabs): void;
29
- get getUserDetails(): UserDetails | null;
30
+ get getUserDetails(): UserProfile | null;
30
31
  get isMobile(): boolean;
31
32
  static ɵfac: i0.ɵɵFactoryDeclaration<UserProfileComponent, never>;
32
33
  static ɵcmp: i0.ɵɵComponentDeclaration<UserProfileComponent, "simpo-user-profile", never, { "responseData": { "alias": "responseData"; "required": false; }; "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
@@ -35,3 +35,17 @@ export interface ResponseData {
35
35
  tabs: Tabs[];
36
36
  orders: OrderItem[];
37
37
  }
38
+ export interface UserProfile {
39
+ userId: string;
40
+ businessId: string;
41
+ address: any;
42
+ gender: string;
43
+ contact: UserContact;
44
+ }
45
+ export interface UserContact {
46
+ id: string;
47
+ name: string;
48
+ mobile: string;
49
+ countryCode: string;
50
+ email: string;
51
+ }
@@ -49,12 +49,13 @@ export interface LocationDetails {
49
49
  stateName: string;
50
50
  }
51
51
  export interface UserDetails {
52
- userId: string;
52
+ id: string;
53
53
  userName: string;
54
54
  mobile: string;
55
55
  email: string;
56
56
  profilePic: string;
57
- deliveryAddress: DeliveryAddress;
57
+ address: DeliveryAddress;
58
+ gender: string;
58
59
  }
59
60
  export interface DeliveryAddress {
60
61
  countryName: string;
@@ -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(): "#000000" | "#ffffff";
18
+ getTextColor(): "#ffffff" | "#000000";
19
19
  get headingSpace(): SPACING;
20
20
  editSection(): void;
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<PricingSectionComponent, never>;
@@ -15,12 +15,19 @@ export declare class RestService implements OnDestroy {
15
15
  getAllCategories(): Observable<any>;
16
16
  getAllCollections(): Observable<any>;
17
17
  getFilteredProduct(collectionIds: string[], categoryIds: string[], searchText: string, minPrice: number, maxPrice: number, sortBy: string, pageNo: number, size: number): Observable<Object>;
18
+ getProductByCategoryId(categoryId: string): Observable<Object>;
18
19
  generateOTP(mobile: string, countryCode: string): Observable<Object>;
19
20
  verifyOTP(mobile: string, otp: string): Observable<Object>;
21
+ resendOTP(mobile: string, countryCode: string): Observable<Object>;
20
22
  addItemToDB(userCart: any): Observable<Object>;
21
23
  getUserItems(userId: string, cartType: 'CART' | 'WISHLIST'): Observable<Object>;
22
24
  placeOrder(cartId: string): Observable<Object>;
25
+ getUserInfo(userId: string): Observable<Object>;
26
+ addUserAddress(user: any): Observable<Object>;
23
27
  toggleItemCartToFav(): void;
28
+ createPaymentToken(payload: any): Observable<Object>;
29
+ refundPayment(orderId: string, payload: any): Observable<Object>;
30
+ checkPaymentStatus(payload: any): Observable<Object>;
24
31
  static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
25
32
  static ɵprov: i0.ɵɵInjectableDeclaration<RestService>;
26
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file