diff --git a/src/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/utils.tsx b/src/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/utils.tsx
index 154a4c88f..2b89a418e 100644
--- a/src/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/utils.tsx
+++ b/src/Shared/Components/ImageCard/SequentialCDCardTitle/DeploymentEnvState/utils.tsx
@@ -15,10 +15,11 @@
*/
import { Icon } from '@Shared/Components/Icon'
+
+import { ReactComponent as ICRocketFail } from '../../../../../Assets/Icon/ic-rocket-fail.svg'
+import { ReactComponent as ICWorld } from '../../../../../Assets/Icon/ic-world.svg'
import { DEPLOYMENT_ENV_TEXT } from './constants'
import { GetDeploymentEnvConfigType } from './types'
-import { ReactComponent as ICWorld } from '../../../../../Assets/Icon/ic-world.svg'
-import { ReactComponent as ICRocketFail } from '../../../../../Assets/Icon/ic-rocket-fail.svg'
export const getDeploymentEnvConfig = (envStateText: string): GetDeploymentEnvConfigType => {
switch (envStateText) {
diff --git a/src/Shared/Components/ImageCard/SequentialCDCardTitle/SequentialCDCardTitle.tsx b/src/Shared/Components/ImageCard/SequentialCDCardTitle/SequentialCDCardTitle.tsx
index 019bf74ea..ae75ef196 100644
--- a/src/Shared/Components/ImageCard/SequentialCDCardTitle/SequentialCDCardTitle.tsx
+++ b/src/Shared/Components/ImageCard/SequentialCDCardTitle/SequentialCDCardTitle.tsx
@@ -16,11 +16,12 @@
import { ReactComponent as ICStack } from '@Icons/ic-stack.svg'
import { TargetPlatformListTooltip } from '@Shared/Components/TargetPlatforms'
+
+import { ImageTagButton } from '../../../../Common'
import { ARTIFACT_STATUS, STAGE_TYPE } from '../../../constants'
-import { DeploymentEnvState } from './DeploymentEnvState'
-import { DEPLOYMENT_ENV_TEXT } from './DeploymentEnvState/constants'
import { SequentialCDCardTitleProps } from '../types'
-import { ImageTagButton } from '../../../../Common'
+import { DEPLOYMENT_ENV_TEXT } from './DeploymentEnvState/constants'
+import { DeploymentEnvState } from './DeploymentEnvState'
const SequentialCDCardTitle = ({
isLatest,
diff --git a/src/Shared/Components/ImageCard/index.ts b/src/Shared/Components/ImageCard/index.ts
index aa1ef446f..ef6b39195 100644
--- a/src/Shared/Components/ImageCard/index.ts
+++ b/src/Shared/Components/ImageCard/index.ts
@@ -14,6 +14,6 @@
* limitations under the License.
*/
+export * from './ArtifactInfo'
export { default as ImageCard } from './ImageCard'
export * from './types'
-export * from './ArtifactInfo'
diff --git a/src/Shared/Components/ImageCard/types.ts b/src/Shared/Components/ImageCard/types.ts
index 9c6d3ffbe..d4f8425ed 100644
--- a/src/Shared/Components/ImageCard/types.ts
+++ b/src/Shared/Components/ImageCard/types.ts
@@ -15,6 +15,7 @@
*/
import { ReactNode } from 'react'
+
import { CDMaterialType, ImageTaggingContainerType } from '../../../Common'
import { RegistryType } from '../..'
diff --git a/src/Shared/Components/ImageCardAccordion/ImageCardAccordion.tsx b/src/Shared/Components/ImageCardAccordion/ImageCardAccordion.tsx
index 0ce73a8a5..431016ce8 100644
--- a/src/Shared/Components/ImageCardAccordion/ImageCardAccordion.tsx
+++ b/src/Shared/Components/ImageCardAccordion/ImageCardAccordion.tsx
@@ -15,10 +15,11 @@
*/
import { useState } from 'react'
+
+import { ReactComponent as ICChevronDown } from '../../../Assets/Icon/ic-chevron-down.svg'
import { CDModalTab, CDModalTabType } from '../../../Common'
import { Vulnerabilities } from '../Security/Vulnerabilities'
import { AccordionItemProps, ImageCardAccordionProps } from './types'
-import { ReactComponent as ICChevronDown } from '../../../Assets/Icon/ic-chevron-down.svg'
const AccordionItem = ({ currentTab, activeTab, setActiveTab, buttonText }: AccordionItemProps) => {
const handleTabSwitch = () => {
diff --git a/src/Shared/Components/ImageCardAccordion/types.ts b/src/Shared/Components/ImageCardAccordion/types.ts
index 7958c1574..e73faf7ed 100644
--- a/src/Shared/Components/ImageCardAccordion/types.ts
+++ b/src/Shared/Components/ImageCardAccordion/types.ts
@@ -15,6 +15,7 @@
*/
import React, { ReactNode } from 'react'
+
import { CDModalTabType, VulnerabilityType } from '../../../Common'
import { MaterialSecurityInfoType } from '../../types'
import { SidebarPropsType } from '../Security'
diff --git a/src/Shared/Components/ImageChipCell/ImageChipCell.component.tsx b/src/Shared/Components/ImageChipCell/ImageChipCell.component.tsx
index b8958e126..c2e99bda1 100644
--- a/src/Shared/Components/ImageChipCell/ImageChipCell.component.tsx
+++ b/src/Shared/Components/ImageChipCell/ImageChipCell.component.tsx
@@ -16,10 +16,13 @@
import { useState } from 'react'
import Tippy from '@tippyjs/react'
-import { RegistryType } from '@Shared/index'
+
+import { RegistryType } from '@Shared/types'
+
+import { RegistryIcon } from '../RegistryIcon'
import { ImageChipCellProps } from './types'
+
import './imageChipCell.scss'
-import { RegistryIcon } from '../RegistryIcon'
const ImageChipCell = ({
imagePath,
diff --git a/src/Shared/Components/ImageChipCell/types.ts b/src/Shared/Components/ImageChipCell/types.ts
index 8eab8395e..5fda48a4a 100644
--- a/src/Shared/Components/ImageChipCell/types.ts
+++ b/src/Shared/Components/ImageChipCell/types.ts
@@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import Tippy from '@tippyjs/react'
import { ComponentProps, SyntheticEvent } from 'react'
+import Tippy from '@tippyjs/react'
+
import { RegistryType } from '../../types'
type ImageChipCellButtonActionProps =
diff --git a/src/Shared/Components/ImageWithFallback/ImageWithFallback.component.tsx b/src/Shared/Components/ImageWithFallback/ImageWithFallback.component.tsx
index c3ed120d9..a867dbcf7 100644
--- a/src/Shared/Components/ImageWithFallback/ImageWithFallback.component.tsx
+++ b/src/Shared/Components/ImageWithFallback/ImageWithFallback.component.tsx
@@ -15,6 +15,7 @@
*/
import { SyntheticEvent, useEffect, useState } from 'react'
+
import { ImageWithFallbackProps } from './types'
const ImageWithFallback = ({ imageProps, fallbackImage }: ImageWithFallbackProps) => {
diff --git a/src/Shared/Components/InfoBlock/InfoBlock.component.tsx b/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
index 4bde6d9a4..e87831c04 100644
--- a/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
+++ b/src/Shared/Components/InfoBlock/InfoBlock.component.tsx
@@ -16,7 +16,8 @@
import { ComponentSizeType } from '@Shared/constants'
import { deriveBorderRadiusAndBorderClassFromConfig } from '@Shared/Helpers'
-import { InfoBlockProps } from './types'
+
+import { Button } from '../Button'
import {
CONTAINER_SIZE_TO_BUTTON_SIZE,
CONTAINER_SIZE_TO_CLASS_MAP,
@@ -24,7 +25,7 @@ import {
VARIANT_TO_BG_MAP,
VARIANT_TO_ICON_MAP,
} from './constants'
-import { Button } from '../Button'
+import { InfoBlockProps } from './types'
const InfoBlock = ({
layout = 'row',
diff --git a/src/Shared/Components/InfoBlock/constants.tsx b/src/Shared/Components/InfoBlock/constants.tsx
index d7979ed5f..e372ad68b 100644
--- a/src/Shared/Components/InfoBlock/constants.tsx
+++ b/src/Shared/Components/InfoBlock/constants.tsx
@@ -15,10 +15,11 @@
*/
import { ReactComponent as ICError } from '@Icons/ic-error.svg'
+import { ReactComponent as ICHelp } from '@Icons/ic-help.svg'
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
-import { ReactComponent as ICHelp } from '@Icons/ic-help.svg'
import { ComponentSizeType } from '@Shared/constants'
+
import { ButtonProps } from '../Button'
import { Icon } from '../Icon'
import { InfoBlockProps } from './types'
diff --git a/src/Shared/Components/InfoBlock/types.ts b/src/Shared/Components/InfoBlock/types.ts
index eeb4def4c..776488e81 100644
--- a/src/Shared/Components/InfoBlock/types.ts
+++ b/src/Shared/Components/InfoBlock/types.ts
@@ -14,9 +14,11 @@
* limitations under the License.
*/
+import { ReactElement, ReactNode } from 'react'
+
import { ComponentSizeType } from '@Shared/constants'
import { BorderConfigType, ComponentLayoutType } from '@Shared/types'
-import { ReactElement, ReactNode } from 'react'
+
import { ButtonComponentType, ButtonProps } from '../Button'
export type InfoBlockProps = {
diff --git a/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx b/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx
index 453891d15..437b05def 100644
--- a/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx
+++ b/src/Shared/Components/InfoIconTippy/InfoIconTippy.tsx
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-import { TippyCustomized } from '../../../Common/TippyCustomized'
-import { TippyTheme, InfoIconTippyProps } from '../../../Common/Types'
-import { ReactComponent as ICHelpOutline } from '../../../Assets/Icon/ic-help-outline.svg'
import { ReactComponent as HelpIcon } from '../../../Assets/Icon/ic-help.svg'
+import { ReactComponent as ICHelpOutline } from '../../../Assets/Icon/ic-help-outline.svg'
+import { TippyCustomized } from '../../../Common/TippyCustomized'
+import { InfoIconTippyProps, TippyTheme } from '../../../Common/Types'
const InfoIconTippy = ({
heading,
diff --git a/src/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.tsx b/src/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.tsx
index 7544a81de..cf25633cf 100644
--- a/src/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.tsx
+++ b/src/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.tsx
@@ -15,6 +15,7 @@
*/
import { Tooltip } from '@Common/Tooltip'
+
import { InvalidYAMLTippyWrapperProps } from './types'
import { getInvalidTippyContent } from './utils'
diff --git a/src/Shared/Components/InvalidYAMLTippy/index.ts b/src/Shared/Components/InvalidYAMLTippy/index.ts
index 574f315c8..46d759cb4 100644
--- a/src/Shared/Components/InvalidYAMLTippy/index.ts
+++ b/src/Shared/Components/InvalidYAMLTippy/index.ts
@@ -15,5 +15,5 @@
*/
export { default as InvalidYAMLTippyWrapper } from './InvalidYAMLTippyWrapper'
-export { getInvalidTippyContent } from './utils'
export { InvalidTippyTypeEnum } from './types'
+export { getInvalidTippyContent } from './utils'
diff --git a/src/Shared/Components/InvalidYAMLTippy/utils.tsx b/src/Shared/Components/InvalidYAMLTippy/utils.tsx
index d2c9e5c18..1f8e8398b 100644
--- a/src/Shared/Components/InvalidYAMLTippy/utils.tsx
+++ b/src/Shared/Components/InvalidYAMLTippy/utils.tsx
@@ -15,6 +15,7 @@
*/
import { ReactComponent as ICArrowCounterClockwise } from '@Icons/ic-arrow-counter-clockwise.svg'
+
import { DEFAULT_INVALID_YAML_ERROR } from './constants'
import { InvalidTippyProps, InvalidTippyTypeEnum } from './types'
diff --git a/src/Shared/Components/KeyValueTable/KeyValueTable.component.tsx b/src/Shared/Components/KeyValueTable/KeyValueTable.component.tsx
index 43855b3d7..a292140df 100644
--- a/src/Shared/Components/KeyValueTable/KeyValueTable.component.tsx
+++ b/src/Shared/Components/KeyValueTable/KeyValueTable.component.tsx
@@ -14,21 +14,22 @@
* limitations under the License.
*/
-import { createRef, useEffect, useRef, useState, ReactElement, Fragment, useMemo } from 'react'
+import { createRef, Fragment, ReactElement, useEffect, useMemo, useRef, useState } from 'react'
import Tippy from '@tippyjs/react'
// eslint-disable-next-line import/no-extraneous-dependencies
import { followCursor } from 'tippy.js'
-import { ReactComponent as ICArrowDown } from '@Icons/ic-sort-arrow-down.svg'
+import { ReactComponent as ICAdd } from '@Icons/ic-add.svg'
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
import { ReactComponent as ICCross } from '@Icons/ic-cross.svg'
-import { ReactComponent as ICAdd } from '@Icons/ic-add.svg'
+import { ReactComponent as ICArrowDown } from '@Icons/ic-sort-arrow-down.svg'
import { ConditionalWrap, ResizableTagTextArea, SortingOrder, useStateFilters } from '@Common/index'
-import { stringComparatorBySortOrder } from '@Shared/Helpers'
import { DEFAULT_SECRET_PLACEHOLDER } from '@Shared/constants'
+import { stringComparatorBySortOrder } from '@Shared/Helpers'
-import { KeyValueRow, KeyValueTableProps } from './KeyValueTable.types'
import { DUPLICATE_KEYS_VALIDATION_MESSAGE, EMPTY_KEY_VALIDATION_MESSAGE } from './constants'
+import { KeyValueRow, KeyValueTableProps } from './KeyValueTable.types'
+
import './KeyValueTable.scss'
const renderWithReadOnlyTippy = (children: ReactElement) => (
diff --git a/src/Shared/Components/KeyValueTable/KeyValueTable.types.ts b/src/Shared/Components/KeyValueTable/KeyValueTable.types.ts
index 51f69fe09..d437b514a 100644
--- a/src/Shared/Components/KeyValueTable/KeyValueTable.types.ts
+++ b/src/Shared/Components/KeyValueTable/KeyValueTable.types.ts
@@ -15,6 +15,7 @@
*/
import { ReactNode } from 'react'
+
import { ResizableTagTextAreaProps } from '../../../Common'
/**
diff --git a/src/Shared/Components/License/ActivateLicenseDialog.tsx b/src/Shared/Components/License/ActivateLicenseDialog.tsx
index b5a3b5efd..5dc2c7262 100644
--- a/src/Shared/Components/License/ActivateLicenseDialog.tsx
+++ b/src/Shared/Components/License/ActivateLicenseDialog.tsx
@@ -1,5 +1,8 @@
import { ChangeEvent, SyntheticEvent, useState } from 'react'
+
import { ReactComponent as ICCross } from '@Icons/ic-cross.svg'
+import { API_STATUS_CODES } from '@Common/Constants'
+import { showError } from '@Common/index'
import {
ActivateLicenseDialogProps,
Button,
@@ -14,11 +17,10 @@ import {
ToastManager,
ToastVariantType,
} from '@Shared/index'
-import { API_STATUS_CODES } from '@Common/Constants'
-import { showError } from '@Common/index'
-import { getGateKeeperUrl } from './utils'
-import { activateLicense } from './services'
+
import { GatekeeperQRDialog, ICDevtronWithBorder } from './License.components'
+import { activateLicense } from './services'
+import { getGateKeeperUrl } from './utils'
const ActivateLicenseDialog = ({
fingerprint,
diff --git a/src/Shared/Components/License/DevtronLicenseCard.tsx b/src/Shared/Components/License/DevtronLicenseCard.tsx
index f90a75538..25395dcc6 100644
--- a/src/Shared/Components/License/DevtronLicenseCard.tsx
+++ b/src/Shared/Components/License/DevtronLicenseCard.tsx
@@ -1,20 +1,19 @@
import { useEffect, useRef } from 'react'
import { animate, motion, useMotionTemplate, useMotionValue, useTransform } from 'framer-motion'
-import { ClipboardButton, getTTLInHumanReadableFormat } from '@Common/index'
+
import { ReactComponent as ICChatSupport } from '@IconsV2/ic-chat-circle-dots.svg'
-import { getThemeOppositeThemeClass } from '@Shared/Providers/ThemeProvider/utils'
-import {
- AppThemeType,
- CONTACT_SUPPORT_LINK,
- DevtronLicenseCardProps,
- ENTERPRISE_SUPPORT_LINK,
- getHandleOpenURL,
- LicenseStatus,
-} from '@Shared/index'
import { ReactComponent as TexturedBG } from '@Images/licenseCardBG.svg'
+import { ClipboardButton, getTTLInHumanReadableFormat } from '@Common/index'
+import { CONTACT_SUPPORT_LINK, ENTERPRISE_SUPPORT_LINK } from '@Shared/constants'
+import { getHandleOpenURL } from '@Shared/Helpers'
+import { AppThemeType } from '@Shared/Providers'
+import { getThemeOppositeThemeClass } from '@Shared/Providers/ThemeProvider/utils'
+
import { Button, ButtonVariantType } from '../Button'
import { Icon } from '../Icon'
+import { DevtronLicenseCardProps, LicenseStatus } from './types'
import { getLicenseColorsAccordingToStatus } from './utils'
+
import './licenseCard.scss'
const DAMPEN_FACTOR = 50
diff --git a/src/Shared/Components/License/License.components.tsx b/src/Shared/Components/License/License.components.tsx
index d5b4a20f2..df879988a 100644
--- a/src/Shared/Components/License/License.components.tsx
+++ b/src/Shared/Components/License/License.components.tsx
@@ -1,9 +1,10 @@
-import { ClipboardButton, copyToClipboard, showError } from '@Common/index'
-
-import { DOCUMENTATION } from '@Common/Constants'
import { useEffect, useRef, useState } from 'react'
-import { ReactComponent as ICClipboard } from '@Icons/ic-copy.svg'
+
import { ReactComponent as ICCheck } from '@Icons/ic-check.svg'
+import { ReactComponent as ICClipboard } from '@Icons/ic-copy.svg'
+import { DOCUMENTATION } from '@Common/Constants'
+import { ClipboardButton, copyToClipboard, showError } from '@Common/index'
+
import { Backdrop, Button, ButtonStyleType, ButtonVariantType, Icon, InfoIconTippy, QRCode } from '..'
import { CopyButtonProps, GatekeeperQRDialogProps, InstallFingerprintInfoProps } from './types'
import { getGateKeeperUrl } from './utils'
diff --git a/src/Shared/Components/License/index.tsx b/src/Shared/Components/License/index.tsx
index 68f9c27d5..671b23814 100644
--- a/src/Shared/Components/License/index.tsx
+++ b/src/Shared/Components/License/index.tsx
@@ -1,6 +1,5 @@
-export { default as DevtronLicenseCard } from './DevtronLicenseCard'
-export { parseDevtronLicenseData } from './utils'
-export { default as InstallationFingerprintInfo, ICDevtronWithBorder } from './License.components'
export { default as ActivateLicenseDialog } from './ActivateLicenseDialog'
-
+export { default as DevtronLicenseCard } from './DevtronLicenseCard'
+export { ICDevtronWithBorder, default as InstallationFingerprintInfo } from './License.components'
export * from './types'
+export { parseDevtronLicenseData } from './utils'
diff --git a/src/Shared/Components/License/types.ts b/src/Shared/Components/License/types.ts
index 047348c36..614aa9f97 100644
--- a/src/Shared/Components/License/types.ts
+++ b/src/Shared/Components/License/types.ts
@@ -1,4 +1,5 @@
-import { AppThemeType, DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/index'
+import { AppThemeType } from '@Shared/Providers'
+import { DevtronLicenseBaseDTO, DevtronLicenseDTO } from '@Shared/types'
export enum LicenseStatus {
ACTIVE = 'ACTIVE',
diff --git a/src/Shared/Components/License/utils.tsx b/src/Shared/Components/License/utils.tsx
index 8ca3b6d0f..0f011841f 100644
--- a/src/Shared/Components/License/utils.tsx
+++ b/src/Shared/Components/License/utils.tsx
@@ -1,7 +1,10 @@
import moment from 'moment'
+
import { DATE_TIME_FORMATS } from '@Common/Constants'
-import { DevtronLicenseCardProps, DevtronLicenseDTO, DevtronLicenseInfo, LicenseStatus } from '@Shared/index'
import { getUrlWithSearchParams } from '@Common/index'
+import { DevtronLicenseDTO } from '@Shared/types'
+
+import { DevtronLicenseCardProps, DevtronLicenseInfo, LicenseStatus } from './types'
export const getLicenseColorsAccordingToStatus = (
licenseStatus: LicenseStatus,
diff --git a/src/Shared/Components/LoginBanner/LoginBanner.tsx b/src/Shared/Components/LoginBanner/LoginBanner.tsx
index 5fcc6e183..c2981b6af 100644
--- a/src/Shared/Components/LoginBanner/LoginBanner.tsx
+++ b/src/Shared/Components/LoginBanner/LoginBanner.tsx
@@ -1,6 +1,8 @@
-import { motion } from 'framer-motion'
import { useEffect, useState } from 'react'
+import { motion } from 'framer-motion'
+
import LoginBannerImg from '@Images/login-screen-ui.webp'
+
import { Icon } from '../Icon'
import { TESTIMONIAL_CARD_DATA, TESTIMONIAL_CARD_INTERVAL, TRANSITION_EASE_CURVE } from './constants'
diff --git a/src/Shared/Components/LogoutCard.tsx b/src/Shared/Components/LogoutCard.tsx
index b80ad6aa7..6f2e4cece 100644
--- a/src/Shared/Components/LogoutCard.tsx
+++ b/src/Shared/Components/LogoutCard.tsx
@@ -16,11 +16,13 @@
import React from 'react'
import { useHistory } from 'react-router-dom'
-import { useMainContext } from '@Shared/Providers'
+
import { clearCookieOnLogout } from '@Shared/Helpers'
+import { useMainContext } from '@Shared/Providers'
+
import { getRandomColor, stopPropagation } from '../../Common'
-import { ThemeSwitcher } from './ThemeSwitcher'
import { Icon } from './Icon'
+import { ThemeSwitcher } from './ThemeSwitcher'
interface LogoutCardType {
className: string
diff --git a/src/Shared/Components/MaterialHistory/MaterialHistory.component.tsx b/src/Shared/Components/MaterialHistory/MaterialHistory.component.tsx
index d994d645b..9764a8292 100644
--- a/src/Shared/Components/MaterialHistory/MaterialHistory.component.tsx
+++ b/src/Shared/Components/MaterialHistory/MaterialHistory.component.tsx
@@ -14,9 +14,11 @@
* limitations under the License.
*/
+import { useMemo } from 'react'
+
import { getWebhookDate } from '@Shared/Helpers'
import { MaterialHistoryType } from '@Shared/Services'
-import { useMemo } from 'react'
+
import { SourceTypeMap } from '../../../Common'
import { GitCommitInfoGeneric } from '../GitCommitInfoGeneric'
import { MaterialHistoryProps } from './types'
diff --git a/src/Shared/Components/NumbersCount/NumbersCount.component.tsx b/src/Shared/Components/NumbersCount/NumbersCount.component.tsx
index e28d0a9cc..95714af75 100644
--- a/src/Shared/Components/NumbersCount/NumbersCount.component.tsx
+++ b/src/Shared/Components/NumbersCount/NumbersCount.component.tsx
@@ -15,6 +15,7 @@
*/
import { ReactComponent as ICTilde } from '@Icons/ic-tilde.svg'
+
import { NumbersCountProps } from './types'
const NumbersCount = ({ count, isApprox, isSelected }: NumbersCountProps) => (
diff --git a/src/Shared/Components/PhoneInput/PhoneInput.component.tsx b/src/Shared/Components/PhoneInput/PhoneInput.component.tsx
index f34d130d2..34e452a62 100644
--- a/src/Shared/Components/PhoneInput/PhoneInput.component.tsx
+++ b/src/Shared/Components/PhoneInput/PhoneInput.component.tsx
@@ -1,10 +1,12 @@
-import { usePhoneInput } from 'react-international-phone'
-import { CountryISO2Type } from '@Shared/index'
import { useRef, useState } from 'react'
-import { PhoneInputProps } from './types'
+import { usePhoneInput } from 'react-international-phone'
+
+import { CountryISO2Type } from '@Shared/types'
+
import { CountrySelect } from '../CountrySelect'
import { CustomInput } from '../CustomInput'
import { FormFieldInfo } from '../FormFieldWrapper'
+import { PhoneInputProps } from './types'
const PhoneInput = ({
error,
diff --git a/src/Shared/Components/PhoneInput/types.ts b/src/Shared/Components/PhoneInput/types.ts
index da2c4a3d5..ea8461404 100644
--- a/src/Shared/Components/PhoneInput/types.ts
+++ b/src/Shared/Components/PhoneInput/types.ts
@@ -1,4 +1,5 @@
import { ComponentProps } from 'react'
+
import { CountrySelect } from '../CountrySelect'
export interface PhoneInputProps {
diff --git a/src/Shared/Components/Plugin/PluginCard.tsx b/src/Shared/Components/Plugin/PluginCard.tsx
index 62c022c0c..7fa8c4149 100644
--- a/src/Shared/Components/Plugin/PluginCard.tsx
+++ b/src/Shared/Components/Plugin/PluginCard.tsx
@@ -14,11 +14,11 @@
* limitations under the License.
*/
+import { ReactComponent as ICBookOpen } from '../../../Assets/Icon/ic-book-open.svg'
import { Checkbox, CHECKBOX_VALUE, stopPropagation } from '../../../Common'
import PluginImageContainer from './PluginImageContainer'
import PluginTagsContainer from './PluginTagsContainer'
import { PluginCardProps } from './types'
-import { ReactComponent as ICBookOpen } from '../../../Assets/Icon/ic-book-open.svg'
const PluginCard = ({
isSelectable,
diff --git a/src/Shared/Components/Plugin/PluginImageContainer.tsx b/src/Shared/Components/Plugin/PluginImageContainer.tsx
index 141d9c1b4..ab8bb88ac 100644
--- a/src/Shared/Components/Plugin/PluginImageContainer.tsx
+++ b/src/Shared/Components/Plugin/PluginImageContainer.tsx
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-import { PluginImageContainerProps } from './types'
import { ReactComponent as ICLegoBlock } from '../../../Assets/Icon/ic-lego-block.svg'
import { ImageWithFallback } from '../ImageWithFallback'
+import { PluginImageContainerProps } from './types'
const PluginImageContainer = ({ imageProps, fallbackImageClassName }: PluginImageContainerProps) => (
({
container: (base, state) => ({
diff --git a/src/Shared/Components/RegistryIcon/constants.tsx b/src/Shared/Components/RegistryIcon/constants.tsx
index e534ce16c..d464236c9 100644
--- a/src/Shared/Components/RegistryIcon/constants.tsx
+++ b/src/Shared/Components/RegistryIcon/constants.tsx
@@ -16,6 +16,7 @@
import { RegistryTypeDetailType } from '@Common/Types'
import { RegistryType } from '@Shared/types'
+
import { RegistryIcon } from './RegistryIcon'
export const REGISTRY_TYPE_MAP: Record = {
diff --git a/src/Shared/Components/RegistryIcon/index.ts b/src/Shared/Components/RegistryIcon/index.ts
index 48f834351..f47fdefd5 100644
--- a/src/Shared/Components/RegistryIcon/index.ts
+++ b/src/Shared/Components/RegistryIcon/index.ts
@@ -14,5 +14,5 @@
* limitations under the License.
*/
-export * from './RegistryIcon'
export * from './constants'
+export * from './RegistryIcon'
diff --git a/src/Shared/Components/RegistryIcon/types.ts b/src/Shared/Components/RegistryIcon/types.ts
index b78024c65..bd974aa22 100644
--- a/src/Shared/Components/RegistryIcon/types.ts
+++ b/src/Shared/Components/RegistryIcon/types.ts
@@ -15,6 +15,7 @@
*/
import { RegistryType } from '@Shared/types'
+
import { IconsProps } from '../Icon'
export interface RegistryIconProps {
diff --git a/src/Shared/Components/SSOProviderIcon/SSOProviderIcon.tsx b/src/Shared/Components/SSOProviderIcon/SSOProviderIcon.tsx
index 7a3fe9e43..76ec0bdb7 100644
--- a/src/Shared/Components/SSOProviderIcon/SSOProviderIcon.tsx
+++ b/src/Shared/Components/SSOProviderIcon/SSOProviderIcon.tsx
@@ -15,9 +15,9 @@
*/
import { SSOProvider } from '@Common/Constants'
-import { SSOProviderIconProps } from './types'
import { Icon, IconName } from '../Icon'
+import { SSOProviderIconProps } from './types'
const ssoProviderIconMap: Record = {
[SSOProvider.google]: 'ic-google',
diff --git a/src/Shared/Components/ScannedByToolModal/ScannedByToolModal.tsx b/src/Shared/Components/ScannedByToolModal/ScannedByToolModal.tsx
index 51097ab86..9772b5832 100644
--- a/src/Shared/Components/ScannedByToolModal/ScannedByToolModal.tsx
+++ b/src/Shared/Components/ScannedByToolModal/ScannedByToolModal.tsx
@@ -15,9 +15,11 @@
*/
import React from 'react'
+
import { ReactComponent as ICScanFallback } from '@Icons/ic-scan-fallback.svg'
-import { ScannedByToolModalProps } from './types'
+
import { ImageWithFallback } from '../ImageWithFallback'
+import { ScannedByToolModalProps } from './types'
const ScannedByToolModal: React.FC = ({
scanToolName,
diff --git a/src/Shared/Components/Security/SecurityDetailsCards/SecurityCard.tsx b/src/Shared/Components/Security/SecurityDetailsCards/SecurityCard.tsx
index b5296a7d4..c728c555f 100644
--- a/src/Shared/Components/Security/SecurityDetailsCards/SecurityCard.tsx
+++ b/src/Shared/Components/Security/SecurityDetailsCards/SecurityCard.tsx
@@ -14,17 +14,19 @@
* limitations under the License.
*/
-import { SegmentedBarChart } from '@Common/SegmentedBarChart'
-import { ReactComponent as ICShieldWarning } from '@Icons/ic-shield-warning-outline.svg'
-import { ReactComponent as ICShieldSecure } from '@Icons/ic-shield-check.svg'
-import { ReactComponent as ICError } from '@Icons/ic-error-exclamation.svg'
import { ReactComponent as ICArrowRight } from '@Icons/ic-caret-down-small.svg'
-import { SecurityCardProps } from './types'
-import { SUB_CATEGORIES } from '../SecurityModal/types'
+import { ReactComponent as ICError } from '@Icons/ic-error-exclamation.svg'
+import { ReactComponent as ICShieldSecure } from '@Icons/ic-shield-check.svg'
+import { ReactComponent as ICShieldWarning } from '@Icons/ic-shield-warning-outline.svg'
+import { SegmentedBarChart } from '@Common/SegmentedBarChart'
+
+import { SECURITY_CONFIG } from '../constants'
import { SEVERITIES } from '../SecurityModal/constants'
-import './securityCard.scss'
+import { SUB_CATEGORIES } from '../SecurityModal/types'
import { getTotalSeverities } from '../utils'
-import { SECURITY_CONFIG } from '../constants'
+import { SecurityCardProps } from './types'
+
+import './securityCard.scss'
const SecurityCard = ({
category,
diff --git a/src/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.tsx b/src/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.tsx
index 132d5ee26..27d5301b1 100644
--- a/src/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.tsx
+++ b/src/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.tsx
@@ -14,19 +14,22 @@
* limitations under the License.
*/
-import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
-import { EMPTY_STATE_STATUS } from '@Shared/constants'
import { useState } from 'react'
-import { GenericEmptyState } from '@Common/index'
+
import { ReactComponent as NoVulnerability } from '@Icons/ic-vulnerability-not-found.svg'
+import { GenericEmptyState } from '@Common/index'
import { GenericSectionErrorState } from '@Shared/Components/GenericSectionErrorState'
-import SecurityCard from './SecurityCard'
-import { CATEGORIES, SecurityModalStateType, SUB_CATEGORIES } from '../SecurityModal/types'
-import { SecurityCardProps, SecurityDetailsCardsProps } from './types'
+import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
+import { EMPTY_STATE_STATUS } from '@Shared/constants'
+
import { SecurityModal } from '../SecurityModal'
import { DEFAULT_SECURITY_MODAL_IMAGE_STATE } from '../SecurityModal/constants'
+import { CATEGORIES, SecurityModalStateType, SUB_CATEGORIES } from '../SecurityModal/types'
import { ScanCategories, ScanSubCategories } from '../types'
-import { getSecurityConfig, getCompiledSecurityThreats, getTotalSeverities, getStatusForScanList } from '../utils'
+import { getCompiledSecurityThreats, getSecurityConfig, getStatusForScanList, getTotalSeverities } from '../utils'
+import SecurityCard from './SecurityCard'
+import { SecurityCardProps, SecurityDetailsCardsProps } from './types'
+
import './securityCard.scss'
const SecurityDetailsCards = ({ scanResult, Sidebar }: SecurityDetailsCardsProps) => {
diff --git a/src/Shared/Components/Security/SecurityModal/SecurityModal.tsx b/src/Shared/Components/Security/SecurityModal/SecurityModal.tsx
index fb4a0c75b..4e0c55de6 100644
--- a/src/Shared/Components/Security/SecurityModal/SecurityModal.tsx
+++ b/src/Shared/Components/Security/SecurityModal/SecurityModal.tsx
@@ -15,24 +15,27 @@
*/
import React, { useState } from 'react'
+
+import { ReactComponent as ICBack } from '@Icons/ic-caret-left-small.svg'
+import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
import {
- ErrorScreenManager,
ClipboardButton,
+ ErrorScreenManager,
GenericEmptyState,
ImageType,
Progressing,
stopPropagation,
VisibleModal2,
} from '@Common/index'
-import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
-import { ReactComponent as ICBack } from '@Icons/ic-caret-left-small.svg'
import { Button, ButtonStyleType, ButtonVariantType } from '@Shared/Components/Button'
import { ComponentSizeType } from '@Shared/constants'
-import { Table, InfoCard } from './components'
-import { getDefaultSecurityModalState } from './constants'
-import { getTableData, getInfoCardData } from './config'
-import { SecurityModalPropsType, SecurityModalStateType, DetailViewDataType } from './types'
+
import { getEmptyStateValues } from './config/EmptyState'
+import { InfoCard, Table } from './components'
+import { getInfoCardData, getTableData } from './config'
+import { getDefaultSecurityModalState } from './constants'
+import { DetailViewDataType, SecurityModalPropsType, SecurityModalStateType } from './types'
+
import './styles.scss'
/**
diff --git a/src/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.tsx b/src/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.tsx
index 08e20a535..b72479055 100644
--- a/src/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.tsx
+++ b/src/Shared/Components/Security/SecurityModal/components/IndexedTextDisplay.tsx
@@ -15,8 +15,10 @@
*/
import React from 'react'
-import { ClipboardButton } from '@Common/index'
+
import { ReactComponent as ICInfoOutline } from '@Icons/ic-info-outlined.svg'
+import { ClipboardButton } from '@Common/index'
+
import { IndexedTextDisplayPropsType } from '../types'
const EmptyState: React.FC<{ href: string }> = ({ href }) => (
diff --git a/src/Shared/Components/Security/SecurityModal/components/InfoCard.tsx b/src/Shared/Components/Security/SecurityModal/components/InfoCard.tsx
index f8f097c2e..086f5268b 100644
--- a/src/Shared/Components/Security/SecurityModal/components/InfoCard.tsx
+++ b/src/Shared/Components/Security/SecurityModal/components/InfoCard.tsx
@@ -16,10 +16,12 @@
import React from 'react'
import dayjs from 'dayjs'
-import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
-import { SegmentedBarChart } from '@Common/SegmentedBarChart'
+
import { ReactComponent as ICClock } from '@Icons/ic-clock.svg'
-import { ZERO_TIME_STRING, DATE_TIME_FORMATS } from '../../../../../Common/Constants'
+import { SegmentedBarChart } from '@Common/SegmentedBarChart'
+import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
+
+import { DATE_TIME_FORMATS, ZERO_TIME_STRING } from '../../../../../Common/Constants'
import { InfoCardPropsType } from '../types'
const InfoCard: React.FC = ({ entities, lastScanTimeString, scanToolName, scanToolUrl }) => (
diff --git a/src/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.tsx b/src/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.tsx
index fa26ed470..67c3744d5 100644
--- a/src/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.tsx
+++ b/src/Shared/Components/Security/SecurityModal/components/OpenDetailViewButton.tsx
@@ -15,6 +15,7 @@
*/
import { PropsWithChildren } from 'react'
+
import { OpenDetailViewButtonProps } from '../types'
const OpenDetailViewButton = ({
diff --git a/src/Shared/Components/Security/SecurityModal/components/Table.tsx b/src/Shared/Components/Security/SecurityModal/components/Table.tsx
index 3eff5bf88..c857e11b4 100644
--- a/src/Shared/Components/Security/SecurityModal/components/Table.tsx
+++ b/src/Shared/Components/Security/SecurityModal/components/Table.tsx
@@ -14,10 +14,12 @@
* limitations under the License.
*/
-import React, { useState, useMemo } from 'react'
-import { SortableTableHeaderCell } from '@Common/SortableTableHeaderCell'
-import { SortingOrder } from '@Common/Constants'
+import React, { useMemo, useState } from 'react'
+
import { ReactComponent as ICExpand } from '@Icons/ic-expand.svg'
+import { SortingOrder } from '@Common/Constants'
+import { SortableTableHeaderCell } from '@Common/SortableTableHeaderCell'
+
import { SortOrderEnum, TablePropsType, TableSortStateType } from '../types'
import { compareStringAndObject } from '../utils'
diff --git a/src/Shared/Components/Security/SecurityModal/components/index.ts b/src/Shared/Components/Security/SecurityModal/components/index.ts
index b8027ff7e..645d3df2a 100644
--- a/src/Shared/Components/Security/SecurityModal/components/index.ts
+++ b/src/Shared/Components/Security/SecurityModal/components/index.ts
@@ -14,6 +14,6 @@
* limitations under the License.
*/
-export { default as Table } from './Table'
export { default as InfoCard } from './InfoCard'
export { default as OpenDetailViewButton } from './OpenDetailViewButton'
+export { default as Table } from './Table'
diff --git a/src/Shared/Components/Security/SecurityModal/config/CodeScan.tsx b/src/Shared/Components/Security/SecurityModal/config/CodeScan.tsx
index 068904b4c..8d89bdd68 100644
--- a/src/Shared/Components/Security/SecurityModal/config/CodeScan.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/CodeScan.tsx
@@ -14,17 +14,11 @@
* limitations under the License.
*/
+import { getCVEUrlFromCVEName } from '../../utils'
+import { OpenDetailViewButton } from '../components'
import IndexedTextDisplay from '../components/IndexedTextDisplay'
-import {
- compareSeverities,
- compareSeverity,
- getScanCompletedEmptyState,
- mapSeveritiesToSegmentedBarChartEntities,
- stringifySeverities,
-} from '../utils'
import { SCAN_FAILED_EMPTY_STATE, SCAN_IN_PROGRESS_EMPTY_STATE, SEVERITY_DEFAULT_SORT_ORDER } from '../constants'
import {
- ScanResultDTO,
CATEGORIES,
CodeScan,
CodeScanExposedSecretsListType,
@@ -33,13 +27,19 @@ import {
EmptyStateType,
InfoCardPropsType,
OpenDetailViewButtonProps,
- SUB_CATEGORIES,
+ ScanResultDTO,
SecurityModalStateType,
StatusType,
+ SUB_CATEGORIES,
TablePropsType,
} from '../types'
-import { OpenDetailViewButton } from '../components'
-import { getCVEUrlFromCVEName } from '../../utils'
+import {
+ compareSeverities,
+ compareSeverity,
+ getScanCompletedEmptyState,
+ mapSeveritiesToSegmentedBarChartEntities,
+ stringifySeverities,
+} from '../utils'
export const getCodeScanVulnerabilities = (data: CodeScan['vulnerability'], hidePolicy: boolean) => ({
headers: [
diff --git a/src/Shared/Components/Security/SecurityModal/config/EmptyState.tsx b/src/Shared/Components/Security/SecurityModal/config/EmptyState.tsx
index d6a4d52dd..ae28e3fd0 100644
--- a/src/Shared/Components/Security/SecurityModal/config/EmptyState.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/EmptyState.tsx
@@ -14,10 +14,10 @@
* limitations under the License.
*/
+import { CATEGORIES, DetailViewDataType, ScanResultDTO, SecurityModalStateType } from '../types'
import { getCodeScanEmptyState } from './CodeScan'
import { getImageScanEmptyState } from './ImageScan'
import { getKubernetesManifestEmptyState } from './KubernetesManifest'
-import { ScanResultDTO, CATEGORIES, DetailViewDataType, SecurityModalStateType } from '../types'
export const getEmptyStateValues = (
data: ScanResultDTO,
diff --git a/src/Shared/Components/Security/SecurityModal/config/ImageScan.tsx b/src/Shared/Components/Security/SecurityModal/config/ImageScan.tsx
index cf151e51d..393682510 100644
--- a/src/Shared/Components/Security/SecurityModal/config/ImageScan.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/ImageScan.tsx
@@ -15,24 +15,28 @@
*/
import dayjs from 'dayjs'
-import { Progressing } from '@Common/Progressing'
+
import { ReactComponent as ICError } from '@Icons/ic-error-cross.svg'
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
-import { ZERO_TIME_STRING, DATE_TIME_FORMATS } from '../../../../../Common/Constants'
+import { Progressing } from '@Common/Progressing'
+
+import { DATE_TIME_FORMATS, ZERO_TIME_STRING } from '../../../../../Common/Constants'
+import { OpenDetailViewButton } from '../components'
+import { SCAN_FAILED_EMPTY_STATE, SCAN_IN_PROGRESS_EMPTY_STATE, SEVERITY_DEFAULT_SORT_ORDER } from '../constants'
import {
+ CATEGORIES,
DetailViewDataType,
- ImageScanVulnerabilityListType,
+ EmptyStateType,
ImageScan,
- SUB_CATEGORIES,
- SecurityModalStateType,
- TablePropsType,
- StatusType,
- InfoCardPropsType,
ImageScanLicenseListType,
- EmptyStateType,
- ScanResultDTO,
- CATEGORIES,
+ ImageScanVulnerabilityListType,
+ InfoCardPropsType,
OpenDetailViewButtonProps,
+ ScanResultDTO,
+ SecurityModalStateType,
+ StatusType,
+ SUB_CATEGORIES,
+ TablePropsType,
} from '../types'
import {
compareSeverities,
@@ -42,9 +46,7 @@ import {
mapSeveritiesToSegmentedBarChartEntities,
stringifySeverities,
} from '../utils'
-import { SCAN_FAILED_EMPTY_STATE, SCAN_IN_PROGRESS_EMPTY_STATE, SEVERITY_DEFAULT_SORT_ORDER } from '../constants'
import { getCodeScanVulnerabilities } from './CodeScan'
-import { OpenDetailViewButton } from '../components'
const getVulnerabilitiesDetailBaseData = (element: ImageScanVulnerabilityListType) => ({
titlePrefix: 'Image',
diff --git a/src/Shared/Components/Security/SecurityModal/config/InfoCard.tsx b/src/Shared/Components/Security/SecurityModal/config/InfoCard.tsx
index 731df4b42..c55d8daa6 100644
--- a/src/Shared/Components/Security/SecurityModal/config/InfoCard.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/InfoCard.tsx
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-import { InfoCardPropsType, ScanResultDTO, CATEGORIES, SecurityModalStateType } from '../types'
-import { getImageScanInfoCardData } from './ImageScan'
+import { CATEGORIES, InfoCardPropsType, ScanResultDTO, SecurityModalStateType } from '../types'
import { getCodeScanInfoCardData } from './CodeScan'
+import { getImageScanInfoCardData } from './ImageScan'
import { getKubernetesManifestInfoCardData } from './KubernetesManifest'
export const getInfoCardData = (
diff --git a/src/Shared/Components/Security/SecurityModal/config/KubernetesManifest.tsx b/src/Shared/Components/Security/SecurityModal/config/KubernetesManifest.tsx
index af80891ee..78e7a9336 100644
--- a/src/Shared/Components/Security/SecurityModal/config/KubernetesManifest.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/KubernetesManifest.tsx
@@ -14,20 +14,20 @@
* limitations under the License.
*/
-import { getScanCompletedEmptyState, mapSeveritiesToSegmentedBarChartEntities } from '../utils'
+import { SCAN_FAILED_EMPTY_STATE, SCAN_IN_PROGRESS_EMPTY_STATE } from '../constants'
import {
- ScanResultDTO,
CATEGORIES,
DetailViewDataType,
EmptyStateType,
InfoCardPropsType,
KubernetesManifest,
OpenDetailViewButtonProps,
- SUB_CATEGORIES,
+ ScanResultDTO,
SecurityModalStateType,
+ SUB_CATEGORIES,
TablePropsType,
} from '../types'
-import { SCAN_FAILED_EMPTY_STATE, SCAN_IN_PROGRESS_EMPTY_STATE } from '../constants'
+import { getScanCompletedEmptyState, mapSeveritiesToSegmentedBarChartEntities } from '../utils'
import { getCodeScanExposedSecrets, getCodeScanMisconfigurations } from './CodeScan'
export const getKubernetesManifestTableData = (
diff --git a/src/Shared/Components/Security/SecurityModal/config/Sidebar.ts b/src/Shared/Components/Security/SecurityModal/config/Sidebar.ts
index 5666470cd..569f55e3d 100644
--- a/src/Shared/Components/Security/SecurityModal/config/Sidebar.ts
+++ b/src/Shared/Components/Security/SecurityModal/config/Sidebar.ts
@@ -16,7 +16,7 @@
import { ScanCategoriesWithLicense } from '../../types'
import { CATEGORY_LABELS, SUB_CATEGORY_LABELS } from '../constants'
-import { CATEGORIES, SUB_CATEGORIES, SidebarDataType } from '../types'
+import { CATEGORIES, SidebarDataType, SUB_CATEGORIES } from '../types'
export const getSidebarData = (categoriesConfig: Record): SidebarDataType[] => {
const { imageScan, codeScan, kubernetesManifest, imageScanLicenseRisks } = categoriesConfig
diff --git a/src/Shared/Components/Security/SecurityModal/config/Table.tsx b/src/Shared/Components/Security/SecurityModal/config/Table.tsx
index cb36d5e3f..e9adc0faf 100644
--- a/src/Shared/Components/Security/SecurityModal/config/Table.tsx
+++ b/src/Shared/Components/Security/SecurityModal/config/Table.tsx
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-import { ScanResultDTO, CATEGORIES, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types'
-import { getImageScanTableData } from './ImageScan'
+import { CATEGORIES, OpenDetailViewButtonProps, ScanResultDTO, SecurityModalStateType, TablePropsType } from '../types'
import { getCodeScanTableData } from './CodeScan'
+import { getImageScanTableData } from './ImageScan'
import { getKubernetesManifestTableData } from './KubernetesManifest'
export const getTableData = (
diff --git a/src/Shared/Components/Security/SecurityModal/config/index.ts b/src/Shared/Components/Security/SecurityModal/config/index.ts
index 55215fc09..974736e69 100644
--- a/src/Shared/Components/Security/SecurityModal/config/index.ts
+++ b/src/Shared/Components/Security/SecurityModal/config/index.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-export { getTableData } from './Table'
+export { getProgressingStateForStatus } from './ImageScan'
export { getInfoCardData } from './InfoCard'
export { getSidebarData } from './Sidebar'
-export { getProgressingStateForStatus } from './ImageScan'
+export { getTableData } from './Table'
diff --git a/src/Shared/Components/Security/SecurityModal/constants.tsx b/src/Shared/Components/Security/SecurityModal/constants.tsx
index 41c5e7847..f838c24ed 100644
--- a/src/Shared/Components/Security/SecurityModal/constants.tsx
+++ b/src/Shared/Components/Security/SecurityModal/constants.tsx
@@ -14,17 +14,18 @@
* limitations under the License.
*/
-import PageNotFound from '@Images/ic-page-not-found.svg'
import { ReactComponent as MechanicalOperation } from '@Icons/ic-mechanical-operation.svg'
+import PageNotFound from '@Images/ic-page-not-found.svg'
+
+import { ScanCategoriesWithLicense } from '../types'
import {
CATEGORIES,
- SUB_CATEGORIES,
- SeveritiesDTO,
- SortOrderEnum,
EmptyStateType,
SecurityModalStateType,
+ SeveritiesDTO,
+ SortOrderEnum,
+ SUB_CATEGORIES,
} from './types'
-import { ScanCategoriesWithLicense } from '../types'
export const DEFAULT_SECURITY_MODAL_IMAGE_STATE = {
category: CATEGORIES.IMAGE_SCAN,
diff --git a/src/Shared/Components/Security/SecurityModal/index.ts b/src/Shared/Components/Security/SecurityModal/index.ts
index fb4207073..466b11348 100644
--- a/src/Shared/Components/Security/SecurityModal/index.ts
+++ b/src/Shared/Components/Security/SecurityModal/index.ts
@@ -14,21 +14,21 @@
* limitations under the License.
*/
+export { getProgressingStateForStatus, getSidebarData } from './config'
+export { CATEGORY_LABELS } from './constants'
export { default as SecurityModal } from './SecurityModal'
-export {
- getSecurityScanSeveritiesCount,
- getTotalVulnerabilityCount,
- parseGetResourceScanDetailsResponse,
-} from './utils'
+export { getSecurityScan } from './service'
export type {
+ GetResourceScanDetailsPayloadType,
+ GetResourceScanDetailsResponseType,
ScanResultDTO,
- SidebarPropsType,
SidebarDataChildType,
SidebarDataType,
- GetResourceScanDetailsPayloadType,
- GetResourceScanDetailsResponseType,
+ SidebarPropsType,
} from './types'
export { SeveritiesDTO } from './types'
-export { getSidebarData, getProgressingStateForStatus } from './config'
-export { CATEGORY_LABELS } from './constants'
-export { getSecurityScan } from './service'
+export {
+ getSecurityScanSeveritiesCount,
+ getTotalVulnerabilityCount,
+ parseGetResourceScanDetailsResponse,
+} from './utils'
diff --git a/src/Shared/Components/Security/SecurityModal/service.ts b/src/Shared/Components/Security/SecurityModal/service.ts
index acebdbaca..6ae40c5c0 100644
--- a/src/Shared/Components/Security/SecurityModal/service.ts
+++ b/src/Shared/Components/Security/SecurityModal/service.ts
@@ -14,10 +14,11 @@
* limitations under the License.
*/
+import { get } from '@Common/API'
import { ROUTES } from '@Common/Constants'
import { getUrlWithSearchParams } from '@Common/Helper'
-import { get } from '@Common/API'
import { ResponseType } from '@Common/Types'
+
import { ScanResultDTO, ScanResultParamsType } from './types'
export const getSecurityScan = async ({
diff --git a/src/Shared/Components/Security/SecurityModal/types.ts b/src/Shared/Components/Security/SecurityModal/types.ts
index 17849dfa9..b1588666a 100644
--- a/src/Shared/Components/Security/SecurityModal/types.ts
+++ b/src/Shared/Components/Security/SecurityModal/types.ts
@@ -15,10 +15,12 @@
*/
import React from 'react'
-import { GenericEmptyStateType } from '@Common/Types'
-import { LastExecutionResultType, NodeType, Nodes } from '@Shared/types'
+
import { SegmentedBarChartProps } from '@Common/SegmentedBarChart'
import { ServerErrors } from '@Common/ServerError'
+import { GenericEmptyStateType } from '@Common/Types'
+import { LastExecutionResultType, Nodes, NodeType } from '@Shared/types'
+
import { ScanCategories, ScanSubCategories } from '../types'
export interface GetResourceScanDetailsPayloadType {
diff --git a/src/Shared/Components/Security/SecurityModal/utils.tsx b/src/Shared/Components/Security/SecurityModal/utils.tsx
index b19a6ceac..08ac7b5e6 100644
--- a/src/Shared/Components/Security/SecurityModal/utils.tsx
+++ b/src/Shared/Components/Security/SecurityModal/utils.tsx
@@ -14,23 +14,24 @@
* limitations under the License.
*/
-import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
+import { ReactComponent as NoVulnerability } from '@Icons/ic-vulnerability-not-found.svg'
import { SegmentedBarChartProps } from '@Common/SegmentedBarChart'
-import { Severity } from '@Shared/types'
import { VulnerabilityType } from '@Common/Types'
-import { ReactComponent as NoVulnerability } from '@Icons/ic-vulnerability-not-found.svg'
+import { ScannedByToolModal } from '@Shared/Components/ScannedByToolModal'
+import { Severity } from '@Shared/types'
+
+import { ORDERED_SEVERITY_KEYS, SEVERITIES, TRIVY_ICON_URL } from './constants'
import {
- ScanResultDTO,
- SeveritiesDTO,
CATEGORIES,
GetResourceScanDetailsResponseType,
ImageScanVulnerabilityType,
ImageVulnerabilityType,
+ ScanResultDTO,
+ SeveritiesDTO,
SUB_CATEGORIES,
VulnerabilityCountType,
VulnerabilityState,
} from './types'
-import { SEVERITIES, ORDERED_SEVERITY_KEYS, TRIVY_ICON_URL } from './constants'
export const mapSeveritiesToSegmentedBarChartEntities = (
severities: Partial>,
diff --git a/src/Shared/Components/Security/Vulnerabilities/Vulnerabilities.tsx b/src/Shared/Components/Security/Vulnerabilities/Vulnerabilities.tsx
index dd7d6c0cb..e9bb025e4 100644
--- a/src/Shared/Components/Security/Vulnerabilities/Vulnerabilities.tsx
+++ b/src/Shared/Components/Security/Vulnerabilities/Vulnerabilities.tsx
@@ -15,13 +15,14 @@
*/
import { useEffect, useState } from 'react'
+
import { Progressing, useAsync } from '../../../../Common'
-import { VulnerabilitiesProps } from './types'
-import { getSecurityScan } from '../SecurityModal/service'
import { SecurityCard } from '../SecurityDetailsCards'
-import { CATEGORIES, SUB_CATEGORIES } from '../SecurityModal/types'
import { SecurityModal } from '../SecurityModal'
+import { getSecurityScan } from '../SecurityModal/service'
+import { CATEGORIES, SUB_CATEGORIES } from '../SecurityModal/types'
import { getStatusForScanList } from '../utils'
+import { VulnerabilitiesProps } from './types'
const Vulnerabilities = ({
isScanned,
diff --git a/src/Shared/Components/Security/Vulnerabilities/index.ts b/src/Shared/Components/Security/Vulnerabilities/index.ts
index a9fe39be8..7b29147bb 100644
--- a/src/Shared/Components/Security/Vulnerabilities/index.ts
+++ b/src/Shared/Components/Security/Vulnerabilities/index.ts
@@ -14,5 +14,5 @@
* limitations under the License.
*/
-export { default as Vulnerabilities } from './Vulnerabilities'
export * from './utils'
+export { default as Vulnerabilities } from './Vulnerabilities'
diff --git a/src/Shared/Components/Security/Vulnerabilities/types.ts b/src/Shared/Components/Security/Vulnerabilities/types.ts
index 5c8839548..12828c331 100644
--- a/src/Shared/Components/Security/Vulnerabilities/types.ts
+++ b/src/Shared/Components/Security/Vulnerabilities/types.ts
@@ -15,6 +15,7 @@
*/
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types'
+
import { MaterialSecurityInfoType } from '../../../types'
export interface VulnerabilitiesProps
diff --git a/src/Shared/Components/Security/Vulnerabilities/utils.ts b/src/Shared/Components/Security/Vulnerabilities/utils.ts
index 8ac7a9fcd..b331d177e 100644
--- a/src/Shared/Components/Security/Vulnerabilities/utils.ts
+++ b/src/Shared/Components/Security/Vulnerabilities/utils.ts
@@ -15,6 +15,7 @@
*/
import { numberComparatorBySortOrder } from '@Shared/Helpers'
+
import { SortingOrder, VULNERABILITIES_SORT_PRIORITY } from '../../../../Common'
export const getSortedVulnerabilities = (vulnerabilities) =>
diff --git a/src/Shared/Components/Security/constants.tsx b/src/Shared/Components/Security/constants.tsx
index cbef00738..65fc41c55 100644
--- a/src/Shared/Components/Security/constants.tsx
+++ b/src/Shared/Components/Security/constants.tsx
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-import { CATEGORY_LABELS } from './SecurityModal'
import { CATEGORIES, SUB_CATEGORIES } from './SecurityModal/types'
+import { CATEGORY_LABELS } from './SecurityModal'
import { SecurityConfigType } from './types'
export const SECURITY_CONFIG: SecurityConfigType = {
diff --git a/src/Shared/Components/Security/index.tsx b/src/Shared/Components/Security/index.tsx
index b26140343..d6b7f36b4 100644
--- a/src/Shared/Components/Security/index.tsx
+++ b/src/Shared/Components/Security/index.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-export * from './Vulnerabilities'
+export * from './SecurityDetailsCards'
export * from './SecurityModal'
export * from './utils'
-export * from './SecurityDetailsCards'
+export * from './Vulnerabilities'
diff --git a/src/Shared/Components/Security/utils.tsx b/src/Shared/Components/Security/utils.tsx
index 00464179a..b8b0a9761 100644
--- a/src/Shared/Components/Security/utils.tsx
+++ b/src/Shared/Components/Security/utils.tsx
@@ -14,8 +14,6 @@
* limitations under the License.
*/
-import { SECURITY_CONFIG } from './constants'
-import { ScanResultDTO, SeveritiesDTO } from './SecurityModal'
import {
CATEGORIES,
ImageScanLicenseListType,
@@ -23,7 +21,9 @@ import {
StatusType,
SUB_CATEGORIES,
} from './SecurityModal/types'
-import { CategoriesConfig, SecurityConfigType, ScanCategories, ScanSubCategories } from './types'
+import { SECURITY_CONFIG } from './constants'
+import { ScanResultDTO, SeveritiesDTO } from './SecurityModal'
+import { CategoriesConfig, ScanCategories, ScanSubCategories, SecurityConfigType } from './types'
export const getCVEUrlFromCVEName = (cveName: string): string =>
`https://cve.mitre.org/cgi-bin/cvename.cgi?name=${cveName}`
diff --git a/src/Shared/Components/SelectPicker/FilterSelectPicker.tsx b/src/Shared/Components/SelectPicker/FilterSelectPicker.tsx
index b8dbed9a8..db5ce8d1f 100644
--- a/src/Shared/Components/SelectPicker/FilterSelectPicker.tsx
+++ b/src/Shared/Components/SelectPicker/FilterSelectPicker.tsx
@@ -15,14 +15,16 @@
*/
import { useEffect, useMemo, useRef, useState } from 'react'
+
import { ReactComponent as ICFilter } from '@Icons/ic-filter.svg'
import { ReactComponent as ICFilterApplied } from '@Icons/ic-filter-applied.svg'
-import { useRegisterShortcut, UseRegisterShortcutProvider } from '@Common/Hooks'
import { IS_PLATFORM_MAC_OS } from '@Common/Constants'
+import { useRegisterShortcut, UseRegisterShortcutProvider } from '@Common/Hooks'
import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types'
+
+import { ButtonProps, ButtonVariantType, useTriggerAutoClickTimestamp } from '../Button'
import SelectPicker from './SelectPicker.component'
import { FilterSelectPickerProps, SelectPickerOptionType, SelectPickerProps } from './type'
-import { ButtonProps, ButtonVariantType, useTriggerAutoClickTimestamp } from '../Button'
const APPLY_FILTER_SHORTCUT_KEYS: SupportedKeyboardKeysType[] = [IS_PLATFORM_MAC_OS ? 'Meta' : 'Control', 'Enter']
diff --git a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
index cf7aa92b0..930559493 100644
--- a/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
+++ b/src/Shared/Components/SelectPicker/SelectPicker.component.tsx
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+import { ReactElement, useCallback, useMemo, useRef, useState } from 'react'
import {
GroupHeadingProps,
MultiValueProps,
@@ -22,16 +23,15 @@ import {
ValueContainerProps,
} from 'react-select'
import CreatableSelect from 'react-select/creatable'
-import { ReactElement, useCallback, useMemo, useRef, useState } from 'react'
-import { ComponentSizeType } from '@Shared/constants'
-import { ConditionalWrap } from '@Common/Helper'
import Tippy from '@tippyjs/react'
+
+import { ConditionalWrap } from '@Common/Helper'
+import { ComponentSizeType } from '@Shared/constants'
import { deriveBorderRadiusAndBorderClassFromConfig, isNullOrUndefined } from '@Shared/Helpers'
-import { getCommonSelectStyle, getSelectPickerOptionByValue } from './utils'
-import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } from './type'
-import FormFieldWrapper from '../FormFieldWrapper/FormFieldWrapper'
import { getFormFieldAriaAttributes } from '../FormFieldWrapper'
+import FormFieldWrapper from '../FormFieldWrapper/FormFieldWrapper'
+import { GenericSectionErrorState } from '../GenericSectionErrorState'
import {
renderLoadingMessage,
SelectPickerClearIndicator,
@@ -45,7 +45,8 @@ import {
SelectPickerOption,
SelectPickerValueContainer,
} from './common'
-import { GenericSectionErrorState } from '../GenericSectionErrorState'
+import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } from './type'
+import { getCommonSelectStyle, getSelectPickerOptionByValue } from './utils'
/**
* Generic component for select picker
diff --git a/src/Shared/Components/SelectPicker/SelectPickerTextArea.component.tsx b/src/Shared/Components/SelectPicker/SelectPickerTextArea.component.tsx
index ff1cf2203..20b16c232 100644
--- a/src/Shared/Components/SelectPicker/SelectPickerTextArea.component.tsx
+++ b/src/Shared/Components/SelectPicker/SelectPickerTextArea.component.tsx
@@ -20,8 +20,8 @@ import { InputActionMeta, SelectInstance, SingleValue } from 'react-select'
import { ReactSelectInputAction } from '@Common/Constants'
import { useThrottledEffect } from '@Common/Helper'
-import { SelectPickerOptionType, SelectPickerTextAreaProps } from './type'
import SelectPicker from './SelectPicker.component'
+import { SelectPickerOptionType, SelectPickerTextAreaProps } from './type'
export const SelectPickerTextArea = ({
value,
diff --git a/src/Shared/Components/SelectPicker/common.tsx b/src/Shared/Components/SelectPicker/common.tsx
index 1ad1f8c37..6e960cb35 100644
--- a/src/Shared/Components/SelectPicker/common.tsx
+++ b/src/Shared/Components/SelectPicker/common.tsx
@@ -14,36 +14,38 @@
* limitations under the License.
*/
+import { ChangeEvent, Children } from 'react'
import {
+ ClearIndicatorProps,
components,
- DropdownIndicatorProps,
ControlProps,
- OptionProps,
- ClearIndicatorProps,
- ValueContainerProps,
+ DropdownIndicatorProps,
+ InputProps,
MenuListProps,
- MultiValueRemoveProps,
- MultiValueProps,
MultiValue,
- InputProps,
+ MultiValueProps,
+ MultiValueRemoveProps,
+ OptionProps,
+ ValueContainerProps,
} from 'react-select'
-import { Progressing } from '@Common/Progressing'
+
import { ReactComponent as ICCaretDown } from '@Icons/ic-caret-down.svg'
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
import { ReactComponent as ICErrorExclamation } from '@Icons/ic-error-exclamation.svg'
-import { ChangeEvent, Children } from 'react'
-import { noop } from '@Common/Helper'
-import { CHECKBOX_VALUE } from '@Common/Types'
import { Checkbox } from '@Common/Checkbox'
import { ReactSelectInputAction } from '@Common/Constants'
-import { isNullOrUndefined } from '@Shared/Helpers'
+import { noop } from '@Common/Helper'
+import { Progressing } from '@Common/Progressing'
import { Tooltip } from '@Common/Tooltip'
import { TooltipProps } from '@Common/Tooltip/types'
+import { CHECKBOX_VALUE } from '@Common/Types'
import { ComponentSizeType } from '@Shared/constants'
+import { isNullOrUndefined } from '@Shared/Helpers'
+
+import { Button, ButtonProps, ButtonVariantType } from '../Button'
+import { Icon } from '../Icon'
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type'
import { getGroupCheckboxValue } from './utils'
-import { Icon } from '../Icon'
-import { Button, ButtonProps, ButtonVariantType } from '../Button'
export const getTooltipProps = (tooltipProps: SelectPickerOptionType['tooltipProps'] = {}): TooltipProps => {
if (tooltipProps) {
diff --git a/src/Shared/Components/SelectPicker/constants.ts b/src/Shared/Components/SelectPicker/constants.ts
index dd998f422..6419e79cc 100644
--- a/src/Shared/Components/SelectPicker/constants.ts
+++ b/src/Shared/Components/SelectPicker/constants.ts
@@ -15,7 +15,9 @@
*/
import { CSSProperties } from 'react'
+
import { ComponentSizeType } from '@Shared/constants'
+
import { SelectPickerProps } from './type'
export const SELECT_PICKER_FONT_SIZE_MAP: Record = {
diff --git a/src/Shared/Components/SelectPicker/index.ts b/src/Shared/Components/SelectPicker/index.ts
index 1eb12e2bc..999db404c 100644
--- a/src/Shared/Components/SelectPicker/index.ts
+++ b/src/Shared/Components/SelectPicker/index.ts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
+export { default as FilterSelectPicker } from './FilterSelectPicker'
export { default as SelectPicker } from './SelectPicker.component'
export * from './SelectPickerTextArea.component'
-export { default as FilterSelectPicker } from './FilterSelectPicker'
export * from './type'
export { getSelectPickerOptionByValue } from './utils'
diff --git a/src/Shared/Components/SelectPicker/type.ts b/src/Shared/Components/SelectPicker/type.ts
index 71cf4aab1..3ef481f64 100644
--- a/src/Shared/Components/SelectPicker/type.ts
+++ b/src/Shared/Components/SelectPicker/type.ts
@@ -14,18 +14,20 @@
* limitations under the License.
*/
-import { ServerErrors } from '@Common/ServerError'
-import { OptionType } from '@Common/Types'
-import { ComponentSizeType } from '@Shared/constants'
import { MutableRefObject, ReactElement, ReactNode } from 'react'
import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance } from 'react-select'
-import { CreatableProps } from 'react-select/creatable'
// This import allows to extend the base interface in react-select module via module augmentation
import type {} from 'react-select/base'
-import { TooltipProps } from '@Common/Tooltip/types'
+import { CreatableProps } from 'react-select/creatable'
+
import { ResizableTagTextAreaProps } from '@Common/CustomTagSelector'
-import { FormFieldWrapperProps } from '../FormFieldWrapper/types'
+import { ServerErrors } from '@Common/ServerError'
+import { TooltipProps } from '@Common/Tooltip/types'
+import { OptionType } from '@Common/Types'
+import { ComponentSizeType } from '@Shared/constants'
+
import { ButtonComponentType, ButtonProps, ButtonVariantType } from '../Button'
+import { FormFieldWrapperProps } from '../FormFieldWrapper/types'
export interface SelectPickerOptionType extends OptionType {
/**
diff --git a/src/Shared/Components/SelectPicker/utils.ts b/src/Shared/Components/SelectPicker/utils.ts
index cf151c73b..207a09331 100644
--- a/src/Shared/Components/SelectPicker/utils.ts
+++ b/src/Shared/Components/SelectPicker/utils.ts
@@ -14,12 +14,14 @@
* limitations under the License.
*/
-import { CHECKBOX_VALUE } from '@Common/Types'
-import { ComponentSizeType } from '@Shared/constants'
import { GroupBase, MultiValue, OptionsOrGroups, StylesConfig } from 'react-select'
+
import { noop } from '@Common/Helper'
-import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } from './type'
+import { CHECKBOX_VALUE } from '@Common/Types'
+import { ComponentSizeType } from '@Shared/constants'
+
import { SELECT_PICKER_CONTROL_SIZE_MAP, SELECT_PICKER_FONT_SIZE_MAP, SELECT_PICKER_ICON_SIZE_MAP } from './constants'
+import { SelectPickerOptionType, SelectPickerProps, SelectPickerVariantType } from './type'
const getMenuWidthFromSize = (
menuSize: SelectPickerProps['menuSize'],
diff --git a/src/Shared/Components/ShowMoreText/ShowMoreText.tsx b/src/Shared/Components/ShowMoreText/ShowMoreText.tsx
index d1eb65d1d..e038b26a3 100644
--- a/src/Shared/Components/ShowMoreText/ShowMoreText.tsx
+++ b/src/Shared/Components/ShowMoreText/ShowMoreText.tsx
@@ -15,6 +15,7 @@
*/
import { useEffect, useRef, useState } from 'react'
+
import { ReactComponent as ICCaretDown } from '@Icons/ic-caret-down.svg'
interface ShowMoreTextProps {
diff --git a/src/Shared/Components/StatusComponent/AppStatus.tsx b/src/Shared/Components/StatusComponent/AppStatus.tsx
index 339a207d3..774c60cf3 100644
--- a/src/Shared/Components/StatusComponent/AppStatus.tsx
+++ b/src/Shared/Components/StatusComponent/AppStatus.tsx
@@ -15,9 +15,9 @@
*/
import { Icon } from '../Icon'
-import { AppStatusProps } from './types'
-import { StatusComponent } from './StatusComponent'
import { APP_STATUS } from './constants'
+import { StatusComponent } from './StatusComponent'
+import { AppStatusProps } from './types'
import { getJobStatusFromStatus } from './utils'
export const AppStatus = ({ status, isJobView = false, isVirtualEnv = false, ...restProps }: AppStatusProps) => {
diff --git a/src/Shared/Components/StatusComponent/StatusComponent.tsx b/src/Shared/Components/StatusComponent/StatusComponent.tsx
index 1e57f18d7..75c58ef03 100644
--- a/src/Shared/Components/StatusComponent/StatusComponent.tsx
+++ b/src/Shared/Components/StatusComponent/StatusComponent.tsx
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-import { Tooltip } from '@Common/Tooltip'
import { ConditionalWrap } from '@Common/Helper'
+import { Tooltip } from '@Common/Tooltip'
import { Icon } from '../Icon'
import { StatusComponentProps } from './types'
diff --git a/src/Shared/Components/StatusComponent/index.ts b/src/Shared/Components/StatusComponent/index.ts
index 119ad1502..a9c8cc1a3 100644
--- a/src/Shared/Components/StatusComponent/index.ts
+++ b/src/Shared/Components/StatusComponent/index.ts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-export * from './StatusComponent'
export * from './AppStatus'
export * from './DeploymentStatus'
+export * from './StatusComponent'
export * from './types'
export { getDeploymentStatusFromStatus } from './utils'
diff --git a/src/Shared/Components/TabGroup/TabGroup.component.tsx b/src/Shared/Components/TabGroup/TabGroup.component.tsx
index 71c56067e..801a4d806 100644
--- a/src/Shared/Components/TabGroup/TabGroup.component.tsx
+++ b/src/Shared/Components/TabGroup/TabGroup.component.tsx
@@ -16,12 +16,12 @@
import { Link, NavLink } from 'react-router-dom'
-import { ComponentSizeType } from '@Shared/constants'
import { Tooltip } from '@Common/Tooltip'
+import { ComponentSizeType } from '@Shared/constants'
+import { getTabBadge, getTabDescription, getTabIcon, getTabIndicator } from './TabGroup.helpers'
import { TabGroupProps, TabProps } from './TabGroup.types'
import { getClassNameBySizeMap, tabGroupClassMap } from './TabGroup.utils'
-import { getTabBadge, getTabDescription, getTabIcon, getTabIndicator } from './TabGroup.helpers'
import './TabGroup.scss'
diff --git a/src/Shared/Components/TabGroup/TabGroup.scss b/src/Shared/Components/TabGroup/TabGroup.scss
index a4f18a8a5..c5a352898 100644
--- a/src/Shared/Components/TabGroup/TabGroup.scss
+++ b/src/Shared/Components/TabGroup/TabGroup.scss
@@ -90,6 +90,10 @@
color: var(--B500);
font-weight: 600;
@include svg-styles(var(--B500));
+
+ svg.icon-component-color {
+ --overrideIconColor: var(--B500);
+ }
}
&:not(.active) {
diff --git a/src/Shared/Components/TabGroup/TabGroup.types.ts b/src/Shared/Components/TabGroup/TabGroup.types.ts
index acc87cfb9..0ddb160f9 100644
--- a/src/Shared/Components/TabGroup/TabGroup.types.ts
+++ b/src/Shared/Components/TabGroup/TabGroup.types.ts
@@ -16,9 +16,9 @@
import { LinkProps, NavLinkProps } from 'react-router-dom'
+import { TooltipProps } from '@Common/Tooltip/types'
import { ComponentSizeType } from '@Shared/constants'
import { DataAttributes } from '@Shared/types'
-import { TooltipProps } from '@Common/Tooltip/types'
import { IconName } from '../Icon'
diff --git a/src/Shared/Components/Table/BulkSelectionActionWidget.tsx b/src/Shared/Components/Table/BulkSelectionActionWidget.tsx
index 0df4492d5..0e09b1f03 100644
--- a/src/Shared/Components/Table/BulkSelectionActionWidget.tsx
+++ b/src/Shared/Components/Table/BulkSelectionActionWidget.tsx
@@ -2,14 +2,16 @@
* Copyright (c) 2024. Devtron Inc.
*/
+import { useEffect } from 'react'
+
import { ReactComponent as ICClose } from '@Icons/ic-close.svg'
import { DraggableButton, DraggablePositionVariant, DraggableWrapper } from '@Common/DraggableWrapper'
-import { ComponentSizeType } from '@Shared/constants'
import { useRegisterShortcut } from '@Common/Hooks'
-import { useEffect } from 'react'
-import { BulkSelectionActionWidgetProps } from './types'
+import { ComponentSizeType } from '@Shared/constants'
+
import { Button, ButtonComponentType, ButtonStyleType, ButtonVariantType } from '../Button'
import { DRAG_SELECTOR_IDENTIFIER } from './constants'
+import { BulkSelectionActionWidgetProps } from './types'
const BulkSelectionActionWidget = ({
count,
diff --git a/src/Shared/Components/Table/InternalTable.tsx b/src/Shared/Components/Table/InternalTable.tsx
index 06aaffc91..999fad96d 100644
--- a/src/Shared/Components/Table/InternalTable.tsx
+++ b/src/Shared/Components/Table/InternalTable.tsx
@@ -1,12 +1,13 @@
-import { useRef, useEffect, useMemo, Fragment } from 'react'
+import { Fragment, useEffect, useMemo, useRef } from 'react'
+
import { Checkbox } from '@Common/Checkbox'
import { DEFAULT_BASE_PAGE_SIZE } from '@Common/Constants'
import ErrorScreenManager from '@Common/ErrorScreenManager'
import {
- useAsync,
CHECKBOX_VALUE,
- GenericFilterEmptyState,
GenericEmptyState,
+ GenericFilterEmptyState,
+ useAsync,
useEffectAfterMount,
} from '@Common/index'
import { Pagination } from '@Common/Pagination'
@@ -15,7 +16,7 @@ import { SortableTableHeaderCell } from '@Common/SortableTableHeaderCell'
import { BulkSelection } from '../BulkSelection'
import BulkSelectionActionWidget from './BulkSelectionActionWidget'
import { BULK_ACTION_GUTTER_LABEL, EVENT_TARGET, SHIMMER_DUMMY_ARRAY } from './constants'
-import { PaginationEnum, SignalsType, FiltersTypeEnum, InternalTableProps } from './types'
+import { FiltersTypeEnum, InternalTableProps, PaginationEnum, SignalsType } from './types'
import useTableWithKeyboardShortcuts from './useTableWithKeyboardShortcuts'
import { getFilteringPromise, searchAndSortRows } from './utils'
diff --git a/src/Shared/Components/Table/Table.component.tsx b/src/Shared/Components/Table/Table.component.tsx
index c00fca0b6..8da192b5f 100644
--- a/src/Shared/Components/Table/Table.component.tsx
+++ b/src/Shared/Components/Table/Table.component.tsx
@@ -1,4 +1,5 @@
import { useCallback, useEffect, useMemo, useState } from 'react'
+
import {
noop,
UseRegisterShortcutProvider,
@@ -7,6 +8,9 @@ import {
useUrlFilters,
} from '@Common/index'
+import { BulkSelectionEvents, BulkSelectionProvider, useBulkSelection } from '../BulkSelection'
+import { BULK_ACTION_GUTTER_LABEL } from './constants'
+import InternalTable from './InternalTable'
import {
FiltersTypeEnum,
FilterWrapperProps,
@@ -18,9 +22,6 @@ import {
VisibleColumnsWrapperProps,
} from './types'
import { getVisibleColumns, setVisibleColumnsToLocalStorage } from './utils'
-import { BULK_ACTION_GUTTER_LABEL } from './constants'
-import { BulkSelectionEvents, BulkSelectionProvider, useBulkSelection } from '../BulkSelection'
-import InternalTable from './InternalTable'
import './styles.scss'
diff --git a/src/Shared/Components/Table/index.ts b/src/Shared/Components/Table/index.ts
index a6c7d4765..c19e84928 100644
--- a/src/Shared/Components/Table/index.ts
+++ b/src/Shared/Components/Table/index.ts
@@ -1,8 +1,8 @@
export { default as Table } from './Table.component'
-export { FiltersTypeEnum, PaginationEnum, SignalEnum as TableSignalEnum } from './types'
export type {
- ViewWrapperProps as TableViewWrapperProps,
+ CellComponentProps as TableCellComponentProps,
Column as TableColumnType,
TableProps,
- CellComponentProps as TableCellComponentProps,
+ ViewWrapperProps as TableViewWrapperProps,
} from './types'
+export { FiltersTypeEnum, PaginationEnum, SignalEnum as TableSignalEnum } from './types'
diff --git a/src/Shared/Components/Table/types.ts b/src/Shared/Components/Table/types.ts
index 7fabf5e12..d32d09362 100644
--- a/src/Shared/Components/Table/types.ts
+++ b/src/Shared/Components/Table/types.ts
@@ -1,8 +1,10 @@
import { Dispatch, FunctionComponent, PropsWithChildren, SetStateAction } from 'react'
-import { SortableTableHeaderCellProps, useResizableTableConfig } from '@Common/SortableTableHeaderCell'
+
+import { GenericFilterEmptyStateProps } from '@Common/EmptyState/types'
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps } from '@Common/Hooks'
import { GenericEmptyStateType } from '@Common/index'
-import { GenericFilterEmptyStateProps } from '@Common/EmptyState/types'
+import { SortableTableHeaderCellProps, useResizableTableConfig } from '@Common/SortableTableHeaderCell'
+
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection'
export interface UseFiltersReturnType extends UseStateFiltersReturnType {}
diff --git a/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts b/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
index d95d136d6..8d5127f65 100644
--- a/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
+++ b/src/Shared/Components/Table/useTableWithKeyboardShortcuts.ts
@@ -1,9 +1,11 @@
-import { useRegisterShortcut } from '@Common/Hooks'
-import { useState, useRef, useCallback, useEffect } from 'react'
+import { useCallback, useEffect, useRef, useState } from 'react'
+
import { noop } from '@Common/Helper'
+import { useRegisterShortcut } from '@Common/Hooks'
+
import { BulkSelectionEvents } from '../BulkSelection'
-import { InternalTableProps, RowsType, SignalEnum } from './types'
import { EVENT_TARGET } from './constants'
+import { InternalTableProps, RowsType, SignalEnum } from './types'
const useTableWithKeyboardShortcuts = (
{
diff --git a/src/Shared/Components/Table/utils.ts b/src/Shared/Components/Table/utils.ts
index 50093efaf..b99a1dd02 100644
--- a/src/Shared/Components/Table/utils.ts
+++ b/src/Shared/Components/Table/utils.ts
@@ -1,6 +1,12 @@
-import { showError } from '@Common/Helper'
import { SortingOrder } from '@Common/Constants'
+import { showError } from '@Common/Helper'
import { isNullOrUndefined } from '@Shared/Helpers'
+
+import {
+ LOCAL_STORAGE_EXISTS,
+ LOCAL_STORAGE_KEY_FOR_VISIBLE_COLUMNS,
+ SEARCH_SORT_CHANGE_DEBOUNCE_TIME,
+} from './constants'
import {
Column,
ConfigurableColumnsConfigType,
@@ -10,11 +16,6 @@ import {
TableProps,
UseFiltersReturnType,
} from './types'
-import {
- LOCAL_STORAGE_EXISTS,
- LOCAL_STORAGE_KEY_FOR_VISIBLE_COLUMNS,
- SEARCH_SORT_CHANGE_DEBOUNCE_TIME,
-} from './constants'
export const searchAndSortRows = (
rows: TableProps['rows'],
diff --git a/src/Shared/Components/TagsKeyValueTable/TagsContainer.tsx b/src/Shared/Components/TagsKeyValueTable/TagsContainer.tsx
index fa849fbfd..661e30331 100644
--- a/src/Shared/Components/TagsKeyValueTable/TagsContainer.tsx
+++ b/src/Shared/Components/TagsKeyValueTable/TagsContainer.tsx
@@ -15,13 +15,15 @@
*/
import ReactGA from 'react-ga4'
+
import { ReactComponent as ICPropagate } from '@Icons/inject-tag.svg'
import { PropagateTagInfo, validateTagKeyValue } from '@Common/CustomTagSelector'
-import { Tooltip } from '@Common/Tooltip'
import { validateTagValue } from '@Common/CustomTagSelector/tags.utils'
-import { TagsContainerProps, TagsTableColumnsType } from './types'
-import { DEVTRON_AI_URL, TAGS_TABLE_HEADERS } from './constants'
+import { Tooltip } from '@Common/Tooltip'
+
import { DynamicDataTable, DynamicDataTableRowType } from '../DynamicDataTable'
+import { DEVTRON_AI_URL, TAGS_TABLE_HEADERS } from './constants'
+import { TagsContainerProps, TagsTableColumnsType } from './types'
import { getEmptyTagTableRow } from './utils'
const TagsKeyValueTable = ({
diff --git a/src/Shared/Components/TagsKeyValueTable/index.tsx b/src/Shared/Components/TagsKeyValueTable/index.tsx
index 00c95e2b8..bb3b39bd3 100644
--- a/src/Shared/Components/TagsKeyValueTable/index.tsx
+++ b/src/Shared/Components/TagsKeyValueTable/index.tsx
@@ -14,7 +14,7 @@
* limitations under the License.
*/
+export { DEVTRON_AI_URL } from './constants'
export { default as TagsContainer } from './TagsContainer'
-export { getEmptyTagTableRow } from './utils'
export type { TagsTableColumnsType } from './types'
-export { DEVTRON_AI_URL } from './constants'
+export { getEmptyTagTableRow } from './utils'
diff --git a/src/Shared/Components/TargetPlatforms/TargetPlatformBadgeList.tsx b/src/Shared/Components/TargetPlatforms/TargetPlatformBadgeList.tsx
index c8f276090..a94653b1f 100644
--- a/src/Shared/Components/TargetPlatforms/TargetPlatformBadgeList.tsx
+++ b/src/Shared/Components/TargetPlatforms/TargetPlatformBadgeList.tsx
@@ -16,6 +16,7 @@
import { ReactComponent as ICStack } from '@Icons/ic-stack.svg'
import { Tooltip } from '@Common/Tooltip'
+
import { TargetPlatformBadgeListProps } from './types'
const TargetPlatformBadge = ({ name }: TargetPlatformBadgeListProps['targetPlatforms'][number]) => (
diff --git a/src/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.tsx b/src/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.tsx
index 188a8e058..31fad83e2 100644
--- a/src/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.tsx
+++ b/src/Shared/Components/TargetPlatforms/TargetPlatformListTooltip.tsx
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-import { Tooltip } from '@Common/Tooltip'
import { stopPropagation } from '@Common/Helper'
+import { Tooltip } from '@Common/Tooltip'
+
import { TargetPlatformListTooltipProps } from './types'
const TooltipContent = ({ targetPlatforms }: Pick) => (
diff --git a/src/Shared/Components/Textarea/Textarea.component.tsx b/src/Shared/Components/Textarea/Textarea.component.tsx
index ff6aac77d..fb9f3271e 100644
--- a/src/Shared/Components/Textarea/Textarea.component.tsx
+++ b/src/Shared/Components/Textarea/Textarea.component.tsx
@@ -15,16 +15,19 @@
*/
import { TextareaHTMLAttributes, useEffect, useRef, useState } from 'react'
+
+import { useThrottledEffect } from '@Common/Helper'
import {
COMPONENT_SIZE_TYPE_TO_FONT_AND_BLOCK_PADDING_MAP,
COMPONENT_SIZE_TYPE_TO_INLINE_PADDING_MAP,
ComponentSizeType,
} from '@Shared/constants'
import { deriveBorderRadiusAndBorderClassFromConfig } from '@Shared/Helpers'
-import { useThrottledEffect } from '@Common/Helper'
+
import { FormFieldWrapper, getFormFieldAriaAttributes } from '../FormFieldWrapper'
-import { TextareaProps } from './types'
import { TEXTAREA_CONSTRAINTS } from './constants'
+import { TextareaProps } from './types'
+
import './textarea.scss'
const { MIN_HEIGHT, AUTO_EXPANSION_MAX_HEIGHT } = TEXTAREA_CONSTRAINTS
diff --git a/src/Shared/Components/Textarea/types.ts b/src/Shared/Components/Textarea/types.ts
index f94463f15..4584dfdd6 100644
--- a/src/Shared/Components/Textarea/types.ts
+++ b/src/Shared/Components/Textarea/types.ts
@@ -15,7 +15,9 @@
*/
import { TextareaHTMLAttributes } from 'react'
+
import { ComponentSizeType } from '@Shared/constants'
+
import { FormFieldWrapperProps } from '../FormFieldWrapper'
export interface TextareaProps
diff --git a/src/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.tsx b/src/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.tsx
index cc0f1f59e..93f23dcf1 100644
--- a/src/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.tsx
+++ b/src/Shared/Components/ThemeSwitcher/ThemeSwitcher.component.tsx
@@ -14,10 +14,11 @@
* limitations under the License.
*/
-import { getThemePreferenceText, useTheme } from '@Shared/Providers'
import { ReactComponent as ICCaretLeftSmall } from '@Icons/ic-caret-left-small.svg'
-import { ThemeSwitcherProps } from './types'
+import { getThemePreferenceText, useTheme } from '@Shared/Providers'
+
import { LOGOUT_CARD_BASE_BUTTON_CLASS } from '../LogoutCard'
+import { ThemeSwitcherProps } from './types'
const ThemeSwitcher = ({ onChange }: ThemeSwitcherProps) => {
const { handleThemeSwitcherDialogVisibilityChange, themePreference } = useTheme()
diff --git a/src/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.tsx b/src/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.tsx
index 017470dda..2d628c768 100644
--- a/src/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.tsx
+++ b/src/Shared/Components/ToggleResolveScopedVariables/ToggleResolveScopedVariables.component.tsx
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-import { Toggle, Tooltip } from '@Common/index'
import { ReactComponent as ICViewVariableToggle } from '@Icons/ic-view-variable-toggle.svg'
+import { Toggle, Tooltip } from '@Common/index'
+
import { ToggleResolveScopedVariablesProps } from './types'
const ToggleResolveScopedVariables = ({
diff --git a/src/Shared/Components/WorkflowOptionsModal/SourceTypeCard.tsx b/src/Shared/Components/WorkflowOptionsModal/SourceTypeCard.tsx
index ca467fcb7..1d01c4370 100644
--- a/src/Shared/Components/WorkflowOptionsModal/SourceTypeCard.tsx
+++ b/src/Shared/Components/WorkflowOptionsModal/SourceTypeCard.tsx
@@ -15,7 +15,9 @@
*/
import Tippy from '@tippyjs/react'
+
import { ConditionalWrap } from '@Common/Helper'
+
import { SourceTypeCardProps } from './types'
const SourceTypeCard = ({
diff --git a/src/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.tsx b/src/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.tsx
index bc4fb07ac..1f7feaad2 100644
--- a/src/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.tsx
+++ b/src/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.tsx
@@ -15,14 +15,15 @@
*/
import React, { useEffect, useState } from 'react'
-import { CIPipelineNodeType, saveCDPipeline, ToastManager, ToastVariantType } from '@Shared/index'
-import { PipelineType, WorkflowNodeType } from '@Common/Types'
-import { showError, stopPropagation } from '@Common/Helper'
-import { VisibleModal } from '@Common/index'
+
import changeCI from '@Images/change-source.png'
import selectWorkflowSource from '@Images/select-image-source.png'
-import SourceTypeCard from './SourceTypeCard'
-import { WorkflowOptionsModalProps } from './types'
+import { showError, stopPropagation } from '@Common/Helper'
+import { VisibleModal } from '@Common/index'
+import { PipelineType, WorkflowNodeType } from '@Common/Types'
+import { saveCDPipeline, ToastManager, ToastVariantType } from '@Shared/Services'
+import { CIPipelineNodeType } from '@Shared/types'
+
import {
CHANGE_SAME_CI,
NO_ENV_FOUND,
@@ -32,6 +33,8 @@ import {
WORKFLOW_OPTIONS_MODAL,
WORKFLOW_OPTIONS_MODAL_TYPES,
} from './constants'
+import SourceTypeCard from './SourceTypeCard'
+import { WorkflowOptionsModalProps } from './types'
import { getSwitchToWebhookPayload } from './utils'
const WorkflowOptionsModal = ({
diff --git a/src/Shared/Components/WorkflowOptionsModal/constants.tsx b/src/Shared/Components/WorkflowOptionsModal/constants.tsx
index c4c7fb11a..05d1be554 100644
--- a/src/Shared/Components/WorkflowOptionsModal/constants.tsx
+++ b/src/Shared/Components/WorkflowOptionsModal/constants.tsx
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-import linkedPipeline from '@Icons/ic-source-linked-build.svg'
import ci from '@Icons/ic-source-build.svg'
-import webhook from '@Icons/ic-source-webhook.svg'
import ciJobIcon from '@Icons/ic-source-job.svg'
-import { CIPipelineNodeType } from '@Shared/types'
+import linkedPipeline from '@Icons/ic-source-linked-build.svg'
+import webhook from '@Icons/ic-source-webhook.svg'
import { PipelineType } from '@Common/Types'
+import { CIPipelineNodeType } from '@Shared/types'
export const WORKFLOW_OPTIONS_MODAL = {
ACTION_TEXT: 'Select an image source for new workflow',
diff --git a/src/Shared/Components/WorkflowOptionsModal/types.tsx b/src/Shared/Components/WorkflowOptionsModal/types.tsx
index 5209914fb..eb5ec2bff 100644
--- a/src/Shared/Components/WorkflowOptionsModal/types.tsx
+++ b/src/Shared/Components/WorkflowOptionsModal/types.tsx
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-import { AppConfigProps } from '@Pages/index'
import { ChangeCIPayloadType, CIPipelineNodeType, WorkflowType } from '@Shared/types'
+import { AppConfigProps } from '@Pages/index'
interface LinkedCDSourceVariant {
title: string
diff --git a/src/Shared/Components/index.ts b/src/Shared/Components/index.ts
index 2d23f7534..14503779c 100644
--- a/src/Shared/Components/index.ts
+++ b/src/Shared/Components/index.ts
@@ -14,85 +14,86 @@
* limitations under the License.
*/
-export * from './APIResponseHandler'
-export * from './ReactSelect'
-export * from './BulkSelection'
-export * from './ImageCard'
-export * from './ImageCardAccordion'
-export * from './ExcludedImageNode'
-export * from './ScannedByToolModal'
-export * from './FilterChips'
+export * from './ActionMenu'
export * from './ActivityIndicator'
-export * from './GenericSectionErrorState'
-export * from './InfoIconTippy'
-export * from './EditableTextArea'
-export * from './Header'
+export * from './AnimatedDeployButton'
+export * from './AnimatedTimer'
export * from './AnnouncementBanner'
+export * from './APIResponseHandler'
+export * from './ArtifactInfoModal'
+export * from './Backdrop'
+export * from './BulkOperations'
+export * from './BulkSelection'
+export * from './Button'
export * from './ButtonWithLoader'
export * from './ButtonWithSelector'
-export * from './EnvironmentSelector'
-export * from './ModalSidebarPanel'
-export * from './ImageWithFallback'
-export * from './FeatureDescription'
export * from './CICDHistory'
-export * from './GitCommitInfoGeneric'
-export * from './Error'
-export * from './DatePicker'
-export * from './CommitChipCell'
-export * from './ImageChipCell'
-export * from './ArtifactInfoModal'
-export * from './MaterialHistory'
-export * from './IframeContainer'
-export * from './Plugin'
-export * from './KeyValueTable'
-export * from './SelectPicker'
-export * from './ShowMoreText'
+export * from './CMCS'
+export * from './CodeEditorWrapper'
+export * from './Collapse'
export * from './CollapsibleList'
+export * from './CommitChipCell'
+export * from './Confetti'
+export * from './ConfirmationModal'
+export * from './CountrySelect'
+export * from './CustomInput'
+export * from './DatePicker'
export * from './DeploymentConfigDiff'
export * from './DetectBottom'
-export * from './TabGroup'
-export * from './EditImageFormField'
-export * from './Collapse'
-export * from './Security'
-export * from './Button'
-export * from './InvalidYAMLTippy'
-export * from './NumbersCount'
-export * from './EnterpriseTag'
-export * from './ConfirmationModal'
export * from './DiffViewer'
export * from './DynamicDataTable'
-export * from './TagsKeyValueTable'
+export * from './EditableTextArea'
+export * from './EditImageFormField'
+export * from './EnterpriseTag'
+export * from './EnvironmentSelector'
+export * from './Error'
+export * from './ExcludedImageNode'
+export * from './FeatureDescription'
export * from './FileUpload'
-export * from './AnimatedDeployButton'
-export * from './CMCS'
+export * from './FilterChips'
+export * from './FlagImage'
export * from './FloatingVariablesSuggestions'
-export * from './ToggleResolveScopedVariables'
-export * from './BulkOperations'
-export * from './WorkflowOptionsModal'
-export * from './VirtualizedList'
-export * from './Textarea'
-export * from './ThemeSwitcher'
-export * from './TargetPlatforms'
-export * from './UnsavedChanges'
-export * from './UnsavedChangesDialog'
-export * from './GraphVisualizer'
+export * from './FramerComponents'
export * from './GenericInfoCard'
-export * from './Icon'
-export * from './StatusComponent'
-export * from './RegistryIcon'
+export * from './GenericSectionErrorState'
+export * from './GitCommitInfoGeneric'
export * from './GitProviderIcon'
-export * from './CustomInput'
+export * from './GraphVisualizer'
+export * from './Header'
+export * from './Icon'
+export * from './IframeContainer'
+export * from './ImageCard'
+export * from './ImageCardAccordion'
+export * from './ImageChipCell'
+export * from './ImageWithFallback'
export * from './InfoBlock'
-export * from './CodeEditorWrapper'
-export * from './SSOProviderIcon'
-export * from './Table'
-export * from './Backdrop'
-export * from './CountrySelect'
-export * from './PhoneInput'
-export * from './FlagImage'
+export * from './InfoIconTippy'
+export * from './InvalidYAMLTippy'
+export * from './KeyValueTable'
export * from './License'
export * from './LoginBanner'
-export * from './Confetti'
-export * from './FramerComponents'
-export * from './ActionMenu'
+export * from './MaterialHistory'
+export * from './ModalSidebarPanel'
+export * from './NumbersCount'
+export * from './PhoneInput'
+export * from './Plugin'
export { default as QRCode } from './QRCode'
+export * from './ReactSelect'
+export * from './RegistryIcon'
+export * from './ScannedByToolModal'
+export * from './Security'
+export * from './SelectPicker'
+export * from './ShowMoreText'
+export * from './SSOProviderIcon'
+export * from './StatusComponent'
+export * from './TabGroup'
+export * from './Table'
+export * from './TagsKeyValueTable'
+export * from './TargetPlatforms'
+export * from './Textarea'
+export * from './ThemeSwitcher'
+export * from './ToggleResolveScopedVariables'
+export * from './UnsavedChanges'
+export * from './UnsavedChangesDialog'
+export * from './VirtualizedList'
+export * from './WorkflowOptionsModal'
diff --git a/src/Shared/Helpers.tsx b/src/Shared/Helpers.tsx
index c39d02a1d..eda31ea24 100644
--- a/src/Shared/Helpers.tsx
+++ b/src/Shared/Helpers.tsx
@@ -15,42 +15,53 @@
*/
/* eslint-disable no-param-reassign */
-import { useEffect, useRef, useState, ReactElement } from 'react'
+import { ReactElement, useEffect, useRef, useState } from 'react'
import { PromptProps } from 'react-router-dom'
+import { StrictRJSFSchema } from '@rjsf/utils'
import Tippy from '@tippyjs/react'
-import { Pair } from 'yaml'
import moment from 'moment'
import { nanoid } from 'nanoid'
-import { StrictRJSFSchema } from '@rjsf/utils'
-import { MaterialHistoryType } from '@Shared/Services/app.types'
+import { Pair } from 'yaml'
+
+import { ReactComponent as ICAWSCodeCommit } from '@Icons/ic-aws-codecommit.svg'
+import { ReactComponent as ICBitbucket } from '@Icons/ic-bitbucket.svg'
+import { ReactComponent as ICGit } from '@Icons/ic-git.svg'
+import { ReactComponent as ICGithub } from '@Icons/ic-github.svg'
+import { ReactComponent as ICGitlab } from '@Icons/ic-gitlab.svg'
import { ReactComponent as ICPullRequest } from '@Icons/ic-pull-request.svg'
import { ReactComponent as ICTag } from '@Icons/ic-tag.svg'
import { ReactComponent as ICWebhook } from '@Icons/ic-webhook.svg'
-import { ReactComponent as ICGithub } from '@Icons/ic-github.svg'
-import { ReactComponent as ICGitlab } from '@Icons/ic-gitlab.svg'
-import { ReactComponent as ICGit } from '@Icons/ic-git.svg'
-import { ReactComponent as ICBitbucket } from '@Icons/ic-bitbucket.svg'
-import { ReactComponent as ICAWSCodeCommit } from '@Icons/ic-aws-codecommit.svg'
+import { MaterialHistoryType } from '@Shared/Services/app.types'
+
import {
+ ApprovalConfigDataType,
+ DATE_TIME_FORMATS,
handleUTCTime,
ManualApprovalType,
mapByKey,
MaterialInfo,
+ noop,
+ PATTERNS,
shallowEqual,
SortingOrder,
- UserApprovalConfigType,
- PATTERNS,
- ZERO_TIME_STRING,
- noop,
SourceTypeMap,
- DATE_TIME_FORMATS,
- ApprovalConfigDataType,
- UserApprovalInfo,
TOKEN_COOKIE_NAME,
+ UserApprovalConfigType,
+ UserApprovalInfo,
+ ZERO_TIME_STRING,
} from '../Common'
+import { getAggregator } from '../Pages'
+import {
+ AggregatedNodes,
+ DeploymentStatusDetailsBreakdownDataType,
+ DeploymentStatusDetailsType,
+ PodMetadatum,
+} from './Components'
+import { DEPLOYMENT_STATUS, TIMELINE_STATUS, UNSAVED_CHANGES_PROMPT_MESSAGE } from './constants'
import {
AggregationKeys,
BorderConfigType,
+ GetTimeDifferenceParamsType,
GitTriggers,
IntersectionChangeHandler,
IntersectionOptions,
@@ -60,14 +71,6 @@ import {
TargetPlatformsDTO,
WebhookEventNameType,
} from './types'
-import { DEPLOYMENT_STATUS, TIMELINE_STATUS, UNSAVED_CHANGES_PROMPT_MESSAGE } from './constants'
-import {
- AggregatedNodes,
- DeploymentStatusDetailsBreakdownDataType,
- DeploymentStatusDetailsType,
- PodMetadatum,
-} from './Components'
-import { getAggregator } from '../Pages'
interface HighlightSearchTextProps {
/**
@@ -778,9 +781,13 @@ export const decode = (data, isEncoded: boolean = false) =>
export const isTimeStringAvailable = (time: string): boolean => !!time && time !== ZERO_TIME_STRING
-export const getTimeDifference = (startTime: string, endTime: string): string => {
+export const getTimeDifference = ({
+ startTime,
+ endTime,
+ fallbackString = '-',
+}: GetTimeDifferenceParamsType): string => {
if (!isTimeStringAvailable(startTime) || !isTimeStringAvailable(endTime)) {
- return '-'
+ return fallbackString
}
const seconds = moment(endTime).diff(moment(startTime), 'seconds')
diff --git a/src/Shared/Hooks/UseDownload/UseDownload.tsx b/src/Shared/Hooks/UseDownload/UseDownload.tsx
index 4a7129fd5..6e18ad782 100644
--- a/src/Shared/Hooks/UseDownload/UseDownload.tsx
+++ b/src/Shared/Hooks/UseDownload/UseDownload.tsx
@@ -14,12 +14,14 @@
* limitations under the License.
*/
-import { showError } from '@Common/Helper'
import { useState } from 'react'
+
import { API_STATUS_CODES, Host } from '@Common/Constants'
+import { showError } from '@Common/Helper'
import { ServerErrors } from '@Common/ServerError'
import { getFileNameFromHeaders } from '@Shared/Helpers'
import { ToastManager, ToastVariantType } from '@Shared/Services'
+
import { getDownloadResponse } from './service'
import { UseDownloadProps, UseDownloadReturnType } from './types'
diff --git a/src/Shared/Hooks/UseDownload/index.tsx b/src/Shared/Hooks/UseDownload/index.tsx
index 299e1fa0b..4e109b008 100644
--- a/src/Shared/Hooks/UseDownload/index.tsx
+++ b/src/Shared/Hooks/UseDownload/index.tsx
@@ -14,5 +14,5 @@
* limitations under the License.
*/
-export { default as useDownload } from './UseDownload'
export * from './types'
+export { default as useDownload } from './UseDownload'
diff --git a/src/Shared/Hooks/UsePrompt/UsePrompt.tsx b/src/Shared/Hooks/UsePrompt/UsePrompt.tsx
index 9a846b38c..737554235 100644
--- a/src/Shared/Hooks/UsePrompt/UsePrompt.tsx
+++ b/src/Shared/Hooks/UsePrompt/UsePrompt.tsx
@@ -15,6 +15,7 @@
*/
import { useCallback, useEffect } from 'react'
+
import { UsePromptProps } from './types'
/**
diff --git a/src/Shared/Hooks/index.ts b/src/Shared/Hooks/index.ts
index 0aee8859c..4a7279c6c 100644
--- a/src/Shared/Hooks/index.ts
+++ b/src/Shared/Hooks/index.ts
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-export * from './UsePrompt'
-export * from './useGetResourceKindsOptions'
export * from './UseDownload'
export * from './useForm'
-export * from './useStickyEvent'
+export * from './useGetResourceKindsOptions'
export * from './useOneTimePrompt'
+export * from './UsePrompt'
+export * from './useStickyEvent'
export * from './useUserPreferences'
diff --git a/src/Shared/Hooks/useForm/useForm.ts b/src/Shared/Hooks/useForm/useForm.ts
index d77b5574a..975587ca8 100644
--- a/src/Shared/Hooks/useForm/useForm.ts
+++ b/src/Shared/Hooks/useForm/useForm.ts
@@ -18,16 +18,16 @@ import { BaseSyntheticEvent, ChangeEvent, useEffect, useRef, useState } from 're
import { deepEqual, noop } from '@Common/Helper'
-import { checkValidation } from './useForm.utils'
import {
DirtyFields,
- UseFormErrors,
TouchedFields,
+ UseFormErrorHandler,
+ UseFormErrors,
UseFormSubmitHandler,
UseFormValidation,
UseFormValidations,
- UseFormErrorHandler,
} from './useForm.types'
+import { checkValidation } from './useForm.utils'
/**
* A custom hook to manage form state, validation, and submission handling.
diff --git a/src/Shared/Hooks/useGetResourceKindsOptions/index.ts b/src/Shared/Hooks/useGetResourceKindsOptions/index.ts
index 467b79e90..86a41c642 100644
--- a/src/Shared/Hooks/useGetResourceKindsOptions/index.ts
+++ b/src/Shared/Hooks/useGetResourceKindsOptions/index.ts
@@ -14,5 +14,5 @@
* limitations under the License.
*/
+export type { UseGetResourceKindOptionsReturnType, UseGetResourceKindsOptionsProps } from './types'
export { default as useGetResourceKindsOptions } from './useGetResourceKindsOptions'
-export type { UseGetResourceKindsOptionsProps, UseGetResourceKindOptionsReturnType } from './types'
diff --git a/src/Shared/Hooks/useGetResourceKindsOptions/service.ts b/src/Shared/Hooks/useGetResourceKindsOptions/service.ts
index 17cbf4e66..3d247ef9f 100644
--- a/src/Shared/Hooks/useGetResourceKindsOptions/service.ts
+++ b/src/Shared/Hooks/useGetResourceKindsOptions/service.ts
@@ -14,14 +14,15 @@
* limitations under the License.
*/
-import { ResponseType, Teams } from '@Common/Types'
+import { get } from '@Common/API'
import { getTeamListMin } from '@Common/Common.service'
-import { ClusterType } from '@Shared/Services'
-import { EnvListMinDTO } from '@Shared/types'
-import { EnvironmentTypeEnum } from '@Shared/constants'
import { ROUTES } from '@Common/Constants'
+import { ResponseType, Teams } from '@Common/Types'
+import { EnvironmentTypeEnum } from '@Shared/constants'
import { stringComparatorBySortOrder } from '@Shared/Helpers'
-import { get } from '@Common/API'
+import { ClusterType } from '@Shared/Services'
+import { EnvListMinDTO } from '@Shared/types'
+
import { AppsGroupedByProjectsType, ClusterDTO, EnvironmentsGroupedByClustersType } from './types'
export const getAppOptionsGroupedByProjects = async (): Promise => {
diff --git a/src/Shared/Hooks/useGetResourceKindsOptions/types.ts b/src/Shared/Hooks/useGetResourceKindsOptions/types.ts
index c3af72b1d..b36bd7430 100644
--- a/src/Shared/Hooks/useGetResourceKindsOptions/types.ts
+++ b/src/Shared/Hooks/useGetResourceKindsOptions/types.ts
@@ -16,8 +16,9 @@
// ====== Service Types: Start ====== //
-import { EnvironmentType, ResourceKindType } from '@Shared/types'
import { ServerErrors } from '@Common/ServerError'
+import { EnvironmentType, ResourceKindType } from '@Shared/types'
+
import { getAppOptionsGroupedByProjects, getClusterOptions, getProjectOptions } from './service'
export interface AppType {
diff --git a/src/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.tsx b/src/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.tsx
index bb7978bd0..0717f8865 100644
--- a/src/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.tsx
+++ b/src/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.tsx
@@ -15,8 +15,10 @@
*/
import { useMemo } from 'react'
-import { ResourceKindType } from '@Shared/types'
+
import { useAsync } from '@Common/Helper'
+import { ResourceKindType } from '@Shared/types'
+
import {
getAppOptionsGroupedByProjects,
getClusterOptions,
diff --git a/src/Shared/Hooks/useGetResourceKindsOptions/utils.ts b/src/Shared/Hooks/useGetResourceKindsOptions/utils.ts
index 9e27c2f49..2ea375881 100644
--- a/src/Shared/Hooks/useGetResourceKindsOptions/utils.ts
+++ b/src/Shared/Hooks/useGetResourceKindsOptions/utils.ts
@@ -15,6 +15,7 @@
*/
import { ResourceKindType } from '@Shared/types'
+
import { UseGetResourceKindsOptionsProps } from './types'
export const getResourcesToFetchMap = (resourcesToFetch: UseGetResourceKindsOptionsProps['resourcesToFetch']) =>
diff --git a/src/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.ts b/src/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.ts
index b5379cdbf..0590e52a5 100644
--- a/src/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.ts
+++ b/src/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.ts
@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react'
-import { UseOneTimePromptProps } from './types'
import { ONE_TIME_PROMPT_LOCAL_STORAGE_KEY } from './constants'
+import { UseOneTimePromptProps } from './types'
const getOneTimePromptLocalStorageValue = () => {
try {
diff --git a/src/Shared/Hooks/useStickyEvent/useStickyEvent.ts b/src/Shared/Hooks/useStickyEvent/useStickyEvent.ts
index 185bd52d0..fd07ac1b8 100644
--- a/src/Shared/Hooks/useStickyEvent/useStickyEvent.ts
+++ b/src/Shared/Hooks/useStickyEvent/useStickyEvent.ts
@@ -15,10 +15,12 @@
*/
import { useEffect, useRef, useState } from 'react'
-import { isNullOrUndefined } from '@Shared/Helpers'
+
import { noop } from '@Common/Helper'
-import { UseStickyEventProps, UseStickyEventReturnType } from './types'
+import { isNullOrUndefined } from '@Shared/Helpers'
+
import { OBSERVER_ROOT_MARGIN, OBSERVER_THRESHOLD } from './constants'
+import { UseStickyEventProps, UseStickyEventReturnType } from './types'
import { getHeightForStickyElementTopOffset } from './utils'
import './styles.scss'
diff --git a/src/Shared/Hooks/useUserPreferences/index.ts b/src/Shared/Hooks/useUserPreferences/index.ts
index 82f66036b..ccf3ce08b 100644
--- a/src/Shared/Hooks/useUserPreferences/index.ts
+++ b/src/Shared/Hooks/useUserPreferences/index.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-export { useUserPreferences } from './useUserPrefrences'
export * from './constants'
+export { getUserPreferences, updateUserPreferences } from './service'
export * from './types'
-export { updateUserPreferences, getUserPreferences } from './service'
+export { useUserPreferences } from './useUserPrefrences'
diff --git a/src/Shared/Hooks/useUserPreferences/service.ts b/src/Shared/Hooks/useUserPreferences/service.ts
index 5d23ca5e9..88d38eab6 100644
--- a/src/Shared/Hooks/useUserPreferences/service.ts
+++ b/src/Shared/Hooks/useUserPreferences/service.ts
@@ -16,19 +16,21 @@
import { ROUTES } from '@Common/Constants'
import { get, getUrlWithSearchParams, patch, showError } from '@Common/index'
-import { ResourceKindType, BaseAppMetaData } from '@Shared/index'
import { THEME_PREFERENCE_MAP } from '@Shared/Providers/ThemeProvider/types'
+import { BaseAppMetaData } from '@Shared/Services'
+import { ResourceKindType } from '@Shared/types'
+
import { USER_PREFERENCES_ATTRIBUTE_KEY } from './constants'
import {
- UserPreferencesType,
- GetUserPreferencesQueryParamsType,
GetUserPreferencesParsedDTO,
- ViewIsPipelineRBACConfiguredRadioTabs,
- UserPreferenceResourceActions,
- UserPreferencesPayloadValueType,
+ GetUserPreferencesQueryParamsType,
UpdateUserPreferencesPayloadType,
UserPathValueMapType,
+ UserPreferenceResourceActions,
UserPreferenceResourceProps,
+ UserPreferencesPayloadValueType,
+ UserPreferencesType,
+ ViewIsPipelineRBACConfiguredRadioTabs,
} from './types'
import { getUserPreferenceResourcesMetadata } from './utils'
diff --git a/src/Shared/Hooks/useUserPreferences/types.ts b/src/Shared/Hooks/useUserPreferences/types.ts
index 013e9fe30..18d70f79e 100644
--- a/src/Shared/Hooks/useUserPreferences/types.ts
+++ b/src/Shared/Hooks/useUserPreferences/types.ts
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-import { AppThemeType, BaseAppMetaData, ResourceKindType } from '@Shared/index'
-import { ThemeConfigType, ThemePreferenceType } from '@Shared/Providers/ThemeProvider/types'
import { USER_PREFERENCES_ATTRIBUTE_KEY } from '@Shared/Hooks/useUserPreferences/constants'
+import { AppThemeType, ThemeConfigType, ThemePreferenceType } from '@Shared/Providers/ThemeProvider/types'
+import { BaseAppMetaData } from '@Shared/Services'
+import { ResourceKindType } from '@Shared/types'
export interface GetUserPreferencesQueryParamsType {
key: typeof USER_PREFERENCES_ATTRIBUTE_KEY
diff --git a/src/Shared/Hooks/useUserPreferences/useUserPrefrences.tsx b/src/Shared/Hooks/useUserPreferences/useUserPrefrences.tsx
index 9f8929690..9b108a0cd 100644
--- a/src/Shared/Hooks/useUserPreferences/useUserPrefrences.tsx
+++ b/src/Shared/Hooks/useUserPreferences/useUserPrefrences.tsx
@@ -14,9 +14,13 @@
* limitations under the License.
*/
-import { ResourceKindType, useTheme } from '@Shared/index'
import { useState } from 'react'
+
import { ServerErrors } from '@Common/ServerError'
+import { useTheme } from '@Shared/Providers'
+import { ResourceKindType } from '@Shared/types'
+
+import { getUserPreferences, updateUserPreferences } from './service'
import {
UserPreferenceRecentlyVisitedAppsTypes,
UserPreferenceResourceActions,
@@ -24,7 +28,6 @@ import {
UseUserPreferencesProps,
ViewIsPipelineRBACConfiguredRadioTabs,
} from './types'
-import { getUserPreferences, updateUserPreferences } from './service'
import { getFilteredUniqueAppList } from './utils'
export const useUserPreferences = ({ migrateUserPreferences }: UseUserPreferencesProps) => {
diff --git a/src/Shared/Hooks/useUserPreferences/utils.tsx b/src/Shared/Hooks/useUserPreferences/utils.tsx
index 0f96f6494..1e077272b 100644
--- a/src/Shared/Hooks/useUserPreferences/utils.tsx
+++ b/src/Shared/Hooks/useUserPreferences/utils.tsx
@@ -1,4 +1,6 @@
-import { BaseAppMetaData, ResourceKindType } from '@Shared/index'
+import { BaseAppMetaData } from '@Shared/Services'
+import { ResourceKindType } from '@Shared/types'
+
import { UserPreferenceFilteredListTypes, UserPreferenceResourceActions, UserPreferenceResourceType } from './types'
export const getUserPreferenceResourcesMetadata = (recentlyVisited: BaseAppMetaData[]): UserPreferenceResourceType => ({
diff --git a/src/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.tsx b/src/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.tsx
index 69d592ad6..2b0858a61 100644
--- a/src/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.tsx
+++ b/src/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.tsx
@@ -15,6 +15,7 @@
*/
import { createContext, useContext, useMemo } from 'react'
+
import { ImageSelectionUtilityContextType, ImageSelectionUtilityProviderProps } from './types'
export const ImageSelectionUtilityContext = createContext(null)
diff --git a/src/Shared/Providers/MainContextProvider.tsx b/src/Shared/Providers/MainContextProvider.tsx
index ad2f81e4b..b8f1238ab 100644
--- a/src/Shared/Providers/MainContextProvider.tsx
+++ b/src/Shared/Providers/MainContextProvider.tsx
@@ -15,6 +15,7 @@
*/
import { createContext, useContext } from 'react'
+
import { MainContext, MainContextProviderProps } from './types'
// TODO: (Arun) - Move to separate folder
diff --git a/src/Shared/Providers/ThemeProvider/ThemeProvider.tsx b/src/Shared/Providers/ThemeProvider/ThemeProvider.tsx
index e759a8f6c..ea0461796 100644
--- a/src/Shared/Providers/ThemeProvider/ThemeProvider.tsx
+++ b/src/Shared/Providers/ThemeProvider/ThemeProvider.tsx
@@ -15,14 +15,15 @@
*/
import { createContext, useContext, useEffect, useMemo, useState } from 'react'
+
+import { DARK_COLOR_SCHEME_MATCH_QUERY } from './constants'
+import { THEME_PREFERENCE_MAP, ThemeConfigType, ThemeContextType, ThemeProviderProps } from './types'
import {
getAppThemeForAutoPreference,
getThemeConfigFromLocalStorage,
logThemeToAnalytics,
setThemePreferenceInLocalStorage,
} from './utils'
-import { THEME_PREFERENCE_MAP, ThemeConfigType, ThemeContextType, ThemeProviderProps } from './types'
-import { DARK_COLOR_SCHEME_MATCH_QUERY } from './constants'
const themeContext = createContext(null)
diff --git a/src/Shared/Providers/ThemeProvider/index.ts b/src/Shared/Providers/ThemeProvider/index.ts
index f90cf47cb..0a658681f 100644
--- a/src/Shared/Providers/ThemeProvider/index.ts
+++ b/src/Shared/Providers/ThemeProvider/index.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
+export { THEME_PREFERENCE_STORAGE_KEY } from './constants'
export * from './ThemeProvider'
export { AppThemeType } from './types'
export { getComponentSpecificThemeClass, getThemePreferenceText } from './utils'
-export { THEME_PREFERENCE_STORAGE_KEY } from './constants'
diff --git a/src/Shared/Providers/ThemeProvider/utils.ts b/src/Shared/Providers/ThemeProvider/utils.ts
index ae2a52edc..ecc8ab1f4 100644
--- a/src/Shared/Providers/ThemeProvider/utils.ts
+++ b/src/Shared/Providers/ThemeProvider/utils.ts
@@ -15,8 +15,9 @@
*/
import ReactGA from 'react-ga4'
+
import { DARK_COLOR_SCHEME_MATCH_QUERY, THEME_PREFERENCE_STORAGE_KEY } from './constants'
-import { AppThemeType, THEME_PREFERENCE_MAP, ThemePreferenceType, ThemeConfigType } from './types'
+import { AppThemeType, THEME_PREFERENCE_MAP, ThemeConfigType, ThemePreferenceType } from './types'
export const getAppThemeForAutoPreference = (): AppThemeType =>
window.matchMedia && window.matchMedia(DARK_COLOR_SCHEME_MATCH_QUERY).matches
diff --git a/src/Shared/Providers/UserEmailProvider/UserEmailProvider.tsx b/src/Shared/Providers/UserEmailProvider/UserEmailProvider.tsx
index 5eb5284a2..5dd549994 100644
--- a/src/Shared/Providers/UserEmailProvider/UserEmailProvider.tsx
+++ b/src/Shared/Providers/UserEmailProvider/UserEmailProvider.tsx
@@ -15,6 +15,7 @@
*/
import React, { createContext, useContext, useMemo, useState } from 'react'
+
import { UseUserEmailContextType } from './types'
const context = createContext(null)
diff --git a/src/Shared/Providers/UserEmailProvider/index.ts b/src/Shared/Providers/UserEmailProvider/index.ts
index 21dea94aa..e31d2d0e3 100644
--- a/src/Shared/Providers/UserEmailProvider/index.ts
+++ b/src/Shared/Providers/UserEmailProvider/index.ts
@@ -14,5 +14,5 @@
* limitations under the License.
*/
-export * from './UserEmailProvider'
export * from './types'
+export * from './UserEmailProvider'
diff --git a/src/Shared/Providers/index.ts b/src/Shared/Providers/index.ts
index b720d4ffa..3e07be345 100644
--- a/src/Shared/Providers/index.ts
+++ b/src/Shared/Providers/index.ts
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-export * from './MainContextProvider'
export * from './ImageSelectionUtility'
+export * from './MainContextProvider'
export * from './ThemeProvider'
-export * from './UserEmailProvider'
export type { MainContext } from './types'
+export * from './UserEmailProvider'
diff --git a/src/Shared/Providers/types.ts b/src/Shared/Providers/types.ts
index cba73bb29..68af58238 100644
--- a/src/Shared/Providers/types.ts
+++ b/src/Shared/Providers/types.ts
@@ -15,8 +15,9 @@
*/
import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react'
-import { ServerInfo } from '../Components/Header/types'
+
import { SERVER_MODE } from '../../Common'
+import { ServerInfo } from '../Components/Header/types'
import { DevtronLicenseInfo, LicenseInfoDialogType } from '..'
export interface MainContext {
@@ -64,6 +65,7 @@ export interface MainContext {
*/
licenseData: DevtronLicenseInfo
setLicenseData: Dispatch>
+ canFetchHelmAppStatus: boolean
}
export interface MainContextProviderProps {
diff --git a/src/Shared/Services/ToastManager/ToastContent.tsx b/src/Shared/Services/ToastManager/ToastContent.tsx
index 8d2be819d..2e9ce70a5 100644
--- a/src/Shared/Services/ToastManager/ToastContent.tsx
+++ b/src/Shared/Services/ToastManager/ToastContent.tsx
@@ -16,6 +16,7 @@
import { Button, ButtonStyleType, ButtonVariantType } from '@Shared/Components'
import { ComponentSizeType } from '@Shared/constants'
+
import { ToastProps } from './types'
export const ToastContent = ({
diff --git a/src/Shared/Services/ToastManager/constants.tsx b/src/Shared/Services/ToastManager/constants.tsx
index d5889b61e..0deeaf82b 100644
--- a/src/Shared/Services/ToastManager/constants.tsx
+++ b/src/Shared/Services/ToastManager/constants.tsx
@@ -15,15 +15,17 @@
*/
// eslint-disable-next-line no-restricted-imports
-import { ToastOptions, ToastContainerProps } from 'react-toastify'
+import { ToastContainerProps, ToastOptions } from 'react-toastify'
+
+import { ReactComponent as ICCross } from '@Icons/ic-cross.svg'
+import { ReactComponent as ICError } from '@Icons/ic-error.svg'
import { ReactComponent as ICInfoFilled } from '@Icons/ic-info-filled.svg'
+import { ReactComponent as ICLocked } from '@Icons/ic-locked.svg'
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
-import { ReactComponent as ICError } from '@Icons/ic-error.svg'
import { ReactComponent as ICWarning } from '@Icons/ic-warning.svg'
-import { ReactComponent as ICLocked } from '@Icons/ic-locked.svg'
-import { ReactComponent as ICCross } from '@Icons/ic-cross.svg'
import { Button, ButtonStyleType, ButtonVariantType } from '@Shared/Components'
import { ComponentSizeType } from '@Shared/constants'
+
import { ToastProps, ToastVariantType } from './types'
export const TOAST_BASE_CONFIG: ToastContainerProps = {
diff --git a/src/Shared/Services/ToastManager/index.ts b/src/Shared/Services/ToastManager/index.ts
index 6940d8a54..bdbb2277b 100644
--- a/src/Shared/Services/ToastManager/index.ts
+++ b/src/Shared/Services/ToastManager/index.ts
@@ -15,5 +15,5 @@
*/
export { default as ToastManager, ToastManagerContainer } from './toastManager.service'
-export { ToastVariantType } from './types'
export type { ToastProps } from './types'
+export { ToastVariantType } from './types'
diff --git a/src/Shared/Services/ToastManager/toastManager.service.tsx b/src/Shared/Services/ToastManager/toastManager.service.tsx
index cf929af3b..3b32d585e 100644
--- a/src/Shared/Services/ToastManager/toastManager.service.tsx
+++ b/src/Shared/Services/ToastManager/toastManager.service.tsx
@@ -16,9 +16,11 @@
// eslint-disable-next-line no-restricted-imports
import { toast, ToastContainer, ToastOptions } from 'react-toastify'
-import { ToastProps, ToastVariantType } from './types'
+
import { TOAST_BASE_CONFIG, TOAST_VARIANT_TO_CONFIG_MAP } from './constants'
import { ToastContent } from './ToastContent'
+import { ToastProps, ToastVariantType } from './types'
+
import './toastManager.scss'
/**
diff --git a/src/Shared/Services/ToastManager/types.ts b/src/Shared/Services/ToastManager/types.ts
index 4f005be4d..4413f7759 100644
--- a/src/Shared/Services/ToastManager/types.ts
+++ b/src/Shared/Services/ToastManager/types.ts
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-import { ButtonComponentType, ButtonProps } from '@Shared/Components'
import { ReactElement } from 'react'
+import { ButtonComponentType, ButtonProps } from '@Shared/Components'
+
export enum ToastVariantType {
info = 'info',
success = 'success',
diff --git a/src/Shared/Services/app.service.ts b/src/Shared/Services/app.service.ts
index 1fd38400f..7be3abbff 100644
--- a/src/Shared/Services/app.service.ts
+++ b/src/Shared/Services/app.service.ts
@@ -15,16 +15,17 @@
*/
import { AppConfigProps, GetTemplateAPIRouteType } from '@Pages/index'
-import { ROUTES, ResponseType, get, getUrlWithSearchParams, showError } from '../../Common'
+
+import { get, getUrlWithSearchParams, ResponseType, ROUTES, showError } from '../../Common'
+import { getTemplateAPIRoute } from '..'
import {
+ AppEnvDeploymentConfigDTO,
+ AppEnvDeploymentConfigPayloadType,
CIMaterialInfoDTO,
CIMaterialInfoType,
GetCITriggerInfoParamsType,
- AppEnvDeploymentConfigDTO,
- AppEnvDeploymentConfigPayloadType,
} from './app.types'
import { getParsedCIMaterialInfo } from './utils'
-import { getTemplateAPIRoute } from '..'
export const getCITriggerInfo = async (params: GetCITriggerInfoParamsType): Promise => {
try {
diff --git a/src/Shared/Services/app.types.ts b/src/Shared/Services/app.types.ts
index ce4849fb0..399b195af 100644
--- a/src/Shared/Services/app.types.ts
+++ b/src/Shared/Services/app.types.ts
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-import { OverrideMergeStrategyType } from '@Pages/Applications'
import { TargetPlatformsDTO } from '@Shared/types'
-import { ReleaseTag, UserApprovalMetadataType, ResponseType } from '../../Common'
+import { OverrideMergeStrategyType } from '@Pages/Applications'
+
+import { ReleaseTag, ResponseType, UserApprovalMetadataType } from '../../Common'
interface WebhookDataType {
id: number
diff --git a/src/Shared/Services/common.service.ts b/src/Shared/Services/common.service.ts
index 67d8e7f02..67357f88e 100644
--- a/src/Shared/Services/common.service.ts
+++ b/src/Shared/Services/common.service.ts
@@ -15,8 +15,9 @@
*/
import { AppConfigProps, GetTemplateAPIRouteType } from '@Pages/index'
-import { getTemplateAPIRoute } from '..'
+
import { get, getUrlWithSearchParams, post, ROUTES } from '../../Common'
+import { getTemplateAPIRoute } from '..'
import { EnvironmentDataValuesDTO, GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types'
export const getResourceApiUrl = ({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps) =>
diff --git a/src/Shared/Services/index.ts b/src/Shared/Services/index.ts
index 8ef863d35..cc4e7b5f5 100644
--- a/src/Shared/Services/index.ts
+++ b/src/Shared/Services/index.ts
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-export * from './types'
-export * from './app.types'
export * from './app.service'
+export * from './app.types'
export * from './common.service'
+export * from './template.service'
export * from './ToastManager'
+export * from './types'
export * from './utils'
-export * from './template.service'
diff --git a/src/Shared/Services/template.service.ts b/src/Shared/Services/template.service.ts
index f57e9c874..3683c019b 100644
--- a/src/Shared/Services/template.service.ts
+++ b/src/Shared/Services/template.service.ts
@@ -14,9 +14,10 @@
* limitations under the License.
*/
+import { ROUTES } from '@Common/Constants'
import { getUrlWithSearchParams } from '@Common/Helper'
import { GetTemplateAPIRouteProps } from '@Pages/index'
-import { ROUTES } from '@Common/Constants'
+
import { getResourceApiUrl, ResourceKindType, ResourceVersionType } from '..'
export const getTemplateAPIRoute = ({ type, queryParams: { id, ...restQueryParams } }: GetTemplateAPIRouteProps) =>
diff --git a/src/Shared/Services/types.ts b/src/Shared/Services/types.ts
index 7653940ca..2d98e6c76 100644
--- a/src/Shared/Services/types.ts
+++ b/src/Shared/Services/types.ts
@@ -15,6 +15,7 @@
*/
import { MainContext } from '@Shared/Providers'
+
import { getUrlWithSearchParams } from '../../Common'
import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types'
@@ -54,7 +55,7 @@ export interface GetResourceApiUrlProps extends BaseGetApiUrlProps
extends Omit, 'baseUrl'> {}
-export interface EnvironmentDataValuesDTO extends Pick {
+export interface EnvironmentDataValuesDTO extends Pick {
isAirGapEnvironment: boolean
isManifestScanningEnabled: boolean
canOnlyViewPermittedEnvOrgLevel: boolean
diff --git a/src/Shared/Services/utils.ts b/src/Shared/Services/utils.ts
index 65cf8a72f..ed28a4328 100644
--- a/src/Shared/Services/utils.ts
+++ b/src/Shared/Services/utils.ts
@@ -15,6 +15,7 @@
*/
import { sanitizeTargetPlatforms } from '@Shared/Helpers'
+
import { createGitCommitUrl, handleUTCTime } from '../../Common'
import { CIMaterialInfoDTO, CIMaterialInfoType } from './app.types'
diff --git a/src/Shared/Store/IndexStore.tsx b/src/Shared/Store/IndexStore.tsx
index 390d6f155..baa1e38b0 100644
--- a/src/Shared/Store/IndexStore.tsx
+++ b/src/Shared/Store/IndexStore.tsx
@@ -17,8 +17,10 @@
/* eslint-disable eqeqeq */
/* eslint-disable array-callback-return */
import { BehaviorSubject } from 'rxjs'
+
import { NodeFilters } from '@Shared/Components'
-import { AppDetails, AppType, EnvDetails, EnvType, Node, Nodes, PodMetaData, iNode } from '../types'
+
+import { AppDetails, AppType, EnvDetails, EnvType, iNode, Node, Nodes, PodMetaData } from '../types'
const _appDetailsSubject: BehaviorSubject = new BehaviorSubject({} as AppDetails)
const _nodesSubject: BehaviorSubject> = new BehaviorSubject([] as Node[])
diff --git a/src/Shared/constants.tsx b/src/Shared/constants.tsx
index fc0039ec3..ae2c2d9be 100644
--- a/src/Shared/constants.tsx
+++ b/src/Shared/constants.tsx
@@ -15,6 +15,7 @@
*/
import { OptionType } from '@Common/Types'
+
import { CDMaterialSidebarType, ConfigKeysWithLockType, ConfigurationType } from './types'
export const ARTIFACT_STATUS = {
diff --git a/src/Shared/index.ts b/src/Shared/index.ts
index 97c0e848b..ca1a15d5c 100644
--- a/src/Shared/index.ts
+++ b/src/Shared/index.ts
@@ -14,14 +14,14 @@
* limitations under the License.
*/
+export * from './Analytics'
+export * from './API'
export * from './Components'
-export * from './validations'
+export * from './constants'
export * from './Helpers'
-export * from './types'
+export * from './Hooks'
export * from './Providers'
-export * from './constants'
export * from './Services'
export * from './Store'
-export * from './Hooks'
-export * from './API'
-export * from './Analytics'
+export * from './types'
+export * from './validations'
diff --git a/src/Shared/types.ts b/src/Shared/types.ts
index 399863e3a..4b837338d 100644
--- a/src/Shared/types.ts
+++ b/src/Shared/types.ts
@@ -14,25 +14,27 @@
* limitations under the License.
*/
+import { ParsedCountry } from 'react-international-phone'
import { Dayjs } from 'dayjs'
+
import { APIOptions, ApprovalConfigDataType } from '@Common/Types'
-import { ParsedCountry } from 'react-international-phone'
+
import {
- OptionType,
CommonNodeAttr,
- VulnerabilityType,
DeploymentAppTypes,
+ OptionType,
+ PluginType,
+ RefVariableType,
+ SegmentedControlProps,
ServerErrors,
SortingParams,
TriggerBlockType,
ValueConstraintType,
VariableType,
- RefVariableType,
- PluginType,
- SegmentedControlProps,
+ VulnerabilityType,
} from '../Common'
-import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants'
import { SelectPickerOptionType } from './Components'
+import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants'
export enum EnvType {
CHART = 'helm_charts',
@@ -1105,3 +1107,46 @@ export type CountryISO2Type = ParsedCountry['iso2']
export enum ResponseHeaders {
LICENSE_STATUS = 'X-License-Status',
}
+
+export type IconBaseSizeType =
+ | 6
+ | 8
+ | 10
+ | 12
+ | 14
+ | 16
+ | 18
+ | 20
+ | 22
+ | 24
+ | 28
+ | 30
+ | 32
+ | 34
+ | 36
+ | 40
+ | 42
+ | 44
+ | 48
+ | 72
+ | 80
+
+export type IconBaseColorType =
+ | `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50' | '0'}`
+ | 'white'
+ | 'black'
+ | null
+
+export interface GetTimeDifferenceParamsType {
+ startTime: string
+ endTime: string
+ /**
+ * @default '-'
+ */
+ fallbackString?: string
+}
+
+export enum RegistryCredentialsType {
+ USERNAME_PASSWORD = 'username_password',
+ ANONYMOUS = 'anonymous',
+}
diff --git a/src/Shared/validations.tsx b/src/Shared/validations.tsx
index feb34474a..7f2c3cf06 100644
--- a/src/Shared/validations.tsx
+++ b/src/Shared/validations.tsx
@@ -14,12 +14,14 @@
* limitations under the License.
*/
-import { getSanitizedIframe } from '@Common/Helper'
import { customizeValidator } from '@rjsf/validator-ajv8'
-import { PATTERNS } from '@Common/Constants'
import { parse } from 'yaml'
-import { URLProtocolType } from './types'
+
+import { PATTERNS } from '@Common/Constants'
+import { getSanitizedIframe } from '@Common/Helper'
+
import { SKIP_LABEL_KEY_VALIDATION_PREFIX } from './constants'
+import { URLProtocolType } from './types'
export interface ValidationResponseType {
isValid: boolean
diff --git a/src/index.ts b/src/index.ts
index b101a0807..f582c59a3 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -165,5 +165,5 @@ declare global {
}
export * from './Common'
-export * from './Shared'
export * from './Pages'
+export * from './Shared'
diff --git a/tsconfig.json b/tsconfig.json
index cb93d76c5..8ab4b2801 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,69 +1,40 @@
{
- "compilerOptions": {
- "baseUrl": ".",
- "paths": {
- "@Icons/*": [
- "./src/Assets/Icon/*"
- ],
- "@IconsV2/*": [
- "./src/Assets/IconV2/*"
- ],
- "@Sounds/*": [
- "./src/Assets/Sounds/*"
- ],
- "@Images/*": [
- "./src/Assets/Img/*"
- ],
- "@Common/*": [
- "./src/Common/*"
- ],
- "@Pages/*": [
- "./src/Pages/*"
- ],
- "@Shared/*": [
- "./src/Shared/*"
- ],
- "codemirror-json-schema/yaml": ["./node_modules/codemirror-json-schema/dist/yaml"],
+ "compilerOptions": {
+ "baseUrl": ".",
+ "paths": {
+ "@Icons/*": ["./src/Assets/Icon/*"],
+ "@IconsV2/*": ["./src/Assets/IconV2/*"],
+ "@Sounds/*": ["./src/Assets/Sounds/*"],
+ "@Images/*": ["./src/Assets/Img/*"],
+ "@Common/*": ["./src/Common/*"],
+ "@Shared/*": ["./src/Shared/*"],
+ "@Pages/*": ["./src/Pages/*"],
+ "codemirror-json-schema/yaml": ["./node_modules/codemirror-json-schema/dist/yaml"]
+ },
+ "target": "ES2020",
+ "useDefineForClassFields": true,
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
+ "module": "ESNext",
+ "skipLibCheck": true,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "noEmit": true,
+ "jsx": "react-jsx",
+ "declaration": true,
+ "strict": false,
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "noFallthroughCasesInSwitch": false,
+ "types": ["vite/client"]
},
- "target": "ES2020",
- "useDefineForClassFields": true,
- "lib": [
- "ES2022",
- "DOM",
- "DOM.Iterable"
- ],
- "module": "ESNext",
- "skipLibCheck": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- /* Bundler mode */
- "moduleResolution": "node",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "noEmit": true,
- "jsx": "react-jsx",
- "declaration": true,
- /* Linting */
- "strict": false,
- "noUnusedLocals": false,
- "noUnusedParameters": false,
- "noFallthroughCasesInSwitch": false,
- "types": [
- "vite/client"
+ "include": ["src"],
+ "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx", "src/**/*.test.ts", "src/**/*.test.tsx"],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ }
]
- },
- "include": [
- "src"
- ],
- "exclude": [
- "src/**/*.spec.ts",
- "src/**/*.spec.tsx",
- "src/**/*.test.ts",
- "src/**/*.test.tsx"
- ],
- "references": [
- {
- "path": "./tsconfig.node.json"
- }
- ]
}