diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index 370ad589..b15dffb1 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -62,7 +62,7 @@ export { VscLibrary as IconLibrary } from 'react-icons/vsc'; export { IoLibrary as IconLibrary2 } from 'react-icons/io5'; export { BiDiamond as IconTemplates } from 'react-icons/bi'; export { GiHoneycomb as IconOSS } from 'react-icons/gi'; -export { LuBaby as IconChild } from 'react-icons/lu'; +export { GrInherit as IconChild } from 'react-icons/gr'; export { RiParentLine as IconParent } from 'react-icons/ri'; export { BiSpa as IconPredecessor } from 'react-icons/bi'; export { RiHexagonLine as IconRSForm } from 'react-icons/ri'; diff --git a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx index a192c1d2..8d0d01ae 100644 --- a/rsconcept/frontend/src/components/info/InfoConstituenta.tsx +++ b/rsconcept/frontend/src/components/info/InfoConstituenta.tsx @@ -14,7 +14,7 @@ function InfoConstituenta({ data, className, ...restProps }: InfoConstituentaPro return (

- Конституента {data.alias} + {data.alias} {data.is_inherited ? ' (наследуется)' : ''}

{data.term_resolved ? ( diff --git a/rsconcept/frontend/src/pages/ManualsPage/items/HelpCstEditor.tsx b/rsconcept/frontend/src/pages/ManualsPage/items/HelpCstEditor.tsx index ef00b3af..b49ce5ef 100644 --- a/rsconcept/frontend/src/pages/ManualsPage/items/HelpCstEditor.tsx +++ b/rsconcept/frontend/src/pages/ManualsPage/items/HelpCstEditor.tsx @@ -1,15 +1,19 @@ import { + IconChild, IconClone, IconControls, IconDestroy, IconEdit, + IconFilter, IconList, IconMoveDown, IconMoveUp, IconNewItem, IconOSS, + IconPredecessor, IconReset, IconSave, + IconSettings, IconStatusOK, IconText, IconTree @@ -23,37 +27,64 @@ function HelpCstEditor() { return (

Редактор конституенты

-
  • - переход к связанной -
  • -
  • - сохранить изменения: Ctrl + S -
  • -
  • - сбросить несохраненные изменения -
  • -
  • - клонировать текущую: Alt + V -
  • -
  • - новая конституента -
  • -
  • - удаление текущей -
  • +
    +
    +
  • + переход к +
  • +
  • + переход к исходной +
  • +
  • + список конституент +
  • +
  • + сохранить: Ctrl + S +
  • +
  • + сбросить изменения +
  • +
  • + клонировать: Alt + V +
  • +
  • + новая конституента +
  • +
  • + удалить +
  • +
    -

    Термин и Текстовое определение

    -
  • - кнопка переименования справа от{' '} - -
  • -
  • - кнопка редактирования словоформ справа от{' '} - -
  • -
  • Ctrl + Пробел открывает редактирование отсылок
  • +
    +

    Список конституент

    +
  • + + Alt + вверх/вниз +
  • +
  • + + фильтрация по графу термов +
  • +
  • + отображение наследованных +
  • +
  • + текущая конституента +
  • +
  • + + текущей + +
  • +
  • + + текущей + +
  • +
    +
    -

    Определение понятия

    +

    Формальное определение

  • индикатор статуса определения сверху
  • @@ -69,26 +100,12 @@ function HelpCstEditor() {
  • Ctrl + Пробел дополняет до незанятого имени
  • -

    Список конституент

    +

    Термин и Текстовое определение

  • - отображение списка конституент -
  • -
  • - - Alt + вверх/вниз – перемещение -
  • -
  • фильтрация в верхней части
  • -
  • - цветом фона выделена текущая конституента -
  • -
  • - цветом фона выделена{' '} - текущей -
  • -
  • - цветом фона выделены{' '} - текущей + редактирование {' '} + /
  • +
  • Ctrl + Пробел открывает редактирование отсылок
  • ); } diff --git a/rsconcept/frontend/src/pages/ManualsPage/items/HelpOssGraph.tsx b/rsconcept/frontend/src/pages/ManualsPage/items/HelpOssGraph.tsx index 9cfe4040..65ae4328 100644 --- a/rsconcept/frontend/src/pages/ManualsPage/items/HelpOssGraph.tsx +++ b/rsconcept/frontend/src/pages/ManualsPage/items/HelpOssGraph.tsx @@ -1,8 +1,100 @@ +import { + IconAnimation, + IconAnimationOff, + IconConnect, + IconDestroy, + IconEdit2, + IconExecute, + IconFitImage, + IconGrid, + IconImage, + IconLineStraight, + IconLineWave, + IconNewItem, + IconReset, + IconRSForm, + IconSave +} from '@/components/Icons'; +import Divider from '@/components/ui/Divider'; +import LinkTopic from '@/components/ui/LinkTopic'; +import { HelpTopic } from '@/models/miscellaneous'; + function HelpOssGraph() { return ( -
    +

    Граф синтеза

    -

    TBD.

    +
    +
    +

    Настройка графа

    +
  • + Вписать в экран +
  • +
  • + Отображение сетки +
  • +
  • + + Тип линии +
  • +
  • + + Анимация +
  • +
    + + + +
    +

    Изменение узлов

    +
  • Клик на операцию – выделение
  • +
  • Esc – сбросить выделение
  • +
  • + Двойной клик – редактирование +
  • +
  • + Новая операция +
  • +
  • + Delete – удалить выбранные +
  • +
    +
    + + + +
    +
    +

    Общие

    +
  • + Сбросить изменения +
  • +
  • + Сохранить положения +
  • +
  • + Сохранить в формат SVG +
  • +
    + + + +
    +

    Контекстное меню

    +
  • + Переход к связанной{' '} + +
  • +
  • + Создать пустую КС для загрузки +
  • +
  • + Выбрать КС для загрузки +
  • +
  • + Выполнить (активировать) операцию +
  • +
    +
    ); } diff --git a/rsconcept/frontend/src/pages/ManualsPage/items/HelpTermGraph.tsx b/rsconcept/frontend/src/pages/ManualsPage/items/HelpTermGraph.tsx index e113d458..d2c46a3c 100644 --- a/rsconcept/frontend/src/pages/ManualsPage/items/HelpTermGraph.tsx +++ b/rsconcept/frontend/src/pages/ManualsPage/items/HelpTermGraph.tsx @@ -26,6 +26,7 @@ function HelpTermGraph() { const { colors } = useConceptOptions(); return (
    +

    Граф термов

    Настройка графа

    @@ -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' }; /**