pptx-automizer
Version:
A template based pptx generator
53 lines (52 loc) • 2.08 kB
TypeScript
import { XmlElement } from '../types/xml-types';
import IArchive from '../interfaces/iarchive';
import { Target } from '../types/types';
/**
* Hyperlink processing utilities
*/
export declare class HyperlinkProcessor {
private static readonly HYPERLINK_TAG;
private static readonly RELATIONSHIP_ATTRIBUTE;
/**
* Finds all hyperlink elements within a given element
*/
static findHyperlinks(element: XmlElement): XmlElement[];
/**
* Checks if an element contains hyperlinks
*/
static hasHyperlinks(element: XmlElement): boolean;
/**
* Checks if an element contains multiple hyperlinks
*/
static hasMultipleHyperlinks(element: XmlElement): boolean;
/**
* Determines if an element should be processed as a hyperlink element
* @param element - Element to analyze
* @returns True if element should be processed as hyperlink
*/
static shouldProcessAsHyperlink(element: XmlElement): boolean;
/**
* Gets the primary hyperlink target from an element
* @param element - Element to analyze
* @returns Target information or null if no hyperlink found
*/
static getPrimaryHyperlinkTarget(element: XmlElement): Target | null;
/**
* Extracts hyperlink relationship IDs from an element
* @param element - The XML element to extract from
* @returns Array of relationship IDs
*/
static extractHyperlinkRelationshipIds(element: XmlElement): string[];
/**
* Updates hyperlink relationship IDs in an element
*/
static updateHyperlinkRelationshipIds(element: XmlElement, relationshipMap: Map<string, string>): void;
/**
* Processes hyperlinks for single-hyperlink elements
*/
static processSingleHyperlink(element: XmlElement, newRid: string): Promise<void>;
/**
* Copies multiple hyperlinks from source to target slide
*/
static copyMultipleHyperlinks(element: XmlElement, sourceArchive: IArchive, sourceSlideNumber: number, targetArchive: IArchive, targetSlideRelFile: string): Promise<void>;
}