diff --git a/ordinis-admin-ui/package.json b/ordinis-admin-ui/package.json index 98f9de4..f4c2bba 100644 --- a/ordinis-admin-ui/package.json +++ b/ordinis-admin-ui/package.json @@ -63,6 +63,7 @@ "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "@vitejs/plugin-react": "^4.3.4", + "conventional-changelog-conventionalcommits": "^9.3.1", "jsdom": "^29.1.1", "semantic-release": "^24.2.1", "tailwindcss": "^4.0.0-beta.7", diff --git a/ordinis-admin-ui/pnpm-lock.yaml b/ordinis-admin-ui/pnpm-lock.yaml index 7683a0f..a77534c 100644 --- a/ordinis-admin-ui/pnpm-lock.yaml +++ b/ordinis-admin-ui/pnpm-lock.yaml @@ -159,6 +159,9 @@ importers: '@vitejs/plugin-react': specifier: ^4.3.4 version: 4.7.0(vite@6.4.2(jiti@2.6.1)(lightningcss@1.32.0)) + conventional-changelog-conventionalcommits: + specifier: ^9.3.1 + version: 9.3.1 jsdom: specifier: ^29.1.1 version: 29.1.1 @@ -1905,6 +1908,10 @@ packages: resolution: {integrity: sha512-6gfI3otXK5Ph5DfCOI1dblr+kN3FAm5a97hYoQkqNZxOaYa5WKfXH+AnpsmS+iUH2mgVC2Cg2Qw9m5OKcmNrIg==} engines: {node: '>=18'} + conventional-changelog-conventionalcommits@9.3.1: + resolution: {integrity: sha512-dTYtpIacRpcZgrvBYvBfArMmK2xvIpv2TaxM0/ZI5CBtNUzvF2x0t15HsbRABWprS6UPmvj+PzHVjSx4qAVKyw==} + engines: {node: '>=18'} + conventional-changelog-writer@8.4.0: resolution: {integrity: sha512-HHBFkk1EECxxmCi4CTu091iuDpQv5/OavuCUAuZmrkWpmYfyD816nom1CvtfXJ/uYfAAjavgHvXHX291tSLK8g==} engines: {node: '>=18'} @@ -5324,6 +5331,10 @@ snapshots: dependencies: compare-func: 2.0.0 + conventional-changelog-conventionalcommits@9.3.1: + dependencies: + compare-func: 2.0.0 + conventional-changelog-writer@8.4.0: dependencies: '@simple-libs/stream-utils': 1.2.0 diff --git a/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx b/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx index 56e2417..0b00fea 100644 --- a/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx +++ b/ordinis-admin-ui/src/components/editor/EditorInfoPanel.tsx @@ -1,10 +1,10 @@ import { useMemo } from 'react' import { Link } from '@tanstack/react-router' import { useTranslation } from 'react-i18next' -import { ClockCounterClockwiseIcon, MapTrifoldIcon, DownloadSimpleIcon } from '@phosphor-icons/react' +import { ClockCounterClockwiseIcon, MapTrifoldIcon, DownloadSimpleIcon, ArrowRightIcon } from '@phosphor-icons/react' import { Badge } from '@/ui' import { useDictionaryDependents } from '@/api/queries' -import type { DictionaryDetail } from '@/api/client' +import type { DictionaryDetail, OnCloseAction, SchemaDependent } from '@/api/client' import { cn } from '@/lib/utils' /** @@ -42,11 +42,7 @@ export function EditorInfoPanel({ detail, recordCount, actions }: EditorInfoPane const { data: refByRaw } = useDictionaryDependents(detail.name) const outgoingNames = useMemo(() => extractOutgoingFk(detail.schemaJson), [detail.schemaJson]) - const incomingNames = useMemo(() => { - const seen = new Set() - for (const dep of refByRaw ?? []) seen.add(dep.sourceDict) - return Array.from(seen).sort() - }, [refByRaw]) + const incomingDeps: SchemaDependent[] = useMemo(() => refByRaw ?? [], [refByRaw]) return (