@byteluck-fe/model-driven-core 7.0.0-beta.1 → 7.0.0-beta.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.
@@ -47,12 +47,15 @@ declare class Control {
47
47
  toSchema(): BaseControlSchema<ControlsKeys, Property>;
48
48
  updateSetting: typeof updateSetting;
49
49
  removeSetting: typeof removeSetting;
50
+ removeSettingByKeyAndName: typeof removeSettingByKeyAndName;
50
51
  static updateBasicControl(key: 'setting', setting: {
51
52
  add?: SettingOption[];
52
53
  remove?: string[];
53
54
  update?: string[];
54
55
  }): void;
55
56
  static removeSettingItem: typeof removeSetting;
57
+ static removeSettingByKeyAndName: typeof removeSettingByKeyAndName;
58
+ static removeSettingItemByKeyAndName: typeof removeSettingByKeyAndName;
56
59
  static updateSettingItem: typeof updateSetting;
57
60
  }
58
61
  export default Control;
@@ -63,6 +66,17 @@ export { Control as DesignerControl };
63
66
  * @param keys 需要删除的key或key组成的数组
64
67
  * */
65
68
  declare function removeSetting(keys: Array<string | HideOptions> | string | HideOptions): void;
69
+ /**
70
+ * @function 根据key和name删除控件或者实例上的setting
71
+ * @description 用于删除使用公共key但通过name区分的setting项
72
+ * @param options 需要删除的setting key和name
73
+ * */
74
+ interface RemoveSettingByKeyAndNameOption {
75
+ key: string;
76
+ name: string;
77
+ }
78
+ declare function removeSettingByKeyAndName(options: RemoveSettingByKeyAndNameOption[]): void;
79
+ declare function removeSettingByKeyAndName(key: string, name: string): void;
66
80
  interface UpdateSettingOption {
67
81
  showItems: COMMON_SETTING_TYPE[];
68
82
  type?: 'push' | 'replace';
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_property
3
+ * description: 基础属性定义。提供控件通用的隐藏状态、类名、样式、标题和默认状态配置,是表单、布局、列表等属性模型的公共基类。
4
+ */
1
5
  import { RuleItem } from '../Validator';
2
6
  import { BaseStyle } from '../../framework';
3
7
  import { MODE } from 'type';
@@ -52,10 +56,34 @@ declare class Property implements PropertyInterface {
52
56
  static mode: MODE;
53
57
  static readonly Rules: typeof PropertyRules;
54
58
  static readonly RuntimeRules: typeof PropertyRuntimeRules;
59
+ /**
60
+ * 是否隐藏
61
+ * @public
62
+ * @defaultValue false
63
+ */
55
64
  isHide: boolean;
65
+ /**
66
+ * 类名
67
+ * @public
68
+ * @noSchema
69
+ */
56
70
  className?: string[];
71
+ /**
72
+ * 样式
73
+ * @public
74
+ * @noSchema
75
+ */
57
76
  style: BaseStyle;
77
+ /**
78
+ * 标题
79
+ * @public
80
+ * @defaultValue ''
81
+ */
58
82
  caption: string;
83
+ /**
84
+ * 默认状态
85
+ * @public
86
+ */
59
87
  defaultState: 'readonly' | 'default';
60
88
  constructor(props?: Partial<Property>, caption?: string);
61
89
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_column_control_property
3
+ * description: 列控件基础属性定义。提供列宽、标题、数据绑定、自适应宽度、冻结、排序、对齐、跨列、自动高度和子控件配置。
4
+ */
1
5
  import { Property, PropertyInterface, PropertyRules, RuntimeControl } from '../BaseControl';
2
6
  import { RuleItem } from 'async-validator';
3
7
  import { DataBind, DataSourceBind, OptionSetting, AutoWidth } from '../../framework';
@@ -63,16 +67,54 @@ interface ColumnControlPropertyInterface extends PropertyInterface {
63
67
  */
64
68
  declare class ColumnControlProperty extends Property implements ColumnControlPropertyInterface {
65
69
  static readonly Rules: typeof ColumnControlPropertyRules;
70
+ /**
71
+ * 宽度类型
72
+ * @defaultValue 'auto'
73
+ */
66
74
  widthType: 'px' | 'auto' | 'percent';
75
+ /**
76
+ * 宽度
77
+ * @defaultValue 150
78
+ */
67
79
  width: number;
80
+ /**
81
+ * 标题
82
+ */
68
83
  caption: string;
84
+ /**
85
+ * 绑定数据项
86
+ */
69
87
  dataBind: DataBind;
88
+ /**
89
+ * 自适应页面宽度
90
+ */
70
91
  autoWidth: AutoWidth;
92
+ /**
93
+ * 冻结
94
+ * @defaultValue 'none'
95
+ */
71
96
  fixed: 'left' | 'right' | 'none';
97
+ /**
98
+ * 表头排序
99
+ * @defaultValue true
100
+ */
72
101
  sort: boolean;
102
+ /**
103
+ * 对齐
104
+ */
73
105
  align?: 'left' | 'right' | 'center';
106
+ /**
107
+ * @internal
108
+ */
74
109
  colSpan?: string;
110
+ /**
111
+ * 自动高度
112
+ * @defaultValue false
113
+ */
75
114
  autoHeight: boolean;
115
+ /**
116
+ * 子控件
117
+ */
76
118
  children: RuntimeControl[];
77
119
  constructor(props?: Partial<ColumnControlProperty>);
78
120
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_layout_control_property
3
+ * description: 布局控件基础属性定义。继承通用属性能力,为行、列、容器、页签等布局类控件提供统一的属性模型。
4
+ */
1
5
  import { Property, PropertyInterface } from '../BaseControl';
2
6
  interface LayoutControlPropertyInterface extends PropertyInterface {
3
7
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_list_control_property
3
+ * description: 列表控件基础属性定义。提供表头、表尾、分页页码、每页条数、分页选项和总条数等列表通用配置。
4
+ */
1
5
  import { DesignerControl, Property, PropertyInterface, RuntimeControl } from '../BaseControl';
2
6
  import { ControlsKeys, BaseControlSchema, MODE } from '../../type';
3
7
  import { DesignerListControl } from './designer';
@@ -30,11 +34,29 @@ interface ListControlPropertyInterface<Mode extends MODE | 'Schema', Control ext
30
34
  totalCount: number;
31
35
  }
32
36
  declare class ListControlProperty<Mode extends MODE | 'Schema', Control extends object = ControlType<Mode>> extends Property implements ListControlPropertyInterface<Mode, Control> {
37
+ /**
38
+ * 表头控件
39
+ */
33
40
  headers: Control[];
41
+ /**
42
+ * 表尾控件
43
+ */
34
44
  footers?: Control[];
45
+ /**
46
+ * 当前页码
47
+ */
35
48
  pageIndex: number;
49
+ /**
50
+ * 每页条数
51
+ */
36
52
  pageSize: number;
53
+ /**
54
+ * 每页条数选项
55
+ */
37
56
  pageSizeOptions: number[];
57
+ /**
58
+ * 总条数
59
+ */
38
60
  totalCount: number;
39
61
  constructor(parent: DesignerListControl | RuntimeListControl, props?: Partial<ListControlProperty<Mode> & {
40
62
  headers: Control[];
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_search_control_property
3
+ * description: 查询控件基础属性定义。提供查询视图的数据项绑定配置,用于搜索区域控件与数据字段建立关联。
4
+ */
1
5
  import { LayoutControlProperty, LayoutControlPropertyInterface } from '../LayoutControl';
2
6
  import { DataBind } from '../../framework';
3
7
  interface SearchControlPropertyInterface extends LayoutControlPropertyInterface {
@@ -7,6 +11,9 @@ interface SearchControlPropertyInterface extends LayoutControlPropertyInterface
7
11
  dataBind: DataBind;
8
12
  }
9
13
  declare class SearchControlProperty extends LayoutControlProperty implements SearchControlPropertyInterface {
14
+ /**
15
+ * 绑定数据项
16
+ */
10
17
  dataBind: DataBind;
11
18
  constructor(props?: Partial<SearchControlProperty>);
12
19
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * name: base_wrap_control_property
3
+ * description: 包裹控件基础属性定义。继承布局属性能力,为外层包裹类控件提供统一的属性模型。
4
+ */
1
5
  import { LayoutControlProperty, LayoutControlPropertyInterface } from '../LayoutControl';
2
6
  interface WrapControlPropertyInterface extends LayoutControlPropertyInterface {
3
7
  }
@@ -429,6 +429,167 @@ export declare class ActionSourceBind {
429
429
  actionCode: string;
430
430
  constructor(props?: Partial<ActionSourceBind>);
431
431
  }
432
+ /**
433
+ * 业务行动服务信息
434
+ * @public
435
+ */
436
+ export declare class BizActionServiceName {
437
+ /**
438
+ * 业务行动编码
439
+ * @defaultValue ''
440
+ * @public
441
+ */
442
+ actionCode: string;
443
+ /**
444
+ * 数据编码
445
+ * @defaultValue ''
446
+ * @public
447
+ */
448
+ dataCode: string;
449
+ /**
450
+ * 名称
451
+ * @defaultValue ''
452
+ * @public
453
+ */
454
+ name: string;
455
+ /**
456
+ * 应用名称
457
+ * @defaultValue ''
458
+ * @public
459
+ */
460
+ appName: string;
461
+ /**
462
+ * 数据名称
463
+ * @defaultValue ''
464
+ * @public
465
+ */
466
+ dataName: string;
467
+ /**
468
+ * 业务行动名称
469
+ * @defaultValue ''
470
+ * @public
471
+ */
472
+ actionName: string;
473
+ /**
474
+ * 展示名称
475
+ * @defaultValue ''
476
+ * @public
477
+ */
478
+ displayName: string;
479
+ /**
480
+ * 服务类型
481
+ * @defaultValue ''
482
+ * @public
483
+ */
484
+ svcTypeEnum: string;
485
+ constructor(props?: Partial<BizActionServiceName>);
486
+ }
487
+ /**
488
+ * 业务行动右值变量
489
+ * @public
490
+ */
491
+ export declare class BizActionRightVariable {
492
+ /**
493
+ * 变量类型
494
+ * @defaultValue 'custom'
495
+ * @public
496
+ */
497
+ type: 'form' | 'system' | 'custom' | 'gv';
498
+ /**
499
+ * 变量值
500
+ * @defaultValue []
501
+ * @public
502
+ */
503
+ value: Array<string | number>;
504
+ /**
505
+ * 展示对象
506
+ * @defaultValue []
507
+ * @public
508
+ */
509
+ displayBos: Record<string, unknown>[];
510
+ constructor(props?: Partial<BizActionRightVariable>);
511
+ }
512
+ /**
513
+ * 业务行动入参
514
+ * @public
515
+ */
516
+ export declare class BizActionInputParam {
517
+ /**
518
+ * 参数ID
519
+ * @defaultValue ''
520
+ * @public
521
+ */
522
+ id: string;
523
+ /**
524
+ * 参数名称
525
+ * @defaultValue ''
526
+ * @public
527
+ */
528
+ name: string;
529
+ /**
530
+ * 是否必填
531
+ * @defaultValue false
532
+ * @public
533
+ */
534
+ required: boolean;
535
+ /**
536
+ * 参数类型
537
+ * @defaultValue ''
538
+ * @public
539
+ */
540
+ paramType: string;
541
+ /**
542
+ * 参数右值变量
543
+ * @defaultValue new BizActionRightVariable()
544
+ * @public
545
+ */
546
+ rightVariableBo: BizActionRightVariable;
547
+ constructor(props?: Partial<BizActionInputParam>);
548
+ }
549
+ /**
550
+ * 业务行动配置
551
+ * @public
552
+ */
553
+ export declare class BizActionObject {
554
+ /**
555
+ * 服务信息
556
+ * @defaultValue new BizActionServiceName()
557
+ * @public
558
+ */
559
+ serviceName: BizActionServiceName;
560
+ /**
561
+ * 入参列表
562
+ * @defaultValue []
563
+ * @public
564
+ */
565
+ inputParam: BizActionInputParam[];
566
+ constructor(props?: Partial<BizActionObject>);
567
+ }
568
+ /**
569
+ * 操作行动项配置
570
+ * @public
571
+ */
572
+ export declare class ActionObject {
573
+ /**
574
+ * 行动编码
575
+ * @defaultValue ''
576
+ * @public
577
+ */
578
+ actionCode: string;
579
+ /**
580
+ * 行动类型
581
+ * @defaultValue ''
582
+ * @public
583
+ */
584
+ actionType: string;
585
+ /**
586
+ * 业务行动配置
587
+ * @defaultValue new BizActionObject()
588
+ * @public
589
+ */
590
+ bizAction: BizActionObject;
591
+ constructor(props?: Partial<ActionObject>);
592
+ }
432
593
  export declare class SelectedContentConfig {
433
594
  /**
434
595
  * 展示已选内容
@@ -935,6 +1096,10 @@ export declare class OptObject {
935
1096
  * @public
936
1097
  */
937
1098
  optType: string;
1099
+ /**
1100
+ * @description 操作项构造函数
1101
+ * @param props
1102
+ */
938
1103
  constructor(props?: Partial<OptObject>);
939
1104
  }
940
1105
  export declare class RowStyleRule {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-core",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.10",
4
4
  "description": "model engine core",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -26,9 +26,9 @@
26
26
  "postpublish": "node ../../scripts/postpublish.js"
27
27
  },
28
28
  "dependencies": {
29
- "@byteluck-fe/model-driven-shared": "7.0.0-beta.1",
29
+ "@byteluck-fe/model-driven-shared": "7.0.0-beta.3",
30
30
  "async-validator": "3.5.1",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
- "gitHead": "c54bfd57e249dec34da66f91e13ab8244c67132a"
33
+ "gitHead": "61e45af858266396a6f34524d6444777f682fdf0"
34
34
  }