import * as i0 from '@angular/core'; import { InjectionToken, PipeTransform, AfterViewInit, ChangeDetectorRef, ElementRef, ViewContainerRef, Renderer2, OnInit, OnDestroy, TemplateRef } from '@angular/core'; import { EnumValue, ILuOnOpenSubscriber, ILuOnScrollBottomSubscriber, ILuOnCloseSubscriber, LuTranslation } from '@lucca-front/ng/core'; import * as _lucca_front_ng_user from '@lucca-front/ng/user'; import { Overlay } from '@angular/cdk/overlay'; import { ControlValueAccessor, FormGroup } from '@angular/forms'; import { LuOptionComparer, ILuOptionOperator } from '@lucca-front/ng/option'; import { ILuInputWithPicker } from '@lucca-front/ng/picker'; import { ALuSelectInputComponent } from '@lucca-front/ng/select'; import { Observable, Subject } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ALuApiService, ILuApiService, LuApiV3Service } from '@lucca-front/ng/api'; declare enum LuDisplayFullname { firstlast = "fl", lastfirst = "lf", first = "f", last = "l" } declare enum LuDisplayInitials { firstlast = "FL", lastfirst = "LF", last = "L", first = "F" } declare enum LuDisplayHybrid { firstIlastFull = "Fl", firstFulllastI = "fL", lastIfirstFull = "Lf", lastFullfirstI = "lF" } type LuDisplayFormat = EnumValue | EnumValue | EnumValue; /** Injection token that can be used to change the default displayed user format. */ declare const LU_DEFAULT_DISPLAY_POLICY: InjectionToken; interface LuUserDisplayInput { firstName: string; lastName: string; } /** * Displays a user name according to specified format. Supported formats: f for first name, * F for first initial, l for last name, L for last initial. */ declare function luUserDisplay(user?: LuUserDisplayInput, format?: LuDisplayFormat): string; /** * Displays a user name according to specified format. Supported formats: f for first name, * F for first initial, l for last name, L for last initial. */ declare function luUsersDisplay(users: LuUserDisplayInput[], options: LuUserDisplayMultipleOptions): string; type LuUserDisplaySingleOptions = LuDisplayFormat | { format: LuDisplayFormat; }; type LuUserDisplayMultipleOptions = { format: LuDisplayFormat; separator: string; } | { format: LuDisplayFormat; formatter: Intl.ListFormat; }; /** * Displays a user name according to specified format. Supported formats: f for first name, * F for first initial, l for last name, L for last initial. */ declare class LuUserDisplayPipe implements PipeTransform { private readonly defaultFormat; transform(user: T, options?: Partial): string; transform(users: T[], options?: Partial): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * @deprecated use `LuUserDisplayPipe` imports && `LuUserDisplayPipe` providers instead */ declare class LuUserDisplayModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface LuUserTileUserInput { picture?: { href: string; } | null; pictureHref?: string | null; firstName: string; lastName: string; jobTitle?: string | null; } /** * Displays user picture and name. LuUserTileUserInput's role can be specified, and the footer is customizable. */ declare class LuUserTileComponent { #private; /** * LuUserTileUserInput to display. */ readonly user: i0.InputSignal; /** * User Display format. * It is set to 'LU_DEFAULT_DISPLAY_POLICY' by default */ readonly displayFormat: i0.InputSignal; /** * LuUserTileUserInput role to display */ readonly role: i0.InputSignal; /** * Which size should the user tile be? Defaults to medium */ readonly size: i0.InputSignal<"L" | "XS" | "S" | "M">; readonly displayPictureFormat: i0.Signal<_lucca_front_ng_user.LuDisplayInitials>; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated use `LuUserTileComponent` instead */ declare class LuUserTileModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface LuUserPictureUserInput { picture?: { href: string; } | null; pictureHref?: string | null; firstName: string; lastName: string; } /** * Displays user's picture or a placeholder with his/her initials and random bg color' */ declare class LuUserPictureComponent { #private; /** * User Display format. * It is set to 'LU_DEFAULT_DISPLAY_POLICY' by default */ readonly displayFormat: i0.InputSignal; readonly user: i0.InputSignal; readonly AI: i0.InputSignalWithTransform; readonly size: i0.InputSignal<"L" | "XS" | "S" | "M" | "XL" | "XXL" | "XXXL">; /** * Image loading attribute * It is set to 'lazy' by default * * (more info: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading) */ readonly imageLoadingAttribute: i0.InputSignal<"eager" | "lazy">; readonly initials: i0.Signal; readonly modSize: i0.Signal; readonly hasPicture: i0.WritableSignal; readonly pictureHref: i0.WritableSignal; readonly style: i0.WritableSignal<{ 'background-color': string; } | { 'background-color'?: undefined; }>; pictureError(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated use `LuUserPictureComponent` instead */ declare class LuUserPictureModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface ILuUser { id: number; firstName: string; lastName: string; picture?: { href: string; }; pictureHref?: string; jobTitle?: string; additionalInformation?: string; } /** * @deprecated prefer SimpleSelect or MultipleSelect with luCustomUsers directive */ declare class LuUserSelectInputComponent extends ALuSelectInputComponent implements ControlValueAccessor, ILuInputWithPicker, AfterViewInit { protected _changeDetectorRef: ChangeDetectorRef; protected _overlay: Overlay; protected _elementRef: ElementRef; protected _viewContainerRef: ViewContainerRef; protected _renderer: Renderer2; searchFormat: LuDisplayFullname; set inputPlaceholder(p: string); fields: string; filters: string[]; orderBy: string; appInstanceId: number | string; operations: number[]; enableFormerEmployees: boolean; disablePrincipal: boolean; clue: string; byId: LuOptionComparer; intl: i0.InputSignalWithTransform<_lucca_front_ng_user.ILuUserSelectInputLabel, Partial<_lucca_front_ng_user.ILuUserSelectInputLabel>>; constructor(_changeDetectorRef: ChangeDetectorRef, _overlay: Overlay, _elementRef: ElementRef, _viewContainerRef: ViewContainerRef, _renderer: Renderer2); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-user-select", never, { "inputPlaceholder": { "alias": "placeholder"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "orderBy": { "alias": "orderBy"; "required": false; }; "appInstanceId": { "alias": "appInstanceId"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "enableFormerEmployees": { "alias": "enableFormerEmployees"; "required": false; }; "disablePrincipal": { "alias": "disablePrincipal"; "required": false; }; "intl": { "alias": "intl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } /** * @deprecated prefer SimpleSelect or MultipleSelect with luCustomUsers directive */ declare class LuUserSelectInputModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface ILuUserService extends ILuApiService { getMe(): Observable; } declare abstract class ALuUserService extends ALuApiService implements ILuUserService { abstract getMe(): Observable; } declare class LuUserV3Service extends LuApiV3Service implements ILuUserService { protected _http: HttpClient; protected _appInstanceId: number | string; set appInstanceId(appInstanceId: number | string); protected _operations: number[]; set operations(operations: number[]); constructor(_http: HttpClient); getMe(): Observable; get url(): string; protected _get(url: string): Observable; protected _clueFilter(clue: string): string; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class LuUserPagedSearcherComponent implements OnInit, OnDestroy, ILuOnOpenSubscriber, ILuOnScrollBottomSubscriber, ILuOnCloseSubscriber { private _service; private _subs; fixed: boolean; searchInput: ElementRef; set fields(fields: string); set filters(filters: string[]); set orderBy(orderBy: string); set appInstanceId(appInstanceId: number | string); set operations(operations: number[]); enableFormerEmployees: boolean; clueChange: Observable; form: FormGroup; outOptions$: Subject; loading$: Observable; empty$: Observable; private _loading; private _isOpened$; private _page$; private _isLastPage; private _options; intl: i0.InputSignalWithTransform<_lucca_front_ng_user.ILuUserSearcherLabel, Partial<_lucca_front_ng_user.ILuUserSearcherLabel>>; constructor(hostService: LuUserV3Service, selfService: LuUserV3Service); ngOnInit(): void; ngOnDestroy(): void; onOpen(): void; onScrollBottom(): void; onClose(): void; reset(): void; static ɵfac: i0.ɵɵFactoryDeclaration, [{ optional: true; skipSelf: true; }, { self: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-user-paged-searcher", never, { "fields": { "alias": "fields"; "required": false; }; "filters": { "alias": "filters"; "required": false; }; "orderBy": { "alias": "orderBy"; "required": false; }; "appInstanceId": { "alias": "appInstanceId"; "required": false; }; "operations": { "alias": "operations"; "required": false; }; "enableFormerEmployees": { "alias": "enableFormerEmployees"; "required": false; }; "intl": { "alias": "intl"; "required": false; "isSignal": true; }; }, { "clueChange": "clueChange"; }, never, never, true, never>; } /** * @deprecated use `LuUserPagedSearcherComponent` instead */ declare class LuUserSearcherModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface ILuUserHomonymsService { extractHomonyms(users: U[]): U[]; enrichHomonyms(homonyms: U[]): Observable; } declare abstract class ALuUserHomonymsService implements ILuUserHomonymsService { abstract extractHomonyms(users: U[]): U[]; abstract enrichHomonyms(homonyms: U[]): Observable; } declare class LuUserHomonymsService extends ALuUserHomonymsService implements ILuUserHomonymsService { private _pipe; private _http; private _format; extractHomonyms(users: U[]): U[]; enrichHomonyms(homonyms: U[]): Observable; constructor(_pipe: LuUserDisplayPipe, _http: HttpClient); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class LuUserHomonymsComponent implements ILuOptionOperator { set inOptions$(in$: Observable); private _outOptions$; get outOptions$(): Observable; private _service; constructor(hostService: ILuUserHomonymsService, selfService: ILuUserHomonymsService); static ɵfac: i0.ɵɵFactoryDeclaration, [{ optional: true; skipSelf: true; }, { self: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-user-homonyms", never, {}, {}, never, never, true, never>; } declare class LuUserMeOptionDirective implements ILuOptionOperator { private _vcr; private _templateRef; set luUserMeOptionFields(fields: string); set luUserMeOptionFilters(filters: string[]); set luUserMeOptionOrderBy(orderBy: string); set luUserMeOptionAppInstanceId(appInstanceId: number | string); set luUserMeOptionOperations(operations: number[]); set luUserMeOptionClue(clue: string); set inOptions$(in$: Observable); outOptions$: Observable; private _service; private _viewRef; constructor(hostService: LuUserV3Service, selfService: LuUserV3Service, _vcr: ViewContainerRef, _templateRef: TemplateRef<{ $implicit: U; }>); me: ILuUser; private meDisplayed$; onOpen(): void; displayMe(): void; hideMe(): void; static ɵfac: i0.ɵɵFactoryDeclaration, [{ optional: true; skipSelf: true; }, { self: true; }, null, null]>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[luUserMeOption]", never, { "luUserMeOptionFields": { "alias": "luUserMeOptionFields"; "required": false; }; "luUserMeOptionFilters": { "alias": "luUserMeOptionFilters"; "required": false; }; "luUserMeOptionOrderBy": { "alias": "luUserMeOptionOrderBy"; "required": false; }; "luUserMeOptionAppInstanceId": { "alias": "luUserMeOptionAppInstanceId"; "required": false; }; "luUserMeOptionOperations": { "alias": "luUserMeOptionOperations"; "required": false; }; "luUserMeOptionClue": { "alias": "luUserMeOptionClue"; "required": false; }; }, {}, never, never, true, never>; } /** * @deprecated use `LuUserMeOptionDirective` instead */ declare class LuUserMeOptionModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @deprecated prefer SimpleSelect or MultipleSelect with luCustomUsers directive */ declare class LuUserSelectModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const LU_USER_SELECT_INPUT_TRANSLATIONS: InjectionToken>; interface ILuUserSelectInputLabel { users: string; me: string; } declare const luUserSelectInputTranslations: LuTranslation; declare const LU_USER_SEARCHER_TRANSLATIONS: InjectionToken>; interface ILuUserSearcherLabel { includeFormerEmployees: string; } declare const luUserSearcherTranslations: LuTranslation; /** * @deprecated use `LuUserDisplayPipe, LuUserPictureComponent, LuUserTileComponent` instead */ declare class LuUserModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { ALuUserHomonymsService, ALuUserService, LU_DEFAULT_DISPLAY_POLICY, LU_USER_SEARCHER_TRANSLATIONS, LU_USER_SELECT_INPUT_TRANSLATIONS, LuDisplayFullname, LuDisplayHybrid, LuDisplayInitials, LuUserDisplayModule, LuUserDisplayPipe, LuUserHomonymsComponent, LuUserHomonymsService, LuUserMeOptionDirective, LuUserMeOptionModule, LuUserModule, LuUserPagedSearcherComponent, LuUserPictureComponent, LuUserPictureModule, LuUserSearcherModule, LuUserSelectInputComponent, LuUserSelectInputModule, LuUserSelectModule, LuUserTileComponent, LuUserTileModule, LuUserV3Service, luUserDisplay, luUserSearcherTranslations, luUserSelectInputTranslations, luUsersDisplay }; export type { ILuUser, ILuUserHomonymsService, ILuUserSearcherLabel, ILuUserSelectInputLabel, ILuUserService, LuDisplayFormat, LuUserDisplayInput, LuUserDisplayMultipleOptions, LuUserDisplaySingleOptions, LuUserPictureUserInput, LuUserTileUserInput };