@gct-paas/word 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/avatar/index.d.ts +1 -0
- package/dist/base/avatar/src/Avatar.vue.d.ts +9 -0
- package/dist/base/avatar/src/utils/useFile.d.ts +3 -0
- package/dist/base/breadcrumb/src/breadcrumb-item.vue.d.ts +1 -1
- package/dist/base/color-picker/index.d.ts +1 -0
- package/dist/base/color-picker/src/ColorPicker.vue.d.ts +88 -0
- package/dist/base/color-picker/src/constant/index.d.ts +6 -0
- package/dist/base/divider/index.d.ts +1 -0
- package/dist/base/divider/src/divider.d.ts +7 -0
- package/dist/base/divider/src/divider.vue.d.ts +19 -0
- package/dist/base/dropdown/src/dropdown-basic-select.vue.d.ts +2 -2
- package/dist/base/empty/index.d.ts +1 -0
- package/dist/base/empty/src/empty.d.ts +8 -0
- package/dist/base/empty/src/empty.vue.d.ts +9 -0
- package/dist/base/index.d.ts +5 -0
- package/dist/base/input/index.d.ts +1 -0
- package/dist/base/input/src/input-number.vue.d.ts +24 -2
- package/dist/base/input/src/input.vue.d.ts +7 -7
- package/dist/base/input/src/text-area.vue.d.ts +65 -0
- package/dist/base/modal/src/ModalRoot.vue.d.ts +1 -1
- package/dist/base/select/src/basic-select.vue.d.ts +3 -3
- package/dist/base/slider/index.d.ts +1 -0
- package/dist/base/slider/src/slider.vue.d.ts +22 -0
- package/dist/base/tree-select/src/tree-select.vue.d.ts +2 -2
- package/dist/base/utils/asset-helper-util.d.ts +23 -2
- package/dist/capabilities/panel/config/types.d.ts +2 -1
- package/dist/capabilities/paper-widget-manifest/types.d.ts +13 -2
- package/dist/core/command/InputComposition.d.ts +2 -1
- package/dist/core/command/base/CommandBase.d.ts +1 -0
- package/dist/core/command/base/SetStyleBase.d.ts +4 -0
- package/dist/core/command/commands/Delete2DTable.d.ts +12 -0
- package/dist/core/command/commands/DeleteCheckTable.d.ts +12 -0
- package/dist/core/command/commands/DeleteDataGroup2D.d.ts +12 -0
- package/dist/core/command/commands/DeleteTableHeader.d.ts +12 -0
- package/dist/core/command/commands/InsertFloatingOverlay.d.ts +9 -0
- package/dist/core/command/commands/InsertPaperWidget.d.ts +2 -42
- package/dist/core/command/commands/ResizeOverlayLayout.d.ts +7 -0
- package/dist/core/command/commands/Set2DTable.d.ts +7 -0
- package/dist/core/command/commands/SetCheckTable.d.ts +7 -0
- package/dist/core/command/commands/SetDataGroup2D.d.ts +25 -0
- package/dist/core/command/commands/SetHeaderFooterConfig.d.ts +11 -0
- package/dist/core/command/commands/SetSubTableHeader.d.ts +8 -0
- package/dist/core/command/commands/SetTableHeader.d.ts +7 -0
- package/dist/core/command/types.d.ts +67 -3
- package/dist/core/constants/index.d.ts +7 -0
- package/dist/core/cursor/CursorController.d.ts +15 -0
- package/dist/core/cursor/hit/OverlayLayoutHitHandler.d.ts +9 -0
- package/dist/core/cursor/hit/types.d.ts +17 -0
- package/dist/core/cursor/layout/baseMeta.d.ts +1 -1
- package/dist/core/data/DataManager.d.ts +5 -0
- package/dist/core/event/DocumentEventBridge.d.ts +5 -1
- package/dist/core/event/EventManager.d.ts +1 -1
- package/dist/core/event/handlers/InteractionHandler.d.ts +3 -0
- package/dist/core/event/handlers/KonvaHandler.d.ts +3 -0
- package/dist/core/index.d.ts +9 -4
- package/dist/core/interaction/InteractionController.d.ts +8 -1
- package/dist/core/interaction/InteractionPolicy.d.ts +2 -0
- package/dist/core/interaction/types.d.ts +8 -0
- package/dist/core/interaction/useInteraction.d.ts +7 -3
- package/dist/core/layout/LayoutContext.d.ts +13 -3
- package/dist/core/layout/LayoutManager.d.ts +14 -0
- package/dist/core/layout/LayoutMapper.d.ts +0 -2
- package/dist/core/layout/handlers/PageWidgetHandler.d.ts +5 -0
- package/dist/core/layout/handlers/TextHandler.d.ts +11 -0
- package/dist/core/layout/handlers/base/BaseHandler.d.ts +26 -0
- package/dist/core/layout/handlers/fields/BaseHandler.d.ts +11 -0
- package/dist/core/layout/handlers/fields/{ImgHandler.d.ts → ImageHandler.d.ts} +1 -1
- package/dist/core/layout/handlers/fields/index.d.ts +1 -1
- package/dist/core/layout/handlers/index.d.ts +1 -0
- package/dist/core/layout/handlers/pageWidgets/BarcodeHandler.d.ts +11 -0
- package/dist/core/layout/handlers/pageWidgets/DefaultHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/DiagonalHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/ImageHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/LineHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/PaginationHandler.d.ts +7 -0
- package/dist/core/layout/handlers/pageWidgets/QrCodeHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/SerialNumberHandler.d.ts +4 -0
- package/dist/core/layout/handlers/pageWidgets/index.d.ts +8 -0
- package/dist/core/layout/logic/LayoutBuilder.d.ts +19 -3
- package/dist/core/layout/logic/ModelBuilder.d.ts +2 -1
- package/dist/core/layout/providers/TableInfoProvider.d.ts +8 -2
- package/dist/core/layout/types/index.d.ts +7 -0
- package/dist/core/model/DocModel.d.ts +20 -0
- package/dist/core/model/base/ModelNode.d.ts +4 -0
- package/dist/core/model/base/RefManager.d.ts +50 -0
- package/dist/core/model/base/index.d.ts +1 -0
- package/dist/core/model/document/Wdocument.d.ts +2 -0
- package/dist/core/model/document/Wp.d.ts +14 -1
- package/dist/core/model/document/WpPr.d.ts +13 -0
- package/dist/core/model/document/WrPageWidget.d.ts +8 -0
- package/dist/core/model/document/WrText.d.ts +5 -2
- package/dist/core/model/document/WsecPr.d.ts +61 -1
- package/dist/core/model/document/Wtbl/Calculation.d.ts +12 -0
- package/dist/core/model/document/Wtbl/RegionManager.d.ts +13 -1
- package/dist/core/model/document/Wtbl/RowColumnOps.d.ts +6 -0
- package/dist/core/model/document/Wtbl.d.ts +14 -1
- package/dist/core/model/document/Wtc.d.ts +8 -0
- package/dist/core/model/document/index.d.ts +1 -0
- package/dist/core/model/footers/Wfooter.d.ts +40 -0
- package/dist/core/model/footers/Wfooters.d.ts +42 -0
- package/dist/core/model/headers/Wheader.d.ts +40 -0
- package/dist/core/model/headers/Wheaders.d.ts +45 -0
- package/dist/core/model/logic/CheckTableRegion.d.ts +44 -0
- package/dist/core/model/logic/DataGroup2DRegion.d.ts +12 -0
- package/dist/core/model/logic/SubTableHeaderRegion.d.ts +22 -0
- package/dist/core/model/logic/TableHeaderRegion.d.ts +16 -0
- package/dist/core/model/logic/_2DTableRegion.d.ts +44 -0
- package/dist/core/model/logic/index.d.ts +14 -1
- package/dist/core/model/overlays/Wlayout.d.ts +70 -0
- package/dist/core/model/overlays/Woverlay.d.ts +41 -0
- package/dist/core/model/overlays/Woverlays.d.ts +45 -0
- package/dist/core/model/settings/Wsettings.d.ts +47 -0
- package/dist/core/model/templates/footer.template.d.ts +75 -0
- package/dist/core/model/templates/header.template.d.ts +75 -0
- package/dist/core/model/templates/layout.template.d.ts +66 -0
- package/dist/core/model/templates/overlay.template.d.ts +22 -0
- package/dist/core/model/types/model.d.ts +3 -0
- package/dist/core/model/types/region.d.ts +1 -0
- package/dist/core/sdk/DocPubApiContext.d.ts +14 -12
- package/dist/core/sdk/createDoc.d.ts +1 -3
- package/dist/core/sdk/usePagesToPdf.d.ts +13 -4
- package/dist/core/utils/expand.d.ts +28 -4
- package/dist/core/utils/index.d.ts +4 -0
- package/dist/core/utils/unit-converter-util.d.ts +12 -2
- package/dist/core/view/Doc.d.ts +14 -3
- package/dist/core/view/Page.d.ts +50 -1
- package/dist/core/view/Paragraph.d.ts +2 -0
- package/dist/core/view/Section.d.ts +21 -1
- package/dist/core/view/Table.d.ts +3 -0
- package/dist/core/view/TableCell.d.ts +4 -2
- package/dist/core/view/TableRow.d.ts +2 -0
- package/dist/core/view/base/BandContainer.d.ts +49 -0
- package/dist/core/view/base/LayoutGroup.d.ts +11 -0
- package/dist/core/view/base/LayoutNode.d.ts +3 -0
- package/dist/core/view/base/OverlayContainer.d.ts +31 -0
- package/dist/core/view/base/OverlayLayout.d.ts +19 -0
- package/dist/core/view/base/index.d.ts +2 -0
- package/dist/core/view/runs/ImageRun.d.ts +9 -0
- package/dist/core/view/runs/ImageWidget.d.ts +12 -6
- package/dist/core/view/runs/TextRun.d.ts +26 -3
- package/dist/core/view/runs/TextWidget.d.ts +20 -7
- package/dist/core/view/utils/EventUtil.d.ts +22 -0
- package/dist/core/view/utils/TextUtil.d.ts +47 -0
- package/dist/core/widget/widget-meta.d.ts +5 -0
- package/dist/domain/active/active-types.d.ts +12 -6
- package/dist/domain/constants/enum.d.ts +34 -0
- package/dist/domain/constants/options.d.ts +4 -0
- package/dist/domain/field/field-props-schema-type.d.ts +1 -1
- package/dist/domain/paper-widget/paper-widget-props-schema-type.d.ts +2 -0
- package/dist/domain/paper-widget/paper-widget-type.d.ts +10 -141
- package/dist/domain/paper-widget/widget-binding.d.ts +8 -0
- package/dist/domain/widget/component-type.d.ts +10 -2
- package/dist/index.d.ts +5 -10
- package/dist/index.es.js +56818 -47196
- package/dist/runtime/_register_/composables/panel/useActivePanel.d.ts +2 -2
- package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +2 -0
- package/dist/runtime/canvas/__common__/context-menu/index.vue.d.ts +3 -1
- package/dist/runtime/canvas/doc-layout.vue.d.ts +11 -5
- package/dist/runtime/canvas/inline-image/resize-box.vue.d.ts +22 -6
- package/dist/{suites/edhr/panel-schema/data-init/common/add-ipaas/input-param-modal.vue.d.ts → runtime/canvas/node/overlay-layout.vue.d.ts} +2 -6
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/barcode.vue.d.ts → runtime/canvas/overlay/page-overlay-group.vue.d.ts} +4 -3
- package/dist/{suites/edhr/panel-schema/data-init/common/add-ipaas/out-param-modal.vue.d.ts → runtime/canvas/paper/header-footer-guides.vue.d.ts} +2 -3
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/qrcode.vue.d.ts → runtime/canvas/paper/inner-corner-mark.vue.d.ts} +2 -3
- package/dist/runtime/canvas/paper/paper-group.vue.d.ts +2 -1
- package/dist/runtime/canvas/paper/paper-hit-rect.vue.d.ts +7 -0
- package/dist/runtime/canvas/table/design/table-structure-overlay/dynamic-label.vue.d.ts +1 -0
- package/dist/runtime/canvas/table/design/table-structure-overlay/placeholder-label.vue.d.ts +1 -0
- package/dist/runtime/canvas/table/utils/index.d.ts +21 -3
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +5 -1
- package/dist/runtime/designer/main/editable-canvas.vue.d.ts +6 -3
- package/dist/runtime/designer/ribbon/components/set-table-header-form-modal.vue.d.ts +18 -0
- package/dist/runtime/designer/ribbon/components/sub-table-form-modal.vue.d.ts +4 -1
- package/dist/runtime/factories/usePwRenderData.d.ts +13 -0
- package/dist/runtime/factories/useRenderData.d.ts +1 -1
- package/dist/runtime/interface/change-diff.d.ts +26 -0
- package/dist/runtime/interface/render.d.ts +18 -0
- package/dist/runtime/renderer/annotation/annotation-comment-item.vue.d.ts +13 -0
- package/dist/runtime/renderer/annotation/annotation-comment-layer.vue.d.ts +2 -0
- package/dist/runtime/renderer/dropdowns/components/tables/rdo-table-dropdown.vue.d.ts +16 -16
- package/dist/runtime/renderer/dropdowns/components/tables/table-dropdown.vue.d.ts +16 -16
- package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +8 -4
- package/dist/sdk/doc-runtime/composables/useDocController.d.ts +17 -0
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +41 -0
- package/dist/sdk/doc-runtime/composables/useDocRuntimeProvider.d.ts +19 -0
- package/dist/sdk/doc-runtime/composables/useDocSuite.d.ts +20 -0
- package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +10 -0
- package/dist/sdk/doc-runtime/factories/document-request-strategy.d.ts +3 -0
- package/dist/{runtime → sdk/doc-runtime}/factories/useDocumentFactory.d.ts +33 -6
- package/dist/sdk/doc-runtime/useWord.d.ts +12 -0
- package/dist/sdk/engine/index.d.ts +14 -0
- package/dist/sdk/index.d.ts +14 -0
- package/dist/sdk/plugins/index.d.ts +15 -0
- package/dist/sdk/setup.d.ts +55 -0
- package/dist/sdk/types/index.d.ts +119 -0
- package/dist/sdk/vue/index.d.ts +7 -0
- package/dist/sdk/vue/layouts/doc-design-layout.d.ts +7 -0
- package/dist/sdk/vue/layouts/doc-design-layout.vue.d.ts +10 -0
- package/dist/{runtime/renderer → sdk/vue/layouts}/doc-render-layout.vue.d.ts +17 -11
- package/dist/suites/edhr/field-manifest/_common_/basic.d.ts +6 -0
- package/dist/suites/edhr/index.d.ts +3 -2
- package/dist/suites/edhr/panel-config/index.d.ts +2 -1
- package/dist/suites/edhr/panel-schema/2d-table/2d-table.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/{paper-widget/widgets/editors/diagonal-name-editor.vue.d.ts → 2d-table/_2DTablePanel.vue.d.ts} +4 -5
- package/dist/suites/edhr/panel-schema/{paper-widget/widgets/diagonal.vue.d.ts → check-table/CheckTablePanel.vue.d.ts} +5 -4
- package/dist/suites/edhr/panel-schema/check-table/check-table.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/data-group-2d/DataGroup2DPanel.vue.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/data-group-2d/data-group-2d.basic.d.ts +14 -0
- package/dist/suites/edhr/panel-schema/data-init/common/add-builtin-field/add-builtin-field-modal.vue.d.ts +3 -1
- package/dist/suites/edhr/panel-schema/data-init/common/add-ipaas/ipaas-param-config.vue.d.ts +1 -1
- package/dist/suites/edhr/panel-schema/data-init/utils/index.d.ts +26 -2
- package/dist/suites/edhr/panel-schema/data-init/utils/json-schema.d.ts +18 -0
- package/dist/suites/edhr/panel-schema/data-load/DataLoadPanel.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/data-load/ai-tmpl/ai-tmpl-editor.vue.d.ts +6 -0
- package/dist/suites/edhr/panel-schema/{data-init/common/add-ipaas/json-param-editor.vue.d.ts → data-load/ai-tmpl/identify-param-card.vue.d.ts} +7 -7
- package/dist/suites/edhr/panel-schema/data-load/common/add-tmpl-btn.vue.d.ts +16 -0
- package/dist/suites/edhr/panel-schema/data-load/common/decimal-slider.vue.d.ts +21 -0
- package/dist/suites/edhr/panel-schema/data-load/common/form-field-select.vue.d.ts +19 -0
- package/dist/suites/edhr/panel-schema/data-load/common/icon-tooltip.vue.d.ts +10 -0
- package/dist/suites/edhr/panel-schema/data-load/common/remove-icon.vue.d.ts +7 -0
- package/dist/suites/edhr/panel-schema/data-load/common/tmpl-card.vue.d.ts +25 -0
- package/dist/suites/edhr/panel-schema/data-load/data-load.basic.d.ts +5 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-field-status.vue.d.ts +9 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/device-tmpl-editor.vue.d.ts +6 -0
- package/dist/suites/edhr/panel-schema/data-load/device-tmpl/params-item-card.vue.d.ts +30 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/constant.d.ts +44 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/controller.d.ts +38 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/index.d.ts +3 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/device-link/types.d.ts +157 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/form-tmpl-config-controller.d.ts +67 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/index.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/data-load/hooks/form-tmpl-config/use-form-tmpl-config.d.ts +10 -0
- package/dist/suites/edhr/panel-schema/index.d.ts +70 -1
- package/dist/suites/edhr/panel-schema/paper-header-footer/PaperHeaderFooterPanel.vue.d.ts +2 -0
- package/dist/suites/edhr/panel-schema/paper-header-footer/paper-header-footer.basic.d.ts +5 -0
- package/dist/suites/edhr/panel-schema/paper-widget/PaperWidgetPanel.vue.d.ts +7 -1
- package/dist/suites/edhr/panel-schema/paper-widget/paper-widget.basic.d.ts +7 -1
- package/dist/suites/edhr/panel-schema/table-header/TableHeaderPanel.vue.d.ts +8 -0
- package/dist/suites/edhr/panel-schema/table-header/table-header.basic.d.ts +11 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/line-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/pagination-manifest.d.ts +2 -0
- 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
- package/dist/suites/shared/panel/config/editor/single-field-editor/types.d.ts +9 -0
- package/dist/suites/shared/panel/modules/table-setting-module.vue.d.ts +5 -4
- package/dist/utils/TriggerUtil.d.ts +1 -1
- package/dist/utils/func/core.d.ts +7 -0
- package/dist/utils/func/dragdrop.d.ts +6 -1
- package/dist/utils/func/file.d.ts +1 -1
- package/dist/utils/symbol/contextKey.d.ts +7 -1
- package/dist/word.css +9284 -8173
- package/package.json +4 -1
- package/dist/core/sdk/types/public-types.d.ts +0 -78
- package/dist/runtime/designer/doc-design-layout.vue.d.ts +0 -6
- package/dist/runtime/useDocEngine.d.ts +0 -36
- package/dist/setup.d.ts +0 -46
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/img-parser.d.ts +0 -9
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/size-editor.vue.d.ts +0 -13
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/editors/value-editor.vue.d.ts +0 -46
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/image.vue.d.ts +0 -8
- package/dist/suites/edhr/panel-schema/paper-widget/widgets/serialnumber.vue.d.ts +0 -7
- /package/dist/suites/edhr/panel-config/{file → field/file}/upload.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BoundedRegionOptions, RepeatingRegionOptions, TableRegion, BoundedRegion, RepeatingRegion } from '../../logic';
|
|
1
|
+
import { BoundedRegionOptions, CheckTableRegionOptions, RepeatingRegionOptions, TableRegion, TableHeaderRegionOptions, SubTableHeaderRegionOptions, _2DTableRegionOptions, BoundedRegion, CheckTableRegion, RepeatingRegion, TableHeaderRegion, SubTableHeaderRegion, _2DTableRegion } from '../../logic';
|
|
2
2
|
import { Wtbl } from '../Wtbl';
|
|
3
3
|
/**
|
|
4
4
|
* 表格区域管理功能类
|
|
@@ -9,6 +9,8 @@ export declare class WtblRegionManager {
|
|
|
9
9
|
* 根据 region id 查找对应的 region
|
|
10
10
|
*/
|
|
11
11
|
static findRegionById(table: Wtbl, regionId: string): TableRegion | undefined;
|
|
12
|
+
static findCrossRegion(table: Wtbl, options: Pick<TableRegion, 'start' | 'end'>): TableRegion | undefined;
|
|
13
|
+
static findCrossRegions(table: Wtbl, options: Pick<TableRegion, 'start' | 'end'>): TableRegion[];
|
|
12
14
|
/**
|
|
13
15
|
* 根据 region id 删除对应的 region
|
|
14
16
|
*/
|
|
@@ -17,8 +19,18 @@ export declare class WtblRegionManager {
|
|
|
17
19
|
* 设置重复区域
|
|
18
20
|
*/
|
|
19
21
|
static setRepeating(table: Wtbl, options: Omit<RepeatingRegionOptions, 'table'>): RepeatingRegion;
|
|
22
|
+
/**
|
|
23
|
+
* 设置二维表
|
|
24
|
+
*/
|
|
25
|
+
static set2DTable(table: Wtbl, options: Omit<_2DTableRegionOptions, 'table'>): _2DTableRegion;
|
|
20
26
|
/**
|
|
21
27
|
* 设置有界区域
|
|
22
28
|
*/
|
|
23
29
|
static setBounded(table: Wtbl, options: Omit<BoundedRegionOptions, 'table'>): BoundedRegion;
|
|
30
|
+
/**
|
|
31
|
+
* 设置检验表
|
|
32
|
+
*/
|
|
33
|
+
static setCheckTable(table: Wtbl, options: Omit<CheckTableRegionOptions, 'table'>): CheckTableRegion;
|
|
34
|
+
static setTableHeader(table: Wtbl, options: Omit<TableHeaderRegionOptions, 'table'>): TableHeaderRegion;
|
|
35
|
+
static setSubTableHeader(table: Wtbl, options: Omit<SubTableHeaderRegionOptions, 'table'>): SubTableHeaderRegion;
|
|
24
36
|
}
|
|
@@ -4,6 +4,12 @@ import { Wtbl } from '../Wtbl';
|
|
|
4
4
|
* 提供插入和删除行列的功能
|
|
5
5
|
*/
|
|
6
6
|
export declare class WtblRowColumnOps {
|
|
7
|
+
/**
|
|
8
|
+
* 新单元格同步引用信息
|
|
9
|
+
* refCell: 参考单元格 (above | left)
|
|
10
|
+
* nextRefCell: 后参考单元格 (below | right ),如果传入,需要跟 refCell 比对一致后同步
|
|
11
|
+
*/
|
|
12
|
+
private static syncRefInfo;
|
|
7
13
|
/**
|
|
8
14
|
* 在指定行位置插入新行
|
|
9
15
|
*/
|
|
@@ -3,7 +3,7 @@ import { Wbody } from './Wbody';
|
|
|
3
3
|
import { Wtr } from './Wtr';
|
|
4
4
|
import { Wtc } from './Wtc';
|
|
5
5
|
import { ModelGroup, ModelGroupOptions } from '../base';
|
|
6
|
-
import { TableRegion, BoundedRegionOptions, RepeatingRegionOptions, BoundedRegion, RepeatingRegion } from '../logic';
|
|
6
|
+
import { TableRegion, BoundedRegionOptions, CheckTableRegionOptions, RepeatingRegionOptions, _2DTableRegionOptions, TableHeaderRegion, SubTableHeaderRegion, TableHeaderRegionOptions, SubTableHeaderRegionOptions, CheckTableRegion, BoundedRegion, RepeatingRegion, _2DTableRegion } from '../logic';
|
|
7
7
|
import { WtblPr } from './WtblPr';
|
|
8
8
|
export declare class Wtbl extends ModelGroup {
|
|
9
9
|
name: 'w:tbl';
|
|
@@ -22,9 +22,17 @@ export declare class Wtbl extends ModelGroup {
|
|
|
22
22
|
get repeating(): RepeatingRegion[];
|
|
23
23
|
getRepeatingById(id: string): RepeatingRegion | undefined;
|
|
24
24
|
get hasRepeating(): boolean;
|
|
25
|
+
get _2DTable(): _2DTableRegion[];
|
|
26
|
+
get2DTableById(id: string): _2DTableRegion | undefined;
|
|
27
|
+
get has2DTable(): boolean;
|
|
25
28
|
get bounded(): BoundedRegion[];
|
|
26
29
|
getBoundedById(id: string): BoundedRegion | undefined;
|
|
27
30
|
get hasBounded(): boolean;
|
|
31
|
+
get checkTable(): CheckTableRegion[];
|
|
32
|
+
getCheckTableById(id: string): CheckTableRegion | undefined;
|
|
33
|
+
get hasCheckTable(): boolean;
|
|
34
|
+
get tableHeader(): Array<TableHeaderRegion | SubTableHeaderRegion>;
|
|
35
|
+
getTableHeaderById(id: string): TableHeaderRegion | SubTableHeaderRegion | undefined;
|
|
28
36
|
/**
|
|
29
37
|
* 请求延迟重算
|
|
30
38
|
* 在微任务队列中安排一次重算,同一事件循环内的多次操作会自动合并
|
|
@@ -42,11 +50,16 @@ export declare class Wtbl extends ModelGroup {
|
|
|
42
50
|
*/
|
|
43
51
|
splitAt(index: number): [Wtbl | null, Wtbl | null];
|
|
44
52
|
setRepeating(options: Omit<RepeatingRegionOptions, 'table'>): RepeatingRegion;
|
|
53
|
+
set2DTable(options: Omit<_2DTableRegionOptions, 'table'>): _2DTableRegion;
|
|
45
54
|
setBounded(options: Omit<BoundedRegionOptions, 'table'>): BoundedRegion;
|
|
55
|
+
setCheckTable(options: Omit<CheckTableRegionOptions, 'table'>): CheckTableRegion;
|
|
56
|
+
setTableHeader(options: Omit<TableHeaderRegionOptions, 'table'>): TableHeaderRegion;
|
|
57
|
+
setSubTableHeader(options: Omit<SubTableHeaderRegionOptions, 'table'>): SubTableHeaderRegion;
|
|
46
58
|
/**
|
|
47
59
|
* 根据 region id 查找对应的 region
|
|
48
60
|
*/
|
|
49
61
|
findRegionById(regionId: string): TableRegion | undefined;
|
|
62
|
+
findCrossRegion(options: Pick<TableRegion, 'start' | 'end'>): TableRegion | undefined;
|
|
50
63
|
/**
|
|
51
64
|
* 根据 region id 删除对应的 region
|
|
52
65
|
*/
|
|
@@ -16,8 +16,12 @@ export declare class Wtc extends ModelGroup {
|
|
|
16
16
|
mergeFromId?: string;
|
|
17
17
|
mergeId?: string;
|
|
18
18
|
repeatingId?: string;
|
|
19
|
+
_2DTableId?: string;
|
|
19
20
|
boundedId?: string;
|
|
20
21
|
boundedItemId?: string;
|
|
22
|
+
checkTableId?: string;
|
|
23
|
+
dataGroup2DId?: string;
|
|
24
|
+
headerId?: string;
|
|
21
25
|
vMergeType?: 'restart' | 'continue';
|
|
22
26
|
constructor(options: ModelGroupOptions & {
|
|
23
27
|
tcPrRaw?: RawElement;
|
|
@@ -26,8 +30,12 @@ export declare class Wtc extends ModelGroup {
|
|
|
26
30
|
mergeFromId?: string;
|
|
27
31
|
mergeId?: string;
|
|
28
32
|
repeatingId?: string;
|
|
33
|
+
_2DTableId?: string;
|
|
29
34
|
boundedId?: string;
|
|
30
35
|
boundedItemId?: string;
|
|
36
|
+
checkTableId?: string;
|
|
37
|
+
dataGroup2DId?: string;
|
|
38
|
+
headerId?: string;
|
|
31
39
|
vMergeType?: 'restart' | 'continue';
|
|
32
40
|
});
|
|
33
41
|
get table(): Wtbl;
|
|
@@ -5,6 +5,7 @@ export type { Wr } from './Wp';
|
|
|
5
5
|
export { WrText } from './WrText';
|
|
6
6
|
export { WrImage } from './WrImage';
|
|
7
7
|
export { WrField } from './WrField';
|
|
8
|
+
export { WrPageWidget } from './WrPageWidget';
|
|
8
9
|
export { Wtbl } from './Wtbl';
|
|
9
10
|
export { Wtr } from './Wtr';
|
|
10
11
|
export { Wtc } from './Wtc';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ModelGroup, ModelNode, ModelGroupOptions } from '../base';
|
|
2
|
+
import { DocModel } from '../DocModel';
|
|
3
|
+
import { RawElement } from '../types';
|
|
4
|
+
export type WfooterXmlJson = RawElement & {
|
|
5
|
+
name: 'w:ftr';
|
|
6
|
+
'@Relationship': {
|
|
7
|
+
Type: string;
|
|
8
|
+
Target: string;
|
|
9
|
+
Id: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 页脚类
|
|
14
|
+
*/
|
|
15
|
+
export declare class Wfooter extends ModelGroup<ModelNode> {
|
|
16
|
+
/** 节点名称 */
|
|
17
|
+
name: 'w:ftr';
|
|
18
|
+
/** 节点类型 */
|
|
19
|
+
type: "element";
|
|
20
|
+
/** 原始 XML JSON 数据 */
|
|
21
|
+
raw?: WfooterXmlJson;
|
|
22
|
+
/** 关系 ID(rId) */
|
|
23
|
+
relId?: string;
|
|
24
|
+
parent?: DocModel;
|
|
25
|
+
constructor(options: ModelGroupOptions<ModelNode> & {
|
|
26
|
+
raw: WfooterXmlJson;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* 从原始 XML JSON 转换为 Wfooter 实例
|
|
30
|
+
*
|
|
31
|
+
* @param json - 原始 XML JSON 数据
|
|
32
|
+
* @returns Wfooter 实例
|
|
33
|
+
*/
|
|
34
|
+
static fromXmlJson(json: WfooterXmlJson): Wfooter;
|
|
35
|
+
/**
|
|
36
|
+
* 转换为 XML JSON
|
|
37
|
+
*/
|
|
38
|
+
toXmlJson(): WfooterXmlJson;
|
|
39
|
+
static fromTemplate(index: string): Wfooter;
|
|
40
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Wfooter, WfooterXmlJson } from './Wfooter';
|
|
2
|
+
import { DocModel } from '../DocModel';
|
|
3
|
+
import { WsecPr } from '../document';
|
|
4
|
+
export declare class Wfooters {
|
|
5
|
+
raw?: WfooterXmlJson[];
|
|
6
|
+
footers: Wfooter[];
|
|
7
|
+
parent?: DocModel;
|
|
8
|
+
FOOTER_SLOT_COUNT: number;
|
|
9
|
+
constructor(raw: WfooterXmlJson[], parent?: DocModel);
|
|
10
|
+
/**
|
|
11
|
+
* 批量从 JSON 转换
|
|
12
|
+
*/
|
|
13
|
+
static fromXmlJsonArray(json: WfooterXmlJson[], parent?: DocModel): Wfooters;
|
|
14
|
+
/**
|
|
15
|
+
* 转为 XML JSON 数组
|
|
16
|
+
*/
|
|
17
|
+
toXmlJson(): WfooterXmlJson[];
|
|
18
|
+
/**
|
|
19
|
+
* 根据 relId 查找页脚
|
|
20
|
+
*/
|
|
21
|
+
getByRelId(rId: string): Wfooter | null;
|
|
22
|
+
/**
|
|
23
|
+
* 获取当前所有页脚的 relId
|
|
24
|
+
*/
|
|
25
|
+
getRefIds(): string[];
|
|
26
|
+
/**
|
|
27
|
+
* 计算下一个页脚序号
|
|
28
|
+
*/
|
|
29
|
+
private getNextFooterIndex;
|
|
30
|
+
/**
|
|
31
|
+
* footers 重建回 raw
|
|
32
|
+
*/
|
|
33
|
+
private syncRaw;
|
|
34
|
+
/**
|
|
35
|
+
* 补齐页脚槽位,并同步 raw
|
|
36
|
+
*/
|
|
37
|
+
ensureComplete(): void;
|
|
38
|
+
/**
|
|
39
|
+
* 统一修复所有 section 的页脚引用
|
|
40
|
+
*/
|
|
41
|
+
syncSectionRefs(sections: WsecPr[]): void;
|
|
42
|
+
}
|
|
@@ -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: "checkTable";
|
|
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: "_2DTable";
|
|
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
|
|
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 {};
|