@progress/kendo-angular-dateinputs 16.0.0-develop.2 → 16.0.0-develop.20
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 +42 -8
- package/calendar/footer.component.d.ts +1 -1
- package/calendar/for.directive.d.ts +1 -1
- package/calendar/header.component.d.ts +3 -2
- package/calendar/horizontal-view-list.component.d.ts +4 -3
- package/calendar/localization/calendar-custom-messages.component.d.ts +1 -1
- package/calendar/localization/calendar-localized-messages.directive.d.ts +1 -1
- package/calendar/localization/calendar-messages.d.ts +1 -1
- package/calendar/localization/multiview-calendar-custom-messages.component.d.ts +1 -1
- package/calendar/localization/multiview-calendar-localized-messages.directive.d.ts +1 -1
- package/calendar/localization/multiview-calendar-messages.d.ts +1 -1
- 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 +57 -8
- package/calendar/navigation.component.d.ts +1 -1
- package/calendar/templates/cell-template.directive.d.ts +1 -1
- package/calendar/templates/century-cell-template.directive.d.ts +1 -1
- package/calendar/templates/decade-cell-template.directive.d.ts +1 -1
- package/calendar/templates/footer-template.directiv/320/265.d.ts +1 -1
- package/calendar/templates/header-template.directive.d.ts +1 -1
- package/calendar/templates/header-title-template.directive.d.ts +1 -1
- package/calendar/templates/month-cell-template.directive.d.ts +1 -1
- package/calendar/templates/navigation-item-template.directive.d.ts +1 -1
- package/calendar/templates/weeknumber-cell-template.directive.d.ts +1 -1
- package/calendar/templates/year-cell-template.directive.d.ts +1 -1
- 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/dateinput-custom-messages.component.d.ts +1 -1
- package/dateinput/localization/dateinput-localized-messages.directive.d.ts +1 -1
- package/dateinput/localization/messages.d.ts +5 -1
- package/datepicker/datepicker.component.d.ts +7 -2
- package/datepicker/localization/datepicker-custom-messages.component.d.ts +1 -1
- package/datepicker/localization/datepicker-localized-messages.directive.d.ts +1 -1
- package/datepicker/localization/messages.d.ts +5 -1
- package/daterange/date-range-end-input.directive.d.ts +1 -1
- package/daterange/date-range-input.d.ts +1 -1
- package/daterange/date-range-popup-template.directive.d.ts +1 -1
- package/daterange/date-range-popup.component.d.ts +30 -2
- package/daterange/date-range-selection.directive.d.ts +1 -1
- package/daterange/date-range-start-input.directive.d.ts +1 -1
- package/daterange/date-range.component.d.ts +16 -1
- package/daterange/localization/daterange-popup-custom-messages.component.d.ts +1 -1
- package/daterange/localization/daterange-popup-localized-messages.directive.d.ts +1 -1
- package/daterange/localization/messages.d.ts +1 -1
- package/datetimepicker/datetimepicker.component.d.ts +12 -1
- package/datetimepicker/localization/datetimepicker-custom-messages.component.d.ts +1 -1
- package/datetimepicker/localization/localized-messages.directive.d.ts +1 -1
- package/datetimepicker/localization/messages.d.ts +5 -1
- package/esm2020/calendar/calendar-common.module.mjs +4 -4
- package/esm2020/calendar/calendar.component.mjs +256 -66
- package/esm2020/calendar/calendar.module.mjs +12 -14
- package/esm2020/calendar/calendars.module.mjs +5 -7
- package/esm2020/calendar/footer.component.mjs +6 -6
- package/esm2020/calendar/for.directive.mjs +3 -3
- package/esm2020/calendar/header.component.mjs +44 -26
- package/esm2020/calendar/horizontal-view-list.component.mjs +16 -12
- 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 +34 -1
- package/esm2020/calendar/multiview-calendar.component.mjs +268 -56
- package/esm2020/calendar/multiview-calendar.module.mjs +10 -12
- package/esm2020/calendar/navigation.component.mjs +8 -8
- 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 +31 -10
- package/esm2020/calendar/view.component.mjs +9 -6
- package/esm2020/common/adaptive.module.mjs +4 -4
- package/esm2020/common/utils.mjs +5 -1
- package/esm2020/dateinput/dateinput.component.mjs +70 -13
- 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 +45 -23
- package/esm2020/datepicker/datepicker.module.mjs +12 -14
- 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 +75 -21
- 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 +12 -10
- package/esm2020/daterange/date-range.module.mjs +4 -4
- package/esm2020/daterange/date-range.service.mjs +3 -4
- 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 +56 -23
- package/esm2020/datetimepicker/datetimepicker.module.mjs +14 -16
- 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 +6 -6
- package/esm2020/timepicker/timepicker.component.mjs +42 -17
- package/esm2020/timepicker/timepicker.module.mjs +4 -4
- package/esm2020/timepicker/timeselector.component.mjs +29 -14
- package/esm2020/virtualization/virtualization.component.mjs +4 -4
- package/esm2020/virtualization/virtualization.module.mjs +4 -4
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +1547 -763
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +1538 -766
- package/package.json +17 -20
- package/timepicker/localization/messages.d.ts +5 -1
- package/timepicker/localization/timepicker-custom-messages.component.d.ts +1 -1
- package/timepicker/localization/timepicker-localized-messages.directive.d.ts +1 -1
- package/timepicker/localization/timeselector-custom-messages.component.d.ts +1 -1
- package/timepicker/localization/timeselector-localized-messages.directive.d.ts +1 -1
- package/timepicker/timelist.component.d.ts +1 -1
- package/timepicker/timepicker.component.d.ts +7 -1
- package/timepicker/timeselector.component.d.ts +2 -1
- package/virtualization/virtualization.component.d.ts +1 -1
- package/progress-kendo-angular-dateinputs.d.ts +0 -9
|
@@ -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е';
|
|
@@ -36,11 +37,11 @@ import * as i1 from "./services/bus-view.service";
|
|
|
36
37
|
import * as i2 from "./services/navigation.service";
|
|
37
38
|
import * as i3 from "./services/disabled-dates.service";
|
|
38
39
|
import * as i4 from "./services/selection.service";
|
|
39
|
-
import * as i5 from "
|
|
40
|
-
import * as i6 from "./
|
|
40
|
+
import * as i5 from "@angular/common";
|
|
41
|
+
import * as i6 from "./header.component";
|
|
41
42
|
import * as i7 from "./footer.component";
|
|
42
|
-
import * as i8 from "./
|
|
43
|
-
import * as i9 from "
|
|
43
|
+
import * as i8 from "./horizontal-view-list.component";
|
|
44
|
+
import * as i9 from "./localization/multiview-calendar-localized-messages.directive";
|
|
44
45
|
const BOTTOM_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-bottomview';
|
|
45
46
|
const TOP_VIEW_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-topview';
|
|
46
47
|
const MIN_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/dateinputs/api/CalendarComponent/#toc-min';
|
|
@@ -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;
|
|
@@ -581,8 +637,13 @@ export class MultiViewCalendarComponent {
|
|
|
581
637
|
return;
|
|
582
638
|
}
|
|
583
639
|
else if (onEnterKeyPress) {
|
|
584
|
-
this.
|
|
585
|
-
|
|
640
|
+
if (this.selection !== 'range') {
|
|
641
|
+
this.selectionService.lastClicked = this.focusedDate;
|
|
642
|
+
this.performSelection(this.focusedDate, event);
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
this.performRangeSelection(this.focusedDate);
|
|
646
|
+
}
|
|
586
647
|
}
|
|
587
648
|
if (this.views >= 2) {
|
|
588
649
|
if ((escKey || (altKey && onArrowUpPress))) {
|
|
@@ -605,12 +666,13 @@ export class MultiViewCalendarComponent {
|
|
|
605
666
|
if (!isSameView) {
|
|
606
667
|
this.emitNavigate(this.focusedDate);
|
|
607
668
|
}
|
|
608
|
-
if (isArrowWithShiftPressed(event)) {
|
|
669
|
+
if (isArrowWithShiftPressed(event) && this.selection !== 'range') {
|
|
609
670
|
event['anyArrow'] = true;
|
|
610
671
|
this.performSelection(this.focusedDate, event);
|
|
611
672
|
}
|
|
612
673
|
}
|
|
613
674
|
ngOnInit() {
|
|
675
|
+
this.setClasses(this.element.nativeElement);
|
|
614
676
|
this.subscriptions.add(this.bus.viewChanged.subscribe(({ view }) => {
|
|
615
677
|
this.activeView = CalendarViewEnum[view];
|
|
616
678
|
this.activeViewChange.emit(this.activeView);
|
|
@@ -619,21 +681,30 @@ export class MultiViewCalendarComponent {
|
|
|
619
681
|
}));
|
|
620
682
|
}
|
|
621
683
|
ngOnChanges(changes) {
|
|
684
|
+
this.changes = changes;
|
|
622
685
|
this.verifyChanges();
|
|
623
686
|
this.bus.configure(this.bottomViewEnum, this.topViewEnum);
|
|
624
|
-
|
|
625
|
-
|
|
687
|
+
}
|
|
688
|
+
ngDoCheck() {
|
|
689
|
+
if (this.valueSetter || this.selectionSetter) {
|
|
690
|
+
this.setValue(this.value);
|
|
691
|
+
this.valueSetter = false;
|
|
692
|
+
this.selectionSetter = false;
|
|
693
|
+
}
|
|
694
|
+
if (hasExistingValue(this.changes, 'focusedDate')) {
|
|
695
|
+
const focusedDate = this.changes.focusedDate.currentValue;
|
|
626
696
|
this.focusedDate = dateInRange(focusedDate, this.min, this.max);
|
|
627
697
|
}
|
|
628
|
-
if (changes.min || changes.max || changes.rangeValidation || changes.disabledDates || changes.disabledDatesRangeValidation) {
|
|
698
|
+
if (this.changes.min || this.changes.max || this.changes.rangeValidation || this.changes.disabledDates || this.changes.disabledDatesRangeValidation) {
|
|
629
699
|
this.minValidateFn = this.rangeValidation ? minValidator(this.min) : noop;
|
|
630
700
|
this.maxValidateFn = this.rangeValidation ? maxValidator(this.max) : noop;
|
|
631
701
|
this.disabledDatesRangeValidateFn = this.disabledDatesRangeValidation ? disabledDatesRangeValidator(this.disabledDatesService.isDateDisabled) : noop;
|
|
632
702
|
this.onValidatorChange();
|
|
633
703
|
}
|
|
634
|
-
if (changes.min || changes.max || changes.focusedDate || changes.activeView) {
|
|
704
|
+
if (this.changes.min || this.changes.max || this.changes.focusedDate || this.changes.activeView) {
|
|
635
705
|
this.updateButtonState();
|
|
636
706
|
}
|
|
707
|
+
this.changes = {};
|
|
637
708
|
}
|
|
638
709
|
ngOnDestroy() {
|
|
639
710
|
this.subscriptions.unsubscribe();
|
|
@@ -671,7 +742,7 @@ export class MultiViewCalendarComponent {
|
|
|
671
742
|
return;
|
|
672
743
|
}
|
|
673
744
|
const activeElement = this.views >= 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
|
|
674
|
-
this.element.nativeElement.querySelector('.k-
|
|
745
|
+
this.element.nativeElement.querySelector('.k-calendar-table');
|
|
675
746
|
activeElement.blur();
|
|
676
747
|
}
|
|
677
748
|
/**
|
|
@@ -692,11 +763,48 @@ export class MultiViewCalendarComponent {
|
|
|
692
763
|
if (this.disabledDatesService.isDateDisabled(this.focusedDate)) {
|
|
693
764
|
return;
|
|
694
765
|
}
|
|
766
|
+
if (this.selection === 'range') {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
695
769
|
this.selectedDates = availableDates.map(date => cloneDate(date));
|
|
696
770
|
this.value = this.parseSelectionToValue(availableDates);
|
|
697
771
|
this.onControlChange(this.parseSelectionToValue(availableDates));
|
|
698
772
|
this.valueChange.emit(this.parseSelectionToValue(availableDates));
|
|
699
773
|
}
|
|
774
|
+
/**
|
|
775
|
+
* @hidden
|
|
776
|
+
*/
|
|
777
|
+
onCellEnter(cellEnter, date) {
|
|
778
|
+
this.emitCellEvent(cellEnter, date);
|
|
779
|
+
if (this.selection === 'range' && (this.canHover || this.shouldHoverWhenNoStart)) {
|
|
780
|
+
this.zone.run(() => {
|
|
781
|
+
if (this.canHover && !this.shouldHoverWhenNoStart) {
|
|
782
|
+
if (this.allowReverse) {
|
|
783
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start) {
|
|
784
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
785
|
+
}
|
|
786
|
+
if (this.activeRangeEnd === 'start' && this.selectionRange.end) {
|
|
787
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
if (this.activeRangeEnd === 'end' && this.selectionRange.start && date >= this.selectionRange.start) {
|
|
792
|
+
this.selectionRange = { start: this.selectionRange.start, end: date };
|
|
793
|
+
}
|
|
794
|
+
if (this.selectionRange.start && date < this.selectionRange.start) {
|
|
795
|
+
this.selectionRange = { start: this.selectionRange.start, end: null };
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
else if (this.shouldHoverWhenNoStart && date <= this.selectionRange.end) {
|
|
800
|
+
this.selectionRange = { start: date, end: this.selectionRange.end };
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
this.selectionRange = { start: null, end: this.selectionRange.end };
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
}
|
|
700
808
|
/**
|
|
701
809
|
* @hidden
|
|
702
810
|
*/
|
|
@@ -801,8 +909,13 @@ export class MultiViewCalendarComponent {
|
|
|
801
909
|
* @hidden
|
|
802
910
|
*/
|
|
803
911
|
handleCellClick({ date, modifiers }) {
|
|
804
|
-
this.
|
|
805
|
-
|
|
912
|
+
if (this.selection === 'range') {
|
|
913
|
+
this.performRangeSelection(date);
|
|
914
|
+
}
|
|
915
|
+
else {
|
|
916
|
+
this.selectionService.lastClicked = date;
|
|
917
|
+
this.performSelection(date, modifiers);
|
|
918
|
+
}
|
|
806
919
|
const isSameView = this.bus.service(this.activeViewEnum).isInArray(this.focusedDate, this.viewList.dates);
|
|
807
920
|
if (!isSameView) {
|
|
808
921
|
this.emitNavigate(this.focusedDate);
|
|
@@ -816,16 +929,31 @@ export class MultiViewCalendarComponent {
|
|
|
816
929
|
return;
|
|
817
930
|
}
|
|
818
931
|
this.zone.run(() => {
|
|
819
|
-
this.
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
932
|
+
if (this.selection === 'multiple') {
|
|
933
|
+
this.handleDateChange({
|
|
934
|
+
selectedDates: dates,
|
|
935
|
+
focusedDate: last(dates),
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
if (this.selection === 'range') {
|
|
939
|
+
this.activeRangeEnd = 'start';
|
|
940
|
+
const shouldEmitValueChange = this.selectionRange.start?.getTime() !== dates[0].getTime() ||
|
|
941
|
+
this.selectionRange.end?.getTime() !== last(dates).getTime();
|
|
942
|
+
this.selectionRange.start = dates[0];
|
|
943
|
+
this.selectionRange.end = last(dates);
|
|
944
|
+
this.value = this.selectionRange;
|
|
945
|
+
if (shouldEmitValueChange) {
|
|
946
|
+
this.valueChange.emit(this.value);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
823
949
|
});
|
|
824
950
|
}
|
|
825
951
|
setClasses(element) {
|
|
826
|
-
this.renderer.addClass(element, 'k-widget');
|
|
827
952
|
this.renderer.addClass(element, 'k-calendar');
|
|
828
|
-
this.renderer.addClass(element, '
|
|
953
|
+
this.renderer.addClass(element, getSizeClass('calendar', this.size));
|
|
954
|
+
if (this.views >= 2) {
|
|
955
|
+
this.renderer.addClass(element, 'k-calendar-range');
|
|
956
|
+
}
|
|
829
957
|
}
|
|
830
958
|
verifyChanges() {
|
|
831
959
|
if (!isDevMode()) {
|
|
@@ -842,15 +970,23 @@ export class MultiViewCalendarComponent {
|
|
|
842
970
|
if (!isDevMode()) {
|
|
843
971
|
return;
|
|
844
972
|
}
|
|
845
|
-
if (this.selection === 'single' && candidate && !(candidate
|
|
846
|
-
throw new Error(`
|
|
973
|
+
if (this.selection === 'single' && candidate && !(isNullOrDate(candidate))) {
|
|
974
|
+
throw new Error(`When using 'single' selection the 'value' should be a valid JavaScript Date instance. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
847
975
|
}
|
|
848
|
-
else if (this.selection === 'multiple' && candidate
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
976
|
+
else if (this.selection === 'multiple' && candidate) {
|
|
977
|
+
if (Array.isArray(candidate)) {
|
|
978
|
+
const onlyDates = candidate.every(value => value instanceof Date);
|
|
979
|
+
if (!onlyDates) {
|
|
980
|
+
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.`);
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
if (Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
984
|
+
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.`);
|
|
852
985
|
}
|
|
853
986
|
}
|
|
987
|
+
else if (this.selection === 'range' && candidate && !(isNullOrDate(candidate['start']) && isNullOrDate(candidate['end']))) {
|
|
988
|
+
throw new Error(`The 'value' should be an object with start and end dates. Check ${VALUE_DOC_LINK} for possible resolution.`);
|
|
989
|
+
}
|
|
854
990
|
}
|
|
855
991
|
updateButtonState() {
|
|
856
992
|
this.resolvedPromise.then(() => {
|
|
@@ -863,6 +999,72 @@ export class MultiViewCalendarComponent {
|
|
|
863
999
|
selection = selection || [];
|
|
864
1000
|
return this.selection === 'single' ? cloneDate(last(selection)) : selection.map(date => cloneDate(date));
|
|
865
1001
|
}
|
|
1002
|
+
setValue(candidate) {
|
|
1003
|
+
this.verifyValue(candidate);
|
|
1004
|
+
if (candidate === null) {
|
|
1005
|
+
this._value = null;
|
|
1006
|
+
this.selectedDates = [];
|
|
1007
|
+
}
|
|
1008
|
+
else if (Array.isArray(candidate)) {
|
|
1009
|
+
this.selectionRange = { start: null, end: null };
|
|
1010
|
+
this._value = candidate.filter(date => isPresent(date)).map(element => cloneDate(element));
|
|
1011
|
+
}
|
|
1012
|
+
else if (isObject(candidate) && Object.keys(candidate).find(k => k === 'start') && Object.keys(candidate).find(k => k === 'end')) {
|
|
1013
|
+
this.selectedDates = [];
|
|
1014
|
+
this.selectionRange = { start: null, end: null };
|
|
1015
|
+
this._value = { start: null, end: null };
|
|
1016
|
+
this._value.start = candidate.start instanceof Date ? cloneDate(candidate.start) : null;
|
|
1017
|
+
this._value.end = candidate.end instanceof Date ? cloneDate(candidate.end) : null;
|
|
1018
|
+
this.selectionRange = Object.assign({}, this._value);
|
|
1019
|
+
if (this._value?.start && !this._value?.end) {
|
|
1020
|
+
this.activeRangeEnd = 'end';
|
|
1021
|
+
this.canHover = true;
|
|
1022
|
+
}
|
|
1023
|
+
if (this._value?.end && !this._value?.start) {
|
|
1024
|
+
this.activeRangeEnd = 'start';
|
|
1025
|
+
this.canHover = true;
|
|
1026
|
+
}
|
|
1027
|
+
if (this.activeRangeEnd === 'end') {
|
|
1028
|
+
this.focusedDate = this.selectionRange.start || this.selectionRange.end || getToday();
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
this.focusedDate = this.selectionRange.end || this.selectionRange.start || getToday();
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1035
|
+
this.selectionRange = { start: null, end: null };
|
|
1036
|
+
this._value = cloneDate(candidate);
|
|
1037
|
+
}
|
|
1038
|
+
if (this.selection !== 'range') {
|
|
1039
|
+
const selection = [].concat(candidate).filter(date => isPresent(date)).map(date => cloneDate(date));
|
|
1040
|
+
if (!areDatesEqual(selection, this.selectedDates)) {
|
|
1041
|
+
const lastSelected = last(selection);
|
|
1042
|
+
this.rangePivot = cloneDate(lastSelected);
|
|
1043
|
+
this.focusedDate = cloneDate(lastSelected) || this.focusedDate;
|
|
1044
|
+
this.selectedDates = selection;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
performRangeSelection(date) {
|
|
1049
|
+
const clonedRangeSelection = Object.assign({}, this.selectionRange);
|
|
1050
|
+
const emitValueChange = (this.activeRangeEnd === 'start' && this.value?.start?.getTime() !== date?.getTime()) ||
|
|
1051
|
+
(this.activeRangeEnd === 'end' && this.value?.end?.getTime() !== date?.getTime());
|
|
1052
|
+
this.zone.run(() => {
|
|
1053
|
+
const rangeSelection = handleRangeSelection(date, clonedRangeSelection, this.activeRangeEnd, this.allowReverse);
|
|
1054
|
+
this.activeRangeEnd = rangeSelection.activeRangeEnd;
|
|
1055
|
+
if (this.canHover && rangeSelection.activeRangeEnd === 'end' && rangeSelection.selectionRange.end?.getTime() === date.getTime()) {
|
|
1056
|
+
this.activeRangeEnd = 'start';
|
|
1057
|
+
}
|
|
1058
|
+
this.canHover = this.activeRangeEnd === 'end' && rangeSelection.selectionRange.start && !rangeSelection.selectionRange.end;
|
|
1059
|
+
if (emitValueChange && (this.value?.start?.getTime() !== rangeSelection.selectionRange?.start?.getTime() ||
|
|
1060
|
+
this.value?.end?.getTime() !== rangeSelection.selectionRange?.end?.getTime())) {
|
|
1061
|
+
this.value = rangeSelection.selectionRange;
|
|
1062
|
+
this.valueChange.emit(this.value);
|
|
1063
|
+
this.rangeSelectionChange.emit(rangeSelection);
|
|
1064
|
+
}
|
|
1065
|
+
this.cdr.markForCheck();
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
866
1068
|
performSelection(date, selectionModifiers) {
|
|
867
1069
|
const selection = this.selectionService.performSelection({
|
|
868
1070
|
date: date,
|
|
@@ -879,8 +1081,8 @@ export class MultiViewCalendarComponent {
|
|
|
879
1081
|
});
|
|
880
1082
|
}
|
|
881
1083
|
}
|
|
882
|
-
MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
883
|
-
MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1084
|
+
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 });
|
|
1085
|
+
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
1086
|
BusViewService,
|
|
885
1087
|
RANGE_CALENDAR_VALUE_ACCESSOR,
|
|
886
1088
|
RANGE_CALENDAR_RANGE_VALIDATORS,
|
|
@@ -911,6 +1113,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
911
1113
|
*ngIf="showCalendarHeader"
|
|
912
1114
|
[activeView]="activeViewEnum"
|
|
913
1115
|
[currentDate]="activeDate"
|
|
1116
|
+
[size]="size"
|
|
914
1117
|
[min]="min"
|
|
915
1118
|
[max]="max"
|
|
916
1119
|
[id]="headerId"
|
|
@@ -928,6 +1131,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
928
1131
|
</kendo-calendar-header>
|
|
929
1132
|
<kendo-calendar-horizontal
|
|
930
1133
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
1134
|
+
[allowReverse]="allowReverse"
|
|
931
1135
|
[id]="calendarHeaderIdLabel"
|
|
932
1136
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
933
1137
|
[activeView]="activeViewEnum"
|
|
@@ -952,7 +1156,7 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
952
1156
|
[disabled]="disabled"
|
|
953
1157
|
(cellClick)="handleCellClick($event)"
|
|
954
1158
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
955
|
-
(cellEnter)="
|
|
1159
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
956
1160
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
957
1161
|
(activeDateChange)="setActiveDate($event)"
|
|
958
1162
|
(focusCalendar)="handleFocus()"
|
|
@@ -965,8 +1169,8 @@ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
|
|
|
965
1169
|
[activeViewValue]="activeView"
|
|
966
1170
|
[currentDate]="activeDate">
|
|
967
1171
|
</kendo-calendar-footer>
|
|
968
|
-
`, isInline: true,
|
|
969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1172
|
+
`, 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 });
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarComponent, decorators: [{
|
|
970
1174
|
type: Component,
|
|
971
1175
|
args: [{
|
|
972
1176
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -1004,6 +1208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1004
1208
|
*ngIf="showCalendarHeader"
|
|
1005
1209
|
[activeView]="activeViewEnum"
|
|
1006
1210
|
[currentDate]="activeDate"
|
|
1211
|
+
[size]="size"
|
|
1007
1212
|
[min]="min"
|
|
1008
1213
|
[max]="max"
|
|
1009
1214
|
[id]="headerId"
|
|
@@ -1021,6 +1226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1021
1226
|
</kendo-calendar-header>
|
|
1022
1227
|
<kendo-calendar-horizontal
|
|
1023
1228
|
[showOtherMonthDays]="showOtherMonthDays"
|
|
1229
|
+
[allowReverse]="allowReverse"
|
|
1024
1230
|
[id]="calendarHeaderIdLabel"
|
|
1025
1231
|
[attr.aria-labelledby]="multiViewCalendarHeaderIdLabel"
|
|
1026
1232
|
[activeView]="activeViewEnum"
|
|
@@ -1045,7 +1251,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1045
1251
|
[disabled]="disabled"
|
|
1046
1252
|
(cellClick)="handleCellClick($event)"
|
|
1047
1253
|
(weekNumberCellClick)="handleWeekNumberClick($event)"
|
|
1048
|
-
(cellEnter)="
|
|
1254
|
+
(cellEnter)="onCellEnter(cellEnter, $event)"
|
|
1049
1255
|
(cellLeave)="emitCellEvent(cellLeave, $event)"
|
|
1050
1256
|
(activeDateChange)="setActiveDate($event)"
|
|
1051
1257
|
(focusCalendar)="handleFocus()"
|
|
@@ -1064,6 +1270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1064
1270
|
type: Input
|
|
1065
1271
|
}], showCalendarHeader: [{
|
|
1066
1272
|
type: Input
|
|
1273
|
+
}], size: [{
|
|
1274
|
+
type: Input
|
|
1067
1275
|
}], id: [{
|
|
1068
1276
|
type: Input
|
|
1069
1277
|
}], focusedDate: [{
|
|
@@ -1080,6 +1288,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1080
1288
|
type: Input
|
|
1081
1289
|
}], selection: [{
|
|
1082
1290
|
type: Input
|
|
1291
|
+
}], allowReverse: [{
|
|
1292
|
+
type: Input
|
|
1083
1293
|
}], value: [{
|
|
1084
1294
|
type: Input
|
|
1085
1295
|
}], disabled: [{
|
|
@@ -1124,6 +1334,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1124
1334
|
type: Output
|
|
1125
1335
|
}], valueChange: [{
|
|
1126
1336
|
type: Output
|
|
1337
|
+
}], rangeSelectionChange: [{
|
|
1338
|
+
type: Output
|
|
1127
1339
|
}], blurEvent: [{
|
|
1128
1340
|
type: Output,
|
|
1129
1341
|
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: "
|
|
61
|
-
MultiViewCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
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,23 +72,21 @@ MultiViewCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
72
72
|
MultiViewCalendarComponent,
|
|
73
73
|
CalendarCommonModule,
|
|
74
74
|
TemplatesModule] });
|
|
75
|
-
MultiViewCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
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,
|
|
79
79
|
MonthViewService,
|
|
80
80
|
YearViewService,
|
|
81
81
|
WeekNamesService
|
|
82
|
-
], imports: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
EventsModule
|
|
89
|
-
], CalendarCommonModule,
|
|
82
|
+
], imports: [CommonModule,
|
|
83
|
+
CalendarCommonModule,
|
|
84
|
+
IntlModule,
|
|
85
|
+
TemplatesModule,
|
|
86
|
+
PopupModule,
|
|
87
|
+
EventsModule, CalendarCommonModule,
|
|
90
88
|
TemplatesModule] });
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MultiViewCalendarModule, decorators: [{
|
|
92
90
|
type: NgModule,
|
|
93
91
|
args: [{
|
|
94
92
|
declarations: [
|