medos-sdk 1.1.7 → 1.1.8

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 (27) hide show
  1. package/dist/components/SuccessStep.js +1 -1
  2. package/dist/vanilla/AppointmentCalendarWidget.d.ts +8 -0
  3. package/dist/vanilla/AppointmentCalendarWidget.js +463 -158
  4. package/dist/vanilla/EnquiryFormWidget.d.ts +2 -0
  5. package/dist/vanilla/EnquiryFormWidget.js +155 -100
  6. package/dist/vanilla/components/VanillaCalendar.d.ts +32 -0
  7. package/dist/vanilla/components/VanillaCalendar.js +366 -0
  8. package/dist/vanilla/components/VanillaIcons.d.ts +17 -0
  9. package/dist/vanilla/components/VanillaIcons.js +268 -0
  10. package/dist/vanilla/components/VanillaSelect.d.ts +46 -0
  11. package/dist/vanilla/components/VanillaSelect.js +523 -0
  12. package/dist/vanilla/components/index.d.ts +3 -0
  13. package/dist/vanilla/components/index.js +3 -0
  14. package/dist/vanilla/components/theme-injector.d.ts +1 -0
  15. package/dist/vanilla/components/theme-injector.js +447 -0
  16. package/dist/vanilla/enquiry-widget.js +1366 -100
  17. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +8 -0
  18. package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +2 -0
  19. package/dist/vanilla/vanilla/components/VanillaCalendar.d.ts +32 -0
  20. package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +17 -0
  21. package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +46 -0
  22. package/dist/vanilla/vanilla/components/index.d.ts +3 -0
  23. package/dist/vanilla/vanilla/components/theme-injector.d.ts +1 -0
  24. package/dist/vanilla/vanilla/widget.d.ts +2 -0
  25. package/dist/vanilla/widget.d.ts +2 -0
  26. package/dist/vanilla/widget.js +2213 -257
  27. package/package.json +1 -1
@@ -12,12 +12,19 @@ declare class AppointmentCalendarWidget {
12
12
  private mounted;
13
13
  private state;
14
14
  private doctors;
15
+ private addressSelect;
16
+ private doctorSelect;
17
+ private calendar;
18
+ private countryCodeSelect;
19
+ private genderSelect;
20
+ private bloodGroupSelect;
15
21
  constructor(container: HTMLElement | string, options: AppointmentCalendarWidgetOptions);
16
22
  private init;
17
23
  private loadAddresses;
18
24
  private handleAddressChange;
19
25
  private loadSlots;
20
26
  private canProceedFromMergedStep;
27
+ private updateSubmitButtonState;
21
28
  private sendOtp;
22
29
  private verifyOtp;
23
30
  private submitAppointment;
@@ -26,6 +33,7 @@ declare class AppointmentCalendarWidget {
26
33
  private reset;
27
34
  private setState;
28
35
  private render;
36
+ private initializeCustomComponents;
29
37
  private renderStep;
30
38
  private renderStep0;
31
39
  private renderStep1;
@@ -12,6 +12,7 @@ declare class EnquiryFormWidget {
12
12
  private options;
13
13
  private mounted;
14
14
  private state;
15
+ private countryCodeSelect;
15
16
  constructor(container: HTMLElement | string, options: EnquiryFormWidgetOptions);
16
17
  private init;
17
18
  private validateContactStep;
@@ -22,6 +23,7 @@ declare class EnquiryFormWidget {
22
23
  private resetForm;
23
24
  private setState;
24
25
  private render;
26
+ private initializeCustomComponents;
25
27
  private renderStep;
26
28
  private renderStep0;
27
29
  private renderStep1;
@@ -0,0 +1,32 @@
1
+ export interface VanillaCalendarOptions {
2
+ pastDisabled?: boolean;
3
+ onSelect?: (date: Date) => void;
4
+ selectedDate?: Date;
5
+ }
6
+ export declare class VanillaCalendar {
7
+ private container;
8
+ private config;
9
+ private currentMonth;
10
+ private currentYear;
11
+ private selectedDate;
12
+ private today;
13
+ private static readonly DAYS_OF_WEEK;
14
+ private static readonly MONTHS;
15
+ constructor(container: HTMLElement | string, config?: VanillaCalendarOptions);
16
+ private getDaysInMonth;
17
+ private getFirstDayOfMonth;
18
+ private isSameDate;
19
+ private isBeforeToday;
20
+ private render;
21
+ private attachEventListeners;
22
+ private prevMonth;
23
+ private nextMonth;
24
+ private selectDate;
25
+ setSelectedDate(date: Date | null): void;
26
+ getSelectedDate(): Date | null;
27
+ goToDate(date: Date): void;
28
+ goToToday(): void;
29
+ setPastDisabled(disabled: boolean): void;
30
+ destroy(): void;
31
+ }
32
+ export default VanillaCalendar;
@@ -0,0 +1,17 @@
1
+ export declare const VanillaIcons: {
2
+ chevronLeft: (size?: number, className?: string) => string;
3
+ chevronRight: (size?: number, className?: string) => string;
4
+ chevronDown: (size?: number, className?: string) => string;
5
+ check: (size?: number, className?: string) => string;
6
+ consultationType: (size?: number) => string;
7
+ dateTime: (size?: number) => string;
8
+ mapPin: (size?: number) => string;
9
+ user: (size?: number) => string;
10
+ paymentMethod: (size?: number) => string;
11
+ successBadge: (size?: number, shapeColor?: string, checkColor?: string) => string;
12
+ phone: (size?: number) => string;
13
+ mail: (size?: number) => string;
14
+ clock: (size?: number) => string;
15
+ medosLogo: (width?: number, height?: number) => string;
16
+ };
17
+ export default VanillaIcons;
@@ -0,0 +1,46 @@
1
+ export interface SelectOption {
2
+ value: string;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ export interface VanillaSelectOptions {
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ error?: boolean;
10
+ onValueChange?: (value: string) => void;
11
+ }
12
+ export declare class VanillaSelect {
13
+ private readonly container;
14
+ private options;
15
+ private readonly config;
16
+ private selectedValue;
17
+ private selectedLabel;
18
+ private isOpen;
19
+ private triggerElement;
20
+ private contentElement;
21
+ private handleDocumentClick;
22
+ private handleWindowResize;
23
+ private handleWindowScroll;
24
+ constructor(container: HTMLElement | string, options: SelectOption[], config?: VanillaSelectOptions);
25
+ private renderTrigger;
26
+ private attachTriggerEvents;
27
+ private toggleOpen;
28
+ private open;
29
+ private close;
30
+ private createPortal;
31
+ private removePortal;
32
+ private updatePosition;
33
+ private attachPortalEvents;
34
+ private detachPortalEvents;
35
+ private focusNextItem;
36
+ private selectValue;
37
+ setValue(value: string): void;
38
+ getValue(): string;
39
+ setOptions(options: SelectOption[]): void;
40
+ setDisabled(disabled: boolean): void;
41
+ setError(error: boolean): void;
42
+ destroy(): void;
43
+ private escapeHtml;
44
+ }
45
+ export declare function upgradeNativeSelect(selectElement: HTMLSelectElement, config?: VanillaSelectOptions): VanillaSelect;
46
+ export default VanillaSelect;
@@ -0,0 +1,3 @@
1
+ export { VanillaIcons } from "./VanillaIcons";
2
+ export { VanillaSelect, upgradeNativeSelect, type SelectOption, type VanillaSelectOptions, } from "./VanillaSelect";
3
+ export { VanillaCalendar, type VanillaCalendarOptions, } from "./VanillaCalendar";
@@ -0,0 +1 @@
1
+ export declare function injectThemedStyles(): void;
@@ -10,6 +10,8 @@ declare global {
10
10
  init: typeof initEnquiryForm;
11
11
  Widget: typeof EnquiryFormWidget;
12
12
  };
13
+ MedosAppointmentWidget: typeof AppointmentCalendarWidget;
14
+ MedosEnquiryWidget: typeof EnquiryFormWidget;
13
15
  }
14
16
  }
15
17
  export { initAppointmentCalendar, AppointmentCalendarWidget, initEnquiryForm, EnquiryFormWidget, };
@@ -10,6 +10,8 @@ declare global {
10
10
  init: typeof initEnquiryForm;
11
11
  Widget: typeof EnquiryFormWidget;
12
12
  };
13
+ MedosAppointmentWidget: typeof AppointmentCalendarWidget;
14
+ MedosEnquiryWidget: typeof EnquiryFormWidget;
13
15
  }
14
16
  }
15
17
  export { initAppointmentCalendar, AppointmentCalendarWidget, initEnquiryForm, EnquiryFormWidget, };