From edff9b640ac1e1340ee9f36ec3f32211f73bbc4c Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:33:32 +0300 Subject: [PATCH] Implement reference dialog --- .../src/components/Common/TextInput.tsx | 9 +- .../frontend/src/components/RSInput/index.tsx | 2 +- .../components/RefsInput/DlgEditReference.tsx | 304 ++++++++++++++++++ .../components/RefsInput/TermformButton.tsx | 27 ++ .../src/components/RefsInput/index.tsx | 44 ++- rsconcept/frontend/src/models/language.ts | 43 ++- .../src/pages/RSFormPage/DlgCreateCst.tsx | 2 +- .../{DlgEditTerm.tsx => DlgEditWordForms.tsx} | 42 +-- .../pages/RSFormPage/EditorConstituenta.tsx | 2 + .../frontend/src/pages/RSFormPage/RSTabs.tsx | 4 +- rsconcept/frontend/src/utils/codemirror.ts | 25 +- rsconcept/frontend/src/utils/color.ts | 2 +- rsconcept/frontend/src/utils/constants.ts | 3 +- rsconcept/frontend/src/utils/labels.ts | 11 +- rsconcept/frontend/src/utils/selectors.ts | 34 +- 15 files changed, 504 insertions(+), 50 deletions(-) create mode 100644 rsconcept/frontend/src/components/RefsInput/DlgEditReference.tsx create mode 100644 rsconcept/frontend/src/components/RefsInput/TermformButton.tsx rename rsconcept/frontend/src/pages/RSFormPage/{DlgEditTerm.tsx => DlgEditWordForms.tsx} (89%) diff --git a/rsconcept/frontend/src/components/Common/TextInput.tsx b/rsconcept/frontend/src/components/Common/TextInput.tsx index 57a55300..8af9eab2 100644 --- a/rsconcept/frontend/src/components/Common/TextInput.tsx +++ b/rsconcept/frontend/src/components/Common/TextInput.tsx @@ -8,24 +8,27 @@ extends Omit, 'className' | 'title'> dimensions?: string colorClass?: string singleRow?: boolean + noBorder?: boolean } function TextInput({ - id, required, label, singleRow, tooltip, + id, required, label, singleRow, tooltip, noBorder, dimensions = 'w-full', colorClass = 'clr-input', ...props }: TextInputProps) { + const borderClass = noBorder ? '': 'border'; return (
- {label &&