docx 7.4.0 → 7.4.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/README.md +15 -16
- package/build/export/packer/next-compiler.d.ts +2 -2
- package/build/export/packer/packer.d.ts +4 -4
- package/build/file/paragraph/math/n-ary/index.d.ts +1 -1
- package/build/file/paragraph/math/n-ary/{math-naray-properties.d.ts → math-n-ary-properties.d.ts} +1 -1
- package/build/index.js +1 -1
- package/package.json +4 -2
- package/src/export/packer/next-compiler.spec.ts +34 -5
- package/src/export/packer/next-compiler.ts +15 -22
- package/src/export/packer/packer.ts +4 -4
- package/src/file/core-properties/properties.ts +2 -0
- package/src/file/document/document-attributes.ts +2 -0
- package/src/file/file.ts +1 -4
- package/src/file/paragraph/math/n-ary/index.ts +1 -1
- package/src/file/paragraph/math/n-ary/{math-naray-properties.spec.ts → math-n-ary-properties.spec.ts} +11 -11
- package/src/file/paragraph/math/n-ary/{math-naray-properties.ts → math-n-ary-properties.ts} +1 -1
- package/src/file/paragraph/math/n-ary/math-sum.ts +2 -2
- package/src/file/table/table-properties/table-float-properties.ts +6 -4
- package/src/file/track-revision/track-revision-components/deleted-page-number.spec.ts +1 -1
- package/src/file/xml-components/imported-xml-component.ts +2 -2
- package/src/import-dotx/import-dotx.ts +2 -2
- package/src/util/convenience-functions.spec.ts +2 -2
- package/src/util/values.spec.ts +1 -0
- package/src/util/values.ts +1 -0
package/README.md
CHANGED
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
Here are examples of `docx` being used with basic `HTML/JS` in a browser environment:
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
- https://codepen.io/dolanmiu/pen/RwNeObg
|
|
30
|
+
- https://jsfiddle.net/dolanmiu/onadx1gu/
|
|
31
31
|
|
|
32
32
|
Here is an example of `docx` working in `Angular`:
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
- https://stackblitz.com/edit/angular-docx
|
|
35
35
|
|
|
36
36
|
Here is an example of `docx` working in `React`:
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
- https://stackblitz.com/edit/react-docx
|
|
39
|
+
- https://stackblitz.com/edit/react-docx-images (adding images to Word Document)
|
|
40
40
|
|
|
41
41
|
Here is an example of `docx` working in `Vue.js`:
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
- https://stackblitz.com/edit/vuejs-docx
|
|
44
44
|
|
|
45
45
|
## Node
|
|
46
46
|
|
|
@@ -48,15 +48,15 @@ Press `endpoint` on the `RunKit` website:
|
|
|
48
48
|
|
|
49
49
|

|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
- https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text
|
|
52
|
+
- https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text
|
|
53
|
+
- https://runkit.com/dolanmiu/docx-demo3 - Bullet points
|
|
54
|
+
- https://runkit.com/dolanmiu/docx-demo4 - Simple table
|
|
55
|
+
- https://runkit.com/dolanmiu/docx-demo5 - Images
|
|
56
|
+
- https://runkit.com/dolanmiu/docx-demo6 - Margins
|
|
57
|
+
- https://runkit.com/dolanmiu/docx-demo7 - Landscape
|
|
58
|
+
- https://runkit.com/dolanmiu/docx-demo8 - Header and Footer
|
|
59
|
+
- https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**
|
|
60
60
|
|
|
61
61
|
More [here](https://github.com/dolanmiu/docx/tree/master/demo)
|
|
62
62
|
|
|
@@ -88,7 +88,6 @@ Read the contribution guidelines [here](https://docx.js.org/#/contribution-guide
|
|
|
88
88
|
[<img src="https://i.imgur.com/PXo25um.png" alt="drawing" height="50"/>](https://www.circadianrisk.com/)
|
|
89
89
|
[<img src="https://i.imgur.com/AKGhtlh.png" alt="drawing"/>](https://lexense.com/)
|
|
90
90
|
|
|
91
|
-
|
|
92
91
|
...and many more!
|
|
93
92
|
|
|
94
93
|
---
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as JSZip from "jszip";
|
|
2
2
|
import { File } from "../../file/file";
|
|
3
|
-
import {
|
|
3
|
+
import { PrettifyType } from "./packer";
|
|
4
4
|
export declare class Compiler {
|
|
5
5
|
private readonly formatter;
|
|
6
6
|
private readonly imageReplacer;
|
|
7
7
|
private readonly numberingReplacer;
|
|
8
8
|
constructor();
|
|
9
|
-
compile(file: File, prettifyXml?: boolean |
|
|
9
|
+
compile(file: File, prettifyXml?: boolean | PrettifyType): JSZip;
|
|
10
10
|
private xmlifyFile;
|
|
11
11
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { File } from "../../file/file";
|
|
3
|
-
export declare enum
|
|
3
|
+
export declare enum PrettifyType {
|
|
4
4
|
NONE = "",
|
|
5
5
|
WITH_2_BLANKS = " ",
|
|
6
6
|
WITH_4_BLANKS = " ",
|
|
7
7
|
WITH_TAB = "\t"
|
|
8
8
|
}
|
|
9
9
|
export declare class Packer {
|
|
10
|
-
static toBuffer(file: File, prettify?: boolean |
|
|
11
|
-
static toBase64String(file: File, prettify?: boolean |
|
|
12
|
-
static toBlob(file: File, prettify?: boolean |
|
|
10
|
+
static toBuffer(file: File, prettify?: boolean | PrettifyType): Promise<Buffer>;
|
|
11
|
+
static toBase64String(file: File, prettify?: boolean | PrettifyType): Promise<string>;
|
|
12
|
+
static toBlob(file: File, prettify?: boolean | PrettifyType): Promise<Blob>;
|
|
13
13
|
private static readonly compiler;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./math-accent-character";
|
|
2
2
|
export * from "./math-base";
|
|
3
3
|
export * from "./math-limit-location";
|
|
4
|
-
export * from "./math-
|
|
4
|
+
export * from "./math-n-ary-properties";
|
|
5
5
|
export * from "./math-sub-script";
|
|
6
6
|
export * from "./math-sum";
|
|
7
7
|
export * from "./math-super-script";
|
package/build/file/paragraph/math/n-ary/{math-naray-properties.d.ts → math-n-ary-properties.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { XmlComponent } from "../../../../file/xml-components";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class MathNAryProperties extends XmlComponent {
|
|
3
3
|
constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean);
|
|
4
4
|
}
|