@devtron-labs/devtron-fe-common-lib 1.6.1-beta-1 → 1.6.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.
Files changed (63) hide show
  1. package/dist/{@code-editor-Bbs0NH9g.js → @code-editor-DvMJp0OO.js} +13430 -13279
  2. package/dist/{@common-rjsf-D15keJJ7.js → @common-rjsf-hLTraL__.js} +2 -2
  3. package/dist/{@framer-motion-CpA7HTl-.js → @framer-motion-BFqoU0Z7.js} +1 -1
  4. package/dist/{@react-dates-CaRoxjcN.js → @react-dates-Dx7AjKDr.js} +1 -1
  5. package/dist/{@react-select-D4CIuOAx.js → @react-select-BfYm_1lF.js} +1 -1
  6. package/dist/{@react-virtualized-sticky-tree-CZZtnJ_O.js → @react-virtualized-sticky-tree-BNk-_Tvs.js} +1 -1
  7. package/dist/{@vendor-CKSERKp7.js → @vendor-CWh7bjwl.js} +1003 -1003
  8. package/dist/Common/AppStatus/utils.d.ts +1 -0
  9. package/dist/Common/CustomInput/CustomInput.d.ts +2 -0
  10. package/dist/Common/CustomInput/Types.d.ts +30 -0
  11. package/dist/Common/CustomInput/index.d.ts +2 -0
  12. package/dist/Common/Dialogs/ConfirmationDialog.d.ts +3 -0
  13. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -11
  14. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
  15. package/dist/Common/RJSF/Form.d.ts +1 -1
  16. package/dist/Common/SegmentedBarChart/types.d.ts +1 -0
  17. package/dist/Common/Tooltip/index.d.ts +0 -1
  18. package/dist/Common/index.d.ts +1 -0
  19. package/dist/Shared/Components/Button/Button.component.d.ts +2 -2
  20. package/dist/Shared/Components/Button/types.d.ts +10 -14
  21. package/dist/Shared/Components/Button/utils.d.ts +1 -3
  22. package/dist/Shared/Components/CICDHistory/BuildAndTaskSummaryTooltipCard.d.ts +3 -0
  23. package/dist/Shared/Components/CICDHistory/GitTriggerList.d.ts +5 -0
  24. package/dist/Shared/Components/CICDHistory/TriggerDetails.d.ts +3 -0
  25. package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -3
  26. package/dist/Shared/Components/CICDHistory/WorkerStatus.d.ts +3 -0
  27. package/dist/Shared/Components/CICDHistory/constants.d.ts +38 -1
  28. package/dist/Shared/Components/CICDHistory/index.d.ts +2 -1
  29. package/dist/Shared/Components/CICDHistory/types.d.ts +89 -25
  30. package/dist/Shared/Components/CICDHistory/utils.d.ts +9 -1
  31. package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +1 -1
  32. package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +1 -1
  33. package/dist/Shared/Components/FormFieldWrapper/types.d.ts +4 -20
  34. package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
  35. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  36. package/dist/Shared/Components/ShowMoreText/ShowMoreText.d.ts +3 -1
  37. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +1 -1
  38. package/dist/Shared/Components/index.d.ts +0 -1
  39. package/dist/Shared/Helpers.d.ts +3 -1
  40. package/dist/Shared/Services/ToastManager/types.d.ts +3 -3
  41. package/dist/Shared/constants.d.ts +0 -24
  42. package/dist/Shared/types.d.ts +11 -0
  43. package/dist/assets/@code-editor.css +1 -1
  44. package/dist/assets/ic-aws-codecommit.43f0dd23.svg +26 -0
  45. package/dist/assets/ic-bitbucket.ffe914a0.svg +30 -0
  46. package/dist/assets/{ic-visibility-on.7505dd12.svg → ic-calendar.1d9c66d2.svg} +1 -2
  47. package/dist/assets/ic-environment.e639b8f3.svg +4 -0
  48. package/dist/assets/ic-git.89f79adf.svg +17 -0
  49. package/dist/assets/ic-github.bb1f1753.svg +3 -0
  50. package/dist/assets/ic-gitlab.de184b7f.svg +31 -0
  51. package/dist/assets/ic-help-filled.4468cdf1.svg +4 -0
  52. package/dist/assets/ic-person.d066bc6d.svg +19 -0
  53. package/dist/assets/{ic-pulsate-status.cc755b3f.svg → ic-pulsate-status.2ca548fd.svg} +0 -1
  54. package/dist/index.js +489 -479
  55. package/package.json +3 -3
  56. package/dist/Shared/Components/CustomInput/CustomInput.d.ts +0 -3
  57. package/dist/Shared/Components/CustomInput/PasswordField.d.ts +0 -3
  58. package/dist/Shared/Components/CustomInput/constants.d.ts +0 -3
  59. package/dist/Shared/Components/CustomInput/index.d.ts +0 -3
  60. package/dist/Shared/Components/CustomInput/types.d.ts +0 -36
  61. package/dist/assets/ic-calendar.984accc5.svg +0 -19
  62. package/dist/assets/ic-person.f78738ac.svg +0 -22
  63. package/dist/assets/ic-visibility-off.d91d3844.svg +0 -19
@@ -1 +1,2 @@
1
1
  export declare const triggerStatus: (triggerDetailStatus: string) => string;
2
+ export declare const parseJobStatus: (status: string) => string;
@@ -0,0 +1,2 @@
1
+ import { CustomInputProps } from './Types';
2
+ export declare const CustomInput: ({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, onBlur, readOnly, noTrim, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo, inputWrapClassName, inputProps, }: CustomInputProps) => JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { default as React, HTMLInputTypeAttribute, InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface CustomInputProps {
3
+ name: string;
4
+ value: string | number;
5
+ onChange: (e: any) => void;
6
+ onFocus?: (e: any) => void;
7
+ autoComplete?: string;
8
+ label?: string | React.ReactNode;
9
+ labelClassName?: string;
10
+ type?: HTMLInputTypeAttribute;
11
+ disabled?: boolean;
12
+ placeholder?: string;
13
+ tabIndex?: number;
14
+ dataTestid?: string;
15
+ isRequiredField?: boolean;
16
+ autoFocus?: boolean;
17
+ rootClassName?: string;
18
+ error?: string[] | string;
19
+ helperText?: ReactNode;
20
+ onBlur?: (e: any) => void;
21
+ readOnly?: boolean;
22
+ noTrim?: boolean;
23
+ onKeyPress?: (e: any) => void;
24
+ defaultValue?: string | number | ReadonlyArray<string> | undefined;
25
+ onKeyDown?: (e: any) => void;
26
+ required?: boolean;
27
+ additionalErrorInfo?: React.ReactNode;
28
+ inputWrapClassName?: string;
29
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
30
+ }
@@ -0,0 +1,2 @@
1
+ export * from './CustomInput';
2
+ export * from './Types';
@@ -1,4 +1,7 @@
1
1
  import { ConfirmationDialogBodyType, ConfirmationDialogButtonGroupType, ConfirmationDialogIconType, ConfirmationDialogType } from './Types';
2
+ /**
3
+ * @deprecated use confirmation modal instead
4
+ */
2
5
  declare const ConfirmationDialog: {
3
6
  ({ className, children, close }: ConfirmationDialogType): JSX.Element;
4
7
  Icon: ({ src, className }: ConfirmationDialogIconType) => JSX.Element;
@@ -8,18 +8,8 @@ export interface UseUrlFiltersProps<T, K> {
8
8
  * Callback function for parsing the search params
9
9
  */
10
10
  parseSearchParams?: (searchParams: URLSearchParams) => K;
11
- /**
12
- * Local storage key to store the filters
13
- */
14
11
  localStorageKey?: `${string}__${string}`;
15
- /**
16
- * Method to be used for redirection in case of filter update
17
- *
18
- * @default 'replace'
19
- */
20
- redirectionMethod?: 'replace' | 'push';
21
12
  }
22
- export type UpdateSearchParamsOptionsType<T, K = unknown> = Partial<Pick<UseUrlFiltersProps<T, K>, 'redirectionMethod'>>;
23
13
  export type UseUrlFiltersReturnType<T, K = unknown> = K & {
24
14
  /**
25
15
  * Currently applied page size
@@ -66,5 +56,5 @@ export type UseUrlFiltersReturnType<T, K = unknown> = K & {
66
56
  /**
67
57
  * Update the search params with the passed object
68
58
  */
69
- updateSearchParams: (paramsToSerialize: Partial<K>, options?: UpdateSearchParamsOptionsType<T, K>) => void;
59
+ updateSearchParams: (paramsToSerialize: Partial<K>) => void;
70
60
  };
@@ -16,5 +16,5 @@ import { UseUrlFiltersProps, UseUrlFiltersReturnType } from './types';
16
16
  * ```
17
17
  *
18
18
  */
19
- declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, redirectionMethod, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
19
+ declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
20
20
  export default useUrlFilters;
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "autoComplete" | "tagName" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "method" | "autoComplete" | "tagName" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
@@ -10,4 +10,5 @@ export interface SegmentedBarChartProps {
10
10
  labelClassName?: string;
11
11
  isProportional?: boolean;
12
12
  swapLegendAndBar?: boolean;
13
+ showAnimationOnBar?: boolean;
13
14
  }
@@ -1,3 +1,2 @@
1
1
  export { default as Tooltip } from './Tooltip';
2
2
  export { TOOLTIP_CONTENTS } from './constants';
3
- export type { TooltipProps } from './types';
@@ -43,6 +43,7 @@ export * from './RJSF';
43
43
  export * from './DevtronProgressing';
44
44
  export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
45
45
  export * from './AddCDButton';
46
+ export * from './CustomInput';
46
47
  export * from './DraggableWrapper';
47
48
  export * from './Pagination';
48
49
  export * from './Markdown';
@@ -1,4 +1,4 @@
1
- import { ButtonComponentType, ButtonProps } from './types';
1
+ import { ButtonProps } from './types';
2
2
  /**
3
3
  * Generic component for Button.
4
4
  * Should be used in combination of variant, size and style.
@@ -63,5 +63,5 @@ import { ButtonComponentType, ButtonProps } from './types';
63
63
  * <Button icon={<ICCube />} ariaLabel="Label" />
64
64
  * ```
65
65
  */
66
- declare const Button: <ComponentType extends ButtonComponentType>({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, triggerAutoClickTimestamp, ...props }: ButtonProps<ComponentType>) => JSX.Element;
66
+ declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, icon, ariaLabel, showAriaLabelInTippy, fullWidth, isOpacityHoverChild, ...props }: ButtonProps) => JSX.Element;
67
67
  export default Button;
@@ -20,27 +20,27 @@ export declare enum ButtonComponentType {
20
20
  button = "button",
21
21
  link = "link"
22
22
  }
23
- export type ButtonProps<ComponentType extends ButtonComponentType = ButtonComponentType.button> = (ComponentType extends ButtonComponentType.link ? {
24
- component: ButtonComponentType.link;
25
- /**
26
- * Props for the link component
27
- */
28
- linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
29
- buttonProps?: never;
30
- onClick?: LinkProps['onClick'];
31
- } : {
23
+ export type ButtonProps = ({
32
24
  /**
33
25
  * Component to be rendered from the available options
34
26
  *
35
27
  * @default ButtonComponentType.button
36
28
  */
37
- component?: ComponentType | never;
29
+ component?: ButtonComponentType.button | never;
38
30
  /**
39
31
  * Props for the button component
40
32
  */
41
33
  buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'styles' | 'className' | 'disabled' | 'onClick'>;
42
34
  linkProps?: never;
43
35
  onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
36
+ } | {
37
+ component: ButtonComponentType.link;
38
+ /**
39
+ * Props for the link component
40
+ */
41
+ linkProps: Omit<LinkProps, 'children' | 'styles' | 'className' | 'onClick'>;
42
+ buttonProps?: never;
43
+ onClick?: LinkProps['onClick'];
44
44
  }) & {
45
45
  /**
46
46
  * Variant of the button
@@ -86,10 +86,6 @@ export type ButtonProps<ComponentType extends ButtonComponentType = ButtonCompon
86
86
  * @default false
87
87
  */
88
88
  isOpacityHoverChild?: boolean;
89
- /**
90
- * If provided, the button is clicked automatically after the pre-defined time
91
- */
92
- triggerAutoClickTimestamp?: number | null;
93
89
  } & ({
94
90
  /**
95
91
  * If true, the tooltip is shown for the button
@@ -1,6 +1,4 @@
1
1
  import { ButtonProps } from './types';
2
2
  export declare const getButtonIconClassName: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => string;
3
3
  export declare const getButtonLoaderSize: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => number;
4
- export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, isAutoTriggerActive, }: Required<Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon"> & {
5
- isAutoTriggerActive: boolean;
6
- }>) => string;
4
+ export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon">) => string;
@@ -0,0 +1,3 @@
1
+ import { BuildAndTaskSummaryTooltipCardProps } from './types';
2
+ declare const BuildAndTaskSummaryTooltipCard: import('react').MemoExoticComponent<({ workflowExecutionStages, triggeredByEmail, namespace, podName, stage, gitTriggers, ciMaterials, }: BuildAndTaskSummaryTooltipCardProps) => JSX.Element>;
3
+ export default BuildAndTaskSummaryTooltipCard;
@@ -0,0 +1,5 @@
1
+ import { DeploymentSummaryTooltipCardType } from './types';
2
+ declare const GitTriggerList: import('react').MemoExoticComponent<({ ciMaterials, gitTriggers, addMarginTop, }: Pick<DeploymentSummaryTooltipCardType, "ciMaterials" | "gitTriggers"> & {
3
+ addMarginTop?: boolean;
4
+ }) => JSX.Element>;
5
+ export default GitTriggerList;
@@ -0,0 +1,3 @@
1
+ import { TriggerDetailsType } from './types';
2
+ declare const TriggerDetails: import('react').MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, renderTargetConfigInfo, workflowExecutionStages, namespace, }: TriggerDetailsType) => JSX.Element>;
3
+ export default TriggerDetails;
@@ -1,5 +1,3 @@
1
- import { default as React } from 'react';
2
- import { TriggerDetailsType, TriggerOutputProps } from './types';
3
- export declare const TriggerDetails: React.MemoExoticComponent<({ status, startedOn, finishedOn, triggeredBy, triggeredByEmail, ciMaterials, gitTriggers, message, podStatus, type, stage, artifact, environmentName, isJobView, workerPodName, triggerMetadata, renderDeploymentHistoryTriggerMetaText, renderTargetConfigInfo, }: TriggerDetailsType) => JSX.Element>;
1
+ import { TriggerOutputProps } from './types';
4
2
  declare const TriggerOutput: ({ fullScreenView, triggerHistory, setTriggerHistory, setFullScreenView, deploymentAppType, isBlobStorageConfigured, appReleaseTags, tagsEditable, hideImageTaggingHardDelete, fetchIdData, setFetchTriggerIdData, selectedEnvironmentName, deploymentHistoryResult, renderRunSource, renderCIListHeader, renderDeploymentApprovalInfo, processVirtualEnvironmentDeploymentData, renderVirtualHistoryArtifacts, renderDeploymentHistoryTriggerMetaText, resourceId, scrollToTop, scrollToBottom, renderTargetConfigInfo, appName, }: TriggerOutputProps) => JSX.Element;
5
3
  export default TriggerOutput;
@@ -0,0 +1,3 @@
1
+ import { WorkerStatusType } from './types';
2
+ declare const WorkerStatus: import('react').MemoExoticComponent<({ message, podStatus, stage, workerPodName, finishedOn, clusterId, namespace, workerMessageContainerClassName, titleClassName, viewWorkerPodClassName, hideShowMoreMessageButton, }: WorkerStatusType) => JSX.Element | null>;
3
+ export default WorkerStatus;
@@ -1,3 +1,4 @@
1
+ import { WorkflowStageStatusType } from './types';
1
2
  export declare const HISTORY_LABEL: {
2
3
  APPLICATION: string;
3
4
  ENVIRONMENT: string;
@@ -29,6 +30,7 @@ export declare const TERMINAL_STATUS_MAP: {
29
30
  CANCELLED: string;
30
31
  UNABLE_TO_FETCH: string;
31
32
  TIMED_OUT: string;
33
+ WAITING_TO_START: string;
32
34
  };
33
35
  export declare const EVENT_STREAM_EVENTS_MAP: {
34
36
  MESSAGE: string;
@@ -40,10 +42,45 @@ export declare const POD_STATUS: {
40
42
  PENDING: string;
41
43
  };
42
44
  export declare const TIMEOUT_VALUE = "1";
43
- export declare const WORKER_POD_BASE_URL = "/resource-browser/1/devtron-ci/pod/k8sEmptyGroup";
45
+ export declare const DEFAULT_CLUSTER_ID = 1;
46
+ export declare const DEFAULT_NAMESPACE = "devtron-ci";
44
47
  export declare const DEFAULT_ENV = "devtron-ci";
45
48
  export declare const LOGS_RETRY_COUNT = 3;
46
49
  export declare const DEPLOYMENT_STATUS_QUERY_PARAM = "deployment-status";
47
50
  export declare const MANIFEST_STATUS_HEADERS: string[];
48
51
  export declare const LOGS_STAGE_IDENTIFIER = "STAGE_INFO";
49
52
  export declare const LOGS_STAGE_STREAM_SEPARATOR = "|";
53
+ export declare const statusColor: {
54
+ [x: string]: string;
55
+ suspended: string;
56
+ unknown: string;
57
+ queued: string;
58
+ degraded: string;
59
+ healthy: string;
60
+ notdeployed: string;
61
+ missing: string;
62
+ progressing: string;
63
+ initiating: string;
64
+ starting: string;
65
+ succeeded: string;
66
+ running: string;
67
+ failed: string;
68
+ error: string;
69
+ cancelled: string;
70
+ aborted: string;
71
+ timedout: string;
72
+ unabletofetch: string;
73
+ hibernating: string;
74
+ };
75
+ export declare const PULSATING_STATUS_MAP: {
76
+ [key in keyof typeof statusColor]?: boolean;
77
+ };
78
+ export declare const WORKFLOW_STAGE_STATUS_TO_TEXT_MAP: Record<WorkflowStageStatusType, string>;
79
+ export declare const EXECUTION_FINISHED_TEXT_MAP: Partial<Record<WorkflowStageStatusType, string>>;
80
+ export declare const TERMINAL_STATUS_COLOR_CLASS_MAP: {
81
+ readonly [x: string]: "cr-5" | "cg-5" | "co-5";
82
+ };
83
+ export declare const PROGRESSING_STATUS: {
84
+ readonly [x: string]: "progressing" | "starting" | "initiating" | "queued" | "running";
85
+ };
86
+ export declare const FAILED_WORKFLOW_STAGE_STATUS_MAP: Record<Extract<WorkflowStageStatusType, WorkflowStageStatusType.ABORTED | WorkflowStageStatusType.FAILED | WorkflowStageStatusType.TIMEOUT>, true>;
@@ -1,6 +1,7 @@
1
1
  export { default as Sidebar } from './Sidebar';
2
2
  export { default as Artifacts } from './Artifacts';
3
3
  export { default as TriggerOutput } from './TriggerOutput';
4
+ export { default as TriggerDetails } from './TriggerDetails';
4
5
  export { default as CDEmptyState } from './CDEmptyState';
5
6
  export { default as DeploymentStatusDetailBreakdown } from './DeploymentStatusBreakdown';
6
7
  export { default as AppStatusDetailsChart } from './AppStatusDetailsChart';
@@ -9,8 +10,8 @@ export * from './types';
9
10
  export * from './service';
10
11
  export * from './History.components';
11
12
  export * from './utils';
12
- export * from './TriggerOutput';
13
13
  export { default as LogsRenderer } from './LogsRenderer';
14
14
  export * from './DeploymentHistoryConfigDiff';
15
15
  export * from './CiPipelineSourceConfig';
16
16
  export * from './StatusFilterButtonComponent';
17
+ export { statusColor } from './constants';
@@ -1,4 +1,4 @@
1
- import { CSSProperties, ReactElement } from 'react';
1
+ import { CSSProperties, ReactElement, ReactNode } from 'react';
2
2
  import { SupportedKeyboardKeysType } from '@Common/Hooks/UseRegisterShortcut/types';
3
3
  import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, useScrollable } from '../../../Common';
4
4
  import { DeploymentStageType } from '../../constants';
@@ -67,7 +67,39 @@ export interface TargetConfigType {
67
67
  releaseChannelId?: string;
68
68
  releaseChannelName?: string;
69
69
  }
70
- export interface History extends Pick<TargetPlatformsDTO, 'targetPlatforms'> {
70
+ export declare enum WorkflowExecutionStageType {
71
+ WORKFLOW = "workflow",
72
+ POD = "pod"
73
+ }
74
+ export declare enum WorkflowStageStatusType {
75
+ NOT_STARTED = "NOT_STARTED",
76
+ RUNNING = "RUNNING",
77
+ SUCCEEDED = "SUCCEEDED",
78
+ FAILED = "FAILED",
79
+ ABORTED = "ABORTED",
80
+ TIMEOUT = "TIMEOUT",
81
+ UNKNOWN = "UNKNOWN"
82
+ }
83
+ export declare enum WorkflowExecutionStageNameType {
84
+ PREPARATION = "Preparation",
85
+ EXECUTION = "Execution"
86
+ }
87
+ interface WorkflowExecutionStageCommonDTO {
88
+ status: WorkflowStageStatusType;
89
+ stageName: WorkflowExecutionStageNameType;
90
+ startTime: string;
91
+ endTime: string;
92
+ message: string;
93
+ }
94
+ export interface PodExecutionStageDTO extends WorkflowExecutionStageCommonDTO {
95
+ metadata: {
96
+ clusterId?: number;
97
+ };
98
+ }
99
+ export interface WorkflowExecutionStagesMapDTO {
100
+ workflowExecutionStages: Record<WorkflowExecutionStageType.WORKFLOW, WorkflowExecutionStageCommonDTO[]> & Record<WorkflowExecutionStageType.POD, PodExecutionStageDTO[]>;
101
+ }
102
+ export interface History extends Pick<TargetPlatformsDTO, 'targetPlatforms'>, WorkflowExecutionStagesMapDTO {
71
103
  id: number;
72
104
  name: string;
73
105
  status: string;
@@ -103,6 +135,27 @@ export interface History extends Pick<TargetPlatformsDTO, 'targetPlatforms'> {
103
135
  runSource?: RunSourceType;
104
136
  targetConfig?: TargetConfigType;
105
137
  }
138
+ export interface ExecutionInfoType {
139
+ /**
140
+ * Triggered is assumed to be true always, so status will be Succeeded
141
+ * Extracted from Preparation start time, if there, in case of old data this will be execution start time
142
+ * If triggeredOn is not there will not show startTime next to Triggered label but will show other details if possible like commit info, etc.
143
+ * and capture error on sentry
144
+ */
145
+ triggeredOn: string;
146
+ /**
147
+ * Extracted from startTime from Execution stage (since will work in both old and new format)
148
+ * If this is not given then, we won't be showing Execution started field
149
+ * If preparation field has failed, then we will be using finishedOn field to show the status
150
+ */
151
+ executionStartedOn: string;
152
+ /**
153
+ * Will be the endTime of Execution stage.
154
+ */
155
+ finishedOn?: string;
156
+ currentStatus: Exclude<WorkflowStageStatusType, WorkflowStageStatusType.NOT_STARTED>;
157
+ workerDetails: Pick<PodExecutionStageDTO, 'message' | 'status' | 'endTime'> & Pick<PodExecutionStageDTO['metadata'], 'clusterId'>;
158
+ }
106
159
  export interface DeploymentHistoryResultObject {
107
160
  cdWorkflows: History[];
108
161
  appReleaseTagNames: string[];
@@ -129,7 +182,7 @@ export interface SidebarType extends RenderRunSourceType {
129
182
  children?: React.ReactNode;
130
183
  resourceId?: number;
131
184
  }
132
- export interface HistorySummaryCardType extends RenderRunSourceType {
185
+ export interface HistorySummaryCardType extends RenderRunSourceType, Pick<History, 'workflowExecutionStages' | 'podName' | 'namespace'> {
133
186
  id: number;
134
187
  status: string;
135
188
  startedOn: string;
@@ -147,7 +200,7 @@ export interface HistorySummaryCardType extends RenderRunSourceType {
147
200
  */
148
201
  resourceId?: number;
149
202
  }
150
- export interface SummaryTooltipCardType {
203
+ export interface DeploymentSummaryTooltipCardType {
151
204
  status: string;
152
205
  startedOn: string;
153
206
  triggeredBy: number;
@@ -155,6 +208,8 @@ export interface SummaryTooltipCardType {
155
208
  ciMaterials: CiMaterial[];
156
209
  gitTriggers: Map<number, GitTriggers>;
157
210
  }
211
+ export interface BuildAndTaskSummaryTooltipCardProps extends Pick<History, 'workflowExecutionStages' | 'triggeredByEmail' | 'namespace' | 'podName' | 'stage'>, Pick<HistorySummaryCardType, 'gitTriggers' | 'ciMaterials'> {
212
+ }
158
213
  export interface DeploymentTemplateList {
159
214
  id: number;
160
215
  name: string;
@@ -166,6 +221,7 @@ export interface CurrentStatusType {
166
221
  artifact: string;
167
222
  stage: DeploymentStageType;
168
223
  type: HistoryComponentType;
224
+ executionInfo: ExecutionInfoType;
169
225
  }
170
226
  export interface StartDetailsType {
171
227
  startedOn: string;
@@ -176,16 +232,13 @@ export interface StartDetailsType {
176
232
  artifact: string;
177
233
  type: HistoryComponentType;
178
234
  environmentName?: string;
179
- isJobView?: boolean;
180
- triggerMetadata?: string;
181
- renderDeploymentHistoryTriggerMetaText: (triggerMetaData: string) => JSX.Element;
182
235
  /**
183
236
  * Callback handler for showing the target config
184
237
  */
185
238
  renderTargetConfigInfo?: () => ReactElement;
186
239
  stage: DeploymentStageType;
187
240
  }
188
- export interface TriggerDetailsType extends Pick<StartDetailsType, 'renderTargetConfigInfo'> {
241
+ export interface TriggerDetailsType extends Pick<StartDetailsType, 'renderTargetConfigInfo'>, Pick<History, 'workflowExecutionStages' | 'namespace'> {
189
242
  status: string;
190
243
  startedOn: string;
191
244
  finishedOn: string;
@@ -202,29 +255,46 @@ export interface TriggerDetailsType extends Pick<StartDetailsType, 'renderTarget
202
255
  isJobView?: boolean;
203
256
  workerPodName?: string;
204
257
  triggerMetadata?: string;
205
- renderDeploymentHistoryTriggerMetaText: (triggerMetaData: string) => JSX.Element;
258
+ renderDeploymentHistoryTriggerMetaText: (triggerMetaData: string, onlyRenderIcon?: boolean) => JSX.Element;
206
259
  }
207
- export interface ProgressingStatusType {
208
- status: string;
260
+ export type ProgressingStatusType = {
209
261
  stage: DeploymentStageType;
210
262
  type: HistoryComponentType;
263
+ /**
264
+ * @default 'In progress''
265
+ */
266
+ label?: string;
267
+ };
268
+ export interface CurrentStatusIconProps {
269
+ status: string;
270
+ executionInfoCurrentStatus: WorkflowStageStatusType;
211
271
  }
212
- export interface WorkerStatusType {
272
+ export interface WorkerStatusType extends Pick<ExecutionInfoType['workerDetails'], 'clusterId'>, Pick<TriggerDetailsType, 'namespace'> {
213
273
  message: string;
214
274
  podStatus: string;
215
275
  stage: DeploymentStageType;
216
276
  finishedOn?: string;
217
277
  workerPodName?: string;
278
+ workerMessageContainerClassName?: string;
279
+ titleClassName?: string;
280
+ viewWorkerPodClassName?: string;
281
+ /**
282
+ * @default false
283
+ */
284
+ hideShowMoreMessageButton?: boolean;
218
285
  }
219
- export interface FinishedType {
220
- status: string;
221
- finishedOn: string;
286
+ export type FinishedType = {
222
287
  artifact: string;
223
288
  type: HistoryComponentType;
224
- }
225
- export interface TriggerDetailsStatusIconType {
289
+ } & ({
226
290
  status: string;
227
- }
291
+ finishedOn: string;
292
+ executionInfo?: never;
293
+ } | {
294
+ executionInfo: ExecutionInfoType;
295
+ status?: never;
296
+ finishedOn?: never;
297
+ });
228
298
  export interface SyncStageResourceDetail {
229
299
  id: number;
230
300
  cdWorkflowRunnerId: number;
@@ -255,12 +325,6 @@ export interface DeploymentStatusDetailsType {
255
325
  export interface DeploymentStatusDetailsResponse extends ResponseType {
256
326
  result?: DeploymentStatusDetailsType;
257
327
  }
258
- export declare const TERMINAL_STATUS_COLOR_CLASS_MAP: {
259
- [x: string]: string;
260
- };
261
- export declare const PROGRESSING_STATUS: {
262
- [x: string]: string;
263
- };
264
328
  interface DeploymentStatusDetailRow {
265
329
  icon: string;
266
330
  displayText: string;
@@ -323,7 +387,7 @@ export interface VirtualHistoryArtifactProps {
323
387
  export type CIListItemType = Pick<History, 'promotionApprovalMetadata'> & {
324
388
  userApprovalMetadata?: UserApprovalMetadataType;
325
389
  triggeredBy?: string;
326
- children: any;
390
+ children: ReactNode;
327
391
  appliedFilters?: FilterConditionsListType[];
328
392
  appliedFiltersTimestamp?: string;
329
393
  selectedEnvironmentName?: string;
@@ -1,8 +1,16 @@
1
- import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType, StageStatusType } from './types';
1
+ import { ReactElement } from 'react';
2
+ import { TriggerHistoryFilterCriteriaProps, DeploymentHistoryResultObject, TriggerHistoryFilterCriteriaType, StageStatusType, WorkflowExecutionStagesMapDTO, ExecutionInfoType, WorkflowStageStatusType } from './types';
2
3
  export declare const getTriggerHistoryFilterCriteria: ({ appId, envId, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryFilterCriteriaProps) => TriggerHistoryFilterCriteriaType;
3
4
  export declare const getParsedTriggerHistory: (result: any) => DeploymentHistoryResultObject;
4
5
  export declare const buildHoverHtmlForWebhook: (eventName: any, condition: any, selectors: any) => JSX.Element;
5
6
  export declare const renderIcon: (iconState: string) => JSX.Element;
6
7
  export declare const getStageStatusIcon: (status: StageStatusType) => JSX.Element;
8
+ export declare const renderProgressingTriggerIcon: (baseClass?: string) => JSX.Element;
7
9
  export declare const getTriggerStatusIcon: (triggerDetailStatus: string) => JSX.Element;
8
10
  export declare const getLogSearchIndex: ({ stageIndex, lineNumberInsideStage, }: Record<"stageIndex" | "lineNumberInsideStage", number>) => string;
11
+ export declare const sanitizeWorkflowExecutionStages: (workflowExecutionStages: WorkflowExecutionStagesMapDTO["workflowExecutionStages"]) => ExecutionInfoType | null;
12
+ export declare const getIconFromWorkflowStageStatusType: (status: WorkflowStageStatusType, baseClass?: string) => ReactElement;
13
+ export declare const getHistoryItemStatusIconFromWorkflowStages: (workflowExecutionStages: WorkflowExecutionStagesMapDTO["workflowExecutionStages"]) => ReactElement;
14
+ export declare const getWorkerPodBaseUrl: (clusterId?: number, podNamespace?: string) => string;
15
+ export declare const getWorkflowNodeStatusTitle: (status: string) => string;
16
+ export declare const getFormattedTriggerTime: (time: string) => string;
@@ -1,3 +1,3 @@
1
1
  import { FormFieldLabelProps } from './types';
2
- declare const FormFieldLabel: ({ label, inputId, required, layout, labelTooltipConfig, labelTippyCustomizedConfig, }: FormFieldLabelProps) => JSX.Element;
2
+ declare const FormFieldLabel: ({ label, inputId, required, layout }: FormFieldLabelProps) => JSX.Element;
3
3
  export default FormFieldLabel;
@@ -1,3 +1,3 @@
1
1
  import { FormFieldWrapperProps } from './types';
2
- declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, labelTippyCustomizedConfig, labelTooltipConfig, }: Required<FormFieldWrapperProps>) => JSX.Element;
2
+ declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, }: Required<FormFieldWrapperProps>) => JSX.Element;
3
3
  export default FormFieldWrapper;
@@ -1,5 +1,3 @@
1
- import { TooltipProps } from '../../../Common/Tooltip';
2
- import { TippyCustomizedProps } from '../../../Common/Types';
3
1
  import { ReactElement, ReactNode } from 'react';
4
2
  export type LabelOrAriaLabelType = {
5
3
  label: ReactNode;
@@ -8,8 +6,7 @@ export type LabelOrAriaLabelType = {
8
6
  label?: never;
9
7
  ariaLabel: string;
10
8
  };
11
- type LayoutType = 'row' | 'column';
12
- export type FormFieldLabelProps<Layout extends LayoutType = LayoutType> = LabelOrAriaLabelType & {
9
+ export type FormFieldLabelProps = LabelOrAriaLabelType & {
13
10
  /**
14
11
  * If true, the field is required and * is shown with the label
15
12
  */
@@ -21,20 +18,8 @@ export type FormFieldLabelProps<Layout extends LayoutType = LayoutType> = LabelO
21
18
  /**
22
19
  * Layout of the field
23
20
  */
24
- layout?: Layout;
25
- } & (Layout extends 'row' ? {
26
- /**
27
- * Tooltip configuration for the label in row layout
28
- */
29
- labelTooltipConfig?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'>;
30
- labelTippyCustomizedConfig?: never;
31
- } : {
32
- labelTooltipConfig?: never;
33
- /**
34
- * Tippy configuration for the label in column layout
35
- */
36
- labelTippyCustomizedConfig?: Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'documentationLink' | 'documentationLinkText'>;
37
- });
21
+ layout?: 'row' | 'column';
22
+ };
38
23
  export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
39
24
  /**
40
25
  * Error message for the field
@@ -55,7 +40,7 @@ export interface FormInfoItemProps {
55
40
  textClass: string;
56
41
  icon: ReactElement;
57
42
  }
58
- export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout' | 'labelTippyCustomizedConfig' | 'labelTooltipConfig'>, FormFieldInfoProps {
43
+ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout'>, FormFieldInfoProps {
59
44
  /**
60
45
  * If true, the field takes the full width of the parent
61
46
  */
@@ -88,4 +73,3 @@ export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label'
88
73
  left?: boolean;
89
74
  };
90
75
  }
91
- export {};
@@ -1,7 +1,7 @@
1
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
- color: "var(--Y500)" | "var(--R500)" | "var(--G500)" | "var(--O500)" | "var(--N300)" | "var(--R700)";
4
+ color: "var(--N300)" | "var(--R700)" | "var(--R500)" | "var(--O500)" | "var(--Y500)" | "var(--G500)";
5
5
  label: "Critical" | "High" | "Medium" | "Low" | "Unknown" | "Failures" | "Successes" | "Exceptions";
6
6
  value: number;
7
7
  }[];
@@ -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, shouldRenderTextArea, onKeyDown, shouldHideMenu, warningText, layout, ariaLabel, borderRadiusConfig, labelTippyCustomizedConfig, labelTooltipConfig, ...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, warningText, layout, ariaLabel, borderRadiusConfig, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -1,6 +1,8 @@
1
1
  interface ShowMoreTextProps {
2
2
  text: string;
3
3
  textClass?: string;
4
+ containerClass?: string;
5
+ hideShowMore?: boolean;
4
6
  }
5
- declare const ShowMoreText: ({ text, textClass }: ShowMoreTextProps) => JSX.Element;
7
+ declare const ShowMoreText: ({ text, textClass, containerClass, hideShowMore }: ShowMoreTextProps) => JSX.Element;
6
8
  export default ShowMoreText;
@@ -1,3 +1,3 @@
1
1
  import { TextareaProps } from './types';
2
- declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, labelTooltipConfig, labelTippyCustomizedConfig, ...props }: TextareaProps) => JSX.Element;
2
+ declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, ...props }: TextareaProps) => JSX.Element;
3
3
  export default Textarea;
@@ -60,4 +60,3 @@ export * from './ThemeSwitcher';
60
60
  export * from './TargetPlatforms';
61
61
  export * from './UnsavedChanges';
62
62
  export * from './UnsavedChangesDialog';
63
- export * from './CustomInput';