@progress/kendo-angular-dateinputs 5.3.1-dev.202201070925 → 6.0.1-dev.202201310951
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/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/README.md +1 -1
- package/dist/cdn/js/kendo-angular-dateinputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/calendar/calendar.component.js +4 -2
- package/dist/es/calendar/header.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +1 -1
- package/dist/es/calendar/services/dom.service.js +1 -1
- package/dist/es/calendar/view.component.js +1 -1
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/dateinput/dateinput.component.js +143 -18
- package/dist/es/datepicker/datepicker.component.js +127 -13
- package/dist/es/daterange/date-range-input.js +1 -1
- package/dist/es/datetimepicker/datetimepicker.component.js +147 -11
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/timepicker/services/dom.service.js +12 -8
- package/dist/es/timepicker/timelist.component.js +3 -2
- package/dist/es/timepicker/timepicker.component.js +130 -13
- package/dist/es/timepicker/timeselector.component.js +2 -2
- package/dist/es/util.js +37 -0
- package/dist/es2015/calendar/calendar.component.js +4 -2
- package/dist/es2015/calendar/header.component.js +4 -4
- package/dist/es2015/calendar/multiview-calendar.component.js +1 -1
- package/dist/es2015/calendar/services/dom.service.js +1 -1
- package/dist/es2015/calendar/view.component.js +1 -1
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/dateinput/dateinput.component.d.ts +49 -8
- package/dist/es2015/dateinput/dateinput.component.js +183 -68
- package/dist/es2015/datepicker/datepicker.component.d.ts +47 -5
- package/dist/es2015/datepicker/datepicker.component.js +152 -49
- package/dist/es2015/daterange/date-range-input.js +1 -1
- package/dist/es2015/datetimepicker/datetimepicker.component.d.ts +56 -6
- package/dist/es2015/datetimepicker/datetimepicker.component.js +186 -63
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/timepicker/services/dom.service.d.ts +1 -0
- package/dist/es2015/timepicker/services/dom.service.js +12 -8
- package/dist/es2015/timepicker/timelist.component.js +3 -2
- package/dist/es2015/timepicker/timepicker.component.d.ts +50 -5
- package/dist/es2015/timepicker/timepicker.component.js +174 -69
- package/dist/es2015/timepicker/timeselector.component.js +7 -5
- package/dist/es2015/util.d.ts +18 -0
- package/dist/es2015/util.js +37 -0
- package/dist/fesm2015/index.js +759 -268
- package/dist/fesm5/index.js +603 -68
- package/dist/npm/calendar/calendar.component.js +4 -2
- package/dist/npm/calendar/header.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +1 -1
- package/dist/npm/calendar/services/dom.service.js +1 -1
- package/dist/npm/calendar/view.component.js +1 -1
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/dateinput/dateinput.component.js +142 -17
- package/dist/npm/datepicker/datepicker.component.js +126 -12
- package/dist/npm/daterange/date-range-input.js +1 -1
- package/dist/npm/datetimepicker/datetimepicker.component.js +146 -10
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/timepicker/services/dom.service.js +15 -10
- package/dist/npm/timepicker/timelist.component.js +3 -2
- package/dist/npm/timepicker/timepicker.component.js +129 -12
- package/dist/npm/timepicker/timeselector.component.js +2 -2
- package/dist/npm/util.js +37 -0
- package/dist/systemjs/kendo-angular-dateinputs.js +1 -1
- package/package.json +7 -7
package/dist/fesm5/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var packageMetadata = {
|
|
|
23
23
|
name: '@progress/kendo-angular-dateinputs',
|
|
24
24
|
productName: 'Kendo UI for Angular',
|
|
25
25
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
26
|
-
publishDate:
|
|
26
|
+
publishDate: 1643622478,
|
|
27
27
|
version: '',
|
|
28
28
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
29
29
|
};
|
|
@@ -449,6 +449,43 @@ var isTabExitingCalendar = function (calendarType, focusedElement, shiftKey) {
|
|
|
449
449
|
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
450
450
|
);
|
|
451
451
|
};
|
|
452
|
+
/**
|
|
453
|
+
* @hidden
|
|
454
|
+
* Returns the size class based on the component and size input.
|
|
455
|
+
*/
|
|
456
|
+
var getSizeClass = function (component, size) {
|
|
457
|
+
var SIZE_CLASSES = {
|
|
458
|
+
'small': "k-" + component + "-sm",
|
|
459
|
+
'medium': "k-" + component + "-md",
|
|
460
|
+
'large': "k-" + component + "-lg"
|
|
461
|
+
};
|
|
462
|
+
return SIZE_CLASSES[size];
|
|
463
|
+
};
|
|
464
|
+
/**
|
|
465
|
+
* @hidden
|
|
466
|
+
* Returns the rounded class based on the rounded input.
|
|
467
|
+
*/
|
|
468
|
+
var getRoundedClass = function (rounded) {
|
|
469
|
+
var ROUNDED_CLASSES = {
|
|
470
|
+
'small': 'k-rounded-sm',
|
|
471
|
+
'medium': 'k-rounded-md',
|
|
472
|
+
'large': 'k-rounded-lg',
|
|
473
|
+
'full': 'k-rounded-full'
|
|
474
|
+
};
|
|
475
|
+
return ROUNDED_CLASSES[rounded];
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* @hidden
|
|
479
|
+
* Return the fillMode class based on the component and fillMode input.
|
|
480
|
+
*/
|
|
481
|
+
var getFillModeClass = function (component, fillMode) {
|
|
482
|
+
var FILLMODE_CLASSES = {
|
|
483
|
+
'solid': "k-" + component + "-solid",
|
|
484
|
+
'flat': "k-" + component + "-flat",
|
|
485
|
+
'outline': "k-" + component + "-outline"
|
|
486
|
+
};
|
|
487
|
+
return FILLMODE_CLASSES[fillMode];
|
|
488
|
+
};
|
|
452
489
|
|
|
453
490
|
var _a;
|
|
454
491
|
var EMPTY_DATA = [[]];
|
|
@@ -1814,7 +1851,7 @@ var HeaderComponent = /** @class */ (function () {
|
|
|
1814
1851
|
HeaderComponent = __decorate([
|
|
1815
1852
|
Component({
|
|
1816
1853
|
selector: 'kendo-calendar-header',
|
|
1817
|
-
template: "\n <span class=\"k-button k-flat k-
|
|
1854
|
+
template: "\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\" [class.k-disabled]=\"!navigate\"\n [kendoEventsOutsideAngular]=\"{\n click: handleNavigation\n }\"\n [scope]=\"this\">\n <ng-template [ngIf]=\"!templateRef\">{{title}}</ng-template>\n <ng-template\n [ngIf]=\"templateRef\"\n [ngTemplateOutlet]=\"templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: title, activeView: activeViewValue, date: currentDate }\"\n ></ng-template>\n </span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isPrevDisabled\"\n [disabled]=\"isPrevDisabled\"\n [title]=\"prevButtonTitle\"\n (click)=\"prevButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-left\"></span>\n </button>\n <span\n class=\"k-today k-nav-today\"\n [class.k-disabled]=\"!todayAvailable\"\n [kendoEventsOutsideAngular]=\"{\n click: handleTodayClick\n }\"\n [scope]=\"this\"\n >\n {{ todayMessage }}\n </span>\n <button\n *ngIf=\"showNavigationButtons\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view\"\n type=\"button\"\n [attr.aria-disabled]=\"isNextDisabled\"\n [disabled]=\"isNextDisabled\"\n [title]=\"nextButtonTitle\"\n (click)=\"nextButtonClick.emit()\"\n >\n <span class=\"k-icon k-i-arrow-60-right\"></span>\n </button>\n </span>\n "
|
|
1818
1855
|
}),
|
|
1819
1856
|
__metadata("design:paramtypes", [BusViewService,
|
|
1820
1857
|
ChangeDetectorRef,
|
|
@@ -3218,7 +3255,7 @@ var MultiViewCalendarComponent = /** @class */ (function () {
|
|
|
3218
3255
|
], MultiViewCalendarComponent.prototype, "calendarTabIndex", null);
|
|
3219
3256
|
__decorate([
|
|
3220
3257
|
HostBinding('attr.aria-disabled'),
|
|
3221
|
-
HostBinding('class.k-
|
|
3258
|
+
HostBinding('class.k-disabled'),
|
|
3222
3259
|
__metadata("design:type", Boolean),
|
|
3223
3260
|
__metadata("design:paramtypes", [])
|
|
3224
3261
|
], MultiViewCalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -3312,7 +3349,7 @@ var tr = domContainerFactory('tr');
|
|
|
3312
3349
|
var tbody = domContainerFactory('tbody');
|
|
3313
3350
|
var thead = domContainerFactory('thead');
|
|
3314
3351
|
var table = domContainerFactory('table');
|
|
3315
|
-
var monthHeader = function () { return (div("\n <span class=\"k-button k-flat k-
|
|
3352
|
+
var monthHeader = function () { return (div("\n <span class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-calendar-title\">March 2017</span>\n <span class=\"k-spacer\"></span>\n <span class=\"k-calendar-nav k-hstack\">\n <span class=\"k-today k-nav-today\">TODAY</span>\n </span>\n ", 'k-calendar-header k-hstack')); };
|
|
3316
3353
|
var monthWeekHeader = function () { return (table([
|
|
3317
3354
|
thead([
|
|
3318
3355
|
tr([th('MO', 'k-calendar-th')], 'k-calendar-tr')
|
|
@@ -5017,11 +5054,13 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
5017
5054
|
};
|
|
5018
5055
|
CalendarComponent.prototype.ngOnDestroy = function () {
|
|
5019
5056
|
this.scrollSyncService.destroy();
|
|
5020
|
-
this.viewChangeSubscription.unsubscribe();
|
|
5021
5057
|
this.domEvents.forEach(function (unbindCallback) { return unbindCallback(); });
|
|
5022
5058
|
if (this.pickerService) {
|
|
5023
5059
|
this.pickerService.calendar = null;
|
|
5024
5060
|
}
|
|
5061
|
+
if (this.viewChangeSubscription) {
|
|
5062
|
+
this.viewChangeSubscription.unsubscribe();
|
|
5063
|
+
}
|
|
5025
5064
|
if (this.pageChangeSubscription) {
|
|
5026
5065
|
this.pageChangeSubscription.unsubscribe();
|
|
5027
5066
|
}
|
|
@@ -5599,7 +5638,7 @@ var CalendarComponent = /** @class */ (function () {
|
|
|
5599
5638
|
], CalendarComponent.prototype, "calendarTabIndex", null);
|
|
5600
5639
|
__decorate([
|
|
5601
5640
|
HostBinding('attr.aria-disabled'),
|
|
5602
|
-
HostBinding('class.k-
|
|
5641
|
+
HostBinding('class.k-disabled'),
|
|
5603
5642
|
__metadata("design:type", Boolean),
|
|
5604
5643
|
__metadata("design:paramtypes", [])
|
|
5605
5644
|
], CalendarComponent.prototype, "ariaDisabled", null);
|
|
@@ -6098,11 +6137,11 @@ var KendoDate = /** @class */ (function () {
|
|
|
6098
6137
|
* Represents the [Kendo UI DateInput component for Angular]({% slug overview_dateinput %}#toc-basic-usage).
|
|
6099
6138
|
*/
|
|
6100
6139
|
var DateInputComponent = /** @class */ (function () {
|
|
6101
|
-
function DateInputComponent(cdr, intl, renderer,
|
|
6140
|
+
function DateInputComponent(cdr, intl, renderer, wrapper, ngZone, injector, localization, pickerService) {
|
|
6102
6141
|
this.cdr = cdr;
|
|
6103
6142
|
this.intl = intl;
|
|
6104
6143
|
this.renderer = renderer;
|
|
6105
|
-
this.
|
|
6144
|
+
this.wrapper = wrapper;
|
|
6106
6145
|
this.ngZone = ngZone;
|
|
6107
6146
|
this.injector = injector;
|
|
6108
6147
|
this.localization = localization;
|
|
@@ -6304,6 +6343,9 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6304
6343
|
this.onControlChange = noop;
|
|
6305
6344
|
this.onControlTouched = noop;
|
|
6306
6345
|
this.onValidatorChange = noop;
|
|
6346
|
+
this._size = 'medium';
|
|
6347
|
+
this._rounded = 'medium';
|
|
6348
|
+
this._fillMode = 'solid';
|
|
6307
6349
|
this.symbolsMap = this.dateSymbolMap();
|
|
6308
6350
|
this.updateFormatSections();
|
|
6309
6351
|
if (this.pickerService) {
|
|
@@ -6344,6 +6386,83 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6344
6386
|
enumerable: true,
|
|
6345
6387
|
configurable: true
|
|
6346
6388
|
});
|
|
6389
|
+
Object.defineProperty(DateInputComponent.prototype, "size", {
|
|
6390
|
+
get: function () {
|
|
6391
|
+
return this._size;
|
|
6392
|
+
},
|
|
6393
|
+
/**
|
|
6394
|
+
* Sets the size of the component.
|
|
6395
|
+
*
|
|
6396
|
+
* The possible values are:
|
|
6397
|
+
* * `'small'`
|
|
6398
|
+
* * `'medium'` (Default)
|
|
6399
|
+
* * `'large'`
|
|
6400
|
+
* * `null`
|
|
6401
|
+
*
|
|
6402
|
+
*/
|
|
6403
|
+
set: function (size) {
|
|
6404
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6405
|
+
if (size) {
|
|
6406
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6407
|
+
}
|
|
6408
|
+
this._size = size;
|
|
6409
|
+
},
|
|
6410
|
+
enumerable: true,
|
|
6411
|
+
configurable: true
|
|
6412
|
+
});
|
|
6413
|
+
Object.defineProperty(DateInputComponent.prototype, "rounded", {
|
|
6414
|
+
get: function () {
|
|
6415
|
+
return this._rounded;
|
|
6416
|
+
},
|
|
6417
|
+
/**
|
|
6418
|
+
* Sets the border radius of the component.
|
|
6419
|
+
*
|
|
6420
|
+
* The possible values are:
|
|
6421
|
+
* * `'small'`
|
|
6422
|
+
* * `'medium'` (Default)
|
|
6423
|
+
* * `'large'`
|
|
6424
|
+
* * `'full'`
|
|
6425
|
+
* * `null`
|
|
6426
|
+
*
|
|
6427
|
+
*/
|
|
6428
|
+
set: function (rounded) {
|
|
6429
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6430
|
+
if (rounded) {
|
|
6431
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
6432
|
+
}
|
|
6433
|
+
this._rounded = rounded;
|
|
6434
|
+
},
|
|
6435
|
+
enumerable: true,
|
|
6436
|
+
configurable: true
|
|
6437
|
+
});
|
|
6438
|
+
Object.defineProperty(DateInputComponent.prototype, "fillMode", {
|
|
6439
|
+
get: function () {
|
|
6440
|
+
return this._fillMode;
|
|
6441
|
+
},
|
|
6442
|
+
/**
|
|
6443
|
+
* Sets the fillMode of the component.
|
|
6444
|
+
*
|
|
6445
|
+
* The possible values are:
|
|
6446
|
+
* * `'solid'` (Default)
|
|
6447
|
+
* * `'flat'`
|
|
6448
|
+
* * `'outline'`
|
|
6449
|
+
* * `null`
|
|
6450
|
+
*
|
|
6451
|
+
*/
|
|
6452
|
+
set: function (fillMode) {
|
|
6453
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
6454
|
+
if (fillMode) {
|
|
6455
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
6456
|
+
if (this.spinners && this.spinup && this.spindown) {
|
|
6457
|
+
this.setSpinnerFill(this.spinup.nativeElement, fillMode, this.fillMode);
|
|
6458
|
+
this.setSpinnerFill(this.spindown.nativeElement, fillMode, this.fillMode);
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
6461
|
+
this._fillMode = fillMode;
|
|
6462
|
+
},
|
|
6463
|
+
enumerable: true,
|
|
6464
|
+
configurable: true
|
|
6465
|
+
});
|
|
6347
6466
|
Object.defineProperty(DateInputComponent.prototype, "wrapperClass", {
|
|
6348
6467
|
get: function () {
|
|
6349
6468
|
return true;
|
|
@@ -6378,16 +6497,16 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6378
6497
|
},
|
|
6379
6498
|
set: function (value) {
|
|
6380
6499
|
this._active = value;
|
|
6381
|
-
if (!this.
|
|
6500
|
+
if (!this.wrapper) {
|
|
6382
6501
|
return;
|
|
6383
6502
|
}
|
|
6384
6503
|
if (!isPresent(this.pickerService)) {
|
|
6385
|
-
var element = this.
|
|
6504
|
+
var element = this.wrapper.nativeElement;
|
|
6386
6505
|
if (value) {
|
|
6387
|
-
this.renderer.addClass(element, 'k-
|
|
6506
|
+
this.renderer.addClass(element, 'k-focus');
|
|
6388
6507
|
}
|
|
6389
6508
|
else {
|
|
6390
|
-
this.renderer.removeClass(element, 'k-
|
|
6509
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
6391
6510
|
}
|
|
6392
6511
|
}
|
|
6393
6512
|
},
|
|
@@ -6436,7 +6555,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6436
6555
|
*/
|
|
6437
6556
|
DateInputComponent.prototype.containsElement = function (element) {
|
|
6438
6557
|
var _this = this;
|
|
6439
|
-
return Boolean(closest(element, function (node) { return node === _this.
|
|
6558
|
+
return Boolean(closest(element, function (node) { return node === _this.wrapper.nativeElement; }));
|
|
6440
6559
|
};
|
|
6441
6560
|
/**
|
|
6442
6561
|
* @hidden
|
|
@@ -6489,13 +6608,16 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6489
6608
|
this.updateElementValue();
|
|
6490
6609
|
this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
|
|
6491
6610
|
this.ngControl = this.injector.get(NgControl, null);
|
|
6492
|
-
if (this.
|
|
6493
|
-
this.renderer.removeAttribute(this.
|
|
6611
|
+
if (this.wrapper) {
|
|
6612
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
6494
6613
|
this.ngZone.runOutsideAngular(function () {
|
|
6495
6614
|
_this.bindEvents();
|
|
6496
6615
|
});
|
|
6497
6616
|
}
|
|
6498
6617
|
};
|
|
6618
|
+
DateInputComponent.prototype.ngAfterViewInit = function () {
|
|
6619
|
+
this.setComponentClasses();
|
|
6620
|
+
};
|
|
6499
6621
|
/**
|
|
6500
6622
|
* @hidden
|
|
6501
6623
|
*/
|
|
@@ -6849,7 +6971,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6849
6971
|
}
|
|
6850
6972
|
};
|
|
6851
6973
|
DateInputComponent.prototype.bindEvents = function () {
|
|
6852
|
-
var element = this.
|
|
6974
|
+
var element = this.wrapper.nativeElement;
|
|
6853
6975
|
var mousewheelHandler = this.handleMouseWheel.bind(this);
|
|
6854
6976
|
this.domEvents.push(this.renderer.listen(element, 'DOMMouseScroll', mousewheelHandler), this.renderer.listen(element, 'mousewheel', mousewheelHandler), this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)), this.renderer.listen(element, 'paste', this.handlePaste.bind(this)), this.renderer.listen(element, 'input', this.handleInput.bind(this)));
|
|
6855
6977
|
};
|
|
@@ -6981,6 +7103,29 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
6981
7103
|
this.pickerService.dateCompletenessChange.emit();
|
|
6982
7104
|
}
|
|
6983
7105
|
};
|
|
7106
|
+
DateInputComponent.prototype.setSpinnerFill = function (spinner, fill, oldFill) {
|
|
7107
|
+
if (oldFill) {
|
|
7108
|
+
this.renderer.removeClass(spinner, "k-button-" + oldFill);
|
|
7109
|
+
this.renderer.removeClass(spinner, "k-button-" + oldFill + "-base");
|
|
7110
|
+
}
|
|
7111
|
+
this.renderer.addClass(spinner, "k-button-" + fill);
|
|
7112
|
+
this.renderer.addClass(spinner, "k-button-" + fill + "-base");
|
|
7113
|
+
};
|
|
7114
|
+
DateInputComponent.prototype.setComponentClasses = function () {
|
|
7115
|
+
if (this.size) {
|
|
7116
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7117
|
+
}
|
|
7118
|
+
if (this.rounded) {
|
|
7119
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7120
|
+
}
|
|
7121
|
+
if (this.fillMode) {
|
|
7122
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7123
|
+
}
|
|
7124
|
+
if (this.spinners) {
|
|
7125
|
+
this.setSpinnerFill(this.spinup.nativeElement, this.fillMode);
|
|
7126
|
+
this.setSpinnerFill(this.spindown.nativeElement, this.fillMode);
|
|
7127
|
+
}
|
|
7128
|
+
};
|
|
6984
7129
|
var DateInputComponent_1;
|
|
6985
7130
|
__decorate([
|
|
6986
7131
|
Input(),
|
|
@@ -7072,6 +7217,21 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
7072
7217
|
Input(),
|
|
7073
7218
|
__metadata("design:type", Boolean)
|
|
7074
7219
|
], DateInputComponent.prototype, "hasPopup", void 0);
|
|
7220
|
+
__decorate([
|
|
7221
|
+
Input(),
|
|
7222
|
+
__metadata("design:type", String),
|
|
7223
|
+
__metadata("design:paramtypes", [String])
|
|
7224
|
+
], DateInputComponent.prototype, "size", null);
|
|
7225
|
+
__decorate([
|
|
7226
|
+
Input(),
|
|
7227
|
+
__metadata("design:type", String),
|
|
7228
|
+
__metadata("design:paramtypes", [String])
|
|
7229
|
+
], DateInputComponent.prototype, "rounded", null);
|
|
7230
|
+
__decorate([
|
|
7231
|
+
Input(),
|
|
7232
|
+
__metadata("design:type", String),
|
|
7233
|
+
__metadata("design:paramtypes", [String])
|
|
7234
|
+
], DateInputComponent.prototype, "fillMode", null);
|
|
7075
7235
|
__decorate([
|
|
7076
7236
|
Output(),
|
|
7077
7237
|
__metadata("design:type", EventEmitter)
|
|
@@ -7093,20 +7253,24 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
7093
7253
|
__metadata("design:type", ElementRef)
|
|
7094
7254
|
], DateInputComponent.prototype, "dateInput", void 0);
|
|
7095
7255
|
__decorate([
|
|
7096
|
-
|
|
7097
|
-
__metadata("design:type", ElementRef)
|
|
7098
|
-
], DateInputComponent.prototype, "wrap", void 0);
|
|
7099
|
-
__decorate([
|
|
7100
|
-
HostBinding('class.k-widget'),
|
|
7256
|
+
HostBinding('class.k-input'),
|
|
7101
7257
|
HostBinding('class.k-dateinput'),
|
|
7102
7258
|
__metadata("design:type", Boolean),
|
|
7103
7259
|
__metadata("design:paramtypes", [])
|
|
7104
7260
|
], DateInputComponent.prototype, "wrapperClass", null);
|
|
7105
7261
|
__decorate([
|
|
7106
|
-
HostBinding('class.k-
|
|
7262
|
+
HostBinding('class.k-disabled'),
|
|
7107
7263
|
__metadata("design:type", Boolean),
|
|
7108
7264
|
__metadata("design:paramtypes", [])
|
|
7109
7265
|
], DateInputComponent.prototype, "disabledClass", null);
|
|
7266
|
+
__decorate([
|
|
7267
|
+
ViewChild('spinup', { static: false }),
|
|
7268
|
+
__metadata("design:type", ElementRef)
|
|
7269
|
+
], DateInputComponent.prototype, "spinup", void 0);
|
|
7270
|
+
__decorate([
|
|
7271
|
+
ViewChild('spindown', { static: false }),
|
|
7272
|
+
__metadata("design:type", ElementRef)
|
|
7273
|
+
], DateInputComponent.prototype, "spindown", void 0);
|
|
7110
7274
|
DateInputComponent = DateInputComponent_1 = __decorate([
|
|
7111
7275
|
Component({
|
|
7112
7276
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -7119,7 +7283,7 @@ var DateInputComponent = /** @class */ (function () {
|
|
|
7119
7283
|
LocalizationService
|
|
7120
7284
|
],
|
|
7121
7285
|
selector: 'kendo-dateinput',
|
|
7122
|
-
template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <
|
|
7286
|
+
template: "\n <ng-container kendoDateInputLocalizedMessages\n i18n-increment=\"kendo.dateinput.increment|The label for the **Increment** button in the DateInput\"\n increment=\"Increase value\"\n\n i18n-decrement=\"kendo.dateinput.decrement|The label for the **Decrement** button in the DateInput\"\n decrement=\"Decrease value\"\n >\n </ng-container>\n <input\n #dateInput\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n class=\"k-input-inner\"\n [attr.role]=\"role\"\n [attr.aria-readonly]=\"ariaReadOnly\"\n [id]=\"focusableId\"\n [title]=\"title\"\n [tabindex]=\"tabindex\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [attr.aria-expanded]=\"isPopupOpen\"\n [attr.aria-haspopup]=\"hasPopup\"\n [kendoEventsOutsideAngular]=\"{\n click: handleClick,\n focus: handleFocus,\n mousedown: handleMousedown,\n touchstart: handleMousedown,\n dragstart: handleDragAndDrop,\n drop: handleDragAndDrop,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n />\n <span *ngIf=\"spinners\" class=\"k-input-spinner k-spin-button\" (mousedown)=\"$event.preventDefault()\">\n <button\n #spinup\n tabindex=\"-1\"\n class=\"k-spinner-increase k-button k-icon-button\"\n [class.k-active]=\"arrowDirection === arrow.Up\"\n (mousedown)=\"arrowDirection = arrow.Up\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n (click)=\"handleButtonClick(1)\"\n [title]=\"localization.get('increment')\"\n [attr.aria-label]=\"localization.get('increment')\">\n <span class=\"k-button-icon k-icon k-i-arrow-n\"></span>\n </button>\n <button\n #spindown\n tabindex=\"-1\"\n class=\"k-spinner-decrease k-button k-icon-button\"\n (click)=\"handleButtonClick(-1)\"\n [class.k-active]=\"arrowDirection === arrow.Down\"\n (mousedown)=\"arrowDirection = arrow.Down\"\n (mouseleave)=\"arrowDirection = arrow.None\"\n [title]=\"localization.get('decrement')\"\n [attr.aria-label]=\"localization.get('decrement')\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n </span>\n "
|
|
7123
7287
|
}),
|
|
7124
7288
|
__param(7, Optional()),
|
|
7125
7289
|
__metadata("design:paramtypes", [ChangeDetectorRef,
|
|
@@ -7189,12 +7353,12 @@ var TWO_DIGIT_YEAR_MAX$1 = 68;
|
|
|
7189
7353
|
* Represents the [Kendo UI DatePicker component for Angular]({% slug overview_datepicker %}#toc-basic-usage).
|
|
7190
7354
|
*/
|
|
7191
7355
|
var DatePickerComponent = /** @class */ (function () {
|
|
7192
|
-
function DatePickerComponent(zone, localization, cdr, popupService,
|
|
7356
|
+
function DatePickerComponent(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, touchEnabled$$1) {
|
|
7193
7357
|
this.zone = zone;
|
|
7194
7358
|
this.localization = localization;
|
|
7195
7359
|
this.cdr = cdr;
|
|
7196
7360
|
this.popupService = popupService;
|
|
7197
|
-
this.
|
|
7361
|
+
this.wrapper = wrapper;
|
|
7198
7362
|
this.renderer = renderer;
|
|
7199
7363
|
this.injector = injector;
|
|
7200
7364
|
this.pickerService = pickerService;
|
|
@@ -7420,6 +7584,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
7420
7584
|
this.incompleteValidator = noop;
|
|
7421
7585
|
this.resolvedPromise = Promise.resolve(null);
|
|
7422
7586
|
this.domEvents = [];
|
|
7587
|
+
this._size = 'medium';
|
|
7588
|
+
this._rounded = 'medium';
|
|
7589
|
+
this._fillMode = 'solid';
|
|
7423
7590
|
validatePackage(packageMetadata);
|
|
7424
7591
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
7425
7592
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -7570,6 +7737,85 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
7570
7737
|
enumerable: true,
|
|
7571
7738
|
configurable: true
|
|
7572
7739
|
});
|
|
7740
|
+
Object.defineProperty(DatePickerComponent.prototype, "size", {
|
|
7741
|
+
get: function () {
|
|
7742
|
+
return this._size;
|
|
7743
|
+
},
|
|
7744
|
+
/**
|
|
7745
|
+
* Sets the size of the component.
|
|
7746
|
+
*
|
|
7747
|
+
* The possible values are:
|
|
7748
|
+
* * `'small'`
|
|
7749
|
+
* * `'medium'` (Default)
|
|
7750
|
+
* * `'large'`
|
|
7751
|
+
* * `null`
|
|
7752
|
+
*
|
|
7753
|
+
*/
|
|
7754
|
+
set: function (size) {
|
|
7755
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7756
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
7757
|
+
if (size) {
|
|
7758
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
7759
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
7760
|
+
}
|
|
7761
|
+
this._size = size;
|
|
7762
|
+
},
|
|
7763
|
+
enumerable: true,
|
|
7764
|
+
configurable: true
|
|
7765
|
+
});
|
|
7766
|
+
Object.defineProperty(DatePickerComponent.prototype, "rounded", {
|
|
7767
|
+
get: function () {
|
|
7768
|
+
return this._rounded;
|
|
7769
|
+
},
|
|
7770
|
+
/**
|
|
7771
|
+
* Sets the border radius of the component.
|
|
7772
|
+
*
|
|
7773
|
+
* The possible values are:
|
|
7774
|
+
* * `'small'`
|
|
7775
|
+
* * `'medium'` (Default)
|
|
7776
|
+
* * `'large'`
|
|
7777
|
+
* * `'full'`
|
|
7778
|
+
* * `null`
|
|
7779
|
+
*
|
|
7780
|
+
*/
|
|
7781
|
+
set: function (rounded) {
|
|
7782
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7783
|
+
if (rounded) {
|
|
7784
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
7785
|
+
}
|
|
7786
|
+
this._rounded = rounded;
|
|
7787
|
+
},
|
|
7788
|
+
enumerable: true,
|
|
7789
|
+
configurable: true
|
|
7790
|
+
});
|
|
7791
|
+
Object.defineProperty(DatePickerComponent.prototype, "fillMode", {
|
|
7792
|
+
get: function () {
|
|
7793
|
+
return this._fillMode;
|
|
7794
|
+
},
|
|
7795
|
+
/**
|
|
7796
|
+
* Sets the fillMode of the component.
|
|
7797
|
+
*
|
|
7798
|
+
* The possible values are:
|
|
7799
|
+
* * `'solid'` (Default)
|
|
7800
|
+
* * `'flat'`
|
|
7801
|
+
* * `'outline'`
|
|
7802
|
+
* * `null`
|
|
7803
|
+
*
|
|
7804
|
+
*/
|
|
7805
|
+
set: function (fillMode) {
|
|
7806
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7807
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
7808
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
7809
|
+
if (fillMode) {
|
|
7810
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
7811
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
7812
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
7813
|
+
}
|
|
7814
|
+
this._fillMode = fillMode;
|
|
7815
|
+
},
|
|
7816
|
+
enumerable: true,
|
|
7817
|
+
configurable: true
|
|
7818
|
+
});
|
|
7573
7819
|
Object.defineProperty(DatePickerComponent.prototype, "disabledClass", {
|
|
7574
7820
|
/**
|
|
7575
7821
|
* @hidden
|
|
@@ -7601,10 +7847,10 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
7601
7847
|
}
|
|
7602
7848
|
var element = this.wrapper.nativeElement;
|
|
7603
7849
|
if (value) {
|
|
7604
|
-
this.renderer.addClass(element, 'k-
|
|
7850
|
+
this.renderer.addClass(element, 'k-focus');
|
|
7605
7851
|
}
|
|
7606
7852
|
else {
|
|
7607
|
-
this.renderer.removeClass(element, 'k-
|
|
7853
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
7608
7854
|
}
|
|
7609
7855
|
},
|
|
7610
7856
|
enumerable: true,
|
|
@@ -7648,13 +7894,16 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
7648
7894
|
.changes
|
|
7649
7895
|
.subscribe(function () { return _this.cdr.markForCheck(); });
|
|
7650
7896
|
this.control = this.injector.get(NgControl, null);
|
|
7651
|
-
if (this.
|
|
7652
|
-
this.renderer.removeAttribute(this.
|
|
7897
|
+
if (this.wrapper) {
|
|
7898
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
7653
7899
|
this.zone.runOutsideAngular(function () {
|
|
7654
7900
|
_this.bindEvents();
|
|
7655
7901
|
});
|
|
7656
7902
|
}
|
|
7657
7903
|
};
|
|
7904
|
+
DatePickerComponent.prototype.ngAfterViewInit = function () {
|
|
7905
|
+
this.setComponentClasses();
|
|
7906
|
+
};
|
|
7658
7907
|
/**
|
|
7659
7908
|
* @hidden
|
|
7660
7909
|
*/
|
|
@@ -7968,7 +8217,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
7968
8217
|
}
|
|
7969
8218
|
};
|
|
7970
8219
|
DatePickerComponent.prototype.bindEvents = function () {
|
|
7971
|
-
var element = this.
|
|
8220
|
+
var element = this.wrapper.nativeElement;
|
|
7972
8221
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
7973
8222
|
if (isWindowAvailable()) {
|
|
7974
8223
|
this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -8027,6 +8276,20 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
8027
8276
|
this.cdr.markForCheck();
|
|
8028
8277
|
this.zone.run(function () { return _this.onValidatorChange(); });
|
|
8029
8278
|
};
|
|
8279
|
+
DatePickerComponent.prototype.setComponentClasses = function () {
|
|
8280
|
+
if (this.size) {
|
|
8281
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
8282
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
8283
|
+
}
|
|
8284
|
+
if (this.rounded) {
|
|
8285
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
8286
|
+
}
|
|
8287
|
+
if (this.fillMode) {
|
|
8288
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
8289
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
8290
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
8291
|
+
}
|
|
8292
|
+
};
|
|
8030
8293
|
var DatePickerComponent_1;
|
|
8031
8294
|
__decorate([
|
|
8032
8295
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
@@ -8037,9 +8300,9 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
8037
8300
|
__metadata("design:type", TemplateRef)
|
|
8038
8301
|
], DatePickerComponent.prototype, "popupTemplate", void 0);
|
|
8039
8302
|
__decorate([
|
|
8040
|
-
ViewChild('
|
|
8303
|
+
ViewChild('toggleButton', { static: true }),
|
|
8041
8304
|
__metadata("design:type", ElementRef)
|
|
8042
|
-
], DatePickerComponent.prototype, "
|
|
8305
|
+
], DatePickerComponent.prototype, "toggleButton", void 0);
|
|
8043
8306
|
__decorate([
|
|
8044
8307
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
8045
8308
|
__metadata("design:type", CellTemplateDirective)
|
|
@@ -8224,6 +8487,21 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
8224
8487
|
Input(),
|
|
8225
8488
|
__metadata("design:type", Boolean)
|
|
8226
8489
|
], DatePickerComponent.prototype, "weekNumber", void 0);
|
|
8490
|
+
__decorate([
|
|
8491
|
+
Input(),
|
|
8492
|
+
__metadata("design:type", String),
|
|
8493
|
+
__metadata("design:paramtypes", [String])
|
|
8494
|
+
], DatePickerComponent.prototype, "size", null);
|
|
8495
|
+
__decorate([
|
|
8496
|
+
Input(),
|
|
8497
|
+
__metadata("design:type", String),
|
|
8498
|
+
__metadata("design:paramtypes", [String])
|
|
8499
|
+
], DatePickerComponent.prototype, "rounded", null);
|
|
8500
|
+
__decorate([
|
|
8501
|
+
Input(),
|
|
8502
|
+
__metadata("design:type", String),
|
|
8503
|
+
__metadata("design:paramtypes", [String])
|
|
8504
|
+
], DatePickerComponent.prototype, "fillMode", null);
|
|
8227
8505
|
__decorate([
|
|
8228
8506
|
Output(),
|
|
8229
8507
|
__metadata("design:type", EventEmitter)
|
|
@@ -8245,12 +8523,12 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
8245
8523
|
__metadata("design:type", EventEmitter)
|
|
8246
8524
|
], DatePickerComponent.prototype, "close", void 0);
|
|
8247
8525
|
__decorate([
|
|
8248
|
-
HostBinding('class.k-widget'),
|
|
8249
8526
|
HostBinding('class.k-datepicker'),
|
|
8527
|
+
HostBinding('class.k-input'),
|
|
8250
8528
|
__metadata("design:type", Boolean)
|
|
8251
8529
|
], DatePickerComponent.prototype, "wrapperClasses", void 0);
|
|
8252
8530
|
__decorate([
|
|
8253
|
-
HostBinding('class.k-
|
|
8531
|
+
HostBinding('class.k-disabled'),
|
|
8254
8532
|
__metadata("design:type", Boolean),
|
|
8255
8533
|
__metadata("design:paramtypes", [])
|
|
8256
8534
|
], DatePickerComponent.prototype, "disabledClass", null);
|
|
@@ -8271,7 +8549,7 @@ var DatePickerComponent = /** @class */ (function () {
|
|
|
8271
8549
|
}
|
|
8272
8550
|
],
|
|
8273
8551
|
selector: 'kendo-datepicker',
|
|
8274
|
-
template: "\n <ng-container kendoDatePickerLocalizedMessages\n i18n-today=\"kendo.datepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-toggle=\"kendo.datepicker.toggle|The title of the toggle button in the datepicker component\"\n toggle=\"Toggle calendar\"\n\n i18n-prevButtonTitle=\"kendo.datepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <
|
|
8552
|
+
template: "\n <ng-container kendoDatePickerLocalizedMessages\n i18n-today=\"kendo.datepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-toggle=\"kendo.datepicker.toggle|The title of the toggle button in the datepicker component\"\n toggle=\"Toggle calendar\"\n\n i18n-prevButtonTitle=\"kendo.datepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n <kendo-dateinput\n #input\n [role]=\"inputRole\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"show\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [ariaReadOnly]=\"readonly\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [fillMode]=\"null\"\n [rounded]=\"null\"\n [size]=\"null\"\n [value]=\"value\"\n (valueChange)=\"handleInputChange($event)\"\n ></kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [tabindex]=\"-1\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleIconClick,\n mousedown: handleMousedown\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon k-i-calendar\"></span>\n </button>\n <ng-container #container></ng-container>\n <ng-template #popupTemplate>\n <kendo-calendar\n #calendar\n [type]=\"calendarType\"\n [min]=\"min\"\n [max]=\"max\"\n [navigation]=\"navigation\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [activeView]=\"activeView\"\n [bottomView]=\"bottomView\"\n [topView]=\"topView\"\n [weekNumber]=\"weekNumber\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [navigationItemTemplate]=\"navigationItemTemplate\"\n [focusedDate]=\"focusedDate\"\n [value]=\"value\"\n (valueChange)=\"handleChange(mergeTime($event))\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeydown\n }\"\n [scope]=\"this\"\n [disabledDates]=\"disabledDates\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n <ng-template>\n "
|
|
8275
8553
|
}),
|
|
8276
8554
|
__param(9, Optional()), __param(9, Inject(TOUCH_ENABLED)),
|
|
8277
8555
|
__metadata("design:paramtypes", [NgZone,
|
|
@@ -8324,12 +8602,12 @@ var formatRegExp = new RegExp(TIME_PART.hour + "|" + TIME_PART.minute + "|" + TI
|
|
|
8324
8602
|
* Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
|
|
8325
8603
|
*/
|
|
8326
8604
|
var TimePickerComponent = /** @class */ (function () {
|
|
8327
|
-
function TimePickerComponent(zone, localization, cdr, popupService,
|
|
8605
|
+
function TimePickerComponent(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled$$1) {
|
|
8328
8606
|
this.zone = zone;
|
|
8329
8607
|
this.localization = localization;
|
|
8330
8608
|
this.cdr = cdr;
|
|
8331
8609
|
this.popupService = popupService;
|
|
8332
|
-
this.
|
|
8610
|
+
this.wrapper = wrapper;
|
|
8333
8611
|
this.renderer = renderer;
|
|
8334
8612
|
this.injector = injector;
|
|
8335
8613
|
this.pickerService = pickerService;
|
|
@@ -8491,6 +8769,9 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
8491
8769
|
this._value = null;
|
|
8492
8770
|
this._active = false;
|
|
8493
8771
|
this.domEvents = [];
|
|
8772
|
+
this._size = 'medium';
|
|
8773
|
+
this._rounded = 'medium';
|
|
8774
|
+
this._fillMode = 'solid';
|
|
8494
8775
|
validatePackage(packageMetadata);
|
|
8495
8776
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
8496
8777
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -8601,6 +8882,85 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
8601
8882
|
enumerable: true,
|
|
8602
8883
|
configurable: true
|
|
8603
8884
|
});
|
|
8885
|
+
Object.defineProperty(TimePickerComponent.prototype, "size", {
|
|
8886
|
+
get: function () {
|
|
8887
|
+
return this._size;
|
|
8888
|
+
},
|
|
8889
|
+
/**
|
|
8890
|
+
* Sets the size of the component.
|
|
8891
|
+
*
|
|
8892
|
+
* The possible values are:
|
|
8893
|
+
* * `'small'`
|
|
8894
|
+
* * `'medium'` (Default)
|
|
8895
|
+
* * `'large'`
|
|
8896
|
+
* * `null`
|
|
8897
|
+
*
|
|
8898
|
+
*/
|
|
8899
|
+
set: function (size) {
|
|
8900
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
8901
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
8902
|
+
if (size) {
|
|
8903
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
8904
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
8905
|
+
}
|
|
8906
|
+
this._size = size;
|
|
8907
|
+
},
|
|
8908
|
+
enumerable: true,
|
|
8909
|
+
configurable: true
|
|
8910
|
+
});
|
|
8911
|
+
Object.defineProperty(TimePickerComponent.prototype, "rounded", {
|
|
8912
|
+
get: function () {
|
|
8913
|
+
return this._rounded;
|
|
8914
|
+
},
|
|
8915
|
+
/**
|
|
8916
|
+
* Sets the border radius of the component.
|
|
8917
|
+
*
|
|
8918
|
+
* The possible values are:
|
|
8919
|
+
* * `'small'`
|
|
8920
|
+
* * `'medium'` (Default)
|
|
8921
|
+
* * `'large'`
|
|
8922
|
+
* * `'full'`
|
|
8923
|
+
* * `null`
|
|
8924
|
+
*
|
|
8925
|
+
*/
|
|
8926
|
+
set: function (rounded) {
|
|
8927
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
8928
|
+
if (rounded) {
|
|
8929
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
8930
|
+
}
|
|
8931
|
+
this._rounded = rounded;
|
|
8932
|
+
},
|
|
8933
|
+
enumerable: true,
|
|
8934
|
+
configurable: true
|
|
8935
|
+
});
|
|
8936
|
+
Object.defineProperty(TimePickerComponent.prototype, "fillMode", {
|
|
8937
|
+
get: function () {
|
|
8938
|
+
return this._fillMode;
|
|
8939
|
+
},
|
|
8940
|
+
/**
|
|
8941
|
+
* Sets the fillMode of the component.
|
|
8942
|
+
*
|
|
8943
|
+
* The possible values are:
|
|
8944
|
+
* * `'solid'` (Default)
|
|
8945
|
+
* * `'flat'`
|
|
8946
|
+
* * `'outline'`
|
|
8947
|
+
* * `null`
|
|
8948
|
+
*
|
|
8949
|
+
*/
|
|
8950
|
+
set: function (fillMode) {
|
|
8951
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
8952
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
8953
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
8954
|
+
if (fillMode) {
|
|
8955
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
8956
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
8957
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
8958
|
+
}
|
|
8959
|
+
this._fillMode = fillMode;
|
|
8960
|
+
},
|
|
8961
|
+
enumerable: true,
|
|
8962
|
+
configurable: true
|
|
8963
|
+
});
|
|
8604
8964
|
Object.defineProperty(TimePickerComponent.prototype, "disabledClass", {
|
|
8605
8965
|
/**
|
|
8606
8966
|
* @hidden
|
|
@@ -8632,10 +8992,10 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
8632
8992
|
}
|
|
8633
8993
|
var element = this.wrapper.nativeElement;
|
|
8634
8994
|
if (value) {
|
|
8635
|
-
this.renderer.addClass(element, 'k-
|
|
8995
|
+
this.renderer.addClass(element, 'k-focus');
|
|
8636
8996
|
}
|
|
8637
8997
|
else {
|
|
8638
|
-
this.renderer.removeClass(element, 'k-
|
|
8998
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
8639
8999
|
}
|
|
8640
9000
|
},
|
|
8641
9001
|
enumerable: true,
|
|
@@ -8692,13 +9052,19 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
8692
9052
|
this.localizationChangeSubscription = this.localization
|
|
8693
9053
|
.changes.subscribe(function () { return _this.cdr.markForCheck(); });
|
|
8694
9054
|
this.control = this.injector.get(NgControl, null);
|
|
8695
|
-
if (this.
|
|
8696
|
-
this.renderer.removeAttribute(this.
|
|
9055
|
+
if (this.wrapper) {
|
|
9056
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8697
9057
|
this.zone.runOutsideAngular(function () {
|
|
8698
9058
|
_this.bindEvents();
|
|
8699
9059
|
});
|
|
8700
9060
|
}
|
|
8701
9061
|
};
|
|
9062
|
+
/**
|
|
9063
|
+
* @hidden
|
|
9064
|
+
*/
|
|
9065
|
+
TimePickerComponent.prototype.ngAfterViewInit = function () {
|
|
9066
|
+
this.setComponentClasses();
|
|
9067
|
+
};
|
|
8702
9068
|
/**
|
|
8703
9069
|
* @hidden
|
|
8704
9070
|
*/
|
|
@@ -9011,7 +9377,7 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9011
9377
|
}
|
|
9012
9378
|
};
|
|
9013
9379
|
TimePickerComponent.prototype.bindEvents = function () {
|
|
9014
|
-
var element = this.
|
|
9380
|
+
var element = this.wrapper.nativeElement;
|
|
9015
9381
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
9016
9382
|
if (isWindowAvailable()) {
|
|
9017
9383
|
this.windowBlurSubscription = fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -9063,6 +9429,20 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9063
9429
|
this.cdr.markForCheck();
|
|
9064
9430
|
this.zone.run(function () { return _this.onValidatorChange(); });
|
|
9065
9431
|
};
|
|
9432
|
+
TimePickerComponent.prototype.setComponentClasses = function () {
|
|
9433
|
+
if (this.size) {
|
|
9434
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
9435
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
9436
|
+
}
|
|
9437
|
+
if (this.rounded) {
|
|
9438
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9439
|
+
}
|
|
9440
|
+
if (this.fillMode) {
|
|
9441
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
9442
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
9443
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
9444
|
+
}
|
|
9445
|
+
};
|
|
9066
9446
|
var TimePickerComponent_1;
|
|
9067
9447
|
__decorate([
|
|
9068
9448
|
ViewChild('container', { read: ViewContainerRef, static: false }),
|
|
@@ -9073,9 +9453,9 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9073
9453
|
__metadata("design:type", TemplateRef)
|
|
9074
9454
|
], TimePickerComponent.prototype, "popupTemplate", void 0);
|
|
9075
9455
|
__decorate([
|
|
9076
|
-
ViewChild('
|
|
9456
|
+
ViewChild('toggleButton', { static: true }),
|
|
9077
9457
|
__metadata("design:type", ElementRef)
|
|
9078
|
-
], TimePickerComponent.prototype, "
|
|
9458
|
+
], TimePickerComponent.prototype, "toggleButton", void 0);
|
|
9079
9459
|
__decorate([
|
|
9080
9460
|
Input(),
|
|
9081
9461
|
__metadata("design:type", String)
|
|
@@ -9158,6 +9538,21 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9158
9538
|
__metadata("design:type", Date),
|
|
9159
9539
|
__metadata("design:paramtypes", [Date])
|
|
9160
9540
|
], TimePickerComponent.prototype, "value", null);
|
|
9541
|
+
__decorate([
|
|
9542
|
+
Input(),
|
|
9543
|
+
__metadata("design:type", String),
|
|
9544
|
+
__metadata("design:paramtypes", [String])
|
|
9545
|
+
], TimePickerComponent.prototype, "size", null);
|
|
9546
|
+
__decorate([
|
|
9547
|
+
Input(),
|
|
9548
|
+
__metadata("design:type", String),
|
|
9549
|
+
__metadata("design:paramtypes", [String])
|
|
9550
|
+
], TimePickerComponent.prototype, "rounded", null);
|
|
9551
|
+
__decorate([
|
|
9552
|
+
Input(),
|
|
9553
|
+
__metadata("design:type", String),
|
|
9554
|
+
__metadata("design:paramtypes", [String])
|
|
9555
|
+
], TimePickerComponent.prototype, "fillMode", null);
|
|
9161
9556
|
__decorate([
|
|
9162
9557
|
Output(),
|
|
9163
9558
|
__metadata("design:type", EventEmitter)
|
|
@@ -9179,12 +9574,12 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9179
9574
|
__metadata("design:type", EventEmitter)
|
|
9180
9575
|
], TimePickerComponent.prototype, "close", void 0);
|
|
9181
9576
|
__decorate([
|
|
9182
|
-
HostBinding('class.k-widget'),
|
|
9183
9577
|
HostBinding('class.k-timepicker'),
|
|
9578
|
+
HostBinding('class.k-input'),
|
|
9184
9579
|
__metadata("design:type", Boolean)
|
|
9185
9580
|
], TimePickerComponent.prototype, "wrapperClasses", void 0);
|
|
9186
9581
|
__decorate([
|
|
9187
|
-
HostBinding('class.k-
|
|
9582
|
+
HostBinding('class.k-disabled'),
|
|
9188
9583
|
__metadata("design:type", Boolean),
|
|
9189
9584
|
__metadata("design:paramtypes", [])
|
|
9190
9585
|
], TimePickerComponent.prototype, "disabledClass", null);
|
|
@@ -9204,7 +9599,7 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
9204
9599
|
PickerService
|
|
9205
9600
|
],
|
|
9206
9601
|
selector: 'kendo-timepicker',
|
|
9207
|
-
template: "\n <ng-container kendoTimePickerLocalizedMessages\n i18n-accept=\"kendo.timepicker.accept|The Accept button text in the timepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.timepicker.acceptLabel|The label for the Accept button in the timepicker component\"\n acceptLabel=\"Set time\"\n\n i18n-cancel=\"kendo.timepicker.cancel|The Cancel button text in the timepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.timepicker.cancelLabel|The label for the Cancel button in the timepicker component\"\n cancelLabel=\"Cancel changes\"\n\n i18n-now=\"kendo.timepicker.now|The Now button text in the timepicker component\"\n now=\"Now\"\n\n i18n-nowLabel=\"kendo.timepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-toggle=\"kendo.timepicker.toggle|The label for the toggle button in the timepicker component\"\n toggle=\"Toggle time list\"\n >\n </ng-container>\n <
|
|
9602
|
+
template: "\n <ng-container kendoTimePickerLocalizedMessages\n i18n-accept=\"kendo.timepicker.accept|The Accept button text in the timepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.timepicker.acceptLabel|The label for the Accept button in the timepicker component\"\n acceptLabel=\"Set time\"\n\n i18n-cancel=\"kendo.timepicker.cancel|The Cancel button text in the timepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.timepicker.cancelLabel|The label for the Cancel button in the timepicker component\"\n cancelLabel=\"Cancel changes\"\n\n i18n-now=\"kendo.timepicker.now|The Now button text in the timepicker component\"\n now=\"Now\"\n\n i18n-nowLabel=\"kendo.timepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-toggle=\"kendo.timepicker.toggle|The label for the toggle button in the timepicker component\"\n toggle=\"Toggle time list\"\n >\n </ng-container>\n <kendo-dateinput\n #input\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"show\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [format]=\"format\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [min]=\"normalizeTime(min)\"\n [max]=\"normalizeTime(max)\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [fillMode]=\"fillMode\"\n [rounded]=\"rounded\"\n [size]=\"size\"\n [steps]=\"steps\"\n [tabindex]=\"!show ? tabindex : -1\"\n [title]=\"title\"\n [value]=\"value\"\n (valueChange)=\"handleInputChange($event)\"\n ></kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleIconClick,\n mousedown: handleMousedown\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon k-i-clock\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-timeselector\n #timeSelector\n [cancelButton]=\"cancelButton\"\n [nowButton]=\"nowButton\"\n [format]=\"format\"\n [min]=\"min\"\n [max]=\"max\"\n [steps]=\"steps\"\n [value]=\"value\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeydown,\n mousedown: handleMousedown\n }\"\n [scope]=\"this\"\n (valueChange)=\"handleChange($event)\"\n (valueReject)=\"handleReject()\"\n >\n <kendo-timeselector-messages\n [acceptLabel]=\"localization.get('acceptLabel')\"\n [accept]=\"localization.get('accept')\"\n [cancelLabel]=\"localization.get('cancelLabel')\"\n [cancel]=\"localization.get('cancel')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n [now]=\"localization.get('now')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
9208
9603
|
}),
|
|
9209
9604
|
__param(9, Optional()), __param(9, Inject(TOUCH_ENABLED)),
|
|
9210
9605
|
__metadata("design:paramtypes", [NgZone,
|
|
@@ -9231,13 +9626,13 @@ var TWO_DIGIT_YEAR_MAX$2 = 68;
|
|
|
9231
9626
|
* Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
|
|
9232
9627
|
*/
|
|
9233
9628
|
var DateTimePickerComponent = /** @class */ (function () {
|
|
9234
|
-
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone,
|
|
9629
|
+
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled$$1, localization, disabledDatesService, renderer) {
|
|
9235
9630
|
this.popupService = popupService;
|
|
9236
9631
|
this.intl = intl;
|
|
9237
9632
|
this.cdr = cdr;
|
|
9238
9633
|
this.pickerService = pickerService;
|
|
9239
9634
|
this.ngZone = ngZone;
|
|
9240
|
-
this.
|
|
9635
|
+
this.wrapper = wrapper;
|
|
9241
9636
|
this.touchEnabled = touchEnabled$$1;
|
|
9242
9637
|
this.localization = localization;
|
|
9243
9638
|
this.disabledDatesService = disabledDatesService;
|
|
@@ -9404,9 +9799,22 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9404
9799
|
this.disabledDatesValidateFn = noop;
|
|
9405
9800
|
this.incompleteValidator = noop;
|
|
9406
9801
|
this.subscriptions = new Subscription();
|
|
9802
|
+
this._size = 'medium';
|
|
9803
|
+
this._rounded = 'medium';
|
|
9804
|
+
this._fillMode = 'solid';
|
|
9407
9805
|
validatePackage(packageMetadata);
|
|
9408
9806
|
}
|
|
9409
9807
|
DateTimePickerComponent_1 = DateTimePickerComponent;
|
|
9808
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "disabledClass", {
|
|
9809
|
+
/**
|
|
9810
|
+
* @hidden
|
|
9811
|
+
*/
|
|
9812
|
+
get: function () {
|
|
9813
|
+
return this.disabled;
|
|
9814
|
+
},
|
|
9815
|
+
enumerable: true,
|
|
9816
|
+
configurable: true
|
|
9817
|
+
});
|
|
9410
9818
|
Object.defineProperty(DateTimePickerComponent.prototype, "input", {
|
|
9411
9819
|
/**
|
|
9412
9820
|
* @hidden
|
|
@@ -9587,10 +9995,10 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9587
9995
|
},
|
|
9588
9996
|
set: function (value) {
|
|
9589
9997
|
if (value) {
|
|
9590
|
-
this.renderer.addClass(this.wrapper.nativeElement, 'k-
|
|
9998
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
|
|
9591
9999
|
}
|
|
9592
10000
|
else {
|
|
9593
|
-
this.renderer.removeClass(this.wrapper.nativeElement, 'k-
|
|
10001
|
+
this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
|
|
9594
10002
|
}
|
|
9595
10003
|
this._isActive = value;
|
|
9596
10004
|
},
|
|
@@ -9612,6 +10020,85 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9612
10020
|
enumerable: true,
|
|
9613
10021
|
configurable: true
|
|
9614
10022
|
});
|
|
10023
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "size", {
|
|
10024
|
+
get: function () {
|
|
10025
|
+
return this._size;
|
|
10026
|
+
},
|
|
10027
|
+
/**
|
|
10028
|
+
* Sets the size of the component.
|
|
10029
|
+
*
|
|
10030
|
+
* The possible values are:
|
|
10031
|
+
* * `'small'`
|
|
10032
|
+
* * `'medium'` (Default)
|
|
10033
|
+
* * `'large'`
|
|
10034
|
+
* * `null`
|
|
10035
|
+
*
|
|
10036
|
+
*/
|
|
10037
|
+
set: function (size) {
|
|
10038
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10039
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getSizeClass('input', this.size));
|
|
10040
|
+
if (size) {
|
|
10041
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10042
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('input', size));
|
|
10043
|
+
}
|
|
10044
|
+
this._size = size;
|
|
10045
|
+
},
|
|
10046
|
+
enumerable: true,
|
|
10047
|
+
configurable: true
|
|
10048
|
+
});
|
|
10049
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "rounded", {
|
|
10050
|
+
get: function () {
|
|
10051
|
+
return this._rounded;
|
|
10052
|
+
},
|
|
10053
|
+
/**
|
|
10054
|
+
* Sets the border radius of the component.
|
|
10055
|
+
*
|
|
10056
|
+
* The possible values are:
|
|
10057
|
+
* * `'small'`
|
|
10058
|
+
* * `'medium'` (Default)
|
|
10059
|
+
* * `'large'`
|
|
10060
|
+
* * `'full'`
|
|
10061
|
+
* * `null`
|
|
10062
|
+
*
|
|
10063
|
+
*/
|
|
10064
|
+
set: function (rounded) {
|
|
10065
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10066
|
+
if (rounded) {
|
|
10067
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10068
|
+
}
|
|
10069
|
+
this._rounded = rounded;
|
|
10070
|
+
},
|
|
10071
|
+
enumerable: true,
|
|
10072
|
+
configurable: true
|
|
10073
|
+
});
|
|
10074
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "fillMode", {
|
|
10075
|
+
get: function () {
|
|
10076
|
+
return this._fillMode;
|
|
10077
|
+
},
|
|
10078
|
+
/**
|
|
10079
|
+
* Sets the fillMode of the component.
|
|
10080
|
+
*
|
|
10081
|
+
* The possible values are:
|
|
10082
|
+
* * `'solid'` (Default)
|
|
10083
|
+
* * `'flat'`
|
|
10084
|
+
* * `'outline'`
|
|
10085
|
+
* * `null`
|
|
10086
|
+
*
|
|
10087
|
+
*/
|
|
10088
|
+
set: function (fillMode) {
|
|
10089
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10090
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
10091
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
10092
|
+
if (fillMode) {
|
|
10093
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10094
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', fillMode));
|
|
10095
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
10096
|
+
}
|
|
10097
|
+
this._fillMode = fillMode;
|
|
10098
|
+
},
|
|
10099
|
+
enumerable: true,
|
|
10100
|
+
configurable: true
|
|
10101
|
+
});
|
|
9615
10102
|
Object.defineProperty(DateTimePickerComponent.prototype, "tabSwitchTransition", {
|
|
9616
10103
|
/**
|
|
9617
10104
|
* @hidden
|
|
@@ -9702,6 +10189,9 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9702
10189
|
this.subscriptions.add(this.ngZone.runOutsideAngular(function () { return fromEvent(window, 'blur').subscribe(_this.handleCancel.bind(_this)); }));
|
|
9703
10190
|
}
|
|
9704
10191
|
};
|
|
10192
|
+
DateTimePickerComponent.prototype.ngAfterViewInit = function () {
|
|
10193
|
+
this.setComponentClasses();
|
|
10194
|
+
};
|
|
9705
10195
|
DateTimePickerComponent.prototype.ngOnChanges = function (changes) {
|
|
9706
10196
|
if (isPresent(changes.min) || isPresent(changes.max)) {
|
|
9707
10197
|
this.verifyMinMaxRange();
|
|
@@ -9856,7 +10346,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9856
10346
|
return;
|
|
9857
10347
|
}
|
|
9858
10348
|
this.isActive = false;
|
|
9859
|
-
var isNgControlUntouched = this.
|
|
10349
|
+
var isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
|
|
9860
10350
|
var runInZone = isNgControlUntouched || hasObservers(this.onBlur) || (this.isOpen && hasObservers(this.close));
|
|
9861
10351
|
this.run(runInZone, function () {
|
|
9862
10352
|
_this.onBlur.emit();
|
|
@@ -9984,6 +10474,13 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
9984
10474
|
this.input.focus();
|
|
9985
10475
|
}
|
|
9986
10476
|
};
|
|
10477
|
+
/**
|
|
10478
|
+
* @hidden
|
|
10479
|
+
*/
|
|
10480
|
+
DateTimePickerComponent.prototype.popupButtonsClasses = function (type) {
|
|
10481
|
+
var buttonType = type ? type : 'base';
|
|
10482
|
+
return (this.size ? getSizeClass('button', this.size) : '') + " " + (this.rounded ? getRoundedClass(this.rounded) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : '');
|
|
10483
|
+
};
|
|
9987
10484
|
/**
|
|
9988
10485
|
* @hidden
|
|
9989
10486
|
*
|
|
@@ -10108,7 +10605,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
10108
10605
|
};
|
|
10109
10606
|
/**
|
|
10110
10607
|
* Indicates whether the focus target is part of this component,
|
|
10111
|
-
* that is, whether the focus target is inside the component
|
|
10608
|
+
* that is, whether the focus target is inside the component or in the popup.
|
|
10112
10609
|
*/
|
|
10113
10610
|
DateTimePickerComponent.prototype.focusTargetInComponent = function (event) {
|
|
10114
10611
|
if (!isPresent(event)) {
|
|
@@ -10155,16 +10652,35 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
10155
10652
|
this.cdr.markForCheck();
|
|
10156
10653
|
this.ngZone.run(function () { return _this.onValidatorChange(); });
|
|
10157
10654
|
};
|
|
10655
|
+
DateTimePickerComponent.prototype.setComponentClasses = function () {
|
|
10656
|
+
if (this.size) {
|
|
10657
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10658
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getSizeClass('button', this.size));
|
|
10659
|
+
}
|
|
10660
|
+
if (this.rounded) {
|
|
10661
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10662
|
+
}
|
|
10663
|
+
if (this.fillMode) {
|
|
10664
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10665
|
+
this.renderer.addClass(this.toggleButton.nativeElement, getFillModeClass('button', this.fillMode));
|
|
10666
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
10667
|
+
}
|
|
10668
|
+
};
|
|
10158
10669
|
var DateTimePickerComponent_1;
|
|
10159
10670
|
__decorate([
|
|
10160
|
-
HostBinding('class.k-widget'),
|
|
10161
10671
|
HostBinding('class.k-datetimepicker'),
|
|
10672
|
+
HostBinding('class.k-input'),
|
|
10162
10673
|
__metadata("design:type", Boolean)
|
|
10163
10674
|
], DateTimePickerComponent.prototype, "hostClasses", void 0);
|
|
10164
10675
|
__decorate([
|
|
10165
|
-
|
|
10676
|
+
HostBinding('class.k-disabled'),
|
|
10677
|
+
__metadata("design:type", Boolean),
|
|
10678
|
+
__metadata("design:paramtypes", [])
|
|
10679
|
+
], DateTimePickerComponent.prototype, "disabledClass", null);
|
|
10680
|
+
__decorate([
|
|
10681
|
+
ViewChild('toggleButton', { static: true }),
|
|
10166
10682
|
__metadata("design:type", ElementRef)
|
|
10167
|
-
], DateTimePickerComponent.prototype, "
|
|
10683
|
+
], DateTimePickerComponent.prototype, "toggleButton", void 0);
|
|
10168
10684
|
__decorate([
|
|
10169
10685
|
Input(),
|
|
10170
10686
|
__metadata("design:type", Date),
|
|
@@ -10293,6 +10809,21 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
10293
10809
|
__metadata("design:type", String),
|
|
10294
10810
|
__metadata("design:paramtypes", [String])
|
|
10295
10811
|
], DateTimePickerComponent.prototype, "defaultTab", null);
|
|
10812
|
+
__decorate([
|
|
10813
|
+
Input(),
|
|
10814
|
+
__metadata("design:type", String),
|
|
10815
|
+
__metadata("design:paramtypes", [String])
|
|
10816
|
+
], DateTimePickerComponent.prototype, "size", null);
|
|
10817
|
+
__decorate([
|
|
10818
|
+
Input(),
|
|
10819
|
+
__metadata("design:type", String),
|
|
10820
|
+
__metadata("design:paramtypes", [String])
|
|
10821
|
+
], DateTimePickerComponent.prototype, "rounded", null);
|
|
10822
|
+
__decorate([
|
|
10823
|
+
Input(),
|
|
10824
|
+
__metadata("design:type", String),
|
|
10825
|
+
__metadata("design:paramtypes", [String])
|
|
10826
|
+
], DateTimePickerComponent.prototype, "fillMode", null);
|
|
10296
10827
|
__decorate([
|
|
10297
10828
|
ContentChild(CellTemplateDirective, { static: false }),
|
|
10298
10829
|
__metadata("design:type", CellTemplateDirective)
|
|
@@ -10343,7 +10874,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
10343
10874
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }), multi: true },
|
|
10344
10875
|
{ provide: KendoInput, useExisting: forwardRef(function () { return DateTimePickerComponent_1; }) }
|
|
10345
10876
|
],
|
|
10346
|
-
template: "\n <ng-container\n kendoDateTimePickerLocalizedMessages\n\n i18n-dateTab=\"kendo.datetimepicker.dateTab|The Date tab text in the datetimepicker popup header\"\n dateTab=\"Date\"\n\n i18n-dateTabLabel=\"kendo.datetimepicker.dateTabLabel|The label for the Date tab in the datetimepicker popup header\"\n dateTabLabel=\"Date tab\"\n\n i18n-timeTab=\"kendo.datetimepicker.timeTab|The Time tab text in the datetimepicker popup header\"\n timeTab=\"Time\"\n\n i18n-timeTabLabel=\"kendo.datetimepicker.timeTabLabel|The label for the Time tab in the datetimepicker popup header\"\n timeTabLabel=\"Time tab\"\n\n i18n-toggle=\"kendo.datetimepicker.toggle|The title of the toggle button in the datetimepicker component\"\n toggle=\"Toggle popup\"\n\n i18n-accept=\"kendo.datetimepicker.accept|The Accept button text in the datetimepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.datetimepicker.acceptLabel|The label for the Accept button in the datetimepicker component\"\n acceptLabel=\"Set\"\n\n i18n-cancel=\"kendo.datetimepicker.cancel|The Cancel button text in the datetimepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.datetimepicker.cancelLabel|The label for the Cancel button in the datetimepicker component\"\n cancelLabel=\"Cancel\"\n\n i18n-now=\"kendo.datetimepicker.now|The Now button text in the timepicker component\"\n now=\"NOW\"\n\n i18n-nowLabel=\"kendo.datetimepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-today=\"kendo.datetimepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.datetimepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datetimepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n\n <span\n #wrapper\n class=\"k-picker-wrap\"\n [class.k-state-disabled]=\"disabled\"\n >\n <kendo-dateinput\n [value]=\"value\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [steps]=\"steps\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"isOpen\"\n (valueChange)=\"handleInputValueChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n </kendo-dateinput>\n <span class=\"k-select\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n click: handleIconClick\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-link k-link-date\">\n <span\n class=\"k-icon\"\n [class.k-i-calendar]=\"activeTab === 'date'\"\n [class.k-i-clock]=\"activeTab === 'time'\"\n >\n </span>\n </span>\n </span>\n </span>\n\n <ng-container #container></ng-container>\n\n <ng-template #popupTemplate>\n <div\n class=\"k-datetime-wrap k-{{activeTab}}-tab\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-datetime-buttongroup\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-button-group k-button-group-stretched\">\n <button\n type=\"button\"\n class=\"k-button k-date-tab\"\n [class.k-state-active]=\"activeTab === 'date'\"\n [attr.title]=\"localization.get('dateTabLabel')\"\n [attr.aria-label]=\"localization.get('dateTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'date'),\n keydown: handleBackTabOut\n }\"\n [scope]=\"this\"\n >\n {{localization.get('dateTab')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-time-tab\"\n [class.k-state-active]=\"activeTab === 'time'\"\n [attr.title]=\"localization.get('timeTabLabel')\"\n [attr.aria-label]=\"localization.get('timeTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'time')\n }\"\n >\n {{localization.get('timeTab')}}\n </button>\n </div>\n </div>\n <div\n #dateTimeSelector\n class=\"k-datetime-selector\"\n [style.transition]=\"tabSwitchTransition\"\n [kendoEventsOutsideAngular]=\"{\n transitionend: handleTabChangeTransitionEnd.bind(this, dateTimeSelector)\n }\"\n >\n <div class=\"k-datetime-calendar-wrap\">\n <kendo-calendar\n [(value)]=\"calendarValue\"\n [type]=\"calendarType\"\n [min]=\"calendarMin\"\n [max]=\"calendarMax\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [navigation]=\"false\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [disabled]=\"disableCalendar\"\n [disabledDates]=\"disabledDates\"\n (valueChange)=\"handleCalendarValueChange()\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n </div>\n <div class=\"k-datetime-time-wrap\">\n <kendo-timeselector\n [value]=\"value\"\n [format]=\"timeSelectorFormat\"\n [min]=\"timeSelectorMin\"\n [max]=\"timeSelectorMax\"\n [setButton]=\"false\"\n [cancelButton]=\"false\"\n [steps]=\"steps\"\n [disabled]=\"disableTimeSelector\"\n >\n <kendo-timeselector-messages\n [now]=\"localization.get('now')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </div>\n </div>\n <div\n class=\"k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleTabOut,\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <button\n *ngIf=\"cancelButton\"\n type=\"button\"\n class=\"k-button k-time-cancel\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleCancel\n }\"\n [scope]=\"this\"\n >\n {{localization.get('cancel')}}\n </button>\n <button\n type=\"button\"\n class=\"k-time-accept k-button k-primary\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [disabled]=\"!calendarValue\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept\n }\"\n [scope]=\"this\"\n >\n {{localization.get('accept')}}\n </button>\n </div>\n </div>\n </ng-template>\n "
|
|
10877
|
+
template: "\n <ng-container\n kendoDateTimePickerLocalizedMessages\n\n i18n-dateTab=\"kendo.datetimepicker.dateTab|The Date tab text in the datetimepicker popup header\"\n dateTab=\"Date\"\n\n i18n-dateTabLabel=\"kendo.datetimepicker.dateTabLabel|The label for the Date tab in the datetimepicker popup header\"\n dateTabLabel=\"Date tab\"\n\n i18n-timeTab=\"kendo.datetimepicker.timeTab|The Time tab text in the datetimepicker popup header\"\n timeTab=\"Time\"\n\n i18n-timeTabLabel=\"kendo.datetimepicker.timeTabLabel|The label for the Time tab in the datetimepicker popup header\"\n timeTabLabel=\"Time tab\"\n\n i18n-toggle=\"kendo.datetimepicker.toggle|The title of the toggle button in the datetimepicker component\"\n toggle=\"Toggle popup\"\n\n i18n-accept=\"kendo.datetimepicker.accept|The Accept button text in the datetimepicker component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.datetimepicker.acceptLabel|The label for the Accept button in the datetimepicker component\"\n acceptLabel=\"Set\"\n\n i18n-cancel=\"kendo.datetimepicker.cancel|The Cancel button text in the datetimepicker component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.datetimepicker.cancelLabel|The label for the Cancel button in the datetimepicker component\"\n cancelLabel=\"Cancel\"\n\n i18n-now=\"kendo.datetimepicker.now|The Now button text in the timepicker component\"\n now=\"NOW\"\n\n i18n-nowLabel=\"kendo.datetimepicker.nowLabel|The label for the Now button in the timepicker component\"\n nowLabel=\"Select now\"\n\n i18n-today=\"kendo.datetimepicker.today|The label for the today button in the calendar header\"\n today=\"Today\"\n\n i18n-prevButtonTitle=\"kendo.datetimepicker.prevButtonTitle|The title of the previous button in the Classic calendar\"\n prevButtonTitle=\"Navigate to previous view\"\n\n i18n-nextButtonTitle=\"kendo.datetimepicker.nextButtonTitle|The title of the next button in the Classic calendar\"\n nextButtonTitle=\"Navigate to next view\"\n >\n </ng-container>\n\n <kendo-dateinput\n [value]=\"value\"\n [format]=\"format\"\n [twoDigitYearMax]=\"twoDigitYearMax\"\n [min]=\"min\"\n [max]=\"max\"\n [incompleteDateValidation]=\"incompleteDateValidation\"\n [formatPlaceholder]=\"formatPlaceholder\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly || readOnlyInput\"\n [role]=\"inputRole\"\n [ariaReadOnly]=\"readonly\"\n [steps]=\"steps\"\n [tabindex]=\"tabindex\"\n [title]=\"title\"\n [focusableId]=\"focusableId\"\n [hasPopup]=\"true\"\n [isPopupOpen]=\"isOpen\"\n (valueChange)=\"handleInputValueChange($event)\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n [fillMode]=\"fillMode\"\n [rounded]=\"rounded\"\n [size]=\"size\"\n >\n </kendo-dateinput>\n <button\n #toggleButton\n type=\"button\"\n class=\"k-input-button k-button k-icon-button\"\n [tabindex]=\"-1\"\n [attr.title]=\"localization.get('toggle')\"\n [attr.aria-label]=\"localization.get('toggle')\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n click: handleIconClick\n }\"\n [scope]=\"this\"\n >\n <span class=\"k-button-icon k-icon\"\n [ngClass]=\"{\n 'k-i-calendar': activeTab === 'date',\n 'k-i-clock': activeTab === 'time'\n }\"\n ></span>\n </button>\n\n <ng-container #container></ng-container>\n\n <ng-template #popupTemplate>\n <div\n class=\"k-datetime-wrap k-{{activeTab}}-tab\"\n [kendoEventsOutsideAngular]=\"{\n mousedown: preventMouseDown,\n keydown: handleKeyDown\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-datetime-buttongroup\"\n [kendoEventsOutsideAngular]=\"{\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <div class=\"k-button-group k-button-group-stretched\">\n <button\n type=\"button\"\n class=\"k-button k-group-start k-date-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'date'\"\n [attr.title]=\"localization.get('dateTabLabel')\"\n [attr.aria-label]=\"localization.get('dateTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'date'),\n keydown: handleBackTabOut\n }\"\n [scope]=\"this\"\n >\n {{localization.get('dateTab')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-group-end k-time-tab\"\n [ngClass]=\"popupButtonsClasses()\"\n [class.k-active]=\"activeTab === 'time'\"\n [attr.title]=\"localization.get('timeTabLabel')\"\n [attr.aria-label]=\"localization.get('timeTabLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: changeActiveTab.bind(this, 'time')\n }\"\n >\n {{localization.get('timeTab')}}\n </button>\n </div>\n </div>\n <div\n #dateTimeSelector\n class=\"k-datetime-selector\"\n [style.transition]=\"tabSwitchTransition\"\n [kendoEventsOutsideAngular]=\"{\n transitionend: handleTabChangeTransitionEnd.bind(this, dateTimeSelector)\n }\"\n >\n <div class=\"k-datetime-calendar-wrap\">\n <kendo-calendar\n [(value)]=\"calendarValue\"\n [type]=\"calendarType\"\n [min]=\"calendarMin\"\n [max]=\"calendarMax\"\n [focusedDate]=\"focusedDate\"\n [weekNumber]=\"weekNumber\"\n [navigation]=\"false\"\n [animateNavigation]=\"animateCalendarNavigation\"\n [cellTemplate]=\"cellTemplate\"\n [monthCellTemplate]=\"monthCellTemplate\"\n [yearCellTemplate]=\"yearCellTemplate\"\n [decadeCellTemplate]=\"decadeCellTemplate\"\n [centuryCellTemplate]=\"centuryCellTemplate\"\n [weekNumberTemplate]=\"weekNumberTemplate\"\n [headerTitleTemplate]=\"headerTitleTemplate\"\n [disabled]=\"disableCalendar\"\n [disabledDates]=\"disabledDates\"\n (valueChange)=\"handleCalendarValueChange()\"\n >\n <kendo-calendar-messages\n [today]=\"localization.get('today')\"\n [prevButtonTitle]=\"localization.get('prevButtonTitle')\"\n [nextButtonTitle]=\"localization.get('nextButtonTitle')\"\n >\n </kendo-calendar-messages>\n </kendo-calendar>\n </div>\n <div class=\"k-datetime-time-wrap\">\n <kendo-timeselector\n [value]=\"value\"\n [format]=\"timeSelectorFormat\"\n [min]=\"timeSelectorMin\"\n [max]=\"timeSelectorMax\"\n [setButton]=\"false\"\n [cancelButton]=\"false\"\n [steps]=\"steps\"\n [disabled]=\"disableTimeSelector\"\n >\n <kendo-timeselector-messages\n [now]=\"localization.get('now')\"\n [nowLabel]=\"localization.get('nowLabel')\"\n >\n </kendo-timeselector-messages>\n </kendo-timeselector>\n </div>\n </div>\n <div\n class=\"k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\"\n [kendoEventsOutsideAngular]=\"{\n keydown: handleTabOut,\n focusin: handleFocus,\n focusout: handleBlur\n }\"\n [scope]=\"this\"\n >\n <button\n *ngIf=\"cancelButton\"\n type=\"button\"\n class=\"k-button k-time-cancel\"\n [ngClass]=\"popupButtonsClasses()\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleCancel\n }\"\n [scope]=\"this\"\n >\n {{localization.get('cancel')}}\n </button>\n <button\n type=\"button\"\n class=\"k-button k-time-accept\"\n [ngClass]=\"popupButtonsClasses('primary')\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [disabled]=\"!calendarValue\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept\n }\"\n [scope]=\"this\"\n >\n {{localization.get('accept')}}\n </button>\n </div>\n </div>\n </ng-template>\n "
|
|
10347
10878
|
}),
|
|
10348
10879
|
__param(6, Inject(TOUCH_ENABLED)),
|
|
10349
10880
|
__metadata("design:paramtypes", [PopupService,
|
|
@@ -11134,7 +11665,7 @@ var DateRangeInput = /** @class */ (function () {
|
|
|
11134
11665
|
var action = show ? 'addClass' : 'removeClass';
|
|
11135
11666
|
var nativeElement = this.element.nativeElement;
|
|
11136
11667
|
if (nativeElement && nativeElement.querySelector) {
|
|
11137
|
-
this.renderer[action](nativeElement
|
|
11668
|
+
this.renderer[action](nativeElement, 'k-focus');
|
|
11138
11669
|
}
|
|
11139
11670
|
};
|
|
11140
11671
|
return DateRangeInput;
|
|
@@ -11763,7 +12294,7 @@ var ViewComponent = /** @class */ (function () {
|
|
|
11763
12294
|
'k-state-selected': !context.isOtherMonth && (context.isSelected || isRangeStart || isRangeEnd),
|
|
11764
12295
|
'k-today': !context.isOtherMonth && context.isToday,
|
|
11765
12296
|
'k-weekend': context.isWeekend,
|
|
11766
|
-
'k-
|
|
12297
|
+
'k-disabled': context.isDisabled,
|
|
11767
12298
|
'k-other-month': context.isOtherMonth
|
|
11768
12299
|
});
|
|
11769
12300
|
};
|
|
@@ -12735,14 +13266,16 @@ var DateRangeModule = /** @class */ (function () {
|
|
|
12735
13266
|
var div$1 = domContainerFactory('div');
|
|
12736
13267
|
var ul$1 = domContainerFactory('ul');
|
|
12737
13268
|
var li$1 = domContainerFactory('li');
|
|
13269
|
+
var span = domContainerFactory('span');
|
|
13270
|
+
var listTitle = function () { return span('hour', 'k-title k-timeselector-title'); };
|
|
12738
13271
|
var listItem = function () { return li$1('<span>02</span>', 'k-item'); };
|
|
12739
13272
|
var list = function () { return ul$1([listItem()], 'k-reset'); };
|
|
12740
|
-
var scrollable$1 = function () { return (div$1([list()], 'k-time-container k-content k-scrollable')); };
|
|
13273
|
+
var scrollable$1 = function () { return (div$1([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable')); };
|
|
12741
13274
|
var timeListWrapper = function () {
|
|
12742
13275
|
if (!isDocumentAvailable()) {
|
|
12743
13276
|
return null;
|
|
12744
13277
|
}
|
|
12745
|
-
return div$1([div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
13278
|
+
return div$1([listTitle(), div$1([scrollable$1()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
12746
13279
|
};
|
|
12747
13280
|
var TIMELIST_WRAPPER = timeListWrapper();
|
|
12748
13281
|
/**
|
|
@@ -12764,7 +13297,8 @@ var TimePickerDOMService = /** @class */ (function () {
|
|
|
12764
13297
|
var listContainer = container && container.querySelector('.k-time-list-container');
|
|
12765
13298
|
var hostContainer = listContainer || document.body;
|
|
12766
13299
|
var wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
|
|
12767
|
-
this.
|
|
13300
|
+
this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
|
|
13301
|
+
this.timeListHeight = wrapper.getBoundingClientRect().height;
|
|
12768
13302
|
this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
|
|
12769
13303
|
hostContainer.removeChild(wrapper);
|
|
12770
13304
|
};
|
|
@@ -13424,8 +13958,9 @@ var TimeListComponent = /** @class */ (function () {
|
|
|
13424
13958
|
this.dom.ensureHeights();
|
|
13425
13959
|
this.itemHeight = this.dom.itemHeight;
|
|
13426
13960
|
this.listHeight = this.dom.timeListHeight;
|
|
13427
|
-
|
|
13428
|
-
this.
|
|
13961
|
+
var titleHeight = this.dom.timeListTitleHeight;
|
|
13962
|
+
this.topOffset = (this.listHeight - this.itemHeight - titleHeight) / 2;
|
|
13963
|
+
this.bottomOffset = this.listHeight - this.itemHeight - titleHeight;
|
|
13429
13964
|
this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
|
|
13430
13965
|
this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
|
|
13431
13966
|
var translate = "translateY(" + this.topOffset + "px)";
|
|
@@ -13628,12 +14163,12 @@ var TimeListComponent = /** @class */ (function () {
|
|
|
13628
14163
|
var isEqualTillMinute = function (value, min) { return value.getHours() === min.getHours() && value.getMinutes() === min.getMinutes(); };
|
|
13629
14164
|
var isEqualTillSecond = function (value, min) { return isEqualTillMinute(value, min) && value.getSeconds() === min.getSeconds(); };
|
|
13630
14165
|
var isEqualTillMillisecond = function (value, min) { return isEqualTillSecond(value, min) && value.getMilliseconds() === min.getMilliseconds(); };
|
|
13631
|
-
var ɵ3$7 = function (value) { return value.getHours(); }, ɵ4$
|
|
14166
|
+
var ɵ3$7 = function (value) { return value.getHours(); }, ɵ4$3 = function (_, min) { return min.getHours(); }, ɵ5$1 = function (value) { return value.getMinutes(); }, ɵ6$1 = function (value, min) { return isEqualTillMinute(value, min) ? min.getMinutes() : 0; }, ɵ7$1 = function (value) { return value.getSeconds(); }, ɵ8$1 = function (value, min) { return isEqualTillSecond(value, min) ? min.getSeconds() : 0; }, ɵ9$1 = function (value) { return value.getMilliseconds(); }, ɵ10$1 = function (value, min) { return isEqualTillMillisecond(value, min) ? min.getMilliseconds() : 0; };
|
|
13632
14167
|
var defaultGetters = [
|
|
13633
14168
|
{
|
|
13634
14169
|
type: TIME_PART.hour,
|
|
13635
14170
|
getter: ɵ3$7,
|
|
13636
|
-
minGetter: ɵ4$
|
|
14171
|
+
minGetter: ɵ4$3
|
|
13637
14172
|
}, {
|
|
13638
14173
|
type: TIME_PART.minute,
|
|
13639
14174
|
getter: ɵ5$1,
|
|
@@ -14088,7 +14623,7 @@ var TimeSelectorComponent = /** @class */ (function () {
|
|
|
14088
14623
|
__metadata("design:type", Boolean)
|
|
14089
14624
|
], TimeSelectorComponent.prototype, "componentClass", void 0);
|
|
14090
14625
|
__decorate([
|
|
14091
|
-
HostBinding('class.k-
|
|
14626
|
+
HostBinding('class.k-disabled'),
|
|
14092
14627
|
__metadata("design:type", Boolean),
|
|
14093
14628
|
__metadata("design:paramtypes", [])
|
|
14094
14629
|
], TimeSelectorComponent.prototype, "disabledClass", null);
|
|
@@ -14149,7 +14684,7 @@ var TimeSelectorComponent = /** @class */ (function () {
|
|
|
14149
14684
|
}
|
|
14150
14685
|
],
|
|
14151
14686
|
selector: 'kendo-timeselector',
|
|
14152
|
-
template: "\n <ng-container kendoTimeSelectorLocalizedMessages\n i18n-accept=\"kendo.timeselector.accept|The Accept button text in the timeselector component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.timeselector.acceptLabel|The label for the Accept button in the timeselector component\"\n acceptLabel=\"Set time\"\n\n i18n-cancel=\"kendo.timeselector.cancel|The Cancel button text in the timeselector component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.timeselector.cancelLabel|The label for the Cancel button in the timeselector component\"\n cancelLabel=\"Cancel changes\"\n\n i18n-now=\"kendo.timeselector.now|The Now button text in the timeselector component\"\n now=\"Now\"\n\n i18n-nowLabel=\"kendo.timeselector.nowLabel|The label for the Now button in the timeselector component\"\n nowLabel=\"Select now\"\n >\n </ng-container>\n <div class=\"k-time-header\">\n <span class=\"k-title k-timeselector-title\">\n {{ intl.formatDate(current, format) }}\n </span>\n <button\n #now\n *ngIf=\"showNowButton\"\n class=\"k-button k-flat k-time-now\"
|
|
14687
|
+
template: "\n <ng-container kendoTimeSelectorLocalizedMessages\n i18n-accept=\"kendo.timeselector.accept|The Accept button text in the timeselector component\"\n accept=\"Set\"\n\n i18n-acceptLabel=\"kendo.timeselector.acceptLabel|The label for the Accept button in the timeselector component\"\n acceptLabel=\"Set time\"\n\n i18n-cancel=\"kendo.timeselector.cancel|The Cancel button text in the timeselector component\"\n cancel=\"Cancel\"\n\n i18n-cancelLabel=\"kendo.timeselector.cancelLabel|The label for the Cancel button in the timeselector component\"\n cancelLabel=\"Cancel changes\"\n\n i18n-now=\"kendo.timeselector.now|The Now button text in the timeselector component\"\n now=\"Now\"\n\n i18n-nowLabel=\"kendo.timeselector.nowLabel|The label for the Now button in the timeselector component\"\n nowLabel=\"Select now\"\n >\n </ng-container>\n <div class=\"k-time-header\">\n <span class=\"k-title k-timeselector-title\">\n {{ intl.formatDate(current, format) }}\n </span>\n <button\n #now\n *ngIf=\"showNowButton\"\n type=\"button\"\n class=\"k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-time-now\"\n [attr.title]=\"localization.get('nowLabel')\"\n [attr.aria-label]=\"localization.get('nowLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleNow,\n focus: handleFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [disabled]=\"disabled\"\n >{{localization.get('now')}}</button>\n </div>\n <div class=\"k-time-list-container\">\n <span class=\"k-time-highlight\"></span>\n <ng-template ngFor [ngForOf]=\"dateFormatParts\" let-part let-idx=\"index\">\n <div\n #listWrapper\n class=\"k-time-list-wrapper\"\n role=\"presentation\" tabindex=\"-1\"\n *ngIf=\"part.type !== 'literal'\"\n >\n <span class=\"k-title k-timeselector-title\">{{intl.dateFieldName(part)}}</span>\n <kendo-timelist\n [min]=\"min\"\n [max]=\"max\"\n [part]=\"part\"\n [step]=\"partStep(part)\"\n [disabled]=\"disabled\"\n [(value)]=\"current\"\n [kendoEventsOutsideAngular]=\"{\n focus: handleListFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [attr.data-timelist-index]=\"idx\"\n ></kendo-timelist>\n </div>\n <div class=\"k-time-separator\" *ngIf=\"part.type === 'literal'\">\n {{part.pattern}}\n </div>\n </ng-template>\n </div>\n <div class=\"k-time-footer k-action-buttons k-actions k-hstack k-justify-content-stretch\" *ngIf=\"setButton || cancelButton\">\n <button\n #cancel\n *ngIf=\"cancelButton\"\n class=\"k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base\"\n type=\"button\"\n [attr.title]=\"localization.get('cancelLabel')\"\n [attr.aria-label]=\"localization.get('cancelLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleReject,\n focus: handleFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [disabled]=\"disabled\"\n >{{localization.get('cancel')}}</button>\n <button\n #accept\n *ngIf=\"setButton\"\n type=\"button\"\n class=\"k-button k-time-accept k-button-md k-rounded-md k-button-solid k-button-solid-primary\"\n [attr.title]=\"localization.get('acceptLabel')\"\n [attr.aria-label]=\"localization.get('acceptLabel')\"\n [kendoEventsOutsideAngular]=\"{\n click: handleAccept,\n focus: handleFocus,\n blur: handleBlur\n }\"\n [scope]=\"this\"\n [disabled]=\"disabled\"\n >{{localization.get('accept')}}</button>\n </div>\n "
|
|
14153
14688
|
}),
|
|
14154
14689
|
__param(7, Optional()),
|
|
14155
14690
|
__metadata("design:paramtypes", [LocalizationService,
|