UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

50 lines (49 loc) 2.26 kB
import { UserValue } from '../../../data-fields/user-field/models/user-value'; import { FormControl } from '@angular/forms'; import { SideMenuControl } from '../../models/side-menu-control'; import { UserListInjectedData } from './model/user-list-injected-data'; import { ProcessRole } from '../../../resources/interface/process-role'; import * as i0 from "@angular/core"; /** * Is the main - parent component of the entire user assignment in the side menu. * * Holds logic link of the [UserAssignListComponent]{@link AbstractUserAssignListComponent} * along with searching, selecting, and then assigning to the user field. */ export declare abstract class AbstractUserAssignComponent { protected _sideMenuControl: SideMenuControl; /** * Form control for user search value. */ searchUserControl: FormControl<any>; /** * Data about preselected user send from [UserFieldComponent]{@link AbstractUserFieldComponent}. */ injectedData: UserListInjectedData; /** * Value of the current selected user. */ protected _currentUser: UserValue; /** * Inject and set data send from [UserFieldComponent]{@link AbstractUserFieldComponent} if the user is preselected. * @param _sideMenuControl Contains [Roles]{@link ProcessRole} and [UserValue]{@link UserValue}. */ protected constructor(_sideMenuControl: SideMenuControl); /** * The user that is initially selected, or `undefined` if none is */ get initiallySelectedUser(): UserValue | undefined; get roles(): Array<string> | Array<ProcessRole>; get negativeRoles(): Array<string> | Array<ProcessRole>; /** * On select user from users assign list publish side menu with selected user as data and message about selection. * @param user Select current user as [UserValue]{@link UserValue} */ userWasSelected(user: UserValue): void; /** * On assign button close side menu with selected user as data and message about confirm. */ assign(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AbstractUserAssignComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AbstractUserAssignComponent, "ncc-abstract-user-assign", never, {}, {}, never, never, false, never>; }