Dolan
f33d6da65a
Merge branch 'master' into feat/declaritive
...
# Conflicts:
# src/file/paragraph/formatting/border.spec.ts
# src/file/paragraph/links/outline-level.spec.ts
# src/file/paragraph/run/run.spec.ts
2019-07-02 01:33:41 +01:00
Dolan
1f51fd7a31
Remove usage of Utility
2019-06-27 01:35:58 +01:00
Dolan
384d144a85
Simplify multiple addXXX methods into a single add method
2019-06-25 01:52:02 +01:00
Mark Charyk
72c32378c5
Make prettified XML a Packer-wide configurable option
...
The xml() function was being passed a flag for pretty printing the XML in word/document.xml. This was causing some parsers (not Word itself) to break when they didn't expect whitepsace. It was also causing some files to be prettified and others to be ugly. This ensures consistent prettification.
2019-06-21 13:53:01 -07:00
Dolan
fb65bb4207
Turn Run into a declaritive API
2019-06-17 01:51:57 +01:00
Dolan
cb42c74a8d
Make Paragraph declaritive
2019-06-12 01:03:36 +01:00
Bruce Duncan
816cb54b14
Optimize XML output by properly constructing objects to send to the xml library so that it can produce proper empty elements.
...
Rework the way attributes are stored in ImportedXmlComponent to match elsewhere (required allowing for a null xmlKeys in the XmlAttributeComponent interface).
Rework the way paragraphs get added to the end of table cells if needed.
The goal in both reworks is to not mess around with the objects output from `prepForXml` if we can avoid it.
Made the output of RunProperties, ParagraphProperties, TableCellProperties, TableRowProperties, and TableProperties all optional based on whether they contain any attributes or children. Changed code in PageBorders, TableCellMargin, and TableCellBorders that implemented this same thing by overriding `prepForXml` so that it uses the new XmlComponent subclass instead.
Removed commented out code that attempted to fix-up XML output and make proper empty elements.
Fixed all affected tests.
Turn off `no-null-keyword` in the linter as we need to use null to signal to the `xml` library to create an empty element with no attributes (`undefined` will not work in its place).
Fixes #306
2019-04-09 05:27:18 -04:00
Dolan
52b78a583e
Merge pull request #202 from dolanmiu/feat/correct-mine-type
...
Remove async await for Compiler.compile
2019-01-03 10:45:56 +00:00
Dolan
8db52212ab
Remove id from media
2018-12-24 16:50:53 +00:00
Dolan
39066fb5f2
Add lifecycles to add image
2018-12-05 00:05:11 +00:00
Dolan
765a9686d8
Remove async await for Compiler.compile
2018-11-12 13:17:53 +00:00
Dolan
28fc328cb3
Add more packer tests
2018-11-12 13:03:17 +00:00
Dolan
083f121683
Add correct docx mime type
2018-11-12 12:32:07 +00:00
Dolan
7980f14efb
Introduce some functional programming techniques
2018-11-02 02:51:57 +00:00
Dolan
4742cf0f3f
Clean imports
2018-10-26 01:04:07 +01:00
Dolan
466e880bfc
Merge from master
2018-09-25 23:46:55 +01:00
Sergio Mendonça
4ca81df401
TOC content generation aborted
2018-09-21 11:16:14 -03:00
Sergio Mendonça
c07b5cf709
added settings.xml back
2018-09-20 10:11:59 -03:00
Dolan
f2b50478bf
Fix tests and use proper types for disregarding XMLComponent
2018-09-20 00:41:57 +01:00
Sergio Mendonça
8e911698a5
generating the content for a table of contents
2018-09-18 05:24:19 -03:00
Sergio Mendonça
0eb36be053
there is no need for the settings.xml file anymore
2018-09-17 22:09:05 -03:00
Sergio Mendonça
146d0ad9e5
Moved addTableOfContents to File and creating a settings.xml and applying updateFields=true when there is a table of contents
2018-09-10 10:01:26 -03:00
Dolan
385ad92331
Fix linting errors
2018-09-07 21:48:59 +01:00
Dolan
4994bca34c
Fix some linting errors
2018-09-06 08:30:23 +01:00
amitm02
03c4190c2c
works!
2018-09-04 17:16:31 +03:00
Dolan
07261232ff
Removed old compiler and unused dependencies
2018-08-15 01:22:22 +01:00
Dolan
bfa0edeb09
Remove pdf packer
2018-08-14 21:56:38 +01:00
Dolan
a38abeb4c2
Huge refactoring to use new compiler and deprecate all other Packers
...
Add new PdfPacker
2018-08-14 01:46:48 +01:00
Dolan
f15fdb921e
Merge branch 'master' into feat/browser-packer
...
# Conflicts:
# demo/demo13.js
# package.json
# src/export/packer/compiler.ts
# src/file/media/data.ts
# src/file/media/media.ts
2018-08-10 01:40:29 +01:00
Dolan
ad356d2759
Add ignores so it doesnt get generated in documentation
2018-08-09 23:40:11 +01:00
Dolan
cf0c2c7691
Add Express packer deprecation warning
2018-08-07 02:23:58 +01:00
Dolan
e9aecfac1c
Updated lint rules
2018-08-07 01:38:15 +01:00
Dolan
12c8cb93f6
Clean up API
2018-08-07 01:25:28 +01:00
Dolan
ca8f331eec
Add new demo and remove tslint disable
2018-08-06 03:53:27 +01:00
Dolan
9e11774a1b
Add no null rule
2018-08-06 03:49:27 +01:00
Felipe Ochoa
06d3f3c34b
Fix #110
2018-07-31 12:13:05 -05:00
巴里切罗
6bdcee1d1b
fix inheritance of BufferPacker class
2018-07-26 17:16:18 +08:00
Dolan Miu
5fab6e2714
Remove test only
2018-07-21 01:28:15 +01:00
Dolan Miu
ddbae91840
Add buffer packer tests
2018-07-01 02:26:23 +01:00
Dolan Miu
ded155a6af
Add buffer packer
2018-07-01 02:16:11 +01:00
Dolan Miu
6c85ad3188
Fix tests
2018-06-30 23:39:45 +01:00
Dolan
b9e702086a
Merge branch 'master' into feat/footnotes
...
# Conflicts:
# demo/demo16.js
# src/file/file.ts
2018-06-27 23:34:23 +01:00
Dolan
84ebf8e6c3
Remove old implementation of first page header
2018-06-25 22:13:12 +01:00
Dolan Miu
0b939b1cd6
Organise imports
2018-06-22 23:18:07 +01:00
Dolan Miu
026a221e5e
Move header outside
2018-06-22 23:01:34 +01:00
Dolan Miu
f1ac646518
Merge branch 'feature/multiple-sections' of https://github.com/h4buli/docx into feat/multiple-headers
...
# Conflicts:
# src/export/packer/compiler.ts
# src/file/content-types/content-types.ts
# src/file/document/body/section-properties/header-reference/header-reference.ts
# src/file/document/body/section-properties/section-properties.ts
# src/file/file.ts
# src/file/media/media.ts
2018-06-22 22:59:38 +01:00
Igor Bulovski
0b963ec3b8
feature: add support to add mutiple sections to the document inc. headers and footers
...
- write missing tests
2018-06-21 12:03:34 +02:00
Dolan
c19a2e71b5
Add footnotes as part of export
2018-06-11 00:48:50 +01:00
Tyler Bell
7584671312
Fixed TSLint Errors
2018-05-18 09:21:27 -06:00
Tyler Bell
7296c9e744
Removed extra empty lines
2018-05-17 19:51:01 -06:00