@gct-paas/schema 0.1.4-dev.10

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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/index.esm.min.mjs +1250 -0
  4. package/dist/index.min.cjs +1 -0
  5. package/dist/index.system.min.js +1 -0
  6. package/es/constants/index.d.ts +14 -0
  7. package/es/constants/index.mjs +370 -0
  8. package/es/index.d.ts +8 -0
  9. package/es/index.mjs +20 -0
  10. package/es/interface/common/data-linkage-config.d.ts +17 -0
  11. package/es/interface/designer.d.ts +99 -0
  12. package/es/interface/index.d.ts +6 -0
  13. package/es/interface/modal/i-modal-body.d.ts +15 -0
  14. package/es/interface/modal/i-modal-bottom-button.d.ts +15 -0
  15. package/es/interface/modal/i-modal-footer.d.ts +15 -0
  16. package/es/interface/modal/i-modal-props.d.ts +26 -0
  17. package/es/interface/modal/i-modal.d.ts +52 -0
  18. package/es/interface/modal/index.d.ts +17 -0
  19. package/es/interface/schema/index.d.ts +2 -0
  20. package/es/interface/schema/widget-props/i-button-props.d.ts +170 -0
  21. package/es/interface/schema/widget-props/i-display-props.d.ts +48 -0
  22. package/es/interface/schema/widget-props/i-form-container-props.d.ts +77 -0
  23. package/es/interface/schema/widget-props/i-form-input-props.d.ts +409 -0
  24. package/es/interface/schema/widget-props/i-layout-props.d.ts +77 -0
  25. package/es/interface/schema/widget-props/i-search-widget-props.d.ts +126 -0
  26. package/es/interface/schema/widget-props/i-table-column-props.d.ts +54 -0
  27. package/es/interface/schema/widget-props/i-table-props.d.ts +384 -0
  28. package/es/interface/schema/widget-props/index.d.ts +8 -0
  29. package/es/interface/schema/widget-types.d.ts +370 -0
  30. package/es/interface/widget/i-common.d.ts +42 -0
  31. package/es/interface/widget/i-editors.d.ts +240 -0
  32. package/es/interface/widget/i-events.d.ts +55 -0
  33. package/es/interface/widget/i-hooks-and-misc.d.ts +59 -0
  34. package/es/interface/widget/i-props.d.ts +177 -0
  35. package/es/interface/widget/i-schemas.d.ts +135 -0
  36. package/es/interface/widget/i-styles.d.ts +114 -0
  37. package/es/interface/widget/index.d.ts +53 -0
  38. package/es/interface/widget-info/i-designer-item-hooks.d.ts +21 -0
  39. package/es/interface/widget-info/i-designer-schema-exports.d.ts +13 -0
  40. package/es/interface/widget-info/i-widget-info-item.d.ts +78 -0
  41. package/es/interface/widget-info/i-widget-info.d.ts +19 -0
  42. package/es/interface/widget-info/index.d.ts +4 -0
  43. package/es/schema/common-config/base-button-config.d.ts +3 -0
  44. package/es/schema/common-config/base-button-config.mjs +84 -0
  45. package/es/schema/common-config/button-editor-config.d.ts +4 -0
  46. package/es/schema/common-config/button-editor-config.mjs +206 -0
  47. package/es/schema/common-config/button-props-func.d.ts +5 -0
  48. package/es/schema/common-config/button-props-func.mjs +11 -0
  49. package/es/schema/common-config/common-field-editor-config.d.ts +10 -0
  50. package/es/schema/common-config/common-field-editor-config.mjs +61 -0
  51. package/es/schema/common-config/common-style.d.ts +3 -0
  52. package/es/schema/common-config/common-style.mjs +85 -0
  53. package/es/schema/common-config/display-editor-config.d.ts +3 -0
  54. package/es/schema/common-config/display-editor-config.mjs +89 -0
  55. package/es/schema/common-config/permission-editor-config.d.ts +2 -0
  56. package/es/schema/common-config/permission-editor-config.mjs +23 -0
  57. package/es/schema/index.d.ts +9 -0
  58. package/es/schema/modal/modal-body.d.ts +2 -0
  59. package/es/schema/modal/modal-body.mjs +9 -0
  60. package/es/schema/modal/modal-footer.d.ts +2 -0
  61. package/es/schema/modal/modal-footer.mjs +9 -0
  62. package/es/schema/modal/modal.d.ts +8 -0
  63. package/es/schema/modal/modal.mjs +182 -0
  64. package/es/types/index.d.ts +1 -0
  65. package/es/utils/index.d.ts +3 -0
  66. package/es/utils/schema/index.d.ts +45 -0
  67. package/es/utils/schema/index.mjs +49 -0
  68. package/es/utils/schema-style/index.d.ts +108 -0
  69. package/es/utils/schema-style/index.mjs +155 -0
  70. package/es/utils/widget-info/widget-info.d.ts +104 -0
  71. package/es/utils/widget-info/widget-info.mjs +76 -0
  72. package/package.json +63 -0
@@ -0,0 +1,370 @@
1
+ import { LowCodeModal, LowCodeWidget } from '..';
2
+ import { InputProps, UploadFileProps, FormProps, DescriptionsProps, DataTableProps, DataListProps, ButtonProps, SelectProps, RadioProps, NumberProps, DoubleProps, MoneyProps, DateTimeProps, TimeProps, DateProps, UserProps, DeptProps, SwitchProps, SearchProps, ExportProps, ProcessButtonProps, LayoutProps, GridProps, GridColProps, ColumnsProps, ButtonContainerProps, SubTableProps, WorkflowNodesProps, LabelPrintProps, TabsProps, RefDataTableProps, TabPaneProps, ReadonlyCmpProps, CustomFieldProps, OperateProps, OperateButtonProps, ColumnTableProps, FormulaProps, TableSelectProps, GenRadioProps, GenSwitchProps, EsopProps, ExpressionProps, AggProps, treeTableProps, BaseButtonProps, DynamicTableProps, TransactionProps, SerialRuleProps, SelectSearchProps, TextProps, CollapseProps, SpaceOccupationProps, PrinterProps, SignatureProps, OnlineFormProps, TmplTreeSelectProps, DocumentPrintProps, RangeUserProps, GenImageProps, IframeProps, SubDataTableProps, ResetButtonProps, FormProcessProps, ApprovalHistoryProps, FlowDiagramProps, approveButtonProps, ButtonProcessContainerProps, BizProcessProps, TableApproveButtonProps, CustomCodeProps, ApprovalProcessProps, DividerProps } from './widget-props';
3
+ import { FormComponents, DisplayEnums } from '@gct-paas/core';
4
+ import { LinkageItem } from '../common/data-linkage-config';
5
+ export interface Userpicker extends LowCodeWidget.BasicSchema {
6
+ props: UserProps;
7
+ }
8
+ export interface Department extends LowCodeWidget.BasicSchema {
9
+ props: DeptProps;
10
+ }
11
+ export interface Printer extends LowCodeWidget.BasicSchema {
12
+ props: PrinterProps;
13
+ }
14
+ export interface Signature extends LowCodeWidget.BasicSchema {
15
+ props: SignatureProps;
16
+ }
17
+ export interface TmplTreeSelect extends LowCodeWidget.BasicSchema {
18
+ props: TmplTreeSelectProps;
19
+ }
20
+ export interface OnlineForm extends LowCodeWidget.BasicSchema {
21
+ props: OnlineFormProps;
22
+ }
23
+ export interface RangeUser extends LowCodeWidget.BasicSchema {
24
+ props: RangeUserProps;
25
+ }
26
+ export interface Datepicker extends LowCodeWidget.BasicSchema {
27
+ props: DateProps;
28
+ }
29
+ export interface DateTimepicker extends LowCodeWidget.BasicSchema {
30
+ props: DateTimeProps;
31
+ }
32
+ export interface Timepicker extends LowCodeWidget.BasicSchema {
33
+ props: TimeProps;
34
+ }
35
+ export interface InputNumber extends LowCodeWidget.BasicSchema {
36
+ props: NumberProps;
37
+ }
38
+ export interface InputDouble extends LowCodeWidget.BasicSchema {
39
+ props: DoubleProps;
40
+ }
41
+ export interface InputMoney extends LowCodeWidget.BasicSchema {
42
+ props: MoneyProps;
43
+ }
44
+ export interface Checkbox extends LowCodeWidget.BasicSchema {
45
+ props: RadioProps;
46
+ }
47
+ export interface Radio extends LowCodeWidget.BasicSchema {
48
+ props: RadioProps;
49
+ }
50
+ export interface Select extends LowCodeWidget.BasicSchema {
51
+ props: SelectProps;
52
+ }
53
+ export interface Transaction extends LowCodeWidget.BasicSchema {
54
+ props: TransactionProps;
55
+ }
56
+ export interface Textarea extends LowCodeWidget.BasicSchema {
57
+ props: InputProps;
58
+ }
59
+ export interface Switch extends LowCodeWidget.BasicSchema {
60
+ props: SwitchProps;
61
+ }
62
+ export interface Input extends LowCodeWidget.BasicSchema {
63
+ props: InputProps;
64
+ }
65
+ export interface Form extends LowCodeWidget.BasicSchema {
66
+ props: FormProps;
67
+ }
68
+ export interface FormProcess extends LowCodeWidget.BasicSchema {
69
+ props: FormProcessProps;
70
+ }
71
+ export interface ApprovalHistory extends LowCodeWidget.BasicSchema {
72
+ props: ApprovalHistoryProps;
73
+ }
74
+ export interface FlowDiagram extends LowCodeWidget.BasicSchema {
75
+ props: FlowDiagramProps;
76
+ }
77
+ export interface Descriptions extends LowCodeWidget.BasicSchema {
78
+ props: DescriptionsProps;
79
+ }
80
+ export interface Search extends LowCodeWidget.BasicSchema {
81
+ props: SearchProps;
82
+ }
83
+ export interface RefDataTable extends DataTable {
84
+ props: RefDataTableProps;
85
+ }
86
+ export interface DataTable extends LowCodeWidget.BasicSchema {
87
+ props: DataTableProps;
88
+ children: [
89
+ OperateTable,
90
+ {
91
+ alias: string;
92
+ props: IData;
93
+ children: (FormulaTable | ColumnTable)[];
94
+ },
95
+ {
96
+ alias: string;
97
+ props: IData;
98
+ children: OperateButton[];
99
+ },
100
+ {
101
+ alias: string;
102
+ props: IData;
103
+ children: OperateButton[];
104
+ },
105
+ SubDataTable
106
+ ];
107
+ }
108
+ export interface TreeTable extends LowCodeWidget.BasicSchema {
109
+ props: treeTableProps;
110
+ children: [
111
+ OperateTable,
112
+ {
113
+ alias: string;
114
+ props: IData;
115
+ children: (FormulaTable | ColumnTable)[];
116
+ },
117
+ {
118
+ alias: string;
119
+ props: IData;
120
+ children: OperateButton[];
121
+ },
122
+ {
123
+ alias: string;
124
+ props: IData;
125
+ children: OperateButton[];
126
+ }
127
+ ];
128
+ }
129
+ export interface TreeTableMobile extends LowCodeWidget.BasicSchema {
130
+ props: treeTableProps;
131
+ children: (FormulaTable | ColumnTable)[];
132
+ }
133
+ export interface DataTableMobile extends LowCodeWidget.BasicSchema {
134
+ props: DataTableProps;
135
+ children: (FormulaTable | ColumnTable)[];
136
+ }
137
+ export interface FormulaTable extends LowCodeWidget.BasicSchema {
138
+ props: FormulaProps;
139
+ }
140
+ export interface OperateTable extends LowCodeWidget.BasicSchema {
141
+ props: OperateProps;
142
+ children: OperateButton[];
143
+ }
144
+ export interface OperateButton extends LowCodeWidget.BasicSchema {
145
+ props: OperateButtonProps;
146
+ }
147
+ export interface ColumnTable extends LowCodeWidget.BasicSchema {
148
+ props: ColumnTableProps;
149
+ children?: [LowCodeWidget.SearchSchema];
150
+ }
151
+ export interface DataList extends LowCodeWidget.BasicSchema {
152
+ props: DataListProps;
153
+ }
154
+ export interface Button extends LowCodeWidget.BasicSchema {
155
+ /**布局 块级 行内 */
156
+ display: DisplayEnums.INLINE_BLOCK;
157
+ props: ButtonProps;
158
+ }
159
+ export interface approveButton extends LowCodeWidget.BasicSchema {
160
+ props: approveButtonProps;
161
+ }
162
+ export interface TableApproveButton extends LowCodeWidget.BasicSchema {
163
+ props: TableApproveButtonProps;
164
+ }
165
+ export interface ResetButton extends LowCodeWidget.BasicSchema {
166
+ props: ResetButtonProps;
167
+ }
168
+ export interface BaseButton extends LowCodeWidget.BasicSchema {
169
+ /**布局 块级 行内 */
170
+ display: DisplayEnums.INLINE_BLOCK;
171
+ props: BaseButtonProps;
172
+ }
173
+ export interface LabelPrintButton extends LowCodeWidget.BasicSchema {
174
+ props: LabelPrintProps;
175
+ }
176
+ export interface DocumentPrintButton extends LowCodeWidget.BasicSchema {
177
+ props: DocumentPrintProps;
178
+ }
179
+ export interface ExportButton extends LowCodeWidget.BasicSchema {
180
+ props: ExportProps;
181
+ }
182
+ export interface ProcessButton extends LowCodeWidget.BasicSchema {
183
+ props: ProcessButtonProps;
184
+ }
185
+ export interface tabPane extends LowCodeWidget.BasicSchema {
186
+ props: TabPaneProps;
187
+ }
188
+ export interface Tabs extends LowCodeWidget.BasicSchema {
189
+ props: TabsProps;
190
+ children: tabPane[];
191
+ }
192
+ export interface LayoutContainer extends LowCodeWidget.BasicSchema {
193
+ display: DisplayEnums.BLOCK;
194
+ props: LayoutProps;
195
+ }
196
+ export interface ButtonContainer extends LowCodeWidget.BasicSchema {
197
+ props: ButtonContainerProps;
198
+ children: Button[];
199
+ }
200
+ export interface ButtonProcessContainer extends LowCodeWidget.BasicSchema {
201
+ props: ButtonProcessContainerProps;
202
+ children: approveButton[];
203
+ }
204
+ export interface Grid extends LowCodeWidget.BasicSchema {
205
+ props: GridProps;
206
+ children: GridCol[];
207
+ }
208
+ export interface GridCol extends LowCodeWidget.BasicSchema {
209
+ props: GridColProps;
210
+ }
211
+ export interface LayoutColumns extends LowCodeWidget.BasicSchema {
212
+ props: ColumnsProps;
213
+ }
214
+ export interface UploadFile extends LowCodeWidget.BasicSchema {
215
+ props: UploadFileProps;
216
+ }
217
+ export interface SubTable extends LowCodeWidget.BasicSchema {
218
+ props: SubTableProps;
219
+ children: [
220
+ LowCodeModal.Modal,
221
+ OperateTable,
222
+ ButtonContainer,
223
+ {
224
+ alias: string;
225
+ children: LowCodeWidget.FieldSchema[];
226
+ }
227
+ ];
228
+ }
229
+ export interface DynamicTable extends LowCodeWidget.BasicSchema {
230
+ props: DynamicTableProps;
231
+ children: [
232
+ LowCodeModal.Modal,
233
+ OperateTable,
234
+ ButtonContainer,
235
+ {
236
+ alias: string;
237
+ children: LowCodeWidget.FieldSchema[];
238
+ }
239
+ ];
240
+ }
241
+ export interface WorkflowNodes extends LowCodeWidget.BasicSchema {
242
+ props: WorkflowNodesProps;
243
+ }
244
+ export interface ReadonlyCmp extends LowCodeWidget.BasicSchema {
245
+ props: ReadonlyCmpProps;
246
+ }
247
+ export interface CustomField extends LowCodeWidget.BasicSchema {
248
+ props: CustomFieldProps;
249
+ }
250
+ export interface TableSelect extends LowCodeWidget.BasicSchema {
251
+ props: TableSelectProps;
252
+ children: [
253
+ Search,
254
+ {
255
+ alias: string;
256
+ children: LowCodeWidget.FieldSchema[];
257
+ },
258
+ OperateTable
259
+ ];
260
+ }
261
+ export interface GenCheckbox extends LowCodeWidget.BasicSchema {
262
+ props: GenRadioProps;
263
+ }
264
+ export interface GenRadio extends LowCodeWidget.BasicSchema {
265
+ props: GenRadioProps;
266
+ }
267
+ export interface GenSwitch extends LowCodeWidget.BasicSchema {
268
+ props: GenSwitchProps;
269
+ }
270
+ export interface ESOP extends LowCodeWidget.BasicSchema {
271
+ props: EsopProps;
272
+ }
273
+ export interface Expression extends LowCodeWidget.BasicSchema {
274
+ props: ExpressionProps;
275
+ }
276
+ export interface Agg extends LowCodeWidget.BasicSchema {
277
+ props: AggProps;
278
+ }
279
+ export interface SerialRule extends LowCodeWidget.BasicSchema {
280
+ props: SerialRuleProps;
281
+ }
282
+ export interface SelectSearch extends LowCodeWidget.BasicSchema {
283
+ props: SelectSearchProps;
284
+ children: ColumnTable[];
285
+ linkageField: LinkageItem[];
286
+ }
287
+ export interface Collapse extends LowCodeWidget.BasicSchema {
288
+ props: CollapseProps;
289
+ }
290
+ export interface SpaceOccupation extends LowCodeWidget.BasicSchema {
291
+ props: SpaceOccupationProps;
292
+ }
293
+ export interface Divider extends LowCodeWidget.BasicSchema {
294
+ props: DividerProps;
295
+ }
296
+ export interface Text extends LowCodeWidget.BasicSchema {
297
+ props: TextProps;
298
+ }
299
+ export interface GenImage extends LowCodeWidget.BasicSchema {
300
+ props: GenImageProps;
301
+ }
302
+ export interface BottomButtonContainer extends LowCodeWidget.BasicSchema {
303
+ props: ButtonContainerProps;
304
+ children: Button[];
305
+ }
306
+ export interface Iframe extends LowCodeWidget.BasicSchema {
307
+ props: IframeProps;
308
+ }
309
+ export interface CustomCode extends LowCodeWidget.BasicSchema {
310
+ props: CustomCodeProps;
311
+ }
312
+ export interface SubDataTable extends DataTable {
313
+ props: SubDataTableProps;
314
+ }
315
+ export interface BizProcess extends LowCodeWidget.BasicSchema {
316
+ props: BizProcessProps;
317
+ }
318
+ export interface ApprovalProcess extends LowCodeWidget.BasicSchema {
319
+ props: ApprovalProcessProps;
320
+ }
321
+ /**
322
+ * type 和 类型的映射关系
323
+ */
324
+ export interface Mapping {
325
+ [FormComponents.SubmitButton]: Button;
326
+ [FormComponents.ResetButton]: ResetButton;
327
+ [FormComponents.Checkbox]: Checkbox;
328
+ [FormComponents.DataTable]: DataTable;
329
+ [FormComponents.DataVTable]: DataTable;
330
+ [FormComponents.DateTimepicker]: DateTimepicker;
331
+ [FormComponents.Datepicker]: Datepicker;
332
+ [FormComponents.Department]: Department;
333
+ [FormComponents.Form]: Form;
334
+ [FormComponents.Input]: Input;
335
+ [FormComponents.Inputnumber]: InputNumber;
336
+ [FormComponents.InputDouble]: InputDouble;
337
+ [FormComponents.Inputmoney]: InputMoney;
338
+ [FormComponents.Radio]: Radio;
339
+ [FormComponents.Search]: Search;
340
+ [FormComponents.Select]: Select;
341
+ [FormComponents.Userpicker]: Userpicker;
342
+ [FormComponents.Timepicker]: Timepicker;
343
+ [FormComponents.Textarea]: Textarea;
344
+ [FormComponents.TabPane]: tabPane;
345
+ [FormComponents.Tabs]: Tabs;
346
+ [FormComponents.DataTableOpe]: OperateTable;
347
+ [FormComponents.OpeButton]: OperateButton;
348
+ [FormComponents.DataTableColumn]: ColumnTable;
349
+ [FormComponents.DataTableFormula]: FormulaTable;
350
+ [FormComponents.ESOP]: ESOP;
351
+ [FormComponents.EXPRESSION]: Expression;
352
+ [FormComponents.AGG]: Agg;
353
+ [FormComponents.ButtonContainer]: ButtonContainer;
354
+ [FormComponents.BottomButtonContainer]: BottomButtonContainer;
355
+ [FormComponents.DataList]: DataList;
356
+ [FormComponents.RdoDataList]: DataList;
357
+ [FormComponents.RdoForm]: Form;
358
+ [FormComponents.MedProRdoForm]: Form;
359
+ [FormComponents.SerialRule]: SerialRule;
360
+ [FormComponents.CustomField]: CustomField;
361
+ [FormComponents.Descriptions]: Descriptions;
362
+ [FormComponents.GenImage]: GenImage;
363
+ [FormComponents.SubDataTable]: SubDataTable;
364
+ [FormComponents.TableSelect]: TableSelect;
365
+ [FormComponents.SubTable]: SubTable;
366
+ [FormComponents.ProcessApproveButton]: approveButton;
367
+ [FormComponents.BizProcess]: BizProcess;
368
+ [FormComponents.FormProcess]: FormProcess;
369
+ [FormComponents.ApprovalProcess]: ApprovalProcess;
370
+ }
@@ -0,0 +1,42 @@
1
+ import { FIELD_TYPE, FormComponents, VERIFICATIONCONDITIONS_TYPE } from '@gct-paas/core';
2
+ import { IBasicSchema } from './i-schemas';
3
+ /**
4
+ * 字段组件基础结构
5
+ *
6
+ * @interface fieldWidgetSchema
7
+ */
8
+ export interface fieldWidgetSchema {
9
+ /** 组件唯一标识 */
10
+ id: string;
11
+ /** i18n字段 */
12
+ i18n: Record<string, string>;
13
+ props: {
14
+ /** 字段key */
15
+ field: string;
16
+ /** 字段id */
17
+ fieldId: string;
18
+ /** 字段类型 */
19
+ fieldType?: FIELD_TYPE;
20
+ /** 字段名称 */
21
+ label: string;
22
+ };
23
+ }
24
+ /**
25
+ * 校验规则
26
+ *
27
+ * @interface validateRule
28
+ */
29
+ export interface validateRule {
30
+ ruleName: string;
31
+ field: string;
32
+ ruleType: VERIFICATIONCONDITIONS_TYPE.JS;
33
+ trigger?: 'change' | 'bulr';
34
+ message?: string;
35
+ jsName?: string;
36
+ }
37
+ /**
38
+ * 组件类型与组件Schema接口映射
39
+ *
40
+ * @type ComTypeMap
41
+ */
42
+ export type ComTypeMap = Record<FormComponents, IBasicSchema>;
@@ -0,0 +1,240 @@
1
+ import { CSSProperties } from 'vue';
2
+ import { PropGroup, StyleGroup, tableColumnWidthEnum, BindCmpStyleTypeEnum, FIELD_TYPE, CreateType, FormComponents } from '@gct-paas/core';
3
+ import { IBasicSchema } from './i-schemas';
4
+ import { IFieldToProp } from './i-props';
5
+ /**
6
+ * 样式编辑器
7
+ *
8
+ * @interface IStyleEditor
9
+ */
10
+ export interface IStyleEditor {
11
+ /** style组件 */
12
+ component: string;
13
+ /** style名称 */
14
+ name?: string | Record<string, string>;
15
+ /** 右侧显示的名称 */
16
+ label?: string;
17
+ /** style分组 */
18
+ group: StyleGroup;
19
+ /** style变时的callback */
20
+ changeCallback?: Function;
21
+ /** style是否隐藏逻辑 */
22
+ hidden?: (arg: IBasicSchema) => boolean;
23
+ /** editor内部的自定义config逻辑 */
24
+ _config?: Partial<IStyleEditorConfig>;
25
+ /** 表单编辑器额外配置 */
26
+ editor?: Record<string, any>;
27
+ /** 表单项配置 */
28
+ formItem?: Record<string, any>;
29
+ }
30
+ /**
31
+ * 样式编辑器配置
32
+ *
33
+ * @interface IStyleEditorConfig
34
+ */
35
+ export interface IStyleEditorConfig {
36
+ [key: string]: any;
37
+ options: Function | {
38
+ label: string;
39
+ value: string | boolean | number;
40
+ }[];
41
+ options2: Function | {
42
+ label: string;
43
+ value: string | boolean | number;
44
+ }[];
45
+ maxlength: number;
46
+ minlength: number;
47
+ showType: 'switch' | 'checkbox';
48
+ /** 新增对象的生成器 */
49
+ generator?: Function;
50
+ columnWidthEnum?: tableColumnWidthEnum[];
51
+ hiddenMarginOrPadding: 'margin' | 'padding';
52
+ /** form-item显示的名称 */
53
+ label?: string;
54
+ hiddenColor?: boolean;
55
+ }
56
+ /**
57
+ * 属性编辑器
58
+ *
59
+ * @interface IPropEditor
60
+ */
61
+ export interface IPropEditor {
62
+ /** prop组件 */
63
+ component: string;
64
+ /** prop名称 没有name的情况指的是:此editor改的不是组件的prop而是改的其他地方的数据 */
65
+ /** root:开头就全链路修改widget */
66
+ name?: string | Record<string, any>;
67
+ /**
68
+ * 组件所归属的套件,非清单中的配置界面不显示
69
+ *
70
+ * @author zhanghanrui
71
+ * @date 2024-05-31 09:05:49
72
+ * @type {string[]}
73
+ */
74
+ kit?: string[];
75
+ /** 右侧显示的label名称 */
76
+ label: string;
77
+ /** prop是否必填 */
78
+ required?: boolean;
79
+ /** prop分组 */
80
+ group: PropGroup | string;
81
+ /** 自定义校验 */
82
+ validate?: Promise<any>;
83
+ /** editor内部的自定义config逻辑 */
84
+ _config?: Partial<IPropEditorConfig>;
85
+ /** 表单项额外配置 */
86
+ editor?: Record<string, any>;
87
+ /** 表单项配置 */
88
+ formItem?: Record<string, any>;
89
+ /** prop变时的callback */
90
+ changeCallback?: (arg: IBasicSchema, val: any) => void;
91
+ /** 是否是纯表单字段配置(在 hidden 方法之后执行,如果为 false 直接隐藏)只针对于字段 */
92
+ formField?: boolean;
93
+ /** editor的是否隐藏逻辑 */
94
+ hidden?: (arg: IBasicSchema) => boolean;
95
+ /** props依赖的字段,依赖的字段不存在会隐藏,变化了会刷新 */
96
+ dependentProps?: string[];
97
+ formItemStyle?: CSSProperties;
98
+ formItemClass?: string;
99
+ onMounted?: (widget: IBasicSchema) => void;
100
+ [key: string]: any;
101
+ }
102
+ /**
103
+ * editor属性
104
+ *
105
+ * @interface IPropEditorConfig
106
+ */
107
+ export interface IPropEditorConfig {
108
+ [key: string]: any;
109
+ width?: number;
110
+ filterFields: FIELD_TYPE[];
111
+ filterTypes: CreateType[];
112
+ fieldToProp: IFieldToProp[];
113
+ options: Function | {
114
+ label?: string;
115
+ icon?: string;
116
+ value: string | boolean | number;
117
+ suffix?: string;
118
+ }[];
119
+ options2: Function | {
120
+ label?: string;
121
+ icon?: string;
122
+ value: string | boolean | number;
123
+ }[];
124
+ createField: Function;
125
+ updateAsyncField?: Function;
126
+ maxlength?: Function | number;
127
+ minlength?: Function | number;
128
+ max?: Function | number;
129
+ min?: Function | number;
130
+ precision?: Function | number;
131
+ i18n?: boolean;
132
+ clearable?: boolean;
133
+ /** 后置标签 */
134
+ addonAfter?: string;
135
+ disabled?: Function | boolean;
136
+ /** 标签提示 */
137
+ tooltip?: string | string[];
138
+ multiple?: boolean;
139
+ /** 多选最多选择的个数 */
140
+ maxMultiple?: number;
141
+ modelKey?: string;
142
+ type?: string;
143
+ eventCallback?: Function;
144
+ filterFn?: (arg: any) => boolean;
145
+ /** 是否展示字数 */
146
+ showCount?: boolean;
147
+ /** 需要显示的输入属性内容 */
148
+ needFieldAttrs?: string[];
149
+ /** 需要过滤的输入属性内容 */
150
+ getFilterAttrs?: Function;
151
+ /** 组件类型key */
152
+ bindCmpStyleKey?: BindCmpStyleTypeEnum | Function;
153
+ filterOptionsCallback?: Function;
154
+ /** 日期、日期时间默认值 */
155
+ initPickerType?: string;
156
+ /** 图标色 */
157
+ showColor?: boolean;
158
+ /** 图标背景色 */
159
+ showBackground?: boolean;
160
+ /** 下拉框返回值类型 */
161
+ valueType?: string;
162
+ /** 名称 */
163
+ name?: string;
164
+ /** 清除子组件 */
165
+ clearChildren?: boolean;
166
+ /** 支持搜索 */
167
+ showSearch?: boolean;
168
+ /** 过滤自身 */
169
+ filterSelf?: boolean;
170
+ /** 根据props中哪个值来查询model字段 */
171
+ modelByKey: string;
172
+ /** 支持使用全局字段数据 */
173
+ supportGlobData?: boolean;
174
+ /** 获取查询组件信息 */
175
+ getSearchWidgets?: Function;
176
+ /** 显示复选框 */
177
+ showcheckbox?: boolean;
178
+ /** 所属系统,web_module、mobile_module */
179
+ module?: string;
180
+ /** 选择字段按钮标题 */
181
+ selectFiledBtnTitle?: string;
182
+ /** 查询子表或非子表 不传查询全部(1 子模型, 0 非子模型) */
183
+ subModel?: number;
184
+ /** 模型种类:(entity/data/view) 多个类型逗号分隔 */
185
+ category?: string;
186
+ /** 选择字段能否被拖拽 */
187
+ draggable?: boolean;
188
+ /** 默认创建的按钮类型 */
189
+ defaultButtonType?: object;
190
+ /** 组件辅助提示文本 */
191
+ tips?: string;
192
+ /** 是否显示切换单位 */
193
+ filterUnitType?: 'px' | '%';
194
+ placeholder?: string;
195
+ /** 需要过滤的字段 */
196
+ excludeFieldType?: FIELD_TYPE[];
197
+ /** 最要过滤的字段key */
198
+ excludeFieldKey?: string[];
199
+ /** 默认展开所有节点 */
200
+ defaultExpandAll?: boolean;
201
+ /** 显示checkbox */
202
+ treeCheckable?: boolean;
203
+ /** tag显示的内容 */
204
+ tagName?: string;
205
+ /** 是否显示tag */
206
+ showTagFunc?: boolean | Function;
207
+ /** 是否一行显示 */
208
+ isInRow?: boolean;
209
+ /** 一行显示时是否居右显示 */
210
+ isRight?: boolean;
211
+ /** 获取modelkey */
212
+ getModelKey?: Function;
213
+ /** label行中右侧按钮 */
214
+ labelButton?: object;
215
+ /** label 水平布局时,左侧的label名称 */
216
+ label?: string;
217
+ /** linkage-editor 是否是tree */
218
+ isTreeSelect?: boolean | ((IData: any) => boolean);
219
+ /** 插槽 */
220
+ slots?: object;
221
+ /** 关联表单的模型key */
222
+ bindModelKey?: string;
223
+ /** 头部按钮 */
224
+ headerRightButton?: FormComponents[] | ((w: IBasicSchema) => FormComponents[]);
225
+ /** 批量按钮 */
226
+ headerLeftButton?: FormComponents[] | ((w: IBasicSchema) => FormComponents[]);
227
+ /** 单行按钮 */
228
+ columnsButton?: FormComponents[] | ((w: IBasicSchema) => FormComponents[]);
229
+ /** rdo单行按钮 */
230
+ columnsRdoButton?: [
231
+ {
232
+ value: FormComponents[] | ((w: IBasicSchema) => FormComponents[]);
233
+ },
234
+ {
235
+ value: FormComponents[] | ((w: IBasicSchema) => FormComponents[]);
236
+ }
237
+ ];
238
+ /** 模块类型 */
239
+ moduleType?: string;
240
+ }
@@ -0,0 +1,55 @@
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[]>;
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
+ modalTitle?: string;
35
+ }
36
+ /**
37
+ * 编排逻辑事件
38
+ *
39
+ * @interface ILoInterface
40
+ */
41
+ /**
42
+ * 组件自身拥有的事件
43
+ *
44
+ * @interface IEventsType
45
+ */
46
+ export interface IEventsType {
47
+ /** 事件KEY */
48
+ name: string;
49
+ /** 事件名 */
50
+ title: string;
51
+ /** 事件参数 */
52
+ params: string[];
53
+ /** event是否隐藏逻辑 */
54
+ hidden?: (arg: Partial<IBasicSchema> | Partial<LowCodeModal.Modal>) => boolean;
55
+ }