@devtron-labs/devtron-fe-common-lib 0.6.2-beta-6 → 0.6.2-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/Constants.d.ts +1 -0
- package/dist/Common/Helper.d.ts +5 -0
- package/dist/Common/RJSF/Form.d.ts +2 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +24 -0
- package/dist/Pages/ResourceBrowser/index.d.ts +1 -0
- package/dist/Pages/ResourceBrowser/types.d.ts +10 -0
- 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/Shared/types.d.ts +29 -1
- package/dist/Shared/validations.d.ts +1 -0
- package/dist/{cssMode-CBJZhf0-.js → cssMode-DhpyNpwP.js} +1 -1
- package/dist/{freemarker2-hEQVrjNp.js → freemarker2-gbI4cQff.js} +1 -1
- package/dist/{handlebars-Boz7X6Rm.js → handlebars-DdZNMWTq.js} +1 -1
- package/dist/{html-DjzE7Cyz.js → html-PjuSSnfI.js} +1 -1
- package/dist/{htmlMode-BlM5kBU0.js → htmlMode-C4kkX3dn.js} +1 -1
- package/dist/{index-jXS95ovn.js → index-C5OcP-w_.js} +16644 -16557
- package/dist/index.d.ts +1 -0
- package/dist/index.js +529 -523
- package/dist/{javascript-DYZpS90l.js → javascript-DylBlq-c.js} +1 -1
- package/dist/{jsonMode-DkmyVM6Q.js → jsonMode-DGUKxP-_.js} +1 -1
- package/dist/{liquid-QlR3HW1o.js → liquid-De1NZMXh.js} +1 -1
- package/dist/{mdx-JoJwrnEl.js → mdx-DtRpni0T.js} +1 -1
- package/dist/{python-CSzr6I51.js → python-r2uqTtWV.js} +1 -1
- package/dist/{razor-j4WQlxOa.js → razor-B2XtTIGH.js} +1 -1
- package/dist/{tsMode-dHMPBCur.js → tsMode-CCTMo4AQ.js} +1 -1
- package/dist/{typescript-C19wFxR6.js → typescript-CmtQYW40.js} +1 -1
- package/dist/{xml-C1cynSMu.js → xml-BFtOOM-U.js} +1 -1
- package/dist/{yaml-DFHG3uK0.js → yaml-JtuT49w5.js} +1 -1
- package/package.json +2 -1
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;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -121,4 +121,9 @@ 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
|
+
export declare const getSanitizedIframe: (iframeString: string) => string;
|
|
125
|
+
/**
|
|
126
|
+
* This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
|
|
127
|
+
*/
|
|
128
|
+
export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
|
|
124
129
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { default as RJSF } from '@rjsf/core';
|
|
1
2
|
import { FormProps } from './types';
|
|
2
|
-
export declare const RJSFForm: (
|
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "action" | "disabled" | "name" | "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>>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NodeType, Nodes } from '../../Shared/types';
|
|
2
|
+
import { RefObject } from 'react';
|
|
2
3
|
export interface GVKType {
|
|
3
4
|
Group: string;
|
|
4
5
|
Version: string;
|
|
@@ -40,4 +41,27 @@ export interface K8sResourceDetailType {
|
|
|
40
41
|
headers: string[];
|
|
41
42
|
data: K8sResourceDetailDataType[];
|
|
42
43
|
}
|
|
44
|
+
export interface BulkSelectionActionWidgetProps {
|
|
45
|
+
count: number;
|
|
46
|
+
handleOpenBulkDeleteModal: () => void;
|
|
47
|
+
handleClearBulkSelection: () => void;
|
|
48
|
+
handleOpenRestartWorkloadModal: () => void;
|
|
49
|
+
parentRef: RefObject<HTMLDivElement>;
|
|
50
|
+
showBulkRestartOption: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface BulkOperation {
|
|
53
|
+
name: string;
|
|
54
|
+
operation: (signal: AbortSignal, data?: unknown) => Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export type BulkOperationModalProps = {
|
|
57
|
+
operationType: 'restart' | 'delete';
|
|
58
|
+
clusterName: string;
|
|
59
|
+
operations: NonNullable<BulkOperation[]>;
|
|
60
|
+
handleModalClose: () => void;
|
|
61
|
+
resourceKind: string;
|
|
62
|
+
handleReloadDataAfterBulkOperation?: () => void;
|
|
63
|
+
hideResultsDrawer?: boolean;
|
|
64
|
+
shouldAllowForceOperation?: true;
|
|
65
|
+
};
|
|
66
|
+
export type BulkOperationModalState = BulkOperationModalProps['operationType'] | 'closed';
|
|
43
67
|
export {};
|
|
@@ -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';
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Dayjs } from 'dayjs';
|
|
1
2
|
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
3
|
import { KeyValueListType } from './Components';
|
|
3
4
|
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
@@ -84,7 +85,8 @@ export declare enum Nodes {
|
|
|
84
85
|
PodDisruptionBudget = "PodDisruptionBudget",
|
|
85
86
|
Event = "Event",
|
|
86
87
|
Namespace = "Namespace",
|
|
87
|
-
Overview = "Overview"
|
|
88
|
+
Overview = "Overview",
|
|
89
|
+
MonitoringDashboard = "MonitoringDashboard"
|
|
88
90
|
}
|
|
89
91
|
export type NodeType = keyof typeof Nodes;
|
|
90
92
|
export interface Node {
|
|
@@ -579,6 +581,7 @@ export declare enum ConfigurationType {
|
|
|
579
581
|
export interface BaseURLParams {
|
|
580
582
|
appId: string;
|
|
581
583
|
envId: string;
|
|
584
|
+
clusterId: string;
|
|
582
585
|
}
|
|
583
586
|
export interface ConfigKeysWithLockType {
|
|
584
587
|
config: string[];
|
|
@@ -625,4 +628,29 @@ export interface CustomRoleAndMeta {
|
|
|
625
628
|
possibleRolesMetaForCluster: MetaPossibleRoles;
|
|
626
629
|
possibleRolesMetaForJob: MetaPossibleRoles;
|
|
627
630
|
}
|
|
631
|
+
interface CommonTabArgsType {
|
|
632
|
+
name: string;
|
|
633
|
+
kind?: string;
|
|
634
|
+
url: string;
|
|
635
|
+
isSelected: boolean;
|
|
636
|
+
title?: string;
|
|
637
|
+
isDeleted?: boolean;
|
|
638
|
+
position: number;
|
|
639
|
+
iconPath?: string;
|
|
640
|
+
dynamicTitle?: string;
|
|
641
|
+
showNameOnSelect?: boolean;
|
|
642
|
+
/**
|
|
643
|
+
* @default false
|
|
644
|
+
*/
|
|
645
|
+
hideName?: boolean;
|
|
646
|
+
isAlive?: boolean;
|
|
647
|
+
lastSyncMoment?: Dayjs;
|
|
648
|
+
componentKey?: string;
|
|
649
|
+
}
|
|
650
|
+
export interface InitTabType extends CommonTabArgsType {
|
|
651
|
+
idPrefix: string;
|
|
652
|
+
}
|
|
653
|
+
export interface DynamicTabType extends CommonTabArgsType {
|
|
654
|
+
id: string;
|
|
655
|
+
}
|
|
628
656
|
export {};
|
|
@@ -42,3 +42,4 @@ export declare const validateSemanticVersioning: (version: string) => Validation
|
|
|
42
42
|
*/
|
|
43
43
|
export declare const validateDisplayName: (name: string) => ValidationResponseType;
|
|
44
44
|
export declare const validateJSON: (json: string) => ValidationResponseType;
|
|
45
|
+
export declare const validateIframe: (input: string) => ValidationResponseType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Fe = Object.defineProperty;
|
|
2
2
|
var Le = (e, n, i) => n in e ? Fe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
|
|
3
3
|
var k = (e, n, i) => Le(e, typeof n != "symbol" ? n + "" : n, i);
|
|
4
|
-
import { m as je } from "./index-
|
|
4
|
+
import { m as je } from "./index-C5OcP-w_.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as f } from "./index-
|
|
1
|
+
import { m as f } from "./index-C5OcP-w_.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as l } from "./index-
|
|
1
|
+
import { m as l } from "./index-C5OcP-w_.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./index-
|
|
1
|
+
import { m as s } from "./index-C5OcP-w_.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Be = Object.defineProperty;
|
|
2
2
|
var $e = (e, n, i) => n in e ? Be(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
|
|
3
3
|
var k = (e, n, i) => $e(e, typeof n != "symbol" ? n + "" : n, i);
|
|
4
|
-
import { m as qe } from "./index-
|
|
4
|
+
import { m as qe } from "./index-C5OcP-w_.js";
|
|
5
5
|
/*!-----------------------------------------------------------------------------
|
|
6
6
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
7
7
|
* Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
|