@byteluck-fe/model-driven-core 2.7.0-alpha.0 → 2.7.0-alpha.2
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/api-doc-index.js +4 -4
- package/dist/esm/common/BaseControl/designer.js +309 -226
- package/dist/esm/common/BaseControl/index.js +7 -7
- package/dist/esm/common/BaseControl/property.js +13 -10
- package/dist/esm/common/BaseControl/runtime.js +16 -16
- package/dist/esm/common/ColumnControl/designer.js +5 -5
- package/dist/esm/common/ColumnControl/index.js +6 -6
- package/dist/esm/common/ColumnControl/property.js +36 -36
- package/dist/esm/common/ColumnControl/runtime.js +5 -5
- package/dist/esm/common/ControlArray.js +8 -8
- package/dist/esm/common/FormControl/designer.js +8 -8
- package/dist/esm/common/FormControl/index.js +6 -6
- package/dist/esm/common/FormControl/property.js +66 -66
- package/dist/esm/common/FormControl/runtime.js +5 -5
- package/dist/esm/common/LayoutControl/designer.js +196 -102
- package/dist/esm/common/LayoutControl/index.js +6 -6
- package/dist/esm/common/LayoutControl/property.js +3 -3
- package/dist/esm/common/LayoutControl/runtime.js +7 -7
- package/dist/esm/common/ListControl/designer.js +184 -84
- package/dist/esm/common/ListControl/index.js +6 -6
- package/dist/esm/common/ListControl/property.js +5 -5
- package/dist/esm/common/ListControl/runtime.js +7 -7
- package/dist/esm/common/SearchViewControl/designer.js +5 -5
- package/dist/esm/common/SearchViewControl/index.js +6 -6
- package/dist/esm/common/SearchViewControl/property.js +4 -4
- package/dist/esm/common/SearchViewControl/runtime.js +5 -5
- package/dist/esm/common/Validator.js +5 -5
- package/dist/esm/common/WrapControl/designer.js +5 -5
- package/dist/esm/common/WrapControl/index.js +6 -6
- package/dist/esm/common/WrapControl/property.js +3 -3
- package/dist/esm/common/WrapControl/runtime.js +5 -5
- package/dist/esm/common/controlHooksEmitter.js +1 -1
- package/dist/esm/common/index.js +12 -12
- package/dist/esm/common/initLinkOperationRules.js +6 -6
- package/dist/esm/common/initOptionAndDataSourceRules.js +82 -82
- package/dist/esm/framework/RegisterControls.js +122 -179
- package/dist/esm/framework/index.js +336 -333
- package/dist/esm/index.js +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/types/common/Validator.d.ts +1 -1
- package/dist/types/common/controlHooksEmitter.d.ts +1 -1
- package/dist/types/type.d.ts +23 -23
- package/package.json +3 -3
|
@@ -69,20 +69,20 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { RuntimeControl } from
|
|
73
|
-
import LayoutControlProperty from
|
|
74
|
-
import { defineControlArrayToProperty } from
|
|
75
|
-
var LayoutControl = /*#__PURE__*/ function(
|
|
72
|
+
import { RuntimeControl } from "../BaseControl";
|
|
73
|
+
import LayoutControlProperty from "./property";
|
|
74
|
+
import { defineControlArrayToProperty } from "../ControlArray";
|
|
75
|
+
var LayoutControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
76
76
|
"use strict";
|
|
77
|
-
_inherits(LayoutControl,
|
|
77
|
+
_inherits(LayoutControl, RuntimeControl);
|
|
78
78
|
var _super = _createSuper(LayoutControl);
|
|
79
79
|
function LayoutControl(props) {
|
|
80
80
|
_classCallCheck(this, LayoutControl);
|
|
81
81
|
var _this;
|
|
82
82
|
_this = _super.call(this, props);
|
|
83
|
-
_this.controlType =
|
|
83
|
+
_this.controlType = "layout";
|
|
84
84
|
_this.props = new LayoutControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
85
|
-
defineControlArrayToProperty(_assertThisInitialized(_this),
|
|
85
|
+
defineControlArrayToProperty(_assertThisInitialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
|
|
86
86
|
return _this;
|
|
87
87
|
}
|
|
88
88
|
return LayoutControl;
|
|
@@ -46,20 +46,6 @@ function _classCallCheck(instance, Constructor) {
|
|
|
46
46
|
throw new TypeError("Cannot call a class as a function");
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function _defineProperties(target, props) {
|
|
50
|
-
for(var i = 0; i < props.length; i++){
|
|
51
|
-
var descriptor = props[i];
|
|
52
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
53
|
-
descriptor.configurable = true;
|
|
54
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
55
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
59
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
60
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
61
|
-
return Constructor;
|
|
62
|
-
}
|
|
63
49
|
function _defineProperty(obj, key, value) {
|
|
64
50
|
if (key in obj) {
|
|
65
51
|
Object.defineProperty(obj, key, {
|
|
@@ -129,6 +115,30 @@ function _objectSpread(target) {
|
|
|
129
115
|
}
|
|
130
116
|
return target;
|
|
131
117
|
}
|
|
118
|
+
function ownKeys(object, enumerableOnly) {
|
|
119
|
+
var keys = Object.keys(object);
|
|
120
|
+
if (Object.getOwnPropertySymbols) {
|
|
121
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
122
|
+
if (enumerableOnly) {
|
|
123
|
+
symbols = symbols.filter(function(sym) {
|
|
124
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
keys.push.apply(keys, symbols);
|
|
128
|
+
}
|
|
129
|
+
return keys;
|
|
130
|
+
}
|
|
131
|
+
function _objectSpreadProps(target, source) {
|
|
132
|
+
source = source != null ? source : {};
|
|
133
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
134
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
135
|
+
} else {
|
|
136
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
137
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return target;
|
|
141
|
+
}
|
|
132
142
|
function _possibleConstructorReturn(self, call) {
|
|
133
143
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
134
144
|
return call;
|
|
@@ -188,87 +198,177 @@ function _createSuper(Derived) {
|
|
|
188
198
|
return _possibleConstructorReturn(this, result);
|
|
189
199
|
};
|
|
190
200
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
var __generator = this && this.__generator || function(thisArg, body) {
|
|
202
|
+
var f, y, t, g, _ = {
|
|
203
|
+
label: 0,
|
|
204
|
+
sent: function() {
|
|
205
|
+
if (t[0] & 1) throw t[1];
|
|
206
|
+
return t[1];
|
|
207
|
+
},
|
|
208
|
+
trys: [],
|
|
209
|
+
ops: []
|
|
210
|
+
};
|
|
211
|
+
return g = {
|
|
212
|
+
next: verb(0),
|
|
213
|
+
"throw": verb(1),
|
|
214
|
+
"return": verb(2)
|
|
215
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
216
|
+
return this;
|
|
217
|
+
}), g;
|
|
218
|
+
function verb(n) {
|
|
219
|
+
return function(v) {
|
|
220
|
+
return step([
|
|
221
|
+
n,
|
|
222
|
+
v
|
|
223
|
+
]);
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function step(op) {
|
|
227
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
228
|
+
while(_)try {
|
|
229
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
230
|
+
if (y = 0, t) op = [
|
|
231
|
+
op[0] & 2,
|
|
232
|
+
t.value
|
|
233
|
+
];
|
|
234
|
+
switch(op[0]){
|
|
235
|
+
case 0:
|
|
236
|
+
case 1:
|
|
237
|
+
t = op;
|
|
238
|
+
break;
|
|
239
|
+
case 4:
|
|
240
|
+
_.label++;
|
|
241
|
+
return {
|
|
242
|
+
value: op[1],
|
|
243
|
+
done: false
|
|
244
|
+
};
|
|
245
|
+
case 5:
|
|
246
|
+
_.label++;
|
|
247
|
+
y = op[1];
|
|
248
|
+
op = [
|
|
249
|
+
0
|
|
250
|
+
];
|
|
251
|
+
continue;
|
|
252
|
+
case 7:
|
|
253
|
+
op = _.ops.pop();
|
|
254
|
+
_.trys.pop();
|
|
255
|
+
continue;
|
|
256
|
+
default:
|
|
257
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
258
|
+
_ = 0;
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
262
|
+
_.label = op[1];
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
266
|
+
_.label = t[1];
|
|
267
|
+
t = op;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
if (t && _.label < t[2]) {
|
|
271
|
+
_.label = t[2];
|
|
272
|
+
_.ops.push(op);
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
if (t[2]) _.ops.pop();
|
|
276
|
+
_.trys.pop();
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
op = body.call(thisArg, _);
|
|
280
|
+
} catch (e) {
|
|
281
|
+
op = [
|
|
282
|
+
6,
|
|
283
|
+
e
|
|
284
|
+
];
|
|
285
|
+
y = 0;
|
|
286
|
+
} finally{
|
|
287
|
+
f = t = 0;
|
|
288
|
+
}
|
|
289
|
+
if (op[0] & 5) throw op[1];
|
|
290
|
+
return {
|
|
291
|
+
value: op[0] ? op[1] : void 0,
|
|
292
|
+
done: true
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
import { DesignerControl } from "../BaseControl";
|
|
297
|
+
import ListControlProperty from "./property";
|
|
298
|
+
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
299
|
+
var ListControl = /*#__PURE__*/ function(DesignerControl) {
|
|
196
300
|
"use strict";
|
|
197
|
-
_inherits(ListControl,
|
|
301
|
+
_inherits(ListControl, DesignerControl);
|
|
198
302
|
var _super = _createSuper(ListControl);
|
|
199
303
|
function ListControl(props) {
|
|
200
304
|
_classCallCheck(this, ListControl);
|
|
201
305
|
var _this;
|
|
202
306
|
_this = _super.call(this, props);
|
|
203
|
-
_this.controlType =
|
|
307
|
+
_this.controlType = "list";
|
|
204
308
|
_this.props = new ListControlProperty(_assertThisInitialized(_this), props === null || props === void 0 ? void 0 : props.props);
|
|
205
309
|
return _this;
|
|
206
310
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
|
|
251
|
-
}
|
|
252
|
-
model && arr.push(model);
|
|
253
|
-
return arr;
|
|
254
|
-
}, result);
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
key: "toSchema",
|
|
259
|
-
value: function toSchema() {
|
|
260
|
-
var superSchema = _get(_getPrototypeOf(ListControl.prototype), "toSchema", this).call(this);
|
|
261
|
-
var headers = this.props.headers.map(function(item) {
|
|
262
|
-
return item.toSchema();
|
|
263
|
-
});
|
|
264
|
-
return _objectSpread({}, superSchema, {
|
|
265
|
-
props: _objectSpread({}, this.props, {
|
|
266
|
-
headers: headers
|
|
267
|
-
})
|
|
311
|
+
var _proto = ListControl.prototype;
|
|
312
|
+
_proto.validate = function validate(messages, ignore) {
|
|
313
|
+
var _this = this;
|
|
314
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
315
|
+
return _get(_getPrototypeOf(ListControl.prototype), "validate", _this);
|
|
316
|
+
};
|
|
317
|
+
return _asyncToGenerator(function() {
|
|
318
|
+
return __generator(this, function(_state) {
|
|
319
|
+
switch(_state.label){
|
|
320
|
+
case 0:
|
|
321
|
+
return [
|
|
322
|
+
4,
|
|
323
|
+
_superprop_get_validate().call(_this1, messages)
|
|
324
|
+
];
|
|
325
|
+
case 1:
|
|
326
|
+
_state.sent();
|
|
327
|
+
return [
|
|
328
|
+
4,
|
|
329
|
+
Promise.all(_this1.props.headers.map(function(child) {
|
|
330
|
+
return child.validate(messages, ignore);
|
|
331
|
+
}))
|
|
332
|
+
];
|
|
333
|
+
case 2:
|
|
334
|
+
_state.sent();
|
|
335
|
+
return [
|
|
336
|
+
2,
|
|
337
|
+
true
|
|
338
|
+
];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
})();
|
|
342
|
+
};
|
|
343
|
+
_proto.toDataBindModel = function toDataBindModel() {
|
|
344
|
+
var listModel = _get(_getPrototypeOf(ListControl.prototype), "toDataBindModel", this).call(this);
|
|
345
|
+
var result = listModel ? [
|
|
346
|
+
listModel
|
|
347
|
+
] : [];
|
|
348
|
+
var parentId = this.id;
|
|
349
|
+
return this.props.headers.reduce(function(arr, current) {
|
|
350
|
+
var model = current.toDataBindModel(parentId);
|
|
351
|
+
if (Array.isArray(model)) {
|
|
352
|
+
var filteredModel = model.filter(function(item) {
|
|
353
|
+
return !!item;
|
|
268
354
|
});
|
|
355
|
+
return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
|
|
269
356
|
}
|
|
270
|
-
|
|
271
|
-
|
|
357
|
+
model && arr.push(model);
|
|
358
|
+
return arr;
|
|
359
|
+
}, result);
|
|
360
|
+
};
|
|
361
|
+
_proto.toSchema = function toSchema() {
|
|
362
|
+
var superSchema = _get(_getPrototypeOf(ListControl.prototype), "toSchema", this).call(this);
|
|
363
|
+
var headers = this.props.headers.map(function(item) {
|
|
364
|
+
return item.toSchema();
|
|
365
|
+
});
|
|
366
|
+
return _objectSpreadProps(_objectSpread({}, superSchema), {
|
|
367
|
+
props: _objectSpreadProps(_objectSpread({}, this.props), {
|
|
368
|
+
headers: headers
|
|
369
|
+
})
|
|
370
|
+
});
|
|
371
|
+
};
|
|
272
372
|
return ListControl;
|
|
273
373
|
}(DesignerControl);
|
|
274
374
|
ListControl.controlFieldType = FieldTypes.LIST;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from "./designer";
|
|
2
|
+
import Runtime from "./runtime";
|
|
3
|
+
import Property from "./property";
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from "./designer";
|
|
10
|
+
export * from "./runtime";
|
|
11
|
+
export * from "./property";
|
|
@@ -69,17 +69,17 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { Property } from
|
|
73
|
-
import { defineControlArrayToProperty } from
|
|
74
|
-
var ListControlProperty = /*#__PURE__*/ function(
|
|
72
|
+
import { Property } from "../BaseControl";
|
|
73
|
+
import { defineControlArrayToProperty } from "../ControlArray";
|
|
74
|
+
var ListControlProperty = /*#__PURE__*/ function(Property) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(ListControlProperty,
|
|
76
|
+
_inherits(ListControlProperty, Property);
|
|
77
77
|
var _super = _createSuper(ListControlProperty);
|
|
78
78
|
function ListControlProperty(parent, props) {
|
|
79
79
|
_classCallCheck(this, ListControlProperty);
|
|
80
80
|
var _this;
|
|
81
81
|
_this = _super.call(this, props);
|
|
82
|
-
defineControlArrayToProperty(_assertThisInitialized(_this),
|
|
82
|
+
defineControlArrayToProperty(_assertThisInitialized(_this), "headers", props === null || props === void 0 ? void 0 : props.headers, parent);
|
|
83
83
|
return _this;
|
|
84
84
|
}
|
|
85
85
|
return ListControlProperty;
|
|
@@ -83,20 +83,20 @@ function _createSuper(Derived) {
|
|
|
83
83
|
return _possibleConstructorReturn(this, result);
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
import { RuntimeControl } from
|
|
87
|
-
import ListControlProperty from
|
|
88
|
-
import { defineControlArrayToProperty } from
|
|
89
|
-
var ListControl = /*#__PURE__*/ function(
|
|
86
|
+
import { RuntimeControl } from "../BaseControl";
|
|
87
|
+
import ListControlProperty from "./property";
|
|
88
|
+
import { defineControlArrayToProperty } from "../ControlArray";
|
|
89
|
+
var ListControl = /*#__PURE__*/ function(RuntimeControl) {
|
|
90
90
|
"use strict";
|
|
91
|
-
_inherits(ListControl,
|
|
91
|
+
_inherits(ListControl, RuntimeControl);
|
|
92
92
|
var _super = _createSuper(ListControl);
|
|
93
93
|
function ListControl(props) {
|
|
94
94
|
_classCallCheck(this, ListControl);
|
|
95
95
|
var _this;
|
|
96
96
|
_this = _super.call(this, props);
|
|
97
|
-
_this.controlType =
|
|
97
|
+
_this.controlType = "list";
|
|
98
98
|
_this.props = new ListControlProperty(_assertThisInitialized(_this), props === null || props === void 0 ? void 0 : props.props);
|
|
99
|
-
defineControlArrayToProperty(_assertThisInitialized(_this),
|
|
99
|
+
defineControlArrayToProperty(_assertThisInitialized(_this), "children", props === null || props === void 0 ? void 0 : props.children);
|
|
100
100
|
return _this;
|
|
101
101
|
}
|
|
102
102
|
_createClass(ListControl, [
|
|
@@ -69,17 +69,17 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import SearchControlProperty from
|
|
73
|
-
import { DesignerLayoutControl } from
|
|
74
|
-
var SearchControl = /*#__PURE__*/ function(
|
|
72
|
+
import SearchControlProperty from "./property";
|
|
73
|
+
import { DesignerLayoutControl } from "../LayoutControl";
|
|
74
|
+
var SearchControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControl,
|
|
76
|
+
_inherits(SearchControl, DesignerLayoutControl);
|
|
77
77
|
var _super = _createSuper(SearchControl);
|
|
78
78
|
function SearchControl(props) {
|
|
79
79
|
_classCallCheck(this, SearchControl);
|
|
80
80
|
var _this;
|
|
81
81
|
_this = _super.call(this, props);
|
|
82
|
-
_this.controlType =
|
|
82
|
+
_this.controlType = "search";
|
|
83
83
|
_this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
84
|
return _this;
|
|
85
85
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from "./designer";
|
|
2
|
+
import Runtime from "./runtime";
|
|
3
|
+
import Property from "./property";
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from "./designer";
|
|
10
|
+
export * from "./runtime";
|
|
11
|
+
export * from "./property";
|
|
@@ -69,11 +69,11 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { LayoutControlProperty } from
|
|
73
|
-
import { DataBind } from
|
|
74
|
-
var SearchControlProperty = /*#__PURE__*/ function(
|
|
72
|
+
import { LayoutControlProperty } from "../LayoutControl";
|
|
73
|
+
import { DataBind } from "../../framework";
|
|
74
|
+
var SearchControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControlProperty,
|
|
76
|
+
_inherits(SearchControlProperty, LayoutControlProperty);
|
|
77
77
|
var _super = _createSuper(SearchControlProperty);
|
|
78
78
|
function SearchControlProperty(props) {
|
|
79
79
|
_classCallCheck(this, SearchControlProperty);
|
|
@@ -69,17 +69,17 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import SearchControlProperty from
|
|
73
|
-
import { RuntimeLayoutControl } from
|
|
74
|
-
var SearchControl = /*#__PURE__*/ function(
|
|
72
|
+
import SearchControlProperty from "./property";
|
|
73
|
+
import { RuntimeLayoutControl } from "../LayoutControl";
|
|
74
|
+
var SearchControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControl,
|
|
76
|
+
_inherits(SearchControl, RuntimeLayoutControl);
|
|
77
77
|
var _super = _createSuper(SearchControl);
|
|
78
78
|
function SearchControl(props) {
|
|
79
79
|
_classCallCheck(this, SearchControl);
|
|
80
80
|
var _this;
|
|
81
81
|
_this = _super.call(this, props);
|
|
82
|
-
_this.controlType =
|
|
82
|
+
_this.controlType = "search";
|
|
83
83
|
_this.props = new SearchControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
84
|
return _this;
|
|
85
85
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Schema from
|
|
1
|
+
import Schema from "async-validator";
|
|
2
2
|
var messages = {
|
|
3
|
-
required:
|
|
4
|
-
maxLength:
|
|
5
|
-
minLength:
|
|
3
|
+
required: "%s 必填",
|
|
4
|
+
maxLength: "%s 超出最大长度限制",
|
|
5
|
+
minLength: "%s 小于最小长度限制",
|
|
6
6
|
string: {
|
|
7
|
-
range:
|
|
7
|
+
range: "%s 不在指定长度内"
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
function createValidator(rules) {
|
|
@@ -69,17 +69,17 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import WrapControlProperty from
|
|
73
|
-
import { DesignerLayoutControl } from
|
|
74
|
-
var WrapControl = /*#__PURE__*/ function(
|
|
72
|
+
import WrapControlProperty from "./property";
|
|
73
|
+
import { DesignerLayoutControl } from "../LayoutControl";
|
|
74
|
+
var WrapControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(WrapControl,
|
|
76
|
+
_inherits(WrapControl, DesignerLayoutControl);
|
|
77
77
|
var _super = _createSuper(WrapControl);
|
|
78
78
|
function WrapControl(props) {
|
|
79
79
|
_classCallCheck(this, WrapControl);
|
|
80
80
|
var _this;
|
|
81
81
|
_this = _super.call(this, props);
|
|
82
|
-
_this.controlType =
|
|
82
|
+
_this.controlType = "wrap";
|
|
83
83
|
_this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
84
|
return _this;
|
|
85
85
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Designer from
|
|
2
|
-
import Runtime from
|
|
3
|
-
import Property from
|
|
1
|
+
import Designer from "./designer";
|
|
2
|
+
import Runtime from "./runtime";
|
|
3
|
+
import Property from "./property";
|
|
4
4
|
export default {
|
|
5
5
|
Designer: Designer,
|
|
6
6
|
Runtime: Runtime,
|
|
7
7
|
Property: Property
|
|
8
8
|
};
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
9
|
+
export * from "./designer";
|
|
10
|
+
export * from "./runtime";
|
|
11
|
+
export * from "./property";
|
|
@@ -69,10 +69,10 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import { LayoutControlProperty } from
|
|
73
|
-
var WrapControlProperty = /*#__PURE__*/ function(
|
|
72
|
+
import { LayoutControlProperty } from "../LayoutControl";
|
|
73
|
+
var WrapControlProperty = /*#__PURE__*/ function(LayoutControlProperty) {
|
|
74
74
|
"use strict";
|
|
75
|
-
_inherits(WrapControlProperty,
|
|
75
|
+
_inherits(WrapControlProperty, LayoutControlProperty);
|
|
76
76
|
var _super = _createSuper(WrapControlProperty);
|
|
77
77
|
function WrapControlProperty(props) {
|
|
78
78
|
_classCallCheck(this, WrapControlProperty);
|
|
@@ -69,17 +69,17 @@ function _createSuper(Derived) {
|
|
|
69
69
|
return _possibleConstructorReturn(this, result);
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
import WrapControlProperty from
|
|
73
|
-
import { RuntimeLayoutControl } from
|
|
74
|
-
var WrapControl = /*#__PURE__*/ function(
|
|
72
|
+
import WrapControlProperty from "./property";
|
|
73
|
+
import { RuntimeLayoutControl } from "../LayoutControl";
|
|
74
|
+
var WrapControl = /*#__PURE__*/ function(RuntimeLayoutControl) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(WrapControl,
|
|
76
|
+
_inherits(WrapControl, RuntimeLayoutControl);
|
|
77
77
|
var _super = _createSuper(WrapControl);
|
|
78
78
|
function WrapControl(props) {
|
|
79
79
|
_classCallCheck(this, WrapControl);
|
|
80
80
|
var _this;
|
|
81
81
|
_this = _super.call(this, props);
|
|
82
|
-
_this.controlType =
|
|
82
|
+
_this.controlType = "wrap";
|
|
83
83
|
_this.props = new WrapControlProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
84
84
|
return _this;
|
|
85
85
|
}
|
package/dist/esm/common/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
1
|
+
export * from "./BaseControl";
|
|
2
|
+
export * from "./FormControl";
|
|
3
|
+
export * from "./LayoutControl";
|
|
4
|
+
export * from "./ListControl";
|
|
5
|
+
export * from "./ColumnControl";
|
|
6
|
+
export * from "./SearchViewControl";
|
|
7
|
+
export * from "./WrapControl";
|
|
8
|
+
export * from "./Validator";
|
|
9
|
+
export * from "./ControlArray";
|
|
10
|
+
export * from "./initOptionAndDataSourceRules";
|
|
11
|
+
export * from "./initLinkOperationRules";
|
|
12
|
+
export * from "./controlHooksEmitter";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { RulesMessage } from
|
|
1
|
+
import { RulesMessage } from "@byteluck-fe/model-driven-shared";
|
|
2
2
|
export function initLinkOperationRules(props) {
|
|
3
|
-
if (props.hasOwnProperty(
|
|
3
|
+
if (props.hasOwnProperty("linkOperationOption") && props.hasOwnProperty("showLinkOperation") && props.showLinkOperation) {
|
|
4
4
|
this.linkOperationOption = [
|
|
5
5
|
{
|
|
6
|
-
type:
|
|
6
|
+
type: "object",
|
|
7
7
|
fields: {
|
|
8
8
|
formKey: {
|
|
9
|
-
type:
|
|
9
|
+
type: "string",
|
|
10
10
|
required: true,
|
|
11
|
-
message: RulesMessage.getMessage(
|
|
11
|
+
message: RulesMessage.getMessage("pleaseEnterForm")
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
17
|
}
|