@byteluck-fe/model-driven-core 2.5.0-beta.1 → 2.5.0-beta.4
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 +225 -305
- package/dist/esm/common/BaseControl/index.js +7 -7
- package/dist/esm/common/BaseControl/property.js +10 -13
- 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 +102 -196
- 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 +84 -184
- 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 +179 -122
- package/dist/esm/framework/index.js +325 -328
- package/dist/esm/index.js +3 -3
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +4 -4
- package/dist/types/common/BaseControl/designer.d.ts +62 -62
- package/dist/types/common/BaseControl/index.d.ts +13 -13
- package/dist/types/common/BaseControl/property.d.ts +36 -36
- package/dist/types/common/BaseControl/runtime.d.ts +22 -22
- package/dist/types/common/BaseControl/types.d.ts +35 -35
- package/dist/types/common/ColumnControl/designer.d.ts +10 -10
- package/dist/types/common/ColumnControl/index.d.ts +12 -12
- package/dist/types/common/ColumnControl/property.d.ts +73 -73
- package/dist/types/common/ColumnControl/runtime.d.ts +10 -10
- package/dist/types/common/ControlArray.d.ts +8 -8
- package/dist/types/common/FormControl/designer.d.ts +13 -13
- package/dist/types/common/FormControl/index.d.ts +12 -12
- package/dist/types/common/FormControl/property.d.ts +100 -100
- package/dist/types/common/FormControl/runtime.d.ts +11 -11
- package/dist/types/common/LayoutControl/designer.d.ts +21 -21
- package/dist/types/common/LayoutControl/index.d.ts +12 -12
- package/dist/types/common/LayoutControl/property.d.ts +6 -6
- package/dist/types/common/LayoutControl/runtime.d.ts +11 -11
- package/dist/types/common/ListControl/designer.d.ts +16 -16
- package/dist/types/common/ListControl/index.d.ts +12 -12
- package/dist/types/common/ListControl/property.d.ts +12 -12
- package/dist/types/common/ListControl/runtime.d.ts +12 -12
- package/dist/types/common/SearchViewControl/designer.d.ts +11 -11
- package/dist/types/common/SearchViewControl/index.d.ts +12 -12
- package/dist/types/common/SearchViewControl/property.d.ts +8 -8
- package/dist/types/common/SearchViewControl/runtime.d.ts +11 -11
- package/dist/types/common/Validator.d.ts +15 -15
- package/dist/types/common/WrapControl/designer.d.ts +11 -11
- package/dist/types/common/WrapControl/index.d.ts +12 -12
- package/dist/types/common/WrapControl/property.d.ts +6 -6
- package/dist/types/common/WrapControl/runtime.d.ts +11 -11
- package/dist/types/common/controlHooksEmitter.d.ts +4 -4
- package/dist/types/common/index.d.ts +12 -12
- package/dist/types/common/initLinkOperationRules.d.ts +6 -6
- package/dist/types/common/initOptionAndDataSourceRules.d.ts +10 -10
- package/dist/types/framework/RegisterControls.d.ts +33 -33
- package/dist/types/framework/index.d.ts +812 -812
- package/dist/types/index.d.ts +3 -3
- package/dist/types/type.d.ts +91 -91
- 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(RuntimeControl1) {
|
|
76
76
|
"use strict";
|
|
77
|
-
_inherits(LayoutControl,
|
|
77
|
+
_inherits(LayoutControl, RuntimeControl1);
|
|
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,6 +46,20 @@ 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
|
+
}
|
|
49
63
|
function _defineProperty(obj, key, value) {
|
|
50
64
|
if (key in obj) {
|
|
51
65
|
Object.defineProperty(obj, key, {
|
|
@@ -115,30 +129,6 @@ function _objectSpread(target) {
|
|
|
115
129
|
}
|
|
116
130
|
return target;
|
|
117
131
|
}
|
|
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
|
-
}
|
|
142
132
|
function _possibleConstructorReturn(self, call) {
|
|
143
133
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
144
134
|
return call;
|
|
@@ -198,177 +188,87 @@ function _createSuper(Derived) {
|
|
|
198
188
|
return _possibleConstructorReturn(this, result);
|
|
199
189
|
};
|
|
200
190
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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) {
|
|
191
|
+
import regeneratorRuntime from "regenerator-runtime";
|
|
192
|
+
import { DesignerControl } from '../BaseControl';
|
|
193
|
+
import ListControlProperty from './property';
|
|
194
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
195
|
+
var ListControl = /*#__PURE__*/ function(DesignerControl1) {
|
|
300
196
|
"use strict";
|
|
301
|
-
_inherits(ListControl,
|
|
197
|
+
_inherits(ListControl, DesignerControl1);
|
|
302
198
|
var _super = _createSuper(ListControl);
|
|
303
199
|
function ListControl(props) {
|
|
304
200
|
_classCallCheck(this, ListControl);
|
|
305
201
|
var _this;
|
|
306
202
|
_this = _super.call(this, props);
|
|
307
|
-
_this.controlType =
|
|
203
|
+
_this.controlType = 'list';
|
|
308
204
|
_this.props = new ListControlProperty(_assertThisInitialized(_this), props === null || props === void 0 ? void 0 : props.props);
|
|
309
205
|
return _this;
|
|
310
206
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
207
|
+
_createClass(ListControl, [
|
|
208
|
+
{
|
|
209
|
+
key: "validate",
|
|
210
|
+
value: function validate(messages, ignore) {
|
|
211
|
+
var _this = this;
|
|
212
|
+
var _this1 = this, _superprop_get_validate = function() {
|
|
213
|
+
return _get(_getPrototypeOf(ListControl.prototype), "validate", _this);
|
|
214
|
+
};
|
|
215
|
+
return _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
|
|
216
|
+
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
|
217
|
+
while(1)switch(_ctx.prev = _ctx.next){
|
|
218
|
+
case 0:
|
|
219
|
+
_ctx.next = 2;
|
|
220
|
+
return _superprop_get_validate().call(_this1, messages);
|
|
221
|
+
case 2:
|
|
222
|
+
_ctx.next = 4;
|
|
223
|
+
return Promise.all(_this1.props.headers.map(function(child) {
|
|
224
|
+
return child.validate(messages, ignore);
|
|
225
|
+
}));
|
|
226
|
+
case 4:
|
|
227
|
+
return _ctx.abrupt("return", true);
|
|
228
|
+
case 5:
|
|
229
|
+
case "end":
|
|
230
|
+
return _ctx.stop();
|
|
231
|
+
}
|
|
232
|
+
}, _callee);
|
|
233
|
+
}))();
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
key: "toDataBindModel",
|
|
238
|
+
value: function toDataBindModel() {
|
|
239
|
+
var listModel = _get(_getPrototypeOf(ListControl.prototype), "toDataBindModel", this).call(this);
|
|
240
|
+
var result = listModel ? [
|
|
241
|
+
listModel
|
|
242
|
+
] : [];
|
|
243
|
+
var parentId = this.id;
|
|
244
|
+
return this.props.headers.reduce(function(arr, current) {
|
|
245
|
+
var model = current.toDataBindModel(parentId);
|
|
246
|
+
if (Array.isArray(model)) {
|
|
247
|
+
var filteredModel = model.filter(function(item) {
|
|
248
|
+
return !!item;
|
|
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
|
+
})
|
|
354
268
|
});
|
|
355
|
-
return _toConsumableArray(arr).concat(_toConsumableArray(filteredModel));
|
|
356
269
|
}
|
|
357
|
-
|
|
358
|
-
|
|
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
|
-
};
|
|
270
|
+
}
|
|
271
|
+
]);
|
|
372
272
|
return ListControl;
|
|
373
273
|
}(DesignerControl);
|
|
374
274
|
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(Property1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(ListControlProperty,
|
|
76
|
+
_inherits(ListControlProperty, Property1);
|
|
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(RuntimeControl1) {
|
|
90
90
|
"use strict";
|
|
91
|
-
_inherits(ListControl,
|
|
91
|
+
_inherits(ListControl, RuntimeControl1);
|
|
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(DesignerLayoutControl1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControl,
|
|
76
|
+
_inherits(SearchControl, DesignerLayoutControl1);
|
|
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(LayoutControlProperty1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControlProperty,
|
|
76
|
+
_inherits(SearchControlProperty, LayoutControlProperty1);
|
|
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(RuntimeLayoutControl1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(SearchControl,
|
|
76
|
+
_inherits(SearchControl, RuntimeLayoutControl1);
|
|
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(DesignerLayoutControl1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(WrapControl,
|
|
76
|
+
_inherits(WrapControl, DesignerLayoutControl1);
|
|
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(LayoutControlProperty1) {
|
|
74
74
|
"use strict";
|
|
75
|
-
_inherits(WrapControlProperty,
|
|
75
|
+
_inherits(WrapControlProperty, LayoutControlProperty1);
|
|
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(RuntimeLayoutControl1) {
|
|
75
75
|
"use strict";
|
|
76
|
-
_inherits(WrapControl,
|
|
76
|
+
_inherits(WrapControl, RuntimeLayoutControl1);
|
|
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
|
}
|