Compare commits

..

208 Commits
7.4.0 ... 7.6.0

Author SHA1 Message Date
7e5e2baf92 Version bump 2022-10-19 21:21:33 +01:00
53c70e6cd1 Merge pull request #1718 from codecnmc/patch-1
Update numbering.md
2022-10-19 20:26:21 +01:00
4bfb87ea74 Merge pull request #1716 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.40.1
build(deps-dev): bump @typescript-eslint/parser from 5.38.1 to 5.40.1
2022-10-19 20:25:47 +01:00
86e12c7d40 Merge pull request #1715 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.40.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.38.1 to 5.40.1
2022-10-19 20:25:40 +01:00
eb5449adf8 build(deps-dev): bump @typescript-eslint/parser from 5.38.1 to 5.40.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.38.1 to 5.40.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.40.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>
2022-10-19 19:13:25 +00:00
19eeec9fc8 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.38.1 to 5.40.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.40.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>
2022-10-19 19:13:20 +00:00
449f5f5be3 Merge pull request #1719 from dolanmiu/dependabot/npm_and_yarn/types/node-18.11.2
build(deps): bump @types/node from 18.7.23 to 18.11.2
2022-10-19 20:12:01 +01:00
bc5a1b52b7 Merge pull request #1702 from dolanmiu/dependabot/npm_and_yarn/eslint-8.25.0
build(deps-dev): bump eslint from 8.24.0 to 8.25.0
2022-10-19 20:11:53 +01:00
fc7f37767f Merge pull request #1697 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-unicorn-44.0.2
build(deps-dev): bump eslint-plugin-unicorn from 44.0.0 to 44.0.2
2022-10-19 20:11:45 +01:00
38dbdd02ae Merge pull request #1692 from dolanmiu/dependabot/npm_and_yarn/sinon-14.0.1
build(deps-dev): bump sinon from 14.0.0 to 14.0.1
2022-10-19 20:11:40 +01:00
7bb3fa74ce Merge pull request #1691 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-functional-4.4.1
build(deps-dev): bump eslint-plugin-functional from 4.4.0 to 4.4.1
2022-10-19 20:11:35 +01:00
a33660d32c Merge pull request #1686 from dolanmiu/dependabot/npm_and_yarn/types/prompt-1.1.4
build(deps-dev): bump @types/prompt from 1.1.3 to 1.1.4
2022-10-19 20:11:28 +01:00
ef842d1f3f Merge pull request #1709 from ronram5126/master
FIX: multiple tabStop support for LibreWriter
2022-10-19 20:11:03 +01:00
e5c2a0a87b Fix linting and spelling 2022-10-19 19:58:46 +01:00
817ffe8fd0 build(deps): bump @types/node from 18.7.23 to 18.11.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.23 to 18.11.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>
2022-10-19 11:01:41 +00:00
5b582d45ba Update numbering.md
Long time to find a way to unident ,See the document can't resolve my problem,Source code analysis found that does not belong to the indent.
2022-10-19 17:35:46 +08:00
6a303532f4 DEMO: 75-tab-stops.ts added missing \t 2022-10-17 14:56:12 +05:45
c75abb7cb9 DEMO: added demo/75-tab-stops.ts 2022-10-17 14:49:32 +05:45
8282d76b87 Merge branch 'dolanmiu:master' into master 2022-10-17 14:25:48 +05:45
79f3866c4c Merge pull request #1700 from tvale1/master
Add MathIntegral class
2022-10-16 00:54:57 +01:00
6dcf3f25e9 Fix test 2022-10-16 00:44:40 +01:00
e80acea63f Add more MathIntegral tests 2022-10-16 00:38:02 +01:00
640639264d Add MathIntegral tests 2022-10-16 00:33:44 +01:00
3ccdd2585c Fix prettier and linting 2022-10-16 00:29:16 +01:00
2c4b55c692 Refactor code to simplify interface 2022-10-16 00:21:34 +01:00
70a3b25d54 Fix Prettier errors 2022-10-16 00:20:16 +01:00
d053baef03 FIX: added legacy support for TabStop 2022-10-14 17:01:41 +05:45
629c586014 FIX: multiple tabStop support for LibreWriter 2022-10-14 16:38:02 +05:45
e4b03b3f71 build(deps-dev): bump eslint from 8.24.0 to 8.25.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.24.0 to 8.25.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.24.0...v8.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 11:02:11 +00:00
9ab6df99b1 Add MathIntegral class 2022-10-08 12:56:35 +11:00
51519a55ef build(deps-dev): bump eslint-plugin-unicorn from 44.0.0 to 44.0.2
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 44.0.0 to 44.0.2.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v44.0.0...v44.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-07 11:00:58 +00:00
059455929b Merge pull request #1685 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-unicorn-44.0.0
build(deps-dev): bump eslint-plugin-unicorn from 43.0.2 to 44.0.0
2022-10-04 15:24:15 +01:00
8a1df4438e build(deps-dev): bump sinon from 14.0.0 to 14.0.1
Bumps [sinon](https://github.com/sinonjs/sinon) from 14.0.0 to 14.0.1.
- [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/v14.0.0...v14.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 11:03:04 +00:00
cbf6e46e35 build(deps-dev): bump eslint-plugin-functional from 4.4.0 to 4.4.1
Bumps [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional) from 4.4.0 to 4.4.1.
- [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/v4.4.0...v4.4.1)

---
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>
2022-10-04 11:02:30 +00:00
727b1bd63b build(deps-dev): bump @types/prompt from 1.1.3 to 1.1.4
Bumps [@types/prompt](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prompt) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prompt)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 11:02:26 +00:00
363b8d74ae build(deps-dev): bump eslint-plugin-unicorn from 43.0.2 to 44.0.0
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 43.0.2 to 44.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v43.0.2...v44.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>
2022-10-03 11:01:33 +00:00
b31ecd6583 Merge pull request #1684 from dolanmiu/dependabot/npm_and_yarn/cspell-6.12.0
build(deps-dev): bump cspell from 6.10.1 to 6.12.0
2022-10-03 11:27:15 +01:00
563914a0ef Merge pull request #1682 from dolanmiu/dependabot/npm_and_yarn/typescript-4.8.4
build(deps-dev): bump typescript from 4.8.3 to 4.8.4
2022-10-03 11:27:06 +01:00
1e8adbb240 Merge pull request #1681 from dolanmiu/dependabot/npm_and_yarn/types/mocha-10.0.0
build(deps-dev): bump @types/mocha from 9.1.1 to 10.0.0
2022-10-03 11:26:57 +01:00
4b1f89a561 Merge pull request #1680 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.38.1
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.38.0 to 5.38.1
2022-10-03 11:26:48 +01:00
1a4a0ea5b8 Merge pull request #1679 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.23
build(deps): bump @types/node from 18.7.18 to 18.7.23
2022-10-03 11:26:39 +01:00
f781028b08 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.38.0 to 5.38.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.38.1/packages/eslint-plugin)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 16:50:54 +00:00
56e8ad4f17 build(deps-dev): bump cspell from 6.10.1 to 6.12.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.10.1 to 6.12.0.
- [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.10.1...v6.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 16:50:37 +00:00
62c34ae612 build(deps-dev): bump typescript from 4.8.3 to 4.8.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.8.3 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.8.3...v4.8.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 16:50:05 +00:00
26123b0a93 build(deps): bump @types/node from 18.7.18 to 18.7.23
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.18 to 18.7.23.
- [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>
2022-09-30 16:49:55 +00:00
4023464a13 build(deps-dev): bump @types/mocha from 9.1.1 to 10.0.0
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 9.1.1 to 10.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 16:49:48 +00:00
0c92f354c5 Merge pull request #1678 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.38.1
build(deps-dev): bump @typescript-eslint/parser from 5.38.0 to 5.38.1
2022-09-30 17:48:40 +01:00
676723c8bd build(deps-dev): bump @typescript-eslint/parser from 5.38.0 to 5.38.1
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.38.0 to 5.38.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.38.1/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-30 15:12:31 +00:00
2f4d5afaea Merge pull request #1676 from dolanmiu/dependabot/npm_and_yarn/eslint-8.24.0
build(deps-dev): bump eslint from 8.23.1 to 8.24.0
2022-09-30 16:10:45 +01:00
d0abceb08d Merge pull request #1677 from hunterwilhelm/patch-1
Added the name horizontal line or horizontal rules
2022-09-30 16:10:30 +01:00
8b165e93e1 Specify which borders could look like a <hr/> 2022-09-28 09:19:18 -06:00
321969eb85 Added the name horizontal line or horizontal rules
There was some confusion in https://github.com/dolanmiu/docx/issues/437 because the docs don't mention anything called horizontal lines or horizontal rules. Microsoft calls them by that name here https://support.microsoft.com/en-us/office/insert-a-line-9bf172f6-5908-4791-9bb9-2c952197b1a9
This will make it easier for people to find this in the docs.
2022-09-26 10:22:32 -06:00
85ec90849e build(deps-dev): bump eslint from 8.23.1 to 8.24.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.23.1 to 8.24.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.23.1...v8.24.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 11:01:39 +00:00
96451bc5b7 Merge pull request #1669 from dolanmiu/dependabot/npm_and_yarn/eslint-8.23.1
build(deps-dev): bump eslint from 8.23.0 to 8.23.1
2022-09-25 09:57:01 +01:00
311cbf55ef Merge pull request #1670 from dolanmiu/dependabot/npm_and_yarn/eslint-plugin-functional-4.4.0
build(deps-dev): bump eslint-plugin-functional from 4.3.1 to 4.4.0
2022-09-25 09:56:54 +01:00
0258b256f2 Merge pull request #1671 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/parser-5.38.0
build(deps-dev): bump @typescript-eslint/parser from 5.36.1 to 5.38.0
2022-09-25 09:56:47 +01:00
c615de97c4 Merge pull request #1672 from dolanmiu/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.38.0
build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.36.1 to 5.38.0
2022-09-25 09:56:39 +01:00
e29a7bf146 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.36.1 to 5.38.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.38.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>
2022-09-22 11:02:29 +00:00
b665c243f0 build(deps-dev): bump @typescript-eslint/parser from 5.36.1 to 5.38.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.36.1 to 5.38.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.38.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>
2022-09-22 11:01:59 +00:00
bea1c9ed61 build(deps-dev): bump eslint-plugin-functional from 4.3.1 to 4.4.0
Bumps [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional) from 4.3.1 to 4.4.0.
- [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/v4.3.1...v4.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 11:01:40 +00:00
0e6bdaa9c9 build(deps-dev): bump eslint from 8.23.0 to 8.23.1
Bumps [eslint](https://github.com/eslint/eslint) from 8.23.0 to 8.23.1.
- [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.23.0...v8.23.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 11:01:19 +00:00
7925689618 Merge pull request #1652 from dolanmiu/dependabot/npm_and_yarn/typescript-4.8.3
build(deps-dev): bump typescript from 4.7.4 to 4.8.3
2022-09-22 09:27:39 +01:00
0e818c8d73 Version bump 2022-09-22 09:21:04 +01:00
791441ec86 build(deps-dev): bump typescript from 4.7.4 to 4.8.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.4 to 4.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.4...v4.8.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 08:14:04 +00:00
401de9147c Merge pull request #1668 from dolanmiu/dependabot/npm_and_yarn/ts-loader-9.4.1
build(deps-dev): bump ts-loader from 9.3.1 to 9.4.1
2022-09-22 09:13:23 +01:00
563e10fa92 Merge pull request #1667 from dolanmiu/dependabot/npm_and_yarn/cspell-6.10.1
build(deps-dev): bump cspell from 6.9.0 to 6.10.1
2022-09-22 09:13:15 +01:00
a22c34d8c2 Merge pull request #1666 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.15
build(deps-dev): bump typedoc from 0.23.14 to 0.23.15
2022-09-22 09:13:06 +01:00
e549f8ae61 Merge pull request #1662 from dolanmiu/feat/tslint-to-eslint
TSLint to ESLint
2022-09-22 09:12:55 +01:00
0ac23d0646 Add tests and bump coverage 2022-09-22 07:19:14 +01:00
814d3892f2 build(deps-dev): bump ts-loader from 9.3.1 to 9.4.1
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.3.1 to 9.4.1.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.3.1...9.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-21 11:01:46 +00:00
07d1306a35 build(deps-dev): bump cspell from 6.9.0 to 6.10.1
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.9.0 to 6.10.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.9.0...v6.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-20 11:01:13 +00:00
5950055cca Fix linting and add new lint rules 2022-09-19 20:48:50 +01:00
d6dd468e84 build(deps-dev): bump typedoc from 0.23.14 to 0.23.15
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.14 to 0.23.15.
- [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.14...v0.23.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 11:01:38 +00:00
9a221a01ab Merge pull request #1663 from dolanmiu/dependabot/npm_and_yarn/cspell-6.9.0
build(deps-dev): bump cspell from 6.8.2 to 6.9.0
2022-09-17 02:22:26 +01:00
2a78a29b08 build(deps-dev): bump cspell from 6.8.2 to 6.9.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.8.2 to 6.9.0.
- [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.8.2...v6.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-16 11:00:59 +00:00
e90d97b813 Use new eslint-plugin-functional instead of tslint-immutable 2022-09-15 20:00:50 +01:00
d020d59b11 Merge branch 'master' into feat/tslint-to-eslint
# Conflicts:
#	src/file/numbering/level.spec.ts
#	src/file/numbering/level.ts
2022-09-15 18:04:48 +01:00
5d6d52a465 Merge pull request #1661 from dolanmiu/feat/is-legal-numbering
#1660 Add w:isLgl
2022-09-15 13:18:00 +01:00
ebb3f8137e #1660 Add w:isLgl 2022-09-15 13:08:49 +01:00
af7d275c27 Merge pull request #1636 from MLD5000/create-packer-stream
Create packer stream "toStream"
2022-09-15 13:04:15 +01:00
2b01a6006c Fix linting 2022-09-15 12:39:30 +01:00
9f3940746a Add tests for stream packer 2022-09-15 08:15:38 +01:00
9f729b3bb3 Merge pull request #1658 from dolanmiu/dependabot/npm_and_yarn/cspell-6.8.2
build(deps-dev): bump cspell from 6.8.1 to 6.8.2
2022-09-15 02:53:33 +01:00
2376fb5834 Merge pull request #1659 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.18
build(deps): bump @types/node from 18.7.16 to 18.7.18
2022-09-15 02:53:21 +01:00
0a1507599b build(deps): bump @types/node from 18.7.16 to 18.7.18
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.16 to 18.7.18.
- [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>
2022-09-14 11:01:01 +00:00
42bb01c416 build(deps-dev): bump cspell from 6.8.1 to 6.8.2
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.8.1 to 6.8.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.8.1...v6.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-13 11:02:24 +00:00
cfb0ae7428 Merge pull request #1653 from dolanmiu/dependabot/npm_and_yarn/json-schema-0.4.0
build(deps): bump json-schema from 0.2.3 to 0.4.0
2022-09-11 05:33:31 +01:00
6b30f44da0 Merge pull request #1651 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.16
build(deps): bump @types/node from 18.7.13 to 18.7.16
2022-09-11 05:33:12 +01:00
a7f89ac58f Merge pull request #1650 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.14
build(deps-dev): bump typedoc from 0.23.11 to 0.23.14
2022-09-11 05:32:57 +01:00
38711f04bc build(deps): bump @types/node from 18.7.13 to 18.7.16
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.13 to 18.7.16.
- [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>
2022-09-11 04:18:13 +00:00
78fd99c26e build(deps): bump json-schema from 0.2.3 to 0.4.0
Bumps [json-schema](https://github.com/kriszyp/json-schema) from 0.2.3 to 0.4.0.
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-11 04:17:47 +00:00
cae10d4611 Merge pull request #1648 from dolanmiu/dependabot/npm_and_yarn/types/prompt-1.1.3
build(deps-dev): bump @types/prompt from 1.1.2 to 1.1.3
2022-09-11 05:17:23 +01:00
40233dbf87 Merge pull request #1646 from dolanmiu/dependabot/npm_and_yarn/types/glob-8.0.0
build(deps-dev): bump @types/glob from 7.2.0 to 8.0.0
2022-09-11 05:17:12 +01:00
35865e46f0 build(deps-dev): bump typedoc from 0.23.11 to 0.23.14
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.11 to 0.23.14.
- [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.11...v0.23.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 15:34:40 +00:00
ea565d8f71 build(deps-dev): bump @types/prompt from 1.1.2 to 1.1.3
Bumps [@types/prompt](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/prompt) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/prompt)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 11:01:21 +00:00
859a3f4015 build(deps-dev): bump @types/glob from 7.2.0 to 8.0.0
Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.2.0 to 8.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-31 11:01:19 +00:00
ebcb37cbed Fix ESLinting errors and remove TSLint 2022-08-31 08:59:27 +01:00
1bdf9a4987 Initial ESlint conversion 2022-08-31 07:52:27 +01:00
d7a9cb2168 Merge pull request #1640 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.11
build(deps-dev): bump typedoc from 0.23.10 to 0.23.11
2022-08-28 06:08:29 +01:00
8890e13ccb Merge pull request #1641 from dolanmiu/dependabot/npm_and_yarn/cspell-6.8.1
build(deps-dev): bump cspell from 6.8.0 to 6.8.1
2022-08-28 06:08:13 +01:00
87e1844f04 build(deps-dev): bump cspell from 6.8.0 to 6.8.1
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.8.0 to 6.8.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.8.0...v6.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 11:01:29 +00:00
388030c6ec build(deps-dev): bump typedoc from 0.23.10 to 0.23.11
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.10 to 0.23.11.
- [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.10...v0.23.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 11:00:54 +00:00
d5bd407802 Merge pull request #1601 from AdaEniac/patch-3
Update hyperlink.ts
2022-08-25 01:54:31 +01:00
ba4dc2ed54 Fix formatting 2022-08-25 01:40:14 +01:00
c982e64996 formatting 2022-08-24 13:01:15 -05:00
0425939668 Merge pull request #1638 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.13
build(deps): bump @types/node from 18.7.11 to 18.7.13
2022-08-24 13:22:07 +01:00
48b804b765 build(deps): bump @types/node from 18.7.11 to 18.7.13
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.11 to 18.7.13.
- [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>
2022-08-24 11:01:27 +00:00
246ae6e6bc Merge pull request #1637 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.11
build(deps): bump @types/node from 18.7.9 to 18.7.11
2022-08-24 02:36:11 +01:00
efa5b65e45 build(deps): bump @types/node from 18.7.9 to 18.7.11
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.9 to 18.7.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>
2022-08-23 11:00:56 +00:00
f4f6ee5055 Created toStream example 2022-08-22 15:26:52 -05:00
1a630bcb4d Added toStream export function
New Function returns a NodeJS readable stream that allows piping DOCX document data to stream.
2022-08-22 13:25:59 -07:00
600fef21f6 Update webpack.config.ts for nodestreams
Without this alias, JSZip throws a "nodestream not supported on this platform" error.  This addition resolves the issue.
2022-08-22 13:24:12 -07:00
b779ee79a5 Merge pull request #1633 from Volper212/master
Add toString to Packer
2022-08-22 18:40:38 +01:00
08537944ae Merge pull request #1635 from dolanmiu/dependabot/npm_and_yarn/cspell-6.8.0
build(deps-dev): bump cspell from 6.6.1 to 6.8.0
2022-08-22 18:30:49 +01:00
004b3641eb Merge pull request #1634 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.9
build(deps): bump @types/node from 18.7.4 to 18.7.9
2022-08-22 18:30:40 +01:00
b6be05a931 Add test for Packer.toString 2022-08-22 19:08:29 +02:00
191cc071c2 build(deps-dev): bump cspell from 6.6.1 to 6.8.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.6.1 to 6.8.0.
- [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.6.1...v6.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 11:01:11 +00:00
9e52c46ad3 build(deps): bump @types/node from 18.7.4 to 18.7.9
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.4 to 18.7.9.
- [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>
2022-08-22 11:00:51 +00:00
21f7662a77 Add toString to Packer 2022-08-17 18:52:19 +02:00
d4d7f92df8 Merge pull request #1629 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.4
build(deps): bump @types/node from 18.7.2 to 18.7.4
2022-08-15 12:13:25 +01:00
a3180fd70d build(deps): bump @types/node from 18.7.2 to 18.7.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.2 to 18.7.4.
- [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>
2022-08-15 11:01:06 +00:00
3dc4f8e87a Merge pull request #1626 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.2
build(deps): bump @types/node from 18.7.1 to 18.7.2
2022-08-15 11:21:47 +01:00
64393d92a5 build(deps): bump @types/node from 18.7.1 to 18.7.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.7.1 to 18.7.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>
2022-08-12 11:00:49 +00:00
1fbd405e41 Merge pull request #1625 from dolanmiu/dependabot/npm_and_yarn/cspell-6.6.1
build(deps-dev): bump cspell from 6.6.0 to 6.6.1
2022-08-12 00:42:24 +01:00
f711aa1b58 Merge pull request #1624 from dolanmiu/dependabot/npm_and_yarn/types/node-18.7.1
build(deps): bump @types/node from 18.6.5 to 18.7.1
2022-08-12 00:42:10 +01:00
e2e527ce44 build(deps-dev): bump cspell from 6.6.0 to 6.6.1
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.6.0 to 6.6.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.6.0...v6.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 11:02:44 +00:00
bb7f48c021 build(deps): bump @types/node from 18.6.5 to 18.7.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.6.5 to 18.7.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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 11:02:08 +00:00
ad9b64e7ae Merge pull request #1620 from dolanmiu/dependabot/npm_and_yarn/cspell-6.6.0
build(deps-dev): bump cspell from 6.5.0 to 6.6.0
2022-08-11 04:11:38 +01:00
ef2ee6d00d Merge pull request #1621 from dolanmiu/dependabot/npm_and_yarn/tsconfig-paths-4.1.0
build(deps-dev): bump tsconfig-paths from 4.0.0 to 4.1.0
2022-08-11 04:11:27 +01:00
2d259c4edc Merge pull request #1623 from dolanmiu/dependabot/npm_and_yarn/types/node-18.6.5
build(deps): bump @types/node from 18.6.4 to 18.6.5
2022-08-11 04:11:16 +01:00
b286e3ae09 build(deps): bump @types/node from 18.6.4 to 18.6.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.6.4 to 18.6.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>
2022-08-09 11:00:59 +00:00
ec3e193672 build(deps-dev): bump tsconfig-paths from 4.0.0 to 4.1.0
Bumps [tsconfig-paths](https://github.com/dividab/tsconfig-paths) from 4.0.0 to 4.1.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.0.0...v4.1.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>
2022-08-08 11:01:39 +00:00
40a2fcd81e build(deps-dev): bump cspell from 6.5.0 to 6.6.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.5.0 to 6.6.0.
- [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.5.0...v6.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 11:01:22 +00:00
7e876bad7e Merge pull request #1617 from dolanmiu/dependabot/npm_and_yarn/types/node-18.6.4
build(deps): bump @types/node from 18.6.3 to 18.6.4
2022-08-05 22:44:28 +01:00
aefa3b102c build(deps): bump @types/node from 18.6.3 to 18.6.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.6.3 to 18.6.4.
- [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>
2022-08-05 11:01:13 +00:00
4d1f295a26 Merge pull request #1616 from dolanmiu/dependabot/npm_and_yarn/jszip-3.10.1
build(deps): bump jszip from 3.10.0 to 3.10.1
2022-08-04 03:14:28 +01:00
56a31faf7e build(deps): bump jszip from 3.10.0 to 3.10.1
Bumps [jszip](https://github.com/Stuk/jszip) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: jszip
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 11:00:52 +00:00
f3afef01b0 Merge pull request #1612 from dolanmiu/dependabot/npm_and_yarn/tsconfig-paths-webpack-plugin-4.0.0
build(deps-dev): bump tsconfig-paths-webpack-plugin from 3.5.2 to 4.0.0
2022-08-03 01:55:48 +01:00
ea38655c48 Merge pull request #1610 from dolanmiu/dependabot/npm_and_yarn/types/node-18.6.3
build(deps): bump @types/node from 18.6.1 to 18.6.3
2022-08-03 01:55:39 +01:00
972d06b492 Merge pull request #1611 from dolanmiu/dependabot/npm_and_yarn/cspell-6.5.0
build(deps-dev): bump cspell from 6.4.2 to 6.5.0
2022-08-03 01:55:16 +01:00
8538489136 Merge pull request #1613 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.10
build(deps-dev): bump typedoc from 0.23.9 to 0.23.10
2022-08-03 01:55:06 +01:00
4f28464b99 build(deps-dev): bump typedoc from 0.23.9 to 0.23.10
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.9 to 0.23.10.
- [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.9...v0.23.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 11:02:18 +00:00
049e111797 build(deps-dev): bump tsconfig-paths-webpack-plugin from 3.5.2 to 4.0.0
Bumps [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin) from 3.5.2 to 4.0.0.
- [Release notes](https://github.com/dividab/tsconfig-paths-webpack-plugin/releases)
- [Changelog](https://github.com/dividab/tsconfig-paths-webpack-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dividab/tsconfig-paths-webpack-plugin/compare/v3.5.2...v4.0.0)

---
updated-dependencies:
- dependency-name: tsconfig-paths-webpack-plugin
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 11:01:57 +00:00
96199c4b12 build(deps-dev): bump cspell from 6.4.2 to 6.5.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.4.2 to 6.5.0.
- [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.4.2...v6.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 11:01:36 +00:00
cf23789edf build(deps): bump @types/node from 18.6.1 to 18.6.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.6.1 to 18.6.3.
- [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>
2022-08-01 11:01:08 +00:00
48724e5b08 Fix spelling 2022-07-31 15:23:06 +01:00
40c778d244 Add Carbon adverts 2022-07-29 00:29:54 +01:00
ff0c44ecfc Merge pull request #1606 from dolanmiu/dependabot/npm_and_yarn/cspell-6.4.2
build(deps-dev): bump cspell from 6.4.1 to 6.4.2
2022-07-26 23:39:51 +01:00
828cc15ea3 build(deps-dev): bump cspell from 6.4.1 to 6.4.2
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.4.1 to 6.4.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.4.1...v6.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-26 11:01:24 +00:00
bbbe55b706 Merge pull request #1602 from dolanmiu/dependabot/npm_and_yarn/types/node-18.6.1
build(deps): bump @types/node from 18.0.6 to 18.6.1
2022-07-25 18:29:16 +01:00
cd98bdec9b Merge pull request #1603 from dolanmiu/dependabot/npm_and_yarn/cspell-6.4.1
build(deps-dev): bump cspell from 6.4.0 to 6.4.1
2022-07-25 18:29:08 +01:00
59767bddfe Merge pull request #1604 from dolanmiu/dependabot/npm_and_yarn/webpack-5.74.0
build(deps-dev): bump webpack from 5.73.0 to 5.74.0
2022-07-25 18:28:55 +01:00
035ae40b97 Merge pull request #1605 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.9
build(deps-dev): bump typedoc from 0.23.8 to 0.23.9
2022-07-25 18:28:47 +01:00
f7603bfdfc build(deps-dev): bump typedoc from 0.23.8 to 0.23.9
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.8 to 0.23.9.
- [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.8...v0.23.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 11:11:30 +00:00
754201a9a2 build(deps-dev): bump webpack from 5.73.0 to 5.74.0
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.74.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.74.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 11:11:00 +00:00
d0af7e4781 build(deps-dev): bump cspell from 6.4.0 to 6.4.1
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.4.0 to 6.4.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.4.0...v6.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 11:10:40 +00:00
ecf0bf8cdd build(deps): bump @types/node from 18.0.6 to 18.6.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.6 to 18.6.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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-25 11:10:18 +00:00
85bafb3eef Update hyperlink.ts
ExternalHyperlink extends XmlComponent
2022-07-23 15:03:04 +08:00
efe378e94f Merge pull request #1600 from dolanmiu/dependabot/npm_and_yarn/terser-5.14.2
build(deps): bump terser from 5.13.1 to 5.14.2
2022-07-21 03:25:10 +01:00
614cb74d47 build(deps): bump terser from 5.13.1 to 5.14.2
Bumps [terser](https://github.com/terser/terser) from 5.13.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 02:17:11 +00:00
df4190321e Merge pull request #1598 from dolanmiu/dependabot/npm_and_yarn/types/sinon-10.0.13
build(deps-dev): bump @types/sinon from 10.0.12 to 10.0.13
2022-07-21 03:16:43 +01:00
56c3574a2b Merge pull request #1599 from dolanmiu/dependabot/npm_and_yarn/cspell-6.4.0
build(deps-dev): bump cspell from 6.3.0 to 6.4.0
2022-07-21 03:16:36 +01:00
51b11c7035 build(deps-dev): bump cspell from 6.3.0 to 6.4.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.3.0 to 6.4.0.
- [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.3.0...v6.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 11:01:32 +00:00
564693cf22 build(deps-dev): bump @types/sinon from 10.0.12 to 10.0.13
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.12 to 10.0.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 11:01:05 +00:00
50a6bed92f Merge pull request #1595 from dolanmiu/dependabot/npm_and_yarn/types/node-18.0.6
build(deps): bump @types/node from 18.0.4 to 18.0.6
2022-07-19 01:55:25 +01:00
ef54b3cf2e Merge pull request #1596 from dolanmiu/dependabot/npm_and_yarn/cspell-6.3.0
build(deps-dev): bump cspell from 6.2.3 to 6.3.0
2022-07-19 01:55:20 +01:00
ebf06250b1 Merge pull request #1597 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.8
build(deps-dev): bump typedoc from 0.23.7 to 0.23.8
2022-07-19 01:54:54 +01:00
56f9c22ac6 build(deps-dev): bump typedoc from 0.23.7 to 0.23.8
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.7 to 0.23.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.7...v0.23.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 11:06:40 +00:00
384242974b build(deps-dev): bump cspell from 6.2.3 to 6.3.0
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.2.3 to 6.3.0.
- [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.2.3...v6.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 11:06:11 +00:00
7717d95cab build(deps): bump @types/node from 18.0.4 to 18.0.6
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.4 to 18.0.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-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 11:05:26 +00:00
5b69a32c11 Merge pull request #1593 from dolanmiu/dependabot/npm_and_yarn/types/node-18.0.4
build(deps): bump @types/node from 18.0.3 to 18.0.4
2022-07-16 05:18:30 +01:00
24abf51c8c Merge pull request #1594 from dolanmiu/dependabot/npm_and_yarn/ts-node-10.9.1
build(deps-dev): bump ts-node from 10.8.2 to 10.9.1
2022-07-16 05:18:23 +01:00
80c5092dc1 build(deps-dev): bump ts-node from 10.8.2 to 10.9.1
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.2 to 10.9.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.2...v10.9.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-14 11:01:18 +00:00
15ffa4d98b build(deps): bump @types/node from 18.0.3 to 18.0.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.3 to 18.0.4.
- [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>
2022-07-14 11:00:53 +00:00
4935878f73 Version bump 2022-07-12 18:34:01 +01:00
440782e9cf Merge pull request #1589 from dolanmiu/feat/1583-fix-comments-missing
#1583 Comments to always write default data
2022-07-12 18:33:13 +01:00
f304220463 Merge pull request #1585 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.7
build(deps-dev): bump typedoc from 0.23.6 to 0.23.7
2022-07-12 18:16:45 +01:00
02a5aaf5d8 Bump coverage threshold 2022-07-12 18:14:20 +01:00
e84641c13c #1583 Add more tests to media data 2022-07-12 18:11:44 +01:00
278b6b6a20 Merge pull request #1590 from dolanmiu/feat/1584-fix-test-names
#1584 Fix test names
2022-07-12 17:30:25 +01:00
d369c0a74c Fix footnotes demo 2022-07-12 17:29:09 +01:00
ab9f97598c #1584 Fix test names 2022-07-12 17:10:37 +01:00
2814841226 Update demo 43 with images 2022-07-12 17:08:12 +01:00
a7d55a52f3 #1583 Comments to always write default data 2022-07-12 16:57:25 +01:00
d436b7b339 build(deps-dev): bump typedoc from 0.23.6 to 0.23.7
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.6 to 0.23.7.
- [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.6...v0.23.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 11:01:30 +00:00
f183d38bb3 Merge pull request #1579 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.6
build(deps-dev): bump typedoc from 0.23.5 to 0.23.6
2022-07-08 18:19:59 +01:00
2353b36709 Merge pull request #1577 from dolanmiu/feat/cspell-actions
Add cspell to actions
2022-07-08 18:19:51 +01:00
00db6e7dc1 Merge pull request #1580 from dolanmiu/dependabot/npm_and_yarn/cspell-6.2.3
build(deps-dev): bump cspell from 6.2.2 to 6.2.3
2022-07-08 18:19:39 +01:00
eb479c4684 Merge pull request #1582 from khill-fbmc/patch-1
Update _sidebar.md
2022-07-08 18:19:28 +01:00
68413605e9 Update _sidebar.md
Correct me if I am wrong, but like this? To fix #1581
2022-07-08 06:03:49 -07:00
02bd5d71d0 build(deps-dev): bump cspell from 6.2.2 to 6.2.3
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 6.2.2 to 6.2.3.
- [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.2.2...v6.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 11:01:26 +00:00
97a851a848 build(deps-dev): bump typedoc from 0.23.5 to 0.23.6
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.5 to 0.23.6.
- [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.5...v0.23.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 11:01:02 +00:00
f503794e09 Merge pull request #1572 from dolanmiu/dependabot/npm_and_yarn/ts-node-10.8.2
build(deps-dev): bump ts-node from 10.8.1 to 10.8.2
2022-07-06 16:54:04 +01:00
d0ee5fa23a Merge pull request #1575 from dolanmiu/dependabot/npm_and_yarn/types/node-18.0.3
build(deps): bump @types/node from 18.0.0 to 18.0.3
2022-07-06 16:53:51 +01:00
0ccf0f8d7a Merge pull request #1570 from dolanmiu/dependabot/npm_and_yarn/typedoc-0.23.5
build(deps-dev): bump typedoc from 0.23.2 to 0.23.5
2022-07-06 16:44:44 +01:00
719f7c8f9e Add cspell to actions 2022-07-06 16:43:58 +01:00
828e30a248 build(deps-dev): bump typedoc from 0.23.2 to 0.23.5
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.23.2 to 0.23.5.
- [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.2...v0.23.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 15:34:56 +00:00
6beb7208af build(deps): bump @types/node from 18.0.0 to 18.0.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.0 to 18.0.3.
- [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>
2022-07-06 15:34:55 +00:00
2d342a2415 build(deps-dev): bump ts-node from 10.8.1 to 10.8.2
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.1 to 10.8.2.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.1...v10.8.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-06 15:34:30 +00:00
a2017fc353 Merge pull request #1574 from wvbe/master
docs: Fix property name accuracy in describing paragraph borders
2022-07-06 16:34:30 +01:00
709c3d9b55 Merge pull request #1563 from khill-fbmc/extension-req
Recommend to install `Code Spell Checker` Extension
2022-07-06 16:33:52 +01:00
950867d032 Merge pull request #1576 from dolanmiu/feat/cspell
Feat/cspell
2022-07-06 16:33:24 +01:00
65caa531c5 Improve spelling and prettier commands 2022-07-06 15:26:17 +01:00
64addc85ee Fix all spelling across the project 2022-07-06 14:05:37 +01:00
aa02261248 docs: Fix property name accuracy in describing paragraph borders 2022-07-06 11:51:10 +02:00
6d447033c9 Fix more spelling rules 2022-07-05 05:06:32 +01:00
c888f589d0 Introduce CSpell 2022-07-04 14:51:36 +01:00
4697d774f4 Since I saw some cSpell definitions in the settings, why not also recommend to install the extension? 2022-06-26 06:42:36 -07:00
281 changed files with 8340 additions and 1353 deletions

58
.cspell.json Normal file
View File

@ -0,0 +1,58 @@
// cSpell Settings
{
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en_US",
"dictionaries": ["en_US", "typescript", "softwareTerms", "fonts", "npm"],
// words - list of words to be always considered correct
"words": [
"Xmlable",
"twip",
"twips",
"jsonify",
"falsey",
"aiueo",
"iroha",
"aiueo",
"iroha",
"chosung",
"Abjad",
"Initializable",
"rels",
"dolan",
"xmlify",
"Xmlifyed",
"xmlified",
"datas",
"jszip",
"rsid",
"NUMPAGES",
"ATLEAST",
"ooxml",
"clippy",
"docsify"
],
"ignoreRegExpList": [
"/\"w:.+\"/",
"/\"s:.+\"/",
"/\"a:.+\"/",
"/\"pic:.+\"/",
"/\"xmlns:.+\"/",
"/\"vt:.+\"/",
"/[^\\s]{40,}/",
"/<xsd:.+/>/",
"/[A-Z_]+ = \".+\"/",
"/XmlAttributeComponent<{[^}]+}>/g",
"/xmlKeys = {[^}]+}/g",
"/\\.to\\.deep\\.equal\\({[^)]+}\\)/g",
"\\.to\\.include\\.members\\(\\[[^\\]]+]\\)",
"/new [a-zA-Z]+\\({[^£]+}\\)/g"
],
"ignorePaths": ["package.json", "docs/api"],
"allowCompoundWords": true,
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": ["hte"]
}

270
.eslintrc.js Normal file
View File

@ -0,0 +1,270 @@
/*
👋 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: false,
allowTypedFunctionExpressions: false,
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-template-curly-in-string": "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",
"@typescript-eslint/explicit-function-return-type": "off",
"functional/immutable-data": [
"error",
{
assumeTypes: true,
ignoreImmediateMutation: true,
ignoreAccessorPattern: ["**.root*", "**.numberingReferences*", "**.sections*", "**.properties*"],
},
],
"functional/no-method-signature": "error",
"functional/no-mixed-type": "error",
"functional/prefer-readonly-type": "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",
},
},
],
};

View File

@ -58,3 +58,13 @@ jobs:
run: npm ci --force
- name: Prettier
run: npm run style
cspell:
name: CSpell
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Install Dependencies
run: npm ci --force
- name: Prettier
run: npm run cspell

8
.nycrc
View File

@ -1,9 +1,9 @@
{
"check-coverage": true,
"statements": 99.43,
"branches": 96.6,
"functions": 99.47,
"lines": 99.43,
"statements": 99.72,
"branches": 97.95,
"functions": 99.82,
"lines": 99.71,
"include": [
"src/**/*.ts"
],

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["streetsidesoftware.code-spell-checker", "dbaeumer.vscode-eslint"]
}

View File

@ -26,21 +26,21 @@
Here are examples of `docx` being used with basic `HTML/JS` in a browser environment:
* https://codepen.io/dolanmiu/pen/RwNeObg
* https://jsfiddle.net/dolanmiu/onadx1gu/
- https://codepen.io/dolanmiu/pen/RwNeObg
- https://jsfiddle.net/dolanmiu/onadx1gu/
Here is an example of `docx` working in `Angular`:
* https://stackblitz.com/edit/angular-docx
- https://stackblitz.com/edit/angular-docx
Here is an example of `docx` working in `React`:
* https://stackblitz.com/edit/react-docx
* https://stackblitz.com/edit/react-docx-images (adding images to Word Document)
- https://stackblitz.com/edit/react-docx
- https://stackblitz.com/edit/react-docx-images (adding images to Word Document)
Here is an example of `docx` working in `Vue.js`:
* https://stackblitz.com/edit/vuejs-docx
- https://stackblitz.com/edit/vuejs-docx
## Node
@ -48,15 +48,15 @@ Press `endpoint` on the `RunKit` website:
![RunKit Instructions](https://user-images.githubusercontent.com/2917613/38582539-f84311b6-3d07-11e8-90db-5885ae02c3c4.png)
* https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text
* https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text
* https://runkit.com/dolanmiu/docx-demo3 - Bullet points
* https://runkit.com/dolanmiu/docx-demo4 - Simple table
* https://runkit.com/dolanmiu/docx-demo5 - Images
* https://runkit.com/dolanmiu/docx-demo6 - Margins
* https://runkit.com/dolanmiu/docx-demo7 - Landscape
* https://runkit.com/dolanmiu/docx-demo8 - Header and Footer
* https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**
- https://runkit.com/dolanmiu/docx-demo1 - Simple paragraph and text
- https://runkit.com/dolanmiu/docx-demo2 - Advanced Paragraphs and text
- https://runkit.com/dolanmiu/docx-demo3 - Bullet points
- https://runkit.com/dolanmiu/docx-demo4 - Simple table
- https://runkit.com/dolanmiu/docx-demo5 - Images
- https://runkit.com/dolanmiu/docx-demo6 - Margins
- https://runkit.com/dolanmiu/docx-demo7 - Landscape
- https://runkit.com/dolanmiu/docx-demo8 - Header and Footer
- https://runkit.com/dolanmiu/docx-demo10 - **My CV generated with docx**
More [here](https://github.com/dolanmiu/docx/tree/master/demo)
@ -88,7 +88,6 @@ Read the contribution guidelines [here](https://docx.js.org/#/contribution-guide
[<img src="https://i.imgur.com/PXo25um.png" alt="drawing" height="50"/>](https://www.circadianrisk.com/)
[<img src="https://i.imgur.com/AKGhtlh.png" alt="drawing"/>](https://lexense.com/)
...and many more!
---

View File

@ -43,7 +43,7 @@ interface Skill {
readonly name: string;
}
interface Achivement {
interface Achievement {
readonly issuer: string;
readonly name: string;
}
@ -64,7 +64,7 @@ const experiences: Experience[] = [
{
isCurrent: false,
summary:
"Full-stack developer working with Angular, Node and TypeScript. Working for the iShares platform. Emphasis on Dev-ops and developing the continous integration pipeline.",
"Full-stack developer working with Angular, Node and TypeScript. Working for the iShares platform. Emphasis on Dev-ops and developing the continuous integration pipeline.",
title: "Software Developer",
endDate: {
month: 11,
@ -98,6 +98,7 @@ const experiences: Experience[] = [
{
isCurrent: false,
summary:
// cspell:disable-next-line
"Develop web commerce platforms for various high profile clients.\n\nCreated a log analysis web application with the Play Framework in Java, incorporating Test Driven Development. It asynchronously uploads and processes large (2 GB) log files, and outputs meaningful results in context with the problem. \n\nAnalysis and development of the payment system infrastructure and user accounts section to be used by several clients of the company such as Waitrose, Tally Weijl, DJ Sports, Debenhams, Ann Summers, John Lewis and others.\n\nTechnologies used include WebSphere Commerce, Java, JavaScript and JSP.",
title: "Java Developer",
endDate: {
@ -118,7 +119,7 @@ const education: Education[] = [
{
degree: "Master of Science (MSc)",
fieldOfStudy: "Computer Science",
notes: "Exam Results: 1st Class with Distinction, Dissertation: 1st Class with Distinction\n\nRelevant Courses: Java and C# Programming, Software Engineering, Artificial Intelligence, \nComputational Photography, Algorithmics, Architecture and Hardware.\n\nCreated a Windows 8 game in JavaScript for the dissertation. \n\nCreated an award-winning 3D stereoscopic game in C# using XNA.",
notes: "Exam Results: 1st Class with Distinction, Dissertation: 1st Class with Distinction\n\nRelevant Courses: Java and C# Programming, Software Engineering, Artificial Intelligence, \nComputational Photography, Algorithms, Architecture and Hardware.\n\nCreated a Windows 8 game in JavaScript for the dissertation. \n\nCreated an award-winning 3D stereoscopic game in C# using XNA.",
schoolName: "University College London",
startDate: {
year: 2012,
@ -156,7 +157,7 @@ const skills: Skill[] = [
},
];
const achievements: Achivement[] = [
const achievements: Achievement[] = [
{
issuer: "Oracle",
name: "Oracle Certified Expert",
@ -165,7 +166,7 @@ const achievements: Achivement[] = [
class DocumentCreator {
// tslint:disable-next-line: typedef
public create([experiences, educations, skills, achivements]: [Experience[], Education[], Skill[], Achivement[]]): Document {
public create([experiences, educations, skills, achievements]: [Experience[], Education[], Skill[], Achievement[]]): Document {
const document = new Document({
sections: [
{
@ -221,7 +222,7 @@ class DocumentCreator {
this.createSubHeading("Skills"),
this.createSkillList(skills),
this.createSubHeading("Achievements"),
...this.createAchivementsList(achivements),
...this.createAchievementsList(achievements),
this.createSubHeading("Interests"),
this.createInterests("Programming, Technology, Music Production, Web Design, 3D Modelling, Dancing."),
this.createHeading("References"),
@ -318,8 +319,8 @@ class DocumentCreator {
}
// tslint:disable-next-line:no-any
public createAchivementsList(achivements: any[]): Paragraph[] {
return achivements.map(
public createAchievementsList(achievements: any[]): Paragraph[] {
return achievements.map(
(achievement) =>
new Paragraph({
text: achievement.name,

View File

@ -52,18 +52,20 @@ const table = new Table({
});
const doc = new Document({
numbering:{
config:[{
reference: 'ref1',
levels: [
numbering: {
config: [
{
level: 0,
format: LevelFormat.DECIMAL,
text: '%1)',
start: 50,
}
],
}]
reference: "ref1",
levels: [
{
level: 0,
format: LevelFormat.DECIMAL,
text: "%1)",
start: 50,
},
],
},
],
},
styles: {
default: {
@ -184,11 +186,11 @@ const doc = new Document({
spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 },
rightTabStop: TabStopPosition.MAX,
leftTabStop: 453.543307087,
numbering : {
reference: 'ref1',
numbering: {
reference: "ref1",
instance: 0,
level: 0,
}
},
},
},
],

View File

@ -18,10 +18,15 @@ const doc = new Document({
new Paragraph({
children: [
new TextRun({
children: ["Hello", new FootnoteReferenceRun(1)],
children: ["Hello"],
}),
new FootnoteReferenceRun(1),
new TextRun({
children: [" World!", new FootnoteReferenceRun(2)],
children: [" World!"],
}),
new FootnoteReferenceRun(2),
new TextRun({
children: [" GitHub!"],
}),
],
}),
@ -35,15 +40,17 @@ const doc = new Document({
new Paragraph({
children: [
new TextRun({
children: ["Hello", new FootnoteReferenceRun(4)],
children: ["Hello"],
}),
new FootnoteReferenceRun(4),
new TextRun({
children: [" World!", new FootnoteReferenceRun(5)],
children: [" World!"],
}),
new FootnoteReferenceRun(5),
],
}),
new Paragraph({
children: [new TextRun("Hello World"), new FootnoteReferenceRun(6)],
children: [new TextRun("Hello World Again"), new FootnoteReferenceRun(6)],
}),
],
},

View File

@ -1,4 +1,4 @@
// Example on how to customise the look at feel using Styles
// 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 {

View File

@ -1,9 +1,21 @@
// 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 "../build";
const LOREM_IPSUM =
/* cspell:disable-next-line */
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam mi velit, convallis convallis scelerisque nec, faucibus nec leo. Phasellus at posuere mauris, tempus dignissim velit. Integer et tortor dolor. Duis auctor efficitur mattis. Vivamus ut metus accumsan tellus auctor sollicitudin venenatis et nibh. Cras quis massa ac metus fringilla venenatis. Proin rutrum mauris purus, ut suscipit magna consectetur id. Integer consectetur sollicitudin ante, vitae faucibus neque efficitur in. Praesent ultricies nibh lectus. Mauris pharetra id odio eget iaculis. Duis dictum, risus id pellentesque rutrum, lorem quam malesuada massa, quis ullamcorper turpis urna a diam. Cras vulputate metus vel massa porta ullamcorper. Etiam porta condimentum nulla nec tristique. Sed nulla urna, pharetra non tortor sed, sollicitudin molestie diam. Maecenas enim leo, feugiat eget vehicula id, sollicitudin vitae ante.";
const doc = new Document({

View File

@ -34,8 +34,7 @@ const doc = new Document({
new TableCell({
children: [
new Paragraph({
text:
"Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
text: "Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
heading: HeadingLevel.HEADING_1,
}),
],

View File

@ -1,9 +1,15 @@
// Add image to table cell
// 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, ImageRun, Packer, Paragraph, Table, TableCell, TableRow, WidthType } from "../build";
const imageBase64Data = `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`;
const table = new Table({
width: {
size: 8640,
type: WidthType.DXA,
},
rows: [
new TableRow({
children: [
@ -17,7 +23,19 @@ const table = new Table({
children: [],
}),
new TableCell({
children: [],
children: [
new Paragraph({
children: [
new ImageRun({
data: Buffer.from(imageBase64Data, "base64"),
transformation: {
width: 100,
height: 100,
},
}),
],
}),
],
}),
],
}),
@ -27,7 +45,19 @@ const table = new Table({
children: [],
}),
new TableCell({
children: [],
children: [
new Paragraph({
children: [
new ImageRun({
data: fs.readFileSync("./demo/images/image1.jpeg"),
transformation: {
width: 100,
height: 100,
},
}),
],
}),
],
}),
new TableCell({
children: [],

View File

@ -123,8 +123,7 @@ const noBorderTable = new Table({
new TableCell({
children: [
new Paragraph({
text:
"Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
text: "Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
heading: HeadingLevel.HEADING_1,
}),
],

View File

@ -43,8 +43,7 @@ const doc = new Document({
style: "strong",
}),
new TextRun({
text:
" - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
text: " - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
}),
],
}),

View File

@ -16,6 +16,7 @@ import {
MathSubScript,
MathSubSuperScript,
MathSum,
MathIntegral,
MathSuperScript,
Packer,
Paragraph,
@ -90,6 +91,35 @@ const doc = new Document({
}),
],
}),
new Paragraph({
children: [
new Math({
children: [
new MathIntegral({
children: [new MathRun("test")],
}),
new MathIntegral({
children: [
new MathSuperScript({
children: [new MathRun("e")],
superScript: [new MathRun("2")],
}),
],
subScript: [new MathRun("i")],
}),
new MathIntegral({
children: [
new MathRadical({
children: [new MathRun("i")],
}),
],
subScript: [new MathRun("i")],
superScript: [new MathRun("10")],
}),
],
}),
],
}),
new Paragraph({
children: [
new Math({

View File

@ -121,7 +121,7 @@ const doc = new Document({
author: "Firstname Lastname",
date: "2020-10-06T09:05:00Z",
bold: false,
}
},
}),
],
}),

View File

@ -4,7 +4,7 @@ import * as fs from "fs";
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "../build";
const doc = new Document({
creator: 'Me',
creator: "Me",
sections: [
{
properties: {},

View File

@ -13,11 +13,13 @@ const doc = new Document({
},
},
children: [
new Paragraph({ children: [
new TextRun('This text will be in the first column.'),
new ColumnBreak(),
new TextRun('This text will be in the second column.'),
] }),
new Paragraph({
children: [
new TextRun("This text will be in the first column."),
new ColumnBreak(),
new TextRun("This text will be in the second column."),
],
}),
],
},
],

30
demo/74-nodejs-stream.ts Normal file
View File

@ -0,0 +1,30 @@
// 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, TextRun } from "../build";
const doc = new Document({
sections: [
{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: "Foo Bar",
bold: true,
}),
new TextRun({
text: "\tGithub is the best",
bold: true,
}),
],
}),
],
},
],
});
const stream = Packer.toStream(doc);
stream.pipe(fs.createWriteStream("My Document.docx"));

80
demo/75-tab-stops.ts Normal file
View File

@ -0,0 +1,80 @@
// Exporting the document as a stream
// 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";
const columnWidth = TabStopPosition.MAX / 4;
const receiptTabStops = [
// no need to define first left tab column
// the right aligned tab column position should point to the end of column
// i.e. in this case
// (end position of 1st) + (end position of current)
// columnWidth + columnWidth = columnWidth * 2
{ 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 doc = new Document({
sections: [
{
properties: {},
children: [
new Paragraph({
heading: HeadingLevel.HEADING_1,
children: [new TextRun("Receipt 001")],
}),
new Paragraph({
tabStops: twoTabStops,
children: [
new TextRun({
text: "To Bob.\tBy Alice.",
bold: true,
}),
],
}),
new Paragraph({
tabStops: twoTabStops,
children: [new TextRun("Foo Inc\tBar Inc")],
}),
new Paragraph({ text: "" }),
new Paragraph({
tabStops: receiptTabStops,
children: [
new TextRun({
text: "Item\tPrice\tQuantity\tSub-total",
bold: true,
}),
],
}),
new Paragraph({
tabStops: receiptTabStops,
text: "Item 3\t10\t5\t50",
}),
new Paragraph({
tabStops: receiptTabStops,
text: "Item 3\t10\t5\t50",
}),
new Paragraph({
tabStops: receiptTabStops,
text: "Item 3\t10\t5\t50",
}),
new Paragraph({
tabStops: receiptTabStops,
children: [
new TextRun({
text: "\t\t\tTotal: 200",
bold: true,
}),
],
}),
],
},
],
});
const stream = Packer.toStream(doc);
stream.pipe(fs.createWriteStream("My Document.docx"));

View File

@ -27,24 +27,26 @@ import { Document, Packer, Paragraph, TextRun } from "docx";
// Documents contain sections, you can have multiple sections per document, go here to learn more about sections
// This simple example will only contain one section
const doc = new Document({
sections: [{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: "Foo Bar",
bold: true,
}),
new TextRun({
text: "\tGithub is the best",
bold: true,
}),
],
}),
],
}],
sections: [
{
properties: {},
children: [
new Paragraph({
children: [
new TextRun("Hello World"),
new TextRun({
text: "Foo Bar",
bold: true,
}),
new TextRun({
text: "\tGithub is the best",
bold: true,
}),
],
}),
],
},
],
});
// Used to export the file into a .docx file
@ -56,6 +58,7 @@ Packer.toBuffer(doc).then((buffer) => {
```
<p align="center">
<!-- cspell:disable-next-line -->
<img alt="clippy the assistant" src="./clippy.png">
</p>

View File

@ -1,37 +1,39 @@
* [Getting Started](/)
- [Getting Started](/)
* [Examples](https://github.com/dolanmiu/docx/tree/master/demo)
- [Examples](https://github.com/dolanmiu/docx/tree/master/demo)
* API
- API
* [Documentation](https://docx.js.org/api/)
- [Documentation](https://docx.js.org/api/)
* Usage
- Usage
* [Document](usage/document.md)
* [Sections](usage/sections.md)
* [Paragraph](usage/paragraph.md)
* [Text](usage/text.md)
* [Image](usage/images.md)
* [Headers & Footers](usage/headers-and-footers.md)
* [Bullet Points](usage/bullet-points.md)
* [Hyperlinks](usage/hyperlinks.md)
* [Numbering](usage/numbering.md)
* [Tables](usage/tables.md)
* [Tab Stops](usage/tab-stops.md)
* [Table of Contents](usage/table-of-contents.md)
* [Page Numbers](usage/page-numbers.md)
* [Change Tracking](usage/change-tracking.md)
* [Math](usage/math.md)
* [Text Frames](usage/text-frames.md)
* Styling
* [Styling with JS](usage/styling-with-js.md)
* [Styling with XML](usage/styling-with-xml.md)
* Exporting
- [Document](usage/document.md)
- [Sections](usage/sections.md)
- [Paragraph](usage/paragraph.md)
- [Text](usage/text.md)
- [Image](usage/images.md)
- [Headers & Footers](usage/headers-and-footers.md)
- [Bullet Points](usage/bullet-points.md)
- [Hyperlinks](usage/hyperlinks.md)
- [Numbering](usage/numbering.md)
- [Tables](usage/tables.md)
- [Tab Stops](usage/tab-stops.md)
- [Table of Contents](usage/table-of-contents.md)
- [Page Numbers](usage/page-numbers.md)
- [Change Tracking](usage/change-tracking.md)
- [Math](usage/math.md)
- [Text Frames](usage/text-frames.md)
- Styling
_ [Styling with JS](usage/styling-with-js.md)
_ [Styling with XML](usage/styling-with-xml.md)
* [Packers](usage/packers.md)
* Utility
- Exporting
* [Convenience functions](usage/convenience-functions.md)
- [Packers](usage/packers.md)
* [Contribution Guidelines](contribution-guidelines.md)
- Utility
- [Convenience functions](usage/convenience-functions.md)
- [Contribution Guidelines](contribution-guidelines.md)

View File

@ -8,11 +8,11 @@
- Follow Prettier standards, and consider using the [Prettier VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) plugin.
- Follow the `TSLint` rules
- Follow the `ESLint` rules
## Always think about the user
Put yourself in their position, and imagine how they would feel about your feature you wrote.
Put yourself in their position, and imagine how they would feel about the feature you wrote.
1. Is it easy to use?
2. Has it been documented well?
@ -26,13 +26,15 @@ Please write good commit messages when making a commit: https://chris.beams.io/p
**Do not:**
<!-- cspell:disable -->
```
c // What?
rtl // Adding acryonyms without explaining anything else is not helpful
rtl // Adding acronyms without explaining anything else is not helpful
works! // Glad its working, but the message is not helpful
demo updated // Getting better, but capitalize the first letter
Unesesary coment removed // Make sure to use correct spelling
```
<!-- cspell:enable -->
**Do**
@ -42,9 +44,9 @@ Unesesary coment removed // Make sure to use correct spelling
public float(tableFloatOptions: ITableFloatOptions): Table
```
## Delcariative API
## Declarative API
Make sure the API is declarative, so no _method calling_ or _mutation_. This is a design decision, consistent with the rest of the project. There are benefits to delcariative code over other styles of code, explained here: https://dzone.com/articles/why-declarative-coding-makes-you-a-better-programm
Make sure the API is declarative, so no _method calling_ or _mutation_. This is a design decision, consistent with the rest of the project. There are benefits to declarative code over other styles of code, explained here: https://dzone.com/articles/why-declarative-coding-makes-you-a-better-programm
**Do not:**

View File

@ -16,6 +16,7 @@
<body>
<div id="app"></div>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1/index.min.js"></script>
<script>
window.$docsify = {
name: "docx",
@ -24,6 +25,12 @@
subMaxLevel: 2,
search: "auto",
coverpage: true,
plugins: [
// Change to your Carbon property ID
// cSpell:disable
DocsifyCarbon.create("CEAIP237", "docx"),
// cSpell:enable
],
};
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>

View File

@ -37,7 +37,7 @@ sub-sublists, etc. Each level includes the following properties:
numbers from each numbering level before this one. Thus a level
text of `%d)` with a number format of `lowerLetter` would result in
the sequence "a)", "b)", ...
* and a few others, which you can see in the OXML spec section 17.9.6
* and a few others, which you can see in the OOXML spec section 17.9.6
## Document-level bullets/numbering definitions (concrete)
@ -86,3 +86,34 @@ topLevelP.setNumbering(concrete, 0);
subP.setNumbering(concrete, 1);
subSubP.setNumbering(concrete, 2);
```
## Unindent numbering
Default:1. test
After:1.test
Use default numbering have indent,If you want unindent numbering
How to custom number see the demo:
https://runkit.com/dolanmiu/docx-demo3
```ts
enum LevelSuffix {
NOTHING = "nothing",
SPACE = "space",
TAB = "tab"
}
// custom numbering
const levels=[
{
level: 0,
format: "decimal",
text: "%1.",
alignment: AlignmentType.START,
suffix: LevelSuffix.NOTHING, // Cancel intent
}]
```

View File

@ -111,7 +111,7 @@ const paragraph = new Paragraph({
## Border
Add borders to a `Paragraph`. Good for making the `Paragraph` stand out
Add borders to a `Paragraph`. Good for making the `Paragraph` stand out. Border top and border bottom can be used as a horizontal rule (also known as horizontal line).
#### IBorderPropertyOptions
@ -121,7 +121,7 @@ Add borders to a `Paragraph`. Good for making the `Paragraph` stand out
| -------- | -------- | -------- |
| color | `string` | Required |
| space | `number` | Required |
| value | `string` | Required |
| style | `string` | Required |
| size | `number` | Required |
**Example:**
@ -135,13 +135,13 @@ const paragraph = new Paragraph({
top: {
color: "auto",
space: 1,
value: "single",
style: "single",
size: 6,
},
bottom: {
color: "auto",
space: 1,
value: "single",
style: "single",
size: 6,
},
},

View File

@ -146,7 +146,7 @@ const doc = new Document({
});
```
**Note**: If you are using the `.headingX` or `.title` methods of paragraphs, you must make sure to define `HeadingX` or `Title` styles for these. Otherwise they'll show up unstyled :(. If you are using the `.bullet` or `.setNumbering` methods, you need to define a `ListParagraph` style or the numbers may not show up.
**Note**: If you are using the `.headingX` or `.title` methods of paragraphs, you must make sure to define `HeadingX` or `Title` styles for these. Otherwise they'll show up un-styled :(. If you are using the `.bullet` or `.setNumbering` methods, you need to define a `ListParagraph` style or the numbers may not show up.
### Document defaults
@ -199,7 +199,7 @@ For these properties, the rules state the following conflict resolution in case
## Examples
### Declaritive styles
### Declarative styles
Importing Images from file system path

7250
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "docx",
"version": "7.4.0",
"version": "7.6.0",
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
"main": "build/index.js",
"scripts": {
@ -9,13 +9,14 @@
"test.coverage": "nyc npm test",
"test.watch": "npm test -- --watch",
"prepublishOnly": "npm run build --production",
"lint": "tslint --project .",
"lint": "eslint -c .eslintrc.js --ext .ts src",
"build": "npm run webpack && npm run fix-types",
"webpack": "rimraf ./build && webpack --config ./webpack.config.ts",
"demo": "npm run build && npm run ts-node --skip-project ./demo",
"typedoc": "rimraf ./build && typedoc src/index.ts --tsconfig tsconfig.typedoc.json",
"style": "prettier -l \"src/**/*.ts\"",
"style": "prettier -l \"{src,scripts,demo}/**/*.{ts,html}\"",
"style.fix": "npm run style -- --write",
"cspell": "cspell \"{src,demo,docs,scripts}/**/*.{ts,scss,html,md}\" && cspell \"./*.*\"",
"fix-types": "ts-node --skip-project scripts/types-absolute-fixer.ts",
"e2e": "ts-node scripts/e2e.ts",
"serve.docs": "cd docs && docsify serve",
@ -63,17 +64,27 @@
"homepage": "https://github.com/dolanmiu/docx#readme",
"devDependencies": {
"@types/chai": "^4.2.15",
"@types/glob": "^7.1.4",
"@types/mocha": "^9.0.0",
"@types/glob": "^8.0.0",
"@types/mocha": "^10.0.0",
"@types/prompt": "^1.1.1",
"@types/request-promise": "^4.1.42",
"@types/shelljs": "^0.8.9",
"@types/sinon": "^10.0.0",
"@types/unzipper": "^0.10.4",
"@types/webpack": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^5.36.1",
"@typescript-eslint/parser": "^5.36.1",
"buffer": "^6.0.3",
"chai": "^3.5.0",
"cspell": "^6.2.2",
"docsify-cli": "^4.3.0",
"eslint": "^8.23.0",
"eslint-plugin-functional": "^4.3.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-unicorn": "^44.0.0",
"glob": "^8.0.1",
"jszip": "^3.1.5",
"mocha": "^10.0.0",
@ -92,11 +103,9 @@
"ts-loader": "^9.0.0",
"ts-node": "^10.2.1",
"tsconfig-paths": "^4.0.0",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"tslint": "^6.1.3",
"tslint-immutable": "^6.0.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typedoc": "^0.23.2",
"typescript": "4.7.4",
"typescript": "4.8.4",
"unzipper": "^0.10.11",
"webpack": "^5.28.0",
"webpack-cli": "^4.6.0"

View File

@ -1,7 +1,7 @@
import { IMediaData, Media } from "@file/media";
export class ImageReplacer {
public replace(xmlData: string, mediaData: IMediaData[], offset: number): string {
public replace(xmlData: string, mediaData: readonly IMediaData[], offset: number): string {
let currentXmlData = xmlData;
mediaData.forEach((image, i) => {
@ -11,7 +11,7 @@ export class ImageReplacer {
return currentXmlData;
}
public getMediaData(xmlData: string, media: Media): IMediaData[] {
public getMediaData(xmlData: string, media: Media): readonly IMediaData[] {
return media.Array.filter((image) => xmlData.search(`{${image.fileName}}`) > 0);
}
}

View File

@ -4,7 +4,8 @@ import * as sinon from "sinon";
import { File } from "@file/file";
import { Footer, Header } from "@file/header";
import { Paragraph } from "@file/paragraph";
import { ImageRun, Paragraph } from "@file/paragraph";
import * as convenienceFunctions from "@util/convenience-functions";
import { Compiler } from "./next-compiler";
@ -15,8 +16,16 @@ describe("Compiler", () => {
compiler = new Compiler();
});
before(() => {
sinon.stub(convenienceFunctions, "uniqueId").callsFake(() => "test");
});
after(() => {
(convenienceFunctions.uniqueId as sinon.SinonStub).restore();
});
describe("#compile()", () => {
it("should pack all the content", async function () {
it("should pack all the content", function () {
this.timeout(99999999);
const file = new File({
sections: [],
@ -44,7 +53,7 @@ describe("Compiler", () => {
expect(fileNames).to.include("_rels/.rels");
});
it("should pack all additional headers and footers", async function () {
it("should pack all additional headers and footers", function () {
const file = new File({
sections: [
{
@ -111,18 +120,38 @@ describe("Compiler", () => {
const spy = sinon.spy(compiler["formatter"], "format");
compiler.compile(file);
expect(spy.callCount).to.equal(12);
expect(spy.callCount).to.equal(13);
});
it("should work with media datas", () => {
// This test is required because before, there was a case where Document was formatted twice, which was inefficient
// This also caused issues such as running prepForXml multiple times as format() was ran multiple times.
const paragraph = new Paragraph("");
const file = new File({
sections: [
{
properties: {},
children: [paragraph],
headers: {
default: new Header({
children: [new Paragraph("test")],
}),
},
footers: {
default: new Footer({
children: [new Paragraph("test")],
}),
},
children: [
new Paragraph({
children: [
new ImageRun({
data: Buffer.from("", "base64"),
transformation: {
width: 100,
height: 100,
},
}),
],
}),
],
},
],
});

View File

@ -6,7 +6,7 @@ import { File } from "@file/file";
import { Formatter } from "../formatter";
import { ImageReplacer } from "./image-replacer";
import { NumberingReplacer } from "./numbering-replacer";
import { PrettityType } from "./packer";
import { PrettifyType } from "./packer";
interface IXmlifyedFile {
readonly data: string;
@ -20,10 +20,10 @@ interface IXmlifyedFileMapping {
readonly Numbering: IXmlifyedFile;
readonly Relationships: IXmlifyedFile;
readonly FileRelationships: IXmlifyedFile;
readonly Headers: IXmlifyedFile[];
readonly Footers: IXmlifyedFile[];
readonly HeaderRelationships: IXmlifyedFile[];
readonly FooterRelationships: IXmlifyedFile[];
readonly Headers: readonly IXmlifyedFile[];
readonly Footers: readonly IXmlifyedFile[];
readonly HeaderRelationships: readonly IXmlifyedFile[];
readonly FooterRelationships: readonly IXmlifyedFile[];
readonly ContentTypes: IXmlifyedFile;
readonly CustomProperties: IXmlifyedFile;
readonly AppProperties: IXmlifyedFile;
@ -38,24 +38,24 @@ export class Compiler {
private readonly imageReplacer: ImageReplacer;
private readonly numberingReplacer: NumberingReplacer;
constructor() {
public constructor() {
this.formatter = new Formatter();
this.imageReplacer = new ImageReplacer();
this.numberingReplacer = new NumberingReplacer();
}
public compile(file: File, prettifyXml?: boolean | PrettityType): JSZip {
public compile(file: File, prettifyXml?: boolean | PrettifyType): JSZip {
const zip = new JSZip();
const xmlifiedFileMapping = this.xmlifyFile(file, prettifyXml);
const map = new Map<string, IXmlifyedFile | IXmlifyedFile[]>(Object.entries(xmlifiedFileMapping));
const map = new Map<string, IXmlifyedFile | readonly IXmlifyedFile[]>(Object.entries(xmlifiedFileMapping));
for (const [, obj] of map) {
if (Array.isArray(obj)) {
for (const subFile of obj) {
for (const subFile of obj as readonly IXmlifyedFile[]) {
zip.file(subFile.path, subFile.data);
}
} else {
zip.file(obj.path, obj.data);
zip.file((obj as IXmlifyedFile).path, (obj as IXmlifyedFile).data);
}
}
@ -67,7 +67,7 @@ export class Compiler {
return zip;
}
private xmlifyFile(file: File, prettify?: boolean | PrettityType): IXmlifyedFileMapping {
private xmlifyFile(file: File, prettify?: boolean | PrettifyType): IXmlifyedFileMapping {
const documentRelationshipCount = file.Document.Relationships.RelationshipCount + 1;
const documentXmlData = xml(
@ -406,26 +406,19 @@ export class Compiler {
path: "word/settings.xml",
},
Comments: {
data: (() => {
if (!file.Comments) {
return;
}
const data = xml(
this.formatter.format(file.Comments, {
viewWrapper: file.Document,
file,
}),
{
indent: prettify,
declaration: {
standalone: "yes",
encoding: "UTF-8",
},
data: xml(
this.formatter.format(file.Comments, {
viewWrapper: file.Document,
file,
}),
{
indent: prettify,
declaration: {
standalone: "yes",
encoding: "UTF-8",
},
);
return data;
})(),
},
),
path: "word/comments.xml",
},
};

View File

@ -1,7 +1,7 @@
import { ConcreteNumbering } from "@file/numbering";
export class NumberingReplacer {
public replace(xmlData: string, concreteNumberings: ConcreteNumbering[]): string {
public replace(xmlData: string, concreteNumberings: readonly ConcreteNumbering[]): string {
let currentXmlData = xmlData;
for (const concreteNumbering of concreteNumberings) {

View File

@ -37,6 +37,14 @@ describe("Packer", () => {
});
});
describe("#toString()", () => {
it("should return a non-empty string", async () => {
const result = await Packer.toString(file);
assert.isAbove(result.length, 0);
});
});
describe("#toBuffer()", () => {
it("should create a standard docx file", async function () {
this.timeout(99999999);
@ -47,7 +55,7 @@ describe("Packer", () => {
});
it("should handle exception if it throws any", () => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const compiler = stub((Packer as any).compiler, "compile");
compiler.throwsException();
@ -57,7 +65,7 @@ describe("Packer", () => {
});
after(() => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(Packer as any).compiler.compile.restore();
});
});
@ -72,7 +80,7 @@ describe("Packer", () => {
});
it("should handle exception if it throws any", () => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const compiler = stub((Packer as any).compiler, "compile");
compiler.throwsException();
@ -82,14 +90,14 @@ describe("Packer", () => {
});
after(() => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(Packer as any).compiler.compile.restore();
});
});
describe("#toBlob()", () => {
it("should create a standard docx file", async () => {
// tslint:disable-next-line: no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
stub((Packer as any).compiler, "compile").callsFake(() => ({
// tslint:disable-next-line: no-empty
generateAsync: () => mock({}),
@ -100,7 +108,7 @@ describe("Packer", () => {
});
it("should handle exception if it throws any", () => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const compiler = stub((Packer as any).compiler, "compile");
compiler.throwsException();
@ -110,7 +118,57 @@ describe("Packer", () => {
});
afterEach(() => {
// tslint:disable-next-line:no-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(Packer as any).compiler.compile.restore();
});
});
describe("#toStream()", () => {
it("should create a standard docx file", async () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
stub((Packer as any).compiler, "compile").callsFake(() => ({
// tslint:disable-next-line: no-empty
generateNodeStream: () => ({
on: (event: string, cb: () => void) => {
if (event === "end") {
cb();
}
},
}),
}));
const stream = await Packer.toStream(file);
return new Promise((resolve, reject) => {
stream.on("error", () => {
reject(new Error());
});
stream.on("end", () => {
resolve();
});
});
});
it("should handle exception if it throws any", () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const compiler = stub((Packer as any).compiler, "compile").callsFake(() => ({
// tslint:disable-next-line: no-empty
on: (event: string, cb: () => void) => {
if (event === "error") {
cb();
}
},
}));
compiler.throwsException();
try {
Packer.toStream(file);
} catch (error) {
assert.isDefined(error);
}
});
afterEach(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(Packer as any).compiler.compile.restore();
});
});

View File

@ -1,3 +1,4 @@
import { Stream } from "stream";
import { File } from "@file/file";
import { Compiler } from "./next-compiler";
@ -5,7 +6,7 @@ import { Compiler } from "./next-compiler";
/**
* Use blanks to prettify
*/
export enum PrettityType {
export enum PrettifyType {
NONE = "",
WITH_2_BLANKS = " ",
WITH_4_BLANKS = " ",
@ -13,7 +14,18 @@ export enum PrettityType {
}
export class Packer {
public static async toBuffer(file: File, prettify?: boolean | PrettityType): Promise<Buffer> {
public static async toString(file: File, prettify?: boolean | PrettifyType): Promise<string> {
const zip = this.compiler.compile(file, prettify);
const zipData = await zip.generateAsync({
type: "string",
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
compression: "DEFLATE",
});
return zipData;
}
public static async toBuffer(file: File, prettify?: boolean | PrettifyType): Promise<Buffer> {
const zip = this.compiler.compile(file, prettify);
const zipData = await zip.generateAsync({
type: "nodebuffer",
@ -24,7 +36,7 @@ export class Packer {
return zipData;
}
public static async toBase64String(file: File, prettify?: boolean | PrettityType): Promise<string> {
public static async toBase64String(file: File, prettify?: boolean | PrettifyType): Promise<string> {
const zip = this.compiler.compile(file, prettify);
const zipData = await zip.generateAsync({
type: "base64",
@ -35,7 +47,7 @@ export class Packer {
return zipData;
}
public static async toBlob(file: File, prettify?: boolean | PrettityType): Promise<Blob> {
public static async toBlob(file: File, prettify?: boolean | PrettifyType): Promise<Blob> {
const zip = this.compiler.compile(file, prettify);
const zipData = await zip.generateAsync({
type: "blob",
@ -46,5 +58,17 @@ export class Packer {
return zipData;
}
public static toStream(file: File, prettify?: boolean | PrettifyType): Stream {
const zip = this.compiler.compile(file, prettify);
const zipData = zip.generateNodeStream({
type: "nodebuffer",
streamFiles: true,
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
compression: "DEFLATE",
});
return zipData;
}
private static readonly compiler = new Compiler();
}

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { AppPropertiesAttributes } from "./app-properties-attributes";
export class AppProperties extends XmlComponent {
constructor() {
public constructor() {
super("Properties");
this.root.push(

View File

@ -33,7 +33,7 @@ export interface IBorderOptions {
}
export class BorderElement extends XmlComponent {
constructor(elementName: string, { color, size, space, style }: IBorderOptions) {
public constructor(elementName: string, { color, size, space, style }: IBorderOptions) {
super(elementName);
this.root.push(
new BordersAttributes({

View File

@ -4,7 +4,7 @@ import { Default } from "./default/default";
import { Override } from "./override/override";
export class ContentTypes extends XmlComponent {
constructor() {
public constructor() {
super("Types");
this.root.push(

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { DefaultAttributes } from "./default-attributes";
export class Default extends XmlComponent {
constructor(contentType: string, extension?: string) {
public constructor(contentType: string, extension?: string) {
super("Default");
this.root.push(

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { OverrideAttributes } from "./override-attributes";
export class Override extends XmlComponent {
constructor(contentType: string, partName?: string) {
public constructor(contentType: string, partName?: string) {
super("Override");
this.root.push(

View File

@ -12,7 +12,7 @@ import { Paragraph } from "../paragraph";
import { IStylesOptions } from "../styles";
export interface IPropertiesOptions {
readonly sections: ISectionOptions[];
readonly sections: readonly ISectionOptions[];
readonly title?: string;
readonly subject?: string;
readonly creator?: string;
@ -26,7 +26,7 @@ export interface IPropertiesOptions {
readonly comments?: ICommentsOptions;
readonly footnotes?: {
readonly [key: string]: {
readonly children: Paragraph[];
readonly children: readonly Paragraph[];
};
};
readonly background?: IDocumentBackgroundOptions;
@ -35,12 +35,13 @@ export interface IPropertiesOptions {
readonly updateFields?: boolean;
};
readonly compatabilityModeVersion?: number;
readonly customProperties?: ICustomPropertyOptions[];
readonly customProperties?: readonly ICustomPropertyOptions[];
readonly evenAndOddHeaderAndFooters?: boolean;
}
// <xs:element name="coreProperties" type="CT_CoreProperties"/>
/* cSpell:disable */
// <xs:complexType name="CT_CoreProperties">
// <xs:all>
// <xs:element name="category" minOccurs="0" maxOccurs="1" type="xs:string"/>
@ -60,9 +61,10 @@ export interface IPropertiesOptions {
// <xs:element name="version" minOccurs="0" maxOccurs="1" type="xs:string"/>
// </xs:all>
// </xs:complexType>
/* cSpell:enable */
export class CoreProperties extends XmlComponent {
constructor(options: Omit<IPropertiesOptions, "sections">) {
public constructor(options: Omit<IPropertiesOptions, "sections">) {
super("cp:coreProperties");
this.root.push(
new DocumentAttributes({
@ -100,7 +102,7 @@ export class CoreProperties extends XmlComponent {
}
class TimestampElement extends XmlComponent {
constructor(name: string) {
public constructor(name: string) {
super(name);
this.root.push(
new DocumentAttributes({

View File

@ -3,11 +3,12 @@ import { CustomPropertiesAttributes } from "./custom-properties-attributes";
import { CustomProperty, ICustomPropertyOptions } from "./custom-property";
export class CustomProperties extends XmlComponent {
// tslint:disable-next-line:readonly-keyword
// eslint-disable-next-line functional/prefer-readonly-type
private nextId: number;
// eslint-disable-next-line functional/prefer-readonly-type
private readonly properties: CustomProperty[] = [];
constructor(properties: ICustomPropertyOptions[]) {
public constructor(properties: readonly ICustomPropertyOptions[]) {
super("Properties");
this.root.push(
@ -32,6 +33,7 @@ export class CustomProperties extends XmlComponent {
}
public addCustomProperty(property: ICustomPropertyOptions): void {
// eslint-disable-next-line functional/immutable-data
this.properties.push(new CustomProperty(this.nextId++, property));
}
}

View File

@ -7,7 +7,7 @@ export interface ICustomPropertyOptions {
}
export class CustomProperty extends XmlComponent {
constructor(id: number, properties: ICustomPropertyOptions) {
public constructor(id: number, properties: ICustomPropertyOptions) {
super("property");
this.root.push(
new CustomPropertyAttributes({
@ -21,7 +21,7 @@ export class CustomProperty extends XmlComponent {
}
export class CustomPropertyValue extends XmlComponent {
constructor(value: string) {
public constructor(value: string) {
super("vt:lpwstr");
this.root.push(value);
}

View File

@ -7,9 +7,7 @@ describe("DocumentWrapper", () => {
it("should create", () => {
const file = new DocumentWrapper({ background: {} });
// tslint:disable-next-line: no-unused-expression
expect(file.View).to.be.ok;
// tslint:disable-next-line: no-unused-expression
expect(file.Relationships).to.be.ok;
});
});

View File

@ -13,7 +13,7 @@ export class DocumentWrapper implements IViewWrapper {
private readonly document: Document;
private readonly relationships: Relationships;
constructor(options: IDocumentOptions) {
public constructor(options: IDocumentOptions) {
this.document = new Document(options);
this.relationships = new Relationships();
}

View File

@ -4,9 +4,10 @@ import { IContext, IXmlableObject, XmlComponent } from "@file/xml-components";
import { ISectionPropertiesOptions, SectionProperties } from "./section-properties/section-properties";
export class Body extends XmlComponent {
// eslint-disable-next-line functional/prefer-readonly-type
private readonly sections: SectionProperties[] = [];
constructor() {
public constructor() {
super("w:body");
}
@ -16,6 +17,7 @@ export class Body extends XmlComponent {
* The spec says:
* - section element should be in the last paragraph of the section
* - last section should be direct child of body
*
* @param options new section options
*/
public addSection(options: ISectionPropertiesOptions): void {

View File

@ -14,7 +14,7 @@ export class ColumnAttributes extends XmlAttributeComponent<IColumnAttributes> {
}
export class Column extends XmlComponent {
constructor({ width, space }: IColumnAttributes) {
public constructor({ width, space }: IColumnAttributes) {
super("w:col");
this.root.push(
new ColumnAttributes({

View File

@ -13,6 +13,13 @@ describe("Columns", () => {
expect(tree["w:cols"]).to.deep.equal({ _attr: { "w:num": 3, "w:space": 720 } });
});
it("should create set space and count to undefined if they are undefined", () => {
const columns = new Columns({});
const tree = new Formatter().format(columns);
expect(tree["w:cols"]).to.deep.equal({ _attr: {} });
});
it("should ignore individual column attributes if equalWidth is true", () => {
const unequalColumns = [new Column({ width: 1000, space: 400 }), new Column({ width: 2000 })];
const columns = new Columns({ count: 3, space: 720, equalWidth: true, children: unequalColumns });

View File

@ -17,7 +17,7 @@ export interface IColumnsAttributes {
readonly count?: number;
readonly separate?: boolean;
readonly equalWidth?: boolean;
readonly children?: Column[];
readonly children?: readonly Column[];
}
export class ColumnsAttributes extends XmlAttributeComponent<IColumnsAttributes> {
@ -30,7 +30,7 @@ export class ColumnsAttributes extends XmlAttributeComponent<IColumnsAttributes>
}
export class Columns extends XmlComponent {
constructor({ space, count, separate, equalWidth, children }: IColumnsAttributes) {
public constructor({ space, count, separate, equalWidth, children }: IColumnsAttributes) {
super("w:cols");
this.root.push(
new ColumnsAttributes({

View File

@ -38,7 +38,7 @@ export class DocGridAttributes extends XmlAttributeComponent<IDocGridAttributesP
}
export class DocumentGrid extends XmlComponent {
constructor(linePitch: number, charSpace?: number, type?: DocumentGridType) {
public constructor(linePitch: number, charSpace?: number, type?: DocumentGridType) {
super("w:docGrid");
this.root.push(

View File

@ -52,7 +52,7 @@ export enum HeaderFooterType {
FOOTER = "w:footerReference",
}
export class HeaderFooterReference extends XmlComponent {
constructor(type: HeaderFooterType, options: IHeaderFooterOptions) {
public constructor(type: HeaderFooterType, options: IHeaderFooterOptions) {
super(type);
this.root.push(

View File

@ -39,7 +39,7 @@ export class LineNumberAttributes extends XmlAttributeComponent<ILineNumberAttri
}
export class LineNumberType extends XmlComponent {
constructor({ countBy, start, restart, distance }: ILineNumberAttributes) {
public constructor({ countBy, start, restart, distance }: ILineNumberAttributes) {
super("w:lnNumType");
this.root.push(
new LineNumberAttributes({

View File

@ -71,7 +71,7 @@ class PageBordersAttributes extends XmlAttributeComponent<IPageBorderAttributes>
// <xsd:attribute name="offsetFrom" type="ST_PageBorderOffset" use="optional" default="text"/>
// </xsd:complexType>
export class PageBorders extends IgnoreIfEmptyXmlComponent {
constructor(options?: IPageBordersOptions) {
public constructor(options?: IPageBordersOptions) {
super("w:pgBorders");
if (!options) {

View File

@ -33,7 +33,7 @@ export class PageMarginAttributes extends XmlAttributeComponent<IPageMarginAttri
}
export class PageMargin extends XmlComponent {
constructor(
public constructor(
top: number | string,
right: number | string,
bottom: number | string,

View File

@ -41,7 +41,7 @@ export class PageNumberTypeAttributes extends XmlAttributeComponent<IPageNumberT
};
}
export class PageNumberType extends XmlComponent {
constructor({ start, formatType, separator }: IPageNumberTypeAttributes) {
public constructor({ start, formatType, separator }: IPageNumberTypeAttributes) {
super("w:pgNumType");
this.root.push(
new PageNumberTypeAttributes({

View File

@ -33,7 +33,7 @@ export class PageSizeAttributes extends XmlAttributeComponent<IPageSizeAttribute
}
export class PageSize extends XmlComponent {
constructor(width: number | string, height: number | string, orientation: PageOrientation) {
public constructor(width: number | string, height: number | string, orientation: PageOrientation) {
super("w:pgSz");
const flip = orientation === PageOrientation.LANDSCAPE;

View File

@ -10,7 +10,7 @@ class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val:
}
export class PageTextDirection extends XmlComponent {
constructor(value: PageTextDirectionType) {
public constructor(value: PageTextDirectionType) {
super("w:textDirection");
this.root.push(

View File

@ -30,7 +30,7 @@ export class SectionTypeAttributes extends XmlAttributeComponent<{
}
export class Type extends XmlComponent {
constructor(value: SectionType) {
public constructor(value: SectionType) {
super("w:type");
this.root.push(new SectionTypeAttributes({ val: value }));
}

View File

@ -92,7 +92,7 @@ export const sectionPageSizeDefaults = {
};
export class SectionProperties extends XmlComponent {
constructor({
public constructor({
page: {
size: {
width = sectionPageSizeDefaults.WIDTH,

View File

@ -1,5 +1,6 @@
import { XmlAttributeComponent } from "@file/xml-components";
/* cSpell:disable */
export interface IDocumentAttributesProperties {
readonly wpc?: string;
readonly mc?: string;
@ -41,6 +42,7 @@ export interface IDocumentAttributesProperties {
readonly w16sdtdh?: string;
readonly w16se?: string;
}
/* cSpell:enable */
export class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> {
protected readonly xmlKeys = {

View File

@ -63,7 +63,7 @@ export interface IDocumentBackgroundOptions {
// </xsd:complexType>
export class DocumentBackground extends XmlComponent {
constructor(options: IDocumentBackgroundOptions) {
public constructor(options: IDocumentBackgroundOptions) {
super("w:background");
this.root.push(

View File

@ -33,7 +33,7 @@ export interface IDocumentOptions {
export class Document extends XmlComponent {
private readonly body: Body;
constructor(options: IDocumentOptions) {
public constructor(options: IDocumentOptions) {
super("w:document");
this.root.push(
new DocumentAttributes({

View File

@ -6,8 +6,8 @@ import { IDrawingOptions } from "../drawing";
import { TextWrappingType } from "../text-wrap";
import { Anchor } from "./anchor";
function createAnchor(drawingOptions: IDrawingOptions): Anchor {
return new Anchor(
const createAnchor = (drawingOptions: IDrawingOptions): Anchor =>
new Anchor(
{
fileName: "test.png",
stream: new Buffer(""),
@ -34,7 +34,6 @@ function createAnchor(drawingOptions: IDrawingOptions): Anchor {
},
drawingOptions,
);
}
describe("Anchor", () => {
let anchor: Anchor;

View File

@ -37,7 +37,7 @@ import { AnchorAttributes } from "./anchor-attributes";
// <xsd:attribute name="allowOverlap" type="xsd:boolean" use="required"/>
// </xsd:complexType>
export class Anchor extends XmlComponent {
constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions) {
public constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions) {
super("wp:anchor");
const floating: IFloating = {

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { DocPropertiesAttributes } from "./doc-properties-attributes";
export class DocProperties extends XmlComponent {
constructor() {
public constructor() {
super("wp:docPr");
this.root.push(

View File

@ -6,8 +6,8 @@ import { Drawing, IDrawingOptions } from "./drawing";
const imageBase64Data = `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`;
function createDrawing(drawingOptions?: IDrawingOptions): Drawing {
return new Drawing(
const createDrawing = (drawingOptions?: IDrawingOptions): Drawing =>
new Drawing(
{
fileName: "test.jpg",
stream: Buffer.from(imageBase64Data, "base64"),
@ -24,7 +24,6 @@ function createDrawing(drawingOptions?: IDrawingOptions): Drawing {
},
drawingOptions,
);
}
describe("Drawing", () => {
let currentBreak: Drawing;

View File

@ -25,7 +25,7 @@ export interface IDrawingOptions {
export class Drawing extends XmlComponent {
private readonly inline: Inline;
constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
public constructor(imageData: IMediaData, drawingOptions: IDrawingOptions = {}) {
super("w:drawing");
if (!drawingOptions.floating) {

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { EffectExtentAttributes } from "./effect-extent-attributes";
export class EffectExtent extends XmlComponent {
constructor() {
public constructor() {
super("wp:effectExtent");
this.root.push(

View File

@ -5,7 +5,7 @@ import { ExtentAttributes } from "./extent-attributes";
export class Extent extends XmlComponent {
private readonly attributes: ExtentAttributes;
constructor(x: number, y: number) {
public constructor(x: number, y: number) {
super("wp:extent");
this.attributes = new ExtentAttributes({

View File

@ -3,7 +3,7 @@ import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared/ali
import { XmlComponent } from "@file/xml-components";
export class Align extends XmlComponent {
constructor(value: HorizontalPositionAlign | VerticalPositionAlign) {
public constructor(value: HorizontalPositionAlign | VerticalPositionAlign) {
super("wp:align");
this.root.push(value);
}

View File

@ -13,7 +13,7 @@ class HorizontalPositionAttributes extends XmlAttributeComponent<{
}
export class HorizontalPosition extends XmlComponent {
constructor(horizontalPosition: IHorizontalPositionOptions) {
public constructor(horizontalPosition: IHorizontalPositionOptions) {
super("wp:positionH");
this.root.push(

View File

@ -2,7 +2,7 @@
import { XmlComponent } from "@file/xml-components";
export class PositionOffset extends XmlComponent {
constructor(offsetValue: number) {
public constructor(offsetValue: number) {
super("wp:posOffset");
this.root.push(offsetValue.toString());
}

View File

@ -12,7 +12,7 @@ class SimplePosAttributes extends XmlAttributeComponent<{
}
export class SimplePos extends XmlComponent {
constructor() {
public constructor() {
super("wp:simplePos");
// NOTE: It's not fully supported in Microsoft Word, but this element is needed anyway

View File

@ -13,7 +13,7 @@ class VerticalPositionAttributes extends XmlAttributeComponent<{
}
export class VerticalPosition extends XmlComponent {
constructor(verticalPosition: IVerticalPositionOptions) {
public constructor(verticalPosition: IVerticalPositionOptions) {
super("wp:positionV");
this.root.push(

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { GraphicFrameLockAttributes } from "./graphic-frame-lock-attributes";
export class GraphicFrameLocks extends XmlComponent {
constructor() {
public constructor() {
super("a:graphicFrameLocks");
this.root.push(

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { GraphicFrameLocks } from "./graphic-frame-locks/graphic-frame-locks";
export class GraphicFrameProperties extends XmlComponent {
constructor() {
public constructor() {
super("wp:cNvGraphicFramePr");
this.root.push(new GraphicFrameLocks());

View File

@ -7,7 +7,7 @@ import { Pic } from "./pic";
export class GraphicData extends XmlComponent {
private readonly pic: Pic;
constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
super("a:graphicData");
this.root.push(

View File

@ -6,7 +6,7 @@ import { SourceRectangle } from "./source-rectangle";
import { Stretch } from "./stretch";
export class BlipFill extends XmlComponent {
constructor(mediaData: IMediaData) {
public constructor(mediaData: IMediaData) {
super("pic:blipFill");
this.root.push(new Blip(mediaData));

View File

@ -12,7 +12,7 @@ class BlipAttributes extends XmlAttributeComponent<{
}
export class Blip extends XmlComponent {
constructor(mediaData: IMediaData) {
public constructor(mediaData: IMediaData) {
super("a:blip");
this.root.push(
new BlipAttributes({

View File

@ -1,7 +1,7 @@
import { XmlComponent } from "@file/xml-components";
export class SourceRectangle extends XmlComponent {
constructor() {
public constructor() {
super("a:srcRect");
}
}

View File

@ -1,13 +1,13 @@
import { XmlComponent } from "@file/xml-components";
class FillRectangle extends XmlComponent {
constructor() {
public constructor() {
super("a:fillRect");
}
}
export class Stretch extends XmlComponent {
constructor() {
public constructor() {
super("a:stretch");
this.root.push(new FillRectangle());
}

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { PicLocks } from "./pic-locks/pic-locks";
export class ChildNonVisualProperties extends XmlComponent {
constructor() {
public constructor() {
super("pic:cNvPicPr");
this.root.push(new PicLocks());

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { PicLocksAttributes } from "./pic-locks-attributes";
export class PicLocks extends XmlComponent {
constructor() {
public constructor() {
super("a:picLocks");
this.root.push(
new PicLocksAttributes({

View File

@ -3,7 +3,7 @@ import { ChildNonVisualProperties } from "./child-non-visual-pic-properties/chil
import { NonVisualProperties } from "./non-visual-properties/non-visual-properties";
export class NonVisualPicProperties extends XmlComponent {
constructor() {
public constructor() {
super("pic:nvPicPr");
this.root.push(new NonVisualProperties());

View File

@ -2,7 +2,7 @@ import { XmlComponent } from "@file/xml-components";
import { NonVisualPropertiesAttributes } from "./non-visual-properties-attributes";
export class NonVisualProperties extends XmlComponent {
constructor() {
public constructor() {
super("pic:cNvPr");
this.root.push(

View File

@ -8,7 +8,7 @@ import { PicAttributes } from "./pic-attributes";
import { ShapeProperties } from "./shape-properties/shape-properties";
export class Pic extends XmlComponent {
constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
super("pic:pic");
this.root.push(

View File

@ -5,7 +5,7 @@ import { ExtentsAttributes } from "./extents-attributes";
export class Extents extends XmlComponent {
private readonly attributes: ExtentsAttributes;
constructor(x: number, y: number) {
public constructor(x: number, y: number) {
super("a:ext");
this.attributes = new ExtentsAttributes({

View File

@ -21,7 +21,7 @@ export class FormAttributes extends XmlAttributeComponent<{
export class Form extends XmlComponent {
private readonly extents: Extents;
constructor(options: IMediaDataTransformation) {
public constructor(options: IMediaDataTransformation) {
super("a:xfrm");
this.root.push(

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { OffsetAttributes } from "./off-attributes";
export class Offset extends XmlComponent {
constructor() {
public constructor() {
super("a:off");
this.root.push(

View File

@ -1,7 +1,7 @@
import { XmlComponent } from "@file/xml-components";
export class NoFill extends XmlComponent {
constructor() {
public constructor() {
super("a:noFill");
}
}

View File

@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
import { NoFill } from "./no-fill";
export class Outline extends XmlComponent {
constructor() {
public constructor() {
super("a:ln");
this.root.push(new NoFill());

View File

@ -2,7 +2,7 @@
import { XmlComponent } from "@file/xml-components";
export class AdjustmentValues extends XmlComponent {
constructor() {
public constructor() {
super("a:avLst");
}
}

View File

@ -4,7 +4,7 @@ import { AdjustmentValues } from "./adjustment-values/adjustment-values";
import { PresetGeometryAttributes } from "./preset-geometry-attributes";
export class PresetGeometry extends XmlComponent {
constructor() {
public constructor() {
super("a:prstGeom");
this.root.push(

View File

@ -10,7 +10,7 @@ import { ShapePropertiesAttributes } from "./shape-properties-attributes";
export class ShapeProperties extends XmlComponent {
private readonly form: Form;
constructor(transform: IMediaDataTransformation) {
public constructor(transform: IMediaDataTransformation) {
super("pic:spPr");
this.root.push(

View File

@ -14,7 +14,7 @@ class GraphicAttributes extends XmlAttributeComponent<{
export class Graphic extends XmlComponent {
private readonly data: GraphicData;
constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
super("a:graphic");
this.root.push(
new GraphicAttributes({

View File

@ -26,7 +26,7 @@ export class Inline extends XmlComponent {
private readonly extent: Extent;
private readonly graphic: Graphic;
constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
public constructor(mediaData: IMediaData, transform: IMediaDataTransformation) {
super("wp:inline");
this.root.push(

View File

@ -2,7 +2,7 @@
import { XmlComponent } from "@file/xml-components";
export class WrapNone extends XmlComponent {
constructor() {
public constructor() {
super("wp:wrapNone");
}
}

View File

@ -1,8 +1,9 @@
// http://officeopenxml.com/drwPicFloating-textWrap.php
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { ITextWrapping, TextWrappingSide } from ".";
import { IDistance } from "../drawing";
import { IMargins } from "../floating";
import { ITextWrapping, TextWrappingSide } from "./text-wrapping";
interface IWrapSquareAttributes extends IDistance {
readonly wrapText?: TextWrappingSide;
@ -19,7 +20,7 @@ class WrapSquareAttributes extends XmlAttributeComponent<IWrapSquareAttributes>
}
export class WrapSquare extends XmlComponent {
constructor(
public constructor(
textWrapping: ITextWrapping,
margins: IMargins = {
top: 0,

View File

@ -14,7 +14,7 @@ class WrapTightAttributes extends XmlAttributeComponent<{
}
export class WrapTight extends XmlComponent {
constructor(
public constructor(
margins: IMargins = {
top: 0,
bottom: 0,

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