diff --git a/package-lock.json b/package-lock.json index 4a17af9bd8..e5cdd8b27c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -80,7 +80,7 @@ "i18next-cli": "^1.34.1", "jest-styled-components": "^7.2.0", "jsdom": "^26.1.0", - "prettier": "^3.6.2", + "prettier": "^3.7.4", "typescript": "^5.9.3", "typescript-eslint": "^8.52.0", "vite": "^7.3.0", @@ -9521,9 +9521,9 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", + "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", "peer": true, diff --git a/package.json b/package.json index 46e3ba2a1c..82b620d4ba 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "i18next-cli": "^1.34.1", "jest-styled-components": "^7.2.0", "jsdom": "^26.1.0", - "prettier": "^3.6.2", + "prettier": "^3.7.4", "typescript": "^5.9.3", "typescript-eslint": "^8.52.0", "vite": "^7.3.0", diff --git a/src/gmp/commands/agent-group.ts b/src/gmp/commands/agent-group.ts index 2dcd81910a..4846eaecf8 100644 --- a/src/gmp/commands/agent-group.ts +++ b/src/gmp/commands/agent-group.ts @@ -28,8 +28,10 @@ export interface AgentGroupCreateParams { schedulerCronTimes?: string | string[]; } -export interface AgentGroupSaveParams - extends Omit { +export interface AgentGroupSaveParams extends Omit< + AgentGroupCreateParams, + 'name' +> { id: string; name?: string; } diff --git a/src/gmp/commands/credential.ts b/src/gmp/commands/credential.ts index ebddda49fc..c6aee885c9 100644 --- a/src/gmp/commands/credential.ts +++ b/src/gmp/commands/credential.ts @@ -52,20 +52,20 @@ interface CredentialCommandSnmpFields { type CredentialCommandCreateArgs = CredentialCommandBaseArgs; interface CredentialCommandKrb5Args - extends CredentialCommandBaseArgs, - CredentialCommandKrb5Fields {} + extends CredentialCommandBaseArgs, CredentialCommandKrb5Fields {} interface CredentialCommandCredentialStoreArgs - extends CredentialCommandBaseArgs, - CredentialCommandCredentialStoreFields {} + extends CredentialCommandBaseArgs, CredentialCommandCredentialStoreFields {} interface CredentialCommandCredentialStoreKrb5Args - extends CredentialCommandBaseArgs, + extends + CredentialCommandBaseArgs, CredentialCommandCredentialStoreFields, CredentialCommandKrb5Fields {} interface CredentialCommandCredentialStoreSnmpArgs - extends CredentialCommandBaseArgs, + extends + CredentialCommandBaseArgs, CredentialCommandCredentialStoreFields, CredentialCommandSnmpFields {} diff --git a/src/gmp/commands/permission.ts b/src/gmp/commands/permission.ts index 39e73e3359..ce2b1521c4 100644 --- a/src/gmp/commands/permission.ts +++ b/src/gmp/commands/permission.ts @@ -21,8 +21,7 @@ export interface PermissionCommandCreateParams { subjectType?: EntityType | ApiType; } -export interface PermissionCommandSaveParams - extends PermissionCommandCreateParams { +export interface PermissionCommandSaveParams extends PermissionCommandCreateParams { id: string; } diff --git a/src/gmp/commands/task.ts b/src/gmp/commands/task.ts index 709e859fe1..29b1cf9481 100644 --- a/src/gmp/commands/task.ts +++ b/src/gmp/commands/task.ts @@ -111,8 +111,10 @@ interface TaskCommandSaveParams { target_id?: string; } -interface TaskCommandSaveAgentGroupParams - extends Omit { +interface TaskCommandSaveAgentGroupParams extends Omit< + TaskCommandCreateAgentGroupParams, + 'addTag' +> { id: string; } diff --git a/src/web/Routes.tsx b/src/web/Routes.tsx index 611f9e0196..2bd5f1694c 100644 --- a/src/web/Routes.tsx +++ b/src/web/Routes.tsx @@ -145,9 +145,7 @@ const loggedInRoutes = [ path: 'ociimagetargets', lazy: async () => ({ Component: ( - await import( - 'web/pages/container-image-targets/ContainerImageTargetsListPage' - ) + await import('web/pages/container-image-targets/ContainerImageTargetsListPage') ).default, }), }, diff --git a/src/web/components/dashboard/display/severity/SeverityClassDisplay.tsx b/src/web/components/dashboard/display/severity/SeverityClassDisplay.tsx index efc1de9b7b..9b845a2c15 100644 --- a/src/web/components/dashboard/display/severity/SeverityClassDisplay.tsx +++ b/src/web/components/dashboard/display/severity/SeverityClassDisplay.tsx @@ -18,13 +18,12 @@ import transformSeverityData, { import {filterValueToFilterTerms} from 'web/components/dashboard/display/severity/utils'; import useGmp from 'web/hooks/useGmp'; -interface SeverityClassDisplayProps - extends DataDisplayProps< - SeverityData, - SeverityClassDisplayState, - SeverityClassData, - TransformSeverityDataProps - > { +interface SeverityClassDisplayProps extends DataDisplayProps< + SeverityData, + SeverityClassDisplayState, + SeverityClassData, + TransformSeverityDataProps +> { filter?: Filter; onFilterChanged?: (filter: Filter) => void; } @@ -34,13 +33,12 @@ interface SeverityClassDisplayState { showLegend?: boolean; } -interface SeverityClassDataDisplayProps - extends DataDisplayProps< - SeverityData, - SeverityClassDisplayState, - SeverityClassData, - TransformSeverityDataProps - > { +interface SeverityClassDataDisplayProps extends DataDisplayProps< + SeverityData, + SeverityClassDisplayState, + SeverityClassData, + TransformSeverityDataProps +> { severityRating: string; } diff --git a/src/web/components/form/NumberField.tsx b/src/web/components/form/NumberField.tsx index fe553016c9..30be5e0004 100644 --- a/src/web/components/form/NumberField.tsx +++ b/src/web/components/form/NumberField.tsx @@ -18,8 +18,10 @@ interface StyledNumberInputProps { errorContent?: string; } -export interface NumberFieldProps - extends Omit { +export interface NumberFieldProps extends Omit< + MantineNumberInputProps, + 'type' | 'onChange' +> { allowEmpty?: boolean; errorContent?: string; onChange?: (value: number, name?: string) => void; diff --git a/src/web/components/form/PasswordField.tsx b/src/web/components/form/PasswordField.tsx index a30204aa46..e3c30ef1b9 100644 --- a/src/web/components/form/PasswordField.tsx +++ b/src/web/components/form/PasswordField.tsx @@ -7,11 +7,10 @@ import {PasswordInput} from '@greenbone/ui-lib'; import {isDefined} from 'gmp/utils/identity'; import useValueChange from 'web/components/form/useValueChange'; -interface PasswordFieldProps - extends Omit< - React.ComponentPropsWithoutRef, - 'onChange' - > { +interface PasswordFieldProps extends Omit< + React.ComponentPropsWithoutRef, + 'onChange' +> { autoComplete?: string; disabled?: boolean; errorContent?: string; diff --git a/src/web/components/form/Radio.tsx b/src/web/components/form/Radio.tsx index ec7dd23ea0..bc22daf16d 100644 --- a/src/web/components/form/Radio.tsx +++ b/src/web/components/form/Radio.tsx @@ -8,8 +8,10 @@ import {RadioButton as GreenboneRadio} from '@greenbone/ui-lib'; import {isDefined} from 'gmp/utils/identity'; import useValueChange from 'web/components/form/useValueChange'; -interface RadioProps - extends Omit { +interface RadioProps extends Omit< + MantineRadioProps, + 'onChange' | 'value' +> { checked?: boolean; convert?: (value: string) => TValue; disabled?: boolean; diff --git a/src/web/components/form/Select.tsx b/src/web/components/form/Select.tsx index 806a93abed..787013eda5 100644 --- a/src/web/components/form/Select.tsx +++ b/src/web/components/form/Select.tsx @@ -16,11 +16,10 @@ export interface SelectItem { deprecated?: boolean; } -export interface SelectProps - extends Omit< - React.ComponentPropsWithoutRef, - 'onChange' | 'value' - > { +export interface SelectProps extends Omit< + React.ComponentPropsWithoutRef, + 'onChange' | 'value' +> { allowDeselect?: boolean; 'data-testid'?: string; disabled?: boolean; diff --git a/src/web/components/form/Spinner.tsx b/src/web/components/form/Spinner.tsx index 1fdacc8946..f36f0f3535 100644 --- a/src/web/components/form/Spinner.tsx +++ b/src/web/components/form/Spinner.tsx @@ -8,11 +8,10 @@ import NumberField, { type NumberFieldProps, } from 'web/components/form/NumberField'; -interface SpinnerProps - extends Omit< - NumberFieldProps, - 'fixedDecimalScale' | 'hideControls' | 'onChange' | 'value' | 'allowEmpty' - > { +interface SpinnerProps extends Omit< + NumberFieldProps, + 'fixedDecimalScale' | 'hideControls' | 'onChange' | 'value' | 'allowEmpty' +> { value?: number; onChange?: (value: number, name?: string) => void; } diff --git a/src/web/components/form/TextArea.tsx b/src/web/components/form/TextArea.tsx index 60ad4c70b6..46c6aa3119 100644 --- a/src/web/components/form/TextArea.tsx +++ b/src/web/components/form/TextArea.tsx @@ -7,11 +7,10 @@ import {Textarea as GreenboneTextArea} from '@greenbone/ui-lib'; import {isDefined} from 'gmp/utils/identity'; import useValueChange from 'web/components/form/useValueChange'; -interface TextAreaProps - extends Omit< - React.ComponentPropsWithoutRef, - 'onChange' | 'value' - > { +interface TextAreaProps extends Omit< + React.ComponentPropsWithoutRef, + 'onChange' | 'value' +> { autosize?: boolean; disabled?: boolean; errorContent?: string; diff --git a/src/web/components/form/TextField.tsx b/src/web/components/form/TextField.tsx index 2a4e772de7..d2ce25e376 100644 --- a/src/web/components/form/TextField.tsx +++ b/src/web/components/form/TextField.tsx @@ -7,11 +7,10 @@ import {Input} from '@greenbone/ui-lib'; import {isDefined} from 'gmp/utils/identity'; import useValueChange from 'web/components/form/useValueChange'; -interface TextFieldProps - extends Omit< - React.ComponentPropsWithoutRef, - 'onChange' | 'value' - > { +interface TextFieldProps extends Omit< + React.ComponentPropsWithoutRef, + 'onChange' | 'value' +> { autoComplete?: string; convert?: (value: string) => TValue; disabled?: boolean; diff --git a/src/web/components/form/TimeZoneSelect.tsx b/src/web/components/form/TimeZoneSelect.tsx index 65476273c4..95e8af25eb 100644 --- a/src/web/components/form/TimeZoneSelect.tsx +++ b/src/web/components/form/TimeZoneSelect.tsx @@ -7,8 +7,10 @@ import {useMemo} from 'react'; import timezones, {DEFAULT_TIMEZONE} from 'gmp/time-zones'; import Select, {type SelectProps} from 'web/components/form/Select'; -interface TimeZoneSelectProps - extends Omit, 'items' | 'value'> { +interface TimeZoneSelectProps extends Omit< + SelectProps, + 'items' | 'value' +> { value?: string; } diff --git a/src/web/components/icon/AuthorizeIcon.tsx b/src/web/components/icon/AuthorizeIcon.tsx index 194a2f785f..a77da12160 100644 --- a/src/web/components/icon/AuthorizeIcon.tsx +++ b/src/web/components/icon/AuthorizeIcon.tsx @@ -9,8 +9,9 @@ import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconCompo import useTranslation from 'web/hooks/useTranslation'; import SelectionType, {type SelectionTypeType} from 'web/utils/SelectionType'; -interface AuthorizeIconProps - extends ExtendedDynamicIconProps { +interface AuthorizeIconProps< + TValue = string, +> extends ExtendedDynamicIconProps { active?: boolean; selectionType?: SelectionTypeType; title?: string; diff --git a/src/web/components/icon/DeleteIcon.tsx b/src/web/components/icon/DeleteIcon.tsx index fb4ca8cfc9..122a543163 100644 --- a/src/web/components/icon/DeleteIcon.tsx +++ b/src/web/components/icon/DeleteIcon.tsx @@ -9,8 +9,10 @@ import {type DynamicIconProps} from 'web/components/icon/DynamicIcon'; import useTranslation from 'web/hooks/useTranslation'; import SelectionType, {type SelectionTypeType} from 'web/utils/SelectionType'; -export interface DeleteIconProps - extends Omit, 'icon'> { +export interface DeleteIconProps extends Omit< + DynamicIconProps, + 'icon' +> { 'data-testid'?: string; selectionType?: SelectionTypeType; title?: string; diff --git a/src/web/components/icon/DynamicIcon.tsx b/src/web/components/icon/DynamicIcon.tsx index fb38c7cdc8..4462e367d5 100644 --- a/src/web/components/icon/DynamicIcon.tsx +++ b/src/web/components/icon/DynamicIcon.tsx @@ -13,8 +13,10 @@ import Theme from 'web/utils/Theme'; export type ExtendedIconSize = IconSizeType | [string, string]; -export interface DynamicIconProps - extends Omit { +export interface DynamicIconProps extends Omit< + ActionIconProps, + 'size' | 'children' +> { icon: LucideIcon | React.ComponentType>; ariaLabel?: string; size?: ExtendedIconSize; diff --git a/src/web/components/icon/ExportIcon.tsx b/src/web/components/icon/ExportIcon.tsx index 0af855fabb..c69fd1786e 100644 --- a/src/web/components/icon/ExportIcon.tsx +++ b/src/web/components/icon/ExportIcon.tsx @@ -9,8 +9,10 @@ import {type DynamicIconProps} from 'web/components/icon/DynamicIcon'; import useTranslation from 'web/hooks/useTranslation'; import SelectionType, {type SelectionTypeType} from 'web/utils/SelectionType'; -export interface ExportIconProps - extends Omit, 'icon'> { +export interface ExportIconProps extends Omit< + DynamicIconProps, + 'icon' +> { 'data-testid'?: string; selectionType?: SelectionTypeType; title?: string; diff --git a/src/web/components/icon/ListIcon.tsx b/src/web/components/icon/ListIcon.tsx index 283643c2c8..ccfac46def 100644 --- a/src/web/components/icon/ListIcon.tsx +++ b/src/web/components/icon/ListIcon.tsx @@ -8,8 +8,9 @@ import {ListSvgIcon} from 'web/components/icon'; import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconComponents'; import Link from 'web/components/link/Link'; -interface ListIconProps - extends ExtendedDynamicIconProps { +interface ListIconProps< + TValue = string, +> extends ExtendedDynamicIconProps { 'data-testid'?: string; page?: string; filter?: string | Filter; diff --git a/src/web/components/icon/ManualIcon.tsx b/src/web/components/icon/ManualIcon.tsx index 630fde94d4..a12f65f85c 100644 --- a/src/web/components/icon/ManualIcon.tsx +++ b/src/web/components/icon/ManualIcon.tsx @@ -8,7 +8,8 @@ import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconCompo import ManualLink, {type ManualLinkProps} from 'web/components/link/ManualLink'; interface ManualIconProps - extends Pick, + extends + Pick, ExtendedDynamicIconProps {} const ManualIcon = ({anchor, page, searchTerm, ...props}: ManualIconProps) => { diff --git a/src/web/components/icon/RevokeIcon.tsx b/src/web/components/icon/RevokeIcon.tsx index 86e63e543e..2efd935a82 100644 --- a/src/web/components/icon/RevokeIcon.tsx +++ b/src/web/components/icon/RevokeIcon.tsx @@ -9,8 +9,9 @@ import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconCompo import useTranslation from 'web/hooks/useTranslation'; import SelectionType, {type SelectionTypeType} from 'web/utils/SelectionType'; -interface RevokeIconProps - extends ExtendedDynamicIconProps { +interface RevokeIconProps< + TValue = string, +> extends ExtendedDynamicIconProps { active?: boolean; selectionType?: SelectionTypeType; title?: string; diff --git a/src/web/components/icon/TagsIcon.tsx b/src/web/components/icon/TagsIcon.tsx index 2bb1c6c67f..c5dc8285e0 100644 --- a/src/web/components/icon/TagsIcon.tsx +++ b/src/web/components/icon/TagsIcon.tsx @@ -9,8 +9,9 @@ import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconCompo import useTranslation from 'web/hooks/useTranslation'; import SelectionType, {type SelectionTypeType} from 'web/utils/SelectionType'; -interface TagsIconProps - extends ExtendedDynamicIconProps { +interface TagsIconProps< + TValue = string, +> extends ExtendedDynamicIconProps { active?: boolean; selectionType?: SelectionTypeType; title?: string; diff --git a/src/web/components/icon/createIconComponents.tsx b/src/web/components/icon/createIconComponents.tsx index 848fbd6a14..dcaa0c47c9 100644 --- a/src/web/components/icon/createIconComponents.tsx +++ b/src/web/components/icon/createIconComponents.tsx @@ -8,8 +8,10 @@ import DynamicIcon, { type DynamicIconProps, } from 'web/components/icon/DynamicIcon'; -export interface ExtendedDynamicIconProps - extends Omit, 'icon'> { +export interface ExtendedDynamicIconProps extends Omit< + DynamicIconProps, + 'icon' +> { 'data-testid'?: string; } diff --git a/src/web/components/link/BlankLink.tsx b/src/web/components/link/BlankLink.tsx index 132ccc6074..da871852c3 100644 --- a/src/web/components/link/BlankLink.tsx +++ b/src/web/components/link/BlankLink.tsx @@ -6,11 +6,10 @@ import React from 'react'; import PropTypes from 'web/utils/PropTypes'; -export interface BlankLinkProps - extends Omit< - React.AnchorHTMLAttributes, - 'href' | 'target' | 'rel' - > { +export interface BlankLinkProps extends Omit< + React.AnchorHTMLAttributes, + 'href' | 'target' | 'rel' +> { to: string; children?: React.ReactNode; 'data-testid'?: string; diff --git a/src/web/components/link/ExternalLink.tsx b/src/web/components/link/ExternalLink.tsx index ba7a555424..4b29a409e4 100644 --- a/src/web/components/link/ExternalLink.tsx +++ b/src/web/components/link/ExternalLink.tsx @@ -8,11 +8,10 @@ import ConfirmationDialog from 'web/components/dialog/ConfirmationDialog'; import {withTextOnly} from 'web/components/link/Link'; import useTranslation from 'web/hooks/useTranslation'; -interface ExternalLinkProps - extends Omit< - React.AnchorHTMLAttributes, - 'href' | 'onClick' - > { +interface ExternalLinkProps extends Omit< + React.AnchorHTMLAttributes, + 'href' | 'onClick' +> { to: string; children?: React.ReactNode; } diff --git a/src/web/components/link/InnerLink.tsx b/src/web/components/link/InnerLink.tsx index 127dde6003..e6049a7dc1 100644 --- a/src/web/components/link/InnerLink.tsx +++ b/src/web/components/link/InnerLink.tsx @@ -3,8 +3,10 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -interface InnerLinkProps - extends Omit, 'href'> { +interface InnerLinkProps extends Omit< + React.AnchorHTMLAttributes, + 'href' +> { to: string; children?: React.ReactNode; } diff --git a/src/web/components/menu/MenuEntry.tsx b/src/web/components/menu/MenuEntry.tsx index d5b689ee64..75ac4c1f3b 100644 --- a/src/web/components/menu/MenuEntry.tsx +++ b/src/web/components/menu/MenuEntry.tsx @@ -16,7 +16,8 @@ interface NameValueProps { } interface MenuEntryProps - extends Omit, + extends + Omit, NameValueProps { title?: React.ReactNode; to?: string; diff --git a/src/web/components/table/Table.tsx b/src/web/components/table/Table.tsx index c16668627a..1c2879b0a5 100644 --- a/src/web/components/table/Table.tsx +++ b/src/web/components/table/Table.tsx @@ -6,8 +6,7 @@ import React from 'react'; import styled from 'styled-components'; -export interface TableProps - extends React.TableHTMLAttributes { +export interface TableProps extends React.TableHTMLAttributes { children?: React.ReactNode; className?: string; 'data-testid'?: string; diff --git a/src/web/entities/EntitiesContainer.tsx b/src/web/entities/EntitiesContainer.tsx index 8bb3eaedf7..a73afb2c25 100644 --- a/src/web/entities/EntitiesContainer.tsx +++ b/src/web/entities/EntitiesContainer.tsx @@ -116,8 +116,9 @@ interface EntitiesContainerProps { onDownload: OnDownloadedFunc; } -interface EntitiesContainerPropsWithHOCs - extends EntitiesContainerProps { +interface EntitiesContainerPropsWithHOCs< + TModel extends Model = Model, +> extends EntitiesContainerProps { deleteEntity: (id: string) => Promise; loadSettings: () => void; location: Location; diff --git a/src/web/entities/EntitiesFooter.tsx b/src/web/entities/EntitiesFooter.tsx index 9a579bdc9f..8b3fbe2c3a 100644 --- a/src/web/entities/EntitiesFooter.tsx +++ b/src/web/entities/EntitiesFooter.tsx @@ -40,8 +40,9 @@ interface ConfigDialog { confirmFunction: () => Promise; } -export interface EntitiesFooterProps - extends WithEntitiesFooterComponentProps { +export interface EntitiesFooterProps< + TEntity, +> extends WithEntitiesFooterComponentProps { actions?: boolean; children?: React.ReactNode; 'data-testid'?: string; diff --git a/src/web/entities/EntitiesPage.tsx b/src/web/entities/EntitiesPage.tsx index f0c6521d3c..50787c14d2 100644 --- a/src/web/entities/EntitiesPage.tsx +++ b/src/web/entities/EntitiesPage.tsx @@ -87,8 +87,10 @@ export interface EntitiesPageProps { onFilterReset: () => void; } -interface EntitiesPagePropsWithHOCs - extends EntitiesPageProps { +interface EntitiesPagePropsWithHOCs< + TModel extends Model = Model, + TProps = {}, +> extends EntitiesPageProps { filters: Filter[]; gmp: Gmp; loadFilters: () => void; diff --git a/src/web/entities/EntitiesTable.tsx b/src/web/entities/EntitiesTable.tsx index b678905048..9c6fc831e7 100644 --- a/src/web/entities/EntitiesTable.tsx +++ b/src/web/entities/EntitiesTable.tsx @@ -71,18 +71,18 @@ export interface EntitiesTableComponentProps< export interface EntitiesTableProps< TEntity = Model, - TFooterProps extends - FooterComponentProps = FooterComponentProps, + TFooterProps extends FooterComponentProps = + FooterComponentProps, THeaderProps extends HeaderComponentProps = HeaderComponentProps, TRowProps extends RowComponentProps = RowComponentProps, TPaginationProps extends PaginationComponentProps = PaginationComponentProps, > extends EntitiesTableComponentProps< - TEntity, - TFooterProps, - THeaderProps, - TRowProps, - TPaginationProps - > { + TEntity, + TFooterProps, + THeaderProps, + TRowProps, + TPaginationProps +> { 'data-testid'?: string; doubleRow?: boolean; emptyTitle?: string; @@ -122,8 +122,8 @@ const EmptyTitle = styled(Layout)` function EntitiesTable< TEntity extends Model = Model, - TFooterProps extends - FooterComponentProps = FooterComponentProps, + TFooterProps extends FooterComponentProps = + FooterComponentProps, THeaderProps extends HeaderComponentProps = HeaderComponentProps, TRowProps extends RowComponentProps = RowComponentProps, TPaginationProps extends PaginationComponentProps = PaginationComponentProps, diff --git a/src/web/entities/RowDetailsToggle.tsx b/src/web/entities/RowDetailsToggle.tsx index f415fd70ee..46be5c69ec 100644 --- a/src/web/entities/RowDetailsToggle.tsx +++ b/src/web/entities/RowDetailsToggle.tsx @@ -8,8 +8,10 @@ import styled from 'styled-components'; import useClickHandler from 'web/components/form/useClickHandler'; import Theme from 'web/utils/Theme'; -interface RowDetailsToggleProps - extends Omit, 'onClick'> { +interface RowDetailsToggleProps extends Omit< + HTMLAttributes, + 'onClick' +> { 'data-testid'?: string; name?: string; value?: TValue; diff --git a/src/web/entities/createEntitiesHeader.tsx b/src/web/entities/createEntitiesHeader.tsx index 2e2c0a1a1f..a9e9a1e942 100644 --- a/src/web/entities/createEntitiesHeader.tsx +++ b/src/web/entities/createEntitiesHeader.tsx @@ -17,8 +17,7 @@ interface ToString { toString: () => string; } -export interface CreateEntitiesHeaderProps - extends WithEntitiesHeaderComponentProps { +export interface CreateEntitiesHeaderProps extends WithEntitiesHeaderComponentProps { currentSortBy?: string; currentSortDir?: SortDirectionType; sort?: boolean; diff --git a/src/web/entities/createEntitiesTable.tsx b/src/web/entities/createEntitiesTable.tsx index 5ab794dc6f..7e2a491a90 100644 --- a/src/web/entities/createEntitiesTable.tsx +++ b/src/web/entities/createEntitiesTable.tsx @@ -19,18 +19,18 @@ interface ToString { interface CreateEntitiesTableOptions< TEntity, - TFooterProps extends - FooterComponentProps = FooterComponentProps, + TFooterProps extends FooterComponentProps = + FooterComponentProps, THeaderProps extends HeaderComponentProps = HeaderComponentProps, TRowProps extends RowComponentProps = RowComponentProps, TPaginationProps extends PaginationComponentProps = PaginationComponentProps, > extends EntitiesTableComponentProps< - TEntity, - TFooterProps, - THeaderProps, - TRowProps, - TPaginationProps - > { + TEntity, + TFooterProps, + THeaderProps, + TRowProps, + TPaginationProps +> { emptyTitle?: ToString; } @@ -57,8 +57,8 @@ type CreateEntitiesTableProps< function createEntitiesTable< TEntity extends Model, - TFooterProps extends - FooterComponentProps = FooterComponentProps, + TFooterProps extends FooterComponentProps = + FooterComponentProps, THeaderProps extends HeaderComponentProps = HeaderComponentProps, TRowProps extends RowComponentProps = RowComponentProps, TPaginationProps extends PaginationComponentProps = PaginationComponentProps, diff --git a/src/web/entities/withEntitiesContainer.tsx b/src/web/entities/withEntitiesContainer.tsx index 0154608140..fad162820f 100644 --- a/src/web/entities/withEntitiesContainer.tsx +++ b/src/web/entities/withEntitiesContainer.tsx @@ -51,8 +51,9 @@ interface EntitiesContainerWrapperProps { notify: NotifyFunc; } -interface OtherProps - extends DialogNotificationProps { +interface OtherProps< + TEntity extends Model = Model, +> extends DialogNotificationProps { gmp: Gmp; entities: TEntity[]; entitiesCounts: CollectionCounts; diff --git a/src/web/entities/withEntitiesFooter.tsx b/src/web/entities/withEntitiesFooter.tsx index b4e3cc2789..b3a8ae29ad 100644 --- a/src/web/entities/withEntitiesFooter.tsx +++ b/src/web/entities/withEntitiesFooter.tsx @@ -48,8 +48,8 @@ export type WithEntitiesFooterProps< export function withEntitiesFooter< TEntity, - TProps extends - WithEntitiesFooterComponentProps = WithEntitiesFooterComponentProps, + TProps extends WithEntitiesFooterComponentProps = + WithEntitiesFooterComponentProps, >(options: Partial = {}) { return (Component: React.ComponentType) => { const EntitiesFooterWrapper = ({ diff --git a/src/web/entity/icon/CloneIcon.tsx b/src/web/entity/icon/CloneIcon.tsx index ce59860049..90202fb5b0 100644 --- a/src/web/entity/icon/CloneIcon.tsx +++ b/src/web/entity/icon/CloneIcon.tsx @@ -21,11 +21,10 @@ interface EntityClone extends WithEntityType { }; } -interface EntityCloneIconProps - extends Omit< - ExtendedDynamicIconProps, - 'onClick' | 'value' | 'active' - > { +interface EntityCloneIconProps extends Omit< + ExtendedDynamicIconProps, + 'onClick' | 'value' | 'active' +> { displayName?: string; entity: TEntity; mayClone?: boolean; diff --git a/src/web/entity/icon/CreateIcon.tsx b/src/web/entity/icon/CreateIcon.tsx index 75696b69e4..b8f6b55ac2 100644 --- a/src/web/entity/icon/CreateIcon.tsx +++ b/src/web/entity/icon/CreateIcon.tsx @@ -15,11 +15,10 @@ import {type ExtendedDynamicIconProps} from 'web/components/icon/createIconCompo import useCapabilities from 'web/hooks/useCapabilities'; import useTranslation from 'web/hooks/useTranslation'; -interface EntityCreateIconProps - extends Omit< - ExtendedDynamicIconProps, - 'onClick' | 'value' | 'active' | 'display' - > { +interface EntityCreateIconProps extends Omit< + ExtendedDynamicIconProps, + 'onClick' | 'value' | 'active' | 'display' +> { display?: boolean; displayName?: string; entity: TEntity; diff --git a/src/web/entity/icon/DeleteIcon.tsx b/src/web/entity/icon/DeleteIcon.tsx index ea27d23307..8373e61985 100644 --- a/src/web/entity/icon/DeleteIcon.tsx +++ b/src/web/entity/icon/DeleteIcon.tsx @@ -23,11 +23,10 @@ interface EntityDelete extends WithEntityType { isInUse: () => boolean; } -interface EntityDeleteIconProps - extends Omit< - ExtendedDynamicIconProps, - 'onClick' | 'value' | 'active' - > { +interface EntityDeleteIconProps extends Omit< + ExtendedDynamicIconProps, + 'onClick' | 'value' | 'active' +> { displayName?: string; entity: TEntity; name?: EntityType; diff --git a/src/web/entity/icon/EditIcon.tsx b/src/web/entity/icon/EditIcon.tsx index 2681ec63dc..2f69b84d2c 100644 --- a/src/web/entity/icon/EditIcon.tsx +++ b/src/web/entity/icon/EditIcon.tsx @@ -22,11 +22,10 @@ interface EntityEdit extends WithEntityType { isWritable: () => boolean; } -interface EntityEditIconProps - extends Omit< - ExtendedDynamicIconProps, - 'onClick' | 'value' | 'active' - > { +interface EntityEditIconProps extends Omit< + ExtendedDynamicIconProps, + 'onClick' | 'value' | 'active' +> { disabled?: boolean; displayName?: string; entity: TEntity; diff --git a/src/web/entity/icon/TrashIcon.tsx b/src/web/entity/icon/TrashIcon.tsx index 595a323754..14c7c7736a 100644 --- a/src/web/entity/icon/TrashIcon.tsx +++ b/src/web/entity/icon/TrashIcon.tsx @@ -23,11 +23,10 @@ interface EntityTrash extends WithEntityType { isInUse: () => boolean; } -interface EntityTrashIconProps - extends Omit< - ExtendedDynamicIconProps, - 'onClick' | 'value' | 'active' - > { +interface EntityTrashIconProps extends Omit< + ExtendedDynamicIconProps, + 'onClick' | 'value' | 'active' +> { displayName?: string; entity: TEntity; name?: EntityType; diff --git a/src/web/entity/icon/VerifyIcon.tsx b/src/web/entity/icon/VerifyIcon.tsx index 31f6c2afbc..bbb2c395e5 100644 --- a/src/web/entity/icon/VerifyIcon.tsx +++ b/src/web/entity/icon/VerifyIcon.tsx @@ -23,11 +23,10 @@ interface EntityVerify extends WithEntityType { type VerifyType = 'report_format' | 'scanner'; -interface EntityVerifyIconProps - extends Omit< - React.ComponentProps, - 'onClick' | 'value' | 'active' - > { +interface EntityVerifyIconProps extends Omit< + React.ComponentProps, + 'onClick' | 'value' | 'active' +> { displayName?: string; entity: TEntity; mayVerify?: boolean; diff --git a/src/web/pages/agent-groups/AgentGroupsActions.tsx b/src/web/pages/agent-groups/AgentGroupsActions.tsx index 3123d43b65..2f7e73f3dc 100644 --- a/src/web/pages/agent-groups/AgentGroupsActions.tsx +++ b/src/web/pages/agent-groups/AgentGroupsActions.tsx @@ -13,8 +13,10 @@ import CloneIcon from 'web/entity/icon/CloneIcon'; import TrashIcon from 'web/entity/icon/TrashIcon'; import useTranslation from 'web/hooks/useTranslation'; -export interface AgentGroupsActionsProps - extends Omit, 'children'> { +export interface AgentGroupsActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onAgentGroupCloneClick?: (entity: AgentGroup) => void; onAgentGroupDeleteClick?: (entity: AgentGroup) => void; onAgentGroupDownloadClick?: (entity: AgentGroup) => void; diff --git a/src/web/pages/agent-groups/AgentGroupsTableRow.tsx b/src/web/pages/agent-groups/AgentGroupsTableRow.tsx index 0e74721d7e..4a37a64437 100644 --- a/src/web/pages/agent-groups/AgentGroupsTableRow.tsx +++ b/src/web/pages/agent-groups/AgentGroupsTableRow.tsx @@ -14,8 +14,7 @@ import AgentGroupsActions, { } from 'web/pages/agent-groups/AgentGroupsActions'; export interface AgentGroupsTableRowProps - extends AgentGroupsActionsProps, - RowComponentProps { + extends AgentGroupsActionsProps, RowComponentProps { actionsComponent?: React.ComponentType; } diff --git a/src/web/pages/agent-installers/AgentInstallerActions.tsx b/src/web/pages/agent-installers/AgentInstallerActions.tsx index bd01ce4c16..2079708226 100644 --- a/src/web/pages/agent-installers/AgentInstallerActions.tsx +++ b/src/web/pages/agent-installers/AgentInstallerActions.tsx @@ -13,8 +13,10 @@ import EntitiesActions, { } from 'web/entities/EntitiesActions'; import useTranslation from 'web/hooks/useTranslation'; -export interface AgentInstallerActionsProps - extends Omit, 'children'> { +export interface AgentInstallerActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onAgentInstallerChecksumClick?: (entity: AgentInstaller) => void; onAgentInstallerDownloadClick?: (entity: AgentInstaller) => void; } diff --git a/src/web/pages/agent-installers/AgentInstallerTableRow.tsx b/src/web/pages/agent-installers/AgentInstallerTableRow.tsx index 0dedb2fa6e..a37c3bc271 100644 --- a/src/web/pages/agent-installers/AgentInstallerTableRow.tsx +++ b/src/web/pages/agent-installers/AgentInstallerTableRow.tsx @@ -13,8 +13,7 @@ import AgentInstallerActions, { } from 'web/pages/agent-installers/AgentInstallerActions'; export interface AgentInstallerTableRowProps - extends AgentInstallerActionsProps, - RowComponentProps { + extends AgentInstallerActionsProps, RowComponentProps { actionsComponent?: React.ComponentType; } diff --git a/src/web/pages/agents/AgentActions.tsx b/src/web/pages/agents/AgentActions.tsx index edcc8c5bcd..93ff92b2ac 100644 --- a/src/web/pages/agents/AgentActions.tsx +++ b/src/web/pages/agents/AgentActions.tsx @@ -13,8 +13,10 @@ import EntitiesActions, { import DeleteIcon from 'web/entity/icon/DeleteIcon'; import useTranslation from 'web/hooks/useTranslation'; -export interface AgentActionsProps - extends Omit, 'children'> { +export interface AgentActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onAgentAuthorizeClick?: (entity: Agent) => void; onAgentDeleteClick?: (entity: Agent) => void; onAgentEditClick?: (entity: Agent) => void; diff --git a/src/web/pages/agents/AgentTableRow.tsx b/src/web/pages/agents/AgentTableRow.tsx index 30c75b95eb..527cdedf46 100644 --- a/src/web/pages/agents/AgentTableRow.tsx +++ b/src/web/pages/agents/AgentTableRow.tsx @@ -18,8 +18,7 @@ import AgentActions, { } from 'web/pages/agents/AgentActions'; export interface AgentTableRowProps - extends AgentActionsProps, - RowComponentProps { + extends AgentActionsProps, RowComponentProps { actionsComponent?: React.ComponentType; } diff --git a/src/web/pages/container-image-targets/ContainerImageTargetFilterDialog.tsx b/src/web/pages/container-image-targets/ContainerImageTargetFilterDialog.tsx index b21461a0fa..f6ba2b2f1d 100644 --- a/src/web/pages/container-image-targets/ContainerImageTargetFilterDialog.tsx +++ b/src/web/pages/container-image-targets/ContainerImageTargetFilterDialog.tsx @@ -13,8 +13,7 @@ import useFilterDialogSave, { } from 'web/components/powerfilter/useFilterDialogSave'; import useTranslation from 'web/hooks/useTranslation'; -interface ContainerImageTargetFilterDialogProps - extends UseFilterDialogSaveProps { +interface ContainerImageTargetFilterDialogProps extends UseFilterDialogSaveProps { filter?: Filter; } diff --git a/src/web/pages/container-image-targets/ContainerImageTargetRow.tsx b/src/web/pages/container-image-targets/ContainerImageTargetRow.tsx index 405593a24c..c9a35e6f9c 100644 --- a/src/web/pages/container-image-targets/ContainerImageTargetRow.tsx +++ b/src/web/pages/container-image-targets/ContainerImageTargetRow.tsx @@ -29,8 +29,10 @@ interface CredProps { links?: boolean; } -export interface ContainerImageTargetActionsProps - extends Omit, 'children'> { +export interface ContainerImageTargetActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onContainerImageTargeEditClick?: (target: OciImageTarget) => void; onContainerImageTargetCloneClick?: (target: OciImageTarget) => void; onContainerImageTargetDownloadClick?: (target: OciImageTarget) => void; @@ -38,8 +40,7 @@ export interface ContainerImageTargetActionsProps } export interface ContainerImageTargetTableRowProps - extends ContainerImageTargetActionsProps, - RowComponentProps { + extends ContainerImageTargetActionsProps, RowComponentProps { actionsComponent?: React.ComponentType; links?: boolean; 'data-testid'?: string; diff --git a/src/web/pages/credentials/CredentialActions.tsx b/src/web/pages/credentials/CredentialActions.tsx index 07b65c720f..30541ec6f8 100644 --- a/src/web/pages/credentials/CredentialActions.tsx +++ b/src/web/pages/credentials/CredentialActions.tsx @@ -16,8 +16,10 @@ import TrashIcon from 'web/entity/icon/TrashIcon'; import useTranslation from 'web/hooks/useTranslation'; import CredentialDownloadIcon from 'web/pages/credentials/CredentialDownloadIcon'; -export interface CredentialActionsProps - extends Omit, 'children'> { +export interface CredentialActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onCredentialDeleteClick?: (entity: Credential) => void; onCredentialDownloadClick?: (entity: Credential) => void; onCredentialCloneClick?: (entity: Credential) => void; diff --git a/src/web/pages/permissions/PermissionTableRow.tsx b/src/web/pages/permissions/PermissionTableRow.tsx index af266ef079..d2de9b2b6c 100644 --- a/src/web/pages/permissions/PermissionTableRow.tsx +++ b/src/web/pages/permissions/PermissionTableRow.tsx @@ -22,8 +22,10 @@ import EntityLink from 'web/entity/Link'; import useTranslation from 'web/hooks/useTranslation'; import {permissionDescription} from 'web/utils/Render'; -export interface PermissionActionsProps - extends Omit, 'children'> { +export interface PermissionActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onPermissionCloneClick?: (permission: Permission) => void; onPermissionDeleteClick?: (permission: Permission) => void; onPermissionDownloadClick?: (permission: Permission) => void; diff --git a/src/web/pages/portlists/PortListActions.tsx b/src/web/pages/portlists/PortListActions.tsx index 8f19928031..852ede16c9 100644 --- a/src/web/pages/portlists/PortListActions.tsx +++ b/src/web/pages/portlists/PortListActions.tsx @@ -14,8 +14,10 @@ import EditIcon from 'web/entity/icon/EditIcon'; import TrashIcon from 'web/entity/icon/TrashIcon'; import useTranslation from 'web/hooks/useTranslation'; -export interface PortListActionsProps - extends Omit, 'children'> { +export interface PortListActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onPortListDeleteClick?: (entity: PortList) => void; onPortListDownloadClick?: (entity: PortList) => void; onPortListCloneClick?: (entity: PortList) => void; diff --git a/src/web/pages/reports/ReportTableRow.tsx b/src/web/pages/reports/ReportTableRow.tsx index 62c66956c3..1486cdc68a 100644 --- a/src/web/pages/reports/ReportTableRow.tsx +++ b/src/web/pages/reports/ReportTableRow.tsx @@ -33,7 +33,8 @@ interface ReportActionsProps extends WithEntitiesActionsComponentProps { } export interface ReportTableRowProps - extends WithEntitiesActionsProps, + extends + WithEntitiesActionsProps, ReportActionsProps { actionsComponent?: React.ComponentType; links?: boolean; diff --git a/src/web/pages/scanners/ScannerActions.tsx b/src/web/pages/scanners/ScannerActions.tsx index 360ccb5e8f..b372c82bc3 100644 --- a/src/web/pages/scanners/ScannerActions.tsx +++ b/src/web/pages/scanners/ScannerActions.tsx @@ -17,8 +17,10 @@ import TrashIcon from 'web/entity/icon/TrashIcon'; import useCapabilities from 'web/hooks/useCapabilities'; import useTranslation from 'web/hooks/useTranslation'; -export interface ScannerActionsProps - extends Omit, 'children'> { +export interface ScannerActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { links?: boolean; onScannerDeleteClick?: (scanner: Scanner) => void; onScannerEditClick?: (scanner: Scanner) => void; diff --git a/src/web/pages/targets/TargetTableActions.tsx b/src/web/pages/targets/TargetTableActions.tsx index 1dbd897110..8f5e47ebf3 100644 --- a/src/web/pages/targets/TargetTableActions.tsx +++ b/src/web/pages/targets/TargetTableActions.tsx @@ -14,8 +14,10 @@ import CloneIcon from 'web/entity/icon/CloneIcon'; import EditIcon from 'web/entity/icon/EditIcon'; import TrashIcon from 'web/entity/icon/TrashIcon'; -export interface TargetTableActionsProps - extends Omit, 'children'> { +export interface TargetTableActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { onTargetEditClick?: (target: Target) => void; onTargetCloneClick?: (target: Target) => void; onTargetDownloadClick?: (target: Target) => void; diff --git a/src/web/pages/tasks/TaskActions.tsx b/src/web/pages/tasks/TaskActions.tsx index c6a45934e3..08f52128d1 100644 --- a/src/web/pages/tasks/TaskActions.tsx +++ b/src/web/pages/tasks/TaskActions.tsx @@ -19,8 +19,10 @@ import TaskImportReportIcon from 'web/pages/tasks/icons/TaskImportReportIcon'; import TaskScheduleIcon from 'web/pages/tasks/icons/TaskScheduleIcon'; import TaskStopIcon from 'web/pages/tasks/icons/TaskStopIcon'; -export interface TaskActionsProps - extends Omit, 'children'> { +export interface TaskActionsProps extends Omit< + EntitiesActionsProps, + 'children' +> { links?: boolean; onReportImportClick?: (task: Task) => void | Promise; onTaskCloneClick?: (task: Task) => void | Promise;