@netgrif/components
Version:
Netgrif Application Engine frontend Angular components
38 lines • 15.4 kB
JavaScript
import { Component, Inject } from '@angular/core';
import { AbstractUserAssignComponent, NAE_SIDE_MENU_CONTROL, UserListService } from '@netgrif/components-core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ngbracket/ngx-layout";
import * as i3 from "@angular/material/button";
import * as i4 from "@angular/material/icon";
import * as i5 from "@angular/material/input";
import * as i6 from "@angular/material/form-field";
import * as i7 from "@angular/material/toolbar";
import * as i8 from "@angular/forms";
import * as i9 from "./user-assign-list/user-assign-list.component";
import * as i10 from "@ngx-translate/core";
import * as i11 from "@netgrif/components-core";
/**
* @deprecated
* Is the main - parent component of the entire user assignment in the side menu.
*
* Holds logic link of the [UserAssignListComponent]{@link UserAssignListComponent}
* along with searching, selecting, and then assigning to the user field.
*/
export class UserAssignComponent extends AbstractUserAssignComponent {
_sideMenuControl;
constructor(_sideMenuControl) {
super(_sideMenuControl);
this._sideMenuControl = _sideMenuControl;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserAssignComponent, deps: [{ token: NAE_SIDE_MENU_CONTROL }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: UserAssignComponent, selector: "nc-user-assign", providers: [UserListService], usesInheritance: true, ngImport: i0, template: "<div class=\"full-width full-height\" fxLayout=\"column\" fxLayoutAlign=\"start stretch\">\n <mat-toolbar color=\"primary\">{{ 'side-menu.user.assign' | translate | uppercase }}</mat-toolbar>\n <div class=\"user-assign-container side-menu-root\" fxLayout=\"column\" fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"netgrif-input netgrif-input-fix\">\n <mat-icon fxFlex class=\"search-icon\">search</mat-icon>\n <mat-form-field fxFlex=\"100\" class=\"user-assign-search\" color=\"primary\" appearance=\"outline\">\n <input matInput placeholder=\"{{ 'side-menu.user.choose' | translate }}\"\n [formControl]=\"searchUserControl\">\n <button mat-button *ngIf=\"searchUserControl.value\" matSuffix mat-icon-button\n (click)=\"searchUserControl.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <nc-user-assign-list fxFlex\n [searchUserControl]=\"searchUserControl\"\n [roles]=\"roles\"\n [negativeRoles]=\"negativeRoles\"\n [initiallySelectedUser]=\"initiallySelectedUser\"\n (userSelected)=\"userWasSelected($event)\">\n </nc-user-assign-list>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-raised-button color=\"primary\"\n (click)=\"assign()\">{{ 'tasks.view.assign' | translate | uppercase }}</button>\n </div>\n </div>\n</div>\n", styles: [".full-height{height:100%;min-height:100%}.full-width{width:100%;min-width:100%}.padding-default{padding:8px}.padding-half{padding:4px}.padding-x2{padding:16px}.margin-default{margin:8px}.margin-half{margin:4px}.margin-x2{margin:16px}.margin-top-default{margin-top:8px}.margin-top-half{margin-top:4px}.margin-top-x2{margin-top:16px}.margin-bottom-default{margin-bottom:8px}.margin-bottom-half{margin-bottom:4px}.margin-bottom-x2{margin-bottom:16px}.margin-left-default{margin-left:8px}.margin-left-half{margin-left:4px}.margin-left-x2{margin-left:16px}.margin-right-default{margin-right:8px}.margin-right-half{margin-right:4px}.margin-right-x2{margin-right:16px}.user-assign-container{padding:16px;position:relative}.user-assign-search{width:100%}.search-icon{margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.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: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i9.UserAssignListComponent, selector: "nc-user-assign-list" }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i10.TranslatePipe, name: "translate" }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserAssignComponent, decorators: [{
type: Component,
args: [{ selector: 'nc-user-assign', providers: [UserListService], template: "<div class=\"full-width full-height\" fxLayout=\"column\" fxLayoutAlign=\"start stretch\">\n <mat-toolbar color=\"primary\">{{ 'side-menu.user.assign' | translate | uppercase }}</mat-toolbar>\n <div class=\"user-assign-container side-menu-root\" fxLayout=\"column\" fxFlex>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"netgrif-input netgrif-input-fix\">\n <mat-icon fxFlex class=\"search-icon\">search</mat-icon>\n <mat-form-field fxFlex=\"100\" class=\"user-assign-search\" color=\"primary\" appearance=\"outline\">\n <input matInput placeholder=\"{{ 'side-menu.user.choose' | translate }}\"\n [formControl]=\"searchUserControl\">\n <button mat-button *ngIf=\"searchUserControl.value\" matSuffix mat-icon-button\n (click)=\"searchUserControl.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n\n <nc-user-assign-list fxFlex\n [searchUserControl]=\"searchUserControl\"\n [roles]=\"roles\"\n [negativeRoles]=\"negativeRoles\"\n [initiallySelectedUser]=\"initiallySelectedUser\"\n (userSelected)=\"userWasSelected($event)\">\n </nc-user-assign-list>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <button mat-raised-button color=\"primary\"\n (click)=\"assign()\">{{ 'tasks.view.assign' | translate | uppercase }}</button>\n </div>\n </div>\n</div>\n", styles: [".full-height{height:100%;min-height:100%}.full-width{width:100%;min-width:100%}.padding-default{padding:8px}.padding-half{padding:4px}.padding-x2{padding:16px}.margin-default{margin:8px}.margin-half{margin:4px}.margin-x2{margin:16px}.margin-top-default{margin-top:8px}.margin-top-half{margin-top:4px}.margin-top-x2{margin-top:16px}.margin-bottom-default{margin-bottom:8px}.margin-bottom-half{margin-bottom:4px}.margin-bottom-x2{margin-bottom:16px}.margin-left-default{margin-left:8px}.margin-left-half{margin-left:4px}.margin-left-x2{margin-left:16px}.margin-right-default{margin-right:8px}.margin-right-half{margin-right:4px}.margin-right-x2{margin-right:16px}.user-assign-container{padding:16px;position:relative}.user-assign-search{width:100%}.search-icon{margin-right:10px}\n"] }]
}], ctorParameters: () => [{ type: i11.SideMenuControl, decorators: [{
type: Inject,
args: [NAE_SIDE_MENU_CONTROL]
}] }] });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0b24gKm5nSWY9XCJzZWFyY2hVc2VyQ29udHJvbC52YWx1ZVwiIG1hdFN1ZmZpeCBtYXQtaWNvbi1idXR0b25cbiAgICAgICAgICAgICAgICAgICAgICAgIChjbGljayk9XCJzZWFyY2hVc2VyQ29udHJvbC5zZXRWYWx1ZSgnJylcIj5cbiAgICAgICAgICAgICAgICAgICAgPG1hdC1pY29uPmNsb3NlPC9tYXQtaWNvbj5cbiAgICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gICAgICAgIDwvZGl2PlxuXG4gICAgICAgIDxuYy11c2VyLWFzc2lnbi1saXN0IGZ4RmxleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc2VhcmNoVXNlckNvbnRyb2xdPVwic2VhcmNoVXNlckNvbnRyb2xcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm9sZXNdPVwicm9sZXNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbmVnYXRpdmVSb2xlc109XCJuZWdhdGl2ZVJvbGVzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2luaXRpYWxseVNlbGVjdGVkVXNlcl09XCJpbml0aWFsbHlTZWxlY3RlZFVzZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodXNlclNlbGVjdGVkKT1cInVzZXJXYXNTZWxlY3RlZCgkZXZlbnQpXCI+XG4gICAgICAgIDwvbmMtdXNlci1hc3NpZ24tbGlzdD5cblxuICAgICAgICA8ZGl2IGZ4TGF5b3V0PVwicm93XCIgZnhMYXlvdXRBbGlnbj1cImVuZCBjZW50ZXJcIj5cbiAgICAgICAgICAgIDxidXR0b24gbWF0LXJhaXNlZC1idXR0b24gY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgICAgICAgKGNsaWNrKT1cImFzc2lnbigpXCI+e3sgJ3Rhc2tzLnZpZXcuYXNzaWduJyB8IHRyYW5zbGF0ZSB8IHVwcGVyY2FzZSB9fTwvYnV0dG9uPlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbjwvZGl2PlxuIl19