From 7f1669d36d00e7fe414b65e6b9d1c09814ee58e6 Mon Sep 17 00:00:00 2001 From: stijnpotters Date: Tue, 23 Jun 2026 13:35:09 +0200 Subject: [PATCH 1/4] Refactor interfaces to types for improved consistency across the codebase --- .../basic-components/import-button.tsx | 2 +- .../datamapper/forms/add-conditions-form.tsx | 2 +- .../datamapper/forms/add-field-form.tsx | 2 +- .../datamapper/forms/add-mapping-form.tsx | 2 +- .../react-flow/array-group-node.tsx | 2 +- .../react-flow/array-mapping-node.tsx | 2 +- .../react-flow/extra-source-node.tsx | 2 +- .../react-flow/import-schematic-node.tsx | 2 +- .../react-flow/labeled-group-node.tsx | 2 +- .../datamapper/react-flow/mapping-node.tsx | 2 +- .../datamapper/react-flow/node-types.tsx | 2 +- .../datamapper/react-flow/one-edge-node.tsx | 2 +- .../directory-picker/directory-picker.tsx | 2 +- .../file-structure/confirm-delete-dialog.tsx | 2 +- .../file-structure/context-menu.tsx | 2 +- .../file-structure/editor-data-provider.ts | 2 +- .../file-structure/file-tree-dialogs.tsx | 2 +- .../file-structure/inline-rename-input.tsx | 2 +- .../file-structure/name-input-dialog.tsx | 2 +- .../file-structure/studio-context-menu.tsx | 2 +- .../studio-file-tree-dialogs.tsx | 2 +- .../studio-files-data-provider.ts | 4 +-- .../use-file-tree-context-menu.ts | 10 +++---- .../file-structure/use-studio-context-menu.ts | 10 +++---- .../flow/add-subcomponent-modal.tsx | 2 +- .../components/flow/canvas-context-menu.tsx | 2 +- .../app/components/flow/create-node-modal.tsx | 2 +- .../app/components/git/diff-tab-view.tsx | 2 +- .../app/components/git/git-changes.tsx | 2 +- .../app/components/git/git-commit-box.tsx | 2 +- .../frontend/app/components/git/git-panel.tsx | 2 +- .../app/components/git/git-toolbar.tsx | 2 +- .../app/components/inputs/close-button.tsx | 2 +- .../app/components/inputs/dropdown.tsx | 2 +- .../app/components/inputs/icon-button.tsx | 2 +- .../components/inputs/icon-label-button.tsx | 2 +- .../components/inputs/input-with-label.tsx | 2 +- .../app/components/inputs/kebab-menu.tsx | 4 +-- .../app/components/inputs/rounded-toggle.tsx | 2 +- .../components/inputs/segmented-button.tsx | 4 +-- .../app/components/inputs/switch-toggle.tsx | 2 +- .../components/inputs/tree-action-button.tsx | 2 +- .../app/components/loading-spinner.tsx | 2 +- src/main/frontend/app/components/modal.tsx | 2 +- .../app/components/navbar/navbar-link.tsx | 2 +- .../frontend/app/components/search/search.tsx | 2 +- .../sidebars-layout/sidebar-close.tsx | 2 +- .../sidebars-layout/sidebar-layout.tsx | 2 +- .../frontend/app/components/tabs/tabs.tsx | 2 +- src/main/frontend/app/components/toast.tsx | 2 +- src/main/frontend/app/hooks/use-async.ts | 4 +-- .../hooks/use-datamapper-flow-management.ts | 2 +- .../frontend/app/hooks/use-file-watcher.ts | 2 +- .../providers/frankconfig-xsd-provider.tsx | 2 +- .../add-configuration-modal.tsx | 2 +- .../configurations/add-configuration-tile.tsx | 2 +- .../configuration-file-tile.tsx | 4 +-- .../configurations/configuration-overview.tsx | 2 +- .../app/routes/datamapper/initialize.tsx | 2 +- .../app/routes/datamapper/mapping-table.tsx | 2 +- .../app/routes/datamapper/property-list.tsx | 2 +- .../frontend/app/routes/editor/editor.tsx | 6 ++--- .../frontend/app/routes/editor/xml-utils.ts | 4 +-- .../frontend/app/routes/help/help-image.tsx | 2 +- .../app/routes/help/help-topic-tree-items.ts | 2 +- .../frontend/app/routes/help/help-topics.tsx | 2 +- .../routes/projectlanding/action-button.tsx | 2 +- .../clone-configuration-modal.tsx | 2 +- .../projectlanding/configuration-row.tsx | 2 +- .../new-configuration-modal.tsx | 2 +- .../routes/settings/settings-menu-items.ts | 2 +- .../app/routes/settings/settings-menu.tsx | 2 +- .../studio/canvas/edgetypes/frank-edge.tsx | 4 +-- .../studio/canvas/nodetypes/child-node.tsx | 4 +-- .../components/deprecated-popover.tsx | 2 +- .../nodetypes/components/handle-menu-item.tsx | 2 +- .../nodetypes/components/handle-menu.tsx | 2 +- .../canvas/nodetypes/components/handle.tsx | 2 +- .../components/missing-requirements.tsx | 2 +- .../components/node-children-container.tsx | 2 +- .../nodetypes/components/node-header.tsx | 2 +- .../canvas/nodetypes/zoomed-out-node.tsx | 2 +- .../studio/context/context-input-field.tsx | 2 +- .../routes/studio/context/context-input.tsx | 2 +- .../context/deprecated-list-popover.tsx | 2 +- .../studio/context/element-hover-card.tsx | 2 +- .../routes/studio/context/sorted-elements.tsx | 2 +- .../app/routes/studio/flow-to-xml-parser.ts | 4 +-- .../frontend/app/routes/studio/studio.tsx | 2 +- .../app/routes/studio/xml-to-json-parser.ts | 10 +++---- .../frontend/app/services/app-info-service.ts | 2 +- .../frontend/app/services/file-service.ts | 2 +- .../app/services/frank-framework-service.ts | 4 +-- .../frontend/app/stores/editor-tab-store.ts | 8 +++--- src/main/frontend/app/stores/flow-store.ts | 4 +-- src/main/frontend/app/stores/git-store.ts | 2 +- .../frontend/app/stores/node-context-store.ts | 2 +- src/main/frontend/app/stores/project-store.ts | 2 +- .../frontend/app/stores/save-status-store.ts | 2 +- .../frontend/app/stores/settings-store.ts | 12 ++++----- .../frontend/app/stores/shortcut-store.ts | 6 ++--- .../app/stores/sidebar-layout-store.ts | 4 +-- src/main/frontend/app/stores/tab-store.ts | 4 +-- src/main/frontend/app/stores/tree-store.ts | 2 +- .../types/datamapper_types/config-types.ts | 2 +- .../app/types/datamapper_types/data-types.ts | 8 +++--- .../types/datamapper_types/export-types.ts | 14 +++++----- .../types/datamapper_types/function-types.ts | 22 ++++++++-------- .../datamapper_types/react-node-types.ts | 4 +-- .../types/datamapper_types/schema-types.ts | 26 +++++++++---------- .../frontend/app/types/filesystem.types.ts | 6 ++--- src/main/frontend/app/types/git.types.ts | 16 ++++++------ src/main/frontend/app/types/global.d.ts | 4 ++- src/main/frontend/app/types/project.types.ts | 6 ++--- src/main/frontend/app/types/react.d.ts | 7 +++-- src/main/frontend/app/utils/api.ts | 2 +- .../canvas-management-utils.ts | 2 +- .../datamapper_utils/mapping-node-utils.ts | 6 ++--- .../datamapper_utils/property-node-utils.ts | 2 +- src/main/frontend/app/utils/xsd-utils.ts | 10 +++---- src/main/frontend/eslint.config.mjs | 1 + 121 files changed, 213 insertions(+), 207 deletions(-) diff --git a/src/main/frontend/app/components/datamapper/basic-components/import-button.tsx b/src/main/frontend/app/components/datamapper/basic-components/import-button.tsx index a514931d..1fead893 100644 --- a/src/main/frontend/app/components/datamapper/basic-components/import-button.tsx +++ b/src/main/frontend/app/components/datamapper/basic-components/import-button.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx' import Button from '../../inputs/button' import { showErrorToast } from '../../toast' -interface ImportButtonProperties { +type ImportButtonProperties = { fileType: string importFunc: (file: File) => void file: File | null diff --git a/src/main/frontend/app/components/datamapper/forms/add-conditions-form.tsx b/src/main/frontend/app/components/datamapper/forms/add-conditions-form.tsx index 070edf9e..22ceedb9 100644 --- a/src/main/frontend/app/components/datamapper/forms/add-conditions-form.tsx +++ b/src/main/frontend/app/components/datamapper/forms/add-conditions-form.tsx @@ -14,7 +14,7 @@ import type { import conditionConfigJson from '~/utils/datamapper_utils/config/condition-config.json' import { generateConditionName } from '~/utils/datamapper_utils/function-utils' -interface AddConditionFormProperties { +type AddConditionFormProperties = { sources: Source[] onSave: (condition: Condition) => void conditionToEdit?: Condition diff --git a/src/main/frontend/app/components/datamapper/forms/add-field-form.tsx b/src/main/frontend/app/components/datamapper/forms/add-field-form.tsx index 09c4fc0d..da06bdd8 100644 --- a/src/main/frontend/app/components/datamapper/forms/add-field-form.tsx +++ b/src/main/frontend/app/components/datamapper/forms/add-field-form.tsx @@ -13,7 +13,7 @@ import Dropdown from '~/components/inputs/dropdown' import Button from '~/components/inputs/button' import Checkbox from '~/components/inputs/checkbox' -export interface FieldModalProperties { +export type FieldModalProperties = { fieldType: 'source' | 'target' onSave: (data: CustomNodeData) => void parents: NodeLabels[] diff --git a/src/main/frontend/app/components/datamapper/forms/add-mapping-form.tsx b/src/main/frontend/app/components/datamapper/forms/add-mapping-form.tsx index 94612f64..8d6dfe56 100644 --- a/src/main/frontend/app/components/datamapper/forms/add-mapping-form.tsx +++ b/src/main/frontend/app/components/datamapper/forms/add-mapping-form.tsx @@ -12,7 +12,7 @@ import EditButton from '../basic-components/edit-button' import Button from '~/components/inputs/button' import type { Condition, Mutation } from '~/types/datamapper_types/function-types' -export interface MappingModalProps { +export type MappingModalProps = { onSave: (data: MappingNodeData) => void sources: NodeLabels[] targets: NodeLabels[] diff --git a/src/main/frontend/app/components/datamapper/react-flow/array-group-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/array-group-node.tsx index e4a4cf05..e83e5510 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/array-group-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/array-group-node.tsx @@ -5,7 +5,7 @@ import DeleteButton from '../basic-components/delete-button' import clsx from 'clsx' import VariableTypeIcon from '../basic-components/variable-type-icon' -export interface ArrayGroupNodeProperties { +export type ArrayGroupNodeProperties = { id: string data: CustomNodeData variant?: 'source' | 'target' diff --git a/src/main/frontend/app/components/datamapper/react-flow/array-mapping-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/array-mapping-node.tsx index 43ba06af..3c2ad80d 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/array-mapping-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/array-mapping-node.tsx @@ -3,7 +3,7 @@ import type { ArrayNodeData } from '~/types/datamapper_types/react-node-types' import DeleteButton from '../basic-components/delete-button' import { MAPPING_WIDTH } from '~/utils/datamapper_utils/constant' -export interface ArrayMappingNodeProperties { +export type ArrayMappingNodeProperties = { id: string data: ArrayNodeData onClick?: (id: string) => void diff --git a/src/main/frontend/app/components/datamapper/react-flow/extra-source-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/extra-source-node.tsx index 270516f8..b65028f4 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/extra-source-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/extra-source-node.tsx @@ -3,7 +3,7 @@ import type { CustomNodeData } from '~/types/datamapper_types/react-node-types' import HighlightButton from '../basic-components/highlight-button' import DeleteButton from '../basic-components/delete-button' -export interface ExtraSourceNodeProperties { +export type ExtraSourceNodeProperties = { id: string data: CustomNodeData onDelete?: (id: string) => void diff --git a/src/main/frontend/app/components/datamapper/react-flow/import-schematic-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/import-schematic-node.tsx index ebd7830b..75b6ed73 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/import-schematic-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/import-schematic-node.tsx @@ -10,7 +10,7 @@ import clsx from 'clsx' import { showErrorToast } from '~/components/toast' //DataType needed -export interface ImportSchematicNodeprops { +export type ImportSchematicNodeprops = { data: { fileType: string side: 'source' | 'target' diff --git a/src/main/frontend/app/components/datamapper/react-flow/labeled-group-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/labeled-group-node.tsx index 31436b06..44cf0ff7 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/labeled-group-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/labeled-group-node.tsx @@ -6,7 +6,7 @@ import DeleteButton from '../basic-components/delete-button' import VariableTypeIcon from '../basic-components/variable-type-icon' import clsx from 'clsx' -export interface LabeledGroupNodeProperties { +export type LabeledGroupNodeProperties = { id: string data: CustomNodeData onEdit?: (data: CustomNodeData) => void diff --git a/src/main/frontend/app/components/datamapper/react-flow/mapping-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/mapping-node.tsx index 9b2323a5..579a4aed 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/mapping-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/mapping-node.tsx @@ -5,7 +5,7 @@ import EditButton from '../basic-components/edit-button' import { MAPPING_WIDTH } from '~/utils/datamapper_utils/constant' import HoverInfo from '../basic-components/hover-info' -export interface MappingNodeProperties { +export type MappingNodeProperties = { id: string data: MappingNodeData diff --git a/src/main/frontend/app/components/datamapper/react-flow/node-types.tsx b/src/main/frontend/app/components/datamapper/react-flow/node-types.tsx index 3f2e2bce..f0a1158b 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/node-types.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/node-types.tsx @@ -11,7 +11,7 @@ import type { ArrayMappingNodeProperties } from './array-mapping-node' import ArrayMappingNode from './array-mapping-node' import ImportSchematicNode, { type ImportSchematicNodeprops } from './import-schematic-node' -interface GetNodeTypesParameters { +type GetNodeTypesParameters = { flow: ReturnType setReactFlowNodes: Dispatch> setEditingNode: Dispatch> diff --git a/src/main/frontend/app/components/datamapper/react-flow/one-edge-node.tsx b/src/main/frontend/app/components/datamapper/react-flow/one-edge-node.tsx index 3f18f896..38013b89 100644 --- a/src/main/frontend/app/components/datamapper/react-flow/one-edge-node.tsx +++ b/src/main/frontend/app/components/datamapper/react-flow/one-edge-node.tsx @@ -7,7 +7,7 @@ import HighlightButton from '../basic-components/highlight-button' import VariableTypeIcon from '../basic-components/variable-type-icon' import HoverInfo from '../basic-components/hover-info' -export interface OneEdgeNodeProperties { +export type OneEdgeNodeProperties = { id: string data: CustomNodeData variant?: 'source' | 'target' diff --git a/src/main/frontend/app/components/directory-picker/directory-picker.tsx b/src/main/frontend/app/components/directory-picker/directory-picker.tsx index dcc05bc8..36531830 100644 --- a/src/main/frontend/app/components/directory-picker/directory-picker.tsx +++ b/src/main/frontend/app/components/directory-picker/directory-picker.tsx @@ -8,7 +8,7 @@ import { useDirectoryWatcher } from '~/hooks/use-file-watcher' import Button from '../inputs/button' import CloseButton from '../inputs/close-button' -interface DirectoryPickerProperties { +type DirectoryPickerProperties = { onSelect: (absolutePath: string) => void onCancel: () => void rootLabel?: string diff --git a/src/main/frontend/app/components/file-structure/confirm-delete-dialog.tsx b/src/main/frontend/app/components/file-structure/confirm-delete-dialog.tsx index bd1c17b7..929f8f8e 100644 --- a/src/main/frontend/app/components/file-structure/confirm-delete-dialog.tsx +++ b/src/main/frontend/app/components/file-structure/confirm-delete-dialog.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef } from 'react' import { createPortal } from 'react-dom' import Button from '~/components/inputs/button' -interface ConfirmDeleteDialogProps { +type ConfirmDeleteDialogProps = { name: string isFolder: boolean onConfirm: () => void diff --git a/src/main/frontend/app/components/file-structure/context-menu.tsx b/src/main/frontend/app/components/file-structure/context-menu.tsx index 9ae22140..5289034f 100644 --- a/src/main/frontend/app/components/file-structure/context-menu.tsx +++ b/src/main/frontend/app/components/file-structure/context-menu.tsx @@ -2,7 +2,7 @@ import { useRef } from 'react' import { createPortal } from 'react-dom' import { useContextMenuDismiss } from '~/hooks/use-context-menu-dismiss' -interface ContextMenuProps { +type ContextMenuProps = { position: { x: number; y: number } isFolder: boolean isRoot?: boolean diff --git a/src/main/frontend/app/components/file-structure/editor-data-provider.ts b/src/main/frontend/app/components/file-structure/editor-data-provider.ts index 62beca0a..5e47998a 100644 --- a/src/main/frontend/app/components/file-structure/editor-data-provider.ts +++ b/src/main/frontend/app/components/file-structure/editor-data-provider.ts @@ -6,7 +6,7 @@ import { sortChildren } from './tree-utilities' import type { DataProviderLike } from './use-file-tree-context-menu' import { BaseFilesDataProvider } from './base-files-data-provider' -export interface FileNode { +export type FileNode = { name: string path: string projectRoot?: boolean diff --git a/src/main/frontend/app/components/file-structure/file-tree-dialogs.tsx b/src/main/frontend/app/components/file-structure/file-tree-dialogs.tsx index 9d92d427..368cce64 100644 --- a/src/main/frontend/app/components/file-structure/file-tree-dialogs.tsx +++ b/src/main/frontend/app/components/file-structure/file-tree-dialogs.tsx @@ -3,7 +3,7 @@ import NameInputDialog from './name-input-dialog' import ConfirmDeleteDialog from './confirm-delete-dialog' import type { ContextMenuState, NameDialogState, DeleteTargetState } from './use-file-tree-context-menu' -interface FileTreeDialogsProps { +type FileTreeDialogsProps = { contextMenu: ContextMenuState | null nameDialog: NameDialogState | null deleteTarget: DeleteTargetState | null diff --git a/src/main/frontend/app/components/file-structure/inline-rename-input.tsx b/src/main/frontend/app/components/file-structure/inline-rename-input.tsx index 2b841b88..c2397f7e 100644 --- a/src/main/frontend/app/components/file-structure/inline-rename-input.tsx +++ b/src/main/frontend/app/components/file-structure/inline-rename-input.tsx @@ -1,7 +1,7 @@ import type { TreeItemIndex } from 'react-complex-tree' import Input from '~/components/inputs/input' -interface InlineRenameInputProps { +type InlineRenameInputProps = { icon: React.ComponentType<{ className?: string }> value: string onChange: (value: string) => void diff --git a/src/main/frontend/app/components/file-structure/name-input-dialog.tsx b/src/main/frontend/app/components/file-structure/name-input-dialog.tsx index 50871f76..dfbc6aed 100644 --- a/src/main/frontend/app/components/file-structure/name-input-dialog.tsx +++ b/src/main/frontend/app/components/file-structure/name-input-dialog.tsx @@ -22,7 +22,7 @@ export const CONFIGURATION_NAME_PATTERNS: Record = { export const FOLDER_OR_ADAPTER_NAME_PATTERNS: Record = BASE_NAME_PATTERNS -interface NameInputDialogProps { +type NameInputDialogProps = { title: string initialValue?: string submitLabel?: string diff --git a/src/main/frontend/app/components/file-structure/studio-context-menu.tsx b/src/main/frontend/app/components/file-structure/studio-context-menu.tsx index 23ccb534..b677ed06 100644 --- a/src/main/frontend/app/components/file-structure/studio-context-menu.tsx +++ b/src/main/frontend/app/components/file-structure/studio-context-menu.tsx @@ -3,7 +3,7 @@ import { createPortal } from 'react-dom' import { useContextMenuDismiss } from '~/hooks/use-context-menu-dismiss' import type { StudioItemType } from './use-studio-context-menu' -interface StudioContextMenuProps { +type StudioContextMenuProps = { position: { x: number; y: number } itemType: StudioItemType onNewConfiguration: () => void diff --git a/src/main/frontend/app/components/file-structure/studio-file-tree-dialogs.tsx b/src/main/frontend/app/components/file-structure/studio-file-tree-dialogs.tsx index 6ed4d8c5..333b986e 100644 --- a/src/main/frontend/app/components/file-structure/studio-file-tree-dialogs.tsx +++ b/src/main/frontend/app/components/file-structure/studio-file-tree-dialogs.tsx @@ -3,7 +3,7 @@ import NameInputDialog from './name-input-dialog' import ConfirmDeleteDialog from './confirm-delete-dialog' import type { StudioContextMenuState, NameDialogState, DeleteTargetState } from './use-studio-context-menu' -interface StudioFileTreeDialogsProps { +type StudioFileTreeDialogsProps = { contextMenu: StudioContextMenuState | null nameDialog: NameDialogState | null deleteTarget: DeleteTargetState | null diff --git a/src/main/frontend/app/components/file-structure/studio-files-data-provider.ts b/src/main/frontend/app/components/file-structure/studio-files-data-provider.ts index 7bf1f64d..483f8ff0 100644 --- a/src/main/frontend/app/components/file-structure/studio-files-data-provider.ts +++ b/src/main/frontend/app/components/file-structure/studio-files-data-provider.ts @@ -5,12 +5,12 @@ import { fetchProjectTree, fetchStudioDirectoryByPath, fetchAncestorPath } from import type { FileTreeNode } from '~/types/filesystem.types' import { BaseFilesDataProvider } from './base-files-data-provider' -export interface StudioFolderData { +export type StudioFolderData = { name: string path: string adapterNames?: string[] } -export interface StudioAdapterData { +export type StudioAdapterData = { adapterName: string configPath: string adapterPosition: number diff --git a/src/main/frontend/app/components/file-structure/use-file-tree-context-menu.ts b/src/main/frontend/app/components/file-structure/use-file-tree-context-menu.ts index 0b43400e..12d1ff0f 100644 --- a/src/main/frontend/app/components/file-structure/use-file-tree-context-menu.ts +++ b/src/main/frontend/app/components/file-structure/use-file-tree-context-menu.ts @@ -11,7 +11,7 @@ import { FILE_NAME_PATTERNS, FOLDER_OR_ADAPTER_NAME_PATTERNS } from '~/component import { logApiError } from '~/utils/logger' import { openInEditor } from '~/actions/navigationActions' -export interface ContextMenuState { +export type ContextMenuState = { position: { x: number; y: number } itemId: TreeItemIndex isFolder: boolean @@ -20,7 +20,7 @@ export interface ContextMenuState { name: string } -export interface NameDialogState { +export type NameDialogState = { title: string initialValue?: string submitLabel?: string @@ -28,21 +28,21 @@ export interface NameDialogState { patterns?: Record } -export interface DeleteTargetState { +export type DeleteTargetState = { name: string path: string isFolder: boolean parentItemId: TreeItemIndex } -export interface DataProviderLike { +export type DataProviderLike = { getTreeItem( itemId: TreeItemIndex, ): Promise<{ data: { path: string; name: string; projectRoot?: boolean }; isFolder?: boolean } | undefined> reloadDirectory(itemId: TreeItemIndex): Promise } -interface UseFileTreeContextMenuOptions { +type UseFileTreeContextMenuOptions = { projectName: string | undefined dataProvider: DataProviderLike | null configurationsRootPath?: string diff --git a/src/main/frontend/app/components/file-structure/use-studio-context-menu.ts b/src/main/frontend/app/components/file-structure/use-studio-context-menu.ts index ee447bf6..89869bf2 100644 --- a/src/main/frontend/app/components/file-structure/use-studio-context-menu.ts +++ b/src/main/frontend/app/components/file-structure/use-studio-context-menu.ts @@ -17,7 +17,7 @@ import { openInStudio } from '~/actions/navigationActions' export type StudioItemType = 'root' | 'folder' | 'configuration' | 'adapter' | 'file' -export interface StudioContextMenuState { +export type StudioContextMenuState = { position: { x: number; y: number } itemId: TreeItemIndex itemType: StudioItemType @@ -26,7 +26,7 @@ export interface StudioContextMenuState { name: string } -export interface NameDialogState { +export type NameDialogState = { title: string initialValue?: string submitLabel?: string @@ -34,13 +34,13 @@ export interface NameDialogState { patterns?: Record } -export interface DeleteTargetState { +export type DeleteTargetState = { name: string itemType: StudioItemType path: string } -export interface StudioDataProviderLike { +export type StudioDataProviderLike = { getTreeItem(itemId: TreeItemIndex): Promise<{ data: StudioItemData; isFolder?: boolean } | undefined> reloadDirectory(itemId: TreeItemIndex): Promise getRootPath(): string @@ -113,7 +113,7 @@ function removeAdapterTab(configPath: string, adapterName: string): void { } } -interface UseStudioContextMenuOptions { +type UseStudioContextMenuOptions = { projectName: string | undefined dataProvider: StudioDataProviderLike | null } diff --git a/src/main/frontend/app/components/flow/add-subcomponent-modal.tsx b/src/main/frontend/app/components/flow/add-subcomponent-modal.tsx index 5c96b1ed..cbad9e56 100644 --- a/src/main/frontend/app/components/flow/add-subcomponent-modal.tsx +++ b/src/main/frontend/app/components/flow/add-subcomponent-modal.tsx @@ -4,7 +4,7 @@ import Search from '~/components/search/search' import type { ElementDetails } from '@frankframework/doc-library-core' import { useMemo, useState, type ChangeEvent } from 'react' -interface AddSubcomponentModalProps { +type AddSubcomponentModalProps = { isOpen: boolean onClose: () => void possibleChildren: ElementDetails[] diff --git a/src/main/frontend/app/components/flow/canvas-context-menu.tsx b/src/main/frontend/app/components/flow/canvas-context-menu.tsx index 312c0a6c..567b1856 100644 --- a/src/main/frontend/app/components/flow/canvas-context-menu.tsx +++ b/src/main/frontend/app/components/flow/canvas-context-menu.tsx @@ -3,7 +3,7 @@ import { createPortal } from 'react-dom' import { useContextMenuDismiss } from '~/hooks/use-context-menu-dismiss' import { useShortcutStore, formatShortcutParts } from '~/stores/shortcut-store' -interface CanvasContextMenuProps { +type CanvasContextMenuProps = { position: { x: number; y: number } onClose: () => void onAddNote: () => void diff --git a/src/main/frontend/app/components/flow/create-node-modal.tsx b/src/main/frontend/app/components/flow/create-node-modal.tsx index dcc9277b..637bd243 100644 --- a/src/main/frontend/app/components/flow/create-node-modal.tsx +++ b/src/main/frontend/app/components/flow/create-node-modal.tsx @@ -7,7 +7,7 @@ import CloseButton from '../inputs/close-button' import Search from '~/components/search/search' import type { Elements, FFDocJson } from '@frankframework/doc-library-core' -interface CreateNodeModalProperties { +type CreateNodeModalProperties = { isOpen: boolean onClose: () => void addNodeAtPosition: ( diff --git a/src/main/frontend/app/components/git/diff-tab-view.tsx b/src/main/frontend/app/components/git/diff-tab-view.tsx index 642ced2d..db1f115a 100644 --- a/src/main/frontend/app/components/git/diff-tab-view.tsx +++ b/src/main/frontend/app/components/git/diff-tab-view.tsx @@ -62,7 +62,7 @@ function applyHunkDecorations( return modifiedEditor.deltaDecorations(prevDecorations, decorations) } -interface DiffTabViewProps { +type DiffTabViewProps = { diffData: DiffTabData } diff --git a/src/main/frontend/app/components/git/git-changes.tsx b/src/main/frontend/app/components/git/git-changes.tsx index 8fd523aa..ccee2e4f 100644 --- a/src/main/frontend/app/components/git/git-changes.tsx +++ b/src/main/frontend/app/components/git/git-changes.tsx @@ -3,7 +3,7 @@ import clsx from 'clsx' import type { GitStatus, FileHunkState } from '~/types/git.types' import Checkbox from '~/components/inputs/checkbox' -interface GitChangesProps { +type GitChangesProps = { status: GitStatus | null selectedFile: string | null fileHunkStates: Record diff --git a/src/main/frontend/app/components/git/git-commit-box.tsx b/src/main/frontend/app/components/git/git-commit-box.tsx index f8f45ba3..ef21adc3 100644 --- a/src/main/frontend/app/components/git/git-commit-box.tsx +++ b/src/main/frontend/app/components/git/git-commit-box.tsx @@ -1,6 +1,6 @@ import Button from '~/components/inputs/button' -interface GitCommitBoxProps { +type GitCommitBoxProps = { commitMessage: string onMessageChange: (message: string) => void onCommit: () => void diff --git a/src/main/frontend/app/components/git/git-panel.tsx b/src/main/frontend/app/components/git/git-panel.tsx index 90aa7c37..60375f83 100644 --- a/src/main/frontend/app/components/git/git-panel.tsx +++ b/src/main/frontend/app/components/git/git-panel.tsx @@ -17,7 +17,7 @@ import GitToolbar from './git-toolbar' import GitChanges from './git-changes' import GitCommitBox from './git-commit-box' -interface GitPanelProps { +type GitPanelProps = { projectName: string hasStoredToken: boolean } diff --git a/src/main/frontend/app/components/git/git-toolbar.tsx b/src/main/frontend/app/components/git/git-toolbar.tsx index 2d0e51b3..ea32914b 100644 --- a/src/main/frontend/app/components/git/git-toolbar.tsx +++ b/src/main/frontend/app/components/git/git-toolbar.tsx @@ -9,7 +9,7 @@ import AltArrowDownIcon from '/icons/solar/Alt Arrow Down.svg?react' import AltArrowUpIcon from '/icons/solar/Alt Arrow Up.svg?react' import KeyIcon from '/icons/solar/Key.svg?react' -interface GitToolbarProps { +type GitToolbarProps = { status: GitStatus | null onRefresh: () => void onPush: () => void diff --git a/src/main/frontend/app/components/inputs/close-button.tsx b/src/main/frontend/app/components/inputs/close-button.tsx index 808c6cee..ab32e9b6 100644 --- a/src/main/frontend/app/components/inputs/close-button.tsx +++ b/src/main/frontend/app/components/inputs/close-button.tsx @@ -2,7 +2,7 @@ import React from 'react' import CloseIcon from '/icons/custom/Close.svg?react' import IconButton from '~/components/inputs/icon-button' -interface CloseButtonProps { +type CloseButtonProps = { onClick?: (event: React.MouseEvent) => void className?: string } diff --git a/src/main/frontend/app/components/inputs/dropdown.tsx b/src/main/frontend/app/components/inputs/dropdown.tsx index 8cb911a0..cf0dd667 100644 --- a/src/main/frontend/app/components/inputs/dropdown.tsx +++ b/src/main/frontend/app/components/inputs/dropdown.tsx @@ -4,7 +4,7 @@ import AltArrowDownIcon from '/icons/solar/Alt Arrow Down.svg?react' export type DropdownOptions = Record -export interface DropdownProperties { +export type DropdownProperties = { options: DropdownOptions onChange: (value: string) => void value?: string diff --git a/src/main/frontend/app/components/inputs/icon-button.tsx b/src/main/frontend/app/components/inputs/icon-button.tsx index df1f77dd..20cd8763 100644 --- a/src/main/frontend/app/components/inputs/icon-button.tsx +++ b/src/main/frontend/app/components/inputs/icon-button.tsx @@ -1,7 +1,7 @@ import React from 'react' import clsx from 'clsx' -interface IconButtonProps { +type IconButtonProps = { title?: string onClick?: (event: React.MouseEvent) => void onContextMenu?: (event: React.MouseEvent) => void diff --git a/src/main/frontend/app/components/inputs/icon-label-button.tsx b/src/main/frontend/app/components/inputs/icon-label-button.tsx index fea20856..27b05edb 100644 --- a/src/main/frontend/app/components/inputs/icon-label-button.tsx +++ b/src/main/frontend/app/components/inputs/icon-label-button.tsx @@ -1,7 +1,7 @@ import React from 'react' import clsx from 'clsx' -interface IconLabelButtonProps { +type IconLabelButtonProps = { icon: React.ReactNode label: string onClick?: (event: React.MouseEvent) => void diff --git a/src/main/frontend/app/components/inputs/input-with-label.tsx b/src/main/frontend/app/components/inputs/input-with-label.tsx index 6c8d6fd6..218380df 100644 --- a/src/main/frontend/app/components/inputs/input-with-label.tsx +++ b/src/main/frontend/app/components/inputs/input-with-label.tsx @@ -1,6 +1,6 @@ import React from 'react' -interface InputWithLabelProperties { +type InputWithLabelProperties = { htmlFor: string label: string description?: string diff --git a/src/main/frontend/app/components/inputs/kebab-menu.tsx b/src/main/frontend/app/components/inputs/kebab-menu.tsx index 828f6843..cf792f4d 100644 --- a/src/main/frontend/app/components/inputs/kebab-menu.tsx +++ b/src/main/frontend/app/components/inputs/kebab-menu.tsx @@ -3,14 +3,14 @@ import { createPortal } from 'react-dom' import clsx from 'clsx' import KebabIcon from '/icons/solar/Kebab Vertical.svg?react' -export interface KebabMenuItem { +export type KebabMenuItem = { label: string icon?: ReactNode onClick: () => void className?: string } -interface KebabMenuProperties { +type KebabMenuProperties = { items: KebabMenuItem[] triggerClassName?: string } diff --git a/src/main/frontend/app/components/inputs/rounded-toggle.tsx b/src/main/frontend/app/components/inputs/rounded-toggle.tsx index d68f1ec5..23859e27 100644 --- a/src/main/frontend/app/components/inputs/rounded-toggle.tsx +++ b/src/main/frontend/app/components/inputs/rounded-toggle.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx' -interface RoundedToggleProperties { +type RoundedToggleProperties = { label: string enabled?: boolean onClick?: () => void diff --git a/src/main/frontend/app/components/inputs/segmented-button.tsx b/src/main/frontend/app/components/inputs/segmented-button.tsx index 0761383c..358612de 100644 --- a/src/main/frontend/app/components/inputs/segmented-button.tsx +++ b/src/main/frontend/app/components/inputs/segmented-button.tsx @@ -1,9 +1,9 @@ import React from 'react' import clsx from 'clsx' -interface SegmentedButtonProperties extends React.ButtonHTMLAttributes { +type SegmentedButtonProperties = { isActive?: boolean -} +} & React.ButtonHTMLAttributes export default function SegmentedButton({ isActive = false, diff --git a/src/main/frontend/app/components/inputs/switch-toggle.tsx b/src/main/frontend/app/components/inputs/switch-toggle.tsx index c0c3d177..51186f7f 100644 --- a/src/main/frontend/app/components/inputs/switch-toggle.tsx +++ b/src/main/frontend/app/components/inputs/switch-toggle.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react' import clsx from 'clsx' -interface SwitchToggleProperties { +type SwitchToggleProperties = { options: [string, string] // Left and right labels value?: string onChange: (value: string) => void diff --git a/src/main/frontend/app/components/inputs/tree-action-button.tsx b/src/main/frontend/app/components/inputs/tree-action-button.tsx index e743eb7c..b72268c4 100644 --- a/src/main/frontend/app/components/inputs/tree-action-button.tsx +++ b/src/main/frontend/app/components/inputs/tree-action-button.tsx @@ -1,7 +1,7 @@ import React from 'react' import IconButton from '~/components/inputs/icon-button' -interface TreeActionButtonProps { +type TreeActionButtonProps = { title: string onAction: () => void children: React.ReactNode diff --git a/src/main/frontend/app/components/loading-spinner.tsx b/src/main/frontend/app/components/loading-spinner.tsx index 08cf75b6..b4cafbb9 100644 --- a/src/main/frontend/app/components/loading-spinner.tsx +++ b/src/main/frontend/app/components/loading-spinner.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx' -interface LoadingSpinnerProperties { +type LoadingSpinnerProperties = { size?: 'sm' | 'md' | 'lg' message?: string className?: string diff --git a/src/main/frontend/app/components/modal.tsx b/src/main/frontend/app/components/modal.tsx index 69401a07..2946cef6 100644 --- a/src/main/frontend/app/components/modal.tsx +++ b/src/main/frontend/app/components/modal.tsx @@ -4,7 +4,7 @@ import { useTheme } from '~/hooks/use-theme' import CloseButton from './datamapper/basic-components/close-button' -interface ModalProperties { +type ModalProperties = { isOpen: boolean onClose: () => void title?: string diff --git a/src/main/frontend/app/components/navbar/navbar-link.tsx b/src/main/frontend/app/components/navbar/navbar-link.tsx index c3d7a6a3..86d3e617 100644 --- a/src/main/frontend/app/components/navbar/navbar-link.tsx +++ b/src/main/frontend/app/components/navbar/navbar-link.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx' import React from 'react' import { useMatch, useNavigate } from 'react-router' -interface NavbarLinkProperties { +type NavbarLinkProperties = { route: string label: string Icon?: React.FC> diff --git a/src/main/frontend/app/components/search/search.tsx b/src/main/frontend/app/components/search/search.tsx index f5477f2e..d2f0fb14 100644 --- a/src/main/frontend/app/components/search/search.tsx +++ b/src/main/frontend/app/components/search/search.tsx @@ -2,7 +2,7 @@ import React, { useId } from 'react' import MagnifierIcon from '/icons/solar/Magnifier.svg?react' import Input from '~/components/inputs/input' -interface SearchProperties { +type SearchProperties = { id?: string type?: string placeholder?: string diff --git a/src/main/frontend/app/components/sidebars-layout/sidebar-close.tsx b/src/main/frontend/app/components/sidebars-layout/sidebar-close.tsx index 90a0454a..20adede2 100644 --- a/src/main/frontend/app/components/sidebars-layout/sidebar-close.tsx +++ b/src/main/frontend/app/components/sidebars-layout/sidebar-close.tsx @@ -5,7 +5,7 @@ import { useContext } from 'react' import { SidebarContext } from '~/components/sidebars-layout/sidebar-layout' import IconButton from '~/components/inputs/icon-button' -export interface SidebarsCloseProperties { +export type SidebarsCloseProperties = { side: SidebarSide } diff --git a/src/main/frontend/app/components/sidebars-layout/sidebar-layout.tsx b/src/main/frontend/app/components/sidebars-layout/sidebar-layout.tsx index e42c9cb4..b6a13470 100644 --- a/src/main/frontend/app/components/sidebars-layout/sidebar-layout.tsx +++ b/src/main/frontend/app/components/sidebars-layout/sidebar-layout.tsx @@ -4,7 +4,7 @@ import { SidebarSide, useSidebarStore, type VisibilityState } from '~/stores/sid export const SidebarContext = createContext(undefined) -interface SidebarLayoutProperties { +type SidebarLayoutProperties = { children: React.ReactNode name: string defaultVisible?: VisibilityState diff --git a/src/main/frontend/app/components/tabs/tabs.tsx b/src/main/frontend/app/components/tabs/tabs.tsx index d22dddeb..44cc8343 100644 --- a/src/main/frontend/app/components/tabs/tabs.tsx +++ b/src/main/frontend/app/components/tabs/tabs.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef } from 'react' import Tab from './tab' import type { TabData } from '~/stores/tab-store' -interface TabsViewProps { +type TabsViewProps = { tabs: Record activeTab: T | null onSelectTab: (key: T) => void diff --git a/src/main/frontend/app/components/toast.tsx b/src/main/frontend/app/components/toast.tsx index bcee8475..b6ce8bf1 100644 --- a/src/main/frontend/app/components/toast.tsx +++ b/src/main/frontend/app/components/toast.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react' import { createPortal } from 'react-dom' import { useTheme } from '~/hooks/use-theme' -interface ToastOptions { +type ToastOptions = { type: 'ERROR' | 'WARNING' | 'INFO' | 'SUCCESS' title?: string message: string diff --git a/src/main/frontend/app/hooks/use-async.ts b/src/main/frontend/app/hooks/use-async.ts index 6138decc..3d5a11e1 100644 --- a/src/main/frontend/app/hooks/use-async.ts +++ b/src/main/frontend/app/hooks/use-async.ts @@ -1,11 +1,11 @@ import { useCallback, useEffect, useRef, useState } from 'react' -interface UseAsyncOptions { +type UseAsyncOptions = { enabled?: boolean key?: string | number | null } -interface UseAsyncResult { +type UseAsyncResult = { data: T | null isLoading: boolean error: Error | null diff --git a/src/main/frontend/app/hooks/use-datamapper-flow-management.ts b/src/main/frontend/app/hooks/use-datamapper-flow-management.ts index 3fff48b9..40ce70ab 100644 --- a/src/main/frontend/app/hooks/use-datamapper-flow-management.ts +++ b/src/main/frontend/app/hooks/use-datamapper-flow-management.ts @@ -25,7 +25,7 @@ import { generateImportButton, importJsonSchema, importXsdSchema } from '~/utils import { deleteMappingNode } from '~/utils/datamapper_utils/mapping-node-utils' import { showErrorToast } from '~/components/toast' -interface UseFlowManagementProperties { +type UseFlowManagementProperties = { reactFlowInstance: ReactFlowInstance config: MappingListConfig setReactFlowNodes: Dispatch> diff --git a/src/main/frontend/app/hooks/use-file-watcher.ts b/src/main/frontend/app/hooks/use-file-watcher.ts index 063e01bb..fdd361bb 100644 --- a/src/main/frontend/app/hooks/use-file-watcher.ts +++ b/src/main/frontend/app/hooks/use-file-watcher.ts @@ -1,7 +1,7 @@ import { useEffect, useRef } from 'react' import { apiUrl } from '~/utils/api' -interface WatcherEntry { +type WatcherEntry = { source: EventSource handlers: Set<() => void> closeTimer: ReturnType | null diff --git a/src/main/frontend/app/providers/frankconfig-xsd-provider.tsx b/src/main/frontend/app/providers/frankconfig-xsd-provider.tsx index 2173e55f..41058fd5 100644 --- a/src/main/frontend/app/providers/frankconfig-xsd-provider.tsx +++ b/src/main/frontend/app/providers/frankconfig-xsd-provider.tsx @@ -3,7 +3,7 @@ import { fetchFrankConfigXsd } from '~/services/xsd-service' import { parseXsd } from '~/utils/xsd-utils' import { logApiWarning } from '~/utils/logger' -interface FrankConfigXsdContextValue { +type FrankConfigXsdContextValue = { xsdContent: string | null xsdDoc: Document | null } diff --git a/src/main/frontend/app/routes/configurations/add-configuration-modal.tsx b/src/main/frontend/app/routes/configurations/add-configuration-modal.tsx index 69a7066a..13dd345d 100644 --- a/src/main/frontend/app/routes/configurations/add-configuration-modal.tsx +++ b/src/main/frontend/app/routes/configurations/add-configuration-modal.tsx @@ -8,7 +8,7 @@ import Input from '~/components/inputs/input' import DirectoryPicker from '~/components/directory-picker/directory-picker' import { fetchProject } from '~/services/project-service' -interface AddConfigurationModalProperties { +type AddConfigurationModalProperties = { isOpen: boolean onClose: () => void onSuccess?: () => void diff --git a/src/main/frontend/app/routes/configurations/add-configuration-tile.tsx b/src/main/frontend/app/routes/configurations/add-configuration-tile.tsx index 58068abc..80c91e34 100644 --- a/src/main/frontend/app/routes/configurations/add-configuration-tile.tsx +++ b/src/main/frontend/app/routes/configurations/add-configuration-tile.tsx @@ -1,4 +1,4 @@ -interface AddConfigurationTileProertiess { +type AddConfigurationTileProertiess = { onClick?: () => void } diff --git a/src/main/frontend/app/routes/configurations/configuration-file-tile.tsx b/src/main/frontend/app/routes/configurations/configuration-file-tile.tsx index 83551dc6..737c2335 100644 --- a/src/main/frontend/app/routes/configurations/configuration-file-tile.tsx +++ b/src/main/frontend/app/routes/configurations/configuration-file-tile.tsx @@ -8,7 +8,7 @@ import IconLabelButton from '~/components/inputs/icon-label-button' import ConfirmDeleteDialog from '~/components/file-structure/confirm-delete-dialog' import { useState } from 'react' -interface ConfigurationFileTileProperties { +type ConfigurationFileTileProperties = { filepath: string relativePath: string adapterNames: string[] @@ -92,7 +92,7 @@ export default function ConfigurationFileTile({ ) } -interface AdapterListItemProperties { +type AdapterListItemProperties = { name: string adapterPosition: number onOpenInStudio: (name: string, adapterPosition: number) => void diff --git a/src/main/frontend/app/routes/configurations/configuration-overview.tsx b/src/main/frontend/app/routes/configurations/configuration-overview.tsx index b415534c..143e17a7 100644 --- a/src/main/frontend/app/routes/configurations/configuration-overview.tsx +++ b/src/main/frontend/app/routes/configurations/configuration-overview.tsx @@ -13,7 +13,7 @@ import Button from '~/components/inputs/button' import Search from '~/components/search/search' import { normalizePath, toRelativePath } from '~/utils/path-utils' -interface ConfigurationFile { +type ConfigurationFile = { path: string relativePath: string adapterNames: string[] diff --git a/src/main/frontend/app/routes/datamapper/initialize.tsx b/src/main/frontend/app/routes/datamapper/initialize.tsx index 23c57856..9f9d766b 100644 --- a/src/main/frontend/app/routes/datamapper/initialize.tsx +++ b/src/main/frontend/app/routes/datamapper/initialize.tsx @@ -6,7 +6,7 @@ import type { MappingListConfig } from '~/types/datamapper_types/config-types' import type { DataTypeSchema } from '~/types/datamapper_types/data-types' import datatypesJson from '~/utils/datamapper_utils/config/data-types.json' -interface InitializeProperties { +type InitializeProperties = { config: MappingListConfig configDispatch: Dispatch confirmed: boolean diff --git a/src/main/frontend/app/routes/datamapper/mapping-table.tsx b/src/main/frontend/app/routes/datamapper/mapping-table.tsx index d6db5482..ece4ad34 100644 --- a/src/main/frontend/app/routes/datamapper/mapping-table.tsx +++ b/src/main/frontend/app/routes/datamapper/mapping-table.tsx @@ -13,7 +13,7 @@ import DeleteButton from '~/components/datamapper/basic-components/delete-button import { getNodesByTypeAndId } from '~/utils/datamapper_utils/property-node-utils' import { flowToMappingTable } from '~/utils/datamapper_utils/conversion-utils' -interface PropertyListProperties { +type PropertyListProperties = { config: MappingListConfig configDispatch: Dispatch } diff --git a/src/main/frontend/app/routes/datamapper/property-list.tsx b/src/main/frontend/app/routes/datamapper/property-list.tsx index d416dda9..bc3cb5b8 100644 --- a/src/main/frontend/app/routes/datamapper/property-list.tsx +++ b/src/main/frontend/app/routes/datamapper/property-list.tsx @@ -33,7 +33,7 @@ import { updateCanvasSize } from '~/utils/datamapper_utils/canvas-management-uti import { getNodesByTypeAndId } from '~/utils/datamapper_utils/property-node-utils' import type { MappingListConfig } from '~/types/datamapper_types/config-types' -interface PropertyListProperties { +type PropertyListProperties = { config: MappingListConfig configDispatch: Dispatch } diff --git a/src/main/frontend/app/routes/editor/editor.tsx b/src/main/frontend/app/routes/editor/editor.tsx index 44ae59e7..c9ae2024 100644 --- a/src/main/frontend/app/routes/editor/editor.tsx +++ b/src/main/frontend/app/routes/editor/editor.tsx @@ -43,20 +43,20 @@ import { import { openInStudioAtNode } from '~/actions/navigationActions' type LeftTab = 'files' | 'git' -export interface ValidationError { +export type ValidationError = { message: string lineNumber: number startColumn: number endColumn: number } -export interface TextModel { +export type TextModel = { getLineContent: (n: number) => string getLineCount: () => number getLineMaxColumn: (n: number) => number } -interface CachedFile { +type CachedFile = { content: string type: string } diff --git a/src/main/frontend/app/routes/editor/xml-utils.ts b/src/main/frontend/app/routes/editor/xml-utils.ts index c52f8cdc..3ec736ba 100644 --- a/src/main/frontend/app/routes/editor/xml-utils.ts +++ b/src/main/frontend/app/routes/editor/xml-utils.ts @@ -1,9 +1,9 @@ -export interface AdapterLocation { +export type AdapterLocation = { name: string offset: number } -export interface FrankElementLocation { +export type FrankElementLocation = { subtype: string name: string startLine: number diff --git a/src/main/frontend/app/routes/help/help-image.tsx b/src/main/frontend/app/routes/help/help-image.tsx index ed7ff2f0..333cc309 100644 --- a/src/main/frontend/app/routes/help/help-image.tsx +++ b/src/main/frontend/app/routes/help/help-image.tsx @@ -1,6 +1,6 @@ import React from 'react' -interface HelpImageProps { +type HelpImageProps = { src: string alt?: string caption?: string diff --git a/src/main/frontend/app/routes/help/help-topic-tree-items.ts b/src/main/frontend/app/routes/help/help-topic-tree-items.ts index 99449d8b..17fda468 100644 --- a/src/main/frontend/app/routes/help/help-topic-tree-items.ts +++ b/src/main/frontend/app/routes/help/help-topic-tree-items.ts @@ -6,7 +6,7 @@ import React from 'react' export type HelpTopicTreeItem = TreeItem -export interface HelpTopicTreeItemData { +export type HelpTopicTreeItemData = { title: string description: string content?: React.FC diff --git a/src/main/frontend/app/routes/help/help-topics.tsx b/src/main/frontend/app/routes/help/help-topics.tsx index f95edb2e..3df11974 100644 --- a/src/main/frontend/app/routes/help/help-topics.tsx +++ b/src/main/frontend/app/routes/help/help-topics.tsx @@ -13,7 +13,7 @@ import { useNavigate } from 'react-router' import helpTopics, { type HelpTopicTreeItem } from './help-topic-tree-items' import '/styles/editor-files.css' -interface HelpCategoriesProperties { +type HelpCategoriesProperties = { selectedTopic: keyof typeof helpTopics } diff --git a/src/main/frontend/app/routes/projectlanding/action-button.tsx b/src/main/frontend/app/routes/projectlanding/action-button.tsx index 1da10bd3..ea09af54 100644 --- a/src/main/frontend/app/routes/projectlanding/action-button.tsx +++ b/src/main/frontend/app/routes/projectlanding/action-button.tsx @@ -1,7 +1,7 @@ import React from 'react' import Button from '~/components/inputs/button' -interface ActionButtonProperties { +type ActionButtonProperties = { onClick?: React.MouseEventHandler label: string className?: string diff --git a/src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx b/src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx index 5ccdfb12..da25df1d 100644 --- a/src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx +++ b/src/main/frontend/app/routes/projectlanding/clone-configuration-modal.tsx @@ -5,7 +5,7 @@ import CloseButton from '~/components/inputs/close-button' import Input from '~/components/inputs/input' import { filesystemService } from '~/services/filesystem-service' -interface CloneProjectModalProperties { +type CloneProjectModalProperties = { isLocal: boolean onClose: () => void onClone: (repoUrl: string, localPath: string, token?: string) => void diff --git a/src/main/frontend/app/routes/projectlanding/configuration-row.tsx b/src/main/frontend/app/routes/projectlanding/configuration-row.tsx index aa0e9fc9..db848103 100644 --- a/src/main/frontend/app/routes/projectlanding/configuration-row.tsx +++ b/src/main/frontend/app/routes/projectlanding/configuration-row.tsx @@ -3,7 +3,7 @@ import TrashBinIcon from '/icons/solar/Trash Bin.svg?react' import type { RecentConfigurationProject } from '~/types/project.types' import KebabMenu, { type KebabMenuItem } from '~/components/inputs/kebab-menu' -interface ConfigurationRowProperties { +type ConfigurationRowProperties = { project: RecentConfigurationProject isLocal: boolean onClick: () => void diff --git a/src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx b/src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx index cfaf6225..4a2352db 100644 --- a/src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx +++ b/src/main/frontend/app/routes/projectlanding/new-configuration-modal.tsx @@ -5,7 +5,7 @@ import CloseButton from '~/components/inputs/close-button' import Input from '~/components/inputs/input' import { filesystemService } from '~/services/filesystem-service' -interface NewProjectModalProperties { +type NewProjectModalProperties = { isLocal: boolean onClose: () => void onCreate: (name: string, rootPath: string) => void diff --git a/src/main/frontend/app/routes/settings/settings-menu-items.ts b/src/main/frontend/app/routes/settings/settings-menu-items.ts index 9316dd68..1e8bcea0 100644 --- a/src/main/frontend/app/routes/settings/settings-menu-items.ts +++ b/src/main/frontend/app/routes/settings/settings-menu-items.ts @@ -8,7 +8,7 @@ import ProjectSettings from './pages/project-settings' export type SettingsMenuItem = TreeItem -export interface SettingsMenuItemData { +export type SettingsMenuItemData = { title: string description: string icon?: React.FC diff --git a/src/main/frontend/app/routes/settings/settings-menu.tsx b/src/main/frontend/app/routes/settings/settings-menu.tsx index 709fc0ad..34d6f00d 100644 --- a/src/main/frontend/app/routes/settings/settings-menu.tsx +++ b/src/main/frontend/app/routes/settings/settings-menu.tsx @@ -13,7 +13,7 @@ import settingsCategories, { type SettingsMenuItem } from './settings-menu-items import '/styles/editor-files.css' import SettingsIcon from '/icons/solar/Settings.svg?react' -interface SettingsMenuProperties { +type SettingsMenuProperties = { selectedCategory: keyof typeof settingsCategories onSelectedCategory: (category: keyof typeof settingsCategories) => void } diff --git a/src/main/frontend/app/routes/studio/canvas/edgetypes/frank-edge.tsx b/src/main/frontend/app/routes/studio/canvas/edgetypes/frank-edge.tsx index 93358c5a..c17de12b 100644 --- a/src/main/frontend/app/routes/studio/canvas/edgetypes/frank-edge.tsx +++ b/src/main/frontend/app/routes/studio/canvas/edgetypes/frank-edge.tsx @@ -1,7 +1,7 @@ import { BaseEdge, EdgeLabelRenderer, getBezierPath, type Position } from '@xyflow/react' import useFlowStore from '~/stores/flow-store' -export interface FrankEdgeProperties { +export type FrankEdgeProperties = { id: string source: string target: string @@ -35,7 +35,7 @@ export default function FrankEdge({ const node = state.nodes.find((n) => n.id === source) if (!node?.data) return '' - interface NodeData { + type NodeData = { sourceHandles?: { type: string; index: number }[] } const typedData = node?.data as NodeData diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/child-node.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/child-node.tsx index ca3dc14e..62926081 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/child-node.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/child-node.tsx @@ -9,7 +9,7 @@ import { getAllowedChildElementsForElement } from '~/utils/xsd-utils' import { NodeHeader } from './components/node-header' import { NodeChildrenContainer } from './components/node-children-container' -export interface ChildNode { +export type ChildNode = { id: string subtype: string type: string @@ -19,7 +19,7 @@ export interface ChildNode { children?: ChildNode[] } -interface ChildNodeProperties { +type ChildNodeProperties = { child: ChildNode gradientEnabled: boolean onEdit: (id: string) => void diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/deprecated-popover.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/deprecated-popover.tsx index 8400f6c0..aa6f348a 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/deprecated-popover.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/deprecated-popover.tsx @@ -1,6 +1,6 @@ import { createPortal } from 'react-dom' -export interface DeprecatedInfo { +export type DeprecatedInfo = { since?: string forRemoval?: boolean description?: string diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu-item.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu-item.tsx index 8855f5f2..a2071a13 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu-item.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu-item.tsx @@ -1,4 +1,4 @@ -export interface HandleMenuItemProperties { +export type HandleMenuItemProperties = { label: string iconColor?: string onClick: () => void diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu.tsx index 87510914..763d32b7 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle-menu.tsx @@ -5,7 +5,7 @@ import type { ElementProperty } from '@frankframework/doc-library-core' import { useHandleTypes } from '~/hooks/use-handle-types' import { createPortal } from 'react-dom' -interface HandleMenuProperties { +type HandleMenuProperties = { title: string position: { x: number; y: number } onClose: () => void diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle.tsx index b8979921..f57efc7d 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/handle.tsx @@ -3,7 +3,7 @@ import { useState } from 'react' import type { ElementProperty } from '@frankframework/doc-library-core' import HandleMenu from './handle-menu' -interface HandleProperties { +type HandleProperties = { type: string index: number firstHandlePosition: number diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/missing-requirements.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/missing-requirements.tsx index 20c9a84c..18b5ae5f 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/missing-requirements.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/missing-requirements.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' -interface MissingRequirementsProps { +type MissingRequirementsProps = { missingChildren: string[] isFulfilled: boolean } diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-children-container.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-children-container.tsx index eef0f90b..1b1a4a46 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-children-container.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-children-container.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx' import type { ReactNode } from 'react' -interface NodeChildrenContainerProperties { +type NodeChildrenContainerProperties = { className?: string children: ReactNode } diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-header.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-header.tsx index 1e6bc1f7..8aaa9172 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-header.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/components/node-header.tsx @@ -1,7 +1,7 @@ import clsx from 'clsx' import type { ReactNode } from 'react' -interface NodeHeaderProperties { +type NodeHeaderProperties = { subtype: string name?: string colorVariable: string diff --git a/src/main/frontend/app/routes/studio/canvas/nodetypes/zoomed-out-node.tsx b/src/main/frontend/app/routes/studio/canvas/nodetypes/zoomed-out-node.tsx index f8091642..3ac820e5 100644 --- a/src/main/frontend/app/routes/studio/canvas/nodetypes/zoomed-out-node.tsx +++ b/src/main/frontend/app/routes/studio/canvas/nodetypes/zoomed-out-node.tsx @@ -6,7 +6,7 @@ const COMPACT_PADDING_TOP = 8 const COMPACT_HANDLE_SIZE = 15 const COMPACT_HANDLE_GAP = 4 -export interface ZoomedOutNodeProps { +export type ZoomedOutNodeProps = { subtype: string name?: string attributes?: Record diff --git a/src/main/frontend/app/routes/studio/context/context-input-field.tsx b/src/main/frontend/app/routes/studio/context/context-input-field.tsx index 0dad93c6..0288a1b3 100644 --- a/src/main/frontend/app/routes/studio/context/context-input-field.tsx +++ b/src/main/frontend/app/routes/studio/context/context-input-field.tsx @@ -4,7 +4,7 @@ import Toggle from '~/components/inputs/toggle' import ValidatedInput from '~/components/inputs/validatedInput' import Input from '~/components/inputs/input' -interface ContextInputFieldProperties { +type ContextInputFieldProperties = { id: string value: string onChange: (value: string) => void diff --git a/src/main/frontend/app/routes/studio/context/context-input.tsx b/src/main/frontend/app/routes/studio/context/context-input.tsx index 07274eff..37015ac0 100644 --- a/src/main/frontend/app/routes/studio/context/context-input.tsx +++ b/src/main/frontend/app/routes/studio/context/context-input.tsx @@ -8,7 +8,7 @@ import type { Attribute, Elements } from '@frankframework/doc-library-core' import type { DeprecatedInfo } from './deprecated-list-popover' import { DeprecatedPopover } from '../canvas/nodetypes/components/deprecated-popover' -export interface ContextInputProperties { +export type ContextInputProperties = { id: string value: string onChange: (value: string) => void diff --git a/src/main/frontend/app/routes/studio/context/deprecated-list-popover.tsx b/src/main/frontend/app/routes/studio/context/deprecated-list-popover.tsx index f5c0b437..27ed6c39 100644 --- a/src/main/frontend/app/routes/studio/context/deprecated-list-popover.tsx +++ b/src/main/frontend/app/routes/studio/context/deprecated-list-popover.tsx @@ -1,6 +1,6 @@ import { createPortal } from 'react-dom' -export interface DeprecatedInfo { +export type DeprecatedInfo = { since?: string forRemoval?: boolean description?: string diff --git a/src/main/frontend/app/routes/studio/context/element-hover-card.tsx b/src/main/frontend/app/routes/studio/context/element-hover-card.tsx index 33f33a2b..da5db360 100644 --- a/src/main/frontend/app/routes/studio/context/element-hover-card.tsx +++ b/src/main/frontend/app/routes/studio/context/element-hover-card.tsx @@ -7,7 +7,7 @@ import LinkButton from '~/components/inputs/link-button' import { frankdocChipStyle, getFirstLabelGroup } from '~/utils/flow-utils' import ExternalLinkIcon from '../../../../icons/solar/External Link.svg?react' -interface ElementHoverCardProps { +type ElementHoverCardProps = { anchorRect: DOMRect element: ElementDetails onUnlock?: () => void diff --git a/src/main/frontend/app/routes/studio/context/sorted-elements.tsx b/src/main/frontend/app/routes/studio/context/sorted-elements.tsx index debd2a48..dff4ed00 100644 --- a/src/main/frontend/app/routes/studio/context/sorted-elements.tsx +++ b/src/main/frontend/app/routes/studio/context/sorted-elements.tsx @@ -11,7 +11,7 @@ import ElementHoverCard from './element-hover-card' import { showWarningToast } from '~/components/toast' import Button from '~/components/inputs/button' -interface Properties { +type Properties = { type: string items: ElementDetails[] onDragStart: (item: ElementDetails) => React.DragEventHandler diff --git a/src/main/frontend/app/routes/studio/flow-to-xml-parser.ts b/src/main/frontend/app/routes/studio/flow-to-xml-parser.ts index 8543789f..aff7b539 100644 --- a/src/main/frontend/app/routes/studio/flow-to-xml-parser.ts +++ b/src/main/frontend/app/routes/studio/flow-to-xml-parser.ts @@ -6,13 +6,13 @@ import { FlowConfig } from './canvas/flow.config' import { isGroupNode, isFrankNode, isStickyNote } from '~/stores/flow-store' import type { GroupNode } from './canvas/nodetypes/group-node' -interface ReactFlowJson { +type ReactFlowJson = { nodes: FlowNode[] edges: Edge[] viewport: { x: number; y: number; zoom: number } } -interface NodeData { +type NodeData = { subtype: string type: string name: string diff --git a/src/main/frontend/app/routes/studio/studio.tsx b/src/main/frontend/app/routes/studio/studio.tsx index 9c346a5d..29272fb9 100644 --- a/src/main/frontend/app/routes/studio/studio.tsx +++ b/src/main/frontend/app/routes/studio/studio.tsx @@ -20,7 +20,7 @@ import type { StickyNote } from '~/routes/studio/canvas/nodetypes/sticky-note' import { ALL_SHORTCUTS, formatShortcutParts, useShortcutStore } from '~/stores/shortcut-store' import GroupContext from '~/routes/studio/context/group-context' -interface RightPanelProps { +type RightPanelProps = { isMultiSelect: boolean selectedStickyId: string | null selectedGroupId: string | null diff --git a/src/main/frontend/app/routes/studio/xml-to-json-parser.ts b/src/main/frontend/app/routes/studio/xml-to-json-parser.ts index f15dc780..bd217ded 100644 --- a/src/main/frontend/app/routes/studio/xml-to-json-parser.ts +++ b/src/main/frontend/app/routes/studio/xml-to-json-parser.ts @@ -18,16 +18,16 @@ function parseConfigurationXml(xmlString: string): Document { return new DOMParser().parseFromString(withFlowNamespace, 'text/xml') } -interface IdCounter { +type IdCounter = { current: number } -interface SourceHandle { +type SourceHandle = { type: string index: number } -export interface AdapterInfo { +export type AdapterInfo = { name: string listenerType: string | null } @@ -818,7 +818,7 @@ function parseElementAttributes( return { attributes, name, x, y, width, height } } -interface FrankEdge { +type FrankEdge = { id: string source: string target: string @@ -827,7 +827,7 @@ interface FrankEdge { data: { label: string } } -interface ParsedAttributes { +type ParsedAttributes = { attributes: Record name: string x: number diff --git a/src/main/frontend/app/services/app-info-service.ts b/src/main/frontend/app/services/app-info-service.ts index 55fca35d..24c450ce 100644 --- a/src/main/frontend/app/services/app-info-service.ts +++ b/src/main/frontend/app/services/app-info-service.ts @@ -1,6 +1,6 @@ import { apiFetch } from '~/utils/api' -export interface AppInfo { +export type AppInfo = { isLocal: boolean } diff --git a/src/main/frontend/app/services/file-service.ts b/src/main/frontend/app/services/file-service.ts index 841ad9ff..fb780517 100644 --- a/src/main/frontend/app/services/file-service.ts +++ b/src/main/frontend/app/services/file-service.ts @@ -1,7 +1,7 @@ import type { FileTreeNode } from '~/types/filesystem.types' import { apiFetch } from '~/utils/api' -export interface FileDTO { +export type FileDTO = { content: string type: string | null } diff --git a/src/main/frontend/app/services/frank-framework-service.ts b/src/main/frontend/app/services/frank-framework-service.ts index 92a3e45f..89d72cdc 100644 --- a/src/main/frontend/app/services/frank-framework-service.ts +++ b/src/main/frontend/app/services/frank-framework-service.ts @@ -1,11 +1,11 @@ import { apiFetch } from '~/utils/api' -interface FFInstance { +type FFInstance = { name: string configurations: FFConfiguration[] } -export interface FFConfiguration { +export type FFConfiguration = { name: string stubbed: boolean version?: string diff --git a/src/main/frontend/app/stores/editor-tab-store.ts b/src/main/frontend/app/stores/editor-tab-store.ts index db6bd359..155bbaea 100644 --- a/src/main/frontend/app/stores/editor-tab-store.ts +++ b/src/main/frontend/app/stores/editor-tab-store.ts @@ -2,26 +2,26 @@ import { create } from 'zustand' import { subscribeWithSelector } from 'zustand/middleware' import type { GitHunk } from '~/types/git.types' -export interface DiffTabData { +export type DiffTabData = { oldContent: string newContent: string filePath: string hunks: GitHunk[] } -export interface EditorTabData { +export type EditorTabData = { name: string configurationPath: string type?: 'editor' | 'diff' diffData?: DiffTabData } -export interface PendingHighlight { +export type PendingHighlight = { subtype: string name?: string } -interface EditorTabStoreState { +type EditorTabStoreState = { tabs: Record activeTabFilePath: string refreshCounter: number diff --git a/src/main/frontend/app/stores/flow-store.ts b/src/main/frontend/app/stores/flow-store.ts index f96370fa..64cab79a 100644 --- a/src/main/frontend/app/stores/flow-store.ts +++ b/src/main/frontend/app/stores/flow-store.ts @@ -23,12 +23,12 @@ import { subscribeWithSelector } from 'zustand/middleware' import { getEdgeLabelFromHandle } from '~/utils/flow-utils' import type { GroupNode } from '~/routes/studio/canvas/nodetypes/group-node' -export interface FlowSnapshot { +export type FlowSnapshot = { nodes: FlowNode[] edges: Edge[] } -export interface FlowState { +export type FlowState = { nodes: FlowNode[] edges: Edge[] viewport: { x: number; y: number; zoom: number } diff --git a/src/main/frontend/app/stores/git-store.ts b/src/main/frontend/app/stores/git-store.ts index 246442c7..ad05a633 100644 --- a/src/main/frontend/app/stores/git-store.ts +++ b/src/main/frontend/app/stores/git-store.ts @@ -1,7 +1,7 @@ import { create } from 'zustand' import type { GitStatus, GitFileDiff, FileHunkState } from '~/types/git.types' -interface GitStoreState { +type GitStoreState = { status: GitStatus | null selectedFile: string | null fileDiff: GitFileDiff | null diff --git a/src/main/frontend/app/stores/node-context-store.ts b/src/main/frontend/app/stores/node-context-store.ts index 958eccc9..29652c0f 100644 --- a/src/main/frontend/app/stores/node-context-store.ts +++ b/src/main/frontend/app/stores/node-context-store.ts @@ -1,7 +1,7 @@ import type { Attribute } from '@frankframework/doc-library-core' import { create } from 'zustand' -interface NodeContextStore { +type NodeContextStore = { attributes: Record | undefined nodeId: number isEditing: boolean diff --git a/src/main/frontend/app/stores/project-store.ts b/src/main/frontend/app/stores/project-store.ts index 566a0352..984ad0b5 100644 --- a/src/main/frontend/app/stores/project-store.ts +++ b/src/main/frontend/app/stores/project-store.ts @@ -6,7 +6,7 @@ import useEditorTabStore from '~/stores/editor-tab-store' const STORAGE_ROOT_PATH_KEY = 'active-project-root-path' -interface ProjectStoreState { +type ProjectStoreState = { project?: ConfigurationProject setProject: (project: ConfigurationProject) => void clearProject: () => void diff --git a/src/main/frontend/app/stores/save-status-store.ts b/src/main/frontend/app/stores/save-status-store.ts index 15df0473..eebd082a 100644 --- a/src/main/frontend/app/stores/save-status-store.ts +++ b/src/main/frontend/app/stores/save-status-store.ts @@ -2,7 +2,7 @@ import { create } from 'zustand' export type SaveStatus = 'idle' | 'saving' | 'saved' -interface SaveStatusState { +type SaveStatusState = { saveStatus: SaveStatus savedAt: Date | null setSaving: () => void diff --git a/src/main/frontend/app/stores/settings-store.ts b/src/main/frontend/app/stores/settings-store.ts index 73ff3206..fe76415e 100644 --- a/src/main/frontend/app/stores/settings-store.ts +++ b/src/main/frontend/app/stores/settings-store.ts @@ -1,26 +1,26 @@ import { create } from 'zustand' import { persist } from 'zustand/middleware' -export interface EditorSettings { +export type EditorSettings = { fontSize: number tabSize: number wordWrap: boolean lineNumbers: boolean } -export interface StudioSettings { +export type StudioSettings = { previewOnSave: boolean autoRefresh: boolean gradient: boolean paletteExpandedByDefault: boolean } -export interface ProjectSettings { +export type ProjectSettings = { recentProjects: string[] defaultLocation: string } -export interface GeneralSettings { +export type GeneralSettings = { theme: 'light' | 'dark' | 'system' language: string telemetry: boolean @@ -28,12 +28,12 @@ export interface GeneralSettings { autoSave: AutosaveSettings } -export interface AutosaveSettings { +export type AutosaveSettings = { enabled: boolean delayMs: number } -export interface SettingsState { +export type SettingsState = { editor: EditorSettings studio: StudioSettings projects: ProjectSettings diff --git a/src/main/frontend/app/stores/shortcut-store.ts b/src/main/frontend/app/stores/shortcut-store.ts index 5d6f60a8..591c4d98 100644 --- a/src/main/frontend/app/stores/shortcut-store.ts +++ b/src/main/frontend/app/stores/shortcut-store.ts @@ -4,13 +4,13 @@ export type Platform = 'mac' | 'pc' type PlatformValue = T | Partial> -export interface KeyModifiers { +export type KeyModifiers = { cmdOrCtrl?: boolean shift?: boolean alt?: boolean } -export interface ShortcutDefinition { +export type ShortcutDefinition = { id: string label: string scope: string @@ -215,7 +215,7 @@ function buildInitialShortcuts(): Map { return map } -interface ShortcutState { +type ShortcutState = { platform: Platform shortcuts: Map setHandler: (id: string, handler: (() => void) | undefined) => void diff --git a/src/main/frontend/app/stores/sidebar-layout-store.ts b/src/main/frontend/app/stores/sidebar-layout-store.ts index 73c34596..621222e7 100644 --- a/src/main/frontend/app/stores/sidebar-layout-store.ts +++ b/src/main/frontend/app/stores/sidebar-layout-store.ts @@ -9,12 +9,12 @@ export enum SidebarSide { export type VisibilityState = [boolean, boolean, boolean] -interface SideBarInstance { +type SideBarInstance = { visible: VisibilityState sizes: number[] } -interface SidebarState { +type SidebarState = { instances: Record initializeInstance: (name: string, defaultVisible?: VisibilityState) => void toggleSidebar: (name: string, side: SidebarSide) => void diff --git a/src/main/frontend/app/stores/tab-store.ts b/src/main/frontend/app/stores/tab-store.ts index fa34e69b..2a4feb1b 100644 --- a/src/main/frontend/app/stores/tab-store.ts +++ b/src/main/frontend/app/stores/tab-store.ts @@ -2,7 +2,7 @@ import { create } from 'zustand' import { subscribeWithSelector } from 'zustand/middleware' import type { FlowSnapshot } from './flow-store' -export interface TabData { +export type TabData = { name: string icon?: React.ComponentType> flowJson?: Record @@ -14,7 +14,7 @@ export interface TabData { pendingRecenter?: boolean | null } -interface TabStoreState { +type TabStoreState = { tabs: Record activeTab: string setTabData: (tabId: string, data: TabData) => void diff --git a/src/main/frontend/app/stores/tree-store.ts b/src/main/frontend/app/stores/tree-store.ts index 3f23a305..53baab9b 100644 --- a/src/main/frontend/app/stores/tree-store.ts +++ b/src/main/frontend/app/stores/tree-store.ts @@ -1,6 +1,6 @@ import { create } from 'zustand' -interface TreestoreState { +type TreestoreState = { isLoading: boolean setIsLoading: (loading: boolean) => void clearConfigs: () => void diff --git a/src/main/frontend/app/types/datamapper_types/config-types.ts b/src/main/frontend/app/types/datamapper_types/config-types.ts index a1b72c20..8c64dc4d 100644 --- a/src/main/frontend/app/types/datamapper_types/config-types.ts +++ b/src/main/frontend/app/types/datamapper_types/config-types.ts @@ -1,7 +1,7 @@ import type { ReactFlowJsonObject } from '@xyflow/react' import type { FormatState } from './data-types' -export interface MappingListConfig { +export type MappingListConfig = { stage: string formatTypes: FormatState propertyData: ReactFlowJsonObject diff --git a/src/main/frontend/app/types/datamapper_types/data-types.ts b/src/main/frontend/app/types/datamapper_types/data-types.ts index ebf3de37..34c460a2 100644 --- a/src/main/frontend/app/types/datamapper_types/data-types.ts +++ b/src/main/frontend/app/types/datamapper_types/data-types.ts @@ -1,16 +1,16 @@ -export interface RuleSet { +export type RuleSet = { minValue?: number maxValue?: number decimalAllowed?: boolean } -export interface PropertyDefinition { +export type PropertyDefinition = { name: string type: PropertyBasicTypes rules: RuleSet } -export interface FormatDefinition { +export type FormatDefinition = { name: string schemaFileExtension: string duplicateKeysAllowed: boolean @@ -19,7 +19,7 @@ export interface FormatDefinition { export type DataTypeSchema = FormatDefinition[] -export interface FormatState { +export type FormatState = { source: FormatDefinition | null target: FormatDefinition | null } diff --git a/src/main/frontend/app/types/datamapper_types/export-types.ts b/src/main/frontend/app/types/datamapper_types/export-types.ts index ec27a472..dafa3e40 100644 --- a/src/main/frontend/app/types/datamapper_types/export-types.ts +++ b/src/main/frontend/app/types/datamapper_types/export-types.ts @@ -1,6 +1,6 @@ import type { Condition, Mutation } from './function-types' -export interface Property { +export type Property = { type: string internalId: string label: string @@ -10,13 +10,13 @@ export interface Property { parentArray?: string } -export interface Source { +export type Source = { id: string label: string type: string } -export interface Mapping { +export type Mapping = { id: string sources: Property[] target: Property @@ -26,19 +26,19 @@ export interface Mapping { output: string } -export interface Target extends Property { +export type Target = { mapping?: Mapping isAttribute?: boolean -} +} & Property -export interface MappingFile { +export type MappingFile = { sourceType: string targetType: string targetStructure: Target[] sourceStructure: Property[] } -export interface MappingRow { +export type MappingRow = { id: string sourcesNames: string[] targetsNames: string[] diff --git a/src/main/frontend/app/types/datamapper_types/function-types.ts b/src/main/frontend/app/types/datamapper_types/function-types.ts index dfa8698b..97857e1f 100644 --- a/src/main/frontend/app/types/datamapper_types/function-types.ts +++ b/src/main/frontend/app/types/datamapper_types/function-types.ts @@ -1,29 +1,29 @@ -export interface ConditionInput { +export type ConditionInput = { type: 'source' | 'defaultValue' | 'attribute' | 'operator' | '' value: string sourceId?: string } -export interface Condition { +export type Condition = { id: string name: string type: ConditionType | null inputs: ConditionInput[] } -export interface MutationInput { +export type MutationInput = { type: 'source' | 'defaultValue' | 'attribute' sourceId?: string value: string } -export interface Mutation { +export type Mutation = { name: string id: string mutationType: MutationType | null inputs: MutationInput[] } -export interface MutationTypeInput { +export type MutationTypeInput = { label: string type: 'source' | 'attribute' allowDefaultValue: boolean @@ -31,7 +31,7 @@ export interface MutationTypeInput { inputsAllowed: string } -export interface MutationType { +export type MutationType = { name: string maxInputs: number | null requiredInputs: number @@ -39,30 +39,30 @@ export interface MutationType { outputType: string } -export interface MutationsConfig { +export type MutationsConfig = { mutations: MutationType[] } -export interface ConditionOperatorConfig { +export type ConditionOperatorConfig = { label: string allowedValues: string[] resultType: string } -export interface ConditionTypeInput { +export type ConditionTypeInput = { label: string type: string allowDefaultValue: boolean inputsAllowed: string } -export interface ConditionType { +export type ConditionType = { name: string maxInputs: number | null requiredInputs: number inputs: ConditionTypeInput[] } -export interface ConditionTypeConfig { +export type ConditionTypeConfig = { operators: Record conditions: ConditionType[] } diff --git a/src/main/frontend/app/types/datamapper_types/react-node-types.ts b/src/main/frontend/app/types/datamapper_types/react-node-types.ts index 80860c5c..1f934176 100644 --- a/src/main/frontend/app/types/datamapper_types/react-node-types.ts +++ b/src/main/frontend/app/types/datamapper_types/react-node-types.ts @@ -22,11 +22,11 @@ export type GroupNode = Node & { height: number } -export interface GroupNodeData { +export type GroupNodeData = { label?: string children?: React.ReactNode } -export interface NodeLabels { +export type NodeLabels = { id: string label: string checked?: boolean diff --git a/src/main/frontend/app/types/datamapper_types/schema-types.ts b/src/main/frontend/app/types/datamapper_types/schema-types.ts index eb72eb3a..ff658493 100644 --- a/src/main/frontend/app/types/datamapper_types/schema-types.ts +++ b/src/main/frontend/app/types/datamapper_types/schema-types.ts @@ -2,45 +2,45 @@ export type JsonSchema = JsonSchemaObject | JsonSchemaArray | JsonSchemaPrimitive -export interface JsonSchemaBase { +export type JsonSchemaBase = { type?: string defaultValue?: string } -export interface JsonSchemaObject extends JsonSchemaBase { +export type JsonSchemaObject = { type: 'object' properties: Record -} +} & JsonSchemaBase -export interface JsonSchemaArray extends JsonSchemaBase { +export type JsonSchemaArray = { type: 'array' items: JsonSchema -} +} & JsonSchemaBase -export interface JsonSchemaPrimitive extends JsonSchemaBase { +export type JsonSchemaPrimitive = { type: 'string' | 'number' | 'boolean' | 'date' -} +} & JsonSchemaBase // XSD schema types -export interface XsdSchema { +export type XsdSchema = { 'xs:complexType'?: XsdComplexType | XsdComplexType[] 'xs:element'?: XsdElement | XsdElement[] } -export interface XsdComplexType { +export type XsdComplexType = { '@_name'?: string 'xs:sequence'?: XsdSequence 'xs:attribute'?: XsdAttribute[] } -export interface XsdSequence { +export type XsdSequence = { xs: { element: XsdElement[] } } -export interface XsdElement { +export type XsdElement = { '@_name'?: string '@_type'?: string '@_maxOccurs'?: string @@ -50,7 +50,7 @@ export interface XsdElement { 'xs:attribute'?: XsdAttribute[] } -export interface XsdAttribute { +export type XsdAttribute = { '@_name': string '@_type': string '@_use'?: string @@ -58,7 +58,7 @@ export interface XsdAttribute { // SAX parser context type -export interface SaxContext { +export type SaxContext = { node: XsdComplexType | XsdSequence | XsdElement parentId: string | null } diff --git a/src/main/frontend/app/types/filesystem.types.ts b/src/main/frontend/app/types/filesystem.types.ts index 52e8ddb1..dd6bc709 100644 --- a/src/main/frontend/app/types/filesystem.types.ts +++ b/src/main/frontend/app/types/filesystem.types.ts @@ -1,19 +1,19 @@ export type EntryType = 'DIRECTORY' | 'FILE' -export interface BrowseResult { +export type BrowseResult = { resolvedPath: string parentPath: string entries: FilesystemEntry[] } -export interface FilesystemEntry { +export type FilesystemEntry = { name: string path: string type: EntryType projectRoot: boolean } -export interface FileTreeNode { +export type FileTreeNode = { name: string path: string type: EntryType diff --git a/src/main/frontend/app/types/git.types.ts b/src/main/frontend/app/types/git.types.ts index daccb64a..3620adac 100644 --- a/src/main/frontend/app/types/git.types.ts +++ b/src/main/frontend/app/types/git.types.ts @@ -1,4 +1,4 @@ -export interface GitStatus { +export type GitStatus = { staged: string[] modified: string[] untracked: string[] @@ -10,7 +10,7 @@ export interface GitStatus { isLocal: boolean } -export interface GitHunk { +export type GitHunk = { index: number header: string content: string @@ -20,36 +20,36 @@ export interface GitHunk { newCount: number } -export interface GitFileDiff { +export type GitFileDiff = { filePath: string oldContent: string newContent: string hunks: GitHunk[] } -export interface GitCommitRequest { +export type GitCommitRequest = { message: string } -export interface GitCommitResult { +export type GitCommitResult = { commitId: string message: string author: string timestamp: number } -export interface GitPushResult { +export type GitPushResult = { success: boolean message: string } -export interface GitPullResult { +export type GitPullResult = { success: boolean message: string hasConflicts: boolean } -export interface FileHunkState { +export type FileHunkState = { selectedHunks: Set totalHunks: number selected: boolean diff --git a/src/main/frontend/app/types/global.d.ts b/src/main/frontend/app/types/global.d.ts index ca8d348b..ac0204ec 100644 --- a/src/main/frontend/app/types/global.d.ts +++ b/src/main/frontend/app/types/global.d.ts @@ -1,3 +1,5 @@ -interface Window { +// Must stay an `interface` to augment the global `Window` (declaration merging). +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +interface Window { showDirectoryPicker(): Promise } diff --git a/src/main/frontend/app/types/project.types.ts b/src/main/frontend/app/types/project.types.ts index 239f39d7..23dd7e11 100644 --- a/src/main/frontend/app/types/project.types.ts +++ b/src/main/frontend/app/types/project.types.ts @@ -1,4 +1,4 @@ -export interface ConfigurationProject { +export type ConfigurationProject = { name: string rootPath: string filepaths: string[] @@ -7,13 +7,13 @@ hasStoredToken: boolean } -export interface RecentConfigurationProject { +export type RecentConfigurationProject = { name: string rootPath: string lastOpened: string } -export interface XmlResponse { +export type XmlResponse = { xmlContent: string } diff --git a/src/main/frontend/app/types/react.d.ts b/src/main/frontend/app/types/react.d.ts index 255a78ce..5070b4fc 100644 --- a/src/main/frontend/app/types/react.d.ts +++ b/src/main/frontend/app/types/react.d.ts @@ -1,8 +1,11 @@ import 'react' declare module 'react' { - // https://github.com/facebook/react/issues/3468 - // eslint-disable-next-line @typescript-eslint/no-unused-vars + /* + * https://github.com/facebook/react/issues/3468 + * Must stay an `interface` for module augmentation (declaration merging) to work. + */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/consistent-type-definitions interface InputHTMLAttributes { webkitdirectory?: 'true' | 'false' } diff --git a/src/main/frontend/app/utils/api.ts b/src/main/frontend/app/utils/api.ts index ee9c3b16..0234f4b5 100644 --- a/src/main/frontend/app/utils/api.ts +++ b/src/main/frontend/app/utils/api.ts @@ -16,7 +16,7 @@ const getAuthToken = () => { return localStorage.getItem('access_token') || null } -interface BackendErrorResponse { +type BackendErrorResponse = { status: string error: string } diff --git a/src/main/frontend/app/utils/datamapper_utils/canvas-management-utils.ts b/src/main/frontend/app/utils/datamapper_utils/canvas-management-utils.ts index 98238be1..61da3aea 100644 --- a/src/main/frontend/app/utils/datamapper_utils/canvas-management-utils.ts +++ b/src/main/frontend/app/utils/datamapper_utils/canvas-management-utils.ts @@ -13,7 +13,7 @@ export function updateCanvasSize(nodes: Node[], currentSize: { height: number }) } return { ...currentSize, height: maxY } } -export interface TablePositions { +export type TablePositions = { sourceX: number mappingX: number targetX: number diff --git a/src/main/frontend/app/utils/datamapper_utils/mapping-node-utils.ts b/src/main/frontend/app/utils/datamapper_utils/mapping-node-utils.ts index be5c409b..d8fefae5 100644 --- a/src/main/frontend/app/utils/datamapper_utils/mapping-node-utils.ts +++ b/src/main/frontend/app/utils/datamapper_utils/mapping-node-utils.ts @@ -3,16 +3,16 @@ import type { NodeLabels, MappingNodeData, ArrayNodeData } from '~/types/datamap import { findNodeById } from './generic-node-utils' import { getNodesByTypeAndId } from './property-node-utils' -export interface DeleteMappingNodeResult { +export type DeleteMappingNodeResult = { remainingNodes: Node[] remainingEdges: Edge[] } -export interface MappingNodeResult { +export type MappingNodeResult = { updatedNodes: Node[] updatedEdges: Edge[] } -interface MappingEdgeInput { +type MappingEdgeInput = { id: string sources: string[] target: string diff --git a/src/main/frontend/app/utils/datamapper_utils/property-node-utils.ts b/src/main/frontend/app/utils/datamapper_utils/property-node-utils.ts index 5e7a5351..41102e6b 100644 --- a/src/main/frontend/app/utils/datamapper_utils/property-node-utils.ts +++ b/src/main/frontend/app/utils/datamapper_utils/property-node-utils.ts @@ -41,7 +41,7 @@ export function getReactflowType(id: string, parentId: string): string { } } -interface GetNodesOptions { +type GetNodesOptions = { typeIncludes?: string | string[] idIncludes?: string includeChecked?: boolean diff --git a/src/main/frontend/app/utils/xsd-utils.ts b/src/main/frontend/app/utils/xsd-utils.ts index c7235986..25c38166 100644 --- a/src/main/frontend/app/utils/xsd-utils.ts +++ b/src/main/frontend/app/utils/xsd-utils.ts @@ -387,20 +387,20 @@ function getRequiredOnly(requirement: Requirement): Requirement | null { return null } -interface RequirementBase { +type RequirementBase = { kind: 'element' | 'group' } -interface ElementRequirement extends RequirementBase { +type ElementRequirement = { kind: 'element' name: string required: boolean -} +} & RequirementBase export type Requirement = ElementRequirement | GroupRequirement -interface GroupRequirement extends RequirementBase { +type GroupRequirement = { kind: 'group' mode: 'all' | 'one' children: Requirement[] -} +} & RequirementBase diff --git a/src/main/frontend/eslint.config.mjs b/src/main/frontend/eslint.config.mjs index 2b67d1a4..e66f9f5f 100644 --- a/src/main/frontend/eslint.config.mjs +++ b/src/main/frontend/eslint.config.mjs @@ -51,6 +51,7 @@ export default [ ...eslintConfigPrettier?.rules, // TypeScript rules + '@typescript-eslint/consistent-type-definitions': ['error', 'type'], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }], '@typescript-eslint/triple-slash-reference': 'warn', From 688c9f589688efb7b5d93552e11965296cc54dbb Mon Sep 17 00:00:00 2001 From: stijnpotters Date: Wed, 24 Jun 2026 17:44:48 +0200 Subject: [PATCH 2/4] chore: fix typo in type name --- src/main/frontend/app/stores/tree-store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/app/stores/tree-store.ts b/src/main/frontend/app/stores/tree-store.ts index 53baab9b..286db783 100644 --- a/src/main/frontend/app/stores/tree-store.ts +++ b/src/main/frontend/app/stores/tree-store.ts @@ -1,6 +1,6 @@ import { create } from 'zustand' -type TreestoreState = { +type TreeStoreState = { isLoading: boolean setIsLoading: (loading: boolean) => void clearConfigs: () => void @@ -16,7 +16,7 @@ type TreestoreState = { clearExpandedItems: () => void } -export const useTreeStore = create((set) => ({ +export const useTreeStore = create((set) => ({ isLoading: true, setIsLoading: (isLoading) => set({ isLoading }), clearConfigs: () => From 4d093971ddba0499e01a138cb5b0f773c1406c8c Mon Sep 17 00:00:00 2001 From: stijnpotters Date: Mon, 29 Jun 2026 15:32:30 +0200 Subject: [PATCH 3/4] chore: removed dead showDirectoryPicker code piece --- src/main/frontend/app/types/global.d.ts | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 src/main/frontend/app/types/global.d.ts diff --git a/src/main/frontend/app/types/global.d.ts b/src/main/frontend/app/types/global.d.ts deleted file mode 100644 index ac0204ec..00000000 --- a/src/main/frontend/app/types/global.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Must stay an `interface` to augment the global `Window` (declaration merging). -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -interface Window { - showDirectoryPicker(): Promise -} From d7604204b12a7815fd4bb777f65f758b14626ff9 Mon Sep 17 00:00:00 2001 From: stijnpotters Date: Mon, 29 Jun 2026 15:34:23 +0200 Subject: [PATCH 4/4] applied frontend linter --- src/main/frontend/app/types/project.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/frontend/app/types/project.types.ts b/src/main/frontend/app/types/project.types.ts index 23dd7e11..6071eb44 100644 --- a/src/main/frontend/app/types/project.types.ts +++ b/src/main/frontend/app/types/project.types.ts @@ -17,7 +17,7 @@ export type XmlResponse = { xmlContent: string } -export interface AdapterLocationResponse { +export type AdapterLocationResponse = { adapterName: string | null adapterPosition: number }