simpo-component-library 2.0.2 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/esm2022/lib/ecommerce/sections/cart/cart.component.mjs +2 -46
  2. package/esm2022/lib/ecommerce/sections/featured-products/featured-products.component.mjs +56 -78
  3. package/esm2022/lib/sections/appointment-form/appointment-form.component.mjs +333 -62
  4. package/esm2022/lib/sections/contact-us/contact-us.component.mjs +3 -3
  5. package/esm2022/lib/sections/footer-section/footer-section.component.mjs +14 -3
  6. package/esm2022/lib/sections/footer-section/footer-section.modal.mjs +1 -1
  7. package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +3 -3
  8. package/esm2022/lib/services/cart.service.mjs +4 -65
  9. package/esm2022/lib/services/rest.service.mjs +20 -3
  10. package/esm2022/lib/services/storage.service.mjs +1 -43
  11. package/fesm2022/simpo-component-library.mjs +425 -295
  12. package/fesm2022/simpo-component-library.mjs.map +1 -1
  13. package/lib/directive/background-directive.d.ts +1 -1
  14. package/lib/directive/button-directive.directive.d.ts +1 -1
  15. package/lib/directive/color.directive.d.ts +1 -1
  16. package/lib/ecommerce/sections/cart/cart.component.d.ts +0 -1
  17. package/lib/sections/appointment-form/appointment-form.component.d.ts +31 -9
  18. package/lib/sections/footer-section/footer-section.component.d.ts +2 -0
  19. package/lib/sections/footer-section/footer-section.modal.d.ts +2 -1
  20. package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
  21. package/lib/services/cart.service.d.ts +2 -7
  22. package/lib/services/rest.service.d.ts +4 -0
  23. package/lib/services/storage.service.d.ts +0 -1
  24. package/package.json +1 -1
  25. package/simpo-component-library-2.0.5.tgz +0 -0
  26. package/simpo-component-library-2.0.2.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
  }
@@ -54,7 +54,6 @@ export declare class CartComponent extends BaseSection implements OnInit, OnDest
54
54
  ngOnInit(): void;
55
55
  ngOnDestroy(): void;
56
56
  updateUserCart(): void;
57
- updateUserCartV2(): void;
58
57
  mergeOrderItems(syncedItems: any[]): void;
59
58
  getCouponList(): void;
60
59
  removeCoupon(event: MouseEvent): void;
@@ -10,8 +10,8 @@ import * as i0 from "@angular/core";
10
10
  export declare class AppointmentFormComponent extends BaseSection implements OnInit {
11
11
  private _eventService;
12
12
  private matDialog;
13
- private restService;
14
- private snackBar;
13
+ private appointmentService;
14
+ private snackbar;
15
15
  data?: BannerSectionModel;
16
16
  index?: number;
17
17
  content?: BannerContentModel;
@@ -19,7 +19,9 @@ export declare class AppointmentFormComponent extends BaseSection implements OnI
19
19
  delete?: boolean;
20
20
  customClass?: string;
21
21
  styles?: BannerStylesModel;
22
- constructor(_eventService: EventsService, matDialog: MatDialog, restService: RestService, snackBar: MatSnackBar);
22
+ constructor(_eventService: EventsService, matDialog: MatDialog, appointmentService: RestService, snackbar: MatSnackBar);
23
+ screenWidth: number;
24
+ getScreenSize(): void;
23
25
  businessId: any;
24
26
  businessName: any;
25
27
  ngOnInit(): void;
@@ -37,26 +39,46 @@ export declare class AppointmentFormComponent extends BaseSection implements OnI
37
39
  restrictNonNumeric(event: KeyboardEvent): void;
38
40
  onUserNameChange(value: string): void;
39
41
  toTitleCase(str: string): string;
40
- CreateData: any;
41
- minDate: Date;
42
42
  serviceData: any;
43
+ staffData: any;
44
+ changeLocation(): void;
45
+ updateLocationTiming(): void;
46
+ getDay(): string;
43
47
  getAllServices(): void;
48
+ getAllStaff(): void;
49
+ minDate: Date;
50
+ bookedSlots: Set<unknown>;
51
+ locationTiming: string[];
52
+ changeDate(): void;
53
+ getAvailableSlots(): void;
54
+ getBookedSlots(res: any): void;
55
+ getTime(start: string, end: string, intervalMinutes: number): string[];
56
+ generateTimeSlots(startTime: string, endTime: string): string[] | undefined;
57
+ parseTime(time: string): [number, number, string];
44
58
  locationData: any;
45
59
  selectedLocation: string;
46
60
  getAllLocations(): void;
47
- selectedServices: string[];
48
61
  formatDate(date: Date): string;
49
62
  formattedDate: any;
50
63
  timeSlotsData: any;
51
- formattedTimeIntervals: any;
64
+ formattedTimeIntervals: {
65
+ startTime: string;
66
+ }[];
52
67
  getTimeSlots(): void;
53
68
  filterTimeSlots(): void;
54
69
  dateFilter: (date: Date | null) => boolean;
55
- isFormValid(): boolean;
70
+ selectedServices: string;
71
+ selectedStaff: string;
72
+ CreateData: any;
56
73
  prepareCreateData(): void;
57
74
  prepareLocationData(): void;
58
75
  createLoader: boolean;
59
- bookAppointment(): void;
76
+ availableTimes: string[];
77
+ padZero(value: number): string;
78
+ isTimeGreaterThanCurrent(time: string, currentHour: number, currentMinute: number): boolean;
79
+ createAppointment(): void;
80
+ reFilterData(): void;
81
+ isFormValid(): boolean;
60
82
  static ɵfac: i0.ɵɵFactoryDeclaration<AppointmentFormComponent, never>;
61
83
  static ɵcmp: i0.ɵɵComponentDeclaration<AppointmentFormComponent, "simpo-appointment-form", never, { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, {}, never, never, true, never>;
62
84
  }
@@ -18,6 +18,8 @@ export declare class FooterSectionComponent extends BaseSection implements OnIni
18
18
  constructor(_eventService: EventsService);
19
19
  ngOnInit(): void;
20
20
  editSection(): void;
21
+ changePage(pageData?: any): void;
22
+ get checkFooter(): boolean;
21
23
  static ɵfac: i0.ɵɵFactoryDeclaration<FooterSectionComponent, never>;
22
24
  static ɵcmp: i0.ɵɵComponentDeclaration<FooterSectionComponent, "simpo-footer-section", never, { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, {}, never, never, true, never>;
23
25
  }
@@ -1,5 +1,5 @@
1
1
  import { ChannelType, FooterTypes } from "./../../styles/index";
2
- import { ActionModel, BackgroundModel, InputTextModel, SpacingModel } from "./../../styles/style.model";
2
+ import { ActionModel, BackgroundModel, InputTextModel, NavbarButton, SpacingModel } from "./../../styles/style.model";
3
3
  import { FOOTER_IMAGE_SOURCE, SOCIAL_ICON_SHAPE, SOCIAL_ICON_SIZE, SOCIAL_ICON_TYPE } from "./../../styles/types";
4
4
  export interface FooterSectionModel {
5
5
  id: string;
@@ -29,6 +29,7 @@ export interface FooterContentModel {
29
29
  additionalDetails: InputTextModel;
30
30
  logo: FooterLogoModel;
31
31
  image: FooterImageModel;
32
+ navbarButtons: NavbarButton[];
32
33
  socialLinks: FooterSocialLinkModel;
33
34
  displayBranding: boolean;
34
35
  }
@@ -16,7 +16,7 @@ export declare class PricingSectionComponent extends BaseSection {
16
16
  style?: PricingSectionStylesModel;
17
17
  constructor(_eventService: EventsService);
18
18
  ngOnInit(): void;
19
- getTextColor(): "#000000" | "#ffffff";
19
+ getTextColor(): "#ffffff" | "#000000";
20
20
  get headingSpace(): SPACING;
21
21
  editSection(): void;
22
22
  redirectTo(): void;
@@ -1,15 +1,13 @@
1
1
  import { OrderedItems } from '../ecommerce/styles/OrderedItems.modal';
2
- import { ItemVariant, Product } from '../ecommerce/styles/product.modal';
2
+ import { Product } from '../ecommerce/styles/product.modal';
3
3
  import { RestService } from './rest.service';
4
4
  import { StorageServiceService } from './storage.service';
5
5
  import { Cart } from '../ecommerce/styles/cart.modal';
6
- import { MessageService } from 'primeng/api';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class CartService {
9
8
  private readonly storageService;
10
9
  private readonly restService;
11
- private readonly messageService;
12
- constructor(storageService: StorageServiceService, restService: RestService, messageService: MessageService);
10
+ constructor(storageService: StorageServiceService, restService: RestService);
13
11
  addItemFromCartPage(product: OrderedItems, userCart: any): import("rxjs").Observable<Object>;
14
12
  addItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
15
13
  removeItemFromWishlistPage(product: OrderedItems, userWishlist: any): import("rxjs").Observable<Object>;
@@ -24,9 +22,6 @@ export declare class CartService {
24
22
  private objectMapper;
25
23
  storeCartDataToServer(cart: Cart): void;
26
24
  clearCartItems(): void;
27
- addItemToLocalCart(product: Product, type: 'ADD' | 'SUBSTRACT'): void;
28
- isItemOutOfStock(product: Product): boolean;
29
- getItemVarient(product: Product, varientId: string): ItemVariant | null;
30
25
  storeDataToServer(): void;
31
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
32
27
  static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
@@ -62,8 +62,12 @@ export declare class RestService implements OnDestroy {
62
62
  createAppointment(data: any): Observable<Object>;
63
63
  getAllServices(businessId: any, size: number, page: number): Observable<Object>;
64
64
  getAllLocation(businessId: any, size: number, page: number): Observable<Object>;
65
+ getAllStaff(businessId: any, size: number, page: number, locationId: string, serviceId: string): Observable<Object>;
65
66
  getAllTimeSlots(locationId: any, date: Date): Observable<Object>;
66
67
  getBlogByBusinessId(): Observable<Object>;
68
+ getAllService(businessId: any, size: any, page: any, locationId?: any): Observable<Object>;
69
+ getAllStaffByLocation(businessId: any, size: number, page: number, locationId: string, serviceId: string): Observable<Object>;
70
+ getAvailableSlots(data: any): Observable<Object>;
67
71
  static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
68
72
  static ɵprov: i0.ɵɵInjectableDeclaration<RestService>;
69
73
  }
@@ -28,7 +28,6 @@ export declare class StorageServiceService {
28
28
  updateAllData(): void;
29
29
  mergeAllItems(unSyncedItem: any[], syncedItem: any[]): any[];
30
30
  getUserCart(): Promise<IDBRequest<OrderedItems[]>>;
31
- getCartProduct(): Promise<OrderedItems[]>;
32
31
  addProductToCart(product: OrderedItems): IDBRequest<IDBValidKey>;
33
32
  addAllProductToWishlist(products: OrderedItems[]): IDBTransaction;
34
33
  addAllProductsToCart(products: OrderedItems[]): IDBTransaction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
Binary file