Commit Graph

23 Commits

Author SHA1 Message Date
643e3c2f84 Finish making numbering declarative 2019-11-08 03:11:19 +00:00
cc36ea7542 Optimise formatting to not over-format the same files 2019-09-22 20:45:24 +01:00
d8b60d82f3 Turn Packer static 2019-08-07 22:12:14 +01:00
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
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
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
8db52212ab Remove id from media 2018-12-24 16:50:53 +00:00
39066fb5f2 Add lifecycles to add image 2018-12-05 00:05:11 +00:00
765a9686d8 Remove async await for Compiler.compile 2018-11-12 13:17:53 +00:00
7980f14efb Introduce some functional programming techniques 2018-11-02 02:51:57 +00:00
466e880bfc Merge from master 2018-09-25 23:46:55 +01:00
4ca81df401 TOC content generation aborted 2018-09-21 11:16:14 -03:00
c07b5cf709 added settings.xml back 2018-09-20 10:11:59 -03:00
8e911698a5 generating the content for a table of contents 2018-09-18 05:24:19 -03:00
0eb36be053 there is no need for the settings.xml file anymore 2018-09-17 22:09:05 -03:00
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
385ad92331 Fix linting errors 2018-09-07 21:48:59 +01:00
4994bca34c Fix some linting errors 2018-09-06 08:30:23 +01:00
03c4190c2c works! 2018-09-04 17:16:31 +03:00
a38abeb4c2 Huge refactoring to use new compiler and deprecate all other Packers
Add new PdfPacker
2018-08-14 01:46:48 +01:00
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
06418655c0 Add image support to new packer 2018-04-24 22:35:31 +01:00
c99b2940c6 Add next gen compiler using JSZip 2018-04-24 21:12:09 +01:00