diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml deleted file mode 100644 index 2ef3f12b9..000000000 --- a/.github/workflows/mirror.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: 🤖 Sync to Gitee Mirror - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: 🔁 Sync to Gitee - uses: wearerequired/git-mirror-action@master - env: - # 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY - SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} - with: - # 注意替换为你的 GitHub 源仓库地址 - source-repo: git@github.com:antvis/Graphin.git - # 注意替换为你的 Gitee 目标仓库地址 - destination-repo: git@gitee.com:antv-graphin/antv-graphin.git - - - name: ✅ Build Gitee Pages - uses: yanglbme/gitee-pages-action@master - with: - # 注意替换为你的 Gitee 用户名 - gitee-username: afc163 - # 注意在 Settings->Secrets 配置 GITEE_PASSWORD - gitee-password: ${{ secrets.GITEE_PASSWORD }} - # 注意替换为你的 Gitee 仓库 - gitee-repo: antv-graphin/antv-graphin - # 要部署的分支,默认是 master,若是其他分支,则需要指定 - branch: gh-pages diff --git a/.umirc.js b/.umirc.js index 6d89f0eb8..27085bd85 100644 --- a/.umirc.js +++ b/.umirc.js @@ -50,8 +50,8 @@ export default { navs: [ null, { - title: 'GraphInsight', - path: 'https://graphinsight.antgroup.com/home.html#/', + title: '在线分析工具 G6VP', + path: 'https://insight.antv.antgroup.com', }, // { // title: 'GitHub', @@ -92,8 +92,9 @@ export default { 'https://gw.alipayobjects.com/os/lib/react-dom/16.13.1/umd/react-dom.development.js', 'https://gw.alipayobjects.com/os/lib/antd/4.6.6/dist/antd-with-locales.js', /** G6 **/ - 'https://gw.alipayobjects.com/os/lib/antv/g6/4.7.0/dist/g6.min.js', - 'https://gw.alipayobjects.com/os/lib/antv/g6/4.7.0/dist/g6.min.js.map', + 'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.9/dist/g6.min.js', + 'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.9/dist/g6.min.js.map', + /** lodash */ 'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js', ], diff --git a/README.md b/README.md index 083ca47e9..8d8c562ce 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ A React toolkit for graph analysis based on G6 ## 🌾 New Products! -2022.06.06, this day coincides with the 4th anniversary of the open source of G6, which is also the traditional Chinese solar term: "Grain in Ear", GraphInsight, a new product in the direction of graph analysis. Users can complete the visualization, exploration and analysis tasks of relational data online without code development. You can also export the SDK with one click and integrate it into the business system to help developers improve R&D efficiency. +2022.06.06, this day coincides with the 4th anniversary of the open source of G6, which is also the traditional Chinese solar term: "Grain in Ear", G6VP, a new product in the direction of graph analysis. Users can complete the visualization, exploration and analysis tasks of relational data online without code development. You can also export the SDK with one click and integrate it into the business system to help developers improve R&D efficiency. -The SDK exported by GraphInsight is encapsulated based on Graphin. If you want to understand the capabilities of Graphin, you can take a look at the product [GraphInsight](https://github.com/antvis/GraphInsight) +The SDK exported by G6VP is encapsulated based on Graphin. If you want to understand the capabilities of Graphin, you can take a look at the product [G6VP](https://github.com/antvis/G6VP) ## ✨ Features diff --git a/README.zh-CN.md b/README.zh-CN.md index d75775782..0b7861fa5 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -19,9 +19,9 @@ A React toolkit for graph analysis based on G6 ## 🌾 新产品! -2022.06.06 ,这天恰逢 G6 开源 4 周年,也是中国传统节气芒种日,我们对外发布一款图分析方向的新品 GraphInsight,用户无需代码开发,即可在线完成关系数据的可视化与探索分析任务。还可一键导出 SDK,集成到业务系统中,帮助开发者研发提效。 +2022.06.06 ,这天恰逢 G6 开源 4 周年,也是中国传统节气芒种日,我们对外发布一款图分析方向的新品 G6VP,用户无需代码开发,即可在线完成关系数据的可视化与探索分析任务。还可一键导出 SDK,集成到业务系统中,帮助开发者研发提效。 -GraphInsight 所导出的 SDK 正是基于 Graphin 封装的,如果你想了解 Graphin 的能力,不妨可以在 [GraphInsight](https://github.com/antvis/GraphInsight) 这款产品中一窥究竟 +G6VP 所导出的 SDK 正是基于 Graphin 封装的,如果你想了解 Graphin 的能力,不妨可以在 [G6VP](https://github.com/antvis/G6VP) 这款产品中一窥究竟 ## ✨ 功能特性 diff --git a/packages/graphin/package.json b/packages/graphin/package.json index e582cbf5d..9839fd25f 100644 --- a/packages/graphin/package.json +++ b/packages/graphin/package.json @@ -1,6 +1,6 @@ { "name": "@antv/graphin", - "version": "2.7.13", + "version": "2.7.14", "description": "the react toolkit for graph analysis based on g6", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/graphin/src/Graphin.tsx b/packages/graphin/src/Graphin.tsx index 8684fd765..edfdf533c 100644 --- a/packages/graphin/src/Graphin.tsx +++ b/packages/graphin/src/Graphin.tsx @@ -214,7 +214,11 @@ class Graphin extends React.PureComponent { const finalStyle = { defaultNode: { style: { ...defaultNode.style, _theme: theme }, type: defaultNode.type || 'graphin-circle' }, // isGraphinNodeType ? deepMix({}, defaultNodeStyle, defaultNode) : defaultNode, defaultEdge: { style: { ...defaultEdge.style, _theme: theme }, type: defaultEdge.type || 'graphin-line' }, // isGraphinEdgeType ? deepMix({}, defaultEdgeStyle, defaultEdge) : defaultEdge, - defaultCombo: { style: { ...defaultCombo.style, _theme: theme }, type: defaultCombo.type || 'combo', labelCfg: defaultCombo.labelCfg }, // deepMix({}, defaultComboStyle, defaultCombo), // TODO:COMBO的样式需要内部自定义 + defaultCombo: { + style: { ...defaultCombo.style, _theme: theme }, + type: defaultCombo.type || 'combo', + labelCfg: defaultCombo.labelCfg, + }, // deepMix({}, defaultComboStyle, defaultCombo), // TODO:COMBO的样式需要内部自定义 /** status 样式 */ nodeStateStyles, // isGraphinNodeType ? deepMix({}, defaultNodeStatusStyle, nodeStateStyles) : nodeStateStyles, edgeStateStyles, // isGraphinEdgeType ? deepMix({}, defaultEdgeStatusStyle, edgeStateStyles) : edgeStateStyles, @@ -499,7 +503,12 @@ class Graphin extends React.PureComponent { * 组件移除的时候 */ componentWillUnmount() { - this.clear(); + const { willUnmount } = this.props; + if (willUnmount) { + willUnmount(); + } else { + this.clear(); + } } /** diff --git a/packages/graphin/src/typings/type.ts b/packages/graphin/src/typings/type.ts index 0600c4a8f..ee8cf97c8 100644 --- a/packages/graphin/src/typings/type.ts +++ b/packages/graphin/src/typings/type.ts @@ -197,6 +197,7 @@ export interface GraphinProps { * Text direction, to support languages like Arabic and Hebrew. */ dir?: 'ltr' | 'rtl'; + willUnmount?: () => void; } export interface IUserNode extends BaseNode, Partial, UserProperties {}