sy-form-components 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -222,6 +222,12 @@ interface AttachmentFieldProps extends BaseFieldProps {
222
222
  bucketName?: string;
223
223
  multiple?: boolean;
224
224
  allowedTypes?: string[];
225
+ showPreview?: boolean;
226
+ showDownload?: boolean;
227
+ showFileSize?: boolean;
228
+ showFileTypeBadge?: boolean;
229
+ previewPagePath?: string;
230
+ mobileDownloadMode?: 'auto' | 'direct' | 'ticketRelay';
225
231
  }
226
232
  /** ImageField 专用 Props */
227
233
  interface ImageFieldProps extends BaseFieldProps {
@@ -232,6 +238,10 @@ interface ImageFieldProps extends BaseFieldProps {
232
238
  bucketName?: string;
233
239
  multiple?: boolean;
234
240
  maxSize?: number;
241
+ listType?: 'text' | 'picture' | 'picture-card';
242
+ showPreviewIcon?: boolean;
243
+ showRemoveIcon?: boolean;
244
+ showDownloadIcon?: boolean;
235
245
  }
236
246
  /** 子表单列定义 */
237
247
  interface SubFormColumn {
@@ -267,6 +277,10 @@ interface UserSelectFieldProps extends BaseFieldProps {
267
277
  multiple?: boolean;
268
278
  searchable?: boolean;
269
279
  dataSource?: UserItem[];
280
+ treeData?: DepartmentTreeNode[];
281
+ allowClear?: boolean;
282
+ maxCount?: number;
283
+ notFoundContent?: string;
270
284
  }
271
285
  /** 部门树节点 */
272
286
  interface DepartmentTreeNode {
@@ -288,6 +302,9 @@ interface DepartmentSelectFieldProps extends BaseFieldProps {
288
302
  }[];
289
303
  multiple?: boolean;
290
304
  treeData?: DepartmentTreeNode[];
305
+ allowClear?: boolean;
306
+ maxCount?: number;
307
+ notFoundContent?: string;
291
308
  }
292
309
  interface CascadeSelectFieldProps extends BaseFieldProps {
293
310
  defaultValue?: OptionItem[] | OptionItem[][];
@@ -328,9 +345,27 @@ interface AssociationFormConfig {
328
345
  title?: string;
329
346
  dataIndex: string;
330
347
  key?: string;
348
+ width?: number;
349
+ ellipsis?: boolean;
350
+ }>;
351
+ dataFilterRules?: Array<{
352
+ key: string;
353
+ operator?: string;
354
+ componentName?: string;
355
+ value?: string | number;
356
+ valueType?: 'manual' | 'currentField';
357
+ currentFieldKey?: string;
331
358
  }>;
332
- dataFilterRules?: any[];
333
359
  dataFilterConditionType?: 'AND' | 'OR';
360
+ dataFillingEnabled?: boolean;
361
+ dataFillingRules?: {
362
+ mainRules?: Array<{
363
+ source: string;
364
+ target: string;
365
+ sourceType?: string;
366
+ targetType?: string;
367
+ }>;
368
+ };
334
369
  }
335
370
  interface AssociationValue {
336
371
  label: string;
@@ -348,6 +383,11 @@ interface EditorFieldProps extends BaseFieldProps {
348
383
  defaultValue?: string;
349
384
  rows?: number;
350
385
  maxLength?: number;
386
+ height?: number | string;
387
+ toolbarConfig?: 'full' | 'basic' | 'minimal' | string[];
388
+ uploadBucketName?: string;
389
+ maxImageSize?: number;
390
+ allowedImageTypes?: string[];
351
391
  }
352
392
  interface SerialNumberFieldProps extends BaseFieldProps {
353
393
  defaultValue?: string;
package/dist/index.d.ts CHANGED
@@ -222,6 +222,12 @@ interface AttachmentFieldProps extends BaseFieldProps {
222
222
  bucketName?: string;
223
223
  multiple?: boolean;
224
224
  allowedTypes?: string[];
225
+ showPreview?: boolean;
226
+ showDownload?: boolean;
227
+ showFileSize?: boolean;
228
+ showFileTypeBadge?: boolean;
229
+ previewPagePath?: string;
230
+ mobileDownloadMode?: 'auto' | 'direct' | 'ticketRelay';
225
231
  }
226
232
  /** ImageField 专用 Props */
227
233
  interface ImageFieldProps extends BaseFieldProps {
@@ -232,6 +238,10 @@ interface ImageFieldProps extends BaseFieldProps {
232
238
  bucketName?: string;
233
239
  multiple?: boolean;
234
240
  maxSize?: number;
241
+ listType?: 'text' | 'picture' | 'picture-card';
242
+ showPreviewIcon?: boolean;
243
+ showRemoveIcon?: boolean;
244
+ showDownloadIcon?: boolean;
235
245
  }
236
246
  /** 子表单列定义 */
237
247
  interface SubFormColumn {
@@ -267,6 +277,10 @@ interface UserSelectFieldProps extends BaseFieldProps {
267
277
  multiple?: boolean;
268
278
  searchable?: boolean;
269
279
  dataSource?: UserItem[];
280
+ treeData?: DepartmentTreeNode[];
281
+ allowClear?: boolean;
282
+ maxCount?: number;
283
+ notFoundContent?: string;
270
284
  }
271
285
  /** 部门树节点 */
272
286
  interface DepartmentTreeNode {
@@ -288,6 +302,9 @@ interface DepartmentSelectFieldProps extends BaseFieldProps {
288
302
  }[];
289
303
  multiple?: boolean;
290
304
  treeData?: DepartmentTreeNode[];
305
+ allowClear?: boolean;
306
+ maxCount?: number;
307
+ notFoundContent?: string;
291
308
  }
292
309
  interface CascadeSelectFieldProps extends BaseFieldProps {
293
310
  defaultValue?: OptionItem[] | OptionItem[][];
@@ -328,9 +345,27 @@ interface AssociationFormConfig {
328
345
  title?: string;
329
346
  dataIndex: string;
330
347
  key?: string;
348
+ width?: number;
349
+ ellipsis?: boolean;
350
+ }>;
351
+ dataFilterRules?: Array<{
352
+ key: string;
353
+ operator?: string;
354
+ componentName?: string;
355
+ value?: string | number;
356
+ valueType?: 'manual' | 'currentField';
357
+ currentFieldKey?: string;
331
358
  }>;
332
- dataFilterRules?: any[];
333
359
  dataFilterConditionType?: 'AND' | 'OR';
360
+ dataFillingEnabled?: boolean;
361
+ dataFillingRules?: {
362
+ mainRules?: Array<{
363
+ source: string;
364
+ target: string;
365
+ sourceType?: string;
366
+ targetType?: string;
367
+ }>;
368
+ };
334
369
  }
335
370
  interface AssociationValue {
336
371
  label: string;
@@ -348,6 +383,11 @@ interface EditorFieldProps extends BaseFieldProps {
348
383
  defaultValue?: string;
349
384
  rows?: number;
350
385
  maxLength?: number;
386
+ height?: number | string;
387
+ toolbarConfig?: 'full' | 'basic' | 'minimal' | string[];
388
+ uploadBucketName?: string;
389
+ maxImageSize?: number;
390
+ allowedImageTypes?: string[];
351
391
  }
352
392
  interface SerialNumberFieldProps extends BaseFieldProps {
353
393
  defaultValue?: string;