medos-sdk 1.1.10 → 1.1.12
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/dist/client/MedosClient.d.ts +1 -0
- package/dist/client/MedosClient.js +8 -1
- package/dist/components/AppointmentCalender.js +19 -22
- package/dist/components/AppointmentConfirmationStep.d.ts +1 -0
- package/dist/components/AppointmentConfirmationStep.js +34 -42
- package/dist/components/AppointmentDateTimeModal.d.ts +1 -0
- package/dist/components/AppointmentDateTimeModal.js +201 -168
- package/dist/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/AppointmentSummaryStep.js +168 -0
- package/dist/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/BookingOptionStep.js +346 -0
- package/dist/components/ContactInformationStep.js +10 -4
- package/dist/components/ContactPreferenceStep.js +10 -1
- package/dist/components/DoctorSelectModal.js +105 -59
- package/dist/components/EnquiryForm.js +81 -69
- package/dist/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/components/Icons/CloseIcon.js +5 -0
- package/dist/components/InquiryDetailsStep.js +5 -1
- package/dist/components/PatientDetailsStep.js +17 -12
- package/dist/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/PatientSelectionStep.js +254 -0
- package/dist/components/PhoneVerificationStep.js +1 -1
- package/dist/components/SuccessStep.js +1 -1
- package/dist/components/appointment-booking/AppointmentCalender.js +145 -67
- package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
- package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
- package/dist/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/components/appointment-booking/components/index.js +9 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +111 -25
- package/dist/components/appointment-booking/hooks/useAppointmentState.js +32 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +0 -1
- package/dist/components/appointment-booking/index.d.ts +2 -4
- package/dist/components/appointment-booking/index.js +2 -2
- package/dist/components/appointment-booking/types.d.ts +167 -0
- package/dist/components/appointment-booking/types.js +16 -0
- package/dist/components/appointment-modal-styles.d.ts +259 -0
- package/dist/components/appointment-modal-styles.js +395 -0
- package/dist/components/constant.d.ts +2 -0
- package/dist/components/constant.js +15 -0
- package/dist/components/constants/constant.d.ts +2 -0
- package/dist/components/constants/constant.js +15 -0
- package/dist/components/constants/index.d.ts +3 -0
- package/dist/components/constants/index.js +24 -0
- package/dist/components/constants/options.d.ts +13 -0
- package/dist/components/constants/options.js +35 -0
- package/dist/components/constants/validation.d.ts +6 -0
- package/dist/components/constants/validation.js +16 -0
- package/dist/components/custom-calendar.js +20 -11
- package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/components/enquiry-form/EnquiryForm.js +238 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
- package/dist/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/components/enquiry-form/components/index.js +3 -0
- package/dist/components/enquiry-form/index.d.ts +2 -0
- package/dist/components/enquiry-form/index.js +2 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +7 -0
- package/dist/components/shared/icons/Check.d.ts +6 -0
- package/dist/components/shared/icons/Check.js +2 -0
- package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
- package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/components/shared/icons/ChevronLeft.js +3 -0
- package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/components/shared/icons/ChevronRight.js +3 -0
- package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/components/shared/icons/CloseIcon.js +5 -0
- package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
- package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/components/shared/icons/ConsultationType.js +2 -0
- package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
- package/dist/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/components/shared/icons/MapIcon.js +2 -0
- package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/components/shared/icons/MedosLogo.js +3 -0
- package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
- package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/components/shared/icons/SuccessIcon.js +14 -0
- package/dist/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/components/shared/icons/UserIcon.js +2 -0
- package/dist/components/shared/icons/index.d.ts +13 -0
- package/dist/components/shared/icons/index.js +13 -0
- package/dist/components/shared/index.d.ts +2 -0
- package/dist/components/shared/index.js +2 -0
- package/dist/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/components/shared/ui/Calendar.js +167 -0
- package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/components/shared/ui/SelectDropdown.js +301 -0
- package/dist/components/shared/ui/index.d.ts +2 -0
- package/dist/components/shared/ui/index.js +2 -0
- package/dist/components/styles/appointment.d.ts +4 -0
- package/dist/components/styles/appointment.js +220 -0
- package/dist/components/styles/enquiry.d.ts +2 -0
- package/dist/components/styles/enquiry.js +3 -0
- package/dist/components/styles/index.d.ts +2 -0
- package/dist/components/styles/index.js +2 -0
- package/dist/components/styles/shared.d.ts +3 -0
- package/dist/components/styles/shared.js +78 -0
- package/dist/components/styles.d.ts +1 -6
- package/dist/components/styles.js +1 -257
- package/dist/components/theme-styles.d.ts +5 -4
- package/dist/components/theme-styles.js +239 -125
- package/dist/components/types/appointment.d.ts +42 -0
- package/dist/components/types/appointment.js +1 -0
- package/dist/components/types/common.d.ts +24 -0
- package/dist/components/types/common.js +1 -0
- package/dist/components/types/enquiry.d.ts +59 -0
- package/dist/components/types/enquiry.js +1 -0
- package/dist/components/types/index.d.ts +4 -0
- package/dist/components/types/index.js +4 -0
- package/dist/components/types.d.ts +1 -52
- package/dist/components/types.js +1 -23
- package/dist/components/utils/date.d.ts +4 -0
- package/dist/components/utils/date.js +65 -0
- package/dist/components/utils/formatting.d.ts +4 -0
- package/dist/components/utils/formatting.js +9 -0
- package/dist/components/utils/index.d.ts +3 -0
- package/dist/components/utils/index.js +3 -0
- package/dist/components/utils/validation.d.ts +4 -0
- package/dist/components/utils/validation.js +37 -0
- package/dist/components/utils.d.ts +1 -5
- package/dist/components/utils.js +1 -15
- package/dist/components/validation.d.ts +1 -2
- package/dist/components/validation.js +1 -7
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/core/theme/index.d.ts +1 -0
- package/dist/core/theme/index.js +1 -0
- package/dist/core/theme/responsive.d.ts +15 -0
- package/dist/core/theme/responsive.js +113 -0
- package/dist/core/theme/themes.js +16 -4
- package/dist/core/theme/types.d.ts +8 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/react/ThemeProvider.d.ts +2 -1
- package/dist/react/ThemeProvider.js +49 -10
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +1 -1
- package/dist/services/AppointmentService.d.ts +80 -2
- package/dist/services/AppointmentService.js +131 -5
- package/dist/services/AuthService.js +1 -1
- package/dist/services/WorkspaceService.d.ts +58 -3
- package/dist/services/WorkspaceService.js +10 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +17 -7
- package/dist/vanilla/AppointmentCalendarWidget.js +1401 -380
- package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/EnquiryFormWidget.js +25 -43
- package/dist/vanilla/client/MedosClient.d.ts +1 -0
- package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +1 -0
- package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +1 -0
- package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/VanillaCalendar.js +33 -18
- package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/components/VanillaIcons.js +92 -0
- package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/components/VanillaSelect.js +93 -5
- package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
- package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
- package/dist/vanilla/components/appointment-booking/types.d.ts +167 -0
- package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
- package/dist/vanilla/components/constant.d.ts +2 -0
- package/dist/vanilla/components/constants/constant.d.ts +2 -0
- package/dist/vanilla/components/constants/index.d.ts +3 -0
- package/dist/vanilla/components/constants/options.d.ts +13 -0
- package/dist/vanilla/components/constants/validation.d.ts +6 -0
- package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
- package/dist/vanilla/components/index.d.ts +7 -3
- package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
- package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
- package/dist/vanilla/components/shared/index.d.ts +2 -0
- package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
- package/dist/vanilla/components/styles/appointment.d.ts +4 -0
- package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
- package/dist/vanilla/components/styles/index.d.ts +2 -0
- package/dist/vanilla/components/styles/shared.d.ts +3 -0
- package/dist/vanilla/components/styles.d.ts +1 -6
- package/dist/vanilla/components/theme-styles.d.ts +5 -4
- package/dist/vanilla/components/types/appointment.d.ts +42 -0
- package/dist/vanilla/components/types/common.d.ts +24 -0
- package/dist/vanilla/components/types/enquiry.d.ts +59 -0
- package/dist/vanilla/components/types/index.d.ts +4 -0
- package/dist/vanilla/components/types.d.ts +1 -52
- package/dist/vanilla/components/utils/date.d.ts +4 -0
- package/dist/vanilla/components/utils/formatting.d.ts +4 -0
- package/dist/vanilla/components/utils/index.d.ts +3 -0
- package/dist/vanilla/components/utils/validation.d.ts +4 -0
- package/dist/vanilla/components/utils.d.ts +1 -5
- package/dist/vanilla/components/validation.d.ts +1 -2
- package/dist/vanilla/constants/index.d.ts +1 -1
- package/dist/vanilla/core/theme/index.d.ts +1 -0
- package/dist/vanilla/core/theme/responsive.d.ts +15 -0
- package/dist/vanilla/core/theme/types.d.ts +8 -0
- package/dist/vanilla/enquiry-widget.js +3632 -90
- package/dist/vanilla/index.d.ts +4 -2
- package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
- package/dist/vanilla/react/index.d.ts +3 -3
- package/dist/vanilla/services/AppointmentService.d.ts +80 -2
- package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
- package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +17 -7
- package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/widget.css +1045 -205
- package/dist/vanilla/widget.js +10365 -5737
- package/package.json +2 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface EnquiryFormState {
|
|
2
|
+
step: number;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: string | null;
|
|
5
|
+
patientName: string;
|
|
6
|
+
patientEmail: string;
|
|
7
|
+
countryCode: string;
|
|
8
|
+
patientPhone: string;
|
|
9
|
+
inquirySubject: string;
|
|
10
|
+
inquiryMessage: string;
|
|
11
|
+
preferredContactMethod: "PHONE" | "EMAIL" | "BOTH";
|
|
12
|
+
submitted: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface EnquirySubmission {
|
|
15
|
+
patientName: string;
|
|
16
|
+
patientEmail: string;
|
|
17
|
+
countryCode: string;
|
|
18
|
+
patientPhone: string;
|
|
19
|
+
inquirySubject: string;
|
|
20
|
+
inquiryMessage: string;
|
|
21
|
+
preferredContactMethod: "PHONE" | "EMAIL" | "BOTH";
|
|
22
|
+
}
|
|
23
|
+
export interface EnquiryFormProps {
|
|
24
|
+
onSuccess?: (enquiry: EnquirySubmission) => void;
|
|
25
|
+
onError?: (error: Error) => void;
|
|
26
|
+
}
|
|
27
|
+
export type EnquiryFormAction = {
|
|
28
|
+
type: "SET_STEP";
|
|
29
|
+
payload: number;
|
|
30
|
+
} | {
|
|
31
|
+
type: "SET_LOADING";
|
|
32
|
+
payload: boolean;
|
|
33
|
+
} | {
|
|
34
|
+
type: "SET_ERROR";
|
|
35
|
+
payload: string | null;
|
|
36
|
+
} | {
|
|
37
|
+
type: "SET_PATIENT_NAME";
|
|
38
|
+
payload: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "SET_PATIENT_EMAIL";
|
|
41
|
+
payload: string;
|
|
42
|
+
} | {
|
|
43
|
+
type: "SET_COUNTRY_CODE";
|
|
44
|
+
payload: string;
|
|
45
|
+
} | {
|
|
46
|
+
type: "SET_PATIENT_PHONE";
|
|
47
|
+
payload: string;
|
|
48
|
+
} | {
|
|
49
|
+
type: "SET_INQUIRY_SUBJECT";
|
|
50
|
+
payload: string;
|
|
51
|
+
} | {
|
|
52
|
+
type: "SET_INQUIRY_MESSAGE";
|
|
53
|
+
payload: string;
|
|
54
|
+
} | {
|
|
55
|
+
type: "SET_PREFERRED_CONTACT_METHOD";
|
|
56
|
+
payload: "PHONE" | "EMAIL" | "BOTH";
|
|
57
|
+
} | {
|
|
58
|
+
type: "RESET_FORM";
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { INITIAL_STATE } from "./appointment-booking/types";
|
|
3
|
-
export type PhoneVerificationStepProps = {
|
|
4
|
-
state: any;
|
|
5
|
-
dispatch: React.Dispatch<any>;
|
|
6
|
-
onSendOtp: () => Promise<void>;
|
|
7
|
-
onVerifyOtp: () => Promise<void>;
|
|
8
|
-
onBack: () => void;
|
|
9
|
-
onContinue: () => void;
|
|
10
|
-
};
|
|
11
|
-
export type PatientDetailsStepProps = {
|
|
12
|
-
state: any;
|
|
13
|
-
dispatch: React.Dispatch<any>;
|
|
14
|
-
onBack: () => void;
|
|
15
|
-
onSubmit: () => Promise<void>;
|
|
16
|
-
};
|
|
17
|
-
export type SuccessStepProps = {
|
|
18
|
-
onReset: () => void;
|
|
19
|
-
};
|
|
20
|
-
export type PhoneInputSectionProps = {
|
|
21
|
-
countryCode: string;
|
|
22
|
-
patientPhone: string;
|
|
23
|
-
onCountryCodeChange: (code: string) => void;
|
|
24
|
-
onPhoneChange: (phone: string) => void;
|
|
25
|
-
};
|
|
26
|
-
export type OtpInputSectionProps = {
|
|
27
|
-
countryCode: string;
|
|
28
|
-
patientPhone: string;
|
|
29
|
-
otpCode: string;
|
|
30
|
-
otpVerified: boolean;
|
|
31
|
-
onOtpChange: (code: string) => void;
|
|
32
|
-
};
|
|
33
|
-
export type PatientInfoSectionProps = {
|
|
34
|
-
state: any;
|
|
35
|
-
dispatch: React.Dispatch<any>;
|
|
36
|
-
};
|
|
37
|
-
export type AddressInfoSectionProps = {
|
|
38
|
-
state: any;
|
|
39
|
-
dispatch: React.Dispatch<any>;
|
|
40
|
-
};
|
|
41
|
-
export declare const COUNTRY_CODES: {
|
|
42
|
-
code: string;
|
|
43
|
-
label: string;
|
|
44
|
-
}[];
|
|
45
|
-
export declare const GENDER_OPTIONS: {
|
|
46
|
-
value: string;
|
|
47
|
-
label: string;
|
|
48
|
-
}[];
|
|
49
|
-
export declare const BLOOD_GROUP_OPTIONS: {
|
|
50
|
-
value: string;
|
|
51
|
-
label: string;
|
|
52
|
-
}[];
|
|
1
|
+
export * from "./types";
|
package/dist/components/types.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const COUNTRY_CODES = [
|
|
3
|
-
{ code: "+91", label: "🇮🇳 +91" },
|
|
4
|
-
{ code: "+1", label: "🇺🇸 +1" },
|
|
5
|
-
{ code: "+44", label: "🇬🇧 +44" },
|
|
6
|
-
{ code: "+86", label: "🇨🇳 +86" },
|
|
7
|
-
{ code: "+81", label: "🇯🇵 +81" },
|
|
8
|
-
];
|
|
9
|
-
export const GENDER_OPTIONS = [
|
|
10
|
-
{ value: "MALE", label: "Male" },
|
|
11
|
-
{ value: "FEMALE", label: "Female" },
|
|
12
|
-
{ value: "OTHER", label: "Other" },
|
|
13
|
-
];
|
|
14
|
-
export const BLOOD_GROUP_OPTIONS = [
|
|
15
|
-
{ value: "A+", label: "A+" },
|
|
16
|
-
{ value: "A-", label: "A-" },
|
|
17
|
-
{ value: "B+", label: "B+" },
|
|
18
|
-
{ value: "B-", label: "B-" },
|
|
19
|
-
{ value: "AB+", label: "AB+" },
|
|
20
|
-
{ value: "AB-", label: "AB-" },
|
|
21
|
-
{ value: "O+", label: "O+" },
|
|
22
|
-
{ value: "O-", label: "O-" },
|
|
23
|
-
];
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const formatDateToISO: (date: Date) => string;
|
|
2
|
+
export declare const formatDate: (date: Date | string | null) => string;
|
|
3
|
+
export declare const formatTime: (timeStr: string | number) => string;
|
|
4
|
+
export declare const calculateDuration: (startTime?: string | number, endTime?: string | number, defaultDuration?: number) => number;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export const formatDateToISO = (date) => {
|
|
2
|
+
const year = String(date.getFullYear()).padStart(4, "0");
|
|
3
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
4
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
5
|
+
return `${year}-${month}-${day}`;
|
|
6
|
+
};
|
|
7
|
+
export const formatDate = (date) => {
|
|
8
|
+
if (!date)
|
|
9
|
+
return "Not selected";
|
|
10
|
+
try {
|
|
11
|
+
const dateObj = typeof date === "string" ? new Date(date) : date;
|
|
12
|
+
return dateObj.toLocaleDateString("en-US", {
|
|
13
|
+
weekday: "long",
|
|
14
|
+
year: "numeric",
|
|
15
|
+
month: "long",
|
|
16
|
+
day: "numeric",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return String(date);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export const formatTime = (timeStr) => {
|
|
24
|
+
try {
|
|
25
|
+
if (typeof timeStr === "number" || !Number.isNaN(Number(timeStr))) {
|
|
26
|
+
const time = new Date(Number(timeStr));
|
|
27
|
+
return time.toLocaleTimeString("en-US", {
|
|
28
|
+
hour: "numeric",
|
|
29
|
+
minute: "2-digit",
|
|
30
|
+
hour12: true,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (timeStr.includes(":") && timeStr.length <= 5) {
|
|
34
|
+
const time = new Date(`2000-01-01T${timeStr}`);
|
|
35
|
+
return time.toLocaleTimeString("en-US", {
|
|
36
|
+
hour: "numeric",
|
|
37
|
+
minute: "2-digit",
|
|
38
|
+
hour12: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const time = new Date(timeStr);
|
|
42
|
+
return time.toLocaleTimeString("en-US", {
|
|
43
|
+
hour: "numeric",
|
|
44
|
+
minute: "2-digit",
|
|
45
|
+
hour12: true,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return String(timeStr);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export const calculateDuration = (startTime, endTime, defaultDuration = 60) => {
|
|
53
|
+
if (!startTime || !endTime)
|
|
54
|
+
return defaultDuration;
|
|
55
|
+
try {
|
|
56
|
+
const start = new Date(startTime);
|
|
57
|
+
const end = new Date(endTime);
|
|
58
|
+
const diffMs = end.getTime() - start.getTime();
|
|
59
|
+
const diffMinutes = Math.round(diffMs / (1000 * 60));
|
|
60
|
+
return diffMinutes > 0 ? diffMinutes : defaultDuration;
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return defaultDuration;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const validatePhoneNumber: (phone: string) => boolean;
|
|
2
|
+
export declare const validateCountryCode: (code: string) => boolean;
|
|
3
|
+
export declare const validateBloodGroup: (bloodGroup: string) => boolean;
|
|
4
|
+
export declare const validateDateOfBirth: (dob: string) => boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PHONE_MIN_LENGTH, PHONE_MAX_LENGTH, COUNTRY_CODE_REGEX, DATE_FORMAT_REGEX, MIN_BIRTH_YEAR, VALID_BLOOD_GROUPS, } from "../constants/validation";
|
|
2
|
+
export const validatePhoneNumber = (phone) => {
|
|
3
|
+
const cleaned = phone.replace(/\D/g, "");
|
|
4
|
+
return (cleaned.length >= PHONE_MIN_LENGTH && cleaned.length <= PHONE_MAX_LENGTH);
|
|
5
|
+
};
|
|
6
|
+
export const validateCountryCode = (code) => {
|
|
7
|
+
return COUNTRY_CODE_REGEX.test(code);
|
|
8
|
+
};
|
|
9
|
+
export const validateBloodGroup = (bloodGroup) => {
|
|
10
|
+
return VALID_BLOOD_GROUPS.includes(bloodGroup);
|
|
11
|
+
};
|
|
12
|
+
export const validateDateOfBirth = (dob) => {
|
|
13
|
+
if (!dob)
|
|
14
|
+
return false;
|
|
15
|
+
if (!DATE_FORMAT_REGEX.test(dob))
|
|
16
|
+
return false;
|
|
17
|
+
const [yearStr, monthStr, dayStr] = dob.split("-");
|
|
18
|
+
const year = parseInt(yearStr, 10);
|
|
19
|
+
const month = parseInt(monthStr, 10);
|
|
20
|
+
const day = parseInt(dayStr, 10);
|
|
21
|
+
if (month < 1 || month > 12 || day < 1 || day > 31)
|
|
22
|
+
return false;
|
|
23
|
+
const date = new Date(year, month - 1, day);
|
|
24
|
+
if (date.getFullYear() !== year ||
|
|
25
|
+
date.getMonth() !== month - 1 ||
|
|
26
|
+
date.getDate() !== day) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const today = new Date();
|
|
30
|
+
today.setHours(0, 0, 0, 0);
|
|
31
|
+
date.setHours(0, 0, 0, 0);
|
|
32
|
+
if (date > today)
|
|
33
|
+
return false;
|
|
34
|
+
if (year < MIN_BIRTH_YEAR)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
};
|
package/dist/components/utils.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
const year = String(date.getFullYear()).padStart(4, "0");
|
|
3
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
4
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
5
|
-
return `${year}-${month}-${day}`;
|
|
6
|
-
};
|
|
7
|
-
export const parsePatientName = (fullName) => {
|
|
8
|
-
const nameParts = fullName.trim().split(/\s+/);
|
|
9
|
-
const firstName = nameParts[0] || "Patient";
|
|
10
|
-
const lastName = nameParts.slice(1).join(" ") || "";
|
|
11
|
-
return {
|
|
12
|
-
firstName,
|
|
13
|
-
lastName,
|
|
14
|
-
};
|
|
15
|
-
};
|
|
1
|
+
export * from "./utils/index";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const validateCountryCode: (code: string) => boolean;
|
|
1
|
+
export * from "./utils/validation";
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
const cleaned = phone.replace(/\D/g, "");
|
|
3
|
-
return cleaned.length >= 7 && cleaned.length <= 15;
|
|
4
|
-
};
|
|
5
|
-
export const validateCountryCode = (code) => {
|
|
6
|
-
return /^\+[1-9]\d{0,3}$/.test(code);
|
|
7
|
-
};
|
|
1
|
+
export * from "./utils/validation";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const API_BASE_URL = "https://api.
|
|
1
|
+
export declare const API_BASE_URL = "https://api-dev.medapi.in/v1";
|
package/dist/constants/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const API_BASE_URL = "https://api.
|
|
1
|
+
export const API_BASE_URL = "https://api-dev.medapi.in/v1";
|
package/dist/core/theme/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MedosTheme } from "./types";
|
|
2
|
+
export type Breakpoint = "mobile" | "tablet" | "desktop" | "wide";
|
|
3
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
4
|
+
export declare function useBreakpoint(theme: MedosTheme): Breakpoint;
|
|
5
|
+
export declare function useIsMobile(theme: MedosTheme): boolean;
|
|
6
|
+
export declare function useIsTablet(theme: MedosTheme): boolean;
|
|
7
|
+
export declare function useIsDesktop(theme: MedosTheme): boolean;
|
|
8
|
+
export declare function useResponsiveValue<T>(theme: MedosTheme, values: Partial<Record<Breakpoint, T>>): T | undefined;
|
|
9
|
+
export declare function responsiveStyles(styles: Partial<Record<Breakpoint | "base", React.CSSProperties>>, currentBreakpoint: Breakpoint): React.CSSProperties;
|
|
10
|
+
export declare function getResponsiveMaxWidth(theme: MedosTheme, breakpoint: Breakpoint, customMaxWidths?: Partial<Record<Breakpoint, string>>): string;
|
|
11
|
+
export declare function getResponsivePadding(theme: MedosTheme, breakpoint: Breakpoint): string;
|
|
12
|
+
export declare function getResponsiveFontSize(theme: MedosTheme, breakpoint: Breakpoint, size?: keyof MedosTheme["typography"]): string;
|
|
13
|
+
export declare function isTouchDevice(): boolean;
|
|
14
|
+
export declare const MIN_TOUCH_TARGET_SIZE = "44px";
|
|
15
|
+
export declare function getResponsiveInputHeight(breakpoint: Breakpoint): string;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
export function useMediaQuery(query) {
|
|
3
|
+
const [matches, setMatches] = useState(false);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const mediaQuery = window.matchMedia(query);
|
|
6
|
+
setMatches(mediaQuery.matches);
|
|
7
|
+
const handler = (event) => {
|
|
8
|
+
setMatches(event.matches);
|
|
9
|
+
};
|
|
10
|
+
if (mediaQuery.addEventListener) {
|
|
11
|
+
mediaQuery.addEventListener("change", handler);
|
|
12
|
+
return () => mediaQuery.removeEventListener("change", handler);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
mediaQuery.addListener(handler);
|
|
16
|
+
return () => mediaQuery.removeListener(handler);
|
|
17
|
+
}
|
|
18
|
+
}, [query]);
|
|
19
|
+
return matches;
|
|
20
|
+
}
|
|
21
|
+
export function useBreakpoint(theme) {
|
|
22
|
+
const isWide = useMediaQuery(`(min-width: ${theme.breakpoints.wide})`);
|
|
23
|
+
const isDesktop = useMediaQuery(`(min-width: ${theme.breakpoints.desktop})`);
|
|
24
|
+
const isTablet = useMediaQuery(`(min-width: ${theme.breakpoints.tablet})`);
|
|
25
|
+
if (isWide)
|
|
26
|
+
return "wide";
|
|
27
|
+
if (isDesktop)
|
|
28
|
+
return "desktop";
|
|
29
|
+
if (isTablet)
|
|
30
|
+
return "tablet";
|
|
31
|
+
return "mobile";
|
|
32
|
+
}
|
|
33
|
+
export function useIsMobile(theme) {
|
|
34
|
+
return useMediaQuery(`(max-width: ${parseInt(theme.breakpoints.tablet) - 1}px)`);
|
|
35
|
+
}
|
|
36
|
+
export function useIsTablet(theme) {
|
|
37
|
+
const minWidth = theme.breakpoints.tablet;
|
|
38
|
+
const maxWidth = `${parseInt(theme.breakpoints.desktop) - 1}px`;
|
|
39
|
+
return useMediaQuery(`(min-width: ${minWidth}) and (max-width: ${maxWidth})`);
|
|
40
|
+
}
|
|
41
|
+
export function useIsDesktop(theme) {
|
|
42
|
+
return useMediaQuery(`(min-width: ${theme.breakpoints.desktop})`);
|
|
43
|
+
}
|
|
44
|
+
export function useResponsiveValue(theme, values) {
|
|
45
|
+
const breakpoint = useBreakpoint(theme);
|
|
46
|
+
if (values[breakpoint] !== undefined) {
|
|
47
|
+
return values[breakpoint];
|
|
48
|
+
}
|
|
49
|
+
if (breakpoint === "wide" && values.desktop !== undefined) {
|
|
50
|
+
return values.desktop;
|
|
51
|
+
}
|
|
52
|
+
if ((breakpoint === "desktop" || breakpoint === "wide") &&
|
|
53
|
+
values.tablet !== undefined) {
|
|
54
|
+
return values.tablet;
|
|
55
|
+
}
|
|
56
|
+
if (values.mobile !== undefined) {
|
|
57
|
+
return values.mobile;
|
|
58
|
+
}
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
export function responsiveStyles(styles, currentBreakpoint) {
|
|
62
|
+
const baseStyles = styles.base || {};
|
|
63
|
+
const breakpointStyles = styles[currentBreakpoint] || {};
|
|
64
|
+
return {
|
|
65
|
+
...baseStyles,
|
|
66
|
+
...breakpointStyles,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function getResponsiveMaxWidth(theme, breakpoint, customMaxWidths) {
|
|
70
|
+
if (customMaxWidths?.[breakpoint]) {
|
|
71
|
+
return customMaxWidths[breakpoint];
|
|
72
|
+
}
|
|
73
|
+
const defaults = {
|
|
74
|
+
mobile: "100%",
|
|
75
|
+
tablet: "100%",
|
|
76
|
+
desktop: "840px",
|
|
77
|
+
wide: "1200px",
|
|
78
|
+
};
|
|
79
|
+
return defaults[breakpoint];
|
|
80
|
+
}
|
|
81
|
+
export function getResponsivePadding(theme, breakpoint) {
|
|
82
|
+
const paddingMap = {
|
|
83
|
+
mobile: "md",
|
|
84
|
+
tablet: "lg",
|
|
85
|
+
desktop: "xl",
|
|
86
|
+
wide: "2xl",
|
|
87
|
+
};
|
|
88
|
+
return theme.spacing[paddingMap[breakpoint]];
|
|
89
|
+
}
|
|
90
|
+
export function getResponsiveFontSize(theme, breakpoint, size = "fontSizeMd") {
|
|
91
|
+
if (breakpoint === "mobile" && size.startsWith("fontSize")) {
|
|
92
|
+
const sizeMap = {
|
|
93
|
+
fontSize3xl: "fontSize2xl",
|
|
94
|
+
fontSize2xl: "fontSizeXl",
|
|
95
|
+
fontSizeXl: "fontSizeLg",
|
|
96
|
+
fontSizeLg: "fontSizeMd",
|
|
97
|
+
};
|
|
98
|
+
const adjustedSize = sizeMap[size] || size;
|
|
99
|
+
return theme.typography[adjustedSize];
|
|
100
|
+
}
|
|
101
|
+
return theme.typography[size];
|
|
102
|
+
}
|
|
103
|
+
export function isTouchDevice() {
|
|
104
|
+
return ("ontouchstart" in window ||
|
|
105
|
+
navigator.maxTouchPoints > 0 ||
|
|
106
|
+
navigator.msMaxTouchPoints > 0);
|
|
107
|
+
}
|
|
108
|
+
export const MIN_TOUCH_TARGET_SIZE = "44px";
|
|
109
|
+
export function getResponsiveInputHeight(breakpoint) {
|
|
110
|
+
return breakpoint === "mobile" && isTouchDevice()
|
|
111
|
+
? MIN_TOUCH_TARGET_SIZE
|
|
112
|
+
: "40px";
|
|
113
|
+
}
|
|
@@ -18,11 +18,11 @@ export const defaultTheme = {
|
|
|
18
18
|
borderFocus: "#27903F",
|
|
19
19
|
text: "#111827",
|
|
20
20
|
textSecondary: "#374151",
|
|
21
|
-
textTertiary: "#
|
|
21
|
+
textTertiary: "#4E8F50",
|
|
22
22
|
textDisabled: "#9ca3af",
|
|
23
23
|
textOnPrimary: "#fff",
|
|
24
24
|
textOnSecondary: "#fff",
|
|
25
|
-
success: "#
|
|
25
|
+
success: "#4E8F50",
|
|
26
26
|
successBackground: "#ecfdf5",
|
|
27
27
|
successBorder: "#6ee7b7",
|
|
28
28
|
error: "#ef4444",
|
|
@@ -84,6 +84,12 @@ export const defaultTheme = {
|
|
|
84
84
|
normal: "200ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
85
85
|
slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
86
86
|
},
|
|
87
|
+
breakpoints: {
|
|
88
|
+
mobile: "320px",
|
|
89
|
+
tablet: "768px",
|
|
90
|
+
desktop: "1024px",
|
|
91
|
+
wide: "1280px",
|
|
92
|
+
},
|
|
87
93
|
};
|
|
88
94
|
export const modernTheme = {
|
|
89
95
|
name: "modern",
|
|
@@ -95,7 +101,7 @@ export const modernTheme = {
|
|
|
95
101
|
secondaryHover: "#ff5722",
|
|
96
102
|
accent: "#3b82f6",
|
|
97
103
|
accentHover: "#2563eb",
|
|
98
|
-
background: "#
|
|
104
|
+
background: "#fff",
|
|
99
105
|
backgroundSecondary: "#f8fafc",
|
|
100
106
|
backgroundTertiary: "#f1f5f9",
|
|
101
107
|
surface: "#ffffff",
|
|
@@ -109,7 +115,7 @@ export const modernTheme = {
|
|
|
109
115
|
textDisabled: "#cbd5e1",
|
|
110
116
|
textOnPrimary: "#ffffff",
|
|
111
117
|
textOnSecondary: "#ffffff",
|
|
112
|
-
success: "#
|
|
118
|
+
success: "#4E8F50",
|
|
113
119
|
successBackground: "#ecfdf5",
|
|
114
120
|
successBorder: "#6ee7b7",
|
|
115
121
|
error: "#ef4444",
|
|
@@ -171,6 +177,12 @@ export const modernTheme = {
|
|
|
171
177
|
normal: "200ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
172
178
|
slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
173
179
|
},
|
|
180
|
+
breakpoints: {
|
|
181
|
+
mobile: "320px",
|
|
182
|
+
tablet: "768px",
|
|
183
|
+
desktop: "1024px",
|
|
184
|
+
wide: "1280px",
|
|
185
|
+
},
|
|
174
186
|
};
|
|
175
187
|
export const themes = {
|
|
176
188
|
default: defaultTheme,
|
|
@@ -82,6 +82,12 @@ export interface ThemeTransitions {
|
|
|
82
82
|
normal: string;
|
|
83
83
|
slow: string;
|
|
84
84
|
}
|
|
85
|
+
export interface ThemeBreakpoints {
|
|
86
|
+
mobile: string;
|
|
87
|
+
tablet: string;
|
|
88
|
+
desktop: string;
|
|
89
|
+
wide: string;
|
|
90
|
+
}
|
|
85
91
|
export interface MedosTheme {
|
|
86
92
|
name: string;
|
|
87
93
|
colors: ThemeColors;
|
|
@@ -90,6 +96,7 @@ export interface MedosTheme {
|
|
|
90
96
|
shadows: ThemeShadows;
|
|
91
97
|
radii: ThemeRadii;
|
|
92
98
|
transitions: ThemeTransitions;
|
|
99
|
+
breakpoints: ThemeBreakpoints;
|
|
93
100
|
}
|
|
94
101
|
export type PartialTheme = {
|
|
95
102
|
name?: string;
|
|
@@ -99,6 +106,7 @@ export type PartialTheme = {
|
|
|
99
106
|
shadows?: Partial<ThemeShadows>;
|
|
100
107
|
radii?: Partial<ThemeRadii>;
|
|
101
108
|
transitions?: Partial<ThemeTransitions>;
|
|
109
|
+
breakpoints?: Partial<ThemeBreakpoints>;
|
|
102
110
|
};
|
|
103
111
|
export interface ThemeConfig {
|
|
104
112
|
theme?: MedosTheme | PartialTheme;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export type { MedosThemeProviderProps } from "./react/ThemeProvider";
|
|
|
5
5
|
export { defaultTheme, modernTheme } from "./core/theme/themes";
|
|
6
6
|
export { useTheme, useThemeContext, useCssVar } from "./react/hooks/useTheme";
|
|
7
7
|
export { AppointmentCalender } from "./components/appointment-booking";
|
|
8
|
-
export { EnquiryForm } from "./components/
|
|
9
|
-
export type { EnquiryFormProps } from "./components/
|
|
8
|
+
export { EnquiryForm } from "./components/enquiry-form";
|
|
9
|
+
export type { EnquiryFormProps } from "./components/types/enquiry";
|
|
10
10
|
export * from "./appointments/provider";
|
|
11
11
|
export * from "./appointments/types";
|
|
12
12
|
export * from "./appointment-calendar/provider";
|
|
@@ -14,3 +14,5 @@ export * from "./appointment-calendar/types";
|
|
|
14
14
|
export * from "./enquiry-form/provider";
|
|
15
15
|
export * from "./enquiry-form/types";
|
|
16
16
|
export { PatientService, SendPhoneVerificationOtpPayload, VerifyPhoneVerificationOtpPayload, } from "./services/PatientService";
|
|
17
|
+
export { WorkspaceService } from "./services/WorkspaceService";
|
|
18
|
+
export type { WorkspaceResponse, Address, ConsultationType, User, Doctor, AddressDoctor, } from "./services/WorkspaceService";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { MedosThemeProvider } from "./react/ThemeProvider";
|
|
|
4
4
|
export { defaultTheme, modernTheme } from "./core/theme/themes";
|
|
5
5
|
export { useTheme, useThemeContext, useCssVar } from "./react/hooks/useTheme";
|
|
6
6
|
export { AppointmentCalender } from "./components/appointment-booking";
|
|
7
|
-
export { EnquiryForm } from "./components/
|
|
7
|
+
export { EnquiryForm } from "./components/enquiry-form";
|
|
8
8
|
export * from "./appointments/provider";
|
|
9
9
|
export * from "./appointments/types";
|
|
10
10
|
export * from "./appointment-calendar/provider";
|
|
@@ -12,3 +12,4 @@ export * from "./appointment-calendar/types";
|
|
|
12
12
|
export * from "./enquiry-form/provider";
|
|
13
13
|
export * from "./enquiry-form/types";
|
|
14
14
|
export { PatientService, } from "./services/PatientService";
|
|
15
|
+
export { WorkspaceService } from "./services/WorkspaceService";
|
|
@@ -10,8 +10,9 @@ export interface MedosThemeProviderProps {
|
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
theme?: ThemeName | MedosTheme | PartialTheme;
|
|
12
12
|
cssVariablePrefix?: string;
|
|
13
|
+
onThemeError?: (error: Error) => void;
|
|
13
14
|
}
|
|
14
|
-
export declare function MedosThemeProvider({ children, theme, cssVariablePrefix, }: MedosThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function MedosThemeProvider({ children, theme, cssVariablePrefix, onThemeError, }: Readonly<MedosThemeProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare function useThemeContext(): ThemeContextValue;
|
|
16
17
|
export declare function useTheme(): MedosTheme;
|
|
17
18
|
export declare function useCssVar(category: string, key: string, fallback?: string): string;
|