medos-sdk 1.1.9 → 1.1.11
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 +7 -0
- package/dist/components/AppointmentCalender.js +22 -8
- package/dist/components/AppointmentConfirmationStep.d.ts +4 -0
- package/dist/components/AppointmentConfirmationStep.js +50 -52
- package/dist/components/AppointmentDateTimeModal.d.ts +4 -0
- package/dist/components/AppointmentDateTimeModal.js +216 -165
- 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 +13 -6
- package/dist/components/ContactPreferenceStep.js +16 -6
- package/dist/components/DoctorSelectModal.d.ts +5 -0
- package/dist/components/DoctorSelectModal.js +169 -74
- package/dist/components/EnquiryForm.js +84 -72
- package/dist/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/components/Icons/CloseIcon.js +5 -0
- package/dist/components/InquiryDetailsStep.js +11 -6
- 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.d.ts +5 -0
- package/dist/components/appointment-booking/AppointmentCalender.js +247 -0
- package/dist/components/appointment-booking/hooks/index.d.ts +3 -0
- package/dist/components/appointment-booking/hooks/index.js +3 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +318 -0
- package/dist/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
- package/dist/components/appointment-booking/hooks/useAppointmentState.js +125 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +55 -0
- package/dist/components/appointment-booking/index.d.ts +5 -0
- package/dist/components/appointment-booking/index.js +3 -0
- package/dist/components/appointment-booking/types.d.ts +291 -0
- package/dist/components/appointment-booking/types.js +49 -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/custom-calendar.js +20 -11
- package/dist/components/styles.js +93 -52
- package/dist/components/theme-styles.d.ts +5 -4
- package/dist/components/theme-styles.js +221 -125
- package/dist/components/types.d.ts +12 -139
- package/dist/components/types.js +15 -32
- package/dist/components/uiComponents/SelectDropdown.d.ts +1 -1
- package/dist/components/uiComponents/SelectDropdown.js +24 -24
- package/dist/components/utils.d.ts +3 -0
- package/dist/components/utils.js +59 -0
- package/dist/components/validation.d.ts +2 -0
- package/dist/components/validation.js +41 -0
- 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/enquiry-form/validation.js +1 -1
- package/dist/index.d.ts +3 -1
- 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 +2 -1
- package/dist/react/index.js +1 -1
- package/dist/services/AppointmentService.d.ts +80 -2
- package/dist/services/AppointmentService.js +114 -5
- package/dist/services/WorkspaceService.d.ts +58 -3
- package/dist/services/WorkspaceService.js +10 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +9 -7
- package/dist/vanilla/AppointmentCalendarWidget.js +834 -384
- 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 +4 -0
- package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +4 -0
- package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/DoctorSelectModal.d.ts +5 -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/AppointmentCalender.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/hooks/index.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
- package/dist/vanilla/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
- package/dist/vanilla/components/appointment-booking/index.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/types.d.ts +291 -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/theme-styles.d.ts +5 -4
- package/dist/vanilla/components/types.d.ts +12 -139
- package/dist/vanilla/components/uiComponents/SelectDropdown.d.ts +1 -1
- package/dist/vanilla/components/utils.d.ts +3 -0
- package/dist/vanilla/components/validation.d.ts +2 -0
- 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 +374 -53
- package/dist/vanilla/index.d.ts +3 -1
- package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
- package/dist/vanilla/react/index.d.ts +2 -1
- 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 +9 -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 +833 -207
- package/dist/vanilla/widget.js +6463 -5687
- package/package.json +1 -1
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const getMobileStyles: (theme: any, breakpoint: string) => {
|
|
3
|
+
container: {
|
|
4
|
+
backgroundColor: any;
|
|
5
|
+
padding: string;
|
|
6
|
+
maxWidth: string;
|
|
7
|
+
fontFamily: any;
|
|
8
|
+
color: any;
|
|
9
|
+
minHeight: string;
|
|
10
|
+
boxSizing: "border-box";
|
|
11
|
+
};
|
|
12
|
+
header: {
|
|
13
|
+
marginBottom: number;
|
|
14
|
+
};
|
|
15
|
+
title: {
|
|
16
|
+
fontSize: number;
|
|
17
|
+
fontWeight: number;
|
|
18
|
+
margin: number;
|
|
19
|
+
color: any;
|
|
20
|
+
};
|
|
21
|
+
section: {
|
|
22
|
+
marginBottom: number;
|
|
23
|
+
};
|
|
24
|
+
sectionTitle: {
|
|
25
|
+
fontSize: number;
|
|
26
|
+
fontWeight: number;
|
|
27
|
+
marginBottom: number;
|
|
28
|
+
color: any;
|
|
29
|
+
};
|
|
30
|
+
required: {
|
|
31
|
+
color: any;
|
|
32
|
+
marginLeft: number;
|
|
33
|
+
};
|
|
34
|
+
modeContainer: {
|
|
35
|
+
display: string;
|
|
36
|
+
flexDirection: "column";
|
|
37
|
+
gap: number;
|
|
38
|
+
};
|
|
39
|
+
modeOption: {
|
|
40
|
+
display: string;
|
|
41
|
+
alignItems: string;
|
|
42
|
+
gap: number;
|
|
43
|
+
padding: string;
|
|
44
|
+
border: string;
|
|
45
|
+
borderRadius: string;
|
|
46
|
+
cursor: string;
|
|
47
|
+
fontSize: number;
|
|
48
|
+
transition: string;
|
|
49
|
+
backgroundColor: any;
|
|
50
|
+
};
|
|
51
|
+
radioInput: {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
accentColor: any;
|
|
55
|
+
};
|
|
56
|
+
chargeAmount: {
|
|
57
|
+
fontSize: number;
|
|
58
|
+
fontWeight: number;
|
|
59
|
+
color: any;
|
|
60
|
+
};
|
|
61
|
+
paymentOption: {
|
|
62
|
+
padding: string;
|
|
63
|
+
border: string;
|
|
64
|
+
borderRadius: string;
|
|
65
|
+
fontSize: number;
|
|
66
|
+
color: any;
|
|
67
|
+
backgroundColor: any;
|
|
68
|
+
};
|
|
69
|
+
dateSection: {
|
|
70
|
+
marginBottom: number;
|
|
71
|
+
padding: string;
|
|
72
|
+
backgroundColor: any;
|
|
73
|
+
borderRadius: string;
|
|
74
|
+
border: string;
|
|
75
|
+
};
|
|
76
|
+
dateSectionHeader: {
|
|
77
|
+
marginBottom: number;
|
|
78
|
+
};
|
|
79
|
+
dateSectionTitle: {
|
|
80
|
+
fontSize: number;
|
|
81
|
+
fontWeight: number;
|
|
82
|
+
color: any;
|
|
83
|
+
margin: number;
|
|
84
|
+
letterSpacing: string;
|
|
85
|
+
textTransform: "uppercase";
|
|
86
|
+
};
|
|
87
|
+
monthNavigationContainer: {
|
|
88
|
+
display: string;
|
|
89
|
+
alignItems: string;
|
|
90
|
+
justifyContent: string;
|
|
91
|
+
marginBottom: number;
|
|
92
|
+
position: "relative";
|
|
93
|
+
};
|
|
94
|
+
monthYearDisplay: {
|
|
95
|
+
fontSize: number;
|
|
96
|
+
fontWeight: number;
|
|
97
|
+
color: any;
|
|
98
|
+
textAlign: "center";
|
|
99
|
+
flex: number;
|
|
100
|
+
};
|
|
101
|
+
navButton: {
|
|
102
|
+
background: string;
|
|
103
|
+
border: string;
|
|
104
|
+
color: any;
|
|
105
|
+
cursor: string;
|
|
106
|
+
padding: number;
|
|
107
|
+
borderRadius: string;
|
|
108
|
+
display: string;
|
|
109
|
+
alignItems: string;
|
|
110
|
+
justifyContent: string;
|
|
111
|
+
transition: string;
|
|
112
|
+
minWidth: number;
|
|
113
|
+
minHeight: number;
|
|
114
|
+
flexShrink: number;
|
|
115
|
+
};
|
|
116
|
+
dateCardsContainer: {
|
|
117
|
+
display: string;
|
|
118
|
+
justifyContent: string;
|
|
119
|
+
alignItems: string;
|
|
120
|
+
gap: number;
|
|
121
|
+
width: string;
|
|
122
|
+
maxWidth: string;
|
|
123
|
+
overflow: string;
|
|
124
|
+
};
|
|
125
|
+
dateCard: {
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
border: string;
|
|
129
|
+
borderRadius: string;
|
|
130
|
+
display: string;
|
|
131
|
+
flexDirection: "column";
|
|
132
|
+
alignItems: string;
|
|
133
|
+
justifyContent: string;
|
|
134
|
+
cursor: string;
|
|
135
|
+
transition: string;
|
|
136
|
+
backgroundColor: any;
|
|
137
|
+
position: "relative";
|
|
138
|
+
flex: string;
|
|
139
|
+
};
|
|
140
|
+
dateCardSelected: {
|
|
141
|
+
borderColor: any;
|
|
142
|
+
backgroundColor: any;
|
|
143
|
+
color: any;
|
|
144
|
+
};
|
|
145
|
+
dateCardWeekday: {
|
|
146
|
+
fontSize: number;
|
|
147
|
+
fontWeight: number;
|
|
148
|
+
textTransform: "uppercase";
|
|
149
|
+
marginBottom: number;
|
|
150
|
+
letterSpacing: string;
|
|
151
|
+
lineHeight: number;
|
|
152
|
+
};
|
|
153
|
+
dateCardDay: {
|
|
154
|
+
fontSize: number;
|
|
155
|
+
fontWeight: number;
|
|
156
|
+
lineHeight: number;
|
|
157
|
+
};
|
|
158
|
+
slotsContainer: {
|
|
159
|
+
marginBottom: number;
|
|
160
|
+
};
|
|
161
|
+
slotGrid: {
|
|
162
|
+
display: string;
|
|
163
|
+
gridTemplateColumns: string;
|
|
164
|
+
gap: number;
|
|
165
|
+
marginTop: number;
|
|
166
|
+
maxHeight: string;
|
|
167
|
+
overflowY: "auto";
|
|
168
|
+
paddingRight: string;
|
|
169
|
+
paddingBottom: string;
|
|
170
|
+
scrollbarWidth: "thin";
|
|
171
|
+
scrollbarColor: string;
|
|
172
|
+
};
|
|
173
|
+
slotButton: {
|
|
174
|
+
padding: string;
|
|
175
|
+
border: string;
|
|
176
|
+
borderRadius: string;
|
|
177
|
+
backgroundColor: any;
|
|
178
|
+
color: any;
|
|
179
|
+
fontSize: number;
|
|
180
|
+
fontWeight: number;
|
|
181
|
+
cursor: string;
|
|
182
|
+
transition: string;
|
|
183
|
+
minHeight: number;
|
|
184
|
+
boxShadow: string;
|
|
185
|
+
position: "relative";
|
|
186
|
+
letterSpacing: string;
|
|
187
|
+
};
|
|
188
|
+
slotButtonSelected: {
|
|
189
|
+
borderColor: any;
|
|
190
|
+
backgroundColor: any;
|
|
191
|
+
color: any;
|
|
192
|
+
boxShadow: string;
|
|
193
|
+
transform: string;
|
|
194
|
+
};
|
|
195
|
+
noSlots: {
|
|
196
|
+
textAlign: "center";
|
|
197
|
+
color: any;
|
|
198
|
+
fontSize: number;
|
|
199
|
+
marginTop: number;
|
|
200
|
+
padding: string;
|
|
201
|
+
};
|
|
202
|
+
footer: {
|
|
203
|
+
display: string;
|
|
204
|
+
gap: number;
|
|
205
|
+
marginTop: string;
|
|
206
|
+
paddingTop: number;
|
|
207
|
+
borderTop: string;
|
|
208
|
+
};
|
|
209
|
+
backButton: {
|
|
210
|
+
flex: number;
|
|
211
|
+
padding: string;
|
|
212
|
+
border: string;
|
|
213
|
+
borderRadius: string;
|
|
214
|
+
backgroundColor: any;
|
|
215
|
+
color: any;
|
|
216
|
+
fontSize: number;
|
|
217
|
+
fontWeight: number;
|
|
218
|
+
cursor: string;
|
|
219
|
+
transition: string;
|
|
220
|
+
minHeight: number;
|
|
221
|
+
};
|
|
222
|
+
nextButton: {
|
|
223
|
+
flex: number;
|
|
224
|
+
padding: string;
|
|
225
|
+
border: string;
|
|
226
|
+
borderRadius: string;
|
|
227
|
+
backgroundColor: any;
|
|
228
|
+
color: any;
|
|
229
|
+
fontSize: number;
|
|
230
|
+
fontWeight: number;
|
|
231
|
+
cursor: string;
|
|
232
|
+
transition: string;
|
|
233
|
+
minHeight: number;
|
|
234
|
+
boxShadow: string;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
export declare const getDesktopStyles: (theme: any, breakpoint: string) => {
|
|
238
|
+
modalWrapper: React.CSSProperties;
|
|
239
|
+
sectionCard: React.CSSProperties;
|
|
240
|
+
sectionHeader: React.CSSProperties;
|
|
241
|
+
sectionTitle: React.CSSProperties;
|
|
242
|
+
sectionBody: React.CSSProperties;
|
|
243
|
+
label: React.CSSProperties;
|
|
244
|
+
modeContainer: React.CSSProperties;
|
|
245
|
+
radioLabel: React.CSSProperties;
|
|
246
|
+
radioInput: React.CSSProperties;
|
|
247
|
+
rupee: React.CSSProperties;
|
|
248
|
+
dateTimeContainer: React.CSSProperties;
|
|
249
|
+
calendarBox: React.CSSProperties;
|
|
250
|
+
timesContainer: React.CSSProperties;
|
|
251
|
+
timesLabel: React.CSSProperties;
|
|
252
|
+
dateLabel: React.CSSProperties;
|
|
253
|
+
noSlots: React.CSSProperties;
|
|
254
|
+
slotGrid: React.CSSProperties;
|
|
255
|
+
slotButton: React.CSSProperties;
|
|
256
|
+
footer: React.CSSProperties;
|
|
257
|
+
backBtn: React.CSSProperties;
|
|
258
|
+
continueBtn: React.CSSProperties;
|
|
259
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MedosTheme } from "../core/theme/types";
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
3
|
+
import { Breakpoint } from "../core/theme/responsive";
|
|
4
|
+
export declare function getContainerStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
|
|
5
|
+
export declare function getButtonStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
|
|
6
|
+
export declare function getPhoneVerifyStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
|
|
7
|
+
export declare function getPatientDetailsStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
|
|
7
8
|
export declare function getSuccessStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
|
|
8
9
|
export declare const CONTAINER_STYLES: Record<string, React.CSSProperties>;
|
|
9
10
|
export declare const BUTTON_STYLES: Record<string, React.CSSProperties>;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
onError?: (err: Error) => void;
|
|
4
|
-
};
|
|
1
|
+
export type { AppointmentState, AppointmentAction, Patient, SessionPack, AvailablePackage, BookingOptionType, } from "./appointment-booking/types";
|
|
2
|
+
export { INITIAL_STATE } from "./appointment-booking/types";
|
|
5
3
|
export type PhoneVerificationStepProps = {
|
|
6
|
-
state:
|
|
7
|
-
dispatch: React.Dispatch<
|
|
4
|
+
state: any;
|
|
5
|
+
dispatch: React.Dispatch<any>;
|
|
8
6
|
onSendOtp: () => Promise<void>;
|
|
9
7
|
onVerifyOtp: () => Promise<void>;
|
|
10
8
|
onBack: () => void;
|
|
11
9
|
onContinue: () => void;
|
|
12
10
|
};
|
|
13
11
|
export type PatientDetailsStepProps = {
|
|
14
|
-
state:
|
|
15
|
-
dispatch: React.Dispatch<
|
|
12
|
+
state: any;
|
|
13
|
+
dispatch: React.Dispatch<any>;
|
|
16
14
|
onBack: () => void;
|
|
17
15
|
onSubmit: () => Promise<void>;
|
|
16
|
+
isFirstStep?: boolean;
|
|
18
17
|
};
|
|
19
18
|
export type SuccessStepProps = {
|
|
20
19
|
onReset: () => void;
|
|
@@ -33,138 +32,12 @@ export type OtpInputSectionProps = {
|
|
|
33
32
|
onOtpChange: (code: string) => void;
|
|
34
33
|
};
|
|
35
34
|
export type PatientInfoSectionProps = {
|
|
36
|
-
state:
|
|
37
|
-
dispatch: React.Dispatch<
|
|
35
|
+
state: any;
|
|
36
|
+
dispatch: React.Dispatch<any>;
|
|
38
37
|
};
|
|
39
38
|
export type AddressInfoSectionProps = {
|
|
40
|
-
state:
|
|
41
|
-
dispatch: React.Dispatch<
|
|
42
|
-
};
|
|
43
|
-
export interface AppointmentState {
|
|
44
|
-
step: number;
|
|
45
|
-
loading: boolean;
|
|
46
|
-
error: string | null;
|
|
47
|
-
workspaceId: number | null;
|
|
48
|
-
addresses: AddressItem[];
|
|
49
|
-
addressDoctorsMap: Record<number, Doctor[]>;
|
|
50
|
-
selectedAddress: number | null;
|
|
51
|
-
selectedDoctor: number | null;
|
|
52
|
-
selectedDate: Date;
|
|
53
|
-
slots: Slot[];
|
|
54
|
-
selectedSlot: Slot | null;
|
|
55
|
-
consultationMode: "ONLINE" | "OFFLINE";
|
|
56
|
-
consultationCharge: string;
|
|
57
|
-
patientName: string;
|
|
58
|
-
patientAge: string;
|
|
59
|
-
patientEmail: string;
|
|
60
|
-
patientGender: string;
|
|
61
|
-
bloodGroup: string;
|
|
62
|
-
patientAddress: string;
|
|
63
|
-
patientCity: string;
|
|
64
|
-
patientState: string;
|
|
65
|
-
patientCountry: string;
|
|
66
|
-
patientZipcode: string;
|
|
67
|
-
patientLandmark: string;
|
|
68
|
-
countryCode: string;
|
|
69
|
-
patientPhone: string;
|
|
70
|
-
otpCode: string;
|
|
71
|
-
otpSent: boolean;
|
|
72
|
-
otpVerified: boolean;
|
|
73
|
-
otpSending: boolean;
|
|
74
|
-
otpVerifying: boolean;
|
|
75
|
-
}
|
|
76
|
-
export type AppointmentAction = {
|
|
77
|
-
type: "SET_STEP";
|
|
78
|
-
payload: number;
|
|
79
|
-
} | {
|
|
80
|
-
type: "SET_LOADING";
|
|
81
|
-
payload: boolean;
|
|
82
|
-
} | {
|
|
83
|
-
type: "SET_ERROR";
|
|
84
|
-
payload: string | null;
|
|
85
|
-
} | {
|
|
86
|
-
type: "SET_WORKSPACE";
|
|
87
|
-
payload: {
|
|
88
|
-
id: number;
|
|
89
|
-
addresses: AddressItem[];
|
|
90
|
-
};
|
|
91
|
-
} | {
|
|
92
|
-
type: "SET_SELECTED_ADDRESS";
|
|
93
|
-
payload: number | null;
|
|
94
|
-
} | {
|
|
95
|
-
type: "SET_SELECTED_DOCTOR";
|
|
96
|
-
payload: number | null;
|
|
97
|
-
} | {
|
|
98
|
-
type: "SET_SELECTED_DATE";
|
|
99
|
-
payload: Date;
|
|
100
|
-
} | {
|
|
101
|
-
type: "SET_SLOTS";
|
|
102
|
-
payload: Slot[];
|
|
103
|
-
} | {
|
|
104
|
-
type: "SET_SELECTED_SLOT";
|
|
105
|
-
payload: Slot | null;
|
|
106
|
-
} | {
|
|
107
|
-
type: "SET_CONSULTATION_MODE";
|
|
108
|
-
payload: "ONLINE" | "OFFLINE";
|
|
109
|
-
} | {
|
|
110
|
-
type: "SET_CONSULTATION_CHARGE";
|
|
111
|
-
payload: string;
|
|
112
|
-
} | {
|
|
113
|
-
type: "SET_PATIENT_NAME";
|
|
114
|
-
payload: string;
|
|
115
|
-
} | {
|
|
116
|
-
type: "SET_PATIENT_AGE";
|
|
117
|
-
payload: string;
|
|
118
|
-
} | {
|
|
119
|
-
type: "SET_PATIENT_EMAIL";
|
|
120
|
-
payload: string;
|
|
121
|
-
} | {
|
|
122
|
-
type: "SET_PATIENT_GENDER";
|
|
123
|
-
payload: string;
|
|
124
|
-
} | {
|
|
125
|
-
type: "SET_BLOOD_GROUP";
|
|
126
|
-
payload: string;
|
|
127
|
-
} | {
|
|
128
|
-
type: "SET_PATIENT_ADDRESS";
|
|
129
|
-
payload: string;
|
|
130
|
-
} | {
|
|
131
|
-
type: "SET_PATIENT_CITY";
|
|
132
|
-
payload: string;
|
|
133
|
-
} | {
|
|
134
|
-
type: "SET_PATIENT_STATE";
|
|
135
|
-
payload: string;
|
|
136
|
-
} | {
|
|
137
|
-
type: "SET_PATIENT_COUNTRY";
|
|
138
|
-
payload: string;
|
|
139
|
-
} | {
|
|
140
|
-
type: "SET_PATIENT_ZIPCODE";
|
|
141
|
-
payload: string;
|
|
142
|
-
} | {
|
|
143
|
-
type: "SET_PATIENT_LANDMARK";
|
|
144
|
-
payload: string;
|
|
145
|
-
} | {
|
|
146
|
-
type: "SET_COUNTRY_CODE";
|
|
147
|
-
payload: string;
|
|
148
|
-
} | {
|
|
149
|
-
type: "SET_PATIENT_PHONE";
|
|
150
|
-
payload: string;
|
|
151
|
-
} | {
|
|
152
|
-
type: "SET_OTP_CODE";
|
|
153
|
-
payload: string;
|
|
154
|
-
} | {
|
|
155
|
-
type: "SET_OTP_SENT";
|
|
156
|
-
payload: boolean;
|
|
157
|
-
} | {
|
|
158
|
-
type: "SET_OTP_VERIFIED";
|
|
159
|
-
payload: boolean;
|
|
160
|
-
} | {
|
|
161
|
-
type: "SET_OTP_SENDING";
|
|
162
|
-
payload: boolean;
|
|
163
|
-
} | {
|
|
164
|
-
type: "SET_OTP_VERIFYING";
|
|
165
|
-
payload: boolean;
|
|
166
|
-
} | {
|
|
167
|
-
type: "RESET_FORM";
|
|
39
|
+
state: any;
|
|
40
|
+
dispatch: React.Dispatch<any>;
|
|
168
41
|
};
|
|
169
42
|
export declare const COUNTRY_CODES: {
|
|
170
43
|
code: string;
|
|
@@ -178,4 +51,4 @@ export declare const BLOOD_GROUP_OPTIONS: {
|
|
|
178
51
|
value: string;
|
|
179
52
|
label: string;
|
|
180
53
|
}[];
|
|
181
|
-
export declare const
|
|
54
|
+
export declare const mapBloodGroupToApi: (uiBloodGroup: string) => string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
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;
|
|
2
5
|
export declare const parsePatientName: (fullName: string) => {
|
|
3
6
|
firstName: string;
|
|
4
7
|
lastName: string;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const validatePhoneNumber: (phone: string) => boolean;
|
|
2
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,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;
|
|
@@ -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;
|