@devtron-labs/devtron-fe-common-lib 1.20.3-pre-2 → 1.20.3-pre-4
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/{@code-editor-B795B-vT.js → @code-editor-CeahPz46.js} +6799 -6627
- package/dist/{@common-rjsf-BeQqdyJi.js → @common-rjsf-BGDb4n0x.js} +15 -15
- package/dist/{@framer-motion-D-YaCAW-.js → @framer-motion-CyE9ZrhW.js} +1 -1
- package/dist/{@react-dates-Bo3yT8LF.js → @react-dates-DZKuosYz.js} +1 -1
- package/dist/{@react-select-DTi_5fIc.js → @react-select-D2LpysD2.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-CuvDiqTo.js → @react-virtualized-sticky-tree-ok_G4gcR.js} +1 -1
- package/dist/{@vendor-DMIFbFhR.js → @vendor-DwGKptu5.js} +14520 -14362
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +3 -3
- package/dist/Shared/Components/ExportToCsv/ExportToCsv.d.ts +3 -0
- package/dist/Shared/Components/ExportToCsv/ExportToCsvDialog.d.ts +3 -0
- package/dist/Shared/Components/ExportToCsv/index.d.ts +2 -0
- package/dist/Shared/Components/ExportToCsv/types.d.ts +64 -0
- package/dist/Shared/Components/Icon/Icon.d.ts +1 -0
- package/dist/Shared/Components/Table/types.d.ts +6 -4
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/assets/ic-arrow-line-down.b6a98848.svg +3 -0
- package/dist/index.js +708 -707
- package/package.json +3 -1
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { RefObject } from 'react';
|
2
|
+
import { FiltersTypeEnum, TableViewWrapperProps } from '../../Shared/Components';
|
2
3
|
import { Nodes, NodeType } from '../../Shared/types';
|
3
4
|
export interface GVKType {
|
4
5
|
Group: string;
|
@@ -136,8 +137,7 @@ export interface GVKOptionValueType {
|
|
136
137
|
kind: string;
|
137
138
|
apiVersion: string;
|
138
139
|
}
|
139
|
-
export interface ResourceRecommenderActionMenuProps {
|
140
|
-
children: ReactNode;
|
140
|
+
export interface ResourceRecommenderActionMenuProps extends Pick<TableViewWrapperProps<K8sResourceDetailDataType, FiltersTypeEnum.URL>, 'filteredRows'> {
|
141
141
|
lastScannedOn: string;
|
142
142
|
}
|
143
143
|
export {};
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { ExportToCsvProps } from './types';
|
2
|
+
declare const ExportToCsv: <HeaderItemType extends string>({ apiPromise, fileName, triggerElementConfig, disabled, modalConfig, headers, downloadRequestId, }: ExportToCsvProps<HeaderItemType>) => JSX.Element;
|
3
|
+
export default ExportToCsv;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { ServerErrors } from '../../../Common/ServerError';
|
2
|
+
import { APIOptions } from '../../../Common/Types';
|
3
|
+
import { ButtonProps } from '../Button';
|
4
|
+
type TriggerElementConfigType = {
|
5
|
+
buttonProps: ButtonProps;
|
6
|
+
showOnlyIcon?: boolean;
|
7
|
+
customButton?: never;
|
8
|
+
isExternalTrigger?: false;
|
9
|
+
} | {
|
10
|
+
customButton: {
|
11
|
+
content: JSX.Element;
|
12
|
+
className: string;
|
13
|
+
};
|
14
|
+
buttonProps?: never;
|
15
|
+
showOnlyIcon?: false;
|
16
|
+
isExternalTrigger?: false;
|
17
|
+
} | {
|
18
|
+
isExternalTrigger: true;
|
19
|
+
showOnlyIcon?: false;
|
20
|
+
buttonProps?: never;
|
21
|
+
customButton?: never;
|
22
|
+
} | {
|
23
|
+
showOnlyIcon: true;
|
24
|
+
buttonProps?: never;
|
25
|
+
customButton?: never;
|
26
|
+
isExternalTrigger?: false;
|
27
|
+
};
|
28
|
+
export interface ExportToCsvProps<HeaderItemKeyType extends string> {
|
29
|
+
headers: {
|
30
|
+
label: string;
|
31
|
+
key: HeaderItemKeyType;
|
32
|
+
}[];
|
33
|
+
apiPromise: ({ signal, }: Pick<APIOptions, 'signal'>) => Promise<Record<HeaderItemKeyType, string | number | boolean>[]>;
|
34
|
+
fileName: string;
|
35
|
+
/**
|
36
|
+
* If nothing given will render a Button with "Export CSV" text
|
37
|
+
*/
|
38
|
+
triggerElementConfig?: TriggerElementConfigType;
|
39
|
+
/**
|
40
|
+
* @default false
|
41
|
+
*/
|
42
|
+
disabled?: boolean;
|
43
|
+
/**
|
44
|
+
* If not given would show default dialog
|
45
|
+
*/
|
46
|
+
modalConfig?: {
|
47
|
+
hideDialog: false;
|
48
|
+
renderCustomModal?: (proceedWithDownload: (shouldProceed: boolean) => void) => JSX.Element;
|
49
|
+
} | {
|
50
|
+
hideDialog: true;
|
51
|
+
renderCustomModal?: never;
|
52
|
+
};
|
53
|
+
/**
|
54
|
+
* If given, would trigger export on when this changes and has some value
|
55
|
+
*/
|
56
|
+
downloadRequestId?: string | number;
|
57
|
+
}
|
58
|
+
export interface ExportToCsvDialogProps {
|
59
|
+
isLoading: boolean;
|
60
|
+
exportDataError: ServerErrors;
|
61
|
+
initiateDownload: () => void;
|
62
|
+
handleCancelRequest: () => void;
|
63
|
+
}
|
64
|
+
export {};
|
@@ -10,6 +10,7 @@ export declare const iconMap: {
|
|
10
10
|
'ic-app-template': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
11
11
|
'ic-argocd-app': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
12
12
|
'ic-arrow-clockwise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
|
+
'ic-arrow-line-down': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
13
14
|
'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
14
15
|
'ic-arrow-square-out': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
15
16
|
'ic-arrows-clockwise': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Dispatch, FunctionComponent, MouseEvent, PropsWithChildren, SetStateAction } from 'react';
|
2
2
|
import { GenericFilterEmptyStateProps } from '../../../Common/EmptyState/types';
|
3
3
|
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps, UseUrlFiltersReturnType } from '../../../Common/Hooks';
|
4
|
-
import {
|
4
|
+
import { GenericEmptyStateType } from '../../../Common/index';
|
5
5
|
import { PageSizeOption } from '../../../Common/Pagination/types';
|
6
6
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
7
7
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
@@ -177,7 +177,7 @@ export type InternalTableProps<RowData extends unknown, FilterVariant extends Fi
|
|
177
177
|
} | {
|
178
178
|
rows?: never;
|
179
179
|
/** NOTE: Sorting on frontend is only handled if rows is provided instead of getRows */
|
180
|
-
getRows: (props: GetRowsProps,
|
180
|
+
getRows: (props: GetRowsProps, signal: AbortSignal) => Promise<{
|
181
181
|
rows: RowsType<RowData>;
|
182
182
|
totalRows: number;
|
183
183
|
}>;
|
@@ -206,9 +206,11 @@ export interface GetFilteringPromiseProps<RowData extends unknown> {
|
|
206
206
|
searchSortTimeoutRef: React.MutableRefObject<number>;
|
207
207
|
callback: () => Promise<RowsType<RowData>> | RowsType<RowData>;
|
208
208
|
}
|
209
|
-
export interface
|
209
|
+
export interface RowsResultType<RowData extends unknown> {
|
210
210
|
filteredRows: RowsType<RowData>;
|
211
|
-
areFilteredRowsLoading: boolean;
|
212
211
|
totalRows: number;
|
213
212
|
}
|
213
|
+
export interface TableContentProps<RowData extends unknown, FilterVariant extends FiltersTypeEnum, AdditionalProps extends Record<string, any>> extends Pick<InternalTableProps<RowData, FilterVariant, AdditionalProps>, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions' | 'getRows'>, RowsResultType<RowData> {
|
214
|
+
areFilteredRowsLoading: boolean;
|
215
|
+
}
|
214
216
|
export {};
|
@@ -37,6 +37,7 @@ export * from './EditImageFormField';
|
|
37
37
|
export * from './EnvironmentSelector';
|
38
38
|
export * from './Error';
|
39
39
|
export * from './ExcludedImageNode';
|
40
|
+
export * from './ExportToCsv';
|
40
41
|
export * from './FeatureDescription';
|
41
42
|
export * from './FileUpload';
|
42
43
|
export * from './FilterChips';
|