@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.
- package/README.md +274 -15
- 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 +4 -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/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 +68 -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 +8 -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/{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 +7 -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/Wbackground.d.ts +22 -0
- package/dist/core/model/document/Wdocument.d.ts +7 -1
- package/dist/core/model/document/Wp.d.ts +8 -1
- package/dist/core/model/document/WrImage.d.ts +2 -0
- package/dist/core/model/document/WrPageWidget.d.ts +8 -0
- package/dist/core/model/document/WrText.d.ts +9 -2
- package/dist/core/model/document/WsecPr.d.ts +66 -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/Serialization.d.ts +12 -0
- package/dist/core/model/document/Wtbl.d.ts +22 -1
- package/dist/core/model/document/Wtc.d.ts +54 -4
- package/dist/core/model/document/WtrPr.d.ts +1 -0
- package/dist/core/model/document/index.d.ts +2 -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/templates/paragraph.template.d.ts +46 -0
- package/dist/core/model/templates/trPr.template.d.ts +19 -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 +29 -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 +26 -1
- package/dist/core/view/Table.d.ts +12 -0
- package/dist/core/view/TableCell.d.ts +7 -3
- 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 +14 -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 +6 -2
- package/dist/index.d.ts +5 -10
- package/dist/index.es.js +57077 -46931
- 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 +28 -7
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/barcode.vue.d.ts → runtime/canvas/node/overlay-layout.vue.d.ts} +2 -3
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/qrcode.vue.d.ts → runtime/canvas/overlay/page-overlay-group.vue.d.ts} +4 -3
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/diagonal.vue.d.ts → runtime/canvas/paper/header-footer-guides.vue.d.ts} +2 -3
- package/dist/runtime/canvas/paper/inner-corner-mark.vue.d.ts +2 -5
- package/dist/runtime/canvas/paper/paper-group.vue.d.ts +2 -1
- package/dist/{suites/edhr/panel-schema/paper-widget/widgets/serialnumber.vue.d.ts → runtime/canvas/paper/paper-hit-rect.vue.d.ts} +3 -3
- 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/sdk/doc-runtime/factories/runtime-json-builder.d.ts +17 -0
- package/dist/{runtime → sdk/doc-runtime}/factories/useDocumentFactory.d.ts +33 -6
- package/dist/sdk/doc-runtime/useWord.d.ts +16 -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 +154 -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/image.vue.d.ts → check-table/CheckTablePanel.vue.d.ts} +5 -5
- 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/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-load/ai-tmpl/identify-param-card.vue.d.ts +14 -0
- 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/{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
- 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/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 +9288 -8120
- 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/value-editor.vue.d.ts +0 -46
- /package/dist/suites/edhr/panel-config/{file → field/file}/upload.d.ts +0 -0
|
@@ -2,6 +2,7 @@ import { Page } from '../Page';
|
|
|
2
2
|
import { Doc } from '../Doc';
|
|
3
3
|
import { BuiltinComponentType } from '../../constants';
|
|
4
4
|
import { LayoutGroup } from './LayoutGroup';
|
|
5
|
+
import { OverlayLayout } from './OverlayLayout';
|
|
5
6
|
type ModelRef = {
|
|
6
7
|
id: string;
|
|
7
8
|
start?: number;
|
|
@@ -52,6 +53,7 @@ export declare abstract class LayoutNode {
|
|
|
52
53
|
set height(value: number);
|
|
53
54
|
get page(): Page | undefined;
|
|
54
55
|
get isWidgetRun(): boolean;
|
|
56
|
+
get isPageWidgetRun(): boolean;
|
|
55
57
|
get isSubRenderer(): boolean;
|
|
56
58
|
get isPlaceholderRun(): boolean;
|
|
57
59
|
/**
|
|
@@ -60,6 +62,7 @@ export declare abstract class LayoutNode {
|
|
|
60
62
|
* @returns
|
|
61
63
|
*/
|
|
62
64
|
getPage(): Page | undefined;
|
|
65
|
+
getOverlayLayout(): OverlayLayout | undefined;
|
|
63
66
|
/**
|
|
64
67
|
* 布局方法:计算并设置节点的绝对位置
|
|
65
68
|
* @param x 绝对 X 坐标
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LayoutNode } from './LayoutNode';
|
|
2
|
+
import { OverlayLayout } from './OverlayLayout';
|
|
3
|
+
import { Page } from '../Page';
|
|
4
|
+
import { LayoutGroup, LayoutGroupOptions } from './LayoutGroup';
|
|
5
|
+
export interface OverlayContainerOptions extends LayoutGroupOptions {
|
|
6
|
+
page: Page;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 悬浮层容器(浮层绘制层)
|
|
10
|
+
*/
|
|
11
|
+
export declare class OverlayContainer extends LayoutGroup<LayoutNode> {
|
|
12
|
+
component: "overlay-container";
|
|
13
|
+
parent: Page;
|
|
14
|
+
constructor(options: OverlayContainerOptions);
|
|
15
|
+
get page(): Page;
|
|
16
|
+
get width(): number;
|
|
17
|
+
get height(): number;
|
|
18
|
+
createOverlayLayout({ x, y, width, height, modelRef, }: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
modelRef: {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
}): OverlayLayout;
|
|
27
|
+
/**
|
|
28
|
+
* 悬浮层不参与文档流布局
|
|
29
|
+
*/
|
|
30
|
+
layout(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LayoutGroup, LayoutGroupOptions } from './LayoutGroup';
|
|
2
|
+
import { LayoutNode } from './LayoutNode';
|
|
3
|
+
export interface OverlayLayoutOptions extends LayoutGroupOptions {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 悬浮层内容布局
|
|
7
|
+
*/
|
|
8
|
+
export declare class OverlayLayout extends LayoutGroup<LayoutNode> {
|
|
9
|
+
component: "overlay-layout";
|
|
10
|
+
constructor(options: OverlayLayoutOptions);
|
|
11
|
+
/**
|
|
12
|
+
* 获取可用宽度
|
|
13
|
+
*/
|
|
14
|
+
get contentMaxWidth(): number;
|
|
15
|
+
/**
|
|
16
|
+
* 悬浮层不参与文档流布局,但是要设置 layoutX和 layoutY
|
|
17
|
+
*/
|
|
18
|
+
layout(): void;
|
|
19
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { LayoutNode, type LayoutNodeOptions } from './LayoutNode';
|
|
2
2
|
export { LayoutGroup, type LayoutGroupOptions } from './LayoutGroup';
|
|
3
|
+
export { BandContainer, type BandContainerOptions } from './BandContainer';
|
|
4
|
+
export { OverlayContainer, type OverlayContainerOptions } from './OverlayContainer';
|
|
@@ -3,8 +3,17 @@ import { LayoutNode, LayoutNodeOptions } from '../base';
|
|
|
3
3
|
* 图片运行接口
|
|
4
4
|
*/
|
|
5
5
|
export interface IImageRun {
|
|
6
|
+
readonly id: string;
|
|
6
7
|
/** 组件类型 */
|
|
7
8
|
readonly component: string;
|
|
9
|
+
/** 组件宽度 */
|
|
10
|
+
readonly width: number;
|
|
11
|
+
/** 组件高度 */
|
|
12
|
+
readonly height: number;
|
|
13
|
+
/** 组件坐标位置 */
|
|
14
|
+
readonly x: number;
|
|
15
|
+
/** 组件坐标位置 */
|
|
16
|
+
readonly y: number;
|
|
8
17
|
/** 图片源地址 */
|
|
9
18
|
src: string;
|
|
10
19
|
/** 是否保持等比 */
|
|
@@ -5,25 +5,31 @@ import { ImageRun, IImageRun, ImageRunOptions } from './ImageRun';
|
|
|
5
5
|
*/
|
|
6
6
|
export interface IImageWidget extends IImageRun {
|
|
7
7
|
/** 值路径 */
|
|
8
|
-
valuePath
|
|
8
|
+
valuePath?: string;
|
|
9
9
|
/** 组件元数据 */
|
|
10
|
-
widgetMeta
|
|
10
|
+
widgetMeta?: WidgetMeta;
|
|
11
11
|
signature?: string;
|
|
12
|
+
pageWidgetMeta?: Record<string, any>;
|
|
13
|
+
dataIndex?: number;
|
|
12
14
|
}
|
|
13
15
|
export interface ImageWidgetOptions extends ImageRunOptions {
|
|
14
16
|
/** 值路径 */
|
|
15
|
-
valuePath
|
|
17
|
+
valuePath?: string;
|
|
16
18
|
/** 组件元数据 */
|
|
17
|
-
widgetMeta
|
|
19
|
+
widgetMeta?: WidgetMeta;
|
|
18
20
|
signature?: string;
|
|
21
|
+
pageWidgetMeta?: IImageWidget['pageWidgetMeta'];
|
|
22
|
+
dataIndex?: number;
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
25
|
* 图片运行类
|
|
22
26
|
* 用于处理文档中的图片
|
|
23
27
|
*/
|
|
24
28
|
export declare class ImageWidget extends ImageRun implements IImageWidget {
|
|
25
|
-
valuePath
|
|
26
|
-
widgetMeta
|
|
29
|
+
valuePath?: string;
|
|
30
|
+
widgetMeta?: WidgetMeta;
|
|
27
31
|
signature?: string;
|
|
32
|
+
pageWidgetMeta?: IImageWidget['pageWidgetMeta'];
|
|
33
|
+
dataIndex?: number;
|
|
28
34
|
constructor(options: ImageWidgetOptions);
|
|
29
35
|
}
|
|
@@ -2,9 +2,6 @@ import { LayoutNode, LayoutNodeOptions } from '../base';
|
|
|
2
2
|
import { TextStyle } from '../../model/types/style';
|
|
3
3
|
import { default as Konva } from 'konva';
|
|
4
4
|
import { Doc } from '../Doc';
|
|
5
|
-
/**
|
|
6
|
-
* 文本对齐方式
|
|
7
|
-
*/
|
|
8
5
|
export type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
9
6
|
/**
|
|
10
7
|
* 字符度量信息
|
|
@@ -21,6 +18,14 @@ export interface ITextRun {
|
|
|
21
18
|
readonly id: string;
|
|
22
19
|
/** 组件类型 */
|
|
23
20
|
readonly component: string;
|
|
21
|
+
/** 组件宽度 */
|
|
22
|
+
readonly width: number;
|
|
23
|
+
/** 组件高度 */
|
|
24
|
+
readonly height: number;
|
|
25
|
+
/** 组件坐标位置 */
|
|
26
|
+
readonly x: number;
|
|
27
|
+
/** 组件坐标位置 */
|
|
28
|
+
readonly y: number;
|
|
24
29
|
/** 文本内容 */
|
|
25
30
|
text: string;
|
|
26
31
|
/** 字号 */
|
|
@@ -56,6 +61,7 @@ export interface TextRunOptions extends LayoutNodeOptions {
|
|
|
56
61
|
ascent: number;
|
|
57
62
|
descent: number;
|
|
58
63
|
style?: TextStyle;
|
|
64
|
+
charMetrics: CharMetric[];
|
|
59
65
|
}
|
|
60
66
|
export declare class TextRun extends LayoutNode implements ITextRun {
|
|
61
67
|
component: "text";
|
|
@@ -87,12 +93,29 @@ export declare class TextRun extends LayoutNode implements ITextRun {
|
|
|
87
93
|
descent: number;
|
|
88
94
|
style?: TextStyle;
|
|
89
95
|
constructor(options: TextRunOptions);
|
|
96
|
+
/**
|
|
97
|
+
* 计算文字大小 度量
|
|
98
|
+
* 优化版本
|
|
99
|
+
* @param payload
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
90
102
|
static measureText(payload: Konva.TextConfig): {
|
|
91
103
|
width: number;
|
|
92
104
|
height: number;
|
|
93
105
|
ascent: number;
|
|
94
106
|
descent: number;
|
|
95
107
|
};
|
|
108
|
+
/**
|
|
109
|
+
* 计算文字大小 度量
|
|
110
|
+
* @param payload
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
113
|
+
static __measureText(payload: Konva.TextConfig): {
|
|
114
|
+
width: number;
|
|
115
|
+
height: number;
|
|
116
|
+
ascent: number;
|
|
117
|
+
descent: number;
|
|
118
|
+
};
|
|
96
119
|
static createEmptyRun(doc: Doc): TextRun;
|
|
97
120
|
/**TextStyle(样式体系的样式)转换为 Layout 层的样式
|
|
98
121
|
* @param textStyle 经过继承计算的有效字符样式
|
|
@@ -4,10 +4,10 @@ import { TextRun, ITextRun, TextRunOptions } from './TextRun';
|
|
|
4
4
|
* 文本组件接口
|
|
5
5
|
*/
|
|
6
6
|
export interface ITextWidget extends ITextRun {
|
|
7
|
-
/**
|
|
8
|
-
widgetMeta
|
|
7
|
+
/** 字段组件元数据 */
|
|
8
|
+
widgetMeta?: WidgetMeta;
|
|
9
9
|
/** 值路径 */
|
|
10
|
-
valuePath
|
|
10
|
+
valuePath?: string;
|
|
11
11
|
/** 是否为空占位符 */
|
|
12
12
|
isEmptyPlaceholder: boolean;
|
|
13
13
|
isIconPlaceholder: boolean;
|
|
@@ -22,12 +22,15 @@ export interface ITextWidget extends ITextRun {
|
|
|
22
22
|
};
|
|
23
23
|
widgetFieldLeftMarker?: boolean;
|
|
24
24
|
widgetFieldRightMarker?: boolean;
|
|
25
|
+
/** 页面组件元数据 */
|
|
26
|
+
pageWidgetMeta?: WidgetMeta;
|
|
27
|
+
dataIndex?: number;
|
|
25
28
|
}
|
|
26
29
|
export interface TextWidgetOptions extends TextRunOptions {
|
|
27
30
|
/** 组件元数据 */
|
|
28
|
-
widgetMeta
|
|
31
|
+
widgetMeta?: WidgetMeta;
|
|
29
32
|
/** 值路径 */
|
|
30
|
-
valuePath
|
|
33
|
+
valuePath?: string;
|
|
31
34
|
/** 是否为空占位符 */
|
|
32
35
|
isEmptyPlaceholder?: boolean;
|
|
33
36
|
isIconPlaceholder?: boolean;
|
|
@@ -36,10 +39,12 @@ export interface TextWidgetOptions extends TextRunOptions {
|
|
|
36
39
|
widgetFileItem?: ITextWidget['widgetFileItem'];
|
|
37
40
|
widgetFieldLeftMarker?: boolean;
|
|
38
41
|
widgetFieldRightMarker?: boolean;
|
|
42
|
+
pageWidgetMeta: ITextWidget['pageWidgetMeta'];
|
|
43
|
+
dataIndex?: number;
|
|
39
44
|
}
|
|
40
45
|
export declare class TextWidget extends TextRun implements ITextWidget {
|
|
41
|
-
widgetMeta
|
|
42
|
-
valuePath
|
|
46
|
+
widgetMeta?: WidgetMeta;
|
|
47
|
+
valuePath?: string;
|
|
43
48
|
isEmptyPlaceholder: boolean;
|
|
44
49
|
isIconPlaceholder: boolean;
|
|
45
50
|
isSpacePlaceholder: boolean;
|
|
@@ -47,5 +52,7 @@ export declare class TextWidget extends TextRun implements ITextWidget {
|
|
|
47
52
|
widgetFieldRightMarker?: boolean;
|
|
48
53
|
widgetOption?: ITextWidget['widgetOption'];
|
|
49
54
|
widgetFileItem?: ITextWidget['widgetFileItem'];
|
|
55
|
+
pageWidgetMeta: ITextWidget['pageWidgetMeta'];
|
|
56
|
+
dataIndex?: number;
|
|
50
57
|
constructor(options: TextWidgetOptions);
|
|
51
58
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 事件类 - 管理事件的注册、注销和触发
|
|
3
|
+
*/
|
|
4
|
+
export declare class EventUtil {
|
|
5
|
+
private listeners;
|
|
6
|
+
/**
|
|
7
|
+
* 注册监听器
|
|
8
|
+
*/
|
|
9
|
+
on(listener: (payload?: any) => void): void;
|
|
10
|
+
/**
|
|
11
|
+
* 注销监听器
|
|
12
|
+
*/
|
|
13
|
+
off(listener: () => void): void;
|
|
14
|
+
/**
|
|
15
|
+
* 清空所有监听器
|
|
16
|
+
*/
|
|
17
|
+
clear(): void;
|
|
18
|
+
/**
|
|
19
|
+
* 触发事件
|
|
20
|
+
*/
|
|
21
|
+
emit(payload?: any): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { default as Konva } from 'konva';
|
|
2
|
+
export declare class TextUtil {
|
|
3
|
+
/** 字体度量缓存限制 */
|
|
4
|
+
private static readonly FONT_METRICS_CACHE_LIMIT;
|
|
5
|
+
/** 布局大小缓存限制 */
|
|
6
|
+
private static readonly LAYOUT_SIZE_CACHE_LIMIT;
|
|
7
|
+
private static fontMetricsCache;
|
|
8
|
+
private static layoutSizeCache;
|
|
9
|
+
/**
|
|
10
|
+
* 验证中文字符
|
|
11
|
+
* @param char
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
static isHanChar(char: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 计算度量 - 基于 JSON 序列化的缓存(LRU)
|
|
17
|
+
* 将最终的 config 序列化为缓存键,相同配置直接返回缓存结果
|
|
18
|
+
* 最近使用的项会被移到末尾,超限时删除最古老的项
|
|
19
|
+
* @param payload
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
static getFontMetrics(payload: Konva.TextConfig): {
|
|
23
|
+
ascent: number;
|
|
24
|
+
descent: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* 计算单个字符布局大小 - 基于 JSON 序列化的缓存(LRU)
|
|
28
|
+
* @param payload
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
static getLayoutSize(payload: Konva.TextConfig): {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 清除度量结果缓存
|
|
37
|
+
*/
|
|
38
|
+
static clearMeasureCache(): void;
|
|
39
|
+
/**
|
|
40
|
+
* 获取缓存大小信息
|
|
41
|
+
* @returns 返回测量缓存的大小 {fontMetrics, layoutSize}
|
|
42
|
+
*/
|
|
43
|
+
static getMeasureCacheSize(): {
|
|
44
|
+
fontMetrics: number;
|
|
45
|
+
layoutSize: number;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldDataBindingMeta } from '../../domain/field/field-binding';
|
|
2
|
+
import { PaperWidgetDataBindingMeta } from '../../domain/paper-widget/widget-binding';
|
|
2
3
|
import { ExternalComponentType } from '../../domain/widget/component-type';
|
|
3
4
|
/** 组件基础信息 */
|
|
4
5
|
interface WidgetMetaBase {
|
|
@@ -32,6 +33,8 @@ interface WidgetBehaviorMeta {
|
|
|
32
33
|
removable?: boolean;
|
|
33
34
|
/** 是否允许作为容器 */
|
|
34
35
|
droppable?: boolean;
|
|
36
|
+
/** 是否允许脱离文档流 */
|
|
37
|
+
outOfFlow?: boolean;
|
|
35
38
|
/** 事件映射 */
|
|
36
39
|
events?: Record<string, {
|
|
37
40
|
action: string;
|
|
@@ -61,6 +64,8 @@ export interface WidgetMeta extends WidgetMetaBase {
|
|
|
61
64
|
style?: WidgetStyleMeta;
|
|
62
65
|
/** 字段信息 */
|
|
63
66
|
field?: FieldDataBindingMeta;
|
|
67
|
+
/** 页面组件信息 */
|
|
68
|
+
widget?: PaperWidgetDataBindingMeta;
|
|
64
69
|
/** 扩展能力 */
|
|
65
70
|
extra?: WidgetExtraMeta;
|
|
66
71
|
}
|
|
@@ -2,18 +2,24 @@
|
|
|
2
2
|
export type PanelType =
|
|
3
3
|
/** 纸张 */
|
|
4
4
|
'panel:paper'
|
|
5
|
-
/**
|
|
6
|
-
| 'panel:paper-header'
|
|
7
|
-
/** 页脚 */
|
|
8
|
-
| 'panel:paper-footer'
|
|
5
|
+
/** 页眉页脚 */
|
|
6
|
+
| 'panel:paper-header-footer'
|
|
9
7
|
/** 数据初始化 */
|
|
10
8
|
| 'panel:data-init'
|
|
9
|
+
/** 数据加载 */
|
|
10
|
+
| 'panel:data-load'
|
|
11
11
|
/** 动态表 */
|
|
12
12
|
| 'panel:dynamic-table'
|
|
13
|
+
/** 二维表 */
|
|
14
|
+
| 'panel:2d-table'
|
|
13
15
|
/** 固定表 */
|
|
14
16
|
| 'panel:fixed-table'
|
|
17
|
+
/** 检验表 */
|
|
18
|
+
| 'panel:check-table'
|
|
15
19
|
/** 数据分组 */
|
|
16
20
|
| 'panel:data-group'
|
|
21
|
+
/** 动态关联 */
|
|
22
|
+
| 'panel:data-group-2d'
|
|
17
23
|
/** 表头 */
|
|
18
24
|
| 'panel:table-header'
|
|
19
25
|
/** 组件 */
|
|
@@ -22,13 +28,13 @@ type ActiveContext = {
|
|
|
22
28
|
mainModelKey: string;
|
|
23
29
|
subFieldKey: string | undefined;
|
|
24
30
|
regionId: string;
|
|
31
|
+
/** 章节引用 id */
|
|
32
|
+
secRefId: string;
|
|
25
33
|
};
|
|
26
34
|
/** 选中的面板信息 */
|
|
27
35
|
export interface ActivePanelData {
|
|
28
36
|
/** 面板类型 */
|
|
29
37
|
panelType: PanelType;
|
|
30
|
-
/** widget 标识 */
|
|
31
|
-
widgetId?: string;
|
|
32
38
|
/** widget 对应底层的 model id */
|
|
33
39
|
modelId?: string;
|
|
34
40
|
/** 上下文信息 */
|
|
@@ -170,3 +170,37 @@ export declare const ViewTypeConst: {
|
|
|
170
170
|
VIEW_JS: string;
|
|
171
171
|
};
|
|
172
172
|
export type ViewType = ValueOf<typeof ViewTypeConst>;
|
|
173
|
+
/** 条码二维码类型 */
|
|
174
|
+
export declare const BwipCodeTypeConst: {
|
|
175
|
+
Code39: string;
|
|
176
|
+
Code128: string;
|
|
177
|
+
QRCode: string;
|
|
178
|
+
GS1DataMatrix: string;
|
|
179
|
+
};
|
|
180
|
+
export type BwipCodeType = ValueOf<typeof BwipCodeTypeConst>;
|
|
181
|
+
/** 条码二维码内容类型 */
|
|
182
|
+
export declare const ValueTypeConst: {
|
|
183
|
+
/** 固定值 */
|
|
184
|
+
Fixed: string;
|
|
185
|
+
/** 字段 */
|
|
186
|
+
Field: string;
|
|
187
|
+
/** 公式 */
|
|
188
|
+
Formula: string;
|
|
189
|
+
};
|
|
190
|
+
export type ValueType = ValueOf<typeof ValueTypeConst>;
|
|
191
|
+
/** 图片组件高宽呈现模式 */
|
|
192
|
+
export declare const ImageSizeModeTypeConst: {
|
|
193
|
+
/** 自适应,响应式的适应外层容器的大小 */
|
|
194
|
+
RESPONSIVE: string;
|
|
195
|
+
/** 固定值,高宽设了多少就是多少 */
|
|
196
|
+
FIXED: string;
|
|
197
|
+
};
|
|
198
|
+
export type ImageSizeModeType = ValueOf<typeof ImageSizeModeTypeConst>;
|
|
199
|
+
/** 分栏的方向 */
|
|
200
|
+
export declare const DiagonalDirectionTypeConst: {
|
|
201
|
+
/** 从左上到右下 */
|
|
202
|
+
Forward: string;
|
|
203
|
+
/** 从右上到左下 / */
|
|
204
|
+
Backward: string;
|
|
205
|
+
};
|
|
206
|
+
export type DiagonalDirectionType = ValueOf<typeof DiagonalDirectionTypeConst>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** 字段配置-渲染组件标识 */
|
|
2
|
-
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-trace' | 'schema:field-business';
|
|
2
|
+
export type FieldPropsSchemaKey = 'schema:field-text' | 'schema:field-boolean' | 'schema:field-number' | 'schema:field-datetime' | 'schema:field-user' | 'schema:field-org' | 'schema:field-sign' | 'schema:field-enum' | 'schema:field-file' | 'schema:field-image' | 'schema:field-trace' | 'schema:field-business';
|
|
3
3
|
/** 优先级规则 */
|
|
4
4
|
export interface PriorityRule {
|
|
5
5
|
type: 'priority';
|
|
@@ -1,147 +1,16 @@
|
|
|
1
|
-
import { PanelType } from '../active/active-types';
|
|
2
|
-
import { FIELD_TYPE } from '../field/field-type';
|
|
3
|
-
import { CreateType } from '../model/model-type';
|
|
4
1
|
export declare enum PAPER_WIDGET_TYPE {
|
|
2
|
+
/** 图片 */
|
|
5
3
|
IMAGE = "image",
|
|
4
|
+
/** 条形码 */
|
|
6
5
|
BARCODE = "barcode",
|
|
6
|
+
/** 二维码 */
|
|
7
7
|
QRCODE = "qrcode",
|
|
8
|
+
/** 表头分栏 */
|
|
8
9
|
DIAGONAL = "diagonal",
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
Fixed = "fixed",
|
|
16
|
-
Field = "field",
|
|
17
|
-
Formula = "formula"
|
|
18
|
-
}
|
|
19
|
-
export interface IBindField {
|
|
20
|
-
/** 字段key */
|
|
21
|
-
field?: string;
|
|
22
|
-
/** 字段类型 */
|
|
23
|
-
fieldType?: FIELD_TYPE;
|
|
24
|
-
/** 字段所属模型 */
|
|
25
|
-
model?: string;
|
|
26
|
-
/** 模型链路 */
|
|
27
|
-
modelLink?: string;
|
|
28
|
-
/** 字段链路 */
|
|
29
|
-
fieldLink?: string;
|
|
30
|
-
/** 是否是关联模型字段 */
|
|
31
|
-
isFieldModel?: boolean;
|
|
32
|
-
/** 子表模型key */
|
|
33
|
-
subModelKey?: string;
|
|
34
|
-
/** 子表字段key */
|
|
35
|
-
subFieldKey?: string;
|
|
36
|
-
/** 字段来源 */
|
|
37
|
-
createType?: CreateType;
|
|
38
|
-
/** 引用的模型key */
|
|
39
|
-
refModelKey?: string;
|
|
40
|
-
}
|
|
41
|
-
export declare enum BwipCodeType {
|
|
42
|
-
Code39 = "code39",
|
|
43
|
-
Code128 = "code128",
|
|
44
|
-
QRCode = "qrcode",
|
|
45
|
-
GS1DataMatrix = "gs1datamatrix"
|
|
46
|
-
}
|
|
47
|
-
export declare const BwipCodeTypeOptions: Array<{
|
|
48
|
-
code: BwipCodeType;
|
|
49
|
-
title: string;
|
|
50
|
-
widget: PAPER_WIDGET_TYPE;
|
|
51
|
-
example: string;
|
|
52
|
-
}>;
|
|
53
|
-
/** 分栏的方向 */
|
|
54
|
-
export declare enum DiagonalDirection {
|
|
55
|
-
/** 从左上到右下 \ */
|
|
56
|
-
Forward = "forward",
|
|
57
|
-
/** 从右上到左下 / */
|
|
58
|
-
Backward = "backward"
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 图片组件高宽呈现模式
|
|
62
|
-
*/
|
|
63
|
-
export declare enum WidgetImageSizeMode {
|
|
64
|
-
/**
|
|
65
|
-
* 自适应,响应式的适应外层容器的大小
|
|
66
|
-
*/
|
|
67
|
-
RESPONSIVE = "responsive",
|
|
68
|
-
/**
|
|
69
|
-
* 固定值,高宽设了多少就是多少
|
|
70
|
-
*/
|
|
71
|
-
FIXED = "fixed"
|
|
72
|
-
}
|
|
73
|
-
export declare namespace PaperWidget {
|
|
74
|
-
interface BasicSchema {
|
|
75
|
-
/** 组件id */
|
|
76
|
-
id: string;
|
|
77
|
-
icon: string;
|
|
78
|
-
/** 组件类型 */
|
|
79
|
-
type: PAPER_WIDGET_TYPE;
|
|
80
|
-
name: string;
|
|
81
|
-
/** 组件值 */
|
|
82
|
-
value?: string;
|
|
83
|
-
layout: {
|
|
84
|
-
width?: number;
|
|
85
|
-
height?: number;
|
|
86
|
-
top?: number;
|
|
87
|
-
left?: number;
|
|
88
|
-
};
|
|
89
|
-
resizable: boolean;
|
|
90
|
-
sort: number;
|
|
91
|
-
dragToPos: PanelType[];
|
|
92
|
-
}
|
|
93
|
-
interface Image extends BasicSchema {
|
|
94
|
-
type: PAPER_WIDGET_TYPE.IMAGE;
|
|
95
|
-
sizeMode: WidgetImageSizeMode;
|
|
96
|
-
}
|
|
97
|
-
interface Barcode extends BasicSchema {
|
|
98
|
-
type: PAPER_WIDGET_TYPE.BARCODE;
|
|
99
|
-
valueType: PaperWidgetValueType;
|
|
100
|
-
fieldType?: string;
|
|
101
|
-
modelKey?: string;
|
|
102
|
-
modelLink?: string;
|
|
103
|
-
fieldLink?: string;
|
|
104
|
-
isFieldModel?: boolean;
|
|
105
|
-
subModelKey?: string;
|
|
106
|
-
subFieldKey?: string;
|
|
107
|
-
createType?: CreateType;
|
|
108
|
-
refModelKey?: string;
|
|
109
|
-
codeType: BwipCodeType.Code39 | BwipCodeType.Code128;
|
|
110
|
-
showValue: boolean;
|
|
111
|
-
styles?: {
|
|
112
|
-
justifyContent: string;
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
interface Qrcode extends BasicSchema {
|
|
116
|
-
type: PAPER_WIDGET_TYPE.QRCODE;
|
|
117
|
-
valueType: PaperWidgetValueType;
|
|
118
|
-
fieldType?: string;
|
|
119
|
-
modelKey?: string;
|
|
120
|
-
modelLink?: string;
|
|
121
|
-
fieldLink?: string;
|
|
122
|
-
isFieldModel?: boolean;
|
|
123
|
-
subModelKey?: string;
|
|
124
|
-
subFieldKey?: string;
|
|
125
|
-
createType?: CreateType;
|
|
126
|
-
refModelKey?: string;
|
|
127
|
-
codeType: BwipCodeType.QRCode | BwipCodeType.GS1DataMatrix;
|
|
128
|
-
}
|
|
129
|
-
interface Diagonal extends BasicSchema {
|
|
130
|
-
type: PAPER_WIDGET_TYPE.DIAGONAL;
|
|
131
|
-
size: 2 | 3;
|
|
132
|
-
names: [string, string, string];
|
|
133
|
-
/** 是否启用绑定字段 */
|
|
134
|
-
enableFields?: [boolean, boolean, boolean];
|
|
135
|
-
/** 绑定的字段 */
|
|
136
|
-
bindFields?: [IBindField | undefined, IBindField | undefined, IBindField | undefined];
|
|
137
|
-
/** 分栏方向 */
|
|
138
|
-
direction: DiagonalDirection;
|
|
139
|
-
}
|
|
140
|
-
interface Serialnumber extends BasicSchema {
|
|
141
|
-
type: PAPER_WIDGET_TYPE.SERIAL_NUMBER;
|
|
142
|
-
/** 初始数值 */
|
|
143
|
-
initialValue: number;
|
|
144
|
-
/** 自增跨度 */
|
|
145
|
-
autoAddValue: number;
|
|
146
|
-
}
|
|
10
|
+
/** 序列号 */
|
|
11
|
+
SERIAL_NUMBER = "serialnumber",
|
|
12
|
+
/** 页码 */
|
|
13
|
+
PAGINATION = "pagination",
|
|
14
|
+
/** 线条 */
|
|
15
|
+
LINE = "line"
|
|
147
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type ExternalComponentType = 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber';
|
|
1
|
+
export type ExternalComponentType = 'fw:input' | 'fw:number' | 'fw:double' | 'fw:enum' | 'fw:enum-multiple' | 'fw:date-time' | 'fw:date' | 'fw:time' | 'fw:select' | 'fw:select-multiple' | 'fw:tree-select' | 'fw:tree-select-multiple' | 'fw:table-select' | 'fw:rdo-table-select' | 'fw:signature' | 'fw:image' | 'fw:file' | 'pw:image' | 'pw:barcode' | 'pw:qrcode' | 'pw:diagonal' | 'pw:serialnumber' | 'pw:pagination' | 'pw:line';
|
|
2
2
|
/** 渲染组件标识 后续支持自定义组件 */
|
|
3
|
-
export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-leftMarker' | 'render:gct-rightMarker';
|
|
3
|
+
export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image' | 'render:gct-signature' | 'render:gct-leftMarker' | 'render:gct-rightMarker' | 'render:pw-barcode' | 'render:pw-qrcode' | 'render:pw-image' | 'render:pw-diagonal' | 'render:pw-pagination' | 'render:pw-line';
|
|
4
4
|
/** 渲染节点集合 */
|
|
5
5
|
export interface FieldNodeRenderers {
|
|
6
6
|
/** 暗提示节点 */
|
|
@@ -16,3 +16,7 @@ export interface FieldNodeRenderers {
|
|
|
16
16
|
/** 字段右侧框选标记 */
|
|
17
17
|
rightMarker: ExternalNodeType;
|
|
18
18
|
}
|
|
19
|
+
export interface PaperWidgetNodeRenderers {
|
|
20
|
+
/** 文本节点 */
|
|
21
|
+
text: ExternalNodeType;
|
|
22
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export { useDocEngine } from './runtime/useDocEngine';
|
|
7
|
-
export { getSubmitFormData } from './runtime/interface/utils';
|
|
8
|
-
export { validateAllFields } from './runtime/factories/useFormValidator';
|
|
9
|
-
export * from './setup';
|
|
10
|
-
export type { DocModeType, CompleteComponentType, BuiltinComponentType } from './core';
|
|
1
|
+
/**
|
|
2
|
+
* @gct-paas/word 主入口
|
|
3
|
+
* 所有导出均来自 SDK 层,不直接透出内部实现
|
|
4
|
+
*/
|
|
5
|
+
export * from './sdk/index';
|