@devtron-labs/devtron-fe-common-lib 0.6.2-beta-6 → 0.6.2-beta-7

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.
Files changed (27) hide show
  1. package/dist/Common/Api.d.ts +1 -1
  2. package/dist/Common/RJSF/Form.d.ts +2 -1
  3. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +24 -0
  4. package/dist/Shared/API/APIQueuing.d.ts +1 -1
  5. package/dist/Shared/Components/BulkSelection/types.d.ts +8 -5
  6. package/dist/Shared/Components/Security/SecurityModal/config/ImageScan.d.ts +2 -1
  7. package/dist/Shared/Components/Security/SecurityModal/config/index.d.ts +1 -0
  8. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -1
  9. package/dist/{cssMode-CBJZhf0-.js → cssMode-BeOqUf-u.js} +1 -1
  10. package/dist/{freemarker2-hEQVrjNp.js → freemarker2-Dou8wYrw.js} +1 -1
  11. package/dist/{handlebars-Boz7X6Rm.js → handlebars-vxI9Dv3q.js} +1 -1
  12. package/dist/{html-DjzE7Cyz.js → html-CCx7qZKl.js} +1 -1
  13. package/dist/{htmlMode-BlM5kBU0.js → htmlMode-C4mmML5b.js} +1 -1
  14. package/dist/{index-jXS95ovn.js → index-BmXMqx6e.js} +5256 -5234
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +155 -154
  17. package/dist/{javascript-DYZpS90l.js → javascript-Chz7FGm-.js} +1 -1
  18. package/dist/{jsonMode-DkmyVM6Q.js → jsonMode-BiRXhzru.js} +1 -1
  19. package/dist/{liquid-QlR3HW1o.js → liquid-3IhtqszZ.js} +1 -1
  20. package/dist/{mdx-JoJwrnEl.js → mdx-CuLOc5Vm.js} +1 -1
  21. package/dist/{python-CSzr6I51.js → python-D52x4OXV.js} +1 -1
  22. package/dist/{razor-j4WQlxOa.js → razor-DsGaDP3f.js} +1 -1
  23. package/dist/{tsMode-dHMPBCur.js → tsMode-BGje_PPi.js} +1 -1
  24. package/dist/{typescript-C19wFxR6.js → typescript-D5-YqLSs.js} +1 -1
  25. package/dist/{xml-C1cynSMu.js → xml-dMG1PR-K.js} +1 -1
  26. package/dist/{yaml-DFHG3uK0.js → yaml-CV5aNzFJ.js} +1 -1
  27. package/package.json +1 -1
@@ -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) => any;
15
+ export declare const getIsRequestAborted: (error: any) => boolean;
@@ -1,2 +1,3 @@
1
+ import { default as RJSF } from '@rjsf/core';
1
2
  import { FormProps } from './types';
2
- export declare const RJSFForm: (props: FormProps) => JSX.Element;
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, httpProtocol: string, shouldRejectOnError?: boolean, batchSize?: number) => Promise<ApiQueuingWithBatchResponseItem<T>[]>;
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,3 +1,4 @@
1
1
  export { getTableData } from './Table';
2
2
  export { getInfoCardData } from './InfoCard';
3
3
  export { SIDEBAR_DATA } from './Sidebar';
4
+ export { getProgressingStateForStatus } from './ImageScan';
@@ -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';
@@ -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-jXS95ovn.js";
4
+ import { m as je } from "./index-BmXMqx6e.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-jXS95ovn.js";
1
+ import { m as f } from "./index-BmXMqx6e.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-jXS95ovn.js";
1
+ import { m as l } from "./index-BmXMqx6e.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-jXS95ovn.js";
1
+ import { m as s } from "./index-BmXMqx6e.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-jXS95ovn.js";
4
+ import { m as qe } from "./index-BmXMqx6e.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)