* build(deps-dev): bump eslint from 8.57.1 to 9.13.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.13.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade EsLint * Fix all new lint errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
import { XmlComponent } from "@file/xml-components";
|
|
|
|
import { HeaderFooterReferenceType } from "./document";
|
|
import { IViewWrapper } from "./document-wrapper";
|
|
import { Footer } from "./footer/footer";
|
|
import { Media } from "./media";
|
|
import { Paragraph } from "./paragraph";
|
|
import { Relationships } from "./relationships";
|
|
import { Table } from "./table";
|
|
|
|
export type IDocumentFooter = {
|
|
readonly footer: FooterWrapper;
|
|
readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
|
|
};
|
|
|
|
export class FooterWrapper implements IViewWrapper {
|
|
private readonly footer: Footer;
|
|
private readonly relationships: Relationships;
|
|
|
|
public constructor(
|
|
private readonly media: Media,
|
|
referenceId: number,
|
|
initContent?: XmlComponent,
|
|
) {
|
|
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;
|
|
}
|
|
|
|
public get Media(): Media {
|
|
return this.media;
|
|
}
|
|
}
|