From 03ade4fee12b6be37733c71a895d7af38a9dd047 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Tue, 12 Aug 2025 22:56:12 +0300 Subject: [PATCH] F: Implement association editing UI and fix dialogs caching --- .../src/components/input/combo-multi.tsx | 100 ++++++++++++------ .../dlg-show-term-graph.tsx | 7 +- .../side-panel/toolbar-schema.tsx | 6 +- .../side-panel/view-schema.tsx | 2 +- .../src/features/rsform/backend/api.ts | 10 +- .../features/rsform/backend/rsform-loader.ts | 14 +++ .../src/features/rsform/backend/types.ts | 14 +-- .../rsform/backend/use-create-association.ts | 4 +- .../rsform/backend/use-delete-association.ts | 4 +- .../components/refs-input/refs-input.tsx | 2 +- .../components/select-multi-constituenta.tsx | 34 ++++++ .../dialogs/dlg-create-cst/dlg-create-cst.tsx | 7 +- .../dlg-cst-template/dlg-cst-template.tsx | 9 +- .../dlg-cst-template/tab-arguments.tsx | 11 +- .../dlg-cst-template/template-state.tsx | 4 +- .../dialogs/dlg-delete-cst/dlg-delete-cst.tsx | 8 +- .../dialogs/dlg-edit-cst/dlg-edit-cst.tsx | 10 +- .../dialogs/dlg-edit-cst/form-edit-cst.tsx | 54 +++++++++- .../dlg-edit-reference/dlg-edit-reference.tsx | 3 +- .../tab-entity-reference.tsx | 4 +- .../dlg-edit-word-forms.tsx | 8 +- .../dlg-inline-synthesis.tsx | 11 +- .../dlg-inline-synthesis/tab-source.tsx | 9 +- .../tab-substitutions.tsx | 10 +- .../rsform/dialogs/dlg-rename-cst.tsx | 14 +-- .../rsform/dialogs/dlg-substitute-cst.tsx | 7 +- .../src/features/rsform/models/rsform.ts | 6 +- .../editor-constituenta.tsx | 13 ++- .../editor-constituenta/form-constituenta.tsx | 67 ++++++++++-- .../pages/rsform-page/menu-edit-schema.tsx | 4 +- .../rsform/pages/rsform-page/rsedit-state.tsx | 6 +- 31 files changed, 344 insertions(+), 118 deletions(-) create mode 100644 rsconcept/frontend/src/features/rsform/components/select-multi-constituenta.tsx diff --git a/rsconcept/frontend/src/components/input/combo-multi.tsx b/rsconcept/frontend/src/components/input/combo-multi.tsx index f6646874..a80bc40e 100644 --- a/rsconcept/frontend/src/components/input/combo-multi.tsx +++ b/rsconcept/frontend/src/components/input/combo-multi.tsx @@ -1,5 +1,7 @@ 'use client'; +import assert from 'assert'; + import { useRef, useState } from 'react'; import { ChevronDownIcon } from 'lucide-react'; @@ -9,20 +11,32 @@ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, Command import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'; import { cn } from '../utils'; -interface ComboMultiProps