@zzdadelu/schema-builder 1.0.0-alpha.110 → 1.0.0-alpha.112
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/es/main.js +16 -12
- package/lib/main.js +16 -12
- package/package.json +1 -1
package/es/main.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var _excluded = ["widgets", "settings"];
|
|
2
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
8
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
10
10
|
import React, { useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
@@ -40,7 +40,7 @@ var Design = function Design(props, ref) {
|
|
|
40
40
|
containerRef.current.appendChild(iframe);
|
|
41
41
|
};
|
|
42
42
|
var engineOnLoad = function engineOnLoad(event) {
|
|
43
|
-
var _iframe3
|
|
43
|
+
var _iframe3;
|
|
44
44
|
if (event.data.type !== 'engine-load') {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
@@ -52,17 +52,21 @@ var Design = function Design(props, ref) {
|
|
|
52
52
|
console.error('Iframe 窗口或文档引用丢失。');
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
+
console.error('Iframe typeof iframeWindow.getFormRenderMaterial 1', _typeof(iframeWindow.getFormRenderMaterial));
|
|
56
|
+
setTimeout(function () {
|
|
57
|
+
var _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
|
|
58
|
+
console.log('延迟结束,开始调用 __FR_ENGINE__?.init');
|
|
59
|
+
(_iframe4 = iframe) === null || _iframe4 === void 0 ? void 0 : (_iframe4$contentWindo = _iframe4.contentWindow) === null || _iframe4$contentWindo === void 0 ? void 0 : (_iframe4$contentWindo2 = _iframe4$contentWindo.__FR_ENGINE__) === null || _iframe4$contentWindo2 === void 0 ? void 0 : _iframe4$contentWindo2.init(_objectSpread({
|
|
60
|
+
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
61
|
+
widgets: widgets,
|
|
62
|
+
// recordEnable: true,
|
|
63
|
+
logo: {
|
|
64
|
+
title: 'XRender'
|
|
65
|
+
}
|
|
66
|
+
}, restProps));
|
|
67
|
+
}, 10000); // 200ms 是一个足够安全的时间
|
|
55
68
|
|
|
56
|
-
|
|
57
|
-
(_iframeWindow$__FR_EN = iframeWindow.__FR_ENGINE__) === null || _iframeWindow$__FR_EN === void 0 ? void 0 : _iframeWindow$__FR_EN.init(_objectSpread({
|
|
58
|
-
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
59
|
-
widgets: widgets,
|
|
60
|
-
// recordEnable: true,
|
|
61
|
-
logo: {
|
|
62
|
-
title: 'XRender'
|
|
63
|
-
}
|
|
64
|
-
}, restProps));
|
|
65
|
-
console.error('Iframe typeof iframeWindow.getFormRenderMaterial', _typeof(iframeWindow.getFormRenderMaterial));
|
|
69
|
+
console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
|
|
66
70
|
};
|
|
67
71
|
return /*#__PURE__*/React.createElement("div", {
|
|
68
72
|
ref: containerRef,
|
package/lib/main.js
CHANGED
|
@@ -10,12 +10,12 @@ var defaultSetting = _interopRequireWildcard(require("./settings"));
|
|
|
10
10
|
var _excluded = ["widgets", "settings"];
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
15
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
16
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
19
19
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
20
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
21
21
|
var iframe;
|
|
@@ -48,7 +48,7 @@ var Design = function Design(props, ref) {
|
|
|
48
48
|
containerRef.current.appendChild(iframe);
|
|
49
49
|
};
|
|
50
50
|
var engineOnLoad = function engineOnLoad(event) {
|
|
51
|
-
var _iframe3
|
|
51
|
+
var _iframe3;
|
|
52
52
|
if (event.data.type !== 'engine-load') {
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
@@ -60,17 +60,21 @@ var Design = function Design(props, ref) {
|
|
|
60
60
|
console.error('Iframe 窗口或文档引用丢失。');
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
+
console.error('Iframe typeof iframeWindow.getFormRenderMaterial 1', _typeof(iframeWindow.getFormRenderMaterial));
|
|
64
|
+
setTimeout(function () {
|
|
65
|
+
var _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
|
|
66
|
+
console.log('延迟结束,开始调用 __FR_ENGINE__?.init');
|
|
67
|
+
(_iframe4 = iframe) === null || _iframe4 === void 0 ? void 0 : (_iframe4$contentWindo = _iframe4.contentWindow) === null || _iframe4$contentWindo === void 0 ? void 0 : (_iframe4$contentWindo2 = _iframe4$contentWindo.__FR_ENGINE__) === null || _iframe4$contentWindo2 === void 0 ? void 0 : _iframe4$contentWindo2.init(_objectSpread({
|
|
68
|
+
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
69
|
+
widgets: widgets,
|
|
70
|
+
// recordEnable: true,
|
|
71
|
+
logo: {
|
|
72
|
+
title: 'XRender'
|
|
73
|
+
}
|
|
74
|
+
}, restProps));
|
|
75
|
+
}, 10000); // 200ms 是一个足够安全的时间
|
|
63
76
|
|
|
64
|
-
|
|
65
|
-
(_iframeWindow$__FR_EN = iframeWindow.__FR_ENGINE__) === null || _iframeWindow$__FR_EN === void 0 ? void 0 : _iframeWindow$__FR_EN.init(_objectSpread({
|
|
66
|
-
settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
|
|
67
|
-
widgets: widgets,
|
|
68
|
-
// recordEnable: true,
|
|
69
|
-
logo: {
|
|
70
|
-
title: 'XRender'
|
|
71
|
-
}
|
|
72
|
-
}, restProps));
|
|
73
|
-
console.error('Iframe typeof iframeWindow.getFormRenderMaterial', _typeof(iframeWindow.getFormRenderMaterial));
|
|
77
|
+
console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
|
|
74
78
|
};
|
|
75
79
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
76
80
|
ref: containerRef,
|