Commit Graph

21 Commits

Author SHA1 Message Date
ce2a0fb864 remove more duplicate classes; add additional values functions; clean up tests 2021-05-24 11:28:10 +03:00
496fcb55fa unify Shading; breaking change: Paragraph/Run shading option key type changed to val, and shadow alias removed 2021-05-24 05:39:26 +03:00
798cbb8628 fix prettier issues 2021-05-20 04:08:00 +03:00
06da596ffb Remove invalid 'w:shdCs' element 2021-05-20 03:02:48 +03:00
74db67689f Re-name paragraph styles 2020-11-06 00:27:57 +00:00
75a03f1576 :test: update test for complex script 2020-07-15 12:46:46 +08:00
437e83ab78 :feat: refine paragraph/run properties options 2020-07-14 15:42:45 +08:00
8a3c8d4664 :test: Font for eastAsia 2020-06-07 12:38:31 +08:00
120c3a7bbe :feat: support emphasis mark 2020-05-22 12:22:45 +08:00
b4cce534a5 Test contextual spacing 2019-12-12 11:44:00 +13:00
591b2f4e04 Declarative styles 2019-10-04 01:20:41 +01:00
04b6d8e54a Declarative hyperlinks, bookmarks, tab stops and page breaks 2019-09-30 22:56:21 +01:00
099eb1d202 Merge branch 'master' of github.com:dolanmiu/docx into feat/declaritive
# Conflicts:
#	src/file/paragraph/run/run.ts
2019-08-06 21:06:06 +01:00
ebc7dca949 Fix tests 2019-08-06 13:39:05 +03:00
fa710d1ba6 Highlighting 2019-08-06 11:13:43 +03:00
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
32646f8806 Add outline level to paragraph style 2019-03-05 12:19:36 +01:00
7639b60b15 Refactor to separate classes in their specific files an tests improuvements for styles 2018-11-13 11:04:03 -02:00