simpo-component-library 3.6.937 → 3.6.939
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.
- package/esm2022/lib/ecommerce/sections/authentication-required/authentication-required.component.mjs +9 -7
- package/esm2022/lib/ecommerce/sections/book-appointment/book-appointment.component.mjs +141 -52
- package/esm2022/lib/ecommerce/sections/product-desc/product-desc.component.mjs +11 -1
- package/esm2022/lib/elements/booking-cart-groups/booking-cart-groups.component.mjs +38 -15
- package/esm2022/lib/elements/schedule-video-call/schedule-video-call.component.mjs +18 -16
- package/esm2022/lib/sections/appointment-form/appointment-booking/appointment-booking/appointment-booking.component.mjs +2 -1
- package/esm2022/lib/services/rest.service.mjs +4 -1
- package/fesm2022/simpo-component-library.mjs +2900 -2767
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/ecommerce/sections/authentication-required/authentication-required.component.d.ts +1 -0
- package/lib/ecommerce/sections/book-appointment/book-appointment.component.d.ts +41 -11
- package/lib/elements/booking-cart-groups/booking-cart-groups.component.d.ts +8 -4
- package/lib/elements/schedule-video-call/schedule-video-call.component.d.ts +3 -1
- package/lib/services/rest.service.d.ts +1 -0
- package/package.json +1 -1
- package/simpo-component-library-3.6.939.tgz +0 -0
- package/simpo-component-library-3.6.937.tgz +0 -0
package/lib/ecommerce/sections/authentication-required/authentication-required.component.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare class AuthenticationRequiredComponent extends BaseSection {
|
|
|
56
56
|
proceedToCheckout: boolean;
|
|
57
57
|
proceedToEnrollment: boolean;
|
|
58
58
|
tryAtHome: boolean;
|
|
59
|
+
tryAtHomeMode: string | null;
|
|
59
60
|
navigateToSchemeDetails: boolean;
|
|
60
61
|
currentPage: string;
|
|
61
62
|
inputs: QueryList<ElementRef>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
2
3
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
4
|
import { MessageService } from 'primeng/api';
|
|
4
5
|
import BaseSection from '../../../sections/BaseSection';
|
|
@@ -6,6 +7,7 @@ import { RestService } from '../../../services/rest.service';
|
|
|
6
7
|
import { EventsService } from '../../../services/events.service';
|
|
7
8
|
import { StorageServiceService } from '../../../services/storage.service';
|
|
8
9
|
import { BookingProductCartService } from '../../../services/booking-product-cart.service';
|
|
10
|
+
import { AddressDetails, User } from '../../styles/user.modal';
|
|
9
11
|
import * as i0 from "@angular/core";
|
|
10
12
|
type ProductVisitMode = 'HOME_VISIT' | 'VIDEO_CALL';
|
|
11
13
|
/**
|
|
@@ -14,8 +16,10 @@ type ProductVisitMode = 'HOME_VISIT' | 'VIDEO_CALL';
|
|
|
14
16
|
* opening AppointmentBookingComponent as a dialog). Matches the Claude Design prototype's
|
|
15
17
|
* `isWizardSingle` screen: date + time + contact all together on one page, rendered within the
|
|
16
18
|
* 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.
|
|
18
|
-
*
|
|
19
|
+
* staff picker - staff is auto-assigned. Contact and address are sourced from the logged-in
|
|
20
|
+
* customer's ecommerce account (same `User`/`AddressDetails` used at product checkout) rather
|
|
21
|
+
* than typed fresh - see AddressComponent/AddressListComponent reuse below. The full multi-step
|
|
22
|
+
* wizard (service bookings) is unaffected and still opens as a dialog.
|
|
19
23
|
*/
|
|
20
24
|
export declare class BookAppointmentComponent extends BaseSection implements OnInit {
|
|
21
25
|
private readonly route;
|
|
@@ -25,17 +29,16 @@ export declare class BookAppointmentComponent extends BaseSection implements OnI
|
|
|
25
29
|
private readonly messageService;
|
|
26
30
|
private readonly storageService;
|
|
27
31
|
private readonly bookingProductCartService;
|
|
32
|
+
private readonly matDialog;
|
|
28
33
|
data?: any;
|
|
29
34
|
index?: number;
|
|
30
35
|
edit?: boolean;
|
|
31
36
|
delete?: boolean;
|
|
32
37
|
customClass?: string;
|
|
33
|
-
constructor(route: ActivatedRoute, router: Router, restService: RestService, _eventService: EventsService, messageService: MessageService, storageService: StorageServiceService, bookingProductCartService: BookingProductCartService);
|
|
38
|
+
constructor(route: ActivatedRoute, router: Router, restService: RestService, _eventService: EventsService, messageService: MessageService, storageService: StorageServiceService, bookingProductCartService: BookingProductCartService, matDialog: MatDialog);
|
|
34
39
|
mode: ProductVisitMode;
|
|
35
40
|
step: 'form' | 'review' | 'done';
|
|
36
41
|
screenWidth: number;
|
|
37
|
-
getScreenSize(): void;
|
|
38
|
-
closeOnOutsideClick(): void;
|
|
39
42
|
businessName: string;
|
|
40
43
|
businessId: any;
|
|
41
44
|
productCartItems: any[];
|
|
@@ -43,7 +46,9 @@ export declare class BookAppointmentComponent extends BaseSection implements OnI
|
|
|
43
46
|
isProcessing: boolean;
|
|
44
47
|
apiStatus: boolean;
|
|
45
48
|
bookingGroup: any;
|
|
46
|
-
|
|
49
|
+
userDetails: User | null;
|
|
50
|
+
defaultAddress: AddressDetails | null;
|
|
51
|
+
businessSettings: any;
|
|
47
52
|
selectedDate: Date | null;
|
|
48
53
|
selectedDateStr: string;
|
|
49
54
|
selectedSlot: any;
|
|
@@ -51,23 +56,48 @@ export declare class BookAppointmentComponent extends BaseSection implements OnI
|
|
|
51
56
|
slotsLoading: boolean;
|
|
52
57
|
private staffId;
|
|
53
58
|
private staffName;
|
|
54
|
-
|
|
59
|
+
weekOffset: number;
|
|
60
|
+
readonly maxWeekOffset = 7;
|
|
61
|
+
weekDays: {
|
|
62
|
+
date: Date;
|
|
63
|
+
dow: string;
|
|
64
|
+
num: string;
|
|
65
|
+
selected: boolean;
|
|
66
|
+
}[];
|
|
55
67
|
instructions: string;
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
reviewRows: {
|
|
69
|
+
k: string;
|
|
70
|
+
v: string;
|
|
71
|
+
}[];
|
|
58
72
|
get bannerTitle(): string;
|
|
59
73
|
get bannerDesc(): string;
|
|
74
|
+
get homeVisitCharge(): number;
|
|
60
75
|
ngOnInit(): void;
|
|
61
76
|
loadProductCart(): Promise<void>;
|
|
62
|
-
|
|
77
|
+
loadBusinessSettings(): void;
|
|
78
|
+
private refreshDefaultAddress;
|
|
79
|
+
changeAddress(): void;
|
|
80
|
+
addAddress(): void;
|
|
81
|
+
goToListing(): void;
|
|
63
82
|
private formatDate;
|
|
64
83
|
private toIsoDate;
|
|
65
84
|
private convertTo24Hour;
|
|
66
|
-
|
|
85
|
+
private buildWeekDays;
|
|
86
|
+
get weekRangeLabel(): string;
|
|
87
|
+
prevWeek(): void;
|
|
88
|
+
nextWeek(): void;
|
|
89
|
+
pickDay(day: {
|
|
90
|
+
date: Date;
|
|
91
|
+
}): void;
|
|
92
|
+
onDateSelected(date: Date): void;
|
|
67
93
|
autoAssignStaffAndFetchSlots(): void;
|
|
68
94
|
fetchSlots(): void;
|
|
69
95
|
selectSlot(slot: any): void;
|
|
70
96
|
invalid(): boolean;
|
|
97
|
+
private contactName;
|
|
98
|
+
private contactPhone;
|
|
99
|
+
private contactEmail;
|
|
100
|
+
private formatCharge;
|
|
71
101
|
goToReview(): void;
|
|
72
102
|
backToForm(): void;
|
|
73
103
|
confirmBooking(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { Router } from '@angular/router';
|
|
4
4
|
import { BookingProductCartService, BookingCartMode } from '../../services/booking-product-cart.service';
|
|
5
5
|
import { StorageServiceService } from '../../services/storage.service';
|
|
@@ -8,6 +8,9 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
interface BookingCartGroup {
|
|
9
9
|
mode: BookingCartMode;
|
|
10
10
|
title: string;
|
|
11
|
+
meta: string;
|
|
12
|
+
itemNote: string;
|
|
13
|
+
colorClass: 'bcg-mode-home' | 'bcg-mode-video';
|
|
11
14
|
items: OrderedItems[];
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
@@ -20,21 +23,22 @@ interface BookingCartGroup {
|
|
|
20
23
|
export declare class BookingCartGroupsComponent implements OnInit {
|
|
21
24
|
private readonly bookingProductCartService;
|
|
22
25
|
private readonly storageService;
|
|
23
|
-
private readonly matDialog;
|
|
24
26
|
private readonly router;
|
|
25
27
|
private readonly dialogRef;
|
|
26
28
|
groups: BookingCartGroup[];
|
|
27
29
|
loading: boolean;
|
|
28
|
-
constructor(bookingProductCartService: BookingProductCartService, storageService: StorageServiceService,
|
|
30
|
+
constructor(bookingProductCartService: BookingProductCartService, storageService: StorageServiceService, router: Router, dialogRef: MatDialogRef<BookingCartGroupsComponent>);
|
|
29
31
|
ngOnInit(): void;
|
|
32
|
+
private buildGroup;
|
|
30
33
|
load(): Promise<void>;
|
|
31
34
|
get isEmpty(): boolean;
|
|
32
35
|
get dialogRefPresent(): boolean;
|
|
36
|
+
get drawerSubline(): string;
|
|
33
37
|
removeItem(group: BookingCartGroup, item: OrderedItems): Promise<void>;
|
|
34
38
|
close(): void;
|
|
35
39
|
browse(): void;
|
|
36
40
|
continueBooking(group: BookingCartGroup): void;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BookingCartGroupsComponent, [null, null, null,
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BookingCartGroupsComponent, [null, null, null, { optional: true; }]>;
|
|
38
42
|
static ɵcmp: i0.ɵɵComponentDeclaration<BookingCartGroupsComponent, "simpo-booking-cart-groups", never, {}, {}, never, never, true, never>;
|
|
39
43
|
}
|
|
40
44
|
export {};
|
|
@@ -3,6 +3,7 @@ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
|
3
3
|
import { MessageService } from 'primeng/api';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
5
5
|
import { BookingProductCartService } from '../../services/booking-product-cart.service';
|
|
6
|
+
import { StorageServiceService } from '../../services/storage.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class ScheduleVideoCallComponent implements OnInit {
|
|
8
9
|
private readonly dialogRef;
|
|
@@ -10,8 +11,9 @@ export declare class ScheduleVideoCallComponent implements OnInit {
|
|
|
10
11
|
private readonly router;
|
|
11
12
|
private readonly messageService;
|
|
12
13
|
private readonly bookingProductCartService;
|
|
14
|
+
private readonly storageService;
|
|
13
15
|
responseData: any;
|
|
14
|
-
constructor(dialogRef: MatDialogRef<ScheduleVideoCallComponent>, matDialog: MatDialog, router: Router, messageService: MessageService, bookingProductCartService: BookingProductCartService, responseData: any);
|
|
16
|
+
constructor(dialogRef: MatDialogRef<ScheduleVideoCallComponent>, matDialog: MatDialog, router: Router, messageService: MessageService, bookingProductCartService: BookingProductCartService, storageService: StorageServiceService, responseData: any);
|
|
15
17
|
ngOnInit(): void;
|
|
16
18
|
selectedProducts: any[];
|
|
17
19
|
languages: string[];
|
|
@@ -121,6 +121,7 @@ export declare class RestService implements OnDestroy {
|
|
|
121
121
|
getReviewsByProductId(productId: string, pageNumber: number): Observable<Object>;
|
|
122
122
|
getFieldsToDisplay(fieldsList: any[]): any;
|
|
123
123
|
getBookingSlots(payload: any): Observable<Object>;
|
|
124
|
+
getBusinessAppointmentSettings(businessId: string): Observable<Object>;
|
|
124
125
|
resolveCart(payload: any): Observable<Object>;
|
|
125
126
|
holdBooking(payload: any): Observable<Object>;
|
|
126
127
|
getBookingGroup(groupId: string): Observable<Object>;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|