@devtron-labs/devtron-fe-common-lib 0.6.1-beta-7 → 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.
Files changed (30) hide show
  1. package/dist/Common/Api.d.ts +1 -1
  2. package/dist/Common/Hooks/useUrlFilters/types.d.ts +0 -1
  3. package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
  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/Shared/Components/SelectPicker/type.d.ts +1 -1
  10. package/dist/assets/index.css +1 -1
  11. package/dist/{cssMode-BMU6EYjy.js → cssMode-Bqwgvsfb.js} +1 -1
  12. package/dist/{freemarker2-DdwnH3jz.js → freemarker2-DyB2xsGb.js} +1 -1
  13. package/dist/{handlebars-D0ZzmK4q.js → handlebars-BW2NCmpF.js} +1 -1
  14. package/dist/{html-DBHemnBi.js → html-DAtFxAjl.js} +1 -1
  15. package/dist/{htmlMode-yB33T7us.js → htmlMode-7jeUr8ka.js} +1 -1
  16. package/dist/{index-B5_txzYq.js → index-BvA9uzJS.js} +11402 -11391
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +155 -154
  19. package/dist/{javascript-Bniqn1iX.js → javascript-DWllwK0G.js} +1 -1
  20. package/dist/{jsonMode-DczaFWxo.js → jsonMode-DqFRhX88.js} +1 -1
  21. package/dist/{liquid-DI-QnklI.js → liquid-CVDqnJAP.js} +1 -1
  22. package/dist/{mdx-CgvklWx9.js → mdx-wOxJ7nsX.js} +1 -1
  23. package/dist/{python-DD96kNqx.js → python-CnXN70-O.js} +1 -1
  24. package/dist/{razor-BhNmwM8H.js → razor-BfC5Pm7c.js} +1 -1
  25. package/dist/{tsMode-DL1QNVlX.js → tsMode-DPK8U8g0.js} +1 -1
  26. package/dist/{typescript-CWOt8D1v.js → typescript-Dak9oql0.js} +1 -1
  27. package/dist/{xml-kdR12t8R.js → xml-DxXFStky.js} +1 -1
  28. package/dist/{yaml-CpILAyPe.js → yaml-BmBix5In.js} +1 -1
  29. package/package.json +1 -1
  30. package/dist/Common/Hooks/useUrlFilters/utils.d.ts +0 -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;
@@ -8,7 +8,6 @@ export interface UseUrlFiltersProps<T, K> {
8
8
  * Callback function for parsing the search params
9
9
  */
10
10
  parseSearchParams?: (searchParams: URLSearchParams) => K;
11
- localStorageKey?: `${string}__${string}`;
12
11
  }
13
12
  export type UseUrlFiltersReturnType<T, K = unknown> = K & {
14
13
  /**
@@ -16,5 +16,5 @@ import { UseUrlFiltersProps, UseUrlFiltersReturnType } from './types';
16
16
  * ```
17
17
  *
18
18
  */
19
- declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
19
+ declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
20
20
  export default useUrlFilters;
@@ -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';
@@ -168,7 +168,7 @@ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boo
168
168
  export type SelectPickerGroupHeadingProps<OptionValue> = GroupHeadingProps<SelectPickerOptionType<OptionValue>> & {
169
169
  isGroupHeadingSelectable: boolean;
170
170
  };
171
- export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList' | 'isOptionDisabled'> {
171
+ export interface FilterSelectPickerProps extends Required<Pick<SelectPickerProps<number | string, true>, 'options' | 'isDisabled' | 'placeholder' | 'isLoading'>>, Pick<SelectPickerProps<number | string, true>, 'selectRef' | 'inputId' | 'menuPosition' | 'autoFocus' | 'shouldMenuAlignRight' | 'optionListError' | 'reloadOptionList'> {
172
172
  appliedFilterOptions: SelectPickerOptionType[];
173
173
  handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
174
174
  }