@devtron-labs/devtron-fe-common-lib 0.1.18-beta-2 → 0.1.18-beta-3

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 (65) hide show
  1. package/dist/Common/Api.d.ts +5 -5
  2. package/dist/Common/CIPipeline.Types.d.ts +4 -1
  3. package/dist/Common/Constants.d.ts +2 -7
  4. package/dist/Common/CustomInput/Types.d.ts +2 -2
  5. package/dist/Common/Modals/VisibleModal.d.ts +1 -1
  6. package/dist/Common/Modals/VisibleModal2.d.ts +1 -1
  7. package/dist/Common/MultiSelectCustomization.d.ts +1 -1
  8. package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
  9. package/dist/Common/SearchBar/types.d.ts +4 -2
  10. package/dist/Common/SearchBar/utils.d.ts +3 -0
  11. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
  12. package/dist/Common/Types.d.ts +4 -4
  13. package/dist/Shared/Components/CICDHistory/LogStageAccordion.d.ts +4 -0
  14. package/dist/Shared/Components/CICDHistory/constants.d.ts +2 -0
  15. package/dist/Shared/Components/CICDHistory/types.d.ts +31 -0
  16. package/dist/Shared/Components/CICDHistory/utils.d.ts +2 -1
  17. package/dist/Shared/Components/DetectBottom/DetectBottom.component.d.ts +2 -1
  18. package/dist/Shared/Components/EditImageFormField/EditImageFormField.d.ts +19 -0
  19. package/dist/Shared/Components/EditImageFormField/constants.d.ts +7 -0
  20. package/dist/Shared/Components/EditImageFormField/index.d.ts +2 -0
  21. package/dist/Shared/Components/EditImageFormField/types.d.ts +41 -0
  22. package/dist/Shared/Components/GitCommitInfoGeneric/GitMaterialInfoHeader.d.ts +1 -0
  23. package/dist/Shared/Components/GitCommitInfoGeneric/constants.d.ts +4 -0
  24. package/dist/Shared/Components/Header/types.d.ts +1 -12
  25. package/dist/Shared/Components/MaterialHistory/MaterialHistory.component.d.ts +1 -1
  26. package/dist/Shared/Components/MaterialHistory/types.d.ts +1 -0
  27. package/dist/Shared/Components/Plugin/service.d.ts +4 -2
  28. package/dist/Shared/Components/Plugin/types.d.ts +11 -3
  29. package/dist/Shared/Components/Plugin/utils.d.ts +3 -0
  30. package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +4 -0
  31. package/dist/Shared/Components/ScannedObjectBar/index.d.ts +1 -0
  32. package/dist/Shared/Components/ScannedObjectBar/types.d.ts +7 -0
  33. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  34. package/dist/Shared/Components/SelectPicker/type.d.ts +10 -1
  35. package/dist/Shared/Components/Vulnerabilities/utils.d.ts +0 -1
  36. package/dist/Shared/Components/index.d.ts +2 -1
  37. package/dist/Shared/Helpers.d.ts +2 -0
  38. package/dist/Shared/constants.d.ts +2 -0
  39. package/dist/Shared/types.d.ts +7 -12
  40. package/dist/Shared/validations.d.ts +11 -0
  41. package/dist/assets/index.css +1 -1
  42. package/dist/{cssMode-39959d48.js → cssMode-956d5eae.js} +1 -1
  43. package/dist/{freemarker2-6311b9fa.js → freemarker2-81ee3915.js} +1 -1
  44. package/dist/{handlebars-0138e9ef.js → handlebars-64dce357.js} +1 -1
  45. package/dist/{html-a5b8df32.js → html-f30acd83.js} +1 -1
  46. package/dist/{htmlMode-563a1e1f.js → htmlMode-945abc9b.js} +1 -1
  47. package/dist/{index-f1286a73.js → index-e79098f5.js} +25787 -25412
  48. package/dist/index.d.ts +2 -1
  49. package/dist/index.js +462 -452
  50. package/dist/{javascript-58b90a5d.js → javascript-d557413a.js} +1 -1
  51. package/dist/{jsonMode-ab3b2334.js → jsonMode-a058d09a.js} +1 -1
  52. package/dist/{liquid-291b40fd.js → liquid-1fda64a4.js} +1 -1
  53. package/dist/{mdx-af564f98.js → mdx-1373a250.js} +1 -1
  54. package/dist/{python-cce24e87.js → python-60162a7c.js} +1 -1
  55. package/dist/{razor-5c83c35b.js → razor-4e273270.js} +1 -1
  56. package/dist/{tsMode-2808c7f5.js → tsMode-5d18ecf9.js} +1 -1
  57. package/dist/{typescript-15583804.js → typescript-17b25d1f.js} +1 -1
  58. package/dist/{xml-fae8c417.js → xml-79e893b7.js} +1 -1
  59. package/dist/{yaml-5f7747f7.js → yaml-78c623f1.js} +1 -1
  60. package/package.json +1 -1
  61. package/dist/Common/Security/types.d.ts +0 -4
  62. package/dist/Shared/Components/FilterButton/FilterButton.d.ts +0 -5
  63. package/dist/Shared/Components/FilterButton/index.d.ts +0 -1
  64. package/dist/Shared/Components/FilterButton/types.d.ts +0 -12
  65. package/dist/Shared/Components/FilterButton/utils.d.ts +0 -15
@@ -1,11 +1,11 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { ResponseType, APIOptions } from './Types';
3
3
 
4
- export declare const post: (url: string, data: object, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType>;
5
- export declare const put: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
6
- export declare const patch: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
7
- export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
8
- export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
4
+ export declare const post: <T = any, K = object>(url: string, data: K, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType<T>>;
5
+ export declare const put: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
6
+ export declare const patch: <T = any, K = object>(url: string, data: K, options?: APIOptions) => Promise<ResponseType<T>>;
7
+ export declare const get: <T = any>(url: string, options?: APIOptions) => Promise<ResponseType<T>>;
8
+ export declare const trash: <T = any, K = object>(url: string, data?: K, options?: APIOptions) => Promise<ResponseType<T>>;
9
9
  /**
10
10
  * Aborts the previous request before triggering next request
11
11
  */
@@ -77,6 +77,7 @@ export interface VariableType {
77
77
  format: string;
78
78
  description: string;
79
79
  defaultValue: string;
80
+ allowEmptyValue: boolean;
80
81
  variableType: RefVariableType;
81
82
  refVariableStepIndex: number;
82
83
  refVariableName: string;
@@ -98,7 +99,7 @@ interface ConditionDetails {
98
99
  conditionType: ConditionType;
99
100
  conditionalValue: string;
100
101
  }
101
- interface InlineStepDetailType {
102
+ export interface InlineStepDetailType {
102
103
  scriptType: ScriptType;
103
104
  isMountCustomScript?: boolean;
104
105
  script?: string;
@@ -117,6 +118,8 @@ interface InlineStepDetailType {
117
118
  inputVariables?: VariableType[];
118
119
  outputVariables?: VariableType[];
119
120
  conditionDetails: ConditionDetails[];
121
+ storeScriptAt?: string;
122
+ mountCodeToContainerPath?: string;
120
123
  }
121
124
  interface PluginRefStepDetailType {
122
125
  id: number;
@@ -78,6 +78,7 @@ export declare const ROUTES: {
78
78
  PLUGIN_GLOBAL_LIST_DETAIL_V2: string;
79
79
  PLUGIN_GLOBAL_LIST_V2: string;
80
80
  PLUGIN_GLOBAL_LIST_TAGS: string;
81
+ PLUGIN_LIST_MIN: string;
81
82
  };
82
83
  export declare enum KEY_VALUE {
83
84
  KEY = "key",
@@ -267,10 +268,4 @@ export declare const DATE_TIME_FORMATS: {
267
268
  DD_MMM_YYYY_HH_MM: string;
268
269
  DD_MMM_YYYY: string;
269
270
  };
270
- export declare const VULNERABILITIES_SORT_PRIORITY: {
271
- critical: number;
272
- high: number;
273
- medium: number;
274
- low: number;
275
- unknown: number;
276
- };
271
+ export declare const SEMANTIC_VERSION_DOCUMENTATION_LINK = "https://semver.org/";
@@ -1,4 +1,4 @@
1
- import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes } from 'react';
1
+ import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes, ReactNode } from 'react';
2
2
 
3
3
  export interface CustomInputProps {
4
4
  name: string;
@@ -17,7 +17,7 @@ export interface CustomInputProps {
17
17
  autoFocus?: boolean;
18
18
  rootClassName?: string;
19
19
  error?: string[] | string;
20
- helperText?: string;
20
+ helperText?: ReactNode;
21
21
  handleOnBlur?: (e: any) => void;
22
22
  readOnly?: boolean;
23
23
  noTrim?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
 
3
3
  export declare class VisibleModal extends React.Component<{
4
- className: string;
4
+ className?: string;
5
5
  parentClassName?: string;
6
6
  noBackground?: boolean;
7
7
  close?: (e: any) => void;
@@ -1,7 +1,7 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
 
3
3
  export declare class VisibleModal2 extends React.Component<{
4
- className: string;
4
+ className?: string;
5
5
  close?: (e: any) => void;
6
6
  }> {
7
7
  modalRef: HTMLElement;
@@ -4,7 +4,7 @@ export declare const Option: (props: any) => JSX.Element;
4
4
  export declare const SingleSelectOption: (props: any) => JSX.Element;
5
5
  /**
6
6
  * Multi value container
7
- */
7
+ */
8
8
  export declare const MultiValueContainer: (props: any) => JSX.Element;
9
9
  /**
10
10
  *
@@ -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, componentSize, }: SearchBarProps) => JSX.Element;
37
+ declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size, }: SearchBarProps) => JSX.Element;
38
38
  export default SearchBar;
@@ -42,7 +42,9 @@ export interface SearchBarProps {
42
42
  */
43
43
  noBackgroundAndBorder?: boolean;
44
44
  /**
45
- * Height of the Search bar, Large is 36px and Medium is 32px
45
+ * Height of the searchbar
46
+ *
47
+ * @default 'ComponentSizeType.medium'
46
48
  */
47
- componentSize?: ComponentSizeType.large | ComponentSizeType.medium;
49
+ size?: ComponentSizeType.medium | ComponentSizeType.large;
48
50
  }
@@ -0,0 +1,3 @@
1
+ import { SearchBarProps } from './types';
2
+
3
+ export declare const getSearchBarHeightFromSize: (size: SearchBarProps['size']) => string;
@@ -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;
@@ -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, Severity } from '../Shared';
5
+ import { RegistryType } from '../Shared';
6
6
 
7
7
  /**
8
8
  * Generic response type object with support for overriding the result type
@@ -177,10 +177,10 @@ export interface RadioGroupItemProps {
177
177
  export interface RadioGroupInterface {
178
178
  name: string;
179
179
  onChange: any;
180
- className?: string;
181
180
  initialTab: string;
182
- disabled: boolean;
183
181
  children: ReactNode;
182
+ disabled?: boolean;
183
+ className?: string;
184
184
  }
185
185
  export interface RadioInterface {
186
186
  children: ReactNode;
@@ -492,7 +492,7 @@ export declare enum DeploymentAppTypes {
492
492
  }
493
493
  export interface VulnerabilityType {
494
494
  name: string;
495
- severity: Severity;
495
+ severity: 'CRITICAL' | 'MODERATE' | 'LOW';
496
496
  package: string;
497
497
  version: string;
498
498
  fixedVersion: string;
@@ -0,0 +1,4 @@
1
+ import { LogStageAccordionProps } from './types';
2
+
3
+ declare const LogStageAccordion: ({ stage, isOpen, logs, endTime, startTime, status, handleStageClose, handleStageOpen, stageIndex, isLoading, }: LogStageAccordionProps) => JSX.Element;
4
+ export default LogStageAccordion;
@@ -43,3 +43,5 @@ export declare const DEFAULT_ENV = "devtron-ci";
43
43
  export declare const LOGS_RETRY_COUNT = 3;
44
44
  export declare const DEPLOYMENT_STATUS_QUERY_PARAM = "deployment-status";
45
45
  export declare const MANIFEST_STATUS_HEADERS: string[];
46
+ export declare const LOGS_STAGE_IDENTIFIER = "STAGE_INFO";
47
+ export declare const LOGS_STAGE_STREAM_SEPARATOR = "|";
@@ -584,6 +584,37 @@ export interface TriggerHistoryFilterCriteriaProps {
584
584
  releaseId: number;
585
585
  showCurrentReleaseDeployments: boolean;
586
586
  }
587
+ export declare enum StageStatusType {
588
+ SUCCESS = "Success",
589
+ FAILURE = "Failure",
590
+ /**
591
+ * Not given in API response
592
+ */
593
+ PROGRESSING = "Progressing"
594
+ }
595
+ export interface StageInfoDTO {
596
+ stage: string;
597
+ startTime: string;
598
+ endTime?: string;
599
+ status?: StageStatusType;
600
+ }
601
+ export interface StageDetailType extends Pick<StageInfoDTO, 'stage' | 'startTime' | 'endTime' | 'status'> {
602
+ logs: string[];
603
+ isOpen: boolean;
604
+ }
605
+ export interface LogStageAccordionProps extends StageDetailType {
606
+ handleStageClose: (index: number) => void;
607
+ handleStageOpen: (index: number) => void;
608
+ stageIndex: number;
609
+ /**
610
+ * A stage is loading if it is last in current stage list and event is not closed
611
+ */
612
+ isLoading: boolean;
613
+ }
614
+ export interface CreateMarkupReturnType {
615
+ __html: string;
616
+ isSearchKeyPresent: boolean;
617
+ }
587
618
  export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
588
619
  export declare const terminalStatus: Set<string>;
589
620
  export declare const statusSet: Set<string>;
@@ -1,6 +1,7 @@
1
- import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType } from './types';
1
+ import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType, StageStatusType } from './types';
2
2
 
3
3
  export declare const getTriggerHistoryFilterCriteria: ({ appId, envId, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryFilterCriteriaProps) => TriggerHistoryFilterCriteriaType;
4
4
  export declare const getParsedTriggerHistory: (result: any) => DeploymentHistoryResultObject;
5
5
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
6
6
  export declare const renderIcon: (iconState: string) => JSX.Element;
7
+ export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  interface DetectBottomProps {
2
2
  callback: () => void;
3
+ hasError?: boolean;
3
4
  }
4
- declare const DetectBottom: ({ callback }: DetectBottomProps) => JSX.Element;
5
+ declare const DetectBottom: ({ callback, hasError }: DetectBottomProps) => JSX.Element;
5
6
  export default DetectBottom;
@@ -0,0 +1,19 @@
1
+ import { EditImageFormFieldProps } from './types';
2
+
3
+ /**
4
+ * @example
5
+ * ```tsx
6
+ * <EditImageFormField
7
+ * url={icon}
8
+ * defaultIcon={<ICSampleIcon className="w-100 h-100 dc__opacity-1 p-5" />}
9
+ * errorMessage={formError.icon}
10
+ * handleError={handleError}
11
+ * handleURLChange={handleURLChange}
12
+ * ariaLabelPrefix="Edit icon url"
13
+ * dataTestIdPrefix="edit-icon-url"
14
+ * altText="Form icon"
15
+ * />
16
+ * ```
17
+ */
18
+ declare const EditImageFormField: ({ defaultIcon, errorMessage, handleError, url, handleURLChange, ariaLabelPrefix, dataTestIdPrefix, altText, }: EditImageFormFieldProps) => JSX.Element;
19
+ export default EditImageFormField;
@@ -0,0 +1,7 @@
1
+ export declare const DEFAULT_MAX_IMAGE_SIZE: number;
2
+ export declare const DEFAULT_IMAGE_DIMENSIONS: {
3
+ readonly width: 72;
4
+ readonly height: 72;
5
+ };
6
+ export declare const EMPTY_PREVIEW_URL_ERROR_MESSAGE = "Please provide image URL to preview";
7
+ export declare const BASE_IMAGE_CLASS = "edit-image-form-field__figure-container--base-image";
@@ -0,0 +1,2 @@
1
+ export { default as EditImageFormField } from './EditImageFormField';
2
+ export * from './types';
@@ -0,0 +1,41 @@
1
+ import { ReactElement } from 'react';
2
+
3
+ export interface EditImageFormFieldProps {
4
+ /**
5
+ * Fallback icon to be shown when image is not available
6
+ */
7
+ defaultIcon: ReactElement;
8
+ /**
9
+ * Would be shown below input, there are two types of error messages:
10
+ * External - Error message handled from state above and would propagate to parent through handleError
11
+ * Internal - Error message handled internally and would not propagate to parent, like empty preview URL
12
+ */
13
+ errorMessage: string;
14
+ /**
15
+ * Would be called when there is an error in the image URL during handleChange or handlePreviewImage
16
+ */
17
+ handleError: (error: string) => void;
18
+ /**
19
+ * The current value of input field
20
+ */
21
+ url: string;
22
+ /**
23
+ * Would be called when the URL is changed in the input field
24
+ */
25
+ handleURLChange: (url: string) => void;
26
+ /**
27
+ * The alt text for the image
28
+ */
29
+ altText: string;
30
+ /**
31
+ * Prefix for aria-label
32
+ */
33
+ ariaLabelPrefix: string;
34
+ /**
35
+ * Prefix for data-testid
36
+ */
37
+ dataTestIdPrefix: string;
38
+ }
39
+ export interface FallbackImageProps extends Pick<EditImageFormFieldProps, 'defaultIcon'> {
40
+ showEditIcon: boolean;
41
+ }
@@ -1,3 +1,4 @@
1
+
1
2
  declare const GitMaterialInfoHeader: ({ index, repoUrl, materialType, materialValue, style, ...props }: {
2
3
  [x: string]: any;
3
4
  index: any;
@@ -0,0 +1,4 @@
1
+ export declare const WEBHOOK_EVENT_ACTION_TYPE: {
2
+ MERGED: string;
3
+ NON_MERGED: string;
4
+ };
@@ -1,3 +1,4 @@
1
+ import { ModuleStatus } from '../../types';
1
2
  import { ResponseType, TippyCustomizedProps } from '../../../Common';
2
3
 
3
4
  export declare enum InstallationType {
@@ -5,18 +6,6 @@ export declare enum InstallationType {
5
6
  OSS_HELM = "oss_helm",
6
7
  ENTERPRISE = "enterprise"
7
8
  }
8
- export declare enum ModuleStatus {
9
- HEALTHY = "healthy",
10
- NONE = "none",
11
- UNKNOWN = "unknown",
12
- UPGRADING = "upgrading",
13
- UPGRADE_FAILED = "upgradeFailed",
14
- INSTALLED = "installed",
15
- INSTALLING = "installing",
16
- INSTALL_FAILED = "installFailed",
17
- NOT_INSTALLED = "notInstalled",
18
- TIMEOUT = "timeout"
19
- }
20
9
  export interface PageHeaderType {
21
10
  headerName?: string;
22
11
  showTabs?: boolean;
@@ -1,4 +1,4 @@
1
1
  import { MaterialHistoryProps } from './types';
2
2
 
3
- declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit }: MaterialHistoryProps) => JSX.Element;
3
+ declare const MaterialHistory: ({ material, pipelineName, ciPipelineId, selectCommit, isCommitInfoModal, }: MaterialHistoryProps) => JSX.Element;
4
4
  export default MaterialHistory;
@@ -5,4 +5,5 @@ export interface MaterialHistoryProps {
5
5
  pipelineName: string;
6
6
  ciPipelineId?: string;
7
7
  selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void;
8
+ isCommitInfoModal?: boolean;
8
9
  }
@@ -1,5 +1,7 @@
1
- import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, PluginDetailServiceParamsType } from './types';
1
+ import { ResponseType } from '../../../Common';
2
+ import { GetPluginStoreDataReturnType, GetPluginStoreDataServiceParamsType, MinParentPluginDTO, PluginDetailServiceParamsType } from './types';
2
3
 
3
- export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
4
+ export declare const getPluginsDetail: ({ appId, parentPluginIds, pluginIds, signal, shouldShowError, }: PluginDetailServiceParamsType) => Promise<Pick<GetPluginStoreDataReturnType, 'pluginStore'>>;
4
5
  export declare const getPluginStoreData: ({ searchKey, selectedTags, appId, offset, signal, }: GetPluginStoreDataServiceParamsType) => Promise<GetPluginStoreDataReturnType>;
5
6
  export declare const getAvailablePluginTags: (appId: number) => Promise<string[]>;
7
+ export declare const getParentPluginList: (appId?: number) => Promise<ResponseType<MinParentPluginDTO[]>>;
@@ -8,9 +8,13 @@ export declare enum PluginCreationType {
8
8
  SHARED = "SHARED",
9
9
  PRESET = "PRESET"
10
10
  }
11
- export interface GetPluginTagsPayloadType {
11
+ export interface PluginAPIBaseQueryParamsType {
12
12
  appId: number;
13
13
  }
14
+ export interface GetPluginTagsPayloadType extends PluginAPIBaseQueryParamsType {
15
+ }
16
+ export interface GetParentPluginListPayloadType extends PluginAPIBaseQueryParamsType {
17
+ }
14
18
  export interface PluginTagNamesDTO {
15
19
  tagNames: string[];
16
20
  }
@@ -45,6 +49,9 @@ export interface ParentPluginDTO {
45
49
  type: PluginCreationType;
46
50
  icon: string;
47
51
  pluginVersions: PluginVersionsDTO;
52
+ pluginIdentifier: string;
53
+ }
54
+ export interface MinParentPluginDTO extends Pick<ParentPluginDTO, 'id' | 'name' | 'icon'> {
48
55
  }
49
56
  export interface PluginDetailDTO {
50
57
  parentPlugins: ParentPluginDTO[];
@@ -58,6 +65,7 @@ export interface PluginDetailServiceParamsType {
58
65
  * @default true
59
66
  */
60
67
  shouldShowError?: boolean;
68
+ signal?: AbortSignal;
61
69
  }
62
70
  export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsType, 'appId'> {
63
71
  pluginId?: PluginDetailServiceParamsType['pluginIds'];
@@ -66,11 +74,11 @@ export interface PluginDetailPayloadType extends Pick<PluginDetailServiceParamsT
66
74
  export interface PluginListFiltersType extends Pick<BaseFilterQueryParams<unknown>, 'searchKey'> {
67
75
  selectedTags: string[];
68
76
  }
69
- interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon'> {
77
+ interface ParentPluginType extends Pick<ParentPluginDTO, 'id' | 'name' | 'description' | 'type' | 'icon' | 'pluginIdentifier'> {
70
78
  latestVersionId: MinimalPluginVersionDataDTO['id'];
71
79
  pluginVersions: MinimalPluginVersionDataDTO[];
72
80
  }
73
- interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type'> {
81
+ interface DetailedPluginVersionType extends Pick<MinimalPluginVersionDataDTO, 'id' | 'description' | 'name' | 'pluginVersion'>, Pick<DetailedPluginVersionDTO, 'tags' | 'isLatest' | 'inputVariables' | 'outputVariables' | 'updatedBy' | 'docLink'>, Pick<ParentPluginType, 'icon' | 'type' | 'pluginIdentifier'> {
74
82
  parentPluginId: ParentPluginType['id'];
75
83
  }
76
84
  export interface PluginDataStoreType {
@@ -1,3 +1,5 @@
1
+ import { OptionProps } from 'react-select';
2
+ import { OptionType } from '../../../Common/Types';
1
3
  import { ParentPluginDTO, PluginDataStoreType } from './types';
2
4
 
3
5
  export declare const parsePluginDetailsDTOIntoPluginStore: (pluginData: ParentPluginDTO[]) => PluginDataStoreType;
@@ -14,6 +16,7 @@ export declare const pluginTagSelectStyles: {
14
16
  group: (base: any) => any;
15
17
  groupHeading: (base: any) => any;
16
18
  };
19
+ export declare const PluginTagOption: (props: OptionProps<OptionType, true>) => JSX.Element;
17
20
  /**
18
21
  * @description This method takes the initial plugin data store and updates the keys with the target parent plugin store and plugin version store
19
22
  */
@@ -0,0 +1,4 @@
1
+ import { ScannedObjectBarProps } from './types';
2
+
3
+ declare const ScannedObjectBar: ({ criticalVulnerabilitiesCount, moderateVulnerabilitiesCount, lowVulnerabilitiesCount, objectBarClassName, removeObjectCountMargin, }: ScannedObjectBarProps) => JSX.Element;
4
+ export default ScannedObjectBar;
@@ -0,0 +1 @@
1
+ export { default as ScannedObjectBar } from './ScannedObjectBar';
@@ -0,0 +1,7 @@
1
+ export interface ScannedObjectBarProps {
2
+ criticalVulnerabilitiesCount: number;
3
+ moderateVulnerabilitiesCount: number;
4
+ lowVulnerabilitiesCount: number;
5
+ objectBarClassName?: string;
6
+ removeObjectCountMargin?: boolean;
7
+ }
@@ -81,5 +81,5 @@ import { SelectPickerProps } from './type';
81
81
  * <SelectPicker ... showSelectedOptionsCount />
82
82
  * ```
83
83
  */
84
- declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, ...props }: SelectPickerProps) => JSX.Element;
84
+ declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, ...props }: SelectPickerProps) => JSX.Element;
85
85
  export default SelectPicker;
@@ -1,3 +1,4 @@
1
+ import { ServerErrors } from '../../../Common/ServerError';
1
2
  import { OptionType } from '../../../Common/Types';
2
3
  import { ComponentSizeType } from '../../constants';
3
4
  import { ReactElement, ReactNode } from 'react';
@@ -18,7 +19,7 @@ export interface SelectPickerOptionType extends OptionType<number | string, Reac
18
19
  endIcon?: ReactElement;
19
20
  }
20
21
  type SelectProps = ReactSelectProps<SelectPickerOptionType>;
21
- export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
22
+ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'autoFocus' | 'onKeyDown'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
22
23
  /**
23
24
  * Icon to be rendered in the control
24
25
  */
@@ -70,5 +71,13 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
70
71
  * @default 'ComponentSizeType.small'
71
72
  */
72
73
  menuSize?: ComponentSizeType;
74
+ /**
75
+ * If truthy, would show generic section error state as no options message
76
+ */
77
+ optionListError?: ServerErrors;
78
+ /**
79
+ * Would reload the option list when called in case optionListError is present
80
+ */
81
+ reloadOptionList?: () => void;
73
82
  }
74
83
  export {};
@@ -1,5 +1,4 @@
1
1
  import { LastExecutionResponseType, LastExecutionResultType } from '../../types';
2
2
 
3
- export declare const getSortedVulnerabilities: (vulnerabilities: any) => any;
4
3
  export declare const getParsedScanResult: (scanResult: any) => LastExecutionResultType;
5
4
  export declare const parseLastExecutionResponse: (response: any) => LastExecutionResponseType;
@@ -10,6 +10,7 @@ export * from './FilterChips';
10
10
  export * from './ActivityIndicator';
11
11
  export * from './GenericSectionErrorState';
12
12
  export * from './KeyValueList';
13
+ export * from './ScannedObjectBar';
13
14
  export * from './InfoIconTippy';
14
15
  export * from './EditableTextArea';
15
16
  export * from './Header';
@@ -33,4 +34,4 @@ export * from './Plugin';
33
34
  export * from './KeyValueTable';
34
35
  export * from './SelectPicker';
35
36
  export * from './DetectBottom';
36
- export * from './FilterButton';
37
+ export * from './EditImageFormField';
@@ -32,5 +32,7 @@ export declare const renderValidInputButtonTippy: (children: ReactElement) => JS
32
32
  export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
33
33
  export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
34
34
  export declare const decode: (data: any, isEncoded?: boolean) => {};
35
+ export declare const isTimeStringAvailable: (time: string) => boolean;
36
+ export declare const getTimeDifference: (startTime: string, endTime: string) => string;
35
37
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
36
38
  export {};
@@ -354,6 +354,7 @@ export declare enum K8sResourcePayloadAppType {
354
354
  HELM_APP = 1,
355
355
  EXTERNAL_ARGO_APP = 2
356
356
  }
357
+ export declare const ANSI_UP_REGEX: RegExp;
357
358
  /**
358
359
  * Size variants for components
359
360
  */
@@ -362,3 +363,4 @@ export declare enum ComponentSizeType {
362
363
  medium = "medium",
363
364
  large = "large"
364
365
  }
366
+ export declare const POP_UP_MENU_MODAL_ID = "popup";
@@ -202,10 +202,8 @@ export declare enum DefaultUserKey {
202
202
  }
203
203
  export declare enum Severity {
204
204
  CRITICAL = "critical",
205
- HIGH = "high",
206
- MEDIUM = "medium",
207
- LOW = "low",
208
- UNKNOWN = "unknown"
205
+ MODERATE = "moderate",
206
+ LOW = "low"
209
207
  }
210
208
  export declare enum ImagePromotionTabs {
211
209
  REQUEST = "request",
@@ -371,16 +369,13 @@ export declare enum ResourceVersionType {
371
369
  v1 = "v1",
372
370
  alpha1 = "alpha1"
373
371
  }
374
- export interface SeverityCount {
375
- critical: number;
376
- high: number;
377
- medium: number;
378
- low: number;
379
- unknown: number;
380
- }
381
372
  export interface LastExecutionResultType {
382
373
  lastExecution: string;
383
- severityCount: SeverityCount;
374
+ severityCount: {
375
+ critical: number;
376
+ moderate: number;
377
+ low: number;
378
+ };
384
379
  vulnerabilities: VulnerabilityType[];
385
380
  scanExecutionId?: number;
386
381
  appId?: number;
@@ -12,6 +12,7 @@ export declare const MESSAGES: {
12
12
  VALID_POSITIVE_NUMBER: string;
13
13
  VALID_POSITIVE_INTEGER: string;
14
14
  MAX_SAFE_INTEGER: string;
15
+ INVALID_SEMANTIC_VERSION: string;
15
16
  };
16
17
  export declare const requiredField: (value: string) => ValidationResponseType;
17
18
  export declare const validateName: (name: string) => ValidationResponseType;
@@ -28,3 +29,13 @@ export declare const validateUniqueKeys: (keys: string[]) => {
28
29
  isValid: boolean;
29
30
  message: string;
30
31
  };
32
+ /**
33
+ * Rules for valid semantic version:
34
+ * 1. version.length < 128 and not empty
35
+ * 2. version should follow semantic versioning regex from https://semver.org/
36
+ */
37
+ export declare const validateSemanticVersioning: (version: string) => ValidationResponseType;
38
+ /**
39
+ * A valid display name should be between 3 and 50 characters
40
+ */
41
+ export declare const validateDisplayName: (name: string) => ValidationResponseType;