Skip to content

Commit

Permalink
fix: update type issues caused by the removal of 'any' type in shared…
Browse files Browse the repository at this point in the history
… components (eclipse-tractusx#1113)
  • Loading branch information
shahmargi12 authored Sep 18, 2024
1 parent 3091241 commit a933200
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ npm/npmjs/@babel/template/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@babel/traverse/7.24.1, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #13926
npm/npmjs/@babel/types/7.24.0, MIT, approved, clearlydefined
npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined
npm/npmjs/@catena-x/portal-shared-components/3.5.2, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #16079
npm/npmjs/@catena-x/portal-shared-components/3.6.1, Apache-2.0 AND CC-BY-4.0 AND OFL-1.1, approved, #16144
npm/npmjs/@cspotcode/source-map-support/0.8.1, MIT, approved, clearlydefined
npm/npmjs/@date-io/core/3.0.0, MIT, approved, clearlydefined
npm/npmjs/@date-io/date-fns/3.0.0, MIT, approved, #14023
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]
},
"dependencies": {
"@catena-x/portal-shared-components": "^3.5.2",
"@catena-x/portal-shared-components": "^3.6.1",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@hookform/error-message": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/overlays/OSPRegister/OSPRegisterContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const OSPRegisterForm = ({
variant: 'filled',
clearText: 'clear',
keyTitle: 'id',
onChangeItem: (value: ItemType): void => {
onChangeItem: (value): void => {
updateData({
...data,
uniqueIds: [
Expand Down
2 changes: 1 addition & 1 deletion src/components/overlays/UpdateCertificate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default function UpdateCertificate() {
)
}
onChangeItem={(e) => {
setSelectedCertificate(e.title)
setSelectedCertificate(e.title as string)
}}
keyTitle={'title'}
disabled={certificatetypesArr.length === 1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ export default function UploadCompanyCertificate({
'content.companyCertificate.upload.certificateTypePlaceholder'
)
}
onChangeItem={(e: CertificateTypes) => {
setSelectedCertificateType(e)
onChangeItem={(e) => {
setSelectedCertificateType(e as CertificateTypes)
}}
keyTitle={'certificateType'}
disabled={certificateTypes?.length === 1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ export default function AppMarketCard() {
'content.apprelease.appMarketCard.salesManagerPlaceholder'
)}
onChangeItem={(e) => {
e && onSalesManagerChange(e.userId)
e && onSalesManagerChange(e.userId as string)
}}
keyTitle={'fullName'}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ export default function TechnicalIntegration() {
'content.apprelease.technicalIntegration.encoding'
)}
onChangeItem={(e) => {
setSelectedEncoding(e.value)
setSelectedEncoding(e.value as string)
}}
keyTitle={'title'}
disableClearable={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ any) => {
value={value}
items={items}
keyTitle={keyTitle}
// Add an ESLint exception until there is a solution
// eslint-disable-next-line
onAddItem={(items: any[]) => {
onAddItem={(items) => {
trigger(name)
onChange(items?.map((item) => item[saveKeyTitle]))
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import { ImageItem } from '@catena-x/portal-shared-components'
import { useMediaQuery } from '@mui/material'
import { type CSSProperties } from 'react'
import '../StaticTemplate.scss'
import { type SxProps } from '@mui/system'

export default function RenderImage({
url,
Expand All @@ -30,7 +30,7 @@ export default function RenderImage({
width,
}: Readonly<{
url: string
additionalStyles?: SxProps
additionalStyles?: CSSProperties
height?: string
width?: string
}>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface UploadDocumentType {
expiryDate: string | undefined
}

export interface CertificateTypes {
export type CertificateTypes = {
certificateType: string
certificateVersion: string
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@catena-x/portal-shared-components@^3.5.2":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.5.2.tgz#2ed80179dcef926734687eaf717a1f967be5aacd"
integrity sha512-qmIxToCm3lIEisKzOrihZQ24F+nXlmbWW0+ojnAwIMWa37y0n7IuSf5D8fpBE0S90CQVwmLXyvknCQy1DUJQGg==
"@catena-x/portal-shared-components@^3.6.1":
version "3.6.1"
resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-3.6.1.tgz#750438522b65d4c59976404044cd75fd5883649c"
integrity sha512-mmOETT9z3vDSa/xyM1i+F2N9k20GuqXuW54oF/I7FB7iHAegJbNedj0gaFH4E7LHJQGP9vHtGQ6J4X73ndrsRg==
dependencies:
"@date-io/date-fns" "^3.0.0"
"@emotion/react" "^11.11.4"
Expand Down

0 comments on commit a933200

Please sign in to comment.