@yuuvis/client-framework 2.3.11 → 2.3.13
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 +24 -23
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +10 -7
- package/fesm2022/yuuvis-client-framework-metadata-form.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-flavor.mjs +4 -2
- package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.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/catalog/catalog.component.d.ts +2 -2
- package/forms/lib/elements/datetime/datetime.component.d.ts +3 -3
- package/metadata-form/lib/object-metadata-element-template.directive.d.ts +2 -2
- package/object-preview/lib/components/object-preview/object-preview.component.d.ts +1 -0
- package/package.json +16 -16
|
@@ -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';
|
|
@@ -49,13 +49,11 @@ class EditTableDataComponent {
|
|
|
49
49
|
this.tableForm = this.#fb.group({});
|
|
50
50
|
this.isInnerTableForm = input(true);
|
|
51
51
|
this.formElement = this.#dialogData.formElement || {};
|
|
52
|
-
this.columns = (this.formElement['elements'] || []).map((c) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
});
|
|
52
|
+
this.columns = (this.formElement['elements'] || []).map((c) => ({
|
|
53
|
+
...c,
|
|
54
|
+
propertyType: c.type,
|
|
55
|
+
_internalType: this.#system.getInternalFormElementType(c.type, c.classifications)
|
|
56
|
+
}));
|
|
59
57
|
this.#elementData = this.#dialogData.elementData || {};
|
|
60
58
|
this.situation = this.#dialogData.situation || Situation.EDIT;
|
|
61
59
|
this.header = this.#dialogData.label || '';
|
|
@@ -383,11 +381,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
383
381
|
}] });
|
|
384
382
|
|
|
385
383
|
class DatetimeComponent extends AbstractMatFormField {
|
|
384
|
+
#localeEffect;
|
|
386
385
|
constructor() {
|
|
387
|
-
super(
|
|
386
|
+
super();
|
|
388
387
|
this.translate = inject(TranslateService$1);
|
|
389
388
|
this.pickerCmp = viewChild.required(DatepickerComponent);
|
|
390
389
|
this.ngControl = injectNgControl(this);
|
|
390
|
+
this.fc = new FormControl(null);
|
|
391
391
|
this._locale = signal(this.translate.currentLang);
|
|
392
392
|
this.locale = input(this.translate.currentLang);
|
|
393
393
|
this.#localeEffect = effect(() => {
|
|
@@ -411,10 +411,12 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
411
411
|
this.withTime = input(false);
|
|
412
412
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
413
413
|
this.propagateChange = (_) => { };
|
|
414
|
-
|
|
415
|
-
this.
|
|
414
|
+
this.fc.valueChanges.subscribe((v) => this.onValueChange(v));
|
|
415
|
+
this.fc.statusChanges.subscribe((v) => {
|
|
416
|
+
this.errorState = v === 'INVALID';
|
|
417
|
+
this.ngControl?.control?.setErrors(this.errorState ? { invalid: true } : null);
|
|
418
|
+
});
|
|
416
419
|
}
|
|
417
|
-
#localeEffect;
|
|
418
420
|
#setLabels() {
|
|
419
421
|
this.labels = {
|
|
420
422
|
calendarApply: this.translate.instant('yuv.form.element.datetime.calendar.select'),
|
|
@@ -448,9 +450,6 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
448
450
|
registerOnChange(fn) {
|
|
449
451
|
this.propagateChange = fn;
|
|
450
452
|
}
|
|
451
|
-
registerOnValidatorChange(fn) {
|
|
452
|
-
this.validationChange = fn;
|
|
453
|
-
}
|
|
454
453
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
455
454
|
registerOnTouched() { }
|
|
456
455
|
onValueChange(e) {
|
|
@@ -461,13 +460,13 @@ class DatetimeComponent extends AbstractMatFormField {
|
|
|
461
460
|
this.#setLabels();
|
|
462
461
|
this.translate.onLangChange.subscribe((e) => this._locale.set(e.lang));
|
|
463
462
|
}
|
|
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 [
|
|
463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
464
|
+
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
465
|
}
|
|
467
466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DatetimeComponent, decorators: [{
|
|
468
467
|
type: Component,
|
|
469
|
-
args: [{ selector: 'yuv-datetime', standalone: true, imports: [
|
|
470
|
-
}] });
|
|
468
|
+
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"] }]
|
|
469
|
+
}], ctorParameters: () => [] });
|
|
471
470
|
|
|
472
471
|
class DatetimeRangeComponent extends AbstractMatFormField {
|
|
473
472
|
constructor() {
|
|
@@ -1976,6 +1975,10 @@ class CatalogComponent extends AbstractMatFormField {
|
|
|
1976
1975
|
}
|
|
1977
1976
|
});
|
|
1978
1977
|
});
|
|
1978
|
+
/**
|
|
1979
|
+
* Possibles values are `EDIT` (default),`SEARCH`,`CREATE`. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
|
|
1980
|
+
*/
|
|
1981
|
+
this.situation = input();
|
|
1979
1982
|
this.ngControl = injectNgControl(this);
|
|
1980
1983
|
this.fc = new FormControl(undefined);
|
|
1981
1984
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -2021,14 +2024,12 @@ class CatalogComponent extends AbstractMatFormField {
|
|
|
2021
2024
|
super.onNgOnDestroy();
|
|
2022
2025
|
}
|
|
2023
2026
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CatalogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2024
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CatalogComponent, isStandalone: true, selector: "yuv-catalog", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, classifications: { classPropertyName: "classifications", publicName: "classifications", isSignal: true, isRequired: false, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal:
|
|
2027
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CatalogComponent, isStandalone: true, selector: "yuv-catalog", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, classifications: { classPropertyName: "classifications", publicName: "classifications", isSignal: true, isRequired: false, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: CatalogComponent }], usesInheritance: true, ngImport: i0, template: "<mat-select [multiple]=\"multiple()\" [disabled]=\"readonly()\" [formControl]=\"fc\">\n @for (o of _options(); track o) {\n <mat-option [value]=\"o\">{{ o }}</mat-option>\n }\n</mat-select>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i1$1.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: "component", type: i1$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { 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"] }] }); }
|
|
2025
2028
|
}
|
|
2026
2029
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CatalogComponent, decorators: [{
|
|
2027
2030
|
type: Component,
|
|
2028
2031
|
args: [{ selector: 'yuv-catalog', imports: [CommonModule, MatSelectModule, ReactiveFormsModule], providers: [{ provide: MatFormFieldControl, useExisting: CatalogComponent }], template: "<mat-select [multiple]=\"multiple()\" [disabled]=\"readonly()\" [formControl]=\"fc\">\n @for (o of _options(); track o) {\n <mat-option [value]=\"o\">{{ o }}</mat-option>\n }\n</mat-select>\n" }]
|
|
2029
|
-
}]
|
|
2030
|
-
type: Input
|
|
2031
|
-
}] } });
|
|
2032
|
+
}] });
|
|
2032
2033
|
|
|
2033
2034
|
const formElementCmps = [
|
|
2034
2035
|
StringComponent,
|