medos-sdk 1.0.2 → 1.0.3

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.
Files changed (94) hide show
  1. package/dist/client/MedosClient.d.ts +1 -1
  2. package/dist/client/MedosClient.js +1 -1
  3. package/dist/components/AppointmentCalender.d.ts +1 -4
  4. package/dist/components/AppointmentCalender.js +282 -530
  5. package/dist/components/AppointmentDateTimeModal.d.ts +14 -0
  6. package/dist/components/AppointmentDateTimeModal.js +206 -0
  7. package/dist/components/ConfigurableCard.d.ts +12 -0
  8. package/dist/components/ConfigurableCard.js +29 -0
  9. package/dist/components/DoctorSelectModal.d.ts +7 -0
  10. package/dist/components/DoctorSelectModal.js +80 -0
  11. package/dist/components/Icons/Check.d.ts +6 -0
  12. package/dist/components/Icons/Check.js +2 -0
  13. package/dist/components/Icons/ChevronDownIcon.d.ts +4 -0
  14. package/dist/components/Icons/ChevronDownIcon.js +2 -0
  15. package/dist/components/Icons/ChevronLeft.d.ts +3 -0
  16. package/dist/components/Icons/ChevronLeft.js +3 -0
  17. package/dist/components/Icons/ChevronRight.d.ts +3 -0
  18. package/dist/components/Icons/ChevronRight.js +3 -0
  19. package/dist/components/Icons/ConfirmationCheck.d.ts +1 -0
  20. package/dist/components/Icons/ConfirmationCheck.js +9 -0
  21. package/dist/components/Icons/ConsultationType.d.ts +1 -0
  22. package/dist/components/Icons/ConsultationType.js +2 -0
  23. package/dist/components/Icons/Date&TimeIcon.d.ts +1 -0
  24. package/dist/components/Icons/Date&TimeIcon.js +2 -0
  25. package/dist/components/Icons/MapIcon.d.ts +1 -0
  26. package/dist/components/Icons/MapIcon.js +2 -0
  27. package/dist/components/Icons/PaymentMethodIcon.d.ts +1 -0
  28. package/dist/components/Icons/PaymentMethodIcon.js +2 -0
  29. package/dist/components/Icons/UserIcon.d.ts +1 -0
  30. package/dist/components/Icons/UserIcon.js +2 -0
  31. package/dist/components/PatientDetailsStep.d.ts +3 -0
  32. package/dist/components/PatientDetailsStep.js +76 -0
  33. package/dist/components/PhoneVerificationStep.d.ts +3 -0
  34. package/dist/components/PhoneVerificationStep.js +39 -0
  35. package/dist/components/SuccessStep.d.ts +3 -0
  36. package/dist/components/SuccessStep.js +17 -0
  37. package/dist/components/custom-calendar.d.ts +5 -0
  38. package/dist/components/custom-calendar.js +153 -0
  39. package/dist/components/styles.d.ts +6 -0
  40. package/dist/components/styles.js +257 -0
  41. package/dist/components/types.d.ts +182 -0
  42. package/dist/components/types.js +55 -0
  43. package/dist/components/ui/select.d.ts +10 -0
  44. package/dist/components/ui/select.js +21 -0
  45. package/dist/components/uiComponents/SelectDropdown.d.ts +41 -0
  46. package/dist/components/uiComponents/SelectDropdown.js +302 -0
  47. package/dist/components/utils.d.ts +5 -0
  48. package/dist/components/utils.js +15 -0
  49. package/dist/components/validation.d.ts +2 -0
  50. package/dist/components/validation.js +7 -0
  51. package/dist/context/TemplateContext.d.ts +12 -0
  52. package/dist/context/TemplateContext.js +19 -0
  53. package/dist/lib/templateUtils.d.ts +3 -0
  54. package/dist/lib/templateUtils.js +28 -0
  55. package/dist/services/AppointmentService.d.ts +4 -5
  56. package/dist/services/AppointmentService.js +12 -10
  57. package/dist/templates/registry.d.ts +12 -0
  58. package/dist/templates/registry.js +58 -0
  59. package/dist/vanilla/AppointmentCalendarWidget.d.ts +2 -34
  60. package/dist/vanilla/AppointmentCalendarWidget.js +264 -273
  61. package/dist/vanilla/client/MedosClient.d.ts +1 -1
  62. package/dist/vanilla/components/AppointmentCalender.d.ts +1 -4
  63. package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +14 -0
  64. package/dist/vanilla/components/ConfigurableCard.d.ts +12 -0
  65. package/dist/vanilla/components/DoctorSelectModal.d.ts +7 -0
  66. package/dist/vanilla/components/Icons/Check.d.ts +6 -0
  67. package/dist/vanilla/components/Icons/ChevronDownIcon.d.ts +4 -0
  68. package/dist/vanilla/components/Icons/ChevronLeft.d.ts +3 -0
  69. package/dist/vanilla/components/Icons/ChevronRight.d.ts +3 -0
  70. package/dist/vanilla/components/Icons/ConfirmationCheck.d.ts +1 -0
  71. package/dist/vanilla/components/Icons/ConsultationType.d.ts +1 -0
  72. package/dist/vanilla/components/Icons/Date&TimeIcon.d.ts +1 -0
  73. package/dist/vanilla/components/Icons/MapIcon.d.ts +1 -0
  74. package/dist/vanilla/components/Icons/PaymentMethodIcon.d.ts +1 -0
  75. package/dist/vanilla/components/Icons/UserIcon.d.ts +1 -0
  76. package/dist/vanilla/components/PatientDetailsStep.d.ts +3 -0
  77. package/dist/vanilla/components/PhoneVerificationStep.d.ts +3 -0
  78. package/dist/vanilla/components/SuccessStep.d.ts +3 -0
  79. package/dist/vanilla/components/custom-calendar.d.ts +5 -0
  80. package/dist/vanilla/components/styles.d.ts +6 -0
  81. package/dist/vanilla/components/types.d.ts +182 -0
  82. package/dist/vanilla/components/ui/select.d.ts +10 -0
  83. package/dist/vanilla/components/uiComponents/SelectDropdown.d.ts +41 -0
  84. package/dist/vanilla/components/utils.d.ts +5 -0
  85. package/dist/vanilla/components/validation.d.ts +2 -0
  86. package/dist/vanilla/context/TemplateContext.d.ts +12 -0
  87. package/dist/vanilla/lib/templateUtils.d.ts +3 -0
  88. package/dist/vanilla/services/AppointmentService.d.ts +4 -5
  89. package/dist/vanilla/templates/alternative.css +13 -0
  90. package/dist/vanilla/templates/default.css +13 -0
  91. package/dist/vanilla/templates/registry.d.ts +12 -0
  92. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +2 -34
  93. package/dist/vanilla/widget.js +331 -283
  94. package/package.json +9 -4
@@ -20,7 +20,7 @@ declare class MedosClient {
20
20
  static initWithSession({ sessionToken, baseURL, }: MedosClientSessionConfig): Promise<void>;
21
21
  private static initializeAxiosInstance;
22
22
  static fetchAllAddressesAndDoctors(): Promise<AddressesResponse>;
23
- static fetchAppointments(workspaceId: string | number, addressId: string | number, doctorId: string | number, appointmentDate: string): Promise<any[]>;
23
+ static fetchAppointments(workspaceId: number, addressId: number, doctorId: number, appointmentDate: string): Promise<any[]>;
24
24
  static sendPhoneVerificationOtp(payload: SendPhoneVerificationOtpPayload): Promise<any>;
25
25
  static verifyPhoneVerificationOtp(payload: VerifyPhoneVerificationOtpPayload): Promise<any>;
26
26
  static get client(): AxiosInstance;
@@ -1,6 +1,3 @@
1
1
  import React from "react";
2
- type AppointmentCalenderProps = {
3
- onError?: (err: Error) => void;
4
- };
2
+ import { AppointmentCalenderProps } from "./types";
5
3
  export declare const AppointmentCalender: React.FC<AppointmentCalenderProps>;
6
- export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Slot } from "../services/AppointmentService";
3
+ export type AppointmentMode = "ONLINE" | "OFFLINE";
4
+ export type PaymentMode = "CASH" | "CARD" | "UPI";
5
+ type AppointmentModalProps = {
6
+ onlineFee?: number | null;
7
+ offlineFee?: number | null;
8
+ slots: Slot[];
9
+ onCancel: () => void;
10
+ onContinue: (mode: AppointmentMode, date: Date, slot: Slot, charge: string, paymentMode: PaymentMode) => void;
11
+ onDateChange?: (date: Date) => void;
12
+ };
13
+ export declare const AppointmentDateTimeModal: React.FC<AppointmentModalProps>;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export type ConfigurableCardProps = {
3
+ title: string;
4
+ subtitle?: string;
5
+ content?: React.ReactNode;
6
+ ctaLabel?: string;
7
+ onCta?: () => void;
8
+ variant?: "filled" | "outline";
9
+ className?: string;
10
+ };
11
+ export declare const ConfigurableCard: React.FC<ConfigurableCardProps>;
12
+ export default ConfigurableCard;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type DoctorSelectModalProps = {
3
+ onCancel: () => void;
4
+ onContinue: (addressId: number, doctorId: number, notes?: string) => void;
5
+ };
6
+ export declare const DoctorSelectModal: React.FC<DoctorSelectModalProps>;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface IconProps {
2
+ className?: string;
3
+ size?: number;
4
+ }
5
+ export declare const Check: React.FC<IconProps>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const ChevronDownIcon: React.FC<{
3
+ className?: string;
4
+ }>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const ChevronLeft: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ export default ChevronLeft;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const ChevronRight: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ export default ChevronRight;
@@ -0,0 +1 @@
1
+ export declare const ConfirmationCheck: React.FC;
@@ -0,0 +1 @@
1
+ export declare const ConsultationTypeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const DateTimeIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MapPinIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const PaymentMethodIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const UserIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { PatientDetailsStepProps } from "./types";
3
+ export declare const PatientDetailsStep: React.FC<PatientDetailsStepProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { PhoneVerificationStepProps } from "./types";
3
+ export declare const PhoneVerificationStep: React.FC<PhoneVerificationStepProps>;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { SuccessStepProps } from "./types";
3
+ export declare const SuccessStep: React.FC<SuccessStepProps>;
@@ -0,0 +1,5 @@
1
+ export declare const CustomCalendarWithDateSelector: ({ selectedDate, onSelect, pastDisabled, }: {
2
+ selectedDate?: Date;
3
+ onSelect: (date: Date) => void;
4
+ pastDisabled?: boolean;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare const CONTAINER_STYLES: Record<string, React.CSSProperties>;
3
+ export declare const BUTTON_STYLES: Record<string, React.CSSProperties>;
4
+ export declare const PHONE_VERIFY_STYLES: Record<string, React.CSSProperties>;
5
+ export declare const PATIENT_DETAILS_STYLES: Record<string, React.CSSProperties>;
6
+ export declare const SUCCESS_STYLES: Record<string, React.CSSProperties>;
@@ -0,0 +1,182 @@
1
+ import { Doctor, Slot, AddressItem } from "../services/AppointmentService";
2
+ export type AppointmentCalenderProps = {
3
+ onError?: (err: Error) => void;
4
+ };
5
+ export type PhoneVerificationStepProps = {
6
+ state: AppointmentState;
7
+ dispatch: React.Dispatch<AppointmentAction>;
8
+ onSendOtp: () => Promise<void>;
9
+ onVerifyOtp: () => Promise<void>;
10
+ onBack: () => void;
11
+ onContinue: () => void;
12
+ };
13
+ export type PatientDetailsStepProps = {
14
+ state: AppointmentState;
15
+ dispatch: React.Dispatch<AppointmentAction>;
16
+ onBack: () => void;
17
+ onSubmit: () => Promise<void>;
18
+ };
19
+ export type SuccessStepProps = {
20
+ state: AppointmentState;
21
+ onReset: () => void;
22
+ };
23
+ export type PhoneInputSectionProps = {
24
+ countryCode: string;
25
+ patientPhone: string;
26
+ onCountryCodeChange: (code: string) => void;
27
+ onPhoneChange: (phone: string) => void;
28
+ };
29
+ export type OtpInputSectionProps = {
30
+ countryCode: string;
31
+ patientPhone: string;
32
+ otpCode: string;
33
+ otpVerified: boolean;
34
+ onOtpChange: (code: string) => void;
35
+ };
36
+ export type PatientInfoSectionProps = {
37
+ state: AppointmentState;
38
+ dispatch: React.Dispatch<AppointmentAction>;
39
+ };
40
+ export type AddressInfoSectionProps = {
41
+ state: AppointmentState;
42
+ dispatch: React.Dispatch<AppointmentAction>;
43
+ };
44
+ export interface AppointmentState {
45
+ step: number;
46
+ loading: boolean;
47
+ error: string | null;
48
+ workspaceId: number | null;
49
+ addresses: AddressItem[];
50
+ addressDoctorsMap: Record<number, Doctor[]>;
51
+ selectedAddress: number | null;
52
+ selectedDoctor: number | null;
53
+ selectedDate: Date;
54
+ slots: Slot[];
55
+ selectedSlot: Slot | null;
56
+ consultationMode: "ONLINE" | "OFFLINE";
57
+ consultationCharge: string;
58
+ patientName: string;
59
+ patientAge: string;
60
+ patientEmail: string;
61
+ patientGender: string;
62
+ bloodGroup: string;
63
+ patientAddress: string;
64
+ patientCity: string;
65
+ patientState: string;
66
+ patientCountry: string;
67
+ patientZipcode: string;
68
+ patientLandmark: string;
69
+ countryCode: string;
70
+ patientPhone: string;
71
+ otpCode: string;
72
+ otpSent: boolean;
73
+ otpVerified: boolean;
74
+ otpSending: boolean;
75
+ otpVerifying: boolean;
76
+ }
77
+ export type AppointmentAction = {
78
+ type: "SET_STEP";
79
+ payload: number;
80
+ } | {
81
+ type: "SET_LOADING";
82
+ payload: boolean;
83
+ } | {
84
+ type: "SET_ERROR";
85
+ payload: string | null;
86
+ } | {
87
+ type: "SET_WORKSPACE";
88
+ payload: {
89
+ id: number;
90
+ addresses: AddressItem[];
91
+ };
92
+ } | {
93
+ type: "SET_SELECTED_ADDRESS";
94
+ payload: number | null;
95
+ } | {
96
+ type: "SET_SELECTED_DOCTOR";
97
+ payload: number | null;
98
+ } | {
99
+ type: "SET_SELECTED_DATE";
100
+ payload: Date;
101
+ } | {
102
+ type: "SET_SLOTS";
103
+ payload: Slot[];
104
+ } | {
105
+ type: "SET_SELECTED_SLOT";
106
+ payload: Slot | null;
107
+ } | {
108
+ type: "SET_CONSULTATION_MODE";
109
+ payload: "ONLINE" | "OFFLINE";
110
+ } | {
111
+ type: "SET_CONSULTATION_CHARGE";
112
+ payload: string;
113
+ } | {
114
+ type: "SET_PATIENT_NAME";
115
+ payload: string;
116
+ } | {
117
+ type: "SET_PATIENT_AGE";
118
+ payload: string;
119
+ } | {
120
+ type: "SET_PATIENT_EMAIL";
121
+ payload: string;
122
+ } | {
123
+ type: "SET_PATIENT_GENDER";
124
+ payload: string;
125
+ } | {
126
+ type: "SET_BLOOD_GROUP";
127
+ payload: string;
128
+ } | {
129
+ type: "SET_PATIENT_ADDRESS";
130
+ payload: string;
131
+ } | {
132
+ type: "SET_PATIENT_CITY";
133
+ payload: string;
134
+ } | {
135
+ type: "SET_PATIENT_STATE";
136
+ payload: string;
137
+ } | {
138
+ type: "SET_PATIENT_COUNTRY";
139
+ payload: string;
140
+ } | {
141
+ type: "SET_PATIENT_ZIPCODE";
142
+ payload: string;
143
+ } | {
144
+ type: "SET_PATIENT_LANDMARK";
145
+ payload: string;
146
+ } | {
147
+ type: "SET_COUNTRY_CODE";
148
+ payload: string;
149
+ } | {
150
+ type: "SET_PATIENT_PHONE";
151
+ payload: string;
152
+ } | {
153
+ type: "SET_OTP_CODE";
154
+ payload: string;
155
+ } | {
156
+ type: "SET_OTP_SENT";
157
+ payload: boolean;
158
+ } | {
159
+ type: "SET_OTP_VERIFIED";
160
+ payload: boolean;
161
+ } | {
162
+ type: "SET_OTP_SENDING";
163
+ payload: boolean;
164
+ } | {
165
+ type: "SET_OTP_VERIFYING";
166
+ payload: boolean;
167
+ } | {
168
+ type: "RESET_FORM";
169
+ };
170
+ export declare const COUNTRY_CODES: {
171
+ code: string;
172
+ label: string;
173
+ }[];
174
+ export declare const GENDER_OPTIONS: {
175
+ value: string;
176
+ label: string;
177
+ }[];
178
+ export declare const BLOOD_GROUP_OPTIONS: {
179
+ value: string;
180
+ label: string;
181
+ }[];
182
+ export declare const INITIAL_STATE: AppointmentState;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
3
+ children: React.ReactNode;
4
+ }
5
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
6
+ export interface SelectOptionProps extends React.OptionHTMLAttributes<HTMLOptionElement> {
7
+ children: React.ReactNode;
8
+ }
9
+ declare const SelectOption: React.ForwardRefExoticComponent<SelectOptionProps & React.RefAttributes<HTMLOptionElement>>;
10
+ export { Select, SelectOption };
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ interface SelectProps {
3
+ children: React.ReactNode;
4
+ value?: string;
5
+ onValueChange?: (value: string) => void;
6
+ defaultValue?: string;
7
+ disabled?: boolean;
8
+ }
9
+ interface SelectTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
10
+ children: React.ReactNode;
11
+ className?: string;
12
+ error?: boolean;
13
+ }
14
+ interface SelectValueProps {
15
+ placeholder?: string;
16
+ }
17
+ interface SelectContentProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ children: React.ReactNode;
19
+ className?: string;
20
+ }
21
+ interface SelectItemProps extends React.HTMLAttributes<HTMLDivElement> {
22
+ children: React.ReactNode;
23
+ value: string;
24
+ className?: string;
25
+ disabled?: boolean;
26
+ }
27
+ interface BaseComponentProps {
28
+ children: React.ReactNode;
29
+ className?: string;
30
+ }
31
+ declare const Select: React.FC<SelectProps>;
32
+ declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
33
+ declare const SelectValue: React.FC<SelectValueProps>;
34
+ declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
35
+ declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
36
+ declare const SelectGroup: React.FC<BaseComponentProps>;
37
+ declare const SelectLabel: React.FC<BaseComponentProps>;
38
+ declare const SelectSeparator: React.FC<{
39
+ className?: string;
40
+ }>;
41
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, };
@@ -0,0 +1,5 @@
1
+ export declare const formatDateToISO: (date: Date) => string;
2
+ export declare const parsePatientName: (fullName: string) => {
3
+ firstName: string;
4
+ lastName: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ export declare const validatePhoneNumber: (phone: string) => boolean;
2
+ export declare const validateCountryCode: (code: string) => boolean;
@@ -0,0 +1,12 @@
1
+ import React, { ReactNode } from "react";
2
+ import type { TemplateId } from "../core";
3
+ interface TemplateContextType {
4
+ templateId: TemplateId;
5
+ }
6
+ export interface TemplateProviderProps {
7
+ templateId: TemplateId;
8
+ children: ReactNode;
9
+ }
10
+ export declare const TemplateProvider: React.FC<TemplateProviderProps>;
11
+ export declare const useTemplate: () => TemplateContextType;
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { TemplateId } from "../core";
2
+ export declare function injectTemplateStyles(templateId: TemplateId): void;
3
+ export declare function removeTemplateStyles(): void;
@@ -1,5 +1,5 @@
1
1
  export type Doctor = {
2
- id: string;
2
+ id: number;
3
3
  name: string;
4
4
  specialty?: string;
5
5
  [key: string]: any;
@@ -58,7 +58,7 @@ type AppointmentPayload = {
58
58
  attachments?: File[];
59
59
  };
60
60
  type AddressItem = {
61
- id: number | string;
61
+ id: number;
62
62
  completeAddress?: string;
63
63
  label?: string;
64
64
  address?: string;
@@ -67,7 +67,6 @@ type AddressItem = {
67
67
  doctorsCount?: number;
68
68
  totalConfiguredAppointments?: number;
69
69
  doctors?: Doctor[];
70
- [key: string]: any;
71
70
  };
72
71
  type AddressesResponse = {
73
72
  totalAddresses?: number;
@@ -75,12 +74,12 @@ type AddressesResponse = {
75
74
  totalConfiguredAppointments?: number;
76
75
  totalPartialConfiguredAppointments?: number;
77
76
  totalNotConfiguredAppointments?: number;
78
- workspaceId?: number | string;
77
+ workspaceId?: number;
79
78
  addresses: AddressItem[];
80
79
  };
81
80
  declare const AppointmentService: {
82
81
  getAddresses(): Promise<AddressesResponse>;
83
- fetchSlots(workspaceId: string | number, addressId: string | number, doctorId: string | number, appointmentDate: string): Promise<Slot[]>;
82
+ fetchSlots(workspaceId: number, addressId: number, doctorId: number, appointmentDate: string): Promise<Slot[]>;
84
83
  createAppointment(payload: BookAppointmentPayload): Promise<any>;
85
84
  };
86
85
  export { AppointmentService, AppointmentPayload, BookAppointmentPayload, PatientPayload, PatientAddressPayload, AddressesResponse, AddressItem, };
@@ -0,0 +1,13 @@
1
+ /* Alternative Green Template */
2
+
3
+ :root {
4
+ --medos-primary-color: #10b981;
5
+ --medos-secondary-color: #d1fae5;
6
+ --medos-accent-color: #059669;
7
+ --medos-background-color: #f0fdf4;
8
+ --medos-text-color: #1f2937;
9
+ --medos-border-color: #d1d5db;
10
+ --medos-muted-text: #6b7280;
11
+ --medos-success-color: #059669;
12
+ --medos-error-color: #dc2626;
13
+ }
@@ -0,0 +1,13 @@
1
+ /* Default Blue Template */
2
+
3
+ :root {
4
+ --medos-primary-color: #0b79f7;
5
+ --medos-secondary-color: #eef2ff;
6
+ --medos-accent-color: #0b79f7;
7
+ --medos-background-color: #f6f8fa;
8
+ --medos-text-color: #333;
9
+ --medos-border-color: #e6e9ef;
10
+ --medos-muted-text: #6b7280;
11
+ --medos-success-color: #10b981;
12
+ --medos-error-color: #ef4444;
13
+ }
@@ -0,0 +1,12 @@
1
+ import type { TemplateId, TemplateConfig } from "../core";
2
+ export declare class TemplateRegistry {
3
+ private static instance;
4
+ private readonly templates;
5
+ private constructor();
6
+ static getInstance(): TemplateRegistry;
7
+ getTemplate(id: TemplateId): TemplateConfig;
8
+ getAllTemplates(): Record<TemplateId, TemplateConfig>;
9
+ hasTemplate(id: TemplateId): boolean;
10
+ private initializeTemplates;
11
+ }
12
+ export declare const templateRegistry: TemplateRegistry;
@@ -10,44 +10,13 @@ declare class AppointmentCalendarWidget {
10
10
  private container;
11
11
  private options;
12
12
  private mounted;
13
- private step;
14
- private addresses;
15
- private addressDoctorsMap;
16
- private selectedAddress;
17
- private workspaceId;
13
+ private state;
18
14
  private doctors;
19
- private selectedDoctor;
20
- private date;
21
- private slots;
22
- private selectedSlot;
23
- private loading;
24
- private error;
25
- private patientName;
26
- private patientAge;
27
- private patientAddress;
28
- private patientCity;
29
- private patientState;
30
- private patientCountry;
31
- private patientZipcode;
32
- private patientLandmark;
33
- private patientEmail;
34
- private patientGender;
35
- private problemFacing;
36
- private consultationCharge;
37
- private countryCode;
38
- private patientPhone;
39
- private otpCode;
40
- private otpSent;
41
- private otpVerified;
42
- private otpSending;
43
- private otpVerifying;
44
15
  constructor(container: HTMLElement | string, options: AppointmentCalendarWidgetOptions);
45
16
  private init;
46
17
  private loadAddresses;
47
18
  private handleAddressChange;
48
19
  private loadSlots;
49
- private validatePhoneNumber;
50
- private validateCountryCode;
51
20
  private canProceedFromMergedStep;
52
21
  private sendOtp;
53
22
  private verifyOtp;
@@ -55,8 +24,7 @@ declare class AppointmentCalendarWidget {
55
24
  private goToNext;
56
25
  private goBack;
57
26
  private reset;
58
- private setLoading;
59
- private setError;
27
+ private setState;
60
28
  private render;
61
29
  private renderStep;
62
30
  private renderStep0;