Skip to content

Releases: dolanmiu/docx

7.1.2

01 Nov 00:44
Compare
Choose a tag to compare

7.1.1

30 Sep 15:03
ea54f35
Compare
Choose a tag to compare

Turn module into ES6

7.1.0

29 Sep 00:07
Compare
Choose a tag to compare

Re-activated absolute-types-fixer to fix typing issue
#1196
#1199

7.0.0

27 Sep 12:55
Compare
Choose a tag to compare

image

#868 - Update Webpack 3 to Webpack 5 and testing frameworks
#928 - Added support for w:fldSimple, including convenience for MailMerge
#948 - Conform to XML schema
#1031 - Column Break
#1057 - Numbering start from number doesn't work fix
#1074 - PageRef feature
#1163 - Attaching numbering to custom style
#1169 - Use correct height rule
#1168 - Extend Columns API to allow specifying individual column widths/spacing

#956 - V7 Work
#1120 - Multiple children in hyperlinks
#1131 - Add ParagraphChild in Bookmark

New features

In several places, as allowed by the spec, Universal Measure units can now be used.
Universal Measure units are strings in the format /-?[0-9]+(.[0-9]+)?(mm|cm|in|pt|pc|pi)/, for example: "14pt", "20mm", "2in", "2cm".
These include page margins, page size, paragraph indents, and font sizes. These should be experimented with, some of these may not work and need testing -- even if it's technically valid according to the spec.

Added a bunch of formats to NumberFormat.

Much more compliant docx files, which should act more consistently in different editors.

Reduced bundle size slightly.

Boolean options like bold, etc can now be explicitly toggled off -- when set to false it adds the tag to disable it, rather than just omit the tag to enable it, which allows more flexibility.

Breaking changes

Renamed enum PageNumberFormat -> NumberFormat.

Section vertical align enum changed: SectionVerticalAlignValue -> VerticalAlign

Runtime checks were added for some values. These can now throw errors for invalid arguments in some cases.

color values must now be in hex (eg "00CCFF") for Underline, Shading, run color, background color, border color

Paragraph border argument signature changed.
old:

  new Paragraph({
      border: {
          top: {
              value: "single",
              size: 6,
              color: "red",
          },
      }
  })

new:

  new Paragraph({
      border: {
          top: {
              style: BorderStyle.SINGLE,
              size: 6,
              color: "FF0000",
          },
      }
  })

For TableOfContents, updateFields option in Document must be explicitly set:

new Document({
  features: {
      updateFields: true,
  },
  // ...
})

ITableShadingAttributesProperties changed to IShadingAttributesProperties

Table and TableCell shading option signature changed to be consistent with shading everywhere else.

old:

  shading: {
      val: ShadingType.REVERSE_DIAGONAL_STRIPE,
      color: "00FFFF",
      fill: "FF0000",
  },

new:

  shading: {
      type: ShadingType.REVERSE_DIAGONAL_STRIPE,
      color: "00FFFF",
      fill: "FF0000",
  },

A great many internal classes were shifted around or removed. Internal methods were removed in several places. These changes should not affect you if you stuck to the public API (what's in the demos and docs)

6.0.3

31 Mar 15:00
488711d
Compare
Choose a tag to compare

6.0.2

25 Mar 02:57
Compare
Choose a tag to compare

#851 - Fix complex numbering and add demo for it

6.0.1

23 Mar 01:55
Compare
Choose a tag to compare

6.0.0

21 Mar 03:38
Compare
Choose a tag to compare

image

Breaking Changes

#784 - Simpler Hyperlink API - Breaking change
#565 - Table Row height rename - Breaking change
#484 - Multiple paragraphs in footnotes - Breaking change
#822 - Rotate and flip images - Breaking change
#827 - Make lineRule into a enum - Breaking change
#834 - Make images declarative and simplier to use - Breaking change
#840 - Make addSection fully declarative and remove method - Breaking change
#829 - Remove default header - Breaking change

Non-breaking Changes

#780 - Section types
#783 - Fix compatibility mode message
#785 - Fix Hyperlinks in headers and footers
#605 - Custom Properties
#789 - Allow external hyperlinks in footnotes
#795 - Visual Right to Left Table
#796 - Line between section columns (seperate)
#438 - Add style to table
#511 - Restart page numbering
#763 - Allow styles and headings with numbering
#816 - Restart numbered lists
#819 - Widow Control
#821 - Text Frames (Text boxes)

5.5.0

31 Jan 04:55
Compare
Choose a tag to compare

#697 - Default styles
#728 - Default strong style
#729 - Add TableBorders.NONE convenience object
#734 - Make break() delcarative. Make docx align with documentation
#735 - Add Convenience functions
#736 - Use LevelFormat string enum rather than strings - Note: This should not be a breaking change as string enums and strings are identical, but you may get a compile error which can be easily fixed.
#739 - Add z-index to floating

5.4.1

17 Nov 03:36
b210608
Compare
Choose a tag to compare
Merge pull request #685 from dolanmiu/dependabot/npm_and_yarn/types/m…