docxtemplater/es6/tests/data-fixtures.js
2021-09-04 10:15:02 +05:00

182 lines
9.2 KiB
JavaScript

const expectedPrintedPostParsed = `
(0)<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid wp14"><w:body>
***START LOOP OF hi
(1) <w:p>
(2) <w:r>
(3) <w:t xml:space="preserve">
(3) </w:t>
(2) </w:r>
(2) <w:p w14:paraId="736A2D9F" w14:textId="77777777" w:rsidR="008E1095" w:rsidRDefault="008E1095"/>
(2) <w:sdt><w:sdtPr><w:alias w:val="SF:Table"/><w:id w:val="2039776175"/><w:placeholder><w:docPart w:val="CFCF8C7E6B33489A9DD50D7417AD410D"/></w:placeholder><w15:color w:val="008000"/><w15:appearance w15:val="hidden"/></w:sdtPr>
(2) <w:sdtContent>
(3) <w:p w14:paraId="4800949B" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00D3440B"/>
(3) <w:tbl><w:tblPr><w:tblStyle w:val="TableGrid"/><w:tblW w:w="0" w:type="auto"/><w:tblLook w:val="0660" w:firstRow="1" w:lastRow="1" w:firstColumn="0" w:lastColumn="0" w:noHBand="1" w:noVBand="1"/></w:tblPr><w:tblGrid><w:gridCol w:w="2909"/><w:gridCol w:w="2928"/><w:gridCol w:w="2793"/></w:tblGrid>
(3) <w:tr w:rsidR="00D3440B" w14:paraId="5887C255" w14:textId="77777777" w:rsidTr="00F617CB">
(4) <w:trPr><w:tblHeader/></w:trPr>
(4) <w:tc>
(5) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(5) <w:p w14:paraId="5951DD51" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(6) <w:r>
(7) <w:t xml:space="preserve">
(8) name
(7) </w:t>
(6) </w:r>
(5) </w:p>
(4) </w:tc>
(4) <w:tc>
(5) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(5) <w:p w14:paraId="34A4528E" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(6) <w:r>
(7) <w:t xml:space="preserve">
(8) phone
(7) </w:t>
(6) </w:r>
(5) </w:p>
(4) </w:tc>
(4) <w:tc>
(5) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(5) <w:p w14:paraId="1EFFDB2B" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(6) <w:r>
(7) <w:t xml:space="preserve">
(8) website
(7) </w:t>
(6) </w:r>
(5) </w:p>
(4) </w:tc>
(3) </w:tr>
(3) <w:tr w:rsidR="00D3440B" w14:paraId="53971E16" w14:textId="77777777" w:rsidTr="00F617CB">
(4) <w:sdt><w:sdtPr><w:alias w:val="SF:R"/><w:id w:val="1927457022"/><w15:color w:val="008000"/><w15:appearance w15:val="hidden"/></w:sdtPr>
(4) <w:sdtContent>
(5) <w:tc>
(6) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(6) <w:p w14:paraId="6B371C2E" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(7) <w:pPr>
(8) <w:spacing w:line="360" w:lineRule="auto"/>
(8) <w:jc w:val="both"/>
(7) </w:pPr>
(7) <w:r>
(8) <w:t xml:space="preserve">
=============================={foo}
(8) </w:t>
(7) </w:r>
(6) </w:p>
(5) </w:tc>
(4) </w:sdtContent>
(4) </w:sdt><w:sdt><w:sdtPr><w:alias w:val="SF:R"/><w:id w:val="1556285925"/><w15:color w:val="008000"/><w15:appearance w15:val="hidden"/></w:sdtPr>
(4) <w:sdtContent>
(5) <w:tc>
(6) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(6) <w:p w14:paraId="3C4100BB" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(7) <w:pPr>
(8) <w:spacing w:line="360" w:lineRule="auto"/>
(8) <w:jc w:val="both"/>
(7) </w:pPr>
(7) <w:r>
(8) <w:t xml:space="preserve">
=============================={bar}
(8) </w:t>
(7) </w:r>
(6) </w:p>
(5) </w:tc>
(4) </w:sdtContent>
(4) </w:sdt><w:sdt><w:sdtPr><w:alias w:val="SF:R"/><w:id w:val="-788971804"/><w15:color w:val="008000"/><w15:appearance w15:val="hidden"/></w:sdtPr>
(4) <w:sdtContent>
(5) <w:tc>
(6) <w:tcPr><w:tcW w:w="0" w:type="auto"/></w:tcPr>
(6) <w:p w14:paraId="24C5CEB1" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00F617CB">
(7) <w:pPr>
(8) <w:spacing w:line="360" w:lineRule="auto"/>
(8) <w:jc w:val="both"/>
(7) </w:pPr>
(7) <w:r>
(8) <w:t xml:space="preserve">
=============================={bar}
(8) </w:t>
(7) </w:r>
(6) </w:p>
(5) </w:tc>
(4) </w:sdtContent>
(4) </w:sdt>
(3) </w:tr>
(3) </w:tbl>
(3) <w:p w14:paraId="676A1E43" w14:textId="77777777" w:rsidR="00D3440B" w:rsidRDefault="00D3440B" w:rsidP="00D3440B"/>
(2) </w:sdtContent>
(2) </w:sdt>
(2) <w:p w14:paraId="22D858B2" w14:textId="69A6ACE6" w:rsidR="009843AE" w:rsidRDefault="00EB53B3"/>
(1) </w:p>
(1) <w:p>
(2) <w:r>
(3) <w:t xml:space="preserve">
(3) </w:t>
(2) </w:r>
(1) </w:p>
***END LOOP OF hi
(0)</w:body></w:document>`;
const rawXMLValue = `<p:sp>
<p:nvSpPr>
<p:cNvPr id="37" name="CustomShape 2"/>
<p:cNvSpPr/>
<p:nvPr/>
</p:nvSpPr>
<p:spPr>
<a:xfrm>
<a:off x="504000" y="1769040"/>
<a:ext cx="9071280" cy="4384080"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
<a:noFill/>
<a:ln>
<a:noFill/>
</a:ln>
</p:spPr>
<p:style>
<a:lnRef idx="0"/>
<a:fillRef idx="0"/>
<a:effectRef idx="0"/>
<a:fontRef idx="minor"/>
</p:style>
<p:txBody>
<a:bodyPr lIns="0" rIns="0" tIns="0" bIns="0" anchor="ctr"/>
<a:p>
<a:pPr algn="ctr">
<a:lnSpc>
<a:spcPct val="100000"/>
</a:lnSpc>
</a:pPr>
<a:r>
<a:rPr b="0" lang="fr-FR" sz="3200" spc="-1" strike="noStrike">
<a:solidFill>
<a:srgbClr val="000000"/>
</a:solidFill>
<a:uFill>
<a:solidFill>
<a:srgbClr val="ffffff"/>
</a:solidFill>
</a:uFill>
<a:latin typeface="Arial"/>
</a:rPr>
<a:t>Hello World</a:t>
</a:r>
<a:endParaRPr b="0" lang="fr-FR" sz="1800" spc="-1" strike="noStrike">
<a:solidFill>
<a:srgbClr val="000000"/>
</a:solidFill>
<a:uFill>
<a:solidFill>
<a:srgbClr val="ffffff"/>
</a:solidFill>
</a:uFill>
<a:latin typeface="Arial"/>
</a:endParaRPr>
</a:p>
</p:txBody>
</p:sp>`;
module.exports = {
expectedPrintedPostParsed,
rawXMLValue,
};