focusbeui 0.1.0
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/README.md +17 -0
- package/build/docs/404.html +47 -0
- package/build/docs/_demos/:uuid +47 -0
- package/build/docs/colorful-button.html +48 -0
- package/build/docs/colorful-input.html +48 -0
- package/build/docs/index.html +48 -0
- package/build/docs/umi.5f9a7940.css +8 -0
- package/build/docs/umi.bc3194cc.js +1 -0
- package/build/docs/~demos/:uuid.html +47 -0
- package/build/docs/~demos/colorful-button-demo.html +47 -0
- package/build/docs/~demos/colorful-input-demo.html +47 -0
- package/build/index.css +2 -0
- package/build/index.html +1 -0
- package/build/index.js +53 -0
- package/build/lowcode/assets-daily.json +67 -0
- package/build/lowcode/assets-dev.json +67 -0
- package/build/lowcode/assets-prod.json +67 -0
- package/build/lowcode/designer.html +302 -0
- package/build/lowcode/index.html +304 -0
- package/build/lowcode/index.js +1 -0
- package/build/lowcode/meta.js +1 -0
- package/build/lowcode/preview.css +1 -0
- package/build/lowcode/preview.html +33 -0
- package/build/lowcode/preview.js +305 -0
- package/build/lowcode/render/default/view.css +1 -0
- package/build/lowcode/render/default/view.js +1 -0
- package/build/lowcode/view.css +1 -0
- package/build/lowcode/view.js +1 -0
- package/dist/BizComps.css +1 -0
- package/dist/BizComps.js +2 -0
- package/dist/BizComps.js.map +1 -0
- package/es/components/colorful-button/colorful-button.d.ts +12 -0
- package/es/components/colorful-button/colorful-button.js +25 -0
- package/es/components/colorful-button/index.d.ts +3 -0
- package/es/components/colorful-button/index.js +2 -0
- package/es/components/colorful-button/index.scss +5 -0
- package/es/components/colorful-input/colorful-input.d.ts +8 -0
- package/es/components/colorful-input/colorful-input.js +19 -0
- package/es/components/colorful-input/index.d.ts +3 -0
- package/es/components/colorful-input/index.js +2 -0
- package/es/components/colorful-input/index.scss +5 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +4 -0
- package/es/index.scss +2 -0
- package/es/style.js +3 -0
- package/es/variables.d.ts +2 -0
- package/es/variables.js +2 -0
- package/es/variables.scss +3 -0
- package/lib/components/colorful-button/colorful-button.d.ts +12 -0
- package/lib/components/colorful-button/colorful-button.js +33 -0
- package/lib/components/colorful-button/index.d.ts +3 -0
- package/lib/components/colorful-button/index.js +8 -0
- package/lib/components/colorful-button/index.scss +5 -0
- package/lib/components/colorful-input/colorful-input.d.ts +8 -0
- package/lib/components/colorful-input/colorful-input.js +27 -0
- package/lib/components/colorful-input/index.d.ts +3 -0
- package/lib/components/colorful-input/index.js +8 -0
- package/lib/components/colorful-input/index.scss +5 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +11 -0
- package/lib/index.scss +2 -0
- package/lib/style.js +3 -0
- package/lib/variables.d.ts +2 -0
- package/lib/variables.js +6 -0
- package/lib/variables.scss +3 -0
- package/lowcode/colorful-button/meta.ts +102 -0
- package/lowcode/colorful-button/view.tsx +8 -0
- package/lowcode/colorful-input/meta.ts +56 -0
- package/lowcode_es/colorful-button/meta.d.ts +22 -0
- package/lowcode_es/colorful-button/meta.js +85 -0
- package/lowcode_es/colorful-button/view.d.ts +2 -0
- package/lowcode_es/colorful-button/view.js +10 -0
- package/lowcode_es/colorful-input/meta.d.ts +22 -0
- package/lowcode_es/colorful-input/meta.js +48 -0
- package/lowcode_es/meta.js +165 -0
- package/lowcode_es/view.js +23 -0
- package/lowcode_lib/colorful-button/meta.d.ts +22 -0
- package/lowcode_lib/colorful-button/meta.js +91 -0
- package/lowcode_lib/colorful-button/view.d.ts +2 -0
- package/lowcode_lib/colorful-button/view.js +17 -0
- package/lowcode_lib/colorful-input/meta.d.ts +22 -0
- package/lowcode_lib/colorful-input/meta.js +54 -0
- package/lowcode_lib/meta.js +171 -0
- package/lowcode_lib/view.js +37 -0
- package/package.json +103 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.components = exports.componentList = void 0;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _meta = _interopRequireDefault(require("./colorful-button/meta"));
|
|
8
|
+
var _meta2 = _interopRequireDefault(require("./colorful-input/meta"));
|
|
9
|
+
var componentCategorySort = {};
|
|
10
|
+
["基础元素", "布局容器类", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "通用", "引导", "信息输入", "信息展示", "信息反馈"].reverse().forEach(function (item, index) {
|
|
11
|
+
componentCategorySort[item] = ++index;
|
|
12
|
+
});
|
|
13
|
+
function generateComponentList(components) {
|
|
14
|
+
var componentList = [{
|
|
15
|
+
title: '常用',
|
|
16
|
+
icon: '',
|
|
17
|
+
children: []
|
|
18
|
+
}, {
|
|
19
|
+
title: '容器',
|
|
20
|
+
icon: '',
|
|
21
|
+
children: []
|
|
22
|
+
}, {
|
|
23
|
+
title: '导航',
|
|
24
|
+
icon: '',
|
|
25
|
+
children: []
|
|
26
|
+
}, {
|
|
27
|
+
title: '内容',
|
|
28
|
+
icon: '',
|
|
29
|
+
children: []
|
|
30
|
+
}, {
|
|
31
|
+
title: 'Feedback 反馈',
|
|
32
|
+
icon: '',
|
|
33
|
+
children: []
|
|
34
|
+
}];
|
|
35
|
+
var groupMap = {
|
|
36
|
+
原子组件: true
|
|
37
|
+
};
|
|
38
|
+
var compGroup = {};
|
|
39
|
+
components.forEach(function (comp) {
|
|
40
|
+
var category = comp.category || '其他';
|
|
41
|
+
if (comp.group && !compGroup[comp.componentName]) {
|
|
42
|
+
compGroup[comp.componentName] = comp.group;
|
|
43
|
+
}
|
|
44
|
+
if (comp.group && !groupMap[comp.group]) {
|
|
45
|
+
groupMap[comp.group] = true;
|
|
46
|
+
}
|
|
47
|
+
var target = componentList.find(function (item) {
|
|
48
|
+
return item.title === category;
|
|
49
|
+
});
|
|
50
|
+
if (!target) {
|
|
51
|
+
target = {
|
|
52
|
+
title: category,
|
|
53
|
+
icon: '',
|
|
54
|
+
children: []
|
|
55
|
+
};
|
|
56
|
+
componentList.push(target);
|
|
57
|
+
}
|
|
58
|
+
if (comp.snippets && comp.snippets.length) {
|
|
59
|
+
target.children.push({
|
|
60
|
+
componentName: comp.componentName,
|
|
61
|
+
title: comp.title || comp.componentName,
|
|
62
|
+
sort: {
|
|
63
|
+
category: target.title,
|
|
64
|
+
group: compGroup[comp.componentName] || '原子组件',
|
|
65
|
+
priority: componentCategorySort[target.title] || 0
|
|
66
|
+
},
|
|
67
|
+
icon: '',
|
|
68
|
+
"package": comp.npm.pkg,
|
|
69
|
+
snippets: comp.snippets || []
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return componentList;
|
|
74
|
+
}
|
|
75
|
+
function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
76
|
+
if (packageName === void 0) {
|
|
77
|
+
packageName = 'focusbeui';
|
|
78
|
+
}
|
|
79
|
+
if (version === void 0) {
|
|
80
|
+
version = '0.1.0';
|
|
81
|
+
}
|
|
82
|
+
if (basicLibraryVersion === void 0) {
|
|
83
|
+
basicLibraryVersion = {
|
|
84
|
+
"@alifd/next": "1.25.23",
|
|
85
|
+
"@alifd/meet": "2.6.3",
|
|
86
|
+
"antd": "4.17.3"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (!meta || !version) {
|
|
90
|
+
return meta;
|
|
91
|
+
}
|
|
92
|
+
var npm = meta.npm;
|
|
93
|
+
if (!npm) {
|
|
94
|
+
return meta;
|
|
95
|
+
}
|
|
96
|
+
if (typeof basicLibraryVersion === 'object' && basicLibraryVersion[npm["package"]]) {
|
|
97
|
+
meta.npm = (0, _extends2["default"])({}, npm, {
|
|
98
|
+
version: basicLibraryVersion[npm["package"]]
|
|
99
|
+
});
|
|
100
|
+
} else if (npm["package"] === packageName) {
|
|
101
|
+
meta.npm = (0, _extends2["default"])({}, npm, {
|
|
102
|
+
version: version
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return meta;
|
|
106
|
+
}
|
|
107
|
+
var componentMetas = [_meta["default"], _meta2["default"]];
|
|
108
|
+
var components = [];
|
|
109
|
+
exports.components = components;
|
|
110
|
+
var npmInfo = {};
|
|
111
|
+
componentMetas.forEach(function (meta) {
|
|
112
|
+
if (Array.isArray(meta)) {
|
|
113
|
+
components.push.apply(components, meta.map(function (item) {
|
|
114
|
+
if (!item.npm) {
|
|
115
|
+
var componentName = item.componentName;
|
|
116
|
+
var names = componentName.split('.');
|
|
117
|
+
var exportName = names[0],
|
|
118
|
+
subName = names[1];
|
|
119
|
+
item.npm = {
|
|
120
|
+
exportName: exportName,
|
|
121
|
+
main: '',
|
|
122
|
+
destructuring: true,
|
|
123
|
+
subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
|
|
127
|
+
return fillRealVersion(item);
|
|
128
|
+
}));
|
|
129
|
+
} else if (meta.components) {
|
|
130
|
+
components.push.apply(components, meta.components.map(function (item) {
|
|
131
|
+
if (!item.npm) {
|
|
132
|
+
var componentName = item.componentName;
|
|
133
|
+
var names = componentName.split('.');
|
|
134
|
+
var exportName = names[0],
|
|
135
|
+
subName = names[1];
|
|
136
|
+
item.npm = {
|
|
137
|
+
exportName: exportName,
|
|
138
|
+
main: '',
|
|
139
|
+
destructuring: true,
|
|
140
|
+
subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
|
|
144
|
+
return fillRealVersion(item);
|
|
145
|
+
}));
|
|
146
|
+
} else {
|
|
147
|
+
if (!meta.npm) {
|
|
148
|
+
var componentName = meta.componentName;
|
|
149
|
+
var names = componentName.split('.');
|
|
150
|
+
var exportName = names[0],
|
|
151
|
+
subName = names[1];
|
|
152
|
+
meta.npm = {
|
|
153
|
+
exportName: exportName,
|
|
154
|
+
main: '',
|
|
155
|
+
destructuring: true,
|
|
156
|
+
subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
meta.npm = (0, _extends2["default"])({}, npmInfo, meta.npm || {});
|
|
160
|
+
components.push(fillRealVersion(meta));
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
var componentList = generateComponentList(components);
|
|
164
|
+
exports.componentList = componentList;
|
|
165
|
+
var execCompile = !!true;
|
|
166
|
+
if (!execCompile) {
|
|
167
|
+
window.FocusbeuiMeta = {
|
|
168
|
+
components: components,
|
|
169
|
+
componentList: componentList
|
|
170
|
+
};
|
|
171
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var _exportNames = {
|
|
5
|
+
ColorfulButton: true
|
|
6
|
+
};
|
|
7
|
+
exports["default"] = exports.ColorfulButton = void 0;
|
|
8
|
+
var componentInstances = _interopRequireWildcard(require("../lib/index"));
|
|
9
|
+
Object.keys(componentInstances).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
12
|
+
if (key in exports && exports[key] === componentInstances[key]) return;
|
|
13
|
+
exports[key] = componentInstances[key];
|
|
14
|
+
});
|
|
15
|
+
var ColorfulButtonData = _interopRequireWildcard(require("./colorful-button/view"));
|
|
16
|
+
require("../lib/index.scss");
|
|
17
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
var ColorfulButton = getRealComponent(ColorfulButtonData, 'ColorfulButton');
|
|
20
|
+
exports.ColorfulButton = ColorfulButton;
|
|
21
|
+
var entryDefault = componentInstances["default"];
|
|
22
|
+
exports["default"] = entryDefault;
|
|
23
|
+
var coveredComponents = {
|
|
24
|
+
ColorfulButton: ColorfulButton
|
|
25
|
+
};
|
|
26
|
+
var library = 'BizComps';
|
|
27
|
+
var execCompile = !!true;
|
|
28
|
+
if (!execCompile) {
|
|
29
|
+
window[library] = Object.assign({
|
|
30
|
+
__esModule: true
|
|
31
|
+
}, componentInstances || {}, coveredComponents || {});
|
|
32
|
+
}
|
|
33
|
+
function getRealComponent(component, componentName) {
|
|
34
|
+
if (component["default"]) return component["default"];
|
|
35
|
+
if (component[componentName]) return component[componentName];
|
|
36
|
+
return component;
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "focusbeui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "focusbeui",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./*": "./*",
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./es/index.js",
|
|
11
|
+
"require": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./prototype": {
|
|
14
|
+
"require": "./lowcode_lib/meta.js",
|
|
15
|
+
"import": "./lowcode_es/meta.js"
|
|
16
|
+
},
|
|
17
|
+
"./prototypeView": {
|
|
18
|
+
"require": "./lowcode_lib/view.js",
|
|
19
|
+
"import": "./lowcode_es/view.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"typings": "types/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"build/",
|
|
25
|
+
"dist/",
|
|
26
|
+
"lib/",
|
|
27
|
+
"es/",
|
|
28
|
+
"types/",
|
|
29
|
+
"lowcode/",
|
|
30
|
+
"lowcode_lib/",
|
|
31
|
+
"lowcode_es/"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "npm run dumi",
|
|
35
|
+
"build": "build-scripts build",
|
|
36
|
+
"lowcode:dev": "build-scripts start --config ./build.lowcode.js",
|
|
37
|
+
"lowcode:build": "build-scripts build --config ./build.lowcode.js",
|
|
38
|
+
"f2elint-scan": "f2elint scan",
|
|
39
|
+
"f2elint-fix": "f2elint fix",
|
|
40
|
+
"dumi": "cross-env APP_ROOT=docs dumi dev",
|
|
41
|
+
"dumi:build": "cross-env APP_ROOT=docs dumi build",
|
|
42
|
+
"prepublishOnly": "npm run build && npm run lowcode:build && npm run dumi:build"
|
|
43
|
+
},
|
|
44
|
+
"directories": {
|
|
45
|
+
"test": "test"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"Fusion"
|
|
49
|
+
],
|
|
50
|
+
"author": "fusion-team",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"husky": {
|
|
53
|
+
"hooks": {
|
|
54
|
+
"pre-commit": "f2elint commit-file-scan",
|
|
55
|
+
"commit-msg": "f2elint commit-msg-scan"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"lint-staged": {
|
|
59
|
+
"**/*.{js,jsx,ts,tsx,vue}": "f2elint exec eslint",
|
|
60
|
+
"**/*.{css,scss,less,acss}": "f2elint exec stylelint"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"react": "^16.x",
|
|
64
|
+
"react-dom": "^16.x",
|
|
65
|
+
"moment": "latest"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@alib/build-scripts": "^0.1.3",
|
|
69
|
+
"@alifd/build-plugin-lowcode": "^0.4.0",
|
|
70
|
+
"@alifd/theme-2": "^0.4.0",
|
|
71
|
+
"@types/react": "^16.14.24",
|
|
72
|
+
"@types/react-dom": "^16.9.4",
|
|
73
|
+
"build-plugin-component": "^1.12.1",
|
|
74
|
+
"build-plugin-fusion": "^0.1.0",
|
|
75
|
+
"cross-env": "^7.0.3",
|
|
76
|
+
"@umijs/plugin-sass": "^1.1.1",
|
|
77
|
+
"dumi": "^1.1.49",
|
|
78
|
+
"dumi-theme-default": "^1.1.24",
|
|
79
|
+
"f2elint": "^1.2.0"
|
|
80
|
+
},
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"moment": "^2.29.4",
|
|
83
|
+
"@alifd/next": "^1.25.27",
|
|
84
|
+
"prop-types": "^15.5.8",
|
|
85
|
+
"react": "^16.x",
|
|
86
|
+
"react-dom": "^16.x",
|
|
87
|
+
"@babel/runtime": "^7.0.0"
|
|
88
|
+
},
|
|
89
|
+
"acceptDependencies": {
|
|
90
|
+
"webpack": "^4.46.x"
|
|
91
|
+
},
|
|
92
|
+
"resolutions": {
|
|
93
|
+
"webpack": "^4.46.x"
|
|
94
|
+
},
|
|
95
|
+
"componentConfig": {
|
|
96
|
+
"isComponentLibrary": true,
|
|
97
|
+
"materialSchema": "https://unpkg.com/focusbeui@0.1.0/build/lowcode/assets-prod.json"
|
|
98
|
+
},
|
|
99
|
+
"lcMeta": {
|
|
100
|
+
"type": "component"
|
|
101
|
+
},
|
|
102
|
+
"homepage": "https://unpkg.com/focusbeui@0.1.0/build/index.html"
|
|
103
|
+
}
|