abstract-document 6.12.14 → 6.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/abstract-document-xml/__tests__/layer/export-test-def.d.ts +13 -0
- package/lib/abstract-document-xml/__tests__/layer/export-test-def.d.ts.map +1 -0
- package/lib/abstract-document-xml/__tests__/layer/export-test-def.js +3 -0
- package/lib/abstract-document-xml/__tests__/layer/export-test-def.js.map +1 -0
- package/lib/abstract-document-xml/__tests__/layer/export.test.d.ts +3 -0
- package/lib/abstract-document-xml/__tests__/layer/export.test.d.ts.map +1 -0
- package/lib/abstract-document-xml/__tests__/layer/export.test.js +41 -0
- package/lib/abstract-document-xml/__tests__/layer/export.test.js.map +1 -0
- package/lib/abstract-document-xml/__tests__/layer/test-defs/simple-document.d.ts +3 -0
- package/lib/abstract-document-xml/__tests__/layer/test-defs/simple-document.d.ts.map +1 -0
- package/lib/abstract-document-xml/__tests__/layer/test-defs/simple-document.js +361 -0
- package/lib/abstract-document-xml/__tests__/layer/test-defs/simple-document.js.map +1 -0
- package/lib/abstract-document-xml/abstract-doc-of-xml/creator.js +2 -1
- package/lib/abstract-document-xml/abstract-doc-of-xml/creator.js.map +1 -1
- package/lib/abstract-document-xml/abstract-doc-of-xml/custom-elements.d.ts.map +1 -1
- package/lib/abstract-document-xml/abstract-doc-of-xml/custom-elements.js.map +1 -1
- package/lib/abstract-document-xml/parse-xml/parse-xml.d.ts +10 -0
- package/lib/abstract-document-xml/parse-xml/parse-xml.d.ts.map +1 -1
- package/lib/abstract-document-xml/parse-xml/parse-xml.js +46 -1
- package/lib/abstract-document-xml/parse-xml/parse-xml.js.map +1 -1
- package/package.json +4 -2
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Group.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Header and footer.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Header → footer.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed hyperlink and textrun.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed hyperlink → textrun.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed textrun and images.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed textrun → images.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple images.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple tables.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Center alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with End alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Start alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Start alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Page numbering.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table colSpan and rowSpan.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table colSpan → rowSpan.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table without rows.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single hyperlink.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single image.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Center alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Center alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with End alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with End alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Start alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Start alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/hello with Arial font.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/hello.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/letter-dimensions.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/page-orientation-landscape.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/page-orientation-portrait.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/tocSeparator.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/world.docx +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position group.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position header and footer.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position paragraph.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position section in group.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position section in table.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Absolute position table.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group Paragraphs.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group Tables.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group no keeptogether.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group too big for one page.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Header and footer.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Hyperlink internal linktarget.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Hyperlink internal.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Manual line break.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Manual line breaks empty lines.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Margins header body footer.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed hyperlink and textrun no underline.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed hyperlink and textrun with underline.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed hyperlink and textrun.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed textrun and images.pdf and b/package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed textrun → images.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple images overflow.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple images.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with End alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Start alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Start alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Page numbering.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table row that doesnt fit page.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table single row.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with group.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with header 2.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with header.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin bottom.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin top single table.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin top.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with rowSpan multipages.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with rowSpan.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table all auto.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table all fix.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table background.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table cell padding of image.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table cell padding of text.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table colSpan and rowSpan.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table minimal row height.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table mix auto fix.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table padding.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table right alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table row alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table text alignment in cell with wrapping.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table text alignment in cell.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with default colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with header.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with multi colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with single colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single date.pdf +14 -14
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single figure.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink centered.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink no underline.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink right aligned.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image from URL.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color hex.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color name.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color url.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg dasharray.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline alphabetic.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline bottom.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline hanging.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline middle.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline top.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Justify alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with super and subscripts.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Table of content separator.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/hello with roman font.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/hello.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/pagebreak.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/world.pdf +2 -2
- package/src/abstract-document-xml/abstract-doc-of-xml/creator.ts +1 -1
- package/src/abstract-document-xml/abstract-doc-of-xml/custom-elements.tsx +1 -0
- package/src/abstract-document-xml/parse-xml/parse-xml.ts +50 -0
|
@@ -79,7 +79,7 @@ endobj
|
|
|
79
79
|
(PDFKit)
|
|
80
80
|
endobj
|
|
81
81
|
12 0 obj
|
|
82
|
-
(D:
|
|
82
|
+
(D:20240208085330Z)
|
|
83
83
|
endobj
|
|
84
84
|
9 0 obj
|
|
85
85
|
<<
|
|
@@ -134,7 +134,7 @@ trailer
|
|
|
134
134
|
/Size 13
|
|
135
135
|
/Root 3 0 R
|
|
136
136
|
/Info 9 0 R
|
|
137
|
-
/ID [<
|
|
137
|
+
/ID [<300704d7f211eede595b8c6daaaa72e5> <300704d7f211eede595b8c6daaaa72e5>]
|
|
138
138
|
>>
|
|
139
139
|
startxref
|
|
140
140
|
1032
|
|
Binary file
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline alphabetic.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<186ce38726377b30c3c7d4805888d795> <186ce38726377b30c3c7d4805888d795>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
821
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline bottom.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<f206fe9b50cb07d57f55da7690059cfb> <f206fe9b50cb07d57f55da7690059cfb>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
824
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline hanging.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<ee4d504ab9a842d38b1a895c9d62458f> <ee4d504ab9a842d38b1a895c9d62458f>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
825
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun baseline middle.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<25982536f2cc37ceee0ba8b8fcb1e03b> <25982536f2cc37ceee0ba8b8fcb1e03b>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
825
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<b0720bab199ee0d162ca837209d4677d> <b0720bab199ee0d162ca837209d4677d>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
824
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20240208085330Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<a160b6962bdf780302d1fe7acb901a4b> <a160b6962bdf780302d1fe7acb901a4b>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1427
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<7fbdff7866397c0750386cd58d5f6776> <7fbdff7866397c0750386cd58d5f6776>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
854
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20240208085330Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<9a72290bff38faf5b7108d9345bafcac> <9a72290bff38faf5b7108d9345bafcac>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1427
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<b76ace7049973931092808f1d96acda3> <b76ace7049973931092808f1d96acda3>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
853
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Justify alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<9f77268faa639c23c86e04393b1ac3ed> <9f77268faa639c23c86e04393b1ac3ed>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
848
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20240208085330Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<80556bb9b1b286456fccb6ee751f8d0e> <80556bb9b1b286456fccb6ee751f8d0e>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1418
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<427265085c0c3d0e8676c73df253e42b> <427265085c0c3d0e8676c73df253e42b>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
848
|
|
@@ -63,7 +63,7 @@ endobj
|
|
|
63
63
|
(PDFKit)
|
|
64
64
|
endobj
|
|
65
65
|
12 0 obj
|
|
66
|
-
(D:
|
|
66
|
+
(D:20240208085330Z)
|
|
67
67
|
endobj
|
|
68
68
|
9 0 obj
|
|
69
69
|
<<
|
|
@@ -126,7 +126,7 @@ trailer
|
|
|
126
126
|
/Size 13
|
|
127
127
|
/Root 3 0 R
|
|
128
128
|
/Info 9 0 R
|
|
129
|
-
/ID [<
|
|
129
|
+
/ID [<96939dc40b3113ed9f1d4b0107440e09> <96939dc40b3113ed9f1d4b0107440e09>]
|
|
130
130
|
>>
|
|
131
131
|
startxref
|
|
132
132
|
1076
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<c323f3932af630a10059bb6d02b81d81> <c323f3932af630a10059bb6d02b81d81>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
824
|
|
@@ -71,7 +71,7 @@ endobj
|
|
|
71
71
|
(PDFKit)
|
|
72
72
|
endobj
|
|
73
73
|
14 0 obj
|
|
74
|
-
(D:
|
|
74
|
+
(D:20240208085330Z)
|
|
75
75
|
endobj
|
|
76
76
|
11 0 obj
|
|
77
77
|
<<
|
|
@@ -136,7 +136,7 @@ trailer
|
|
|
136
136
|
/Size 15
|
|
137
137
|
/Root 3 0 R
|
|
138
138
|
/Info 11 0 R
|
|
139
|
-
/ID [<
|
|
139
|
+
/ID [<0845ef3c3342e8b86f1c001ca53003c7> <0845ef3c3342e8b86f1c001ca53003c7>]
|
|
140
140
|
>>
|
|
141
141
|
startxref
|
|
142
142
|
1232
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085329Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<2f92908cf48d0acd1841a8172843c63d> <2f92908cf48d0acd1841a8172843c63d>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
894
|
|
@@ -79,7 +79,7 @@ endobj
|
|
|
79
79
|
(PDFKit)
|
|
80
80
|
endobj
|
|
81
81
|
15 0 obj
|
|
82
|
-
(D:
|
|
82
|
+
(D:20240208085329Z)
|
|
83
83
|
endobj
|
|
84
84
|
12 0 obj
|
|
85
85
|
<<
|
|
@@ -145,7 +145,7 @@ trailer
|
|
|
145
145
|
/Size 16
|
|
146
146
|
/Root 3 0 R
|
|
147
147
|
/Info 12 0 R
|
|
148
|
-
/ID [<
|
|
148
|
+
/ID [<8084babcb7b06568ac25ec3b92a0f48f> <8084babcb7b06568ac25ec3b92a0f48f>]
|
|
149
149
|
>>
|
|
150
150
|
startxref
|
|
151
151
|
1212
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085329Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<fecfa3ac82797b3950ebccfa3aff1ecb> <fecfa3ac82797b3950ebccfa3aff1ecb>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
824
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20240208085330Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<8455adc5da7cf57bc1c6644480b85540> <8455adc5da7cf57bc1c6644480b85540>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
837
|
|
@@ -87,7 +87,7 @@ export const propsCreators: Record<string, ADCreatorFn> = {
|
|
|
87
87
|
return { ...fixedStyles, ...DefaultStyles.createStandardStyles() };
|
|
88
88
|
},
|
|
89
89
|
columnWidths: (props: { readonly columnWidths: string; readonly columnMultiplier: string }): unknown => {
|
|
90
|
-
const columnWidths = props.columnWidths
|
|
90
|
+
const columnWidths = (props.columnWidths ?? "")
|
|
91
91
|
.toString()
|
|
92
92
|
.split(",")
|
|
93
93
|
.map((item: string) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { X2jOptionsOptional, XMLParser } from "fast-xml-parser";
|
|
2
|
+
import Mustache from "mustache";
|
|
3
|
+
import { xsd } from "../xsd-template";
|
|
4
|
+
import { errorToReadableText, validateXml } from "./validation";
|
|
2
5
|
|
|
3
6
|
export type XmlElement = {
|
|
4
7
|
readonly tagName: string;
|
|
@@ -9,6 +12,53 @@ export type XmlElement = {
|
|
|
9
12
|
|
|
10
13
|
export type FastXmlElement = Record<string, ReadonlyArray<FastXmlElement> | Record<string, string>>;
|
|
11
14
|
|
|
15
|
+
export function parseMustacheXml(
|
|
16
|
+
template: {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly template: string;
|
|
19
|
+
},
|
|
20
|
+
data: any,
|
|
21
|
+
partials: Record<string, string>
|
|
22
|
+
): { readonly type: "Ok"; readonly xml: ReadonlyArray<XmlElement> } | { readonly type: "Err"; readonly error: string } {
|
|
23
|
+
const mustacheResolvedXml = Mustache.render(template.template, data, partials);
|
|
24
|
+
const xsdTemplate = parseXml(xsd.replace(/xs:/g, ""), {
|
|
25
|
+
preserveOrder: true,
|
|
26
|
+
ignoreAttributes: false,
|
|
27
|
+
attributeNamePrefix: "",
|
|
28
|
+
allowBooleanAttributes: true,
|
|
29
|
+
trimValues: false,
|
|
30
|
+
ignoreDeclaration: true,
|
|
31
|
+
});
|
|
32
|
+
const validationErrors = validateXml(mustacheResolvedXml, xsdTemplate);
|
|
33
|
+
if (validationErrors.length > 0) {
|
|
34
|
+
return { type: "Err", error: errorToReadableText(validationErrors, template.name) };
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
type: "Ok",
|
|
39
|
+
xml: parseXml(mustacheResolvedXml, {
|
|
40
|
+
preserveOrder: true,
|
|
41
|
+
ignoreAttributes: false,
|
|
42
|
+
attributeNamePrefix: "",
|
|
43
|
+
allowBooleanAttributes: true,
|
|
44
|
+
trimValues: false,
|
|
45
|
+
ignoreDeclaration: true,
|
|
46
|
+
processEntities: true,
|
|
47
|
+
htmlEntities: true,
|
|
48
|
+
attributeValueProcessor: (_name, value) => {
|
|
49
|
+
if (!value?.trim()) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
const nValue = Number(value);
|
|
53
|
+
if (!Number.isNaN(nValue)) {
|
|
54
|
+
return nValue;
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
12
62
|
export function parseXml(text: string, options?: X2jOptionsOptional): ReadonlyArray<XmlElement> {
|
|
13
63
|
const parser = new XMLParser(options);
|
|
14
64
|
// Unescape HTML entity
|