@zhubangyun/lowcode-core 1.1.20 → 1.1.22
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/components/react-render/index.d.ts +1 -1
- package/es/utils/common/LoadMaterials.d.ts +1 -0
- package/es/utils/common/LoadMaterials.js +37 -0
- package/es/utils/designer/assets/assets.data.antd.js +1 -11
- package/es/utils/designer/assets/assets.data.base.js +11 -8
- package/es/utils/designer/assets/assets.data.page.d.ts +3 -0
- package/es/utils/designer/assets/assets.data.page.js +12 -0
- package/es/utils/designer/assets/index.d.ts +1 -1
- package/es/utils/designer/assets/index.js +5 -1
- package/lib/components/react-render/index.d.ts +1 -1
- package/lib/utils/common/LoadMaterials.d.ts +1 -0
- package/lib/utils/common/LoadMaterials.js +42 -0
- package/lib/utils/designer/assets/assets.data.antd.js +1 -11
- package/lib/utils/designer/assets/assets.data.base.js +11 -8
- package/lib/utils/designer/assets/assets.data.page.d.ts +3 -0
- package/lib/utils/designer/assets/assets.data.page.js +16 -0
- package/lib/utils/designer/assets/index.d.ts +1 -1
- package/lib/utils/designer/assets/index.js +5 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadMaterials(): Promise<Record<string, React.FC>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { loadPlugins } from "./LoadPlugins";
|
|
4
|
+
export function loadMaterials() {
|
|
5
|
+
return _loadMaterials.apply(this, arguments);
|
|
6
|
+
}
|
|
7
|
+
function _loadMaterials() {
|
|
8
|
+
_loadMaterials = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
9
|
+
var urls, components;
|
|
10
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
urls = ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"];
|
|
14
|
+
_context.next = 3;
|
|
15
|
+
return loadPlugins(urls);
|
|
16
|
+
case 3:
|
|
17
|
+
components = {};
|
|
18
|
+
["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
|
|
19
|
+
var data = window[lib];
|
|
20
|
+
if (data) {
|
|
21
|
+
Object.entries(data).forEach(function (_ref) {
|
|
22
|
+
var key = _ref[0],
|
|
23
|
+
value = _ref[1];
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
components[key] = value;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return _context.abrupt("return", components);
|
|
30
|
+
case 6:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
33
|
+
}
|
|
34
|
+
}, _callee);
|
|
35
|
+
}));
|
|
36
|
+
return _loadMaterials.apply(this, arguments);
|
|
37
|
+
}
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
export var AntdAssets = {
|
|
2
|
-
packages: [
|
|
3
|
-
"package": "antd-material",
|
|
4
|
-
"version": "0.1.0",
|
|
5
|
-
"library": "AntdMaterial",
|
|
6
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
|
|
7
|
-
}, {
|
|
8
|
-
"package": "@zhubangyun/antd-pro-material",
|
|
9
|
-
"version": "0.1.0",
|
|
10
|
-
"library": "AntdProMaterial",
|
|
11
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
12
|
-
}],
|
|
2
|
+
packages: [],
|
|
13
3
|
components: [{
|
|
14
4
|
"exportName": "AntdMaterialMeta",
|
|
15
5
|
"npm": {
|
|
@@ -24,15 +24,18 @@ var BaseAssets = {
|
|
|
24
24
|
"version": "0.1.0",
|
|
25
25
|
"library": "RootMaterial",
|
|
26
26
|
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css"]
|
|
27
|
+
}, {
|
|
28
|
+
"package": "antd-material",
|
|
29
|
+
"version": "0.1.0",
|
|
30
|
+
"library": "AntdMaterial",
|
|
31
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
|
|
32
|
+
}, {
|
|
33
|
+
"package": "@zhubangyun/antd-pro-material",
|
|
34
|
+
"version": "0.1.0",
|
|
35
|
+
"library": "AntdProMaterial",
|
|
36
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
27
37
|
}],
|
|
28
|
-
"components": [
|
|
29
|
-
"exportName": "RootMaterialMeta",
|
|
30
|
-
"npm": {
|
|
31
|
-
"package": "root-material",
|
|
32
|
-
"version": "1.0.0"
|
|
33
|
-
},
|
|
34
|
-
"url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/meta.js"
|
|
35
|
-
}],
|
|
38
|
+
"components": [],
|
|
36
39
|
"sort": {
|
|
37
40
|
"categoryList": ["布局", "通用", "导航", "数据录入", "数据展示", "反馈", "大屏组件", "图表", "基础元素", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "引导", "信息输入", "信息展示", "信息反馈", "布局容器类", "增强组件", "工具组件"],
|
|
38
41
|
"groupList": ["", "原子组件", "精选组件", "增强分组", "图表组件", "默认分组"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var PageAssets = {
|
|
2
|
+
packages: [],
|
|
3
|
+
components: [{
|
|
4
|
+
"exportName": "RootMaterialMeta",
|
|
5
|
+
"npm": {
|
|
6
|
+
"package": "root-material",
|
|
7
|
+
"version": "1.0.0"
|
|
8
|
+
},
|
|
9
|
+
"url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/meta.js"
|
|
10
|
+
}]
|
|
11
|
+
};
|
|
12
|
+
export default PageAssets;
|
|
@@ -2,6 +2,7 @@ import BaseAssets from "./assets.data.base";
|
|
|
2
2
|
import DesignAssets from "./assets.data.design";
|
|
3
3
|
import AntdAssets from "./assets.data.antd";
|
|
4
4
|
import ChartAssets from "./assets.data.chart";
|
|
5
|
+
import PageAssets from "./assets.data.page";
|
|
5
6
|
export var DesignerAssets = /*#__PURE__*/function () {
|
|
6
7
|
function DesignerAssets() {
|
|
7
8
|
var _this = this;
|
|
@@ -22,7 +23,7 @@ export var DesignerAssets = /*#__PURE__*/function () {
|
|
|
22
23
|
}
|
|
23
24
|
var _proto = DesignerAssets.prototype;
|
|
24
25
|
_proto.addDefaultAssets = function addDefaultAssets(types) {
|
|
25
|
-
var _types, _types2;
|
|
26
|
+
var _types, _types2, _types3;
|
|
26
27
|
if (types === void 0) {
|
|
27
28
|
types = [];
|
|
28
29
|
}
|
|
@@ -32,6 +33,9 @@ export var DesignerAssets = /*#__PURE__*/function () {
|
|
|
32
33
|
if ((_types2 = types) !== null && _types2 !== void 0 && _types2.includes("chart")) {
|
|
33
34
|
this.addAssets(ChartAssets);
|
|
34
35
|
}
|
|
36
|
+
if ((_types3 = types) !== null && _types3 !== void 0 && _types3.includes("page")) {
|
|
37
|
+
this.addAssets(PageAssets);
|
|
38
|
+
}
|
|
35
39
|
};
|
|
36
40
|
_proto.addAssets = function addAssets(assert) {
|
|
37
41
|
var _assert$components, _assert$components$fo, _assert$packages, _assert$packages$forE;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadMaterials(): Promise<Record<string, React.FC>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.loadMaterials = loadMaterials;
|
|
6
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
8
|
+
var _LoadPlugins = require("./LoadPlugins");
|
|
9
|
+
function loadMaterials() {
|
|
10
|
+
return _loadMaterials.apply(this, arguments);
|
|
11
|
+
}
|
|
12
|
+
function _loadMaterials() {
|
|
13
|
+
_loadMaterials = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
14
|
+
var urls, components;
|
|
15
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
16
|
+
while (1) switch (_context.prev = _context.next) {
|
|
17
|
+
case 0:
|
|
18
|
+
urls = ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"];
|
|
19
|
+
_context.next = 3;
|
|
20
|
+
return (0, _LoadPlugins.loadPlugins)(urls);
|
|
21
|
+
case 3:
|
|
22
|
+
components = {};
|
|
23
|
+
["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
|
|
24
|
+
var data = window[lib];
|
|
25
|
+
if (data) {
|
|
26
|
+
Object.entries(data).forEach(function (_ref) {
|
|
27
|
+
var key = _ref[0],
|
|
28
|
+
value = _ref[1];
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
components[key] = value;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return _context.abrupt("return", components);
|
|
35
|
+
case 6:
|
|
36
|
+
case "end":
|
|
37
|
+
return _context.stop();
|
|
38
|
+
}
|
|
39
|
+
}, _callee);
|
|
40
|
+
}));
|
|
41
|
+
return _loadMaterials.apply(this, arguments);
|
|
42
|
+
}
|
|
@@ -3,17 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports["default"] = exports.AntdAssets = void 0;
|
|
5
5
|
var AntdAssets = exports.AntdAssets = {
|
|
6
|
-
packages: [
|
|
7
|
-
"package": "antd-material",
|
|
8
|
-
"version": "0.1.0",
|
|
9
|
-
"library": "AntdMaterial",
|
|
10
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
|
|
11
|
-
}, {
|
|
12
|
-
"package": "@zhubangyun/antd-pro-material",
|
|
13
|
-
"version": "0.1.0",
|
|
14
|
-
"library": "AntdProMaterial",
|
|
15
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
16
|
-
}],
|
|
6
|
+
packages: [],
|
|
17
7
|
components: [{
|
|
18
8
|
"exportName": "AntdMaterialMeta",
|
|
19
9
|
"npm": {
|
|
@@ -28,15 +28,18 @@ var BaseAssets = {
|
|
|
28
28
|
"version": "0.1.0",
|
|
29
29
|
"library": "RootMaterial",
|
|
30
30
|
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css"]
|
|
31
|
+
}, {
|
|
32
|
+
"package": "antd-material",
|
|
33
|
+
"version": "0.1.0",
|
|
34
|
+
"library": "AntdMaterial",
|
|
35
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
|
|
36
|
+
}, {
|
|
37
|
+
"package": "@zhubangyun/antd-pro-material",
|
|
38
|
+
"version": "0.1.0",
|
|
39
|
+
"library": "AntdProMaterial",
|
|
40
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
31
41
|
}],
|
|
32
|
-
"components": [
|
|
33
|
-
"exportName": "RootMaterialMeta",
|
|
34
|
-
"npm": {
|
|
35
|
-
"package": "root-material",
|
|
36
|
-
"version": "1.0.0"
|
|
37
|
-
},
|
|
38
|
-
"url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/meta.js"
|
|
39
|
-
}],
|
|
42
|
+
"components": [],
|
|
40
43
|
"sort": {
|
|
41
44
|
"categoryList": ["布局", "通用", "导航", "数据录入", "数据展示", "反馈", "大屏组件", "图表", "基础元素", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "引导", "信息输入", "信息展示", "信息反馈", "布局容器类", "增强组件", "工具组件"],
|
|
42
45
|
"groupList": ["", "原子组件", "精选组件", "增强分组", "图表组件", "默认分组"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = void 0;
|
|
5
|
+
var PageAssets = {
|
|
6
|
+
packages: [],
|
|
7
|
+
components: [{
|
|
8
|
+
"exportName": "RootMaterialMeta",
|
|
9
|
+
"npm": {
|
|
10
|
+
"package": "root-material",
|
|
11
|
+
"version": "1.0.0"
|
|
12
|
+
},
|
|
13
|
+
"url": "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/meta.js"
|
|
14
|
+
}]
|
|
15
|
+
};
|
|
16
|
+
var _default = exports["default"] = PageAssets;
|
|
@@ -7,6 +7,7 @@ var _assetsData = _interopRequireDefault(require("./assets.data.base"));
|
|
|
7
7
|
var _assetsData2 = _interopRequireDefault(require("./assets.data.design"));
|
|
8
8
|
var _assetsData3 = _interopRequireDefault(require("./assets.data.antd"));
|
|
9
9
|
var _assetsData4 = _interopRequireDefault(require("./assets.data.chart"));
|
|
10
|
+
var _assetsData5 = _interopRequireDefault(require("./assets.data.page"));
|
|
10
11
|
var DesignerAssets = exports.DesignerAssets = /*#__PURE__*/function () {
|
|
11
12
|
function DesignerAssets() {
|
|
12
13
|
var _this = this;
|
|
@@ -27,7 +28,7 @@ var DesignerAssets = exports.DesignerAssets = /*#__PURE__*/function () {
|
|
|
27
28
|
}
|
|
28
29
|
var _proto = DesignerAssets.prototype;
|
|
29
30
|
_proto.addDefaultAssets = function addDefaultAssets(types) {
|
|
30
|
-
var _types, _types2;
|
|
31
|
+
var _types, _types2, _types3;
|
|
31
32
|
if (types === void 0) {
|
|
32
33
|
types = [];
|
|
33
34
|
}
|
|
@@ -37,6 +38,9 @@ var DesignerAssets = exports.DesignerAssets = /*#__PURE__*/function () {
|
|
|
37
38
|
if ((_types2 = types) !== null && _types2 !== void 0 && _types2.includes("chart")) {
|
|
38
39
|
this.addAssets(_assetsData4["default"]);
|
|
39
40
|
}
|
|
41
|
+
if ((_types3 = types) !== null && _types3 !== void 0 && _types3.includes("page")) {
|
|
42
|
+
this.addAssets(_assetsData5["default"]);
|
|
43
|
+
}
|
|
40
44
|
};
|
|
41
45
|
_proto.addAssets = function addAssets(assert) {
|
|
42
46
|
var _assert$components, _assert$components$fo, _assert$packages, _assert$packages$forE;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhubangyun/lowcode-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "低代码核心",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build:npm": "build-scripts build",
|
|
15
15
|
"build:umd": "build-scripts build --config build.umd.json",
|
|
16
16
|
"publish:npm": "npm run build:npm && npm publish",
|
|
17
|
-
"publish:
|
|
17
|
+
"publish:oss": "npm run build:umd && node scripts/publishToCdn.ts"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@alilc/lowcode-datasource-fetch-handler": "^1.1.4",
|