pptx-automizer
Version:
A template based pptx generator
67 lines (66 loc) • 2.42 kB
TypeScript
import { ShapeTargetType, SourceIdentifier } from '../types/types';
import { ISlide } from '../interfaces/islide';
import { IPresentationProps } from '../interfaces/ipresentation-props';
import { PresTemplate } from '../interfaces/pres-template';
import { RootPresTemplate } from '../interfaces/root-pres-template';
import HasShapes from './has-shapes';
export declare class Slide extends HasShapes implements ISlide {
targetType: ShapeTargetType;
private targetLayoutId;
constructor(params: {
presentation: IPresentationProps;
template: PresTemplate;
slideIdentifier: SourceIdentifier;
});
/**
* Appends slide
* @internal
* @param targetTemplate
* @returns append
*/
append(targetTemplate: RootPresTemplate): Promise<void>;
/**
* Use another slide layout.
* @param layoutId
*/
useSlideLayout(layoutId?: number | string): this;
/**
* Merges slide content into a specified slide layout by mapping placeholders.
* This method automatically handles placeholder matching and repositioning of elements
* that don't have corresponding placeholders in the target layout.
*
* @param targetFileName
* @param targetLayout - Name or identifier of the target slide layout to merge into
* @returns Promise<this> - Returns the slide instance for method chaining
*/
mergeIntoSlideLayout(targetLayout: number | string): this;
/**
* Retrieves information about the source slide layout.
*
* @returns Promise<{placeholders: PlaceholderInfo[]}> Source layout information
* @private
*/
private getSourceLayoutInfo;
/**
* Find another slide layout by name.
* @param targetLayoutName
*/
useNamedSlideLayout(targetLayoutName: string): Promise<number>;
/**
* Use another slide layout by index or detect original index.
* @param targetLayoutIndex
*/
useIndexedSlideLayout(targetLayoutIndex?: number): Promise<number>;
autoImportSourceSlideMaster(templateName: string, sourceLayoutId: number): Promise<any>;
/**
* Copys slide files
* @internal
*/
copySlideFiles(): Promise<void>;
/**
* Remove a slide from presentation's slide list.
* ToDo: Find the current count for this slide;
* ToDo: this.targetNumber is undefined at this point.
*/
remove(slide: number): void;
}