@devtron-labs/devtron-fe-common-lib 1.0.1 → 1.0.3-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.
- package/dist/Common/Common.service.d.ts +7 -0
- package/dist/Common/Constants.d.ts +14 -0
- package/dist/Common/Helper.d.ts +8 -0
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/CiPipelineSourceConfig.d.ts +2 -11
- package/dist/Shared/Components/CICDHistory/types.d.ts +11 -0
- package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +4 -5
- package/dist/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.d.ts +1 -1
- package/dist/Shared/Components/Security/SecurityModal/utils.d.ts +1 -1
- package/dist/Shared/Helpers.d.ts +14 -0
- package/dist/Shared/Services/app.types.d.ts +2 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-Cms6MtyR.js → cssMode-CgZc5pIZ.js} +1 -1
- package/dist/{freemarker2-3FE3rIRb.js → freemarker2-Ds9bNNFL.js} +1 -1
- package/dist/{handlebars-DeT_KQct.js → handlebars-DaxGbQNT.js} +1 -1
- package/dist/{html-W6MJJ6Cd.js → html-BGgxZQx7.js} +1 -1
- package/dist/{htmlMode-X1lmmOke.js → htmlMode-CxWqv_r9.js} +1 -1
- package/dist/{index-BAPwGfmH.js → index-CgPQR-HO.js} +19244 -19272
- package/dist/index.js +444 -438
- package/dist/{javascript-DBHHMxuE.js → javascript-CyKCeW4h.js} +1 -1
- package/dist/{jsonMode-R_Ioy9kM.js → jsonMode-CtqVeyzG.js} +1 -1
- package/dist/{liquid-CgBcKItj.js → liquid-CTRJkT8e.js} +1 -1
- package/dist/{mdx-5zADcGgC.js → mdx-CgwUFphC.js} +1 -1
- package/dist/{python-Ct8AOOli.js → python-DXA50x9v.js} +1 -1
- package/dist/{razor-DBKs2NDr.js → razor-GaOA1OEz.js} +1 -1
- package/dist/{tsMode-2mDlxLKe.js → tsMode-B6cK3PnY.js} +1 -1
- package/dist/{typescript-_jgELbQ9.js → typescript-B4BXlYuA.js} +1 -1
- package/dist/{xml-Da6smlqJ.js → xml-B3gl4wfo.js} +1 -1
- package/dist/{yaml-BNTzHcuk.js → yaml-Cu0uRxCW.js} +1 -1
- package/package.json +1 -1
|
@@ -27,4 +27,11 @@ export declare function getClusterListMin(): Promise<ResponseType<any>>;
|
|
|
27
27
|
export declare const getResourceGroupListRaw: (clusterId: string) => Promise<ResponseType<ApiResourceType>>;
|
|
28
28
|
export declare function getNamespaceListMin(clusterIdsCsv: string): Promise<EnvironmentListHelmResponse>;
|
|
29
29
|
export declare function getWebhookEventsForEventId(eventId: string | number): Promise<ResponseType<any>>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @param gitUrl Git URL of the repository
|
|
33
|
+
* @param branchName Branch name
|
|
34
|
+
* @returns URL to the branch in the Git repository
|
|
35
|
+
*/
|
|
36
|
+
export declare const getGitBranchUrl: (gitUrl: string, branchName: string) => string | null;
|
|
30
37
|
export {};
|
|
@@ -293,3 +293,17 @@ export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
|
293
293
|
unknown: number;
|
|
294
294
|
};
|
|
295
295
|
export declare const IS_PLATFORM_MAC_OS: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Git provider types
|
|
298
|
+
*/
|
|
299
|
+
export declare enum GitProviderType {
|
|
300
|
+
GITHUB = "github",
|
|
301
|
+
GITLAB = "gitlab",
|
|
302
|
+
BITBUCKET = "bitbucket",
|
|
303
|
+
AZURE = "azure",
|
|
304
|
+
GITEA = "gitea"
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Formats the schema removing any irregularity in the existing schema
|
|
308
|
+
*/
|
|
309
|
+
export declare const getFormattedSchema: (schema?: string) => string;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -121,6 +121,14 @@ export declare function mapByKey<T = Map<any, any>>(arr: any[], id: string): T;
|
|
|
121
121
|
export declare function asyncWrap(promise: any): any[];
|
|
122
122
|
export declare const prefixZeroIfSingleDigit: (value?: number) => string | number;
|
|
123
123
|
export declare const throttle: <T extends (...args: unknown[]) => unknown>(func: T, delay?: number) => ((...args: Parameters<T>) => void);
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @param sourceType - SourceTypeMap
|
|
127
|
+
* @param _isRegex - boolean
|
|
128
|
+
* @param webhookEventName - WebhookEventNameType
|
|
129
|
+
* @returns - Icon
|
|
130
|
+
*/
|
|
131
|
+
export declare const getBranchIcon: (sourceType: any, _isRegex?: boolean, webhookEventName?: string) => string;
|
|
124
132
|
export declare const getSanitizedIframe: (iframeString: string) => string;
|
|
125
133
|
/**
|
|
126
134
|
* This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DeploymentStageType } from '../../../../../Shared/constants';
|
|
2
|
-
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "
|
|
2
|
+
export declare const getDeploymentStageTitle: (stage: DeploymentStageType) => "deployment" | "pre-deployment" | "post-deployment" | "-";
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
sourceValue: any;
|
|
4
|
-
showTooltip?: boolean;
|
|
5
|
-
showIcons?: boolean;
|
|
6
|
-
baseText?: string;
|
|
7
|
-
regex?: any;
|
|
8
|
-
isRegex?: boolean;
|
|
9
|
-
primaryBranchAfterRegex?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const CiPipelineSourceConfig: ({ sourceType, sourceValue, showTooltip, showIcons, baseText, regex, isRegex, primaryBranchAfterRegex, }: CIPipelineSourceConfigInterface) => JSX.Element;
|
|
1
|
+
import { CIPipelineSourceConfigInterface } from './types';
|
|
2
|
+
export declare const CiPipelineSourceConfig: ({ sourceType, sourceValue, showTooltip, showIcons, baseText, regex, isRegex, primaryBranchAfterRegex, rootClassName, }: CIPipelineSourceConfigInterface) => JSX.Element;
|
|
@@ -666,4 +666,15 @@ export type CreateMarkupPropsType = {
|
|
|
666
666
|
export type TriggerHistoryFilterCriteriaType = `${string}|${string}|${string}`[];
|
|
667
667
|
export declare const terminalStatus: Set<string>;
|
|
668
668
|
export declare const statusSet: Set<string>;
|
|
669
|
+
export interface CIPipelineSourceConfigInterface {
|
|
670
|
+
sourceType: string;
|
|
671
|
+
sourceValue: any;
|
|
672
|
+
showTooltip?: boolean;
|
|
673
|
+
showIcons?: boolean;
|
|
674
|
+
baseText?: string;
|
|
675
|
+
regex?: any;
|
|
676
|
+
isRegex?: boolean;
|
|
677
|
+
primaryBranchAfterRegex?: string;
|
|
678
|
+
rootClassName?: string;
|
|
679
|
+
}
|
|
669
680
|
export {};
|
|
@@ -12,7 +12,7 @@ interface ButtonTab {
|
|
|
12
12
|
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
13
|
href?: never;
|
|
14
14
|
}
|
|
15
|
-
interface NavLinkTab {
|
|
15
|
+
interface NavLinkTab extends Pick<NavLinkProps, 'isActive'> {
|
|
16
16
|
/**
|
|
17
17
|
* The URL of the nav link.
|
|
18
18
|
*/
|
|
@@ -21,11 +21,10 @@ interface NavLinkTab {
|
|
|
21
21
|
* The callback function to handle click events on the nav link.
|
|
22
22
|
*/
|
|
23
23
|
onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
24
|
-
isActive?: never;
|
|
25
24
|
}
|
|
26
25
|
export type TabOptions = 'button' | 'navLink';
|
|
27
26
|
type ConditionalTabType<TabType extends TabOptions> = TabType extends 'button' ? ButtonTab : NavLinkTab;
|
|
28
|
-
export type CollapsibleListItem<TabType extends TabOptions
|
|
27
|
+
export type CollapsibleListItem<TabType extends TabOptions = 'navLink'> = ConditionalTabType<TabType> & {
|
|
29
28
|
/**
|
|
30
29
|
* The title of the list item.
|
|
31
30
|
*/
|
|
@@ -56,7 +55,7 @@ export type CollapsibleListItem<TabType extends TabOptions> = Pick<NavLinkProps,
|
|
|
56
55
|
tooltipProps?: TippyProps;
|
|
57
56
|
};
|
|
58
57
|
};
|
|
59
|
-
export interface CollapsibleListConfig<TabType extends
|
|
58
|
+
export interface CollapsibleListConfig<TabType extends TabOptions = 'navLink'> {
|
|
60
59
|
/**
|
|
61
60
|
* The unique identifier for the collapsible list.
|
|
62
61
|
*/
|
|
@@ -100,7 +99,7 @@ export interface CollapsibleListConfig<TabType extends 'button' | 'navLink'> {
|
|
|
100
99
|
*/
|
|
101
100
|
isExpanded?: boolean;
|
|
102
101
|
}
|
|
103
|
-
export interface CollapsibleListProps<TabType extends TabOptions> {
|
|
102
|
+
export interface CollapsibleListProps<TabType extends TabOptions = 'navLink'> {
|
|
104
103
|
/**
|
|
105
104
|
* An array of collapsible list configurations.
|
|
106
105
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GitCommitInfoGenericProps } from './types';
|
|
2
|
-
declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader,
|
|
2
|
+
declare const GitCommitInfoGeneric: ({ materialSourceType, materialSourceValue, commitInfo, selectedCommitInfo, materialUrl, showMaterialInfoHeader, index, isExcluded, }: GitCommitInfoGenericProps) => JSX.Element;
|
|
3
3
|
export default GitCommitInfoGeneric;
|
|
@@ -2,7 +2,7 @@ import { ApiResponseResultType, SeveritiesDTO, GetResourceScanDetailsResponseTyp
|
|
|
2
2
|
import { SEVERITIES } from './constants';
|
|
3
3
|
export declare const mapSeveritiesToSegmentedBarChartEntities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => {
|
|
4
4
|
color: "#B1B7BC" | "#B21212" | "#F33E3E" | "#FF7E5B" | "#FFB549" | "#1DAD70";
|
|
5
|
-
label: "
|
|
5
|
+
label: "Unknown" | "Critical" | "High" | "Medium" | "Low" | "Failures" | "Successes" | "Exceptions";
|
|
6
6
|
value: number;
|
|
7
7
|
}[];
|
|
8
8
|
export declare const stringifySeverities: (severities: Partial<Record<keyof typeof SEVERITIES, number>>) => string;
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Pair } from 'yaml';
|
|
3
|
+
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
|
3
4
|
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
|
4
5
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
|
|
5
6
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
@@ -63,4 +64,17 @@ export declare const getDefaultValueFromType: (value: unknown) => {};
|
|
|
63
64
|
* and the values are arrays of objects that share the same key value.
|
|
64
65
|
*/
|
|
65
66
|
export declare const groupArrayByObjectKey: <T extends Record<string, any>, K extends keyof T>(array: T[], key: K) => Record<string, T[]>;
|
|
67
|
+
/**
|
|
68
|
+
* @description - Function to get the lower case object
|
|
69
|
+
* @param input - The input object
|
|
70
|
+
* @returns Record<string, any>
|
|
71
|
+
*/
|
|
72
|
+
export declare const getLowerCaseObject: (input: any) => Record<string, any>;
|
|
73
|
+
/**
|
|
74
|
+
* @description - Function to get the webhook date
|
|
75
|
+
* @param materialSourceType - The type of material source (e.g., WEBHOOK)
|
|
76
|
+
* @param history - The history object containing commit information
|
|
77
|
+
* @returns - Formatted webhook date if available, otherwise an empty string
|
|
78
|
+
*/
|
|
79
|
+
export declare const getWebhookDate: (materialSourceType: string, history: MaterialHistoryType) => string;
|
|
66
80
|
export {};
|
|
@@ -12,7 +12,7 @@ interface MaterialHistoryDTO {
|
|
|
12
12
|
Changes: unknown[];
|
|
13
13
|
WebhookData: WebhookDataType;
|
|
14
14
|
}
|
|
15
|
-
interface MaterialHistoryType {
|
|
15
|
+
export interface MaterialHistoryType {
|
|
16
16
|
commitURL: string;
|
|
17
17
|
commit: MaterialHistoryDTO['Commit'];
|
|
18
18
|
author: MaterialHistoryDTO['Author'];
|
|
@@ -56,6 +56,7 @@ export interface CIMaterialType extends Pick<CIMaterialDTO, 'id' | 'gitMaterialI
|
|
|
56
56
|
gitURL: CIMaterialDTO['url'];
|
|
57
57
|
history: MaterialHistoryType[];
|
|
58
58
|
isSelected: boolean;
|
|
59
|
+
gitMaterialUrl?: string;
|
|
59
60
|
}
|
|
60
61
|
interface ImageCommentDTO {
|
|
61
62
|
id: number;
|