@linid-dm/directory-manager-client-core
Version:
Core package by providing a set of angular components for the Directory Manager app.
73 lines (72 loc) • 5.49 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 { IConfig } from '../interfaces/configs.interface';
import { IData, IDataItem, IDataNode, IDataNodeIdsFields, IEntryIds } from '../interfaces/data.interface';
import { IResourceTypeRequestDetail } from '../interfaces/resources-types.interface';
import { JsTable } from './jstable.helper';
export declare function buildTree(dataTree: JsTable<IData>, configs: JsTable<IConfig>, treeRequestsDetails: IResourceTypeRequestDetail[]): IDataNode[];
export declare function buildTreeLevel(nodesByParentId: {
[id: string]: any[];
}, typesEndpoint: {
[id: string]: string;
}, allIds: string[], currentResourceTypeId: string, nameModelRef: {
[id: string]: string;
}, parentIdForDisplay?: any, parentIds?: IEntryIds, levelForPadding?: number, parentLink?: string): IDataNode[];
export declare function sortDataNodeByName(dataNode: IDataNode[]): IDataNode[];
export declare function compareDataNodesNames(nodeA: IDataNode, nodeB: IDataNode): number;
export declare function cleanAssignDialogTree(dataTree: IDataNode[], assignedResourceTypeId: string): IDataNode[];
export declare function convertDataNodeToDataItem(node: IDataNode, displayedFieldId: string): IDataItem;
export declare function getFlattenTreeIds(dataTree: IDataNode[]): string[];
export declare function getFlattenTree(dataTree: IDataNode[]): IDataNode[];
export declare function getNodeById(id: string, tree: IDataNode[]): IDataNode;
export declare function addNodeInDataTree(rootNodes: IDataNode[], parentNodeId: string, nodeToAdd: IDataNode): void;
export declare function cloneDataTree(dataTree: IDataNode[]): IDataNode[];
export declare function deepCopy(obj: any): any;
export declare function filterTree(dataTree: IDataNode[], allNodesIdsNames: IDataNodeIdsFields[], searchFilter: string, isFilteringOnExternalId: boolean, isAdvancedSearchActivated: boolean, idsMatchingAdvancedSearch: {
[id: string]: true;
}): IDataNode[];
export declare function isNodeMatchingSearch(searchValue: string, nodeName: string, isFilteringOnExternalId?: boolean, nodeIds?: IEntryIds, isAdvancedSearchActivated?: boolean, idsMatchingAdvancedSearch?: {
[id: string]: true;
}, checkEmptySearch?: boolean): boolean;
export declare function getAllChildrenLength(node: IDataNode, expandedNodesIds?: string[]): number;
export declare function getFirstDisplayedIndex(flattenDataTreeIds: string[], selectedNodeId: string, nbMaxDisplayedNodes: number): number;
export declare function getFlattenDisplayedTreeIds(dataTree: IDataNode[], expandedNodesIds: Set<string>): string[];
export declare function getGreatestNodesMinWidth(nodeWidthMap: Map<string, number>, currentNodeMaxWidth: number): number;
export declare function getSelectedNodes(selectedNodeId: string, tree: IDataNode[], currentNodeUuId?: string): string[];
export declare function setNodeIdWidthMap(nodeWidthMap: Map<string, number>, flattenDataTreeIds: string[], isSelectOnlyModeEnabled: boolean): void;
export declare function getMatTreePadding(): number;
export declare function updateNodeName(selectedNodeId: string, dataTree: IDataNode[], newNodeName: string): void;
export declare function updateSubTreelinks(nodeId: string, dataTree: IDataNode[], newExternalId?: string): void;
export declare function getFlattenTreeWithoutTriggeredNodeChildren(dataTree: IDataNode[], triggerNodeId: string): IDataNode[];
export declare function getParentNodeId(childNodeId: string, dataTree: IDataNode[]): string;