@gct-paas/schema 0.1.4-dev.8 → 0.1.5-dev.0
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/index.esm.min.js +1 -0
- package/es/constants/design.d.ts +26 -0
- package/es/constants/design.mjs +30 -0
- package/es/constants/index.d.ts +28 -0
- package/es/constants/index.mjs +411 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +13 -10
- package/es/interface/common/data-linkage-config.d.ts +17 -0
- package/es/interface/design/i-design-container-node.d.ts +13 -0
- package/es/interface/design/i-design-data.d.ts +44 -0
- package/es/interface/design/i-design-editor-data.d.ts +20 -0
- package/es/interface/design/i-design-editor-node.d.ts +15 -0
- package/es/interface/design/i-design-node-data.d.ts +19 -0
- package/es/interface/design/i-design-node.d.ts +80 -0
- package/es/interface/design/i-design-page-node-data.d.ts +15 -0
- package/es/interface/design/i-design-tree-item.d.ts +26 -0
- package/es/interface/design/i-drag-data-item.d.ts +46 -0
- package/es/interface/design/index.d.ts +9 -0
- package/es/interface/designer.d.ts +8 -7
- package/es/interface/index.d.ts +7 -2
- package/es/interface/modal/i-modal-body.d.ts +1 -1
- package/es/interface/modal/i-modal.d.ts +1 -1
- package/es/interface/relationship-diagram-config/i-relationship-diagram-node.d.ts +82 -0
- package/es/interface/relationship-diagram-config/i-rule-config.d.ts +135 -0
- package/es/interface/relationship-diagram-config/index.d.ts +2 -0
- package/es/interface/schema/index.d.ts +2 -0
- package/es/interface/schema/widget-props/i-button-props.d.ts +170 -0
- package/es/interface/schema/widget-props/i-card-list-props.d.ts +79 -0
- package/es/interface/schema/widget-props/i-display-props.d.ts +48 -0
- package/es/interface/schema/widget-props/i-form-container-props.d.ts +91 -0
- package/es/interface/schema/widget-props/i-form-input-props.d.ts +409 -0
- package/es/interface/schema/widget-props/i-layout-props.d.ts +77 -0
- package/es/interface/schema/widget-props/i-search-widget-props.d.ts +132 -0
- package/es/interface/schema/widget-props/i-table-column-props.d.ts +54 -0
- package/es/interface/schema/widget-props/i-table-props.d.ts +384 -0
- package/es/interface/schema/widget-props/index.d.ts +9 -0
- package/es/interface/schema/widget-types.d.ts +399 -0
- package/es/interface/widget/i-common.d.ts +2 -1
- package/es/interface/widget/i-editors.d.ts +3 -2
- package/es/interface/widget/i-events.d.ts +2 -9
- package/es/interface/widget/i-hooks-and-misc.d.ts +1 -0
- package/es/interface/widget/i-props.d.ts +14 -32
- package/es/interface/widget/i-schemas.d.ts +6 -4
- package/es/interface/widget/i-styles.d.ts +2 -1
- package/es/interface/widget/index.d.ts +9 -2
- package/es/interface/widget-info/i-designer-item-hooks.d.ts +21 -0
- package/es/interface/widget-info/i-designer-schema-exports.d.ts +13 -0
- package/es/interface/widget-info/i-widget-info-item.d.ts +78 -0
- package/es/interface/widget-info/i-widget-info.d.ts +19 -0
- package/es/interface/widget-info/index.d.ts +4 -0
- package/es/utils/field-editor-override-registry/field-editor-override-registry.d.ts +36 -0
- package/es/utils/field-editor-override-registry/field-editor-override-registry.mjs +29 -0
- package/es/utils/index.d.ts +4 -2
- package/es/utils/index.mjs +6 -0
- package/es/utils/schema/index.d.ts +38 -1
- package/es/utils/schema/index.mjs +83 -5
- package/es/utils/schema/search.d.ts +9 -0
- package/es/utils/schema/search.mjs +146 -0
- package/es/utils/schema/utils.d.ts +21 -0
- package/es/utils/schema/utils.mjs +182 -0
- package/es/utils/schema-style/index.mjs +203 -127
- package/es/utils/widget-info/widget-info.d.ts +104 -0
- package/es/utils/widget-info/widget-info.mjs +151 -0
- package/package.json +12 -13
- package/dist/index.esm.min.mjs +0 -237
- package/dist/index.min.cjs +0 -1
- package/dist/index.system.min.js +0 -1
- package/es/schema/common-config/common-style.d.ts +0 -3
- package/es/schema/common-config/common-style.mjs +0 -85
- package/es/schema/index.d.ts +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设计节点数据
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-07-09 16:07:29
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IDesignNodeData
|
|
8
|
+
*/
|
|
9
|
+
export interface IDesignNodeData {
|
|
10
|
+
[key: string | symbol]: any;
|
|
11
|
+
/**
|
|
12
|
+
* 设计节点名称
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-07-12 11:07:05
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IDesignNodeData } from './i-design-node-data';
|
|
2
|
+
/**
|
|
3
|
+
* 设计节点
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-07-09 16:07:21
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IDesignNode
|
|
9
|
+
* @template T
|
|
10
|
+
*/
|
|
11
|
+
export interface IDesignNode<T extends IDesignNodeData = IDesignNodeData> {
|
|
12
|
+
/**
|
|
13
|
+
* 节点唯一标识
|
|
14
|
+
*
|
|
15
|
+
* @author zhanghanrui
|
|
16
|
+
* @date 2024-07-05 13:07:46
|
|
17
|
+
* @type {string}
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
/**
|
|
21
|
+
* 排序值
|
|
22
|
+
* 2024年8月23日15:10:19 - 改版后 order 不再使用
|
|
23
|
+
*
|
|
24
|
+
* @deprecated
|
|
25
|
+
* @author zhanghanrui
|
|
26
|
+
* @date 2024-07-12 14:07:40
|
|
27
|
+
* @type {number}
|
|
28
|
+
*/
|
|
29
|
+
order?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 名称
|
|
32
|
+
*
|
|
33
|
+
* @author zhanghanrui
|
|
34
|
+
* @date 2024-07-05 15:07:37
|
|
35
|
+
* @type {string}
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
38
|
+
/**
|
|
39
|
+
* 节点类型
|
|
40
|
+
*
|
|
41
|
+
* @author zhanghanrui
|
|
42
|
+
* @date 2024-07-05 13:07:46
|
|
43
|
+
* @type {string}
|
|
44
|
+
*/
|
|
45
|
+
type: string;
|
|
46
|
+
/**
|
|
47
|
+
* 数据更新时间戳
|
|
48
|
+
*
|
|
49
|
+
* @author zhanghanrui
|
|
50
|
+
* @date 2024-07-05 17:07:02
|
|
51
|
+
* @type {number}
|
|
52
|
+
*/
|
|
53
|
+
updateDate: number;
|
|
54
|
+
/**
|
|
55
|
+
* 设计项的数据
|
|
56
|
+
*
|
|
57
|
+
* @author zhanghanrui
|
|
58
|
+
* @date 2024-07-09 16:07:47
|
|
59
|
+
* @type {T}
|
|
60
|
+
*/
|
|
61
|
+
data: T;
|
|
62
|
+
/**
|
|
63
|
+
* 父节点标识
|
|
64
|
+
* 2024年8月23日15:10:19 - 改版后 parentId 不再使用
|
|
65
|
+
*
|
|
66
|
+
* @deprecated
|
|
67
|
+
* @author zhanghanrui
|
|
68
|
+
* @date 2024-07-05 13:07:38
|
|
69
|
+
* @type {string}
|
|
70
|
+
*/
|
|
71
|
+
parentId?: string;
|
|
72
|
+
/**
|
|
73
|
+
* 克隆
|
|
74
|
+
*
|
|
75
|
+
* @author zhanghanrui
|
|
76
|
+
* @date 2024-07-12 13:07:44
|
|
77
|
+
* @return {*} {IDesignNode}
|
|
78
|
+
*/
|
|
79
|
+
clone(): IDesignNode;
|
|
80
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IDesignNodeData } from './i-design-node-data';
|
|
2
|
+
/**
|
|
3
|
+
* 设计界面节点
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-07-24 10:07:27
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IDesignPageNode
|
|
9
|
+
* @extends {IDesignNode}
|
|
10
|
+
*/
|
|
11
|
+
export interface IDesignPageNodeData extends IDesignNodeData {
|
|
12
|
+
background: string;
|
|
13
|
+
padding: string;
|
|
14
|
+
headerBgColor?: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设计树项
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-08-20 10:08:36
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IDesignTreeItem
|
|
8
|
+
*/
|
|
9
|
+
export interface IDesignTreeItem {
|
|
10
|
+
/**
|
|
11
|
+
* 标识
|
|
12
|
+
*
|
|
13
|
+
* @author zhanghanrui
|
|
14
|
+
* @date 2024-08-20 10:08:48
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* 子项
|
|
20
|
+
*
|
|
21
|
+
* @author zhanghanrui
|
|
22
|
+
* @date 2024-08-20 10:08:56
|
|
23
|
+
* @type {IDesignTreeItem[]}
|
|
24
|
+
*/
|
|
25
|
+
children?: IDesignTreeItem[];
|
|
26
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IDesignNode } from './i-design-node';
|
|
2
|
+
/**
|
|
3
|
+
* 拖拽数据项
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IDragDataItem
|
|
7
|
+
* @template O
|
|
8
|
+
*/
|
|
9
|
+
export interface IDragDataItem<O extends IDesignNode = IDesignNode> {
|
|
10
|
+
/**
|
|
11
|
+
* 当前数据标识,如果是新数据则主键为空
|
|
12
|
+
*
|
|
13
|
+
* @type {string}
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* 拖拽分组实例标识
|
|
18
|
+
*
|
|
19
|
+
* @type {string}
|
|
20
|
+
*/
|
|
21
|
+
group: string;
|
|
22
|
+
/**
|
|
23
|
+
* 拖拽项原位置索引
|
|
24
|
+
*
|
|
25
|
+
* @type {number}
|
|
26
|
+
*/
|
|
27
|
+
index: number;
|
|
28
|
+
/**
|
|
29
|
+
* 当前拖拽数据
|
|
30
|
+
*
|
|
31
|
+
* @type {O}
|
|
32
|
+
*/
|
|
33
|
+
data: O;
|
|
34
|
+
/**
|
|
35
|
+
* 数据模式
|
|
36
|
+
*
|
|
37
|
+
* @type {('create' | 'move')} 新建 | 移动
|
|
38
|
+
*/
|
|
39
|
+
mode: 'create' | 'move';
|
|
40
|
+
/**
|
|
41
|
+
* 包含自身 + 所有子的类型,目前主要用于拖拽限制
|
|
42
|
+
*
|
|
43
|
+
* @type {string[]}
|
|
44
|
+
*/
|
|
45
|
+
types: string[];
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { IDesignContainerNode } from './i-design-container-node';
|
|
2
|
+
export type { IDesignPageNodeData } from './i-design-page-node-data';
|
|
3
|
+
export type { IDesignData } from './i-design-data';
|
|
4
|
+
export type { IDesignEditorData } from './i-design-editor-data';
|
|
5
|
+
export type { IDesignEditorNode } from './i-design-editor-node';
|
|
6
|
+
export type { IDesignNodeData } from './i-design-node-data';
|
|
7
|
+
export type { IDesignNode } from './i-design-node';
|
|
8
|
+
export type { IDesignTreeItem } from './i-design-tree-item';
|
|
9
|
+
export type { IDragDataItem } from './i-drag-data-item';
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { pageLayoutModeEnum } from '@gct-paas/core';
|
|
2
2
|
import { LowCodeModal } from './modal';
|
|
3
3
|
import { LowCodeWidget } from './widget';
|
|
4
|
+
export interface IPageGlobalEvents {
|
|
5
|
+
/**页面加载公共事件ID */
|
|
6
|
+
pageMounted?: string;
|
|
7
|
+
/**页面离开公共事件ID */
|
|
8
|
+
pageDestroyed?: string;
|
|
9
|
+
}
|
|
4
10
|
export interface PageJson {
|
|
5
11
|
id: string;
|
|
6
12
|
key?: string;
|
|
@@ -13,20 +19,15 @@ export interface PageJson {
|
|
|
13
19
|
pageMounted?: LowCodeWidget.JsEvent | LowCodeWidget.InnerEvents[];
|
|
14
20
|
/**页面离开事件 */
|
|
15
21
|
pageDestroyed?: LowCodeWidget.JsEvent | LowCodeWidget.InnerEvents[];
|
|
22
|
+
pageActivated?: LowCodeWidget.JsEvent | LowCodeWidget.InnerEvents[];
|
|
16
23
|
};
|
|
17
24
|
widgets: LowCodeWidget.BasicSchema[];
|
|
18
25
|
js: string;
|
|
19
26
|
css: string;
|
|
20
27
|
modals: LowCodeModal.Modal[];
|
|
21
28
|
timestamp?: number;
|
|
22
|
-
newDesigner?: boolean;
|
|
23
29
|
/**全局页面事件 */
|
|
24
|
-
globalEvents:
|
|
25
|
-
/**页面加载公共事件ID */
|
|
26
|
-
pageMounted?: string;
|
|
27
|
-
/**页面离开公共事件ID */
|
|
28
|
-
pageDestroyed?: string;
|
|
29
|
-
};
|
|
30
|
+
globalEvents: IPageGlobalEvents;
|
|
30
31
|
permissions: Record<string, string | null>;
|
|
31
32
|
style: Partial<LowCodeWidget.BasicStyle>;
|
|
32
33
|
pageConfig: Partial<PageConfig>;
|
package/es/interface/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './modal';
|
|
1
|
+
export type { LinkageItem } from './common/data-linkage-config';
|
|
2
|
+
export type * from './modal';
|
|
3
|
+
export type * from './schema';
|
|
3
4
|
export type * from './widget';
|
|
5
|
+
export type * from './widget-info';
|
|
6
|
+
export type * from './designer';
|
|
7
|
+
export type * from './relationship-diagram-config';
|
|
8
|
+
export type * from './design';
|
|
@@ -32,7 +32,7 @@ export interface IModal {
|
|
|
32
32
|
/** CSS 样式代码 */
|
|
33
33
|
css: string;
|
|
34
34
|
/** 子组件:主体、底部、底部按钮容器 */
|
|
35
|
-
children: [IModalBody, IModalFooter, IModalBottomButton];
|
|
35
|
+
children: [IModalBody, IModalFooter, IModalBottomButton?];
|
|
36
36
|
/** 模态框属性配置 */
|
|
37
37
|
props: IModalProps;
|
|
38
38
|
/** 事件配置 */
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 节点
|
|
3
|
+
*
|
|
4
|
+
* @author zhanghanrui
|
|
5
|
+
* @date 2024-06-25 10:06:53
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IRelationshipDiagramNode
|
|
8
|
+
*/
|
|
9
|
+
export interface IRelationshipDiagramNode {
|
|
10
|
+
/**
|
|
11
|
+
* 节点唯一标识
|
|
12
|
+
*
|
|
13
|
+
* @author zhanghanrui
|
|
14
|
+
* @date 2024-06-25 13:06:35
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* 字段唯一标识
|
|
20
|
+
*
|
|
21
|
+
* @author zhanghanrui
|
|
22
|
+
* @date 2024-07-05 10:07:11
|
|
23
|
+
* @type {string | null}
|
|
24
|
+
*/
|
|
25
|
+
id_: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* 节点类型
|
|
28
|
+
*
|
|
29
|
+
* @author zhanghanrui
|
|
30
|
+
* @date 2024-06-25 13:06:44
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
33
|
+
type: string;
|
|
34
|
+
/**
|
|
35
|
+
* 当前模型标识
|
|
36
|
+
*
|
|
37
|
+
* @author zhanghanrui
|
|
38
|
+
* @date 2024-06-26 16:06:15
|
|
39
|
+
* @type {string | null}
|
|
40
|
+
*/
|
|
41
|
+
modelKey: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* 模型类型
|
|
44
|
+
*
|
|
45
|
+
* @author zhanghanrui
|
|
46
|
+
* @date 2024-06-26 16:06:30
|
|
47
|
+
* @type {string | null}
|
|
48
|
+
*/
|
|
49
|
+
modelCategory: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* 属性key
|
|
52
|
+
*
|
|
53
|
+
* @author zhanghanrui
|
|
54
|
+
* @date 2024-06-26 16:06:46
|
|
55
|
+
* @type {string | null}
|
|
56
|
+
*/
|
|
57
|
+
value: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* 属性文本
|
|
60
|
+
*
|
|
61
|
+
* @author zhanghanrui
|
|
62
|
+
* @date 2024-06-26 16:06:56
|
|
63
|
+
* @type {string | null}
|
|
64
|
+
*/
|
|
65
|
+
label: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* 是否为反向节点
|
|
68
|
+
*
|
|
69
|
+
* @author zhanghanrui
|
|
70
|
+
* @date 2024-06-28 15:06:46
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
reverse?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* 禁止选择属性
|
|
76
|
+
*
|
|
77
|
+
* @author zhanghanrui
|
|
78
|
+
* @date 2024-06-28 13:06:52
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
*/
|
|
81
|
+
noSelectField?: boolean;
|
|
82
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { IRelationshipDiagramNode } from './i-relationship-diagram-node';
|
|
2
|
+
/**
|
|
3
|
+
* 设计 json
|
|
4
|
+
*
|
|
5
|
+
* @author zhanghanrui
|
|
6
|
+
* @date 2024-06-29 17:06:51
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IDesignJson
|
|
9
|
+
*/
|
|
10
|
+
export interface IDesignJson {
|
|
11
|
+
/**
|
|
12
|
+
* 前置信息
|
|
13
|
+
*
|
|
14
|
+
* @author zhanghanrui
|
|
15
|
+
* @date 2024-06-29 17:06:58
|
|
16
|
+
* @type {IData}
|
|
17
|
+
*/
|
|
18
|
+
before?: IData;
|
|
19
|
+
/**
|
|
20
|
+
* 节点信息
|
|
21
|
+
*
|
|
22
|
+
* @author zhanghanrui
|
|
23
|
+
* @date 2024-06-29 17:06:10
|
|
24
|
+
* @type {IRelationshipDiagramNode[]}
|
|
25
|
+
*/
|
|
26
|
+
nodes: IRelationshipDiagramNode[];
|
|
27
|
+
/**
|
|
28
|
+
* 后置信息
|
|
29
|
+
*
|
|
30
|
+
* @author zhanghanrui
|
|
31
|
+
* @date 2024-06-29 17:06:08
|
|
32
|
+
* @type {IData}
|
|
33
|
+
*/
|
|
34
|
+
after?: IData;
|
|
35
|
+
}
|
|
36
|
+
export interface INodeData {
|
|
37
|
+
/**
|
|
38
|
+
* 模型标识
|
|
39
|
+
*
|
|
40
|
+
* @author zhanghanrui
|
|
41
|
+
* @date 2024-06-29 17:06:38
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
modelKey: string;
|
|
45
|
+
/**
|
|
46
|
+
* 模型类型
|
|
47
|
+
*
|
|
48
|
+
* @author zhanghanrui
|
|
49
|
+
* @date 2024-06-29 17:06:06
|
|
50
|
+
* @type {string}
|
|
51
|
+
*/
|
|
52
|
+
modelCategory: string;
|
|
53
|
+
/**
|
|
54
|
+
* 属性标识
|
|
55
|
+
*
|
|
56
|
+
* @author zhanghanrui
|
|
57
|
+
* @date 2024-06-29 17:06:42
|
|
58
|
+
* @type {string}
|
|
59
|
+
*/
|
|
60
|
+
fieldKey: string;
|
|
61
|
+
/**
|
|
62
|
+
* 节点方向
|
|
63
|
+
*
|
|
64
|
+
* @author zhanghanrui
|
|
65
|
+
* @date 2024-06-29 17:06:47
|
|
66
|
+
* @type {('forward' | 'backward' | '')}
|
|
67
|
+
*/
|
|
68
|
+
direction: 'forward' | 'backward' | '';
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 数据联动 ruleConfig 配置清单
|
|
72
|
+
*
|
|
73
|
+
* @author zhanghanrui
|
|
74
|
+
* @date 2024-06-29 17:06:29
|
|
75
|
+
* @export
|
|
76
|
+
* @interface IRuleConfig
|
|
77
|
+
*/
|
|
78
|
+
export interface IRuleConfig {
|
|
79
|
+
/**
|
|
80
|
+
* 设计 json 配置
|
|
81
|
+
*
|
|
82
|
+
* @author zhanghanrui
|
|
83
|
+
* @date 2024-06-29 17:06:31
|
|
84
|
+
* @type {IDesignJson}
|
|
85
|
+
*/
|
|
86
|
+
designJson: IDesignJson;
|
|
87
|
+
/**
|
|
88
|
+
* 是否强依赖
|
|
89
|
+
*
|
|
90
|
+
* @author zhanghanrui
|
|
91
|
+
* @date 2024-09-02 15:09:15
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
*/
|
|
94
|
+
strongDependence: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 主查字段名称
|
|
97
|
+
*
|
|
98
|
+
* @author zhanghanrui
|
|
99
|
+
* @date 2024-06-29 19:06:48
|
|
100
|
+
* @type {string}
|
|
101
|
+
*/
|
|
102
|
+
modelKey: string;
|
|
103
|
+
/**
|
|
104
|
+
* 属性标识(不是所有场景都有)
|
|
105
|
+
*
|
|
106
|
+
* @author zhanghanrui
|
|
107
|
+
* @date 2024-07-05 11:07:25
|
|
108
|
+
* @type {string}
|
|
109
|
+
*/
|
|
110
|
+
fieldId?: string;
|
|
111
|
+
/**
|
|
112
|
+
* 属性标识(不是所有场景都有)
|
|
113
|
+
*
|
|
114
|
+
* @author zhanghanrui
|
|
115
|
+
* @date 2024-06-29 17:06:47
|
|
116
|
+
* @type {string}
|
|
117
|
+
*/
|
|
118
|
+
fieldKey?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 属性名称
|
|
121
|
+
*
|
|
122
|
+
* @author zhanghanrui
|
|
123
|
+
* @date 2024-06-29 19:06:24
|
|
124
|
+
* @type {string}
|
|
125
|
+
*/
|
|
126
|
+
fieldLabel?: string;
|
|
127
|
+
/**
|
|
128
|
+
* 给后台使用的 nodes 清单
|
|
129
|
+
*
|
|
130
|
+
* @author zhanghanrui
|
|
131
|
+
* @date 2024-06-29 17:06:41
|
|
132
|
+
* @type {INodeData[]}
|
|
133
|
+
*/
|
|
134
|
+
nodes: INodeData[];
|
|
135
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { ButtonColorType, ButtonColorTheme, ButtonStyle, ButtonSize, AGLINE_ENUMS, operateSysEnums, PrintModeEnums, TransactionMode, KeyMode, ResetRuleType, ButtonOpeEnum, openWindowEnums, ButtonTypeEnum } from '@gct-paas/core';
|
|
2
|
+
import { LowCodeWidget } from '../..';
|
|
3
|
+
/** 按钮基础通用属性(不含 WidgetProps,用于 ButtonProps.basic) */
|
|
4
|
+
export interface ButtonBasicProps {
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
buttonTheme: ButtonColorTheme;
|
|
7
|
+
buttonType: ButtonColorType;
|
|
8
|
+
icon: string;
|
|
9
|
+
iconColor: string;
|
|
10
|
+
/** 按钮样式 */
|
|
11
|
+
buttonStyle: ButtonStyle;
|
|
12
|
+
/** 开启二次确认 */
|
|
13
|
+
confirm: boolean;
|
|
14
|
+
/** 二次确认内容 */
|
|
15
|
+
confirmText: string;
|
|
16
|
+
enableCustomColor: boolean;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
fontColor: string;
|
|
19
|
+
}
|
|
20
|
+
/** 基础按钮属性(所有按钮类的共同基类) */
|
|
21
|
+
export interface BaseButtonProps extends LowCodeWidget.WidgetProps {
|
|
22
|
+
/** 关联表单 */
|
|
23
|
+
refForm?: string;
|
|
24
|
+
/** 关联弹框 */
|
|
25
|
+
refModal?: string;
|
|
26
|
+
/** 关联列表 */
|
|
27
|
+
refList?: string;
|
|
28
|
+
/** 标题 */
|
|
29
|
+
title: string;
|
|
30
|
+
/** 二次确认 */
|
|
31
|
+
confirm?: boolean;
|
|
32
|
+
confirmText?: string;
|
|
33
|
+
/** 内置事件 */
|
|
34
|
+
innerEvent?: boolean;
|
|
35
|
+
/** 系统事件类型 */
|
|
36
|
+
sysMethedType?: operateSysEnums;
|
|
37
|
+
linkPage?: string;
|
|
38
|
+
/** 事件名称 */
|
|
39
|
+
eventName?: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
iconColor: string;
|
|
42
|
+
size: ButtonSize;
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
/** 是否显示按钮名称 */
|
|
45
|
+
hasText: boolean;
|
|
46
|
+
/** 是否显示图标 */
|
|
47
|
+
hasIcon: boolean;
|
|
48
|
+
/** 按钮 type */
|
|
49
|
+
type: string;
|
|
50
|
+
/** 是否是危险类型 */
|
|
51
|
+
danger: boolean;
|
|
52
|
+
/** 关联模型 */
|
|
53
|
+
model?: string;
|
|
54
|
+
i18nConfig?: string;
|
|
55
|
+
/** 按钮样式 */
|
|
56
|
+
buttonStyle?: ButtonStyle;
|
|
57
|
+
enableCustomColor: boolean;
|
|
58
|
+
backgroundColor?: string;
|
|
59
|
+
fontColor?: string;
|
|
60
|
+
/** 复制按钮需要排除的字段 */
|
|
61
|
+
excludeField?: string[];
|
|
62
|
+
/** 按钮所在位置 */
|
|
63
|
+
pos?: ButtonOpeEnum;
|
|
64
|
+
/** 将当前按钮的名称同步为弹框标题 */
|
|
65
|
+
syncBtnNameToModal?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/** 普通按钮(带 basic 配置)属性 */
|
|
68
|
+
export interface ButtonProps extends LowCodeWidget.WidgetProps {
|
|
69
|
+
title: string;
|
|
70
|
+
/** 关联表单 */
|
|
71
|
+
refForm?: string;
|
|
72
|
+
/** 关联列表 */
|
|
73
|
+
refList?: string;
|
|
74
|
+
basic: ButtonBasicProps;
|
|
75
|
+
}
|
|
76
|
+
/** 流程提交按钮属性 */
|
|
77
|
+
export interface ProcessButtonProps extends BaseButtonProps {
|
|
78
|
+
refModel?: string;
|
|
79
|
+
category?: string;
|
|
80
|
+
refProcess?: string;
|
|
81
|
+
refService?: string;
|
|
82
|
+
}
|
|
83
|
+
/** 审批按钮属性 */
|
|
84
|
+
export interface approveButtonProps extends BaseButtonProps {
|
|
85
|
+
action?: ButtonTypeEnum;
|
|
86
|
+
/** 不可删除 */
|
|
87
|
+
noDelete: boolean;
|
|
88
|
+
/** 不可编辑 */
|
|
89
|
+
noEdit: boolean;
|
|
90
|
+
processId: string;
|
|
91
|
+
refForm: string;
|
|
92
|
+
}
|
|
93
|
+
/** 重置按钮属性 */
|
|
94
|
+
export interface ResetButtonProps extends BaseButtonProps {
|
|
95
|
+
resetRule: ResetRuleType;
|
|
96
|
+
}
|
|
97
|
+
/** 表格审批按钮属性 */
|
|
98
|
+
export interface TableApproveButtonProps extends BaseButtonProps {
|
|
99
|
+
/** 打开方式 */
|
|
100
|
+
openType: openWindowEnums;
|
|
101
|
+
}
|
|
102
|
+
/** 标签打印按钮属性 */
|
|
103
|
+
export interface LabelPrintProps extends BaseButtonProps {
|
|
104
|
+
/** 打印方式 */
|
|
105
|
+
printMode: PrintModeEnums;
|
|
106
|
+
/** 打印模版 key 或者模版的引用类型 */
|
|
107
|
+
printKey: string | TransactionMode;
|
|
108
|
+
/** 打印服务 key */
|
|
109
|
+
serverKey: string;
|
|
110
|
+
/** 关联模型 */
|
|
111
|
+
refModel: string;
|
|
112
|
+
/** 标签模版类型 */
|
|
113
|
+
labelMode: KeyMode;
|
|
114
|
+
/** 打印机类型 */
|
|
115
|
+
printType: KeyMode;
|
|
116
|
+
/** 打印 key */
|
|
117
|
+
printVal: string;
|
|
118
|
+
/** 网络打印机类型 或者打印机 id */
|
|
119
|
+
printRefType: string | TransactionMode;
|
|
120
|
+
/** 引用关系配置 */
|
|
121
|
+
ruleConfig: IObject;
|
|
122
|
+
/** 打印机的关联配置 */
|
|
123
|
+
printRuleConfig: IObject;
|
|
124
|
+
/** 打印字段 */
|
|
125
|
+
printField?: string;
|
|
126
|
+
/** 关联的表单 */
|
|
127
|
+
refForm?: string;
|
|
128
|
+
}
|
|
129
|
+
/** 单据打印按钮属性 */
|
|
130
|
+
export interface DocumentPrintProps extends BaseButtonProps {
|
|
131
|
+
/** 单据模板值 */
|
|
132
|
+
documentKey: string | TransactionMode;
|
|
133
|
+
/** 打印方式 */
|
|
134
|
+
printMode: PrintModeEnums;
|
|
135
|
+
refModel?: string;
|
|
136
|
+
/** 模版规则 */
|
|
137
|
+
documentType: KeyMode;
|
|
138
|
+
/** 连接规则 */
|
|
139
|
+
ruleConfig: IObject;
|
|
140
|
+
/** 打印字段 */
|
|
141
|
+
printField: string;
|
|
142
|
+
}
|
|
143
|
+
/** 导出按钮属性 */
|
|
144
|
+
export interface ExportProps extends BaseButtonProps {
|
|
145
|
+
model: string;
|
|
146
|
+
templateKey: string;
|
|
147
|
+
timeout: number;
|
|
148
|
+
/** 关联表格 */
|
|
149
|
+
refTable?: string;
|
|
150
|
+
}
|
|
151
|
+
/** 按钮容器属性 */
|
|
152
|
+
export interface ButtonContainerProps extends LowCodeWidget.WidgetProps {
|
|
153
|
+
/** 按钮样式 */
|
|
154
|
+
buttonStyle: ButtonStyle;
|
|
155
|
+
/** 对齐方式 */
|
|
156
|
+
align: AGLINE_ENUMS;
|
|
157
|
+
/** 间距 */
|
|
158
|
+
margin: number;
|
|
159
|
+
/** 尺寸 */
|
|
160
|
+
size: ButtonSize;
|
|
161
|
+
/** 所属模型 */
|
|
162
|
+
model?: string;
|
|
163
|
+
}
|
|
164
|
+
/** 流程按钮容器属性 */
|
|
165
|
+
export interface ButtonProcessContainerProps extends ButtonContainerProps {
|
|
166
|
+
/** 关联的流程标签 */
|
|
167
|
+
refForm: string;
|
|
168
|
+
/** 流程 id */
|
|
169
|
+
processId: string;
|
|
170
|
+
}
|