@byteluck-fe/model-driven-core 7.0.0-beta.4 → 7.0.0-beta.8

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.
@@ -1,4 +1,7 @@
1
- function _assert_this_initialized(self) {
1
+ /**
2
+ * name: base_property
3
+ * description: 基础属性定义。提供控件通用的隐藏状态、类名、样式、标题和默认状态配置,是表单、布局、列表等属性模型的公共基类。
4
+ */ function _assert_this_initialized(self) {
2
5
  if (self === void 0) {
3
6
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
7
  }
@@ -141,11 +144,30 @@ var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
141
144
  var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
142
145
  _class_call_check(this, Property);
143
146
  var _ref, _ref1;
144
- _define_property(this, "isHide", void 0);
145
- _define_property(this, "className", void 0);
146
- _define_property(this, "style", void 0);
147
- _define_property(this, "caption", void 0);
148
- _define_property(this, "defaultState", void 0);
147
+ /**
148
+ * 是否隐藏
149
+ * @public
150
+ * @defaultValue false
151
+ */ _define_property(this, "isHide", void 0);
152
+ /**
153
+ * 类名
154
+ * @public
155
+ * @noSchema
156
+ */ _define_property(this, "className", void 0);
157
+ /**
158
+ * 样式
159
+ * @public
160
+ * @noSchema
161
+ */ _define_property(this, "style", void 0);
162
+ /**
163
+ * 标题
164
+ * @public
165
+ * @defaultValue ''
166
+ */ _define_property(this, "caption", void 0);
167
+ /**
168
+ * 默认状态
169
+ * @public
170
+ */ _define_property(this, "defaultState", void 0);
149
171
  this.isHide = (_ref = props === null || props === void 0 ? void 0 : props.isHide) !== null && _ref !== void 0 ? _ref : false;
150
172
  this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
151
173
  this.caption = (_ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref1 !== void 0 ? _ref1 : caption;
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
70
70
  return !!result;
71
71
  })();
72
72
  }
73
- import { Property, PropertyRules } from '../BaseControl';
73
+ /**
74
+ * name: base_column_control_property
75
+ * description: 列控件基础属性定义。提供列宽、标题、数据绑定、自适应宽度、冻结、排序、对齐、跨列、自动高度和子控件配置。
76
+ */ import { Property, PropertyRules } from '../BaseControl';
74
77
  import { initOptionAndDataSourceRules } from '../initOptionAndDataSourceRules';
75
78
  import { DataBind, AutoWidth } from '../../framework';
76
79
  import { getLocaleText } from '@byteluck-fe/locale-message';
@@ -108,7 +111,34 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
108
111
  var _ref, _ref1, _ref2, _ref3, _ref4;
109
112
  _this = _call_super(this, ColumnControlProperty, [
110
113
  props
111
- ]), _define_property(_this, "widthType", void 0), _define_property(_this, "width", void 0), _define_property(_this, "caption", void 0), _define_property(_this, "dataBind", void 0), _define_property(_this, "autoWidth", void 0), _define_property(_this, "fixed", void 0), _define_property(_this, "sort", void 0), _define_property(_this, "align", void 0), _define_property(_this, "colSpan", void 0), _define_property(_this, "autoHeight", void 0), _define_property(_this, "children", void 0);
114
+ ]), /**
115
+ * 宽度类型
116
+ * @defaultValue 'auto'
117
+ */ _define_property(_this, "widthType", void 0), /**
118
+ * 宽度
119
+ * @defaultValue 150
120
+ */ _define_property(_this, "width", void 0), /**
121
+ * 标题
122
+ */ _define_property(_this, "caption", void 0), /**
123
+ * 绑定数据项
124
+ */ _define_property(_this, "dataBind", void 0), /**
125
+ * 自适应页面宽度
126
+ */ _define_property(_this, "autoWidth", void 0), /**
127
+ * 冻结
128
+ * @defaultValue 'none'
129
+ */ _define_property(_this, "fixed", void 0), /**
130
+ * 表头排序
131
+ * @defaultValue true
132
+ */ _define_property(_this, "sort", void 0), /**
133
+ * 对齐
134
+ */ _define_property(_this, "align", void 0), /**
135
+ * @internal
136
+ */ _define_property(_this, "colSpan", void 0), /**
137
+ * 自动高度
138
+ * @defaultValue false
139
+ */ _define_property(_this, "autoHeight", void 0), /**
140
+ * 子控件
141
+ */ _define_property(_this, "children", void 0);
112
142
  _this.width = (_ref = props === null || props === void 0 ? void 0 : props.width) !== null && _ref !== void 0 ? _ref : 150;
113
143
  _this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || 'auto';
114
144
  _this.caption = (_ref1 = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref1 !== void 0 ? _ref1 : '';
@@ -1,4 +1,7 @@
1
- function _assert_this_initialized(self) {
1
+ /**
2
+ * name: base_form_control_property
3
+ * description: 表单控件基础属性定义。提供字段绑定、标题展示、占位提示、默认值、必填校验、只读状态和气泡提示等表单通用配置。
4
+ */ function _assert_this_initialized(self) {
2
5
  if (self === void 0) {
3
6
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
7
  }
@@ -57,7 +57,10 @@ function _is_native_reflect_construct() {
57
57
  return !!result;
58
58
  })();
59
59
  }
60
- import { Property } from '../BaseControl';
60
+ /**
61
+ * name: base_layout_control_property
62
+ * description: 布局控件基础属性定义。继承通用属性能力,为行、列、容器、页签等布局类控件提供统一的属性模型。
63
+ */ import { Property } from '../BaseControl';
61
64
  var LayoutControlProperty = /*#__PURE__*/ function(Property) {
62
65
  "use strict";
63
66
  _inherits(LayoutControlProperty, Property);
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
70
70
  return !!result;
71
71
  })();
72
72
  }
73
- import { Property } from '../BaseControl';
73
+ /**
74
+ * name: base_list_control_property
75
+ * description: 列表控件基础属性定义。提供表头、表尾、分页页码、每页条数、分页选项和总条数等列表通用配置。
76
+ */ import { Property } from '../BaseControl';
74
77
  import { defineControlArrayToProperty } from '../ControlArray';
75
78
  var ListControlProperty = /*#__PURE__*/ function(Property) {
76
79
  "use strict";
@@ -81,7 +84,19 @@ var ListControlProperty = /*#__PURE__*/ function(Property) {
81
84
  var _ref, _ref1, _ref2, _ref3;
82
85
  _this = _call_super(this, ListControlProperty, [
83
86
  props
84
- ]), _define_property(_this, "headers", void 0), _define_property(_this, "footers", void 0), _define_property(_this, "pageIndex", void 0), _define_property(_this, "pageSize", void 0), _define_property(_this, "pageSizeOptions", void 0), _define_property(_this, "totalCount", void 0);
87
+ ]), /**
88
+ * 表头控件
89
+ */ _define_property(_this, "headers", void 0), /**
90
+ * 表尾控件
91
+ */ _define_property(_this, "footers", void 0), /**
92
+ * 当前页码
93
+ */ _define_property(_this, "pageIndex", void 0), /**
94
+ * 每页条数
95
+ */ _define_property(_this, "pageSize", void 0), /**
96
+ * 每页条数选项
97
+ */ _define_property(_this, "pageSizeOptions", void 0), /**
98
+ * 总条数
99
+ */ _define_property(_this, "totalCount", void 0);
85
100
  defineControlArrayToProperty(_this, 'headers', props === null || props === void 0 ? void 0 : props.headers, parent, mode);
86
101
  defineControlArrayToProperty(_this, 'footers', props === null || props === void 0 ? void 0 : props.footers, parent);
87
102
  _this.pageIndex = (_ref = props === null || props === void 0 ? void 0 : props.pageIndex) !== null && _ref !== void 0 ? _ref : 1;
@@ -70,7 +70,10 @@ function _is_native_reflect_construct() {
70
70
  return !!result;
71
71
  })();
72
72
  }
73
- import { LayoutControlProperty } from '../LayoutControl';
73
+ /**
74
+ * name: base_search_control_property
75
+ * description: 查询控件基础属性定义。提供查询视图的数据项绑定配置,用于搜索区域控件与数据字段建立关联。
76
+ */ import { LayoutControlProperty } from '../LayoutControl';
74
77
  import { DataBind } from '../../framework';
75
78
  var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
76
79
  "use strict";
@@ -80,7 +83,9 @@ var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
80
83
  var _this;
81
84
  _this = _call_super(this, SearchControlProperty, [
82
85
  props
83
- ]), _define_property(_this, "dataBind", void 0);
86
+ ]), /**
87
+ * 绑定数据项
88
+ */ _define_property(_this, "dataBind", void 0);
84
89
  _this.dataBind = new DataBind(props === null || props === void 0 ? void 0 : props.dataBind);
85
90
  return _this;
86
91
  }
@@ -57,7 +57,10 @@ function _is_native_reflect_construct() {
57
57
  return !!result;
58
58
  })();
59
59
  }
60
- import { LayoutControlProperty } from '../LayoutControl';
60
+ /**
61
+ * name: base_wrap_control_property
62
+ * description: 包裹控件基础属性定义。继承布局属性能力,为外层包裹类控件提供统一的属性模型。
63
+ */ import { LayoutControlProperty } from '../LayoutControl';
61
64
  var WrapControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
62
65
  "use strict";
63
66
  _inherits(WrapControlProperty, LayoutControlProperty);
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-core",
3
- "version": "7.0.0-beta.4",
3
+ "version": "7.0.0-beta.8",
4
4
  "description": "model engine core",
5
5
  "author": "郝晨光 <2293885211@qq.com>",
6
6
  "homepage": "",
@@ -30,5 +30,5 @@
30
30
  "async-validator": "3.5.1",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
- "gitHead": "e2c32b376c328fe4c114106e071884f112c11f2e"
33
+ "gitHead": "06eb423735c35d0dbb0bb16f3d2030ac53f8633c"
34
34
  }