@devtron-labs/devtron-fe-common-lib 0.2.1 → 0.2.2-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/Common/Constants.d.ts +7 -0
- package/dist/Common/RJSF/constants.d.ts +0 -4
- package/dist/Common/RJSF/utils.d.ts +0 -2
- package/dist/Common/SearchBar/types.d.ts +1 -1
- package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
- package/dist/Common/Security/types.d.ts +4 -0
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -1
- package/dist/Common/SortableTableHeaderCell/types.d.ts +5 -0
- package/dist/Common/Tooltip/Tooltip.d.ts +4 -0
- package/dist/Common/Tooltip/index.d.ts +1 -0
- package/dist/Common/Tooltip/types.d.ts +33 -0
- package/dist/Common/Types.d.ts +2 -2
- package/dist/Common/index.d.ts +1 -1
- package/dist/Shared/Components/FilterButton/FilterButton.d.ts +5 -0
- package/dist/Shared/Components/FilterButton/index.d.ts +1 -0
- package/dist/Shared/Components/FilterButton/types.d.ts +12 -0
- package/dist/Shared/Components/FilterButton/utils.d.ts +15 -0
- package/dist/Shared/Components/Vulnerabilities/utils.d.ts +1 -0
- package/dist/Shared/Components/index.d.ts +1 -1
- package/dist/Shared/types.d.ts +12 -7
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-ff7b28ed.js → cssMode-8bbe7b26.js} +1 -1
- package/dist/{freemarker2-d7cb7ecb.js → freemarker2-4e38f3fa.js} +1 -1
- package/dist/{handlebars-a864e9e7.js → handlebars-6a218f19.js} +1 -1
- package/dist/{html-46ef1a3c.js → html-1e977516.js} +1 -1
- package/dist/{htmlMode-305d8331.js → htmlMode-1f60bcaa.js} +1 -1
- package/dist/{index-3b5b3392.js → index-1677d859.js} +19146 -18987
- package/dist/index.js +315 -313
- package/dist/{javascript-f981d833.js → javascript-8e82bcb7.js} +1 -1
- package/dist/{jsonMode-88428091.js → jsonMode-1a629e71.js} +1 -1
- package/dist/{liquid-330a3d26.js → liquid-e957c145.js} +1 -1
- package/dist/{mdx-916cf8dd.js → mdx-5fda765d.js} +1 -1
- package/dist/{python-72b31467.js → python-ba467742.js} +1 -1
- package/dist/{razor-a9b6ed22.js → razor-ddd16486.js} +1 -1
- package/dist/{tsMode-3b90c215.js → tsMode-b43d8821.js} +1 -1
- package/dist/{typescript-1c340db6.js → typescript-7315f3a1.js} +1 -1
- package/dist/{xml-1dbe56e6.js → xml-19a6afe6.js} +1 -1
- package/dist/{yaml-505221d9.js → yaml-605c2eab.js} +1 -1
- package/package.json +1 -1
- package/dist/Common/Tippy.d.ts +0 -4
- package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +0 -4
- package/dist/Shared/Components/ScannedObjectBar/index.d.ts +0 -1
- package/dist/Shared/Components/ScannedObjectBar/types.d.ts +0 -7
|
@@ -270,3 +270,10 @@ export declare const DATE_TIME_FORMATS: {
|
|
|
270
270
|
DD_MMM_YYYY_HH_MM: string;
|
|
271
271
|
DD_MMM_YYYY: string;
|
|
272
272
|
};
|
|
273
|
+
export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
274
|
+
critical: number;
|
|
275
|
+
high: number;
|
|
276
|
+
medium: number;
|
|
277
|
+
low: number;
|
|
278
|
+
unknown: number;
|
|
279
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TranslatableString } from '@rjsf/utils';
|
|
2
|
-
import { default as Tippy } from '../Tippy';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Override for the TranslatableString from RJSF
|
|
@@ -25,4 +24,3 @@ export declare const getRedirectionProps: (url: string) => import('react').Ancho
|
|
|
25
24
|
* Infers the type for json schema from value type
|
|
26
25
|
*/
|
|
27
26
|
export declare const getInferredTypeFromValueType: (value: any) => "string" | "number" | "boolean" | "object" | "array" | "null";
|
|
28
|
-
export declare const getTippyWrapperWithContent: (content: any, placement?: React.ComponentProps<typeof Tippy>['placement'], truncateWidth?: number) => (children: any) => JSX.Element;
|
|
@@ -18,7 +18,7 @@ export interface SearchBarProps {
|
|
|
18
18
|
/**
|
|
19
19
|
* Input props for the search input
|
|
20
20
|
*/
|
|
21
|
-
inputProps?: React.InputHTMLAttributes<HTMLInputElement
|
|
21
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement> & Partial<Record<'ref', React.MutableRefObject<HTMLInputElement>>>;
|
|
22
22
|
/**
|
|
23
23
|
* Class name for the container; can be used for handling width
|
|
24
24
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ScanVulnerabilitiesTableProps } from '../Types';
|
|
2
2
|
|
|
3
|
-
export default function ScanVulnerabilitiesTable({ vulnerabilities, hidePolicy, shouldStick }: ScanVulnerabilitiesTableProps): JSX.Element;
|
|
3
|
+
export default function ScanVulnerabilitiesTable({ vulnerabilities, hidePolicy, shouldStick, }: ScanVulnerabilitiesTableProps): JSX.Element;
|
|
@@ -14,5 +14,5 @@ import { SortableTableHeaderCellProps } from './types';
|
|
|
14
14
|
* />
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
17
|
+
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
18
18
|
export default SortableTableHeaderCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tooltip } from './Tooltip';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TippyProps } from '@tippyjs/react';
|
|
2
|
+
|
|
3
|
+
type BaseTooltipProps = {
|
|
4
|
+
/**
|
|
5
|
+
* If true, show tippy on truncate
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
showOnTruncate?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* If showOnTruncate is defined this prop doesn't work
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
alwaysShowTippyOnHover?: never;
|
|
14
|
+
} | {
|
|
15
|
+
/**
|
|
16
|
+
* If alwaysShowTippyOnHover is defined this prop doesn't work
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
showOnTruncate?: never;
|
|
20
|
+
/**
|
|
21
|
+
* If true, wrap with tippy irrespective of other options
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
alwaysShowTippyOnHover?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type TooltipProps = BaseTooltipProps & TippyProps & {
|
|
27
|
+
/**
|
|
28
|
+
* If true, apply dc__word-break-all
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
wordBreak?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { default as React, ReactNode, CSSProperties } from 'react';
|
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
4
4
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
5
|
-
import { RegistryType } from '../Shared';
|
|
5
|
+
import { RegistryType, Severity } from '../Shared';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generic response type object with support for overriding the result type
|
|
@@ -493,7 +493,7 @@ export declare enum DeploymentAppTypes {
|
|
|
493
493
|
}
|
|
494
494
|
export interface VulnerabilityType {
|
|
495
495
|
name: string;
|
|
496
|
-
severity:
|
|
496
|
+
severity: Severity;
|
|
497
497
|
package: string;
|
|
498
498
|
version: string;
|
|
499
499
|
fixedVersion: string;
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FilterButton } from './FilterButton';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OptionType } from '../../../Common/Types';
|
|
2
|
+
|
|
3
|
+
export interface FilterButtonPropsType {
|
|
4
|
+
placeholder: string;
|
|
5
|
+
appliedFilters: string[];
|
|
6
|
+
options: OptionType[];
|
|
7
|
+
handleApplyChange: (selectedOptions: string[]) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
getFormattedFilterLabelValue?: (identifier: string) => string;
|
|
10
|
+
menuAlignFromRight?: boolean;
|
|
11
|
+
controlWidth?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const getFilterStyle: (controlWidth?: string, menuAlignFromRight?: boolean) => {
|
|
2
|
+
menu: (base: any) => any;
|
|
3
|
+
control: (base: any, state: any) => any;
|
|
4
|
+
container: (base: any) => any;
|
|
5
|
+
option: (base: any, state: any) => any;
|
|
6
|
+
singleValue: (base: any) => any;
|
|
7
|
+
valueContainer: (base: any) => any;
|
|
8
|
+
dropdownIndicator: (base: any, state: any) => any;
|
|
9
|
+
group: (base: any) => any;
|
|
10
|
+
groupHeading: (base: any) => any;
|
|
11
|
+
menuList: (base: any) => any;
|
|
12
|
+
multiValue: (base: any) => any;
|
|
13
|
+
multiValueLabel: (base: any) => any;
|
|
14
|
+
placeholder: (base: any) => any;
|
|
15
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LastExecutionResponseType, LastExecutionResultType } from '../../types';
|
|
2
2
|
|
|
3
|
+
export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
|
|
3
4
|
export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
|
|
4
5
|
export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
|
|
@@ -10,7 +10,6 @@ export * from './FilterChips';
|
|
|
10
10
|
export * from './ActivityIndicator';
|
|
11
11
|
export * from './GenericSectionErrorState';
|
|
12
12
|
export * from './KeyValueList';
|
|
13
|
-
export * from './ScannedObjectBar';
|
|
14
13
|
export * from './InfoIconTippy';
|
|
15
14
|
export * from './EditableTextArea';
|
|
16
15
|
export * from './Header';
|
|
@@ -34,3 +33,4 @@ export * from './Plugin';
|
|
|
34
33
|
export * from './KeyValueTable';
|
|
35
34
|
export * from './SelectPicker';
|
|
36
35
|
export * from './DetectBottom';
|
|
36
|
+
export * from './FilterButton';
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -210,8 +210,10 @@ export declare enum DefaultUserKey {
|
|
|
210
210
|
}
|
|
211
211
|
export declare enum Severity {
|
|
212
212
|
CRITICAL = "critical",
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
HIGH = "high",
|
|
214
|
+
MEDIUM = "medium",
|
|
215
|
+
LOW = "low",
|
|
216
|
+
UNKNOWN = "unknown"
|
|
215
217
|
}
|
|
216
218
|
export declare enum ImagePromotionTabs {
|
|
217
219
|
REQUEST = "request",
|
|
@@ -380,16 +382,19 @@ export declare enum ResourceVersionType {
|
|
|
380
382
|
v1 = "v1",
|
|
381
383
|
alpha1 = "alpha1"
|
|
382
384
|
}
|
|
385
|
+
export interface SeverityCount {
|
|
386
|
+
critical: number;
|
|
387
|
+
high: number;
|
|
388
|
+
medium: number;
|
|
389
|
+
low: number;
|
|
390
|
+
unknown: number;
|
|
391
|
+
}
|
|
383
392
|
export declare enum PolicyKindType {
|
|
384
393
|
lockConfiguration = "lock-configuration"
|
|
385
394
|
}
|
|
386
395
|
export interface LastExecutionResultType {
|
|
387
396
|
lastExecution: string;
|
|
388
|
-
severityCount:
|
|
389
|
-
critical: number;
|
|
390
|
-
moderate: number;
|
|
391
|
-
low: number;
|
|
392
|
-
};
|
|
397
|
+
severityCount: SeverityCount;
|
|
393
398
|
vulnerabilities: VulnerabilityType[];
|
|
394
399
|
scanExecutionId?: number;
|
|
395
400
|
appId?: number;
|