@gct-paas/word 0.1.7 → 0.1.8
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/image-upload/index.d.ts +1 -0
- package/dist/base/image-upload/src/image-upload.type.d.ts +8 -0
- package/dist/base/image-upload/src/image-upload.vue.d.ts +16 -0
- package/dist/base/index.d.ts +1 -0
- package/dist/capabilities/model-field-runtime/types/paper-widget.d.ts +10 -0
- package/dist/capabilities/paper-widget-manifest/index.d.ts +3 -0
- package/dist/capabilities/paper-widget-manifest/registry.d.ts +7 -0
- package/dist/capabilities/paper-widget-manifest/service.d.ts +9 -0
- package/dist/capabilities/paper-widget-manifest/types.d.ts +21 -0
- package/dist/core/command/commands/{InsertWidget.d.ts → InsertPaperWidget.d.ts} +3 -3
- package/dist/core/command/types.d.ts +2 -2
- package/dist/core/interaction/useInteraction.d.ts +0 -1
- package/dist/core/model/base/ModelNode.d.ts +1 -1
- package/dist/core/model/document/WrImage.d.ts +25 -61
- package/dist/core/model/document/Wtbl.d.ts +3 -18
- package/dist/core/model/logic/BoundedRegion.d.ts +13 -9
- package/dist/core/model/logic/RepeatingRegion.d.ts +10 -8
- package/dist/core/sdk/DocPubApiContext.d.ts +3 -0
- package/dist/core/sdk/types/public-types.d.ts +48 -0
- package/dist/domain/active/active-types.d.ts +0 -1
- package/dist/domain/constants/enum.d.ts +26 -0
- package/dist/{suites/edhr/panel-schema/widget/widget.type.d.ts → domain/paper-widget/paper-widget-type.d.ts} +17 -17
- package/dist/domain/widget/component-type.d.ts +1 -1
- package/dist/index.es.js +23728 -22768
- package/dist/runtime/_register_/composables/panel/useActivePanel.d.ts +0 -1
- package/dist/runtime/_register_/context/DesignSuiteContext.d.ts +4 -0
- package/dist/runtime/_register_/runtime/SuiteRuntime.d.ts +3 -0
- package/dist/runtime/canvas/__common__/widget-container/overlay-design.vue.d.ts +2 -1
- package/dist/runtime/canvas/__common__/widget-container/overlay-render.vue.d.ts +3 -2
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +0 -1
- package/dist/runtime/designer/panel/panel.vue.d.ts +1 -1
- package/dist/runtime/factories/createPaperWidgetToWidgetFactory.d.ts +13 -0
- package/dist/runtime/factories/useRenderData.d.ts +11 -6
- package/dist/runtime/interface/computed.d.ts +8 -1
- package/dist/runtime/interface/data.d.ts +32 -0
- package/dist/runtime/interface/render.d.ts +2 -1
- package/dist/runtime/interface/utils.d.ts +2 -0
- package/dist/runtime/interface/validate.d.ts +4 -0
- package/dist/runtime/renderer/dropdowns/components/dropdown-container.vue.d.ts +2 -2
- package/dist/runtime/renderer/dropdowns/components/tables/composables/useTableDropdown.d.ts +3 -0
- package/dist/runtime/renderer/dropdowns/components/tables/strategy/selectStrategy.d.ts +14 -1
- package/dist/suites/edhr/panel-schema/index.d.ts +1 -1
- package/dist/suites/edhr/panel-schema/{widget/widget-qrcode.vue.d.ts → paper-widget/widgets/barcode.vue.d.ts} +1 -1
- package/dist/suites/edhr/panel-schema/{widget/widget-diagonal.vue.d.ts → paper-widget/widgets/diagonal.vue.d.ts} +1 -1
- package/dist/suites/edhr/panel-schema/{widget → paper-widget/widgets}/editors/diagonal-name-editor.vue.d.ts +1 -1
- package/dist/suites/edhr/panel-schema/{widget → paper-widget/widgets}/editors/value-editor.vue.d.ts +4 -4
- package/dist/suites/edhr/panel-schema/{widget/widget-image.vue.d.ts → paper-widget/widgets/image.vue.d.ts} +1 -2
- package/dist/suites/edhr/panel-schema/{widget/widget-barcode.vue.d.ts → paper-widget/widgets/qrcode.vue.d.ts} +1 -1
- package/dist/suites/edhr/panel-schema/{widget/widget-serialnumber.vue.d.ts → paper-widget/widgets/serialnumber.vue.d.ts} +1 -1
- package/dist/suites/edhr/paper-widget-manifest/basic/barcode-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/diagonal-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/image-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/qrcode-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/basic/serialnumber-manifest.d.ts +2 -0
- package/dist/suites/edhr/paper-widget-manifest/index.d.ts +2 -0
- package/dist/utils/func/core.d.ts +2 -0
- package/dist/utils/func/dragdrop.d.ts +6 -6
- package/dist/utils/symbol/contextKey.d.ts +1 -0
- package/dist/word.css +185 -120
- package/package.json +1 -1
- package/dist/runtime/factories/createWidgetToWidgetFactory.d.ts +0 -14
- /package/dist/suites/edhr/panel-schema/{widget/WidgetPanel.vue.d.ts → paper-widget/PaperWidgetPanel.vue.d.ts} +0 -0
- /package/dist/suites/edhr/panel-schema/{widget/widget.basic.d.ts → paper-widget/paper-widget.basic.d.ts} +0 -0
- /package/dist/suites/edhr/panel-schema/{widget → paper-widget/widgets}/editors/align-editor.vue.d.ts +0 -0
- /package/dist/suites/edhr/panel-schema/{widget → paper-widget/widgets}/editors/img-parser.d.ts +0 -0
- /package/dist/suites/edhr/panel-schema/{widget → paper-widget/widgets}/editors/size-editor.vue.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GctImageUpload } from './src/image-upload.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUploadProps } from './image-upload.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<IUploadProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
+
change: (...args: any[]) => void;
|
|
4
|
+
"update:value": (...args: any[]) => void;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<IUploadProps> & Readonly<{
|
|
6
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
7
|
+
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
width: string;
|
|
10
|
+
height: string;
|
|
11
|
+
tip: string;
|
|
12
|
+
accept: string;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
14
|
+
inputRef: HTMLInputElement;
|
|
15
|
+
}, any>;
|
|
16
|
+
export default _default;
|
package/dist/base/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PAPER_WIDGET_TYPE } from '../../domain/paper-widget/paper-widget-type';
|
|
2
|
+
import { BaseRegistry } from '../base/BaseRegistry';
|
|
3
|
+
import { PaperWidgetManifest, PaperWidgetManifestMap } from './types';
|
|
4
|
+
export declare class PaperWidgetManifestRegistry extends BaseRegistry<PAPER_WIDGET_TYPE, PaperWidgetManifest> {
|
|
5
|
+
register(suiteKey: SuiteKey, manifests: PaperWidgetManifestMap): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const paperWidgetManifestRegistry: PaperWidgetManifestRegistry;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseService } from '../base/BaseService';
|
|
2
|
+
import { PaperWidgetManifestRegistry } from './registry';
|
|
3
|
+
import { PAPER_WIDGET_TYPE } from '../../domain/paper-widget/paper-widget-type';
|
|
4
|
+
import { PaperWidgetManifest } from './types';
|
|
5
|
+
export declare class PaperWidgetManifestService extends BaseService<PAPER_WIDGET_TYPE, PaperWidgetManifest, PaperWidgetManifestRegistry> {
|
|
6
|
+
constructor(suiteKey: SuiteKey);
|
|
7
|
+
getManifestBySuite(): PaperWidgetManifest[];
|
|
8
|
+
getManifestByType(type: PAPER_WIDGET_TYPE): PaperWidgetManifest | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ExternalComponentType } from '../../domain/widget/component-type';
|
|
2
|
+
import { PAPER_WIDGET_TYPE } from '../../domain/paper-widget/paper-widget-type';
|
|
3
|
+
export interface PaperWidgetManifest {
|
|
4
|
+
/** 唯一 key */
|
|
5
|
+
key: string;
|
|
6
|
+
/** 字段类型 */
|
|
7
|
+
type: PAPER_WIDGET_TYPE;
|
|
8
|
+
/** 名称 */
|
|
9
|
+
label: string;
|
|
10
|
+
/** icon 标识 */
|
|
11
|
+
icon: string;
|
|
12
|
+
/** icon 版本 */
|
|
13
|
+
version: 'v1' | 'v2';
|
|
14
|
+
/** 是否允许拖入 Word */
|
|
15
|
+
allowDrag?: boolean;
|
|
16
|
+
/** 渲染的组件类型 */
|
|
17
|
+
component: ExternalComponentType;
|
|
18
|
+
/** 默认属性 */
|
|
19
|
+
defaultProps: Record<string, any>;
|
|
20
|
+
}
|
|
21
|
+
export type PaperWidgetManifestMap = Partial<Record<PAPER_WIDGET_TYPE, PaperWidgetManifest>>;
|
|
@@ -3,9 +3,9 @@ import { Doc } from '../../view/Doc';
|
|
|
3
3
|
import { CommandPayloadMap } from '../types';
|
|
4
4
|
import { Wp, Wtc } from '../../model/document';
|
|
5
5
|
import { ModelNode } from '../../model/base';
|
|
6
|
-
type
|
|
7
|
-
export declare class
|
|
8
|
-
constructor(doc: Doc, payload:
|
|
6
|
+
type InsertPaperWidgetCommandOptions = CommandPayloadMap['insertPaperWidget'];
|
|
7
|
+
export declare class InsertPaperWidget extends CommandBase<'insertPaperWidget'> {
|
|
8
|
+
constructor(doc: Doc, payload: InsertPaperWidgetCommandOptions);
|
|
9
9
|
protected execute(): Promise<PostCommandContext>;
|
|
10
10
|
/**
|
|
11
11
|
* 处理折叠状态下的图片插入
|
|
@@ -30,7 +30,7 @@ export declare const CommandType: {
|
|
|
30
30
|
readonly insertTable: "insertTable";
|
|
31
31
|
readonly insertImage: "insertImage";
|
|
32
32
|
readonly insertField: "insertField";
|
|
33
|
-
readonly
|
|
33
|
+
readonly insertPaperWidget: "insertPaperWidget";
|
|
34
34
|
readonly delete: "delete";
|
|
35
35
|
readonly backspace: "backspace";
|
|
36
36
|
readonly enter: "enter";
|
|
@@ -80,7 +80,7 @@ export type CommandPayloadMap = {
|
|
|
80
80
|
widgetMeta: WidgetMeta;
|
|
81
81
|
valuePath: string;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
insertPaperWidget: CommandPayload & {
|
|
84
84
|
widgetMeta: WidgetMeta;
|
|
85
85
|
valuePath: string;
|
|
86
86
|
};
|
|
@@ -20,7 +20,6 @@ export declare function useInteraction(publicDocApi: Ref<EnginePublic | null>):
|
|
|
20
20
|
readonly subFieldKey?: string | undefined;
|
|
21
21
|
readonly valuePath?: string | undefined;
|
|
22
22
|
readonly regionId?: string | undefined;
|
|
23
|
-
readonly widgetType?: string | undefined;
|
|
24
23
|
};
|
|
25
24
|
} | null | undefined;
|
|
26
25
|
};
|
|
@@ -1,41 +1,29 @@
|
|
|
1
|
-
import { ElementNode } from '../types/element';
|
|
2
1
|
import { RawElement } from '../types/raw';
|
|
3
|
-
import { ImageRunSnapshot } from '../types/model';
|
|
4
2
|
import { Wp } from './Wp';
|
|
5
|
-
import { ModelNode } from '../base';
|
|
6
3
|
import { Wimages } from '../images';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* 图片块实例类
|
|
21
|
-
*/
|
|
4
|
+
import { ModelNode, ModelNodeOptions } from '../base';
|
|
5
|
+
import { WrPr } from './WrPr';
|
|
6
|
+
type drawingData = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
descr: string;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
embedId: string;
|
|
13
|
+
rawDrawing?: RawElement;
|
|
14
|
+
};
|
|
22
15
|
export declare class WrImage extends ModelNode {
|
|
23
|
-
image: {
|
|
24
|
-
embedId?: string;
|
|
25
|
-
descr?: string;
|
|
26
|
-
name?: string;
|
|
27
|
-
width?: number;
|
|
28
|
-
height?: number;
|
|
29
|
-
rawProperties?: ElementNode;
|
|
30
|
-
};
|
|
31
16
|
name: 'w:r';
|
|
32
17
|
type: "element";
|
|
33
18
|
handler: "image";
|
|
34
|
-
widgetMeta?: WidgetMeta;
|
|
35
|
-
valuePath?: string;
|
|
36
19
|
/** 父节点引用 */
|
|
37
20
|
parent?: Wp;
|
|
38
|
-
|
|
21
|
+
rPr?: WrPr;
|
|
22
|
+
drawing?: drawingData;
|
|
23
|
+
constructor(options: ModelNodeOptions & {
|
|
24
|
+
rPr?: WrPr;
|
|
25
|
+
drawing?: drawingData;
|
|
26
|
+
});
|
|
39
27
|
/**
|
|
40
28
|
* 调整图片尺寸
|
|
41
29
|
* @param width 新宽度
|
|
@@ -47,37 +35,10 @@ export declare class WrImage extends ModelNode {
|
|
|
47
35
|
* @param description 描述文本
|
|
48
36
|
*/
|
|
49
37
|
setDescription(description: string): void;
|
|
50
|
-
/**
|
|
51
|
-
* 将实例转换为快照对象
|
|
52
|
-
*/
|
|
53
|
-
toSnapshot(): ImageRunSnapshot;
|
|
54
|
-
/**
|
|
55
|
-
* 从快照对象恢复实例
|
|
56
|
-
*/
|
|
57
|
-
static fromSnapshot(snapshot: ImageRunSnapshot): WrImage;
|
|
58
38
|
/**
|
|
59
39
|
* 从原始 w:drawing XML JSON 解析图片信息
|
|
60
40
|
*/
|
|
61
|
-
static fromDrawingXml(json: RawElement):
|
|
62
|
-
embedId?: string;
|
|
63
|
-
descr?: string;
|
|
64
|
-
name?: string;
|
|
65
|
-
width?: number;
|
|
66
|
-
height?: number;
|
|
67
|
-
rawProperties?: ElementNode;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* 将图片信息转换为 w:drawing XML JSON
|
|
71
|
-
*/
|
|
72
|
-
static toDrawingXml(imageData: {
|
|
73
|
-
embedId?: string;
|
|
74
|
-
descr?: string;
|
|
75
|
-
name?: string;
|
|
76
|
-
width?: number;
|
|
77
|
-
height?: number;
|
|
78
|
-
rawProperties?: ElementNode;
|
|
79
|
-
elements?: any[];
|
|
80
|
-
}): RawElement;
|
|
41
|
+
static fromDrawingXml(json: RawElement): drawingData;
|
|
81
42
|
/**
|
|
82
43
|
* 图片是原子元素,无法拆分
|
|
83
44
|
* @param index 拆分位置(被忽略)
|
|
@@ -92,12 +53,14 @@ export declare class WrImage extends ModelNode {
|
|
|
92
53
|
* @param json w:r XML JSON 对象
|
|
93
54
|
* @returns WrImage 实例
|
|
94
55
|
*/
|
|
95
|
-
static fromXmlJson(json:
|
|
56
|
+
static fromXmlJson(json: RawElement): WrImage;
|
|
57
|
+
toXmlJson(): RawElement;
|
|
96
58
|
/**
|
|
97
|
-
*
|
|
98
|
-
* @
|
|
59
|
+
* 更新 w:drawing XML 中的修改过的属性
|
|
60
|
+
* @param drawingXml 原始的 w:drawing XML 对象
|
|
61
|
+
* @param data 当前的 drawing 数据
|
|
99
62
|
*/
|
|
100
|
-
|
|
63
|
+
private updateDrawingXml;
|
|
101
64
|
static fromTemplate(payload: {
|
|
102
65
|
imageManager: Wimages;
|
|
103
66
|
width: number;
|
|
@@ -105,3 +68,4 @@ export declare class WrImage extends ModelNode {
|
|
|
105
68
|
src: string;
|
|
106
69
|
}): WrImage;
|
|
107
70
|
}
|
|
71
|
+
export {};
|
|
@@ -5,33 +5,18 @@ import { Wtc } from './Wtc';
|
|
|
5
5
|
import { ModelGroup, ModelGroupOptions } from '../base';
|
|
6
6
|
import { TableRegion, BoundedRegionOptions, RepeatingRegionOptions, BoundedRegion, RepeatingRegion } from '../logic';
|
|
7
7
|
import { WtblPr } from './WtblPr';
|
|
8
|
-
/**
|
|
9
|
-
* Wtbl 构造参数
|
|
10
|
-
*/
|
|
11
|
-
export interface WtblOptions {
|
|
12
|
-
rows: Wtr[];
|
|
13
|
-
colWidths?: number[];
|
|
14
|
-
tableProperties?: any;
|
|
15
|
-
attrs?: any;
|
|
16
|
-
style?: any;
|
|
17
|
-
rawProperties?: any;
|
|
18
|
-
id?: string;
|
|
19
|
-
}
|
|
20
8
|
export declare class Wtbl extends ModelGroup {
|
|
21
9
|
name: 'w:tbl';
|
|
22
10
|
type: "element";
|
|
23
|
-
|
|
24
|
-
rawProperties?: any;
|
|
11
|
+
tblPr?: WtblPr;
|
|
25
12
|
colWidths?: number[];
|
|
26
|
-
|
|
13
|
+
regions: TableRegion[];
|
|
27
14
|
parent?: Wbody;
|
|
28
15
|
children: Wtr[];
|
|
29
|
-
regions: TableRegion[];
|
|
30
16
|
private pendingRecalculate;
|
|
31
|
-
tblPr?: WtblPr;
|
|
32
17
|
constructor(options: ModelGroupOptions & {
|
|
33
|
-
colWidths?: number[];
|
|
34
18
|
tblPr?: WtblPr;
|
|
19
|
+
colWidths?: number[];
|
|
35
20
|
});
|
|
36
21
|
get rows(): Wtr[];
|
|
37
22
|
get repeating(): RepeatingRegion[];
|
|
@@ -2,14 +2,6 @@ import { Wtbl } from '../document';
|
|
|
2
2
|
import { Region, RegionOptions } from './Region';
|
|
3
3
|
import { RegionJson } from '../types';
|
|
4
4
|
import { BoundedItemRegion, BoundedItemRegionOptions } from './BoundedItemRegion';
|
|
5
|
-
export type BoundedRegionOptions = RegionOptions & {
|
|
6
|
-
name: string;
|
|
7
|
-
valuePath: string;
|
|
8
|
-
};
|
|
9
|
-
export type BoundedRegionJson = RegionJson & {
|
|
10
|
-
name: string;
|
|
11
|
-
valuePath: string;
|
|
12
|
-
};
|
|
13
5
|
export type BoundedWidgetPropsMeta = {
|
|
14
6
|
/** 引用填充(撑满固定表)*/
|
|
15
7
|
autoFill: boolean;
|
|
@@ -24,12 +16,24 @@ export type BoundedWidgetPropsMeta = {
|
|
|
24
16
|
export type BoundedWidgetMeta = {
|
|
25
17
|
props: BoundedWidgetPropsMeta;
|
|
26
18
|
};
|
|
19
|
+
export type BoundedRegionOptions = RegionOptions & {
|
|
20
|
+
name: string;
|
|
21
|
+
valuePath: string;
|
|
22
|
+
widgetMeta: BoundedWidgetMeta;
|
|
23
|
+
itemRegion?: BoundedItemRegion;
|
|
24
|
+
};
|
|
25
|
+
export type BoundedRegionJson = RegionJson & {
|
|
26
|
+
name: string;
|
|
27
|
+
valuePath: string;
|
|
28
|
+
widgetMeta: BoundedWidgetMeta;
|
|
29
|
+
itemRegion?: any;
|
|
30
|
+
};
|
|
27
31
|
export declare class BoundedRegion extends Region {
|
|
28
32
|
type: "bounded";
|
|
29
33
|
name: string;
|
|
30
34
|
valuePath: string;
|
|
31
|
-
itemRegion?: BoundedItemRegion;
|
|
32
35
|
widgetMeta: BoundedWidgetMeta;
|
|
36
|
+
itemRegion?: BoundedItemRegion;
|
|
33
37
|
constructor(options: BoundedRegionOptions);
|
|
34
38
|
/**
|
|
35
39
|
* 序列化为 JSON 对象
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { Wtbl } from '../document';
|
|
2
2
|
import { Region, RegionOptions } from './Region';
|
|
3
3
|
import { RegionJson } from '../types';
|
|
4
|
-
export type RepeatingRegionOptions = RegionOptions & {
|
|
5
|
-
name: string;
|
|
6
|
-
valuePath: string;
|
|
7
|
-
};
|
|
8
|
-
export type RepeatingRegionJson = RegionJson & {
|
|
9
|
-
name: string;
|
|
10
|
-
valuePath: string;
|
|
11
|
-
};
|
|
12
4
|
export type RepeatingWidgetPropsMeta = {
|
|
13
5
|
/** 快速填报 */
|
|
14
6
|
quickFill: boolean;
|
|
@@ -17,6 +9,16 @@ export type RepeatingWidgetPropsMeta = {
|
|
|
17
9
|
export type RepeatingWidgetMeta = {
|
|
18
10
|
props: RepeatingWidgetPropsMeta;
|
|
19
11
|
};
|
|
12
|
+
export type RepeatingRegionOptions = RegionOptions & {
|
|
13
|
+
name: string;
|
|
14
|
+
valuePath: string;
|
|
15
|
+
widgetMeta: RepeatingWidgetMeta;
|
|
16
|
+
};
|
|
17
|
+
export type RepeatingRegionJson = RegionJson & {
|
|
18
|
+
name: string;
|
|
19
|
+
valuePath: string;
|
|
20
|
+
widgetMeta: RepeatingWidgetMeta;
|
|
21
|
+
};
|
|
20
22
|
export declare class RepeatingRegion extends Region {
|
|
21
23
|
type: "repeating";
|
|
22
24
|
name: string;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { Ref, ShallowRef } from 'vue';
|
|
2
2
|
import { DocInfo, EnginePublic } from '..';
|
|
3
|
+
import { SelfInfo } from './types/public-types';
|
|
3
4
|
export declare function useDocPubApiContext(): {
|
|
4
5
|
/** 原始 api */
|
|
5
6
|
pubDocApi: ShallowRef<EnginePublic>;
|
|
6
7
|
docInfo: Ref<DocInfo, DocInfo>;
|
|
7
8
|
/** doc 实例 */
|
|
8
9
|
docInst: import('vue').ComputedRef<import('..').Doc>;
|
|
10
|
+
/** 实例接口信息 */
|
|
11
|
+
selfInfo: Ref<SelfInfo, SelfInfo>;
|
|
9
12
|
/** query 服务 */
|
|
10
13
|
query: import('vue').ComputedRef<import('./types/public-types').QueryAPI>;
|
|
11
14
|
updateTick: import('vue').ComputedRef<number>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LayoutNode } from '../../view/base';
|
|
2
2
|
import { Doc } from '../../view/Doc';
|
|
3
|
+
import { FormType, ViewType } from '../../../domain/constants/enum';
|
|
3
4
|
/** 只读查询 API */
|
|
4
5
|
export interface QueryAPI {
|
|
5
6
|
getWidgetByModelId(modelId: string): LayoutNode | undefined;
|
|
@@ -26,3 +27,50 @@ export interface DocInfo {
|
|
|
26
27
|
widgetMetaIds: string[];
|
|
27
28
|
updateTick: number;
|
|
28
29
|
}
|
|
30
|
+
export interface SelfInfo {
|
|
31
|
+
/** 父id */
|
|
32
|
+
baseId: string;
|
|
33
|
+
/** 绑定key */
|
|
34
|
+
bindKey?: string;
|
|
35
|
+
/** 分类id */
|
|
36
|
+
categoryId: string;
|
|
37
|
+
/** 编号 */
|
|
38
|
+
code?: string;
|
|
39
|
+
/** 是否默认版本 1是 0否 */
|
|
40
|
+
default?: number;
|
|
41
|
+
/** 方向 */
|
|
42
|
+
direction: string;
|
|
43
|
+
/** 数据源key */
|
|
44
|
+
dsKey?: string;
|
|
45
|
+
/** 版本:专业版:PROFESSIONAL 、普通版:EASY */
|
|
46
|
+
edition: string;
|
|
47
|
+
/** 拓展字段-模型字段启用/禁用状态json: [{key:字段key,status:true/false}] */
|
|
48
|
+
extFieldStatus?: string;
|
|
49
|
+
/** 字段配置 */
|
|
50
|
+
fieldConfig?: any[];
|
|
51
|
+
/** 表单类型 */
|
|
52
|
+
formType: FormType;
|
|
53
|
+
/** 尺寸(高度) */
|
|
54
|
+
height?: number;
|
|
55
|
+
/** 模型key */
|
|
56
|
+
modelKey: string;
|
|
57
|
+
/** 名称 */
|
|
58
|
+
name: string;
|
|
59
|
+
/** 电子记录-线下版本号 */
|
|
60
|
+
offlineVersion?: string;
|
|
61
|
+
/** 按钮配置操作 */
|
|
62
|
+
operation: string;
|
|
63
|
+
/** 纸张大小 */
|
|
64
|
+
paperSize: string;
|
|
65
|
+
permissionConfig?: string;
|
|
66
|
+
/** SQL脚本 */
|
|
67
|
+
script?: string;
|
|
68
|
+
/** 升级备注 */
|
|
69
|
+
updateRemark?: string;
|
|
70
|
+
/** 版本 */
|
|
71
|
+
version: string;
|
|
72
|
+
/** 视图类型 */
|
|
73
|
+
viewType?: ViewType;
|
|
74
|
+
/** 尺寸(宽度) */
|
|
75
|
+
width?: number;
|
|
76
|
+
}
|
|
@@ -144,3 +144,29 @@ export declare const AssignmentStrategyTypeConst: {
|
|
|
144
144
|
NotCovered: string;
|
|
145
145
|
};
|
|
146
146
|
export type AssignmentStrategyType = ValueOf<typeof AssignmentStrategyTypeConst>;
|
|
147
|
+
/** 表单类型 */
|
|
148
|
+
export declare const FormTypeConst: {
|
|
149
|
+
/** 基础表单 */
|
|
150
|
+
BASE: string;
|
|
151
|
+
/** 流程表单 */
|
|
152
|
+
PROCESS: string;
|
|
153
|
+
/** 视图表单 */
|
|
154
|
+
VIEW: string;
|
|
155
|
+
/** 文本表单 */
|
|
156
|
+
TEXT: string;
|
|
157
|
+
/** 文件表单 */
|
|
158
|
+
FILE: string;
|
|
159
|
+
};
|
|
160
|
+
export type FormType = ValueOf<typeof FormTypeConst>;
|
|
161
|
+
/** 视图类型 */
|
|
162
|
+
export declare const ViewTypeConst: {
|
|
163
|
+
/** 视图模型(查询视图) */
|
|
164
|
+
VIEW_MODEL: string;
|
|
165
|
+
/** SQL数据视图 */
|
|
166
|
+
VIEW_SQL: string;
|
|
167
|
+
/** 数据库视图 */
|
|
168
|
+
VIEW: string;
|
|
169
|
+
/** 自定义模型 */
|
|
170
|
+
VIEW_JS: string;
|
|
171
|
+
};
|
|
172
|
+
export type ViewType = ValueOf<typeof ViewTypeConst>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { PanelType } from '
|
|
2
|
-
import { FIELD_TYPE } from '
|
|
3
|
-
import { CreateType } from '
|
|
1
|
+
import { PanelType } from '../active/active-types';
|
|
2
|
+
import { FIELD_TYPE } from '../field/field-type';
|
|
3
|
+
import { CreateType } from '../model/model-type';
|
|
4
|
+
export declare enum PAPER_WIDGET_TYPE {
|
|
5
|
+
IMAGE = "image",
|
|
6
|
+
BARCODE = "barcode",
|
|
7
|
+
QRCODE = "qrcode",
|
|
8
|
+
DIAGONAL = "diagonal",
|
|
9
|
+
SERIAL_NUMBER = "serialnumber"
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* 页面组件值类型
|
|
6
13
|
*/
|
|
@@ -9,13 +16,6 @@ export declare enum PaperWidgetValueType {
|
|
|
9
16
|
Field = "field",
|
|
10
17
|
Formula = "formula"
|
|
11
18
|
}
|
|
12
|
-
export declare enum PaperWidgetType {
|
|
13
|
-
Image = "image",
|
|
14
|
-
Barcode = "barcode",
|
|
15
|
-
Qrcode = "qrcode",
|
|
16
|
-
Diagonal = "diagonal",
|
|
17
|
-
Serialnumber = "serialnumber"
|
|
18
|
-
}
|
|
19
19
|
export interface IBindField {
|
|
20
20
|
/** 字段key */
|
|
21
21
|
field?: string;
|
|
@@ -47,7 +47,7 @@ export declare enum BwipCodeType {
|
|
|
47
47
|
export declare const BwipCodeTypeOptions: Array<{
|
|
48
48
|
code: BwipCodeType;
|
|
49
49
|
title: string;
|
|
50
|
-
widget:
|
|
50
|
+
widget: PAPER_WIDGET_TYPE;
|
|
51
51
|
example: string;
|
|
52
52
|
}>;
|
|
53
53
|
/** 分栏的方向 */
|
|
@@ -76,7 +76,7 @@ export declare namespace PaperWidget {
|
|
|
76
76
|
id: string;
|
|
77
77
|
icon: string;
|
|
78
78
|
/** 组件类型 */
|
|
79
|
-
type:
|
|
79
|
+
type: PAPER_WIDGET_TYPE;
|
|
80
80
|
name: string;
|
|
81
81
|
/** 组件值 */
|
|
82
82
|
value?: string;
|
|
@@ -91,11 +91,11 @@ export declare namespace PaperWidget {
|
|
|
91
91
|
dragToPos: PanelType[];
|
|
92
92
|
}
|
|
93
93
|
interface Image extends BasicSchema {
|
|
94
|
-
type:
|
|
94
|
+
type: PAPER_WIDGET_TYPE.IMAGE;
|
|
95
95
|
sizeMode: WidgetImageSizeMode;
|
|
96
96
|
}
|
|
97
97
|
interface Barcode extends BasicSchema {
|
|
98
|
-
type:
|
|
98
|
+
type: PAPER_WIDGET_TYPE.BARCODE;
|
|
99
99
|
valueType: PaperWidgetValueType;
|
|
100
100
|
fieldType?: string;
|
|
101
101
|
modelKey?: string;
|
|
@@ -113,7 +113,7 @@ export declare namespace PaperWidget {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
interface Qrcode extends BasicSchema {
|
|
116
|
-
type:
|
|
116
|
+
type: PAPER_WIDGET_TYPE.QRCODE;
|
|
117
117
|
valueType: PaperWidgetValueType;
|
|
118
118
|
fieldType?: string;
|
|
119
119
|
modelKey?: string;
|
|
@@ -127,7 +127,7 @@ export declare namespace PaperWidget {
|
|
|
127
127
|
codeType: BwipCodeType.QRCode | BwipCodeType.GS1DataMatrix;
|
|
128
128
|
}
|
|
129
129
|
interface Diagonal extends BasicSchema {
|
|
130
|
-
type:
|
|
130
|
+
type: PAPER_WIDGET_TYPE.DIAGONAL;
|
|
131
131
|
size: 2 | 3;
|
|
132
132
|
names: [string, string, string];
|
|
133
133
|
/** 是否启用绑定字段 */
|
|
@@ -138,7 +138,7 @@ export declare namespace PaperWidget {
|
|
|
138
138
|
direction: DiagonalDirection;
|
|
139
139
|
}
|
|
140
140
|
interface Serialnumber extends BasicSchema {
|
|
141
|
-
type:
|
|
141
|
+
type: PAPER_WIDGET_TYPE.SERIAL_NUMBER;
|
|
142
142
|
/** 初始数值 */
|
|
143
143
|
initialValue: number;
|
|
144
144
|
/** 自增跨度 */
|
|
@@ -1,4 +1,4 @@
|
|
|
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' | '
|
|
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';
|
|
2
2
|
/** 渲染组件标识 后续支持自定义组件 */
|
|
3
3
|
export type ExternalNodeType = 'render:gct-placeholder' | 'render:gct-control' | 'render:gct-space' | 'render:gct-text' | 'render:gct-image';
|
|
4
4
|
/** 渲染节点集合 */
|