Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP:Update G6 5.0 #536

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d46b78a
feat: update version
pomelo-nwu Sep 4, 2023
bc1c023
feat: add v5
pomelo-nwu Sep 5, 2023
2c83868
chore: update code
pomelo-nwu Sep 7, 2023
04dbaf4
feat: add graphin
pomelo-nwu Sep 19, 2023
fa44760
feat: update loadr
pomelo-nwu Oct 7, 2023
a2d22cd
feat: update graphin
pomelo-nwu Oct 8, 2023
66beba1
refactor: gi-sdk
pomelo-nwu Oct 8, 2023
6ae43aa
refactor: 兼容api
pomelo-nwu Oct 8, 2023
5e7e45e
feat: update ref
pomelo-nwu Oct 8, 2023
c5f3012
feat: update version
pomelo-nwu Oct 8, 2023
562bb41
feat: update dataRef
pomelo-nwu Oct 8, 2023
03df067
feat: fix error
pomelo-nwu Oct 9, 2023
9a7dc91
feat: update nodes / edges
pomelo-nwu Oct 10, 2023
43c8f61
feat: add style mappers
pomelo-nwu Oct 10, 2023
2794852
feat: update docs
pomelo-nwu Oct 10, 2023
4c5cdf2
pref: gisdk render
pomelo-nwu Oct 10, 2023
15e4937
fix: layout config
pomelo-nwu Oct 10, 2023
b53c459
feat: update sdk
pomelo-nwu Oct 11, 2023
ddcd5a6
feat: update
pomelo-nwu Oct 11, 2023
4f5c5e7
feat: update sdk
pomelo-nwu Oct 13, 2023
3683a99
feat: update ActivateRelations asset
pomelo-nwu Oct 13, 2023
4bacf75
feat: add graphin Behaviors
pomelo-nwu Oct 13, 2023
a51916b
feat: update ActiveRelations CanvasSetting FitView LassoSelect assets
pomelo-nwu Oct 13, 2023
f26be8a
feat: update ContextMenu asset
pomelo-nwu Oct 16, 2023
5fe3e3b
feat: update CommonNeighbor
pomelo-nwu Oct 16, 2023
c53a5ac
feat: update NeighborsQuery asset
pomelo-nwu Oct 16, 2023
fc84992
feat: update apis
pomelo-nwu Oct 16, 2023
e56f300
feat: fix typing error
pomelo-nwu Oct 16, 2023
b3b114b
feat: update size
pomelo-nwu Oct 16, 2023
b67a8fb
feat: update Hoverable
pomelo-nwu Oct 16, 2023
498619b
feat: update SelectExchangeMenuItem asset
pomelo-nwu Oct 16, 2023
7e1db26
feat: update RemoveNodeWithMenu asset
pomelo-nwu Oct 16, 2023
4c540cc
feat: update sdk
pomelo-nwu Oct 17, 2023
c21201b
feat: update assets
pomelo-nwu Oct 20, 2023
a8d7a2c
feat: update advance assets
pomelo-nwu Oct 20, 2023
28ea3a5
feat: update scene assets
pomelo-nwu Oct 20, 2023
ac593fb
feat: update engines
pomelo-nwu Oct 20, 2023
f7d78e0
feat: update sdk
pomelo-nwu Oct 23, 2023
4635410
feat: remove disable
pomelo-nwu Oct 23, 2023
b2d2c00
feat: update MapMode
pomelo-nwu Oct 24, 2023
82ecad6
feat: update LargeGraph asset
pomelo-nwu Oct 24, 2023
89064df
feat: update highlight
pomelo-nwu Oct 24, 2023
3a88c8d
feat: update SimpleNode
pomelo-nwu Oct 26, 2023
cf038cc
feat: fix contextmenu
pomelo-nwu Oct 26, 2023
1d3f547
feat: update
pomelo-nwu Oct 30, 2023
13179ae
chore: rename preset to presetLayout and changedata layout without pr…
Yanyan-Wang Oct 30, 2023
b2efe06
Merge pull request #545 from antvis/sdk-layout
pomelo-nwu Oct 30, 2023
6d81937
feat: update edge
pomelo-nwu Oct 30, 2023
81aa4d3
feat: update PathAnalysis
pomelo-nwu Nov 1, 2023
7c7f629
feat: update StylingSetting
pomelo-nwu Nov 1, 2023
905bf24
chore: refine rebase
Yanyan-Wang Nov 2, 2023
d262c62
Merge pull request #547 from antvis/sdk-layout
pomelo-nwu Nov 2, 2023
c31ff5c
feat: pin node with menu
Yanyan-Wang Nov 2, 2023
e41cef4
Merge pull request #548 from antvis/sdk-layout
pomelo-nwu Nov 2, 2023
bcf361b
feat: update
pomelo-nwu Nov 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {
"react": "17"
"react": "17.x",
"react-dom": "17.x"
}
},
"overrides": {
Expand All @@ -39,8 +40,8 @@
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@antv/algorithm": "^0.1.26-beta.0",
"@antv/g6": "^4.8.19",
"@antv/graphin": "^2.7.25",
"@antv/g6": "5.0.0-beta.5",
"@antv/graphin": "workspace:*",
"@antv/layout": "^0.3.22",
"@antv/s2": "^1.48.0",
"@antv/s2-react": "^1.41.0",
Expand All @@ -49,7 +50,7 @@
"buffer": "^6.0.3",
"buffer-browserify": "^0.2.5",
"node-fetch": "^3.3.0",
"react": "17",
"react": "17.x",
"react-dom": "17.x",
"stream-browserify": "^3.0.0",
"umi": "3.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/gi-assets-advance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"use-immer": "^0.9.0"
},
"peerDependencies": {
"@antv/graphin": "^2.7.25",
"@antv/graphin": "workspace:*",
"antd": "4.x",
"react": "17.x",
"react-dom": "17.x"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { useMemoizedFn } from 'ahooks';
//@ts-nocheck
import G6, { IGraph } from '@antv/g6';
import { useMemoizedFn } from 'ahooks';
import React, { CSSProperties, useEffect, useRef } from 'react';
import { useImmer } from 'use-immer';
import { TemplateData, TemplateNode } from './type';
import { createFlowGraph, createTooltip } from './util';
import { registerNodes } from './flowNodeRegistry';
import './flowNodeRegistry';
import { registerNodes } from './flowNodeRegistry';
import './index.less';
import { TemplateData, TemplateNode } from './type';
import { createFlowGraph, createTooltip } from './util';

const { Tooltip } = G6;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@ts-nocheck
import G6 from '@antv/g6';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from 'react';
import { Form, Input, Popover, Tooltip } from 'antd';
//@ts-nocheck
import { PictureOutlined } from '@ant-design/icons';
import G6 from '@antv/g6';
import { TemplateNode } from './type';
import { Form, Input, Popover, Tooltip } from 'antd';
import * as React from 'react';
import RJV from 'react-json-view';
import $i18n from '../../i18n';
import { TemplateNode } from './type';

const ReactJson: any = RJV;

Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions packages/gi-assets-advance/src/components/EdgeBundling/index.tsx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//@ts-nocheck
import { StarFilled } from '@ant-design/icons';
import G6, { Item } from '@antv/g6';
import G6 from '@antv/g6';
import { icons, useContext } from '@antv/gi-sdk';
import { Menu } from 'antd';
import insertCss from 'insert-css';
Expand All @@ -8,6 +9,7 @@ import { bind } from 'size-sensor';
import $i18n from '../../i18n';
import './index.less';

type Item = any;
export interface GraphAnnotationProps {
contextmenu: any;
annotationWay: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { CaretRightOutlined, DeleteOutlined } from '@ant-design/icons';
import { Item } from '@antv/g6';

import { useContext } from '@antv/gi-sdk';
import { Button, Collapse, message, Select } from 'antd';
import React from 'react';
import { useImmer } from 'use-immer';
import $i18n from '../../i18n';
import { LAYOUTS } from './const';
import { ILayoutOption } from './typing';
import { updateLayout, getLayoutOptions } from './utils';
import './index.less';
import $i18n from '../../i18n';
import { ILayoutOption } from './typing';
import { getLayoutOptions, updateLayout } from './utils';

type Item = any;

const { Panel } = Collapse;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { GraphData, IGraph } from '@antv/g6';
import { LAYOUTS, LayoutMap } from './const';
import { Graph, GraphData } from '@antv/g6';
import { ILayoutOption } from './typing';

/**
Expand All @@ -13,16 +13,19 @@ export const cropGraphByNodes = (graphData: GraphData, targetNodes: { id: string
const ids = targetNodes.map(node => node.id);
const newEdges = edges!.filter(edge => {
const { source, target } = edge;
//@ts-ignore
if (ids.indexOf(source!) !== -1 && ids.indexOf(target!) !== -1) {
return true;
}
return false;
});
const newNodes = nodes!
.filter(node => {
//@ts-ignore
return ids.indexOf(node.id) !== -1;
})
.map(node => {
//@ts-ignore
// 映射节点大小,用于圆形布局防重叠:https://github.com/antvis/layout/blob/master/src/layout/circular.ts#L213
node.size = node.style?.keyshape?.size || 26;
/*
Expand All @@ -46,7 +49,7 @@ export const cropGraphByNodes = (graphData: GraphData, targetNodes: { id: string
*/
export const updateLayout = (
layouts: ILayoutOption[],
graph: Graph,
graph: IGraph,
gap: number,
direction: 'vertical' | 'horizontal',
) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IEdge, INode } from '@antv/g6';
import { useContext } from '@antv/gi-sdk';
import { S2Event, SpreadSheet } from '@antv/s2';
import React from 'react';

import { useContext } from '@antv/gi-sdk';
type IEdge = any;
type INode = any;
const useListenEdgeSelect = (isSelectedActive: boolean, s2Instance: SpreadSheet | null, isFullScreen: boolean) => {
const { data: graphData, graph, largeGraphData, updateContext } = useContext();
React.useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IEdge, INode } from '@antv/g6';
import { S2Event, SpreadSheet } from '@antv/s2';
import React from 'react';
type IEdge = any;
type INode = any;

import { useContext } from '@antv/gi-sdk';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IEdge, INode } from '@antv/g6';
type IEdge = any;
type INode = any;
export const highlightBySelectedNodes = (selectedNodes: Set<any>, context) => {
const { updateContext, largeGraphData, data: graphData, graph } = context;
if (largeGraphData) {
Expand Down
Loading