@yuuvis/client-framework 3.16.0 → 3.17.0
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-actions.mjs +2 -6
- package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-badges.mjs +9 -2
- package/fesm2022/yuuvis-client-framework-badges.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +237 -129
- package/fesm2022/yuuvis-client-framework-forms.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 +47 -19
- package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-renderer.mjs +48 -21
- package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-tile-list.mjs +59 -65
- package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
- package/lib/assets/i18n/de.json +7 -6
- package/lib/assets/i18n/en.json +8 -7
- package/package.json +5 -5
- package/types/yuuvis-client-framework-badges.d.ts +7 -0
- package/types/yuuvis-client-framework-forms.d.ts +28 -8
- package/types/yuuvis-client-framework-object-relationship.d.ts +6 -1
- package/types/yuuvis-client-framework-tile-list.d.ts +13 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-client-framework-sequence-list.mjs","sources":["../../../../../libs/yuuvis/client-framework/sequence-list/src/lib/sequence-list.component.ts","../../../../../libs/yuuvis/client-framework/sequence-list/src/lib/sequence-list.component.html","../../../../../libs/yuuvis/client-framework/sequence-list/src/yuuvis-client-framework-sequence-list.ts"],"sourcesContent":["import {\n afterNextRender,\n Component,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n signal,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n FormArray,\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n NonNullableFormBuilder,\n ReactiveFormsModule,\n ValidationErrors,\n Validator,\n Validators\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TranslatePipe } from '@yuuvis/client-core';\nimport { OrganizationComponent } from '@yuuvis/client-framework/forms';\nimport { YmtIconButtonDirective } from '@yuuvis/material';\nimport { SequenceItem, SequenceListAssignee } from './sequence-list.interface';\n\ntype SequenceFormItem = FormGroup<{\n title: FormControl<string>;\n nextAssignee: FormControl<SequenceListAssignee[]>;\n expiryDatetime: FormControl<any>;\n}>;\ntype SequenceForm = FormGroup<{\n items: FormArray<SequenceFormItem>;\n}>;\n\n/**\n * Task sequence list.\n */\n@Component({\n selector: 'yuv-sequence-list',\n standalone: true,\n imports: [\n TranslatePipe,\n OrganizationComponent,\n MatButtonModule,\n MatIconModule,\n ReactiveFormsModule,\n MatTooltipModule,\n MatInputModule,\n MatFormFieldModule,\n YmtIconButtonDirective\n ],\n templateUrl: './sequence-list.component.html',\n styleUrls: ['./sequence-list.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SequenceListComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SequenceListComponent),\n multi: true\n }\n ],\n host: {\n tabindex: '0'\n }\n})\nexport class SequenceListComponent implements ControlValueAccessor, Validator {\n #formBuilder = inject(NonNullableFormBuilder);\n #eleRef = inject(ElementRef);\n #injector = inject(Injector);\n\n readonly orgComponent = viewChild.required(OrganizationComponent);\n\n /**\n * Maximum number of sequence items (defaults to 100).\n */\n maxLength = input<number>(100);\n /**\n * Minimum number of sequence items that must remain (defaults to 1, matching\n * the original behaviour where a list can never be emptied). Consumers that\n * represent a tail of optional follow-up items (e.g. the remaining steps of\n * an already-started routing list) can set this to 0 to allow removing the\n * last remaining item.\n */\n minLength = input<number>(1);\n maxLengthExceeded = signal<boolean>(false);\n readonly controlCount = signal<number>(0);\n\n // dynamic form for sequence items\n sequenceForm: SequenceForm = this.#formBuilder.group({\n items: this.#formBuilder.array<SequenceFormItem>([this.#generateSequenceItem()])\n });\n\n entries: SequenceItem[] = [];\n\n get formItemArray(): FormArray<SequenceFormItem> {\n return this.sequenceForm.controls.items as FormArray<SequenceFormItem>;\n }\n\n constructor() {\n this.#updateState();\n this.sequenceForm.valueChanges.pipe(takeUntilDestroyed()).subscribe(() => {\n this.#propagate();\n });\n }\n\n addItem(): void {\n this.sequenceForm.controls.items.push(this.#generateSequenceItem());\n this.#updateState();\n this.#scrollToItem(this.formItemArray.length - 1);\n }\n\n addItemAt(idx: number): void {\n this.sequenceForm.controls.items.insert(idx, this.#generateSequenceItem());\n this.#updateState();\n this.#scrollToItem(idx);\n }\n\n removeItem(idx: number): void {\n this.sequenceForm.controls.items.removeAt(idx);\n this.#updateState();\n }\n\n writeValue(value: SequenceItem[]): void {\n this.entries = value || [];\n this.formItemArray.clear();\n if (this.entries.length === 0 && this.minLength() > 0) this.addItem();\n this.entries.forEach((entry) => {\n this.formItemArray.push(this.#generateSequenceItem(entry));\n });\n this.#updateState();\n }\n\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n validate(): ValidationErrors | null {\n const maxLength = this.maxLength();\n const mlExceeded = maxLength !== undefined && this.formItemArray.length > maxLength;\n const valid = this.sequenceForm.valid && !mlExceeded;\n\n return !valid\n ? {\n sequencelist: {\n invalid: this.sequenceForm.invalid,\n maxLengthExceeded: mlExceeded\n }\n }\n : null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n propagateChange = (_: any): void => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n registerOnTouched(): void {}\n\n #updateState(): void {\n const maxLength = this.maxLength();\n this.maxLengthExceeded.set(maxLength !== undefined && this.formItemArray.length >= maxLength);\n this.controlCount.set(this.sequenceForm.controls.items.length);\n }\n\n #generateSequenceItem(sequenceItem?: SequenceItem): SequenceFormItem {\n return this.#formBuilder.group({\n title: [sequenceItem?.title || '', Validators.required],\n nextAssignee: [sequenceItem?.nextAssignee || [], Validators.required],\n expiryDatetime: [sequenceItem?.expiryDatetime || undefined]\n });\n }\n\n #propagate(): void {\n const res: SequenceItem[] = [];\n (this.sequenceForm.value.items || []).forEach((item: any) => {\n const i: SequenceItem = {\n title: item.title,\n nextAssignee: item.nextAssignee\n };\n if (item.expiryDatetime) {\n i.expiryDatetime = item.expiryDatetime;\n }\n res.push(i);\n });\n\n this.propagateChange(res);\n }\n\n #scrollToItem(idx: number): void {\n afterNextRender(\n () => {\n const items = this.#eleRef.nativeElement.querySelectorAll('.item');\n items[idx]?.scrollIntoView?.({ behavior: 'smooth', block: 'nearest' });\n },\n { injector: this.#injector }\n );\n }\n}\n","<form [formGroup]=\"sequenceForm\">\n <section formArrayName=\"items\">\n @for (item of sequenceForm.controls.items.controls; track item; let itemIndex = $index) {\n <div class=\"item\" [formGroup]=\"item\">\n <button mat-icon-button class=\"add before\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItemAt($index)\">\n <mat-icon>add</mat-icon>\n </button>\n <span class=\"index\" [attr.data-index]=\"itemIndex + 1\"></span>\n\n <div class=\"item-form\">\n <button ymtIconButton icon-button-size=\"small\" class=\"remove hidden\" [class.hidden]=\"controlCount() <= minLength()\" type=\"button\" (click)=\"removeItem($index)\" [disabled]=\"controlCount() <= minLength()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-form-field>\n <mat-label>{{ 'yuv.sequence-list.form.task' | translate }}</mat-label>\n <input matInput [maxLength]=\"128\" formControlName=\"title\" />\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ 'yuv.sequence-list.form.nextAssignee' | translate }}</mat-label>\n <yuv-organization [classifications]=\"['id:organization:set[user,role]']\"\n [matTooltip]=\"'yuv.sequence-list.form.nextAssignee' | translate\"\n [multiselect]=\"true\"\n [withMetadata]=\"true\"\n [required]=\"true\"\n formControlName=\"nextAssignee\">\n </yuv-organization>\n </mat-form-field>\n </div>\n @if ($last) {\n <button mat-icon-button class=\"add after\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItem()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </div>\n }\n @if (controlCount() === 0) {\n <button mat-icon-button class=\"add empty\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItem()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </section>\n</form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA;;AAEG;MAiCU,qBAAqB,CAAA;AAChC,IAAA,YAAY;AACZ,IAAA,OAAO;AACP,IAAA,SAAS;AA0BT,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAoC;IACxE;AAEA,IAAA,WAAA,GAAA;AAhCA,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEnB,QAAA,IAAA,CAAA,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC;AAEjE;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,GAAG,gFAAC;AAC9B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,SAAS,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vis/client-framework/sequence-list/src/lib/sequence-list.component.ts","../../../../../libs/yuuvis/client-framework/sequence-list/src/lib/sequence-list.component.html","../../../../../libs/yuuvis/client-framework/sequence-list/src/yuuvis-client-framework-sequence-list.ts"],"sourcesContent":["import {\n afterNextRender,\n Component,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n input,\n signal,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n ControlValueAccessor,\n FormArray,\n FormControl,\n FormGroup,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n NonNullableFormBuilder,\n ReactiveFormsModule,\n ValidationErrors,\n Validator,\n Validators\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { TranslatePipe } from '@yuuvis/client-core';\nimport { OrganizationComponent } from '@yuuvis/client-framework/forms';\nimport { YmtIconButtonDirective } from '@yuuvis/material';\nimport { SequenceItem, SequenceListAssignee } from './sequence-list.interface';\n\ntype SequenceFormItem = FormGroup<{\n title: FormControl<string>;\n nextAssignee: FormControl<SequenceListAssignee[]>;\n expiryDatetime: FormControl<any>;\n}>;\ntype SequenceForm = FormGroup<{\n items: FormArray<SequenceFormItem>;\n}>;\n\n/**\n * Task sequence list.\n */\n@Component({\n selector: 'yuv-sequence-list',\n standalone: true,\n imports: [\n TranslatePipe,\n OrganizationComponent,\n MatButtonModule,\n MatIconModule,\n ReactiveFormsModule,\n MatTooltipModule,\n MatInputModule,\n MatFormFieldModule,\n YmtIconButtonDirective\n ],\n templateUrl: './sequence-list.component.html',\n styleUrls: ['./sequence-list.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SequenceListComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SequenceListComponent),\n multi: true\n }\n ],\n host: {\n tabindex: '0'\n }\n})\nexport class SequenceListComponent implements ControlValueAccessor, Validator {\n #formBuilder = inject(NonNullableFormBuilder);\n #eleRef = inject(ElementRef);\n #injector = inject(Injector);\n\n readonly orgComponent = viewChild.required(OrganizationComponent);\n\n /**\n * Maximum number of sequence items (defaults to 100).\n */\n maxLength = input<number>(100);\n /**\n * Minimum number of sequence items that must remain (defaults to 1, matching\n * the original behaviour where a list can never be emptied). Consumers that\n * represent a tail of optional follow-up items (e.g. the remaining steps of\n * an already-started routing list) can set this to 0 to allow removing the\n * last remaining item.\n */\n minLength = input<number>(1);\n maxLengthExceeded = signal<boolean>(false);\n readonly controlCount = signal<number>(0);\n\n // dynamic form for sequence items\n sequenceForm: SequenceForm = this.#formBuilder.group({\n items: this.#formBuilder.array<SequenceFormItem>([this.#generateSequenceItem()])\n });\n\n entries: SequenceItem[] = [];\n\n get formItemArray(): FormArray<SequenceFormItem> {\n return this.sequenceForm.controls.items as FormArray<SequenceFormItem>;\n }\n\n constructor() {\n this.#updateState();\n this.sequenceForm.valueChanges.pipe(takeUntilDestroyed()).subscribe(() => {\n this.#propagate();\n });\n }\n\n addItem(): void {\n this.sequenceForm.controls.items.push(this.#generateSequenceItem());\n this.#updateState();\n this.#scrollToItem(this.formItemArray.length - 1);\n }\n\n addItemAt(idx: number): void {\n this.sequenceForm.controls.items.insert(idx, this.#generateSequenceItem());\n this.#updateState();\n this.#scrollToItem(idx);\n }\n\n removeItem(idx: number): void {\n this.sequenceForm.controls.items.removeAt(idx);\n this.#updateState();\n }\n\n writeValue(value: SequenceItem[]): void {\n this.entries = value || [];\n this.formItemArray.clear();\n if (this.entries.length === 0 && this.minLength() > 0) this.addItem();\n this.entries.forEach((entry) => {\n this.formItemArray.push(this.#generateSequenceItem(entry));\n });\n this.#updateState();\n }\n\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n\n validate(): ValidationErrors | null {\n const maxLength = this.maxLength();\n const mlExceeded = maxLength !== undefined && this.formItemArray.length > maxLength;\n const valid = this.sequenceForm.valid && !mlExceeded;\n\n return !valid\n ? {\n sequencelist: {\n invalid: this.sequenceForm.invalid,\n maxLengthExceeded: mlExceeded\n }\n }\n : null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n propagateChange = (_: any): void => {};\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n registerOnTouched(): void {}\n\n #updateState(): void {\n const maxLength = this.maxLength();\n this.maxLengthExceeded.set(maxLength !== undefined && this.formItemArray.length >= maxLength);\n this.controlCount.set(this.sequenceForm.controls.items.length);\n }\n\n #generateSequenceItem(sequenceItem?: SequenceItem): SequenceFormItem {\n return this.#formBuilder.group({\n title: [sequenceItem?.title || '', Validators.required],\n nextAssignee: [sequenceItem?.nextAssignee || [], Validators.required],\n expiryDatetime: [sequenceItem?.expiryDatetime || undefined]\n });\n }\n\n #propagate(): void {\n const res: SequenceItem[] = [];\n (this.sequenceForm.value.items || []).forEach((item: any) => {\n const i: SequenceItem = {\n title: item.title,\n nextAssignee: item.nextAssignee\n };\n if (item.expiryDatetime) {\n i.expiryDatetime = item.expiryDatetime;\n }\n res.push(i);\n });\n\n this.propagateChange(res);\n }\n\n #scrollToItem(idx: number): void {\n afterNextRender(\n () => {\n const items = this.#eleRef.nativeElement.querySelectorAll('.item');\n items[idx]?.scrollIntoView?.({ behavior: 'smooth', block: 'nearest' });\n },\n { injector: this.#injector }\n );\n }\n}\n","<form [formGroup]=\"sequenceForm\">\n <section formArrayName=\"items\">\n @for (item of sequenceForm.controls.items.controls; track item; let itemIndex = $index) {\n <div class=\"item\" [formGroup]=\"item\">\n <button mat-icon-button class=\"add before\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItemAt($index)\">\n <mat-icon>add</mat-icon>\n </button>\n <span class=\"index\" [attr.data-index]=\"itemIndex + 1\"></span>\n\n <div class=\"item-form\">\n <button ymtIconButton icon-button-size=\"small\" class=\"remove hidden\" [class.hidden]=\"controlCount() <= minLength()\" type=\"button\" (click)=\"removeItem($index)\" [disabled]=\"controlCount() <= minLength()\">\n <mat-icon>close</mat-icon>\n </button>\n <mat-form-field>\n <mat-label>{{ 'yuv.sequence-list.form.task' | translate }}</mat-label>\n <input matInput [maxLength]=\"128\" formControlName=\"title\" />\n </mat-form-field>\n <mat-form-field>\n <mat-label>{{ 'yuv.sequence-list.form.nextAssignee' | translate }}</mat-label>\n <yuv-organization [classifications]=\"['id:organization:set[user,role]']\"\n [matTooltip]=\"'yuv.sequence-list.form.nextAssignee' | translate\"\n [multiselect]=\"true\"\n [withMetadata]=\"true\"\n [required]=\"true\"\n formControlName=\"nextAssignee\">\n </yuv-organization>\n </mat-form-field>\n </div>\n @if ($last) {\n <button mat-icon-button class=\"add after\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItem()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </div>\n }\n @if (controlCount() === 0) {\n <button mat-icon-button class=\"add empty\" type=\"button\" [disabled]=\"maxLengthExceeded()\" (click)=\"addItem()\">\n <mat-icon>add</mat-icon>\n </button>\n }\n </section>\n</form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AA4CA;;AAEG;MAiCU,qBAAqB,CAAA;AAChC,IAAA,YAAY;AACZ,IAAA,OAAO;AACP,IAAA,SAAS;AA0BT,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAoC;IACxE;AAEA,IAAA,WAAA,GAAA;AAhCA,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAEnB,QAAA,IAAA,CAAA,YAAY,GAAG,SAAS,CAAC,QAAQ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AAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpFlE;;AAEG;;;;"}
|
|
@@ -5,7 +5,7 @@ import { MatIcon, MatIconModule } from '@angular/material/icon';
|
|
|
5
5
|
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
6
6
|
import * as i4 from '@angular/material/tooltip';
|
|
7
7
|
import { MatTooltip, MAT_TOOLTIP_DEFAULT_OPTIONS, MatTooltipModule } from '@angular/material/tooltip';
|
|
8
|
-
import { ObjectConfigService, DmsService, EventService, DmsObject, YuvEventType, BaseObjectTypeField, TranslatePipe, SystemService, ContentStreamField, Utils, Sort } from '@yuuvis/client-core';
|
|
8
|
+
import { ObjectConfigService, DmsService, EventService, DmsObject, YuvEventType, BaseObjectTypeField, TranslatePipe, SystemService, ContentStreamField, Utils, Sort, LocalizationService } from '@yuuvis/client-core';
|
|
9
9
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
10
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
11
|
import * as i1$2 from '@angular/forms';
|
|
@@ -1390,6 +1390,11 @@ class PropertySelectComponent {
|
|
|
1390
1390
|
untracked(() => this.getObjectTypeFields(this.objectType()));
|
|
1391
1391
|
}, ...(ngDevMode ? [{ debugName: "objectTypesEffect" }] : /* istanbul ignore next */ []));
|
|
1392
1392
|
this.selectedProperty = input(...(ngDevMode ? [undefined, { debugName: "selectedProperty" }] : /* istanbul ignore next */ []));
|
|
1393
|
+
/**
|
|
1394
|
+
* Whether the selected property may be removed from the slot. Mandatory
|
|
1395
|
+
* slots (title) disable this so the slot can never be emptied.
|
|
1396
|
+
*/
|
|
1397
|
+
this.allowRemove = input(true, ...(ngDevMode ? [{ debugName: "allowRemove" }] : /* istanbul ignore next */ []));
|
|
1393
1398
|
this.propertySelect = output();
|
|
1394
1399
|
}
|
|
1395
1400
|
// fields that should not be available to be placed in the slots
|
|
@@ -1450,12 +1455,12 @@ class PropertySelectComponent {
|
|
|
1450
1455
|
return this.system.getLocalizedLabel(otf.id) || otf.id;
|
|
1451
1456
|
}
|
|
1452
1457
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PropertySelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1453
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PropertySelectComponent, isStandalone: true, selector: "yuv-tile-property-select", inputs: { objectType: { classPropertyName: "objectType", publicName: "objectType", isSignal: true, isRequired: false, transformFunction: null }, excludeProperties: { classPropertyName: "excludeProperties", publicName: "excludeProperties", isSignal: true, isRequired: false, transformFunction: null }, selectedProperty: { classPropertyName: "selectedProperty", publicName: "selectedProperty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { propertySelect: "propertySelect" }, ngImport: i0, template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yuv-icon [svg]=\"clearIcon\"></yuv-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li\n tabindex=\"0\"\n [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\"\n (click)=\"selectProperty(p)\"\n (keydown.enter)=\"selectPropertyOnKeydown($event, p)\"\n (keydown.space)=\"selectPropertyOnKeydown($event, p)\"\n >\n <div class=\"label\">{{ p.label }}</div>\n <button\n
|
|
1458
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PropertySelectComponent, isStandalone: true, selector: "yuv-tile-property-select", inputs: { objectType: { classPropertyName: "objectType", publicName: "objectType", isSignal: true, isRequired: false, transformFunction: null }, excludeProperties: { classPropertyName: "excludeProperties", publicName: "excludeProperties", isSignal: true, isRequired: false, transformFunction: null }, selectedProperty: { classPropertyName: "selectedProperty", publicName: "selectedProperty", isSignal: true, isRequired: false, transformFunction: null }, allowRemove: { classPropertyName: "allowRemove", publicName: "allowRemove", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { propertySelect: "propertySelect" }, ngImport: i0, template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yuv-icon [svg]=\"clearIcon\"></yuv-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li\n tabindex=\"0\"\n [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\"\n (click)=\"selectProperty(p)\"\n (keydown.enter)=\"selectPropertyOnKeydown($event, p)\"\n (keydown.space)=\"selectPropertyOnKeydown($event, p)\"\n >\n <div class=\"label\">{{ p.label }}</div>\n @if (allowRemove()) {\n <button\n mat-icon-button\n (click)=\"removeProperty($event)\"\n (keydown.enter)=\"removePropertyOnKeydown($event)\"\n (keydown.space)=\"removePropertyOnKeydown($event)\"\n >\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">close</mat-icon>\n </button>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:flex;flex-flow:column;max-height:100%}:host .filter{flex:0 0 auto}:host .filter .filter-input{background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);display:flex;padding:.25em;align-items:center}:host .filter .filter-input input{background-color:transparent;border:0;outline:0;flex:1;color:var(--ymt-text-color)}:host .properties{flex:1;column-count:3;column-width:30ch;column-rule:1px dotted var(--ymt-outline);column-gap:2em;margin-block-start:var(--ymt-spacing-m)}:host .properties li{border:1px solid var(--ymt-outline-variant);border-radius:0;margin-block-end:1px;display:flex;align-items:center;justify-content:space-between;cursor:default}:host .properties li:hover{background-color:var(--ymt-hover-background)}:host .properties li.baseProperty{font-style:italic}:host .properties li.selected{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host .properties li:not(.selected) button{display:none}:host .properties li .label{padding:var(--ymt-spacing-xs) var(--ymt-spacing-m)}:host .properties li button{color:currentColor}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
1454
1459
|
}
|
|
1455
1460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PropertySelectComponent, decorators: [{
|
|
1456
1461
|
type: Component,
|
|
1457
|
-
args: [{ selector: 'yuv-tile-property-select', standalone: true, imports: [NgClass, FormsModule, MatButtonModule, MatIconModule], template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yuv-icon [svg]=\"clearIcon\"></yuv-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li\n tabindex=\"0\"\n [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\"\n (click)=\"selectProperty(p)\"\n (keydown.enter)=\"selectPropertyOnKeydown($event, p)\"\n (keydown.space)=\"selectPropertyOnKeydown($event, p)\"\n >\n <div class=\"label\">{{ p.label }}</div>\n <button\n
|
|
1458
|
-
}], propDecorators: { objectType: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectType", required: false }] }], excludeProperties: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludeProperties", required: false }] }], selectedProperty: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedProperty", required: false }] }], propertySelect: [{ type: i0.Output, args: ["propertySelect"] }] } });
|
|
1462
|
+
args: [{ selector: 'yuv-tile-property-select', standalone: true, imports: [NgClass, FormsModule, MatButtonModule, MatIconModule], template: "<!-- TODO: enable once filtering of properties makes sense -->\n<!-- <form class=\"filter\">\n <div class=\"filter-input\">\n <input type=\"text\" [placeholder]=\"'yuv.tile-config.property-select.filter.placeholder' | translate\" name=\"query\" [(ngModel)]=\"query\" />\n @if (query()) {\n <button class=\"icn\" (click)=\"query.set(null)\">\n <yuv-icon [svg]=\"clearIcon\"></yuv-icon>\n </button>\n }\n </div>\n</form> -->\n\n<ul class=\"properties\">\n @for (p of filteredObjectTypeFields(); track $index) {\n <li\n tabindex=\"0\"\n [ngClass]=\"{ baseProperty: p.baseProperty, selected: p.id === selectedProperty()?.propertyName }\"\n (click)=\"selectProperty(p)\"\n (keydown.enter)=\"selectPropertyOnKeydown($event, p)\"\n (keydown.space)=\"selectPropertyOnKeydown($event, p)\"\n >\n <div class=\"label\">{{ p.label }}</div>\n @if (allowRemove()) {\n <button\n mat-icon-button\n (click)=\"removeProperty($event)\"\n (keydown.enter)=\"removePropertyOnKeydown($event)\"\n (keydown.space)=\"removePropertyOnKeydown($event)\"\n >\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">close</mat-icon>\n </button>\n }\n </li>\n }\n</ul>\n", styles: [":host{display:flex;flex-flow:column;max-height:100%}:host .filter{flex:0 0 auto}:host .filter .filter-input{background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);display:flex;padding:.25em;align-items:center}:host .filter .filter-input input{background-color:transparent;border:0;outline:0;flex:1;color:var(--ymt-text-color)}:host .properties{flex:1;column-count:3;column-width:30ch;column-rule:1px dotted var(--ymt-outline);column-gap:2em;margin-block-start:var(--ymt-spacing-m)}:host .properties li{border:1px solid var(--ymt-outline-variant);border-radius:0;margin-block-end:1px;display:flex;align-items:center;justify-content:space-between;cursor:default}:host .properties li:hover{background-color:var(--ymt-hover-background)}:host .properties li.baseProperty{font-style:italic}:host .properties li.selected{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host .properties li:not(.selected) button{display:none}:host .properties li .label{padding:var(--ymt-spacing-xs) var(--ymt-spacing-m)}:host .properties li button{color:currentColor}\n"] }]
|
|
1463
|
+
}], propDecorators: { objectType: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectType", required: false }] }], excludeProperties: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludeProperties", required: false }] }], selectedProperty: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedProperty", required: false }] }], allowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowRemove", required: false }] }], propertySelect: [{ type: i0.Output, args: ["propertySelect"] }] } });
|
|
1459
1464
|
|
|
1460
1465
|
class IconSelectComponent {
|
|
1461
1466
|
constructor() {
|
|
@@ -1493,6 +1498,7 @@ class TileConfigTileComponent {
|
|
|
1493
1498
|
this.#actionService = inject(ActionsService);
|
|
1494
1499
|
this.#elRef = inject(ElementRef);
|
|
1495
1500
|
this.#system = inject(SystemService);
|
|
1501
|
+
this.#localization = inject(LocalizationService);
|
|
1496
1502
|
this.#badges = inject(BadgeRegistryService);
|
|
1497
1503
|
this.disableIconSlot = input(false, ...(ngDevMode ? [{ debugName: "disableIconSlot" }] : /* istanbul ignore next */ []));
|
|
1498
1504
|
this.disableBadgesSlot = input(false, ...(ngDevMode ? [{ debugName: "disableBadgesSlot" }] : /* istanbul ignore next */ []));
|
|
@@ -1502,7 +1508,7 @@ class TileConfigTileComponent {
|
|
|
1502
1508
|
const objectConfig = this.objectConfig();
|
|
1503
1509
|
[objectConfig.title, objectConfig.description, objectConfig.meta, objectConfig.aside].forEach((field) => {
|
|
1504
1510
|
if (field) {
|
|
1505
|
-
const label = this.#
|
|
1511
|
+
const label = this.#localization.getLocalizedLabel(field.propertyName);
|
|
1506
1512
|
field.label = label || field.label || field.propertyName;
|
|
1507
1513
|
}
|
|
1508
1514
|
});
|
|
@@ -1535,6 +1541,7 @@ class TileConfigTileComponent {
|
|
|
1535
1541
|
#actionService;
|
|
1536
1542
|
#elRef;
|
|
1537
1543
|
#system;
|
|
1544
|
+
#localization;
|
|
1538
1545
|
#badges;
|
|
1539
1546
|
selectSlot(slot) {
|
|
1540
1547
|
if (this.disableIconSlot() && slot === 'icon')
|
|
@@ -1548,17 +1555,18 @@ class TileConfigTileComponent {
|
|
|
1548
1555
|
: element.classList.remove('active'));
|
|
1549
1556
|
}
|
|
1550
1557
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: TileConfigTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1551
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: TileConfigTileComponent, isStandalone: true, selector: "yuv-tile-config-tile", inputs: { disableIconSlot: { classPropertyName: "disableIconSlot", publicName: "disableIconSlot", isSignal: true, isRequired: false, transformFunction: null }, disableBadgesSlot: { classPropertyName: "disableBadgesSlot", publicName: "disableBadgesSlot", isSignal: true, isRequired: false, transformFunction: null }, bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, objectConfig: { classPropertyName: "objectConfig", publicName: "objectConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { slotSelect: "slotSelect" }, ngImport: i0, template: "@let oc = _objectConfig();\n\n<div\n data-slot=\"icon\"\n [attr.disabled]=\"disableIconSlot()\"\n tabindex=\"0\"\n (click)=\"selectSlot('icon')\"\n (keydown.enter)=\"selectSlot('icon')\"\n (keydown.space)=\"selectSlot('icon'); $event.preventDefault()\"\n>\n @if (oc && oc.icon) {\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">{{ oc.icon.svg }}</mat-icon>\n } @else if (oc && oc.objectTypeId) {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\" />\n }\n</div>\n<div\n data-slot=\"title\"\n tabindex=\"0\"\n (click)=\"selectSlot('title')\"\n (keydown.enter)=\"selectSlot('title')\"\n (keydown.space)=\"selectSlot('title'); $event.preventDefault()\"\n>\n {{ oc?.title?.label }}\n</div>\n<div\n data-slot=\"actions\"\n tabindex=\"0\"\n (click)=\"selectSlot('actions')\"\n (keydown.enter)=\"selectSlot('actions')\"\n (keydown.space)=\"selectSlot('actions'); $event.preventDefault()\"\n>\n @for (a of actions(); track a.id) {\n <button mat-icon-button [matTooltip]=\"a.label\" [attr.inert]=\"true\" aria-hidden=\"true\">\n <mat-icon inert=\"true\" aria-hidden=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n</div>\n<div\n data-slot=\"description\"\n tabindex=\"0\"\n (click)=\"selectSlot('description')\"\n (keydown.enter)=\"selectSlot('description')\"\n (keydown.space)=\"selectSlot('description'); $event.preventDefault()\"\n>\n {{ oc?.description?.label }}\n</div>\n<div\n data-slot=\"aside\"\n tabindex=\"0\"\n (click)=\"selectSlot('aside')\"\n (keydown.enter)=\"selectSlot('aside')\"\n (keydown.space)=\"selectSlot('aside'); $event.preventDefault()\"\n>\n {{ oc?.aside?.label }}\n</div>\n<div\n data-slot=\"meta\"\n tabindex=\"0\"\n (click)=\"selectSlot('meta')\"\n (keydown.enter)=\"selectSlot('meta')\"\n (keydown.space)=\"selectSlot('meta'); $event.preventDefault()\"\n>\n {{ oc?.meta?.label }}\n</div>\n\n@if (!disableBadgesSlot()) {\n <div\n data-slot=\"badges\"\n tabindex=\"0\"\n (click)=\"selectSlot('badges')\"\n (keydown.enter)=\"selectSlot('badges')\"\n (keydown.space)=\"selectSlot('badges'); $event.preventDefault()\"\n >\n @for (badge of badges(); track badge.id) {\n <yuv-badge-chip [badge]=\"badge\" />\n }\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--ymt-spacing-m);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline);padding:.25em .5em;box-sizing:border-box;min-height:2.2em;border-radius:var(--ymt-corner-xs)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta])[disabled]{border:none;background-color:transparent}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{width:24px;height:24px;pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.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: "component", type: ObjectTypeIconComponent, selector: "yuv-object-type-icon", inputs: ["objectTypeId"] }, { kind: "component", type: BadgeChipComponent, selector: "yuv-badge-chip", inputs: ["badge", "showLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1558
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: TileConfigTileComponent, isStandalone: true, selector: "yuv-tile-config-tile", inputs: { disableIconSlot: { classPropertyName: "disableIconSlot", publicName: "disableIconSlot", isSignal: true, isRequired: false, transformFunction: null }, disableBadgesSlot: { classPropertyName: "disableBadgesSlot", publicName: "disableBadgesSlot", isSignal: true, isRequired: false, transformFunction: null }, bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, objectConfig: { classPropertyName: "objectConfig", publicName: "objectConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { slotSelect: "slotSelect" }, ngImport: i0, template: "@let oc = _objectConfig();\n\n<div\n data-slot=\"icon\"\n [attr.disabled]=\"disableIconSlot()\"\n tabindex=\"0\"\n (click)=\"selectSlot('icon')\"\n (keydown.enter)=\"selectSlot('icon')\"\n (keydown.space)=\"selectSlot('icon'); $event.preventDefault()\"\n>\n @if (oc && oc.icon) {\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">{{ oc.icon.svg }}</mat-icon>\n } @else if (oc && oc.objectTypeId) {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\" />\n }\n</div>\n<div\n data-slot=\"title\"\n tabindex=\"0\"\n [class.title-missing]=\"!oc?.title?.propertyName\"\n (click)=\"selectSlot('title')\"\n (keydown.enter)=\"selectSlot('title')\"\n (keydown.space)=\"selectSlot('title'); $event.preventDefault()\"\n>\n {{ oc?.title?.label }}\n</div>\n<div\n data-slot=\"actions\"\n tabindex=\"0\"\n (click)=\"selectSlot('actions')\"\n (keydown.enter)=\"selectSlot('actions')\"\n (keydown.space)=\"selectSlot('actions'); $event.preventDefault()\"\n>\n @for (a of actions(); track a.id) {\n <button mat-icon-button [matTooltip]=\"a.label\" [attr.inert]=\"true\" aria-hidden=\"true\">\n <mat-icon inert=\"true\" aria-hidden=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n</div>\n<div\n data-slot=\"description\"\n tabindex=\"0\"\n (click)=\"selectSlot('description')\"\n (keydown.enter)=\"selectSlot('description')\"\n (keydown.space)=\"selectSlot('description'); $event.preventDefault()\"\n>\n {{ oc?.description?.label }}\n</div>\n<div\n data-slot=\"aside\"\n tabindex=\"0\"\n (click)=\"selectSlot('aside')\"\n (keydown.enter)=\"selectSlot('aside')\"\n (keydown.space)=\"selectSlot('aside'); $event.preventDefault()\"\n>\n {{ oc?.aside?.label }}\n</div>\n<div\n data-slot=\"meta\"\n tabindex=\"0\"\n (click)=\"selectSlot('meta')\"\n (keydown.enter)=\"selectSlot('meta')\"\n (keydown.space)=\"selectSlot('meta'); $event.preventDefault()\"\n>\n {{ oc?.meta?.label }}\n</div>\n\n@if (!disableBadgesSlot()) {\n <div\n data-slot=\"badges\"\n tabindex=\"0\"\n (click)=\"selectSlot('badges')\"\n (keydown.enter)=\"selectSlot('badges')\"\n (keydown.space)=\"selectSlot('badges'); $event.preventDefault()\"\n >\n @for (badge of badges(); track badge.id) {\n <yuv-badge-chip [badge]=\"badge\" />\n }\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--ymt-spacing-m);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=title].title-missing{border:1px solid var(--ymt-danger)}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline);padding:.25em .5em;box-sizing:border-box;min-height:2.2em;border-radius:var(--ymt-corner-xs)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta])[disabled]{border:none;background-color:transparent}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{width:24px;height:24px;pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.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: "component", type: ObjectTypeIconComponent, selector: "yuv-object-type-icon", inputs: ["objectTypeId"] }, { kind: "component", type: BadgeChipComponent, selector: "yuv-badge-chip", inputs: ["badge", "showLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1552
1559
|
}
|
|
1553
1560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: TileConfigTileComponent, decorators: [{
|
|
1554
1561
|
type: Component,
|
|
1555
|
-
args: [{ selector: 'yuv-tile-config-tile', standalone: true, imports: [MatButtonModule, MatTooltipModule, MatIconModule, ObjectTypeIconComponent, BadgeChipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let oc = _objectConfig();\n\n<div\n data-slot=\"icon\"\n [attr.disabled]=\"disableIconSlot()\"\n tabindex=\"0\"\n (click)=\"selectSlot('icon')\"\n (keydown.enter)=\"selectSlot('icon')\"\n (keydown.space)=\"selectSlot('icon'); $event.preventDefault()\"\n>\n @if (oc && oc.icon) {\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">{{ oc.icon.svg }}</mat-icon>\n } @else if (oc && oc.objectTypeId) {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\" />\n }\n</div>\n<div\n data-slot=\"title\"\n tabindex=\"0\"\n (click)=\"selectSlot('title')\"\n (keydown.enter)=\"selectSlot('title')\"\n (keydown.space)=\"selectSlot('title'); $event.preventDefault()\"\n>\n {{ oc?.title?.label }}\n</div>\n<div\n data-slot=\"actions\"\n tabindex=\"0\"\n (click)=\"selectSlot('actions')\"\n (keydown.enter)=\"selectSlot('actions')\"\n (keydown.space)=\"selectSlot('actions'); $event.preventDefault()\"\n>\n @for (a of actions(); track a.id) {\n <button mat-icon-button [matTooltip]=\"a.label\" [attr.inert]=\"true\" aria-hidden=\"true\">\n <mat-icon inert=\"true\" aria-hidden=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n</div>\n<div\n data-slot=\"description\"\n tabindex=\"0\"\n (click)=\"selectSlot('description')\"\n (keydown.enter)=\"selectSlot('description')\"\n (keydown.space)=\"selectSlot('description'); $event.preventDefault()\"\n>\n {{ oc?.description?.label }}\n</div>\n<div\n data-slot=\"aside\"\n tabindex=\"0\"\n (click)=\"selectSlot('aside')\"\n (keydown.enter)=\"selectSlot('aside')\"\n (keydown.space)=\"selectSlot('aside'); $event.preventDefault()\"\n>\n {{ oc?.aside?.label }}\n</div>\n<div\n data-slot=\"meta\"\n tabindex=\"0\"\n (click)=\"selectSlot('meta')\"\n (keydown.enter)=\"selectSlot('meta')\"\n (keydown.space)=\"selectSlot('meta'); $event.preventDefault()\"\n>\n {{ oc?.meta?.label }}\n</div>\n\n@if (!disableBadgesSlot()) {\n <div\n data-slot=\"badges\"\n tabindex=\"0\"\n (click)=\"selectSlot('badges')\"\n (keydown.enter)=\"selectSlot('badges')\"\n (keydown.space)=\"selectSlot('badges'); $event.preventDefault()\"\n >\n @for (badge of badges(); track badge.id) {\n <yuv-badge-chip [badge]=\"badge\" />\n }\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--ymt-spacing-m);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline);padding:.25em .5em;box-sizing:border-box;min-height:2.2em;border-radius:var(--ymt-corner-xs)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta])[disabled]{border:none;background-color:transparent}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{width:24px;height:24px;pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"] }]
|
|
1562
|
+
args: [{ selector: 'yuv-tile-config-tile', standalone: true, imports: [MatButtonModule, MatTooltipModule, MatIconModule, ObjectTypeIconComponent, BadgeChipComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let oc = _objectConfig();\n\n<div\n data-slot=\"icon\"\n [attr.disabled]=\"disableIconSlot()\"\n tabindex=\"0\"\n (click)=\"selectSlot('icon')\"\n (keydown.enter)=\"selectSlot('icon')\"\n (keydown.space)=\"selectSlot('icon'); $event.preventDefault()\"\n>\n @if (oc && oc.icon) {\n <mat-icon aria-hidden=\"true\" [attr.inert]=\"true\">{{ oc.icon.svg }}</mat-icon>\n } @else if (oc && oc.objectTypeId) {\n <yuv-object-type-icon [objectTypeId]=\"oc.objectTypeId\" />\n }\n</div>\n<div\n data-slot=\"title\"\n tabindex=\"0\"\n [class.title-missing]=\"!oc?.title?.propertyName\"\n (click)=\"selectSlot('title')\"\n (keydown.enter)=\"selectSlot('title')\"\n (keydown.space)=\"selectSlot('title'); $event.preventDefault()\"\n>\n {{ oc?.title?.label }}\n</div>\n<div\n data-slot=\"actions\"\n tabindex=\"0\"\n (click)=\"selectSlot('actions')\"\n (keydown.enter)=\"selectSlot('actions')\"\n (keydown.space)=\"selectSlot('actions'); $event.preventDefault()\"\n>\n @for (a of actions(); track a.id) {\n <button mat-icon-button [matTooltip]=\"a.label\" [attr.inert]=\"true\" aria-hidden=\"true\">\n <mat-icon inert=\"true\" aria-hidden=\"true\">{{ a.icon }}</mat-icon>\n </button>\n }\n</div>\n<div\n data-slot=\"description\"\n tabindex=\"0\"\n (click)=\"selectSlot('description')\"\n (keydown.enter)=\"selectSlot('description')\"\n (keydown.space)=\"selectSlot('description'); $event.preventDefault()\"\n>\n {{ oc?.description?.label }}\n</div>\n<div\n data-slot=\"aside\"\n tabindex=\"0\"\n (click)=\"selectSlot('aside')\"\n (keydown.enter)=\"selectSlot('aside')\"\n (keydown.space)=\"selectSlot('aside'); $event.preventDefault()\"\n>\n {{ oc?.aside?.label }}\n</div>\n<div\n data-slot=\"meta\"\n tabindex=\"0\"\n (click)=\"selectSlot('meta')\"\n (keydown.enter)=\"selectSlot('meta')\"\n (keydown.space)=\"selectSlot('meta'); $event.preventDefault()\"\n>\n {{ oc?.meta?.label }}\n</div>\n\n@if (!disableBadgesSlot()) {\n <div\n data-slot=\"badges\"\n tabindex=\"0\"\n (click)=\"selectSlot('badges')\"\n (keydown.enter)=\"selectSlot('badges')\"\n (keydown.space)=\"selectSlot('badges'); $event.preventDefault()\"\n >\n @for (badge of badges(); track badge.id) {\n <yuv-badge-chip [badge]=\"badge\" />\n }\n </div>\n}\n", styles: [":host{--tile-item-gap: .5em;--tile-background: transparent;--tile-icon-fill: currentColor;display:grid;grid-template-rows:auto auto auto auto;grid-template-columns:3rem 1fr auto;grid-template-areas:\"icon title title actions\" \"icon description aside aside\" \"icon meta meta badges\";gap:var(--tile-item-gap);padding:var(--ymt-spacing-m);background-color:var(--tile-background)}:host:hover [data-slot=actions]{opacity:1}:host [data-slot=icon]{grid-area:icon;display:flex;align-items:center;justify-content:center}:host [data-slot=title]{grid-area:title;font-weight:700}:host [data-slot=title].title-missing{border:1px solid var(--ymt-danger)}:host [data-slot=description]{grid-area:description}:host [data-slot=meta]{grid-area:meta}:host [data-slot=aside]{flex:0 0 auto;grid-area:aside}:host [data-slot=actions]{flex:0 0 auto;display:flex;justify-self:end;grid-area:actions}:host [data-slot=actions] button{padding:0;gap:2px}:host [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]){display:flex;align-items:center;background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline);padding:.25em .5em;box-sizing:border-box;min-height:2.2em;border-radius:var(--ymt-corner-xs)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]){cursor:pointer}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]):hover{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta]):not([disabled]).active{background-color:var(--ymt-primary-container);color:var(--ymt-on-primary-container)}:host :where([data-slot=badges],[data-slot=actions],[data-slot=aside],[data-slot=icon],[data-slot=title],[data-slot=description],[data-slot=meta])[disabled]{border:none;background-color:transparent}:host :where([data-slot=badges],[data-slot=actions]){min-width:3em}:host :where([data-slot=badges],[data-slot=actions]) button{width:24px;height:24px;pointer-events:none;color:currentColor}:host [data-slot=aside]{min-width:4em}:host [data-slot=icon]{height:3em;width:100%}\n"] }]
|
|
1556
1563
|
}], propDecorators: { disableIconSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableIconSlot", required: false }] }], disableBadgesSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBadgesSlot", required: false }] }], bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], objectConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "objectConfig", required: true }] }], slotSelect: [{ type: i0.Output, args: ["slotSelect"] }] } });
|
|
1557
1564
|
|
|
1558
1565
|
class TileConfigComponent {
|
|
1559
1566
|
constructor() {
|
|
1560
1567
|
this.#objectConfigService = inject(ObjectConfigService);
|
|
1561
1568
|
this.#system = inject(SystemService);
|
|
1569
|
+
this.#localization = inject(LocalizationService);
|
|
1562
1570
|
this.#translate = inject(TranslateService);
|
|
1563
1571
|
/**
|
|
1564
1572
|
* Tile configurations are stored globally for all apps. If you want a
|
|
@@ -1608,12 +1616,24 @@ class TileConfigComponent {
|
|
|
1608
1616
|
}
|
|
1609
1617
|
#objectConfigService;
|
|
1610
1618
|
#system;
|
|
1619
|
+
#localization;
|
|
1611
1620
|
#translate;
|
|
1612
1621
|
get configChanged() {
|
|
1613
1622
|
return Object.keys(this.changes).length > 0;
|
|
1614
1623
|
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1624
|
+
/**
|
|
1625
|
+
* The title slot is mandatory. Edited configs without a title block the
|
|
1626
|
+
* save. Entries set to `undefined` mark the stored config for deletion and
|
|
1627
|
+
* are always valid.
|
|
1628
|
+
*/
|
|
1629
|
+
get titleMissing() {
|
|
1630
|
+
return Object.values(this.changes).some((config) => config && !config.title?.propertyName);
|
|
1631
|
+
}
|
|
1632
|
+
get titleMissingTypeLabels() {
|
|
1633
|
+
return Object.keys(this.changes)
|
|
1634
|
+
.filter((typeId) => this.changes[typeId] && !this.changes[typeId]?.title?.propertyName)
|
|
1635
|
+
.map((typeId) => this.getTypeLabel(typeId))
|
|
1636
|
+
.join(', ');
|
|
1617
1637
|
}
|
|
1618
1638
|
#typesEffeconfigTypes;
|
|
1619
1639
|
#emptyObjectConfig;
|
|
@@ -1694,16 +1714,8 @@ class TileConfigComponent {
|
|
|
1694
1714
|
}
|
|
1695
1715
|
}
|
|
1696
1716
|
saveConfig() {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
return;
|
|
1700
|
-
const substitute = this.#substituteEmptyConfig(typeId, this.changes[typeId]);
|
|
1701
|
-
const effectiveConfig = this.#objectConfigService.getObjectConfig({ id: typeId }, this.bucket());
|
|
1702
|
-
if (this.#deepEqual(substitute, effectiveConfig))
|
|
1703
|
-
delete this.changes[typeId];
|
|
1704
|
-
else
|
|
1705
|
-
this.changes[typeId] = substitute;
|
|
1706
|
-
});
|
|
1717
|
+
if (this.titleMissing)
|
|
1718
|
+
return;
|
|
1707
1719
|
if (Object.keys(this.changes).length) {
|
|
1708
1720
|
this.#objectConfigService.saveObjectConfigs(this.changes, this.bucket()).subscribe((_) => this.save.emit());
|
|
1709
1721
|
}
|
|
@@ -1712,18 +1724,26 @@ class TileConfigComponent {
|
|
|
1712
1724
|
}
|
|
1713
1725
|
}
|
|
1714
1726
|
resetConfig() {
|
|
1715
|
-
if (this.selectedType)
|
|
1716
|
-
|
|
1717
|
-
|
|
1727
|
+
if (!this.selectedType)
|
|
1728
|
+
return;
|
|
1729
|
+
const typeId = this.selectedType.id;
|
|
1730
|
+
const defaults = this.#getDefaults(typeId);
|
|
1731
|
+
const originalConfig = this.#objectConfigService.getObjectConfig(this.selectedType, this.bucket());
|
|
1732
|
+
if (defaults) {
|
|
1718
1733
|
this.objectConfig = { ...defaults };
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1734
|
+
if (this.#deepEqual(defaults, originalConfig))
|
|
1735
|
+
delete this.changes[typeId];
|
|
1736
|
+
else
|
|
1737
|
+
this.changes[typeId] = { ...defaults };
|
|
1738
|
+
}
|
|
1739
|
+
else {
|
|
1740
|
+
// no defaults: reset removes the stored config so the render-time
|
|
1741
|
+
// fallback chain applies again
|
|
1742
|
+
this.objectConfig = { ...this.#emptyObjectConfig, objectTypeId: typeId };
|
|
1743
|
+
if (originalConfig)
|
|
1744
|
+
this.changes[typeId] = undefined;
|
|
1745
|
+
else
|
|
1746
|
+
delete this.changes[typeId];
|
|
1727
1747
|
}
|
|
1728
1748
|
}
|
|
1729
1749
|
cancelConfig() {
|
|
@@ -1733,34 +1753,12 @@ class TileConfigComponent {
|
|
|
1733
1753
|
getTypeLabel(typeId) {
|
|
1734
1754
|
return !this.#translate.instant(typeId).includes('!missing key')
|
|
1735
1755
|
? this.#translate.instant(typeId)
|
|
1736
|
-
: this.#
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* An empty config must not be persisted. Replace it with the type's default
|
|
1740
|
-
* (keeping the user's icon/actions/badges where set). If no default exists at
|
|
1741
|
-
* all, return `undefined` so the stored entry gets deleted on save and the
|
|
1742
|
-
* fallback chain applies at render time.
|
|
1743
|
-
*/
|
|
1744
|
-
#substituteEmptyConfig(typeId, userConfig) {
|
|
1745
|
-
const defaults = this.#getDefaults(typeId);
|
|
1746
|
-
if (!defaults || this.#isEmptyConfig(defaults))
|
|
1747
|
-
return undefined;
|
|
1748
|
-
const merged = { ...defaults };
|
|
1749
|
-
if (userConfig?.icon)
|
|
1750
|
-
merged.icon = userConfig.icon;
|
|
1751
|
-
if (userConfig?.actions?.length)
|
|
1752
|
-
merged.actions = userConfig.actions;
|
|
1753
|
-
if (userConfig?.badges?.length)
|
|
1754
|
-
merged.badges = userConfig.badges;
|
|
1755
|
-
return merged;
|
|
1756
|
+
: this.#localization.getLocalizedResource(typeId);
|
|
1756
1757
|
}
|
|
1757
1758
|
#getDefaults(typeId) {
|
|
1758
1759
|
const registered = this.#objectConfigService.getRegisteredDefault(typeId, this.bucket());
|
|
1759
1760
|
return registered ?? this.#objectConfigService.getDefaultConfig(typeId);
|
|
1760
1761
|
}
|
|
1761
|
-
#isEmptyConfig(config) {
|
|
1762
|
-
return !config || ['title', 'description', 'meta', 'aside'].every((slot) => !config[slot]?.propertyName);
|
|
1763
|
-
}
|
|
1764
1762
|
#selectFlavor(flavor) {
|
|
1765
1763
|
const type = this.#system.getObjectType(flavor.sot);
|
|
1766
1764
|
if (type)
|
|
@@ -1772,16 +1770,12 @@ class TileConfigComponent {
|
|
|
1772
1770
|
}
|
|
1773
1771
|
#selectType(type) {
|
|
1774
1772
|
this.selectedType = type;
|
|
1775
|
-
|
|
1776
|
-
//
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
...this.#emptyObjectConfig,
|
|
1782
|
-
objectTypeId: type.id
|
|
1783
|
-
};
|
|
1784
|
-
}
|
|
1773
|
+
// if the type has been changed in this session use that config instead of
|
|
1774
|
+
// the persisted one; an explicit `undefined` entry marks a pending deletion
|
|
1775
|
+
const config = type.id in this.changes
|
|
1776
|
+
? this.changes[type.id]
|
|
1777
|
+
: this.#objectConfigService.getObjectConfig(type, this.bucket() || '');
|
|
1778
|
+
this.objectConfig = config ? { ...config } : { ...this.#emptyObjectConfig, objectTypeId: type.id };
|
|
1785
1779
|
}
|
|
1786
1780
|
#deepEqual(valueA, valueB) {
|
|
1787
1781
|
if (valueA === valueB)
|
|
@@ -1801,7 +1795,7 @@ class TileConfigComponent {
|
|
|
1801
1795
|
return true;
|
|
1802
1796
|
}
|
|
1803
1797
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: TileConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1804
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: TileConfigComponent, isStandalone: true, selector: "yuv-tile-config", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, bucketLabel: { classPropertyName: "bucketLabel", publicName: "bucketLabel", isSignal: true, isRequired: false, transformFunction: null }, configTypes: { classPropertyName: "configTypes", publicName: "configTypes", isSignal: true, isRequired: false, transformFunction: null }, configFlavors: { classPropertyName: "configFlavors", publicName: "configFlavors", isSignal: true, isRequired: false, transformFunction: null }, excludeProperties: { classPropertyName: "excludeProperties", publicName: "excludeProperties", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", canceled: "canceled" }, ngImport: i0, template: "<yuv-dialog [headertitle]=\"'yuv.tile-config.title' | translate: { bucket: bucketLabel() }\">\n <main class=\"tile-config\">\n <section class=\"picker\">\n <mat-form-field>\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"selectedType\" (ngModelChange)=\"typeSelected($event)\">\n @for (t of types() || []; track t.id; let i = $index) {\n <mat-option [value]=\"t.data\">{{ getTypeLabel(t.id) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedType) {\n <button ymtButton=\"secondary\" (click)=\"resetConfig()\">{{ 'yuv.tile-config.button.reset' | translate }}</button>\n }\n </section>\n\n <section class=\"details\">\n @if (selectedType) {\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile\n [disableIconSlot]=\"true\"\n [objectConfig]=\"objectConfig!\"\n [bucket]=\"bucket()\"\n (slotSelect)=\"slotSelect($event)\"\n />\n </div>\n @if (
|
|
1798
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: TileConfigComponent, isStandalone: true, selector: "yuv-tile-config", inputs: { bucket: { classPropertyName: "bucket", publicName: "bucket", isSignal: true, isRequired: false, transformFunction: null }, bucketLabel: { classPropertyName: "bucketLabel", publicName: "bucketLabel", isSignal: true, isRequired: false, transformFunction: null }, configTypes: { classPropertyName: "configTypes", publicName: "configTypes", isSignal: true, isRequired: false, transformFunction: null }, configFlavors: { classPropertyName: "configFlavors", publicName: "configFlavors", isSignal: true, isRequired: false, transformFunction: null }, excludeProperties: { classPropertyName: "excludeProperties", publicName: "excludeProperties", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", canceled: "canceled" }, ngImport: i0, template: "<yuv-dialog [headertitle]=\"'yuv.tile-config.title' | translate: { bucket: bucketLabel() }\">\n <main class=\"tile-config\">\n <section class=\"picker\">\n <mat-form-field>\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"selectedType\" (ngModelChange)=\"typeSelected($event)\">\n @for (t of types() || []; track t.id; let i = $index) {\n <mat-option [value]=\"t.data\">{{ getTypeLabel(t.id) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedType) {\n <button ymtButton=\"secondary\" (click)=\"resetConfig()\">{{ 'yuv.tile-config.button.reset' | translate }}</button>\n }\n </section>\n\n <section class=\"details\">\n @if (selectedType) {\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile\n [disableIconSlot]=\"true\"\n [objectConfig]=\"objectConfig!\"\n [bucket]=\"bucket()\"\n (slotSelect)=\"slotSelect($event)\"\n />\n </div>\n @if (titleMissing) {\n <section class=\"config-error\">\n {{ 'yuv.tile-config.error.title-required' | translate }} ({{ titleMissingTypeLabels }})\n </section>\n }\n\n <main>\n @if (selectedSlot === 'icon') {\n <h3>{{ 'yuv.tile-config.slot.icon.headline' | translate }}</h3>\n <yuv-icon-select [objectType]=\"selectedType\" (iconSelect)=\"iconSelected($event)\" />\n } @else if (selectedSlot === 'badges') {\n <h3>{{ 'yuv.tile-config.slot.badges.headline' | translate }}</h3>\n <yuv-tile-badge-select\n [selectedBadgeIds]=\"getSelectedBadges()\"\n [bucket]=\"bucket()\"\n (badgeSelect)=\"badgeSelected($event)\"\n />\n } @else if (!selectedSlot) {\n } @else if (selectedSlot === 'actions') {\n <h3>{{ 'yuv.tile-config.slot.action.headline' | translate }}</h3>\n <yuv-tile-action-select\n [objectType]=\"selectedType\"\n [selectedActionIds]=\"getSelectedActions()\"\n (actionSelect)=\"actionSelected($event)\"\n />\n } @else {\n <h3>{{ 'yuv.tile-config.slot.property.headline' | translate }}</h3>\n <yuv-tile-property-select\n [objectType]=\"selectedType\"\n [excludeProperties]=\"excludeProperties()\"\n [selectedProperty]=\"getConfigProperty(selectedSlot)\"\n [allowRemove]=\"selectedSlot !== 'title'\"\n (propertySelect)=\"propertySelected(selectedSlot, $event)\"\n />\n }\n </main>\n } @else {\n <div class=\"placeholder empty\"></div>\n }\n </section>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" (click)=\"cancelConfig()\">{{ 'yuv.tile-config.button.close' | translate }}</button>\n <button ymtButton=\"primary\" [disabled]=\"!configChanged || titleMissing\" (click)=\"saveConfig()\">\n {{ 'yuv.tile-config.button.save' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:flex;height:100%;flex-flow:column}:host main.tile-config{height:100%;display:contents}:host .picker{display:flex;justify-content:space-between;gap:var(--ymt-spacing-m);align-items:center;border-bottom:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m)}:host .details{flex:1;display:flex;flex-flow:column;box-sizing:border-box;overflow:hidden}:host .details header{flex:0 0 auto;display:flex;align-items:center;border-bottom:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m);gap:var(--ymt-spacing-m)}:host .details header h2{flex:1;overflow:hidden;text-overflow:ellipsis;margin:0}:host .details .dummy-preview{flex:0 0 auto;padding:var(--ymt-spacing-m);background-color:var(--ymt-surface-panel);border-bottom:1px solid var(--ymt-outline-variant)}:host .details .dummy-preview yuv-tile-config-tile{max-width:500px;margin:auto;border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline);background-color:var(--ymt-surface-container)}:host .details main{flex:1;overflow-y:auto;padding:var(--ymt-spacing-m)}:host .details main h3{margin:0;padding-block-end:var(--ymt-spacing-m);font:var(--ymt-font-subhead)}:host .details .config-error{flex:0 0 auto;padding:var(--ymt-spacing-m);background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);border-bottom:1px solid var(--ymt-outline-variant)}:host .details .placeholder.empty{height:100%;display:grid;place-content:center;color:var(--ymt-text-color-subtle)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TileConfigTileComponent, selector: "yuv-tile-config-tile", inputs: ["disableIconSlot", "disableBadgesSlot", "bucket", "objectConfig"], outputs: ["slotSelect"] }, { kind: "component", type: IconSelectComponent, selector: "yuv-icon-select", inputs: ["objectType"], outputs: ["iconSelect"] }, { kind: "component", type: PropertySelectComponent, selector: "yuv-tile-property-select", inputs: ["objectType", "excludeProperties", "selectedProperty", "allowRemove"], outputs: ["propertySelect"] }, { kind: "component", type: ActionSelectComponent, selector: "yuv-tile-action-select", inputs: ["objectType", "selectedActionIds"], outputs: ["actionSelect"] }, { kind: "component", type: BadgeSelectComponent, selector: "yuv-tile-badge-select", inputs: ["selectedBadgeIds", "bucket"], outputs: ["badgeSelect"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i2$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitle", "headertitel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1805
1799
|
}
|
|
1806
1800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: TileConfigComponent, decorators: [{
|
|
1807
1801
|
type: Component,
|
|
@@ -1821,7 +1815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
1821
1815
|
DialogComponent,
|
|
1822
1816
|
MatFormFieldModule,
|
|
1823
1817
|
YmtButtonDirective
|
|
1824
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<yuv-dialog [headertitle]=\"'yuv.tile-config.title' | translate: { bucket: bucketLabel() }\">\n <main class=\"tile-config\">\n <section class=\"picker\">\n <mat-form-field>\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"selectedType\" (ngModelChange)=\"typeSelected($event)\">\n @for (t of types() || []; track t.id; let i = $index) {\n <mat-option [value]=\"t.data\">{{ getTypeLabel(t.id) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedType) {\n <button ymtButton=\"secondary\" (click)=\"resetConfig()\">{{ 'yuv.tile-config.button.reset' | translate }}</button>\n }\n </section>\n\n <section class=\"details\">\n @if (selectedType) {\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile\n [disableIconSlot]=\"true\"\n [objectConfig]=\"objectConfig!\"\n [bucket]=\"bucket()\"\n (slotSelect)=\"slotSelect($event)\"\n />\n </div>\n @if (
|
|
1818
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<yuv-dialog [headertitle]=\"'yuv.tile-config.title' | translate: { bucket: bucketLabel() }\">\n <main class=\"tile-config\">\n <section class=\"picker\">\n <mat-form-field>\n <mat-select [panelWidth]=\"null\" [(ngModel)]=\"selectedType\" (ngModelChange)=\"typeSelected($event)\">\n @for (t of types() || []; track t.id; let i = $index) {\n <mat-option [value]=\"t.data\">{{ getTypeLabel(t.id) }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (selectedType) {\n <button ymtButton=\"secondary\" (click)=\"resetConfig()\">{{ 'yuv.tile-config.button.reset' | translate }}</button>\n }\n </section>\n\n <section class=\"details\">\n @if (selectedType) {\n <div class=\"dummy-preview\">\n <yuv-tile-config-tile\n [disableIconSlot]=\"true\"\n [objectConfig]=\"objectConfig!\"\n [bucket]=\"bucket()\"\n (slotSelect)=\"slotSelect($event)\"\n />\n </div>\n @if (titleMissing) {\n <section class=\"config-error\">\n {{ 'yuv.tile-config.error.title-required' | translate }} ({{ titleMissingTypeLabels }})\n </section>\n }\n\n <main>\n @if (selectedSlot === 'icon') {\n <h3>{{ 'yuv.tile-config.slot.icon.headline' | translate }}</h3>\n <yuv-icon-select [objectType]=\"selectedType\" (iconSelect)=\"iconSelected($event)\" />\n } @else if (selectedSlot === 'badges') {\n <h3>{{ 'yuv.tile-config.slot.badges.headline' | translate }}</h3>\n <yuv-tile-badge-select\n [selectedBadgeIds]=\"getSelectedBadges()\"\n [bucket]=\"bucket()\"\n (badgeSelect)=\"badgeSelected($event)\"\n />\n } @else if (!selectedSlot) {\n } @else if (selectedSlot === 'actions') {\n <h3>{{ 'yuv.tile-config.slot.action.headline' | translate }}</h3>\n <yuv-tile-action-select\n [objectType]=\"selectedType\"\n [selectedActionIds]=\"getSelectedActions()\"\n (actionSelect)=\"actionSelected($event)\"\n />\n } @else {\n <h3>{{ 'yuv.tile-config.slot.property.headline' | translate }}</h3>\n <yuv-tile-property-select\n [objectType]=\"selectedType\"\n [excludeProperties]=\"excludeProperties()\"\n [selectedProperty]=\"getConfigProperty(selectedSlot)\"\n [allowRemove]=\"selectedSlot !== 'title'\"\n (propertySelect)=\"propertySelected(selectedSlot, $event)\"\n />\n }\n </main>\n } @else {\n <div class=\"placeholder empty\"></div>\n }\n </section>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" (click)=\"cancelConfig()\">{{ 'yuv.tile-config.button.close' | translate }}</button>\n <button ymtButton=\"primary\" [disabled]=\"!configChanged || titleMissing\" (click)=\"saveConfig()\">\n {{ 'yuv.tile-config.button.save' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:flex;height:100%;flex-flow:column}:host main.tile-config{height:100%;display:contents}:host .picker{display:flex;justify-content:space-between;gap:var(--ymt-spacing-m);align-items:center;border-bottom:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m)}:host .details{flex:1;display:flex;flex-flow:column;box-sizing:border-box;overflow:hidden}:host .details header{flex:0 0 auto;display:flex;align-items:center;border-bottom:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-m);gap:var(--ymt-spacing-m)}:host .details header h2{flex:1;overflow:hidden;text-overflow:ellipsis;margin:0}:host .details .dummy-preview{flex:0 0 auto;padding:var(--ymt-spacing-m);background-color:var(--ymt-surface-panel);border-bottom:1px solid var(--ymt-outline-variant)}:host .details .dummy-preview yuv-tile-config-tile{max-width:500px;margin:auto;border-radius:var(--ymt-corner-m);border:1px solid var(--ymt-outline);background-color:var(--ymt-surface-container)}:host .details main{flex:1;overflow-y:auto;padding:var(--ymt-spacing-m)}:host .details main h3{margin:0;padding-block-end:var(--ymt-spacing-m);font:var(--ymt-font-subhead)}:host .details .config-error{flex:0 0 auto;padding:var(--ymt-spacing-m);background-color:var(--ymt-danger-container);color:var(--ymt-on-danger-container);border-bottom:1px solid var(--ymt-outline-variant)}:host .details .placeholder.empty{height:100%;display:grid;place-content:center;color:var(--ymt-text-color-subtle)}\n"] }]
|
|
1825
1819
|
}], propDecorators: { bucket: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucket", required: false }] }], bucketLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bucketLabel", required: false }] }], configTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "configTypes", required: false }] }], configFlavors: [{ type: i0.Input, args: [{ isSignal: true, alias: "configFlavors", required: false }] }], excludeProperties: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludeProperties", required: false }] }], save: [{ type: i0.Output, args: ["save"] }], canceled: [{ type: i0.Output, args: ["canceled"] }] } });
|
|
1826
1820
|
|
|
1827
1821
|
class TileConfigTriggerComponent {
|