docx 8.2.4 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/export/packer/next-compiler.d.ts +1 -1
- package/build/export/packer/packer.d.ts +11 -11
- package/build/file/border/border.d.ts +30 -30
- package/build/file/document/body/section-properties/properties/doc-grid.d.ts +8 -8
- package/build/file/document/body/section-properties/properties/header-footer-reference.d.ts +11 -11
- package/build/file/document/body/section-properties/properties/line-number.d.ts +6 -6
- package/build/file/document/body/section-properties/properties/page-borders.d.ts +16 -16
- package/build/file/document/body/section-properties/properties/page-number.d.ts +9 -9
- package/build/file/document/body/section-properties/properties/page-size.d.ts +6 -6
- package/build/file/document/body/section-properties/properties/page-text-direction.d.ts +5 -5
- package/build/file/document/body/section-properties/properties/section-type.d.ts +9 -9
- package/build/file/document/body/section-properties/section-properties.d.ts +5 -5
- package/build/file/drawing/floating/align.d.ts +1 -1
- package/build/file/drawing/floating/floating-position.d.ts +24 -24
- package/build/file/drawing/text-wrap/text-wrapping.d.ts +14 -14
- package/build/file/footer-wrapper.d.ts +1 -1
- package/build/file/footnotes/footnote/footnote.d.ts +5 -5
- package/build/file/header-wrapper.d.ts +1 -1
- package/build/file/numbering/level.d.ts +73 -73
- package/build/file/paragraph/formatting/alignment.d.ts +17 -17
- package/build/file/paragraph/formatting/spacing.d.ts +7 -7
- package/build/file/paragraph/formatting/style.d.ts +9 -9
- package/build/file/paragraph/formatting/tab-stop.d.ts +26 -26
- package/build/file/paragraph/frame/frame-properties.d.ts +32 -32
- package/build/file/paragraph/links/hyperlink.d.ts +4 -4
- package/build/file/paragraph/properties.d.ts +4 -2
- package/build/file/paragraph/run/emphasis-mark.d.ts +5 -5
- package/build/file/paragraph/run/positional-tab.d.ts +19 -19
- package/build/file/paragraph/run/properties.d.ts +12 -12
- package/build/file/paragraph/run/run-components/text.d.ts +1 -1
- package/build/file/paragraph/run/run.d.ts +6 -6
- package/build/file/paragraph/run/text-attributes.d.ts +1 -1
- package/build/file/paragraph/run/underline.d.ts +21 -21
- package/build/file/relationships/relationship/relationship.d.ts +4 -4
- package/build/file/relationships/relationships.d.ts +1 -1
- package/build/file/shading/shading.d.ts +40 -40
- package/build/file/shared/alignment.d.ts +14 -14
- package/build/file/shared/number-format.d.ts +64 -64
- package/build/file/shared/space-type.d.ts +4 -4
- package/build/file/table/table-cell/table-cell-components.d.ts +11 -11
- package/build/file/table/table-cell/table-cell-properties.d.ts +3 -3
- package/build/file/table/table-properties/table-borders.d.ts +7 -7
- package/build/file/table/table-properties/table-cell-margin.d.ts +7 -7
- package/build/file/table/table-properties/table-float-properties.d.ts +29 -29
- package/build/file/table/table-properties/table-layout.d.ts +5 -5
- package/build/file/table/table-properties/table-properties.d.ts +2 -2
- package/build/file/table/table-row/table-row-height.d.ts +7 -7
- package/build/file/table/table-row/table-row-properties.d.ts +1 -1
- package/build/file/table/table-width.d.ts +7 -7
- package/build/file/table/table.d.ts +2 -2
- package/build/file/vertical-align/vertical-align.d.ts +7 -7
- package/build/index.cjs +939 -773
- package/build/index.iife.js +939 -773
- package/build/index.mjs +939 -773
- package/build/index.umd.js +939 -773
- package/build/patcher/from-docx.d.ts +6 -6
- package/build/patcher/relationship-manager.d.ts +1 -1
- package/package.json +10 -10
|
@@ -6,6 +6,6 @@ export declare class Compiler {
|
|
|
6
6
|
private readonly imageReplacer;
|
|
7
7
|
private readonly numberingReplacer;
|
|
8
8
|
constructor();
|
|
9
|
-
compile(file: File, prettifyXml?: PrettifyType): JSZip;
|
|
9
|
+
compile(file: File, prettifyXml?: (typeof PrettifyType)[keyof typeof PrettifyType]): JSZip;
|
|
10
10
|
private xmlifyFile;
|
|
11
11
|
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import { Stream } from "stream";
|
|
4
4
|
import { File } from '../../file/file';
|
|
5
|
-
export declare
|
|
6
|
-
NONE
|
|
7
|
-
WITH_2_BLANKS
|
|
8
|
-
WITH_4_BLANKS
|
|
9
|
-
WITH_TAB
|
|
10
|
-
}
|
|
5
|
+
export declare const PrettifyType: {
|
|
6
|
+
readonly NONE: "";
|
|
7
|
+
readonly WITH_2_BLANKS: " ";
|
|
8
|
+
readonly WITH_4_BLANKS: " ";
|
|
9
|
+
readonly WITH_TAB: "\t";
|
|
10
|
+
};
|
|
11
11
|
export declare class Packer {
|
|
12
|
-
static toString(file: File, prettify?: boolean | PrettifyType): Promise<string>;
|
|
13
|
-
static toBuffer(file: File, prettify?: boolean | PrettifyType): Promise<Buffer>;
|
|
14
|
-
static toBase64String(file: File, prettify?: boolean | PrettifyType): Promise<string>;
|
|
15
|
-
static toBlob(file: File, prettify?: boolean | PrettifyType): Promise<Blob>;
|
|
16
|
-
static toStream(file: File, prettify?: boolean | PrettifyType): Stream;
|
|
12
|
+
static toString(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]): Promise<string>;
|
|
13
|
+
static toBuffer(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]): Promise<Buffer>;
|
|
14
|
+
static toBase64String(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]): Promise<string>;
|
|
15
|
+
static toBlob(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]): Promise<Blob>;
|
|
16
|
+
static toStream(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType]): Stream;
|
|
17
17
|
private static readonly compiler;
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { XmlComponent } from '../xml-components';
|
|
2
2
|
export interface IBorderOptions {
|
|
3
|
-
readonly style: BorderStyle;
|
|
3
|
+
readonly style: (typeof BorderStyle)[keyof typeof BorderStyle];
|
|
4
4
|
readonly color?: string;
|
|
5
5
|
readonly size?: number;
|
|
6
6
|
readonly space?: number;
|
|
@@ -8,32 +8,32 @@ export interface IBorderOptions {
|
|
|
8
8
|
export declare class BorderElement extends XmlComponent {
|
|
9
9
|
constructor(elementName: string, { color, size, space, style }: IBorderOptions);
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
12
|
-
SINGLE
|
|
13
|
-
DASH_DOT_STROKED
|
|
14
|
-
DASHED
|
|
15
|
-
DASH_SMALL_GAP
|
|
16
|
-
DOT_DASH
|
|
17
|
-
DOT_DOT_DASH
|
|
18
|
-
DOTTED
|
|
19
|
-
DOUBLE
|
|
20
|
-
DOUBLE_WAVE
|
|
21
|
-
INSET
|
|
22
|
-
NIL
|
|
23
|
-
NONE
|
|
24
|
-
OUTSET
|
|
25
|
-
THICK
|
|
26
|
-
THICK_THIN_LARGE_GAP
|
|
27
|
-
THICK_THIN_MEDIUM_GAP
|
|
28
|
-
THICK_THIN_SMALL_GAP
|
|
29
|
-
THIN_THICK_LARGE_GAP
|
|
30
|
-
THIN_THICK_MEDIUM_GAP
|
|
31
|
-
THIN_THICK_SMALL_GAP
|
|
32
|
-
THIN_THICK_THIN_LARGE_GAP
|
|
33
|
-
THIN_THICK_THIN_MEDIUM_GAP
|
|
34
|
-
THIN_THICK_THIN_SMALL_GAP
|
|
35
|
-
THREE_D_EMBOSS
|
|
36
|
-
THREE_D_ENGRAVE
|
|
37
|
-
TRIPLE
|
|
38
|
-
WAVE
|
|
39
|
-
}
|
|
11
|
+
export declare const BorderStyle: {
|
|
12
|
+
readonly SINGLE: "single";
|
|
13
|
+
readonly DASH_DOT_STROKED: "dashDotStroked";
|
|
14
|
+
readonly DASHED: "dashed";
|
|
15
|
+
readonly DASH_SMALL_GAP: "dashSmallGap";
|
|
16
|
+
readonly DOT_DASH: "dotDash";
|
|
17
|
+
readonly DOT_DOT_DASH: "dotDotDash";
|
|
18
|
+
readonly DOTTED: "dotted";
|
|
19
|
+
readonly DOUBLE: "double";
|
|
20
|
+
readonly DOUBLE_WAVE: "doubleWave";
|
|
21
|
+
readonly INSET: "inset";
|
|
22
|
+
readonly NIL: "nil";
|
|
23
|
+
readonly NONE: "none";
|
|
24
|
+
readonly OUTSET: "outset";
|
|
25
|
+
readonly THICK: "thick";
|
|
26
|
+
readonly THICK_THIN_LARGE_GAP: "thickThinLargeGap";
|
|
27
|
+
readonly THICK_THIN_MEDIUM_GAP: "thickThinMediumGap";
|
|
28
|
+
readonly THICK_THIN_SMALL_GAP: "thickThinSmallGap";
|
|
29
|
+
readonly THIN_THICK_LARGE_GAP: "thinThickLargeGap";
|
|
30
|
+
readonly THIN_THICK_MEDIUM_GAP: "thinThickMediumGap";
|
|
31
|
+
readonly THIN_THICK_SMALL_GAP: "thinThickSmallGap";
|
|
32
|
+
readonly THIN_THICK_THIN_LARGE_GAP: "thinThickThinLargeGap";
|
|
33
|
+
readonly THIN_THICK_THIN_MEDIUM_GAP: "thinThickThinMediumGap";
|
|
34
|
+
readonly THIN_THICK_THIN_SMALL_GAP: "thinThickThinSmallGap";
|
|
35
|
+
readonly THREE_D_EMBOSS: "threeDEmboss";
|
|
36
|
+
readonly THREE_D_ENGRAVE: "threeDEngrave";
|
|
37
|
+
readonly TRIPLE: "triple";
|
|
38
|
+
readonly WAVE: "wave";
|
|
39
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { XmlAttributeComponent, XmlComponent } from '../../../../xml-components';
|
|
2
|
-
export declare
|
|
3
|
-
DEFAULT
|
|
4
|
-
LINES
|
|
5
|
-
LINES_AND_CHARS
|
|
6
|
-
SNAP_TO_CHARS
|
|
7
|
-
}
|
|
2
|
+
export declare const DocumentGridType: {
|
|
3
|
+
readonly DEFAULT: "default";
|
|
4
|
+
readonly LINES: "lines";
|
|
5
|
+
readonly LINES_AND_CHARS: "linesAndChars";
|
|
6
|
+
readonly SNAP_TO_CHARS: "snapToChars";
|
|
7
|
+
};
|
|
8
8
|
export interface IDocGridAttributesProperties {
|
|
9
|
-
readonly type?: DocumentGridType;
|
|
9
|
+
readonly type?: (typeof DocumentGridType)[keyof typeof DocumentGridType];
|
|
10
10
|
readonly linePitch?: number;
|
|
11
11
|
readonly charSpace?: number;
|
|
12
12
|
}
|
|
@@ -18,5 +18,5 @@ export declare class DocGridAttributes extends XmlAttributeComponent<IDocGridAtt
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
export declare class DocumentGrid extends XmlComponent {
|
|
21
|
-
constructor(linePitch: number, charSpace?: number, type?: DocumentGridType);
|
|
21
|
+
constructor(linePitch: number, charSpace?: number, type?: (typeof DocumentGridType)[keyof typeof DocumentGridType]);
|
|
22
22
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { XmlComponent } from '../../../../xml-components';
|
|
2
|
-
export declare
|
|
3
|
-
DEFAULT
|
|
4
|
-
FIRST
|
|
5
|
-
EVEN
|
|
6
|
-
}
|
|
2
|
+
export declare const HeaderFooterReferenceType: {
|
|
3
|
+
readonly DEFAULT: "default";
|
|
4
|
+
readonly FIRST: "first";
|
|
5
|
+
readonly EVEN: "even";
|
|
6
|
+
};
|
|
7
7
|
export interface IHeaderFooterOptions {
|
|
8
|
-
readonly type?: HeaderFooterReferenceType;
|
|
8
|
+
readonly type?: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
|
|
9
9
|
readonly id?: number;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
12
|
-
HEADER
|
|
13
|
-
FOOTER
|
|
14
|
-
}
|
|
11
|
+
export declare const HeaderFooterType: {
|
|
12
|
+
readonly HEADER: "w:headerReference";
|
|
13
|
+
readonly FOOTER: "w:footerReference";
|
|
14
|
+
};
|
|
15
15
|
export declare class HeaderFooterReference extends XmlComponent {
|
|
16
|
-
constructor(type: HeaderFooterType, options: IHeaderFooterOptions);
|
|
16
|
+
constructor(type: (typeof HeaderFooterType)[keyof typeof HeaderFooterType], options: IHeaderFooterOptions);
|
|
17
17
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { XmlComponent } from '../../../../xml-components';
|
|
2
2
|
import { PositiveUniversalMeasure } from '../../../../../util/values';
|
|
3
|
-
export declare
|
|
4
|
-
NEW_PAGE
|
|
5
|
-
NEW_SECTION
|
|
6
|
-
CONTINUOUS
|
|
7
|
-
}
|
|
3
|
+
export declare const LineNumberRestartFormat: {
|
|
4
|
+
readonly NEW_PAGE: "newPage";
|
|
5
|
+
readonly NEW_SECTION: "newSection";
|
|
6
|
+
readonly CONTINUOUS: "continuous";
|
|
7
|
+
};
|
|
8
8
|
export interface ILineNumberAttributes {
|
|
9
9
|
readonly countBy?: number;
|
|
10
10
|
readonly start?: number;
|
|
11
|
-
readonly restart?: LineNumberRestartFormat;
|
|
11
|
+
readonly restart?: (typeof LineNumberRestartFormat)[keyof typeof LineNumberRestartFormat];
|
|
12
12
|
readonly distance?: number | PositiveUniversalMeasure;
|
|
13
13
|
}
|
|
14
14
|
export declare class LineNumberType extends XmlComponent {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { IBorderOptions } from '../../../../border';
|
|
2
2
|
import { IgnoreIfEmptyXmlComponent } from '../../../../xml-components';
|
|
3
|
-
export declare
|
|
4
|
-
ALL_PAGES
|
|
5
|
-
FIRST_PAGE
|
|
6
|
-
NOT_FIRST_PAGE
|
|
7
|
-
}
|
|
8
|
-
export declare
|
|
9
|
-
PAGE
|
|
10
|
-
TEXT
|
|
11
|
-
}
|
|
12
|
-
export declare
|
|
13
|
-
BACK
|
|
14
|
-
FRONT
|
|
15
|
-
}
|
|
3
|
+
export declare const PageBorderDisplay: {
|
|
4
|
+
readonly ALL_PAGES: "allPages";
|
|
5
|
+
readonly FIRST_PAGE: "firstPage";
|
|
6
|
+
readonly NOT_FIRST_PAGE: "notFirstPage";
|
|
7
|
+
};
|
|
8
|
+
export declare const PageBorderOffsetFrom: {
|
|
9
|
+
readonly PAGE: "page";
|
|
10
|
+
readonly TEXT: "text";
|
|
11
|
+
};
|
|
12
|
+
export declare const PageBorderZOrder: {
|
|
13
|
+
readonly BACK: "back";
|
|
14
|
+
readonly FRONT: "front";
|
|
15
|
+
};
|
|
16
16
|
export interface IPageBorderAttributes {
|
|
17
|
-
readonly display?: PageBorderDisplay;
|
|
18
|
-
readonly offsetFrom?: PageBorderOffsetFrom;
|
|
19
|
-
readonly zOrder?: PageBorderZOrder;
|
|
17
|
+
readonly display?: (typeof PageBorderDisplay)[keyof typeof PageBorderDisplay];
|
|
18
|
+
readonly offsetFrom?: (typeof PageBorderOffsetFrom)[keyof typeof PageBorderOffsetFrom];
|
|
19
|
+
readonly zOrder?: (typeof PageBorderZOrder)[keyof typeof PageBorderZOrder];
|
|
20
20
|
}
|
|
21
21
|
export interface IPageBordersOptions {
|
|
22
22
|
readonly pageBorders?: IPageBorderAttributes;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { NumberFormat } from '../../../../shared/number-format';
|
|
2
2
|
import { XmlAttributeComponent, XmlComponent } from '../../../../xml-components';
|
|
3
|
-
export declare
|
|
4
|
-
HYPHEN
|
|
5
|
-
PERIOD
|
|
6
|
-
COLON
|
|
7
|
-
EM_DASH
|
|
8
|
-
EN_DASH
|
|
9
|
-
}
|
|
3
|
+
export declare const PageNumberSeparator: {
|
|
4
|
+
readonly HYPHEN: "hyphen";
|
|
5
|
+
readonly PERIOD: "period";
|
|
6
|
+
readonly COLON: "colon";
|
|
7
|
+
readonly EM_DASH: "emDash";
|
|
8
|
+
readonly EN_DASH: "endash";
|
|
9
|
+
};
|
|
10
10
|
export interface IPageNumberTypeAttributes {
|
|
11
11
|
readonly start?: number;
|
|
12
|
-
readonly formatType?: NumberFormat;
|
|
13
|
-
readonly separator?: PageNumberSeparator;
|
|
12
|
+
readonly formatType?: (typeof NumberFormat)[keyof typeof NumberFormat];
|
|
13
|
+
readonly separator?: (typeof PageNumberSeparator)[keyof typeof PageNumberSeparator];
|
|
14
14
|
}
|
|
15
15
|
export declare class PageNumberTypeAttributes extends XmlAttributeComponent<IPageNumberTypeAttributes> {
|
|
16
16
|
protected readonly xmlKeys: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { XmlComponent } from '../../../../xml-components';
|
|
2
2
|
import { PositiveUniversalMeasure } from '../../../../../util/values';
|
|
3
|
-
export declare
|
|
4
|
-
PORTRAIT
|
|
5
|
-
LANDSCAPE
|
|
6
|
-
}
|
|
3
|
+
export declare const PageOrientation: {
|
|
4
|
+
readonly PORTRAIT: "portrait";
|
|
5
|
+
readonly LANDSCAPE: "landscape";
|
|
6
|
+
};
|
|
7
7
|
export type IPageSizeAttributes = {
|
|
8
8
|
readonly width?: number | PositiveUniversalMeasure;
|
|
9
9
|
readonly height?: number | PositiveUniversalMeasure;
|
|
10
|
-
readonly orientation?: PageOrientation;
|
|
10
|
+
readonly orientation?: (typeof PageOrientation)[keyof typeof PageOrientation];
|
|
11
11
|
};
|
|
12
12
|
export declare class PageSize extends XmlComponent {
|
|
13
|
-
constructor(width: number | PositiveUniversalMeasure, height: number | PositiveUniversalMeasure, orientation: PageOrientation);
|
|
13
|
+
constructor(width: number | PositiveUniversalMeasure, height: number | PositiveUniversalMeasure, orientation: (typeof PageOrientation)[keyof typeof PageOrientation]);
|
|
14
14
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { XmlComponent } from '../../../../xml-components';
|
|
2
|
-
export declare
|
|
3
|
-
LEFT_TO_RIGHT_TOP_TO_BOTTOM
|
|
4
|
-
TOP_TO_BOTTOM_RIGHT_TO_LEFT
|
|
5
|
-
}
|
|
2
|
+
export declare const PageTextDirectionType: {
|
|
3
|
+
readonly LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb";
|
|
4
|
+
readonly TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl";
|
|
5
|
+
};
|
|
6
6
|
export declare class PageTextDirection extends XmlComponent {
|
|
7
|
-
constructor(value: PageTextDirectionType);
|
|
7
|
+
constructor(value: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType]);
|
|
8
8
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { XmlAttributeComponent, XmlComponent } from '../../../../xml-components';
|
|
2
|
-
export declare
|
|
3
|
-
NEXT_PAGE
|
|
4
|
-
NEXT_COLUMN
|
|
5
|
-
CONTINUOUS
|
|
6
|
-
EVEN_PAGE
|
|
7
|
-
ODD_PAGE
|
|
8
|
-
}
|
|
2
|
+
export declare const SectionType: {
|
|
3
|
+
readonly NEXT_PAGE: "nextPage";
|
|
4
|
+
readonly NEXT_COLUMN: "nextColumn";
|
|
5
|
+
readonly CONTINUOUS: "continuous";
|
|
6
|
+
readonly EVEN_PAGE: "evenPage";
|
|
7
|
+
readonly ODD_PAGE: "oddPage";
|
|
8
|
+
};
|
|
9
9
|
export declare class SectionTypeAttributes extends XmlAttributeComponent<{
|
|
10
|
-
readonly val: SectionType;
|
|
10
|
+
readonly val: (typeof SectionType)[keyof typeof SectionType];
|
|
11
11
|
}> {
|
|
12
12
|
protected readonly xmlKeys: {
|
|
13
13
|
val: string;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
export declare class Type extends XmlComponent {
|
|
17
|
-
constructor(value: SectionType);
|
|
17
|
+
constructor(value: (typeof SectionType)[keyof typeof SectionType]);
|
|
18
18
|
}
|
|
@@ -8,7 +8,7 @@ import { ILineNumberAttributes } from "./properties/line-number";
|
|
|
8
8
|
import { IPageBordersOptions } from "./properties/page-borders";
|
|
9
9
|
import { IPageMarginAttributes } from "./properties/page-margin";
|
|
10
10
|
import { IPageNumberTypeAttributes } from "./properties/page-number";
|
|
11
|
-
import { IPageSizeAttributes
|
|
11
|
+
import { IPageSizeAttributes } from "./properties/page-size";
|
|
12
12
|
import { PageTextDirectionType } from "./properties/page-text-direction";
|
|
13
13
|
import { SectionType } from "./properties/section-type";
|
|
14
14
|
export interface IHeaderFooterGroup<T> {
|
|
@@ -22,16 +22,16 @@ export interface ISectionPropertiesOptions {
|
|
|
22
22
|
readonly margin?: IPageMarginAttributes;
|
|
23
23
|
readonly pageNumbers?: IPageNumberTypeAttributes;
|
|
24
24
|
readonly borders?: IPageBordersOptions;
|
|
25
|
-
readonly textDirection?: PageTextDirectionType;
|
|
25
|
+
readonly textDirection?: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType];
|
|
26
26
|
};
|
|
27
27
|
readonly grid?: IDocGridAttributesProperties;
|
|
28
28
|
readonly headerWrapperGroup?: IHeaderFooterGroup<HeaderWrapper>;
|
|
29
29
|
readonly footerWrapperGroup?: IHeaderFooterGroup<FooterWrapper>;
|
|
30
30
|
readonly lineNumbers?: ILineNumberAttributes;
|
|
31
31
|
readonly titlePage?: boolean;
|
|
32
|
-
readonly verticalAlign?: VerticalAlign;
|
|
32
|
+
readonly verticalAlign?: (typeof VerticalAlign)[keyof typeof VerticalAlign];
|
|
33
33
|
readonly column?: IColumnsAttributes;
|
|
34
|
-
readonly type?: SectionType;
|
|
34
|
+
readonly type?: (typeof SectionType)[keyof typeof SectionType];
|
|
35
35
|
}
|
|
36
36
|
export declare const sectionMarginDefaults: {
|
|
37
37
|
TOP: number;
|
|
@@ -45,7 +45,7 @@ export declare const sectionMarginDefaults: {
|
|
|
45
45
|
export declare const sectionPageSizeDefaults: {
|
|
46
46
|
WIDTH: number;
|
|
47
47
|
HEIGHT: number;
|
|
48
|
-
ORIENTATION:
|
|
48
|
+
ORIENTATION: "portrait";
|
|
49
49
|
};
|
|
50
50
|
export declare class SectionProperties extends XmlComponent {
|
|
51
51
|
constructor({ page: { size: { width, height, orientation, }, margin: { top, right, bottom, left, header, footer, gutter, }, pageNumbers, borders, textDirection, }, grid: { linePitch, charSpace, type: gridType }, headerWrapperGroup, footerWrapperGroup, lineNumbers, titlePage, verticalAlign, column, type, }?: ISectionPropertiesOptions);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HorizontalPositionAlign, VerticalPositionAlign } from '../../shared/alignment';
|
|
2
2
|
import { XmlComponent } from '../../xml-components';
|
|
3
3
|
export declare class Align extends XmlComponent {
|
|
4
|
-
constructor(value: HorizontalPositionAlign | VerticalPositionAlign);
|
|
4
|
+
constructor(value: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign] | (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign]);
|
|
5
5
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { HorizontalPositionAlign, VerticalPositionAlign } from '../../shared/alignment';
|
|
2
2
|
import { ITextWrapping } from "../text-wrap";
|
|
3
|
-
export declare
|
|
4
|
-
CHARACTER
|
|
5
|
-
COLUMN
|
|
6
|
-
INSIDE_MARGIN
|
|
7
|
-
LEFT_MARGIN
|
|
8
|
-
MARGIN
|
|
9
|
-
OUTSIDE_MARGIN
|
|
10
|
-
PAGE
|
|
11
|
-
RIGHT_MARGIN
|
|
12
|
-
}
|
|
13
|
-
export declare
|
|
14
|
-
BOTTOM_MARGIN
|
|
15
|
-
INSIDE_MARGIN
|
|
16
|
-
LINE
|
|
17
|
-
MARGIN
|
|
18
|
-
OUTSIDE_MARGIN
|
|
19
|
-
PAGE
|
|
20
|
-
PARAGRAPH
|
|
21
|
-
TOP_MARGIN
|
|
22
|
-
}
|
|
3
|
+
export declare const HorizontalPositionRelativeFrom: {
|
|
4
|
+
readonly CHARACTER: "character";
|
|
5
|
+
readonly COLUMN: "column";
|
|
6
|
+
readonly INSIDE_MARGIN: "insideMargin";
|
|
7
|
+
readonly LEFT_MARGIN: "leftMargin";
|
|
8
|
+
readonly MARGIN: "margin";
|
|
9
|
+
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
10
|
+
readonly PAGE: "page";
|
|
11
|
+
readonly RIGHT_MARGIN: "rightMargin";
|
|
12
|
+
};
|
|
13
|
+
export declare const VerticalPositionRelativeFrom: {
|
|
14
|
+
readonly BOTTOM_MARGIN: "bottomMargin";
|
|
15
|
+
readonly INSIDE_MARGIN: "insideMargin";
|
|
16
|
+
readonly LINE: "line";
|
|
17
|
+
readonly MARGIN: "margin";
|
|
18
|
+
readonly OUTSIDE_MARGIN: "outsideMargin";
|
|
19
|
+
readonly PAGE: "page";
|
|
20
|
+
readonly PARAGRAPH: "paragraph";
|
|
21
|
+
readonly TOP_MARGIN: "topMargin";
|
|
22
|
+
};
|
|
23
23
|
export interface IHorizontalPositionOptions {
|
|
24
|
-
readonly relative?: HorizontalPositionRelativeFrom;
|
|
25
|
-
readonly align?: HorizontalPositionAlign;
|
|
24
|
+
readonly relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom];
|
|
25
|
+
readonly align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
|
|
26
26
|
readonly offset?: number;
|
|
27
27
|
}
|
|
28
28
|
export interface IVerticalPositionOptions {
|
|
29
|
-
readonly relative?: VerticalPositionRelativeFrom;
|
|
30
|
-
readonly align?: VerticalPositionAlign;
|
|
29
|
+
readonly relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom];
|
|
30
|
+
readonly align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
|
|
31
31
|
readonly offset?: number;
|
|
32
32
|
}
|
|
33
33
|
export interface IMargins {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { IDistance } from "../drawing";
|
|
2
|
-
export declare
|
|
3
|
-
NONE
|
|
4
|
-
SQUARE
|
|
5
|
-
TIGHT
|
|
6
|
-
TOP_AND_BOTTOM
|
|
7
|
-
}
|
|
8
|
-
export declare
|
|
9
|
-
BOTH_SIDES
|
|
10
|
-
LEFT
|
|
11
|
-
RIGHT
|
|
12
|
-
LARGEST
|
|
13
|
-
}
|
|
2
|
+
export declare const TextWrappingType: {
|
|
3
|
+
readonly NONE: 0;
|
|
4
|
+
readonly SQUARE: 1;
|
|
5
|
+
readonly TIGHT: 2;
|
|
6
|
+
readonly TOP_AND_BOTTOM: 3;
|
|
7
|
+
};
|
|
8
|
+
export declare const TextWrappingSide: {
|
|
9
|
+
readonly BOTH_SIDES: "bothSides";
|
|
10
|
+
readonly LEFT: "left";
|
|
11
|
+
readonly RIGHT: "right";
|
|
12
|
+
readonly LARGEST: "largest";
|
|
13
|
+
};
|
|
14
14
|
export interface ITextWrapping {
|
|
15
|
-
readonly type: TextWrappingType;
|
|
16
|
-
readonly side?: TextWrappingSide;
|
|
15
|
+
readonly type: (typeof TextWrappingType)[keyof typeof TextWrappingType];
|
|
16
|
+
readonly side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide];
|
|
17
17
|
readonly margins?: IDistance;
|
|
18
18
|
}
|
|
@@ -8,7 +8,7 @@ import { Relationships } from "./relationships";
|
|
|
8
8
|
import { Table } from "./table";
|
|
9
9
|
export interface IDocumentFooter {
|
|
10
10
|
readonly footer: FooterWrapper;
|
|
11
|
-
readonly type: HeaderFooterReferenceType;
|
|
11
|
+
readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
|
|
12
12
|
}
|
|
13
13
|
export declare class FooterWrapper implements IViewWrapper {
|
|
14
14
|
private readonly media;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Paragraph } from '../../paragraph';
|
|
2
2
|
import { XmlComponent } from '../../xml-components';
|
|
3
|
-
export declare
|
|
4
|
-
SEPERATOR
|
|
5
|
-
CONTINUATION_SEPERATOR
|
|
6
|
-
}
|
|
3
|
+
export declare const FootnoteType: {
|
|
4
|
+
readonly SEPERATOR: "separator";
|
|
5
|
+
readonly CONTINUATION_SEPERATOR: "continuationSeparator";
|
|
6
|
+
};
|
|
7
7
|
export interface IFootnoteOptions {
|
|
8
8
|
readonly id: number;
|
|
9
|
-
readonly type?: FootnoteType;
|
|
9
|
+
readonly type?: (typeof FootnoteType)[keyof typeof FootnoteType];
|
|
10
10
|
readonly children: readonly Paragraph[];
|
|
11
11
|
}
|
|
12
12
|
export declare class Footnote extends XmlComponent {
|
|
@@ -8,7 +8,7 @@ import { Relationships } from "./relationships";
|
|
|
8
8
|
import { Table } from "./table";
|
|
9
9
|
export interface IDocumentHeader {
|
|
10
10
|
readonly header: HeaderWrapper;
|
|
11
|
-
readonly type: HeaderFooterReferenceType;
|
|
11
|
+
readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
|
|
12
12
|
}
|
|
13
13
|
export declare class HeaderWrapper implements IViewWrapper {
|
|
14
14
|
private readonly media;
|