@gct-paas/core 0.0.1-dev.5 → 0.0.1-dev.7
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.min.cjs +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/_virtual/_commonjsHelpers.mjs +40 -0
- package/es/_virtual/index.mjs +7 -0
- package/es/constants/index.d.ts +1 -1
- package/es/constants/index.mjs +1 -1
- package/es/enums/app-designer/index.d.ts +80 -0
- package/es/enums/app-designer/index.mjs +58 -0
- package/es/enums/appEnum.d.ts +605 -0
- package/es/enums/appEnum.mjs +356 -0
- package/es/enums/appStateEnum.d.ts +14 -0
- package/es/enums/appStateEnum.mjs +12 -0
- package/es/enums/authActionEnum.d.ts +50 -0
- package/es/enums/authActionEnum.mjs +55 -0
- package/es/enums/breakpointEnum.d.ts +18 -0
- package/es/enums/breakpointEnum.mjs +28 -0
- package/es/enums/cacheEnum.d.ts +19 -0
- package/es/enums/cacheEnum.mjs +23 -0
- package/es/enums/designEnum.d.ts +82 -0
- package/es/enums/designEnum.mjs +72 -0
- package/es/enums/exceptionEnum.d.ts +17 -0
- package/es/enums/exceptionEnum.mjs +19 -0
- package/es/enums/httpEnum.d.ts +65 -0
- package/es/enums/httpEnum.mjs +63 -0
- package/es/enums/index.d.ts +15 -0
- package/es/enums/index.mjs +21 -0
- package/es/enums/menuEnum.d.ts +35 -0
- package/es/enums/menuEnum.mjs +40 -0
- package/es/enums/page-designer/designer.d.ts +277 -0
- package/es/enums/page-designer/designer.mjs +330 -0
- package/es/enums/page-designer/index.d.ts +4 -0
- package/es/enums/page-designer/index.mjs +6 -0
- package/es/enums/page-designer/panel.d.ts +243 -0
- package/es/enums/page-designer/panel.mjs +195 -0
- package/es/enums/page-designer/toolkit.d.ts +10 -0
- package/es/enums/page-designer/toolkit.mjs +14 -0
- package/es/enums/page-designer/widget.d.ts +316 -0
- package/es/enums/page-designer/widget.mjs +335 -0
- package/es/enums/pageEnum.d.ts +11 -0
- package/es/enums/pageEnum.mjs +15 -0
- package/es/enums/processEnum.d.ts +35 -0
- package/es/enums/processEnum.mjs +28 -0
- package/es/enums/roleEnum.d.ts +4 -0
- package/es/enums/roleEnum.mjs +8 -0
- package/es/enums/sizeEnum.d.ts +5 -0
- package/es/enums/sizeEnum.mjs +9 -0
- package/es/global/gct/gct.d.ts +47 -0
- package/es/global/gct/gct.mjs +49 -0
- package/es/global/index.d.ts +1 -0
- package/es/global/index.mjs +3 -0
- package/es/index.d.ts +14 -0
- package/es/index.mjs +41 -0
- package/es/interface/controller/i-designer-controller.d.ts +116 -0
- package/es/interface/controller/i-designer-controller.mjs +1 -0
- package/es/interface/controller/index.d.ts +1 -0
- package/es/interface/controller/index.mjs +1 -0
- package/es/interface/hooks/i-designer-hooks.d.ts +26 -0
- package/es/interface/hooks/i-designer-hooks.mjs +3 -0
- package/es/interface/hooks/index.d.ts +1 -0
- package/es/interface/hooks/index.mjs +1 -0
- package/es/interface/i-import-style-map/i-import-style-map.d.ts +15 -0
- package/es/interface/i-import-style-map/i-import-style-map.mjs +1 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +14 -0
- package/es/interface/i-pinia-action/i-global-actions.mjs +1 -0
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +16 -0
- package/es/interface/i-pinia-getter/i-global-getters.mjs +1 -0
- package/es/interface/i-pinia-state/i-global-state.d.ts +15 -0
- package/es/interface/i-pinia-state/i-global-state.mjs +1 -0
- package/es/interface/index.d.ts +8 -0
- package/es/interface/index.mjs +6 -0
- package/es/interface/low-code-types/index.d.ts +4 -0
- package/es/interface/low-code-types/index.mjs +5 -0
- package/es/interface/low-code-types/modal-types.d.ts +67 -0
- package/es/interface/low-code-types/modal-types.mjs +3 -0
- package/es/interface/low-code-types/model/index.d.ts +5338 -0
- package/es/interface/low-code-types/model/index.mjs +1 -0
- package/es/interface/low-code-types/schema/index.d.ts +12 -0
- package/es/interface/low-code-types/schema/index.mjs +1 -0
- package/es/interface/low-code-types/widget-basic-types.d.ts +655 -0
- package/es/interface/low-code-types/widget-basic-types.mjs +3 -0
- package/es/interface/state/i-designer-state.d.ts +39 -0
- package/es/interface/state/i-designer-state.mjs +1 -0
- package/es/interface/state/index.d.ts +1 -0
- package/es/interface/state/index.mjs +1 -0
- package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +541 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/async-series-hook/async-series-hook.mjs +73 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/index.mjs +2 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/sync-series-hook/sync-series-hook.mjs +100 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/index.mjs +2 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/array/array.mjs +47 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/index.mjs +5 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/object/object.mjs +24 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event/qx-event.mjs +94 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event-emitter/qx-event-emitter.mjs +146 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/type-util/type-util.mjs +149 -0
- package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/util/util.mjs +227 -0
- package/es/provider/i-designer-provider/i-designer-provider.d.ts +102 -0
- package/es/provider/i-designer-provider/i-designer-provider.mjs +1 -0
- package/es/provider/index.d.ts +1 -0
- package/es/provider/index.mjs +1 -0
- package/es/register/designer-register/designer-register.d.ts +58 -0
- package/es/register/designer-register/designer-register.mjs +70 -0
- package/es/register/index.d.ts +2 -0
- package/es/register/index.mjs +4 -0
- package/es/register/render-register/render-register.d.ts +59 -0
- package/es/register/render-register/render-register.mjs +65 -0
- package/es/state/global-pinia-state/global-pinia-state.d.ts +16 -0
- package/es/state/global-pinia-state/global-pinia-state.mjs +11 -0
- package/es/state/index.d.ts +1 -0
- package/es/state/index.mjs +3 -0
- package/es/store/global-store.d.ts +2 -0
- package/es/store/global-store.mjs +22 -0
- package/es/store/index.d.ts +20 -0
- package/es/store/index.mjs +21 -0
- package/es/types/index.d.ts +46 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.mjs +2 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +17 -0
- package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +27 -0
- package/es/utils/plugin-static-resource/plugin-static-resource.d.ts +41 -0
- package/es/utils/plugin-static-resource/plugin-static-resource.mjs +46 -0
- package/package.json +15 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IVue3DndItemHooks, LowCodeWidget } from '../widget-basic-types';
|
|
2
|
+
export type ExportWidgetSchema = Record<string, LowCodeWidget.BasicSchema>;
|
|
3
|
+
export type ExportWidgetPropEditors = Record<string, LowCodeWidget.PropEditor[]>;
|
|
4
|
+
export type ExportWidgetStyleEditors = Record<string, LowCodeWidget.StyleEditor[]>;
|
|
5
|
+
export type ExportWidgetEvents = Record<string, LowCodeWidget.EventsType[]>;
|
|
6
|
+
export type ExportWidgetHooks = Record<string, IVue3DndItemHooks>;
|
|
7
|
+
export type ExportWidgetWhiteList = Record<string, (string | RegExp)[]>;
|
|
8
|
+
export type ExportWidgetBlackList = Record<string, (string | RegExp)[]>;
|
|
9
|
+
export type ExportWidgetCallback = Record<string, LowCodeWidget.RunCallback>;
|
|
10
|
+
export type ExportWidgetBeforeCreate = Record<string, LowCodeWidget.beforeCreate>;
|
|
11
|
+
export type ExportWidgetLoopCallback = Record<string, LowCodeWidget.loopCallback>;
|
|
12
|
+
export type ExportWidgetDesignerConfig = Record<string, LowCodeWidget.DesignerConfig>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { LowCodeModal } from './modal-types';
|
|
3
|
+
import { FieldMetaDTO } from './model';
|
|
4
|
+
import { CategoryTypeEnum, Platform, PropGroup, TextDecoration, FormComponents, DisplayType, SearchComponents, INNER_EVENT, DisplayEnums, EventCategory, StyleGroup, TagTypeEnum, BindCmpStyleTypeEnum, tableColumnWidthEnum, ProgressTypeEnum, tagEnum, VERIFICATIONCONDITIONS_TYPE, ASSIGNMENTSTRATEGY_ENUM, Dependency_ENUM, GLOBAL_VAR_TYPE, CreateType, EntityModelCategoryEnum, EntityModelTypeEnum, FIELD_TYPE, MaterialEnum, SEARCH_SEVICE, UniqueConstraintType } from '../../enums';
|
|
5
|
+
import { IDesignerController } from '../controller';
|
|
6
|
+
/** 单个组件节点描述 */
|
|
7
|
+
export declare namespace LowCodeWidget {
|
|
8
|
+
interface BasicSchema {
|
|
9
|
+
/** 组件唯一标识 */
|
|
10
|
+
id: string;
|
|
11
|
+
/** 显示设备 */
|
|
12
|
+
platform: Platform;
|
|
13
|
+
/** 组件tag标识 */
|
|
14
|
+
categoryType?: CategoryTypeEnum;
|
|
15
|
+
/**别名 */
|
|
16
|
+
alias: string;
|
|
17
|
+
/** 组件名称 */
|
|
18
|
+
name: string;
|
|
19
|
+
/**自定义展示组件的名字 */
|
|
20
|
+
compName?: string;
|
|
21
|
+
/**自定义展示组件key的名字 */
|
|
22
|
+
compKey?: string;
|
|
23
|
+
/**组件类型 需和文件名一致 */
|
|
24
|
+
type: FormComponents | string;
|
|
25
|
+
/** icon, 配置组件库使用 */
|
|
26
|
+
icon: string;
|
|
27
|
+
/** 子集, 仅布局组件使用 */
|
|
28
|
+
children?: any[];
|
|
29
|
+
/** 是否可显示, 配置组件库使用 */
|
|
30
|
+
internal?: boolean;
|
|
31
|
+
/** 描述 */
|
|
32
|
+
description?: string;
|
|
33
|
+
/** 样式 */
|
|
34
|
+
style: Partial<BasicStyle>;
|
|
35
|
+
/** 组件属性 */
|
|
36
|
+
props: CommonProps & WidgetProps;
|
|
37
|
+
/** 事件 */
|
|
38
|
+
events: BasicEvents;
|
|
39
|
+
/** 表单组件 */
|
|
40
|
+
formItem?: boolean;
|
|
41
|
+
/**布局 块级 行内 */
|
|
42
|
+
display?: DisplayEnums;
|
|
43
|
+
/** 菜单别名 */
|
|
44
|
+
displayName?: string;
|
|
45
|
+
/**i18n字段 */
|
|
46
|
+
i18n?: Record<string, string>;
|
|
47
|
+
/** 是否是字段类型 */
|
|
48
|
+
isField?: boolean;
|
|
49
|
+
/** 字段组件类型使用场景 */
|
|
50
|
+
materialType?: MaterialEnum;
|
|
51
|
+
/** 字段所属位置 */
|
|
52
|
+
preLocation?: string;
|
|
53
|
+
/**排除的样式属性 */
|
|
54
|
+
ignoringStyle?: string[];
|
|
55
|
+
/**是否是自读组件,自读则不会有hover和点击选中组件的行为 */
|
|
56
|
+
isReadonlyWidget?: boolean;
|
|
57
|
+
/**部分组件嵌套在某个父组件内部 */
|
|
58
|
+
parentComponent?: FormComponents;
|
|
59
|
+
}
|
|
60
|
+
interface FieldSchema extends BasicSchema {
|
|
61
|
+
props: FormItemProps & WidgetProps;
|
|
62
|
+
}
|
|
63
|
+
interface IWrapperCmpConfigParams {
|
|
64
|
+
/** 组件基础配置 */
|
|
65
|
+
data: any;
|
|
66
|
+
/** 是否是移动端 */
|
|
67
|
+
isMobile: boolean;
|
|
68
|
+
/** 平台 */
|
|
69
|
+
platform: Platform;
|
|
70
|
+
/** 调用方传入的其他状态 */
|
|
71
|
+
otherState: Record<string, any>;
|
|
72
|
+
}
|
|
73
|
+
/**Font样式 */
|
|
74
|
+
interface FontStyle {
|
|
75
|
+
fontSize: string;
|
|
76
|
+
bold: boolean;
|
|
77
|
+
italic: boolean;
|
|
78
|
+
textDecoration: TextDecoration;
|
|
79
|
+
color: string;
|
|
80
|
+
align: 'left' | 'right';
|
|
81
|
+
}
|
|
82
|
+
/**组件只读时开启标签配置的样式 */
|
|
83
|
+
interface TagConfigStyle {
|
|
84
|
+
color?: string;
|
|
85
|
+
tagType?: TagTypeEnum;
|
|
86
|
+
}
|
|
87
|
+
/**组件只读时开启进度条配置的样式 */
|
|
88
|
+
interface ProgressConfigStyle {
|
|
89
|
+
color: string;
|
|
90
|
+
tagType: ProgressTypeEnum;
|
|
91
|
+
}
|
|
92
|
+
interface BorderStyle {
|
|
93
|
+
borderWidth: string;
|
|
94
|
+
borderStyle: string;
|
|
95
|
+
borderColor: string;
|
|
96
|
+
}
|
|
97
|
+
/**样式Schema */
|
|
98
|
+
interface BasicStyle {
|
|
99
|
+
position?: string;
|
|
100
|
+
top?: string;
|
|
101
|
+
left?: string;
|
|
102
|
+
right?: string;
|
|
103
|
+
bottom?: string;
|
|
104
|
+
width?: string;
|
|
105
|
+
height?: string;
|
|
106
|
+
maxHeight?: string;
|
|
107
|
+
backgroundColor?: string;
|
|
108
|
+
marginAll?: string;
|
|
109
|
+
marginTop?: string;
|
|
110
|
+
marginRight?: string;
|
|
111
|
+
marginBottom?: string;
|
|
112
|
+
marginLeft?: string;
|
|
113
|
+
paddingAll?: string;
|
|
114
|
+
paddingTop?: string;
|
|
115
|
+
paddingRight?: string;
|
|
116
|
+
paddingBottom?: string;
|
|
117
|
+
paddingLeft?: string;
|
|
118
|
+
labelFont: FontStyle;
|
|
119
|
+
contentFont: FontStyle;
|
|
120
|
+
tagStyle: TagConfigStyle;
|
|
121
|
+
tagStyleOpen: boolean;
|
|
122
|
+
borderAll: Partial<BorderStyle>;
|
|
123
|
+
borderLeft: Partial<BorderStyle>;
|
|
124
|
+
borderRight: Partial<BorderStyle>;
|
|
125
|
+
borderBottom: Partial<BorderStyle>;
|
|
126
|
+
borderTop: Partial<BorderStyle>;
|
|
127
|
+
borderTopRightRadius?: string;
|
|
128
|
+
borderTopLeftRadius?: string;
|
|
129
|
+
borderBottomRightRadius?: string;
|
|
130
|
+
borderBottomLeftRadius?: string;
|
|
131
|
+
borderAllRadius?: string;
|
|
132
|
+
/**表格列宽样式 */
|
|
133
|
+
columnwidthConfigure?: tableColumnWidthEnum;
|
|
134
|
+
/**表格列宽*/
|
|
135
|
+
columnwidth?: number;
|
|
136
|
+
columnFontStyleByRule?: columnFontStyleByRule[];
|
|
137
|
+
columnBackgroundByRule?: columnBackgroundByRule[];
|
|
138
|
+
tableheight?: number;
|
|
139
|
+
/**表格高度样式 */
|
|
140
|
+
tableheightConfigure?: tableColumnWidthEnum;
|
|
141
|
+
}
|
|
142
|
+
interface columnFontStyleByRule {
|
|
143
|
+
displayRule: string;
|
|
144
|
+
contentFont: FontStyle;
|
|
145
|
+
tagStyle: TagConfigStyle;
|
|
146
|
+
progressStyle: ProgressConfigStyle;
|
|
147
|
+
tagType: tagEnum;
|
|
148
|
+
tagStyleOpen: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface columnBackgroundByRule {
|
|
151
|
+
displayRule: string;
|
|
152
|
+
backgroundColor?: string;
|
|
153
|
+
}
|
|
154
|
+
/**BasicSchema中的组件prop */
|
|
155
|
+
type CommonProps = Record<string, any>;
|
|
156
|
+
/**所有组件的Prop基类 */
|
|
157
|
+
type WidgetProps = DisplayProps;
|
|
158
|
+
/**表单组件Prop Schema */
|
|
159
|
+
interface FormItemProps extends WidgetProps {
|
|
160
|
+
/** 字段key */
|
|
161
|
+
field: string;
|
|
162
|
+
/** 字段id */
|
|
163
|
+
fieldId: string;
|
|
164
|
+
fieldType?: FIELD_TYPE;
|
|
165
|
+
/** 字段链路 */
|
|
166
|
+
fieldCodeChain?: string;
|
|
167
|
+
/** 是否是模型关联字段, 模型关联字段的字段key */
|
|
168
|
+
bindFieldKey?: string;
|
|
169
|
+
/** 是否是模型关联字段 */
|
|
170
|
+
isFieldModel?: boolean;
|
|
171
|
+
/** 自定义名称 */
|
|
172
|
+
label: string;
|
|
173
|
+
/** 显示标题 */
|
|
174
|
+
displayLabelText?: boolean;
|
|
175
|
+
/** 暗提示 */
|
|
176
|
+
placeholder?: string;
|
|
177
|
+
/** 默认值 */
|
|
178
|
+
defaultValue?: any;
|
|
179
|
+
/** 必填 */
|
|
180
|
+
required?: boolean;
|
|
181
|
+
/** 新建字段那边配置的必填 */
|
|
182
|
+
fieldRequired?: boolean;
|
|
183
|
+
/** 只读 */
|
|
184
|
+
readonly?: boolean;
|
|
185
|
+
/**字段只读 */
|
|
186
|
+
fieldReadonly?: boolean;
|
|
187
|
+
/** 禁用 */
|
|
188
|
+
disabled?: boolean;
|
|
189
|
+
/**可清空 */
|
|
190
|
+
clearable?: boolean;
|
|
191
|
+
/**获取焦点 */
|
|
192
|
+
getFocus?: boolean;
|
|
193
|
+
/** 显示说明开关 */
|
|
194
|
+
showExplain?: boolean;
|
|
195
|
+
/** 显示说明文案 */
|
|
196
|
+
explain?: string;
|
|
197
|
+
/** 正则校验开关 */
|
|
198
|
+
regSwitch?: boolean;
|
|
199
|
+
/**正则校验提示文案 */
|
|
200
|
+
regHint?: string;
|
|
201
|
+
/**正则校验内容 */
|
|
202
|
+
reg?: string;
|
|
203
|
+
/** 显隐配置-隐藏时提交开关 */
|
|
204
|
+
notSubmitInHide?: boolean;
|
|
205
|
+
/** 绑定组件样式选择类型 */
|
|
206
|
+
bindCompStyleType?: string;
|
|
207
|
+
/**所属表单的模型key */
|
|
208
|
+
modelKey: string;
|
|
209
|
+
/**关联字段所关联的模型 */
|
|
210
|
+
bindModelKey?: string;
|
|
211
|
+
/**内嵌搜索 */
|
|
212
|
+
embeddedSearch?: boolean;
|
|
213
|
+
/**自定义显示字段 */
|
|
214
|
+
isCustomField?: boolean;
|
|
215
|
+
maxlength?: number;
|
|
216
|
+
minlength?: number;
|
|
217
|
+
/**
|
|
218
|
+
* 唯一类型
|
|
219
|
+
*/
|
|
220
|
+
uniqueConstraintType?: UniqueConstraintType;
|
|
221
|
+
/** 是否关闭校验 */
|
|
222
|
+
closeValidator?: boolean;
|
|
223
|
+
/**预置字段 不可删除 */
|
|
224
|
+
_preset?: boolean;
|
|
225
|
+
/** 关闭自动修复错误数字 */
|
|
226
|
+
notAutoFix?: boolean;
|
|
227
|
+
/** 最大值 */
|
|
228
|
+
maxValue?: any;
|
|
229
|
+
/** 最小值 */
|
|
230
|
+
minValue?: any;
|
|
231
|
+
/**关联引用下模型的字段的链路 */
|
|
232
|
+
bindFieldLink?: string[];
|
|
233
|
+
/**
|
|
234
|
+
* 关联引用下模型依赖的字段
|
|
235
|
+
*/
|
|
236
|
+
refOriginField?: string;
|
|
237
|
+
/** 关联引用下模型依赖的初始字段的模型*/
|
|
238
|
+
refOriginModelKey?: string;
|
|
239
|
+
/** 关联引用下模型依赖的初始字段的字段类型*/
|
|
240
|
+
refOriginFieldType?: FIELD_TYPE;
|
|
241
|
+
}
|
|
242
|
+
/**组件依赖 */
|
|
243
|
+
interface Dependency {
|
|
244
|
+
[Dependency_ENUM.HIDDEN]: {
|
|
245
|
+
expression?: string;
|
|
246
|
+
value?: boolean;
|
|
247
|
+
};
|
|
248
|
+
/**只读 */
|
|
249
|
+
[Dependency_ENUM.READONLY]: {
|
|
250
|
+
expression?: string;
|
|
251
|
+
value?: boolean;
|
|
252
|
+
/**字段组件上的配置信息 */
|
|
253
|
+
fieldValue?: boolean;
|
|
254
|
+
};
|
|
255
|
+
/**禁用 */
|
|
256
|
+
[Dependency_ENUM.DISABLED]: {
|
|
257
|
+
expression?: string;
|
|
258
|
+
value?: boolean;
|
|
259
|
+
};
|
|
260
|
+
/**必填 */
|
|
261
|
+
[Dependency_ENUM.REQUIRED]: {
|
|
262
|
+
expression?: string;
|
|
263
|
+
value?: boolean;
|
|
264
|
+
/**字段组件上的配置信息 */
|
|
265
|
+
fieldValue?: boolean;
|
|
266
|
+
};
|
|
267
|
+
[Dependency_ENUM.ASSIGNMENT]: {
|
|
268
|
+
expression?: string;
|
|
269
|
+
strategy?: ASSIGNMENTSTRATEGY_ENUM;
|
|
270
|
+
value?: boolean;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/**显隐的Props */
|
|
274
|
+
interface DisplayProps {
|
|
275
|
+
/** 显隐配置-隐藏开关 */
|
|
276
|
+
hidden: boolean;
|
|
277
|
+
/** 显隐配置-显隐控制 */
|
|
278
|
+
displayType?: DisplayType;
|
|
279
|
+
/** 显隐配置-显隐控制内容 */
|
|
280
|
+
displayRule?: string;
|
|
281
|
+
/**模型信息 */
|
|
282
|
+
modeldata?: {
|
|
283
|
+
/**模型类型 基础/版本/树 等等 */
|
|
284
|
+
modelType?: EntityModelTypeEnum;
|
|
285
|
+
/**模型大类 */
|
|
286
|
+
modelCategory?: EntityModelCategoryEnum;
|
|
287
|
+
/**1表示子表 0表示主表 */
|
|
288
|
+
subModel?: 0 | 1;
|
|
289
|
+
/**1表示流程模型 */
|
|
290
|
+
supportProcess?: 0 | 1;
|
|
291
|
+
};
|
|
292
|
+
/**组件依赖 */
|
|
293
|
+
componentDependency: {
|
|
294
|
+
/**组件依赖排序 */
|
|
295
|
+
sortDependency: Dependency_ENUM[];
|
|
296
|
+
/**组件依赖配置 */
|
|
297
|
+
configDependency: Dependency;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/**布局组件Prop Schema */
|
|
301
|
+
type LayoutProps = WidgetProps;
|
|
302
|
+
/**基础Prop Schema */
|
|
303
|
+
/**已选中配置的事件 Schema */
|
|
304
|
+
type BasicEvents = Record<string, JsEvent | InnerEvents[] | LoInterface>;
|
|
305
|
+
interface JsEvent {
|
|
306
|
+
type?: EventCategory.JS;
|
|
307
|
+
/**JS方法名称 */
|
|
308
|
+
name: string;
|
|
309
|
+
/**event额外参数 */
|
|
310
|
+
extraParams: Record<string, any> | string | number | boolean;
|
|
311
|
+
}
|
|
312
|
+
interface InnerEvents {
|
|
313
|
+
name: INNER_EVENT;
|
|
314
|
+
title: string;
|
|
315
|
+
key: string;
|
|
316
|
+
refId?: string;
|
|
317
|
+
scopeId?: string;
|
|
318
|
+
}
|
|
319
|
+
interface LoInterface {
|
|
320
|
+
type: EventCategory.LO;
|
|
321
|
+
/**JS方法名称 */
|
|
322
|
+
name: string;
|
|
323
|
+
/**event额外参数 */
|
|
324
|
+
extraParams: Record<string, any> | string | number | boolean;
|
|
325
|
+
}
|
|
326
|
+
/**样式编辑器 */
|
|
327
|
+
interface StyleEditor {
|
|
328
|
+
/**style组件 */
|
|
329
|
+
component: string;
|
|
330
|
+
/**style名称 */
|
|
331
|
+
name?: string | Record<string, string>;
|
|
332
|
+
/**右侧显示的名称 */
|
|
333
|
+
label?: string;
|
|
334
|
+
/**style分组 */
|
|
335
|
+
group: StyleGroup;
|
|
336
|
+
/**style变时的callback */
|
|
337
|
+
changeCallback?: Function;
|
|
338
|
+
/**style是否隐藏逻辑 */
|
|
339
|
+
hidden?: (arg: BasicSchema) => boolean;
|
|
340
|
+
/**
|
|
341
|
+
* editor内部的自定义config逻辑
|
|
342
|
+
*/
|
|
343
|
+
_config?: Partial<StyleEditorConfig>;
|
|
344
|
+
}
|
|
345
|
+
interface StyleEditorConfig {
|
|
346
|
+
options: Function | {
|
|
347
|
+
label: string;
|
|
348
|
+
value: string | boolean | number;
|
|
349
|
+
}[];
|
|
350
|
+
options2: Function | {
|
|
351
|
+
label: string;
|
|
352
|
+
value: string | boolean | number;
|
|
353
|
+
}[];
|
|
354
|
+
maxlength: number;
|
|
355
|
+
minlength: number;
|
|
356
|
+
showType: 'switch' | 'checkbox';
|
|
357
|
+
/**新增对象的生成器 */
|
|
358
|
+
generator?: Function;
|
|
359
|
+
columnWidthEnum?: tableColumnWidthEnum[];
|
|
360
|
+
hiddenMarginOrPadding: 'margin' | 'padding';
|
|
361
|
+
/**form-item显示的名称 */
|
|
362
|
+
label?: string;
|
|
363
|
+
hiddenColor?: boolean;
|
|
364
|
+
}
|
|
365
|
+
/**属性编辑器 */
|
|
366
|
+
interface PropEditor {
|
|
367
|
+
/**prop组件 */
|
|
368
|
+
component: string;
|
|
369
|
+
/**prop名称 没有name的情况指的是:此editor改的不是组件的prop而是改的其他地方的数据*/
|
|
370
|
+
/**root:开头就全链路修改widget */
|
|
371
|
+
name?: string | Record<string, any>;
|
|
372
|
+
/**
|
|
373
|
+
* 组件所归属的套件,非清单中的配置界面不显示
|
|
374
|
+
*
|
|
375
|
+
* @author zhanghanrui
|
|
376
|
+
* @date 2024-05-31 09:05:49
|
|
377
|
+
* @type {string[]}
|
|
378
|
+
*/
|
|
379
|
+
kit?: string[];
|
|
380
|
+
/**右侧显示的label名称 */
|
|
381
|
+
label: string;
|
|
382
|
+
/**prop是否必填 */
|
|
383
|
+
required?: boolean;
|
|
384
|
+
/**prop分组 */
|
|
385
|
+
group: PropGroup | string;
|
|
386
|
+
/**自定义校验 */
|
|
387
|
+
validate?: Promise<any>;
|
|
388
|
+
/**
|
|
389
|
+
* editor内部的自定义config逻辑
|
|
390
|
+
*/
|
|
391
|
+
_config?: Partial<PropEditorConfig>;
|
|
392
|
+
/**prop变时的callback */
|
|
393
|
+
changeCallback?: (arg: BasicSchema, val: any) => void;
|
|
394
|
+
/** 是否是纯表单字段配置(在 hidden 方法之后执行,如果为 false 直接隐藏)只针对于字段 */
|
|
395
|
+
formField?: boolean;
|
|
396
|
+
/**editor的是否隐藏逻辑 */
|
|
397
|
+
hidden?: (arg: BasicSchema) => boolean;
|
|
398
|
+
/**props依赖的字段,依赖的字段不存在会隐藏,变化了会刷新 */
|
|
399
|
+
dependentProps?: string[];
|
|
400
|
+
formItemStyle?: CSSProperties;
|
|
401
|
+
formItemClass?: string;
|
|
402
|
+
onMounted?: (widget: BasicSchema) => void;
|
|
403
|
+
}
|
|
404
|
+
/**editor属性 */
|
|
405
|
+
interface PropEditorConfig {
|
|
406
|
+
width?: number;
|
|
407
|
+
filterFields: FIELD_TYPE[];
|
|
408
|
+
filterTypes: CreateType[];
|
|
409
|
+
fieldToProp: FieldToProp[];
|
|
410
|
+
options: Function | {
|
|
411
|
+
label?: string;
|
|
412
|
+
icon?: string;
|
|
413
|
+
value: string | boolean | number;
|
|
414
|
+
suffix?: string;
|
|
415
|
+
}[];
|
|
416
|
+
options2: Function | {
|
|
417
|
+
label?: string;
|
|
418
|
+
icon?: string;
|
|
419
|
+
value: string | boolean | number;
|
|
420
|
+
}[];
|
|
421
|
+
createField: Function;
|
|
422
|
+
updateAsyncField?: Function;
|
|
423
|
+
maxlength?: Function | number;
|
|
424
|
+
minlength?: Function | number;
|
|
425
|
+
max?: Function | number;
|
|
426
|
+
min?: Function | number;
|
|
427
|
+
precision?: Function | number;
|
|
428
|
+
i18n?: boolean;
|
|
429
|
+
clearable?: boolean;
|
|
430
|
+
/**后置标签 */
|
|
431
|
+
addonAfter?: string;
|
|
432
|
+
disabled?: Function | boolean;
|
|
433
|
+
tooltip?: string | string[];
|
|
434
|
+
multiple?: boolean;
|
|
435
|
+
/**多选最多选择的个数 */
|
|
436
|
+
maxMultiple?: number;
|
|
437
|
+
modelKey?: string;
|
|
438
|
+
type?: string;
|
|
439
|
+
eventCallback?: Function;
|
|
440
|
+
filterFn?: (arg: any) => boolean;
|
|
441
|
+
/** 是否展示字数 */
|
|
442
|
+
showCount?: boolean;
|
|
443
|
+
/** 需要显示的输入属性内容 */
|
|
444
|
+
needFieldAttrs?: string[];
|
|
445
|
+
/** 需要过滤的输入属性内容 */
|
|
446
|
+
getFilterAttrs?: Function;
|
|
447
|
+
/** 组件类型key */
|
|
448
|
+
bindCmpStyleKey?: BindCmpStyleTypeEnum | Function;
|
|
449
|
+
filterOptionsCallback?: Function;
|
|
450
|
+
/** 日期、日期时间默认值 */
|
|
451
|
+
initPickerType?: string;
|
|
452
|
+
/**
|
|
453
|
+
* 图标色
|
|
454
|
+
*/
|
|
455
|
+
showColor?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* 图标背景色
|
|
458
|
+
*/
|
|
459
|
+
showBackground?: boolean;
|
|
460
|
+
/** 下拉框返回值类型 */
|
|
461
|
+
valueType?: string;
|
|
462
|
+
/**名称 */
|
|
463
|
+
name?: string;
|
|
464
|
+
/** 清除子组件 */
|
|
465
|
+
clearChildren?: boolean;
|
|
466
|
+
/** 支持搜索 */
|
|
467
|
+
showSearch?: boolean;
|
|
468
|
+
/** 过滤自身 */
|
|
469
|
+
filterSelf?: boolean;
|
|
470
|
+
/**根据props中哪个值来查询model字段 */
|
|
471
|
+
modelByKey: string;
|
|
472
|
+
/** 支持使用全局字段数据 */
|
|
473
|
+
supportGlobData?: boolean;
|
|
474
|
+
/**获取查询组件信息 */
|
|
475
|
+
getSearchWidgets?: Function;
|
|
476
|
+
/**显示复选框 */
|
|
477
|
+
showcheckbox?: boolean;
|
|
478
|
+
/**所属系统,web_module、mobile_module */
|
|
479
|
+
module?: string;
|
|
480
|
+
/** 选择字段按钮标题 */
|
|
481
|
+
selectFiledBtnTitle?: string;
|
|
482
|
+
/**查询子表或非子表 不传查询全部(1 子模型, 0 非子模型)*/
|
|
483
|
+
subModel?: number;
|
|
484
|
+
/** 模型种类:(entity/data/view) 多个类型逗号分隔*/
|
|
485
|
+
category?: string;
|
|
486
|
+
/**选择字段能否被拖拽 */
|
|
487
|
+
draggable?: boolean;
|
|
488
|
+
/**默认创建的按钮类型 */
|
|
489
|
+
defaultButtonType?: object;
|
|
490
|
+
/**组件辅助提示文本 */
|
|
491
|
+
tips?: string;
|
|
492
|
+
/** 是否显示切换单位 */
|
|
493
|
+
filterUnitType?: 'px' | '%';
|
|
494
|
+
placeholder?: string;
|
|
495
|
+
/** 需要过滤的字段 */
|
|
496
|
+
excludeFieldType?: FIELD_TYPE[];
|
|
497
|
+
/** 最要过滤的字段key */
|
|
498
|
+
excludeFieldKey?: string[];
|
|
499
|
+
/** 默认展开所有节点 */
|
|
500
|
+
defaultExpandAll?: boolean;
|
|
501
|
+
/** 显示checkbox */
|
|
502
|
+
treeCheckable?: boolean;
|
|
503
|
+
/**tag显示的内容 */
|
|
504
|
+
tagName?: string;
|
|
505
|
+
/**是否显示tag */
|
|
506
|
+
showTagFunc?: boolean | Function;
|
|
507
|
+
/** 是否一行显示 */
|
|
508
|
+
isInRow?: boolean;
|
|
509
|
+
/** 一行显示时是否居右显示 */
|
|
510
|
+
isRight?: boolean;
|
|
511
|
+
/** 获取modelkey */
|
|
512
|
+
getModelKey?: Function;
|
|
513
|
+
/** label行中右侧按钮 */
|
|
514
|
+
labelButton?: object;
|
|
515
|
+
/**label 水平布局时,左侧的label名称 */
|
|
516
|
+
label?: string;
|
|
517
|
+
/** linkage-editor 是否是tree */
|
|
518
|
+
isTreeSelect?: boolean | ((IData: any) => boolean);
|
|
519
|
+
/**插槽 */
|
|
520
|
+
slots?: object;
|
|
521
|
+
/** 关联表单的模型key */
|
|
522
|
+
bindModelKey?: string;
|
|
523
|
+
/**头部按钮 */
|
|
524
|
+
headerRightButton?: FormComponents[] | ((w: BasicSchema) => FormComponents[]);
|
|
525
|
+
/**批量按钮 */
|
|
526
|
+
headerLeftButton?: FormComponents[] | ((w: BasicSchema) => FormComponents[]);
|
|
527
|
+
/**单行按钮 */
|
|
528
|
+
columnsButton?: FormComponents[] | ((w: BasicSchema) => FormComponents[]);
|
|
529
|
+
/**rdo单行按钮 */
|
|
530
|
+
columnsRdoButton?: [
|
|
531
|
+
{
|
|
532
|
+
value: FormComponents[] | ((w: BasicSchema) => FormComponents[]);
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
value: FormComponents[] | ((w: BasicSchema) => FormComponents[]);
|
|
536
|
+
}
|
|
537
|
+
];
|
|
538
|
+
/**模块类型 */
|
|
539
|
+
moduleType?: string;
|
|
540
|
+
}
|
|
541
|
+
interface FieldToProp {
|
|
542
|
+
/**模型建模中字段 */
|
|
543
|
+
from: keyof FieldMetaDTO;
|
|
544
|
+
/**组件PROP中的字段 */
|
|
545
|
+
to: keyof FormItemProps | string;
|
|
546
|
+
transform?: (arg: any) => any;
|
|
547
|
+
}
|
|
548
|
+
/**组件自身拥有的事件 */
|
|
549
|
+
interface EventsType {
|
|
550
|
+
/**事件KEY */
|
|
551
|
+
name: string;
|
|
552
|
+
/**事件名 */
|
|
553
|
+
title: string;
|
|
554
|
+
/**事件参数 */
|
|
555
|
+
params: string[];
|
|
556
|
+
/**event是否隐藏逻辑 */
|
|
557
|
+
hidden?: (arg: Partial<BasicSchema> | Partial<LowCodeModal.Modal>) => boolean;
|
|
558
|
+
}
|
|
559
|
+
type RunCallback = Function;
|
|
560
|
+
type beforeCreate = Function;
|
|
561
|
+
type hooks<O = unknown> = IVue3DndItemHooks<O>;
|
|
562
|
+
type loopCallback = (widget: any, Fn: Function) => void;
|
|
563
|
+
/**设计页面配置信息 */
|
|
564
|
+
interface DesignerConfig {
|
|
565
|
+
basicProps?: {
|
|
566
|
+
/**隐藏key */
|
|
567
|
+
key_hidden?: boolean;
|
|
568
|
+
/**自定义key label */
|
|
569
|
+
key_label?: string;
|
|
570
|
+
/**隐藏别名 */
|
|
571
|
+
alias_hidden?: boolean;
|
|
572
|
+
/**自定义别名label */
|
|
573
|
+
alias_label?: string;
|
|
574
|
+
};
|
|
575
|
+
/**隐藏遮罩 */
|
|
576
|
+
hideMask?: boolean;
|
|
577
|
+
}
|
|
578
|
+
interface SearchSchema extends fieldWidgetSchema {
|
|
579
|
+
/** 组件名称 */
|
|
580
|
+
name: string;
|
|
581
|
+
/**组件类型 需和文件名一致 */
|
|
582
|
+
type: SearchComponents;
|
|
583
|
+
alias: string;
|
|
584
|
+
isSearchField: boolean;
|
|
585
|
+
materialType: MaterialEnum;
|
|
586
|
+
props: fieldWidgetSchema['props'] & {
|
|
587
|
+
defaultValue: any;
|
|
588
|
+
placeholder: string;
|
|
589
|
+
ope: SEARCH_SEVICE[];
|
|
590
|
+
/**是否区间搜索 */
|
|
591
|
+
isRang?: boolean;
|
|
592
|
+
/**是否启用了其他选项 */
|
|
593
|
+
useMore?: SEARCH_SEVICE | '';
|
|
594
|
+
bindModelKey?: string;
|
|
595
|
+
modelKey?: string;
|
|
596
|
+
readonly: boolean;
|
|
597
|
+
diaabled: boolean;
|
|
598
|
+
};
|
|
599
|
+
formItem: boolean;
|
|
600
|
+
}
|
|
601
|
+
interface PageVars {
|
|
602
|
+
id: string;
|
|
603
|
+
key: string;
|
|
604
|
+
varInfo: {
|
|
605
|
+
key: string;
|
|
606
|
+
type: GLOBAL_VAR_TYPE;
|
|
607
|
+
defaultValue?: string;
|
|
608
|
+
description: string;
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
export interface fieldWidgetSchema {
|
|
613
|
+
/** 组件唯一标识 */
|
|
614
|
+
id: string;
|
|
615
|
+
/**i18n字段 */
|
|
616
|
+
i18n: Record<string, string>;
|
|
617
|
+
props: {
|
|
618
|
+
/**字段key */
|
|
619
|
+
field: string;
|
|
620
|
+
/**字段id */
|
|
621
|
+
fieldId: string;
|
|
622
|
+
/**字段类型 */
|
|
623
|
+
fieldType?: FIELD_TYPE;
|
|
624
|
+
/**字段名称 */
|
|
625
|
+
label: string;
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
export interface validateRule {
|
|
629
|
+
ruleName: string;
|
|
630
|
+
field: string;
|
|
631
|
+
ruleType: VERIFICATIONCONDITIONS_TYPE.JS;
|
|
632
|
+
trigger?: 'change' | 'bulr';
|
|
633
|
+
message?: string;
|
|
634
|
+
jsName?: string;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* 拖拽项钩子
|
|
638
|
+
*
|
|
639
|
+
* @export
|
|
640
|
+
* @interface IVue3DndItemHooks
|
|
641
|
+
* @template O
|
|
642
|
+
*/
|
|
643
|
+
export interface IVue3DndItemHooks<O = LowCodeWidget.BasicSchema> {
|
|
644
|
+
/**
|
|
645
|
+
* 放置钩子
|
|
646
|
+
*
|
|
647
|
+
* @param {IDesignerController} c
|
|
648
|
+
* @param {('create' | 'move')} mode
|
|
649
|
+
* @param {O[]} parentWidgets
|
|
650
|
+
* @param {O[]} items
|
|
651
|
+
* @param {O} item
|
|
652
|
+
* @returns {*} {(Promise<O | null>)}
|
|
653
|
+
*/
|
|
654
|
+
drop?(c: IDesignerController, mode: 'create' | 'move', parentWidgets: O[], items: O[], item: O): Promise<O | null>;
|
|
655
|
+
}
|