@vadem/ui 0.1.0 → 0.2.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/fesm2022/vadem-ui-kanban.mjs +1021 -0
- package/fesm2022/vadem-ui-kanban.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +78 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -1
- package/fesm2022/vadem-ui-schedule.mjs +1836 -0
- package/fesm2022/vadem-ui-schedule.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +1 -1
- package/fesm2022/vadem-ui.mjs.map +1 -1
- package/package.json +9 -1
- package/styles/components/index.css +2 -0
- package/styles/components/kanban.css +220 -0
- package/styles/components/schedule.css +604 -0
- package/types/vadem-ui-kanban.d.ts +222 -0
- package/types/vadem-ui-locale.d.ts +31 -0
- package/types/vadem-ui-schedule.d.ts +402 -0
- package/types/vadem-ui.d.ts +1 -1
|
@@ -0,0 +1,1836 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, LOCALE_ID, ViewEncapsulation, afterNextRender, afterRenderEffect, booleanAttribute, computed, effect, inject, input, model, numberAttribute, output, signal } from "@angular/core";
|
|
3
|
+
import { VdButton } from "@vadem/ui/button";
|
|
4
|
+
import { vdCalendarKey, vdFirstDayOfWeek, vdFormatDate, vdToday, vdWeekdayNames } from "@vadem/ui/calendar";
|
|
5
|
+
import { vdUniqueId } from "@vadem/ui/field";
|
|
6
|
+
import { VdIcon } from "@vadem/ui/icon";
|
|
7
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
8
|
+
const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
9
|
+
function parseDate(value) {
|
|
10
|
+
const m = ISO_DATE.exec(value);
|
|
11
|
+
if (!m) return null;
|
|
12
|
+
const date = new Date(Date.UTC(+m[1], +m[2] - 1, +m[3]));
|
|
13
|
+
return date.toISOString().slice(0, 10) === value ? date : null;
|
|
14
|
+
}
|
|
15
|
+
function addDays(date, days) {
|
|
16
|
+
const d = parseDate(date);
|
|
17
|
+
d.setUTCDate(d.getUTCDate() + days);
|
|
18
|
+
return d.toISOString().slice(0, 10);
|
|
19
|
+
}
|
|
20
|
+
function addMonths(date, months) {
|
|
21
|
+
const d = parseDate(date);
|
|
22
|
+
const target = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + months, 1));
|
|
23
|
+
const last = new Date(Date.UTC(target.getUTCFullYear(), target.getUTCMonth() + 1, 0)).getUTCDate();
|
|
24
|
+
target.setUTCDate(Math.min(d.getUTCDate(), last));
|
|
25
|
+
return target.toISOString().slice(0, 10);
|
|
26
|
+
}
|
|
27
|
+
function weekday(date) {
|
|
28
|
+
return parseDate(date).getUTCDay();
|
|
29
|
+
}
|
|
30
|
+
function weekStart(date, firstDay) {
|
|
31
|
+
return addDays(date, -((weekday(date) - firstDay + 7) % 7));
|
|
32
|
+
}
|
|
33
|
+
const VD_DAY_MINUTES = 1440;
|
|
34
|
+
const DATE_TIME = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})$/;
|
|
35
|
+
function vdScheduleMinutes(value) {
|
|
36
|
+
const m = DATE_TIME.exec(value);
|
|
37
|
+
const date = parseDate(m ? m[1] : value);
|
|
38
|
+
if (!date) return null;
|
|
39
|
+
if (!m) return date.getTime() / 6e4;
|
|
40
|
+
const h = +m[2], min = +m[3];
|
|
41
|
+
if (h > 23 || min > 59) return null;
|
|
42
|
+
return date.getTime() / 6e4 + h * 60 + min;
|
|
43
|
+
}
|
|
44
|
+
function vdScheduleDateTime(minutes) {
|
|
45
|
+
return (/* @__PURE__ */ new Date(minutes * 6e4)).toISOString().slice(0, 16);
|
|
46
|
+
}
|
|
47
|
+
function vdScheduleDate(minutes) {
|
|
48
|
+
return (/* @__PURE__ */ new Date(minutes * 6e4)).toISOString().slice(0, 10);
|
|
49
|
+
}
|
|
50
|
+
function vdScheduleTimeOfDay(minutes) {
|
|
51
|
+
return (minutes % VD_DAY_MINUTES + VD_DAY_MINUTES) % VD_DAY_MINUTES;
|
|
52
|
+
}
|
|
53
|
+
function vdScheduleNormalize(event) {
|
|
54
|
+
if (event.allDay) {
|
|
55
|
+
const start = vdScheduleMinutes(event.start.slice(0, 10));
|
|
56
|
+
const last = vdScheduleMinutes(event.end.slice(0, 10));
|
|
57
|
+
if (start === null || last === null || last < start) return null;
|
|
58
|
+
return {
|
|
59
|
+
event,
|
|
60
|
+
allDay: true,
|
|
61
|
+
startMin: start,
|
|
62
|
+
endMin: last + VD_DAY_MINUTES,
|
|
63
|
+
startDate: event.start.slice(0, 10),
|
|
64
|
+
endDate: event.end.slice(0, 10)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const start = vdScheduleMinutes(event.start);
|
|
68
|
+
const end = vdScheduleMinutes(event.end);
|
|
69
|
+
if (start === null || end === null || end <= start || !event.start.includes("T")) return null;
|
|
70
|
+
return {
|
|
71
|
+
event,
|
|
72
|
+
allDay: false,
|
|
73
|
+
startMin: start,
|
|
74
|
+
endMin: end,
|
|
75
|
+
startDate: vdScheduleDate(start),
|
|
76
|
+
endDate: vdScheduleDate(end - 1)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function vdScheduleValid(events) {
|
|
80
|
+
const ids = /* @__PURE__ */ new Set();
|
|
81
|
+
for (const event of events) {
|
|
82
|
+
if (typeof event.id !== "string" || !event.id.trim() || ids.has(event.id)) return false;
|
|
83
|
+
if (!vdScheduleNormalize(event)) return false;
|
|
84
|
+
ids.add(event.id);
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
function vdScheduleItems(events) {
|
|
89
|
+
return events.map((e) => vdScheduleNormalize(e)).filter((i) => !!i).sort((a, b) => Number(b.allDay) - Number(a.allDay) || a.startMin - b.startMin || b.endMin - a.endMin || a.event.title.localeCompare(b.event.title));
|
|
90
|
+
}
|
|
91
|
+
function vdScheduleOnDay(items, date) {
|
|
92
|
+
return items.filter((i) => i.startDate <= date && i.endDate >= date);
|
|
93
|
+
}
|
|
94
|
+
function vdScheduleDays(view, date, firstDay, agendaDays = 14) {
|
|
95
|
+
switch (view) {
|
|
96
|
+
case "month": {
|
|
97
|
+
const start = weekStart(date.slice(0, 8) + "01", firstDay);
|
|
98
|
+
return Array.from({ length: 42 }, (_, i) => addDays(start, i));
|
|
99
|
+
}
|
|
100
|
+
case "week": {
|
|
101
|
+
const start = weekStart(date, firstDay);
|
|
102
|
+
return Array.from({ length: 7 }, (_, i) => addDays(start, i));
|
|
103
|
+
}
|
|
104
|
+
case "day": return [date];
|
|
105
|
+
case "agenda": return Array.from({ length: Math.max(1, agendaDays) }, (_, i) => addDays(date, i));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function vdScheduleStep(view, date, direction, agendaDays = 14) {
|
|
109
|
+
switch (view) {
|
|
110
|
+
case "month": return addMonths(date, direction);
|
|
111
|
+
case "week": return addDays(date, 7 * direction);
|
|
112
|
+
case "day": return addDays(date, direction);
|
|
113
|
+
case "agenda": return addDays(date, Math.max(1, agendaDays) * direction);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function vdScheduleLayout(items, date, fromMinute = 0, toMinute = VD_DAY_MINUTES) {
|
|
117
|
+
const dayStart = vdScheduleMinutes(date);
|
|
118
|
+
if (dayStart === null) return [];
|
|
119
|
+
const from = dayStart + fromMinute, to = dayStart + toMinute;
|
|
120
|
+
const visible = items.filter((i) => !i.allDay && i.startMin < to && i.endMin > from).sort((a, b) => a.startMin - b.startMin || b.endMin - a.endMin);
|
|
121
|
+
const result = [];
|
|
122
|
+
let cluster = [];
|
|
123
|
+
let columnEnds = [];
|
|
124
|
+
let clusterEnd = -Infinity;
|
|
125
|
+
const flush = () => {
|
|
126
|
+
for (const { item, column } of cluster) {
|
|
127
|
+
const start = Math.max(item.startMin, from), end = Math.min(item.endMin, to);
|
|
128
|
+
result.push({
|
|
129
|
+
item,
|
|
130
|
+
top: start - from,
|
|
131
|
+
bottom: end - from,
|
|
132
|
+
column,
|
|
133
|
+
columns: columnEnds.length,
|
|
134
|
+
clippedStart: item.startMin < from,
|
|
135
|
+
clippedEnd: item.endMin > to
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
cluster = [];
|
|
139
|
+
columnEnds = [];
|
|
140
|
+
};
|
|
141
|
+
for (const item of visible) {
|
|
142
|
+
if (item.startMin >= clusterEnd) flush();
|
|
143
|
+
let column = columnEnds.findIndex((end) => end <= item.startMin);
|
|
144
|
+
if (column < 0) column = columnEnds.push(item.endMin) - 1;
|
|
145
|
+
else columnEnds[column] = item.endMin;
|
|
146
|
+
cluster.push({
|
|
147
|
+
item,
|
|
148
|
+
column
|
|
149
|
+
});
|
|
150
|
+
clusterEnd = Math.max(clusterEnd === -Infinity ? item.endMin : clusterEnd, item.endMin);
|
|
151
|
+
}
|
|
152
|
+
flush();
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
155
|
+
function vdScheduleSnap(minutes, step) {
|
|
156
|
+
return step > 0 ? Math.round(minutes / step) * step : minutes;
|
|
157
|
+
}
|
|
158
|
+
function vdScheduleMove(item, deltaMinutes) {
|
|
159
|
+
if (item.allDay) {
|
|
160
|
+
const days = Math.round(deltaMinutes / VD_DAY_MINUTES);
|
|
161
|
+
return {
|
|
162
|
+
id: item.event.id,
|
|
163
|
+
start: addDays(item.startDate, days),
|
|
164
|
+
end: addDays(item.endDate, days),
|
|
165
|
+
allDay: true,
|
|
166
|
+
kind: "move"
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
id: item.event.id,
|
|
171
|
+
start: vdScheduleDateTime(item.startMin + deltaMinutes),
|
|
172
|
+
end: vdScheduleDateTime(item.endMin + deltaMinutes),
|
|
173
|
+
allDay: false,
|
|
174
|
+
kind: "move"
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
function vdScheduleResize(item, endMin, minimum) {
|
|
178
|
+
return {
|
|
179
|
+
id: item.event.id,
|
|
180
|
+
start: item.event.start,
|
|
181
|
+
end: vdScheduleDateTime(Math.max(endMin, item.startMin + Math.max(1, minimum))),
|
|
182
|
+
allDay: false,
|
|
183
|
+
kind: "resize"
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function vdScheduleApplyChange(events, change) {
|
|
187
|
+
if (!events.some((e) => e.id === change.id)) return events;
|
|
188
|
+
return events.map((e) => e.id === change.id ? {
|
|
189
|
+
...e,
|
|
190
|
+
start: change.start,
|
|
191
|
+
end: change.end,
|
|
192
|
+
allDay: change.allDay
|
|
193
|
+
} : e);
|
|
194
|
+
}
|
|
195
|
+
var VdSchedule = class VdSchedule {
|
|
196
|
+
events = input([], ...ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []);
|
|
197
|
+
view = model("month", ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
|
|
198
|
+
date = model(vdToday(), ...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
|
|
199
|
+
views = input([
|
|
200
|
+
"month",
|
|
201
|
+
"week",
|
|
202
|
+
"day",
|
|
203
|
+
"agenda"
|
|
204
|
+
], ...ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []);
|
|
205
|
+
locale = input(inject(LOCALE_ID), ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
206
|
+
firstDayOfWeek = input(void 0, ...ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []);
|
|
207
|
+
dayStartHour = input(0, {
|
|
208
|
+
...ngDevMode ? { debugName: "dayStartHour" } : /* istanbul ignore next */ {},
|
|
209
|
+
transform: numberAttribute
|
|
210
|
+
});
|
|
211
|
+
dayEndHour = input(24, {
|
|
212
|
+
...ngDevMode ? { debugName: "dayEndHour" } : /* istanbul ignore next */ {},
|
|
213
|
+
transform: numberAttribute
|
|
214
|
+
});
|
|
215
|
+
scrollToHour = input(8, {
|
|
216
|
+
...ngDevMode ? { debugName: "scrollToHour" } : /* istanbul ignore next */ {},
|
|
217
|
+
transform: numberAttribute
|
|
218
|
+
});
|
|
219
|
+
slotMinutes = input(30, {
|
|
220
|
+
...ngDevMode ? { debugName: "slotMinutes" } : /* istanbul ignore next */ {},
|
|
221
|
+
transform: numberAttribute
|
|
222
|
+
});
|
|
223
|
+
maxEventsPerDay = input(3, {
|
|
224
|
+
...ngDevMode ? { debugName: "maxEventsPerDay" } : /* istanbul ignore next */ {},
|
|
225
|
+
transform: numberAttribute
|
|
226
|
+
});
|
|
227
|
+
agendaDays = input(14, {
|
|
228
|
+
...ngDevMode ? { debugName: "agendaDays" } : /* istanbul ignore next */ {},
|
|
229
|
+
transform: numberAttribute
|
|
230
|
+
});
|
|
231
|
+
now = input(null, ...ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []);
|
|
232
|
+
editable = input(true, {
|
|
233
|
+
...ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {},
|
|
234
|
+
transform: booleanAttribute
|
|
235
|
+
});
|
|
236
|
+
label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
|
|
237
|
+
todayText = input(...ngDevMode ? [void 0, { debugName: "todayText" }] : /* istanbul ignore next */ []);
|
|
238
|
+
previousLabel = input(...ngDevMode ? [void 0, { debugName: "previousLabel" }] : /* istanbul ignore next */ []);
|
|
239
|
+
nextLabel = input(...ngDevMode ? [void 0, { debugName: "nextLabel" }] : /* istanbul ignore next */ []);
|
|
240
|
+
viewLabel = input(...ngDevMode ? [void 0, { debugName: "viewLabel" }] : /* istanbul ignore next */ []);
|
|
241
|
+
monthText = input(...ngDevMode ? [void 0, { debugName: "monthText" }] : /* istanbul ignore next */ []);
|
|
242
|
+
weekText = input(...ngDevMode ? [void 0, { debugName: "weekText" }] : /* istanbul ignore next */ []);
|
|
243
|
+
dayText = input(...ngDevMode ? [void 0, { debugName: "dayText" }] : /* istanbul ignore next */ []);
|
|
244
|
+
agendaText = input(...ngDevMode ? [void 0, { debugName: "agendaText" }] : /* istanbul ignore next */ []);
|
|
245
|
+
allDayText = input(...ngDevMode ? [void 0, { debugName: "allDayText" }] : /* istanbul ignore next */ []);
|
|
246
|
+
emptyText = input(...ngDevMode ? [void 0, { debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
247
|
+
invalidText = input(...ngDevMode ? [void 0, { debugName: "invalidText" }] : /* istanbul ignore next */ []);
|
|
248
|
+
moreText = input(...ngDevMode ? [void 0, { debugName: "moreText" }] : /* istanbul ignore next */ []);
|
|
249
|
+
eventsText = input(...ngDevMode ? [void 0, { debugName: "eventsText" }] : /* istanbul ignore next */ []);
|
|
250
|
+
changedText = input(...ngDevMode ? [void 0, { debugName: "changedText" }] : /* istanbul ignore next */ []);
|
|
251
|
+
canceledText = input(...ngDevMode ? [void 0, { debugName: "canceledText" }] : /* istanbul ignore next */ []);
|
|
252
|
+
eventActivate = output();
|
|
253
|
+
slotActivate = output();
|
|
254
|
+
eventChange = output();
|
|
255
|
+
t = vdTexts("schedule", {
|
|
256
|
+
label: this.label,
|
|
257
|
+
todayText: this.todayText,
|
|
258
|
+
previousLabel: this.previousLabel,
|
|
259
|
+
nextLabel: this.nextLabel,
|
|
260
|
+
viewLabel: this.viewLabel,
|
|
261
|
+
monthText: this.monthText,
|
|
262
|
+
weekText: this.weekText,
|
|
263
|
+
dayText: this.dayText,
|
|
264
|
+
agendaText: this.agendaText,
|
|
265
|
+
allDayText: this.allDayText,
|
|
266
|
+
emptyText: this.emptyText,
|
|
267
|
+
invalidText: this.invalidText,
|
|
268
|
+
moreText: this.moreText,
|
|
269
|
+
eventsText: this.eventsText,
|
|
270
|
+
changedText: this.changedText,
|
|
271
|
+
canceledText: this.canceledText
|
|
272
|
+
});
|
|
273
|
+
baseId = vdUniqueId("vd-schedule");
|
|
274
|
+
today = computed(() => this.now()?.slice(0, 10) ?? vdToday(), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
|
|
275
|
+
valid = computed(() => vdScheduleValid(this.events()), ...ngDevMode ? [{ debugName: "valid" }] : /* istanbul ignore next */ []);
|
|
276
|
+
items = computed(() => this.valid() ? vdScheduleItems(this.events()) : [], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
277
|
+
firstDay = computed(() => this.firstDayOfWeek() ?? vdFirstDayOfWeek(this.locale()), ...ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []);
|
|
278
|
+
days = computed(() => vdScheduleDays(this.view(), this.date(), this.firstDay(), this.agendaDays()), ...ngDevMode ? [{ debugName: "days" }] : /* istanbul ignore next */ []);
|
|
279
|
+
weeks = computed(() => {
|
|
280
|
+
const days = this.days();
|
|
281
|
+
return Array.from({ length: days.length / 7 }, (_, i) => days.slice(i * 7, i * 7 + 7));
|
|
282
|
+
}, ...ngDevMode ? [{ debugName: "weeks" }] : /* istanbul ignore next */ []);
|
|
283
|
+
weekdays = computed(() => {
|
|
284
|
+
const short = vdWeekdayNames(this.locale(), this.firstDay(), "short");
|
|
285
|
+
const long = vdWeekdayNames(this.locale(), this.firstDay(), "long");
|
|
286
|
+
return short.map((s, i) => ({
|
|
287
|
+
short: s,
|
|
288
|
+
long: long[i]
|
|
289
|
+
}));
|
|
290
|
+
}, ...ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []);
|
|
291
|
+
hours = computed(() => {
|
|
292
|
+
const from = Math.max(0, Math.min(23, this.dayStartHour()));
|
|
293
|
+
const to = Math.max(from + 1, Math.min(24, this.dayEndHour()));
|
|
294
|
+
return Array.from({ length: to - from }, (_, i) => from + i);
|
|
295
|
+
}, ...ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []);
|
|
296
|
+
month = computed(() => {
|
|
297
|
+
const map = /* @__PURE__ */ new Map();
|
|
298
|
+
if (this.view() !== "month") return map;
|
|
299
|
+
const max = Math.max(1, this.maxEventsPerDay());
|
|
300
|
+
for (const day of this.days()) {
|
|
301
|
+
const all = vdScheduleOnDay(this.items(), day);
|
|
302
|
+
if (!all.length) continue;
|
|
303
|
+
const visible = all.length > max ? all.slice(0, max - 1) : all;
|
|
304
|
+
map.set(day, {
|
|
305
|
+
visible,
|
|
306
|
+
more: all.length - visible.length
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return map;
|
|
310
|
+
}, ...ngDevMode ? [{ debugName: "month" }] : /* istanbul ignore next */ []);
|
|
311
|
+
layout = computed(() => {
|
|
312
|
+
const map = /* @__PURE__ */ new Map();
|
|
313
|
+
const from = this.hours()[0] * 60, to = (this.hours().at(-1) + 1) * 60;
|
|
314
|
+
for (const day of this.days()) map.set(day, vdScheduleLayout(this.items(), day, from, to));
|
|
315
|
+
return map;
|
|
316
|
+
}, ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
317
|
+
agenda = computed(() => this.days().map((date) => ({
|
|
318
|
+
date,
|
|
319
|
+
items: vdScheduleOnDay(this.items(), date)
|
|
320
|
+
})).filter((group) => group.items.length), ...ngDevMode ? [{ debugName: "agenda" }] : /* istanbul ignore next */ []);
|
|
321
|
+
title = computed(() => {
|
|
322
|
+
const days = this.days(), locale = this.locale();
|
|
323
|
+
switch (this.view()) {
|
|
324
|
+
case "month": return vdFormatDate(this.date(), locale, {
|
|
325
|
+
month: "long",
|
|
326
|
+
year: "numeric"
|
|
327
|
+
});
|
|
328
|
+
case "day": return this.longDate(this.date());
|
|
329
|
+
default: return new Intl.DateTimeFormat(locale, {
|
|
330
|
+
day: "numeric",
|
|
331
|
+
month: "long",
|
|
332
|
+
year: "numeric",
|
|
333
|
+
timeZone: "UTC"
|
|
334
|
+
}).formatRange(new Date(days[0]), new Date(days.at(-1)));
|
|
335
|
+
}
|
|
336
|
+
}, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
337
|
+
focusDate = signal(this.date(), ...ngDevMode ? [{ debugName: "focusDate" }] : /* istanbul ignore next */ []);
|
|
338
|
+
draggingId = signal(null, ...ngDevMode ? [{ debugName: "draggingId" }] : /* istanbul ignore next */ []);
|
|
339
|
+
preview = signal(null, ...ngDevMode ? [{ debugName: "preview" }] : /* istanbul ignore next */ []);
|
|
340
|
+
messages = signal([], ...ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []);
|
|
341
|
+
host = inject(ElementRef).nativeElement;
|
|
342
|
+
drag = null;
|
|
343
|
+
moveFocus = false;
|
|
344
|
+
suppressClick = false;
|
|
345
|
+
serial = 0;
|
|
346
|
+
scrolledView = null;
|
|
347
|
+
constructor() {
|
|
348
|
+
effect(() => {
|
|
349
|
+
const days = this.days();
|
|
350
|
+
const focus = this.focusDate();
|
|
351
|
+
if (this.view() === "month" && !days.includes(focus)) this.focusDate.set(days.includes(this.date()) ? this.date() : days[7]);
|
|
352
|
+
});
|
|
353
|
+
effect(() => {
|
|
354
|
+
const events = this.events();
|
|
355
|
+
if (this.drag && events !== this.drag.events) this.finish(true);
|
|
356
|
+
});
|
|
357
|
+
afterRenderEffect(() => {
|
|
358
|
+
const focus = this.focusDate();
|
|
359
|
+
if (!this.moveFocus) return;
|
|
360
|
+
this.moveFocus = false;
|
|
361
|
+
this.host.querySelector(`.vd-schedule__cell[data-date="${focus}"] .vd-schedule__day`)?.focus();
|
|
362
|
+
});
|
|
363
|
+
afterRenderEffect(() => {
|
|
364
|
+
const key = this.view() + this.days()[0];
|
|
365
|
+
if (this.view() !== "week" && this.view() !== "day") return;
|
|
366
|
+
if (this.scrolledView === key) return;
|
|
367
|
+
this.scrolledView = key;
|
|
368
|
+
const scroller = this.host.querySelector(".vd-schedule__scroll");
|
|
369
|
+
const grid = this.host.querySelector(".vd-schedule__grid");
|
|
370
|
+
if (!scroller || !grid) return;
|
|
371
|
+
const offset = Math.max(0, this.scrollToHour() - this.hours()[0]);
|
|
372
|
+
scroller.scrollTop = grid.scrollHeight / this.hours().length * offset;
|
|
373
|
+
});
|
|
374
|
+
const destroyRef = inject(DestroyRef);
|
|
375
|
+
destroyRef.onDestroy(() => this.finish(false));
|
|
376
|
+
afterNextRender(() => {
|
|
377
|
+
const click = (event) => {
|
|
378
|
+
if (!this.suppressClick) return;
|
|
379
|
+
this.suppressClick = false;
|
|
380
|
+
event.preventDefault();
|
|
381
|
+
event.stopPropagation();
|
|
382
|
+
};
|
|
383
|
+
const press = () => this.suppressClick = false;
|
|
384
|
+
this.host.addEventListener("click", click, true);
|
|
385
|
+
this.host.addEventListener("pointerdown", press, true);
|
|
386
|
+
destroyRef.onDestroy(() => {
|
|
387
|
+
this.host.removeEventListener("click", click, true);
|
|
388
|
+
this.host.removeEventListener("pointerdown", press, true);
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
goToday() {
|
|
393
|
+
this.date.set(this.today());
|
|
394
|
+
this.focusDate.set(this.today());
|
|
395
|
+
}
|
|
396
|
+
step(direction) {
|
|
397
|
+
const next = vdScheduleStep(this.view(), this.date(), direction, this.agendaDays());
|
|
398
|
+
this.date.set(next);
|
|
399
|
+
this.focusDate.set(next);
|
|
400
|
+
}
|
|
401
|
+
openDay(date) {
|
|
402
|
+
this.date.set(date);
|
|
403
|
+
this.focusDate.set(date);
|
|
404
|
+
if (this.views().includes("day")) this.view.set("day");
|
|
405
|
+
}
|
|
406
|
+
monthKey(event) {
|
|
407
|
+
if (!event.target.classList.contains("vd-schedule__day")) return;
|
|
408
|
+
const rtl = this.host.ownerDocument.defaultView?.getComputedStyle(this.host).direction === "rtl";
|
|
409
|
+
const next = vdCalendarKey(event.key, this.focusDate(), {
|
|
410
|
+
firstDay: this.firstDay(),
|
|
411
|
+
rtl,
|
|
412
|
+
shift: event.shiftKey
|
|
413
|
+
});
|
|
414
|
+
if (!next) return;
|
|
415
|
+
event.preventDefault();
|
|
416
|
+
if (!this.days().includes(next)) this.date.set(next);
|
|
417
|
+
this.focusDate.set(next);
|
|
418
|
+
this.moveFocus = true;
|
|
419
|
+
}
|
|
420
|
+
activate(event) {
|
|
421
|
+
this.eventActivate.emit(event);
|
|
422
|
+
}
|
|
423
|
+
emptyClick(event) {
|
|
424
|
+
const target = event.target;
|
|
425
|
+
if (target.closest("button")) return;
|
|
426
|
+
const cell = target.closest(".vd-schedule__cell, .vd-schedule__allday-cell");
|
|
427
|
+
if (cell) {
|
|
428
|
+
this.slotActivate.emit({
|
|
429
|
+
date: cell.dataset["date"],
|
|
430
|
+
time: null
|
|
431
|
+
});
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
const column = target.closest(".vd-schedule__column");
|
|
435
|
+
if (column) this.slotClick(event, column, column.dataset["date"]);
|
|
436
|
+
}
|
|
437
|
+
slotClick(event, column, date) {
|
|
438
|
+
const minute = this.minuteAt(column, event.clientY);
|
|
439
|
+
const snapped = Math.min(VD_DAY_MINUTES - this.slot(), Math.floor(minute / this.slot()) * this.slot());
|
|
440
|
+
this.slotActivate.emit({
|
|
441
|
+
date,
|
|
442
|
+
time: this.clock(snapped)
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
dragStart(event, item, kind) {
|
|
446
|
+
if (!this.editable() || !event.isPrimary || event.button !== 0 || event.pointerType === "touch" || this.drag) return;
|
|
447
|
+
if (kind === "resize") event.stopPropagation();
|
|
448
|
+
const element = kind === "resize" ? event.currentTarget.closest(".vd-schedule__block") : event.currentTarget;
|
|
449
|
+
try {
|
|
450
|
+
element.setPointerCapture(event.pointerId);
|
|
451
|
+
} catch {
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
event.preventDefault();
|
|
455
|
+
this.drag = {
|
|
456
|
+
pointer: event.pointerId,
|
|
457
|
+
element,
|
|
458
|
+
item,
|
|
459
|
+
kind,
|
|
460
|
+
events: this.events(),
|
|
461
|
+
x: event.clientX,
|
|
462
|
+
y: event.clientY,
|
|
463
|
+
origin: this.pointAt(event.clientX, event.clientY, item.allDay),
|
|
464
|
+
active: false
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
dragMove(event) {
|
|
468
|
+
const drag = this.drag;
|
|
469
|
+
if (!drag || drag.pointer !== event.pointerId) return;
|
|
470
|
+
if (event.buttons === 0) {
|
|
471
|
+
this.finish(false);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
if (!drag.active && Math.hypot(event.clientX - drag.x, event.clientY - drag.y) < 4) return;
|
|
475
|
+
if (!drag.active) {
|
|
476
|
+
drag.active = true;
|
|
477
|
+
if (!drag.element.contains(this.host.ownerDocument.activeElement)) drag.element.focus({ preventScroll: true });
|
|
478
|
+
this.draggingId.set(drag.item.event.id);
|
|
479
|
+
}
|
|
480
|
+
const change = this.changeAt(drag, event.clientX, event.clientY);
|
|
481
|
+
this.preview.set(change ? {
|
|
482
|
+
change,
|
|
483
|
+
item: drag.item
|
|
484
|
+
} : null);
|
|
485
|
+
}
|
|
486
|
+
dragEnd(event) {
|
|
487
|
+
const drag = this.drag;
|
|
488
|
+
if (!drag || drag.pointer !== event.pointerId) return;
|
|
489
|
+
const change = drag.active ? this.changeAt(drag, event.clientX, event.clientY) : null;
|
|
490
|
+
this.suppressClick = drag.active;
|
|
491
|
+
this.finish(drag.active && !change);
|
|
492
|
+
if (change) {
|
|
493
|
+
this.announce(this.t().changedText(drag.item.event.title, this.whenText(change)));
|
|
494
|
+
this.eventChange.emit(change);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
dragCancel(event) {
|
|
498
|
+
if (event.pointerId === this.drag?.pointer) this.finish(!!this.drag?.active);
|
|
499
|
+
}
|
|
500
|
+
key(event) {
|
|
501
|
+
if (!this.drag) {
|
|
502
|
+
if (this.view() === "month") this.monthKey(event);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
if (event.isComposing) return;
|
|
506
|
+
if (event.key === "Escape" || event.key === "Tab") {
|
|
507
|
+
if (event.key === "Escape") {
|
|
508
|
+
event.preventDefault();
|
|
509
|
+
event.stopPropagation();
|
|
510
|
+
}
|
|
511
|
+
this.suppressClick = this.drag.active;
|
|
512
|
+
this.finish(true);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
changeAt(drag, x, y) {
|
|
516
|
+
const point = this.pointAt(x, y, drag.item.allDay);
|
|
517
|
+
if (!point || !drag.origin) return null;
|
|
518
|
+
const dayDelta = (vdScheduleMinutes(point.date) - vdScheduleMinutes(drag.origin.date)) / VD_DAY_MINUTES;
|
|
519
|
+
let change;
|
|
520
|
+
if (drag.kind === "resize") {
|
|
521
|
+
const end = vdScheduleMinutes(point.date) + vdScheduleSnap(point.minute, this.slot());
|
|
522
|
+
change = vdScheduleResize(drag.item, end, this.slot());
|
|
523
|
+
} else if (drag.item.allDay || this.view() === "month") change = vdScheduleMove(drag.item, dayDelta * VD_DAY_MINUTES);
|
|
524
|
+
else {
|
|
525
|
+
const minutes = vdScheduleSnap(point.minute - drag.origin.minute, this.slot());
|
|
526
|
+
change = vdScheduleMove(drag.item, dayDelta * VD_DAY_MINUTES + minutes);
|
|
527
|
+
}
|
|
528
|
+
return change.start === drag.item.event.start && change.end === drag.item.event.end ? null : change;
|
|
529
|
+
}
|
|
530
|
+
pointAt(x, y, allDay) {
|
|
531
|
+
const selector = this.view() === "month" ? ".vd-schedule__cell[data-date]" : allDay ? ".vd-schedule__allday-cell[data-date]" : ".vd-schedule__column[data-date]";
|
|
532
|
+
for (const el of Array.from(this.host.querySelectorAll(selector))) {
|
|
533
|
+
const r = el.getBoundingClientRect();
|
|
534
|
+
if (!(x >= r.left && x <= r.right && (allDay || this.view() === "month" ? y >= r.top && y <= r.bottom : true))) continue;
|
|
535
|
+
const minute = this.view() === "month" || allDay ? 0 : this.minuteAt(el, y);
|
|
536
|
+
return {
|
|
537
|
+
date: el.dataset["date"],
|
|
538
|
+
minute
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
minuteAt(column, y) {
|
|
544
|
+
const r = column.getBoundingClientRect();
|
|
545
|
+
const from = this.hours()[0] * 60;
|
|
546
|
+
const span = this.hours().length * 60;
|
|
547
|
+
return from + Math.max(0, Math.min(1, (y - r.top) / r.height)) * span;
|
|
548
|
+
}
|
|
549
|
+
finish(announce) {
|
|
550
|
+
const drag = this.drag;
|
|
551
|
+
this.drag = null;
|
|
552
|
+
this.draggingId.set(null);
|
|
553
|
+
this.preview.set(null);
|
|
554
|
+
if (!drag) return;
|
|
555
|
+
if (drag.element.hasPointerCapture?.(drag.pointer)) drag.element.releasePointerCapture(drag.pointer);
|
|
556
|
+
if (announce && drag.active) this.announce(this.t().canceledText(drag.item.event.title));
|
|
557
|
+
}
|
|
558
|
+
ghost(day) {
|
|
559
|
+
const pv = this.preview();
|
|
560
|
+
if (!pv || pv.change.allDay || this.view() === "month") return null;
|
|
561
|
+
const start = vdScheduleMinutes(pv.change.start), end = vdScheduleMinutes(pv.change.end);
|
|
562
|
+
const dayStart = vdScheduleMinutes(day);
|
|
563
|
+
const from = dayStart + this.hours()[0] * 60, to = dayStart + (this.hours().at(-1) + 1) * 60;
|
|
564
|
+
if (end <= from || start >= to) return null;
|
|
565
|
+
const top = Math.max(start, from) - from;
|
|
566
|
+
return {
|
|
567
|
+
top,
|
|
568
|
+
span: Math.min(end, to) - from - top,
|
|
569
|
+
startMin: start
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
nowLine(day) {
|
|
573
|
+
const now = this.now();
|
|
574
|
+
if (!now || now.slice(0, 10) !== day) return null;
|
|
575
|
+
const minute = vdScheduleMinutes(now);
|
|
576
|
+
if (minute === null) return null;
|
|
577
|
+
const offset = vdScheduleTimeOfDay(minute) - this.hours()[0] * 60;
|
|
578
|
+
return offset >= 0 && offset <= this.hours().length * 60 ? offset : null;
|
|
579
|
+
}
|
|
580
|
+
allDay(day) {
|
|
581
|
+
return vdScheduleOnDay(this.items(), day).filter((i) => i.allDay);
|
|
582
|
+
}
|
|
583
|
+
viewText(view) {
|
|
584
|
+
const t = this.t();
|
|
585
|
+
return {
|
|
586
|
+
month: t.monthText,
|
|
587
|
+
week: t.weekText,
|
|
588
|
+
day: t.dayText,
|
|
589
|
+
agenda: t.agendaText
|
|
590
|
+
}[view];
|
|
591
|
+
}
|
|
592
|
+
sameMonth(day) {
|
|
593
|
+
return day.slice(0, 7) === this.date().slice(0, 7);
|
|
594
|
+
}
|
|
595
|
+
dayNumber(day) {
|
|
596
|
+
return vdFormatDate(day, this.locale(), { day: "numeric" });
|
|
597
|
+
}
|
|
598
|
+
weekdayShort(day) {
|
|
599
|
+
return vdFormatDate(day, this.locale(), { weekday: "short" });
|
|
600
|
+
}
|
|
601
|
+
longDate(day) {
|
|
602
|
+
return vdFormatDate(day, this.locale(), {
|
|
603
|
+
weekday: "long",
|
|
604
|
+
day: "numeric",
|
|
605
|
+
month: "long",
|
|
606
|
+
year: "numeric"
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
dayLabel(day) {
|
|
610
|
+
const count = vdScheduleOnDay(this.items(), day).length;
|
|
611
|
+
return `${this.longDate(day)}, ${this.t().eventsText(count)}`;
|
|
612
|
+
}
|
|
613
|
+
time(minutes) {
|
|
614
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
615
|
+
hour: "numeric",
|
|
616
|
+
minute: "2-digit",
|
|
617
|
+
timeZone: "UTC"
|
|
618
|
+
}).format(/* @__PURE__ */ new Date(minutes * 6e4));
|
|
619
|
+
}
|
|
620
|
+
hourLabel(hour) {
|
|
621
|
+
return new Intl.DateTimeFormat(this.locale(), {
|
|
622
|
+
hour: "numeric",
|
|
623
|
+
timeZone: "UTC"
|
|
624
|
+
}).format(new Date(Date.UTC(2026, 0, 1, hour)));
|
|
625
|
+
}
|
|
626
|
+
rangeText(item, day) {
|
|
627
|
+
if (item.allDay) return this.t().allDayText;
|
|
628
|
+
return `${item.startDate === day ? this.time(item.startMin) : "…"} – ${vdScheduleDate(item.endMin - 1) === day ? this.time(item.endMin) : "…"}`;
|
|
629
|
+
}
|
|
630
|
+
eventLabel(item) {
|
|
631
|
+
const date = this.longDate(item.startDate);
|
|
632
|
+
if (item.allDay) {
|
|
633
|
+
const last = item.endDate !== item.startDate ? ` – ${this.longDate(item.endDate)}` : "";
|
|
634
|
+
return `${item.event.title}, ${date}${last}, ${this.t().allDayText}`;
|
|
635
|
+
}
|
|
636
|
+
const end = item.endDate !== item.startDate ? `${this.longDate(item.endDate)} ${this.time(item.endMin)}` : this.time(item.endMin);
|
|
637
|
+
return `${item.event.title}, ${date}, ${this.time(item.startMin)} – ${end}`;
|
|
638
|
+
}
|
|
639
|
+
whenText(change) {
|
|
640
|
+
if (change.allDay) return this.longDate(change.start);
|
|
641
|
+
const start = vdScheduleMinutes(change.start);
|
|
642
|
+
return `${this.longDate(change.start.slice(0, 10))}, ${this.time(start)}`;
|
|
643
|
+
}
|
|
644
|
+
clock(minutes) {
|
|
645
|
+
const h = Math.floor(minutes / 60), m = Math.round(minutes % 60);
|
|
646
|
+
return `${String(h).padStart(2, "0")}:${String(m).padStart(2, "0")}`;
|
|
647
|
+
}
|
|
648
|
+
slot() {
|
|
649
|
+
return Math.max(5, Math.min(120, this.slotMinutes()));
|
|
650
|
+
}
|
|
651
|
+
announce(text) {
|
|
652
|
+
this.messages.set([{
|
|
653
|
+
serial: ++this.serial,
|
|
654
|
+
text
|
|
655
|
+
}]);
|
|
656
|
+
}
|
|
657
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
658
|
+
minVersion: "12.0.0",
|
|
659
|
+
version: "22.2.1",
|
|
660
|
+
ngImport: i0,
|
|
661
|
+
type: VdSchedule,
|
|
662
|
+
deps: [],
|
|
663
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
664
|
+
});
|
|
665
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
666
|
+
minVersion: "17.0.0",
|
|
667
|
+
version: "22.2.1",
|
|
668
|
+
type: VdSchedule,
|
|
669
|
+
isStandalone: true,
|
|
670
|
+
selector: "vd-schedule",
|
|
671
|
+
inputs: {
|
|
672
|
+
events: {
|
|
673
|
+
classPropertyName: "events",
|
|
674
|
+
publicName: "events",
|
|
675
|
+
isSignal: true,
|
|
676
|
+
isRequired: false,
|
|
677
|
+
transformFunction: null
|
|
678
|
+
},
|
|
679
|
+
view: {
|
|
680
|
+
classPropertyName: "view",
|
|
681
|
+
publicName: "view",
|
|
682
|
+
isSignal: true,
|
|
683
|
+
isRequired: false,
|
|
684
|
+
transformFunction: null
|
|
685
|
+
},
|
|
686
|
+
date: {
|
|
687
|
+
classPropertyName: "date",
|
|
688
|
+
publicName: "date",
|
|
689
|
+
isSignal: true,
|
|
690
|
+
isRequired: false,
|
|
691
|
+
transformFunction: null
|
|
692
|
+
},
|
|
693
|
+
views: {
|
|
694
|
+
classPropertyName: "views",
|
|
695
|
+
publicName: "views",
|
|
696
|
+
isSignal: true,
|
|
697
|
+
isRequired: false,
|
|
698
|
+
transformFunction: null
|
|
699
|
+
},
|
|
700
|
+
locale: {
|
|
701
|
+
classPropertyName: "locale",
|
|
702
|
+
publicName: "locale",
|
|
703
|
+
isSignal: true,
|
|
704
|
+
isRequired: false,
|
|
705
|
+
transformFunction: null
|
|
706
|
+
},
|
|
707
|
+
firstDayOfWeek: {
|
|
708
|
+
classPropertyName: "firstDayOfWeek",
|
|
709
|
+
publicName: "firstDayOfWeek",
|
|
710
|
+
isSignal: true,
|
|
711
|
+
isRequired: false,
|
|
712
|
+
transformFunction: null
|
|
713
|
+
},
|
|
714
|
+
dayStartHour: {
|
|
715
|
+
classPropertyName: "dayStartHour",
|
|
716
|
+
publicName: "dayStartHour",
|
|
717
|
+
isSignal: true,
|
|
718
|
+
isRequired: false,
|
|
719
|
+
transformFunction: null
|
|
720
|
+
},
|
|
721
|
+
dayEndHour: {
|
|
722
|
+
classPropertyName: "dayEndHour",
|
|
723
|
+
publicName: "dayEndHour",
|
|
724
|
+
isSignal: true,
|
|
725
|
+
isRequired: false,
|
|
726
|
+
transformFunction: null
|
|
727
|
+
},
|
|
728
|
+
scrollToHour: {
|
|
729
|
+
classPropertyName: "scrollToHour",
|
|
730
|
+
publicName: "scrollToHour",
|
|
731
|
+
isSignal: true,
|
|
732
|
+
isRequired: false,
|
|
733
|
+
transformFunction: null
|
|
734
|
+
},
|
|
735
|
+
slotMinutes: {
|
|
736
|
+
classPropertyName: "slotMinutes",
|
|
737
|
+
publicName: "slotMinutes",
|
|
738
|
+
isSignal: true,
|
|
739
|
+
isRequired: false,
|
|
740
|
+
transformFunction: null
|
|
741
|
+
},
|
|
742
|
+
maxEventsPerDay: {
|
|
743
|
+
classPropertyName: "maxEventsPerDay",
|
|
744
|
+
publicName: "maxEventsPerDay",
|
|
745
|
+
isSignal: true,
|
|
746
|
+
isRequired: false,
|
|
747
|
+
transformFunction: null
|
|
748
|
+
},
|
|
749
|
+
agendaDays: {
|
|
750
|
+
classPropertyName: "agendaDays",
|
|
751
|
+
publicName: "agendaDays",
|
|
752
|
+
isSignal: true,
|
|
753
|
+
isRequired: false,
|
|
754
|
+
transformFunction: null
|
|
755
|
+
},
|
|
756
|
+
now: {
|
|
757
|
+
classPropertyName: "now",
|
|
758
|
+
publicName: "now",
|
|
759
|
+
isSignal: true,
|
|
760
|
+
isRequired: false,
|
|
761
|
+
transformFunction: null
|
|
762
|
+
},
|
|
763
|
+
editable: {
|
|
764
|
+
classPropertyName: "editable",
|
|
765
|
+
publicName: "editable",
|
|
766
|
+
isSignal: true,
|
|
767
|
+
isRequired: false,
|
|
768
|
+
transformFunction: null
|
|
769
|
+
},
|
|
770
|
+
label: {
|
|
771
|
+
classPropertyName: "label",
|
|
772
|
+
publicName: "label",
|
|
773
|
+
isSignal: true,
|
|
774
|
+
isRequired: false,
|
|
775
|
+
transformFunction: null
|
|
776
|
+
},
|
|
777
|
+
todayText: {
|
|
778
|
+
classPropertyName: "todayText",
|
|
779
|
+
publicName: "todayText",
|
|
780
|
+
isSignal: true,
|
|
781
|
+
isRequired: false,
|
|
782
|
+
transformFunction: null
|
|
783
|
+
},
|
|
784
|
+
previousLabel: {
|
|
785
|
+
classPropertyName: "previousLabel",
|
|
786
|
+
publicName: "previousLabel",
|
|
787
|
+
isSignal: true,
|
|
788
|
+
isRequired: false,
|
|
789
|
+
transformFunction: null
|
|
790
|
+
},
|
|
791
|
+
nextLabel: {
|
|
792
|
+
classPropertyName: "nextLabel",
|
|
793
|
+
publicName: "nextLabel",
|
|
794
|
+
isSignal: true,
|
|
795
|
+
isRequired: false,
|
|
796
|
+
transformFunction: null
|
|
797
|
+
},
|
|
798
|
+
viewLabel: {
|
|
799
|
+
classPropertyName: "viewLabel",
|
|
800
|
+
publicName: "viewLabel",
|
|
801
|
+
isSignal: true,
|
|
802
|
+
isRequired: false,
|
|
803
|
+
transformFunction: null
|
|
804
|
+
},
|
|
805
|
+
monthText: {
|
|
806
|
+
classPropertyName: "monthText",
|
|
807
|
+
publicName: "monthText",
|
|
808
|
+
isSignal: true,
|
|
809
|
+
isRequired: false,
|
|
810
|
+
transformFunction: null
|
|
811
|
+
},
|
|
812
|
+
weekText: {
|
|
813
|
+
classPropertyName: "weekText",
|
|
814
|
+
publicName: "weekText",
|
|
815
|
+
isSignal: true,
|
|
816
|
+
isRequired: false,
|
|
817
|
+
transformFunction: null
|
|
818
|
+
},
|
|
819
|
+
dayText: {
|
|
820
|
+
classPropertyName: "dayText",
|
|
821
|
+
publicName: "dayText",
|
|
822
|
+
isSignal: true,
|
|
823
|
+
isRequired: false,
|
|
824
|
+
transformFunction: null
|
|
825
|
+
},
|
|
826
|
+
agendaText: {
|
|
827
|
+
classPropertyName: "agendaText",
|
|
828
|
+
publicName: "agendaText",
|
|
829
|
+
isSignal: true,
|
|
830
|
+
isRequired: false,
|
|
831
|
+
transformFunction: null
|
|
832
|
+
},
|
|
833
|
+
allDayText: {
|
|
834
|
+
classPropertyName: "allDayText",
|
|
835
|
+
publicName: "allDayText",
|
|
836
|
+
isSignal: true,
|
|
837
|
+
isRequired: false,
|
|
838
|
+
transformFunction: null
|
|
839
|
+
},
|
|
840
|
+
emptyText: {
|
|
841
|
+
classPropertyName: "emptyText",
|
|
842
|
+
publicName: "emptyText",
|
|
843
|
+
isSignal: true,
|
|
844
|
+
isRequired: false,
|
|
845
|
+
transformFunction: null
|
|
846
|
+
},
|
|
847
|
+
invalidText: {
|
|
848
|
+
classPropertyName: "invalidText",
|
|
849
|
+
publicName: "invalidText",
|
|
850
|
+
isSignal: true,
|
|
851
|
+
isRequired: false,
|
|
852
|
+
transformFunction: null
|
|
853
|
+
},
|
|
854
|
+
moreText: {
|
|
855
|
+
classPropertyName: "moreText",
|
|
856
|
+
publicName: "moreText",
|
|
857
|
+
isSignal: true,
|
|
858
|
+
isRequired: false,
|
|
859
|
+
transformFunction: null
|
|
860
|
+
},
|
|
861
|
+
eventsText: {
|
|
862
|
+
classPropertyName: "eventsText",
|
|
863
|
+
publicName: "eventsText",
|
|
864
|
+
isSignal: true,
|
|
865
|
+
isRequired: false,
|
|
866
|
+
transformFunction: null
|
|
867
|
+
},
|
|
868
|
+
changedText: {
|
|
869
|
+
classPropertyName: "changedText",
|
|
870
|
+
publicName: "changedText",
|
|
871
|
+
isSignal: true,
|
|
872
|
+
isRequired: false,
|
|
873
|
+
transformFunction: null
|
|
874
|
+
},
|
|
875
|
+
canceledText: {
|
|
876
|
+
classPropertyName: "canceledText",
|
|
877
|
+
publicName: "canceledText",
|
|
878
|
+
isSignal: true,
|
|
879
|
+
isRequired: false,
|
|
880
|
+
transformFunction: null
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
outputs: {
|
|
884
|
+
view: "viewChange",
|
|
885
|
+
date: "dateChange",
|
|
886
|
+
eventActivate: "eventActivate",
|
|
887
|
+
slotActivate: "slotActivate",
|
|
888
|
+
eventChange: "eventChange"
|
|
889
|
+
},
|
|
890
|
+
host: {
|
|
891
|
+
listeners: {
|
|
892
|
+
"keydown": "key($event)",
|
|
893
|
+
"click": "emptyClick($event)"
|
|
894
|
+
},
|
|
895
|
+
properties: {
|
|
896
|
+
"attr.data-view": "view()",
|
|
897
|
+
"attr.data-state": "!valid() ? \"invalid\" : draggingId() ? \"dragging\" : \"idle\""
|
|
898
|
+
},
|
|
899
|
+
classAttribute: "vd-schedule"
|
|
900
|
+
},
|
|
901
|
+
ngImport: i0,
|
|
902
|
+
template: `
|
|
903
|
+
<div class="vd-schedule__toolbar">
|
|
904
|
+
<div class="vd-schedule__nav">
|
|
905
|
+
<button vdButton size="sm" variant="secondary" type="button" (click)="goToday()">
|
|
906
|
+
{{ t().todayText }}
|
|
907
|
+
</button>
|
|
908
|
+
<button
|
|
909
|
+
vdButton
|
|
910
|
+
size="sm"
|
|
911
|
+
variant="ghost"
|
|
912
|
+
iconOnly
|
|
913
|
+
type="button"
|
|
914
|
+
[attr.aria-label]="t().previousLabel"
|
|
915
|
+
(click)="step(-1)"
|
|
916
|
+
>
|
|
917
|
+
<vd-icon name="chevron-left" />
|
|
918
|
+
</button>
|
|
919
|
+
<button
|
|
920
|
+
vdButton
|
|
921
|
+
size="sm"
|
|
922
|
+
variant="ghost"
|
|
923
|
+
iconOnly
|
|
924
|
+
type="button"
|
|
925
|
+
[attr.aria-label]="t().nextLabel"
|
|
926
|
+
(click)="step(1)"
|
|
927
|
+
>
|
|
928
|
+
<vd-icon name="chevron-right" />
|
|
929
|
+
</button>
|
|
930
|
+
<p class="vd-schedule__title" [id]="baseId + '-title'" aria-live="polite">{{ title() }}</p>
|
|
931
|
+
</div>
|
|
932
|
+
@if (views().length > 1) {
|
|
933
|
+
<div class="vd-schedule__views" role="group" [attr.aria-label]="t().viewLabel">
|
|
934
|
+
@for (option of views(); track option) {
|
|
935
|
+
<button
|
|
936
|
+
vdButton
|
|
937
|
+
size="sm"
|
|
938
|
+
type="button"
|
|
939
|
+
[variant]="option === view() ? 'secondary' : 'ghost'"
|
|
940
|
+
[attr.aria-pressed]="option === view()"
|
|
941
|
+
(click)="view.set(option)"
|
|
942
|
+
>
|
|
943
|
+
{{ viewText(option) }}
|
|
944
|
+
</button>
|
|
945
|
+
}
|
|
946
|
+
</div>
|
|
947
|
+
}
|
|
948
|
+
</div>
|
|
949
|
+
|
|
950
|
+
@if (!valid()) {
|
|
951
|
+
<p class="vd-schedule__invalid">{{ t().invalidText }}</p>
|
|
952
|
+
} @else {
|
|
953
|
+
@switch (view()) {
|
|
954
|
+
@case ('month') {
|
|
955
|
+
<table class="vd-schedule__month" [attr.aria-labelledby]="baseId + '-title'">
|
|
956
|
+
<thead>
|
|
957
|
+
<tr>
|
|
958
|
+
@for (name of weekdays(); track $index) {
|
|
959
|
+
<th scope="col">
|
|
960
|
+
<abbr [attr.title]="name.long">{{ name.short }}</abbr>
|
|
961
|
+
</th>
|
|
962
|
+
}
|
|
963
|
+
</tr>
|
|
964
|
+
</thead>
|
|
965
|
+
<tbody>
|
|
966
|
+
@for (week of weeks(); track week[0]) {
|
|
967
|
+
<tr>
|
|
968
|
+
@for (day of week; track day) {
|
|
969
|
+
<td
|
|
970
|
+
class="vd-schedule__cell"
|
|
971
|
+
[attr.data-date]="day"
|
|
972
|
+
[attr.data-outside]="!sameMonth(day) ? '' : null"
|
|
973
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
974
|
+
[attr.data-drop-target]="
|
|
975
|
+
preview()?.change?.start?.slice(0, 10) === day ? '' : null
|
|
976
|
+
"
|
|
977
|
+
>
|
|
978
|
+
<button
|
|
979
|
+
type="button"
|
|
980
|
+
class="vd-schedule__day"
|
|
981
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
982
|
+
[attr.aria-label]="dayLabel(day)"
|
|
983
|
+
[attr.aria-current]="day === today() ? 'date' : null"
|
|
984
|
+
(click)="openDay(day)"
|
|
985
|
+
(focus)="focusDate.set(day)"
|
|
986
|
+
>
|
|
987
|
+
{{ dayNumber(day) }}
|
|
988
|
+
@if (month().has(day)) {
|
|
989
|
+
<span class="vd-schedule__dot" aria-hidden="true"></span>
|
|
990
|
+
}
|
|
991
|
+
</button>
|
|
992
|
+
@let cell = month().get(day);
|
|
993
|
+
@if (cell) {
|
|
994
|
+
<ul class="vd-schedule__chips" role="list">
|
|
995
|
+
@for (item of cell.visible; track item.event.id) {
|
|
996
|
+
<li>
|
|
997
|
+
<button
|
|
998
|
+
type="button"
|
|
999
|
+
class="vd-schedule__event"
|
|
1000
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
1001
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1002
|
+
[attr.data-all-day]="item.allDay ? '' : null"
|
|
1003
|
+
[attr.data-dragging]="draggingId() === item.event.id ? '' : null"
|
|
1004
|
+
[attr.aria-label]="eventLabel(item)"
|
|
1005
|
+
(click)="activate(item.event)"
|
|
1006
|
+
(pointerdown)="dragStart($event, item, 'move')"
|
|
1007
|
+
(pointermove)="dragMove($event)"
|
|
1008
|
+
(pointerup)="dragEnd($event)"
|
|
1009
|
+
(pointercancel)="dragCancel($event)"
|
|
1010
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1011
|
+
>
|
|
1012
|
+
@if (!item.allDay && item.startDate === day) {
|
|
1013
|
+
<span class="vd-schedule__time">{{ time(item.startMin) }}</span>
|
|
1014
|
+
}
|
|
1015
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1016
|
+
</button>
|
|
1017
|
+
</li>
|
|
1018
|
+
}
|
|
1019
|
+
@if (cell.more) {
|
|
1020
|
+
<li>
|
|
1021
|
+
<button
|
|
1022
|
+
type="button"
|
|
1023
|
+
class="vd-schedule__more"
|
|
1024
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
1025
|
+
(click)="openDay(day)"
|
|
1026
|
+
>
|
|
1027
|
+
{{ t().moreText(cell.more) }}
|
|
1028
|
+
</button>
|
|
1029
|
+
</li>
|
|
1030
|
+
}
|
|
1031
|
+
</ul>
|
|
1032
|
+
}
|
|
1033
|
+
</td>
|
|
1034
|
+
}
|
|
1035
|
+
</tr>
|
|
1036
|
+
}
|
|
1037
|
+
</tbody>
|
|
1038
|
+
</table>
|
|
1039
|
+
}
|
|
1040
|
+
@case ('agenda') {
|
|
1041
|
+
<div class="vd-schedule__agenda" [attr.aria-labelledby]="baseId + '-title'" role="region">
|
|
1042
|
+
@for (group of agenda(); track group.date; let g = $index) {
|
|
1043
|
+
<section
|
|
1044
|
+
class="vd-schedule__agenda-day"
|
|
1045
|
+
[attr.aria-labelledby]="baseId + '-agenda-' + g"
|
|
1046
|
+
>
|
|
1047
|
+
<p
|
|
1048
|
+
class="vd-schedule__agenda-date"
|
|
1049
|
+
[id]="baseId + '-agenda-' + g"
|
|
1050
|
+
[attr.data-today]="group.date === today() ? '' : null"
|
|
1051
|
+
>
|
|
1052
|
+
{{ longDate(group.date) }}
|
|
1053
|
+
</p>
|
|
1054
|
+
<ul class="vd-schedule__agenda-list" role="list">
|
|
1055
|
+
@for (item of group.items; track item.event.id) {
|
|
1056
|
+
<li>
|
|
1057
|
+
<button
|
|
1058
|
+
type="button"
|
|
1059
|
+
class="vd-schedule__agenda-event"
|
|
1060
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1061
|
+
(click)="activate(item.event)"
|
|
1062
|
+
>
|
|
1063
|
+
<span class="vd-schedule__agenda-time">{{
|
|
1064
|
+
rangeText(item, group.date)
|
|
1065
|
+
}}</span>
|
|
1066
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1067
|
+
</button>
|
|
1068
|
+
</li>
|
|
1069
|
+
}
|
|
1070
|
+
</ul>
|
|
1071
|
+
</section>
|
|
1072
|
+
} @empty {
|
|
1073
|
+
<p class="vd-schedule__empty">{{ t().emptyText }}</p>
|
|
1074
|
+
}
|
|
1075
|
+
</div>
|
|
1076
|
+
}
|
|
1077
|
+
@default {
|
|
1078
|
+
<div
|
|
1079
|
+
class="vd-schedule__timegrid"
|
|
1080
|
+
[attr.data-view]="view()"
|
|
1081
|
+
[style.--vd-schedule-days]="days().length"
|
|
1082
|
+
>
|
|
1083
|
+
<div class="vd-schedule__head">
|
|
1084
|
+
<span class="vd-schedule__gutter"></span>
|
|
1085
|
+
@for (day of days(); track day) {
|
|
1086
|
+
<button
|
|
1087
|
+
type="button"
|
|
1088
|
+
class="vd-schedule__colhead"
|
|
1089
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
1090
|
+
[attr.aria-label]="dayLabel(day)"
|
|
1091
|
+
[attr.aria-current]="day === today() ? 'date' : null"
|
|
1092
|
+
(click)="openDay(day)"
|
|
1093
|
+
>
|
|
1094
|
+
<span class="vd-schedule__weekday">{{ weekdayShort(day) }}</span>
|
|
1095
|
+
<span class="vd-schedule__date">{{ dayNumber(day) }}</span>
|
|
1096
|
+
</button>
|
|
1097
|
+
}
|
|
1098
|
+
</div>
|
|
1099
|
+
<div class="vd-schedule__allday">
|
|
1100
|
+
<span class="vd-schedule__gutter vd-schedule__allday-label">{{
|
|
1101
|
+
t().allDayText
|
|
1102
|
+
}}</span>
|
|
1103
|
+
@for (day of days(); track day) {
|
|
1104
|
+
<div
|
|
1105
|
+
class="vd-schedule__allday-cell"
|
|
1106
|
+
[attr.data-date]="day"
|
|
1107
|
+
[attr.data-drop-target]="
|
|
1108
|
+
preview()?.item?.allDay && preview()?.change?.start === day ? '' : null
|
|
1109
|
+
"
|
|
1110
|
+
>
|
|
1111
|
+
@for (item of allDay(day); track item.event.id) {
|
|
1112
|
+
<button
|
|
1113
|
+
type="button"
|
|
1114
|
+
class="vd-schedule__event"
|
|
1115
|
+
data-all-day
|
|
1116
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1117
|
+
[attr.data-dragging]="draggingId() === item.event.id ? '' : null"
|
|
1118
|
+
[attr.aria-label]="eventLabel(item)"
|
|
1119
|
+
(click)="activate(item.event)"
|
|
1120
|
+
(pointerdown)="dragStart($event, item, 'move')"
|
|
1121
|
+
(pointermove)="dragMove($event)"
|
|
1122
|
+
(pointerup)="dragEnd($event)"
|
|
1123
|
+
(pointercancel)="dragCancel($event)"
|
|
1124
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1125
|
+
>
|
|
1126
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1127
|
+
</button>
|
|
1128
|
+
}
|
|
1129
|
+
</div>
|
|
1130
|
+
}
|
|
1131
|
+
</div>
|
|
1132
|
+
<div
|
|
1133
|
+
class="vd-schedule__scroll"
|
|
1134
|
+
role="region"
|
|
1135
|
+
tabindex="0"
|
|
1136
|
+
[attr.aria-labelledby]="baseId + '-title'"
|
|
1137
|
+
>
|
|
1138
|
+
<div class="vd-schedule__grid" [style.--vd-schedule-hours]="hours().length">
|
|
1139
|
+
<div class="vd-schedule__hours" aria-hidden="true">
|
|
1140
|
+
@for (hour of hours(); track hour) {
|
|
1141
|
+
<span class="vd-schedule__hour">{{ hourLabel(hour) }}</span>
|
|
1142
|
+
}
|
|
1143
|
+
</div>
|
|
1144
|
+
@for (day of days(); track day) {
|
|
1145
|
+
<div
|
|
1146
|
+
class="vd-schedule__column"
|
|
1147
|
+
[attr.data-date]="day"
|
|
1148
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
1149
|
+
>
|
|
1150
|
+
@for (p of layout().get(day); track p.item.event.id) {
|
|
1151
|
+
<button
|
|
1152
|
+
type="button"
|
|
1153
|
+
class="vd-schedule__block"
|
|
1154
|
+
[attr.data-color]="p.item.event.color ?? 'accent'"
|
|
1155
|
+
[attr.data-dragging]="draggingId() === p.item.event.id ? '' : null"
|
|
1156
|
+
[attr.data-clipped-start]="p.clippedStart ? '' : null"
|
|
1157
|
+
[attr.data-clipped-end]="p.clippedEnd ? '' : null"
|
|
1158
|
+
[attr.data-short]="p.bottom - p.top < 45 ? '' : null"
|
|
1159
|
+
[style.--vd-schedule-top]="p.top"
|
|
1160
|
+
[style.--vd-schedule-span]="p.bottom - p.top"
|
|
1161
|
+
[style.--vd-schedule-col]="p.column"
|
|
1162
|
+
[style.--vd-schedule-cols]="p.columns"
|
|
1163
|
+
[attr.aria-label]="eventLabel(p.item)"
|
|
1164
|
+
(click)="activate(p.item.event)"
|
|
1165
|
+
(pointerdown)="dragStart($event, p.item, 'move')"
|
|
1166
|
+
(pointermove)="dragMove($event)"
|
|
1167
|
+
(pointerup)="dragEnd($event)"
|
|
1168
|
+
(pointercancel)="dragCancel($event)"
|
|
1169
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1170
|
+
>
|
|
1171
|
+
<span class="vd-schedule__name">{{ p.item.event.title }}</span>
|
|
1172
|
+
<span class="vd-schedule__time">{{ rangeText(p.item, day) }}</span>
|
|
1173
|
+
@if (editable() && !p.clippedEnd) {
|
|
1174
|
+
<span
|
|
1175
|
+
class="vd-schedule__resize"
|
|
1176
|
+
aria-hidden="true"
|
|
1177
|
+
(pointerdown)="dragStart($event, p.item, 'resize')"
|
|
1178
|
+
></span>
|
|
1179
|
+
}
|
|
1180
|
+
</button>
|
|
1181
|
+
}
|
|
1182
|
+
@if (preview(); as pv) {
|
|
1183
|
+
@if (ghost(day); as g) {
|
|
1184
|
+
<span
|
|
1185
|
+
class="vd-schedule__preview"
|
|
1186
|
+
aria-hidden="true"
|
|
1187
|
+
[style.--vd-schedule-top]="g.top"
|
|
1188
|
+
[style.--vd-schedule-span]="g.span"
|
|
1189
|
+
>
|
|
1190
|
+
{{ time(g.startMin) }}
|
|
1191
|
+
</span>
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
@if (nowLine(day); as line) {
|
|
1195
|
+
<span
|
|
1196
|
+
class="vd-schedule__now"
|
|
1197
|
+
aria-hidden="true"
|
|
1198
|
+
[style.--vd-schedule-top]="line"
|
|
1199
|
+
></span>
|
|
1200
|
+
}
|
|
1201
|
+
</div>
|
|
1202
|
+
}
|
|
1203
|
+
</div>
|
|
1204
|
+
</div>
|
|
1205
|
+
</div>
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
<p class="vd-visually-hidden" role="status" aria-atomic="true">
|
|
1210
|
+
@for (message of messages(); track message.serial) {
|
|
1211
|
+
<span>{{ message.text }}</span>
|
|
1212
|
+
}
|
|
1213
|
+
</p>
|
|
1214
|
+
`,
|
|
1215
|
+
isInline: true,
|
|
1216
|
+
dependencies: [{
|
|
1217
|
+
kind: "component",
|
|
1218
|
+
type: VdButton,
|
|
1219
|
+
selector: "button[vdButton], a[vdButton]",
|
|
1220
|
+
inputs: [
|
|
1221
|
+
"variant",
|
|
1222
|
+
"size",
|
|
1223
|
+
"disabled",
|
|
1224
|
+
"loading",
|
|
1225
|
+
"iconOnly",
|
|
1226
|
+
"type"
|
|
1227
|
+
]
|
|
1228
|
+
}, {
|
|
1229
|
+
kind: "component",
|
|
1230
|
+
type: VdIcon,
|
|
1231
|
+
selector: "vd-icon",
|
|
1232
|
+
inputs: ["name", "label"]
|
|
1233
|
+
}],
|
|
1234
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1235
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1236
|
+
});
|
|
1237
|
+
};
|
|
1238
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1239
|
+
minVersion: "12.0.0",
|
|
1240
|
+
version: "22.2.1",
|
|
1241
|
+
ngImport: i0,
|
|
1242
|
+
type: VdSchedule,
|
|
1243
|
+
decorators: [{
|
|
1244
|
+
type: Component,
|
|
1245
|
+
args: [{
|
|
1246
|
+
selector: "vd-schedule",
|
|
1247
|
+
imports: [VdButton, VdIcon],
|
|
1248
|
+
template: `
|
|
1249
|
+
<div class="vd-schedule__toolbar">
|
|
1250
|
+
<div class="vd-schedule__nav">
|
|
1251
|
+
<button vdButton size="sm" variant="secondary" type="button" (click)="goToday()">
|
|
1252
|
+
{{ t().todayText }}
|
|
1253
|
+
</button>
|
|
1254
|
+
<button
|
|
1255
|
+
vdButton
|
|
1256
|
+
size="sm"
|
|
1257
|
+
variant="ghost"
|
|
1258
|
+
iconOnly
|
|
1259
|
+
type="button"
|
|
1260
|
+
[attr.aria-label]="t().previousLabel"
|
|
1261
|
+
(click)="step(-1)"
|
|
1262
|
+
>
|
|
1263
|
+
<vd-icon name="chevron-left" />
|
|
1264
|
+
</button>
|
|
1265
|
+
<button
|
|
1266
|
+
vdButton
|
|
1267
|
+
size="sm"
|
|
1268
|
+
variant="ghost"
|
|
1269
|
+
iconOnly
|
|
1270
|
+
type="button"
|
|
1271
|
+
[attr.aria-label]="t().nextLabel"
|
|
1272
|
+
(click)="step(1)"
|
|
1273
|
+
>
|
|
1274
|
+
<vd-icon name="chevron-right" />
|
|
1275
|
+
</button>
|
|
1276
|
+
<p class="vd-schedule__title" [id]="baseId + '-title'" aria-live="polite">{{ title() }}</p>
|
|
1277
|
+
</div>
|
|
1278
|
+
@if (views().length > 1) {
|
|
1279
|
+
<div class="vd-schedule__views" role="group" [attr.aria-label]="t().viewLabel">
|
|
1280
|
+
@for (option of views(); track option) {
|
|
1281
|
+
<button
|
|
1282
|
+
vdButton
|
|
1283
|
+
size="sm"
|
|
1284
|
+
type="button"
|
|
1285
|
+
[variant]="option === view() ? 'secondary' : 'ghost'"
|
|
1286
|
+
[attr.aria-pressed]="option === view()"
|
|
1287
|
+
(click)="view.set(option)"
|
|
1288
|
+
>
|
|
1289
|
+
{{ viewText(option) }}
|
|
1290
|
+
</button>
|
|
1291
|
+
}
|
|
1292
|
+
</div>
|
|
1293
|
+
}
|
|
1294
|
+
</div>
|
|
1295
|
+
|
|
1296
|
+
@if (!valid()) {
|
|
1297
|
+
<p class="vd-schedule__invalid">{{ t().invalidText }}</p>
|
|
1298
|
+
} @else {
|
|
1299
|
+
@switch (view()) {
|
|
1300
|
+
@case ('month') {
|
|
1301
|
+
<table class="vd-schedule__month" [attr.aria-labelledby]="baseId + '-title'">
|
|
1302
|
+
<thead>
|
|
1303
|
+
<tr>
|
|
1304
|
+
@for (name of weekdays(); track $index) {
|
|
1305
|
+
<th scope="col">
|
|
1306
|
+
<abbr [attr.title]="name.long">{{ name.short }}</abbr>
|
|
1307
|
+
</th>
|
|
1308
|
+
}
|
|
1309
|
+
</tr>
|
|
1310
|
+
</thead>
|
|
1311
|
+
<tbody>
|
|
1312
|
+
@for (week of weeks(); track week[0]) {
|
|
1313
|
+
<tr>
|
|
1314
|
+
@for (day of week; track day) {
|
|
1315
|
+
<td
|
|
1316
|
+
class="vd-schedule__cell"
|
|
1317
|
+
[attr.data-date]="day"
|
|
1318
|
+
[attr.data-outside]="!sameMonth(day) ? '' : null"
|
|
1319
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
1320
|
+
[attr.data-drop-target]="
|
|
1321
|
+
preview()?.change?.start?.slice(0, 10) === day ? '' : null
|
|
1322
|
+
"
|
|
1323
|
+
>
|
|
1324
|
+
<button
|
|
1325
|
+
type="button"
|
|
1326
|
+
class="vd-schedule__day"
|
|
1327
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
1328
|
+
[attr.aria-label]="dayLabel(day)"
|
|
1329
|
+
[attr.aria-current]="day === today() ? 'date' : null"
|
|
1330
|
+
(click)="openDay(day)"
|
|
1331
|
+
(focus)="focusDate.set(day)"
|
|
1332
|
+
>
|
|
1333
|
+
{{ dayNumber(day) }}
|
|
1334
|
+
@if (month().has(day)) {
|
|
1335
|
+
<span class="vd-schedule__dot" aria-hidden="true"></span>
|
|
1336
|
+
}
|
|
1337
|
+
</button>
|
|
1338
|
+
@let cell = month().get(day);
|
|
1339
|
+
@if (cell) {
|
|
1340
|
+
<ul class="vd-schedule__chips" role="list">
|
|
1341
|
+
@for (item of cell.visible; track item.event.id) {
|
|
1342
|
+
<li>
|
|
1343
|
+
<button
|
|
1344
|
+
type="button"
|
|
1345
|
+
class="vd-schedule__event"
|
|
1346
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
1347
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1348
|
+
[attr.data-all-day]="item.allDay ? '' : null"
|
|
1349
|
+
[attr.data-dragging]="draggingId() === item.event.id ? '' : null"
|
|
1350
|
+
[attr.aria-label]="eventLabel(item)"
|
|
1351
|
+
(click)="activate(item.event)"
|
|
1352
|
+
(pointerdown)="dragStart($event, item, 'move')"
|
|
1353
|
+
(pointermove)="dragMove($event)"
|
|
1354
|
+
(pointerup)="dragEnd($event)"
|
|
1355
|
+
(pointercancel)="dragCancel($event)"
|
|
1356
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1357
|
+
>
|
|
1358
|
+
@if (!item.allDay && item.startDate === day) {
|
|
1359
|
+
<span class="vd-schedule__time">{{ time(item.startMin) }}</span>
|
|
1360
|
+
}
|
|
1361
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1362
|
+
</button>
|
|
1363
|
+
</li>
|
|
1364
|
+
}
|
|
1365
|
+
@if (cell.more) {
|
|
1366
|
+
<li>
|
|
1367
|
+
<button
|
|
1368
|
+
type="button"
|
|
1369
|
+
class="vd-schedule__more"
|
|
1370
|
+
[attr.tabindex]="day === focusDate() ? 0 : -1"
|
|
1371
|
+
(click)="openDay(day)"
|
|
1372
|
+
>
|
|
1373
|
+
{{ t().moreText(cell.more) }}
|
|
1374
|
+
</button>
|
|
1375
|
+
</li>
|
|
1376
|
+
}
|
|
1377
|
+
</ul>
|
|
1378
|
+
}
|
|
1379
|
+
</td>
|
|
1380
|
+
}
|
|
1381
|
+
</tr>
|
|
1382
|
+
}
|
|
1383
|
+
</tbody>
|
|
1384
|
+
</table>
|
|
1385
|
+
}
|
|
1386
|
+
@case ('agenda') {
|
|
1387
|
+
<div class="vd-schedule__agenda" [attr.aria-labelledby]="baseId + '-title'" role="region">
|
|
1388
|
+
@for (group of agenda(); track group.date; let g = $index) {
|
|
1389
|
+
<section
|
|
1390
|
+
class="vd-schedule__agenda-day"
|
|
1391
|
+
[attr.aria-labelledby]="baseId + '-agenda-' + g"
|
|
1392
|
+
>
|
|
1393
|
+
<p
|
|
1394
|
+
class="vd-schedule__agenda-date"
|
|
1395
|
+
[id]="baseId + '-agenda-' + g"
|
|
1396
|
+
[attr.data-today]="group.date === today() ? '' : null"
|
|
1397
|
+
>
|
|
1398
|
+
{{ longDate(group.date) }}
|
|
1399
|
+
</p>
|
|
1400
|
+
<ul class="vd-schedule__agenda-list" role="list">
|
|
1401
|
+
@for (item of group.items; track item.event.id) {
|
|
1402
|
+
<li>
|
|
1403
|
+
<button
|
|
1404
|
+
type="button"
|
|
1405
|
+
class="vd-schedule__agenda-event"
|
|
1406
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1407
|
+
(click)="activate(item.event)"
|
|
1408
|
+
>
|
|
1409
|
+
<span class="vd-schedule__agenda-time">{{
|
|
1410
|
+
rangeText(item, group.date)
|
|
1411
|
+
}}</span>
|
|
1412
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1413
|
+
</button>
|
|
1414
|
+
</li>
|
|
1415
|
+
}
|
|
1416
|
+
</ul>
|
|
1417
|
+
</section>
|
|
1418
|
+
} @empty {
|
|
1419
|
+
<p class="vd-schedule__empty">{{ t().emptyText }}</p>
|
|
1420
|
+
}
|
|
1421
|
+
</div>
|
|
1422
|
+
}
|
|
1423
|
+
@default {
|
|
1424
|
+
<div
|
|
1425
|
+
class="vd-schedule__timegrid"
|
|
1426
|
+
[attr.data-view]="view()"
|
|
1427
|
+
[style.--vd-schedule-days]="days().length"
|
|
1428
|
+
>
|
|
1429
|
+
<div class="vd-schedule__head">
|
|
1430
|
+
<span class="vd-schedule__gutter"></span>
|
|
1431
|
+
@for (day of days(); track day) {
|
|
1432
|
+
<button
|
|
1433
|
+
type="button"
|
|
1434
|
+
class="vd-schedule__colhead"
|
|
1435
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
1436
|
+
[attr.aria-label]="dayLabel(day)"
|
|
1437
|
+
[attr.aria-current]="day === today() ? 'date' : null"
|
|
1438
|
+
(click)="openDay(day)"
|
|
1439
|
+
>
|
|
1440
|
+
<span class="vd-schedule__weekday">{{ weekdayShort(day) }}</span>
|
|
1441
|
+
<span class="vd-schedule__date">{{ dayNumber(day) }}</span>
|
|
1442
|
+
</button>
|
|
1443
|
+
}
|
|
1444
|
+
</div>
|
|
1445
|
+
<div class="vd-schedule__allday">
|
|
1446
|
+
<span class="vd-schedule__gutter vd-schedule__allday-label">{{
|
|
1447
|
+
t().allDayText
|
|
1448
|
+
}}</span>
|
|
1449
|
+
@for (day of days(); track day) {
|
|
1450
|
+
<div
|
|
1451
|
+
class="vd-schedule__allday-cell"
|
|
1452
|
+
[attr.data-date]="day"
|
|
1453
|
+
[attr.data-drop-target]="
|
|
1454
|
+
preview()?.item?.allDay && preview()?.change?.start === day ? '' : null
|
|
1455
|
+
"
|
|
1456
|
+
>
|
|
1457
|
+
@for (item of allDay(day); track item.event.id) {
|
|
1458
|
+
<button
|
|
1459
|
+
type="button"
|
|
1460
|
+
class="vd-schedule__event"
|
|
1461
|
+
data-all-day
|
|
1462
|
+
[attr.data-color]="item.event.color ?? 'accent'"
|
|
1463
|
+
[attr.data-dragging]="draggingId() === item.event.id ? '' : null"
|
|
1464
|
+
[attr.aria-label]="eventLabel(item)"
|
|
1465
|
+
(click)="activate(item.event)"
|
|
1466
|
+
(pointerdown)="dragStart($event, item, 'move')"
|
|
1467
|
+
(pointermove)="dragMove($event)"
|
|
1468
|
+
(pointerup)="dragEnd($event)"
|
|
1469
|
+
(pointercancel)="dragCancel($event)"
|
|
1470
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1471
|
+
>
|
|
1472
|
+
<span class="vd-schedule__name">{{ item.event.title }}</span>
|
|
1473
|
+
</button>
|
|
1474
|
+
}
|
|
1475
|
+
</div>
|
|
1476
|
+
}
|
|
1477
|
+
</div>
|
|
1478
|
+
<div
|
|
1479
|
+
class="vd-schedule__scroll"
|
|
1480
|
+
role="region"
|
|
1481
|
+
tabindex="0"
|
|
1482
|
+
[attr.aria-labelledby]="baseId + '-title'"
|
|
1483
|
+
>
|
|
1484
|
+
<div class="vd-schedule__grid" [style.--vd-schedule-hours]="hours().length">
|
|
1485
|
+
<div class="vd-schedule__hours" aria-hidden="true">
|
|
1486
|
+
@for (hour of hours(); track hour) {
|
|
1487
|
+
<span class="vd-schedule__hour">{{ hourLabel(hour) }}</span>
|
|
1488
|
+
}
|
|
1489
|
+
</div>
|
|
1490
|
+
@for (day of days(); track day) {
|
|
1491
|
+
<div
|
|
1492
|
+
class="vd-schedule__column"
|
|
1493
|
+
[attr.data-date]="day"
|
|
1494
|
+
[attr.data-today]="day === today() ? '' : null"
|
|
1495
|
+
>
|
|
1496
|
+
@for (p of layout().get(day); track p.item.event.id) {
|
|
1497
|
+
<button
|
|
1498
|
+
type="button"
|
|
1499
|
+
class="vd-schedule__block"
|
|
1500
|
+
[attr.data-color]="p.item.event.color ?? 'accent'"
|
|
1501
|
+
[attr.data-dragging]="draggingId() === p.item.event.id ? '' : null"
|
|
1502
|
+
[attr.data-clipped-start]="p.clippedStart ? '' : null"
|
|
1503
|
+
[attr.data-clipped-end]="p.clippedEnd ? '' : null"
|
|
1504
|
+
[attr.data-short]="p.bottom - p.top < 45 ? '' : null"
|
|
1505
|
+
[style.--vd-schedule-top]="p.top"
|
|
1506
|
+
[style.--vd-schedule-span]="p.bottom - p.top"
|
|
1507
|
+
[style.--vd-schedule-col]="p.column"
|
|
1508
|
+
[style.--vd-schedule-cols]="p.columns"
|
|
1509
|
+
[attr.aria-label]="eventLabel(p.item)"
|
|
1510
|
+
(click)="activate(p.item.event)"
|
|
1511
|
+
(pointerdown)="dragStart($event, p.item, 'move')"
|
|
1512
|
+
(pointermove)="dragMove($event)"
|
|
1513
|
+
(pointerup)="dragEnd($event)"
|
|
1514
|
+
(pointercancel)="dragCancel($event)"
|
|
1515
|
+
(lostpointercapture)="dragCancel($event)"
|
|
1516
|
+
>
|
|
1517
|
+
<span class="vd-schedule__name">{{ p.item.event.title }}</span>
|
|
1518
|
+
<span class="vd-schedule__time">{{ rangeText(p.item, day) }}</span>
|
|
1519
|
+
@if (editable() && !p.clippedEnd) {
|
|
1520
|
+
<span
|
|
1521
|
+
class="vd-schedule__resize"
|
|
1522
|
+
aria-hidden="true"
|
|
1523
|
+
(pointerdown)="dragStart($event, p.item, 'resize')"
|
|
1524
|
+
></span>
|
|
1525
|
+
}
|
|
1526
|
+
</button>
|
|
1527
|
+
}
|
|
1528
|
+
@if (preview(); as pv) {
|
|
1529
|
+
@if (ghost(day); as g) {
|
|
1530
|
+
<span
|
|
1531
|
+
class="vd-schedule__preview"
|
|
1532
|
+
aria-hidden="true"
|
|
1533
|
+
[style.--vd-schedule-top]="g.top"
|
|
1534
|
+
[style.--vd-schedule-span]="g.span"
|
|
1535
|
+
>
|
|
1536
|
+
{{ time(g.startMin) }}
|
|
1537
|
+
</span>
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
@if (nowLine(day); as line) {
|
|
1541
|
+
<span
|
|
1542
|
+
class="vd-schedule__now"
|
|
1543
|
+
aria-hidden="true"
|
|
1544
|
+
[style.--vd-schedule-top]="line"
|
|
1545
|
+
></span>
|
|
1546
|
+
}
|
|
1547
|
+
</div>
|
|
1548
|
+
}
|
|
1549
|
+
</div>
|
|
1550
|
+
</div>
|
|
1551
|
+
</div>
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
<p class="vd-visually-hidden" role="status" aria-atomic="true">
|
|
1556
|
+
@for (message of messages(); track message.serial) {
|
|
1557
|
+
<span>{{ message.text }}</span>
|
|
1558
|
+
}
|
|
1559
|
+
</p>
|
|
1560
|
+
`,
|
|
1561
|
+
host: {
|
|
1562
|
+
class: "vd-schedule",
|
|
1563
|
+
"[attr.data-view]": "view()",
|
|
1564
|
+
"[attr.data-state]": "!valid() ? \"invalid\" : draggingId() ? \"dragging\" : \"idle\"",
|
|
1565
|
+
"(keydown)": "key($event)",
|
|
1566
|
+
"(click)": "emptyClick($event)"
|
|
1567
|
+
},
|
|
1568
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1569
|
+
encapsulation: ViewEncapsulation.None
|
|
1570
|
+
}]
|
|
1571
|
+
}],
|
|
1572
|
+
ctorParameters: () => [],
|
|
1573
|
+
propDecorators: {
|
|
1574
|
+
events: [{
|
|
1575
|
+
type: i0.Input,
|
|
1576
|
+
args: [{
|
|
1577
|
+
isSignal: true,
|
|
1578
|
+
alias: "events",
|
|
1579
|
+
required: false
|
|
1580
|
+
}]
|
|
1581
|
+
}],
|
|
1582
|
+
view: [{
|
|
1583
|
+
type: i0.Input,
|
|
1584
|
+
args: [{
|
|
1585
|
+
isSignal: true,
|
|
1586
|
+
alias: "view",
|
|
1587
|
+
required: false
|
|
1588
|
+
}]
|
|
1589
|
+
}, {
|
|
1590
|
+
type: i0.Output,
|
|
1591
|
+
args: ["viewChange"]
|
|
1592
|
+
}],
|
|
1593
|
+
date: [{
|
|
1594
|
+
type: i0.Input,
|
|
1595
|
+
args: [{
|
|
1596
|
+
isSignal: true,
|
|
1597
|
+
alias: "date",
|
|
1598
|
+
required: false
|
|
1599
|
+
}]
|
|
1600
|
+
}, {
|
|
1601
|
+
type: i0.Output,
|
|
1602
|
+
args: ["dateChange"]
|
|
1603
|
+
}],
|
|
1604
|
+
views: [{
|
|
1605
|
+
type: i0.Input,
|
|
1606
|
+
args: [{
|
|
1607
|
+
isSignal: true,
|
|
1608
|
+
alias: "views",
|
|
1609
|
+
required: false
|
|
1610
|
+
}]
|
|
1611
|
+
}],
|
|
1612
|
+
locale: [{
|
|
1613
|
+
type: i0.Input,
|
|
1614
|
+
args: [{
|
|
1615
|
+
isSignal: true,
|
|
1616
|
+
alias: "locale",
|
|
1617
|
+
required: false
|
|
1618
|
+
}]
|
|
1619
|
+
}],
|
|
1620
|
+
firstDayOfWeek: [{
|
|
1621
|
+
type: i0.Input,
|
|
1622
|
+
args: [{
|
|
1623
|
+
isSignal: true,
|
|
1624
|
+
alias: "firstDayOfWeek",
|
|
1625
|
+
required: false
|
|
1626
|
+
}]
|
|
1627
|
+
}],
|
|
1628
|
+
dayStartHour: [{
|
|
1629
|
+
type: i0.Input,
|
|
1630
|
+
args: [{
|
|
1631
|
+
isSignal: true,
|
|
1632
|
+
alias: "dayStartHour",
|
|
1633
|
+
required: false
|
|
1634
|
+
}]
|
|
1635
|
+
}],
|
|
1636
|
+
dayEndHour: [{
|
|
1637
|
+
type: i0.Input,
|
|
1638
|
+
args: [{
|
|
1639
|
+
isSignal: true,
|
|
1640
|
+
alias: "dayEndHour",
|
|
1641
|
+
required: false
|
|
1642
|
+
}]
|
|
1643
|
+
}],
|
|
1644
|
+
scrollToHour: [{
|
|
1645
|
+
type: i0.Input,
|
|
1646
|
+
args: [{
|
|
1647
|
+
isSignal: true,
|
|
1648
|
+
alias: "scrollToHour",
|
|
1649
|
+
required: false
|
|
1650
|
+
}]
|
|
1651
|
+
}],
|
|
1652
|
+
slotMinutes: [{
|
|
1653
|
+
type: i0.Input,
|
|
1654
|
+
args: [{
|
|
1655
|
+
isSignal: true,
|
|
1656
|
+
alias: "slotMinutes",
|
|
1657
|
+
required: false
|
|
1658
|
+
}]
|
|
1659
|
+
}],
|
|
1660
|
+
maxEventsPerDay: [{
|
|
1661
|
+
type: i0.Input,
|
|
1662
|
+
args: [{
|
|
1663
|
+
isSignal: true,
|
|
1664
|
+
alias: "maxEventsPerDay",
|
|
1665
|
+
required: false
|
|
1666
|
+
}]
|
|
1667
|
+
}],
|
|
1668
|
+
agendaDays: [{
|
|
1669
|
+
type: i0.Input,
|
|
1670
|
+
args: [{
|
|
1671
|
+
isSignal: true,
|
|
1672
|
+
alias: "agendaDays",
|
|
1673
|
+
required: false
|
|
1674
|
+
}]
|
|
1675
|
+
}],
|
|
1676
|
+
now: [{
|
|
1677
|
+
type: i0.Input,
|
|
1678
|
+
args: [{
|
|
1679
|
+
isSignal: true,
|
|
1680
|
+
alias: "now",
|
|
1681
|
+
required: false
|
|
1682
|
+
}]
|
|
1683
|
+
}],
|
|
1684
|
+
editable: [{
|
|
1685
|
+
type: i0.Input,
|
|
1686
|
+
args: [{
|
|
1687
|
+
isSignal: true,
|
|
1688
|
+
alias: "editable",
|
|
1689
|
+
required: false
|
|
1690
|
+
}]
|
|
1691
|
+
}],
|
|
1692
|
+
label: [{
|
|
1693
|
+
type: i0.Input,
|
|
1694
|
+
args: [{
|
|
1695
|
+
isSignal: true,
|
|
1696
|
+
alias: "label",
|
|
1697
|
+
required: false
|
|
1698
|
+
}]
|
|
1699
|
+
}],
|
|
1700
|
+
todayText: [{
|
|
1701
|
+
type: i0.Input,
|
|
1702
|
+
args: [{
|
|
1703
|
+
isSignal: true,
|
|
1704
|
+
alias: "todayText",
|
|
1705
|
+
required: false
|
|
1706
|
+
}]
|
|
1707
|
+
}],
|
|
1708
|
+
previousLabel: [{
|
|
1709
|
+
type: i0.Input,
|
|
1710
|
+
args: [{
|
|
1711
|
+
isSignal: true,
|
|
1712
|
+
alias: "previousLabel",
|
|
1713
|
+
required: false
|
|
1714
|
+
}]
|
|
1715
|
+
}],
|
|
1716
|
+
nextLabel: [{
|
|
1717
|
+
type: i0.Input,
|
|
1718
|
+
args: [{
|
|
1719
|
+
isSignal: true,
|
|
1720
|
+
alias: "nextLabel",
|
|
1721
|
+
required: false
|
|
1722
|
+
}]
|
|
1723
|
+
}],
|
|
1724
|
+
viewLabel: [{
|
|
1725
|
+
type: i0.Input,
|
|
1726
|
+
args: [{
|
|
1727
|
+
isSignal: true,
|
|
1728
|
+
alias: "viewLabel",
|
|
1729
|
+
required: false
|
|
1730
|
+
}]
|
|
1731
|
+
}],
|
|
1732
|
+
monthText: [{
|
|
1733
|
+
type: i0.Input,
|
|
1734
|
+
args: [{
|
|
1735
|
+
isSignal: true,
|
|
1736
|
+
alias: "monthText",
|
|
1737
|
+
required: false
|
|
1738
|
+
}]
|
|
1739
|
+
}],
|
|
1740
|
+
weekText: [{
|
|
1741
|
+
type: i0.Input,
|
|
1742
|
+
args: [{
|
|
1743
|
+
isSignal: true,
|
|
1744
|
+
alias: "weekText",
|
|
1745
|
+
required: false
|
|
1746
|
+
}]
|
|
1747
|
+
}],
|
|
1748
|
+
dayText: [{
|
|
1749
|
+
type: i0.Input,
|
|
1750
|
+
args: [{
|
|
1751
|
+
isSignal: true,
|
|
1752
|
+
alias: "dayText",
|
|
1753
|
+
required: false
|
|
1754
|
+
}]
|
|
1755
|
+
}],
|
|
1756
|
+
agendaText: [{
|
|
1757
|
+
type: i0.Input,
|
|
1758
|
+
args: [{
|
|
1759
|
+
isSignal: true,
|
|
1760
|
+
alias: "agendaText",
|
|
1761
|
+
required: false
|
|
1762
|
+
}]
|
|
1763
|
+
}],
|
|
1764
|
+
allDayText: [{
|
|
1765
|
+
type: i0.Input,
|
|
1766
|
+
args: [{
|
|
1767
|
+
isSignal: true,
|
|
1768
|
+
alias: "allDayText",
|
|
1769
|
+
required: false
|
|
1770
|
+
}]
|
|
1771
|
+
}],
|
|
1772
|
+
emptyText: [{
|
|
1773
|
+
type: i0.Input,
|
|
1774
|
+
args: [{
|
|
1775
|
+
isSignal: true,
|
|
1776
|
+
alias: "emptyText",
|
|
1777
|
+
required: false
|
|
1778
|
+
}]
|
|
1779
|
+
}],
|
|
1780
|
+
invalidText: [{
|
|
1781
|
+
type: i0.Input,
|
|
1782
|
+
args: [{
|
|
1783
|
+
isSignal: true,
|
|
1784
|
+
alias: "invalidText",
|
|
1785
|
+
required: false
|
|
1786
|
+
}]
|
|
1787
|
+
}],
|
|
1788
|
+
moreText: [{
|
|
1789
|
+
type: i0.Input,
|
|
1790
|
+
args: [{
|
|
1791
|
+
isSignal: true,
|
|
1792
|
+
alias: "moreText",
|
|
1793
|
+
required: false
|
|
1794
|
+
}]
|
|
1795
|
+
}],
|
|
1796
|
+
eventsText: [{
|
|
1797
|
+
type: i0.Input,
|
|
1798
|
+
args: [{
|
|
1799
|
+
isSignal: true,
|
|
1800
|
+
alias: "eventsText",
|
|
1801
|
+
required: false
|
|
1802
|
+
}]
|
|
1803
|
+
}],
|
|
1804
|
+
changedText: [{
|
|
1805
|
+
type: i0.Input,
|
|
1806
|
+
args: [{
|
|
1807
|
+
isSignal: true,
|
|
1808
|
+
alias: "changedText",
|
|
1809
|
+
required: false
|
|
1810
|
+
}]
|
|
1811
|
+
}],
|
|
1812
|
+
canceledText: [{
|
|
1813
|
+
type: i0.Input,
|
|
1814
|
+
args: [{
|
|
1815
|
+
isSignal: true,
|
|
1816
|
+
alias: "canceledText",
|
|
1817
|
+
required: false
|
|
1818
|
+
}]
|
|
1819
|
+
}],
|
|
1820
|
+
eventActivate: [{
|
|
1821
|
+
type: i0.Output,
|
|
1822
|
+
args: ["eventActivate"]
|
|
1823
|
+
}],
|
|
1824
|
+
slotActivate: [{
|
|
1825
|
+
type: i0.Output,
|
|
1826
|
+
args: ["slotActivate"]
|
|
1827
|
+
}],
|
|
1828
|
+
eventChange: [{
|
|
1829
|
+
type: i0.Output,
|
|
1830
|
+
args: ["eventChange"]
|
|
1831
|
+
}]
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
1834
|
+
export { VdSchedule, vdScheduleApplyChange };
|
|
1835
|
+
|
|
1836
|
+
//# sourceMappingURL=vadem-ui-schedule.mjs.map
|