Compare commits

...

253 Commits
8.0.0 ... 8.2.4

Author SHA1 Message Date
3eb98533ae Version bump 2023-11-02 03:02:21 +00:00
f5f021834e Merge pull request #2403 from dolanmiu/feature/bump-eslint-plugin
Upgrade @typescript-eslint/parser
2023-11-02 03:01:55 +00:00
35702c3f77 Upgrade @typescript-eslint/parser 2023-11-01 22:52:41 +00:00
8fbbd571ad Merge pull request #2402 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-6.9.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.60.1 to 6.9.1
2023-11-01 22:27:36 +00:00
2dd228be69 build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.60.1 to 6.9.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.9.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 21:16:40 +00:00
562835cfe7 Merge pull request #2401 from dolanmiu/dependabot/npm_and_yarn/vite-4.5.0
build(deps-dev): bump vite from 4.3.9 to 4.5.0
2023-11-01 21:15:57 +00:00
6bac06e84d Merge pull request #2382 from dolanmiu/dependabot/npm_and_yarn/cspell-7.3.8
build(deps-dev): bump cspell from 6.31.1 to 7.3.8
2023-11-01 21:15:33 +00:00
88436168ee Merge pull request #2400 from dolanmiu/dependabot/npm_and_yarn/browserify-sign-4.2.2
build(deps-dev): bump browserify-sign from 4.2.1 to 4.2.2
2023-11-01 21:15:26 +00:00
0c3206d2e2 Merge pull request #2350 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.8.2
build(deps-dev): bump eslint-plugin-jsdoc from 46.4.4 to 46.8.2
2023-11-01 21:15:08 +00:00
033debd339 Merge pull request #2303 from dolanmiu/dependabot/npm_and_yarn/execa-8.0.1
build(deps-dev): bump execa from 7.1.1 to 8.0.1
2023-11-01 21:15:00 +00:00
d4f160732a Use Record instead of Object 2023-11-01 20:56:02 +00:00
4238fc9ab4 build(deps-dev): bump execa from 7.1.1 to 8.0.1
Bumps [execa](https://github.com/sindresorhus/execa) from 7.1.1 to 8.0.1.
- [Release notes](https://github.com/sindresorhus/execa/releases)
- [Commits](https://github.com/sindresorhus/execa/compare/v7.1.1...v8.0.1)

---
updated-dependencies:
- dependency-name: execa
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 20:55:59 +00:00
0d042b8dd1 build(deps-dev): bump vite from 4.3.9 to 4.5.0
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.9 to 4.5.0.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 20:55:35 +00:00
afdd5f2d8f Merge pull request #2383 from dolanmiu/dependabot/npm_and_yarn/types/node-20.8.6
build(deps): bump @types/node from 20.4.2 to 20.8.6
2023-11-01 20:55:29 +00:00
70c7b3d1b3 Merge pull request #2374 from dolanmiu/dependabot/npm_and_yarn/postcss-8.4.31
build(deps-dev): bump postcss from 8.4.23 to 8.4.31
2023-11-01 20:55:22 +00:00
7b1cd5fe86 build(deps-dev): bump browserify-sign from 4.2.1 to 4.2.2
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 20:55:02 +00:00
09ab169ffd Merge pull request #2359 from dolanmiu/dependabot/npm_and_yarn/glob-10.3.10
build(deps-dev): bump glob from 10.3.1 to 10.3.10
2023-11-01 20:55:01 +00:00
35a82cf12e Merge pull request #2333 from dolanmiu/dependabot/npm_and_yarn/inquirer-9.2.11
build(deps-dev): bump inquirer from 9.2.7 to 9.2.11
2023-11-01 20:54:54 +00:00
8d33cb01dd Merge pull request #2268 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-unicorn-48.0.1
build(deps-dev): bump eslint-plugin-unicorn from 47.0.0 to 48.0.1
2023-11-01 20:54:35 +00:00
438d11dd86 Merge pull request #2387 from wilkmaia/fix/patch-styling
Fix style being missed on patchDocument
2023-11-01 20:54:23 +00:00
d23b0d0789 Fix coverage 2023-11-01 20:40:30 +00:00
1fa8c7ac82 Merge pull request #2397 from hom/master
fix: #2082 Numbering instance restart number not work since v8.0.0 and work well in v7.8.2
2023-10-27 00:41:01 +01:00
3d6ead0359 Merge pull request #2 from hom/fix/#2082 2023-10-27 03:59:58 +08:00
379050dccd Merge pull request #1 from dolanmiu/master 2023-10-27 03:31:07 +08:00
f9d1c197cf Merge pull request #2379 from rahon6000/master
changed default section margin from inch to Twip
2023-10-20 22:10:03 +01:00
a89ee463e6 Fix style being missed on patchDocument
There were scenarios in which patching a document would result in loss
of style for the template runs and, possibly, their right-adjacent run
as well (post-splitting). That was due to the run style elements not
being added to the newly created runs.

This commit addresses this issue by introducing a new, optional, flag
for the `patchDocument` function: `keepOriginalStyles`. It defaults to
`false` (current behavior) and, when `true`, ensures that there is no
loss of styling.

This should address https://github.com/dolanmiu/docx/issues/2293.
2023-10-18 12:58:01 -03:00
036caaacc8 build(deps): bump @types/node from 20.4.2 to 20.8.6
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.4.2 to 20.8.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 11:53:19 +00:00
80c37afe2b build(deps-dev): bump cspell from 6.31.1 to 7.3.8
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.31.1 to 7.3.8.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v6.31.1...v7.3.8)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 11:52:24 +00:00
3a36d912fe changed default section margin from inch to Twip 2023-10-12 12:14:13 +09:00
c741d5d8ac build(deps-dev): bump postcss from 8.4.23 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.23 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.23...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-07 19:43:49 +00:00
0fa7dd13ad build(deps-dev): bump glob from 10.3.1 to 10.3.10
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.1 to 10.3.10.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.1...v10.3.10)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-27 11:43:28 +00:00
d5d80550e7 Version bump 2023-09-26 23:00:51 +01:00
23a0a59454 Use .mjs for ESM 2023-09-26 22:59:32 +01:00
066aa56f6a build(deps-dev): bump eslint-plugin-jsdoc from 46.4.4 to 46.8.2
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.4.4 to 46.8.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.4.4...v46.8.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 11:59:15 +00:00
3997b7a5d6 fix: #2082 Numbering instance restart number not work since v8.0.0 and work well in v7.8.2 2023-09-13 17:08:59 +08:00
ccc391607a Merge pull request #2331 from hshoja/doc/update-style-with-xml
Update styling with xml  docs
2023-09-11 21:04:32 +01:00
9577192d41 build(deps-dev): bump inquirer from 9.2.7 to 9.2.11
Bumps [inquirer](https://github.com/SBoudrias/Inquirer.js) from 9.2.7 to 9.2.11.
- [Release notes](https://github.com/SBoudrias/Inquirer.js/releases)
- [Commits](https://github.com/SBoudrias/Inquirer.js/compare/inquirer@9.2.7...inquirer@9.2.11)

---
updated-dependencies:
- dependency-name: inquirer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 11:40:53 +00:00
968c3aed0f Update styling-with-xml doc 2023-09-10 15:57:48 +02:00
9c7a80729b Merge branch 'master' of github.com:dolanmiu/docx 2023-08-06 20:10:11 +01:00
5f26ca1c94 Update numbering docs 2023-08-06 20:10:03 +01:00
f2b1587bff build(deps-dev): bump eslint-plugin-unicorn from 47.0.0 to 48.0.1
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 47.0.0 to 48.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v47.0.0...v48.0.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-26 11:15:05 +00:00
3b9f80fb1a Merge pull request #2259 from dolanmiu/feat/bump-prettier
Bump prettier
2023-07-21 22:13:17 +01:00
8da57bec51 Bump prettier
Fix new prettier issues
2023-07-21 20:11:52 +01:00
63db9f290c Version bump 2023-07-20 22:44:30 +01:00
e8bd4bd6c6 Merge pull request #2256 from dolanmiu/feature/tweak-build
Remove default browser export
2023-07-20 22:42:56 +01:00
28d93b0c42 Remove default browser export
Fixes Angular issue
2023-07-20 20:46:53 +01:00
95f8e37006 Version bump 2023-07-19 02:10:13 +01:00
87083cb264 Merge pull request #2240 from dolanmiu/dependabot/npm_and_yarn/vite-plugin-dts-3.3.1
build(deps-dev): bump vite-plugin-dts from 2.3.0 to 3.3.1
2023-07-19 01:49:10 +01:00
1e8dc95c9c Merge pull request #2227 from dolanmiu/dependabot/npm_and_yarn/vitest/ui-0.33.0
build(deps-dev): bump @vitest/ui from 0.32.2 to 0.33.0
2023-07-19 01:49:04 +01:00
abfa242c28 build(deps-dev): bump @vitest/ui from 0.32.2 to 0.33.0
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.32.2 to 0.33.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.33.0/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 00:37:38 +00:00
56b5414152 build(deps-dev): bump vite-plugin-dts from 2.3.0 to 3.3.1
Bumps [vite-plugin-dts](https://github.com/qmhc/vite-plugin-dts) from 2.3.0 to 3.3.1.
- [Release notes](https://github.com/qmhc/vite-plugin-dts/releases)
- [Changelog](https://github.com/qmhc/vite-plugin-dts/blob/main/CHANGELOG.md)
- [Commits](https://github.com/qmhc/vite-plugin-dts/compare/v2.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: vite-plugin-dts
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 00:37:28 +00:00
8f46060be2 Merge pull request #2235 from dolanmiu/dependabot/npm_and_yarn/types/node-20.4.2
build(deps): bump @types/node from 20.3.2 to 20.4.2
2023-07-19 01:36:41 +01:00
93b17ca2af Merge pull request #2226 from dolanmiu/dependabot/npm_and_yarn/vitest/coverage-v8-0.33.0
build(deps-dev): bump @vitest/coverage-v8 from 0.32.2 to 0.33.0
2023-07-19 01:36:27 +01:00
66008115b8 build(deps-dev): bump @vitest/coverage-v8 from 0.32.2 to 0.33.0
Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 0.32.2 to 0.33.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.33.0/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 00:23:34 +00:00
55697a7c32 build(deps): bump @types/node from 20.3.2 to 20.4.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.3.2 to 20.4.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 00:22:54 +00:00
e9b259db6b Merge pull request #2241 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.4.4
build(deps-dev): bump eslint-plugin-jsdoc from 46.4.2 to 46.4.4
2023-07-19 01:22:29 +01:00
55c51f7af1 Merge pull request #2238 from dolanmiu/dependabot/npm_and_yarn/eslint-8.45.0
build(deps-dev): bump eslint from 8.43.0 to 8.45.0
2023-07-19 01:22:22 +01:00
4e7fd6a6dc Merge pull request #2242 from dolanmiu/dependabot/npm_and_yarn/esbuild/win32-x64-0.18.14
build(deps-dev): bump @esbuild/win32-x64 from 0.18.10 to 0.18.14
2023-07-19 01:22:06 +01:00
6294ec448f Merge pull request #2234 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.62.0
build(deps-dev): bump @typescript-eslint/parser from 5.60.1 to 5.62.0
2023-07-19 01:21:48 +01:00
668198b5d1 Merge pull request #2228 from dolanmiu/dependabot/npm_and_yarn/vitest-0.33.0
build(deps-dev): bump vitest from 0.32.2 to 0.33.0
2023-07-19 01:21:41 +01:00
56b2ffe706 Merge pull request #2209 from dolanmiu/dependabot/npm_and_yarn/typescript-5.1.6
build(deps-dev): bump typescript from 5.1.3 to 5.1.6
2023-07-19 01:21:35 +01:00
2ab06ffe36 Merge pull request #2244 from dolanmiu/feature/build-fixes
Fix `vite` build issues
2023-07-19 01:19:15 +01:00
0c51082bb9 Add logging output to demo 2023-07-18 21:07:19 +01:00
9a9a2019f6 Do not polyfill buffer 2023-07-18 21:06:35 +01:00
d94348f5ca Export correct type in patchDocument 2023-07-18 20:49:43 +01:00
4c10741862 build(deps-dev): bump @esbuild/win32-x64 from 0.18.10 to 0.18.14
Bumps [@esbuild/win32-x64](https://github.com/evanw/esbuild) from 0.18.10 to 0.18.14.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.10...v0.18.14)

---
updated-dependencies:
- dependency-name: "@esbuild/win32-x64"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 11:17:06 +00:00
222a25e4e2 Compile umd version as .js format 2023-07-18 01:53:56 +01:00
5fd4490c4f build(deps-dev): bump eslint-plugin-jsdoc from 46.4.2 to 46.4.4
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.4.2 to 46.4.4.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.4.2...v46.4.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 11:58:39 +00:00
e1cc65cb97 build(deps-dev): bump eslint from 8.43.0 to 8.45.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.43.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 11:57:25 +00:00
991f837bc1 build(deps-dev): bump @typescript-eslint/parser from 5.60.1 to 5.62.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.60.1 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 11:42:13 +00:00
87b3035465 build(deps-dev): bump vitest from 0.32.2 to 0.33.0
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.32.2 to 0.33.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.33.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-07 11:26:34 +00:00
4498305a6c Remove gitter from README 2023-07-04 12:38:54 +01:00
cac7abba91 build(deps-dev): bump typescript from 5.1.3 to 5.1.6
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.1.6.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-30 11:39:27 +00:00
b9b55b2829 Version bump 2023-06-30 01:40:40 +01:00
11365d5be5 Merge pull request #2182 from dolanmiu/dependabot/npm_and_yarn/eslint-8.43.0
build(deps-dev): bump eslint from 8.42.0 to 8.43.0
2023-06-29 17:32:50 +01:00
47a5aff40c build(deps-dev): bump eslint from 8.42.0 to 8.43.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.42.0 to 8.43.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.42.0...v8.43.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 16:07:10 +00:00
721fbbac67 Merge pull request #2180 from dolanmiu/dependabot/npm_and_yarn/vitest/ui-0.32.2
build(deps-dev): bump @vitest/ui from 0.32.0 to 0.32.2
2023-06-29 17:05:51 +01:00
bcca50fb40 Merge pull request #2192 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.60.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.59.11 to 5.60.1
2023-06-29 17:05:45 +01:00
229d2eb689 Merge pull request #2179 from dolanmiu/dependabot/npm_and_yarn/vitest/coverage-v8-0.32.2
build(deps-dev): bump @vitest/coverage-v8 from 0.32.0 to 0.32.2
2023-06-29 17:05:39 +01:00
3ef80cc7b3 Merge pull request #2181 from dolanmiu/dependabot/npm_and_yarn/vitest-0.32.2
build(deps-dev): bump vitest from 0.32.0 to 0.32.2
2023-06-29 17:05:32 +01:00
f1f11f36e4 Merge pull request #2193 from dolanmiu/dependabot/npm_and_yarn/types/node-20.3.2
build(deps): bump @types/node from 20.3.1 to 20.3.2
2023-06-29 17:05:24 +01:00
28f187064e Merge pull request #2194 from dolanmiu/dependabot/npm_and_yarn/esbuild/win32-x64-0.18.10
build(deps-dev): bump @esbuild/win32-x64 from 0.18.3 to 0.18.10
2023-06-29 17:05:17 +01:00
c391ca533a Merge pull request #2195 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.60.1
build(deps-dev): bump @typescript-eslint/parser from 5.59.11 to 5.60.1
2023-06-29 17:05:07 +01:00
0ca92b80f9 Merge pull request #2200 from dolanmiu/dependabot/npm_and_yarn/glob-10.3.1
build(deps-dev): bump glob from 10.2.7 to 10.3.1
2023-06-29 16:58:27 +01:00
84501b6038 Merge pull request #2206 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.4.2
build(deps-dev): bump eslint-plugin-jsdoc from 46.2.6 to 46.4.2
2023-06-29 16:58:20 +01:00
dcd3e90b19 Merge pull request #2201 from performonkey/master
Fix patch doc add duplicate content type
2023-06-29 15:05:44 +01:00
be7d84dfa0 build(deps-dev): bump eslint-plugin-jsdoc from 46.2.6 to 46.4.2
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.2.6 to 46.4.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.2.6...v46.4.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-29 11:17:21 +00:00
b0d60109c9 Fix prettier issue 2023-06-29 10:43:44 +08:00
b4659f9901 Merge pull request #2203 from dolanmiu/feature/do-not-override-default-styles
Fix override order in default styles
2023-06-28 23:50:33 +01:00
25f657b842 Add right align example 2023-06-28 22:02:09 +01:00
dfffb066f3 Fix override order in default styles 2023-06-28 21:40:20 +01:00
4f06d760a3 Fix patch doc add duplicate content type 2023-06-28 23:34:16 +08:00
aea2531111 build(deps-dev): bump glob from 10.2.7 to 10.3.1
Bumps [glob](https://github.com/isaacs/node-glob) from 10.2.7 to 10.3.1.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.2.7...v10.3.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 11:57:13 +00:00
16707201b4 build(deps-dev): bump @typescript-eslint/parser from 5.59.11 to 5.60.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.11 to 5.60.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.60.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:57:32 +00:00
c7c9652095 build(deps-dev): bump @esbuild/win32-x64 from 0.18.3 to 0.18.10
Bumps [@esbuild/win32-x64](https://github.com/evanw/esbuild) from 0.18.3 to 0.18.10.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.3...v0.18.10)

---
updated-dependencies:
- dependency-name: "@esbuild/win32-x64"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:57:12 +00:00
05378f58ae build(deps): bump @types/node from 20.3.1 to 20.3.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.3.1 to 20.3.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:57:01 +00:00
d7549a1140 build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.59.11 to 5.60.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.60.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 11:56:43 +00:00
e3ee455186 Merge pull request #2189 from dolanmiu/feature/check-boxes
Feature/check boxes
2023-06-25 03:23:45 +01:00
210d9c58f2 Improve API for check boxes 2023-06-25 03:09:29 +01:00
db85c3dd2f Merge remote-tracking branch 'ric/master' into feature/check-boxes 2023-06-24 20:50:35 +01:00
4976a75ab3 Version bump 2023-06-24 20:46:29 +01:00
414d0248f5 Update Checkbox test description 2023-06-23 15:36:08 -04:00
fa400bcf39 update CheckBox and tests to handle optional alias field 2023-06-23 13:06:18 -04:00
9e9ca526fe Prettier syntax update of sdt-properties 2023-06-23 13:05:21 -04:00
41c0fb5fc0 Update sdt-properties to make alias optional 2023-06-23 13:04:28 -04:00
58e7dbf445 Revert "Modify sdt-properties to accommodate for children elements"
This reverts commit f706d8e62d.
2023-06-22 15:39:39 -04:00
20e0213c7d Revert "Revert unnecessary changes to sdt-properties"
This reverts commit d1f75e3a42.
2023-06-22 15:37:00 -04:00
b8f83fd6ad Update CheckBox element and test file according to sdt-properties correction 2023-06-22 15:21:45 -04:00
d1f75e3a42 Revert unnecessary changes to sdt-properties 2023-06-22 15:20:56 -04:00
337ff464cf Modify/create index files to handle exporting 2023-06-22 14:51:10 -04:00
cad4a5510b Create test files for CheckBox and CheckBoxUtil 2023-06-22 14:50:07 -04:00
aa8438d8bd Create CheckBox element and supporting child elements 2023-06-22 14:49:03 -04:00
79363c2c2c Modify Pargraph's children to accept CheckBox 2023-06-22 14:43:10 -04:00
f706d8e62d Modify sdt-properties to accommodate for children elements 2023-06-22 14:42:17 -04:00
e7ee2a0fdf build(deps-dev): bump vitest from 0.32.0 to 0.32.2
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.32.0 to 0.32.2.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.32.2/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 11:57:31 +00:00
bd17df8e98 build(deps-dev): bump @vitest/ui from 0.32.0 to 0.32.2
Bumps [@vitest/ui](https://github.com/vitest-dev/vitest/tree/HEAD/packages/ui) from 0.32.0 to 0.32.2.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.32.2/packages/ui)

---
updated-dependencies:
- dependency-name: "@vitest/ui"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 11:57:19 +00:00
e237326319 build(deps-dev): bump @vitest/coverage-v8 from 0.32.0 to 0.32.2
Bumps [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) from 0.32.0 to 0.32.2.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.32.2/packages/coverage-v8)

---
updated-dependencies:
- dependency-name: "@vitest/coverage-v8"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 11:56:47 +00:00
a368ed7fd3 Add docsify-terminal-block to documentation 2023-06-15 21:29:10 +01:00
a9fa31ebac Upgrade testing libraries 2023-06-15 21:15:39 +01:00
6b4a78ed41 Merge pull request #2177 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-unicorn-47.0.0
build(deps-dev): bump eslint-plugin-unicorn from 46.0.0 to 47.0.0
2023-06-15 12:49:17 +01:00
9b93a15323 Merge pull request #2176 from dolanmiu/dependabot/npm_and_yarn/types/unzipper-0.10.6
build(deps-dev): bump @types/unzipper from 0.10.5 to 0.10.6
2023-06-15 12:49:08 +01:00
17774c50be build(deps-dev): bump eslint-plugin-unicorn from 46.0.0 to 47.0.0
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 46.0.0 to 47.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v46.0.0...v47.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 11:57:06 +00:00
a63095a7b4 build(deps-dev): bump @types/unzipper from 0.10.5 to 0.10.6
Bumps [@types/unzipper](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/unzipper) from 0.10.5 to 0.10.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/unzipper)

---
updated-dependencies:
- dependency-name: "@types/unzipper"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 11:56:34 +00:00
9aba21e64c Add filtering and ordering to list of demos 2023-06-14 03:44:46 +01:00
6288bb0701 Bump sign off sheet 2023-06-14 02:48:56 +01:00
2061854778 Merge pull request #2119 from pulpgrinder/master
Added style support for noProof option.
2023-06-14 02:25:36 +01:00
e4eeb3f87f Fix spelling 2023-06-14 01:55:47 +01:00
a168dc1c15 Remove redundant code 2023-06-14 01:17:44 +01:00
99dee460ae Fix prettier 2023-06-13 20:55:20 +01:00
36e9ac1179 Adding tests for noProof option 2023-06-13 20:27:28 +01:00
df619ffe49 Added style support for noProof option.
Useful for blocks of source code, and
possibly other things that cause the grammar
and spelling checkers to go nuts.
Example usage:
 run: {
                            font:"Consolas",
                            color: "0000AA",
                            break:1,
                            noProof:true,
                        },

Also added section to .gitignore to exclude
Mac .DS_Store files. These are useless on
anything other than a Mac.
2023-06-13 20:26:45 +01:00
b1513d4ce9 Merge pull request #2160 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-jsdoc-46.2.6
build(deps-dev): bump eslint-plugin-jsdoc from 40.1.0 to 46.2.6
2023-06-13 20:25:29 +01:00
7d0a71acef build(deps-dev): bump eslint-plugin-jsdoc from 40.1.0 to 46.2.6
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 40.1.0 to 46.2.6.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v40.1.0...v46.2.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 19:13:01 +00:00
307a651e6d Merge pull request #2166 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.59.11
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.11
2023-06-13 20:12:17 +01:00
b7f6a7da6b Merge pull request #2165 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.59.11
build(deps-dev): bump @typescript-eslint/parser from 5.57.1 to 5.59.11
2023-06-13 20:12:01 +01:00
1d9ff920e8 Merge pull request #2152 from dolanmiu/dependabot/npm_and_yarn/typescript-5.1.3
build(deps-dev): bump typescript from 5.0.3 to 5.1.3
2023-06-13 20:11:33 +01:00
810846c49a Fix linting 2023-06-13 20:11:04 +01:00
cb66d68980 build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.57.1 to 5.59.11.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.11/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 18:36:19 +00:00
1badd6a53f build(deps-dev): bump @typescript-eslint/parser from 5.57.1 to 5.59.11
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.1 to 5.59.11.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.59.11/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 18:35:04 +00:00
7e37d8d27a build(deps-dev): bump typescript from 5.0.3 to 5.1.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.3 to 5.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.0.3...v5.1.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 18:33:45 +00:00
5c950e1a07 Merge pull request #2153 from dolanmiu/dependabot/npm_and_yarn/eslint-8.42.0
build(deps-dev): bump eslint from 8.37.0 to 8.42.0
2023-06-13 19:33:05 +01:00
adbb16f7eb Merge pull request #2154 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.24.8
build(deps-dev): bump typedoc from 0.23.28 to 0.24.8
2023-06-13 19:32:45 +01:00
dd088bf584 Merge pull request #2170 from dolanmiu/dependabot/npm_and_yarn/vite-plugin-node-polyfills-0.9.0
build(deps-dev): bump vite-plugin-node-polyfills from 0.8.2 to 0.9.0
2023-06-13 19:32:35 +01:00
a27cb7db47 Merge pull request #2171 from dolanmiu/dependabot/npm_and_yarn/unzipper-0.10.14
build(deps-dev): bump unzipper from 0.10.11 to 0.10.14
2023-06-13 19:32:26 +01:00
2e41387a50 Merge pull request #2172 from dolanmiu/dependabot/npm_and_yarn/types/node-20.3.1
build(deps): bump @types/node from 18.15.11 to 20.3.1
2023-06-13 19:32:16 +01:00
9bb4803ac5 Merge pull request #2173 from dolanmiu/dependabot/npm_and_yarn/vitest-0.32.0
build(deps-dev): bump vitest from 0.31.4 to 0.32.0
2023-06-13 19:32:01 +01:00
8bf2b6c9ce build(deps-dev): bump vitest from 0.31.4 to 0.32.0
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 0.31.4 to 0.32.0.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v0.32.0/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 11:57:22 +00:00
37f60c1766 build(deps): bump @types/node from 18.15.11 to 20.3.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.11 to 20.3.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 11:57:03 +00:00
7bce84eba0 build(deps-dev): bump unzipper from 0.10.11 to 0.10.14
Bumps [unzipper](https://github.com/ZJONSSON/node-unzipper) from 0.10.11 to 0.10.14.
- [Release notes](https://github.com/ZJONSSON/node-unzipper/releases)
- [Commits](https://github.com/ZJONSSON/node-unzipper/commits)

---
updated-dependencies:
- dependency-name: unzipper
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 11:56:48 +00:00
46bedaa241 build(deps-dev): bump vite-plugin-node-polyfills from 0.8.2 to 0.9.0
Bumps [vite-plugin-node-polyfills](https://github.com/davidmyersdev/vite-plugin-node-polyfills) from 0.8.2 to 0.9.0.
- [Release notes](https://github.com/davidmyersdev/vite-plugin-node-polyfills/releases)
- [Commits](https://github.com/davidmyersdev/vite-plugin-node-polyfills/compare/v0.8.2...v0.9.0)

---
updated-dependencies:
- dependency-name: vite-plugin-node-polyfills
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 11:56:36 +00:00
9a6d8c0e8b build(deps-dev): bump typedoc from 0.23.28 to 0.24.8
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.28 to 0.24.8.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.23.28...v0.24.8)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 23:44:44 +00:00
1571b7a1a7 Merge pull request #2039 from dolanmiu/dependabot/npm_and_yarn/nanoid-4.0.2
build(deps): bump nanoid from 3.3.4 to 4.0.2
2023-06-13 00:43:07 +01:00
16f5e5bbbc build(deps-dev): bump eslint from 8.37.0 to 8.42.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.37.0 to 8.42.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.37.0...v8.42.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 23:40:58 +00:00
e3a8def43e Merge pull request #2164 from dolanmiu/dependabot/npm_and_yarn/vite-4.3.9
build(deps-dev): bump vite from 4.3.3 to 4.3.9
2023-06-13 00:40:19 +01:00
40c11bae22 Merge pull request #2167 from dolanmiu/dependabot/npm_and_yarn/prettier-2.8.8
build(deps-dev): bump prettier from 2.8.7 to 2.8.8
2023-06-13 00:40:03 +01:00
3a3415a3da Merge pull request #2159 from dolanmiu/dependabot/npm_and_yarn/glob-10.2.7
build(deps-dev): bump glob from 9.3.2 to 10.2.7
2023-06-13 00:39:47 +01:00
222024fdde build(deps): bump nanoid from 3.3.4 to 4.0.2
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.4 to 4.0.2.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.4...4.0.2)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 23:31:29 +00:00
c5511bb3d9 build(deps-dev): bump prettier from 2.8.7 to 2.8.8
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.7 to 2.8.8.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.7...2.8.8)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 19:17:59 +00:00
5c4696a660 build(deps-dev): bump glob from 9.3.2 to 10.2.7
Bumps [glob](https://github.com/isaacs/node-glob) from 9.3.2 to 10.2.7.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v9.3.2...v10.2.7)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 19:08:53 +00:00
2812bef532 build(deps-dev): bump vite from 4.3.3 to 4.3.9
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.3 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 19:08:15 +00:00
91379070d3 Merge pull request #2148 from dolanmiu/feat/deprecate-shelljs
Upgrade project to use ESM and Vite
2023-06-12 20:07:03 +01:00
668f4f4e78 Remove unused imports 2023-06-12 19:45:03 +01:00
28ad740473 Fix linting 2023-06-12 19:21:22 +01:00
d08349f8eb Fix tests 2023-06-12 19:19:41 +01:00
b6e5b23f89 Fix linting 2023-06-12 19:09:37 +01:00
8dd8c079e7 Fix tests 2023-06-12 19:02:12 +01:00
eeee01a0e0 Use C8 for coverage 2023-06-12 18:43:29 +01:00
09ab91eeef Fix tests and build
Remove unused code and dependencies
2023-06-08 13:30:31 +01:00
a0a88412ff Fix tests 2023-06-07 15:11:47 +01:00
972fa77265 Fix tests 2023-06-07 03:19:54 +01:00
e69b063687 Porting tests over to vitest 2023-06-05 00:33:43 +01:00
a89919397d Merge branch 'master' into feat/deprecate-shelljs
# Conflicts:
#	src/file/numbering/numbering.ts
2023-06-01 02:08:08 +01:00
0cbb5fb0a3 Convert to vite and clean up build 2023-06-01 02:05:35 +01:00
352cde743f Fix TS issues 2023-05-31 22:56:58 +01:00
b59fa6bb16 Version bump 2023-05-04 19:35:01 +01:00
c0c62001fe Merge pull request #2103 from VarLog/fix/convenience-functions-counters
fix: do not use static numeric counters
2023-05-04 18:33:51 +01:00
e77a7dfdcd tests: fixup tests and linting issues 2023-05-04 12:30:31 +03:00
a26292a0fd Trying to upgrade docx to use Vite 2023-05-01 20:37:39 +01:00
18b2e91da2 Merge branch 'master' into feat/deprecate-shelljs 2023-05-01 16:36:43 +01:00
a0437381e7 fix: do not use static numeric counters 2023-04-28 13:17:02 +03:00
bb686bbcbe Version bump 2023-04-20 00:58:11 +01:00
c898d0a3c3 Merge pull request #2087 from lentyaevpk/fix/myoffice-numbering-render
fix: added unique numeric id creator to avoid numbering render errors
2023-04-19 18:09:42 +01:00
704c678333 fix: unit tests fix 2023-04-19 16:51:03 +03:00
c59c5350fd fix: added unique numeric id creator to avoid numbering render errors 2023-04-18 15:15:38 +03:00
accb1d44d0 Version bump 2023-04-05 02:03:30 +01:00
b61f798cd9 Merge pull request #2059 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.57.1
build(deps-dev): bump @typescript-eslint/parser from 5.56.0 to 5.57.1
2023-04-04 22:43:40 +01:00
be2ec9d4cf Merge pull request #2058 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.57.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.56.0 to 5.57.1
2023-04-04 22:43:34 +01:00
514fbb1c09 Merge pull request #2054 from dolanmiu/dependabot/npm_and_yarn/typescript-5.0.3
build(deps-dev): bump typescript from 5.0.2 to 5.0.3
2023-04-04 22:43:25 +01:00
8ce397f61e Merge pull request #2052 from dolanmiu/dependabot/npm_and_yarn/tsconfig-paths-4.2.0
build(deps-dev): bump tsconfig-paths from 4.1.2 to 4.2.0
2023-04-04 22:43:19 +01:00
3b0dfb8489 Merge pull request #2049 from dolanmiu/dependabot/npm_and_yarn/types/node-18.15.11
build(deps): bump @types/node from 18.15.7 to 18.15.11
2023-04-04 22:43:09 +01:00
f4933deaf2 Merge pull request #2048 from dolanmiu/dependabot/npm_and_yarn/eslint-8.37.0
build(deps-dev): bump eslint from 8.36.0 to 8.37.0
2023-04-04 22:42:59 +01:00
add2273551 Merge pull request #2045 from dolanmiu/dependabot/npm_and_yarn/types/webpack-5.28.1
build(deps-dev): bump @types/webpack from 5.28.0 to 5.28.1
2023-04-04 22:42:52 +01:00
91b00466a0 Merge pull request #2040 from dolanmiu/dependabot/npm_and_yarn/sinon-15.0.3
build(deps-dev): bump sinon from 15.0.2 to 15.0.3
2023-04-04 22:42:45 +01:00
d0612e115e Merge pull request #2038 from dolanmiu/dependabot/npm_and_yarn/cspell-6.31.1
build(deps-dev): bump cspell from 6.30.2 to 6.31.1
2023-04-04 22:42:37 +01:00
e4a6cbe887 Merge pull request #2053 from dolanmiu/feat/fix-templating
#2028 - Null check
2023-04-04 22:38:16 +01:00
0386810714 Write tests and simplify logic 2023-04-04 22:21:01 +01:00
d4585f60b3 build(deps-dev): bump @typescript-eslint/parser from 5.56.0 to 5.57.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.56.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 11:57:39 +00:00
18f015a959 build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.56.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 11:56:55 +00:00
10c866bdea Add tests 2023-03-31 17:16:05 +01:00
680c938dcf build(deps-dev): bump typescript from 5.0.2 to 5.0.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-31 11:57:07 +00:00
c3a617fefd #2028 - Null check 2023-03-31 00:13:36 +01:00
6362b498a6 Add docsify sign off sheet 2023-03-30 20:14:08 +01:00
5e14bc6c2a Install execa 2023-03-30 20:13:35 +01:00
2e30ab29be Update cspell json 2023-03-30 19:59:23 +01:00
44568023cd Add documentation to basedOn 2023-03-30 19:54:33 +01:00
c57aaa856d Update comments demo 2023-03-30 19:43:09 +01:00
0f4f24c3f3 build(deps-dev): bump tsconfig-paths from 4.1.2 to 4.2.0
Bumps [tsconfig-paths](https://github.com/dividab/tsconfig-paths) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/dividab/tsconfig-paths/releases)
- [Changelog](https://github.com/dividab/tsconfig-paths/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dividab/tsconfig-paths/compare/v4.1.2...v4.2.0)

---
updated-dependencies:
- dependency-name: tsconfig-paths
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-30 11:56:49 +00:00
2fe7a2e3d3 build(deps): bump @types/node from 18.15.7 to 18.15.11
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.7 to 18.15.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 11:57:27 +00:00
20b62f5768 build(deps-dev): bump eslint from 8.36.0 to 8.37.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.36.0 to 8.37.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.36.0...v8.37.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 11:56:56 +00:00
ab063eee08 Add helper function patchDocument example 2023-03-28 20:16:34 +01:00
66c7624b40 build(deps-dev): bump @types/webpack from 5.28.0 to 5.28.1
Bumps [@types/webpack](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webpack) from 5.28.0 to 5.28.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webpack)

---
updated-dependencies:
- dependency-name: "@types/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 11:58:06 +00:00
bfc302023f build(deps-dev): bump sinon from 15.0.2 to 15.0.3
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.2 to 15.0.3.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.2...v15.0.3)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 11:57:32 +00:00
3505912f74 build(deps-dev): bump cspell from 6.30.2 to 6.31.1
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.30.2 to 6.31.1.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v6.30.2...v6.31.1)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 11:57:03 +00:00
ec379f2e4d Update documentation 2023-03-26 04:05:41 +01:00
2d17954104 Merge pull request #2034 from dolanmiu/dependabot/npm_and_yarn/types/node-18.15.7
build(deps): bump @types/node from 18.15.5 to 18.15.7
2023-03-24 15:11:58 +00:00
01c834b16b Merge pull request #2035 from dolanmiu/dependabot/npm_and_yarn/prettier-2.8.7
build(deps-dev): bump prettier from 2.8.6 to 2.8.7
2023-03-24 15:11:52 +00:00
2aeb2c2e88 Merge pull request #2036 from dolanmiu/dependabot/npm_and_yarn/webpack-5.76.3
build(deps-dev): bump webpack from 5.76.2 to 5.76.3
2023-03-24 15:11:45 +00:00
be88086434 build(deps-dev): bump webpack from 5.76.2 to 5.76.3
Bumps [webpack](https://github.com/webpack/webpack) from 5.76.2 to 5.76.3.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.76.2...v5.76.3)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 11:57:59 +00:00
28f0cc681d build(deps-dev): bump prettier from 2.8.6 to 2.8.7
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.6 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.6...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 11:57:30 +00:00
def29c535b build(deps): bump @types/node from 18.15.5 to 18.15.7
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.5 to 18.15.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 11:57:04 +00:00
168e5e6e11 Version bump 2023-03-23 23:20:14 +00:00
ce71f19826 Merge pull request #2030 from dolanmiu/dependabot/npm_and_yarn/rimraf-4.4.1
build(deps-dev): bump rimraf from 4.4.0 to 4.4.1
2023-03-23 23:17:58 +00:00
4fd3f3a6b8 Merge pull request #2019 from dolanmiu/dependabot/npm_and_yarn/cspell-6.30.2
build(deps-dev): bump cspell from 6.30.0 to 6.30.2
2023-03-23 23:17:46 +00:00
39763d3869 Merge pull request #2023 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.56.0
build(deps-dev): bump @typescript-eslint/parser from 5.55.0 to 5.56.0
2023-03-23 23:17:35 +00:00
36f90edc67 Merge pull request #2021 from dolanmiu/dependabot/npm_and_yarn/types/node-18.15.5
build(deps): bump @types/node from 18.15.3 to 18.15.5
2023-03-23 23:17:27 +00:00
b0cbd6f609 Merge pull request #2017 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.28
build(deps-dev): bump typedoc from 0.23.27 to 0.23.28
2023-03-23 23:17:18 +00:00
d23d4a4557 Merge pull request #2020 from dolanmiu/dependabot/npm_and_yarn/prettier-2.8.6
build(deps-dev): bump prettier from 2.8.4 to 2.8.6
2023-03-23 23:16:58 +00:00
07c58ee43c Merge pull request #2022 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.56.0
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.55.0 to 5.56.0
2023-03-23 23:16:46 +00:00
1037e8f1b9 Merge pull request #2025 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-functional-5.0.7
build(deps-dev): bump eslint-plugin-functional from 5.0.6 to 5.0.7
2023-03-23 23:16:39 +00:00
f0ae8396f7 Merge pull request #2031 from dolanmiu/dependabot/npm_and_yarn/glob-9.3.2
build(deps-dev): bump glob from 9.3.0 to 9.3.2
2023-03-23 23:16:31 +00:00
1ae5995f9c Merge pull request #2033 from dolanmiu/feat/remove-redundant-keys
Remove unused type keys
2023-03-23 23:14:59 +00:00
751ad9d304 Remove unused type keys 2023-03-23 22:59:34 +00:00
0bd1514826 Merge pull request #2032 from dolanmiu/feat/fix-patcher-issue
#2028 Fix patcher offset indexes
2023-03-23 22:52:34 +00:00
16bfc78d8d #2028 Fix patcher offset indexes 2023-03-23 21:01:24 +00:00
528008406a Merge pull request #2016 from ewoutkleinsmann/master
Images in templates
2023-03-23 19:08:54 +00:00
9e3010ac6a Reduce coverage temporarily 2023-03-23 19:02:22 +00:00
7c1fa6f4bf build(deps-dev): bump glob from 9.3.0 to 9.3.2
Bumps [glob](https://github.com/isaacs/node-glob) from 9.3.0 to 9.3.2.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v9.3.0...v9.3.2)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 11:57:04 +00:00
f58d31cc3d build(deps-dev): bump rimraf from 4.4.0 to 4.4.1
Bumps [rimraf](https://github.com/isaacs/rimraf) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/isaacs/rimraf/releases)
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v4.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-23 11:56:45 +00:00
286c742ece build(deps-dev): bump eslint-plugin-functional from 5.0.6 to 5.0.7
Bumps [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional) from 5.0.6 to 5.0.7.
- [Release notes](https://github.com/eslint-functional/eslint-plugin-functional/releases)
- [Changelog](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint-functional/eslint-plugin-functional/compare/v5.0.6...v5.0.7)

---
updated-dependencies:
- dependency-name: eslint-plugin-functional
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 11:58:57 +00:00
3edc51d5a0 build(deps-dev): bump @typescript-eslint/parser from 5.55.0 to 5.56.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.55.0 to 5.56.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.56.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 11:58:10 +00:00
05d4c9688e build(deps-dev): bump @typescript-eslint/eslint-plugin
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.55.0 to 5.56.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.56.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 11:57:39 +00:00
d4401d1597 build(deps): bump @types/node from 18.15.3 to 18.15.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.3 to 18.15.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 11:57:03 +00:00
90358e73f6 build(deps-dev): bump prettier from 2.8.4 to 2.8.6
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.4...2.8.6)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 11:56:43 +00:00
a77ca02ea9 Set homepage to docx.js.org 2023-03-21 04:31:21 +00:00
7785f0df02 Add some tests to boost coverage 2023-03-21 04:30:20 +00:00
0e6ed6e5ea build(deps-dev): bump cspell from 6.30.0 to 6.30.2
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.30.0 to 6.30.2.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v6.30.0...v6.30.2)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 11:57:45 +00:00
70e84c8d38 build(deps-dev): bump typedoc from 0.23.27 to 0.23.28
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.27 to 0.23.28.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.23.27...v0.23.28)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 11:56:49 +00:00
11c3886659 Merge branch 'dolanmiu:master' into master 2023-03-20 12:08:28 +01:00
6104e5bc35 Update shelljs definitions 2023-03-19 19:46:06 +00:00
c748b9a7fc Remove src and template from files 2023-03-19 19:42:40 +00:00
714dbc0179 Add horizontal rule to border example 2023-03-19 15:47:45 +00:00
7f16cfc359 Remove unessesary glob types and fix typedocs 2023-03-19 04:22:52 +00:00
71953cf45a Fixes patchDocument for files with binary content 2023-03-17 16:30:35 +01:00
319 changed files with 24290 additions and 21838 deletions

View File

@ -7,31 +7,35 @@
"dictionaries": ["en_US", "typescript", "softwareTerms", "fonts", "npm"],
// words - list of words to be always considered correct
"words": [
"Xmlable",
"Abjad",
"aiueo",
"ATLEAST",
"chosung",
"clippy",
"datas",
"docsify",
"dolan",
"execa",
"falsey",
"iife",
"Initializable",
"iroha",
"jsonify",
"jszip",
"NUMPAGES",
"odttf",
"ondata",
"onfile",
"ooxml",
"panose",
"rels",
"rsid",
"twip",
"twips",
"jsonify",
"falsey",
"aiueo",
"iroha",
"aiueo",
"iroha",
"chosung",
"Abjad",
"Initializable",
"rels",
"dolan",
"xmlify",
"Xmlifyed",
"Xmlable",
"xmlified",
"datas",
"jszip",
"rsid",
"NUMPAGES",
"ATLEAST",
"ooxml",
"clippy",
"docsify"
"xmlify",
"Xmlifyed"
],
"ignoreRegExpList": [
"/\"w:.+\"/",
@ -51,7 +55,7 @@
"/<element name=\"[a-z]+\"/gi",
"/<attribute name=\"[a-z]+\"/gi"
],
"ignorePaths": ["package.json", "docs/api"],
"ignorePaths": ["package.json", "docs/api", "*.docx", "build"],
"allowCompoundWords": true,
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.

View File

@ -1,272 +0,0 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
*/
module.exports = {
extends: "eslint:recommended",
env: {
browser: true,
es6: true,
node: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
sourceType: "module",
},
plugins: [
"eslint-plugin-import",
"eslint-plugin-no-null",
"eslint-plugin-unicorn",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow",
"@typescript-eslint",
"functional",
],
root: true,
rules: {
"no-undef": "off",
"no-extra-boolean-cast": "off",
"no-alert": "error",
"no-self-compare": "error",
"no-unreachable-loop": "error",
"no-template-curly-in-string": "error",
"no-unused-private-class-members": "error",
"no-extend-native": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-new-object": "error",
"no-proto": "error",
"no-useless-catch": "error",
"one-var-declaration-per-line": "error",
"prefer-arrow-callback": "error",
"prefer-destructuring": "error",
"prefer-exponentiation-operator": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-await": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": [
"error",
{
default: "array",
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
Object: {
message: "Avoid using the `Object` type. Did you mean `object`?",
},
Function: {
message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
},
Boolean: {
message: "Avoid using the `Boolean` type. Did you mean `boolean`?",
},
Number: {
message: "Avoid using the `Number` type. Did you mean `number`?",
},
String: {
message: "Avoid using the `String` type. Did you mean `string`?",
},
Symbol: {
message: "Avoid using the `Symbol` type. Did you mean `symbol`?",
},
},
},
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: false,
allowDirectConstAssertionInArrowFunctions: true,
allowConciseArrowFunctionExpressionsStartingWithVoid: true,
},
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
accessibility: "explicit",
overrides: {
accessors: "explicit",
},
},
],
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
allowArgumentsExplicitlyTypedAsAny: true,
allowDirectConstAssertionInArrowFunctions: true,
allowHigherOrderFunctions: false,
allowTypedFunctionExpressions: false,
},
],
"@typescript-eslint/naming-convention": [
"error",
{
selector: ["objectLiteralProperty"],
leadingUnderscore: "allow",
format: ["camelCase", "PascalCase"],
filter: {
regex: "(^[a-z]+:.+)|_attr|[0-9]",
match: false,
},
},
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-shadow": [
"error",
{
hoist: "all",
},
],
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/triple-slash-reference": [
"error",
{
path: "always",
types: "prefer-import",
lib: "always",
},
],
"@typescript-eslint/typedef": [
"error",
{
parameter: true,
propertyDeclaration: true,
},
],
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
complexity: "off",
"consistent-return": "error",
"constructor-super": "error",
curly: "error",
"dot-notation": "off",
eqeqeq: ["error", "smart"],
"guard-for-in": "error",
"id-denylist": ["error", "any", "Number", "number", "String", "string", "Boolean", "boolean", "Undefined", "undefined"],
"id-match": "error",
"import/no-default-export": "error",
"import/no-extraneous-dependencies": "off",
"import/no-internal-modules": "off",
"import/order": "error",
indent: "off",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "off",
"jsdoc/newline-after-description": "error",
"max-classes-per-file": "off",
"max-len": "off",
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "error",
"no-debugger": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-empty": "error",
"no-empty-function": "off",
"no-eval": "error",
"no-extra-bind": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-multiple-empty-lines": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-null/no-null": "error",
"no-param-reassign": "error",
"no-redeclare": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-shadow": "off",
"no-sparse-arrays": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": ["error", { allow: ["_attr"] }],
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-use-before-define": "off",
"no-useless-constructor": "error",
"no-var": "error",
"object-shorthand": "off",
"one-var": ["error", "never"],
"prefer-arrow/prefer-arrow-functions": "error",
"prefer-const": "error",
"prefer-object-spread": "error",
radix: "error",
"space-in-parens": ["error", "never"],
"spaced-comment": [
"error",
"always",
{
markers: ["/"],
},
],
"unicorn/filename-case": "error",
"unicorn/prefer-ternary": "error",
"use-isnan": "error",
"valid-typeof": "off",
"functional/immutable-data": [
"error",
{
assumeTypes: true,
ignoreImmediateMutation: true,
ignoreAccessorPattern: ["**.root*", "**.numberingReferences*", "**.sections*", "**.properties*"],
},
],
"functional/prefer-property-signatures": "error",
"functional/no-mixed-types": "error",
// TODO: Deprecated. Use prefer-immutable-types and type-declaration-immutability instead
"functional/prefer-readonly-type": "error",
// "functional/prefer-immutable-types": "error",
// "functional/type-declaration-immutability": "error",
"no-unused-vars": ["error", { argsIgnorePattern: "^[_]+$" }],
},
overrides: [
{
files: ["*.spec.ts"],
rules: {
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/dot-notation": "off",
"prefer-destructuring": "off",
"@typescript-eslint/explicit-function-return-type": "off",
},
},
],
};

239
.eslintrc.yml Normal file
View File

@ -0,0 +1,239 @@
extends: eslint:recommended
env:
browser: true
es6: true
node: true
parser: "@typescript-eslint/parser"
parserOptions:
project:
- tsconfig.json
- demo/tsconfig.json
sourceType: module
plugins:
- eslint-plugin-import
- eslint-plugin-no-null
- eslint-plugin-unicorn
- eslint-plugin-jsdoc
- eslint-plugin-prefer-arrow
- "@typescript-eslint"
- eslint-plugin-functional
root: true
rules:
no-undef: "off"
no-extra-boolean-cast: "off"
no-alert: error
no-self-compare: error
no-unreachable-loop: error
no-template-curly-in-string: error
no-unused-private-class-members: error
no-extend-native: error
no-floating-decimal: error
no-implied-eval: error
no-iterator: error
no-lone-blocks: error
no-loop-func: error
no-new-object: error
no-proto: error
no-useless-catch: error
one-var-declaration-per-line: error
prefer-arrow-callback: error
prefer-destructuring: error
prefer-exponentiation-operator: error
prefer-promise-reject-errors: error
prefer-regex-literals: error
prefer-spread: error
prefer-template: error
require-await: error
"@typescript-eslint/adjacent-overload-signatures": error
"@typescript-eslint/array-type":
- error
- default: array
"@typescript-eslint/ban-types":
- error
- types:
Object:
message: Avoid using the `Object` type. Did you mean `object`?
Function:
message: >-
Avoid using the `Function` type. Prefer a specific function type,
like `() => void`.
Boolean:
message: Avoid using the `Boolean` type. Did you mean `boolean`?
Number:
message: Avoid using the `Number` type. Did you mean `number`?
String:
message: Avoid using the `String` type. Did you mean `string`?
Symbol:
message: Avoid using the `Symbol` type. Did you mean `symbol`?
"@typescript-eslint/consistent-type-assertions": error
"@typescript-eslint/dot-notation": error
"@typescript-eslint/explicit-function-return-type":
- error
- allowExpressions: true
allowTypedFunctionExpressions: true
allowHigherOrderFunctions: false
allowDirectConstAssertionInArrowFunctions: true
allowConciseArrowFunctionExpressionsStartingWithVoid: true
"@typescript-eslint/explicit-member-accessibility":
- error
- accessibility: explicit
overrides:
accessors: explicit
"@typescript-eslint/explicit-module-boundary-types":
- error
- allowArgumentsExplicitlyTypedAsAny: true
allowDirectConstAssertionInArrowFunctions: true
allowHigherOrderFunctions: false
allowTypedFunctionExpressions: false
"@typescript-eslint/naming-convention":
- error
- selector:
- objectLiteralProperty
leadingUnderscore: allow
format:
- camelCase
- PascalCase
filter:
regex: (^[a-z]+:.+)|_attr|[0-9]
match: false
"@typescript-eslint/no-empty-function": error
"@typescript-eslint/no-empty-interface": error
"@typescript-eslint/no-explicit-any": error
"@typescript-eslint/no-misused-new": error
"@typescript-eslint/no-namespace": error
"@typescript-eslint/no-parameter-properties": "off"
"@typescript-eslint/no-require-imports": error
"@typescript-eslint/no-shadow":
- error
- hoist: all
"@typescript-eslint/no-this-alias": error
"@typescript-eslint/no-unused-expressions": error
"@typescript-eslint/no-use-before-define": "off"
"@typescript-eslint/no-var-requires": error
"@typescript-eslint/prefer-for-of": error
"@typescript-eslint/prefer-function-type": error
"@typescript-eslint/prefer-namespace-keyword": error
"@typescript-eslint/prefer-readonly": error
"@typescript-eslint/triple-slash-reference":
- error
- path: always
types: prefer-import
lib: always
"@typescript-eslint/typedef":
- error
- parameter: true
propertyDeclaration: true
"@typescript-eslint/unified-signatures": error
arrow-body-style: error
complexity: "off"
consistent-return: error
constructor-super: error
curly: error
dot-notation: "off"
eqeqeq:
- error
- smart
guard-for-in: error
id-denylist:
- error
- any
- Number
- number
- String
- string
- Boolean
- boolean
- Undefined
- undefined
id-match: error
import/no-default-export: error
import/no-extraneous-dependencies: "off"
import/no-internal-modules: "off"
import/order: error
indent: "off"
jsdoc/check-alignment: error
jsdoc/check-indentation: "off"
max-classes-per-file: "off"
max-len: "off"
new-parens: error
no-bitwise: error
no-caller: error
no-cond-assign: error
no-console: error
no-debugger: error
no-duplicate-case: error
no-duplicate-imports: error
no-empty: error
no-empty-function: "off"
no-eval: error
no-extra-bind: error
no-fallthrough: "off"
no-invalid-this: "off"
no-multiple-empty-lines: error
no-new-func: error
no-new-wrappers: error
no-null/no-null: error
no-param-reassign: error
no-redeclare: error
no-return-await: error
no-sequences: error
no-shadow: "off"
no-sparse-arrays: error
no-throw-literal: error
no-trailing-spaces: error
no-undef-init: error
no-underscore-dangle:
- error
- allow:
- _attr
no-unsafe-finally: error
no-unused-expressions: "off"
no-unused-labels: error
no-use-before-define: "off"
no-useless-constructor: error
no-var: error
object-shorthand: "off"
one-var:
- error
- never
prefer-arrow/prefer-arrow-functions: error
prefer-const: error
prefer-object-spread: error
radix: error
space-in-parens:
- error
- never
spaced-comment:
- error
- always
- markers:
- /
unicorn/filename-case: error
unicorn/prefer-ternary: error
use-isnan: error
valid-typeof: "off"
functional/immutable-data:
- error
- assumeTypes: true
ignoreImmediateMutation: true
ignoreAccessorPattern:
- "**.root*"
- "**.numberingReferences*"
- "**.sections*"
- "**.properties*"
functional/prefer-property-signatures: error
functional/no-mixed-types: error
functional/prefer-readonly-type: error
no-unused-vars:
- error
- argsIgnorePattern: ^[_]+$
ignorePatterns:
- vite.config.ts
overrides:
- files:
- "*.spec.ts"
rules:
"@typescript-eslint/no-unused-expressions": "off"
"@typescript-eslint/dot-notation": "off"
prefer-destructuring: "off"
"@typescript-eslint/explicit-function-return-type": "off"

View File

@ -5,36 +5,3 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: "@types/node"
versions:
- 14.14.22
- 14.14.24
- 14.14.25
- 14.14.26
- 14.14.28
- 14.14.29
- 14.14.30
- 15.0.0
- dependency-name: webpack
versions:
- 5.31.2
- 5.35.0
- dependency-name: ts-loader
versions:
- 9.1.0
- dependency-name: awesome-typescript-loader
versions:
- 5.2.1
- dependency-name: chai
versions:
- 4.2.0
- 4.3.0
- 4.3.1
- 4.3.3
- dependency-name: replace-in-file
versions:
- 6.1.0
- dependency-name: "@types/chai"
versions:
- 4.2.14

View File

@ -32,7 +32,7 @@ jobs:
- name: Install Dependencies
run: npm ci --force
- name: Test
run: npm run test.coverage
run: npm run test.ci
- name: Codecov
uses: codecov/codecov-action@v3
with:

4
.gitignore vendored
View File

@ -60,5 +60,5 @@ My Document.docx
# Temporary folder
tmp
# nyc
.nyc_output
# Exclude Mac .DS_Store files
.DS_Store

View File

@ -1,13 +0,0 @@
{
"diff": true,
"spec": "src/**/*.ts",
"extension": ["ts"],
"package": "./package.json",
"reporter": "spec",
"slow": "75",
"timeout": "2000",
"ui": "bdd",
"watch-files": ["src/**/*.ts"],
"watch-ignore": ["build", "demo"],
"require": ["mocha.env", "ts-node/register", "tsconfig-paths/register"]
}

25
.nycrc
View File

@ -1,25 +0,0 @@
{
"check-coverage": true,
"statements": 99.87,
"branches": 98.29,
"functions": 100,
"lines": 99.86,
"include": [
"src/**/*.ts"
],
"exclude": [
"src/**/*.spec.ts",
"src/import-dotx/import-dotx.ts"
],
"reporter": [
"lcov",
"text",
"json"
],
"extension": [
".ts"
],
"cache": true,
"all": true,
"sourceMap": true
}

View File

@ -12,7 +12,6 @@
[![Downloads per month][downloads-image]][downloads-url]
[![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]
[![Known Vulnerabilities][snky-image]][snky-url]
[![Chat on Gitter][gitter-image]][gitter-url]
[![PRs Welcome][pr-image]][pr-url]
[![codecov][codecov-image]][codecov-url]
@ -107,8 +106,6 @@ Made with 💖
[github-actions-workflow-url]: https://github.com/dolanmiu/docx/actions
[snky-image]: https://snyk.io/test/github/dolanmiu/docx/badge.svg
[snky-url]: https://snyk.io/test/github/dolanmiu/docx
[gitter-image]: https://badges.gitter.im/dolanmiu/docx.svg
[gitter-url]: https://gitter.im/docx-lib/Lobby
[pr-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
[pr-url]: http://makeapullrequest.com
[codecov-image]: https://codecov.io/gh/dolanmiu/docx/branch/master/graph/badge.svg

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Tab, TextRun } from "../build";
import { Document, Packer, Paragraph, Tab, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Generate a CV
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, HeadingLevel, Packer, Paragraph, Tab, TabStopPosition, TabStopType, TextRun } from "../build";
import { AlignmentType, Document, HeadingLevel, Packer, Paragraph, Tab, TabStopPosition, TabStopType, TextRun } from "docx";
// tslint:disable:no-shadowed-variable

View File

@ -1,5 +1,5 @@
// Setting styles with JavaScript configuration
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
AlignmentType,
@ -16,7 +16,7 @@ import {
TabStopPosition,
UnderlineType,
LevelFormat,
} from "../build";
} from "docx";
const table = new Table({
rows: [

View File

@ -1,7 +1,7 @@
// Scaling images
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ImageRun, Packer, Paragraph } from "../build";
import { Document, ImageRun, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// This example shows 3 styles using XML styles
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph } from "../build";
import { Document, HeadingLevel, Packer, Paragraph } from "docx";
const styles = fs.readFileSync("./demo/assets/custom-styles.xml", "utf-8");
const doc = new Document({

View File

@ -1,7 +1,7 @@
// Page numbers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Page break before example
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph } from "../build";
import { Document, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Multiple sections and headers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, PageNumber, NumberFormat, PageOrientation, Paragraph, TextRun } from "../build";
import { Document, Footer, Header, Packer, PageNumber, NumberFormat, PageOrientation, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Footnotes
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, FootnoteReferenceRun, Packer, Paragraph, TextRun } from "../build";
import { Document, FootnoteReferenceRun, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
footnotes: {

View File

@ -1,7 +1,7 @@
// Insert image from a buffer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ImageRun, Packer, Paragraph } from "../build";
import { Document, ImageRun, Packer, Paragraph } from "docx";
const imageBase64Data = `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`;

View File

@ -1,7 +1,7 @@
// Export to base64 string - Useful in a browser environment.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Tab, TextRun } from "../build";
import { Document, Packer, Paragraph, Tab, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,17 +1,7 @@
// Example on how to customize the look at feel using Styles
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
AlignmentType,
convertInchesToTwip,
Document,
HeadingLevel,
LevelFormat,
Packer,
Paragraph,
TextRun,
UnderlineType,
} from "../build";
import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph, TextRun, UnderlineType } from "docx";
const doc = new Document({
creator: "Clippy",
@ -53,6 +43,15 @@ const doc = new Document({
color: "#FF0000",
},
},
document: {
run: {
size: "11pt",
font: "Calibri",
},
paragraph: {
alignment: AlignmentType.RIGHT,
},
},
},
paragraphStyles: [
{

View File

@ -1,7 +1,7 @@
// Add custom borders to table cell
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { BorderStyle, Document, Packer, Paragraph, Table, TableCell, TableRow } from "../build";
import { BorderStyle, Document, Packer, Paragraph, Table, TableCell, TableRow } from "docx";
const doc = new Document({
sections: [

View File

@ -1,18 +1,7 @@
// This demo shows how to create bookmarks then link to them with internal hyperlinks
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Bookmark,
Document,
Footer,
HeadingLevel,
InternalHyperlink,
Packer,
PageBreak,
Paragraph,
TextRun,
PageReference,
} from "../build";
import { Bookmark, Document, Footer, HeadingLevel, InternalHyperlink, Packer, PageBreak, Paragraph, TextRun, PageReference } from "docx";
const LOREM_IPSUM =
/* cspell:disable-next-line */

View File

@ -1,7 +1,7 @@
// This demo shows right to left for special languages
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, TextRun } from "../build";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// This demo adds an image to the Media cache, and then insert to the document afterwards
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ImageRun, Packer, Paragraph, TextRun } from "../build";
import { Document, ImageRun, Packer, Paragraph, TextRun } from "docx";
const imageBase64Data = `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`;

View File

@ -1,7 +1,7 @@
// Add image to table cell
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ImageRun, Packer, Paragraph, Table, TableCell, TableRow } from "../build";
import { Document, ImageRun, Packer, Paragraph, Table, TableCell, TableRow } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example of how you would create a table and add data to it
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "../build";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "docx";
const styles = fs.readFileSync("./demo/assets/custom-styles.xml", "utf-8");

View File

@ -1,7 +1,7 @@
// Creates two paragraphs, one with a border and one without
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { BorderStyle, Document, Packer, Paragraph, TextRun } from "../build";
import { BorderStyle, Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [
@ -25,6 +25,17 @@ const doc = new Document({
},
},
}),
new Paragraph({
text: "",
border: {
top: {
color: "auto",
space: 1,
style: BorderStyle.SINGLE,
size: 6,
},
},
}),
new Paragraph({
children: [
new TextRun({

View File

@ -1,7 +1,7 @@
// Custom styles using JavaScript configuration
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, convertInchesToTwip, HeadingLevel, Packer, Paragraph, UnderlineType } from "../build";
import { Document, convertInchesToTwip, HeadingLevel, Packer, Paragraph, UnderlineType } from "docx";
const doc = new Document({
styles: {

View File

@ -1,7 +1,7 @@
// Table of contents
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { File, HeadingLevel, Packer, Paragraph, StyleLevel, TableOfContents } from "../build";
import { File, HeadingLevel, Packer, Paragraph, StyleLevel, TableOfContents } from "docx";
// WordprocessingML docs for TableOfContents can be found here:
// http://officeopenxml.com/WPtableOfContents.php

View File

@ -1,8 +1,8 @@
// Numbered lists
// The lists can also be restarted by specifying the instance number
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph } from "../build";
import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph } from "docx";
const doc = new Document({
numbering: {

View File

@ -1,7 +1,7 @@
// Numbering and bullet points example
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, convertInchesToTwip, Document, Footer, Header, HeadingLevel, LevelFormat, Packer, Paragraph } from "../build";
import { AlignmentType, convertInchesToTwip, Document, Footer, Header, HeadingLevel, LevelFormat, Packer, Paragraph } from "docx";
const doc = new Document({
numbering: {

View File

@ -1,7 +1,7 @@
// Example of how you would create a table and add data to it
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign, TextDirection } from "../build";
import { Document, HeadingLevel, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign, TextDirection } from "docx";
const doc = new Document({
sections: [

View File

@ -1,6 +1,6 @@
// Example of how you would merge cells together (Rows and Columns) and apply shading
// Also includes an example on how to center tables
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
AlignmentType,
@ -15,7 +15,7 @@ import {
TableCell,
TableRow,
WidthType,
} from "../build";
} from "docx";
const table = new Table({
rows: [

View File

@ -1,7 +1,7 @@
// Sequential Captions
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, SequentialIdentifier, TextRun } from "../build";
import { Document, Packer, Paragraph, SequentialIdentifier, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
// Example of how you would create a table with float positions
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Document,
@ -14,7 +14,7 @@ import {
TableLayoutType,
TableRow,
WidthType,
} from "../build";
} from "docx";
const table = new Table({
rows: [

View File

@ -1,9 +1,21 @@
// Example on how to add hyperlinks to websites
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ExternalHyperlink, Footer, FootnoteReferenceRun, ImageRun, Packer, Paragraph, TextRun } from "../build";
import { Document, ExternalHyperlink, Footer, FootnoteReferenceRun, ImageRun, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
styles: {
default: {
hyperlink: {
run: {
color: "FF0000",
underline: {
color: "0000FF",
},
},
},
},
},
footnotes: {
1: {
children: [

View File

@ -1,7 +1,7 @@
// Add image to table cell in a header and body
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Header, ImageRun, Packer, Paragraph, Table, TableCell, TableRow } from "../build";
import { Document, Header, ImageRun, Packer, Paragraph, Table, TableCell, TableRow } from "docx";
const table = new Table({
rows: [

View File

@ -1,7 +1,7 @@
// Add images to header and footer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Header, ImageRun, Packer, Paragraph } from "../build";
import { Document, Header, ImageRun, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,8 +1,8 @@
// Example of how to "wrap" text around an image
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
// import { Document, Packer, Paragraph } from "../build";
import { Document, ImageRun, Packer, Paragraph, TextWrappingSide, TextWrappingType } from "../build";
// import { Document, Packer, Paragraph } from "docx";
import { Document, ImageRun, Packer, Paragraph, TextWrappingSide, TextWrappingType } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example how to display page numbers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, NumberFormat, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, NumberFormat, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example of how you would create a table and add data to it
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "../build";
import { Document, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "docx";
const table = new Table({
columnWidths: [3505, 5505],

View File

@ -1,7 +1,7 @@
// Example demonstrating line numbers.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, LineNumberRestartFormat, Packer, Paragraph } from "../build";
import { Document, HeadingLevel, LineNumberRestartFormat, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Multiple cells merging in the same table - Rows and Columns
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Table, TableCell, TableRow } from "../build";
import { Document, Packer, Paragraph, Table, TableCell, TableRow } from "docx";
const table = new Table({
rows: [

View File

@ -1,7 +1,7 @@
// Page numbers - Start from 0 on a new section
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Header, Packer, PageBreak, PageNumber, PageNumberSeparator, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Header, Packer, PageBreak, PageNumber, PageNumberSeparator, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Add image to table cell
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, ImageRun, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "../build";
import { Document, ImageRun, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "docx";
const imageBase64Data = `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`;

View File

@ -1,7 +1,7 @@
// Sections with multiple columns
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph } from "../build";
import { Document, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Highlighting text
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Header, Packer, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Header, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Shading text
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Header, Packer, Paragraph, ShadingType, TextRun } from "../build";
import { AlignmentType, Document, Header, Packer, Paragraph, ShadingType, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Multiple sections with total number of pages in each section
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, NumberFormat, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, NumberFormat, Paragraph, TextRun } from "docx";
const header = new Header({
children: [

View File

@ -1,7 +1,7 @@
// Example of making content of section vertically aligned
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, VerticalAlign, TextRun, Tab } from "../build";
import { Document, Packer, Paragraph, VerticalAlign, TextRun, Tab } from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
// Add custom borders and no-borders to the table itself
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
BorderStyle,
@ -13,7 +13,7 @@ import {
TableRow,
TextDirection,
VerticalAlign,
} from "../build";
} from "docx";
const table = new Table({
rows: [

View File

@ -1,5 +1,5 @@
// Example of how to add images to the document - You can use Buffers, UInt8Arrays or Base64 strings
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Document,
@ -10,7 +10,7 @@ import {
Paragraph,
VerticalPositionAlign,
VerticalPositionRelativeFrom,
} from "../build";
} from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// The demo on the README.md
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, ImageRun, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign } from "../build";
import { Document, HeadingLevel, ImageRun, Packer, Paragraph, Table, TableCell, TableRow, VerticalAlign } from "docx";
const table = new Table({
rows: [

View File

@ -1,7 +1,7 @@
// Custom character styles using JavaScript configuration
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun } from "../build";
import { Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
styles: {

View File

@ -1,7 +1,7 @@
// Japanese text - Need to use a Japanese font
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph } from "../build";
import { Document, HeadingLevel, Packer, Paragraph } from "docx";
const doc = new Document({
styles: {

View File

@ -5,9 +5,8 @@
// Note that if the OS have not install `KaiTi` font, this demo doesn't work.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph, TextRun } from "../build";
import { Document, HeadingLevel, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
styles: {

View File

@ -3,9 +3,8 @@
// to the document in Word after the document has been generated. Standard properties (such as creator, title
// and subject) cover typical use cases, but sometimes custom properties are required.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer } from "../build";
import { Document, Packer } from "docx";
const doc = new Document(
// Standard properties

View File

@ -1,5 +1,5 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Document,
@ -21,7 +21,7 @@ import {
Packer,
Paragraph,
TextRun,
} from "../build";
} from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Change background colour of whole document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Tab, TextRun } from "../build";
import { Document, Packer, Paragraph, Tab, TextRun } from "docx";
const doc = new Document({
background: {

View File

@ -1,7 +1,7 @@
// Numbered lists - Add parent number in sub number
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph } from "../build";
import { AlignmentType, convertInchesToTwip, Document, HeadingLevel, LevelFormat, Packer, Paragraph } from "docx";
const doc = new Document({
numbering: {

View File

@ -1,7 +1,7 @@
// Usage of different Section Types
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun, SectionType } from "../build";
import { Document, Packer, Paragraph, TextRun, SectionType } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Move + offset header and footer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, Paragraph } from "../build";
import { Document, Footer, Header, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example of how to change page borders
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph, Tab, TextRun } from "../build";
import { Document, HeadingLevel, Packer, Paragraph, Tab, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
// Track Revisions aka. "Track Changes"
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
AlignmentType,
@ -14,7 +14,7 @@ import {
ShadingType,
Tab,
TextRun,
} from "../build";
} from "docx";
/*
For reference, see

View File

@ -1,5 +1,5 @@
// Text Frame (Text Box) example
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
BorderStyle,
@ -11,7 +11,7 @@ import {
Tab,
TextRun,
VerticalPositionAlign,
} from "../build";
} from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, LineRuleType, Packer, Paragraph, TextRun } from "../build";
import { Document, LineRuleType, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Move + offset header and footer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, PageBreak, Paragraph, TextRun } from "../build";
import { Document, Footer, Header, Packer, PageBreak, Paragraph, TextRun } from "docx";
const doc = new Document({
evenAndOddHeaderAndFooters: true,

View File

@ -1,7 +1,7 @@
// Numbered lists - With complex number text
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, LevelFormat } from "../build";
import { Document, Packer, Paragraph, LevelFormat } from "docx";
const doc = new Document({
numbering: {

View File

@ -1,8 +1,8 @@
// Example of how to set the document page sizes
// Reference from https://papersizes.io/a/a3
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { convertMillimetersToTwip, Document, Packer, PageOrientation, Paragraph } from "../build";
import { convertMillimetersToTwip, Document, Packer, PageOrientation, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Use fields to include dynamic text
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "../build";
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "docx";
const doc = new Document({
creator: "Me",

View File

@ -1,7 +1,7 @@
// Section with 2 columns including a column break
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, ColumnBreak, TextRun } from "../build";
import { Document, Packer, Paragraph, ColumnBreak, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
import * as fs from "fs";
import { Document, Packer, Paragraph, LevelFormat } from "../build";
import { Document, Packer, Paragraph, LevelFormat } from "docx";
const doc = new Document({
numbering: {

View File

@ -1,7 +1,7 @@
// Sections with multiple columns
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Column, Document, Packer, Paragraph } from "../build";
import { Column, Document, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example of how to set the document to landscape
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, PageOrientation, Paragraph } from "../build";
import { Document, Packer, PageOrientation, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example demonstrating line numbers with suppression.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, LineNumberRestartFormat, Packer, Paragraph } from "../build";
import { Document, HeadingLevel, LineNumberRestartFormat, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example demonstrating page borders with style, colors and size
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, TextRun, Paragraph, BorderStyle, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder } from "../build";
import { Document, Packer, TextRun, Paragraph, BorderStyle, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example on how to preserve word wrap text. Works with all languages.
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun, SpaceType } from "../build";
import { Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Simple example to add comments to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun, CommentRangeStart, CommentRangeEnd, CommentReference } from "../build";
import { Document, Packer, Paragraph, TextRun, CommentRangeStart, CommentRangeEnd, CommentReference } from "docx";
const doc = new Document({
comments: {
@ -32,6 +32,55 @@ const doc = new Document({
}),
],
},
{
id: 1,
author: "Bob Ross",
date: new Date(),
children: [
new Paragraph({
children: [
new TextRun({
text: "Some initial text content",
}),
],
}),
new Paragraph({
children: [
new TextRun({
text: "comment text content",
}),
],
}),
],
},
{
id: 2,
author: "John Doe",
date: new Date(),
children: [
new Paragraph({
children: [
new TextRun({
text: "Hello World",
}),
],
}),
],
},
{
id: 3,
author: "Beatriz",
date: new Date(),
children: [
new Paragraph({
children: [
new TextRun({
text: "Another reply",
}),
],
}),
],
},
],
},
sections: [
@ -53,6 +102,32 @@ const doc = new Document({
}),
],
}),
new Paragraph({
children: [
new CommentRangeStart(1),
new CommentRangeStart(2),
new CommentRangeStart(3),
new TextRun({
text: "Some text which need commenting",
bold: true,
}),
new CommentRangeEnd(1),
new TextRun({
children: [new CommentReference(1)],
bold: true,
}),
new CommentRangeEnd(2),
new TextRun({
children: [new CommentReference(2)],
bold: true,
}),
new CommentRangeEnd(3),
new TextRun({
children: [new CommentReference(3)],
bold: true,
}),
],
}),
],
},
],

View File

@ -1,7 +1,7 @@
// Exporting the document as a stream
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Tab, TextRun } from "../build";
import { Document, Packer, Paragraph, Tab, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Example of using tab stops
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, HeadingLevel, Packer, Paragraph, TabStopPosition, TabStopType, TextRun } from "../build";
import { Document, HeadingLevel, Packer, Paragraph, TabStopPosition, TabStopType, TextRun } from "docx";
const columnWidth = TabStopPosition.MAX / 4;
const receiptTabStops = [
@ -14,8 +14,8 @@ const receiptTabStops = [
{ type: TabStopType.RIGHT, position: columnWidth * 2 },
{ type: TabStopType.RIGHT, position: columnWidth * 3 },
{ type: TabStopType.RIGHT, position: TabStopPosition.MAX },
],
twoTabStops = [{ type: TabStopType.RIGHT, position: TabStopPosition.MAX }];
];
const twoTabStops = [{ type: TabStopType.RIGHT, position: TabStopPosition.MAX }];
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Add compatibility options
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun } from "../build";
import { Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
compatibility: {

View File

@ -1,7 +1,7 @@
// Exporting the document as a stream
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, Table, TableBorders, TableCell, TableRow, WidthType } from "../build";
import { Document, Packer, Paragraph, Table, TableBorders, TableCell, TableRow, WidthType } from "docx";
const table1 = new Table({
columnWidths: [3505, 5505],

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Packer, Paragraph, TextRun } from "../build";
import { AlignmentType, Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
// Example of how you would create a table and add data to it from a data source
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Document,
@ -13,7 +13,7 @@ import {
TextDirection,
TextRun,
WidthType,
} from "../build";
} from "docx";
interface StockPrice {
readonly date: Date;

View File

@ -1,7 +1,7 @@
// Add text to header and footer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, Paragraph } from "../build";
import { Document, Footer, Header, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, convertMillimetersToTwip, Document, Packer, Paragraph, TextRun } from "../build";
import { AlignmentType, convertMillimetersToTwip, Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
styles: {

View File

@ -1,7 +1,7 @@
// Example of a continuous header
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, Paragraph, SectionType, Tab, TextRun } from "../build";
import { Document, Footer, Header, Packer, Paragraph, SectionType, TextRun } from "docx";
const doc = new Document({
creator: "Creator",

View File

@ -1,7 +1,7 @@
// Example of using headers and footers in a new section
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, Packer, Paragraph, SectionType, Tab, TextRun } from "../build";
import { Document, Footer, Header, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
creator: "Creator",

View File

@ -1,7 +1,7 @@
// Simple example to add text to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph } from "../build";
import { Document, Packer, Paragraph } from "docx";
const doc = new Document({
styles: {

View File

@ -1,17 +1,16 @@
// Simple example apply positional tabs to a document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
Document,
Packer,
Paragraph,
PositionalTab,
Tab,
TextRun,
PositionalTabAlignment,
PositionalTabRelativeTo,
PositionalTabLeader,
} from "../build";
} from "docx";
const doc = new Document({
sections: [

View File

@ -1,5 +1,5 @@
// Patch a document with patches
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import {
ExternalHyperlink,
@ -14,7 +14,7 @@ import {
TextDirection,
TextRun,
VerticalAlign,
} from "../build";
} from "docx";
patchDocument(fs.readFileSync("demo/assets/simple-template.docx"), {
patches: {

View File

@ -1,7 +1,7 @@
// Generate a template document
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun } from "../build";
import { Document, Packer, Paragraph, TextRun } from "docx";
const doc = new Document({
sections: [

View File

@ -0,0 +1,15 @@
// Patch a document with patches
import * as fs from "fs";
import { patchDocument, PatchType, TextRun } from "docx";
patchDocument(fs.readFileSync("demo/assets/simple-template-2.docx"), {
patches: {
name: {
type: PatchType.PARAGRAPH,
children: [new TextRun("Max")],
},
},
}).then((doc) => {
fs.writeFileSync("My Document.docx", doc);
});

View File

@ -0,0 +1,31 @@
// Patch a document with patches
import * as fs from "fs";
import { IPatch, patchDocument, PatchType, TextRun } from "docx";
export const font = "Trebuchet MS";
export const getPatches = (fields: { [key: string]: string }) => {
const patches: { [key: string]: IPatch } = {};
for (const field in fields) {
patches[field] = {
type: PatchType.PARAGRAPH,
children: [new TextRun({ text: fields[field], font })],
};
}
return patches;
};
const patches = getPatches({
name: "Mr",
table_heading_1: "John",
item_1: "Doe",
paragraph_replace: "Lorem ipsum paragraph",
});
patchDocument(fs.readFileSync("demo/assets/simple-template.docx"), {
patches,
}).then((doc) => {
fs.writeFileSync("My Document.docx", doc);
});

View File

@ -0,0 +1,29 @@
// Patch a document with patches
import * as fs from "fs";
import { IPatch, patchDocument, PatchType, TextRun } from "docx";
export const font = "Trebuchet MS";
export const getPatches = (fields: { [key: string]: string }) => {
const patches: { [key: string]: IPatch } = {};
for (const field in fields) {
patches[field] = {
type: PatchType.PARAGRAPH,
children: [new TextRun({ text: fields[field], font })],
};
}
return patches;
};
const patches = getPatches({
salutation: "Mr.",
"first-name": "John",
});
patchDocument(fs.readFileSync("demo/assets/simple-template-3.docx"), {
patches,
}).then((doc) => {
fs.writeFileSync("My Document.docx", doc);
});

View File

@ -1,7 +1,7 @@
// Add images to header and footer
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Footer, Header, ImageRun, Packer, Paragraph } from "../build";
import { Document, Footer, Header, ImageRun, Packer, Paragraph } from "docx";
const doc = new Document({
sections: [

44
demo/90-check-boxes.ts Normal file
View File

@ -0,0 +1,44 @@
// Simple example to add check boxes to a document
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun, CheckBox } from "docx";
const doc = new Document({
sections: [
{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({ break: 1 }),
new CheckBox(),
new TextRun({ break: 1 }),
new CheckBox({ checked: true }),
new TextRun({ break: 1 }),
new CheckBox({ checked: true, checkedState: { value: "2611" } }),
new TextRun({ break: 1 }),
new CheckBox({ checked: true, checkedState: { value: "2611", font: "MS Gothic" } }),
new TextRun({ break: 1 }),
new CheckBox({
checked: true,
checkedState: { value: "2611", font: "MS Gothic" },
uncheckedState: { value: "2610", font: "MS Gothic" },
}),
new TextRun({ break: 1 }),
new CheckBox({
checked: true,
checkedState: { value: "2611", font: "MS Gothic" },
uncheckedState: { value: "2610", font: "MS Gothic" },
}),
new TextRun({ text: "Are you ok?", break: 1 }),
new CheckBox({ checked: true, alias: "Are you ok?" }),
],
}),
],
},
],
});
Packer.toBuffer(doc).then((buffer) => {
fs.writeFileSync("My Document.docx", buffer);
});

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More