docx 7.6.0 → 7.7.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/file/core-properties/properties.d.ts +2 -0
- 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/paragraph/formatting/width.d.ts +0 -0
- package/build/file/paragraph/formatting/word-wrap.d.ts +11 -0
- 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.d.ts +2 -1
- package/build/file/paragraph/run/text-attributes.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/simple-elements.d.ts +3 -0
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/src/file/core-properties/properties.ts +2 -0
- 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 +2 -1
- 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/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.ts +1 -1
- 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/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
|
@@ -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
|
}
|
|
@@ -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
|
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
|
+
}
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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
|
}
|