From ca6249afe0147bb84cd2979f532e8c4e5ed31fe1 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Wed, 2 Jul 2025 12:15:16 +0300 Subject: [PATCH] R: Refactor components to isolate reusable parts --- .../oss-stats.tsx | 14 ++---- .../editor-oss-card/editor-oss-card.tsx | 9 ++-- .../rsform-stats.tsx | 18 ++----- .../view-constituents/constituents-search.tsx | 12 ++--- .../view-constituents/index.tsx | 0 .../view-constituents/select-graph-filter.tsx | 10 ++-- .../view-constituents/select-match-mode.tsx | 10 ++-- .../table-side-constituents.tsx | 28 +++++++---- .../view-constituents/use-filtered-items.tsx | 11 ++--- .../view-constituents/view-constituents.tsx | 49 +++++++++++++++++++ .../editor-constituenta.tsx | 26 ++++++++-- .../editor-rsform-card/editor-rsform-card.tsx | 12 +++-- .../view-constituents/view-constituents.tsx | 40 --------------- 13 files changed, 126 insertions(+), 113 deletions(-) rename rsconcept/frontend/src/features/oss/{pages/oss-page/editor-oss-card => components}/oss-stats.tsx (80%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page/editor-rsform-card => components}/rsform-stats.tsx (87%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/constituents-search.tsx (82%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/index.tsx (100%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/select-graph-filter.tsx (83%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/select-match-mode.tsx (83%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/table-side-constituents.tsx (80%) rename rsconcept/frontend/src/features/rsform/{pages/rsform-page => components}/view-constituents/use-filtered-items.tsx (80%) create mode 100644 rsconcept/frontend/src/features/rsform/components/view-constituents/view-constituents.tsx delete mode 100644 rsconcept/frontend/src/features/rsform/pages/rsform-page/view-constituents/view-constituents.tsx diff --git a/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-card/oss-stats.tsx b/rsconcept/frontend/src/features/oss/components/oss-stats.tsx similarity index 80% rename from rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-card/oss-stats.tsx rename to rsconcept/frontend/src/features/oss/components/oss-stats.tsx index fc726399..87f5e32d 100644 --- a/rsconcept/frontend/src/features/oss/pages/oss-page/editor-oss-card/oss-stats.tsx +++ b/rsconcept/frontend/src/features/oss/components/oss-stats.tsx @@ -9,24 +9,16 @@ import { import { cn } from '@/components/utils'; import { ValueStats } from '@/components/view'; -import { type IOperationSchemaStats } from '../../../models/oss'; +import { type IOperationSchemaStats } from '../models/oss'; interface OssStatsProps { className?: string; - isMounted: boolean; stats: IOperationSchemaStats; } -export function OssStats({ className, isMounted, stats }: OssStatsProps) { +export function OssStats({ className, stats }: OssStatsProps) { return ( -