@progress/kendo-angular-dateinputs 7.0.0-next.202204010857 → 7.0.0-next.202204011538
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-dateinputs.umd.js +1 -1
- package/calendar/calendar.component.d.ts +3 -0
- package/daterange/date-range-end-input.directive.d.ts +1 -2
- package/daterange/date-range-input.d.ts +1 -3
- package/daterange/date-range-popup.component.d.ts +2 -4
- package/daterange/date-range-start-input.directive.d.ts +1 -2
- package/daterange/date-range.service.d.ts +33 -0
- package/esm2015/calendar/calendar.component.js +3 -0
- package/esm2015/daterange/date-range-end-input.directive.js +4 -5
- package/esm2015/daterange/date-range-input.js +8 -11
- package/esm2015/daterange/date-range-popup.component.js +7 -9
- package/esm2015/daterange/date-range-start-input.directive.js +4 -5
- package/esm2015/daterange/date-range.component.js +2 -3
- package/esm2015/daterange/date-range.service.js +61 -0
- package/esm2015/main.js +0 -1
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-dateinputs.js +84 -105
- package/main.d.ts +0 -1
- package/package.json +2 -2
- package/daterange/date-range-popup.service.d.ts +0 -52
- package/esm2015/daterange/date-range-popup.service.js +0 -87
|
@@ -28,7 +28,7 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-dateinputs',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
31
|
+
publishDate: 1648827368,
|
|
32
32
|
version: '',
|
|
33
33
|
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'
|
|
34
34
|
};
|
|
@@ -5977,6 +5977,9 @@ class CalendarComponent {
|
|
|
5977
5977
|
}
|
|
5978
5978
|
this.emitFocus();
|
|
5979
5979
|
}
|
|
5980
|
+
/**
|
|
5981
|
+
* @hidden
|
|
5982
|
+
*/
|
|
5980
5983
|
handleMultiViewCalendarKeydown(args) {
|
|
5981
5984
|
// Prevent form from submitting on enter if used in datepicker (classic view)
|
|
5982
5985
|
if (isPresent(this.pickerService) && args.keyCode === Keys.Enter) {
|
|
@@ -13894,6 +13897,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13894
13897
|
}]
|
|
13895
13898
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
13896
13899
|
|
|
13900
|
+
const isActive = (cmp) => (cmp && cmp.isActive) || false;
|
|
13901
|
+
const hasActiveContent = (popup) => popup && popup.hasActiveContent();
|
|
13897
13902
|
/**
|
|
13898
13903
|
* A service that handles the communication between the components that are placed inside the DateRangeComponent.
|
|
13899
13904
|
* For example, the start and end `DateInput` and `DateRangePopup` components.
|
|
@@ -13918,6 +13923,10 @@ class DateRangeService {
|
|
|
13918
13923
|
* For example, when a new start `DateInput` is attached or the old one is detached.
|
|
13919
13924
|
*/
|
|
13920
13925
|
this.startInput$ = new BehaviorSubject(null);
|
|
13926
|
+
/**
|
|
13927
|
+
* An Observable instance that notifies when the `DateRangePopup` component is changed.
|
|
13928
|
+
*/
|
|
13929
|
+
this.dateRangePopup$ = new BehaviorSubject(null);
|
|
13921
13930
|
/**
|
|
13922
13931
|
* An Observable instance that notifies when the state of the selection range is changed.
|
|
13923
13932
|
*/
|
|
@@ -13955,73 +13964,6 @@ class DateRangeService {
|
|
|
13955
13964
|
get selectionRange() {
|
|
13956
13965
|
return this.range$.value;
|
|
13957
13966
|
}
|
|
13958
|
-
/**
|
|
13959
|
-
* Completes all observables to mitigate possible memory leaks.
|
|
13960
|
-
* Calls the method when a component that uses it is destroyed.
|
|
13961
|
-
*/
|
|
13962
|
-
destroy() {
|
|
13963
|
-
this.activeRangeEnd$.complete();
|
|
13964
|
-
this.focusedDate$.complete();
|
|
13965
|
-
this.endInput$.complete();
|
|
13966
|
-
this.startInput$.complete();
|
|
13967
|
-
this.range$.complete();
|
|
13968
|
-
}
|
|
13969
|
-
/**
|
|
13970
|
-
* Registers a new start `DateInput` component. Notifies all `startInput$` listeners.
|
|
13971
|
-
*/
|
|
13972
|
-
registerStartInput(startInput) {
|
|
13973
|
-
this.startInput$.next(startInput);
|
|
13974
|
-
}
|
|
13975
|
-
/**
|
|
13976
|
-
* Registers a new end `DateInput` component. Notifies all `endInput$` listeners.
|
|
13977
|
-
*/
|
|
13978
|
-
registerEndInput(endInput) {
|
|
13979
|
-
this.endInput$.next(endInput);
|
|
13980
|
-
}
|
|
13981
|
-
/**
|
|
13982
|
-
* Updates the `activeRangeEnd` value. Notifies all `activeRangeEnd$` listeners.
|
|
13983
|
-
*/
|
|
13984
|
-
setActiveRangeEnd(activeRange) {
|
|
13985
|
-
if (!activeRange || this.activeRangeEnd === activeRange) {
|
|
13986
|
-
return;
|
|
13987
|
-
}
|
|
13988
|
-
this.activeRangeEnd$.next(activeRange);
|
|
13989
|
-
}
|
|
13990
|
-
/**
|
|
13991
|
-
* Updates the focused date. Notifies all `focusedDate$` listeners.
|
|
13992
|
-
*/
|
|
13993
|
-
setFocusedDate(value) {
|
|
13994
|
-
if (isEqual(this.focusedDate$.value, value)) {
|
|
13995
|
-
return;
|
|
13996
|
-
}
|
|
13997
|
-
this.focusedDate$.next(value);
|
|
13998
|
-
}
|
|
13999
|
-
/**
|
|
14000
|
-
* Updates the selection range. Notifies all `range$` listeners.
|
|
14001
|
-
*/
|
|
14002
|
-
setRange(range = EMPTY_SELECTIONRANGE) {
|
|
14003
|
-
this.range$.next(range);
|
|
14004
|
-
}
|
|
14005
|
-
}
|
|
14006
|
-
DateRangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14007
|
-
DateRangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService });
|
|
14008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, decorators: [{
|
|
14009
|
-
type: Injectable
|
|
14010
|
-
}] });
|
|
14011
|
-
|
|
14012
|
-
const isActive = (cmp) => (cmp && cmp.isActive) || false;
|
|
14013
|
-
const hasActiveContent = (popup) => popup && popup.hasActiveContent();
|
|
14014
|
-
/**
|
|
14015
|
-
* A service that handles the communication between the components that are placed inside the DateRangeComponent.
|
|
14016
|
-
* For example, the start and end `DateInput` and `DateRangePopup` components.
|
|
14017
|
-
*/
|
|
14018
|
-
class DateRangePopupService {
|
|
14019
|
-
constructor() {
|
|
14020
|
-
/**
|
|
14021
|
-
* An Observable instance that notifies when the `DateRangePopup` component is changed.
|
|
14022
|
-
*/
|
|
14023
|
-
this.dateRangePopup$ = new BehaviorSubject(null);
|
|
14024
|
-
}
|
|
14025
13967
|
/**
|
|
14026
13968
|
* Activates the registered `DateRangePopup` component.
|
|
14027
13969
|
* The method opens the popup and focuses the calendar.
|
|
@@ -14057,19 +13999,43 @@ class DateRangePopupService {
|
|
|
14057
13999
|
}
|
|
14058
14000
|
dateRangePopup.cancelPopup();
|
|
14059
14001
|
}
|
|
14002
|
+
/**
|
|
14003
|
+
* Completes all observables to mitigate possible memory leaks.
|
|
14004
|
+
* Calls the method when a component that uses it is destroyed.
|
|
14005
|
+
*/
|
|
14006
|
+
destroy() {
|
|
14007
|
+
this.activeRangeEnd$.complete();
|
|
14008
|
+
this.dateRangePopup$.complete();
|
|
14009
|
+
this.focusedDate$.complete();
|
|
14010
|
+
this.endInput$.complete();
|
|
14011
|
+
this.startInput$.complete();
|
|
14012
|
+
this.range$.complete();
|
|
14013
|
+
}
|
|
14060
14014
|
/**
|
|
14061
14015
|
* Returns `true` when an active component that is placed inside the `DateRangeComponent` is detected.
|
|
14062
14016
|
* For example, the opened popup or the focused DateInput.
|
|
14063
14017
|
*
|
|
14064
14018
|
* @returns `true` if an active component is present.
|
|
14065
14019
|
*/
|
|
14066
|
-
hasActiveComponent(
|
|
14020
|
+
hasActiveComponent() {
|
|
14067
14021
|
const popup = this.dateRangePopup$.value;
|
|
14068
14022
|
const isPopup = isActive(popup);
|
|
14069
|
-
const isStart = isActive(
|
|
14070
|
-
const isEnd = isActive(
|
|
14023
|
+
const isStart = isActive(this.startInput$.value);
|
|
14024
|
+
const isEnd = isActive(this.endInput$.value);
|
|
14071
14025
|
return isPopup || isStart || isEnd || hasActiveContent(popup) || false;
|
|
14072
14026
|
}
|
|
14027
|
+
/**
|
|
14028
|
+
* Registers a new start `DateInput` component. Notifies all `startInput$` listeners.
|
|
14029
|
+
*/
|
|
14030
|
+
registerStartInput(startInput) {
|
|
14031
|
+
this.startInput$.next(startInput);
|
|
14032
|
+
}
|
|
14033
|
+
/**
|
|
14034
|
+
* Registers a new end `DateInput` component. Notifies all `endInput$` listeners.
|
|
14035
|
+
*/
|
|
14036
|
+
registerEndInput(endInput) {
|
|
14037
|
+
this.endInput$.next(endInput);
|
|
14038
|
+
}
|
|
14073
14039
|
/**
|
|
14074
14040
|
* Registers a new `DateRangePopup` component. Notifies all `dateRangePopup$` listeners.
|
|
14075
14041
|
*/
|
|
@@ -14077,16 +14043,33 @@ class DateRangePopupService {
|
|
|
14077
14043
|
this.dateRangePopup$.next(dateRangePopup);
|
|
14078
14044
|
}
|
|
14079
14045
|
/**
|
|
14080
|
-
*
|
|
14081
|
-
* Calls the method when a component that uses it is destroyed.
|
|
14046
|
+
* Updates the `activeRangeEnd` value. Notifies all `activeRangeEnd$` listeners.
|
|
14082
14047
|
*/
|
|
14083
|
-
|
|
14084
|
-
this.
|
|
14048
|
+
setActiveRangeEnd(activeRange) {
|
|
14049
|
+
if (!activeRange || this.activeRangeEnd === activeRange) {
|
|
14050
|
+
return;
|
|
14051
|
+
}
|
|
14052
|
+
this.activeRangeEnd$.next(activeRange);
|
|
14053
|
+
}
|
|
14054
|
+
/**
|
|
14055
|
+
* Updates the focused date. Notifies all `focusedDate$` listeners.
|
|
14056
|
+
*/
|
|
14057
|
+
setFocusedDate(value) {
|
|
14058
|
+
if (isEqual(this.focusedDate$.value, value)) {
|
|
14059
|
+
return;
|
|
14060
|
+
}
|
|
14061
|
+
this.focusedDate$.next(value);
|
|
14062
|
+
}
|
|
14063
|
+
/**
|
|
14064
|
+
* Updates the selection range. Notifies all `range$` listeners.
|
|
14065
|
+
*/
|
|
14066
|
+
setRange(range = EMPTY_SELECTIONRANGE) {
|
|
14067
|
+
this.range$.next(range);
|
|
14085
14068
|
}
|
|
14086
14069
|
}
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type:
|
|
14070
|
+
DateRangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
14071
|
+
DateRangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService });
|
|
14072
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeService, decorators: [{
|
|
14090
14073
|
type: Injectable
|
|
14091
14074
|
}] });
|
|
14092
14075
|
|
|
@@ -14296,10 +14279,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14296
14279
|
* ```
|
|
14297
14280
|
*/
|
|
14298
14281
|
class DateRangePopupComponent {
|
|
14299
|
-
constructor(popupService, dateRangeService,
|
|
14282
|
+
constructor(popupService, dateRangeService, ref, zone, rtl) {
|
|
14300
14283
|
this.popupService = popupService;
|
|
14301
14284
|
this.dateRangeService = dateRangeService;
|
|
14302
|
-
this.dateRangePopupService = dateRangePopupService;
|
|
14303
14285
|
this.ref = ref;
|
|
14304
14286
|
this.zone = zone;
|
|
14305
14287
|
this.rtl = rtl;
|
|
@@ -14392,7 +14374,7 @@ class DateRangePopupComponent {
|
|
|
14392
14374
|
return this._show;
|
|
14393
14375
|
}
|
|
14394
14376
|
ngOnInit() {
|
|
14395
|
-
this.
|
|
14377
|
+
this.dateRangeService.registerPopup(this);
|
|
14396
14378
|
}
|
|
14397
14379
|
ngAfterViewInit() {
|
|
14398
14380
|
this.calendarSubscriptions.add(this.contentCalendar.changes.subscribe((changes) => this.calendar = changes.first));
|
|
@@ -14551,7 +14533,7 @@ class DateRangePopupComponent {
|
|
|
14551
14533
|
}
|
|
14552
14534
|
}
|
|
14553
14535
|
}
|
|
14554
|
-
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i2.PopupService }, { token: DateRangeService }, { token:
|
|
14536
|
+
DateRangePopupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i2.PopupService }, { token: DateRangeService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
14555
14537
|
DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: { animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: DateRangePopupTemplateDirective, descendants: true }, { propertyName: "contentCalendar", predicate: MultiViewCalendarComponent }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef }, { propertyName: "defaultTemplate", first: true, predicate: ["defaultTemplate"], descendants: true }, { propertyName: "viewCalendar", predicate: MultiViewCalendarComponent, descendants: true }], exportAs: ["kendo-daterange-popup"], ngImport: i0, template: `
|
|
14556
14538
|
<ng-container #container></ng-container>
|
|
14557
14539
|
<ng-template #defaultTemplate>
|
|
@@ -14570,7 +14552,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14570
14552
|
</ng-template>
|
|
14571
14553
|
`
|
|
14572
14554
|
}]
|
|
14573
|
-
}], ctorParameters: function () { return [{ type: i2.PopupService }, { type: DateRangeService }, { type:
|
|
14555
|
+
}], ctorParameters: function () { return [{ type: i2.PopupService }, { type: DateRangeService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
14574
14556
|
type: Optional
|
|
14575
14557
|
}, {
|
|
14576
14558
|
type: Inject,
|
|
@@ -14661,14 +14643,14 @@ class DateRangeComponent {
|
|
|
14661
14643
|
}
|
|
14662
14644
|
}
|
|
14663
14645
|
DateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14664
|
-
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "kendo-daterange", providers: [DateRangeService
|
|
14646
|
+
DateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeComponent, selector: "kendo-daterange", providers: [DateRangeService], queries: [{ propertyName: "contentPopup", predicate: DateRangePopupComponent }], ngImport: i0, template: `
|
|
14665
14647
|
<ng-content></ng-content>
|
|
14666
14648
|
<kendo-daterange-popup *ngIf="showDefault"></kendo-daterange-popup>
|
|
14667
14649
|
`, isInline: true, components: [{ type: DateRangePopupComponent, selector: "kendo-daterange-popup", inputs: ["animate", "anchor", "anchorAlign", "appendTo", "collision", "popupAlign", "margin"], outputs: ["open", "close", "blur", "focus", "cancel"], exportAs: ["kendo-daterange-popup"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
14668
14650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeComponent, decorators: [{
|
|
14669
14651
|
type: Component,
|
|
14670
14652
|
args: [{
|
|
14671
|
-
providers: [DateRangeService
|
|
14653
|
+
providers: [DateRangeService],
|
|
14672
14654
|
selector: 'kendo-daterange',
|
|
14673
14655
|
template: `
|
|
14674
14656
|
<ng-content></ng-content>
|
|
@@ -14684,10 +14666,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14684
14666
|
* @hidden
|
|
14685
14667
|
*/
|
|
14686
14668
|
class DateRangeInput {
|
|
14687
|
-
constructor(activeRangeEnd, dateRangeService,
|
|
14669
|
+
constructor(activeRangeEnd, dateRangeService, input, element, renderer, zone) {
|
|
14688
14670
|
this.activeRangeEnd = activeRangeEnd;
|
|
14689
14671
|
this.dateRangeService = dateRangeService;
|
|
14690
|
-
this.dateRangePopupService = dateRangePopupService;
|
|
14691
14672
|
this.input = input;
|
|
14692
14673
|
this.element = element;
|
|
14693
14674
|
this.renderer = renderer;
|
|
@@ -14700,7 +14681,7 @@ class DateRangeInput {
|
|
|
14700
14681
|
return this.dateRangeService.activeRangeEnd === this.activeRangeEnd;
|
|
14701
14682
|
}
|
|
14702
14683
|
get popupCalendarActivated() {
|
|
14703
|
-
const popup = this.
|
|
14684
|
+
const popup = this.dateRangeService.dateRangePopup$.value;
|
|
14704
14685
|
return isPresent(popup) && isPresent(popup.calendar);
|
|
14705
14686
|
}
|
|
14706
14687
|
init() {
|
|
@@ -14717,7 +14698,7 @@ class DateRangeInput {
|
|
|
14717
14698
|
}
|
|
14718
14699
|
this.toggleActiveClass(this.isActiveEnd);
|
|
14719
14700
|
}),
|
|
14720
|
-
this.
|
|
14701
|
+
this.dateRangeService.dateRangePopup$.subscribe(popup => this.initPopup(popup)),
|
|
14721
14702
|
this.dateRangeService.range$.subscribe(range => this.updateInputValue(range)),
|
|
14722
14703
|
fromEvent(this.element.nativeElement, 'click').subscribe(() => this.activate()),
|
|
14723
14704
|
fromEvent(this.element.nativeElement, 'keydown').subscribe((event) => this.togglePopup(event || {}))
|
|
@@ -14747,19 +14728,17 @@ class DateRangeInput {
|
|
|
14747
14728
|
}
|
|
14748
14729
|
activate() {
|
|
14749
14730
|
this.dateRangeService.setActiveRangeEnd(this.activeRangeEnd);
|
|
14750
|
-
this.
|
|
14731
|
+
this.dateRangeService.activatePopup();
|
|
14751
14732
|
}
|
|
14752
14733
|
deactivate() {
|
|
14753
14734
|
this.zone.runOutsideAngular(() => {
|
|
14754
14735
|
setTimeout(() => {
|
|
14755
14736
|
this.updateRange(this.input.value, 'blur');
|
|
14756
|
-
|
|
14757
|
-
const endInputValue = this.dateRangeService.endInput$.value;
|
|
14758
|
-
if (this.dateRangePopupService.hasActiveComponent(startInputValue, endInputValue)) {
|
|
14737
|
+
if (this.dateRangeService.hasActiveComponent()) {
|
|
14759
14738
|
return;
|
|
14760
14739
|
}
|
|
14761
14740
|
this.toggleActiveClass(false);
|
|
14762
|
-
this.zone.run(() => this.
|
|
14741
|
+
this.zone.run(() => this.dateRangeService.deactivatePopup());
|
|
14763
14742
|
});
|
|
14764
14743
|
});
|
|
14765
14744
|
}
|
|
@@ -14772,10 +14751,10 @@ class DateRangeInput {
|
|
|
14772
14751
|
}
|
|
14773
14752
|
togglePopup({ altKey, keyCode }) {
|
|
14774
14753
|
if (keyCode === Keys.Escape) {
|
|
14775
|
-
this.
|
|
14754
|
+
this.dateRangeService.cancelPopup();
|
|
14776
14755
|
}
|
|
14777
14756
|
else if (altKey && keyCode === Keys.ArrowDown) {
|
|
14778
|
-
this.
|
|
14757
|
+
this.dateRangeService.activatePopup();
|
|
14779
14758
|
}
|
|
14780
14759
|
}
|
|
14781
14760
|
focusActiveDate() {
|
|
@@ -14798,8 +14777,8 @@ class DateRangeInput {
|
|
|
14798
14777
|
* > You can use the DateRangeEndInputDirective only with a DateInput component.
|
|
14799
14778
|
*/
|
|
14800
14779
|
class DateRangeEndInputDirective extends DateRangeInput {
|
|
14801
|
-
constructor(rangeService, dateInput,
|
|
14802
|
-
super('end', rangeService,
|
|
14780
|
+
constructor(rangeService, dateInput, element, renderer, zone) {
|
|
14781
|
+
super('end', rangeService, dateInput, element, renderer, zone);
|
|
14803
14782
|
this.rangeService = rangeService;
|
|
14804
14783
|
this.dateInput = dateInput;
|
|
14805
14784
|
/**
|
|
@@ -14854,14 +14833,14 @@ class DateRangeEndInputDirective extends DateRangeInput {
|
|
|
14854
14833
|
this.dateInput.notify();
|
|
14855
14834
|
}
|
|
14856
14835
|
}
|
|
14857
|
-
DateRangeEndInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, deps: [{ token: DateRangeService }, { token: DateInputComponent }, { token:
|
|
14836
|
+
DateRangeEndInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, deps: [{ token: DateRangeService }, { token: DateInputComponent }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14858
14837
|
DateRangeEndInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeEndInputDirective, selector: "[kendoDateRangeEndInput]", inputs: { autoCorrectOn: "autoCorrectOn", navigateCalendarOnFocus: "navigateCalendarOnFocus" }, usesInheritance: true, ngImport: i0 });
|
|
14859
14838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeEndInputDirective, decorators: [{
|
|
14860
14839
|
type: Directive,
|
|
14861
14840
|
args: [{
|
|
14862
14841
|
selector: '[kendoDateRangeEndInput]'
|
|
14863
14842
|
}]
|
|
14864
|
-
}], ctorParameters: function () { return [{ type: DateRangeService }, { type: DateInputComponent }, { type:
|
|
14843
|
+
}], ctorParameters: function () { return [{ type: DateRangeService }, { type: DateInputComponent }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { autoCorrectOn: [{
|
|
14865
14844
|
type: Input
|
|
14866
14845
|
}], navigateCalendarOnFocus: [{
|
|
14867
14846
|
type: Input
|
|
@@ -14873,8 +14852,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
14873
14852
|
* > You can use the DateRangeStartInputDirective only with a DateInput component.
|
|
14874
14853
|
*/
|
|
14875
14854
|
class DateRangeStartInputDirective extends DateRangeInput {
|
|
14876
|
-
constructor(rangeService, dateInput,
|
|
14877
|
-
super('start', rangeService,
|
|
14855
|
+
constructor(rangeService, dateInput, element, renderer, zone) {
|
|
14856
|
+
super('start', rangeService, dateInput, element, renderer, zone);
|
|
14878
14857
|
this.rangeService = rangeService;
|
|
14879
14858
|
this.dateInput = dateInput;
|
|
14880
14859
|
/**
|
|
@@ -14930,14 +14909,14 @@ class DateRangeStartInputDirective extends DateRangeInput {
|
|
|
14930
14909
|
this.dateInput.notify();
|
|
14931
14910
|
}
|
|
14932
14911
|
}
|
|
14933
|
-
DateRangeStartInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeStartInputDirective, deps: [{ token: DateRangeService }, { token: DateInputComponent }, { token:
|
|
14912
|
+
DateRangeStartInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeStartInputDirective, deps: [{ token: DateRangeService }, { token: DateInputComponent }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
14934
14913
|
DateRangeStartInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DateRangeStartInputDirective, selector: "[kendoDateRangeStartInput]", inputs: { autoCorrectOn: "autoCorrectOn", navigateCalendarOnFocus: "navigateCalendarOnFocus" }, usesInheritance: true, ngImport: i0 });
|
|
14935
14914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangeStartInputDirective, decorators: [{
|
|
14936
14915
|
type: Directive,
|
|
14937
14916
|
args: [{
|
|
14938
14917
|
selector: '[kendoDateRangeStartInput]'
|
|
14939
14918
|
}]
|
|
14940
|
-
}], ctorParameters: function () { return [{ type: DateRangeService }, { type: DateInputComponent }, { type:
|
|
14919
|
+
}], ctorParameters: function () { return [{ type: DateRangeService }, { type: DateInputComponent }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { autoCorrectOn: [{
|
|
14941
14920
|
type: Input
|
|
14942
14921
|
}], navigateCalendarOnFocus: [{
|
|
14943
14922
|
type: Input
|
|
@@ -15835,5 +15814,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
15835
15814
|
* Generated bundle index. Do not edit.
|
|
15836
15815
|
*/
|
|
15837
15816
|
|
|
15838
|
-
export { CalendarCommonModule, CalendarComponent, CalendarCustomMessagesComponent, CalendarLocalizedMessagesDirective, CalendarModule, CalendarsModule, CellTemplateDirective, CenturyCellTemplateDirective, DateInputComponent, DateInputCustomMessagesComponent, DateInputLocalizedMessagesDirective, DateInputModule, DateInputsModule, DatePickerComponent, DatePickerCustomMessagesComponent, DatePickerLocalizedMessagesDirective, DatePickerModule, DateRangeComponent, DateRangeEndInputDirective, DateRangeModule, DateRangePopupComponent,
|
|
15817
|
+
export { CalendarCommonModule, CalendarComponent, CalendarCustomMessagesComponent, CalendarLocalizedMessagesDirective, CalendarModule, CalendarsModule, CellTemplateDirective, CenturyCellTemplateDirective, DateInputComponent, DateInputCustomMessagesComponent, DateInputLocalizedMessagesDirective, DateInputModule, DateInputsModule, DatePickerComponent, DatePickerCustomMessagesComponent, DatePickerLocalizedMessagesDirective, DatePickerModule, DateRangeComponent, DateRangeEndInputDirective, DateRangeModule, DateRangePopupComponent, DateRangePopupTemplateDirective, DateRangeSelectionDirective, DateRangeService, DateRangeStartInputDirective, DateTimePickerComponent, DateTimePickerCustomMessagesComponent, DateTimePickerModule, DecadeCellTemplateDirective, HeaderComponent, HeaderTitleTemplateDirective, HorizontalViewListComponent, KForOf, LocalizedMessagesDirective, MonthCellTemplateDirective, MultiViewCalendarComponent, MultiViewCalendarCustomMessagesComponent, MultiViewCalendarLocalizedMessagesDirective, MultiViewCalendarModule, NavigationComponent, NavigationItemTemplateDirective, PreventableEvent, TemplatesModule, TimeListComponent, TimePickerComponent, TimePickerCustomMessagesComponent, TimePickerLocalizedMessagesDirective, TimePickerModule, TimeSelectorComponent, TimeSelectorCustomMessagesComponent, TimeSelectorLocalizedMessagesDirective, ViewComponent, ViewListComponent, WeekNumberCellTemplateDirective, YearCellTemplateDirective };
|
|
15839
15818
|
|
package/main.d.ts
CHANGED
|
@@ -42,7 +42,6 @@ export { DateTimePickerModule } from './datetimepicker/datetimepicker.module';
|
|
|
42
42
|
export { MultiViewCalendarModule } from './calendar/multiview-calendar.module';
|
|
43
43
|
export { DateRangeModule } from './daterange/date-range.module';
|
|
44
44
|
export { DateRangeService } from './daterange/date-range.service';
|
|
45
|
-
export { DateRangePopupService } from './daterange/date-range-popup.service';
|
|
46
45
|
export { CalendarCustomMessagesComponent } from './calendar/localization/calendar-custom-messages.component';
|
|
47
46
|
export { DateInputCustomMessagesComponent } from './dateinput/localization/dateinput-custom-messages.component';
|
|
48
47
|
export { DatePickerCustomMessagesComponent } from './datepicker/localization/datepicker-custom-messages.component';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-dateinputs",
|
|
3
|
-
"version": "7.0.0-next.
|
|
3
|
+
"version": "7.0.0-next.202204011538",
|
|
4
4
|
"description": "Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@progress/kendo-common": "^0.2.0",
|
|
36
36
|
"@progress/kendo-date-math": "^1.1.0",
|
|
37
|
-
"@progress/kendo-schematics": "
|
|
37
|
+
"@progress/kendo-schematics": "^3.0.0",
|
|
38
38
|
"tslib": "^2.3.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { BehaviorSubject } from 'rxjs';
|
|
6
|
-
import { DateRangePopupComponent } from './date-range-popup.component';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* A service that handles the communication between the components that are placed inside the DateRangeComponent.
|
|
10
|
-
* For example, the start and end `DateInput` and `DateRangePopup` components.
|
|
11
|
-
*/
|
|
12
|
-
export declare class DateRangePopupService {
|
|
13
|
-
/**
|
|
14
|
-
* An Observable instance that notifies when the `DateRangePopup` component is changed.
|
|
15
|
-
*/
|
|
16
|
-
dateRangePopup$: BehaviorSubject<DateRangePopupComponent>;
|
|
17
|
-
/**
|
|
18
|
-
* Activates the registered `DateRangePopup` component.
|
|
19
|
-
* The method opens the popup and focuses the calendar.
|
|
20
|
-
*/
|
|
21
|
-
activatePopup(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Deactivates the registered `DateRangePopup` component.
|
|
24
|
-
* The method closes the popup.
|
|
25
|
-
*/
|
|
26
|
-
deactivatePopup(): void;
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
*
|
|
30
|
-
* Deactivates the registered `DateRangePopup` component and fires the `cancel` event.
|
|
31
|
-
* The method closes the popup.
|
|
32
|
-
*/
|
|
33
|
-
cancelPopup(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Returns `true` when an active component that is placed inside the `DateRangeComponent` is detected.
|
|
36
|
-
* For example, the opened popup or the focused DateInput.
|
|
37
|
-
*
|
|
38
|
-
* @returns `true` if an active component is present.
|
|
39
|
-
*/
|
|
40
|
-
hasActiveComponent(startInputValue: any, endInputValue: any): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Registers a new `DateRangePopup` component. Notifies all `dateRangePopup$` listeners.
|
|
43
|
-
*/
|
|
44
|
-
registerPopup(dateRangePopup: DateRangePopupComponent): void;
|
|
45
|
-
/**
|
|
46
|
-
* Completes all observables to mitigate possible memory leaks.
|
|
47
|
-
* Calls the method when a component that uses it is destroyed.
|
|
48
|
-
*/
|
|
49
|
-
destroy(): void;
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupService, never>;
|
|
51
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DateRangePopupService>;
|
|
52
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import { BehaviorSubject } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
const isActive = (cmp) => (cmp && cmp.isActive) || false;
|
|
9
|
-
const hasActiveContent = (popup) => popup && popup.hasActiveContent();
|
|
10
|
-
/**
|
|
11
|
-
* A service that handles the communication between the components that are placed inside the DateRangeComponent.
|
|
12
|
-
* For example, the start and end `DateInput` and `DateRangePopup` components.
|
|
13
|
-
*/
|
|
14
|
-
export class DateRangePopupService {
|
|
15
|
-
constructor() {
|
|
16
|
-
/**
|
|
17
|
-
* An Observable instance that notifies when the `DateRangePopup` component is changed.
|
|
18
|
-
*/
|
|
19
|
-
this.dateRangePopup$ = new BehaviorSubject(null);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Activates the registered `DateRangePopup` component.
|
|
23
|
-
* The method opens the popup and focuses the calendar.
|
|
24
|
-
*/
|
|
25
|
-
activatePopup() {
|
|
26
|
-
const dateRangePopup = this.dateRangePopup$.value;
|
|
27
|
-
if (!dateRangePopup) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
dateRangePopup.activate();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Deactivates the registered `DateRangePopup` component.
|
|
34
|
-
* The method closes the popup.
|
|
35
|
-
*/
|
|
36
|
-
deactivatePopup() {
|
|
37
|
-
const dateRangePopup = this.dateRangePopup$.value;
|
|
38
|
-
if (!(dateRangePopup && dateRangePopup.show)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
dateRangePopup.show = false;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*
|
|
46
|
-
* Deactivates the registered `DateRangePopup` component and fires the `cancel` event.
|
|
47
|
-
* The method closes the popup.
|
|
48
|
-
*/
|
|
49
|
-
cancelPopup() {
|
|
50
|
-
const dateRangePopup = this.dateRangePopup$.value;
|
|
51
|
-
if (!(dateRangePopup && dateRangePopup.show)) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
dateRangePopup.cancelPopup();
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns `true` when an active component that is placed inside the `DateRangeComponent` is detected.
|
|
58
|
-
* For example, the opened popup or the focused DateInput.
|
|
59
|
-
*
|
|
60
|
-
* @returns `true` if an active component is present.
|
|
61
|
-
*/
|
|
62
|
-
hasActiveComponent(startInputValue, endInputValue) {
|
|
63
|
-
const popup = this.dateRangePopup$.value;
|
|
64
|
-
const isPopup = isActive(popup);
|
|
65
|
-
const isStart = isActive(startInputValue);
|
|
66
|
-
const isEnd = isActive(endInputValue);
|
|
67
|
-
return isPopup || isStart || isEnd || hasActiveContent(popup) || false;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Registers a new `DateRangePopup` component. Notifies all `dateRangePopup$` listeners.
|
|
71
|
-
*/
|
|
72
|
-
registerPopup(dateRangePopup) {
|
|
73
|
-
this.dateRangePopup$.next(dateRangePopup);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Completes all observables to mitigate possible memory leaks.
|
|
77
|
-
* Calls the method when a component that uses it is destroyed.
|
|
78
|
-
*/
|
|
79
|
-
destroy() {
|
|
80
|
-
this.dateRangePopup$.complete();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
DateRangePopupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
-
DateRangePopupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupService });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DateRangePopupService, decorators: [{
|
|
86
|
-
type: Injectable
|
|
87
|
-
}] });
|