@zzdadelu/schema-builder 1.0.0-alpha.112 → 1.0.0-alpha.113

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.
Files changed (3) hide show
  1. package/es/main.js +10 -17
  2. package/lib/main.js +10 -17
  3. package/package.json +1 -1
package/es/main.js CHANGED
@@ -1,10 +1,10 @@
1
+ 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); }
1
2
  var _excluded = ["widgets", "settings"];
2
3
  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; }
3
4
  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; }
4
5
  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; }
5
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
7
  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, _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
44
44
  if (event.data.type !== 'engine-load') {
45
45
  return;
46
46
  }
@@ -52,21 +52,14 @@ 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 是一个足够安全的时间
68
-
69
- console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
55
+ (_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({
56
+ settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
57
+ widgets: widgets,
58
+ // recordEnable: true,
59
+ logo: {
60
+ title: 'XRender'
61
+ }
62
+ }, restProps));
70
63
  };
71
64
  return /*#__PURE__*/React.createElement("div", {
72
65
  ref: containerRef,
package/lib/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ 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
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -15,7 +16,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
15
16
  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; }
16
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
18
  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, _iframe4, _iframe4$contentWindo, _iframe4$contentWindo2;
52
52
  if (event.data.type !== 'engine-load') {
53
53
  return;
54
54
  }
@@ -60,21 +60,14 @@ 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 是一个足够安全的时间
76
-
77
- console.error('Iframe typeof iframeWindow.getFormRenderMaterial 2', _typeof(iframeWindow.getFormRenderMaterial));
63
+ (_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({
64
+ settings: _objectSpread(_objectSpread({}, defaultSetting), settings),
65
+ widgets: widgets,
66
+ // recordEnable: true,
67
+ logo: {
68
+ title: 'XRender'
69
+ }
70
+ }, restProps));
78
71
  };
79
72
  return /*#__PURE__*/_react.default.createElement("div", {
80
73
  ref: containerRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzdadelu/schema-builder",
3
- "version": "1.0.0-alpha.112",
3
+ "version": "1.0.0-alpha.113",
4
4
  "description": "通过 JSON Schema 生成标准 Form,常用于自定义搭建配置界面生成",
5
5
  "keywords": [
6
6
  "Form",