@progress/kendo-angular-dateinputs 13.0.0-develop.2 → 13.0.0-develop.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/horizontal-view-list.component.d.ts +1 -0
- package/calendar/models/keydown.interface.d.ts +8 -0
- package/calendar/multiview-calendar.component.d.ts +13 -1
- package/datepicker/datepicker.component.d.ts +1 -1
- package/daterange/date-range-popup.component.d.ts +15 -3
- package/datetimepicker/datetimepicker.component.d.ts +1 -5
- package/esm2020/calendar/calendar.component.mjs +1 -1
- package/esm2020/calendar/horizontal-view-list.component.mjs +13 -7
- package/esm2020/calendar/multiview-calendar.component.mjs +38 -4
- package/esm2020/dateinput/dateinput.component.mjs +1 -1
- package/esm2020/datepicker/datepicker.component.mjs +27 -22
- package/esm2020/daterange/date-range-input.mjs +0 -2
- package/esm2020/daterange/date-range-popup.component.mjs +61 -14
- package/esm2020/daterange/date-range.service.mjs +2 -2
- package/esm2020/datetimepicker/datetimepicker.component.mjs +53 -53
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/timepicker/timepicker.component.mjs +23 -18
- package/esm2020/timepicker/timeselector.component.mjs +32 -32
- package/fesm2015/progress-kendo-angular-dateinputs.mjs +266 -157
- package/fesm2020/progress-kendo-angular-dateinputs.mjs +253 -157
- package/package.json +11 -11
- package/timepicker/timepicker.component.d.ts +1 -1
|
@@ -443,7 +443,7 @@ export class TimePickerComponent {
|
|
|
443
443
|
this.toggleTimeSelector(show);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
get
|
|
446
|
+
get dateInput() {
|
|
447
447
|
return this.pickerService.input;
|
|
448
448
|
}
|
|
449
449
|
get timeSelector() {
|
|
@@ -457,7 +457,7 @@ export class TimePickerComponent {
|
|
|
457
457
|
* Used by the TextBoxContainer to determine if the component is empty
|
|
458
458
|
*/
|
|
459
459
|
isEmpty() {
|
|
460
|
-
return !this.value && this.
|
|
460
|
+
return !this.value && this.dateInput.isEmpty();
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
463
463
|
* @hidden
|
|
@@ -492,6 +492,9 @@ export class TimePickerComponent {
|
|
|
492
492
|
if (changes.format) {
|
|
493
493
|
this.verifyFormat();
|
|
494
494
|
}
|
|
495
|
+
if (!this.focusableId || changes.focusableId) {
|
|
496
|
+
this.focusableId = this.dateInput?.focusableId;
|
|
497
|
+
}
|
|
495
498
|
}
|
|
496
499
|
/**
|
|
497
500
|
* @hidden
|
|
@@ -537,9 +540,9 @@ export class TimePickerComponent {
|
|
|
537
540
|
this.verifyValue(value);
|
|
538
541
|
this.value = cloneDate(value);
|
|
539
542
|
this.cdr.markForCheck();
|
|
540
|
-
if (!value && this.
|
|
541
|
-
this.
|
|
542
|
-
this.
|
|
543
|
+
if (!value && this.dateInput) {
|
|
544
|
+
this.dateInput.placeholder = this.placeholder;
|
|
545
|
+
this.dateInput.writeValue(value);
|
|
543
546
|
}
|
|
544
547
|
}
|
|
545
548
|
/**
|
|
@@ -565,7 +568,7 @@ export class TimePickerComponent {
|
|
|
565
568
|
* @hidden
|
|
566
569
|
*/
|
|
567
570
|
validate(control) {
|
|
568
|
-
return this.timeRangeValidateFn(control) || this.incompleteValidator(control, this.
|
|
571
|
+
return this.timeRangeValidateFn(control) || this.incompleteValidator(control, this.dateInput && this.dateInput.isDateIncomplete);
|
|
569
572
|
}
|
|
570
573
|
/**
|
|
571
574
|
* @hidden
|
|
@@ -589,13 +592,13 @@ export class TimePickerComponent {
|
|
|
589
592
|
* ```
|
|
590
593
|
*/
|
|
591
594
|
focus() {
|
|
592
|
-
this.
|
|
595
|
+
this.dateInput.focus();
|
|
593
596
|
}
|
|
594
597
|
/**
|
|
595
598
|
* Blurs the TimePicker component.
|
|
596
599
|
*/
|
|
597
600
|
blur() {
|
|
598
|
-
(this.timeSelector || this.
|
|
601
|
+
(this.timeSelector || this.dateInput)['blur']();
|
|
599
602
|
}
|
|
600
603
|
/**
|
|
601
604
|
* Toggles the visibility of the popup or actionSheet.
|
|
@@ -668,7 +671,7 @@ export class TimePickerComponent {
|
|
|
668
671
|
* @hidden
|
|
669
672
|
*/
|
|
670
673
|
handleInputChange(value) {
|
|
671
|
-
const val = this.
|
|
674
|
+
const val = this.dateInput.formatSections['date'] ? value : this.mergeTime(value);
|
|
672
675
|
this.handleChange(val);
|
|
673
676
|
}
|
|
674
677
|
/**
|
|
@@ -779,12 +782,12 @@ export class TimePickerComponent {
|
|
|
779
782
|
this.actionSheet.toggle();
|
|
780
783
|
this.updateActionSheetAdaptiveAppearance();
|
|
781
784
|
this.renderer.setAttribute(this.actionSheet.element.nativeElement, 'id', this.popupUID);
|
|
782
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
785
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
783
786
|
}
|
|
784
787
|
else if (!show && this.isOpen) {
|
|
785
788
|
// Need to disable the pointer events to avoid triggering focus on the timelist when acionsheet close down animation starts
|
|
786
789
|
this.renderer.setStyle(this.timeSelector.element.nativeElement, 'pointer-events', 'none');
|
|
787
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
790
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
788
791
|
this.actionSheet.toggle();
|
|
789
792
|
}
|
|
790
793
|
this._show = show;
|
|
@@ -808,13 +811,13 @@ export class TimePickerComponent {
|
|
|
808
811
|
positionMode: 'absolute'
|
|
809
812
|
});
|
|
810
813
|
this.popupRef.popupElement.setAttribute('id', this.popupUID);
|
|
811
|
-
this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
814
|
+
this.renderer.setAttribute(this.dateInput?.inputElement, attributeNames.ariaControls, this.popupUID);
|
|
812
815
|
this.popupRef.popupAnchorViewportLeave.subscribe(() => this.show = false);
|
|
813
816
|
}
|
|
814
817
|
else {
|
|
815
818
|
this.popupRef.close();
|
|
816
819
|
this.popupRef = null;
|
|
817
|
-
this.renderer.removeAttribute(this.inputElement, attributeNames.ariaControls);
|
|
820
|
+
this.renderer.removeAttribute(this.dateInput?.inputElement, attributeNames.ariaControls);
|
|
818
821
|
}
|
|
819
822
|
}
|
|
820
823
|
updateActionSheetAdaptiveAppearance() {
|
|
@@ -840,7 +843,7 @@ export class TimePickerComponent {
|
|
|
840
843
|
if (this.touchEnabled) {
|
|
841
844
|
return;
|
|
842
845
|
}
|
|
843
|
-
this.
|
|
846
|
+
this.dateInput.focus();
|
|
844
847
|
}
|
|
845
848
|
toggleFocus() {
|
|
846
849
|
if (!this.isActive) {
|
|
@@ -855,9 +858,9 @@ export class TimePickerComponent {
|
|
|
855
858
|
}
|
|
856
859
|
}
|
|
857
860
|
else if (!this.touchEnabled) {
|
|
858
|
-
this.
|
|
861
|
+
this.dateInput.focus();
|
|
859
862
|
}
|
|
860
|
-
else if (!this.
|
|
863
|
+
else if (!this.dateInput.isActive) {
|
|
861
864
|
this.handleBlur();
|
|
862
865
|
}
|
|
863
866
|
}
|
|
@@ -906,7 +909,7 @@ export class TimePickerComponent {
|
|
|
906
909
|
const currentTarget = args && currentFocusTarget(args); // relatedTarget || activeElement
|
|
907
910
|
const target = args && args.target;
|
|
908
911
|
const isInsideActionSheet = this.actionSheet && (this.actionSheet.element.nativeElement.contains(target) || this.actionSheet.element.nativeElement.contains(currentTarget));
|
|
909
|
-
if (currentTarget && (this.
|
|
912
|
+
if (currentTarget && (this.dateInput.containsElement(currentTarget) ||
|
|
910
913
|
(this.timeSelector && this.timeSelector.containsElement(currentTarget)) || isInsideActionSheet)) {
|
|
911
914
|
return;
|
|
912
915
|
}
|
|
@@ -1053,6 +1056,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
1053
1056
|
#actionSheet
|
|
1054
1057
|
(overlayClick)="show=false"
|
|
1055
1058
|
(collapse)="handleActionSheetCollapse()"
|
|
1059
|
+
[titleId]="focusableId"
|
|
1056
1060
|
>
|
|
1057
1061
|
<ng-template kendoActionSheetTemplate>
|
|
1058
1062
|
<div class="k-actionsheet-titlebar">
|
|
@@ -1141,7 +1145,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
1141
1145
|
</kendo-timeselector-messages>
|
|
1142
1146
|
</kendo-timeselector>
|
|
1143
1147
|
</ng-template>
|
|
1144
|
-
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i11.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: i12.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i13.TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i14.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i14.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1148
|
+
`, isInline: true, components: [{ type: i6.DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i11.TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: i12.TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: i13.TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i14.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i14.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1145
1149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
1146
1150
|
type: Component,
|
|
1147
1151
|
args: [{
|
|
@@ -1255,6 +1259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1255
1259
|
#actionSheet
|
|
1256
1260
|
(overlayClick)="show=false"
|
|
1257
1261
|
(collapse)="handleActionSheetCollapse()"
|
|
1262
|
+
[titleId]="focusableId"
|
|
1258
1263
|
>
|
|
1259
1264
|
<ng-template kendoActionSheetTemplate>
|
|
1260
1265
|
<div class="k-actionsheet-titlebar">
|
|
@@ -482,22 +482,7 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
482
482
|
</div>
|
|
483
483
|
</ng-template>
|
|
484
484
|
</div>
|
|
485
|
-
<div class="k-time-footer k-
|
|
486
|
-
<button
|
|
487
|
-
#cancel
|
|
488
|
-
*ngIf="cancelButton"
|
|
489
|
-
class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
490
|
-
type="button"
|
|
491
|
-
[attr.title]="localization.get('cancelLabel')"
|
|
492
|
-
[attr.aria-label]="localization.get('cancelLabel')"
|
|
493
|
-
[kendoEventsOutsideAngular]="{
|
|
494
|
-
click: handleReject,
|
|
495
|
-
focus: handleFocus,
|
|
496
|
-
blur: handleBlur
|
|
497
|
-
}"
|
|
498
|
-
[scope]="this"
|
|
499
|
-
[disabled]="disabled"
|
|
500
|
-
>{{localization.get('cancel')}}</button>
|
|
485
|
+
<div class="k-time-footer k-actions k-actions-stretched k-actions-horizontal" *ngIf="setButton || cancelButton">
|
|
501
486
|
<button
|
|
502
487
|
#accept
|
|
503
488
|
*ngIf="setButton"
|
|
@@ -514,6 +499,21 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
514
499
|
[scope]="this"
|
|
515
500
|
[disabled]="disabled"
|
|
516
501
|
>{{localization.get('accept')}}</button>
|
|
502
|
+
<button
|
|
503
|
+
#cancel
|
|
504
|
+
*ngIf="cancelButton"
|
|
505
|
+
class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
506
|
+
type="button"
|
|
507
|
+
[attr.title]="localization.get('cancelLabel')"
|
|
508
|
+
[attr.aria-label]="localization.get('cancelLabel')"
|
|
509
|
+
[kendoEventsOutsideAngular]="{
|
|
510
|
+
click: handleReject,
|
|
511
|
+
focus: handleFocus,
|
|
512
|
+
blur: handleBlur
|
|
513
|
+
}"
|
|
514
|
+
[scope]="this"
|
|
515
|
+
[disabled]="disabled"
|
|
516
|
+
>{{localization.get('cancel')}}</button>
|
|
517
517
|
</div>
|
|
518
518
|
`, isInline: true, components: [{ type: i5.TimeListComponent, selector: "kendo-timelist", inputs: ["min", "max", "part", "step", "disabled", "value", "isLast"], outputs: ["valueChange", "tabOutLastPart"] }], directives: [{ type: i6.TimeSelectorLocalizedMessagesDirective, selector: "[kendoTimeSelectorLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
519
519
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimeSelectorComponent, decorators: [{
|
|
@@ -602,22 +602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
602
602
|
</div>
|
|
603
603
|
</ng-template>
|
|
604
604
|
</div>
|
|
605
|
-
<div class="k-time-footer k-
|
|
606
|
-
<button
|
|
607
|
-
#cancel
|
|
608
|
-
*ngIf="cancelButton"
|
|
609
|
-
class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
610
|
-
type="button"
|
|
611
|
-
[attr.title]="localization.get('cancelLabel')"
|
|
612
|
-
[attr.aria-label]="localization.get('cancelLabel')"
|
|
613
|
-
[kendoEventsOutsideAngular]="{
|
|
614
|
-
click: handleReject,
|
|
615
|
-
focus: handleFocus,
|
|
616
|
-
blur: handleBlur
|
|
617
|
-
}"
|
|
618
|
-
[scope]="this"
|
|
619
|
-
[disabled]="disabled"
|
|
620
|
-
>{{localization.get('cancel')}}</button>
|
|
605
|
+
<div class="k-time-footer k-actions k-actions-stretched k-actions-horizontal" *ngIf="setButton || cancelButton">
|
|
621
606
|
<button
|
|
622
607
|
#accept
|
|
623
608
|
*ngIf="setButton"
|
|
@@ -634,6 +619,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
634
619
|
[scope]="this"
|
|
635
620
|
[disabled]="disabled"
|
|
636
621
|
>{{localization.get('accept')}}</button>
|
|
622
|
+
<button
|
|
623
|
+
#cancel
|
|
624
|
+
*ngIf="cancelButton"
|
|
625
|
+
class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
|
|
626
|
+
type="button"
|
|
627
|
+
[attr.title]="localization.get('cancelLabel')"
|
|
628
|
+
[attr.aria-label]="localization.get('cancelLabel')"
|
|
629
|
+
[kendoEventsOutsideAngular]="{
|
|
630
|
+
click: handleReject,
|
|
631
|
+
focus: handleFocus,
|
|
632
|
+
blur: handleBlur
|
|
633
|
+
}"
|
|
634
|
+
[scope]="this"
|
|
635
|
+
[disabled]="disabled"
|
|
636
|
+
>{{localization.get('cancel')}}</button>
|
|
637
637
|
</div>
|
|
638
638
|
`
|
|
639
639
|
}]
|