@processpuzzle/base-entity 0.7.9 → 0.7.10
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.
|
@@ -369,6 +369,7 @@ class BaseEntityToolbarComponent {
|
|
|
369
369
|
store;
|
|
370
370
|
isDeleteEnabled = computed(() => this.store.selectedEntities().length != 0 && !this.entityDescriptor().isAbstract, ...(ngDevMode ? [{ debugName: "isDeleteEnabled" }] : /* istanbul ignore next */ []));
|
|
371
371
|
isEditEnabled = computed(() => this.store.selectedEntities().length == 1 && !this.entityDescriptor().isAbstract, ...(ngDevMode ? [{ debugName: "isEditEnabled" }] : /* istanbul ignore next */ []));
|
|
372
|
+
isNewEnabled = computed(() => !this.entityDescriptor().isAbstract, ...(ngDevMode ? [{ debugName: "isNewEnabled" }] : /* istanbul ignore next */ []));
|
|
372
373
|
// region Angular lifecycle hooks
|
|
373
374
|
ngOnInit() {
|
|
374
375
|
this.store = this.entityDescriptor().store;
|
|
@@ -404,11 +405,11 @@ class BaseEntityToolbarComponent {
|
|
|
404
405
|
// protected, private helper methods
|
|
405
406
|
RouteSegments = RouteSegments;
|
|
406
407
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
407
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", 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 (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 (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"] }] });
|
|
408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", 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"] }] });
|
|
408
409
|
}
|
|
409
410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityToolbarComponent, decorators: [{
|
|
410
411
|
type: Component,
|
|
411
|
-
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 (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 (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" }]
|
|
412
|
+
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" }]
|
|
412
413
|
}], propDecorators: { entityDescriptor: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDescriptor", required: true }] }] } });
|
|
413
414
|
|
|
414
415
|
class BaseEntityStatusbarComponent {
|
|
@@ -2139,6 +2140,7 @@ class BaseEntityFormComponent {
|
|
|
2139
2140
|
entityDescriptor = inject(ROUTER_OUTLET_DATA);
|
|
2140
2141
|
entity = computed(() => (this.isNewObject() ? this.store().createEntity() : this.store().loadById(this.entityId())), ...(ngDevMode ? [{ debugName: "entity" }] : /* istanbul ignore next */ []));
|
|
2141
2142
|
entityId = input.required(...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
|
|
2143
|
+
isAbstract = computed(() => this.entityDescriptor().isAbstract, ...(ngDevMode ? [{ debugName: "isAbstract" }] : /* istanbul ignore next */ []));
|
|
2142
2144
|
isNewObject = computed(() => this.entityId() === BaseUrlSegments.NewEntity, ...(ngDevMode ? [{ debugName: "isNewObject" }] : /* istanbul ignore next */ []));
|
|
2143
2145
|
store = computed(() => this.entityDescriptor().store, ...(ngDevMode ? [{ debugName: "store" }] : /* istanbul ignore next */ []));
|
|
2144
2146
|
componentHost;
|
|
@@ -2193,11 +2195,11 @@ class BaseEntityFormComponent {
|
|
|
2193
2195
|
});
|
|
2194
2196
|
}
|
|
2195
2197
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2196
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", 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()\" (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\" (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"] }] });
|
|
2198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", 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"] }] });
|
|
2197
2199
|
}
|
|
2198
2200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityFormComponent, decorators: [{
|
|
2199
2201
|
type: Component,
|
|
2200
|
-
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()\" (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\" (click)=\"onSubmit()\">Save</button>\n </mat-card-actions>\n</mat-card>\n" }]
|
|
2202
|
+
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" }]
|
|
2201
2203
|
}], ctorParameters: () => [], propDecorators: { entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], componentHost: [{
|
|
2202
2204
|
type: ViewChild,
|
|
2203
2205
|
args: [BaseFormHostDirective, { static: true, read: BaseFormHostDirective }]
|
|
@@ -2380,7 +2382,7 @@ class BaseEntityListComponent {
|
|
|
2380
2382
|
return this.selection.selected.length === 1;
|
|
2381
2383
|
}
|
|
2382
2384
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", 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] !==
|
|
2385
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", 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] !== 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" }] });
|
|
2384
2386
|
}
|
|
2385
2387
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: BaseEntityListComponent, decorators: [{
|
|
2386
2388
|
type: Component,
|
|
@@ -2402,7 +2404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
2402
2404
|
MatCheckbox,
|
|
2403
2405
|
SlicePipe,
|
|
2404
2406
|
MatButton,
|
|
2405
|
-
], 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] !==
|
|
2407
|
+
], 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"] }]
|
|
2406
2408
|
}], ctorParameters: () => [], propDecorators: { sort: [{
|
|
2407
2409
|
type: ViewChild,
|
|
2408
2410
|
args: [MatSort]
|