@devtron-labs/devtron-fe-common-lib 1.3.9 → 1.3.11-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor--JGVkfVq.js → @code-editor-Df25qlGt.js} +5009 -5086
- package/dist/{@common-rjsf-BJZae-C6.js → @common-rjsf-DwdQcbfL.js} +2 -2
- package/dist/{@framer-motion-CFzS2_A_.js → @framer-motion-BxQTtYmm.js} +1 -1
- package/dist/{@react-dates-C-VeMZT9.js → @react-dates-M_eJUVeH.js} +1 -1
- package/dist/{@react-select-S88iwOBa.js → @react-select-CywptBlV.js} +230 -219
- package/dist/{@vendor-RA_nL1Ml.js → @vendor-QI4m26H1.js} +6108 -6024
- package/dist/Common/Constants.d.ts +3 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +8 -6
- package/dist/Shared/Components/ImageCardAccordion/ImageCardAccordion.d.ts +1 -1
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +2 -3
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/EmptyState.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/InfoCard.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/KubernetesManifest.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/Sidebar.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/Table.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +7 -11
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +4 -4
- package/dist/Shared/Components/Security/SecurityModal/service.d.ts +2 -2
- package/dist/Shared/Components/Security/SecurityModal/types.d.ts +12 -19
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +3 -4
- package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +1 -1
- package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +2 -4
- package/dist/Shared/Components/Security/Vulnerabilities/Vulnerabilities.d.ts +1 -1
- package/dist/Shared/Components/Security/Vulnerabilities/types.d.ts +1 -17
- package/dist/Shared/Components/Security/Vulnerabilities/utils.d.ts +0 -5
- package/dist/Shared/Components/Security/utils.d.ts +6 -3
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/SelectPickerTextArea.component.d.ts +2 -0
- package/dist/Shared/Components/SelectPicker/common.d.ts +4 -2
- package/dist/Shared/Components/SelectPicker/index.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +8 -1
- package/dist/Shared/Providers/index.d.ts +1 -0
- package/dist/Shared/Providers/types.d.ts +1 -0
- package/dist/Shared/types.d.ts +1 -3
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-upload-arrow-animated.47c08ddc.svg +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +277 -281
- package/package.json +4 -2
- package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/index.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/types.d.ts +0 -12
- package/dist/assets/ic-clear-square.e60de021.svg +0 -8
- package/dist/assets/ic-cloud-upload.18066e05.svg +0 -3
@@ -67,7 +67,7 @@ export declare const ROUTES: {
|
|
67
67
|
CD_MATERIAL_GET: string;
|
68
68
|
DEPLOYMENT_TEMPLATE_LIST: string;
|
69
69
|
INFRA_CONFIG_PROFILE: string;
|
70
|
-
|
70
|
+
SCAN_RESULT: string;
|
71
71
|
NOTIFIER: string;
|
72
72
|
APP_LIST: string;
|
73
73
|
TELEMETRY_EVENT: string;
|
@@ -255,7 +255,8 @@ export declare enum ReactSelectInputAction {
|
|
255
255
|
inputChange = "input-change",
|
256
256
|
selectOption = "select-option",
|
257
257
|
deselectOption = "deselect-option",
|
258
|
-
removeValue = "remove-value"
|
258
|
+
removeValue = "remove-value",
|
259
|
+
inputBlur = "input-blur"
|
259
260
|
}
|
260
261
|
export declare const ZERO_TIME_STRING = "0001-01-01T00:00:00Z";
|
261
262
|
export declare const EXCLUDED_FALSY_VALUES: readonly [any, any, "", number];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { DynamicDataTableRowProps } from './types';
|
2
|
-
export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, cellError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
|
2
|
+
export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, readOnly, isDeletionNotAllowed, cellError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, focusableFieldKey, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
|
@@ -2,8 +2,7 @@ import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
|
3
3
|
import { UseStateFiltersReturnType } from '../../../Common/Hooks';
|
4
4
|
import { TooltipProps } from '@Common/Tooltip/types';
|
5
|
-
import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
|
6
|
-
import { SelectTextAreaProps } from '../SelectTextArea';
|
5
|
+
import { SelectPickerOptionType, SelectPickerProps, SelectPickerTextAreaProps } from '../SelectPicker';
|
7
6
|
import { FileUploadProps } from '../FileUpload';
|
8
7
|
/**
|
9
8
|
* Interface representing header for a dynamic data table.
|
@@ -33,9 +32,7 @@ export declare enum DynamicDataTableRowDataType {
|
|
33
32
|
export type DynamicDataTableCellPropsMap = {
|
34
33
|
[DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
|
35
34
|
[DynamicDataTableRowDataType.DROPDOWN]: Omit<SelectPickerProps<string, false>, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled'>;
|
36
|
-
[DynamicDataTableRowDataType.SELECT_TEXT]: Omit<
|
37
|
-
textAreaProps?: Omit<SelectTextAreaProps['textAreaProps'], 'className' | 'disableOnBlurResizeToMinHeight' | 'minHeight' | 'maxHeight'>;
|
38
|
-
};
|
35
|
+
[DynamicDataTableRowDataType.SELECT_TEXT]: Omit<SelectPickerTextAreaProps, 'inputId' | 'value' | 'onChange' | 'fullWidth' | 'isDisabled' | 'variant' | 'formatCreateLabel'>;
|
39
36
|
[DynamicDataTableRowDataType.BUTTON]: Pick<DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, 'onClick'> & {
|
40
37
|
icon?: ReactNode;
|
41
38
|
text: string;
|
@@ -160,9 +157,14 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
|
|
160
157
|
* Validation state for a specific cell in a dynamic data table.
|
161
158
|
*/
|
162
159
|
cellError?: DynamicDataTableCellErrorType<K>;
|
160
|
+
/**
|
161
|
+
* Header key to determine which cell should be focused after row addition.
|
162
|
+
* @default 'first column key'
|
163
|
+
*/
|
164
|
+
focusableFieldKey?: K;
|
163
165
|
};
|
164
166
|
export interface DynamicDataTableHeaderProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
|
165
167
|
}
|
166
|
-
export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'cellError' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
|
168
|
+
export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'cellError' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent' | 'focusableFieldKey'> {
|
167
169
|
}
|
168
170
|
export {};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { ImageCardAccordionProps } from './types';
|
2
|
-
declare const ImageCardAccordion: ({ isSecurityModuleInstalled, artifactId, applicationId, environmentId, changesCard, isScanned, isScanEnabled, SecurityModalSidebar,
|
2
|
+
declare const ImageCardAccordion: ({ isSecurityModuleInstalled, artifactId, applicationId, environmentId, changesCard, isScanned, isScanEnabled, SecurityModalSidebar, }: ImageCardAccordionProps) => JSX.Element;
|
3
3
|
export default ImageCardAccordion;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
2
|
-
import { CDModalTabType,
|
2
|
+
import { CDModalTabType, VulnerabilityType } from '../../../Common';
|
3
3
|
import { MaterialSecurityInfoType } from '../../types';
|
4
|
-
import {
|
4
|
+
import { SidebarPropsType } from '../Security';
|
5
5
|
export interface ImageCardAccordionProps extends MaterialSecurityInfoType {
|
6
6
|
isSecurityModuleInstalled: boolean;
|
7
7
|
artifactId: number;
|
@@ -11,7 +11,6 @@ export interface ImageCardAccordionProps extends MaterialSecurityInfoType {
|
|
11
11
|
isScanned: boolean;
|
12
12
|
isScanEnabled: boolean;
|
13
13
|
SecurityModalSidebar: React.FC<SidebarPropsType>;
|
14
|
-
getSecurityScan: (props: Pick<AppDetailsPayload, 'appId' | 'artifactId'>) => Promise<ResponseType<ApiResponseResultType>>;
|
15
14
|
}
|
16
15
|
export interface SecurityDetailsType {
|
17
16
|
vulnerabilities: VulnerabilityType[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ScanResultDTO, CodeScan, DetailViewDataType, EmptyStateType, InfoCardPropsType, OpenDetailViewButtonProps, SecurityModalStateType, StatusType, TablePropsType } from '../types';
|
2
2
|
export declare const getCodeScanVulnerabilities: (data: CodeScan["vulnerability"], hidePolicy: boolean) => {
|
3
3
|
headers: ({
|
4
4
|
headerText: string;
|
@@ -97,4 +97,4 @@ export declare const getCodeScanExposedSecrets: (data: CodeScan["exposedSecrets"
|
|
97
97
|
};
|
98
98
|
export declare const getCodeScanTableData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
99
99
|
export declare const getCodeScanInfoCardData: (data: CodeScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
100
|
-
export declare const getCodeScanEmptyState: (data:
|
100
|
+
export declare const getCodeScanEmptyState: (data: ScanResultDTO, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const getEmptyStateValues: (data:
|
1
|
+
import { ScanResultDTO, DetailViewDataType, SecurityModalStateType } from '../types';
|
2
|
+
export declare const getEmptyStateValues: (data: ScanResultDTO, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => import('../types').EmptyStateType;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType,
|
1
|
+
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType, ScanResultDTO, OpenDetailViewButtonProps } from '../types';
|
2
2
|
export declare const getProgressingStateForStatus: (status: StatusType["status"]) => JSX.Element;
|
3
3
|
export declare const getImageScanTableData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
4
4
|
export declare const getImageScanInfoCardData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
5
|
-
export declare const getImageScanEmptyState: (data:
|
5
|
+
export declare const getImageScanEmptyState: (data: ScanResultDTO, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { InfoCardPropsType,
|
2
|
-
export declare const getInfoCardData: (data:
|
1
|
+
import { InfoCardPropsType, ScanResultDTO, SecurityModalStateType } from '../types';
|
2
|
+
export declare const getInfoCardData: (data: ScanResultDTO, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ScanResultDTO, DetailViewDataType, EmptyStateType, InfoCardPropsType, KubernetesManifest, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
|
2
2
|
export declare const getKubernetesManifestTableData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"]) => TablePropsType;
|
3
3
|
export declare const getKubernetesManifestInfoCardData: (data: KubernetesManifest, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
4
|
-
export declare const getKubernetesManifestEmptyState: (data:
|
4
|
+
export declare const getKubernetesManifestEmptyState: (data: ScanResultDTO, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { SidebarDataType } from '../types';
|
2
|
-
export declare const
|
1
|
+
import { SidebarDataType, SidebarPropsType } from '../types';
|
2
|
+
export declare const getSidebarData: (categoriesConfig: SidebarPropsType["categoriesConfig"]) => SidebarDataType[];
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const getTableData: (data:
|
1
|
+
import { ScanResultDTO, OpenDetailViewButtonProps, SecurityModalStateType, TablePropsType } from '../types';
|
2
|
+
export declare const getTableData: (data: ScanResultDTO, category: SecurityModalStateType["category"], subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
import { SeveritiesDTO, SortOrderEnum, EmptyStateType, StatusType } from './types';
|
2
|
-
export declare const
|
3
|
-
category: "imageScan";
|
4
|
-
subCategory: "vulnerability";
|
5
|
-
detailViewData: any;
|
6
|
-
};
|
1
|
+
import { SeveritiesDTO, SortOrderEnum, EmptyStateType, StatusType, SidebarPropsType, SecurityModalStateType } from './types';
|
2
|
+
export declare const getDefaultSecurityModalState: (categoriesConfig: SidebarPropsType["categoriesConfig"]) => SecurityModalStateType;
|
7
3
|
export declare const CATEGORY_LABELS: {
|
8
4
|
readonly IMAGE_SCAN: "Image Scan";
|
9
5
|
readonly CODE_SCAN: "Code Scan";
|
@@ -16,23 +12,23 @@ export declare const SUB_CATEGORY_LABELS: {
|
|
16
12
|
readonly EXPOSED_SECRETS: "Exposed Secrets";
|
17
13
|
};
|
18
14
|
export declare const SEVERITIES: {
|
19
|
-
readonly
|
15
|
+
readonly critical: {
|
20
16
|
readonly label: "Critical";
|
21
17
|
readonly color: "#B21212";
|
22
18
|
};
|
23
|
-
readonly
|
19
|
+
readonly high: {
|
24
20
|
readonly label: "High";
|
25
21
|
readonly color: "#F33E3E";
|
26
22
|
};
|
27
|
-
readonly
|
23
|
+
readonly medium: {
|
28
24
|
readonly label: "Medium";
|
29
25
|
readonly color: "#FF7E5B";
|
30
26
|
};
|
31
|
-
readonly
|
27
|
+
readonly low: {
|
32
28
|
readonly label: "Low";
|
33
29
|
readonly color: "#FFB549";
|
34
30
|
};
|
35
|
-
readonly
|
31
|
+
readonly unknown: {
|
36
32
|
readonly label: "Unknown";
|
37
33
|
readonly color: "#B1B7BC";
|
38
34
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as SecurityModal } from './SecurityModal';
|
2
|
-
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse,
|
3
|
-
export type {
|
4
|
-
export {
|
2
|
+
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, } from './utils';
|
3
|
+
export type { ScanResultDTO, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
|
4
|
+
export { getSidebarData, getProgressingStateForStatus } from './config';
|
5
5
|
export { CATEGORY_LABELS } from './constants';
|
6
|
-
export {
|
6
|
+
export { getSecurityScan } from './service';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { ResponseType } from '../../../../Common/Types';
|
2
|
-
import {
|
3
|
-
export declare const
|
2
|
+
import { ScanResultDTO, ScanResultParamsType } from './types';
|
3
|
+
export declare const getSecurityScan: ({ appId, envId, installedAppId, artifactId, installedAppVersionHistoryId, }: ScanResultParamsType) => Promise<ResponseType<ScanResultDTO>>;
|
@@ -15,17 +15,13 @@ export interface GetResourceScanDetailsPayloadType {
|
|
15
15
|
deploymentType?: number;
|
16
16
|
isAppDetailView?: boolean;
|
17
17
|
}
|
18
|
-
export interface
|
18
|
+
export interface ScanResultParamsType {
|
19
19
|
appId?: number | string;
|
20
20
|
envId?: number | string;
|
21
21
|
installedAppId?: number | string;
|
22
22
|
artifactId?: number | string;
|
23
23
|
installedAppVersionHistoryId?: number | string;
|
24
24
|
}
|
25
|
-
export interface ExecutionDetailsPayload extends Partial<Pick<AppDetailsPayload, 'appId' | 'envId'>> {
|
26
|
-
imageScanDeployInfoId?: number | string;
|
27
|
-
artifactId?: number | string;
|
28
|
-
}
|
29
25
|
export declare const CATEGORIES: {
|
30
26
|
readonly IMAGE_SCAN: "imageScan";
|
31
27
|
readonly CODE_SCAN: "codeScan";
|
@@ -89,17 +85,16 @@ export type SecurityModalStateType = {
|
|
89
85
|
detailViewData: DetailViewDataType[];
|
90
86
|
};
|
91
87
|
export interface SidebarPropsType {
|
92
|
-
isHelmApp: boolean;
|
93
88
|
modalState: SecurityModalStateType;
|
94
89
|
setModalState: React.Dispatch<React.SetStateAction<SecurityModalStateType>>;
|
95
|
-
|
90
|
+
categoriesConfig: Record<(typeof CATEGORIES)[keyof typeof CATEGORIES] | 'imageScanLicenseRisks', boolean>;
|
96
91
|
}
|
97
92
|
export declare enum SeveritiesDTO {
|
98
|
-
CRITICAL = "
|
99
|
-
HIGH = "
|
100
|
-
MEDIUM = "
|
101
|
-
LOW = "
|
102
|
-
UNKNOWN = "
|
93
|
+
CRITICAL = "critical",
|
94
|
+
HIGH = "high",
|
95
|
+
MEDIUM = "medium",
|
96
|
+
LOW = "low",
|
97
|
+
UNKNOWN = "unknown",
|
103
98
|
FAILURES = "fail",
|
104
99
|
SUCCESSES = "success",
|
105
100
|
EXCEPTIONS = "exceptions"
|
@@ -199,21 +194,19 @@ export type KubernetesManifest = {
|
|
199
194
|
[SUB_CATEGORIES.MISCONFIGURATIONS]: GenericGroupTypeWithMisConfSummary<CodeScanMisconfigurationsListType>;
|
200
195
|
[SUB_CATEGORIES.EXPOSED_SECRETS]: GenericGroupTypeWithSummary<CodeScanExposedSecretsListType>;
|
201
196
|
} & StatusType;
|
202
|
-
export type
|
197
|
+
export type ScanResultDTO = {
|
203
198
|
scanned: boolean;
|
199
|
+
isImageScanEnabled: boolean;
|
204
200
|
[CATEGORIES.IMAGE_SCAN]: ImageScan;
|
205
201
|
[CATEGORIES.CODE_SCAN]: CodeScan;
|
206
202
|
[CATEGORIES.KUBERNETES_MANIFEST]: KubernetesManifest;
|
207
203
|
};
|
208
|
-
interface SecurityModalBaseProps
|
204
|
+
interface SecurityModalBaseProps {
|
209
205
|
isLoading: boolean;
|
210
206
|
error: ServerErrors;
|
211
|
-
responseData:
|
207
|
+
responseData: ScanResultDTO;
|
212
208
|
handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
|
213
|
-
Sidebar
|
214
|
-
isHelmApp?: boolean;
|
215
|
-
isResourceScan?: boolean;
|
216
|
-
isSecurityScanV2Enabled: boolean;
|
209
|
+
Sidebar?: React.FC<SidebarPropsType>;
|
217
210
|
hidePolicy?: boolean;
|
218
211
|
}
|
219
212
|
export type SecurityModalPropsType = SecurityModalBaseProps;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ScanResultDTO, SeveritiesDTO, GetResourceScanDetailsResponseType, ImageScanVulnerabilityType, ImageVulnerabilityType, VulnerabilityCountType } from './types';
|
2
2
|
import { SEVERITIES } from './constants';
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
4
4
|
color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
|
@@ -8,7 +8,7 @@ export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Part
|
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
9
9
|
export declare const getSeverityWeight: (severity: SeveritiesDTO) => number;
|
10
10
|
export declare const compareSeverity: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
|
11
|
-
export declare const getSecurityScanSeveritiesCount: (data:
|
11
|
+
export declare const getSecurityScanSeveritiesCount: (data: ScanResultDTO) => {
|
12
12
|
critical: number;
|
13
13
|
high: number;
|
14
14
|
medium: number;
|
@@ -22,8 +22,7 @@ export declare const getScanCompletedEmptyState: (scanToolId: number) => {
|
|
22
22
|
children: JSX.Element;
|
23
23
|
};
|
24
24
|
export declare const compareStringAndObject: (a: string | object, b: string | object) => number;
|
25
|
-
export declare const
|
26
|
-
export declare const parseGetResourceScanDetailsResponse: (data: GetResourceScanDetailsResponseType) => ApiResponseResultType;
|
25
|
+
export declare const parseGetResourceScanDetailsResponse: (data: GetResourceScanDetailsResponseType) => ScanResultDTO;
|
27
26
|
export declare const getTotalVulnerabilityCount: (scannedResult: ImageVulnerabilityType[]) => VulnerabilityCountType;
|
28
27
|
export declare const groupByTarget: (list: ImageScanVulnerabilityType[]) => {
|
29
28
|
source: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { SecuritySummaryCardProps } from './types';
|
2
|
-
declare const SecuritySummaryCard: ({ severityCount, scanToolId, rootClassName,
|
2
|
+
declare const SecuritySummaryCard: ({ severityCount, scanToolId, rootClassName, SecurityModalSidebar, responseData, hidePolicy, }: SecuritySummaryCardProps) => JSX.Element;
|
3
3
|
export default SecuritySummaryCard;
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import { SeverityCount } from '../../../types';
|
2
2
|
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types';
|
3
|
-
import {
|
3
|
+
import { ScanResultDTO } from '../SecurityModal';
|
4
4
|
export type SecuritySummaryCardProps = {
|
5
5
|
severityCount: SeverityCount;
|
6
6
|
scanToolId: number;
|
7
7
|
rootClassName?: string;
|
8
|
-
|
9
|
-
isSecurityScanV2Enabled: boolean;
|
10
|
-
responseData: ApiResponseResultType;
|
8
|
+
responseData: ScanResultDTO;
|
11
9
|
hidePolicy?: boolean;
|
12
10
|
} & Pick<ImageCardAccordionProps, 'SecurityModalSidebar'>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { VulnerabilitiesProps } from './types';
|
2
|
-
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, SecurityModalSidebar,
|
2
|
+
declare const Vulnerabilities: ({ isScanned, isScanEnabled, artifactId, applicationId, environmentId, setVulnerabilityCount, SecurityModalSidebar, }: VulnerabilitiesProps) => JSX.Element;
|
3
3
|
export default Vulnerabilities;
|
@@ -1,24 +1,8 @@
|
|
1
|
-
import { ResponseType } from '../../../../Common/Types';
|
2
1
|
import { ImageCardAccordionProps } from '@Shared/Components/ImageCardAccordion/types';
|
3
2
|
import { MaterialSecurityInfoType } from '../../../types';
|
4
|
-
|
5
|
-
export interface VulnerabilitiesProps extends MaterialSecurityInfoType, Pick<ImageCardAccordionProps, 'SecurityModalSidebar' | 'getSecurityScan'> {
|
3
|
+
export interface VulnerabilitiesProps extends MaterialSecurityInfoType, Pick<ImageCardAccordionProps, 'SecurityModalSidebar'> {
|
6
4
|
artifactId: number;
|
7
5
|
applicationId: number;
|
8
6
|
environmentId: number;
|
9
7
|
setVulnerabilityCount: React.Dispatch<React.SetStateAction<number>>;
|
10
8
|
}
|
11
|
-
export interface UseGetSecurityVulnerabilitiesProps extends Pick<ImageCardAccordionProps, 'getSecurityScan'> {
|
12
|
-
artifactId: string;
|
13
|
-
appId: string;
|
14
|
-
envId: number;
|
15
|
-
isScanned: boolean;
|
16
|
-
isScanEnabled: boolean;
|
17
|
-
isScanV2Enabled: boolean;
|
18
|
-
}
|
19
|
-
export interface UseGetSecurityVulnerabilitiesReturnType {
|
20
|
-
scanDetailsLoading: boolean;
|
21
|
-
scanResultResponse: ResponseType<ApiResponseResultType>;
|
22
|
-
scanDetailsError: any;
|
23
|
-
reloadScanDetails: () => void;
|
24
|
-
}
|
@@ -1,6 +1 @@
|
|
1
|
-
import { LastExecutionResponseType, LastExecutionResultType } from '../../../types';
|
2
|
-
import { UseGetSecurityVulnerabilitiesProps, UseGetSecurityVulnerabilitiesReturnType } from './types';
|
3
1
|
export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
|
4
|
-
export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
|
5
|
-
export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
|
6
|
-
export declare const useGetSecurityVulnerabilities: ({ artifactId, appId, envId, isScanned, isScanEnabled, isScanV2Enabled, getSecurityScan, }: UseGetSecurityVulnerabilitiesProps) => UseGetSecurityVulnerabilitiesReturnType;
|
@@ -1,5 +1,8 @@
|
|
1
1
|
import { SeverityCount } from '../../types';
|
2
|
-
import {
|
3
|
-
export declare const getTotalSeverityCount: (severityCount: SeverityCount) => number;
|
4
|
-
export declare const getSeverityCountFromSummary: (scanResultSeverities: Partial<Record<SeveritiesDTO, number>>) => SeverityCount;
|
2
|
+
import { ScanResultDTO } from './SecurityModal/types';
|
5
3
|
export declare const getCVEUrlFromCVEName: (cveName: string) => string;
|
4
|
+
export declare const getScanToolAndSeverityCount: (scanResult: ScanResultDTO) => {
|
5
|
+
scanToolId: number;
|
6
|
+
severityCount: SeverityCount;
|
7
|
+
totalCount: number;
|
8
|
+
};
|
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
|
|
134
134
|
* />
|
135
135
|
* ```
|
136
136
|
*/
|
137
|
-
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldHideMenu, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
137
|
+
declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, shouldRenderTextArea, onKeyDown, shouldHideMenu, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
|
138
138
|
export default SelectPicker;
|
@@ -1,8 +1,10 @@
|
|
1
|
-
import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps } from 'react-select';
|
1
|
+
import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps, InputProps, IndicatorsContainerProps } from 'react-select';
|
2
2
|
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
|
3
|
+
export declare const SelectPickerIndicatorsContainer: <OptionValue>({ className, ...props }: IndicatorsContainerProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
3
4
|
export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
4
|
-
export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
5
|
+
export declare const SelectPickerClearIndicator: <OptionValue>({ className, ...props }: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
5
6
|
export declare const SelectPickerControl: <OptionValue>(props: ControlProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
7
|
+
export declare const SelectPickerInput: <OptionValue>(props: InputProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
6
8
|
export declare const SelectPickerValueContainer: <OptionValue, IsMulti extends boolean>({ showSelectedOptionsCount, customSelectedOptionsCount, isFocussed, ...props }: ValueContainerProps<SelectPickerOptionType<OptionValue>> & Pick<SelectPickerProps<OptionValue, IsMulti>, "showSelectedOptionsCount" | "customSelectedOptionsCount"> & {
|
7
9
|
isFocussed: boolean;
|
8
10
|
}) => JSX.Element;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { default as SelectPicker } from './SelectPicker.component';
|
2
|
+
export * from './SelectPickerTextArea.component';
|
2
3
|
export { default as FilterSelectPicker } from './FilterSelectPicker';
|
3
4
|
export * from './type';
|
4
5
|
export { getSelectPickerOptionByValue } from './utils';
|
@@ -63,13 +63,18 @@ declare module 'react-select/base' {
|
|
63
63
|
customDisplayText?: string;
|
64
64
|
/** Render function for the footer at the end of the options list. */
|
65
65
|
renderOptionsFooter?: () => ReactNode;
|
66
|
+
/**
|
67
|
+
* If true, the select picker will render textarea instead of input.
|
68
|
+
* @default false
|
69
|
+
*/
|
70
|
+
shouldRenderTextArea?: boolean;
|
66
71
|
}
|
67
72
|
}
|
68
73
|
export declare enum SelectPickerVariantType {
|
69
74
|
DEFAULT = "default",
|
70
75
|
BORDER_LESS = "border-less"
|
71
76
|
}
|
72
|
-
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & {
|
77
|
+
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon' | 'renderOptionsFooter' | 'shouldRenderTextArea'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel' | 'menuPortalTarget'>> & {
|
73
78
|
/**
|
74
79
|
* Error message for the select
|
75
80
|
*/
|
@@ -194,4 +199,6 @@ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps
|
|
194
199
|
appliedFilterOptions: SelectPickerOptionType[];
|
195
200
|
handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
|
196
201
|
}
|
202
|
+
export interface SelectPickerTextAreaProps extends Omit<SelectPickerProps<string, false>, 'selectRef' | 'inputValue' | 'onInputChange' | 'controlShouldRenderValue' | 'onKeyDown' | 'onCreateOption' | 'shouldRenderTextArea'> {
|
203
|
+
}
|
197
204
|
export {};
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
2
|
import { ApprovalConfigDataType } from '../Common/Types';
|
3
|
-
import { OptionType, CommonNodeAttr,
|
3
|
+
import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
|
4
4
|
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
5
|
export declare enum EnvType {
|
6
6
|
CHART = "helm_charts",
|
@@ -440,8 +440,6 @@ export interface LastExecutionResultType {
|
|
440
440
|
scanToolId?: number;
|
441
441
|
imageScanDeployInfoId?: number;
|
442
442
|
}
|
443
|
-
export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
|
444
|
-
}
|
445
443
|
export interface MaterialSecurityInfoType {
|
446
444
|
isScanned: boolean;
|
447
445
|
isScanEnabled: boolean;
|