nexheal-lib 0.0.36 → 0.0.38

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/index.d.ts CHANGED
@@ -72,6 +72,14 @@ declare class AutocompleteControl implements ControlValueAccessor, OnInit, OnDes
72
72
  }
73
73
 
74
74
  type ViewMode = "day" | "month" | "yearRange";
75
+ interface CalendarCell {
76
+ date: Date;
77
+ day: number;
78
+ otherMonth: boolean;
79
+ disabled: boolean;
80
+ selected: boolean;
81
+ today: boolean;
82
+ }
75
83
  declare class CalendarControl implements ControlValueAccessor, OnInit, OnDestroy {
76
84
  datePipe: DatePipe;
77
85
  title: string;
@@ -135,13 +143,6 @@ declare class CalendarControl implements ControlValueAccessor, OnInit, OnDestroy
135
143
  todayDate: number;
136
144
  selectedHour: number;
137
145
  selectedMinute: number;
138
- dayClassMap: {
139
- [day: number]: {
140
- disabled: boolean;
141
- selected: boolean;
142
- today: boolean;
143
- };
144
- };
145
146
  inputVal: string | null;
146
147
  yearRangeSize: number;
147
148
  currentView: ViewMode;
@@ -159,8 +160,8 @@ declare class CalendarControl implements ControlValueAccessor, OnInit, OnDestroy
159
160
  onFocus(): void;
160
161
  setDisabledState(isDisabled: boolean): void;
161
162
  onInputKeydown(event: KeyboardEvent): void;
162
- selectDay(day: number | null): void;
163
- get daysInMonth(): (number | null)[];
163
+ selectDay(cell: CalendarCell | null): void;
164
+ get daysInMonth(): CalendarCell[];
164
165
  parseDate(val: any): Date | null;
165
166
  formatOutput(date: Date): string;
166
167
  isSelectedDay(day: number | null): boolean;
@@ -170,9 +171,11 @@ declare class CalendarControl implements ControlValueAccessor, OnInit, OnDestroy
170
171
  private getWeekRange;
171
172
  private formatWeek;
172
173
  private isWithin;
173
- isInHoverWeek(day: number | null): boolean;
174
- onDayHover(day: number | null): void;
174
+ isInHoverWeek(date: Date): boolean;
175
+ onDayHover(cell: CalendarCell): void;
175
176
  onDayLeave(): void;
177
+ /** Stable identity for day cells so they aren't re-created every change-detection. */
178
+ trackByDate: (_: number, cell: CalendarCell) => number;
176
179
  goToMonthView(): void;
177
180
  months: string[];
178
181
  selectMonth(index: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexheal-lib",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"