Files
docx-js/src/file/footer-wrapper.ts

45 lines
1.2 KiB
TypeScript
Raw Normal View History

import { XmlComponent } from "@file/xml-components";
2018-10-23 00:31:51 +01:00
import { HeaderFooterReferenceType } from "./document";
import { IViewWrapper } from "./document-wrapper";
import { Footer } from "./footer/footer";
2019-09-29 04:17:21 +01:00
import { Media } from "./media";
2019-06-25 01:21:28 +01:00
import { Paragraph } from "./paragraph";
import { Relationships } from "./relationships";
import { Table } from "./table";
2018-09-17 20:06:51 +01:00
export interface IDocumentFooter {
readonly footer: FooterWrapper;
readonly type: HeaderFooterReferenceType;
2018-09-17 20:06:51 +01:00
}
export class FooterWrapper implements IViewWrapper {
private readonly footer: Footer;
private readonly relationships: Relationships;
2022-08-31 07:52:27 +01:00
public constructor(private readonly media: Media, referenceId: number, initContent?: XmlComponent) {
2018-09-04 17:16:31 +03:00
this.footer = new Footer(referenceId, initContent);
this.relationships = new Relationships();
}
public add(item: Paragraph | Table): void {
this.footer.add(item);
}
public addChildElement(childElement: XmlComponent): void {
this.footer.addChildElement(childElement);
}
public get View(): Footer {
return this.footer;
}
public get Relationships(): Relationships {
return this.relationships;
}
2018-09-07 21:48:59 +01:00
public get Media(): Media {
return this.media;
}
}