@progress/kendo-angular-scheduler 14.4.0-develop.9 → 15.0.0-develop.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/NOTICE.txt +146 -593
- package/editing/date-time-picker.component.d.ts +4 -0
- package/editing/recurrence/recurrence-end-rule-editor.component.d.ts +3 -3
- package/editing/recurrence/recurrence-interval-editor.component.d.ts +3 -3
- package/editing/recurrence/recurrence-monthly-yearly-editor.component.d.ts +3 -3
- package/esm2020/editing/date-time-picker.component.mjs +62 -8
- package/esm2020/editing/recurrence/recurrence-end-rule-editor.component.mjs +35 -9
- package/esm2020/editing/recurrence/recurrence-interval-editor.component.mjs +19 -7
- package/esm2020/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +19 -7
- package/esm2020/editing/resource-multiple-editor.component.mjs +1 -1
- package/esm2020/editing/timezone-editor.component.mjs +1 -1
- package/esm2020/index.mjs +1 -0
- package/esm2020/localization/messages.mjs +35 -1
- package/esm2020/navigation/shortcuts.directive.mjs +9 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/scheduler.component.mjs +200 -98
- package/esm2020/scheduler.module.mjs +8 -1
- package/esm2020/toolbar/navigation.component.mjs +9 -1
- package/esm2020/toolbar/toolbar.component.mjs +25 -3
- package/esm2020/views/timeline/timeline-month-view.component.mjs +13 -5
- package/esm2020/views/timeline/timeline-view.component.mjs +13 -5
- package/esm2020/views/timeline/timeline-week-view.component.mjs +12 -5
- package/esm2020/views/year/utils.mjs +60 -0
- package/esm2020/views/year/year-view-internal.component.mjs +418 -0
- package/esm2020/views/year/year-view.component.mjs +115 -0
- package/esm2020/views/year/year-view.module.mjs +47 -0
- package/fesm2015/progress-kendo-angular-scheduler.mjs +1043 -157
- package/fesm2020/progress-kendo-angular-scheduler.mjs +1037 -157
- package/index.d.ts +1 -0
- package/localization/messages.d.ts +118 -50
- package/package.json +13 -12
- package/scheduler.module.d.ts +15 -13
- package/schematics/ngAdd/index.js +2 -2
- package/toolbar/navigation.component.d.ts +10 -2
- package/toolbar/toolbar.component.d.ts +9 -0
- package/types/scheduler-slot.interface.d.ts +4 -0
- package/types/slot-class-args.interface.d.ts +4 -0
- package/views/timeline/timeline-month-view.component.d.ts +4 -1
- package/views/timeline/timeline-view.component.d.ts +4 -1
- package/views/timeline/timeline-week-view.component.d.ts +3 -1
- package/views/year/utils.d.ts +21 -0
- package/views/year/year-view-internal.component.d.ts +82 -0
- package/views/year/year-view.component.d.ts +56 -0
- package/views/year/year-view.module.d.ts +19 -0
|
@@ -191,7 +191,7 @@ export class ToolbarNavigationComponent {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
ToolbarNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarNavigationComponent, deps: [{ token: i1.PopupService }, { token: i2.ToolbarService }, { token: i3.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i4.ViewContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
-
ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarNavigationComponent, selector: "[kendoSchedulerToolbarNavigation]", inputs: { min: "min", max: "max" }, host: { properties: { "class.k-toolbar-group": "this.hostClass" } }, providers: [
|
|
194
|
+
ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarNavigationComponent, selector: "[kendoSchedulerToolbarNavigation]", inputs: { min: "min", max: "max", activeView: "activeView", bottomView: "bottomView" }, host: { properties: { "class.k-toolbar-group": "this.hostClass" } }, providers: [
|
|
195
195
|
PopupService
|
|
196
196
|
], viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], ngImport: i0, template: `
|
|
197
197
|
<span class="k-scheduler-navigation k-button-group k-button-group-solid" role="group">
|
|
@@ -249,6 +249,8 @@ ToolbarNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
249
249
|
<kendo-calendar
|
|
250
250
|
#calendar
|
|
251
251
|
(blur)="onBlur()"
|
|
252
|
+
[activeView]="activeView"
|
|
253
|
+
[bottomView]="bottomView"
|
|
252
254
|
(keydown.escape)="toggleSelectedDate({ nativeElement: anchor }, template); anchor.focus();"
|
|
253
255
|
(valueChange)="selectDate($event)"
|
|
254
256
|
[value]="ctx.selectedDate | async" [min]="min" [max]="max">
|
|
@@ -322,6 +324,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
322
324
|
<kendo-calendar
|
|
323
325
|
#calendar
|
|
324
326
|
(blur)="onBlur()"
|
|
327
|
+
[activeView]="activeView"
|
|
328
|
+
[bottomView]="bottomView"
|
|
325
329
|
(keydown.escape)="toggleSelectedDate({ nativeElement: anchor }, template); anchor.focus();"
|
|
326
330
|
(valueChange)="selectDate($event)"
|
|
327
331
|
[value]="ctx.selectedDate | async" [min]="min" [max]="max">
|
|
@@ -341,4 +345,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
341
345
|
type: Input
|
|
342
346
|
}], max: [{
|
|
343
347
|
type: Input
|
|
348
|
+
}], activeView: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], bottomView: [{
|
|
351
|
+
type: Input
|
|
344
352
|
}] } });
|
|
@@ -31,6 +31,18 @@ export class ToolbarComponent {
|
|
|
31
31
|
this.subs = new Subscription();
|
|
32
32
|
this.subs.add(service.action.subscribe(action => this.navigate.next(action)));
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
get activeView() {
|
|
38
|
+
return this.service.context.selectedView?.name === 'year' ? 'decade' : 'month';
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
get bottomView() {
|
|
44
|
+
return this.service.context.selectedView?.name === 'year' ? 'decade' : 'month';
|
|
45
|
+
}
|
|
34
46
|
ngOnInit() {
|
|
35
47
|
this.subs.add(this.selectedDate.subscribe(date => this.templateContext.selectedDate = date));
|
|
36
48
|
this.subs.add(this.dateRange.subscribe(dateRange => this.templateContext.dateRange = dateRange));
|
|
@@ -70,13 +82,18 @@ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
70
82
|
</ng-template>
|
|
71
83
|
|
|
72
84
|
<ng-template #defaultTemplate>
|
|
73
|
-
<div kendoSchedulerToolbarNavigation
|
|
85
|
+
<div kendoSchedulerToolbarNavigation
|
|
86
|
+
[min]="min"
|
|
87
|
+
[max]="max"
|
|
88
|
+
[activeView]="activeView"
|
|
89
|
+
[bottomView]="bottomView">
|
|
90
|
+
</div>
|
|
74
91
|
<span class="k-spacer"></span>
|
|
75
92
|
<div kendoSchedulerToolbarViewSelector [toolbarWidth]="toolbarWidth"></div>
|
|
76
93
|
</ng-template>
|
|
77
94
|
|
|
78
95
|
<kendo-resize-sensor (resize)="resizeHandler()" [style]="'display: contents;'"></kendo-resize-sensor>
|
|
79
|
-
`, isInline: true, components: [{ type: i2.ToolbarNavigationComponent, selector: "[kendoSchedulerToolbarNavigation]", inputs: ["min", "max"] }, { type: i3.ToolbarViewSelectorComponent, selector: "[kendoSchedulerToolbarViewSelector]", inputs: ["toolbarWidth", "responsiveBreakpoint"] }, { type: i4.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
96
|
+
`, isInline: true, components: [{ type: i2.ToolbarNavigationComponent, selector: "[kendoSchedulerToolbarNavigation]", inputs: ["min", "max", "activeView", "bottomView"] }, { type: i3.ToolbarViewSelectorComponent, selector: "[kendoSchedulerToolbarViewSelector]", inputs: ["toolbarWidth", "responsiveBreakpoint"] }, { type: i4.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
80
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
81
98
|
type: Component,
|
|
82
99
|
args: [{
|
|
@@ -90,7 +107,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
90
107
|
</ng-template>
|
|
91
108
|
|
|
92
109
|
<ng-template #defaultTemplate>
|
|
93
|
-
<div kendoSchedulerToolbarNavigation
|
|
110
|
+
<div kendoSchedulerToolbarNavigation
|
|
111
|
+
[min]="min"
|
|
112
|
+
[max]="max"
|
|
113
|
+
[activeView]="activeView"
|
|
114
|
+
[bottomView]="bottomView">
|
|
115
|
+
</div>
|
|
94
116
|
<span class="k-spacer"></span>
|
|
95
117
|
<div kendoSchedulerToolbarViewSelector [toolbarWidth]="toolbarWidth"></div>
|
|
96
118
|
</ng-template>
|
|
@@ -22,11 +22,7 @@ import * as i6 from "../common/work-hours-footer.directive";
|
|
|
22
22
|
export class TimelineMonthViewComponent extends TimelineBase {
|
|
23
23
|
constructor(localization, changeDetector, viewContext, viewState) {
|
|
24
24
|
super(localization, changeDetector, viewContext, viewState);
|
|
25
|
-
|
|
26
|
-
* Specifies the number of months that the view will render.
|
|
27
|
-
* @default 1
|
|
28
|
-
*/
|
|
29
|
-
this.numberOfMonths = 1;
|
|
25
|
+
this._numberOfMonths = 1;
|
|
30
26
|
/**
|
|
31
27
|
* The invariant name for this view.
|
|
32
28
|
* @default 'timelineMonth'
|
|
@@ -89,6 +85,18 @@ export class TimelineMonthViewComponent extends TimelineBase {
|
|
|
89
85
|
}
|
|
90
86
|
return this.numberOfMonths && this.numberOfMonths > 1 ? '{0:y} - {1:y}' : '{0:y}';
|
|
91
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Specifies the number of months that the view will render.
|
|
90
|
+
* > Normalized to `1` if the provided value is <= 0.
|
|
91
|
+
* @default 1
|
|
92
|
+
*/
|
|
93
|
+
set numberOfMonths(months) {
|
|
94
|
+
this._numberOfMonths = months > 0 ? months : 1;
|
|
95
|
+
}
|
|
96
|
+
;
|
|
97
|
+
get numberOfMonths() {
|
|
98
|
+
return this._numberOfMonths;
|
|
99
|
+
}
|
|
92
100
|
}
|
|
93
101
|
TimelineMonthViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimelineMonthViewComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.ViewContextService }, { token: i3.ViewStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
94
102
|
TimelineMonthViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimelineMonthViewComponent, selector: "kendo-scheduler-timeline-month-view", inputs: { selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", numberOfMonths: "numberOfMonths" }, providers: [{
|
|
@@ -21,11 +21,7 @@ import * as i6 from "../common/work-hours-footer.directive";
|
|
|
21
21
|
export class TimelineViewComponent extends TimelineBase {
|
|
22
22
|
constructor(localization, changeDetector, viewContext, viewState) {
|
|
23
23
|
super(localization, changeDetector, viewContext, viewState);
|
|
24
|
-
|
|
25
|
-
* Specifies the number of days that the view will render.
|
|
26
|
-
* @default 1
|
|
27
|
-
*/
|
|
28
|
-
this.numberOfDays = 1;
|
|
24
|
+
this._numberOfDays = 1;
|
|
29
25
|
/**
|
|
30
26
|
* The invariant name for this view.
|
|
31
27
|
* @default 'timeline'
|
|
@@ -70,6 +66,18 @@ export class TimelineViewComponent extends TimelineBase {
|
|
|
70
66
|
}
|
|
71
67
|
return this.numberOfDays && this.numberOfDays > 1 ? '{0:d} - {1:d}' : '{0:d}';
|
|
72
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Specifies the number of days that the view will render.
|
|
71
|
+
* > Normalized to `1` if the provided value is <= 0.
|
|
72
|
+
* @default 1
|
|
73
|
+
*/
|
|
74
|
+
set numberOfDays(days) {
|
|
75
|
+
this._numberOfDays = days > 0 ? days : 1;
|
|
76
|
+
}
|
|
77
|
+
;
|
|
78
|
+
get numberOfDays() {
|
|
79
|
+
return this._numberOfDays;
|
|
80
|
+
}
|
|
73
81
|
}
|
|
74
82
|
TimelineViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimelineViewComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.ViewContextService }, { token: i3.ViewStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
75
83
|
TimelineViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimelineViewComponent, selector: "kendo-scheduler-timeline-view", inputs: { selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", numberOfDays: "numberOfDays" }, providers: [{
|
|
@@ -42,11 +42,7 @@ export class TimelineWeekViewComponent extends TimelineBase {
|
|
|
42
42
|
* @default '{0:d} - {1:d}'
|
|
43
43
|
*/
|
|
44
44
|
this.selectedShortDateFormat = '{0:d} - {1:d}';
|
|
45
|
-
|
|
46
|
-
* Specifies the number of weeks that the view will render.
|
|
47
|
-
* @default 1
|
|
48
|
-
*/
|
|
49
|
-
this.numberOfWeeks = 1;
|
|
45
|
+
this._numberOfWeeks = 1;
|
|
50
46
|
/**
|
|
51
47
|
* The invariant name for this view.
|
|
52
48
|
* @default 'timelineWeek'
|
|
@@ -65,6 +61,17 @@ export class TimelineWeekViewComponent extends TimelineBase {
|
|
|
65
61
|
get title() {
|
|
66
62
|
return this.localization.get('timelineWeekViewTitle');
|
|
67
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the number of weeks that the view will render.
|
|
66
|
+
* @default 1
|
|
67
|
+
*/
|
|
68
|
+
set numberOfWeeks(weeks) {
|
|
69
|
+
this._numberOfWeeks = weeks > 0 ? weeks : 1;
|
|
70
|
+
}
|
|
71
|
+
;
|
|
72
|
+
get numberOfWeeks() {
|
|
73
|
+
return this._numberOfWeeks;
|
|
74
|
+
}
|
|
68
75
|
}
|
|
69
76
|
TimelineWeekViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimelineWeekViewComponent, deps: [{ token: i1.IntlService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i3.ViewContextService }, { token: i4.ViewStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
77
|
TimelineWeekViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimelineWeekViewComponent, selector: "kendo-scheduler-timeline-week-view", inputs: { selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", numberOfWeeks: "numberOfWeeks" }, providers: [{
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { intersects, toUTCDate, toUTCDateTime } from '../utils';
|
|
6
|
+
import { sortTasksByTime } from '../../common/util';
|
|
7
|
+
import { addDays } from '@progress/kendo-date-math';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export const createTasks = (periodStart, periodEnd, items, ranges) => {
|
|
12
|
+
const tasks = [];
|
|
13
|
+
const utcStart = toUTCDateTime(periodStart);
|
|
14
|
+
const utcEnd = toUTCDateTime(periodEnd);
|
|
15
|
+
for (let index = 0; index < items.length; index++) {
|
|
16
|
+
const item = items[index];
|
|
17
|
+
const data = {};
|
|
18
|
+
const startTime = item.start.toUTCDate();
|
|
19
|
+
const end = item.end;
|
|
20
|
+
const endTime = (item.end.getTime() !== end.getTime() ? end.addDays(1) : end).toUTCDate();
|
|
21
|
+
if (intersects(startTime, endTime, utcStart, utcEnd)) {
|
|
22
|
+
for (let rangeIdx = 0; rangeIdx < ranges.length; rangeIdx++) {
|
|
23
|
+
const range = ranges[rangeIdx];
|
|
24
|
+
const rangeStart = toUTCDate(range);
|
|
25
|
+
const rangeEnd = toUTCDate(addDays(range, 1));
|
|
26
|
+
if (intersects(startTime, endTime, rangeStart, rangeEnd)) {
|
|
27
|
+
const task = {
|
|
28
|
+
index,
|
|
29
|
+
startTime: startTime > rangeStart ? startTime : rangeStart,
|
|
30
|
+
endTime: endTime < rangeEnd ? endTime : rangeEnd,
|
|
31
|
+
start: item.start,
|
|
32
|
+
end: item.end,
|
|
33
|
+
event: item.event,
|
|
34
|
+
isAllDay: item.event.isAllDay,
|
|
35
|
+
rangeIndex: rangeIdx,
|
|
36
|
+
data: data
|
|
37
|
+
};
|
|
38
|
+
task.head = endTime > rangeEnd && startTime > rangeStart;
|
|
39
|
+
task.tail = startTime < rangeStart && endTime < rangeEnd;
|
|
40
|
+
task.mid = endTime > rangeEnd && startTime < rangeStart;
|
|
41
|
+
task.isMultiDay = task.head || task.mid || task.tail;
|
|
42
|
+
tasks.push(task);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return sortTasksByTime(tasks);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export const noop = (_) => { };
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
export const yearEnd = (year) => new Date(year, 11, 31, 23, 59, 59, 999);
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export const yearStart = (year) => new Date(year, 0, 1, 0, 0, 0, 0);
|