@processpuzzle/base-entity 0.7.12 → 0.8.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, input, computed, Component, effect, InjectionToken, Inject, Directive, Injector, signal, Injectable, HostBinding, EventEmitter, Output, ViewChild, DestroyRef, untracked,
|
|
2
|
+
import { inject, input, computed, Component, effect, InjectionToken, Inject, Directive, Injector, signal, Injectable, HostBinding, EventEmitter, Output, ViewChild, DestroyRef, untracked, runInInjectionContext } from '@angular/core';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule, NgClass, NgStyle, NgIf, NgForOf, SlicePipe } from '@angular/common';
|
|
@@ -14,7 +14,7 @@ import { MatFormField, MatSuffix, MatFormFieldModule, MatLabel, MAT_FORM_FIELD_D
|
|
|
14
14
|
import * as i4 from '@angular/material/input';
|
|
15
15
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
16
16
|
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
|
|
17
|
-
import { signalStore, withState, withMethods, patchState, withHooks, signalStoreFeature, withProps,
|
|
17
|
+
import { signalStore, withState, withMethods, patchState, withHooks, signalStoreFeature, withProps, withComputed } from '@ngrx/signals';
|
|
18
18
|
import { withDevtools } from '@angular-architects/ngrx-toolkit';
|
|
19
19
|
import { LayoutService, RUNTIME_CONFIGURATION } from '@processpuzzle/util';
|
|
20
20
|
import { __decorate, __param } from 'tslib';
|
|
@@ -216,7 +216,7 @@ const BaseFormNavigatorSingletonStore = signalStore({ providedIn: 'root' }, with
|
|
|
216
216
|
async function navigateToDetails(entityName, id, returnTo, payload) {
|
|
217
217
|
patchState(store, { entityName });
|
|
218
218
|
pushPayload(payload);
|
|
219
|
-
if (store.activeRouteSegment()
|
|
219
|
+
if (store.activeRouteSegment() !== RouteSegments.DETAILS_ROUTE) {
|
|
220
220
|
const snakeCaseEntityName = snakeCaseName(entityName);
|
|
221
221
|
const baseUrl = determineBaseUrl();
|
|
222
222
|
const detailsFormPath = baseUrl + '/' + snakeCaseEntityName + '/' + id + '/details';
|
|
@@ -229,7 +229,7 @@ const BaseFormNavigatorSingletonStore = signalStore({ providedIn: 'root' }, with
|
|
|
229
229
|
const snakeCaseEntityName = snakeCaseName(entityName);
|
|
230
230
|
const baseUrl = determineBaseUrl();
|
|
231
231
|
const goToUrl = baseUrl + '/' + snakeCaseEntityName + '/list';
|
|
232
|
-
if (store.activeRouteSegment()
|
|
232
|
+
if (store.activeRouteSegment() !== RouteSegments.LIST_ROUTE) {
|
|
233
233
|
await navigateToUrl(goToUrl, returnTo);
|
|
234
234
|
}
|
|
235
235
|
}
|
|
@@ -247,13 +247,6 @@ const BaseFormNavigatorSingletonStore = signalStore({ providedIn: 'root' }, with
|
|
|
247
247
|
const snakeCaseEntityName = snakeCaseName(relatedTypeName);
|
|
248
248
|
const baseUrl = determineBaseUrl();
|
|
249
249
|
const listPath = baseUrl + '/' + snakeCaseEntityName + '/list';
|
|
250
|
-
// eslint-disable-next-line no-console
|
|
251
|
-
console.debug('[FormNavigator] navigateToRelatedList', {
|
|
252
|
-
relatedTypeName,
|
|
253
|
-
listPath,
|
|
254
|
-
payload,
|
|
255
|
-
requestPayloadsAfterPush: Array.from(store.requestPayloads().values()),
|
|
256
|
-
});
|
|
257
250
|
await navigateToUrl(listPath, returnTo);
|
|
258
251
|
}
|
|
259
252
|
function setEntityName(entityName) {
|
|
@@ -363,13 +356,17 @@ function BaseFormNavigatorStore(entityName) {
|
|
|
363
356
|
}
|
|
364
357
|
|
|
365
358
|
class BaseEntityToolbarComponent {
|
|
366
|
-
entityDescriptor = input.required(
|
|
359
|
+
entityDescriptor = input.required(/* @ts-ignore */
|
|
360
|
+
...(ngDevMode ? [{ debugName: "entityDescriptor" }] : /* istanbul ignore next */ []));
|
|
367
361
|
layoutService = inject(LayoutService);
|
|
368
362
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
369
363
|
store;
|
|
370
|
-
isDeleteEnabled = computed(() => this.store
|
|
371
|
-
|
|
372
|
-
|
|
364
|
+
isDeleteEnabled = computed(() => this.store?.selectedEntities().length != 0 && !this.entityDescriptor().isAbstract, /* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [{ debugName: "isDeleteEnabled" }] : /* istanbul ignore next */ []));
|
|
366
|
+
isEditEnabled = computed(() => this.store?.selectedEntities().length == 1 && !this.entityDescriptor().isAbstract, /* @ts-ignore */
|
|
367
|
+
...(ngDevMode ? [{ debugName: "isEditEnabled" }] : /* istanbul ignore next */ []));
|
|
368
|
+
isNewEnabled = computed(() => !this.entityDescriptor().isAbstract, /* @ts-ignore */
|
|
369
|
+
...(ngDevMode ? [{ debugName: "isNewEnabled" }] : /* istanbul ignore next */ []));
|
|
373
370
|
// region Angular lifecycle hooks
|
|
374
371
|
ngOnInit() {
|
|
375
372
|
this.store = this.entityDescriptor().store;
|
|
@@ -381,11 +378,15 @@ class BaseEntityToolbarComponent {
|
|
|
381
378
|
this.formNavigator.navigateToDetails(this.entityDescriptor().entityName, BaseUrlSegments.NewEntity);
|
|
382
379
|
}
|
|
383
380
|
onDeleteEntities() {
|
|
384
|
-
this.store.selectedEntities().forEach((entity) =>
|
|
381
|
+
this.store.selectedEntities().forEach((entity) => {
|
|
382
|
+
if (entity.id)
|
|
383
|
+
void this.store.delete(entity.id);
|
|
384
|
+
});
|
|
385
385
|
}
|
|
386
386
|
onEditEntity() {
|
|
387
|
-
const entityId = this.store.currentEntity()
|
|
388
|
-
|
|
387
|
+
const entityId = this.store.currentEntity()?.id;
|
|
388
|
+
if (entityId)
|
|
389
|
+
this.formNavigator.navigateToDetails(this.entityDescriptor().entityName, entityId);
|
|
389
390
|
}
|
|
390
391
|
onDoFilter($event) {
|
|
391
392
|
const filterValue = $event.target.value;
|
|
@@ -404,19 +405,22 @@ class BaseEntityToolbarComponent {
|
|
|
404
405
|
// endregion
|
|
405
406
|
// protected, private helper methods
|
|
406
407
|
RouteSegments = RouteSegments;
|
|
407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
408
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
409
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: BaseEntityToolbarComponent, isStandalone: true, selector: "base-entity-toolbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <div class=\"dense-3\" [ngStyle]=\"{'padding-top': '12px' }\">\n <mat-form-field>\n <input #filterInput [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\" placeholder=\"Filter\">\n @if (filterInput.value) {\n <button [attr.data-testid]=\"entityDescriptor().createTestId('filter-clear')\" type=\"button\" mat-icon-button matSuffix aria-label=\"Clear filter\" (click)=\"onClearFilter(filterInput)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <span class=\"toolbar-spacer\"></span>\n @if(isSmallDevice()) {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button test-id=\"menu-button\" mat-button [matMenuTriggerFor]=\"beforeMenu\"><mat-icon>menu</mat-icon> Choose action</button>\n <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-menu-item [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-menu-item [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-menu-item [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </mat-menu>\n </div>\n } @else {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-button [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-button [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-button [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </div>\n }\n</mat-toolbar>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: 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"] }] });
|
|
409
410
|
}
|
|
410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityToolbarComponent, decorators: [{
|
|
411
412
|
type: Component,
|
|
412
413
|
args: [{ selector: 'base-entity-toolbar', standalone: true, imports: [CommonModule, MatToolbarModule, MatIcon, MatFormField, MatInput, MatButton, MatIconButton, MatSuffix, MatMenu, MatMenuItem, MatMenuTrigger], template: "<mat-toolbar *ngIf=\"formNavigator.activeRouteSegment() === RouteSegments.LIST_ROUTE\">\n <div class=\"dense-3\" [ngStyle]=\"{'padding-top': '12px' }\">\n <mat-form-field>\n <input #filterInput [attr.data-testid]=\"entityDescriptor().createTestId('filter')\" matInput type=\"text\" (keyup)=\"onDoFilter( $event )\" placeholder=\"Filter\">\n @if (filterInput.value) {\n <button [attr.data-testid]=\"entityDescriptor().createTestId('filter-clear')\" type=\"button\" mat-icon-button matSuffix aria-label=\"Clear filter\" (click)=\"onClearFilter(filterInput)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-form-field>\n </div>\n <span class=\"toolbar-spacer\"></span>\n @if(isSmallDevice()) {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button test-id=\"menu-button\" mat-button [matMenuTriggerFor]=\"beforeMenu\"><mat-icon>menu</mat-icon> Choose action</button>\n <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-menu-item [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-menu-item [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-menu-item [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </mat-menu>\n </div>\n } @else {\n <div [ngClass]=\"layoutService.layoutClass()\">\n <button [attr.data-testid]=\"entityDescriptor().createTestId('edit')\" mat-button [disabled]=\"!isEditEnabled()\" (click)=\"onEditEntity()\"><mat-icon>edit</mat-icon> Edit</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('new')\" mat-button [disabled]=\"!isNewEnabled()\" (click)=\"onAddEntity()\"><mat-icon>add</mat-icon> New</button>\n <button [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-button [disabled]=\"!isDeleteEnabled()\" (click)=\"onDeleteEntities()\"><mat-icon>delete</mat-icon> Delete</button>\n </div>\n }\n</mat-toolbar>\n" }]
|
|
413
414
|
}], propDecorators: { entityDescriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDescriptor", required: true }] }] } });
|
|
414
415
|
|
|
415
416
|
class BaseEntityStatusbarComponent {
|
|
416
417
|
store;
|
|
417
|
-
entityDescriptor = input.required(
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
entityDescriptor = input.required(/* @ts-ignore */
|
|
419
|
+
...(ngDevMode ? [{ debugName: "entityDescriptor" }] : /* istanbul ignore next */ []));
|
|
420
|
+
entityTitle = computed(() => this.evaluateEntityTitle(this.entityDescriptor().entityTitle), /* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [{ debugName: "entityTitle" }] : /* istanbul ignore next */ []));
|
|
422
|
+
isVisible = computed(() => this.store != null && (this.store.currentEntity() !== undefined || this.store.selectedEntities().length === 1), /* @ts-ignore */
|
|
423
|
+
...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
420
424
|
// region Angular lifecycle hooks
|
|
421
425
|
ngOnInit() {
|
|
422
426
|
this.store = this.entityDescriptor().store;
|
|
@@ -426,11 +430,10 @@ class BaseEntityStatusbarComponent {
|
|
|
426
430
|
// endregion
|
|
427
431
|
// protected, private helper methods
|
|
428
432
|
evaluateEntityTitle(title) {
|
|
429
|
-
|
|
430
|
-
return fn(this);
|
|
433
|
+
return typeof title === 'function' ? title() : title;
|
|
431
434
|
}
|
|
432
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
433
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
435
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityStatusbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
436
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: BaseEntityStatusbarComponent, isStandalone: true, selector: "base-entity-statusbar", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
434
437
|
<mat-toolbar *ngIf="isVisible()">
|
|
435
438
|
<div>
|
|
436
439
|
<span>{{ entityTitle() }}</span>
|
|
@@ -438,7 +441,7 @@ class BaseEntityStatusbarComponent {
|
|
|
438
441
|
</mat-toolbar>
|
|
439
442
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] });
|
|
440
443
|
}
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityStatusbarComponent, decorators: [{
|
|
442
445
|
type: Component,
|
|
443
446
|
args: [{
|
|
444
447
|
selector: 'base-entity-statusbar',
|
|
@@ -456,10 +459,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
456
459
|
|
|
457
460
|
class BaseEntityTabsComponent {
|
|
458
461
|
store;
|
|
459
|
-
entityDescriptor = input.required(
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
462
|
+
entityDescriptor = input.required(/* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "entityDescriptor" }] : /* istanbul ignore next */ []));
|
|
464
|
+
selectedEntityId = computed(() => (this.store.currentId() ? this.store.currentId() : BaseUrlSegments.NewEntity), /* @ts-ignore */
|
|
465
|
+
...(ngDevMode ? [{ debugName: "selectedEntityId" }] : /* istanbul ignore next */ []));
|
|
466
|
+
detailsTabName = computed(() => this.entityDescriptor().entityName + ' - details', /* @ts-ignore */
|
|
467
|
+
...(ngDevMode ? [{ debugName: "detailsTabName" }] : /* istanbul ignore next */ []));
|
|
468
|
+
listTabName = computed(() => this.entityDescriptor().entityName + ' - list', /* @ts-ignore */
|
|
469
|
+
...(ngDevMode ? [{ debugName: "listTabName" }] : /* istanbul ignore next */ []));
|
|
463
470
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
464
471
|
constructor() {
|
|
465
472
|
this.registerEffects();
|
|
@@ -500,8 +507,8 @@ class BaseEntityTabsComponent {
|
|
|
500
507
|
}
|
|
501
508
|
});
|
|
502
509
|
}
|
|
503
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
504
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
510
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
511
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: BaseEntityTabsComponent, isStandalone: true, selector: "base-entity-tabs", inputs: { entityDescriptor: { classPropertyName: "entityDescriptor", publicName: "entityDescriptor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
505
512
|
<nav mat-tab-nav-bar [tabPanel]="tabPanel">
|
|
506
513
|
<a mat-tab-link [attr.data-testid]="entityDescriptor().createTestId('show-list')" (click)="onShowList()" [active]="store.currentTab() === listTabName()">{{ listTabName() }}</a>
|
|
507
514
|
<a
|
|
@@ -521,7 +528,7 @@ class BaseEntityTabsComponent {
|
|
|
521
528
|
</mat-tab-nav-panel>
|
|
522
529
|
`, 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"] }] });
|
|
523
530
|
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityTabsComponent, decorators: [{
|
|
525
532
|
type: Component,
|
|
526
533
|
args: [{
|
|
527
534
|
selector: 'base-entity-tabs',
|
|
@@ -552,12 +559,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
552
559
|
const ACTIVE_ENTITY_FACADE = new InjectionToken('ACTIVE_ENTITY_FACADE');
|
|
553
560
|
|
|
554
561
|
class BaseEntityContainerComponent {
|
|
555
|
-
entityDescriptor = input(undefined,
|
|
556
|
-
|
|
562
|
+
entityDescriptor = input(undefined, /* @ts-ignore */
|
|
563
|
+
...(ngDevMode ? [{ debugName: "entityDescriptor" }] : /* istanbul ignore next */ []));
|
|
564
|
+
facade = input(undefined, /* @ts-ignore */
|
|
565
|
+
...(ngDevMode ? [{ debugName: "facade" }] : /* istanbul ignore next */ []));
|
|
557
566
|
injectedFacade = inject(ACTIVE_ENTITY_FACADE, { optional: true });
|
|
558
567
|
snackBar = inject(MatSnackBar);
|
|
559
568
|
store;
|
|
560
|
-
activeFacade = computed(() => this.facade() ?? this.injectedFacade ?? undefined,
|
|
569
|
+
activeFacade = computed(() => this.facade() ?? this.injectedFacade ?? undefined, /* @ts-ignore */
|
|
570
|
+
...(ngDevMode ? [{ debugName: "activeFacade" }] : /* istanbul ignore next */ []));
|
|
561
571
|
resolvedDescriptor = computed(() => {
|
|
562
572
|
const f = this.activeFacade();
|
|
563
573
|
if (f)
|
|
@@ -567,36 +577,37 @@ class BaseEntityContainerComponent {
|
|
|
567
577
|
throw new Error('BaseEntityContainerComponent requires either [facade], ACTIVE_ENTITY_FACADE provider, or [entityDescriptor]');
|
|
568
578
|
}
|
|
569
579
|
return descriptor;
|
|
570
|
-
},
|
|
580
|
+
}, /* @ts-ignore */
|
|
581
|
+
...(ngDevMode ? [{ debugName: "resolvedDescriptor" }] : /* istanbul ignore next */ []));
|
|
571
582
|
constructor() {
|
|
572
583
|
this.registerEffects();
|
|
573
584
|
}
|
|
574
585
|
// region Angular lifecycle hooks
|
|
575
586
|
ngOnDestroy() {
|
|
576
|
-
this.store?.reset
|
|
587
|
+
this.store?.reset();
|
|
577
588
|
}
|
|
578
589
|
ngOnInit() {
|
|
579
|
-
this.store = this.activeFacade()?.store ?? this.resolvedDescriptor().store;
|
|
590
|
+
this.store = (this.activeFacade()?.store ?? this.resolvedDescriptor().store);
|
|
580
591
|
}
|
|
581
592
|
// endregion
|
|
582
593
|
// region protected, private helper methods
|
|
583
594
|
registerEffects() {
|
|
584
595
|
effect(() => {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
this.snackBar.open(
|
|
596
|
+
const errorValue = this.store?.error();
|
|
597
|
+
if (errorValue) {
|
|
598
|
+
this.snackBar.open(errorValue, 'Close', { duration: 5000 });
|
|
588
599
|
}
|
|
589
600
|
});
|
|
590
601
|
}
|
|
591
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
592
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
602
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
603
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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: `
|
|
593
604
|
<ng-content></ng-content>
|
|
594
605
|
<div>
|
|
595
606
|
<base-entity-tabs [entityDescriptor]="resolvedDescriptor()"></base-entity-tabs>
|
|
596
607
|
</div>
|
|
597
608
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: BaseEntityTabsComponent, selector: "base-entity-tabs", inputs: ["entityDescriptor"] }] });
|
|
598
609
|
}
|
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityContainerComponent, decorators: [{
|
|
600
611
|
type: Component,
|
|
601
612
|
args: [{
|
|
602
613
|
selector: 'base-entity-container',
|
|
@@ -724,7 +735,7 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
724
735
|
}
|
|
725
736
|
}
|
|
726
737
|
else
|
|
727
|
-
params =
|
|
738
|
+
params = undefined;
|
|
728
739
|
if (queryCondition.pathParams !== undefined && queryCondition.pathParams.size != 0) {
|
|
729
740
|
queryCondition.pathParams.forEach((value, key) => {
|
|
730
741
|
const pathParam = '%{' + key + '}';
|
|
@@ -739,7 +750,8 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
739
750
|
return buildUrl(this.baseUrl, urlOptions);
|
|
740
751
|
}
|
|
741
752
|
mapPagedResponse(response) {
|
|
742
|
-
const
|
|
753
|
+
const pages = response;
|
|
754
|
+
const subjectPage = pages[0];
|
|
743
755
|
const content = subjectPage.content.map((dto, index) => {
|
|
744
756
|
return this.mapEntityResponse(dto, index);
|
|
745
757
|
});
|
|
@@ -751,7 +763,7 @@ let BaseEntityRestService = class BaseEntityRestService {
|
|
|
751
763
|
};
|
|
752
764
|
}
|
|
753
765
|
mapSimpleResponse(response) {
|
|
754
|
-
if (
|
|
766
|
+
if (Array.isArray(response)) {
|
|
755
767
|
return response.map((dto, index) => {
|
|
756
768
|
return this.mapEntityResponse(dto, index);
|
|
757
769
|
});
|
|
@@ -813,10 +825,10 @@ class BaseFormHostDirective {
|
|
|
813
825
|
constructor(viewContainerRef) {
|
|
814
826
|
this.viewContainerRef = viewContainerRef;
|
|
815
827
|
}
|
|
816
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
817
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
828
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
829
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: BaseFormHostDirective, isStandalone: true, selector: "[baseFormHost]", ngImport: i0 });
|
|
818
830
|
}
|
|
819
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormHostDirective, decorators: [{
|
|
820
832
|
type: Directive,
|
|
821
833
|
args: [{
|
|
822
834
|
standalone: true,
|
|
@@ -859,19 +871,22 @@ class EntityRegistryComponent {
|
|
|
859
871
|
registry = inject(BASE_ENTITY_FACADE_REGISTRY);
|
|
860
872
|
injector = inject(Injector);
|
|
861
873
|
queryParams = toSignal(inject(ActivatedRoute).queryParamMap, { initialValue: null });
|
|
862
|
-
descriptors = signal(this.buildDescriptors(),
|
|
874
|
+
descriptors = signal(this.buildDescriptors(), /* @ts-ignore */
|
|
875
|
+
...(ngDevMode ? [{ debugName: "descriptors" }] : /* istanbul ignore next */ []));
|
|
863
876
|
registryJson = computed(() => {
|
|
864
877
|
const minified = this.queryParams()?.get('minified') === 'yes';
|
|
865
|
-
return minified ? JSON.stringify(this.descriptors()
|
|
866
|
-
},
|
|
878
|
+
return minified ? JSON.stringify(this.descriptors()) : JSON.stringify(this.descriptors(), null, 2);
|
|
879
|
+
}, /* @ts-ignore */
|
|
880
|
+
...(ngDevMode ? [{ debugName: "registryJson" }] : /* istanbul ignore next */ []));
|
|
867
881
|
buildDescriptors() {
|
|
868
|
-
return Object.
|
|
882
|
+
return Object.values(this.registry).map((facadeToken) => {
|
|
869
883
|
const facade = this.injector.get(facadeToken);
|
|
870
884
|
const descriptor = facade.descriptor;
|
|
871
885
|
const attrDescriptors = filterAttributeDescriptors(facade.descriptor.attrDescriptors);
|
|
886
|
+
const entityTitle = typeof descriptor.entityTitle === 'function' ? descriptor.entityTitle() : descriptor.entityTitle;
|
|
872
887
|
return {
|
|
873
888
|
entityName: descriptor.entityName,
|
|
874
|
-
entityTitle
|
|
889
|
+
entityTitle,
|
|
875
890
|
isAbstract: descriptor.isAbstract,
|
|
876
891
|
parentEntityName: descriptor.parentEntity,
|
|
877
892
|
attrDescriptors: attrDescriptors.map((attr) => this.serializeAttr(attr)),
|
|
@@ -904,10 +919,10 @@ class EntityRegistryComponent {
|
|
|
904
919
|
}),
|
|
905
920
|
};
|
|
906
921
|
}
|
|
907
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
908
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityRegistryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
923
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: EntityRegistryComponent, isStandalone: true, selector: "pp-entity-registry", ngImport: i0, template: ` <pre>{{ registryJson() }}</pre> `, isInline: true });
|
|
909
924
|
}
|
|
910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityRegistryComponent, decorators: [{
|
|
911
926
|
type: Component,
|
|
912
927
|
args: [{
|
|
913
928
|
selector: 'pp-entity-registry',
|
|
@@ -934,10 +949,10 @@ class BaseEntityDescriptorRegistry {
|
|
|
934
949
|
return undefined;
|
|
935
950
|
return this.injector.get(facadeToken, undefined);
|
|
936
951
|
}
|
|
937
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
938
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
952
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityDescriptorRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
953
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityDescriptorRegistry, providedIn: 'root' });
|
|
939
954
|
}
|
|
940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityDescriptorRegistry, decorators: [{
|
|
941
956
|
type: Injectable,
|
|
942
957
|
args: [{ providedIn: 'root' }]
|
|
943
958
|
}] });
|
|
@@ -963,11 +978,14 @@ function toTestId(entityName) {
|
|
|
963
978
|
}
|
|
964
979
|
|
|
965
980
|
class BaseFormControlComponent {
|
|
966
|
-
config = input.required(
|
|
967
|
-
|
|
981
|
+
config = input.required(/* @ts-ignore */
|
|
982
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
983
|
+
entity = input.required(/* @ts-ignore */
|
|
984
|
+
...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
968
985
|
formGroup;
|
|
969
986
|
store;
|
|
970
|
-
style = computed(() => this.config().style,
|
|
987
|
+
style = computed(() => this.config().style, /* @ts-ignore */
|
|
988
|
+
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
971
989
|
linkedEntityName = computed(() => {
|
|
972
990
|
const linkedEntityName = this.config().linkedEntityType;
|
|
973
991
|
if (linkedEntityName === undefined) {
|
|
@@ -975,9 +993,12 @@ class BaseFormControlComponent {
|
|
|
975
993
|
throw new Error(`linkedEntityType should be defined for '${this.config().attrName}'.`);
|
|
976
994
|
}
|
|
977
995
|
return linkedEntityName;
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
|
|
996
|
+
}, /* @ts-ignore */
|
|
997
|
+
...(ngDevMode ? [{ debugName: "linkedEntityName" }] : /* istanbul ignore next */ []));
|
|
998
|
+
linkedEntityDescriptor = computed(() => this.descriptorRegistry.getDescriptor(this.linkedEntityName()), /* @ts-ignore */
|
|
999
|
+
...(ngDevMode ? [{ debugName: "linkedEntityDescriptor" }] : /* istanbul ignore next */ []));
|
|
1000
|
+
value = input.required(/* @ts-ignore */
|
|
1001
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
981
1002
|
get testId() {
|
|
982
1003
|
const attrName = this.config()?.attrName;
|
|
983
1004
|
const entity = this.entity();
|
|
@@ -988,10 +1009,10 @@ class BaseFormControlComponent {
|
|
|
988
1009
|
logger = inject(NGXLogger);
|
|
989
1010
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
990
1011
|
descriptorRegistry = inject(BaseEntityDescriptorRegistry);
|
|
991
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
992
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
1012
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-testid": "this.testId" } }, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
993
1014
|
}
|
|
994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1015
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseFormControlComponent, decorators: [{
|
|
995
1016
|
type: Component,
|
|
996
1017
|
args: [{
|
|
997
1018
|
standalone: true,
|
|
@@ -1044,10 +1065,10 @@ class ObjectStoreService {
|
|
|
1044
1065
|
const baseConfiguration = Reflect.get(this.runtimeConfiguration, 'BASE_CONFIGURATION');
|
|
1045
1066
|
return Reflect.get(baseConfiguration, 'OBJECT_STORE_SERVICE_ROOT') ?? Reflect.get(baseConfiguration, 'BACKEND_SERVICE_ROOT') ?? '';
|
|
1046
1067
|
}
|
|
1047
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1048
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1068
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ObjectStoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1069
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ObjectStoreService, providedIn: 'root' });
|
|
1049
1070
|
}
|
|
1050
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ObjectStoreService, decorators: [{
|
|
1051
1072
|
type: Injectable,
|
|
1052
1073
|
args: [{ providedIn: 'root' }]
|
|
1053
1074
|
}] });
|
|
@@ -1116,8 +1137,8 @@ class ArtifactSelectorComponent {
|
|
|
1116
1137
|
};
|
|
1117
1138
|
return mimeTypeByExtension[extension] ?? 'application/octet-stream';
|
|
1118
1139
|
}
|
|
1119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1120
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ArtifactSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: ArtifactSelectorComponent, isStandalone: true, selector: "app-artifact-selector", outputs: { artifactUploaded: "artifactUploaded" }, ngImport: i0, template: `
|
|
1121
1142
|
<div class="artifact-selector">
|
|
1122
1143
|
@if (!isSelectorVisible) {
|
|
1123
1144
|
<button type="button" (click)="showSelector()">Upload file</button>
|
|
@@ -1147,9 +1168,9 @@ class ArtifactSelectorComponent {
|
|
|
1147
1168
|
<p>{{ errorMessage }}</p>
|
|
1148
1169
|
}
|
|
1149
1170
|
</div>
|
|
1150
|
-
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1171
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
1151
1172
|
}
|
|
1152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ArtifactSelectorComponent, decorators: [{
|
|
1153
1174
|
type: Component,
|
|
1154
1175
|
args: [{ selector: 'app-artifact-selector', standalone: true, imports: [FormsModule], template: `
|
|
1155
1176
|
<div class="artifact-selector">
|
|
@@ -1192,8 +1213,8 @@ class DeleteArtifactConfirmationDialog {
|
|
|
1192
1213
|
t(key, params) {
|
|
1193
1214
|
return this.translocoService.translate(key, params);
|
|
1194
1215
|
}
|
|
1195
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1196
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DeleteArtifactConfirmationDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: DeleteArtifactConfirmationDialog, isStandalone: true, selector: "app-delete-artifact-confirmation-dialog", providers: [provideTranslocoScope('base-entity')], ngImport: i0, template: `
|
|
1197
1218
|
<h2 mat-dialog-title>{{ t(data.titleKey) }}</h2>
|
|
1198
1219
|
<mat-dialog-content>{{ t(data.contentKey, data.contentParams) }}</mat-dialog-content>
|
|
1199
1220
|
<mat-dialog-actions align="end">
|
|
@@ -1202,7 +1223,7 @@ class DeleteArtifactConfirmationDialog {
|
|
|
1202
1223
|
</mat-dialog-actions>
|
|
1203
1224
|
`, 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"] }] });
|
|
1204
1225
|
}
|
|
1205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DeleteArtifactConfirmationDialog, decorators: [{
|
|
1206
1227
|
type: Component,
|
|
1207
1228
|
args: [{
|
|
1208
1229
|
selector: 'app-delete-artifact-confirmation-dialog',
|
|
@@ -1274,8 +1295,8 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
1274
1295
|
control?.markAsDirty();
|
|
1275
1296
|
control?.markAsTouched();
|
|
1276
1297
|
}
|
|
1277
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1278
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ArtifactComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1299
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: ArtifactComponent, isStandalone: true, selector: "app-artifact", usesInheritance: true, ngImport: i0, template: `
|
|
1279
1300
|
@if (config().visible) {
|
|
1280
1301
|
@if (config().isHeading) {
|
|
1281
1302
|
<h3 [id]="config().attrName">{{ value() }}</h3>
|
|
@@ -1304,7 +1325,7 @@ class ArtifactComponent extends BaseFormControlComponent {
|
|
|
1304
1325
|
}
|
|
1305
1326
|
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ArtifactSelectorComponent, selector: "app-artifact-selector", outputs: ["artifactUploaded"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1306
1327
|
}
|
|
1307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ArtifactComponent, decorators: [{
|
|
1308
1329
|
type: Component,
|
|
1309
1330
|
args: [{ selector: 'app-artifact', standalone: true, imports: [FormsModule, ReactiveFormsModule, NgClass, NgStyle, ArtifactSelectorComponent, MatIconButton, MatIcon], template: `
|
|
1310
1331
|
@if (config().visible) {
|
|
@@ -1337,19 +1358,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1337
1358
|
}] });
|
|
1338
1359
|
|
|
1339
1360
|
class LabelComponent extends BaseFormControlComponent {
|
|
1340
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1341
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LabelComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1362
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: LabelComponent, isStandalone: true, selector: "base-label", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <ng-container *ngIf=\"config().isHeading; else normalText\">\n <h3 [id]=\"config().attrName\">{{value()}}</h3>\n </ng-container>\n\n <ng-template #normalText>\n <p [id]=\"config().attrName\" [ngStyle]=\"config().style\">{{value()}}</p>\n </ng-template>\n</ng-container>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1342
1363
|
}
|
|
1343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LabelComponent, decorators: [{
|
|
1344
1365
|
type: Component,
|
|
1345
1366
|
args: [{ selector: 'base-label', standalone: true, imports: [NgIf, NgStyle], template: "<ng-container *ngIf=\"config().visible\">\n <ng-container *ngIf=\"config().isHeading; else normalText\">\n <h3 [id]=\"config().attrName\">{{value()}}</h3>\n </ng-container>\n\n <ng-template #normalText>\n <p [id]=\"config().attrName\" [ngStyle]=\"config().style\">{{value()}}</p>\n </ng-template>\n</ng-container>" }]
|
|
1346
1367
|
}] });
|
|
1347
1368
|
|
|
1348
1369
|
class DatepickerComponent extends BaseFormControlComponent {
|
|
1349
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1350
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DatepickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1371
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: DatepickerComponent, isStandalone: true, selector: "base-datepicker", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" style=\"margin-bottom: 10px\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{config().label}}</mat-label>\n <input matInput [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</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.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: i5.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1351
1372
|
}
|
|
1352
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
1353
1374
|
type: Component,
|
|
1354
1375
|
args: [{ selector: 'base-datepicker', standalone: true, imports: [CommonModule, FormsModule, MatFormFieldModule, MatInputModule, MatDatepickerModule, ReactiveFormsModule], template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" style=\"margin-bottom: 10px\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{config().label}}</mat-label>\n <input matInput [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</ng-container>\n" }]
|
|
1355
1376
|
}] });
|
|
@@ -1361,8 +1382,10 @@ var NavigatorCommand;
|
|
|
1361
1382
|
})(NavigatorCommand || (NavigatorCommand = {}));
|
|
1362
1383
|
|
|
1363
1384
|
class ForeignKeyComponent extends BaseFormControlComponent {
|
|
1364
|
-
hasFocus = signal(false,
|
|
1365
|
-
|
|
1385
|
+
hasFocus = signal(false, /* @ts-ignore */
|
|
1386
|
+
...(ngDevMode ? [{ debugName: "hasFocus" }] : /* istanbul ignore next */ []));
|
|
1387
|
+
selectedEntity = signal(undefined, /* @ts-ignore */
|
|
1388
|
+
...(ngDevMode ? [{ debugName: "selectedEntity" }] : /* istanbul ignore next */ []));
|
|
1366
1389
|
ngOnInit() {
|
|
1367
1390
|
this.addSelectedComponentFromNavigatorResponse();
|
|
1368
1391
|
}
|
|
@@ -1454,8 +1477,8 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
1454
1477
|
}
|
|
1455
1478
|
return undefined;
|
|
1456
1479
|
}
|
|
1457
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1458
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ForeignKeyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1481
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: ForeignKeyComponent, isStandalone: true, selector: "base-foreign-key", usesInheritance: true, ngImport: i0, template: `
|
|
1459
1482
|
@if (config().visible) {
|
|
1460
1483
|
<div class="row" [formGroup]="formGroup" (focusin)="hasFocus.set(true)" (focusout)="onFocusOut($event)">
|
|
1461
1484
|
<div class="foreign-key-control">
|
|
@@ -1480,9 +1503,9 @@ class ForeignKeyComponent extends BaseFormControlComponent {
|
|
|
1480
1503
|
<input type="hidden" [formControlName]="config().attrName" />
|
|
1481
1504
|
</div>
|
|
1482
1505
|
}
|
|
1483
|
-
`, isInline: true, styles: [".foreign-key-control{display:inline-flex;flex-direction:column;align-items:stretch}.foreign-key-field{width:100%}.foreign-key-select-row{display:flex;min-height:28px;margin-top:-18px;padding:0 12px 0 16px;justify-content:flex-start}.foreign-key-select-button{height:28px;min-width:max-content;padding:0 8px;line-height:28px;white-space:nowrap}.foreign-key-select-button mat-icon{width:18px;height:18px;margin-right:4px;font-size:18px;line-height:18px}:host .foreign-key-field .mdc-notched-outline,:host .foreign-key-field .mdc-notched-outline *{pointer-events:none}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1506
|
+
`, isInline: true, styles: [".foreign-key-control{display:inline-flex;flex-direction:column;align-items:stretch}.foreign-key-field{width:100%}.foreign-key-select-row{display:flex;min-height:28px;margin-top:-18px;padding:0 12px 0 16px;justify-content:flex-start}.foreign-key-select-button{height:28px;min-width:max-content;padding:0 8px;line-height:28px;white-space:nowrap}.foreign-key-select-button mat-icon{width:18px;height:18px;margin-right:4px;font-size:18px;line-height:18px}:host .foreign-key-field .mdc-notched-outline,:host .foreign-key-field .mdc-notched-outline *{pointer-events:none}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1484
1507
|
}
|
|
1485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: ForeignKeyComponent, decorators: [{
|
|
1486
1509
|
type: Component,
|
|
1487
1510
|
args: [{ selector: 'base-foreign-key', standalone: true, template: `
|
|
1488
1511
|
@if (config().visible) {
|
|
@@ -1513,46 +1536,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1513
1536
|
}] });
|
|
1514
1537
|
|
|
1515
1538
|
class TextboxComponent extends BaseFormControlComponent {
|
|
1516
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1517
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1539
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TextboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1540
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: TextboxComponent, isStandalone: true, selector: "base-textbox", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{config().label}}</mat-label>\n <input matInput formControlName=\"{{config().attrName}}\">\n </mat-form-field>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1518
1541
|
}
|
|
1519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
1520
1543
|
type: Component,
|
|
1521
1544
|
args: [{ selector: 'base-textbox', standalone: true, imports: [NgIf, MatFormField, MatInput, MatLabel, FormsModule, ReactiveFormsModule], template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field>\n <mat-label>{{config().label}}</mat-label>\n <input matInput formControlName=\"{{config().attrName}}\">\n </mat-form-field>\n </div>\n</ng-container>" }]
|
|
1522
1545
|
}] });
|
|
1523
1546
|
|
|
1524
1547
|
class DropdownComponent extends BaseFormControlComponent {
|
|
1525
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1526
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1548
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1549
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: DropdownComponent, isStandalone: true, selector: "base-dropdown", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"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().selectables; track option) {\n <mat-option [value]=\"option.value\">{{option.value}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }] });
|
|
1527
1550
|
}
|
|
1528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1529
1552
|
type: Component,
|
|
1530
1553
|
args: [{ selector: 'base-dropdown', standalone: true, imports: [NgIf, ReactiveFormsModule, MatLabel, MatFormField, MatSelectModule], template: "<ng-container *ngIf=\"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().selectables; track option) {\n <mat-option [value]=\"option.value\">{{option.value}}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n</ng-container>" }]
|
|
1531
1554
|
}] });
|
|
1532
1555
|
|
|
1533
1556
|
class CheckboxComponent extends BaseFormControlComponent {
|
|
1534
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1535
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1558
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: CheckboxComponent, isStandalone: true, selector: "base-checkbox", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <div [formGroup]=\"formGroup\" class=\"row\">\n <mat-checkbox [ngClass]=\"config().labelClass\" formControlName=\"{{config().attrName}}\">{{config().label}}</mat-checkbox>\n </div>\n</ng-container>", styles: ["mat-checkbox{margin-bottom:12px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1536
1559
|
}
|
|
1537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1538
1561
|
type: Component,
|
|
1539
1562
|
args: [{ selector: 'base-checkbox', standalone: true, imports: [NgClass, NgIf, MatCheckbox, FormsModule, ReactiveFormsModule], template: "<ng-container *ngIf=\"config().visible\">\n <div [formGroup]=\"formGroup\" class=\"row\">\n <mat-checkbox [ngClass]=\"config().labelClass\" formControlName=\"{{config().attrName}}\">{{config().label}}</mat-checkbox>\n </div>\n</ng-container>", styles: ["mat-checkbox{margin-bottom:12px}\n"] }]
|
|
1540
1563
|
}] });
|
|
1541
1564
|
|
|
1542
1565
|
class RadioComponent extends BaseFormControlComponent {
|
|
1543
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1544
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1567
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: RadioComponent, isStandalone: true, selector: "base-radio", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <ng-container *ngIf=\"config().label\">\n <label [for]=\"config().attrName\">{{config().label}}</label>\n </ng-container>\n <div \n [ngClass]=\"config().styleClass ? config().styleClass : ''\"\n *ngFor=\"let radio of config().selectables; let i = index\">\n <input type=\"radio\"\n class=\"form-check-input\"\n [name]=\"config().attrName\"\n [id]=\"config().attrName + i\"\n [value]=\"radio.value\"\n [checked]=\"radio.key === value()\"\n [disabled]=\"config().disabled\"\n >\n <label [for]=\"config().attrName\" [ngClass]=\"config().labelClass ? config().labelClass : ''\">{{radio.value}}</label>\n </div>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
1545
1568
|
}
|
|
1546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: RadioComponent, decorators: [{
|
|
1547
1570
|
type: Component,
|
|
1548
1571
|
args: [{ selector: 'base-radio', standalone: true, imports: [NgIf, NgClass, NgForOf, ReactiveFormsModule], template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <ng-container *ngIf=\"config().label\">\n <label [for]=\"config().attrName\">{{config().label}}</label>\n </ng-container>\n <div \n [ngClass]=\"config().styleClass ? config().styleClass : ''\"\n *ngFor=\"let radio of config().selectables; let i = index\">\n <input type=\"radio\"\n class=\"form-check-input\"\n [name]=\"config().attrName\"\n [id]=\"config().attrName + i\"\n [value]=\"radio.value\"\n [checked]=\"radio.key === value()\"\n [disabled]=\"config().disabled\"\n >\n <label [for]=\"config().attrName\" [ngClass]=\"config().labelClass ? config().labelClass : ''\">{{radio.value}}</label>\n </div>\n </div>\n</ng-container>" }]
|
|
1549
1572
|
}] });
|
|
1550
1573
|
|
|
1551
1574
|
class TextareaComponent extends BaseFormControlComponent {
|
|
1552
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1553
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1575
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1576
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: TextareaComponent, isStandalone: true, selector: "base-textarea", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field [ngClass]=\"config().styleClass\">\n <mat-label [ngClass]=\"config().labelClass\">{{config().label}}</mat-label>\n <textarea matInput formControlName=\"{{config().attrName}}\" placeholder=\"Ex. It makes me feel...\"></textarea>\n </mat-form-field>\n </div>\n</ng-container>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1554
1577
|
}
|
|
1555
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
1556
1579
|
type: Component,
|
|
1557
1580
|
args: [{ selector: 'base-textarea', standalone: true, imports: [NgIf, NgClass, MatFormField, MatInput, MatLabel, ReactiveFormsModule], template: "<ng-container *ngIf=\"config().visible\">\n <div class=\"row\" [formGroup]=\"formGroup\">\n <mat-form-field [ngClass]=\"config().styleClass\">\n <mat-label [ngClass]=\"config().labelClass\">{{config().label}}</mat-label>\n <textarea matInput formControlName=\"{{config().attrName}}\" placeholder=\"Ex. It makes me feel...\"></textarea>\n </mat-form-field>\n </div>\n</ng-container>" }]
|
|
1558
1581
|
}] });
|
|
@@ -1562,10 +1585,10 @@ class FlexBoxHostDirective {
|
|
|
1562
1585
|
constructor(viewContainerRef) {
|
|
1563
1586
|
this.viewContainerRef = viewContainerRef;
|
|
1564
1587
|
}
|
|
1565
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1566
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1588
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: FlexBoxHostDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1589
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: FlexBoxHostDirective, isStandalone: true, selector: "[flexBoxHost]", ngImport: i0 });
|
|
1567
1590
|
}
|
|
1568
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: FlexBoxHostDirective, decorators: [{
|
|
1569
1592
|
type: Directive,
|
|
1570
1593
|
args: [{
|
|
1571
1594
|
standalone: true,
|
|
@@ -1575,7 +1598,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1575
1598
|
|
|
1576
1599
|
class FlexBoxComponent extends BaseFormControlComponent {
|
|
1577
1600
|
flexBoxHost;
|
|
1578
|
-
flexBoxClass = computed(() => this.calculateFlexStyle(this.config().direction),
|
|
1601
|
+
flexBoxClass = computed(() => this.calculateFlexStyle(this.config().direction), /* @ts-ignore */
|
|
1602
|
+
...(ngDevMode ? [{ debugName: "flexBoxClass" }] : /* istanbul ignore next */ []));
|
|
1579
1603
|
// region protected, private helper methods
|
|
1580
1604
|
calculateFlexStyle(direction) {
|
|
1581
1605
|
switch (direction) {
|
|
@@ -1589,10 +1613,10 @@ class FlexBoxComponent extends BaseFormControlComponent {
|
|
|
1589
1613
|
throw new Error('Unknown flex direction');
|
|
1590
1614
|
}
|
|
1591
1615
|
}
|
|
1592
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1593
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: FlexBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1617
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", 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"] }] });
|
|
1594
1618
|
}
|
|
1595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: FlexBoxComponent, decorators: [{
|
|
1596
1620
|
type: Component,
|
|
1597
1621
|
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"] }]
|
|
1598
1622
|
}], propDecorators: { flexBoxHost: [{
|
|
@@ -1636,8 +1660,8 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
1636
1660
|
control?.markAsDirty();
|
|
1637
1661
|
control?.markAsTouched();
|
|
1638
1662
|
}
|
|
1639
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1640
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1663
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TagsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1664
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: TagsComponent, isStandalone: true, selector: "base-tags", usesInheritance: true, ngImport: i0, template: `
|
|
1641
1665
|
<ng-container *ngIf="config().visible">
|
|
1642
1666
|
<div class="row" [formGroup]="formGroup">
|
|
1643
1667
|
<mat-form-field>
|
|
@@ -1658,7 +1682,7 @@ class TagsComponent extends BaseFormControlComponent {
|
|
|
1658
1682
|
</ng-container>
|
|
1659
1683
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "component", type: MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1660
1684
|
}
|
|
1661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: TagsComponent, decorators: [{
|
|
1662
1686
|
type: Component,
|
|
1663
1687
|
args: [{
|
|
1664
1688
|
selector: 'base-tags',
|
|
@@ -1688,12 +1712,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1688
1712
|
}] });
|
|
1689
1713
|
|
|
1690
1714
|
class EntityComponentRefComponent {
|
|
1691
|
-
entity = input.required(
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1715
|
+
entity = input.required(/* @ts-ignore */
|
|
1716
|
+
...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
1717
|
+
component = input.required(/* @ts-ignore */
|
|
1718
|
+
...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
1719
|
+
componentNameAttr = input.required(/* @ts-ignore */
|
|
1720
|
+
...(ngDevMode ? [{ debugName: "componentNameAttr" }] : /* istanbul ignore next */ []));
|
|
1721
|
+
disabled = input(false, /* @ts-ignore */
|
|
1722
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
1723
|
+
formGroup = input.required(/* @ts-ignore */
|
|
1724
|
+
...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
|
|
1725
|
+
linkedEntityType = input.required(/* @ts-ignore */
|
|
1726
|
+
...(ngDevMode ? [{ debugName: "linkedEntityType" }] : /* istanbul ignore next */ []));
|
|
1697
1727
|
formNavigator = inject(BaseFormNavigatorSingletonStore);
|
|
1698
1728
|
componentName() {
|
|
1699
1729
|
const attrName = this.componentNameAttr().attrName;
|
|
@@ -1722,8 +1752,8 @@ class EntityComponentRefComponent {
|
|
|
1722
1752
|
control?.markAsDirty();
|
|
1723
1753
|
control?.markAsTouched();
|
|
1724
1754
|
}
|
|
1725
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityComponentRefComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1756
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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: `
|
|
1727
1757
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
1728
1758
|
@if (!disabled()) {
|
|
1729
1759
|
<button type="button" mat-icon-button class="base-entity-form-delete-button" aria-label="Delete component reference" (click)="removeComponent()">
|
|
@@ -1732,7 +1762,7 @@ class EntityComponentRefComponent {
|
|
|
1732
1762
|
}
|
|
1733
1763
|
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1734
1764
|
}
|
|
1735
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1765
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityComponentRefComponent, decorators: [{
|
|
1736
1766
|
type: Component,
|
|
1737
1767
|
args: [{ selector: 'app-entity-component-ref', standalone: true, imports: [MatIconButton, MatIcon], template: `
|
|
1738
1768
|
<a href="" (click)="navigateToRelated($event)">{{ componentName() }}</a>
|
|
@@ -1822,8 +1852,8 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
1822
1852
|
invalidControls: controls.filter((control) => control.invalid),
|
|
1823
1853
|
};
|
|
1824
1854
|
}
|
|
1825
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1826
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityComponentsListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1856
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: EntityComponentsListComponent, isStandalone: true, selector: "app-component-list", usesInheritance: true, ngImport: i0, template: `
|
|
1827
1857
|
@if (config().visible) {
|
|
1828
1858
|
<div class="row">
|
|
1829
1859
|
<fieldset class="base-entity-form-field" [ngClass]="config().styleClass" [ngStyle]="config().style">
|
|
@@ -1853,7 +1883,7 @@ class EntityComponentsListComponent extends BaseFormControlComponent {
|
|
|
1853
1883
|
}
|
|
1854
1884
|
`, isInline: true, styles: [":host{display:block}.base-entity-form-field{box-sizing:border-box;min-width:0;margin:0 0 16px;padding:0 12px 8px;border:var(--mat-form-field-outlined-outline-width, 1px) solid var(--mat-form-field-outlined-outline-color, rgba(0, 0, 0, .38));border-radius:var(--mat-form-field-outlined-container-shape, 4px);color:var(--mat-form-field-outlined-input-text-color, rgba(0, 0, 0, .87));font-family:var(--mat-form-field-container-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-container-text-size, 16px);font-weight:var(--mat-form-field-container-text-weight, 400);line-height:var(--mat-form-field-container-text-line-height, 24px)}.base-entity-form-field:hover{border-color:var(--mat-form-field-outlined-hover-outline-color, rgba(0, 0, 0, .87))}.base-entity-form-field legend{padding:0 4px;color:var(--mat-form-field-outlined-label-text-color, rgba(0, 0, 0, .54));font-family:var(--mat-form-field-outlined-label-text-font, Roboto, \"Helvetica Neue\", sans-serif);font-size:var(--mat-form-field-outlined-label-text-size, 12px);font-weight:var(--mat-form-field-outlined-label-text-weight, 400);line-height:1}.base-entity-form-list{min-height:24px;margin:4px 0 0;padding-left:20px}.base-entity-form-delete-button{width:24px;height:24px;padding:0;margin-left:4px;line-height:24px;vertical-align:middle}.base-entity-form-delete-button mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: EntityComponentRefComponent, selector: "app-entity-component-ref", inputs: ["entity", "component", "componentNameAttr", "disabled", "formGroup", "linkedEntityType"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1855
1885
|
}
|
|
1856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1886
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: EntityComponentsListComponent, decorators: [{
|
|
1857
1887
|
type: Component,
|
|
1858
1888
|
args: [{ selector: 'app-component-list', standalone: true, imports: [NgClass, NgStyle, EntityComponentRefComponent, MatButton, MatIcon], template: `
|
|
1859
1889
|
@if (config().visible) {
|
|
@@ -1888,10 +1918,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1888
1918
|
|
|
1889
1919
|
class LookupComponent extends BaseFormControlComponent {
|
|
1890
1920
|
displayControl = new FormControl('', { nonNullable: true });
|
|
1891
|
-
filterText = signal('',
|
|
1921
|
+
filterText = signal('', /* @ts-ignore */
|
|
1922
|
+
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
1892
1923
|
destroyRef = inject(DestroyRef);
|
|
1893
|
-
lookupStore = computed(() => this.descriptorRegistry.getStore(this.config().linkedEntityType),
|
|
1894
|
-
|
|
1924
|
+
lookupStore = computed(() => this.descriptorRegistry.getStore(this.config().linkedEntityType), /* @ts-ignore */
|
|
1925
|
+
...(ngDevMode ? [{ debugName: "lookupStore" }] : /* istanbul ignore next */ []));
|
|
1926
|
+
lookupItems = computed(() => this.lookupStore()?.entities?.() ?? [], /* @ts-ignore */
|
|
1927
|
+
...(ngDevMode ? [{ debugName: "lookupItems" }] : /* istanbul ignore next */ []));
|
|
1895
1928
|
filteredLookupItems = computed(() => {
|
|
1896
1929
|
const filterText = this.filterText().trim().toLocaleLowerCase();
|
|
1897
1930
|
const lookupItems = this.lookupItems();
|
|
@@ -1899,7 +1932,8 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
1899
1932
|
return lookupItems;
|
|
1900
1933
|
}
|
|
1901
1934
|
return lookupItems.filter((lookupItem) => this.lookupFilterValue(lookupItem).includes(filterText));
|
|
1902
|
-
},
|
|
1935
|
+
}, /* @ts-ignore */
|
|
1936
|
+
...(ngDevMode ? [{ debugName: "filteredLookupItems" }] : /* istanbul ignore next */ []));
|
|
1903
1937
|
constructor() {
|
|
1904
1938
|
super();
|
|
1905
1939
|
effect(() => {
|
|
@@ -1988,8 +2022,8 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
1988
2022
|
}
|
|
1989
2023
|
lookupStore.load({});
|
|
1990
2024
|
}
|
|
1991
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1992
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2025
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LookupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2026
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: LookupComponent, isStandalone: true, selector: "lookup-control", usesInheritance: true, ngImport: i0, template: `
|
|
1993
2027
|
<ng-container *ngIf="config().visible">
|
|
1994
2028
|
<div class="row" [formGroup]="formGroup">
|
|
1995
2029
|
<mat-form-field>
|
|
@@ -2012,9 +2046,9 @@ class LookupComponent extends BaseFormControlComponent {
|
|
|
2012
2046
|
<input type="hidden" [formControlName]="config().attrName" />
|
|
2013
2047
|
</div>
|
|
2014
2048
|
</ng-container>
|
|
2015
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.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$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.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"] }] });
|
|
2049
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$2.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$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2$2.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"] }] });
|
|
2016
2050
|
}
|
|
2017
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LookupComponent, decorators: [{
|
|
2018
2052
|
type: Component,
|
|
2019
2053
|
args: [{
|
|
2020
2054
|
selector: 'lookup-control',
|
|
@@ -2047,6 +2081,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2047
2081
|
}]
|
|
2048
2082
|
}], ctorParameters: () => [] });
|
|
2049
2083
|
|
|
2084
|
+
const FORM_CONTROL_COMPONENTS = {
|
|
2085
|
+
[FormControlType.ARTIFACT]: ArtifactComponent,
|
|
2086
|
+
[FormControlType.CHECKBOX]: CheckboxComponent,
|
|
2087
|
+
[FormControlType.COMPONENTS]: EntityComponentsListComponent,
|
|
2088
|
+
[FormControlType.DATE]: DatepickerComponent,
|
|
2089
|
+
[FormControlType.DROPDOWN]: DropdownComponent,
|
|
2090
|
+
[FormControlType.LABEL]: LabelComponent,
|
|
2091
|
+
[FormControlType.LOOKUP]: LookupComponent,
|
|
2092
|
+
[FormControlType.RADIO]: RadioComponent,
|
|
2093
|
+
[FormControlType.TEXTAREA]: TextareaComponent,
|
|
2094
|
+
[FormControlType.FLEX_BOX]: FlexBoxComponent,
|
|
2095
|
+
[FormControlType.FOREIGN_KEY]: ForeignKeyComponent,
|
|
2096
|
+
[FormControlType.TAGS]: TagsComponent,
|
|
2097
|
+
[FormControlType.TEXT_BOX]: TextboxComponent,
|
|
2098
|
+
};
|
|
2050
2099
|
class BaseEntityFormBuilder {
|
|
2051
2100
|
logger = inject(NGXLogger);
|
|
2052
2101
|
// region public methods
|
|
@@ -2058,8 +2107,7 @@ class BaseEntityFormBuilder {
|
|
|
2058
2107
|
const formControlType = this.createFormControl(column);
|
|
2059
2108
|
if (formControlType) {
|
|
2060
2109
|
if (column instanceof BaseEntityAttrDescriptor) {
|
|
2061
|
-
const
|
|
2062
|
-
const currentAttrValue = hasSnapshotValue ? initialValues[column.attrName] : Reflect.get(entity(), column.attrName);
|
|
2110
|
+
const currentAttrValue = initialValues != null && Object.hasOwn(initialValues, column.attrName) ? initialValues[column.attrName] : Reflect.get(entity(), column.attrName);
|
|
2063
2111
|
const formControl = new FormControl({ value: currentAttrValue, disabled: column.disabled }, column.required ? Validators.required : null);
|
|
2064
2112
|
baseEntityForm.addControl(column.attrName, formControl);
|
|
2065
2113
|
const componentRef = viewContainerRef.createComponent(formControlType);
|
|
@@ -2078,59 +2126,22 @@ class BaseEntityFormBuilder {
|
|
|
2078
2126
|
this.buildForm(componentRef.instance.flexBoxHost.viewContainerRef, baseEntityForm, store, column.attrDescriptors, entity, initialValues);
|
|
2079
2127
|
}
|
|
2080
2128
|
else
|
|
2081
|
-
throw Error('Undefined subclass of AbstractAttrDescriptor');
|
|
2129
|
+
throw new Error('Undefined subclass of AbstractAttrDescriptor');
|
|
2082
2130
|
}
|
|
2083
2131
|
});
|
|
2084
2132
|
}
|
|
2085
2133
|
// endregion
|
|
2086
2134
|
// region protected, private helper methods
|
|
2087
2135
|
createFormControl(column) {
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
return CheckboxComponent;
|
|
2093
|
-
}
|
|
2094
|
-
else if (column.formControlType === FormControlType.COMPONENTS) {
|
|
2095
|
-
return EntityComponentsListComponent;
|
|
2096
|
-
}
|
|
2097
|
-
else if (column.formControlType === FormControlType.DATE) {
|
|
2098
|
-
return DatepickerComponent;
|
|
2099
|
-
}
|
|
2100
|
-
else if (column.formControlType === FormControlType.DROPDOWN) {
|
|
2101
|
-
return DropdownComponent;
|
|
2102
|
-
}
|
|
2103
|
-
else if (column.formControlType === FormControlType.LABEL) {
|
|
2104
|
-
return LabelComponent;
|
|
2105
|
-
}
|
|
2106
|
-
else if (column.formControlType === FormControlType.LOOKUP) {
|
|
2107
|
-
return LookupComponent;
|
|
2108
|
-
}
|
|
2109
|
-
else if (column.formControlType === FormControlType.RADIO) {
|
|
2110
|
-
return RadioComponent;
|
|
2111
|
-
}
|
|
2112
|
-
else if (column.formControlType === FormControlType.TEXTAREA) {
|
|
2113
|
-
return TextareaComponent;
|
|
2114
|
-
}
|
|
2115
|
-
else if (column.formControlType === FormControlType.FLEX_BOX) {
|
|
2116
|
-
return FlexBoxComponent;
|
|
2117
|
-
}
|
|
2118
|
-
else if (column.formControlType === FormControlType.FOREIGN_KEY) {
|
|
2119
|
-
return ForeignKeyComponent;
|
|
2120
|
-
}
|
|
2121
|
-
else if (column.formControlType === FormControlType.TAGS) {
|
|
2122
|
-
return TagsComponent;
|
|
2123
|
-
}
|
|
2124
|
-
else if (column.formControlType === FormControlType.TEXT_BOX) {
|
|
2125
|
-
return TextboxComponent;
|
|
2126
|
-
}
|
|
2127
|
-
else
|
|
2128
|
-
throw Error('Undefined form control type');
|
|
2136
|
+
const componentType = FORM_CONTROL_COMPONENTS[column.formControlType];
|
|
2137
|
+
if (!componentType)
|
|
2138
|
+
throw new Error('Undefined form control type');
|
|
2139
|
+
return componentType;
|
|
2129
2140
|
}
|
|
2130
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2131
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2142
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFormBuilder, providedIn: 'root' });
|
|
2132
2143
|
}
|
|
2133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFormBuilder, decorators: [{
|
|
2134
2145
|
type: Injectable,
|
|
2135
2146
|
args: [{ providedIn: 'root' }]
|
|
2136
2147
|
}] });
|
|
@@ -2138,11 +2149,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2138
2149
|
class BaseEntityFormComponent {
|
|
2139
2150
|
baseEntityForm;
|
|
2140
2151
|
entityDescriptor = inject(ROUTER_OUTLET_DATA);
|
|
2141
|
-
entity = computed(() => (this.isNewObject() ? this.store().createEntity() : this.store().loadById(this.entityId())),
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2152
|
+
entity = computed(() => (this.isNewObject() ? this.store().createEntity() : this.store().loadById(this.entityId())), /* @ts-ignore */
|
|
2153
|
+
...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
2154
|
+
entityId = input.required(/* @ts-ignore */
|
|
2155
|
+
...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
|
|
2156
|
+
isAbstract = computed(() => this.entityDescriptor().isAbstract, /* @ts-ignore */
|
|
2157
|
+
...(ngDevMode ? [{ debugName: "isAbstract" }] : /* istanbul ignore next */ []));
|
|
2158
|
+
isNewObject = computed(() => this.entityId() === BaseUrlSegments.NewEntity, /* @ts-ignore */
|
|
2159
|
+
...(ngDevMode ? [{ debugName: "isNewObject" }] : /* istanbul ignore next */ []));
|
|
2160
|
+
store = computed(() => this.entityDescriptor().store, /* @ts-ignore */
|
|
2161
|
+
...(ngDevMode ? [{ debugName: "store" }] : /* istanbul ignore next */ []));
|
|
2146
2162
|
componentHost;
|
|
2147
2163
|
entityFormBuilder = inject((BaseEntityFormBuilder));
|
|
2148
2164
|
formBuilder = inject(FormBuilder);
|
|
@@ -2194,10 +2210,10 @@ class BaseEntityFormComponent {
|
|
|
2194
2210
|
this.store().setCurrentEntity(this.entity().id);
|
|
2195
2211
|
});
|
|
2196
2212
|
}
|
|
2197
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2198
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "
|
|
2213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", 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()\">\n <ng-template baseFormHost></ng-template>\n </form>\n </mat-card-content>\n <mat-card-actions>\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" mat-raised-button color=\"secondary\" (click)=\"onCancel()\">Cancel</button>\n <button id=\"delete\" [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"isNewObject() || isAbstract()\" (click)=\"onDelete()\">Delete</button>\n <button id=\"submit\" [attr.data-testid]=\"entityDescriptor().createTestId('save')\" mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"baseEntityForm.invalid || !baseEntityForm.dirty || isAbstract()\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n", dependencies: [{ kind: "directive", type: BaseFormHostDirective, selector: "[baseFormHost]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
|
|
2199
2215
|
}
|
|
2200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFormComponent, decorators: [{
|
|
2201
2217
|
type: Component,
|
|
2202
2218
|
args: [{ selector: 'base-form', standalone: true, imports: [BaseFormHostDirective, ReactiveFormsModule, MatCard, MatCardContent, MatCardActions, MatButton], providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }], template: "<mat-card appearance=\"outlined\" class=\"dense-3\">\n <mat-card-content>\n <form [formGroup]=\"baseEntityForm\" (ngSubmit)=\"onSubmit()\">\n <ng-template baseFormHost></ng-template>\n </form>\n </mat-card-content>\n <mat-card-actions>\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" mat-raised-button color=\"secondary\" (click)=\"onCancel()\">Cancel</button>\n <button id=\"delete\" [attr.data-testid]=\"entityDescriptor().createTestId('delete')\" mat-raised-button color=\"primary\" type=\"button\" [disabled]=\"isNewObject() || isAbstract()\" (click)=\"onDelete()\">Delete</button>\n <button id=\"submit\" [attr.data-testid]=\"entityDescriptor().createTestId('save')\" mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"baseEntityForm.invalid || !baseEntityForm.dirty || isAbstract()\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n" }]
|
|
2203
2219
|
}], ctorParameters: () => [], propDecorators: { entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], componentHost: [{
|
|
@@ -2245,18 +2261,21 @@ class BaseEntityListComponent {
|
|
|
2245
2261
|
objectStoreService = inject(ObjectStoreService);
|
|
2246
2262
|
columnDescriptors = computed(() => {
|
|
2247
2263
|
return filterAttributeDescriptors(this.entityDescriptor().attrDescriptors);
|
|
2248
|
-
},
|
|
2264
|
+
}, /* @ts-ignore */
|
|
2265
|
+
...(ngDevMode ? [{ debugName: "columnDescriptors" }] : /* istanbul ignore next */ []));
|
|
2249
2266
|
displayedColumns = computed(() => {
|
|
2250
2267
|
const columns = this.columnDescriptors()
|
|
2251
2268
|
.filter((column) => column.hideInTable !== true)
|
|
2252
2269
|
.map((column) => column.attrName);
|
|
2253
2270
|
columns.unshift('select');
|
|
2254
2271
|
return columns;
|
|
2255
|
-
},
|
|
2272
|
+
}, /* @ts-ignore */
|
|
2273
|
+
...(ngDevMode ? [{ debugName: "displayedColumns" }] : /* istanbul ignore next */ []));
|
|
2256
2274
|
sort = {};
|
|
2257
2275
|
paginator = {};
|
|
2258
2276
|
store;
|
|
2259
|
-
selectOrCreateMode = signal(false,
|
|
2277
|
+
selectOrCreateMode = signal(false, /* @ts-ignore */
|
|
2278
|
+
...(ngDevMode ? [{ debugName: "selectOrCreateMode" }] : /* istanbul ignore next */ []));
|
|
2260
2279
|
requestPayload;
|
|
2261
2280
|
constructor() {
|
|
2262
2281
|
this.store = this.entityDescriptor().store;
|
|
@@ -2382,10 +2401,10 @@ class BaseEntityListComponent {
|
|
|
2382
2401
|
canSelectEntity() {
|
|
2383
2402
|
return this.selection.selected.length === 1;
|
|
2384
2403
|
}
|
|
2385
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2386
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2405
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", 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)\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== undefined && element[colDescriptor.attrName] !== null ) {\n @let artifact = element[colDescriptor.attrName];\n <a (click)=\"onDownloadObject(artifact, $event)\">{{ ((artifact.name ?? artifact.objectId ?? '') | slice:0:20) + ((artifact.name ?? artifact.objectId ?? '').length > 20 ? '...' : '') }}</a>\n } @else if (colDescriptor.formControlType === 'TAGS' && element[colDescriptor.attrName] !== undefined ) {\n {{ (element[colDescriptor.attrName].join(', ') | slice:0:20) + (element[colDescriptor.attrName].join(', ').length > 20 ? '...' : '') }}\n } @else {\n {{ element[colDescriptor.attrName] }}\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"displayedColumns()\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns()\"></mat-row>\n </mat-table>\n <div class=\"base-entity-list-footer\">\n @if (selectOrCreateMode()) {\n <div class=\"base-entity-list-actions\">\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" type=\"button\" mat-raised-button color=\"secondary\" (click)=\"onCancelSelectOrCreate()\">Cancel</button>\n <button id=\"select\" [attr.data-testid]=\"entityDescriptor().createTestId( 'select')\" type=\"button\" mat-raised-button color=\"primary\" [disabled]=\"!canSelectEntity()\" (click)=\"onSelectEntity()\">Select</button>\n </div>\n }\n <mat-paginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n </div>\n</div>\n", styles: [".base-entity-list{display:flex;flex-direction:column;max-height:500px;min-width:300px}.mat-table{overflow:auto;max-height:500px}.mat-column-select{overflow:visible}.mat-column-select{overflow:initial}.mat-mdc-row:hover{background-color:#6495ed;cursor:pointer}.base-entity-list-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.base-entity-list-actions{display:flex;gap:8px;padding-left:16px}\n"], dependencies: [{ kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SlicePipe, name: "slice" }] });
|
|
2387
2406
|
}
|
|
2388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityListComponent, decorators: [{
|
|
2389
2408
|
type: Component,
|
|
2390
2409
|
args: [{ selector: 'base-list', standalone: true, imports: [
|
|
2391
2410
|
MatTable,
|
|
@@ -2405,7 +2424,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2405
2424
|
MatCheckbox,
|
|
2406
2425
|
SlicePipe,
|
|
2407
2426
|
MatButton,
|
|
2408
|
-
], template: "@if (store.isLoading()) {\n <mat-progress-bar mode=\"query\"></mat-progress-bar>\n}\n<div class=\"base-entity-list mat-elevation-z8\">\n <mat-table [dataSource]=\"dataSource\" matSort aria-describedby=\"base-entity-list\">\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? onToggleAllRows() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null; onChangeSelection(row)\" [checked]=\"selection.isSelected(row)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n\n @for (colDescriptor of columnDescriptors(); track colDescriptor.attrName; let i = $index) {\n <ng-container [matColumnDef]=\"colDescriptor.attrName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{ colDescriptor.label }}</mat-header-cell>\n <mat-cell (click)=\"onRowClick(element)\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== 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:visible}.mat-column-select{overflow:initial}.mat-mdc-row:hover{background-color:#6495ed;cursor:pointer}.base-entity-list-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.base-entity-list-actions{display:flex;gap:8px;padding-left:16px}\n"] }]
|
|
2427
|
+
], template: "@if (store.isLoading()) {\n <mat-progress-bar mode=\"query\"></mat-progress-bar>\n}\n<div class=\"base-entity-list mat-elevation-z8\">\n <mat-table [dataSource]=\"dataSource\" matSort aria-describedby=\"base-entity-list\">\n <!-- Checkbox Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? onToggleAllRows() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null; onChangeSelection(row)\" [checked]=\"selection.isSelected(row)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n\n @for (colDescriptor of columnDescriptors(); track colDescriptor.attrName; let i = $index) {\n <ng-container [matColumnDef]=\"colDescriptor.attrName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>{{ colDescriptor.label }}</mat-header-cell>\n <mat-cell (click)=\"onRowClick(element)\" *matCellDef=\"let element\">\n @if (colDescriptor.isLinkToDetails) {\n <a (click)=\"onNavigateToDetails(element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.linkedEntityType !== undefined ) {\n <a (click)=\"onNavigateToRelated(colDescriptor, element)\">{{ element[colDescriptor.attrName] }}</a>\n } @else if (colDescriptor.formControlType === 'ARTIFACT' && element[colDescriptor.attrName] !== undefined && element[colDescriptor.attrName] !== null ) {\n @let artifact = element[colDescriptor.attrName];\n <a (click)=\"onDownloadObject(artifact, $event)\">{{ ((artifact.name ?? artifact.objectId ?? '') | slice:0:20) + ((artifact.name ?? artifact.objectId ?? '').length > 20 ? '...' : '') }}</a>\n } @else if (colDescriptor.formControlType === 'TAGS' && element[colDescriptor.attrName] !== undefined ) {\n {{ (element[colDescriptor.attrName].join(', ') | slice:0:20) + (element[colDescriptor.attrName].join(', ').length > 20 ? '...' : '') }}\n } @else {\n {{ element[colDescriptor.attrName] }}\n }\n </mat-cell>\n </ng-container>\n }\n <mat-header-row *matHeaderRowDef=\"displayedColumns()\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns()\"></mat-row>\n </mat-table>\n <div class=\"base-entity-list-footer\">\n @if (selectOrCreateMode()) {\n <div class=\"base-entity-list-actions\">\n <button id=\"cancel\" [attr.data-testid]=\"entityDescriptor().createTestId('cancel')\" type=\"button\" mat-raised-button color=\"secondary\" (click)=\"onCancelSelectOrCreate()\">Cancel</button>\n <button id=\"select\" [attr.data-testid]=\"entityDescriptor().createTestId( 'select')\" type=\"button\" mat-raised-button color=\"primary\" [disabled]=\"!canSelectEntity()\" (click)=\"onSelectEntity()\">Select</button>\n </div>\n }\n <mat-paginator [pageSizeOptions]=\"[10, 20, 50]\" showFirstLastButtons></mat-paginator>\n </div>\n</div>\n", styles: [".base-entity-list{display:flex;flex-direction:column;max-height:500px;min-width:300px}.mat-table{overflow:auto;max-height:500px}.mat-column-select{overflow:visible}.mat-column-select{overflow:initial}.mat-mdc-row:hover{background-color:#6495ed;cursor:pointer}.base-entity-list-footer{display:flex;align-items:center;justify-content:space-between;gap:16px}.base-entity-list-actions{display:flex;gap:8px;padding-left:16px}\n"] }]
|
|
2409
2428
|
}], ctorParameters: () => [], propDecorators: { sort: [{
|
|
2410
2429
|
type: ViewChild,
|
|
2411
2430
|
args: [MatSort]
|
|
@@ -2489,53 +2508,43 @@ let BaseEntityFirestoreService = class BaseEntityFirestoreService {
|
|
|
2489
2508
|
async addAsync(entity) {
|
|
2490
2509
|
const newDoc = entity.id ? doc(this.collection, entity.id) : doc(this.collection);
|
|
2491
2510
|
await setDoc(newDoc, this.mapEntity(entity));
|
|
2492
|
-
|
|
2493
|
-
return new Promise((resolve, reject) => {
|
|
2494
|
-
resolve(this.mapDocument(savedEntity));
|
|
2495
|
-
reject(new Error('Failed to update entity: ' + entity));
|
|
2496
|
-
});
|
|
2511
|
+
return this.mapDocument({ ...entity, id: newDoc.id });
|
|
2497
2512
|
}
|
|
2498
2513
|
createQuery(queryCondition) {
|
|
2499
2514
|
let orderBys = [];
|
|
2500
|
-
if (queryCondition.orderBys
|
|
2501
|
-
orderBys = queryCondition.orderBys
|
|
2515
|
+
if (queryCondition.orderBys?.length) {
|
|
2516
|
+
orderBys = queryCondition.orderBys.map((orderByCondition) => {
|
|
2502
2517
|
const name = Object.keys(OrderByDirection).filter((key) => key === orderByCondition.direction);
|
|
2503
2518
|
const direction = Object.values(OrderByDirection).filter((value) => value === name[0]);
|
|
2504
2519
|
return orderBy(orderByCondition.property, direction[0]);
|
|
2505
2520
|
});
|
|
2506
2521
|
}
|
|
2507
2522
|
let wheres = [];
|
|
2508
|
-
if (queryCondition.filters
|
|
2509
|
-
wheres =
|
|
2510
|
-
queryCondition.filters?.map((filter) => {
|
|
2511
|
-
return where(filter.property, filter.operator, filter.value);
|
|
2512
|
-
}) ?? [];
|
|
2523
|
+
if (queryCondition.filters?.length) {
|
|
2524
|
+
wheres = queryCondition.filters.map((filter) => where(filter.property, filter.operator, filter.value));
|
|
2513
2525
|
}
|
|
2514
2526
|
return query(this.collection, ...wheres, ...orderBys, limit(queryCondition.pageSize ?? 99));
|
|
2515
2527
|
}
|
|
2516
2528
|
async findByQueryAsync(queryCondition) {
|
|
2517
|
-
const
|
|
2518
|
-
const results = await getDocs(
|
|
2519
|
-
const content =
|
|
2520
|
-
|
|
2521
|
-
content.push(this.mapDocument({ id: doc.id, ...doc.data() }));
|
|
2522
|
-
});
|
|
2523
|
-
return Promise.resolve({
|
|
2529
|
+
const builtQuery = this.createQuery(queryCondition);
|
|
2530
|
+
const results = await getDocs(builtQuery);
|
|
2531
|
+
const content = results.docs.map((docSnapshot) => this.mapDocument({ id: docSnapshot.id, ...docSnapshot.data() }));
|
|
2532
|
+
return {
|
|
2524
2533
|
page: queryCondition.page,
|
|
2525
2534
|
pageSize: queryCondition.pageSize,
|
|
2526
2535
|
totalPageCount: 1,
|
|
2527
2536
|
content,
|
|
2528
|
-
}
|
|
2537
|
+
};
|
|
2529
2538
|
}
|
|
2530
|
-
mapCollection(
|
|
2539
|
+
mapCollection(source) {
|
|
2531
2540
|
const entities = [];
|
|
2532
|
-
|
|
2533
|
-
documents.forEach((
|
|
2541
|
+
source.pipe(map((documents) => {
|
|
2542
|
+
documents.forEach((docData) => entities.push(this.mapDocument(docData)));
|
|
2534
2543
|
}));
|
|
2535
2544
|
return entities;
|
|
2536
2545
|
}
|
|
2537
|
-
mapDocument(
|
|
2538
|
-
const entity = this.entityMapper.fromDto(
|
|
2546
|
+
mapDocument(docData) {
|
|
2547
|
+
const entity = this.entityMapper.fromDto(docData);
|
|
2539
2548
|
assertPersistedEntity(entity);
|
|
2540
2549
|
return entity;
|
|
2541
2550
|
}
|
|
@@ -2690,13 +2699,13 @@ function BaseEntityStore(entityType, getRepository) {
|
|
|
2690
2699
|
},
|
|
2691
2700
|
resetErrorState: () => patchState(store, { error: undefined }),
|
|
2692
2701
|
selectEntity: (id) => {
|
|
2693
|
-
const foundEntity = store.entities()
|
|
2694
|
-
if (foundEntity
|
|
2702
|
+
const foundEntity = store.entities().length > 0 ? store.entities().filter((entity) => entity.id === id) : undefined;
|
|
2703
|
+
if (foundEntity?.length === 1 && !store.selectedEntities().includes(foundEntity[0])) {
|
|
2695
2704
|
patchState(store, { selectedEntities: store.selectedEntities().concat(foundEntity) });
|
|
2696
2705
|
}
|
|
2697
2706
|
},
|
|
2698
2707
|
setCurrentEntity: (id) => {
|
|
2699
|
-
const foundEntity =
|
|
2708
|
+
const foundEntity = id != null && store.entities().length > 0 ? store.entities().filter((entity) => entity.id === id) : undefined;
|
|
2700
2709
|
if (foundEntity && foundEntity.length > 0) {
|
|
2701
2710
|
patchState(store, { currentEntity: foundEntity[0], currentId: foundEntity[0].id });
|
|
2702
2711
|
}
|
|
@@ -2707,11 +2716,6 @@ function BaseEntityStore(entityType, getRepository) {
|
|
|
2707
2716
|
})), withHooks((store) => ({
|
|
2708
2717
|
onInit: () => {
|
|
2709
2718
|
store.load({});
|
|
2710
|
-
if (isDevMode()) {
|
|
2711
|
-
watchState(store, (state) => {
|
|
2712
|
-
// console.log('[Base Entity Store] state changed:', state);
|
|
2713
|
-
});
|
|
2714
|
-
}
|
|
2715
2719
|
},
|
|
2716
2720
|
})), withComputed((store) => ({
|
|
2717
2721
|
countOfEntities: computed(() => store.entities().length),
|
|
@@ -2783,7 +2787,8 @@ class BaseEntityFacade {
|
|
|
2783
2787
|
return this.descriptor.attrDescriptors;
|
|
2784
2788
|
}
|
|
2785
2789
|
get entityTitle() {
|
|
2786
|
-
|
|
2790
|
+
const title = this.descriptor.entityTitle;
|
|
2791
|
+
return typeof title === 'function' ? title() : title;
|
|
2787
2792
|
}
|
|
2788
2793
|
createMapper() {
|
|
2789
2794
|
return new SimpleEntityMapper(this.entityType);
|
|
@@ -2805,10 +2810,10 @@ class BaseEntityFacade {
|
|
|
2805
2810
|
createStoreClass() {
|
|
2806
2811
|
return signalStore({ providedIn: 'root' }, BaseEntityStore(this.entityType, () => this.service), BaseEntityTabsStore(), BaseEntityContainerStore());
|
|
2807
2812
|
}
|
|
2808
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2809
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2813
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2814
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFacade });
|
|
2810
2815
|
}
|
|
2811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: BaseEntityFacade, decorators: [{
|
|
2812
2817
|
type: Injectable
|
|
2813
2818
|
}] });
|
|
2814
2819
|
|