diff --git a/rsconcept/frontend/src/components/DataTable/index.tsx b/rsconcept/frontend/src/components/DataTable/index.tsx index 79fc11e5..1de9ef18 100644 --- a/rsconcept/frontend/src/components/DataTable/index.tsx +++ b/rsconcept/frontend/src/components/DataTable/index.tsx @@ -27,6 +27,7 @@ extends Pick, > { dense?: boolean headPosition?: string + noFooter?: boolean // Disables footer rendering conditionalRowStyles?: IConditionalStyle[] onRowClicked?: (rowData: TData, event: React.MouseEvent) => void onRowDoubleClicked?: (rowData: TData, event: React.MouseEvent) => void @@ -54,7 +55,7 @@ extends Pick, * No sticky header if omitted */ export default function DataTable({ - dense, headPosition, conditionalRowStyles, + dense, headPosition, conditionalRowStyles, noFooter, onRowClicked, onRowDoubleClicked, noDataComponent, enableRowSelection, @@ -115,8 +116,7 @@ export default function DataTable({ className={`clr-app shadow-border`} style={{ top: headPosition, - position: 'sticky', - visibility: !isEmpty ? 'visible' : 'hidden' + position: 'sticky' }} > {tableImpl.getHeaderGroups().map( @@ -183,7 +183,8 @@ export default function DataTable({ ))} - + + {!noFooter && {tableImpl.getFooterGroups().map( (footerGroup: HeaderGroup) => ( @@ -198,7 +199,7 @@ export default function DataTable({ ))} ))} - + } {enablePagination && !isEmpty && diff --git a/rsconcept/frontend/src/components/Help/HelpConstituenta.tsx b/rsconcept/frontend/src/components/Help/HelpConstituenta.tsx index 4b11059d..63063755 100644 --- a/rsconcept/frontend/src/components/Help/HelpConstituenta.tsx +++ b/rsconcept/frontend/src/components/Help/HelpConstituenta.tsx @@ -5,7 +5,7 @@ function HelpConstituenta() { return (

Подсказки

-

Изменения сохраняются ПОСЛЕ нажатия на кнопку снизу или справа вверху

+

Изменения сохраняются ПОСЛЕ нажатия на соответствующую кнопку снизу или по центру

Клик на формальное выражение - обратите внимание на кнопки снизу
Горячие клавиши указаны в подсказках при наведении

Поля Термин и Определение - Ctrl + Пробел открывает диалог редактирования отсылок
Перед открытием диалога переместите текстовый курсор на заменяемое слово или ссылку

Список конституент справа - обратите внимание на настройки фильтрации

diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index 1eb7af54..e2eb5f53 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -270,8 +270,10 @@ export function ArrowRightIcon(props: IconProps) { export function CloneIcon(props: IconProps) { return ( - - + + + + ); } @@ -279,7 +281,8 @@ export function CloneIcon(props: IconProps) { export function DumpBinIcon(props: IconProps) { return ( - + + ); } @@ -295,7 +298,7 @@ export function ArrowsRotateIcon(props: IconProps) { export function SaveIcon(props: IconProps) { return ( - + ); } @@ -303,8 +306,8 @@ export function SaveIcon(props: IconProps) { export function HelpIcon(props: IconProps) { return ( - + ); } diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx index 19ac8d5a..2a008ba1 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx @@ -6,7 +6,7 @@ import MiniButton from '../../components/Common/MiniButton'; import SubmitButton from '../../components/Common/SubmitButton'; import TextArea from '../../components/Common/TextArea'; import HelpConstituenta from '../../components/Help/HelpConstituenta'; -import { DumpBinIcon, HelpIcon, PenIcon, SaveIcon, SmallPlusIcon } from '../../components/Icons'; +import { CloneIcon, DumpBinIcon, HelpIcon, PenIcon, SaveIcon, SmallPlusIcon } from '../../components/Icons'; import RefsInput from '../../components/RefsInput'; import { useRSForm } from '../../context/RSFormContext'; import useWindowSize from '../../hooks/useWindowSize'; @@ -123,6 +123,22 @@ function EditorConstituenta({ onCreateCst(data); } + function handleCloneCst() { + if (!activeID || !schema || !activeCst) { + return; + } + const data: ICstCreateData = { + insert_after: activeID, + cst_type: activeCst.cst_type, + alias: '', + term_raw: activeCst.term_raw, + definition_formal: activeCst.definition_formal, + definition_raw: activeCst.definition_raw, + convention: activeCst.convention, + }; + onCreateCst(data, true); + } + function handleRename() { if (!activeID || !activeCst) { return; @@ -162,7 +178,7 @@ function EditorConstituenta({ icon={} />
-
+
handleSubmit()} /> } /> + } + /> {(windowSize.width ?? 0) >= SIDELIST_HIDE_THRESHOLD && -
+
{ + return !noNavigation ? + 'calc(100vh - 28rem - 4px)' + : 'calc(100vh - 22.2rem - 4px)'; + }, [noNavigation]); + const dismissedStyle = useCallback( (cstID: number) => { return selectedDismissed.includes(cstID) ? {outlineWidth: '2px', outlineStyle: 'solid'}: {}; }, [selectedDismissed]); - return ( -
+ return (<> {showOptions && setShowOptions(false)} initial={getOptions()} onConfirm={handleChangeOptions} />} -
- {hoverCst && -
- -
} - -
-
- Выбор {allSelected.length} из {schema?.stats?.count_all ?? 0} -
-
- } - disabled={!isEditable} - onClick={handleCreateCst} - /> - } - disabled={!isEditable || nothingSelected} - onClick={handleDeleteCst} - /> -
+ +
+
+ } + disabled={!isEditable} + onClick={handleCreateCst} + /> + } + disabled={!isEditable || nothingSelected} + onClick={handleDeleteCst} + /> + } + tooltip='Восстановить камеру' + onClick={handleResetViewpoint} + /> +
+
-
-
+
+ + +
+ +
+
+ +
+
+
+ {hoverCst && +
+ +
} + +
+
+ Выбор {allSelected.length} из {schema?.stats?.count_all ?? 0} +
+
+
+
setColoringScheme(data?.value ?? SelectorGraphColoring[0].value)} + placeholder='Способ расположения' + value={layout ? { value: layout, label: mapLableLayout.get(layout) } : null} + onChange={data => handleChangeLayout(data?.value ?? SelectorGraphLayout[0].value)} /> +
+ setNoTerms(value) } + /> + setNoTransitive(value) } + /> + setOrbit(value) } + /> +
- handleChangeLayout(data?.value ?? SelectorGraphLayout[0].value)} - /> -
- setNoTerms(value) } - /> - setNoTransitive(value) } - /> - setOrbit(value) } - /> -
- - {dismissed.length > 0 && } - {dismissed.length > 0 && -
-

Скрытые конституенты

-
+
+

Скрытые конституенты

+
{dismissed.map(cstID => { const cst = schema!.items.find(cst => cst.id === cstID)!; const adjustedColoring = coloringScheme === 'none' ? 'status': coloringScheme; @@ -452,7 +475,7 @@ function EditorTermGraph({ onOpenEdit, onCreateCst, onDeleteCst }: EditorTermGra
} -
+
-
-
- -
- } - tooltip='Восстановить камеру' - onClick={handleResetViewpoint} - /> -
- -
- -
-
-
); +
); } diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx index ea184f4e..cbd92bd5 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/RSTabs.tsx @@ -30,7 +30,7 @@ import EditorItems from './EditorItems'; import EditorRSForm from './EditorRSForm'; import EditorTermGraph from './EditorTermGraph'; import RSFormStats from './elements/RSFormStats'; -import RSTabsMenu from './RSTabsMenu'; +import RSTabsMenu from './elements/RSTabsMenu'; export enum RSTabID { CARD = 0, diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx b/rsconcept/frontend/src/pages/RSFormPage/elements/RSTabsMenu.tsx similarity index 92% rename from rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx rename to rsconcept/frontend/src/pages/RSFormPage/elements/RSTabsMenu.tsx index cc5dc849..7d13b61b 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/elements/RSTabsMenu.tsx @@ -1,13 +1,13 @@ import { useNavigate } from 'react-router-dom'; -import Button from '../../components/Common/Button'; -import Dropdown from '../../components/Common/Dropdown'; -import DropdownButton from '../../components/Common/DropdownButton'; -import DropdownCheckbox from '../../components/Common/DropdownCheckbox'; -import { CloneIcon, CrownIcon, DownloadIcon, DumpBinIcon, EyeIcon, EyeOffIcon, MenuIcon, PenIcon, PlusIcon, ShareIcon, UploadIcon } from '../../components/Icons'; -import { useAuth } from '../../context/AuthContext'; -import { useRSForm } from '../../context/RSFormContext'; -import useDropdown from '../../hooks/useDropdown'; +import Button from '../../../components/Common/Button'; +import Dropdown from '../../../components/Common/Dropdown'; +import DropdownButton from '../../../components/Common/DropdownButton'; +import DropdownCheckbox from '../../../components/Common/DropdownCheckbox'; +import { CloneIcon, CrownIcon, DownloadIcon, DumpBinIcon, EyeIcon, EyeOffIcon, MenuIcon, PenIcon, PlusIcon, ShareIcon, UploadIcon } from '../../../components/Icons'; +import { useAuth } from '../../../context/AuthContext'; +import { useRSForm } from '../../../context/RSFormContext'; +import useDropdown from '../../../hooks/useDropdown'; interface RSTabsMenuProps { showUploadDialog: () => void diff --git a/rsconcept/frontend/src/pages/RSFormPage/elements/ViewSideConstituents.tsx b/rsconcept/frontend/src/pages/RSFormPage/elements/ViewSideConstituents.tsx index 48ad4df7..a42131a4 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/elements/ViewSideConstituents.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/elements/ViewSideConstituents.tsx @@ -102,7 +102,6 @@ function ViewSideConstituents({ expression, baseHeight, activeID, onOpenEdit }: filtered = applyGraphFilter(schema, activeID, filterSource); } if (filterText) { - console.log(filterText); filtered = filtered.filter((cst) => matchConstituenta(filterText, cst, filterMatch)); } setFilteredData(filtered); @@ -141,6 +140,7 @@ function ViewSideConstituents({ expression, baseHeight, activeID, onOpenEdit }: header: 'Имя', size: 65, minSize: 65, + footer: undefined, cell: props => { const cst = props.row.original; return (<> @@ -282,6 +282,7 @@ function ViewSideConstituents({ expression, baseHeight, activeID, onOpenEdit }: conditionalRowStyles={conditionalRowStyles} headPosition='0' dense + noFooter enableHiding columnVisibility={columnVisibility}