amos-apptool 1.3.3 → 1.3.5
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/esm/index.js +3 -1
- package/esm/widgets.js +6 -2
- package/lib/index.js +11 -0
- package/lib/widgets.js +6 -2
- package/package.json +1 -1
package/esm/index.js
CHANGED
package/esm/widgets.js
CHANGED
|
@@ -103,7 +103,7 @@ const toString = Function.prototype.toString;
|
|
|
103
103
|
|
|
104
104
|
function isModular(e) {
|
|
105
105
|
let t = !!(e && e.prototype && e.prototype.isReactComponent);
|
|
106
|
-
return t || (t = !(!e || !(e.__MODULAR__ || e.__SKETCH || e.__AMOS_BASIC_FORM))),
|
|
106
|
+
return t || (t = !(!e || !(e.__MODULAR__ || e.__SKETCH || e.__AMOS_BASIC_FORM || e.__APP__))),
|
|
107
107
|
t;
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -112,6 +112,10 @@ function isClassCallCheck(e) {
|
|
|
112
112
|
return /^.*classCallCheck\(/.test(t) || t.includes("classCallCheck");
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
function isTaroCom(e) {
|
|
116
|
+
return e.includes("__PURE__") || e.includes("react_jsx_runtime") || e.includes("taro");
|
|
117
|
+
}
|
|
118
|
+
|
|
115
119
|
function isInherit(e) {
|
|
116
120
|
return e.includes("class") || e.includes("super()") || e.includes("instanceof");
|
|
117
121
|
}
|
|
@@ -124,7 +128,7 @@ function isClass(e) {
|
|
|
124
128
|
let t = isModular(e);
|
|
125
129
|
if (!t) try {
|
|
126
130
|
const r = toString.call(e);
|
|
127
|
-
t = "function" == typeof e && (/^class\s/.test(r) || isClassCallCheck(r) || isReactComponent(r) || isInherit(r));
|
|
131
|
+
t = "function" == typeof e && (/^class\s/.test(r) || isClassCallCheck(r) || isReactComponent(r) || isTaroCom(r) || isInherit(r));
|
|
128
132
|
} catch (e) {
|
|
129
133
|
t = !1;
|
|
130
134
|
}
|
package/lib/index.js
CHANGED
|
@@ -284,4 +284,15 @@ Object.keys(_restfulUrl).forEach(function(e) {
|
|
|
284
284
|
return _restfulUrl[e];
|
|
285
285
|
}
|
|
286
286
|
}));
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
var _widgets = require("./widgets");
|
|
290
|
+
|
|
291
|
+
Object.keys(_widgets).forEach(function(e) {
|
|
292
|
+
"default" !== e && "__esModule" !== e && (Object.prototype.hasOwnProperty.call(_exportNames, e) || e in exports && exports[e] === _widgets[e] || Object.defineProperty(exports, e, {
|
|
293
|
+
enumerable: !0,
|
|
294
|
+
get: function() {
|
|
295
|
+
return _widgets[e];
|
|
296
|
+
}
|
|
297
|
+
}));
|
|
287
298
|
});
|
package/lib/widgets.js
CHANGED
|
@@ -235,7 +235,7 @@ var index = 0, createCacheName = function(e) {
|
|
|
235
235
|
|
|
236
236
|
function isModular(e) {
|
|
237
237
|
var r = !!(e && e.prototype && e.prototype.isReactComponent);
|
|
238
|
-
return r || (r = !(!e || !(e.__MODULAR__ || e.__SKETCH || e.__AMOS_BASIC_FORM))),
|
|
238
|
+
return r || (r = !(!e || !(e.__MODULAR__ || e.__SKETCH || e.__AMOS_BASIC_FORM || e.__APP__))),
|
|
239
239
|
r;
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -244,6 +244,10 @@ function isClassCallCheck(e) {
|
|
|
244
244
|
return /^.*classCallCheck\(/.test(r) || r.includes("classCallCheck");
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
function isTaroCom(e) {
|
|
248
|
+
return e.includes("__PURE__") || e.includes("react_jsx_runtime") || e.includes("taro");
|
|
249
|
+
}
|
|
250
|
+
|
|
247
251
|
function isInherit(e) {
|
|
248
252
|
return e.includes("class") || e.includes("super()") || e.includes("instanceof");
|
|
249
253
|
}
|
|
@@ -256,7 +260,7 @@ function isClass(e) {
|
|
|
256
260
|
var r = isModular(e);
|
|
257
261
|
if (!r) try {
|
|
258
262
|
var t = toString.call(e);
|
|
259
|
-
r = "function" == typeof e && (/^class\s/.test(t) || isClassCallCheck(t) || isReactComponent(t) || isInherit(t));
|
|
263
|
+
r = "function" == typeof e && (/^class\s/.test(t) || isClassCallCheck(t) || isReactComponent(t) || isTaroCom(t) || isInherit(t));
|
|
260
264
|
} catch (e) {
|
|
261
265
|
r = !1;
|
|
262
266
|
}
|