@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
|
@@ -46,13 +46,13 @@ var TWO_DIGIT_YEAR_MAX = 68;
|
|
|
46
46
|
* Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
|
|
47
47
|
*/
|
|
48
48
|
var DateTimePickerComponent = /** @class */ (function () {
|
|
49
|
-
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone,
|
|
49
|
+
function DateTimePickerComponent(popupService, intl, cdr, pickerService, ngZone, wrapper, touchEnabled, localization, disabledDatesService, renderer) {
|
|
50
50
|
this.popupService = popupService;
|
|
51
51
|
this.intl = intl;
|
|
52
52
|
this.cdr = cdr;
|
|
53
53
|
this.pickerService = pickerService;
|
|
54
54
|
this.ngZone = ngZone;
|
|
55
|
-
this.
|
|
55
|
+
this.wrapper = wrapper;
|
|
56
56
|
this.touchEnabled = touchEnabled;
|
|
57
57
|
this.localization = localization;
|
|
58
58
|
this.disabledDatesService = disabledDatesService;
|
|
@@ -219,9 +219,22 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
219
219
|
this.disabledDatesValidateFn = util_1.noop;
|
|
220
220
|
this.incompleteValidator = util_1.noop;
|
|
221
221
|
this.subscriptions = new rxjs_1.Subscription();
|
|
222
|
+
this._size = 'medium';
|
|
223
|
+
this._rounded = 'medium';
|
|
224
|
+
this._fillMode = 'solid';
|
|
222
225
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
223
226
|
}
|
|
224
227
|
DateTimePickerComponent_1 = DateTimePickerComponent;
|
|
228
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "disabledClass", {
|
|
229
|
+
/**
|
|
230
|
+
* @hidden
|
|
231
|
+
*/
|
|
232
|
+
get: function () {
|
|
233
|
+
return this.disabled;
|
|
234
|
+
},
|
|
235
|
+
enumerable: true,
|
|
236
|
+
configurable: true
|
|
237
|
+
});
|
|
225
238
|
Object.defineProperty(DateTimePickerComponent.prototype, "input", {
|
|
226
239
|
/**
|
|
227
240
|
* @hidden
|
|
@@ -402,10 +415,10 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
402
415
|
},
|
|
403
416
|
set: function (value) {
|
|
404
417
|
if (value) {
|
|
405
|
-
this.renderer.addClass(this.wrapper.nativeElement, 'k-
|
|
418
|
+
this.renderer.addClass(this.wrapper.nativeElement, 'k-focus');
|
|
406
419
|
}
|
|
407
420
|
else {
|
|
408
|
-
this.renderer.removeClass(this.wrapper.nativeElement, 'k-
|
|
421
|
+
this.renderer.removeClass(this.wrapper.nativeElement, 'k-focus');
|
|
409
422
|
}
|
|
410
423
|
this._isActive = value;
|
|
411
424
|
},
|
|
@@ -427,6 +440,85 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
427
440
|
enumerable: true,
|
|
428
441
|
configurable: true
|
|
429
442
|
});
|
|
443
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "size", {
|
|
444
|
+
get: function () {
|
|
445
|
+
return this._size;
|
|
446
|
+
},
|
|
447
|
+
/**
|
|
448
|
+
* Sets the size of the component.
|
|
449
|
+
*
|
|
450
|
+
* The possible values are:
|
|
451
|
+
* * `'small'`
|
|
452
|
+
* * `'medium'` (Default)
|
|
453
|
+
* * `'large'`
|
|
454
|
+
* * `null`
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
457
|
+
set: function (size) {
|
|
458
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
459
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, util_1.getSizeClass('input', this.size));
|
|
460
|
+
if (size) {
|
|
461
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', size));
|
|
462
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getSizeClass('input', size));
|
|
463
|
+
}
|
|
464
|
+
this._size = size;
|
|
465
|
+
},
|
|
466
|
+
enumerable: true,
|
|
467
|
+
configurable: true
|
|
468
|
+
});
|
|
469
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "rounded", {
|
|
470
|
+
get: function () {
|
|
471
|
+
return this._rounded;
|
|
472
|
+
},
|
|
473
|
+
/**
|
|
474
|
+
* Sets the border radius of the component.
|
|
475
|
+
*
|
|
476
|
+
* The possible values are:
|
|
477
|
+
* * `'small'`
|
|
478
|
+
* * `'medium'` (Default)
|
|
479
|
+
* * `'large'`
|
|
480
|
+
* * `'full'`
|
|
481
|
+
* * `null`
|
|
482
|
+
*
|
|
483
|
+
*/
|
|
484
|
+
set: function (rounded) {
|
|
485
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
486
|
+
if (rounded) {
|
|
487
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
|
|
488
|
+
}
|
|
489
|
+
this._rounded = rounded;
|
|
490
|
+
},
|
|
491
|
+
enumerable: true,
|
|
492
|
+
configurable: true
|
|
493
|
+
});
|
|
494
|
+
Object.defineProperty(DateTimePickerComponent.prototype, "fillMode", {
|
|
495
|
+
get: function () {
|
|
496
|
+
return this._fillMode;
|
|
497
|
+
},
|
|
498
|
+
/**
|
|
499
|
+
* Sets the fillMode of the component.
|
|
500
|
+
*
|
|
501
|
+
* The possible values are:
|
|
502
|
+
* * `'solid'` (Default)
|
|
503
|
+
* * `'flat'`
|
|
504
|
+
* * `'outline'`
|
|
505
|
+
* * `null`
|
|
506
|
+
*
|
|
507
|
+
*/
|
|
508
|
+
set: function (fillMode) {
|
|
509
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
510
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', this.fillMode));
|
|
511
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
512
|
+
if (fillMode) {
|
|
513
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', fillMode));
|
|
514
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', fillMode));
|
|
515
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
516
|
+
}
|
|
517
|
+
this._fillMode = fillMode;
|
|
518
|
+
},
|
|
519
|
+
enumerable: true,
|
|
520
|
+
configurable: true
|
|
521
|
+
});
|
|
430
522
|
Object.defineProperty(DateTimePickerComponent.prototype, "tabSwitchTransition", {
|
|
431
523
|
/**
|
|
432
524
|
* @hidden
|
|
@@ -517,6 +609,9 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
517
609
|
this.subscriptions.add(this.ngZone.runOutsideAngular(function () { return rxjs_1.fromEvent(window, 'blur').subscribe(_this.handleCancel.bind(_this)); }));
|
|
518
610
|
}
|
|
519
611
|
};
|
|
612
|
+
DateTimePickerComponent.prototype.ngAfterViewInit = function () {
|
|
613
|
+
this.setComponentClasses();
|
|
614
|
+
};
|
|
520
615
|
DateTimePickerComponent.prototype.ngOnChanges = function (changes) {
|
|
521
616
|
if (utils_1.isPresent(changes.min) || utils_1.isPresent(changes.max)) {
|
|
522
617
|
this.verifyMinMaxRange();
|
|
@@ -671,7 +766,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
671
766
|
return;
|
|
672
767
|
}
|
|
673
768
|
this.isActive = false;
|
|
674
|
-
var isNgControlUntouched = this.
|
|
769
|
+
var isNgControlUntouched = this.wrapper.nativeElement.classList.contains('ng-untouched');
|
|
675
770
|
var runInZone = isNgControlUntouched || kendo_angular_common_1.hasObservers(this.onBlur) || (this.isOpen && kendo_angular_common_1.hasObservers(this.close));
|
|
676
771
|
this.run(runInZone, function () {
|
|
677
772
|
_this.onBlur.emit();
|
|
@@ -799,6 +894,13 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
799
894
|
this.input.focus();
|
|
800
895
|
}
|
|
801
896
|
};
|
|
897
|
+
/**
|
|
898
|
+
* @hidden
|
|
899
|
+
*/
|
|
900
|
+
DateTimePickerComponent.prototype.popupButtonsClasses = function (type) {
|
|
901
|
+
var buttonType = type ? type : 'base';
|
|
902
|
+
return (this.size ? util_1.getSizeClass('button', this.size) : '') + " " + (this.rounded ? util_1.getRoundedClass(this.rounded) : '') + " " + (this.fillMode ? 'k-button-' + this.fillMode + ' ' + 'k-button-' + this.fillMode + '-' + buttonType : '');
|
|
903
|
+
};
|
|
802
904
|
/**
|
|
803
905
|
* @hidden
|
|
804
906
|
*
|
|
@@ -923,7 +1025,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
923
1025
|
};
|
|
924
1026
|
/**
|
|
925
1027
|
* Indicates whether the focus target is part of this component,
|
|
926
|
-
* that is, whether the focus target is inside the component
|
|
1028
|
+
* that is, whether the focus target is inside the component or in the popup.
|
|
927
1029
|
*/
|
|
928
1030
|
DateTimePickerComponent.prototype.focusTargetInComponent = function (event) {
|
|
929
1031
|
if (!utils_1.isPresent(event)) {
|
|
@@ -970,16 +1072,35 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
970
1072
|
this.cdr.markForCheck();
|
|
971
1073
|
this.ngZone.run(function () { return _this.onValidatorChange(); });
|
|
972
1074
|
};
|
|
1075
|
+
DateTimePickerComponent.prototype.setComponentClasses = function () {
|
|
1076
|
+
if (this.size) {
|
|
1077
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
1078
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getSizeClass('button', this.size));
|
|
1079
|
+
}
|
|
1080
|
+
if (this.rounded) {
|
|
1081
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
1082
|
+
}
|
|
1083
|
+
if (this.fillMode) {
|
|
1084
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
1085
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', this.fillMode));
|
|
1086
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
973
1089
|
var DateTimePickerComponent_1;
|
|
974
1090
|
tslib_1.__decorate([
|
|
975
|
-
core_1.HostBinding('class.k-widget'),
|
|
976
1091
|
core_1.HostBinding('class.k-datetimepicker'),
|
|
1092
|
+
core_1.HostBinding('class.k-input'),
|
|
977
1093
|
tslib_1.__metadata("design:type", Boolean)
|
|
978
1094
|
], DateTimePickerComponent.prototype, "hostClasses", void 0);
|
|
979
1095
|
tslib_1.__decorate([
|
|
980
|
-
core_1.
|
|
1096
|
+
core_1.HostBinding('class.k-disabled'),
|
|
1097
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
1098
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
1099
|
+
], DateTimePickerComponent.prototype, "disabledClass", null);
|
|
1100
|
+
tslib_1.__decorate([
|
|
1101
|
+
core_1.ViewChild('toggleButton', { static: true }),
|
|
981
1102
|
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
982
|
-
], DateTimePickerComponent.prototype, "
|
|
1103
|
+
], DateTimePickerComponent.prototype, "toggleButton", void 0);
|
|
983
1104
|
tslib_1.__decorate([
|
|
984
1105
|
core_1.Input(),
|
|
985
1106
|
tslib_1.__metadata("design:type", Date),
|
|
@@ -1108,6 +1229,21 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
1108
1229
|
tslib_1.__metadata("design:type", String),
|
|
1109
1230
|
tslib_1.__metadata("design:paramtypes", [String])
|
|
1110
1231
|
], DateTimePickerComponent.prototype, "defaultTab", null);
|
|
1232
|
+
tslib_1.__decorate([
|
|
1233
|
+
core_1.Input(),
|
|
1234
|
+
tslib_1.__metadata("design:type", String),
|
|
1235
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1236
|
+
], DateTimePickerComponent.prototype, "size", null);
|
|
1237
|
+
tslib_1.__decorate([
|
|
1238
|
+
core_1.Input(),
|
|
1239
|
+
tslib_1.__metadata("design:type", String),
|
|
1240
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1241
|
+
], DateTimePickerComponent.prototype, "rounded", null);
|
|
1242
|
+
tslib_1.__decorate([
|
|
1243
|
+
core_1.Input(),
|
|
1244
|
+
tslib_1.__metadata("design:type", String),
|
|
1245
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
1246
|
+
], DateTimePickerComponent.prototype, "fillMode", null);
|
|
1111
1247
|
tslib_1.__decorate([
|
|
1112
1248
|
core_1.ContentChild(cell_template_directive_1.CellTemplateDirective, { static: false }),
|
|
1113
1249
|
tslib_1.__metadata("design:type", cell_template_directive_1.CellTemplateDirective)
|
|
@@ -1158,7 +1294,7 @@ var DateTimePickerComponent = /** @class */ (function () {
|
|
|
1158
1294
|
{ provide: forms_1.NG_VALIDATORS, useExisting: core_1.forwardRef(function () { return DateTimePickerComponent_1; }), multi: true },
|
|
1159
1295
|
{ provide: kendo_angular_common_1.KendoInput, useExisting: core_1.forwardRef(function () { return DateTimePickerComponent_1; }) }
|
|
1160
1296
|
],
|
|
1161
|
-
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 "
|
|
1297
|
+
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 "
|
|
1162
1298
|
}),
|
|
1163
1299
|
tslib_1.__param(6, core_1.Inject(touch_enabled_1.TOUCH_ENABLED)),
|
|
1164
1300
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_popup_1.PopupService,
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-dateinputs',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1643622478,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|
|
@@ -11,23 +11,27 @@ var util_1 = require("../../util");
|
|
|
11
11
|
var div = util_1.domContainerFactory('div');
|
|
12
12
|
var ul = util_1.domContainerFactory('ul');
|
|
13
13
|
var li = util_1.domContainerFactory('li');
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var span = util_1.domContainerFactory('span');
|
|
15
|
+
var listTitle = function () { return span('hour', 'k-title k-timeselector-title'); };
|
|
16
|
+
var ɵ0 = listTitle;
|
|
16
17
|
exports.ɵ0 = ɵ0;
|
|
17
|
-
var
|
|
18
|
-
var ɵ1 =
|
|
18
|
+
var listItem = function () { return li('<span>02</span>', 'k-item'); };
|
|
19
|
+
var ɵ1 = listItem;
|
|
19
20
|
exports.ɵ1 = ɵ1;
|
|
20
|
-
var
|
|
21
|
-
var ɵ2 =
|
|
21
|
+
var list = function () { return ul([listItem()], 'k-reset'); };
|
|
22
|
+
var ɵ2 = list;
|
|
22
23
|
exports.ɵ2 = ɵ2;
|
|
24
|
+
var scrollable = function () { return (div([list()], 'k-time-container k-flex k-content k-calendar-content k-scrollable')); };
|
|
25
|
+
var ɵ3 = scrollable;
|
|
26
|
+
exports.ɵ3 = ɵ3;
|
|
23
27
|
var timeListWrapper = function () {
|
|
24
28
|
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
25
29
|
return null;
|
|
26
30
|
}
|
|
27
|
-
return div([div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
31
|
+
return div([listTitle(), div([scrollable()], 'k-time-list')], 'k-time-list-wrapper', { left: '-10000px', position: 'absolute' });
|
|
28
32
|
};
|
|
29
|
-
var ɵ
|
|
30
|
-
exports.ɵ
|
|
33
|
+
var ɵ4 = timeListWrapper;
|
|
34
|
+
exports.ɵ4 = ɵ4;
|
|
31
35
|
var TIMELIST_WRAPPER = timeListWrapper();
|
|
32
36
|
/**
|
|
33
37
|
* @hidden
|
|
@@ -48,7 +52,8 @@ var TimePickerDOMService = /** @class */ (function () {
|
|
|
48
52
|
var listContainer = container && container.querySelector('.k-time-list-container');
|
|
49
53
|
var hostContainer = listContainer || document.body;
|
|
50
54
|
var wrapper = hostContainer.appendChild(TIMELIST_WRAPPER);
|
|
51
|
-
this.
|
|
55
|
+
this.timeListTitleHeight = wrapper.querySelector('.k-timeselector-title').getBoundingClientRect().height;
|
|
56
|
+
this.timeListHeight = wrapper.getBoundingClientRect().height;
|
|
52
57
|
this.itemHeight = wrapper.querySelector('li').getBoundingClientRect().height;
|
|
53
58
|
hostContainer.removeChild(wrapper);
|
|
54
59
|
};
|
|
@@ -96,8 +96,9 @@ var TimeListComponent = /** @class */ (function () {
|
|
|
96
96
|
this.dom.ensureHeights();
|
|
97
97
|
this.itemHeight = this.dom.itemHeight;
|
|
98
98
|
this.listHeight = this.dom.timeListHeight;
|
|
99
|
-
|
|
100
|
-
this.
|
|
99
|
+
var titleHeight = this.dom.timeListTitleHeight;
|
|
100
|
+
this.topOffset = (this.listHeight - this.itemHeight - titleHeight) / 2;
|
|
101
|
+
this.bottomOffset = this.listHeight - this.itemHeight - titleHeight;
|
|
101
102
|
this.topThreshold = this.itemHeight * SNAP_THRESHOLD;
|
|
102
103
|
this.bottomThreshold = this.itemHeight * (1 - SNAP_THRESHOLD);
|
|
103
104
|
var translate = "translateY(" + this.topOffset + "px)";
|
|
@@ -31,12 +31,12 @@ var formatRegExp = new RegExp(time_part_default_1.TIME_PART.hour + "|" + time_pa
|
|
|
31
31
|
* Represents the [Kendo UI TimePicker component for Angular]({% slug overview_timepicker %}#toc-basic-usage).
|
|
32
32
|
*/
|
|
33
33
|
var TimePickerComponent = /** @class */ (function () {
|
|
34
|
-
function TimePickerComponent(zone, localization, cdr, popupService,
|
|
34
|
+
function TimePickerComponent(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, intl, touchEnabled) {
|
|
35
35
|
this.zone = zone;
|
|
36
36
|
this.localization = localization;
|
|
37
37
|
this.cdr = cdr;
|
|
38
38
|
this.popupService = popupService;
|
|
39
|
-
this.
|
|
39
|
+
this.wrapper = wrapper;
|
|
40
40
|
this.renderer = renderer;
|
|
41
41
|
this.injector = injector;
|
|
42
42
|
this.pickerService = pickerService;
|
|
@@ -198,6 +198,9 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
198
198
|
this._value = null;
|
|
199
199
|
this._active = false;
|
|
200
200
|
this.domEvents = [];
|
|
201
|
+
this._size = 'medium';
|
|
202
|
+
this._rounded = 'medium';
|
|
203
|
+
this._fillMode = 'solid';
|
|
201
204
|
kendo_licensing_1.validatePackage(package_metadata_1.packageMetadata);
|
|
202
205
|
this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
|
|
203
206
|
this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
|
|
@@ -308,6 +311,85 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
308
311
|
enumerable: true,
|
|
309
312
|
configurable: true
|
|
310
313
|
});
|
|
314
|
+
Object.defineProperty(TimePickerComponent.prototype, "size", {
|
|
315
|
+
get: function () {
|
|
316
|
+
return this._size;
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* Sets the size of the component.
|
|
320
|
+
*
|
|
321
|
+
* The possible values are:
|
|
322
|
+
* * `'small'`
|
|
323
|
+
* * `'medium'` (Default)
|
|
324
|
+
* * `'large'`
|
|
325
|
+
* * `null`
|
|
326
|
+
*
|
|
327
|
+
*/
|
|
328
|
+
set: function (size) {
|
|
329
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
330
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, util_1.getSizeClass('input', this.size));
|
|
331
|
+
if (size) {
|
|
332
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', size));
|
|
333
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getSizeClass('input', size));
|
|
334
|
+
}
|
|
335
|
+
this._size = size;
|
|
336
|
+
},
|
|
337
|
+
enumerable: true,
|
|
338
|
+
configurable: true
|
|
339
|
+
});
|
|
340
|
+
Object.defineProperty(TimePickerComponent.prototype, "rounded", {
|
|
341
|
+
get: function () {
|
|
342
|
+
return this._rounded;
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* Sets the border radius of the component.
|
|
346
|
+
*
|
|
347
|
+
* The possible values are:
|
|
348
|
+
* * `'small'`
|
|
349
|
+
* * `'medium'` (Default)
|
|
350
|
+
* * `'large'`
|
|
351
|
+
* * `'full'`
|
|
352
|
+
* * `null`
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
set: function (rounded) {
|
|
356
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
357
|
+
if (rounded) {
|
|
358
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(rounded));
|
|
359
|
+
}
|
|
360
|
+
this._rounded = rounded;
|
|
361
|
+
},
|
|
362
|
+
enumerable: true,
|
|
363
|
+
configurable: true
|
|
364
|
+
});
|
|
365
|
+
Object.defineProperty(TimePickerComponent.prototype, "fillMode", {
|
|
366
|
+
get: function () {
|
|
367
|
+
return this._fillMode;
|
|
368
|
+
},
|
|
369
|
+
/**
|
|
370
|
+
* Sets the fillMode of the component.
|
|
371
|
+
*
|
|
372
|
+
* The possible values are:
|
|
373
|
+
* * `'solid'` (Default)
|
|
374
|
+
* * `'flat'`
|
|
375
|
+
* * `'outline'`
|
|
376
|
+
* * `null`
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
379
|
+
set: function (fillMode) {
|
|
380
|
+
this.renderer.removeClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
381
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', this.fillMode));
|
|
382
|
+
this.renderer.removeClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
383
|
+
if (fillMode) {
|
|
384
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', fillMode));
|
|
385
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', fillMode));
|
|
386
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + fillMode + "-base");
|
|
387
|
+
}
|
|
388
|
+
this._fillMode = fillMode;
|
|
389
|
+
},
|
|
390
|
+
enumerable: true,
|
|
391
|
+
configurable: true
|
|
392
|
+
});
|
|
311
393
|
Object.defineProperty(TimePickerComponent.prototype, "disabledClass", {
|
|
312
394
|
/**
|
|
313
395
|
* @hidden
|
|
@@ -339,10 +421,10 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
339
421
|
}
|
|
340
422
|
var element = this.wrapper.nativeElement;
|
|
341
423
|
if (value) {
|
|
342
|
-
this.renderer.addClass(element, 'k-
|
|
424
|
+
this.renderer.addClass(element, 'k-focus');
|
|
343
425
|
}
|
|
344
426
|
else {
|
|
345
|
-
this.renderer.removeClass(element, 'k-
|
|
427
|
+
this.renderer.removeClass(element, 'k-focus');
|
|
346
428
|
}
|
|
347
429
|
},
|
|
348
430
|
enumerable: true,
|
|
@@ -399,13 +481,19 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
399
481
|
this.localizationChangeSubscription = this.localization
|
|
400
482
|
.changes.subscribe(function () { return _this.cdr.markForCheck(); });
|
|
401
483
|
this.control = this.injector.get(forms_1.NgControl, null);
|
|
402
|
-
if (this.
|
|
403
|
-
this.renderer.removeAttribute(this.
|
|
484
|
+
if (this.wrapper) {
|
|
485
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
404
486
|
this.zone.runOutsideAngular(function () {
|
|
405
487
|
_this.bindEvents();
|
|
406
488
|
});
|
|
407
489
|
}
|
|
408
490
|
};
|
|
491
|
+
/**
|
|
492
|
+
* @hidden
|
|
493
|
+
*/
|
|
494
|
+
TimePickerComponent.prototype.ngAfterViewInit = function () {
|
|
495
|
+
this.setComponentClasses();
|
|
496
|
+
};
|
|
409
497
|
/**
|
|
410
498
|
* @hidden
|
|
411
499
|
*/
|
|
@@ -718,7 +806,7 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
718
806
|
}
|
|
719
807
|
};
|
|
720
808
|
TimePickerComponent.prototype.bindEvents = function () {
|
|
721
|
-
var element = this.
|
|
809
|
+
var element = this.wrapper.nativeElement;
|
|
722
810
|
this.domEvents.push(this.renderer.listen(element, 'keydown', this.handleKeydown.bind(this)));
|
|
723
811
|
if (util_1.isWindowAvailable()) {
|
|
724
812
|
this.windowBlurSubscription = rxjs_1.fromEvent(window, 'blur').subscribe(this.handleWindowBlur.bind(this));
|
|
@@ -770,6 +858,20 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
770
858
|
this.cdr.markForCheck();
|
|
771
859
|
this.zone.run(function () { return _this.onValidatorChange(); });
|
|
772
860
|
};
|
|
861
|
+
TimePickerComponent.prototype.setComponentClasses = function () {
|
|
862
|
+
if (this.size) {
|
|
863
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getSizeClass('input', this.size));
|
|
864
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getSizeClass('button', this.size));
|
|
865
|
+
}
|
|
866
|
+
if (this.rounded) {
|
|
867
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getRoundedClass(this.rounded));
|
|
868
|
+
}
|
|
869
|
+
if (this.fillMode) {
|
|
870
|
+
this.renderer.addClass(this.wrapper.nativeElement, util_1.getFillModeClass('input', this.fillMode));
|
|
871
|
+
this.renderer.addClass(this.toggleButton.nativeElement, util_1.getFillModeClass('button', this.fillMode));
|
|
872
|
+
this.renderer.addClass(this.toggleButton.nativeElement, "k-button-" + this.fillMode + "-base");
|
|
873
|
+
}
|
|
874
|
+
};
|
|
773
875
|
var TimePickerComponent_1;
|
|
774
876
|
tslib_1.__decorate([
|
|
775
877
|
core_1.ViewChild('container', { read: core_1.ViewContainerRef, static: false }),
|
|
@@ -780,9 +882,9 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
780
882
|
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
781
883
|
], TimePickerComponent.prototype, "popupTemplate", void 0);
|
|
782
884
|
tslib_1.__decorate([
|
|
783
|
-
core_1.ViewChild('
|
|
885
|
+
core_1.ViewChild('toggleButton', { static: true }),
|
|
784
886
|
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
785
|
-
], TimePickerComponent.prototype, "
|
|
887
|
+
], TimePickerComponent.prototype, "toggleButton", void 0);
|
|
786
888
|
tslib_1.__decorate([
|
|
787
889
|
core_1.Input(),
|
|
788
890
|
tslib_1.__metadata("design:type", String)
|
|
@@ -865,6 +967,21 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
865
967
|
tslib_1.__metadata("design:type", Date),
|
|
866
968
|
tslib_1.__metadata("design:paramtypes", [Date])
|
|
867
969
|
], TimePickerComponent.prototype, "value", null);
|
|
970
|
+
tslib_1.__decorate([
|
|
971
|
+
core_1.Input(),
|
|
972
|
+
tslib_1.__metadata("design:type", String),
|
|
973
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
974
|
+
], TimePickerComponent.prototype, "size", null);
|
|
975
|
+
tslib_1.__decorate([
|
|
976
|
+
core_1.Input(),
|
|
977
|
+
tslib_1.__metadata("design:type", String),
|
|
978
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
979
|
+
], TimePickerComponent.prototype, "rounded", null);
|
|
980
|
+
tslib_1.__decorate([
|
|
981
|
+
core_1.Input(),
|
|
982
|
+
tslib_1.__metadata("design:type", String),
|
|
983
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
984
|
+
], TimePickerComponent.prototype, "fillMode", null);
|
|
868
985
|
tslib_1.__decorate([
|
|
869
986
|
core_1.Output(),
|
|
870
987
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
@@ -886,12 +1003,12 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
886
1003
|
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
887
1004
|
], TimePickerComponent.prototype, "close", void 0);
|
|
888
1005
|
tslib_1.__decorate([
|
|
889
|
-
core_1.HostBinding('class.k-widget'),
|
|
890
1006
|
core_1.HostBinding('class.k-timepicker'),
|
|
1007
|
+
core_1.HostBinding('class.k-input'),
|
|
891
1008
|
tslib_1.__metadata("design:type", Boolean)
|
|
892
1009
|
], TimePickerComponent.prototype, "wrapperClasses", void 0);
|
|
893
1010
|
tslib_1.__decorate([
|
|
894
|
-
core_1.HostBinding('class.k-
|
|
1011
|
+
core_1.HostBinding('class.k-disabled'),
|
|
895
1012
|
tslib_1.__metadata("design:type", Boolean),
|
|
896
1013
|
tslib_1.__metadata("design:paramtypes", [])
|
|
897
1014
|
], TimePickerComponent.prototype, "disabledClass", null);
|
|
@@ -911,7 +1028,7 @@ var TimePickerComponent = /** @class */ (function () {
|
|
|
911
1028
|
picker_service_1.PickerService
|
|
912
1029
|
],
|
|
913
1030
|
selector: 'kendo-timepicker',
|
|
914
|
-
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 <
|
|
1031
|
+
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 "
|
|
915
1032
|
}),
|
|
916
1033
|
tslib_1.__param(9, core_1.Optional()), tslib_1.__param(9, core_1.Inject(touch_enabled_1.TOUCH_ENABLED)),
|
|
917
1034
|
tslib_1.__metadata("design:paramtypes", [core_1.NgZone,
|