simpo-component-library 3.6.936 → 3.6.937

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.
@@ -0,0 +1,77 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { MessageService } from 'primeng/api';
4
+ import BaseSection from '../../../sections/BaseSection';
5
+ import { RestService } from '../../../services/rest.service';
6
+ import { EventsService } from '../../../services/events.service';
7
+ import { StorageServiceService } from '../../../services/storage.service';
8
+ import { BookingProductCartService } from '../../../services/booking-product-cart.service';
9
+ import * as i0 from "@angular/core";
10
+ type ProductVisitMode = 'HOME_VISIT' | 'VIDEO_CALL';
11
+ /**
12
+ * Standalone page section for a product-only Home Visit / Video Call booking (a customer's
13
+ * "Continue Booking" click from the product cart, PDP, or header drawer navigates here instead of
14
+ * opening AppointmentBookingComponent as a dialog). Matches the Claude Design prototype's
15
+ * `isWizardSingle` screen: date + time + contact all together on one page, rendered within the
16
+ * site's normal header/footer (this is a plain CMS page section, not an overlay), no service or
17
+ * staff picker - staff is auto-assigned. The full multi-step wizard (service bookings) is
18
+ * unaffected and still opens as a dialog.
19
+ */
20
+ export declare class BookAppointmentComponent extends BaseSection implements OnInit {
21
+ private readonly route;
22
+ private readonly router;
23
+ private readonly restService;
24
+ private readonly _eventService;
25
+ private readonly messageService;
26
+ private readonly storageService;
27
+ private readonly bookingProductCartService;
28
+ data?: any;
29
+ index?: number;
30
+ edit?: boolean;
31
+ delete?: boolean;
32
+ customClass?: string;
33
+ constructor(route: ActivatedRoute, router: Router, restService: RestService, _eventService: EventsService, messageService: MessageService, storageService: StorageServiceService, bookingProductCartService: BookingProductCartService);
34
+ mode: ProductVisitMode;
35
+ step: 'form' | 'review' | 'done';
36
+ screenWidth: number;
37
+ getScreenSize(): void;
38
+ closeOnOutsideClick(): void;
39
+ businessName: string;
40
+ businessId: any;
41
+ productCartItems: any[];
42
+ loading: boolean;
43
+ isProcessing: boolean;
44
+ apiStatus: boolean;
45
+ bookingGroup: any;
46
+ showCalendar: boolean;
47
+ selectedDate: Date | null;
48
+ selectedDateStr: string;
49
+ selectedSlot: any;
50
+ slots: any[];
51
+ slotsLoading: boolean;
52
+ private staffId;
53
+ private staffName;
54
+ homeVisitAddress: any;
55
+ instructions: string;
56
+ appointmentPayload: any;
57
+ dateFilter: (d: Date | null) => boolean;
58
+ get bannerTitle(): string;
59
+ get bannerDesc(): string;
60
+ ngOnInit(): void;
61
+ loadProductCart(): Promise<void>;
62
+ toggleCalendar(event?: Event): void;
63
+ private formatDate;
64
+ private toIsoDate;
65
+ private convertTo24Hour;
66
+ onDateSelected(date: any): void;
67
+ autoAssignStaffAndFetchSlots(): void;
68
+ fetchSlots(): void;
69
+ selectSlot(slot: any): void;
70
+ invalid(): boolean;
71
+ goToReview(): void;
72
+ backToForm(): void;
73
+ confirmBooking(): void;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<BookAppointmentComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<BookAppointmentComponent, "simpo-book-appointment", 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>;
76
+ }
77
+ export {};
@@ -1,4 +1,4 @@
1
- import { ElementRef, Renderer2, TemplateRef } from '@angular/core';
1
+ import { ElementRef, Renderer2 } from '@angular/core';
2
2
  import { ProductDescModal, ProductDescStylesModal } from './product-desc.modal';
3
3
  import { ItemImage, ItemVariant, Product } from '../../styles/product.modal';
4
4
  import { BackgroundModel, ButtonModel, LayOutModel } from '../../../styles/style.model';
@@ -127,8 +127,6 @@ export declare class ProductDescComponent extends BaseSection {
127
127
  getHeaderColor(type: string): string;
128
128
  formatItemCode(code: any): string | null;
129
129
  getTextColor(color: any): "#000000" | "#ffffff";
130
- languages: string[];
131
- selectedLang: string;
132
130
  getClass(map: any): "col-4" | "col-6" | "col-3" | "width-max";
133
131
  onFindInStore(id: string): void;
134
132
  onBookAppointment(): void;
@@ -140,22 +138,17 @@ export declare class ProductDescComponent extends BaseSection {
140
138
  ecomConfigs: any;
141
139
  getEcommerceConfigs(): void;
142
140
  locate: boolean;
143
- otherLanguage: string;
144
- videoCallPayload: any;
145
- validationErrors: any;
146
- isSubmitting: boolean;
147
- scheduled: boolean;
148
- scheduleVideoCall(): void;
141
+ /**
142
+ * "Schedule Video Call" behaves exactly like Try at Home: adds the current product directly to
143
+ * the local Video Call cart and confirms - no name/mobile collection here (that happens later,
144
+ * as part of Contact Details on the dedicated booking page). No dialog, no wizard.
145
+ */
146
+ videoCallAdded: boolean;
147
+ addVideoCallCurrent(): void;
149
148
  continueVideoCallBooking(): void;
150
- resetValidationErrors(): void;
151
- resetForm(): void;
152
- onInputChange(field: any): void;
153
149
  closeModal(): void;
154
150
  getButtonId(index: number): string;
155
151
  getButtonStyle(index: number): import("../../../styles/style.model").ButtonStyleModel | undefined;
156
- openDialogBox(template: TemplateRef<HTMLDivElement>): void;
157
- matCloseDialog(): void;
158
- closeDialog(): void;
159
152
  getRatings(noofratings: any): any;
160
153
  /**
161
154
  * "Try at Home" feeds the Home Visit booking flow (BookingGroup.productLines, submitted
@@ -1,4 +1,4 @@
1
- import { OnDestroy, ElementRef, TemplateRef, Renderer2 } from '@angular/core';
1
+ import { OnDestroy, ElementRef, Renderer2 } from '@angular/core';
2
2
  import { ItemVariant, Product } from '../../styles/product.modal';
3
3
  import BaseSection from '../../../sections/BaseSection';
4
4
  import { ProductListContentModal, ProductListModal, ProductListStylesModal } from './product-list.modal';
@@ -229,23 +229,13 @@ export declare class ProductListComponent extends BaseSection implements OnDestr
229
229
  * pieces. They continue into the wizard later from the Booking Cart (header icon / cart page).
230
230
  */
231
231
  addToTrialCart(product: Product): Promise<void>;
232
- productName: string;
233
- videoCallProduct: Product | null;
234
- openDialogBox(template: TemplateRef<HTMLDivElement>, productName: any, product?: Product): void;
235
- matCloseDialog(): void;
236
- otherLanguage: string;
237
- videoCallPayload: any;
238
- validationErrors: any;
239
- isSubmitting: boolean;
240
- scheduled: boolean;
241
- scheduleVideoCall(): void;
242
- continueVideoCallBooking(): void;
243
- resetValidationErrors(): void;
244
- resetForm(): void;
245
- onInputChange(field: any): void;
232
+ /**
233
+ * Same shape as addToTrialCart() - adds the product directly to the local Video Call cart and
234
+ * confirms with a toast, no dialog, no name/mobile collection here (that happens later, in
235
+ * Contact Details on the dedicated booking page).
236
+ */
237
+ addVideoCallCurrent(product: Product): Promise<void>;
246
238
  closeModal(): void;
247
- languages: string[];
248
- selectedLang: string;
249
239
  getTextColor(color: any): "#000000" | "#ffffff";
250
240
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductListComponent, never>;
251
241
  static ɵcmp: i0.ɵɵComponentDeclaration<ProductListComponent, "simpo-product-list", 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; }; "customClass": { "alias": "customClass"; "required": false; }; "nextComponentColor": { "alias": "nextComponentColor"; "required": false; }; }, {}, never, never, true, never>;
@@ -1,5 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { Router } from '@angular/router';
3
4
  import { BookingProductCartService, BookingCartMode } from '../../services/booking-product-cart.service';
4
5
  import { StorageServiceService } from '../../services/storage.service';
5
6
  import { OrderedItems } from '../../ecommerce/styles/OrderedItems.modal';
@@ -20,10 +21,11 @@ export declare class BookingCartGroupsComponent implements OnInit {
20
21
  private readonly bookingProductCartService;
21
22
  private readonly storageService;
22
23
  private readonly matDialog;
24
+ private readonly router;
23
25
  private readonly dialogRef;
24
26
  groups: BookingCartGroup[];
25
27
  loading: boolean;
26
- constructor(bookingProductCartService: BookingProductCartService, storageService: StorageServiceService, matDialog: MatDialog, dialogRef: MatDialogRef<BookingCartGroupsComponent>);
28
+ constructor(bookingProductCartService: BookingProductCartService, storageService: StorageServiceService, matDialog: MatDialog, router: Router, dialogRef: MatDialogRef<BookingCartGroupsComponent>);
27
29
  ngOnInit(): void;
28
30
  load(): Promise<void>;
29
31
  get isEmpty(): boolean;
@@ -32,7 +34,7 @@ export declare class BookingCartGroupsComponent implements OnInit {
32
34
  close(): void;
33
35
  browse(): void;
34
36
  continueBooking(group: BookingCartGroup): void;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<BookingCartGroupsComponent, [null, null, null, { optional: true; }]>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<BookingCartGroupsComponent, [null, null, null, null, { optional: true; }]>;
36
38
  static ɵcmp: i0.ɵɵComponentDeclaration<BookingCartGroupsComponent, "simpo-booking-cart-groups", never, {}, {}, never, never, true, never>;
37
39
  }
38
40
  export {};
@@ -1,15 +1,17 @@
1
1
  import { OnInit, TemplateRef } from '@angular/core';
2
2
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
3
  import { MessageService } from 'primeng/api';
4
+ import { Router } from '@angular/router';
4
5
  import { BookingProductCartService } from '../../services/booking-product-cart.service';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class ScheduleVideoCallComponent implements OnInit {
7
8
  private readonly dialogRef;
8
9
  private matDialog;
10
+ private readonly router;
9
11
  private readonly messageService;
10
12
  private readonly bookingProductCartService;
11
13
  responseData: any;
12
- constructor(dialogRef: MatDialogRef<ScheduleVideoCallComponent>, matDialog: MatDialog, messageService: MessageService, bookingProductCartService: BookingProductCartService, responseData: any);
14
+ constructor(dialogRef: MatDialogRef<ScheduleVideoCallComponent>, matDialog: MatDialog, router: Router, messageService: MessageService, bookingProductCartService: BookingProductCartService, responseData: any);
13
15
  ngOnInit(): void;
14
16
  selectedProducts: any[];
15
17
  languages: string[];
@@ -69,7 +69,6 @@ export declare class AppointmentBookingComponent implements OnInit {
69
69
  showReducingPolicy: boolean;
70
70
  selectedMode: BookingMode;
71
71
  modePinned: boolean;
72
- condensedFlow: boolean;
73
72
  cartServices: any[];
74
73
  resolvedLines: ResolvedLine[];
75
74
  resolvingCart: boolean;
@@ -103,13 +102,10 @@ export declare class AppointmentBookingComponent implements OnInit {
103
102
  staffData: any[];
104
103
  resolveCart(): void;
105
104
  getAllStaffForProductOnlyLine(): void;
106
- autoAssignStaffForProductOnlyLine(): void;
107
105
  selectStaffForProductOnlyLine(staff: any): void;
108
106
  selectStaffForLine(line: ResolvedLine, staff: any): void;
109
107
  fetchAllLineSlots(): void;
110
108
  selectSlotForLine(line: ResolvedLine, slot: any): void;
111
- condensedInvalid(): boolean;
112
- goToCondensedReview(): void;
113
109
  convertTo24Hour(time: string): string;
114
110
  loader: boolean;
115
111
  isProcessing: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simpo-component-library",
3
- "version": "3.6.936",
3
+ "version": "3.6.937",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.2.0",
6
6
  "@angular/core": "^17.2.0",
package/public-api.d.ts CHANGED
@@ -73,6 +73,7 @@ export * from './lib/ecommerce/sections/store-page/store-page.component';
73
73
  export * from './lib/ecommerce/sections/enrollment-form/enrollment-form.component';
74
74
  export * from './lib/ecommerce/sections/returns-calculator/returns-calculator.component';
75
75
  export * from './lib/sections/appointment-form/appointment-booking/appointment-booking/appointment-booking.component';
76
+ export * from './lib/ecommerce/sections/book-appointment/book-appointment.component';
76
77
  export * from './lib/sections/video-grid-section/video-grid-section.component';
77
78
  export * from './lib/ecommerce/sections/refer-earn/refer-earn.component';
78
79
  export * from './lib/sections/countdown-banner/countdown-banner.component';
Binary file