@devtron-labs/devtron-fe-common-lib 1.15.3-beta-1 → 1.15.3-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.
- package/dist/{@code-editor-Bd6MuRxN.js → @code-editor-Dz8a1qww.js} +7174 -7241
- package/dist/{@common-rjsf-DPDULtgg.js → @common-rjsf-ISOYbod5.js} +1 -1
- package/dist/Shared/Components/Backdrop/Backdrop.d.ts +1 -1
- package/dist/Shared/Components/Backdrop/index.d.ts +0 -1
- package/dist/Shared/Components/Backdrop/types.d.ts +2 -16
- package/dist/Shared/Components/Button/types.d.ts +2 -2
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +1 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +1 -5
- package/dist/Shared/Components/InvalidYAMLTippy/types.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 +41 -75
- package/dist/Shared/Components/WorkflowOptionsModal/index.d.ts +0 -1
- package/dist/Shared/Components/WorkflowOptionsModal/types.d.ts +12 -10
- package/dist/Shared/Components/WorkflowOptionsModal/utils.d.ts +2 -13
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Hooks/useUserPreferences/service.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/types.d.ts +17 -7
- package/dist/Shared/Hooks/useUserPreferences/useUserPrefrences.d.ts +1 -1
- package/dist/Shared/Hooks/useUserPreferences/utils.d.ts +3 -2
- package/dist/Shared/types.d.ts +3 -3
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/change-source.abc9d12f.png +0 -0
- package/dist/assets/ic-ci-webhook.a2ab6db6.svg +42 -0
- package/dist/assets/ic-source-build.7d776b10.svg +22 -0
- package/dist/assets/ic-source-job.a40f06cf.svg +26 -0
- package/dist/assets/ic-source-linked-build.f24ecbed.svg +24 -0
- package/dist/assets/ic-source-webhook.ee64a29a.svg +22 -0
- package/dist/assets/select-image-source.fb911f42.png +0 -0
- package/dist/index.js +633 -634
- package/package.json +1 -1
- package/dist/Shared/Components/Backdrop/utils.d.ts +0 -1
- package/dist/Shared/Components/GenericModal/GenericModal.component.d.ts +0 -9
- package/dist/Shared/Components/GenericModal/GenericModal.context.d.ts +0 -6
- package/dist/Shared/Components/GenericModal/constants.d.ts +0 -2
- package/dist/Shared/Components/GenericModal/index.d.ts +0 -2
- package/dist/Shared/Components/GenericModal/types.d.ts +0 -37
- package/dist/assets/ic-deploy-color.73a8df48.svg +0 -14
- package/dist/assets/ic-deploy-sync.6b1cf1b1.svg +0 -16
- package/dist/assets/ic-git-branch.d6b3d950.svg +0 -3
- package/dist/assets/ic-linked-build-color.d1df5ce1.svg +0 -7
- package/dist/assets/ic-webhook.ffd8ded6.svg +0 -21
- package/dist/assets/workflow-options-modal-header.0444485e.svg +0 -38
@@ -1,7 +1,7 @@
|
|
1
1
|
import { j as n, as as b, au as k, at as W } from "./@vendor-CA9d7Ztm.js";
|
2
2
|
import V, { forwardRef as J, useMemo as P } from "react";
|
3
3
|
import K, { getDefaultRegistry as q } from "@rjsf/core";
|
4
|
-
import { T as F, j as N, c as v, b as S, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-
|
4
|
+
import { T as F, j as N, c as v, b as S, S as Y, i as z, a as w, d as A, e as G } from "./@code-editor-Dz8a1qww.js";
|
5
5
|
import Q, { components as D } from "react-select";
|
6
6
|
import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
7
7
|
import { getUiOptions as $, getTemplate as B, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as ae, deepEquals as se } from "@rjsf/utils";
|
@@ -1,22 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
export interface BackdropProps {
|
3
|
-
/**
|
4
|
-
* The content to be rendered within the backdrop component.
|
5
|
-
*/
|
6
3
|
children: ReactNode;
|
7
4
|
/**
|
8
|
-
*
|
9
|
-
* Should be wrapped in useCallback to prevent unnecessary re-renders.
|
10
|
-
* @example
|
11
|
-
* const handleEscape = useCallback(() => {
|
12
|
-
* // Handle escape key press
|
13
|
-
* }, []);
|
5
|
+
* @param onEscape: please wrap in a useCallback, with respective dependencies or []
|
14
6
|
*/
|
15
7
|
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
8
|
}
|
@@ -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/types';
|
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/types';
|
5
5
|
import { FileUploadProps } from '../FileUpload';
|
6
6
|
import { SelectPickerOptionType, SelectPickerProps, SelectPickerTextAreaProps } from '../SelectPicker';
|
7
7
|
/**
|
@@ -35,6 +35,7 @@ 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>>;
|
38
39
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
39
40
|
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
41
|
'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -53,8 +54,6 @@ export declare const iconMap: {
|
|
53
54
|
'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
54
55
|
'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
55
56
|
'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>>;
|
58
57
|
'ic-devtron-ai': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
59
58
|
'ic-devtron-app': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
60
59
|
'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -88,7 +87,6 @@ export declare const iconMap: {
|
|
88
87
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
89
88
|
'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
90
89
|
'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
91
|
-
'ic-git-branch': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
92
90
|
'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
93
91
|
'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
94
92
|
'ic-gitlab': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -121,7 +119,6 @@ export declare const iconMap: {
|
|
121
119
|
'ic-lego': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
122
120
|
'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
123
121
|
'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
124
|
-
'ic-linked-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
125
122
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
126
123
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
127
124
|
'ic-magnifying-glass': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -196,7 +193,6 @@ export declare const iconMap: {
|
|
196
193
|
'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
197
194
|
'ic-view-variable-toggle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
198
195
|
'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
199
|
-
'ic-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
200
196
|
'ic-wifi-slash': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
201
197
|
'ic-world-globe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
202
198
|
};
|
@@ -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/types';
|
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/types';
|
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/types';
|
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/types';
|
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, image, alt, dataTestId, type, handleCardAction, disableInfo, isDisabled, }: Readonly<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: ({ handleCloseWorkflowOptionsModal, addCIPipeline, addWebhookCD, addLinkedCD, showLinkedCDSource, changeCIPayload, workflows, getWorkflows, resetChangeCIPayload, linkedCDSourceVariant, isAppGroup, isTemplateView, }: Readonly<WorkflowOptionsModalProps>) => JSX.Element;
|
3
3
|
export default WorkflowOptionsModal;
|
@@ -1,86 +1,52 @@
|
|
1
|
-
import {
|
1
|
+
import { PipelineType } 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
|
+
};
|
3
14
|
export declare const SOURCE_TYPE_CARD_VARIANTS: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
};
|
15
|
+
SOURCE_CODE: {
|
16
|
+
title: string;
|
17
|
+
subtitle: string;
|
18
|
+
image: string;
|
19
|
+
alt: string;
|
20
|
+
dataTestId: string;
|
21
|
+
type: CIPipelineNodeType;
|
22
|
+
};
|
23
|
+
LINKED_PIPELINE: {
|
24
|
+
title: string;
|
25
|
+
subtitle: string;
|
26
|
+
image: string;
|
27
|
+
alt: string;
|
28
|
+
dataTestId: string;
|
29
|
+
type: CIPipelineNodeType;
|
44
30
|
};
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
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
|
-
};
|
31
|
+
EXTERNAL_SERVICE: {
|
32
|
+
title: string;
|
33
|
+
subtitle: string;
|
34
|
+
image: string;
|
35
|
+
alt: string;
|
36
|
+
dataTestId: string;
|
37
|
+
type: PipelineType;
|
69
38
|
};
|
70
39
|
JOB: {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
name: "ic-job-color";
|
78
|
-
color: any;
|
79
|
-
}[];
|
80
|
-
};
|
40
|
+
title: string;
|
41
|
+
subtitle: string;
|
42
|
+
image: string;
|
43
|
+
alt: string;
|
44
|
+
dataTestId: string;
|
45
|
+
type: CIPipelineNodeType;
|
81
46
|
};
|
82
47
|
};
|
83
48
|
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";
|
84
50
|
export declare const REQUEST_IN_PROGRESS = "Request in progress";
|
85
51
|
export declare const TOAST_MESSAGES: {
|
86
52
|
SUCCESS_CHANGE_TO_WEBHOOK: string;
|
@@ -1,19 +1,20 @@
|
|
1
|
-
import { WorkflowNodeType } from '../../../Common/Types';
|
2
1
|
import { ChangeCIPayloadType, CIPipelineNodeType, WorkflowType } from '../../types';
|
3
2
|
import { AppConfigProps } from '../../../Pages/index';
|
4
|
-
|
5
|
-
import { IconsProps } from '../Icon';
|
6
|
-
export interface SourceTypeCardProps {
|
3
|
+
interface LinkedCDSourceVariant {
|
7
4
|
title: string;
|
8
5
|
subtitle: string;
|
6
|
+
image: string;
|
7
|
+
alt: string;
|
9
8
|
dataTestId: string;
|
10
|
-
type:
|
11
|
-
|
9
|
+
type: string;
|
10
|
+
}
|
11
|
+
export interface SourceTypeCardProps extends LinkedCDSourceVariant {
|
12
|
+
handleCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
12
13
|
disableInfo: string;
|
13
|
-
|
14
|
-
onCardAction: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
14
|
+
isDisabled?: boolean;
|
15
15
|
}
|
16
|
-
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'
|
16
|
+
export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps, 'isTemplateView'>> {
|
17
|
+
handleCloseWorkflowOptionsModal: () => void;
|
17
18
|
addCIPipeline: (type: CIPipelineNodeType, workflowId?: number | string) => void;
|
18
19
|
addWebhookCD: (workflowId?: number | string) => void;
|
19
20
|
addLinkedCD: (changeCIPayload?: ChangeCIPayloadType) => void;
|
@@ -22,6 +23,7 @@ export interface WorkflowOptionsModalProps extends Required<Pick<AppConfigProps,
|
|
22
23
|
changeCIPayload?: ChangeCIPayloadType;
|
23
24
|
workflows?: WorkflowType[];
|
24
25
|
getWorkflows?: () => void;
|
25
|
-
linkedCDSourceVariant?:
|
26
|
+
linkedCDSourceVariant?: LinkedCDSourceVariant;
|
26
27
|
isAppGroup?: boolean;
|
27
28
|
}
|
29
|
+
export {};
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { PipelineType
|
2
|
-
import { ChangeCIPayloadType
|
3
|
-
import { SourceTypeCardProps, WorkflowOptionsModalProps } from './types';
|
1
|
+
import { PipelineType } from '../../../Common/Types';
|
2
|
+
import { ChangeCIPayloadType } from '../../types';
|
4
3
|
export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloadType) => {
|
5
4
|
appId: number;
|
6
5
|
pipelines: {
|
@@ -13,13 +12,3 @@ export declare const getSwitchToWebhookPayload: (changeCIPayload: ChangeCIPayloa
|
|
13
12
|
switchFromCiPipelineId: number;
|
14
13
|
}[];
|
15
14
|
};
|
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,7 +41,6 @@ export * from './FlagImage';
|
|
41
41
|
export * from './FloatingVariablesSuggestions';
|
42
42
|
export * from './FramerComponents';
|
43
43
|
export * from './GenericInfoCard';
|
44
|
-
export * from './GenericModal';
|
45
44
|
export * from './GenericSectionErrorState';
|
46
45
|
export * from './GitCommitInfoGeneric';
|
47
46
|
export * from './GitProviderIcon';
|
@@ -5,4 +5,4 @@ import { UserPreferenceResourceProps, UserPreferencesType } from './types';
|
|
5
5
|
* @throws Will throw an error if the request fails or if the result is not in the expected format.
|
6
6
|
*/
|
7
7
|
export declare const getUserPreferences: () => Promise<UserPreferencesType>;
|
8
|
-
export declare const updateUserPreferences: ({ path, value, shouldThrowError, }: UserPreferenceResourceProps) => Promise<boolean>;
|
8
|
+
export declare const updateUserPreferences: ({ path, value, resourceKind, shouldThrowError, userPreferencesResponse, }: UserPreferenceResourceProps) => Promise<boolean>;
|
@@ -12,12 +12,18 @@ export declare enum ViewIsPipelineRBACConfiguredRadioTabs {
|
|
12
12
|
export declare enum UserPreferenceResourceActions {
|
13
13
|
RECENTLY_VISITED = "recently-visited"
|
14
14
|
}
|
15
|
+
export type PreferredResourceKindType = ResourceKindType.devtronApplication | ResourceKindType.job | ResourceKindType.appGroup | ResourceKindType.cluster;
|
16
|
+
export interface UserPreferenceRecentlyVisitedAppsTypes {
|
17
|
+
appId: number;
|
18
|
+
appName: string;
|
19
|
+
resourceKind: PreferredResourceKindType;
|
20
|
+
}
|
15
21
|
export interface UserResourceKindActionType {
|
16
22
|
[UserPreferenceResourceActions.RECENTLY_VISITED]: BaseAppMetaData[];
|
17
23
|
}
|
18
|
-
export
|
19
|
-
[ResourceKindType
|
20
|
-
}
|
24
|
+
export type UserPreferenceResourceType = {
|
25
|
+
[key in ResourceKindType]?: UserResourceKindActionType;
|
26
|
+
};
|
21
27
|
export interface GetUserPreferencesParsedDTO {
|
22
28
|
viewPermittedEnvOnly?: boolean;
|
23
29
|
/**
|
@@ -57,25 +63,29 @@ export interface UserPreferencesType {
|
|
57
63
|
export interface UpdatedUserPreferencesType extends UserPreferencesType, Pick<ThemeConfigType, 'appTheme'> {
|
58
64
|
}
|
59
65
|
export interface UseUserPreferencesProps {
|
66
|
+
userPreferenceResourceKind?: ResourceKindType;
|
60
67
|
migrateUserPreferences?: (userPreferencesResponse: UserPreferencesType) => Promise<UserPreferencesType>;
|
61
68
|
}
|
62
69
|
export type UserPathValueMapType = {
|
63
70
|
path: 'themePreference';
|
64
71
|
value: Required<Pick<UpdatedUserPreferencesType, 'themePreference' | 'appTheme'>>;
|
72
|
+
resourceKind?: never;
|
73
|
+
userPreferencesResponse?: never;
|
65
74
|
} | {
|
66
75
|
path: 'pipelineRBACViewSelectedTab';
|
67
76
|
value: Required<Pick<UserPreferencesType, 'pipelineRBACViewSelectedTab'>>;
|
77
|
+
resourceKind?: never;
|
78
|
+
userPreferencesResponse?: never;
|
68
79
|
} | {
|
69
80
|
path: 'resources';
|
70
81
|
value: Required<BaseAppMetaData[]>;
|
82
|
+
resourceKind: PreferredResourceKindType;
|
83
|
+
userPreferencesResponse?: any;
|
71
84
|
};
|
72
85
|
export type UserPreferenceResourceProps = UserPathValueMapType & {
|
73
86
|
shouldThrowError?: boolean;
|
87
|
+
userPreferencesResponse?: any;
|
74
88
|
};
|
75
|
-
export interface UserPreferenceRecentlyVisitedAppsTypes {
|
76
|
-
appId: number;
|
77
|
-
appName: string;
|
78
|
-
}
|
79
89
|
export interface UserPreferenceFilteredListTypes extends UserPreferenceRecentlyVisitedAppsTypes {
|
80
90
|
userPreferencesResponse: UserPreferencesType;
|
81
91
|
}
|
@@ -6,5 +6,5 @@ export declare const useUserPreferences: ({ migrateUserPreferences }: UseUserPre
|
|
6
6
|
handleFetchUserPreferences: () => Promise<void>;
|
7
7
|
handleUpdatePipelineRBACViewSelectedTab: (selectedTab: ViewIsPipelineRBACConfiguredRadioTabs) => void;
|
8
8
|
handleUpdateUserThemePreference: (themePreference: UserPreferencesType["themePreference"]) => void;
|
9
|
-
fetchRecentlyVisitedParsedApps: ({ appId, appName }: UserPreferenceRecentlyVisitedAppsTypes) => Promise<void>;
|
9
|
+
fetchRecentlyVisitedParsedApps: ({ appId, appName, resourceKind, }: UserPreferenceRecentlyVisitedAppsTypes) => Promise<void>;
|
10
10
|
};
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { BaseAppMetaData } from '../../Services';
|
2
|
+
import { ResourceKindType } from '../../types';
|
2
3
|
import { UserPreferenceFilteredListTypes, UserPreferenceResourceType } from './types';
|
3
|
-
export declare const getUserPreferenceResourcesMetadata: (recentlyVisited: BaseAppMetaData[]) => UserPreferenceResourceType;
|
4
|
-
export declare const getFilteredUniqueAppList: ({ userPreferencesResponse, appId, appName, }: UserPreferenceFilteredListTypes) => BaseAppMetaData[];
|
4
|
+
export declare const getUserPreferenceResourcesMetadata: (recentlyVisited: BaseAppMetaData[], resourceKind: ResourceKindType) => UserPreferenceResourceType;
|
5
|
+
export declare const getFilteredUniqueAppList: ({ userPreferencesResponse, appId, appName, resourceKind, }: UserPreferenceFilteredListTypes) => BaseAppMetaData[];
|
package/dist/Shared/types.d.ts
CHANGED
@@ -424,7 +424,8 @@ export declare enum ResourceKindType {
|
|
424
424
|
environment = "environment",
|
425
425
|
cdPipeline = "cd-pipeline",
|
426
426
|
ciPipeline = "ci-pipeline",
|
427
|
-
project = "project"
|
427
|
+
project = "project",
|
428
|
+
appGroup = "app-group"
|
428
429
|
}
|
429
430
|
/**
|
430
431
|
* Versions support for the resources on BE
|
@@ -876,8 +877,7 @@ export declare enum CIPipelineNodeType {
|
|
876
877
|
CI = "CI",
|
877
878
|
LINKED_CI = "LINKED-CI",
|
878
879
|
JOB_CI = "JOB-CI",
|
879
|
-
LINKED_CD = "LINKED_CD"
|
880
|
-
CI_CD = "CI_CD"
|
880
|
+
LINKED_CD = "LINKED_CD"
|
881
881
|
}
|
882
882
|
export interface ChangeCIPayloadType {
|
883
883
|
appWorkflowId: number;
|