medos-sdk 1.1.13 → 1.1.14
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/README.md +831 -32
- package/dist/components/appointment-booking/types.d.ts +1 -0
- package/dist/components/appointment-booking/types.js +1 -0
- package/dist/components/constants/index.d.ts +1 -1
- package/dist/components/constants/index.js +1 -1
- package/dist/services/AuthService.js +1 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +76 -0
- package/dist/vanilla/AppointmentCalendarWidget.js +819 -563
- package/dist/vanilla/components/appointment-booking/types.d.ts +1 -0
- package/dist/vanilla/components/constants/index.d.ts +1 -1
- package/dist/vanilla/components/theme-injector.js +527 -0
- package/dist/vanilla/enquiry-widget.js +1124 -3802
- package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +76 -0
- package/dist/vanilla/widget-themed.css +1291 -0
- package/dist/vanilla/widget.css +157 -0
- package/dist/vanilla/widget.js +7667 -10020
- package/package.json +2 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Doctor } from "../services/AppointmentService";
|
|
2
|
+
import { SessionPack, AvailablePackage, Patient } from "../components/appointment-booking/types";
|
|
1
3
|
interface AppointmentCalendarWidgetOptions {
|
|
2
4
|
containerId: string;
|
|
3
5
|
apiKey?: string;
|
|
@@ -20,6 +22,7 @@ declare class AppointmentCalendarWidget {
|
|
|
20
22
|
private bloodGroupSelect;
|
|
21
23
|
constructor(container: HTMLElement | string, options: AppointmentCalendarWidgetOptions);
|
|
22
24
|
private init;
|
|
25
|
+
private loadWorkspaceConfiguration;
|
|
23
26
|
private loadAddresses;
|
|
24
27
|
private handleAddressChange;
|
|
25
28
|
private loadSlots;
|
|
@@ -28,6 +31,7 @@ declare class AppointmentCalendarWidget {
|
|
|
28
31
|
private updatePatientDetailsButtonState;
|
|
29
32
|
private sendOtp;
|
|
30
33
|
private verifyOtp;
|
|
34
|
+
private processOtpVerificationResponse;
|
|
31
35
|
private submitAppointment;
|
|
32
36
|
private goToNext;
|
|
33
37
|
private goBack;
|
|
@@ -41,6 +45,8 @@ declare class AppointmentCalendarWidget {
|
|
|
41
45
|
private renderPackageExplorerStep;
|
|
42
46
|
private renderLocationDoctorStep;
|
|
43
47
|
private renderNewAppointmentStep;
|
|
48
|
+
private groupSlotsByPeriod;
|
|
49
|
+
private renderGroupedSlots;
|
|
44
50
|
private renderPatientSelectionStep;
|
|
45
51
|
private renderPatientDetailsStep;
|
|
46
52
|
private renderAppointmentSummaryStep;
|
|
@@ -49,6 +55,8 @@ declare class AppointmentCalendarWidget {
|
|
|
49
55
|
private formatTime;
|
|
50
56
|
private calculateDuration;
|
|
51
57
|
private attachEventListeners;
|
|
58
|
+
private handleSelectExistingPatient;
|
|
59
|
+
private handleProceedAsNewPatient;
|
|
52
60
|
private getPlaceholderPatients;
|
|
53
61
|
private escapeHtml;
|
|
54
62
|
private isValidDateOfBirth;
|
|
@@ -57,6 +65,74 @@ declare class AppointmentCalendarWidget {
|
|
|
57
65
|
private safeFormatDateOfBirth;
|
|
58
66
|
private getDateOfBirthErrorMessage;
|
|
59
67
|
private displayFieldValidationError;
|
|
68
|
+
handleSubmitAppointment(): Promise<void>;
|
|
69
|
+
handleOtpVerification(otpCode: string): Promise<void>;
|
|
70
|
+
handleAddressSelect(addressId: number): Promise<void>;
|
|
71
|
+
handleDoctorSelect(doctorId: number): void;
|
|
72
|
+
handleDateSelect(date: Date): void;
|
|
73
|
+
handleSlotSelect(slot: {
|
|
74
|
+
start: string;
|
|
75
|
+
end: string;
|
|
76
|
+
id?: string;
|
|
77
|
+
}): void;
|
|
78
|
+
handleSessionPackSelect(sessionPack: SessionPack): void;
|
|
79
|
+
handleExplorePackages(): void;
|
|
80
|
+
handlePackageSelect(packageItem: AvailablePackage): void;
|
|
81
|
+
handleNewAppointmentSelect(): void;
|
|
82
|
+
handlePatientSelect(patient: Patient): void;
|
|
83
|
+
handleNewPatient(): void;
|
|
84
|
+
goToNextStep(): void;
|
|
85
|
+
goBackStep(): void;
|
|
86
|
+
getState(): {
|
|
87
|
+
step: number;
|
|
88
|
+
loading: boolean;
|
|
89
|
+
error: string | null;
|
|
90
|
+
workspaceId: number | null;
|
|
91
|
+
addresses: import("../services/AppointmentService").AddressItem[];
|
|
92
|
+
addressDoctorsMap: Record<number, Doctor[]>;
|
|
93
|
+
selectedAddress: number | null;
|
|
94
|
+
selectedDoctor: number | null;
|
|
95
|
+
selectedDate: Date;
|
|
96
|
+
slots: import("../services/AppointmentService").Slot[];
|
|
97
|
+
selectedSlot: import("../services/AppointmentService").Slot | null;
|
|
98
|
+
consultationMode: "ONLINE" | "OFFLINE";
|
|
99
|
+
consultationCharge: string;
|
|
100
|
+
patientName: string;
|
|
101
|
+
patientAge: string;
|
|
102
|
+
patientEmail: string;
|
|
103
|
+
patientGender: string;
|
|
104
|
+
bloodGroup: string;
|
|
105
|
+
patientDob: string;
|
|
106
|
+
patientAddress: string;
|
|
107
|
+
patientCity: string;
|
|
108
|
+
patientState: string;
|
|
109
|
+
patientCountry: string;
|
|
110
|
+
patientZipcode: string;
|
|
111
|
+
patientLandmark: string;
|
|
112
|
+
countryCode: string;
|
|
113
|
+
patientPhone: string;
|
|
114
|
+
otpCode: string;
|
|
115
|
+
otpSent: boolean;
|
|
116
|
+
otpVerified: boolean;
|
|
117
|
+
otpSending: boolean;
|
|
118
|
+
otpVerifying: boolean;
|
|
119
|
+
verifiedPatients: Patient[];
|
|
120
|
+
selectedPatient: Patient | null;
|
|
121
|
+
useExistingPatient: boolean;
|
|
122
|
+
userSessionPacks: SessionPack[];
|
|
123
|
+
availablePackages: AvailablePackage[];
|
|
124
|
+
selectedSessionPack: SessionPack | null;
|
|
125
|
+
selectedNewPackage: AvailablePackage | null;
|
|
126
|
+
bookingOptionType: import("../components/appointment-booking/types").BookingOptionType;
|
|
127
|
+
showPackageExplorer: boolean;
|
|
128
|
+
packagesLoading: boolean;
|
|
129
|
+
arePackagesConfigured: boolean;
|
|
130
|
+
bookingType: "PACKAGE_PURCHASE" | "ONE_TIME_APPOINTMENT" | "USE_ACTIVE_PACKAGE";
|
|
131
|
+
paymentMode: "CASH" | "CARD" | string;
|
|
132
|
+
packageConfigId?: number;
|
|
133
|
+
patientPackageId?: number;
|
|
134
|
+
packageAmount?: number;
|
|
135
|
+
};
|
|
60
136
|
destroy(): void;
|
|
61
137
|
}
|
|
62
138
|
export declare function initAppointmentCalendar(options: AppointmentCalendarWidgetOptions): AppointmentCalendarWidget;
|