Skip to content

Commit

Permalink
fix: typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Jan 15, 2024
1 parent 3d79822 commit 3174672
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/gi-assets-advance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"postpublish": "tnpm sync @antv/gi-assets-advance"
},
"dependencies": {
"@antv/graphin": "workspace:*",
"@aligov/global-locale": "^1.0.5",
"@aligov/global-string-format": "^1.0.7",
"@ant-design/icons": "^4.7.0",
Expand Down Expand Up @@ -62,7 +63,6 @@
"use-immer": "^0.9.0"
},
"peerDependencies": {
"@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
Expand Up @@ -30,6 +30,7 @@ const useCellSelect = (
const rowData = nodeTable.dataSet.getMultiData();
if (!rowData) return;
const nodeID = rowData[rowIndex]?.id;
// @ts-ignore
selectedNodes.add(nodeID);
});
highlightBySelectedNodes(selectedNodes, { updateContext, largeGraphData, data: graphData, graph });
Expand All @@ -52,6 +53,7 @@ const useCellSelect = (
if (!rowData) return;
const rd = rowData[rowIndex];
const { id: edgeID, GI_AGGREGATE_ID } = rd;
// @ts-ignore
selectedEdges.add(GI_AGGREGATE_ID ? GI_AGGREGATE_ID : edgeID);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const useListenEdgeSelect = (isSelectedActive: boolean, s2Instance: SpreadSheet
const rowData = s2Instance.dataSet.getMultiData();
if (!rowData) return;
const nodeID = rowData[rowIndex]?.id;
// @ts-ignore
selectedEdges.add(nodeID);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const useListenNodeSelect = (isSelectedActive: boolean, s2Instance: SpreadSheet
const rowData = s2Instance.dataSet.getMultiData();
if (!rowData) return;
const nodeID = rowData[rowIndex]?.id;
// @ts-ignore
selectedNodes.add(nodeID);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* author:shiwu.wyy@antgroup.com
*/

//@ts-nocheck
import { DeleteOutlined } from '@ant-design/icons';
import Algorithm from '@antv/algorithm';
import { useContext } from '@antv/gi-sdk';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BarChartOutlined, FieldStringOutlined, LineChartOutlined, NumberOutlined } from '@ant-design/icons';
import { useContext, utils } from '@antv/gi-sdk';
import { useContext, useSourceDataMap, utils } from '@antv/gi-sdk';
import { Card, Select } from 'antd';
import React, { useMemo } from 'react';
import { useImmer } from 'use-immer';
Expand Down Expand Up @@ -48,8 +48,9 @@ interface IState {
}

const ChartCard: React.FC<ChartCardProps> = props => {
const { graph, updateContext, context } = useContext();
const { schemaData, source, sourceDataMap, transform } = context;
const { graph, updateContext, context, transform } = useContext();
const { schemaData, source } = context;
const sourceDataMap = useSourceDataMap(source);
const [state, updateState] = useImmer<IState>({
dataType: props.dataType || 'edges',
xField: props.xField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface LayoutSwitchProps {
GIAC: IGIAC;
controlledValues?: LayoutConfig;
}
//@ts-ignore
let timer: NodeJS.Timer;

const LayoutSwitch: React.FunctionComponent<LayoutSwitchProps> = props => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default () => {
if (edgeIds.length === 0) {
return;
}
const graphData = context.graph.save() as GraphData;
const graphData = graph.save() as GraphData;
const edges = graphData.edges?.filter(edge => {
return !edgeIds.includes(edge.id);
});
Expand All @@ -48,7 +48,7 @@ export default () => {
};
});
},
[context],
[graph],
);
return React.useMemo(() => {
return {
Expand Down

0 comments on commit 3174672

Please sign in to comment.