@devtron-labs/devtron-fe-common-lib 0.1.15-beta-9 → 0.1.15-beta-10

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.
Files changed (46) hide show
  1. package/dist/Common/Constants.d.ts +0 -2
  2. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  3. package/dist/Common/SearchBar/types.d.ts +4 -0
  4. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
  5. package/dist/Common/Security/constants.d.ts +7 -0
  6. package/dist/Common/Security/types.d.ts +10 -0
  7. package/dist/Common/Types.d.ts +1 -1
  8. package/dist/Shared/Components/FilterButton/FilterButton.d.ts +5 -0
  9. package/dist/Shared/Components/FilterButton/index.d.ts +1 -0
  10. package/dist/Shared/Components/FilterButton/types.d.ts +12 -0
  11. package/dist/Shared/Components/FilterButton/utils.d.ts +15 -0
  12. package/dist/Shared/Components/FilterChips/FilterChips.component.d.ts +1 -1
  13. package/dist/Shared/Components/FilterChips/types.d.ts +6 -18
  14. package/dist/Shared/Components/index.d.ts +1 -1
  15. package/dist/Shared/Hooks/index.d.ts +0 -1
  16. package/dist/Shared/Services/common.service.d.ts +2 -3
  17. package/dist/Shared/Services/types.d.ts +4 -15
  18. package/dist/Shared/constants.d.ts +0 -9
  19. package/dist/Shared/types.d.ts +12 -13
  20. package/dist/assets/index.css +1 -1
  21. package/dist/{cssMode-3e6ec700.js → cssMode-b035bc93.js} +1 -1
  22. package/dist/{freemarker2-5b5ee393.js → freemarker2-f29d223b.js} +1 -1
  23. package/dist/{handlebars-bf398b6d.js → handlebars-0e493111.js} +1 -1
  24. package/dist/{html-b35def4f.js → html-d4126536.js} +1 -1
  25. package/dist/{htmlMode-48e61b21.js → htmlMode-0c96f8a3.js} +1 -1
  26. package/dist/{index-109adc1e.js → index-dc43cd0b.js} +21332 -21269
  27. package/dist/index.js +343 -347
  28. package/dist/{javascript-27a2b43d.js → javascript-181af9a8.js} +1 -1
  29. package/dist/{jsonMode-950b6194.js → jsonMode-6c68ac71.js} +1 -1
  30. package/dist/{liquid-c64aed12.js → liquid-26b266fe.js} +1 -1
  31. package/dist/{mdx-479da7c4.js → mdx-bb935de3.js} +1 -1
  32. package/dist/{python-7b9f7243.js → python-d761627b.js} +1 -1
  33. package/dist/{razor-7aeb2aac.js → razor-42da5fc9.js} +1 -1
  34. package/dist/{tsMode-43b9c3bb.js → tsMode-fe63660a.js} +1 -1
  35. package/dist/{typescript-1166a256.js → typescript-96934f05.js} +1 -1
  36. package/dist/{xml-8a093524.js → xml-4f4241e8.js} +1 -1
  37. package/dist/{yaml-0ad40107.js → yaml-1e4f8aca.js} +1 -1
  38. package/package.json +1 -1
  39. package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +0 -4
  40. package/dist/Shared/Components/ScannedObjectBar/index.d.ts +0 -1
  41. package/dist/Shared/Components/ScannedObjectBar/types.d.ts +0 -7
  42. package/dist/Shared/Hooks/useGetResourceKindsOptions/index.d.ts +0 -2
  43. package/dist/Shared/Hooks/useGetResourceKindsOptions/service.d.ts +0 -9
  44. package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +0 -31
  45. package/dist/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.d.ts +0 -16
  46. package/dist/Shared/Hooks/useGetResourceKindsOptions/utils.d.ts +0 -4
@@ -75,8 +75,6 @@ export declare const ROUTES: {
75
75
  CONFIG_CD_PIPELINE: string;
76
76
  MODULE_CONFIGURED: string;
77
77
  RESOURCE_HISTORY_DEPLOYMENT: string;
78
- APP_LIST_MIN: string;
79
- CLUSTER_LIST_MIN: string;
80
78
  PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
81
79
  PLUGIN_GLOBAL_LIST_V2: string;
82
80
  PLUGIN_GLOBAL_LIST_TAGS: string;
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
34
34
  * <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
35
35
  * ```
36
36
  */
37
- declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, }: SearchBarProps) => JSX.Element;
37
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, height, }: SearchBarProps) => JSX.Element;
38
38
  export default SearchBar;
@@ -40,4 +40,8 @@ export interface SearchBarProps {
40
40
  * Hide the background and border of the search
41
41
  */
42
42
  noBackgroundAndBorder?: boolean;
43
+ /**
44
+ * Height of the Search bar
45
+ */
46
+ height?: '32' | '36';
43
47
  }
@@ -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;
@@ -0,0 +1,7 @@
1
+ export declare const sortPriority: {
2
+ critical: number;
3
+ high: number;
4
+ medium: number;
5
+ low: number;
6
+ unknown: number;
7
+ };
@@ -0,0 +1,10 @@
1
+ import { SortingOrder } from '../Constants';
2
+
3
+ export declare enum SortBy {
4
+ SEVERITY = "severity",
5
+ PACKAGE = "package"
6
+ }
7
+ export interface SortConfig {
8
+ sortBy: SortBy;
9
+ sortOrder: SortingOrder;
10
+ }
@@ -492,7 +492,7 @@ export declare enum DeploymentAppTypes {
492
492
  }
493
493
  export interface VulnerabilityType {
494
494
  name: string;
495
- severity: 'CRITICAL' | 'MODERATE' | 'LOW';
495
+ severity: 'critical' | 'high' | 'medium' | 'low' | 'unknown';
496
496
  package: string;
497
497
  version: string;
498
498
  fixedVersion: string;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { FilterButtonPropsType } from './types';
3
+
4
+ declare const FilterButton: React.FC<FilterButtonPropsType>;
5
+ export default FilterButton;
@@ -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
+ singleValue: (base: any) => any;
6
+ option: (base: any, state: 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
+ };
@@ -3,5 +3,5 @@ import { FilterChipsProps } from './types';
3
3
  /**
4
4
  * Component for rendering the applied filter chips
5
5
  */
6
- declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, showClearAndRemove, shouldHideLabel, }: FilterChipsProps<T>) => JSX.Element;
6
+ declare const FilterChips: <T = Record<string, unknown>>({ filterConfig, clearFilters, onRemoveFilter, getFormattedLabel, getFormattedValue, className, clearButtonClassName, shouldHideLabel, }: FilterChipsProps<T>) => JSX.Element;
7
7
  export default FilterChips;
@@ -21,33 +21,17 @@ export interface FilterChipProps {
21
21
  * If passed, the label will be formatted accordingly
22
22
  */
23
23
  getFormattedValue?: (filterKey: string, filterValue: unknown) => ReactNode;
24
- showRemoveIcon: boolean;
25
24
  /**
26
25
  * If true, would hide the label
27
26
  * @default false
28
27
  */
29
28
  shouldHideLabel?: boolean;
30
29
  }
31
- export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue' | 'shouldHideLabel'> & {
30
+ export interface FilterChipsProps<T = Record<string, unknown>> extends Pick<FilterChipProps, 'getFormattedLabel' | 'getFormattedValue' | 'shouldHideLabel'> {
32
31
  /**
33
32
  * Current filter configuration
34
33
  */
35
34
  filterConfig: T;
36
- /**
37
- * Class name for the container
38
- */
39
- className?: string;
40
- } & ({
41
- /**
42
- * If false, anything related to removing filters is not shown
43
- * @default 'true'
44
- */
45
- showClearAndRemove: false;
46
- clearFilters?: never;
47
- onRemoveFilter?: never;
48
- clearButtonClassName?: never;
49
- } | {
50
- showClearAndRemove?: true;
51
35
  /**
52
36
  * Callback handler for removing the filters
53
37
  */
@@ -56,8 +40,12 @@ export type FilterChipsProps<T = Record<string, unknown>> = Pick<FilterChipProps
56
40
  * Handler for removing a applied filter
57
41
  */
58
42
  onRemoveFilter: (filterConfig: T) => void;
43
+ /**
44
+ * Class name for the container
45
+ */
46
+ className?: string;
59
47
  /**
60
48
  * Class name for the clear filter button
61
49
  */
62
50
  clearButtonClassName?: string;
63
- });
51
+ }
@@ -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';
@@ -1,3 +1,2 @@
1
1
  export * from './UsePrompt';
2
- export * from './useGetResourceKindsOptions';
3
2
  export * from './UseDownload';
@@ -1,4 +1,3 @@
1
- import { GetPolicyApiUrlProps, GetResourceApiUrlProps } from './types';
1
+ import { GetResourceApiUrlProps } from './types';
2
2
 
3
- export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, suffix, queryParams }: GetResourceApiUrlProps<T>) => string;
4
- export declare const getPolicyApiUrl: <T>({ kind, version, queryParams, suffix }: GetPolicyApiUrlProps<T>) => string;
3
+ export declare const getResourceApiUrl: <T>({ baseUrl, kind, version, queryParams }: GetResourceApiUrlProps<T>) => string;
@@ -1,5 +1,5 @@
1
1
  import { getUrlWithSearchParams } from '../../Common';
2
- import { PolicyKindType, ResourceKindType, ResourceVersionType } from '../types';
2
+ import { ResourceKindType, ResourceVersionType } from '../types';
3
3
 
4
4
  export interface ClusterType {
5
5
  id: number;
@@ -9,20 +9,9 @@ export interface ClusterType {
9
9
  */
10
10
  isVirtual: boolean;
11
11
  }
12
- /**
13
- * T => Type of query params
14
- * K => Type of kind
15
- * P => Type of version
16
- */
17
- interface BaseGetApiUrlProps<T, K extends ResourceKindType | PolicyKindType, P extends ResourceVersionType> {
12
+ export interface GetResourceApiUrlProps<T> {
18
13
  baseUrl: string;
19
- kind: K;
20
- version: P;
21
- suffix?: string;
14
+ kind: ResourceKindType;
15
+ version: ResourceVersionType;
22
16
  queryParams?: T extends Parameters<typeof getUrlWithSearchParams>[1] ? T : never;
23
17
  }
24
- export interface GetResourceApiUrlProps<T> extends BaseGetApiUrlProps<T, ResourceKindType, ResourceVersionType> {
25
- }
26
- export interface GetPolicyApiUrlProps<T> extends Omit<BaseGetApiUrlProps<T, PolicyKindType, ResourceVersionType>, 'baseUrl'> {
27
- }
28
- export {};
@@ -362,12 +362,3 @@ export declare enum ComponentSizeType {
362
362
  medium = "medium",
363
363
  large = "large"
364
364
  }
365
- /**
366
- * Identifiers for grouped / all resources
367
- */
368
- export declare enum SelectAllGroupedResourceIdentifiers {
369
- allProjects = "-1",
370
- allExistingAndFutureNonProdEnvironments = "-1",
371
- allExistingAndFutureProdEnvironments = "-2",
372
- allExistingAndFutureEnvironments = "-3"
373
- }
@@ -202,8 +202,10 @@ export declare enum DefaultUserKey {
202
202
  }
203
203
  export declare enum Severity {
204
204
  CRITICAL = "critical",
205
- MODERATE = "moderate",
206
- LOW = "low"
205
+ HIGH = "high",
206
+ MEDIUM = "medium",
207
+ LOW = "low",
208
+ UNKNOWN = "unknown"
207
209
  }
208
210
  export declare enum ImagePromotionTabs {
209
211
  REQUEST = "request",
@@ -360,28 +362,25 @@ export declare enum ResourceKindType {
360
362
  tenant = "tenant",
361
363
  installation = "installation",
362
364
  environment = "environment",
363
- cdPipeline = "cd-pipeline",
364
- project = "project"
365
+ cdPipeline = "cd-pipeline"
365
366
  }
366
367
  /**
367
368
  * Versions support for the resources on BE
368
- *
369
- * TODO: Rename to ApiVersionType
370
369
  */
371
370
  export declare enum ResourceVersionType {
372
371
  v1 = "v1",
373
372
  alpha1 = "alpha1"
374
373
  }
375
- export declare enum PolicyKindType {
376
- lockConfiguration = "lock-configuration"
374
+ export interface SeverityCount {
375
+ critical: number;
376
+ high: number;
377
+ medium: number;
378
+ low: number;
379
+ unknown: number;
377
380
  }
378
381
  export interface LastExecutionResultType {
379
382
  lastExecution: string;
380
- severityCount: {
381
- critical: number;
382
- moderate: number;
383
- low: number;
384
- };
383
+ severityCount: SeverityCount;
385
384
  vulnerabilities: VulnerabilityType[];
386
385
  scanExecutionId?: number;
387
386
  appId?: number;