@zeyos/zx 4.1.1 → 4.3.0
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/CHANGELOG.md +81 -0
- package/DESIGN-SYSTEM.md +33 -3
- package/README.md +22 -5
- package/dist/types/components/app-icon/app-icon.d.ts +8 -1
- package/dist/types/components/aurora/aurora.d.ts +72 -0
- package/dist/types/components/calendar/calendar-model.d.ts +202 -0
- package/dist/types/components/calendar/calendar.d.ts +517 -0
- package/dist/types/components/card-view/card-view.d.ts +303 -0
- package/dist/types/components/card-view/record-card.d.ts +242 -0
- package/dist/types/components/dialog/dialog.d.ts +6 -1
- package/dist/types/components/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +572 -0
- package/dist/types/components/launcher/launcher.d.ts +5 -0
- package/dist/types/components/message/message.d.ts +9 -1
- package/dist/types/components/modal/modal.d.ts +44 -7
- package/dist/types/components/sheet/sheet.d.ts +22 -12
- package/dist/types/components/table/table.d.ts +120 -31
- package/dist/types/components/table-view/table-view.d.ts +192 -0
- package/dist/types/components/view/record-view.d.ts +464 -0
- package/dist/types/core/overlay-host.d.ts +12 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/zeyos/calendar.d.ts +91 -0
- package/dist/types/zeyos/icons.d.ts +18 -2
- package/dist/types/zeyos/index.d.ts +4 -0
- package/dist/types/zeyos/legacy-saved-views.d.ts +66 -0
- package/dist/types/zeyos/saved-views.d.ts +331 -0
- package/dist/types/zeyos/view.d.ts +305 -0
- package/dist/zx-zeyos.esm.js +4742 -1470
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +2536 -471
- package/dist/zx.esm.js +5193 -223
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +5193 -223
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1729 -182
- package/docs/llms.md +236 -32
- package/docs/llms.txt +16 -6
- package/package.json +1 -1
- package/src/components/account-menu/account-menu.css +1 -1
- package/src/components/app-icon/app-icon.css +77 -51
- package/src/components/app-icon/app-icon.js +28 -4
- package/src/components/app-rail/app-rail.css +12 -3
- package/src/components/app-sidebar/app-sidebar.css +11 -2
- package/src/components/aurora/aurora.css +143 -0
- package/src/components/aurora/aurora.js +146 -0
- package/src/components/avatar/avatar.css +1 -1
- package/src/components/button/button.css +2 -2
- package/src/components/calendar/calendar-model.js +402 -0
- package/src/components/calendar/calendar.css +609 -0
- package/src/components/calendar/calendar.js +1619 -0
- package/src/components/card/card.css +2 -2
- package/src/components/card-view/card-view.css +389 -0
- package/src/components/card-view/card-view.js +527 -0
- package/src/components/card-view/record-card.js +392 -0
- package/src/components/context-menu/context-menu.css +4 -4
- package/src/components/context-menu/context-menu.js +5 -1
- package/src/components/date-picker/date-picker.css +31 -12
- package/src/components/datebox/date-range-box.css +17 -2
- package/src/components/datebox/datebox.css +18 -3
- package/src/components/dialog/dialog.css +4 -3
- package/src/components/dialog/dialog.js +2 -1
- package/src/components/dropdown/dropdown.css +17 -3
- package/src/components/dropdown/dropdown.js +7 -2
- package/src/components/kanban-view/kanban-view.css +216 -0
- package/src/components/kanban-view/kanban-view.js +1228 -0
- package/src/components/launcher/launcher.css +24 -9
- package/src/components/launcher/launcher.js +9 -2
- package/src/components/master-panel/master-panel.css +14 -3
- package/src/components/menu-button/menu-button.css +4 -4
- package/src/components/message/message.css +13 -21
- package/src/components/message/message.js +17 -11
- package/src/components/modal/modal.css +19 -5
- package/src/components/modal/modal.js +99 -25
- package/src/components/navigation-bar/navigation-bar.css +17 -5
- package/src/components/panel/panel.css +10 -2
- package/src/components/select/select.css +26 -8
- package/src/components/sheet/sheet.css +28 -7
- package/src/components/sheet/sheet.js +43 -23
- package/src/components/table/table.css +83 -5
- package/src/components/table/table.js +322 -37
- package/src/components/table-view/table-view.css +18 -0
- package/src/components/table-view/table-view.js +347 -0
- package/src/components/tag-picker/tag-picker.css +18 -4
- package/src/components/tooltip/tooltip.css +17 -3
- package/src/components/tooltip/tooltip.js +4 -1
- package/src/components/view/record-view.css +114 -0
- package/src/components/view/record-view.js +770 -0
- package/src/core/overlay-host.js +23 -0
- package/src/index.js +15 -0
- package/src/zeyos/calendar.js +115 -0
- package/src/zeyos/icons.js +11 -4
- package/src/zeyos/index.js +13 -0
- package/src/zeyos/launcher.js +2 -2
- package/src/zeyos/legacy-saved-views.js +155 -0
- package/src/zeyos/saved-views.js +815 -0
- package/src/zeyos/table.js +3 -1
- package/src/zeyos/view.js +543 -0
- package/styles/icons.css +3 -10
- package/styles/tokens/dark.css +4 -0
- package/styles/tokens/semantic.css +142 -3
- package/styles/zx.css +6 -0
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { Component } from '../../core/component.js';
|
|
2
|
+
export type CalendarEvent = import('./calendar-model.js').CalendarEvent;
|
|
3
|
+
export type CalendarView = import('./calendar-model.js').CalendarView;
|
|
4
|
+
export type CalendarReader = import('./calendar-model.js').CalendarReader;
|
|
5
|
+
export type CalendarOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Event records.
|
|
8
|
+
*/
|
|
9
|
+
events?: Record<string, any>[];
|
|
10
|
+
/**
|
|
11
|
+
* Initial local anchor date; null uses today.
|
|
12
|
+
*/
|
|
13
|
+
date?: Date | string | number | null;
|
|
14
|
+
/**
|
|
15
|
+
* Initial view.
|
|
16
|
+
*/
|
|
17
|
+
view?: CalendarView;
|
|
18
|
+
/**
|
|
19
|
+
* Allowed views.
|
|
20
|
+
*/
|
|
21
|
+
views?: CalendarView[];
|
|
22
|
+
/**
|
|
23
|
+
* Intl locale override.
|
|
24
|
+
*/
|
|
25
|
+
locale?: string | string[];
|
|
26
|
+
/**
|
|
27
|
+
* First weekday, 0 (Sunday) through 6 (Saturday).
|
|
28
|
+
*/
|
|
29
|
+
weekStart?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Show ISO week numbers in month view.
|
|
32
|
+
*/
|
|
33
|
+
weekNumbers?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Show Monday–Friday in the week time grid.
|
|
36
|
+
*/
|
|
37
|
+
workweek?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Number of days in agenda view.
|
|
40
|
+
*/
|
|
41
|
+
agendaDays?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Time-grid snap interval in minutes.
|
|
44
|
+
*/
|
|
45
|
+
slotDuration?: number;
|
|
46
|
+
/**
|
|
47
|
+
* First visible minute of the day.
|
|
48
|
+
*/
|
|
49
|
+
slotMinTime?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Exclusive last visible minute of the day.
|
|
52
|
+
*/
|
|
53
|
+
slotMaxTime?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Minute initially scrolled into view.
|
|
56
|
+
*/
|
|
57
|
+
scrollTime?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Maximum visible month lanes before a More button.
|
|
60
|
+
*/
|
|
61
|
+
eventLimit?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Enable pointer time-range selection.
|
|
64
|
+
*/
|
|
65
|
+
selectable?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Enable event moving and resizing.
|
|
68
|
+
*/
|
|
69
|
+
editable?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Global move override; null inherits editable.
|
|
72
|
+
*/
|
|
73
|
+
eventStartEditable?: boolean | null;
|
|
74
|
+
/**
|
|
75
|
+
* Global resize override; null inherits editable.
|
|
76
|
+
*/
|
|
77
|
+
eventDurationEditable?: boolean | null;
|
|
78
|
+
/**
|
|
79
|
+
* Apply event proposals locally before persistence confirms.
|
|
80
|
+
*/
|
|
81
|
+
optimistic?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Show the current-time line in day/week views.
|
|
84
|
+
*/
|
|
85
|
+
nowIndicator?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Current-time override for deterministic rendering.
|
|
88
|
+
*/
|
|
89
|
+
now?: Date | (() => Date) | null;
|
|
90
|
+
/**
|
|
91
|
+
* Disable toolbar, date, selection, and editing controls.
|
|
92
|
+
*/
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Event ID reader.
|
|
96
|
+
*/
|
|
97
|
+
eventId?: CalendarReader;
|
|
98
|
+
/**
|
|
99
|
+
* Event title reader.
|
|
100
|
+
*/
|
|
101
|
+
eventTitle?: CalendarReader;
|
|
102
|
+
/**
|
|
103
|
+
* Event start reader.
|
|
104
|
+
*/
|
|
105
|
+
eventStart?: CalendarReader;
|
|
106
|
+
/**
|
|
107
|
+
* Event end reader.
|
|
108
|
+
*/
|
|
109
|
+
eventEnd?: CalendarReader;
|
|
110
|
+
/**
|
|
111
|
+
* Event all-day reader.
|
|
112
|
+
*/
|
|
113
|
+
eventAllDay?: CalendarReader;
|
|
114
|
+
/**
|
|
115
|
+
* Event colour reader.
|
|
116
|
+
*/
|
|
117
|
+
eventColor?: CalendarReader;
|
|
118
|
+
/**
|
|
119
|
+
* Event location reader.
|
|
120
|
+
*/
|
|
121
|
+
eventLocation?: CalendarReader;
|
|
122
|
+
/**
|
|
123
|
+
* Per-event move reader.
|
|
124
|
+
*/
|
|
125
|
+
eventEditable?: CalendarReader;
|
|
126
|
+
/**
|
|
127
|
+
* Per-event resize reader.
|
|
128
|
+
*/
|
|
129
|
+
eventDurationEditable?: CalendarReader;
|
|
130
|
+
/**
|
|
131
|
+
* Unit for numeric event dates.
|
|
132
|
+
*/
|
|
133
|
+
dateUnit?: 'milliseconds' | 'seconds';
|
|
134
|
+
/**
|
|
135
|
+
* Localized component messages.
|
|
136
|
+
*/
|
|
137
|
+
msg?: Record<string, string>;
|
|
138
|
+
/**
|
|
139
|
+
* Optional safe event-content renderer.
|
|
140
|
+
*/
|
|
141
|
+
renderEvent?: (event: CalendarEvent) => Node | string | null;
|
|
142
|
+
/**
|
|
143
|
+
* Programmatic event-data listener.
|
|
144
|
+
*/
|
|
145
|
+
oneventschange?: (event: CustomEvent<{
|
|
146
|
+
events: CalendarEvent[];
|
|
147
|
+
}>) => void;
|
|
148
|
+
/**
|
|
149
|
+
* View listener.
|
|
150
|
+
*/
|
|
151
|
+
onviewchange?: (event: CustomEvent<{
|
|
152
|
+
view: CalendarView;
|
|
153
|
+
oldView: CalendarView;
|
|
154
|
+
}>) => void;
|
|
155
|
+
/**
|
|
156
|
+
* Visible-range listener.
|
|
157
|
+
*/
|
|
158
|
+
ondateschange?: (event: CustomEvent<{
|
|
159
|
+
view: CalendarView;
|
|
160
|
+
start: Date;
|
|
161
|
+
end: Date;
|
|
162
|
+
}>) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Event activation listener.
|
|
165
|
+
*/
|
|
166
|
+
oneventclick?: (event: CustomEvent<{
|
|
167
|
+
event: CalendarEvent;
|
|
168
|
+
jsEvent: Event;
|
|
169
|
+
}>) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Event double-activation listener.
|
|
172
|
+
*/
|
|
173
|
+
oneventdblclick?: (event: CustomEvent<{
|
|
174
|
+
event: CalendarEvent;
|
|
175
|
+
jsEvent: Event;
|
|
176
|
+
}>) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Date/time activation listener.
|
|
179
|
+
*/
|
|
180
|
+
ondateclick?: (event: CustomEvent<{
|
|
181
|
+
date: Date;
|
|
182
|
+
allDay: boolean;
|
|
183
|
+
view: CalendarView;
|
|
184
|
+
jsEvent: Event;
|
|
185
|
+
}>) => void;
|
|
186
|
+
/**
|
|
187
|
+
* Range-selection listener.
|
|
188
|
+
*/
|
|
189
|
+
onselect?: (event: CustomEvent<{
|
|
190
|
+
start: Date;
|
|
191
|
+
end: Date;
|
|
192
|
+
allDay: boolean;
|
|
193
|
+
view: CalendarView;
|
|
194
|
+
jsEvent: Event;
|
|
195
|
+
}>) => void;
|
|
196
|
+
/**
|
|
197
|
+
* Move/resize proposal listener.
|
|
198
|
+
*/
|
|
199
|
+
oneventchange?: (event: CustomEvent<CalendarEventChangeDetail>) => void;
|
|
200
|
+
/**
|
|
201
|
+
* New-event command listener.
|
|
202
|
+
*/
|
|
203
|
+
onnew?: (event: CustomEvent<{
|
|
204
|
+
date: Date;
|
|
205
|
+
view: CalendarView;
|
|
206
|
+
jsEvent: Event;
|
|
207
|
+
}>) => void;
|
|
208
|
+
/**
|
|
209
|
+
* Month-overflow listener.
|
|
210
|
+
*/
|
|
211
|
+
onmoreclick?: (event: CustomEvent<{
|
|
212
|
+
date: Date;
|
|
213
|
+
count: number;
|
|
214
|
+
jsEvent: Event;
|
|
215
|
+
}>) => void;
|
|
216
|
+
};
|
|
217
|
+
export type CalendarEventChangeDetail = {
|
|
218
|
+
/**
|
|
219
|
+
* Proposed event.
|
|
220
|
+
*/
|
|
221
|
+
event: CalendarEvent;
|
|
222
|
+
/**
|
|
223
|
+
* Previous event.
|
|
224
|
+
*/
|
|
225
|
+
oldEvent: CalendarEvent;
|
|
226
|
+
/**
|
|
227
|
+
* Edit action.
|
|
228
|
+
*/
|
|
229
|
+
action: 'move' | 'resize';
|
|
230
|
+
/**
|
|
231
|
+
* Edit delta.
|
|
232
|
+
*/
|
|
233
|
+
delta: {
|
|
234
|
+
milliseconds: number;
|
|
235
|
+
days: number;
|
|
236
|
+
minutes: number;
|
|
237
|
+
endMilliseconds: number;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Originating pointer or keyboard event.
|
|
241
|
+
*/
|
|
242
|
+
jsEvent: Event;
|
|
243
|
+
/**
|
|
244
|
+
* Idempotent optimistic revert callback.
|
|
245
|
+
*/
|
|
246
|
+
revert: () => boolean;
|
|
247
|
+
};
|
|
248
|
+
export type CalendarSetOptions = {
|
|
249
|
+
silent?: boolean;
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Accessible, dependency-free agenda/day/week/month/year scheduling surface.
|
|
253
|
+
* @fires Calendar#viewchange
|
|
254
|
+
* @fires Calendar#dateschange
|
|
255
|
+
* @fires Calendar#eventclick
|
|
256
|
+
* @fires Calendar#eventdblclick
|
|
257
|
+
* @fires Calendar#dateclick
|
|
258
|
+
* @fires Calendar#select
|
|
259
|
+
* @fires Calendar#eventchange
|
|
260
|
+
* @fires Calendar#eventschange
|
|
261
|
+
* @fires Calendar#new
|
|
262
|
+
* @fires Calendar#moreclick
|
|
263
|
+
* @extends {Component<CalendarOptions>}
|
|
264
|
+
*/
|
|
265
|
+
export declare class Calendar extends Component<CalendarOptions> {
|
|
266
|
+
_createdRoot: boolean;
|
|
267
|
+
_original: {
|
|
268
|
+
attributes: string[][];
|
|
269
|
+
children: ChildNode[];
|
|
270
|
+
};
|
|
271
|
+
_views: import("./calendar-model.js").CalendarView[];
|
|
272
|
+
_view: any;
|
|
273
|
+
_date: Date;
|
|
274
|
+
_events: any;
|
|
275
|
+
_loading: boolean;
|
|
276
|
+
_destroyed: boolean;
|
|
277
|
+
_pointer: {
|
|
278
|
+
type: string;
|
|
279
|
+
pointerId: number;
|
|
280
|
+
startX: number;
|
|
281
|
+
startY: number;
|
|
282
|
+
oldEvent: import("./calendar-model.js").CalendarEvent;
|
|
283
|
+
event: import("./calendar-model.js").CalendarEvent;
|
|
284
|
+
action: string;
|
|
285
|
+
control: any;
|
|
286
|
+
timeOffsetMinutes: number;
|
|
287
|
+
dayOffset: number;
|
|
288
|
+
moved: boolean;
|
|
289
|
+
start?: undefined;
|
|
290
|
+
end?: undefined;
|
|
291
|
+
} | {
|
|
292
|
+
oldEvent?: undefined;
|
|
293
|
+
event?: undefined;
|
|
294
|
+
action?: undefined;
|
|
295
|
+
timeOffsetMinutes?: undefined;
|
|
296
|
+
dayOffset?: undefined;
|
|
297
|
+
type: string;
|
|
298
|
+
pointerId: number;
|
|
299
|
+
startX: number;
|
|
300
|
+
startY: number;
|
|
301
|
+
start: Date;
|
|
302
|
+
end: Date;
|
|
303
|
+
control: any;
|
|
304
|
+
moved: boolean;
|
|
305
|
+
};
|
|
306
|
+
_keyboardEdit: {
|
|
307
|
+
oldEvent: import("./calendar-model.js").CalendarEvent;
|
|
308
|
+
event: import("./calendar-model.js").CalendarEvent;
|
|
309
|
+
action: string;
|
|
310
|
+
control: HTMLElement;
|
|
311
|
+
};
|
|
312
|
+
_mutationVersions: Map<any, any>;
|
|
313
|
+
_mutationSerial: number;
|
|
314
|
+
_suppressClickId: string;
|
|
315
|
+
_suppressDateClick: boolean;
|
|
316
|
+
_focusedSlot: any;
|
|
317
|
+
_selection: any;
|
|
318
|
+
_nowTimer: number;
|
|
319
|
+
_range: {
|
|
320
|
+
start: Date;
|
|
321
|
+
end: Date;
|
|
322
|
+
};
|
|
323
|
+
static cssName: string;
|
|
324
|
+
/** @type {CalendarOptions} */
|
|
325
|
+
static defaults: CalendarOptions;
|
|
326
|
+
/** @returns {HTMLElement} */
|
|
327
|
+
render(): HTMLElement;
|
|
328
|
+
/** Returns defensive copies of every normalized event. @returns {CalendarEvent[]} */
|
|
329
|
+
getEvents(): CalendarEvent[];
|
|
330
|
+
/** Replaces all source records atomically. @param {Record<string, any>[]} events @param {CalendarSetOptions} [options={}] @returns {this} */
|
|
331
|
+
setEvents(events: Record<string, any>[], options?: CalendarSetOptions): this;
|
|
332
|
+
/** Adds one source event. @param {Record<string, any>} event @param {CalendarSetOptions} [options={}] @returns {this} */
|
|
333
|
+
addEvent(event: Record<string, any>, options?: CalendarSetOptions): this;
|
|
334
|
+
/**
|
|
335
|
+
* Updates one normalized event. Date changes accept valid Date objects, ISO strings, or numeric
|
|
336
|
+
* values in the configured date unit.
|
|
337
|
+
* @param {string|number} id Event id.
|
|
338
|
+
* @param {Partial<CalendarEvent>} changes Normalized event changes.
|
|
339
|
+
* @param {CalendarSetOptions} [options={}] Update behavior.
|
|
340
|
+
* @returns {this}
|
|
341
|
+
*/
|
|
342
|
+
updateEvent(id: string | number, changes: Partial<CalendarEvent>, options?: CalendarSetOptions): this;
|
|
343
|
+
/** Removes one event when present. @param {string|number} id Event id. @param {CalendarSetOptions} [options={}] @returns {this} */
|
|
344
|
+
removeEvent(id: string | number, options?: CalendarSetOptions): this;
|
|
345
|
+
/** Returns a copy of the current anchor date. @returns {Date} */
|
|
346
|
+
getDate(): Date;
|
|
347
|
+
/** Sets the anchor date and visible period. @param {Date|string|number} date @param {CalendarSetOptions} [options={}] @returns {this} */
|
|
348
|
+
setDate(date: Date | string | number, options?: CalendarSetOptions): this;
|
|
349
|
+
/** Returns the current view. @returns {CalendarView} */
|
|
350
|
+
getView(): CalendarView;
|
|
351
|
+
/** Changes view while retaining the anchor date. @param {CalendarView} view @param {CalendarSetOptions} [options={}] @returns {this} */
|
|
352
|
+
setView(view: CalendarView, options?: CalendarSetOptions): this;
|
|
353
|
+
/** Moves to the previous visible period. @returns {this} */
|
|
354
|
+
prev(): this;
|
|
355
|
+
/** Moves to the next visible period. @returns {this} */
|
|
356
|
+
next(): this;
|
|
357
|
+
/** Moves to today. @returns {this} */
|
|
358
|
+
today(): this;
|
|
359
|
+
/** Toggles loading state without discarding the rendered calendar. @param {boolean} [loading=true] @returns {this} */
|
|
360
|
+
setLoading(loading?: boolean): this;
|
|
361
|
+
/** Focuses an event in the current view when rendered. @param {string|number} id Event id. @returns {this} */
|
|
362
|
+
focusEvent(id: string | number): this;
|
|
363
|
+
/** Restores an enhanced target or removes the owned root and releases timers. @returns {void} */
|
|
364
|
+
destroy(): void;
|
|
365
|
+
/** @param {string} action @param {string} label @param {string|null} [iconName=null] @returns {HTMLButtonElement} */
|
|
366
|
+
_toolbarButton(action: string, label: string, iconName?: string | null): HTMLButtonElement;
|
|
367
|
+
/** @returns {import('./calendar-model.js').CalendarNormalizeOptions} */
|
|
368
|
+
_normalizeOptions(): import('./calendar-model.js').CalendarNormalizeOptions;
|
|
369
|
+
/** @param {{emitDates?: boolean, preserveFocus?: boolean, scroll?: boolean}} [options={}] @returns {void} */
|
|
370
|
+
_renderView(options?: {
|
|
371
|
+
emitDates?: boolean;
|
|
372
|
+
preserveFocus?: boolean;
|
|
373
|
+
scroll?: boolean;
|
|
374
|
+
}): void;
|
|
375
|
+
/** @param {{start: Date, end: Date}} range @returns {HTMLElement} */
|
|
376
|
+
_renderAgenda(range: {
|
|
377
|
+
start: Date;
|
|
378
|
+
end: Date;
|
|
379
|
+
}): HTMLElement;
|
|
380
|
+
/** @param {{start: Date, end: Date}} range @returns {HTMLElement} */
|
|
381
|
+
_renderTimeGrid(range: {
|
|
382
|
+
start: Date;
|
|
383
|
+
end: Date;
|
|
384
|
+
}): HTMLElement;
|
|
385
|
+
/** @param {Date[]} days @returns {HTMLElement} */
|
|
386
|
+
_renderAllDayRail(days: Date[]): HTMLElement;
|
|
387
|
+
/** @param {{start: Date, end: Date}} range @returns {HTMLElement} */
|
|
388
|
+
_renderMonth(range: {
|
|
389
|
+
start: Date;
|
|
390
|
+
end: Date;
|
|
391
|
+
}): HTMLElement;
|
|
392
|
+
/** @param {{start: Date, end: Date}} range @returns {HTMLElement} */
|
|
393
|
+
_renderYear(range: {
|
|
394
|
+
start: Date;
|
|
395
|
+
end: Date;
|
|
396
|
+
}): HTMLElement;
|
|
397
|
+
/**
|
|
398
|
+
* @param {CalendarEvent} event
|
|
399
|
+
* @param {{variant: 'agenda'|'timed'|'span'|'month', day: Date, resizable?: boolean}} context
|
|
400
|
+
* @returns {HTMLElement}
|
|
401
|
+
*/
|
|
402
|
+
_eventElement(event: CalendarEvent, context: {
|
|
403
|
+
variant: 'agenda' | 'timed' | 'span' | 'month';
|
|
404
|
+
day: Date;
|
|
405
|
+
resizable?: boolean;
|
|
406
|
+
}): HTMLElement;
|
|
407
|
+
/** @param {Date[]} days @param {number} min @param {number} max @returns {HTMLElement} */
|
|
408
|
+
_nowLine(days: Date[], min: number, max: number): HTMLElement;
|
|
409
|
+
/** @param {Event} event @returns {void} */
|
|
410
|
+
_onClick(event: Event): void;
|
|
411
|
+
/** @param {Event} event @returns {void} */
|
|
412
|
+
_onDoubleClick(event: Event): void;
|
|
413
|
+
/** @param {KeyboardEvent} event @returns {void} */
|
|
414
|
+
_onKeydown(event: KeyboardEvent): void;
|
|
415
|
+
/** @param {KeyboardEvent} event @param {HTMLElement} control @returns {void} */
|
|
416
|
+
_onEventKeydown(event: KeyboardEvent, control: HTMLElement): void;
|
|
417
|
+
/** @param {KeyboardEvent} event @param {HTMLElement} slot @returns {void} */
|
|
418
|
+
_onSlotKeydown(event: KeyboardEvent, slot: HTMLElement): void;
|
|
419
|
+
/** @param {KeyboardEvent} event @param {HTMLElement} day @returns {void} */
|
|
420
|
+
_onDayKeydown(event: KeyboardEvent, day: HTMLElement): void;
|
|
421
|
+
/** @param {PointerEvent} event @returns {void} */
|
|
422
|
+
_onPointerDown(event: PointerEvent): void;
|
|
423
|
+
/** @param {PointerEvent} event @returns {void} */
|
|
424
|
+
_onPointerMove(event: PointerEvent): void;
|
|
425
|
+
/** @param {PointerEvent} event @returns {void} */
|
|
426
|
+
_onPointerUp(event: PointerEvent): void;
|
|
427
|
+
/** @param {PointerEvent} event @returns {void} */
|
|
428
|
+
_cancelPointer(event: PointerEvent): void;
|
|
429
|
+
/** @param {CalendarEvent} event @param {'move'|'resize'} action @param {number} x @param {number} y @returns {CalendarEvent|null} */
|
|
430
|
+
_proposalAtPoint(event: CalendarEvent, action: 'move' | 'resize', x: number, y: number): CalendarEvent | null;
|
|
431
|
+
/** @param {number} x @param {number} y @param {Date|null} [fixedDay=null] @returns {Date|null} */
|
|
432
|
+
_timeAtPoint(x: number, y: number, fixedDay?: Date | null): Date | null;
|
|
433
|
+
/** @param {number} x @param {number} y @returns {Date|null} */
|
|
434
|
+
_dayAtPoint(x: number, y: number): Date | null;
|
|
435
|
+
/** @param {CalendarEvent} event @param {number} x @param {number} y @returns {{minutes: number, days: number}} */
|
|
436
|
+
_dragOffsetForEvent(event: CalendarEvent, x: number, y: number): {
|
|
437
|
+
minutes: number;
|
|
438
|
+
days: number;
|
|
439
|
+
};
|
|
440
|
+
/** @param {Date} day @returns {number} */
|
|
441
|
+
_timeGridDayIndex(day: Date): number;
|
|
442
|
+
/** @param {CalendarEvent} event @returns {string|null} */
|
|
443
|
+
_timedPreviewHeight(event: CalendarEvent): string | null;
|
|
444
|
+
/** @param {number} pointerId @returns {void} */
|
|
445
|
+
_capturePointer(pointerId: number): void;
|
|
446
|
+
/** @param {number} pointerId @returns {void} */
|
|
447
|
+
_releasePointerCapture(pointerId: number): void;
|
|
448
|
+
/** @param {Date} start @param {Date} end @returns {void} */
|
|
449
|
+
_previewSelection(start: Date, end: Date): void;
|
|
450
|
+
/** @returns {void} */
|
|
451
|
+
_clearSelectionPreview(): void;
|
|
452
|
+
/** @returns {void} */
|
|
453
|
+
_cancelKeyboardEdit(): void;
|
|
454
|
+
/** @param {CalendarEvent} oldEvent @param {CalendarEvent} proposed @param {'move'|'resize'} action @param {Event} jsEvent @returns {void} */
|
|
455
|
+
_commitMutation(oldEvent: CalendarEvent, proposed: CalendarEvent, action: 'move' | 'resize', jsEvent: Event): void;
|
|
456
|
+
/** @param {CalendarEvent} event @returns {void} */
|
|
457
|
+
_replaceNormalizedEvent(event: CalendarEvent): void;
|
|
458
|
+
/** @param {CalendarEvent} event @returns {boolean} */
|
|
459
|
+
_canMove(event: CalendarEvent): boolean;
|
|
460
|
+
/** @param {CalendarEvent} event @returns {boolean} */
|
|
461
|
+
_canResize(event: CalendarEvent): boolean;
|
|
462
|
+
/** @param {string|number} id @returns {CalendarEvent|null} */
|
|
463
|
+
_eventById(id: string | number): CalendarEvent | null;
|
|
464
|
+
/** @param {string|number} id @returns {number} */
|
|
465
|
+
_eventIndex(id: string | number): number;
|
|
466
|
+
/** @param {number} direction @returns {this} */
|
|
467
|
+
_page(direction: number): this;
|
|
468
|
+
/** @param {{start: Date, end: Date}} range @returns {string} */
|
|
469
|
+
_rangeTitle(range: {
|
|
470
|
+
start: Date;
|
|
471
|
+
end: Date;
|
|
472
|
+
}): string;
|
|
473
|
+
/** @param {CalendarEvent} event @param {Date} day @returns {string} */
|
|
474
|
+
_eventTime(event: CalendarEvent, day: Date): string;
|
|
475
|
+
/** @param {CalendarEvent} event @returns {string} */
|
|
476
|
+
_eventLabel(event: CalendarEvent): string;
|
|
477
|
+
/** @param {Date} date @returns {string} */
|
|
478
|
+
_dateTimeLabel(date: Date): string;
|
|
479
|
+
/** @param {Date} date @param {Intl.DateTimeFormatOptions} options @returns {string} */
|
|
480
|
+
_format(date: Date, options: Intl.DateTimeFormatOptions): string;
|
|
481
|
+
/** @returns {Date} */
|
|
482
|
+
_now(): Date;
|
|
483
|
+
/** @param {HTMLElement} target @returns {Date|null} */
|
|
484
|
+
_dateFromTarget(target: HTMLElement): Date | null;
|
|
485
|
+
/** @param {HTMLElement} target @returns {void} */
|
|
486
|
+
_rememberFocusedDate(target: HTMLElement): void;
|
|
487
|
+
/** @returns {{eventId?: string, eventAction?: string, date?: string, slot?: string}|null} */
|
|
488
|
+
_focusIdentity(): {
|
|
489
|
+
eventId?: string;
|
|
490
|
+
eventAction?: string;
|
|
491
|
+
date?: string;
|
|
492
|
+
slot?: string;
|
|
493
|
+
} | null;
|
|
494
|
+
/** @param {{eventId?: string, eventAction?: string, date?: string, slot?: string}} identity @returns {void} */
|
|
495
|
+
_restoreFocus(identity: {
|
|
496
|
+
eventId?: string;
|
|
497
|
+
eventAction?: string;
|
|
498
|
+
date?: string;
|
|
499
|
+
slot?: string;
|
|
500
|
+
}): void;
|
|
501
|
+
/** @returns {void} */
|
|
502
|
+
_scrollTimeGrid(): void;
|
|
503
|
+
/** @returns {void} */
|
|
504
|
+
_refreshNowIndicator(): void;
|
|
505
|
+
/** @param {string} message @returns {void} */
|
|
506
|
+
_announce(message: string): void;
|
|
507
|
+
}
|
|
508
|
+
/** @event Calendar#viewchange @type {CustomEvent<{view: CalendarView, oldView: CalendarView}>} */
|
|
509
|
+
/** @event Calendar#dateschange @type {CustomEvent<{view: CalendarView, start: Date, end: Date}>} */
|
|
510
|
+
/** @event Calendar#eventclick @type {CustomEvent<{event: CalendarEvent, jsEvent: Event}>} */
|
|
511
|
+
/** @event Calendar#eventdblclick @type {CustomEvent<{event: CalendarEvent, jsEvent: Event}>} */
|
|
512
|
+
/** @event Calendar#dateclick @type {CustomEvent<{date: Date, allDay: boolean, view: CalendarView, jsEvent: Event}>} */
|
|
513
|
+
/** @event Calendar#select @type {CustomEvent<{start: Date, end: Date, allDay: boolean, view: CalendarView, jsEvent: Event}>} */
|
|
514
|
+
/** @event Calendar#eventchange @type {CustomEvent<CalendarEventChangeDetail>} */
|
|
515
|
+
/** @event Calendar#eventschange @type {CustomEvent<{events: CalendarEvent[]}>} */
|
|
516
|
+
/** @event Calendar#new @type {CustomEvent<{date: Date, view: CalendarView, jsEvent: Event}>} */
|
|
517
|
+
/** @event Calendar#moreclick @type {CustomEvent<{date: Date, count: number, jsEvent: Event}>} */
|