@yuuvis/client-framework 2.3.10 → 2.3.12
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/lib/date-input/date-input-element/date-input-element.component.d.ts +2 -1
- package/datepicker/lib/date-input/date-input.component.d.ts +1 -0
- package/datepicker/lib/time-input/time-input.component.d.ts +5 -5
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +51 -26
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +13 -12
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-details.mjs +14 -12
- package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-preview.mjs +15 -7
- package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs +3 -13
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs +7 -11
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs.map +1 -1
- package/forms/lib/elements/datetime/datetime.component.d.ts +3 -3
- package/object-preview/lib/components/object-preview/object-preview.component.d.ts +1 -0
- package/package.json +8 -8
|
@@ -3,7 +3,7 @@ import { CommonModule, DecimalPipe, DatePipe, NgClass } from '@angular/common';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, signal, input, forwardRef, ChangeDetectionStrategy, Component, ChangeDetectorRef, ElementRef, computed, effect, untracked, viewChild, DestroyRef, Input, output, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
|
-
import { FormBuilder, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS,
|
|
6
|
+
import { FormBuilder, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormControl, FormGroup, FormsModule } from '@angular/forms';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
8
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
9
9
|
import * as i3 from '@angular/material/icon';
|
|
@@ -383,11 +383,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
383
383
|
}] });
|
|
384
384
|
|
|
385
385
|
class DatetimeComponent extends AbstractMatFormField {
|
|
386
|
+
#localeEffect;
|
|
386
387
|
constructor() {
|
|
387
|
-
super(
|
|
388
|
+
super();
|
|
388
389
|
this.translate = inject(TranslateService$1);
|
|
389
390
|
this.pickerCmp = viewChild.required(DatepickerComponent);
|
|
390
391
|
this.ngControl = injectNgControl(this);
|
|
392
|
+
this.fc = new FormControl(null);
|
|
391
393
|
this._locale = signal(this.translate.currentLang);
|
|
392
394
|
this.locale = input(this.translate.currentLang);
|
|
393
395
|
this.#localeEffect = effect(() => {
|
|
@@ -411,10 +413,12 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
411
413
|
this.withTime = input(false);
|
|
412
414
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
413
415
|
this.propagateChange = (_) => { };
|
|
414
|
-
|
|
415
|
-
this.
|
|
416
|
+
this.fc.valueChanges.subscribe((v) => this.onValueChange(v));
|
|
417
|
+
this.fc.statusChanges.subscribe((v) => {
|
|
418
|
+
this.errorState = v === 'INVALID';
|
|
419
|
+
this.ngControl?.control?.setErrors(this.errorState ? { invalid: true } : null);
|
|
420
|
+
});
|
|
416
421
|
}
|
|
417
|
-
#localeEffect;
|
|
418
422
|
#setLabels() {
|
|
419
423
|
this.labels = {
|
|
420
424
|
calendarApply: this.translate.instant('yuv.form.element.datetime.calendar.select'),
|
|
@@ -448,9 +452,6 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
448
452
|
registerOnChange(fn) {
|
|
449
453
|
this.propagateChange = fn;
|
|
450
454
|
}
|
|
451
|
-
registerOnValidatorChange(fn) {
|
|
452
|
-
this.validationChange = fn;
|
|
453
|
-
}
|
|
454
455
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
455
456
|
registerOnTouched() { }
|
|
456
457
|
onValueChange(e) {
|
|
@@ -461,13 +462,13 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
461
462
|
this.#setLabels();
|
|
462
463
|
this.translate.onLangChange.subscribe((e) => this._locale.set(e.lang));
|
|
463
464
|
}
|
|
464
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatetimeComponent, deps:
|
|
465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: DatetimeComponent, isStandalone: true, selector: "yuv-datetime", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, onlyFutureDates: { classPropertyName: "onlyFutureDates", publicName: "onlyFutureDates", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, withTime: { classPropertyName: "withTime", publicName: "withTime", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: DatetimeComponent }], viewQueries: [{ propertyName: "pickerCmp", first: true, predicate: DatepickerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<yuv-datepicker\n [calendar]=\"calendar()\"\n [disabled]=\"readonly()\"\n [withTime]=\"withTime()\"\n [locale]=\"_locale()\"\n [labels]=\"labels!\"\n [onlyFutureDates]=\"onlyFutureDates()\"\n [
|
|
465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: DatetimeComponent, isStandalone: true, selector: "yuv-datetime", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, onlyFutureDates: { classPropertyName: "onlyFutureDates", publicName: "onlyFutureDates", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, calendar: { classPropertyName: "calendar", publicName: "calendar", isSignal: true, isRequired: false, transformFunction: null }, withTime: { classPropertyName: "withTime", publicName: "withTime", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: DatetimeComponent }], viewQueries: [{ propertyName: "pickerCmp", first: true, predicate: DatepickerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<yuv-datepicker\n [calendar]=\"calendar()\"\n [disabled]=\"readonly()\"\n [withTime]=\"withTime()\"\n [locale]=\"_locale()\"\n [labels]=\"labels!\"\n [onlyFutureDates]=\"onlyFutureDates()\"\n [formControl]=\"fc\"\n></yuv-datepicker>\n", styles: [":host{display:flex;overflow-x:auto;--ymt-scrollbar-outer-size: 0px;--ymt-scrollbar-inner-size: 0px}:host yuv-datepicker{flex:1}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: YuvDatepickerModule }, { kind: "component", type: i2$2.DatepickerComponent, selector: "yuv-datepicker", inputs: ["calendar", "readonly", "hour12", "locale", "labels", "withTime", "onlyFutureDates", "minDate", "maxDate", "disabled"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatDatepickerModule }] }); }
|
|
466
467
|
}
|
|
467
468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatetimeComponent, decorators: [{
|
|
468
469
|
type: Component,
|
|
469
|
-
args: [{ selector: 'yuv-datetime', standalone: true, imports: [
|
|
470
|
-
}] });
|
|
470
|
+
args: [{ selector: 'yuv-datetime', standalone: true, imports: [ReactiveFormsModule, YuvDatepickerModule, MatInputModule, MatDatepickerModule], providers: [{ provide: MatFormFieldControl, useExisting: DatetimeComponent }], template: "<yuv-datepicker\n [calendar]=\"calendar()\"\n [disabled]=\"readonly()\"\n [withTime]=\"withTime()\"\n [locale]=\"_locale()\"\n [labels]=\"labels!\"\n [onlyFutureDates]=\"onlyFutureDates()\"\n [formControl]=\"fc\"\n></yuv-datepicker>\n", styles: [":host{display:flex;overflow-x:auto;--ymt-scrollbar-outer-size: 0px;--ymt-scrollbar-inner-size: 0px}:host yuv-datepicker{flex:1}\n"] }]
|
|
471
|
+
}], ctorParameters: () => [] });
|
|
471
472
|
|
|
472
473
|
class DatetimeRangeComponent extends AbstractMatFormField {
|
|
473
474
|
constructor() {
|