Commit Graph

12 Commits

Author SHA1 Message Date
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
3355a6f472 Added back tests and method 2018-10-31 21:57:10 +00:00
3f3fd05cb1 works 2018-10-17 09:15:32 +03:00
9d9dd62f00 c 2018-10-16 11:28:25 +03:00
f2b50478bf Fix tests and use proper types for disregarding XMLComponent 2018-09-20 00:41:57 +01:00
2e00634bc4 Fix tests but break demo 27 2018-09-17 22:06:38 +01:00
385ad92331 Fix linting errors 2018-09-07 21:48:59 +01:00
03c4190c2c works! 2018-09-04 17:16:31 +03:00
55005b57c6 Fix linting and style errors 2018-06-09 23:49:01 +01:00
ac40a40ec0 refactor: move components from /drawing/inline to /drawing
- they will be used for other positioning element (floating)
2018-06-08 07:50:23 +02:00
97e976a184 import: add support to import any xml tab element to XmlComponent (#8)
- make method to import/convert to XmlComponent
 - expose method to add childElement to Header/Footer
 - add tests
2018-05-28 09:15:44 +02:00
5242f7d55c styles: support for external styles. parsing external styles. 2018-03-28 14:54:07 +02:00