mn-angular-lib 2.0.34 → 2.0.35
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/fesm2022/mn-angular-lib-alert.mjs +515 -527
- package/fesm2022/mn-angular-lib-alert.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs +264 -357
- package/fesm2022/mn-angular-lib-bottom-sheet.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-button.mjs +819 -382
- package/fesm2022/mn-angular-lib-button.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar-core.mjs +240 -365
- package/fesm2022/mn-angular-lib-calendar-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-calendar.mjs +1691 -1545
- package/fesm2022/mn-angular-lib-calendar.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-collection.mjs +2367 -2796
- package/fesm2022/mn-angular-lib-collection.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-core.mjs +693 -1241
- package/fesm2022/mn-angular-lib-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-display.mjs +679 -712
- package/fesm2022/mn-angular-lib-display.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-forms.mjs +3671 -4647
- package/fesm2022/mn-angular-lib-forms.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-keyboard.mjs +221 -190
- package/fesm2022/mn-angular-lib-keyboard.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-core.mjs +711 -896
- package/fesm2022/mn-angular-lib-modal-core.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal-ui.mjs +2089 -2035
- package/fesm2022/mn-angular-lib-modal-ui.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-modal.mjs +76 -121
- package/fesm2022/mn-angular-lib-modal.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs +289 -277
- package/fesm2022/mn-angular-lib-rich-text-editor.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-segmented.mjs +189 -241
- package/fesm2022/mn-angular-lib-segmented.mjs.map +1 -1
- package/fesm2022/mn-angular-lib-tab.mjs +409 -642
- package/fesm2022/mn-angular-lib-tab.mjs.map +1 -1
- package/fesm2022/mn-angular-lib.mjs +16 -29
- package/package.json +1 -1
- package/types/mn-angular-lib-alert.d.ts +239 -241
- package/types/mn-angular-lib-bottom-sheet.d.ts +190 -150
- package/types/mn-angular-lib-button.d.ts +319 -317
- package/types/mn-angular-lib-calendar-core.d.ts +199 -209
- package/types/mn-angular-lib-calendar.d.ts +656 -511
- package/types/mn-angular-lib-collection.d.ts +1649 -1585
- package/types/mn-angular-lib-core.d.ts +524 -535
- package/types/mn-angular-lib-display.d.ts +946 -886
- package/types/mn-angular-lib-forms.d.ts +3012 -3013
- package/types/mn-angular-lib-keyboard.d.ts +125 -85
- package/types/mn-angular-lib-modal-core.d.ts +978 -994
- package/types/mn-angular-lib-modal-ui.d.ts +541 -493
- package/types/mn-angular-lib-modal.d.ts +24 -27
- package/types/mn-angular-lib-rich-text-editor.d.ts +131 -98
- package/types/mn-angular-lib-segmented.d.ts +354 -341
- package/types/mn-angular-lib-tab.d.ts +345 -336
- package/types/mn-angular-lib.d.ts +16 -16
- package/fesm2022/mn-angular-lib.mjs.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { MnButtonTypes } from
|
|
4
|
-
import { Observable } from
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { InjectionToken, Type } from "@angular/core";
|
|
3
|
+
import { MnButtonTypes } from "mn-angular-lib/button";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
6
5
|
/**
|
|
7
6
|
* Colour scheme applied to calendar events.
|
|
8
7
|
*
|
|
@@ -10,16 +9,15 @@ import { Observable } from 'rxjs';
|
|
|
10
9
|
* background fill. Both should be valid CSS colour values.
|
|
11
10
|
*/
|
|
12
11
|
type ColorPreset = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
/** Unique identifier. */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Human-readable colour name (e.g. "Blue"). */
|
|
15
|
+
colorName: string;
|
|
16
|
+
/** Accent / border colour (e.g. "#3b82f6"). */
|
|
17
|
+
primaryColor: string;
|
|
18
|
+
/** Background fill colour (e.g. "#dbeafe"). */
|
|
19
|
+
secondaryColor: string;
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
/**
|
|
24
22
|
* Represents a single calendar event.
|
|
25
23
|
*
|
|
@@ -28,54 +26,53 @@ type ColorPreset = {
|
|
|
28
26
|
* computed by {@link CalendarEventLayoutService} and should not be set manually.
|
|
29
27
|
*/
|
|
30
28
|
type CalendarEvent = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
/** Unique identifier for the event. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Display title. */
|
|
32
|
+
title: string;
|
|
33
|
+
/** Optional description shown below the title. */
|
|
34
|
+
description: string;
|
|
35
|
+
/** Event start date/time. */
|
|
36
|
+
startTime: Date;
|
|
37
|
+
/** Event end date/time. */
|
|
38
|
+
endTime: Date;
|
|
39
|
+
/** Colour scheme used for rendering. */
|
|
40
|
+
color: ColorPreset;
|
|
41
|
+
/** Optional custom component type to render this event (overrides the default renderer). */
|
|
42
|
+
component?: Type<unknown>;
|
|
43
|
+
/** Arbitrary payload attached to the event (passed through to custom renderers). */
|
|
44
|
+
data?: unknown;
|
|
45
|
+
/** Zero-based column index within overlapping event groups. */
|
|
46
|
+
column?: number;
|
|
47
|
+
/** Number of sub-columns this event spans. */
|
|
48
|
+
width?: number;
|
|
49
|
+
/** `true` when this segment is a continuation from a previous day (multi-day events). */
|
|
50
|
+
continued?: boolean;
|
|
51
|
+
/** `true` when this segment continues into the next day (multi-day events). */
|
|
52
|
+
continuedEnd?: boolean;
|
|
55
53
|
};
|
|
56
54
|
/**
|
|
57
55
|
* Represents a button displayed in the calendar toolbar's top-right area.
|
|
58
56
|
*/
|
|
59
57
|
type CalendarButton = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
/** Display label for the button. */
|
|
59
|
+
label: string;
|
|
60
|
+
/** Button styling configuration passed to the mnButton directive. */
|
|
61
|
+
buttonData?: Partial<MnButtonTypes>;
|
|
62
|
+
/** Callback invoked when the button is clicked. */
|
|
63
|
+
onClick: () => void;
|
|
66
64
|
};
|
|
67
65
|
/**
|
|
68
66
|
* Represents the "current time" indicator rendered as a line in week/day views.
|
|
69
67
|
*/
|
|
70
68
|
type CurrentTimeCalendarEvent = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
id: 'current-time';
|
|
70
|
+
title: string;
|
|
71
|
+
startTime: Date;
|
|
72
|
+
endTime: Date;
|
|
73
|
+
column: number;
|
|
74
|
+
width: number;
|
|
77
75
|
};
|
|
78
|
-
|
|
79
76
|
/**
|
|
80
77
|
* Contract for pluggable event renderer components.
|
|
81
78
|
*
|
|
@@ -87,17 +84,16 @@ type CurrentTimeCalendarEvent = {
|
|
|
87
84
|
* dynamically via `ViewContainerRef.createComponent()`.
|
|
88
85
|
*/
|
|
89
86
|
type CalendarEventData = {
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
/** The calendar event to render. Set by the calendar after component creation. */
|
|
88
|
+
event: CalendarEvent;
|
|
92
89
|
};
|
|
93
|
-
|
|
94
90
|
/**
|
|
95
91
|
* Available calendar view modes.
|
|
96
92
|
*/
|
|
97
|
-
declare enum CalendarView {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
export declare enum CalendarView {
|
|
94
|
+
MONTH = "MONTH",
|
|
95
|
+
WEEK = "WEEK",
|
|
96
|
+
DAY = "DAY"
|
|
101
97
|
}
|
|
102
98
|
/**
|
|
103
99
|
* Configuration for the calendar component.
|
|
@@ -106,37 +102,37 @@ declare enum CalendarView {
|
|
|
106
102
|
* the `provideMnComponentConfig` helper using component name `'mn-calendar'`.
|
|
107
103
|
*/
|
|
108
104
|
type CalendarConfig = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
105
|
+
/** First visible hour in week/day views (0–23). Default: `7`. */
|
|
106
|
+
startHour: number;
|
|
107
|
+
/** Last visible hour in week/day views (1–24, exclusive). Default: `22`. */
|
|
108
|
+
endHour: number;
|
|
109
|
+
/** BCP 47 locale tag used for date/time formatting (e.g. `'en-US'`, `'nl-NL'`). Default: `'en-US'`. */
|
|
110
|
+
locale: string;
|
|
111
|
+
/** Label for the "Today" navigation button. Default: `'Today'`. */
|
|
112
|
+
todayLabel: string;
|
|
113
|
+
/** Placeholder for the toolbar's date picker. Default: `'Pick a date'`. */
|
|
114
|
+
pickDateLabel: string;
|
|
115
|
+
/** Accessible name for the toolbar's back arrow. Default: `'Previous'`. */
|
|
116
|
+
previousLabel: string;
|
|
117
|
+
/** Accessible name for the toolbar's forward arrow. Default: `'Next'`. */
|
|
118
|
+
nextLabel: string;
|
|
119
|
+
/** Title shown above the upcoming-events sidebar. Default: `'Upcoming events'`. */
|
|
120
|
+
upcomingEventsTitle: string;
|
|
121
|
+
/** Message shown when there are no upcoming events. Default: `'No upcoming events'`. */
|
|
122
|
+
noUpcomingEvents: string;
|
|
123
|
+
/** Word after the "+N" overflow count in a month cell — "+3 more". Default: `'more'`. */
|
|
124
|
+
moreEventsLabel: string;
|
|
125
|
+
/** Display labels for each calendar view mode. */
|
|
126
|
+
viewLabels: Record<string, string>;
|
|
127
|
+
/** Abbreviated day names starting from Monday (length 7). Derived from `locale` when not set. */
|
|
128
|
+
shortDayNames: string[];
|
|
129
|
+
/** Full day names starting from Monday (length 7). Derived from `locale` when not set. */
|
|
130
|
+
longDayNames: string[];
|
|
131
|
+
/** Screen-width breakpoint (px) below which only day view is shown. Default: `768`. */
|
|
132
|
+
mobileBreakpoint: number;
|
|
137
133
|
};
|
|
138
134
|
/** Default calendar configuration values. */
|
|
139
|
-
declare const DEFAULT_CALENDAR_CONFIG: CalendarConfig;
|
|
135
|
+
export declare const DEFAULT_CALENDAR_CONFIG: CalendarConfig;
|
|
140
136
|
/**
|
|
141
137
|
* Injection token for the resolved calendar configuration.
|
|
142
138
|
*
|
|
@@ -151,7 +147,7 @@ declare const DEFAULT_CALENDAR_CONFIG: CalendarConfig;
|
|
|
151
147
|
* ]
|
|
152
148
|
* ```
|
|
153
149
|
*/
|
|
154
|
-
declare const CALENDAR_CONFIG: InjectionToken<CalendarConfig>;
|
|
150
|
+
export declare const CALENDAR_CONFIG: InjectionToken<CalendarConfig>;
|
|
155
151
|
/**
|
|
156
152
|
* Injection token resolved via `MnConfigService` (the `mn-config.json5` system).
|
|
157
153
|
*
|
|
@@ -176,9 +172,9 @@ declare const CALENDAR_CONFIG: InjectionToken<CalendarConfig>;
|
|
|
176
172
|
* }
|
|
177
173
|
* ```
|
|
178
174
|
*/
|
|
179
|
-
declare const MN_CALENDAR_CONFIG: InjectionToken<CalendarConfig>;
|
|
175
|
+
export declare const MN_CALENDAR_CONFIG: InjectionToken<CalendarConfig>;
|
|
180
176
|
/** Component name used to look up calendar settings in `mn-config.json5`. */
|
|
181
|
-
declare const MN_CALENDAR_COMPONENT_NAME = "mn-calendar";
|
|
177
|
+
export declare const MN_CALENDAR_COMPONENT_NAME = "mn-calendar";
|
|
182
178
|
/**
|
|
183
179
|
* Provider helper that wires the calendar into the `mn-config` system.
|
|
184
180
|
*
|
|
@@ -188,51 +184,50 @@ declare const MN_CALENDAR_COMPONENT_NAME = "mn-calendar";
|
|
|
188
184
|
*
|
|
189
185
|
* @param initial — optional partial defaults merged before config-file values.
|
|
190
186
|
*/
|
|
191
|
-
declare function provideMnCalendarConfig(initial?: Partial<CalendarConfig>):
|
|
187
|
+
export declare function provideMnCalendarConfig(initial?: Partial<CalendarConfig>): import("@angular/core").Provider;
|
|
192
188
|
/**
|
|
193
189
|
* Merges a partial config with defaults, re-deriving day names from locale when needed.
|
|
194
190
|
*/
|
|
195
|
-
declare function resolveCalendarConfig(partial?: Partial<CalendarConfig>): CalendarConfig;
|
|
191
|
+
export declare function resolveCalendarConfig(partial?: Partial<CalendarConfig>): CalendarConfig;
|
|
196
192
|
/**
|
|
197
193
|
* Represents a half-hour row in the week/day time grid.
|
|
198
194
|
*/
|
|
199
195
|
type HourRow = {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
/** The hour value (e.g. 7, 8, …). */
|
|
197
|
+
hour: number;
|
|
198
|
+
/** CSS grid row start (1-based). */
|
|
199
|
+
topRow: number;
|
|
200
|
+
/** CSS grid row end (1-based, exclusive). */
|
|
201
|
+
bottomRow: number;
|
|
206
202
|
};
|
|
207
203
|
/**
|
|
208
204
|
* Represents a single day column in the week view header.
|
|
209
205
|
*/
|
|
210
206
|
type ColumnDay = {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
207
|
+
/** The date this column represents. */
|
|
208
|
+
date: Date;
|
|
209
|
+
/** Abbreviated day name (e.g. "Mon"). */
|
|
210
|
+
dayName: string;
|
|
211
|
+
/** Day-of-month number (1–31). */
|
|
212
|
+
dayNumber: number;
|
|
213
|
+
/** Whether this column is today. */
|
|
214
|
+
isToday: boolean;
|
|
219
215
|
};
|
|
220
216
|
/**
|
|
221
217
|
* Represents a single cell in the month grid.
|
|
222
218
|
*/
|
|
223
219
|
type MonthItem = {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
220
|
+
/** The date this cell represents. */
|
|
221
|
+
date: Date;
|
|
222
|
+
/** Day-of-month number (1–31). */
|
|
223
|
+
dayNumber: number;
|
|
224
|
+
/** Whether this date belongs to the currently focused month. */
|
|
225
|
+
isCurrentMonth: boolean;
|
|
226
|
+
/** Whether this date is today. */
|
|
227
|
+
isToday: boolean;
|
|
228
|
+
/** Events occurring on this date. */
|
|
229
|
+
events: CalendarEvent[];
|
|
234
230
|
};
|
|
235
|
-
|
|
236
231
|
/**
|
|
237
232
|
* Abstraction for date/time formatting used by calendar components.
|
|
238
233
|
*
|
|
@@ -244,20 +239,20 @@ type MonthItem = {
|
|
|
244
239
|
* moved to {@link CalendarConfig} so they can be configured declaratively.
|
|
245
240
|
*/
|
|
246
241
|
type CalendarDateFormatter = {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
242
|
+
/** Formats an hour + minute pair (e.g. `9, 0` → `"09:00 AM"`). */
|
|
243
|
+
formatTimeI(hour: number, minute: number): Promise<string>;
|
|
244
|
+
/** Formats the time portion of a Date. Returns `''` for `undefined`. */
|
|
245
|
+
formatTime(date: Date | undefined): Promise<string>;
|
|
246
|
+
/** Formats a full date-time string as an Observable. */
|
|
247
|
+
formatDateTime(date: Date): Observable<string>;
|
|
248
|
+
/** Formats a date-only string as an Observable. */
|
|
249
|
+
formatDate(date: Date): Observable<string>;
|
|
250
|
+
/** Formats a Date as `YYYY-MM-DD` for `<input type="date">`. */
|
|
251
|
+
formatDateForFormControl(date: Date): string;
|
|
252
|
+
/** Returns `true` when both dates fall on the same calendar day. */
|
|
253
|
+
isSameDay(date1: Date, date2: Date): boolean;
|
|
254
|
+
/** Formats a Date as "Month Year" (e.g. "January 2026"). */
|
|
255
|
+
formatMonthName(date: Date): Promise<string>;
|
|
261
256
|
};
|
|
262
257
|
/**
|
|
263
258
|
* Injection token for the calendar date formatter.
|
|
@@ -269,8 +264,7 @@ type CalendarDateFormatter = {
|
|
|
269
264
|
* ]
|
|
270
265
|
* ```
|
|
271
266
|
*/
|
|
272
|
-
declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
|
|
273
|
-
|
|
267
|
+
export declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
|
|
274
268
|
/**
|
|
275
269
|
* Default implementation of {@link CalendarDateFormatter} that uses the
|
|
276
270
|
* browser's `Intl.DateTimeFormat` API for locale-aware formatting.
|
|
@@ -282,27 +276,26 @@ declare const CALENDAR_DATE_FORMATTER: InjectionToken<CalendarDateFormatter>;
|
|
|
282
276
|
* so the calendar library works out of the box. Consumers can replace it with
|
|
283
277
|
* their own implementation via the `CALENDAR_DATE_FORMATTER` injection token.
|
|
284
278
|
*/
|
|
285
|
-
declare class DefaultCalendarDateFormatter implements CalendarDateFormatter {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
279
|
+
export declare class DefaultCalendarDateFormatter implements CalendarDateFormatter {
|
|
280
|
+
private readonly locale;
|
|
281
|
+
constructor();
|
|
282
|
+
/** Formats an hour and minute pair into a locale time string (e.g. "09:00 AM"). */
|
|
283
|
+
formatTimeI(hour: number, minute: number): Promise<string>;
|
|
284
|
+
/** Formats the time portion of a Date (e.g. "2:30 PM"). Returns empty string for undefined. */
|
|
285
|
+
formatTime(date: Date | undefined): Promise<string>;
|
|
286
|
+
/** Formats a Date as a full date-time string (e.g. "May 15, 2026, 02:30 PM"). */
|
|
287
|
+
formatDateTime(date: Date): Observable<string>;
|
|
288
|
+
/** Formats a Date as a date-only string (e.g. "May 15, 2026"). */
|
|
289
|
+
formatDate(date: Date): Observable<string>;
|
|
290
|
+
/** Formats a Date as `YYYY-MM-DD` for use in `<input type="date">` controls. */
|
|
291
|
+
formatDateForFormControl(date: Date): string;
|
|
292
|
+
/** Returns `true` if both dates fall on the same calendar day. */
|
|
293
|
+
isSameDay(date1: Date, date2: Date): boolean;
|
|
294
|
+
/** Formats a Date as "Month Year" (e.g. "January 2026"). */
|
|
295
|
+
formatMonthName(date: Date): Promise<string>;
|
|
296
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultCalendarDateFormatter, never>;
|
|
297
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
304
298
|
}
|
|
305
|
-
|
|
306
299
|
/**
|
|
307
300
|
* Service that computes the visual layout of calendar events within a
|
|
308
301
|
* time-grid (week or day view).
|
|
@@ -315,64 +308,61 @@ declare class DefaultCalendarDateFormatter implements CalendarDateFormatter {
|
|
|
315
308
|
* This service is stateless — all state is passed via method parameters.
|
|
316
309
|
* Provide it per-component (not root) so each view gets its own instance.
|
|
317
310
|
*/
|
|
318
|
-
declare class CalendarEventLayoutService {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
311
|
+
export declare class CalendarEventLayoutService {
|
|
312
|
+
/**
|
|
313
|
+
* Returns `true` when two time ranges overlap (exclusive boundaries).
|
|
314
|
+
*/
|
|
315
|
+
eventsOverlap(startA: Date, endA: Date, startB: Date, endB: Date): boolean;
|
|
316
|
+
/**
|
|
317
|
+
* Returns all events whose time range overlaps the given `[start, end)` window.
|
|
318
|
+
*/
|
|
319
|
+
getAllEventsOnSpecificTime(events: CalendarEvent[], start: Date, end: Date): CalendarEvent[];
|
|
320
|
+
/**
|
|
321
|
+
* Splits multi-day events into per-day segments that fit within the
|
|
322
|
+
* visible hour range (`startHour`–`endHour`) and date range.
|
|
323
|
+
*
|
|
324
|
+
* Single-day events are shallow-copied as-is. Multi-day events produce
|
|
325
|
+
* one segment per day with `continued` / `continuedEnd` flags set.
|
|
326
|
+
*/
|
|
327
|
+
calculateMultiDayEvents(events: CalendarEvent[], startHour: number, endHour: number, rangeStart: Date, rangeEnd: Date): CalendarEvent[];
|
|
328
|
+
/**
|
|
329
|
+
* Assigns a zero-based `column` index to each event so that overlapping
|
|
330
|
+
* events occupy different columns.
|
|
331
|
+
*
|
|
332
|
+
* Events are processed in start-time order (longest duration first for ties).
|
|
333
|
+
* Each event gets the earliest column not already occupied by an overlapping event.
|
|
334
|
+
*/
|
|
335
|
+
assignColumnsToEvents(events: CalendarEvent[]): void;
|
|
336
|
+
/**
|
|
337
|
+
* Assigns a `width` (column span) to each event, expanding it to fill
|
|
338
|
+
* unused columns to its right within the overlapping group.
|
|
339
|
+
*/
|
|
340
|
+
assignWidthsToEvents(events: CalendarEvent[], scanStart: Date, scanEnd: Date): void;
|
|
341
|
+
/** Finds the lowest column index not occupied by any overlapping event. */
|
|
342
|
+
private findEarliestPossibleColumn;
|
|
343
|
+
/** Computes the maximum width an event can span without overlapping a neighbour to its right. */
|
|
344
|
+
private findBiggestPossibleWidth;
|
|
345
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarEventLayoutService, never>;
|
|
346
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
354
347
|
}
|
|
355
|
-
|
|
356
348
|
/**
|
|
357
349
|
* Static utility methods for calendar grid positioning.
|
|
358
350
|
*/
|
|
359
|
-
declare class CalendarUtility {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
351
|
+
export declare class CalendarUtility {
|
|
352
|
+
/**
|
|
353
|
+
* Converts a weekday (from `Date.getDay()`) to a 1-based Monday-first column index.
|
|
354
|
+
* Monday = 1, Tuesday = 2, …, Sunday = 7.
|
|
355
|
+
*/
|
|
356
|
+
static getCorrectColumn(date: Date): number;
|
|
357
|
+
/**
|
|
358
|
+
* Converts an hour + minute pair to a 1-based CSS grid row index
|
|
359
|
+
* within a half-hour grid starting at `startHour`.
|
|
360
|
+
*
|
|
361
|
+
* Each hour occupies two rows (one per 30-minute slot).
|
|
362
|
+
* Formula: `(hour - startHour) * 2 + (minute >= 30 ? 1 : 0) + 1`
|
|
363
|
+
*
|
|
364
|
+
* @returns Grid row number (minimum 1).
|
|
365
|
+
*/
|
|
366
|
+
static getCorrectRow(hour: number, minute: number, startHour: number): number;
|
|
375
367
|
}
|
|
376
|
-
|
|
377
|
-
export { CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarEventLayoutService, CalendarUtility, CalendarView, DEFAULT_CALENDAR_CONFIG, DefaultCalendarDateFormatter, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, provideMnCalendarConfig, resolveCalendarConfig };
|
|
378
|
-
export type { CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, ColorPreset, ColumnDay, CurrentTimeCalendarEvent, HourRow, MonthItem };
|
|
368
|
+
export type { CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, ColorPreset, ColumnDay, CurrentTimeCalendarEvent, HourRow, MonthItem };
|