Настройка графа
@@ -78,7 +79,7 @@ function HelpTermGraph() {
Открыть настройки
- Вписать граф в экран
+ Вписать в экран
Сохранить в формат PNG
diff --git a/rsconcept/frontend/src/pages/OssPage/OssTabs.tsx b/rsconcept/frontend/src/pages/OssPage/OssTabs.tsx
index d224666d..72e02cb1 100644
--- a/rsconcept/frontend/src/pages/OssPage/OssTabs.tsx
+++ b/rsconcept/frontend/src/pages/OssPage/OssTabs.tsx
@@ -135,7 +135,7 @@ function OssTabs() {
- ${schema.title ?? ''}`} />
+
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx
index d778c95c..94b55fbd 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx
@@ -1,5 +1,7 @@
'use client';
+import clsx from 'clsx';
+
import {
IconClone,
IconDestroy,
@@ -118,7 +120,11 @@ function ToolbarConstituenta({
/>
>
) : null}
-
+
);
}
diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx
index 46072b31..d4e40b4f 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx
@@ -257,10 +257,7 @@ function RSTabs() {
- ${schema.title ?? ''}
Версия: ${labelVersion(schema)}`}
- />
+ Версия: ${labelVersion(schema)}`} />
Ошибок: ${schema.stats?.count_errors ?? 0}`}
diff --git a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsSearch.tsx b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsSearch.tsx
index 2d6fcbed..74fedb3d 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsSearch.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ConstituentsSearch.tsx
@@ -2,8 +2,10 @@
import { useLayoutEffect, useMemo, useState } from 'react';
+import { IconChild } from '@/components/Icons';
import SelectGraphFilter from '@/components/select/SelectGraphFilter';
import SelectMatchMode from '@/components/select/SelectMatchMode';
+import MiniButton from '@/components/ui/MiniButton';
import SearchBar from '@/components/ui/SearchBar';
import useLocalStorage from '@/hooks/useLocalStorage';
import { CstMatchMode, DependencyMode } from '@/models/miscellaneous';
@@ -25,6 +27,7 @@ function ConstituentsSearch({ schema, activeID, activeExpression, dense, setFilt
const [filterMatch, setFilterMatch] = useLocalStorage(storage.cstFilterMatch, CstMatchMode.ALL);
const [filterSource, setFilterSource] = useLocalStorage(storage.cstFilterGraph, DependencyMode.ALL);
const [filterText, setFilterText] = useState('');
+ const [showInherited, setShowInherited] = useLocalStorage(storage.cstFilterShowInherited, true);
useLayoutEffect(() => {
if (!schema || schema.items.length === 0) {
@@ -48,8 +51,21 @@ function ConstituentsSearch({ schema, activeID, activeExpression, dense, setFilt
if (filterText) {
result = result.filter(cst => matchConstituenta(cst, filterText, filterMatch));
}
+ if (!showInherited) {
+ result = result.filter(cst => !cst.is_inherited);
+ }
setFiltered(result);
- }, [filterText, setFiltered, filterSource, activeExpression, schema?.items, schema, filterMatch, activeID]);
+ }, [
+ filterText,
+ setFiltered,
+ filterSource,
+ activeExpression,
+ schema?.items,
+ schema,
+ filterMatch,
+ activeID,
+ showInherited
+ ]);
const selectGraph = useMemo(
() => setFilterSource(newValue)} dense={dense} />,
@@ -72,6 +88,15 @@ function ConstituentsSearch({ schema, activeID, activeExpression, dense, setFilt
/>
{selectMatchMode}
{selectGraph}
+ {schema && schema?.stats.count_inherited > 0 ? (
+ ${showInherited ? 'отображать' : 'скрывать'}`}
+ icon={}
+ className='h-fit self-center'
+ onClick={() => setShowInherited(prev => !prev)}
+ />
+ ) : null}
);
}
diff --git a/rsconcept/frontend/src/utils/constants.ts b/rsconcept/frontend/src/utils/constants.ts
index 9ecb11d1..f36d7299 100644
--- a/rsconcept/frontend/src/utils/constants.ts
+++ b/rsconcept/frontend/src/utils/constants.ts
@@ -123,7 +123,8 @@ export const storage = {
ossEdgeAnimate: 'oss.edge_animate',
cstFilterMatch: 'cst.filter.match',
- cstFilterGraph: 'cst.filter.graph'
+ cstFilterGraph: 'cst.filter.graph',
+ cstFilterShowInherited: 'cst.filter.show_inherited'
};
/**