mglon-schedule 0.0.4
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/LICENSE +22 -0
- package/README.md +40 -0
- package/fesm2022/mglon-schedule.mjs +3800 -0
- package/fesm2022/mglon-schedule.mjs.map +1 -0
- package/package.json +44 -0
- package/types/mglon-schedule.d.ts +963 -0
|
@@ -0,0 +1,963 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef, InjectionToken, AfterContentInit } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import * as _ngrx_signals from '@ngrx/signals';
|
|
5
|
+
import * as mglon_schedule from 'mglon-schedule';
|
|
6
|
+
|
|
7
|
+
declare class ResourceView {
|
|
8
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResourceView, never>;
|
|
9
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResourceView, "mglon-resource-view", never, {}, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Base interface for all event types in the scheduler.
|
|
14
|
+
* Provides common properties shared across all event variations.
|
|
15
|
+
*/
|
|
16
|
+
interface EventBase {
|
|
17
|
+
/** Unique identifier for the event */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Foreign key: ID of the resource this event belongs to (optional) */
|
|
20
|
+
resourceId?: string;
|
|
21
|
+
/** Display title of the event */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Additional description or notes for the event */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** Tags for filtering and styling */
|
|
26
|
+
tags?: string[];
|
|
27
|
+
/** Event color (overrides resource color if set) */
|
|
28
|
+
color?: string;
|
|
29
|
+
/** If true, the event cannot be edited */
|
|
30
|
+
isReadOnly?: boolean;
|
|
31
|
+
/** If true, the event is visually blocked (e.g., maintenance) */
|
|
32
|
+
isBlocked?: boolean;
|
|
33
|
+
/** If true, the event lasts the whole day or multiple days (minimalist design) */
|
|
34
|
+
isAllDay?: boolean;
|
|
35
|
+
/** Flexible user-defined data */
|
|
36
|
+
metadata?: any;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Interface for regular time-based events
|
|
40
|
+
*/
|
|
41
|
+
interface Event$1 extends EventBase {
|
|
42
|
+
/** Start date and time of the event */
|
|
43
|
+
start: Date;
|
|
44
|
+
/** End date and time of the event */
|
|
45
|
+
end: Date;
|
|
46
|
+
/** Event type discriminator */
|
|
47
|
+
type: 'event';
|
|
48
|
+
/** If true, this is an instance generated from a RecurrentEventModel */
|
|
49
|
+
isRecurrenceInstance?: boolean;
|
|
50
|
+
/** ID of the parent RecurrentEventModel */
|
|
51
|
+
parentRecurrenceId?: string;
|
|
52
|
+
/** Original date of occurrence from the recurrence rule */
|
|
53
|
+
recurrenceDate?: Date;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Interface for all-day events
|
|
57
|
+
*/
|
|
58
|
+
interface AllDayEvent extends EventBase {
|
|
59
|
+
/**
|
|
60
|
+
* Date for the all-day event
|
|
61
|
+
* For multi-day events, this represents the start date
|
|
62
|
+
*/
|
|
63
|
+
date: Date;
|
|
64
|
+
/**
|
|
65
|
+
* Optional end date for multi-day all-day events
|
|
66
|
+
* If not provided, the event is a single-day event
|
|
67
|
+
*/
|
|
68
|
+
endDate?: Date;
|
|
69
|
+
/** Event type discriminator */
|
|
70
|
+
type: 'all-day';
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Recurrence types supported by the scheduler
|
|
74
|
+
*/
|
|
75
|
+
type RecurrenceType = 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
76
|
+
/**
|
|
77
|
+
* Days of the week for recurrence rules
|
|
78
|
+
*/
|
|
79
|
+
type DayOfWeek = 'Sun' | 'Mon' | 'Tue' | 'Wed' | 'Thu' | 'Fri' | 'Sat';
|
|
80
|
+
/**
|
|
81
|
+
* Recurrence rule configuration compatible with RFC 5545 (iCalendar)
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* // Every Monday for 10 weeks
|
|
85
|
+
* { type: 'weekly', interval: 1, byDay: ['Mon'], count: 10 }
|
|
86
|
+
*
|
|
87
|
+
* // Last Friday of each month until end of year
|
|
88
|
+
* { type: 'monthly', interval: 1, byDay: ['Fri'], bySetPos: [-1], until: new Date('2025-12-31') }
|
|
89
|
+
*
|
|
90
|
+
* @important At least one of `count` or `until` must be defined to prevent infinite recurrences
|
|
91
|
+
* @important `count` and `until` are mutually exclusive - only one should be set
|
|
92
|
+
*/
|
|
93
|
+
interface RecurrenceRule {
|
|
94
|
+
/** Type of recurrence pattern */
|
|
95
|
+
type: RecurrenceType;
|
|
96
|
+
/**
|
|
97
|
+
* Interval between occurrences (e.g., 2 = every 2 days/weeks)
|
|
98
|
+
* @minimum 1
|
|
99
|
+
* @default 1
|
|
100
|
+
*/
|
|
101
|
+
interval: number;
|
|
102
|
+
/**
|
|
103
|
+
* Number of occurrences before stopping
|
|
104
|
+
* Mutually exclusive with `until` - only one should be defined
|
|
105
|
+
* @minimum 1
|
|
106
|
+
* @example 10 // Event repeats 10 times
|
|
107
|
+
*/
|
|
108
|
+
count?: number;
|
|
109
|
+
/**
|
|
110
|
+
* End date for the recurrence pattern
|
|
111
|
+
* Mutually exclusive with `count` - only one should be defined
|
|
112
|
+
* @example new Date('2025-12-31') // Event repeats until Dec 31, 2025
|
|
113
|
+
*/
|
|
114
|
+
until?: Date;
|
|
115
|
+
/**
|
|
116
|
+
* Days of the week for weekly/monthly recurrence
|
|
117
|
+
* @example ['Mon', 'Wed', 'Fri'] // Every Monday, Wednesday, and Friday
|
|
118
|
+
*/
|
|
119
|
+
byDay?: DayOfWeek[];
|
|
120
|
+
/**
|
|
121
|
+
* Months for yearly recurrence (1-12)
|
|
122
|
+
* @example [1, 6, 12] // January, June, and December
|
|
123
|
+
*/
|
|
124
|
+
byMonth?: number[];
|
|
125
|
+
/**
|
|
126
|
+
* Days of the month for monthly recurrence (1-31, or negative for end of month)
|
|
127
|
+
* @example [1, 15] // 1st and 15th of each month
|
|
128
|
+
* @example [-1] // Last day of the month
|
|
129
|
+
*/
|
|
130
|
+
byMonthDay?: number[];
|
|
131
|
+
/**
|
|
132
|
+
* Position in the set (positive or negative)
|
|
133
|
+
* Used with byDay to specify nth occurrence
|
|
134
|
+
* @example [-1] // Last occurrence (e.g., last Friday of month)
|
|
135
|
+
* @example [1, 3] // First and third occurrence
|
|
136
|
+
*/
|
|
137
|
+
bySetPos?: number[];
|
|
138
|
+
/**
|
|
139
|
+
* First day of the week for weekly recurrences
|
|
140
|
+
* Affects calculations when using bySetPos with weekly patterns
|
|
141
|
+
* @default 'Mon'
|
|
142
|
+
* @example 'Sun' // Week starts on Sunday
|
|
143
|
+
*/
|
|
144
|
+
weekStart?: DayOfWeek;
|
|
145
|
+
/**
|
|
146
|
+
* Hours of the day for the recurrence (0-23)
|
|
147
|
+
* Advanced: For events that repeat multiple times per day
|
|
148
|
+
* @example [9, 14, 18] // 9am, 2pm, and 6pm each day
|
|
149
|
+
*/
|
|
150
|
+
byHour?: number[];
|
|
151
|
+
/**
|
|
152
|
+
* Minutes of the hour for the recurrence (0-59)
|
|
153
|
+
* Advanced: For precise timing control
|
|
154
|
+
* @example [0, 30] // On the hour and half-hour
|
|
155
|
+
*/
|
|
156
|
+
byMinute?: number[];
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Interface for recurring events
|
|
160
|
+
*/
|
|
161
|
+
interface RecurrentEventModel extends EventBase {
|
|
162
|
+
/** Start date and time of the first occurrence */
|
|
163
|
+
start: Date;
|
|
164
|
+
/** End date and time of the first occurrence */
|
|
165
|
+
end: Date;
|
|
166
|
+
/** Recurrence rule defining the pattern */
|
|
167
|
+
recurrenceRule: RecurrenceRule;
|
|
168
|
+
/** Specific dates to exclude from the recurrence pattern */
|
|
169
|
+
recurrenceExceptions?: Date[];
|
|
170
|
+
/** Event type discriminator */
|
|
171
|
+
type: 'recurrent';
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Union type representing any event type
|
|
175
|
+
*/
|
|
176
|
+
type AnyEvent = Event$1 | AllDayEvent | RecurrentEventModel;
|
|
177
|
+
|
|
178
|
+
type ResizeSide = 'top' | 'right' | 'bottom' | 'left';
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Common structure for all event interactions.
|
|
182
|
+
*/
|
|
183
|
+
interface EventInteraction<T = any> {
|
|
184
|
+
/** The full event data */
|
|
185
|
+
event: AnyEvent;
|
|
186
|
+
/** The ID of the slot that triggered the event */
|
|
187
|
+
slotId: string;
|
|
188
|
+
/** Browser event that triggered the interaction (optional) */
|
|
189
|
+
originalEvent?: MouseEvent | PointerEvent;
|
|
190
|
+
/** Additional data specific to the interaction type */
|
|
191
|
+
data?: T;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Data specific to resize interactions.
|
|
195
|
+
*/
|
|
196
|
+
interface ResizeInteractionData {
|
|
197
|
+
/** Which side is being resized */
|
|
198
|
+
side: ResizeSide;
|
|
199
|
+
/** The date target where the resize handle is currently hovering */
|
|
200
|
+
date: Date;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Data specific to drag interactions.
|
|
204
|
+
*/
|
|
205
|
+
interface DragInteractionData {
|
|
206
|
+
/** The exact date where the event was grabbed */
|
|
207
|
+
grabDate: Date;
|
|
208
|
+
/** The date target where the event is currently hovering */
|
|
209
|
+
hoverDate: Date | null;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Types of interactions that can be dispatched.
|
|
213
|
+
*/
|
|
214
|
+
type InteractionType = 'click' | 'dblclick' | 'contextmenu' | 'mouseenter' | 'mouseleave' | 'resizeStart' | 'resize' | 'resizeEnd' | 'dragStart' | 'drag' | 'dragEnd';
|
|
215
|
+
/**
|
|
216
|
+
* Wrapper for the interaction event dispatched through the store.
|
|
217
|
+
*/
|
|
218
|
+
interface InteractionEvent {
|
|
219
|
+
type: InteractionType;
|
|
220
|
+
eventId: string;
|
|
221
|
+
payload: EventInteraction;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface DateRange {
|
|
225
|
+
start: Date;
|
|
226
|
+
end: Date;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
interface ResourceModel {
|
|
230
|
+
id: string;
|
|
231
|
+
name: string;
|
|
232
|
+
color?: string;
|
|
233
|
+
avatar?: string;
|
|
234
|
+
description?: string;
|
|
235
|
+
tags?: string[];
|
|
236
|
+
isActive?: boolean;
|
|
237
|
+
isReadOnly?: boolean;
|
|
238
|
+
isBlocked?: boolean;
|
|
239
|
+
resizableEvents?: boolean;
|
|
240
|
+
metadata?: any;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Result of a selection operation containing start and end dates/resources
|
|
245
|
+
*/
|
|
246
|
+
interface SelectionResult {
|
|
247
|
+
start: {
|
|
248
|
+
date: Date;
|
|
249
|
+
resourceId?: string;
|
|
250
|
+
} | null;
|
|
251
|
+
end: {
|
|
252
|
+
date: Date;
|
|
253
|
+
resourceId?: string;
|
|
254
|
+
} | null;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Week view container component.
|
|
259
|
+
*/
|
|
260
|
+
declare class WeekView {
|
|
261
|
+
readonly store: {
|
|
262
|
+
currentDate: _angular_core.Signal<Date>;
|
|
263
|
+
viewMode: _angular_core.Signal<mglon_schedule.ViewMode>;
|
|
264
|
+
config: _ngrx_signals.DeepSignal<mglon_schedule.SchedulerConfig>;
|
|
265
|
+
uiConfig: _ngrx_signals.DeepSignal<mglon_schedule.UIConfig>;
|
|
266
|
+
events: _angular_core.Signal<Map<string, AnyEvent>>;
|
|
267
|
+
resources: _angular_core.Signal<Map<string, ResourceModel>>;
|
|
268
|
+
weekRowHeight: _angular_core.Signal<number>;
|
|
269
|
+
expandedWeekIndex: _angular_core.Signal<number | null>;
|
|
270
|
+
dragState: _ngrx_signals.DeepSignal<{
|
|
271
|
+
eventId: string | null;
|
|
272
|
+
grabDate: Date | null;
|
|
273
|
+
hoverDate: Date | null;
|
|
274
|
+
}>;
|
|
275
|
+
resizeState: _ngrx_signals.DeepSignal<{
|
|
276
|
+
eventId: string | null;
|
|
277
|
+
side: ResizeSide | null;
|
|
278
|
+
hoverDate: Date | null;
|
|
279
|
+
}>;
|
|
280
|
+
interactionMode: _angular_core.Signal<"none" | "dragging" | "selecting" | "resizing">;
|
|
281
|
+
hoveredEventId: _angular_core.Signal<string | null>;
|
|
282
|
+
viewDate: _angular_core.Signal<Date>;
|
|
283
|
+
currentView: _angular_core.Signal<mglon_schedule.ViewMode>;
|
|
284
|
+
viewRange: _angular_core.Signal<DateRange>;
|
|
285
|
+
formattedDate: _angular_core.Signal<string>;
|
|
286
|
+
allResources: _angular_core.Signal<ResourceModel[]>;
|
|
287
|
+
resourceCount: _angular_core.Signal<number>;
|
|
288
|
+
activeResources: _angular_core.Signal<ResourceModel[]>;
|
|
289
|
+
inactiveResources: _angular_core.Signal<ResourceModel[]>;
|
|
290
|
+
allEvents: _angular_core.Signal<AnyEvent[]>;
|
|
291
|
+
eventCount: _angular_core.Signal<number>;
|
|
292
|
+
currentViewEvents: _angular_core.Signal<AnyEvent[]>;
|
|
293
|
+
minWeekRowHeight: _angular_core.Signal<number>;
|
|
294
|
+
getInteractions: () => rxjs.Observable<InteractionEvent>;
|
|
295
|
+
dispatchInteraction: (type: InteractionType, eventId: string, payload: any) => void;
|
|
296
|
+
setDate: (date: Date) => void;
|
|
297
|
+
changeView: (view: mglon_schedule.ViewMode) => void;
|
|
298
|
+
updateConfig: (config: Partial<mglon_schedule.SchedulerConfig>) => void;
|
|
299
|
+
next: () => void;
|
|
300
|
+
prev: () => void;
|
|
301
|
+
today: () => void;
|
|
302
|
+
registerResources: (resources: ResourceModel[]) => void;
|
|
303
|
+
registerResource: (resource: ResourceModel) => void;
|
|
304
|
+
updateResource: (id: string, partial: Partial<ResourceModel>) => void;
|
|
305
|
+
unregisterResource: (id: string) => void;
|
|
306
|
+
getResource: (id: string) => ResourceModel | undefined;
|
|
307
|
+
toggleResource: (id: string) => void;
|
|
308
|
+
showResource: (id: string) => void;
|
|
309
|
+
hideResource: (id: string) => void;
|
|
310
|
+
setEvents: (events: AnyEvent[]) => void;
|
|
311
|
+
registerEvent: (event: AnyEvent) => void;
|
|
312
|
+
updateEvent: (id: string, partial: Partial<AnyEvent>) => void;
|
|
313
|
+
unregisterEvent: (id: string) => void;
|
|
314
|
+
getEvent: (id: string) => AnyEvent | undefined;
|
|
315
|
+
getEventsByResource: (resourceId: string) => AnyEvent[];
|
|
316
|
+
clear: () => void;
|
|
317
|
+
setUIConfig: (config: {
|
|
318
|
+
header?: Partial<mglon_schedule.HeaderUIConfig>;
|
|
319
|
+
sidebar?: Partial<mglon_schedule.SidebarUIConfig>;
|
|
320
|
+
grid?: Partial<mglon_schedule.GridUIConfig>;
|
|
321
|
+
}) => void;
|
|
322
|
+
setWeekRowHeight: (height: number) => void;
|
|
323
|
+
toggleWeekExpansion: (weekIndex: number) => void;
|
|
324
|
+
setDragStart: (eventId: string, grabDate: Date) => void;
|
|
325
|
+
setDragHover: (date: Date) => void;
|
|
326
|
+
clearDragState: () => void;
|
|
327
|
+
updateDraggedEventPosition: () => void;
|
|
328
|
+
setResizeStart: (eventId: string, side: ResizeSide) => void;
|
|
329
|
+
setResizeHover: (date: Date) => void;
|
|
330
|
+
clearResizeState: () => void;
|
|
331
|
+
updateResizedEvent: () => void;
|
|
332
|
+
setInteractionMode: (mode: "none" | "dragging" | "selecting" | "resizing") => void;
|
|
333
|
+
setHoveredEvent: (eventId: string | null) => void;
|
|
334
|
+
} & _ngrx_signals.StateSource<{
|
|
335
|
+
currentDate: Date;
|
|
336
|
+
viewMode: mglon_schedule.ViewMode;
|
|
337
|
+
config: mglon_schedule.SchedulerConfig;
|
|
338
|
+
uiConfig: mglon_schedule.UIConfig;
|
|
339
|
+
events: Map<string, AnyEvent>;
|
|
340
|
+
resources: Map<string, ResourceModel>;
|
|
341
|
+
weekRowHeight: number;
|
|
342
|
+
expandedWeekIndex: number | null;
|
|
343
|
+
dragState: {
|
|
344
|
+
eventId: string | null;
|
|
345
|
+
grabDate: Date | null;
|
|
346
|
+
hoverDate: Date | null;
|
|
347
|
+
};
|
|
348
|
+
resizeState: {
|
|
349
|
+
eventId: string | null;
|
|
350
|
+
side: ResizeSide | null;
|
|
351
|
+
hoverDate: Date | null;
|
|
352
|
+
};
|
|
353
|
+
interactionMode: "none" | "dragging" | "selecting" | "resizing";
|
|
354
|
+
hoveredEventId: string | null;
|
|
355
|
+
}>;
|
|
356
|
+
/** Emitted when selection starts */
|
|
357
|
+
readonly selectionStart: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
358
|
+
/** Emitted while selecting */
|
|
359
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
360
|
+
/** Emitted when selection ends */
|
|
361
|
+
readonly selectionEnd: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
362
|
+
readonly gridElement: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
363
|
+
readonly animationState: _angular_core.Signal<number>;
|
|
364
|
+
constructor();
|
|
365
|
+
private getWeekNumber;
|
|
366
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WeekView, never>;
|
|
367
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WeekView, "mglon-week-view", never, {}, { "selectionStart": "selectionStart"; "selectionChange": "selectionChange"; "selectionEnd": "selectionEnd"; }, never, never, true, never>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
type ViewMode = 'day' | 'week' | 'month' | 'resource' | 'list';
|
|
371
|
+
interface SchedulerConfig {
|
|
372
|
+
/** Fecha inicial. Acepta Date object o string ISO. Defecto: new Date() */
|
|
373
|
+
initialDate?: Date | string;
|
|
374
|
+
/** Vista inicial al cargar. Defecto: 'month' */
|
|
375
|
+
initialView?: ViewMode;
|
|
376
|
+
/** Duración de cada slot en minutos (15, 30, 60). Defecto: 30 */
|
|
377
|
+
slotDuration?: number;
|
|
378
|
+
/** Hora de inicio del día (0-23). Útil para ocultar la madrugada. Defecto: 0 */
|
|
379
|
+
dayStartHour?: number;
|
|
380
|
+
/** Hora de fin del día (0-23). Defecto: 23 */
|
|
381
|
+
dayEndHour?: number;
|
|
382
|
+
/** Ancho de la columna lateral de recursos en px. Defecto: 200 */
|
|
383
|
+
resourceSidebarWidth?: number;
|
|
384
|
+
/** Si es true, agrupa eventos superpuestos visualmente. Defecto: true */
|
|
385
|
+
allowOverlaps?: boolean;
|
|
386
|
+
/** Código de idioma (ej: 'es', 'en-US'). Defecto: 'en' */
|
|
387
|
+
locale?: string;
|
|
388
|
+
/** Día de inicio de semana (0=Domingo, 1=Lunes). Defecto: 0 */
|
|
389
|
+
weekStartsOn?: 0 | 1;
|
|
390
|
+
/** * Clase CSS base para aplicar temas predefinidos.
|
|
391
|
+
* Ej: 'theme-google' o 'theme-dark'.
|
|
392
|
+
* Esto activará las variables CSS correspondientes.
|
|
393
|
+
*/
|
|
394
|
+
theme?: string;
|
|
395
|
+
/** Altura del calendario (ej: 'auto', '100%', '600px'). Defecto: '100%' */
|
|
396
|
+
height?: string;
|
|
397
|
+
/**
|
|
398
|
+
* Número mínimo de filas de eventos visibles en la vista de mes.
|
|
399
|
+
* Controla la altura mínima de cada semana.
|
|
400
|
+
* Defecto: 3
|
|
401
|
+
*/
|
|
402
|
+
visibleEventRows?: number;
|
|
403
|
+
/** Array con los tipos de visualizacion que desea usar.
|
|
404
|
+
* Defecto: ['month', 'week', 'day', 'resource'] */
|
|
405
|
+
views?: ViewMode[];
|
|
406
|
+
/** Activar o desactivar la opcion de seleccion.
|
|
407
|
+
* Defecto: true */
|
|
408
|
+
backgroundSelection?: boolean;
|
|
409
|
+
/** Decidir si quiere ver la indicacion del dia actual.
|
|
410
|
+
* Defecto: true */
|
|
411
|
+
showNowIndicator?: boolean;
|
|
412
|
+
/** Propiedad para activar o desactivar las opciones de edicion (como el boton add del header).
|
|
413
|
+
* Defecto: true */
|
|
414
|
+
editable?: boolean;
|
|
415
|
+
/** Propiedad para activar o desactivar el redimensionado de eventos.
|
|
416
|
+
* Defecto: true */
|
|
417
|
+
resizableEvents?: boolean;
|
|
418
|
+
/** Mostrar u ocultar el sidebar lateral.
|
|
419
|
+
* Defecto: true */
|
|
420
|
+
showSidebar?: boolean;
|
|
421
|
+
/** Array de recursos a mostrar en el sidebar.
|
|
422
|
+
* Defecto: [] */
|
|
423
|
+
resources?: ResourceModel[];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* UI Configuration Types
|
|
428
|
+
*
|
|
429
|
+
* Type definitions organized by functional areas (Header, Sidebar, Grid)
|
|
430
|
+
* for controlling the visual appearance of schedule components.
|
|
431
|
+
*/
|
|
432
|
+
/**
|
|
433
|
+
* Border radius levels based on design system
|
|
434
|
+
*/
|
|
435
|
+
type BorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
436
|
+
/**
|
|
437
|
+
* Density variants for spacing and sizing
|
|
438
|
+
*/
|
|
439
|
+
type Density = 'compact' | 'comfortable';
|
|
440
|
+
/**
|
|
441
|
+
* Appearance styles for components
|
|
442
|
+
*/
|
|
443
|
+
type Appearance = 'solid' | 'outline' | 'ghost';
|
|
444
|
+
/**
|
|
445
|
+
* Configuration for button group component in header (view switcher)
|
|
446
|
+
*/
|
|
447
|
+
interface ButtonGroupConfig {
|
|
448
|
+
/**
|
|
449
|
+
* Visual appearance style
|
|
450
|
+
* @default 'solid'
|
|
451
|
+
*/
|
|
452
|
+
appearance: Appearance;
|
|
453
|
+
/**
|
|
454
|
+
* Border radius for button group
|
|
455
|
+
* @default 'md'
|
|
456
|
+
*/
|
|
457
|
+
rounded: BorderRadius;
|
|
458
|
+
/**
|
|
459
|
+
* Density/spacing for buttons
|
|
460
|
+
* @default 'comfortable'
|
|
461
|
+
*/
|
|
462
|
+
density: Density;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Configuration for icon buttons in header (navigation, add button)
|
|
466
|
+
*/
|
|
467
|
+
interface IconButtonConfig {
|
|
468
|
+
/**
|
|
469
|
+
* Border radius for icon buttons
|
|
470
|
+
* @default 'md'
|
|
471
|
+
*/
|
|
472
|
+
rounded: BorderRadius;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Configuration for Today button in header
|
|
476
|
+
*/
|
|
477
|
+
interface TodayButtonConfig {
|
|
478
|
+
/**
|
|
479
|
+
* Border radius for Today button
|
|
480
|
+
* @default 'md'
|
|
481
|
+
*/
|
|
482
|
+
rounded: BorderRadius;
|
|
483
|
+
/**
|
|
484
|
+
* Visual appearance style
|
|
485
|
+
* @default 'ghost'
|
|
486
|
+
*/
|
|
487
|
+
appearance: Appearance;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Complete configuration for header area
|
|
491
|
+
*/
|
|
492
|
+
interface HeaderUIConfig {
|
|
493
|
+
/**
|
|
494
|
+
* View switcher button group configuration
|
|
495
|
+
*/
|
|
496
|
+
buttonGroup: ButtonGroupConfig;
|
|
497
|
+
/**
|
|
498
|
+
* Icon buttons (prev/next/add) configuration
|
|
499
|
+
*/
|
|
500
|
+
iconButtons: IconButtonConfig;
|
|
501
|
+
/**
|
|
502
|
+
* Today button configuration
|
|
503
|
+
*/
|
|
504
|
+
todayButton: TodayButtonConfig;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Configuration for resource items in sidebar
|
|
508
|
+
*/
|
|
509
|
+
interface ResourceItemConfig {
|
|
510
|
+
/**
|
|
511
|
+
* Border radius for resource items
|
|
512
|
+
* @default 'sm'
|
|
513
|
+
*/
|
|
514
|
+
rounded: BorderRadius;
|
|
515
|
+
/**
|
|
516
|
+
* Density/spacing for resource items
|
|
517
|
+
* @default 'comfortable'
|
|
518
|
+
*/
|
|
519
|
+
density: Density;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Complete configuration for sidebar area
|
|
523
|
+
*/
|
|
524
|
+
interface SidebarUIConfig {
|
|
525
|
+
/**
|
|
526
|
+
* Resource list item configuration
|
|
527
|
+
*/
|
|
528
|
+
resourceItems: ResourceItemConfig;
|
|
529
|
+
/**
|
|
530
|
+
* Background color for sidebar container
|
|
531
|
+
* @default '#ffffff' or 'var(--bg-color)'
|
|
532
|
+
*/
|
|
533
|
+
background?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Border radius for sidebar container
|
|
536
|
+
* @default 'none'
|
|
537
|
+
*/
|
|
538
|
+
rounded?: BorderRadius;
|
|
539
|
+
}
|
|
540
|
+
/** Event slot specific radius options */
|
|
541
|
+
type EventSlotRadius = 'none' | 'sm' | 'full';
|
|
542
|
+
/** Overflow indicator specific radius options */
|
|
543
|
+
type IndicatorRadius = 'none' | 'sm' | 'md' | 'full';
|
|
544
|
+
/** Overflow indicator appearance options */
|
|
545
|
+
type IndicatorAppearance = 'ghost' | 'outline' | 'solid';
|
|
546
|
+
/**
|
|
547
|
+
* Configuration for event slots in grids
|
|
548
|
+
*/
|
|
549
|
+
interface EventSlotConfig {
|
|
550
|
+
/**
|
|
551
|
+
* Border radius for event slots
|
|
552
|
+
* @default 'sm'
|
|
553
|
+
*/
|
|
554
|
+
rounded: EventSlotRadius;
|
|
555
|
+
/**
|
|
556
|
+
* Default color for event slots if not specified by event or resource
|
|
557
|
+
* @default undefined (falls back to primary style)
|
|
558
|
+
*/
|
|
559
|
+
color?: string;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Configuration for overflow indicator (+N more)
|
|
563
|
+
*/
|
|
564
|
+
interface OverflowIndicatorConfig {
|
|
565
|
+
/**
|
|
566
|
+
* Border radius for indicator
|
|
567
|
+
* @default 'sm'
|
|
568
|
+
*/
|
|
569
|
+
rounded: IndicatorRadius;
|
|
570
|
+
/**
|
|
571
|
+
* Visual appearance style
|
|
572
|
+
* @default 'ghost'
|
|
573
|
+
*/
|
|
574
|
+
appearance: IndicatorAppearance;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Complete configuration for grid area
|
|
578
|
+
*/
|
|
579
|
+
interface GridUIConfig {
|
|
580
|
+
/**
|
|
581
|
+
* Event slot styling
|
|
582
|
+
*/
|
|
583
|
+
eventSlots: EventSlotConfig;
|
|
584
|
+
/**
|
|
585
|
+
* Overflow indicator (+N more) styling
|
|
586
|
+
*/
|
|
587
|
+
overflowIndicator: OverflowIndicatorConfig;
|
|
588
|
+
/**
|
|
589
|
+
* Whether to automatically generate vivid/pastel variants for events.
|
|
590
|
+
* If true, regular events use vivid colors and recurrent events use pastel variants.
|
|
591
|
+
* If false, colors are used exactly as provided (with derived contrast text).
|
|
592
|
+
* @default true
|
|
593
|
+
*/
|
|
594
|
+
useDynamicColors: boolean;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Complete UI configuration for the schedule
|
|
598
|
+
* Organized by functional area for better discoverability
|
|
599
|
+
*/
|
|
600
|
+
interface UIConfig {
|
|
601
|
+
/**
|
|
602
|
+
* Header area configuration (button-group, navigation, today button)
|
|
603
|
+
*/
|
|
604
|
+
header: HeaderUIConfig;
|
|
605
|
+
/**
|
|
606
|
+
* Sidebar area configuration (resource items)
|
|
607
|
+
*/
|
|
608
|
+
sidebar: SidebarUIConfig;
|
|
609
|
+
/**
|
|
610
|
+
* Grid area configuration (event slots, overflow indicators)
|
|
611
|
+
*/
|
|
612
|
+
grid: GridUIConfig;
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Default UI configuration
|
|
616
|
+
*/
|
|
617
|
+
declare const DEFAULT_UI_CONFIG: UIConfig;
|
|
618
|
+
|
|
619
|
+
declare class Schedule {
|
|
620
|
+
readonly config: _angular_core.InputSignal<Partial<SchedulerConfig>>;
|
|
621
|
+
/** Optional UI configuration for header area (button-group, navigation, today button) */
|
|
622
|
+
readonly headerUI: _angular_core.InputSignal<Partial<HeaderUIConfig> | undefined>;
|
|
623
|
+
/** Optional UI configuration for sidebar area (resource items) */
|
|
624
|
+
readonly sidebarUI: _angular_core.InputSignal<Partial<SidebarUIConfig> | undefined>;
|
|
625
|
+
/** Optional UI configuration for grid area (event slots, overflow indicators) */
|
|
626
|
+
readonly gridUI: _angular_core.InputSignal<Partial<GridUIConfig> | undefined>;
|
|
627
|
+
/** Optional default color for all events in the schedule */
|
|
628
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
629
|
+
/**
|
|
630
|
+
* Whether to automatically generate vivid/pastel variants for events.
|
|
631
|
+
* If true, regular events use vivid colors and recurrent events use pastel variants.
|
|
632
|
+
* If false, colors are used exactly as provided.
|
|
633
|
+
* @default true
|
|
634
|
+
*/
|
|
635
|
+
readonly useDynamicColors: _angular_core.InputSignal<boolean>;
|
|
636
|
+
readonly add: _angular_core.OutputEmitterRef<void>;
|
|
637
|
+
/** Emitted when selection starts (mousedown) */
|
|
638
|
+
readonly selectionStart: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
639
|
+
/** Emitted while selecting (mousemove) */
|
|
640
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
641
|
+
/** Emitted when selection ends (mouseup) */
|
|
642
|
+
readonly selectionEnd: _angular_core.OutputEmitterRef<SelectionResult>;
|
|
643
|
+
/** Emitted when view mode changes */
|
|
644
|
+
readonly viewChange: _angular_core.OutputEmitterRef<ViewMode>;
|
|
645
|
+
/** Emitted when displayed date range changes */
|
|
646
|
+
readonly dateRangeChange: _angular_core.OutputEmitterRef<{
|
|
647
|
+
start: Date;
|
|
648
|
+
end: Date;
|
|
649
|
+
}>;
|
|
650
|
+
/** Emitted when a resource is shown/activated */
|
|
651
|
+
readonly resourceShow: _angular_core.OutputEmitterRef<string>;
|
|
652
|
+
/** Emitted when a resource is hidden/deactivated */
|
|
653
|
+
readonly resourceHide: _angular_core.OutputEmitterRef<string>;
|
|
654
|
+
readonly store: {
|
|
655
|
+
currentDate: _angular_core.Signal<Date>;
|
|
656
|
+
viewMode: _angular_core.Signal<ViewMode>;
|
|
657
|
+
config: _ngrx_signals.DeepSignal<SchedulerConfig>;
|
|
658
|
+
uiConfig: _ngrx_signals.DeepSignal<UIConfig>;
|
|
659
|
+
events: _angular_core.Signal<Map<string, AnyEvent>>;
|
|
660
|
+
resources: _angular_core.Signal<Map<string, ResourceModel>>;
|
|
661
|
+
weekRowHeight: _angular_core.Signal<number>;
|
|
662
|
+
expandedWeekIndex: _angular_core.Signal<number | null>;
|
|
663
|
+
dragState: _ngrx_signals.DeepSignal<{
|
|
664
|
+
eventId: string | null;
|
|
665
|
+
grabDate: Date | null;
|
|
666
|
+
hoverDate: Date | null;
|
|
667
|
+
}>;
|
|
668
|
+
resizeState: _ngrx_signals.DeepSignal<{
|
|
669
|
+
eventId: string | null;
|
|
670
|
+
side: ResizeSide | null;
|
|
671
|
+
hoverDate: Date | null;
|
|
672
|
+
}>;
|
|
673
|
+
interactionMode: _angular_core.Signal<"none" | "dragging" | "selecting" | "resizing">;
|
|
674
|
+
hoveredEventId: _angular_core.Signal<string | null>;
|
|
675
|
+
viewDate: _angular_core.Signal<Date>;
|
|
676
|
+
currentView: _angular_core.Signal<ViewMode>;
|
|
677
|
+
viewRange: _angular_core.Signal<DateRange>;
|
|
678
|
+
formattedDate: _angular_core.Signal<string>;
|
|
679
|
+
allResources: _angular_core.Signal<ResourceModel[]>;
|
|
680
|
+
resourceCount: _angular_core.Signal<number>;
|
|
681
|
+
activeResources: _angular_core.Signal<ResourceModel[]>;
|
|
682
|
+
inactiveResources: _angular_core.Signal<ResourceModel[]>;
|
|
683
|
+
allEvents: _angular_core.Signal<AnyEvent[]>;
|
|
684
|
+
eventCount: _angular_core.Signal<number>;
|
|
685
|
+
currentViewEvents: _angular_core.Signal<AnyEvent[]>;
|
|
686
|
+
minWeekRowHeight: _angular_core.Signal<number>;
|
|
687
|
+
getInteractions: () => rxjs.Observable<InteractionEvent>;
|
|
688
|
+
dispatchInteraction: (type: InteractionType, eventId: string, payload: any) => void;
|
|
689
|
+
setDate: (date: Date) => void;
|
|
690
|
+
changeView: (view: ViewMode) => void;
|
|
691
|
+
updateConfig: (config: Partial<SchedulerConfig>) => void;
|
|
692
|
+
next: () => void;
|
|
693
|
+
prev: () => void;
|
|
694
|
+
today: () => void;
|
|
695
|
+
registerResources: (resources: ResourceModel[]) => void;
|
|
696
|
+
registerResource: (resource: ResourceModel) => void;
|
|
697
|
+
updateResource: (id: string, partial: Partial<ResourceModel>) => void;
|
|
698
|
+
unregisterResource: (id: string) => void;
|
|
699
|
+
getResource: (id: string) => ResourceModel | undefined;
|
|
700
|
+
toggleResource: (id: string) => void;
|
|
701
|
+
showResource: (id: string) => void;
|
|
702
|
+
hideResource: (id: string) => void;
|
|
703
|
+
setEvents: (events: AnyEvent[]) => void;
|
|
704
|
+
registerEvent: (event: AnyEvent) => void;
|
|
705
|
+
updateEvent: (id: string, partial: Partial<AnyEvent>) => void;
|
|
706
|
+
unregisterEvent: (id: string) => void;
|
|
707
|
+
getEvent: (id: string) => AnyEvent | undefined;
|
|
708
|
+
getEventsByResource: (resourceId: string) => AnyEvent[];
|
|
709
|
+
clear: () => void;
|
|
710
|
+
setUIConfig: (config: {
|
|
711
|
+
header?: Partial<HeaderUIConfig>;
|
|
712
|
+
sidebar?: Partial<SidebarUIConfig>;
|
|
713
|
+
grid?: Partial<GridUIConfig>;
|
|
714
|
+
}) => void;
|
|
715
|
+
setWeekRowHeight: (height: number) => void;
|
|
716
|
+
toggleWeekExpansion: (weekIndex: number) => void;
|
|
717
|
+
setDragStart: (eventId: string, grabDate: Date) => void;
|
|
718
|
+
setDragHover: (date: Date) => void;
|
|
719
|
+
clearDragState: () => void;
|
|
720
|
+
updateDraggedEventPosition: () => void;
|
|
721
|
+
setResizeStart: (eventId: string, side: ResizeSide) => void;
|
|
722
|
+
setResizeHover: (date: Date) => void;
|
|
723
|
+
clearResizeState: () => void;
|
|
724
|
+
updateResizedEvent: () => void;
|
|
725
|
+
setInteractionMode: (mode: "none" | "dragging" | "selecting" | "resizing") => void;
|
|
726
|
+
setHoveredEvent: (eventId: string | null) => void;
|
|
727
|
+
} & _ngrx_signals.StateSource<{
|
|
728
|
+
currentDate: Date;
|
|
729
|
+
viewMode: ViewMode;
|
|
730
|
+
config: SchedulerConfig;
|
|
731
|
+
uiConfig: UIConfig;
|
|
732
|
+
events: Map<string, AnyEvent>;
|
|
733
|
+
resources: Map<string, ResourceModel>;
|
|
734
|
+
weekRowHeight: number;
|
|
735
|
+
expandedWeekIndex: number | null;
|
|
736
|
+
dragState: {
|
|
737
|
+
eventId: string | null;
|
|
738
|
+
grabDate: Date | null;
|
|
739
|
+
hoverDate: Date | null;
|
|
740
|
+
};
|
|
741
|
+
resizeState: {
|
|
742
|
+
eventId: string | null;
|
|
743
|
+
side: ResizeSide | null;
|
|
744
|
+
hoverDate: Date | null;
|
|
745
|
+
};
|
|
746
|
+
interactionMode: "none" | "dragging" | "selecting" | "resizing";
|
|
747
|
+
hoveredEventId: string | null;
|
|
748
|
+
}>;
|
|
749
|
+
constructor();
|
|
750
|
+
private previousResourceStates;
|
|
751
|
+
get api(): {
|
|
752
|
+
next: () => void;
|
|
753
|
+
prev: () => void;
|
|
754
|
+
today: () => void;
|
|
755
|
+
changeView: (view: ViewMode) => void;
|
|
756
|
+
setDate: (date: Date) => void;
|
|
757
|
+
};
|
|
758
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Schedule, never>;
|
|
759
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Schedule, "mglon-schedule", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "headerUI": { "alias": "headerUI"; "required": false; "isSignal": true; }; "sidebarUI": { "alias": "sidebarUI"; "required": false; "isSignal": true; }; "gridUI": { "alias": "gridUI"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "useDynamicColors": { "alias": "useDynamicColors"; "required": false; "isSignal": true; }; }, { "add": "add"; "selectionStart": "selectionStart"; "selectionChange": "selectionChange"; "selectionEnd": "selectionEnd"; "viewChange": "viewChange"; "dateRangeChange": "dateRangeChange"; "resourceShow": "resourceShow"; "resourceHide": "resourceHide"; }, never, ["*"], true, never>;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
declare class Event {
|
|
763
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
764
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
765
|
+
readonly startDate: _angular_core.InputSignal<Date>;
|
|
766
|
+
readonly endDate: _angular_core.InputSignal<Date>;
|
|
767
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
768
|
+
readonly allDay: _angular_core.InputSignal<boolean>;
|
|
769
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
770
|
+
readonly data: _angular_core.InputSignal<any>;
|
|
771
|
+
/** Optional explicit resource ID (if not nested in mglon-resource) */
|
|
772
|
+
readonly resourceId: _angular_core.InputSignal<string | undefined>;
|
|
773
|
+
private readonly parentResourceId;
|
|
774
|
+
/** If true, the event cannot be edited */
|
|
775
|
+
readonly isReadOnly: _angular_core.InputSignal<boolean>;
|
|
776
|
+
/** If true, the event is visually blocked (e.g., maintenance) */
|
|
777
|
+
readonly isBlocked: _angular_core.InputSignal<boolean>;
|
|
778
|
+
/** Flexible user-defined data */
|
|
779
|
+
readonly metadata: _angular_core.InputSignal<any>;
|
|
780
|
+
/** Tags for filtering and styling */
|
|
781
|
+
readonly tags: _angular_core.InputSignal<string[]>;
|
|
782
|
+
readonly eventClick: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
783
|
+
readonly eventDblClick: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
784
|
+
readonly eventContextMenu: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
785
|
+
readonly eventMouseEnter: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
786
|
+
readonly eventMouseLeave: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
787
|
+
readonly eventResizeStart: _angular_core.OutputEmitterRef<EventInteraction<ResizeInteractionData>>;
|
|
788
|
+
readonly eventResize: _angular_core.OutputEmitterRef<EventInteraction<ResizeInteractionData>>;
|
|
789
|
+
readonly eventResizeEnd: _angular_core.OutputEmitterRef<EventInteraction<ResizeInteractionData>>;
|
|
790
|
+
readonly eventDragStart: _angular_core.OutputEmitterRef<EventInteraction<DragInteractionData>>;
|
|
791
|
+
readonly eventDrag: _angular_core.OutputEmitterRef<EventInteraction<DragInteractionData>>;
|
|
792
|
+
readonly eventDragEnd: _angular_core.OutputEmitterRef<EventInteraction<DragInteractionData>>;
|
|
793
|
+
private readonly destroy$;
|
|
794
|
+
private store;
|
|
795
|
+
ngOnInit(): void;
|
|
796
|
+
private setupInteractionListeners;
|
|
797
|
+
/**
|
|
798
|
+
* Lifecycle: Unregister event from store
|
|
799
|
+
*/
|
|
800
|
+
ngOnDestroy(): void;
|
|
801
|
+
private registerEvent;
|
|
802
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Event, never>;
|
|
803
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Event, "mglon-event", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "startDate": { "alias": "startDate"; "required": true; "isSignal": true; }; "endDate": { "alias": "endDate"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "allDay": { "alias": "allDay"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "resourceId": { "alias": "resourceId"; "required": false; "isSignal": true; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; "isSignal": true; }; "isBlocked": { "alias": "isBlocked"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; }, { "eventClick": "eventClick"; "eventDblClick": "eventDblClick"; "eventContextMenu": "eventContextMenu"; "eventMouseEnter": "eventMouseEnter"; "eventMouseLeave": "eventMouseLeave"; "eventResizeStart": "eventResizeStart"; "eventResize": "eventResize"; "eventResizeEnd": "eventResizeEnd"; "eventDragStart": "eventDragStart"; "eventDrag": "eventDrag"; "eventDragEnd": "eventDragEnd"; }, never, never, true, never>;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Injection token for providing resource ID to child components
|
|
808
|
+
*/
|
|
809
|
+
declare const RESOURCE_ID_TOKEN: InjectionToken<string>;
|
|
810
|
+
/**
|
|
811
|
+
* ResourceComponent - Declarative component representing a calendar resource
|
|
812
|
+
*
|
|
813
|
+
* Usage:
|
|
814
|
+
* <mglon-resource
|
|
815
|
+
* id="room-1"
|
|
816
|
+
* name="Conference Room A"
|
|
817
|
+
* [color]="'#0860c4'">
|
|
818
|
+
* <mglon-event>...</mglon-event>
|
|
819
|
+
* </mglon-resource>
|
|
820
|
+
*/
|
|
821
|
+
declare class ResourceEvents implements AfterContentInit {
|
|
822
|
+
/** Unique identifier for the resource */
|
|
823
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
824
|
+
/** Display name of the resource */
|
|
825
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
826
|
+
/** Color for the resource (border/background) */
|
|
827
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
828
|
+
/** URL of image or initials for display */
|
|
829
|
+
readonly avatar: _angular_core.InputSignal<string | undefined>;
|
|
830
|
+
/** Additional description of the resource */
|
|
831
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
832
|
+
/** Tags for filtering */
|
|
833
|
+
readonly tags: _angular_core.InputSignal<string[]>;
|
|
834
|
+
/** If true, events for this resource cannot be edited */
|
|
835
|
+
readonly isReadOnly: _angular_core.InputSignal<boolean>;
|
|
836
|
+
/** If true, this resource does not accept new events */
|
|
837
|
+
readonly isBlocked: _angular_core.InputSignal<boolean>;
|
|
838
|
+
/** If true, resource is active and visible. Default: true */
|
|
839
|
+
readonly isActive: _angular_core.InputSignal<boolean>;
|
|
840
|
+
/** Flexible user-defined data */
|
|
841
|
+
readonly metadata: _angular_core.InputSignal<any>;
|
|
842
|
+
/** If true, allows resizing events for this resource. Default: true */
|
|
843
|
+
readonly resizableEvents: _angular_core.InputSignal<boolean>;
|
|
844
|
+
private elRef;
|
|
845
|
+
private store;
|
|
846
|
+
ngAfterContentInit(): void;
|
|
847
|
+
private _removeInvalidNodes;
|
|
848
|
+
constructor();
|
|
849
|
+
ngOnInit(): void;
|
|
850
|
+
/**
|
|
851
|
+
* Lifecycle: Unregister resource on destroy
|
|
852
|
+
*/
|
|
853
|
+
ngOnDestroy(): void;
|
|
854
|
+
private registerResource;
|
|
855
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResourceEvents, never>;
|
|
856
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResourceEvents, "mglon-resource", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "name": { "alias": "name"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "avatar": { "alias": "avatar"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; "isSignal": true; }; "isBlocked": { "alias": "isBlocked"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "resizableEvents": { "alias": "resizableEvents"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
declare class RecurrentEvent {
|
|
860
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
861
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
862
|
+
readonly startDate: _angular_core.InputSignal<Date>;
|
|
863
|
+
readonly endDate: _angular_core.InputSignal<Date>;
|
|
864
|
+
readonly color: _angular_core.InputSignal<string | undefined>;
|
|
865
|
+
readonly allDay: _angular_core.InputSignal<boolean>;
|
|
866
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
867
|
+
readonly data: _angular_core.InputSignal<any>;
|
|
868
|
+
/** Optional explicit resource ID (if not nested in mglon-resource) */
|
|
869
|
+
readonly resourceId: _angular_core.InputSignal<string | undefined>;
|
|
870
|
+
private readonly parentResourceId;
|
|
871
|
+
/** If true, the event cannot be edited */
|
|
872
|
+
readonly isReadOnly: _angular_core.InputSignal<boolean>;
|
|
873
|
+
/** If true, the event is visually blocked (e.g., maintenance) */
|
|
874
|
+
readonly isBlocked: _angular_core.InputSignal<boolean>;
|
|
875
|
+
/** Flexible user-defined data */
|
|
876
|
+
readonly metadata: _angular_core.InputSignal<any>;
|
|
877
|
+
/** Tags for filtering and styling */
|
|
878
|
+
readonly tags: _angular_core.InputSignal<string[]>;
|
|
879
|
+
/** Recurrence rule defining the pattern */
|
|
880
|
+
readonly recurrenceRule: _angular_core.InputSignal<any>;
|
|
881
|
+
/** Specific dates to exclude */
|
|
882
|
+
readonly recurrenceExceptions: _angular_core.InputSignal<Date[] | undefined>;
|
|
883
|
+
readonly eventClick: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
884
|
+
readonly eventDblClick: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
885
|
+
readonly eventContextMenu: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
886
|
+
readonly eventMouseEnter: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
887
|
+
readonly eventMouseLeave: _angular_core.OutputEmitterRef<EventInteraction<any>>;
|
|
888
|
+
private readonly destroy$;
|
|
889
|
+
private store;
|
|
890
|
+
constructor();
|
|
891
|
+
ngOnInit(): void;
|
|
892
|
+
private setupInteractionListeners;
|
|
893
|
+
private currentInstanceIds;
|
|
894
|
+
/**
|
|
895
|
+
* Lifecycle: Unregister event and all its instances from store
|
|
896
|
+
*/
|
|
897
|
+
ngOnDestroy(): void;
|
|
898
|
+
private cleanup;
|
|
899
|
+
private registerEvent;
|
|
900
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RecurrentEvent, never>;
|
|
901
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RecurrentEvent, "mglon-recurrent-event", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "startDate": { "alias": "startDate"; "required": true; "isSignal": true; }; "endDate": { "alias": "endDate"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "allDay": { "alias": "allDay"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "resourceId": { "alias": "resourceId"; "required": false; "isSignal": true; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; "isSignal": true; }; "isBlocked": { "alias": "isBlocked"; "required": false; "isSignal": true; }; "metadata": { "alias": "metadata"; "required": false; "isSignal": true; }; "tags": { "alias": "tags"; "required": false; "isSignal": true; }; "recurrenceRule": { "alias": "recurrenceRule"; "required": true; "isSignal": true; }; "recurrenceExceptions": { "alias": "recurrenceExceptions"; "required": false; "isSignal": true; }; }, { "eventClick": "eventClick"; "eventDblClick": "eventDblClick"; "eventContextMenu": "eventContextMenu"; "eventMouseEnter": "eventMouseEnter"; "eventMouseLeave": "eventMouseLeave"; }, never, never, true, never>;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
type ButtonAppereance = 'solid' | 'outline' | 'ghost' | 'link';
|
|
905
|
+
type ButtonColor = 'primary' | 'secondary' | 'error';
|
|
906
|
+
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
907
|
+
type ButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
908
|
+
declare class ButtonComponent {
|
|
909
|
+
readonly appereance: _angular_core.InputSignal<ButtonAppereance>;
|
|
910
|
+
readonly color: _angular_core.InputSignal<ButtonColor>;
|
|
911
|
+
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
912
|
+
readonly rounded: _angular_core.InputSignal<ButtonRadius>;
|
|
913
|
+
readonly density: _angular_core.InputSignal<"compact" | "comfortable">;
|
|
914
|
+
readonly active: _angular_core.InputSignal<boolean>;
|
|
915
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
916
|
+
elementRef: ElementRef<any>;
|
|
917
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
918
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "button[mglon-button], a[mglon-button]", never, { "appereance": { "alias": "appereance"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
type IconButtonAppereance = 'solid' | 'outline' | 'ghost';
|
|
922
|
+
declare class IconButtonComponent {
|
|
923
|
+
readonly appereance: _angular_core.InputSignal<IconButtonAppereance>;
|
|
924
|
+
readonly color: _angular_core.InputSignal<ButtonColor>;
|
|
925
|
+
readonly size: _angular_core.InputSignal<ButtonSize>;
|
|
926
|
+
readonly rounded: _angular_core.InputSignal<ButtonRadius>;
|
|
927
|
+
readonly active: _angular_core.InputSignal<boolean>;
|
|
928
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
929
|
+
elementRef: ElementRef<any>;
|
|
930
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconButtonComponent, never>;
|
|
931
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IconButtonComponent, "button[mglon-icon-button], a[mglon-icon-button]", never, { "appereance": { "alias": "appereance"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
declare class FabButtonComponent {
|
|
935
|
+
readonly size: _angular_core.InputSignal<"md" | "lg">;
|
|
936
|
+
readonly color: _angular_core.InputSignal<"primary" | "secondary" | "surface">;
|
|
937
|
+
readonly extended: _angular_core.InputSignal<boolean>;
|
|
938
|
+
classes: _angular_core.Signal<string>;
|
|
939
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FabButtonComponent, never>;
|
|
940
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FabButtonComponent, "button[mglon-fab-button], a[mglon-fab-button]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "extended": { "alias": "extended"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
type ButtonGroupType = 'text' | 'icon' | 'icon-text';
|
|
944
|
+
type ButtonGroupRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
945
|
+
declare class ButtonGroupComponent {
|
|
946
|
+
readonly type: _angular_core.InputSignal<ButtonGroupType>;
|
|
947
|
+
readonly density: _angular_core.InputSignal<"compact" | "comfortable">;
|
|
948
|
+
readonly appereance: _angular_core.InputSignal<"solid" | "outline" | "ghost" | "link">;
|
|
949
|
+
readonly rounded: _angular_core.InputSignal<ButtonGroupRadius>;
|
|
950
|
+
readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
951
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
952
|
+
readonly buttons: _angular_core.Signal<readonly ButtonComponent[]>;
|
|
953
|
+
readonly iconButtons: _angular_core.Signal<readonly IconButtonComponent[]>;
|
|
954
|
+
readonly indicatorStyle: _angular_core.WritableSignal<{
|
|
955
|
+
[key: string]: string;
|
|
956
|
+
}>;
|
|
957
|
+
constructor();
|
|
958
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonGroupComponent, never>;
|
|
959
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonGroupComponent, "mglon-button-group", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "appereance": { "alias": "appereance"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, ["buttons", "iconButtons"], ["*"], true, never>;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export { ButtonComponent, ButtonGroupComponent, DEFAULT_UI_CONFIG, Event, FabButtonComponent, IconButtonComponent, RESOURCE_ID_TOKEN, RecurrentEvent, ResourceEvents, ResourceView, Schedule, WeekView };
|
|
963
|
+
export type { Appearance, BorderRadius, ButtonAppereance, ButtonColor, ButtonGroupConfig, ButtonGroupRadius, ButtonGroupType, ButtonRadius, ButtonSize, Density, EventSlotConfig, EventSlotRadius, GridUIConfig, HeaderUIConfig, IconButtonAppereance, IconButtonConfig, IndicatorAppearance, IndicatorRadius, OverflowIndicatorConfig, ResourceItemConfig, SchedulerConfig, SelectionResult, SidebarUIConfig, TodayButtonConfig, UIConfig, ViewMode };
|