@processpuzzle/base-entity 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, output, signal, forwardRef, ViewChild, Inject, Component, input,
|
|
2
|
+
import { inject, Injectable, output, signal, forwardRef, ViewChild, Inject, Component, input, computed, Injector, effect, InjectionToken, Directive, HostBinding, EventEmitter, Output, DestroyRef, untracked, runInInjectionContext, provideAppInitializer } from '@angular/core';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule, NgClass, NgStyle, NgTemplateOutlet, SlicePipe } from '@angular/common';
|
|
@@ -10,7 +10,7 @@ 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
12
|
import * as i2$1 from '@angular/material/form-field';
|
|
13
|
-
import { MatFormField, MatSuffix,
|
|
13
|
+
import { MatFormField, MatSuffix, MatLabel, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
14
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';
|
|
@@ -29,8 +29,8 @@ import { StreamLanguage, HighlightStyle, syntaxHighlighting, bracketMatching } f
|
|
|
29
29
|
import { tags } from '@lezer/highlight';
|
|
30
30
|
import { linter } from '@codemirror/lint';
|
|
31
31
|
import { __decorate, __param } from 'tslib';
|
|
32
|
-
import { map, filter, switchMap, Subject, from,
|
|
33
|
-
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
32
|
+
import { map, catchError, of, throwError, filter, switchMap, Subject, from, firstValueFrom, pipe, tap } from 'rxjs';
|
|
33
|
+
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
34
34
|
import { buildUrl } from 'build-url-ts';
|
|
35
35
|
import { MatCard, MatCardContent, MatCardActions } from '@angular/material/card';
|
|
36
36
|
import { NGXLogger } from 'ngx-logging-kit';
|
|
@@ -56,6 +56,7 @@ import 'reflect-metadata';
|
|
|
56
56
|
|
|
57
57
|
var FormControlType;
|
|
58
58
|
(function (FormControlType) {
|
|
59
|
+
FormControlType["ADDITIONAL_PROPERTIES"] = "ADDITIONAL_PROPERTIES";
|
|
59
60
|
FormControlType["ARTIFACT"] = "ARTIFACT";
|
|
60
61
|
FormControlType["CHECKBOX"] = "CHECKBOX";
|
|
61
62
|
FormControlType["COMPONENTS"] = "COMPONENTS";
|
|
@@ -138,10 +139,10 @@ class EntityRouteRegistry {
|
|
|
138
139
|
return prefix;
|
|
139
140
|
return `${prefix}/${path}`;
|
|
140
141
|
}
|
|
141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
142
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityRouteRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
143
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityRouteRegistry, providedIn: 'root' });
|
|
143
144
|
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityRouteRegistry, decorators: [{
|
|
145
146
|
type: Injectable,
|
|
146
147
|
args: [{ providedIn: 'root' }]
|
|
147
148
|
}] });
|
|
@@ -1026,8 +1027,8 @@ class RsqlQueryEditorComponent {
|
|
|
1026
1027
|
}
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1030
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1030
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RsqlQueryEditorComponent, deps: [{ token: RsqlFieldMetadataProvider }], target: i0.ɵɵFactoryTarget.Component });
|
|
1031
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: RsqlQueryEditorComponent, isStandalone: true, selector: "pp-rsql-query-editor", outputs: { queryChange: "queryChange", validityChange: "validityChange" }, providers: [
|
|
1031
1032
|
TranslocoDirective,
|
|
1032
1033
|
{
|
|
1033
1034
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1036,7 +1037,7 @@ class RsqlQueryEditorComponent {
|
|
|
1036
1037
|
},
|
|
1037
1038
|
], viewQueries: [{ propertyName: "editorHost", first: true, predicate: ["editorHost"], descendants: true, static: true }], ngImport: i0, template: `<div #editorHost class="rsql-editor-host"></div>`, isInline: true, styles: [".rsql-editor-host{border:1px solid var(--pp-border-color, #ced4da);border-radius:4px;font-family:JetBrains Mono,Fira Code,monospace;font-size:13px;resize:both;overflow:hidden;min-width:320px;min-height:2.5rem;height:180px;width:100%}.rsql-editor-host :global(.cm-editor){height:100%;min-height:2.5rem}.rsql-editor-host :global(.cm-editor.cm-focused){outline:2px solid var(--pp-focus-color, #339af0);outline-offset:-1px}\n"] });
|
|
1038
1039
|
}
|
|
1039
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RsqlQueryEditorComponent, decorators: [{
|
|
1040
1041
|
type: Component,
|
|
1041
1042
|
args: [{ selector: 'pp-rsql-query-editor', standalone: true, template: `<div #editorHost class="rsql-editor-host"></div>`, providers: [
|
|
1042
1043
|
TranslocoDirective,
|
|
@@ -1059,8 +1060,8 @@ class RsqlEditorDialog {
|
|
|
1059
1060
|
queryControl = new FormControl(this.data.initialQuery ?? '', { nonNullable: true });
|
|
1060
1061
|
isValid = signal(true, /* @ts-ignore */
|
|
1061
1062
|
...(ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []));
|
|
1062
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1063
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1063
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RsqlEditorDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1064
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: RsqlEditorDialog, isStandalone: true, selector: "base-entity-rsql-editor-dialog", providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], ngImport: i0, template: `
|
|
1064
1065
|
<ng-container *transloco="let t">
|
|
1065
1066
|
<h2 mat-dialog-title>{{ t('base_entity.rsql_editor_dialog.title') }}</h2>
|
|
1066
1067
|
<mat-dialog-content class="editor-content">
|
|
@@ -1073,7 +1074,7 @@ class RsqlEditorDialog {
|
|
|
1073
1074
|
</ng-container>
|
|
1074
1075
|
`, isInline: true, styles: [".editor-content{min-width:520px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "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"] }, { kind: "component", type: RsqlQueryEditorComponent, selector: "pp-rsql-query-editor", outputs: ["queryChange", "validityChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
1075
1076
|
}
|
|
1076
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RsqlEditorDialog, decorators: [{
|
|
1077
1078
|
type: Component,
|
|
1078
1079
|
args: [{ selector: 'base-entity-rsql-editor-dialog', standalone: true, imports: [ReactiveFormsModule, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatButton, RsqlQueryEditorComponent, TranslocoDirective], providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], template: `
|
|
1079
1080
|
<ng-container *transloco="let t">
|
|
@@ -1097,6 +1098,7 @@ class BaseEntityAttrDescriptor extends AbstractAttrDescriptor {
|
|
|
1097
1098
|
isLinkToDetails;
|
|
1098
1099
|
selectables;
|
|
1099
1100
|
visible = true;
|
|
1101
|
+
showThumbnail = true;
|
|
1100
1102
|
hideInTable = false;
|
|
1101
1103
|
isHeading;
|
|
1102
1104
|
placeholder;
|
|
@@ -1230,6 +1232,10 @@ class BaseEntityQueryComponent {
|
|
|
1230
1232
|
...(ngDevMode ? [{ debugName: "entityDescriptor" }] : /* istanbul ignore next */ []));
|
|
1231
1233
|
queryValue = signal('', /* @ts-ignore */
|
|
1232
1234
|
...(ngDevMode ? [{ debugName: "queryValue" }] : /* istanbul ignore next */ []));
|
|
1235
|
+
appliedQuery = signal(undefined, /* @ts-ignore */
|
|
1236
|
+
...(ngDevMode ? [{ debugName: "appliedQuery" }] : /* istanbul ignore next */ []));
|
|
1237
|
+
queryActive = computed(() => this.appliedQuery() !== undefined && this.queryValue() === this.appliedQuery(), /* @ts-ignore */
|
|
1238
|
+
...(ngDevMode ? [{ debugName: "queryActive" }] : /* istanbul ignore next */ []));
|
|
1233
1239
|
store;
|
|
1234
1240
|
dialog = inject(MatDialog);
|
|
1235
1241
|
parentInjector = inject(Injector);
|
|
@@ -1240,7 +1246,14 @@ class BaseEntityQueryComponent {
|
|
|
1240
1246
|
const value = this.queryValue().trim();
|
|
1241
1247
|
if (!value)
|
|
1242
1248
|
return;
|
|
1249
|
+
this.queryValue.set(value);
|
|
1243
1250
|
this.store.load({ query: value });
|
|
1251
|
+
this.appliedQuery.set(value);
|
|
1252
|
+
}
|
|
1253
|
+
onClearQuery() {
|
|
1254
|
+
this.queryValue.set('');
|
|
1255
|
+
this.appliedQuery.set(undefined);
|
|
1256
|
+
this.store.load({});
|
|
1244
1257
|
}
|
|
1245
1258
|
onOpenEditor() {
|
|
1246
1259
|
const data = { initialQuery: this.queryValue() };
|
|
@@ -1257,8 +1270,8 @@ class BaseEntityQueryComponent {
|
|
|
1257
1270
|
this.queryValue.set(result);
|
|
1258
1271
|
});
|
|
1259
1272
|
}
|
|
1260
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1261
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
1273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityQueryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: BaseEntityQueryComponent, isStandalone: true, selector: "base-entity-query", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], ngImport: i0, template: `
|
|
1262
1275
|
<ng-container *transloco="let t">
|
|
1263
1276
|
<div class="query-wrapper">
|
|
1264
1277
|
<label class="field-label" [attr.for]="entityDescriptor().createTestId('query-input')">{{ t('base_entity.toolbar.query_label') }}</label>
|
|
@@ -1274,15 +1287,21 @@ class BaseEntityQueryComponent {
|
|
|
1274
1287
|
<button [attr.data-testid]="entityDescriptor().createTestId('query-editor-open')" type="button" mat-icon-button matSuffix aria-label="Open advanced query editor" (click)="onOpenEditor()">
|
|
1275
1288
|
<mat-icon>edit_note</mat-icon>
|
|
1276
1289
|
</button>
|
|
1277
|
-
|
|
1278
|
-
<mat-icon
|
|
1279
|
-
|
|
1290
|
+
@if (queryActive()) {
|
|
1291
|
+
<button [attr.data-testid]="entityDescriptor().createTestId('query-clear')" type="button" mat-icon-button matSuffix aria-label="Clear query" (click)="onClearQuery()">
|
|
1292
|
+
<mat-icon>cancel</mat-icon>
|
|
1293
|
+
</button>
|
|
1294
|
+
} @else {
|
|
1295
|
+
<button [attr.data-testid]="entityDescriptor().createTestId('query-send')" type="button" mat-icon-button matSuffix aria-label="Send query" [disabled]="!queryValue()" (click)="onSendQuery()">
|
|
1296
|
+
<mat-icon>play_arrow</mat-icon>
|
|
1297
|
+
</button>
|
|
1298
|
+
}
|
|
1280
1299
|
</mat-form-field>
|
|
1281
1300
|
</div>
|
|
1282
1301
|
</ng-container>
|
|
1283
1302
|
`, isInline: true, styles: [".query-wrapper{display:inline-flex;align-items:center;gap:8px}.field-label{font-size:14px;white-space:nowrap}.query-field{width:320px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
1284
1303
|
}
|
|
1285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityQueryComponent, decorators: [{
|
|
1286
1305
|
type: Component,
|
|
1287
1306
|
args: [{ selector: 'base-entity-query', standalone: true, imports: [CommonModule, FormsModule, MatFormField, MatInput, MatIcon, MatIconButton, MatSuffix, TranslocoDirective], providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], template: `
|
|
1288
1307
|
<ng-container *transloco="let t">
|
|
@@ -1300,9 +1319,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1300
1319
|
<button [attr.data-testid]="entityDescriptor().createTestId('query-editor-open')" type="button" mat-icon-button matSuffix aria-label="Open advanced query editor" (click)="onOpenEditor()">
|
|
1301
1320
|
<mat-icon>edit_note</mat-icon>
|
|
1302
1321
|
</button>
|
|
1303
|
-
|
|
1304
|
-
<mat-icon
|
|
1305
|
-
|
|
1322
|
+
@if (queryActive()) {
|
|
1323
|
+
<button [attr.data-testid]="entityDescriptor().createTestId('query-clear')" type="button" mat-icon-button matSuffix aria-label="Clear query" (click)="onClearQuery()">
|
|
1324
|
+
<mat-icon>cancel</mat-icon>
|
|
1325
|
+
</button>
|
|
1326
|
+
} @else {
|
|
1327
|
+
<button [attr.data-testid]="entityDescriptor().createTestId('query-send')" type="button" mat-icon-button matSuffix aria-label="Send query" [disabled]="!queryValue()" (click)="onSendQuery()">
|
|
1328
|
+
<mat-icon>play_arrow</mat-icon>
|
|
1329
|
+
</button>
|
|
1330
|
+
}
|
|
1306
1331
|
</mat-form-field>
|
|
1307
1332
|
</div>
|
|
1308
1333
|
</ng-container>
|
|
@@ -1359,10 +1384,10 @@ class BaseEntityToolbarComponent {
|
|
|
1359
1384
|
// endregion
|
|
1360
1385
|
// protected, private helper methods
|
|
1361
1386
|
RouteSegments = RouteSegments;
|
|
1362
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1363
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
1387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1388
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: BaseEntityToolbarComponent, isStandalone: true, selector: "base-entity-toolbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], ngImport: i0, template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <ng-container *transloco=\"let t;\">\n <div class=\"dense-3 toolbar-inputs\" [ngStyle]=\"{'padding-top': '12px' }\">\n <base-entity-query [entityDescriptor]=\"entityDescriptor()\"></base-entity-query>\n <div class=\"filter-wrapper\">\n <label class=\"field-label\" [attr.for]=\"entityDescriptor().createTestId('filter-input')\">{{ t('base_entity.toolbar.filter_label') }}</label>\n <mat-form-field subscriptSizing=\"dynamic\">\n <input #filterInput [id]=\"entityDescriptor().createTestId('filter-input')\" [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\">\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 </div>\n </ng-container>\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", styles: [".toolbar-inputs{display:flex;align-items:center;gap:40px}.filter-wrapper{display:inline-flex;align-items:center;gap:8px}.field-label{font-size:14px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.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: 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"] }, { kind: "component", type: BaseEntityQueryComponent, selector: "base-entity-query", inputs: ["entityDescriptor"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
1364
1389
|
}
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityToolbarComponent, decorators: [{
|
|
1366
1391
|
type: Component,
|
|
1367
1392
|
args: [{ selector: 'base-entity-toolbar', standalone: true, imports: [CommonModule, MatToolbarModule, MatIcon, MatFormField, MatInput, MatButton, MatIconButton, MatSuffix, MatMenu, MatMenuItem, MatMenuTrigger, BaseEntityQueryComponent, TranslocoDirective], providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <ng-container *transloco=\"let t;\">\n <div class=\"dense-3 toolbar-inputs\" [ngStyle]=\"{'padding-top': '12px' }\">\n <base-entity-query [entityDescriptor]=\"entityDescriptor()\"></base-entity-query>\n <div class=\"filter-wrapper\">\n <label class=\"field-label\" [attr.for]=\"entityDescriptor().createTestId('filter-input')\">{{ t('base_entity.toolbar.filter_label') }}</label>\n <mat-form-field subscriptSizing=\"dynamic\">\n <input #filterInput [id]=\"entityDescriptor().createTestId('filter-input')\" [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\">\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 </div>\n </ng-container>\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", styles: [".toolbar-inputs{display:flex;align-items:center;gap:40px}.filter-wrapper{display:inline-flex;align-items:center;gap:8px}.field-label{font-size:14px;white-space:nowrap}\n"] }]
|
|
1368
1393
|
}], propDecorators: { entityDescriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDescriptor", required: true }] }] } });
|
|
@@ -1410,8 +1435,8 @@ class BaseEntityStatusbarComponent {
|
|
|
1410
1435
|
evaluateEntityTitle(title) {
|
|
1411
1436
|
return typeof title === 'function' ? title() : title;
|
|
1412
1437
|
}
|
|
1413
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1414
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
1438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityStatusbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1439
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: BaseEntityStatusbarComponent, isStandalone: true, selector: "base-entity-statusbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1415
1440
|
<mat-toolbar *ngIf="isVisible()">
|
|
1416
1441
|
<div>
|
|
1417
1442
|
<span>{{ entityTitle() }}</span>
|
|
@@ -1434,7 +1459,7 @@ class BaseEntityStatusbarComponent {
|
|
|
1434
1459
|
</mat-toolbar>
|
|
1435
1460
|
`, 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$1.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"] }] });
|
|
1436
1461
|
}
|
|
1437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityStatusbarComponent, decorators: [{
|
|
1438
1463
|
type: Component,
|
|
1439
1464
|
args: [{ selector: 'base-entity-statusbar', standalone: true, imports: [CommonModule, MatToolbar, MatIcon], template: `
|
|
1440
1465
|
<mat-toolbar *ngIf="isVisible()">
|
|
@@ -1510,8 +1535,8 @@ class BaseEntityTabsComponent {
|
|
|
1510
1535
|
}
|
|
1511
1536
|
});
|
|
1512
1537
|
}
|
|
1513
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1514
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
1538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: BaseEntityTabsComponent, isStandalone: true, selector: "base-entity-tabs", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1515
1540
|
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
|
|
1516
1541
|
<a mat-tab-link [attr.data-testid]="entityDescriptor().createTestId('show-list')" (click)="onShowList()" [active]="store.currentTab() === listTabName()">{{ listTabName() }}</a>
|
|
1517
1542
|
<a
|
|
@@ -1531,7 +1556,7 @@ class BaseEntityTabsComponent {
|
|
|
1531
1556
|
</mat-tab-nav-panel>
|
|
1532
1557
|
`, 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"] }] });
|
|
1533
1558
|
}
|
|
1534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityTabsComponent, decorators: [{
|
|
1535
1560
|
type: Component,
|
|
1536
1561
|
args: [{
|
|
1537
1562
|
selector: 'base-entity-tabs',
|
|
@@ -1616,15 +1641,15 @@ class BaseEntityContainerComponent {
|
|
|
1616
1641
|
facadeDescriptor.extraFormActionsTemplate = input.extraFormActionsTemplate;
|
|
1617
1642
|
});
|
|
1618
1643
|
}
|
|
1619
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1620
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
1644
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1645
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", 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: `
|
|
1621
1646
|
<ng-content></ng-content>
|
|
1622
1647
|
<div>
|
|
1623
1648
|
<base-entity-tabs [entityDescriptor]="resolvedDescriptor()"></base-entity-tabs>
|
|
1624
1649
|
</div>
|
|
1625
1650
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BaseEntityTabsComponent, selector: "base-entity-tabs", inputs: ["entityDescriptor"] }] });
|
|
1626
1651
|
}
|
|
1627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityContainerComponent, decorators: [{
|
|
1628
1653
|
type: Component,
|
|
1629
1654
|
args: [{
|
|
1630
1655
|
selector: 'base-entity-container',
|
|
@@ -1763,12 +1788,15 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
1763
1788
|
if (httpResponse.status === 204 || this.isEmptyBody(httpResponse.body)) {
|
|
1764
1789
|
throw new Error('The query returned no content.');
|
|
1765
1790
|
}
|
|
1766
|
-
return
|
|
1791
|
+
return this.isPagedResponse(httpResponse.body) ? this.mapPagedResponse(httpResponse.body) : this.mapSimpleResponse(httpResponse.body);
|
|
1767
1792
|
}));
|
|
1768
1793
|
}
|
|
1769
1794
|
else
|
|
1770
1795
|
throw new Error('Could not determine the full url');
|
|
1771
1796
|
}
|
|
1797
|
+
isPagedResponse(body) {
|
|
1798
|
+
return body !== null && typeof body === 'object' && !Array.isArray(body) && Array.isArray(body.content);
|
|
1799
|
+
}
|
|
1772
1800
|
isEmptyBody(body) {
|
|
1773
1801
|
if (body == null)
|
|
1774
1802
|
return true;
|
|
@@ -1818,11 +1846,15 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
1818
1846
|
// region protected, private helper methods
|
|
1819
1847
|
buildFullUrl(resourceUri, queryCondition) {
|
|
1820
1848
|
const queryParams = new Map();
|
|
1821
|
-
if (queryCondition.page)
|
|
1849
|
+
if (queryCondition.page !== undefined)
|
|
1822
1850
|
queryParams.set('page', queryCondition.page.toString());
|
|
1851
|
+
if (queryCondition.pageSize !== undefined)
|
|
1852
|
+
queryParams.set('size', queryCondition.pageSize.toString());
|
|
1853
|
+
if (queryCondition.orderBys?.length)
|
|
1854
|
+
queryParams.set('order', this.buildOrder(queryCondition.orderBys));
|
|
1823
1855
|
const rsql = this.buildRsql(queryCondition);
|
|
1824
1856
|
if (rsql)
|
|
1825
|
-
queryParams.set('
|
|
1857
|
+
queryParams.set('where', rsql);
|
|
1826
1858
|
let params = {};
|
|
1827
1859
|
if (queryParams.size > 0) {
|
|
1828
1860
|
for (const [key, value] of queryParams) {
|
|
@@ -1853,16 +1885,17 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
1853
1885
|
return toRsql(queryCondition.filters);
|
|
1854
1886
|
return undefined;
|
|
1855
1887
|
}
|
|
1888
|
+
buildOrder(orderBys) {
|
|
1889
|
+
return orderBys.map((o) => `${o.property},${o.direction}`).join(',');
|
|
1890
|
+
}
|
|
1856
1891
|
mapPagedResponse(response) {
|
|
1857
|
-
const
|
|
1858
|
-
const
|
|
1859
|
-
const content = subjectPage.content.map((dto, index) => {
|
|
1860
|
-
return this.mapEntityResponse(dto, index);
|
|
1861
|
-
});
|
|
1892
|
+
const page = response;
|
|
1893
|
+
const content = page.content.map((dto, index) => this.mapEntityResponse(dto, index));
|
|
1862
1894
|
return {
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1895
|
+
number: page.number,
|
|
1896
|
+
size: page.size,
|
|
1897
|
+
totalElements: page.totalElements,
|
|
1898
|
+
totalPages: page.totalPages,
|
|
1866
1899
|
content,
|
|
1867
1900
|
};
|
|
1868
1901
|
}
|
|
@@ -1891,10 +1924,10 @@ class BaseFormHostDirective {
|
|
|
1891
1924
|
constructor(viewContainerRef) {
|
|
1892
1925
|
this.viewContainerRef = viewContainerRef;
|
|
1893
1926
|
}
|
|
1894
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1895
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
1927
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseFormHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1928
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: BaseFormHostDirective, isStandalone: true, selector: "[baseFormHost]", ngImport: i0 });
|
|
1896
1929
|
}
|
|
1897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseFormHostDirective, decorators: [{
|
|
1898
1931
|
type: Directive,
|
|
1899
1932
|
args: [{
|
|
1900
1933
|
standalone: true,
|
|
@@ -1959,10 +1992,10 @@ class EntityRegistryComponent {
|
|
|
1959
1992
|
}),
|
|
1960
1993
|
};
|
|
1961
1994
|
}
|
|
1962
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1963
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
1995
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityRegistryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: EntityRegistryComponent, isStandalone: true, selector: "pp-entity-registry", ngImport: i0, template: ` <pre>{{ registryJson() }}</pre> `, isInline: true });
|
|
1964
1997
|
}
|
|
1965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
1998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityRegistryComponent, decorators: [{
|
|
1966
1999
|
type: Component,
|
|
1967
2000
|
args: [{
|
|
1968
2001
|
selector: 'pp-entity-registry',
|
|
@@ -1989,10 +2022,10 @@ class BaseEntityDescriptorRegistry {
|
|
|
1989
2022
|
return undefined;
|
|
1990
2023
|
return this.injector.get(facadeToken, null, { optional: true }) ?? undefined;
|
|
1991
2024
|
}
|
|
1992
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
1993
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
2025
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityDescriptorRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2026
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityDescriptorRegistry, providedIn: 'root' });
|
|
1994
2027
|
}
|
|
1995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2028
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityDescriptorRegistry, decorators: [{
|
|
1996
2029
|
type: Injectable,
|
|
1997
2030
|
args: [{ providedIn: 'root' }]
|
|
1998
2031
|
}] });
|
|
@@ -2059,10 +2092,10 @@ class BaseFormControlComponent {
|
|
|
2059
2092
|
logger = inject(NGXLogger);
|
|
2060
2093
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
2061
2094
|
descriptorRegistry = inject(BaseEntityDescriptorRegistry);
|
|
2062
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2063
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.
|
|
2095
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseFormControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2096
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", 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 }] });
|
|
2064
2097
|
}
|
|
2065
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2098
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseFormControlComponent, decorators: [{
|
|
2066
2099
|
type: Component,
|
|
2067
2100
|
args: [{
|
|
2068
2101
|
standalone: true,
|
|
@@ -2077,6 +2110,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2077
2110
|
args: ['attr.style']
|
|
2078
2111
|
}] } });
|
|
2079
2112
|
|
|
2113
|
+
class AdditionalPropertiesComponent extends BaseFormControlComponent {
|
|
2114
|
+
editing = signal(false, /* @ts-ignore */
|
|
2115
|
+
...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
|
|
2116
|
+
enterEditMode() {
|
|
2117
|
+
this.editing.set(true);
|
|
2118
|
+
}
|
|
2119
|
+
cancelEdit() {
|
|
2120
|
+
this.editing.set(false);
|
|
2121
|
+
}
|
|
2122
|
+
add(keyInput, valueInput) {
|
|
2123
|
+
const key = (keyInput.value || '').trim();
|
|
2124
|
+
const value = (valueInput.value || '').trim();
|
|
2125
|
+
if (!key) {
|
|
2126
|
+
keyInput.focus();
|
|
2127
|
+
return;
|
|
2128
|
+
}
|
|
2129
|
+
this.setRecord({ ...this.record(), [key]: value });
|
|
2130
|
+
keyInput.value = '';
|
|
2131
|
+
valueInput.value = '';
|
|
2132
|
+
keyInput.focus();
|
|
2133
|
+
}
|
|
2134
|
+
remove(key) {
|
|
2135
|
+
const next = { ...this.record() };
|
|
2136
|
+
delete next[key];
|
|
2137
|
+
this.setRecord(next);
|
|
2138
|
+
}
|
|
2139
|
+
entries() {
|
|
2140
|
+
const record = this.record();
|
|
2141
|
+
return Object.keys(record).map((key) => ({ key, value: record[key] }));
|
|
2142
|
+
}
|
|
2143
|
+
record() {
|
|
2144
|
+
const value = this.formGroup.get(this.config().attrName)?.value;
|
|
2145
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
2146
|
+
return value;
|
|
2147
|
+
}
|
|
2148
|
+
return {};
|
|
2149
|
+
}
|
|
2150
|
+
setRecord(record) {
|
|
2151
|
+
const control = this.formGroup.get(this.config().attrName);
|
|
2152
|
+
control?.setValue(record);
|
|
2153
|
+
control?.markAsDirty();
|
|
2154
|
+
control?.markAsTouched();
|
|
2155
|
+
}
|
|
2156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AdditionalPropertiesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2157
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AdditionalPropertiesComponent, isStandalone: true, selector: "base-additional-properties", usesInheritance: true, ngImport: i0, template: `
|
|
2158
|
+
@if (config().visible) {
|
|
2159
|
+
<div class="row" [formGroup]="formGroup">
|
|
2160
|
+
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2161
|
+
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2162
|
+
<ul [id]="config().attrName" class="base-entity-form-list" (click)="enterEditMode()">
|
|
2163
|
+
@for (entry of entries(); track entry.key) {
|
|
2164
|
+
<li>
|
|
2165
|
+
<span class="entry">
|
|
2166
|
+
<span class="key">{{ entry.key }}</span
|
|
2167
|
+
>: <span class="value">{{ entry.value }}</span>
|
|
2168
|
+
</span>
|
|
2169
|
+
<button
|
|
2170
|
+
type="button"
|
|
2171
|
+
mat-icon-button
|
|
2172
|
+
class="base-entity-form-delete-button"
|
|
2173
|
+
[attr.aria-label]="'remove ' + entry.key"
|
|
2174
|
+
(click)="remove(entry.key); $event.stopPropagation()"
|
|
2175
|
+
>
|
|
2176
|
+
<mat-icon>cancel</mat-icon>
|
|
2177
|
+
</button>
|
|
2178
|
+
</li>
|
|
2179
|
+
}
|
|
2180
|
+
</ul>
|
|
2181
|
+
@if (editing()) {
|
|
2182
|
+
<div class="edit-row">
|
|
2183
|
+
<mat-form-field>
|
|
2184
|
+
<mat-label>key</mat-label>
|
|
2185
|
+
<input matInput #keyInput (keydown.enter)="valueInput.focus()" />
|
|
2186
|
+
</mat-form-field>
|
|
2187
|
+
<mat-form-field>
|
|
2188
|
+
<mat-label>value</mat-label>
|
|
2189
|
+
<input matInput #valueInput (keydown.enter)="add(keyInput, valueInput)" />
|
|
2190
|
+
</mat-form-field>
|
|
2191
|
+
<button mat-icon-button type="button" aria-label="add property" (click)="add(keyInput, valueInput)">
|
|
2192
|
+
<mat-icon>add</mat-icon>
|
|
2193
|
+
</button>
|
|
2194
|
+
<button mat-icon-button type="button" aria-label="cancel edit" (click)="cancelEdit()">
|
|
2195
|
+
<mat-icon>close</mat-icon>
|
|
2196
|
+
</button>
|
|
2197
|
+
</div>
|
|
2198
|
+
}
|
|
2199
|
+
</fieldset>
|
|
2200
|
+
</div>
|
|
2201
|
+
}
|
|
2202
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ".base-entity-form-list{list-style:none;padding-left:0;cursor:pointer}.base-entity-form-list li{display:flex;align-items:center}.base-entity-form-list .base-entity-form-delete-button{margin-left:auto}.base-entity-form-list .key{font-weight:500}.edit-row{display:flex;align-items:center;gap:8px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.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: "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: 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"] }] });
|
|
2203
|
+
}
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AdditionalPropertiesComponent, decorators: [{
|
|
2205
|
+
type: Component,
|
|
2206
|
+
args: [{ selector: 'base-additional-properties', standalone: true, template: `
|
|
2207
|
+
@if (config().visible) {
|
|
2208
|
+
<div class="row" [formGroup]="formGroup">
|
|
2209
|
+
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2210
|
+
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2211
|
+
<ul [id]="config().attrName" class="base-entity-form-list" (click)="enterEditMode()">
|
|
2212
|
+
@for (entry of entries(); track entry.key) {
|
|
2213
|
+
<li>
|
|
2214
|
+
<span class="entry">
|
|
2215
|
+
<span class="key">{{ entry.key }}</span
|
|
2216
|
+
>: <span class="value">{{ entry.value }}</span>
|
|
2217
|
+
</span>
|
|
2218
|
+
<button
|
|
2219
|
+
type="button"
|
|
2220
|
+
mat-icon-button
|
|
2221
|
+
class="base-entity-form-delete-button"
|
|
2222
|
+
[attr.aria-label]="'remove ' + entry.key"
|
|
2223
|
+
(click)="remove(entry.key); $event.stopPropagation()"
|
|
2224
|
+
>
|
|
2225
|
+
<mat-icon>cancel</mat-icon>
|
|
2226
|
+
</button>
|
|
2227
|
+
</li>
|
|
2228
|
+
}
|
|
2229
|
+
</ul>
|
|
2230
|
+
@if (editing()) {
|
|
2231
|
+
<div class="edit-row">
|
|
2232
|
+
<mat-form-field>
|
|
2233
|
+
<mat-label>key</mat-label>
|
|
2234
|
+
<input matInput #keyInput (keydown.enter)="valueInput.focus()" />
|
|
2235
|
+
</mat-form-field>
|
|
2236
|
+
<mat-form-field>
|
|
2237
|
+
<mat-label>value</mat-label>
|
|
2238
|
+
<input matInput #valueInput (keydown.enter)="add(keyInput, valueInput)" />
|
|
2239
|
+
</mat-form-field>
|
|
2240
|
+
<button mat-icon-button type="button" aria-label="add property" (click)="add(keyInput, valueInput)">
|
|
2241
|
+
<mat-icon>add</mat-icon>
|
|
2242
|
+
</button>
|
|
2243
|
+
<button mat-icon-button type="button" aria-label="cancel edit" (click)="cancelEdit()">
|
|
2244
|
+
<mat-icon>close</mat-icon>
|
|
2245
|
+
</button>
|
|
2246
|
+
</div>
|
|
2247
|
+
}
|
|
2248
|
+
</fieldset>
|
|
2249
|
+
</div>
|
|
2250
|
+
}
|
|
2251
|
+
`, imports: [NgClass, NgStyle, ReactiveFormsModule, MatFormField, MatLabel, MatInput, MatIconButton, MatIcon], 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ".base-entity-form-list{list-style:none;padding-left:0;cursor:pointer}.base-entity-form-list li{display:flex;align-items:center}.base-entity-form-list .base-entity-form-delete-button{margin-left:auto}.base-entity-form-list .key{font-weight:500}.edit-row{display:flex;align-items:center;gap:8px}\n"] }]
|
|
2252
|
+
}] });
|
|
2253
|
+
|
|
2080
2254
|
class ObjectStoreService {
|
|
2081
2255
|
runtimeConfiguration = inject(RUNTIME_CONFIGURATION);
|
|
2082
2256
|
httpClient = inject(HttpClient);
|
|
@@ -2111,6 +2285,14 @@ class ObjectStoreService {
|
|
|
2111
2285
|
const path = `/objects/${encodeURIComponent(bucketName)}/${encodeURIComponent(objectID)}/uri`;
|
|
2112
2286
|
return this.httpClient.get(this.buildFullUrl(path));
|
|
2113
2287
|
}
|
|
2288
|
+
getThumbnailUriByID(bucketName, objectID) {
|
|
2289
|
+
const path = `/objects/${encodeURIComponent(bucketName)}/${encodeURIComponent(objectID)}/thumbnail-uri`;
|
|
2290
|
+
return this.httpClient.get(this.buildFullUrl(path)).pipe(catchError((error) => {
|
|
2291
|
+
if (error instanceof HttpErrorResponse && error.status === 404)
|
|
2292
|
+
return of(null);
|
|
2293
|
+
return throwError(() => error);
|
|
2294
|
+
}));
|
|
2295
|
+
}
|
|
2114
2296
|
buildFullUrl(path) {
|
|
2115
2297
|
return buildUrl(this.baseUrl, { path });
|
|
2116
2298
|
}
|
|
@@ -2118,10 +2300,10 @@ class ObjectStoreService {
|
|
|
2118
2300
|
const baseConfiguration = Reflect.get(this.runtimeConfiguration, 'BASE_CONFIGURATION');
|
|
2119
2301
|
return Reflect.get(baseConfiguration, 'OBJECT_STORE_SERVICE_ROOT') ?? Reflect.get(baseConfiguration, 'BACKEND_SERVICE_ROOT') ?? '';
|
|
2120
2302
|
}
|
|
2121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2122
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
2303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ObjectStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2304
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ObjectStoreService, providedIn: 'root' });
|
|
2123
2305
|
}
|
|
2124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ObjectStoreService, decorators: [{
|
|
2125
2307
|
type: Injectable,
|
|
2126
2308
|
args: [{ providedIn: 'root' }]
|
|
2127
2309
|
}] });
|
|
@@ -2129,14 +2311,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2129
2311
|
class ArtifactSelectorComponent {
|
|
2130
2312
|
objectStoreService = inject(ObjectStoreService);
|
|
2131
2313
|
artifactUploaded = new EventEmitter();
|
|
2132
|
-
isSelectorVisible = false
|
|
2133
|
-
|
|
2314
|
+
isSelectorVisible = signal(false, /* @ts-ignore */
|
|
2315
|
+
...(ngDevMode ? [{ debugName: "isSelectorVisible" }] : /* istanbul ignore next */ []));
|
|
2316
|
+
isUploading = signal(false, /* @ts-ignore */
|
|
2317
|
+
...(ngDevMode ? [{ debugName: "isUploading" }] : /* istanbul ignore next */ []));
|
|
2134
2318
|
artifactName = '';
|
|
2135
2319
|
mimeType = '';
|
|
2136
|
-
errorMessage = '';
|
|
2137
2320
|
selectedFile = null;
|
|
2138
2321
|
showSelector() {
|
|
2139
|
-
this.isSelectorVisible
|
|
2322
|
+
this.isSelectorVisible.set(true);
|
|
2140
2323
|
}
|
|
2141
2324
|
onFileSelected(event) {
|
|
2142
2325
|
const input = event.target;
|
|
@@ -2145,16 +2328,17 @@ class ArtifactSelectorComponent {
|
|
|
2145
2328
|
return;
|
|
2146
2329
|
}
|
|
2147
2330
|
this.selectedFile = file;
|
|
2148
|
-
this.errorMessage = '';
|
|
2149
2331
|
this.artifactName = file.name;
|
|
2150
2332
|
this.mimeType = file.type || this.deriveMimeType(file.name);
|
|
2151
|
-
|
|
2333
|
+
}
|
|
2334
|
+
canUpload() {
|
|
2335
|
+
return this.selectedFile !== null && this.artifactName.length > 0 && this.mimeType.length > 0 && !this.isUploading();
|
|
2152
2336
|
}
|
|
2153
2337
|
uploadSelectedFile() {
|
|
2154
|
-
if (!this.selectedFile || !this.
|
|
2338
|
+
if (!this.selectedFile || !this.canUpload()) {
|
|
2155
2339
|
return;
|
|
2156
2340
|
}
|
|
2157
|
-
this.isUploading
|
|
2341
|
+
this.isUploading.set(true);
|
|
2158
2342
|
this.objectStoreService.uploadObject(this.selectedFile, this.artifactName, this.mimeType).subscribe({
|
|
2159
2343
|
next: (response) => {
|
|
2160
2344
|
const artifact = {
|
|
@@ -2164,15 +2348,26 @@ class ArtifactSelectorComponent {
|
|
|
2164
2348
|
mimeType: response.mimeType || this.mimeType,
|
|
2165
2349
|
};
|
|
2166
2350
|
this.artifactUploaded.emit(artifact);
|
|
2167
|
-
this.
|
|
2168
|
-
this.isUploading = false;
|
|
2351
|
+
this.resetToDisplayMode();
|
|
2169
2352
|
},
|
|
2170
2353
|
error: () => {
|
|
2171
|
-
this.
|
|
2172
|
-
this.errorMessage = 'Artifact upload failed.';
|
|
2354
|
+
this.resetToDisplayMode();
|
|
2173
2355
|
},
|
|
2174
2356
|
});
|
|
2175
2357
|
}
|
|
2358
|
+
cancel() {
|
|
2359
|
+
if (this.isUploading()) {
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
this.resetToDisplayMode();
|
|
2363
|
+
}
|
|
2364
|
+
resetToDisplayMode() {
|
|
2365
|
+
this.selectedFile = null;
|
|
2366
|
+
this.artifactName = '';
|
|
2367
|
+
this.mimeType = '';
|
|
2368
|
+
this.isUploading.set(false);
|
|
2369
|
+
this.isSelectorVisible.set(false);
|
|
2370
|
+
}
|
|
2176
2371
|
deriveMimeType(fileName) {
|
|
2177
2372
|
const extension = fileName.split('.').pop()?.toLowerCase() ?? '';
|
|
2178
2373
|
const mimeTypeByExtension = {
|
|
@@ -2190,72 +2385,48 @@ class ArtifactSelectorComponent {
|
|
|
2190
2385
|
};
|
|
2191
2386
|
return mimeTypeByExtension[extension] ?? 'application/octet-stream';
|
|
2192
2387
|
}
|
|
2193
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2194
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ArtifactSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2389
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ArtifactSelectorComponent, isStandalone: true, selector: "app-artifact-selector", outputs: { artifactUploaded: "artifactUploaded" }, ngImport: i0, template: `
|
|
2195
2390
|
<div class="artifact-selector">
|
|
2196
|
-
@if (!isSelectorVisible) {
|
|
2197
|
-
<button type="button" (click)="showSelector()">Upload file</button>
|
|
2391
|
+
@if (!isSelectorVisible()) {
|
|
2392
|
+
<button type="button" class="base-entity-form-focus-action" (click)="showSelector()">Upload file</button>
|
|
2198
2393
|
} @else {
|
|
2199
2394
|
<div class="artifact-selector__inputs">
|
|
2200
|
-
<input type="file" (change)="onFileSelected($event)" />
|
|
2201
|
-
<input
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
[disabled]="isUploading"
|
|
2206
|
-
/>
|
|
2207
|
-
<input
|
|
2208
|
-
type="text"
|
|
2209
|
-
[(ngModel)]="mimeType"
|
|
2210
|
-
placeholder="MIME type"
|
|
2211
|
-
[disabled]="isUploading"
|
|
2212
|
-
/>
|
|
2395
|
+
<input type="file" (change)="onFileSelected($event)" [disabled]="isUploading()" />
|
|
2396
|
+
<input type="text" [(ngModel)]="artifactName" placeholder="Artifact name" [disabled]="isUploading()" />
|
|
2397
|
+
<input type="text" [(ngModel)]="mimeType" placeholder="MIME type" [disabled]="isUploading()" />
|
|
2398
|
+
<button type="button" (click)="uploadSelectedFile()" [disabled]="!canUpload()">Upload</button>
|
|
2399
|
+
<button type="button" (click)="cancel()" [disabled]="isUploading()">Cancel</button>
|
|
2213
2400
|
</div>
|
|
2214
2401
|
}
|
|
2215
2402
|
|
|
2216
|
-
@if (isUploading) {
|
|
2403
|
+
@if (isUploading()) {
|
|
2217
2404
|
<p>Uploading...</p>
|
|
2218
2405
|
}
|
|
2219
|
-
|
|
2220
|
-
@if (errorMessage) {
|
|
2221
|
-
<p>{{ errorMessage }}</p>
|
|
2222
|
-
}
|
|
2223
2406
|
</div>
|
|
2224
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2407
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ":host-context(.base-entity-form-field:focus-within) .base-entity-form-focus-action{display:revert}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2225
2408
|
}
|
|
2226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ArtifactSelectorComponent, decorators: [{
|
|
2227
2410
|
type: Component,
|
|
2228
2411
|
args: [{ selector: 'app-artifact-selector', standalone: true, imports: [FormsModule], template: `
|
|
2229
2412
|
<div class="artifact-selector">
|
|
2230
|
-
@if (!isSelectorVisible) {
|
|
2231
|
-
<button type="button" (click)="showSelector()">Upload file</button>
|
|
2413
|
+
@if (!isSelectorVisible()) {
|
|
2414
|
+
<button type="button" class="base-entity-form-focus-action" (click)="showSelector()">Upload file</button>
|
|
2232
2415
|
} @else {
|
|
2233
2416
|
<div class="artifact-selector__inputs">
|
|
2234
|
-
<input type="file" (change)="onFileSelected($event)" />
|
|
2235
|
-
<input
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
[disabled]="isUploading"
|
|
2240
|
-
/>
|
|
2241
|
-
<input
|
|
2242
|
-
type="text"
|
|
2243
|
-
[(ngModel)]="mimeType"
|
|
2244
|
-
placeholder="MIME type"
|
|
2245
|
-
[disabled]="isUploading"
|
|
2246
|
-
/>
|
|
2417
|
+
<input type="file" (change)="onFileSelected($event)" [disabled]="isUploading()" />
|
|
2418
|
+
<input type="text" [(ngModel)]="artifactName" placeholder="Artifact name" [disabled]="isUploading()" />
|
|
2419
|
+
<input type="text" [(ngModel)]="mimeType" placeholder="MIME type" [disabled]="isUploading()" />
|
|
2420
|
+
<button type="button" (click)="uploadSelectedFile()" [disabled]="!canUpload()">Upload</button>
|
|
2421
|
+
<button type="button" (click)="cancel()" [disabled]="isUploading()">Cancel</button>
|
|
2247
2422
|
</div>
|
|
2248
2423
|
}
|
|
2249
2424
|
|
|
2250
|
-
@if (isUploading) {
|
|
2425
|
+
@if (isUploading()) {
|
|
2251
2426
|
<p>Uploading...</p>
|
|
2252
2427
|
}
|
|
2253
|
-
|
|
2254
|
-
@if (errorMessage) {
|
|
2255
|
-
<p>{{ errorMessage }}</p>
|
|
2256
|
-
}
|
|
2257
2428
|
</div>
|
|
2258
|
-
|
|
2429
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ":host-context(.base-entity-form-field:focus-within) .base-entity-form-focus-action{display:revert}\n"] }]
|
|
2259
2430
|
}], propDecorators: { artifactUploaded: [{
|
|
2260
2431
|
type: Output
|
|
2261
2432
|
}] } });
|
|
@@ -2266,8 +2437,8 @@ class DeleteArtifactConfirmationDialog {
|
|
|
2266
2437
|
t(key, params) {
|
|
2267
2438
|
return this.translocoService.translate(key, params);
|
|
2268
2439
|
}
|
|
2269
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2270
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
2440
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DeleteArtifactConfirmationDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2441
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: DeleteArtifactConfirmationDialog, isStandalone: true, selector: "app-delete-artifact-confirmation-dialog", providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })], ngImport: i0, template: `
|
|
2271
2442
|
<h2 mat-dialog-title>{{ t(data.titleKey) }}</h2>
|
|
2272
2443
|
<mat-dialog-content>{{ t(data.contentKey, data.contentParams) }}</mat-dialog-content>
|
|
2273
2444
|
<mat-dialog-actions align="end">
|
|
@@ -2276,13 +2447,13 @@ class DeleteArtifactConfirmationDialog {
|
|
|
2276
2447
|
</mat-dialog-actions>
|
|
2277
2448
|
`, 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"] }] });
|
|
2278
2449
|
}
|
|
2279
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DeleteArtifactConfirmationDialog, decorators: [{
|
|
2280
2451
|
type: Component,
|
|
2281
2452
|
args: [{
|
|
2282
2453
|
selector: 'app-delete-artifact-confirmation-dialog',
|
|
2283
2454
|
standalone: true,
|
|
2284
2455
|
imports: [MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatButton],
|
|
2285
|
-
providers: [provideTranslocoScope('
|
|
2456
|
+
providers: [provideTranslocoScope({ scope: 'base_entity', alias: 'base_entity' })],
|
|
2286
2457
|
template: `
|
|
2287
2458
|
<h2 mat-dialog-title>{{ t(data.titleKey) }}</h2>
|
|
2288
2459
|
<mat-dialog-content>{{ t(data.contentKey, data.contentParams) }}</mat-dialog-content>
|
|
@@ -2294,11 +2465,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2294
2465
|
}]
|
|
2295
2466
|
}] });
|
|
2296
2467
|
|
|
2468
|
+
const MIME_ICON_TABLE = [
|
|
2469
|
+
['application/pdf', 'picture_as_pdf'],
|
|
2470
|
+
[/^application\/(msword|vnd\.openxmlformats-officedocument\.wordprocessingml)/, 'description'],
|
|
2471
|
+
[/^application\/(vnd\.ms-excel|vnd\.openxmlformats-officedocument\.spreadsheetml)/, 'table_chart'],
|
|
2472
|
+
[/^application\/(vnd\.ms-powerpoint|vnd\.openxmlformats-officedocument\.presentationml)/, 'slideshow'],
|
|
2473
|
+
[/^application\/(zip|x-tar|x-7z-compressed|x-rar-compressed)/, 'folder_zip'],
|
|
2474
|
+
[/^audio\//, 'audiotrack'],
|
|
2475
|
+
[/^video\//, 'movie'],
|
|
2476
|
+
[/^text\//, 'article'],
|
|
2477
|
+
[/^image\//, 'image'],
|
|
2478
|
+
];
|
|
2297
2479
|
class ArtifactComponent extends BaseFormControlComponent {
|
|
2298
2480
|
objectStoreService = inject(ObjectStoreService);
|
|
2299
2481
|
dialog = inject(MatDialog);
|
|
2300
|
-
|
|
2301
|
-
|
|
2482
|
+
destroyRef = inject(DestroyRef);
|
|
2483
|
+
artifactSignal = signal(null, /* @ts-ignore */
|
|
2484
|
+
...(ngDevMode ? [{ debugName: "artifactSignal" }] : /* istanbul ignore next */ []));
|
|
2485
|
+
artifact = this.artifactSignal.asReadonly();
|
|
2486
|
+
thumbnailUrlSignal = signal(null, /* @ts-ignore */
|
|
2487
|
+
...(ngDevMode ? [{ debugName: "thumbnailUrlSignal" }] : /* istanbul ignore next */ []));
|
|
2488
|
+
thumbnailUrl = this.thumbnailUrlSignal.asReadonly();
|
|
2489
|
+
ngOnInit() {
|
|
2490
|
+
const control = this.formGroup.get(this.config().attrName);
|
|
2491
|
+
if (control) {
|
|
2492
|
+
this.artifactSignal.set(control.value ?? null);
|
|
2493
|
+
control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
|
|
2494
|
+
this.artifactSignal.set(value ?? null);
|
|
2495
|
+
this.refreshThumbnail();
|
|
2496
|
+
});
|
|
2497
|
+
}
|
|
2498
|
+
this.refreshThumbnail();
|
|
2499
|
+
}
|
|
2500
|
+
refreshThumbnail() {
|
|
2501
|
+
const art = this.artifact();
|
|
2502
|
+
const cfg = this.config();
|
|
2503
|
+
if (!art || cfg.showThumbnail === false || !art.mimeType?.startsWith('image/')) {
|
|
2504
|
+
this.thumbnailUrlSignal.set(null);
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
this.objectStoreService.getThumbnailUriByID(art.bucket, art.objectId).subscribe({
|
|
2508
|
+
next: (response) => this.thumbnailUrlSignal.set(response?.uri ?? null),
|
|
2509
|
+
error: () => this.thumbnailUrlSignal.set(null),
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
mimeIcon(mimeType) {
|
|
2513
|
+
if (!mimeType)
|
|
2514
|
+
return 'insert_drive_file';
|
|
2515
|
+
for (const [key, icon] of MIME_ICON_TABLE) {
|
|
2516
|
+
if (typeof key === 'string' ? mimeType === key : key.test(mimeType))
|
|
2517
|
+
return icon;
|
|
2518
|
+
}
|
|
2519
|
+
return 'insert_drive_file';
|
|
2302
2520
|
}
|
|
2303
2521
|
openArtifact(event, artifact) {
|
|
2304
2522
|
event.preventDefault();
|
|
@@ -2328,11 +2546,11 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
2328
2546
|
return;
|
|
2329
2547
|
}
|
|
2330
2548
|
const dialogData = {
|
|
2331
|
-
titleKey: '
|
|
2332
|
-
contentKey: '
|
|
2549
|
+
titleKey: 'base_entity.delete_artifact_confirmation_dialog.title',
|
|
2550
|
+
contentKey: 'base_entity.delete_artifact_confirmation_dialog.content',
|
|
2333
2551
|
contentParams: { artifactName: artifact.name },
|
|
2334
|
-
cancelButtonKey: '
|
|
2335
|
-
confirmButtonKey: '
|
|
2552
|
+
cancelButtonKey: 'base_entity.delete_artifact_confirmation_dialog.cancel_button',
|
|
2553
|
+
confirmButtonKey: 'base_entity.delete_artifact_confirmation_dialog.delete_button',
|
|
2336
2554
|
};
|
|
2337
2555
|
this.dialog
|
|
2338
2556
|
.open(DeleteArtifactConfirmationDialog, { data: dialogData })
|
|
@@ -2348,18 +2566,23 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
2348
2566
|
control?.markAsDirty();
|
|
2349
2567
|
control?.markAsTouched();
|
|
2350
2568
|
}
|
|
2351
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2352
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2569
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ArtifactComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2570
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ArtifactComponent, isStandalone: true, selector: "app-artifact", usesInheritance: true, ngImport: i0, template: `
|
|
2353
2571
|
@if (config().visible) {
|
|
2354
2572
|
@if (config().isHeading) {
|
|
2355
2573
|
<h3 [id]="config().attrName">{{ value() }}</h3>
|
|
2356
2574
|
} @else {
|
|
2357
2575
|
<div class="row">
|
|
2358
|
-
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2576
|
+
<fieldset class="base-entity-form-field" tabindex="0" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2359
2577
|
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2360
2578
|
<ul [id]="config().attrName" class="base-entity-form-list">
|
|
2361
2579
|
@if (artifact(); as artifact) {
|
|
2362
2580
|
<li>
|
|
2581
|
+
@if (thumbnailUrl(); as thumbUri) {
|
|
2582
|
+
<img class="artifact-thumbnail" [src]="thumbUri" [alt]="artifact.name" />
|
|
2583
|
+
} @else {
|
|
2584
|
+
<mat-icon class="artifact-icon">{{ mimeIcon(artifact.mimeType) }}</mat-icon>
|
|
2585
|
+
}
|
|
2363
2586
|
<a href="" (click)="openArtifact($event, artifact)">{{ artifact.name }}</a>
|
|
2364
2587
|
@if (!config().disabled) {
|
|
2365
2588
|
<button type="button" mat-icon-button class="base-entity-form-delete-button" aria-label="Delete artifact reference" (click)="deleteArtifact()">
|
|
@@ -2376,9 +2599,9 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
2376
2599
|
</div>
|
|
2377
2600
|
}
|
|
2378
2601
|
}
|
|
2379
|
-
`, 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:
|
|
2602
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ".base-entity-form-list li{display:flex;align-items:center;gap:8px}.artifact-thumbnail{width:32px;height:32px;object-fit:cover;border-radius:4px;flex-shrink:0}.artifact-icon{width:24px;height:24px;font-size:24px;line-height:24px;flex-shrink:0}\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"] }] });
|
|
2380
2603
|
}
|
|
2381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ArtifactComponent, decorators: [{
|
|
2382
2605
|
type: Component,
|
|
2383
2606
|
args: [{ selector: 'app-artifact', standalone: true, imports: [FormsModule, ReactiveFormsModule, NgClass, NgStyle, ArtifactSelectorComponent, MatIconButton, MatIcon], template: `
|
|
2384
2607
|
@if (config().visible) {
|
|
@@ -2386,11 +2609,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2386
2609
|
<h3 [id]="config().attrName">{{ value() }}</h3>
|
|
2387
2610
|
} @else {
|
|
2388
2611
|
<div class="row">
|
|
2389
|
-
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2612
|
+
<fieldset class="base-entity-form-field" tabindex="0" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2390
2613
|
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2391
2614
|
<ul [id]="config().attrName" class="base-entity-form-list">
|
|
2392
2615
|
@if (artifact(); as artifact) {
|
|
2393
2616
|
<li>
|
|
2617
|
+
@if (thumbnailUrl(); as thumbUri) {
|
|
2618
|
+
<img class="artifact-thumbnail" [src]="thumbUri" [alt]="artifact.name" />
|
|
2619
|
+
} @else {
|
|
2620
|
+
<mat-icon class="artifact-icon">{{ mimeIcon(artifact.mimeType) }}</mat-icon>
|
|
2621
|
+
}
|
|
2394
2622
|
<a href="" (click)="openArtifact($event, artifact)">{{ artifact.name }}</a>
|
|
2395
2623
|
@if (!config().disabled) {
|
|
2396
2624
|
<button type="button" mat-icon-button class="base-entity-form-delete-button" aria-label="Delete artifact reference" (click)="deleteArtifact()">
|
|
@@ -2407,23 +2635,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2407
2635
|
</div>
|
|
2408
2636
|
}
|
|
2409
2637
|
}
|
|
2410
|
-
`, 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:
|
|
2638
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ".base-entity-form-list li{display:flex;align-items:center;gap:8px}.artifact-thumbnail{width:32px;height:32px;object-fit:cover;border-radius:4px;flex-shrink:0}.artifact-icon{width:24px;height:24px;font-size:24px;line-height:24px;flex-shrink:0}\n"] }]
|
|
2411
2639
|
}] });
|
|
2412
2640
|
|
|
2413
2641
|
class LabelComponent extends BaseFormControlComponent {
|
|
2414
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2415
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2642
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2643
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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"] }] });
|
|
2416
2644
|
}
|
|
2417
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LabelComponent, decorators: [{
|
|
2418
2646
|
type: Component,
|
|
2419
2647
|
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" }]
|
|
2420
2648
|
}] });
|
|
2421
2649
|
|
|
2422
2650
|
class DatepickerComponent extends BaseFormControlComponent {
|
|
2423
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2424
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2652
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2425
2653
|
}
|
|
2426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
2427
2655
|
type: Component,
|
|
2428
2656
|
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" }]
|
|
2429
2657
|
}] });
|
|
@@ -2534,8 +2762,8 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
2534
2762
|
}
|
|
2535
2763
|
return undefined;
|
|
2536
2764
|
}
|
|
2537
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2765
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ForeignKeyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2766
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ForeignKeyComponent, isStandalone: true, selector: "base-foreign-key", usesInheritance: true, ngImport: i0, template: `
|
|
2539
2767
|
@if (config().visible) {
|
|
2540
2768
|
<div class="row" [formGroup]="formGroup" (focusin)="hasFocus.set(true)" (focusout)="onFocusOut($event)">
|
|
2541
2769
|
<div class="foreign-key-control">
|
|
@@ -2562,7 +2790,7 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
2562
2790
|
}
|
|
2563
2791
|
`, 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.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2564
2792
|
}
|
|
2565
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2793
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ForeignKeyComponent, decorators: [{
|
|
2566
2794
|
type: Component,
|
|
2567
2795
|
args: [{ selector: 'base-foreign-key', standalone: true, template: `
|
|
2568
2796
|
@if (config().visible) {
|
|
@@ -2593,46 +2821,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2593
2821
|
}] });
|
|
2594
2822
|
|
|
2595
2823
|
class TextboxComponent extends BaseFormControlComponent {
|
|
2596
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2597
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2824
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2825
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2598
2826
|
}
|
|
2599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
2600
2828
|
type: Component,
|
|
2601
2829
|
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"] }]
|
|
2602
2830
|
}] });
|
|
2603
2831
|
|
|
2604
2832
|
class DropdownComponent extends BaseFormControlComponent {
|
|
2605
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2606
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2833
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2834
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.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"] }] });
|
|
2607
2835
|
}
|
|
2608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
2609
2837
|
type: Component,
|
|
2610
2838
|
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" }]
|
|
2611
2839
|
}] });
|
|
2612
2840
|
|
|
2613
2841
|
class CheckboxComponent extends BaseFormControlComponent {
|
|
2614
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2615
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2842
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2616
2844
|
}
|
|
2617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
2618
2846
|
type: Component,
|
|
2619
2847
|
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"] }]
|
|
2620
2848
|
}] });
|
|
2621
2849
|
|
|
2622
2850
|
class RadioComponent extends BaseFormControlComponent {
|
|
2623
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2624
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2851
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2852
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
2625
2853
|
}
|
|
2626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RadioComponent, decorators: [{
|
|
2627
2855
|
type: Component,
|
|
2628
2856
|
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" }]
|
|
2629
2857
|
}] });
|
|
2630
2858
|
|
|
2631
2859
|
class TextareaComponent extends BaseFormControlComponent {
|
|
2632
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2633
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2860
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2861
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
2634
2862
|
}
|
|
2635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
2636
2864
|
type: Component,
|
|
2637
2865
|
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"] }]
|
|
2638
2866
|
}] });
|
|
@@ -2642,10 +2870,10 @@ class FlexBoxHostDirective {
|
|
|
2642
2870
|
constructor(viewContainerRef) {
|
|
2643
2871
|
this.viewContainerRef = viewContainerRef;
|
|
2644
2872
|
}
|
|
2645
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2646
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
2873
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FlexBoxHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2874
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: FlexBoxHostDirective, isStandalone: true, selector: "[flexBoxHost]", ngImport: i0 });
|
|
2647
2875
|
}
|
|
2648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FlexBoxHostDirective, decorators: [{
|
|
2649
2877
|
type: Directive,
|
|
2650
2878
|
args: [{
|
|
2651
2879
|
standalone: true,
|
|
@@ -2670,10 +2898,10 @@ class FlexBoxComponent extends BaseFormControlComponent {
|
|
|
2670
2898
|
throw new Error('Unknown flex direction');
|
|
2671
2899
|
}
|
|
2672
2900
|
}
|
|
2673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2674
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
2901
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FlexBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2902
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", 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"] }] });
|
|
2675
2903
|
}
|
|
2676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FlexBoxComponent, decorators: [{
|
|
2677
2905
|
type: Component,
|
|
2678
2906
|
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"] }]
|
|
2679
2907
|
}], propDecorators: { flexBoxHost: [{
|
|
@@ -2717,8 +2945,8 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
2717
2945
|
control?.markAsDirty();
|
|
2718
2946
|
control?.markAsTouched();
|
|
2719
2947
|
}
|
|
2720
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2721
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
2948
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TagsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2949
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TagsComponent, isStandalone: true, selector: "base-tags", usesInheritance: true, ngImport: i0, template: `
|
|
2722
2950
|
@if (config().visible) {
|
|
2723
2951
|
<div class="row" [formGroup]="formGroup">
|
|
2724
2952
|
<mat-form-field>
|
|
@@ -2739,7 +2967,7 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
2739
2967
|
}
|
|
2740
2968
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.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"] }] });
|
|
2741
2969
|
}
|
|
2742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
2970
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TagsComponent, decorators: [{
|
|
2743
2971
|
type: Component,
|
|
2744
2972
|
args: [{
|
|
2745
2973
|
selector: 'base-tags',
|
|
@@ -2813,17 +3041,17 @@ class EntityComponentRefComponent {
|
|
|
2813
3041
|
control?.markAsDirty();
|
|
2814
3042
|
control?.markAsTouched();
|
|
2815
3043
|
}
|
|
2816
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2817
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
3044
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityComponentRefComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3045
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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: `
|
|
2818
3046
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
2819
3047
|
@if (!disabled()) {
|
|
2820
3048
|
<button type="button" mat-icon-button class="base-entity-form-delete-button" aria-label="Delete component reference" (click)="removeComponent()">
|
|
2821
3049
|
<mat-icon>cancel</mat-icon>
|
|
2822
3050
|
</button>
|
|
2823
3051
|
}
|
|
2824
|
-
`, 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:
|
|
3052
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ":host{display:flex;align-items:center;gap:8px;width:100%}:host .base-entity-form-delete-button{margin-left:auto}\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"] }] });
|
|
2825
3053
|
}
|
|
2826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityComponentRefComponent, decorators: [{
|
|
2827
3055
|
type: Component,
|
|
2828
3056
|
args: [{ selector: 'app-entity-component-ref', standalone: true, imports: [MatIconButton, MatIcon], template: `
|
|
2829
3057
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
@@ -2832,7 +3060,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2832
3060
|
<mat-icon>cancel</mat-icon>
|
|
2833
3061
|
</button>
|
|
2834
3062
|
}
|
|
2835
|
-
`, 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:
|
|
3063
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n", ":host{display:flex;align-items:center;gap:8px;width:100%}:host .base-entity-form-delete-button{margin-left:auto}\n"] }]
|
|
2836
3064
|
}], 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 }] }] } });
|
|
2837
3065
|
|
|
2838
3066
|
class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
@@ -2922,11 +3150,11 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
2922
3150
|
invalidControls: controls.filter((control) => control.invalid),
|
|
2923
3151
|
};
|
|
2924
3152
|
}
|
|
2925
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
2926
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
3153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityComponentsListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: EntityComponentsListComponent, isStandalone: true, selector: "app-component-list", usesInheritance: true, ngImport: i0, template: `
|
|
2927
3155
|
@if (config().visible) {
|
|
2928
3156
|
<div class="row">
|
|
2929
|
-
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
3157
|
+
<fieldset class="base-entity-form-field" tabindex="0" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2930
3158
|
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2931
3159
|
<ul [id]="config().attrName" class="base-entity-form-list">
|
|
2932
3160
|
@for (component of components(); track component.id) {
|
|
@@ -2943,7 +3171,7 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
2943
3171
|
}
|
|
2944
3172
|
</ul>
|
|
2945
3173
|
@if (!config().disabled) {
|
|
2946
|
-
<button type="button" mat-button [title]="addComponentTitle()" [attr.aria-label]="addComponentTitle()" (click)="navigateToRelatedList()">
|
|
3174
|
+
<button type="button" mat-button class="base-entity-form-focus-action" [title]="addComponentTitle()" [attr.aria-label]="addComponentTitle()" (click)="navigateToRelatedList()">
|
|
2947
3175
|
<mat-icon>add</mat-icon>
|
|
2948
3176
|
{{ addComponentTitle() }}
|
|
2949
3177
|
</button>
|
|
@@ -2951,14 +3179,14 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
2951
3179
|
</fieldset>
|
|
2952
3180
|
</div>
|
|
2953
3181
|
}
|
|
2954
|
-
`, 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:
|
|
3182
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\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"] }] });
|
|
2955
3183
|
}
|
|
2956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: EntityComponentsListComponent, decorators: [{
|
|
2957
3185
|
type: Component,
|
|
2958
3186
|
args: [{ selector: 'app-component-list', standalone: true, imports: [NgClass, NgStyle, EntityComponentRefComponent, MatButton, MatIcon], template: `
|
|
2959
3187
|
@if (config().visible) {
|
|
2960
3188
|
<div class="row">
|
|
2961
|
-
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
3189
|
+
<fieldset class="base-entity-form-field" tabindex="0" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
2962
3190
|
<legend [ngClass]="config().labelClass">{{ config().label }}</legend>
|
|
2963
3191
|
<ul [id]="config().attrName" class="base-entity-form-list">
|
|
2964
3192
|
@for (component of components(); track component.id) {
|
|
@@ -2975,7 +3203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2975
3203
|
}
|
|
2976
3204
|
</ul>
|
|
2977
3205
|
@if (!config().disabled) {
|
|
2978
|
-
<button type="button" mat-button [title]="addComponentTitle()" [attr.aria-label]="addComponentTitle()" (click)="navigateToRelatedList()">
|
|
3206
|
+
<button type="button" mat-button class="base-entity-form-focus-action" [title]="addComponentTitle()" [attr.aria-label]="addComponentTitle()" (click)="navigateToRelatedList()">
|
|
2979
3207
|
<mat-icon>add</mat-icon>
|
|
2980
3208
|
{{ addComponentTitle() }}
|
|
2981
3209
|
</button>
|
|
@@ -2983,7 +3211,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2983
3211
|
</fieldset>
|
|
2984
3212
|
</div>
|
|
2985
3213
|
}
|
|
2986
|
-
`, 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:
|
|
3214
|
+
`, 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n"] }]
|
|
2987
3215
|
}] });
|
|
2988
3216
|
|
|
2989
3217
|
class LookupComponent extends BaseFormControlComponent {
|
|
@@ -3099,8 +3327,8 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
3099
3327
|
}
|
|
3100
3328
|
lookupStore.load({});
|
|
3101
3329
|
}
|
|
3102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
3103
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
3330
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: LookupComponent, isStandalone: true, selector: "lookup-control", usesInheritance: true, ngImport: i0, template: `
|
|
3104
3332
|
@if (config().visible) {
|
|
3105
3333
|
<div class="row" [formGroup]="formGroup">
|
|
3106
3334
|
<mat-form-field>
|
|
@@ -3125,7 +3353,7 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
3125
3353
|
}
|
|
3126
3354
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.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"] }] });
|
|
3127
3355
|
}
|
|
3128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LookupComponent, decorators: [{
|
|
3129
3357
|
type: Component,
|
|
3130
3358
|
args: [{
|
|
3131
3359
|
selector: 'lookup-control',
|
|
@@ -3159,6 +3387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3159
3387
|
}], ctorParameters: () => [] });
|
|
3160
3388
|
|
|
3161
3389
|
const FORM_CONTROL_COMPONENTS = {
|
|
3390
|
+
[FormControlType.ADDITIONAL_PROPERTIES]: AdditionalPropertiesComponent,
|
|
3162
3391
|
[FormControlType.ARTIFACT]: ArtifactComponent,
|
|
3163
3392
|
[FormControlType.CHECKBOX]: CheckboxComponent,
|
|
3164
3393
|
[FormControlType.COMPONENTS]: EntityComponentsListComponent,
|
|
@@ -3217,10 +3446,10 @@ class BaseEntityFormBuilder {
|
|
|
3217
3446
|
throw new Error('Undefined form control type');
|
|
3218
3447
|
return componentType;
|
|
3219
3448
|
}
|
|
3220
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
3221
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
3449
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3450
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFormBuilder, providedIn: 'root' });
|
|
3222
3451
|
}
|
|
3223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFormBuilder, decorators: [{
|
|
3224
3453
|
type: Injectable,
|
|
3225
3454
|
args: [{ providedIn: 'root' }]
|
|
3226
3455
|
}] });
|
|
@@ -3370,12 +3599,12 @@ class BaseEntityFormComponent {
|
|
|
3370
3599
|
this.store().setCurrentEntity(this.entity().id);
|
|
3371
3600
|
});
|
|
3372
3601
|
}
|
|
3373
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
3374
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
3602
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3603
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.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"] }] });
|
|
3375
3604
|
}
|
|
3376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFormComponent, decorators: [{
|
|
3377
3606
|
type: Component,
|
|
3378
|
-
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:
|
|
3607
|
+
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:0;list-style:none}.base-entity-form-focus-action{display:none}.base-entity-form-field:focus-within .base-entity-form-focus-action{display:revert}.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:#4a0000}.rule-violation.severity-warning{border-left-color:#f57c00;background-color:#f57c0014;color:#4a2b00}.rule-violation.severity-info{border-left-color:#1976d2;background-color:#1976d214;color:#051f47}\n"] }]
|
|
3379
3608
|
}], ctorParameters: () => [], propDecorators: { entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], componentHost: [{
|
|
3380
3609
|
type: ViewChild,
|
|
3381
3610
|
args: [BaseFormHostDirective, { static: true, read: BaseFormHostDirective }]
|
|
@@ -3565,10 +3794,10 @@ class BaseEntityListComponent {
|
|
|
3565
3794
|
canSelectEntity() {
|
|
3566
3795
|
return this.selection.selected.length === 1;
|
|
3567
3796
|
}
|
|
3568
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
3569
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
3797
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3798
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", 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 class=\"link-to-details\" (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;flex:0 0 48px;width:48px;max-width:48px}.link-to-details{text-decoration:underline;cursor:pointer}.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" }] });
|
|
3570
3799
|
}
|
|
3571
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
3800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityListComponent, decorators: [{
|
|
3572
3801
|
type: Component,
|
|
3573
3802
|
args: [{ selector: 'base-list', standalone: true, imports: [
|
|
3574
3803
|
MatTable,
|
|
@@ -3688,9 +3917,10 @@ let BaseEntityFirestoreService = class BaseEntityFirestoreService {
|
|
|
3688
3917
|
const results = await getDocs(builtQuery);
|
|
3689
3918
|
const content = results.docs.map((docSnapshot) => this.mapDocument({ id: docSnapshot.id, ...docSnapshot.data() }));
|
|
3690
3919
|
return {
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3920
|
+
number: queryCondition.page,
|
|
3921
|
+
size: queryCondition.pageSize,
|
|
3922
|
+
totalElements: content.length,
|
|
3923
|
+
totalPages: 1,
|
|
3694
3924
|
content,
|
|
3695
3925
|
};
|
|
3696
3926
|
}
|
|
@@ -3788,7 +4018,7 @@ const updateEntity = (store, repository) => {
|
|
|
3788
4018
|
};
|
|
3789
4019
|
|
|
3790
4020
|
const findByQuery = (store, repository) => {
|
|
3791
|
-
return rxMethod(pipe(tap((query) => patchState(store, {
|
|
4021
|
+
return rxMethod(pipe(tap((query) => patchState(store, { number: query.page, isLoading: true, error: undefined })),
|
|
3792
4022
|
// debounceTime(1000),
|
|
3793
4023
|
// distinctUntilChanged(),
|
|
3794
4024
|
switchMap((parameters) => repository.findByQuery(parameters).pipe(tapResponse({
|
|
@@ -3797,9 +4027,10 @@ const findByQuery = (store, repository) => {
|
|
|
3797
4027
|
const baseEntityResponse = response;
|
|
3798
4028
|
patchState(store, {
|
|
3799
4029
|
entities: baseEntityResponse.content,
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
4030
|
+
number: baseEntityResponse.number,
|
|
4031
|
+
size: baseEntityResponse.size,
|
|
4032
|
+
totalElements: baseEntityResponse.totalElements,
|
|
4033
|
+
totalPages: baseEntityResponse.totalPages,
|
|
3803
4034
|
isLoading: false,
|
|
3804
4035
|
});
|
|
3805
4036
|
}
|
|
@@ -3807,9 +4038,10 @@ const findByQuery = (store, repository) => {
|
|
|
3807
4038
|
const entities = response.slice();
|
|
3808
4039
|
patchState(store, {
|
|
3809
4040
|
entities,
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
4041
|
+
number: undefined,
|
|
4042
|
+
size: entities.length,
|
|
4043
|
+
totalElements: entities.length,
|
|
4044
|
+
totalPages: undefined,
|
|
3813
4045
|
isLoading: false,
|
|
3814
4046
|
});
|
|
3815
4047
|
}
|
|
@@ -3823,9 +4055,10 @@ const BASE_ENTITY_STORE = new InjectionToken('BASE_ENTITY_STORE');
|
|
|
3823
4055
|
function BaseEntityStore(entityType, getRepository) {
|
|
3824
4056
|
return signalStoreFeature(withState({
|
|
3825
4057
|
entities: [],
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
4058
|
+
number: 0,
|
|
4059
|
+
size: 5,
|
|
4060
|
+
totalElements: 0,
|
|
4061
|
+
totalPages: 0,
|
|
3829
4062
|
currentEntity: undefined,
|
|
3830
4063
|
currentId: undefined,
|
|
3831
4064
|
isLoading: false,
|
|
@@ -3967,10 +4200,10 @@ class BaseEntityFacade {
|
|
|
3967
4200
|
createStoreClass() {
|
|
3968
4201
|
return signalStore({ providedIn: 'root' }, BaseEntityStore(this.entityType, () => this.service), BaseEntityTabsStore(), BaseEntityContainerStore(), withDevtools(entityNameFromType(this.entityType)));
|
|
3969
4202
|
}
|
|
3970
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
3971
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.
|
|
4203
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4204
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFacade });
|
|
3972
4205
|
}
|
|
3973
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
4206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BaseEntityFacade, decorators: [{
|
|
3974
4207
|
type: Injectable
|
|
3975
4208
|
}] });
|
|
3976
4209
|
|