@devtron-labs/devtron-fe-common-lib 0.6.3 → 0.6.4-beta-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/Common/Common.service.d.ts +7 -0
- package/dist/Common/Constants.d.ts +14 -0
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +18 -1
- package/dist/Common/SortableTableHeaderCell/constants.d.ts +2 -0
- package/dist/Common/SortableTableHeaderCell/index.d.ts +1 -0
- package/dist/Common/SortableTableHeaderCell/types.d.ts +49 -16
- package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +6 -0
- package/dist/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.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-D7UJNzFf.js → cssMode-DfzZp_KE.js} +1 -1
- package/dist/{freemarker2-B9TV79rn.js → freemarker2-ZCt6aOUm.js} +1 -1
- package/dist/{handlebars-R9-MToAx.js → handlebars-iNdvLX3Y.js} +1 -1
- package/dist/{html-izC5sZFT.js → html-i23Pu4Yo.js} +1 -1
- package/dist/{htmlMode-BnGQPUNP.js → htmlMode-D6NjSJnS.js} +1 -1
- package/dist/{index-mQBrLW_P.js → index-BL3VRkuy.js} +16266 -16255
- package/dist/index.js +419 -413
- package/dist/{javascript-bwYez1s6.js → javascript-doF9AmOT.js} +1 -1
- package/dist/{jsonMode-BnuobPu6.js → jsonMode-Ba8Poso8.js} +1 -1
- package/dist/{liquid-DhKncEIb.js → liquid-J5waK2Oo.js} +1 -1
- package/dist/{mdx-UaB8vbXI.js → mdx-C4L90nFn.js} +1 -1
- package/dist/{python-COqivIk3.js → python-Bw82sXXa.js} +1 -1
- package/dist/{razor-CBZPPrOW.js → razor-B0jVZT_-.js} +1 -1
- package/dist/{tsMode-DR4P1U0G.js → tsMode-BAe82g7m.js} +1 -1
- package/dist/{typescript-Ulf2zjMt.js → typescript-ByWJEdt3.js} +1 -1
- package/dist/{xml-BgcDeobr.js → xml-CPvbX7Vn.js} +1 -1
- package/dist/{yaml-CpVBLbDq.js → yaml-DL7R5OIz.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 {};
|
|
@@ -291,3 +291,17 @@ export declare const VULNERABILITIES_SORT_PRIORITY: {
|
|
|
291
291
|
unknown: number;
|
|
292
292
|
};
|
|
293
293
|
export declare const IS_PLATFORM_MAC_OS: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Git provider types
|
|
296
|
+
*/
|
|
297
|
+
export declare enum GitProviderType {
|
|
298
|
+
GITHUB = "github",
|
|
299
|
+
GITLAB = "gitlab",
|
|
300
|
+
BITBUCKET = "bitbucket",
|
|
301
|
+
AZURE = "azure",
|
|
302
|
+
GITEA = "gitea"
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Formats the schema removing any irregularity in the existing schema
|
|
306
|
+
*/
|
|
307
|
+
export declare const getFormattedSchema: (schema?: string) => string;
|
|
@@ -12,6 +12,23 @@ import { SortableTableHeaderCellProps } from './types';
|
|
|
12
12
|
* disabled={isDisabled}
|
|
13
13
|
* />
|
|
14
14
|
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example Non-sortable cell
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <SortableTableHeaderCell
|
|
19
|
+
* isSortable={false}
|
|
20
|
+
* title="Header Cell"
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* * @example Resizable cell (Layout to be controlled externally using useResizableTableConfig)
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <SortableTableHeaderCell
|
|
27
|
+
* isSortable={false}
|
|
28
|
+
* isResizable
|
|
29
|
+
* title="Header Cell"
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
15
32
|
*/
|
|
16
|
-
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
33
|
+
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, id, handleResize, isResizable, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
17
34
|
export default SortableTableHeaderCell;
|
|
@@ -1,35 +1,68 @@
|
|
|
1
1
|
import { SortingOrder } from '../Constants';
|
|
2
|
-
export
|
|
2
|
+
export type SortableTableHeaderCellProps = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Label for the cell
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
title: string;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* If true, the tippy is shown on Sortable header if text is truncated
|
|
9
|
+
* @default false
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
+
showTippyOnTruncate?: boolean;
|
|
12
|
+
} & ({
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
14
|
+
* Unique identifier for the column
|
|
15
|
+
*/
|
|
16
|
+
id: string | number;
|
|
17
|
+
/**
|
|
18
|
+
* If true, the cell is resizable
|
|
13
19
|
*
|
|
14
|
-
*
|
|
20
|
+
* @default false
|
|
15
21
|
*/
|
|
16
|
-
|
|
22
|
+
isResizable: true | boolean;
|
|
17
23
|
/**
|
|
18
|
-
*
|
|
24
|
+
* Resize handler for the table
|
|
19
25
|
*/
|
|
20
|
-
|
|
26
|
+
handleResize: (id: string | number, deltaChange: number) => void;
|
|
27
|
+
} | {
|
|
28
|
+
id?: never;
|
|
29
|
+
isResizable?: false | undefined;
|
|
30
|
+
handleResize?: never;
|
|
31
|
+
}) & ({
|
|
32
|
+
/**
|
|
33
|
+
* If false, the cell acts like normal table header cell
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
isSortable?: boolean | undefined;
|
|
21
37
|
/**
|
|
22
38
|
* If true, the cell is disabled
|
|
23
39
|
*/
|
|
24
40
|
disabled: boolean;
|
|
25
41
|
/**
|
|
26
|
-
* If
|
|
27
|
-
* @default true
|
|
42
|
+
* If true, the cell is sorted
|
|
28
43
|
*/
|
|
29
|
-
|
|
44
|
+
isSorted: boolean;
|
|
30
45
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @default false
|
|
46
|
+
* Callback for handling the sorting of the cell
|
|
33
47
|
*/
|
|
34
|
-
|
|
48
|
+
triggerSorting: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Current sort order
|
|
51
|
+
*
|
|
52
|
+
* Note: On click, the sort order should be updated as required
|
|
53
|
+
*/
|
|
54
|
+
sortOrder: SortingOrder;
|
|
55
|
+
} | {
|
|
56
|
+
isSortable: false;
|
|
57
|
+
disabled?: never;
|
|
58
|
+
isSorted?: never;
|
|
59
|
+
triggerSorting?: never;
|
|
60
|
+
sortOrder?: never;
|
|
61
|
+
});
|
|
62
|
+
export interface UseResizableTableConfigProps {
|
|
63
|
+
headersConfig: (Pick<SortableTableHeaderCellProps, 'id'> & {
|
|
64
|
+
width: number | string;
|
|
65
|
+
maxWidth?: number;
|
|
66
|
+
minWidth?: number;
|
|
67
|
+
})[];
|
|
35
68
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseResizableTableConfigProps } from './types';
|
|
2
|
+
declare const useResizableTableConfig: ({ headersConfig }: UseResizableTableConfigProps) => {
|
|
3
|
+
gridTemplateColumns: string;
|
|
4
|
+
handleResize: (headerCellId: UseResizableTableConfigProps["headersConfig"][number]["id"], deltaChange: number) => void;
|
|
5
|
+
};
|
|
6
|
+
export default useResizableTableConfig;
|
|
@@ -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;
|
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;
|