@yuuvis/client-framework 2.3.0 → 2.3.1
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/fesm2022/yuuvis-client-framework-forms.mjs +22 -12
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs +53 -21
- package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +8 -3
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/forms/index.d.ts +1 -0
- package/forms/lib/elements/data-grid/data-grid/data-grid.component.d.ts +3 -1
- package/forms/lib/forms.utils.d.ts +4 -0
- package/metadata-form/lib/object-metadata-element-label.directive.d.ts +16 -5
- package/object-form/index.d.ts +0 -1
- package/package.json +8 -8
- package/tile-list/lib/tile-list/tile-list.component.d.ts +3 -1
|
@@ -14,7 +14,7 @@ import { ObjectMetadataElementTemplateDirective, ObjectMetadataElementLabelDirec
|
|
|
14
14
|
|
|
15
15
|
class MetadataDefaultTemplatesComponent {
|
|
16
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MetadataDefaultTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MetadataDefaultTemplatesComponent, isStandalone: true, selector: "yuv-metadata-default-templates", ngImport: i0, template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: ["mat-hint:not(:empty){padding-bottom:var(--ymt-spacing-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "component", type: DataGridComponent, selector: "yuv-data-grid", inputs: ["situation", "formElement", "formControl", "classifications", "readonly", "size"] }, { kind: "component", type: OrganizationComponent, selector: "yuv-organization", inputs: ["situation", "multiselect", "classifications", "readonly", "excludeMe", "withMetadata"] }, { kind: "component", type: OrganizationSetComponent, selector: "yuv-organization-set", inputs: ["types", "situation", "multiselect", "readonly", "withMetadata", "autocompleteMinLength", "classifications"] }, { kind: "component", type: CatalogComponent, selector: "yuv-catalog", inputs: ["readonly", "multiple", "options", "classifications", "situation"] }, { kind: "component", type: NumberComponent, selector: "yuv-number", inputs: ["scale", "precision", "grouping", "groupPattern", "readonly", "minValue", "maxValue", "classifications"] }, { kind: "component", type: NumberRangeComponent, selector: "yuv-number-range", inputs: ["scale", "precision", "grouping", "pattern", "readonly", "classifications", "minValue", "maxValue", "situation"] }, { kind: "component", type: DatetimeComponent, selector: "yuv-datetime", inputs: ["locale", "onlyFutureDates", "readonly", "calendar", "withTime"] }, { kind: "component", type: DatetimeRangeComponent, selector: "yuv-datetime-range", inputs: ["withTime", "readonly", "operator", "situation"] }, { kind: "directive", type: ObjectMetadataElementTemplateDirective, selector: "[yuvMetadataElementTemplate]", inputs: ["yuvMetadataElementTemplate", "situation", "propertyType", "propertyName"] }, { kind: "directive", type: ObjectMetadataElementLabelDirective, selector: "[yuvObjectMetadataElementLabel]", inputs: ["yuvObjectMetadataElementLabel"] }, { kind: "directive", type: ObjectMetadataElementErrorDirective, selector: "[yuvObjectMetadataElementError]", inputs: ["yuvObjectMetadataElementError"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MetadataDefaultTemplatesComponent, isStandalone: true, selector: "yuv-metadata-default-templates", ngImport: i0, template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n [formFieldContext]=\"ctx\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: ["mat-hint:not(:empty){padding-bottom:var(--ymt-spacing-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "component", type: DataGridComponent, selector: "yuv-data-grid", inputs: ["situation", "formElement", "formControl", "classifications", "readonly", "formFieldContext", "size"] }, { kind: "component", type: OrganizationComponent, selector: "yuv-organization", inputs: ["situation", "multiselect", "classifications", "readonly", "excludeMe", "withMetadata"] }, { kind: "component", type: OrganizationSetComponent, selector: "yuv-organization-set", inputs: ["types", "situation", "multiselect", "readonly", "withMetadata", "autocompleteMinLength", "classifications"] }, { kind: "component", type: CatalogComponent, selector: "yuv-catalog", inputs: ["readonly", "multiple", "options", "classifications", "situation"] }, { kind: "component", type: NumberComponent, selector: "yuv-number", inputs: ["scale", "precision", "grouping", "groupPattern", "readonly", "minValue", "maxValue", "classifications"] }, { kind: "component", type: NumberRangeComponent, selector: "yuv-number-range", inputs: ["scale", "precision", "grouping", "pattern", "readonly", "classifications", "minValue", "maxValue", "situation"] }, { kind: "component", type: DatetimeComponent, selector: "yuv-datetime", inputs: ["locale", "onlyFutureDates", "readonly", "calendar", "withTime"] }, { kind: "component", type: DatetimeRangeComponent, selector: "yuv-datetime-range", inputs: ["withTime", "readonly", "operator", "situation"] }, { kind: "directive", type: ObjectMetadataElementTemplateDirective, selector: "[yuvMetadataElementTemplate]", inputs: ["yuvMetadataElementTemplate", "situation", "propertyType", "propertyName"] }, { kind: "directive", type: ObjectMetadataElementLabelDirective, selector: "[yuvObjectMetadataElementLabel]", inputs: ["yuvObjectMetadataElementLabel"] }, { kind: "directive", type: ObjectMetadataElementErrorDirective, selector: "[yuvObjectMetadataElementError]", inputs: ["yuvObjectMetadataElementError"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
18
18
|
}
|
|
19
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MetadataDefaultTemplatesComponent, decorators: [{
|
|
20
20
|
type: Component,
|
|
@@ -37,7 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
37
37
|
MatFormFieldModule,
|
|
38
38
|
MatSlideToggleModule,
|
|
39
39
|
MatFormFieldModule
|
|
40
|
-
], template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: ["mat-hint:not(:empty){padding-bottom:var(--ymt-spacing-xs)}\n"] }]
|
|
40
|
+
], template: "<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n [formFieldContext]=\"ctx\"\n >\n </yuv-data-grid>\n</ng-template>\n", styles: ["mat-hint:not(:empty){padding-bottom:var(--ymt-spacing-xs)}\n"] }]
|
|
41
41
|
}] });
|
|
42
42
|
|
|
43
43
|
class YuvMetadataFormDefaultsModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-metadata-form-defaults.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.html","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-form-defaults.module.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/yuuvis-client-framework-metadata-form-defaults.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport {\n CatalogComponent,\n DataGridComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n NumberComponent,\n NumberRangeComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n StringComponent\n} from '@yuuvis/client-framework/forms';\nimport { ObjectMetadataElementErrorDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementTemplateDirective } from '@yuuvis/client-framework/metadata-form';\n@Component({\n selector: 'yuv-metadata-default-templates',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n StringComponent,\n DataGridComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n CatalogComponent,\n NumberComponent,\n NumberRangeComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n ObjectMetadataElementTemplateDirective,\n ObjectMetadataElementLabelDirective,\n ObjectMetadataElementErrorDirective,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSlideToggleModule,\n MatFormFieldModule\n ],\n templateUrl: './metadata-default-templates.component.html',\n styleUrl: './metadata-default-templates.component.scss'\n})\nexport class MetadataDefaultTemplatesComponent {}\n","<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-data-grid>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MetadataDefaultTemplatesComponent } from './metadata-default-templates/metadata-default-templates.component';\n\n@NgModule({\n imports: [MetadataDefaultTemplatesComponent],\n exports: [MetadataDefaultTemplatesComponent],\n})\nexport class YuvMetadataFormDefaultsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],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iC,CAAC;oBAC5C,OAAO,EAAE,CAAC,iCAAiC,CAAC;AAC7C,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-metadata-form-defaults.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-default-templates/metadata-default-templates.component.html","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/lib/metadata-form-defaults.module.ts","../../../../../libs/yuuvis/client-framework/metadata-form-defaults/src/yuuvis-client-framework-metadata-form-defaults.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport {\n CatalogComponent,\n DataGridComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n NumberComponent,\n NumberRangeComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n StringComponent\n} from '@yuuvis/client-framework/forms';\nimport { ObjectMetadataElementErrorDirective, ObjectMetadataElementLabelDirective, ObjectMetadataElementTemplateDirective } from '@yuuvis/client-framework/metadata-form';\n@Component({\n selector: 'yuv-metadata-default-templates',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n StringComponent,\n DataGridComponent,\n OrganizationComponent,\n OrganizationSetComponent,\n CatalogComponent,\n NumberComponent,\n NumberRangeComponent,\n DatetimeComponent,\n DatetimeRangeComponent,\n ObjectMetadataElementTemplateDirective,\n ObjectMetadataElementLabelDirective,\n ObjectMetadataElementErrorDirective,\n MatCheckboxModule,\n MatFormFieldModule,\n MatSlideToggleModule,\n MatFormFieldModule\n ],\n templateUrl: './metadata-default-templates.component.html',\n styleUrl: './metadata-default-templates.component.scss'\n})\nexport class MetadataDefaultTemplatesComponent {}\n","<!-- form element templates -->\n\n<!-- STRING -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-string\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [rows]=\"ctx.field.rows\"\n [classifications]=\"ctx.field.classifications\"\n [regex]=\"ctx.field.regex\"\n [readonly]=\"ctx.field.readonly\"\n [minLength]=\"ctx.field.minLength\"\n [maxLength]=\"ctx.field.maxLength\"\n >\n </yuv-string>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- STRING CATALOG -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:catalog\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-catalog\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [multiple]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-catalog>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n (userSelect)=\"ctx.field.dataMeta = $event\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- ORGANIZATION SET -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"string:organization:set\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n <yuv-organization-set\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [multiselect]=\"ctx.field.cardinality === 'multi' || ctx.situation === 'SEARCH'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n >\n </yuv-organization-set>\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- INTEGER -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"integer\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"0\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [pattern]=\"ctx.field.pattern\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- DECIMAL -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"decimal\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-number\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [grouping]=\"ctx.field.grouping\"\n [pattern]=\"ctx.field.pattern\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n >\n >\n </yuv-number>\n } @else {\n <yuv-number-range\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [precision]=\"ctx.field.precision\"\n [scale]=\"ctx.field.scale\"\n [pattern]=\"ctx.field.pattern\"\n [grouping]=\"ctx.field.grouping\"\n [minValue]=\"ctx.field.minValue\"\n [maxValue]=\"ctx.field.maxValue\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-number-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- BOOLEAN -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean\" let-ctx>\n <mat-checkbox\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n [disabled]=\"ctx.field.readonly\"\n [indeterminate]=\"ctx.field.tristate === false ? false : (ctx.ctrl.value !== true && ctx.ctrl.value !== false) ? true : false\"\n >\n </mat-checkbox>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- BOOLEAN SWITCH -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"boolean:switch\" let-ctx>\n <mat-slide-toggle [formControl]=\"ctx.ctrl\" switch=\"true\" [attr.data-name]=\"ctx.field.name\" [disabled]=\"ctx.field.readonly\"></mat-slide-toggle>\n <label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</label>\n</ng-template>\n\n<!-- DATETIME -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"datetime\" let-ctx>\n <mat-form-field>\n <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">{{ ctx.label }}</mat-label>\n @if (ctx.situation !== 'SEARCH') {\n <yuv-datetime\n [required]=\"ctx.field.required\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime>\n } @else {\n <yuv-datetime-range\n [required]=\"ctx.field.required\"\n [situation]=\"ctx.situation\"\n [readonly]=\"ctx.field.readonly\"\n [withTime]=\"ctx.field.resolution !== 'date'\"\n [formControl]=\"ctx.ctrl\"\n [attr.data-name]=\"ctx.field.name\"\n ></yuv-datetime-range>\n }\n <mat-hint>{{ ctx.description }}</mat-hint>\n <mat-error [yuvObjectMetadataElementError]=\"ctx.ctrl\"></mat-error>\n </mat-form-field>\n</ng-template>\n\n<!-- TABLE -->\n<ng-template yuvMetadataElementTemplate=\"default\" propertyType=\"table\" let-ctx>\n <yuv-data-grid\n [situation]=\"ctx.situation\"\n [formControl]=\"ctx.ctrl\"\n [formElement]=\"ctx.field\"\n [attr.data-name]=\"ctx.field.name\"\n [classifications]=\"ctx.field.classifications\"\n [readonly]=\"ctx.field.readonly\"\n [formFieldContext]=\"ctx\"\n >\n </yuv-data-grid>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { MetadataDefaultTemplatesComponent } from './metadata-default-templates/metadata-default-templates.component';\n\n@NgModule({\n imports: [MetadataDefaultTemplatesComponent],\n exports: [MetadataDefaultTemplatesComponent],\n})\nexport class YuvMetadataFormDefaultsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MA4Ca,iCAAiC,CAAA;+GAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iCAAiC,EC5C9C,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,kvQAyNA,EDnMI,MAAA,EAAA,CAAA,8DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,8BACZ,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,QAAA,EAAA,wIAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WA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CAAA,CAAA;gHAA7B,6BAA6B,EAAA,OAAA,EAAA,CAH9B,iCAAiC,CAAA,EAAA,OAAA,EAAA,CACjC,iCAAiC,CAAA,EAAA,CAAA,CAAA;AAEhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,YAH9B,iCAAiC,CAAA,EAAA,CAAA,CAAA;;4FAGhC,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,iCAAiC,CAAC;oBAC5C,OAAO,EAAE,CAAC,iCAAiC,CAAC;AAC7C,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, ElementRef, DestroyRef, input, Directive, TemplateRef, Input,
|
|
2
|
+
import { Injectable, inject, ElementRef, DestroyRef, signal, effect, input, Directive, TemplateRef, Input, untracked, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
3
3
|
import { Situation, SystemService } from '@yuuvis/client-core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import * as i1 from '@yuuvis/client-framework/common';
|
|
@@ -119,50 +119,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
121
|
* Directive to apply styles to an object metadata element label based on its control status.
|
|
122
|
-
* Depending on the state of the control (dirty, error), it will add or remove specific classes
|
|
123
|
-
* to the label element.
|
|
122
|
+
* Depending on the state of the control (dirty, error, required), it will add or remove specific classes
|
|
123
|
+
* to the label element. These classes could then be used to style the label accordingly.
|
|
124
|
+
*
|
|
125
|
+
* Could be placed on any HTML element, but is primarily intended for use on `<mat-label>` or `<label>` elements.
|
|
126
|
+
* If you would like to use it on any other element, make sure to add the class 'label' to it.
|
|
124
127
|
*
|
|
125
128
|
* @example
|
|
126
|
-
* <mat-label [yuvObjectMetadataElementLabel]="
|
|
129
|
+
* <mat-label [yuvObjectMetadataElementLabel]="ctx">My Label</mat-label>
|
|
130
|
+
* <label [yuvObjectMetadataElementLabel]="ctx">My Label</label>
|
|
131
|
+
* <div class="label" [yuvObjectMetadataElementLabel]="ctx">My Label</div>
|
|
127
132
|
*/
|
|
128
133
|
class ObjectMetadataElementLabelDirective {
|
|
129
134
|
constructor() {
|
|
130
135
|
this.#elRef = inject(ElementRef);
|
|
131
136
|
this.#dRef = inject(DestroyRef);
|
|
137
|
+
this.state = signal({
|
|
138
|
+
dirty: false,
|
|
139
|
+
required: false,
|
|
140
|
+
invalid: false
|
|
141
|
+
});
|
|
142
|
+
this.#stateEffect = effect(() => {
|
|
143
|
+
this.#applyState();
|
|
144
|
+
});
|
|
132
145
|
this.yuvObjectMetadataElementLabel = input();
|
|
133
146
|
}
|
|
134
147
|
#elRef;
|
|
135
148
|
#dRef;
|
|
149
|
+
#stateEffect;
|
|
150
|
+
#applyState() {
|
|
151
|
+
const s = this.state();
|
|
152
|
+
this.#toggleClass('dirty', s.dirty);
|
|
153
|
+
this.#toggleClass('required', s.required);
|
|
154
|
+
this.#toggleClass('invalid', s.invalid);
|
|
155
|
+
}
|
|
156
|
+
#markAsInvalid(ctrl) {
|
|
157
|
+
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
158
|
+
}
|
|
159
|
+
#toggleClass(state, condition) {
|
|
160
|
+
const matLabelEl = this.#elRef.nativeElement;
|
|
161
|
+
const matFormFieldEl = matLabelEl.closest('mat-form-field');
|
|
162
|
+
if (matFormFieldEl) {
|
|
163
|
+
matFormFieldEl.classList.toggle(`yuv-formfield-${state}`, condition);
|
|
164
|
+
}
|
|
165
|
+
if (matLabelEl) {
|
|
166
|
+
// if the directive is put on a label outside of a mat-form-field, we'll add an
|
|
167
|
+
// indicator element to the label itself
|
|
168
|
+
const classPrefix = matLabelEl.tagName === 'LABEL' ? 'yuv-label-marker' : 'yuv-label';
|
|
169
|
+
matLabelEl.classList.toggle(`${classPrefix}-${state}`, condition);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
136
172
|
ngOnInit() {
|
|
137
173
|
const input = this.yuvObjectMetadataElementLabel();
|
|
138
174
|
if (input) {
|
|
139
175
|
if (input.formChangedSubject) {
|
|
140
176
|
input.formChangedSubject?.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
});
|
|
148
|
-
input.ctrl.valueChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {
|
|
149
|
-
this.#elRef.nativeElement.classList.toggle('yuv-label-dirty', input.ctrl.dirty);
|
|
177
|
+
const ctrl = input.ctrl;
|
|
178
|
+
this.state.set({
|
|
179
|
+
dirty: !!(ctrl && ctrl.dirty),
|
|
180
|
+
required: ctrl._eoFormElement.required && !this.#markAsInvalid(input.ctrl),
|
|
181
|
+
invalid: this.#markAsInvalid(ctrl)
|
|
182
|
+
});
|
|
150
183
|
});
|
|
151
184
|
}
|
|
152
185
|
}
|
|
153
186
|
}
|
|
187
|
+
ngAfterViewInit() {
|
|
188
|
+
this.#applyState();
|
|
189
|
+
}
|
|
154
190
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ObjectMetadataElementLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
155
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.14", type: ObjectMetadataElementLabelDirective, isStandalone: true, selector: "[yuvObjectMetadataElementLabel]", inputs: { yuvObjectMetadataElementLabel: { classPropertyName: "yuvObjectMetadataElementLabel", publicName: "yuvObjectMetadataElementLabel", isSignal: true, isRequired: false, transformFunction: null } },
|
|
191
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.14", type: ObjectMetadataElementLabelDirective, isStandalone: true, selector: "[yuvObjectMetadataElementLabel]", inputs: { yuvObjectMetadataElementLabel: { classPropertyName: "yuvObjectMetadataElementLabel", publicName: "yuvObjectMetadataElementLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
156
192
|
}
|
|
157
193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ObjectMetadataElementLabelDirective, decorators: [{
|
|
158
194
|
type: Directive,
|
|
159
195
|
args: [{
|
|
160
196
|
selector: '[yuvObjectMetadataElementLabel]',
|
|
161
197
|
standalone: true,
|
|
162
|
-
host: {
|
|
163
|
-
'[class.dirty]': 'yuvObjectMetadataElementLabel().dirty',
|
|
164
|
-
'[class.error]': 'yuvObjectMetadataElementLabel().error'
|
|
165
|
-
}
|
|
166
198
|
}]
|
|
167
199
|
}] });
|
|
168
200
|
|
|
@@ -337,13 +369,13 @@ class MetadataFormFieldComponent {
|
|
|
337
369
|
#ngControl;
|
|
338
370
|
#fieldEffect;
|
|
339
371
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MetadataFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
340
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MetadataFormFieldComponent, isStandalone: true, selector: "yuv-metadata-form-field", inputs: { formChangedSubject: { classPropertyName: "formChangedSubject", publicName: "formChangedSubject", isSignal: true, isRequired: false, transformFunction: null }, formField: { classPropertyName: "formField", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "yuv-metadata-form-field" }, hostDirectives: [{ directive: i1.NoopValueAccessorDirective }], ngImport: i0, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field
|
|
372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: MetadataFormFieldComponent, isStandalone: true, selector: "yuv-metadata-form-field", inputs: { formChangedSubject: { classPropertyName: "formChangedSubject", publicName: "formChangedSubject", isSignal: true, isRequired: false, transformFunction: null }, formField: { classPropertyName: "formField", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "yuv-metadata-form-field" }, hostDirectives: [{ directive: i1.NoopValueAccessorDirective }], ngImport: i0, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field{--label-background-color: transparent;--label-color: inherit}.yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field .yuv-label-invalid,.yuv-metadata-form-field .form-field .yuv-formfield-invalid{--label-background-color: var(--ymt-danger-container);--label-color: var(--ymt-on-danger-container)}.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-label-required,.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-formfield-required{--label-background-color: var(--ymt-primary-container);--label-color: var(--ymt-on-primary-container)}.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-label-dirty,.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-formfield-dirty{--label-background-color: var(--ymt-warning-container);--label-color: var(--ymt-on-warning-container)}.yuv-metadata-form-field .form-field .label,.yuv-metadata-form-field .form-field label{--transition-duration: 2s;position:relative;background-color:var(--label-background-color)!important;color:var(--label-color)!important;border-radius:2px;box-shadow:0 0 0 3px var(--label-background-color)}.yuv-metadata-form-field .form-field mat-form-field{flex:1}.yuv-metadata-form-field .form-field .yuv-label-marker-dirty:after{content:\"\";display:inline-block;background-color:var(--ymt-warning-container);border:1px solid var(--ymt-on-warning-container);border-radius:50%;width:.5em;height:.5em;margin-inline-start:.5em;margin-inline-end:.25em}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatFormFieldModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
341
373
|
}
|
|
342
374
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MetadataFormFieldComponent, decorators: [{
|
|
343
375
|
type: Component,
|
|
344
376
|
args: [{ selector: 'yuv-metadata-form-field', standalone: true, imports: [NgClass, NgTemplateOutlet, MatFormFieldModule], hostDirectives: [NoopValueAccessorDirective], encapsulation: ViewEncapsulation.None, host: {
|
|
345
|
-
class: 'yuv-metadata-form-field'
|
|
346
|
-
}, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field
|
|
377
|
+
class: 'yuv-metadata-form-field',
|
|
378
|
+
}, template: "@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n", styles: [".yuv-metadata-form-field{--label-background-color: transparent;--label-color: inherit}.yuv-metadata-form-field .form-field{margin-block-end:1px;border-radius:.25em;display:flex;align-items:center}.yuv-metadata-form-field .form-field .yuv-label-invalid,.yuv-metadata-form-field .form-field .yuv-formfield-invalid{--label-background-color: var(--ymt-danger-container);--label-color: var(--ymt-on-danger-container)}.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-label-required,.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-formfield-required{--label-background-color: var(--ymt-primary-container);--label-color: var(--ymt-on-primary-container)}.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-label-dirty,.yuv-metadata-form-field .form-field :not(.yuv-label-invalid,.yuv-formfield-invalid).yuv-formfield-dirty{--label-background-color: var(--ymt-warning-container);--label-color: var(--ymt-on-warning-container)}.yuv-metadata-form-field .form-field .label,.yuv-metadata-form-field .form-field label{--transition-duration: 2s;position:relative;background-color:var(--label-background-color)!important;color:var(--label-color)!important;border-radius:2px;box-shadow:0 0 0 3px var(--label-background-color)}.yuv-metadata-form-field .form-field mat-form-field{flex:1}.yuv-metadata-form-field .form-field .yuv-label-marker-dirty:after{content:\"\";display:inline-block;background-color:var(--ymt-warning-container);border:1px solid var(--ymt-on-warning-container);border-radius:50%;width:.5em;height:.5em;margin-inline-start:.5em;margin-inline-end:.25em}\n"] }]
|
|
347
379
|
}] });
|
|
348
380
|
|
|
349
381
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-metadata-form.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-element-registry.service.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-label.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-error.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-template.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.html","../../../../../libs/yuuvis/client-framework/metadata-form/src/yuuvis-client-framework-metadata-form.ts"],"sourcesContent":["import { Injectable, TemplateRef } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\n\n/**\n * Object forms are used to render and edit metadata of DMS objects. Each property\n * of an object can be rendered in a diffenrent way, depending on the type of the property.\n * This service allows to register and retrieve templates for rendering these form elements.\n * \n * You can register templates for different situations like EDIT, SEARCH, and CREATE.\n * The templates will then be used to render the form elements in the object form component.\n * \n * So based on the property type you can register custom templates for rendering certain\n * form elements. This is useful if you want to render a property in a different way.\n * \n * Example:\n * Having a number property representing a rating, you might want to render it as \n * a list of stars instead of a simple input field. \n */\n@Injectable({\n providedIn: 'root'\n})\nexport class MetadataFormElementRegistry {\n private _defaults: { [propertyType: string]: TemplateRef<any> } = {};\n\n private _edit: { [propertyType: string]: TemplateRef<any> } = {};\n private _search: { [propertyType: string]: TemplateRef<any> } = {};\n private _create: { [propertyType: string]: TemplateRef<any> } = {};\n\n // registering a template by name will add this prefix to the given name\n NAME_PROPERTY_PREFIX = '@name:'\n\n /**\n * Get a template to render a certain form element\n * @param propertyType The internal type to get the template for\n * @param situation Form situation\n * @returns TemplateRef or undefined\n */\n getElementTemplate(propertyType: string, situation: string = Situation.EDIT): TemplateRef<any> | undefined {\n let cmps = { ...this._defaults, ...this._edit };\n if (situation === Situation.SEARCH) cmps = { ...this._defaults, ...this._edit, ...this._search };\n else if (situation === Situation.CREATE) cmps = { ...this._defaults, ...this._edit, ...this._create };\n\n return cmps[propertyType];\n }\n\n /**\n * Register an object form element for a certain internal type. You might add a new component\n * or overwrite an existung one.\n * @param propertyType The internal type to provide the component for\n * @param component The component\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n addElementTemplate(propertyType: string, templateRef: TemplateRef<any>, situation: Situation = Situation.EDIT): void {\n if (propertyType && templateRef) {\n switch (situation) {\n case Situation.SEARCH: {\n this._search[propertyType] = templateRef;\n break;\n }\n case Situation.CREATE: {\n this._create[propertyType] = templateRef;\n break;\n }\n default: {\n this._edit[propertyType] = templateRef;\n }\n }\n }\n }\n\n /**\n * Remove a registered form element.\n * @param propertyType The internal type to remove the component for\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n removeElementTemplate(propertyType: string, situation: Situation = Situation.EDIT) {\n switch (situation) {\n case Situation.SEARCH: {\n delete this._search[propertyType];\n break;\n }\n case Situation.CREATE: {\n delete this._create[propertyType];\n break;\n }\n default: {\n delete this._edit[propertyType];\n }\n }\n }\n\n /**\n * Register default form element component. Usually this will be done by the object\n * form component itself.\n * @param propertyType The internal type to provide the component for\n * @param component The default component\n */\n _addDefaultElementTemplate(propertyType: string, templateRef: TemplateRef<any>): void {\n if (propertyType && templateRef) {\n this._defaults[propertyType] = templateRef;\n }\n }\n\n /**\n * Remove a registered default form element.\n * @param propertyType The internal type to remove the component for\n */\n _removeDefaultElementTemplate(propertyType: string) {\n delete this._defaults[propertyType];\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { MetadataFormFieldContext } from './metadata-form-field/metadata-form-field.interface';\n\n/**\n * Directive to apply styles to an object metadata element label based on its control status.\n * Depending on the state of the control (dirty, error), it will add or remove specific classes\n * to the label element. Thes clases could then be used to style the label accordingly.\n *\n * @example\n * <mat-label [yuvObjectMetadataElementLabel]=\"myControl\">My Label</mat-label>\n */\n@Directive({\n selector: '[yuvObjectMetadataElementLabel]',\n standalone: true,\n host: {\n '[class.dirty]': 'yuvObjectMetadataElementLabel().dirty',\n '[class.error]': 'yuvObjectMetadataElementLabel().error'\n }\n})\nexport class ObjectMetadataElementLabelDirective implements OnInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n\n yuvObjectMetadataElementLabel = input<MetadataFormFieldContext>();\n\n ngOnInit() {\n const input = this.yuvObjectMetadataElementLabel();\n if (input) {\n if (input.formChangedSubject) {\n input.formChangedSubject?.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {\n this.#elRef.nativeElement.classList.toggle('yuv-label-dirty', input.ctrl!.dirty);\n });\n }\n\n if (input.ctrl) {\n input.ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s: FormControlStatus) => {\n this.#elRef.nativeElement.classList.toggle('yuv-label-invalid', s === 'INVALID');\n });\n input.ctrl.valueChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {\n this.#elRef.nativeElement.classList.toggle('yuv-label-dirty', input.ctrl!.dirty);\n });\n }\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControlStatus } from '@angular/forms';\nimport { ObjectFormControl } from '@yuuvis/client-core';\nimport { FormTranslateService } from '@yuuvis/client-framework/common';\n\n/**\n * Directive to apply an object-form related error to as inner text to an element.\n * This could be used to render objec tform related errors in a custom element like <mat-error>.\n * \n * @example\n * <mat-error [yuvObjectMetadataElementError]=\"myControl\"></mat-error>\n */\n@Directive({\n selector: '[yuvObjectMetadataElementError]',\n standalone: true\n})\nexport class ObjectMetadataElementErrorDirective implements OnInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n #fts = inject(FormTranslateService);\n\n yuvObjectMetadataElementError = input<ObjectFormControl>();\n\n #getErrors(): string[] {\n const ctrl = this.yuvObjectMetadataElementError();\n\n // only show errors if the control has been touched\n const shouldShowErrors = ctrl && ctrl.errors && (ctrl.touched || ctrl.dirty);\n\n return shouldShowErrors\n ? Object.keys(ctrl.errors).map((key) => {\n return key === 'eoformScript' ? ctrl._eoFormElement.error.msg : this.#fts.getErrorLabel(key, ctrl.errors![key].params);\n })\n : [];\n }\n\n ngOnInit() {\n const ctrl = this.yuvObjectMetadataElementError();\n if (ctrl) {\n ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s: FormControlStatus) => {\n if (s === 'INVALID') {\n const err = this.#getErrors();\n this.#elRef.nativeElement.innerText = err.length > 0 ? err[0] : '';\n }\n });\n }\n }\n}\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, inject, input } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\nimport { MetadataFormElementRegistry } from './metadata-form-element-registry.service';\n\n/**\n * Directive to be applied to a `ng-template`. It will register the template as a\n * form element used by object-form component.\n *\n * Context is provided with the following fields:\n * - situation: form situation 'EDIT', 'CREATE', 'SEARCH'\n * - field: ObjectTypeField\n * - ngControl: Reactive FormControl\n *\n * @example\n * <ng-template yuvMetadataElementTemplate propertyType=\"boolean:switch\" let-ctx>...</ng-template>\n *\n */\n@Directive({\n selector: '[yuvMetadataElementTemplate]',\n standalone: true\n})\nexport class ObjectMetadataElementTemplateDirective implements OnInit, OnDestroy {\n #registry = inject(MetadataFormElementRegistry);\n #template = inject(TemplateRef<any>);\n\n /**\n * Bucket to register the template. Use 'default' for templates that should be\n * used across all situations.\n */\n @Input() yuvMetadataElementTemplate?: string;\n /**\n * Situation to register the template for. So only object forms for that\n * situation (CREATE, EDIT, SEARCH) will use the template. Defaults to `EDIT`.\n */\n situation = input<Situation>(Situation.EDIT);\n\n /**\n * Internal property type to get the registered template. You need to set either\n * `propertyType` or `propertyName` to get a template. Setting a name and\n * a type, the name will be used because it is more precise.\n */\n propertyType = input<string>();\n /**\n * Pick registered metadata element by name. You need to set either\n * `propertyType` or `propertyName` to get a template. Setting a name and\n * a type, the name will be used because it is more precise.\n */\n propertyName = input<string>();\n #registrationKey?: string;\n\n ngOnInit(): void {\n const pn = this.propertyName();\n this.#registrationKey = pn ? `${this.#registry.NAME_PROPERTY_PREFIX}${pn}` : this.propertyType();\n if (this.#registrationKey) {\n if (this.yuvMetadataElementTemplate === 'default') {\n this.#registry._addDefaultElementTemplate(this.#registrationKey, this.#template);\n } else this.#registry.addElementTemplate(this.#registrationKey, this.#template, this.situation());\n }\n }\n\n ngOnDestroy(): void {\n if (!this.#registrationKey) return;\n if (this.yuvMetadataElementTemplate === 'default') this.#registry._removeDefaultElementTemplate(this.#registrationKey);\n else this.#registry.removeElementTemplate(this.#registrationKey, this.situation());\n }\n}\n","import { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, inject, input, signal, TemplateRef, untracked, ViewEncapsulation } from '@angular/core';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { ObjectTypeField, Situation, SystemService } from '@yuuvis/client-core';\nimport { injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';\nimport { Subject } from 'rxjs';\nimport { MetadataFormElementRegistry } from '../metadata-form-element-registry.service';\nimport { MetadataFormFieldContext, ParentFormChangedEvent } from './metadata-form-field.interface';\n\n\n\n/**\n * Component to render a metadata form field within an object form. These forms are\n * created to render and edit metadata of DMS objects. This component is used as a wrapper\n * for the actual form element, which is defined by the `formField` input.\n */\n@Component({\n selector: 'yuv-metadata-form-field',\n standalone: true,\n imports: [NgClass, NgTemplateOutlet, MatFormFieldModule],\n templateUrl: './metadata-form-field.component.html',\n styleUrl: './metadata-form-field.component.scss',\n hostDirectives: [NoopValueAccessorDirective],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'yuv-metadata-form-field'\n }\n})\nexport class MetadataFormFieldComponent {\n #registry = inject(MetadataFormElementRegistry);\n #system = inject(SystemService);\n\n #ngControl = injectNgControl();\n elementTemplate = signal<TemplateRef<any> | undefined>(undefined);\n readonly = false;\n\n formChangedSubject = input<Subject<ParentFormChangedEvent>>()\n formField = input.required<ObjectTypeField>({ alias: 'field' });\n #fieldEffect = effect(() => {\n const field = this.formField();\n\n untracked(() => {\n // check for template by name ...\n const templateByName = this.#registry.getElementTemplate(`${this.#registry.NAME_PROPERTY_PREFIX}${field.name}`, this.situation());\n if (templateByName) this.elementTemplate.set(templateByName);\n else {\n if (!field._internalType) field._internalType = this.#system.getInternalFormElementType(field.propertyType);\n this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));\n }\n // TODO: set readonly state based on ...????... schema?\n this.readonly = false;\n });\n });\n \n context = computed<MetadataFormFieldContext>(() => {\n const field = this.formField();\n field.required = this.situation() !== Situation.SEARCH ? field.required : false;\n return {\n label: field.label || field.name,\n description: field.description,\n situation: this.situation() || Situation.EDIT,\n field,\n ctrl: this.#ngControl?.control || undefined,\n formChangedSubject: this.formChangedSubject()\n };\n });\n\n /**\n * Form situation, if not set default will be 'EDIT'\n */\n situation = input<string | undefined>(Situation.EDIT);\n}\n","@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field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,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDOY,OAAO,EAAE,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,mJAAE,kBAAkB,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAS5C,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAZtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,EAAA,cAAA,EAGxC,CAAC,0BAA0B,CAAC,iBAC7B,iBAAiB,CAAC,IAAI,EAC/B,IAAA,EAAA;AACJ,wBAAA,KAAK,EAAE;AACR,qBAAA,EAAA,QAAA,EAAA,ybAAA,EAAA,MAAA,EAAA,CAAA,m1BAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"yuuvis-client-framework-metadata-form.mjs","sources":["../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-element-registry.service.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-label.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-error.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/object-metadata-element-template.directive.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.ts","../../../../../libs/yuuvis/client-framework/metadata-form/src/lib/metadata-form-field/metadata-form-field.component.html","../../../../../libs/yuuvis/client-framework/metadata-form/src/yuuvis-client-framework-metadata-form.ts"],"sourcesContent":["import { Injectable, TemplateRef } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\n\n/**\n * Object forms are used to render and edit metadata of DMS objects. Each property\n * of an object can be rendered in a diffenrent way, depending on the type of the property.\n * This service allows to register and retrieve templates for rendering these form elements.\n * \n * You can register templates for different situations like EDIT, SEARCH, and CREATE.\n * The templates will then be used to render the form elements in the object form component.\n * \n * So based on the property type you can register custom templates for rendering certain\n * form elements. This is useful if you want to render a property in a different way.\n * \n * Example:\n * Having a number property representing a rating, you might want to render it as \n * a list of stars instead of a simple input field. \n */\n@Injectable({\n providedIn: 'root'\n})\nexport class MetadataFormElementRegistry {\n private _defaults: { [propertyType: string]: TemplateRef<any> } = {};\n\n private _edit: { [propertyType: string]: TemplateRef<any> } = {};\n private _search: { [propertyType: string]: TemplateRef<any> } = {};\n private _create: { [propertyType: string]: TemplateRef<any> } = {};\n\n // registering a template by name will add this prefix to the given name\n NAME_PROPERTY_PREFIX = '@name:'\n\n /**\n * Get a template to render a certain form element\n * @param propertyType The internal type to get the template for\n * @param situation Form situation\n * @returns TemplateRef or undefined\n */\n getElementTemplate(propertyType: string, situation: string = Situation.EDIT): TemplateRef<any> | undefined {\n let cmps = { ...this._defaults, ...this._edit };\n if (situation === Situation.SEARCH) cmps = { ...this._defaults, ...this._edit, ...this._search };\n else if (situation === Situation.CREATE) cmps = { ...this._defaults, ...this._edit, ...this._create };\n\n return cmps[propertyType];\n }\n\n /**\n * Register an object form element for a certain internal type. You might add a new component\n * or overwrite an existung one.\n * @param propertyType The internal type to provide the component for\n * @param component The component\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n addElementTemplate(propertyType: string, templateRef: TemplateRef<any>, situation: Situation = Situation.EDIT): void {\n if (propertyType && templateRef) {\n switch (situation) {\n case Situation.SEARCH: {\n this._search[propertyType] = templateRef;\n break;\n }\n case Situation.CREATE: {\n this._create[propertyType] = templateRef;\n break;\n }\n default: {\n this._edit[propertyType] = templateRef;\n }\n }\n }\n }\n\n /**\n * Remove a registered form element.\n * @param propertyType The internal type to remove the component for\n * @param situation Form situation to provide thew form element for (defaults to EDIT)\n */\n removeElementTemplate(propertyType: string, situation: Situation = Situation.EDIT) {\n switch (situation) {\n case Situation.SEARCH: {\n delete this._search[propertyType];\n break;\n }\n case Situation.CREATE: {\n delete this._create[propertyType];\n break;\n }\n default: {\n delete this._edit[propertyType];\n }\n }\n }\n\n /**\n * Register default form element component. Usually this will be done by the object\n * form component itself.\n * @param propertyType The internal type to provide the component for\n * @param component The default component\n */\n _addDefaultElementTemplate(propertyType: string, templateRef: TemplateRef<any>): void {\n if (propertyType && templateRef) {\n this._defaults[propertyType] = templateRef;\n }\n }\n\n /**\n * Remove a registered default form element.\n * @param propertyType The internal type to remove the component for\n */\n _removeDefaultElementTemplate(propertyType: string) {\n delete this._defaults[propertyType];\n }\n}\n","import { AfterViewInit, DestroyRef, Directive, effect, ElementRef, inject, input, OnInit, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { AbstractControl, FormControlStatus, Validators } from '@angular/forms';\nimport { MetadataFormFieldContext } from './metadata-form-field/metadata-form-field.interface';\nimport { ObjectFormControl } from '@yuuvis/client-core';\n\n/**\n * Directive to apply styles to an object metadata element label based on its control status.\n * Depending on the state of the control (dirty, error, required), it will add or remove specific classes\n * to the label element. These classes could then be used to style the label accordingly.\n *\n * Could be placed on any HTML element, but is primarily intended for use on `<mat-label>` or `<label>` elements.\n * If you would like to use it on any other element, make sure to add the class 'label' to it.\n * \n * @example\n * <mat-label [yuvObjectMetadataElementLabel]=\"ctx\">My Label</mat-label>\n * <label [yuvObjectMetadataElementLabel]=\"ctx\">My Label</label>\n * <div class=\"label\" [yuvObjectMetadataElementLabel]=\"ctx\">My Label</div>\n */\n@Directive({\n selector: '[yuvObjectMetadataElementLabel]',\n standalone: true,\n})\nexport class ObjectMetadataElementLabelDirective implements OnInit, AfterViewInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n\n state = signal({\n dirty: false,\n required: false,\n invalid: false\n });\n #stateEffect = effect(() => {\n this.#applyState();\n });\n\n yuvObjectMetadataElementLabel = input<MetadataFormFieldContext>();\n\n #applyState() {\n const s = this.state();\n this.#toggleClass('dirty', s.dirty);\n this.#toggleClass('required', s.required);\n this.#toggleClass('invalid', s.invalid);\n }\n\n #markAsInvalid(ctrl: AbstractControl<any, any>): boolean {\n return ctrl.invalid && (ctrl.dirty || ctrl.touched);\n }\n\n #toggleClass(state: 'dirty' | 'invalid' | 'required', condition: boolean) {\n const matLabelEl = this.#elRef.nativeElement as HTMLElement;\n const matFormFieldEl = matLabelEl.closest('mat-form-field');\n\n if (matFormFieldEl) {\n matFormFieldEl.classList.toggle(`yuv-formfield-${state}`, condition);\n }\n if (matLabelEl) {\n // if the directive is put on a label outside of a mat-form-field, we'll add an\n // indicator element to the label itself\n const classPrefix = matLabelEl.tagName === 'LABEL' ? 'yuv-label-marker' : 'yuv-label';\n matLabelEl.classList.toggle(`${classPrefix}-${state}`, condition);\n }\n }\n\n ngOnInit() {\n const input = this.yuvObjectMetadataElementLabel();\n if (input) {\n if (input.formChangedSubject) {\n input.formChangedSubject?.pipe(takeUntilDestroyed(this.#dRef)).subscribe(() => {\n const ctrl = input.ctrl! as ObjectFormControl;\n this.state.set({\n dirty: !!(ctrl && ctrl.dirty),\n required: ctrl._eoFormElement.required && !this.#markAsInvalid(input.ctrl!),\n invalid: this.#markAsInvalid(ctrl)\n });\n });\n }\n }\n }\n\n ngAfterViewInit(): void {\n this.#applyState();\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject, input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormControlStatus } from '@angular/forms';\nimport { ObjectFormControl } from '@yuuvis/client-core';\nimport { FormTranslateService } from '@yuuvis/client-framework/common';\n\n/**\n * Directive to apply an object-form related error to as inner text to an element.\n * This could be used to render objec tform related errors in a custom element like <mat-error>.\n * \n * @example\n * <mat-error [yuvObjectMetadataElementError]=\"myControl\"></mat-error>\n */\n@Directive({\n selector: '[yuvObjectMetadataElementError]',\n standalone: true\n})\nexport class ObjectMetadataElementErrorDirective implements OnInit {\n #elRef = inject(ElementRef);\n #dRef = inject(DestroyRef);\n #fts = inject(FormTranslateService);\n\n yuvObjectMetadataElementError = input<ObjectFormControl>();\n\n #getErrors(): string[] {\n const ctrl = this.yuvObjectMetadataElementError();\n\n // only show errors if the control has been touched\n const shouldShowErrors = ctrl && ctrl.errors && (ctrl.touched || ctrl.dirty);\n\n return shouldShowErrors\n ? Object.keys(ctrl.errors).map((key) => {\n return key === 'eoformScript' ? ctrl._eoFormElement.error.msg : this.#fts.getErrorLabel(key, ctrl.errors![key].params);\n })\n : [];\n }\n\n ngOnInit() {\n const ctrl = this.yuvObjectMetadataElementError();\n if (ctrl) {\n ctrl.statusChanges.pipe(takeUntilDestroyed(this.#dRef)).subscribe((s: FormControlStatus) => {\n if (s === 'INVALID') {\n const err = this.#getErrors();\n this.#elRef.nativeElement.innerText = err.length > 0 ? err[0] : '';\n }\n });\n }\n }\n}\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, inject, input } from '@angular/core';\nimport { Situation } from '@yuuvis/client-core';\nimport { MetadataFormElementRegistry } from './metadata-form-element-registry.service';\n\n/**\n * Directive to be applied to a `ng-template`. It will register the template as a\n * form element used by object-form component.\n *\n * Context is provided with the following fields:\n * - situation: form situation 'EDIT', 'CREATE', 'SEARCH'\n * - field: ObjectTypeField\n * - ngControl: Reactive FormControl\n *\n * @example\n * <ng-template yuvMetadataElementTemplate propertyType=\"boolean:switch\" let-ctx>...</ng-template>\n *\n */\n@Directive({\n selector: '[yuvMetadataElementTemplate]',\n standalone: true\n})\nexport class ObjectMetadataElementTemplateDirective implements OnInit, OnDestroy {\n #registry = inject(MetadataFormElementRegistry);\n #template = inject(TemplateRef<any>);\n\n /**\n * Bucket to register the template. Use 'default' for templates that should be\n * used across all situations.\n */\n @Input() yuvMetadataElementTemplate?: string;\n /**\n * Situation to register the template for. So only object forms for that\n * situation (CREATE, EDIT, SEARCH) will use the template. Defaults to `EDIT`.\n */\n situation = input<Situation>(Situation.EDIT);\n\n /**\n * Internal property type to get the registered template. You need to set either\n * `propertyType` or `propertyName` to get a template. Setting a name and\n * a type, the name will be used because it is more precise.\n */\n propertyType = input<string>();\n /**\n * Pick registered metadata element by name. You need to set either\n * `propertyType` or `propertyName` to get a template. Setting a name and\n * a type, the name will be used because it is more precise.\n */\n propertyName = input<string>();\n #registrationKey?: string;\n\n ngOnInit(): void {\n const pn = this.propertyName();\n this.#registrationKey = pn ? `${this.#registry.NAME_PROPERTY_PREFIX}${pn}` : this.propertyType();\n if (this.#registrationKey) {\n if (this.yuvMetadataElementTemplate === 'default') {\n this.#registry._addDefaultElementTemplate(this.#registrationKey, this.#template);\n } else this.#registry.addElementTemplate(this.#registrationKey, this.#template, this.situation());\n }\n }\n\n ngOnDestroy(): void {\n if (!this.#registrationKey) return;\n if (this.yuvMetadataElementTemplate === 'default') this.#registry._removeDefaultElementTemplate(this.#registrationKey);\n else this.#registry.removeElementTemplate(this.#registrationKey, this.situation());\n }\n}\n","import { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, effect, inject, input, signal, TemplateRef, untracked, ViewEncapsulation } from '@angular/core';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { ObjectTypeField, Situation, SystemService } from '@yuuvis/client-core';\nimport { injectNgControl, NoopValueAccessorDirective } from '@yuuvis/client-framework/common';\nimport { Subject } from 'rxjs';\nimport { MetadataFormElementRegistry } from '../metadata-form-element-registry.service';\nimport { MetadataFormFieldContext, ParentFormChangedEvent } from './metadata-form-field.interface';\n\n\n\n/**\n * Component to render a metadata form field within an object form. These forms are\n * created to render and edit metadata of DMS objects. This component is used as a wrapper\n * for the actual form element, which is defined by the `formField` input.\n */\n@Component({\n selector: 'yuv-metadata-form-field',\n standalone: true,\n imports: [NgClass, NgTemplateOutlet, MatFormFieldModule],\n templateUrl: './metadata-form-field.component.html',\n styleUrl: './metadata-form-field.component.scss',\n hostDirectives: [NoopValueAccessorDirective],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'yuv-metadata-form-field',\n }\n})\nexport class MetadataFormFieldComponent {\n #registry = inject(MetadataFormElementRegistry);\n #system = inject(SystemService);\n\n #ngControl = injectNgControl();\n elementTemplate = signal<TemplateRef<any> | undefined>(undefined);\n readonly = false;\n\n formChangedSubject = input<Subject<ParentFormChangedEvent>>()\n formField = input.required<ObjectTypeField>({ alias: 'field' });\n #fieldEffect = effect(() => {\n const field = this.formField();\n\n untracked(() => {\n // check for template by name ...\n const templateByName = this.#registry.getElementTemplate(`${this.#registry.NAME_PROPERTY_PREFIX}${field.name}`, this.situation());\n if (templateByName) this.elementTemplate.set(templateByName);\n else {\n if (!field._internalType) field._internalType = this.#system.getInternalFormElementType(field.propertyType);\n this.elementTemplate.set(this.#registry.getElementTemplate(field._internalType, this.situation()));\n }\n // TODO: set readonly state based on ...????... schema?\n this.readonly = false;\n });\n });\n \n context = computed<MetadataFormFieldContext>(() => {\n const field = this.formField();\n field.required = this.situation() !== Situation.SEARCH ? field.required : false;\n return {\n label: field.label || field.name,\n description: field.description,\n situation: this.situation() || Situation.EDIT,\n field,\n ctrl: this.#ngControl?.control || undefined,\n formChangedSubject: this.formChangedSubject()\n };\n });\n\n /**\n * Form situation, if not set default will be 'EDIT'\n */\n situation = input<string | undefined>(Situation.EDIT);\n}\n","@let field = formField();\n@let et = elementTemplate();\n\n@if (field) {\n <div class=\"form-field t-{{ field._internalType }}\" #formField [attr.data-name]=\"field.name\" [ngClass]=\"{ disabled: !!readonly }\">\n @if (et) {\n <ng-container *ngTemplateOutlet=\"et; context: { $implicit: context() }\"></ng-container>\n } @else {\n <em>\n <strong>{{ field._internalType }}</strong>\n </em>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;;;AAcG;MAIU,2BAA2B,CAAA;AAHxC,IAAA,WAAA,GAAA;QAIU,IAAS,CA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E5BH;;AAEG;;;;"}
|
|
@@ -1596,5 +1596,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1596
1596
|
* Generated bundle index. Do not edit.
|
|
1597
1597
|
*/
|
|
1598
1598
|
|
|
1599
|
-
export { ObjectFormComponent, ObjectFormElementExtension,
|
|
1599
|
+
export { ObjectFormComponent, ObjectFormElementExtension, YuvObjectFormModule };
|
|
1600
1600
|
//# sourceMappingURL=yuuvis-client-framework-object-form.mjs.map
|
|
@@ -306,6 +306,8 @@ class TileListComponent {
|
|
|
306
306
|
});
|
|
307
307
|
return x;
|
|
308
308
|
});
|
|
309
|
+
this.checkForPendingChanges = input(false);
|
|
310
|
+
this.preventChangeUntil = input(() => true);
|
|
309
311
|
/**
|
|
310
312
|
* Emitted when a list item has been selected
|
|
311
313
|
*/
|
|
@@ -355,8 +357,11 @@ class TileListComponent {
|
|
|
355
357
|
}
|
|
356
358
|
}
|
|
357
359
|
select(i, evt) {
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
+
const check = this.preventChangeUntil();
|
|
361
|
+
if (check()) {
|
|
362
|
+
const idx = this.items.findIndex((item) => item.id === i.id);
|
|
363
|
+
this._selectByIndex(idx, evt);
|
|
364
|
+
}
|
|
360
365
|
}
|
|
361
366
|
selectById(ids) {
|
|
362
367
|
if (this._busy())
|
|
@@ -631,7 +636,7 @@ class TileListComponent {
|
|
|
631
636
|
this._keyManager?.destroy();
|
|
632
637
|
}
|
|
633
638
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TileListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
634
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TileListComponent, isStandalone: true, selector: "yuv-tile-list", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, flavor: { classPropertyName: "flavor", publicName: "flavor", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, preselect: { classPropertyName: "preselect", publicName: "preselect", isSignal: true, isRequired: false, transformFunction: null }, highlights: { classPropertyName: "highlights", publicName: "highlights", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", tileCopy: "tileCopy", tileCut: "tileCut", busy: "busy", queryResult: "queryResult", selectionChange: "selectionChange", itemDblClick: "itemDblClick", ctxMenu: "ctxMenu" }, host: { attributes: { "tabindex": "0", "role": "listbox" }, listeners: { "contextmenu": "onContextMenu($event)", "mousedown": "onMouseDown($event)", "keydown.control.c": "onCopy($event)", "keydown.control.x": "onCut($event)", "keydown": "onKeydown($event)" }, properties: { "class.pagination": "this.pagination" } }, providers: [], queries: [{ propertyName: "emptyContent", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tiles", predicate: TileComponent, descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ListItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"tiles\"\n [yuvDragSelect]=\"{ disabled: !this.multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n>\n @for (i of items; track i.id) {\n <yuv-tile\n yuvDragSelectItem\n yuvListItem\n [attr.aria-selected]=\"selection().includes(i.id)\"\n (click.single)=\"select(i, $event)\"\n (click.double)=\"itemDblClick.emit(i)\"\n [ngClass]=\"{ selected: selection().includes(i.id), last: $last }\"\n [actionContext]=\"options()?.actionContext\"\n [tile]=\"i\"\n [ngStyle]=\"highlightStyles()[i.id]\"\n (contextmenu)=\"contextMenuHandler($event, $index)\"\n ></yuv-tile>\n } @empty {\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n }\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</div>\n@if (pagination) {\n <mat-paginator\n class=\"paginator\"\n [length]=\"pagination?.total\"\n [pageSize]=\"getPageSize()\"\n (page)=\"changePage($event)\"\n hidePageSize\n >\n </mat-paginator>\n}\n", styles: [":host{--tile-current-background: var(--ymt-focus-background);--tile-on-current: var(--ymt-on-focus-background);--tile-selected-background: var(--ymt-selection-background);--tile-on-selected: var(--ymt-on-selection-background);--tile-selected-icon-fill: var(--ymt-primary);--tile-gap: 0px;--tile-border: var(--tile-border-width, 1px) solid var(--ymt-outline-variant);--tile-border-width: 1px;--tile-icon-size: initial;--paging-background: var(--ymt-surface);display:flex;flex-direction:column}:host .tiles{overflow-y:auto;display:flex;flex-flow:column;height:100%}:host .tiles yuv-tile{flex:0 0 auto}:host .tiles .offset{flex:1 1 auto}:host .paginator{border-block-start:1px solid var(--ymt-outline-variant);font:inherit;background-color:var(--paging-background)}:host yuv-tile{cursor:pointer}:host yuv-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TileComponent, selector: "yuv-tile", inputs: ["tile", "actionContext"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: YuvListModule }, { kind: "directive", type: i3.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }, { kind: "directive", type: DragSelectDirective, selector: "[yuvDragSelect]", inputs: ["yuvDragSelect"], outputs: ["dragSelectChange", "dragSelect"] }, { kind: "directive", type: DragSelectItemDirective, selector: "[yuvDragSelectItem]" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] }); }
|
|
639
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TileListComponent, isStandalone: true, selector: "yuv-tile-list", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, flavor: { classPropertyName: "flavor", publicName: "flavor", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, preselect: { classPropertyName: "preselect", publicName: "preselect", isSignal: true, isRequired: false, transformFunction: null }, highlights: { classPropertyName: "highlights", publicName: "highlights", isSignal: true, isRequired: false, transformFunction: null }, checkForPendingChanges: { classPropertyName: "checkForPendingChanges", publicName: "checkForPendingChanges", isSignal: true, isRequired: false, transformFunction: null }, preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", tileCopy: "tileCopy", tileCut: "tileCut", busy: "busy", queryResult: "queryResult", selectionChange: "selectionChange", itemDblClick: "itemDblClick", ctxMenu: "ctxMenu" }, host: { attributes: { "tabindex": "0", "role": "listbox" }, listeners: { "contextmenu": "onContextMenu($event)", "mousedown": "onMouseDown($event)", "keydown.control.c": "onCopy($event)", "keydown.control.x": "onCut($event)", "keydown": "onKeydown($event)" }, properties: { "class.pagination": "this.pagination" } }, providers: [], queries: [{ propertyName: "emptyContent", first: true, predicate: ["empty"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tiles", predicate: TileComponent, descendants: true, isSignal: true }, { propertyName: "listItems", predicate: ListItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"tiles\"\n [yuvDragSelect]=\"{ disabled: !this.multiselect() || isTouchDevice }\"\n (dragSelectChange)=\"onDragSelectChange($event)\"\n (dragSelect)=\"onDragSelect($event)\"\n>\n @for (i of items; track i.id) {\n <yuv-tile\n yuvDragSelectItem\n yuvListItem\n [attr.aria-selected]=\"selection().includes(i.id)\"\n (click.single)=\"select(i, $event)\"\n (click.double)=\"itemDblClick.emit(i)\"\n [ngClass]=\"{ selected: selection().includes(i.id), last: $last }\"\n [actionContext]=\"options()?.actionContext\"\n [tile]=\"i\"\n [ngStyle]=\"highlightStyles()[i.id]\"\n (contextmenu)=\"contextMenuHandler($event, $index)\"\n ></yuv-tile>\n } @empty {\n <div class=\"empyt-list\">\n @if (searchExecuted && emptyContent()) {\n <ng-content></ng-content>\n }\n </div>\n }\n <div class=\"offset\" (click)=\"clearSelection()\"></div>\n</div>\n@if (pagination) {\n <mat-paginator\n class=\"paginator\"\n [length]=\"pagination?.total\"\n [pageSize]=\"getPageSize()\"\n (page)=\"changePage($event)\"\n hidePageSize\n >\n </mat-paginator>\n}\n", styles: [":host{--tile-current-background: var(--ymt-focus-background);--tile-on-current: var(--ymt-on-focus-background);--tile-selected-background: var(--ymt-selection-background);--tile-on-selected: var(--ymt-on-selection-background);--tile-selected-icon-fill: var(--ymt-primary);--tile-gap: 0px;--tile-border: var(--tile-border-width, 1px) solid var(--ymt-outline-variant);--tile-border-width: 1px;--tile-icon-size: initial;--paging-background: var(--ymt-surface);display:flex;flex-direction:column}:host .tiles{overflow-y:auto;display:flex;flex-flow:column;height:100%}:host .tiles yuv-tile{flex:0 0 auto}:host .tiles .offset{flex:1 1 auto}:host .paginator{border-block-start:1px solid var(--ymt-outline-variant);font:inherit;background-color:var(--paging-background)}:host yuv-tile{cursor:pointer}:host yuv-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host .empyt-list{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: TileComponent, selector: "yuv-tile", inputs: ["tile", "actionContext"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: YuvListModule }, { kind: "directive", type: i3.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }, { kind: "directive", type: DragSelectDirective, selector: "[yuvDragSelect]", inputs: ["yuvDragSelect"], outputs: ["dragSelectChange", "dragSelect"] }, { kind: "directive", type: DragSelectItemDirective, selector: "[yuvDragSelectItem]" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$1.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }] }); }
|
|
635
640
|
}
|
|
636
641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TileListComponent, decorators: [{
|
|
637
642
|
type: Component,
|