@logicflow/vue-node-registry 1.0.7 → 1.0.8

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.
@@ -1,34 +1,34 @@
1
-
2
- > @logicflow/vue-node-registry@1.0.7 prebuild /Users/r0ger1tlearn/WorkSpace/Github/DiDi/logicflow/packages/vue-node-registry
3
- > rss
4
-
5
- > [prebuild] run-s -s clean:build
6
- > [clean:build] rimraf dist es lib
7
-
8
- > @logicflow/vue-node-registry@1.0.7 build /Users/r0ger1tlearn/WorkSpace/Github/DiDi/logicflow/packages/vue-node-registry
9
- > rss
10
-
11
- > [build] run-p -s build:dev build:umd
12
- > [build:umd] pnpm run --if-present build:less && rollup -c ../../rollup.config.js --bundleConfigAsCjs
13
- > [build:dev] pnpm run --if-present build:less && run-p -s build:cjs build:esm
14
- > [build:less] ./scripts/build-less
15
- > [build:less] ./scripts/build-less
16
- 
17
- ./src/index.ts → dist/index.min.js...
18
- +----------------------------------------------+
19
- | |
20
- | Bundle Format: umd |
21
- | Bundle Name: VueNodeRegistry |
22
- | External Globals: |
23
- |  @logicflow/core: Core |
24
- |  @vue/composition-api: VueCompositionApi |
25
- |  vue: Vue |
26
- | |
27
- | Destination: dist/index.min.js |
28
- | Bundle Size: 390 B |
29
- | Minified Size: 351 B |
30
- | GZipped Size: 200 B |
31
- | |
32
- +----------------------------------------------+
33
- (!) [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.
34
- created dist/index.min.js in 3.7s
1
+
2
+ > @logicflow/vue-node-registry@1.0.7 prebuild /Users/didi/Desktop/github/LogicFlow/packages/vue-node-registry
3
+ > rss
4
+
5
+ > [prebuild] run-s -s clean:build
6
+ > [clean:build] rimraf dist es lib
7
+
8
+ > @logicflow/vue-node-registry@1.0.7 build /Users/didi/Desktop/github/LogicFlow/packages/vue-node-registry
9
+ > rss
10
+
11
+ > [build] run-p -s build:dev build:umd
12
+ > [build:umd] pnpm run --if-present build:less && rollup -c ../../rollup.config.js --bundleConfigAsCjs
13
+ > [build:dev] pnpm run --if-present build:less && run-p -s build:cjs build:esm
14
+ > [build:less] ./scripts/build-less
15
+ > [build:less] ./scripts/build-less
16
+ 
17
+ ./src/index.ts → dist/index.min.js...
18
+ +----------------------------------------------+
19
+ | |
20
+ | Bundle Format: umd |
21
+ | Bundle Name: VueNodeRegistry |
22
+ | External Globals: |
23
+ |  @logicflow/core: Core |
24
+ |  @vue/composition-api: VueCompositionApi |
25
+ |  vue: Vue |
26
+ | |
27
+ | Destination: dist/index.min.js |
28
+ | Bundle Size: 390 B |
29
+ | Minified Size: 351 B |
30
+ | GZipped Size: 200 B |
31
+ | |
32
+ +----------------------------------------------+
33
+ (!) [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.
34
+ created dist/index.min.js in 5s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @logicflow/vue-node-registry
2
2
 
3
+ ## 1.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: 修复一些问题
8
+ - fix: 修复一些问题
9
+ - fix: 修复文本拖拽不符合预期的问题 by ChangeSuger
10
+ - feat: 支持动态修改 Grid 的配置 by ChangeSuger
11
+ - fix: 修复 2.x 与 1.x 下相同的网格线宽,Grid 表现不一致的问题 by ChangeSuger
12
+ - fix: node:dnd-drag 增加事件数据 by HeatonZ
13
+ - fix(extension): 【dynamic-group】修复mousemove和isCollapsed相关问题 by wbccb
14
+ - fix: 修复 windows 系统 node20 环境下样式文件打包失败的问题 by ChangeSuger
15
+ - fix: 修复 node:dnd-drag 事件的类型检查问题 by ChangeSuger
16
+ - fix(example): 修复文档中vue3自定义组件不能正常显示bug by zkt2002
17
+ - fix(core): 在没有拖拽的情况下,Control组件突然销毁,不触发cancelDrag(#1926) by wbccb
18
+ - fix(core): 修复笔记本触摸板点击边事件失效 by wuchenguang1998
19
+ - feat(examples): 添加动画边demo by DymoneLewis
20
+ - fix(core): 类型定义 properties:change 改为 node:properties-change by HeatonZ
21
+ - feat: node-registry 自定义properties类型 by HeatonZ
22
+ - fix(core): 修复 polyline 与多边形节点的交点不正确的问题 by Yuan-ZW
23
+ - Updated dependencies
24
+ - @logicflow/core@2.0.7
25
+
3
26
  ## 1.0.7
4
27
 
5
28
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/vue-node-registry",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
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.6"
23
+ "@logicflow/core": "2.0.7"
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.6"
32
+ "@logicflow/core": "2.0.7"
33
33
  },
34
34
  "author": {
35
35
  "name": "boyongjiong",
package/src/model.ts CHANGED
@@ -1,7 +1,7 @@
1
- import LogicFlow, { HtmlNodeModel } from '@logicflow/core'
1
+ import LogicFlow, { HtmlNodeModel, IHtmlNodeProperties } from '@logicflow/core'
2
2
  import { cloneDeep, isNil } from 'lodash-es'
3
3
 
4
- export type CustomProperties = {
4
+ export interface VueCustomProperties extends IHtmlNodeProperties {
5
5
  // 形状属性
6
6
  width?: number
7
7
  height?: number
@@ -16,10 +16,12 @@ export type CustomProperties = {
16
16
  textStyle?: LogicFlow.TextNodeTheme
17
17
  }
18
18
 
19
- export class VueNodeModel extends HtmlNodeModel {
19
+ export class VueNodeModel<
20
+ P extends VueCustomProperties = VueCustomProperties,
21
+ > extends HtmlNodeModel<P> {
20
22
  setAttributes() {
21
23
  // DONE: 解决 width、height、radius 为 0 时的问题
22
- const { width, height, radius } = this.properties as CustomProperties
24
+ const { width, height, radius } = this.properties
23
25
  if (!isNil(width)) {
24
26
  this.width = width
25
27
  }
@@ -32,11 +34,7 @@ export class VueNodeModel extends HtmlNodeModel {
32
34
  }
33
35
 
34
36
  getTextStyle(): LogicFlow.TextNodeTheme {
35
- const {
36
- refX = 0,
37
- refY = 0,
38
- textStyle,
39
- } = this.properties as CustomProperties
37
+ const { refX = 0, refY = 0, textStyle } = this.properties
40
38
  const style = super.getTextStyle()
41
39
 
42
40
  // 通过 transform 重新设置 text 的位置
@@ -52,7 +50,7 @@ export class VueNodeModel extends HtmlNodeModel {
52
50
  const {
53
51
  style: customNodeStyle,
54
52
  // radius = 0, // 第二种方式,设置圆角
55
- } = this.properties as CustomProperties
53
+ } = this.properties
56
54
 
57
55
  return {
58
56
  ...style,