@devtron-labs/devtron-fe-common-lib 0.6.1-beta-6 → 0.6.1-beta-8
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/Api.d.ts +1 -1
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -17
- package/dist/Common/SortableTableHeaderCell/index.d.ts +0 -1
- package/dist/Common/SortableTableHeaderCell/types.d.ts +16 -49
- package/dist/Shared/API/APIQueuing.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/types.d.ts +8 -5
- package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +2 -1
- package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -0
- package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-K8H12v7j.js → cssMode-Bqwgvsfb.js} +1 -1
- package/dist/{freemarker2-DqZHY7us.js → freemarker2-DyB2xsGb.js} +1 -1
- package/dist/{handlebars-DOwTtyDN.js → handlebars-BW2NCmpF.js} +1 -1
- package/dist/{html-Cuel-bnX.js → html-DAtFxAjl.js} +1 -1
- package/dist/{htmlMode-B0uNYk02.js → htmlMode-7jeUr8ka.js} +1 -1
- package/dist/{index-DNzvaC_C.js → index-BvA9uzJS.js} +14599 -14590
- package/dist/index.d.ts +1 -0
- package/dist/index.js +131 -131
- package/dist/{javascript-CbKfi5nk.js → javascript-DWllwK0G.js} +1 -1
- package/dist/{jsonMode-C8yx1ILD.js → jsonMode-DqFRhX88.js} +1 -1
- package/dist/{liquid-ZlV6B0HU.js → liquid-CVDqnJAP.js} +1 -1
- package/dist/{mdx-DEJ0_BUr.js → mdx-wOxJ7nsX.js} +1 -1
- package/dist/{python-B7Csvvd1.js → python-CnXN70-O.js} +1 -1
- package/dist/{razor-BCgpMDNZ.js → razor-BfC5Pm7c.js} +1 -1
- package/dist/{tsMode-CmxoASMc.js → tsMode-DPK8U8g0.js} +1 -1
- package/dist/{typescript-BnbI3tAO.js → typescript-Dak9oql0.js} +1 -1
- package/dist/{xml-C0gQgpRl.js → xml-DxXFStky.js} +1 -1
- package/dist/{yaml-DaHdTiuN.js → yaml-BmBix5In.js} +1 -1
- package/package.json +1 -1
- package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +0 -9
package/dist/Common/Api.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ export declare const abortPreviousRequests: <T>(callback: () => Promise<T>, abor
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns true if the error is due to a aborted request
|
|
14
14
|
*/
|
|
15
|
-
export declare const getIsRequestAborted: (error: any) =>
|
|
15
|
+
export declare const getIsRequestAborted: (error: any) => boolean;
|
|
@@ -12,22 +12,6 @@ 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
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <SortableTableHeaderCell
|
|
27
|
-
* isSortable={false}
|
|
28
|
-
* title="Header Cell"
|
|
29
|
-
* />
|
|
30
|
-
* ```
|
|
31
15
|
*/
|
|
32
|
-
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate,
|
|
16
|
+
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
33
17
|
export default SortableTableHeaderCell;
|
|
@@ -1,68 +1,35 @@
|
|
|
1
1
|
import { SortingOrder } from '../Constants';
|
|
2
|
-
export
|
|
2
|
+
export interface SortableTableHeaderCellProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* If true, the tippy is shown on Sortable header if text is truncated
|
|
9
|
-
* @default false
|
|
4
|
+
* If true, the cell is sorted
|
|
10
5
|
*/
|
|
11
|
-
|
|
12
|
-
} & ({
|
|
6
|
+
isSorted: boolean;
|
|
13
7
|
/**
|
|
14
|
-
*
|
|
8
|
+
* Callback for handling the sorting of the cell
|
|
15
9
|
*/
|
|
16
|
-
|
|
10
|
+
triggerSorting: () => void;
|
|
17
11
|
/**
|
|
18
|
-
*
|
|
12
|
+
* Current sort order
|
|
19
13
|
*
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
isResizable: true | boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Resize handler for the table
|
|
14
|
+
* Note: On click, the sort order should be updated as required
|
|
25
15
|
*/
|
|
26
|
-
|
|
27
|
-
} | {
|
|
28
|
-
id?: never;
|
|
29
|
-
isResizable?: false | undefined;
|
|
30
|
-
handleResize?: never;
|
|
31
|
-
}) & ({
|
|
16
|
+
sortOrder: SortingOrder;
|
|
32
17
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @default true
|
|
18
|
+
* Label for the cell
|
|
35
19
|
*/
|
|
36
|
-
|
|
20
|
+
title: string;
|
|
37
21
|
/**
|
|
38
22
|
* If true, the cell is disabled
|
|
39
23
|
*/
|
|
40
24
|
disabled: boolean;
|
|
41
25
|
/**
|
|
42
|
-
* If
|
|
43
|
-
|
|
44
|
-
isSorted: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Callback for handling the sorting of the cell
|
|
26
|
+
* If false, the cell acts like normal table header cell
|
|
27
|
+
* @default true
|
|
47
28
|
*/
|
|
48
|
-
|
|
29
|
+
isSortable?: boolean;
|
|
49
30
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* Note: On click, the sort order should be updated as required
|
|
31
|
+
* If true, the tippy is shown on Sortable header if text is truncated
|
|
32
|
+
* @default false
|
|
53
33
|
*/
|
|
54
|
-
|
|
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
|
-
})[];
|
|
34
|
+
showTippyOnTruncate?: boolean;
|
|
68
35
|
}
|
|
@@ -6,5 +6,5 @@ import { ApiQueuingWithBatchResponseItem } from '../types';
|
|
|
6
6
|
* @param shouldRejectOnError If set to true, the promise will reject if any of the function calls rejects, i.e, acts like Promise.all else Promise.allSettled . Defaults to false.
|
|
7
7
|
* @returns A promise that resolves to a array of objects containing the status and value of the batch execution.
|
|
8
8
|
*/
|
|
9
|
-
declare const ApiQueuingWithBatch: <T>(functionCalls: any,
|
|
9
|
+
declare const ApiQueuingWithBatch: <T>(functionCalls: any, shouldRejectOnError?: boolean, batchSize?: number) => Promise<ApiQueuingWithBatchResponseItem<T>[]>;
|
|
10
10
|
export default ApiQueuingWithBatch;
|
|
@@ -24,6 +24,7 @@ export interface UseBulkSelectionReturnType<T> extends GetBulkSelectionCheckboxV
|
|
|
24
24
|
handleBulkSelection: ({ action, data }: HandleBulkSelectionType<T>) => void;
|
|
25
25
|
isBulkSelectionApplied: boolean;
|
|
26
26
|
getSelectedIdentifiersCount: () => number;
|
|
27
|
+
setIdentifiers: React.Dispatch<React.SetStateAction<T>>;
|
|
27
28
|
}
|
|
28
29
|
export interface BulkSelectionProps {
|
|
29
30
|
showPagination: boolean;
|
|
@@ -44,14 +45,16 @@ export declare enum SelectAllDialogStatus {
|
|
|
44
45
|
}
|
|
45
46
|
export type BulkSelectionIdentifiersType<T> = Record<string | number, T>;
|
|
46
47
|
export interface UseBulkSelectionProps<T> {
|
|
47
|
-
/**
|
|
48
|
-
* Response from API, assuming structure to be array of objects with key and values
|
|
49
|
-
* This will the given ids on current page
|
|
50
|
-
*/
|
|
51
|
-
identifiers: T;
|
|
52
48
|
/**
|
|
53
49
|
* Act as buffer between select all across pages and select all on page state
|
|
54
50
|
*/
|
|
55
51
|
getSelectAllDialogStatus: () => SelectAllDialogStatus;
|
|
52
|
+
/**
|
|
53
|
+
* Response from API, assuming structure to be array of objects with key and values
|
|
54
|
+
* This will the given ids on current page.
|
|
55
|
+
*
|
|
56
|
+
* NOTE!: Please wrap this value with a useMemo since it goes into useEffect dependency
|
|
57
|
+
*/
|
|
58
|
+
identifiers?: T;
|
|
56
59
|
children?: React.ReactNode;
|
|
57
60
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
|
|
1
|
+
import { DetailViewDataType, ImageScan, SecurityModalStateType, TablePropsType, StatusType, InfoCardPropsType, EmptyStateType, ApiResponseResultType, OpenDetailViewButtonProps } from '../types';
|
|
2
|
+
export declare const getProgressingStateForStatus: (status: StatusType["status"]) => JSX.Element;
|
|
2
3
|
export declare const getImageScanTableData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"], setDetailViewData: OpenDetailViewButtonProps["setDetailViewData"], hidePolicy: boolean) => TablePropsType;
|
|
3
4
|
export declare const getImageScanInfoCardData: (data: ImageScan, subCategory: SecurityModalStateType["subCategory"]) => InfoCardPropsType;
|
|
4
5
|
export declare const getImageScanEmptyState: (data: ApiResponseResultType, subCategory: SecurityModalStateType["subCategory"], detailViewData: DetailViewDataType) => EmptyStateType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as SecurityModal } from './SecurityModal';
|
|
2
2
|
export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, parseExecutionDetailResponse, } from './utils';
|
|
3
3
|
export type { AppDetailsPayload, ExecutionDetailsPayload, ApiResponseResultType, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
|
|
4
|
-
export { SIDEBAR_DATA } from './config';
|
|
4
|
+
export { SIDEBAR_DATA, getProgressingStateForStatus } from './config';
|
|
5
5
|
export { CATEGORY_LABELS } from './constants';
|
|
6
6
|
export { getExecutionDetails } from './service';
|