@progress/kendo-angular-dateinputs 5.2.4-dev.202110261444 → 5.3.0-dev.202110290637
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/dist/cdn/js/kendo-angular-dateinputs.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +33 -2
- package/dist/es/calendar/multiview-calendar.component.js +39 -2
- package/dist/es/calendar/services/century-view.service.js +7 -1
- package/dist/es/calendar/services/decade-view.service.js +6 -1
- package/dist/es/calendar/services/month-view.service.js +3 -0
- package/dist/es/calendar/services/year-view.service.js +5 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/calendar/calendar.component.d.ts +17 -0
- package/dist/es2015/calendar/calendar.component.js +34 -2
- package/dist/es2015/calendar/models/view-service.interface.d.ts +1 -0
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +20 -1
- package/dist/es2015/calendar/multiview-calendar.component.js +41 -4
- package/dist/es2015/calendar/services/century-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/century-view.service.js +7 -1
- package/dist/es2015/calendar/services/decade-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/decade-view.service.js +6 -1
- package/dist/es2015/calendar/services/month-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/month-view.service.js +3 -0
- package/dist/es2015/calendar/services/year-view.service.d.ts +1 -0
- package/dist/es2015/calendar/services/year-view.service.js +5 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +95 -8
- package/dist/fesm5/index.js +92 -6
- package/dist/npm/calendar/calendar.component.js +33 -2
- package/dist/npm/calendar/multiview-calendar.component.js +39 -2
- package/dist/npm/calendar/services/century-view.service.js +6 -0
- package/dist/npm/calendar/services/decade-view.service.js +5 -0
- package/dist/npm/calendar/services/month-view.service.js +3 -0
- package/dist/npm/calendar/services/year-view.service.js +4 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +1 -1
|
@@ -160,6 +160,11 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
160
160
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
161
161
|
*/
|
|
162
162
|
this.activeViewChange = new core_1.EventEmitter();
|
|
163
|
+
/**
|
|
164
|
+
* Fires when navigating in the currently active view
|
|
165
|
+
* ([more information and example]({% slug events_multiviewcalendar %})).
|
|
166
|
+
*/
|
|
167
|
+
this.navigate = new core_1.EventEmitter();
|
|
163
168
|
/**
|
|
164
169
|
* Fires when a view cell is entered
|
|
165
170
|
* ([more information and example]({% slug overview_multiviewcalendar %}#toc-events)).
|
|
@@ -492,6 +497,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
492
497
|
}
|
|
493
498
|
this.focusedDate = candidate;
|
|
494
499
|
event.preventDefault();
|
|
500
|
+
var isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
501
|
+
if (!isSameView) {
|
|
502
|
+
this.emitNavigate(this.focusedDate);
|
|
503
|
+
}
|
|
495
504
|
};
|
|
496
505
|
MultiViewCalendarComponent.prototype.ngOnInit = function () {
|
|
497
506
|
var _this = this;
|
|
@@ -580,6 +589,18 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
580
589
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
581
590
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
582
591
|
};
|
|
592
|
+
/**
|
|
593
|
+
* @hidden
|
|
594
|
+
*/
|
|
595
|
+
MultiViewCalendarComponent.prototype.handleTodayButtonClick = function (args) {
|
|
596
|
+
var todayDate = args.focusedDate;
|
|
597
|
+
var isSameView = this.bus.service(this.activeViewEnum).isInArray(todayDate, this.viewList.dates);
|
|
598
|
+
var isBottomView = !this.bus.canMoveDown(this.activeViewEnum);
|
|
599
|
+
if (!isSameView && isBottomView) {
|
|
600
|
+
this.emitNavigate(todayDate);
|
|
601
|
+
}
|
|
602
|
+
this.handleDateChange(args);
|
|
603
|
+
};
|
|
583
604
|
/**
|
|
584
605
|
* @hidden
|
|
585
606
|
*/
|
|
@@ -646,9 +667,17 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
646
667
|
/**
|
|
647
668
|
* @hidden
|
|
648
669
|
*/
|
|
649
|
-
MultiViewCalendarComponent.prototype.
|
|
670
|
+
MultiViewCalendarComponent.prototype.navigateView = function (action) {
|
|
650
671
|
this.focusedDate = this.viewList.navigate(action);
|
|
651
672
|
this.updateButtonState();
|
|
673
|
+
this.emitNavigate(this.focusedDate);
|
|
674
|
+
};
|
|
675
|
+
/**
|
|
676
|
+
* @hidden
|
|
677
|
+
*/
|
|
678
|
+
MultiViewCalendarComponent.prototype.emitNavigate = function (focusedDate) {
|
|
679
|
+
var activeView = view_enum_1.CalendarViewEnum[this.activeViewEnum];
|
|
680
|
+
this.navigate.emit({ activeView: activeView, focusedDate: focusedDate });
|
|
652
681
|
};
|
|
653
682
|
/**
|
|
654
683
|
* @hidden
|
|
@@ -666,6 +695,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
666
695
|
MultiViewCalendarComponent.prototype.handleCellClick = function (_a) {
|
|
667
696
|
var date = _a.date, modifiers = _a.modifiers;
|
|
668
697
|
this.performSelection(date, modifiers);
|
|
698
|
+
var isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
699
|
+
if (!isSameView) {
|
|
700
|
+
this.emitNavigate(this.focusedDate);
|
|
701
|
+
}
|
|
669
702
|
};
|
|
670
703
|
/**
|
|
671
704
|
* @hidden
|
|
@@ -838,6 +871,10 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
838
871
|
core_1.Output(),
|
|
839
872
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
840
873
|
], MultiViewCalendarComponent.prototype, "activeViewChange", void 0);
|
|
874
|
+
tslib_1.__decorate([
|
|
875
|
+
core_1.Output(),
|
|
876
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
877
|
+
], MultiViewCalendarComponent.prototype, "navigate", void 0);
|
|
841
878
|
tslib_1.__decorate([
|
|
842
879
|
core_1.Output(),
|
|
843
880
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -1003,7 +1040,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
1003
1040
|
selection_service_1.SelectionService
|
|
1004
1041
|
],
|
|
1005
1042
|
selector: 'kendo-multiviewcalendar',
|
|
1006
|
-
template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"
|
|
1043
|
+
template: "\n <ng-container kendoMultiViewCalendarLocalizedMessages\n i18n-today=\"kendo.multiviewcalendar.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.multiviewcalendar.prevButtonTitle|The label for the previous button in the Multiview calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.multiviewcalendar.nextButtonTitle|The label for the next button in the Multiview calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-calendar-header\n [activeView]=\"activeViewEnum\"\n [currentDate]=\"activeDate\"\n [min]=\"min\"\n [max]=\"max\"\n [rangeLength]=\"views\"\n [templateRef]=\"headerTitleTemplate?.templateRef\"\n [isPrevDisabled]=\"isPrevDisabled\"\n [isNextDisabled]=\"isNextDisabled\"\n [showNavigationButtons]=\"true\"\n (todayButtonClick)=\"handleTodayButtonClick({ selectedDates: [$event], focusedDate: $event })\"\n (prevButtonClick)=\"navigateView(prevView)\"\n (nextButtonClick)=\"navigateView(nextView)\"\n >\n </kendo-calendar-header>\n <kendo-calendar-horizontal\n [activeView]=\"activeViewEnum\"\n [isActive]=\"isActive || isHovered\"\n [cellTemplateRef]=\"activeCellTemplate()?.templateRef\"\n [weekNumberTemplateRef]=\"weekNumberTemplate?.templateRef\"\n [cellUID]=\"cellUID\"\n [views]=\"views\"\n [min]=\"min\"\n [max]=\"max\"\n [focusedDate]=\"focusedDate\"\n [animateNavigation]=\"animateNavigation\"\n [showViewHeader]=\"showViewHeader\"\n [weekNumber]=\"weekNumber\"\n [activeRangeEnd]=\"activeRangeEnd\"\n [selectionRange]=\"selectionRange\"\n [selectedDates]=\"selectedDates\"\n (valueChange)=\"handleDateChange($event)\"\n (cellClick)=\"handleCellClick($event)\"\n (weekNumberCellClick)=\"handleWeekNumberClick($event)\"\n (cellEnter)=\"emitCellEvent(cellEnter, $event)\"\n (cellLeave)=\"emitCellEvent(cellLeave, $event)\"\n (activeDateChange)=\"setActiveDate($event)\"\n >\n </kendo-calendar-horizontal>\n "
|
|
1007
1044
|
}),
|
|
1008
1045
|
tslib_1.__metadata("design:paramtypes", [bus_view_service_1.BusViewService,
|
|
1009
1046
|
core_1.ElementRef,
|
|
@@ -116,6 +116,12 @@ var CenturyViewService = /** @class */ (function () {
|
|
|
116
116
|
var firstYear = kendo_date_math_1.firstYearOfDecade(kendo_date_math_1.firstDecadeOfCentury(date));
|
|
117
117
|
return kendo_date_math_1.createDate(firstYear.getFullYear(), 0, 1);
|
|
118
118
|
};
|
|
119
|
+
CenturyViewService.prototype.lastDayOfPeriod = function (date) {
|
|
120
|
+
var decade = kendo_date_math_1.lastDecadeOfCentury(date);
|
|
121
|
+
var year = kendo_date_math_1.lastYearOfDecade(decade);
|
|
122
|
+
var month = kendo_date_math_1.lastMonthOfYear(year);
|
|
123
|
+
return kendo_date_math_1.lastDayOfMonth(month);
|
|
124
|
+
};
|
|
119
125
|
CenturyViewService.prototype.isRangeStart = function (value) {
|
|
120
126
|
return value.getFullYear() % 1000 === 0;
|
|
121
127
|
};
|
|
@@ -116,6 +116,11 @@ var DecadeViewService = /** @class */ (function () {
|
|
|
116
116
|
var firstYear = kendo_date_math_1.firstYearOfDecade(date);
|
|
117
117
|
return kendo_date_math_1.createDate(firstYear.getFullYear(), 0, 1);
|
|
118
118
|
};
|
|
119
|
+
DecadeViewService.prototype.lastDayOfPeriod = function (date) {
|
|
120
|
+
var year = kendo_date_math_1.lastYearOfDecade(date);
|
|
121
|
+
var month = kendo_date_math_1.lastMonthOfYear(year);
|
|
122
|
+
return kendo_date_math_1.lastDayOfMonth(month);
|
|
123
|
+
};
|
|
119
124
|
DecadeViewService.prototype.isRangeStart = function (value) {
|
|
120
125
|
return value.getFullYear() % 100 === 0;
|
|
121
126
|
};
|
|
@@ -126,6 +126,9 @@ var MonthViewService = /** @class */ (function () {
|
|
|
126
126
|
}
|
|
127
127
|
return kendo_date_math_1.createDate(date.getFullYear(), date.getMonth(), 1);
|
|
128
128
|
};
|
|
129
|
+
MonthViewService.prototype.lastDayOfPeriod = function (date) {
|
|
130
|
+
return kendo_date_math_1.lastDayOfMonth(date);
|
|
131
|
+
};
|
|
129
132
|
MonthViewService.prototype.isRangeStart = function (value) {
|
|
130
133
|
return !value.getMonth();
|
|
131
134
|
};
|
|
@@ -142,6 +142,10 @@ var YearViewService = /** @class */ (function () {
|
|
|
142
142
|
}
|
|
143
143
|
return kendo_date_math_1.createDate(date.getFullYear(), 0, 1);
|
|
144
144
|
};
|
|
145
|
+
YearViewService.prototype.lastDayOfPeriod = function (date) {
|
|
146
|
+
var month = kendo_date_math_1.lastMonthOfYear(date);
|
|
147
|
+
return kendo_date_math_1.lastDayOfMonth(month);
|
|
148
|
+
};
|
|
145
149
|
YearViewService.prototype.isRangeStart = function (value) {
|
|
146
150
|
return value.getFullYear() % 10 === 0;
|
|
147
151
|
};
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-dateinputs',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1635489253,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|