@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
|
@@ -6,6 +6,20 @@ export declare class LayoutManager {
|
|
|
6
6
|
private layoutHandlers;
|
|
7
7
|
constructor(doc: Doc);
|
|
8
8
|
layout(): void;
|
|
9
|
+
/**
|
|
10
|
+
* 当前页创建后,初始化页眉页脚和悬浮层
|
|
11
|
+
*/
|
|
12
|
+
private decorateCurrentPage;
|
|
13
|
+
/**
|
|
14
|
+
* 布局页眉/页脚内部的段落和表格
|
|
15
|
+
*/
|
|
16
|
+
private layoutHeaderFooterChildren;
|
|
17
|
+
/**
|
|
18
|
+
* 所有页布局完成后,在处理悬浮层,主要是要拿到实际总页数
|
|
19
|
+
*/
|
|
20
|
+
private resolveOverlay;
|
|
21
|
+
/** 悬浮层内部的布局和段落 */
|
|
22
|
+
private layoutOverlayChildren;
|
|
9
23
|
/**
|
|
10
24
|
* 统一的表格布局内部方法
|
|
11
25
|
*/
|
|
@@ -14,7 +14,6 @@ export declare class LayoutMapper {
|
|
|
14
14
|
lineCenter: Map<string, LineInfo>;
|
|
15
15
|
lineIdByPage: Map<string, string[]>;
|
|
16
16
|
/** 组件信息中心 */
|
|
17
|
-
widgetMetaIds: Set<string>;
|
|
18
17
|
widgetMetaMap: Map<string, any>;
|
|
19
18
|
modelMap: Map<string, ModelMode>;
|
|
20
19
|
modelSplitMap: Map<string, string[]>;
|
|
@@ -27,7 +26,6 @@ export declare class LayoutMapper {
|
|
|
27
26
|
getAllPageIds(): string[];
|
|
28
27
|
getLineIdsByPageId(pageId: string): string[];
|
|
29
28
|
getLineInfoById(lineId: string): LineInfo | undefined;
|
|
30
|
-
getWidgetMetaIds(): string[];
|
|
31
29
|
getWidgetMetaListById(wId: string): any;
|
|
32
30
|
/**
|
|
33
31
|
* 获取某个节点下的所有子节点
|
|
@@ -2,5 +2,16 @@ import { WrText } from '../../model/document';
|
|
|
2
2
|
import { LayoutContext } from '../LayoutContext';
|
|
3
3
|
export declare class TextHandler {
|
|
4
4
|
static getId(context: LayoutContext, wr: WrText): string;
|
|
5
|
+
/**
|
|
6
|
+
* 合并部分run
|
|
7
|
+
* @param context
|
|
8
|
+
* @param wr
|
|
9
|
+
*/
|
|
10
|
+
static __layout(context: LayoutContext, wr: WrText): void;
|
|
11
|
+
/**
|
|
12
|
+
* 每个文本独立渲染
|
|
13
|
+
* @param context
|
|
14
|
+
* @param wr
|
|
15
|
+
*/
|
|
5
16
|
static layout(context: LayoutContext, wr: WrText): void;
|
|
6
17
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { WrText } from '../../../model/document';
|
|
2
|
+
import { LayoutContext } from '../../LayoutContext';
|
|
3
|
+
import { TextRun } from '../../../view/runs/TextRun';
|
|
4
|
+
import { TableCell } from '../../../view/TableCell';
|
|
5
|
+
export type HandlerContext = {
|
|
6
|
+
context: LayoutContext;
|
|
7
|
+
wr: WrText;
|
|
8
|
+
};
|
|
9
|
+
export declare abstract class BaseHandler {
|
|
10
|
+
context: LayoutContext;
|
|
11
|
+
wr: WrText;
|
|
12
|
+
constructor(ctx: HandlerContext);
|
|
13
|
+
/**
|
|
14
|
+
* 获取所在单元格
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
getCell(): TableCell | null;
|
|
18
|
+
/**
|
|
19
|
+
* 获取所在子表的数据索引
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
getDataIndex(init?: 0 | null): number | null;
|
|
23
|
+
getId(): string;
|
|
24
|
+
getLayoutStyle(): ReturnType<typeof TextRun.textStyle2LayoutStyle>;
|
|
25
|
+
abstract layout(): void;
|
|
26
|
+
}
|
|
@@ -15,6 +15,7 @@ export declare class BaseHandler {
|
|
|
15
15
|
label: string;
|
|
16
16
|
type: 'placeholder' | 'fieldName' | 'noneLabel' | 'default';
|
|
17
17
|
};
|
|
18
|
+
static formatDateTimeValue(ctx: HandlerContext, valuePath: string): any;
|
|
18
19
|
/**
|
|
19
20
|
* 渲染组件值 label -> value
|
|
20
21
|
* @param ctx
|
|
@@ -63,5 +64,15 @@ export declare class BaseHandler {
|
|
|
63
64
|
};
|
|
64
65
|
extra?: Partial<TextWidget>;
|
|
65
66
|
}): void;
|
|
67
|
+
/**
|
|
68
|
+
* 渲染时增加文本
|
|
69
|
+
* @param payload
|
|
70
|
+
*/
|
|
71
|
+
static addFieldMarker(payload: {
|
|
72
|
+
ctx: HandlerContext;
|
|
73
|
+
fontSize: number;
|
|
74
|
+
extra?: Partial<TextWidget>;
|
|
75
|
+
position: 'left' | 'right';
|
|
76
|
+
}): void;
|
|
66
77
|
}
|
|
67
78
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseHandler, HandlerContext } from './BaseHandler';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class ImageHandler extends BaseHandler {
|
|
3
3
|
static layout(ctx: HandlerContext): void;
|
|
4
4
|
static layoutField(ctx: HandlerContext): void;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { BaseHandler, type HandlerContext } from './BaseHandler';
|
|
2
2
|
export { OptionHandler } from './OptionHandler';
|
|
3
|
-
export {
|
|
3
|
+
export { ImageHandler } from './ImageHandler';
|
|
4
4
|
export { SignatureHandler } from './SignatureHandler';
|
|
5
5
|
export { InputHandler } from './InputHandler';
|
|
6
6
|
export { AttachmentHandler } from './AttachmentHandler';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseHandler } from '../base/BaseHandler';
|
|
2
|
+
import { ImageWidgetOptions } from '../../../view/runs/ImageWidget';
|
|
3
|
+
export declare class BarcodeHandler extends BaseHandler {
|
|
4
|
+
getDecorationsInfo(width: number, height: number, label?: string): {
|
|
5
|
+
render: boolean;
|
|
6
|
+
rectWidth: number;
|
|
7
|
+
rectHeight: number;
|
|
8
|
+
decorations?: ImageWidgetOptions['decorations'];
|
|
9
|
+
};
|
|
10
|
+
layout(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { SerialNumberHandler } from './SerialNumberHandler';
|
|
2
|
+
export { DefaultHandler } from './DefaultHandler';
|
|
3
|
+
export { QrCodeHandler } from './QrCodeHandler';
|
|
4
|
+
export { BarcodeHandler } from './BarcodeHandler';
|
|
5
|
+
export { ImageHandler } from './ImageHandler';
|
|
6
|
+
export { DiagonalHandler } from './DiagonalHandler';
|
|
7
|
+
export { PaginationHandler } from './PaginationHandler';
|
|
8
|
+
export { LineHandler } from './LineHandler';
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
import { BuiltinComponentType } from '../../constants';
|
|
2
|
+
import { TextWidget } from '../../view/runs/TextWidget';
|
|
2
3
|
import { Page } from '../../view/Page';
|
|
3
4
|
import { BaseMetaNode, LineInfo } from '../types';
|
|
4
5
|
export declare function buildLayoutMeta(pages: Page[]): {
|
|
5
6
|
dataCenter: Map<string, BaseMetaNode>;
|
|
6
7
|
lineCenter: Map<string, LineInfo>;
|
|
7
8
|
widgetIds: string[];
|
|
8
|
-
widgetMetaIds: Set<string>;
|
|
9
9
|
widgetMetaMap: Map<string, any>;
|
|
10
10
|
};
|
|
11
11
|
/** 是否是原子组件 */
|
|
12
12
|
export declare function isAtom(component: BuiltinComponentType): boolean;
|
|
13
13
|
/** 判断是否为占位符文本原子节点 */
|
|
14
14
|
export declare function isPlaceholderNode(node: any): boolean;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* 判断是否点击是字段组件节点
|
|
17
|
+
* @param node - 节点
|
|
18
|
+
* @param checkMarker - 是否需要校验 widgetFieldLeftMarker / RightMarker,默认 true
|
|
19
|
+
*/
|
|
20
|
+
export declare function isClickSelectAllNode(node: BaseMetaNode, checkMarker?: boolean): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 校验组件是否符合选中规则
|
|
23
|
+
* @param raw - 文本组件原始数据
|
|
24
|
+
* @param checkMarker - 是否校验左右标记位
|
|
25
|
+
* @returns 符合规则返回 true,否则返回 false
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateTextWidgetMarker(raw: TextWidget, checkMarker: boolean): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 判断是否点击是页面组件节点
|
|
30
|
+
* @param node - 节点
|
|
31
|
+
*/
|
|
32
|
+
export declare function isClickPaperWidgetAllNode(node: BaseMetaNode): boolean;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Doc } from '../../view/Doc';
|
|
2
|
+
export declare function generateDocModelMap(doc: Doc): Map<string, any>;
|
|
@@ -2,8 +2,8 @@ import { Wtbl, Wtc, Wtr } from '../../model/document';
|
|
|
2
2
|
import { TableExpander, CellFragment } from '../../utils/expand';
|
|
3
3
|
import { SubRenderer } from '../../view/TableCell';
|
|
4
4
|
export declare class TableInfoProvider {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
wtbl: Wtbl;
|
|
6
|
+
tableExpander: TableExpander;
|
|
7
7
|
constructor(wtbl: Wtbl, tableExpander: TableExpander);
|
|
8
8
|
getRows(): {
|
|
9
9
|
id: string;
|
|
@@ -20,4 +20,10 @@ export declare class TableInfoProvider {
|
|
|
20
20
|
id: string;
|
|
21
21
|
};
|
|
22
22
|
getCellSubRenderer(cell: CellFragment): SubRenderer | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* 获取当前行是都能分割
|
|
25
|
+
* @param rowIndex
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
getAllowRowSplit(rowIndex: number): boolean;
|
|
23
29
|
}
|
|
@@ -4,6 +4,7 @@ import { TextRun } from '../../view/runs/TextRun';
|
|
|
4
4
|
export type LineType = 'paragraph' | 'tablerow' | undefined;
|
|
5
5
|
export interface BuildCtx {
|
|
6
6
|
currentPageId: string;
|
|
7
|
+
area: 'body' | 'header' | 'footer' | 'overlay';
|
|
7
8
|
lineId?: string;
|
|
8
9
|
lineIndex: number;
|
|
9
10
|
lineType?: LineType;
|
|
@@ -24,6 +25,8 @@ export interface LineInfo {
|
|
|
24
25
|
type: 'tablerow' | 'paragraph';
|
|
25
26
|
/** 纸张 id */
|
|
26
27
|
pageId: string;
|
|
28
|
+
/** 所属区域 */
|
|
29
|
+
pageArea: 'body' | 'header' | 'footer' | 'overlay';
|
|
27
30
|
/** 排序 */
|
|
28
31
|
sort: number;
|
|
29
32
|
nextIds: string[];
|
|
@@ -56,8 +59,12 @@ export interface BaseMetaNode {
|
|
|
56
59
|
component: BuiltinComponentType;
|
|
57
60
|
/** 组件节点信息 */
|
|
58
61
|
raw?: LayoutNode;
|
|
62
|
+
/** 章节引用 id */
|
|
63
|
+
secRefId: string;
|
|
59
64
|
/** 纸张 id */
|
|
60
65
|
pageId: string;
|
|
66
|
+
/** 所属区域 */
|
|
67
|
+
pageArea: 'body' | 'header' | 'footer' | 'overlay';
|
|
61
68
|
/** 上级节点 id */
|
|
62
69
|
preId: string;
|
|
63
70
|
/** 宽度 */
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { Wdocument } from './document';
|
|
2
2
|
import { Wstyles } from './styles';
|
|
3
3
|
import { Wimages } from './images';
|
|
4
|
+
import { Wsettings } from './settings/Wsettings';
|
|
5
|
+
import { Wheaders } from './headers/Wheaders';
|
|
6
|
+
import { Wfooters } from './footers/Wfooters';
|
|
7
|
+
import { Woverlays } from './overlays/Woverlays';
|
|
4
8
|
import { Wr } from './document/Wp';
|
|
9
|
+
import { Section } from '../view/Section';
|
|
5
10
|
/**
|
|
6
11
|
* Word 文档模型
|
|
7
12
|
* 包含文档的所有组件(document、styles、images 等)
|
|
@@ -15,13 +20,21 @@ import { Wr } from './document/Wp';
|
|
|
15
20
|
*/
|
|
16
21
|
export interface DocModelOptions {
|
|
17
22
|
document: Wdocument;
|
|
23
|
+
headers: Wheaders;
|
|
24
|
+
footers: Wfooters;
|
|
18
25
|
styles: Wstyles;
|
|
19
26
|
images: Wimages;
|
|
27
|
+
settings: Wsettings;
|
|
28
|
+
overlays: Woverlays;
|
|
20
29
|
}
|
|
21
30
|
export declare class DocModel {
|
|
22
31
|
document: Wdocument;
|
|
32
|
+
headers: Wheaders;
|
|
33
|
+
footers: Wfooters;
|
|
23
34
|
styles: Wstyles;
|
|
24
35
|
images: Wimages;
|
|
36
|
+
settings: Wsettings;
|
|
37
|
+
overlays: Woverlays;
|
|
25
38
|
constructor(options: DocModelOptions);
|
|
26
39
|
/**
|
|
27
40
|
* 从原始 DOCX JSON 转换为 DocModel 实例
|
|
@@ -40,4 +53,11 @@ export declare class DocModel {
|
|
|
40
53
|
* @returns Wr 实例数组(包含 widgetMeta 和 valuePath 的文本或图片 run)
|
|
41
54
|
*/
|
|
42
55
|
getWidgetInstances(): Wr[];
|
|
56
|
+
/** 根据 pageIndex 获取页眉实例 */
|
|
57
|
+
getHeader(pageIndex: number, section: Section): import('./headers/Wheader').Wheader | null;
|
|
58
|
+
/** 根据 pageIndex 获取页脚实例 */
|
|
59
|
+
getFooter(pageIndex: number, section: Section): import('./footers/Wfooter').Wfooter | null;
|
|
60
|
+
/** 获取章节对应的浮层实例 */
|
|
61
|
+
getOverlay(section: Section): import('./overlays/Woverlay').Woverlay | null;
|
|
62
|
+
private collectSecPrs;
|
|
43
63
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DocModel } from '../DocModel';
|
|
2
|
+
import { WsecPr, Wtbl, Wp } from '../document';
|
|
2
3
|
export interface ModelNodeOptions {
|
|
3
4
|
id?: string;
|
|
4
5
|
attrs?: Record<string, any>;
|
|
@@ -41,11 +42,14 @@ export declare abstract class ModelNode {
|
|
|
41
42
|
static fromXmlJson(json: any): any;
|
|
42
43
|
remove(): void;
|
|
43
44
|
getCurrentIndex(): number;
|
|
45
|
+
getTopBlock<T extends Wp | Wtbl>(): T;
|
|
46
|
+
getSection<T extends WsecPr | null>(): T;
|
|
44
47
|
/**
|
|
45
48
|
* 获取根节点(顶层 DocModel 对象)
|
|
46
49
|
* @returns DocModel 根节点,如果找不到则返回 null
|
|
47
50
|
*/
|
|
48
51
|
getRoot(): DocModel | null;
|
|
52
|
+
getWlayout(): this | null;
|
|
49
53
|
/**
|
|
50
54
|
* 获取前一个兄弟节点
|
|
51
55
|
* @returns 前一个兄弟节点,如果没有则返回 null
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { RawElement } from '../types';
|
|
2
|
+
/** slot 类型(页眉页脚专用) */
|
|
3
|
+
export type RefSlotType = 'default' | 'first' | 'even';
|
|
4
|
+
/** 带 slot 的引用 */
|
|
5
|
+
export interface SlotRef {
|
|
6
|
+
type: RefSlotType;
|
|
7
|
+
rId: string;
|
|
8
|
+
}
|
|
9
|
+
/** 普通引用 */
|
|
10
|
+
export interface SimpleRef {
|
|
11
|
+
/** 悬浮类引用 id */
|
|
12
|
+
rId: string;
|
|
13
|
+
/** 章节id */
|
|
14
|
+
secId: string;
|
|
15
|
+
}
|
|
16
|
+
/** 通用 Ref 类型 */
|
|
17
|
+
type AnyRef = SlotRef | SimpleRef;
|
|
18
|
+
interface RefManagerOptions {
|
|
19
|
+
/** XML tag 名 */
|
|
20
|
+
tagName: string;
|
|
21
|
+
/** 是否是 slot 类型 */
|
|
22
|
+
withSlot: boolean;
|
|
23
|
+
/** raw 数据 */
|
|
24
|
+
raw: RawElement;
|
|
25
|
+
}
|
|
26
|
+
export declare class RefManager<T extends AnyRef> {
|
|
27
|
+
private tagName;
|
|
28
|
+
private withSlot;
|
|
29
|
+
private raw;
|
|
30
|
+
refs: T[];
|
|
31
|
+
constructor(options: RefManagerOptions);
|
|
32
|
+
/**
|
|
33
|
+
* 从 JSON 中提取引用
|
|
34
|
+
* @param json 原始JSON数据
|
|
35
|
+
* @param tag 标签名
|
|
36
|
+
* @returns 格式化后的引用列表
|
|
37
|
+
*/
|
|
38
|
+
parse(): T[];
|
|
39
|
+
/**
|
|
40
|
+
* 重新计算引用,并写回 raw
|
|
41
|
+
*/
|
|
42
|
+
normalize(refs: string[], secIds?: string[]): T[];
|
|
43
|
+
private normalizeSlotRefs;
|
|
44
|
+
private normalizeSimpleRefs;
|
|
45
|
+
/**
|
|
46
|
+
* 将引用写回 raw
|
|
47
|
+
*/
|
|
48
|
+
syncToRaw(): void;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -4,12 +4,13 @@ import { Wtc } from './Wtc';
|
|
|
4
4
|
import { WrText } from './WrText';
|
|
5
5
|
import { WrImage } from './WrImage';
|
|
6
6
|
import { WrField } from './WrField';
|
|
7
|
+
import { WrPageWidget } from './WrPageWidget';
|
|
7
8
|
import { ModelGroup, ModelGroupOptions } from '../base';
|
|
8
9
|
import { WpPr } from './WpPr';
|
|
9
10
|
/**
|
|
10
11
|
* Run 类型定义 - 可以是文本 Run 或图片 Run
|
|
11
12
|
*/
|
|
12
|
-
export type Wr = WrText | WrImage | WrField;
|
|
13
|
+
export type Wr = WrText | WrImage | WrField | WrPageWidget;
|
|
13
14
|
export declare class Wp extends ModelGroup {
|
|
14
15
|
name: 'w:p';
|
|
15
16
|
type: "element";
|
|
@@ -48,4 +49,16 @@ export declare class Wp extends ModelGroup {
|
|
|
48
49
|
* - newWp 被插入到 this 的后面(在父容器中)
|
|
49
50
|
*/
|
|
50
51
|
splitAt(index: number): [Wp | null, Wp | null];
|
|
52
|
+
/**
|
|
53
|
+
* 确保 rPr 实例存在,如果不存在则创建一个新的 WrPr 实例
|
|
54
|
+
*/
|
|
55
|
+
private ensurePPr;
|
|
56
|
+
/**
|
|
57
|
+
* 设置段落对齐方式
|
|
58
|
+
* @param alignment 对齐方式 ('left' | 'center' | 'right' | 'justify' 等)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* wp.setAlignment('center');
|
|
62
|
+
*/
|
|
63
|
+
setAlignment(alignment: string): void;
|
|
51
64
|
}
|
|
@@ -87,6 +87,19 @@ export declare class WpPr extends ModelNode {
|
|
|
87
87
|
* wpPr.setElement({ name: 'w:pStyle', type: 'element', '@attrs': { 'w:val': 'Heading1' } });
|
|
88
88
|
*/
|
|
89
89
|
setElement(element: RawElement): void;
|
|
90
|
+
/**
|
|
91
|
+
* 设置或更新指定元素的属性值
|
|
92
|
+
* 如果元素不存在则创建,如果属性已存在则更新
|
|
93
|
+
*
|
|
94
|
+
* @param elementName - 元素名称,如 'w:jc'、'w:ind'
|
|
95
|
+
* @param attrName - 属性名称,如 'w:val'、'w:left'
|
|
96
|
+
* @param value - 属性值
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* wpPr.setAttr('w:jc', 'w:val', 'center'); // 设置对齐方式为居中
|
|
100
|
+
* wpPr.setAttr('w:ind', 'w:left', '720'); // 设置左缩进
|
|
101
|
+
*/
|
|
102
|
+
setAttr(elementName: string, attrName: string, value: string): void;
|
|
90
103
|
/**
|
|
91
104
|
* 删除指定名称的子元素
|
|
92
105
|
*
|
|
@@ -20,14 +20,16 @@ export declare class WrText extends ModelNode {
|
|
|
20
20
|
elements?: IElement[];
|
|
21
21
|
valuePath?: string;
|
|
22
22
|
widgetMeta?: WidgetMeta;
|
|
23
|
+
pageWidgetMeta?: WidgetMeta;
|
|
23
24
|
constructor(options: ModelNodeOptions & {
|
|
24
25
|
text: string;
|
|
25
26
|
rPr?: WrPr;
|
|
26
27
|
elements?: IElement[];
|
|
27
28
|
isComposition?: boolean;
|
|
28
29
|
isPlaceholder?: boolean;
|
|
29
|
-
widgetMeta?: WidgetMeta;
|
|
30
30
|
valuePath?: string;
|
|
31
|
+
widgetMeta?: WidgetMeta;
|
|
32
|
+
pageWidgetMeta?: WidgetMeta;
|
|
31
33
|
});
|
|
32
34
|
/**
|
|
33
35
|
* 在指定位置插入文本
|
|
@@ -111,7 +113,8 @@ export declare class WrText extends ModelNode {
|
|
|
111
113
|
*/
|
|
112
114
|
static fromXmlJson(json: RawElement & {
|
|
113
115
|
valuePath?: string;
|
|
114
|
-
widgetMeta?:
|
|
116
|
+
widgetMeta?: WidgetMeta;
|
|
117
|
+
pageWidgetMeta?: WidgetMeta;
|
|
115
118
|
}): WrText;
|
|
116
119
|
/**
|
|
117
120
|
* 将实例转换为 XML JSON 格式
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RawElement } from '../types/raw';
|
|
2
|
-
import { ModelNode, ModelNodeOptions } from '../base';
|
|
2
|
+
import { ModelNode, RefManager, ModelNodeOptions, SimpleRef, SlotRef } from '../base';
|
|
3
|
+
export type HeaderFooterKind = 'header' | 'footer';
|
|
3
4
|
/**
|
|
4
5
|
* 页面大小配置
|
|
5
6
|
*/
|
|
@@ -48,6 +49,14 @@ export declare class WsecPr extends ModelNode {
|
|
|
48
49
|
margins?: PageMargins;
|
|
49
50
|
columns?: Columns;
|
|
50
51
|
docGrid?: DocGrid;
|
|
52
|
+
/** 页眉页脚首页不同 */
|
|
53
|
+
titlePg: boolean;
|
|
54
|
+
/** 页眉引用关系 */
|
|
55
|
+
headerRefManager: RefManager<SlotRef>;
|
|
56
|
+
/** 页脚引用关系 */
|
|
57
|
+
footerRefManager: RefManager<SlotRef>;
|
|
58
|
+
/** 浮层引用关系 */
|
|
59
|
+
overlayRefManager: RefManager<SimpleRef>;
|
|
51
60
|
fromParagraph: boolean;
|
|
52
61
|
constructor(options: ModelNodeOptions & {
|
|
53
62
|
raw: RawElement;
|
|
@@ -55,6 +64,7 @@ export declare class WsecPr extends ModelNode {
|
|
|
55
64
|
margins?: PageMargins;
|
|
56
65
|
columns?: Columns;
|
|
57
66
|
docGrid?: DocGrid;
|
|
67
|
+
titlePg: boolean;
|
|
58
68
|
});
|
|
59
69
|
/**
|
|
60
70
|
* 从原始 XML JSON 转换为 WsecPr 实例
|
|
@@ -64,6 +74,9 @@ export declare class WsecPr extends ModelNode {
|
|
|
64
74
|
* 将 WsecPr 实例转换为原始 XML JSON
|
|
65
75
|
*/
|
|
66
76
|
toXmlJson(): RawElement;
|
|
77
|
+
/**
|
|
78
|
+
* 获取页面宽度
|
|
79
|
+
*/
|
|
67
80
|
getPageWidth(): number | undefined;
|
|
68
81
|
/**
|
|
69
82
|
* 获取页面高度(单位:twip,1/20点)
|
|
@@ -73,6 +86,39 @@ export declare class WsecPr extends ModelNode {
|
|
|
73
86
|
* 获取有效的左边距(考虑装订线)
|
|
74
87
|
*/
|
|
75
88
|
getEffectiveLeftMargin(): number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* 根据页码解析页眉/页脚引用
|
|
91
|
+
* @param type 'header' | 'footer'
|
|
92
|
+
* @param pageIndex 页码
|
|
93
|
+
* @param evenAndOddHeaders 是否启用奇偶页不同
|
|
94
|
+
*/
|
|
95
|
+
private resolveHeaderFooterRef;
|
|
96
|
+
/**
|
|
97
|
+
* 根据 pageIndex 获取页眉引用
|
|
98
|
+
* @param pageIndex 页码
|
|
99
|
+
* @param evenAndOddHeaders 是否启用奇偶页
|
|
100
|
+
*/
|
|
101
|
+
getHeaderRef(pageIndex: number, evenAndOddHeaders: boolean): string | null;
|
|
102
|
+
/**
|
|
103
|
+
* 根据 pageIndex 获取页脚引用
|
|
104
|
+
* @param pageIndex 页码
|
|
105
|
+
* @param evenAndOddHeaders 是否启用奇偶页
|
|
106
|
+
*/
|
|
107
|
+
getFooterRef(pageIndex: number, evenAndOddHeaders: boolean): string | null;
|
|
108
|
+
/** 根据章节 id 获取浮层引用 */
|
|
109
|
+
getOverlayRef(): string | null;
|
|
110
|
+
/**
|
|
111
|
+
* 重新计算页眉引用,并写回 raw
|
|
112
|
+
*/
|
|
113
|
+
normalizeHeaderRefs(refIds: string[]): void;
|
|
114
|
+
/**
|
|
115
|
+
* 重新计算页脚引用,并写回 raw
|
|
116
|
+
*/
|
|
117
|
+
normalizeFooterRefs(refIds: string[]): void;
|
|
118
|
+
/**
|
|
119
|
+
* 重新计算浮层引用,并写回 raw
|
|
120
|
+
*/
|
|
121
|
+
normalizeOverlayRefs(refs: string[], secIds: string[]): void;
|
|
76
122
|
setOrient(val: 'portrait' | 'landscape'): void;
|
|
77
123
|
/**
|
|
78
124
|
* 设置为横向(宽 > 高)
|
|
@@ -112,4 +158,18 @@ export declare class WsecPr extends ModelNode {
|
|
|
112
158
|
* @param right 右边距值,单位:twip(1/20点)
|
|
113
159
|
*/
|
|
114
160
|
setMargins(top: number, bottom: number, left: number, right: number): void;
|
|
161
|
+
/**
|
|
162
|
+
* 设置页眉距页面顶边距离
|
|
163
|
+
* @param value 单位:twip
|
|
164
|
+
*/
|
|
165
|
+
setHeaderMargin(value: number): void;
|
|
166
|
+
/**
|
|
167
|
+
* 设置页脚距页面底边距离
|
|
168
|
+
* @param value 单位:twip
|
|
169
|
+
*/
|
|
170
|
+
setFooterMargin(value: number): void;
|
|
171
|
+
/**
|
|
172
|
+
* 设置首页不同页眉页脚
|
|
173
|
+
*/
|
|
174
|
+
setTitlePg(enabled: boolean): void;
|
|
115
175
|
}
|
|
@@ -12,6 +12,10 @@ export declare class WtblCalculation {
|
|
|
12
12
|
* 处理 repeating 数据
|
|
13
13
|
*/
|
|
14
14
|
private static processRepeating;
|
|
15
|
+
/**
|
|
16
|
+
* 处理 _2DTable 数据
|
|
17
|
+
*/
|
|
18
|
+
private static process2DTable;
|
|
15
19
|
/**
|
|
16
20
|
* 处理 bounded 数据
|
|
17
21
|
*/
|
|
@@ -20,4 +24,12 @@ export declare class WtblCalculation {
|
|
|
20
24
|
* 处理 boundedItem 数据
|
|
21
25
|
*/
|
|
22
26
|
private static processBoundedItem;
|
|
27
|
+
/**
|
|
28
|
+
* 处理 checkTable 数据
|
|
29
|
+
*/
|
|
30
|
+
private static processCheckTable;
|
|
31
|
+
/**
|
|
32
|
+
* 处理 dataGroup2D 数据
|
|
33
|
+
*/
|
|
34
|
+
private static processDataGroup2D;
|
|
23
35
|
}
|