demo-26-2-02 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.
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports["default"] = void 0;
6
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
+ var Demo26202Meta = {
8
+ "componentName": "Demo26202",
9
+ "title": "Demo26202",
10
+ "docUrl": "",
11
+ "screenshot": "",
12
+ "devMode": "proCode",
13
+ "npm": {
14
+ "package": "demo-26-2-02",
15
+ "version": "0.1.0",
16
+ "exportName": "default",
17
+ "main": "src\\index.tsx",
18
+ "destructuring": false,
19
+ "subName": ""
20
+ },
21
+ "configure": {
22
+ "props": [{
23
+ "title": {
24
+ "label": {
25
+ "type": "i18n",
26
+ "en-US": "title",
27
+ "zh-CN": "title"
28
+ }
29
+ },
30
+ "name": "title",
31
+ "setter": {
32
+ "componentName": "StringSetter",
33
+ "isRequired": true,
34
+ "initialValue": ""
35
+ }
36
+ }, {
37
+ "title": {
38
+ "label": {
39
+ "type": "i18n",
40
+ "en-US": "content",
41
+ "zh-CN": "content"
42
+ }
43
+ },
44
+ "name": "content",
45
+ "setter": {
46
+ "componentName": "StringSetter",
47
+ "isRequired": true,
48
+ "initialValue": ""
49
+ }
50
+ }, {
51
+ "title": {
52
+ "label": {
53
+ "type": "i18n",
54
+ "en-US": "ref",
55
+ "zh-CN": "ref"
56
+ }
57
+ },
58
+ "name": "ref",
59
+ "setter": {
60
+ "componentName": "MixedSetter",
61
+ "props": {
62
+ "setters": [{
63
+ "componentName": "FunctionSetter"
64
+ }, {
65
+ "componentName": "ObjectSetter",
66
+ "props": {
67
+ "config": {
68
+ "extraSetter": {
69
+ "componentName": "MixedSetter",
70
+ "isRequired": false,
71
+ "props": {}
72
+ }
73
+ }
74
+ },
75
+ "isRequired": false,
76
+ "initialValue": {}
77
+ }]
78
+ }
79
+ }
80
+ }, {
81
+ "title": {
82
+ "label": {
83
+ "type": "i18n",
84
+ "en-US": "key",
85
+ "zh-CN": "key"
86
+ }
87
+ },
88
+ "name": "key",
89
+ "setter": {
90
+ "componentName": "MixedSetter",
91
+ "props": {
92
+ "setters": [{
93
+ "componentName": "StringSetter",
94
+ "isRequired": false,
95
+ "initialValue": ""
96
+ }, {
97
+ "componentName": "NumberSetter",
98
+ "isRequired": false,
99
+ "initialValue": 0
100
+ }]
101
+ }
102
+ }
103
+ }],
104
+ "supports": {
105
+ "style": true
106
+ },
107
+ "component": {}
108
+ }
109
+ };
110
+ var snippets = [{
111
+ "title": "Demo26202",
112
+ "screenshot": "",
113
+ "schema": {
114
+ "componentName": "Demo26202",
115
+ "props": {}
116
+ }
117
+ }];
118
+ var _default = exports["default"] = (0, _extends2["default"])({}, Demo26202Meta, {
119
+ snippets: snippets
120
+ });
@@ -0,0 +1,168 @@
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("D:/AAAImport-Work/Newwork-ddm/demo-general/demo-26-2-02/lowcode/demo26202/meta"));
8
+ var componentCategorySort = {};
9
+ ["基础元素", "布局容器类", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "通用", "引导", "信息输入", "信息展示", "信息反馈"].reverse().forEach(function (item, index) {
10
+ componentCategorySort[item] = ++index;
11
+ });
12
+ function generateComponentList(components) {
13
+ var componentList = [{
14
+ title: '常用',
15
+ icon: '',
16
+ children: []
17
+ }, {
18
+ title: '容器',
19
+ icon: '',
20
+ children: []
21
+ }, {
22
+ title: '导航',
23
+ icon: '',
24
+ children: []
25
+ }, {
26
+ title: '内容',
27
+ icon: '',
28
+ children: []
29
+ }, {
30
+ title: 'Feedback 反馈',
31
+ icon: '',
32
+ children: []
33
+ }];
34
+ var groupMap = {
35
+ 原子组件: true
36
+ };
37
+ var compGroup = {};
38
+ components.forEach(function (comp) {
39
+ var category = comp.category || '其他';
40
+ if (comp.group && !compGroup[comp.componentName]) {
41
+ compGroup[comp.componentName] = comp.group;
42
+ }
43
+ if (comp.group && !groupMap[comp.group]) {
44
+ groupMap[comp.group] = true;
45
+ }
46
+ var target = componentList.find(function (item) {
47
+ return item.title === category;
48
+ });
49
+ if (!target) {
50
+ target = {
51
+ title: category,
52
+ icon: '',
53
+ children: []
54
+ };
55
+ componentList.push(target);
56
+ }
57
+ if (comp.snippets && comp.snippets.length) {
58
+ target.children.push({
59
+ componentName: comp.componentName,
60
+ title: comp.title || comp.componentName,
61
+ sort: {
62
+ category: target.title,
63
+ group: compGroup[comp.componentName] || '原子组件',
64
+ priority: componentCategorySort[target.title] || 0
65
+ },
66
+ icon: '',
67
+ "package": comp.npm.pkg,
68
+ snippets: comp.snippets || []
69
+ });
70
+ }
71
+ });
72
+ return componentList;
73
+ }
74
+ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
75
+ if (packageName === void 0) {
76
+ packageName = 'demo-26-2-02';
77
+ }
78
+ if (version === void 0) {
79
+ version = '0.1.0';
80
+ }
81
+ if (basicLibraryVersion === void 0) {
82
+ basicLibraryVersion = {
83
+ "@alifd/next": "1.25.23",
84
+ "@alifd/meet": "2.6.3",
85
+ "antd": "4.17.3"
86
+ };
87
+ }
88
+ if (!meta || !version) {
89
+ return meta;
90
+ }
91
+ var npm = meta.npm;
92
+ if (!npm) {
93
+ return meta;
94
+ }
95
+ if (typeof basicLibraryVersion === 'object' && basicLibraryVersion[npm["package"]]) {
96
+ meta.npm = (0, _extends2["default"])({}, npm, {
97
+ version: basicLibraryVersion[npm["package"]]
98
+ });
99
+ } else if (npm["package"] === packageName) {
100
+ meta.npm = (0, _extends2["default"])({}, npm, {
101
+ version: version
102
+ });
103
+ }
104
+ return meta;
105
+ }
106
+ var componentMetas = [_meta["default"]];
107
+ var components = exports.components = [];
108
+ var npmInfo = {};
109
+ componentMetas.forEach(function (meta) {
110
+ if (Array.isArray(meta)) {
111
+ components.push.apply(components, meta.map(function (item) {
112
+ if (!item.npm) {
113
+ var componentName = item.componentName;
114
+ var names = componentName.split('.');
115
+ var exportName = names[0],
116
+ subName = names[1];
117
+ item.npm = {
118
+ exportName: exportName,
119
+ main: '',
120
+ destructuring: true,
121
+ subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
122
+ };
123
+ }
124
+ item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
125
+ return fillRealVersion(item);
126
+ }));
127
+ } else if (meta.components) {
128
+ components.push.apply(components, meta.components.map(function (item) {
129
+ if (!item.npm) {
130
+ var componentName = item.componentName;
131
+ var names = componentName.split('.');
132
+ var exportName = names[0],
133
+ subName = names[1];
134
+ item.npm = {
135
+ exportName: exportName,
136
+ main: '',
137
+ destructuring: true,
138
+ subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
139
+ };
140
+ }
141
+ item.npm = (0, _extends2["default"])({}, npmInfo, item.npm || {});
142
+ return fillRealVersion(item);
143
+ }));
144
+ } else {
145
+ if (!meta.npm) {
146
+ var componentName = meta.componentName;
147
+ var names = componentName.split('.');
148
+ var exportName = names[0],
149
+ subName = names[1];
150
+ meta.npm = {
151
+ exportName: exportName,
152
+ main: '',
153
+ destructuring: true,
154
+ subName: names.length > 1 ? componentName.slice(componentName.indexOf('.') + 1) : subName
155
+ };
156
+ }
157
+ meta.npm = (0, _extends2["default"])({}, npmInfo, meta.npm || {});
158
+ components.push(fillRealVersion(meta));
159
+ }
160
+ });
161
+ var componentList = exports.componentList = generateComponentList(components);
162
+ var execCompile = !!true;
163
+ if (!execCompile) {
164
+ window.Demo26202Meta = {
165
+ components: components,
166
+ componentList: componentList
167
+ };
168
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ var _exportNames = {};
5
+ exports["default"] = void 0;
6
+ var componentInstances = _interopRequireWildcard(require("D:/AAAImport-Work/Newwork-ddm/demo-general/demo-26-2-02/src/index"));
7
+ Object.keys(componentInstances).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
10
+ if (key in exports && exports[key] === componentInstances[key]) return;
11
+ exports[key] = componentInstances[key];
12
+ });
13
+ require("D:/AAAImport-Work/Newwork-ddm/demo-general/demo-26-2-02/src/index.scss");
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
+ var entryDefault = exports["default"] = componentInstances["default"];
16
+ var coveredComponents = {};
17
+ var library = 'BizComp';
18
+ var execCompile = !!true;
19
+ if (!execCompile) {
20
+ window[library] = Object.assign({
21
+ __esModule: true
22
+ }, componentInstances || {}, coveredComponents || {});
23
+ }
24
+ function getRealComponent(component, componentName) {
25
+ if (component["default"]) return component["default"];
26
+ if (component[componentName]) return component[componentName];
27
+ return component;
28
+ }
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "demo-26-2-02",
3
+ "version": "0.1.0",
4
+ "description": "demo-26-2-02",
5
+ "files": [
6
+ "demo/",
7
+ "es/",
8
+ "lib/",
9
+ "build/",
10
+ "dist/",
11
+ "lowcode/",
12
+ "lowcode_lib/",
13
+ "lowcode_es/"
14
+ ],
15
+ "main": "lib/index.js",
16
+ "module": "es/index.js",
17
+ "exports": {
18
+ "./*": "./*",
19
+ ".": {
20
+ "import": "./es/index.js",
21
+ "require": "./lib/index.js"
22
+ },
23
+ "./prototype": {
24
+ "require": "./lowcode_lib/meta.js",
25
+ "import": "./lowcode_es/meta.js"
26
+ },
27
+ "./prototypeView": {
28
+ "require": "./lowcode_lib/view.js",
29
+ "import": "./lowcode_es/view.js"
30
+ }
31
+ },
32
+ "stylePath": "style.js",
33
+ "scripts": {
34
+ "start": "build-scripts start",
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
+ "test": "build-scripts test",
39
+ "prepublishOnly": "npm run build && npm run lowcode:build",
40
+ "eslint": "eslint --cache --ext .js,.jsx ./",
41
+ "eslint:fix": "npm run eslint -- --fix",
42
+ "stylelint": "stylelint \"**/*.{css,scss,less}\"",
43
+ "lint": "npm run eslint && npm run stylelint",
44
+ "f2elint-scan": "f2elint scan",
45
+ "f2elint-fix": "f2elint fix"
46
+ },
47
+ "keywords": [
48
+ "ice",
49
+ "react",
50
+ "component"
51
+ ],
52
+ "dependencies": {
53
+ "moment": "^2.29.4",
54
+ "@alifd/next": "^1.25.27",
55
+ "react": "^16.x",
56
+ "react-dom": "^16.x",
57
+ "@babel/runtime": "^7.0.0"
58
+ },
59
+ "devDependencies": {
60
+ "@alib/build-scripts": "^0.1.3",
61
+ "@alifd/build-plugin-lowcode": "^0.4.0",
62
+ "@types/react": "^16.9.13",
63
+ "@types/react-dom": "^16.9.4",
64
+ "build-plugin-fusion": "^0.1.0",
65
+ "build-plugin-component": "^1.0.0",
66
+ "template-component-demo": "^2.0.3",
67
+ "build-plugin-moment-locales": "^0.1.0",
68
+ "f2elint": "^1.2.0"
69
+ },
70
+ "peerDependencies": {
71
+ "moment": "latest",
72
+ "react": "^16.x",
73
+ "react-dom": "^16.x"
74
+ },
75
+ "componentConfig": {
76
+ "name": "ExampleComponent",
77
+ "title": "demo component",
78
+ "category": "Information",
79
+ "materialSchema": "https://unpkg.com/demo-26-2-02@0.1.0/build/lowcode/assets-prod.json"
80
+ },
81
+ "lcMeta": {
82
+ "type": "component"
83
+ },
84
+ "license": "MIT",
85
+ "homepage": "https://unpkg.com/demo-26-2-02@0.1.0/build/index.html"
86
+ }