docx 7.6.0 → 7.8.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/README.md +3 -2
- package/build/file/core-properties/properties.d.ts +2 -0
- package/build/file/document/document.d.ts +1 -1
- package/build/file/drawing/doc-properties/doc-properties.d.ts +6 -1
- package/build/file/drawing/drawing.d.ts +2 -0
- package/build/file/drawing/inline/inline.d.ts +8 -1
- package/build/file/index.d.ts +0 -1
- package/build/file/numbering/level.d.ts +57 -8
- package/build/file/paragraph/formatting/alignment.d.ts +8 -3
- package/build/file/paragraph/formatting/spacing.d.ts +1 -0
- package/build/file/paragraph/formatting/width.d.ts +0 -0
- package/build/file/paragraph/formatting/word-wrap.d.ts +11 -0
- package/build/file/paragraph/frame/frame-properties.d.ts +1 -1
- package/build/file/paragraph/math/math-component.d.ts +1 -1
- package/build/file/paragraph/paragraph.d.ts +1 -1
- package/build/file/paragraph/properties.d.ts +2 -0
- package/build/file/paragraph/run/image-run.d.ts +2 -0
- package/build/file/paragraph/run/properties.d.ts +3 -2
- package/build/file/paragraph/run/run-components/text.d.ts +7 -1
- package/build/file/paragraph/run/run.d.ts +2 -1
- package/build/file/paragraph/run/text-attributes.d.ts +1 -1
- package/build/file/paragraph/run/underline.d.ts +2 -1
- package/build/file/relationships/relationship/relationship.d.ts +1 -1
- package/build/file/settings/compatibility.d.ts +65 -1
- package/build/file/settings/settings.d.ts +3 -1
- package/build/file/shared/index.d.ts +1 -0
- package/build/file/{space-type.d.ts → shared/space-type.d.ts} +0 -0
- package/build/file/table/table-properties/index.d.ts +0 -1
- package/build/file/table/table-properties/table-float-properties.d.ts +4 -1
- package/build/file/xml-components/default-attributes.d.ts +1 -1
- package/build/file/xml-components/simple-elements.d.ts +3 -0
- package/build/index.js +1 -1
- package/package.json +6 -6
- package/src/file/core-properties/properties.ts +2 -0
- package/src/file/document/document.ts +4 -2
- package/src/file/drawing/anchor/anchor.spec.ts +244 -1
- package/src/file/drawing/anchor/anchor.ts +1 -1
- package/src/file/drawing/doc-properties/doc-properties.ts +27 -6
- package/src/file/drawing/drawing.spec.ts +12 -0
- package/src/file/drawing/drawing.ts +8 -1
- package/src/file/drawing/inline/inline.ts +9 -3
- package/src/file/file.ts +3 -2
- package/src/file/index.ts +0 -1
- package/src/file/numbering/abstract-numbering.spec.ts +1999 -87
- package/src/file/numbering/concrete-numbering.spec.ts +21 -5
- package/src/file/numbering/level.ts +126 -8
- package/src/file/paragraph/formatting/alignment.ts +37 -2
- package/src/file/paragraph/formatting/spacing.ts +1 -0
- package/src/file/paragraph/formatting/width.ts +0 -0
- package/src/file/paragraph/formatting/word-wrap.spec.ts +20 -0
- package/src/file/paragraph/formatting/word-wrap.ts +14 -0
- package/src/file/paragraph/links/pageref-field-instruction.ts +1 -1
- package/src/file/paragraph/paragraph.spec.ts +2 -1
- package/src/file/paragraph/properties.spec.ts +19 -0
- package/src/file/paragraph/properties.ts +7 -0
- package/src/file/paragraph/run/comment-run.spec.ts +43 -0
- package/src/file/paragraph/run/image-run.spec.ts +6 -0
- package/src/file/paragraph/run/image-run.ts +10 -7
- package/src/file/paragraph/run/page-number.ts +1 -1
- package/src/file/paragraph/run/properties.ts +26 -3
- package/src/file/paragraph/run/run-components/text.spec.ts +22 -0
- package/src/file/paragraph/run/run-components/text.ts +24 -4
- package/src/file/paragraph/run/run.spec.ts +53 -8
- package/src/file/paragraph/run/run.ts +2 -6
- package/src/file/paragraph/run/sequential-identifier-instruction.ts +1 -1
- package/src/file/paragraph/run/tab.ts +1 -0
- package/src/file/paragraph/run/text-attributes.ts +1 -1
- package/src/file/paragraph/run/underline.ts +1 -0
- package/src/file/settings/compatibility.spec.ts +729 -3
- package/src/file/settings/compatibility.ts +390 -5
- package/src/file/settings/settings.spec.ts +75 -0
- package/src/file/settings/settings.ts +5 -3
- package/src/file/shared/index.ts +1 -0
- package/src/file/{space-type.ts → shared/space-type.ts} +0 -0
- package/src/file/table/table-properties/index.ts +0 -1
- package/src/file/table/table-properties/table-float-properties.spec.ts +7 -2
- package/src/file/table/table-properties/table-float-properties.ts +16 -4
- package/src/file/table-of-contents/field-instruction.ts +1 -1
- package/src/file/table-of-contents/sdt-properties.ts +2 -3
- package/src/file/track-revision/track-revision-components/deleted-page-number.ts +1 -1
- package/src/file/track-revision/track-revision-components/deleted-text.ts +1 -1
- package/src/file/xml-components/imported-xml-component.spec.ts +25 -1
- package/src/file/xml-components/simple-elements.ts +7 -0
- package/build/file/drawing/doc-properties/doc-properties-attributes.d.ts +0 -12
- package/build/file/table/table-properties/table-overlap.d.ts +0 -8
- package/build/file/table-of-contents/alias.d.ts +0 -4
- package/src/file/drawing/doc-properties/doc-properties-attributes.ts +0 -13
- package/src/file/table/table-properties/table-overlap.spec.ts +0 -22
- package/src/file/table/table-properties/table-overlap.ts +0 -26
- package/src/file/table-of-contents/alias.ts +0 -12
package/README.md
CHANGED
|
@@ -29,11 +29,12 @@ Here are examples of `docx` being used with basic `HTML/JS` in a browser environ
|
|
|
29
29
|
- https://codepen.io/dolanmiu/pen/RwNeObg
|
|
30
30
|
- https://jsfiddle.net/dolanmiu/onadx1gu/
|
|
31
31
|
|
|
32
|
-
Here
|
|
32
|
+
Here are examples of `docx` working in `Angular`:
|
|
33
33
|
|
|
34
34
|
- https://stackblitz.com/edit/angular-docx
|
|
35
|
+
- https://stackblitz.com/edit/angular-wmd6k3
|
|
35
36
|
|
|
36
|
-
Here
|
|
37
|
+
Here are examples of `docx` working in `React`:
|
|
37
38
|
|
|
38
39
|
- https://stackblitz.com/edit/react-docx
|
|
39
40
|
- https://stackblitz.com/edit/react-docx-images (adding images to Word Document)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ICommentsOptions } from "../../file/paragraph/run/comment-run";
|
|
2
|
+
import { ICompatibilityOptions } from "../../file/settings/compatibility";
|
|
2
3
|
import { XmlComponent } from "../../file/xml-components";
|
|
3
4
|
import { ICustomPropertyOptions } from "../custom-properties";
|
|
4
5
|
import { IDocumentBackgroundOptions } from "../document";
|
|
@@ -30,6 +31,7 @@ export interface IPropertiesOptions {
|
|
|
30
31
|
readonly updateFields?: boolean;
|
|
31
32
|
};
|
|
32
33
|
readonly compatabilityModeVersion?: number;
|
|
34
|
+
readonly compatibility?: ICompatibilityOptions;
|
|
33
35
|
readonly customProperties?: readonly ICustomPropertyOptions[];
|
|
34
36
|
readonly evenAndOddHeaderAndFooters?: boolean;
|
|
35
37
|
}
|
|
@@ -5,7 +5,7 @@ import { TableOfContents } from "../table-of-contents";
|
|
|
5
5
|
import { Body } from "./body";
|
|
6
6
|
import { IDocumentBackgroundOptions } from "./document-background";
|
|
7
7
|
export interface IDocumentOptions {
|
|
8
|
-
readonly background
|
|
8
|
+
readonly background?: IDocumentBackgroundOptions;
|
|
9
9
|
}
|
|
10
10
|
export declare class Document extends XmlComponent {
|
|
11
11
|
private readonly body;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { XmlComponent } from "../../../file/xml-components";
|
|
2
|
+
export interface DocPropertiesOptions {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
}
|
|
2
7
|
export declare class DocProperties extends XmlComponent {
|
|
3
|
-
constructor();
|
|
8
|
+
constructor({ name, description, title }?: DocPropertiesOptions);
|
|
4
9
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IMediaData } from "../../file/media";
|
|
2
2
|
import { XmlComponent } from "../../file/xml-components";
|
|
3
|
+
import { DocPropertiesOptions } from "./doc-properties/doc-properties";
|
|
3
4
|
import { IFloating } from "./floating";
|
|
4
5
|
export interface IDistance {
|
|
5
6
|
readonly distT?: number;
|
|
@@ -9,6 +10,7 @@ export interface IDistance {
|
|
|
9
10
|
}
|
|
10
11
|
export interface IDrawingOptions {
|
|
11
12
|
readonly floating?: IFloating;
|
|
13
|
+
readonly docProperties?: DocPropertiesOptions;
|
|
12
14
|
}
|
|
13
15
|
export declare class Drawing extends XmlComponent {
|
|
14
16
|
private readonly inline;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { IMediaData, IMediaDataTransformation } from "../../../file/media";
|
|
2
2
|
import { XmlComponent } from "../../../file/xml-components";
|
|
3
|
+
import { DocPropertiesOptions } from "./../doc-properties/doc-properties";
|
|
4
|
+
interface InlineOptions {
|
|
5
|
+
readonly mediaData: IMediaData;
|
|
6
|
+
readonly transform: IMediaDataTransformation;
|
|
7
|
+
readonly docProperties?: DocPropertiesOptions;
|
|
8
|
+
}
|
|
3
9
|
export declare class Inline extends XmlComponent {
|
|
4
10
|
private readonly extent;
|
|
5
11
|
private readonly graphic;
|
|
6
|
-
constructor(mediaData
|
|
12
|
+
constructor({ mediaData, transform, docProperties }: InlineOptions);
|
|
7
13
|
}
|
|
14
|
+
export {};
|
package/build/file/index.d.ts
CHANGED
|
@@ -3,20 +3,69 @@ import { AlignmentType } from "../paragraph/formatting";
|
|
|
3
3
|
import { ILevelParagraphStylePropertiesOptions } from "../paragraph/properties";
|
|
4
4
|
import { IRunStylePropertiesOptions } from "../paragraph/run/properties";
|
|
5
5
|
export declare enum LevelFormat {
|
|
6
|
-
|
|
6
|
+
DECIMAL = "decimal",
|
|
7
|
+
UPPER_ROMAN = "upperRoman",
|
|
8
|
+
LOWER_ROMAN = "lowerRoman",
|
|
9
|
+
UPPER_LETTER = "upperLetter",
|
|
10
|
+
LOWER_LETTER = "lowerLetter",
|
|
11
|
+
ORDINAL = "ordinal",
|
|
7
12
|
CARDINAL_TEXT = "cardinalText",
|
|
13
|
+
ORDINAL_TEXT = "ordinalText",
|
|
14
|
+
HEX = "hex",
|
|
8
15
|
CHICAGO = "chicago",
|
|
9
|
-
|
|
16
|
+
IDEOGRAPH__DIGITAL = "ideographDigital",
|
|
17
|
+
JAPANESE_COUNTING = "japaneseCounting",
|
|
18
|
+
AIUEO = "aiueo",
|
|
19
|
+
IROHA = "iroha",
|
|
20
|
+
DECIMAL_FULL_WIDTH = "decimalFullWidth",
|
|
21
|
+
DECIMAL_HALF_WIDTH = "decimalHalfWidth",
|
|
22
|
+
JAPANESE_LEGAL = "japaneseLegal",
|
|
23
|
+
JAPANESE_DIGITAL_TEN_THOUSAND = "japaneseDigitalTenThousand",
|
|
10
24
|
DECIMAL_ENCLOSED_CIRCLE = "decimalEnclosedCircle",
|
|
25
|
+
DECIMAL_FULL_WIDTH2 = "decimalFullWidth2",
|
|
26
|
+
AIUEO_FULL_WIDTH = "aiueoFullWidth",
|
|
27
|
+
IROHA_FULL_WIDTH = "irohaFullWidth",
|
|
28
|
+
DECIMAL_ZERO = "decimalZero",
|
|
29
|
+
BULLET = "bullet",
|
|
30
|
+
GANADA = "ganada",
|
|
31
|
+
CHOSUNG = "chosung",
|
|
11
32
|
DECIMAL_ENCLOSED_FULLSTOP = "decimalEnclosedFullstop",
|
|
12
33
|
DECIMAL_ENCLOSED_PARENTHESES = "decimalEnclosedParen",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
34
|
+
DECIMAL_ENCLOSED_CIRCLE_CHINESE = "decimalEnclosedCircleChinese",
|
|
35
|
+
IDEOGRAPH_ENCLOSED_CIRCLE = "ideographEnclosedCircle",
|
|
36
|
+
IDEOGRAPH_TRADITIONAL = "ideographTraditional",
|
|
37
|
+
IDEOGRAPH_ZODIAC = "ideographZodiac",
|
|
38
|
+
IDEOGRAPH_ZODIAC_TRADITIONAL = "ideographZodiacTraditional",
|
|
39
|
+
TAIWANESE_COUNTING = "taiwaneseCounting",
|
|
40
|
+
IDEOGRAPH_LEGAL_TRADITIONAL = "ideographLegalTraditional",
|
|
41
|
+
TAIWANESE_COUNTING_THOUSAND = "taiwaneseCountingThousand",
|
|
42
|
+
TAIWANESE_DIGITAL = "taiwaneseDigital",
|
|
43
|
+
CHINESE_COUNTING = "chineseCounting",
|
|
44
|
+
CHINESE_LEGAL_SIMPLIFIED = "chineseLegalSimplified",
|
|
45
|
+
CHINESE_COUNTING_THOUSAND = "chineseCountingThousand",
|
|
46
|
+
KOREAN_DIGITAL = "koreanDigital",
|
|
47
|
+
KOREAN_COUNTING = "koreanCounting",
|
|
48
|
+
KOREAN_LEGAL = "koreanLegal",
|
|
49
|
+
KOREAN_DIGITAL2 = "koreanDigital2",
|
|
50
|
+
VIETNAMESE_COUNTING = "vietnameseCounting",
|
|
51
|
+
RUSSIAN_LOWER = "russianLower",
|
|
52
|
+
RUSSIAN_UPPER = "russianUpper",
|
|
16
53
|
NONE = "none",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
54
|
+
NUMBER_IN_DASH = "numberInDash",
|
|
55
|
+
HEBREW1 = "hebrew1",
|
|
56
|
+
HEBREW2 = "hebrew2",
|
|
57
|
+
ARABIC_ALPHA = "arabicAlpha",
|
|
58
|
+
ARABIC_ABJAD = "arabicAbjad",
|
|
59
|
+
HINDI_VOWELS = "hindiVowels",
|
|
60
|
+
HINDI_CONSONANTS = "hindiConsonants",
|
|
61
|
+
HINDI_NUMBERS = "hindiNumbers",
|
|
62
|
+
HINDI_COUNTING = "hindiCounting",
|
|
63
|
+
THAI_LETTERS = "thaiLetters",
|
|
64
|
+
THAI_NUMBERS = "thaiNumbers",
|
|
65
|
+
THAI_COUNTING = "thaiCounting",
|
|
66
|
+
BAHT_TEXT = "bahtText",
|
|
67
|
+
DOLLAR_TEXT = "dollarText",
|
|
68
|
+
CUSTOM = "custom"
|
|
20
69
|
}
|
|
21
70
|
export declare enum LevelSuffix {
|
|
22
71
|
NOTHING = "nothing",
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { XmlAttributeComponent, XmlComponent } from "../../../file/xml-components";
|
|
2
2
|
export declare enum AlignmentType {
|
|
3
3
|
START = "start",
|
|
4
|
-
END = "end",
|
|
5
4
|
CENTER = "center",
|
|
5
|
+
END = "end",
|
|
6
6
|
BOTH = "both",
|
|
7
|
-
|
|
7
|
+
MEDIUM_KASHIDA = "mediumKashida",
|
|
8
8
|
DISTRIBUTE = "distribute",
|
|
9
|
+
NUM_TAB = "numTab",
|
|
10
|
+
HIGH_KASHIDA = "highKashida",
|
|
11
|
+
LOW_KASHIDA = "lowKashida",
|
|
12
|
+
THAI_DISTRIBUTE = "thaiDistribute",
|
|
9
13
|
LEFT = "left",
|
|
10
|
-
RIGHT = "right"
|
|
14
|
+
RIGHT = "right",
|
|
15
|
+
JUSTIFIED = "both"
|
|
11
16
|
}
|
|
12
17
|
export declare class AlignmentAttributes extends XmlAttributeComponent<{
|
|
13
18
|
readonly val: AlignmentType;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { XmlAttributeComponent, XmlComponent } from "../../../file/xml-components";
|
|
2
|
+
export declare class WordWrapAttributes extends XmlAttributeComponent<{
|
|
3
|
+
readonly val: 0;
|
|
4
|
+
}> {
|
|
5
|
+
protected readonly xmlKeys: {
|
|
6
|
+
val: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare class WordWrap extends XmlComponent {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
@@ -48,7 +48,7 @@ export interface IAlignmentFrameOptions extends IBaseFrameOptions {
|
|
|
48
48
|
readonly y: VerticalPositionAlign;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type IFrameOptions = IXYFrameOptions | IAlignmentFrameOptions;
|
|
52
52
|
export declare class FramePropertiesAttributes extends XmlAttributeComponent<{
|
|
53
53
|
readonly anchorLock?: boolean;
|
|
54
54
|
readonly dropCap?: DropCapType;
|
|
@@ -5,5 +5,5 @@ import { MathRun } from "./math-run";
|
|
|
5
5
|
import { MathSum, MathIntegral } from "./n-ary";
|
|
6
6
|
import { MathRadical } from "./radical";
|
|
7
7
|
import { MathSubScript, MathSubSuperScript, MathSuperScript } from "./script";
|
|
8
|
-
export
|
|
8
|
+
export type MathComponent = MathRun | MathFraction | MathSum | MathIntegral | MathSuperScript | MathSubScript | MathSubSuperScript | MathRadical | MathFunction | MathRoundBrackets | MathCurlyBrackets | MathAngledBrackets | MathSquareBrackets;
|
|
9
9
|
export declare const WORKAROUND4 = "";
|
|
@@ -7,7 +7,7 @@ import { Math } from "./math";
|
|
|
7
7
|
import { IParagraphPropertiesOptions } from "./properties";
|
|
8
8
|
import { ImageRun, Run, SequentialIdentifier, SimpleField, SimpleMailMergeField, SymbolRun, TextRun } from "./run";
|
|
9
9
|
import { Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments } from "./run/comment-run";
|
|
10
|
-
export
|
|
10
|
+
export type ParagraphChild = TextRun | ImageRun | SymbolRun | Bookmark | PageBreak | ColumnBreak | SequentialIdentifier | FootnoteReferenceRun | InternalHyperlink | ExternalHyperlink | InsertedTextRun | DeletedTextRun | Math | SimpleField | SimpleMailMergeField | Comments | Comment | CommentRangeStart | CommentRangeEnd | CommentReference;
|
|
11
11
|
export interface IParagraphOptions extends IParagraphPropertiesOptions {
|
|
12
12
|
readonly text?: string;
|
|
13
13
|
readonly children?: readonly ParagraphChild[];
|
|
@@ -41,6 +41,8 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp
|
|
|
41
41
|
readonly widowControl?: boolean;
|
|
42
42
|
readonly frame?: IFrameOptions;
|
|
43
43
|
readonly suppressLineNumbers?: boolean;
|
|
44
|
+
readonly wordWrap?: boolean;
|
|
45
|
+
readonly scale?: number;
|
|
44
46
|
}
|
|
45
47
|
export declare class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
46
48
|
private readonly numberingReferences;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { IContext, IXmlableObject } from "../../../file/xml-components";
|
|
3
|
+
import { DocPropertiesOptions } from "../../../file/drawing/doc-properties/doc-properties";
|
|
3
4
|
import { IFloating } from "../../drawing";
|
|
4
5
|
import { IMediaTransformation } from "../../media";
|
|
5
6
|
import { Run } from "../run";
|
|
@@ -7,6 +8,7 @@ export interface IImageOptions {
|
|
|
7
8
|
readonly data: Buffer | string | Uint8Array | ArrayBuffer;
|
|
8
9
|
readonly transformation: IMediaTransformation;
|
|
9
10
|
readonly floating?: IFloating;
|
|
11
|
+
readonly altText?: DocPropertiesOptions;
|
|
10
12
|
}
|
|
11
13
|
export declare class ImageRun extends Run {
|
|
12
14
|
private readonly key;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IBorderOptions } from "../../../file/border";
|
|
2
2
|
import { IShadingAttributesProperties } from "../../../file/shading";
|
|
3
|
-
import { SpaceType } from "../../../file/space-type";
|
|
4
3
|
import { IChangedAttributesProperties } from "../../../file/track-revision/track-revision";
|
|
5
4
|
import { IgnoreIfEmptyXmlComponent, XmlComponent } from "../../../file/xml-components";
|
|
6
5
|
import { EmphasisMarkType } from "./emphasis-mark";
|
|
@@ -41,7 +40,9 @@ export interface IRunStylePropertiesOptions {
|
|
|
41
40
|
readonly imprint?: boolean;
|
|
42
41
|
readonly revision?: IRunPropertiesChangeOptions;
|
|
43
42
|
readonly border?: IBorderOptions;
|
|
44
|
-
readonly
|
|
43
|
+
readonly vanish?: boolean;
|
|
44
|
+
readonly specVanish?: boolean;
|
|
45
|
+
readonly scale?: number;
|
|
45
46
|
}
|
|
46
47
|
export interface IRunPropertiesOptions extends IRunStylePropertiesOptions {
|
|
47
48
|
readonly style?: string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { SpaceType } from "../../../../file/shared";
|
|
1
2
|
import { XmlComponent } from "../../../../file/xml-components";
|
|
3
|
+
interface ITextOptions {
|
|
4
|
+
readonly space?: SpaceType;
|
|
5
|
+
readonly text?: string;
|
|
6
|
+
}
|
|
2
7
|
export declare class Text extends XmlComponent {
|
|
3
|
-
constructor(
|
|
8
|
+
constructor(options: string | ITextOptions);
|
|
4
9
|
}
|
|
10
|
+
export {};
|
|
@@ -3,8 +3,9 @@ import { FootnoteReferenceRun } from "../../../file/footnotes/footnote/run/refer
|
|
|
3
3
|
import { FieldInstruction } from "../../../file/table-of-contents/field-instruction";
|
|
4
4
|
import { Begin, End, Separate } from "./field";
|
|
5
5
|
import { IRunPropertiesOptions, RunProperties } from "./properties";
|
|
6
|
+
import { Tab } from "./tab";
|
|
6
7
|
export interface IRunOptions extends IRunPropertiesOptions {
|
|
7
|
-
readonly children?: readonly (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | string)[];
|
|
8
|
+
readonly children?: readonly (Begin | FieldInstruction | Separate | End | PageNumber | FootnoteReferenceRun | Tab | string)[];
|
|
8
9
|
readonly break?: number;
|
|
9
10
|
readonly text?: string;
|
|
10
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpaceType } from "../../../file/
|
|
1
|
+
import { SpaceType } from "../../../file/shared";
|
|
2
2
|
import { XmlAttributeComponent } from "../../../file/xml-components";
|
|
3
3
|
export declare class TextAttributes extends XmlAttributeComponent<{
|
|
4
4
|
readonly space: SpaceType;
|
|
@@ -16,7 +16,8 @@ export declare enum UnderlineType {
|
|
|
16
16
|
DASHDOTDOTHEAVY = "dashDotDotHeavy",
|
|
17
17
|
WAVE = "wave",
|
|
18
18
|
WAVYHEAVY = "wavyHeavy",
|
|
19
|
-
WAVYDOUBLE = "wavyDouble"
|
|
19
|
+
WAVYDOUBLE = "wavyDouble",
|
|
20
|
+
NONE = "none"
|
|
20
21
|
}
|
|
21
22
|
export declare class Underline extends XmlComponent {
|
|
22
23
|
constructor(underlineType?: UnderlineType, color?: string);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { XmlComponent } from "../../../file/xml-components";
|
|
2
|
-
export
|
|
2
|
+
export type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
|
|
3
3
|
export declare enum TargetModeType {
|
|
4
4
|
EXTERNAL = "External"
|
|
5
5
|
}
|
|
@@ -1,7 +1,71 @@
|
|
|
1
1
|
import { XmlComponent } from "../../file/xml-components";
|
|
2
2
|
export interface ICompatibilityOptions {
|
|
3
|
-
readonly doNotExpandShiftReturn?: boolean;
|
|
4
3
|
readonly version?: number;
|
|
4
|
+
readonly useSingleBorderforContiguousCells?: boolean;
|
|
5
|
+
readonly wordPerfectJustification?: boolean;
|
|
6
|
+
readonly noTabStopForHangingIndent?: boolean;
|
|
7
|
+
readonly noLeading?: boolean;
|
|
8
|
+
readonly spaceForUnderline?: boolean;
|
|
9
|
+
readonly noColumnBalance?: boolean;
|
|
10
|
+
readonly balanceSingleByteDoubleByteWidth?: boolean;
|
|
11
|
+
readonly noExtraLineSpacing?: boolean;
|
|
12
|
+
readonly doNotLeaveBackslashAlone?: boolean;
|
|
13
|
+
readonly underlineTrailingSpaces?: boolean;
|
|
14
|
+
readonly doNotExpandShiftReturn?: boolean;
|
|
15
|
+
readonly spacingInWholePoints?: boolean;
|
|
16
|
+
readonly lineWrapLikeWord6?: boolean;
|
|
17
|
+
readonly printBodyTextBeforeHeader?: boolean;
|
|
18
|
+
readonly printColorsBlack?: boolean;
|
|
19
|
+
readonly spaceWidth?: boolean;
|
|
20
|
+
readonly showBreaksInFrames?: boolean;
|
|
21
|
+
readonly subFontBySize?: boolean;
|
|
22
|
+
readonly suppressBottomSpacing?: boolean;
|
|
23
|
+
readonly suppressTopSpacing?: boolean;
|
|
24
|
+
readonly suppressSpacingAtTopOfPage?: boolean;
|
|
25
|
+
readonly suppressTopSpacingWP?: boolean;
|
|
26
|
+
readonly suppressSpBfAfterPgBrk?: boolean;
|
|
27
|
+
readonly swapBordersFacingPages?: boolean;
|
|
28
|
+
readonly convertMailMergeEsc?: boolean;
|
|
29
|
+
readonly truncateFontHeightsLikeWP6?: boolean;
|
|
30
|
+
readonly macWordSmallCaps?: boolean;
|
|
31
|
+
readonly usePrinterMetrics?: boolean;
|
|
32
|
+
readonly doNotSuppressParagraphBorders?: boolean;
|
|
33
|
+
readonly wrapTrailSpaces?: boolean;
|
|
34
|
+
readonly footnoteLayoutLikeWW8?: boolean;
|
|
35
|
+
readonly shapeLayoutLikeWW8?: boolean;
|
|
36
|
+
readonly alignTablesRowByRow?: boolean;
|
|
37
|
+
readonly forgetLastTabAlignment?: boolean;
|
|
38
|
+
readonly adjustLineHeightInTable?: boolean;
|
|
39
|
+
readonly autoSpaceLikeWord95?: boolean;
|
|
40
|
+
readonly noSpaceRaiseLower?: boolean;
|
|
41
|
+
readonly doNotUseHTMLParagraphAutoSpacing?: boolean;
|
|
42
|
+
readonly layoutRawTableWidth?: boolean;
|
|
43
|
+
readonly layoutTableRowsApart?: boolean;
|
|
44
|
+
readonly useWord97LineBreakRules?: boolean;
|
|
45
|
+
readonly doNotBreakWrappedTables?: boolean;
|
|
46
|
+
readonly doNotSnapToGridInCell?: boolean;
|
|
47
|
+
readonly selectFieldWithFirstOrLastCharacter?: boolean;
|
|
48
|
+
readonly applyBreakingRules?: boolean;
|
|
49
|
+
readonly doNotWrapTextWithPunctuation?: boolean;
|
|
50
|
+
readonly doNotUseEastAsianBreakRules?: boolean;
|
|
51
|
+
readonly useWord2002TableStyleRules?: boolean;
|
|
52
|
+
readonly growAutofit?: boolean;
|
|
53
|
+
readonly useFELayout?: boolean;
|
|
54
|
+
readonly useNormalStyleForList?: boolean;
|
|
55
|
+
readonly doNotUseIndentAsNumberingTabStop?: boolean;
|
|
56
|
+
readonly useAlternateEastAsianLineBreakRules?: boolean;
|
|
57
|
+
readonly allowSpaceOfSameStyleInTable?: boolean;
|
|
58
|
+
readonly doNotSuppressIndentation?: boolean;
|
|
59
|
+
readonly doNotAutofitConstrainedTables?: boolean;
|
|
60
|
+
readonly autofitToFirstFixedWidthCell?: boolean;
|
|
61
|
+
readonly underlineTabInNumberingList?: boolean;
|
|
62
|
+
readonly displayHangulFixedWidth?: boolean;
|
|
63
|
+
readonly splitPgBreakAndParaMark?: boolean;
|
|
64
|
+
readonly doNotVerticallyAlignCellWithSp?: boolean;
|
|
65
|
+
readonly doNotBreakConstrainedForcedTable?: boolean;
|
|
66
|
+
readonly ignoreVerticalAlignmentInTextboxes?: boolean;
|
|
67
|
+
readonly useAnsiKerningPairs?: boolean;
|
|
68
|
+
readonly cachedColumnBalance?: boolean;
|
|
5
69
|
}
|
|
6
70
|
export declare class Compatibility extends XmlComponent {
|
|
7
71
|
constructor(options: ICompatibilityOptions);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { XmlAttributeComponent, XmlComponent } from "../../file/xml-components";
|
|
2
|
+
import { ICompatibilityOptions } from "./compatibility";
|
|
2
3
|
export declare class SettingsAttributes extends XmlAttributeComponent<{
|
|
3
4
|
readonly wpc?: string;
|
|
4
5
|
readonly mc?: string;
|
|
@@ -39,10 +40,11 @@ export declare class SettingsAttributes extends XmlAttributeComponent<{
|
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
export interface ISettingsOptions {
|
|
42
|
-
readonly
|
|
43
|
+
readonly compatibilityModeVersion?: number;
|
|
43
44
|
readonly evenAndOddHeaders?: boolean;
|
|
44
45
|
readonly trackRevisions?: boolean;
|
|
45
46
|
readonly updateFields?: boolean;
|
|
47
|
+
readonly compatibility?: ICompatibilityOptions;
|
|
46
48
|
}
|
|
47
49
|
export declare class Settings extends XmlComponent {
|
|
48
50
|
constructor(options: ISettingsOptions);
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { XmlAttributeComponent, XmlComponent } from "../../../file/xml-components";
|
|
2
|
-
import { OverlapType } from "./table-overlap";
|
|
3
2
|
export declare enum TableAnchorType {
|
|
4
3
|
MARGIN = "margin",
|
|
5
4
|
PAGE = "page",
|
|
@@ -20,6 +19,10 @@ export declare enum RelativeVerticalPosition {
|
|
|
20
19
|
INLINE = "inline",
|
|
21
20
|
TOP = "top"
|
|
22
21
|
}
|
|
22
|
+
export declare enum OverlapType {
|
|
23
|
+
NEVER = "never",
|
|
24
|
+
OVERLAP = "overlap"
|
|
25
|
+
}
|
|
23
26
|
export interface ITableFloatOptions {
|
|
24
27
|
readonly horizontalAnchor?: TableAnchorType;
|
|
25
28
|
readonly absoluteHorizontalPosition?: number | string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseXmlComponent, IContext } from "./base";
|
|
2
2
|
import { IXmlableObject } from "./xmlable-object";
|
|
3
|
-
export
|
|
3
|
+
export type AttributeMap<T> = {
|
|
4
4
|
readonly [P in keyof T]: string;
|
|
5
5
|
};
|
|
6
6
|
export declare abstract class XmlAttributeComponent<T extends object> extends BaseXmlComponent {
|
|
@@ -11,6 +11,9 @@ export declare class StringValueElement extends XmlComponent {
|
|
|
11
11
|
export declare class NumberValueElement extends XmlComponent {
|
|
12
12
|
constructor(name: string, val: number);
|
|
13
13
|
}
|
|
14
|
+
export declare class StringEnumValueElement<T extends string> extends XmlComponent {
|
|
15
|
+
constructor(name: string, val: T);
|
|
16
|
+
}
|
|
14
17
|
export declare class StringContainer extends XmlComponent {
|
|
15
18
|
constructor(name: string, val: string);
|
|
16
19
|
}
|