@devtron-labs/devtron-fe-common-lib 1.16.0-pre-0 → 1.16.0-pre-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{@code-editor-NdRFOYui.js → @code-editor-DkBUhnYk.js} +6649 -6545
- package/dist/{@common-rjsf-BbpJlJFb.js → @common-rjsf-CHMkkFA8.js} +2 -2
- package/dist/{@framer-motion-DjiCMNqQ.js → @framer-motion-j6RIjEIR.js} +1 -1
- package/dist/{@react-dates-CfRo6n5e.js → @react-dates-BVyHiOGU.js} +1 -1
- package/dist/{@react-select-DNDV8S9D.js → @react-select-BQNFZu0Y.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-mXcyQzGx.js → @react-virtualized-sticky-tree-CuElh0mS.js} +1 -1
- package/dist/{@vendor-CA9d7Ztm.js → @vendor-DbxoIktR.js} +15023 -15018
- package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/constants.d.ts +8 -0
- package/dist/Shared/Components/ActionMenu/useActionMenu.hook.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/index.d.ts +1 -0
- package/dist/Shared/Components/Backdrop/types.d.ts +28 -2
- package/dist/Shared/Components/Backdrop/utils.d.ts +1 -0
- package/dist/Shared/Components/Button/types.d.ts +2 -2
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +1 -1
- package/dist/Shared/Components/GenericModal/GenericModal.component.d.ts +9 -0
- package/dist/Shared/Components/GenericModal/GenericModal.context.d.ts +6 -0
- package/dist/Shared/Components/GenericModal/constants.d.ts +2 -0
- package/dist/Shared/Components/GenericModal/index.d.ts +2 -0
- package/dist/Shared/Components/GenericModal/types.d.ts +37 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +5 -1
- package/dist/Shared/Components/InvalidYAMLTippy/types.d.ts +1 -1
- package/dist/Shared/Components/Popover/types.d.ts +3 -2
- package/dist/Shared/Components/Popover/utils.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/common.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +1 -1
- package/dist/Shared/Components/TargetPlatforms/types.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/SourceTypeCard.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/WorkflowOptionsModal.d.ts +1 -1
- package/dist/Shared/Components/WorkflowOptionsModal/constants.d.ts +75 -41
- package/dist/Shared/Components/WorkflowOptionsModal/index.d.ts +1 -0
- package/dist/Shared/Components/WorkflowOptionsModal/types.d.ts +10 -12
- package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +13 -2
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/types.d.ts +2 -1
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/ic-deploy-color.73a8df48.svg +14 -0
- package/dist/assets/ic-deploy-sync.6b1cf1b1.svg +16 -0
- package/dist/assets/ic-git-branch.d6b3d950.svg +3 -0
- package/dist/assets/ic-linked-build-color.d1df5ce1.svg +7 -0
- package/dist/assets/ic-webhook.ffd8ded6.svg +21 -0
- package/dist/assets/workflow-options-modal-header.0444485e.svg +38 -0
- package/dist/index.js +651 -649
- package/package.json +2 -1
- package/dist/assets/change-source.abc9d12f.png +0 -0
- package/dist/assets/ic-ci-webhook.a2ab6db6.svg +0 -42
- package/dist/assets/ic-source-build.7d776b10.svg +0 -22
- package/dist/assets/ic-source-job.a40f06cf.svg +0 -26
- package/dist/assets/ic-source-linked-build.f24ecbed.svg +0 -24
- package/dist/assets/ic-source-webhook.ee64a29a.svg +0 -22
- package/dist/assets/select-image-source.fb911f42.png +0 -0
@@ -1,3 +1,11 @@
|
|
1
1
|
import { SelectPickerOptionType } from '../../../../../Shared/Components';
|
2
2
|
export declare const IO_VARIABLES_VALUE_COLUMN_BOOL_OPTIONS: SelectPickerOptionType<string>[];
|
3
3
|
export declare const IO_VARIABLES_VALUE_COLUMN_DATE_OPTIONS: SelectPickerOptionType<string>[];
|
4
|
+
export declare const VALUE_COLUMN_DROPDOWN_LABEL: {
|
5
|
+
readonly CHOICES: "Choices";
|
6
|
+
readonly SUPPORTED_DATE_FORMATS: "Supported date formats";
|
7
|
+
readonly SYSTEM_VARIABLES: "System variables";
|
8
|
+
readonly PRE_BUILD_STAGE: "From Pre-build Stage";
|
9
|
+
readonly POST_BUILD_STAGE: "From Post-build Stage";
|
10
|
+
readonly PREVIOUS_STEPS: "From Previous Steps";
|
11
|
+
};
|
@@ -13,7 +13,7 @@ export declare const useActionMenu: <T extends string | number>({ id, position,
|
|
13
13
|
triggerProps: import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & {
|
14
14
|
bounds: Pick<DOMRect, "left" | "top" | "height" | "width">;
|
15
15
|
};
|
16
|
-
overlayProps:
|
16
|
+
overlayProps: Omit<import('..').BackdropProps, "children">;
|
17
17
|
popoverProps: {
|
18
18
|
slot?: string;
|
19
19
|
title?: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { BackdropProps } from './types';
|
2
|
-
declare const Backdrop: ({ children, onEscape }: BackdropProps) => import('react').ReactPortal;
|
2
|
+
declare const Backdrop: ({ children, onEscape, onClick, hasClearBackground, onBackdropMount }: BackdropProps) => import('react').ReactPortal;
|
3
3
|
export default Backdrop;
|
@@ -1,8 +1,34 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
2
2
|
export interface BackdropProps {
|
3
|
+
/**
|
4
|
+
* The content to be rendered within the backdrop component.
|
5
|
+
*/
|
3
6
|
children: ReactNode;
|
4
7
|
/**
|
5
|
-
*
|
8
|
+
* Callback function that gets triggered when the Escape key is pressed. \
|
9
|
+
* Should be wrapped in useCallback to prevent unnecessary re-renders.
|
10
|
+
* @example
|
11
|
+
* const handleEscape = useCallback(() => {
|
12
|
+
* // Handle escape key press
|
13
|
+
* }, []);
|
6
14
|
*/
|
7
15
|
onEscape: () => void;
|
16
|
+
/**
|
17
|
+
* Callback function that gets triggered when the backdrop is clicked.
|
18
|
+
* Useful for dismissing modals or other overlay content.
|
19
|
+
* @param e - The mouse event object from the click interaction
|
20
|
+
*/
|
21
|
+
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
22
|
+
/**
|
23
|
+
* Determines if the backdrop should be transparent.
|
24
|
+
* When true, the backdrop will not have any background color or blur filter.
|
25
|
+
* @default false
|
26
|
+
*/
|
27
|
+
hasClearBackground?: boolean;
|
28
|
+
/**
|
29
|
+
* Callback function that gets triggered when the backdrop component mounts or unmounts.
|
30
|
+
* This can be used to perform side effects or state updates when the backdrop's visibility changes.
|
31
|
+
* @param isMounted - A boolean indicating whether the backdrop is currently mounted (true) or not (false)
|
32
|
+
*/
|
33
|
+
onBackdropMount?: (isMounted: boolean) => void;
|
8
34
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const createPortalContainerAndAppendToDOM: (portalContainerId: string) => HTMLDivElement;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactElement } from 'react';
|
2
2
|
import { LinkProps } from 'react-router-dom';
|
3
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
3
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
4
4
|
import { ComponentSizeType } from '../../constants';
|
5
5
|
export declare enum ButtonVariantType {
|
6
6
|
primary = "primary",
|
@@ -112,7 +112,7 @@ export type ButtonProps<ComponentType extends ButtonComponentType = ButtonCompon
|
|
112
112
|
/**
|
113
113
|
* If true, the tooltip is shown for the button
|
114
114
|
*/
|
115
|
-
showTooltip
|
115
|
+
showTooltip?: boolean;
|
116
116
|
/**
|
117
117
|
* Props for tooltip
|
118
118
|
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
|
2
2
|
import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
|
3
3
|
import { UseStateFiltersReturnType } from '../../../Common/Hooks';
|
4
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
4
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
5
5
|
import { FileUploadProps } from '../FileUpload';
|
6
6
|
import { SelectPickerOptionType, SelectPickerProps, SelectPickerTextAreaProps } from '../SelectPicker';
|
7
7
|
/**
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { GenericModalFooterProps, GenericModalHeaderProps, GenericModalProps } from './types';
|
3
|
+
declare const GenericModal: {
|
4
|
+
({ name, open, width, onClose, onEscape, closeOnBackdropClick, children, }: PropsWithChildren<GenericModalProps>): JSX.Element;
|
5
|
+
Header: ({ title }: GenericModalHeaderProps) => JSX.Element;
|
6
|
+
Body: ({ children }: PropsWithChildren<{}>) => JSX.Element;
|
7
|
+
Footer: ({ leftSideElement, buttonConfig, children, }: PropsWithChildren<GenericModalFooterProps>) => JSX.Element;
|
8
|
+
};
|
9
|
+
export default GenericModal;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { GenericModalContextType } from './types';
|
3
|
+
export declare const GenericModalProvider: ({ value, children }: PropsWithChildren<{
|
4
|
+
value: GenericModalContextType;
|
5
|
+
}>) => JSX.Element;
|
6
|
+
export declare const useGenericModalContext: () => GenericModalContextType;
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { BackdropProps } from '../Backdrop';
|
2
|
+
import { ButtonProps } from '../Button';
|
3
|
+
export interface GenericModalProps extends Partial<Pick<BackdropProps, 'onEscape'>> {
|
4
|
+
/** Unique identifier for the modal */
|
5
|
+
name: string;
|
6
|
+
/** Controls whether the modal is visible or hidden */
|
7
|
+
open: boolean;
|
8
|
+
/** Callback function triggered when the modal is closed */
|
9
|
+
onClose: () => void;
|
10
|
+
/**
|
11
|
+
* Width of the modal (in pixels).
|
12
|
+
* @default 600
|
13
|
+
*/
|
14
|
+
width?: 500 | 600 | 800;
|
15
|
+
/**
|
16
|
+
* Determines if the modal should close when the user clicks outside of it (on the backdrop).
|
17
|
+
* @default false
|
18
|
+
*/
|
19
|
+
closeOnBackdropClick?: boolean;
|
20
|
+
}
|
21
|
+
export interface GenericModalContextType extends Pick<GenericModalProps, 'name' | 'onClose'> {
|
22
|
+
}
|
23
|
+
export interface GenericModalHeaderProps {
|
24
|
+
/** Title text displayed in the modal header */
|
25
|
+
title: string;
|
26
|
+
}
|
27
|
+
export interface GenericModalFooterProps {
|
28
|
+
/** Configuration for the buttons displayed in the modal footer */
|
29
|
+
buttonConfig?: {
|
30
|
+
/** Properties for the primary action button */
|
31
|
+
primaryButton?: ButtonProps;
|
32
|
+
/** Properties for the secondary action button */
|
33
|
+
secondaryButton?: ButtonProps;
|
34
|
+
};
|
35
|
+
/** Optional element to be displayed on the left side of the footer */
|
36
|
+
leftSideElement?: React.ReactNode;
|
37
|
+
}
|
@@ -35,7 +35,6 @@ export declare const iconMap: {
|
|
35
35
|
'ic-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
36
|
'ic-checks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
37
37
|
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
38
|
-
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
39
38
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
39
|
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
41
40
|
'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -54,6 +53,8 @@ export declare const iconMap: {
|
|
54
53
|
'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
55
54
|
'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
56
55
|
'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
56
|
+
'ic-deploy-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
57
|
+
'ic-deploy-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
57
58
|
'ic-devtron-ai': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
58
59
|
'ic-devtron-app': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
59
60
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -87,6 +88,7 @@ export declare const iconMap: {
|
|
87
88
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
88
89
|
'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
89
90
|
'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
91
|
+
'ic-git-branch': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
90
92
|
'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
91
93
|
'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
92
94
|
'ic-gitlab': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -119,6 +121,7 @@ export declare const iconMap: {
|
|
119
121
|
'ic-lego': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
120
122
|
'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
121
123
|
'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
124
|
+
'ic-linked-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
122
125
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
123
126
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
124
127
|
'ic-magnifying-glass': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -193,6 +196,7 @@ export declare const iconMap: {
|
|
193
196
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
194
197
|
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
195
198
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
199
|
+
'ic-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
196
200
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
197
201
|
'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
198
202
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { DetailedHTMLProps, KeyboardEvent, LegacyRef, MutableRefObject, ReactElement } from 'react';
|
2
2
|
import { HTMLMotionProps } from 'framer-motion';
|
3
|
+
import { BackdropProps } from '../Backdrop';
|
3
4
|
import { ButtonProps } from '../Button';
|
4
5
|
export interface UsePopoverProps {
|
5
6
|
/**
|
@@ -74,9 +75,9 @@ export interface UsePopoverReturnType {
|
|
74
75
|
};
|
75
76
|
/**
|
76
77
|
* Props to be spread onto the overlay element of the popover.
|
77
|
-
* These props include
|
78
|
+
* These props include backdrop properties.
|
78
79
|
*/
|
79
|
-
overlayProps:
|
80
|
+
overlayProps: Omit<BackdropProps, 'children'>;
|
80
81
|
/**
|
81
82
|
* Props to be spread onto the popover element itself.
|
82
83
|
* Includes motion-related props for animations and a `ref` to the popover's `div` element.
|
@@ -88,5 +88,5 @@ export declare const getPopoverActualPositionAlignment: ({ position, alignment,
|
|
88
88
|
popoverRect: DOMRect;
|
89
89
|
}) => {
|
90
90
|
fallbackPosition: "top" | "bottom" | "right" | "left";
|
91
|
-
fallbackAlignment: "
|
91
|
+
fallbackAlignment: "middle" | "end" | "start";
|
92
92
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ClearIndicatorProps, ControlProps, DropdownIndicatorProps, InputProps, MenuListProps, MultiValueProps, MultiValueRemoveProps, OptionProps, ValueContainerProps } from 'react-select';
|
2
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
2
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
3
3
|
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
|
4
4
|
export declare const getTooltipProps: (tooltipProps?: SelectPickerOptionType["tooltipProps"]) => TooltipProps;
|
5
5
|
export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
|
@@ -3,7 +3,7 @@ import { GroupBase, GroupHeadingProps, Props as ReactSelectProps, SelectInstance
|
|
3
3
|
import { CreatableProps } from 'react-select/creatable';
|
4
4
|
import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
|
5
5
|
import { ServerErrors } from '../../../Common/ServerError';
|
6
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
6
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
7
7
|
import { OptionType } from '../../../Common/Types';
|
8
8
|
import { ComponentSizeType } from '../../constants';
|
9
9
|
import { ButtonComponentType, ButtonProps, ButtonVariantType } from '../Button';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
2
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
2
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
3
3
|
import { ComponentSizeType } from '../../constants';
|
4
4
|
import { DataAttributes } from '../../types';
|
5
5
|
import { IconName } from '../Icon';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { TooltipProps } from '../../../Common/Tooltip
|
1
|
+
import { TooltipProps } from '../../../Common/Tooltip';
|
2
2
|
import { TargetPlatformsDTO } from '../../types';
|
3
3
|
export interface TargetPlatformBadgeListProps extends Required<Pick<TargetPlatformsDTO, 'targetPlatforms'>> {
|
4
4
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { SourceTypeCardProps } from './types';
|
2
|
-
declare const SourceTypeCard: ({ title, subtitle,
|
2
|
+
declare const SourceTypeCard: ({ title, subtitle, dataTestId, icons, type, disableInfo, disabled, onCardAction, }: SourceTypeCardProps) => JSX.Element;
|
3
3
|
export default SourceTypeCard;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { WorkflowOptionsModalProps } from './types';
|
2
|
-
declare const WorkflowOptionsModal: ({
|
2
|
+
declare const WorkflowOptionsModal: ({ open, addCIPipeline, addWebhookCD, addLinkedCD, showLinkedCDSource, changeCIPayload, workflows, getWorkflows, resetChangeCIPayload, linkedCDSourceVariant, isAppGroup, isTemplateView, onClose, }: Readonly<WorkflowOptionsModalProps>) => JSX.Element;
|
3
3
|
export default WorkflowOptionsModal;
|
@@ -1,52 +1,86 @@
|
|
1
|
-
import {
|
1
|
+
import { WorkflowNodeType } from '../../../Common/Types';
|
2
2
|
import { CIPipelineNodeType } from '../../types';
|
3
|
-
export declare const WORKFLOW_OPTIONS_MODAL: {
|
4
|
-
ACTION_TEXT: string;
|
5
|
-
ACTION_NOTE: string;
|
6
|
-
CHANGE_CI_TEXT: string;
|
7
|
-
CHANGE_CI_NOTE: string;
|
8
|
-
};
|
9
|
-
export declare const WORKFLOW_OPTIONS_MODAL_TYPES: {
|
10
|
-
DEFAULT: string;
|
11
|
-
RECIEVE: string;
|
12
|
-
JOB: string;
|
13
|
-
};
|
14
3
|
export declare const SOURCE_TYPE_CARD_VARIANTS: {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
4
|
+
BUILD: {
|
5
|
+
BUILD_AND_DEPLOY_FROM_SOURCE_CODE: {
|
6
|
+
title: string;
|
7
|
+
subtitle: string;
|
8
|
+
dataTestId: string;
|
9
|
+
type: CIPipelineNodeType.CI_CD;
|
10
|
+
icons: ({
|
11
|
+
name: "ic-git-branch";
|
12
|
+
color: "N700";
|
13
|
+
} | {
|
14
|
+
name: "ic-build-color";
|
15
|
+
color: any;
|
16
|
+
} | {
|
17
|
+
name: "ic-deploy-color";
|
18
|
+
color: any;
|
19
|
+
})[];
|
20
|
+
};
|
21
|
+
BUILD_FROM_SOURCE_CODE: {
|
22
|
+
title: string;
|
23
|
+
subtitle: string;
|
24
|
+
dataTestId: string;
|
25
|
+
type: CIPipelineNodeType.CI;
|
26
|
+
icons: ({
|
27
|
+
name: "ic-git-branch";
|
28
|
+
color: "N700";
|
29
|
+
} | {
|
30
|
+
name: "ic-build-color";
|
31
|
+
color: any;
|
32
|
+
})[];
|
33
|
+
};
|
34
|
+
JOB: {
|
35
|
+
title: string;
|
36
|
+
subtitle: string;
|
37
|
+
dataTestId: string;
|
38
|
+
type: CIPipelineNodeType.JOB_CI;
|
39
|
+
icons: {
|
40
|
+
name: "ic-job-color";
|
41
|
+
color: any;
|
42
|
+
}[];
|
43
|
+
};
|
30
44
|
};
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
45
|
+
RECEIVE: {
|
46
|
+
EXTERNAL_SERVICE: {
|
47
|
+
title: string;
|
48
|
+
subtitle: string;
|
49
|
+
dataTestId: string;
|
50
|
+
type: WorkflowNodeType.WEBHOOK;
|
51
|
+
icons: ({
|
52
|
+
name: "ic-webhook";
|
53
|
+
color: any;
|
54
|
+
} | {
|
55
|
+
name: "ic-deploy-color";
|
56
|
+
color: any;
|
57
|
+
})[];
|
58
|
+
};
|
59
|
+
LINKED_PIPELINE: {
|
60
|
+
title: string;
|
61
|
+
subtitle: string;
|
62
|
+
dataTestId: string;
|
63
|
+
type: CIPipelineNodeType.LINKED_CI;
|
64
|
+
icons: {
|
65
|
+
name: "ic-linked-build-color";
|
66
|
+
color: any;
|
67
|
+
}[];
|
68
|
+
};
|
38
69
|
};
|
39
70
|
JOB: {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
71
|
+
JOB: {
|
72
|
+
title: string;
|
73
|
+
subtitle: string;
|
74
|
+
dataTestId: string;
|
75
|
+
type: CIPipelineNodeType.JOB_CI;
|
76
|
+
icons: {
|
77
|
+
name: "ic-job-color";
|
78
|
+
color: any;
|
79
|
+
}[];
|
80
|
+
};
|
46
81
|
};
|
47
82
|
};
|
48
83
|
export declare const NO_ENV_FOUND = "No environment found. Please create a CD Pipeline first.";
|
49
|
-
export declare const CHANGE_SAME_CI = "Cannot change to same source type";
|
50
84
|
export declare const REQUEST_IN_PROGRESS = "Request in progress";
|
51
85
|
export declare const TOAST_MESSAGES: {
|
52
86
|
SUCCESS_CHANGE_TO_WEBHOOK: string;
|
@@ -1,20 +1,19 @@
|
|
1
|
+
import { WorkflowNodeType } from '../../../Common/Types';
|
1
2
|
import { ChangeCIPayloadType, CIPipelineNodeType, WorkflowType } from '../../types';
|
2
3
|
import { AppConfigProps } from '../../../Pages/index';
|
3
|
-
|
4
|
+
import { GenericModalProps } from '../GenericModal';
|
5
|
+
import { IconsProps } from '../Icon';
|
6
|
+
export interface SourceTypeCardProps {
|
4
7
|
title: string;
|
5
8
|
subtitle: string;
|
6
|
-
image: string;
|
7
|
-
alt: string;
|
8
9
|
dataTestId: string;
|
9
|
-
type:
|
10
|
-
|
11
|
-
export interface SourceTypeCardProps extends LinkedCDSourceVariant {
|
12
|
-
handleCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
10
|
+
type: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
11
|
+
disabled?: boolean;
|
13
12
|
disableInfo: string;
|
14
|
-
|
13
|
+
icons: Pick<IconsProps, 'name' | 'color'>[];
|
14
|
+
onCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
15
15
|
}
|
16
|
-
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'
|
17
|
-
handleCloseWorkflowOptionsModal: () => void;
|
16
|
+
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'>>, Pick<GenericModalProps, 'open' | 'onClose'> {
|
18
17
|
addCIPipeline: (type: CIPipelineNodeType, workflowId?: number | string) => void;
|
19
18
|
addWebhookCD: (workflowId?: number | string) => void;
|
20
19
|
addLinkedCD: (changeCIPayload?: ChangeCIPayloadType) => void;
|
@@ -23,7 +22,6 @@ export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps,
|
|
23
22
|
changeCIPayload?: ChangeCIPayloadType;
|
24
23
|
workflows?: WorkflowType[];
|
25
24
|
getWorkflows?: () => void;
|
26
|
-
linkedCDSourceVariant?:
|
25
|
+
linkedCDSourceVariant?: Pick<SourceTypeCardProps, 'title' | 'subtitle' | 'type' | 'icons' | 'dataTestId'>;
|
27
26
|
isAppGroup?: boolean;
|
28
27
|
}
|
29
|
-
export {};
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { PipelineType } from '../../../Common/Types';
|
2
|
-
import { ChangeCIPayloadType } from '../../types';
|
1
|
+
import { PipelineType, WorkflowNodeType } from '../../../Common/Types';
|
2
|
+
import { ChangeCIPayloadType, CIPipelineNodeType } from '../../types';
|
3
|
+
import { SourceTypeCardProps, WorkflowOptionsModalProps } from './types';
|
3
4
|
export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloadType) => {
|
4
5
|
appId: number;
|
5
6
|
pipelines: {
|
@@ -12,3 +13,13 @@ export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloa
|
|
12
13
|
switchFromCiPipelineId: number;
|
13
14
|
}[];
|
14
15
|
};
|
16
|
+
export declare const getCurrentPipelineType: ({ workflows, changeCIPayload, }: Required<Pick<WorkflowOptionsModalProps, "workflows" | "changeCIPayload">>) => SourceTypeCardProps["type"];
|
17
|
+
export declare const getBuildWorkflowCardsConfig: ({ currentPipelineType, changeCIPayload, isAppGroup, }: {
|
18
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
19
|
+
} & Required<Pick<WorkflowOptionsModalProps, "changeCIPayload" | "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
20
|
+
export declare const getReceiveWorkflowCardsConfig: ({ currentPipelineType, linkedCDSourceVariant, isAppGroup, }: {
|
21
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
22
|
+
} & Required<Pick<WorkflowOptionsModalProps, "linkedCDSourceVariant" | "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
23
|
+
export declare const getJobWorkflowCardsConfig: ({ currentPipelineType, isAppGroup, }: {
|
24
|
+
currentPipelineType: CIPipelineNodeType | WorkflowNodeType.WEBHOOK;
|
25
|
+
} & Required<Pick<WorkflowOptionsModalProps, "isAppGroup">>) => Pick<SourceTypeCardProps, "title" | "dataTestId" | "disabled" | "type" | "subtitle" | "icons">[];
|
@@ -41,6 +41,7 @@ export * from './FlagImage';
|
|
41
41
|
export * from './FloatingVariablesSuggestions';
|
42
42
|
export * from './FramerComponents';
|
43
43
|
export * from './GenericInfoCard';
|
44
|
+
export * from './GenericModal';
|
44
45
|
export * from './GenericSectionErrorState';
|
45
46
|
export * from './GitCommitInfoGeneric';
|
46
47
|
export * from './GitProviderIcon';
|
package/dist/Shared/types.d.ts
CHANGED
@@ -876,7 +876,8 @@ export declare enum CIPipelineNodeType {
|
|
876
876
|
CI = "CI",
|
877
877
|
LINKED_CI = "LINKED-CI",
|
878
878
|
JOB_CI = "JOB-CI",
|
879
|
-
LINKED_CD = "LINKED_CD"
|
879
|
+
LINKED_CD = "LINKED_CD",
|
880
|
+
CI_CD = "CI_CD"
|
880
881
|
}
|
881
882
|
export interface ChangeCIPayloadType {
|
882
883
|
appWorkflowId: number;
|