@byteluck-fe/model-driven-core-all 2.23.0-beta.0 → 2.23.0-beta.10

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # `runtime-all`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const runtimeAll = require('runtime-all');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```
1
+ # `runtime-all`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const runtimeAll = require('runtime-all');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
@@ -4,6 +4,10 @@ function _assert_this_initialized(self) {
4
4
  }
5
5
  return self;
6
6
  }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
7
11
  function _class_call_check(instance, Constructor) {
8
12
  if (!(instance instanceof Constructor)) {
9
13
  throw new TypeError("Cannot call a class as a function");
@@ -73,28 +77,12 @@ function _type_of(obj) {
73
77
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
74
78
  }
75
79
  function _is_native_reflect_construct() {
76
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
77
- if (Reflect.construct.sham) return false;
78
- if (typeof Proxy === "function") return true;
79
80
  try {
80
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
81
- return true;
82
- } catch (e) {
83
- return false;
84
- }
85
- }
86
- function _create_super(Derived) {
87
- var hasNativeReflectConstruct = _is_native_reflect_construct();
88
- return function _createSuperInternal() {
89
- var Super = _get_prototype_of(Derived), result;
90
- if (hasNativeReflectConstruct) {
91
- var NewTarget = _get_prototype_of(this).constructor;
92
- result = Reflect.construct(Super, arguments, NewTarget);
93
- } else {
94
- result = Super.apply(this, arguments);
95
- }
96
- return _possible_constructor_return(this, result);
97
- };
81
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
82
+ } catch (_) {}
83
+ return (_is_native_reflect_construct = function() {
84
+ return !!result;
85
+ })();
98
86
  }
99
87
  import { RuntimeControl } from '@byteluck-fe/model-driven-core';
100
88
  import { DesignerControl } from '@byteluck-fe/model-driven-core';
@@ -106,12 +94,12 @@ export function getHackerControl(comid, type, tipMessage) {
106
94
  HackerControlClass = /*#__PURE__*/ function(RuntimeControl) {
107
95
  "use strict";
108
96
  _inherits(HackerControl, RuntimeControl);
109
- var _super = _create_super(HackerControl);
110
97
  function HackerControl(props) {
111
98
  _class_call_check(this, HackerControl);
112
99
  var _this;
113
- _this = _super.call(this, props);
114
- _define_property(_assert_this_initialized(_this), "props", {});
100
+ _this = _call_super(this, HackerControl, [
101
+ props
102
+ ]), _define_property(_this, "props", {});
115
103
  return _this;
116
104
  }
117
105
  _create_class(HackerControl, null, [
@@ -128,12 +116,12 @@ export function getHackerControl(comid, type, tipMessage) {
128
116
  HackerControlClass = /*#__PURE__*/ function(DesignerControl) {
129
117
  "use strict";
130
118
  _inherits(HackerControl, DesignerControl);
131
- var _super = _create_super(HackerControl);
132
119
  function HackerControl(props) {
133
120
  _class_call_check(this, HackerControl);
134
121
  var _this;
135
- _this = _super.call(this, props);
136
- _define_property(_assert_this_initialized(_this), "props", {});
122
+ _this = _call_super(this, HackerControl, [
123
+ props
124
+ ]), _define_property(_this, "props", {});
137
125
  return _this;
138
126
  }
139
127
  _create_class(HackerControl, null, [
@@ -150,10 +138,9 @@ export function getHackerControl(comid, type, tipMessage) {
150
138
  var HackerPropertyClass = /*#__PURE__*/ function(Property) {
151
139
  "use strict";
152
140
  _inherits(HackerPropertyClass, Property);
153
- var _super = _create_super(HackerPropertyClass);
154
141
  function HackerPropertyClass() {
155
142
  _class_call_check(this, HackerPropertyClass);
156
- return _super.apply(this, arguments);
143
+ return _call_super(this, HackerPropertyClass, arguments);
157
144
  }
158
145
  return HackerPropertyClass;
159
146
  }(Property);
@@ -124,6 +124,7 @@ function _ts_generator(thisArg, body) {
124
124
  }
125
125
  import { getHackerControl } from './getHackerControl';
126
126
  import { nativeFetch, loadRemoteControl } from './loadRemoteScripts';
127
+ import { RulesMessage } from '@byteluck-fe/model-driven-shared';
127
128
  export function registerByteluckControls(url, payload) {
128
129
  return _registerByteluckControls.apply(this, arguments);
129
130
  }
@@ -165,7 +166,7 @@ function _registerByteluckControls() {
165
166
  }
166
167
  });
167
168
  if (control === undefined) {
168
- control = getHackerControl(item.id, payload.type, '内置组件加载错误');
169
+ control = getHackerControl(item.id, payload.type, RulesMessage.getMessage('loadCtrlError'));
169
170
  }
170
171
  byteluckControls.set(item.id, {
171
172
  props: item,
@@ -190,7 +190,7 @@ function _registerCustomControls() {
190
190
  //qiyu 2022-4-18 逐个加载自定义组件,只有异常的组件加载为hackerControl
191
191
  return [
192
192
  4,
193
- Promise.all(components.map(function() {
193
+ Promise.all(components.map(/*#__PURE__*/ function() {
194
194
  var _ref = _async_to_generator(function(item) {
195
195
  var isLoaded, control, url, e, link, reg, reg1, styleLink;
196
196
  return _ts_generator(this, function(_state) {