@yuuvis/client-framework 2.4.1 → 2.4.3
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-autocomplete.mjs +11 -1
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +118 -117
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-list.mjs +38 -6
- package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs +63 -47
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +82 -7
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +135 -177
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/forms/lib/elements/data-grid/data-grid/data-grid.component.d.ts +3 -3
- package/forms/lib/elements/organization/organization.component.d.ts +6 -11
- package/forms/lib/elements/organization-set/organization-set.component.d.ts +3 -5
- package/lib/assets/i18n/de.json +1 -0
- package/lib/assets/i18n/en.json +1 -0
- package/list/index.d.ts +1 -0
- package/list/lib/list-tile/list-tile.component.d.ts +14 -0
- package/list/lib/list.component.d.ts +1 -0
- package/list/lib/list.module.d.ts +2 -1
- package/object-relationship/lib/actions/add-relationship/add-relationship.component.d.ts +3 -1
- package/object-relationship/lib/object-relationship.component.d.ts +1 -0
- package/object-relationship/lib/object-relationship.const.d.ts +4 -0
- package/package.json +8 -8
- package/renderer/lib/property-renderer/organization.renderer.d.ts +7 -1
- package/tile-list/index.d.ts +1 -1
- package/tile-list/lib/tile-actions-menu/tile-actions-menu.component.d.ts +11 -0
- package/tile-list/lib/tile-list/tile-list.component.d.ts +18 -24
- package/tile-list/lib/tile/tile.component.d.ts +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1$2 from '@angular/common';
|
|
2
2
|
import { CommonModule, NgClass } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, signal, input, forwardRef, ChangeDetectionStrategy, Component, ChangeDetectorRef, ElementRef, computed, effect, untracked, viewChild, DestroyRef, Input, output, NgModule } from '@angular/core';
|
|
4
|
+
import { inject, signal, input, forwardRef, ChangeDetectionStrategy, Component, ChangeDetectorRef, ElementRef, computed, linkedSignal, effect, untracked, viewChild, DestroyRef, Input, output, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormBuilder, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormControl, FormGroup, FormsModule } from '@angular/forms';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -13,7 +13,7 @@ import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
|
13
13
|
import * as i4 from '@angular/material/table';
|
|
14
14
|
import { MatTableModule } from '@angular/material/table';
|
|
15
15
|
import * as i2 from '@yuuvis/client-core';
|
|
16
|
-
import { SystemService, Situation, TranslateModule, ClipboardService, TranslateService, Operator, OperatorLabel, Utils, LocaleNumberPipe, FileSizePipe, Classification, UserService,
|
|
16
|
+
import { SystemService, Situation, TranslateModule, ClipboardService, TranslateService, Operator, OperatorLabel, Utils, LocaleNumberPipe, FileSizePipe, Classification, UserService, IdmService, YuvUser, SearchUtils, LocaleDatePipe, ClassificationPrefix } from '@yuuvis/client-core';
|
|
17
17
|
import { YUV_ICONS } from '@yuuvis/client-framework/icons';
|
|
18
18
|
import { MetadataFormFieldComponent, ObjectMetadataElementLabelDirective } from '@yuuvis/client-framework/metadata-form';
|
|
19
19
|
import { RendererDirective } from '@yuuvis/client-framework/renderer';
|
|
@@ -33,7 +33,7 @@ import * as i4$1 from '@angular/material/tooltip';
|
|
|
33
33
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
34
34
|
import * as i3$1 from '@yuuvis/client-framework/autocomplete';
|
|
35
35
|
import { YuvAutocompleteModule } from '@yuuvis/client-framework/autocomplete';
|
|
36
|
-
import { map as map$1, catchError
|
|
36
|
+
import { map as map$1, catchError } from 'rxjs/operators';
|
|
37
37
|
import { marker } from '@colsen1991/ngx-translate-extract-marker';
|
|
38
38
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
39
39
|
import * as i1$3 from '@angular/material/chips';
|
|
@@ -168,8 +168,6 @@ class DataGridComponent {
|
|
|
168
168
|
// context to also apply form labels state (e.g. dirty, error) to the data grid label
|
|
169
169
|
this.formFieldContext = input();
|
|
170
170
|
this.size = input(DataGridSizeType.AUTO);
|
|
171
|
-
this.displayedColumns = signal([]);
|
|
172
|
-
this.displayedColumnsWithActions = signal([]);
|
|
173
171
|
this.dataSource = signal([]);
|
|
174
172
|
this.tableLabel = computed(() => {
|
|
175
173
|
const formElement = this.formElement();
|
|
@@ -183,19 +181,20 @@ class DataGridComponent {
|
|
|
183
181
|
add: YUV_ICONS.add,
|
|
184
182
|
more: YUV_ICONS.more
|
|
185
183
|
};
|
|
186
|
-
this
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
184
|
+
this.displayedColumnsWithActions = linkedSignal({
|
|
185
|
+
source: this.readonly,
|
|
186
|
+
computation: (readonly, previous) => {
|
|
187
|
+
if (readonly) {
|
|
188
|
+
const idx = (previous?.value || []).findIndex((c) => c === 'actions');
|
|
189
|
+
if (idx && idx > -1)
|
|
190
|
+
(previous?.value || []).splice(idx, 1);
|
|
191
|
+
}
|
|
192
|
+
return previous ? previous.value : [];
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
this.displayedColumns = linkedSignal({
|
|
196
|
+
source: this.readonly,
|
|
197
|
+
computation: (readonly, previous) => (readonly ? (previous?.value || []).filter((c) => c.columnDef !== 'actions') : previous?.value || [])
|
|
199
198
|
});
|
|
200
199
|
this.#loadData = effect(() => {
|
|
201
200
|
const formElement = this.formElement();
|
|
@@ -206,16 +205,13 @@ class DataGridComponent {
|
|
|
206
205
|
!this.initalTableUpdate && this.writeValue(dataSource.filter((row) => !row.isAddRow));
|
|
207
206
|
this.initalTableUpdate = false;
|
|
208
207
|
});
|
|
209
|
-
|
|
210
|
-
this.propagateChange = (fn) => { };
|
|
211
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
208
|
+
this.propagateChange = () => { };
|
|
212
209
|
this.onTouched = () => { };
|
|
213
210
|
}
|
|
214
211
|
#dialog;
|
|
215
212
|
#clipboardService;
|
|
216
213
|
#systemService;
|
|
217
214
|
#cdRef;
|
|
218
|
-
#readOnlyUpdateEffect;
|
|
219
215
|
#loadData;
|
|
220
216
|
#sourceData;
|
|
221
217
|
#openEditOverlay(elementData, adding = false) {
|
|
@@ -277,15 +273,12 @@ class DataGridComponent {
|
|
|
277
273
|
columnDef: el.name,
|
|
278
274
|
header: this.#systemService.getLocalizedLabel(el.name) || el.name,
|
|
279
275
|
type: el.type,
|
|
280
|
-
cell: (element) => {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
}
|
|
276
|
+
cell: (element) => ({
|
|
277
|
+
propertyName: el.name,
|
|
278
|
+
rendererType: this.#systemService.getInternalFormElementType(el.type, el.classifications),
|
|
279
|
+
value: element[el.name],
|
|
280
|
+
meta: element[el.name]
|
|
281
|
+
})
|
|
289
282
|
});
|
|
290
283
|
return acc;
|
|
291
284
|
}, []);
|
|
@@ -348,7 +341,7 @@ class DataGridComponent {
|
|
|
348
341
|
useExisting: forwardRef(() => DataGridComponent),
|
|
349
342
|
multi: true
|
|
350
343
|
}
|
|
351
|
-
], ngImport: i0, template: "<fieldset [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"isInvalid\">\n <legend class=\"ymt-hide-sr\">\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </legend>\n <header class=\"yuv-data-grid__header\">\n <span\n [yuvObjectMetadataElementLabel]=\"formFieldContext()\"\n class=\"yuv-data-grid__header-title label\"\n [ngClass]=\"{ 'yuv-data-grid__header-title--invalid': isInvalid }\"\n aria-hidden=\"true\"\n >\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </span>\n\n @if (!readonly()) {\n <button ymtIconButton (click)=\"addRow()\" class=\"yuv-data-grid__header-action\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </header>\n\n @let displayedCol = displayedColumns();\n @let displayedColActions = displayedColumnsWithActions();\n @let data = dataSource();\n\n <div class=\"yuv-data-grid__table\" [ngClass]=\"size()\">\n <table mat-table [dataSource]=\"data\" class=\"mat-elevation-z8\">\n <caption class=\"ymt-hide-sr\">\n {{\n tableLabel()\n }}\n </caption>\n\n @for (column of displayedCol; track column) {\n @if (column.columnDef === 'actions') {\n <h1>Actions</h1>\n <ng-container [matColumnDef]=\"column.columnDef\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"></th>\n <td class=\"yuv-data-grid__cell--editable\" mat-cell *matCellDef=\"let element\">\n <div class=\"yuv-data-grid__table-actions\">\n <!-- Only show the button in the last (empty) row -->\n <button ymtIconButton icon-button-size=\"small\" class=\"table-options-menu-bar-item\" [matMenuTriggerFor]=\"menu\" (click)=\"onMenuTrigger(element)\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n } @else {\n <ng-container [matColumnDef]=\"column.columnDef\">\n <th mat-header-cell *matHeaderCellDef [attr.aria-label]=\"column.header\" [title]=\"column.header\">{{ column.header }}</th>\n <td\n [ngClass]=\"{ 'number-cell': column.type === 'integer' || column.type === 'decimal', 'yuv-data-grid__cell--editable': !readonly() }\"\n mat-cell\n *matCellDef=\"let element\"\n >\n <ng-template *yuvRenderer=\"column.cell(element)
|
|
344
|
+
], ngImport: i0, template: "<fieldset [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"isInvalid\">\n <legend class=\"ymt-hide-sr\">\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </legend>\n <header class=\"yuv-data-grid__header\">\n <span\n [yuvObjectMetadataElementLabel]=\"formFieldContext()\"\n class=\"yuv-data-grid__header-title label\"\n [ngClass]=\"{ 'yuv-data-grid__header-title--invalid': isInvalid }\"\n aria-hidden=\"true\"\n >\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </span>\n\n @if (!readonly()) {\n <button ymtIconButton (click)=\"addRow()\" class=\"yuv-data-grid__header-action\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </header>\n\n @let displayedCol = displayedColumns();\n @let displayedColActions = displayedColumnsWithActions();\n @let data = dataSource();\n\n <div class=\"yuv-data-grid__table\" [ngClass]=\"size()\">\n <table mat-table [dataSource]=\"data\" class=\"mat-elevation-z8\">\n <caption class=\"ymt-hide-sr\">\n {{\n tableLabel()\n }}\n </caption>\n\n @for (column of displayedCol; track column) {\n @if (column.columnDef === 'actions') {\n <h1>Actions</h1>\n <ng-container [matColumnDef]=\"column.columnDef\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"></th>\n <td class=\"yuv-data-grid__cell--editable\" mat-cell *matCellDef=\"let element\">\n <div class=\"yuv-data-grid__table-actions\">\n <!-- Only show the button in the last (empty) row -->\n <button ymtIconButton icon-button-size=\"small\" class=\"table-options-menu-bar-item\" [matMenuTriggerFor]=\"menu\" (click)=\"onMenuTrigger(element)\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n } @else {\n <ng-container [matColumnDef]=\"column.columnDef\">\n <th mat-header-cell *matHeaderCellDef [attr.aria-label]=\"column.header\" [title]=\"column.header\">{{ column.header }}</th>\n <td\n [ngClass]=\"{ 'number-cell': column.type === 'integer' || column.type === 'decimal', 'yuv-data-grid__cell--editable': !readonly() }\"\n mat-cell\n *matCellDef=\"let element\"\n >\n <ng-template *yuvRenderer=\"column.cell(element)\"></ng-template>\n </td>\n </ng-container>\n }\n\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell no-data-cell\" [attr.colspan]=\"column.length\"></td>\n </tr>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColActions; sticky: ['header-1']\"></tr>\n\n <tr (dblclick)=\"editRow(row)\" [class.selected-row]=\"row === selectedRow()\" mat-row *matRowDef=\"let row; columns: displayedColActions\"></tr>\n </table>\n @if (data.length === 0) {\n <span class=\"no-data\">{{ 'yuv.form.element.data.grid.noData' | translate }}</span>\n }\n </div>\n</fieldset>\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"copyLine(selectedRow())\">{{ 'yuv.form.element.data.grid.copy' | translate }}</button>\n <button mat-menu-item (click)=\"editRow(selectedRow())\">{{ 'yuv.form.element.data.grid.edit' | translate }}</button>\n <button mat-menu-item (click)=\"removeRow(selectedRow())\">{{ 'yuv.form.element.data.grid.remove' | translate }}</button>\n</mat-menu>\n", styles: [":host{--table-size-small: 200px;--table-size-medium: 400px;--table-size-large: 600px;--table-size-extra-large: 800px;max-width:100%;width:100%;border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-s);overflow:hidden}:host .yuv-data-grid__header{display:flex;justify-content:space-between;align-items:center;padding:var(--ymt-spacing-xs)}:host .yuv-data-grid__header-title{transform:scale(var(--mat-mdc-form-field-floating-label-scale, .75))}:host .yuv-data-grid__header-title--invalid{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);align-self:baseline}:host .yuv-data-grid__cell--editable{-webkit-user-select:none;user-select:none}:host .yuv-data-grid__table{overflow:auto;white-space:nowrap}:host .yuv-data-grid__table.small{height:var(--table-size-small)}:host .yuv-data-grid__table.medium{height:var(--table-size-medium)}:host .yuv-data-grid__table.large{height:var(--table-size-large)}:host .yuv-data-grid__table.extra-large{height:var(--table-size-extra-large)}:host .yuv-data-grid__table .no-data{display:block;width:100%;background-color:var(--ymt-surface);text-align:center;padding:var(--ymt-spacing-s);font:var(--ymt-font-body);color:var(--ymt-text-color-subtle);font-style:italic}:host .yuv-data-grid__table-actions{display:flex;align-items:center;justify-content:flex-end}:host.yuv-data-grid{display:block}:host.yuv-data-grid ::ng-deep tr.cdk-row td.number-cell{text-align:right}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i4.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: ObjectMetadataElementLabelDirective, selector: "[yuvObjectMetadataElementLabel]", inputs: ["yuvObjectMetadataElementLabel"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
352
345
|
}
|
|
353
346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
354
347
|
type: Component,
|
|
@@ -366,7 +359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
366
359
|
], host: {
|
|
367
360
|
class: 'yuv-data-grid',
|
|
368
361
|
'(focusout)': 'onHostFocusOut($event)'
|
|
369
|
-
}, template: "<fieldset [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"isInvalid\">\n <legend class=\"ymt-hide-sr\">\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </legend>\n <header class=\"yuv-data-grid__header\">\n <span\n [yuvObjectMetadataElementLabel]=\"formFieldContext()\"\n class=\"yuv-data-grid__header-title label\"\n [ngClass]=\"{ 'yuv-data-grid__header-title--invalid': isInvalid }\"\n aria-hidden=\"true\"\n >\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </span>\n\n @if (!readonly()) {\n <button ymtIconButton (click)=\"addRow()\" class=\"yuv-data-grid__header-action\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </header>\n\n @let displayedCol = displayedColumns();\n @let displayedColActions = displayedColumnsWithActions();\n @let data = dataSource();\n\n <div class=\"yuv-data-grid__table\" [ngClass]=\"size()\">\n <table mat-table [dataSource]=\"data\" class=\"mat-elevation-z8\">\n <caption class=\"ymt-hide-sr\">\n {{\n tableLabel()\n }}\n </caption>\n\n @for (column of displayedCol; track column) {\n @if (column.columnDef === 'actions') {\n <h1>Actions</h1>\n <ng-container [matColumnDef]=\"column.columnDef\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"></th>\n <td class=\"yuv-data-grid__cell--editable\" mat-cell *matCellDef=\"let element\">\n <div class=\"yuv-data-grid__table-actions\">\n <!-- Only show the button in the last (empty) row -->\n <button ymtIconButton icon-button-size=\"small\" class=\"table-options-menu-bar-item\" [matMenuTriggerFor]=\"menu\" (click)=\"onMenuTrigger(element)\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n } @else {\n <ng-container [matColumnDef]=\"column.columnDef\">\n <th mat-header-cell *matHeaderCellDef [attr.aria-label]=\"column.header\" [title]=\"column.header\">{{ column.header }}</th>\n <td\n [ngClass]=\"{ 'number-cell': column.type === 'integer' || column.type === 'decimal', 'yuv-data-grid__cell--editable': !readonly() }\"\n mat-cell\n *matCellDef=\"let element\"\n >\n <ng-template *yuvRenderer=\"column.cell(element)
|
|
362
|
+
}, template: "<fieldset [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"isInvalid\">\n <legend class=\"ymt-hide-sr\">\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </legend>\n <header class=\"yuv-data-grid__header\">\n <span\n [yuvObjectMetadataElementLabel]=\"formFieldContext()\"\n class=\"yuv-data-grid__header-title label\"\n [ngClass]=\"{ 'yuv-data-grid__header-title--invalid': isInvalid }\"\n aria-hidden=\"true\"\n >\n {{ tableLabel() }}\n @if (isRequired) {\n *\n }\n </span>\n\n @if (!readonly()) {\n <button ymtIconButton (click)=\"addRow()\" class=\"yuv-data-grid__header-action\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </header>\n\n @let displayedCol = displayedColumns();\n @let displayedColActions = displayedColumnsWithActions();\n @let data = dataSource();\n\n <div class=\"yuv-data-grid__table\" [ngClass]=\"size()\">\n <table mat-table [dataSource]=\"data\" class=\"mat-elevation-z8\">\n <caption class=\"ymt-hide-sr\">\n {{\n tableLabel()\n }}\n </caption>\n\n @for (column of displayedCol; track column) {\n @if (column.columnDef === 'actions') {\n <h1>Actions</h1>\n <ng-container [matColumnDef]=\"column.columnDef\" stickyEnd>\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"></th>\n <td class=\"yuv-data-grid__cell--editable\" mat-cell *matCellDef=\"let element\">\n <div class=\"yuv-data-grid__table-actions\">\n <!-- Only show the button in the last (empty) row -->\n <button ymtIconButton icon-button-size=\"small\" class=\"table-options-menu-bar-item\" [matMenuTriggerFor]=\"menu\" (click)=\"onMenuTrigger(element)\">\n <mat-icon>more_vert</mat-icon>\n </button>\n </div>\n </td>\n </ng-container>\n } @else {\n <ng-container [matColumnDef]=\"column.columnDef\">\n <th mat-header-cell *matHeaderCellDef [attr.aria-label]=\"column.header\" [title]=\"column.header\">{{ column.header }}</th>\n <td\n [ngClass]=\"{ 'number-cell': column.type === 'integer' || column.type === 'decimal', 'yuv-data-grid__cell--editable': !readonly() }\"\n mat-cell\n *matCellDef=\"let element\"\n >\n <ng-template *yuvRenderer=\"column.cell(element)\"></ng-template>\n </td>\n </ng-container>\n }\n\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell no-data-cell\" [attr.colspan]=\"column.length\"></td>\n </tr>\n }\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColActions; sticky: ['header-1']\"></tr>\n\n <tr (dblclick)=\"editRow(row)\" [class.selected-row]=\"row === selectedRow()\" mat-row *matRowDef=\"let row; columns: displayedColActions\"></tr>\n </table>\n @if (data.length === 0) {\n <span class=\"no-data\">{{ 'yuv.form.element.data.grid.noData' | translate }}</span>\n }\n </div>\n</fieldset>\n<mat-menu #menu=\"matMenu\">\n <button mat-menu-item (click)=\"copyLine(selectedRow())\">{{ 'yuv.form.element.data.grid.copy' | translate }}</button>\n <button mat-menu-item (click)=\"editRow(selectedRow())\">{{ 'yuv.form.element.data.grid.edit' | translate }}</button>\n <button mat-menu-item (click)=\"removeRow(selectedRow())\">{{ 'yuv.form.element.data.grid.remove' | translate }}</button>\n</mat-menu>\n", styles: [":host{--table-size-small: 200px;--table-size-medium: 400px;--table-size-large: 600px;--table-size-extra-large: 800px;max-width:100%;width:100%;border:1px solid var(--ymt-outline-variant);border-radius:var(--ymt-corner-s);overflow:hidden}:host .yuv-data-grid__header{display:flex;justify-content:space-between;align-items:center;padding:var(--ymt-spacing-xs)}:host .yuv-data-grid__header-title{transform:scale(var(--mat-mdc-form-field-floating-label-scale, .75))}:host .yuv-data-grid__header-title--invalid{background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);align-self:baseline}:host .yuv-data-grid__cell--editable{-webkit-user-select:none;user-select:none}:host .yuv-data-grid__table{overflow:auto;white-space:nowrap}:host .yuv-data-grid__table.small{height:var(--table-size-small)}:host .yuv-data-grid__table.medium{height:var(--table-size-medium)}:host .yuv-data-grid__table.large{height:var(--table-size-large)}:host .yuv-data-grid__table.extra-large{height:var(--table-size-extra-large)}:host .yuv-data-grid__table .no-data{display:block;width:100%;background-color:var(--ymt-surface);text-align:center;padding:var(--ymt-spacing-s);font:var(--ymt-font-body);color:var(--ymt-text-color-subtle);font-style:italic}:host .yuv-data-grid__table-actions{display:flex;align-items:center;justify-content:flex-end}:host.yuv-data-grid{display:block}:host.yuv-data-grid ::ng-deep tr.cdk-row td.number-cell{text-align:right}\n"] }]
|
|
370
363
|
}] });
|
|
371
364
|
|
|
372
365
|
class DatetimeComponent extends AbstractMatFormField {
|
|
@@ -1011,6 +1004,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
1011
1004
|
type: Input
|
|
1012
1005
|
}] } });
|
|
1013
1006
|
|
|
1007
|
+
// function mapOrginationNode<T extends { id: string; title: string }, U extends { user: { id: string } }>(node: T[], innerValue: U[]) {
|
|
1008
|
+
// return node
|
|
1009
|
+
// .filter((e) => !innerValue?.some((value) => value.user.id === e.id))
|
|
1010
|
+
// .map((user) => ({ label: user.title, value: { user, state: {} } }) as AutocompleteItem);
|
|
1011
|
+
// }
|
|
1012
|
+
const mapOrginationNode = (innerValue) => map$1((node) => node
|
|
1013
|
+
.filter((e) => !innerValue?.some((value) => value.user.id === e.id))
|
|
1014
|
+
.map((user) => ({ label: user.title, value: { user, state: {} } })));
|
|
1014
1015
|
/**
|
|
1015
1016
|
* Creates form input for organisation values.
|
|
1016
1017
|
*
|
|
@@ -1022,6 +1023,7 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1022
1023
|
super(...arguments);
|
|
1023
1024
|
this.#system = inject(SystemService);
|
|
1024
1025
|
this.#userService = inject(UserService);
|
|
1026
|
+
this.#idmService = inject(IdmService);
|
|
1025
1027
|
this.#dRef = inject(DestroyRef);
|
|
1026
1028
|
this.translate = inject(TranslateService);
|
|
1027
1029
|
this.minLength = 2;
|
|
@@ -1030,7 +1032,6 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1030
1032
|
this.ngControl = injectNgControl(this);
|
|
1031
1033
|
this._innerValue = [];
|
|
1032
1034
|
this.autocompleteRes = [];
|
|
1033
|
-
this.#filterRoles = [];
|
|
1034
1035
|
/**
|
|
1035
1036
|
* Possibles values are `EDIT` (default),`SEARCH`,`CREATE`. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
|
|
1036
1037
|
*/
|
|
@@ -1039,6 +1040,29 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1039
1040
|
* Indicator that multiple strings could be inserted, they will be rendered as chips (default: false).
|
|
1040
1041
|
*/
|
|
1041
1042
|
this.multiselect = input(false);
|
|
1043
|
+
/**
|
|
1044
|
+
* Additional semantics for the form element.
|
|
1045
|
+
*/
|
|
1046
|
+
this.#organizationType = Classification.STRING_ORGANIZATION;
|
|
1047
|
+
this.classifications = input(undefined);
|
|
1048
|
+
this.#filterRoles = computed(() => {
|
|
1049
|
+
const c = this.classifications();
|
|
1050
|
+
if (c?.length) {
|
|
1051
|
+
const classifications = this.#system.getClassifications(c);
|
|
1052
|
+
if (classifications.has(Classification.STRING_ORGANIZATION)) {
|
|
1053
|
+
this.#organizationType = Classification.STRING_ORGANIZATION;
|
|
1054
|
+
return classifications.get(Classification.STRING_ORGANIZATION).options;
|
|
1055
|
+
}
|
|
1056
|
+
else if (classifications.has(Classification.STRING_ORGANIZATION_SET)) {
|
|
1057
|
+
this.#organizationType = Classification.STRING_ORGANIZATION_SET;
|
|
1058
|
+
return classifications.get(Classification.STRING_ORGANIZATION_SET).options;
|
|
1059
|
+
}
|
|
1060
|
+
return [];
|
|
1061
|
+
}
|
|
1062
|
+
else {
|
|
1063
|
+
return [];
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1042
1066
|
/**
|
|
1043
1067
|
* Will prevent the input from being changed (default: false)
|
|
1044
1068
|
*/
|
|
@@ -1057,6 +1081,7 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1057
1081
|
}
|
|
1058
1082
|
#system;
|
|
1059
1083
|
#userService;
|
|
1084
|
+
#idmService;
|
|
1060
1085
|
#dRef;
|
|
1061
1086
|
set innerValue(iv) {
|
|
1062
1087
|
this._innerValue = iv || [];
|
|
@@ -1064,31 +1089,29 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1064
1089
|
get innerValue() {
|
|
1065
1090
|
return this._innerValue;
|
|
1066
1091
|
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Additional semantics for the form element.
|
|
1094
|
+
*/
|
|
1095
|
+
#organizationType;
|
|
1067
1096
|
#filterRoles;
|
|
1068
|
-
set classifications(c) {
|
|
1069
|
-
this._classifications = c;
|
|
1070
|
-
if (c?.length) {
|
|
1071
|
-
const classifications = this.#system.getClassifications(c);
|
|
1072
|
-
if (classifications.has(Classification.STRING_ORGANIZATION)) {
|
|
1073
|
-
const options = classifications.get(Classification.STRING_ORGANIZATION).options;
|
|
1074
|
-
this.#filterRoles = options;
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
else {
|
|
1078
|
-
this.#filterRoles = [];
|
|
1079
|
-
}
|
|
1080
|
-
}
|
|
1081
|
-
get classifications() {
|
|
1082
|
-
return this._classifications;
|
|
1083
|
-
}
|
|
1084
1097
|
writeValue(value) {
|
|
1085
|
-
if (
|
|
1086
|
-
|
|
1087
|
-
|
|
1098
|
+
if (this.#organizationType === Classification.STRING_ORGANIZATION) {
|
|
1099
|
+
if (value) {
|
|
1100
|
+
this.value = value;
|
|
1101
|
+
this.resolveFn(value);
|
|
1102
|
+
}
|
|
1103
|
+
else {
|
|
1104
|
+
this.value = null;
|
|
1105
|
+
this.innerValue = [];
|
|
1106
|
+
}
|
|
1088
1107
|
}
|
|
1089
1108
|
else {
|
|
1090
|
-
|
|
1091
|
-
this.innerValue =
|
|
1109
|
+
const val = Array.isArray(value) ? value.map((v) => (typeof v === 'string' ? JSON.parse(v) : v)) : value ? [JSON.parse(value)] : [];
|
|
1110
|
+
this.innerValue = val;
|
|
1111
|
+
this.value = val.map((v) => JSON.stringify(v));
|
|
1112
|
+
if (!this.multiselect) {
|
|
1113
|
+
this.value = this.value[0] || null;
|
|
1114
|
+
}
|
|
1092
1115
|
}
|
|
1093
1116
|
}
|
|
1094
1117
|
registerOnChange(fn) {
|
|
@@ -1109,14 +1132,8 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1109
1132
|
}
|
|
1110
1133
|
}
|
|
1111
1134
|
#getPropagateValue() {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
}
|
|
1115
|
-
else if (this.innerValue.length) {
|
|
1116
|
-
return this.withMetadata() ? { id: this.innerValue[0].user.id, title: this.innerValue[0].user.title } : this.innerValue[0].user.id;
|
|
1117
|
-
}
|
|
1118
|
-
else
|
|
1119
|
-
return undefined;
|
|
1135
|
+
const value = this.innerValue.map((v) => (this.withMetadata() ? { id: v.user.id, title: v.user.title } : v.user.id));
|
|
1136
|
+
return this.multiselect() ? value : value[0];
|
|
1120
1137
|
}
|
|
1121
1138
|
resolveFn(value) {
|
|
1122
1139
|
const obs = (value instanceof Array ? value : [value]).map((v) => {
|
|
@@ -1128,9 +1145,7 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1128
1145
|
user: res,
|
|
1129
1146
|
state: {}
|
|
1130
1147
|
})), catchError((e) => {
|
|
1131
|
-
const user = new YuvUser({
|
|
1132
|
-
id: typeof v === 'string' ? v : v.id
|
|
1133
|
-
});
|
|
1148
|
+
const user = new YuvUser({ id: typeof v === 'string' ? v : v.id });
|
|
1134
1149
|
user.title = typeof v === 'string' ? v : v.title;
|
|
1135
1150
|
return of({
|
|
1136
1151
|
user,
|
|
@@ -1151,29 +1166,23 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1151
1166
|
this.acFormControl.updateValueAndValidity({ emitEvent: false });
|
|
1152
1167
|
});
|
|
1153
1168
|
}
|
|
1169
|
+
#resolveOrgination(query, excludeMe, filterRoles) {
|
|
1170
|
+
return this.#userService.queryUser(query, excludeMe, filterRoles).pipe(mapOrginationNode(this.innerValue), catchError(() => of([])));
|
|
1171
|
+
}
|
|
1172
|
+
#resolveOrginationSet(query, filterRoles) {
|
|
1173
|
+
return this.#idmService.queryOrganizationEntity(query, filterRoles).pipe(mapOrginationNode(this.innerValue), catchError(() => of([])));
|
|
1174
|
+
}
|
|
1154
1175
|
autocompleteFn(query) {
|
|
1155
1176
|
if (query.length >= this.minLength) {
|
|
1156
1177
|
this.busy.set(true);
|
|
1157
|
-
this.#
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
next: (users) => {
|
|
1164
|
-
this.autocompleteRes = users
|
|
1165
|
-
.filter((user) => !this.innerValue.some((value) => value.user.id === user.id))
|
|
1166
|
-
.map((user) => ({
|
|
1167
|
-
label: user.title,
|
|
1168
|
-
value: {
|
|
1169
|
-
user,
|
|
1170
|
-
state: {}
|
|
1171
|
-
}
|
|
1172
|
-
}));
|
|
1178
|
+
(this.#organizationType === Classification.STRING_ORGANIZATION
|
|
1179
|
+
? this.#resolveOrgination(query, this.excludeMe(), this.#filterRoles())
|
|
1180
|
+
: this.#resolveOrginationSet(query, this.#filterRoles())).subscribe({
|
|
1181
|
+
next: (res) => {
|
|
1182
|
+
this.busy.set(false);
|
|
1183
|
+
this.autocompleteRes = res;
|
|
1173
1184
|
},
|
|
1174
|
-
error: () =>
|
|
1175
|
-
this.autocompleteRes = [];
|
|
1176
|
-
}
|
|
1185
|
+
error: () => this.busy.set(false)
|
|
1177
1186
|
});
|
|
1178
1187
|
}
|
|
1179
1188
|
else {
|
|
@@ -1201,14 +1210,12 @@ class OrganizationComponent extends AbstractMatFormField {
|
|
|
1201
1210
|
super.onNgOnDestroy();
|
|
1202
1211
|
}
|
|
1203
1212
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OrganizationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1204
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
1213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: OrganizationComponent, isStandalone: true, selector: "yuv-organization", inputs: { situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, classifications: { classPropertyName: "classifications", publicName: "classifications", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, excludeMe: { classPropertyName: "excludeMe", publicName: "excludeMe", isSignal: true, isRequired: false, transformFunction: null }, withMetadata: { classPropertyName: "withMetadata", publicName: "withMetadata", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: OrganizationComponent }], usesInheritance: true, ngImport: i0, template: "<yuv-autocomplete\n [required]=\"required\"\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n [distinctValues]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ? -1 : 1\"\n>\n <!-- template for item inside the dropdown -->\n <ng-template #optionTemplate let-item>\n @if (item.value.user) {\n <span class=\"chip\">{{ item.value.user.title }}</span>\n }\n </ng-template>\n\n <!-- template for chip -->\n <ng-template #chipTemplate let-item>\n @if (item.value.user) {\n <span class=\"chip\" [ngClass]=\"{ notFound: item.value.state.notFound }\" [matTooltip]=\"item.value.titleString\">\n {{ item.value.user.title || '...' }}\n </span>\n }\n </ng-template>\n</yuv-autocomplete>\n\n<mat-icon class=\"ymt-icon--size-s\" [matTooltip]=\"'yuv.form.element.organization.classify.icon.title' | translate\">\n {{ multiselect() ? 'group' : 'person' }}\n</mat-icon>\n", styles: [":host{display:flex;align-items:center}:host .chip.notFound{color:var(--ymt-on-danger-container);text-decoration:line-through}:host .chip.notFound:before{content:\"!\";display:inline-block;background-color:var(--ymt-danger-container);color:#fff;border-radius:2px;padding-inline:.3em;text-decoration:none;margin-inline-end:.75em}:host yuv-autocomplete{flex:1}:host mat-icon{color:var(--ymt-text-color-subtle)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { 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: "ngmodule", type: YuvAutocompleteModule }, { kind: "component", type: i3$1.AutocompleteComponent, selector: "yuv-autocomplete", inputs: ["ariaLabel", "busy", "multiple", "distinctValues", "addOnBlur", "minLength", "maxItems", "forceSelection", "autocompleteValues"], outputs: ["autocompleteFnc", "acBlur"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1205
1214
|
}
|
|
1206
1215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OrganizationComponent, decorators: [{
|
|
1207
1216
|
type: Component,
|
|
1208
|
-
args: [{ selector: 'yuv-organization', standalone: true, imports: [CommonModule, FormsModule, YuvAutocompleteModule, MatTooltipModule, MatIconModule, ReactiveFormsModule, TranslateModule], providers: [{ provide: MatFormFieldControl, useExisting: OrganizationComponent }], template: "<yuv-autocomplete\n[required]=\"required\"\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ?
|
|
1209
|
-
}]
|
|
1210
|
-
type: Input
|
|
1211
|
-
}] } });
|
|
1217
|
+
args: [{ selector: 'yuv-organization', standalone: true, imports: [CommonModule, FormsModule, YuvAutocompleteModule, MatTooltipModule, MatIconModule, ReactiveFormsModule, TranslateModule], providers: [{ provide: MatFormFieldControl, useExisting: OrganizationComponent }], template: "<yuv-autocomplete\n [required]=\"required\"\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n [distinctValues]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ? -1 : 1\"\n>\n <!-- template for item inside the dropdown -->\n <ng-template #optionTemplate let-item>\n @if (item.value.user) {\n <span class=\"chip\">{{ item.value.user.title }}</span>\n }\n </ng-template>\n\n <!-- template for chip -->\n <ng-template #chipTemplate let-item>\n @if (item.value.user) {\n <span class=\"chip\" [ngClass]=\"{ notFound: item.value.state.notFound }\" [matTooltip]=\"item.value.titleString\">\n {{ item.value.user.title || '...' }}\n </span>\n }\n </ng-template>\n</yuv-autocomplete>\n\n<mat-icon class=\"ymt-icon--size-s\" [matTooltip]=\"'yuv.form.element.organization.classify.icon.title' | translate\">\n {{ multiselect() ? 'group' : 'person' }}\n</mat-icon>\n", styles: [":host{display:flex;align-items:center}:host .chip.notFound{color:var(--ymt-on-danger-container);text-decoration:line-through}:host .chip.notFound:before{content:\"!\";display:inline-block;background-color:var(--ymt-danger-container);color:#fff;border-radius:2px;padding-inline:.3em;text-decoration:none;margin-inline-end:.75em}:host yuv-autocomplete{flex:1}:host mat-icon{color:var(--ymt-text-color-subtle)}\n"] }]
|
|
1218
|
+
}] });
|
|
1212
1219
|
|
|
1213
1220
|
/**
|
|
1214
1221
|
* Creates form input for organization set values. An organization set is
|
|
@@ -1229,15 +1236,6 @@ class OrganizationSetComponent extends AbstractMatFormField {
|
|
|
1229
1236
|
this.#system = inject(SystemService);
|
|
1230
1237
|
this.#idmService = inject(IdmService);
|
|
1231
1238
|
this.#dRef = inject(DestroyRef);
|
|
1232
|
-
this.types = input(undefined);
|
|
1233
|
-
this.#typesEffect = effect(() => {
|
|
1234
|
-
const types = this.types();
|
|
1235
|
-
untracked(() => {
|
|
1236
|
-
if (types)
|
|
1237
|
-
this.#targetTypes.set(types);
|
|
1238
|
-
});
|
|
1239
|
-
});
|
|
1240
|
-
this.#targetTypes = signal([]);
|
|
1241
1239
|
/**
|
|
1242
1240
|
* Possibles values are `EDIT` (default),`SEARCH`,`CREATE`. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
|
|
1243
1241
|
*/
|
|
@@ -1259,6 +1257,20 @@ class OrganizationSetComponent extends AbstractMatFormField {
|
|
|
1259
1257
|
* Minimum length of the autocomplete input before a query is sent to the server.
|
|
1260
1258
|
*/
|
|
1261
1259
|
this.autocompleteMinLength = input(2);
|
|
1260
|
+
this.classifications = input(undefined);
|
|
1261
|
+
this.types = input(undefined);
|
|
1262
|
+
this.#targetTypes = linkedSignal(() => {
|
|
1263
|
+
const c = this.classifications();
|
|
1264
|
+
const types = this.types();
|
|
1265
|
+
if (c?.length) {
|
|
1266
|
+
const classifications = this.#system.getClassifications(c);
|
|
1267
|
+
return classifications.has(Classification.STRING_ORGANIZATION_SET) ? classifications.get(Classification.STRING_ORGANIZATION_SET).options : [];
|
|
1268
|
+
}
|
|
1269
|
+
else if (types) {
|
|
1270
|
+
return types;
|
|
1271
|
+
}
|
|
1272
|
+
return [];
|
|
1273
|
+
});
|
|
1262
1274
|
this.busy = signal(false);
|
|
1263
1275
|
this.acFormControl = new FormControl(undefined);
|
|
1264
1276
|
this.ngControl = injectNgControl(this);
|
|
@@ -1270,18 +1282,7 @@ class OrganizationSetComponent extends AbstractMatFormField {
|
|
|
1270
1282
|
#system;
|
|
1271
1283
|
#idmService;
|
|
1272
1284
|
#dRef;
|
|
1273
|
-
#typesEffect;
|
|
1274
1285
|
#targetTypes;
|
|
1275
|
-
set classifications(c) {
|
|
1276
|
-
this._classifications = c;
|
|
1277
|
-
if (c?.length) {
|
|
1278
|
-
const classifications = this.#system.getClassifications(c);
|
|
1279
|
-
this.#targetTypes.set(classifications.has(Classification.STRING_ORGANIZATION_SET) ? classifications.get(Classification.STRING_ORGANIZATION_SET).options : []);
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
get classifications() {
|
|
1283
|
-
return this._classifications;
|
|
1284
|
-
}
|
|
1285
1286
|
writeValue(value) {
|
|
1286
1287
|
const val = Array.isArray(value) ? value.map((v) => (typeof v === 'string' ? JSON.parse(v) : v)) : value ? [JSON.parse(value)] : [];
|
|
1287
1288
|
this.innerValue = val;
|
|
@@ -1319,6 +1320,8 @@ class OrganizationSetComponent extends AbstractMatFormField {
|
|
|
1319
1320
|
}
|
|
1320
1321
|
autocompleteFn(query) {
|
|
1321
1322
|
if (query.length >= this.autocompleteMinLength()) {
|
|
1323
|
+
console.log(this.#targetTypes());
|
|
1324
|
+
console.log(query);
|
|
1322
1325
|
this.#idmService.queryOrganizationEntity(query, this.#targetTypes()).subscribe({
|
|
1323
1326
|
next: (entries) => {
|
|
1324
1327
|
this.autocompleteRes = entries
|
|
@@ -1358,14 +1361,12 @@ class OrganizationSetComponent extends AbstractMatFormField {
|
|
|
1358
1361
|
super.onNgOnDestroy();
|
|
1359
1362
|
}
|
|
1360
1363
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OrganizationSetComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1361
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: OrganizationSetComponent, isStandalone: true, selector: "yuv-organization-set", inputs: {
|
|
1364
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: OrganizationSetComponent, isStandalone: true, selector: "yuv-organization-set", inputs: { situation: { classPropertyName: "situation", publicName: "situation", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, withMetadata: { classPropertyName: "withMetadata", publicName: "withMetadata", isSignal: true, isRequired: false, transformFunction: null }, autocompleteMinLength: { classPropertyName: "autocompleteMinLength", publicName: "autocompleteMinLength", isSignal: true, isRequired: false, transformFunction: null }, classifications: { classPropertyName: "classifications", publicName: "classifications", isSignal: true, isRequired: false, transformFunction: null }, types: { classPropertyName: "types", publicName: "types", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: OrganizationSetComponent }], usesInheritance: true, ngImport: i0, template: "<yuv-autocomplete\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ? -1 : 1\"\n>\n <!-- template for item inside the dropdown -->\n <ng-template #optionTemplate let-item>\n <span class=\"chip\">{{ item.value.title }}</span>\n </ng-template>\n\n <!-- template for chip -->\n <ng-template #chipTemplate let-item>\n <span class=\"chip\">\n {{ item.value.title || '...' }}\n </span>\n </ng-template>\n</yuv-autocomplete>\n\n<mat-icon class=\"ymt-icon--size-s\" [matTooltip]=\"'yuv.form.element.organization-set.classify.icon.title' | translate\">\n {{ multiselect() ? 'group' : 'person' }}\n</mat-icon>\n", styles: [":host{display:flex;align-items:center}:host yuv-autocomplete{flex:1}:host mat-icon{color:var(--ymt-text-color-subtle)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: YuvAutocompleteModule }, { kind: "component", type: i3$1.AutocompleteComponent, selector: "yuv-autocomplete", inputs: ["ariaLabel", "busy", "multiple", "distinctValues", "addOnBlur", "minLength", "maxItems", "forceSelection", "autocompleteValues"], outputs: ["autocompleteFnc", "acBlur"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1362
1365
|
}
|
|
1363
1366
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: OrganizationSetComponent, decorators: [{
|
|
1364
1367
|
type: Component,
|
|
1365
|
-
args: [{ selector: 'yuv-organization-set', imports: [CommonModule, FormsModule, YuvAutocompleteModule, MatTooltipModule, MatIconModule, ReactiveFormsModule, TranslateModule$1], providers: [{ provide: MatFormFieldControl, useExisting: OrganizationSetComponent }], template: "<yuv-autocomplete\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ? -1 : 1\"\n>\n <!-- template for item inside the dropdown -->\n <ng-template #optionTemplate let-item>\n <span class=\"chip\">{{ item.value.title }}</span>\n </ng-template>\n\n <!-- template for chip -->\n <ng-template #chipTemplate let-item>\n <span class=\"chip\">\n {{ item.value.title || '...' }}\n </span>\n </ng-template>\n</yuv-autocomplete>\n\n<mat-icon [matTooltip]=\"'yuv.form.element.organization-set.classify.icon.title' | translate\"
|
|
1366
|
-
}]
|
|
1367
|
-
type: Input
|
|
1368
|
-
}] } });
|
|
1368
|
+
args: [{ selector: 'yuv-organization-set', imports: [CommonModule, FormsModule, YuvAutocompleteModule, MatTooltipModule, MatIconModule, ReactiveFormsModule, TranslateModule$1], providers: [{ provide: MatFormFieldControl, useExisting: OrganizationSetComponent }], template: "<yuv-autocomplete\n [busy]=\"busy()\"\n [formControl]=\"acFormControl\"\n #autocomplete\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly()\"\n [autocompleteValues]=\"autocompleteRes\"\n [forceSelection]=\"true\"\n (autocompleteFnc)=\"autocompleteFn($event)\"\n [multiple]=\"true\"\n [maxItems]=\"multiselect() ? -1 : 1\"\n>\n <!-- template for item inside the dropdown -->\n <ng-template #optionTemplate let-item>\n <span class=\"chip\">{{ item.value.title }}</span>\n </ng-template>\n\n <!-- template for chip -->\n <ng-template #chipTemplate let-item>\n <span class=\"chip\">\n {{ item.value.title || '...' }}\n </span>\n </ng-template>\n</yuv-autocomplete>\n\n<mat-icon class=\"ymt-icon--size-s\" [matTooltip]=\"'yuv.form.element.organization-set.classify.icon.title' | translate\">\n {{ multiselect() ? 'group' : 'person' }}\n</mat-icon>\n", styles: [":host{display:flex;align-items:center}:host yuv-autocomplete{flex:1}:host mat-icon{color:var(--ymt-text-color-subtle)}\n"] }]
|
|
1369
|
+
}] });
|
|
1369
1370
|
|
|
1370
1371
|
class DateRangePickerComponent {
|
|
1371
1372
|
constructor() {
|
|
@@ -1913,11 +1914,11 @@ class StringComponent extends AbstractMatFormField {
|
|
|
1913
1914
|
super.onNgOnDestroy();
|
|
1914
1915
|
}
|
|
1915
1916
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StringComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1916
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: StringComponent, isStandalone: true, selector: "yuv-string", inputs: { multiselect: "multiselect", rows: "rows", readonly: "readonly", autofocus: "autofocus", classifications: "classifications", situation: "situation", regex: "regex", minLength: "minLength", maxLength: "maxLength" }, providers: [{ provide: MatFormFieldControl, useExisting: StringComponent }], usesInheritance: true, ngImport: i0, template: "@if ((!rows || rows <= 1) && !multiselect) {\n <input matInput type=\"text\" (blur)=\"onBlur()\" [disabled]=\"disabled\" [readonly]=\"readonly\" [formControl]=\"fc\" />\n} @else if ((!rows || rows <= 1) && multiselect) {\n <!-- single line input with multiselect-->\n <mat-chip-grid #chipGrid [formControl]=\"fc\" [disabled]=\"disabled\">\n @for (v of value; track v) {\n <mat-chip-row (removed)=\"chipsRemove(v)\" [editable]=\"true\" (edited)=\"chipsEdit(v, $event)\">\n {{ v }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n [disabled]=\"disabled\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"chipsAdd($event)\"\n />\n </mat-chip-grid>\n} @else if (rows && rows > 1) {\n <!-- multi line text inputs -->\n <textarea\n matInput\n class=\"input-textarea\"\n (blur)=\"onBlur()\"\n [rows]=\"rows\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [formControl]=\"fc\"\n ></textarea>\n}\n\n@if (classify) {\n <div class=\"classify\">\n @if (value && !validationErrors.length && (classify.hrefPrefix !== '' || !multiselect || value.length <= 1)) {\n <a href=\"{{ classify.hrefPrefix + formatedValue }}\">\n <mat-icon>{{ classify.icon }}</mat-icon>\n </a>\n } @else {\n <mat-icon>{{ classify.icon }}</mat-icon>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-flow:row nowrap;flex:1;align-items:center}:host:has(mat-chip-grid){overflow-x:auto;scrollbar-width:none}:host mat-chip-grid{flex:1}:host textarea.input-textarea{width:100%;resize:none;background-color:transparent;border:0;outline:0
|
|
1917
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: StringComponent, isStandalone: true, selector: "yuv-string", inputs: { multiselect: "multiselect", rows: "rows", readonly: "readonly", autofocus: "autofocus", classifications: "classifications", situation: "situation", regex: "regex", minLength: "minLength", maxLength: "maxLength" }, providers: [{ provide: MatFormFieldControl, useExisting: StringComponent }], usesInheritance: true, ngImport: i0, template: "@if ((!rows || rows <= 1) && !multiselect) {\n <input matInput type=\"text\" (blur)=\"onBlur()\" [disabled]=\"disabled\" [readonly]=\"readonly\" [formControl]=\"fc\" />\n} @else if ((!rows || rows <= 1) && multiselect) {\n <!-- single line input with multiselect-->\n <mat-chip-grid #chipGrid [formControl]=\"fc\" [disabled]=\"disabled\">\n @for (v of value; track v) {\n <mat-chip-row (removed)=\"chipsRemove(v)\" [editable]=\"true\" (edited)=\"chipsEdit(v, $event)\">\n {{ v }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n [disabled]=\"disabled\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"chipsAdd($event)\"\n />\n </mat-chip-grid>\n} @else if (rows && rows > 1) {\n <!-- multi line text inputs -->\n <textarea\n matInput\n class=\"input-textarea\"\n (blur)=\"onBlur()\"\n [rows]=\"rows\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [formControl]=\"fc\"\n ></textarea>\n}\n\n@if (classify) {\n <div class=\"classify\">\n @if (value && !validationErrors.length && (classify.hrefPrefix !== '' || !multiselect || value.length <= 1)) {\n <a href=\"{{ classify.hrefPrefix + formatedValue }}\">\n <mat-icon>{{ classify.icon }}</mat-icon>\n </a>\n } @else {\n <mat-icon>{{ classify.icon }}</mat-icon>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-flow:row nowrap;flex:1;align-items:center}:host:has(mat-chip-grid){overflow-x:auto;scrollbar-width:none}:host mat-chip-grid{flex:1}:host textarea.input-textarea{width:100%;resize:none;background-color:transparent;border:0;outline:0}:host input{display:flex;flex-wrap:wrap;align-items:center;width:100%;border:0;outline:0;background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i1$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i1$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i1$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
1917
1918
|
}
|
|
1918
1919
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StringComponent, decorators: [{
|
|
1919
1920
|
type: Component,
|
|
1920
|
-
args: [{ selector: 'yuv-string', standalone: true, imports: [CommonModule, MatChipsModule, MatIconModule, ReactiveFormsModule, FormsModule], providers: [{ provide: MatFormFieldControl, useExisting: StringComponent }], template: "@if ((!rows || rows <= 1) && !multiselect) {\n <input matInput type=\"text\" (blur)=\"onBlur()\" [disabled]=\"disabled\" [readonly]=\"readonly\" [formControl]=\"fc\" />\n} @else if ((!rows || rows <= 1) && multiselect) {\n <!-- single line input with multiselect-->\n <mat-chip-grid #chipGrid [formControl]=\"fc\" [disabled]=\"disabled\">\n @for (v of value; track v) {\n <mat-chip-row (removed)=\"chipsRemove(v)\" [editable]=\"true\" (edited)=\"chipsEdit(v, $event)\">\n {{ v }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n [disabled]=\"disabled\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"chipsAdd($event)\"\n />\n </mat-chip-grid>\n} @else if (rows && rows > 1) {\n <!-- multi line text inputs -->\n <textarea\n matInput\n class=\"input-textarea\"\n (blur)=\"onBlur()\"\n [rows]=\"rows\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [formControl]=\"fc\"\n ></textarea>\n}\n\n@if (classify) {\n <div class=\"classify\">\n @if (value && !validationErrors.length && (classify.hrefPrefix !== '' || !multiselect || value.length <= 1)) {\n <a href=\"{{ classify.hrefPrefix + formatedValue }}\">\n <mat-icon>{{ classify.icon }}</mat-icon>\n </a>\n } @else {\n <mat-icon>{{ classify.icon }}</mat-icon>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-flow:row nowrap;flex:1;align-items:center}:host:has(mat-chip-grid){overflow-x:auto;scrollbar-width:none}:host mat-chip-grid{flex:1}:host textarea.input-textarea{width:100%;resize:none;background-color:transparent;border:0;outline:0
|
|
1921
|
+
args: [{ selector: 'yuv-string', standalone: true, imports: [CommonModule, MatChipsModule, MatIconModule, ReactiveFormsModule, FormsModule], providers: [{ provide: MatFormFieldControl, useExisting: StringComponent }], template: "@if ((!rows || rows <= 1) && !multiselect) {\n <input matInput type=\"text\" (blur)=\"onBlur()\" [disabled]=\"disabled\" [readonly]=\"readonly\" [formControl]=\"fc\" />\n} @else if ((!rows || rows <= 1) && multiselect) {\n <!-- single line input with multiselect-->\n <mat-chip-grid #chipGrid [formControl]=\"fc\" [disabled]=\"disabled\">\n @for (v of value; track v) {\n <mat-chip-row (removed)=\"chipsRemove(v)\" [editable]=\"true\" (edited)=\"chipsEdit(v, $event)\">\n {{ v }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n <input\n [disabled]=\"disabled\"\n [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"chipsAdd($event)\"\n />\n </mat-chip-grid>\n} @else if (rows && rows > 1) {\n <!-- multi line text inputs -->\n <textarea\n matInput\n class=\"input-textarea\"\n (blur)=\"onBlur()\"\n [rows]=\"rows\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [formControl]=\"fc\"\n ></textarea>\n}\n\n@if (classify) {\n <div class=\"classify\">\n @if (value && !validationErrors.length && (classify.hrefPrefix !== '' || !multiselect || value.length <= 1)) {\n <a href=\"{{ classify.hrefPrefix + formatedValue }}\">\n <mat-icon>{{ classify.icon }}</mat-icon>\n </a>\n } @else {\n <mat-icon>{{ classify.icon }}</mat-icon>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-flow:row nowrap;flex:1;align-items:center}:host:has(mat-chip-grid){overflow-x:auto;scrollbar-width:none}:host mat-chip-grid{flex:1}:host textarea.input-textarea{width:100%;resize:none;background-color:transparent;border:0;outline:0}:host input{display:flex;flex-wrap:wrap;align-items:center;width:100%;border:0;outline:0;background:transparent}\n"] }]
|
|
1921
1922
|
}], propDecorators: { multiselect: [{
|
|
1922
1923
|
type: Input
|
|
1923
1924
|
}], rows: [{
|