pptx-automizer
Version:
A template based pptx generator
74 lines (73 loc) • 2.06 kB
TypeScript
import { XmlElement } from '../types/xml-types';
import { MultiTextParagraph } from '../interfaces/imulti-text';
export declare class MultiTextHelper {
private element;
private document;
private relationElement?;
constructor(element: XmlElement, relationElement?: XmlElement);
/**
* Apply multi-text paragraphs to the element
*/
run(paragraphs: MultiTextParagraph[]): void;
/**
* Extract default style from existing paragraphs
*/
private extractDefaultStyle;
/**
* Find or create the txBody element and ensure it has required child elements
*/
private getOrCreateTxBody;
/**
* Remove all existing paragraph elements
*/
private clearExistingParagraphs;
/**
* Create paragraph elements for each MultiTextParagraph
*/
private createParagraphs;
/**
* Merge default style with provided style
*/
private mergeStyles;
/**
* Apply paragraph styling properties
*/
private applyParagraphProperties;
/**
* Apply bullet configuration to paragraph properties
*/
private applyBulletConfiguration;
/**
* Apply spacing properties to paragraph properties
*/
private applySpacingProperties;
/**
* Create text runs for a paragraph
*/
private createTextRuns;
/**
* Create a single text run with the given text and style
*/
private createSingleTextRun;
/**
* Create a regular text run without hyperlink
*/
private createRegularTextRun;
/**
* Create a text element with the given content
*/
private createTextElement;
/**
* Create a hyperlinked text run using HyperlinkElement
*/
private createHyperlinkTextRun;
/**
* Create relationship data for hyperlink (reused from ModifyHyperlinkHelper)
*/
private createRelationshipData;
private formatTarget;
/**
* Add relationship to the relation element (reused logic from ModifyHyperlinkHelper)
*/
private addRelationship;
}