From f041bd172e73eb2fd986210602bd8d3b36d63031 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sun, 7 Apr 2024 19:22:19 +0300 Subject: [PATCH] Improve GraphUI. Add sizing parameter --- rsconcept/frontend/src/components/Icons.tsx | 3 + .../frontend/src/components/ui/GraphUI.tsx | 3 +- .../src/components/ui/SelectSingle.tsx | 31 +++---- .../DlgConstituentaTemplate/TemplateTab.tsx | 4 +- .../frontend/src/dialogs/DlgGraphParams.tsx | 2 +- .../frontend/src/models/miscellaneous.ts | 7 +- .../frontend/src/models/miscellaneousAPI.ts | 15 +++- .../EditorTermGraph/EditorTermGraph.tsx | 35 ++++---- .../EditorTermGraph/GraphSelectors.tsx | 47 +++++++---- .../RSFormPage/EditorTermGraph/TermGraph.tsx | 4 +- .../RSFormPage/EditorTermGraph/ViewHidden.tsx | 83 ++++++++++++++----- rsconcept/frontend/src/styling/animations.ts | 21 +++++ rsconcept/frontend/src/styling/color.ts | 4 +- rsconcept/frontend/src/utils/constants.ts | 4 +- rsconcept/frontend/src/utils/labels.ts | 45 ++++++---- rsconcept/frontend/src/utils/selectors.ts | 37 +++------ 16 files changed, 224 insertions(+), 121 deletions(-) diff --git a/rsconcept/frontend/src/components/Icons.tsx b/rsconcept/frontend/src/components/Icons.tsx index 38ca3b44..83bb9a38 100644 --- a/rsconcept/frontend/src/components/Icons.tsx +++ b/rsconcept/frontend/src/components/Icons.tsx @@ -22,6 +22,9 @@ export { LuGlasses as IconReader } from 'react-icons/lu'; export { FiBell as IconFollow } from 'react-icons/fi'; export { FiBellOff as IconFollowOff } from 'react-icons/fi'; +export { LuChevronDown as IconDropArrow } from 'react-icons/lu'; +export { LuChevronUp as IconDropArrowUp } from 'react-icons/lu'; + export { TbColumns as IconList } from 'react-icons/tb'; export { TbColumnsOff as IconListOff } from 'react-icons/tb'; export { BiFontFamily as IconText } from 'react-icons/bi'; diff --git a/rsconcept/frontend/src/components/ui/GraphUI.tsx b/rsconcept/frontend/src/components/ui/GraphUI.tsx index 79686547..5be724fe 100644 --- a/rsconcept/frontend/src/components/ui/GraphUI.tsx +++ b/rsconcept/frontend/src/components/ui/GraphUI.tsx @@ -3,6 +3,7 @@ import { GraphCanvas as GraphUI } from 'reagraph'; -export { type GraphEdge, type GraphNode, type GraphCanvasRef, type LayoutTypes, Sphere, useSelection } from 'reagraph'; +export { type GraphEdge, type GraphNode, type GraphCanvasRef, Sphere, useSelection } from 'reagraph'; +export { type LayoutTypes as GraphLayout } from 'reagraph'; export default GraphUI; diff --git a/rsconcept/frontend/src/components/ui/SelectSingle.tsx b/rsconcept/frontend/src/components/ui/SelectSingle.tsx index f09b4e36..7d4e9c94 100644 --- a/rsconcept/frontend/src/components/ui/SelectSingle.tsx +++ b/rsconcept/frontend/src/components/ui/SelectSingle.tsx @@ -9,10 +9,12 @@ import { selectDarkT, selectLightT } from '@/styling/color'; interface SelectSingleProps = GroupBase