@energinet/watt 1.5.8 → 1.5.9
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getLocaleDateFormat, FormatWidth } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ElementRef, ChangeDetectorRef, LOCALE_ID, input, computed,
|
|
3
|
+
import { inject, ElementRef, ChangeDetectorRef, LOCALE_ID, input, booleanAttribute, computed, linkedSignal, effect, ViewChild, ViewEncapsulation, Component, Injectable } from '@angular/core';
|
|
4
4
|
import { NgControl } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/material/datepicker';
|
|
6
6
|
import { MatDatepickerModule, MatDatepickerInput, MatDateRangePicker, MatDateRangeInput, MatStartDate, MatEndDate, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/datepicker';
|
|
@@ -51,8 +51,10 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
51
51
|
max = input();
|
|
52
52
|
min = input();
|
|
53
53
|
rangeMonthOnlyMode = input(false);
|
|
54
|
-
startAt = null;
|
|
55
|
-
label = '';
|
|
54
|
+
startAt = input(null);
|
|
55
|
+
label = input('');
|
|
56
|
+
dateClass = input(() => '');
|
|
57
|
+
canStepThroughDays = input(false, { transform: booleanAttribute });
|
|
56
58
|
/**
|
|
57
59
|
* @ignore
|
|
58
60
|
*/
|
|
@@ -87,7 +89,6 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
87
89
|
* @ignore
|
|
88
90
|
*/
|
|
89
91
|
_placeholder = this.getPlaceholder(this.getInputFormat());
|
|
90
|
-
dateClass = () => '';
|
|
91
92
|
/**
|
|
92
93
|
* @ignore
|
|
93
94
|
*/
|
|
@@ -127,6 +128,8 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
127
128
|
getRangePlaceholder() {
|
|
128
129
|
return this.datePlaceholder + this.rangeSeparator + this.datePlaceholder;
|
|
129
130
|
}
|
|
131
|
+
isPrevDayButtonDisabled = linkedSignal(() => this.isPrevDayBeforeOrEqualToMinDate());
|
|
132
|
+
isNextDayButtonDisabled = linkedSignal(() => this.isNextDayAfterOrEqualToMaxDate());
|
|
130
133
|
constructor() {
|
|
131
134
|
super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);
|
|
132
135
|
effect(() => {
|
|
@@ -175,13 +178,14 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
175
178
|
datepickerClosed() {
|
|
176
179
|
if (this.matDatepickerInput.value) {
|
|
177
180
|
this.control?.setValue(this.matDatepickerInput.value);
|
|
178
|
-
this.actualInput.nativeElement.value =
|
|
179
|
-
this.formatDateTimeFromModelToView(this.formatDateFromViewToModel(this.matDatepickerInput.value));
|
|
181
|
+
this.actualInput.nativeElement.value = this.formatDateTimeFromModelToView(this.formatDateFromViewToModel(this.matDatepickerInput.value));
|
|
180
182
|
}
|
|
181
183
|
else {
|
|
182
184
|
this.actualInput.nativeElement.value = '';
|
|
183
185
|
this.control?.setValue(null);
|
|
184
186
|
}
|
|
187
|
+
this.isPrevDayButtonDisabled.set(this.isPrevDayBeforeOrEqualToMinDate());
|
|
188
|
+
this.isNextDayButtonDisabled.set(this.isNextDayAfterOrEqualToMaxDate());
|
|
185
189
|
this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));
|
|
186
190
|
}
|
|
187
191
|
onMonthSelected(date) {
|
|
@@ -253,6 +257,54 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
253
257
|
this.setValueToInput(start, startInput, this.matStartDate);
|
|
254
258
|
this.setValueToInput(end, endInput, this.matEndDate);
|
|
255
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* @ignore
|
|
262
|
+
*/
|
|
263
|
+
prevDay() {
|
|
264
|
+
this.changeDay(-1);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @ignore
|
|
268
|
+
*/
|
|
269
|
+
nextDay() {
|
|
270
|
+
this.changeDay(1);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* @ignore
|
|
274
|
+
*/
|
|
275
|
+
changeDay(value) {
|
|
276
|
+
const currentDate = this.matDatepickerInput.value;
|
|
277
|
+
if (currentDate) {
|
|
278
|
+
const newDate = dayjs(currentDate).add(value, 'day').toISOString();
|
|
279
|
+
const newDateFormatted = this.formatDateTimeFromModelToView(newDate);
|
|
280
|
+
this.inputChanged(newDateFormatted);
|
|
281
|
+
this.datepickerClosed();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* @ignore
|
|
286
|
+
*/
|
|
287
|
+
isPrevDayBeforeOrEqualToMinDate() {
|
|
288
|
+
const min = this.min();
|
|
289
|
+
const selectedDate = this.matDatepickerInput?.value;
|
|
290
|
+
if (!min || !selectedDate)
|
|
291
|
+
return false;
|
|
292
|
+
const isBefore = dayjs(selectedDate).isBefore(min, 'day');
|
|
293
|
+
const isSame = dayjs(selectedDate).isSame(min, 'day');
|
|
294
|
+
return isSame || isBefore;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* @ignore
|
|
298
|
+
*/
|
|
299
|
+
isNextDayAfterOrEqualToMaxDate() {
|
|
300
|
+
const max = this.max();
|
|
301
|
+
const selectedDate = this.matDatepickerInput?.value;
|
|
302
|
+
if (!max || !selectedDate)
|
|
303
|
+
return false;
|
|
304
|
+
const isAfter = dayjs(selectedDate).isAfter(max, 'day');
|
|
305
|
+
const isSame = dayjs(selectedDate).isSame(max, 'day');
|
|
306
|
+
return isSame || isAfter;
|
|
307
|
+
}
|
|
256
308
|
/**
|
|
257
309
|
* @ignore
|
|
258
310
|
*/
|
|
@@ -321,10 +373,10 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
321
373
|
return maybeDateInDanishTimeZone;
|
|
322
374
|
}
|
|
323
375
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
324
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDatepickerComponent, isStandalone: true, selector: "watt-datepicker", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, rangeMonthOnlyMode: { classPropertyName: "rangeMonthOnlyMode", publicName: "rangeMonthOnlyMode", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal:
|
|
376
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDatepickerComponent, isStandalone: true, selector: "watt-datepicker", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, rangeMonthOnlyMode: { classPropertyName: "rangeMonthOnlyMode", publicName: "rangeMonthOnlyMode", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null }, canStepThroughDays: { classPropertyName: "canStepThroughDays", publicName: "canStepThroughDays", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
325
377
|
{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent },
|
|
326
378
|
MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
327
|
-
], viewQueries: [{ propertyName: "matDatepickerInput", first: true, predicate: MatDatepickerInput, descendants: true }, { propertyName: "matDateRangePicker", first: true, predicate: MatDateRangePicker, descendants: true }, { propertyName: "matDateRangeInput", first: true, predicate: MatDateRangeInput, descendants: true }, { propertyName: "matStartDate", first: true, predicate: MatStartDate, descendants: true }, { propertyName: "matEndDate", first: true, predicate: MatEndDate, descendants: true }, { propertyName: "actualInput", first: true, predicate: ["actualInput"], descendants: true }, { propertyName: "input", first: true, predicate: ["dateInput"], descendants: true }, { propertyName: "startInput", first: true, predicate: ["startDateInput"], descendants: true }, { propertyName: "endInput", first: true, predicate: ["endDateInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass\"\n [startAt]=\"startAt\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "ngmodule", type: MaskitoModule }, { kind: "component", type: WattPlaceholderMaskComponent, selector: "watt-placeholder-mask", inputs: ["primaryInputElement", "secondaryInputElement", "mask", "placeholder"], outputs: ["maskApplied"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
379
|
+
], viewQueries: [{ propertyName: "matDatepickerInput", first: true, predicate: MatDatepickerInput, descendants: true }, { propertyName: "matDateRangePicker", first: true, predicate: MatDateRangePicker, descendants: true }, { propertyName: "matDateRangeInput", first: true, predicate: MatDateRangeInput, descendants: true }, { propertyName: "matStartDate", first: true, predicate: MatStartDate, descendants: true }, { propertyName: "matEndDate", first: true, predicate: MatEndDate, descendants: true }, { propertyName: "actualInput", first: true, predicate: ["actualInput"], descendants: true }, { propertyName: "input", first: true, predicate: ["dateInput"], descendants: true }, { propertyName: "startInput", first: true, predicate: ["startDateInput"], descendants: true }, { propertyName: "endInput", first: true, predicate: ["endDateInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n\n@if (!range && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "ngmodule", type: MaskitoModule }, { kind: "component", type: WattPlaceholderMaskComponent, selector: "watt-placeholder-mask", inputs: ["primaryInputElement", "secondaryInputElement", "mask", "placeholder"], outputs: ["maskApplied"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
328
380
|
}
|
|
329
381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDatepickerComponent, decorators: [{
|
|
330
382
|
type: Component,
|
|
@@ -338,12 +390,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
338
390
|
WattFieldComponent,
|
|
339
391
|
MaskitoModule,
|
|
340
392
|
WattPlaceholderMaskComponent,
|
|
341
|
-
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass\"\n [startAt]=\"startAt\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"] }]
|
|
342
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
343
|
-
type: Input
|
|
344
|
-
}], label: [{
|
|
345
|
-
type: Input
|
|
346
|
-
}], matDatepickerInput: [{
|
|
393
|
+
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n\n@if (!range && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"] }]
|
|
394
|
+
}], ctorParameters: () => [], propDecorators: { matDatepickerInput: [{
|
|
347
395
|
type: ViewChild,
|
|
348
396
|
args: [MatDatepickerInput]
|
|
349
397
|
}], matDateRangePicker: [{
|
|
@@ -370,8 +418,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
370
418
|
}], endInput: [{
|
|
371
419
|
type: ViewChild,
|
|
372
420
|
args: ['endDateInput']
|
|
373
|
-
}], dateClass: [{
|
|
374
|
-
type: Input
|
|
375
421
|
}] } });
|
|
376
422
|
|
|
377
423
|
//#region License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-picker-datepicker.mjs","sources":["../../../libs/watt/package/picker/datepicker/watt-datepicker.component.ts","../../../libs/watt/package/picker/datepicker/watt-datepicker.component.html","../../../libs/watt/package/picker/datepicker/watt-datepicker-intl.service.ts","../../../libs/watt/package/picker/datepicker/index.ts","../../../libs/watt/package/picker/datepicker/energinet-watt-picker-datepicker.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { FormatWidth, getLocaleDateFormat } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n Input,\n LOCALE_ID,\n ViewChild,\n ViewEncapsulation,\n computed,\n inject,\n input,\n AfterViewInit,\n effect,\n} from '@angular/core';\nimport { AbstractControl, NgControl, Validator } from '@angular/forms';\nimport {\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n MatCalendarCellClassFunction,\n MatDateRangeInput,\n MatDateRangePicker,\n MatDatepickerInput,\n MatDatepickerModule,\n MatEndDate,\n MatStartDate,\n} from '@angular/material/datepicker';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MaskitoModule } from '@maskito/angular';\nimport { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport {\n WattDateRange,\n WattLocaleService,\n WattRange,\n WattSupportedLocales,\n dayjs,\n} from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\nimport {\n WattPickerBase,\n WattPickerValue,\n WattPlaceholderMaskComponent,\n} from '@energinet/watt/picker/__shared';\n\nconst dateShortFormat = 'DD-MM-YYYY';\nconst danishLocaleCode = 'da';\nexport const danishTimeZoneIdentifier = 'Europe/Copenhagen';\n\n/**\n * Usage:\n * `import { WattDatepickerComponent } from '@energinet-datahub/watt/datepicker';`\n *\n * IMPORTANT:\n * The styling is calculated based on our monospaced font.\n */\n@Component({\n selector: 'watt-datepicker',\n templateUrl: './watt-datepicker.component.html',\n styleUrls: ['./watt-datepicker.component.scss'],\n providers: [\n { provide: MatFormFieldControl, useExisting: WattDatepickerComponent },\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n ],\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDatepickerModule,\n MatInputModule,\n WattButtonComponent,\n WattFieldComponent,\n MaskitoModule,\n WattPlaceholderMaskComponent,\n ],\n})\nexport class WattDatepickerComponent extends WattPickerBase implements Validator, AfterViewInit {\n protected override elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected override changeDetectionRef = inject(ChangeDetectorRef);\n protected override ngControl = inject(NgControl, { optional: true, self: true });\n private localeService = inject(WattLocaleService);\n private locale: WattSupportedLocales = inject(LOCALE_ID) as WattSupportedLocales;\n\n max = input<Date>();\n min = input<Date>();\n rangeMonthOnlyMode = input(false);\n\n @Input() startAt: Date | null = null;\n @Input() label = '';\n\n /**\n * @ignore\n */\n @ViewChild(MatDatepickerInput)\n matDatepickerInput!: MatDatepickerInput<Date | null>;\n\n @ViewChild(MatDateRangePicker)\n matDateRangePicker!: MatDateRangePicker<Date | null>;\n\n @ViewChild(MatDateRangeInput)\n matDateRangeInput!: MatDateRangeInput<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild(MatStartDate)\n matStartDate!: MatStartDate<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild(MatEndDate)\n matEndDate!: MatEndDate<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild('actualInput')\n actualInput!: ElementRef;\n\n /**\n * @ignore\n */\n @ViewChild('dateInput')\n input!: ElementRef;\n\n /**\n * @ignore\n */\n @ViewChild('startDateInput')\n startInput!: ElementRef;\n\n /**\n * @ignore\n */\n @ViewChild('endDateInput')\n endInput!: ElementRef;\n /**\n * @ignore\n */\n protected _placeholder = this.getPlaceholder(this.getInputFormat());\n\n @Input() dateClass: MatCalendarCellClassFunction<Date> = () => '';\n\n /**\n * @ignore\n */\n datePlaceholder = this.getPlaceholderByLocale(this.locale);\n /**\n * @ignore\n */\n rangeSeparator = ' - ';\n /**\n * @ignore\n */\n rangePlaceholder = this.datePlaceholder + this.rangeSeparator + this.datePlaceholder;\n /**\n * @ignore\n */\n inputMask = computed(() =>\n maskitoDateOptionsGenerator({\n mode: 'dd/mm/yyyy',\n separator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n /**\n * @ignore\n */\n rangeInputMask = computed(() =>\n maskitoDateRangeOptionsGenerator({\n mode: 'dd/mm/yyyy',\n dateSeparator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n /**\n * @ignore\n */\n getPlaceholderByLocale(locale: WattSupportedLocales): string {\n return locale === 'da' ? 'dd-mm-åååå' : 'dd-mm-yyyy';\n }\n getRangePlaceholder(): string {\n return this.datePlaceholder + this.rangeSeparator + this.datePlaceholder;\n }\n constructor() {\n super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);\n\n effect(() => {\n const locale = this.localeService.locale();\n this.datePlaceholder = this.getPlaceholderByLocale(locale);\n this.rangePlaceholder = this.getRangePlaceholder();\n });\n\n effect(() => {\n this.rangeMonthOnlyMode();\n this.ngControl?.control?.updateValueAndValidity();\n });\n }\n\n override ngAfterViewInit() {\n super.ngAfterViewInit();\n this.ngControl?.control?.addValidators(this.validate.bind(this));\n }\n\n validate({ value }: AbstractControl<WattRange<string>>) {\n if (!value?.end || !value?.start) return null;\n if (!this.rangeMonthOnlyMode()) return null;\n const start = dayjs(value.start);\n const end = dayjs(value.end);\n return start.isSame(start.startOf('month')) && end.isSame(start.endOf('month'))\n ? null\n : { monthOnly: true };\n }\n\n protected initSingleInput() {\n if (this.initialValue) {\n this.matDatepickerInput.value = this.initialValue;\n this.datepickerClosed();\n }\n }\n\n inputChanged(value: string) {\n const dateString = value.slice(0, this.datePlaceholder.length);\n if (dateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n if (dateString.length !== this.datePlaceholder.length) {\n return;\n }\n const date = this.parseDateShortFormat(dateString);\n this.control?.setValue(this.formatDateFromViewToModel(date));\n }\n\n datepickerClosed() {\n if (this.matDatepickerInput.value) {\n this.control?.setValue(this.matDatepickerInput.value);\n (this.actualInput.nativeElement as HTMLInputElement).value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDatepickerInput.value)\n );\n } else {\n (this.actualInput.nativeElement as HTMLInputElement).value = '';\n this.control?.setValue(null);\n }\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n onMonthSelected(date: Date) {\n if (this.rangeMonthOnlyMode() && date) {\n this.matDateRangePicker.select(dayjs(date).startOf('month').toDate());\n this.matDateRangePicker.select(dayjs(date).endOf('month').toDate());\n this.matDateRangePicker.close();\n }\n }\n\n /**\n * @ignore\n */\n protected initRangeInput() {\n if (this.initialValue) {\n this.matStartDate.value = (this.initialValue as WattDateRange).start;\n this.matEndDate.value = (this.initialValue as WattDateRange).end;\n this.rangePickerClosed();\n }\n }\n\n clearRangePicker() {\n this.control?.setValue(null);\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n rangeInputChanged(value: string) {\n const startDateString = value.slice(0, this.datePlaceholder.length);\n\n if (startDateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (startDateString.length !== this.datePlaceholder.length) {\n return;\n }\n\n const start = this.parseDateShortFormat(startDateString);\n const endDateString = value.slice(this.datePlaceholder.length + this.rangeSeparator.length);\n let end = this.setEndDateToDanishTimeZone(endDateString);\n\n if (end !== null) {\n end = this.setToEndOfDay(end);\n this.control?.setValue({ start, end });\n }\n }\n\n rangePickerClosed() {\n if (this.matDateRangeInput.value?.start && this.matDateRangeInput.value.end) {\n (this.actualInput.nativeElement as HTMLInputElement).value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDateRangeInput.value?.start)\n ) +\n '-' +\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDateRangeInput.value.end)\n );\n this.control?.setValue({\n start: this.formatDateFromViewToModel(this.matDateRangeInput.value.start),\n end: this.formatDateFromViewToModel(this.matDateRangeInput.value.end),\n });\n } else {\n (this.actualInput.nativeElement as HTMLInputElement).value = '';\n this.control?.setValue(null);\n }\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n /**\n * @ignore\n */\n protected setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ) {\n this.setValueToInput(value, input, this.matDatepickerInput);\n }\n\n /**\n * @ignore\n */\n protected setRangeValue(\n value: WattDateRange | null,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ) {\n const { start, end } = value ?? {};\n\n this.setValueToInput(start, startInput, this.matStartDate);\n this.setValueToInput(end, endInput, this.matEndDate);\n }\n\n /**\n * @ignore\n */\n private getInputFormat(): string {\n const localeDateFormat = getLocaleDateFormat(this.locale, FormatWidth.Short);\n\n return localeDateFormat\n .toLowerCase()\n .replace(/d+/, 'dd')\n .replace(/m+/, 'mm')\n .replace(/y+/, 'yyyy')\n .replace(/\\./g, '-'); // seperator\n }\n\n /**\n * @ignore\n */\n private getPlaceholder(inputFormat: string): string {\n return this.locale === danishLocaleCode ? inputFormat.split('y').join('å') : inputFormat;\n }\n\n /**\n * @ignore\n */\n private parseDateShortFormat(value: string): Date {\n return dayjs(value, dateShortFormat).toDate();\n }\n\n /**\n * @ignore\n */\n private setValueToInput<D extends { value: Date | null }>(\n value: string | null | undefined,\n nativeInput: HTMLInputElement,\n matDateInput: D\n ): void {\n nativeInput.value = value ? this.formatDateTimeFromModelToView(value) : '';\n matDateInput.value = value ? dayjs(value).utc().toDate() : null;\n }\n\n /**\n * @ignore\n * Formats Date to full ISO 8601 format (e.g. `2022-08-31T22:00:00.000Z`)\n */\n private formatDateFromViewToModel(value: Date): string {\n return dayjs(value).utc().toISOString();\n }\n\n /**\n * @ignore\n */\n private formatDateTimeFromModelToView(value: string): string {\n return dayjs(value).tz(danishTimeZoneIdentifier).format(dateShortFormat);\n }\n\n /**\n * @ignore\n */\n private toDanishTimeZone(value: Date): Date {\n return dayjs(value.toISOString()).tz(danishTimeZoneIdentifier).toDate();\n }\n\n /**\n * @ignore\n */\n private setToEndOfDay(value: Date): Date {\n return dayjs(value).endOf('day').toDate();\n }\n\n /**\n * @ignore\n */\n private setEndDateToDanishTimeZone(value: string): Date | null {\n const dateBasedOnShortFormat = this.parseDateShortFormat(value);\n\n let maybeDateInDanishTimeZone: Date | null = null;\n\n if (dayjs(dateBasedOnShortFormat).isValid()) {\n maybeDateInDanishTimeZone = this.toDanishTimeZone(dateBasedOnShortFormat);\n }\n\n return maybeDateInDanishTimeZone;\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass\"\n [startAt]=\"startAt\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDatepickerIntlService {\n clear = 'Clear';\n select = 'OK';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDatepickerComponent } from './watt-datepicker.component';\nexport { danishTimeZoneIdentifier } from './watt-datepicker.component';\nexport { WattDatepickerIntlService } from './watt-datepicker-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AA+CA,MAAM,eAAe,GAAG,YAAY;AACpC,MAAM,gBAAgB,GAAG,IAAI;AACtB,MAAM,wBAAwB,GAAG;AAExC;;;;;;AAMG;AAmBG,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AACtC,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACxE,IAAA,aAAa,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACzC,IAAA,MAAM,GAAyB,MAAM,CAAC,SAAS,CAAyB;IAEhF,GAAG,GAAG,KAAK,EAAQ;IACnB,GAAG,GAAG,KAAK,EAAQ;AACnB,IAAA,kBAAkB,GAAG,KAAK,CAAC,KAAK,CAAC;IAExB,OAAO,GAAgB,IAAI;IAC3B,KAAK,GAAG,EAAE;AAEnB;;AAEG;AAEH,IAAA,kBAAkB;AAGlB,IAAA,kBAAkB;AAGlB,IAAA,iBAAiB;AAEjB;;AAEG;AAEH,IAAA,YAAY;AAEZ;;AAEG;AAEH,IAAA,UAAU;AAEV;;AAEG;AAEH,IAAA,WAAW;AAEX;;AAEG;AAEH,IAAA,KAAK;AAEL;;AAEG;AAEH,IAAA,UAAU;AAEV;;AAEG;AAEH,IAAA,QAAQ;AACR;;AAEG;IACO,YAAY,GAAG,IAAI,CAAC,cA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BAAC,cAAc;gBAOhB,SAAS,EAAA,CAAA;sBAAjB;;;AE/JH;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAIa,yBAAyB,CAAA;IACpC,KAAK,GAAG,OAAO;IACf,MAAM,GAAG,IAAI;uGAFF,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-picker-datepicker.mjs","sources":["../../../libs/watt/package/picker/datepicker/watt-datepicker.component.ts","../../../libs/watt/package/picker/datepicker/watt-datepicker.component.html","../../../libs/watt/package/picker/datepicker/watt-datepicker-intl.service.ts","../../../libs/watt/package/picker/datepicker/index.ts","../../../libs/watt/package/picker/datepicker/energinet-watt-picker-datepicker.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { FormatWidth, getLocaleDateFormat } from '@angular/common';\nimport {\n ChangeDetectorRef,\n Component,\n ElementRef,\n LOCALE_ID,\n ViewChild,\n ViewEncapsulation,\n computed,\n inject,\n input,\n AfterViewInit,\n effect,\n linkedSignal,\n booleanAttribute,\n} from '@angular/core';\nimport { AbstractControl, NgControl, Validator } from '@angular/forms';\nimport {\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n MatCalendarCellClassFunction,\n MatDateRangeInput,\n MatDateRangePicker,\n MatDatepickerInput,\n MatDatepickerModule,\n MatEndDate,\n MatStartDate,\n} from '@angular/material/datepicker';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MaskitoModule } from '@maskito/angular';\nimport { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport {\n WattDateRange,\n WattLocaleService,\n WattRange,\n WattSupportedLocales,\n dayjs,\n} from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\nimport {\n WattPickerBase,\n WattPickerValue,\n WattPlaceholderMaskComponent,\n} from '@energinet/watt/picker/__shared';\n\nconst dateShortFormat = 'DD-MM-YYYY';\nconst danishLocaleCode = 'da';\nexport const danishTimeZoneIdentifier = 'Europe/Copenhagen';\n\n/**\n * Usage:\n * `import { WattDatepickerComponent } from '@energinet-datahub/watt/datepicker';`\n *\n * IMPORTANT:\n * The styling is calculated based on our monospaced font.\n */\n@Component({\n selector: 'watt-datepicker',\n templateUrl: './watt-datepicker.component.html',\n styleUrls: ['./watt-datepicker.component.scss'],\n providers: [\n { provide: MatFormFieldControl, useExisting: WattDatepickerComponent },\n MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,\n ],\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDatepickerModule,\n MatInputModule,\n WattButtonComponent,\n WattFieldComponent,\n MaskitoModule,\n WattPlaceholderMaskComponent,\n ],\n})\nexport class WattDatepickerComponent extends WattPickerBase implements Validator, AfterViewInit {\n protected override elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected override changeDetectionRef = inject(ChangeDetectorRef);\n protected override ngControl = inject(NgControl, { optional: true, self: true });\n private localeService = inject(WattLocaleService);\n private locale = inject<WattSupportedLocales>(LOCALE_ID);\n\n max = input<Date>();\n min = input<Date>();\n rangeMonthOnlyMode = input(false);\n startAt = input<Date | null>(null);\n label = input<string>('');\n dateClass = input<MatCalendarCellClassFunction<Date>>(() => '');\n canStepThroughDays = input(false, { transform: booleanAttribute });\n\n /**\n * @ignore\n */\n @ViewChild(MatDatepickerInput)\n matDatepickerInput!: MatDatepickerInput<Date | null>;\n\n @ViewChild(MatDateRangePicker)\n matDateRangePicker!: MatDateRangePicker<Date | null>;\n\n @ViewChild(MatDateRangeInput)\n matDateRangeInput!: MatDateRangeInput<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild(MatStartDate)\n matStartDate!: MatStartDate<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild(MatEndDate)\n matEndDate!: MatEndDate<Date | null>;\n\n /**\n * @ignore\n */\n @ViewChild('actualInput')\n actualInput!: ElementRef<HTMLInputElement>;\n\n /**\n * @ignore\n */\n @ViewChild('dateInput')\n input!: ElementRef<HTMLInputElement>;\n\n /**\n * @ignore\n */\n @ViewChild('startDateInput')\n startInput!: ElementRef<HTMLInputElement>;\n\n /**\n * @ignore\n */\n @ViewChild('endDateInput')\n endInput!: ElementRef<HTMLInputElement>;\n /**\n * @ignore\n */\n protected _placeholder = this.getPlaceholder(this.getInputFormat());\n\n /**\n * @ignore\n */\n datePlaceholder = this.getPlaceholderByLocale(this.locale);\n\n /**\n * @ignore\n */\n rangeSeparator = ' - ';\n\n /**\n * @ignore\n */\n rangePlaceholder = this.datePlaceholder + this.rangeSeparator + this.datePlaceholder;\n\n /**\n * @ignore\n */\n inputMask = computed(() =>\n maskitoDateOptionsGenerator({\n mode: 'dd/mm/yyyy',\n separator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n /**\n * @ignore\n */\n rangeInputMask = computed(() =>\n maskitoDateRangeOptionsGenerator({\n mode: 'dd/mm/yyyy',\n dateSeparator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n /**\n * @ignore\n */\n getPlaceholderByLocale(locale: WattSupportedLocales): string {\n return locale === 'da' ? 'dd-mm-åååå' : 'dd-mm-yyyy';\n }\n getRangePlaceholder(): string {\n return this.datePlaceholder + this.rangeSeparator + this.datePlaceholder;\n }\n\n isPrevDayButtonDisabled = linkedSignal(() => this.isPrevDayBeforeOrEqualToMinDate());\n isNextDayButtonDisabled = linkedSignal(() => this.isNextDayAfterOrEqualToMaxDate());\n\n constructor() {\n super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);\n\n effect(() => {\n const locale = this.localeService.locale();\n this.datePlaceholder = this.getPlaceholderByLocale(locale);\n this.rangePlaceholder = this.getRangePlaceholder();\n });\n\n effect(() => {\n this.rangeMonthOnlyMode();\n this.ngControl?.control?.updateValueAndValidity();\n });\n }\n\n override ngAfterViewInit() {\n super.ngAfterViewInit();\n\n this.ngControl?.control?.addValidators(this.validate.bind(this));\n }\n\n validate({ value }: AbstractControl<WattRange<string>>) {\n if (!value?.end || !value?.start) return null;\n if (!this.rangeMonthOnlyMode()) return null;\n const start = dayjs(value.start);\n const end = dayjs(value.end);\n return start.isSame(start.startOf('month')) && end.isSame(start.endOf('month'))\n ? null\n : { monthOnly: true };\n }\n\n protected initSingleInput() {\n if (this.initialValue) {\n this.matDatepickerInput.value = this.initialValue;\n this.datepickerClosed();\n }\n }\n\n inputChanged(value: string) {\n const dateString = value.slice(0, this.datePlaceholder.length);\n\n if (dateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (dateString.length !== this.datePlaceholder.length) {\n return;\n }\n\n const date = this.parseDateShortFormat(dateString);\n this.control?.setValue(this.formatDateFromViewToModel(date));\n }\n\n datepickerClosed() {\n if (this.matDatepickerInput.value) {\n this.control?.setValue(this.matDatepickerInput.value);\n\n this.actualInput.nativeElement.value = this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDatepickerInput.value)\n );\n } else {\n this.actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n this.isPrevDayButtonDisabled.set(this.isPrevDayBeforeOrEqualToMinDate());\n this.isNextDayButtonDisabled.set(this.isNextDayAfterOrEqualToMaxDate());\n\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n onMonthSelected(date: Date) {\n if (this.rangeMonthOnlyMode() && date) {\n this.matDateRangePicker.select(dayjs(date).startOf('month').toDate());\n this.matDateRangePicker.select(dayjs(date).endOf('month').toDate());\n this.matDateRangePicker.close();\n }\n }\n\n /**\n * @ignore\n */\n protected initRangeInput() {\n if (this.initialValue) {\n this.matStartDate.value = (this.initialValue as WattDateRange).start;\n this.matEndDate.value = (this.initialValue as WattDateRange).end;\n this.rangePickerClosed();\n }\n }\n\n clearRangePicker() {\n this.control?.setValue(null);\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n rangeInputChanged(value: string) {\n const startDateString = value.slice(0, this.datePlaceholder.length);\n\n if (startDateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (startDateString.length !== this.datePlaceholder.length) {\n return;\n }\n\n const start = this.parseDateShortFormat(startDateString);\n const endDateString = value.slice(this.datePlaceholder.length + this.rangeSeparator.length);\n let end = this.setEndDateToDanishTimeZone(endDateString);\n\n if (end !== null) {\n end = this.setToEndOfDay(end);\n this.control?.setValue({ start, end });\n }\n }\n\n rangePickerClosed() {\n if (this.matDateRangeInput.value?.start && this.matDateRangeInput.value.end) {\n this.actualInput.nativeElement.value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDateRangeInput.value?.start)\n ) +\n '-' +\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(this.matDateRangeInput.value.end)\n );\n\n this.control?.setValue({\n start: this.formatDateFromViewToModel(this.matDateRangeInput.value.start),\n end: this.formatDateFromViewToModel(this.matDateRangeInput.value.end),\n });\n } else {\n this.actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n this.actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n /**\n * @ignore\n */\n protected setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ) {\n this.setValueToInput(value, input, this.matDatepickerInput);\n }\n\n /**\n * @ignore\n */\n protected setRangeValue(\n value: WattDateRange | null,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ) {\n const { start, end } = value ?? {};\n\n this.setValueToInput(start, startInput, this.matStartDate);\n this.setValueToInput(end, endInput, this.matEndDate);\n }\n /**\n * @ignore\n */\n prevDay(): void {\n this.changeDay(-1);\n }\n /**\n * @ignore\n */\n nextDay(): void {\n this.changeDay(1);\n }\n\n /**\n * @ignore\n */\n private changeDay(value: number): void {\n const currentDate = this.matDatepickerInput.value;\n\n if (currentDate) {\n const newDate = dayjs(currentDate).add(value, 'day').toISOString();\n const newDateFormatted = this.formatDateTimeFromModelToView(newDate);\n\n this.inputChanged(newDateFormatted);\n this.datepickerClosed();\n }\n }\n\n /**\n * @ignore\n */\n private isPrevDayBeforeOrEqualToMinDate() {\n const min = this.min();\n const selectedDate = this.matDatepickerInput?.value;\n\n if (!min || !selectedDate) return false;\n\n const isBefore = dayjs(selectedDate).isBefore(min, 'day');\n const isSame = dayjs(selectedDate).isSame(min, 'day');\n\n return isSame || isBefore;\n }\n\n /**\n * @ignore\n */\n private isNextDayAfterOrEqualToMaxDate() {\n const max = this.max();\n const selectedDate = this.matDatepickerInput?.value;\n\n if (!max || !selectedDate) return false;\n\n const isAfter = dayjs(selectedDate).isAfter(max, 'day');\n const isSame = dayjs(selectedDate).isSame(max, 'day');\n\n return isSame || isAfter;\n }\n\n /**\n * @ignore\n */\n private getInputFormat(): string {\n const localeDateFormat = getLocaleDateFormat(this.locale, FormatWidth.Short);\n\n return localeDateFormat\n .toLowerCase()\n .replace(/d+/, 'dd')\n .replace(/m+/, 'mm')\n .replace(/y+/, 'yyyy')\n .replace(/\\./g, '-'); // seperator\n }\n\n /**\n * @ignore\n */\n private getPlaceholder(inputFormat: string): string {\n return this.locale === danishLocaleCode ? inputFormat.split('y').join('å') : inputFormat;\n }\n\n /**\n * @ignore\n */\n private parseDateShortFormat(value: string): Date {\n return dayjs(value, dateShortFormat).toDate();\n }\n\n /**\n * @ignore\n */\n private setValueToInput<D extends { value: Date | null }>(\n value: string | null | undefined,\n nativeInput: HTMLInputElement,\n matDateInput: D\n ): void {\n nativeInput.value = value ? this.formatDateTimeFromModelToView(value) : '';\n matDateInput.value = value ? dayjs(value).utc().toDate() : null;\n }\n\n /**\n * @ignore\n * Formats Date to full ISO 8601 format (e.g. `2022-08-31T22:00:00.000Z`)\n */\n private formatDateFromViewToModel(value: Date): string {\n return dayjs(value).utc().toISOString();\n }\n\n /**\n * @ignore\n */\n private formatDateTimeFromModelToView(value: string): string {\n return dayjs(value).tz(danishTimeZoneIdentifier).format(dateShortFormat);\n }\n\n /**\n * @ignore\n */\n private toDanishTimeZone(value: Date): Date {\n return dayjs(value.toISOString()).tz(danishTimeZoneIdentifier).toDate();\n }\n\n /**\n * @ignore\n */\n private setToEndOfDay(value: Date): Date {\n return dayjs(value).endOf('day').toDate();\n }\n\n /**\n * @ignore\n */\n private setEndDateToDanishTimeZone(value: string): Date | null {\n const dateBasedOnShortFormat = this.parseDateShortFormat(value);\n\n let maybeDateInDanishTimeZone: Date | null = null;\n\n if (dayjs(dateBasedOnShortFormat).isValid()) {\n maybeDateInDanishTimeZone = this.toDanishTimeZone(dateBasedOnShortFormat);\n }\n\n return maybeDateInDanishTimeZone;\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"datePlaceholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n</watt-field>\n\n@if (!range && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled || isNextDayButtonDisabled()\"\n />\n </span>\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDatepickerIntlService {\n clear = 'Clear';\n select = 'OK';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDatepickerComponent } from './watt-datepicker.component';\nexport { danishTimeZoneIdentifier } from './watt-datepicker.component';\nexport { WattDatepickerIntlService } from './watt-datepicker-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAiDA,MAAM,eAAe,GAAG,YAAY;AACpC,MAAM,gBAAgB,GAAG,IAAI;AACtB,MAAM,wBAAwB,GAAG;AAExC;;;;;;AAMG;AAmBG,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AACtC,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACxE,IAAA,aAAa,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACzC,IAAA,MAAM,GAAG,MAAM,CAAuB,SAAS,CAAC;IAExD,GAAG,GAAG,KAAK,EAAQ;IACnB,GAAG,GAAG,KAAK,EAAQ;AACnB,IAAA,kBAAkB,GAAG,KAAK,CAAC,KAAK,CAAC;AACjC,IAAA,OAAO,GAAG,KAAK,CAAc,IAAI,CAAC;AAClC,IAAA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,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -21,8 +21,10 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
|
|
|
21
21
|
max: import("@angular/core").InputSignal<Date | undefined>;
|
|
22
22
|
min: import("@angular/core").InputSignal<Date | undefined>;
|
|
23
23
|
rangeMonthOnlyMode: import("@angular/core").InputSignal<boolean>;
|
|
24
|
-
startAt: Date | null
|
|
25
|
-
label: string
|
|
24
|
+
startAt: import("@angular/core").InputSignal<Date | null>;
|
|
25
|
+
label: import("@angular/core").InputSignal<string>;
|
|
26
|
+
dateClass: import("@angular/core").InputSignal<MatCalendarCellClassFunction<Date>>;
|
|
27
|
+
canStepThroughDays: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
26
28
|
/**
|
|
27
29
|
* @ignore
|
|
28
30
|
*/
|
|
@@ -40,24 +42,23 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
|
|
|
40
42
|
/**
|
|
41
43
|
* @ignore
|
|
42
44
|
*/
|
|
43
|
-
actualInput: ElementRef
|
|
45
|
+
actualInput: ElementRef<HTMLInputElement>;
|
|
44
46
|
/**
|
|
45
47
|
* @ignore
|
|
46
48
|
*/
|
|
47
|
-
input: ElementRef
|
|
49
|
+
input: ElementRef<HTMLInputElement>;
|
|
48
50
|
/**
|
|
49
51
|
* @ignore
|
|
50
52
|
*/
|
|
51
|
-
startInput: ElementRef
|
|
53
|
+
startInput: ElementRef<HTMLInputElement>;
|
|
52
54
|
/**
|
|
53
55
|
* @ignore
|
|
54
56
|
*/
|
|
55
|
-
endInput: ElementRef
|
|
57
|
+
endInput: ElementRef<HTMLInputElement>;
|
|
56
58
|
/**
|
|
57
59
|
* @ignore
|
|
58
60
|
*/
|
|
59
61
|
protected _placeholder: string;
|
|
60
|
-
dateClass: MatCalendarCellClassFunction<Date>;
|
|
61
62
|
/**
|
|
62
63
|
* @ignore
|
|
63
64
|
*/
|
|
@@ -83,6 +84,8 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
|
|
|
83
84
|
*/
|
|
84
85
|
getPlaceholderByLocale(locale: WattSupportedLocales): string;
|
|
85
86
|
getRangePlaceholder(): string;
|
|
87
|
+
isPrevDayButtonDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
88
|
+
isNextDayButtonDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
86
89
|
constructor();
|
|
87
90
|
ngAfterViewInit(): void;
|
|
88
91
|
validate({ value }: AbstractControl<WattRange<string>>): {
|
|
@@ -107,6 +110,26 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
|
|
|
107
110
|
* @ignore
|
|
108
111
|
*/
|
|
109
112
|
protected setRangeValue(value: WattDateRange | null, startInput: HTMLInputElement, endInput: HTMLInputElement): void;
|
|
113
|
+
/**
|
|
114
|
+
* @ignore
|
|
115
|
+
*/
|
|
116
|
+
prevDay(): void;
|
|
117
|
+
/**
|
|
118
|
+
* @ignore
|
|
119
|
+
*/
|
|
120
|
+
nextDay(): void;
|
|
121
|
+
/**
|
|
122
|
+
* @ignore
|
|
123
|
+
*/
|
|
124
|
+
private changeDay;
|
|
125
|
+
/**
|
|
126
|
+
* @ignore
|
|
127
|
+
*/
|
|
128
|
+
private isPrevDayBeforeOrEqualToMinDate;
|
|
129
|
+
/**
|
|
130
|
+
* @ignore
|
|
131
|
+
*/
|
|
132
|
+
private isNextDayAfterOrEqualToMaxDate;
|
|
110
133
|
/**
|
|
111
134
|
* @ignore
|
|
112
135
|
*/
|
|
@@ -145,5 +168,5 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
|
|
|
145
168
|
*/
|
|
146
169
|
private setEndDateToDanishTimeZone;
|
|
147
170
|
static ɵfac: i0.ɵɵFactoryDeclaration<WattDatepickerComponent, never>;
|
|
148
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WattDatepickerComponent, "watt-datepicker", never, { "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "rangeMonthOnlyMode": { "alias": "rangeMonthOnlyMode"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; }; "label": { "alias": "label"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, {}, never, ["*", "watt-field-hint", "watt-field-error"], true, never>;
|
|
171
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WattDatepickerComponent, "watt-datepicker", never, { "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "rangeMonthOnlyMode": { "alias": "rangeMonthOnlyMode"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "canStepThroughDays": { "alias": "canStepThroughDays"; "required": false; "isSignal": true; }; }, {}, never, ["*", "watt-field-hint", "watt-field-error"], true, never>;
|
|
149
172
|
}
|