@byteluck-fe/model-driven-core 2.3.1-beta.8 → 2.4.1-beta.0
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/esm/common/BaseControl/designer.js +252 -213
- package/dist/esm/common/BaseControl/property.js +68 -51
- package/dist/esm/common/BaseControl/runtime.js +30 -9
- package/dist/esm/common/ColumnControl/designer.js +37 -23
- package/dist/esm/common/ColumnControl/property.js +86 -38
- package/dist/esm/common/ColumnControl/runtime.js +37 -23
- package/dist/esm/common/ControlArray.js +12 -12
- package/dist/esm/common/FormControl/designer.js +40 -25
- package/dist/esm/common/FormControl/property.js +119 -52
- package/dist/esm/common/FormControl/runtime.js +38 -23
- package/dist/esm/common/LayoutControl/designer.js +149 -115
- package/dist/esm/common/LayoutControl/property.js +22 -22
- package/dist/esm/common/LayoutControl/runtime.js +39 -24
- package/dist/esm/common/ListControl/designer.js +131 -106
- package/dist/esm/common/ListControl/property.js +37 -23
- package/dist/esm/common/ListControl/runtime.js +42 -27
- package/dist/esm/common/SearchViewControl/designer.js +37 -23
- package/dist/esm/common/SearchViewControl/property.js +36 -22
- package/dist/esm/common/SearchViewControl/runtime.js +37 -23
- package/dist/esm/common/WrapControl/designer.js +37 -23
- package/dist/esm/common/WrapControl/property.js +22 -22
- package/dist/esm/common/WrapControl/runtime.js +37 -23
- package/dist/esm/framework/RegisterControls.js +199 -130
- package/dist/esm/framework/index.js +513 -93
- package/dist/index.umd.js +1 -1
- package/dist/types/common/BaseControl/property.d.ts +14 -0
- package/dist/types/common/FormControl/property.d.ts +4 -0
- package/dist/types/framework/index.d.ts +205 -0
- package/package.json +3 -3
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function isNativeReflectConstruct() {
|
|
13
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
14
|
-
if (Reflect.construct.sham) return false;
|
|
15
|
-
if (typeof Proxy === "function") return true;
|
|
16
|
-
try {
|
|
17
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
|
18
|
-
return true;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
12
|
function _construct(Parent, args, Class) {
|
|
24
|
-
if (
|
|
13
|
+
if (_is_native_reflect_construct()) {
|
|
25
14
|
_construct = Reflect.construct;
|
|
26
15
|
} else {
|
|
27
|
-
_construct = function
|
|
16
|
+
_construct = function construct(Parent, args, Class) {
|
|
28
17
|
var a = [
|
|
29
18
|
null
|
|
30
19
|
];
|
|
31
20
|
a.push.apply(a, args);
|
|
32
21
|
var Constructor = Function.bind.apply(Parent, a);
|
|
33
22
|
var instance = new Constructor();
|
|
34
|
-
if (Class)
|
|
23
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
35
24
|
return instance;
|
|
36
25
|
};
|
|
37
26
|
}
|
|
38
27
|
return _construct.apply(null, arguments);
|
|
39
28
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
29
|
+
function _define_property(obj, key, value) {
|
|
30
|
+
if (key in obj) {
|
|
31
|
+
Object.defineProperty(obj, key, {
|
|
32
|
+
value: value,
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true
|
|
36
|
+
});
|
|
37
|
+
} else {
|
|
38
|
+
obj[key] = value;
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
function _get_prototype_of(o) {
|
|
43
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
42
44
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
43
45
|
};
|
|
44
|
-
return
|
|
46
|
+
return _get_prototype_of(o);
|
|
45
47
|
}
|
|
46
48
|
function _inherits(subClass, superClass) {
|
|
47
49
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -54,32 +56,32 @@ function _inherits(subClass, superClass) {
|
|
|
54
56
|
configurable: true
|
|
55
57
|
}
|
|
56
58
|
});
|
|
57
|
-
if (superClass)
|
|
59
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
58
60
|
}
|
|
59
|
-
function
|
|
61
|
+
function _is_native_function(fn) {
|
|
60
62
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
61
63
|
}
|
|
62
|
-
function
|
|
63
|
-
if (call && (
|
|
64
|
+
function _possible_constructor_return(self, call) {
|
|
65
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
64
66
|
return call;
|
|
65
67
|
}
|
|
66
|
-
return
|
|
68
|
+
return _assert_this_initialized(self);
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
+
function _set_prototype_of(o, p) {
|
|
71
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
70
72
|
o.__proto__ = p;
|
|
71
73
|
return o;
|
|
72
74
|
};
|
|
73
|
-
return
|
|
75
|
+
return _set_prototype_of(o, p);
|
|
74
76
|
}
|
|
75
|
-
|
|
77
|
+
function _type_of(obj) {
|
|
76
78
|
"@swc/helpers - typeof";
|
|
77
79
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
78
|
-
}
|
|
79
|
-
function
|
|
80
|
+
}
|
|
81
|
+
function _wrap_native_super(Class) {
|
|
80
82
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
81
|
-
|
|
82
|
-
if (Class === null || !
|
|
83
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
84
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
83
85
|
if (typeof Class !== "function") {
|
|
84
86
|
throw new TypeError("Super expression must either be null or a function");
|
|
85
87
|
}
|
|
@@ -88,7 +90,7 @@ function _wrapNativeSuper(Class) {
|
|
|
88
90
|
_cache.set(Class, Wrapper);
|
|
89
91
|
}
|
|
90
92
|
function Wrapper() {
|
|
91
|
-
return _construct(Class, arguments,
|
|
93
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
92
94
|
}
|
|
93
95
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
94
96
|
constructor: {
|
|
@@ -98,11 +100,11 @@ function _wrapNativeSuper(Class) {
|
|
|
98
100
|
configurable: true
|
|
99
101
|
}
|
|
100
102
|
});
|
|
101
|
-
return
|
|
103
|
+
return _set_prototype_of(Wrapper, Class);
|
|
102
104
|
};
|
|
103
|
-
return
|
|
105
|
+
return _wrap_native_super(Class);
|
|
104
106
|
}
|
|
105
|
-
function
|
|
107
|
+
function _is_native_reflect_construct() {
|
|
106
108
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
107
109
|
if (Reflect.construct.sham) return false;
|
|
108
110
|
if (typeof Proxy === "function") return true;
|
|
@@ -113,48 +115,63 @@ function _isNativeReflectConstruct() {
|
|
|
113
115
|
return false;
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
var hasNativeReflectConstruct =
|
|
118
|
+
function _create_super(Derived) {
|
|
119
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
118
120
|
return function _createSuperInternal() {
|
|
119
|
-
var Super =
|
|
121
|
+
var Super = _get_prototype_of(Derived), result;
|
|
120
122
|
if (hasNativeReflectConstruct) {
|
|
121
|
-
var NewTarget =
|
|
123
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
122
124
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
123
125
|
} else {
|
|
124
126
|
result = Super.apply(this, arguments);
|
|
125
127
|
}
|
|
126
|
-
return
|
|
128
|
+
return _possible_constructor_return(this, result);
|
|
127
129
|
};
|
|
128
130
|
}
|
|
129
131
|
import { BaseStyle } from "../../framework";
|
|
130
132
|
var PropertyRules = function PropertyRules(props) {
|
|
131
133
|
"use strict";
|
|
132
|
-
|
|
133
|
-
this
|
|
134
|
+
_class_call_check(this, PropertyRules);
|
|
135
|
+
_define_property(this, "isHide", {
|
|
134
136
|
type: "boolean"
|
|
135
|
-
};
|
|
137
|
+
});
|
|
136
138
|
};
|
|
137
139
|
var PropertyRuntimeRules = /*#__PURE__*/ function(Array1) {
|
|
138
140
|
"use strict";
|
|
139
141
|
_inherits(PropertyRuntimeRules, Array1);
|
|
140
|
-
var _super =
|
|
142
|
+
var _super = _create_super(PropertyRuntimeRules);
|
|
141
143
|
function PropertyRuntimeRules(props) {
|
|
142
|
-
|
|
144
|
+
_class_call_check(this, PropertyRuntimeRules);
|
|
143
145
|
return _super.call(this);
|
|
144
146
|
}
|
|
145
147
|
return PropertyRuntimeRules;
|
|
146
|
-
}(
|
|
147
|
-
|
|
148
|
+
}(_wrap_native_super(Array));
|
|
149
|
+
/**
|
|
150
|
+
* 全局属性
|
|
151
|
+
* @public
|
|
152
|
+
*/ var Property = function Property(props) {
|
|
148
153
|
"use strict";
|
|
149
154
|
var caption = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
150
|
-
|
|
155
|
+
_class_call_check(this, Property);
|
|
156
|
+
/**
|
|
157
|
+
* 是否隐藏
|
|
158
|
+
* @public
|
|
159
|
+
* @defaultValue false
|
|
160
|
+
*/ _define_property(this, "isHide", void 0);
|
|
161
|
+
_define_property(this, "className", void 0);
|
|
162
|
+
_define_property(this, "style", void 0);
|
|
163
|
+
/**
|
|
164
|
+
* 标题
|
|
165
|
+
* @public
|
|
166
|
+
* @defaultValue ''
|
|
167
|
+
*/ _define_property(this, "caption", void 0);
|
|
151
168
|
var _props_isHide;
|
|
152
169
|
this.isHide = (_props_isHide = props === null || props === void 0 ? void 0 : props.isHide) !== null && _props_isHide !== void 0 ? _props_isHide : false;
|
|
153
170
|
this.style = new BaseStyle(props === null || props === void 0 ? void 0 : props.style);
|
|
154
171
|
var _props_caption;
|
|
155
172
|
this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : caption;
|
|
156
173
|
};
|
|
157
|
-
Property
|
|
158
|
-
Property
|
|
174
|
+
_define_property(Property, "Rules", PropertyRules);
|
|
175
|
+
_define_property(Property, "RuntimeRules", PropertyRuntimeRules);
|
|
159
176
|
export default Property;
|
|
160
177
|
export { Property, PropertyRules, PropertyRuntimeRules };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _class_call_check(instance, Constructor) {
|
|
2
2
|
if (!(instance instanceof Constructor)) {
|
|
3
3
|
throw new TypeError("Cannot call a class as a function");
|
|
4
4
|
}
|
|
@@ -12,11 +12,24 @@ function _defineProperties(target, props) {
|
|
|
12
12
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
16
16
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
17
17
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
18
18
|
return Constructor;
|
|
19
19
|
}
|
|
20
|
+
function _define_property(obj, key, value) {
|
|
21
|
+
if (key in obj) {
|
|
22
|
+
Object.defineProperty(obj, key, {
|
|
23
|
+
value: value,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
obj[key] = value;
|
|
30
|
+
}
|
|
31
|
+
return obj;
|
|
32
|
+
}
|
|
20
33
|
function _instanceof(left, right) {
|
|
21
34
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
22
35
|
return !!right[Symbol.hasInstance](left);
|
|
@@ -30,9 +43,16 @@ import { PAGE_STATUS } from "../../framework";
|
|
|
30
43
|
var Control = /*#__PURE__*/ function _target() {
|
|
31
44
|
"use strict";
|
|
32
45
|
function Control(props) {
|
|
33
|
-
|
|
34
|
-
this
|
|
35
|
-
|
|
46
|
+
_class_call_check(this, Control);
|
|
47
|
+
_define_property(this, "id", void 0 // 唯一标识符
|
|
48
|
+
);
|
|
49
|
+
_define_property(this, "type", void 0);
|
|
50
|
+
_define_property(this, "controlType", void 0);
|
|
51
|
+
_define_property(this, "props", void 0);
|
|
52
|
+
_define_property(this, "fieldType", void 0);
|
|
53
|
+
_define_property(this, "customEvents", []);
|
|
54
|
+
_define_property(this, "pageStatus", void 0);
|
|
55
|
+
_define_property(this, "parent", null);
|
|
36
56
|
var _ref = _instanceof(this, Control) ? this.constructor : void 0, controlType = _ref.controlType, controlFieldType = _ref.controlFieldType, name = _ref.name, controlCustomEvents = _ref.controlCustomEvents;
|
|
37
57
|
if (!controlType) {
|
|
38
58
|
referenceError("The ".concat(name, " controlType is not define"));
|
|
@@ -50,7 +70,7 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
50
70
|
var _props_pageStatus;
|
|
51
71
|
this.pageStatus = (_props_pageStatus = props === null || props === void 0 ? void 0 : props.pageStatus) !== null && _props_pageStatus !== void 0 ? _props_pageStatus : PAGE_STATUS.UNKNOWN;
|
|
52
72
|
}
|
|
53
|
-
|
|
73
|
+
_create_class(Control, [
|
|
54
74
|
{
|
|
55
75
|
key: "rules",
|
|
56
76
|
get: function get() {
|
|
@@ -65,8 +85,9 @@ var Control = /*#__PURE__*/ function _target() {
|
|
|
65
85
|
]);
|
|
66
86
|
return Control;
|
|
67
87
|
}();
|
|
68
|
-
Control
|
|
69
|
-
Control
|
|
70
|
-
Control
|
|
88
|
+
_define_property(Control, "controlType", "control");
|
|
89
|
+
_define_property(Control, "controlFieldType", void 0);
|
|
90
|
+
_define_property(Control, "__is_control__", true);
|
|
91
|
+
_define_property(Control, "controlCustomEvents", []);
|
|
71
92
|
export default Control;
|
|
72
93
|
export { Control as RuntimeControl };
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { DesignerControl } from "../BaseControl";
|
|
@@ -74,12 +87,13 @@ import ColumnControlProperty from "./property";
|
|
|
74
87
|
var ColumnControl = /*#__PURE__*/ function(DesignerControl) {
|
|
75
88
|
"use strict";
|
|
76
89
|
_inherits(ColumnControl, DesignerControl);
|
|
77
|
-
var _super =
|
|
90
|
+
var _super = _create_super(ColumnControl);
|
|
78
91
|
function ColumnControl(props) {
|
|
79
|
-
|
|
92
|
+
_class_call_check(this, ColumnControl);
|
|
80
93
|
var _this;
|
|
81
94
|
_this = _super.call(this, props);
|
|
82
|
-
_this
|
|
95
|
+
_define_property(_assert_this_initialized(_this), "controlType", "column");
|
|
96
|
+
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
83
97
|
_this.props = new ColumnControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
98
|
return _this;
|
|
85
99
|
}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
2
|
if (self === void 0) {
|
|
3
3
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
4
|
}
|
|
5
5
|
return self;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function _class_call_check(instance, Constructor) {
|
|
8
8
|
if (!(instance instanceof Constructor)) {
|
|
9
9
|
throw new TypeError("Cannot call a class as a function");
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
function _get_prototype_of(o) {
|
|
26
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
14
27
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
15
28
|
};
|
|
16
|
-
return
|
|
29
|
+
return _get_prototype_of(o);
|
|
17
30
|
}
|
|
18
31
|
function _inherits(subClass, superClass) {
|
|
19
32
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -26,26 +39,26 @@ function _inherits(subClass, superClass) {
|
|
|
26
39
|
configurable: true
|
|
27
40
|
}
|
|
28
41
|
});
|
|
29
|
-
if (superClass)
|
|
42
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
30
43
|
}
|
|
31
|
-
function
|
|
32
|
-
if (call && (
|
|
44
|
+
function _possible_constructor_return(self, call) {
|
|
45
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
33
46
|
return call;
|
|
34
47
|
}
|
|
35
|
-
return
|
|
48
|
+
return _assert_this_initialized(self);
|
|
36
49
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
50
|
+
function _set_prototype_of(o, p) {
|
|
51
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
39
52
|
o.__proto__ = p;
|
|
40
53
|
return o;
|
|
41
54
|
};
|
|
42
|
-
return
|
|
55
|
+
return _set_prototype_of(o, p);
|
|
43
56
|
}
|
|
44
|
-
|
|
57
|
+
function _type_of(obj) {
|
|
45
58
|
"@swc/helpers - typeof";
|
|
46
59
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
47
|
-
}
|
|
48
|
-
function
|
|
60
|
+
}
|
|
61
|
+
function _is_native_reflect_construct() {
|
|
49
62
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
50
63
|
if (Reflect.construct.sham) return false;
|
|
51
64
|
if (typeof Proxy === "function") return true;
|
|
@@ -56,17 +69,17 @@ function _isNativeReflectConstruct() {
|
|
|
56
69
|
return false;
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
function
|
|
60
|
-
var hasNativeReflectConstruct =
|
|
72
|
+
function _create_super(Derived) {
|
|
73
|
+
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
61
74
|
return function _createSuperInternal() {
|
|
62
|
-
var Super =
|
|
75
|
+
var Super = _get_prototype_of(Derived), result;
|
|
63
76
|
if (hasNativeReflectConstruct) {
|
|
64
|
-
var NewTarget =
|
|
77
|
+
var NewTarget = _get_prototype_of(this).constructor;
|
|
65
78
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
66
79
|
} else {
|
|
67
80
|
result = Super.apply(this, arguments);
|
|
68
81
|
}
|
|
69
|
-
return
|
|
82
|
+
return _possible_constructor_return(this, result);
|
|
70
83
|
};
|
|
71
84
|
}
|
|
72
85
|
import { Property, PropertyRules } from "../BaseControl";
|
|
@@ -76,21 +89,21 @@ import { DataBind, AutoWidth } from "../../framework";
|
|
|
76
89
|
var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
77
90
|
"use strict";
|
|
78
91
|
_inherits(ColumnControlPropertyRules, PropertyRules);
|
|
79
|
-
var _super =
|
|
92
|
+
var _super = _create_super(ColumnControlPropertyRules);
|
|
80
93
|
function ColumnControlPropertyRules(props) {
|
|
81
|
-
|
|
94
|
+
_class_call_check(this, ColumnControlPropertyRules);
|
|
82
95
|
var _this;
|
|
83
96
|
_this = _super.call(this, props);
|
|
84
|
-
_this
|
|
97
|
+
_define_property(_assert_this_initialized(_this), "caption", {
|
|
85
98
|
type: "string",
|
|
86
99
|
required: true,
|
|
87
100
|
message: RulesMessage.getMessage("pleaseEnterCaption")
|
|
88
|
-
};
|
|
89
|
-
_this
|
|
101
|
+
});
|
|
102
|
+
_define_property(_assert_this_initialized(_this), "width", {
|
|
90
103
|
type: "number",
|
|
91
104
|
required: false,
|
|
92
105
|
message: RulesMessage.getMessage("pleaseEnterColumnWidth")
|
|
93
|
-
};
|
|
106
|
+
});
|
|
94
107
|
_this.width.required = props.widthType === "px";
|
|
95
108
|
return _this;
|
|
96
109
|
}
|
|
@@ -102,11 +115,46 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
102
115
|
*/ var ColumnControlProperty = /*#__PURE__*/ function(Property) {
|
|
103
116
|
"use strict";
|
|
104
117
|
_inherits(ColumnControlProperty, Property);
|
|
105
|
-
var _super =
|
|
118
|
+
var _super = _create_super(ColumnControlProperty);
|
|
106
119
|
function ColumnControlProperty(props) {
|
|
107
|
-
|
|
120
|
+
_class_call_check(this, ColumnControlProperty);
|
|
108
121
|
var _this;
|
|
109
122
|
_this = _super.call(this, props);
|
|
123
|
+
/**
|
|
124
|
+
* 宽度类型
|
|
125
|
+
* @defaultValue 'auto'
|
|
126
|
+
*/ _define_property(_assert_this_initialized(_this), "widthType", void 0);
|
|
127
|
+
/**
|
|
128
|
+
* 宽度
|
|
129
|
+
* @defaultValue 150
|
|
130
|
+
*/ _define_property(_assert_this_initialized(_this), "width", void 0);
|
|
131
|
+
/**
|
|
132
|
+
* 标题
|
|
133
|
+
*/ _define_property(_assert_this_initialized(_this), "caption", void 0);
|
|
134
|
+
/**
|
|
135
|
+
* 绑定数据项
|
|
136
|
+
*/ _define_property(_assert_this_initialized(_this), "dataBind", void 0);
|
|
137
|
+
/**
|
|
138
|
+
* 自适应页面宽度
|
|
139
|
+
*/ _define_property(_assert_this_initialized(_this), "autoWidth", void 0);
|
|
140
|
+
/**
|
|
141
|
+
* 冻结
|
|
142
|
+
* @defaultValue 'none'
|
|
143
|
+
*/ _define_property(_assert_this_initialized(_this), "fixed", void 0);
|
|
144
|
+
/**
|
|
145
|
+
* 表头排序
|
|
146
|
+
* @defaultValue true
|
|
147
|
+
*/ _define_property(_assert_this_initialized(_this), "sort", void 0);
|
|
148
|
+
/**
|
|
149
|
+
* 对齐
|
|
150
|
+
*/ _define_property(_assert_this_initialized(_this), "align", void 0);
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/ _define_property(_assert_this_initialized(_this), "colSpan", void 0);
|
|
154
|
+
/**
|
|
155
|
+
* 自动高度
|
|
156
|
+
* @defaultValue false
|
|
157
|
+
*/ _define_property(_assert_this_initialized(_this), "autoHeight", void 0);
|
|
110
158
|
var _props_width;
|
|
111
159
|
_this.width = (_props_width = props === null || props === void 0 ? void 0 : props.width) !== null && _props_width !== void 0 ? _props_width : 150;
|
|
112
160
|
_this.widthType = (props === null || props === void 0 ? void 0 : props.widthType) || "auto";
|
|
@@ -126,16 +174,16 @@ var ColumnControlPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
126
174
|
}
|
|
127
175
|
return ColumnControlProperty;
|
|
128
176
|
}(Property);
|
|
129
|
-
ColumnControlProperty
|
|
177
|
+
_define_property(ColumnControlProperty, "Rules", ColumnControlPropertyRules);
|
|
130
178
|
var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnControlPropertyRules) {
|
|
131
179
|
"use strict";
|
|
132
180
|
_inherits(ColumnOptionAndDataSourcePropertyRules, ColumnControlPropertyRules);
|
|
133
|
-
var _super =
|
|
181
|
+
var _super = _create_super(ColumnOptionAndDataSourcePropertyRules);
|
|
134
182
|
function ColumnOptionAndDataSourcePropertyRules(props) {
|
|
135
|
-
|
|
183
|
+
_class_call_check(this, ColumnOptionAndDataSourcePropertyRules);
|
|
136
184
|
var _this;
|
|
137
185
|
_this = _super.call(this, props);
|
|
138
|
-
_this
|
|
186
|
+
_define_property(_assert_this_initialized(_this), "optionConfig", {
|
|
139
187
|
type: "enum",
|
|
140
188
|
enum: [
|
|
141
189
|
"custom",
|
|
@@ -143,20 +191,20 @@ var ColumnOptionAndDataSourcePropertyRules = /*#__PURE__*/ function(ColumnContro
|
|
|
143
191
|
"none"
|
|
144
192
|
],
|
|
145
193
|
message: RulesMessage.getMessage("PleaseSelectTheCorrectOptionSettings")
|
|
146
|
-
};
|
|
147
|
-
_this
|
|
194
|
+
});
|
|
195
|
+
_define_property(_assert_this_initialized(_this), "options", [
|
|
148
196
|
{
|
|
149
197
|
type: "array",
|
|
150
198
|
message: RulesMessage.getMessage("isNotArray")
|
|
151
199
|
}
|
|
152
|
-
];
|
|
153
|
-
_this
|
|
200
|
+
]);
|
|
201
|
+
_define_property(_assert_this_initialized(_this), "datasourceBind", [
|
|
154
202
|
{
|
|
155
203
|
type: "object",
|
|
156
204
|
message: RulesMessage.getMessage("isNotObject")
|
|
157
205
|
}
|
|
158
|
-
];
|
|
159
|
-
initOptionAndDataSourceRules.call(
|
|
206
|
+
]);
|
|
207
|
+
initOptionAndDataSourceRules.call(_assert_this_initialized(_this), props);
|
|
160
208
|
return _this;
|
|
161
209
|
}
|
|
162
210
|
return ColumnOptionAndDataSourcePropertyRules;
|