@wlcm/angular 17.5.13 → 17.5.15
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/core/esm2022/index.mjs +7 -4
- package/core/esm2022/lib/components/default-loader/default-loader.component.mjs +12 -0
- package/core/esm2022/lib/components/{calendar-icon → icons/calendar-icon}/calendar-icon.component.mjs +1 -1
- package/core/esm2022/lib/components/{chevron-down-icon → icons/chevron-down-icon}/chevron-down-icon.component.mjs +1 -1
- package/core/esm2022/lib/components/{close-icon → icons/close-icon}/close-icon.component.mjs +1 -1
- package/core/esm2022/lib/components/{search-icon → icons/search-icon}/search-icon.component.mjs +1 -1
- package/core/esm2022/lib/components/loader/loader.component.mjs +32 -0
- package/core/esm2022/lib/constants/icon.contants.mjs +4 -4
- package/core/esm2022/lib/constants/loader.constants.mjs +7 -0
- package/core/esm2022/lib/directives/icon.directive.mjs +2 -2
- package/core/esm2022/lib/utils/paginated-data-emulator.utils.mjs +20 -0
- package/core/fesm2022/wlcm-angular-core.mjs +64 -3
- package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
- package/core/index.d.ts +6 -3
- package/core/lib/components/default-loader/default-loader.component.d.ts +5 -0
- package/core/lib/components/loader/loader.component.d.ts +11 -0
- package/core/lib/constants/loader.constants.d.ts +2 -0
- package/core/lib/utils/paginated-data-emulator.utils.d.ts +10 -0
- package/datepicker/esm2022/lib/components/calendar-header/calendar-header.component.mjs +7 -5
- package/datepicker/esm2022/lib/components/range/date-range-calendar-header/date-range-calendar-header.component.mjs +39 -5
- package/datepicker/esm2022/lib/components/range/date-range-picker/date-range-picker.component.mjs +14 -9
- package/datepicker/esm2022/lib/components/single/datepicker-input-container/datepicker-input-container.component.mjs +2 -2
- package/datepicker/esm2022/lib/components/single/datepicker-panel/datepicker-panel.component.mjs +15 -9
- package/datepicker/esm2022/lib/constants/datepicker.constants.mjs +3 -1
- package/datepicker/esm2022/lib/directives/datepicker-input.base.mjs +20 -4
- package/datepicker/esm2022/lib/directives/datepicker-trigger.base.mjs +23 -4
- package/datepicker/esm2022/lib/directives/ragne/date-range-picker-input-end.directive.mjs +12 -8
- package/datepicker/esm2022/lib/directives/ragne/date-range-picker-input-start.directive.mjs +12 -8
- package/datepicker/esm2022/lib/directives/ragne/date-range-picker-input.base.mjs +7 -4
- package/datepicker/esm2022/lib/directives/ragne/left-calendar.directive.mjs +10 -5
- package/datepicker/esm2022/lib/directives/ragne/right-calendar.directive.mjs +10 -5
- package/datepicker/esm2022/lib/directives/single/datepicker-input.directive.mjs +2 -2
- package/datepicker/esm2022/lib/models/date-picker.models.mjs +3 -1
- package/datepicker/esm2022/lib/models/range/data-range-calendar.models.mjs +21 -3
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs +202 -94
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs.map +1 -1
- package/datepicker/lib/components/calendar-header/calendar-header.component.d.ts +3 -1
- package/datepicker/lib/components/range/date-range-calendar-header/date-range-calendar-header.component.d.ts +8 -2
- package/datepicker/lib/components/range/date-range-picker/date-range-picker.component.d.ts +5 -3
- package/datepicker/lib/components/single/datepicker-input-container/datepicker-input-container.component.d.ts +3 -3
- package/datepicker/lib/components/single/datepicker-panel/datepicker-panel.component.d.ts +10 -6
- package/datepicker/lib/constants/datepicker.constants.d.ts +3 -1
- package/datepicker/lib/directives/datepicker-input.base.d.ts +5 -1
- package/datepicker/lib/directives/datepicker-trigger.base.d.ts +7 -2
- package/datepicker/lib/directives/ragne/date-range-picker-input-end.directive.d.ts +4 -2
- package/datepicker/lib/directives/ragne/date-range-picker-input-start.directive.d.ts +4 -2
- package/datepicker/lib/directives/ragne/date-range-picker-input.base.d.ts +3 -1
- package/datepicker/lib/directives/ragne/left-calendar.directive.d.ts +3 -1
- package/datepicker/lib/directives/ragne/right-calendar.directive.d.ts +3 -1
- package/datepicker/lib/directives/single/datepicker-input.directive.d.ts +5 -5
- package/datepicker/lib/models/date-picker.models.d.ts +8 -1
- package/datepicker/lib/models/range/data-range-calendar.models.d.ts +6 -1
- package/package.json +1 -1
- package/search-field/esm2022/lib/components/search-field/search-field.component.mjs +3 -3
- package/search-field/fesm2022/wlcm-angular-search-field.mjs +2 -2
- package/search-field/fesm2022/wlcm-angular-search-field.mjs.map +1 -1
- package/styles/components/calendar/_calendar-header.scss +4 -0
- package/styles/components/loader/_loader.scss +168 -0
- package/styles/components/loader/index.scss +5 -0
- package/styles/core/_all-theme.scss +2 -0
- package/table/esm2022/lib/components/table/table.component.mjs +3 -1
- package/table/esm2022/lib/components/table-row/table-row.component.mjs +48 -20
- package/table/esm2022/lib/components/table-row-actions/table-row-actions.component.mjs +13 -46
- package/table/esm2022/lib/directives/scrollable-table-container.directive.mjs +38 -7
- package/table/fesm2022/wlcm-angular-table.mjs +86 -61
- package/table/fesm2022/wlcm-angular-table.mjs.map +1 -1
- package/table/lib/components/table-row/table-row.component.d.ts +9 -4
- package/table/lib/components/table-row-actions/table-row-actions.component.d.ts +3 -12
- package/table/lib/directives/scrollable-table-container.directive.d.ts +9 -1
- /package/core/lib/components/{calendar-icon → icons/calendar-icon}/calendar-icon.component.d.ts +0 -0
- /package/core/lib/components/{chevron-down-icon → icons/chevron-down-icon}/chevron-down-icon.component.d.ts +0 -0
- /package/core/lib/components/{close-icon → icons/close-icon}/close-icon.component.d.ts +0 -0
- /package/core/lib/components/{search-icon → icons/search-icon}/search-icon.component.d.ts +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, output, input, effect, Directive, forwardRef, Optional, Inject, InjectionToken, ElementRef, Injector, ViewContainerRef, signal, computed, ViewChild,
|
2
|
+
import { Component, output, input, effect, Directive, forwardRef, Optional, Inject, Injectable, InjectionToken, ElementRef, Injector, ViewContainerRef, signal, computed, ViewChild, HostListener, inject, Host, ContentChild, viewChild, contentChild, NgModule } from '@angular/core';
|
3
3
|
import { CommonModule } from '@angular/common';
|
4
4
|
import * as i2$1 from '@angular/material/datepicker';
|
5
5
|
import { yearsPerPage, MatCalendar, MatRangeDateSelectionModel, MatDateSelectionModel, MAT_DATE_RANGE_SELECTION_STRATEGY, DefaultMatCalendarRangeStrategy, MatMonthView, MatDatepickerModule, DateRange, MatSingleDateSelectionModel } from '@angular/material/datepicker';
|
@@ -12,14 +12,14 @@ import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
12
12
|
import * as i2 from '@wlcm/angular/button';
|
13
13
|
import { WlcmButtonModule } from '@wlcm/angular/button';
|
14
14
|
import * as i1 from '@angular/material/core';
|
15
|
-
import { MAT_DATE_FORMATS,
|
15
|
+
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE, DateAdapter } from '@angular/material/core';
|
16
|
+
import { isBefore, startOfDay, isAfter, format, endOfMonth, add, startOfMonth, parse, isValid } from 'date-fns';
|
16
17
|
import { WlcmIconName, WlcmIconDirective } from '@wlcm/angular/core';
|
18
|
+
import { DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
19
|
+
import { enUS } from 'date-fns/locale';
|
17
20
|
import { ComponentPortal } from '@angular/cdk/portal';
|
18
21
|
import * as i3 from '@angular/forms';
|
19
22
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, ControlContainer } from '@angular/forms';
|
20
|
-
import { format, parse, isValid, isAfter } from 'date-fns';
|
21
|
-
import { DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
22
|
-
import { enUS } from 'date-fns/locale';
|
23
23
|
|
24
24
|
class WlcmDateRangePickerBottomPanelComponent {
|
25
25
|
constructor(picker) {
|
@@ -34,10 +34,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
34
34
|
}], ctorParameters: () => [{ type: WlcmDateRangePickerComponent }] });
|
35
35
|
|
36
36
|
class WlcmDataRangeCalendar {
|
37
|
-
constructor(location, element, calendar, dateAdapter) {
|
37
|
+
constructor(location, element, calendar, dateAdapter, datepickerConfig) {
|
38
38
|
this.element = element;
|
39
39
|
this.calendar = calendar;
|
40
40
|
this.dateAdapter = dateAdapter;
|
41
|
+
this.datepickerConfig = datepickerConfig;
|
41
42
|
this.dateChange = output();
|
42
43
|
this.viewChange = output();
|
43
44
|
this.disabled = input(false);
|
@@ -50,6 +51,13 @@ class WlcmDataRangeCalendar {
|
|
50
51
|
this.element.nativeElement.classList.remove('wlcm-calendar-disabled');
|
51
52
|
}
|
52
53
|
});
|
54
|
+
this.handleConfigValues();
|
55
|
+
}
|
56
|
+
get minDate() {
|
57
|
+
return this.datepickerConfig.minDate?.();
|
58
|
+
}
|
59
|
+
get maxDate() {
|
60
|
+
return this.datepickerConfig.maxDate?.();
|
53
61
|
}
|
54
62
|
prevMonth() {
|
55
63
|
this.dateChange.emit(this.dateAdapter.addCalendarMonths(this.calendar.activeDate, -1));
|
@@ -63,12 +71,21 @@ class WlcmDataRangeCalendar {
|
|
63
71
|
nextYear() {
|
64
72
|
this.dateChange.emit(this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage));
|
65
73
|
}
|
74
|
+
handleConfigValues() {
|
75
|
+
this.calendar.dateFilter = (date) => {
|
76
|
+
if (this.minDate && isBefore(startOfDay(date), startOfDay(this.minDate)))
|
77
|
+
return false;
|
78
|
+
if (this.maxDate && isAfter(startOfDay(date), startOfDay(this.maxDate)))
|
79
|
+
return false;
|
80
|
+
return true;
|
81
|
+
};
|
82
|
+
}
|
66
83
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDataRangeCalendar, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
67
84
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "17.3.5", type: WlcmDataRangeCalendar, inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange", viewChange: "viewChange" }, ngImport: i0 }); }
|
68
85
|
}
|
69
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDataRangeCalendar, decorators: [{
|
70
87
|
type: Directive
|
71
|
-
}], ctorParameters: () => [{ type: undefined }, { type: i0.ElementRef }, { type: i2$1.MatCalendar }, { type: i1.DateAdapter }] });
|
88
|
+
}], ctorParameters: () => [{ type: undefined }, { type: i0.ElementRef }, { type: i2$1.MatCalendar }, { type: i1.DateAdapter }, { type: undefined }] });
|
72
89
|
|
73
90
|
class WlcmCalendarHeaderComponent {
|
74
91
|
constructor(dateAdapter, dateFormats, calendar) {
|
@@ -78,6 +95,8 @@ class WlcmCalendarHeaderComponent {
|
|
78
95
|
this.WlcmIconName = WlcmIconName;
|
79
96
|
this.next = input();
|
80
97
|
this.previous = input();
|
98
|
+
this.disableLeftArrow = input(false);
|
99
|
+
this.disableRightArrow = input(false);
|
81
100
|
this.displayLeftArrow = input(true);
|
82
101
|
this.displayRightArrow = input(true);
|
83
102
|
}
|
@@ -94,8 +113,8 @@ class WlcmCalendarHeaderComponent {
|
|
94
113
|
return this.next()();
|
95
114
|
this.calendar.activeDate =
|
96
115
|
this.calendar.currentView == 'month'
|
97
|
-
? this.dateAdapter.addCalendarMonths(this.calendar.activeDate,
|
98
|
-
: this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ?
|
116
|
+
? this.dateAdapter.addCalendarMonths(this.calendar.activeDate, 1)
|
117
|
+
: this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);
|
99
118
|
}
|
100
119
|
changeCalendarView() {
|
101
120
|
if (this.calendar.currentView === 'multi-year') {
|
@@ -108,11 +127,11 @@ class WlcmCalendarHeaderComponent {
|
|
108
127
|
return this.dateAdapter.format(this.calendar.activeDate, this.dateFormats.display.monthYearLabel);
|
109
128
|
}
|
110
129
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmCalendarHeaderComponent, deps: [{ token: i1.DateAdapter }, { token: MAT_DATE_FORMATS, optional: true }, { token: forwardRef(() => MatCalendar) }], target: i0.ɵɵFactoryTarget.Component }); }
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: WlcmCalendarHeaderComponent, isStandalone: true, selector: "wlcm-calendar-header", inputs: { next: { classPropertyName: "next", publicName: "next", isSignal: true, isRequired: false, transformFunction: null }, previous: { classPropertyName: "previous", publicName: "previous", isSignal: true, isRequired: false, transformFunction: null }, displayLeftArrow: { classPropertyName: "displayLeftArrow", publicName: "displayLeftArrow", isSignal: true, isRequired: false, transformFunction: null }, displayRightArrow: { classPropertyName: "displayRightArrow", publicName: "displayRightArrow", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wlcm-calendar-header" }, ngImport: i0, template: "<div class=\"wlcm-calendar-header-button-container\">\n @if(displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if(displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }] }); }
|
130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.5", type: WlcmCalendarHeaderComponent, isStandalone: true, selector: "wlcm-calendar-header", inputs: { next: { classPropertyName: "next", publicName: "next", isSignal: true, isRequired: false, transformFunction: null }, previous: { classPropertyName: "previous", publicName: "previous", isSignal: true, isRequired: false, transformFunction: null }, disableLeftArrow: { classPropertyName: "disableLeftArrow", publicName: "disableLeftArrow", isSignal: true, isRequired: false, transformFunction: null }, disableRightArrow: { classPropertyName: "disableRightArrow", publicName: "disableRightArrow", isSignal: true, isRequired: false, transformFunction: null }, displayLeftArrow: { classPropertyName: "displayLeftArrow", publicName: "displayLeftArrow", isSignal: true, isRequired: false, transformFunction: null }, displayRightArrow: { classPropertyName: "displayRightArrow", publicName: "displayRightArrow", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wlcm-calendar-header" }, ngImport: i0, template: "<div class=\"wlcm-calendar-header-button-container\">\n @if(displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n [disabled]=\"disableLeftArrow()\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if(displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n [disabled]=\"disableRightArrow()\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }] }); }
|
112
131
|
}
|
113
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmCalendarHeaderComponent, decorators: [{
|
114
133
|
type: Component,
|
115
|
-
args: [{ selector: 'wlcm-calendar-header', host: { class: 'wlcm-calendar-header' }, standalone: true, imports: [CommonModule, WlcmIconDirective], template: "<div class=\"wlcm-calendar-header-button-container\">\n @if(displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if(displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n" }]
|
134
|
+
args: [{ selector: 'wlcm-calendar-header', host: { class: 'wlcm-calendar-header' }, standalone: true, imports: [CommonModule, WlcmIconDirective], template: "<div class=\"wlcm-calendar-header-button-container\">\n @if(displayLeftArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-left\"\n [disabled]=\"disableLeftArrow()\"\n (click)=\"previousClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n\n<button\n class=\"wlcm-calendar-header-change-view-button\"\n (click)=\"changeCalendarView()\"\n>\n <div class=\"wlcm-calendar-header-period-label\">\n {{ periodLabel }}\n </div>\n\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n</button>\n\n<div class=\"wlcm-calendar-header-button-container\">\n @if(displayRightArrow()) {\n <button\n class=\"wlcm-calendar-header-button wlcm-calendar-header-button-right\"\n [disabled]=\"disableRightArrow()\"\n (click)=\"nextClicked()\"\n >\n <ng-container [wlcmIcon]=\"WlcmIconName.CHEVRON_DOWN\"></ng-container>\n </button>\n }\n</div>\n" }]
|
116
135
|
}], ctorParameters: () => [{ type: i1.DateAdapter }, { type: undefined, decorators: [{
|
117
136
|
type: Optional
|
118
137
|
}, {
|
@@ -123,37 +142,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
123
142
|
args: [forwardRef(() => MatCalendar)]
|
124
143
|
}] }] });
|
125
144
|
|
145
|
+
function range(length, valueFunction) {
|
146
|
+
const valuesArray = Array(length);
|
147
|
+
for (let i = 0; i < length; i++) {
|
148
|
+
valuesArray[i] = valueFunction(i);
|
149
|
+
}
|
150
|
+
return valuesArray;
|
151
|
+
}
|
152
|
+
class WlcmDateAdapter extends DateFnsAdapter {
|
153
|
+
getDayOfWeekNames(style) {
|
154
|
+
const formatString = style === 'long' ? 'EEEE' : 'EEEEEE';
|
155
|
+
return range(7, (i) => format(new Date(2017, 0, i + 1), formatString));
|
156
|
+
}
|
157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
158
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter }); }
|
159
|
+
}
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter, decorators: [{
|
161
|
+
type: Injectable
|
162
|
+
}] });
|
163
|
+
var WlcmDateValidation;
|
164
|
+
(function (WlcmDateValidation) {
|
165
|
+
WlcmDateValidation["Format"] = "WlcmInvalidDateFormat";
|
166
|
+
WlcmDateValidation["MinDate"] = "WlcmDateIsBeforeMinDate";
|
167
|
+
WlcmDateValidation["MaxDate"] = "WlcmDateIsAfterMaxDate";
|
168
|
+
})(WlcmDateValidation || (WlcmDateValidation = {}));
|
169
|
+
|
170
|
+
const WLCM_DEFAULT_DATE_FORMATS = {
|
171
|
+
parse: {
|
172
|
+
dateInput: 'MMM/dd/yyyy',
|
173
|
+
},
|
174
|
+
display: {
|
175
|
+
dateInput: 'MMM/dd/yyyy',
|
176
|
+
monthYearLabel: 'MMMM yyyy',
|
177
|
+
dateA11yLabel: 'MMM/dd/yyyy',
|
178
|
+
monthYearA11yLabel: 'MMM yyyy',
|
179
|
+
},
|
180
|
+
};
|
181
|
+
const WLCM_DEFAULT_DATEPICKER_PROVIDERS = [
|
182
|
+
{ provide: MAT_DATE_LOCALE, useValue: enUS },
|
183
|
+
{ provide: MAT_DATE_FORMATS, useValue: WLCM_DEFAULT_DATE_FORMATS },
|
184
|
+
{ provide: DateAdapter, useClass: WlcmDateAdapter, deps: [MAT_DATE_LOCALE] },
|
185
|
+
];
|
186
|
+
const WLCM_DATEPICKER_CONFIG = new InjectionToken('WLCM_DATEPICKER_CONFIG', { providedIn: 'root', factory: () => ({}) });
|
187
|
+
|
126
188
|
class WlcmDateRangeCalendarHeaderComponent {
|
127
|
-
constructor(rangeCalendar, dateFormats, calendar) {
|
189
|
+
constructor(rangeCalendar, dateFormats, calendar, datepickerConfig) {
|
128
190
|
this.rangeCalendar = rangeCalendar;
|
129
191
|
this.dateFormats = dateFormats;
|
130
192
|
this.calendar = calendar;
|
193
|
+
this.datepickerConfig = datepickerConfig;
|
131
194
|
this.WlcmIconName = WlcmIconName;
|
132
195
|
this.previous = () => {
|
196
|
+
if (this.isPreviousDisabled)
|
197
|
+
return;
|
133
198
|
if (this.calendar.currentView !== 'month') {
|
134
199
|
return this.rangeCalendar.prevYear();
|
135
200
|
}
|
136
201
|
return this.rangeCalendar.prevMonth();
|
137
202
|
};
|
138
203
|
this.next = () => {
|
204
|
+
if (this.isNextDisabled)
|
205
|
+
return;
|
139
206
|
if (this.calendar.currentView !== 'month') {
|
140
207
|
return this.rangeCalendar.nextYear();
|
141
208
|
}
|
142
209
|
return this.rangeCalendar.nextMonth();
|
143
210
|
};
|
144
211
|
}
|
212
|
+
get minDate() {
|
213
|
+
return this.datepickerConfig.minDate?.();
|
214
|
+
}
|
215
|
+
get maxDate() {
|
216
|
+
return this.datepickerConfig.maxDate?.();
|
217
|
+
}
|
218
|
+
get isPreviousDisabled() {
|
219
|
+
if (!this.minDate)
|
220
|
+
return false;
|
221
|
+
let previousPeriod = endOfMonth(add(this.calendar.activeDate, { months: -1 }));
|
222
|
+
if (this.calendar.currentView !== 'month') {
|
223
|
+
previousPeriod = add(this.calendar.activeDate, { years: -1 });
|
224
|
+
}
|
225
|
+
return isBefore(previousPeriod, this.minDate);
|
226
|
+
}
|
227
|
+
get isNextDisabled() {
|
228
|
+
if (!this.maxDate)
|
229
|
+
return false;
|
230
|
+
let nextPeriod = startOfMonth(add(this.calendar.activeDate, { months: 1 }));
|
231
|
+
if (this.calendar.currentView !== 'month') {
|
232
|
+
nextPeriod = add(this.calendar.activeDate, { years: 1 });
|
233
|
+
}
|
234
|
+
return isBefore(this.maxDate, nextPeriod);
|
235
|
+
}
|
145
236
|
get canDisplayLeftArrow() {
|
146
237
|
return !this.rangeCalendar || this.rangeCalendar.location === 'left' || this.calendar.currentView !== 'month';
|
147
238
|
}
|
148
239
|
get canDisplayRightArrow() {
|
149
240
|
return !this.rangeCalendar || this.rangeCalendar.location === 'right' || this.calendar.currentView !== 'month';
|
150
241
|
}
|
151
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, deps: [{ token: WlcmDataRangeCalendar, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: forwardRef(() => MatCalendar) }], target: i0.ɵɵFactoryTarget.Component }); }
|
152
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: WlcmDateRangeCalendarHeaderComponent, isStandalone: true, selector: "wlcm-date-range-calendar-header", ngImport: i0, template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar.disabled()\"\n></wlcm-calendar-header>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: WlcmCalendarHeaderComponent, selector: "wlcm-calendar-header", inputs: ["next", "previous", "displayLeftArrow", "displayRightArrow"] }] }); }
|
242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, deps: [{ token: WlcmDataRangeCalendar, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: forwardRef(() => MatCalendar) }, { token: WLCM_DATEPICKER_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: WlcmDateRangeCalendarHeaderComponent, isStandalone: true, selector: "wlcm-date-range-calendar-header", ngImport: i0, template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [disableLeftArrow]=\"isPreviousDisabled\"\n [disableRightArrow]=\"isNextDisabled\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar.disabled()\"\n></wlcm-calendar-header>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: WlcmCalendarHeaderComponent, selector: "wlcm-calendar-header", inputs: ["next", "previous", "disableLeftArrow", "disableRightArrow", "displayLeftArrow", "displayRightArrow"] }] }); }
|
153
244
|
}
|
154
245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangeCalendarHeaderComponent, decorators: [{
|
155
246
|
type: Component,
|
156
|
-
args: [{ selector: 'wlcm-date-range-calendar-header', standalone: true, imports: [CommonModule, WlcmCalendarHeaderComponent, WlcmIconDirective], template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar.disabled()\"\n></wlcm-calendar-header>\n" }]
|
247
|
+
args: [{ selector: 'wlcm-date-range-calendar-header', standalone: true, imports: [CommonModule, WlcmCalendarHeaderComponent, WlcmIconDirective], template: "<wlcm-calendar-header\n [next]=\"next\"\n [previous]=\"previous\"\n [disableLeftArrow]=\"isPreviousDisabled\"\n [disableRightArrow]=\"isNextDisabled\"\n [displayLeftArrow]=\"canDisplayLeftArrow && !rangeCalendar.disabled()\"\n [displayRightArrow]=\"canDisplayRightArrow && !rangeCalendar.disabled()\"\n></wlcm-calendar-header>\n" }]
|
157
248
|
}], ctorParameters: () => [{ type: WlcmDataRangeCalendar, decorators: [{
|
158
249
|
type: Optional
|
159
250
|
}] }, { type: undefined, decorators: [{
|
@@ -164,6 +255,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
164
255
|
}] }, { type: i2$1.MatCalendar, decorators: [{
|
165
256
|
type: Inject,
|
166
257
|
args: [forwardRef(() => MatCalendar)]
|
258
|
+
}] }, { type: undefined, decorators: [{
|
259
|
+
type: Inject,
|
260
|
+
args: [WLCM_DATEPICKER_CONFIG]
|
167
261
|
}] }] });
|
168
262
|
|
169
263
|
const WLCM_DATE_RANGE_PICKER_CONFIG = new InjectionToken('WLCM_DATE_RANGE_PICKER_CONFIG', { providedIn: 'root', factory: () => ({}) });
|
@@ -183,11 +277,12 @@ const WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL_PROVIDER = {
|
|
183
277
|
};
|
184
278
|
|
185
279
|
let WlcmLeftCalendarDirective = class WlcmLeftCalendarDirective extends WlcmDataRangeCalendar {
|
186
|
-
constructor(element, dateAdapter, calendar) {
|
187
|
-
super('left', element, calendar, dateAdapter);
|
280
|
+
constructor(element, dateAdapter, calendar, datepickerConfig) {
|
281
|
+
super('left', element, calendar, dateAdapter, datepickerConfig);
|
188
282
|
this.element = element;
|
189
283
|
this.dateAdapter = dateAdapter;
|
190
284
|
this.calendar = calendar;
|
285
|
+
this.datepickerConfig = datepickerConfig;
|
191
286
|
this.handleYearChange();
|
192
287
|
this.handleMonthChange();
|
193
288
|
}
|
@@ -197,14 +292,14 @@ let WlcmLeftCalendarDirective = class WlcmLeftCalendarDirective extends WlcmData
|
|
197
292
|
handleMonthChange() {
|
198
293
|
this.calendar.monthSelected.pipe(untilDestroyed(this)).subscribe((date) => this.dateChange.emit(date));
|
199
294
|
}
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmLeftCalendarDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: forwardRef(() => MatCalendar) }], target: i0.ɵɵFactoryTarget.Directive }); }
|
295
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmLeftCalendarDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: forwardRef(() => MatCalendar) }, { token: WLCM_DATEPICKER_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
|
201
296
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: WlcmLeftCalendarDirective, isStandalone: true, selector: "[wlcmLeftCalendar]", providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmLeftCalendarDirective) }], usesInheritance: true, ngImport: i0 }); }
|
202
297
|
};
|
203
298
|
WlcmLeftCalendarDirective = __decorate([
|
204
299
|
UntilDestroy(),
|
205
300
|
__metadata("design:paramtypes", [ElementRef,
|
206
301
|
DateAdapter,
|
207
|
-
MatCalendar])
|
302
|
+
MatCalendar, Object])
|
208
303
|
], WlcmLeftCalendarDirective);
|
209
304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmLeftCalendarDirective, decorators: [{
|
210
305
|
type: Directive,
|
@@ -216,14 +311,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
216
311
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: i2$1.MatCalendar, decorators: [{
|
217
312
|
type: Inject,
|
218
313
|
args: [forwardRef(() => MatCalendar)]
|
314
|
+
}] }, { type: undefined, decorators: [{
|
315
|
+
type: Inject,
|
316
|
+
args: [WLCM_DATEPICKER_CONFIG]
|
219
317
|
}] }] });
|
220
318
|
|
221
319
|
let WlcmRightCalendarDirective = class WlcmRightCalendarDirective extends WlcmDataRangeCalendar {
|
222
|
-
constructor(element, dateAdapter, calendar) {
|
223
|
-
super('right', element, calendar, dateAdapter);
|
320
|
+
constructor(element, dateAdapter, calendar, datepickerConfig) {
|
321
|
+
super('right', element, calendar, dateAdapter, datepickerConfig);
|
224
322
|
this.element = element;
|
225
323
|
this.dateAdapter = dateAdapter;
|
226
324
|
this.calendar = calendar;
|
325
|
+
this.datepickerConfig = datepickerConfig;
|
227
326
|
this.handleYearChange();
|
228
327
|
this.handleMonthChange();
|
229
328
|
}
|
@@ -246,14 +345,14 @@ let WlcmRightCalendarDirective = class WlcmRightCalendarDirective extends WlcmDa
|
|
246
345
|
nextYear() {
|
247
346
|
this.dateChange.emit(this.dateAdapter.addCalendarMonths(this.dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage), -1));
|
248
347
|
}
|
249
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmRightCalendarDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: forwardRef(() => MatCalendar) }], target: i0.ɵɵFactoryTarget.Directive }); }
|
348
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmRightCalendarDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: forwardRef(() => MatCalendar) }, { token: WLCM_DATEPICKER_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
|
250
349
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: WlcmRightCalendarDirective, isStandalone: true, selector: "[wlcmRightCalendar]", providers: [{ provide: WlcmDataRangeCalendar, useExisting: forwardRef(() => WlcmRightCalendarDirective) }], usesInheritance: true, ngImport: i0 }); }
|
251
350
|
};
|
252
351
|
WlcmRightCalendarDirective = __decorate([
|
253
352
|
UntilDestroy(),
|
254
353
|
__metadata("design:paramtypes", [ElementRef,
|
255
354
|
DateAdapter,
|
256
|
-
MatCalendar])
|
355
|
+
MatCalendar, Object])
|
257
356
|
], WlcmRightCalendarDirective);
|
258
357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmRightCalendarDirective, decorators: [{
|
259
358
|
type: Directive,
|
@@ -265,6 +364,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
265
364
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: i2$1.MatCalendar, decorators: [{
|
266
365
|
type: Inject,
|
267
366
|
args: [forwardRef(() => MatCalendar)]
|
367
|
+
}] }, { type: undefined, decorators: [{
|
368
|
+
type: Inject,
|
369
|
+
args: [WLCM_DATEPICKER_CONFIG]
|
268
370
|
}] }] });
|
269
371
|
|
270
372
|
let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
@@ -272,13 +374,15 @@ let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
|
272
374
|
this.overlay = overlay;
|
273
375
|
this.viewContainerRef = viewContainerRef;
|
274
376
|
this.selectionModel = selectionModel;
|
377
|
+
this.minDate = input();
|
378
|
+
this.maxDate = input();
|
275
379
|
this.overlayRef = this.overlay.create(this.createOverlayConfig());
|
276
380
|
this.handleBackdropClick();
|
277
381
|
}
|
278
382
|
open() {
|
279
383
|
const injector = Injector.create({
|
280
384
|
providers: [{ provide: OverlayRef, useValue: this.overlayRef }],
|
281
|
-
parent: this.
|
385
|
+
parent: this.datepickerInjector,
|
282
386
|
});
|
283
387
|
const portal = new ComponentPortal(this.componentType, this.viewContainerRef, injector);
|
284
388
|
this.updatePositionStrategy();
|
@@ -296,6 +400,22 @@ let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
|
296
400
|
get closed() {
|
297
401
|
return (this.overlayRef?.detachments() || EMPTY).pipe(filter(() => !this.overlayRef.hasAttached()));
|
298
402
|
}
|
403
|
+
get datepickerInjector() {
|
404
|
+
const parent = this.viewContainerRef.injector;
|
405
|
+
return Injector.create({
|
406
|
+
parent,
|
407
|
+
providers: [{ provide: WLCM_DATEPICKER_CONFIG, useValue: this.datepickerConfig }],
|
408
|
+
});
|
409
|
+
}
|
410
|
+
get datepickerConfig() {
|
411
|
+
const parent = this.viewContainerRef.injector;
|
412
|
+
const config = parent.get(WLCM_DATEPICKER_CONFIG, {}, { optional: true });
|
413
|
+
if (this.minDate())
|
414
|
+
config.minDate = this.minDate;
|
415
|
+
if (this.maxDate())
|
416
|
+
config.maxDate = this.maxDate;
|
417
|
+
return config;
|
418
|
+
}
|
299
419
|
get overlayOrigin() {
|
300
420
|
return new CdkOverlayOrigin(this.connectedTo);
|
301
421
|
}
|
@@ -324,7 +444,7 @@ let WlcmDatepickerTrigger = class WlcmDatepickerTrigger {
|
|
324
444
|
});
|
325
445
|
}
|
326
446
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDatepickerTrigger, deps: [{ token: i1$1.Overlay }, { token: i0.ViewContainerRef }, { token: i2$1.MatDateSelectionModel }], target: i0.ɵɵFactoryTarget.Directive }); }
|
327
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
447
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "17.3.5", type: WlcmDatepickerTrigger, inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
328
448
|
};
|
329
449
|
WlcmDatepickerTrigger = __decorate([
|
330
450
|
UntilDestroy(),
|
@@ -350,12 +470,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
350
470
|
}] });
|
351
471
|
|
352
472
|
let WlcmDateRangePickerComponent = class WlcmDateRangePickerComponent {
|
353
|
-
constructor(
|
354
|
-
this.
|
473
|
+
constructor(rangeConfig, rangeSelectionStrategy, localSelectionModel, triggerSelectionModel, trigger, datepickerConfig, dateAdapter) {
|
474
|
+
this.rangeConfig = rangeConfig;
|
355
475
|
this.rangeSelectionStrategy = rangeSelectionStrategy;
|
356
476
|
this.localSelectionModel = localSelectionModel;
|
357
477
|
this.triggerSelectionModel = triggerSelectionModel;
|
358
478
|
this.trigger = trigger;
|
479
|
+
this.datepickerConfig = datepickerConfig;
|
359
480
|
this.dateAdapter = dateAdapter;
|
360
481
|
this.headerComponent = WlcmDateRangeCalendarHeaderComponent;
|
361
482
|
this._isViewInitialized = false;
|
@@ -369,14 +490,15 @@ let WlcmDateRangePickerComponent = class WlcmDateRangePickerComponent {
|
|
369
490
|
if (this.triggerSelectionModel.selection.start) {
|
370
491
|
this.startDate.set(this.triggerSelectionModel.selection.start);
|
371
492
|
}
|
372
|
-
if (this.
|
373
|
-
this.headerComponent = this.
|
493
|
+
if (this.rangeConfig.headerComponent) {
|
494
|
+
this.headerComponent = this.rangeConfig.headerComponent;
|
374
495
|
}
|
375
496
|
effect(() => {
|
376
497
|
if (!this._isViewInitialized)
|
377
498
|
return;
|
378
499
|
this.leftCalendar.activeDate = this.startDate();
|
379
500
|
this.rightCalendar.activeDate = this.dateAdapter.addCalendarMonths(this.startDate(), 1);
|
501
|
+
this.rightCalendar.startAt = this.dateAdapter.addCalendarMonths(this.startDate(), 1);
|
380
502
|
});
|
381
503
|
}
|
382
504
|
ngAfterViewInit() {
|
@@ -437,7 +559,7 @@ let WlcmDateRangePickerComponent = class WlcmDateRangePickerComponent {
|
|
437
559
|
});
|
438
560
|
});
|
439
561
|
}
|
440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangePickerComponent, deps: [{ token: WLCM_DATE_RANGE_PICKER_CONFIG, optional: true }, { token: MAT_DATE_RANGE_SELECTION_STRATEGY }, { token: WLCM_DATE_RANGE_SELECTION_MODEL }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }, { token: WlcmDatepickerTrigger }, { token: i1.DateAdapter }], target: i0.ɵɵFactoryTarget.Component }); }
|
562
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangePickerComponent, deps: [{ token: WLCM_DATE_RANGE_PICKER_CONFIG, optional: true }, { token: MAT_DATE_RANGE_SELECTION_STRATEGY }, { token: WLCM_DATE_RANGE_SELECTION_MODEL }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }, { token: WlcmDatepickerTrigger }, { token: WLCM_DATEPICKER_CONFIG }, { token: i1.DateAdapter }], target: i0.ɵɵFactoryTarget.Component }); }
|
441
563
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: WlcmDateRangePickerComponent, isStandalone: true, selector: "wlcm-date-range-picker", providers: [
|
442
564
|
{
|
443
565
|
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
@@ -450,8 +572,7 @@ WlcmDateRangePickerComponent = __decorate([
|
|
450
572
|
UntilDestroy(),
|
451
573
|
__metadata("design:paramtypes", [Object, Object, MatDateSelectionModel,
|
452
574
|
MatDateSelectionModel,
|
453
|
-
WlcmDatepickerTrigger,
|
454
|
-
DateAdapter])
|
575
|
+
WlcmDatepickerTrigger, Object, DateAdapter])
|
455
576
|
], WlcmDateRangePickerComponent);
|
456
577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangePickerComponent, decorators: [{
|
457
578
|
type: Component,
|
@@ -483,7 +604,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
483
604
|
}] }, { type: i2$1.MatDateSelectionModel, decorators: [{
|
484
605
|
type: Inject,
|
485
606
|
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
486
|
-
}] }, { type: WlcmDatepickerTrigger }, { type:
|
607
|
+
}] }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
608
|
+
type: Inject,
|
609
|
+
args: [WLCM_DATEPICKER_CONFIG]
|
610
|
+
}] }, { type: i1.DateAdapter }], propDecorators: { leftCalendar: [{
|
487
611
|
type: ViewChild,
|
488
612
|
args: [WlcmLeftCalendarDirective, { read: MatCalendar }]
|
489
613
|
}], rightCalendar: [{
|
@@ -497,29 +621,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
497
621
|
args: [MatMonthView]
|
498
622
|
}] } });
|
499
623
|
|
500
|
-
function range(length, valueFunction) {
|
501
|
-
const valuesArray = Array(length);
|
502
|
-
for (let i = 0; i < length; i++) {
|
503
|
-
valuesArray[i] = valueFunction(i);
|
504
|
-
}
|
505
|
-
return valuesArray;
|
506
|
-
}
|
507
|
-
class WlcmDateAdapter extends DateFnsAdapter {
|
508
|
-
getDayOfWeekNames(style) {
|
509
|
-
const formatString = style === 'long' ? 'EEEE' : 'EEEEEE';
|
510
|
-
return range(7, (i) => format(new Date(2017, 0, i + 1), formatString));
|
511
|
-
}
|
512
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
513
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter }); }
|
514
|
-
}
|
515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateAdapter, decorators: [{
|
516
|
-
type: Injectable
|
517
|
-
}] });
|
518
|
-
var WlcmDateValidation;
|
519
|
-
(function (WlcmDateValidation) {
|
520
|
-
WlcmDateValidation["Format"] = "WlcmInvalidDateFormat";
|
521
|
-
})(WlcmDateValidation || (WlcmDateValidation = {}));
|
522
|
-
|
523
624
|
class WlcmDatepickerInputBase {
|
524
625
|
handleBlur() {
|
525
626
|
this.updateSelection();
|
@@ -531,10 +632,11 @@ class WlcmDatepickerInputBase {
|
|
531
632
|
}
|
532
633
|
this._validatorChanged?.();
|
533
634
|
}
|
534
|
-
constructor(element, dateAdapter, dateFormats) {
|
635
|
+
constructor(element, dateAdapter, dateFormats, trigger) {
|
535
636
|
this.element = element;
|
536
637
|
this.dateAdapter = dateAdapter;
|
537
638
|
this.dateFormats = dateFormats;
|
639
|
+
this.trigger = trigger;
|
538
640
|
}
|
539
641
|
writeValue(value) {
|
540
642
|
this.updateInputValue(value);
|
@@ -558,6 +660,13 @@ class WlcmDatepickerInputBase {
|
|
558
660
|
required: false,
|
559
661
|
};
|
560
662
|
}
|
663
|
+
const date = this.parseCurrentValue();
|
664
|
+
if (this.minDate && isBefore(startOfDay(date), startOfDay(this.minDate))) {
|
665
|
+
return { [WlcmDateValidation.MinDate]: { minDate: this.minDate, currentDate: date } };
|
666
|
+
}
|
667
|
+
if (this.maxDate && isAfter(startOfDay(date), startOfDay(this.maxDate))) {
|
668
|
+
return { [WlcmDateValidation.MaxDate]: { maxDate: this.maxDate, currentDate: date } };
|
669
|
+
}
|
561
670
|
return null;
|
562
671
|
}
|
563
672
|
parseCurrentValue() {
|
@@ -568,6 +677,12 @@ class WlcmDatepickerInputBase {
|
|
568
677
|
const parsedDate = parse(value, pattern, new Date());
|
569
678
|
return isValid(parsedDate) && value === format(parsedDate, pattern);
|
570
679
|
}
|
680
|
+
get minDate() {
|
681
|
+
return this.trigger.minDate?.();
|
682
|
+
}
|
683
|
+
get maxDate() {
|
684
|
+
return this.trigger.maxDate?.();
|
685
|
+
}
|
571
686
|
get inputElement() {
|
572
687
|
return this.element.nativeElement;
|
573
688
|
}
|
@@ -586,7 +701,7 @@ class WlcmDatepickerInputBase {
|
|
586
701
|
}
|
587
702
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDatepickerInputBase, decorators: [{
|
588
703
|
type: Directive
|
589
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: undefined }], propDecorators: { handleBlur: [{
|
704
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: undefined }, { type: WlcmDatepickerTrigger }], propDecorators: { handleBlur: [{
|
590
705
|
type: HostListener,
|
591
706
|
args: ['blur']
|
592
707
|
}], handleInput: [{
|
@@ -595,11 +710,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
595
710
|
}] } });
|
596
711
|
|
597
712
|
class WlcmDateRangePickerInputBase extends WlcmDatepickerInputBase {
|
598
|
-
constructor(element, dateAdapter, dateFormats) {
|
599
|
-
super(element, dateAdapter, dateFormats);
|
713
|
+
constructor(element, dateAdapter, dateFormats, trigger) {
|
714
|
+
super(element, dateAdapter, dateFormats, trigger);
|
600
715
|
this.element = element;
|
601
716
|
this.dateAdapter = dateAdapter;
|
602
717
|
this.dateFormats = dateFormats;
|
718
|
+
this.trigger = trigger;
|
603
719
|
this._inputMirror = this.createInputMirror();
|
604
720
|
}
|
605
721
|
ngAfterViewInit() {
|
@@ -636,7 +752,7 @@ class WlcmDateRangePickerInputBase extends WlcmDatepickerInputBase {
|
|
636
752
|
}
|
637
753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDateRangePickerInputBase, decorators: [{
|
638
754
|
type: Directive
|
639
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: undefined }] });
|
755
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.DateAdapter }, { type: undefined }, { type: WlcmDatepickerTrigger }] });
|
640
756
|
|
641
757
|
var WlcmDateRangeValidation;
|
642
758
|
(function (WlcmDateRangeValidation) {
|
@@ -644,12 +760,13 @@ var WlcmDateRangeValidation;
|
|
644
760
|
})(WlcmDateRangeValidation || (WlcmDateRangeValidation = {}));
|
645
761
|
|
646
762
|
let DateRangePickerInputEndDirective = class DateRangePickerInputEndDirective extends WlcmDateRangePickerInputBase {
|
647
|
-
constructor(element, dateAdapter, dateFormats, selectionModel) {
|
648
|
-
super(element, dateAdapter, dateFormats);
|
763
|
+
constructor(element, dateAdapter, dateFormats, selectionModel, trigger) {
|
764
|
+
super(element, dateAdapter, dateFormats, trigger);
|
649
765
|
this.element = element;
|
650
766
|
this.dateAdapter = dateAdapter;
|
651
767
|
this.dateFormats = dateFormats;
|
652
768
|
this.selectionModel = selectionModel;
|
769
|
+
this.trigger = trigger;
|
653
770
|
this.updateSelection = () => {
|
654
771
|
let end = this.parseCurrentValue();
|
655
772
|
this.selectionModel.updateSelection(new DateRange(this.selectionModel.selection.start, end), this);
|
@@ -674,7 +791,7 @@ let DateRangePickerInputEndDirective = class DateRangePickerInputEndDirective ex
|
|
674
791
|
this._validatorChanged?.();
|
675
792
|
});
|
676
793
|
}
|
677
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputEndDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: MAT_DATE_FORMATS, optional: true }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }], target: i0.ɵɵFactoryTarget.Directive }); }
|
794
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputEndDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: MAT_DATE_FORMATS, optional: true }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }, { token: WlcmDatepickerTrigger }], target: i0.ɵɵFactoryTarget.Directive }); }
|
678
795
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: DateRangePickerInputEndDirective, isStandalone: true, selector: "[wlcmDateRangePickerInputEnd]", host: { classAttribute: "wlcm-date-range-picker-input-field" }, providers: [
|
679
796
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
680
797
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputEndDirective), multi: true },
|
@@ -683,7 +800,8 @@ let DateRangePickerInputEndDirective = class DateRangePickerInputEndDirective ex
|
|
683
800
|
DateRangePickerInputEndDirective = __decorate([
|
684
801
|
UntilDestroy(),
|
685
802
|
__metadata("design:paramtypes", [ElementRef,
|
686
|
-
DateAdapter, Object, MatDateSelectionModel
|
803
|
+
DateAdapter, Object, MatDateSelectionModel,
|
804
|
+
WlcmDatepickerTrigger])
|
687
805
|
], DateRangePickerInputEndDirective);
|
688
806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputEndDirective, decorators: [{
|
689
807
|
type: Directive,
|
@@ -704,15 +822,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
704
822
|
}] }, { type: i2$1.MatDateSelectionModel, decorators: [{
|
705
823
|
type: Inject,
|
706
824
|
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
707
|
-
}] }] });
|
825
|
+
}] }, { type: WlcmDatepickerTrigger }] });
|
708
826
|
|
709
827
|
let DateRangePickerInputStartDirective = class DateRangePickerInputStartDirective extends WlcmDateRangePickerInputBase {
|
710
|
-
constructor(element, dateAdapter, dateFormats, selectionModel) {
|
711
|
-
super(element, dateAdapter, dateFormats);
|
828
|
+
constructor(element, dateAdapter, dateFormats, selectionModel, trigger) {
|
829
|
+
super(element, dateAdapter, dateFormats, trigger);
|
712
830
|
this.element = element;
|
713
831
|
this.dateAdapter = dateAdapter;
|
714
832
|
this.dateFormats = dateFormats;
|
715
833
|
this.selectionModel = selectionModel;
|
834
|
+
this.trigger = trigger;
|
716
835
|
this.updateSelection = () => {
|
717
836
|
let start = this.parseCurrentValue();
|
718
837
|
this.selectionModel.updateSelection(new DateRange(start, this.selectionModel.selection.end), this);
|
@@ -737,7 +856,7 @@ let DateRangePickerInputStartDirective = class DateRangePickerInputStartDirectiv
|
|
737
856
|
this._validatorChanged?.();
|
738
857
|
});
|
739
858
|
}
|
740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputStartDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: MAT_DATE_FORMATS, optional: true }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }], target: i0.ɵɵFactoryTarget.Directive }); }
|
859
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputStartDirective, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter }, { token: MAT_DATE_FORMATS, optional: true }, { token: WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL }, { token: WlcmDatepickerTrigger }], target: i0.ɵɵFactoryTarget.Directive }); }
|
741
860
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.5", type: DateRangePickerInputStartDirective, isStandalone: true, selector: "[wlcmDateRangePickerInputStart]", host: { classAttribute: "wlcm-date-range-picker-input-field" }, providers: [
|
742
861
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
743
862
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => DateRangePickerInputStartDirective), multi: true },
|
@@ -746,7 +865,8 @@ let DateRangePickerInputStartDirective = class DateRangePickerInputStartDirectiv
|
|
746
865
|
DateRangePickerInputStartDirective = __decorate([
|
747
866
|
UntilDestroy(),
|
748
867
|
__metadata("design:paramtypes", [ElementRef,
|
749
|
-
DateAdapter, Object, MatDateSelectionModel
|
868
|
+
DateAdapter, Object, MatDateSelectionModel,
|
869
|
+
WlcmDatepickerTrigger])
|
750
870
|
], DateRangePickerInputStartDirective);
|
751
871
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DateRangePickerInputStartDirective, decorators: [{
|
752
872
|
type: Directive,
|
@@ -767,7 +887,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
767
887
|
}] }, { type: i2$1.MatDateSelectionModel, decorators: [{
|
768
888
|
type: Inject,
|
769
889
|
args: [WLCM_DATE_RANGE_TRIGGER_SELECTION_MODEL]
|
770
|
-
}] }] });
|
890
|
+
}] }, { type: WlcmDatepickerTrigger }] });
|
771
891
|
|
772
892
|
class DateRangePickerErrors {
|
773
893
|
static throwNoStartInputError() {
|
@@ -885,7 +1005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
885
1005
|
|
886
1006
|
let WlcmDatepickerInputDirective = class WlcmDatepickerInputDirective extends WlcmDatepickerInputBase {
|
887
1007
|
constructor(element, dateAdapter, dateFormats, selectionModel, trigger) {
|
888
|
-
super(element, dateAdapter, dateFormats);
|
1008
|
+
super(element, dateAdapter, dateFormats, trigger);
|
889
1009
|
this.element = element;
|
890
1010
|
this.dateAdapter = dateAdapter;
|
891
1011
|
this.dateFormats = dateFormats;
|
@@ -938,22 +1058,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
938
1058
|
}] }, { type: i2$1.MatDateSelectionModel }, { type: WlcmDatepickerTrigger }] });
|
939
1059
|
|
940
1060
|
class WlcmDatepickerPanelComponent {
|
941
|
-
constructor(selectionModel, trigger) {
|
1061
|
+
constructor(selectionModel, trigger, config) {
|
942
1062
|
this.selectionModel = selectionModel;
|
943
1063
|
this.trigger = trigger;
|
1064
|
+
this.config = config;
|
944
1065
|
this.headerComponent = WlcmCalendarHeaderComponent;
|
1066
|
+
this.matCalendar = viewChild(MatCalendar);
|
945
1067
|
}
|
946
1068
|
select(date) {
|
947
1069
|
this.selectionModel.updateSelection(date, this);
|
948
1070
|
this.trigger.close();
|
949
1071
|
}
|
950
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDatepickerPanelComponent, deps: [{ token: i2$1.MatDateSelectionModel }, { token: WlcmDatepickerTrigger }], target: i0.ɵɵFactoryTarget.Component }); }
|
951
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
1072
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDatepickerPanelComponent, deps: [{ token: i2$1.MatDateSelectionModel }, { token: WlcmDatepickerTrigger }, { token: WLCM_DATEPICKER_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
|
1073
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.5", type: WlcmDatepickerPanelComponent, isStandalone: true, selector: "wlcm-datepicker-panel", host: { classAttribute: "wlcm-datepicker-panel" }, viewQueries: [{ propertyName: "matCalendar", first: true, predicate: MatCalendar, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-calendar\n wlcmCalendar\n [minDate]=\"config.minDate?.()\"\n [maxDate]=\"config.maxDate?.()\"\n [startAt]=\"selectionModel.selection\"\n [selected]=\"selectionModel.selection\"\n [headerComponent]=\"headerComponent\"\n (selectedChange)=\"select($event)\"\n></mat-calendar>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "directive", type: WlcmCalendarDirective, selector: "[wlcmCalendar]" }] }); }
|
952
1074
|
}
|
953
1075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmDatepickerPanelComponent, decorators: [{
|
954
1076
|
type: Component,
|
955
|
-
args: [{ selector: 'wlcm-datepicker-panel', host: { class: 'wlcm-datepicker-panel' }, standalone: true, imports: [CommonModule, MatDatepickerModule, WlcmCalendarDirective], template: "<mat-calendar\n wlcmCalendar\n [startAt]=\"selectionModel.selection\"\n [selected]=\"selectionModel.selection\"\n [headerComponent]=\"headerComponent\"\n (selectedChange)=\"select($event)\"\n></mat-calendar>\n" }]
|
956
|
-
}], ctorParameters: () => [{ type: i2$1.MatDateSelectionModel }, { type: WlcmDatepickerTrigger }
|
1077
|
+
args: [{ selector: 'wlcm-datepicker-panel', host: { class: 'wlcm-datepicker-panel' }, standalone: true, imports: [CommonModule, MatDatepickerModule, WlcmCalendarDirective], template: "<mat-calendar\n wlcmCalendar\n [minDate]=\"config.minDate?.()\"\n [maxDate]=\"config.maxDate?.()\"\n [startAt]=\"selectionModel.selection\"\n [selected]=\"selectionModel.selection\"\n [headerComponent]=\"headerComponent\"\n (selectedChange)=\"select($event)\"\n></mat-calendar>\n" }]
|
1078
|
+
}], ctorParameters: () => [{ type: i2$1.MatDateSelectionModel }, { type: WlcmDatepickerTrigger }, { type: undefined, decorators: [{
|
1079
|
+
type: Inject,
|
1080
|
+
args: [WLCM_DATEPICKER_CONFIG]
|
1081
|
+
}] }] });
|
957
1082
|
|
958
1083
|
class WlcmDatepickerInputContainerComponent extends WlcmDatepickerTrigger {
|
959
1084
|
constructor(overlay, viewContainerRef, selectionModel, formField) {
|
@@ -1045,23 +1170,6 @@ function WlcmDateRangeInputValidator() {
|
|
1045
1170
|
};
|
1046
1171
|
}
|
1047
1172
|
|
1048
|
-
const WLCM_DEFAULT_DATE_FORMATS = {
|
1049
|
-
parse: {
|
1050
|
-
dateInput: 'MMM/dd/yyyy',
|
1051
|
-
},
|
1052
|
-
display: {
|
1053
|
-
dateInput: 'MMM/dd/yyyy',
|
1054
|
-
monthYearLabel: 'MMMM yyyy',
|
1055
|
-
dateA11yLabel: 'MMM/dd/yyyy',
|
1056
|
-
monthYearA11yLabel: 'MMM yyyy',
|
1057
|
-
},
|
1058
|
-
};
|
1059
|
-
const WLCM_DEFAULT_DATEPICKER_PROVIDERS = [
|
1060
|
-
{ provide: MAT_DATE_LOCALE, useValue: enUS },
|
1061
|
-
{ provide: MAT_DATE_FORMATS, useValue: WLCM_DEFAULT_DATE_FORMATS },
|
1062
|
-
{ provide: DateAdapter, useClass: WlcmDateAdapter, deps: [MAT_DATE_LOCALE] },
|
1063
|
-
];
|
1064
|
-
|
1065
1173
|
const publicComponents = [WlcmDatepickerInputContainerComponent, WlcmDateRangePickerInputComponent];
|
1066
1174
|
const publicDirectives = [
|
1067
1175
|
WlcmDatepickerInputDirective,
|