UNPKG

@linid-dm/directory-manager-client-core

Version:

Core package by providing a set of angular components for the Directory Manager app.

119 lines (118 loc) 7.78 kB
/** * Copyright (C) 2020-2024 Linagora * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version, provided you comply with the Additional Terms applicable for * LinID Directory Manager software by LINAGORA pursuant to Section 7 of the GNU * Affero General Public License, subsections (b), (c), and (e), pursuant to * which these Appropriate Legal Notices must notably (i) retain the display of * the "LinID™" trademark/logo at the top of the interface window, the display * of the “You are using the Open Source and free version of LinID™, powered by * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise * offer!” infobox and in the e-mails sent with the Program, notice appended to * any type of outbound messages (e.g. e-mail and meeting requests) as well as * in the LinID Directory Manager user interface, (ii) retain all hypertext * links between LinID Directory Manager and https://linid.org/, as well as * between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA * intellectual property rights over its trademarks and commercial brands. Other * Additional Terms apply, see <http://www.linagora.com/licenses/> for more * details. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License and * its applicable Additional Terms for LinID Directory Manager along with this * program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero * General Public License version 3 and <http://www.linagora.com/licenses/> for * the Additional Terms applicable to the LinID Directory Manager software. */ import { SelectionModel } from '@angular/cdk/collections'; import { AfterViewInit, EventEmitter, OnInit, QueryList, TemplateRef } from '@angular/core'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatRow, MatTableDataSource } from '@angular/material/table'; import { Router } from '@angular/router'; import { Store } from '@ngxs/store'; import { Observable } from 'rxjs'; import { IArrayAccessibility, IArrayGenericAccessibility, IAttributeActions, IConfig, IDataSourceRow, IDataTableCellElement, IEntryIds, IFilterAccessibility, IGenericArrayColumn, IPersistentUiData, IPrimitiveActions, IResourceTypeProperties, IUiEntryIds, JsTable } from '../../shared'; import * as i0 from "@angular/core"; export declare class GenericArrayComponent implements OnInit, AfterViewInit { private _store$; private _router; private _dataSource; private _selectedElementsUiIds; filter: string; dataJsTable$: Observable<JsTable<IPersistentUiData>>; filterAccessibility$: Observable<IFilterAccessibility>; arrayGenericAccessibility$: Observable<IArrayGenericAccessibility>; isClickableRow: boolean; isSelectOnlyModeEnabled: boolean; set selectedElementsUiIds(selectedElementsUiIds: IUiEntryIds[]); get selectedElementsUiIds(): IUiEntryIds[]; set dataSource(dataSource: MatTableDataSource<any>); get dataSource(): MatTableDataSource<any>; /** Array useful for Angular Material Table columns header */ columns: IGenericArrayColumn[]; /** Column ids array which allows to link Angular Material Table column headers and rows */ initialDisplayedColumns: string[]; processingRequest$?: Observable<boolean>; actions: IPrimitiveActions | IAttributeActions; resourcesTypesProperties: JsTable<IResourceTypeProperties>; configs: JsTable<IConfig>; accessibility: IArrayAccessibility; endpoint: string; canAssignOrMoveEntries: boolean; set selectedResourceRootTypeId(selectedResourceRootTypeId: string); get selectedResourceRootTypeId(): string; isAttributeArray: boolean; updateAffectAnotherResourceType: boolean; fieldForUpdate: string; isEditableArray: boolean; selectionColumnId: string; actionsColumnTemplate: TemplateRef<any>; selectedData: EventEmitter<(IDataSourceRow | IUiEntryIds)[]>; selection: SelectionModel<any>; optionsNbItemsPerPage: number[]; displayEllipsisFromTableRow: boolean; displayedColumns: string[]; private _selectedDataBeforeApplyFilter; private _selectedResourceRootTypeId; private _dataJsTable; private _modelChanged; private _onDestroy$; paginator: MatPaginator; sort: MatSort; matRows: QueryList<MatRow>; constructor(_store$: Store, _router: Router); ngOnInit(): void; ngAfterViewInit(): void; updateArraySearch(search: string): void; applyFilter(): void; clearFilterInput(): void; /** Whether the number of selected elements matches the total number of rows. */ isAllSelected(): boolean; /** Selects all rows if they are not all selected; otherwise clear selection. */ masterToggle(): void; /** The label for the checkbox on the passed row */ checkboxLabel(row?: any): string; checkSelection(): void; onKeyRedirect(link: string, id: string): void; onKeyRedirectFromRow(link: string, ids: IEntryIds): void; onKeyArrowDown(index: number): void; onKeyArrowUp(index: number): void; getRowLink(externalId: string): string; isCellValueAnArray(elementValue: string | IDataTableCellElement[]): boolean; getDisplayedValueForArray(index: number, arrayLength: number, currentValue: string): string; setEntryIdInStore(id: string, event?: any): void; setEntryIdsInStore(ids: IEntryIds): void; getCellTitle(cellValue: string | IDataTableCellElement[]): string; getTableMinHeight(): number; private _resetSelectedElementsBeforeFiltering; static ɵfac: i0.ɵɵFactoryDeclaration<GenericArrayComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GenericArrayComponent, "dm-generic-array", never, { "isClickableRow": { "alias": "isClickableRow"; "required": false; }; "isSelectOnlyModeEnabled": { "alias": "isSelectOnlyModeEnabled"; "required": false; }; "selectedElementsUiIds": { "alias": "selectedElementsUiIds"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "initialDisplayedColumns": { "alias": "initialDisplayedColumns"; "required": false; }; "processingRequest$": { "alias": "processingRequest$"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "resourcesTypesProperties": { "alias": "resourcesTypesProperties"; "required": false; }; "configs": { "alias": "configs"; "required": false; }; "accessibility": { "alias": "accessibility"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "canAssignOrMoveEntries": { "alias": "canAssignOrMoveEntries"; "required": false; }; "selectedResourceRootTypeId": { "alias": "selectedResourceRootTypeId"; "required": false; }; "isAttributeArray": { "alias": "isAttributeArray"; "required": false; }; "updateAffectAnotherResourceType": { "alias": "updateAffectAnotherResourceType"; "required": false; }; "fieldForUpdate": { "alias": "fieldForUpdate"; "required": false; }; "isEditableArray": { "alias": "isEditableArray"; "required": false; }; "selectionColumnId": { "alias": "selectionColumnId"; "required": false; }; "actionsColumnTemplate": { "alias": "actionsColumnTemplate"; "required": false; }; }, { "selectedData": "selectedData"; }, never, never, false, never>; }