@progress/kendo-angular-dateinputs 5.3.1-dev.202112011809 → 6.0.0-dev.202201181611
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 +14 -2
- package/dist/es/calendar/header.component.js +1 -1
- package/dist/es/calendar/multiview-calendar.component.js +28 -12
- package/dist/es/calendar/multiview-calendar.module.js +9 -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 +130 -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.d.ts +7 -0
- package/dist/es2015/calendar/calendar.component.js +14 -2
- package/dist/es2015/calendar/header.component.js +4 -4
- package/dist/es2015/calendar/multiview-calendar.component.d.ts +8 -2
- package/dist/es2015/calendar/multiview-calendar.component.js +31 -11
- package/dist/es2015/calendar/multiview-calendar.module.js +9 -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 +155 -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 +821 -290
- package/dist/fesm5/index.js +663 -92
- package/dist/npm/calendar/calendar.component.js +14 -2
- package/dist/npm/calendar/header.component.js +1 -1
- package/dist/npm/calendar/multiview-calendar.component.js +27 -11
- package/dist/npm/calendar/multiview-calendar.module.js +9 -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 +129 -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 +2 -2
|
@@ -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,
|
|
@@ -417,7 +417,7 @@ var TimeSelectorComponent = /** @class */ (function () {
|
|
|
417
417
|
tslib_1.__metadata("design:type", Boolean)
|
|
418
418
|
], TimeSelectorComponent.prototype, "componentClass", void 0);
|
|
419
419
|
tslib_1.__decorate([
|
|
420
|
-
core_1.HostBinding('class.k-
|
|
420
|
+
core_1.HostBinding('class.k-disabled'),
|
|
421
421
|
tslib_1.__metadata("design:type", Boolean),
|
|
422
422
|
tslib_1.__metadata("design:paramtypes", [])
|
|
423
423
|
], TimeSelectorComponent.prototype, "disabledClass", null);
|
|
@@ -478,7 +478,7 @@ var TimeSelectorComponent = /** @class */ (function () {
|
|
|
478
478
|
}
|
|
479
479
|
],
|
|
480
480
|
selector: 'kendo-timeselector',
|
|
481
|
-
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\"
|
|
481
|
+
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 "
|
|
482
482
|
}),
|
|
483
483
|
tslib_1.__param(7, core_1.Optional()),
|
|
484
484
|
tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService,
|
package/dist/npm/util.js
CHANGED
|
@@ -360,3 +360,40 @@ exports.isTabExitingCalendar = function (calendarType, focusedElement, shiftKey)
|
|
|
360
360
|
(!shiftKey && focusedElement.classList.contains('k-next-view')) // exited on next button focused and regular tab
|
|
361
361
|
);
|
|
362
362
|
};
|
|
363
|
+
/**
|
|
364
|
+
* @hidden
|
|
365
|
+
* Returns the size class based on the component and size input.
|
|
366
|
+
*/
|
|
367
|
+
exports.getSizeClass = function (component, size) {
|
|
368
|
+
var SIZE_CLASSES = {
|
|
369
|
+
'small': "k-" + component + "-sm",
|
|
370
|
+
'medium': "k-" + component + "-md",
|
|
371
|
+
'large': "k-" + component + "-lg"
|
|
372
|
+
};
|
|
373
|
+
return SIZE_CLASSES[size];
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* @hidden
|
|
377
|
+
* Returns the rounded class based on the rounded input.
|
|
378
|
+
*/
|
|
379
|
+
exports.getRoundedClass = function (rounded) {
|
|
380
|
+
var ROUNDED_CLASSES = {
|
|
381
|
+
'small': 'k-rounded-sm',
|
|
382
|
+
'medium': 'k-rounded-md',
|
|
383
|
+
'large': 'k-rounded-lg',
|
|
384
|
+
'full': 'k-rounded-full'
|
|
385
|
+
};
|
|
386
|
+
return ROUNDED_CLASSES[rounded];
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* @hidden
|
|
390
|
+
* Return the fillMode class based on the component and fillMode input.
|
|
391
|
+
*/
|
|
392
|
+
exports.getFillModeClass = function (component, fillMode) {
|
|
393
|
+
var FILLMODE_CLASSES = {
|
|
394
|
+
'solid': "k-" + component + "-solid",
|
|
395
|
+
'flat': "k-" + component + "-flat",
|
|
396
|
+
'outline': "k-" + component + "-outline"
|
|
397
|
+
};
|
|
398
|
+
return FILLMODE_CLASSES[fillMode];
|
|
399
|
+
};
|