@gct-paas/schema 0.1.4-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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/index.esm.min.mjs +95 -0
- package/dist/index.min.cjs +1 -0
- package/dist/index.system.min.js +1 -0
- package/es/index.d.ts +7 -0
- package/es/index.mjs +9 -0
- package/es/interface/designer.d.ts +96 -0
- package/es/interface/index.d.ts +3 -0
- package/es/interface/modal/i-modal-body.d.ts +15 -0
- package/es/interface/modal/i-modal-bottom-button.d.ts +15 -0
- package/es/interface/modal/i-modal-footer.d.ts +15 -0
- package/es/interface/modal/i-modal-props.d.ts +26 -0
- package/es/interface/modal/i-modal.d.ts +52 -0
- package/es/interface/modal/index.d.ts +17 -0
- package/es/interface/widget/i-common.d.ts +42 -0
- package/es/interface/widget/i-editors.d.ts +239 -0
- package/es/interface/widget/i-events.d.ts +62 -0
- package/es/interface/widget/i-hooks-and-misc.d.ts +58 -0
- package/es/interface/widget/i-props.d.ts +186 -0
- package/es/interface/widget/i-schemas.d.ts +127 -0
- package/es/interface/widget/i-styles.d.ts +113 -0
- package/es/interface/widget/index.d.ts +46 -0
- package/es/schema/common-config/common-style.d.ts +3 -0
- package/es/schema/common-config/common-style.mjs +85 -0
- package/es/schema/index.d.ts +1 -0
- package/es/types/index.d.ts +1 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/schema/index.d.ts +11 -0
- package/es/utils/schema/index.mjs +7 -0
- package/package.json +62 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { EventCategory, INNER_EVENT } from '@gct-paas/core';
|
|
2
|
+
import { IBasicSchema } from './i-schemas';
|
|
3
|
+
import { LowCodeModal } from '../modal';
|
|
4
|
+
/**
|
|
5
|
+
* 已选中配置的事件 Schema
|
|
6
|
+
*
|
|
7
|
+
* @type IBasicEvents
|
|
8
|
+
*/
|
|
9
|
+
export type IBasicEvents = Record<string, IJsEvent | IInnerEvents[] | ILoInterface>;
|
|
10
|
+
/**
|
|
11
|
+
* JS脚本事件
|
|
12
|
+
*
|
|
13
|
+
* @interface IJsEvent
|
|
14
|
+
*/
|
|
15
|
+
export interface IJsEvent {
|
|
16
|
+
/** 事件类型:脚本逻辑 */
|
|
17
|
+
type?: EventCategory.JS;
|
|
18
|
+
/** JS方法名称 */
|
|
19
|
+
name: string;
|
|
20
|
+
/** event额外参数 */
|
|
21
|
+
extraParams: Record<string, any> | string | number | boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 内部事件
|
|
25
|
+
*
|
|
26
|
+
* @interface IInnerEvents
|
|
27
|
+
*/
|
|
28
|
+
export interface IInnerEvents {
|
|
29
|
+
name: INNER_EVENT;
|
|
30
|
+
title: string;
|
|
31
|
+
key: string;
|
|
32
|
+
refId?: string;
|
|
33
|
+
scopeId?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* 编排逻辑事件
|
|
37
|
+
*
|
|
38
|
+
* @interface ILoInterface
|
|
39
|
+
*/
|
|
40
|
+
export interface ILoInterface {
|
|
41
|
+
/** 事件类型:编排逻辑 */
|
|
42
|
+
type: EventCategory.LO;
|
|
43
|
+
/** JS方法名称 */
|
|
44
|
+
name: string;
|
|
45
|
+
/** event额外参数 */
|
|
46
|
+
extraParams: Record<string, any> | string | number | boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 组件自身拥有的事件
|
|
50
|
+
*
|
|
51
|
+
* @interface IEventsType
|
|
52
|
+
*/
|
|
53
|
+
export interface IEventsType {
|
|
54
|
+
/** 事件KEY */
|
|
55
|
+
name: string;
|
|
56
|
+
/** 事件名 */
|
|
57
|
+
title: string;
|
|
58
|
+
/** 事件参数 */
|
|
59
|
+
params: string[];
|
|
60
|
+
/** event是否隐藏逻辑 */
|
|
61
|
+
hidden?: (arg: Partial<IBasicSchema> | Partial<LowCodeModal.Modal>) => boolean;
|
|
62
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { GLOBAL_VAR_TYPE } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* 运行回调
|
|
4
|
+
*
|
|
5
|
+
* @type RunCallback
|
|
6
|
+
*/
|
|
7
|
+
export type RunCallback = Function;
|
|
8
|
+
/**
|
|
9
|
+
* 创建前钩子
|
|
10
|
+
*
|
|
11
|
+
* @type beforeCreate
|
|
12
|
+
*/
|
|
13
|
+
export type beforeCreate = Function;
|
|
14
|
+
/**
|
|
15
|
+
* 新版本拖拽设计钩子,2024年11月4日15:56:37
|
|
16
|
+
*
|
|
17
|
+
* @type hooks
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* 循环回调
|
|
21
|
+
*
|
|
22
|
+
* @type loopCallback
|
|
23
|
+
*/
|
|
24
|
+
export type loopCallback = (widget: any, Fn: Function) => void;
|
|
25
|
+
/**
|
|
26
|
+
* 设计页面配置信息
|
|
27
|
+
*
|
|
28
|
+
* @interface IDesignerConfig
|
|
29
|
+
*/
|
|
30
|
+
export interface IDesignerConfig {
|
|
31
|
+
basicProps?: {
|
|
32
|
+
/** 隐藏key */
|
|
33
|
+
key_hidden?: boolean;
|
|
34
|
+
/** 自定义key label */
|
|
35
|
+
key_label?: string;
|
|
36
|
+
/** 隐藏别名 */
|
|
37
|
+
alias_hidden?: boolean;
|
|
38
|
+
/** 自定义别名label */
|
|
39
|
+
alias_label?: string;
|
|
40
|
+
};
|
|
41
|
+
/** 隐藏遮罩 */
|
|
42
|
+
hideMask?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 页面变量
|
|
46
|
+
*
|
|
47
|
+
* @interface IPageVars
|
|
48
|
+
*/
|
|
49
|
+
export interface IPageVars {
|
|
50
|
+
id: string;
|
|
51
|
+
key: string;
|
|
52
|
+
varInfo: {
|
|
53
|
+
key: string;
|
|
54
|
+
type: GLOBAL_VAR_TYPE;
|
|
55
|
+
defaultValue?: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { FieldMetaDTO } from '@gct-paas/api/apaas';
|
|
2
|
+
import { DisplayType, Dependency_ENUM, ASSIGNMENTSTRATEGY_ENUM, EntityModelCategoryEnum, EntityModelTypeEnum, FIELD_TYPE, UniqueConstraintType } from '@gct-paas/core';
|
|
3
|
+
/**
|
|
4
|
+
* BasicSchema中的组件prop
|
|
5
|
+
*
|
|
6
|
+
* @type ICommonProps
|
|
7
|
+
*/
|
|
8
|
+
export type ICommonProps = Record<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* 所有组件的Prop基类
|
|
11
|
+
*
|
|
12
|
+
* @type IWidgetProps
|
|
13
|
+
*/
|
|
14
|
+
export type IWidgetProps = IDisplayProps;
|
|
15
|
+
/**
|
|
16
|
+
* 布局组件Prop Schema
|
|
17
|
+
*
|
|
18
|
+
* @type ILayoutProps
|
|
19
|
+
*/
|
|
20
|
+
export type ILayoutProps = IWidgetProps;
|
|
21
|
+
/**
|
|
22
|
+
* 显隐的Props
|
|
23
|
+
*
|
|
24
|
+
* @interface IDisplayProps
|
|
25
|
+
*/
|
|
26
|
+
export interface IDisplayProps {
|
|
27
|
+
/** 显隐配置-隐藏开关 */
|
|
28
|
+
hidden: boolean;
|
|
29
|
+
/** 显隐配置-显隐控制 */
|
|
30
|
+
displayType?: DisplayType;
|
|
31
|
+
/** 显隐配置-显隐控制内容 */
|
|
32
|
+
displayRule?: string;
|
|
33
|
+
/** 模型信息 */
|
|
34
|
+
modeldata?: {
|
|
35
|
+
/** 模型类型 基础/版本/树 等等 */
|
|
36
|
+
modelType?: EntityModelTypeEnum;
|
|
37
|
+
/** 模型大类 */
|
|
38
|
+
modelCategory?: EntityModelCategoryEnum;
|
|
39
|
+
/** 1表示子表 0表示主表 */
|
|
40
|
+
subModel?: 0 | 1;
|
|
41
|
+
/** 1表示流程模型 */
|
|
42
|
+
supportProcess?: 0 | 1;
|
|
43
|
+
};
|
|
44
|
+
/** 组件依赖 */
|
|
45
|
+
componentDependency: {
|
|
46
|
+
/** 组件依赖排序 */
|
|
47
|
+
sortDependency: Dependency_ENUM[];
|
|
48
|
+
/** 组件依赖配置 */
|
|
49
|
+
configDependency: IDependency;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 组件依赖
|
|
54
|
+
*
|
|
55
|
+
* @interface IDependency
|
|
56
|
+
*/
|
|
57
|
+
export interface IDependency {
|
|
58
|
+
[Dependency_ENUM.HIDDEN]: {
|
|
59
|
+
expression?: string;
|
|
60
|
+
value?: boolean;
|
|
61
|
+
};
|
|
62
|
+
/** 只读 */
|
|
63
|
+
[Dependency_ENUM.READONLY]: {
|
|
64
|
+
expression?: string;
|
|
65
|
+
value?: boolean;
|
|
66
|
+
/** 字段组件上的配置信息 */
|
|
67
|
+
fieldValue?: boolean;
|
|
68
|
+
};
|
|
69
|
+
/** 禁用 */
|
|
70
|
+
[Dependency_ENUM.DISABLED]: {
|
|
71
|
+
expression?: string;
|
|
72
|
+
value?: boolean;
|
|
73
|
+
};
|
|
74
|
+
/** 必填 */
|
|
75
|
+
[Dependency_ENUM.REQUIRED]: {
|
|
76
|
+
expression?: string;
|
|
77
|
+
value?: boolean;
|
|
78
|
+
/** 字段组件上的配置信息 */
|
|
79
|
+
fieldValue?: boolean;
|
|
80
|
+
};
|
|
81
|
+
[Dependency_ENUM.ASSIGNMENT]: {
|
|
82
|
+
expression?: string;
|
|
83
|
+
strategy?: ASSIGNMENTSTRATEGY_ENUM;
|
|
84
|
+
value?: boolean;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 表单组件Prop Schema
|
|
89
|
+
*
|
|
90
|
+
* @interface IFormItemProps
|
|
91
|
+
* @extends {IWidgetProps}
|
|
92
|
+
*/
|
|
93
|
+
export interface IFormItemProps extends IWidgetProps {
|
|
94
|
+
/** 字段key */
|
|
95
|
+
field: string;
|
|
96
|
+
/** 字段名称 */
|
|
97
|
+
fieldName?: string;
|
|
98
|
+
/** 字段id */
|
|
99
|
+
fieldId: string;
|
|
100
|
+
/** 字段类型 */
|
|
101
|
+
fieldType?: FIELD_TYPE;
|
|
102
|
+
/** 字段链路 */
|
|
103
|
+
fieldCodeChain?: string;
|
|
104
|
+
/** 是否是模型关联字段, 模型关联字段的字段key */
|
|
105
|
+
bindFieldKey?: string;
|
|
106
|
+
/** 是否是模型关联字段 */
|
|
107
|
+
isFieldModel?: boolean;
|
|
108
|
+
/** 自定义名称 */
|
|
109
|
+
label: string;
|
|
110
|
+
/** 显示标题 */
|
|
111
|
+
displayLabelText?: boolean;
|
|
112
|
+
/** 暗提示 */
|
|
113
|
+
placeholder?: string;
|
|
114
|
+
/** 默认值 */
|
|
115
|
+
defaultValue?: any;
|
|
116
|
+
/** 必填 */
|
|
117
|
+
required?: boolean;
|
|
118
|
+
/** 新建字段那边配置的必填 */
|
|
119
|
+
fieldRequired?: boolean;
|
|
120
|
+
/** 只读 */
|
|
121
|
+
readonly?: boolean;
|
|
122
|
+
/** 字段只读 */
|
|
123
|
+
fieldReadonly?: boolean;
|
|
124
|
+
/** 禁用 */
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
/** 可清空 */
|
|
127
|
+
clearable?: boolean;
|
|
128
|
+
/** 获取焦点 */
|
|
129
|
+
getFocus?: boolean;
|
|
130
|
+
/** 显示说明开关 */
|
|
131
|
+
showExplain?: boolean;
|
|
132
|
+
/** 显示说明文案 */
|
|
133
|
+
explain?: string;
|
|
134
|
+
/** 正则校验开关 */
|
|
135
|
+
regSwitch?: boolean;
|
|
136
|
+
/** 正则校验提示文案 */
|
|
137
|
+
regHint?: string;
|
|
138
|
+
/** 正则校验内容 */
|
|
139
|
+
reg?: string;
|
|
140
|
+
/** 显隐配置-隐藏时提交开关 */
|
|
141
|
+
notSubmitInHide?: boolean;
|
|
142
|
+
/** 绑定组件样式选择类型 */
|
|
143
|
+
bindCompStyleType?: string;
|
|
144
|
+
/** 所属表单的模型key */
|
|
145
|
+
modelKey: string;
|
|
146
|
+
/** 关联字段所关联的模型 */
|
|
147
|
+
bindModelKey?: string;
|
|
148
|
+
/** 内嵌搜索 */
|
|
149
|
+
embeddedSearch?: boolean;
|
|
150
|
+
/** 自定义显示字段 */
|
|
151
|
+
isCustomField?: boolean;
|
|
152
|
+
maxlength?: number;
|
|
153
|
+
minlength?: number;
|
|
154
|
+
/** 唯一类型 */
|
|
155
|
+
uniqueConstraintType?: UniqueConstraintType;
|
|
156
|
+
/** 是否关闭校验 */
|
|
157
|
+
closeValidator?: boolean;
|
|
158
|
+
/** 预置字段 不可删除 */
|
|
159
|
+
_preset?: boolean;
|
|
160
|
+
/** 关闭自动修复错误数字 */
|
|
161
|
+
notAutoFix?: boolean;
|
|
162
|
+
/** 最大值 */
|
|
163
|
+
maxValue?: any;
|
|
164
|
+
/** 最小值 */
|
|
165
|
+
minValue?: any;
|
|
166
|
+
/** 关联引用下模型的字段的链路 */
|
|
167
|
+
bindFieldLink?: string[];
|
|
168
|
+
/** 关联引用下模型依赖的字段 */
|
|
169
|
+
refOriginField?: string;
|
|
170
|
+
/** 关联引用下模型依赖的初始字段的模型 */
|
|
171
|
+
refOriginModelKey?: string;
|
|
172
|
+
/** 关联引用下模型依赖的初始字段的字段类型 */
|
|
173
|
+
refOriginFieldType?: FIELD_TYPE;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* 字段到属性映射
|
|
177
|
+
*
|
|
178
|
+
* @interface IFieldToProp
|
|
179
|
+
*/
|
|
180
|
+
export interface IFieldToProp {
|
|
181
|
+
/** 模型建模中字段 */
|
|
182
|
+
from: keyof FieldMetaDTO;
|
|
183
|
+
/** 组件PROP中的字段 */
|
|
184
|
+
to: keyof IFormItemProps | string;
|
|
185
|
+
transform?: (arg: any) => any;
|
|
186
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { CategoryTypeEnum, Platform, FormComponents, DisplayEnums, MaterialEnum, SearchComponents, SEARCH_SEVICE, FIELD_TYPE } from '@gct-paas/core';
|
|
2
|
+
import { IBasicStyle } from './i-styles';
|
|
3
|
+
import { ICommonProps, IWidgetProps, IFormItemProps } from './i-props';
|
|
4
|
+
import { IBasicEvents } from './i-events';
|
|
5
|
+
/**
|
|
6
|
+
* 单个组件节点描述
|
|
7
|
+
*
|
|
8
|
+
* @interface IBasicSchema
|
|
9
|
+
*/
|
|
10
|
+
export interface IBasicSchema {
|
|
11
|
+
/** 组件唯一标识 */
|
|
12
|
+
id: string;
|
|
13
|
+
/** 显示设备 */
|
|
14
|
+
platform: Platform;
|
|
15
|
+
/** 组件tag标识 */
|
|
16
|
+
categoryType?: CategoryTypeEnum;
|
|
17
|
+
/** 别名 */
|
|
18
|
+
alias: string;
|
|
19
|
+
/** 组件名称 */
|
|
20
|
+
name: string;
|
|
21
|
+
/** 自定义展示组件的名字 */
|
|
22
|
+
compName?: string;
|
|
23
|
+
/** 自定义展示组件key的名字 */
|
|
24
|
+
compKey?: string;
|
|
25
|
+
/** 组件类型 需和文件名一致 */
|
|
26
|
+
type: FormComponents | string;
|
|
27
|
+
/** icon, 配置组件库使用 */
|
|
28
|
+
icon: string;
|
|
29
|
+
/** 子集, 仅布局组件使用 */
|
|
30
|
+
children?: any[];
|
|
31
|
+
/** 是否可显示, 配置组件库使用 */
|
|
32
|
+
internal?: boolean;
|
|
33
|
+
/** 描述 */
|
|
34
|
+
description?: string;
|
|
35
|
+
/** 样式 */
|
|
36
|
+
style: Partial<IBasicStyle>;
|
|
37
|
+
/** 组件属性 */
|
|
38
|
+
props: ICommonProps & IWidgetProps;
|
|
39
|
+
/** 事件 */
|
|
40
|
+
events: IBasicEvents;
|
|
41
|
+
/** 表单组件 */
|
|
42
|
+
formItem?: boolean;
|
|
43
|
+
/** 布局 块级 行内 */
|
|
44
|
+
display?: DisplayEnums;
|
|
45
|
+
/** 菜单别名 */
|
|
46
|
+
displayName?: string;
|
|
47
|
+
/** i18n字段 */
|
|
48
|
+
i18n?: Record<string, string>;
|
|
49
|
+
/** 是否是字段类型 */
|
|
50
|
+
isField?: boolean;
|
|
51
|
+
/** 字段组件类型使用场景 */
|
|
52
|
+
materialType?: MaterialEnum;
|
|
53
|
+
/** 字段所属位置 */
|
|
54
|
+
preLocation?: string;
|
|
55
|
+
/** 排除的样式属性 */
|
|
56
|
+
ignoringStyle?: string[];
|
|
57
|
+
/** 是否是自读组件,自读则不会有hover和点击选中组件的行为 */
|
|
58
|
+
isReadonlyWidget?: boolean;
|
|
59
|
+
/** 部分组件嵌套在某个父组件内部 */
|
|
60
|
+
parentComponent?: FormComponents;
|
|
61
|
+
/** 如果是插件,此处是拖入时插件的配置信息 */
|
|
62
|
+
_plugin?: IObject;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 字段类型组件
|
|
66
|
+
*
|
|
67
|
+
* @interface IFieldSchema
|
|
68
|
+
* @extends {IBasicSchema}
|
|
69
|
+
*/
|
|
70
|
+
export interface IFieldSchema extends IBasicSchema {
|
|
71
|
+
props: IFormItemProps & IWidgetProps;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 包装组件配置参数
|
|
75
|
+
*
|
|
76
|
+
* @interface IWrapperCmpConfigParams
|
|
77
|
+
*/
|
|
78
|
+
export interface IWrapperCmpConfigParams {
|
|
79
|
+
/** 组件基础配置 */
|
|
80
|
+
data: any;
|
|
81
|
+
/** 是否是移动端 */
|
|
82
|
+
isMobile: boolean;
|
|
83
|
+
/** 平台 */
|
|
84
|
+
platform: Platform;
|
|
85
|
+
/** 调用方传入的其他状态 */
|
|
86
|
+
otherState: Record<string, any>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 搜索组件类型
|
|
90
|
+
*
|
|
91
|
+
* @interface ISearchSchema
|
|
92
|
+
*/
|
|
93
|
+
export interface ISearchSchema {
|
|
94
|
+
/** 组件唯一标识 */
|
|
95
|
+
id: string;
|
|
96
|
+
/** i18n字段 */
|
|
97
|
+
i18n: Record<string, string>;
|
|
98
|
+
/** 组件名称 */
|
|
99
|
+
name: string;
|
|
100
|
+
/** 组件类型 需和文件名一致 */
|
|
101
|
+
type: SearchComponents;
|
|
102
|
+
alias: string;
|
|
103
|
+
isSearchField: boolean;
|
|
104
|
+
materialType: MaterialEnum;
|
|
105
|
+
props: {
|
|
106
|
+
/** 字段key */
|
|
107
|
+
field: string;
|
|
108
|
+
/** 字段id */
|
|
109
|
+
fieldId: string;
|
|
110
|
+
/** 字段类型 */
|
|
111
|
+
fieldType?: FIELD_TYPE;
|
|
112
|
+
/** 字段名称 */
|
|
113
|
+
label: string;
|
|
114
|
+
defaultValue: any;
|
|
115
|
+
placeholder: string;
|
|
116
|
+
ope: SEARCH_SEVICE[];
|
|
117
|
+
/** 是否区间搜索 */
|
|
118
|
+
isRang?: boolean;
|
|
119
|
+
/** 是否启用了其他选项 */
|
|
120
|
+
useMore?: SEARCH_SEVICE | '';
|
|
121
|
+
bindModelKey?: string;
|
|
122
|
+
modelKey?: string;
|
|
123
|
+
readonly: boolean;
|
|
124
|
+
diaabled: boolean;
|
|
125
|
+
};
|
|
126
|
+
formItem: boolean;
|
|
127
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { TextDecoration, TagTypeEnum, ProgressTypeEnum, tableColumnWidthEnum, tagEnum } from '@gct-paas/core';
|
|
2
|
+
/**
|
|
3
|
+
* Font样式
|
|
4
|
+
*
|
|
5
|
+
* @interface IFontStyle
|
|
6
|
+
*/
|
|
7
|
+
export interface IFontStyle {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
bold: boolean;
|
|
10
|
+
italic: boolean;
|
|
11
|
+
textDecoration: TextDecoration;
|
|
12
|
+
color: string;
|
|
13
|
+
align: 'left' | 'right';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 组件只读时开启标签配置的样式
|
|
17
|
+
*
|
|
18
|
+
* @interface ITagConfigStyle
|
|
19
|
+
*/
|
|
20
|
+
export interface ITagConfigStyle {
|
|
21
|
+
color?: string;
|
|
22
|
+
tagType?: TagTypeEnum;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 组件只读时开启进度条配置的样式
|
|
26
|
+
*
|
|
27
|
+
* @interface IProgressConfigStyle
|
|
28
|
+
*/
|
|
29
|
+
export interface IProgressConfigStyle {
|
|
30
|
+
color: string;
|
|
31
|
+
tagType: ProgressTypeEnum;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 边框样式
|
|
35
|
+
*
|
|
36
|
+
* @interface IBorderStyle
|
|
37
|
+
*/
|
|
38
|
+
export interface IBorderStyle {
|
|
39
|
+
borderWidth: string;
|
|
40
|
+
borderStyle: string;
|
|
41
|
+
borderColor: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* 表格列字体样式规则
|
|
45
|
+
*
|
|
46
|
+
* @interface IColumnFontStyleByRule
|
|
47
|
+
*/
|
|
48
|
+
export interface IColumnFontStyleByRule {
|
|
49
|
+
displayRule: string;
|
|
50
|
+
contentFont: IFontStyle;
|
|
51
|
+
tagStyle: ITagConfigStyle;
|
|
52
|
+
progressStyle: IProgressConfigStyle;
|
|
53
|
+
tagType: tagEnum;
|
|
54
|
+
tagStyleOpen: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 表格列背景规则
|
|
58
|
+
*
|
|
59
|
+
* @interface IColumnBackgroundByRule
|
|
60
|
+
*/
|
|
61
|
+
export interface IColumnBackgroundByRule {
|
|
62
|
+
displayRule: string;
|
|
63
|
+
backgroundColor?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 样式Schema
|
|
67
|
+
*
|
|
68
|
+
* @interface IBasicStyle
|
|
69
|
+
*/
|
|
70
|
+
export interface IBasicStyle {
|
|
71
|
+
position?: string;
|
|
72
|
+
top?: string;
|
|
73
|
+
left?: string;
|
|
74
|
+
right?: string;
|
|
75
|
+
bottom?: string;
|
|
76
|
+
width?: string;
|
|
77
|
+
height?: string;
|
|
78
|
+
maxHeight?: string;
|
|
79
|
+
backgroundColor?: string;
|
|
80
|
+
marginAll?: string;
|
|
81
|
+
marginTop?: string;
|
|
82
|
+
marginRight?: string;
|
|
83
|
+
marginBottom?: string;
|
|
84
|
+
marginLeft?: string;
|
|
85
|
+
paddingAll?: string;
|
|
86
|
+
paddingTop?: string;
|
|
87
|
+
paddingRight?: string;
|
|
88
|
+
paddingBottom?: string;
|
|
89
|
+
paddingLeft?: string;
|
|
90
|
+
labelFont: IFontStyle;
|
|
91
|
+
contentFont: IFontStyle;
|
|
92
|
+
tagStyle: ITagConfigStyle;
|
|
93
|
+
tagStyleOpen: boolean;
|
|
94
|
+
borderAll: Partial<IBorderStyle>;
|
|
95
|
+
borderLeft: Partial<IBorderStyle>;
|
|
96
|
+
borderRight: Partial<IBorderStyle>;
|
|
97
|
+
borderBottom: Partial<IBorderStyle>;
|
|
98
|
+
borderTop: Partial<IBorderStyle>;
|
|
99
|
+
borderTopRightRadius?: string;
|
|
100
|
+
borderTopLeftRadius?: string;
|
|
101
|
+
borderBottomRightRadius?: string;
|
|
102
|
+
borderBottomLeftRadius?: string;
|
|
103
|
+
borderAllRadius?: string;
|
|
104
|
+
/** 表格列宽样式 */
|
|
105
|
+
columnwidthConfigure?: tableColumnWidthEnum;
|
|
106
|
+
/** 表格列宽 */
|
|
107
|
+
columnwidth?: number;
|
|
108
|
+
columnFontStyleByRule?: IColumnFontStyleByRule[];
|
|
109
|
+
columnBackgroundByRule?: IColumnBackgroundByRule[];
|
|
110
|
+
tableheight?: number;
|
|
111
|
+
/** 表格高度样式 */
|
|
112
|
+
tableheightConfigure?: tableColumnWidthEnum;
|
|
113
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { IBasicSchema, IFieldSchema, ISearchSchema, IWrapperCmpConfigParams as IWrapperCmpConfigParamsSelf } from './i-schemas';
|
|
2
|
+
import { ICommonProps, IWidgetProps, IDisplayProps, IFormItemProps, ILayoutProps, IDependency, IFieldToProp } from './i-props';
|
|
3
|
+
import { IBasicStyle, IFontStyle, IBorderStyle, ITagConfigStyle, IProgressConfigStyle, IColumnFontStyleByRule, IColumnBackgroundByRule } from './i-styles';
|
|
4
|
+
import { IBasicEvents, IJsEvent, IInnerEvents, ILoInterface, IEventsType } from './i-events';
|
|
5
|
+
import { IStyleEditor, IStyleEditorConfig, IPropEditor, IPropEditorConfig } from './i-editors';
|
|
6
|
+
import { IDesignerConfig, IPageVars, RunCallback as RunCallbackSelf, beforeCreate as beforeCreateSelf, loopCallback as loopCallbackSelf } from './i-hooks-and-misc';
|
|
7
|
+
export type * from './i-common';
|
|
8
|
+
/**
|
|
9
|
+
* 低代码组件命名空间
|
|
10
|
+
*
|
|
11
|
+
* 包含所有低代码组件相关的类型定义
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace LowCodeWidget {
|
|
14
|
+
type BasicSchema = IBasicSchema;
|
|
15
|
+
type FieldSchema = IFieldSchema;
|
|
16
|
+
type SearchSchema = ISearchSchema;
|
|
17
|
+
type IWrapperCmpConfigParams = IWrapperCmpConfigParamsSelf;
|
|
18
|
+
type CommonProps = ICommonProps;
|
|
19
|
+
type WidgetProps = IWidgetProps;
|
|
20
|
+
type DisplayProps = IDisplayProps;
|
|
21
|
+
type FormItemProps = IFormItemProps;
|
|
22
|
+
type LayoutProps = ILayoutProps;
|
|
23
|
+
type Dependency = IDependency;
|
|
24
|
+
type FieldToProp = IFieldToProp;
|
|
25
|
+
type BasicStyle = IBasicStyle;
|
|
26
|
+
type FontStyle = IFontStyle;
|
|
27
|
+
type BorderStyle = IBorderStyle;
|
|
28
|
+
type TagConfigStyle = ITagConfigStyle;
|
|
29
|
+
type ProgressConfigStyle = IProgressConfigStyle;
|
|
30
|
+
type columnFontStyleByRule = IColumnFontStyleByRule;
|
|
31
|
+
type columnBackgroundByRule = IColumnBackgroundByRule;
|
|
32
|
+
type BasicEvents = IBasicEvents;
|
|
33
|
+
type JsEvent = IJsEvent;
|
|
34
|
+
type InnerEvents = IInnerEvents;
|
|
35
|
+
type LoInterface = ILoInterface;
|
|
36
|
+
type EventsType = IEventsType;
|
|
37
|
+
type StyleEditor = IStyleEditor;
|
|
38
|
+
type StyleEditorConfig = IStyleEditorConfig;
|
|
39
|
+
type PropEditor = IPropEditor;
|
|
40
|
+
type PropEditorConfig = IPropEditorConfig;
|
|
41
|
+
type RunCallback = RunCallbackSelf;
|
|
42
|
+
type beforeCreate = beforeCreateSelf;
|
|
43
|
+
type loopCallback = loopCallbackSelf;
|
|
44
|
+
type DesignerConfig = IDesignerConfig;
|
|
45
|
+
type PageVars = IPageVars;
|
|
46
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { BorderStyle, TagTypeEnum, TextDecoration } from '@gct-paas/core';
|
|
2
|
+
|
|
3
|
+
const commonStyle = {
|
|
4
|
+
position: "",
|
|
5
|
+
top: "",
|
|
6
|
+
left: "",
|
|
7
|
+
right: "",
|
|
8
|
+
bottom: "",
|
|
9
|
+
width: "",
|
|
10
|
+
height: "",
|
|
11
|
+
backgroundColor: "",
|
|
12
|
+
marginAll: "",
|
|
13
|
+
marginTop: "",
|
|
14
|
+
marginRight: "",
|
|
15
|
+
marginBottom: "",
|
|
16
|
+
marginLeft: "",
|
|
17
|
+
paddingAll: "",
|
|
18
|
+
paddingTop: "",
|
|
19
|
+
paddingRight: "",
|
|
20
|
+
paddingBottom: "",
|
|
21
|
+
paddingLeft: "",
|
|
22
|
+
labelFont: {
|
|
23
|
+
align: "left",
|
|
24
|
+
fontSize: "",
|
|
25
|
+
bold: false,
|
|
26
|
+
italic: false,
|
|
27
|
+
textDecoration: TextDecoration.NONE,
|
|
28
|
+
color: ""
|
|
29
|
+
},
|
|
30
|
+
contentFont: {
|
|
31
|
+
align: "left",
|
|
32
|
+
fontSize: "",
|
|
33
|
+
bold: false,
|
|
34
|
+
italic: false,
|
|
35
|
+
textDecoration: TextDecoration.NONE,
|
|
36
|
+
color: ""
|
|
37
|
+
},
|
|
38
|
+
tagStyle: {
|
|
39
|
+
color: "",
|
|
40
|
+
tagType: TagTypeEnum.RADIUS
|
|
41
|
+
},
|
|
42
|
+
tagStyleOpen: false,
|
|
43
|
+
borderAll: {
|
|
44
|
+
borderStyle: BorderStyle.NONE,
|
|
45
|
+
borderColor: "#F0F0F0",
|
|
46
|
+
borderWidth: "1"
|
|
47
|
+
},
|
|
48
|
+
borderLeft: {
|
|
49
|
+
borderStyle: BorderStyle.NONE,
|
|
50
|
+
borderColor: "#F0F0F0",
|
|
51
|
+
borderWidth: "1"
|
|
52
|
+
},
|
|
53
|
+
borderRight: {
|
|
54
|
+
borderStyle: BorderStyle.NONE,
|
|
55
|
+
borderColor: "#F0F0F0",
|
|
56
|
+
borderWidth: "1"
|
|
57
|
+
},
|
|
58
|
+
borderBottom: {
|
|
59
|
+
borderStyle: BorderStyle.NONE,
|
|
60
|
+
borderColor: "#F0F0F0",
|
|
61
|
+
borderWidth: "1"
|
|
62
|
+
},
|
|
63
|
+
borderTop: {
|
|
64
|
+
borderStyle: BorderStyle.NONE,
|
|
65
|
+
borderColor: "#F0F0F0",
|
|
66
|
+
borderWidth: "1"
|
|
67
|
+
},
|
|
68
|
+
borderTopRightRadius: "0",
|
|
69
|
+
borderTopLeftRadius: "0",
|
|
70
|
+
borderBottomRightRadius: "0",
|
|
71
|
+
borderBottomLeftRadius: "0",
|
|
72
|
+
borderAllRadius: "0"
|
|
73
|
+
};
|
|
74
|
+
const notNeedPxStyle = [
|
|
75
|
+
"position",
|
|
76
|
+
"backgroundColor",
|
|
77
|
+
"bold",
|
|
78
|
+
"italic",
|
|
79
|
+
"textDecoration",
|
|
80
|
+
"color",
|
|
81
|
+
"borderStyle",
|
|
82
|
+
"borderColor"
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
export { commonStyle, notNeedPxStyle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { commonStyle, notNeedPxStyle } from './common-config/common-style';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@gct-paas/core/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getCompPos } from './schema';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LowCodeWidget } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* 获取组件所属位置
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @param {LowCodeWidget.BasicSchema} widget
|
|
7
|
+
* @param {string} fieldType
|
|
8
|
+
* @param {string} componentType
|
|
9
|
+
* @return {*}
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCompPos(widget: LowCodeWidget.BasicSchema, fieldType: string, componentType: string): boolean;
|