@devtron-labs/devtron-fe-common-lib 1.0.5 → 1.0.6-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/Common/RJSF/Form.d.ts +1 -1
- package/dist/Common/Types.d.ts +5 -1
- 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/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/Shared/types.d.ts +71 -3
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-gww6t3hp.js → cssMode-C57AjhsW.js} +1 -1
- package/dist/{freemarker2-C1os6hIq.js → freemarker2-41D31RUl.js} +1 -1
- package/dist/{handlebars-CmWqAujF.js → handlebars-C5mWygsu.js} +1 -1
- package/dist/{html-BWCasgP8.js → html-G68qev1T.js} +1 -1
- package/dist/{htmlMode-DiTBN6Js.js → htmlMode-CIIjndXU.js} +1 -1
- package/dist/{index-CVB3HT05.js → index-Cm0Lh7Rw.js} +19629 -19694
- package/dist/index.js +436 -430
- package/dist/{javascript-BeOM6Qv2.js → javascript-6Ela1feK.js} +1 -1
- package/dist/{jsonMode-Bl54KSwi.js → jsonMode-iIZXMa4I.js} +1 -1
- package/dist/{liquid-DY8vDLW2.js → liquid-CbWykd8f.js} +1 -1
- package/dist/{mdx-B2Mz4NGq.js → mdx-BHC5u9U5.js} +1 -1
- package/dist/{python-C6TJoNd_.js → python-C8VH5XHE.js} +1 -1
- package/dist/{razor-_0bOceUt.js → razor-DGefvalN.js} +1 -1
- package/dist/{tsMode-oYMu1Njq.js → tsMode-PocR5O-2.js} +1 -1
- package/dist/{typescript-CcKDJsd9.js → typescript-t4WiWVdt.js} +1 -1
- package/dist/{xml-D2kxdtyf.js → xml-9eayyfPW.js} +1 -1
- package/dist/{yaml-DetA8HO7.js → yaml-C78DV2wB.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 {};
|
|
@@ -294,3 +294,17 @@ export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
|
294
294
|
unknown: number;
|
|
295
295
|
};
|
|
296
296
|
export declare const IS_PLATFORM_MAC_OS: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Git provider types
|
|
299
|
+
*/
|
|
300
|
+
export declare enum GitProviderType {
|
|
301
|
+
GITHUB = "github",
|
|
302
|
+
GITLAB = "gitlab",
|
|
303
|
+
BITBUCKET = "bitbucket",
|
|
304
|
+
AZURE = "azure",
|
|
305
|
+
GITEA = "gitea"
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Formats the schema removing any irregularity in the existing schema
|
|
309
|
+
*/
|
|
310
|
+
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,3 +1,3 @@
|
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
|
2
2
|
import { FormProps } from './types';
|
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "
|
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "name" | "disabled" | "target" | "tagName" | "autoComplete" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "method" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React, ReactNode, CSSProperties, ReactElement } from 'react';
|
|
1
|
+
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
|
2
2
|
import { Placement } from 'tippy.js';
|
|
3
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
4
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
@@ -25,7 +25,11 @@ export interface ResponseType<T = any> {
|
|
|
25
25
|
}
|
|
26
26
|
export interface APIOptions {
|
|
27
27
|
timeout?: number;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use abortController instead
|
|
30
|
+
*/
|
|
28
31
|
signal?: AbortSignal;
|
|
32
|
+
abortControllerRef?: MutableRefObject<AbortController>;
|
|
29
33
|
preventAutoLogout?: boolean;
|
|
30
34
|
}
|
|
31
35
|
export interface OptionType<T = string, K = string> {
|
|
@@ -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 {};
|
|
@@ -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;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -634,23 +634,68 @@ export interface CustomRoleAndMeta {
|
|
|
634
634
|
possibleRolesMetaForJob: MetaPossibleRoles;
|
|
635
635
|
}
|
|
636
636
|
interface CommonTabArgsType {
|
|
637
|
+
/**
|
|
638
|
+
* Name for the tab.
|
|
639
|
+
*
|
|
640
|
+
* Note: Used for the title
|
|
641
|
+
*/
|
|
637
642
|
name: string;
|
|
638
643
|
kind?: string;
|
|
644
|
+
/**
|
|
645
|
+
* URL for the tab
|
|
646
|
+
*/
|
|
639
647
|
url: string;
|
|
648
|
+
/**
|
|
649
|
+
* If true, the tab is selected
|
|
650
|
+
*/
|
|
640
651
|
isSelected: boolean;
|
|
652
|
+
/**
|
|
653
|
+
* Title for the tab
|
|
654
|
+
*/
|
|
641
655
|
title?: string;
|
|
642
656
|
isDeleted?: boolean;
|
|
643
|
-
|
|
657
|
+
/**
|
|
658
|
+
* Type for the tab
|
|
659
|
+
*
|
|
660
|
+
* Note: Fixed tabs are always places before dynamic tabs
|
|
661
|
+
*/
|
|
662
|
+
type: 'fixed' | 'dynamic';
|
|
663
|
+
/**
|
|
664
|
+
* Path of the icon for the tab
|
|
665
|
+
*
|
|
666
|
+
* @default ''
|
|
667
|
+
*/
|
|
644
668
|
iconPath?: string;
|
|
669
|
+
/**
|
|
670
|
+
* Dynamic title for the tab
|
|
671
|
+
*
|
|
672
|
+
* @default ''
|
|
673
|
+
*/
|
|
645
674
|
dynamicTitle?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Whether to show the tab name when selected
|
|
677
|
+
*
|
|
678
|
+
* @default false
|
|
679
|
+
*/
|
|
646
680
|
showNameOnSelect?: boolean;
|
|
647
681
|
/**
|
|
682
|
+
* Would remove the title/name from tab heading, but that does not mean name is not required, since it is used in other calculations
|
|
648
683
|
* @default false
|
|
649
684
|
*/
|
|
650
685
|
hideName?: boolean;
|
|
686
|
+
/**
|
|
687
|
+
* Indicates if showNameOnSelect tabs have been selected once
|
|
688
|
+
*
|
|
689
|
+
* @default false
|
|
690
|
+
*/
|
|
651
691
|
isAlive?: boolean;
|
|
652
692
|
lastSyncMoment?: Dayjs;
|
|
653
693
|
componentKey?: string;
|
|
694
|
+
/**
|
|
695
|
+
* Custom tippy config for the tab
|
|
696
|
+
*
|
|
697
|
+
* This overrides the tippy being computed from tab title
|
|
698
|
+
*/
|
|
654
699
|
tippyConfig?: {
|
|
655
700
|
title: string;
|
|
656
701
|
descriptions: {
|
|
@@ -658,11 +703,34 @@ interface CommonTabArgsType {
|
|
|
658
703
|
value: string;
|
|
659
704
|
}[];
|
|
660
705
|
};
|
|
706
|
+
/**
|
|
707
|
+
* If true, the fixed tab remains mounted on initial load of the component
|
|
708
|
+
*
|
|
709
|
+
* Note: Not for dynamic tabs atm
|
|
710
|
+
*
|
|
711
|
+
* @default false
|
|
712
|
+
*/
|
|
713
|
+
shouldRemainMounted?: boolean;
|
|
661
714
|
}
|
|
662
|
-
export
|
|
715
|
+
export type InitTabType = Omit<CommonTabArgsType, 'type'> & ({
|
|
716
|
+
type: 'fixed';
|
|
717
|
+
/**
|
|
718
|
+
* Unique identifier for the fixed tab
|
|
719
|
+
*
|
|
720
|
+
* Note: Shouldn't contain '-'
|
|
721
|
+
*/
|
|
722
|
+
id: string;
|
|
723
|
+
idPrefix?: never;
|
|
724
|
+
} | {
|
|
725
|
+
type: 'dynamic';
|
|
726
|
+
id?: never;
|
|
663
727
|
idPrefix: string;
|
|
664
|
-
}
|
|
728
|
+
});
|
|
665
729
|
export interface DynamicTabType extends CommonTabArgsType {
|
|
666
730
|
id: string;
|
|
731
|
+
/**
|
|
732
|
+
* Id of the last active tab before switching to current tab
|
|
733
|
+
*/
|
|
734
|
+
lastActiveTabId: string | null;
|
|
667
735
|
}
|
|
668
736
|
export {};
|