mn-angular-lib 2.0.58 → 2.0.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "2.0.58",
3
+ "version": "2.0.60",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.1.7",
6
6
  "@angular/core": "^22.1.7",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type, ViewContainerRef } from "@angular/core";
2
+ import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type, ViewContainerRef } from "@angular/core";
3
3
  import { BehaviorSubject, Observable, Subject } from "rxjs";
4
4
  import { CalendarButton, CalendarConfig, CalendarEvent, CalendarEventData, CalendarView, ColumnDay, HourRow, MonthItem } from "mn-angular-lib/calendar-core";
5
5
  /**
@@ -156,7 +156,9 @@ type DisplayHourRow$1 = {
156
156
  * Overlapping events within the same day are laid out in sub-columns
157
157
  * so they appear side-by-side rather than stacked.
158
158
  */
159
- export declare class CalendarWeekComponent implements OnInit, OnDestroy {
159
+ export declare class CalendarWeekComponent implements OnInit, AfterViewInit, OnDestroy {
160
+ /** Fixed half-hour row height (px) matching the template `1.5rem` rows. */
161
+ static readonly ROW_HEIGHT_PX = 24;
160
162
  private readonly lang;
161
163
  /**
162
164
  * Accessible name for this control. Resolved through the conventional
@@ -166,6 +168,17 @@ export declare class CalendarWeekComponent implements OnInit, OnDestroy {
166
168
  get weekViewLabel(): string;
167
169
  private layoutService;
168
170
  private cdr;
171
+ /** Scrollable week body — vertical scroll for the full hour range (R7QVk8rz). */
172
+ bodyScroller?: ElementRef<HTMLElement>;
173
+ /**
174
+ * True from open / a date change until that week's first events batch lands,
175
+ * which then decides the initial scroll; later batches leave the user's scroll alone.
176
+ * An empty batch does not count: the host replays its last (often still empty) list on
177
+ * subscribe, before the real load lands.
178
+ */
179
+ private pendingInitialScroll;
180
+ /** The user scrolled (wheel, touch, scrollbar) before events landed: keep their position. */
181
+ onUserScrollIntent(): void;
169
182
  /** The date around which the week is centred. */
170
183
  focusDay: Date;
171
184
  /** Observable that emits the full event list whenever it changes. */
@@ -195,6 +208,7 @@ export declare class CalendarWeekComponent implements OnInit, OnDestroy {
195
208
  private currentTimeInterval?;
196
209
  constructor();
197
210
  ngOnInit(): void;
211
+ ngAfterViewInit(): void;
198
212
  ngOnDestroy(): void;
199
213
  /** Returns the CSS `grid-row` value for an event based on its start/end times. */
200
214
  getEventRow(event: CalendarEvent): string;
@@ -215,6 +229,13 @@ export declare class CalendarWeekComponent implements OnInit, OnDestroy {
215
229
  private buildColumns;
216
230
  /** Filters, splits, and lays out events for the current week. */
217
231
  private refreshEvents;
232
+ /**
233
+ * Scrolls the body to the current hour (when today is in the week) or the first
234
+ * event (SuperBottie option 1 / R7QVk8rz).
235
+ */
236
+ scrollToInitialRow(): void;
237
+ /** 1-based grid row to land on: now-line, else earliest event, else top. */
238
+ private resolveInitialScrollRow;
218
239
  /** Computes the CSS grid-template-columns string based on per-day sub-column counts. */
219
240
  private buildGridColumns;
220
241
  /** Updates the current-time red line position. */
@@ -255,7 +276,9 @@ type DisplayHourRow = {
255
276
  * Shares the same layout algorithm as the week view via
256
277
  * {@link CalendarEventLayoutService}.
257
278
  */
258
- export declare class CalendarDayComponent implements OnInit, OnDestroy {
279
+ export declare class CalendarDayComponent implements OnInit, AfterViewInit, OnDestroy {
280
+ /** Fixed half-hour row height (px) matching the template `1.5rem` rows. */
281
+ static readonly ROW_HEIGHT_PX = 24;
259
282
  private readonly lang;
260
283
  /**
261
284
  * Accessible name for this control. Resolved through the conventional
@@ -265,6 +288,17 @@ export declare class CalendarDayComponent implements OnInit, OnDestroy {
265
288
  get dayViewLabel(): string;
266
289
  private layoutService;
267
290
  private cdr;
291
+ /** Scrollable day body — vertical scroll for the full hour range (R7QVk8rz). */
292
+ bodyScroller?: ElementRef<HTMLElement>;
293
+ /**
294
+ * True from open / a date change until that date's first events batch lands,
295
+ * which then decides the initial scroll; later batches leave the user's scroll alone.
296
+ * An empty batch does not count: the host replays its last (often still empty) list on
297
+ * subscribe, before the real load lands.
298
+ */
299
+ private pendingInitialScroll;
300
+ /** The user scrolled (wheel, touch, scrollbar) before events landed: keep their position. */
301
+ onUserScrollIntent(): void;
268
302
  /** The date to display. */
269
303
  focusDay: Date;
270
304
  /** Observable that emits the full event list whenever it changes. */
@@ -293,6 +327,7 @@ export declare class CalendarDayComponent implements OnInit, OnDestroy {
293
327
  private currentTimeInterval?;
294
328
  constructor();
295
329
  ngOnInit(): void;
330
+ ngAfterViewInit(): void;
296
331
  ngOnDestroy(): void;
297
332
  /** Returns the CSS `grid-row` value for an event. */
298
333
  getEventRow(event: CalendarEvent): string;
@@ -309,6 +344,13 @@ export declare class CalendarDayComponent implements OnInit, OnDestroy {
309
344
  private updateDayInfo;
310
345
  /** Filters, splits, and lays out events for the focus day. */
311
346
  private refreshEvents;
347
+ /**
348
+ * Scrolls the body to the current hour (today) or the first event so evening
349
+ * slots are one scroll away instead of clipped (SuperBottie option 1 / R7QVk8rz).
350
+ */
351
+ scrollToInitialRow(): void;
352
+ /** 1-based grid row to land on: now-line, else earliest event, else top. */
353
+ private resolveInitialScrollRow;
312
354
  /** Updates the current-time red line position. */
313
355
  private updateCurrentTime;
314
356
  static ɵfac: i0.ɵɵFactoryDeclaration<CalendarDayComponent, never>;
@@ -582,6 +582,11 @@ export type MnCheckboxProps = {
582
582
  name?: string;
583
583
  /** Label text displayed next to the checkbox */
584
584
  label?: string;
585
+ /**
586
+ * Accessible name when there is no visible label (e.g. a table selection cell).
587
+ * Prefer this over a visible `label` when the control must stay compact (cVNWtAqj).
588
+ */
589
+ ariaLabel?: string;
585
590
  /** Size variant of the checkbox (default: 'md') */
586
591
  size?: MnCheckboxVariants['size'];
587
592
  /** Color variant of the checkbox (default: 'primary') */