Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
0e033131b2 | |||
0be6f31611 | |||
e8a8b73ad0 | |||
953c6806ce | |||
1cf68c696e | |||
6d354674b2 | |||
137b9a06cb | |||
c43f04da52 | |||
1941721070 | |||
9f282952cd | |||
09b81017d0 | |||
4f58979096 | |||
898104ea2c | |||
7d15eeda88 | |||
cba3f77272 | |||
91dffc45ff | |||
47eb46e700 | |||
8271ddc78e | |||
6b08545ef9 | |||
9cddfb4ce7 | |||
19b26e1c5e | |||
936fffd0a1 | |||
2f24d062b3 | |||
4e373d4ab6 | |||
c01d3d9f67 | |||
d2f344b83f | |||
d7f5a44b45 | |||
0a9b98e1aa | |||
fd188870e8 | |||
c28e6ac22e | |||
9381bd8ddb | |||
454fc76e8d | |||
ba963b0360 | |||
19d3ed47c9 | |||
0757295213 | |||
76c677a6b1 | |||
ce8842b52f | |||
a039fe3223 | |||
a669b2148f | |||
53a7d87b03 | |||
388ab4f3b1 | |||
567713b7ba |
155
package-lock.json
generated
155
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docx",
|
"name": "docx",
|
||||||
"version": "7.1.2",
|
"version": "7.2.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -585,9 +585,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/eslint": {
|
"@types/eslint": {
|
||||||
"version": "7.28.2",
|
"version": "8.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.2.0.tgz",
|
||||||
"integrity": "sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==",
|
"integrity": "sha512-74hbvsnc+7TEDa1z5YLSe4/q8hGYB3USNvCuzHUJrjPV6hXaq8IXcngCrHkuvFt0+8rFz7xYXrHgNayIX0UZvQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/estree": "*",
|
"@types/estree": "*",
|
||||||
@ -645,14 +645,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "16.11.6",
|
"version": "16.11.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz",
|
||||||
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w=="
|
"integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA=="
|
||||||
},
|
},
|
||||||
"@types/prompt": {
|
"@types/prompt": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prompt/-/prompt-1.1.2.tgz",
|
||||||
"integrity": "sha512-Ht3nSZy87jqKM5Y92GWKD6RQTqQIi6tAKhrWgEvFPh+P13L5olqBYs+P1HySBYRHyIezEqrB3StK4X7lBFmIEQ==",
|
"integrity": "sha512-Zc9YzOvjAWxxGY7qo0Q6yINMVVspAa4p68UCzucWMU+GaPujpjwbOwzI38s7Jq01k0GztzLxXlRiFcZf/aeIWA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@ -1305,13 +1305,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"version": "4.17.5",
|
"version": "4.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.5.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz",
|
||||||
"integrity": "sha512-I3ekeB92mmpctWBoLXe0d5wPS2cBuRvvW0JyyJHMrk9/HmP2ZjrTboNAZ8iuGqaEIlKguljbQY32OkOJIRrgoA==",
|
"integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"caniuse-lite": "^1.0.30001271",
|
"caniuse-lite": "^1.0.30001280",
|
||||||
"electron-to-chromium": "^1.3.878",
|
"electron-to-chromium": "^1.3.896",
|
||||||
"escalade": "^3.1.1",
|
"escalade": "^3.1.1",
|
||||||
"node-releases": "^2.0.1",
|
"node-releases": "^2.0.1",
|
||||||
"picocolors": "^1.0.0"
|
"picocolors": "^1.0.0"
|
||||||
@ -1416,9 +1416,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001271",
|
"version": "1.0.30001283",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001271.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz",
|
||||||
"integrity": "sha512-BBruZFWmt3HFdVPS8kceTBIguKxu4f99n5JNp06OlPD/luoAMIaIK5ieV5YjnBLH3Nysai9sxj9rpJj4ZisXOA==",
|
"integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"caseless": {
|
"caseless": {
|
||||||
@ -2057,9 +2057,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.3.879",
|
"version": "1.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.879.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.3.tgz",
|
||||||
"integrity": "sha512-zJo+D9GwbJvM31IdFmwcGvychhk4KKbKYo2GWlsn+C/dxz2NwmbhGJjWwTfFSF2+eFH7VvfA8MCZ8SOqTrlnpw==",
|
"integrity": "sha512-hfpppjYhqIZB8jrNb0rNceQRkSnBN7QJl3W26O1jUv3F3BkQknqy1YTqVXkFnIcFtBc3Qnv5M7r5Lez2iOLgZA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
@ -3229,6 +3229,15 @@
|
|||||||
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
|
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"json5": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"minimist": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"jsonc-parser": {
|
"jsonc-parser": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz",
|
||||||
@ -4472,9 +4481,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.4.1",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz",
|
||||||
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
|
"integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prismjs": {
|
"prismjs": {
|
||||||
@ -5040,19 +5049,28 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sinon": {
|
"sinon": {
|
||||||
"version": "11.1.2",
|
"version": "12.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.1.tgz",
|
||||||
"integrity": "sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==",
|
"integrity": "sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@sinonjs/commons": "^1.8.3",
|
"@sinonjs/commons": "^1.8.3",
|
||||||
"@sinonjs/fake-timers": "^7.1.2",
|
"@sinonjs/fake-timers": "^8.1.0",
|
||||||
"@sinonjs/samsam": "^6.0.2",
|
"@sinonjs/samsam": "^6.0.2",
|
||||||
"diff": "^5.0.0",
|
"diff": "^5.0.0",
|
||||||
"nise": "^5.1.0",
|
"nise": "^5.1.0",
|
||||||
"supports-color": "^7.2.0"
|
"supports-color": "^7.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@sinonjs/fake-timers": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@sinonjs/commons": "^1.7.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
@ -5077,9 +5095,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"source-map-support": {
|
"source-map-support": {
|
||||||
"version": "0.5.20",
|
"version": "0.5.21",
|
||||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz",
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||||
"integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==",
|
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"buffer-from": "^1.0.0",
|
"buffer-from": "^1.0.0",
|
||||||
@ -5300,9 +5318,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"terser": {
|
"terser": {
|
||||||
"version": "5.9.0",
|
"version": "5.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz",
|
||||||
"integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==",
|
"integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"commander": "^2.20.0",
|
"commander": "^2.20.0",
|
||||||
@ -5325,28 +5343,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"terser-webpack-plugin": {
|
"terser-webpack-plugin": {
|
||||||
"version": "5.2.4",
|
"version": "5.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.5.tgz",
|
||||||
"integrity": "sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==",
|
"integrity": "sha512-3luOVHku5l0QBeYS8r4CdHYWEGMmIj3H1U64jgkdZzECcSOJAyJ9TjuqcQZvw1Y+4AOBN9SeYJPJmFn2cM4/2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"jest-worker": "^27.0.6",
|
"jest-worker": "^27.0.6",
|
||||||
"p-limit": "^3.1.0",
|
|
||||||
"schema-utils": "^3.1.1",
|
"schema-utils": "^3.1.1",
|
||||||
"serialize-javascript": "^6.0.0",
|
"serialize-javascript": "^6.0.0",
|
||||||
"source-map": "^0.6.1",
|
"source-map": "^0.6.1",
|
||||||
"terser": "^5.7.2"
|
"terser": "^5.7.2"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"p-limit": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"yocto-queue": "^0.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test-exclude": {
|
"test-exclude": {
|
||||||
@ -5527,26 +5533,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsconfig-paths": {
|
"tsconfig-paths": {
|
||||||
"version": "3.11.0",
|
"version": "3.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",
|
||||||
"integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==",
|
"integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/json5": "^0.0.29",
|
"@types/json5": "^0.0.29",
|
||||||
"json5": "^1.0.1",
|
"json5": "^1.0.1",
|
||||||
"minimist": "^1.2.0",
|
"minimist": "^1.2.0",
|
||||||
"strip-bom": "^3.0.0"
|
"strip-bom": "^3.0.0"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"json5": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"minimist": "^1.2.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslib": {
|
"tslib": {
|
||||||
@ -5660,9 +5655,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typedoc": {
|
"typedoc": {
|
||||||
"version": "0.22.7",
|
"version": "0.22.10",
|
||||||
"resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.22.7.tgz",
|
"resolved": "http://registry.npmjs.org/typedoc/-/typedoc-0.22.10.tgz",
|
||||||
"integrity": "sha512-ndxxp+tU1Wczvdxp4u2/PvT1qjD6hdFdSdehpORHjE+JXmMkl2bftXCR0upHmsnesBG7VCcr8vfgloGHIH8glQ==",
|
"integrity": "sha512-hQYZ4WtoMZ61wDC6w10kxA42+jclWngdmztNZsDvIz7BMJg7F2xnT+uYsUa7OluyKossdFj9E9Ye4QOZKTy8SA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "^7.2.0",
|
"glob": "^7.2.0",
|
||||||
@ -5673,9 +5668,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "4.4.4",
|
"version": "4.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz",
|
||||||
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
|
"integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"unique-string": {
|
"unique-string": {
|
||||||
@ -5856,9 +5851,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"watchpack": {
|
"watchpack": {
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.0.tgz",
|
||||||
"integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==",
|
"integrity": "sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
@ -5866,9 +5861,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack": {
|
"webpack": {
|
||||||
"version": "5.60.0",
|
"version": "5.64.4",
|
||||||
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.60.0.tgz",
|
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.64.4.tgz",
|
||||||
"integrity": "sha512-OL5GDYi2dKxnwJPSOg2tODgzDxAffN0osgWkZaBo/l3ikCxDFP+tuJT3uF7GyBE3SDBpKML/+a8EobyWAQO3DQ==",
|
"integrity": "sha512-LWhqfKjCLoYJLKJY8wk2C3h77i8VyHowG3qYNZiIqD6D0ZS40439S/KVuc/PY48jp2yQmy0mhMknq8cys4jFMw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/eslint-scope": "^3.7.0",
|
"@types/eslint-scope": "^3.7.0",
|
||||||
@ -5893,8 +5888,8 @@
|
|||||||
"schema-utils": "^3.1.0",
|
"schema-utils": "^3.1.0",
|
||||||
"tapable": "^2.1.1",
|
"tapable": "^2.1.1",
|
||||||
"terser-webpack-plugin": "^5.1.3",
|
"terser-webpack-plugin": "^5.1.3",
|
||||||
"watchpack": "^2.2.0",
|
"watchpack": "^2.3.0",
|
||||||
"webpack-sources": "^3.2.0"
|
"webpack-sources": "^3.2.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"enhanced-resolve": {
|
"enhanced-resolve": {
|
||||||
@ -5969,9 +5964,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"webpack-sources": {
|
"webpack-sources": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz",
|
||||||
"integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==",
|
"integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"which": {
|
"which": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "docx",
|
"name": "docx",
|
||||||
"version": "7.1.2",
|
"version": "7.2.0",
|
||||||
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -87,7 +87,7 @@
|
|||||||
"request-promise": "^4.2.2",
|
"request-promise": "^4.2.2",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"shelljs": "^0.8.4",
|
"shelljs": "^0.8.4",
|
||||||
"sinon": "^11.0.0",
|
"sinon": "^12.0.1",
|
||||||
"stream-browserify": "^3.0.0",
|
"stream-browserify": "^3.0.0",
|
||||||
"ts-loader": "^9.0.0",
|
"ts-loader": "^9.0.0",
|
||||||
"ts-node": "^10.2.1",
|
"ts-node": "^10.2.1",
|
||||||
@ -95,7 +95,7 @@
|
|||||||
"tslint": "^6.1.3",
|
"tslint": "^6.1.3",
|
||||||
"tslint-immutable": "^6.0.1",
|
"tslint-immutable": "^6.0.1",
|
||||||
"typedoc": "^0.22.3",
|
"typedoc": "^0.22.3",
|
||||||
"typescript": "4.4.4",
|
"typescript": "4.5.2",
|
||||||
"unzipper": "^0.10.11",
|
"unzipper": "^0.10.11",
|
||||||
"webpack": "^5.28.0",
|
"webpack": "^5.28.0",
|
||||||
"webpack-cli": "^4.6.0"
|
"webpack-cli": "^4.6.0"
|
||||||
|
@ -7,6 +7,7 @@ export * from "./page-number";
|
|||||||
export * from "./page-borders";
|
export * from "./page-borders";
|
||||||
export * from "./page-margin";
|
export * from "./page-margin";
|
||||||
export * from "./page-borders";
|
export * from "./page-borders";
|
||||||
|
export * from "./page-text-direction";
|
||||||
export * from "./line-number";
|
export * from "./line-number";
|
||||||
export * from "./section-type";
|
export * from "./section-type";
|
||||||
export * from "./header-footer-reference";
|
export * from "./header-footer-reference";
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
import { expect } from "chai";
|
||||||
|
|
||||||
|
import { Formatter } from "export/formatter";
|
||||||
|
import { PageTextDirection, PageTextDirectionType } from "./page-text-direction";
|
||||||
|
|
||||||
|
describe("PageTextDirection", () => {
|
||||||
|
describe("#constructor()", () => {
|
||||||
|
it("should set the direction of the text flow to top-to-bottom-right-to-left", () => {
|
||||||
|
const textDirection = new PageTextDirection(PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT);
|
||||||
|
|
||||||
|
const tree = new Formatter().format(textDirection);
|
||||||
|
|
||||||
|
expect(tree).to.deep.equal({
|
||||||
|
"w:textDirection": {
|
||||||
|
_attr: {
|
||||||
|
"w:val": "tbRl",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,22 @@
|
|||||||
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||||
|
|
||||||
|
export enum PageTextDirectionType {
|
||||||
|
LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb",
|
||||||
|
TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl",
|
||||||
|
}
|
||||||
|
|
||||||
|
class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: PageTextDirectionType }> {
|
||||||
|
protected readonly xmlKeys = { val: "w:val" };
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PageTextDirection extends XmlComponent {
|
||||||
|
constructor(value: PageTextDirectionType) {
|
||||||
|
super("w:textDirection");
|
||||||
|
|
||||||
|
this.root.push(
|
||||||
|
new PageTextDirectionAttributes({
|
||||||
|
val: value,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -11,6 +11,7 @@ import { VerticalAlign } from "file/vertical-align";
|
|||||||
import { PageOrientation } from "./properties";
|
import { PageOrientation } from "./properties";
|
||||||
import { LineNumberRestartFormat } from "./properties/line-number";
|
import { LineNumberRestartFormat } from "./properties/line-number";
|
||||||
import { PageBorderOffsetFrom } from "./properties/page-borders";
|
import { PageBorderOffsetFrom } from "./properties/page-borders";
|
||||||
|
import { PageTextDirectionType } from "./properties/page-text-direction";
|
||||||
import { SectionType } from "./properties/section-type";
|
import { SectionType } from "./properties/section-type";
|
||||||
import { sectionMarginDefaults, sectionPageSizeDefaults, SectionProperties } from "./section-properties";
|
import { sectionMarginDefaults, sectionPageSizeDefaults, SectionProperties } from "./section-properties";
|
||||||
|
|
||||||
@ -258,5 +259,19 @@ describe("SectionProperties", () => {
|
|||||||
"w:lnNumType": { _attr: { "w:countBy": 2, "w:distance": 4, "w:restart": "continuous", "w:start": 2 } },
|
"w:lnNumType": { _attr: { "w:countBy": 2, "w:distance": 4, "w:restart": "continuous", "w:start": 2 } },
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should create section properties with text flow direction", () => {
|
||||||
|
const properties = new SectionProperties({
|
||||||
|
page: {
|
||||||
|
textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const tree = new Formatter().format(properties);
|
||||||
|
expect(Object.keys(tree)).to.deep.equal(["w:sectPr"]);
|
||||||
|
const type = tree["w:sectPr"].find((item) => item["w:textDirection"] !== undefined);
|
||||||
|
expect(type).to.deep.equal({
|
||||||
|
"w:textDirection": { _attr: { "w:val": "tbRl" } },
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -15,6 +15,7 @@ import { IPageBordersOptions, PageBorders } from "./properties/page-borders";
|
|||||||
import { IPageMarginAttributes, PageMargin } from "./properties/page-margin";
|
import { IPageMarginAttributes, PageMargin } from "./properties/page-margin";
|
||||||
import { IPageNumberTypeAttributes, PageNumberType } from "./properties/page-number";
|
import { IPageNumberTypeAttributes, PageNumberType } from "./properties/page-number";
|
||||||
import { IPageSizeAttributes, PageOrientation, PageSize } from "./properties/page-size";
|
import { IPageSizeAttributes, PageOrientation, PageSize } from "./properties/page-size";
|
||||||
|
import { PageTextDirection, PageTextDirectionType } from "./properties/page-text-direction";
|
||||||
import { SectionType, Type } from "./properties/section-type";
|
import { SectionType, Type } from "./properties/section-type";
|
||||||
|
|
||||||
export interface IHeaderFooterGroup<T> {
|
export interface IHeaderFooterGroup<T> {
|
||||||
@ -29,6 +30,7 @@ export interface ISectionPropertiesOptions {
|
|||||||
readonly margin?: IPageMarginAttributes;
|
readonly margin?: IPageMarginAttributes;
|
||||||
readonly pageNumbers?: IPageNumberTypeAttributes;
|
readonly pageNumbers?: IPageNumberTypeAttributes;
|
||||||
readonly borders?: IPageBordersOptions;
|
readonly borders?: IPageBordersOptions;
|
||||||
|
readonly textDirection?: PageTextDirectionType;
|
||||||
};
|
};
|
||||||
readonly grid?: IDocGridAttributesProperties;
|
readonly grid?: IDocGridAttributesProperties;
|
||||||
readonly headerWrapperGroup?: IHeaderFooterGroup<HeaderWrapper>;
|
readonly headerWrapperGroup?: IHeaderFooterGroup<HeaderWrapper>;
|
||||||
@ -108,6 +110,7 @@ export class SectionProperties extends XmlComponent {
|
|||||||
} = {},
|
} = {},
|
||||||
pageNumbers = {},
|
pageNumbers = {},
|
||||||
borders,
|
borders,
|
||||||
|
textDirection,
|
||||||
} = {},
|
} = {},
|
||||||
grid: { linePitch = 360 } = {},
|
grid: { linePitch = 360 } = {},
|
||||||
headerWrapperGroup = {},
|
headerWrapperGroup = {},
|
||||||
@ -152,6 +155,10 @@ export class SectionProperties extends XmlComponent {
|
|||||||
this.root.push(new OnOffElement("w:titlePg", titlePage));
|
this.root.push(new OnOffElement("w:titlePg", titlePage));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (textDirection) {
|
||||||
|
this.root.push(new PageTextDirection(textDirection));
|
||||||
|
}
|
||||||
|
|
||||||
this.root.push(new DocumentGrid(linePitch));
|
this.root.push(new DocumentGrid(linePitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,14 +6,12 @@ import { DocumentBackground } from "./document-background";
|
|||||||
|
|
||||||
describe("DocumentBackground", () => {
|
describe("DocumentBackground", () => {
|
||||||
describe("#constructor()", () => {
|
describe("#constructor()", () => {
|
||||||
it("should create a DocumentBackground with no options and set color to auto", () => {
|
it("should create a DocumentBackground with no options", () => {
|
||||||
const documentBackground = new DocumentBackground({});
|
const documentBackground = new DocumentBackground({});
|
||||||
const tree = new Formatter().format(documentBackground);
|
const tree = new Formatter().format(documentBackground);
|
||||||
expect(tree).to.deep.equal({
|
expect(tree).to.deep.equal({
|
||||||
"w:background": {
|
"w:background": {
|
||||||
_attr: {
|
_attr: {},
|
||||||
"w:color": "FFFFFF",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@ import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|||||||
// </xsd:simpleType>
|
// </xsd:simpleType>
|
||||||
|
|
||||||
export class DocumentBackgroundAttributes extends XmlAttributeComponent<{
|
export class DocumentBackgroundAttributes extends XmlAttributeComponent<{
|
||||||
readonly color: string;
|
readonly color?: string;
|
||||||
readonly themeColor?: string;
|
readonly themeColor?: string;
|
||||||
readonly themeShade?: string;
|
readonly themeShade?: string;
|
||||||
readonly themeTint?: string;
|
readonly themeTint?: string;
|
||||||
@ -68,7 +68,7 @@ export class DocumentBackground extends XmlComponent {
|
|||||||
|
|
||||||
this.root.push(
|
this.root.push(
|
||||||
new DocumentBackgroundAttributes({
|
new DocumentBackgroundAttributes({
|
||||||
color: hexColorValue(options.color ? options.color : "FFFFFF"),
|
color: options.color === undefined ? undefined : hexColorValue(options.color),
|
||||||
themeColor: options.themeColor,
|
themeColor: options.themeColor,
|
||||||
themeShade: options.themeShade === undefined ? undefined : uCharHexNumber(options.themeShade),
|
themeShade: options.themeShade === undefined ? undefined : uCharHexNumber(options.themeShade),
|
||||||
themeTint: options.themeTint === undefined ? undefined : uCharHexNumber(options.themeTint),
|
themeTint: options.themeTint === undefined ? undefined : uCharHexNumber(options.themeTint),
|
||||||
|
@ -40,9 +40,7 @@ describe("Document", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"w:background": {
|
"w:background": {
|
||||||
_attr: {
|
_attr: {},
|
||||||
"w:color": "FFFFFF",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "w:body": {} },
|
{ "w:body": {} },
|
||||||
|
Reference in New Issue
Block a user