2022-06-26 23:26:42 +01:00
|
|
|
import { XmlComponent } from "@file/xml-components";
|
2018-10-23 00:31:51 +01:00
|
|
|
|
2021-05-25 03:41:12 +03:00
|
|
|
import { HeaderFooterReferenceType } from "./document";
|
2021-02-28 16:04:21 +00:00
|
|
|
import { IViewWrapper } from "./document-wrapper";
|
2018-01-31 00:31:54 +00:00
|
|
|
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";
|
2018-01-31 00:31:54 +00:00
|
|
|
import { Relationships } from "./relationships";
|
|
|
|
import { Table } from "./table";
|
|
|
|
|
2018-09-17 20:06:51 +01:00
|
|
|
export interface IDocumentFooter {
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly footer: FooterWrapper;
|
2021-05-25 03:41:12 +03:00
|
|
|
readonly type: HeaderFooterReferenceType;
|
2018-09-17 20:06:51 +01:00
|
|
|
}
|
|
|
|
|
2021-02-28 16:04:21 +00:00
|
|
|
export class FooterWrapper implements IViewWrapper {
|
2018-01-31 00:31:54 +00:00
|
|
|
private readonly footer: Footer;
|
|
|
|
private readonly relationships: Relationships;
|
|
|
|
|
2023-07-21 20:11:52 +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);
|
2018-01-31 00:31:54 +00:00
|
|
|
this.relationships = new Relationships();
|
|
|
|
}
|
|
|
|
|
2019-06-25 01:58:09 +01:00
|
|
|
public add(item: Paragraph | Table): void {
|
|
|
|
this.footer.add(item);
|
2018-01-31 00:31:54 +00:00
|
|
|
}
|
|
|
|
|
2018-09-20 00:41:57 +01:00
|
|
|
public addChildElement(childElement: XmlComponent): void {
|
2018-05-28 09:15:44 +02:00
|
|
|
this.footer.addChildElement(childElement);
|
|
|
|
}
|
|
|
|
|
2021-02-28 16:04:21 +00:00
|
|
|
public get View(): Footer {
|
2018-01-31 00:31:54 +00:00
|
|
|
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;
|
|
|
|
}
|
2018-01-31 00:31:54 +00:00
|
|
|
}
|