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

Fix typing error #574

Open
wants to merge 1 commit into
base: pref/sdk-valtio
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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:[email protected]
*/

//@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