@progress/kendo-angular-dateinputs 7.0.0-next.202204010857 → 7.0.0-next.202204081436
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/bundles/kendo-angular-dateinputs.umd.js +1 -1
- package/calendar/calendar.component.d.ts +3 -0
- package/common/models/fillmode.d.ts +5 -5
- package/common/models/rounded.d.ts +6 -6
- package/common/models/size.d.ts +5 -5
- package/dateinput/dateinput.component.d.ts +13 -13
- package/datepicker/datepicker.component.d.ts +13 -13
- package/daterange/date-range-end-input.directive.d.ts +1 -2
- package/daterange/date-range-input.d.ts +1 -3
- package/daterange/date-range-popup.component.d.ts +2 -4
- package/daterange/date-range-start-input.directive.d.ts +1 -2
- package/daterange/date-range.service.d.ts +33 -0
- package/esm2015/calendar/calendar.component.js +3 -0
- package/esm2015/dateinput/dateinput.component.js +36 -33
- package/esm2015/datepicker/datepicker.component.js +29 -26
- package/esm2015/daterange/date-range-end-input.directive.js +4 -5
- package/esm2015/daterange/date-range-input.js +8 -11
- package/esm2015/daterange/date-range-popup.component.js +7 -9
- package/esm2015/daterange/date-range-start-input.directive.js +4 -5
- package/esm2015/daterange/date-range.component.js +2 -3
- package/esm2015/daterange/date-range.service.js +61 -0
- package/esm2015/main.js +0 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/util.js +12 -0
- package/fesm2015/kendo-angular-dateinputs.js +159 -162
- package/main.d.ts +0 -1
- package/package.json +6 -6
- package/util.d.ts +12 -0
- package/daterange/date-range-popup.service.d.ts +0 -52
- package/esm2015/daterange/date-range-popup.service.js +0 -87
|
@@ -496,6 +496,9 @@ export declare class CalendarComponent implements ControlValueAccessor, OnChange
|
|
|
496
496
|
* @hidden
|
|
497
497
|
*/
|
|
498
498
|
handleFocus(): void;
|
|
499
|
+
/**
|
|
500
|
+
* @hidden
|
|
501
|
+
*/
|
|
499
502
|
handleMultiViewCalendarKeydown(args: any): void;
|
|
500
503
|
private setClasses;
|
|
501
504
|
private verifyChanges;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Represents the possible fillMode options of the DateInput.
|
|
7
7
|
*
|
|
8
8
|
* The possible values are:
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
11
|
-
* - `
|
|
12
|
-
* - `
|
|
9
|
+
* - `solid` (Default)
|
|
10
|
+
* - `flat`
|
|
11
|
+
* - `outline`
|
|
12
|
+
* - `none`
|
|
13
13
|
*/
|
|
14
|
-
export declare type DateInputFillMode = 'solid' | 'flat' | 'outline';
|
|
14
|
+
export declare type DateInputFillMode = 'solid' | 'flat' | 'outline' | 'none';
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* Represents the possible rounded options of the DateInput.
|
|
7
7
|
*
|
|
8
8
|
* The possible values are:
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
11
|
-
* - `
|
|
12
|
-
* - `
|
|
13
|
-
* - `
|
|
9
|
+
* - `small`
|
|
10
|
+
* - `medium` (Default)
|
|
11
|
+
* - `large`
|
|
12
|
+
* - `full`
|
|
13
|
+
* - `none`
|
|
14
14
|
*/
|
|
15
|
-
export declare type DateInputRounded = 'small' | 'medium' | 'large' | 'full';
|
|
15
|
+
export declare type DateInputRounded = 'small' | 'medium' | 'large' | 'full' | 'none';
|
package/common/models/size.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* Represents the possible size options of the DateInput.
|
|
7
7
|
*
|
|
8
8
|
* The possible values are:
|
|
9
|
-
* - `
|
|
10
|
-
* - `
|
|
11
|
-
* - `
|
|
12
|
-
* - `
|
|
9
|
+
* - `small`
|
|
10
|
+
* - `medium` (Default)
|
|
11
|
+
* - `large`
|
|
12
|
+
* - `none`
|
|
13
13
|
*/
|
|
14
|
-
export declare type DateInputSize = 'small' | 'medium' | 'large';
|
|
14
|
+
export declare type DateInputSize = 'small' | 'medium' | 'large' | 'none';
|
|
@@ -214,10 +214,10 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
|
|
|
214
214
|
* Sets the size of the component.
|
|
215
215
|
*
|
|
216
216
|
* The possible values are:
|
|
217
|
-
* * `
|
|
218
|
-
* * `
|
|
219
|
-
* * `
|
|
220
|
-
* * `
|
|
217
|
+
* * `small`
|
|
218
|
+
* * `medium` (Default)
|
|
219
|
+
* * `large`
|
|
220
|
+
* * `none`
|
|
221
221
|
*
|
|
222
222
|
*/
|
|
223
223
|
set size(size: DateInputSize);
|
|
@@ -226,11 +226,11 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
|
|
|
226
226
|
* Sets the border radius of the component.
|
|
227
227
|
*
|
|
228
228
|
* The possible values are:
|
|
229
|
-
* * `
|
|
230
|
-
* * `
|
|
231
|
-
* * `
|
|
232
|
-
* * `
|
|
233
|
-
* * `
|
|
229
|
+
* * `small`
|
|
230
|
+
* * `medium` (Default)
|
|
231
|
+
* * `large`
|
|
232
|
+
* * `full`
|
|
233
|
+
* * `none`
|
|
234
234
|
*
|
|
235
235
|
*/
|
|
236
236
|
set rounded(rounded: DateInputRounded);
|
|
@@ -239,10 +239,10 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
|
|
|
239
239
|
* Sets the fillMode of the component.
|
|
240
240
|
*
|
|
241
241
|
* The possible values are:
|
|
242
|
-
* * `
|
|
243
|
-
* * `
|
|
244
|
-
* * `
|
|
245
|
-
* * `
|
|
242
|
+
* * `solid` (Default)
|
|
243
|
+
* * `flat`
|
|
244
|
+
* * `outline`
|
|
245
|
+
* * `none`
|
|
246
246
|
*
|
|
247
247
|
*/
|
|
248
248
|
set fillMode(fillMode: DateInputFillMode);
|
|
@@ -326,10 +326,10 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
|
|
|
326
326
|
* Sets the size of the component.
|
|
327
327
|
*
|
|
328
328
|
* The possible values are:
|
|
329
|
-
* * `
|
|
330
|
-
* * `
|
|
331
|
-
* * `
|
|
332
|
-
* * `
|
|
329
|
+
* * `small`
|
|
330
|
+
* * `medium` (Default)
|
|
331
|
+
* * `large`
|
|
332
|
+
* * `none`
|
|
333
333
|
*
|
|
334
334
|
*/
|
|
335
335
|
set size(size: DateInputSize);
|
|
@@ -338,11 +338,11 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
|
|
|
338
338
|
* Sets the border radius of the component.
|
|
339
339
|
*
|
|
340
340
|
* The possible values are:
|
|
341
|
-
* * `
|
|
342
|
-
* * `
|
|
343
|
-
* * `
|
|
344
|
-
* * `
|
|
345
|
-
* * `
|
|
341
|
+
* * `small`
|
|
342
|
+
* * `medium` (Default)
|
|
343
|
+
* * `large`
|
|
344
|
+
* * `full`
|
|
345
|
+
* * `none`
|
|
346
346
|
*
|
|
347
347
|
*/
|
|
348
348
|
set rounded(rounded: DateInputRounded);
|
|
@@ -351,10 +351,10 @@ export declare class DatePickerComponent implements ControlValueAccessor, OnInit
|
|
|
351
351
|
* Sets the fillMode of the component.
|
|
352
352
|
*
|
|
353
353
|
* The possible values are:
|
|
354
|
-
* * `
|
|
355
|
-
* * `
|
|
356
|
-
* * `
|
|
357
|
-
* * `
|
|
354
|
+
* * `solid` (Default)
|
|
355
|
+
* * `flat`
|
|
356
|
+
* * `outline`
|
|
357
|
+
* * `none`
|
|
358
358
|
*
|
|
359
359
|
*/
|
|
360
360
|
set fillMode(fillMode: DateInputFillMode);
|
|
@@ -7,7 +7,6 @@ import { DateInputComponent } from '../dateinput/dateinput.component';
|
|
|
7
7
|
import { AutoCorrectOn } from './auto-correct-on.type';
|
|
8
8
|
import { DateRangeInput } from './date-range-input';
|
|
9
9
|
import { DateRangeService } from './date-range.service';
|
|
10
|
-
import { DateRangePopupService } from './date-range-popup.service';
|
|
11
10
|
import { SelectionRange } from '../calendar/models/selection-range.interface';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
12
|
/**
|
|
@@ -51,7 +50,7 @@ export declare class DateRangeEndInputDirective extends DateRangeInput implement
|
|
|
51
50
|
* ```
|
|
52
51
|
*/
|
|
53
52
|
navigateCalendarOnFocus: boolean;
|
|
54
|
-
constructor(rangeService: DateRangeService, dateInput: DateInputComponent,
|
|
53
|
+
constructor(rangeService: DateRangeService, dateInput: DateInputComponent, element: ElementRef, renderer: Renderer2, zone: NgZone);
|
|
55
54
|
ngOnInit(): void;
|
|
56
55
|
ngOnDestroy(): void;
|
|
57
56
|
protected getRange(value: Date, correctOn: AutoCorrectOn): SelectionRange;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { ElementRef, Renderer2, NgZone } from '@angular/core';
|
|
6
6
|
import { DateInputComponent } from '../dateinput/dateinput.component';
|
|
7
7
|
import { DateRangeService } from './date-range.service';
|
|
8
|
-
import { DateRangePopupService } from './date-range-popup.service';
|
|
9
8
|
import { AutoCorrectOn } from './auto-correct-on.type';
|
|
10
9
|
import { SelectionRange } from '../calendar/models/selection-range.interface';
|
|
11
10
|
import { SelectionRangeEnd } from '../calendar/models/selection-range-end.type';
|
|
@@ -15,7 +14,6 @@ import { SelectionRangeEnd } from '../calendar/models/selection-range-end.type';
|
|
|
15
14
|
export declare abstract class DateRangeInput {
|
|
16
15
|
private activeRangeEnd;
|
|
17
16
|
private dateRangeService;
|
|
18
|
-
private dateRangePopupService;
|
|
19
17
|
private input;
|
|
20
18
|
private element;
|
|
21
19
|
private renderer;
|
|
@@ -25,7 +23,7 @@ export declare abstract class DateRangeInput {
|
|
|
25
23
|
private popupSubscriptions;
|
|
26
24
|
private subscriptions;
|
|
27
25
|
private get popupCalendarActivated();
|
|
28
|
-
constructor(activeRangeEnd: SelectionRangeEnd, dateRangeService: DateRangeService,
|
|
26
|
+
constructor(activeRangeEnd: SelectionRangeEnd, dateRangeService: DateRangeService, input: DateInputComponent, element: ElementRef, renderer: Renderer2, zone: NgZone);
|
|
29
27
|
protected init(): void;
|
|
30
28
|
protected destroy(): void;
|
|
31
29
|
protected abstract getRange(value: Date, correctOn?: AutoCorrectOn): SelectionRange;
|
|
@@ -6,7 +6,6 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, TemplateRef, NgZone, OnIni
|
|
|
6
6
|
import { Align, Collision, Margin, PopupAnimation, PopupService, PopupRef } from '@progress/kendo-angular-popup';
|
|
7
7
|
import { DateRangePopupTemplateDirective } from './date-range-popup-template.directive';
|
|
8
8
|
import { DateRangeService } from './date-range.service';
|
|
9
|
-
import { DateRangePopupService } from './date-range-popup.service';
|
|
10
9
|
import { MultiViewCalendarComponent } from '../calendar/multiview-calendar.component';
|
|
11
10
|
import { PreventableEvent } from '../preventable-event';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
@@ -32,7 +31,6 @@ import * as i0 from "@angular/core";
|
|
|
32
31
|
export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
33
32
|
private popupService;
|
|
34
33
|
private dateRangeService;
|
|
35
|
-
private dateRangePopupService;
|
|
36
34
|
private ref;
|
|
37
35
|
private zone;
|
|
38
36
|
private rtl;
|
|
@@ -141,7 +139,7 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
|
141
139
|
private resolvedPromise;
|
|
142
140
|
private _calendar;
|
|
143
141
|
private _show;
|
|
144
|
-
constructor(popupService: PopupService, dateRangeService: DateRangeService,
|
|
142
|
+
constructor(popupService: PopupService, dateRangeService: DateRangeService, ref: ChangeDetectorRef, zone: NgZone, rtl: boolean);
|
|
145
143
|
ngOnInit(): void;
|
|
146
144
|
ngAfterViewInit(): void;
|
|
147
145
|
ngOnDestroy(): void;
|
|
@@ -181,6 +179,6 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
|
|
|
181
179
|
private get _appendTo();
|
|
182
180
|
private _toggle;
|
|
183
181
|
private destroyPopup;
|
|
184
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null,
|
|
182
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null, { optional: true; }]>;
|
|
185
183
|
static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePopupComponent, "kendo-daterange-popup", ["kendo-daterange-popup"], { "animate": "animate"; "anchor": "anchor"; "anchorAlign": "anchorAlign"; "appendTo": "appendTo"; "collision": "collision"; "popupAlign": "popupAlign"; "margin": "margin"; }, { "open": "open"; "close": "close"; "onBlur": "blur"; "onFocus": "focus"; "cancel": "cancel"; }, ["contentTemplate", "contentCalendar"], never>;
|
|
186
184
|
}
|
|
@@ -7,7 +7,6 @@ import { DateInputComponent } from '../dateinput/dateinput.component';
|
|
|
7
7
|
import { AutoCorrectOn } from './auto-correct-on.type';
|
|
8
8
|
import { DateRangeInput } from './date-range-input';
|
|
9
9
|
import { DateRangeService } from './date-range.service';
|
|
10
|
-
import { DateRangePopupService } from './date-range-popup.service';
|
|
11
10
|
import { SelectionRange } from '../calendar/models/selection-range.interface';
|
|
12
11
|
import * as i0 from "@angular/core";
|
|
13
12
|
/**
|
|
@@ -52,7 +51,7 @@ export declare class DateRangeStartInputDirective extends DateRangeInput impleme
|
|
|
52
51
|
* ```
|
|
53
52
|
*/
|
|
54
53
|
navigateCalendarOnFocus: boolean;
|
|
55
|
-
constructor(rangeService: DateRangeService, dateInput: DateInputComponent,
|
|
54
|
+
constructor(rangeService: DateRangeService, dateInput: DateInputComponent, element: ElementRef, renderer: Renderer2, zone: NgZone);
|
|
56
55
|
ngOnInit(): void;
|
|
57
56
|
ngOnDestroy(): void;
|
|
58
57
|
protected getRange(value: Date, correctOn: AutoCorrectOn): SelectionRange;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { DateInputComponent } from '../dateinput/dateinput.component';
|
|
7
|
+
import type { DateRangePopupComponent } from './date-range-popup.component';
|
|
7
8
|
import { SelectionRangeEnd } from '../calendar/models/selection-range-end.type';
|
|
8
9
|
import { SelectionRange } from '../calendar/models/selection-range.interface';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
@@ -30,6 +31,10 @@ export declare class DateRangeService {
|
|
|
30
31
|
* For example, when a new start `DateInput` is attached or the old one is detached.
|
|
31
32
|
*/
|
|
32
33
|
startInput$: BehaviorSubject<DateInputComponent>;
|
|
34
|
+
/**
|
|
35
|
+
* An Observable instance that notifies when the `DateRangePopup` component is changed.
|
|
36
|
+
*/
|
|
37
|
+
dateRangePopup$: BehaviorSubject<DateRangePopupComponent>;
|
|
33
38
|
/**
|
|
34
39
|
* An Observable instance that notifies when the state of the selection range is changed.
|
|
35
40
|
*/
|
|
@@ -56,11 +61,35 @@ export declare class DateRangeService {
|
|
|
56
61
|
* Gets the current `selectionRange` value.
|
|
57
62
|
*/
|
|
58
63
|
get selectionRange(): SelectionRange;
|
|
64
|
+
/**
|
|
65
|
+
* Activates the registered `DateRangePopup` component.
|
|
66
|
+
* The method opens the popup and focuses the calendar.
|
|
67
|
+
*/
|
|
68
|
+
activatePopup(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Deactivates the registered `DateRangePopup` component.
|
|
71
|
+
* The method closes the popup.
|
|
72
|
+
*/
|
|
73
|
+
deactivatePopup(): void;
|
|
74
|
+
/**
|
|
75
|
+
* @hidden
|
|
76
|
+
*
|
|
77
|
+
* Deactivates the registered `DateRangePopup` component and fires the `cancel` event.
|
|
78
|
+
* The method closes the popup.
|
|
79
|
+
*/
|
|
80
|
+
cancelPopup(): void;
|
|
59
81
|
/**
|
|
60
82
|
* Completes all observables to mitigate possible memory leaks.
|
|
61
83
|
* Calls the method when a component that uses it is destroyed.
|
|
62
84
|
*/
|
|
63
85
|
destroy(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Returns `true` when an active component that is placed inside the `DateRangeComponent` is detected.
|
|
88
|
+
* For example, the opened popup or the focused DateInput.
|
|
89
|
+
*
|
|
90
|
+
* @returns `true` if an active component is present.
|
|
91
|
+
*/
|
|
92
|
+
hasActiveComponent(): boolean;
|
|
64
93
|
/**
|
|
65
94
|
* Registers a new start `DateInput` component. Notifies all `startInput$` listeners.
|
|
66
95
|
*/
|
|
@@ -69,6 +98,10 @@ export declare class DateRangeService {
|
|
|
69
98
|
* Registers a new end `DateInput` component. Notifies all `endInput$` listeners.
|
|
70
99
|
*/
|
|
71
100
|
registerEndInput(endInput: DateInputComponent): void;
|
|
101
|
+
/**
|
|
102
|
+
* Registers a new `DateRangePopup` component. Notifies all `dateRangePopup$` listeners.
|
|
103
|
+
*/
|
|
104
|
+
registerPopup(dateRangePopup: DateRangePopupComponent): void;
|
|
72
105
|
/**
|
|
73
106
|
* Updates the `activeRangeEnd` value. Notifies all `activeRangeEnd$` listeners.
|
|
74
107
|
*/
|
|
@@ -753,6 +753,9 @@ export class CalendarComponent {
|
|
|
753
753
|
}
|
|
754
754
|
this.emitFocus();
|
|
755
755
|
}
|
|
756
|
+
/**
|
|
757
|
+
* @hidden
|
|
758
|
+
*/
|
|
756
759
|
handleMultiViewCalendarKeydown(args) {
|
|
757
760
|
// Prevent form from submitting on enter if used in datepicker (classic view)
|
|
758
761
|
if (isPresent(this.pickerService) && args.keyCode === Keys.Enter) {
|
|
@@ -13,7 +13,7 @@ import { packageMetadata } from '../package-metadata';
|
|
|
13
13
|
import { addMonths, cloneDate, createDate, getDate, isEqual, lastDayOfMonth } from '@progress/kendo-date-math';
|
|
14
14
|
import { isDocumentAvailable, hasObservers, KendoInput, Keys, guid } from '@progress/kendo-angular-common';
|
|
15
15
|
import { Arrow } from './arrow.enum';
|
|
16
|
-
import { approximateStringMatching, noop, isInRange, dateInRange, isValidRange, setTime, cropTwoDigitYear, setYears, msPaddingFromFormat, millisecondDigitsInFormat, millisecondStepFor, getSizeClass, getRoundedClass, getFillModeClass } from '../util';
|
|
16
|
+
import { approximateStringMatching, noop, isInRange, dateInRange, isValidRange, setTime, cropTwoDigitYear, setYears, msPaddingFromFormat, millisecondDigitsInFormat, millisecondStepFor, getSizeClass, getRoundedClass, getFillModeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
|
|
17
17
|
import { closest } from '../common/dom-queries';
|
|
18
18
|
import { requiresZoneOnBlur, isPresent } from '../common/utils';
|
|
19
19
|
import * as i0 from "@angular/core";
|
|
@@ -656,9 +656,9 @@ export class DateInputComponent {
|
|
|
656
656
|
this.onControlChange = noop;
|
|
657
657
|
this.onControlTouched = noop;
|
|
658
658
|
this.onValidatorChange = noop;
|
|
659
|
-
this._size =
|
|
660
|
-
this._rounded =
|
|
661
|
-
this._fillMode =
|
|
659
|
+
this._size = DEFAULT_SIZE;
|
|
660
|
+
this._rounded = DEFAULT_ROUNDED;
|
|
661
|
+
this._fillMode = DEFAULT_FILL_MODE;
|
|
662
662
|
this.symbolsMap = this.dateSymbolMap();
|
|
663
663
|
this.updateFormatSections();
|
|
664
664
|
if (this.pickerService) {
|
|
@@ -694,18 +694,19 @@ export class DateInputComponent {
|
|
|
694
694
|
* Sets the size of the component.
|
|
695
695
|
*
|
|
696
696
|
* The possible values are:
|
|
697
|
-
* * `
|
|
698
|
-
* * `
|
|
699
|
-
* * `
|
|
700
|
-
* * `
|
|
697
|
+
* * `small`
|
|
698
|
+
* * `medium` (Default)
|
|
699
|
+
* * `large`
|
|
700
|
+
* * `none`
|
|
701
701
|
*
|
|
702
702
|
*/
|
|
703
703
|
set size(size) {
|
|
704
704
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
706
|
+
if (newSize !== 'none') {
|
|
707
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', newSize));
|
|
707
708
|
}
|
|
708
|
-
this._size =
|
|
709
|
+
this._size = newSize;
|
|
709
710
|
}
|
|
710
711
|
get size() {
|
|
711
712
|
return this._size;
|
|
@@ -714,19 +715,20 @@ export class DateInputComponent {
|
|
|
714
715
|
* Sets the border radius of the component.
|
|
715
716
|
*
|
|
716
717
|
* The possible values are:
|
|
717
|
-
* * `
|
|
718
|
-
* * `
|
|
719
|
-
* * `
|
|
720
|
-
* * `
|
|
721
|
-
* * `
|
|
718
|
+
* * `small`
|
|
719
|
+
* * `medium` (Default)
|
|
720
|
+
* * `large`
|
|
721
|
+
* * `full`
|
|
722
|
+
* * `none`
|
|
722
723
|
*
|
|
723
724
|
*/
|
|
724
725
|
set rounded(rounded) {
|
|
725
726
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
726
|
-
|
|
727
|
-
|
|
727
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
728
|
+
if (newRounded !== 'none') {
|
|
729
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
728
730
|
}
|
|
729
|
-
this._rounded =
|
|
731
|
+
this._rounded = newRounded;
|
|
730
732
|
}
|
|
731
733
|
get rounded() {
|
|
732
734
|
return this._rounded;
|
|
@@ -735,22 +737,23 @@ export class DateInputComponent {
|
|
|
735
737
|
* Sets the fillMode of the component.
|
|
736
738
|
*
|
|
737
739
|
* The possible values are:
|
|
738
|
-
* * `
|
|
739
|
-
* * `
|
|
740
|
-
* * `
|
|
741
|
-
* * `
|
|
740
|
+
* * `solid` (Default)
|
|
741
|
+
* * `flat`
|
|
742
|
+
* * `outline`
|
|
743
|
+
* * `none`
|
|
742
744
|
*
|
|
743
745
|
*/
|
|
744
746
|
set fillMode(fillMode) {
|
|
745
747
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
746
|
-
|
|
747
|
-
|
|
748
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
749
|
+
if (newFillMode !== 'none') {
|
|
750
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', newFillMode));
|
|
748
751
|
if (this.spinners && this.spinup && this.spindown) {
|
|
749
|
-
this.setSpinnerFill(this.spinup.nativeElement,
|
|
750
|
-
this.setSpinnerFill(this.spindown.nativeElement,
|
|
752
|
+
this.setSpinnerFill(this.spinup.nativeElement, newFillMode, this.fillMode);
|
|
753
|
+
this.setSpinnerFill(this.spindown.nativeElement, newFillMode, this.fillMode);
|
|
751
754
|
}
|
|
752
755
|
}
|
|
753
|
-
this._fillMode =
|
|
756
|
+
this._fillMode = newFillMode;
|
|
754
757
|
}
|
|
755
758
|
get fillMode() {
|
|
756
759
|
return this._fillMode;
|
|
@@ -1359,7 +1362,7 @@ export class DateInputComponent {
|
|
|
1359
1362
|
}
|
|
1360
1363
|
}
|
|
1361
1364
|
setSpinnerFill(spinner, fill, oldFill) {
|
|
1362
|
-
if (oldFill) {
|
|
1365
|
+
if (oldFill !== 'none') {
|
|
1363
1366
|
this.renderer.removeClass(spinner, `k-button-${oldFill}`);
|
|
1364
1367
|
this.renderer.removeClass(spinner, `k-button-${oldFill}-base`);
|
|
1365
1368
|
}
|
|
@@ -1367,16 +1370,16 @@ export class DateInputComponent {
|
|
|
1367
1370
|
this.renderer.addClass(spinner, `k-button-${fill}-base`);
|
|
1368
1371
|
}
|
|
1369
1372
|
setComponentClasses() {
|
|
1370
|
-
if (this.size) {
|
|
1373
|
+
if (this.size !== 'none') {
|
|
1371
1374
|
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
1372
1375
|
}
|
|
1373
|
-
if (this.rounded) {
|
|
1376
|
+
if (this.rounded !== 'none') {
|
|
1374
1377
|
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
1375
1378
|
}
|
|
1376
|
-
if (this.fillMode) {
|
|
1379
|
+
if (this.fillMode !== 'none') {
|
|
1377
1380
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
1378
1381
|
}
|
|
1379
|
-
if (this.spinners) {
|
|
1382
|
+
if (this.spinners && this.fillMode !== 'none') {
|
|
1380
1383
|
this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
|
|
1381
1384
|
this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
|
|
1382
1385
|
}
|
|
@@ -24,7 +24,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
|
|
|
24
24
|
import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
|
|
25
25
|
import { PickerService } from '../common/picker.service';
|
|
26
26
|
import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
|
|
27
|
-
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar, getSizeClass, getRoundedClass, getFillModeClass } from '../util';
|
|
27
|
+
import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar, getSizeClass, getRoundedClass, getFillModeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
|
|
28
28
|
import { TOUCH_ENABLED } from '../touch-enabled';
|
|
29
29
|
import { requiresZoneOnBlur, currentFocusTarget } from '../common/utils';
|
|
30
30
|
import { fromEvent } from 'rxjs';
|
|
@@ -280,9 +280,9 @@ export class DatePickerComponent {
|
|
|
280
280
|
this.incompleteValidator = noop;
|
|
281
281
|
this.resolvedPromise = Promise.resolve(null);
|
|
282
282
|
this.domEvents = [];
|
|
283
|
-
this._size =
|
|
284
|
-
this._rounded =
|
|
285
|
-
this._fillMode =
|
|
283
|
+
this._size = DEFAULT_SIZE;
|
|
284
|
+
this._rounded = DEFAULT_ROUNDED;
|
|
285
|
+
this._fillMode = DEFAULT_FILL_MODE;
|
|
286
286
|
validatePackage(packageMetadata);
|
|
287
287
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
288
288
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -388,20 +388,21 @@ export class DatePickerComponent {
|
|
|
388
388
|
* Sets the size of the component.
|
|
389
389
|
*
|
|
390
390
|
* The possible values are:
|
|
391
|
-
* * `
|
|
392
|
-
* * `
|
|
393
|
-
* * `
|
|
394
|
-
* * `
|
|
391
|
+
* * `small`
|
|
392
|
+
* * `medium` (Default)
|
|
393
|
+
* * `large`
|
|
394
|
+
* * `none`
|
|
395
395
|
*
|
|
396
396
|
*/
|
|
397
397
|
set size(size) {
|
|
398
398
|
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
399
399
|
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
this.renderer.addClass(this.
|
|
400
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
401
|
+
if (newSize !== 'none') {
|
|
402
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', newSize));
|
|
403
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', newSize));
|
|
403
404
|
}
|
|
404
|
-
this._size =
|
|
405
|
+
this._size = newSize;
|
|
405
406
|
}
|
|
406
407
|
get size() {
|
|
407
408
|
return this._size;
|
|
@@ -410,19 +411,20 @@ export class DatePickerComponent {
|
|
|
410
411
|
* Sets the border radius of the component.
|
|
411
412
|
*
|
|
412
413
|
* The possible values are:
|
|
413
|
-
* * `
|
|
414
|
-
* * `
|
|
415
|
-
* * `
|
|
416
|
-
* * `
|
|
417
|
-
* * `
|
|
414
|
+
* * `small`
|
|
415
|
+
* * `medium` (Default)
|
|
416
|
+
* * `large`
|
|
417
|
+
* * `full`
|
|
418
|
+
* * `none`
|
|
418
419
|
*
|
|
419
420
|
*/
|
|
420
421
|
set rounded(rounded) {
|
|
421
422
|
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
422
|
-
|
|
423
|
-
|
|
423
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
424
|
+
if (newRounded !== 'none') {
|
|
425
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(newRounded));
|
|
424
426
|
}
|
|
425
|
-
this._rounded =
|
|
427
|
+
this._rounded = newRounded;
|
|
426
428
|
}
|
|
427
429
|
get rounded() {
|
|
428
430
|
return this._rounded;
|
|
@@ -431,22 +433,23 @@ export class DatePickerComponent {
|
|
|
431
433
|
* Sets the fillMode of the component.
|
|
432
434
|
*
|
|
433
435
|
* The possible values are:
|
|
434
|
-
* * `
|
|
435
|
-
* * `
|
|
436
|
-
* * `
|
|
437
|
-
* * `
|
|
436
|
+
* * `solid` (Default)
|
|
437
|
+
* * `flat`
|
|
438
|
+
* * `outline`
|
|
439
|
+
* * `none`
|
|
438
440
|
*
|
|
439
441
|
*/
|
|
440
442
|
set fillMode(fillMode) {
|
|
441
443
|
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
442
444
|
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
443
445
|
this.renderer.removeClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
|
|
444
|
-
|
|
446
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
447
|
+
if (newFillMode !== 'none') {
|
|
445
448
|
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
446
449
|
this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${fillMode}-base`);
|
|
447
450
|
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
448
451
|
}
|
|
449
|
-
this._fillMode =
|
|
452
|
+
this._fillMode = newFillMode;
|
|
450
453
|
}
|
|
451
454
|
get fillMode() {
|
|
452
455
|
return this._fillMode;
|
|
@@ -11,15 +11,14 @@ import { isPresent } from '../common/utils';
|
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
import * as i1 from "./date-range.service";
|
|
13
13
|
import * as i2 from "../dateinput/dateinput.component";
|
|
14
|
-
import * as i3 from "./date-range-popup.service";
|
|
15
14
|
/**
|
|
16
15
|
* A directive which manages the end range selection.
|
|
17
16
|
*
|
|
18
17
|
* > You can use the DateRangeEndInputDirective only with a DateInput component.
|
|
19
18
|
*/
|
|
20
19
|
export class DateRangeEndInputDirective extends DateRangeInput {
|
|
21
|
-
constructor(rangeService, dateInput,
|
|
22
|
-
super('end', rangeService,
|
|
20
|
+
constructor(rangeService, dateInput, element, renderer, zone) {
|
|
21
|
+
super('end', rangeService, dateInput, element, renderer, zone);
|
|
23
22
|
this.rangeService = rangeService;
|
|
24
23
|
this.dateInput = dateInput;
|
|
25
24
|
/**
|
|
@@ -74,14 +73,14 @@ export class DateRangeEndInputDirective extends DateRangeInput {
|
|
|
74
73
|
this.dateInput.notify();
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
|
-
DateRangeEndInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, deps: [{ token: i1.DateRangeService }, { token: i2.DateInputComponent }, { token:
|
|
76
|
+
DateRangeEndInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, deps: [{ token: i1.DateRangeService }, { token: i2.DateInputComponent }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
78
77
|
DateRangeEndInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeEndInputDirective, selector: "[kendoDateRangeEndInput]", inputs: { autoCorrectOn: "autoCorrectOn", navigateCalendarOnFocus: "navigateCalendarOnFocus" }, usesInheritance: true, ngImport: i0 });
|
|
79
78
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, decorators: [{
|
|
80
79
|
type: Directive,
|
|
81
80
|
args: [{
|
|
82
81
|
selector: '[kendoDateRangeEndInput]'
|
|
83
82
|
}]
|
|
84
|
-
}], ctorParameters: function () { return [{ type: i1.DateRangeService }, { type: i2.DateInputComponent }, { type:
|
|
83
|
+
}], ctorParameters: function () { return [{ type: i1.DateRangeService }, { type: i2.DateInputComponent }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { autoCorrectOn: [{
|
|
85
84
|
type: Input
|
|
86
85
|
}], navigateCalendarOnFocus: [{
|
|
87
86
|
type: Input
|