docx 9.6.1 → 9.7.1
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/dist/index.cjs +32763 -22665
- package/dist/index.d.cts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.iife.js +33171 -23073
- package/dist/index.mjs +32763 -22967
- package/dist/index.umd.cjs +33174 -23076
- package/package.json +14 -14
package/dist/index.d.cts
CHANGED
|
@@ -238,10 +238,14 @@ export declare class ColumnBreak extends Run {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
declare class Comment_2 extends XmlComponent {
|
|
241
|
-
|
|
241
|
+
private readonly paraId?;
|
|
242
|
+
constructor({ id, initials, author, date, children }: ICommentOptions, paraId?: string);
|
|
243
|
+
prepForXml(context: IContext): IXmlableObject | undefined;
|
|
242
244
|
}
|
|
243
245
|
export { Comment_2 as Comment }
|
|
244
246
|
|
|
247
|
+
export declare const commentIdToParaId: (id: number) => string;
|
|
248
|
+
|
|
245
249
|
export declare class CommentRangeEnd extends XmlComponent {
|
|
246
250
|
constructor(id: number);
|
|
247
251
|
}
|
|
@@ -256,8 +260,14 @@ export declare class CommentReference extends XmlComponent {
|
|
|
256
260
|
|
|
257
261
|
export declare class Comments extends XmlComponent {
|
|
258
262
|
private readonly relationships;
|
|
263
|
+
private readonly threadData?;
|
|
259
264
|
constructor({ children }: ICommentsOptions);
|
|
260
265
|
get Relationships(): Relationships;
|
|
266
|
+
get ThreadData(): readonly ICommentThreadData[] | undefined;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare class CommentsExtended extends XmlComponent {
|
|
270
|
+
constructor(threadData: readonly ICommentThreadData[]);
|
|
261
271
|
}
|
|
262
272
|
|
|
263
273
|
declare const CompoundLine: {
|
|
@@ -284,6 +294,7 @@ export declare const concreteNumUniqueNumericIdGen: () => UniqueNumericIdCreator
|
|
|
284
294
|
|
|
285
295
|
declare class ContentTypes extends XmlComponent {
|
|
286
296
|
constructor();
|
|
297
|
+
addCommentsExtended(): void;
|
|
287
298
|
addFooter(index: number): void;
|
|
288
299
|
addHeader(index: number): void;
|
|
289
300
|
}
|
|
@@ -311,6 +322,8 @@ declare type CoreImageOptions = {
|
|
|
311
322
|
readonly altText?: DocPropertiesOptions;
|
|
312
323
|
readonly outline?: OutlineOptions;
|
|
313
324
|
readonly solidFill?: SolidFillOptions;
|
|
325
|
+
readonly insertion?: IChangedAttributesProperties;
|
|
326
|
+
readonly deletion?: IChangedAttributesProperties;
|
|
314
327
|
};
|
|
315
328
|
|
|
316
329
|
declare type CoreMediaData = {
|
|
@@ -351,7 +364,7 @@ export declare const createHeaderFooterReference: (type: (typeof HeaderFooterTyp
|
|
|
351
364
|
|
|
352
365
|
export declare const createHorizontalPosition: ({ relative, align, offset }: IHorizontalPositionOptions) => XmlComponent;
|
|
353
366
|
|
|
354
|
-
export declare const createIndent: ({ start, end, left, right, hanging, firstLine }: IIndentAttributesProperties) => XmlComponent;
|
|
367
|
+
export declare const createIndent: ({ start, end, left, right, hanging, firstLine, firstLineChars }: IIndentAttributesProperties) => XmlComponent;
|
|
355
368
|
|
|
356
369
|
export declare const createLineNumberType: ({ countBy, start, restart, distance }: ILineNumberAttributes) => XmlComponent;
|
|
357
370
|
|
|
@@ -649,6 +662,7 @@ declare class File_2 {
|
|
|
649
662
|
private readonly appProperties;
|
|
650
663
|
private readonly styles;
|
|
651
664
|
private readonly comments;
|
|
665
|
+
private readonly commentsExtended?;
|
|
652
666
|
private readonly fontWrapper;
|
|
653
667
|
constructor(options: IPropertiesOptions);
|
|
654
668
|
private addSection;
|
|
@@ -672,6 +686,7 @@ declare class File_2 {
|
|
|
672
686
|
get Endnotes(): EndnotesWrapper;
|
|
673
687
|
get Settings(): Settings;
|
|
674
688
|
get Comments(): Comments;
|
|
689
|
+
get CommentsExtended(): CommentsExtended | undefined;
|
|
675
690
|
get FontTable(): FontWrapper;
|
|
676
691
|
}
|
|
677
692
|
export { File_2 as Document }
|
|
@@ -1000,12 +1015,20 @@ export declare type ICommentOptions = {
|
|
|
1000
1015
|
readonly initials?: string;
|
|
1001
1016
|
readonly author?: string;
|
|
1002
1017
|
readonly date?: Date;
|
|
1018
|
+
readonly parentId?: number;
|
|
1019
|
+
readonly resolved?: boolean;
|
|
1003
1020
|
};
|
|
1004
1021
|
|
|
1005
1022
|
export declare type ICommentsOptions = {
|
|
1006
1023
|
readonly children: readonly ICommentOptions[];
|
|
1007
1024
|
};
|
|
1008
1025
|
|
|
1026
|
+
export declare type ICommentThreadData = {
|
|
1027
|
+
readonly paraId: string;
|
|
1028
|
+
readonly parentParaId?: string;
|
|
1029
|
+
readonly done?: boolean;
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1009
1032
|
declare type ICompatibilityOptions = {
|
|
1010
1033
|
readonly version?: number;
|
|
1011
1034
|
readonly useSingleBorderforContiguousCells?: boolean;
|
|
@@ -1245,6 +1268,7 @@ export declare type IIndentAttributesProperties = {
|
|
|
1245
1268
|
readonly right?: number | UniversalMeasure;
|
|
1246
1269
|
readonly hanging?: number | PositiveUniversalMeasure;
|
|
1247
1270
|
readonly firstLine?: number | PositiveUniversalMeasure;
|
|
1271
|
+
readonly firstLineChars?: number;
|
|
1248
1272
|
};
|
|
1249
1273
|
|
|
1250
1274
|
declare type IInsertedRunOptions = IChangedAttributesProperties & IRunOptions;
|
|
@@ -1284,6 +1308,7 @@ export declare type ILevelsOptions = {
|
|
|
1284
1308
|
readonly style?: {
|
|
1285
1309
|
readonly run?: IRunStylePropertiesOptions;
|
|
1286
1310
|
readonly paragraph?: ILevelParagraphStylePropertiesOptions;
|
|
1311
|
+
readonly style?: string;
|
|
1287
1312
|
};
|
|
1288
1313
|
};
|
|
1289
1314
|
|
|
@@ -1294,7 +1319,7 @@ export declare type ILineNumberAttributes = {
|
|
|
1294
1319
|
readonly distance?: number | PositiveUniversalMeasure;
|
|
1295
1320
|
};
|
|
1296
1321
|
|
|
1297
|
-
export declare class ImageRun extends
|
|
1322
|
+
export declare class ImageRun extends XmlComponent {
|
|
1298
1323
|
private readonly imageData;
|
|
1299
1324
|
constructor(options: IImageOptions);
|
|
1300
1325
|
prepForXml(context: IContext): IXmlableObject | undefined;
|
|
@@ -2608,7 +2633,7 @@ declare class Relationships extends XmlComponent {
|
|
|
2608
2633
|
get RelationshipCount(): number;
|
|
2609
2634
|
}
|
|
2610
2635
|
|
|
2611
|
-
declare 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/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
2636
|
+
declare 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/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.microsoft.com/office/2011/relationships/commentsExtended" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
2612
2637
|
|
|
2613
2638
|
export declare const RelativeHorizontalPosition: {
|
|
2614
2639
|
readonly CENTER: "center";
|
|
@@ -2694,7 +2719,7 @@ export declare const sectionPageSizeDefaults: {
|
|
|
2694
2719
|
};
|
|
2695
2720
|
|
|
2696
2721
|
export declare class SectionProperties extends XmlComponent {
|
|
2697
|
-
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, revision, }?: ISectionPropertiesOptions);
|
|
2722
|
+
constructor({ page: { size: { width, height, orientation, code, }, margin: { top, right, bottom, left, header, footer, gutter, }, pageNumbers, borders, textDirection, }, grid: { linePitch, charSpace, type: gridType }, headerWrapperGroup, footerWrapperGroup, lineNumbers, titlePage, verticalAlign, column, type, revision, }?: ISectionPropertiesOptions);
|
|
2698
2723
|
private addHeaderFooterGroup;
|
|
2699
2724
|
}
|
|
2700
2725
|
|
package/dist/index.d.ts
CHANGED
|
@@ -238,10 +238,14 @@ export declare class ColumnBreak extends Run {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
declare class Comment_2 extends XmlComponent {
|
|
241
|
-
|
|
241
|
+
private readonly paraId?;
|
|
242
|
+
constructor({ id, initials, author, date, children }: ICommentOptions, paraId?: string);
|
|
243
|
+
prepForXml(context: IContext): IXmlableObject | undefined;
|
|
242
244
|
}
|
|
243
245
|
export { Comment_2 as Comment }
|
|
244
246
|
|
|
247
|
+
export declare const commentIdToParaId: (id: number) => string;
|
|
248
|
+
|
|
245
249
|
export declare class CommentRangeEnd extends XmlComponent {
|
|
246
250
|
constructor(id: number);
|
|
247
251
|
}
|
|
@@ -256,8 +260,14 @@ export declare class CommentReference extends XmlComponent {
|
|
|
256
260
|
|
|
257
261
|
export declare class Comments extends XmlComponent {
|
|
258
262
|
private readonly relationships;
|
|
263
|
+
private readonly threadData?;
|
|
259
264
|
constructor({ children }: ICommentsOptions);
|
|
260
265
|
get Relationships(): Relationships;
|
|
266
|
+
get ThreadData(): readonly ICommentThreadData[] | undefined;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare class CommentsExtended extends XmlComponent {
|
|
270
|
+
constructor(threadData: readonly ICommentThreadData[]);
|
|
261
271
|
}
|
|
262
272
|
|
|
263
273
|
declare const CompoundLine: {
|
|
@@ -284,6 +294,7 @@ export declare const concreteNumUniqueNumericIdGen: () => UniqueNumericIdCreator
|
|
|
284
294
|
|
|
285
295
|
declare class ContentTypes extends XmlComponent {
|
|
286
296
|
constructor();
|
|
297
|
+
addCommentsExtended(): void;
|
|
287
298
|
addFooter(index: number): void;
|
|
288
299
|
addHeader(index: number): void;
|
|
289
300
|
}
|
|
@@ -311,6 +322,8 @@ declare type CoreImageOptions = {
|
|
|
311
322
|
readonly altText?: DocPropertiesOptions;
|
|
312
323
|
readonly outline?: OutlineOptions;
|
|
313
324
|
readonly solidFill?: SolidFillOptions;
|
|
325
|
+
readonly insertion?: IChangedAttributesProperties;
|
|
326
|
+
readonly deletion?: IChangedAttributesProperties;
|
|
314
327
|
};
|
|
315
328
|
|
|
316
329
|
declare type CoreMediaData = {
|
|
@@ -351,7 +364,7 @@ export declare const createHeaderFooterReference: (type: (typeof HeaderFooterTyp
|
|
|
351
364
|
|
|
352
365
|
export declare const createHorizontalPosition: ({ relative, align, offset }: IHorizontalPositionOptions) => XmlComponent;
|
|
353
366
|
|
|
354
|
-
export declare const createIndent: ({ start, end, left, right, hanging, firstLine }: IIndentAttributesProperties) => XmlComponent;
|
|
367
|
+
export declare const createIndent: ({ start, end, left, right, hanging, firstLine, firstLineChars }: IIndentAttributesProperties) => XmlComponent;
|
|
355
368
|
|
|
356
369
|
export declare const createLineNumberType: ({ countBy, start, restart, distance }: ILineNumberAttributes) => XmlComponent;
|
|
357
370
|
|
|
@@ -649,6 +662,7 @@ declare class File_2 {
|
|
|
649
662
|
private readonly appProperties;
|
|
650
663
|
private readonly styles;
|
|
651
664
|
private readonly comments;
|
|
665
|
+
private readonly commentsExtended?;
|
|
652
666
|
private readonly fontWrapper;
|
|
653
667
|
constructor(options: IPropertiesOptions);
|
|
654
668
|
private addSection;
|
|
@@ -672,6 +686,7 @@ declare class File_2 {
|
|
|
672
686
|
get Endnotes(): EndnotesWrapper;
|
|
673
687
|
get Settings(): Settings;
|
|
674
688
|
get Comments(): Comments;
|
|
689
|
+
get CommentsExtended(): CommentsExtended | undefined;
|
|
675
690
|
get FontTable(): FontWrapper;
|
|
676
691
|
}
|
|
677
692
|
export { File_2 as Document }
|
|
@@ -1000,12 +1015,20 @@ export declare type ICommentOptions = {
|
|
|
1000
1015
|
readonly initials?: string;
|
|
1001
1016
|
readonly author?: string;
|
|
1002
1017
|
readonly date?: Date;
|
|
1018
|
+
readonly parentId?: number;
|
|
1019
|
+
readonly resolved?: boolean;
|
|
1003
1020
|
};
|
|
1004
1021
|
|
|
1005
1022
|
export declare type ICommentsOptions = {
|
|
1006
1023
|
readonly children: readonly ICommentOptions[];
|
|
1007
1024
|
};
|
|
1008
1025
|
|
|
1026
|
+
export declare type ICommentThreadData = {
|
|
1027
|
+
readonly paraId: string;
|
|
1028
|
+
readonly parentParaId?: string;
|
|
1029
|
+
readonly done?: boolean;
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1009
1032
|
declare type ICompatibilityOptions = {
|
|
1010
1033
|
readonly version?: number;
|
|
1011
1034
|
readonly useSingleBorderforContiguousCells?: boolean;
|
|
@@ -1245,6 +1268,7 @@ export declare type IIndentAttributesProperties = {
|
|
|
1245
1268
|
readonly right?: number | UniversalMeasure;
|
|
1246
1269
|
readonly hanging?: number | PositiveUniversalMeasure;
|
|
1247
1270
|
readonly firstLine?: number | PositiveUniversalMeasure;
|
|
1271
|
+
readonly firstLineChars?: number;
|
|
1248
1272
|
};
|
|
1249
1273
|
|
|
1250
1274
|
declare type IInsertedRunOptions = IChangedAttributesProperties & IRunOptions;
|
|
@@ -1284,6 +1308,7 @@ export declare type ILevelsOptions = {
|
|
|
1284
1308
|
readonly style?: {
|
|
1285
1309
|
readonly run?: IRunStylePropertiesOptions;
|
|
1286
1310
|
readonly paragraph?: ILevelParagraphStylePropertiesOptions;
|
|
1311
|
+
readonly style?: string;
|
|
1287
1312
|
};
|
|
1288
1313
|
};
|
|
1289
1314
|
|
|
@@ -1294,7 +1319,7 @@ export declare type ILineNumberAttributes = {
|
|
|
1294
1319
|
readonly distance?: number | PositiveUniversalMeasure;
|
|
1295
1320
|
};
|
|
1296
1321
|
|
|
1297
|
-
export declare class ImageRun extends
|
|
1322
|
+
export declare class ImageRun extends XmlComponent {
|
|
1298
1323
|
private readonly imageData;
|
|
1299
1324
|
constructor(options: IImageOptions);
|
|
1300
1325
|
prepForXml(context: IContext): IXmlableObject | undefined;
|
|
@@ -2608,7 +2633,7 @@ declare class Relationships extends XmlComponent {
|
|
|
2608
2633
|
get RelationshipCount(): number;
|
|
2609
2634
|
}
|
|
2610
2635
|
|
|
2611
|
-
declare 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/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
2636
|
+
declare 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/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.microsoft.com/office/2011/relationships/commentsExtended" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
|
|
2612
2637
|
|
|
2613
2638
|
export declare const RelativeHorizontalPosition: {
|
|
2614
2639
|
readonly CENTER: "center";
|
|
@@ -2694,7 +2719,7 @@ export declare const sectionPageSizeDefaults: {
|
|
|
2694
2719
|
};
|
|
2695
2720
|
|
|
2696
2721
|
export declare class SectionProperties extends XmlComponent {
|
|
2697
|
-
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, revision, }?: ISectionPropertiesOptions);
|
|
2722
|
+
constructor({ page: { size: { width, height, orientation, code, }, margin: { top, right, bottom, left, header, footer, gutter, }, pageNumbers, borders, textDirection, }, grid: { linePitch, charSpace, type: gridType }, headerWrapperGroup, footerWrapperGroup, lineNumbers, titlePage, verticalAlign, column, type, revision, }?: ISectionPropertiesOptions);
|
|
2698
2723
|
private addHeaderFooterGroup;
|
|
2699
2724
|
}
|
|
2700
2725
|
|