workflow-editor 0.9.85-dw → 0.9.85-dw-tmp2
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/.babelrc +40 -0
- package/build/components.json +3 -0
- package/build/gen-style.js +32 -0
- package/build/webpack.base.js +173 -0
- package/build/webpack.component.js +46 -0
- package/build/webpack.prod.js +31 -0
- package/lib/css/workflow-editor.css +16 -0
- package/lib/workflow-editor.js +27 -0
- package/lib/workflow-editor.min.js +27 -0
- package/package.json +50 -23
- package/src/index.js +36 -0
- package/lib/workflow-editor.css +0 -1
- package/lib/workflow-editor.umd.min.js +0 -39
package/.babelrc
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
[
|
|
4
|
+
"@babel/preset-env",
|
|
5
|
+
{
|
|
6
|
+
"loose": false,
|
|
7
|
+
"modules": "commonjs",
|
|
8
|
+
"spec": true,
|
|
9
|
+
"useBuiltIns": "usage",
|
|
10
|
+
"corejs": "2.6.9"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
],
|
|
14
|
+
"plugins": [
|
|
15
|
+
"@babel/plugin-transform-runtime",
|
|
16
|
+
["component", {
|
|
17
|
+
"libraryName": "workflow-editor",
|
|
18
|
+
"libDir": "lib",
|
|
19
|
+
"styleLibrary": {
|
|
20
|
+
"name": "styles",
|
|
21
|
+
"base": false, // no base.css file
|
|
22
|
+
"path": "[module].css"
|
|
23
|
+
}
|
|
24
|
+
}]
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// {
|
|
29
|
+
// "plugins": [
|
|
30
|
+
// ["component", {
|
|
31
|
+
// "libraryName": "imatrix-ui",
|
|
32
|
+
// "libDir": "lib",
|
|
33
|
+
// "styleLibrary": {
|
|
34
|
+
// "name": "styles",
|
|
35
|
+
// "base": false, // no base.css file
|
|
36
|
+
// "path": "[module].css"
|
|
37
|
+
// }
|
|
38
|
+
// }]
|
|
39
|
+
// ]
|
|
40
|
+
// }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const gulp = require('gulp');
|
|
2
|
+
const cleanCSS = require('gulp-clean-css');
|
|
3
|
+
const sass = require('gulp-sass');
|
|
4
|
+
const rename = require('gulp-rename');
|
|
5
|
+
const autoprefixer = require('gulp-autoprefixer');
|
|
6
|
+
const components = require('./components.json')
|
|
7
|
+
|
|
8
|
+
function buildCss(cb) {
|
|
9
|
+
gulp.src('../src/styles/index.scss')
|
|
10
|
+
.pipe(sass())
|
|
11
|
+
.pipe(autoprefixer())
|
|
12
|
+
.pipe(cleanCSS())
|
|
13
|
+
.pipe(rename('lime-ui.css'))
|
|
14
|
+
.pipe(gulp.dest('../lib/styles'));
|
|
15
|
+
cb()
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
function buildSeperateCss(cb) {
|
|
20
|
+
Object.keys(components).forEach(compName => {
|
|
21
|
+
gulp.src(`../src/styles/${compName}.scss`)
|
|
22
|
+
.pipe(sass())
|
|
23
|
+
.pipe(autoprefixer())
|
|
24
|
+
.pipe(cleanCSS())
|
|
25
|
+
.pipe(rename(`${compName}.css`))
|
|
26
|
+
.pipe(gulp.dest('../lib/styles'));
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
cb()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.default = gulp.series(buildCss, buildSeperateCss) // 加上 buildSeperateCss
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
const pkg = require('../package.json');
|
|
4
|
+
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
|
5
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
|
+
|
|
7
|
+
function resolve(dir) {
|
|
8
|
+
return path.join(__dirname, '..', dir);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
module: {
|
|
13
|
+
rules: [
|
|
14
|
+
{
|
|
15
|
+
test: /\.vue$/,
|
|
16
|
+
loader: 'vue-loader',
|
|
17
|
+
options: {
|
|
18
|
+
loaders: {
|
|
19
|
+
css: [
|
|
20
|
+
'vue-style-loader',
|
|
21
|
+
{
|
|
22
|
+
loader: 'css-loader',
|
|
23
|
+
options: {
|
|
24
|
+
sourceMap: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
less: [
|
|
29
|
+
'vue-style-loader',
|
|
30
|
+
{
|
|
31
|
+
loader: 'css-loader',
|
|
32
|
+
options: {
|
|
33
|
+
sourceMap: false,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
loader: 'less-loader',
|
|
38
|
+
options: {
|
|
39
|
+
sourceMap: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
postLoaders: {
|
|
45
|
+
html: 'babel-loader?sourceMap'
|
|
46
|
+
},
|
|
47
|
+
sourceMap: false,
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
test: /\.js$/,
|
|
52
|
+
loader: 'babel-loader',
|
|
53
|
+
options: {
|
|
54
|
+
sourceMap: false,
|
|
55
|
+
},
|
|
56
|
+
exclude: /node_modules/,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
test: /\.css$/,
|
|
60
|
+
loaders: [
|
|
61
|
+
{
|
|
62
|
+
loader: 'style-loader',
|
|
63
|
+
options: {
|
|
64
|
+
sourceMap: false,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
loader: 'css-loader',
|
|
69
|
+
options: {
|
|
70
|
+
sourceMap: false,
|
|
71
|
+
},
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
test: /\.less$/,
|
|
77
|
+
loaders: [
|
|
78
|
+
// {
|
|
79
|
+
// loader: 'style-loader',
|
|
80
|
+
// options: {
|
|
81
|
+
// sourceMap: true,
|
|
82
|
+
// },
|
|
83
|
+
// },
|
|
84
|
+
{
|
|
85
|
+
loader: MiniCssExtractPlugin.loader,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
loader: 'css-loader',
|
|
89
|
+
options: {
|
|
90
|
+
sourceMap: false,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
loader: 'less-loader',
|
|
95
|
+
options: {
|
|
96
|
+
sourceMap: false,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
test: /\.scss$/,
|
|
103
|
+
loaders: [
|
|
104
|
+
// {
|
|
105
|
+
// loader: 'style-loader',
|
|
106
|
+
// options: {
|
|
107
|
+
// sourceMap: true,
|
|
108
|
+
// },
|
|
109
|
+
// },
|
|
110
|
+
{
|
|
111
|
+
loader: MiniCssExtractPlugin.loader
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
loader: 'css-loader',
|
|
115
|
+
options: {
|
|
116
|
+
sourceMap: false,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
loader: 'sass-loader',
|
|
121
|
+
options: {
|
|
122
|
+
sourceMap: false,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
test: /\.(gif|jpg|png|woff|svg|eot|ttf)\??.*$/,
|
|
129
|
+
loader: 'url-loader?limit=8192'
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
resolve: {
|
|
134
|
+
extensions: ['.js', '.vue'],
|
|
135
|
+
alias: {
|
|
136
|
+
'vue': 'vue/dist/vue.esm.js',
|
|
137
|
+
'@': resolve('src')
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
externals: { // 外部化对vue的依赖
|
|
141
|
+
vue: {
|
|
142
|
+
root: 'Vue',
|
|
143
|
+
commonjs: 'vue',
|
|
144
|
+
commonjs2: 'vue',
|
|
145
|
+
amd: 'vue'
|
|
146
|
+
},
|
|
147
|
+
vuex: {
|
|
148
|
+
root: 'Vuex',
|
|
149
|
+
commonjs: 'vuex',
|
|
150
|
+
commonjs2: 'vuex',
|
|
151
|
+
amd: 'vuex'
|
|
152
|
+
},
|
|
153
|
+
// 'vue-i18n': {
|
|
154
|
+
// root: 'VueI18n',
|
|
155
|
+
// commonjs: 'vue-i18n',
|
|
156
|
+
// commonjs2: 'vue-i18n',
|
|
157
|
+
// amd: 'vue-i18n'
|
|
158
|
+
// },
|
|
159
|
+
'js-cookie': {
|
|
160
|
+
root: 'JsCookie',
|
|
161
|
+
commonjs: 'js-cookie',
|
|
162
|
+
commonjs2: 'js-cookie',
|
|
163
|
+
amd: 'js-cookie'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
plugins: [
|
|
167
|
+
new webpack.optimize.ModuleConcatenationPlugin(),
|
|
168
|
+
new webpack.DefinePlugin({
|
|
169
|
+
'process.env.VERSION': `'${pkg.version}'`
|
|
170
|
+
}),
|
|
171
|
+
new VueLoaderPlugin()
|
|
172
|
+
]
|
|
173
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
const merge = require('webpack-merge');
|
|
4
|
+
const webpackBaseConfig = require('./webpack.base.js');
|
|
5
|
+
const components = require('./components.json')
|
|
6
|
+
|
|
7
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
8
|
+
|
|
9
|
+
process.env.NODE_ENV = 'production';
|
|
10
|
+
|
|
11
|
+
const basePath = path.resolve(__dirname, '../')
|
|
12
|
+
let entries = {}
|
|
13
|
+
Object.keys(components).forEach(key => {
|
|
14
|
+
entries[key] = path.join(basePath, '.', components[key])
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
module.exports = merge(webpackBaseConfig, {
|
|
18
|
+
devtool: 'nosources',
|
|
19
|
+
mode: "production",
|
|
20
|
+
entry: entries,
|
|
21
|
+
output: {
|
|
22
|
+
path: path.resolve(__dirname, '../lib'),
|
|
23
|
+
publicPath: '/lib/',
|
|
24
|
+
filename: '[name].js',
|
|
25
|
+
chunkFilename: '[id].js',
|
|
26
|
+
library: 'imatrix-ui',
|
|
27
|
+
libraryTarget: 'umd',
|
|
28
|
+
umdNamedDefine: true
|
|
29
|
+
},
|
|
30
|
+
externals: {
|
|
31
|
+
vue: {
|
|
32
|
+
root: 'Vue',
|
|
33
|
+
commonjs: 'vue',
|
|
34
|
+
commonjs2: 'vue',
|
|
35
|
+
amd: 'vue'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
plugins: [
|
|
39
|
+
new webpack.DefinePlugin({
|
|
40
|
+
'process.env.NODE_ENV': '"production"'
|
|
41
|
+
}),
|
|
42
|
+
new MiniCssExtractPlugin({
|
|
43
|
+
filename: 'css/[name].css'
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
const merge = require('webpack-merge');
|
|
4
|
+
const webpackBaseConfig = require('./webpack.base.js');
|
|
5
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
|
+
|
|
7
|
+
process.env.NODE_ENV = 'production';
|
|
8
|
+
|
|
9
|
+
module.exports = merge(webpackBaseConfig, {
|
|
10
|
+
devtool: 'nosources',
|
|
11
|
+
mode: "production",
|
|
12
|
+
entry: {
|
|
13
|
+
main: path.resolve(__dirname, '../src/index.js') // 将src下的index.js 作为入口点
|
|
14
|
+
},
|
|
15
|
+
output: {
|
|
16
|
+
path: path.resolve(__dirname, '../lib'),
|
|
17
|
+
publicPath: '/lib/',
|
|
18
|
+
filename: 'workflow-editor.min.js', // 改成自己的类库名
|
|
19
|
+
library: 'workflow-editor', // 类库导出
|
|
20
|
+
libraryTarget: 'umd',
|
|
21
|
+
umdNamedDefine: true
|
|
22
|
+
},
|
|
23
|
+
plugins: [
|
|
24
|
+
new webpack.DefinePlugin({
|
|
25
|
+
'process.env.NODE_ENV': '"production"'
|
|
26
|
+
}),
|
|
27
|
+
new MiniCssExtractPlugin({
|
|
28
|
+
filename: 'css/workflow-editor.css'
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
})
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
h3[data-v-9c5970fe]{color:#999999;margin:0;padding:0;font-weight:bold;font-size:18px}.el-button[data-v-9c5970fe]{margin:6px 0;min-width:110px;padding:9px 15px}.el-button i[data-v-9c5970fe]{padding-right:4px}
|
|
2
|
+
|
|
3
|
+
.group[data-v-70c39db1]{font-size:14px;width:100%}.item[data-v-70c39db1]{float:left;list-style-type:none;width:33.33%;margin-bottom:18px}.item-content[data-v-70c39db1]{height:calc(100vh - 300px);padding-left:20px;overflow:auto}
|
|
4
|
+
|
|
5
|
+
#appContainer[data-v-016e1d5a] .el-checkbox{display:block}#appContainer[data-v-016e1d5a] .el-transfer-panel{width:400px}#appContainer[data-v-016e1d5a] .ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;width:55%}
|
|
6
|
+
|
|
7
|
+
.tooltip[data-v-dd12406c]{position:absolute;background:#fff;min-width:150px;border-radius:4px;border:1px solid #ebeef5;padding:12px;z-index:2000;color:#606266;line-height:1.4;text-align:justify;font-size:14px;box-shadow:0 2px 12px 0 rgba(0,0,0,0.1);word-break:break-all}
|
|
8
|
+
|
|
9
|
+
li[data-v-2554d9c6]{color:#333}.context-menu[data-v-2554d9c6]{position:fixed;background:#fff;z-index:999;padding:5px;margin:0}.context-menu li[data-v-2554d9c6]{min-width:75px;height:28px;line-height:28px;text-align:left;color:#1a1a1a}.context-menu li[data-v-2554d9c6]:hover{background:#42b983;color:#fff}.context-menu[data-v-2554d9c6]{border:1px solid #eee;box-shadow:0 0.5em 1em 0 rgba(0,0,0,0.1);border-radius:5px}li[data-v-2554d9c6]{list-style-type:none}
|
|
10
|
+
|
|
11
|
+
.button-area[data-v-37937af4]{padding:5px 0 5px 5px;height:50px}.el-row[data-v-37937af4]{border:1px solid #f1f1f1;border-radius:5px}.el-col[data-v-37937af4]{padding-left:5px}.main[data-v-37937af4]{position:relative;display:flex;height:calc(100% - 50px);width:100%}.canvas-container[data-v-37937af4]{position:relative;height:calc(100% - 50px);width:100%}.toolbox[data-v-37937af4]{width:150px;overflow-y:auto;height:100%;background:#f7f7f7;padding:10px;text-align:center;flex:none}section[data-v-37937af4]{overflow:hidden;flex:1 1 auto;height:100%;padding:0}.tabs[data-v-37937af4]{height:100%;width:100%}.tab-pane[data-v-37937af4]{height:100%;width:100%}.tabs[data-v-37937af4] .el-tabs__content{height:calc(100% - 41px);padding:10px;width:100%}.canvas[data-v-37937af4],.xml[data-v-37937af4]{overflow:auto;height:100%;width:100%;padding:0;min-height:500px}pre[data-v-37937af4]{margin:0;font-size:16px}.component-icon[data-v-37937af4]{position:absolute;pointer-events:none}.canvas[data-v-37937af4] .draggable{cursor:move}
|
|
12
|
+
|
|
13
|
+
#_subprocess-content[data-v-d95c25fc]{width:100%;height:calc(100vh - 200px)}
|
|
14
|
+
|
|
15
|
+
.main[data-v-422096c3]{position:relative;display:flex;height:100%;width:100%}.canvas-container[data-v-422096c3]{position:relative;height:100%;width:100%}section[data-v-422096c3]{overflow:hidden;width:100%;height:100%;padding:0}.canvas[data-v-422096c3]{overflow:auto;height:100%;padding:0;min-height:500px}.canvas[data-v-422096c3] .draggable{cursor:default}
|
|
16
|
+
|