@devtron-labs/devtron-fe-common-lib 1.2.4-beta-2 → 1.2.4-beta-4
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-BV1AeIWi.js → @code-editor-Dl49eEEU.js} +5339 -5683
- package/dist/{@common-rjsf-C1PceqoJ.js → @common-rjsf-D7zjI7cT.js} +1 -1
- package/dist/Common/Common.service.d.ts +2 -1
- package/dist/Common/Constants.d.ts +0 -1
- package/dist/Common/CustomTagSelector/ResizableTagTextArea.d.ts +1 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +14 -19
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/Types.d.ts +49 -40
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -2
- package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/types.d.ts +34 -6
- package/dist/Shared/Components/SelectPicker/type.d.ts +4 -5
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Helpers.d.ts +4 -3
- package/dist/Shared/Services/app.types.d.ts +2 -1
- package/dist/Shared/constants.d.ts +7 -0
- package/dist/Shared/types.d.ts +17 -5
- package/dist/assets/@code-editor.css +1 -1
- package/dist/index.js +446 -443
- package/package.json +2 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/index.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +0 -165
- package/dist/Shared/Components/DynamicDataTable/utils.d.ts +0 -5
- package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/index.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/types.d.ts +0 -12
- package/dist/assets/ic-clear-square.e60de021.svg +0 -1
- /package/dist/assets/{ic-arrow-square-out.1be837ac.svg → ic-arrow-square-out.3d1a0d41.svg} +0 -0
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RU8AW1bK.js";
|
|
2
2
|
import E, { forwardRef as $ } from "react";
|
3
3
|
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
4
4
|
import D from "@rjsf/validator-ajv8";
|
5
|
-
import { T as y, c as H, a as J, d as w } from "./@code-editor-
|
5
|
+
import { T as y, c as H, a as J, d as w } from "./@code-editor-Dl49eEEU.js";
|
6
6
|
import M, { components as O } from "react-select";
|
7
7
|
import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
|
8
8
|
import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
|
2
|
-
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
2
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType } from './Types';
|
3
3
|
import { ApiResourceType } from '../Pages';
|
4
4
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
5
5
|
interface UserRole extends ResponseType {
|
@@ -15,6 +15,7 @@ export declare const SourceTypeMap: {
|
|
15
15
|
};
|
16
16
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
17
17
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
18
|
+
export declare const sanitizeUserApprovalMetadata: (userApprovalMetadata: UserApprovalMetadataType) => UserApprovalMetadataType;
|
18
19
|
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
|
19
20
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
20
21
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { ResizableTagTextAreaProps } from './Types';
|
2
|
-
export declare const ResizableTagTextArea: ({
|
2
|
+
export declare const ResizableTagTextArea: ({ className, minHeight, maxHeight, value, onChange, onBlur, onFocus, placeholder, tabIndex, refVar, dependentRef, dataTestId, handleKeyDown, disabled, disableOnBlurResizeToMinHeight, }: ResizableTagTextAreaProps) => JSX.Element;
|
@@ -1,20 +1,9 @@
|
|
1
|
-
import { DetailedHTMLProps, MutableRefObject, TextareaHTMLAttributes } from 'react';
|
2
1
|
import { KEY_VALUE } from '../Constants';
|
3
2
|
import { OptionType } from '../Types';
|
4
3
|
export interface SuggestedTagOptionType extends OptionType {
|
5
4
|
description: string;
|
6
5
|
propagate: boolean;
|
7
6
|
}
|
8
|
-
export declare enum DeploymentPolicy {
|
9
|
-
ALLOW = "allow",
|
10
|
-
BLOCK = "block",
|
11
|
-
BLOCK_PROD = "block-prod",
|
12
|
-
BLOCK_NON_PROD = "block-non-prod"
|
13
|
-
}
|
14
|
-
export interface VariableValueConstraintTypes {
|
15
|
-
choices?: string[];
|
16
|
-
blockCustomValue?: boolean;
|
17
|
-
}
|
18
7
|
export interface TagType {
|
19
8
|
id?: number;
|
20
9
|
key: string;
|
@@ -26,8 +15,6 @@ export interface TagType {
|
|
26
15
|
isInvalidValue?: boolean;
|
27
16
|
isSuggested?: boolean;
|
28
17
|
isPropagateDisabled?: boolean;
|
29
|
-
deploymentPolicy?: DeploymentPolicy;
|
30
|
-
valueConstraint?: VariableValueConstraintTypes;
|
31
18
|
}
|
32
19
|
export interface TagErrorType {
|
33
20
|
isValid: boolean;
|
@@ -61,16 +48,24 @@ export interface TagLabelValueSelectorType {
|
|
61
48
|
tagInputType?: KEY_VALUE;
|
62
49
|
placeholder?: string;
|
63
50
|
tabIndex?: number;
|
64
|
-
refVar?: MutableRefObject<HTMLTextAreaElement>;
|
65
|
-
dependentRef?: MutableRefObject<HTMLTextAreaElement>;
|
51
|
+
refVar?: React.MutableRefObject<HTMLTextAreaElement>;
|
52
|
+
dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
|
66
53
|
noBackDrop?: boolean;
|
67
54
|
}
|
68
|
-
export interface ResizableTagTextAreaProps
|
55
|
+
export interface ResizableTagTextAreaProps {
|
56
|
+
className?: string;
|
69
57
|
minHeight?: number;
|
70
58
|
maxHeight?: number;
|
71
|
-
value
|
72
|
-
|
73
|
-
|
59
|
+
value?: string;
|
60
|
+
onChange?: (e: any) => void;
|
61
|
+
onBlur?: (e: any) => void;
|
62
|
+
onFocus?: (e: any) => void;
|
63
|
+
placeholder?: string;
|
64
|
+
tabIndex?: number;
|
65
|
+
refVar?: React.MutableRefObject<HTMLTextAreaElement>;
|
66
|
+
dependentRef?: React.MutableRefObject<HTMLTextAreaElement>;
|
74
67
|
dataTestId?: string;
|
68
|
+
handleKeyDown?: any;
|
69
|
+
disabled?: boolean;
|
75
70
|
disableOnBlurResizeToMinHeight?: boolean;
|
76
71
|
}
|
package/dist/Common/Helper.d.ts
CHANGED
@@ -9,7 +9,7 @@ interface ConditionalWrapper<T> {
|
|
9
9
|
children: T;
|
10
10
|
}
|
11
11
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
12
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
12
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | -1 | 0;
|
13
13
|
export declare const stopPropagation: (event: any) => void;
|
14
14
|
export declare const preventDefault: (event: SyntheticEvent) => void;
|
15
15
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
package/dist/Common/Types.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
3
|
-
import { Placement } from 'tippy.js';
|
4
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
5
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
6
5
|
import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
|
@@ -74,7 +73,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
74
73
|
noHeadingBorder?: boolean;
|
75
74
|
infoTextHeading?: string;
|
76
75
|
hideHeading?: boolean;
|
77
|
-
placement?:
|
76
|
+
placement?: TippyProps['placement'];
|
78
77
|
className?: string;
|
79
78
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
80
79
|
iconPath?: string;
|
@@ -274,21 +273,6 @@ export declare enum ManualApprovalType {
|
|
274
273
|
any = "ANY",
|
275
274
|
notConfigured = "NOT_CONFIGURED"
|
276
275
|
}
|
277
|
-
export interface UserGroupApproverType {
|
278
|
-
email: string;
|
279
|
-
hasAccess: boolean;
|
280
|
-
}
|
281
|
-
export interface ImageApprovalPolicyUserGroupDataType {
|
282
|
-
dataStore: Record<string, UserGroupApproverType>;
|
283
|
-
requiredCount: number;
|
284
|
-
emails: string[];
|
285
|
-
}
|
286
|
-
export interface ImageApprovalPolicyType {
|
287
|
-
isPolicyConfigured: boolean;
|
288
|
-
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
289
|
-
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
290
|
-
validGroups: string[];
|
291
|
-
}
|
292
276
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
293
277
|
export interface UserApprovalConfigType {
|
294
278
|
type: ManualApprovalType;
|
@@ -301,13 +285,6 @@ export interface UserApprovalConfigType {
|
|
301
285
|
requiredCount: number;
|
302
286
|
})[];
|
303
287
|
}
|
304
|
-
export type UserApprovalConfigPayloadType = ({
|
305
|
-
type: ManualApprovalType.any;
|
306
|
-
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
307
|
-
type: ManualApprovalType.specific;
|
308
|
-
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
309
|
-
type: ManualApprovalType.notConfigured;
|
310
|
-
};
|
311
288
|
interface ApprovalUserDataType {
|
312
289
|
dataId: number;
|
313
290
|
userActionTime: string;
|
@@ -317,12 +294,45 @@ interface ApprovalUserDataType {
|
|
317
294
|
userResponse: number;
|
318
295
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
319
296
|
}
|
297
|
+
export interface UserApprovalInfo {
|
298
|
+
requiredCount: number;
|
299
|
+
currentCount: number;
|
300
|
+
approverList: {
|
301
|
+
hasApproved: boolean;
|
302
|
+
canApprove: boolean;
|
303
|
+
identifier: string;
|
304
|
+
}[];
|
305
|
+
}
|
306
|
+
export declare enum ApprovalConfigDataKindType {
|
307
|
+
configMap = "configuration/config-map",
|
308
|
+
configSecret = "configuration/config-secret",
|
309
|
+
deploymentTemplate = "configuration/deployment-template",
|
310
|
+
deploymentTrigger = "approval/deployment"
|
311
|
+
}
|
312
|
+
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
|
313
|
+
kind: ApprovalConfigDataKindType | null;
|
314
|
+
anyUserApprovedInfo: UserApprovalInfo;
|
315
|
+
specificUsersApprovedInfo: UserApprovalInfo;
|
316
|
+
userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
|
317
|
+
userGroups: (UserApprovalInfo & {
|
318
|
+
groupIdentifier: UserGroupDTO['identifier'];
|
319
|
+
groupName: UserGroupDTO['name'];
|
320
|
+
})[];
|
321
|
+
};
|
322
|
+
}
|
323
|
+
export declare enum ApprovalRuntimeStateType {
|
324
|
+
init = 0,
|
325
|
+
requested = 1,
|
326
|
+
approved = 2,
|
327
|
+
consumed = 3
|
328
|
+
}
|
320
329
|
export interface UserApprovalMetadataType {
|
321
330
|
approvalRequestId: number;
|
322
|
-
approvalRuntimeState:
|
323
|
-
approvedUsersData: ApprovalUserDataType[];
|
331
|
+
approvalRuntimeState: ApprovalRuntimeStateType;
|
324
332
|
requestedUserData: ApprovalUserDataType;
|
325
|
-
|
333
|
+
hasCurrentUserApproved: boolean;
|
334
|
+
canCurrentUserApprove: boolean;
|
335
|
+
approvalConfigData: ApprovalConfigDataType;
|
326
336
|
}
|
327
337
|
export declare enum FilterStates {
|
328
338
|
ALLOWED = 0,
|
@@ -379,7 +389,6 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
379
389
|
artifactId?: number;
|
380
390
|
artifactStatus?: string;
|
381
391
|
disableDefaultSelection?: boolean;
|
382
|
-
userApprovalConfig?: UserApprovalConfigType;
|
383
392
|
}
|
384
393
|
export interface CDMaterialType {
|
385
394
|
index: number;
|
@@ -515,8 +524,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
515
524
|
primaryBranchAfterRegex?: string;
|
516
525
|
storageConfigured?: boolean;
|
517
526
|
deploymentAppDeleteRequest?: boolean;
|
518
|
-
|
519
|
-
userApprovalConfig?: UserApprovalConfigType;
|
527
|
+
approvalConfigData: ApprovalConfigDataType;
|
520
528
|
requestedUserId?: number;
|
521
529
|
showPluginWarning: boolean;
|
522
530
|
helmPackageName?: string;
|
@@ -573,14 +581,17 @@ export interface FilterConditionsListType {
|
|
573
581
|
description: string;
|
574
582
|
conditions: FilterConditionsInfo[];
|
575
583
|
}
|
584
|
+
export interface DeploymentApprovalInfoType {
|
585
|
+
eligibleApprovers: {
|
586
|
+
specificUsers: Pick<UserApprovalInfo, 'approverList'>;
|
587
|
+
anyUsers: Pick<UserApprovalInfo, 'approverList'>;
|
588
|
+
userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
|
589
|
+
};
|
590
|
+
approvalConfigData: ApprovalConfigDataType;
|
591
|
+
}
|
576
592
|
export interface CDMaterialsApprovalInfo {
|
577
|
-
approvalUsers: string[];
|
578
|
-
userApprovalConfig: UserApprovalConfigType;
|
579
593
|
canApproverDeploy: boolean;
|
580
|
-
|
581
|
-
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
582
|
-
*/
|
583
|
-
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
594
|
+
deploymentApprovalInfo: DeploymentApprovalInfoType;
|
584
595
|
}
|
585
596
|
export interface CDMaterialsMetaInfo {
|
586
597
|
tagsEditable: boolean;
|
@@ -659,7 +670,6 @@ export interface AppEnvironment {
|
|
659
670
|
appStatus?: string;
|
660
671
|
deploymentAppDeleteRequest?: boolean;
|
661
672
|
isVirtualEnvironment?: boolean;
|
662
|
-
isProtected?: boolean;
|
663
673
|
pipelineId?: number;
|
664
674
|
latestCdWorkflowRunnerId?: number;
|
665
675
|
commits?: string[];
|
@@ -710,7 +720,6 @@ export interface CdPipeline {
|
|
710
720
|
parentPipelineType?: string;
|
711
721
|
deploymentAppDeleteRequest?: boolean;
|
712
722
|
deploymentAppCreated?: boolean;
|
713
|
-
userApprovalConfig?: UserApprovalConfigType;
|
714
723
|
isVirtualEnvironment?: boolean;
|
715
724
|
deploymentAppType: DeploymentAppTypes;
|
716
725
|
helmPackageName?: string;
|
@@ -719,6 +728,7 @@ export interface CdPipeline {
|
|
719
728
|
isProdEnv?: boolean;
|
720
729
|
isGitOpsRepoNotConfigured?: boolean;
|
721
730
|
isDeploymentBlocked?: boolean;
|
731
|
+
approvalConfigData: ApprovalConfigDataType;
|
722
732
|
}
|
723
733
|
export interface ExternalCiConfig {
|
724
734
|
id: number;
|
@@ -820,12 +830,11 @@ export interface Point {
|
|
820
830
|
export interface EdgeNodeType {
|
821
831
|
height: number;
|
822
832
|
width: number;
|
823
|
-
userApprovalConfig?: UserApprovalConfigType;
|
824
833
|
type?: any;
|
825
834
|
id?: number | string;
|
826
835
|
}
|
827
836
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
828
|
-
|
837
|
+
approvalConfigData: ApprovalConfigDataType;
|
829
838
|
}
|
830
839
|
/**
|
831
840
|
* Search params for sorting configuration
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
|
2
|
-
import { DeploymentAppTypes
|
2
|
+
import { DeploymentAppTypes } from '../../../../../Common/Types';
|
3
3
|
import { DeploymentStrategy } from '../../../../../Shared/Components';
|
4
4
|
import { EnvListMinDTO } from '../../../../../Shared/types';
|
5
5
|
interface ConfigSecretType {
|
@@ -53,7 +53,6 @@ export interface CDFormType {
|
|
53
53
|
secrets: ConfigSecretType[];
|
54
54
|
};
|
55
55
|
requiredApprovals: string;
|
56
|
-
userApprovalConfig?: UserApprovalConfigType;
|
57
56
|
isClusterCdActive: boolean;
|
58
57
|
deploymentAppCreated: boolean;
|
59
58
|
clusterId: string;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { FeatureDescriptionModalProps } from './types';
|
2
|
-
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
|
2
|
+
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, }: FeatureDescriptionModalProps) => JSX.Element;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DescriptorProps } from './types';
|
2
|
-
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
|
2
|
+
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, }: DescriptorProps) => JSX.Element;
|
3
3
|
export default FeatureTitleWithInfo;
|
@@ -1,17 +1,44 @@
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
2
2
|
import { ImageType } from '../../../Common';
|
3
3
|
import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
|
4
|
-
|
5
|
-
title: string;
|
4
|
+
interface BaseFeatureDescriptionModalProps {
|
6
5
|
renderDescriptionContent?: () => ReactNode;
|
7
|
-
closeModalText?: string;
|
8
6
|
docLink?: string;
|
9
|
-
closeModal?: () => void;
|
10
7
|
imageVariant?: ImageType;
|
11
8
|
SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
12
9
|
imageStyles?: React.CSSProperties;
|
13
10
|
}
|
14
|
-
|
11
|
+
type FeatureDescriptionModalWithTabsConfig = {
|
12
|
+
/**
|
13
|
+
* If provided, tabs are shown and have higher precedence over normal modal
|
14
|
+
*/
|
15
|
+
tabsConfig: ({
|
16
|
+
/**
|
17
|
+
* Unique id of the tab
|
18
|
+
*/
|
19
|
+
id: string;
|
20
|
+
/**
|
21
|
+
* Title for the tab
|
22
|
+
*/
|
23
|
+
title: string;
|
24
|
+
} & BaseFeatureDescriptionModalProps)[];
|
25
|
+
} & {
|
26
|
+
renderDescriptionContent?: never;
|
27
|
+
docLink?: never;
|
28
|
+
imageVariant?: never;
|
29
|
+
SVGImage?: never;
|
30
|
+
imageStyles?: never;
|
31
|
+
};
|
32
|
+
export type FeatureDescriptionModalProps = {
|
33
|
+
title: string;
|
34
|
+
closeModalText?: string;
|
35
|
+
closeModal?: () => void;
|
36
|
+
} & ((BaseFeatureDescriptionModalProps & {
|
37
|
+
tabsConfig?: never;
|
38
|
+
}) | FeatureDescriptionModalWithTabsConfig);
|
39
|
+
export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'> & {
|
40
|
+
tabsConfig?: never;
|
41
|
+
}) | (Pick<FeatureDescriptionModalProps, 'title' | 'closeModalText' | 'closeModal'> & FeatureDescriptionModalWithTabsConfig)) & {
|
15
42
|
breadCrumbs?: Breadcrumb[];
|
16
43
|
additionalContainerClasses?: string;
|
17
44
|
iconClassName?: string;
|
@@ -26,4 +53,5 @@ export interface DescriptorProps extends FeatureDescriptionModalProps {
|
|
26
53
|
* @default false
|
27
54
|
*/
|
28
55
|
showInfoIcon?: boolean;
|
29
|
-
}
|
56
|
+
};
|
57
|
+
export {};
|
@@ -24,10 +24,6 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
|
|
24
24
|
tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
|
25
25
|
}
|
26
26
|
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
27
|
-
export declare enum SelectPickerVariantType {
|
28
|
-
DEFAULT = "default",
|
29
|
-
BORDER_LESS = "border-less"
|
30
|
-
}
|
31
27
|
declare module 'react-select/base' {
|
32
28
|
interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
33
29
|
/**
|
@@ -59,9 +55,12 @@ declare module 'react-select/base' {
|
|
59
55
|
* @default 'true'
|
60
56
|
*/
|
61
57
|
showSelectedOptionIcon?: boolean;
|
62
|
-
variant?: SelectPickerVariantType;
|
63
58
|
}
|
64
59
|
}
|
60
|
+
export declare enum SelectPickerVariantType {
|
61
|
+
DEFAULT = "default",
|
62
|
+
BORDER_LESS = "border-less"
|
63
|
+
}
|
65
64
|
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
|
66
65
|
/**
|
67
66
|
* Error message for the select
|
package/dist/Shared/Helpers.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReactElement } from 'react';
|
2
2
|
import { Pair } from 'yaml';
|
3
3
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
4
|
-
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
4
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
|
5
5
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
6
6
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
7
7
|
interface HighlightSearchTextProps {
|
@@ -40,12 +40,13 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
40
40
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
41
41
|
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
42
42
|
export declare const getFileNameFromHeaders: (headers: Headers) => string;
|
43
|
-
export declare const
|
43
|
+
export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
|
44
|
+
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
44
45
|
/**
|
45
46
|
* Manual approval is considered configured only if the type is not notConfigured
|
46
47
|
*/
|
47
48
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
48
|
-
export declare const
|
49
|
+
export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
|
49
50
|
/**
|
50
51
|
* @description - Function to open a new tab with the given url
|
51
52
|
* @param url - url to be opened in new tab
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ReleaseTag } from '../../Common';
|
1
|
+
import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
|
2
2
|
interface WebhookDataType {
|
3
3
|
id: number;
|
4
4
|
eventActionType: string;
|
@@ -132,6 +132,7 @@ export interface DraftMetadataDTO {
|
|
132
132
|
commentsCount: number;
|
133
133
|
dataEncrypted: boolean;
|
134
134
|
isAppAdmin: boolean;
|
135
|
+
userApprovalMetadata: UserApprovalMetadataType;
|
135
136
|
}
|
136
137
|
export declare enum CMSecretExternalType {
|
137
138
|
Internal = "",
|
@@ -417,4 +417,11 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
|
|
417
417
|
export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
|
418
418
|
export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
|
419
419
|
export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
|
420
|
+
export declare const TARGET_IDS: {
|
421
|
+
WORKFLOW_EDITOR_CONTAINER: string;
|
422
|
+
};
|
423
|
+
/**
|
424
|
+
* Env ID to get the data for base configuration
|
425
|
+
*/
|
426
|
+
export declare const BASE_CONFIGURATION_ENV_ID = -1;
|
420
427
|
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
2
|
-
import {
|
2
|
+
import { ApprovalConfigDataType } from '../Common/Types';
|
3
|
+
import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
3
4
|
import { KeyValueListType } from './Components';
|
4
|
-
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
|
+
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
5
6
|
export declare enum EnvType {
|
6
7
|
CHART = "helm_charts",
|
7
8
|
APPLICATION = "apps"
|
@@ -186,7 +187,7 @@ export interface AppDetails {
|
|
186
187
|
clusterName?: string;
|
187
188
|
dockerRegistryId?: string;
|
188
189
|
deploymentAppDeleteRequest?: boolean;
|
189
|
-
|
190
|
+
approvalConfigData?: ApprovalConfigDataType;
|
190
191
|
isVirtualEnvironment?: boolean;
|
191
192
|
imageTag?: string;
|
192
193
|
helmPackageName?: string;
|
@@ -246,7 +247,7 @@ export interface WorkflowType {
|
|
246
247
|
showTippy?: boolean;
|
247
248
|
appId?: number;
|
248
249
|
isSelected?: boolean;
|
249
|
-
approvalConfiguredIdsMap?: Record<number,
|
250
|
+
approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
|
250
251
|
imageReleaseTags: string[];
|
251
252
|
appReleaseTags?: string[];
|
252
253
|
tagsEditable?: boolean;
|
@@ -403,7 +404,8 @@ export interface SeverityCount {
|
|
403
404
|
export declare enum PolicyKindType {
|
404
405
|
lockConfiguration = "lock-configuration",
|
405
406
|
imagePromotion = "image-promotion",
|
406
|
-
plugins = "plugin"
|
407
|
+
plugins = "plugin",
|
408
|
+
approval = "approval"
|
407
409
|
}
|
408
410
|
export interface LastExecutionResultType {
|
409
411
|
lastExecution: string;
|
@@ -735,6 +737,16 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
735
737
|
*/
|
736
738
|
lastActiveTabId: string | null;
|
737
739
|
}
|
740
|
+
export interface ResourceApprovalPolicyConfigDTO {
|
741
|
+
appId: number;
|
742
|
+
envId: number;
|
743
|
+
approvalConfigurations: ApprovalConfigDataType[];
|
744
|
+
}
|
745
|
+
export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
|
746
|
+
isApprovalApplicable: boolean;
|
747
|
+
approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
|
748
|
+
}
|
749
|
+
export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
|
738
750
|
export interface PreventOutsideFocusProps {
|
739
751
|
identifier: string;
|
740
752
|
preventFocus: boolean;
|