Commit Graph

23 Commits

Author SHA1 Message Date
cb42c74a8d Make Paragraph declaritive 2019-06-12 01:03:36 +01:00
77edf8862b Added constant EMPTY_OBJECT (an empty sealed object) that is used to indicate to the xml library that an empty XML element should be generated, and use it in the JSON hardcoded into the tests. 2019-04-10 13:47:38 -04:00
bb1604cd8f Turn back on no-null-keyword. Use empty object instead of null to signal to the xml library that an empty element should be produced. Update the related tests.
Related to #306
2019-04-10 01:28:37 -04: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
a2a01edc24 Change table cell margin type attribute form w:sz to w:type as per http://officeopenxml.com/WPtableCellMargins.php
Fixes #303
2019-04-08 13:50:40 -04:00
e67fd9cb2b Add tests and margain 2019-03-18 23:50:21 +00:00
f3ba11b21c Improving table api 2019-03-08 01:09:21 +00:00
f76471f553 Fix test 2019-03-06 13:33:50 +01:00
28dabb06cb Write getColumn test 2019-03-05 01:58:56 +00:00
918faf59c3 Merge pull request #273 from dolanmiu/feat/table-merge-fix
Add higher width for GridCol to fix merging cells
2019-02-26 21:53:14 +00:00
3a9fa49fbb Fix test 2019-02-26 21:46:19 +00:00
218a08d793 Fix tests 2019-02-26 21:45:55 +00:00
ab07f2ecbe Change table methods and document it 2018-12-29 01:57:20 +00:00
e19890e27a Breaking Change. Swap arguments around and make default WidthType 2018-11-15 03:00:26 +00:00
4742cf0f3f Clean imports 2018-10-26 01:04:07 +01:00
f7d18bfead Tidied up table components 2018-10-23 23:44:50 +01:00
4633592711 Improve API 2018-10-23 20:03:29 +01:00
54697ab6b1 Created float positioning for tables 2018-10-23 09:08:43 -02:00
fe2032a3d4 change demos to typescript and WidthType disparity 2018-08-23 01:05:26 +01:00
12c8cb93f6 Clean up API 2018-08-07 01:25:28 +01:00
a954c69458 Fix tests 2018-03-22 23:04:46 +00:00
e93d6799fd Made project Prettier compliant 2018-01-23 01:33:12 +00:00
2358139a6b Change docx folder to more appropriate "file" folder 2017-12-20 01:03:20 +00:00