@processpuzzle/base-entity 0.8.1 → 0.8.2
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.
|
@@ -2,23 +2,23 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, input, computed, Component, effect, InjectionToken, Inject, Directive, Injector, signal, Injectable, HostBinding, EventEmitter, Output, ViewChild, DestroyRef, untracked, runInInjectionContext } from '@angular/core';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
|
-
import { CommonModule, NgClass, NgStyle,
|
|
5
|
+
import { CommonModule, NgClass, NgStyle, NgTemplateOutlet, SlicePipe } from '@angular/common';
|
|
6
6
|
import { NavigationEnd, Router, ActivatedRoute, RouterOutlet, ROUTER_OUTLET_DATA } from '@angular/router';
|
|
7
7
|
import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs';
|
|
8
8
|
import * as i2 from '@angular/material/toolbar';
|
|
9
9
|
import { MatToolbarModule, MatToolbar } from '@angular/material/toolbar';
|
|
10
10
|
import { MatIcon } from '@angular/material/icon';
|
|
11
11
|
import { MatButton, MatIconButton } from '@angular/material/button';
|
|
12
|
-
import * as
|
|
13
|
-
import { MatFormField, MatSuffix, MatFormFieldModule,
|
|
14
|
-
import * as
|
|
12
|
+
import * as i2$1 from '@angular/material/form-field';
|
|
13
|
+
import { MatFormField, MatLabel, MatSuffix, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
14
|
+
import * as i3 from '@angular/material/input';
|
|
15
15
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
16
16
|
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
17
17
|
import { signalStore, withState, withMethods, patchState, withHooks, signalStoreFeature, withProps, withComputed } from '@ngrx/signals';
|
|
18
18
|
import { withDevtools } from '@angular-architects/ngrx-toolkit';
|
|
19
19
|
import { LayoutService, RUNTIME_CONFIGURATION } from '@processpuzzle/util';
|
|
20
20
|
import { __decorate, __param } from 'tslib';
|
|
21
|
-
import { map, filter, switchMap, from, of, firstValueFrom, pipe, tap } from 'rxjs';
|
|
21
|
+
import { map, filter, switchMap, Subject, from, of, firstValueFrom, pipe, tap } from 'rxjs';
|
|
22
22
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
23
23
|
import { buildUrl } from 'build-url-ts';
|
|
24
24
|
import * as i1$1 from '@angular/forms';
|
|
@@ -28,14 +28,14 @@ import { NGXLogger } from 'ngx-logging-kit';
|
|
|
28
28
|
import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
29
29
|
import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatDialog } from '@angular/material/dialog';
|
|
30
30
|
import { TranslocoService, provideTranslocoScope } from '@jsverse/transloco';
|
|
31
|
-
import * as
|
|
31
|
+
import * as i4 from '@angular/material/datepicker';
|
|
32
32
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
33
|
-
import * as i2$
|
|
33
|
+
import * as i2$2 from '@angular/material/select';
|
|
34
34
|
import { MatSelectModule } from '@angular/material/select';
|
|
35
35
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
36
36
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
37
37
|
import { MatChipGrid, MatChipRow, MatChipInput, MatChipRemove } from '@angular/material/chips';
|
|
38
|
-
import * as i2$
|
|
38
|
+
import * as i2$3 from '@angular/material/autocomplete';
|
|
39
39
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
40
40
|
import { MatTableDataSource, MatTable, MatHeaderCell, MatHeaderRow, MatRow, MatCell, MatColumnDef, MatHeaderCellDef, MatCellDef, MatHeaderRowDef, MatRowDef } from '@angular/material/table';
|
|
41
41
|
import { MatSort, MatSortHeader } from '@angular/material/sort';
|
|
@@ -103,9 +103,9 @@ const INITIAL_NAVIGATION_STATE = {
|
|
|
103
103
|
};
|
|
104
104
|
function snakeCaseName(entityName) {
|
|
105
105
|
return entityName
|
|
106
|
-
.replace(/\s+/g, '')
|
|
107
|
-
.
|
|
108
|
-
.
|
|
106
|
+
.replace(/\s+/g, '') // strip whitespace
|
|
107
|
+
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2') // "ITVariant" -> "IT-Variant"
|
|
108
|
+
.replace(/([a-z\d])([A-Z])/g, '$1-$2') // "DeviceType" -> "Device-Type"
|
|
109
109
|
.toLowerCase();
|
|
110
110
|
}
|
|
111
111
|
function payloadKey(payload) {
|
|
@@ -118,6 +118,12 @@ function setLast(target, key, payload) {
|
|
|
118
118
|
target.delete(key);
|
|
119
119
|
target.set(key, payload);
|
|
120
120
|
}
|
|
121
|
+
function levelUpUrl(currentUrl) {
|
|
122
|
+
return currentUrl.substring(0, currentUrl.lastIndexOf('/'));
|
|
123
|
+
}
|
|
124
|
+
function normalizeUrl(url) {
|
|
125
|
+
return url.startsWith('/') ? url : '/' + url;
|
|
126
|
+
}
|
|
121
127
|
function lastKeyOf(target) {
|
|
122
128
|
let last;
|
|
123
129
|
for (const key of target.keys())
|
|
@@ -162,12 +168,6 @@ const BaseFormNavigatorSingletonStore = signalStore({ providedIn: 'root' }, with
|
|
|
162
168
|
function determineCurrentUrl() {
|
|
163
169
|
return Reflect.get(route, '_routerState').snapshot.url;
|
|
164
170
|
}
|
|
165
|
-
function levelUpUrl(currentUrl) {
|
|
166
|
-
return currentUrl.substring(0, currentUrl.lastIndexOf('/'));
|
|
167
|
-
}
|
|
168
|
-
function normalizeUrl(url) {
|
|
169
|
-
return url.startsWith('/') ? url : '/' + url;
|
|
170
|
-
}
|
|
171
171
|
function isPendingNavigatorUrl(navigationEnd) {
|
|
172
172
|
if (!pendingNavigatorUrl) {
|
|
173
173
|
return false;
|
|
@@ -405,14 +405,32 @@ class BaseEntityToolbarComponent {
|
|
|
405
405
|
// endregion
|
|
406
406
|
// protected, private helper methods
|
|
407
407
|
RouteSegments = RouteSegments;
|
|
408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
409
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: BaseEntityToolbarComponent, isStandalone: true, selector: "base-entity-toolbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <div class=\"dense-3\" [ngStyle]=\"{'padding-top': '12px' }\">\n <mat-form-field>\n <mat-label [attr.for]=\"entityDescriptor().createTestId('filter-input')\">Filter</mat-label>\n <input #filterInput [id]=\"entityDescriptor().createTestId('filter-input')\" [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\" placeholder=\"Filter\">\n @if (filterInput.value) {\n <button [attr.data-testid]=\"entityDescriptor().createTestId('filter-clear')\" type=\"button\" mat-icon-button matSuffix aria-label=\"Clear filter\" (click)=\"onClearFilter(filterInput)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <span class=\"toolbar-spacer\"></span>\n @if(isSmallDevice()) {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button test-id=\"menu-button\" mat-button [matMenuTriggerFor]=\"beforeMenu\"><mat-icon>menu</mat-icon> Choose action</button>\n <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-menu-item [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-menu-item [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-menu-item [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </mat-menu>\n </div>\n } @else {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-button [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-button [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-button [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </div>\n }\n</mat-toolbar>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: 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: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }] });
|
|
410
410
|
}
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityToolbarComponent, decorators: [{
|
|
412
412
|
type: Component,
|
|
413
|
-
args: [{ selector: 'base-entity-toolbar', standalone: true, imports: [CommonModule, MatToolbarModule, MatIcon, MatFormField, MatInput, MatButton, MatIconButton, MatSuffix, MatMenu, MatMenuItem, MatMenuTrigger], template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <div class=\"dense-3\" [ngStyle]=\"{'padding-top': '12px' }\">\n <mat-form-field>\n <input #filterInput [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\" placeholder=\"Filter\">\n @if (filterInput.value) {\n <button [attr.data-testid]=\"entityDescriptor().createTestId('filter-clear')\" type=\"button\" mat-icon-button matSuffix aria-label=\"Clear filter\" (click)=\"onClearFilter(filterInput)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <span class=\"toolbar-spacer\"></span>\n @if(isSmallDevice()) {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button test-id=\"menu-button\" mat-button [matMenuTriggerFor]=\"beforeMenu\"><mat-icon>menu</mat-icon> Choose action</button>\n <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-menu-item [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-menu-item [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-menu-item [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </mat-menu>\n </div>\n } @else {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-button [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-button [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-button [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </div>\n }\n</mat-toolbar>\n" }]
|
|
413
|
+
args: [{ selector: 'base-entity-toolbar', standalone: true, imports: [CommonModule, MatToolbarModule, MatIcon, MatFormField, MatLabel, MatInput, MatButton, MatIconButton, MatSuffix, MatMenu, MatMenuItem, MatMenuTrigger], template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <div class=\"dense-3\" [ngStyle]=\"{'padding-top': '12px' }\">\n <mat-form-field>\n <mat-label [attr.for]=\"entityDescriptor().createTestId('filter-input')\">Filter</mat-label>\n <input #filterInput [id]=\"entityDescriptor().createTestId('filter-input')\" [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\" placeholder=\"Filter\">\n @if (filterInput.value) {\n <button [attr.data-testid]=\"entityDescriptor().createTestId('filter-clear')\" type=\"button\" mat-icon-button matSuffix aria-label=\"Clear filter\" (click)=\"onClearFilter(filterInput)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <span class=\"toolbar-spacer\"></span>\n @if(isSmallDevice()) {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button test-id=\"menu-button\" mat-button [matMenuTriggerFor]=\"beforeMenu\"><mat-icon>menu</mat-icon> Choose action</button>\n <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-menu-item [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-menu-item [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-menu-item [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </mat-menu>\n </div>\n } @else {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-button [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-button [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-button [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </div>\n }\n</mat-toolbar>\n" }]
|
|
414
414
|
}], propDecorators: { entityDescriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDescriptor", required: true }] }] } });
|
|
415
415
|
|
|
416
|
+
const INITIAL_STATE = {
|
|
417
|
+
entityName: undefined,
|
|
418
|
+
violations: [],
|
|
419
|
+
};
|
|
420
|
+
const RuleViolationsSingletonStore = signalStore({ providedIn: 'root' }, withState(INITIAL_STATE), withDevtools('Rule Violations'), withMethods((store) => ({
|
|
421
|
+
setViolations(entityName, violations) {
|
|
422
|
+
patchState(store, { entityName, violations });
|
|
423
|
+
},
|
|
424
|
+
clearViolations() {
|
|
425
|
+
patchState(store, INITIAL_STATE);
|
|
426
|
+
},
|
|
427
|
+
})), withComputed((store) => ({
|
|
428
|
+
errorCount: computed(() => store.violations().filter((v) => v.severity === 'ERROR').length),
|
|
429
|
+
warningCount: computed(() => store.violations().filter((v) => v.severity === 'WARNING').length),
|
|
430
|
+
infoCount: computed(() => store.violations().filter((v) => v.severity === 'INFO').length),
|
|
431
|
+
hasViolations: computed(() => store.violations().length > 0),
|
|
432
|
+
})));
|
|
433
|
+
|
|
416
434
|
class BaseEntityStatusbarComponent {
|
|
417
435
|
store;
|
|
418
436
|
entityDescriptor = input.required(/* @ts-ignore */
|
|
@@ -421,6 +439,12 @@ class BaseEntityStatusbarComponent {
|
|
|
421
439
|
...(ngDevMode ? [{ debugName: "entityTitle" }] : /* istanbul ignore next */ []));
|
|
422
440
|
isVisible = computed(() => this.store != null && (this.store.currentEntity() !== undefined || this.store.selectedEntities().length === 1), /* @ts-ignore */
|
|
423
441
|
...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
442
|
+
violationsStore = inject(RuleViolationsSingletonStore);
|
|
443
|
+
errorCount = this.violationsStore.errorCount;
|
|
444
|
+
warningCount = this.violationsStore.warningCount;
|
|
445
|
+
infoCount = this.violationsStore.infoCount;
|
|
446
|
+
showViolationSummary = computed(() => this.violationsStore.entityName() === this.entityDescriptor().entityName && this.violationsStore.hasViolations(), /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "showViolationSummary" }] : /* istanbul ignore next */ []));
|
|
424
448
|
// region Angular lifecycle hooks
|
|
425
449
|
ngOnInit() {
|
|
426
450
|
this.store = this.entityDescriptor().store;
|
|
@@ -432,29 +456,54 @@ class BaseEntityStatusbarComponent {
|
|
|
432
456
|
evaluateEntityTitle(title) {
|
|
433
457
|
return typeof title === 'function' ? title() : title;
|
|
434
458
|
}
|
|
435
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
436
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
459
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityStatusbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: BaseEntityStatusbarComponent, isStandalone: true, selector: "base-entity-statusbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
437
461
|
<mat-toolbar *ngIf="isVisible()">
|
|
438
462
|
<div>
|
|
439
463
|
<span>{{ entityTitle() }}</span>
|
|
440
464
|
</div>
|
|
465
|
+
<span class="statusbar-spacer"></span>
|
|
466
|
+
<div class="rule-summary" *ngIf="showViolationSummary()">
|
|
467
|
+
<span class="chip severity-error" *ngIf="errorCount() > 0">
|
|
468
|
+
<mat-icon>error</mat-icon>
|
|
469
|
+
<span>{{ errorCount() }}</span>
|
|
470
|
+
</span>
|
|
471
|
+
<span class="chip severity-warning" *ngIf="warningCount() > 0">
|
|
472
|
+
<mat-icon>warning</mat-icon>
|
|
473
|
+
<span>{{ warningCount() }}</span>
|
|
474
|
+
</span>
|
|
475
|
+
<span class="chip severity-info" *ngIf="infoCount() > 0">
|
|
476
|
+
<mat-icon>info</mat-icon>
|
|
477
|
+
<span>{{ infoCount() }}</span>
|
|
478
|
+
</span>
|
|
479
|
+
</div>
|
|
441
480
|
</mat-toolbar>
|
|
442
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] });
|
|
481
|
+
`, isInline: true, styles: [".statusbar-spacer{flex:1 1 auto}.rule-summary{display:flex;align-items:center;gap:8px}.chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:12px;font-size:13px;line-height:1}.chip mat-icon{width:16px;height:16px;font-size:16px;line-height:16px}.chip.severity-error{background-color:#d32f2f26;color:#b71c1c}.chip.severity-warning{background-color:#f57c0026;color:#b26a00}.chip.severity-info{background-color:#1976d226;color:#0d47a1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
443
482
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityStatusbarComponent, decorators: [{
|
|
445
484
|
type: Component,
|
|
446
|
-
args: [{
|
|
447
|
-
selector: 'base-entity-statusbar',
|
|
448
|
-
standalone: true,
|
|
449
|
-
imports: [CommonModule, MatToolbar],
|
|
450
|
-
template: `
|
|
485
|
+
args: [{ selector: 'base-entity-statusbar', standalone: true, imports: [CommonModule, MatToolbar, MatIcon], template: `
|
|
451
486
|
<mat-toolbar *ngIf="isVisible()">
|
|
452
487
|
<div>
|
|
453
488
|
<span>{{ entityTitle() }}</span>
|
|
454
489
|
</div>
|
|
490
|
+
<span class="statusbar-spacer"></span>
|
|
491
|
+
<div class="rule-summary" *ngIf="showViolationSummary()">
|
|
492
|
+
<span class="chip severity-error" *ngIf="errorCount() > 0">
|
|
493
|
+
<mat-icon>error</mat-icon>
|
|
494
|
+
<span>{{ errorCount() }}</span>
|
|
495
|
+
</span>
|
|
496
|
+
<span class="chip severity-warning" *ngIf="warningCount() > 0">
|
|
497
|
+
<mat-icon>warning</mat-icon>
|
|
498
|
+
<span>{{ warningCount() }}</span>
|
|
499
|
+
</span>
|
|
500
|
+
<span class="chip severity-info" *ngIf="infoCount() > 0">
|
|
501
|
+
<mat-icon>info</mat-icon>
|
|
502
|
+
<span>{{ infoCount() }}</span>
|
|
503
|
+
</span>
|
|
504
|
+
</div>
|
|
455
505
|
</mat-toolbar>
|
|
456
|
-
`,
|
|
457
|
-
}]
|
|
506
|
+
`, styles: [".statusbar-spacer{flex:1 1 auto}.rule-summary{display:flex;align-items:center;gap:8px}.chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:12px;font-size:13px;line-height:1}.chip mat-icon{width:16px;height:16px;font-size:16px;line-height:16px}.chip.severity-error{background-color:#d32f2f26;color:#b71c1c}.chip.severity-warning{background-color:#f57c0026;color:#b26a00}.chip.severity-info{background-color:#1976d226;color:#0d47a1}\n"] }]
|
|
458
507
|
}], propDecorators: { entityDescriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDescriptor", required: true }] }] } });
|
|
459
508
|
|
|
460
509
|
class BaseEntityTabsComponent {
|
|
@@ -507,8 +556,8 @@ class BaseEntityTabsComponent {
|
|
|
507
556
|
}
|
|
508
557
|
});
|
|
509
558
|
}
|
|
510
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
511
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
559
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
560
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: BaseEntityTabsComponent, isStandalone: true, selector: "base-entity-tabs", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
512
561
|
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
|
|
513
562
|
<a mat-tab-link [attr.data-testid]="entityDescriptor().createTestId('show-list')" (click)="onShowList()" [active]="store.currentTab() === listTabName()">{{ listTabName() }}</a>
|
|
514
563
|
<a
|
|
@@ -528,7 +577,7 @@ class BaseEntityTabsComponent {
|
|
|
528
577
|
</mat-tab-nav-panel>
|
|
529
578
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "component", type: MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: BaseEntityToolbarComponent, selector: "base-entity-toolbar", inputs: ["entityDescriptor"] }, { kind: "component", type: BaseEntityStatusbarComponent, selector: "base-entity-statusbar", inputs: ["entityDescriptor"] }] });
|
|
530
579
|
}
|
|
531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityTabsComponent, decorators: [{
|
|
532
581
|
type: Component,
|
|
533
582
|
args: [{
|
|
534
583
|
selector: 'base-entity-tabs',
|
|
@@ -581,6 +630,7 @@ class BaseEntityContainerComponent {
|
|
|
581
630
|
...(ngDevMode ? [{ debugName: "resolvedDescriptor" }] : /* istanbul ignore next */ []));
|
|
582
631
|
constructor() {
|
|
583
632
|
this.registerEffects();
|
|
633
|
+
this.registerFacadeDescriptorMerge();
|
|
584
634
|
}
|
|
585
635
|
// region Angular lifecycle hooks
|
|
586
636
|
ngOnDestroy() {
|
|
@@ -599,15 +649,28 @@ class BaseEntityContainerComponent {
|
|
|
599
649
|
}
|
|
600
650
|
});
|
|
601
651
|
}
|
|
602
|
-
|
|
603
|
-
|
|
652
|
+
registerFacadeDescriptorMerge() {
|
|
653
|
+
effect(() => {
|
|
654
|
+
const facade = this.activeFacade();
|
|
655
|
+
const input = this.entityDescriptor();
|
|
656
|
+
if (!facade || !input)
|
|
657
|
+
return;
|
|
658
|
+
const facadeDescriptor = facade.descriptor;
|
|
659
|
+
if (input.entityTitle)
|
|
660
|
+
facadeDescriptor.entityTitle = input.entityTitle;
|
|
661
|
+
if (input.extraFormActionsTemplate)
|
|
662
|
+
facadeDescriptor.extraFormActionsTemplate = input.extraFormActionsTemplate;
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
666
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: BaseEntityContainerComponent, isStandalone: true, selector: "base-entity-container", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: false, transformFunction: null }, facade: { classPropertyName: "facade", publicName: "facade", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
604
667
|
<ng-content></ng-content>
|
|
605
668
|
<div>
|
|
606
669
|
<base-entity-tabs [entityDescriptor]="resolvedDescriptor()"></base-entity-tabs>
|
|
607
670
|
</div>
|
|
608
671
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BaseEntityTabsComponent, selector: "base-entity-tabs", inputs: ["entityDescriptor"] }] });
|
|
609
672
|
}
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityContainerComponent, decorators: [{
|
|
611
674
|
type: Component,
|
|
612
675
|
args: [{
|
|
613
676
|
selector: 'base-entity-container',
|
|
@@ -639,6 +702,70 @@ function assertPersistedEntity(entity) {
|
|
|
639
702
|
throw new Error('Persisted entity must have an id');
|
|
640
703
|
}
|
|
641
704
|
|
|
705
|
+
function isFilterGroup(node) {
|
|
706
|
+
return node.conditions !== undefined;
|
|
707
|
+
}
|
|
708
|
+
var OrderByDirection;
|
|
709
|
+
(function (OrderByDirection) {
|
|
710
|
+
OrderByDirection["ASC"] = "asc";
|
|
711
|
+
OrderByDirection["DESC"] = "desc";
|
|
712
|
+
})(OrderByDirection || (OrderByDirection = {}));
|
|
713
|
+
|
|
714
|
+
const OP_MAP = {
|
|
715
|
+
'==': '==',
|
|
716
|
+
'!=': '!=',
|
|
717
|
+
'<': '=lt=',
|
|
718
|
+
'<=': '=le=',
|
|
719
|
+
'>': '=gt=',
|
|
720
|
+
'>=': '=ge=',
|
|
721
|
+
in: '=in=',
|
|
722
|
+
'not-in': '=out=',
|
|
723
|
+
'array-contains': '=in=',
|
|
724
|
+
'array-contains-any': '=in=',
|
|
725
|
+
};
|
|
726
|
+
function toRsql(input) {
|
|
727
|
+
if (Array.isArray(input)) {
|
|
728
|
+
return input.map(conditionToRsql).join(';');
|
|
729
|
+
}
|
|
730
|
+
return groupToRsql(input);
|
|
731
|
+
}
|
|
732
|
+
function groupToRsql(group) {
|
|
733
|
+
const separator = group.operator === 'OR' ? ',' : ';';
|
|
734
|
+
const parts = group.conditions.map((node) => (isFilterGroup(node) ? `(${groupToRsql(node)})` : conditionToRsql(node)));
|
|
735
|
+
return parts.join(separator);
|
|
736
|
+
}
|
|
737
|
+
function conditionToRsql(condition) {
|
|
738
|
+
const rsqlOp = mapOperator(condition.operator);
|
|
739
|
+
return `${condition.property}${rsqlOp}${encodeValue(condition.value, condition.operator)}`;
|
|
740
|
+
}
|
|
741
|
+
function mapOperator(operator) {
|
|
742
|
+
const mapped = OP_MAP[operator];
|
|
743
|
+
if (!mapped)
|
|
744
|
+
throw new Error(`Unsupported filter operator for RSQL translation: ${operator}`);
|
|
745
|
+
return mapped;
|
|
746
|
+
}
|
|
747
|
+
function encodeValue(value, operator) {
|
|
748
|
+
if (operator === 'in' || operator === 'not-in' || operator === 'array-contains-any') {
|
|
749
|
+
const items = Array.isArray(value) ? value : [value];
|
|
750
|
+
return `(${items.map(encodeScalar).join(',')})`;
|
|
751
|
+
}
|
|
752
|
+
if (operator === 'array-contains') {
|
|
753
|
+
return `(${encodeScalar(value)})`;
|
|
754
|
+
}
|
|
755
|
+
return encodeScalar(value);
|
|
756
|
+
}
|
|
757
|
+
function encodeScalar(value) {
|
|
758
|
+
if (value === null || value === undefined)
|
|
759
|
+
return 'null';
|
|
760
|
+
if (typeof value === 'number' || typeof value === 'boolean')
|
|
761
|
+
return String(value);
|
|
762
|
+
const asString = String(value);
|
|
763
|
+
if (/[\s,;()"'=<>!]/.test(asString)) {
|
|
764
|
+
return `"${asString.replace(/"/g, '\\"')}"`;
|
|
765
|
+
}
|
|
766
|
+
return asString;
|
|
767
|
+
}
|
|
768
|
+
|
|
642
769
|
let BaseEntityRestService = class BaseEntityRestService {
|
|
643
770
|
entityMapper;
|
|
644
771
|
urlProperty;
|
|
@@ -725,9 +852,9 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
725
852
|
const queryParams = new Map();
|
|
726
853
|
if (queryCondition.page)
|
|
727
854
|
queryParams.set('page', queryCondition.page.toString());
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
855
|
+
const rsql = this.buildRsql(queryCondition);
|
|
856
|
+
if (rsql)
|
|
857
|
+
queryParams.set('filter', rsql);
|
|
731
858
|
let params = {};
|
|
732
859
|
if (queryParams.size > 0) {
|
|
733
860
|
for (const [key, value] of queryParams) {
|
|
@@ -749,6 +876,13 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
749
876
|
};
|
|
750
877
|
return buildUrl(this.baseUrl, urlOptions);
|
|
751
878
|
}
|
|
879
|
+
buildRsql(queryCondition) {
|
|
880
|
+
if (queryCondition.filterGroup)
|
|
881
|
+
return toRsql(queryCondition.filterGroup);
|
|
882
|
+
if (queryCondition.filters?.length)
|
|
883
|
+
return toRsql(queryCondition.filters);
|
|
884
|
+
return undefined;
|
|
885
|
+
}
|
|
752
886
|
mapPagedResponse(response) {
|
|
753
887
|
const pages = response;
|
|
754
888
|
const subjectPage = pages[0];
|
|
@@ -796,6 +930,7 @@ class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
|
|
|
796
930
|
lines;
|
|
797
931
|
options;
|
|
798
932
|
required = false;
|
|
933
|
+
referenceIdField = 'id';
|
|
799
934
|
_label;
|
|
800
935
|
_linkedEntityType;
|
|
801
936
|
constructor(attrName, formControlType, label, selectables, isLinkToDetails, options) {
|
|
@@ -805,6 +940,11 @@ class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
|
|
|
805
940
|
this.isLinkToDetails = isLinkToDetails;
|
|
806
941
|
this.options = { inputType: 'text', ...options };
|
|
807
942
|
}
|
|
943
|
+
getSelectables() {
|
|
944
|
+
if (this.selectables === undefined)
|
|
945
|
+
return undefined;
|
|
946
|
+
return typeof this.selectables === 'function' ? this.selectables() : this.selectables;
|
|
947
|
+
}
|
|
808
948
|
// region properties
|
|
809
949
|
get label() {
|
|
810
950
|
return this._label ? this._label : this.attrName;
|
|
@@ -825,10 +965,10 @@ class BaseFormHostDirective {
|
|
|
825
965
|
constructor(viewContainerRef) {
|
|
826
966
|
this.viewContainerRef = viewContainerRef;
|
|
827
967
|
}
|
|
828
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
829
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
968
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
969
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: BaseFormHostDirective, isStandalone: true, selector: "[baseFormHost]", ngImport: i0 });
|
|
830
970
|
}
|
|
831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormHostDirective, decorators: [{
|
|
832
972
|
type: Directive,
|
|
833
973
|
args: [{
|
|
834
974
|
standalone: true,
|
|
@@ -907,7 +1047,7 @@ class EntityRegistryComponent {
|
|
|
907
1047
|
labelClass: attr.labelClass,
|
|
908
1048
|
format: attr.format,
|
|
909
1049
|
isLinkToDetails: attr.isLinkToDetails,
|
|
910
|
-
selectables: attr.
|
|
1050
|
+
selectables: attr.getSelectables(),
|
|
911
1051
|
visible: attr.visible,
|
|
912
1052
|
hideInTable: attr.hideInTable,
|
|
913
1053
|
isHeading: attr.isHeading,
|
|
@@ -919,10 +1059,10 @@ class EntityRegistryComponent {
|
|
|
919
1059
|
}),
|
|
920
1060
|
};
|
|
921
1061
|
}
|
|
922
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
923
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1062
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityRegistryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1063
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: EntityRegistryComponent, isStandalone: true, selector: "pp-entity-registry", ngImport: i0, template: ` <pre>{{ registryJson() }}</pre> `, isInline: true });
|
|
924
1064
|
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityRegistryComponent, decorators: [{
|
|
926
1066
|
type: Component,
|
|
927
1067
|
args: [{
|
|
928
1068
|
selector: 'pp-entity-registry',
|
|
@@ -947,12 +1087,12 @@ class BaseEntityDescriptorRegistry {
|
|
|
947
1087
|
const facadeToken = this.registry[entityName];
|
|
948
1088
|
if (!facadeToken)
|
|
949
1089
|
return undefined;
|
|
950
|
-
return this.injector.get(facadeToken, undefined
|
|
1090
|
+
return this.injector.get(facadeToken, null, { optional: true }) ?? undefined;
|
|
951
1091
|
}
|
|
952
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
953
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityDescriptorRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1093
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityDescriptorRegistry, providedIn: 'root' });
|
|
954
1094
|
}
|
|
955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityDescriptorRegistry, decorators: [{
|
|
956
1096
|
type: Injectable,
|
|
957
1097
|
args: [{ providedIn: 'root' }]
|
|
958
1098
|
}] });
|
|
@@ -1008,13 +1148,21 @@ class BaseFormControlComponent {
|
|
|
1008
1148
|
return null;
|
|
1009
1149
|
return createTestId(entityName, attrName);
|
|
1010
1150
|
}
|
|
1151
|
+
get hostStyle() {
|
|
1152
|
+
const s = this.config()?.style;
|
|
1153
|
+
if (!s)
|
|
1154
|
+
return null;
|
|
1155
|
+
return Object.entries(s)
|
|
1156
|
+
.map(([k, v]) => `${k}:${v}`)
|
|
1157
|
+
.join(';');
|
|
1158
|
+
}
|
|
1011
1159
|
logger = inject(NGXLogger);
|
|
1012
1160
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
1013
1161
|
descriptorRegistry = inject(BaseEntityDescriptorRegistry);
|
|
1014
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1015
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
1162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1163
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: BaseFormControlComponent, isStandalone: true, selector: "ng-component", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityName: { classPropertyName: "entityName", publicName: "entityName", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-testid": "this.testId", "attr.style": "this.hostStyle" } }, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1016
1164
|
}
|
|
1017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseFormControlComponent, decorators: [{
|
|
1018
1166
|
type: Component,
|
|
1019
1167
|
args: [{
|
|
1020
1168
|
standalone: true,
|
|
@@ -1024,6 +1172,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1024
1172
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: true }] }], entityName: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityName", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], testId: [{
|
|
1025
1173
|
type: HostBinding,
|
|
1026
1174
|
args: ['attr.data-testid']
|
|
1175
|
+
}], hostStyle: [{
|
|
1176
|
+
type: HostBinding,
|
|
1177
|
+
args: ['attr.style']
|
|
1027
1178
|
}] } });
|
|
1028
1179
|
|
|
1029
1180
|
class ObjectStoreService {
|
|
@@ -1067,10 +1218,10 @@ class ObjectStoreService {
|
|
|
1067
1218
|
const baseConfiguration = Reflect.get(this.runtimeConfiguration, 'BASE_CONFIGURATION');
|
|
1068
1219
|
return Reflect.get(baseConfiguration, 'OBJECT_STORE_SERVICE_ROOT') ?? Reflect.get(baseConfiguration, 'BACKEND_SERVICE_ROOT') ?? '';
|
|
1069
1220
|
}
|
|
1070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1071
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
1221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ObjectStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1222
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ObjectStoreService, providedIn: 'root' });
|
|
1072
1223
|
}
|
|
1073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ObjectStoreService, decorators: [{
|
|
1074
1225
|
type: Injectable,
|
|
1075
1226
|
args: [{ providedIn: 'root' }]
|
|
1076
1227
|
}] });
|
|
@@ -1139,8 +1290,8 @@ class ArtifactSelectorComponent {
|
|
|
1139
1290
|
};
|
|
1140
1291
|
return mimeTypeByExtension[extension] ?? 'application/octet-stream';
|
|
1141
1292
|
}
|
|
1142
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1143
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ArtifactSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1294
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ArtifactSelectorComponent, isStandalone: true, selector: "app-artifact-selector", outputs: { artifactUploaded: "artifactUploaded" }, ngImport: i0, template: `
|
|
1144
1295
|
<div class="artifact-selector">
|
|
1145
1296
|
@if (!isSelectorVisible) {
|
|
1146
1297
|
<button type="button" (click)="showSelector()">Upload file</button>
|
|
@@ -1172,7 +1323,7 @@ class ArtifactSelectorComponent {
|
|
|
1172
1323
|
</div>
|
|
1173
1324
|
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1174
1325
|
}
|
|
1175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ArtifactSelectorComponent, decorators: [{
|
|
1176
1327
|
type: Component,
|
|
1177
1328
|
args: [{ selector: 'app-artifact-selector', standalone: true, imports: [FormsModule], template: `
|
|
1178
1329
|
<div class="artifact-selector">
|
|
@@ -1215,8 +1366,8 @@ class DeleteArtifactConfirmationDialog {
|
|
|
1215
1366
|
t(key, params) {
|
|
1216
1367
|
return this.translocoService.translate(key, params);
|
|
1217
1368
|
}
|
|
1218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1219
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DeleteArtifactConfirmationDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1370
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: DeleteArtifactConfirmationDialog, isStandalone: true, selector: "app-delete-artifact-confirmation-dialog", providers: [provideTranslocoScope('base-entity')], ngImport: i0, template: `
|
|
1220
1371
|
<h2 mat-dialog-title>{{ t(data.titleKey) }}</h2>
|
|
1221
1372
|
<mat-dialog-content>{{ t(data.contentKey, data.contentParams) }}</mat-dialog-content>
|
|
1222
1373
|
<mat-dialog-actions align="end">
|
|
@@ -1225,7 +1376,7 @@ class DeleteArtifactConfirmationDialog {
|
|
|
1225
1376
|
</mat-dialog-actions>
|
|
1226
1377
|
`, isInline: true, dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
|
|
1227
1378
|
}
|
|
1228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1379
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DeleteArtifactConfirmationDialog, decorators: [{
|
|
1229
1380
|
type: Component,
|
|
1230
1381
|
args: [{
|
|
1231
1382
|
selector: 'app-delete-artifact-confirmation-dialog',
|
|
@@ -1297,8 +1448,8 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
1297
1448
|
control?.markAsDirty();
|
|
1298
1449
|
control?.markAsTouched();
|
|
1299
1450
|
}
|
|
1300
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1451
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ArtifactComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1452
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ArtifactComponent, isStandalone: true, selector: "app-artifact", usesInheritance: true, ngImport: i0, template: `
|
|
1302
1453
|
@if (config().visible) {
|
|
1303
1454
|
@if (config().isHeading) {
|
|
1304
1455
|
<h3 [id]="config().attrName">{{ value() }}</h3>
|
|
@@ -1325,9 +1476,9 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
1325
1476
|
</div>
|
|
1326
1477
|
}
|
|
1327
1478
|
}
|
|
1328
|
-
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ArtifactSelectorComponent, selector: "app-artifact-selector", outputs: ["artifactUploaded"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1479
|
+
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ArtifactSelectorComponent, selector: "app-artifact-selector", outputs: ["artifactUploaded"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1329
1480
|
}
|
|
1330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ArtifactComponent, decorators: [{
|
|
1331
1482
|
type: Component,
|
|
1332
1483
|
args: [{ selector: 'app-artifact', standalone: true, imports: [FormsModule, ReactiveFormsModule, NgClass, NgStyle, ArtifactSelectorComponent, MatIconButton, MatIcon], template: `
|
|
1333
1484
|
@if (config().visible) {
|
|
@@ -1356,25 +1507,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1356
1507
|
</div>
|
|
1357
1508
|
}
|
|
1358
1509
|
}
|
|
1359
|
-
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
1510
|
+
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"] }]
|
|
1360
1511
|
}] });
|
|
1361
1512
|
|
|
1362
1513
|
class LabelComponent extends BaseFormControlComponent {
|
|
1363
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1514
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LabelComponent, isStandalone: true, selector: "base-label", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n @if (config().isHeading) {\n <h3 [id]=\"config().attrName\">{{ value() }}</h3>\n } @else {\n <p [id]=\"config().attrName\" [ngStyle]=\"config().style\">{{ value() }}</p>\n }\n}\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1365
1516
|
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LabelComponent, decorators: [{
|
|
1367
1518
|
type: Component,
|
|
1368
|
-
args: [{ selector: 'base-label', standalone: true, imports: [
|
|
1519
|
+
args: [{ selector: 'base-label', standalone: true, imports: [NgStyle], template: "@if (config().visible) {\n @if (config().isHeading) {\n <h3 [id]=\"config().attrName\">{{ value() }}</h3>\n } @else {\n <p [id]=\"config().attrName\" [ngStyle]=\"config().style\">{{ value() }}</p>\n }\n}\n" }]
|
|
1369
1520
|
}] });
|
|
1370
1521
|
|
|
1371
1522
|
class DatepickerComponent extends BaseFormControlComponent {
|
|
1372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1373
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1523
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1524
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DatepickerComponent, isStandalone: true, selector: "base-datepicker", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div class=\"row\" style=\"margin-bottom: 10px\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <input matInput [id]=\"config().attrName\" [matDatepicker]=\"picker\" formControlName=\"{{ config().attrName }}\" />\n <mat-hint>MM-DD-YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1374
1525
|
}
|
|
1375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
1376
1527
|
type: Component,
|
|
1377
|
-
args: [{ selector: 'base-datepicker', standalone: true, imports: [CommonModule, FormsModule, MatFormFieldModule, MatInputModule, MatDatepickerModule, ReactiveFormsModule], template: "
|
|
1528
|
+
args: [{ selector: 'base-datepicker', standalone: true, imports: [CommonModule, FormsModule, MatFormFieldModule, MatInputModule, MatDatepickerModule, ReactiveFormsModule], template: "@if (config().visible) {\n <div class=\"row\" style=\"margin-bottom: 10px\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <input matInput [id]=\"config().attrName\" [matDatepicker]=\"picker\" formControlName=\"{{ config().attrName }}\" />\n <mat-hint>MM-DD-YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n" }]
|
|
1378
1529
|
}] });
|
|
1379
1530
|
|
|
1380
1531
|
var NavigatorCommand;
|
|
@@ -1430,7 +1581,9 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
1430
1581
|
}
|
|
1431
1582
|
const attrName = this.linkedEntityDescriptor()?.componentIdentification() ?? '';
|
|
1432
1583
|
const componentName = attrName ? relatedEntity[attrName] : undefined;
|
|
1433
|
-
|
|
1584
|
+
if (componentName == null || typeof componentName === 'object')
|
|
1585
|
+
return relatedEntity.id;
|
|
1586
|
+
return String(componentName);
|
|
1434
1587
|
}
|
|
1435
1588
|
addSelectedComponentFromNavigatorResponse() {
|
|
1436
1589
|
if (this.config().disabled) {
|
|
@@ -1479,8 +1632,8 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
1479
1632
|
}
|
|
1480
1633
|
return undefined;
|
|
1481
1634
|
}
|
|
1482
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1483
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1635
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ForeignKeyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1636
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ForeignKeyComponent, isStandalone: true, selector: "base-foreign-key", usesInheritance: true, ngImport: i0, template: `
|
|
1484
1637
|
@if (config().visible) {
|
|
1485
1638
|
<div class="row" [formGroup]="formGroup" (focusin)="hasFocus.set(true)" (focusout)="onFocusOut($event)">
|
|
1486
1639
|
<div class="foreign-key-control">
|
|
@@ -1507,7 +1660,7 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
1507
1660
|
}
|
|
1508
1661
|
`, isInline: true, styles: [".foreign-key-control{display:inline-flex;flex-direction:column;align-items:stretch}.foreign-key-field{width:100%}.foreign-key-select-row{display:flex;min-height:28px;margin-top:-18px;padding:0 12px 0 16px;justify-content:flex-start}.foreign-key-select-button{height:28px;min-width:max-content;padding:0 8px;line-height:28px;white-space:nowrap}.foreign-key-select-button mat-icon{width:18px;height:18px;margin-right:4px;font-size:18px;line-height:18px}:host .foreign-key-field .mdc-notched-outline,:host .foreign-key-field .mdc-notched-outline *{pointer-events:none}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1509
1662
|
}
|
|
1510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ForeignKeyComponent, decorators: [{
|
|
1511
1664
|
type: Component,
|
|
1512
1665
|
args: [{ selector: 'base-foreign-key', standalone: true, template: `
|
|
1513
1666
|
@if (config().visible) {
|
|
@@ -1538,48 +1691,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1538
1691
|
}] });
|
|
1539
1692
|
|
|
1540
1693
|
class TextboxComponent extends BaseFormControlComponent {
|
|
1541
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1542
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1694
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TextboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1695
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TextboxComponent, isStandalone: true, selector: "base-textbox", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <input matInput [id]=\"config().attrName\" formControlName=\"{{ config().attrName }}\" />\n </mat-form-field>\n </div>\n}\n", styles: [":host{display:block}mat-form-field{width:100%}\n"], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1543
1696
|
}
|
|
1544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
1545
1698
|
type: Component,
|
|
1546
|
-
args: [{ selector: 'base-textbox', standalone: true, imports: [
|
|
1699
|
+
args: [{ selector: 'base-textbox', standalone: true, imports: [MatFormField, MatInput, MatLabel, FormsModule, ReactiveFormsModule], template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <input matInput [id]=\"config().attrName\" formControlName=\"{{ config().attrName }}\" />\n </mat-form-field>\n </div>\n}\n", styles: [":host{display:block}mat-form-field{width:100%}\n"] }]
|
|
1547
1700
|
}] });
|
|
1548
1701
|
|
|
1549
1702
|
class DropdownComponent extends BaseFormControlComponent {
|
|
1550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1551
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1703
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1704
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: DropdownComponent, isStandalone: true, selector: "base-dropdown", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{ config().label }}</mat-label>\n <mat-select formControlName=\"{{ config().attrName }}\">\n @for (option of config().getSelectables(); track option.value) {\n <mat-option [value]=\"option.value\">{{ option.value }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$2.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$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
|
|
1552
1705
|
}
|
|
1553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1554
1707
|
type: Component,
|
|
1555
|
-
args: [{ selector: 'base-dropdown', standalone: true, imports: [
|
|
1708
|
+
args: [{ selector: 'base-dropdown', standalone: true, imports: [ReactiveFormsModule, MatLabel, MatFormField, MatSelectModule], template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{ config().label }}</mat-label>\n <mat-select formControlName=\"{{ config().attrName }}\">\n @for (option of config().getSelectables(); track option.value) {\n <mat-option [value]=\"option.value\">{{ option.value }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n}\n" }]
|
|
1556
1709
|
}] });
|
|
1557
1710
|
|
|
1558
1711
|
class CheckboxComponent extends BaseFormControlComponent {
|
|
1559
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1560
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1712
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1713
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: CheckboxComponent, isStandalone: true, selector: "base-checkbox", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div [formGroup]=\"formGroup\" class=\"row\">\n <mat-checkbox [ngClass]=\"config().labelClass\" formControlName=\"{{ config().attrName }}\">{{ config().label }}</mat-checkbox>\n </div>\n}\n", styles: ["mat-checkbox{margin-bottom:12px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1561
1714
|
}
|
|
1562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1715
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1563
1716
|
type: Component,
|
|
1564
|
-
args: [{ selector: 'base-checkbox', standalone: true, imports: [NgClass,
|
|
1717
|
+
args: [{ selector: 'base-checkbox', standalone: true, imports: [NgClass, MatCheckbox, FormsModule, ReactiveFormsModule], template: "@if (config().visible) {\n <div [formGroup]=\"formGroup\" class=\"row\">\n <mat-checkbox [ngClass]=\"config().labelClass\" formControlName=\"{{ config().attrName }}\">{{ config().label }}</mat-checkbox>\n </div>\n}\n", styles: ["mat-checkbox{margin-bottom:12px}\n"] }]
|
|
1565
1718
|
}] });
|
|
1566
1719
|
|
|
1567
1720
|
class RadioComponent extends BaseFormControlComponent {
|
|
1568
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1569
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: RadioComponent, isStandalone: true, selector: "base-radio", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n @if (config().label) {\n <label [for]=\"config().attrName\">{{ config().label }}</label>\n }\n @for (radio of config().getSelectables(); track radio.key; let i = $index) {\n <div [ngClass]=\"config().styleClass ? config().styleClass : ''\">\n <input type=\"radio\" class=\"form-check-input\" [name]=\"config().attrName\" [id]=\"config().attrName + i\" [value]=\"radio.value\" [checked]=\"radio.key === value()\" [disabled]=\"config().disabled\" />\n <label [for]=\"config().attrName\" [ngClass]=\"config().labelClass ? config().labelClass : ''\">{{ radio.value }}</label>\n </div>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
1570
1723
|
}
|
|
1571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: RadioComponent, decorators: [{
|
|
1572
1725
|
type: Component,
|
|
1573
|
-
args: [{ selector: 'base-radio', standalone: true, imports: [
|
|
1726
|
+
args: [{ selector: 'base-radio', standalone: true, imports: [NgClass, ReactiveFormsModule], template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n @if (config().label) {\n <label [for]=\"config().attrName\">{{ config().label }}</label>\n }\n @for (radio of config().getSelectables(); track radio.key; let i = $index) {\n <div [ngClass]=\"config().styleClass ? config().styleClass : ''\">\n <input type=\"radio\" class=\"form-check-input\" [name]=\"config().attrName\" [id]=\"config().attrName + i\" [value]=\"radio.value\" [checked]=\"radio.key === value()\" [disabled]=\"config().disabled\" />\n <label [for]=\"config().attrName\" [ngClass]=\"config().labelClass ? config().labelClass : ''\">{{ radio.value }}</label>\n </div>\n }\n </div>\n}\n" }]
|
|
1574
1727
|
}] });
|
|
1575
1728
|
|
|
1576
1729
|
class TextareaComponent extends BaseFormControlComponent {
|
|
1577
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1578
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1730
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1731
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TextareaComponent, isStandalone: true, selector: "base-textarea", usesInheritance: true, ngImport: i0, template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field [ngClass]=\"config().styleClass\">\n <mat-label [ngClass]=\"config().labelClass\" [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <textarea matInput [id]=\"config().attrName\" formControlName=\"{{ config().attrName }}\" placeholder=\"Ex. It makes me feel...\"></textarea>\n </mat-form-field>\n </div>\n}\n", styles: [":host{display:block}.full-width{width:100%}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1579
1732
|
}
|
|
1580
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1733
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1581
1734
|
type: Component,
|
|
1582
|
-
args: [{ selector: 'base-textarea', standalone: true, imports: [
|
|
1735
|
+
args: [{ selector: 'base-textarea', standalone: true, imports: [NgClass, MatFormField, MatInput, MatLabel, ReactiveFormsModule], template: "@if (config().visible) {\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field [ngClass]=\"config().styleClass\">\n <mat-label [ngClass]=\"config().labelClass\" [attr.for]=\"config().attrName\">{{ config().label }}</mat-label>\n <textarea matInput [id]=\"config().attrName\" formControlName=\"{{ config().attrName }}\" placeholder=\"Ex. It makes me feel...\"></textarea>\n </mat-form-field>\n </div>\n}\n", styles: [":host{display:block}.full-width{width:100%}\n"] }]
|
|
1583
1736
|
}] });
|
|
1584
1737
|
|
|
1585
1738
|
class FlexBoxHostDirective {
|
|
@@ -1587,10 +1740,10 @@ class FlexBoxHostDirective {
|
|
|
1587
1740
|
constructor(viewContainerRef) {
|
|
1588
1741
|
this.viewContainerRef = viewContainerRef;
|
|
1589
1742
|
}
|
|
1590
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1591
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
1743
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FlexBoxHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1744
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: FlexBoxHostDirective, isStandalone: true, selector: "[flexBoxHost]", ngImport: i0 });
|
|
1592
1745
|
}
|
|
1593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FlexBoxHostDirective, decorators: [{
|
|
1594
1747
|
type: Directive,
|
|
1595
1748
|
args: [{
|
|
1596
1749
|
standalone: true,
|
|
@@ -1615,10 +1768,10 @@ class FlexBoxComponent extends BaseFormControlComponent {
|
|
|
1615
1768
|
throw new Error('Unknown flex direction');
|
|
1616
1769
|
}
|
|
1617
1770
|
}
|
|
1618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1619
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1771
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FlexBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1772
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: FlexBoxComponent, isStandalone: true, selector: "flex-box", viewQueries: [{ propertyName: "flexBoxHost", first: true, predicate: FlexBoxHostDirective, descendants: true, read: FlexBoxHostDirective, static: true }], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"flexBoxClass()\" [ngStyle]=\"style()\">\n <ng-template flexBoxHost></ng-template>\n</div>\n", styles: [".flex-box-container{display:flex}.flex-box-container-columns{display:flex;flex-direction:column}.flex-box-container-rows{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "directive", type: FlexBoxHostDirective, selector: "[flexBoxHost]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1620
1773
|
}
|
|
1621
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FlexBoxComponent, decorators: [{
|
|
1622
1775
|
type: Component,
|
|
1623
1776
|
args: [{ selector: 'flex-box', imports: [FlexBoxHostDirective, NgClass, NgStyle], template: "<div [ngClass]=\"flexBoxClass()\" [ngStyle]=\"style()\">\n <ng-template flexBoxHost></ng-template>\n</div>\n", styles: [".flex-box-container{display:flex}.flex-box-container-columns{display:flex;flex-direction:column}.flex-box-container-rows{display:flex;flex-direction:row}\n"] }]
|
|
1624
1777
|
}], propDecorators: { flexBoxHost: [{
|
|
@@ -1662,9 +1815,9 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
1662
1815
|
control?.markAsDirty();
|
|
1663
1816
|
control?.markAsTouched();
|
|
1664
1817
|
}
|
|
1665
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1666
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1667
|
-
|
|
1818
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TagsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: TagsComponent, isStandalone: true, selector: "base-tags", usesInheritance: true, ngImport: i0, template: `
|
|
1820
|
+
@if (config().visible) {
|
|
1668
1821
|
<div class="row" [formGroup]="formGroup">
|
|
1669
1822
|
<mat-form-field>
|
|
1670
1823
|
<mat-label>{{ config().label }}</mat-label>
|
|
@@ -1681,16 +1834,16 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
1681
1834
|
</mat-chip-grid>
|
|
1682
1835
|
</mat-form-field>
|
|
1683
1836
|
</div>
|
|
1684
|
-
|
|
1685
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
1837
|
+
}
|
|
1838
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1686
1839
|
}
|
|
1687
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: TagsComponent, decorators: [{
|
|
1688
1841
|
type: Component,
|
|
1689
1842
|
args: [{
|
|
1690
1843
|
selector: 'base-tags',
|
|
1691
1844
|
standalone: true,
|
|
1692
1845
|
template: `
|
|
1693
|
-
|
|
1846
|
+
@if (config().visible) {
|
|
1694
1847
|
<div class="row" [formGroup]="formGroup">
|
|
1695
1848
|
<mat-form-field>
|
|
1696
1849
|
<mat-label>{{ config().label }}</mat-label>
|
|
@@ -1707,9 +1860,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1707
1860
|
</mat-chip-grid>
|
|
1708
1861
|
</mat-form-field>
|
|
1709
1862
|
</div>
|
|
1710
|
-
|
|
1863
|
+
}
|
|
1711
1864
|
`,
|
|
1712
|
-
imports: [
|
|
1865
|
+
imports: [ReactiveFormsModule, MatFormField, MatLabel, MatChipGrid, MatChipRow, MatChipInput, MatChipRemove, MatIcon],
|
|
1713
1866
|
}]
|
|
1714
1867
|
}] });
|
|
1715
1868
|
|
|
@@ -1731,7 +1884,9 @@ class EntityComponentRefComponent {
|
|
|
1731
1884
|
const attrName = this.componentNameAttr().attrName;
|
|
1732
1885
|
const component = this.component();
|
|
1733
1886
|
const componentName = attrName ? component[attrName] : undefined;
|
|
1734
|
-
|
|
1887
|
+
if (componentName == null || typeof componentName === 'object')
|
|
1888
|
+
return component.id;
|
|
1889
|
+
return String(componentName);
|
|
1735
1890
|
}
|
|
1736
1891
|
navigateToRelated(event) {
|
|
1737
1892
|
event.preventDefault();
|
|
@@ -1754,17 +1909,17 @@ class EntityComponentRefComponent {
|
|
|
1754
1909
|
control?.markAsDirty();
|
|
1755
1910
|
control?.markAsTouched();
|
|
1756
1911
|
}
|
|
1757
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1758
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityComponentRefComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1913
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EntityComponentRefComponent, isStandalone: true, selector: "app-entity-component-ref", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, componentNameAttr: { classPropertyName: "componentNameAttr", publicName: "componentNameAttr", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, linkedEntityType: { classPropertyName: "linkedEntityType", publicName: "linkedEntityType", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1759
1914
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
1760
1915
|
@if (!disabled()) {
|
|
1761
1916
|
<button type="button" mat-icon-button class="base-entity-form-delete-button" aria-label="Delete component reference" (click)="removeComponent()">
|
|
1762
1917
|
<mat-icon>cancel</mat-icon>
|
|
1763
1918
|
</button>
|
|
1764
1919
|
}
|
|
1765
|
-
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1920
|
+
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1766
1921
|
}
|
|
1767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityComponentRefComponent, decorators: [{
|
|
1768
1923
|
type: Component,
|
|
1769
1924
|
args: [{ selector: 'app-entity-component-ref', standalone: true, imports: [MatIconButton, MatIcon], template: `
|
|
1770
1925
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
@@ -1773,7 +1928,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1773
1928
|
<mat-icon>cancel</mat-icon>
|
|
1774
1929
|
</button>
|
|
1775
1930
|
}
|
|
1776
|
-
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
1931
|
+
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"] }]
|
|
1777
1932
|
}], propDecorators: { entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: true }] }], component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], componentNameAttr: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentNameAttr", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], linkedEntityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkedEntityType", required: true }] }] } });
|
|
1778
1933
|
|
|
1779
1934
|
class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
@@ -1788,11 +1943,20 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
1788
1943
|
}
|
|
1789
1944
|
components() {
|
|
1790
1945
|
const value = this.formGroup.get(this.config().attrName)?.value ?? this.value();
|
|
1791
|
-
if (!Array.isArray(value))
|
|
1946
|
+
if (!Array.isArray(value))
|
|
1792
1947
|
return [];
|
|
1793
|
-
|
|
1794
|
-
value.
|
|
1795
|
-
|
|
1948
|
+
const idField = this.config().referenceIdField ?? 'id';
|
|
1949
|
+
const normalized = value.map((item) => {
|
|
1950
|
+
if (typeof item === 'string' || typeof item === 'number') {
|
|
1951
|
+
return { id: String(item) };
|
|
1952
|
+
}
|
|
1953
|
+
if (idField !== 'id' && item && typeof item === 'object' && !('id' in item)) {
|
|
1954
|
+
return { ...item, id: String(item[idField] ?? '') };
|
|
1955
|
+
}
|
|
1956
|
+
return item;
|
|
1957
|
+
});
|
|
1958
|
+
normalized.forEach((component) => assertPersistedEntity(component));
|
|
1959
|
+
return normalized;
|
|
1796
1960
|
}
|
|
1797
1961
|
addComponentTitle() {
|
|
1798
1962
|
return 'Add ' + this.linkedEntityName();
|
|
@@ -1854,8 +2018,8 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
1854
2018
|
invalidControls: controls.filter((control) => control.invalid),
|
|
1855
2019
|
};
|
|
1856
2020
|
}
|
|
1857
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1858
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2021
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityComponentsListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2022
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: EntityComponentsListComponent, isStandalone: true, selector: "app-component-list", usesInheritance: true, ngImport: i0, template: `
|
|
1859
2023
|
@if (config().visible) {
|
|
1860
2024
|
<div class="row">
|
|
1861
2025
|
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
@@ -1883,9 +2047,9 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
1883
2047
|
</fieldset>
|
|
1884
2048
|
</div>
|
|
1885
2049
|
}
|
|
1886
|
-
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: EntityComponentRefComponent, selector: "app-entity-component-ref", inputs: ["entity", "component", "componentNameAttr", "disabled", "formGroup", "linkedEntityType"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
2050
|
+
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: EntityComponentRefComponent, selector: "app-entity-component-ref", inputs: ["entity", "component", "componentNameAttr", "disabled", "formGroup", "linkedEntityType"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1887
2051
|
}
|
|
1888
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: EntityComponentsListComponent, decorators: [{
|
|
1889
2053
|
type: Component,
|
|
1890
2054
|
args: [{ selector: 'app-component-list', standalone: true, imports: [NgClass, NgStyle, EntityComponentRefComponent, MatButton, MatIcon], template: `
|
|
1891
2055
|
@if (config().visible) {
|
|
@@ -1915,7 +2079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
1915
2079
|
</fieldset>
|
|
1916
2080
|
</div>
|
|
1917
2081
|
}
|
|
1918
|
-
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
2082
|
+
`, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"] }]
|
|
1919
2083
|
}] });
|
|
1920
2084
|
|
|
1921
2085
|
class LookupComponent extends BaseFormControlComponent {
|
|
@@ -1964,7 +2128,8 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
1964
2128
|
});
|
|
1965
2129
|
}
|
|
1966
2130
|
selectLookupItem(selectedValue) {
|
|
1967
|
-
|
|
2131
|
+
const key = selectedValue == null || typeof selectedValue === 'object' ? '' : String(selectedValue);
|
|
2132
|
+
this.setLookupKey(key);
|
|
1968
2133
|
this.restoreSelectedValue();
|
|
1969
2134
|
}
|
|
1970
2135
|
restoreSelectedValue() {
|
|
@@ -2024,9 +2189,9 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
2024
2189
|
}
|
|
2025
2190
|
lookupStore.load({});
|
|
2026
2191
|
}
|
|
2027
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2028
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2029
|
-
|
|
2192
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: LookupComponent, isStandalone: true, selector: "lookup-control", usesInheritance: true, ngImport: i0, template: `
|
|
2194
|
+
@if (config().visible) {
|
|
2030
2195
|
<div class="row" [formGroup]="formGroup">
|
|
2031
2196
|
<mat-form-field>
|
|
2032
2197
|
<mat-label>{{ config().label }}</mat-label>
|
|
@@ -2047,16 +2212,16 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
2047
2212
|
</mat-form-field>
|
|
2048
2213
|
<input type="hidden" [formControlName]="config().attrName" />
|
|
2049
2214
|
</div>
|
|
2050
|
-
|
|
2051
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2215
|
+
}
|
|
2216
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }] });
|
|
2052
2217
|
}
|
|
2053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LookupComponent, decorators: [{
|
|
2054
2219
|
type: Component,
|
|
2055
2220
|
args: [{
|
|
2056
2221
|
selector: 'lookup-control',
|
|
2057
2222
|
standalone: true,
|
|
2058
2223
|
template: `
|
|
2059
|
-
|
|
2224
|
+
@if (config().visible) {
|
|
2060
2225
|
<div class="row" [formGroup]="formGroup">
|
|
2061
2226
|
<mat-form-field>
|
|
2062
2227
|
<mat-label>{{ config().label }}</mat-label>
|
|
@@ -2077,9 +2242,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2077
2242
|
</mat-form-field>
|
|
2078
2243
|
<input type="hidden" [formControlName]="config().attrName" />
|
|
2079
2244
|
</div>
|
|
2080
|
-
|
|
2245
|
+
}
|
|
2081
2246
|
`,
|
|
2082
|
-
imports: [
|
|
2247
|
+
imports: [ReactiveFormsModule, MatLabel, MatFormField, MatInput, MatAutocompleteModule, MatIconButton, MatIcon, MatSuffix],
|
|
2083
2248
|
}]
|
|
2084
2249
|
}], ctorParameters: () => [] });
|
|
2085
2250
|
|
|
@@ -2142,14 +2307,16 @@ class BaseEntityFormBuilder {
|
|
|
2142
2307
|
throw new Error('Undefined form control type');
|
|
2143
2308
|
return componentType;
|
|
2144
2309
|
}
|
|
2145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2146
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
2310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2311
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFormBuilder, providedIn: 'root' });
|
|
2147
2312
|
}
|
|
2148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFormBuilder, decorators: [{
|
|
2149
2314
|
type: Injectable,
|
|
2150
2315
|
args: [{ providedIn: 'root' }]
|
|
2151
2316
|
}] });
|
|
2152
2317
|
|
|
2318
|
+
const RULE_ENGINE = new InjectionToken('RULE_ENGINE');
|
|
2319
|
+
|
|
2153
2320
|
class BaseEntityFormComponent {
|
|
2154
2321
|
baseEntityForm;
|
|
2155
2322
|
entityDescriptor = inject(ROUTER_OUTLET_DATA);
|
|
@@ -2164,10 +2331,20 @@ class BaseEntityFormComponent {
|
|
|
2164
2331
|
store = computed(() => this.entityDescriptor().store, /* @ts-ignore */
|
|
2165
2332
|
...(ngDevMode ? [{ debugName: "store" }] : /* istanbul ignore next */ []));
|
|
2166
2333
|
componentHost;
|
|
2334
|
+
violations = signal([], /* @ts-ignore */
|
|
2335
|
+
...(ngDevMode ? [{ debugName: "violations" }] : /* istanbul ignore next */ []));
|
|
2336
|
+
hasErrorViolations = computed(() => this.violations().some((v) => v.severity === 'ERROR'), /* @ts-ignore */
|
|
2337
|
+
...(ngDevMode ? [{ debugName: "hasErrorViolations" }] : /* istanbul ignore next */ []));
|
|
2167
2338
|
entityFormBuilder = inject((BaseEntityFormBuilder));
|
|
2168
2339
|
formBuilder = inject(FormBuilder);
|
|
2169
2340
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
2170
2341
|
logger = inject(NGXLogger);
|
|
2342
|
+
ruleEngine = inject(RULE_ENGINE, { optional: true });
|
|
2343
|
+
violationsStore = inject(RuleViolationsSingletonStore);
|
|
2344
|
+
rules = [];
|
|
2345
|
+
fieldsWithRuleErrors = new Set();
|
|
2346
|
+
ruleLoad$ = new Subject();
|
|
2347
|
+
ruleSubscription;
|
|
2171
2348
|
constructor() {
|
|
2172
2349
|
this.registerEffects();
|
|
2173
2350
|
}
|
|
@@ -2177,6 +2354,13 @@ class BaseEntityFormComponent {
|
|
|
2177
2354
|
this.formNavigator.determineActiveRouteSegment();
|
|
2178
2355
|
this.baseEntityForm = this.formBuilder.group({});
|
|
2179
2356
|
this.logger.info('BaseEntityFormComponent initialized with: ', { entityDescriptor: this.entityDescriptor() });
|
|
2357
|
+
this.loadRules();
|
|
2358
|
+
}
|
|
2359
|
+
ngOnDestroy() {
|
|
2360
|
+
this.ruleSubscription?.unsubscribe();
|
|
2361
|
+
this.ruleLoad$.complete();
|
|
2362
|
+
this.clearFieldRuleErrors();
|
|
2363
|
+
this.violationsStore.clearViolations();
|
|
2180
2364
|
}
|
|
2181
2365
|
// endregion
|
|
2182
2366
|
// region event handlers
|
|
@@ -2188,8 +2372,14 @@ class BaseEntityFormComponent {
|
|
|
2188
2372
|
await this.store().delete(this.entityId());
|
|
2189
2373
|
await this.formNavigator.navigateBack();
|
|
2190
2374
|
}
|
|
2375
|
+
onFieldBlur() {
|
|
2376
|
+
this.evaluateRules();
|
|
2377
|
+
}
|
|
2191
2378
|
async onSubmit() {
|
|
2192
2379
|
const objectToSave = { ...this.entity(), ...this.baseEntityForm.value };
|
|
2380
|
+
this.evaluateRules(objectToSave);
|
|
2381
|
+
if (this.hasErrorViolations())
|
|
2382
|
+
return;
|
|
2193
2383
|
this.store().setCurrentEntity(undefined);
|
|
2194
2384
|
if (this.isNewObject()) {
|
|
2195
2385
|
await this.store().add(objectToSave);
|
|
@@ -2201,6 +2391,61 @@ class BaseEntityFormComponent {
|
|
|
2201
2391
|
}
|
|
2202
2392
|
// endregion
|
|
2203
2393
|
// region protected, private helper methods
|
|
2394
|
+
evaluateRules(candidate) {
|
|
2395
|
+
if (!this.ruleEngine || this.rules.length === 0)
|
|
2396
|
+
return;
|
|
2397
|
+
const target = candidate ?? { ...this.entity(), ...this.baseEntityForm.value };
|
|
2398
|
+
const results = this.rules.map((rule) => this.ruleEngine.evaluate(target, rule));
|
|
2399
|
+
const failing = results.filter((r) => !r.passed);
|
|
2400
|
+
this.violations.set(failing);
|
|
2401
|
+
this.violationsStore.setViolations(this.entityDescriptor().entityName, failing);
|
|
2402
|
+
this.applyFieldRuleErrors(failing);
|
|
2403
|
+
}
|
|
2404
|
+
applyFieldRuleErrors(violations) {
|
|
2405
|
+
this.clearFieldRuleErrors();
|
|
2406
|
+
const perField = new Map();
|
|
2407
|
+
for (const violation of violations) {
|
|
2408
|
+
for (const field of violation.fields ?? []) {
|
|
2409
|
+
const list = perField.get(field) ?? [];
|
|
2410
|
+
list.push(violation);
|
|
2411
|
+
perField.set(field, list);
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
for (const [field, list] of perField) {
|
|
2415
|
+
const control = this.baseEntityForm.get(field);
|
|
2416
|
+
if (!control)
|
|
2417
|
+
continue;
|
|
2418
|
+
const message = list.map((v) => v.message ?? v.error ?? v.ruleId).join('\n');
|
|
2419
|
+
const severity = list.some((v) => v.severity === 'ERROR') ? 'ERROR' : list[0].severity;
|
|
2420
|
+
const existing = control.errors ?? {};
|
|
2421
|
+
control.setErrors({ ...existing, ruleViolation: { message, severity } });
|
|
2422
|
+
control.markAsTouched();
|
|
2423
|
+
this.fieldsWithRuleErrors.add(field);
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
clearFieldRuleErrors() {
|
|
2427
|
+
for (const field of this.fieldsWithRuleErrors) {
|
|
2428
|
+
const control = this.baseEntityForm.get(field);
|
|
2429
|
+
if (!control)
|
|
2430
|
+
continue;
|
|
2431
|
+
const errors = { ...(control.errors ?? {}) };
|
|
2432
|
+
delete errors['ruleViolation'];
|
|
2433
|
+
control.setErrors(Object.keys(errors).length ? errors : null);
|
|
2434
|
+
}
|
|
2435
|
+
this.fieldsWithRuleErrors.clear();
|
|
2436
|
+
}
|
|
2437
|
+
loadRules() {
|
|
2438
|
+
if (!this.ruleEngine)
|
|
2439
|
+
return;
|
|
2440
|
+
const context = this.entityDescriptor().entityName;
|
|
2441
|
+
this.ruleSubscription = this.ruleEngine.loadRulesFor(context).subscribe({
|
|
2442
|
+
next: (rules) => {
|
|
2443
|
+
this.rules = rules;
|
|
2444
|
+
this.logger.info(`BaseEntityFormComponent loaded ${rules.length} rule(s) for context "${context}"`);
|
|
2445
|
+
},
|
|
2446
|
+
error: (err) => this.logger.warn(`BaseEntityFormComponent failed to load rules for "${context}"`, err),
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2204
2449
|
registerEffects() {
|
|
2205
2450
|
effect(() => {
|
|
2206
2451
|
if (this.entityId() && this.entityDescriptor() && this.entity())
|
|
@@ -2214,12 +2459,12 @@ class BaseEntityFormComponent {
|
|
|
2214
2459
|
this.store().setCurrentEntity(this.entity().id);
|
|
2215
2460
|
});
|
|
2216
2461
|
}
|
|
2217
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2218
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2463
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: BaseEntityFormComponent, isStandalone: true, selector: "base-form", inputs: { entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }], viewQueries: [{ propertyName: "componentHost", first: true, predicate: BaseFormHostDirective, descendants: true, read: BaseFormHostDirective, static: true }], ngImport: i0, template: "<mat-card appearance=\"outlined\" class=\"dense-3\">\n <mat-card-content>\n <form [formGroup]=\"baseEntityForm\" (ngSubmit)=\"onSubmit()\" (focusout)=\"onFieldBlur()\">\n <ng-template baseFormHost></ng-template>\n </form>\n @if (violations().length > 0) {\n <ul class=\"rule-violations\" data-testid=\"rule-violations\">\n @for (violation of violations(); track violation.ruleId) {\n <li [class]=\"'rule-violation severity-' + violation.severity.toLowerCase()\">\n <mat-icon>{{ violation.severity === 'ERROR' ? 'error' : violation.severity === 'WARNING' ? 'warning' : 'info' }}</mat-icon>\n <span>{{ violation.message ?? violation.error ?? violation.ruleId }}</span>\n </li>\n }\n </ul>\n }\n </mat-card-content>\n <mat-card-actions>\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" mat-raised-button color=\"secondary\" (click)=\"onCancel()\">Cancel</button>\n <button id=\"delete\" [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"isNewObject() || isAbstract()\" (click)=\"onDelete()\">Delete</button>\n @if (entityDescriptor().extraFormActionsTemplate?.(); as extraTpl) {\n <ng-container [ngTemplateOutlet]=\"extraTpl\"></ng-container>\n }\n <button id=\"submit\" [attr.data-testid]=\"entityDescriptor().createTestId('save')\" mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"baseEntityForm.invalid || !baseEntityForm.dirty || isAbstract() || hasErrorViolations()\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n", styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"], dependencies: [{ kind: "directive", type: BaseFormHostDirective, selector: "[baseFormHost]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
2219
2464
|
}
|
|
2220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFormComponent, decorators: [{
|
|
2221
2466
|
type: Component,
|
|
2222
|
-
args: [{ selector: 'base-form', standalone: true, imports: [BaseFormHostDirective, ReactiveFormsModule, MatCard, MatCardContent, MatCardActions, MatButton], providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }], template: "<mat-card appearance=\"outlined\" class=\"dense-3\">\n <mat-card-content>\n <form [formGroup]=\"baseEntityForm\" (ngSubmit)=\"onSubmit()\">\n <ng-template baseFormHost></ng-template>\n </form>\n </mat-card-content>\n <mat-card-actions>\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" mat-raised-button color=\"secondary\" (click)=\"onCancel()\">Cancel</button>\n <button id=\"delete\" [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"isNewObject() || isAbstract()\" (click)=\"onDelete()\">Delete</button>\n <button id=\"submit\" [attr.data-testid]=\"entityDescriptor().createTestId('save')\" mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"baseEntityForm.invalid || !baseEntityForm.dirty || isAbstract()\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n" }]
|
|
2467
|
+
args: [{ selector: 'base-form', standalone: true, imports: [BaseFormHostDirective, NgTemplateOutlet, ReactiveFormsModule, MatCard, MatCardContent, MatCardActions, MatButton, MatIcon], providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }], template: "<mat-card appearance=\"outlined\" class=\"dense-3\">\n <mat-card-content>\n <form [formGroup]=\"baseEntityForm\" (ngSubmit)=\"onSubmit()\" (focusout)=\"onFieldBlur()\">\n <ng-template baseFormHost></ng-template>\n </form>\n @if (violations().length > 0) {\n <ul class=\"rule-violations\" data-testid=\"rule-violations\">\n @for (violation of violations(); track violation.ruleId) {\n <li [class]=\"'rule-violation severity-' + violation.severity.toLowerCase()\">\n <mat-icon>{{ violation.severity === 'ERROR' ? 'error' : violation.severity === 'WARNING' ? 'warning' : 'info' }}</mat-icon>\n <span>{{ violation.message ?? violation.error ?? violation.ruleId }}</span>\n </li>\n }\n </ul>\n }\n </mat-card-content>\n <mat-card-actions>\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" mat-raised-button color=\"secondary\" (click)=\"onCancel()\">Cancel</button>\n <button id=\"delete\" [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"isNewObject() || isAbstract()\" (click)=\"onDelete()\">Delete</button>\n @if (entityDescriptor().extraFormActionsTemplate?.(); as extraTpl) {\n <ng-container [ngTemplateOutlet]=\"extraTpl\"></ng-container>\n }\n <button id=\"submit\" [attr.data-testid]=\"entityDescriptor().createTestId('save')\" mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"baseEntityForm.invalid || !baseEntityForm.dirty || isAbstract() || hasErrorViolations()\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n", styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violations{list-style:none;margin:12px 0 0;padding:0}.rule-violation{display:flex;align-items:center;gap:8px;padding:6px 8px;border-left:4px solid transparent;margin-bottom:4px;font-size:14px}.rule-violation mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.rule-violation.severity-error{border-left-color:#d32f2f;background-color:#d32f2f14;color:#b71c1c}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#b26a00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#0d47a1}\n"] }]
|
|
2223
2468
|
}], ctorParameters: () => [], propDecorators: { entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], componentHost: [{
|
|
2224
2469
|
type: ViewChild,
|
|
2225
2470
|
args: [BaseFormHostDirective, { static: true, read: BaseFormHostDirective }]
|
|
@@ -2230,13 +2475,15 @@ class BaseEntityDescriptor {
|
|
|
2230
2475
|
attrDescriptors;
|
|
2231
2476
|
entityName;
|
|
2232
2477
|
entityTitle;
|
|
2478
|
+
extraFormActionsTemplate;
|
|
2233
2479
|
parentEntity;
|
|
2234
2480
|
isAbstract;
|
|
2235
|
-
constructor({ store, attrDescriptors, entityName, entityTitle, isAbstract, parentEntity }) {
|
|
2481
|
+
constructor({ store, attrDescriptors, entityName, entityTitle, extraFormActionsTemplate, isAbstract, parentEntity }) {
|
|
2236
2482
|
this.store = store;
|
|
2237
2483
|
this.attrDescriptors = attrDescriptors;
|
|
2238
2484
|
this.entityName = entityName;
|
|
2239
2485
|
this.entityTitle = entityTitle ?? '';
|
|
2486
|
+
this.extraFormActionsTemplate = extraFormActionsTemplate;
|
|
2240
2487
|
this.isAbstract = isAbstract ?? false;
|
|
2241
2488
|
this.parentEntity = parentEntity;
|
|
2242
2489
|
}
|
|
@@ -2405,10 +2652,10 @@ class BaseEntityListComponent {
|
|
|
2405
2652
|
canSelectEntity() {
|
|
2406
2653
|
return this.selection.selected.length === 1;
|
|
2407
2654
|
}
|
|
2408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2656
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: BaseEntityListComponent, isStandalone: true, selector: "base-list", viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "@if (store.isLoading()) {\n <mat-progress-bar mode=\"query\"></mat-progress-bar>\n}\n<div class=\"base-entity-list mat-elevation-z8\">\n <mat-table [dataSource]=\"dataSource\" matSort aria-describedby=\"base-entity-list\">\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? onToggleAllRows() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null; onChangeSelection(row)\" [checked]=\"selection.isSelected(row)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n\n @for (colDescriptor of columnDescriptors(); track colDescriptor.attrName; let i = $index) {\n <ng-container [matColumnDef]=\"colDescriptor.attrName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{ colDescriptor.label }}</mat-header-cell>\n <mat-cell (click)=\"onRowClick(element)\" (keydown.enter)=\"onRowClick(element)\" tabindex=\"0\" role=\"button\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== undefined && element[colDescriptor.attrName] !== null ) {\n @let artifact = element[colDescriptor.attrName];\n <a (click)=\"onDownloadObject(artifact, $event)\">{{ ((artifact.name ?? artifact.objectId ?? '') | slice:0:20) + ((artifact.name ?? artifact.objectId ?? '').length > 20 ? '...' : '') }}</a>\n } @else if (colDescriptor.formControlType === 'TAGS' && element[colDescriptor.attrName] !== undefined ) {\n {{ (element[colDescriptor.attrName].join(', ') | slice:0:20) + (element[colDescriptor.attrName].join(', ').length > 20 ? '...' : '') }}\n } @else {\n {{ element[colDescriptor.attrName] }}\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"displayedColumns()\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns()\"></mat-row>\n </mat-table>\n <div class=\"base-entity-list-footer\">\n @if (selectOrCreateMode()) {\n <div class=\"base-entity-list-actions\">\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" type=\"button\" mat-raised-button color=\"secondary\" (click)=\"onCancelSelectOrCreate()\">Cancel</button>\n <button id=\"select\" [attr.data-testid]=\"entityDescriptor().createTestId( 'select')\" type=\"button\" mat-raised-button color=\"primary\" [disabled]=\"!canSelectEntity()\" (click)=\"onSelectEntity()\">Select</button>\n </div>\n }\n <mat-paginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n </div>\n</div>\n", styles: [".base-entity-list{display:flex;flex-direction:column;max-height:500px;min-width:300px}.mat-table{overflow:auto;max-height:500px}.mat-column-select{overflow:initial}.mat-mdc-row:hover{background-color:#6495ed;cursor:pointer}.base-entity-list-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.base-entity-list-actions{display:flex;gap:8px;padding-left:16px}\n"], dependencies: [{ kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SlicePipe, name: "slice" }] });
|
|
2410
2657
|
}
|
|
2411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityListComponent, decorators: [{
|
|
2412
2659
|
type: Component,
|
|
2413
2660
|
args: [{ selector: 'base-list', standalone: true, imports: [
|
|
2414
2661
|
MatTable,
|
|
@@ -2428,7 +2675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2428
2675
|
MatCheckbox,
|
|
2429
2676
|
SlicePipe,
|
|
2430
2677
|
MatButton,
|
|
2431
|
-
], template: "@if (store.isLoading()) {\n <mat-progress-bar mode=\"query\"></mat-progress-bar>\n}\n<div class=\"base-entity-list mat-elevation-z8\">\n <mat-table [dataSource]=\"dataSource\" matSort aria-describedby=\"base-entity-list\">\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? onToggleAllRows() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null; onChangeSelection(row)\" [checked]=\"selection.isSelected(row)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n\n @for (colDescriptor of columnDescriptors(); track colDescriptor.attrName; let i = $index) {\n <ng-container [matColumnDef]=\"colDescriptor.attrName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{ colDescriptor.label }}</mat-header-cell>\n <mat-cell (click)=\"onRowClick(element)\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== undefined && element[colDescriptor.attrName] !== null ) {\n @let artifact = element[colDescriptor.attrName];\n <a (click)=\"onDownloadObject(artifact, $event)\">{{ ((artifact.name ?? artifact.objectId ?? '') | slice:0:20) + ((artifact.name ?? artifact.objectId ?? '').length > 20 ? '...' : '') }}</a>\n } @else if (colDescriptor.formControlType === 'TAGS' && element[colDescriptor.attrName] !== undefined ) {\n {{ (element[colDescriptor.attrName].join(', ') | slice:0:20) + (element[colDescriptor.attrName].join(', ').length > 20 ? '...' : '') }}\n } @else {\n {{ element[colDescriptor.attrName] }}\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"displayedColumns()\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns()\"></mat-row>\n </mat-table>\n <div class=\"base-entity-list-footer\">\n @if (selectOrCreateMode()) {\n <div class=\"base-entity-list-actions\">\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" type=\"button\" mat-raised-button color=\"secondary\" (click)=\"onCancelSelectOrCreate()\">Cancel</button>\n <button id=\"select\" [attr.data-testid]=\"entityDescriptor().createTestId( 'select')\" type=\"button\" mat-raised-button color=\"primary\" [disabled]=\"!canSelectEntity()\" (click)=\"onSelectEntity()\">Select</button>\n </div>\n }\n <mat-paginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n </div>\n</div>\n", styles: [".base-entity-list{display:flex;flex-direction:column;max-height:500px;min-width:300px}.mat-table{overflow:auto;max-height:500px}.mat-column-select{overflow:
|
|
2678
|
+
], template: "@if (store.isLoading()) {\n <mat-progress-bar mode=\"query\"></mat-progress-bar>\n}\n<div class=\"base-entity-list mat-elevation-z8\">\n <mat-table [dataSource]=\"dataSource\" matSort aria-describedby=\"base-entity-list\">\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? onToggleAllRows() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null; onChangeSelection(row)\" [checked]=\"selection.isSelected(row)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n\n @for (colDescriptor of columnDescriptors(); track colDescriptor.attrName; let i = $index) {\n <ng-container [matColumnDef]=\"colDescriptor.attrName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{ colDescriptor.label }}</mat-header-cell>\n <mat-cell (click)=\"onRowClick(element)\" (keydown.enter)=\"onRowClick(element)\" tabindex=\"0\" role=\"button\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== undefined && element[colDescriptor.attrName] !== null ) {\n @let artifact = element[colDescriptor.attrName];\n <a (click)=\"onDownloadObject(artifact, $event)\">{{ ((artifact.name ?? artifact.objectId ?? '') | slice:0:20) + ((artifact.name ?? artifact.objectId ?? '').length > 20 ? '...' : '') }}</a>\n } @else if (colDescriptor.formControlType === 'TAGS' && element[colDescriptor.attrName] !== undefined ) {\n {{ (element[colDescriptor.attrName].join(', ') | slice:0:20) + (element[colDescriptor.attrName].join(', ').length > 20 ? '...' : '') }}\n } @else {\n {{ element[colDescriptor.attrName] }}\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"displayedColumns()\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns()\"></mat-row>\n </mat-table>\n <div class=\"base-entity-list-footer\">\n @if (selectOrCreateMode()) {\n <div class=\"base-entity-list-actions\">\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" type=\"button\" mat-raised-button color=\"secondary\" (click)=\"onCancelSelectOrCreate()\">Cancel</button>\n <button id=\"select\" [attr.data-testid]=\"entityDescriptor().createTestId( 'select')\" type=\"button\" mat-raised-button color=\"primary\" [disabled]=\"!canSelectEntity()\" (click)=\"onSelectEntity()\">Select</button>\n </div>\n }\n <mat-paginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n </div>\n</div>\n", styles: [".base-entity-list{display:flex;flex-direction:column;max-height:500px;min-width:300px}.mat-table{overflow:auto;max-height:500px}.mat-column-select{overflow:initial}.mat-mdc-row:hover{background-color:#6495ed;cursor:pointer}.base-entity-list-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.base-entity-list-actions{display:flex;gap:8px;padding-left:16px}\n"] }]
|
|
2432
2679
|
}], ctorParameters: () => [], propDecorators: { sort: [{
|
|
2433
2680
|
type: ViewChild,
|
|
2434
2681
|
args: [MatSort]
|
|
@@ -2437,12 +2684,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
|
|
|
2437
2684
|
args: [MatPaginator]
|
|
2438
2685
|
}] } });
|
|
2439
2686
|
|
|
2440
|
-
var OrderByDirection;
|
|
2441
|
-
(function (OrderByDirection) {
|
|
2442
|
-
OrderByDirection["ASC"] = "asc";
|
|
2443
|
-
OrderByDirection["DESC"] = "desc";
|
|
2444
|
-
})(OrderByDirection || (OrderByDirection = {}));
|
|
2445
|
-
|
|
2446
2687
|
const BASE_ENTITY_MAPPER = new InjectionToken('BASE_ENTITY_MAPPER');
|
|
2447
2688
|
class SimpleEntityMapper {
|
|
2448
2689
|
entityType;
|
|
@@ -2518,9 +2759,9 @@ let BaseEntityFirestoreService = class BaseEntityFirestoreService {
|
|
|
2518
2759
|
let orderBys = [];
|
|
2519
2760
|
if (queryCondition.orderBys?.length) {
|
|
2520
2761
|
orderBys = queryCondition.orderBys.map((orderByCondition) => {
|
|
2521
|
-
const name = Object.keys(OrderByDirection).
|
|
2522
|
-
const direction = Object.values(OrderByDirection).
|
|
2523
|
-
return orderBy(orderByCondition.property, direction
|
|
2762
|
+
const name = Object.keys(OrderByDirection).find((key) => key === orderByCondition.direction);
|
|
2763
|
+
const direction = Object.values(OrderByDirection).find((value) => value === name);
|
|
2764
|
+
return orderBy(orderByCondition.property, direction);
|
|
2524
2765
|
});
|
|
2525
2766
|
}
|
|
2526
2767
|
let wheres = [];
|
|
@@ -2560,7 +2801,7 @@ let BaseEntityFirestoreService = class BaseEntityFirestoreService {
|
|
|
2560
2801
|
throw new Error('Entity cant be undefined');
|
|
2561
2802
|
const docRef = doc(this.firestore, this.collectionName, entity.id);
|
|
2562
2803
|
await updateDoc(docRef, this.mapEntity(entity));
|
|
2563
|
-
return
|
|
2804
|
+
return entity;
|
|
2564
2805
|
}
|
|
2565
2806
|
};
|
|
2566
2807
|
BaseEntityFirestoreService = __decorate([
|
|
@@ -2639,7 +2880,7 @@ const findByQuery = (store, repository) => {
|
|
|
2639
2880
|
// distinctUntilChanged(),
|
|
2640
2881
|
switchMap((parameters) => repository.findByQuery(parameters).pipe(tapResponse({
|
|
2641
2882
|
next: (response) => {
|
|
2642
|
-
if (Object.
|
|
2883
|
+
if (Object.hasOwn(response, 'content')) {
|
|
2643
2884
|
const baseEntityResponse = response;
|
|
2644
2885
|
patchState(store, {
|
|
2645
2886
|
entities: baseEntityResponse.content,
|
|
@@ -2677,7 +2918,7 @@ function BaseEntityStore(entityType, getRepository) {
|
|
|
2677
2918
|
isLoading: false,
|
|
2678
2919
|
error: undefined,
|
|
2679
2920
|
selectedEntities: [],
|
|
2680
|
-
}),
|
|
2921
|
+
}), withMethods((store, repository = getRepository()) => ({
|
|
2681
2922
|
clearCurrentEntity: () => patchState(store, { currentEntity: undefined }),
|
|
2682
2923
|
createEntity: () => new entityType(),
|
|
2683
2924
|
add: addEntity(store, repository),
|
|
@@ -2732,14 +2973,14 @@ const INITIAL_TABS_STATE = {
|
|
|
2732
2973
|
currentTab: undefined,
|
|
2733
2974
|
};
|
|
2734
2975
|
function BaseEntityTabsStore() {
|
|
2735
|
-
return signalStoreFeature(withState(INITIAL_TABS_STATE),
|
|
2976
|
+
return signalStoreFeature(withState(INITIAL_TABS_STATE), withMethods((store) => {
|
|
2736
2977
|
function reset() {
|
|
2737
2978
|
const activeTabs = [];
|
|
2738
2979
|
patchState(store, { activeTabs, currentTab: undefined });
|
|
2739
2980
|
}
|
|
2740
2981
|
function tabIsActive(tabName) {
|
|
2741
2982
|
let activeTabs;
|
|
2742
|
-
if (store.activeTabs().
|
|
2983
|
+
if (!store.activeTabs().includes(tabName)) {
|
|
2743
2984
|
activeTabs = store.activeTabs().concat([tabName]);
|
|
2744
2985
|
}
|
|
2745
2986
|
else {
|
|
@@ -2766,16 +3007,20 @@ class BaseEntityFacade {
|
|
|
2766
3007
|
_storeInstance;
|
|
2767
3008
|
_descriptor;
|
|
2768
3009
|
get mapper() {
|
|
2769
|
-
|
|
3010
|
+
this._mapper ??= this.createMapper();
|
|
3011
|
+
return this._mapper;
|
|
2770
3012
|
}
|
|
2771
3013
|
get service() {
|
|
2772
|
-
|
|
3014
|
+
this._service ??= this.createService(this.mapper);
|
|
3015
|
+
return this._service;
|
|
2773
3016
|
}
|
|
2774
3017
|
get storeClass() {
|
|
2775
|
-
|
|
3018
|
+
this._storeClass ??= this.createStoreClass();
|
|
3019
|
+
return this._storeClass;
|
|
2776
3020
|
}
|
|
2777
3021
|
get store() {
|
|
2778
|
-
|
|
3022
|
+
this._storeInstance ??= runInInjectionContext(this.injector, () => inject(this.storeClass));
|
|
3023
|
+
return this._storeInstance;
|
|
2779
3024
|
}
|
|
2780
3025
|
get descriptor() {
|
|
2781
3026
|
if (!this._descriptor) {
|
|
@@ -2812,12 +3057,12 @@ class BaseEntityFacade {
|
|
|
2812
3057
|
});
|
|
2813
3058
|
}
|
|
2814
3059
|
createStoreClass() {
|
|
2815
|
-
return signalStore({ providedIn: 'root' }, BaseEntityStore(this.entityType, () => this.service), BaseEntityTabsStore(), BaseEntityContainerStore());
|
|
3060
|
+
return signalStore({ providedIn: 'root' }, BaseEntityStore(this.entityType, () => this.service), BaseEntityTabsStore(), BaseEntityContainerStore(), withDevtools(entityNameFromType(this.entityType)));
|
|
2816
3061
|
}
|
|
2817
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2818
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
3062
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3063
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFacade });
|
|
2819
3064
|
}
|
|
2820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BaseEntityFacade, decorators: [{
|
|
2821
3066
|
type: Injectable
|
|
2822
3067
|
}] });
|
|
2823
3068
|
|
|
@@ -2911,5 +3156,5 @@ const BASE_ENTITY_ROUTES = [
|
|
|
2911
3156
|
* Generated bundle index. Do not edit.
|
|
2912
3157
|
*/
|
|
2913
3158
|
|
|
2914
|
-
export { ACTIVE_ENTITY_FACADE, AbstractAttrDescriptor, BASE_ENTITY_FACADE_REGISTRY, BASE_ENTITY_ROUTES, BASE_ENTITY_SERVICE, BASE_ENTITY_STORE, BASE_LIST_DESCRIPTORS, BaseEntityAttrDescriptor, BaseEntityContainerComponent, BaseEntityContainerStore, BaseEntityDescriptor, BaseEntityDescriptorRegistry, BaseEntityFacade, BaseEntityFirestoreService, BaseEntityFormComponent, BaseEntityListComponent, BaseEntityRestService, BaseEntityStore, BaseEntityTabsStore, BaseFormHostDirective, BaseFormNavigatorSingletonStore, BaseFormNavigatorStore, Entity, EntityRegistryComponent, FlexDirection, FlexboxDescriptor, FormControlType, Id, OrderByDirection, RouteSegments, SimpleEntityMapper, getEntityIds, getEntityOptions, getEnumKeyByValue, getEnumValueByKey };
|
|
3159
|
+
export { ACTIVE_ENTITY_FACADE, AbstractAttrDescriptor, BASE_ENTITY_FACADE_REGISTRY, BASE_ENTITY_ROUTES, BASE_ENTITY_SERVICE, BASE_ENTITY_STORE, BASE_LIST_DESCRIPTORS, BaseEntityAttrDescriptor, BaseEntityContainerComponent, BaseEntityContainerStore, BaseEntityDescriptor, BaseEntityDescriptorRegistry, BaseEntityFacade, BaseEntityFirestoreService, BaseEntityFormComponent, BaseEntityListComponent, BaseEntityRestService, BaseEntityStore, BaseEntityTabsStore, BaseFormHostDirective, BaseFormNavigatorSingletonStore, BaseFormNavigatorStore, Entity, EntityRegistryComponent, FlexDirection, FlexboxDescriptor, FormControlType, Id, NavigatorCommand, OrderByDirection, RULE_ENGINE, RouteSegments, RuleViolationsSingletonStore, SimpleEntityMapper, getEntityIds, getEntityOptions, getEnumKeyByValue, getEnumValueByKey };
|
|
2915
3160
|
//# sourceMappingURL=processpuzzle-base-entity.mjs.map
|