@linid-dm/directory-manager-client-core
Version:
Core package by providing a set of angular components for the Directory Manager app.
90 lines (89 loc) • 6.86 kB
TypeScript
/**
* 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 { HttpErrorResponse } from '@angular/common/http';
import { Store } from '@ngxs/store';
import { Observable } from 'rxjs';
import { DataViewProperties } from '../helpers/data-table.helper';
import { JsTable } from '../helpers/jstable.helper';
import { IArrayAttributeUpdateParams, IAttribute, IAttributeActions, IConfig, IGetDataListParams } from '../interfaces/configs.interface';
import { IArrayAttributeDoingRequest, IClickableDataDetailResource, IData, IDataDetailResource, IDataNode, IDataSourceRow, IDataTableRow, IEditableArrayProperties, IGenericArrayColumn, ILink, IRequestsProperties, IUiEntryIds } from '../interfaces/data.interface';
import { FormFieldsExtendedSingleTypes } from '../interfaces/form.interface';
import { IResourceType } from '../interfaces/resources-types.interface';
import { IAssignElements, IMoveElements } from '../interfaces/ui.interface';
import { DataService } from '../services/data.service';
import { ErrorsHandlerService } from '../services/errors-handler.service';
export declare class DisplayedDetailArray {
attributeId: string;
isEditableArray: boolean;
label: string;
icon: string;
emptyArrayPlaceholder: string;
viewProperties: DataViewProperties;
actions: IAttributeActions;
resourceTypeConfig: IConfig;
typesLabels: string;
selectedElementsUiIds: IUiEntryIds[];
succeededElements: (IUiEntryIds | IDataSourceRow | IDataNode)[];
failedElements404: (IUiEntryIds | IDataSourceRow | IDataNode)[];
endpoint: string;
updateParams: IArrayAttributeUpdateParams;
initialSource: any[];
associatedData: {
[attributeId: string]: IData;
};
requestsParams: IGetDataListParams;
updateAffectAnotherResourceType: boolean;
fieldForUpdate: string;
canDeleteEntries: boolean;
constructor(selectedResourceTypeId: string, configs: JsTable<IConfig>, attributeAsArray: IArrayAttributeDoingRequest, resourceTypeId: string[]);
constructor(selectedResourceTypeId: string, configs: JsTable<IConfig>, attributeAsArray: IArrayAttributeDoingRequest, resourcesTypesIds: string[], dataResourcesAsFlatArray: any[] | IDataTableRow[]);
constructor(selectedResourceTypeId: string, configs: JsTable<IConfig>, attributeAsArray: IArrayAttributeDoingRequest, resourcesTypesIds: string[], dataResourcesAsFlatArray: any[] | IDataTableRow[], editableArrayProperties: IEditableArrayProperties);
constructor(selectedResourceTypeId: string, configs: JsTable<IConfig>, attributeAsArray: IArrayAttributeDoingRequest, resourcesTypesIds: string[], dataResourcesAsFlatArray: any[] | IDataTableRow[], editableArrayProperties: IEditableArrayProperties, isEditableAttribute: boolean);
}
export declare function convertDataNodeToDataSourceRow(node: IDataNode, columns: IGenericArrayColumn[], resourceTypes: JsTable<IResourceType>, isClickable?: boolean): IDataSourceRow;
export declare function getArrayAttributeDoingRequestsDetail(attributeConfig: IAttribute, data: any[]): IArrayAttributeDoingRequest;
export declare function getArrayAttributeResourcesTypesIds(attributeConfig: IAttribute): string[];
export declare function getAttributeValues(requestsProperties: IRequestsProperties, dataService: DataService, errorsHandlerService: ErrorsHandlerService, attributeDoingRequestsDetails: IArrayAttributeDoingRequest, store: Store, attributeConfig: IAttribute): Observable<IData | Error | HttpErrorResponse>;
export declare function getElementId(selectedElement: IUiEntryIds | IDataSourceRow | IDataNode): string;
export declare function getDataSourceRowsWithAssociatedValue(rows: IDataSourceRow[], updateActionsParams: IArrayAttributeUpdateParams, associatedValue: {
[id: string]: FormFieldsExtendedSingleTypes;
}): IDataSourceRow[];
export declare function isDataNode(element: any): boolean;
export declare function getElementExternalId(selectedElement: IUiEntryIds | IDataSourceRow | IDataNode): string;
export declare function getNotSelectedRows(dataSource: IDataSourceRow[], selectedElementsIds: string[]): IDataSourceRow[];
export declare function getSelectedElements(event: IMoveElements | IUiEntryIds[] | IAssignElements | IDataSourceRow[]): (IUiEntryIds | IDataSourceRow | IDataNode)[];
export declare function getElementLabel(selectedElement: IUiEntryIds | IDataSourceRow | IDataNode): string;
export declare function setRequestsProperties(attributeDoingRequests: IArrayAttributeDoingRequest, selectedEntryId: string): IRequestsProperties;
export declare function getElementIds(selectedElement: IUiEntryIds | IDataSourceRow | IDataNode): IUiEntryIds;
export declare function setLinkAttributeResource(data: ILink | ILink[], endpoint: string, authorizedEndpoints: string[]): IDataDetailResource | IClickableDataDetailResource | (IDataDetailResource | IClickableDataDetailResource)[];