barsa-calendar 1.0.456 → 2.0.1
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/{esm2020 → esm2022}/barsa-calendar.mjs +4 -4
- package/esm2022/lib/barsa-calendar.module.mjs +117 -0
- package/esm2022/lib/calendar-container/calendar-container.component.mjs +230 -0
- package/esm2022/lib/calendar-header/calendar-header.component.mjs +66 -0
- package/esm2022/lib/calendar-list/calendar-list.component.mjs +18 -0
- package/esm2022/lib/calendar-list-container/calendar-list-container.component.mjs +29 -0
- package/{esm2020 → esm2022}/lib/calendar-list-item/calendar-list-item.component.mjs +14 -14
- package/esm2022/lib/calendar-month/calendar-month.component.mjs +246 -0
- package/esm2022/lib/calendar-selection-days/calendar-selection-days.component.mjs +196 -0
- package/esm2022/lib/calendar-week/calendar-week.component.mjs +252 -0
- package/{esm2020 → esm2022}/lib/constants.mjs +3 -3
- package/esm2022/lib/date-time-picker/date-time-picker.component.mjs +431 -0
- package/esm2022/lib/day-event-list/day-event-list.component.mjs +55 -0
- package/esm2022/lib/day-number-box/day-number-box.component.mjs +105 -0
- package/{esm2020 → esm2022}/lib/days-in-week.pipe.mjs +17 -17
- package/esm2022/lib/equal-date.pipe.mjs +23 -0
- package/esm2022/lib/event-button/event-button.component.mjs +97 -0
- package/esm2022/lib/event-button-end-arrow/event-button-end-arrow.component.mjs +29 -0
- package/esm2022/lib/event-button-start-arrow/event-button-start-arrow.component.mjs +29 -0
- package/esm2022/lib/event-date.pipe.mjs +24 -0
- package/esm2022/lib/event-preview/event-preview.component.mjs +79 -0
- package/{esm2020 → esm2022}/lib/event-time.pipe.mjs +22 -22
- package/{esm2020 → esm2022}/lib/from-to-time.pipe.mjs +23 -23
- package/esm2022/lib/models.mjs +14 -0
- package/esm2022/lib/month-days/month-days.component.mjs +222 -0
- package/esm2022/lib/services/calendar.service.mjs +645 -0
- package/{esm2020 → esm2022}/public-api.mjs +23 -23
- package/fesm2022/barsa-calendar.mjs +2816 -0
- package/fesm2022/barsa-calendar.mjs.map +1 -0
- package/index.d.ts +5 -5
- package/lib/barsa-calendar.module.d.ts +53 -53
- package/lib/calendar-container/calendar-container.component.d.ts +89 -89
- package/lib/calendar-header/calendar-header.component.d.ts +33 -33
- package/lib/calendar-list/calendar-list.component.d.ts +8 -8
- package/lib/calendar-list-container/calendar-list-container.component.d.ts +14 -14
- package/lib/calendar-list-item/calendar-list-item.component.d.ts +7 -7
- package/lib/calendar-month/calendar-month.component.d.ts +70 -70
- package/lib/calendar-selection-days/calendar-selection-days.component.d.ts +48 -48
- package/lib/calendar-week/calendar-week.component.d.ts +70 -70
- package/lib/constants.d.ts +1 -1
- package/lib/date-time-picker/date-time-picker.component.d.ts +113 -112
- package/lib/day-event-list/day-event-list.component.d.ts +20 -20
- package/lib/day-number-box/day-number-box.component.d.ts +30 -30
- package/lib/days-in-week.pipe.d.ts +9 -9
- package/lib/equal-date.pipe.d.ts +8 -8
- package/lib/event-button/event-button.component.d.ts +31 -31
- package/lib/event-button-end-arrow/event-button-end-arrow.component.d.ts +12 -12
- package/lib/event-button-start-arrow/event-button-start-arrow.component.d.ts +12 -12
- package/lib/event-date.pipe.d.ts +9 -9
- package/lib/event-preview/event-preview.component.d.ts +24 -24
- package/lib/event-time.pipe.d.ts +9 -9
- package/lib/from-to-time.pipe.d.ts +9 -9
- package/lib/models.d.ts +110 -110
- package/lib/month-days/month-days.component.d.ts +69 -69
- package/lib/services/calendar.service.d.ts +70 -70
- package/package.json +7 -13
- package/public-api.d.ts +19 -19
- package/esm2020/lib/barsa-calendar.module.mjs +0 -117
- package/esm2020/lib/calendar-container/calendar-container.component.mjs +0 -230
- package/esm2020/lib/calendar-header/calendar-header.component.mjs +0 -67
- package/esm2020/lib/calendar-list/calendar-list.component.mjs +0 -19
- package/esm2020/lib/calendar-list-container/calendar-list-container.component.mjs +0 -30
- package/esm2020/lib/calendar-month/calendar-month.component.mjs +0 -246
- package/esm2020/lib/calendar-selection-days/calendar-selection-days.component.mjs +0 -195
- package/esm2020/lib/calendar-week/calendar-week.component.mjs +0 -249
- package/esm2020/lib/date-time-picker/date-time-picker.component.mjs +0 -433
- package/esm2020/lib/day-event-list/day-event-list.component.mjs +0 -56
- package/esm2020/lib/day-number-box/day-number-box.component.mjs +0 -105
- package/esm2020/lib/equal-date.pipe.mjs +0 -23
- package/esm2020/lib/event-button/event-button.component.mjs +0 -97
- package/esm2020/lib/event-button-end-arrow/event-button-end-arrow.component.mjs +0 -29
- package/esm2020/lib/event-button-start-arrow/event-button-start-arrow.component.mjs +0 -29
- package/esm2020/lib/event-date.pipe.mjs +0 -24
- package/esm2020/lib/event-preview/event-preview.component.mjs +0 -79
- package/esm2020/lib/models.mjs +0 -14
- package/esm2020/lib/month-days/month-days.component.mjs +0 -222
- package/esm2020/lib/services/calendar.service.mjs +0 -645
- package/fesm2015/barsa-calendar.mjs +0 -2813
- package/fesm2015/barsa-calendar.mjs.map +0 -1
- package/fesm2020/barsa-calendar.mjs +0 -2817
- package/fesm2020/barsa-calendar.mjs.map +0 -1
|
@@ -1,2813 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Optional, Inject, Pipe, EventEmitter, Component, ChangeDetectionStrategy, HostBinding, Input, Output, HostListener, ViewChild, Self, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
3
|
-
import { takeUntil, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
|
|
4
|
-
import * as i2 from 'barsa-novin-ray-core';
|
|
5
|
-
import { BaseComponent, getDateService, getUniqueId, PreventDefaulEvent, DateService, BarsaApi, ReportViewBaseComponent, LogService, BaseModule, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
|
|
6
|
-
import { BehaviorSubject, combineLatest, of } from 'rxjs';
|
|
7
|
-
import moment from 'moment/moment';
|
|
8
|
-
import * as i3 from '@angular/common';
|
|
9
|
-
import { CommonModule, TitleCasePipe } from '@angular/common';
|
|
10
|
-
import * as i4 from '@fundamental-ngx/core/button';
|
|
11
|
-
import * as i6$1 from '@fundamental-ngx/core/popover';
|
|
12
|
-
import { PopoverModule } from '@fundamental-ngx/core/popover';
|
|
13
|
-
import * as i7 from '@fundamental-ngx/core/toolbar';
|
|
14
|
-
import * as i5$1 from '@fundamental-ngx/core/content-density';
|
|
15
|
-
import * as i7$1 from '@fundamental-ngx/core/table';
|
|
16
|
-
import * as i2$2 from '@fundamental-ngx/core';
|
|
17
|
-
import { PopoverComponent, FdDate, DatetimeAdapter, FdDatetimeAdapter, TimeI18n, TimeComponent, InputGroupComponent, FundamentalNgxCoreModule } from '@fundamental-ngx/core';
|
|
18
|
-
import * as i9 from '@fundamental-ngx/core/dialog';
|
|
19
|
-
import * as i2$1 from '@fundamental-ngx/core/avatar';
|
|
20
|
-
import * as i4$1 from '@fundamental-ngx/core/icon';
|
|
21
|
-
import * as i5 from '@fundamental-ngx/core/layout-panel';
|
|
22
|
-
import * as i6 from '@fundamental-ngx/core/quick-view';
|
|
23
|
-
import { QuickViewModule } from '@fundamental-ngx/core/quick-view';
|
|
24
|
-
import * as i3$1 from '@fundamental-ngx/core/bar';
|
|
25
|
-
import * as i6$2 from '@fundamental-ngx/core/list';
|
|
26
|
-
import * as i4$2 from '@angular/forms';
|
|
27
|
-
import { FormsModule } from '@angular/forms';
|
|
28
|
-
import * as i8 from '@fundamental-ngx/core/input-group';
|
|
29
|
-
import * as i11 from '@fundamental-ngx/core/time';
|
|
30
|
-
import moment$1 from 'moment';
|
|
31
|
-
import * as i4$3 from '@fundamental-ngx/core/menu';
|
|
32
|
-
import * as i5$2 from '@fundamental-ngx/core/title';
|
|
33
|
-
import * as i6$3 from '@fundamental-ngx/core/split-button';
|
|
34
|
-
import * as i5$3 from '@fundamental-ngx/core/checkbox';
|
|
35
|
-
import { CardModule } from '@fundamental-ngx/core/card';
|
|
36
|
-
|
|
37
|
-
var DayStatus;
|
|
38
|
-
(function (DayStatus) {
|
|
39
|
-
DayStatus[DayStatus["Open"] = 0] = "Open";
|
|
40
|
-
DayStatus[DayStatus["Completed"] = 1] = "Completed";
|
|
41
|
-
DayStatus[DayStatus["Failed"] = 2] = "Failed";
|
|
42
|
-
})(DayStatus || (DayStatus = {}));
|
|
43
|
-
class CalendarMonthInfo {
|
|
44
|
-
get daysInWeek() {
|
|
45
|
-
const start = this.selectedWeek * 7;
|
|
46
|
-
const days = this.days.slice(start, start + 7);
|
|
47
|
-
return days;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
class CalendarService extends BaseComponent {
|
|
52
|
-
constructor(_logService, culture) {
|
|
53
|
-
super();
|
|
54
|
-
this._logService = _logService;
|
|
55
|
-
this._calendarsSource = new BehaviorSubject([]);
|
|
56
|
-
this._modeSource = new BehaviorSubject('month');
|
|
57
|
-
this._currentMonthIndexSource = new BehaviorSubject(-1);
|
|
58
|
-
this._weekModeDaysSource = new BehaviorSubject([]);
|
|
59
|
-
this._daysSource = new BehaviorSubject([]);
|
|
60
|
-
this._dateService = getDateService(_logService, culture);
|
|
61
|
-
this.days$ = this._daysSource.asObservable();
|
|
62
|
-
this.mode$ = this._modeSource.asObservable();
|
|
63
|
-
this.weekModeDays$ = this._weekModeDaysSource.asObservable();
|
|
64
|
-
this.calendars$ = this._calendarsSource.asObservable();
|
|
65
|
-
this.currentMonthIndex$ = this._currentMonthIndexSource.asObservable();
|
|
66
|
-
this._initilize();
|
|
67
|
-
this.setMode('day');
|
|
68
|
-
}
|
|
69
|
-
get todayMonthInfo() {
|
|
70
|
-
return this._todayMonthInfo;
|
|
71
|
-
}
|
|
72
|
-
get selectedMonth() {
|
|
73
|
-
return this._selectedSource.getValue();
|
|
74
|
-
}
|
|
75
|
-
get calendars() {
|
|
76
|
-
return this._calendarsSource.getValue();
|
|
77
|
-
}
|
|
78
|
-
get weeksCount() {
|
|
79
|
-
return this._daysSource.getValue().length / 7;
|
|
80
|
-
}
|
|
81
|
-
get days() {
|
|
82
|
-
return this._daysSource.getValue();
|
|
83
|
-
}
|
|
84
|
-
get Months() {
|
|
85
|
-
return this._dateService.monthNames();
|
|
86
|
-
}
|
|
87
|
-
loadMonthByDate(value) {
|
|
88
|
-
const monthInfo = this._dateService.getDateInfo(value);
|
|
89
|
-
this.loadMonth(monthInfo);
|
|
90
|
-
}
|
|
91
|
-
setDateService(primaryCalendarType) {
|
|
92
|
-
let dateService = this._dateService;
|
|
93
|
-
switch (primaryCalendarType) {
|
|
94
|
-
case 'Persian':
|
|
95
|
-
dateService = getDateService(this._logService, 'fa-IR');
|
|
96
|
-
break;
|
|
97
|
-
case 'Gregorian':
|
|
98
|
-
dateService = getDateService(this._logService, 'en-US');
|
|
99
|
-
break;
|
|
100
|
-
case 'Arabic':
|
|
101
|
-
dateService = getDateService(this._logService, 'ar-AE');
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
this._dateService = dateService;
|
|
105
|
-
this._initilize();
|
|
106
|
-
}
|
|
107
|
-
setDays(days) {
|
|
108
|
-
this._daysSource.next(days);
|
|
109
|
-
}
|
|
110
|
-
prepareWeek(monthInfo, startIndex, daysCount) {
|
|
111
|
-
const startDays = monthInfo.days.slice(startIndex, startIndex + daysCount);
|
|
112
|
-
this._weekModeDaysSource.next(startDays);
|
|
113
|
-
}
|
|
114
|
-
setSelected(selected) {
|
|
115
|
-
this._selectedSource.next(selected);
|
|
116
|
-
}
|
|
117
|
-
weekDaysMin() {
|
|
118
|
-
return this._dateService.weekdaysMin();
|
|
119
|
-
}
|
|
120
|
-
weekDays() {
|
|
121
|
-
return this._dateService.weekDays();
|
|
122
|
-
}
|
|
123
|
-
gotoToday() {
|
|
124
|
-
this.loadMonth(this._todayMonthInfo.dateInfo, 0);
|
|
125
|
-
this.setMode(this._modeSource.getValue(), this._todayMonthInfo.days.find((c) => c.isToday), this._weekModeDaysSource.getValue().length);
|
|
126
|
-
}
|
|
127
|
-
rangeSelect(startDay, endDay, monthInfo) {
|
|
128
|
-
const diff = endDay.index - startDay.index;
|
|
129
|
-
if (diff < 7) {
|
|
130
|
-
this.setMode('week', startDay, diff + 1);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
const diff2 = diff + 1;
|
|
134
|
-
this.setMode('customMonth');
|
|
135
|
-
this.setMonth(monthInfo, startDay, diff2);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
setMonth(monthInfo, startDay, diff = 0) {
|
|
139
|
-
if (startDay && diff > 0) {
|
|
140
|
-
const startIndex = startDay.index;
|
|
141
|
-
this.loadCalendarMonthInfo(monthInfo);
|
|
142
|
-
this.setDays(monthInfo.days.slice(startIndex, startIndex + diff));
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
this.loadCalendarMonthInfo(monthInfo);
|
|
146
|
-
this.setDays(monthInfo.days);
|
|
147
|
-
// else if (mode === 'month') {
|
|
148
|
-
// startDay = daysLoaded[0];
|
|
149
|
-
// if (startDay) this.loadMonth(startDay.monthDateInfo);
|
|
150
|
-
// }
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
setMode(mode, startDay, daysCount) {
|
|
154
|
-
const oldMode = this._modeSource.getValue();
|
|
155
|
-
this._modeSource.next(mode);
|
|
156
|
-
if (mode === 'month') {
|
|
157
|
-
this.setMonth(this.selectedMonth, startDay);
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
else if (mode === 'customMonth') {
|
|
161
|
-
this.setMonth(this.selectedMonth, startDay, this.days.length);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
const daysLoaded = this._weekModeDaysSource.getValue();
|
|
165
|
-
daysCount = daysCount !== null && daysCount !== void 0 ? daysCount : (mode === 'week' ? 7 : 1);
|
|
166
|
-
let startIndex = 0;
|
|
167
|
-
if (!startDay) {
|
|
168
|
-
if (mode === 'week' || mode === 'day') {
|
|
169
|
-
if (oldMode === 'month') {
|
|
170
|
-
{
|
|
171
|
-
startDay = this.selectedMonth.days.find((c) => c.isToday);
|
|
172
|
-
if (!startDay) {
|
|
173
|
-
startDay = this.selectedMonth.days.find((c) => c.isStartOfMonth);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else if (oldMode === 'customMonth') {
|
|
178
|
-
startDay = this.days[0];
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
startDay = daysLoaded[0];
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
if (startDay) {
|
|
186
|
-
if (startDay.monthDateInfo.month !== this.selectedMonth.dateInfo.month ||
|
|
187
|
-
startDay.monthDateInfo.year !== this.selectedMonth.dateInfo.year) {
|
|
188
|
-
this.loadMonth(startDay.monthDateInfo);
|
|
189
|
-
}
|
|
190
|
-
startIndex = this.selectedMonth.days.findIndex((c) => c.month === (startDay === null || startDay === void 0 ? void 0 : startDay.month) && c.dayInMonth === startDay.dayInMonth);
|
|
191
|
-
}
|
|
192
|
-
this.prepareWeek(this._selectedSource.getValue(), startIndex, daysCount);
|
|
193
|
-
}
|
|
194
|
-
fillWeek(week, daysCount = 7) {
|
|
195
|
-
const arr = Object.values(week);
|
|
196
|
-
arr.forEach((element) => {
|
|
197
|
-
for (const el of element) {
|
|
198
|
-
const valueDate = el.end;
|
|
199
|
-
if (valueDate && this._dateService.getMoment(valueDate).isBefore(this.today, 'day')) {
|
|
200
|
-
el.opacity = 0.5;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
for (let i = element.length; i < daysCount; i++) {
|
|
204
|
-
element.push({ colSpan: 1 });
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
sortTasks(calendarTasks, calendarFields) {
|
|
209
|
-
const startDateField = calendarFields.StartDate;
|
|
210
|
-
const endDateField = calendarFields.EndDate;
|
|
211
|
-
calendarTasks.sort((taskA, taskB) => (taskA[startDateField] < taskB[startDateField] ? -1 : 1));
|
|
212
|
-
calendarTasks.sort((taskA, taskB) => {
|
|
213
|
-
const taskAStartDate = taskA[startDateField];
|
|
214
|
-
const taskBStartDate = taskB[startDateField];
|
|
215
|
-
const momentTaskAStartDate = this._dateService.getMoment(taskAStartDate);
|
|
216
|
-
const momentTaskBStartDate = this._dateService.getMoment(taskBStartDate);
|
|
217
|
-
if (momentTaskAStartDate.isSame(momentTaskBStartDate, 'day')) {
|
|
218
|
-
const taskAEndDate = taskA[endDateField];
|
|
219
|
-
const taskBEndDate = taskB[endDateField];
|
|
220
|
-
const dayADiff = momentTaskAStartDate.diff(taskAEndDate, 'day');
|
|
221
|
-
const dayBDiff = momentTaskBStartDate.diff(taskBEndDate, 'day');
|
|
222
|
-
if (dayADiff > dayBDiff) {
|
|
223
|
-
return 1;
|
|
224
|
-
}
|
|
225
|
-
if (dayADiff < dayBDiff) {
|
|
226
|
-
return -1;
|
|
227
|
-
}
|
|
228
|
-
return 0;
|
|
229
|
-
}
|
|
230
|
-
{
|
|
231
|
-
return 0;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
return calendarTasks;
|
|
235
|
-
}
|
|
236
|
-
createWeekTask(days, moDataList, calendarFields, taskHeight) {
|
|
237
|
-
const week = {};
|
|
238
|
-
days.forEach((day, dayIndex) => {
|
|
239
|
-
let counter = 0;
|
|
240
|
-
moDataList.forEach((event) => {
|
|
241
|
-
const counterIndex = counter.toString();
|
|
242
|
-
if (!week[counterIndex]) {
|
|
243
|
-
week[counterIndex] = [];
|
|
244
|
-
}
|
|
245
|
-
else if (week[counterIndex].length > dayIndex) {
|
|
246
|
-
counter++;
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
for (let m = week[counterIndex].length; m < dayIndex; m++) {
|
|
250
|
-
week[counterIndex].push({ colSpan: 1 });
|
|
251
|
-
}
|
|
252
|
-
// agar week[counter] colspan ja dasht anjam gardad.
|
|
253
|
-
const newTask = { colSpan: 1 };
|
|
254
|
-
const momentDay = this._dateService.getMoment(day.date);
|
|
255
|
-
const momentOfStartEvent = this._dateService.getMoment(event[calendarFields.StartDate]);
|
|
256
|
-
const endDate = event[calendarFields.EndDate];
|
|
257
|
-
const momentOfEndEvent = this._dateService.getMoment(endDate);
|
|
258
|
-
const diff = Math.abs(momentOfStartEvent.diff(momentOfEndEvent, 'day'));
|
|
259
|
-
if (diff === 0 && momentDay.isSame(momentOfStartEvent, 'day')) {
|
|
260
|
-
newTask.colSpan = 1;
|
|
261
|
-
const startMinuteTop = (event.$StartDateInfo.minutes * taskHeight) / 60;
|
|
262
|
-
newTask.top = event.$StartDateInfo.hour * taskHeight + startMinuteTop;
|
|
263
|
-
const endMinuteTop = (event.$EndDateInfo.minutes * taskHeight) / 60;
|
|
264
|
-
newTask.height =
|
|
265
|
-
(event.$EndDateInfo.hour - event.$StartDateInfo.hour) * taskHeight +
|
|
266
|
-
endMinuteTop -
|
|
267
|
-
startMinuteTop;
|
|
268
|
-
newTask.event = event;
|
|
269
|
-
newTask.enddayIsInRow = true;
|
|
270
|
-
newTask.startdayIsInRow = true;
|
|
271
|
-
newTask.isStartDay = true;
|
|
272
|
-
newTask.isEndDay = true;
|
|
273
|
-
newTask.start = newTask.end = day.date;
|
|
274
|
-
newTask.inDay =
|
|
275
|
-
event.$StartDateInfo.hour > 0 ||
|
|
276
|
-
event.$StartDateInfo.minutes > 0 ||
|
|
277
|
-
event.$EndDateInfo.hour > 0 ||
|
|
278
|
-
event.$EndDateInfo.minutes > 0;
|
|
279
|
-
week[counterIndex].splice(dayIndex, 0, newTask);
|
|
280
|
-
day.tasks.push(newTask);
|
|
281
|
-
counter++;
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
let diffFromEndOfEvent = 0;
|
|
285
|
-
let diffFromStartOfEvent = 0;
|
|
286
|
-
const isBetween = momentDay.isSameOrAfter(momentOfStartEvent, 'day') &&
|
|
287
|
-
momentDay.isSameOrBefore(momentOfEndEvent, 'day');
|
|
288
|
-
if (isBetween) {
|
|
289
|
-
diffFromEndOfEvent = 0;
|
|
290
|
-
if (diff === 0) {
|
|
291
|
-
newTask.colSpan = 1;
|
|
292
|
-
newTask.event = event;
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
diffFromEndOfEvent = Math.abs(momentDay.diff(momentOfEndEvent, 'day'));
|
|
296
|
-
diffFromStartOfEvent = Math.abs(momentDay.diff(momentOfStartEvent, 'day'));
|
|
297
|
-
const isStartDay = momentDay.isSame(momentOfStartEvent, 'day');
|
|
298
|
-
const isEndDay = momentDay.isSame(momentOfEndEvent, 'day');
|
|
299
|
-
let colSpan = diff;
|
|
300
|
-
if (!isStartDay) {
|
|
301
|
-
colSpan = diffFromEndOfEvent;
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
colSpan = diff + 1; // include the start
|
|
305
|
-
}
|
|
306
|
-
newTask.colSpan = this._calcColSpan(colSpan, dayIndex, days.length);
|
|
307
|
-
newTask.isStartDay = isStartDay;
|
|
308
|
-
newTask.isEndDay = isEndDay;
|
|
309
|
-
newTask.isMiddle = !isStartDay && !isEndDay;
|
|
310
|
-
newTask.event = event;
|
|
311
|
-
}
|
|
312
|
-
if (newTask.isStartDay || dayIndex === 0) {
|
|
313
|
-
for (let span = 0; span < newTask.colSpan; span++) {
|
|
314
|
-
const taskIndex = dayIndex + span;
|
|
315
|
-
if (taskIndex > days.length - 1) {
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
const taskDayInfo = days[taskIndex];
|
|
319
|
-
const taskInfo = Object.assign(Object.assign({}, newTask), { start: taskDayInfo.date, end: endDate, isStartDay: span === 0 ? newTask.isStartDay : null, startTask: event.$StartDayInfo, endTask: event.$EndDayInfo, startdayIsInRow: dayIndex - diffFromStartOfEvent > -1, enddayIsInRow: !!days[diffFromEndOfEvent], isMiddle: span === 0
|
|
320
|
-
? newTask.isMiddle
|
|
321
|
-
: this._dateService
|
|
322
|
-
.getMoment(taskDayInfo.date)
|
|
323
|
-
.isBetween(momentOfStartEvent, momentOfEndEvent, 'day'), isEndDay: span === 0
|
|
324
|
-
? newTask.isEndDay
|
|
325
|
-
: Math.abs(this._dateService
|
|
326
|
-
.getMoment(taskDayInfo.date)
|
|
327
|
-
.diff(momentOfEndEvent, 'day')) <= 1, colSpan: span === 0 ? newTask.colSpan : null });
|
|
328
|
-
week[counter.toString()].splice(taskIndex, 0, taskInfo);
|
|
329
|
-
taskDayInfo.tasks.push(taskInfo);
|
|
330
|
-
}
|
|
331
|
-
counter++;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
day.tasks = day.tasks
|
|
337
|
-
.map((t) => {
|
|
338
|
-
t.positionCausedByOverlap = 0;
|
|
339
|
-
return t;
|
|
340
|
-
})
|
|
341
|
-
.map((t) => {
|
|
342
|
-
const tasksInDay = day.tasks.filter((innerT) => innerT.isStartDay && innerT.isEndDay);
|
|
343
|
-
const overlaps = tasksInDay.filter((innerT) => {
|
|
344
|
-
const startTime = moment(t.event.$StartDateInfo.date);
|
|
345
|
-
const endTime = moment(t.event.$EndDateInfo.date);
|
|
346
|
-
const innerStartTime = moment(innerT.event.$StartDateInfo.date);
|
|
347
|
-
const innerEndTime = moment(innerT.event.$EndDateInfo.date);
|
|
348
|
-
return ((startTime.isSameOrAfter(innerStartTime) && startTime.isBefore(innerEndTime)) ||
|
|
349
|
-
endTime.isAfter(innerStartTime));
|
|
350
|
-
});
|
|
351
|
-
t.countOfOverlaps = overlaps.length;
|
|
352
|
-
const beforeOverlaps = tasksInDay.filter((innerT) => {
|
|
353
|
-
const startTime = moment(t.event.$StartDateInfo.date);
|
|
354
|
-
const innerStartTime = moment(innerT.event.$StartDateInfo.date);
|
|
355
|
-
const innerEndTime = moment(innerT.event.$EndDateInfo.date);
|
|
356
|
-
return startTime.isSameOrAfter(innerStartTime) && startTime.isBefore(innerEndTime);
|
|
357
|
-
});
|
|
358
|
-
t.positionCausedByOverlap = beforeOverlaps.findIndex((innerT) => innerT.event.Id === t.event.Id);
|
|
359
|
-
return t;
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
return week;
|
|
363
|
-
}
|
|
364
|
-
loadNext() {
|
|
365
|
-
const mode = this._modeSource.getValue();
|
|
366
|
-
const selectedMonth = this._selectedSource.getValue();
|
|
367
|
-
switch (mode) {
|
|
368
|
-
case 'customMonth':
|
|
369
|
-
case 'month':
|
|
370
|
-
{
|
|
371
|
-
const days = this.days;
|
|
372
|
-
const newDays = this._loadNextMonth(days, selectedMonth);
|
|
373
|
-
this.setDays(newDays);
|
|
374
|
-
}
|
|
375
|
-
break;
|
|
376
|
-
case 'week':
|
|
377
|
-
case 'day':
|
|
378
|
-
{
|
|
379
|
-
const days = this._weekModeDaysSource.getValue();
|
|
380
|
-
const newDays = this._loadNextWeek(days, selectedMonth);
|
|
381
|
-
this._weekModeDaysSource.next(newDays);
|
|
382
|
-
}
|
|
383
|
-
break;
|
|
384
|
-
break;
|
|
385
|
-
case 'list':
|
|
386
|
-
break;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
gotoMonth(monthName, monthIndex) {
|
|
390
|
-
const selectedMonth = this.selectedMonth.dateInfo.month;
|
|
391
|
-
const val = monthIndex - selectedMonth;
|
|
392
|
-
this.loadMonth(this.selectedMonth.dateInfo, val);
|
|
393
|
-
}
|
|
394
|
-
gotoYear(year) {
|
|
395
|
-
const selectedYear = this.selectedMonth.dateInfo.year;
|
|
396
|
-
const val = year - selectedYear;
|
|
397
|
-
this.increaseYear(val);
|
|
398
|
-
}
|
|
399
|
-
loadNextYear() {
|
|
400
|
-
this.increaseYear(1);
|
|
401
|
-
}
|
|
402
|
-
loadPrevYear() {
|
|
403
|
-
this.increaseYear(-1);
|
|
404
|
-
}
|
|
405
|
-
increaseYear(value) {
|
|
406
|
-
const selectedYear = this.selectedMonth.dateInfo.moment.toDate();
|
|
407
|
-
selectedYear.setFullYear(selectedYear.getFullYear() + value); // next year
|
|
408
|
-
this.loadMonthByDate(selectedYear);
|
|
409
|
-
}
|
|
410
|
-
loadPrevious() {
|
|
411
|
-
const mode = this._modeSource.getValue();
|
|
412
|
-
const selectedMonth = this._selectedSource.getValue();
|
|
413
|
-
switch (mode) {
|
|
414
|
-
case 'customMonth':
|
|
415
|
-
case 'month':
|
|
416
|
-
{
|
|
417
|
-
const days = this.days;
|
|
418
|
-
const newDays = this._loadPrevMonth(days, selectedMonth);
|
|
419
|
-
this.setDays(newDays);
|
|
420
|
-
}
|
|
421
|
-
break;
|
|
422
|
-
case 'week':
|
|
423
|
-
case 'day':
|
|
424
|
-
{
|
|
425
|
-
const days = this._weekModeDaysSource.getValue();
|
|
426
|
-
const newDays = this._loadPrevWeek(days, selectedMonth);
|
|
427
|
-
this._weekModeDaysSource.next(newDays);
|
|
428
|
-
}
|
|
429
|
-
break;
|
|
430
|
-
break;
|
|
431
|
-
case 'list':
|
|
432
|
-
break;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
loadMonth(dateInfo, addMonth = 0) {
|
|
436
|
-
let loadedMonthDate = this._dateService.getMoment(dateInfo.date);
|
|
437
|
-
if (addMonth > 0) {
|
|
438
|
-
loadedMonthDate = this._dateService.addMonth(loadedMonthDate, addMonth);
|
|
439
|
-
}
|
|
440
|
-
if (addMonth < 0) {
|
|
441
|
-
loadedMonthDate = this._dateService.subtractMonth(loadedMonthDate, Math.abs(addMonth));
|
|
442
|
-
}
|
|
443
|
-
let loadedCalendarMonthInfo = this.calendars.find((c) => c.dateInfo.moment.isSame(loadedMonthDate, 'day'));
|
|
444
|
-
if (!loadedCalendarMonthInfo) {
|
|
445
|
-
loadedCalendarMonthInfo = this.getMonthInfo(loadedMonthDate, this.today);
|
|
446
|
-
}
|
|
447
|
-
this.loadCalendarMonthInfo(loadedCalendarMonthInfo);
|
|
448
|
-
return loadedCalendarMonthInfo;
|
|
449
|
-
}
|
|
450
|
-
loadCalendarMonthInfo(loadedCalendarMonthInfo) {
|
|
451
|
-
const calendarsInfo = [...this.calendars];
|
|
452
|
-
const exists = calendarsInfo.find((c) => c.dateInfo.year === loadedCalendarMonthInfo.dateInfo.year &&
|
|
453
|
-
c.dateInfo.month === loadedCalendarMonthInfo.dateInfo.month);
|
|
454
|
-
if (!exists) {
|
|
455
|
-
calendarsInfo.push(loadedCalendarMonthInfo);
|
|
456
|
-
this._calendarsSource.next(calendarsInfo);
|
|
457
|
-
}
|
|
458
|
-
this.setSelected(loadedCalendarMonthInfo);
|
|
459
|
-
}
|
|
460
|
-
addCalendarMonthInfo(calendarMonthInfo) {
|
|
461
|
-
const newList = this.calendars;
|
|
462
|
-
newList.push(calendarMonthInfo);
|
|
463
|
-
this._calendarsSource.next(newList);
|
|
464
|
-
}
|
|
465
|
-
getNumber(value) {
|
|
466
|
-
const find = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
|
467
|
-
const replace = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
|
468
|
-
let replaceString = value;
|
|
469
|
-
let regex;
|
|
470
|
-
for (let i = 0; i < find.length; i++) {
|
|
471
|
-
regex = new RegExp(find[i], 'g');
|
|
472
|
-
replaceString = replaceString.replace(regex, replace[i]);
|
|
473
|
-
}
|
|
474
|
-
return Number(replaceString);
|
|
475
|
-
}
|
|
476
|
-
_initilize() {
|
|
477
|
-
this.today = this._dateService.getMoment(new Date());
|
|
478
|
-
const todayMonthInfo = this.getCalendarMonthInfo(new Date());
|
|
479
|
-
this.todayDay = todayMonthInfo.days.find((c) => c.isToday);
|
|
480
|
-
this._selectedSource = new BehaviorSubject(todayMonthInfo);
|
|
481
|
-
this.selected$ = this._selectedSource.asObservable();
|
|
482
|
-
this._calendarsSource.next([todayMonthInfo]);
|
|
483
|
-
this.setDays(todayMonthInfo.days);
|
|
484
|
-
this.setSelected(todayMonthInfo);
|
|
485
|
-
this._currentMonthIndexSource.next(todayMonthInfo.dateInfo.month);
|
|
486
|
-
this._todayMonthInfo = todayMonthInfo;
|
|
487
|
-
this.calendars$.pipe(takeUntil(this._onDestroy$)).subscribe();
|
|
488
|
-
}
|
|
489
|
-
_calcColSpan(diff, dayIndex, maxColSpan) {
|
|
490
|
-
if (diff === 0) {
|
|
491
|
-
return 2;
|
|
492
|
-
}
|
|
493
|
-
if (Math.floor(diff / maxColSpan) > 0) {
|
|
494
|
-
return maxColSpan;
|
|
495
|
-
}
|
|
496
|
-
if (dayIndex + diff > maxColSpan) {
|
|
497
|
-
return maxColSpan - dayIndex;
|
|
498
|
-
}
|
|
499
|
-
return diff;
|
|
500
|
-
}
|
|
501
|
-
_loadNextMonth(days, monthInfo) {
|
|
502
|
-
const daysCount = days.length;
|
|
503
|
-
let lastDay = days[daysCount - 1];
|
|
504
|
-
const lastDayIndex = monthInfo.days.findIndex((c) => c.dayInMonth === lastDay.dayInMonth && c.month === lastDay.month);
|
|
505
|
-
let newDays = lastDayIndex > -1 ? monthInfo.days.slice(lastDayIndex + 1, lastDayIndex + 1 + daysCount) : [];
|
|
506
|
-
if (newDays.length < daysCount) {
|
|
507
|
-
// we move to next month
|
|
508
|
-
if (newDays.length > 0) {
|
|
509
|
-
lastDay = newDays[newDays.length - 1];
|
|
510
|
-
}
|
|
511
|
-
const needCountDay = daysCount - newDays.length;
|
|
512
|
-
const nextMonth = this.loadMonth(monthInfo.dateInfo, 1);
|
|
513
|
-
let startPosition = 0;
|
|
514
|
-
if (needCountDay < 42) {
|
|
515
|
-
startPosition = nextMonth.days.findIndex((c) => c.dayInMonth === lastDay.dayInMonth && c.month === lastDay.month);
|
|
516
|
-
if (startPosition === -1) {
|
|
517
|
-
startPosition = 0;
|
|
518
|
-
}
|
|
519
|
-
else {
|
|
520
|
-
startPosition++;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
const nextDays = nextMonth.days.slice(startPosition, startPosition + needCountDay);
|
|
524
|
-
newDays = [...newDays, ...nextDays];
|
|
525
|
-
}
|
|
526
|
-
return newDays;
|
|
527
|
-
}
|
|
528
|
-
_loadNextWeek(days, monthInfo) {
|
|
529
|
-
const daysCount = days.length;
|
|
530
|
-
const lastDay = days[daysCount - 1];
|
|
531
|
-
const lastDayIndex = monthInfo.days.findIndex((c) => c.dayInMonth === lastDay.dayInMonth && c.month === lastDay.month);
|
|
532
|
-
let newDays = monthInfo.days.slice(lastDayIndex + 1, lastDayIndex + 1 + daysCount);
|
|
533
|
-
if (newDays.length < daysCount) {
|
|
534
|
-
// we move to next month
|
|
535
|
-
let lastNewDay = newDays[newDays.length - 1];
|
|
536
|
-
if (!lastNewDay) {
|
|
537
|
-
lastNewDay = lastDay;
|
|
538
|
-
}
|
|
539
|
-
const nextMonth = this.loadMonth(monthInfo.dateInfo, 1);
|
|
540
|
-
const lastDayIndex2 = nextMonth.days.findIndex((c) => c.dayInMonth === lastNewDay.dayInMonth && c.month === lastNewDay.month);
|
|
541
|
-
newDays = newDays.concat(nextMonth.days.slice(lastDayIndex2 + 1, lastDayIndex2 + 1 + (daysCount - newDays.length)));
|
|
542
|
-
}
|
|
543
|
-
return newDays;
|
|
544
|
-
}
|
|
545
|
-
_loadPrevMonth(days, monthInfo) {
|
|
546
|
-
const daysCount = days.length;
|
|
547
|
-
let firstDay = days[0];
|
|
548
|
-
const firstDayIndex = monthInfo.days.findIndex((c) => c.dayInMonth === firstDay.dayInMonth && c.month === firstDay.month);
|
|
549
|
-
let newDays = monthInfo.days.slice(firstDayIndex - daysCount > 0 ? firstDayIndex - daysCount : 0, firstDayIndex);
|
|
550
|
-
if (newDays.length < daysCount) {
|
|
551
|
-
// we move to prev month
|
|
552
|
-
if (newDays.length > 0) {
|
|
553
|
-
firstDay = newDays[0];
|
|
554
|
-
}
|
|
555
|
-
const needCountDay = daysCount - newDays.length;
|
|
556
|
-
const prevMonth = this.loadMonth(monthInfo.dateInfo, -1);
|
|
557
|
-
let endPosition = prevMonth.days.length;
|
|
558
|
-
if (needCountDay < 42) {
|
|
559
|
-
endPosition = prevMonth.days.findIndex((c) => c.dayInMonth === firstDay.dayInMonth && c.month === firstDay.month);
|
|
560
|
-
if (endPosition === -1) {
|
|
561
|
-
endPosition = prevMonth.days.length;
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
const prevDays = prevMonth.days.slice(endPosition - needCountDay, endPosition);
|
|
565
|
-
newDays = [...prevDays, ...newDays];
|
|
566
|
-
}
|
|
567
|
-
return newDays;
|
|
568
|
-
}
|
|
569
|
-
_loadPrevWeek(days, monthInfo) {
|
|
570
|
-
const daysCount = days.length;
|
|
571
|
-
const firstDay = days[0];
|
|
572
|
-
const firstDayIndex = monthInfo.days.findIndex((c) => c.dayInMonth === firstDay.dayInMonth && c.month === firstDay.month);
|
|
573
|
-
const partIndexPrev = firstDayIndex - daysCount;
|
|
574
|
-
let newDays = [];
|
|
575
|
-
if (partIndexPrev < 0) {
|
|
576
|
-
newDays = firstDayIndex - 1 >= 0 ? monthInfo.days.slice(0, firstDayIndex - 1) : [];
|
|
577
|
-
}
|
|
578
|
-
else {
|
|
579
|
-
newDays = monthInfo.days.slice(firstDayIndex - daysCount, firstDayIndex);
|
|
580
|
-
}
|
|
581
|
-
if (newDays.length < daysCount) {
|
|
582
|
-
// we move to prev month
|
|
583
|
-
let firstNewDay = newDays[0];
|
|
584
|
-
if (!firstNewDay) {
|
|
585
|
-
firstNewDay = firstDay;
|
|
586
|
-
}
|
|
587
|
-
const prevMonth = this.loadMonth(monthInfo.dateInfo, -1);
|
|
588
|
-
const firstDayIndex2 = prevMonth.days.findIndex((c) => c.dayInMonth === firstNewDay.dayInMonth && c.month === firstNewDay.month);
|
|
589
|
-
newDays = newDays.concat(prevMonth.days.slice(firstDayIndex2 - (daysCount - newDays.length), firstDayIndex2));
|
|
590
|
-
}
|
|
591
|
-
return newDays;
|
|
592
|
-
}
|
|
593
|
-
getCalendarMonthInfo(date) {
|
|
594
|
-
const startOfMonth = this._dateService.startOfMonth(date);
|
|
595
|
-
const momentDate = this._dateService.getMoment(date);
|
|
596
|
-
return this.getMonthInfo(startOfMonth, momentDate);
|
|
597
|
-
}
|
|
598
|
-
getMonthInfo(date, today) {
|
|
599
|
-
const days = [];
|
|
600
|
-
const activeDate = this._dateService.getMoment(date);
|
|
601
|
-
const startOfMonth = this._dateService.startOfMonth(activeDate);
|
|
602
|
-
const endOfMonth = this._dateService.endOfMonth(activeDate);
|
|
603
|
-
const dateInfo = this._dateService.getDateInfo(activeDate);
|
|
604
|
-
const dayInWeek = this._dateService.day(startOfMonth); // we add 1 to the dayInWeek because it's starts with zero
|
|
605
|
-
let weekCounter = 0;
|
|
606
|
-
let dayCounter = 0;
|
|
607
|
-
for (let i = 0; i < 42; i++) {
|
|
608
|
-
const dateOfStartOfMonth = new Date(startOfMonth);
|
|
609
|
-
dateOfStartOfMonth.setDate(dateOfStartOfMonth.getDate() + i - dayInWeek);
|
|
610
|
-
const { day, isInMonth } = this._getDay(dateOfStartOfMonth, activeDate, today, endOfMonth, startOfMonth, dateInfo, i);
|
|
611
|
-
days.push(day);
|
|
612
|
-
dayCounter++;
|
|
613
|
-
if (isInMonth && dayCounter > weekCounter * 7) {
|
|
614
|
-
weekCounter++;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
// const endOfMonthIndex = days.findIndex((c) => c.isEndOfMonth);
|
|
618
|
-
// if (endOfMonthIndex > -1 && days.length - endOfMonthIndex > 7) {
|
|
619
|
-
// // days.splice(days.length - 7, 7);
|
|
620
|
-
// }
|
|
621
|
-
const calendarInfo = new CalendarMonthInfo();
|
|
622
|
-
calendarInfo.id = getUniqueId(3);
|
|
623
|
-
calendarInfo.dateInfo = dateInfo;
|
|
624
|
-
calendarInfo.days = days;
|
|
625
|
-
calendarInfo.weeksCount = weekCounter;
|
|
626
|
-
// this.cdr.detectChanges();
|
|
627
|
-
return calendarInfo;
|
|
628
|
-
}
|
|
629
|
-
_getDay(date, activeDate, today, endOfMonth, startOfMonth, dateInfo, i) {
|
|
630
|
-
const isInMonth = this._dateService.isSame(date, activeDate, 'month');
|
|
631
|
-
const momentOfDate = this._dateService.getMoment(date);
|
|
632
|
-
const isToday = momentOfDate.isSame(today, 'day');
|
|
633
|
-
const dayInMonth = this._dateService.strDate(date);
|
|
634
|
-
const dayInWeek = this._dateService.day(date);
|
|
635
|
-
const isEndOfMonth = momentOfDate.isSame(endOfMonth, 'day');
|
|
636
|
-
const isStartOfMonth = momentOfDate.isSame(startOfMonth, 'day');
|
|
637
|
-
const monthDateInfo = isInMonth ? dateInfo : this._dateService.getDateInfo(date);
|
|
638
|
-
const day = {
|
|
639
|
-
index: i,
|
|
640
|
-
date,
|
|
641
|
-
dayInWeek,
|
|
642
|
-
status: DayStatus.Open,
|
|
643
|
-
dayInMonth,
|
|
644
|
-
dayInMonthN: this.getNumber(dayInMonth),
|
|
645
|
-
isToday,
|
|
646
|
-
isInMonth,
|
|
647
|
-
isEndOfMonth,
|
|
648
|
-
isStartOfMonth,
|
|
649
|
-
momentOfDate,
|
|
650
|
-
month: monthDateInfo.month,
|
|
651
|
-
year: monthDateInfo.year,
|
|
652
|
-
monthName: monthDateInfo.monthName,
|
|
653
|
-
dayName: momentOfDate.format('dddd'),
|
|
654
|
-
tasks: [],
|
|
655
|
-
monthDateInfo,
|
|
656
|
-
row: Math.floor(i / 7 + 1),
|
|
657
|
-
col: 6 - (i % 7),
|
|
658
|
-
isAddingNewEvent: false,
|
|
659
|
-
addingEventPoint1: null,
|
|
660
|
-
addingEventPoint2: null
|
|
661
|
-
};
|
|
662
|
-
return { day, isInMonth };
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
CalendarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarService, deps: [{ token: i2.LogService }, { token: 'Date_Culture', optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
666
|
-
CalendarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarService });
|
|
667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarService, decorators: [{
|
|
668
|
-
type: Injectable
|
|
669
|
-
}], ctorParameters: function () {
|
|
670
|
-
return [{ type: i2.LogService }, { type: undefined, decorators: [{
|
|
671
|
-
type: Optional
|
|
672
|
-
}, {
|
|
673
|
-
type: Inject,
|
|
674
|
-
args: ['Date_Culture']
|
|
675
|
-
}] }];
|
|
676
|
-
} });
|
|
677
|
-
|
|
678
|
-
class DaysInWeekPipe {
|
|
679
|
-
constructor() { }
|
|
680
|
-
transform(days, weekNumber) {
|
|
681
|
-
return days.slice(7 * weekNumber, 7 * weekNumber + 7);
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
DaysInWeekPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DaysInWeekPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
685
|
-
DaysInWeekPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: DaysInWeekPipe, name: "daysInWeek" });
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DaysInWeekPipe, decorators: [{
|
|
687
|
-
type: Pipe,
|
|
688
|
-
args: [{
|
|
689
|
-
name: 'daysInWeek'
|
|
690
|
-
}]
|
|
691
|
-
}], ctorParameters: function () { return []; } });
|
|
692
|
-
|
|
693
|
-
class DayNumberBoxComponent extends BaseComponent {
|
|
694
|
-
constructor() {
|
|
695
|
-
super(...arguments);
|
|
696
|
-
this.dayClick = new EventEmitter();
|
|
697
|
-
this.dayMouseDown = new EventEmitter();
|
|
698
|
-
this.dayMouseUp = new EventEmitter();
|
|
699
|
-
this.dayMouseMove = new EventEmitter();
|
|
700
|
-
this._cursor = 'default';
|
|
701
|
-
this._hover = '';
|
|
702
|
-
this._itemInRange = false;
|
|
703
|
-
this._isActive = false;
|
|
704
|
-
}
|
|
705
|
-
mouseup() {
|
|
706
|
-
this.dayMouseUp.emit(this.day);
|
|
707
|
-
}
|
|
708
|
-
mousedown() {
|
|
709
|
-
this.dayMouseDown.emit(this.day);
|
|
710
|
-
}
|
|
711
|
-
mousemove() {
|
|
712
|
-
this.dayMouseMove.emit(this.day);
|
|
713
|
-
}
|
|
714
|
-
onClick() {
|
|
715
|
-
this.dayClick.emit(this.day);
|
|
716
|
-
}
|
|
717
|
-
ngOnInit() {
|
|
718
|
-
super.ngOnInit();
|
|
719
|
-
this._cursor = this.isPickerMode ? 'pointer' : 'default';
|
|
720
|
-
this.display = this.isSingleDay ? 'inline-block' : 'flex';
|
|
721
|
-
this._hover = this.isPickerMode ? 'hover' : '';
|
|
722
|
-
}
|
|
723
|
-
ngOnChanges(changes) {
|
|
724
|
-
super.ngOnChanges(changes);
|
|
725
|
-
const { itemInRange, isActive } = changes;
|
|
726
|
-
if (itemInRange) {
|
|
727
|
-
this._itemInRange = itemInRange.currentValue;
|
|
728
|
-
}
|
|
729
|
-
if (isActive) {
|
|
730
|
-
this._isActive = isActive.currentValue;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
onDayBoxNumberClick(e, day) {
|
|
734
|
-
// change calendar mode to Day
|
|
735
|
-
PreventDefaulEvent(e);
|
|
736
|
-
this.dayClick.emit(day);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
DayNumberBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DayNumberBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
740
|
-
DayNumberBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DayNumberBoxComponent, selector: "bc-day-number-box", inputs: { isWeekMode: "isWeekMode", isSingleDay: "isSingleDay", day: "day", isPickerMode: "isPickerMode", itemInRange: "itemInRange", isActive: "isActive" }, outputs: { dayClick: "dayClick", dayMouseDown: "dayMouseDown", dayMouseUp: "dayMouseUp", dayMouseMove: "dayMouseMove" }, host: { listeners: { "mouseup": "mouseup()", "mousedown": "mousedown()", "mousemove": "mousemove()", "click": "onClick()" }, properties: { "style.display": "this.display", "style.cursor": "this._cursor", "class": "this._hover", "class.fd-calendar__item--range": "this._itemInRange", "class.is-active": "this._isActive" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<button\r\n fd-button\r\n class=\"bg-transparent hover:!bg-transparent\"\r\n (click)=\"onDayBoxNumberClick($event, day)\"\r\n [style.width]=\"isSingleDay ? 'auto' : '100%'\"\r\n [style.maxWidth]=\"isSingleDay ? 'auto' : '100%'\"\r\n [ngClass]=\"day.isInMonth ? 'inMonth' : 'notInMonth'\"\r\n>\r\n <div\r\n [ngClass]=\"{\r\n 'fd-avatar--s': isWeekMode,\r\n 'fd-avatar--xs': !isWeekMode || (day.isToday && isPickerMode)\r\n }\"\r\n [class.not-today]=\"!day.isToday\"\r\n class=\"day-number-value\"\r\n [style.fontSize]=\"isWeekMode ? '1.7rem' : null\"\r\n >\r\n <span>{{ day.dayInMonth }}</span>\r\n </div>\r\n</button>\r\n", styles: [":host{position:relative;height:100%;justify-content:center}button{justify-content:center;flex-direction:column;align-items:center;background-color:transparent;border:none;height:100%;max-height:100%}button.hover:hover .not-today{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}button div{cursor:pointer}button .not-today{background-color:transparent;color:var(--sapList_HeaderTextColor, #32363a)}button .not-today:hover{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}.notInMonth span{opacity:.5}.fd-avatar,.day-number-value{font-size:.825rem}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DayNumberBoxComponent, decorators: [{
|
|
742
|
-
type: Component,
|
|
743
|
-
args: [{ selector: 'bc-day-number-box', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n fd-button\r\n class=\"bg-transparent hover:!bg-transparent\"\r\n (click)=\"onDayBoxNumberClick($event, day)\"\r\n [style.width]=\"isSingleDay ? 'auto' : '100%'\"\r\n [style.maxWidth]=\"isSingleDay ? 'auto' : '100%'\"\r\n [ngClass]=\"day.isInMonth ? 'inMonth' : 'notInMonth'\"\r\n>\r\n <div\r\n [ngClass]=\"{\r\n 'fd-avatar--s': isWeekMode,\r\n 'fd-avatar--xs': !isWeekMode || (day.isToday && isPickerMode)\r\n }\"\r\n [class.not-today]=\"!day.isToday\"\r\n class=\"day-number-value\"\r\n [style.fontSize]=\"isWeekMode ? '1.7rem' : null\"\r\n >\r\n <span>{{ day.dayInMonth }}</span>\r\n </div>\r\n</button>\r\n", styles: [":host{position:relative;height:100%;justify-content:center}button{justify-content:center;flex-direction:column;align-items:center;background-color:transparent;border:none;height:100%;max-height:100%}button.hover:hover .not-today{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}button div{cursor:pointer}button .not-today{background-color:transparent;color:var(--sapList_HeaderTextColor, #32363a)}button .not-today:hover{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}.notInMonth span{opacity:.5}.fd-avatar,.day-number-value{font-size:.825rem}\n"] }]
|
|
744
|
-
}], propDecorators: { display: [{
|
|
745
|
-
type: HostBinding,
|
|
746
|
-
args: ['style.display']
|
|
747
|
-
}], isWeekMode: [{
|
|
748
|
-
type: Input
|
|
749
|
-
}], isSingleDay: [{
|
|
750
|
-
type: Input
|
|
751
|
-
}], day: [{
|
|
752
|
-
type: Input
|
|
753
|
-
}], isPickerMode: [{
|
|
754
|
-
type: Input
|
|
755
|
-
}], itemInRange: [{
|
|
756
|
-
type: Input
|
|
757
|
-
}], isActive: [{
|
|
758
|
-
type: Input
|
|
759
|
-
}], dayClick: [{
|
|
760
|
-
type: Output
|
|
761
|
-
}], dayMouseDown: [{
|
|
762
|
-
type: Output
|
|
763
|
-
}], dayMouseUp: [{
|
|
764
|
-
type: Output
|
|
765
|
-
}], dayMouseMove: [{
|
|
766
|
-
type: Output
|
|
767
|
-
}], _cursor: [{
|
|
768
|
-
type: HostBinding,
|
|
769
|
-
args: ['style.cursor']
|
|
770
|
-
}], _hover: [{
|
|
771
|
-
type: HostBinding,
|
|
772
|
-
args: ['class']
|
|
773
|
-
}], _itemInRange: [{
|
|
774
|
-
type: HostBinding,
|
|
775
|
-
args: ['class.fd-calendar__item--range']
|
|
776
|
-
}], _isActive: [{
|
|
777
|
-
type: HostBinding,
|
|
778
|
-
args: ['class.is-active']
|
|
779
|
-
}], mouseup: [{
|
|
780
|
-
type: HostListener,
|
|
781
|
-
args: ['mouseup']
|
|
782
|
-
}], mousedown: [{
|
|
783
|
-
type: HostListener,
|
|
784
|
-
args: ['mousedown']
|
|
785
|
-
}], mousemove: [{
|
|
786
|
-
type: HostListener,
|
|
787
|
-
args: ['mousemove']
|
|
788
|
-
}], onClick: [{
|
|
789
|
-
type: HostListener,
|
|
790
|
-
args: ['click']
|
|
791
|
-
}] } });
|
|
792
|
-
|
|
793
|
-
function getPadedTime(value) {
|
|
794
|
-
return String(value.toString().padStart(2, '0'));
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
class EventDatePipe {
|
|
798
|
-
constructor() { }
|
|
799
|
-
transform(from, to, onlyTime = false) {
|
|
800
|
-
const showTime = from.hour || from.minutes || to.hour || to.minutes > 0;
|
|
801
|
-
const fromTime = `${getPadedTime(from.hour)}:${getPadedTime(from.minutes)}`;
|
|
802
|
-
const toTime = `${getPadedTime(to.hour)}:${getPadedTime(to.hour)}`;
|
|
803
|
-
if (onlyTime) {
|
|
804
|
-
return `${fromTime}`;
|
|
805
|
-
}
|
|
806
|
-
return `${from.strDay} ${from.monthName} ${from.strYear}${showTime ? `, ${fromTime}` : ''} – ${to.strDay} ${to.monthName} ${to.strYear}${showTime ? `, ${toTime}` : ''}`;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
EventDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
810
|
-
EventDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: EventDatePipe, name: "eventDate" });
|
|
811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventDatePipe, decorators: [{
|
|
812
|
-
type: Pipe,
|
|
813
|
-
args: [{
|
|
814
|
-
name: 'eventDate'
|
|
815
|
-
}]
|
|
816
|
-
}], ctorParameters: function () { return []; } });
|
|
817
|
-
|
|
818
|
-
class EventPreviewComponent extends BaseComponent {
|
|
819
|
-
constructor() {
|
|
820
|
-
super(...arguments);
|
|
821
|
-
this._width = '460px;';
|
|
822
|
-
this.deleteEvent = new EventEmitter();
|
|
823
|
-
this.editEvent = new EventEmitter();
|
|
824
|
-
this.close = new EventEmitter();
|
|
825
|
-
}
|
|
826
|
-
ngOnInit() {
|
|
827
|
-
super.ngOnInit();
|
|
828
|
-
if (this.deviceSize === 's') {
|
|
829
|
-
this._width = 'auto';
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
onDelete(event, popover, popover2) {
|
|
833
|
-
this.deleteEvent.emit(event);
|
|
834
|
-
this._closePopover(popover);
|
|
835
|
-
this._closePopover(popover2);
|
|
836
|
-
}
|
|
837
|
-
onEdit(event, popover, popover2) {
|
|
838
|
-
this.editEvent.emit(event);
|
|
839
|
-
this._closePopover(popover);
|
|
840
|
-
this._closePopover(popover2);
|
|
841
|
-
}
|
|
842
|
-
onClosePopover(popover) {
|
|
843
|
-
this._closePopover(popover);
|
|
844
|
-
}
|
|
845
|
-
_closePopover(popover) {
|
|
846
|
-
if (popover) {
|
|
847
|
-
popover.close();
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
|
-
this.close.emit();
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
EventPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventPreviewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
854
|
-
EventPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EventPreviewComponent, selector: "bc-event-preview", inputs: { event: "event", calendarFields: "calendarFields", popover: "popover", popover2: "popover2", canEdit: "canEdit", canDelete: "canDelete", inDialog: "inDialog", deviceSize: "deviceSize" }, outputs: { deleteEvent: "deleteEvent", editEvent: "editEvent", close: "close" }, host: { properties: { "style.width": "this._width" } }, usesInheritance: true, ngImport: i0, template: "<fd-layout-panel [ngClass]=\"deviceSize\">\n <fd-layout-panel-header>\n <fd-layout-panel-actions>\n <fd-toolbar [clearBorder]=\"true\" [fdType]=\"'transparent'\">\n <button\n fd-button\n *ngIf=\"canEdit\"\n fd-toolbar-item\n glyph=\"edit\"\n fdType=\"transparent\"\n (click)=\"onEdit(event, popover, popover2)\"\n ></button>\n <button\n fd-button\n *ngIf=\"canDelete\"\n fd-toolbar-item\n glyph=\"delete\"\n fdType=\"transparent\"\n (click)=\"onDelete(event, popover, popover2)\"\n ></button>\n <button\n fd-button\n fd-toolbar-item\n glyph=\"decline\"\n fdType=\"transparent\"\n (click)=\"onClosePopover(popover)\"\n ></button>\n </fd-toolbar>\n </fd-layout-panel-actions>\n </fd-layout-panel-header>\n <fd-layout-panel-body>\n <fd-quick-view>\n <fd-quick-view-subheader>\n <fd-avatar\n size=\"xs\"\n glyph=\"color-fill\"\n [transparent]=\"true\"\n [style.color]=\"event[calendarFields.Color] ? event[calendarFields.Color] : ''\"\n ></fd-avatar>\n <fd-quick-view-subheader-title>\n {{ event[calendarFields.Title] }}\n </fd-quick-view-subheader-title>\n <fd-quick-view-subheader-subtitle>\n <span>{{ event.$StartDateInfo | eventDate: event.$EndDateInfo }} </span>\n </fd-quick-view-subheader-subtitle>\n </fd-quick-view-subheader>\n\n <fd-quick-view-group>\n <fd-quick-view-group-item *ngIf=\"event | barsaVisibleValue: calendarFields.Notes as notes\">\n <fd-quick-view-group-item-label>\n <fd-icon glyph=\"text-align-justified\"></fd-icon>\n </fd-quick-view-group-item-label>\n <fd-quick-view-group-item-content>\n <div fd-quick-view-group-item-content-element style=\"white-space: normal\">\n {{ notes }}\n </div>\n </fd-quick-view-group-item-content>\n </fd-quick-view-group-item>\n <fd-quick-view-group-item>\n <fd-quick-view-group-item-label>\n <fd-icon glyph=\"appointment\"></fd-icon>\n </fd-quick-view-group-item-label>\n <fd-quick-view-group-item-content>\n <span>\u06A9\u0627\u0631\u0628\u0631</span>\n </fd-quick-view-group-item-content>\n </fd-quick-view-group-item>\n </fd-quick-view-group>\n </fd-quick-view>\n </fd-layout-panel-body>\n</fd-layout-panel>\n", styles: [":host{display:block}:host ::ng-deep .fd-form-item{flex-direction:row}:host fd-avatar{min-width:1rem;width:1rem}fd-layout-panel{min-width:400px}fd-layout-panel.s{box-shadow:none;min-width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "backgroundImage", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4$1.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "component", type: i5.LayoutPanelComponent, selector: "fd-layout-panel", inputs: ["backgroundImage"] }, { kind: "component", type: i5.LayoutPanelHeaderComponent, selector: "fd-layout-panel-header" }, { kind: "component", type: i5.LayoutPanelActionsComponent, selector: "fd-layout-panel-actions" }, { kind: "component", type: i5.LayoutPanelBodyComponent, selector: "fd-layout-panel-body", inputs: ["bleed"] }, { kind: "component", type: i6.QuickViewComponent, selector: "fd-quick-view", inputs: ["id"] }, { kind: "component", type: i6.QuickViewSubheaderComponent, selector: "fd-quick-view-subheader" }, { kind: "component", type: i6.QuickViewSubheaderTitleComponent, selector: "fd-quick-view-subheader-title" }, { kind: "component", type: i6.QuickViewSubheaderSubtitleComponent, selector: "fd-quick-view-subheader-subtitle" }, { kind: "component", type: i6.QuickViewGroupComponent, selector: "fd-quick-view-group" }, { kind: "component", type: i6.QuickViewGroupItemComponent, selector: "fd-quick-view-group-item", inputs: ["id"] }, { kind: "component", type: i6.QuickViewGroupItemLabelComponent, selector: "fd-quick-view-group-item-label" }, { kind: "component", type: i6.QuickViewGroupItemContentComponent, selector: "fd-quick-view-group-item-content" }, { kind: "directive", type: i6.QuickViewGroupItemContentElementDirective, selector: "[fd-quick-view-group-item-content-element]" }, { kind: "component", type: i7.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i7.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "pipe", type: i2.VisibleValuePipe, name: "barsaVisibleValue" }, { kind: "pipe", type: EventDatePipe, name: "eventDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
855
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventPreviewComponent, decorators: [{
|
|
856
|
-
type: Component,
|
|
857
|
-
args: [{ selector: 'bc-event-preview', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-layout-panel [ngClass]=\"deviceSize\">\n <fd-layout-panel-header>\n <fd-layout-panel-actions>\n <fd-toolbar [clearBorder]=\"true\" [fdType]=\"'transparent'\">\n <button\n fd-button\n *ngIf=\"canEdit\"\n fd-toolbar-item\n glyph=\"edit\"\n fdType=\"transparent\"\n (click)=\"onEdit(event, popover, popover2)\"\n ></button>\n <button\n fd-button\n *ngIf=\"canDelete\"\n fd-toolbar-item\n glyph=\"delete\"\n fdType=\"transparent\"\n (click)=\"onDelete(event, popover, popover2)\"\n ></button>\n <button\n fd-button\n fd-toolbar-item\n glyph=\"decline\"\n fdType=\"transparent\"\n (click)=\"onClosePopover(popover)\"\n ></button>\n </fd-toolbar>\n </fd-layout-panel-actions>\n </fd-layout-panel-header>\n <fd-layout-panel-body>\n <fd-quick-view>\n <fd-quick-view-subheader>\n <fd-avatar\n size=\"xs\"\n glyph=\"color-fill\"\n [transparent]=\"true\"\n [style.color]=\"event[calendarFields.Color] ? event[calendarFields.Color] : ''\"\n ></fd-avatar>\n <fd-quick-view-subheader-title>\n {{ event[calendarFields.Title] }}\n </fd-quick-view-subheader-title>\n <fd-quick-view-subheader-subtitle>\n <span>{{ event.$StartDateInfo | eventDate: event.$EndDateInfo }} </span>\n </fd-quick-view-subheader-subtitle>\n </fd-quick-view-subheader>\n\n <fd-quick-view-group>\n <fd-quick-view-group-item *ngIf=\"event | barsaVisibleValue: calendarFields.Notes as notes\">\n <fd-quick-view-group-item-label>\n <fd-icon glyph=\"text-align-justified\"></fd-icon>\n </fd-quick-view-group-item-label>\n <fd-quick-view-group-item-content>\n <div fd-quick-view-group-item-content-element style=\"white-space: normal\">\n {{ notes }}\n </div>\n </fd-quick-view-group-item-content>\n </fd-quick-view-group-item>\n <fd-quick-view-group-item>\n <fd-quick-view-group-item-label>\n <fd-icon glyph=\"appointment\"></fd-icon>\n </fd-quick-view-group-item-label>\n <fd-quick-view-group-item-content>\n <span>\u06A9\u0627\u0631\u0628\u0631</span>\n </fd-quick-view-group-item-content>\n </fd-quick-view-group-item>\n </fd-quick-view-group>\n </fd-quick-view>\n </fd-layout-panel-body>\n</fd-layout-panel>\n", styles: [":host{display:block}:host ::ng-deep .fd-form-item{flex-direction:row}:host fd-avatar{min-width:1rem;width:1rem}fd-layout-panel{min-width:400px}fd-layout-panel.s{box-shadow:none;min-width:100%}\n"] }]
|
|
858
|
-
}], propDecorators: { event: [{
|
|
859
|
-
type: Input
|
|
860
|
-
}], calendarFields: [{
|
|
861
|
-
type: Input
|
|
862
|
-
}], popover: [{
|
|
863
|
-
type: Input
|
|
864
|
-
}], popover2: [{
|
|
865
|
-
type: Input
|
|
866
|
-
}], canEdit: [{
|
|
867
|
-
type: Input
|
|
868
|
-
}], canDelete: [{
|
|
869
|
-
type: Input
|
|
870
|
-
}], inDialog: [{
|
|
871
|
-
type: Input
|
|
872
|
-
}], deviceSize: [{
|
|
873
|
-
type: Input
|
|
874
|
-
}], _width: [{
|
|
875
|
-
type: HostBinding,
|
|
876
|
-
args: ['style.width']
|
|
877
|
-
}], deleteEvent: [{
|
|
878
|
-
type: Output
|
|
879
|
-
}], editEvent: [{
|
|
880
|
-
type: Output
|
|
881
|
-
}], close: [{
|
|
882
|
-
type: Output
|
|
883
|
-
}] } });
|
|
884
|
-
|
|
885
|
-
class EventButtonEndArrowComponent extends BaseComponent {
|
|
886
|
-
constructor() {
|
|
887
|
-
super(...arguments);
|
|
888
|
-
this._rtl = true;
|
|
889
|
-
}
|
|
890
|
-
ngOnInit() {
|
|
891
|
-
super.ngOnInit();
|
|
892
|
-
this._rtl = this.rtl;
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
EventButtonEndArrowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonEndArrowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
896
|
-
EventButtonEndArrowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EventButtonEndArrowComponent, selector: "bc-event-button-end-arrow", inputs: { task: "task", rtl: "rtl", calendarFields: "calendarFields" }, host: { properties: { "class.rtl": "this._rtl" } }, usesInheritance: true, ngImport: i0, template: "<span\r\n class=\"sdsds\"\r\n [style.border-left-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n [style.border-right-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"end-day-continue\"\r\n></span>\r\n<!-- [class.end-day]=\"(!task.isEndDay && task.isMiddle) || (task.isStartDay && !task.isEndDay)\" -->\r\n", styles: [":host{display:contents}.end-day-continue{width:0;height:0;border-top:10px solid transparent;border-right:10px solid var(--sapButton_Emphasized_Background, #0a6ed1);border-bottom:10px solid transparent;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonEndArrowComponent, decorators: [{
|
|
898
|
-
type: Component,
|
|
899
|
-
args: [{ selector: 'bc-event-button-end-arrow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n class=\"sdsds\"\r\n [style.border-left-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n [style.border-right-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"end-day-continue\"\r\n></span>\r\n<!-- [class.end-day]=\"(!task.isEndDay && task.isMiddle) || (task.isStartDay && !task.isEndDay)\" -->\r\n", styles: [":host{display:contents}.end-day-continue{width:0;height:0;border-top:10px solid transparent;border-right:10px solid var(--sapButton_Emphasized_Background, #0a6ed1);border-bottom:10px solid transparent;height:100%}\n"] }]
|
|
900
|
-
}], propDecorators: { task: [{
|
|
901
|
-
type: Input
|
|
902
|
-
}], rtl: [{
|
|
903
|
-
type: Input
|
|
904
|
-
}], calendarFields: [{
|
|
905
|
-
type: Input
|
|
906
|
-
}], _rtl: [{
|
|
907
|
-
type: HostBinding,
|
|
908
|
-
args: ['class.rtl']
|
|
909
|
-
}] } });
|
|
910
|
-
|
|
911
|
-
class EventButtonStartArrowComponent extends BaseComponent {
|
|
912
|
-
constructor() {
|
|
913
|
-
super(...arguments);
|
|
914
|
-
this._rtl = true;
|
|
915
|
-
}
|
|
916
|
-
ngOnInit() {
|
|
917
|
-
super.ngOnInit();
|
|
918
|
-
this._rtl = this.rtl;
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
EventButtonStartArrowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonStartArrowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
922
|
-
EventButtonStartArrowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EventButtonStartArrowComponent, selector: "bc-event-button-start-arrow", inputs: { task: "task", rtl: "rtl", calendarFields: "calendarFields" }, host: { properties: { "class.rtl": "this._rtl" } }, usesInheritance: true, ngImport: i0, template: "<span\r\n class=\"sdsds\"\r\n [style.border-left-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n [style.border-right-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"start-day-middle\"\r\n></span>\r\n<!-- [class.end-day]=\"(!task.isEndDay && task.isMiddle) || (task.isStartDay && !task.isEndDay)\" -->\r\n", styles: [":host{display:contents}.start-day-middle{width:0;height:0;border-top:10px solid transparent;border-left:10px solid var(--sapButton_Emphasized_Background, #0a6ed1);border-bottom:10px solid transparent;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonStartArrowComponent, decorators: [{
|
|
924
|
-
type: Component,
|
|
925
|
-
args: [{ selector: 'bc-event-button-start-arrow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\r\n class=\"sdsds\"\r\n [style.border-left-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n [style.border-right-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"start-day-middle\"\r\n></span>\r\n<!-- [class.end-day]=\"(!task.isEndDay && task.isMiddle) || (task.isStartDay && !task.isEndDay)\" -->\r\n", styles: [":host{display:contents}.start-day-middle{width:0;height:0;border-top:10px solid transparent;border-left:10px solid var(--sapButton_Emphasized_Background, #0a6ed1);border-bottom:10px solid transparent;height:100%}\n"] }]
|
|
926
|
-
}], propDecorators: { task: [{
|
|
927
|
-
type: Input
|
|
928
|
-
}], rtl: [{
|
|
929
|
-
type: Input
|
|
930
|
-
}], calendarFields: [{
|
|
931
|
-
type: Input
|
|
932
|
-
}], _rtl: [{
|
|
933
|
-
type: HostBinding,
|
|
934
|
-
args: ['class.rtl']
|
|
935
|
-
}] } });
|
|
936
|
-
|
|
937
|
-
class EventTimePipe {
|
|
938
|
-
constructor() { }
|
|
939
|
-
transform(task, calendarFields) {
|
|
940
|
-
const event = task.event;
|
|
941
|
-
const dateInfo = event.$StartDateInfo;
|
|
942
|
-
const showTime = dateInfo.hour || dateInfo.minutes > 0;
|
|
943
|
-
const fromTime = `${getPadedTime(dateInfo.hour)}:${getPadedTime(dateInfo.minutes)}`;
|
|
944
|
-
return `${showTime ? fromTime : ''} ${event[calendarFields.Title]}`;
|
|
945
|
-
}
|
|
946
|
-
}
|
|
947
|
-
EventTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
948
|
-
EventTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: EventTimePipe, name: "eventTime" });
|
|
949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventTimePipe, decorators: [{
|
|
950
|
-
type: Pipe,
|
|
951
|
-
args: [{
|
|
952
|
-
name: 'eventTime'
|
|
953
|
-
}]
|
|
954
|
-
}], ctorParameters: function () { return []; } });
|
|
955
|
-
|
|
956
|
-
class EventButtonComponent extends BaseComponent {
|
|
957
|
-
constructor(_el, _dialogService) {
|
|
958
|
-
super();
|
|
959
|
-
this._el = _el;
|
|
960
|
-
this._dialogService = _dialogService;
|
|
961
|
-
this.deleteEvent = new EventEmitter();
|
|
962
|
-
this.editEvent = new EventEmitter();
|
|
963
|
-
this.openPopoverChange = new EventEmitter();
|
|
964
|
-
this.opacity = 1;
|
|
965
|
-
this._rtl = true;
|
|
966
|
-
}
|
|
967
|
-
ngOnInit() {
|
|
968
|
-
var _a;
|
|
969
|
-
super.ngOnInit();
|
|
970
|
-
this._rtl = this.rtl;
|
|
971
|
-
this.opacity = (_a = this.task.opacity) !== null && _a !== void 0 ? _a : 1;
|
|
972
|
-
if (!this.buttonTemplate) {
|
|
973
|
-
this.buttonTemplate = this.defaultButtonTemplate;
|
|
974
|
-
}
|
|
975
|
-
if (this.index === 0) {
|
|
976
|
-
this.btnFocus.nativeElement.scrollIntoView();
|
|
977
|
-
this.btnFocus.nativeElement.tabIndex = -1;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
onPopOverOpenChange(isOpen) {
|
|
981
|
-
this.openPopoverChange.emit(isOpen);
|
|
982
|
-
}
|
|
983
|
-
onButtonClick(popover) {
|
|
984
|
-
if (this.deviceSize === 's') {
|
|
985
|
-
this._dialogService.open(this._dialogTemplate, {
|
|
986
|
-
mobile: true
|
|
987
|
-
});
|
|
988
|
-
return;
|
|
989
|
-
}
|
|
990
|
-
popover.open();
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
EventButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonComponent, deps: [{ token: i0.ElementRef }, { token: i2$2.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
994
|
-
EventButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: EventButtonComponent, selector: "bc-event-button", inputs: { buttonTemplate: "buttonTemplate", calendarFields: "calendarFields", task: "task", rtl: "rtl", canDelete: "canDelete", canEdit: "canEdit", index: "index", deviceSize: "deviceSize" }, outputs: { deleteEvent: "deleteEvent", editEvent: "editEvent", openPopoverChange: "openPopoverChange" }, host: { properties: { "style.opacity": "this.opacity", "attr.rtl": "this._rtl" } }, viewQueries: [{ propertyName: "defaultButtonTemplate", first: true, predicate: ["defaultButton"], descendants: true, static: true }, { propertyName: "popoverComponent", first: true, predicate: PopoverComponent, descendants: true, static: true }, { propertyName: "_dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true, static: true }, { propertyName: "btnFocus", first: true, predicate: ["btnFocus"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\r\n #btnFocus\r\n [attr.id]=\"task.id\"\r\n style=\"width: 0; height: 0; visibility: hidden; max-height: 1px; min-height: 1px; position: absolute\"\r\n></button>\r\n<bc-event-button-start-arrow\r\n *ngIf=\"\r\n (task.startdayIsInRow && !task.isStartDay) ||\r\n (task.isMiddle && !task.isStartDay && !task.isEndDay) ||\r\n (task.isEndDay && !task.isStartDay && !task.isMiddle)\r\n \"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n>\r\n</bc-event-button-start-arrow>\r\n\r\n<ng-container\r\n *ngTemplateOutlet=\"\r\n buttonTemplate;\r\n context: {\r\n $implicit: task,\r\n calendarFields: calendarFields,\r\n popover: popover,\r\n onButtonClick: onButtonClick.bind(this)\r\n }\r\n \"\r\n></ng-container>\r\n\r\n<bc-event-button-end-arrow *ngIf=\"!task.enddayIsInRow\" [task]=\"task\" [calendarFields]=\"calendarFields\" [rtl]=\"rtl\">\r\n</bc-event-button-end-arrow>\r\n\r\n<fd-popover\r\n #popover\r\n placement=\"bottom\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [title]=\"task.event[calendarFields.Title]\"\r\n (isOpenChange)=\"onPopOverOpenChange($event)\"\r\n>\r\n <fd-popover-control></fd-popover-control>\r\n <fd-popover-body>\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [popover]=\"popover\"\r\n [canDelete]=\"canDelete\"\r\n [deviceSize]=\"deviceSize\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-preview>\r\n </fd-popover-body>\r\n</fd-popover>\r\n\r\n<ng-content></ng-content>\r\n\r\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\r\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\r\n <fd-dialog-body>\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [canDelete]=\"canDelete\"\r\n [deviceSize]=\"deviceSize\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (close)=\"dialog.dismiss()\"\r\n ></bc-event-preview>\r\n </fd-dialog-body>\r\n </fd-dialog>\r\n</ng-template>\r\n<ng-template\r\n #defaultButton\r\n let-task\r\n let-popover=\"popover\"\r\n let-calendarFields=\"calendarFields\"\r\n let-onButtonClick=\"onButtonClick\"\r\n>\r\n <button\r\n fd-button\r\n [compact]=\"true\"\r\n (click)=\"onButtonClick(popover)\"\r\n [fdType]=\"task.inDay ? 'standard' : 'emphasized'\"\r\n [label]=\"task | eventTime: calendarFields\"\r\n [style.background-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"task-title noborder\"\r\n ></button>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:row;align-items:stretch;justify-content:stretch;width:100%;height:100%;padding-top:1px;border-radius:var(--sapButton_BorderCornerRadius)}:host[rtl=true]{padding-right:3px}:host[rtl=false]{padding-left:3px}.task-title{justify-content:start!important;font-weight:400}button{flex-grow:1;border-radius:0!important;height:100%;max-height:100%;min-height:100%;border:none}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: i4.DeprecatedButtonContentDensityDirective, selector: "[fd-button][compact]" }, { kind: "component", type: i9.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i9.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i6$1.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i6$1.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: EventPreviewComponent, selector: "bc-event-preview", inputs: ["event", "calendarFields", "popover", "popover2", "canEdit", "canDelete", "inDialog", "deviceSize"], outputs: ["deleteEvent", "editEvent", "close"] }, { kind: "component", type: EventButtonEndArrowComponent, selector: "bc-event-button-end-arrow", inputs: ["task", "rtl", "calendarFields"] }, { kind: "component", type: EventButtonStartArrowComponent, selector: "bc-event-button-start-arrow", inputs: ["task", "rtl", "calendarFields"] }, { kind: "pipe", type: EventTimePipe, name: "eventTime" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EventButtonComponent, decorators: [{
|
|
996
|
-
type: Component,
|
|
997
|
-
args: [{ selector: 'bc-event-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\r\n #btnFocus\r\n [attr.id]=\"task.id\"\r\n style=\"width: 0; height: 0; visibility: hidden; max-height: 1px; min-height: 1px; position: absolute\"\r\n></button>\r\n<bc-event-button-start-arrow\r\n *ngIf=\"\r\n (task.startdayIsInRow && !task.isStartDay) ||\r\n (task.isMiddle && !task.isStartDay && !task.isEndDay) ||\r\n (task.isEndDay && !task.isStartDay && !task.isMiddle)\r\n \"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n>\r\n</bc-event-button-start-arrow>\r\n\r\n<ng-container\r\n *ngTemplateOutlet=\"\r\n buttonTemplate;\r\n context: {\r\n $implicit: task,\r\n calendarFields: calendarFields,\r\n popover: popover,\r\n onButtonClick: onButtonClick.bind(this)\r\n }\r\n \"\r\n></ng-container>\r\n\r\n<bc-event-button-end-arrow *ngIf=\"!task.enddayIsInRow\" [task]=\"task\" [calendarFields]=\"calendarFields\" [rtl]=\"rtl\">\r\n</bc-event-button-end-arrow>\r\n\r\n<fd-popover\r\n #popover\r\n placement=\"bottom\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [title]=\"task.event[calendarFields.Title]\"\r\n (isOpenChange)=\"onPopOverOpenChange($event)\"\r\n>\r\n <fd-popover-control></fd-popover-control>\r\n <fd-popover-body>\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [popover]=\"popover\"\r\n [canDelete]=\"canDelete\"\r\n [deviceSize]=\"deviceSize\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-preview>\r\n </fd-popover-body>\r\n</fd-popover>\r\n\r\n<ng-content></ng-content>\r\n\r\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\r\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\r\n <fd-dialog-body>\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [canDelete]=\"canDelete\"\r\n [deviceSize]=\"deviceSize\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (close)=\"dialog.dismiss()\"\r\n ></bc-event-preview>\r\n </fd-dialog-body>\r\n </fd-dialog>\r\n</ng-template>\r\n<ng-template\r\n #defaultButton\r\n let-task\r\n let-popover=\"popover\"\r\n let-calendarFields=\"calendarFields\"\r\n let-onButtonClick=\"onButtonClick\"\r\n>\r\n <button\r\n fd-button\r\n [compact]=\"true\"\r\n (click)=\"onButtonClick(popover)\"\r\n [fdType]=\"task.inDay ? 'standard' : 'emphasized'\"\r\n [label]=\"task | eventTime: calendarFields\"\r\n [style.background-color]=\"task.event[calendarFields.Color] ? task.event[calendarFields.Color] : null\"\r\n class=\"task-title noborder\"\r\n ></button>\r\n</ng-template>\r\n", styles: [":host{display:flex;flex-direction:row;align-items:stretch;justify-content:stretch;width:100%;height:100%;padding-top:1px;border-radius:var(--sapButton_BorderCornerRadius)}:host[rtl=true]{padding-right:3px}:host[rtl=false]{padding-left:3px}.task-title{justify-content:start!important;font-weight:400}button{flex-grow:1;border-radius:0!important;height:100%;max-height:100%;min-height:100%;border:none}\n"] }]
|
|
998
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i2$2.DialogService }]; }, propDecorators: { defaultButtonTemplate: [{
|
|
999
|
-
type: ViewChild,
|
|
1000
|
-
args: ['defaultButton', { static: true }]
|
|
1001
|
-
}], popoverComponent: [{
|
|
1002
|
-
type: ViewChild,
|
|
1003
|
-
args: [PopoverComponent, { static: true }]
|
|
1004
|
-
}], _dialogTemplate: [{
|
|
1005
|
-
type: ViewChild,
|
|
1006
|
-
args: ['dialogTemplate', { static: true }]
|
|
1007
|
-
}], btnFocus: [{
|
|
1008
|
-
type: ViewChild,
|
|
1009
|
-
args: ['btnFocus', { static: true }]
|
|
1010
|
-
}], buttonTemplate: [{
|
|
1011
|
-
type: Input
|
|
1012
|
-
}], calendarFields: [{
|
|
1013
|
-
type: Input
|
|
1014
|
-
}], task: [{
|
|
1015
|
-
type: Input
|
|
1016
|
-
}], rtl: [{
|
|
1017
|
-
type: Input
|
|
1018
|
-
}], canDelete: [{
|
|
1019
|
-
type: Input
|
|
1020
|
-
}], canEdit: [{
|
|
1021
|
-
type: Input
|
|
1022
|
-
}], index: [{
|
|
1023
|
-
type: Input
|
|
1024
|
-
}], deviceSize: [{
|
|
1025
|
-
type: Input
|
|
1026
|
-
}], deleteEvent: [{
|
|
1027
|
-
type: Output
|
|
1028
|
-
}], editEvent: [{
|
|
1029
|
-
type: Output
|
|
1030
|
-
}], openPopoverChange: [{
|
|
1031
|
-
type: Output
|
|
1032
|
-
}], opacity: [{
|
|
1033
|
-
type: HostBinding,
|
|
1034
|
-
args: ['style.opacity']
|
|
1035
|
-
}], _rtl: [{
|
|
1036
|
-
type: HostBinding,
|
|
1037
|
-
args: ['attr.rtl']
|
|
1038
|
-
}] } });
|
|
1039
|
-
|
|
1040
|
-
class DayEventListComponent extends BaseComponent {
|
|
1041
|
-
constructor() {
|
|
1042
|
-
super(...arguments);
|
|
1043
|
-
this.deleteEvent = new EventEmitter();
|
|
1044
|
-
this.editEvent = new EventEmitter();
|
|
1045
|
-
this.openPopOver = new EventEmitter();
|
|
1046
|
-
}
|
|
1047
|
-
onClosePopover(popover, popover2) {
|
|
1048
|
-
popover.close();
|
|
1049
|
-
if (popover2) {
|
|
1050
|
-
popover2.close();
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
DayEventListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DayEventListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1055
|
-
DayEventListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DayEventListComponent, selector: "bc-day-event-list", inputs: { day: "day", deviceSize: "deviceSize", weekDays: "weekDays", calendarFields: "calendarFields", rtl: "rtl", canDelete: "canDelete", canEdit: "canEdit", popover: "popover" }, outputs: { deleteEvent: "deleteEvent", editEvent: "editEvent", openPopOver: "openPopOver" }, usesInheritance: true, ngImport: i0, template: "<div fd-bar [barDesign]=\"'header-with-subheader'\">\r\n <div fd-bar-left>\r\n <fd-bar-element>\r\n <button fd-button glyph=\"decline\" [fdType]=\"'transparent'\" (click)=\"onClosePopover(popover)\"></button>\r\n </fd-bar-element>\r\n </div>\r\n <div fd-bar-middle>\r\n <fd-bar-element>\r\n {{ weekDays[day.dayInWeek] }}\r\n </fd-bar-element>\r\n </div>\r\n <div fd-bar-right>\r\n <fd-bar-element> </fd-bar-element>\r\n </div>\r\n</div>\r\n<div fd-bar [barDesign]=\"'subheader'\">\r\n <div fd-bar-middle>\r\n <fd-bar-element [fullWidth]=\"true\">\r\n <bc-day-number-box [day]=\"day\" [isWeekMode]=\"true\"></bc-day-number-box>\r\n </fd-bar-element>\r\n </div>\r\n</div>\r\n<ul fd-list>\r\n <li fd-list-item *ngFor=\"let task of day.tasks\" class=\"task-start-end\" (click)=\"popoverPreview.open()\">\r\n <bc-event-button-start-arrow\r\n *ngIf=\"task.isMiddle && !task.isStartDay\"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n >\r\n </bc-event-button-start-arrow>\r\n <span class=\"middle-day\">{{ task.event[calendarFields.Title] }}</span>\r\n <bc-event-button-end-arrow\r\n *ngIf=\"(task.isMiddle || task.isStartDay) && !task.isEndDay\"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n >\r\n </bc-event-button-end-arrow>\r\n\r\n <fd-popover\r\n #popoverPreview\r\n placement=\"bottom\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [title]=\"task.event[calendarFields.Title]\"\r\n >\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [popover]=\"popoverPreview\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [popover2]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-preview>\r\n </fd-popover>\r\n </li>\r\n</ul>\r\n", styles: [".task-start-end{cursor:pointer}.start-day{width:0;height:0;border-top:10px solid transparent;border-right:10px solid var(--sapButton_Emphasized_BorderColor, #0a6ed1);border-bottom:10px solid transparent}.middle-day{width:100%;min-width:200px;height:20px;background-color:var(--sapButton_Emphasized_Background, #0a6ed1);color:var(--sapButton_Emphasized_TextColor, #fff);text-align:center}.end-day{width:0;height:0;border-top:10px solid transparent;border-left:10px solid var(--sapButton_Emphasized_BorderColor, #0a6ed1);border-bottom:10px solid transparent}.event-list-number-day{width:40px;height:40px;flex-grow:0;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-grow:0!important}.event-list-number-day:hover{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}::ng-deep .fd-form-item{flex-direction:row!important}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i3$1.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i3$1.BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: i3$1.BarMiddleDirective, selector: "[fd-bar-middle]" }, { kind: "directive", type: i3$1.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "directive", type: i3$1.BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth", "isTitle"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i6$2.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i6$2.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: EventPreviewComponent, selector: "bc-event-preview", inputs: ["event", "calendarFields", "popover", "popover2", "canEdit", "canDelete", "inDialog", "deviceSize"], outputs: ["deleteEvent", "editEvent", "close"] }, { kind: "component", type: DayNumberBoxComponent, selector: "bc-day-number-box", inputs: ["isWeekMode", "isSingleDay", "day", "isPickerMode", "itemInRange", "isActive"], outputs: ["dayClick", "dayMouseDown", "dayMouseUp", "dayMouseMove"] }, { kind: "component", type: EventButtonEndArrowComponent, selector: "bc-event-button-end-arrow", inputs: ["task", "rtl", "calendarFields"] }, { kind: "component", type: EventButtonStartArrowComponent, selector: "bc-event-button-start-arrow", inputs: ["task", "rtl", "calendarFields"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DayEventListComponent, decorators: [{
|
|
1057
|
-
type: Component,
|
|
1058
|
-
args: [{ selector: 'bc-day-event-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div fd-bar [barDesign]=\"'header-with-subheader'\">\r\n <div fd-bar-left>\r\n <fd-bar-element>\r\n <button fd-button glyph=\"decline\" [fdType]=\"'transparent'\" (click)=\"onClosePopover(popover)\"></button>\r\n </fd-bar-element>\r\n </div>\r\n <div fd-bar-middle>\r\n <fd-bar-element>\r\n {{ weekDays[day.dayInWeek] }}\r\n </fd-bar-element>\r\n </div>\r\n <div fd-bar-right>\r\n <fd-bar-element> </fd-bar-element>\r\n </div>\r\n</div>\r\n<div fd-bar [barDesign]=\"'subheader'\">\r\n <div fd-bar-middle>\r\n <fd-bar-element [fullWidth]=\"true\">\r\n <bc-day-number-box [day]=\"day\" [isWeekMode]=\"true\"></bc-day-number-box>\r\n </fd-bar-element>\r\n </div>\r\n</div>\r\n<ul fd-list>\r\n <li fd-list-item *ngFor=\"let task of day.tasks\" class=\"task-start-end\" (click)=\"popoverPreview.open()\">\r\n <bc-event-button-start-arrow\r\n *ngIf=\"task.isMiddle && !task.isStartDay\"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n >\r\n </bc-event-button-start-arrow>\r\n <span class=\"middle-day\">{{ task.event[calendarFields.Title] }}</span>\r\n <bc-event-button-end-arrow\r\n *ngIf=\"(task.isMiddle || task.isStartDay) && !task.isEndDay\"\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [rtl]=\"rtl\"\r\n >\r\n </bc-event-button-end-arrow>\r\n\r\n <fd-popover\r\n #popoverPreview\r\n placement=\"bottom\"\r\n [mobile]=\"deviceSize === 's'\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n [title]=\"task.event[calendarFields.Title]\"\r\n >\r\n <bc-event-preview\r\n [event]=\"task.event\"\r\n [calendarFields]=\"calendarFields\"\r\n [popover]=\"popoverPreview\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [popover2]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-preview>\r\n </fd-popover>\r\n </li>\r\n</ul>\r\n", styles: [".task-start-end{cursor:pointer}.start-day{width:0;height:0;border-top:10px solid transparent;border-right:10px solid var(--sapButton_Emphasized_BorderColor, #0a6ed1);border-bottom:10px solid transparent}.middle-day{width:100%;min-width:200px;height:20px;background-color:var(--sapButton_Emphasized_Background, #0a6ed1);color:var(--sapButton_Emphasized_TextColor, #fff);text-align:center}.end-day{width:0;height:0;border-top:10px solid transparent;border-left:10px solid var(--sapButton_Emphasized_BorderColor, #0a6ed1);border-bottom:10px solid transparent}.event-list-number-day{width:40px;height:40px;flex-grow:0;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-grow:0!important}.event-list-number-day:hover{color:var(--sapButton_Hover_TextColor, #0854a0);background-color:var(--sapButton_Hover_Background, #ebf5fe);cursor:pointer}::ng-deep .fd-form-item{flex-direction:row!important}\n"] }]
|
|
1059
|
-
}], propDecorators: { day: [{
|
|
1060
|
-
type: Input
|
|
1061
|
-
}], deviceSize: [{
|
|
1062
|
-
type: Input
|
|
1063
|
-
}], weekDays: [{
|
|
1064
|
-
type: Input
|
|
1065
|
-
}], calendarFields: [{
|
|
1066
|
-
type: Input
|
|
1067
|
-
}], rtl: [{
|
|
1068
|
-
type: Input
|
|
1069
|
-
}], canDelete: [{
|
|
1070
|
-
type: Input
|
|
1071
|
-
}], canEdit: [{
|
|
1072
|
-
type: Input
|
|
1073
|
-
}], popover: [{
|
|
1074
|
-
type: Input
|
|
1075
|
-
}], deleteEvent: [{
|
|
1076
|
-
type: Output
|
|
1077
|
-
}], editEvent: [{
|
|
1078
|
-
type: Output
|
|
1079
|
-
}], openPopOver: [{
|
|
1080
|
-
type: Output
|
|
1081
|
-
}] } });
|
|
1082
|
-
|
|
1083
|
-
class EqualDatePipe {
|
|
1084
|
-
constructor() { }
|
|
1085
|
-
transform(value, secondValue) {
|
|
1086
|
-
if ((value && !secondValue) || (!value && secondValue)) {
|
|
1087
|
-
return false;
|
|
1088
|
-
}
|
|
1089
|
-
const yearEqual = value.getFullYear() === (secondValue === null || secondValue === void 0 ? void 0 : secondValue.getFullYear());
|
|
1090
|
-
const monthEqual = value.getMonth() === (secondValue === null || secondValue === void 0 ? void 0 : secondValue.getMonth());
|
|
1091
|
-
const dayEqual = value.getDate() === (secondValue === null || secondValue === void 0 ? void 0 : secondValue.getDate());
|
|
1092
|
-
return yearEqual && monthEqual && dayEqual;
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
EqualDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EqualDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1096
|
-
EqualDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: EqualDatePipe, name: "equalDate" });
|
|
1097
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EqualDatePipe, decorators: [{
|
|
1098
|
-
type: Pipe,
|
|
1099
|
-
args: [{
|
|
1100
|
-
name: 'equalDate'
|
|
1101
|
-
}]
|
|
1102
|
-
}], ctorParameters: function () { return []; } });
|
|
1103
|
-
|
|
1104
|
-
class CalendarMonthComponent extends BaseComponent {
|
|
1105
|
-
constructor(daysInWeek, _cdr, _calendarService) {
|
|
1106
|
-
super();
|
|
1107
|
-
this.daysInWeek = daysInWeek;
|
|
1108
|
-
this._cdr = _cdr;
|
|
1109
|
-
this._calendarService = _calendarService;
|
|
1110
|
-
this.datePicker = false;
|
|
1111
|
-
this.rangePicker = false;
|
|
1112
|
-
this.canDelete = false;
|
|
1113
|
-
this.canAdd = false;
|
|
1114
|
-
this.canEdit = false;
|
|
1115
|
-
this.editEvent = new EventEmitter();
|
|
1116
|
-
this.deleteEvent = new EventEmitter();
|
|
1117
|
-
this.daySelect = new EventEmitter();
|
|
1118
|
-
this.dayClick = new EventEmitter();
|
|
1119
|
-
this.dayMouseMove = new EventEmitter();
|
|
1120
|
-
this.dayMouseUp = new EventEmitter();
|
|
1121
|
-
this.dayMouseDown = new EventEmitter();
|
|
1122
|
-
this.showEvent = new EventEmitter();
|
|
1123
|
-
this.taskHeight = 30;
|
|
1124
|
-
this._hasPopoverOpened = [];
|
|
1125
|
-
}
|
|
1126
|
-
ngOnChanges(changes) {
|
|
1127
|
-
super.ngOnChanges(changes);
|
|
1128
|
-
let needToDetectChange = false;
|
|
1129
|
-
const { containerHeight, deviceSize, moDataList, days, monthWeeksCount, startSelectedDayIndex, endSelectedDayIndex } = changes;
|
|
1130
|
-
if (containerHeight && !containerHeight.firstChange) {
|
|
1131
|
-
this.fitToContainer(changes.containerHeight.currentValue);
|
|
1132
|
-
}
|
|
1133
|
-
if (deviceSize && !deviceSize.firstChange) {
|
|
1134
|
-
this.prepareWeekDays(changes.deviceSize.currentValue);
|
|
1135
|
-
}
|
|
1136
|
-
if (moDataList && !moDataList.firstChange) {
|
|
1137
|
-
this._prepareDaysTasks(changes.moDataList.currentValue);
|
|
1138
|
-
needToDetectChange = true;
|
|
1139
|
-
}
|
|
1140
|
-
if (days && !days.firstChange) {
|
|
1141
|
-
this.fitToContainer(this.containerHeight);
|
|
1142
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1143
|
-
needToDetectChange = true;
|
|
1144
|
-
}
|
|
1145
|
-
if (monthWeeksCount && !monthWeeksCount.firstChange) {
|
|
1146
|
-
this.fitToContainer(this.containerHeight);
|
|
1147
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1148
|
-
needToDetectChange = true;
|
|
1149
|
-
}
|
|
1150
|
-
if ((startSelectedDayIndex && !startSelectedDayIndex.firstChange) ||
|
|
1151
|
-
(endSelectedDayIndex && !endSelectedDayIndex.firstChange)) {
|
|
1152
|
-
needToDetectChange = true;
|
|
1153
|
-
}
|
|
1154
|
-
if (needToDetectChange) {
|
|
1155
|
-
this._cdr.detectChanges();
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
ngOnInit() {
|
|
1159
|
-
super.ngOnInit();
|
|
1160
|
-
this.isPickerMode = this.datePicker || this.rangePicker;
|
|
1161
|
-
this.prepareWeekDays(this.deviceSize);
|
|
1162
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1163
|
-
this.fitToContainer(this.containerHeight);
|
|
1164
|
-
}
|
|
1165
|
-
onDayBoxSelect(day) {
|
|
1166
|
-
this._fireDaySelect(day);
|
|
1167
|
-
}
|
|
1168
|
-
onDaySelect(weekIndex, dayIndex) {
|
|
1169
|
-
if (!this.canAdd) {
|
|
1170
|
-
return;
|
|
1171
|
-
}
|
|
1172
|
-
const day = this.days[weekIndex * 7 + dayIndex];
|
|
1173
|
-
this._fireDaySelect(day);
|
|
1174
|
-
}
|
|
1175
|
-
onOpenPopoverChange(isOpen) {
|
|
1176
|
-
this._openPopover(isOpen);
|
|
1177
|
-
}
|
|
1178
|
-
onMoreButton(e, popover) {
|
|
1179
|
-
this._preventEvent(e);
|
|
1180
|
-
popover.open();
|
|
1181
|
-
}
|
|
1182
|
-
onTask(e, task) {
|
|
1183
|
-
this.showEvent.emit(task);
|
|
1184
|
-
}
|
|
1185
|
-
onDayClick(day) {
|
|
1186
|
-
this.selected = day;
|
|
1187
|
-
this.dayClick.emit(day);
|
|
1188
|
-
}
|
|
1189
|
-
onDayMouseMove(day) {
|
|
1190
|
-
this.dayMouseMove.emit(day);
|
|
1191
|
-
}
|
|
1192
|
-
onDayMouseDown(day) {
|
|
1193
|
-
this.dayMouseDown.emit(day);
|
|
1194
|
-
}
|
|
1195
|
-
onDayMouseUp(day) {
|
|
1196
|
-
this.dayMouseUp.emit(day);
|
|
1197
|
-
}
|
|
1198
|
-
_preventEvent(e) {
|
|
1199
|
-
e.stopPropagation();
|
|
1200
|
-
e.preventDefault();
|
|
1201
|
-
}
|
|
1202
|
-
_fireDaySelect(day) {
|
|
1203
|
-
if (this._hasPopoverOpened.length === 0) {
|
|
1204
|
-
this.daySelect.emit({
|
|
1205
|
-
date: day.date
|
|
1206
|
-
});
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
_openPopover(isOpen) {
|
|
1210
|
-
if (isOpen) {
|
|
1211
|
-
this._hasPopoverOpened.push(true);
|
|
1212
|
-
}
|
|
1213
|
-
else {
|
|
1214
|
-
setTimeout(() => {
|
|
1215
|
-
this._hasPopoverOpened = [];
|
|
1216
|
-
}, 0);
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
prepareWeekDays(deviceSize) {
|
|
1220
|
-
if (deviceSize !== 's' && deviceSize !== 'm') {
|
|
1221
|
-
this.selectedWeekDays = this.weekDays;
|
|
1222
|
-
}
|
|
1223
|
-
else {
|
|
1224
|
-
this.selectedWeekDays = this.weekDaysMin;
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
fitToContainer(containerHeight) {
|
|
1228
|
-
let _weeksCount;
|
|
1229
|
-
if (this.monthWeeksCount > 0) {
|
|
1230
|
-
const weeksCount = this.monthWeeksCount;
|
|
1231
|
-
_weeksCount = weeksCount;
|
|
1232
|
-
}
|
|
1233
|
-
else {
|
|
1234
|
-
_weeksCount = this.days.length / 7;
|
|
1235
|
-
}
|
|
1236
|
-
this.numberOfWeek = Array.from(Array(_weeksCount).keys());
|
|
1237
|
-
this.numberOfWeek = this.numberOfWeek.map((value) => value);
|
|
1238
|
-
if (this.isPickerMode) {
|
|
1239
|
-
this.dayHeight = 40;
|
|
1240
|
-
return;
|
|
1241
|
-
}
|
|
1242
|
-
this.dayHeight = Math.floor(containerHeight / (_weeksCount + 1));
|
|
1243
|
-
this.maxTaskCount = Math.floor((this.dayHeight - this.taskHeight) / this.taskHeight);
|
|
1244
|
-
if (this.maxTaskCount > 0) {
|
|
1245
|
-
this.maxRowTasks = new Array(this.maxTaskCount).fill(0).map((x, i) => i);
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
_prepareDaysTasks(calendarTasks) {
|
|
1249
|
-
if (this.isPickerMode) {
|
|
1250
|
-
this.weekTasksArray = {};
|
|
1251
|
-
return;
|
|
1252
|
-
}
|
|
1253
|
-
const calendarFields = this.calendarFields;
|
|
1254
|
-
// Sort all Tasks
|
|
1255
|
-
const moDataList = this._calendarService.sortTasks(calendarTasks, calendarFields);
|
|
1256
|
-
this.days.forEach((day) => (day.tasks = []));
|
|
1257
|
-
const weekTasksArray = [];
|
|
1258
|
-
for (let j = 0; j < this.days.length / 7; j++) {
|
|
1259
|
-
const days = this.daysInWeek.transform(this.days, j);
|
|
1260
|
-
const week = this._calendarService.createWeekTask(days, moDataList, calendarFields, 0);
|
|
1261
|
-
weekTasksArray.push(week);
|
|
1262
|
-
}
|
|
1263
|
-
weekTasksArray.forEach((week) => {
|
|
1264
|
-
const arr = Object.values(week);
|
|
1265
|
-
for (let i = arr.length; i < this.maxTaskCount; i++) {
|
|
1266
|
-
week[i.toString()] = [];
|
|
1267
|
-
}
|
|
1268
|
-
});
|
|
1269
|
-
// به ازای هر ردیف تسک باید تعداد 7 ستون اضافه گردد و برای ستونی که تسکی ندارد یک جای خالی colspan 1 میگذاریم
|
|
1270
|
-
weekTasksArray.forEach((week) => {
|
|
1271
|
-
this._calendarService.fillWeek(week);
|
|
1272
|
-
});
|
|
1273
|
-
this.weekTasksArray = weekTasksArray;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
CalendarMonthComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarMonthComponent, deps: [{ token: DaysInWeekPipe }, { token: i0.ChangeDetectorRef }, { token: CalendarService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1277
|
-
CalendarMonthComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarMonthComponent, selector: "bc-calendar-month", inputs: { monthWeeksCount: "monthWeeksCount", weekDays: "weekDays", weekDaysMin: "weekDaysMin", today: "today", containerHeight: "containerHeight", days: "days", calendarFields: "calendarFields", rtl: "rtl", deviceSize: "deviceSize", moDataList: "moDataList", datePicker: "datePicker", rangePicker: "rangePicker", canDelete: "canDelete", canAdd: "canAdd", canEdit: "canEdit", selectedDate: "selectedDate", startSelectedDayIndex: "startSelectedDayIndex", endSelectedDayIndex: "endSelectedDayIndex" }, outputs: { editEvent: "editEvent", deleteEvent: "deleteEvent", daySelect: "daySelect", dayClick: "dayClick", dayMouseMove: "dayMouseMove", dayMouseUp: "dayMouseUp", dayMouseDown: "dayMouseDown", showEvent: "showEvent" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table fd-table class=\"table-header\" [fdCompact] [attr.picker]=\"datePicker\">\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th\r\n class=\"weekday-header\"\r\n *ngFor=\"let weekDay of selectedWeekDays\"\r\n fd-table-cell\r\n [class.noborder]=\"isPickerMode\"\r\n >\r\n {{ weekDay | slice: 0:1 }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody fd-table-body>\r\n <ng-container *ngFor=\"let weekDay of numberOfWeek\">\r\n <tr fd-table-row>\r\n <td\r\n [style.height.px]=\"dayHeight\"\r\n fd-table-cell\r\n colspan=\"7\"\r\n [style.border]=\"isPickerMode ? 'none' : null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderTasks;\r\n context: {\r\n $implicit: isPickerMode ? null : moDataList[weekDay],\r\n weekIndex: weekDay,\r\n days: days | daysInWeek: weekDay,\r\n maxRowTasks: maxRowTasks,\r\n weekDays: weekDays,\r\n calendarFields: calendarFields,\r\n deviceSize: deviceSize,\r\n rtl: rtl,\r\n isPickerMode: isPickerMode\r\n }\r\n \"\r\n ></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n</table>\r\n<ng-template\r\n #renderTasks\r\n let-task\r\n let-weekIndex=\"weekIndex\"\r\n let-weekDays=\"weekDays\"\r\n let-days=\"days\"\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-calendarFields=\"calendarFields\"\r\n let-deviceSize=\"deviceSize\"\r\n let-rtl=\"rtl\"\r\n let-isPickerMode=\"isPickerMode\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody>\r\n <tr fd-table-row class=\"row-day-number\" [attr.rtl]=\"rtl\">\r\n <td fd-table-cell *ngFor=\"let day of days\" [class.noborder]=\"isPickerMode\">\r\n <bc-day-number-box\r\n [ngClass]=\"{\r\n 'fd-calendar__item': isPickerMode,\r\n '!border !rounded-md transition-all cursor-pointer': isPickerMode && day.isInMonth,\r\n '!bg-transparent border-gray-100 hover:!border-gray-300':\r\n isPickerMode && day.isInMonth && !day.isToday,\r\n 'fd-calendar__item--other-month': isPickerMode && !day.isInMonth,\r\n 'fd-calendar__item--weekend': isPickerMode && day.isWeekend,\r\n '!bg-blue-500 [&>*]:!text-white hover:!bg-blue-600': day.isToday\r\n }\"\r\n [isPickerMode]=\"isPickerMode\"\r\n [day]=\"day\"\r\n [isActive]=\"\r\n day.index === startSelectedDayIndex || day.index === endSelectedDayIndex || day.date\r\n | equalDate: selectedDate\r\n \"\r\n [itemInRange]=\"\r\n startSelectedDayIndex !== undefined &&\r\n endSelectedDayIndex !== undefined &&\r\n day.index >= startSelectedDayIndex &&\r\n day.index <= endSelectedDayIndex\r\n \"\r\n (dayClick)=\"onDayClick(day)\"\r\n (dayMouseMove)=\"onDayMouseMove(day)\"\r\n (dayMouseDown)=\"onDayMouseDown(day)\"\r\n (dayMouseUp)=\"onDayMouseUp(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"!isPickerMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray[weekIndex],\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: weekIndex,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n weekDays: weekDays\r\n }\r\n \"\r\n ></ng-container>\r\n <tr fd-table-row>\r\n <td fd-table-cell *ngFor=\"let day of days\" class=\"more-fd\" (click)=\"onDayBoxSelect(day)\">\r\n <ng-container *ngIf=\"maxRowTasks?.length < day.tasks.length\">\r\n <button\r\n fd-button\r\n (click)=\"onMoreButton($event, popover)\"\r\n [fdType]=\"'transparent'\"\r\n [compact]=\"true\"\r\n >\r\n {{ day.tasks?.length - maxRowTasks?.length }}\r\n {{ 'More' | bbbTranslate }}\r\n </button>\r\n <fd-popover\r\n #popover\r\n [mobile]=\"deviceSize === 's'\"\r\n placement=\"bottom\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n (isOpenChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <bc-day-event-list\r\n [day]=\"day\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [weekDays]=\"weekDays\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [popover]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-day-event-list>\r\n </fd-popover>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</ng-template>\r\n\r\n<ng-template\r\n #renderDayTasks\r\n let-weekTasks\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-weekIndex=\"weekIndex\"\r\n let-deviceSize=\"deviceSize\"\r\n let-calendarFields=\"calendarFields\"\r\n let-weekDays=\"weekDays\"\r\n>\r\n <tr fd-table-row *ngFor=\"let rowTask of maxRowTasks; let i = index\">\r\n <ng-container *ngIf=\"!weekTasks[i] || weekTasks[i].length === 0\">\r\n <td fd-table-cell *ngFor=\"let day of weekDays\"></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td fd-table-cell [attr.colspan]=\"task.colSpan\" *ngIf=\"task.colSpan\">\r\n <ng-container *ngIf=\"task.event; else newDaySelect\">\r\n <bc-event-button\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n ></bc-event-button>\r\n </ng-container>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" (click)=\"onDaySelect(weekIndex, dayIndex)\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n", styles: [":host{display:block}table{table-layout:fixed}.table-header td{padding:0!important}.table-content{width:100%;height:100%;border:none;border-spacing:0}.table-content td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:1.425rem}.table-content .row-day-number[rtl=true] td:first-child{border-right:none}.table-content .row-day-number[rtl=\"fa;se\"] td:first-child{border-left:none}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}.weekday-header,.row-day-number td{width:100%}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.more-fd{text-align:center!important}.more-fd button{font-size:12px}.fd-calendar__item{font-size:.875rem;font-size:var(--sapFontSize, .875rem);line-height:1.4;line-height:var(--sapContent_LineHeight, 1.4);color:#32363a;color:var(--sapTextColor, #32363a);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily, \"72\", \"72full\", Arial, Helvetica, sans-serif);font-weight:400;box-sizing:border-box;padding:0;overflow:hidden;position:relative;height:2.5rem;margin:.125rem;min-width:2.125rem;border-radius:.25rem;border-radius:var(--sapElement_BorderCornerRadius, .25rem);background-color:#fafafa;background-color:var(--sapLegend_WorkingBackground, #fafafa);flex:1 1 .375rem;padding:1px!important}.fd-calendar__item.fd-calendar__item--other-month{background-color:var(--sapList_Background, #fff)}.fd-calendar__item.fd-calendar__item--weekend{background-color:var(--sapLegend_NotWorkingBackground, #dedede)}.fd-calendar__item.is-active{background-color:var(--sapContent_Selected_Background, #0854a0);border:var(--fdCalendar_Active_Item_Border, none)}.fd-calendar__item.is-active ::ng-deep span{color:var(--sapContent_Selected_TextColor, #fff)}.fd-calendar__item.fd-calendar__item--range{border:.0625rem solid var(--sapList_SelectionBorderColor, #0854a0);background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}table[picker=true] thead,table[picker=true] tbody{border:none}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MobileDirective, selector: "[mobile]" }, { kind: "directive", type: i5$1.ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: i4.DeprecatedButtonContentDensityDirective, selector: "[fd-button][compact]" }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i7$1.TableComponent, selector: "table[fd-table]", inputs: ["noBorderX", "noBorderY", "popIn", "responsive", "keys", "allCellsFocusable"], exportAs: ["fd-table"] }, { kind: "directive", type: i7$1.TableHeaderDirective, selector: "[fdTableHeader], [fd-table-header]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i7$1.TableBodyDirective, selector: "[fdTableBody], [fd-table-body]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i7$1.TableRowDirective, selector: "[fdTableRow], [fd-table-row]", inputs: ["activable", "highlightActive", "hoverable", "focusable", "main", "secondary", "active"] }, { kind: "directive", type: i7$1.TableCellDirective, selector: "[fdTableCell], [fd-table-cell]", inputs: ["noBorderX", "noBorderY", "activable", "focusable", "tabindex", "hoverable", "fitContent", "noPadding", "noData", "key", "cellFocusedEventAnnouncer"] }, { kind: "component", type: DayNumberBoxComponent, selector: "bc-day-number-box", inputs: ["isWeekMode", "isSingleDay", "day", "isPickerMode", "itemInRange", "isActive"], outputs: ["dayClick", "dayMouseDown", "dayMouseUp", "dayMouseMove"] }, { kind: "component", type: EventButtonComponent, selector: "bc-event-button", inputs: ["buttonTemplate", "calendarFields", "task", "rtl", "canDelete", "canEdit", "index", "deviceSize"], outputs: ["deleteEvent", "editEvent", "openPopoverChange"] }, { kind: "component", type: DayEventListComponent, selector: "bc-day-event-list", inputs: ["day", "deviceSize", "weekDays", "calendarFields", "rtl", "canDelete", "canEdit", "popover"], outputs: ["deleteEvent", "editEvent", "openPopOver"] }, { kind: "pipe", type: i3.SlicePipe, name: "slice" }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }, { kind: "pipe", type: DaysInWeekPipe, name: "daysInWeek" }, { kind: "pipe", type: EqualDatePipe, name: "equalDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarMonthComponent, decorators: [{
|
|
1279
|
-
type: Component,
|
|
1280
|
-
args: [{ selector: 'bc-calendar-month', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table fd-table class=\"table-header\" [fdCompact] [attr.picker]=\"datePicker\">\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th\r\n class=\"weekday-header\"\r\n *ngFor=\"let weekDay of selectedWeekDays\"\r\n fd-table-cell\r\n [class.noborder]=\"isPickerMode\"\r\n >\r\n {{ weekDay | slice: 0:1 }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody fd-table-body>\r\n <ng-container *ngFor=\"let weekDay of numberOfWeek\">\r\n <tr fd-table-row>\r\n <td\r\n [style.height.px]=\"dayHeight\"\r\n fd-table-cell\r\n colspan=\"7\"\r\n [style.border]=\"isPickerMode ? 'none' : null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderTasks;\r\n context: {\r\n $implicit: isPickerMode ? null : moDataList[weekDay],\r\n weekIndex: weekDay,\r\n days: days | daysInWeek: weekDay,\r\n maxRowTasks: maxRowTasks,\r\n weekDays: weekDays,\r\n calendarFields: calendarFields,\r\n deviceSize: deviceSize,\r\n rtl: rtl,\r\n isPickerMode: isPickerMode\r\n }\r\n \"\r\n ></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n</table>\r\n<ng-template\r\n #renderTasks\r\n let-task\r\n let-weekIndex=\"weekIndex\"\r\n let-weekDays=\"weekDays\"\r\n let-days=\"days\"\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-calendarFields=\"calendarFields\"\r\n let-deviceSize=\"deviceSize\"\r\n let-rtl=\"rtl\"\r\n let-isPickerMode=\"isPickerMode\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody>\r\n <tr fd-table-row class=\"row-day-number\" [attr.rtl]=\"rtl\">\r\n <td fd-table-cell *ngFor=\"let day of days\" [class.noborder]=\"isPickerMode\">\r\n <bc-day-number-box\r\n [ngClass]=\"{\r\n 'fd-calendar__item': isPickerMode,\r\n '!border !rounded-md transition-all cursor-pointer': isPickerMode && day.isInMonth,\r\n '!bg-transparent border-gray-100 hover:!border-gray-300':\r\n isPickerMode && day.isInMonth && !day.isToday,\r\n 'fd-calendar__item--other-month': isPickerMode && !day.isInMonth,\r\n 'fd-calendar__item--weekend': isPickerMode && day.isWeekend,\r\n '!bg-blue-500 [&>*]:!text-white hover:!bg-blue-600': day.isToday\r\n }\"\r\n [isPickerMode]=\"isPickerMode\"\r\n [day]=\"day\"\r\n [isActive]=\"\r\n day.index === startSelectedDayIndex || day.index === endSelectedDayIndex || day.date\r\n | equalDate: selectedDate\r\n \"\r\n [itemInRange]=\"\r\n startSelectedDayIndex !== undefined &&\r\n endSelectedDayIndex !== undefined &&\r\n day.index >= startSelectedDayIndex &&\r\n day.index <= endSelectedDayIndex\r\n \"\r\n (dayClick)=\"onDayClick(day)\"\r\n (dayMouseMove)=\"onDayMouseMove(day)\"\r\n (dayMouseDown)=\"onDayMouseDown(day)\"\r\n (dayMouseUp)=\"onDayMouseUp(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"!isPickerMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray[weekIndex],\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: weekIndex,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n weekDays: weekDays\r\n }\r\n \"\r\n ></ng-container>\r\n <tr fd-table-row>\r\n <td fd-table-cell *ngFor=\"let day of days\" class=\"more-fd\" (click)=\"onDayBoxSelect(day)\">\r\n <ng-container *ngIf=\"maxRowTasks?.length < day.tasks.length\">\r\n <button\r\n fd-button\r\n (click)=\"onMoreButton($event, popover)\"\r\n [fdType]=\"'transparent'\"\r\n [compact]=\"true\"\r\n >\r\n {{ day.tasks?.length - maxRowTasks?.length }}\r\n {{ 'More' | bbbTranslate }}\r\n </button>\r\n <fd-popover\r\n #popover\r\n [mobile]=\"deviceSize === 's'\"\r\n placement=\"bottom\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n (isOpenChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <bc-day-event-list\r\n [day]=\"day\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [weekDays]=\"weekDays\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [popover]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-day-event-list>\r\n </fd-popover>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</ng-template>\r\n\r\n<ng-template\r\n #renderDayTasks\r\n let-weekTasks\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-weekIndex=\"weekIndex\"\r\n let-deviceSize=\"deviceSize\"\r\n let-calendarFields=\"calendarFields\"\r\n let-weekDays=\"weekDays\"\r\n>\r\n <tr fd-table-row *ngFor=\"let rowTask of maxRowTasks; let i = index\">\r\n <ng-container *ngIf=\"!weekTasks[i] || weekTasks[i].length === 0\">\r\n <td fd-table-cell *ngFor=\"let day of weekDays\"></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td fd-table-cell [attr.colspan]=\"task.colSpan\" *ngIf=\"task.colSpan\">\r\n <ng-container *ngIf=\"task.event; else newDaySelect\">\r\n <bc-event-button\r\n [task]=\"task\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n ></bc-event-button>\r\n </ng-container>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" (click)=\"onDaySelect(weekIndex, dayIndex)\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n", styles: [":host{display:block}table{table-layout:fixed}.table-header td{padding:0!important}.table-content{width:100%;height:100%;border:none;border-spacing:0}.table-content td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:1.425rem}.table-content .row-day-number[rtl=true] td:first-child{border-right:none}.table-content .row-day-number[rtl=\"fa;se\"] td:first-child{border-left:none}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}.weekday-header,.row-day-number td{width:100%}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.more-fd{text-align:center!important}.more-fd button{font-size:12px}.fd-calendar__item{font-size:.875rem;font-size:var(--sapFontSize, .875rem);line-height:1.4;line-height:var(--sapContent_LineHeight, 1.4);color:#32363a;color:var(--sapTextColor, #32363a);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily, \"72\", \"72full\", Arial, Helvetica, sans-serif);font-weight:400;box-sizing:border-box;padding:0;overflow:hidden;position:relative;height:2.5rem;margin:.125rem;min-width:2.125rem;border-radius:.25rem;border-radius:var(--sapElement_BorderCornerRadius, .25rem);background-color:#fafafa;background-color:var(--sapLegend_WorkingBackground, #fafafa);flex:1 1 .375rem;padding:1px!important}.fd-calendar__item.fd-calendar__item--other-month{background-color:var(--sapList_Background, #fff)}.fd-calendar__item.fd-calendar__item--weekend{background-color:var(--sapLegend_NotWorkingBackground, #dedede)}.fd-calendar__item.is-active{background-color:var(--sapContent_Selected_Background, #0854a0);border:var(--fdCalendar_Active_Item_Border, none)}.fd-calendar__item.is-active ::ng-deep span{color:var(--sapContent_Selected_TextColor, #fff)}.fd-calendar__item.fd-calendar__item--range{border:.0625rem solid var(--sapList_SelectionBorderColor, #0854a0);background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}table[picker=true] thead,table[picker=true] tbody{border:none}\n"] }]
|
|
1281
|
-
}], ctorParameters: function () { return [{ type: DaysInWeekPipe }, { type: i0.ChangeDetectorRef }, { type: CalendarService }]; }, propDecorators: { monthWeeksCount: [{
|
|
1282
|
-
type: Input
|
|
1283
|
-
}], weekDays: [{
|
|
1284
|
-
type: Input
|
|
1285
|
-
}], weekDaysMin: [{
|
|
1286
|
-
type: Input
|
|
1287
|
-
}], today: [{
|
|
1288
|
-
type: Input
|
|
1289
|
-
}], containerHeight: [{
|
|
1290
|
-
type: Input
|
|
1291
|
-
}], days: [{
|
|
1292
|
-
type: Input
|
|
1293
|
-
}], calendarFields: [{
|
|
1294
|
-
type: Input
|
|
1295
|
-
}], rtl: [{
|
|
1296
|
-
type: Input
|
|
1297
|
-
}], deviceSize: [{
|
|
1298
|
-
type: Input
|
|
1299
|
-
}], moDataList: [{
|
|
1300
|
-
type: Input
|
|
1301
|
-
}], datePicker: [{
|
|
1302
|
-
type: Input
|
|
1303
|
-
}], rangePicker: [{
|
|
1304
|
-
type: Input
|
|
1305
|
-
}], canDelete: [{
|
|
1306
|
-
type: Input
|
|
1307
|
-
}], canAdd: [{
|
|
1308
|
-
type: Input
|
|
1309
|
-
}], canEdit: [{
|
|
1310
|
-
type: Input
|
|
1311
|
-
}], selectedDate: [{
|
|
1312
|
-
type: Input
|
|
1313
|
-
}], startSelectedDayIndex: [{
|
|
1314
|
-
type: Input
|
|
1315
|
-
}], endSelectedDayIndex: [{
|
|
1316
|
-
type: Input
|
|
1317
|
-
}], editEvent: [{
|
|
1318
|
-
type: Output
|
|
1319
|
-
}], deleteEvent: [{
|
|
1320
|
-
type: Output
|
|
1321
|
-
}], daySelect: [{
|
|
1322
|
-
type: Output
|
|
1323
|
-
}], dayClick: [{
|
|
1324
|
-
type: Output
|
|
1325
|
-
}], dayMouseMove: [{
|
|
1326
|
-
type: Output
|
|
1327
|
-
}], dayMouseUp: [{
|
|
1328
|
-
type: Output
|
|
1329
|
-
}], dayMouseDown: [{
|
|
1330
|
-
type: Output
|
|
1331
|
-
}], showEvent: [{
|
|
1332
|
-
type: Output
|
|
1333
|
-
}] } });
|
|
1334
|
-
|
|
1335
|
-
class CalendarSelectionDaysComponent extends BaseComponent {
|
|
1336
|
-
constructor(_calendarService, _portalService) {
|
|
1337
|
-
super();
|
|
1338
|
-
this._calendarService = _calendarService;
|
|
1339
|
-
this.rangeChange = new EventEmitter();
|
|
1340
|
-
this.selectionMode = 'day';
|
|
1341
|
-
this.months = [];
|
|
1342
|
-
this._isMouseDown = false;
|
|
1343
|
-
this.rtl$ = _portalService.rtl$;
|
|
1344
|
-
this.width$ = _portalService.deviceSize$.pipe(distinctUntilChanged(), map((deviceSize) => {
|
|
1345
|
-
switch (deviceSize) {
|
|
1346
|
-
case 'l':
|
|
1347
|
-
case 'xl':
|
|
1348
|
-
return 480;
|
|
1349
|
-
case 's':
|
|
1350
|
-
return 320;
|
|
1351
|
-
default:
|
|
1352
|
-
return 480;
|
|
1353
|
-
}
|
|
1354
|
-
}));
|
|
1355
|
-
this.weekDaysMin = this._calendarService.weekDaysMin();
|
|
1356
|
-
this._calendarService.setMode('month');
|
|
1357
|
-
this.weekDays = this._calendarService.weekDays();
|
|
1358
|
-
this.selectedMonth$ = this._calendarService.selected$;
|
|
1359
|
-
this.today = this._calendarService.today;
|
|
1360
|
-
this.months = this._calendarService.Months;
|
|
1361
|
-
this._prepareYear(this._calendarService.selectedMonth.dateInfo.year);
|
|
1362
|
-
}
|
|
1363
|
-
ngOnChanges(changes) {
|
|
1364
|
-
super.ngOnChanges(changes);
|
|
1365
|
-
const { monthInfo } = changes;
|
|
1366
|
-
if (monthInfo) {
|
|
1367
|
-
this._calendarService.loadCalendarMonthInfo(monthInfo.currentValue);
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
onMonthSelected(monthName, index) {
|
|
1371
|
-
this._calendarService.gotoMonth(monthName, index);
|
|
1372
|
-
}
|
|
1373
|
-
onYearSelected(year) {
|
|
1374
|
-
this._calendarService.gotoYear(+year);
|
|
1375
|
-
}
|
|
1376
|
-
onPrevTap() {
|
|
1377
|
-
if (this.selectionMode === 'day') {
|
|
1378
|
-
this._calendarService.loadPrevious();
|
|
1379
|
-
}
|
|
1380
|
-
else if (this.selectionMode === 'month') {
|
|
1381
|
-
this._calendarService.loadPrevYear();
|
|
1382
|
-
}
|
|
1383
|
-
else if (this.selectionMode === 'year') {
|
|
1384
|
-
this._prepareYear(Number(this.years[0]) - 20);
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
onNextTap() {
|
|
1388
|
-
if (this.selectionMode === 'day') {
|
|
1389
|
-
this._calendarService.loadNext();
|
|
1390
|
-
}
|
|
1391
|
-
else if (this.selectionMode === 'month') {
|
|
1392
|
-
this._calendarService.loadNextYear();
|
|
1393
|
-
}
|
|
1394
|
-
else if (this.selectionMode === 'year') {
|
|
1395
|
-
this._prepareYear(Number(this.years[this.years.length - 1]) + 1);
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
onToday() {
|
|
1399
|
-
this._calendarService.gotoToday();
|
|
1400
|
-
}
|
|
1401
|
-
onDayMouseMove(day, monthInfo) {
|
|
1402
|
-
if (this._isMouseDown) {
|
|
1403
|
-
const { endDay, startDay } = this.getStartAndEndDay(monthInfo, day);
|
|
1404
|
-
this.startSelectedDayIndex = startDay === null || startDay === void 0 ? void 0 : startDay.index;
|
|
1405
|
-
this.endSelectedDayIndex = endDay === null || endDay === void 0 ? void 0 : endDay.index;
|
|
1406
|
-
// console.log('-move-', this.startSelectedDay?.index, this.endSelectedDay?.index);
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
onDayMouseDown(day) {
|
|
1410
|
-
this._isMouseDown = true;
|
|
1411
|
-
this.startSelectedDay = null;
|
|
1412
|
-
this.endSelectedDay = null;
|
|
1413
|
-
this.startSelectedDay = day;
|
|
1414
|
-
this.startSelectedDayIndex = day.index;
|
|
1415
|
-
}
|
|
1416
|
-
onDayMouseUp(day, monthInfo, popover) {
|
|
1417
|
-
this._isMouseDown = false;
|
|
1418
|
-
const { endDay, startDay } = this.getStartAndEndDay(monthInfo, day);
|
|
1419
|
-
this.startSelectedDay = startDay;
|
|
1420
|
-
this.endSelectedDay = endDay;
|
|
1421
|
-
this._setFirstAndEndDay(monthInfo, popover);
|
|
1422
|
-
}
|
|
1423
|
-
onDayClick(day, monthInfo, popover) {
|
|
1424
|
-
this.startSelectedDay = this.endSelectedDay = day;
|
|
1425
|
-
this._setFirstAndEndDay(monthInfo, popover);
|
|
1426
|
-
}
|
|
1427
|
-
_prepareYear(from) {
|
|
1428
|
-
const years = [];
|
|
1429
|
-
for (let i = 0; i < 20; i++) {
|
|
1430
|
-
years.push(`${from + i}`);
|
|
1431
|
-
}
|
|
1432
|
-
this.years = years;
|
|
1433
|
-
}
|
|
1434
|
-
getStartAndEndDay(monthInfo, day) {
|
|
1435
|
-
let startDay = null;
|
|
1436
|
-
let endDay = null;
|
|
1437
|
-
if (this.startSelectedDay && !this.endSelectedDay) {
|
|
1438
|
-
if (day && this.startSelectedDay.date > day.date) {
|
|
1439
|
-
startDay = day;
|
|
1440
|
-
endDay = this.startSelectedDay;
|
|
1441
|
-
}
|
|
1442
|
-
else {
|
|
1443
|
-
startDay = this.startSelectedDay;
|
|
1444
|
-
endDay = day;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
else if (this.startSelectedDay && this.endSelectedDay) {
|
|
1448
|
-
if (day && this.startSelectedDay.date < day.date) {
|
|
1449
|
-
startDay = this.startSelectedDay;
|
|
1450
|
-
endDay = day;
|
|
1451
|
-
}
|
|
1452
|
-
else {
|
|
1453
|
-
startDay = day;
|
|
1454
|
-
endDay = this.endSelectedDay;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
// console.log('-2-', startDay, endDay);
|
|
1458
|
-
if (startDay && endDay) {
|
|
1459
|
-
const diff = Math.abs(startDay.momentOfDate.diff(endDay.momentOfDate, 'day'));
|
|
1460
|
-
if (diff > 6) {
|
|
1461
|
-
startDay = monthInfo.days[Math.floor(startDay.index / 7) * 7];
|
|
1462
|
-
// const end = endDay.index % 7;
|
|
1463
|
-
const indexEnd = Math.ceil((endDay.index + 1) / 7);
|
|
1464
|
-
// if (end > 0) {
|
|
1465
|
-
// indexEnd++;
|
|
1466
|
-
// }
|
|
1467
|
-
endDay = monthInfo.days[indexEnd * 7 - 1];
|
|
1468
|
-
// console.log('-3-', startDay, endDay);
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
return { endDay, startDay };
|
|
1472
|
-
}
|
|
1473
|
-
_setFirstAndEndDay(monthInfo, popover) {
|
|
1474
|
-
// console.log('-finish-', this.startSelectedDay, this.endSelectedDay);
|
|
1475
|
-
if (this.startSelectedDay && this.endSelectedDay) {
|
|
1476
|
-
if (popover) {
|
|
1477
|
-
popover.close();
|
|
1478
|
-
}
|
|
1479
|
-
this.rangeChange.emit({
|
|
1480
|
-
startDay: this.startSelectedDay,
|
|
1481
|
-
endDay: this.endSelectedDay,
|
|
1482
|
-
monthInfo
|
|
1483
|
-
});
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
CalendarSelectionDaysComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarSelectionDaysComponent, deps: [{ token: CalendarService, self: true }, { token: i2.PortalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1488
|
-
CalendarSelectionDaysComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarSelectionDaysComponent, selector: "bc-calendar-selection-days", inputs: { startSelectedDayIndex: "startSelectedDayIndex", endSelectedDayIndex: "endSelectedDayIndex", monthInfo: "monthInfo", inline: "inline" }, outputs: { rangeChange: "rangeChange" }, providers: [
|
|
1489
|
-
{
|
|
1490
|
-
provide: DateService,
|
|
1491
|
-
useFactory: getDateService
|
|
1492
|
-
},
|
|
1493
|
-
CalendarService
|
|
1494
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"inline; else popopTpl\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize$ | async,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #popopTpl>\r\n <button fd-button glyph=\"calendar\" fdType=\"transparent\" [fdPopoverTrigger]=\"popover\"></button>\r\n</ng-template>\r\n<fd-popover #popover [focusTrapped]=\"true\" [focusAutoCapture]=\"true\" [mobile]=\"(deviceSize$ | async) === 's'\">\r\n <fd-popover-body [style.width.px]=\"width$ | async\" class=\"popover-selection-day\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize$ | async,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n </fd-popover-body>\r\n</fd-popover>\r\n\r\n<ng-template\r\n #month\r\n let-selectedMonth\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-popover=\"popover\"\r\n>\r\n <fd-toolbar [fdType]=\"'transparent'\">\r\n <button fd-button fd-toolbar-item [label]=\"'DateR_Today' | bbbTranslate\" (click)=\"onToday()\"></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"onPrevTap()\"\r\n ></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"onNextTap()\"\r\n ></button>\r\n <div class=\"month-years-wrapper\" fd-title fd-toolbar-item>\r\n <button\r\n *ngIf=\"selectionMode === 'day' || selectionMode === 'month'\"\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.monthName\"\r\n (click)=\"selectionMode = 'month'\"\r\n ></button>\r\n <button\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.year\"\r\n (click)=\"selectionMode = 'year'\"\r\n ></button>\r\n </div>\r\n </fd-toolbar>\r\n <ng-container [ngSwitch]=\"selectionMode\">\r\n <ng-container *ngSwitchCase=\"'month'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 33%\"\r\n *ngFor=\"let month of months; let i = index\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.monthName === month ? 'emphasized' : 'transparent'\"\r\n [label]=\"month\"\r\n (click)=\"selectionMode = 'day'; onMonthSelected(month, i)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'year'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 25%\"\r\n *ngFor=\"let year of years\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.year === +year ? 'emphasized' : 'transparent'\"\r\n [label]=\"year\"\r\n (click)=\"selectionMode = 'day'; onYearSelected(year)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <bc-calendar-month\r\n *ngSwitchDefault\r\n [style.width]=\"width\"\r\n [containerHeight]=\"height\"\r\n [containerWidth]=\"width\"\r\n [rtl]=\"rtl\"\r\n [monthWeeksCount]=\"6\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [datePicker]=\"true\"\r\n [dateRange]=\"true\"\r\n [days]=\"selectedMonth.days\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event, selectedMonth, popover)\"\r\n (dayMouseMove)=\"onDayMouseMove($event, selectedMonth)\"\r\n (dayMouseUp)=\"onDayMouseUp($event, selectedMonth, popover)\"\r\n (dayMouseDown)=\"onDayMouseDown($event)\"\r\n [startSelectedDayIndex]=\"startSelectedDayIndex\"\r\n [endSelectedDayIndex]=\"endSelectedDayIndex\"\r\n ></bc-calendar-month>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [":host ::ng-deep .fd-toolbar{background-color:var(--sapBaseColor);height:2.8rem}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i6$1.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i6$1.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "component", type: i7.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i7.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: CalendarMonthComponent, selector: "bc-calendar-month", inputs: ["monthWeeksCount", "weekDays", "weekDaysMin", "today", "containerHeight", "days", "calendarFields", "rtl", "deviceSize", "moDataList", "datePicker", "rangePicker", "canDelete", "canAdd", "canEdit", "selectedDate", "startSelectedDayIndex", "endSelectedDayIndex"], outputs: ["editEvent", "deleteEvent", "daySelect", "dayClick", "dayMouseMove", "dayMouseUp", "dayMouseDown", "showEvent"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarSelectionDaysComponent, decorators: [{
|
|
1496
|
-
type: Component,
|
|
1497
|
-
args: [{ selector: 'bc-calendar-selection-days', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1498
|
-
{
|
|
1499
|
-
provide: DateService,
|
|
1500
|
-
useFactory: getDateService
|
|
1501
|
-
},
|
|
1502
|
-
CalendarService
|
|
1503
|
-
], template: "<ng-container *ngIf=\"inline; else popopTpl\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize$ | async,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #popopTpl>\r\n <button fd-button glyph=\"calendar\" fdType=\"transparent\" [fdPopoverTrigger]=\"popover\"></button>\r\n</ng-template>\r\n<fd-popover #popover [focusTrapped]=\"true\" [focusAutoCapture]=\"true\" [mobile]=\"(deviceSize$ | async) === 's'\">\r\n <fd-popover-body [style.width.px]=\"width$ | async\" class=\"popover-selection-day\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize$ | async,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n </fd-popover-body>\r\n</fd-popover>\r\n\r\n<ng-template\r\n #month\r\n let-selectedMonth\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-popover=\"popover\"\r\n>\r\n <fd-toolbar [fdType]=\"'transparent'\">\r\n <button fd-button fd-toolbar-item [label]=\"'DateR_Today' | bbbTranslate\" (click)=\"onToday()\"></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"onPrevTap()\"\r\n ></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"onNextTap()\"\r\n ></button>\r\n <div class=\"month-years-wrapper\" fd-title fd-toolbar-item>\r\n <button\r\n *ngIf=\"selectionMode === 'day' || selectionMode === 'month'\"\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.monthName\"\r\n (click)=\"selectionMode = 'month'\"\r\n ></button>\r\n <button\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.year\"\r\n (click)=\"selectionMode = 'year'\"\r\n ></button>\r\n </div>\r\n </fd-toolbar>\r\n <ng-container [ngSwitch]=\"selectionMode\">\r\n <ng-container *ngSwitchCase=\"'month'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 33%\"\r\n *ngFor=\"let month of months; let i = index\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.monthName === month ? 'emphasized' : 'transparent'\"\r\n [label]=\"month\"\r\n (click)=\"selectionMode = 'day'; onMonthSelected(month, i)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'year'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 25%\"\r\n *ngFor=\"let year of years\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.year === +year ? 'emphasized' : 'transparent'\"\r\n [label]=\"year\"\r\n (click)=\"selectionMode = 'day'; onYearSelected(year)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <bc-calendar-month\r\n *ngSwitchDefault\r\n [style.width]=\"width\"\r\n [containerHeight]=\"height\"\r\n [containerWidth]=\"width\"\r\n [rtl]=\"rtl\"\r\n [monthWeeksCount]=\"6\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [datePicker]=\"true\"\r\n [dateRange]=\"true\"\r\n [days]=\"selectedMonth.days\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event, selectedMonth, popover)\"\r\n (dayMouseMove)=\"onDayMouseMove($event, selectedMonth)\"\r\n (dayMouseUp)=\"onDayMouseUp($event, selectedMonth, popover)\"\r\n (dayMouseDown)=\"onDayMouseDown($event)\"\r\n [startSelectedDayIndex]=\"startSelectedDayIndex\"\r\n [endSelectedDayIndex]=\"endSelectedDayIndex\"\r\n ></bc-calendar-month>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [":host ::ng-deep .fd-toolbar{background-color:var(--sapBaseColor);height:2.8rem}\n"] }]
|
|
1504
|
-
}], ctorParameters: function () {
|
|
1505
|
-
return [{ type: CalendarService, decorators: [{
|
|
1506
|
-
type: Self
|
|
1507
|
-
}] }, { type: i2.PortalService }];
|
|
1508
|
-
}, propDecorators: { startSelectedDayIndex: [{
|
|
1509
|
-
type: Input
|
|
1510
|
-
}], endSelectedDayIndex: [{
|
|
1511
|
-
type: Input
|
|
1512
|
-
}], monthInfo: [{
|
|
1513
|
-
type: Input
|
|
1514
|
-
}], inline: [{
|
|
1515
|
-
type: Input
|
|
1516
|
-
}], rangeChange: [{
|
|
1517
|
-
type: Output
|
|
1518
|
-
}] } });
|
|
1519
|
-
|
|
1520
|
-
class TimeConfigI18n {
|
|
1521
|
-
constructor(_bbbTranslate) {
|
|
1522
|
-
this._bbbTranslate = _bbbTranslate;
|
|
1523
|
-
/** Aria label for the 'increase hours' button */
|
|
1524
|
-
this.increaseHoursLabel = 'Increase hours';
|
|
1525
|
-
/** label for the 'hours' column */
|
|
1526
|
-
this.hoursLabel = this._bbbTranslate.transform('Hours');
|
|
1527
|
-
/** Aria label for the 'decrease hours' button */
|
|
1528
|
-
this.decreaseHoursLabel = 'Decrease hours';
|
|
1529
|
-
/** Aria label for the 'increase minutes' button */
|
|
1530
|
-
this.increaseMinutesLabel = 'Increase minutes';
|
|
1531
|
-
/** label for the 'minutes' column */
|
|
1532
|
-
this.minutesLabel = this._bbbTranslate.transform('Minutes');
|
|
1533
|
-
/** Aria label for the 'decrease minutes' button */
|
|
1534
|
-
this.decreaseMinutesLabel = 'Decrease minutes';
|
|
1535
|
-
/** Aria label for the 'increase seconds' button */
|
|
1536
|
-
this.increaseSecondsLabel = 'Increase seconds';
|
|
1537
|
-
/** label for the 'seconds' column */
|
|
1538
|
-
this.secondsLabel = this._bbbTranslate.transform('Sec');
|
|
1539
|
-
/** Aria label for the 'decrease seconds' button */
|
|
1540
|
-
this.decreaseSecondsLabel = 'Decrease seconds';
|
|
1541
|
-
/** Aria label for the 'increase period' button */
|
|
1542
|
-
this.increasePeriodLabel = 'Increase period';
|
|
1543
|
-
/** label for the 'period' column */
|
|
1544
|
-
this.periodLabel = 'Period';
|
|
1545
|
-
/** Aria label for the 'decrease period' button */
|
|
1546
|
-
this.decreasePeriodLabel = 'Decrease period';
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
TimeConfigI18n.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TimeConfigI18n, deps: [{ token: i2.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1550
|
-
TimeConfigI18n.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TimeConfigI18n });
|
|
1551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TimeConfigI18n, decorators: [{
|
|
1552
|
-
type: Injectable
|
|
1553
|
-
}], ctorParameters: function () { return [{ type: i2.BbbTranslatePipe }]; } });
|
|
1554
|
-
class DateTimePickerComponent extends BaseComponent {
|
|
1555
|
-
constructor(_datetimeAdapter, _dateTimeToCaption, _logService, _dialogService, _portalService) {
|
|
1556
|
-
super();
|
|
1557
|
-
this._datetimeAdapter = _datetimeAdapter;
|
|
1558
|
-
this._dateTimeToCaption = _dateTimeToCaption;
|
|
1559
|
-
this._logService = _logService;
|
|
1560
|
-
this._dialogService = _dialogService;
|
|
1561
|
-
this.rtl = true;
|
|
1562
|
-
this.rangeChange = new EventEmitter();
|
|
1563
|
-
this.valueChange = new EventEmitter();
|
|
1564
|
-
this.valueCaption = '';
|
|
1565
|
-
this.selectionMode = 'day';
|
|
1566
|
-
this.todayIndex = -1;
|
|
1567
|
-
this.isValid = true;
|
|
1568
|
-
this.months = [];
|
|
1569
|
-
this.tempFormmatedDate = '';
|
|
1570
|
-
this.rtl$ = _portalService.rtl$;
|
|
1571
|
-
this.width$ = _portalService.deviceSize$.pipe(distinctUntilChanged(), map((deviceSize) => {
|
|
1572
|
-
if (!this.showDate) {
|
|
1573
|
-
return 260;
|
|
1574
|
-
}
|
|
1575
|
-
switch (deviceSize) {
|
|
1576
|
-
case 'l':
|
|
1577
|
-
case 'xl':
|
|
1578
|
-
return 560;
|
|
1579
|
-
case 's':
|
|
1580
|
-
return 320;
|
|
1581
|
-
default:
|
|
1582
|
-
return 520;
|
|
1583
|
-
}
|
|
1584
|
-
}));
|
|
1585
|
-
this.height = 420;
|
|
1586
|
-
}
|
|
1587
|
-
ngOnInit() {
|
|
1588
|
-
super.ngOnInit();
|
|
1589
|
-
let culture = 'en-US';
|
|
1590
|
-
switch (this.primaryCalendarType) {
|
|
1591
|
-
case 'HijriShamsi':
|
|
1592
|
-
culture = 'fa-IR';
|
|
1593
|
-
break;
|
|
1594
|
-
}
|
|
1595
|
-
this.culture = culture;
|
|
1596
|
-
this._calendarService = new CalendarService(this._logService, culture);
|
|
1597
|
-
this._calendarService.setMode('month');
|
|
1598
|
-
this.weekDaysMin = this._calendarService.weekDaysMin();
|
|
1599
|
-
this.weekDays = this._calendarService.weekDays();
|
|
1600
|
-
this.selectedMonth$ = this._calendarService.selected$;
|
|
1601
|
-
this.today = this._calendarService.today;
|
|
1602
|
-
if (this.value) {
|
|
1603
|
-
this.timeValue = FdDate.getFdDateByDate(this.value);
|
|
1604
|
-
this._setCaption(this.value);
|
|
1605
|
-
this._calendarService.loadMonthByDate(this.value);
|
|
1606
|
-
}
|
|
1607
|
-
else {
|
|
1608
|
-
this.timeValue = FdDate.getFdDateByDate(new Date());
|
|
1609
|
-
}
|
|
1610
|
-
// if (this.isRangePicker) {
|
|
1611
|
-
// if (this.startRangeDate) {
|
|
1612
|
-
// this._calendarService.loadMonthByDate(this.startRangeDate);
|
|
1613
|
-
// }
|
|
1614
|
-
// if (this.endRangeDate) {
|
|
1615
|
-
// }
|
|
1616
|
-
// } else {
|
|
1617
|
-
// this._calendarService.loadMonthByDate(this.value);
|
|
1618
|
-
// }
|
|
1619
|
-
this.months = this._calendarService.Months;
|
|
1620
|
-
this._prepareYear(this._calendarService.selectedMonth.dateInfo.year);
|
|
1621
|
-
this._setFormattedDateToInput(this.value);
|
|
1622
|
-
if (this.inputGroupComponent) {
|
|
1623
|
-
this.inputGroupComponent.registerOnChange(this.onCaptionChanged.bind(this));
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
ngOnChanges(changes) {
|
|
1627
|
-
var _a;
|
|
1628
|
-
const { value } = changes;
|
|
1629
|
-
if (value && !value.firstChange) {
|
|
1630
|
-
const caption = this._getFormattedDate(value.currentValue);
|
|
1631
|
-
if (caption !== ((_a = this.inputGroupComponent) === null || _a === void 0 ? void 0 : _a.inputText)) {
|
|
1632
|
-
this._setFormattedDateToInput(this.value);
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
onRangeChange(e) {
|
|
1637
|
-
this.rangeChange.emit({
|
|
1638
|
-
startDay: e.startDay,
|
|
1639
|
-
endDay: e.endDay
|
|
1640
|
-
});
|
|
1641
|
-
}
|
|
1642
|
-
onOpenPopover(popover, dialogTemplate) {
|
|
1643
|
-
if (this.readonly || this.disabled) {
|
|
1644
|
-
return;
|
|
1645
|
-
}
|
|
1646
|
-
if (this.timeComponent) {
|
|
1647
|
-
setTimeout(() => this.timeComponent.refreshColumns(), 0);
|
|
1648
|
-
}
|
|
1649
|
-
if (this.deviceSize === 's' || this.isMobile) {
|
|
1650
|
-
this._dialogService.open(dialogTemplate, {
|
|
1651
|
-
mobile: true
|
|
1652
|
-
});
|
|
1653
|
-
return;
|
|
1654
|
-
}
|
|
1655
|
-
popover.open();
|
|
1656
|
-
}
|
|
1657
|
-
onMonthSelected(monthName, index) {
|
|
1658
|
-
this._calendarService.gotoMonth(monthName, index);
|
|
1659
|
-
}
|
|
1660
|
-
onYearSelected(year) {
|
|
1661
|
-
this._calendarService.gotoYear(+year);
|
|
1662
|
-
}
|
|
1663
|
-
onCaptionChanged(e) {
|
|
1664
|
-
if (e.length < 10) {
|
|
1665
|
-
if (e.length === 0) {
|
|
1666
|
-
this._raisValueChanged(undefined);
|
|
1667
|
-
return;
|
|
1668
|
-
}
|
|
1669
|
-
this.isValid = false;
|
|
1670
|
-
return;
|
|
1671
|
-
}
|
|
1672
|
-
const englishDateStr = BarsaApi.Common.Util.ReplaceFaToArCharchter(e);
|
|
1673
|
-
let format = 'jYYYY/jM/jD';
|
|
1674
|
-
if (this.showTime) {
|
|
1675
|
-
format += ' HH:mm';
|
|
1676
|
-
}
|
|
1677
|
-
const moment = this._calendarService._dateService.stringToMoment(englishDateStr, format);
|
|
1678
|
-
// const isValid = moment.isValid();// برای شمسی همیشه false نشون میده
|
|
1679
|
-
if (isNaN(Date.parse(englishDateStr))) {
|
|
1680
|
-
this.isValid = false;
|
|
1681
|
-
return;
|
|
1682
|
-
}
|
|
1683
|
-
const date = moment.toDate();
|
|
1684
|
-
if (isNaN(date)) {
|
|
1685
|
-
this.isValid = false;
|
|
1686
|
-
return;
|
|
1687
|
-
}
|
|
1688
|
-
this.isValid = true;
|
|
1689
|
-
this.timeValue = this._datetimeAdapter.setTime(this.timeValue, date.getHours(), date.getMinutes(), date.getSeconds());
|
|
1690
|
-
this.startSelectedDay = this.endSelectedDay = null;
|
|
1691
|
-
this._raisValueChanged(date, false);
|
|
1692
|
-
}
|
|
1693
|
-
onPrevTap() {
|
|
1694
|
-
if (this.selectionMode === 'day') {
|
|
1695
|
-
this._calendarService.loadPrevious();
|
|
1696
|
-
}
|
|
1697
|
-
else if (this.selectionMode === 'month') {
|
|
1698
|
-
this._calendarService.loadPrevYear();
|
|
1699
|
-
}
|
|
1700
|
-
else if (this.selectionMode === 'year') {
|
|
1701
|
-
this._prepareYear(Number(this.years[0]) - 20);
|
|
1702
|
-
}
|
|
1703
|
-
}
|
|
1704
|
-
onNextTap() {
|
|
1705
|
-
if (this.selectionMode === 'day') {
|
|
1706
|
-
this._calendarService.loadNext();
|
|
1707
|
-
}
|
|
1708
|
-
else if (this.selectionMode === 'month') {
|
|
1709
|
-
this._calendarService.loadNextYear();
|
|
1710
|
-
}
|
|
1711
|
-
else if (this.selectionMode === 'year') {
|
|
1712
|
-
this._prepareYear(Number(this.years[this.years.length - 1]) + 1);
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
onToday() {
|
|
1716
|
-
const today = new Date();
|
|
1717
|
-
this.timeValue = this._datetimeAdapter.setTime(this.timeValue, today.getHours(), today.getMinutes(), today.getSeconds());
|
|
1718
|
-
if (this._calendarService.todayDay) {
|
|
1719
|
-
this.startSelectedDay = this._calendarService.todayDay;
|
|
1720
|
-
}
|
|
1721
|
-
this._calendarService.gotoToday();
|
|
1722
|
-
}
|
|
1723
|
-
onDayClick(day, popover, dialog) {
|
|
1724
|
-
this.isValid = true;
|
|
1725
|
-
this.startSelectedDay = this.endSelectedDay = day;
|
|
1726
|
-
if (this.showTime) {
|
|
1727
|
-
return;
|
|
1728
|
-
}
|
|
1729
|
-
this._setFirstAndEndDay(day, popover, dialog);
|
|
1730
|
-
}
|
|
1731
|
-
onPopoverOpenChange(isOpen) {
|
|
1732
|
-
if (isOpen) {
|
|
1733
|
-
this._lastValue = this.value;
|
|
1734
|
-
}
|
|
1735
|
-
else {
|
|
1736
|
-
this._lastValue = undefined;
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1739
|
-
onClear(popover, dialog) {
|
|
1740
|
-
if (dialog) {
|
|
1741
|
-
dialog.dismiss();
|
|
1742
|
-
}
|
|
1743
|
-
else {
|
|
1744
|
-
popover.close();
|
|
1745
|
-
}
|
|
1746
|
-
this.value = undefined;
|
|
1747
|
-
this._setFormattedDateToInput(this.value);
|
|
1748
|
-
this._raisValueChanged(this.value);
|
|
1749
|
-
}
|
|
1750
|
-
onOk(popover, dialog) {
|
|
1751
|
-
if (dialog) {
|
|
1752
|
-
dialog.dismiss();
|
|
1753
|
-
}
|
|
1754
|
-
else {
|
|
1755
|
-
popover.close();
|
|
1756
|
-
}
|
|
1757
|
-
if (!this.value) {
|
|
1758
|
-
this.value = new Date();
|
|
1759
|
-
}
|
|
1760
|
-
this._handleValueChange();
|
|
1761
|
-
}
|
|
1762
|
-
onCancel(popover, dialog) {
|
|
1763
|
-
if (this._lastValue !== this.value) {
|
|
1764
|
-
this.value = this._lastValue;
|
|
1765
|
-
this._setCaption(this.value);
|
|
1766
|
-
}
|
|
1767
|
-
if (dialog) {
|
|
1768
|
-
dialog.dismiss();
|
|
1769
|
-
}
|
|
1770
|
-
else {
|
|
1771
|
-
popover.close();
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
_setFormattedDateToInput(date) {
|
|
1775
|
-
var _a, _b;
|
|
1776
|
-
if (date) {
|
|
1777
|
-
const formattedDate = this._getFormattedDate(date);
|
|
1778
|
-
this.tempFormmatedDate = formattedDate;
|
|
1779
|
-
(_a = this.inputGroupComponent) === null || _a === void 0 ? void 0 : _a.writeValue(formattedDate);
|
|
1780
|
-
return;
|
|
1781
|
-
}
|
|
1782
|
-
this.tempFormmatedDate = '';
|
|
1783
|
-
(_b = this.inputGroupComponent) === null || _b === void 0 ? void 0 : _b.writeValue('');
|
|
1784
|
-
}
|
|
1785
|
-
_getFormattedDate(date) {
|
|
1786
|
-
return this._dateTimeToCaption.transform(date, this.formatPattern, this.culture, this.showDate, this.showTime);
|
|
1787
|
-
}
|
|
1788
|
-
_handleValueChange() {
|
|
1789
|
-
var _a, _b;
|
|
1790
|
-
this.value = this.showDate ? (_b = (_a = this.startSelectedDay) === null || _a === void 0 ? void 0 : _a.date) !== null && _b !== void 0 ? _b : this.value : new Date();
|
|
1791
|
-
if (this.value) {
|
|
1792
|
-
this.value = new Date(this.value);
|
|
1793
|
-
this.value.setHours(this.timeValue.hour);
|
|
1794
|
-
this.value.setMinutes(this.timeValue.minute);
|
|
1795
|
-
this.value.setSeconds(this.timeValue.second);
|
|
1796
|
-
}
|
|
1797
|
-
this._setFormattedDateToInput(this.value);
|
|
1798
|
-
this._raisValueChanged(this.value);
|
|
1799
|
-
}
|
|
1800
|
-
_prepareYear(from) {
|
|
1801
|
-
const years = [];
|
|
1802
|
-
for (let i = 0; i < 20; i++) {
|
|
1803
|
-
years.push(`${from + i}`);
|
|
1804
|
-
}
|
|
1805
|
-
this.years = years;
|
|
1806
|
-
}
|
|
1807
|
-
_setCaption(value) {
|
|
1808
|
-
if (!value) {
|
|
1809
|
-
this.valueCaption = '';
|
|
1810
|
-
return;
|
|
1811
|
-
}
|
|
1812
|
-
let formatPattern = this.formatPattern.replace('YYYY', 'jYYYY');
|
|
1813
|
-
formatPattern = formatPattern.replace('MM', 'jMM');
|
|
1814
|
-
formatPattern = formatPattern.replace('DD', 'jDD');
|
|
1815
|
-
this.valueCaption = this._calendarService._dateService.getMoment(value).format(formatPattern);
|
|
1816
|
-
}
|
|
1817
|
-
_raisValueChanged(date, setCaption = true) {
|
|
1818
|
-
this.value = date;
|
|
1819
|
-
if (setCaption) {
|
|
1820
|
-
this._setCaption(date);
|
|
1821
|
-
}
|
|
1822
|
-
this.valueChange.emit(date);
|
|
1823
|
-
}
|
|
1824
|
-
_setFirstAndEndDay(day, popover, dialog) {
|
|
1825
|
-
if (dialog) {
|
|
1826
|
-
dialog.dismiss();
|
|
1827
|
-
}
|
|
1828
|
-
if (popover) {
|
|
1829
|
-
popover.close();
|
|
1830
|
-
}
|
|
1831
|
-
if (!this.isRangePicker) {
|
|
1832
|
-
this._setFormattedDateToInput(day.date);
|
|
1833
|
-
this._raisValueChanged(day.date);
|
|
1834
|
-
return;
|
|
1835
|
-
}
|
|
1836
|
-
if (this.startSelectedDay) {
|
|
1837
|
-
this.endSelectedDay = day;
|
|
1838
|
-
}
|
|
1839
|
-
else {
|
|
1840
|
-
this.startSelectedDay = day;
|
|
1841
|
-
}
|
|
1842
|
-
if (this.startSelectedDay && this.endSelectedDay && this.startSelectedDay.date > this.endSelectedDay.date) {
|
|
1843
|
-
const temp = this.startSelectedDay;
|
|
1844
|
-
this.startSelectedDay = this.endSelectedDay;
|
|
1845
|
-
this.endSelectedDay = temp;
|
|
1846
|
-
}
|
|
1847
|
-
if (this.startSelectedDay && this.endSelectedDay) {
|
|
1848
|
-
this.rangeChange.emit({
|
|
1849
|
-
startDay: this.startSelectedDay.date,
|
|
1850
|
-
endDay: this.endSelectedDay.date
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
|
-
DateTimePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i2$2.DatetimeAdapter }, { token: i2.DateTimeToCaptionPipe }, { token: i2.LogService }, { token: i2$2.DialogService }, { token: i2.PortalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1856
|
-
DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: DateTimePickerComponent, selector: "bc-date-time-picker", inputs: { placeholder: "placeholder", primaryCalendarType: "primaryCalendarType", formatPattern: "formatPattern", value: "value", timeValue: "timeValue", startRangeDate: "startRangeDate", endRangeDate: "endRangeDate", isRangePicker: "isRangePicker", showTime: "showTime", showDate: "showDate", rtl: "rtl", deviceSize: "deviceSize", isMobile: "isMobile", readonly: "readonly", disabled: "disabled", buttonMenuMode: "buttonMenuMode", inlineMode: "inlineMode", daterangeMode: "daterangeMode" }, outputs: { rangeChange: "rangeChange", valueChange: "valueChange" }, providers: [
|
|
1857
|
-
{
|
|
1858
|
-
provide: DatetimeAdapter,
|
|
1859
|
-
useClass: FdDatetimeAdapter
|
|
1860
|
-
},
|
|
1861
|
-
{
|
|
1862
|
-
provide: TimeI18n,
|
|
1863
|
-
useClass: TimeConfigI18n
|
|
1864
|
-
},
|
|
1865
|
-
{
|
|
1866
|
-
provide: DateService,
|
|
1867
|
-
useFactory: getDateService
|
|
1868
|
-
},
|
|
1869
|
-
CalendarService
|
|
1870
|
-
], viewQueries: [{ propertyName: "timeComponent", first: true, predicate: TimeComponent, descendants: true }, { propertyName: "inputGroupComponent", first: true, predicate: InputGroupComponent, descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"inlineMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n daterangeMode ? dateRangeTpl : month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #dateRangeTpl>\r\n <bc-calendar-selection-days\r\n fd-toolbar-item\r\n [inline]=\"true\"\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n</ng-template>\r\n<fd-input-group\r\n placement=\"after\"\r\n glyph=\"calendar\"\r\n glyphAriaLabel=\"select day\"\r\n ariaLabelledBy=\"fd-input-group-icon-label-2\"\r\n [placeholder]=\"placeholder\"\r\n [value]=\"value\"\r\n [button]=\"true\"\r\n [state]=\"isValid ? 'success' : 'error'\"\r\n [showFocus]=\"true\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [style.display]=\"!buttonMenuMode || inlineMode ? 'inherit' : 'none'\"\r\n (addOnButtonClicked)=\"onOpenPopover(popover, dialogTemplate)\"\r\n>\r\n</fd-input-group>\r\n<button\r\n *ngIf=\"buttonMenuMode\"\r\n fd-button\r\n [label]=\"tempFormmatedDate || placeholder\"\r\n [title]=\"placeholder\"\r\n [fdType]=\"value ? 'standard' : 'transparent'\"\r\n [fdMenu]=\"true\"\r\n (click)=\"onOpenPopover(popover, dialogTemplate)\"\r\n [class.placeholder-custom]=\"!value\"\r\n class=\"menu-button-datepicker\"\r\n></button>\r\n\r\n<fd-popover #popover (isOpenChange)=\"onPopoverOpenChange($event)\" [focusTrapped]=\"true\" [focusAutoCapture]=\"true\">\r\n <fd-popover-body [style.width.px]=\"width$ | async\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n <div fd-popover-body-footer>\r\n <div fd-bar [barDesign]=\"'footer'\">\r\n <div fd-bar-right>\r\n <container *ngTemplateOutlet=\"footerButtons\"></container>\r\n </div>\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n</fd-popover>\r\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\r\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\r\n <fd-dialog-body>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover,\r\n dialog: dialog\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n </fd-dialog-body>\r\n <fd-dialog-footer>\r\n <container *ngTemplateOutlet=\"footerButtons; context: { dialog: dialog }\"></container>\r\n </fd-dialog-footer>\r\n </fd-dialog>\r\n</ng-template>\r\n<ng-template #footerButtons let-dialog=\"dialog\">\r\n <fd-button-bar [label]=\"'Ok' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onOk(popover, dialog)\"></fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Clear' | bbbTranslate\"\r\n fdType=\"standard\"\r\n (click)=\"onClear(popover, dialog)\"\r\n ></fd-button-bar>\r\n <fd-button-bar [label]=\"'Cancel' | bbbTranslate\" (click)=\"onCancel(popover, dialog)\"></fd-button-bar>\r\n</ng-template>\r\n<ng-template\r\n #month\r\n let-selectedMonth\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-popover=\"popover\"\r\n let-dialog=\"dialog\"\r\n>\r\n <fd-toolbar [fdType]=\"'transparent'\" *ngIf=\"showDate\">\r\n <button\r\n fd-button\r\n fd-toolbar-item\r\n [label]=\"(showDate ? 'DateR_Today' : 'Now') | bbbTranslate\"\r\n (click)=\"onToday()\"\r\n ></button>\r\n <button\r\n *ngIf=\"showDate\"\r\n fd-button\r\n fd-toolbar-item\r\n [fdType]=\"'transparent'\"\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"onPrevTap()\"\r\n ></button>\r\n <button\r\n *ngIf=\"showDate\"\r\n fd-button\r\n fd-toolbar-item\r\n [fdType]=\"'transparent'\"\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"onNextTap()\"\r\n ></button>\r\n <div class=\"month-years-wrapper\" *ngIf=\"showDate\" fd-title fd-toolbar-item>\r\n <button\r\n *ngIf=\"selectionMode === 'day' || selectionMode === 'month'\"\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.monthName\"\r\n (click)=\"selectionMode = 'month'\"\r\n ></button>\r\n <button\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.year\"\r\n (click)=\"selectionMode = 'year'\"\r\n ></button>\r\n </div>\r\n </fd-toolbar>\r\n <div style=\"display: flex\">\r\n <ng-container [ngSwitch]=\"selectionMode\">\r\n <ng-container *ngSwitchCase=\"'month'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 33%\"\r\n *ngFor=\"let month of months; let i = index\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.monthName === month ? 'emphasized' : 'transparent'\"\r\n [label]=\"month\"\r\n (click)=\"selectionMode = 'day'; onMonthSelected(month, i)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'year'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 25%\"\r\n *ngFor=\"let year of years\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.year === +year ? 'emphasized' : 'transparent'\"\r\n [label]=\"year\"\r\n (click)=\"selectionMode = 'day'; onYearSelected(year)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <div *ngSwitchDefault style=\"display: flex\">\r\n <bc-calendar-month\r\n *ngIf=\"showDate\"\r\n [style.width]=\"width\"\r\n [containerHeight]=\"height\"\r\n [containerWidth]=\"width\"\r\n [rtl]=\"rtl\"\r\n [monthWeeksCount]=\"selectedMonth.weeksCount\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [datePicker]=\"true\"\r\n [dateRange]=\"true\"\r\n [selectedDate]=\"startSelectedDay ? startSelectedDay.date : value\"\r\n [days]=\"selectedMonth.days\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event, popover, dialog)\"\r\n ></bc-calendar-month>\r\n <div class=\"seperator\"></div>\r\n <fd-time\r\n style=\"direction: ltr\"\r\n fdCompact\r\n *ngIf=\"showTime\"\r\n [keepTwoDigits]=\"true\"\r\n [(ngModel)]=\"timeValue\"\r\n [displaySeconds]=\"false\"\r\n ></fd-time>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}fd-popover{display:block}fd-input-group ::ng-deep input{direction:ltr}fd-time ::ng-deep .fd-time{padding-top:0}.seperator{border-left:.0625rem solid var(--sapPageFooter_BorderColor, #d9d9d9)}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }, { kind: "component", type: i3$1.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i3$1.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "component", type: i3$1.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i8.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "component", type: i9.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i9.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i9.DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: i6$1.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "directive", type: i6$1.PopoverBodyFooterDirective, selector: "[fdPopoverBodyFooter], [fd-popover-body-footer]" }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i11.TimeComponent, selector: "fd-time", inputs: ["meridian", "validate", "keepTwoDigits", "disabled", "displaySeconds", "displayMinutes", "displayHours", "tablet", "elementsAtOnce", "time", "spinnerButtons"] }, { kind: "component", type: i7.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i7.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: CalendarMonthComponent, selector: "bc-calendar-month", inputs: ["monthWeeksCount", "weekDays", "weekDaysMin", "today", "containerHeight", "days", "calendarFields", "rtl", "deviceSize", "moDataList", "datePicker", "rangePicker", "canDelete", "canAdd", "canEdit", "selectedDate", "startSelectedDayIndex", "endSelectedDayIndex"], outputs: ["editEvent", "deleteEvent", "daySelect", "dayClick", "dayMouseMove", "dayMouseUp", "dayMouseDown", "showEvent"] }, { kind: "component", type: CalendarSelectionDaysComponent, selector: "bc-calendar-selection-days", inputs: ["startSelectedDayIndex", "endSelectedDayIndex", "monthInfo", "inline"], outputs: ["rangeChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: DateTimePickerComponent, decorators: [{
|
|
1872
|
-
type: Component,
|
|
1873
|
-
args: [{ selector: 'bc-date-time-picker', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1874
|
-
{
|
|
1875
|
-
provide: DatetimeAdapter,
|
|
1876
|
-
useClass: FdDatetimeAdapter
|
|
1877
|
-
},
|
|
1878
|
-
{
|
|
1879
|
-
provide: TimeI18n,
|
|
1880
|
-
useClass: TimeConfigI18n
|
|
1881
|
-
},
|
|
1882
|
-
{
|
|
1883
|
-
provide: DateService,
|
|
1884
|
-
useFactory: getDateService
|
|
1885
|
-
},
|
|
1886
|
-
CalendarService
|
|
1887
|
-
], template: "<ng-container *ngIf=\"inlineMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n daterangeMode ? dateRangeTpl : month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #dateRangeTpl>\r\n <bc-calendar-selection-days\r\n fd-toolbar-item\r\n [inline]=\"true\"\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n</ng-template>\r\n<fd-input-group\r\n placement=\"after\"\r\n glyph=\"calendar\"\r\n glyphAriaLabel=\"select day\"\r\n ariaLabelledBy=\"fd-input-group-icon-label-2\"\r\n [placeholder]=\"placeholder\"\r\n [value]=\"value\"\r\n [button]=\"true\"\r\n [state]=\"isValid ? 'success' : 'error'\"\r\n [showFocus]=\"true\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [style.display]=\"!buttonMenuMode || inlineMode ? 'inherit' : 'none'\"\r\n (addOnButtonClicked)=\"onOpenPopover(popover, dialogTemplate)\"\r\n>\r\n</fd-input-group>\r\n<button\r\n *ngIf=\"buttonMenuMode\"\r\n fd-button\r\n [label]=\"tempFormmatedDate || placeholder\"\r\n [title]=\"placeholder\"\r\n [fdType]=\"value ? 'standard' : 'transparent'\"\r\n [fdMenu]=\"true\"\r\n (click)=\"onOpenPopover(popover, dialogTemplate)\"\r\n [class.placeholder-custom]=\"!value\"\r\n class=\"menu-button-datepicker\"\r\n></button>\r\n\r\n<fd-popover #popover (isOpenChange)=\"onPopoverOpenChange($event)\" [focusTrapped]=\"true\" [focusAutoCapture]=\"true\">\r\n <fd-popover-body [style.width.px]=\"width$ | async\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n <div fd-popover-body-footer>\r\n <div fd-bar [barDesign]=\"'footer'\">\r\n <div fd-bar-right>\r\n <container *ngTemplateOutlet=\"footerButtons\"></container>\r\n </div>\r\n </div>\r\n </div>\r\n </fd-popover-body>\r\n</fd-popover>\r\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\r\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\r\n <fd-dialog-body>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n month;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n width: width$ | async,\r\n height: height,\r\n rtl: rtl$ | async,\r\n weekDays: weekDays,\r\n weekDaysMin: weekDaysMin,\r\n today: today,\r\n deviceSize: deviceSize,\r\n popover: popover,\r\n dialog: dialog\r\n }\r\n \"\r\n >\r\n </ng-container>\r\n </fd-dialog-body>\r\n <fd-dialog-footer>\r\n <container *ngTemplateOutlet=\"footerButtons; context: { dialog: dialog }\"></container>\r\n </fd-dialog-footer>\r\n </fd-dialog>\r\n</ng-template>\r\n<ng-template #footerButtons let-dialog=\"dialog\">\r\n <fd-button-bar [label]=\"'Ok' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onOk(popover, dialog)\"></fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Clear' | bbbTranslate\"\r\n fdType=\"standard\"\r\n (click)=\"onClear(popover, dialog)\"\r\n ></fd-button-bar>\r\n <fd-button-bar [label]=\"'Cancel' | bbbTranslate\" (click)=\"onCancel(popover, dialog)\"></fd-button-bar>\r\n</ng-template>\r\n<ng-template\r\n #month\r\n let-selectedMonth\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-popover=\"popover\"\r\n let-dialog=\"dialog\"\r\n>\r\n <fd-toolbar [fdType]=\"'transparent'\" *ngIf=\"showDate\">\r\n <button\r\n fd-button\r\n fd-toolbar-item\r\n [label]=\"(showDate ? 'DateR_Today' : 'Now') | bbbTranslate\"\r\n (click)=\"onToday()\"\r\n ></button>\r\n <button\r\n *ngIf=\"showDate\"\r\n fd-button\r\n fd-toolbar-item\r\n [fdType]=\"'transparent'\"\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"onPrevTap()\"\r\n ></button>\r\n <button\r\n *ngIf=\"showDate\"\r\n fd-button\r\n fd-toolbar-item\r\n [fdType]=\"'transparent'\"\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"onNextTap()\"\r\n ></button>\r\n <div class=\"month-years-wrapper\" *ngIf=\"showDate\" fd-title fd-toolbar-item>\r\n <button\r\n *ngIf=\"selectionMode === 'day' || selectionMode === 'month'\"\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.monthName\"\r\n (click)=\"selectionMode = 'month'\"\r\n ></button>\r\n <button\r\n fd-button\r\n [fdType]=\"'transparent'\"\r\n [label]=\"selectedMonth.dateInfo.year\"\r\n (click)=\"selectionMode = 'year'\"\r\n ></button>\r\n </div>\r\n </fd-toolbar>\r\n <div style=\"display: flex\">\r\n <ng-container [ngSwitch]=\"selectionMode\">\r\n <ng-container *ngSwitchCase=\"'month'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 33%\"\r\n *ngFor=\"let month of months; let i = index\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.monthName === month ? 'emphasized' : 'transparent'\"\r\n [label]=\"month\"\r\n (click)=\"selectionMode = 'day'; onMonthSelected(month, i)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'year'\">\r\n <div class=\"month-year-selection-wrapper\">\r\n <button\r\n style=\"flex-grow: 1; width: 25%\"\r\n *ngFor=\"let year of years\"\r\n fd-button\r\n [fdType]=\"selectedMonth.dateInfo.year === +year ? 'emphasized' : 'transparent'\"\r\n [label]=\"year\"\r\n (click)=\"selectionMode = 'day'; onYearSelected(year)\"\r\n ></button>\r\n </div>\r\n </ng-container>\r\n <div *ngSwitchDefault style=\"display: flex\">\r\n <bc-calendar-month\r\n *ngIf=\"showDate\"\r\n [style.width]=\"width\"\r\n [containerHeight]=\"height\"\r\n [containerWidth]=\"width\"\r\n [rtl]=\"rtl\"\r\n [monthWeeksCount]=\"selectedMonth.weeksCount\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [datePicker]=\"true\"\r\n [dateRange]=\"true\"\r\n [selectedDate]=\"startSelectedDay ? startSelectedDay.date : value\"\r\n [days]=\"selectedMonth.days\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event, popover, dialog)\"\r\n ></bc-calendar-month>\r\n <div class=\"seperator\"></div>\r\n <fd-time\r\n style=\"direction: ltr\"\r\n fdCompact\r\n *ngIf=\"showTime\"\r\n [keepTwoDigits]=\"true\"\r\n [(ngModel)]=\"timeValue\"\r\n [displaySeconds]=\"false\"\r\n ></fd-time>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}fd-popover{display:block}fd-input-group ::ng-deep input{direction:ltr}fd-time ::ng-deep .fd-time{padding-top:0}.seperator{border-left:.0625rem solid var(--sapPageFooter_BorderColor, #d9d9d9)}\n"] }]
|
|
1888
|
-
}], ctorParameters: function () { return [{ type: i2$2.DatetimeAdapter }, { type: i2.DateTimeToCaptionPipe }, { type: i2.LogService }, { type: i2$2.DialogService }, { type: i2.PortalService }]; }, propDecorators: { placeholder: [{
|
|
1889
|
-
type: Input
|
|
1890
|
-
}], primaryCalendarType: [{
|
|
1891
|
-
type: Input
|
|
1892
|
-
}], formatPattern: [{
|
|
1893
|
-
type: Input
|
|
1894
|
-
}], value: [{
|
|
1895
|
-
type: Input
|
|
1896
|
-
}], timeValue: [{
|
|
1897
|
-
type: Input
|
|
1898
|
-
}], startRangeDate: [{
|
|
1899
|
-
type: Input
|
|
1900
|
-
}], endRangeDate: [{
|
|
1901
|
-
type: Input
|
|
1902
|
-
}], isRangePicker: [{
|
|
1903
|
-
type: Input
|
|
1904
|
-
}], showTime: [{
|
|
1905
|
-
type: Input
|
|
1906
|
-
}], showDate: [{
|
|
1907
|
-
type: Input
|
|
1908
|
-
}], rtl: [{
|
|
1909
|
-
type: Input
|
|
1910
|
-
}], deviceSize: [{
|
|
1911
|
-
type: Input
|
|
1912
|
-
}], isMobile: [{
|
|
1913
|
-
type: Input
|
|
1914
|
-
}], readonly: [{
|
|
1915
|
-
type: Input
|
|
1916
|
-
}], disabled: [{
|
|
1917
|
-
type: Input
|
|
1918
|
-
}], buttonMenuMode: [{
|
|
1919
|
-
type: Input
|
|
1920
|
-
}], inlineMode: [{
|
|
1921
|
-
type: Input
|
|
1922
|
-
}], daterangeMode: [{
|
|
1923
|
-
type: Input
|
|
1924
|
-
}], rangeChange: [{
|
|
1925
|
-
type: Output
|
|
1926
|
-
}], valueChange: [{
|
|
1927
|
-
type: Output
|
|
1928
|
-
}], timeComponent: [{
|
|
1929
|
-
type: ViewChild,
|
|
1930
|
-
args: [TimeComponent]
|
|
1931
|
-
}], inputGroupComponent: [{
|
|
1932
|
-
type: ViewChild,
|
|
1933
|
-
args: [InputGroupComponent, { static: true }]
|
|
1934
|
-
}] } });
|
|
1935
|
-
|
|
1936
|
-
class MonthDaysComponent extends BaseComponent {
|
|
1937
|
-
constructor(daysInWeek, _cdr, _calendarService) {
|
|
1938
|
-
super();
|
|
1939
|
-
this.daysInWeek = daysInWeek;
|
|
1940
|
-
this._cdr = _cdr;
|
|
1941
|
-
this._calendarService = _calendarService;
|
|
1942
|
-
this.datePicker = false;
|
|
1943
|
-
this.rangePicker = false;
|
|
1944
|
-
this.editEvent = new EventEmitter();
|
|
1945
|
-
this.deleteEvent = new EventEmitter();
|
|
1946
|
-
this.daySelect = new EventEmitter();
|
|
1947
|
-
this.dayClick = new EventEmitter();
|
|
1948
|
-
this.dayMouseMove = new EventEmitter();
|
|
1949
|
-
this.dayMouseUp = new EventEmitter();
|
|
1950
|
-
this.dayMouseDown = new EventEmitter();
|
|
1951
|
-
this.showEvent = new EventEmitter();
|
|
1952
|
-
this.taskHeight = 30;
|
|
1953
|
-
this._hasPopoverOpened = [];
|
|
1954
|
-
}
|
|
1955
|
-
ngOnChanges(changes) {
|
|
1956
|
-
super.ngOnChanges(changes);
|
|
1957
|
-
if (changes.containerHeight && !changes.containerHeight.firstChange) {
|
|
1958
|
-
this.fitToContainer(changes.containerHeight.currentValue);
|
|
1959
|
-
}
|
|
1960
|
-
if (changes.deviceSize && !changes.deviceSize.firstChange) {
|
|
1961
|
-
this.prepareWeekDays(changes.deviceSize.currentValue);
|
|
1962
|
-
}
|
|
1963
|
-
if (changes.moDataList && !changes.moDataList.firstChange) {
|
|
1964
|
-
this._prepareDaysTasks(changes.moDataList.currentValue);
|
|
1965
|
-
this._cdr.detectChanges();
|
|
1966
|
-
}
|
|
1967
|
-
if (changes.monthInfo && !changes.monthInfo.firstChange) {
|
|
1968
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1969
|
-
this._cdr.detectChanges();
|
|
1970
|
-
}
|
|
1971
|
-
if (changes.monthWeeksCount && !changes.monthWeeksCount.firstChange) {
|
|
1972
|
-
this.fitToContainer(this.containerHeight);
|
|
1973
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1974
|
-
this._cdr.detectChanges();
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
ngOnInit() {
|
|
1978
|
-
super.ngOnInit();
|
|
1979
|
-
this.isPickerMode = this.datePicker || this.rangePicker;
|
|
1980
|
-
this.prepareWeekDays(this.deviceSize);
|
|
1981
|
-
this._prepareDaysTasks(this.moDataList);
|
|
1982
|
-
this.fitToContainer(this.containerHeight);
|
|
1983
|
-
}
|
|
1984
|
-
onDayBoxSelect(day) {
|
|
1985
|
-
this._fireDaySelect(day);
|
|
1986
|
-
}
|
|
1987
|
-
onDaySelect(weekIndex, dayIndex) {
|
|
1988
|
-
const day = this.days[weekIndex * 7 + dayIndex];
|
|
1989
|
-
this._fireDaySelect(day);
|
|
1990
|
-
}
|
|
1991
|
-
onOpenPopoverChange(isOpen) {
|
|
1992
|
-
this._openPopover(isOpen);
|
|
1993
|
-
}
|
|
1994
|
-
onMoreButton(e, popover) {
|
|
1995
|
-
this._preventEvent(e);
|
|
1996
|
-
popover.open();
|
|
1997
|
-
}
|
|
1998
|
-
onTask(e, task) {
|
|
1999
|
-
this.showEvent.emit(task);
|
|
2000
|
-
}
|
|
2001
|
-
onDayClick(day) {
|
|
2002
|
-
this.selected = day;
|
|
2003
|
-
this.dayClick.emit(day);
|
|
2004
|
-
}
|
|
2005
|
-
onDayMouseMove(day) {
|
|
2006
|
-
this.dayMouseMove.emit(day);
|
|
2007
|
-
}
|
|
2008
|
-
onDayMouseDown(day) {
|
|
2009
|
-
this.dayMouseDown.emit(day);
|
|
2010
|
-
}
|
|
2011
|
-
onDayMouseUp(day) {
|
|
2012
|
-
this.dayMouseUp.emit(day);
|
|
2013
|
-
}
|
|
2014
|
-
_preventEvent(e) {
|
|
2015
|
-
e.stopPropagation();
|
|
2016
|
-
e.preventDefault();
|
|
2017
|
-
}
|
|
2018
|
-
_fireDaySelect(day) {
|
|
2019
|
-
if (this._hasPopoverOpened.length === 0) {
|
|
2020
|
-
this.daySelect.emit({
|
|
2021
|
-
date: moment$1(day.date)
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2024
|
-
}
|
|
2025
|
-
_openPopover(isOpen) {
|
|
2026
|
-
if (isOpen) {
|
|
2027
|
-
this._hasPopoverOpened.push(true);
|
|
2028
|
-
}
|
|
2029
|
-
else {
|
|
2030
|
-
setTimeout(() => {
|
|
2031
|
-
this._hasPopoverOpened = [];
|
|
2032
|
-
}, 0);
|
|
2033
|
-
}
|
|
2034
|
-
}
|
|
2035
|
-
prepareWeekDays(deviceSize) {
|
|
2036
|
-
if (deviceSize !== 's' && deviceSize !== 'm') {
|
|
2037
|
-
this.selectedWeekDays = this.weekDays;
|
|
2038
|
-
}
|
|
2039
|
-
else {
|
|
2040
|
-
this.selectedWeekDays = this.weekDaysMin;
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
fitToContainer(containerHeight) {
|
|
2044
|
-
var _a;
|
|
2045
|
-
let _weeksCount;
|
|
2046
|
-
let _firstWeekIndex;
|
|
2047
|
-
if (((_a = this.monthWeeksCount) === null || _a === void 0 ? void 0 : _a.weeksCount) > 0) {
|
|
2048
|
-
const { weeksCount, firstWeekIndex } = this.monthWeeksCount;
|
|
2049
|
-
_weeksCount = weeksCount;
|
|
2050
|
-
_firstWeekIndex = firstWeekIndex;
|
|
2051
|
-
}
|
|
2052
|
-
else {
|
|
2053
|
-
_weeksCount = this.days.length / 7;
|
|
2054
|
-
_firstWeekIndex = 0;
|
|
2055
|
-
}
|
|
2056
|
-
this.numberOfWeek = Array.from(Array(_weeksCount).keys());
|
|
2057
|
-
this.numberOfWeek = this.numberOfWeek.map((value) => value + _firstWeekIndex);
|
|
2058
|
-
if (this.isPickerMode) {
|
|
2059
|
-
this.dayHeight = 40;
|
|
2060
|
-
return;
|
|
2061
|
-
}
|
|
2062
|
-
this.dayHeight = Math.floor(containerHeight / _weeksCount) + 1;
|
|
2063
|
-
this.maxTaskCount = Math.floor((this.dayHeight - this.taskHeight) / this.taskHeight);
|
|
2064
|
-
this.maxRowTasks = new Array(this.maxTaskCount).fill(0).map((x, i) => i);
|
|
2065
|
-
}
|
|
2066
|
-
_prepareDaysTasks(calendarTasks) {
|
|
2067
|
-
if (this.isPickerMode) {
|
|
2068
|
-
this.weekTasksArray = {};
|
|
2069
|
-
return;
|
|
2070
|
-
}
|
|
2071
|
-
const calendarFields = this.calendarFields;
|
|
2072
|
-
// Sort all Tasks
|
|
2073
|
-
const moDataList = this._calendarService.sortTasks(calendarTasks, calendarFields);
|
|
2074
|
-
this.days.forEach((day) => (day.tasks = []));
|
|
2075
|
-
const weekTasksArray = [];
|
|
2076
|
-
for (let j = 0; j < this.days.length / 7; j++) {
|
|
2077
|
-
const days = this.daysInWeek.transform(this.days, j);
|
|
2078
|
-
const week = this._calendarService.createWeekTask(days, moDataList, calendarFields, 0);
|
|
2079
|
-
weekTasksArray.push(week);
|
|
2080
|
-
}
|
|
2081
|
-
weekTasksArray.forEach((week) => {
|
|
2082
|
-
const arr = Object.values(week);
|
|
2083
|
-
for (let i = arr.length; i < this.maxTaskCount; i++) {
|
|
2084
|
-
week[i.toString()] = [];
|
|
2085
|
-
}
|
|
2086
|
-
});
|
|
2087
|
-
// به ازای هر ردیف تسک باید تعداد 7 ستون اضافه گردد و برای ستونی که تسکی ندارد یک جای خالی colspan 1 میگذاریم
|
|
2088
|
-
weekTasksArray.forEach((week) => {
|
|
2089
|
-
this._calendarService.fillWeek(week);
|
|
2090
|
-
});
|
|
2091
|
-
this.weekTasksArray = weekTasksArray;
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
MonthDaysComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MonthDaysComponent, deps: [{ token: DaysInWeekPipe }, { token: i0.ChangeDetectorRef }, { token: CalendarService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2095
|
-
MonthDaysComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MonthDaysComponent, selector: "bc-month-days", inputs: { monthWeeksCount: "monthWeeksCount", weekDays: "weekDays", weekDaysMin: "weekDaysMin", today: "today", containerHeight: "containerHeight", days: "days", calendarFields: "calendarFields", rtl: "rtl", deviceSize: "deviceSize", moDataList: "moDataList", datePicker: "datePicker", rangePicker: "rangePicker", startSelectedDayIndex: "startSelectedDayIndex", endSelectedDayIndex: "endSelectedDayIndex" }, outputs: { editEvent: "editEvent", deleteEvent: "deleteEvent", daySelect: "daySelect", dayClick: "dayClick", dayMouseMove: "dayMouseMove", dayMouseUp: "dayMouseUp", dayMouseDown: "dayMouseDown", showEvent: "showEvent" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<table fd-table class=\"table-header\" [compact]=\"true\">\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th\r\n class=\"weekday-header\"\r\n *ngFor=\"let weekDay of selectedWeekDays\"\r\n fd-table-cell\r\n [class.noborder]=\"isPickerMode\"\r\n >\r\n {{ weekDay }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody fd-table-body>\r\n <ng-container *ngFor=\"let weekDay of numberOfWeek\">\r\n <tr fd-table-row>\r\n <td\r\n [style.height.px]=\"dayHeight\"\r\n fd-table-cell\r\n colspan=\"7\"\r\n [style.border]=\"isPickerMode ? 'none' : null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderTasks;\r\n context: {\r\n $implicit: isPickerMode ? null : moDataList[weekDay],\r\n weekIndex: weekDay,\r\n days: days | daysInWeek: weekDay,\r\n maxRowTasks: maxRowTasks,\r\n weekDays: weekDays,\r\n calendarFields: calendarFields,\r\n rtl: rtl,\r\n isPickerMode: isPickerMode\r\n }\r\n \"\r\n ></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n</table>\r\n<ng-template\r\n #renderTasks\r\n let-task\r\n let-weekIndex=\"weekIndex\"\r\n let-weekDays=\"weekDays\"\r\n let-days=\"days\"\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-calendarFields=\"calendarFields\"\r\n let-deviceSize=\"deviceSize\"\r\n let-rtl=\"rtl\"\r\n let-isPickerMode=\"isPickerMode\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody>\r\n <tr fd-table-row class=\"row-day-number\">\r\n <td fd-table-cell *ngFor=\"let day of days | daysInWeek: weekIndex\" [class.noborder]=\"isPickerMode\">\r\n <bc-day-number-box\r\n [class.fd-calendar__item]=\"isPickerMode\"\r\n [class.fd-calendar__item--other-month]=\"isPickerMode && !day.isInMonth\"\r\n [class.fd-calendar__item--weekend]=\"isPickerMode && day.isWeekend\"\r\n [isPickerMode]=\"isPickerMode\"\r\n [day]=\"day\"\r\n [class.is-active]=\"day.index === startSelectedDayIndex || day.index === endSelectedDayIndex\"\r\n [class.fd-calendar__item--range]=\"\r\n startSelectedDayIndex &&\r\n endSelectedDayIndex &&\r\n day.index > startSelectedDayIndex &&\r\n day.index < endSelectedDayIndex\r\n \"\r\n (dayClick)=\"onDayClick(day)\"\r\n (dayMouseMove)=\"onDayMouseMove(day)\"\r\n (dayMouseDown)=\"onDayMouseDown(day)\"\r\n (dayMouseUp)=\"onDayMouseUp(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"!isPickerMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray[weekIndex],\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: weekIndex,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n weekDays: weekDays\r\n }\r\n \"\r\n ></ng-container>\r\n <tr fd-table-row>\r\n <td fd-table-cell *ngFor=\"let day of days\" class=\"more-fd\" (click)=\"onDayBoxSelect(day)\">\r\n <ng-container *ngIf=\"maxRowTasks.length < day.tasks.length\">\r\n <button\r\n fd-button\r\n (click)=\"onMoreButton($event, popover)\"\r\n [fdType]=\"'transparent'\"\r\n [compact]=\"true\"\r\n >\r\n {{ day.tasks?.length - maxRowTasks.length }}\r\n {{ 'More' | bbbTranslate }}\r\n </button>\r\n <fd-popover\r\n #popover\r\n [mobile]=\"deviceSize === 's'\"\r\n placement=\"bottom\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n (isOpenChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <bc-day-event-list\r\n [day]=\"day\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [weekDays]=\"weekDays\"\r\n [rtl]=\"rtl\"\r\n [popover]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-day-event-list>\r\n </fd-popover>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</ng-template>\r\n\r\n<ng-template\r\n #renderDayTasks\r\n let-weekTasks\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-weekIndex=\"weekIndex\"\r\n let-deviceSize=\"deviceSize\"\r\n let-calendarFields=\"calendarFields\"\r\n let-weekDays=\"weekDays\"\r\n>\r\n <tr fd-table-row *ngFor=\"let rowTask of maxRowTasks; let i = index\">\r\n <ng-container *ngIf=\"!weekTasks[i] || weekTasks[i].length === 0\">\r\n <td fd-table-cell *ngFor=\"let day of weekDays\"></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td fd-table-cell [attr.colspan]=\"task.colSpan\" *ngIf=\"task.colSpan\">\r\n <ng-container *ngIf=\"task.event; else newDaySelect\">\r\n <bc-event-button\r\n [task]=\"task\"\r\n [rtl]=\"rtl\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n ></bc-event-button>\r\n </ng-container>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" (click)=\"onDaySelect(weekIndex, dayIndex)\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n", styles: [":host{display:block}table{table-layout:fixed}.table-header td{padding:0!important}.table-content{width:100%;height:100%;border:none;border-spacing:0}.table-content td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:1.425rem}.table-content .row-day-number td:first-child{border-right:none}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}.weekday-header,.row-day-number td{width:100%}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.more-fd{text-align:center!important}.more-fd button{font-size:12px}.fd-calendar__item{font-size:.875rem;font-size:var(--sapFontSize, .875rem);line-height:1.4;line-height:var(--sapContent_LineHeight, 1.4);color:#32363a;color:var(--sapTextColor, #32363a);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily, \"72\", \"72full\", Arial, Helvetica, sans-serif);font-weight:400;box-sizing:border-box;padding:0;border:0;overflow:hidden;position:relative;height:2.75rem;margin:.0625rem;min-width:2.125rem;border-radius:.25rem;border-radius:var(--sapElement_BorderCornerRadius, .25rem);background-color:#fafafa;background-color:var(--sapLegend_WorkingBackground, #fafafa);flex:1 1 .375rem;border:none!important;padding:1px!important}.fd-calendar__item.fd-calendar__item--other-month{background-color:var(--sapList_Background, #fff)}.fd-calendar__item.fd-calendar__item--weekend{background-color:var(--sapLegend_NotWorkingBackground, #dedede)}.fd-calendar__item.is-active{background-color:var(--sapContent_Selected_Background, #0854a0);border:var(--fdCalendar_Active_Item_Border, none)}.fd-calendar__item.is-active ::ng-deep span{color:var(--sapContent_Selected_TextColor, #fff)}.fd-calendar__item.fd-calendar__item--range{border:.0625rem solid var(--sapList_SelectionBorderColor, #0854a0);background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: i4.DeprecatedButtonContentDensityDirective, selector: "[fd-button][compact]" }, { kind: "component", type: i6$1.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i7$1.TableComponent, selector: "table[fd-table]", inputs: ["noBorderX", "noBorderY", "popIn", "responsive", "keys", "allCellsFocusable"], exportAs: ["fd-table"] }, { kind: "directive", type: i7$1.TableHeaderDirective, selector: "[fdTableHeader], [fd-table-header]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i7$1.TableBodyDirective, selector: "[fdTableBody], [fd-table-body]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i7$1.TableRowDirective, selector: "[fdTableRow], [fd-table-row]", inputs: ["activable", "highlightActive", "hoverable", "focusable", "main", "secondary", "active"] }, { kind: "directive", type: i7$1.TableCellDirective, selector: "[fdTableCell], [fd-table-cell]", inputs: ["noBorderX", "noBorderY", "activable", "focusable", "tabindex", "hoverable", "fitContent", "noPadding", "noData", "key", "cellFocusedEventAnnouncer"] }, { kind: "directive", type: i7$1.DeprecatedTableCompactDirective, selector: "table[fd-table][compact]" }, { kind: "component", type: DayNumberBoxComponent, selector: "bc-day-number-box", inputs: ["isWeekMode", "isSingleDay", "day", "isPickerMode", "itemInRange", "isActive"], outputs: ["dayClick", "dayMouseDown", "dayMouseUp", "dayMouseMove"] }, { kind: "component", type: EventButtonComponent, selector: "bc-event-button", inputs: ["buttonTemplate", "calendarFields", "task", "rtl", "canDelete", "canEdit", "index", "deviceSize"], outputs: ["deleteEvent", "editEvent", "openPopoverChange"] }, { kind: "component", type: DayEventListComponent, selector: "bc-day-event-list", inputs: ["day", "deviceSize", "weekDays", "calendarFields", "rtl", "canDelete", "canEdit", "popover"], outputs: ["deleteEvent", "editEvent", "openPopOver"] }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }, { kind: "pipe", type: DaysInWeekPipe, name: "daysInWeek" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MonthDaysComponent, decorators: [{
|
|
2097
|
-
type: Component,
|
|
2098
|
-
args: [{ selector: 'bc-month-days', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table fd-table class=\"table-header\" [compact]=\"true\">\r\n <thead fd-table-header>\r\n <tr fd-table-row>\r\n <th\r\n class=\"weekday-header\"\r\n *ngFor=\"let weekDay of selectedWeekDays\"\r\n fd-table-cell\r\n [class.noborder]=\"isPickerMode\"\r\n >\r\n {{ weekDay }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody fd-table-body>\r\n <ng-container *ngFor=\"let weekDay of numberOfWeek\">\r\n <tr fd-table-row>\r\n <td\r\n [style.height.px]=\"dayHeight\"\r\n fd-table-cell\r\n colspan=\"7\"\r\n [style.border]=\"isPickerMode ? 'none' : null\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderTasks;\r\n context: {\r\n $implicit: isPickerMode ? null : moDataList[weekDay],\r\n weekIndex: weekDay,\r\n days: days | daysInWeek: weekDay,\r\n maxRowTasks: maxRowTasks,\r\n weekDays: weekDays,\r\n calendarFields: calendarFields,\r\n rtl: rtl,\r\n isPickerMode: isPickerMode\r\n }\r\n \"\r\n ></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n</table>\r\n<ng-template\r\n #renderTasks\r\n let-task\r\n let-weekIndex=\"weekIndex\"\r\n let-weekDays=\"weekDays\"\r\n let-days=\"days\"\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-calendarFields=\"calendarFields\"\r\n let-deviceSize=\"deviceSize\"\r\n let-rtl=\"rtl\"\r\n let-isPickerMode=\"isPickerMode\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody>\r\n <tr fd-table-row class=\"row-day-number\">\r\n <td fd-table-cell *ngFor=\"let day of days | daysInWeek: weekIndex\" [class.noborder]=\"isPickerMode\">\r\n <bc-day-number-box\r\n [class.fd-calendar__item]=\"isPickerMode\"\r\n [class.fd-calendar__item--other-month]=\"isPickerMode && !day.isInMonth\"\r\n [class.fd-calendar__item--weekend]=\"isPickerMode && day.isWeekend\"\r\n [isPickerMode]=\"isPickerMode\"\r\n [day]=\"day\"\r\n [class.is-active]=\"day.index === startSelectedDayIndex || day.index === endSelectedDayIndex\"\r\n [class.fd-calendar__item--range]=\"\r\n startSelectedDayIndex &&\r\n endSelectedDayIndex &&\r\n day.index > startSelectedDayIndex &&\r\n day.index < endSelectedDayIndex\r\n \"\r\n (dayClick)=\"onDayClick(day)\"\r\n (dayMouseMove)=\"onDayMouseMove(day)\"\r\n (dayMouseDown)=\"onDayMouseDown(day)\"\r\n (dayMouseUp)=\"onDayMouseUp(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container *ngIf=\"!isPickerMode\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray[weekIndex],\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: weekIndex,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n weekDays: weekDays\r\n }\r\n \"\r\n ></ng-container>\r\n <tr fd-table-row>\r\n <td fd-table-cell *ngFor=\"let day of days\" class=\"more-fd\" (click)=\"onDayBoxSelect(day)\">\r\n <ng-container *ngIf=\"maxRowTasks.length < day.tasks.length\">\r\n <button\r\n fd-button\r\n (click)=\"onMoreButton($event, popover)\"\r\n [fdType]=\"'transparent'\"\r\n [compact]=\"true\"\r\n >\r\n {{ day.tasks?.length - maxRowTasks.length }}\r\n {{ 'More' | bbbTranslate }}\r\n </button>\r\n <fd-popover\r\n #popover\r\n [mobile]=\"deviceSize === 's'\"\r\n placement=\"bottom\"\r\n [focusTrapped]=\"true\"\r\n [focusAutoCapture]=\"true\"\r\n (isOpenChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <bc-day-event-list\r\n [day]=\"day\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n [weekDays]=\"weekDays\"\r\n [rtl]=\"rtl\"\r\n [popover]=\"popover\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-day-event-list>\r\n </fd-popover>\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n</ng-template>\r\n\r\n<ng-template\r\n #renderDayTasks\r\n let-weekTasks\r\n let-maxRowTasks=\"maxRowTasks\"\r\n let-weekIndex=\"weekIndex\"\r\n let-deviceSize=\"deviceSize\"\r\n let-calendarFields=\"calendarFields\"\r\n let-weekDays=\"weekDays\"\r\n>\r\n <tr fd-table-row *ngFor=\"let rowTask of maxRowTasks; let i = index\">\r\n <ng-container *ngIf=\"!weekTasks[i] || weekTasks[i].length === 0\">\r\n <td fd-table-cell *ngFor=\"let day of weekDays\"></td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td fd-table-cell [attr.colspan]=\"task.colSpan\" *ngIf=\"task.colSpan\">\r\n <ng-container *ngIf=\"task.event; else newDaySelect\">\r\n <bc-event-button\r\n [task]=\"task\"\r\n [rtl]=\"rtl\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n ></bc-event-button>\r\n </ng-container>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" (click)=\"onDaySelect(weekIndex, dayIndex)\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n</ng-template>\r\n", styles: [":host{display:block}table{table-layout:fixed}.table-header td{padding:0!important}.table-content{width:100%;height:100%;border:none;border-spacing:0}.table-content td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:1.425rem}.table-content .row-day-number td:first-child{border-right:none}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}.weekday-header,.row-day-number td{width:100%}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.more-fd{text-align:center!important}.more-fd button{font-size:12px}.fd-calendar__item{font-size:.875rem;font-size:var(--sapFontSize, .875rem);line-height:1.4;line-height:var(--sapContent_LineHeight, 1.4);color:#32363a;color:var(--sapTextColor, #32363a);font-family:\"72\",\"72full\",Arial,Helvetica,sans-serif;font-family:var(--sapFontFamily, \"72\", \"72full\", Arial, Helvetica, sans-serif);font-weight:400;box-sizing:border-box;padding:0;border:0;overflow:hidden;position:relative;height:2.75rem;margin:.0625rem;min-width:2.125rem;border-radius:.25rem;border-radius:var(--sapElement_BorderCornerRadius, .25rem);background-color:#fafafa;background-color:var(--sapLegend_WorkingBackground, #fafafa);flex:1 1 .375rem;border:none!important;padding:1px!important}.fd-calendar__item.fd-calendar__item--other-month{background-color:var(--sapList_Background, #fff)}.fd-calendar__item.fd-calendar__item--weekend{background-color:var(--sapLegend_NotWorkingBackground, #dedede)}.fd-calendar__item.is-active{background-color:var(--sapContent_Selected_Background, #0854a0);border:var(--fdCalendar_Active_Item_Border, none)}.fd-calendar__item.is-active ::ng-deep span{color:var(--sapContent_Selected_TextColor, #fff)}.fd-calendar__item.fd-calendar__item--range{border:.0625rem solid var(--sapList_SelectionBorderColor, #0854a0);background-color:var(--sapList_SelectionBackgroundColor, #e5f0fa)}\n"] }]
|
|
2099
|
-
}], ctorParameters: function () { return [{ type: DaysInWeekPipe }, { type: i0.ChangeDetectorRef }, { type: CalendarService }]; }, propDecorators: { monthWeeksCount: [{
|
|
2100
|
-
type: Input
|
|
2101
|
-
}], weekDays: [{
|
|
2102
|
-
type: Input
|
|
2103
|
-
}], weekDaysMin: [{
|
|
2104
|
-
type: Input
|
|
2105
|
-
}], today: [{
|
|
2106
|
-
type: Input
|
|
2107
|
-
}], containerHeight: [{
|
|
2108
|
-
type: Input
|
|
2109
|
-
}], days: [{
|
|
2110
|
-
type: Input
|
|
2111
|
-
}], calendarFields: [{
|
|
2112
|
-
type: Input
|
|
2113
|
-
}], rtl: [{
|
|
2114
|
-
type: Input
|
|
2115
|
-
}], deviceSize: [{
|
|
2116
|
-
type: Input
|
|
2117
|
-
}], moDataList: [{
|
|
2118
|
-
type: Input
|
|
2119
|
-
}], datePicker: [{
|
|
2120
|
-
type: Input
|
|
2121
|
-
}], rangePicker: [{
|
|
2122
|
-
type: Input
|
|
2123
|
-
}], startSelectedDayIndex: [{
|
|
2124
|
-
type: Input
|
|
2125
|
-
}], endSelectedDayIndex: [{
|
|
2126
|
-
type: Input
|
|
2127
|
-
}], editEvent: [{
|
|
2128
|
-
type: Output
|
|
2129
|
-
}], deleteEvent: [{
|
|
2130
|
-
type: Output
|
|
2131
|
-
}], daySelect: [{
|
|
2132
|
-
type: Output
|
|
2133
|
-
}], dayClick: [{
|
|
2134
|
-
type: Output
|
|
2135
|
-
}], dayMouseMove: [{
|
|
2136
|
-
type: Output
|
|
2137
|
-
}], dayMouseUp: [{
|
|
2138
|
-
type: Output
|
|
2139
|
-
}], dayMouseDown: [{
|
|
2140
|
-
type: Output
|
|
2141
|
-
}], showEvent: [{
|
|
2142
|
-
type: Output
|
|
2143
|
-
}] } });
|
|
2144
|
-
|
|
2145
|
-
class CalendarHeaderComponent extends BaseComponent {
|
|
2146
|
-
constructor() {
|
|
2147
|
-
super(...arguments);
|
|
2148
|
-
this.hideMode = false;
|
|
2149
|
-
this.prevTap = new EventEmitter();
|
|
2150
|
-
this.nextTap = new EventEmitter();
|
|
2151
|
-
this.modeChange = new EventEmitter();
|
|
2152
|
-
this.rangeChange = new EventEmitter();
|
|
2153
|
-
this.today = new EventEmitter();
|
|
2154
|
-
this.monthName = '';
|
|
2155
|
-
}
|
|
2156
|
-
/**
|
|
2157
|
-
*
|
|
2158
|
-
*/
|
|
2159
|
-
onModeChange(menu, mode) {
|
|
2160
|
-
menu.close();
|
|
2161
|
-
this.modeChange.emit(mode);
|
|
2162
|
-
}
|
|
2163
|
-
onRangeChange(range) {
|
|
2164
|
-
this.rangeChange.emit(range);
|
|
2165
|
-
}
|
|
2166
|
-
onPrint() { }
|
|
2167
|
-
}
|
|
2168
|
-
CalendarHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2169
|
-
CalendarHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarHeaderComponent, selector: "bc-calendar-header", inputs: { monthInfo: "monthInfo", weekModeDays: "weekModeDays", hideMode: "hideMode", modeTitle: "modeTitle", title: "title", deviceSize: "deviceSize", rtl: "rtl", mode: "mode" }, outputs: { prevTap: "prevTap", nextTap: "nextTap", modeChange: "modeChange", rangeChange: "rangeChange", today: "today" }, usesInheritance: true, ngImport: i0, template: "<fd-toolbar [shouldOverflow]=\"true\" [fdType]=\"'transparent'\" [class.rtl]=\"rtl\">\r\n <button fd-button fd-toolbar-item [label]=\"'DateR_Today' | bbbTranslate\" (click)=\"today.emit()\"></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"prevTap.emit()\"\r\n ></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"nextTap.emit()\"\r\n ></button>\r\n <h3 fd-title fd-toolbar-item>{{ title }}</h3>\r\n <fd-toolbar-spacer></fd-toolbar-spacer>\r\n <!-- <button fd-button fd-toolbar-item glyph=\"print\" (click)=\"onPrint()\" fdType=\"transparent\"></button> -->\r\n <bc-calendar-selection-days\r\n *ngIf=\"deviceSize === 's' || deviceSize === 'm'\"\r\n fd-toolbar-item\r\n [monthInfo]=\"monthInfo\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n\r\n <fd-split-button\r\n *ngIf=\"!hideMode\"\r\n fd-toolbar-item\r\n [fixedWidth]=\"false\"\r\n [mainAction]=\"{\r\n mainActionTitle: modeTitle,\r\n keepMainAction: true\r\n }\"\r\n >\r\n <fd-menu #menu>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'day')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Day' | bbbTranslate }}</span>\r\n </div>\r\n </li>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'week')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Week' | bbbTranslate }} </span>\r\n </div>\r\n </li>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'month')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Month' | bbbTranslate }}</span>\r\n </div>\r\n </li>\r\n <!-- <li fd-menu-item (click)=\"onModeChange('year')\">\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ \"Year\" | bbbTranslate }}</span>\r\n </div>\r\n </li> -->\r\n </fd-menu>\r\n </fd-split-button>\r\n</fd-toolbar>\r\n", styles: [":host{display:block;background-color:var(--sapList_Background, #fff)}:host ::ng-deep span.fd-toolbar__spacer{display:none}:host ::ng-deep fd-toolbar .fd-toolbar{border:none;border-left:1px solid var(--sapList_BorderColor, #e5e5e5)}:host ::ng-deep fd-toolbar.rtl .fd-toolbar{border-left:none;border-right:1px solid var(--sapList_BorderColor, #e5e5e5)}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.BodyClickDirective, selector: "[bodyClick]", inputs: ["disableBodyClick"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4$3.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "component", type: i4$3.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "directive", type: i4$3.MenuInteractiveDirective, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i4$3.MenuTitleDirective, selector: "[fd-menu-title]" }, { kind: "component", type: i5$2.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: i6$3.SplitButtonComponent, selector: "fd-split-button", inputs: ["glyph", "disabled", "mainActionTitle", "fdType", "expandButtonAriaLabel", "expandButtonTitle", "selected", "fixedWidth", "mainAction", "arialLabel"], outputs: ["primaryButtonClicked"] }, { kind: "component", type: i7.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i7.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: i7.ToolbarSpacerComponent, selector: "fd-toolbar-spacer", inputs: ["width", "class", "fixed"] }, { kind: "component", type: CalendarSelectionDaysComponent, selector: "bc-calendar-selection-days", inputs: ["startSelectedDayIndex", "endSelectedDayIndex", "monthInfo", "inline"], outputs: ["rangeChange"] }, { kind: "pipe", type: i2.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarHeaderComponent, decorators: [{
|
|
2171
|
-
type: Component,
|
|
2172
|
-
args: [{ selector: 'bc-calendar-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-toolbar [shouldOverflow]=\"true\" [fdType]=\"'transparent'\" [class.rtl]=\"rtl\">\r\n <button fd-button fd-toolbar-item [label]=\"'DateR_Today' | bbbTranslate\" (click)=\"today.emit()\"></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-right-arrow' : 'navigation-left-arrow'\"\r\n (click)=\"prevTap.emit()\"\r\n ></button>\r\n <button\r\n fd-button\r\n fdType=\"transparent\"\r\n fd-toolbar-item\r\n [glyph]=\"rtl ? 'navigation-left-arrow' : 'navigation-right-arrow'\"\r\n (click)=\"nextTap.emit()\"\r\n ></button>\r\n <h3 fd-title fd-toolbar-item>{{ title }}</h3>\r\n <fd-toolbar-spacer></fd-toolbar-spacer>\r\n <!-- <button fd-button fd-toolbar-item glyph=\"print\" (click)=\"onPrint()\" fdType=\"transparent\"></button> -->\r\n <bc-calendar-selection-days\r\n *ngIf=\"deviceSize === 's' || deviceSize === 'm'\"\r\n fd-toolbar-item\r\n [monthInfo]=\"monthInfo\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n\r\n <fd-split-button\r\n *ngIf=\"!hideMode\"\r\n fd-toolbar-item\r\n [fixedWidth]=\"false\"\r\n [mainAction]=\"{\r\n mainActionTitle: modeTitle,\r\n keepMainAction: true\r\n }\"\r\n >\r\n <fd-menu #menu>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'day')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Day' | bbbTranslate }}</span>\r\n </div>\r\n </li>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'week')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Week' | bbbTranslate }} </span>\r\n </div>\r\n </li>\r\n <li fd-menu-item (click)=\"onModeChange(menu, 'month')\" bodyClick>\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ 'Month' | bbbTranslate }}</span>\r\n </div>\r\n </li>\r\n <!-- <li fd-menu-item (click)=\"onModeChange('year')\">\r\n <div fd-menu-interactive>\r\n <span fd-menu-title>{{ \"Year\" | bbbTranslate }}</span>\r\n </div>\r\n </li> -->\r\n </fd-menu>\r\n </fd-split-button>\r\n</fd-toolbar>\r\n", styles: [":host{display:block;background-color:var(--sapList_Background, #fff)}:host ::ng-deep span.fd-toolbar__spacer{display:none}:host ::ng-deep fd-toolbar .fd-toolbar{border:none;border-left:1px solid var(--sapList_BorderColor, #e5e5e5)}:host ::ng-deep fd-toolbar.rtl .fd-toolbar{border-left:none;border-right:1px solid var(--sapList_BorderColor, #e5e5e5)}\n"] }]
|
|
2173
|
-
}], propDecorators: { monthInfo: [{
|
|
2174
|
-
type: Input
|
|
2175
|
-
}], weekModeDays: [{
|
|
2176
|
-
type: Input
|
|
2177
|
-
}], hideMode: [{
|
|
2178
|
-
type: Input
|
|
2179
|
-
}], modeTitle: [{
|
|
2180
|
-
type: Input
|
|
2181
|
-
}], title: [{
|
|
2182
|
-
type: Input
|
|
2183
|
-
}], deviceSize: [{
|
|
2184
|
-
type: Input
|
|
2185
|
-
}], rtl: [{
|
|
2186
|
-
type: Input
|
|
2187
|
-
}], mode: [{
|
|
2188
|
-
type: Input
|
|
2189
|
-
}], prevTap: [{
|
|
2190
|
-
type: Output
|
|
2191
|
-
}], nextTap: [{
|
|
2192
|
-
type: Output
|
|
2193
|
-
}], modeChange: [{
|
|
2194
|
-
type: Output
|
|
2195
|
-
}], rangeChange: [{
|
|
2196
|
-
type: Output
|
|
2197
|
-
}], today: [{
|
|
2198
|
-
type: Output
|
|
2199
|
-
}] } });
|
|
2200
|
-
|
|
2201
|
-
class FromToTimePipe {
|
|
2202
|
-
constructor() { }
|
|
2203
|
-
transform(task) {
|
|
2204
|
-
const event = task.event;
|
|
2205
|
-
const fromDateInfo = event.$StartDateInfo;
|
|
2206
|
-
const toDateInfo = event.$EndDateInfo;
|
|
2207
|
-
const fromTime = `${getPadedTime(fromDateInfo.hour)}:${getPadedTime(fromDateInfo.minutes)}`;
|
|
2208
|
-
const toTime = `${getPadedTime(toDateInfo.hour)}:${getPadedTime(toDateInfo.minutes)}`;
|
|
2209
|
-
return `${fromTime} - ${toTime}`;
|
|
2210
|
-
}
|
|
2211
|
-
}
|
|
2212
|
-
FromToTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FromToTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2213
|
-
FromToTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: FromToTimePipe, name: "fromToTime" });
|
|
2214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FromToTimePipe, decorators: [{
|
|
2215
|
-
type: Pipe,
|
|
2216
|
-
args: [{
|
|
2217
|
-
name: 'fromToTime'
|
|
2218
|
-
}]
|
|
2219
|
-
}], ctorParameters: function () { return []; } });
|
|
2220
|
-
|
|
2221
|
-
class CalendarWeekComponent extends BaseComponent {
|
|
2222
|
-
constructor(_cdr, _calendarService) {
|
|
2223
|
-
super();
|
|
2224
|
-
this._cdr = _cdr;
|
|
2225
|
-
this._calendarService = _calendarService;
|
|
2226
|
-
this.canDelete = false;
|
|
2227
|
-
this.canAdd = false;
|
|
2228
|
-
this.canEdit = false;
|
|
2229
|
-
this.editEvent = new EventEmitter();
|
|
2230
|
-
this.deleteEvent = new EventEmitter();
|
|
2231
|
-
this.showEvent = new EventEmitter();
|
|
2232
|
-
this.rangeSelect = new EventEmitter();
|
|
2233
|
-
this.daySelect = new EventEmitter();
|
|
2234
|
-
this.dayClick = new EventEmitter();
|
|
2235
|
-
this.selectedTaskId = '';
|
|
2236
|
-
this.taskHeight = 30;
|
|
2237
|
-
this.maxTaskCount = 4;
|
|
2238
|
-
this.Math = Math;
|
|
2239
|
-
this._hasPopoverOpened = [];
|
|
2240
|
-
}
|
|
2241
|
-
ngOnChanges(changes) {
|
|
2242
|
-
super.ngOnChanges(changes);
|
|
2243
|
-
if (changes.deviceSize && !changes.deviceSize.firstChange) {
|
|
2244
|
-
this.prepareWeekDays(changes.deviceSize.currentValue);
|
|
2245
|
-
}
|
|
2246
|
-
if (changes.moDataList && !changes.moDataList.firstChange) {
|
|
2247
|
-
this._prepareDaysTasks(changes.moDataList.currentValue);
|
|
2248
|
-
this._cdr.detectChanges();
|
|
2249
|
-
}
|
|
2250
|
-
if (changes.days && !changes.days.firstChange) {
|
|
2251
|
-
this._prepareDaysTasks(this.moDataList);
|
|
2252
|
-
this._cdr.detectChanges();
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
ngOnInit() {
|
|
2256
|
-
super.ngOnInit();
|
|
2257
|
-
this.hours = new Array(24).fill(0).map((x, i) => `${i > 9 ? '' + i : '0' + i}:00`);
|
|
2258
|
-
this.prepareWeekDays(this.deviceSize);
|
|
2259
|
-
this._prepareDaysTasks(this.moDataList);
|
|
2260
|
-
}
|
|
2261
|
-
setSelectedId(id) {
|
|
2262
|
-
this.selectedTaskId = id;
|
|
2263
|
-
this._cdr.detectChanges();
|
|
2264
|
-
}
|
|
2265
|
-
onDayBoxSelect(day) {
|
|
2266
|
-
if (!this.canAdd) {
|
|
2267
|
-
return;
|
|
2268
|
-
}
|
|
2269
|
-
// this._fireDaySelect(day.date);
|
|
2270
|
-
}
|
|
2271
|
-
onOpenPopoverChange(isOpen) {
|
|
2272
|
-
if (isOpen) {
|
|
2273
|
-
this._hasPopoverOpened.push(true);
|
|
2274
|
-
}
|
|
2275
|
-
else {
|
|
2276
|
-
setTimeout(() => {
|
|
2277
|
-
this._hasPopoverOpened = [];
|
|
2278
|
-
}, 0);
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
onColumnClick(e, day) {
|
|
2282
|
-
const { offsetY } = e;
|
|
2283
|
-
const hour = Math.floor(offsetY / 50);
|
|
2284
|
-
const minutes = Math.floor((offsetY % 50) / 15) * 15;
|
|
2285
|
-
const date = new Date(day.date);
|
|
2286
|
-
date.setHours(hour);
|
|
2287
|
-
date.setMinutes(minutes);
|
|
2288
|
-
// this._fireDaySelect(date);
|
|
2289
|
-
}
|
|
2290
|
-
onEventButton(e) {
|
|
2291
|
-
var _a;
|
|
2292
|
-
if (((_a = e.currentTarget) === null || _a === void 0 ? void 0 : _a.localName) === 'bc-event-button') {
|
|
2293
|
-
PreventDefaulEvent(e);
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
onMoreButton(e, popover) {
|
|
2297
|
-
PreventDefaulEvent(e);
|
|
2298
|
-
this._openPopover(popover);
|
|
2299
|
-
}
|
|
2300
|
-
onDayClick(day) {
|
|
2301
|
-
this.selected = day;
|
|
2302
|
-
this.dayClick.emit(day);
|
|
2303
|
-
}
|
|
2304
|
-
mousedown(ev, dayIndex) {
|
|
2305
|
-
this.days.forEach((d) => {
|
|
2306
|
-
d.isAddingNewEvent = false;
|
|
2307
|
-
d.addingEventPoint1 = null;
|
|
2308
|
-
d.addingEventPoint2 = null;
|
|
2309
|
-
});
|
|
2310
|
-
this.days[dayIndex].isAddingNewEvent = true;
|
|
2311
|
-
this.days[dayIndex].addingEventPoint1 = Math.floor(ev.offsetY / 25);
|
|
2312
|
-
this.days[dayIndex].addingEventPoint2 = null;
|
|
2313
|
-
}
|
|
2314
|
-
mousedownForResize(day, dayIndex, taskIndex) {
|
|
2315
|
-
const task = this.days[dayIndex].tasks[taskIndex];
|
|
2316
|
-
this.days[dayIndex].tasks[taskIndex].hidden = true;
|
|
2317
|
-
this.days[dayIndex].isAddingNewEvent = true;
|
|
2318
|
-
this.days[dayIndex].addingEventPoint1 = Math.floor(task.top / 25);
|
|
2319
|
-
this.days[dayIndex].addingEventPoint2 = Math.floor((task.top + task.height) / 25);
|
|
2320
|
-
this._cdr.detectChanges();
|
|
2321
|
-
}
|
|
2322
|
-
mousemove(ev, dayIndex) {
|
|
2323
|
-
if (!this.days[dayIndex].isAddingNewEvent) {
|
|
2324
|
-
return;
|
|
2325
|
-
}
|
|
2326
|
-
if (ev.target.tagName !== 'DIV') {
|
|
2327
|
-
return;
|
|
2328
|
-
}
|
|
2329
|
-
this.days[dayIndex].addingEventPoint2 = Math.floor(ev.offsetY / 25);
|
|
2330
|
-
}
|
|
2331
|
-
mouseup(ev, dayIndex, replacingTaskIndex = null) {
|
|
2332
|
-
var _a;
|
|
2333
|
-
const day = this.days[dayIndex];
|
|
2334
|
-
if (replacingTaskIndex) {
|
|
2335
|
-
this.days[dayIndex].tasks[replacingTaskIndex].hidden = false;
|
|
2336
|
-
}
|
|
2337
|
-
this.days[dayIndex].isAddingNewEvent = true;
|
|
2338
|
-
day.isAddingNewEvent = false;
|
|
2339
|
-
const { addingEventPoint1, addingEventPoint2 } = day;
|
|
2340
|
-
if (addingEventPoint1 !== null && addingEventPoint2 !== null) {
|
|
2341
|
-
const startDateTotalMinutes = Math.min(addingEventPoint1, addingEventPoint2) * 30;
|
|
2342
|
-
const startDateHour = Math.floor(startDateTotalMinutes / 60);
|
|
2343
|
-
const startDateMinutes = Math.floor(startDateTotalMinutes % 60);
|
|
2344
|
-
const startDate = new Date(day.date);
|
|
2345
|
-
startDate.setHours(startDateHour);
|
|
2346
|
-
startDate.setMinutes(startDateMinutes);
|
|
2347
|
-
const endDateTotalMinutes = (Math.max(addingEventPoint1, addingEventPoint2) + 1) * 30;
|
|
2348
|
-
const endDateHour = Math.floor(endDateTotalMinutes / 60);
|
|
2349
|
-
const endDateMinutes = Math.floor(endDateTotalMinutes % 60);
|
|
2350
|
-
const endDate = new Date(day.date);
|
|
2351
|
-
endDate.setHours(endDateHour);
|
|
2352
|
-
endDate.setMinutes(endDateMinutes);
|
|
2353
|
-
this._rangeSelect({ startDate, endDate });
|
|
2354
|
-
(_a = this._sectionRef) === null || _a === void 0 ? void 0 : _a.nativeElement.remove();
|
|
2355
|
-
}
|
|
2356
|
-
}
|
|
2357
|
-
_fireDaySelect(date) {
|
|
2358
|
-
if (this._hasPopoverOpened.length === 0) {
|
|
2359
|
-
this.daySelect.emit(date);
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
_rangeSelect({ startDate, endDate }) {
|
|
2363
|
-
if (this._hasPopoverOpened.length === 0) {
|
|
2364
|
-
this.rangeSelect.emit({ startDate, endDate });
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
_openPopover(popover) {
|
|
2368
|
-
if (popover.isOpen) {
|
|
2369
|
-
this._hasPopoverOpened.push(popover);
|
|
2370
|
-
}
|
|
2371
|
-
else {
|
|
2372
|
-
this._hasPopoverOpened.pop();
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
prepareWeekDays(deviceSize) {
|
|
2376
|
-
if (deviceSize !== 's' && deviceSize !== 'm') {
|
|
2377
|
-
this.selectedWeekDays = this.weekDays;
|
|
2378
|
-
}
|
|
2379
|
-
else {
|
|
2380
|
-
this.selectedWeekDays = this.weekDaysMin;
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
_prepareDaysTasks(calendarTasks) {
|
|
2384
|
-
const calendarFields = this.calendarFields;
|
|
2385
|
-
// Sort all Tasks
|
|
2386
|
-
const moDataList = this._calendarService.sortTasks(calendarTasks, calendarFields);
|
|
2387
|
-
const taskHeight = 50;
|
|
2388
|
-
this.days.forEach((day) => (day.tasks = []));
|
|
2389
|
-
const weekTasksArray = [];
|
|
2390
|
-
const days = this.days;
|
|
2391
|
-
const week = this._calendarService.createWeekTask(days, moDataList, calendarFields, taskHeight);
|
|
2392
|
-
weekTasksArray.push(week);
|
|
2393
|
-
// به ازای هر ردیف تسک باید تعداد 7 ستون اضافه گردد و برای ستونی که تسکی ندارد یک جای خالی colspan 1 میگذاریم
|
|
2394
|
-
weekTasksArray.forEach((weekTask) => {
|
|
2395
|
-
this._calendarService.fillWeek(weekTask, days.length);
|
|
2396
|
-
});
|
|
2397
|
-
const tasks = [];
|
|
2398
|
-
let counter = 0;
|
|
2399
|
-
Object.values(weekTasksArray).forEach(() => {
|
|
2400
|
-
Object.values(week).forEach((element) => {
|
|
2401
|
-
const filtered = element.some((c) => c.colSpan > 1 || (c.colSpan === 1 && !c.inDay && c.event));
|
|
2402
|
-
if (filtered) {
|
|
2403
|
-
tasks[counter.toString()] = element;
|
|
2404
|
-
counter++;
|
|
2405
|
-
}
|
|
2406
|
-
});
|
|
2407
|
-
});
|
|
2408
|
-
this.weekTasksArray = tasks;
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
CalendarWeekComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarWeekComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CalendarService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2412
|
-
CalendarWeekComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarWeekComponent, selector: "bc-calendar-week", inputs: { weekDays: "weekDays", weekDaysMin: "weekDaysMin", today: "today", containerHeight: "containerHeight", calendarFields: "calendarFields", rtl: "rtl", inDialog: "inDialog", deviceSize: "deviceSize", moDataList: "moDataList", days: "days", canDelete: "canDelete", canAdd: "canAdd", canEdit: "canEdit" }, outputs: { editEvent: "editEvent", deleteEvent: "deleteEvent", showEvent: "showEvent", rangeSelect: "rangeSelect", daySelect: "daySelect", dayClick: "dayClick" }, viewQueries: [{ propertyName: "tableTopEl", first: true, predicate: ["tableTop"], descendants: true }, { propertyName: "_sectionRef", first: true, predicate: ["sectionRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n class=\"table-container\"\r\n [style.overflow-y]=\"inDialog ? 'scroll' : 'hidden'\"\r\n style=\"overflow-y: hidden; flex-shrink: 0\"\r\n #tableTop\r\n>\r\n <table fd-table class=\"table-top\" [compact]=\"true\" [attr.daysCount]=\"days.length\">\r\n <tbody fd-table-body>\r\n <tr fd-table-row class=\"week-days\">\r\n <td class=\"td-time\"></td>\r\n <td [attr.rtl]=\"rtl\" class=\"weekday-header\" *ngFor=\"let day of days\" fd-table-cell style=\"width: 100%\">\r\n {{ day.dayName }}\r\n </td>\r\n </tr>\r\n <tr fd-table-row class=\"week-numbers\">\r\n <td class=\"td-time\"></td>\r\n <td fd-table-cell *ngFor=\"let day of days\" [attr.rtl]=\"rtl\">\r\n <bc-day-number-box\r\n [day]=\"day\"\r\n [isWeekMode]=\"true\"\r\n [isSingleDay]=\"days.length === 1\"\r\n (dayClick)=\"onDayClick(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray,\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: 0\r\n }\r\n \"\r\n ></ng-container>\r\n </tbody>\r\n </table>\r\n</div>\r\n<ng-template #renderDayTasks let-weekTasks let-maxRowTasks=\"maxRowTasks\" let-weekIndex=\"weekIndex\">\r\n <ng-container *ngFor=\"let rowTask of weekTasks | keyvalue; let i = index\">\r\n <tr fd-table-row class=\"task-row\">\r\n <td fd-table-cell class=\"fd-time\" style=\"border: none\"></td>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td\r\n fd-table-cell\r\n *ngIf=\"task.colSpan && dayIndex < days.length\"\r\n [attr.colspan]=\"task.colSpan > days.length ? days.length : task.colSpan\"\r\n class=\"td-button\"\r\n [attr.hasevent]=\"!!task.event\"\r\n >\r\n <bc-event-button\r\n *ngIf=\"task.event && !task.inDay; else newDaySelect\"\r\n [task]=\"task\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-button>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" [attr.newDay]=\"true\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n<div\r\n class=\"table-container\"\r\n style=\"overflow-y: hidden; overflow-x: auto; flex-grow: 1; display: inline-table\"\r\n [style.height.px]=\"inDialog ? containerHeight : null\"\r\n [style.overflow-y]=\"inDialog ? 'scroll' : 'hidden'\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody #tbody>\r\n <tr class=\"tr-time\" style=\"height: 0rem\">\r\n <td class=\"td-time\" style=\"height: 0rem\"></td>\r\n <td [colspan]=\"days.length\" style=\"position: relative\" style=\"height: 0rem\">\r\n <div class=\"tasks-wrapper\">\r\n <div *ngFor=\"let hour of hours\" class=\"row-border\"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr fd-table-row style=\"height: 100%\">\r\n <td fd-table-cell class=\"td-time\">\r\n <div class=\"calc-time\">\r\n <div *ngFor=\"let hour of hours\">{{ hour }}</div>\r\n </div>\r\n </td>\r\n <td\r\n class=\"relative\"\r\n *ngFor=\"let day of days; let dayIndex = index\"\r\n fd-table-cell\r\n (click)=\"onColumnClick($event, day)\"\r\n >\r\n <section\r\n #sectionRef\r\n *ngIf=\"day.addingEventPoint2 !== null && day.addingEventPoint1 !== null\"\r\n class=\"w-[98%] border border-blue-400 absolute left-1/2 -translate-x-1/2 rounded-md transition-colors\"\r\n [ngStyle]=\"{\r\n top: Math.min(day.addingEventPoint2, day.addingEventPoint1) * 25 + 'px',\r\n height: (Math.abs(day.addingEventPoint1 - day.addingEventPoint2) + 1) * 25 + 'px'\r\n }\"\r\n [ngClass]=\"{\r\n 'bg-blue-400/[.4]': day.isAddingNewEvent,\r\n 'bg-blue-400': !day.isAddingNewEvent\r\n }\"\r\n ></section>\r\n <div\r\n style=\"position: relative; width: 100%; height: 100%\"\r\n (mousedown)=\"mousedown($event, dayIndex)\"\r\n (mouseup)=\"mouseup($event, dayIndex)\"\r\n (mousemove)=\"mousemove($event, dayIndex)\"\r\n >\r\n <ng-container *ngFor=\"let task of day.tasks; let taskIndex = index\">\r\n <bc-event-button\r\n (click)=\"setSelectedId(task.event.Id); onEventButton($event)\"\r\n *ngIf=\"task.inDay\"\r\n [style.background]=\"task.event[calendarFields.Color]\"\r\n [style.top.px]=\"task.top\"\r\n [style.right]=\"\r\n rtl\r\n ? 'calc(' + (task.positionCausedByOverlap / task.countOfOverlaps) * 100 + '%)'\r\n : null\r\n \"\r\n [style.left]=\"\r\n rtl\r\n ? null\r\n : 'calc(100% - ' +\r\n (task.positionCausedByOverlap / task.countOfOverlaps) * 100 +\r\n '%)'\r\n \"\r\n [style.width]=\"\r\n 'calc(' + (100 - (task.positionCausedByOverlap / task.countOfOverlaps) * 100) + '%)'\r\n \"\r\n [style.height.px]=\"task.height\"\r\n [style.maxHeight.px]=\"task.height\"\r\n [style.visibility]=\"task.hidden ? 'hidden' : 'visible'\"\r\n [style.opacity]=\"task.opacity\"\r\n [style.zIndex]=\"\r\n task.positionCausedByOverlap + (selectedTaskId === task.event.Id ? 0 : 0)\r\n \"\r\n [buttonTemplate]=\"eventButtonTemplate\"\r\n class=\"task-day\"\r\n [task]=\"task\"\r\n [index]=\"taskIndex\"\r\n [deviceSize]=\"deviceSize\"\r\n [calendarFields]=\"calendarFields\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <div\r\n class=\"absolute bottom-0 h-1 cursor-ns-resize w-full left-0\"\r\n (mousedown)=\"$event.stopPropagation(); mousedownForResize(day, dayIndex, taskIndex)\"\r\n (mouseup)=\"mouseup($event, dayIndex, taskIndex)\"\r\n (mousemove)=\"mousemove($event, dayIndex)\"\r\n ></div>\r\n </bc-event-button>\r\n </ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n<ng-template\r\n #eventButtonTemplate\r\n let-task\r\n let-popover=\"popover\"\r\n let-calendarFields=\"calendarFields\"\r\n let-onButtonClick=\"onButtonClick\"\r\n>\r\n <button\r\n [style.background]=\"task.event[calendarFields.Color]\"\r\n class=\"task-title border !border-gray-300 shadow-lg\"\r\n fd-button\r\n [compact]=\"true\"\r\n [fdType]=\"'emphasized'\"\r\n (click)=\"onButtonClick(popover)\"\r\n [label]=\"task.height > 49 ? '' : task.event[calendarFields.Title] + ' ' + (task | fromToTime)\"\r\n >\r\n <ng-container *ngIf=\"task.height > 49\">\r\n <span class=\"ellipsis\">{{ task.event[calendarFields.Title] }}</span>\r\n <span class=\"ellipsis\">{{ task | fromToTime }}</span>\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n", styles: [":host{display:flex;height:95%;width:100%;flex-direction:column;align-items:stretch;justify-content:stretch}table.table-top{border-top:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.table-top{table-layout:fixed}.table-top td{padding-right:1px!important;padding-left:1px!important}.tr-time{height:1px;max-height:1px!important;width:100%}.tr-time td{height:1px!important;max-height:1px!important;padding:0!important}.task-row td{height:1.425rem!important;padding:0!important}.table-content{width:100%;border-spacing:0;position:relative}.table-content .tasks-wrapper{position:absolute;opacity:.3;height:100%;width:calc(100% - 50px)}.table-content .td-time{padding:0!important}.table-content .td-time .calc-time{display:flex;flex-direction:column;height:100%;justify-content:start;align-items:center}.table-content .td-time .calc-time div{height:50px;border-bottom:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);width:100%;display:flex;justify-content:center}.table-content .td-time tbody{border-spacing:0}.td-time{width:50px!important;max-width:50px!important}.row-border{border-bottom:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);border-top:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:50px}.task-day{position:absolute!important;display:flex;flex-direction:column;align-items:start}.weekday-header td,.week-days td,.week-numbers td{text-align:right}table[dayscount=\"1\"] .week-days td[rtl=true],table[dayscount=\"1\"] .week-numbers td[rtl=true]{text-align:right!important}table[dayscount=\"1\"] .week-days td[rtl=false],table[dayscount=\"1\"] .week-numbers td[rtl=false]{text-align:left!important}table[dayscount=\"1\"] .week-days td,table[dayscount=\"1\"] .week-numbers td{padding-left:1rem!important;padding-right:1rem!important}table[dayscount=\"1\"] .week-days td.weekday-header,table[dayscount=\"1\"] .week-numbers td.weekday-header{padding-left:2rem!important;padding-right:2rem!important}.week-days td{border:none;text-align:center;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}.week-numbers td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}.td-button{border:none!important;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)!important;padding:1px!important}.task-title{display:flex;flex-direction:column;align-items:start!important;font-weight:400;width:100%;max-width:100%;min-width:100%;height:100%;max-height:100%;min-height:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "directive", type: i4.DeprecatedButtonContentDensityDirective, selector: "[fd-button][compact]" }, { kind: "component", type: i7$1.TableComponent, selector: "table[fd-table]", inputs: ["noBorderX", "noBorderY", "popIn", "responsive", "keys", "allCellsFocusable"], exportAs: ["fd-table"] }, { kind: "directive", type: i7$1.TableBodyDirective, selector: "[fdTableBody], [fd-table-body]", inputs: ["noBorderX", "noBorderY"] }, { kind: "directive", type: i7$1.TableRowDirective, selector: "[fdTableRow], [fd-table-row]", inputs: ["activable", "highlightActive", "hoverable", "focusable", "main", "secondary", "active"] }, { kind: "directive", type: i7$1.TableCellDirective, selector: "[fdTableCell], [fd-table-cell]", inputs: ["noBorderX", "noBorderY", "activable", "focusable", "tabindex", "hoverable", "fitContent", "noPadding", "noData", "key", "cellFocusedEventAnnouncer"] }, { kind: "directive", type: i7$1.DeprecatedTableCompactDirective, selector: "table[fd-table][compact]" }, { kind: "component", type: DayNumberBoxComponent, selector: "bc-day-number-box", inputs: ["isWeekMode", "isSingleDay", "day", "isPickerMode", "itemInRange", "isActive"], outputs: ["dayClick", "dayMouseDown", "dayMouseUp", "dayMouseMove"] }, { kind: "component", type: EventButtonComponent, selector: "bc-event-button", inputs: ["buttonTemplate", "calendarFields", "task", "rtl", "canDelete", "canEdit", "index", "deviceSize"], outputs: ["deleteEvent", "editEvent", "openPopoverChange"] }, { kind: "pipe", type: i3.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: FromToTimePipe, name: "fromToTime" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarWeekComponent, decorators: [{
|
|
2414
|
-
type: Component,
|
|
2415
|
-
args: [{ selector: 'bc-calendar-week', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"table-container\"\r\n [style.overflow-y]=\"inDialog ? 'scroll' : 'hidden'\"\r\n style=\"overflow-y: hidden; flex-shrink: 0\"\r\n #tableTop\r\n>\r\n <table fd-table class=\"table-top\" [compact]=\"true\" [attr.daysCount]=\"days.length\">\r\n <tbody fd-table-body>\r\n <tr fd-table-row class=\"week-days\">\r\n <td class=\"td-time\"></td>\r\n <td [attr.rtl]=\"rtl\" class=\"weekday-header\" *ngFor=\"let day of days\" fd-table-cell style=\"width: 100%\">\r\n {{ day.dayName }}\r\n </td>\r\n </tr>\r\n <tr fd-table-row class=\"week-numbers\">\r\n <td class=\"td-time\"></td>\r\n <td fd-table-cell *ngFor=\"let day of days\" [attr.rtl]=\"rtl\">\r\n <bc-day-number-box\r\n [day]=\"day\"\r\n [isWeekMode]=\"true\"\r\n [isSingleDay]=\"days.length === 1\"\r\n (dayClick)=\"onDayClick(day)\"\r\n ></bc-day-number-box>\r\n </td>\r\n </tr>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n renderDayTasks;\r\n context: {\r\n $implicit: weekTasksArray,\r\n maxRowTasks: maxRowTasks,\r\n weekIndex: 0\r\n }\r\n \"\r\n ></ng-container>\r\n </tbody>\r\n </table>\r\n</div>\r\n<ng-template #renderDayTasks let-weekTasks let-maxRowTasks=\"maxRowTasks\" let-weekIndex=\"weekIndex\">\r\n <ng-container *ngFor=\"let rowTask of weekTasks | keyvalue; let i = index\">\r\n <tr fd-table-row class=\"task-row\">\r\n <td fd-table-cell class=\"fd-time\" style=\"border: none\"></td>\r\n <ng-container *ngFor=\"let task of weekTasks[i]; let dayIndex = index\">\r\n <td\r\n fd-table-cell\r\n *ngIf=\"task.colSpan && dayIndex < days.length\"\r\n [attr.colspan]=\"task.colSpan > days.length ? days.length : task.colSpan\"\r\n class=\"td-button\"\r\n [attr.hasevent]=\"!!task.event\"\r\n >\r\n <bc-event-button\r\n *ngIf=\"task.event && !task.inDay; else newDaySelect\"\r\n [task]=\"task\"\r\n [rtl]=\"rtl\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n [calendarFields]=\"calendarFields\"\r\n [deviceSize]=\"deviceSize\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n ></bc-event-button>\r\n <ng-template #newDaySelect>\r\n <div style=\"width: 100%; height: 100%\" [attr.newDay]=\"true\"></div>\r\n </ng-template>\r\n </td>\r\n </ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n<div\r\n class=\"table-container\"\r\n style=\"overflow-y: hidden; overflow-x: auto; flex-grow: 1; display: inline-table\"\r\n [style.height.px]=\"inDialog ? containerHeight : null\"\r\n [style.overflow-y]=\"inDialog ? 'scroll' : 'hidden'\"\r\n>\r\n <table fd-table-body class=\"table-content\" [compact]=\"true\">\r\n <tbody #tbody>\r\n <tr class=\"tr-time\" style=\"height: 0rem\">\r\n <td class=\"td-time\" style=\"height: 0rem\"></td>\r\n <td [colspan]=\"days.length\" style=\"position: relative\" style=\"height: 0rem\">\r\n <div class=\"tasks-wrapper\">\r\n <div *ngFor=\"let hour of hours\" class=\"row-border\"></div>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr fd-table-row style=\"height: 100%\">\r\n <td fd-table-cell class=\"td-time\">\r\n <div class=\"calc-time\">\r\n <div *ngFor=\"let hour of hours\">{{ hour }}</div>\r\n </div>\r\n </td>\r\n <td\r\n class=\"relative\"\r\n *ngFor=\"let day of days; let dayIndex = index\"\r\n fd-table-cell\r\n (click)=\"onColumnClick($event, day)\"\r\n >\r\n <section\r\n #sectionRef\r\n *ngIf=\"day.addingEventPoint2 !== null && day.addingEventPoint1 !== null\"\r\n class=\"w-[98%] border border-blue-400 absolute left-1/2 -translate-x-1/2 rounded-md transition-colors\"\r\n [ngStyle]=\"{\r\n top: Math.min(day.addingEventPoint2, day.addingEventPoint1) * 25 + 'px',\r\n height: (Math.abs(day.addingEventPoint1 - day.addingEventPoint2) + 1) * 25 + 'px'\r\n }\"\r\n [ngClass]=\"{\r\n 'bg-blue-400/[.4]': day.isAddingNewEvent,\r\n 'bg-blue-400': !day.isAddingNewEvent\r\n }\"\r\n ></section>\r\n <div\r\n style=\"position: relative; width: 100%; height: 100%\"\r\n (mousedown)=\"mousedown($event, dayIndex)\"\r\n (mouseup)=\"mouseup($event, dayIndex)\"\r\n (mousemove)=\"mousemove($event, dayIndex)\"\r\n >\r\n <ng-container *ngFor=\"let task of day.tasks; let taskIndex = index\">\r\n <bc-event-button\r\n (click)=\"setSelectedId(task.event.Id); onEventButton($event)\"\r\n *ngIf=\"task.inDay\"\r\n [style.background]=\"task.event[calendarFields.Color]\"\r\n [style.top.px]=\"task.top\"\r\n [style.right]=\"\r\n rtl\r\n ? 'calc(' + (task.positionCausedByOverlap / task.countOfOverlaps) * 100 + '%)'\r\n : null\r\n \"\r\n [style.left]=\"\r\n rtl\r\n ? null\r\n : 'calc(100% - ' +\r\n (task.positionCausedByOverlap / task.countOfOverlaps) * 100 +\r\n '%)'\r\n \"\r\n [style.width]=\"\r\n 'calc(' + (100 - (task.positionCausedByOverlap / task.countOfOverlaps) * 100) + '%)'\r\n \"\r\n [style.height.px]=\"task.height\"\r\n [style.maxHeight.px]=\"task.height\"\r\n [style.visibility]=\"task.hidden ? 'hidden' : 'visible'\"\r\n [style.opacity]=\"task.opacity\"\r\n [style.zIndex]=\"\r\n task.positionCausedByOverlap + (selectedTaskId === task.event.Id ? 0 : 0)\r\n \"\r\n [buttonTemplate]=\"eventButtonTemplate\"\r\n class=\"task-day\"\r\n [task]=\"task\"\r\n [index]=\"taskIndex\"\r\n [deviceSize]=\"deviceSize\"\r\n [calendarFields]=\"calendarFields\"\r\n [canDelete]=\"canDelete\"\r\n [canEdit]=\"canEdit\"\r\n (deleteEvent)=\"deleteEvent.emit($event)\"\r\n (editEvent)=\"editEvent.emit($event)\"\r\n (openPopoverChange)=\"onOpenPopoverChange($event)\"\r\n >\r\n <div\r\n class=\"absolute bottom-0 h-1 cursor-ns-resize w-full left-0\"\r\n (mousedown)=\"$event.stopPropagation(); mousedownForResize(day, dayIndex, taskIndex)\"\r\n (mouseup)=\"mouseup($event, dayIndex, taskIndex)\"\r\n (mousemove)=\"mousemove($event, dayIndex)\"\r\n ></div>\r\n </bc-event-button>\r\n </ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n<ng-template\r\n #eventButtonTemplate\r\n let-task\r\n let-popover=\"popover\"\r\n let-calendarFields=\"calendarFields\"\r\n let-onButtonClick=\"onButtonClick\"\r\n>\r\n <button\r\n [style.background]=\"task.event[calendarFields.Color]\"\r\n class=\"task-title border !border-gray-300 shadow-lg\"\r\n fd-button\r\n [compact]=\"true\"\r\n [fdType]=\"'emphasized'\"\r\n (click)=\"onButtonClick(popover)\"\r\n [label]=\"task.height > 49 ? '' : task.event[calendarFields.Title] + ' ' + (task | fromToTime)\"\r\n >\r\n <ng-container *ngIf=\"task.height > 49\">\r\n <span class=\"ellipsis\">{{ task.event[calendarFields.Title] }}</span>\r\n <span class=\"ellipsis\">{{ task | fromToTime }}</span>\r\n </ng-container>\r\n </button>\r\n</ng-template>\r\n", styles: [":host{display:flex;height:95%;width:100%;flex-direction:column;align-items:stretch;justify-content:stretch}table.table-top{border-top:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}table td{overflow:hidden}thead tr{border-bottom:none!important}thead tr th{text-align:center!important;background-color:var(--sapList_Background, #fff)}tbody tr td{padding-top:5px}tbody tr:first-child td{padding-top:0}.fd-table__cell{padding:0 .5rem!important}.table-top{table-layout:fixed}.table-top td{padding-right:1px!important;padding-left:1px!important}.tr-time{height:1px;max-height:1px!important;width:100%}.tr-time td{height:1px!important;max-height:1px!important;padding:0!important}.task-row td{height:1.425rem!important;padding:0!important}.table-content{width:100%;border-spacing:0;position:relative}.table-content .tasks-wrapper{position:absolute;opacity:.3;height:100%;width:calc(100% - 50px)}.table-content .td-time{padding:0!important}.table-content .td-time .calc-time{display:flex;flex-direction:column;height:100%;justify-content:start;align-items:center}.table-content .td-time .calc-time div{height:50px;border-bottom:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);width:100%;display:flex;justify-content:center}.table-content .td-time tbody{border-spacing:0}.td-time{width:50px!important;max-width:50px!important}.row-border{border-bottom:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);border-top:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5);height:50px}.task-day{position:absolute!important;display:flex;flex-direction:column;align-items:start}.weekday-header td,.week-days td,.week-numbers td{text-align:right}table[dayscount=\"1\"] .week-days td[rtl=true],table[dayscount=\"1\"] .week-numbers td[rtl=true]{text-align:right!important}table[dayscount=\"1\"] .week-days td[rtl=false],table[dayscount=\"1\"] .week-numbers td[rtl=false]{text-align:left!important}table[dayscount=\"1\"] .week-days td,table[dayscount=\"1\"] .week-numbers td{padding-left:1rem!important;padding-right:1rem!important}table[dayscount=\"1\"] .week-days td.weekday-header,table[dayscount=\"1\"] .week-numbers td.weekday-header{padding-left:2rem!important;padding-right:2rem!important}.week-days td{border:none;text-align:center;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}.week-numbers td{border:none;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)}.td-button{border:none!important;border-right:var(--sapList_BorderWidth, .0625rem) solid var(--sapList_BorderColor, #e5e5e5)!important;padding:1px!important}.task-title{display:flex;flex-direction:column;align-items:start!important;font-weight:400;width:100%;max-width:100%;min-width:100%;height:100%;max-height:100%;min-height:100%}\n"] }]
|
|
2416
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CalendarService }]; }, propDecorators: { tableTopEl: [{
|
|
2417
|
-
type: ViewChild,
|
|
2418
|
-
args: ['tableTop']
|
|
2419
|
-
}], _sectionRef: [{
|
|
2420
|
-
type: ViewChild,
|
|
2421
|
-
args: ['sectionRef']
|
|
2422
|
-
}], weekDays: [{
|
|
2423
|
-
type: Input
|
|
2424
|
-
}], weekDaysMin: [{
|
|
2425
|
-
type: Input
|
|
2426
|
-
}], today: [{
|
|
2427
|
-
type: Input
|
|
2428
|
-
}], containerHeight: [{
|
|
2429
|
-
type: Input
|
|
2430
|
-
}], calendarFields: [{
|
|
2431
|
-
type: Input
|
|
2432
|
-
}], rtl: [{
|
|
2433
|
-
type: Input
|
|
2434
|
-
}], inDialog: [{
|
|
2435
|
-
type: Input
|
|
2436
|
-
}], deviceSize: [{
|
|
2437
|
-
type: Input
|
|
2438
|
-
}], moDataList: [{
|
|
2439
|
-
type: Input
|
|
2440
|
-
}], days: [{
|
|
2441
|
-
type: Input
|
|
2442
|
-
}], canDelete: [{
|
|
2443
|
-
type: Input
|
|
2444
|
-
}], canAdd: [{
|
|
2445
|
-
type: Input
|
|
2446
|
-
}], canEdit: [{
|
|
2447
|
-
type: Input
|
|
2448
|
-
}], editEvent: [{
|
|
2449
|
-
type: Output
|
|
2450
|
-
}], deleteEvent: [{
|
|
2451
|
-
type: Output
|
|
2452
|
-
}], showEvent: [{
|
|
2453
|
-
type: Output
|
|
2454
|
-
}], rangeSelect: [{
|
|
2455
|
-
type: Output
|
|
2456
|
-
}], daySelect: [{
|
|
2457
|
-
type: Output
|
|
2458
|
-
}], dayClick: [{
|
|
2459
|
-
type: Output
|
|
2460
|
-
}] } });
|
|
2461
|
-
|
|
2462
|
-
class CalendarListItemComponent extends BaseComponent {
|
|
2463
|
-
}
|
|
2464
|
-
CalendarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2465
|
-
CalendarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarListItemComponent, selector: "bc-calendar-list-item", inputs: { mo: "mo" }, usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\">\r\n <div flexShrink=\"1\" class=\"day-wrapper\">\r\n <Label [text]=\"mo.$StartTimes\"></Label>\r\n <Label class=\"ela\" [text]=\"'\u0627\u0644\u06CC'\"></Label>\r\n <Label [text]=\"mo.$EndTimes\"></Label>\r\n </div>\r\n <div class=\"color\" [style.background-color]=\"mo.$Color\"></div>\r\n <div class=\"event-wrapper\">\r\n <Label class=\"title\" [text]=\"mo.$Title\"></Label>\r\n <Label class=\"desc\" [text]=\"mo.$Notes\"></Label>\r\n </div>\r\n</div>\r\n", styles: [".wrapper{display:flex;flex-direction:row}.day-wrapper{display:flex;flex-shrink:1}.color{width:1}.event-wrapper{display:flex;flex-grow:1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListItemComponent, decorators: [{
|
|
2467
|
-
type: Component,
|
|
2468
|
-
args: [{ selector: 'bc-calendar-list-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wrapper\">\r\n <div flexShrink=\"1\" class=\"day-wrapper\">\r\n <Label [text]=\"mo.$StartTimes\"></Label>\r\n <Label class=\"ela\" [text]=\"'\u0627\u0644\u06CC'\"></Label>\r\n <Label [text]=\"mo.$EndTimes\"></Label>\r\n </div>\r\n <div class=\"color\" [style.background-color]=\"mo.$Color\"></div>\r\n <div class=\"event-wrapper\">\r\n <Label class=\"title\" [text]=\"mo.$Title\"></Label>\r\n <Label class=\"desc\" [text]=\"mo.$Notes\"></Label>\r\n </div>\r\n</div>\r\n", styles: [".wrapper{display:flex;flex-direction:row}.day-wrapper{display:flex;flex-shrink:1}.color{width:1}.event-wrapper{display:flex;flex-grow:1}\n"] }]
|
|
2469
|
-
}], propDecorators: { mo: [{
|
|
2470
|
-
type: Input
|
|
2471
|
-
}] } });
|
|
2472
|
-
|
|
2473
|
-
class CalendarListComponent extends BaseComponent {
|
|
2474
|
-
trackById(index, item) {
|
|
2475
|
-
return item.Id;
|
|
2476
|
-
}
|
|
2477
|
-
}
|
|
2478
|
-
CalendarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2479
|
-
CalendarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarListComponent, selector: "bc-calendar-list", inputs: { moDataList: "moDataList" }, usesInheritance: true, ngImport: i0, template: "<bc-calendar-list-item *ngFor=\"let item of moDataList; trackBy: trackById\" [mo]=\"item\"> </bc-calendar-list-item>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: CalendarListItemComponent, selector: "bc-calendar-list-item", inputs: ["mo"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListComponent, decorators: [{
|
|
2481
|
-
type: Component,
|
|
2482
|
-
args: [{ selector: 'bc-calendar-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bc-calendar-list-item *ngFor=\"let item of moDataList; trackBy: trackById\" [mo]=\"item\"> </bc-calendar-list-item>\r\n" }]
|
|
2483
|
-
}], propDecorators: { moDataList: [{
|
|
2484
|
-
type: Input
|
|
2485
|
-
}] } });
|
|
2486
|
-
|
|
2487
|
-
class CalendarListContainerComponent extends BaseComponent {
|
|
2488
|
-
constructor() {
|
|
2489
|
-
super(...arguments);
|
|
2490
|
-
this.showEventsTap = new EventEmitter();
|
|
2491
|
-
}
|
|
2492
|
-
}
|
|
2493
|
-
CalendarListContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2494
|
-
CalendarListContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarListContainerComponent, selector: "bc-calendar-list-container", inputs: { view: "view", reportItemComponentName: "reportItemComponentName", showEvents: "showEvents", selectedDay: "selectedDay", calendarFields: "calendarFields" }, outputs: { showEventsTap: "showEventsTap" }, usesInheritance: true, ngImport: i0, template: "<bc-calendar-list *ngIf=\"selectedDay\" [moDataList]=\"selectedDay.tasks\"></bc-calendar-list>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CalendarListComponent, selector: "bc-calendar-list", inputs: ["moDataList"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarListContainerComponent, decorators: [{
|
|
2496
|
-
type: Component,
|
|
2497
|
-
args: [{ selector: 'bc-calendar-list-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bc-calendar-list *ngIf=\"selectedDay\" [moDataList]=\"selectedDay.tasks\"></bc-calendar-list>\r\n" }]
|
|
2498
|
-
}], propDecorators: { view: [{
|
|
2499
|
-
type: Input
|
|
2500
|
-
}], reportItemComponentName: [{
|
|
2501
|
-
type: Input
|
|
2502
|
-
}], showEvents: [{
|
|
2503
|
-
type: Input
|
|
2504
|
-
}], selectedDay: [{
|
|
2505
|
-
type: Input
|
|
2506
|
-
}], calendarFields: [{
|
|
2507
|
-
type: Input
|
|
2508
|
-
}], showEventsTap: [{
|
|
2509
|
-
type: Output
|
|
2510
|
-
}] } });
|
|
2511
|
-
|
|
2512
|
-
class CalendarContainerComponent extends ReportViewBaseComponent {
|
|
2513
|
-
constructor(_titleCase, _bbbTranslate, _calendarService, _dateService, _el, _cdr, _renderer2, _findColumnByDbName, _ulvMainService, _portalService) {
|
|
2514
|
-
super(_el, _cdr, _renderer2, _findColumnByDbName, _ulvMainService, _portalService);
|
|
2515
|
-
this._titleCase = _titleCase;
|
|
2516
|
-
this._bbbTranslate = _bbbTranslate;
|
|
2517
|
-
this._calendarService = _calendarService;
|
|
2518
|
-
this._dateService = _dateService;
|
|
2519
|
-
this._el = _el;
|
|
2520
|
-
this._cdr = _cdr;
|
|
2521
|
-
this._renderer2 = _renderer2;
|
|
2522
|
-
this._findColumnByDbName = _findColumnByDbName;
|
|
2523
|
-
this._ulvMainService = _ulvMainService;
|
|
2524
|
-
this._portalService = _portalService;
|
|
2525
|
-
this.deleteTask = new EventEmitter();
|
|
2526
|
-
this.editTask = new EventEmitter();
|
|
2527
|
-
this.rangeSelect = new EventEmitter();
|
|
2528
|
-
this.daySelect = new EventEmitter();
|
|
2529
|
-
this.loadData = new EventEmitter();
|
|
2530
|
-
this.todayIndex = -1;
|
|
2531
|
-
this.eventMoDataList$ = new BehaviorSubject([]);
|
|
2532
|
-
}
|
|
2533
|
-
ngOnInit() {
|
|
2534
|
-
var _a;
|
|
2535
|
-
this.calendarFields = this.contextSetting.View.CalendarFields;
|
|
2536
|
-
if ((_a = this.viewSetting) === null || _a === void 0 ? void 0 : _a.CalendarColorField) {
|
|
2537
|
-
this.calendarFields.Color = this.viewSetting.CalendarColorField;
|
|
2538
|
-
}
|
|
2539
|
-
this.userCalendars = this.contextSetting.View.UserCalendars;
|
|
2540
|
-
super.ngOnInit();
|
|
2541
|
-
this.prepare();
|
|
2542
|
-
this._setWidthAndHeight();
|
|
2543
|
-
this.prepareMoDataList(this.moDataList);
|
|
2544
|
-
this.selectedMonth$.pipe(takeUntil(this._onDestroy$)).subscribe((month) => {
|
|
2545
|
-
this.loadData.emit({
|
|
2546
|
-
start: month.days[0].date,
|
|
2547
|
-
end: month.days[month.days.length - 1].date
|
|
2548
|
-
});
|
|
2549
|
-
});
|
|
2550
|
-
// this.setTasks(this.calendars, this.moDataList, this.calendarFields);
|
|
2551
|
-
}
|
|
2552
|
-
ngOnChanges(changes) {
|
|
2553
|
-
super.ngOnChanges(changes);
|
|
2554
|
-
const { moDataList, deviceSize } = changes;
|
|
2555
|
-
if (moDataList && !moDataList.firstChange) {
|
|
2556
|
-
this.prepareMoDataList(changes.moDataList.currentValue);
|
|
2557
|
-
this._cdr.detectChanges();
|
|
2558
|
-
}
|
|
2559
|
-
if (deviceSize && !deviceSize.firstChange) {
|
|
2560
|
-
this._setWidthAndHeight();
|
|
2561
|
-
this._cdr.detectChanges();
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
onCalendarCheckChange(calendar) {
|
|
2565
|
-
this._handleUserCalendarsChecked();
|
|
2566
|
-
}
|
|
2567
|
-
onDayClick(day) {
|
|
2568
|
-
this._calendarService.setMode('day', day);
|
|
2569
|
-
}
|
|
2570
|
-
onShowTask() { }
|
|
2571
|
-
onSlideChange(selected) {
|
|
2572
|
-
this._calendarService.setSelected(selected);
|
|
2573
|
-
}
|
|
2574
|
-
onMonthCarouselLoaded({ object }) {
|
|
2575
|
-
object.selectedPage = 1;
|
|
2576
|
-
}
|
|
2577
|
-
onToday() {
|
|
2578
|
-
this._calendarService.gotoToday();
|
|
2579
|
-
}
|
|
2580
|
-
onModeChange(mode) {
|
|
2581
|
-
this._calendarService.setMode(mode);
|
|
2582
|
-
}
|
|
2583
|
-
onRangeChange(e) {
|
|
2584
|
-
this._calendarService.rangeSelect(e.startDay, e.endDay, e.monthInfo);
|
|
2585
|
-
}
|
|
2586
|
-
onPrevTap() {
|
|
2587
|
-
// this.gotoPage(this.monthCarouselView.nativeElement.selectedPage - 1);
|
|
2588
|
-
this._calendarService.loadPrevious();
|
|
2589
|
-
}
|
|
2590
|
-
onNextTap() {
|
|
2591
|
-
this._calendarService.loadNext();
|
|
2592
|
-
// this.gotoPage(this.monthCarouselView.nativeElement.selectedPage + 1);
|
|
2593
|
-
}
|
|
2594
|
-
onSelectedChange(day) {
|
|
2595
|
-
this.selectedDay = Object.assign({}, day);
|
|
2596
|
-
}
|
|
2597
|
-
onRangeSelect({ startDate, endDate }) {
|
|
2598
|
-
const x = { [this.calendarFields.StartDate]: startDate, [this.calendarFields.EndDate]: endDate };
|
|
2599
|
-
this.rangeSelect.emit(x);
|
|
2600
|
-
}
|
|
2601
|
-
prepareMoDataList(moDataList) {
|
|
2602
|
-
this.eventMoDataList$.next(moDataList.map((event) => (Object.assign(Object.assign({}, event), { id: event.Id, $StartDateInfo: this._dateService.getDateInfo(event[this.calendarFields.StartDate]), $EndDateInfo: this._dateService.getDateInfo(event[this.calendarFields.EndDate]) }))));
|
|
2603
|
-
}
|
|
2604
|
-
addTd(table, tr, event, colSpan) {
|
|
2605
|
-
const colSpanCount = tr.length > 0 ? tr.map((c) => c.colSpan).reduce((a, b) => a + b) > 6 : 0;
|
|
2606
|
-
if (colSpanCount) {
|
|
2607
|
-
table.push(tr);
|
|
2608
|
-
tr = [];
|
|
2609
|
-
}
|
|
2610
|
-
tr.push({ type: 'td', colSpan, event });
|
|
2611
|
-
}
|
|
2612
|
-
_handleUserCalendarsChecked() {
|
|
2613
|
-
var _a, _b;
|
|
2614
|
-
const userCalendars = (_b = (_a = this.userCalendars) === null || _a === void 0 ? void 0 : _a.Data) === null || _b === void 0 ? void 0 : _b.MoDataList;
|
|
2615
|
-
if (!(userCalendars === null || userCalendars === void 0 ? void 0 : userCalendars.length)) {
|
|
2616
|
-
return;
|
|
2617
|
-
}
|
|
2618
|
-
const calendars = userCalendars.filter((c) => c.$IsChecked).map((c) => c.Id);
|
|
2619
|
-
let moList = this.moDataList;
|
|
2620
|
-
if (calendars.length > 0) {
|
|
2621
|
-
moList = this.moDataList.filter((c) => c[this.calendarFields.Calendar] && calendars.indexOf(c[this.calendarFields.Calendar].Id) > -1);
|
|
2622
|
-
}
|
|
2623
|
-
this.prepareMoDataList(moList);
|
|
2624
|
-
}
|
|
2625
|
-
prepare() {
|
|
2626
|
-
this.weekDaysMin = this._calendarService.weekDaysMin();
|
|
2627
|
-
this.weekDays = this._calendarService.weekDays();
|
|
2628
|
-
this.selectedMonth$ = this._calendarService.selected$;
|
|
2629
|
-
this.days$ = this._calendarService.days$;
|
|
2630
|
-
this.today = this._calendarService.today;
|
|
2631
|
-
this.mode$ = this._calendarService.mode$;
|
|
2632
|
-
this.monthWeeksCount$ = this.mode$.pipe(map((mode) => {
|
|
2633
|
-
if (mode === 'month') {
|
|
2634
|
-
return this._calendarService.selectedMonth.weeksCount;
|
|
2635
|
-
}
|
|
2636
|
-
return 0;
|
|
2637
|
-
}));
|
|
2638
|
-
this.modeTitle$ = combineLatest([this.days$, this.mode$]).pipe(takeUntil(this._onDestroy$), switchMap(([, mode]) => {
|
|
2639
|
-
if (mode === 'customMonth') {
|
|
2640
|
-
return of(`${this._calendarService.weeksCount} ${this._bbbTranslate.transform('Week')}`);
|
|
2641
|
-
}
|
|
2642
|
-
return of(this._bbbTranslate.transform(this._titleCase.transform(mode)));
|
|
2643
|
-
}));
|
|
2644
|
-
this.weekModeDays$ = this._calendarService.weekModeDays$;
|
|
2645
|
-
this._calendarService.calendars$.pipe(takeUntil(this._onDestroy$)).subscribe((calendars) => {
|
|
2646
|
-
const eventCalendars = [...calendars];
|
|
2647
|
-
// eventCalendars = eventCalendars.splice(this.selectedIndex, 3);
|
|
2648
|
-
this.calendars = eventCalendars;
|
|
2649
|
-
// if (this.monthCarouselView) {
|
|
2650
|
-
// this.monthCarouselView.nativeElement.selectedPage = 1;
|
|
2651
|
-
// }
|
|
2652
|
-
});
|
|
2653
|
-
// .pipe(takeUntil(this._onDestroy$))
|
|
2654
|
-
// .subscribe((todayIndex) => {
|
|
2655
|
-
// this.selectedIndex = this.todayIndex = todayIndex;
|
|
2656
|
-
// this.gotoPage(this.todayIndex);
|
|
2657
|
-
// });
|
|
2658
|
-
this.title$ = combineLatest([this.weekModeDays$, this.selectedMonth$, this.days$, this.mode$]).pipe(takeUntil(this._onDestroy$), switchMap(([weekModeDays, monthInfo, days, mode]) => {
|
|
2659
|
-
let monthName = monthInfo.dateInfo.monthName;
|
|
2660
|
-
const year = monthInfo.dateInfo.strYear;
|
|
2661
|
-
if (mode !== 'month') {
|
|
2662
|
-
let firstDayInfo;
|
|
2663
|
-
let lastDayInfo;
|
|
2664
|
-
const daysTemp = mode === 'customMonth' ? days : weekModeDays;
|
|
2665
|
-
if (daysTemp.length > 0) {
|
|
2666
|
-
firstDayInfo = daysTemp[0];
|
|
2667
|
-
lastDayInfo = daysTemp[daysTemp.length - 1];
|
|
2668
|
-
monthName = firstDayInfo.monthName;
|
|
2669
|
-
if (firstDayInfo.month !== lastDayInfo.month) {
|
|
2670
|
-
monthName = `${firstDayInfo.monthName} -
|
|
2671
|
-
${lastDayInfo.monthName}`;
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
return of(`${monthName} ${year}`);
|
|
2676
|
-
}));
|
|
2677
|
-
}
|
|
2678
|
-
_setWidthAndHeight() {
|
|
2679
|
-
// const divRef= this._el.nativeElement;
|
|
2680
|
-
const divRef = this._divRef.nativeElement;
|
|
2681
|
-
this.width = divRef.offsetWidth;
|
|
2682
|
-
this.height = divRef.offsetHeight - 45;
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
CalendarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarContainerComponent, deps: [{ token: i3.TitleCasePipe }, { token: i2.BbbTranslatePipe }, { token: CalendarService }, { token: i2.DateService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i2.FindColumnByDbNamePipe }, { token: i2.UlvMainService }, { token: i2.PortalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2686
|
-
CalendarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CalendarContainerComponent, selector: "bc-calendar-container", inputs: { calendarFields: "calendarFields", userCalendars: "userCalendars", viewSetting: "viewSetting" }, outputs: { deleteTask: "deleteTask", editTask: "editTask", rangeSelect: "rangeSelect", daySelect: "daySelect", loadData: "loadData" }, providers: [
|
|
2687
|
-
{
|
|
2688
|
-
provide: DateService,
|
|
2689
|
-
useFactory: getDateService,
|
|
2690
|
-
deps: [LogService]
|
|
2691
|
-
}
|
|
2692
|
-
], viewQueries: [{ propertyName: "_divRef", first: true, predicate: ["divRef"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div style=\"display: flex; width: 100%; height: 100%; flex-direction: row\">\r\n <div style=\"width: 320px; height: 100%\" *ngIf=\"deviceSize !== 's' && deviceSize !== 'm'\">\r\n <bc-calendar-selection-days\r\n [inline]=\"true\"\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n <div style=\"height: 1px; background: #ccc\"></div>\r\n <div *ngIf=\"userCalendars?.Data?.MoDataList?.length\">\r\n <h4>\u062A\u0642\u0648\u06CC\u0645\u200C\u0647\u0627\u06CC\u200C\u0645\u0646</h4>\r\n <ng-container *ngFor=\"let calendar of userCalendars.Data.MoDataList\">\r\n <ul fd-list>\r\n <li fd-list-item style=\"padding: 0\" class=\"user-calendar\">\r\n <span\r\n [style.background]=\"calendar.Color ? calendar.Color : null\"\r\n style=\"width: 5px; height: 100%; position: absolute\"\r\n ></span>\r\n <fd-checkbox\r\n [(ngModel)]=\"calendar.$IsChecked\"\r\n (change)=\"onCalendarCheckChange(calendar)\"\r\n ></fd-checkbox>\r\n <span fd-list-title>{{ calendar.$Caption }}</span>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div style=\"flex: 1\" #divRef>\r\n <bc-calendar-header\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n [weekModeDays]=\"(weekModeDays$ | async)!!\"\r\n [rtl]=\"rtl\"\r\n [deviceSize]=\"deviceSize\"\r\n [mode]=\"(mode$ | async)!!\"\r\n [modeTitle]=\"(modeTitle$ | async)!!\"\r\n [title]=\"(title$ | async)!!\"\r\n (modeChange)=\"onModeChange($event)\"\r\n (prevTap)=\"onPrevTap()\"\r\n (nextTap)=\"onNextTap()\"\r\n (today)=\"onToday()\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n >\r\n </bc-calendar-header>\r\n <ng-container [ngSwitch]=\"mode$ | async\">\r\n <ng-container *ngSwitchCase=\"'week'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n weekCalendar;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n weekModeDays: weekModeDays$ | async,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'day'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n weekCalendar;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n weekModeDays: weekModeDays$ | async,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'list'\"></ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n monthCalendar;\r\n context: {\r\n $implicit: days$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n monthWeeksCount: monthWeeksCount$ | async,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n<ng-template\r\n #monthCalendar\r\n let-days\r\n let-moDataList=\"moDataList\"\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-calendarFields=\"calendarFields\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-monthWeeksCount=\"monthWeeksCount\"\r\n let-access=\"access\"\r\n>\r\n <bc-calendar-month\r\n [style.width]=\"width\"\r\n [containerHeight]=\"parentHeight !== 0 ? parentHeight : height\"\r\n [containerWidth]=\"width\"\r\n [calendarFields]=\"calendarFields\"\r\n [moDataList]=\"moDataList\"\r\n [monthWeeksCount]=\"monthWeeksCount\"\r\n [rtl]=\"rtl\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [showEvents]=\"showEvents\"\r\n [days]=\"days\"\r\n [canAdd]=\"access.Add\"\r\n [canEdit]=\"access.Edit\"\r\n [canDelete]=\"access.Delete\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event)\"\r\n (showEvent)=\"onShowTask()\"\r\n (deleteEvent)=\"deleteTask.emit($event)\"\r\n (editEvent)=\"editTask.emit($event)\"\r\n (daySelect)=\"daySelect.emit($event)\"\r\n ></bc-calendar-month>\r\n</ng-template>\r\n\r\n<ng-template #listCalendar>\r\n <bc-calendar-list-container\r\n [showEvents]=\"showEvents\"\r\n [selectedDay]=\"selectedDay\"\r\n [calendarFields]=\"calendarFields\"\r\n (showEventsTap)=\"showEvents = !showEvents\"\r\n ></bc-calendar-list-container>\r\n</ng-template>\r\n\r\n<ng-template\r\n #weekCalendar\r\n let-selectedMonth\r\n let-moDataList=\"moDataList\"\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-calendarFields=\"calendarFields\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-weekModeDays=\"weekModeDays\"\r\n let-access=\"access\"\r\n>\r\n <bc-calendar-week\r\n [style.width]=\"width\"\r\n [containerHeight]=\"parentHeight !== 0 ? parentHeight : height\"\r\n [containerWidth]=\"width\"\r\n [inDialog]=\"inDialog\"\r\n [calendarFields]=\"calendarFields\"\r\n [moDataList]=\"moDataList\"\r\n [rtl]=\"rtl\"\r\n [canAdd]=\"access.Add\"\r\n [canEdit]=\"access.Edit\"\r\n [canDelete]=\"access.Delete\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [showEvents]=\"showEvents\"\r\n [days]=\"weekModeDays\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event)\"\r\n (showEvent)=\"onShowTask()\"\r\n (deleteEvent)=\"deleteTask.emit($event)\"\r\n (editEvent)=\"editTask.emit($event)\"\r\n (daySelect)=\"daySelect.emit($event)\"\r\n (rangeSelect)=\"onRangeSelect($event)\"\r\n ></bc-calendar-week>\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep li.user-calendar .fd-list__form-item{padding:.5rem}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5$3.CheckboxComponent, selector: "fd-checkbox", inputs: ["ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "values"], outputs: ["focusChange"] }, { kind: "component", type: i6$2.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i6$2.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i6$2.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: CalendarListContainerComponent, selector: "bc-calendar-list-container", inputs: ["view", "reportItemComponentName", "showEvents", "selectedDay", "calendarFields"], outputs: ["showEventsTap"] }, { kind: "component", type: CalendarWeekComponent, selector: "bc-calendar-week", inputs: ["weekDays", "weekDaysMin", "today", "containerHeight", "calendarFields", "rtl", "inDialog", "deviceSize", "moDataList", "days", "canDelete", "canAdd", "canEdit"], outputs: ["editEvent", "deleteEvent", "showEvent", "rangeSelect", "daySelect", "dayClick"] }, { kind: "component", type: CalendarMonthComponent, selector: "bc-calendar-month", inputs: ["monthWeeksCount", "weekDays", "weekDaysMin", "today", "containerHeight", "days", "calendarFields", "rtl", "deviceSize", "moDataList", "datePicker", "rangePicker", "canDelete", "canAdd", "canEdit", "selectedDate", "startSelectedDayIndex", "endSelectedDayIndex"], outputs: ["editEvent", "deleteEvent", "daySelect", "dayClick", "dayMouseMove", "dayMouseUp", "dayMouseDown", "showEvent"] }, { kind: "component", type: CalendarHeaderComponent, selector: "bc-calendar-header", inputs: ["monthInfo", "weekModeDays", "hideMode", "modeTitle", "title", "deviceSize", "rtl", "mode"], outputs: ["prevTap", "nextTap", "modeChange", "rangeChange", "today"] }, { kind: "component", type: CalendarSelectionDaysComponent, selector: "bc-calendar-selection-days", inputs: ["startSelectedDayIndex", "endSelectedDayIndex", "monthInfo", "inline"], outputs: ["rangeChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2693
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CalendarContainerComponent, decorators: [{
|
|
2694
|
-
type: Component,
|
|
2695
|
-
args: [{ selector: 'bc-calendar-container', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2696
|
-
{
|
|
2697
|
-
provide: DateService,
|
|
2698
|
-
useFactory: getDateService,
|
|
2699
|
-
deps: [LogService]
|
|
2700
|
-
}
|
|
2701
|
-
], template: "<div style=\"display: flex; width: 100%; height: 100%; flex-direction: row\">\r\n <div style=\"width: 320px; height: 100%\" *ngIf=\"deviceSize !== 's' && deviceSize !== 'm'\">\r\n <bc-calendar-selection-days\r\n [inline]=\"true\"\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n ></bc-calendar-selection-days>\r\n <div style=\"height: 1px; background: #ccc\"></div>\r\n <div *ngIf=\"userCalendars?.Data?.MoDataList?.length\">\r\n <h4>\u062A\u0642\u0648\u06CC\u0645\u200C\u0647\u0627\u06CC\u200C\u0645\u0646</h4>\r\n <ng-container *ngFor=\"let calendar of userCalendars.Data.MoDataList\">\r\n <ul fd-list>\r\n <li fd-list-item style=\"padding: 0\" class=\"user-calendar\">\r\n <span\r\n [style.background]=\"calendar.Color ? calendar.Color : null\"\r\n style=\"width: 5px; height: 100%; position: absolute\"\r\n ></span>\r\n <fd-checkbox\r\n [(ngModel)]=\"calendar.$IsChecked\"\r\n (change)=\"onCalendarCheckChange(calendar)\"\r\n ></fd-checkbox>\r\n <span fd-list-title>{{ calendar.$Caption }}</span>\r\n </li>\r\n </ul>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div style=\"flex: 1\" #divRef>\r\n <bc-calendar-header\r\n [monthInfo]=\"(selectedMonth$ | async)!!\"\r\n [weekModeDays]=\"(weekModeDays$ | async)!!\"\r\n [rtl]=\"rtl\"\r\n [deviceSize]=\"deviceSize\"\r\n [mode]=\"(mode$ | async)!!\"\r\n [modeTitle]=\"(modeTitle$ | async)!!\"\r\n [title]=\"(title$ | async)!!\"\r\n (modeChange)=\"onModeChange($event)\"\r\n (prevTap)=\"onPrevTap()\"\r\n (nextTap)=\"onNextTap()\"\r\n (today)=\"onToday()\"\r\n (rangeChange)=\"onRangeChange($event)\"\r\n >\r\n </bc-calendar-header>\r\n <ng-container [ngSwitch]=\"mode$ | async\">\r\n <ng-container *ngSwitchCase=\"'week'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n weekCalendar;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n weekModeDays: weekModeDays$ | async,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'day'\">\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n weekCalendar;\r\n context: {\r\n $implicit: selectedMonth$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n weekModeDays: weekModeDays$ | async,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'list'\"></ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n monthCalendar;\r\n context: {\r\n $implicit: days$ | async,\r\n moDataList: eventMoDataList$ | async,\r\n width: width,\r\n height: height,\r\n rtl: rtl,\r\n showEvents: showEvents,\r\n today: today,\r\n deviceSize: deviceSize,\r\n calendarFields: calendarFields,\r\n monthWeeksCount: monthWeeksCount$ | async,\r\n access: access\r\n }\r\n \"\r\n ></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n<ng-template\r\n #monthCalendar\r\n let-days\r\n let-moDataList=\"moDataList\"\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-calendarFields=\"calendarFields\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-monthWeeksCount=\"monthWeeksCount\"\r\n let-access=\"access\"\r\n>\r\n <bc-calendar-month\r\n [style.width]=\"width\"\r\n [containerHeight]=\"parentHeight !== 0 ? parentHeight : height\"\r\n [containerWidth]=\"width\"\r\n [calendarFields]=\"calendarFields\"\r\n [moDataList]=\"moDataList\"\r\n [monthWeeksCount]=\"monthWeeksCount\"\r\n [rtl]=\"rtl\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [showEvents]=\"showEvents\"\r\n [days]=\"days\"\r\n [canAdd]=\"access.Add\"\r\n [canEdit]=\"access.Edit\"\r\n [canDelete]=\"access.Delete\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event)\"\r\n (showEvent)=\"onShowTask()\"\r\n (deleteEvent)=\"deleteTask.emit($event)\"\r\n (editEvent)=\"editTask.emit($event)\"\r\n (daySelect)=\"daySelect.emit($event)\"\r\n ></bc-calendar-month>\r\n</ng-template>\r\n\r\n<ng-template #listCalendar>\r\n <bc-calendar-list-container\r\n [showEvents]=\"showEvents\"\r\n [selectedDay]=\"selectedDay\"\r\n [calendarFields]=\"calendarFields\"\r\n (showEventsTap)=\"showEvents = !showEvents\"\r\n ></bc-calendar-list-container>\r\n</ng-template>\r\n\r\n<ng-template\r\n #weekCalendar\r\n let-selectedMonth\r\n let-moDataList=\"moDataList\"\r\n let-width=\"width\"\r\n let-height=\"height\"\r\n let-calendarFields=\"calendarFields\"\r\n let-rtl=\"rtl\"\r\n let-today=\"today\"\r\n let-showEvents=\"showEvents\"\r\n let-deviceSize=\"deviceSize\"\r\n let-weekModeDays=\"weekModeDays\"\r\n let-access=\"access\"\r\n>\r\n <bc-calendar-week\r\n [style.width]=\"width\"\r\n [containerHeight]=\"parentHeight !== 0 ? parentHeight : height\"\r\n [containerWidth]=\"width\"\r\n [inDialog]=\"inDialog\"\r\n [calendarFields]=\"calendarFields\"\r\n [moDataList]=\"moDataList\"\r\n [rtl]=\"rtl\"\r\n [canAdd]=\"access.Add\"\r\n [canEdit]=\"access.Edit\"\r\n [canDelete]=\"access.Delete\"\r\n [weekDays]=\"weekDays\"\r\n [weekDaysMin]=\"weekDaysMin\"\r\n [today]=\"today\"\r\n [showEvents]=\"showEvents\"\r\n [days]=\"weekModeDays\"\r\n [deviceSize]=\"deviceSize\"\r\n (dayClick)=\"onDayClick($event)\"\r\n (showEvent)=\"onShowTask()\"\r\n (deleteEvent)=\"deleteTask.emit($event)\"\r\n (editEvent)=\"editTask.emit($event)\"\r\n (daySelect)=\"daySelect.emit($event)\"\r\n (rangeSelect)=\"onRangeSelect($event)\"\r\n ></bc-calendar-week>\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%;height:100%}:host ::ng-deep li.user-calendar .fd-list__form-item{padding:.5rem}\n"] }]
|
|
2702
|
-
}], ctorParameters: function () { return [{ type: i3.TitleCasePipe }, { type: i2.BbbTranslatePipe }, { type: CalendarService }, { type: i2.DateService }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i2.FindColumnByDbNamePipe }, { type: i2.UlvMainService }, { type: i2.PortalService }]; }, propDecorators: { _divRef: [{
|
|
2703
|
-
type: ViewChild,
|
|
2704
|
-
args: ['divRef', { static: true }]
|
|
2705
|
-
}], calendarFields: [{
|
|
2706
|
-
type: Input
|
|
2707
|
-
}], userCalendars: [{
|
|
2708
|
-
type: Input
|
|
2709
|
-
}], viewSetting: [{
|
|
2710
|
-
type: Input
|
|
2711
|
-
}], deleteTask: [{
|
|
2712
|
-
type: Output
|
|
2713
|
-
}], editTask: [{
|
|
2714
|
-
type: Output
|
|
2715
|
-
}], rangeSelect: [{
|
|
2716
|
-
type: Output
|
|
2717
|
-
}], daySelect: [{
|
|
2718
|
-
type: Output
|
|
2719
|
-
}], loadData: [{
|
|
2720
|
-
type: Output
|
|
2721
|
-
}] } });
|
|
2722
|
-
|
|
2723
|
-
const components = [
|
|
2724
|
-
CalendarContainerComponent,
|
|
2725
|
-
CalendarListComponent,
|
|
2726
|
-
CalendarListContainerComponent,
|
|
2727
|
-
CalendarListItemComponent,
|
|
2728
|
-
CalendarWeekComponent,
|
|
2729
|
-
CalendarMonthComponent,
|
|
2730
|
-
MonthDaysComponent,
|
|
2731
|
-
CalendarHeaderComponent,
|
|
2732
|
-
EventPreviewComponent,
|
|
2733
|
-
DayNumberBoxComponent,
|
|
2734
|
-
EventButtonComponent,
|
|
2735
|
-
DayEventListComponent,
|
|
2736
|
-
EventButtonEndArrowComponent,
|
|
2737
|
-
EventButtonStartArrowComponent
|
|
2738
|
-
];
|
|
2739
|
-
const pipes = [DaysInWeekPipe, EventDatePipe, EventTimePipe, FromToTimePipe, EqualDatePipe];
|
|
2740
|
-
class BarsaCalendarModule extends BaseModule {
|
|
2741
|
-
constructor(dcm, componentFactoryResolver) {
|
|
2742
|
-
super(dcm, componentFactoryResolver, 'BarsaCalendarModule');
|
|
2743
|
-
this.dcm = dcm;
|
|
2744
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
2745
|
-
this.dynamicComponents = [...components];
|
|
2746
|
-
}
|
|
2747
|
-
}
|
|
2748
|
-
BarsaCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaCalendarModule, deps: [{ token: i2.DynamicComponentService }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2749
|
-
BarsaCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: BarsaCalendarModule, declarations: [CalendarContainerComponent,
|
|
2750
|
-
CalendarListComponent,
|
|
2751
|
-
CalendarListContainerComponent,
|
|
2752
|
-
CalendarListItemComponent,
|
|
2753
|
-
CalendarWeekComponent,
|
|
2754
|
-
CalendarMonthComponent,
|
|
2755
|
-
MonthDaysComponent,
|
|
2756
|
-
CalendarHeaderComponent,
|
|
2757
|
-
EventPreviewComponent,
|
|
2758
|
-
DayNumberBoxComponent,
|
|
2759
|
-
EventButtonComponent,
|
|
2760
|
-
DayEventListComponent,
|
|
2761
|
-
EventButtonEndArrowComponent,
|
|
2762
|
-
EventButtonStartArrowComponent, DaysInWeekPipe, EventDatePipe, EventTimePipe, FromToTimePipe, EqualDatePipe, DateTimePickerComponent, CalendarSelectionDaysComponent], imports: [CommonModule,
|
|
2763
|
-
FormsModule,
|
|
2764
|
-
BarsaNovinRayCoreModule,
|
|
2765
|
-
FundamentalNgxCoreModule,
|
|
2766
|
-
PopoverModule,
|
|
2767
|
-
CardModule,
|
|
2768
|
-
QuickViewModule], exports: [CalendarContainerComponent,
|
|
2769
|
-
CalendarListComponent,
|
|
2770
|
-
CalendarListContainerComponent,
|
|
2771
|
-
CalendarListItemComponent,
|
|
2772
|
-
CalendarWeekComponent,
|
|
2773
|
-
CalendarMonthComponent,
|
|
2774
|
-
MonthDaysComponent,
|
|
2775
|
-
CalendarHeaderComponent,
|
|
2776
|
-
EventPreviewComponent,
|
|
2777
|
-
DayNumberBoxComponent,
|
|
2778
|
-
EventButtonComponent,
|
|
2779
|
-
DayEventListComponent,
|
|
2780
|
-
EventButtonEndArrowComponent,
|
|
2781
|
-
EventButtonStartArrowComponent, DateTimePickerComponent, CalendarSelectionDaysComponent] });
|
|
2782
|
-
BarsaCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaCalendarModule, providers: [TitleCasePipe, CalendarService, ...pipes], imports: [CommonModule,
|
|
2783
|
-
FormsModule,
|
|
2784
|
-
BarsaNovinRayCoreModule,
|
|
2785
|
-
FundamentalNgxCoreModule,
|
|
2786
|
-
PopoverModule,
|
|
2787
|
-
CardModule,
|
|
2788
|
-
QuickViewModule] });
|
|
2789
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaCalendarModule, decorators: [{
|
|
2790
|
-
type: NgModule,
|
|
2791
|
-
args: [{
|
|
2792
|
-
schemas: [NO_ERRORS_SCHEMA],
|
|
2793
|
-
imports: [
|
|
2794
|
-
CommonModule,
|
|
2795
|
-
FormsModule,
|
|
2796
|
-
BarsaNovinRayCoreModule,
|
|
2797
|
-
FundamentalNgxCoreModule,
|
|
2798
|
-
PopoverModule,
|
|
2799
|
-
CardModule,
|
|
2800
|
-
QuickViewModule
|
|
2801
|
-
],
|
|
2802
|
-
declarations: [...components, ...pipes, DateTimePickerComponent, CalendarSelectionDaysComponent],
|
|
2803
|
-
providers: [TitleCasePipe, CalendarService, ...pipes],
|
|
2804
|
-
exports: [...components, DateTimePickerComponent, CalendarSelectionDaysComponent]
|
|
2805
|
-
}]
|
|
2806
|
-
}], ctorParameters: function () { return [{ type: i2.DynamicComponentService }, { type: i0.ComponentFactoryResolver }]; } });
|
|
2807
|
-
|
|
2808
|
-
/**
|
|
2809
|
-
* Generated bundle index. Do not edit.
|
|
2810
|
-
*/
|
|
2811
|
-
|
|
2812
|
-
export { BarsaCalendarModule, CalendarContainerComponent, CalendarHeaderComponent, CalendarListComponent, CalendarListContainerComponent, CalendarListItemComponent, CalendarMonthComponent, CalendarMonthInfo, CalendarSelectionDaysComponent, CalendarService, CalendarWeekComponent, DateTimePickerComponent, DayEventListComponent, DayNumberBoxComponent, DayStatus, EventButtonComponent, EventButtonEndArrowComponent, EventButtonStartArrowComponent, EventPreviewComponent, MonthDaysComponent, TimeConfigI18n };
|
|
2813
|
-
//# sourceMappingURL=barsa-calendar.mjs.map
|