Skip to content

Commit

Permalink
feat: updaate advance assets demo
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Nov 21, 2023
1 parent fc0daab commit 9cff20d
Show file tree
Hide file tree
Showing 15 changed files with 236 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ const AddSheetbar: React.FunctionComponent<AddSheetbarProps> = props => {
});
}, [graph, handleAddSheetbar, isRelayout]);

return (
<>
<GIAComponent GIAC={GIAC} onClick={handleClick} />
</>
);
return <GIAComponent GIAC={GIAC} onClick={handleClick} />;
};

export default memo(AddSheetbar);
17 changes: 0 additions & 17 deletions packages/gi-assets-advance/src/components/AddSheetbar/index.md

This file was deleted.

34 changes: 19 additions & 15 deletions packages/gi-assets-advance/src/components/AjustLayout/index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
## AjustLayout 子图布局
---
title: 子图布局
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import TestSDK, { Mock } from '@antv/gi-assets-testing';
import { Utils } from '@antv/graphin';
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.tsx';

const services = [
{
id: 'GI_SERVICE_INTIAL_GRAPH',
service: params => {
return new Promise(resolve => {
resolve(Utils.mock(20).tree().graphin());
});
},
},
];
const { registerMeta, info } = Asset;
const { id } = info;

const App = props => {
Assets.components[id] = Asset;

const App = () => {
return (
<div>
<TestSDK asset={Asset} services={services} type="GIAC_CONTENT" />
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};
Expand Down
17 changes: 0 additions & 17 deletions packages/gi-assets-advance/src/components/AnalysisHistory/index.md

This file was deleted.

33 changes: 33 additions & 0 deletions packages/gi-assets-advance/src/components/Assistant/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: AI 助理
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.ts';

const { registerMeta, info } = Asset;
const { id } = info;

Assets.components[id] = Asset;

const App = () => {
return (
<div>
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};

export default App;
```
33 changes: 33 additions & 0 deletions packages/gi-assets-advance/src/components/CypherQuery/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Cypher 语句查询
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.ts';

const { registerMeta, info } = Asset;
const { id } = info;

Assets.components[id] = Asset;

const App = () => {
return (
<div>
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};

export default App;
```
33 changes: 33 additions & 0 deletions packages/gi-assets-advance/src/components/GremlinQuery/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Gremlin 查询
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.tsx';

const { registerMeta, info } = Asset;
const { id } = info;

Assets.components[id] = Asset;

const App = () => {
return (
<div>
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};

export default App;
```
33 changes: 33 additions & 0 deletions packages/gi-assets-advance/src/components/JSONMode/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 代码模式
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.tsx';

const { registerMeta, info } = Asset;
const { id } = info;

Assets.components[id] = Asset;

const App = () => {
return (
<div>
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};

export default App;
```
17 changes: 0 additions & 17 deletions packages/gi-assets-advance/src/components/Redo/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions packages/gi-assets-advance/src/components/Sheetbar/index.md

This file was deleted.

33 changes: 33 additions & 0 deletions packages/gi-assets-advance/src/components/StructAnalysis/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 路径结构分析
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import * as React from 'react';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.tsx';

const { registerMeta, info } = Asset;
const { id } = info;

Assets.components[id] = Asset;

const App = () => {
return (
<div>
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};

export default App;
```
62 changes: 18 additions & 44 deletions packages/gi-assets-advance/src/components/StyleSetting/index.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,30 @@
## StyleSetting 样式设置
---
title: 样式设置
order: 0
group:
title: 高级资产
path: /advance
nav:
title: 资产包
path: /assets
order: 1
---

```jsx
import TestSDK, { Mock } from '@antv/gi-assets-testing';
import * as React from 'react';
import StyleSetting from './Component.tsx';
import { GISDK_TEST } from '@antv/gi-sdk';
import * as Assets from '@antv/gi-assets-basic';
import Asset from './index.tsx';

// <TestSDK asset={Asset} />
const { registerMeta, info } = Asset;
const { id } = info;

const nodes = {
uId: '112',
name: '',
pt: 'user',
age: 23,
};
Assets.components[id] = Asset;

const data = {
nodes: [
{
id: 'node1',
nodeType: 'User',
// 默认ID
label: 'xxx',
data: {
id: 'node1',
nodeType: 'User',
// 默认ID
label: 'xxx',
},
},
{
id: 'node1',
label: 'Car',
data: {
id: 'node1',
label: 'Car',
},
},
],
edges: [
{
source: 'node1',
target: 'node1',
edgeType: 'edge1',
},
],
};
const App = props => {
//<StyleSetting data={data} shapeOptions={[]} />
const App = () => {
return (
<div>
<TestSDK asset={Asset} type="GIAC_CONTENT" />
<GISDK_TEST assets={Assets} activeAssets={[info]} />
</div>
);
};
Expand Down
Loading

0 comments on commit 9cff20d

Please sign in to comment.