/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { NodeEntry } from '@alfresco/js-api'; /** * Utility class for generating node and library tooltips based on node properties */ export declare class NodeTooltipUtils { /** * Generates a tooltip string for a node based on its name, title, and description properties. * The tooltip logic follows these rules: * - If both title and description exist: shows "title\ndescription" * - If only title exists: shows "name\ntitle" * - If only description exists: shows "name\ndescription" * - If neither exists: shows "name" * - Removes case-insensitive duplicates while preserving order * * @param node - The node entry to generate tooltip for * @returns The tooltip string with newline-separated lines, or null if node is invalid */ static getNodeTooltip(node: NodeEntry): string | null; /** * Generates a tooltip string for a library (site) node. * Returns description if available, otherwise title, otherwise empty string. * * @param node - The node entry to generate tooltip for * @returns The tooltip string, or empty string if no description or title is available */ static getLibraryTooltip(node: NodeEntry): string; /** * Generates a display title for a library (site) node. * If there are duplicate titles in the list, appends the library ID/name in parentheses. * * @param library - The library entry object * @param allEntries - Array of all entries to check for duplicates * @returns The display title, with ID/name appended if duplicate exists */ static getLibraryTitle(library: any, allEntries: any[]): string; /** * Removes case-insensitive duplicate strings from an array while preserving order * * @param lines - Array of strings to deduplicate * @returns Array with duplicates removed */ private static removeDuplicates; }