diff --git a/client/package.json b/client/package.json index 982aee03..37948056 100644 --- a/client/package.json +++ b/client/package.json @@ -19,7 +19,48 @@ }, "resolutions": { "@types/react": "^17.0.0", - "@types/react-dom": "^17.0.0" + "@types/react-dom": "^17.0.0", + "umzug": "3.1.1", + "tsparticles-engine": "2.9.3", + "tsparticles-move-base": "2.9.3", + "tsparticles-shape-circle": "2.9.3", + "tsparticles-updater-color": "2.9.3", + "tsparticles-updater-opacity": "2.9.3", + "tsparticles-updater-out-modes": "2.9.3", + "tsparticles-updater-size": "2.9.3", + "tsparticles-interaction-external-trail": "2.9.3", + "tsparticles-plugin-absorbers": "2.9.3", + "tsparticles-plugin-emitters": "2.9.3", + "tsparticles-slim": "2.9.3", + "tsparticles-updater-destroy": "2.9.3", + "tsparticles-updater-roll": "2.9.3", + "tsparticles-updater-tilt": "2.9.3", + "tsparticles-updater-twinkle": "2.9.3", + "tsparticles-updater-wobble": "2.9.3", + "tsparticles-interaction-external-attract": "2.9.3", + "tsparticles-interaction-external-bounce": "2.9.3", + "tsparticles-interaction-external-bubble": "2.9.3", + "tsparticles-interaction-external-connect": "2.9.3", + "tsparticles-interaction-external-grab": "2.9.3", + "tsparticles-interaction-external-pause": "2.9.3", + "tsparticles-interaction-external-push": "2.9.3", + "tsparticles-interaction-external-remove": "2.9.3", + "tsparticles-interaction-external-repulse": "2.9.3", + "tsparticles-interaction-external-slow": "2.9.3", + "tsparticles-interaction-particles-attract": "2.9.3", + "tsparticles-interaction-particles-collisions": "2.9.3", + "tsparticles-interaction-particles-links": "2.9.3", + "tsparticles-move-parallax": "2.9.3", + "tsparticles-particles.js": "2.9.3", + "tsparticles-plugin-easing-quad": "2.9.3", + "tsparticles-shape-image": "2.9.3", + "tsparticles-shape-line": "2.9.3", + "tsparticles-shape-polygon": "2.9.3", + "tsparticles-shape-square": "2.9.3", + "tsparticles-shape-star": "2.9.3", + "tsparticles-shape-text": "2.9.3", + "tsparticles-updater-life": "2.9.3", + "tsparticles-updater-stroke-color": "2.9.3" }, "dependencies": { "@tugraph/openpiece-cli": "0.0.6", diff --git a/client/packages/app/client/.umirc.ts b/client/packages/app/client/.umirc.ts index a100fd83..725ea094 100644 --- a/client/packages/app/client/.umirc.ts +++ b/client/packages/app/client/.umirc.ts @@ -8,7 +8,7 @@ const umiConfig = getUmiConfig(); process.env.MFSU_AD = 'none'; -const ANTD_VERSION = '4.23.5'; +const ANTD_VERSION = '4.24.0'; const GI_SDK_APP_VERSION = '1.2.0'; export default defineConfig({ diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less index a2665c61..128b78ba 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less @@ -17,6 +17,14 @@ overflow: hidden; } } + .ant-table-cell { + font-weight: 400; + font-size: 14px; + color: #6a6b71; + } + .ant-form-item-required { + color: #363740; + } } &-content { padding: 0 24px 24px; @@ -41,6 +49,12 @@ } &-addbtn { margin: 8px 0 10px 0; + &:hover { + border: 1px dashed #1650ff; + } + } + &-name:focus { + border: 1px solid #1650ff; } &-attr { margin-bottom: 16px; @@ -50,4 +64,7 @@ font-size: 14px; color: rgba(54, 55, 64, 1); } + &-attributes { + background-color: #1650ff; + } } diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx index 4a046ca2..fbb4fa77 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx @@ -17,6 +17,7 @@ type Prop = { data?: any; onFinish?: (value?: any) => void; onSwitch?: (onShow: () => void, onClose: () => void) => void; + onVisible?: (visible: boolean) => void; }; interface EditColumnsType extends ColumnsType { editorConfig: { @@ -33,6 +34,7 @@ export const AddNodesEdges: React.FC = ({ data = [], onFinish, onSwitch, + onVisible, }) => { const [form] = Form.useForm(); const { visible, onShow, onClose } = useVisible({ defaultVisible: true }); @@ -50,18 +52,22 @@ export const AddNodesEdges: React.FC = ({ useEffect(() => { onSwitch?.(onShow, onClose); }, []); + useEffect(() => { + onVisible?.(visible); + }, [visible]); + const propertyList = () => { const attrPropertyNames = map( - filter(attrList, (attr) => !attr.optional), - (item) => item.name + filter(attrList, attr => !attr.optional), + item => item.name, ); - const indexPropertyNames = map(configList, (item) => item.propertyName); + const indexPropertyNames = map(configList, item => item.propertyName); return map( filter( xor(attrPropertyNames, indexPropertyNames), - (item) => item !== undefined + item => item !== undefined, ), - (item) => ({ label: item, value: item }) + item => ({ label: item, value: item }), ); }; const addButton = (handleAdd?: () => void, text: string = '添加属性') => { @@ -87,7 +93,7 @@ export const AddNodesEdges: React.FC = ({ return { inputType: EditType.SELECT, prop: { - options: map(data.nodes, (item) => ({ + options: map(data.nodes, item => ({ label: item.labelName, value: item.labelName, })), @@ -104,7 +110,7 @@ export const AddNodesEdges: React.FC = ({ return { inputType: EditType.SELECT, prop: { - options: map(data.nodes, (item) => ({ + options: map(data.nodes, item => ({ label: item.labelName, value: item.labelName, })), @@ -120,9 +126,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.startList = [ - ...startList.filter((item) => item.id !== record?.id), + ...startList.filter(item => item.id !== record?.id), ]; }); }} @@ -194,9 +200,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.attrList = [ - ...attrList.filter((item) => item.id !== record?.id), + ...attrList.filter(item => item.id !== record?.id), ]; }); }} @@ -294,9 +300,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.configList = [ - ...configList.filter((item) => item.id !== record?.id), + ...configList.filter(item => item.id !== record?.id), ]; }); }} @@ -309,14 +315,14 @@ export const AddNodesEdges: React.FC = ({ }, ]; const addNodeAttr = () => { - updateState((draft) => { + updateState(draft => { const list = [...attrList]; list.push({ id: attrList.length + 1 }); draft.attrList = [...list]; }); }; const addNodeConfig = () => { - updateState((draft) => { + updateState(draft => { const list = [...configList]; list.push({ id: configList.length + 1, @@ -326,7 +332,7 @@ export const AddNodesEdges: React.FC = ({ }); }; const addEdge = () => { - updateState((draft) => { + updateState(draft => { const list = [...startList]; list.push({ id: `${startList.length + 1}` }); draft.startList = [...list]; @@ -347,7 +353,7 @@ export const AddNodesEdges: React.FC = ({ onClick={() => { onClose(); form.resetFields(); - updateState((draft) => { + updateState(draft => { draft.startList = []; draft.configList = []; draft.attrList = []; @@ -359,7 +365,7 @@ export const AddNodesEdges: React.FC = ({