medos-sdk 1.0.3 → 1.1.0
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 +39 -0
- package/dist/client/MedosClient.d.ts +2 -4
- package/dist/client/MedosClient.js +4 -4
- package/dist/components/AppointmentCalender.js +43 -2
- package/dist/components/AppointmentDateTimeModal.js +45 -31
- package/dist/components/ContactInformationStep.d.ts +13 -0
- package/dist/components/ContactInformationStep.js +14 -0
- package/dist/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/components/ContactPreferenceStep.js +16 -0
- package/dist/components/DoctorSelectModal.js +30 -17
- package/dist/components/EnquiryForm.d.ts +7 -0
- package/dist/components/EnquiryForm.js +212 -0
- package/dist/components/Icons/ConsultationType.js +1 -1
- package/dist/components/Icons/Date&TimeIcon.js +1 -1
- package/dist/components/Icons/MapIcon.js +1 -1
- package/dist/components/Icons/PaymentMethodIcon.js +1 -1
- package/dist/components/Icons/UserIcon.js +1 -1
- package/dist/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/components/InquiryDetailsStep.js +15 -0
- package/dist/components/PatientDetailsStep.js +9 -1
- package/dist/components/PhoneVerificationStep.js +22 -12
- package/dist/components/SuccessStep.d.ts +3 -1
- package/dist/components/SuccessStep.js +7 -15
- package/dist/components/custom-calendar.js +42 -24
- package/dist/components/theme-styles.d.ts +12 -0
- package/dist/components/theme-styles.js +319 -0
- package/dist/components/types.d.ts +0 -1
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +4 -0
- package/dist/core/theme/index.d.ts +3 -0
- package/dist/core/theme/index.js +3 -0
- package/dist/core/theme/themes.d.ts +8 -0
- package/dist/core/theme/themes.js +178 -0
- package/dist/core/theme/types.d.ts +106 -0
- package/dist/core/theme/types.js +1 -0
- package/dist/core/theme/utils.d.ts +8 -0
- package/dist/core/theme/utils.js +135 -0
- package/dist/enquiry-form/index.d.ts +4 -0
- package/dist/enquiry-form/index.js +4 -0
- package/dist/enquiry-form/provider.d.ts +3 -0
- package/dist/enquiry-form/provider.js +9 -0
- package/dist/enquiry-form/serialization.d.ts +4 -0
- package/dist/enquiry-form/serialization.js +57 -0
- package/dist/enquiry-form/types.d.ts +38 -0
- package/dist/enquiry-form/types.js +1 -0
- package/dist/enquiry-form/validation.d.ts +6 -0
- package/dist/enquiry-form/validation.js +21 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +7 -0
- package/dist/react/ThemeProvider.d.ts +18 -0
- package/dist/react/ThemeProvider.js +45 -0
- package/dist/react/hooks/useTheme.d.ts +1 -0
- package/dist/react/hooks/useTheme.js +1 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.js +3 -0
- package/dist/services/EnquiryService.d.ts +5 -0
- package/dist/services/EnquiryService.js +30 -0
- package/dist/vanilla/AppointmentCalendarWidget.js +0 -2
- package/dist/vanilla/EnquiryFormWidget.d.ts +35 -0
- package/dist/vanilla/EnquiryFormWidget.js +425 -0
- package/dist/vanilla/client/MedosClient.d.ts +2 -4
- package/dist/vanilla/components/ContactInformationStep.d.ts +13 -0
- package/dist/vanilla/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/vanilla/components/EnquiryForm.d.ts +7 -0
- package/dist/vanilla/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/vanilla/components/SuccessStep.d.ts +3 -1
- package/dist/vanilla/components/theme-styles.d.ts +12 -0
- package/dist/vanilla/components/types.d.ts +0 -1
- package/dist/vanilla/core/index.d.ts +4 -0
- package/dist/vanilla/core/theme/index.d.ts +3 -0
- package/dist/vanilla/core/theme/themes.d.ts +8 -0
- package/dist/vanilla/core/theme/types.d.ts +106 -0
- package/dist/vanilla/core/theme/utils.d.ts +8 -0
- package/dist/vanilla/enquiry-form/index.d.ts +4 -0
- package/dist/vanilla/enquiry-form/provider.d.ts +3 -0
- package/dist/vanilla/enquiry-form/serialization.d.ts +4 -0
- package/dist/vanilla/enquiry-form/types.d.ts +38 -0
- package/dist/vanilla/enquiry-form/validation.d.ts +6 -0
- package/dist/vanilla/enquiry-widget.js +4650 -0
- package/dist/vanilla/index.d.ts +9 -0
- package/dist/vanilla/index.js +3 -1
- package/dist/vanilla/react/ThemeProvider.d.ts +18 -0
- package/dist/vanilla/react/hooks/useTheme.d.ts +1 -0
- package/dist/vanilla/react/index.d.ts +5 -0
- package/dist/vanilla/services/EnquiryService.d.ts +5 -0
- package/dist/vanilla/theme-injector.d.ts +6 -0
- package/dist/vanilla/theme-injector.js +44 -0
- package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +35 -0
- package/dist/vanilla/vanilla/index.d.ts +3 -1
- package/dist/vanilla/vanilla/theme-injector.d.ts +6 -0
- package/dist/vanilla/vanilla/widget.d.ts +6 -1
- package/dist/vanilla/widget.css +173 -0
- package/dist/vanilla/widget.d.ts +6 -1
- package/dist/vanilla/widget.js +489 -12
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface Enquiry {
|
|
2
|
+
id?: string;
|
|
3
|
+
patientName: string;
|
|
4
|
+
patientEmail: string;
|
|
5
|
+
countryCode: string;
|
|
6
|
+
patientPhone: string;
|
|
7
|
+
inquirySubject: string;
|
|
8
|
+
inquiryMessage: string;
|
|
9
|
+
preferredContactMethod: "PHONE" | "EMAIL" | "BOTH";
|
|
10
|
+
createdAt?: string;
|
|
11
|
+
status?: "PENDING" | "RESPONDED" | "CLOSED";
|
|
12
|
+
}
|
|
13
|
+
export interface EnquiryFormState {
|
|
14
|
+
step: number;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
error: string | null;
|
|
17
|
+
patientName: string;
|
|
18
|
+
patientEmail: string;
|
|
19
|
+
countryCode: string;
|
|
20
|
+
patientPhone: string;
|
|
21
|
+
inquirySubject: string;
|
|
22
|
+
inquiryMessage: string;
|
|
23
|
+
preferredContactMethod: "PHONE" | "EMAIL" | "BOTH";
|
|
24
|
+
submitted: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface EnquirySubmission {
|
|
27
|
+
patientName: string;
|
|
28
|
+
patientEmail: string;
|
|
29
|
+
countryCode: string;
|
|
30
|
+
patientPhone: string;
|
|
31
|
+
inquirySubject: string;
|
|
32
|
+
inquiryMessage: string;
|
|
33
|
+
preferredContactMethod: "PHONE" | "EMAIL" | "BOTH";
|
|
34
|
+
}
|
|
35
|
+
export interface ValidationResult {
|
|
36
|
+
isValid: boolean;
|
|
37
|
+
error?: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const validateName: (name: string) => boolean;
|
|
2
|
+
export declare const validateEmail: (email: string) => boolean;
|
|
3
|
+
export declare const validatePhoneNumber: (phone: string) => boolean;
|
|
4
|
+
export declare const validateSubject: (subject: string) => boolean;
|
|
5
|
+
export declare const validateMessage: (message: string) => boolean;
|
|
6
|
+
export declare const validateCountryCode: (code: string) => boolean;
|