@xrenders/schema-builder 1.0.0-alpha.10 → 1.0.0-alpha.11
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/createIframe.js +1 -1
- package/es/main.d.ts +3 -6
- package/es/main.js +17 -5
- package/es/type.d.ts +32 -0
- package/es/type.js +1 -0
- package/lib/createIframe.js +1 -1
- package/lib/main.d.ts +3 -6
- package/lib/main.js +16 -4
- package/lib/type.d.ts +32 -0
- package/lib/type.js +5 -0
- package/package.json +1 -1
package/es/createIframe.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var createIframeContent = function createIframeContent() {
|
|
2
|
-
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.10/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n\n </head>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.
|
|
2
|
+
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.10/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n\n </head>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.11/js/index.js\"></script>\n </body>\n </html>\n ";
|
|
3
3
|
return html;
|
|
4
4
|
};
|
|
5
5
|
export default (function () {
|
package/es/main.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare const Design: (props: IProps) => React.JSX.Element;
|
|
7
|
-
export default Design;
|
|
2
|
+
import { TSchemaBuilder } from './type';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<TSchemaBuilder, keyof TSchemaBuilder> & React.RefAttributes<unknown>>;
|
|
4
|
+
export default _default;
|
package/es/main.js
CHANGED
|
@@ -7,14 +7,26 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
import React, { useEffect, useRef } from 'react';
|
|
10
|
+
import React, { useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
|
|
11
11
|
import createIframe from './createIframe';
|
|
12
12
|
var iframe;
|
|
13
|
-
var Design = function Design(props) {
|
|
13
|
+
var Design = function Design(props, ref) {
|
|
14
14
|
var widgets = props.widgets,
|
|
15
15
|
settings = props.settings,
|
|
16
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
17
17
|
var containerRef = useRef();
|
|
18
|
+
useImperativeHandle(ref, function () {
|
|
19
|
+
return {
|
|
20
|
+
getValue: function getValue() {
|
|
21
|
+
var _iframe, _iframe$contentWindow, _iframe$contentWindow2, _iframe$contentWindow3;
|
|
22
|
+
return (_iframe = iframe) === null || _iframe === void 0 ? void 0 : (_iframe$contentWindow = _iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : (_iframe$contentWindow2 = _iframe$contentWindow.__FR_ENGINE__) === null || _iframe$contentWindow2 === void 0 ? void 0 : (_iframe$contentWindow3 = _iframe$contentWindow2.exportSchema) === null || _iframe$contentWindow3 === void 0 ? void 0 : _iframe$contentWindow3.call(_iframe$contentWindow2);
|
|
23
|
+
},
|
|
24
|
+
setValue: function setValue(schema) {
|
|
25
|
+
var _iframe2, _iframe2$contentWindo, _iframe2$contentWindo2, _iframe2$contentWindo3;
|
|
26
|
+
return (_iframe2 = iframe) === null || _iframe2 === void 0 ? void 0 : (_iframe2$contentWindo = _iframe2.contentWindow) === null || _iframe2$contentWindo === void 0 ? void 0 : (_iframe2$contentWindo2 = _iframe2$contentWindo.__FR_ENGINE__) === null || _iframe2$contentWindo2 === void 0 ? void 0 : (_iframe2$contentWindo3 = _iframe2$contentWindo2.importSchema) === null || _iframe2$contentWindo3 === void 0 ? void 0 : _iframe2$contentWindo3.call(_iframe2$contentWindo2, schema);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
});
|
|
18
30
|
useEffect(function () {
|
|
19
31
|
initIframe();
|
|
20
32
|
window.addEventListener('message', engineOnLoad);
|
|
@@ -27,11 +39,11 @@ var Design = function Design(props) {
|
|
|
27
39
|
containerRef.current.appendChild(iframe);
|
|
28
40
|
};
|
|
29
41
|
var engineOnLoad = function engineOnLoad(event) {
|
|
30
|
-
var
|
|
42
|
+
var _iframe3, _iframe3$contentWindo, _iframe3$contentWindo2;
|
|
31
43
|
if (event.data.type !== 'engine-load') {
|
|
32
44
|
return;
|
|
33
45
|
}
|
|
34
|
-
(
|
|
46
|
+
(_iframe3 = iframe) === null || _iframe3 === void 0 ? void 0 : (_iframe3$contentWindo = _iframe3.contentWindow) === null || _iframe3$contentWindo === void 0 ? void 0 : (_iframe3$contentWindo2 = _iframe3$contentWindo.__FR_ENGINE__) === null || _iframe3$contentWindo2 === void 0 ? void 0 : _iframe3$contentWindo2.init(_objectSpread({
|
|
35
47
|
settings: settings,
|
|
36
48
|
widgets: widgets,
|
|
37
49
|
// recordEnable: true,
|
|
@@ -48,4 +60,4 @@ var Design = function Design(props) {
|
|
|
48
60
|
}
|
|
49
61
|
});
|
|
50
62
|
};
|
|
51
|
-
export default Design;
|
|
63
|
+
export default /*#__PURE__*/forwardRef(Design);
|
package/es/type.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface TProperties {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
interface TLogo {
|
|
5
|
+
title?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
interface TSchema {
|
|
10
|
+
"type": "object";
|
|
11
|
+
"properties": TProperties;
|
|
12
|
+
}
|
|
13
|
+
interface TToolBtn {
|
|
14
|
+
text: string;
|
|
15
|
+
order: number;
|
|
16
|
+
onClick: (schema: TSchema) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface TSchemaBuilder {
|
|
19
|
+
logo?: TLogo;
|
|
20
|
+
importBtn?: boolean;
|
|
21
|
+
exportBtn?: boolean;
|
|
22
|
+
clearBtn?: boolean | TToolBtn;
|
|
23
|
+
saveBtn?: boolean | TToolBtn;
|
|
24
|
+
pubBtn?: boolean | TToolBtn;
|
|
25
|
+
extraBtns?: TToolBtn[];
|
|
26
|
+
defaultValue?: TSchema;
|
|
27
|
+
widgets?: any;
|
|
28
|
+
settings?: any;
|
|
29
|
+
onMount?: () => void;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/es/type.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/createIframe.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var createIframeContent = function createIframeContent() {
|
|
8
|
-
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.10/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n\n </head>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.
|
|
8
|
+
var html = "\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\" />\n <title>XRender</title>\n <link rel=\"icon\" href=\"https://img.alicdn.com/tfs/TB17UtINiLaK1RjSZFxXXamPFXa-606-643.png\">\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css\" rel=\"stylesheet\" />\n <link href=\"https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css\" rel=\"stylesheet\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/css/engine-core.css\" />\n <link rel=\"stylesheet\" href=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/css/engine-ext.css\" />\n <link rel=\"stylesheet\" href=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.10/css/index.css\" />\n\n <script>\n window.React = window.parent.React;\n window.ReactDOM = window.parent.ReactDOM;\n </script>\n \n <script src=\"https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/react15-polyfill/0.0.1/dist/index.js\"></script>\n <script src=\"https://g.alicdn.com/platform/c/lodash/4.6.1/lodash.min.js\"></script>\n <script src=\"https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js\"></script>\n <script src=\"https://g.alicdn.com/code/lib/alifd__next/1.23.24/next.min.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.11-beta.8/dist/js/engine-core.js\"></script>\n <script crossorigin=\"anonymous\" src=\"https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6/dist/js/engine-ext.js\"></script>\n\n </head>\n\n <body>\n <div id=\"lce-container\"></div>\n <script type=\"text/javascript\" src=\"https://g.alicdn.com/fone-lowcode/fr-generator/1.0.11/js/index.js\"></script>\n </body>\n </html>\n ";
|
|
9
9
|
return html;
|
|
10
10
|
};
|
|
11
11
|
var _default = exports.default = function _default() {
|
package/lib/main.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
declare const Design: (props: IProps) => React.JSX.Element;
|
|
7
|
-
export default Design;
|
|
2
|
+
import { TSchemaBuilder } from './type';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<TSchemaBuilder, keyof TSchemaBuilder> & React.RefAttributes<unknown>>;
|
|
4
|
+
export default _default;
|
package/lib/main.js
CHANGED
|
@@ -19,11 +19,23 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
19
19
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
20
20
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
21
21
|
var iframe;
|
|
22
|
-
var Design = function Design(props) {
|
|
22
|
+
var Design = function Design(props, ref) {
|
|
23
23
|
var widgets = props.widgets,
|
|
24
24
|
settings = props.settings,
|
|
25
25
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
26
26
|
var containerRef = (0, _react.useRef)();
|
|
27
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
28
|
+
return {
|
|
29
|
+
getValue: function getValue() {
|
|
30
|
+
var _iframe, _iframe$contentWindow, _iframe$contentWindow2, _iframe$contentWindow3;
|
|
31
|
+
return (_iframe = iframe) === null || _iframe === void 0 ? void 0 : (_iframe$contentWindow = _iframe.contentWindow) === null || _iframe$contentWindow === void 0 ? void 0 : (_iframe$contentWindow2 = _iframe$contentWindow.__FR_ENGINE__) === null || _iframe$contentWindow2 === void 0 ? void 0 : (_iframe$contentWindow3 = _iframe$contentWindow2.exportSchema) === null || _iframe$contentWindow3 === void 0 ? void 0 : _iframe$contentWindow3.call(_iframe$contentWindow2);
|
|
32
|
+
},
|
|
33
|
+
setValue: function setValue(schema) {
|
|
34
|
+
var _iframe2, _iframe2$contentWindo, _iframe2$contentWindo2, _iframe2$contentWindo3;
|
|
35
|
+
return (_iframe2 = iframe) === null || _iframe2 === void 0 ? void 0 : (_iframe2$contentWindo = _iframe2.contentWindow) === null || _iframe2$contentWindo === void 0 ? void 0 : (_iframe2$contentWindo2 = _iframe2$contentWindo.__FR_ENGINE__) === null || _iframe2$contentWindo2 === void 0 ? void 0 : (_iframe2$contentWindo3 = _iframe2$contentWindo2.importSchema) === null || _iframe2$contentWindo3 === void 0 ? void 0 : _iframe2$contentWindo3.call(_iframe2$contentWindo2, schema);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
});
|
|
27
39
|
(0, _react.useEffect)(function () {
|
|
28
40
|
initIframe();
|
|
29
41
|
window.addEventListener('message', engineOnLoad);
|
|
@@ -36,11 +48,11 @@ var Design = function Design(props) {
|
|
|
36
48
|
containerRef.current.appendChild(iframe);
|
|
37
49
|
};
|
|
38
50
|
var engineOnLoad = function engineOnLoad(event) {
|
|
39
|
-
var
|
|
51
|
+
var _iframe3, _iframe3$contentWindo, _iframe3$contentWindo2;
|
|
40
52
|
if (event.data.type !== 'engine-load') {
|
|
41
53
|
return;
|
|
42
54
|
}
|
|
43
|
-
(
|
|
55
|
+
(_iframe3 = iframe) === null || _iframe3 === void 0 ? void 0 : (_iframe3$contentWindo = _iframe3.contentWindow) === null || _iframe3$contentWindo === void 0 ? void 0 : (_iframe3$contentWindo2 = _iframe3$contentWindo.__FR_ENGINE__) === null || _iframe3$contentWindo2 === void 0 ? void 0 : _iframe3$contentWindo2.init(_objectSpread({
|
|
44
56
|
settings: settings,
|
|
45
57
|
widgets: widgets,
|
|
46
58
|
// recordEnable: true,
|
|
@@ -57,4 +69,4 @@ var Design = function Design(props) {
|
|
|
57
69
|
}
|
|
58
70
|
});
|
|
59
71
|
};
|
|
60
|
-
var _default = exports.default = Design;
|
|
72
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(Design);
|
package/lib/type.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface TProperties {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
interface TLogo {
|
|
5
|
+
title?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
interface TSchema {
|
|
10
|
+
"type": "object";
|
|
11
|
+
"properties": TProperties;
|
|
12
|
+
}
|
|
13
|
+
interface TToolBtn {
|
|
14
|
+
text: string;
|
|
15
|
+
order: number;
|
|
16
|
+
onClick: (schema: TSchema) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface TSchemaBuilder {
|
|
19
|
+
logo?: TLogo;
|
|
20
|
+
importBtn?: boolean;
|
|
21
|
+
exportBtn?: boolean;
|
|
22
|
+
clearBtn?: boolean | TToolBtn;
|
|
23
|
+
saveBtn?: boolean | TToolBtn;
|
|
24
|
+
pubBtn?: boolean | TToolBtn;
|
|
25
|
+
extraBtns?: TToolBtn[];
|
|
26
|
+
defaultValue?: TSchema;
|
|
27
|
+
widgets?: any;
|
|
28
|
+
settings?: any;
|
|
29
|
+
onMount?: () => void;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/lib/type.js
ADDED