modified git ignore

This commit is contained in:
ilmar
2018-04-02 14:37:54 +03:00
parent ee721ffbec
commit 80f09ac10b
149 changed files with 83578 additions and 1 deletions

1
.gitignore vendored
View File

@ -33,7 +33,6 @@ node_modules
.node_repl_history
# build
build
build-tests
# VSCode

4
build/export/formatter.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
import { BaseXmlComponent, IXmlableObject } from "../file/xml-components";
export declare class Formatter {
format(input: BaseXmlComponent): IXmlableObject;
}

4
build/export/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export * from "./packer/local";
export * from "./packer/express";
export * from "./packer/packer";
export * from "./packer/stream";

14
build/export/packer/compiler.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
/// <reference types="archiver" />
/// <reference types="node" />
/// <reference types="express" />
import * as archiver from "archiver";
import * as express from "express";
import { Writable } from "stream";
import { File } from "../../file";
export declare class Compiler {
private file;
protected archive: archiver.Archiver;
private formatter;
constructor(file: File);
compile(output: Writable | express.Response): Promise<void>;
}

10
build/export/packer/express.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
/// <reference types="express" />
import * as express from "express";
import { File } from "../../file";
import { IPacker } from "./packer";
export declare class ExpressPacker implements IPacker {
private readonly res;
private readonly packer;
constructor(file: File, res: express.Response);
pack(name: string): Promise<void>;
}

10
build/export/packer/local.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
import { File } from "../../file";
import { IPacker } from "./packer";
export declare class LocalPacker implements IPacker {
private stream;
private readonly pdfConverter;
private readonly packer;
constructor(file: File);
pack(filePath: string): Promise<void>;
packPdf(filePath: string): Promise<void>;
}

4
build/export/packer/packer.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
export interface IPacker {
pack(path: string): void;
}
export declare const WORKAROUND = "";

View File

@ -0,0 +1,8 @@
/// <reference types="request-promise" />
import * as request from "request-promise";
export interface IConvertOutput {
data: string;
}
export declare class PdfConvertWrapper {
convert(filePath: string): request.RequestPromise;
}

9
build/export/packer/stream.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
/// <reference types="node" />
import { Readable } from "stream";
import { File } from "../../file";
import { IPacker } from "./packer";
export declare class StreamPacker implements IPacker {
private readonly compiler;
constructor(file: File);
pack(): Readable;
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../file/xml-components";
export interface IAppPropertiesAttributes {
xmlns: string;
vt: string;
}
export declare class AppPropertiesAttributes extends XmlAttributeComponent<IAppPropertiesAttributes> {
protected xmlKeys: {
xmlns: string;
vt: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../file/xml-components";
export declare class AppProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../file/xml-components";
export interface IContentTypeAttributes {
xmlns?: string;
}
export declare class ContentTypeAttributes extends XmlAttributeComponent<IContentTypeAttributes> {
protected xmlKeys: {
xmlns: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../file/xml-components";
export declare class ContentTypes extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../file/xml-components";
export interface IDefaultAttributes {
contentType: string;
extension?: string;
}
export declare class DefaultAttributes extends XmlAttributeComponent<IDefaultAttributes> {
protected xmlKeys: {
contentType: string;
extension: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../file/xml-components";
export declare class Default extends XmlComponent {
constructor(contentType: string, extension?: string);
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../file/xml-components";
export interface IOverrideAttributes {
contentType: string;
partName?: string;
}
export declare class OverrideAttributes extends XmlAttributeComponent<IOverrideAttributes> {
protected xmlKeys: {
contentType: string;
partName: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../file/xml-components";
export declare class Override extends XmlComponent {
constructor(contentType: string, partName?: string);
}

View File

@ -0,0 +1,31 @@
import { XmlComponent } from "../../file/xml-components";
export declare class Title extends XmlComponent {
constructor(value: string);
}
export declare class Subject extends XmlComponent {
constructor(value: string);
}
export declare class Creator extends XmlComponent {
constructor(value: string);
}
export declare class Keywords extends XmlComponent {
constructor(value: string);
}
export declare class Description extends XmlComponent {
constructor(value: string);
}
export declare class LastModifiedBy extends XmlComponent {
constructor(value: string);
}
export declare class Revision extends XmlComponent {
constructor(value: string);
}
export declare abstract class DateComponent extends XmlComponent {
protected getCurrentDate(): string;
}
export declare class Created extends DateComponent {
constructor();
}
export declare class Modified extends DateComponent {
constructor();
}

1
build/file/core-properties/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from "./properties";

View File

@ -0,0 +1,13 @@
import { XmlComponent } from "../../file/xml-components";
export interface IPropertiesOptions {
title?: string;
subject?: string;
creator?: string;
keywords?: string;
description?: string;
lastModifiedBy?: string;
revision?: string;
}
export declare class CoreProperties extends XmlComponent {
constructor(options: IPropertiesOptions);
}

6
build/file/document/body/body.d.ts vendored Normal file
View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../file/xml-components";
import { SectionPropertiesOptions } from "./section-properties/section-properties";
export declare class Body extends XmlComponent {
constructor(sectionPropertiesOptions?: SectionPropertiesOptions);
push(component: XmlComponent): void;
}

1
build/file/document/body/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from "./body";

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IColumnsAttributes {
space?: number;
}
export declare class ColumnsAttributes extends XmlAttributeComponent<IColumnsAttributes> {
protected xmlKeys: {
space: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class Columns extends XmlComponent {
constructor(space: number);
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IDocGridAttributesProperties {
linePitch?: number;
}
export declare class DocGridAttributes extends XmlAttributeComponent<IDocGridAttributesProperties> {
protected xmlKeys: {
linePitch: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class DocumentGrid extends XmlComponent {
constructor(linePitch: number);
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IFooterReferenceAttributes {
type: string;
id: string;
}
export declare class FooterReferenceAttributes extends XmlAttributeComponent<IFooterReferenceAttributes> {
protected xmlKeys: {
type: string;
id: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class FooterReference extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IHeaderReferenceAttributes {
type: string;
id: string;
}
export declare class HeaderReferenceAttributes extends XmlAttributeComponent<IHeaderReferenceAttributes> {
protected xmlKeys: {
type: string;
id: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class HeaderReference extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,21 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IPageMarginAttributes {
top?: number;
right?: number;
bottom?: number;
left?: number;
header?: number;
footer?: number;
gutter?: number;
}
export declare class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttributes> {
protected xmlKeys: {
top: string;
right: string;
bottom: string;
left: string;
header: string;
footer: string;
gutter: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class PageMargin extends XmlComponent {
constructor(top: number, right: number, bottom: number, left: number, header: number, footer: number, gutter: number);
}

View File

@ -0,0 +1,13 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IPageSizeAttributes {
width?: number;
height?: number;
orientation?: string;
}
export declare class PageSizeAttributes extends XmlAttributeComponent<IPageSizeAttributes> {
protected xmlKeys: {
width: string;
height: string;
orientation: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class PageSize extends XmlComponent {
constructor(width: number, height: number, orientation: string);
}

View File

@ -0,0 +1,9 @@
import { XmlComponent } from "../../../../file/xml-components";
import { IColumnsAttributes } from "./columns/columns-attributes";
import { IDocGridAttributesProperties } from "./doc-grid/doc-grid-attributes";
import { IPageMarginAttributes } from "./page-margin/page-margin-attributes";
import { IPageSizeAttributes } from "./page-size/page-size-attributes";
export declare type SectionPropertiesOptions = IPageSizeAttributes & IPageMarginAttributes & IColumnsAttributes & IDocGridAttributesProperties;
export declare class SectionProperties extends XmlComponent {
constructor(options?: SectionPropertiesOptions);
}

View File

@ -0,0 +1,53 @@
import { XmlAttributeComponent } from "../../file/xml-components";
export interface IDocumentAttributesProperties {
wpc?: string;
mc?: string;
o?: string;
r?: string;
m?: string;
v?: string;
wp14?: string;
wp?: string;
w10?: string;
w?: string;
w14?: string;
w15?: string;
wpg?: string;
wpi?: string;
wne?: string;
wps?: string;
Ignorable?: string;
cp?: string;
dc?: string;
dcterms?: string;
dcmitype?: string;
xsi?: string;
type?: string;
}
export declare class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> {
protected xmlKeys: {
wpc: string;
mc: string;
o: string;
r: string;
m: string;
v: string;
wp14: string;
wp: string;
w10: string;
w: string;
w14: string;
w15: string;
wpg: string;
wpi: string;
wne: string;
wps: string;
Ignorable: string;
cp: string;
dc: string;
dcterms: string;
dcmitype: string;
xsi: string;
type: string;
};
}

15
build/file/document/document.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
import { IMediaData } from "../../file/media";
import { XmlComponent } from "../../file/xml-components";
import { Paragraph, PictureRun } from "../paragraph";
import { Table } from "../table";
import { SectionPropertiesOptions } from "./body/section-properties/section-properties";
export declare class Document extends XmlComponent {
private readonly body;
constructor(sectionPropertiesOptions?: SectionPropertiesOptions);
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
addDrawing(pictureParagraph: Paragraph): void;
createDrawing(imageData: IMediaData): PictureRun;
}

1
build/file/document/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from "./document";

7
build/file/drawing/drawing.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
import { IMediaData } from "../../file/media";
import { XmlComponent } from "../../file/xml-components";
export declare class Drawing extends XmlComponent {
private inline;
constructor(imageData: IMediaData);
scale(factorX: number, factorY: number): void;
}

1
build/file/drawing/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export { Drawing } from "./drawing";

View File

@ -0,0 +1,13 @@
import { XmlAttributeComponent } from "../../../../file/xml-components";
export interface IDocPropertiesAttributes {
id?: number;
name?: string;
descr?: string;
}
export declare class DocPropertiesAttributes extends XmlAttributeComponent<IDocPropertiesAttributes> {
protected xmlKeys: {
id: string;
name: string;
descr: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../file/xml-components";
export declare class DocProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,15 @@
import { XmlAttributeComponent } from "../../../../file/xml-components";
export interface IEffectExtentAttributes {
b?: number;
l?: number;
r?: number;
t?: number;
}
export declare class EffectExtentAttributes extends XmlAttributeComponent<IEffectExtentAttributes> {
protected xmlKeys: {
b: string;
l: string;
r: string;
t: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../file/xml-components";
export declare class EffectExtent extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../file/xml-components";
export interface IExtentAttributes {
cx?: number;
cy?: number;
}
export declare class ExtentAttributes extends XmlAttributeComponent<IExtentAttributes> {
protected xmlKeys: {
cx: string;
cy: string;
};
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../file/xml-components";
export declare class Extent extends XmlComponent {
private attributes;
constructor(x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IGraphicFrameLockAttributes {
xmlns?: string;
noChangeAspect?: number;
}
export declare class GraphicFrameLockAttributes extends XmlAttributeComponent<IGraphicFrameLockAttributes> {
protected xmlKeys: {
xmlns: string;
noChangeAspect: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class GraphicFrameLocks extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../file/xml-components";
export declare class GraphicFrameProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../file/xml-components";
export interface IGraphicDataAttributes {
uri?: string;
}
export declare class GraphicDataAttributes extends XmlAttributeComponent<IGraphicDataAttributes> {
protected xmlKeys: {
uri: string;
};
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../../file/xml-components";
export declare class GraphicData extends XmlComponent {
private pic;
constructor(referenceId: number, x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1 @@
export * from "./graphic-data";

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class BlipFill extends XmlComponent {
constructor(referenceId: number);
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class Blip extends XmlComponent {
constructor(referenceId: number);
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class SourceRectangle extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class Stretch extends XmlComponent {
constructor();
}

View File

@ -0,0 +1 @@
export * from "./pic";

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../file/xml-components";
export declare class ChildNonVisualProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../../../../../file/xml-components";
export interface IPicLocksAttributes {
noChangeAspect?: number;
noChangeArrowheads?: number;
}
export declare class PicLocksAttributes extends XmlAttributeComponent<IPicLocksAttributes> {
protected xmlKeys: {
noChangeAspect: string;
noChangeArrowheads: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../../file/xml-components";
export declare class PicLocks extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class NonVisualPicProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,13 @@
import { XmlAttributeComponent } from "../../../../../../../../file/xml-components";
export interface INonVisualPropertiesAttributes {
id?: number;
name?: string;
descr?: string;
}
export declare class NonVisualPropertiesAttributes extends XmlAttributeComponent<INonVisualPropertiesAttributes> {
protected xmlKeys: {
id: string;
name: string;
descr: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../file/xml-components";
export declare class NonVisualProperties extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../../file/xml-components";
export interface IPicAttributes {
xmlns?: string;
}
export declare class PicAttributes extends XmlAttributeComponent<IPicAttributes> {
protected xmlKeys: {
xmlns: string;
};
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../../../file/xml-components";
export declare class Pic extends XmlComponent {
private shapeProperties;
constructor(referenceId: number, x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../../../../../file/xml-components";
export interface IExtentsAttributes {
cx?: number;
cy?: number;
}
export declare class ExtentsAttributes extends XmlAttributeComponent<IExtentsAttributes> {
protected xmlKeys: {
cx: string;
cy: string;
};
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../../../../../../file/xml-components";
export declare class Extents extends XmlComponent {
private attributes;
constructor(x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../../../../../file/xml-components";
export declare class Form extends XmlComponent {
private extents;
constructor(x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1 @@
export * from "./form";

View File

@ -0,0 +1,11 @@
import { XmlAttributeComponent } from "../../../../../../../../../file/xml-components";
export interface IOffsetAttributes {
x?: number;
y?: number;
}
export declare class OffsetAttributes extends XmlAttributeComponent<IOffsetAttributes> {
protected xmlKeys: {
x: string;
y: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../../file/xml-components";
export declare class Offset extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../../file/xml-components";
export declare class AdjustmentValues extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../../../../file/xml-components";
export interface IPresetGeometryAttributes {
prst?: string;
}
export declare class PresetGeometryAttributes extends XmlAttributeComponent<IPresetGeometryAttributes> {
protected xmlKeys: {
prst: string;
};
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../../../../../../file/xml-components";
export declare class PresetGeometry extends XmlComponent {
constructor();
}

View File

@ -0,0 +1,9 @@
import { XmlAttributeComponent } from "../../../../../../../file/xml-components";
export interface IShapePropertiesAttributes {
bwMode?: string;
}
export declare class ShapePropertiesAttributes extends XmlAttributeComponent<IShapePropertiesAttributes> {
protected xmlKeys: {
bwMode: string;
};
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../../../../file/xml-components";
export declare class ShapeProperties extends XmlComponent {
private form;
constructor(x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1,6 @@
import { XmlComponent } from "../../../../file/xml-components";
export declare class Graphic extends XmlComponent {
private data;
constructor(referenceId: number, x: number, y: number);
setXY(x: number, y: number): void;
}

View File

@ -0,0 +1 @@
export * from "./graphic";

1
build/file/drawing/inline/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from "./inline";

View File

@ -0,0 +1,15 @@
import { XmlAttributeComponent } from "../../../file/xml-components";
export interface IInlineAttributes {
distT?: number;
distB?: number;
distL?: number;
distR?: number;
}
export declare class InlineAttributes extends XmlAttributeComponent<IInlineAttributes> {
protected xmlKeys: {
distT: string;
distB: string;
distL: string;
distR: string;
};
}

9
build/file/drawing/inline/inline.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import { IMediaDataDimensions } from "../../../file/media";
import { XmlComponent } from "../../../file/xml-components";
export declare class Inline extends XmlComponent {
private dimensions;
private extent;
private graphic;
constructor(referenceId: number, dimensions: IMediaDataDimensions);
scale(factorX: number, factorY: number): void;
}

43
build/file/file.d.ts vendored Normal file
View File

@ -0,0 +1,43 @@
import { AppProperties } from "./app-properties/app-properties";
import { ContentTypes } from "./content-types/content-types";
import { CoreProperties, IPropertiesOptions } from "./core-properties";
import { Document } from "./document";
import { SectionPropertiesOptions } from "./document/body/section-properties/section-properties";
import { FooterWrapper } from "./footer-wrapper";
import { HeaderWrapper } from "./header-wrapper";
import { Media } from "./media";
import { Numbering } from "./numbering";
import { Paragraph, PictureRun } from "./paragraph";
import { Relationships } from "./relationships";
import { Styles } from "./styles";
import { Table } from "./table";
export declare class File {
private readonly document;
private readonly styles;
private readonly coreProperties;
private readonly numbering;
private readonly media;
private readonly docRelationships;
private readonly fileRelationships;
private readonly headerWrapper;
private readonly footerWrapper;
private readonly contentTypes;
private readonly appProperties;
constructor(options?: IPropertiesOptions, sectionPropertiesOptions?: SectionPropertiesOptions);
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
createImage(image: string): PictureRun;
readonly Document: Document;
readonly Styles: Styles;
readonly CoreProperties: CoreProperties;
readonly Numbering: Numbering;
readonly Media: Media;
readonly DocumentRelationships: Relationships;
readonly FileRelationships: Relationships;
readonly Header: HeaderWrapper;
readonly Footer: FooterWrapper;
readonly ContentTypes: ContentTypes;
readonly AppProperties: AppProperties;
}

19
build/file/footer-wrapper.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
import { Footer } from "./footer/footer";
import { IMediaData, Media } from "./media";
import { Paragraph } from "./paragraph";
import { Relationships } from "./relationships";
import { Table } from "./table";
export declare class FooterWrapper {
private readonly media;
private readonly footer;
private readonly relationships;
constructor(media: Media);
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
addDrawing(imageData: IMediaData): void;
createImage(image: string): void;
readonly Footer: Footer;
readonly Relationships: Relationships;
}

View File

@ -0,0 +1,51 @@
import { XmlAttributeComponent } from "../../file/xml-components";
export interface IFooterAttributesProperties {
wpc?: string;
mc?: string;
o?: string;
r?: string;
m?: string;
v?: string;
wp14?: string;
wp?: string;
w10?: string;
w?: string;
w14?: string;
w15?: string;
wpg?: string;
wpi?: string;
wne?: string;
wps?: string;
cp?: string;
dc?: string;
dcterms?: string;
dcmitype?: string;
xsi?: string;
type?: string;
}
export declare class FooterAttributes extends XmlAttributeComponent<IFooterAttributesProperties> {
protected xmlKeys: {
wpc: string;
mc: string;
o: string;
r: string;
m: string;
v: string;
wp14: string;
wp: string;
w10: string;
w: string;
w14: string;
w15: string;
wpg: string;
wpi: string;
wne: string;
wps: string;
cp: string;
dc: string;
dcterms: string;
dcmitype: string;
xsi: string;
type: string;
};
}

12
build/file/footer/footer.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import { IMediaData } from "../../file/media";
import { XmlComponent } from "../../file/xml-components";
import { Paragraph } from "../paragraph";
import { Table } from "../table";
export declare class Footer extends XmlComponent {
constructor();
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
addDrawing(imageData: IMediaData): void;
}

19
build/file/header-wrapper.d.ts vendored Normal file
View File

@ -0,0 +1,19 @@
import { Header } from "./header/header";
import { IMediaData, Media } from "./media";
import { Paragraph } from "./paragraph";
import { Relationships } from "./relationships";
import { Table } from "./table";
export declare class HeaderWrapper {
private readonly media;
private readonly header;
private readonly relationships;
constructor(media: Media);
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
addDrawing(imageData: IMediaData): void;
createImage(image: string): void;
readonly Header: Header;
readonly Relationships: Relationships;
}

View File

@ -0,0 +1,51 @@
import { XmlAttributeComponent } from "../../file/xml-components";
export interface IHeaderAttributesProperties {
wpc?: string;
mc?: string;
o?: string;
r?: string;
m?: string;
v?: string;
wp14?: string;
wp?: string;
w10?: string;
w?: string;
w14?: string;
w15?: string;
wpg?: string;
wpi?: string;
wne?: string;
wps?: string;
cp?: string;
dc?: string;
dcterms?: string;
dcmitype?: string;
xsi?: string;
type?: string;
}
export declare class HeaderAttributes extends XmlAttributeComponent<IHeaderAttributesProperties> {
protected xmlKeys: {
wpc: string;
mc: string;
o: string;
r: string;
m: string;
v: string;
wp14: string;
wp: string;
w10: string;
w: string;
w14: string;
w15: string;
wpg: string;
wpi: string;
wne: string;
wps: string;
cp: string;
dc: string;
dcterms: string;
dcmitype: string;
xsi: string;
type: string;
};
}

12
build/file/header/header.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
import { IMediaData } from "../../file/media";
import { XmlComponent } from "../../file/xml-components";
import { Paragraph } from "../paragraph";
import { Table } from "../table";
export declare class Header extends XmlComponent {
constructor();
addParagraph(paragraph: Paragraph): void;
createParagraph(text?: string): Paragraph;
addTable(table: Table): void;
createTable(rows: number, cols: number): Table;
addDrawing(imageData: IMediaData): void;
}

7
build/file/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
export * from "./paragraph";
export * from "./table";
export * from "./file";
export * from "./numbering";
export * from "./media";
export * from "./drawing";
export * from "./styles";

20
build/file/media/data.d.ts vendored Normal file
View File

@ -0,0 +1,20 @@
/// <reference types="node" />
import * as fs from "fs";
export interface IMediaDataDimensions {
pixels: {
x: number;
y: number;
};
emus: {
x: number;
y: number;
};
}
export interface IMediaData {
referenceId: number;
stream: fs.ReadStream;
path: string;
fileName: string;
dimensions: IMediaDataDimensions;
}
export declare const WORKAROUND2 = "";

2
build/file/media/index.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
export * from "./media";
export * from "./data";

8
build/file/media/media.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import { IMediaData } from "./data";
export declare class Media {
private readonly map;
constructor();
getMedia(key: string): IMediaData;
addMedia(filePath: string, relationshipsCount: number): IMediaData;
readonly array: IMediaData[];
}

View File

@ -0,0 +1,8 @@
import { XmlComponent } from "../../file/xml-components";
import { Level } from "./level";
export declare class AbstractNumbering extends XmlComponent {
id: number;
constructor(id: number);
addLevel(level: Level): void;
createLevel(num: number, format: string, text: string, align?: string): Level;
}

1
build/file/numbering/index.d.ts vendored Normal file
View File

@ -0,0 +1 @@
export * from "./numbering";

37
build/file/numbering/level.d.ts vendored Normal file
View File

@ -0,0 +1,37 @@
import { XmlComponent } from "../../file/xml-components";
import * as paragraph from "../paragraph/formatting";
export declare class LevelBase extends XmlComponent {
private readonly paragraphProperties;
private readonly runProperties;
constructor(level: number, start?: number, numberFormat?: string, levelText?: string, lvlJc?: string);
addParagraphProperty(property: XmlComponent): Level;
addRunProperty(property: XmlComponent): Level;
size(twips: number): Level;
bold(): Level;
italics(): Level;
smallCaps(): Level;
allCaps(): Level;
strike(): Level;
doubleStrike(): Level;
subScript(): Level;
superScript(): Level;
underline(underlineType?: string, color?: string): Level;
color(color: string): Level;
font(fontName: string): Level;
center(): Level;
left(): Level;
right(): Level;
justified(): Level;
thematicBreak(): Level;
maxRightTabStop(): Level;
leftTabStop(position: number): Level;
indent(attrs: object): Level;
spacing(params: paragraph.ISpacingProperties): Level;
keepNext(): Level;
keepLines(): Level;
}
export declare class Level extends LevelBase {
constructor(level: number, numberFormat: string, levelText: string, lvlJc: string);
}
export declare class LevelForOverride extends LevelBase {
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../file/xml-components";
export declare class MultiLevelType extends XmlComponent {
constructor(value: string);
}

13
build/file/numbering/num.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
import { XmlComponent } from "../../file/xml-components";
import { LevelForOverride } from "./level";
export declare class Num extends XmlComponent {
id: number;
constructor(numId: number, abstractNumId: number);
overrideLevel(num: number, start?: number): LevelOverride;
}
export declare class LevelOverride extends XmlComponent {
private readonly levelNum;
private lvl?;
constructor(levelNum: number, start?: number);
readonly level: LevelForOverride;
}

9
build/file/numbering/numbering.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
import { XmlComponent } from "../../file/xml-components";
import { AbstractNumbering } from "./abstract-numbering";
import { Num } from "./num";
export declare class Numbering extends XmlComponent {
private nextId;
constructor();
createAbstractNumbering(): AbstractNumbering;
createConcreteNumbering(abstractNumbering: AbstractNumbering): Num;
}

View File

@ -0,0 +1,12 @@
import { XmlAttributeComponent, XmlComponent } from "../../../file/xml-components";
export declare type AlignmentOptions = "left" | "center" | "right" | "both";
export declare class AlignmentAttributes extends XmlAttributeComponent<{
val: AlignmentOptions;
}> {
protected xmlKeys: {
val: string;
};
}
export declare class Alignment extends XmlComponent {
constructor(type: AlignmentOptions);
}

View File

@ -0,0 +1,4 @@
import { XmlComponent } from "../../../file/xml-components";
export declare class ThematicBreak extends XmlComponent {
constructor();
}

Some files were not shown because too many files have changed in this diff Show More