feat: Word 支持分页渲染 (#6606)

* 优化分页渲染的支持

* 补充一些注释

* 补充单元测试

* 优化单元测试,减少样式冗余
This commit is contained in:
吴多益 2023-04-13 21:11:02 +08:00 committed by GitHub
parent a709ad96a8
commit 6b749b8b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 7830 additions and 6773 deletions

View File

@ -21,8 +21,9 @@ order: 23
- 文本框
- 形状
- 数学公式(依赖 MathML需要比较新的浏览器或者试试 [polyfill](https://github.com/w3c/mathml-polyfills)
- 分页渲染
不支持的功能:分页符、艺术字、域、对象、目录
不支持的功能:艺术字、域、对象、目录
## 基本用法
@ -63,14 +64,43 @@ order: 23
| forceLineHeight | `string` | | 设置段落行高,忽略文档中的设置 |
| enableVar | `boolean` | true | 是否开启变量替换功能 |
#### 分页渲染
> 2.10.0 及以上版本
默认情况下 word 文档渲染使用流式布局,这样能更好融入到已有页面中,支持分栏显示,且展现上会和原先的文档有较大差异,如果希望能看起来更像桌面端的效果,可以通过 `page` 配置开启分页渲染
```schema: scope="body"
{
"type": "office-viewer",
"id": "office-viewer-page",
"wordOptions": {
"page": true
},
"src": "/examples/static/page.docx",
}
```
分页渲染的其它设置项
| 属性名 | 类型 | 默认值 | 说明 |
| ------------------ | --------- | --------- | ------------------------------------------------ |
| page | `boolean` | false | 是否开启分页渲染 |
| pageMarginBottom | `number` | 20 | 页面上下间距 |
| pageBackground | `string` | '#FFF' | 页面内背景色 |
| pageShadow | `boolean` | true | 是否显示阴影 |
| pageWrap | `boolean` | true | 是否显示页面包裹,开启这个后才能设置包裹的背景色 |
| pageWrap | `boolean` | true | 是否显示页面包裹 |
| pageWrapBackground | `string` | '#ECECEC' | 是否显示页面包裹 |
| zoom | `number` | | 缩放比例,取值 0-1 之间 |
| zoomFitWidth | `boolean` | false | 自适应宽度缩放,如果设置了 zoom 将不会生效 |
### 关于渲染效果差异
目前的实现难以保证和本地 Word 渲染完全一致,会遇到以下问题:
1. 字体大小不一致
1. 单元格宽度不一致,表格完全依赖浏览器渲染
1. 分页显示,目前的渲染不会分页,而是内容有多长就有多高
1. 分栏显示,这个是因为没有分页导致的,不限制高度没法分栏
如果追求完整效果打印,目前只能使用下载文件的方式用本地 Word 进行打印。
@ -78,7 +108,7 @@ order: 23
默认情况下列表左侧的符号使用字体渲染,这样能做到最接近 Word 渲染效果,但如果用户的系统中没有这些字体就会显示乱码,为了解决这个问题需要手动在 amis 渲染的页面里导入对应的字体,比如
```html
```css
<style>
@font-face {
font-family: Wingdings;

BIN
examples/static/page.docx Normal file

Binary file not shown.

View File

@ -108,7 +108,64 @@ export class OfficeViewerPlugin extends BasePlugin {
type: 'input-kv',
label: '字体映射',
name: 'fontMapping'
}
},
getSchemaTpl('switch', {
label: '是否开启分页渲染',
name: 'page',
inline: true
}),
{
type: 'input-number',
label: '页上下边距',
name: 'pageMarginBottom',
visibleOn: 'data.page'
},
{
type: 'input-color',
label: '页背景色',
pipeIn: defaultValue('#FFFFFF'),
name: 'pageBackground',
visibleOn: 'data.page'
},
getSchemaTpl('switch', {
label: '是否显示页面阴影',
name: 'pageShadow',
inline: true,
visibleOn: 'data.page'
}),
getSchemaTpl('switch', {
label: '是否显示页面包裹',
name: 'pageWrap',
inline: true,
visibleOn: 'data.page'
}),
{
type: 'input-number',
label: '页面包裹宽度',
name: 'pageWrapPadding',
visibleOn: 'data.page'
},
{
type: 'input-color',
label: '页面包裹背景色',
pipeIn: defaultValue('#ECECEC'),
name: 'pageWrapBackground',
visibleOn: 'data.page'
},
{
type: 'input-number',
label: '缩放比例',
min: 0.1,
max: 1,
name: 'zoom',
visibleOn: 'data.page'
},
getSchemaTpl('switch', {
label: '自适应宽度',
name: 'zoomFitWidth',
inline: true,
visibleOn: 'data.page'
})
]
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`alt-text 1`] = `
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
<div
style="display: inline-block; width: 405.32px; height: 118.66px;"
>
<img
src="blob:http://localhost/mock"
style="position: relative; left: 0.00px; top: 0.00px; width: 405.32px; height: 118.66px;"
/>
</div>
</span>
</p>
</section>
</article>
`;

View File

@ -1,505 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`bold 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: "Times New Roman", var(--docx-theme-font-minorEastAsia);
}
.docx-viewer-0 .docx-classname-0 {
margin-left: 48.00px;
}
.docx-viewer-0 .docx-classname-1 {
margin-bottom: 10.67px;
line-height: 1.08;
}
.docx-viewer-0 .docx-classname-1 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-minorHAnsi);
font-size: 14.67px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
margin-bottom: 10.67px;
text-align: justify;
vertical-align: bottom;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
font-family: Georgia, SimSun;
color: #000000;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading1 {
margin-top: 32.00px;
text-align: left;
}
.docx-viewer-0 .docx-viewer-0-Heading1 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorEastAsia);
font-weight: bold;
font-size: 18.67px;
}
.docx-viewer-0 .docx-viewer-0-Heading2 {
margin-top: 13.33px;
text-align: left;
}
.docx-viewer-0 .docx-viewer-0-Heading2 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorEastAsia);
font-weight: bold;
font-size: 17.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading3 {
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading3 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
font-weight: bold;
color: black;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TOC3 {
margin-left: 56.00px;
}
.docx-viewer-0 .docx-viewer-0-BalloonText {
line-height: 1.00;
text-align: left;
}
.docx-viewer-0 .docx-viewer-0-BalloonText &gt; .docx-viewer-0-r {
font-family: Tahoma, var(--docx-theme-font-minorEastAsia);
color: black;
font-size: 10.67px;
}
.docx-viewer-0 .docx-viewer-0-Footer {
text-align: left;
}
.docx-viewer-0 .docx-viewer-0-Footer &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Header {
border-bottom: 1.00px solid black;
text-align: center;
}
.docx-viewer-0 .docx-viewer-0-Header &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-TOC1 {
margin-bottom: 6.67px;
}
.docx-viewer-0 .docx-viewer-0-TOC2 {
margin-bottom: 6.67px;
margin-left: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-NormalWeb {
margin-top: 6.67px;
margin-bottom: 6.67px;
line-height: 1.00;
text-align: left;
}
.docx-viewer-0 .docx-viewer-0-NormalWeb &gt; .docx-viewer-0-r {
font-family: SimSun;
color: black;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
border-top: 0.67px solid black;
border-left: 0.67px solid black;
border-bottom: 0.67px solid black;
border-right: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-Strong &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-Emphasis &gt; .docx-viewer-0-r {
font-style: italic;
}
.docx-viewer-0 .docx-viewer-0-Hyperlink &gt; .docx-viewer-0-r {
color: #0000FF;
text-decoration: underline;
}
.docx-viewer-0 .docx-viewer-0-Heading3Char &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
font-weight: bold;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading2Char &gt; .docx-viewer-0-r {
font-family: Georgia, var(--docx-theme-font-majorEastAsia);
font-weight: bold;
color: #000000;
font-size: 17.33px;
}
.docx-viewer-0 .docx-viewer-0-Char &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-BalloonTextChar &gt; .docx-viewer-0-r {
font-family: Tahoma;
font-size: 10.67px;
}
.docx-viewer-0 .docx-viewer-0-Heading1Char &gt; .docx-viewer-0-r {
font-family: Georgia, var(--docx-theme-font-majorEastAsia);
font-weight: bold;
color: #000000;
font-size: 18.67px;
}
.docx-viewer-0 .docx-viewer-0-a {
text-indent: 22.67px;
margin-left: 32.00px;
}
.docx-viewer-0 .docx-viewer-0-a &gt; .docx-viewer-0-r {
font-size: 14.00px;
}
.docx-viewer-0 .docx-viewer-0-HeaderChar &gt; .docx-viewer-0-r {
font-family: Times, SimSun, "Times New Roman";
color: #000000;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-FooterChar &gt; .docx-viewer-0-r {
font-family: Times, SimSun, "Times New Roman";
color: #000000;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-ListParagraph1 {
text-indent: 28.00px;
}
.docx-viewer-0 .docx-viewer-0-ListParagraph {
margin-left: 48.00px;
}
.docx-viewer-0 .docx-viewer-0-TOC10 {
margin-top: 16.00px;
margin-bottom: 0.00px;
line-height: 1.08;
}
.docx-viewer-0 .docx-viewer-0-TOC10 &gt; .docx-viewer-0-r {
font-weight: normal;
font-size: 21.33px;
}
.docx-viewer-0 .docx-viewer-0-TOCHeading1 {
margin-top: 16.00px;
margin-bottom: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TOCHeading1 &gt; .docx-viewer-0-r {
font-weight: normal;
font-size: 21.33px;
}
.docx-viewer-0 .docx-classname-2 {
margin-bottom: 16.00px;
line-height: 1.50;
}
.docx-viewer-0 .docx-classname-2 &gt; .docx-viewer-0-r {
font-family: SimSun;
color: black;
font-size: 16.00px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 120.00px 96.00px 120.00px;"
@ -544,59 +45,5 @@ font-size: 16.00px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
<div>
<div>
<p
class="docx-viewer-0-p"
style="margin-bottom: 0.00px; line-height: 1.00;"
>
<span
class="docx-viewer-0-r"
/>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
style="margin-bottom: 0.00px; line-height: 1.00;"
>
<span
class="docx-viewer-0-r"
>
<hr
style="border-top: 1px solid #bbb;"
/>
</span>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
style="line-height: 1.00;"
>
<span
class="docx-viewer-0-r"
/>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
style="line-height: 1.00;"
>
<span
class="docx-viewer-0-r"
>
<hr
style="border-top: 1px solid #bbb;"
/>
</span>
</p>
</div>
</div>
</div>
`;

View File

@ -1,95 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`br 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -115,9 +26,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -0,0 +1,120 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`break-page 1`] = `
<article>
<section
style="position: relative; width: 407.99px; padding: 24.00px 24.00px 24.00px 24.00px; column-count: 2; column-gap: 28.33px;"
>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
Word
</span>
<span
class="docx-viewer-0-r"
>
分栏的好处主要有:
</span>
</p>
<p
class="docx-viewer-0-p"
>
 
</p>
<p
class="docx-viewer-0-p docx-viewer-0-Normal docx-viewer-0-ListParagraph"
style="text-indent: -29.33px; margin-left: 29.33px;"
>
<span
style="font-family: Wingdings;"
>
</span>
<span
class="docx-viewer-0-r"
>
提高文档的阅读性:将版面分成多栏,可以提高文档的可读性,使版面显得更加生动活泼。
</span>
</p>
<p
class="docx-viewer-0-p docx-viewer-0-Normal docx-viewer-0-ListParagraph"
style="text-indent: -29.33px; margin-left: 29.33px;"
>
<span
style="font-family: Wingdings;"
>
</span>
<span
class="docx-viewer-0-r"
>
控制栏数、栏宽及栏间距:可以控制栏数、栏宽及栏间距,使版面更加美观。
</span>
</p>
<p
class="docx-viewer-0-p docx-viewer-0-Normal docx-viewer-0-ListParagraph"
style="text-indent: -29.33px; margin-left: 29.33px;"
>
<span
style="font-family: Wingdings;"
>
</span>
<span
class="docx-viewer-0-r"
>
设置分栏长度:可以很方便地设置分栏长度,使版面更加灵活。
</span>
</p>
<p
class="docx-viewer-0-p"
>
 
</p>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
总之,
</span>
<span
class="docx-viewer-0-r"
>
Word
</span>
<span
class="docx-viewer-0-r"
>
分栏可以提高文档的可读性和美观度,控制文档的页面布局和大小,方便用户查找和管理文档内容。
</span>
</p>
<p
class="docx-viewer-0-p"
style="text-align: left;"
>
<span
class="docx-viewer-0-r"
>
<br />
</span>
</p>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
<br />
<span>
第二页
</span>
</span>
</p>
</section>
</article>
`;

View File

@ -0,0 +1,30 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`cr 1`] = `
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
>
<p
class="docx-viewer-0-p"
style="margin-top: 6.67px; margin-bottom: 6.67px; text-align: left;"
>
<span
class="docx-viewer-0-r"
style="font-family: SimSun; font-size: 16.00px;"
>
换行
</span>
<span
class="docx-viewer-0-r"
style="font-family: SimSun; font-size: 16.00px;"
>
<br />
<span>
工具
</span>
</span>
</p>
</section>
</article>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`drop-cap 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -111,9 +26,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`em 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -143,9 +58,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,96 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`embed-font 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
@font-face {
font-family: 'Algerian';
src: url('blob:http://localhost/mock');
}
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -106,9 +16,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,128 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`hideMark 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-0 .docx-classname-0 {
border-collapse: collapse;
width: auto;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
}
</style>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
border-top: 0.67px solid black;
border-left: 0.67px solid black;
border-bottom: 0.67px solid black;
border-right: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid black;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -230,9 +108,5 @@ border-right: 0.67px solid black;
 
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`highlight 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -181,9 +96,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,86 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`image 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -102,9 +22,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,121 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`info 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-0 .docx-classname-0 {
border-collapse: collapse;
width: auto;
margin-left: 7.20px;
border-top: 2.00px solid black;
border-left: 2.00px solid black;
border-bottom: 2.00px solid black;
border-right: 2.00px solid black;
table-layout: fixed;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
border-top: 1.00px solid black;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
border-left: 1.00px solid black;
}
</style>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
font-family: "Times New Roman", SimSun;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -634,9 +519,5 @@ padding-right: 7.20px;
 
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,113 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`link 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-Hyperlink &gt; .docx-viewer-0-r {
color: #0563C1;
text-decoration: underline;
}
.docx-viewer-0 .docx-viewer-0-UnresolvedMention &gt; .docx-viewer-0-r {
color: #605E5C;
background-color: #E1DFDD;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -134,9 +27,5 @@ background-color: #E1DFDD;
</a>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,228 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`list 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-Heading1 {
margin-top: 22.67px;
margin-bottom: 22.00px;
line-height: 2.41;
}
.docx-viewer-0 .docx-viewer-0-Heading1 &gt; .docx-viewer-0-r {
font-weight: bold;
font-size: 29.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading2 {
margin-top: 17.33px;
margin-bottom: 17.33px;
line-height: 1.73;
}
.docx-viewer-0 .docx-viewer-0-Heading2 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
font-weight: bold;
font-size: 21.33px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-ListParagraph {
text-indent: 28.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading1Char &gt; .docx-viewer-0-r {
font-weight: bold;
font-size: 29.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading2Char &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
font-weight: bold;
font-size: 21.33px;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 {
border-collapse: collapse;
border-top: 0.67px solid #BFBFBF;
border-left: 0.67px solid #BFBFBF;
border-bottom: 0.67px solid #BFBFBF;
border-right: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -317,9 +95,5 @@ border-right: 0.67px solid #BFBFBF;
 
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,120 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`noBreakHyphen 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
margin-bottom: 13.33px;
line-height: 1.15;
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi);
font-size: 14.67px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
margin-bottom: 0.00px;
line-height: 1.00;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
margin-left: 0.00px;
border-top: 0.67px solid #000000;
border-left: 0.67px solid #000000;
border-bottom: 0.67px solid #000000;
border-right: 0.67px solid #000000;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #000000;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #000000;
}
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -149,9 +35,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`pinyin 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -137,9 +52,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,120 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`sdt 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
margin-bottom: 13.33px;
line-height: 1.15;
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi);
font-size: 14.67px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
margin-bottom: 0.00px;
line-height: 1.00;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
margin-left: 0.00px;
border-top: 0.67px solid #000000;
border-left: 0.67px solid #000000;
border-bottom: 0.67px solid #000000;
border-right: 0.67px solid #000000;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #000000;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #000000;
}
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -196,9 +82,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`svg 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -107,9 +22,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,95 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`sym 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -110,9 +21,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,121 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`tableborder 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-0 .docx-classname-0 {
border-collapse: collapse;
width: 605.98px;
margin-left: -10.80px;
border-top: 0.67px solid black;
border-left: 0.67px solid black;
border-bottom: 0.67px solid black;
border-right: 0.67px solid black;
table-layout: fixed;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid black;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid black;
}
</style>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
font-family: "Times New Roman", SimSun;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -299,9 +184,5 @@ padding-right: 7.20px;
 
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,786 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`tablestyle 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-0 .docx-classname-0 {
border-collapse: collapse;
width: auto;
}
.docx-viewer-0 .docx-classname-0 &gt; tbody &gt; tr &gt; td {
}
</style>
<style>
.docx-viewer-0 .docx-classname-1 {
border-collapse: collapse;
width: auto;
}
.docx-viewer-0 .docx-classname-1 &gt; tbody &gt; tr &gt; td {
}
</style>
<style>
.docx-viewer-0 .docx-classname-2 {
border-collapse: collapse;
width: auto;
}
.docx-viewer-0 .docx-classname-2 &gt; tbody &gt; tr &gt; td {
}
</style>
<style>
.docx-viewer-0 .docx-classname-3 {
border-collapse: collapse;
width: auto;
}
.docx-viewer-0 .docx-classname-3 &gt; tbody &gt; tr &gt; td {
}
</style>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
border-top: 0.67px solid black;
border-left: 0.67px solid black;
border-bottom: 0.67px solid black;
border-right: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5 {
border-collapse: collapse;
border-top: 0.67px solid #FFFFFF;
border-left: 0.67px solid #FFFFFF;
border-bottom: 0.67px solid #FFFFFF;
border-right: 0.67px solid #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5 &gt; tbody &gt; tr &gt; td {
background-color: #DEEAF6;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #BDD6EE;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #BDD6EE;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol {
border-top: 0.67px solid #FFFFFF;
border-left: 0.67px solid #FFFFFF;
border-bottom: 0.67px solid #FFFFFF;
background-color: #5B9BD5;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: 0.67px solid #FFFFFF;
border-left: 0.67px solid #FFFFFF;
border-right: 0.67px solid #FFFFFF;
background-color: #5B9BD5;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol {
border-top: 0.67px solid #FFFFFF;
border-bottom: 0.67px solid #FFFFFF;
border-right: 0.67px solid #FFFFFF;
background-color: #5B9BD5;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-left: 0.67px solid #FFFFFF;
border-bottom: 0.67px solid #FFFFFF;
border-right: 0.67px solid #FFFFFF;
background-color: #5B9BD5;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable5Dark-Accent5.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3 {
border-collapse: collapse;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol {
border-right: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
text-transform: uppercase;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-bottom: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
text-transform: uppercase;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol {
border-left: none;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
text-transform: uppercase;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
text-transform: uppercase;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3. &gt; tbody &gt; tr &gt; td.neCell {
border-left: none;
}
.docx-viewer-0 .docx-viewer-0-PlainTable3. &gt; tbody &gt; tr &gt; td.nwCell {
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2 {
border-collapse: collapse;
border-top: 0.67px solid #7F7F7F;
border-bottom: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
border-top: 0.67px solid #7F7F7F;
border-bottom: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
border-left: 0.67px solid #7F7F7F;
border-right: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-vBand &gt; tbody &gt; tr &gt; td.band2Vert {
border-left: 0.67px solid #7F7F7F;
border-right: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-bottom: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #7F7F7F;
}
.docx-viewer-0 .docx-viewer-0-PlainTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 {
border-collapse: collapse;
border-top: 0.67px solid #BFBFBF;
border-left: 0.67px solid #BFBFBF;
border-bottom: 0.67px solid #BFBFBF;
border-right: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #F2F2F2;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #BFBFBF;
}
.docx-viewer-0 .docx-viewer-0-PlainTable1.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable2 {
border-collapse: collapse;
border-top: 0.33px solid #666666;
border-bottom: 0.33px solid #666666;
}
.docx-viewer-0 .docx-viewer-0-GridTable2 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-GridTable2 &gt; tbody &gt; tr &gt; td {
border-top: 0.33px solid #666666;
}
.docx-viewer-0 .docx-viewer-0-GridTable2 &gt; tbody &gt; tr &gt; td {
border-left: 0.33px solid #666666;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #CCCCCC;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #CCCCCC;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: none;
border-bottom: 2.00px solid #666666;
background-color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.33px solid #666666;
border-bottom: none;
background-color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6 {
border-collapse: collapse;
border-top: 0.67px solid #A8D08D;
border-left: 0.67px solid #A8D08D;
border-bottom: 0.67px solid #A8D08D;
border-right: 0.67px solid #A8D08D;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #A8D08D;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #A8D08D;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #E2EFD9;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #E2EFD9;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: 0.67px solid #70AD47;
border-left: 0.67px solid #70AD47;
border-bottom: 0.67px solid #70AD47;
border-right: 0.67px solid #70AD47;
background-color: #70AD47;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #70AD47;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent6.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3 {
border-collapse: collapse;
border-top: 0.67px solid #C9C9C9;
border-left: 0.67px solid #C9C9C9;
border-bottom: 0.67px solid #C9C9C9;
border-right: 0.67px solid #C9C9C9;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #C9C9C9;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #C9C9C9;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #EDEDED;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #EDEDED;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: 0.67px solid #A5A5A5;
border-left: 0.67px solid #A5A5A5;
border-bottom: 0.67px solid #A5A5A5;
border-right: 0.67px solid #A5A5A5;
background-color: #A5A5A5;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-top: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-left: none;
border-right: none;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
color: #FFFFFF;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #A5A5A5;
}
.docx-viewer-0 .docx-viewer-0-GridTable4-Accent3.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2 &gt; .docx-viewer-0-r {
color: #C45911;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2 {
border-collapse: collapse;
border-top: 0.67px solid #F4B083;
border-left: 0.67px solid #F4B083;
border-bottom: 0.67px solid #F4B083;
border-right: 0.67px solid #F4B083;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2 &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2 &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid #F4B083;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2 &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid #F4B083;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-hBand &gt; tbody &gt; tr &gt; td.band1Horz {
background-color: #FBE4D5;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-vBand &gt; tbody &gt; tr &gt; td.band1Vert {
background-color: #FBE4D5;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-firstColumn &gt; tbody &gt; tr &gt; td.firstCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow {
border-bottom: 2.00px solid #F4B083;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-firstRow &gt; tbody &gt; tr &gt; td.firstRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-lastColumn &gt; tbody &gt; tr &gt; td.lastCol &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow {
border-top: 0.67px solid #F4B083;
}
.docx-viewer-0 .docx-viewer-0-GridTable6Colorful-Accent2.enable-lastRow &gt; tbody &gt; tr &gt; td.lastRow &gt; .docx-viewer-0-p &gt; .docx-viewer-0-r {
font-weight: bold;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -1348,9 +568,5 @@ border-right: 0.67px solid #F4B083;
 
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,670 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`textbox-background 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
margin-top: 6.67px;
margin-bottom: 13.33px;
line-height: 1.15;
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
}
.docx-viewer-0 .docx-viewer-0-Normal {
margin-top: 0.00px;
margin-bottom: 0.00px;
line-height: 1.00;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading1 {
border-top: 4.00px solid #4F81BD;
border-left: 4.00px solid #4F81BD;
border-bottom: 4.00px solid #4F81BD;
border-right: 4.00px solid #4F81BD;
background-color: #4F81BD;
}
.docx-viewer-0 .docx-viewer-0-Heading1 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #FFFFFF;
font-size: 14.67px;
}
.docx-viewer-0 .docx-viewer-0-Heading2 {
border-top: 4.00px solid #DBE5F1;
border-left: 4.00px solid #DBE5F1;
border-bottom: 4.00px solid #DBE5F1;
border-right: 4.00px solid #DBE5F1;
background-color: #DBE5F1;
}
.docx-viewer-0 .docx-viewer-0-Heading2 &gt; .docx-viewer-0-r {
text-transform: uppercase;
}
.docx-viewer-0 .docx-viewer-0-Heading3 {
border-top: 1.00px solid #4F81BD;
margin-top: 20.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading3 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #243F60;
}
.docx-viewer-0 .docx-viewer-0-Heading4 {
border-top: 1.00px solid #4F81BD;
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading4 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading5 {
border-bottom: 1.00px solid #4F81BD;
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading5 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading6 {
border-bottom: 1.00px solid #4F81BD;
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading6 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading7 {
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading7 &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading8 {
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading8 &gt; .docx-viewer-0-r {
text-transform: uppercase;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading9 {
margin-top: 13.33px;
}
.docx-viewer-0 .docx-viewer-0-Heading9 &gt; .docx-viewer-0-r {
font-style: italic;
text-transform: uppercase;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-Heading1Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #FFFFFF;
font-size: 14.67px;
background-color: #4F81BD;
}
.docx-viewer-0 .docx-viewer-0-Heading2Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
font-size: 12.00px;
background-color: #DBE5F1;
}
.docx-viewer-0 .docx-viewer-0-Heading3Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #243F60;
}
.docx-viewer-0 .docx-viewer-0-Heading4Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading5Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading6Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading7Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #365F91;
}
.docx-viewer-0 .docx-viewer-0-Heading8Char &gt; .docx-viewer-0-r {
text-transform: uppercase;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading9Char &gt; .docx-viewer-0-r {
font-style: italic;
text-transform: uppercase;
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Caption &gt; .docx-viewer-0-r {
font-weight: bold;
color: #365F91;
font-size: 10.67px;
}
.docx-viewer-0 .docx-viewer-0-Title &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
text-transform: uppercase;
color: #4F81BD;
font-size: 34.67px;
}
.docx-viewer-0 .docx-viewer-0-TitleChar &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
text-transform: uppercase;
color: #4F81BD;
font-size: 34.67px;
}
.docx-viewer-0 .docx-viewer-0-Subtitle {
margin-bottom: 33.33px;
}
.docx-viewer-0 .docx-viewer-0-Subtitle &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #595959;
font-size: 14.00px;
}
.docx-viewer-0 .docx-viewer-0-SubtitleChar &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #595959;
font-size: 14.00px;
}
.docx-viewer-0 .docx-viewer-0-Strong &gt; .docx-viewer-0-r {
font-weight: bold;
}
.docx-viewer-0 .docx-viewer-0-Emphasis &gt; .docx-viewer-0-r {
text-transform: uppercase;
color: #243F60;
}
.docx-viewer-0 .docx-viewer-0-NoSpacing {
margin-bottom: 0.00px;
line-height: 1.00;
}
.docx-viewer-0 .docx-viewer-0-Quote &gt; .docx-viewer-0-r {
font-style: italic;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-QuoteChar &gt; .docx-viewer-0-r {
font-style: italic;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-IntenseQuote {
margin-top: 16.00px;
margin-bottom: 16.00px;
margin-left: 72.00px;
margin-right: 72.00px;
text-align: center;
}
.docx-viewer-0 .docx-viewer-0-IntenseQuote &gt; .docx-viewer-0-r {
color: #4F81BD;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-IntenseQuoteChar &gt; .docx-viewer-0-r {
color: #4F81BD;
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-SubtleEmphasis &gt; .docx-viewer-0-r {
font-style: italic;
color: #243F60;
}
.docx-viewer-0 .docx-viewer-0-IntenseEmphasis &gt; .docx-viewer-0-r {
font-weight: bold;
text-transform: uppercase;
color: #243F60;
}
.docx-viewer-0 .docx-viewer-0-SubtleReference &gt; .docx-viewer-0-r {
font-weight: bold;
color: #4F81BD;
}
.docx-viewer-0 .docx-viewer-0-IntenseReference &gt; .docx-viewer-0-r {
font-weight: bold;
font-style: italic;
text-transform: uppercase;
color: #4F81BD;
}
.docx-viewer-0 .docx-viewer-0-BookTitle &gt; .docx-viewer-0-r {
font-weight: bold;
font-style: italic;
}
.docx-viewer-0 .docx-viewer-0-TOCHeading {
}
.docx-viewer-0 .docx-viewer-0-ListParagraph {
text-indent: 28.00px;
}
.docx-viewer-0 .docx-viewer-0-Header {
border-bottom: 1.00px solid black;
text-align: center;
}
.docx-viewer-0 .docx-viewer-0-Header &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-HeaderChar &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-Footer {
}
.docx-viewer-0 .docx-viewer-0-Footer &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-FooterChar &gt; .docx-viewer-0-r {
font-size: 12.00px;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
margin-top: 0.00px;
margin-bottom: 0.00px;
line-height: 1.00;
}
.docx-viewer-0 .docx-viewer-0-TableGrid {
border-collapse: collapse;
border-top: 0.67px solid black;
border-left: 0.67px solid black;
border-bottom: 0.67px solid black;
border-right: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-top: 0.67px solid black;
}
.docx-viewer-0 .docx-viewer-0-TableGrid &gt; tbody &gt; tr &gt; td {
border-left: 0.67px solid black;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 793.71px; padding: 75.60px 75.60px 75.60px 75.60px;"
@ -692,55 +28,5 @@ border-right: 0.67px solid black;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
<div>
<div>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
/>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
<hr
style="border-top: 1px solid #bbb;"
/>
</span>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
/>
</p>
</div>
<div>
<p
class="docx-viewer-0-p"
>
<span
class="docx-viewer-0-r"
>
<hr
style="border-top: 1px solid #bbb;"
/>
</span>
</p>
</div>
</div>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`textbox-behindDoc 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -152,9 +67,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`textbox-rotation 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -132,9 +47,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,95 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`text 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-Normal &gt; .docx-viewer-0-r {
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -338,9 +249,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,91 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`textbox 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Normal {
text-align: justify;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -194,9 +109,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,126 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`tooltip 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading1 {
margin-top: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-Heading1 &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
color: #2E74B5;
font-size: 21.33px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
.docx-viewer-0 .docx-viewer-0-Heading1Char &gt; .docx-viewer-0-r {
font-family: var(--docx-theme-font-majorHAnsi), var(--docx-theme-font-majorEastAsia);
color: #2E74B5;
font-size: 21.33px;
}
.docx-viewer-0 .docx-viewer-0-Hyperlink &gt; .docx-viewer-0-r {
color: #0563C1;
text-decoration: underline;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 793.31px; padding: 94.46px 94.46px 94.46px 94.46px;"
@ -161,9 +41,5 @@ text-decoration: underline;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -1,86 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`w 1`] = `
<div
class="docx-viewer-0 docx-viewer-wrapper"
id="root"
>
<style>
.docx-viewer-wrapper {
}
.docx-viewer-wrapper &gt; article &gt; section {
background: white;
}
/** docDefaults **/
.docx-viewer-0 p {
margin: 0;
padding: 0;
line-height: 1.5;
}
.docx-viewer-0 table {
border-spacing: 0;
}
.docx-viewer-0 .docx-viewer-0-p {
}
.docx-viewer-0 .docx-viewer-0-r {
white-space: pre-wrap;
overflow-wrap: break-word;
font-family: var(--docx-theme-font-minorHAnsi), var(--docx-theme-font-minorEastAsia);
font-size: 16.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal {
border-collapse: collapse;
margin-left: 0.00px;
}
.docx-viewer-0 .docx-viewer-0-TableNormal &gt; tbody &gt; tr &gt; td {
padding-top: 0.00px;
padding-left: 7.20px;
padding-bottom: 0.00px;
padding-right: 7.20px;
}
</style>
<style>
/** embedded fonts **/
</style>
<article>
<section
style="position: relative; width: 815.98px; padding: 96.00px 96.00px 96.00px 96.00px;"
@ -96,9 +16,5 @@ padding-right: 7.20px;
</span>
</p>
</section>
<section
style="position: relative;"
/>
</article>
</div>
`;

View File

@ -0,0 +1,5 @@
import {snapShotTest} from '../snapShotTest';
test('all-shape-1', async () => {
snapShotTest('./docx/simple/all-shape-1.xml');
});

View File

@ -0,0 +1,5 @@
import {snapShotTest} from '../snapShotTest';
test('all-shape-2', async () => {
snapShotTest('./docx/simple/all-shape-2.xml');
});

View File

@ -0,0 +1,5 @@
import {snapShotTest} from '../snapShotTest';
test('alt-text', async () => {
snapShotTest('./docx/simple/alt-text.xml');
});

View File

@ -0,0 +1,5 @@
import {snapShotTest} from '../snapShotTest';
test('break-page', async () => {
snapShotTest('./docx/simple/break-page.xml');
});

View File

@ -0,0 +1,5 @@
import {snapShotTest} from '../snapShotTest';
test('cr', async () => {
snapShotTest('./docx/simple/cr.xml');
});

View File

@ -24,5 +24,6 @@ export async function snapShotTest(filePath: string) {
const word = createWord(filePath, {});
await word.render(root);
expect(root).toMatchSnapshot();
// 样式后续单独测试,不然太多冗余了
expect(root.getElementsByTagName('article')[0]).toMatchSnapshot();
}

View File

@ -30,7 +30,6 @@ const fileLists = {
'shadow.xml',
'shape-ellipse.xml',
'shape-custom.xml',
'shape-custom.xml',
'all-shape-1.xml',
'all-shape-2.xml',
'tableborder.xml',
@ -64,10 +63,35 @@ const fileLists = {
]
};
// local storage 里的 key
const pageKey = 'page';
const page = !!localStorage.getItem(pageKey) || false;
if (page) {
// 不知道为啥,大概是 vite 的问题
setTimeout(() => {
const pageSwitch = document.getElementById(
'switchPage'
)! as HTMLInputElement;
pageSwitch.checked = true;
}, 0);
}
(window as any).switchPage = (checked: boolean) => {
if (checked) {
localStorage.setItem(pageKey, 'true');
} else {
localStorage.removeItem(pageKey);
}
location.reload();
};
/**
*
*/
(function genFileList() {
const fileListElement = document.getElementById('fileList')!;
for (const dirName in fileLists) {
fileListElement.innerHTML += `<h2 class="dir">${dirName}</h2>`;
@ -85,26 +109,21 @@ const fileLists = {
renderDocx(fileName);
});
});
})();
const data = {
var: 'amis'
};
function replaceText(text: string) {
// 将 {{xxx}} 替换成 ${xxx},为啥要这样呢,因为输入 $ 可能会变成两段文本
text = text.replace(/{{/g, '${').replace(/}}/g, '}');
return text;
}
const renderOptions = {
debug: true,
page,
zoomFitWidth: true
};
async function renderDocx(fileName: string) {
const filePath = `${testDir}/${fileName}`;
const file = await (await fetch(filePath)).arrayBuffer();
let word: Word;
const renderOptions = {
debug: true
// replaceText
};
if (filePath.endsWith('.xml')) {
word = new Word(file, renderOptions, new XMLPackageParser());
} else {
@ -158,9 +177,9 @@ function renderWord(file: File) {
const data = reader.result as ArrayBuffer;
let word;
if (file.name.endsWith('.xml')) {
word = new Word(data, {}, new XMLPackageParser());
word = new Word(data, renderOptions, new XMLPackageParser());
} else {
word = new Word(data, {});
word = new Word(data, renderOptions);
}
word.render(viewerElement);
};

View File

@ -28,7 +28,7 @@ body {
.file-list {
flex: none;
width: 140px;
width: 100px;
padding-top: 4px;
padding-left: 4px;
white-space: nowrap;
@ -43,3 +43,65 @@ body {
.file:hover {
color: hsl(217, 71%, 53%);
}
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 30px;
height: 18px;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: 0.4s;
transition: 0.4s;
}
.slider:before {
position: absolute;
content: '';
height: 16px;
width: 16px;
left: 1px;
bottom: 1px;
background-color: white;
-webkit-transition: 0.4s;
transition: 0.4s;
}
input:checked + .slider {
background-color: #2196f3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196f3;
}
input:checked + .slider:before {
-webkit-transform: translateX(12px);
transform: translateX(12px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}

View File

@ -9,8 +9,19 @@
<body>
<div class="columns">
<div class="column file-list" id="fileList">
<button type="button" onclick="downloadDocx()">download</button>
<button type="button" onclick="downloadDocx()">dl</button>
<button type="button" onclick="printDocx()">print</button>
<p id="page">
page
<label class="switch">
<input
type="checkbox"
onchange="switchPage(this.checked)"
id="switchPage"
/>
<span class="slider round" id="pageSlider"></span>
</label>
</p>
</div>
<div class="column">
<div id="viewer"></div>

View File

@ -42,11 +42,6 @@ export interface WordRenderOptions {
*/
bulletUseFont: boolean;
/**
*
*/
inWrap: boolean;
/**
*
*/
@ -104,18 +99,71 @@ export interface WordRenderOptions {
*
*/
printWaitTime?: number;
/**
* 使使
* ignoreHeight ignoreWidth false
*/
page?: boolean;
/**
*
*/
pageMarginBottom?: number;
/**
*
*/
pageBackground?: string;
/**
* page true
*/
pageShadow?: boolean;
/**
* page true
*/
pageWrap?: boolean;
/**
*
*/
pageWrapPadding?: number;
/**
*
*/
pageWrapBackground?: string;
/**
* 0-1
*/
zoom?: number;
/**
* zoom zoom ignoreWidth false
*/
zoomFitWidth?: boolean;
}
const defaultRenderOptions: WordRenderOptions = {
classPrefix: 'docx-viewer',
inWrap: true,
page: false,
pageWrap: true,
bulletUseFont: true,
ignoreHeight: true,
ignoreWidth: false,
minLineHeight: 1.0,
enableVar: false,
debug: false,
pageWrapPadding: 20,
pageMarginBottom: 20,
pageShadow: true,
pageBackground: '#FFFFFF',
pageWrapBackground: '#ECECEC',
printWaitTime: 100,
zoomFitWidth: false,
data: {},
evalVar: t => {
return t;
@ -227,9 +275,19 @@ export default class Word {
this.id = Word.globalId++;
this.parser = parser;
this.renderOptions = {...defaultRenderOptions, ...renderOptions};
if (this.renderOptions.page) {
this.renderOptions.ignoreHeight = false;
this.renderOptions.ignoreWidth = false;
}
}
inited = false;
/**
* true
*/
breakPage = false;
/**
*
*/
@ -578,7 +636,8 @@ export default class Word {
document.body.appendChild(iframe);
iframe.contentDocument?.write('<div id="print"></div>');
await this.render(
iframe.contentDocument?.getElementById('print') as HTMLElement
iframe.contentDocument?.getElementById('print') as HTMLElement,
{page: false, pageWrap: false}
);
setTimeout(function () {
iframe.focus();
@ -592,10 +651,14 @@ export default class Word {
*
*
* @param root
* @param renderOptionsOverride
*/
async render(root: HTMLElement) {
async render(
root: HTMLElement,
renderOptionsOverride: Partial<WordRenderOptions> = {}
) {
this.init();
const renderOptions = this.renderOptions;
const renderOptions = {...this.renderOptions, ...renderOptionsOverride};
const isDebug = renderOptions.debug;
isDebug && console.log('init', this);
@ -614,10 +677,13 @@ export default class Word {
const document = WDocument.fromXML(this, documentData);
isDebug && console.log('document', document);
const documentElement = renderDocument(this, document);
const documentElement = renderDocument(root, this, document, renderOptions);
root.classList.add(this.getClassPrefix());
if (renderOptions.inWrap) {
if (renderOptions.page && renderOptions.pageWrap) {
root.classList.add(this.wrapClassName);
root.style.padding = `${renderOptions.pageWrapPadding || 0}px`;
root.style.background = renderOptions.pageWrapBackground || '#ECECEC';
}
appendChild(root, renderStyle(this));

View File

@ -62,6 +62,10 @@ export class Body {
}
}
// 过滤掉没内容的 section一般是最后一个
body.sections = body.sections.filter(
section => section.children.length > 0
);
return body;
}
}

View File

@ -104,7 +104,9 @@ export class Run {
break;
case 'w:lastRenderedPageBreak':
// 目前也不支持分页显示
const pageBreak = new Break();
pageBreak.type = 'page';
run.addChild(pageBreak);
break;
case 'w:pict':

View File

@ -11,6 +11,7 @@ import {Hyperlink} from './Hyperlink';
import {Paragraph} from './Paragraph';
import {Table} from './Table';
import {Body} from './Body';
import {getAttrNumber} from '../../OpenXML';
export type PageSize = {
width: string;
@ -28,9 +29,12 @@ export type PageMargin = {
gutter?: string;
};
/**
*
*/
export interface Column {
width?: number;
space?: number;
num?: number;
space?: string;
}
export type SectionChild = Paragraph | Table | Hyperlink;
@ -38,6 +42,7 @@ export type SectionChild = Paragraph | Table | Hyperlink;
export interface SectionPr {
pageSize?: PageSize;
pageMargin?: PageMargin;
cols?: Column;
}
export class Section {
@ -78,7 +83,6 @@ export class Section {
const headerType = child.getAttribute('w:type');
const headerId = child.getAttribute('r:id');
// 目前只支持 default 且只支持背景图
// TODO: 这里 rel 不对,需要用 "/word/_rels/header1.xml.rels后面得想想怎么改
if (headerType === 'default' && headerId) {
const headerRel = word.getDocumentRels(headerId);
if (headerRel) {
@ -92,6 +96,17 @@ export class Section {
}
break;
case 'w:cols':
const cols: Column = {};
const num = getAttrNumber(child, 'w:num', 1);
cols.num = num;
const space = parseSize(child, 'w:space');
if (space) {
cols.space = space;
}
properties.cols = cols;
break;
default:
break;
}

View File

@ -2,34 +2,246 @@
* body
*/
import {createElement, appendChild} from '../util/dom';
import Word from '../Word';
import {createElement, appendChild, removeChild} from '../util/dom';
import Word, {WordRenderOptions} from '../Word';
import {Body} from '../openxml/word/Body';
import {Paragraph} from '../openxml/word/Paragraph';
import {Table} from '../openxml/word/Table';
import {Hyperlink} from '../openxml/word/Hyperlink';
import renderParagraph from './renderParagraph';
import {renderSection} from './renderSection';
import renderTable from './renderTable';
import {Section} from '../openxml/word/Section';
export default function renderBody(
/**
* section section
*/
function createNewSection(
word: Word,
parent: HTMLElement,
body: Body
sectionEnd: SectionEnd,
child: HTMLElement
) {
for (const section of body.sections) {
const sectionEl = renderSection(word, section);
appendChild(parent, sectionEl);
// 支持插入分页符
if (word.breakPage) {
word.breakPage = false;
return true;
}
const childBound = child.getBoundingClientRect();
return (
childBound.top + childBound.height > sectionEnd.bottom ||
// 注意这里没有 + childBound.width因为 width 一般都是 100% 导致容易超出
childBound.left > sectionEnd.right
);
}
/**
* section section
*/
function appendToSection(
word: Word,
renderOptions: WordRenderOptions,
bodyEl: HTMLElement,
sectionEl: HTMLElement,
sectionEnd: SectionEnd,
section: Section,
child: HTMLElement
) {
// 首先尝试写入
appendChild(sectionEl, child);
// 如果超出了就新建一个 section
if (createNewSection(word, sectionEnd, child)) {
const newChild = child.cloneNode(true) as HTMLElement;
removeChild(sectionEl, child);
let newSectionEl = renderSection(word, section, renderOptions);
appendChild(bodyEl, newSectionEl);
appendChild(newSectionEl, newChild);
sectionEnd = getSectionEnd(section, newSectionEl);
return {sectionEl: newSectionEl, sectionEnd};
}
return {sectionEl, sectionEnd};
}
type SectionEnd = {
bottom: number;
right: number;
};
/**
* section
*/
function getSectionEnd(section: Section, sectionEl: HTMLElement): SectionEnd {
const sectionBound = sectionEl.getBoundingClientRect();
const pageMargin = section.properties.pageMargin;
let bottom = sectionBound.top + sectionBound.height;
if (pageMargin?.bottom) {
bottom = bottom - parseInt(pageMargin.bottom.replace('px', ''), 10);
}
let right = sectionBound.left + sectionBound.width;
if (pageMargin?.right) {
right = right - parseInt(pageMargin.right.replace('px', ''), 10);
}
return {bottom, right};
}
/**
*
*/
function getTransform(
rootWidth: number,
section: Section,
renderOptions: WordRenderOptions
) {
const props = section.properties;
const pageSize = props.pageSize;
if (renderOptions.zoomFitWidth && !renderOptions.ignoreWidth) {
const pageWidth = pageSize?.width;
if (rootWidth && pageWidth) {
let pageWidthNum = parseInt(pageWidth.replace('px', ''), 10);
if (props.pageMargin) {
const pageMargin = props.pageMargin;
pageWidthNum += pageMargin.left
? parseInt(pageMargin.left.replace('px', ''), 10)
: 0;
pageWidthNum += pageMargin.right
? parseInt(pageMargin.right.replace('px', ''), 10)
: 0;
}
const zoomWidth = rootWidth / pageWidthNum;
return zoomWidth;
}
}
return 1;
}
/**
*
* @param isLastSection
*/
function renderSectionInPage(
word: Word,
bodyEl: HTMLElement,
renderOptions: WordRenderOptions,
sectionEl: HTMLElement,
section: Section,
isLastSection: boolean
) {
// 如果不 setTimeout 取到的位置信息不对
setTimeout(() => {
let sectionEnd = getSectionEnd(section, sectionEl);
for (const child of section.children) {
if (child instanceof Paragraph) {
const p = renderParagraph(word, child);
const appendResult = appendToSection(
word,
renderOptions,
bodyEl,
sectionEl,
sectionEnd,
section,
p
);
sectionEl = appendResult.sectionEl;
sectionEnd = appendResult.sectionEnd;
} else if (child instanceof Table) {
const table = renderTable(word, child);
const appendResult = appendToSection(
word,
renderOptions,
bodyEl,
sectionEl,
sectionEnd,
section,
table
);
sectionEl = appendResult.sectionEl;
sectionEnd = appendResult.sectionEnd;
} else {
console.warn('unknown child', child);
}
}
if (isLastSection) {
sectionEl.style.marginBottom = '0';
}
}, 0);
}
/**
*
*/
export default function renderBody(
root: HTMLElement,
word: Word,
bodyEl: HTMLElement,
body: Body,
renderOptions: WordRenderOptions
) {
const page = renderOptions.page || false;
const rootWidth =
root.getBoundingClientRect().width -
(renderOptions.pageWrapPadding || 0) * 2;
const zooms: number[] = [];
let index = 0;
const sections = body.sections;
const sectionLength = sections.length;
// 用于最后一个 section 不加 margin-bottom
let isLastSection = false;
for (const section of sections) {
zooms.push(getTransform(rootWidth, section, renderOptions));
let sectionEl = renderSection(word, section, renderOptions);
appendChild(bodyEl, sectionEl);
index = index + 1;
if (index === sectionLength) {
isLastSection = true;
}
if (page) {
renderSectionInPage(
word,
bodyEl,
renderOptions,
sectionEl,
section,
isLastSection
);
} else {
for (const child of section.children) {
if (child instanceof Paragraph) {
const p = renderParagraph(word, child);
appendChild(sectionEl, p);
} else if (child instanceof Table) {
appendChild(sectionEl, renderTable(word, child));
const table = renderTable(word, child);
appendChild(sectionEl, table);
} else {
console.warn('unknown child', child);
}
}
appendChild(parent, sectionEl);
}
}
setTimeout(() => {
if (renderOptions.zoom) {
// 固定缩放
bodyEl.style.transformOrigin = '0 0';
bodyEl.style.transform = `scale(${renderOptions.zoom})`;
} else if (
renderOptions.page &&
renderOptions.zoomFitWidth &&
!renderOptions.ignoreWidth
) {
// 自适应宽度的缩放
const minZoom = Math.min(...zooms);
bodyEl.style.transformOrigin = '0 0';
bodyEl.style.transform = `scale(${minZoom})`;
}
}, 0);
}

View File

@ -1,3 +1,4 @@
import Word from '../Word';
import {Break} from '../openxml/word/Break';
import {createElement} from '../util/dom';
@ -6,7 +7,10 @@ import {createElement} from '../util/dom';
* column page
* @returns dom
*/
export function renderBr(brak: Break) {
export function renderBr(word: Word, brak: Break) {
if (brak.type === 'page') {
word.breakPage = true;
}
const br = createElement('br');
return br;
}

View File

@ -1,5 +1,5 @@
import {createElement} from '../util/dom';
import Word from '../Word';
import Word, {WordRenderOptions} from '../Word';
import renderBody from './renderBody';
import {WDocument} from '../openxml/word/WDocument';
@ -8,8 +8,13 @@ import {WDocument} from '../openxml/word/WDocument';
* document
* http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/document.html
*/
export default function renderDocument(word: Word, document: WDocument) {
export default function renderDocument(
root: HTMLElement,
word: Word,
document: WDocument,
renderOptions: WordRenderOptions
) {
const doc = createElement('article');
renderBody(word, doc, document.body);
renderBody(root, word, doc, document.body, renderOptions);
return doc;
}

View File

@ -102,7 +102,7 @@ export default function renderRun(
renderText(newSpan, word, child.text, paragraph);
appendChild(span, newSpan);
} else if (child instanceof Break) {
const br = renderBr(child);
const br = renderBr(word, child);
appendChild(span, br);
} else if (child instanceof Drawing) {
appendChild(span, renderDrawing(word, child));

View File

@ -1,29 +1,49 @@
import {Section} from '../openxml/word/Section';
import {createElement} from '../util/dom';
import Word from '../Word';
import Word, {WordRenderOptions} from '../Word';
/**
* word
*/
export function renderSection(word: Word, section: Section) {
export function renderSection(
word: Word,
section: Section,
renderOptions: WordRenderOptions
) {
const sectionEl = createElement('section') as HTMLElement;
// 用于后续绝对定位
sectionEl.style.position = 'relative';
if (renderOptions.page) {
sectionEl.style.overflow = 'hidden';
if (renderOptions.pageMarginBottom) {
sectionEl.style.marginBottom = renderOptions.pageMarginBottom + 'px';
}
if (renderOptions.pageShadow) {
sectionEl.style.boxShadow = '0 0 8px rgba(0, 0, 0, 0.5)';
}
if (renderOptions.pageBackground) {
sectionEl.style.background = renderOptions.pageBackground;
}
}
const props = section.properties;
const pageSize = props.pageSize;
if (pageSize) {
if (!word.renderOptions.ignoreWidth) {
if (!renderOptions.ignoreWidth) {
sectionEl.style.width = pageSize.width;
}
if (!word.renderOptions.ignoreHeight) {
if (!renderOptions.ignoreHeight) {
sectionEl.style.height = pageSize.height;
}
}
// 强制控制 padding
if (word.renderOptions.padding) {
sectionEl.style.padding = word.renderOptions.padding;
if (renderOptions.padding) {
sectionEl.style.padding = renderOptions.padding;
} else {
const pageMargin = props.pageMargin;
if (pageMargin) {
@ -34,5 +54,14 @@ export function renderSection(word: Word, section: Section) {
}
}
if (props.cols) {
if (props.cols.num && props.cols.num > 1) {
sectionEl.style.columnCount = '' + props.cols.num;
if (props.cols.space) {
sectionEl.style.columnGap = props.cols.space;
}
}
}
return sectionEl;
}

View File

@ -27,13 +27,7 @@ function generateDefaultStyle(word: Word) {
const classPrefix = word.getClassPrefix();
return `
.${word.wrapClassName} {
}
.${word.wrapClassName} > article > section {
background: white;
}
/** docDefaults **/

View File

@ -47,13 +47,6 @@ export function createSVGElement(tagName: string): SVGElement {
return document.createElementNS('http://www.w3.org/2000/svg', tagName);
}
/**
*
*/
export function createDocumentFragment() {
return document.createDocumentFragment();
}
/**
*
*/
@ -63,6 +56,15 @@ export function appendChild(parent: HTMLElement, child?: Node | null): void {
}
}
/**
*
*/
export function removeChild(parent: HTMLElement, child?: Node | null): void {
if (parent && child) {
parent.removeChild(child);
}
}
/**
*
*/