@yuuvis/client-framework 2.3.2 → 2.3.4
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/datepicker/index.d.ts +1 -0
- package/datepicker/lib/date-input/date-input.component.d.ts +1 -3
- package/datepicker/lib/time-input/time-input.component.d.ts +0 -4
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +34 -45
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +30 -11
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +5 -4
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/lib/assets/i18n/de.json +2 -1
- package/lib/assets/i18n/en.json +2 -1
- package/object-details/lib/object-metadata/object-metadata-section/object-metadata-section.component.d.ts +3 -1
- package/object-details/lib/object-metadata/object-metadata.component.d.ts +2 -0
- package/package.json +9 -9
- package/tile-list/lib/tile-list/tile-list.component.d.ts +1 -2
package/datepicker/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export * from './lib/datepicker.component';
|
|
|
3
3
|
export * from './lib/datepicker.interface';
|
|
4
4
|
export * from './lib/calendar/calendar.component';
|
|
5
5
|
export * from './lib/datepicker-calendar/datepicker-calendar-trigger.component';
|
|
6
|
+
export * from './lib/time-input/time-input.component';
|
|
@@ -34,15 +34,13 @@ export declare class DateInputComponent implements OnInit, OnDestroy {
|
|
|
34
34
|
dateInputForm?: FormGroup;
|
|
35
35
|
currentDayPeriod?: DayPeriod;
|
|
36
36
|
dayPeriodLabels: DayPeriodLabels;
|
|
37
|
-
_placeholderVisible: boolean;
|
|
38
37
|
constructor(datepickerService: DatepickerService, fb: FormBuilder, elRef: ElementRef);
|
|
39
38
|
private _setupForm;
|
|
40
39
|
private _setInvalidInputError;
|
|
41
40
|
private _checkAndPropagateForm;
|
|
42
41
|
private _formToDate;
|
|
43
42
|
private _focusInput;
|
|
44
|
-
|
|
45
|
-
onDateInputFocus(): void;
|
|
43
|
+
onFormClick(event: MouseEvent): void;
|
|
46
44
|
onDateInputBlur(): void;
|
|
47
45
|
focusFirstInput(): void;
|
|
48
46
|
private _getFocusableElements;
|
|
@@ -21,10 +21,6 @@ export declare class TimeInputComponent implements OnDestroy, ControlValueAccess
|
|
|
21
21
|
form: FormGroup;
|
|
22
22
|
constructor(fb: FormBuilder);
|
|
23
23
|
private _propagate;
|
|
24
|
-
increaseHour(): void;
|
|
25
|
-
decreaseHour(): void;
|
|
26
|
-
increaseMinute(): void;
|
|
27
|
-
decreaseMinute(): void;
|
|
28
24
|
private _patch;
|
|
29
25
|
propagateChange: (_: any) => void;
|
|
30
26
|
writeValue(value: TimeValue): void;
|
|
@@ -4,18 +4,20 @@ import * as i2 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i4 from '@angular/material/select';
|
|
8
8
|
import { MatSelectModule } from '@angular/material/select';
|
|
9
9
|
import { ReplaySubject } from 'rxjs';
|
|
10
|
-
import * as
|
|
10
|
+
import * as i1$3 from '@angular/material/button';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
12
|
import * as i2$1 from '@angular/material/icon';
|
|
13
13
|
import { MatIconModule } from '@angular/material/icon';
|
|
14
|
+
import * as i3 from '@yuuvis/client-core';
|
|
15
|
+
import { TranslateModule } from '@yuuvis/client-core';
|
|
14
16
|
import * as i1$1 from '@angular/material/dialog';
|
|
15
17
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
16
18
|
import * as i1$2 from '@yuuvis/client-framework/common';
|
|
17
19
|
import { FocusWithinDirective } from '@yuuvis/client-framework/common';
|
|
18
|
-
import { YmtButtonDirective } from '@yuuvis/material';
|
|
20
|
+
import { YmtButtonDirective, YmtIconButtonDirective } from '@yuuvis/material';
|
|
19
21
|
|
|
20
22
|
const DEFAULT_DAY_PERIOD_LABELS = {
|
|
21
23
|
am: 'AM',
|
|
@@ -407,7 +409,7 @@ class DateInputElementComponent {
|
|
|
407
409
|
useExisting: forwardRef(() => DateInputElementComponent),
|
|
408
410
|
multi: true
|
|
409
411
|
}
|
|
410
|
-
], ngImport: i0, template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host input{font-size:var(--
|
|
412
|
+
], ngImport: i0, template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host.time input{font:var(--ymt-font-headline-large-font);font-size:var(--ymt-font-headline-large-size)}:host input{font:var(--ymt-font-body-font);font-size:var(--ymt-font-body-size);width:2ch;padding:0;flex:1;line-height:1em;text-align:end;border:0;background-color:transparent;outline:0}:host input::placeholder{font:var(--ymt-font-body-font);color:var(--placeholder-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
411
413
|
}
|
|
412
414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateInputElementComponent, decorators: [{
|
|
413
415
|
type: Component,
|
|
@@ -422,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
422
424
|
useExisting: forwardRef(() => DateInputElementComponent),
|
|
423
425
|
multi: true
|
|
424
426
|
}
|
|
425
|
-
], template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host input{font-size:var(--
|
|
427
|
+
], template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host.time input{font:var(--ymt-font-headline-large-font);font-size:var(--ymt-font-headline-large-size)}:host input{font:var(--ymt-font-body-font);font-size:var(--ymt-font-body-size);width:2ch;padding:0;flex:1;line-height:1em;text-align:end;border:0;background-color:transparent;outline:0}:host input::placeholder{font:var(--ymt-font-body-font);color:var(--placeholder-color)}\n"] }]
|
|
426
428
|
}], propDecorators: { pasteHandler: [{
|
|
427
429
|
type: HostListener,
|
|
428
430
|
args: ['paste', ['$event']]
|
|
@@ -475,7 +477,7 @@ class DateInputHourElementComponent extends DateInputElementComponent {
|
|
|
475
477
|
useExisting: forwardRef(() => DateInputHourElementComponent),
|
|
476
478
|
multi: true
|
|
477
479
|
}
|
|
478
|
-
], usesInheritance: true, ngImport: i0, template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host input{font-size:var(--
|
|
480
|
+
], usesInheritance: true, ngImport: i0, template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host.time input{font:var(--ymt-font-headline-large-font);font-size:var(--ymt-font-headline-large-size)}:host input{font:var(--ymt-font-body-font);font-size:var(--ymt-font-body-size);width:2ch;padding:0;flex:1;line-height:1em;text-align:end;border:0;background-color:transparent;outline:0}:host input::placeholder{font:var(--ymt-font-body-font);color:var(--placeholder-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
479
481
|
}
|
|
480
482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateInputHourElementComponent, decorators: [{
|
|
481
483
|
type: Component,
|
|
@@ -490,7 +492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
490
492
|
useExisting: forwardRef(() => DateInputHourElementComponent),
|
|
491
493
|
multi: true
|
|
492
494
|
}
|
|
493
|
-
], template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host input{font-size:var(--
|
|
495
|
+
], template: "<input\n[placeholder]=\"placeholder()\"\n type=\"text\"\n (focus)=\"focusHandler($event)\"\n (keydown)=\"keydownHandler($event)\"\n (wheel)=\"wheelHandler($event)\"\n (blur)=\"onBlur()\"\n [readonly]=\"disabled\"\n pattern=\"[0-9]*\"\n [maxlength]=\"maxLength\"\n [(ngModel)]=\"_value\"\n (ngModelChange)=\"onInputChange($event)\"\n/>\n", styles: [":host{height:100%;display:flex;flex-flow:column;align-items:center;justify-content:flex-end;cursor:default}:host.year input{width:4ch}:host.time input{font:var(--ymt-font-headline-large-font);font-size:var(--ymt-font-headline-large-size)}:host input{font:var(--ymt-font-body-font);font-size:var(--ymt-font-body-size);width:2ch;padding:0;flex:1;line-height:1em;text-align:end;border:0;background-color:transparent;outline:0}:host input::placeholder{font:var(--ymt-font-body-font);color:var(--placeholder-color)}\n"] }]
|
|
494
496
|
}], ctorParameters: () => [], propDecorators: { dayPeriod: [{
|
|
495
497
|
type: Input
|
|
496
498
|
}], dayPeriodChange: [{
|
|
@@ -547,18 +549,6 @@ class TimeInputComponent {
|
|
|
547
549
|
this.propagateChange(this._time);
|
|
548
550
|
}
|
|
549
551
|
}
|
|
550
|
-
increaseHour() {
|
|
551
|
-
this.hourInput.increaseValue();
|
|
552
|
-
}
|
|
553
|
-
decreaseHour() {
|
|
554
|
-
this.hourInput.decreaseValue();
|
|
555
|
-
}
|
|
556
|
-
increaseMinute() {
|
|
557
|
-
this.minuteInput.increaseValue();
|
|
558
|
-
}
|
|
559
|
-
decreaseMinute() {
|
|
560
|
-
this.minuteInput.decreaseValue();
|
|
561
|
-
}
|
|
562
552
|
_patch(value, silent) {
|
|
563
553
|
if (!this._time) {
|
|
564
554
|
const now = new Date();
|
|
@@ -602,7 +592,7 @@ class TimeInputComponent {
|
|
|
602
592
|
useExisting: forwardRef(() => TimeInputComponent),
|
|
603
593
|
multi: true
|
|
604
594
|
}
|
|
605
|
-
], viewQueries: [{ propertyName: "hourInput", first: true, predicate: ["dipHour"], descendants: true }, { propertyName: "minuteInput", first: true, predicate: ["dipMinute"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <
|
|
595
|
+
], viewQueries: [{ propertyName: "hourInput", first: true, predicate: ["dipHour"], descendants: true }, { propertyName: "minuteInput", first: true, predicate: ["dipMinute"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <yuv-date-input-hour-element\n #dipHour\n class=\"time hour focusable\"\n [(dayPeriod)]=\"currentDayPeriod\"\n formControlName=\"hour\"\n [maxLength]=\"2\"\n ></yuv-date-input-hour-element>\n\n <div class=\"literal\">:</div>\n\n <yuv-date-input-element\n #dipMinute\n class=\"time minute focusable\"\n [maxValue]=\"59\"\n [minValue]=\"0\"\n formControlName=\"minute\"\n [maxLength]=\"2\"\n ></yuv-date-input-element>\n\n @if (hour12) {\n <div class=\"dayPeriod\">\n <button type=\"button\" class=\"dp pm\" [ngClass]=\"{ active: currentDayPeriod === 'pm' }\" (click)=\"currentDayPeriod = 'pm'\">\n {{ dayPeriodLabels.pm }}\n </button>\n <button type=\"button\" class=\"dp am\" [ngClass]=\"{ active: currentDayPeriod === 'am' }\" (click)=\"currentDayPeriod = 'am'\">\n {{ dayPeriodLabels.am }}\n </button>\n </div>\n }\n</form>\n", styles: [":host{--time-input-border-color: var(--ymt-outline-variant)}:host form{display:grid;grid-template-rows:auto;grid-template-columns:max-content max-content max-content max-content;grid-template-areas:\"hin div min period\"}:host form .literal{grid-area:div;display:flex;padding:0 var(--ymt-spacing-2xs);align-items:center}:host form yuv-date-input-hour-element,:host form yuv-date-input-element{border:1px solid var(--time-input-border-color);border-radius:var(--ymt-corner-xs);padding:var(--ymt-spacing-2xs);justify-content:center}:host form yuv-date-input-hour-element.hour,:host form yuv-date-input-element.hour{grid-area:hin}:host form yuv-date-input-hour-element.minute,:host form yuv-date-input-element.minute{grid-area:min}:host form .dayPeriod{grid-area:period;display:flex;flex-flow:column;justify-content:center;margin-inline-start:var(--ymt-spacing-xs)}:host form .dayPeriod>button.dp{padding:.2em;line-height:1em;margin:1px 0;border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-xs);background-color:transparent}:host form .dayPeriod>button.dp.active{background-color:var(--ymt-primary);border-color:var(--ymt-primary);color:var(--ymt-on-primary)}:host form .dayPeriod>button.dp:not(.active):hover{background-color:var(--ymt-hover-background);color:var(--ymt-on-hover-background)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: DateInputHourElementComponent, selector: "yuv-date-input-hour-element", inputs: ["dayPeriod"], outputs: ["dayPeriodChange"] }, { kind: "component", type: DateInputElementComponent, selector: "yuv-date-input-element", inputs: ["maxLength", "maxValue", "minValue", "disabled", "placeholder"], outputs: ["next", "prev"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
606
596
|
}
|
|
607
597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TimeInputComponent, decorators: [{
|
|
608
598
|
type: Component,
|
|
@@ -612,7 +602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
612
602
|
useExisting: forwardRef(() => TimeInputComponent),
|
|
613
603
|
multi: true
|
|
614
604
|
}
|
|
615
|
-
], template: "<form [formGroup]=\"form\">\n <
|
|
605
|
+
], template: "<form [formGroup]=\"form\">\n <yuv-date-input-hour-element\n #dipHour\n class=\"time hour focusable\"\n [(dayPeriod)]=\"currentDayPeriod\"\n formControlName=\"hour\"\n [maxLength]=\"2\"\n ></yuv-date-input-hour-element>\n\n <div class=\"literal\">:</div>\n\n <yuv-date-input-element\n #dipMinute\n class=\"time minute focusable\"\n [maxValue]=\"59\"\n [minValue]=\"0\"\n formControlName=\"minute\"\n [maxLength]=\"2\"\n ></yuv-date-input-element>\n\n @if (hour12) {\n <div class=\"dayPeriod\">\n <button type=\"button\" class=\"dp pm\" [ngClass]=\"{ active: currentDayPeriod === 'pm' }\" (click)=\"currentDayPeriod = 'pm'\">\n {{ dayPeriodLabels.pm }}\n </button>\n <button type=\"button\" class=\"dp am\" [ngClass]=\"{ active: currentDayPeriod === 'am' }\" (click)=\"currentDayPeriod = 'am'\">\n {{ dayPeriodLabels.am }}\n </button>\n </div>\n }\n</form>\n", styles: [":host{--time-input-border-color: var(--ymt-outline-variant)}:host form{display:grid;grid-template-rows:auto;grid-template-columns:max-content max-content max-content max-content;grid-template-areas:\"hin div min period\"}:host form .literal{grid-area:div;display:flex;padding:0 var(--ymt-spacing-2xs);align-items:center}:host form yuv-date-input-hour-element,:host form yuv-date-input-element{border:1px solid var(--time-input-border-color);border-radius:var(--ymt-corner-xs);padding:var(--ymt-spacing-2xs);justify-content:center}:host form yuv-date-input-hour-element.hour,:host form yuv-date-input-element.hour{grid-area:hin}:host form yuv-date-input-hour-element.minute,:host form yuv-date-input-element.minute{grid-area:min}:host form .dayPeriod{grid-area:period;display:flex;flex-flow:column;justify-content:center;margin-inline-start:var(--ymt-spacing-xs)}:host form .dayPeriod>button.dp{padding:.2em;line-height:1em;margin:1px 0;border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-xs);background-color:transparent}:host form .dayPeriod>button.dp.active{background-color:var(--ymt-primary);border-color:var(--ymt-primary);color:var(--ymt-on-primary)}:host form .dayPeriod>button.dp:not(.active):hover{background-color:var(--ymt-hover-background);color:var(--ymt-on-hover-background)}\n"] }]
|
|
616
606
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { hourInput: [{
|
|
617
607
|
type: ViewChild,
|
|
618
608
|
args: ['dipHour']
|
|
@@ -1014,13 +1004,15 @@ class CalendarComponent {
|
|
|
1014
1004
|
this.#buildDate();
|
|
1015
1005
|
}
|
|
1016
1006
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1017
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CalendarComponent, isStandalone: true, selector: "yuv-calendar", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, onlyFutureDates: { classPropertyName: "onlyFutureDates", publicName: "onlyFutureDates", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, withTime: { classPropertyName: "withTime", publicName: "withTime", isSignal: true, isRequired: false, transformFunction: null }, hour12: { classPropertyName: "hour12", publicName: "hour12", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, host: { attributes: { "tabindex": "0" }, listeners: { "keydown": "keyDownHandler($event)" } }, providers: [DatepickerService], viewQueries: [{ propertyName: "calEl", first: true, predicate: ["cal"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"date\">\n <header>\n <div class=\"month-picker\">\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"month\" (ngModelChange)=\"selectMonthOfYear($event)\">\n <mat-select-trigger>\n {{ month !== undefined ? months[month].label : '' }} \n </mat-select-trigger>\n @for (m of months; track $index) {\n <mat-option [value]=\"m.value\">{{ m.label }}</mat-option>\n }\n </mat-select>\n </div>\n\n <input\n class=\"year-picker\"\n name=\"year\"\n type=\"number\"\n [min]=\"minYear\"\n [max]=\"maxYear\"\n [(ngModel)]=\"_offsetYear\"\n (keydown)=\"onYearInputKeydown($event)\"\n (ngModelChange)=\"selectYear($event)\"\n />\n </header>\n <main>\n <ul class=\"daysOfWeek\">\n @for (d of daysOfWeek; track d) {\n <li>{{ d }}</li>\n }\n </ul>\n <ul class=\"days\">\n @for (d of calendarDays; track d; let i = $index) {\n <li\n [attr.data-day]=\"d.id\"\n (click)=\"selectByIndex(i, true)\"\n [ngClass]=\"{\n disabled: d.disabled,\n inactive: d.inactive,\n focused: i === focusedIndex,\n selected: i === selectedIndex\n }\"\n >\n {{ d.day }}\n </li>\n }\n </ul>\n </main>\n</section>\n@if (withTime()) {\n <section class=\"time\">\n <yuv-time-input [(ngModel)]=\"time\" [hour12]=\"hour12()\" [dayPeriodLabels]=\"dayPeriodLabels\" (ngModelChange)=\"onTimeChange($event)\"></yuv-time-input>\n </section>\n}\n", styles: [":host{--_calendar-item-size: var(--calendar-item-size, 3em);--_calendar-item-border-size: var(--calendar-item-border-size, 2px);display:inline-flex;flex-flow:
|
|
1007
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CalendarComponent, isStandalone: true, selector: "yuv-calendar", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, onlyFutureDates: { classPropertyName: "onlyFutureDates", publicName: "onlyFutureDates", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, withTime: { classPropertyName: "withTime", publicName: "withTime", isSignal: true, isRequired: false, transformFunction: null }, hour12: { classPropertyName: "hour12", publicName: "hour12", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, host: { attributes: { "tabindex": "0" }, listeners: { "keydown": "keyDownHandler($event)" } }, providers: [DatepickerService], viewQueries: [{ propertyName: "calEl", first: true, predicate: ["cal"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"date\">\n <header>\n <div class=\"month-picker\">\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"month\" (ngModelChange)=\"selectMonthOfYear($event)\">\n <mat-select-trigger>\n {{ month !== undefined ? months[month].label : '' }} \n </mat-select-trigger>\n @for (m of months; track $index) {\n <mat-option [value]=\"m.value\">{{ m.label }}</mat-option>\n }\n </mat-select>\n </div>\n\n <input\n class=\"year-picker\"\n name=\"year\"\n type=\"number\"\n [min]=\"minYear\"\n [max]=\"maxYear\"\n [(ngModel)]=\"_offsetYear\"\n (keydown)=\"onYearInputKeydown($event)\"\n (ngModelChange)=\"selectYear($event)\"\n />\n </header>\n <main>\n <ul class=\"daysOfWeek\">\n @for (d of daysOfWeek; track d) {\n <li>{{ d }}</li>\n }\n </ul>\n <ul class=\"days\">\n @for (d of calendarDays; track d; let i = $index) {\n <li\n [attr.data-day]=\"d.id\"\n (click)=\"selectByIndex(i, true)\"\n [ngClass]=\"{\n disabled: d.disabled,\n inactive: d.inactive,\n focused: i === focusedIndex,\n selected: i === selectedIndex\n }\"\n >\n {{ d.day }}\n </li>\n }\n </ul>\n </main>\n</section>\n@if (withTime()) {\n <section class=\"time\">\n <label>{{'yuv.calendar.time.label' | translate}}\n <yuv-time-input [(ngModel)]=\"time\" [hour12]=\"hour12()\" [dayPeriodLabels]=\"dayPeriodLabels\" (ngModelChange)=\"onTimeChange($event)\"></yuv-time-input>\n </label>\n </section>\n}\n", styles: [":host{--_calendar-item-size: var(--calendar-item-size, 3em);--_calendar-item-border-size: var(--calendar-item-border-size, 2px);display:inline-flex;flex-flow:column}:host section.date{max-width:calc(var(--_calendar-item-size) * 11)}:host section.date header{border-block-end:1px solid var(--ymt-outline-variant)}:host section.time{display:flex;align-items:center;border-block-start:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m)}:host section.time label{display:flex;width:100%;flex-flow:column;align-items:center}:host section.time yuv-time-input{margin-block-start:var(--ymt-spacing-m)}:host *:focus:not(:focus-visible){outline:none}:host header{display:flex;align-items:center;justify-content:space-between;padding:var(--ymt-spacing-s)}:host header mat-select,:host header input.year-picker{border:1px solid transparent;border-radius:var(--ymt-corner-xs)}:host header mat-select:focus,:host header input.year-picker:focus{border-color:var(--ymt-primary)}:host header mat-select{padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs)}:host header input.year-picker{background-color:transparent;text-align:end;font-size:2.5em;width:5ch;color:var(--ymt-text-color-subtle);-moz-appearance:textfield}:host header input.year-picker::-webkit-outer-spin-button,:host header input.year-picker::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host main{padding:0}:host main ul li.focused:before{outline:var(--_calendar-item-border-size) solid var(--ymt-text-color-subtle);outline-offset:2px}:host ul{list-style:none;display:flex;flex-wrap:wrap;text-align:center;padding:0;min-width:calc(var(--_calendar-item-size) * 7 + .5em)}:host ul.daysOfWeek li{font-weight:700;color:var(--ymt-text-color-subtle)}:host ul.days li:before{display:block;position:absolute;content:\"\";width:calc(var(--_calendar-item-size) - var(--_calendar-item-border-size) * 4);height:calc(var(--_calendar-item-size) - var(--_calendar-item-border-size) * 4);border-radius:var(--ymt-corner-full);top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}:host ul.days li{position:relative;min-width:var(--_calendar-item-size);z-index:1;line-height:1em;cursor:pointer;color:var(--ymt-text-color);height:var(--_calendar-item-size);display:flex;flex-flow:column;align-items:center;justify-content:center}:host ul.days li.focused{color:var(--ymt-on-focus-background)}:host ul.days li.focused:before{background-color:var(--ymt-focus-background)}:host ul.days li.inactive:not(.disabled){opacity:.5}:host ul.days li.disabled{opacity:.5;cursor:default}:host ul.days li.selected{color:var(--ymt-on-selection-background)}:host ul.days li.selected:before{background-color:var(--ymt-selection-background);outline-color:var(--ymt-selection-background);opacity:1}:host ul.days li:not(.selected,.disabled).focused:before,:host ul.days li:not(.selected,.disabled):hover:before{opacity:1}:host ul li{position:relative;width:14.2857142857%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: TimeInputComponent, selector: "yuv-time-input", inputs: ["hour12", "dayPeriodLabels"] }] }); }
|
|
1018
1008
|
}
|
|
1019
1009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
1020
1010
|
type: Component,
|
|
1021
|
-
args: [{ selector: 'yuv-calendar', standalone: true, imports: [CommonModule, FormsModule,
|
|
1011
|
+
args: [{ selector: 'yuv-calendar', standalone: true, imports: [CommonModule, FormsModule,
|
|
1012
|
+
TranslateModule,
|
|
1013
|
+
MatSelectModule, TimeInputComponent], providers: [DatepickerService], host: {
|
|
1022
1014
|
tabindex: '0'
|
|
1023
|
-
}, template: "<section class=\"date\">\n <header>\n <div class=\"month-picker\">\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"month\" (ngModelChange)=\"selectMonthOfYear($event)\">\n <mat-select-trigger>\n {{ month !== undefined ? months[month].label : '' }} \n </mat-select-trigger>\n @for (m of months; track $index) {\n <mat-option [value]=\"m.value\">{{ m.label }}</mat-option>\n }\n </mat-select>\n </div>\n\n <input\n class=\"year-picker\"\n name=\"year\"\n type=\"number\"\n [min]=\"minYear\"\n [max]=\"maxYear\"\n [(ngModel)]=\"_offsetYear\"\n (keydown)=\"onYearInputKeydown($event)\"\n (ngModelChange)=\"selectYear($event)\"\n />\n </header>\n <main>\n <ul class=\"daysOfWeek\">\n @for (d of daysOfWeek; track d) {\n <li>{{ d }}</li>\n }\n </ul>\n <ul class=\"days\">\n @for (d of calendarDays; track d; let i = $index) {\n <li\n [attr.data-day]=\"d.id\"\n (click)=\"selectByIndex(i, true)\"\n [ngClass]=\"{\n disabled: d.disabled,\n inactive: d.inactive,\n focused: i === focusedIndex,\n selected: i === selectedIndex\n }\"\n >\n {{ d.day }}\n </li>\n }\n </ul>\n </main>\n</section>\n@if (withTime()) {\n <section class=\"time\">\n <yuv-time-input [(ngModel)]=\"time\" [hour12]=\"hour12()\" [dayPeriodLabels]=\"dayPeriodLabels\" (ngModelChange)=\"onTimeChange($event)\"></yuv-time-input>\n </section>\n}\n", styles: [":host{--_calendar-item-size: var(--calendar-item-size, 3em);--_calendar-item-border-size: var(--calendar-item-border-size, 2px);display:inline-flex;flex-flow:
|
|
1015
|
+
}, template: "<section class=\"date\">\n <header>\n <div class=\"month-picker\">\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"month\" (ngModelChange)=\"selectMonthOfYear($event)\">\n <mat-select-trigger>\n {{ month !== undefined ? months[month].label : '' }} \n </mat-select-trigger>\n @for (m of months; track $index) {\n <mat-option [value]=\"m.value\">{{ m.label }}</mat-option>\n }\n </mat-select>\n </div>\n\n <input\n class=\"year-picker\"\n name=\"year\"\n type=\"number\"\n [min]=\"minYear\"\n [max]=\"maxYear\"\n [(ngModel)]=\"_offsetYear\"\n (keydown)=\"onYearInputKeydown($event)\"\n (ngModelChange)=\"selectYear($event)\"\n />\n </header>\n <main>\n <ul class=\"daysOfWeek\">\n @for (d of daysOfWeek; track d) {\n <li>{{ d }}</li>\n }\n </ul>\n <ul class=\"days\">\n @for (d of calendarDays; track d; let i = $index) {\n <li\n [attr.data-day]=\"d.id\"\n (click)=\"selectByIndex(i, true)\"\n [ngClass]=\"{\n disabled: d.disabled,\n inactive: d.inactive,\n focused: i === focusedIndex,\n selected: i === selectedIndex\n }\"\n >\n {{ d.day }}\n </li>\n }\n </ul>\n </main>\n</section>\n@if (withTime()) {\n <section class=\"time\">\n <label>{{'yuv.calendar.time.label' | translate}}\n <yuv-time-input [(ngModel)]=\"time\" [hour12]=\"hour12()\" [dayPeriodLabels]=\"dayPeriodLabels\" (ngModelChange)=\"onTimeChange($event)\"></yuv-time-input>\n </label>\n </section>\n}\n", styles: [":host{--_calendar-item-size: var(--calendar-item-size, 3em);--_calendar-item-border-size: var(--calendar-item-border-size, 2px);display:inline-flex;flex-flow:column}:host section.date{max-width:calc(var(--_calendar-item-size) * 11)}:host section.date header{border-block-end:1px solid var(--ymt-outline-variant)}:host section.time{display:flex;align-items:center;border-block-start:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m)}:host section.time label{display:flex;width:100%;flex-flow:column;align-items:center}:host section.time yuv-time-input{margin-block-start:var(--ymt-spacing-m)}:host *:focus:not(:focus-visible){outline:none}:host header{display:flex;align-items:center;justify-content:space-between;padding:var(--ymt-spacing-s)}:host header mat-select,:host header input.year-picker{border:1px solid transparent;border-radius:var(--ymt-corner-xs)}:host header mat-select:focus,:host header input.year-picker:focus{border-color:var(--ymt-primary)}:host header mat-select{padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs)}:host header input.year-picker{background-color:transparent;text-align:end;font-size:2.5em;width:5ch;color:var(--ymt-text-color-subtle);-moz-appearance:textfield}:host header input.year-picker::-webkit-outer-spin-button,:host header input.year-picker::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host main{padding:0}:host main ul li.focused:before{outline:var(--_calendar-item-border-size) solid var(--ymt-text-color-subtle);outline-offset:2px}:host ul{list-style:none;display:flex;flex-wrap:wrap;text-align:center;padding:0;min-width:calc(var(--_calendar-item-size) * 7 + .5em)}:host ul.daysOfWeek li{font-weight:700;color:var(--ymt-text-color-subtle)}:host ul.days li:before{display:block;position:absolute;content:\"\";width:calc(var(--_calendar-item-size) - var(--_calendar-item-border-size) * 4);height:calc(var(--_calendar-item-size) - var(--_calendar-item-border-size) * 4);border-radius:var(--ymt-corner-full);top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;opacity:0;pointer-events:none;transition:opacity .2s ease-in-out}:host ul.days li{position:relative;min-width:var(--_calendar-item-size);z-index:1;line-height:1em;cursor:pointer;color:var(--ymt-text-color);height:var(--_calendar-item-size);display:flex;flex-flow:column;align-items:center;justify-content:center}:host ul.days li.focused{color:var(--ymt-on-focus-background)}:host ul.days li.focused:before{background-color:var(--ymt-focus-background)}:host ul.days li.inactive:not(.disabled){opacity:.5}:host ul.days li.disabled{opacity:.5;cursor:default}:host ul.days li.selected{color:var(--ymt-on-selection-background)}:host ul.days li.selected:before{background-color:var(--ymt-selection-background);outline-color:var(--ymt-selection-background);opacity:1}:host ul.days li:not(.selected,.disabled).focused:before,:host ul.days li:not(.selected,.disabled):hover:before{opacity:1}:host ul li{position:relative;width:14.2857142857%}\n"] }]
|
|
1024
1016
|
}], ctorParameters: () => [], propDecorators: { keyDownHandler: [{
|
|
1025
1017
|
type: HostListener,
|
|
1026
1018
|
args: ['keydown', ['$event']]
|
|
@@ -1064,6 +1056,7 @@ class DateInputComponent {
|
|
|
1064
1056
|
get hoursControl() {
|
|
1065
1057
|
return this.dateInputForm.controls['hour'];
|
|
1066
1058
|
}
|
|
1059
|
+
// _placeholderVisible = true;
|
|
1067
1060
|
constructor(datepickerService, fb, elRef) {
|
|
1068
1061
|
this.datepickerService = datepickerService;
|
|
1069
1062
|
this.fb = fb;
|
|
@@ -1082,7 +1075,6 @@ class DateInputComponent {
|
|
|
1082
1075
|
am: 'AM',
|
|
1083
1076
|
pm: 'PM'
|
|
1084
1077
|
};
|
|
1085
|
-
this._placeholderVisible = true;
|
|
1086
1078
|
}
|
|
1087
1079
|
_setupForm() {
|
|
1088
1080
|
const dateTokens = this._getPatch(this._date);
|
|
@@ -1182,12 +1174,10 @@ class DateInputComponent {
|
|
|
1182
1174
|
i = inputs.length - 1;
|
|
1183
1175
|
inputs[i].focus();
|
|
1184
1176
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
// this.focus.emit();
|
|
1190
|
-
this._placeholderVisible = false;
|
|
1177
|
+
onFormClick(event) {
|
|
1178
|
+
if (event.target.tagName.toLowerCase() === 'form') {
|
|
1179
|
+
this.focusFirstInput();
|
|
1180
|
+
}
|
|
1191
1181
|
}
|
|
1192
1182
|
onDateInputBlur() {
|
|
1193
1183
|
let hasValue = false;
|
|
@@ -1195,11 +1185,7 @@ class DateInputComponent {
|
|
|
1195
1185
|
if (!hasValue && !!this.dateInputForm?.value[k])
|
|
1196
1186
|
hasValue = true;
|
|
1197
1187
|
});
|
|
1198
|
-
// if (hasValue) this.elRef.nativeElement.classList.add('is-dirty');
|
|
1199
|
-
// else this.elRef.nativeElement.classList.remove('is-dirty');
|
|
1200
1188
|
this.elRef.nativeElement.classList.toggle('is-dirty', hasValue);
|
|
1201
|
-
this._placeholderVisible = !hasValue;
|
|
1202
|
-
// this.blur.emit();
|
|
1203
1189
|
}
|
|
1204
1190
|
focusFirstInput() {
|
|
1205
1191
|
this._getFocusableElements()[0].focus();
|
|
@@ -1314,11 +1300,11 @@ class DateInputComponent {
|
|
|
1314
1300
|
this._subs.forEach((s) => s.unsubscribe());
|
|
1315
1301
|
}
|
|
1316
1302
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateInputComponent, deps: [{ token: DatepickerService }, { token: i1.FormBuilder }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1317
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DateInputComponent, isStandalone: true, selector: "yuv-date-input", inputs: { disabled: "disabled", placeholder: "placeholder", withTime: "withTime", hour12: "hour12" }, host: { properties: { "class.has-value": "this._date", "attr.data-datevalue": "this.dateAttribute" } }, viewQueries: [{ propertyName: "dateInputEls", predicate: DateInputElementComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "@if (dateInputForm) {\n <form [formGroup]=\"dateInputForm!\" (
|
|
1303
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: DateInputComponent, isStandalone: true, selector: "yuv-date-input", inputs: { disabled: "disabled", placeholder: "placeholder", withTime: "withTime", hour12: "hour12" }, host: { properties: { "class.has-value": "this._date", "attr.data-datevalue": "this.dateAttribute" } }, viewQueries: [{ propertyName: "dateInputEls", predicate: DateInputElementComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "@if (dateInputForm) {\n <form [formGroup]=\"dateInputForm!\" \n (click)=\"onFormClick($event)\" (yuvFocusWithinBlur)=\"onDateInputBlur()\">\n @for (t of dateTokens; track t) {\n @switch (t.type) {\n <!-- day -->\n @case ('day') {\n <yuv-date-input-element\n placeholder=\"31\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"day\"\n [maxLength]=\"2\"\n [minValue]=\"1\"\n [maxValue]=\"31\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- month -->\n @case ('month') {\n <yuv-date-input-element\n placeholder=\"12\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"month\"\n [maxLength]=\"2\"\n [minValue]=\"1\"\n [maxValue]=\"12\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- year -->\n @case ('year') {\n <yuv-date-input-element\n placeholder=\"2000\"\n class=\"year\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"year\"\n [maxLength]=\"4\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- hours -->\n @case ('hour') {\n <yuv-date-input-hour-element\n placeholder=\"10\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n [(dayPeriod)]=\"currentDayPeriod\"\n formControlName=\"hour\"\n [maxLength]=\"2\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-hour-element>\n }\n <!-- minutes -->\n @case ('minute') {\n <yuv-date-input-element\n placeholder=\"00\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n [minValue]=\"0\"\n [maxValue]=\"59\"\n formControlName=\"minute\"\n [maxLength]=\"2\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n @case ('literal') {\n <input type=\"text\" class=\"literal\" [value]=\"t.value\" readonly inert />\n }\n @case ('dayPeriod') {\n <button type=\"button\" class=\"dayPeriod\" [disabled]=\"dateInputForm.disabled\" (click)=\"toggleDayPeriod()\">\n {{ dayPeriodLabels[currentDayPeriod!] }}\n </button>\n }\n }\n }\n </form>\n}\n", styles: [":host{--placeholder-color: rgb(from var(--ymt-text-color) r g b / .2);--period-button-color: var(--ymt-text-color);--period-button-border-color: var(--ymt-outline);--period-button-background-color: transparent;display:flex;position:relative;outline:0;align-items:center;overflow-x:auto;scrollbar-width:none;transition:opacity .2s ease-in-out}:host yuv-date-input-hour-element,:host yuv-date-input-element{border:0;border-block-end:1px solid transparent;box-sizing:border-box}:host input.literal{width:1ch;text-align:center;padding:0;border:0;background-color:transparent;border-block-end:1px solid transparent}:host:not(:focus-within):not(.has-value){--period-button-color: var(--placeholder-color);--period-button-border-color: var(--placeholder-color);--period-button-background-color: transparent}:host:not(:focus-within):not(.has-value) input.literal{color:var(--placeholder-color)}:host:not(:focus-within):not(:hover):not(.has-value){opacity:0}:host form{flex:1 1 auto;cursor:text;transition:opacity .2s ease-in-out;display:flex;opacity:1;align-items:flex-end;gap:.1em}:host form button.dayPeriod{color:var(--period-button-color);background-color:var(--period-button-background-color);border:1px solid var(--period-button-border-color);font-family:monospace;padding:0 .25em;border-radius:var(--ymt-corner-xs)}:host form button.dayPeriod:hover{background-color:var(--ymt-hover-background);color:var(--ymt-on-hover-background)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DateInputHourElementComponent, selector: "yuv-date-input-hour-element", inputs: ["dayPeriod"], outputs: ["dayPeriodChange"] }, { kind: "component", type: DateInputElementComponent, selector: "yuv-date-input-element", inputs: ["maxLength", "maxValue", "minValue", "disabled", "placeholder"], outputs: ["next", "prev"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
1318
1304
|
}
|
|
1319
1305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateInputComponent, decorators: [{
|
|
1320
1306
|
type: Component,
|
|
1321
|
-
args: [{ selector: 'yuv-date-input', standalone: true, imports: [CommonModule,
|
|
1307
|
+
args: [{ selector: 'yuv-date-input', standalone: true, imports: [CommonModule, DateInputHourElementComponent, DateInputElementComponent, ReactiveFormsModule], template: "@if (dateInputForm) {\n <form [formGroup]=\"dateInputForm!\" \n (click)=\"onFormClick($event)\" (yuvFocusWithinBlur)=\"onDateInputBlur()\">\n @for (t of dateTokens; track t) {\n @switch (t.type) {\n <!-- day -->\n @case ('day') {\n <yuv-date-input-element\n placeholder=\"31\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"day\"\n [maxLength]=\"2\"\n [minValue]=\"1\"\n [maxValue]=\"31\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- month -->\n @case ('month') {\n <yuv-date-input-element\n placeholder=\"12\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"month\"\n [maxLength]=\"2\"\n [minValue]=\"1\"\n [maxValue]=\"12\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- year -->\n @case ('year') {\n <yuv-date-input-element\n placeholder=\"2000\"\n class=\"year\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n formControlName=\"year\"\n [maxLength]=\"4\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n <!-- hours -->\n @case ('hour') {\n <yuv-date-input-hour-element\n placeholder=\"10\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n [(dayPeriod)]=\"currentDayPeriod\"\n formControlName=\"hour\"\n [maxLength]=\"2\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-hour-element>\n }\n <!-- minutes -->\n @case ('minute') {\n <yuv-date-input-element\n placeholder=\"00\"\n [ngClass]=\"{ disabled: dateInputForm.disabled }\"\n [attr.aria-disabled]=\"dateInputForm.disabled\"\n [minValue]=\"0\"\n [maxValue]=\"59\"\n formControlName=\"minute\"\n [maxLength]=\"2\"\n (prev)=\"onInputPrev()\"\n (next)=\"onInputNext()\"\n ></yuv-date-input-element>\n }\n @case ('literal') {\n <input type=\"text\" class=\"literal\" [value]=\"t.value\" readonly inert />\n }\n @case ('dayPeriod') {\n <button type=\"button\" class=\"dayPeriod\" [disabled]=\"dateInputForm.disabled\" (click)=\"toggleDayPeriod()\">\n {{ dayPeriodLabels[currentDayPeriod!] }}\n </button>\n }\n }\n }\n </form>\n}\n", styles: [":host{--placeholder-color: rgb(from var(--ymt-text-color) r g b / .2);--period-button-color: var(--ymt-text-color);--period-button-border-color: var(--ymt-outline);--period-button-background-color: transparent;display:flex;position:relative;outline:0;align-items:center;overflow-x:auto;scrollbar-width:none;transition:opacity .2s ease-in-out}:host yuv-date-input-hour-element,:host yuv-date-input-element{border:0;border-block-end:1px solid transparent;box-sizing:border-box}:host input.literal{width:1ch;text-align:center;padding:0;border:0;background-color:transparent;border-block-end:1px solid transparent}:host:not(:focus-within):not(.has-value){--period-button-color: var(--placeholder-color);--period-button-border-color: var(--placeholder-color);--period-button-background-color: transparent}:host:not(:focus-within):not(.has-value) input.literal{color:var(--placeholder-color)}:host:not(:focus-within):not(:hover):not(.has-value){opacity:0}:host form{flex:1 1 auto;cursor:text;transition:opacity .2s ease-in-out;display:flex;opacity:1;align-items:flex-end;gap:.1em}:host form button.dayPeriod{color:var(--period-button-color);background-color:var(--period-button-background-color);border:1px solid var(--period-button-border-color);font-family:monospace;padding:0 .25em;border-radius:var(--ymt-corner-xs)}:host form button.dayPeriod:hover{background-color:var(--ymt-hover-background);color:var(--ymt-on-hover-background)}\n"] }]
|
|
1322
1308
|
}], ctorParameters: () => [{ type: DatepickerService }, { type: i1.FormBuilder }, { type: i0.ElementRef }], propDecorators: { dateInputEls: [{
|
|
1323
1309
|
type: ViewChildren,
|
|
1324
1310
|
args: [DateInputElementComponent, { read: ElementRef }]
|
|
@@ -1596,11 +1582,13 @@ class DatepickerComponent {
|
|
|
1596
1582
|
useExisting: forwardRef(() => DatepickerComponent),
|
|
1597
1583
|
multi: true
|
|
1598
1584
|
}
|
|
1599
|
-
], viewQueries: [{ propertyName: "dateInputCmp", first: true, predicate: DateInputComponent, descendants: true }], hostDirectives: [{ directive: i1$2.FocusWithinDirective }], ngImport: i0, template: "<yuv-date-input [disabled]=\"disabled\" [withTime]=\"withTime\" [hour12]=\"_hour12\"></yuv-date-input>\n\n@if (calendar) {\n <button
|
|
1585
|
+
], viewQueries: [{ propertyName: "dateInputCmp", first: true, predicate: DateInputComponent, descendants: true }], hostDirectives: [{ directive: i1$2.FocusWithinDirective }], ngImport: i0, template: "<yuv-date-input [disabled]=\"disabled\" [withTime]=\"withTime\" [hour12]=\"_hour12\"></yuv-date-input>\n\n@if (calendar) {\n <button ymtIconButton icon-button-size=\"small\" type=\"button\" class=\"calender\" [disabled]=\"disabled\" (click)=\"openCalendar()\">\n <mat-icon>calendar_month</mat-icon>\n </button>\n}\n", styles: [":host{display:flex;font-size:var(--_datepicker-font-size);overflow:hidden}:host.all-selected yuv-date-input,:host.all-selected yuv-date-input-text{background-color:var(--ymt-text-selection-container);color:var(--ymt-on-text-selection-container)}:host>button[disabled]{display:none}:host yuv-date-input-text,:host yuv-date-input{width:100%;margin:0 .25em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: DateInputComponent, selector: "yuv-date-input", inputs: ["disabled", "placeholder", "withTime", "hour12"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
1600
1586
|
}
|
|
1601
1587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
1602
1588
|
type: Component,
|
|
1603
|
-
args: [{ selector: 'yuv-datepicker', standalone: true, imports: [CommonModule, MatIconModule, DateInputComponent,
|
|
1589
|
+
args: [{ selector: 'yuv-datepicker', standalone: true, imports: [CommonModule, MatIconModule, DateInputComponent,
|
|
1590
|
+
YmtIconButtonDirective,
|
|
1591
|
+
MatButtonModule, ReactiveFormsModule], providers: [
|
|
1604
1592
|
DatepickerService,
|
|
1605
1593
|
{
|
|
1606
1594
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1614,7 +1602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1614
1602
|
}
|
|
1615
1603
|
], host: {
|
|
1616
1604
|
'class.all-selected': 'allSelected()'
|
|
1617
|
-
}, hostDirectives: [FocusWithinDirective], template: "<yuv-date-input [disabled]=\"disabled\" [withTime]=\"withTime\" [hour12]=\"_hour12\"></yuv-date-input>\n\n@if (calendar) {\n <button
|
|
1605
|
+
}, hostDirectives: [FocusWithinDirective], template: "<yuv-date-input [disabled]=\"disabled\" [withTime]=\"withTime\" [hour12]=\"_hour12\"></yuv-date-input>\n\n@if (calendar) {\n <button ymtIconButton icon-button-size=\"small\" type=\"button\" class=\"calender\" [disabled]=\"disabled\" (click)=\"openCalendar()\">\n <mat-icon>calendar_month</mat-icon>\n </button>\n}\n", styles: [":host{display:flex;font-size:var(--_datepicker-font-size);overflow:hidden}:host.all-selected yuv-date-input,:host.all-selected yuv-date-input-text{background-color:var(--ymt-text-selection-container);color:var(--ymt-on-text-selection-container)}:host>button[disabled]{display:none}:host yuv-date-input-text,:host yuv-date-input{width:100%;margin:0 .25em}\n"] }]
|
|
1618
1606
|
}], propDecorators: { dateInputCmp: [{
|
|
1619
1607
|
type: ViewChild,
|
|
1620
1608
|
args: [DateInputComponent]
|
|
@@ -1659,7 +1647,7 @@ class DatepickerCalendarTriggerComponent {
|
|
|
1659
1647
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatepickerCalendarTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1660
1648
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: DatepickerCalendarTriggerComponent, isStandalone: true, selector: "yuv-datepicker-calendar-trigger", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<button mat-icon-button>
|
|
1661
1649
|
<mat-icon (click)="for().openCalendar()">calendar_month</mat-icon>
|
|
1662
|
-
</button>`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type:
|
|
1650
|
+
</button>`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
1663
1651
|
}
|
|
1664
1652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatepickerCalendarTriggerComponent, decorators: [{
|
|
1665
1653
|
type: Component,
|
|
@@ -1668,16 +1656,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1668
1656
|
</button>`, standalone: true, imports: [MatButtonModule, MatIconModule] }]
|
|
1669
1657
|
}] });
|
|
1670
1658
|
|
|
1659
|
+
const cmp = [CalendarComponent, DatepickerComponent, DatepickerCalendarTriggerComponent];
|
|
1671
1660
|
class YuvDatepickerModule {
|
|
1672
1661
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1673
1662
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: YuvDatepickerModule, imports: [CalendarComponent, DatepickerComponent, DatepickerCalendarTriggerComponent], exports: [CalendarComponent, DatepickerComponent, DatepickerCalendarTriggerComponent] }); }
|
|
1674
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvDatepickerModule, imports: [
|
|
1663
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvDatepickerModule, imports: [cmp] }); }
|
|
1675
1664
|
}
|
|
1676
1665
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvDatepickerModule, decorators: [{
|
|
1677
1666
|
type: NgModule,
|
|
1678
1667
|
args: [{
|
|
1679
|
-
imports: [
|
|
1680
|
-
exports: [
|
|
1668
|
+
imports: [...cmp],
|
|
1669
|
+
exports: [...cmp],
|
|
1681
1670
|
}]
|
|
1682
1671
|
}] });
|
|
1683
1672
|
|
|
@@ -1685,5 +1674,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1685
1674
|
* Generated bundle index. Do not edit.
|
|
1686
1675
|
*/
|
|
1687
1676
|
|
|
1688
|
-
export { CalendarComponent, DEFAULT_DAY_PERIOD_LABELS, DatepickerCalendarTriggerComponent, DatepickerComponent, YuvDatepickerModule };
|
|
1677
|
+
export { CalendarComponent, DEFAULT_DAY_PERIOD_LABELS, DatepickerCalendarTriggerComponent, DatepickerComponent, TimeInputComponent, YuvDatepickerModule };
|
|
1689
1678
|
//# sourceMappingURL=yuuvis-client-framework-datepicker.mjs.map
|