@gct-paas/word 0.1.14 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/README.md +274 -15
  2. package/dist/base/avatar/index.d.ts +1 -0
  3. package/dist/base/avatar/src/Avatar.vue.d.ts +9 -0
  4. package/dist/base/avatar/src/utils/useFile.d.ts +3 -0
  5. package/dist/base/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
  6. package/dist/base/color-picker/index.d.ts +1 -0
  7. package/dist/base/color-picker/src/ColorPicker.vue.d.ts +88 -0
  8. package/dist/base/color-picker/src/constant/index.d.ts +6 -0
  9. package/dist/base/divider/index.d.ts +1 -0
  10. package/dist/base/divider/src/divider.d.ts +7 -0
  11. package/dist/base/divider/src/divider.vue.d.ts +19 -0
  12. package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +2 -2
  13. package/dist/base/empty/index.d.ts +1 -0
  14. package/dist/base/empty/src/empty.d.ts +8 -0
  15. package/dist/base/empty/src/empty.vue.d.ts +9 -0
  16. package/dist/base/index.d.ts +5 -0
  17. package/dist/base/input/index.d.ts +1 -0
  18. package/dist/base/input/src/input-number.vue.d.ts +24 -2
  19. package/dist/base/input/src/input.vue.d.ts +7 -7
  20. package/dist/base/input/src/text-area.vue.d.ts +65 -0
  21. package/dist/base/modal/src/ModalRoot.vue.d.ts +1 -1
  22. package/dist/base/select/src/basic-select.vue.d.ts +4 -3
  23. package/dist/base/slider/index.d.ts +1 -0
  24. package/dist/base/slider/src/slider.vue.d.ts +22 -0
  25. package/dist/base/tree-select/src/tree-select.vue.d.ts +2 -2
  26. package/dist/base/utils/asset-helper-util.d.ts +23 -2
  27. package/dist/capabilities/panel/config/types.d.ts +2 -1
  28. package/dist/capabilities/paper-widget-manifest/types.d.ts +13 -2
  29. package/dist/core/command/base/SetStyleBase.d.ts +4 -0
  30. package/dist/core/command/commands/Delete2DTable.d.ts +12 -0
  31. package/dist/core/command/commands/DeleteCheckTable.d.ts +12 -0
  32. package/dist/core/command/commands/DeleteDataGroup2D.d.ts +12 -0
  33. package/dist/core/command/commands/DeleteTableHeader.d.ts +12 -0
  34. package/dist/core/command/commands/InsertFloatingOverlay.d.ts +9 -0
  35. package/dist/core/command/commands/InsertPaperWidget.d.ts +2 -42
  36. package/dist/core/command/commands/ResizeOverlayLayout.d.ts +7 -0
  37. package/dist/core/command/commands/Set2DTable.d.ts +7 -0
  38. package/dist/core/command/commands/SetCheckTable.d.ts +7 -0
  39. package/dist/core/command/commands/SetDataGroup2D.d.ts +25 -0
  40. package/dist/core/command/commands/SetHeaderFooterConfig.d.ts +11 -0
  41. package/dist/core/command/commands/SetSubTableHeader.d.ts +8 -0
  42. package/dist/core/command/commands/SetTableHeader.d.ts +7 -0
  43. package/dist/core/command/types.d.ts +68 -3
  44. package/dist/core/constants/index.d.ts +7 -0
  45. package/dist/core/cursor/CursorController.d.ts +15 -0
  46. package/dist/core/cursor/hit/OverlayLayoutHitHandler.d.ts +9 -0
  47. package/dist/core/cursor/hit/types.d.ts +17 -0
  48. package/dist/core/cursor/layout/baseMeta.d.ts +1 -1
  49. package/dist/core/data/DataManager.d.ts +5 -0
  50. package/dist/core/event/DocumentEventBridge.d.ts +5 -1
  51. package/dist/core/event/EventManager.d.ts +1 -1
  52. package/dist/core/event/handlers/InteractionHandler.d.ts +3 -0
  53. package/dist/core/event/handlers/KonvaHandler.d.ts +3 -0
  54. package/dist/core/index.d.ts +8 -4
  55. package/dist/core/interaction/InteractionController.d.ts +8 -1
  56. package/dist/core/interaction/InteractionPolicy.d.ts +2 -0
  57. package/dist/core/interaction/types.d.ts +8 -0
  58. package/dist/core/interaction/useInteraction.d.ts +7 -3
  59. package/dist/core/layout/LayoutContext.d.ts +13 -3
  60. package/dist/core/layout/LayoutManager.d.ts +14 -0
  61. package/dist/core/layout/LayoutMapper.d.ts +0 -2
  62. package/dist/core/layout/handlers/PageWidgetHandler.d.ts +5 -0
  63. package/dist/core/layout/handlers/TextHandler.d.ts +11 -0
  64. package/dist/core/layout/handlers/base/BaseHandler.d.ts +26 -0
  65. package/dist/core/layout/handlers/fields/{ImgHandler.d.ts → ImageHandler.d.ts} +1 -1
  66. package/dist/core/layout/handlers/fields/index.d.ts +1 -1
  67. package/dist/core/layout/handlers/index.d.ts +1 -0
  68. package/dist/core/layout/handlers/pageWidgets/BarcodeHandler.d.ts +11 -0
  69. package/dist/core/layout/handlers/pageWidgets/DefaultHandler.d.ts +4 -0
  70. package/dist/core/layout/handlers/pageWidgets/DiagonalHandler.d.ts +4 -0
  71. package/dist/core/layout/handlers/pageWidgets/ImageHandler.d.ts +4 -0
  72. package/dist/core/layout/handlers/pageWidgets/LineHandler.d.ts +4 -0
  73. package/dist/core/layout/handlers/pageWidgets/PaginationHandler.d.ts +7 -0
  74. package/dist/core/layout/handlers/pageWidgets/QrCodeHandler.d.ts +4 -0
  75. package/dist/core/layout/handlers/pageWidgets/SerialNumberHandler.d.ts +4 -0
  76. package/dist/core/layout/handlers/pageWidgets/index.d.ts +8 -0
  77. package/dist/core/layout/logic/LayoutBuilder.d.ts +7 -3
  78. package/dist/core/layout/logic/ModelBuilder.d.ts +2 -1
  79. package/dist/core/layout/providers/TableInfoProvider.d.ts +8 -2
  80. package/dist/core/layout/types/index.d.ts +7 -0
  81. package/dist/core/model/DocModel.d.ts +20 -0
  82. package/dist/core/model/base/ModelNode.d.ts +4 -0
  83. package/dist/core/model/base/RefManager.d.ts +50 -0
  84. package/dist/core/model/base/index.d.ts +1 -0
  85. package/dist/core/model/document/Wbackground.d.ts +22 -0
  86. package/dist/core/model/document/Wdocument.d.ts +7 -1
  87. package/dist/core/model/document/Wp.d.ts +8 -1
  88. package/dist/core/model/document/WrImage.d.ts +2 -0
  89. package/dist/core/model/document/WrPageWidget.d.ts +8 -0
  90. package/dist/core/model/document/WrText.d.ts +9 -2
  91. package/dist/core/model/document/WsecPr.d.ts +66 -1
  92. package/dist/core/model/document/Wtbl/Calculation.d.ts +12 -0
  93. package/dist/core/model/document/Wtbl/RegionManager.d.ts +13 -1
  94. package/dist/core/model/document/Wtbl/RowColumnOps.d.ts +6 -0
  95. package/dist/core/model/document/Wtbl/Serialization.d.ts +12 -0
  96. package/dist/core/model/document/Wtbl.d.ts +22 -1
  97. package/dist/core/model/document/Wtc.d.ts +54 -4
  98. package/dist/core/model/document/WtrPr.d.ts +1 -0
  99. package/dist/core/model/document/index.d.ts +2 -0
  100. package/dist/core/model/footers/Wfooter.d.ts +40 -0
  101. package/dist/core/model/footers/Wfooters.d.ts +42 -0
  102. package/dist/core/model/headers/Wheader.d.ts +40 -0
  103. package/dist/core/model/headers/Wheaders.d.ts +45 -0
  104. package/dist/core/model/logic/CheckTableRegion.d.ts +44 -0
  105. package/dist/core/model/logic/DataGroup2DRegion.d.ts +12 -0
  106. package/dist/core/model/logic/SubTableHeaderRegion.d.ts +22 -0
  107. package/dist/core/model/logic/TableHeaderRegion.d.ts +16 -0
  108. package/dist/core/model/logic/_2DTableRegion.d.ts +44 -0
  109. package/dist/core/model/logic/index.d.ts +14 -1
  110. package/dist/core/model/overlays/Wlayout.d.ts +70 -0
  111. package/dist/core/model/overlays/Woverlay.d.ts +41 -0
  112. package/dist/core/model/overlays/Woverlays.d.ts +45 -0
  113. package/dist/core/model/settings/Wsettings.d.ts +47 -0
  114. package/dist/core/model/templates/footer.template.d.ts +75 -0
  115. package/dist/core/model/templates/header.template.d.ts +75 -0
  116. package/dist/core/model/templates/layout.template.d.ts +66 -0
  117. package/dist/core/model/templates/overlay.template.d.ts +22 -0
  118. package/dist/core/model/templates/paragraph.template.d.ts +46 -0
  119. package/dist/core/model/templates/trPr.template.d.ts +19 -0
  120. package/dist/core/model/types/model.d.ts +3 -0
  121. package/dist/core/model/types/region.d.ts +1 -0
  122. package/dist/core/sdk/DocPubApiContext.d.ts +14 -12
  123. package/dist/core/sdk/createDoc.d.ts +1 -3
  124. package/dist/core/sdk/usePagesToPdf.d.ts +13 -4
  125. package/dist/core/utils/expand.d.ts +29 -4
  126. package/dist/core/utils/index.d.ts +4 -0
  127. package/dist/core/utils/unit-converter-util.d.ts +12 -2
  128. package/dist/core/view/Doc.d.ts +14 -3
  129. package/dist/core/view/Page.d.ts +50 -1
  130. package/dist/core/view/Paragraph.d.ts +2 -0
  131. package/dist/core/view/Section.d.ts +26 -1
  132. package/dist/core/view/Table.d.ts +12 -0
  133. package/dist/core/view/TableCell.d.ts +7 -3
  134. package/dist/core/view/TableRow.d.ts +2 -0
  135. package/dist/core/view/base/BandContainer.d.ts +49 -0
  136. package/dist/core/view/base/LayoutGroup.d.ts +11 -0
  137. package/dist/core/view/base/LayoutNode.d.ts +3 -0
  138. package/dist/core/view/base/OverlayContainer.d.ts +31 -0
  139. package/dist/core/view/base/OverlayLayout.d.ts +19 -0
  140. package/dist/core/view/base/index.d.ts +2 -0
  141. package/dist/core/view/runs/ImageRun.d.ts +9 -0
  142. package/dist/core/view/runs/ImageWidget.d.ts +12 -6
  143. package/dist/core/view/runs/TextRun.d.ts +26 -3
  144. package/dist/core/view/runs/TextWidget.d.ts +14 -7
  145. package/dist/core/view/utils/EventUtil.d.ts +22 -0
  146. package/dist/core/view/utils/TextUtil.d.ts +47 -0
  147. package/dist/core/widget/widget-meta.d.ts +5 -0
  148. package/dist/domain/active/active-types.d.ts +12 -6
  149. package/dist/domain/constants/enum.d.ts +34 -0
  150. package/dist/domain/constants/options.d.ts +4 -0
  151. package/dist/domain/field/field-props-schema-type.d.ts +1 -1
  152. package/dist/domain/paper-widget/paper-widget-props-schema-type.d.ts +2 -0
  153. package/dist/domain/paper-widget/paper-widget-type.d.ts +10 -141
  154. package/dist/domain/paper-widget/widget-binding.d.ts +8 -0
  155. package/dist/domain/widget/component-type.d.ts +6 -2
  156. package/dist/index.d.ts +5 -10
  157. package/dist/index.es.js +57077 -46931
  158. package/dist/runtime/_register_/composables/panel/useActivePanel.d.ts +2 -2
  159. package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +2 -0
  160. package/dist/runtime/canvas/__common__/context-menu/index.vue.d.ts +3 -1
  161. package/dist/runtime/canvas/doc-layout.vue.d.ts +11 -5
  162. package/dist/runtime/canvas/inline-image/resize-box.vue.d.ts +28 -7
  163. package/dist/{suites/edhr/panel-schema/paper-widget/widgets/barcode.vue.d.ts → runtime/canvas/node/overlay-layout.vue.d.ts} +2 -3
  164. package/dist/{suites/edhr/panel-schema/paper-widget/widgets/qrcode.vue.d.ts → runtime/canvas/overlay/page-overlay-group.vue.d.ts} +4 -3
  165. package/dist/{suites/edhr/panel-schema/paper-widget/widgets/diagonal.vue.d.ts → runtime/canvas/paper/header-footer-guides.vue.d.ts} +2 -3
  166. package/dist/runtime/canvas/paper/inner-corner-mark.vue.d.ts +2 -5
  167. package/dist/runtime/canvas/paper/paper-group.vue.d.ts +2 -1
  168. package/dist/{suites/edhr/panel-schema/paper-widget/widgets/serialnumber.vue.d.ts → runtime/canvas/paper/paper-hit-rect.vue.d.ts} +3 -3
  169. package/dist/runtime/canvas/table/design/table-structure-overlay/dynamic-label.vue.d.ts +1 -0
  170. package/dist/runtime/canvas/table/design/table-structure-overlay/placeholder-label.vue.d.ts +1 -0
  171. package/dist/runtime/canvas/table/utils/index.d.ts +21 -3
  172. package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +5 -1
  173. package/dist/runtime/designer/main/editable-canvas.vue.d.ts +6 -3
  174. package/dist/runtime/designer/ribbon/components/set-table-header-form-modal.vue.d.ts +18 -0
  175. package/dist/runtime/designer/ribbon/components/sub-table-form-modal.vue.d.ts +4 -1
  176. package/dist/runtime/factories/usePwRenderData.d.ts +13 -0
  177. package/dist/runtime/factories/useRenderData.d.ts +1 -1
  178. package/dist/runtime/interface/change-diff.d.ts +26 -0
  179. package/dist/runtime/interface/render.d.ts +18 -0
  180. package/dist/runtime/renderer/annotation/annotation-comment-item.vue.d.ts +13 -0
  181. package/dist/runtime/renderer/annotation/annotation-comment-layer.vue.d.ts +2 -0
  182. package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +16 -16
  183. package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +16 -16
  184. package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +8 -4
  185. package/dist/sdk/doc-runtime/composables/useDocController.d.ts +17 -0
  186. package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +41 -0
  187. package/dist/sdk/doc-runtime/composables/useDocRuntimeProvider.d.ts +19 -0
  188. package/dist/sdk/doc-runtime/composables/useDocSuite.d.ts +20 -0
  189. package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +10 -0
  190. package/dist/sdk/doc-runtime/factories/document-request-strategy.d.ts +3 -0
  191. package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +17 -0
  192. package/dist/{runtime → sdk/doc-runtime}/factories/useDocumentFactory.d.ts +33 -6
  193. package/dist/sdk/doc-runtime/useWord.d.ts +16 -0
  194. package/dist/sdk/engine/index.d.ts +14 -0
  195. package/dist/sdk/index.d.ts +14 -0
  196. package/dist/sdk/plugins/index.d.ts +15 -0
  197. package/dist/sdk/setup.d.ts +55 -0
  198. package/dist/sdk/types/index.d.ts +154 -0
  199. package/dist/sdk/vue/index.d.ts +7 -0
  200. package/dist/sdk/vue/layouts/doc-design-layout.d.ts +7 -0
  201. package/dist/sdk/vue/layouts/doc-design-layout.vue.d.ts +10 -0
  202. package/dist/{runtime/renderer → sdk/vue/layouts}/doc-render-layout.vue.d.ts +17 -11
  203. package/dist/suites/edhr/field-manifest/_common_/basic.d.ts +6 -0
  204. package/dist/suites/edhr/index.d.ts +3 -2
  205. package/dist/suites/edhr/panel-config/index.d.ts +2 -1
  206. package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +14 -0
  207. package/dist/suites/edhr/panel-schema/{paper-widget/widgets/editors/diagonal-name-editor.vue.d.ts → 2d-table/_2DTablePanel.vue.d.ts} +4 -5
  208. package/dist/suites/edhr/panel-schema/{paper-widget/widgets/image.vue.d.ts → check-table/CheckTablePanel.vue.d.ts} +5 -5
  209. package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +14 -0
  210. package/dist/suites/edhr/panel-schema/data-group-2d/DataGroup2DPanel.vue.d.ts +8 -0
  211. package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +14 -0
  212. package/dist/suites/edhr/panel-schema/data-init/utils/index.d.ts +26 -2
  213. package/dist/suites/edhr/panel-schema/data-init/utils/json-schema.d.ts +18 -0
  214. package/dist/suites/edhr/panel-schema/data-load/DataLoadPanel.vue.d.ts +2 -0
  215. package/dist/suites/edhr/panel-schema/data-load/ai-tmpl/ai-tmpl-editor.vue.d.ts +6 -0
  216. package/dist/suites/edhr/panel-schema/data-load/ai-tmpl/identify-param-card.vue.d.ts +14 -0
  217. package/dist/suites/edhr/panel-schema/data-load/common/add-tmpl-btn.vue.d.ts +16 -0
  218. package/dist/suites/edhr/panel-schema/data-load/common/decimal-slider.vue.d.ts +21 -0
  219. package/dist/suites/edhr/panel-schema/data-load/common/form-field-select.vue.d.ts +19 -0
  220. package/dist/suites/edhr/panel-schema/data-load/common/icon-tooltip.vue.d.ts +10 -0
  221. package/dist/suites/edhr/panel-schema/data-load/common/remove-icon.vue.d.ts +7 -0
  222. package/dist/suites/edhr/panel-schema/data-load/common/tmpl-card.vue.d.ts +25 -0
  223. package/dist/suites/edhr/panel-schema/data-load/data-load.basic.d.ts +5 -0
  224. package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-field-status.vue.d.ts +9 -0
  225. package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-tmpl-editor.vue.d.ts +6 -0
  226. package/dist/suites/edhr/panel-schema/data-load/device-tmpl/params-item-card.vue.d.ts +30 -0
  227. package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/constant.d.ts +44 -0
  228. package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/controller.d.ts +38 -0
  229. package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/index.d.ts +3 -0
  230. package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/types.d.ts +157 -0
  231. package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/form-tmpl-config-controller.d.ts +67 -0
  232. package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/index.d.ts +2 -0
  233. package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/use-form-tmpl-config.d.ts +10 -0
  234. package/dist/suites/edhr/panel-schema/index.d.ts +70 -1
  235. package/dist/suites/edhr/panel-schema/paper-header-footer/PaperHeaderFooterPanel.vue.d.ts +2 -0
  236. package/dist/suites/edhr/panel-schema/paper-header-footer/paper-header-footer.basic.d.ts +5 -0
  237. package/dist/suites/edhr/panel-schema/paper-widget/PaperWidgetPanel.vue.d.ts +7 -1
  238. package/dist/suites/edhr/panel-schema/paper-widget/paper-widget.basic.d.ts +7 -1
  239. package/dist/suites/edhr/panel-schema/table-header/TableHeaderPanel.vue.d.ts +8 -0
  240. package/dist/suites/edhr/panel-schema/table-header/table-header.basic.d.ts +11 -0
  241. package/dist/suites/edhr/paper-widget-manifest/basic/line-manifest.d.ts +2 -0
  242. package/dist/suites/edhr/paper-widget-manifest/basic/pagination-manifest.d.ts +2 -0
  243. package/dist/suites/{edhr/panel-schema/paper-widget/widgets/editors/align-editor.vue.d.ts → shared/panel/config/editor/FormNumberEditor.vue.d.ts} +6 -8
  244. package/dist/suites/shared/panel/config/editor/single-field-editor/types.d.ts +9 -0
  245. package/dist/suites/{edhr/panel-schema/paper-widget/widgets/editors/size-editor.vue.d.ts → shared/panel/modules/field-formula-module/field-formula-module.vue.d.ts} +8 -8
  246. package/dist/suites/shared/panel/modules/table-setting-module.vue.d.ts +5 -4
  247. package/dist/utils/TriggerUtil.d.ts +1 -1
  248. package/dist/utils/func/dragdrop.d.ts +6 -1
  249. package/dist/utils/func/file.d.ts +1 -1
  250. package/dist/utils/symbol/contextKey.d.ts +7 -1
  251. package/dist/word.css +9288 -8120
  252. package/package.json +4 -1
  253. package/dist/core/sdk/types/public-types.d.ts +0 -78
  254. package/dist/runtime/designer/doc-design-layout.vue.d.ts +0 -6
  255. package/dist/runtime/useDocEngine.d.ts +0 -36
  256. package/dist/setup.d.ts +0 -46
  257. package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/img-parser.d.ts +0 -9
  258. package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/value-editor.vue.d.ts +0 -46
  259. /package/dist/suites/edhr/panel-config/{file → field/file}/upload.d.ts +0 -0
@@ -0,0 +1,40 @@
1
+ import { ModelGroup, ModelNode, ModelGroupOptions } from '../base';
2
+ import { DocModel } from '../DocModel';
3
+ import { RawElement } from '../types';
4
+ export type WheaderXmlJson = RawElement & {
5
+ name: 'w:hdr';
6
+ '@Relationship': {
7
+ Type: string;
8
+ Target: string;
9
+ Id: string;
10
+ };
11
+ };
12
+ /**
13
+ * 页眉类
14
+ */
15
+ export declare class Wheader extends ModelGroup<ModelNode> {
16
+ /** 节点名称 */
17
+ name: 'w:hdr';
18
+ /** 节点类型 */
19
+ type: "element";
20
+ /** 原始 XML JSON 数据 */
21
+ raw?: WheaderXmlJson;
22
+ /** 关系 ID(rId) */
23
+ relId?: string;
24
+ parent?: DocModel;
25
+ constructor(options: ModelGroupOptions<ModelNode> & {
26
+ raw: WheaderXmlJson;
27
+ });
28
+ /**
29
+ * 从原始 XML JSON 转换为 Wheader 实例
30
+ *
31
+ * @param json - 原始 XML JSON 数据
32
+ * @returns Wheader 实例
33
+ */
34
+ static fromXmlJson(json: WheaderXmlJson): Wheader;
35
+ /**
36
+ * 转换为 XML JSON
37
+ */
38
+ toXmlJson(): WheaderXmlJson;
39
+ static fromTemplate(index: string): Wheader;
40
+ }
@@ -0,0 +1,45 @@
1
+ import { Wheader, WheaderXmlJson } from './Wheader';
2
+ import { DocModel } from '../DocModel';
3
+ import { WsecPr } from '../document';
4
+ /**
5
+ * 页眉集合类
6
+ */
7
+ export declare class Wheaders {
8
+ raw?: WheaderXmlJson[];
9
+ headers: Wheader[];
10
+ parent?: DocModel;
11
+ HEADER_SLOT_COUNT: number;
12
+ constructor(raw: WheaderXmlJson[], parent?: DocModel);
13
+ /**
14
+ * 批量从 JSON 转换
15
+ */
16
+ static fromXmlJsonArray(json: WheaderXmlJson[], parent?: DocModel): Wheaders;
17
+ /**
18
+ * 转为 XML JSON 数组
19
+ */
20
+ toXmlJson(): WheaderXmlJson[];
21
+ /**
22
+ * 根据 relId 查找页眉
23
+ */
24
+ getByRelId(rId: string): Wheader | null;
25
+ /**
26
+ * 获取当前所有页眉的 relId
27
+ */
28
+ getRefIds(): string[];
29
+ /**
30
+ * 计算下一个页眉序号
31
+ */
32
+ private getNextHeaderIndex;
33
+ /**
34
+ * headers 重建回 raw
35
+ */
36
+ private syncRaw;
37
+ /**
38
+ * 补齐页眉槽位,并同步 raw
39
+ */
40
+ ensureComplete(): void;
41
+ /**
42
+ * 统一修复所有 section 的页眉引用
43
+ */
44
+ syncSectionRefs(sections: WsecPr[]): void;
45
+ }
@@ -0,0 +1,44 @@
1
+ import { Wtbl } from '../document';
2
+ import { Region, RegionOptions } from './Region';
3
+ import { RegionJson } from '../types';
4
+ import { DataGroup2DRegion, DataGroup2DRegionOptions } from './DataGroup2DRegion';
5
+ export type CheckTableWidgetPropsMeta = {
6
+ /** 引用填充(撑满固定表)*/
7
+ autoFill: boolean;
8
+ refColField: string | undefined;
9
+ refRowField: string | undefined;
10
+ [key: string]: any;
11
+ };
12
+ export type CheckTableWidgetMeta = {
13
+ props: CheckTableWidgetPropsMeta;
14
+ };
15
+ export type CheckTableRegionOptions = RegionOptions & {
16
+ name: string;
17
+ valuePath: string;
18
+ widgetMeta: CheckTableWidgetMeta;
19
+ itemRegion?: DataGroup2DRegion;
20
+ };
21
+ export type CheckTableRegionJson = RegionJson & {
22
+ name: string;
23
+ valuePath: string;
24
+ widgetMeta: CheckTableWidgetMeta;
25
+ itemRegion?: any;
26
+ };
27
+ export declare class CheckTableRegion extends Region {
28
+ type: "check-table";
29
+ name: string;
30
+ valuePath: string;
31
+ widgetMeta: CheckTableWidgetMeta;
32
+ itemRegion?: DataGroup2DRegion;
33
+ constructor(options: CheckTableRegionOptions);
34
+ /**
35
+ * 序列化为 JSON 对象
36
+ */
37
+ toJSON(): CheckTableRegionJson;
38
+ /**
39
+ * 从 JSON 对象还原
40
+ */
41
+ static fromJSON(json: CheckTableRegionJson, table: Wtbl): CheckTableRegion;
42
+ setItemRegion(options: Omit<DataGroup2DRegionOptions, 'table'>): DataGroup2DRegion;
43
+ removeItemRegion(): void;
44
+ }
@@ -0,0 +1,12 @@
1
+ import { Region, RegionOptions } from './Region';
2
+ import { CheckTableRegion } from './CheckTableRegion';
3
+ import { _2DTableRegion } from './_2DTableRegion';
4
+ export type DataGroup2DRegionOptions = RegionOptions & {
5
+ parent?: CheckTableRegion | _2DTableRegion;
6
+ };
7
+ export declare class DataGroup2DRegion extends Region {
8
+ type: "dataGroup2D";
9
+ parent?: CheckTableRegion | _2DTableRegion;
10
+ constructor(options: DataGroup2DRegionOptions);
11
+ remove(): void;
12
+ }
@@ -0,0 +1,22 @@
1
+ import { Wtbl } from '../document';
2
+ import { Region, RegionOptions } from './Region';
3
+ import { RegionJson } from '../types';
4
+ export type SubTableHeaderRegionOptions = RegionOptions & {
5
+ name: string;
6
+ subTableId: string;
7
+ };
8
+ export type SubTableRegionJson = RegionJson & {
9
+ name: string;
10
+ subTableId: string;
11
+ };
12
+ export declare class SubTableHeaderRegion extends Region {
13
+ type: "sub-table-header";
14
+ name: string;
15
+ subTableId: SubTableHeaderRegionOptions['subTableId'];
16
+ constructor(options: SubTableHeaderRegionOptions);
17
+ /**
18
+ * 序列化为 JSON 对象
19
+ */
20
+ toJSON(): SubTableRegionJson;
21
+ static fromJSON(json: SubTableRegionJson, table: Wtbl): SubTableHeaderRegion;
22
+ }
@@ -0,0 +1,16 @@
1
+ import { Wtbl } from '../document';
2
+ import { Region, RegionOptions } from './Region';
3
+ import { RegionJson } from '../types';
4
+ export type TableHeaderRegionOptions = RegionOptions & {
5
+ name: string;
6
+ };
7
+ export type TableRegionJson = RegionJson & {
8
+ name: string;
9
+ };
10
+ export declare class TableHeaderRegion extends Region {
11
+ type: "table-header";
12
+ name: string;
13
+ constructor(options: TableHeaderRegionOptions);
14
+ toJSON(): TableRegionJson;
15
+ static fromJSON(json: TableRegionJson, table: Wtbl): TableHeaderRegion;
16
+ }
@@ -0,0 +1,44 @@
1
+ import { Wtbl } from '../document';
2
+ import { Region, RegionOptions } from './Region';
3
+ import { RegionJson } from '../types';
4
+ import { DataGroup2DRegion, DataGroup2DRegionOptions } from './DataGroup2DRegion';
5
+ export type _2DTableWidgetPropsMeta = {
6
+ /** 引用填充(撑满固定表)*/
7
+ autoFill: boolean;
8
+ refColField: string | undefined;
9
+ refRowField: string | undefined;
10
+ [key: string]: any;
11
+ };
12
+ export type _2DTableWidgetMeta = {
13
+ props: _2DTableWidgetPropsMeta;
14
+ };
15
+ export type _2DTableRegionOptions = RegionOptions & {
16
+ name: string;
17
+ valuePath: string;
18
+ widgetMeta: _2DTableWidgetMeta;
19
+ itemRegion?: DataGroup2DRegion;
20
+ };
21
+ export type _2DTableRegionJson = RegionJson & {
22
+ name: string;
23
+ valuePath: string;
24
+ widgetMeta: _2DTableWidgetMeta;
25
+ itemRegion?: any;
26
+ };
27
+ export declare class _2DTableRegion extends Region {
28
+ type: "2d-table";
29
+ name: string;
30
+ valuePath: string;
31
+ widgetMeta: _2DTableWidgetMeta;
32
+ itemRegion?: DataGroup2DRegion;
33
+ constructor(options: _2DTableRegionOptions);
34
+ /**
35
+ * 序列化为 JSON 对象
36
+ */
37
+ toJSON(): _2DTableRegionJson;
38
+ /**
39
+ * 从 JSON 对象还原
40
+ */
41
+ static fromJSON(json: _2DTableRegionJson, table: Wtbl): _2DTableRegion;
42
+ setItemRegion(options: Omit<DataGroup2DRegionOptions, 'table'>): DataGroup2DRegion;
43
+ removeItemRegion(): void;
44
+ }
@@ -1,9 +1,22 @@
1
1
  import { RepeatingRegion } from './RepeatingRegion';
2
2
  import { BoundedRegion } from './BoundedRegion';
3
+ import { CheckTableRegion } from './CheckTableRegion';
4
+ import { TableHeaderRegion } from './TableHeaderRegion';
5
+ import { SubTableHeaderRegion } from './SubTableHeaderRegion';
6
+ import { _2DTableRegion } from './_2DTableRegion';
3
7
  export { Region } from './Region';
4
8
  export { RepeatingRegion } from './RepeatingRegion';
9
+ export { _2DTableRegion } from './_2DTableRegion';
5
10
  export { BoundedRegion } from './BoundedRegion';
11
+ export { CheckTableRegion } from './CheckTableRegion';
12
+ export { TableHeaderRegion } from './TableHeaderRegion';
13
+ export { SubTableHeaderRegion } from './SubTableHeaderRegion';
6
14
  export type { RegionOptions, CellPos } from './Region';
7
15
  export type { RepeatingRegionOptions } from './RepeatingRegion';
16
+ export type { _2DTableRegionOptions } from './_2DTableRegion';
8
17
  export type { BoundedRegionOptions } from './BoundedRegion';
9
- export type TableRegion = RepeatingRegion | BoundedRegion;
18
+ export type { CheckTableRegionOptions } from './CheckTableRegion';
19
+ export type { TableHeaderRegionOptions } from './TableHeaderRegion';
20
+ export type { SubTableHeaderRegionOptions } from './SubTableHeaderRegion';
21
+ export type TableRegion = RepeatingRegion | _2DTableRegion | BoundedRegion | CheckTableRegion | TableHeaderRegion | SubTableHeaderRegion;
22
+ export type SubTableRegion = RepeatingRegion | BoundedRegion;
@@ -0,0 +1,70 @@
1
+ import { RawElement } from '../types';
2
+ import { ModelGroup, ModelNode, ModelGroupOptions } from '../base';
3
+ export type WlayoutXmlJson = RawElement & {
4
+ name: 'w:lyt';
5
+ /** 布局坐标信息 */
6
+ '@layout'?: {
7
+ x: number;
8
+ y: number;
9
+ width?: number;
10
+ height?: number;
11
+ zIndex?: number;
12
+ };
13
+ };
14
+ export interface WlayoutOptions extends ModelGroupOptions<ModelNode> {
15
+ raw?: WlayoutXmlJson;
16
+ x?: number;
17
+ y?: number;
18
+ width?: number;
19
+ height?: number;
20
+ zIndex?: number;
21
+ }
22
+ /**
23
+ * 布局容器
24
+ */
25
+ export declare class Wlayout extends ModelGroup<ModelNode> {
26
+ /** 节点名称 */
27
+ name: 'w:lyt';
28
+ /** 节点类型 */
29
+ type: "element";
30
+ /** 原始 XML */
31
+ raw?: WlayoutXmlJson;
32
+ x: number;
33
+ y: number;
34
+ width?: number;
35
+ height?: number;
36
+ zIndex: number;
37
+ parent?: ModelNode;
38
+ constructor(options: WlayoutOptions);
39
+ /**
40
+ * XML -> Wlayout
41
+ */
42
+ static fromXmlJson(json: WlayoutXmlJson): Wlayout;
43
+ /**
44
+ * XML JSON 输出
45
+ */
46
+ toXmlJson(): WlayoutXmlJson;
47
+ /** 获取组件信息 */
48
+ getWrPageWidget(): RawElement | ModelNode | undefined;
49
+ /**
50
+ * 调整容器尺寸
51
+ * @param width 新宽度
52
+ * @param height 新高度
53
+ */
54
+ resize(pos: {
55
+ x?: number;
56
+ y?: number;
57
+ width?: number;
58
+ height?: number;
59
+ }): void;
60
+ /**
61
+ * 从模板创建 layout
62
+ */
63
+ static fromTemplate(opts: {
64
+ x: number;
65
+ y: number;
66
+ width: number;
67
+ height: number;
68
+ zIndex: number;
69
+ }): Wlayout;
70
+ }
@@ -0,0 +1,41 @@
1
+ import { DocModel } from '../DocModel';
2
+ import { RawElement } from '../types';
3
+ import { ModelGroup, ModelNode, ModelGroupOptions } from '../base';
4
+ export type WoverlayXmlJson = RawElement & {
5
+ name: 'w:ovl';
6
+ '@Relationship': {
7
+ Type: string;
8
+ Target: string;
9
+ Id: string;
10
+ };
11
+ };
12
+ /**
13
+ * 浮层类
14
+ * 每个 Woverlay 对应一个章节(Section),持有该章节内所有悬浮段落节点。
15
+ */
16
+ export declare class Woverlay extends ModelGroup<ModelNode> {
17
+ /** 节点名称 */
18
+ name: 'w:ovl';
19
+ /** 节点类型 */
20
+ type: "element";
21
+ /** 原始 XML JSON 数据 */
22
+ raw?: WoverlayXmlJson;
23
+ /** 关系 ID(rId) */
24
+ relId?: string;
25
+ parent?: DocModel;
26
+ constructor(options: ModelGroupOptions<ModelNode> & {
27
+ raw: WoverlayXmlJson;
28
+ });
29
+ /**
30
+ * 从原始 XML JSON 转换为 Woverlay 实例
31
+ *
32
+ * @param json - 原始 XML JSON 数据
33
+ * @returns Woverlay 实例
34
+ */
35
+ static fromXmlJson(json: WoverlayXmlJson): Woverlay;
36
+ /**
37
+ * 转换为 XML JSON
38
+ */
39
+ toXmlJson(): WoverlayXmlJson;
40
+ static fromTemplate(index: string): Woverlay;
41
+ }
@@ -0,0 +1,45 @@
1
+ import { Woverlay, WoverlayXmlJson } from './Woverlay';
2
+ import { DocModel } from '../DocModel';
3
+ import { WsecPr } from '../document';
4
+ /**
5
+ * 浮层集合类
6
+ */
7
+ export declare class Woverlays {
8
+ raw?: WoverlayXmlJson[];
9
+ overlays: Woverlay[];
10
+ parent?: DocModel;
11
+ constructor(raw: WoverlayXmlJson[], parent?: DocModel);
12
+ /**
13
+ * 批量从 JSON 转换
14
+ */
15
+ static fromXmlJsonArray(json: WoverlayXmlJson[], parent?: DocModel): Woverlays;
16
+ /**
17
+ * 转为 XML JSON 数组
18
+ */
19
+ toXmlJson(): WoverlayXmlJson[];
20
+ /**
21
+ * 根据 relId 查找浮层
22
+ */
23
+ getByRelId(rId: string): Woverlay | null;
24
+ /**
25
+ * 获取当前所有悬浮层的 relId
26
+ */
27
+ getRefIds(): string[];
28
+ /**
29
+ * 计算下一个浮层序号
30
+ */
31
+ private getNextOverlayIndex;
32
+ /**
33
+ * overlays 重建回 raw
34
+ */
35
+ private syncRaw;
36
+ /**
37
+ * 根据章节补齐浮层槽位,并同步 raw
38
+ * 保证 overlays.length >= sections.length(一对一)
39
+ */
40
+ ensureComplete(sections: WsecPr[]): void;
41
+ /**
42
+ * 统一修复所有 section 的浮层引用
43
+ */
44
+ syncSectionRefs(sections: WsecPr[]): void;
45
+ }
@@ -0,0 +1,47 @@
1
+ import { RawElement } from '../types/raw';
2
+ /**
3
+ * w:settings 根元素的原始 JSON 类型
4
+ */
5
+ type WsettingsXmlJson = RawElement & {
6
+ name: 'w:settings';
7
+ };
8
+ /**
9
+ * Word 文档全局设置(settings.xml)
10
+ */
11
+ export declare class Wsettings {
12
+ type: 'settings';
13
+ raw: WsettingsXmlJson;
14
+ /**
15
+ * 是否启用奇偶页不同页眉页脚
16
+ * <w:evenAndOddHeaders/>
17
+ */
18
+ evenAndOddHeaders: boolean;
19
+ /**
20
+ * (兼容字段:部分文档可能在 settings 中也有 titlePg
21
+ * 实际优先级低于 section
22
+ */
23
+ titlePg: boolean;
24
+ constructor(raw: WsettingsXmlJson);
25
+ /**
26
+ * 从 XML JSON 转换
27
+ */
28
+ static fromXmlJson(json: WsettingsXmlJson): Wsettings;
29
+ /**
30
+ * 转回 XML JSON
31
+ * 保持原始结构
32
+ */
33
+ toXmlJson(): RawElement;
34
+ /**
35
+ * 是否启用奇偶页
36
+ */
37
+ isEvenAndOddEnabled(): boolean;
38
+ /**
39
+ * 是否首页特殊
40
+ */
41
+ hasTitlePg(): boolean;
42
+ /**
43
+ * 设置奇偶页不同页眉页脚,并同步回原始 settings.xml
44
+ */
45
+ setEvenAndOddHeaders(enabled: boolean): void;
46
+ }
47
+ export {};
@@ -0,0 +1,75 @@
1
+ /**
2
+ * 页脚模板 - TypeScript 版本
3
+ * 保留变量占位符位置:{{paraId}} {{embedId}} {{index}}
4
+ */
5
+ export declare const FOOTER_TEMPLATE: {
6
+ '@attrs': {
7
+ 'xmlns:o': string;
8
+ 'xmlns:w10': string;
9
+ 'xmlns:r': string;
10
+ 'xmlns:w14': string;
11
+ 'xmlns:wps': string;
12
+ 'xmlns:w15': string;
13
+ 'xmlns:wpi': string;
14
+ 'xmlns:w': string;
15
+ 'xmlns:v': string;
16
+ 'mc:Ignorable': string;
17
+ 'xmlns:wpg': string;
18
+ 'xmlns:wne': string;
19
+ 'xmlns:wpsCustomData': string;
20
+ 'xmlns:wp': string;
21
+ 'xmlns:wpc': string;
22
+ 'xmlns:mc': string;
23
+ 'xmlns:wp14': string;
24
+ 'xmlns:m': string;
25
+ };
26
+ elements: {
27
+ '@attrs': {
28
+ 'w14:paraId': string;
29
+ };
30
+ elements: {
31
+ elements: ({
32
+ '@attrs': {
33
+ 'w:val': string;
34
+ };
35
+ name: string;
36
+ type: string;
37
+ elements?: undefined;
38
+ } | {
39
+ elements: ({
40
+ '@attrs': {
41
+ 'w:eastAsiaTheme': string;
42
+ 'w:hint': string;
43
+ 'w:val'?: undefined;
44
+ 'w:eastAsia'?: undefined;
45
+ };
46
+ name: string;
47
+ type: string;
48
+ } | {
49
+ '@attrs': {
50
+ 'w:val': string;
51
+ 'w:eastAsia': string;
52
+ 'w:eastAsiaTheme'?: undefined;
53
+ 'w:hint'?: undefined;
54
+ };
55
+ name: string;
56
+ type: string;
57
+ })[];
58
+ name: string;
59
+ type: string;
60
+ '@attrs'?: undefined;
61
+ })[];
62
+ name: string;
63
+ type: string;
64
+ }[];
65
+ name: string;
66
+ type: string;
67
+ }[];
68
+ name: string;
69
+ '@Relationship': {
70
+ Type: string;
71
+ Target: string;
72
+ Id: string;
73
+ };
74
+ type: string;
75
+ };
@@ -0,0 +1,75 @@
1
+ /**
2
+ * 页眉模板 - TypeScript 版本
3
+ * 保留变量占位符位置:{{paraId}} {{embedId}} {{index}}
4
+ */
5
+ export declare const HEADER_TEMPLATE: {
6
+ '@attrs': {
7
+ 'xmlns:o': string;
8
+ 'xmlns:w10': string;
9
+ 'xmlns:r': string;
10
+ 'xmlns:w14': string;
11
+ 'xmlns:wps': string;
12
+ 'xmlns:w15': string;
13
+ 'xmlns:wpi': string;
14
+ 'xmlns:w': string;
15
+ 'xmlns:v': string;
16
+ 'mc:Ignorable': string;
17
+ 'xmlns:wpg': string;
18
+ 'xmlns:wne': string;
19
+ 'xmlns:wpsCustomData': string;
20
+ 'xmlns:wp': string;
21
+ 'xmlns:wpc': string;
22
+ 'xmlns:mc': string;
23
+ 'xmlns:wp14': string;
24
+ 'xmlns:m': string;
25
+ };
26
+ elements: {
27
+ '@attrs': {
28
+ 'w14:paraId': string;
29
+ };
30
+ elements: {
31
+ elements: ({
32
+ '@attrs': {
33
+ 'w:val': string;
34
+ };
35
+ name: string;
36
+ type: string;
37
+ elements?: undefined;
38
+ } | {
39
+ elements: ({
40
+ '@attrs': {
41
+ 'w:eastAsiaTheme': string;
42
+ 'w:hint': string;
43
+ 'w:val'?: undefined;
44
+ 'w:eastAsia'?: undefined;
45
+ };
46
+ name: string;
47
+ type: string;
48
+ } | {
49
+ '@attrs': {
50
+ 'w:val': string;
51
+ 'w:eastAsia': string;
52
+ 'w:eastAsiaTheme'?: undefined;
53
+ 'w:hint'?: undefined;
54
+ };
55
+ name: string;
56
+ type: string;
57
+ })[];
58
+ name: string;
59
+ type: string;
60
+ '@attrs'?: undefined;
61
+ })[];
62
+ name: string;
63
+ type: string;
64
+ }[];
65
+ name: string;
66
+ type: string;
67
+ }[];
68
+ name: string;
69
+ '@Relationship': {
70
+ Type: string;
71
+ Target: string;
72
+ Id: string;
73
+ };
74
+ type: string;
75
+ };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * 容器层模板 - TypeScript 版本
3
+ * 保留变量占位符位置:{{layoutId}} {{x}} {{y}} {{width}} {{height}} {{zIndex}} {{paraId}}
4
+ */
5
+ export declare const LAYOUT_TEMPLATE: {
6
+ '@attrs': {
7
+ 'xmlns:w': string;
8
+ 'xmlns:r': string;
9
+ 'xmlns:mc': string;
10
+ 'xmlns:o': string;
11
+ 'xmlns:v': string;
12
+ 'mc:Ignorable': string;
13
+ 'data-layout-id': string;
14
+ };
15
+ '@layout': {
16
+ x: string;
17
+ y: string;
18
+ width: string;
19
+ height: string;
20
+ zIndex: string;
21
+ };
22
+ elements: {
23
+ '@attrs': {
24
+ 'w14:paraId': string;
25
+ };
26
+ elements: {
27
+ elements: ({
28
+ '@attrs': {
29
+ 'w:val': string;
30
+ };
31
+ name: string;
32
+ type: string;
33
+ elements?: undefined;
34
+ } | {
35
+ elements: ({
36
+ '@attrs': {
37
+ 'w:eastAsiaTheme': string;
38
+ 'w:hint': string;
39
+ 'w:val'?: undefined;
40
+ 'w:eastAsia'?: undefined;
41
+ };
42
+ name: string;
43
+ type: string;
44
+ } | {
45
+ '@attrs': {
46
+ 'w:val': string;
47
+ 'w:eastAsia': string;
48
+ 'w:eastAsiaTheme'?: undefined;
49
+ 'w:hint'?: undefined;
50
+ };
51
+ name: string;
52
+ type: string;
53
+ })[];
54
+ name: string;
55
+ type: string;
56
+ '@attrs'?: undefined;
57
+ })[];
58
+ name: string;
59
+ type: string;
60
+ }[];
61
+ name: string;
62
+ type: string;
63
+ }[];
64
+ name: string;
65
+ type: string;
66
+ };