openxiangda 1.0.41 → 1.0.43
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/README.md +60 -0
- package/package.json +1 -1
- package/packages/sdk/dist/components/index.cjs +2 -0
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +4 -1071
- package/packages/sdk/dist/components/index.d.ts +4 -1071
- package/packages/sdk/dist/components/index.mjs +2 -0
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/index.cjs +47838 -93
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.css +5313 -0
- package/packages/sdk/dist/runtime/index.css.map +1 -0
- package/packages/sdk/dist/runtime/index.d.mts +165 -1
- package/packages/sdk/dist/runtime/index.d.ts +165 -1
- package/packages/sdk/dist/runtime/index.mjs +47018 -103
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/types-U26h_FIh.d.mts +1073 -0
- package/packages/sdk/dist/types-U26h_FIh.d.ts +1073 -0
- package/templates/sy-lowcode-app-workspace/src/dev/App.tsx +780 -28
- package/templates/sy-lowcode-app-workspace/src/runtime/builtin-overrides.tsx +8 -0
- package/templates/sy-lowcode-app-workspace/tsconfig.app.json +17 -1
- package/templates/sy-lowcode-app-workspace/vite.config.ts +81 -28
|
@@ -0,0 +1,1073 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type FormSectionVariant = 'plain' | 'card';
|
|
5
|
+
type FormSectionAccent = 'blue' | 'green';
|
|
6
|
+
type FormSectionIconKey = 'user' | 'calendar' | 'file' | 'device';
|
|
7
|
+
interface FormSectionProps {
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
variant?: FormSectionVariant;
|
|
11
|
+
accent?: FormSectionAccent;
|
|
12
|
+
icon?: React__default.ReactNode;
|
|
13
|
+
iconKey?: FormSectionIconKey;
|
|
14
|
+
collapsible?: boolean;
|
|
15
|
+
defaultCollapsed?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
titleClassName?: string;
|
|
18
|
+
contentClassName?: string;
|
|
19
|
+
children: React__default.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare function FormSection({ title, description, variant, accent, icon, iconKey, collapsible, defaultCollapsed, className, titleClassName, contentClassName, children, }: FormSectionProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
/** 字段行为状态 */
|
|
24
|
+
type FieldBehavior = 'NORMAL' | 'READONLY' | 'DISABLED' | 'HIDDEN';
|
|
25
|
+
type FormEngineMode = 'submit' | 'edit' | 'readonly';
|
|
26
|
+
type StandardFormPageMode = FormEngineMode | 'detail' | 'process';
|
|
27
|
+
/** 校验预设模式 */
|
|
28
|
+
type ValidationPreset = 'phone' | 'idCard' | 'email' | 'url' | 'bankCard';
|
|
29
|
+
/** 校验规则 */
|
|
30
|
+
interface ValidationRule {
|
|
31
|
+
required?: boolean;
|
|
32
|
+
message?: string;
|
|
33
|
+
min?: number;
|
|
34
|
+
max?: number;
|
|
35
|
+
minLength?: number;
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
preset?: ValidationPreset;
|
|
38
|
+
pattern?: RegExp | string;
|
|
39
|
+
validator?: (value: any) => Promise<void> | void;
|
|
40
|
+
}
|
|
41
|
+
/** 字段声明(schema 中的每个字段定义) */
|
|
42
|
+
interface FieldDefinition {
|
|
43
|
+
fieldId: string;
|
|
44
|
+
componentName: string;
|
|
45
|
+
label: string;
|
|
46
|
+
required?: boolean;
|
|
47
|
+
rules?: ValidationRule[];
|
|
48
|
+
behavior?: FieldBehavior;
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
tips?: string;
|
|
51
|
+
defaultValue?: any;
|
|
52
|
+
defaultValueType?: 'static' | 'expression';
|
|
53
|
+
defaultValueExpression?: string;
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
type DateShortcutType = 'today' | 'yesterday' | 'tomorrow' | 'currentWeek' | 'currentMonth' | 'pastDays' | 'futureDays';
|
|
57
|
+
interface DateShortcutConfig {
|
|
58
|
+
type: DateShortcutType;
|
|
59
|
+
amount?: number;
|
|
60
|
+
format?: string;
|
|
61
|
+
includeTime?: boolean;
|
|
62
|
+
}
|
|
63
|
+
type PeopleShortcutType = 'currentUser' | 'currentDepartment' | 'parentDepartment' | 'role' | 'fixed' | 'currentUserManager' | 'currentUserManager2';
|
|
64
|
+
interface PeopleShortcutConfig {
|
|
65
|
+
type: PeopleShortcutType;
|
|
66
|
+
roleId?: string;
|
|
67
|
+
values?: any[];
|
|
68
|
+
}
|
|
69
|
+
type TextShortcutType = 'currentUserName' | 'currentUserJobNumber' | 'currentDeptName' | 'uuid';
|
|
70
|
+
interface TextShortcutConfig {
|
|
71
|
+
type: TextShortcutType;
|
|
72
|
+
}
|
|
73
|
+
interface LayoutVisibleWhen {
|
|
74
|
+
field: string;
|
|
75
|
+
operator: 'eq' | 'ne' | 'in' | 'notIn' | 'contains' | 'empty' | 'notEmpty' | 'between' | 'changed';
|
|
76
|
+
value?: any;
|
|
77
|
+
}
|
|
78
|
+
interface BaseLayoutNode {
|
|
79
|
+
id: string;
|
|
80
|
+
type: 'field' | 'section' | 'grid' | 'tabs' | 'steps';
|
|
81
|
+
hidden?: boolean;
|
|
82
|
+
visibleWhen?: LayoutVisibleWhen | LayoutVisibleWhen[];
|
|
83
|
+
}
|
|
84
|
+
interface FieldLayoutNode extends BaseLayoutNode {
|
|
85
|
+
type: 'field';
|
|
86
|
+
fieldId: string;
|
|
87
|
+
span?: number;
|
|
88
|
+
className?: string;
|
|
89
|
+
}
|
|
90
|
+
interface SectionLayoutNode extends BaseLayoutNode {
|
|
91
|
+
type: 'section';
|
|
92
|
+
title: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
variant?: FormSectionVariant;
|
|
95
|
+
accent?: FormSectionAccent;
|
|
96
|
+
iconKey?: FormSectionIconKey;
|
|
97
|
+
collapsible?: boolean;
|
|
98
|
+
defaultCollapsed?: boolean;
|
|
99
|
+
children: FormLayoutNode[];
|
|
100
|
+
}
|
|
101
|
+
interface GridLayoutCell {
|
|
102
|
+
key?: string;
|
|
103
|
+
children: FormLayoutNode[];
|
|
104
|
+
}
|
|
105
|
+
interface GridLayoutNode extends BaseLayoutNode {
|
|
106
|
+
type: 'grid';
|
|
107
|
+
columns?: 1 | 2 | 3 | 4;
|
|
108
|
+
gap?: number | string;
|
|
109
|
+
columnGap?: number | string;
|
|
110
|
+
rowGap?: number | string;
|
|
111
|
+
columnRatios?: number[];
|
|
112
|
+
layoutPreset?: string;
|
|
113
|
+
cells?: GridLayoutCell[];
|
|
114
|
+
children: FormLayoutNode[];
|
|
115
|
+
}
|
|
116
|
+
interface TabLayoutItem {
|
|
117
|
+
key: string;
|
|
118
|
+
label: string;
|
|
119
|
+
children: FormLayoutNode[];
|
|
120
|
+
}
|
|
121
|
+
interface TabsLayoutNode extends BaseLayoutNode {
|
|
122
|
+
type: 'tabs';
|
|
123
|
+
defaultActiveKey?: string;
|
|
124
|
+
items: TabLayoutItem[];
|
|
125
|
+
}
|
|
126
|
+
interface StepLayoutItem {
|
|
127
|
+
key: string;
|
|
128
|
+
title: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
children: FormLayoutNode[];
|
|
131
|
+
}
|
|
132
|
+
interface StepsLayoutNode extends BaseLayoutNode {
|
|
133
|
+
type: 'steps';
|
|
134
|
+
items: StepLayoutItem[];
|
|
135
|
+
}
|
|
136
|
+
type FormLayoutNode = FieldLayoutNode | SectionLayoutNode | GridLayoutNode | TabsLayoutNode | StepsLayoutNode;
|
|
137
|
+
interface FormTemplateConfig {
|
|
138
|
+
type?: 'standard';
|
|
139
|
+
defaultMode?: StandardFormPageMode;
|
|
140
|
+
formType?: 'form' | 'process';
|
|
141
|
+
submitSuccessMode?: 'redirect' | 'stay' | 'continue';
|
|
142
|
+
enableDraft?: boolean;
|
|
143
|
+
enableProcessPreview?: boolean;
|
|
144
|
+
enableEdit?: boolean;
|
|
145
|
+
enableDelete?: boolean;
|
|
146
|
+
enableChangeRecords?: boolean;
|
|
147
|
+
appearance?: FormAppearanceConfig;
|
|
148
|
+
}
|
|
149
|
+
interface FormAppearanceConfig {
|
|
150
|
+
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
151
|
+
variant?: 'outlined' | 'borderless' | 'filled' | 'underlined';
|
|
152
|
+
size?: 'small' | 'middle' | 'large';
|
|
153
|
+
columns?: 1 | 2 | 3 | 4;
|
|
154
|
+
rendererSize?: 'compact' | 'default' | 'large';
|
|
155
|
+
gap?: number | string;
|
|
156
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full' | number | string;
|
|
157
|
+
requiredMark?: boolean | 'optional';
|
|
158
|
+
colon?: boolean;
|
|
159
|
+
labelCol?: Record<string, any>;
|
|
160
|
+
wrapperCol?: Record<string, any>;
|
|
161
|
+
scrollToFirstError?: boolean | Record<string, any>;
|
|
162
|
+
}
|
|
163
|
+
interface FormRuntimeConfig {
|
|
164
|
+
version?: string;
|
|
165
|
+
generatedAt?: string;
|
|
166
|
+
editorVersion?: string;
|
|
167
|
+
currentUser?: UserItem;
|
|
168
|
+
currentDepartment?: DepartmentTreeNode;
|
|
169
|
+
currentUserManagers?: UserItem[];
|
|
170
|
+
appType?: string;
|
|
171
|
+
/**
|
|
172
|
+
* 运行时数据查询函数(带权限控制)
|
|
173
|
+
* 由宿主环境(app-workspace)注入,底层应调用 advancedSearch 接口
|
|
174
|
+
*/
|
|
175
|
+
fetchFormData?: (params: RuntimeDataQueryParams) => Promise<RuntimeDataQueryResult>;
|
|
176
|
+
[key: string]: any;
|
|
177
|
+
}
|
|
178
|
+
interface RuntimeDataQueryParams {
|
|
179
|
+
formUuid: string;
|
|
180
|
+
appType: string;
|
|
181
|
+
filters?: Array<{
|
|
182
|
+
fieldId: string;
|
|
183
|
+
operator: string;
|
|
184
|
+
value?: any;
|
|
185
|
+
}>;
|
|
186
|
+
conditionLogic?: 'and' | 'or';
|
|
187
|
+
sort?: {
|
|
188
|
+
field: string;
|
|
189
|
+
order: 'asc' | 'desc';
|
|
190
|
+
};
|
|
191
|
+
fieldId?: string;
|
|
192
|
+
deduplicate?: boolean;
|
|
193
|
+
pageSize?: number;
|
|
194
|
+
currentPage?: number;
|
|
195
|
+
}
|
|
196
|
+
interface RuntimeDataQueryResult {
|
|
197
|
+
data: any[];
|
|
198
|
+
totalCount?: number;
|
|
199
|
+
}
|
|
200
|
+
/** 表单 Schema 定义 */
|
|
201
|
+
interface FormSchema {
|
|
202
|
+
formMeta: {
|
|
203
|
+
formUuid: string;
|
|
204
|
+
appType: string;
|
|
205
|
+
title: string;
|
|
206
|
+
};
|
|
207
|
+
fields: FieldDefinition[];
|
|
208
|
+
layout?: FormLayoutNode[];
|
|
209
|
+
rules?: FormEffect[];
|
|
210
|
+
template?: FormTemplateConfig;
|
|
211
|
+
runtime?: FormRuntimeConfig;
|
|
212
|
+
}
|
|
213
|
+
interface LowcodePageMeta {
|
|
214
|
+
pageId?: string;
|
|
215
|
+
pageCode?: string;
|
|
216
|
+
routeKey?: string;
|
|
217
|
+
appType: string;
|
|
218
|
+
title: string;
|
|
219
|
+
}
|
|
220
|
+
type LowcodePageNodeType = 'PageSection' | 'PageGrid' | 'HeadingBlock' | 'TextBlock' | 'DataManagementList' | 'FormBlock';
|
|
221
|
+
interface LowcodePageNode {
|
|
222
|
+
id: string;
|
|
223
|
+
type: LowcodePageNodeType | string;
|
|
224
|
+
props?: Record<string, any>;
|
|
225
|
+
children?: LowcodePageNode[];
|
|
226
|
+
cells?: Array<{
|
|
227
|
+
key?: string;
|
|
228
|
+
children: LowcodePageNode[];
|
|
229
|
+
}>;
|
|
230
|
+
}
|
|
231
|
+
interface LowcodePageSchema {
|
|
232
|
+
schemaKind: 'page';
|
|
233
|
+
pageMeta: LowcodePageMeta;
|
|
234
|
+
nodes: LowcodePageNode[];
|
|
235
|
+
dataSources?: Array<Record<string, any>>;
|
|
236
|
+
runtime?: Record<string, any>;
|
|
237
|
+
}
|
|
238
|
+
interface RuntimeResponse<T = any> {
|
|
239
|
+
code?: number;
|
|
240
|
+
success?: boolean;
|
|
241
|
+
data?: T;
|
|
242
|
+
result?: T;
|
|
243
|
+
message?: string;
|
|
244
|
+
error?: string;
|
|
245
|
+
}
|
|
246
|
+
interface RuntimeRequestConfig {
|
|
247
|
+
url: string;
|
|
248
|
+
method?: string;
|
|
249
|
+
params?: Record<string, any>;
|
|
250
|
+
data?: any;
|
|
251
|
+
headers?: Record<string, string>;
|
|
252
|
+
responseType?: 'json' | 'blob';
|
|
253
|
+
}
|
|
254
|
+
interface FormRuntimeApi {
|
|
255
|
+
request: <T = any>(config: RuntimeRequestConfig) => Promise<RuntimeResponse<T> | Blob>;
|
|
256
|
+
uploadFile: (file: File, bucketName?: string, onProgress?: (percent: number) => void) => Promise<AttachmentItem>;
|
|
257
|
+
deleteFile: (objectName: string, bucketName?: string) => Promise<{
|
|
258
|
+
success: boolean;
|
|
259
|
+
}>;
|
|
260
|
+
createDownloadTicket: (bucketName: string, objectName: string, fileName?: string) => Promise<any>;
|
|
261
|
+
createFileAccessTicket: (bucketName: string, objectName: string, fileName?: string, purpose?: 'download' | 'preview' | 'onlyoffice') => Promise<any>;
|
|
262
|
+
getUserById: (id: string) => Promise<any>;
|
|
263
|
+
getUserList: (params?: Record<string, any>) => Promise<any[]>;
|
|
264
|
+
getDepartmentRoots: () => Promise<any[]>;
|
|
265
|
+
getDepartmentChildren: (parentId: string) => Promise<any[]>;
|
|
266
|
+
getDepartmentParentDepartments: (id: string) => Promise<any[]>;
|
|
267
|
+
getDepartmentMembers: (id: string) => Promise<any[]>;
|
|
268
|
+
getDepartmentMembersPage: (id: string, params?: {
|
|
269
|
+
page?: number;
|
|
270
|
+
pageSize?: number;
|
|
271
|
+
}) => Promise<{
|
|
272
|
+
items: any[];
|
|
273
|
+
total: number;
|
|
274
|
+
page: number;
|
|
275
|
+
pageSize: number;
|
|
276
|
+
}>;
|
|
277
|
+
getChinaDivisions: (parentAdcode?: string) => Promise<any[]>;
|
|
278
|
+
advancedSearch: (params: Record<string, any>) => Promise<any>;
|
|
279
|
+
getDingTalkSignature: (url: string) => Promise<any>;
|
|
280
|
+
submitFormData: (payload: Record<string, any>) => Promise<any>;
|
|
281
|
+
updateFormData: (payload: Record<string, any>) => Promise<any>;
|
|
282
|
+
}
|
|
283
|
+
type FormRuntimeApiConfig = Partial<FormRuntimeApi> & {
|
|
284
|
+
baseUrl?: string;
|
|
285
|
+
};
|
|
286
|
+
/** 表单引擎配置 */
|
|
287
|
+
interface FormEngineConfig {
|
|
288
|
+
mode: FormEngineMode;
|
|
289
|
+
formUuid: string;
|
|
290
|
+
appType: string;
|
|
291
|
+
formInstanceId?: string;
|
|
292
|
+
permissions?: {
|
|
293
|
+
fieldPermissions: Record<string, FieldBehavior>;
|
|
294
|
+
operations: string[];
|
|
295
|
+
};
|
|
296
|
+
submit?: {
|
|
297
|
+
beforeSubmit?: (values: Record<string, any>) => Promise<boolean | void>;
|
|
298
|
+
afterSubmit?: (response: any) => Promise<void>;
|
|
299
|
+
submitSuccessMode?: 'redirect' | 'stay' | 'callback';
|
|
300
|
+
redirectUrl?: string;
|
|
301
|
+
};
|
|
302
|
+
api?: FormRuntimeApiConfig;
|
|
303
|
+
navigation?: {
|
|
304
|
+
basePath?: string;
|
|
305
|
+
};
|
|
306
|
+
effects?: FormEffect[];
|
|
307
|
+
}
|
|
308
|
+
type FormEffectConditionOperator = 'eq' | 'ne' | 'in' | 'notIn' | 'contains' | 'empty' | 'notEmpty' | 'between' | 'changed';
|
|
309
|
+
type FormEffectCondition = {
|
|
310
|
+
field: string;
|
|
311
|
+
operator: FormEffectConditionOperator;
|
|
312
|
+
value?: any;
|
|
313
|
+
} | {
|
|
314
|
+
all: FormEffectCondition[];
|
|
315
|
+
} | {
|
|
316
|
+
any: FormEffectCondition[];
|
|
317
|
+
} | {
|
|
318
|
+
not: FormEffectCondition;
|
|
319
|
+
};
|
|
320
|
+
type FormEffectAction = {
|
|
321
|
+
field: string;
|
|
322
|
+
action: 'show' | 'hide' | 'enable' | 'disable' | 'setValue' | 'clearValue' | 'setRequired' | 'setOptions';
|
|
323
|
+
value?: any;
|
|
324
|
+
} | {
|
|
325
|
+
target: string;
|
|
326
|
+
targetType?: 'field' | 'layout';
|
|
327
|
+
action: 'show' | 'hide' | 'enable' | 'disable' | 'setValue' | 'clearValue' | 'setRequired' | 'setOptions';
|
|
328
|
+
value?: any;
|
|
329
|
+
};
|
|
330
|
+
/** 字段联动效果 */
|
|
331
|
+
interface FormEffect {
|
|
332
|
+
id?: string;
|
|
333
|
+
name?: string;
|
|
334
|
+
when: FormEffectCondition;
|
|
335
|
+
then: FormEffectAction[];
|
|
336
|
+
}
|
|
337
|
+
/** 基础字段组件 Props */
|
|
338
|
+
interface BaseFieldProps {
|
|
339
|
+
fieldId: string;
|
|
340
|
+
label: string;
|
|
341
|
+
value?: any;
|
|
342
|
+
behavior?: FieldBehavior;
|
|
343
|
+
required?: boolean;
|
|
344
|
+
rules?: ValidationRule[];
|
|
345
|
+
placeholder?: string;
|
|
346
|
+
tips?: string;
|
|
347
|
+
className?: string;
|
|
348
|
+
labelClassName?: string;
|
|
349
|
+
inputClassName?: string;
|
|
350
|
+
tipsClassName?: string;
|
|
351
|
+
readonlyClassName?: string;
|
|
352
|
+
onChange?: (value: any) => void;
|
|
353
|
+
onBlur?: (value: any) => void;
|
|
354
|
+
}
|
|
355
|
+
/** TextField 专用 Props */
|
|
356
|
+
interface TextFieldProps extends BaseFieldProps {
|
|
357
|
+
defaultValue?: string;
|
|
358
|
+
maxLength?: number;
|
|
359
|
+
showCount?: boolean;
|
|
360
|
+
allowClear?: boolean;
|
|
361
|
+
prefix?: string;
|
|
362
|
+
suffix?: string;
|
|
363
|
+
autoComplete?: string;
|
|
364
|
+
variant?: FormAppearanceConfig['variant'];
|
|
365
|
+
size?: FormAppearanceConfig['size'];
|
|
366
|
+
defaultShortcut?: TextShortcutConfig;
|
|
367
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
368
|
+
validationPresets?: ValidationPreset[];
|
|
369
|
+
}
|
|
370
|
+
/** NumberField 专用 Props */
|
|
371
|
+
interface NumberFieldProps extends BaseFieldProps {
|
|
372
|
+
defaultValue?: number | null;
|
|
373
|
+
min?: number;
|
|
374
|
+
max?: number;
|
|
375
|
+
step?: number;
|
|
376
|
+
precision?: number;
|
|
377
|
+
unit?: string;
|
|
378
|
+
unitPosition?: 'prefix' | 'suffix';
|
|
379
|
+
thousandSeparator?: boolean;
|
|
380
|
+
controls?: boolean;
|
|
381
|
+
keyboard?: boolean;
|
|
382
|
+
stringMode?: boolean;
|
|
383
|
+
variant?: FormAppearanceConfig['variant'];
|
|
384
|
+
size?: FormAppearanceConfig['size'];
|
|
385
|
+
}
|
|
386
|
+
/** TextAreaField 专用 Props */
|
|
387
|
+
interface TextAreaFieldProps extends BaseFieldProps {
|
|
388
|
+
defaultValue?: string;
|
|
389
|
+
rows?: number;
|
|
390
|
+
minRows?: number;
|
|
391
|
+
maxRows?: number;
|
|
392
|
+
autoSize?: boolean | {
|
|
393
|
+
minRows?: number;
|
|
394
|
+
maxRows?: number;
|
|
395
|
+
};
|
|
396
|
+
maxLength?: number;
|
|
397
|
+
showCount?: boolean;
|
|
398
|
+
allowClear?: boolean;
|
|
399
|
+
autoComplete?: string;
|
|
400
|
+
variant?: FormAppearanceConfig['variant'];
|
|
401
|
+
size?: FormAppearanceConfig['size'];
|
|
402
|
+
defaultShortcut?: TextShortcutConfig;
|
|
403
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
404
|
+
}
|
|
405
|
+
/** 选项类型 */
|
|
406
|
+
interface OptionItem {
|
|
407
|
+
value: string;
|
|
408
|
+
label: string;
|
|
409
|
+
color?: string;
|
|
410
|
+
disabled?: boolean;
|
|
411
|
+
}
|
|
412
|
+
interface FieldValueSyncConfig {
|
|
413
|
+
targetFieldId: string;
|
|
414
|
+
valuePath?: 'value' | 'label';
|
|
415
|
+
emptyValue?: any;
|
|
416
|
+
}
|
|
417
|
+
type OptionSourceType = 'custom' | 'linkedForm' | 'dataLinkage';
|
|
418
|
+
interface OptionSourceConfig {
|
|
419
|
+
type: OptionSourceType;
|
|
420
|
+
linkedForm?: LinkedFormOptionConfig;
|
|
421
|
+
dataLinkage?: DataLinkageConfig;
|
|
422
|
+
}
|
|
423
|
+
interface LinkedFormOptionConfig {
|
|
424
|
+
formUuid: string;
|
|
425
|
+
formTitle?: string;
|
|
426
|
+
fieldId: string;
|
|
427
|
+
fieldLabel?: string;
|
|
428
|
+
valueFieldId?: string;
|
|
429
|
+
valueFieldLabel?: string;
|
|
430
|
+
labelFieldId?: string;
|
|
431
|
+
labelFieldLabel?: string;
|
|
432
|
+
searchFieldId?: string;
|
|
433
|
+
searchFieldLabel?: string;
|
|
434
|
+
sortField?: string;
|
|
435
|
+
sortOrder?: 'asc' | 'desc';
|
|
436
|
+
filters?: DataFilter[];
|
|
437
|
+
deduplicate?: boolean;
|
|
438
|
+
pageSize?: number;
|
|
439
|
+
remoteSearch?: boolean;
|
|
440
|
+
remoteSearchMinChars?: number;
|
|
441
|
+
}
|
|
442
|
+
interface DataLinkageConfig {
|
|
443
|
+
formUuid: string;
|
|
444
|
+
formTitle?: string;
|
|
445
|
+
targetFieldId: string;
|
|
446
|
+
targetFieldLabel?: string;
|
|
447
|
+
conditions: DataLinkageCondition[];
|
|
448
|
+
conditionLogic?: 'and' | 'or';
|
|
449
|
+
deduplicate?: boolean;
|
|
450
|
+
}
|
|
451
|
+
interface DataLinkageCondition {
|
|
452
|
+
localFieldId: string;
|
|
453
|
+
localFieldLabel?: string;
|
|
454
|
+
localComponentName?: string;
|
|
455
|
+
operator: 'eq' | 'ne' | 'contains' | 'gt' | 'lt' | 'gte' | 'lte';
|
|
456
|
+
remoteFieldId: string;
|
|
457
|
+
remoteFieldLabel?: string;
|
|
458
|
+
remoteComponentName?: string;
|
|
459
|
+
}
|
|
460
|
+
interface DataFilter {
|
|
461
|
+
fieldId: string;
|
|
462
|
+
fieldLabel?: string;
|
|
463
|
+
componentName?: string;
|
|
464
|
+
operator: 'eq' | 'ne' | 'contains' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'notIn' | 'empty' | 'notEmpty';
|
|
465
|
+
value?: any;
|
|
466
|
+
}
|
|
467
|
+
interface DefaultValueLinkageConfig {
|
|
468
|
+
formUuid: string;
|
|
469
|
+
formTitle?: string;
|
|
470
|
+
targetFieldId: string;
|
|
471
|
+
targetFieldLabel?: string;
|
|
472
|
+
conditions: DataLinkageCondition[];
|
|
473
|
+
conditionLogic?: 'and' | 'or';
|
|
474
|
+
}
|
|
475
|
+
type DateRangeRestriction = 'none' | 'todayAndAfter' | 'todayAndBefore' | 'custom';
|
|
476
|
+
interface DateRestrictionConfig {
|
|
477
|
+
type: DateRangeRestriction;
|
|
478
|
+
customStart?: string;
|
|
479
|
+
customEnd?: string;
|
|
480
|
+
}
|
|
481
|
+
type UserDisplayFormat = 'name' | 'nameWithJobNumber' | 'nameWithDepartment';
|
|
482
|
+
/** SelectField 专用 Props */
|
|
483
|
+
interface SelectFieldProps extends BaseFieldProps {
|
|
484
|
+
defaultValue?: OptionItem | null;
|
|
485
|
+
options: OptionItem[];
|
|
486
|
+
allowClear?: boolean;
|
|
487
|
+
showSearch?: boolean;
|
|
488
|
+
optionFilterProp?: string;
|
|
489
|
+
optionLabelProp?: string;
|
|
490
|
+
placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
|
|
491
|
+
maxTagTextLength?: number;
|
|
492
|
+
variant?: FormAppearanceConfig['variant'];
|
|
493
|
+
size?: FormAppearanceConfig['size'];
|
|
494
|
+
optionEffects?: FormEffect[];
|
|
495
|
+
optionSource?: OptionSourceConfig;
|
|
496
|
+
coloredOptions?: boolean;
|
|
497
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
498
|
+
valueSync?: FieldValueSyncConfig[];
|
|
499
|
+
}
|
|
500
|
+
/** MultiSelectField 专用 Props */
|
|
501
|
+
interface MultiSelectFieldProps extends BaseFieldProps {
|
|
502
|
+
defaultValue?: OptionItem[];
|
|
503
|
+
options: OptionItem[];
|
|
504
|
+
allowClear?: boolean;
|
|
505
|
+
showSearch?: boolean;
|
|
506
|
+
maxCount?: number;
|
|
507
|
+
maxTagCount?: number | 'responsive';
|
|
508
|
+
maxTagTextLength?: number;
|
|
509
|
+
optionFilterProp?: string;
|
|
510
|
+
optionLabelProp?: string;
|
|
511
|
+
placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
|
|
512
|
+
variant?: FormAppearanceConfig['variant'];
|
|
513
|
+
size?: FormAppearanceConfig['size'];
|
|
514
|
+
optionEffects?: FormEffect[];
|
|
515
|
+
optionSource?: OptionSourceConfig;
|
|
516
|
+
coloredOptions?: boolean;
|
|
517
|
+
}
|
|
518
|
+
/** RadioField 专用 Props */
|
|
519
|
+
interface RadioFieldProps extends BaseFieldProps {
|
|
520
|
+
defaultValue?: OptionItem | null;
|
|
521
|
+
options: OptionItem[];
|
|
522
|
+
direction?: 'horizontal' | 'vertical';
|
|
523
|
+
optionType?: 'default' | 'button';
|
|
524
|
+
buttonStyle?: 'outline' | 'solid';
|
|
525
|
+
size?: FormAppearanceConfig['size'];
|
|
526
|
+
optionEffects?: FormEffect[];
|
|
527
|
+
optionSource?: OptionSourceConfig;
|
|
528
|
+
coloredOptions?: boolean;
|
|
529
|
+
}
|
|
530
|
+
/** CheckboxField 专用 Props */
|
|
531
|
+
interface CheckboxFieldProps extends BaseFieldProps {
|
|
532
|
+
defaultValue?: OptionItem[];
|
|
533
|
+
options: OptionItem[];
|
|
534
|
+
direction?: 'horizontal' | 'vertical';
|
|
535
|
+
maxCount?: number;
|
|
536
|
+
optionEffects?: FormEffect[];
|
|
537
|
+
optionSource?: OptionSourceConfig;
|
|
538
|
+
coloredOptions?: boolean;
|
|
539
|
+
}
|
|
540
|
+
/** DateField 专用 Props */
|
|
541
|
+
interface DateFieldProps extends BaseFieldProps {
|
|
542
|
+
defaultValue?: string;
|
|
543
|
+
defaultShortcut?: DateShortcutConfig;
|
|
544
|
+
dateFormat?: string;
|
|
545
|
+
showTime?: boolean;
|
|
546
|
+
dateRestriction?: DateRestrictionConfig;
|
|
547
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
548
|
+
}
|
|
549
|
+
/** CascadeDateField 专用 Props */
|
|
550
|
+
interface CascadeDateFieldProps extends BaseFieldProps {
|
|
551
|
+
defaultValue?: {
|
|
552
|
+
start: string;
|
|
553
|
+
end: string;
|
|
554
|
+
} | null;
|
|
555
|
+
defaultShortcut?: DateShortcutConfig;
|
|
556
|
+
dateFormat?: string;
|
|
557
|
+
showTime?: boolean;
|
|
558
|
+
startLabel?: string;
|
|
559
|
+
endLabel?: string;
|
|
560
|
+
dateRestriction?: DateRestrictionConfig;
|
|
561
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
562
|
+
}
|
|
563
|
+
/** 附件项 */
|
|
564
|
+
interface AttachmentItem {
|
|
565
|
+
url: string;
|
|
566
|
+
name: string;
|
|
567
|
+
id: string;
|
|
568
|
+
uid?: string;
|
|
569
|
+
status?: 'uploading' | 'done' | 'error';
|
|
570
|
+
objectName?: string;
|
|
571
|
+
bucketName?: string;
|
|
572
|
+
originalName?: string;
|
|
573
|
+
contentType?: string;
|
|
574
|
+
mimeType?: string;
|
|
575
|
+
extension?: string;
|
|
576
|
+
previewUrl?: string;
|
|
577
|
+
downloadUrl?: string;
|
|
578
|
+
size?: number;
|
|
579
|
+
percent?: number;
|
|
580
|
+
error?: string;
|
|
581
|
+
}
|
|
582
|
+
/** AttachmentField 专用 Props */
|
|
583
|
+
interface AttachmentFieldProps extends BaseFieldProps {
|
|
584
|
+
defaultValue?: AttachmentItem[];
|
|
585
|
+
maxCount?: number;
|
|
586
|
+
accept?: string;
|
|
587
|
+
maxSize?: number;
|
|
588
|
+
uploadAction?: string;
|
|
589
|
+
bucketName?: string;
|
|
590
|
+
multiple?: boolean;
|
|
591
|
+
allowedTypes?: string[];
|
|
592
|
+
showPreview?: boolean;
|
|
593
|
+
showDownload?: boolean;
|
|
594
|
+
showFileSize?: boolean;
|
|
595
|
+
showFileTypeBadge?: boolean;
|
|
596
|
+
previewPagePath?: string;
|
|
597
|
+
mobileDownloadMode?: 'auto' | 'direct' | 'ticketRelay';
|
|
598
|
+
}
|
|
599
|
+
/** ImageField 专用 Props */
|
|
600
|
+
interface ImageFieldProps extends BaseFieldProps {
|
|
601
|
+
defaultValue?: AttachmentItem[];
|
|
602
|
+
maxCount?: number;
|
|
603
|
+
accept?: string;
|
|
604
|
+
uploadAction?: string;
|
|
605
|
+
bucketName?: string;
|
|
606
|
+
multiple?: boolean;
|
|
607
|
+
maxSize?: number;
|
|
608
|
+
listType?: 'text' | 'picture' | 'picture-card';
|
|
609
|
+
showPreviewIcon?: boolean;
|
|
610
|
+
showRemoveIcon?: boolean;
|
|
611
|
+
showDownloadIcon?: boolean;
|
|
612
|
+
}
|
|
613
|
+
/** 子表单列定义 */
|
|
614
|
+
interface SubFormColumn {
|
|
615
|
+
fieldId: string;
|
|
616
|
+
label: string;
|
|
617
|
+
componentName: string;
|
|
618
|
+
[key: string]: any;
|
|
619
|
+
}
|
|
620
|
+
/** SubFormField 专用 Props */
|
|
621
|
+
interface SubFormFieldProps extends BaseFieldProps {
|
|
622
|
+
defaultValue?: Record<string, any>[];
|
|
623
|
+
columns: SubFormColumn[];
|
|
624
|
+
maxRows?: number;
|
|
625
|
+
minRows?: number;
|
|
626
|
+
}
|
|
627
|
+
/** 用户数据源项 */
|
|
628
|
+
interface UserItem {
|
|
629
|
+
id: string;
|
|
630
|
+
name: string;
|
|
631
|
+
value?: string;
|
|
632
|
+
label?: string;
|
|
633
|
+
username?: string;
|
|
634
|
+
jobNumber?: string;
|
|
635
|
+
avatar?: string;
|
|
636
|
+
departments?: Array<{
|
|
637
|
+
id?: string;
|
|
638
|
+
name?: string;
|
|
639
|
+
}>;
|
|
640
|
+
}
|
|
641
|
+
type InitiatorSelectScope = 'all' | 'members' | 'roles';
|
|
642
|
+
type InitiatorSelectedApprovers = Record<string, string[]>;
|
|
643
|
+
interface InitiatorSelectCandidate extends UserItem {
|
|
644
|
+
phone?: string;
|
|
645
|
+
email?: string;
|
|
646
|
+
}
|
|
647
|
+
interface InitiatorSelectRequirement {
|
|
648
|
+
nodeId: string;
|
|
649
|
+
nodeName: string;
|
|
650
|
+
scope: InitiatorSelectScope;
|
|
651
|
+
approvals?: string[];
|
|
652
|
+
approvalNames?: string[];
|
|
653
|
+
multiApprove?: 'all' | 'or' | 'oneByOne';
|
|
654
|
+
candidateUsers?: InitiatorSelectCandidate[];
|
|
655
|
+
totalCandidates?: number;
|
|
656
|
+
}
|
|
657
|
+
/** UserSelectField 专用 Props */
|
|
658
|
+
interface UserSelectFieldProps extends BaseFieldProps {
|
|
659
|
+
defaultValue?: UserItem[];
|
|
660
|
+
defaultShortcut?: PeopleShortcutConfig;
|
|
661
|
+
multiple?: boolean;
|
|
662
|
+
searchable?: boolean;
|
|
663
|
+
dataSource?: UserItem[];
|
|
664
|
+
treeData?: DepartmentTreeNode[];
|
|
665
|
+
allowClear?: boolean;
|
|
666
|
+
maxCount?: number;
|
|
667
|
+
notFoundContent?: string;
|
|
668
|
+
displayFormat?: UserDisplayFormat;
|
|
669
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
670
|
+
}
|
|
671
|
+
/** 部门树节点 */
|
|
672
|
+
interface DepartmentTreeNode {
|
|
673
|
+
id: string;
|
|
674
|
+
name: string;
|
|
675
|
+
value?: string;
|
|
676
|
+
label?: string;
|
|
677
|
+
key?: string;
|
|
678
|
+
title?: string;
|
|
679
|
+
hasChildren?: boolean;
|
|
680
|
+
isLeaf?: boolean;
|
|
681
|
+
children?: DepartmentTreeNode[];
|
|
682
|
+
}
|
|
683
|
+
/** DepartmentSelectField 专用 Props */
|
|
684
|
+
interface DepartmentSelectFieldProps extends BaseFieldProps {
|
|
685
|
+
defaultValue?: {
|
|
686
|
+
id: string;
|
|
687
|
+
name: string;
|
|
688
|
+
}[];
|
|
689
|
+
defaultShortcut?: PeopleShortcutConfig;
|
|
690
|
+
multiple?: boolean;
|
|
691
|
+
treeData?: DepartmentTreeNode[];
|
|
692
|
+
allowClear?: boolean;
|
|
693
|
+
maxCount?: number;
|
|
694
|
+
notFoundContent?: string;
|
|
695
|
+
showFullPath?: boolean;
|
|
696
|
+
scopeType?: 'all' | 'specified';
|
|
697
|
+
specifiedDepts?: string[];
|
|
698
|
+
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
699
|
+
}
|
|
700
|
+
interface CascadeSelectFieldProps extends BaseFieldProps {
|
|
701
|
+
defaultValue?: OptionItem[] | OptionItem[][];
|
|
702
|
+
options?: Array<OptionItem & {
|
|
703
|
+
children?: any[];
|
|
704
|
+
isLeaf?: boolean;
|
|
705
|
+
}>;
|
|
706
|
+
multiple?: boolean;
|
|
707
|
+
allowClear?: boolean;
|
|
708
|
+
changeOnSelect?: boolean;
|
|
709
|
+
showSearch?: boolean;
|
|
710
|
+
fieldNames?: {
|
|
711
|
+
label?: string;
|
|
712
|
+
value?: string;
|
|
713
|
+
children?: string;
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
interface AddressValue {
|
|
717
|
+
country?: OptionItem;
|
|
718
|
+
province?: OptionItem;
|
|
719
|
+
city?: OptionItem;
|
|
720
|
+
district?: OptionItem;
|
|
721
|
+
street?: OptionItem;
|
|
722
|
+
detail?: string;
|
|
723
|
+
fullAddress?: string;
|
|
724
|
+
}
|
|
725
|
+
interface AddressFieldProps extends BaseFieldProps {
|
|
726
|
+
defaultValue?: AddressValue;
|
|
727
|
+
mode?: 'province-city' | 'province-city-district' | 'province-city-district-street' | 'province-city-district-street-detail';
|
|
728
|
+
detailPlaceholder?: string;
|
|
729
|
+
allowClear?: boolean;
|
|
730
|
+
}
|
|
731
|
+
interface AssociationFormConfig {
|
|
732
|
+
appType: string;
|
|
733
|
+
formUuid: string;
|
|
734
|
+
mainFieldId: string;
|
|
735
|
+
selectorColumns?: Array<string | {
|
|
736
|
+
title?: string;
|
|
737
|
+
dataIndex: string;
|
|
738
|
+
key?: string;
|
|
739
|
+
width?: number;
|
|
740
|
+
ellipsis?: boolean;
|
|
741
|
+
}>;
|
|
742
|
+
dataFilterRules?: Array<{
|
|
743
|
+
key: string;
|
|
744
|
+
operator?: string;
|
|
745
|
+
componentName?: string;
|
|
746
|
+
value?: string | number;
|
|
747
|
+
valueType?: 'manual' | 'currentField';
|
|
748
|
+
currentFieldKey?: string;
|
|
749
|
+
}>;
|
|
750
|
+
dataFilterConditionType?: 'AND' | 'OR';
|
|
751
|
+
dataFillingEnabled?: boolean;
|
|
752
|
+
dataFillingRules?: {
|
|
753
|
+
mainRules?: Array<{
|
|
754
|
+
source: string;
|
|
755
|
+
target: string;
|
|
756
|
+
sourceType?: string;
|
|
757
|
+
targetType?: string;
|
|
758
|
+
}>;
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
interface AssociationValue {
|
|
762
|
+
label: string;
|
|
763
|
+
value: string | number;
|
|
764
|
+
record?: Record<string, any>;
|
|
765
|
+
}
|
|
766
|
+
interface AssociationFormFieldProps extends BaseFieldProps {
|
|
767
|
+
defaultValue?: AssociationValue | AssociationValue[];
|
|
768
|
+
associationForm?: AssociationFormConfig;
|
|
769
|
+
multiple?: boolean;
|
|
770
|
+
allowClear?: boolean;
|
|
771
|
+
showSearch?: boolean;
|
|
772
|
+
}
|
|
773
|
+
type EditorToolbarAction = 'undo' | 'redo' | 'heading' | 'fontFamily' | 'fontSize' | 'bold' | 'italic' | 'underline' | 'strike' | 'superscript' | 'subscript' | 'color' | 'highlight' | 'bulletList' | 'orderedList' | 'taskList' | 'blockquote' | 'codeBlock' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'link' | 'image' | 'imageUrl' | 'table' | 'addColumnBefore' | 'addColumnAfter' | 'deleteColumn' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'toggleHeaderRow' | 'deleteTable' | 'clear';
|
|
774
|
+
interface EditorChoiceOption {
|
|
775
|
+
label: string;
|
|
776
|
+
value: string;
|
|
777
|
+
}
|
|
778
|
+
interface EditorFieldProps extends BaseFieldProps {
|
|
779
|
+
defaultValue?: string;
|
|
780
|
+
rows?: number;
|
|
781
|
+
maxLength?: number;
|
|
782
|
+
height?: number | string;
|
|
783
|
+
toolbarConfig?: 'full' | 'basic' | 'minimal' | EditorToolbarAction[] | string[];
|
|
784
|
+
uploadBucketName?: string;
|
|
785
|
+
maxImageSize?: number;
|
|
786
|
+
allowedImageTypes?: string[];
|
|
787
|
+
fontFamilies?: EditorChoiceOption[];
|
|
788
|
+
fontSizes?: EditorChoiceOption[];
|
|
789
|
+
colorPresets?: string[];
|
|
790
|
+
}
|
|
791
|
+
interface SerialNumberFieldProps extends BaseFieldProps {
|
|
792
|
+
defaultValue?: string;
|
|
793
|
+
serialNumberRule?: Array<Record<string, any>>;
|
|
794
|
+
}
|
|
795
|
+
interface LocationValue {
|
|
796
|
+
latitude: number;
|
|
797
|
+
longitude: number;
|
|
798
|
+
address?: string;
|
|
799
|
+
city?: string;
|
|
800
|
+
district?: string;
|
|
801
|
+
province?: string;
|
|
802
|
+
name?: string;
|
|
803
|
+
accuracy?: number;
|
|
804
|
+
source?: 'browser' | 'dingTalk' | 'manual';
|
|
805
|
+
time?: number;
|
|
806
|
+
}
|
|
807
|
+
interface LocationFieldProps extends BaseFieldProps {
|
|
808
|
+
defaultValue?: LocationValue;
|
|
809
|
+
allowClear?: boolean;
|
|
810
|
+
locateButtonText?: string;
|
|
811
|
+
clearButtonText?: string;
|
|
812
|
+
}
|
|
813
|
+
interface SignaturePoint {
|
|
814
|
+
x: number;
|
|
815
|
+
y: number;
|
|
816
|
+
t: number;
|
|
817
|
+
}
|
|
818
|
+
interface DigitalSignatureValue {
|
|
819
|
+
url?: string;
|
|
820
|
+
bucketName?: string;
|
|
821
|
+
objectName?: string;
|
|
822
|
+
previewUrl?: string;
|
|
823
|
+
points?: SignaturePoint[];
|
|
824
|
+
timestamp?: number;
|
|
825
|
+
hash?: string;
|
|
826
|
+
}
|
|
827
|
+
interface DigitalSignatureFieldProps extends BaseFieldProps {
|
|
828
|
+
defaultValue?: DigitalSignatureValue;
|
|
829
|
+
bucketName?: string;
|
|
830
|
+
allowClear?: boolean;
|
|
831
|
+
}
|
|
832
|
+
interface JSONFieldProps extends BaseFieldProps {
|
|
833
|
+
defaultValue?: any;
|
|
834
|
+
}
|
|
835
|
+
/** 流程状态 */
|
|
836
|
+
type ProcessStatus = 'running' | 'waiting' | 'exception' | 'completed' | 'terminated' | 'withdrawn' | 'pending' | 'cancelled';
|
|
837
|
+
/** 任务状态 */
|
|
838
|
+
type TaskStatus = 'pending' | 'approved' | 'rejected' | 'returned' | 'suspended' | 'cancelled' | 'copied' | 'waiting' | 'simulated';
|
|
839
|
+
/** 流程任务节点类型 */
|
|
840
|
+
type ProcessNodeType = 'start' | 'approval' | 'copy' | 'end' | 'system' | 'originator_return' | 'callback_wait';
|
|
841
|
+
/** 审批操作类型 */
|
|
842
|
+
type ApprovalActionType = 'agree' | 'approved' | 'rejected' | 'reject' | 'transfer' | 'return' | 'save' | 'withdraw' | 'resubmit' | 'callback';
|
|
843
|
+
/** 流程操作动作定义 */
|
|
844
|
+
interface ProcessAction {
|
|
845
|
+
action: ApprovalActionType;
|
|
846
|
+
name: {
|
|
847
|
+
zh_CN: string;
|
|
848
|
+
en_US?: string;
|
|
849
|
+
};
|
|
850
|
+
text?: {
|
|
851
|
+
zh_CN?: string;
|
|
852
|
+
en_US?: string;
|
|
853
|
+
};
|
|
854
|
+
hidden?: boolean;
|
|
855
|
+
remark?: {
|
|
856
|
+
popUp: boolean;
|
|
857
|
+
required?: boolean;
|
|
858
|
+
content?: {
|
|
859
|
+
zh_CN: string;
|
|
860
|
+
en_US?: string;
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
/** 流程任务 */
|
|
865
|
+
interface ProcessTask {
|
|
866
|
+
id?: string;
|
|
867
|
+
taskId: string;
|
|
868
|
+
nodeId: string;
|
|
869
|
+
nodeVisitId?: string;
|
|
870
|
+
nodeType: ProcessNodeType;
|
|
871
|
+
nodeName: string;
|
|
872
|
+
title?: string;
|
|
873
|
+
status: TaskStatus;
|
|
874
|
+
canApprove?: boolean;
|
|
875
|
+
assigneeId?: string;
|
|
876
|
+
assignee?: string;
|
|
877
|
+
assigneeName?: string;
|
|
878
|
+
departmentName?: string;
|
|
879
|
+
comments?: string;
|
|
880
|
+
createdAt?: string;
|
|
881
|
+
actionAt?: string;
|
|
882
|
+
actions?: ProcessAction[];
|
|
883
|
+
isSimulated?: boolean;
|
|
884
|
+
multiApproveMode?: 'and' | 'or' | string;
|
|
885
|
+
}
|
|
886
|
+
/** 流程基本信息 */
|
|
887
|
+
interface ProcessBasicInfo {
|
|
888
|
+
instanceId: string;
|
|
889
|
+
processStatus: ProcessStatus;
|
|
890
|
+
formUuid: string;
|
|
891
|
+
appType: string;
|
|
892
|
+
title?: string;
|
|
893
|
+
originatorId: string;
|
|
894
|
+
originatorName: string;
|
|
895
|
+
originatorDepartment?: string;
|
|
896
|
+
createdAt: string;
|
|
897
|
+
currentTask?: ProcessTask;
|
|
898
|
+
isExecuting?: boolean;
|
|
899
|
+
}
|
|
900
|
+
/** 审批权限 */
|
|
901
|
+
interface ApprovalPermission {
|
|
902
|
+
hasPermission: boolean;
|
|
903
|
+
canUndo: boolean;
|
|
904
|
+
isApprover: boolean;
|
|
905
|
+
currentTasks?: ProcessTask[];
|
|
906
|
+
futureTasksCount?: number;
|
|
907
|
+
details?: string;
|
|
908
|
+
}
|
|
909
|
+
/** 可退回节点 */
|
|
910
|
+
interface ReturnableNode {
|
|
911
|
+
nodeId: string;
|
|
912
|
+
nodeName: string;
|
|
913
|
+
id?: string;
|
|
914
|
+
name?: string;
|
|
915
|
+
type?: string;
|
|
916
|
+
}
|
|
917
|
+
interface ReturnPolicy {
|
|
918
|
+
resubmitMode?: string;
|
|
919
|
+
[key: string]: any;
|
|
920
|
+
}
|
|
921
|
+
interface ReturnableNodeResult {
|
|
922
|
+
nodes: ReturnableNode[];
|
|
923
|
+
policy?: ReturnPolicy | null;
|
|
924
|
+
}
|
|
925
|
+
/** 流程预览路由 */
|
|
926
|
+
interface ProcessRoute {
|
|
927
|
+
nodeId: string;
|
|
928
|
+
nodeName: string;
|
|
929
|
+
nodeType: ProcessNodeType;
|
|
930
|
+
assignees: Array<{
|
|
931
|
+
id: string;
|
|
932
|
+
name: string;
|
|
933
|
+
}>;
|
|
934
|
+
}
|
|
935
|
+
/** 流程定义 */
|
|
936
|
+
interface ProcessDefinition {
|
|
937
|
+
processId: string;
|
|
938
|
+
flowConfig?: Record<string, Record<string, FieldBehavior>>;
|
|
939
|
+
startNodeId?: string;
|
|
940
|
+
nodes?: Array<Record<string, any>>;
|
|
941
|
+
definitionJson?: Record<string, any>;
|
|
942
|
+
viewJson?: Record<string, any>;
|
|
943
|
+
}
|
|
944
|
+
/** 视图权限摘要 */
|
|
945
|
+
interface ViewPermissionSummary {
|
|
946
|
+
fieldPermissions: Record<string, 'FORM_FILED_HIDDEN' | 'FORM_FILED_VIEW' | 'FORM_FILED_EDIT'>;
|
|
947
|
+
operations: string[];
|
|
948
|
+
}
|
|
949
|
+
/** 表单实例数据 */
|
|
950
|
+
interface FormInstanceData {
|
|
951
|
+
formInstanceId: string;
|
|
952
|
+
formUuid: string;
|
|
953
|
+
appType: string;
|
|
954
|
+
title?: string;
|
|
955
|
+
instanceTitle?: string;
|
|
956
|
+
data: Record<string, any>;
|
|
957
|
+
creator?: {
|
|
958
|
+
userId: string;
|
|
959
|
+
name: string;
|
|
960
|
+
avatar?: string;
|
|
961
|
+
department?: string;
|
|
962
|
+
};
|
|
963
|
+
createdBy?: string;
|
|
964
|
+
createdByName?: string;
|
|
965
|
+
createdByDepartmentId?: string;
|
|
966
|
+
createdByDepartmentName?: string;
|
|
967
|
+
createdAt: string;
|
|
968
|
+
updatedAt?: string;
|
|
969
|
+
}
|
|
970
|
+
/** 变更记录 */
|
|
971
|
+
interface ChangeRecord {
|
|
972
|
+
id: string;
|
|
973
|
+
fieldId: string;
|
|
974
|
+
fieldLabel: string;
|
|
975
|
+
oldValue: any;
|
|
976
|
+
newValue: any;
|
|
977
|
+
operatorId: string;
|
|
978
|
+
operatorName: string;
|
|
979
|
+
operatedAt: string;
|
|
980
|
+
operatorDepartmentName?: string;
|
|
981
|
+
operationId?: string;
|
|
982
|
+
changeType?: 'create' | 'update' | 'delete' | string;
|
|
983
|
+
changeSource?: string;
|
|
984
|
+
changedCount?: number;
|
|
985
|
+
createdAt?: string;
|
|
986
|
+
changes?: Array<{
|
|
987
|
+
fieldKey?: string;
|
|
988
|
+
fieldLabel?: string;
|
|
989
|
+
beforeValue?: any;
|
|
990
|
+
afterValue?: any;
|
|
991
|
+
}>;
|
|
992
|
+
}
|
|
993
|
+
/** 变更记录列表响应 */
|
|
994
|
+
interface ChangeRecordListResponse {
|
|
995
|
+
records: ChangeRecord[];
|
|
996
|
+
total: number;
|
|
997
|
+
page: number;
|
|
998
|
+
pageSize: number;
|
|
999
|
+
}
|
|
1000
|
+
interface ApproveParams {
|
|
1001
|
+
instanceId: string;
|
|
1002
|
+
action: 'approved' | 'rejected';
|
|
1003
|
+
comments?: string;
|
|
1004
|
+
appType?: string;
|
|
1005
|
+
formUuid?: string;
|
|
1006
|
+
updateFormDataJson?: string;
|
|
1007
|
+
}
|
|
1008
|
+
interface TransferParams {
|
|
1009
|
+
taskId: string;
|
|
1010
|
+
newAssignee: string;
|
|
1011
|
+
reason?: string;
|
|
1012
|
+
}
|
|
1013
|
+
interface ReturnParams {
|
|
1014
|
+
taskId: string;
|
|
1015
|
+
targetNodeId: string;
|
|
1016
|
+
reason?: string;
|
|
1017
|
+
}
|
|
1018
|
+
interface WithdrawParams {
|
|
1019
|
+
instanceId: string;
|
|
1020
|
+
reason?: string;
|
|
1021
|
+
}
|
|
1022
|
+
interface SaveTaskParams {
|
|
1023
|
+
instanceId: string;
|
|
1024
|
+
formUuid: string;
|
|
1025
|
+
appType: string;
|
|
1026
|
+
updateFormDataJson: string;
|
|
1027
|
+
}
|
|
1028
|
+
interface ResubmitParams {
|
|
1029
|
+
taskId: string;
|
|
1030
|
+
formUuid: string;
|
|
1031
|
+
appType: string;
|
|
1032
|
+
updateFormDataJson: string;
|
|
1033
|
+
comments?: string;
|
|
1034
|
+
selectedApprovers?: InitiatorSelectedApprovers;
|
|
1035
|
+
initiatorSelectedApprovers?: InitiatorSelectedApprovers;
|
|
1036
|
+
}
|
|
1037
|
+
interface PreviewParams {
|
|
1038
|
+
formUuid: string;
|
|
1039
|
+
appType: string;
|
|
1040
|
+
data: Record<string, any>;
|
|
1041
|
+
submissionDepartmentId?: string;
|
|
1042
|
+
selectedApprovers?: InitiatorSelectedApprovers;
|
|
1043
|
+
initiatorSelectedApprovers?: InitiatorSelectedApprovers;
|
|
1044
|
+
}
|
|
1045
|
+
interface FormDataQueryParams {
|
|
1046
|
+
formInstanceId: string;
|
|
1047
|
+
appType: string;
|
|
1048
|
+
formUuid: string;
|
|
1049
|
+
}
|
|
1050
|
+
interface FormDataDeleteParams {
|
|
1051
|
+
formInstanceId: string;
|
|
1052
|
+
appType: string;
|
|
1053
|
+
formUuid: string;
|
|
1054
|
+
}
|
|
1055
|
+
interface ChangeRecordQueryParams {
|
|
1056
|
+
formUuid: string;
|
|
1057
|
+
appType: string;
|
|
1058
|
+
formInstanceId: string;
|
|
1059
|
+
page?: number;
|
|
1060
|
+
pageSize?: number;
|
|
1061
|
+
}
|
|
1062
|
+
interface ViewPermissionQueryParams {
|
|
1063
|
+
formUuid: string;
|
|
1064
|
+
appType: string;
|
|
1065
|
+
formInstanceId?: string;
|
|
1066
|
+
}
|
|
1067
|
+
/** 状态元信息(用于 UI 渲染) */
|
|
1068
|
+
interface StatusMeta {
|
|
1069
|
+
label: string;
|
|
1070
|
+
tone: 'brand' | 'success' | 'danger' | 'neutral' | 'warning';
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
export { FormSection as $, type AddressFieldProps as A, type BaseFieldProps as B, type CascadeDateFieldProps as C, type DataFilter as D, type DigitalSignatureValue as E, type EditorChoiceOption as F, type EditorFieldProps as G, type EditorToolbarAction as H, type FieldBehavior as I, type FieldDefinition as J, type FieldLayoutNode as K, type FieldValueSyncConfig as L, type FormAppearanceConfig as M, type FormDataDeleteParams as N, type FormDataQueryParams as O, type FormEffect as P, type FormEffectAction as Q, type FormEffectCondition as R, type FormEffectConditionOperator as S, type FormEngineConfig as T, type FormEngineMode as U, type FormInstanceData as V, type FormLayoutNode as W, type FormRuntimeApi as X, type FormRuntimeApiConfig as Y, type FormRuntimeConfig as Z, type FormSchema as _, type AddressValue as a, type UserItem as a$, type FormSectionProps as a0, type FormTemplateConfig as a1, type GridLayoutCell as a2, type GridLayoutNode as a3, type ImageFieldProps as a4, type InitiatorSelectCandidate as a5, type InitiatorSelectRequirement as a6, type InitiatorSelectScope as a7, type InitiatorSelectedApprovers as a8, type JSONFieldProps as a9, type ReturnPolicy as aA, type ReturnableNode as aB, type ReturnableNodeResult as aC, type RuntimeDataQueryParams as aD, type RuntimeDataQueryResult as aE, type RuntimeRequestConfig as aF, type RuntimeResponse as aG, type SaveTaskParams as aH, type SectionLayoutNode as aI, type SelectFieldProps as aJ, type SerialNumberFieldProps as aK, type SignaturePoint as aL, type StandardFormPageMode as aM, type StatusMeta as aN, type StepLayoutItem as aO, type StepsLayoutNode as aP, type SubFormColumn as aQ, type SubFormFieldProps as aR, type TabLayoutItem as aS, type TabsLayoutNode as aT, type TaskStatus as aU, type TextAreaFieldProps as aV, type TextFieldProps as aW, type TextShortcutConfig as aX, type TextShortcutType as aY, type TransferParams as aZ, type UserDisplayFormat as a_, type LayoutVisibleWhen as aa, type LinkedFormOptionConfig as ab, type LocationFieldProps as ac, type LocationValue as ad, type LowcodePageMeta as ae, type LowcodePageNode as af, type LowcodePageNodeType as ag, type LowcodePageSchema as ah, type MultiSelectFieldProps as ai, type NumberFieldProps as aj, type OptionItem as ak, type OptionSourceConfig as al, type OptionSourceType as am, type PeopleShortcutConfig as an, type PeopleShortcutType as ao, type PreviewParams as ap, type ProcessAction as aq, type ProcessBasicInfo as ar, type ProcessDefinition as as, type ProcessNodeType as at, type ProcessRoute as au, type ProcessStatus as av, type ProcessTask as aw, type RadioFieldProps as ax, type ResubmitParams as ay, type ReturnParams as az, type ApprovalActionType as b, type UserSelectFieldProps as b0, type ValidationPreset as b1, type ValidationRule as b2, type ViewPermissionQueryParams as b3, type ViewPermissionSummary as b4, type WithdrawParams as b5, type ApprovalPermission as c, type ApproveParams as d, type AssociationFormConfig as e, type AssociationFormFieldProps as f, type AssociationValue as g, type AttachmentFieldProps as h, type AttachmentItem as i, type BaseLayoutNode as j, type CascadeSelectFieldProps as k, type ChangeRecord as l, type ChangeRecordListResponse as m, type ChangeRecordQueryParams as n, type CheckboxFieldProps as o, type DataLinkageCondition as p, type DataLinkageConfig as q, type DateFieldProps as r, type DateRangeRestriction as s, type DateRestrictionConfig as t, type DateShortcutConfig as u, type DateShortcutType as v, type DefaultValueLinkageConfig as w, type DepartmentSelectFieldProps as x, type DepartmentTreeNode as y, type DigitalSignatureFieldProps as z };
|