@progress/kendo-angular-dateinputs 16.0.0-develop.9 → 16.0.1-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/calendar/calendar.component.d.ts +43 -8
- package/calendar/header.component.d.ts +3 -2
- package/calendar/horizontal-view-list.component.d.ts +4 -3
- package/calendar/models/cell-context.interface.d.ts +4 -0
- package/calendar/models/selection-range.interface.d.ts +2 -2
- package/calendar/models/selection.d.ts +11 -1
- package/calendar/multiview-calendar.component.d.ts +58 -8
- package/calendar/view-list.component.d.ts +9 -1
- package/calendar/view.component.d.ts +2 -1
- package/common/utils.d.ts +4 -0
- package/dateinput/dateinput.component.d.ts +13 -1
- package/dateinput/localization/messages.d.ts +5 -1
- package/datepicker/datepicker.component.d.ts +7 -2
- package/datepicker/localization/messages.d.ts +5 -1
- package/daterange/date-range-popup.component.d.ts +30 -2
- package/daterange/date-range.component.d.ts +16 -1
- package/datetimepicker/datetimepicker.component.d.ts +12 -1
- package/datetimepicker/localization/messages.d.ts +5 -1
- package/esm2020/calendar/calendar-common.module.mjs +4 -4
- package/esm2020/calendar/calendar.component.mjs +258 -60
- package/esm2020/calendar/calendar.module.mjs +4 -4
- package/esm2020/calendar/calendars.module.mjs +4 -4
- package/esm2020/calendar/footer.component.mjs +3 -3
- package/esm2020/calendar/for.directive.mjs +3 -3
- package/esm2020/calendar/header.component.mjs +41 -23
- package/esm2020/calendar/horizontal-view-list.component.mjs +13 -9
- package/esm2020/calendar/localization/calendar-custom-messages.component.mjs +3 -3
- package/esm2020/calendar/localization/calendar-localized-messages.directive.mjs +3 -3
- package/esm2020/calendar/localization/calendar-messages.mjs +3 -3
- package/esm2020/calendar/localization/multiview-calendar-custom-messages.component.mjs +3 -3
- package/esm2020/calendar/localization/multiview-calendar-localized-messages.directive.mjs +3 -3
- package/esm2020/calendar/localization/multiview-calendar-messages.mjs +3 -3
- package/esm2020/calendar/models/selection.mjs +35 -1
- package/esm2020/calendar/multiview-calendar.component.mjs +276 -52
- package/esm2020/calendar/multiview-calendar.module.mjs +4 -4
- package/esm2020/calendar/navigation.component.mjs +3 -3
- package/esm2020/calendar/services/bus-view.service.mjs +3 -3
- package/esm2020/calendar/services/century-view.service.mjs +29 -8
- package/esm2020/calendar/services/decade-view.service.mjs +29 -8
- package/esm2020/calendar/services/disabled-dates.service.mjs +3 -3
- package/esm2020/calendar/services/dom.service.mjs +5 -5
- package/esm2020/calendar/services/month-view.service.mjs +29 -8
- package/esm2020/calendar/services/navigation.service.mjs +3 -3
- package/esm2020/calendar/services/scroll-sync.service.mjs +3 -3
- package/esm2020/calendar/services/selection.service.mjs +3 -3
- package/esm2020/calendar/services/weeknames.service.mjs +3 -3
- package/esm2020/calendar/services/year-view.service.mjs +29 -8
- package/esm2020/calendar/templates/cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/century-cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/decade-cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/footer-template.directiv/320/265.mjs +3 -3
- package/esm2020/calendar/templates/header-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/header-title-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/month-cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/navigation-item-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/weeknumber-cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates/year-cell-template.directive.mjs +3 -3
- package/esm2020/calendar/templates.module.mjs +4 -4
- package/esm2020/calendar/view-list.component.mjs +26 -5
- package/esm2020/calendar/view.component.mjs +8 -5
- package/esm2020/common/adaptive.module.mjs +4 -4
- package/esm2020/common/utils.mjs +5 -1
- package/esm2020/dateinput/dateinput.component.mjs +65 -4
- package/esm2020/dateinput/dateinput.module.mjs +4 -4
- package/esm2020/dateinput/localization/dateinput-custom-messages.component.mjs +3 -3
- package/esm2020/dateinput/localization/dateinput-localized-messages.directive.mjs +3 -3
- package/esm2020/dateinput/localization/messages.mjs +5 -3
- package/esm2020/dateinputs.module.mjs +4 -4
- package/esm2020/datepicker/datepicker.component.mjs +43 -18
- package/esm2020/datepicker/datepicker.module.mjs +4 -4
- package/esm2020/datepicker/localization/datepicker-custom-messages.component.mjs +3 -3
- package/esm2020/datepicker/localization/datepicker-localized-messages.directive.mjs +3 -3
- package/esm2020/datepicker/localization/messages.mjs +5 -3
- package/esm2020/daterange/date-range-end-input.directive.mjs +3 -3
- package/esm2020/daterange/date-range-input.mjs +3 -3
- package/esm2020/daterange/date-range-popup-template.directive.mjs +3 -3
- package/esm2020/daterange/date-range-popup.component.mjs +70 -13
- package/esm2020/daterange/date-range-selection.directive.mjs +3 -3
- package/esm2020/daterange/date-range-start-input.directive.mjs +3 -3
- package/esm2020/daterange/date-range.component.mjs +10 -8
- package/esm2020/daterange/date-range.module.mjs +4 -4
- package/esm2020/daterange/date-range.service.mjs +3 -3
- package/esm2020/daterange/localization/daterange-popup-custom-messages.component.mjs +3 -3
- package/esm2020/daterange/localization/daterange-popup-localized-messages.directive.mjs +3 -3
- package/esm2020/daterange/localization/messages.mjs +3 -3
- package/esm2020/datetimepicker/datetimepicker.component.mjs +54 -16
- package/esm2020/datetimepicker/datetimepicker.module.mjs +4 -4
- package/esm2020/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +3 -3
- package/esm2020/datetimepicker/localization/localized-messages.directive.mjs +3 -3
- package/esm2020/datetimepicker/localization/messages.mjs +5 -3
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/localization/messages.mjs +5 -3
- package/esm2020/timepicker/localization/timepicker-custom-messages.component.mjs +3 -3
- package/esm2020/timepicker/localization/timepicker-localized-messages.directive.mjs +3 -3
- package/esm2020/timepicker/localization/timeselector-custom-messages.component.mjs +3 -3
- package/esm2020/timepicker/localization/timeselector-localized-messages.directive.mjs +3 -3
- package/esm2020/timepicker/services/dayperiod.service.mjs +3 -3
- package/esm2020/timepicker/services/dom.service.mjs +3 -3
- package/esm2020/timepicker/services/hours.service.mjs +3 -3
- package/esm2020/timepicker/services/milliseconds.service.mjs +3 -3
- package/esm2020/timepicker/services/minutes.service.mjs +3 -3
- package/esm2020/timepicker/services/seconds.service.mjs +3 -3
- package/esm2020/timepicker/timelist.component.mjs +3 -3
- package/esm2020/timepicker/timepicker.component.mjs +41 -13
- package/esm2020/timepicker/timepicker.module.mjs +4 -4
- package/esm2020/timepicker/timeselector.component.mjs +24 -9
- package/esm2020/virtualization/virtualization.component.mjs +3 -3
- package/esm2020/virtualization/virtualization.module.mjs +4 -4
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +1344 -508
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +1329 -507
- package/package.json +9 -9
- package/schematics/ngAdd/index.js +1 -1
- package/timepicker/localization/messages.d.ts +5 -1
- package/timepicker/timepicker.component.d.ts +7 -1
- package/timepicker/timeselector.component.d.ts +2 -1
|
@@ -6,7 +6,7 @@ import { Component, ChangeDetectorRef, ChangeDetectionStrategy, ContentChild, Ev
|
|
|
6
6
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
7
7
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { cloneDate, isEqual } from '@progress/kendo-date-math';
|
|
9
|
-
import { hasObservers, guid, Keys } from '@progress/kendo-angular-common';
|
|
9
|
+
import { hasObservers, guid, Keys, isObject } from '@progress/kendo-angular-common';
|
|
10
10
|
import { HorizontalViewListComponent } from './horizontal-view-list.component';
|
|
11
11
|
import { HeaderComponent } from './header.component';
|
|
12
12
|
import { BusViewService } from './services/bus-view.service';
|
|
@@ -21,13 +21,14 @@ import { WeekNumberCellTemplateDirective } from './templates/weeknumber-cell-tem
|
|
|
21
21
|
import { HeaderTitleTemplateDirective } from './templates/header-title-template.directive';
|
|
22
22
|
import { Action } from './models/navigation-action.enum';
|
|
23
23
|
import { CalendarViewEnum } from './models/view.enum';
|
|
24
|
+
import { handleRangeSelection } from './models/selection';
|
|
24
25
|
import { minValidator } from '../validators/min.validator';
|
|
25
26
|
import { maxValidator } from '../validators/max.validator';
|
|
26
27
|
import { disabledDatesRangeValidator } from '../validators/disabled-dates-range.validator';
|
|
27
28
|
import { MIN_DATE, MAX_DATE } from '../defaults';
|
|
28
|
-
import { areDatesEqual, dateInRange, getToday, hasExistingValue, last, noop } from '../util';
|
|
29
|
+
import { DEFAULT_SIZE, areDatesEqual, dateInRange, getSizeClass, getToday, hasExistingValue, last, noop } from '../util';
|
|
29
30
|
import { Subscription } from 'rxjs';
|
|
30
|
-
import { isArrowWithShiftPressed, isPresent } from '../common/utils';
|
|
31
|
+
import { isArrowWithShiftPressed, isNullOrDate, isPresent } from '../common/utils';
|
|
31
32
|
import { NavigationService } from './services/navigation.service';
|
|
32
33
|
import { HeaderTemplateDirective } from './templates/header-template.directive';
|
|
33
34
|
import { FooterTemplateDirective } from './templates/footer-template.directivе';
|
|
@@ -97,6 +98,7 @@ export class MultiViewCalendarComponent {
|
|
|
97
98
|
* Determines whether to display the calendar header.
|
|
98
99
|
*/
|
|
99
100
|
this.showCalendarHeader = true;
|
|
101
|
+
this._size = DEFAULT_SIZE;
|
|
100
102
|
/**
|
|
101
103
|
* Toggles the visibility of the footer.
|
|
102
104
|
* @default false
|
|
@@ -112,15 +114,14 @@ export class MultiViewCalendarComponent {
|
|
|
112
114
|
* ([see example]({% slug disabled_dates_multiviewcalendar %}#toc-validation)).
|
|
113
115
|
*/
|
|
114
116
|
this.disabledDatesRangeValidation = false;
|
|
117
|
+
this._selection = 'single';
|
|
115
118
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
119
|
+
* Allows reverse selection when using `range` selection.
|
|
120
|
+
* If `allowReverse` is set to `true`, the component skips the validation of whether the start date is after the end date.
|
|
118
121
|
*
|
|
119
|
-
*
|
|
120
|
-
* * `single` (default)
|
|
121
|
-
* * `multiple`
|
|
122
|
+
* @default false
|
|
122
123
|
*/
|
|
123
|
-
this.
|
|
124
|
+
this.allowReverse = false;
|
|
124
125
|
/**
|
|
125
126
|
* Sets or gets the `disabled` property of the Calendar and
|
|
126
127
|
* determines whether the component is active
|
|
@@ -215,6 +216,11 @@ export class MultiViewCalendarComponent {
|
|
|
215
216
|
* ([see example](slug:events_multiviewcalendar)).
|
|
216
217
|
*/
|
|
217
218
|
this.valueChange = new EventEmitter();
|
|
219
|
+
/**
|
|
220
|
+
* @hidden
|
|
221
|
+
* Fires when the range selection changes.
|
|
222
|
+
*/
|
|
223
|
+
this.rangeSelectionChange = new EventEmitter();
|
|
218
224
|
/**
|
|
219
225
|
* Fires each time the MultiViewCalendar gets blurred
|
|
220
226
|
* ([see example](slug:events_multiviewcalendar)).
|
|
@@ -248,9 +254,15 @@ export class MultiViewCalendarComponent {
|
|
|
248
254
|
this.prevView = Action.PrevView;
|
|
249
255
|
this.nextView = Action.NextView;
|
|
250
256
|
this.selectedDates = [];
|
|
257
|
+
this.shouldHoverWhenNoStart = false;
|
|
258
|
+
this.canHover = false;
|
|
259
|
+
this.changes = {};
|
|
260
|
+
this.valueSetter = false;
|
|
261
|
+
this.selectionSetter = false;
|
|
251
262
|
this._min = new Date(MIN_DATE);
|
|
252
263
|
this._max = new Date(MAX_DATE);
|
|
253
264
|
this._focusedDate = getToday();
|
|
265
|
+
this._selectionRange = { start: null, end: null };
|
|
254
266
|
this.resolvedPromise = Promise.resolve();
|
|
255
267
|
this.onControlChange = noop;
|
|
256
268
|
this.onControlTouched = noop;
|
|
@@ -259,9 +271,32 @@ export class MultiViewCalendarComponent {
|
|
|
259
271
|
this.maxValidateFn = noop;
|
|
260
272
|
this.disabledDatesRangeValidateFn = noop;
|
|
261
273
|
this.subscriptions = new Subscription();
|
|
262
|
-
this.setClasses(element.nativeElement);
|
|
263
274
|
this.id = `kendo-multiviewcalendarid-${this.bus.calendarId}-`;
|
|
264
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* @hidden
|
|
278
|
+
*
|
|
279
|
+
* TODO: Make visible when the Infinite Calendar is fixed to set properly the size option.
|
|
280
|
+
* Sets the size of the component.
|
|
281
|
+
*
|
|
282
|
+
* The possible values are:
|
|
283
|
+
* * `small`
|
|
284
|
+
* * `medium` (Default)
|
|
285
|
+
* * `large`
|
|
286
|
+
* * `none`
|
|
287
|
+
*
|
|
288
|
+
*/
|
|
289
|
+
set size(size) {
|
|
290
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
291
|
+
this.renderer.removeClass(this.element.nativeElement, getSizeClass('calendar', this.size));
|
|
292
|
+
if (newSize !== 'none') {
|
|
293
|
+
this.renderer.addClass(this.element.nativeElement, getSizeClass('calendar', newSize));
|
|
294
|
+
}
|
|
295
|
+
this._size = newSize;
|
|
296
|
+
}
|
|
297
|
+
get size() {
|
|
298
|
+
return this._size;
|
|
299
|
+
}
|
|
265
300
|
/**
|
|
266
301
|
* Sets or gets the `focusedDate` property of the Calendar and
|
|
267
302
|
* defines the focused date of the component
|
|
@@ -315,29 +350,37 @@ export class MultiViewCalendarComponent {
|
|
|
315
350
|
get max() {
|
|
316
351
|
return this._max;
|
|
317
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* Sets the Calendar selection mode
|
|
355
|
+
* ([see example]({% slug multiple_selection_multiviewcalendar %})).
|
|
356
|
+
*
|
|
357
|
+
* The available values are:
|
|
358
|
+
* * `single` (default)
|
|
359
|
+
* * `multiple`
|
|
360
|
+
* * `range`
|
|
361
|
+
*/
|
|
362
|
+
set selection(_selection) {
|
|
363
|
+
this.selectionSetter = true;
|
|
364
|
+
this._selection = _selection;
|
|
365
|
+
}
|
|
366
|
+
get selection() {
|
|
367
|
+
return this._selection;
|
|
368
|
+
}
|
|
318
369
|
/**
|
|
319
370
|
* Sets or gets the `value` property of the Calendar and defines the selected value of the component.
|
|
320
371
|
*
|
|
321
372
|
* > The `value` has to be a valid
|
|
322
373
|
* [JavaScript `Date`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Date)
|
|
323
|
-
* instance when in `single` selection mode
|
|
374
|
+
* instance when in `single` selection mode, an array of valid JavaScript Date instances when in `multiple` selection mode, or
|
|
375
|
+
* an object of type `SelectionRange` when in `range` selection mode.
|
|
324
376
|
*/
|
|
377
|
+
set value(candidate) {
|
|
378
|
+
this.valueSetter = true;
|
|
379
|
+
this._value = candidate;
|
|
380
|
+
}
|
|
325
381
|
get value() {
|
|
326
382
|
return this._value;
|
|
327
383
|
}
|
|
328
|
-
set value(candidate) {
|
|
329
|
-
this.verifyValue(candidate);
|
|
330
|
-
this._value = Array.isArray(candidate) ?
|
|
331
|
-
candidate.filter(date => isPresent(date)).map(element => cloneDate(element)) :
|
|
332
|
-
cloneDate(candidate);
|
|
333
|
-
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
334
|
-
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
335
|
-
const lastSelected = last(selection);
|
|
336
|
-
this.rangePivot = cloneDate(lastSelected);
|
|
337
|
-
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
338
|
-
this.selectedDates = selection;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
384
|
/**
|
|
342
385
|
* @hidden
|
|
343
386
|
*/
|
|
@@ -354,10 +397,23 @@ export class MultiViewCalendarComponent {
|
|
|
354
397
|
set disabledDates(value) {
|
|
355
398
|
this.disabledDatesService.initialize(value);
|
|
356
399
|
}
|
|
400
|
+
/**
|
|
401
|
+
* Specify, which end of the defined selection range should be marked as active.
|
|
402
|
+
*
|
|
403
|
+
* > Value will be ignored if the selection range is undefined.
|
|
404
|
+
* > If range selection is used then the default value is 'start'.
|
|
405
|
+
*/
|
|
406
|
+
set activeRangeEnd(_activeRangeEnd) {
|
|
407
|
+
this._activeRangeEnd = _activeRangeEnd;
|
|
408
|
+
}
|
|
409
|
+
get activeRangeEnd() {
|
|
410
|
+
return (this.selection === 'range' && !this._activeRangeEnd) ? 'start' : this._activeRangeEnd;
|
|
411
|
+
}
|
|
357
412
|
/**
|
|
358
413
|
* Sets or gets the `selectionRange` property of the Calendar and
|
|
359
414
|
* defines the selection range of the component
|
|
360
415
|
* ([see example]({% slug dates_multiviewcalendar %}#toc-selection-range)).
|
|
416
|
+
* > We recommend using the `value` property as it now supports `range` selection.
|
|
361
417
|
*/
|
|
362
418
|
set selectionRange(range) {
|
|
363
419
|
this._selectionRange = range;
|
|
@@ -531,6 +587,7 @@ export class MultiViewCalendarComponent {
|
|
|
531
587
|
*/
|
|
532
588
|
handleMouseLeave() {
|
|
533
589
|
this.isHovered = false;
|
|
590
|
+
this.setRangeSelectionToValue();
|
|
534
591
|
}
|
|
535
592
|
/**
|
|
536
593
|
* @hidden
|
|
@@ -581,8 +638,13 @@ export class MultiViewCalendarComponent {
|
|
|
581
638
|
return;
|
|
582
639
|
}
|
|
583
640
|
else if (onEnterKeyPress) {
|
|
584
|
-
this.
|
|
585
|
-
|
|
641
|
+
if (this.selection !== 'range') {
|
|
642
|
+
this.selectionService.lastClicked = this.focusedDate;
|
|
643
|
+
this.performSelection(this.focusedDate, event);
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
this.performRangeSelection(this.focusedDate);
|
|
647
|
+
}
|
|
586
648
|
}
|
|
587
649
|
if (this.views >= 2) {
|
|
588
650
|
if ((escKey || (altKey && onArrowUpPress))) {
|
|
@@ -605,12 +667,13 @@ export class MultiViewCalendarComponent {
|
|
|
605
667
|
if (!isSameView) {
|
|
606
668
|
this.emitNavigate(this.focusedDate);
|
|
607
669
|
}
|
|
608
|
-
if (isArrowWithShiftPressed(event)) {
|
|
670
|
+
if (isArrowWithShiftPressed(event) && this.selection !== 'range') {
|
|
609
671
|
event['anyArrow'] = true;
|
|
610
672
|
this.performSelection(this.focusedDate, event);
|
|
611
673
|
}
|
|
612
674
|
}
|
|
613
675
|
ngOnInit() {
|
|
676
|
+
this.setClasses(this.element.nativeElement);
|
|
614
677
|
this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
|
|
615
678
|
this.activeView = CalendarViewEnum[view];
|
|
616
679
|
this.activeViewChange.emit(this.activeView);
|
|
@@ -619,21 +682,36 @@ export class MultiViewCalendarComponent {
|
|
|
619
682
|
}));
|
|
620
683
|
}
|
|
621
684
|
ngOnChanges(changes) {
|
|
685
|
+
this.changes = changes;
|
|
622
686
|
this.verifyChanges();
|
|
623
687
|
this.bus.configure(this.bottomViewEnum, this.topViewEnum);
|
|
624
|
-
|
|
625
|
-
|
|
688
|
+
}
|
|
689
|
+
ngDoCheck() {
|
|
690
|
+
if (this.valueSetter || this.selectionSetter) {
|
|
691
|
+
if (this.selection === 'range' &&
|
|
692
|
+
(this.value?.start || this.value?.end) &&
|
|
693
|
+
this.focusedDate.getTime() !== this.value.start?.getTime() &&
|
|
694
|
+
this.focusedDate.getTime() !== this.value.end?.getTime()) {
|
|
695
|
+
this.focusedDate = this.value.start || this.value.end || getToday();
|
|
696
|
+
}
|
|
697
|
+
this.setValue(this.value);
|
|
698
|
+
this.valueSetter = false;
|
|
699
|
+
this.selectionSetter = false;
|
|
700
|
+
}
|
|
701
|
+
if (hasExistingValue(this.changes, 'focusedDate')) {
|
|
702
|
+
const focusedDate = this.changes.focusedDate.currentValue;
|
|
626
703
|
this.focusedDate = dateInRange(focusedDate, this.min, this.max);
|
|
627
704
|
}
|
|
628
|
-
if (changes.min || changes.max || changes.rangeValidation || changes.disabledDates || changes.disabledDatesRangeValidation) {
|
|
705
|
+
if (this.changes.min || this.changes.max || this.changes.rangeValidation || this.changes.disabledDates || this.changes.disabledDatesRangeValidation) {
|
|
629
706
|
this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop;
|
|
630
707
|
this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop;
|
|
631
708
|
this.disabledDatesRangeValidateFn = this.disabledDatesRangeValidation ? disabledDatesRangeValidator(this.disabledDatesService.isDateDisabled) : noop;
|
|
632
709
|
this.onValidatorChange();
|
|
633
710
|
}
|
|
634
|
-
if (changes.min || changes.max || changes.focusedDate || changes.activeView) {
|
|
711
|
+
if (this.changes.min || this.changes.max || this.changes.focusedDate || this.changes.activeView) {
|
|
635
712
|
this.updateButtonState();
|
|
636
713
|
}
|
|
714
|
+
this.changes = {};
|
|
637
715
|
}
|
|
638
716
|
ngOnDestroy() {
|
|
639
717
|
this.subscriptions.unsubscribe();
|
|
@@ -671,7 +749,7 @@ export class MultiViewCalendarComponent {
|
|
|
671
749
|
return;
|
|
672
750
|
}
|
|
673
751
|
const activeElement = this.views >= 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
|
|
674
|
-
this.element.nativeElement.querySelector('.k-
|
|
752
|
+
this.element.nativeElement.querySelector('.k-calendar-table');
|
|
675
753
|
activeElement.blur();
|
|
676
754
|
}
|
|
677
755
|
/**
|
|
@@ -692,11 +770,48 @@ export class MultiViewCalendarComponent {
|
|
|
692
770
|
if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
|
|
693
771
|
return;
|
|
694
772
|
}
|
|
773
|
+
if (this.selection === 'range') {
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
695
776
|
this.selectedDates = availableDates.map(date => cloneDate(date));
|
|
696
777
|
this.value = this.parseSelectionToValue(availableDates);
|
|
697
778
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
698
779
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
699
780
|
}
|
|
781
|
+
/**
|
|
782
|
+
* @hidden
|
|
783
|
+
*/
|
|
784
|
+
onCellEnter(cellEnter, date) {
|
|
785
|
+
this.emitCellEvent(cellEnter, date);
|
|
786
|
+
if (this.selection === 'range' && (this.canHover || this.shouldHoverWhenNoStart)) {
|
|
787
|
+
this.zone.run(() => {
|
|
788
|
+
if (this.canHover && !this.shouldHoverWhenNoStart) {
|
|
789
|
+
if (this.allowReverse) {
|
|
790
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
|
|
791
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
792
|
+
}
|
|
793
|
+
if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
|
|
794
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
else {
|
|
798
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
|
|
799
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
800
|
+
}
|
|
801
|
+
if (this.selectionRange.start && date < this.selectionRange.start) {
|
|
802
|
+
this.selectionRange = { start: this.selectionRange.start, end: null };
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
else if (this.shouldHoverWhenNoStart && date <= this.selectionRange.end) {
|
|
807
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
808
|
+
}
|
|
809
|
+
else {
|
|
810
|
+
this.selectionRange = { start: null, end: this.selectionRange.end };
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
}
|
|
700
815
|
/**
|
|
701
816
|
* @hidden
|
|
702
817
|
*/
|
|
@@ -801,8 +916,13 @@ export class MultiViewCalendarComponent {
|
|
|
801
916
|
* @hidden
|
|
802
917
|
*/
|
|
803
918
|
handleCellClick({ date, modifiers }) {
|
|
804
|
-
this.
|
|
805
|
-
|
|
919
|
+
if (this.selection === 'range') {
|
|
920
|
+
this.performRangeSelection(date);
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
this.selectionService.lastClicked = date;
|
|
924
|
+
this.performSelection(date, modifiers);
|
|
925
|
+
}
|
|
806
926
|
const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
807
927
|
if (!isSameView) {
|
|
808
928
|
this.emitNavigate(this.focusedDate);
|
|
@@ -816,16 +936,31 @@ export class MultiViewCalendarComponent {
|
|
|
816
936
|
return;
|
|
817
937
|
}
|
|
818
938
|
this.zone.run(() => {
|
|
819
|
-
this.
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
939
|
+
if (this.selection === 'multiple') {
|
|
940
|
+
this.handleDateChange({
|
|
941
|
+
selectedDates: dates,
|
|
942
|
+
focusedDate: last(dates),
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
if (this.selection === 'range') {
|
|
946
|
+
this.activeRangeEnd = 'start';
|
|
947
|
+
const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
|
|
948
|
+
this.selectionRange.end?.getTime() !== last(dates).getTime();
|
|
949
|
+
this.selectionRange.start = dates[0];
|
|
950
|
+
this.selectionRange.end = last(dates);
|
|
951
|
+
this.value = this.selectionRange;
|
|
952
|
+
if (shouldEmitValueChange) {
|
|
953
|
+
this.valueChange.emit(this.value);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
823
956
|
});
|
|
824
957
|
}
|
|
825
958
|
setClasses(element) {
|
|
826
|
-
this.renderer.addClass(element, 'k-widget');
|
|
827
959
|
this.renderer.addClass(element, 'k-calendar');
|
|
828
|
-
this.renderer.addClass(element, '
|
|
960
|
+
this.renderer.addClass(element, getSizeClass('calendar', this.size));
|
|
961
|
+
if (this.views >= 2) {
|
|
962
|
+
this.renderer.addClass(element, 'k-calendar-range');
|
|
963
|
+
}
|
|
829
964
|
}
|
|
830
965
|
verifyChanges() {
|
|
831
966
|
if (!isDevMode()) {
|
|
@@ -842,14 +977,22 @@ export class MultiViewCalendarComponent {
|
|
|
842
977
|
if (!isDevMode()) {
|
|
843
978
|
return;
|
|
844
979
|
}
|
|
845
|
-
if (this.selection === 'single' && candidate && !(candidate
|
|
846
|
-
throw new Error(`
|
|
980
|
+
if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
|
|
981
|
+
throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
847
982
|
}
|
|
848
|
-
else if (this.selection === 'multiple' && candidate
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
983
|
+
else if (this.selection === 'multiple' && candidate) {
|
|
984
|
+
if (Array.isArray(candidate)) {
|
|
985
|
+
const onlyDates = candidate.every(value => value instanceof Date);
|
|
986
|
+
if (!onlyDates) {
|
|
987
|
+
throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
988
|
+
}
|
|
852
989
|
}
|
|
990
|
+
if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
991
|
+
throw new Error(`When using 'multiple' selection the 'value' should be an array of valid JavaScript Date instances. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
|
|
995
|
+
throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
853
996
|
}
|
|
854
997
|
}
|
|
855
998
|
updateButtonState() {
|
|
@@ -863,6 +1006,77 @@ export class MultiViewCalendarComponent {
|
|
|
863
1006
|
selection = selection || [];
|
|
864
1007
|
return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
|
|
865
1008
|
}
|
|
1009
|
+
setValue(candidate) {
|
|
1010
|
+
this.verifyValue(candidate);
|
|
1011
|
+
if (candidate === null) {
|
|
1012
|
+
this._value = null;
|
|
1013
|
+
this.selectedDates = [];
|
|
1014
|
+
}
|
|
1015
|
+
else if (Array.isArray(candidate)) {
|
|
1016
|
+
this.selectionRange = { start: null, end: null };
|
|
1017
|
+
this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
|
|
1018
|
+
}
|
|
1019
|
+
else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
1020
|
+
this.selectedDates = [];
|
|
1021
|
+
this.selectionRange = { start: null, end: null };
|
|
1022
|
+
this._value = { start: null, end: null };
|
|
1023
|
+
this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
|
|
1024
|
+
this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
|
|
1025
|
+
this.selectionRange = Object.assign({}, this._value);
|
|
1026
|
+
if (this._value?.start && !this._value?.end) {
|
|
1027
|
+
this.activeRangeEnd = 'end';
|
|
1028
|
+
this.canHover = true;
|
|
1029
|
+
}
|
|
1030
|
+
if (this._value?.end && !this._value?.start) {
|
|
1031
|
+
this.activeRangeEnd = 'start';
|
|
1032
|
+
this.canHover = true;
|
|
1033
|
+
}
|
|
1034
|
+
if (this._value?.end && this._value?.start) {
|
|
1035
|
+
this.canHover = false;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
this.selectionRange = { start: null, end: null };
|
|
1040
|
+
this._value = cloneDate(candidate);
|
|
1041
|
+
}
|
|
1042
|
+
if (this.selection !== 'range') {
|
|
1043
|
+
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
1044
|
+
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
1045
|
+
const lastSelected = last(selection);
|
|
1046
|
+
this.rangePivot = cloneDate(lastSelected);
|
|
1047
|
+
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
1048
|
+
this.selectedDates = selection;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
setRangeSelectionToValue() {
|
|
1053
|
+
if (this.selection === 'range' && this.value) {
|
|
1054
|
+
this.selectionRange = this.value;
|
|
1055
|
+
this.cdr.markForCheck();
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
performRangeSelection(date) {
|
|
1059
|
+
this.focusedDate = date;
|
|
1060
|
+
const clonedRangeSelection = Object.assign({}, this.selectionRange);
|
|
1061
|
+
const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
|
|
1062
|
+
(this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
|
|
1063
|
+
this.zone.run(() => {
|
|
1064
|
+
const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
|
|
1065
|
+
this.activeRangeEnd = rangeSelection.activeRangeEnd;
|
|
1066
|
+
if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
|
|
1067
|
+
this.activeRangeEnd = 'start';
|
|
1068
|
+
rangeSelection.activeRangeEnd = 'start';
|
|
1069
|
+
}
|
|
1070
|
+
this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
|
|
1071
|
+
if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
|
|
1072
|
+
this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
|
|
1073
|
+
this.value = rangeSelection.selectionRange;
|
|
1074
|
+
this.valueChange.emit(this.value);
|
|
1075
|
+
this.rangeSelectionChange.emit(rangeSelection);
|
|
1076
|
+
}
|
|
1077
|
+
this.cdr.markForCheck();
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
866
1080
|
performSelection(date, selectionModifiers) {
|
|
867
1081
|
const selection = this.selectionService.performSelection({
|
|
868
1082
|
date: date,
|
|
@@ -879,8 +1093,8 @@ export class MultiViewCalendarComponent {
|
|
|
879
1093
|
});
|
|
880
1094
|
}
|
|
881
1095
|
}
|
|
882
|
-
MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
883
|
-
MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
1096
|
+
MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: i1.BusViewService }, { token: i0.ElementRef }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.DisabledDatesService }, { token: i4.SelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1097
|
+
MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { showOtherMonthDays: "showOtherMonthDays", showCalendarHeader: "showCalendarHeader", size: "size", id: "id", focusedDate: "focusedDate", footer: "footer", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", allowReverse: "allowReverse", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", weekDaysFormat: "weekDaysFormat", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", rangeSelectionChange: "rangeSelectionChange", blurEvent: "blur", focusEvent: "focus", focusCalendar: "focusCalendar", onClosePopup: "onClosePopup", onTabPress: "onTabPress", onShiftTabPress: "onShiftTabPress" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
|
|
884
1098
|
BusViewService,
|
|
885
1099
|
RANGE_CALENDAR_VALUE_ACCESSOR,
|
|
886
1100
|
RANGE_CALENDAR_RANGE_VALIDATORS,
|
|
@@ -911,6 +1125,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
911
1125
|
*ngIf="showCalendarHeader"
|
|
912
1126
|
[activeView]="activeViewEnum"
|
|
913
1127
|
[currentDate]="activeDate"
|
|
1128
|
+
[size]="size"
|
|
914
1129
|
[min]="min"
|
|
915
1130
|
[max]="max"
|
|
916
1131
|
[id]="headerId"
|
|
@@ -928,6 +1143,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
928
1143
|
</kendo-calendar-header>
|
|
929
1144
|
<kendo-calendar-horizontal
|
|
930
1145
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
1146
|
+
[allowReverse]="allowReverse"
|
|
931
1147
|
[id]="calendarHeaderIdLabel"
|
|
932
1148
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
933
1149
|
[activeView]="activeViewEnum"
|
|
@@ -952,7 +1168,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
952
1168
|
[disabled]="disabled"
|
|
953
1169
|
(cellClick)="handleCellClick($event)"
|
|
954
1170
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
955
|
-
(cellEnter)="
|
|
1171
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
956
1172
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
957
1173
|
(activeDateChange)="setActiveDate($event)"
|
|
958
1174
|
(focusCalendar)="handleFocus()"
|
|
@@ -965,8 +1181,8 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
|
|
|
965
1181
|
[activeViewValue]="activeView"
|
|
966
1182
|
[currentDate]="activeDate">
|
|
967
1183
|
</kendo-calendar-footer>
|
|
968
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: i7.FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: i8.HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["showOtherMonthDays", "cellTemplateRef", "weekNumberTemplateRef", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekDaysFormat", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { kind: "directive", type: i9.MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
1184
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.HeaderComponent, selector: "kendo-calendar-header", inputs: ["activeView", "currentDate", "min", "max", "rangeLength", "titleTemplateRef", "headerTemplateRef", "isPrevDisabled", "isNextDisabled", "showNavigationButtons", "orientation", "id", "size"], outputs: ["todayButtonClick", "prevButtonClick", "nextButtonClick"] }, { kind: "component", type: i7.FooterComponent, selector: "kendo-calendar-footer", inputs: ["footerTemplateRef", "activeViewValue", "currentDate"] }, { kind: "component", type: i8.HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: ["showOtherMonthDays", "cellTemplateRef", "weekNumberTemplateRef", "allowReverse", "activeRangeEnd", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectionRange", "selectedDates", "views", "showViewHeader", "animateNavigation", "orientation", "activeDescendant", "tabIndex", "disabled", "id", "weekDaysFormat", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "cellEnter", "cellLeave", "activeDateChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { kind: "directive", type: i9.MultiViewCalendarLocalizedMessagesDirective, selector: "[kendoMultiViewCalendarLocalizedMessages]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
|
|
970
1186
|
type: Component,
|
|
971
1187
|
args: [{
|
|
972
1188
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1004,6 +1220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1004
1220
|
*ngIf="showCalendarHeader"
|
|
1005
1221
|
[activeView]="activeViewEnum"
|
|
1006
1222
|
[currentDate]="activeDate"
|
|
1223
|
+
[size]="size"
|
|
1007
1224
|
[min]="min"
|
|
1008
1225
|
[max]="max"
|
|
1009
1226
|
[id]="headerId"
|
|
@@ -1021,6 +1238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1021
1238
|
</kendo-calendar-header>
|
|
1022
1239
|
<kendo-calendar-horizontal
|
|
1023
1240
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
1241
|
+
[allowReverse]="allowReverse"
|
|
1024
1242
|
[id]="calendarHeaderIdLabel"
|
|
1025
1243
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
1026
1244
|
[activeView]="activeViewEnum"
|
|
@@ -1045,7 +1263,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1045
1263
|
[disabled]="disabled"
|
|
1046
1264
|
(cellClick)="handleCellClick($event)"
|
|
1047
1265
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
1048
|
-
(cellEnter)="
|
|
1266
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
1049
1267
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
1050
1268
|
(activeDateChange)="setActiveDate($event)"
|
|
1051
1269
|
(focusCalendar)="handleFocus()"
|
|
@@ -1064,6 +1282,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1064
1282
|
type: Input
|
|
1065
1283
|
}], showCalendarHeader: [{
|
|
1066
1284
|
type: Input
|
|
1285
|
+
}], size: [{
|
|
1286
|
+
type: Input
|
|
1067
1287
|
}], id: [{
|
|
1068
1288
|
type: Input
|
|
1069
1289
|
}], focusedDate: [{
|
|
@@ -1080,6 +1300,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1080
1300
|
type: Input
|
|
1081
1301
|
}], selection: [{
|
|
1082
1302
|
type: Input
|
|
1303
|
+
}], allowReverse: [{
|
|
1304
|
+
type: Input
|
|
1083
1305
|
}], value: [{
|
|
1084
1306
|
type: Input
|
|
1085
1307
|
}], disabled: [{
|
|
@@ -1124,6 +1346,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1124
1346
|
type: Output
|
|
1125
1347
|
}], valueChange: [{
|
|
1126
1348
|
type: Output
|
|
1349
|
+
}], rangeSelectionChange: [{
|
|
1350
|
+
type: Output
|
|
1127
1351
|
}], blurEvent: [{
|
|
1128
1352
|
type: Output,
|
|
1129
1353
|
args: ['blur']
|
|
@@ -57,8 +57,8 @@ import * as i0 from "@angular/core";
|
|
|
57
57
|
*/
|
|
58
58
|
export class MultiViewCalendarModule {
|
|
59
59
|
}
|
|
60
|
-
MultiViewCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
61
|
-
MultiViewCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
60
|
+
MultiViewCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
61
|
+
MultiViewCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarModule, declarations: [HorizontalViewListComponent,
|
|
62
62
|
MultiViewCalendarLocalizedMessagesDirective,
|
|
63
63
|
MultiViewCalendarCustomMessagesComponent,
|
|
64
64
|
MultiViewCalendarComponent], imports: [CommonModule,
|
|
@@ -72,7 +72,7 @@ MultiViewCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
|
|
|
72
72
|
MultiViewCalendarComponent,
|
|
73
73
|
CalendarCommonModule,
|
|
74
74
|
TemplatesModule] });
|
|
75
|
-
MultiViewCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
75
|
+
MultiViewCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarModule, providers: [
|
|
76
76
|
NavigationService,
|
|
77
77
|
CenturyViewService,
|
|
78
78
|
DecadeViewService,
|
|
@@ -86,7 +86,7 @@ MultiViewCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
86
86
|
PopupModule,
|
|
87
87
|
EventsModule, CalendarCommonModule,
|
|
88
88
|
TemplatesModule] });
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarModule, decorators: [{
|
|
90
90
|
type: NgModule,
|
|
91
91
|
args: [{
|
|
92
92
|
declarations: [
|
|
@@ -117,8 +117,8 @@ export class NavigationComponent {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
NavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
|
121
|
-
NavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
|
120
|
+
NavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationComponent, deps: [{ token: i1.BusViewService }, { token: i2.CalendarDOMService }, { token: i3.IntlService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
+
NavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NavigationComponent, selector: "kendo-calendar-navigation", inputs: { activeView: "activeView", min: "min", max: "max", focusedDate: "focusedDate", templateRef: "templateRef" }, outputs: { valueChange: "valueChange", pageChange: "pageChange" }, host: { properties: { "class.k-calendar-navigation": "this.getComponentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
122
122
|
<span class="k-calendar-navigation-highlight"></span>
|
|
123
123
|
<kendo-virtualization
|
|
124
124
|
[skip]="skip"
|
|
@@ -145,7 +145,7 @@ NavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
145
145
|
</ul>
|
|
146
146
|
</kendo-virtualization>
|
|
147
147
|
`, isInline: true, dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "component", type: i6.VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }, { kind: "directive", type: i7.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
150
|
args: [{
|
|
151
151
|
changeDetection: ChangeDetectionStrategy.OnPush,
|