@byteluck-fe/model-driven-engine 2.7.0-alpha.2 → 2.7.0-alpha.20

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.
@@ -3,24 +3,57 @@ function _classCallCheck(instance, Constructor) {
3
3
  throw new TypeError("Cannot call a class as a function");
4
4
  }
5
5
  }
6
+ function _defineProperties(target, props) {
7
+ for(var i = 0; i < props.length; i++){
8
+ var descriptor = props[i];
9
+ descriptor.enumerable = descriptor.enumerable || false;
10
+ descriptor.configurable = true;
11
+ if ("value" in descriptor) descriptor.writable = true;
12
+ Object.defineProperty(target, descriptor.key, descriptor);
13
+ }
14
+ }
15
+ function _createClass(Constructor, protoProps, staticProps) {
16
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
+ if (staticProps) _defineProperties(Constructor, staticProps);
18
+ return Constructor;
19
+ }
20
+ function _defineProperty(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
+ }
6
33
  export var StylePlugin = /*#__PURE__*/ function() {
7
34
  "use strict";
8
35
  function StylePlugin(config) {
9
36
  _classCallCheck(this, StylePlugin);
37
+ _defineProperty(this, "config", void 0);
38
+ _defineProperty(this, "engine", void 0);
10
39
  this.config = config;
11
40
  }
12
- var _proto = StylePlugin.prototype;
13
- _proto.apply = function apply(engine) {
14
- var _this_config;
15
- this.engine = engine;
16
- var _this_config_source;
17
- var compiledStyle = (_this_config_source = (_this_config = this.config) === null || _this_config === void 0 ? void 0 : _this_config.source) !== null && _this_config_source !== void 0 ? _this_config_source : "";
18
- var style = document.createElement("style");
19
- style.className = "edit-css";
20
- style.type = "text/css";
21
- style.innerHTML = compiledStyle;
22
- var dom = document.querySelector("head");
23
- dom.appendChild(style);
24
- };
41
+ _createClass(StylePlugin, [
42
+ {
43
+ key: "apply",
44
+ value: function apply(engine) {
45
+ var _this_config;
46
+ this.engine = engine;
47
+ var _this_config_source;
48
+ var compiledStyle = (_this_config_source = (_this_config = this.config) === null || _this_config === void 0 ? void 0 : _this_config.source) !== null && _this_config_source !== void 0 ? _this_config_source : "";
49
+ var style = document.createElement("style");
50
+ style.className = "edit-css";
51
+ style.type = "text/css";
52
+ style.innerHTML = compiledStyle;
53
+ var dom = document.querySelector("head");
54
+ dom.appendChild(style);
55
+ }
56
+ }
57
+ ]);
25
58
  return StylePlugin;
26
59
  }();
@@ -8,7 +8,8 @@ export function loopFormControl(control, callback) {
8
8
  //TODO 此处需要再抽象一层 datagrid/datalist
9
9
  if (item.type === CONTROL_TYPE.SUBTABLE) {
10
10
  // @ts-ignore
11
- var children = item.getChildrenFormControl();
11
+ var children = []//item.getChildrenFormControl() as RuntimeFormControl[]
12
+ ;
12
13
  callback(item, children);
13
14
  } else if (hasChildrenControl(item)) {
14
15
  loopFormControl(item === null || item === void 0 ? void 0 : item.children, callback);