@logicflow/vue-node-registry 1.0.0 → 1.0.2
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/.turbo/turbo-build.log +5 -8
- package/CHANGELOG.md +17 -1
- package/README.md +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/model.js +5 -6
- package/es/model.js.map +1 -1
- package/lib/model.js +4 -5
- package/lib/model.js.map +1 -1
- package/package.json +3 -3
- package/src/model.ts +5 -6
- package/stats.html +4842 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @logicflow/vue-node-registry@1.0.
|
|
2
|
+
> @logicflow/vue-node-registry@1.0.2 prebuild /Users/r0ger1tlearn/WorkSpace/Github/DiDi/logicflow/packages/vue-node-registry
|
|
3
3
|
> rss
|
|
4
4
|
|
|
5
5
|
> [31m[prebuild][39m run-s -s clean:build
|
|
6
6
|
> [36m[clean:build][39m rimraf dist es lib
|
|
7
7
|
|
|
8
|
-
> @logicflow/vue-node-registry@1.0.
|
|
8
|
+
> @logicflow/vue-node-registry@1.0.2 build /Users/r0ger1tlearn/WorkSpace/Github/DiDi/logicflow/packages/vue-node-registry
|
|
9
9
|
> rss
|
|
10
10
|
|
|
11
11
|
> [34m[build][39m run-p -s build:dev build:umd
|
|
12
|
-
> [34m[build:umd][39m pnpm run --if-present build:less && rollup -c ../../rollup.config.js --bundleConfigAsCjs
|
|
13
12
|
> [34m[build:dev][39m pnpm run --if-present build:less && run-p -s build:cjs build:esm
|
|
13
|
+
> [34m[build:umd][39m pnpm run --if-present build:less && rollup -c ../../rollup.config.js --bundleConfigAsCjs
|
|
14
14
|
> [34m[build:less][39m ./scripts/build-less
|
|
15
15
|
> [34m[build:less][39m ./scripts/build-less
|
|
16
16
|
[36m
|
|
@@ -30,8 +30,5 @@
|
|
|
30
30
|
[2m|[22m [32m[1mGZipped Size:[22m[39m [33m200 B[39m [2m|[22m
|
|
31
31
|
[2m|[22m [2m|[22m
|
|
32
32
|
[2m+----------------------------------------------+[22m
|
|
33
|
-
[1m[33m(!)
|
|
34
|
-
[
|
|
35
|
-
[90mhttps://rollupjs.org/troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect[39m
|
|
36
|
-
Plugins that transform code (such as "terser") should generate accompanying sourcemaps.
|
|
37
|
-
[32mcreated [1mdist/index.min.js[22m in [1m4.8s[22m[39m
|
|
33
|
+
[1m[33m(!) [plugin typescript] @rollup/plugin-typescript: Rollup requires that TypeScript produces ES Modules. Unfortunately your configuration specifies a "module" other than "esnext". Unless you know what you're doing, please change "module" to "esnext" in the target tsconfig.json file or plugin options.[39m[22m
|
|
34
|
+
[32mcreated [1mdist/index.min.js[22m in [1m3.7s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
# @logicflow/vue-node-registry
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Release New Version,移除多余 console
|
|
8
|
+
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @logicflow/core@2.0.2
|
|
11
|
+
|
|
12
|
+
## 1.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @logicflow/core@2.0.1
|
|
18
|
+
|
|
3
19
|
## 1.0.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
7
23
|
- Release 2.0 New Version 🎉🎉🎉🎉
|
|
8
24
|
- Updated dependencies
|
|
25
|
+
|
|
9
26
|
- @logicflow/core@2.0.0
|
|
10
27
|
|
|
11
28
|
- feat: 开发 vue-node-registry 包用于用户自定义 vue 节点
|
|
@@ -16,4 +33,3 @@
|
|
|
16
33
|
- 更新 extension 包的 package.json
|
|
17
34
|
- 修复 vue-node-registry 渲染顺序,先 appendChild,再 new Vue
|
|
18
35
|
- 修复渲染自定义节点 new Vue2 实例时未传 el 的问题
|
|
19
|
-
|
package/README.md
CHANGED
package/dist/index.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.min.js","sources":["../src/index.ts"],"sourcesContent":["export * from './view'\nexport * from './model'\nexport * from './registry'\nexport * from './teleport'\n"],"names":["tslib_1","__exportStar","require","exports"],"mappings":"2KAAAA,EAAsBC,aAAAC,QAAA,UAAAC,SACtBH,EAAuBC,aAAAC,QAAA,WAAAC,SACvBH,EAA0BC,aAAAC,QAAA,cAAAC,SAC1BH,EAA0BC,aAAAC,QAAA,cAAAC"}
|
package/es/model.js
CHANGED
|
@@ -25,27 +25,26 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
return __assign.apply(this, arguments);
|
|
26
26
|
};
|
|
27
27
|
import { HtmlNodeModel } from '@logicflow/core';
|
|
28
|
-
import { cloneDeep } from 'lodash-es';
|
|
28
|
+
import { cloneDeep, isNil } from 'lodash-es';
|
|
29
29
|
var VueNodeModel = /** @class */ (function (_super) {
|
|
30
30
|
__extends(VueNodeModel, _super);
|
|
31
31
|
function VueNodeModel() {
|
|
32
32
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
33
33
|
}
|
|
34
34
|
VueNodeModel.prototype.setAttributes = function () {
|
|
35
|
-
|
|
35
|
+
// DONE: 解决 width、height、radius 为 0 时的问题
|
|
36
36
|
var _a = this.properties, width = _a.width, height = _a.height, radius = _a.radius;
|
|
37
|
-
if (width) {
|
|
37
|
+
if (!isNil(width)) {
|
|
38
38
|
this.width = width;
|
|
39
39
|
}
|
|
40
|
-
if (height) {
|
|
40
|
+
if (!isNil(height)) {
|
|
41
41
|
this.height = height;
|
|
42
42
|
}
|
|
43
|
-
if (radius) {
|
|
43
|
+
if (!isNil(radius)) {
|
|
44
44
|
this.radius = radius;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
VueNodeModel.prototype.getTextStyle = function () {
|
|
48
|
-
// const { x, y, width, height } = this
|
|
49
48
|
var _a = this.properties, _b = _a.refX, refX = _b === void 0 ? 0 : _b, _c = _a.refY, refY = _c === void 0 ? 0 : _c, textStyle = _a.textStyle;
|
|
50
49
|
var style = _super.prototype.getTextStyle.call(this);
|
|
51
50
|
// 通过 transform 重新设置 text 的位置
|
package/es/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAiB5C;IAAkC,gCAAa;IAA/C;;IA6CA,CAAC;IA5CC,oCAAa,GAAb;QACE,wCAAwC;QAClC,IAAA,KAA4B,IAAI,CAAC,UAA8B,EAA7D,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAwC,CAAA;QACrE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QACpB,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACtB,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACtB,CAAC;IACH,CAAC;IAED,mCAAY,GAAZ;QACQ,IAAA,KAIF,IAAI,CAAC,UAA8B,EAHrC,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EACR,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EACR,SAAS,eAC4B,CAAA;QACvC,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAElC,6BAA6B;QAC7B,sCACK,KAAK,GACL,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAC/B,SAAS,EAAE,yBAAkB,IAAI,cAAI,IAAI,MAAG,IAC7C;IACH,CAAC;IAED,mCAAY,GAAZ;QACE,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAEhC,IAAO,eAAe,GAEpB,IAAI,CAAC,UAA8B,MAFf,CAEe;QAEvC,6BACK,KAAK,GACL,CAAC,SAAS,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,EAGtC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA7CD,CAAkC,aAAa,GA6C9C;;AAED,eAAe,YAAY,CAAA"}
|
package/lib/model.js
CHANGED
|
@@ -35,20 +35,19 @@ var VueNodeModel = /** @class */ (function (_super) {
|
|
|
35
35
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
36
|
}
|
|
37
37
|
VueNodeModel.prototype.setAttributes = function () {
|
|
38
|
-
|
|
38
|
+
// DONE: 解决 width、height、radius 为 0 时的问题
|
|
39
39
|
var _a = this.properties, width = _a.width, height = _a.height, radius = _a.radius;
|
|
40
|
-
if (width) {
|
|
40
|
+
if (!(0, lodash_es_1.isNil)(width)) {
|
|
41
41
|
this.width = width;
|
|
42
42
|
}
|
|
43
|
-
if (height) {
|
|
43
|
+
if (!(0, lodash_es_1.isNil)(height)) {
|
|
44
44
|
this.height = height;
|
|
45
45
|
}
|
|
46
|
-
if (radius) {
|
|
46
|
+
if (!(0, lodash_es_1.isNil)(radius)) {
|
|
47
47
|
this.radius = radius;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
VueNodeModel.prototype.getTextStyle = function () {
|
|
51
|
-
// const { x, y, width, height } = this
|
|
52
51
|
var _a = this.properties, _b = _a.refX, refX = _b === void 0 ? 0 : _b, _c = _a.refY, refY = _c === void 0 ? 0 : _c, textStyle = _a.textStyle;
|
|
53
52
|
var style = _super.prototype.getTextStyle.call(this);
|
|
54
53
|
// 通过 transform 重新设置 text 的位置
|
package/lib/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA0D;AAC1D,uCAA4C;AAiB5C;IAAkC,gCAAa;IAA/C;;IA6CA,CAAC;IA5CC,oCAAa,GAAb;QACE,wCAAwC;QAClC,IAAA,KAA4B,IAAI,CAAC,UAA8B,EAA7D,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAwC,CAAA;QACrE,IAAI,CAAC,IAAA,iBAAK,EAAC,KAAK,CAAC,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QACpB,CAAC;QACD,IAAI,CAAC,IAAA,iBAAK,EAAC,MAAM,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACtB,CAAC;QACD,IAAI,CAAC,IAAA,iBAAK,EAAC,MAAM,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACtB,CAAC;IACH,CAAC;IAED,mCAAY,GAAZ;QACQ,IAAA,KAIF,IAAI,CAAC,UAA8B,EAHrC,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EACR,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EACR,SAAS,eAC4B,CAAA;QACvC,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAElC,6BAA6B;QAC7B,sCACK,KAAK,GACL,CAAC,IAAA,qBAAS,EAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAC/B,SAAS,EAAE,yBAAkB,IAAI,cAAI,IAAI,MAAG,IAC7C;IACH,CAAC;IAED,mCAAY,GAAZ;QACE,IAAM,KAAK,GAAG,gBAAK,CAAC,YAAY,WAAE,CAAA;QAEhC,IAAO,eAAe,GAEpB,IAAI,CAAC,UAA8B,MAFf,CAEe;QAEvC,6BACK,KAAK,GACL,CAAC,IAAA,qBAAS,EAAC,eAAe,CAAC,IAAI,EAAE,CAAC,EAGtC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA7CD,CAAkC,oBAAa,GA6C9C;AA7CY,oCAAY;AA+CzB,kBAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logicflow/vue-node-registry",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "LogicFlow Vue Component Node Registry",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@vue/composition-api": "^1.0.0-rc.10",
|
|
22
22
|
"vue": "^2.0.0 || >=3.0.0",
|
|
23
|
-
"@logicflow/core": "2.0.
|
|
23
|
+
"@logicflow/core": "2.0.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependenciesMeta": {
|
|
26
26
|
"@vue/composition-api": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"vue": "^3.0.0",
|
|
32
|
-
"@logicflow/core": "2.0.
|
|
32
|
+
"@logicflow/core": "2.0.2"
|
|
33
33
|
},
|
|
34
34
|
"author": {
|
|
35
35
|
"name": "boyongjiong",
|
package/src/model.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import LogicFlow, { HtmlNodeModel } from '@logicflow/core'
|
|
2
|
-
import { cloneDeep } from 'lodash-es'
|
|
2
|
+
import { cloneDeep, isNil } from 'lodash-es'
|
|
3
3
|
|
|
4
4
|
export type CustomProperties = {
|
|
5
5
|
// 形状属性
|
|
@@ -18,21 +18,20 @@ export type CustomProperties = {
|
|
|
18
18
|
|
|
19
19
|
export class VueNodeModel extends HtmlNodeModel {
|
|
20
20
|
setAttributes() {
|
|
21
|
-
|
|
21
|
+
// DONE: 解决 width、height、radius 为 0 时的问题
|
|
22
22
|
const { width, height, radius } = this.properties as CustomProperties
|
|
23
|
-
if (width) {
|
|
23
|
+
if (!isNil(width)) {
|
|
24
24
|
this.width = width
|
|
25
25
|
}
|
|
26
|
-
if (height) {
|
|
26
|
+
if (!isNil(height)) {
|
|
27
27
|
this.height = height
|
|
28
28
|
}
|
|
29
|
-
if (radius) {
|
|
29
|
+
if (!isNil(radius)) {
|
|
30
30
|
this.radius = radius
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
getTextStyle(): LogicFlow.TextNodeTheme {
|
|
35
|
-
// const { x, y, width, height } = this
|
|
36
35
|
const {
|
|
37
36
|
refX = 0,
|
|
38
37
|
refY = 0,
|