From 8bf829513fa15cea1aa6320bc2dd58ea59fb4fad Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:20:52 +0300 Subject: [PATCH] R: Remove unused symbols --- .../src/app/navigation/navigation-context.tsx | 2 +- .../frontend/src/backend/api-transport.ts | 6 +- .../src/components/data-table/data-table.tsx | 2 +- .../components/data-table/use-data-table.ts | 5 +- .../components/dropdown/dropdown-checkbox.tsx | 19 ---- .../src/components/dropdown/index.tsx | 1 - .../components/input/checkbox-tristate.tsx | 2 +- .../frontend/src/components/input/index.tsx | 2 +- .../src/components/input/select-single.tsx | 2 +- .../src/components/input/text-area.tsx | 2 +- .../frontend/src/components/view/index.tsx | 1 - .../src/components/view/text-content.tsx | 2 +- .../src/components/view/value-labeled.tsx | 29 ------- .../src/features/help/models/help-topic.ts | 87 +++++++++---------- .../frontend/src/features/library/labels.ts | 7 -- .../dlg-create-operation.tsx | 2 +- .../dlg-edit-operation/dlg-edit-operation.tsx | 2 +- .../oss/pages/oss-page/oss-edit-context.tsx | 12 +-- .../frontend/src/features/rsform/colors.ts | 16 ---- .../dlg-cst-template/dlg-cst-template.tsx | 2 +- .../dlg-cst-template/template-context.tsx | 2 +- .../dlg-edit-reference/dlg-edit-reference.tsx | 2 +- .../dlg-inline-synthesis.tsx | 2 +- .../src/features/rsform/models/language.ts | 8 -- .../rsform-page/editor-term-graph/tg-flow.tsx | 4 +- .../pages/rsform-page/rsedit-context.tsx | 2 +- .../src/features/users/backend/types.ts | 8 +- rsconcept/frontend/src/stores/dialogs.ts | 4 +- 28 files changed, 67 insertions(+), 168 deletions(-) delete mode 100644 rsconcept/frontend/src/components/dropdown/dropdown-checkbox.tsx delete mode 100644 rsconcept/frontend/src/components/view/value-labeled.tsx diff --git a/rsconcept/frontend/src/app/navigation/navigation-context.tsx b/rsconcept/frontend/src/app/navigation/navigation-context.tsx index fb9fb918..636cc7b2 100644 --- a/rsconcept/frontend/src/app/navigation/navigation-context.tsx +++ b/rsconcept/frontend/src/app/navigation/navigation-context.tsx @@ -22,7 +22,7 @@ interface INavigationContext { setRequireConfirmation: (value: boolean) => void; } -export const NavigationContext = createContext(null); +const NavigationContext = createContext(null); export const useConceptNavigation = () => { const context = use(NavigationContext); if (!context) { diff --git a/rsconcept/frontend/src/backend/api-transport.ts b/rsconcept/frontend/src/backend/api-transport.ts index 26983dc2..ef0add70 100644 --- a/rsconcept/frontend/src/backend/api-transport.ts +++ b/rsconcept/frontend/src/backend/api-transport.ts @@ -33,19 +33,19 @@ axiosInstance.interceptors.request.use(config => { }); // ================ Data transfer types ================ -export interface IFrontRequest { +interface IFrontRequest { data?: RequestData; successMessage?: string | ((data: ResponseData) => string); } -export interface IAxiosRequest { +interface IAxiosRequest { endpoint: string; request?: IFrontRequest; options?: AxiosRequestConfig; schema?: z.ZodType; } -export interface IAxiosGetRequest { +interface IAxiosGetRequest { endpoint: string; options?: AxiosRequestConfig; signal?: AbortSignal; diff --git a/rsconcept/frontend/src/components/data-table/data-table.tsx b/rsconcept/frontend/src/components/data-table/data-table.tsx index 5aa33c02..c2eeb001 100644 --- a/rsconcept/frontend/src/components/data-table/data-table.tsx +++ b/rsconcept/frontend/src/components/data-table/data-table.tsx @@ -21,7 +21,7 @@ import { TableFooter } from './table-footer'; import { TableHeader } from './table-header'; import { useDataTable } from './use-data-table'; -export { type ColumnSort, createColumnHelper, type RowSelectionState, type VisibilityState }; +export { createColumnHelper, type RowSelectionState, type VisibilityState }; /** Style to conditionally apply to rows. */ export interface IConditionalStyle { diff --git a/rsconcept/frontend/src/components/data-table/use-data-table.ts b/rsconcept/frontend/src/components/data-table/use-data-table.ts index de3570a4..9b03370a 100644 --- a/rsconcept/frontend/src/components/data-table/use-data-table.ts +++ b/rsconcept/frontend/src/components/data-table/use-data-table.ts @@ -3,7 +3,6 @@ import { useCallback, useState } from 'react'; import { type ColumnSort, - createColumnHelper, getCoreRowModel, getPaginationRowModel, getSortedRowModel, @@ -17,8 +16,6 @@ import { type VisibilityState } from '@tanstack/react-table'; -export { type ColumnSort, createColumnHelper, type RowSelectionState, type VisibilityState }; - /** Style to conditionally apply to rows. */ export interface IConditionalStyle { /** Callback to determine if the style should be applied. */ @@ -28,7 +25,7 @@ export interface IConditionalStyle { style: React.CSSProperties; } -export interface UseDataTableProps +interface UseDataTableProps extends Pick, 'data' | 'columns' | 'onRowSelectionChange' | 'onColumnVisibilityChange'> { /** Enable row selection. */ enableRowSelection?: boolean; diff --git a/rsconcept/frontend/src/components/dropdown/dropdown-checkbox.tsx b/rsconcept/frontend/src/components/dropdown/dropdown-checkbox.tsx deleted file mode 100644 index dfb0bab6..00000000 --- a/rsconcept/frontend/src/components/dropdown/dropdown-checkbox.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import clsx from 'clsx'; - -import { Checkbox, type CheckboxProps } from '../input'; - -/** Animated {@link Checkbox} inside a {@link Dropdown} item. */ -export function DropdownCheckbox({ onChange: setValue, disabled, ...restProps }: CheckboxProps) { - return ( -
- -
- ); -} diff --git a/rsconcept/frontend/src/components/dropdown/index.tsx b/rsconcept/frontend/src/components/dropdown/index.tsx index ced5b3a7..7dd74fed 100644 --- a/rsconcept/frontend/src/components/dropdown/index.tsx +++ b/rsconcept/frontend/src/components/dropdown/index.tsx @@ -1,4 +1,3 @@ export { Dropdown } from './dropdown'; export { DropdownButton } from './dropdown-button'; -export { DropdownCheckbox } from './dropdown-checkbox'; export { useDropdown } from './use-dropdown'; diff --git a/rsconcept/frontend/src/components/input/checkbox-tristate.tsx b/rsconcept/frontend/src/components/input/checkbox-tristate.tsx index a71e75b9..bf96632f 100644 --- a/rsconcept/frontend/src/components/input/checkbox-tristate.tsx +++ b/rsconcept/frontend/src/components/input/checkbox-tristate.tsx @@ -6,7 +6,7 @@ import { CheckboxChecked, CheckboxNull } from '../icons'; import { type CheckboxProps } from './checkbox'; -export interface CheckboxTristateProps extends Omit { +interface CheckboxTristateProps extends Omit { /** Current value - `null`, `true` or `false`. */ value: boolean | null; diff --git a/rsconcept/frontend/src/components/input/index.tsx b/rsconcept/frontend/src/components/input/index.tsx index 6e0f1d3c..a1683efc 100644 --- a/rsconcept/frontend/src/components/input/index.tsx +++ b/rsconcept/frontend/src/components/input/index.tsx @@ -5,7 +5,7 @@ export { FileInput } from './file-input'; export { Label } from './label'; export { SearchBar } from './search-bar'; export { SelectMulti, type SelectMultiProps } from './select-multi'; -export { SelectSingle, type SelectSingleProps } from './select-single'; +export { SelectSingle } from './select-single'; export { SelectTree } from './select-tree'; export { TextArea } from './text-area'; export { TextInput } from './text-input'; diff --git a/rsconcept/frontend/src/components/input/select-single.tsx b/rsconcept/frontend/src/components/input/select-single.tsx index cd23a6f7..7db90488 100644 --- a/rsconcept/frontend/src/components/input/select-single.tsx +++ b/rsconcept/frontend/src/components/input/select-single.tsx @@ -38,7 +38,7 @@ function ClearIndicator = GroupBase = GroupBase