@zzdadelu/schema-builder 1.0.0-alpha.127 → 1.0.0-alpha.128
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/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/main.js +9 -8
- package/lib/main.js +9 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4136,21 +4136,21 @@
|
|
|
4136
4136
|
});
|
|
4137
4137
|
|
|
4138
4138
|
var _excluded = ["widgets", "settings"];
|
|
4139
|
-
var iframe;
|
|
4140
4139
|
var Design = function Design(props, ref) {
|
|
4141
4140
|
var widgets = props.widgets,
|
|
4142
4141
|
settings = props.settings,
|
|
4143
4142
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
4144
4143
|
var containerRef = React.useRef();
|
|
4144
|
+
var iframeRef = React.useRef(null);
|
|
4145
4145
|
React.useImperativeHandle(ref, function () {
|
|
4146
4146
|
return {
|
|
4147
4147
|
getValue: function getValue() {
|
|
4148
|
-
var
|
|
4149
|
-
return (
|
|
4148
|
+
var _iframeRef$current, _iframeRef$current$co, _iframeRef$current$co2, _iframeRef$current$co3;
|
|
4149
|
+
return (_iframeRef$current = iframeRef.current) === null || _iframeRef$current === void 0 ? void 0 : (_iframeRef$current$co = _iframeRef$current.contentWindow) === null || _iframeRef$current$co === void 0 ? void 0 : (_iframeRef$current$co2 = _iframeRef$current$co.__FR_ENGINE__) === null || _iframeRef$current$co2 === void 0 ? void 0 : (_iframeRef$current$co3 = _iframeRef$current$co2.exportSchema) === null || _iframeRef$current$co3 === void 0 ? void 0 : _iframeRef$current$co3.call(_iframeRef$current$co2);
|
|
4150
4150
|
},
|
|
4151
4151
|
setValue: function setValue(schema) {
|
|
4152
|
-
var
|
|
4153
|
-
return (
|
|
4152
|
+
var _iframeRef$current2, _iframeRef$current2$c, _iframeRef$current2$c2, _iframeRef$current2$c3;
|
|
4153
|
+
return (_iframeRef$current2 = iframeRef.current) === null || _iframeRef$current2 === void 0 ? void 0 : (_iframeRef$current2$c = _iframeRef$current2.contentWindow) === null || _iframeRef$current2$c === void 0 ? void 0 : (_iframeRef$current2$c2 = _iframeRef$current2$c.__FR_ENGINE__) === null || _iframeRef$current2$c2 === void 0 ? void 0 : (_iframeRef$current2$c3 = _iframeRef$current2$c2.importSchema) === null || _iframeRef$current2$c3 === void 0 ? void 0 : _iframeRef$current2$c3.call(_iframeRef$current2$c2, schema);
|
|
4154
4154
|
}
|
|
4155
4155
|
};
|
|
4156
4156
|
});
|
|
@@ -4162,15 +4162,16 @@
|
|
|
4162
4162
|
};
|
|
4163
4163
|
}, []);
|
|
4164
4164
|
var initIframe = function initIframe() {
|
|
4165
|
-
iframe = createIframe();
|
|
4165
|
+
var iframe = createIframe();
|
|
4166
|
+
iframeRef.current = iframe;
|
|
4166
4167
|
containerRef.current.appendChild(iframe);
|
|
4167
4168
|
};
|
|
4168
4169
|
var engineOnLoad = function engineOnLoad(event) {
|
|
4169
|
-
var
|
|
4170
|
+
var _iframeRef$current3, _iframeRef$current3$c, _iframeRef$current3$c2;
|
|
4170
4171
|
if (event.data.type !== 'engine-load') {
|
|
4171
4172
|
return;
|
|
4172
4173
|
}
|
|
4173
|
-
(
|
|
4174
|
+
(_iframeRef$current3 = iframeRef.current) === null || _iframeRef$current3 === void 0 ? void 0 : (_iframeRef$current3$c = _iframeRef$current3.contentWindow) === null || _iframeRef$current3$c === void 0 ? void 0 : (_iframeRef$current3$c2 = _iframeRef$current3$c.__FR_ENGINE__) === null || _iframeRef$current3$c2 === void 0 ? void 0 : _iframeRef$current3$c2.init(_objectSpread2({
|
|
4174
4175
|
settings: _objectSpread2(_objectSpread2({}, defaultSetting), settings),
|
|
4175
4176
|
widgets: widgets,
|
|
4176
4177
|
// recordEnable: true,
|