@devtron-labs/devtron-fe-common-lib 1.15.3-beta-4 → 1.15.3-pre-0
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-CPkXInuA.js → @code-editor-Cv0SnE5h.js} +8181 -8493
- package/dist/{@common-rjsf-DBpYEd_9.js → @common-rjsf-BjL8q0vr.js} +2 -2
- package/dist/{@framer-motion-BhKAac90.js → @framer-motion-BNW8cVs5.js} +1 -1
- package/dist/{@react-dates-CfRo6n5e.js → @react-dates-BUkYmC65.js} +1 -1
- package/dist/{@react-select-DNDV8S9D.js → @react-select-DelHyoAl.js} +1 -1
- package/dist/{@react-virtualized-sticky-tree-mXcyQzGx.js → @react-virtualized-sticky-tree-CGrGTQqK.js} +1 -1
- package/dist/{@vendor-CA9d7Ztm.js → @vendor-oJbr9Qso.js} +15809 -15843
- package/dist/Common/Constants.d.ts +0 -2
- package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutProvider.d.ts +1 -1
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +0 -3
- package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
- package/dist/Common/Hooks/useStateFilters/types.d.ts +2 -2
- package/dist/Common/Hooks/useStateFilters/useStateFilters.d.ts +1 -1
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -2
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
- package/dist/Common/Pagination/constants.d.ts +0 -4
- package/dist/Common/Pagination/index.d.ts +0 -1
- package/dist/Common/PopupMenu.d.ts +1 -2
- package/dist/Common/RJSF/Form.d.ts +1 -1
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +0 -1
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +2 -46
- package/dist/Pages/ResourceBrowser/constants.d.ts +0 -2
- package/dist/Pages/ResourceBrowser/service.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/BulkSelectionDropdownItems.d.ts +3 -0
- package/dist/Shared/Components/BulkSelection/types.d.ts +9 -1
- package/dist/Shared/Components/Icon/Icon.d.ts +0 -13
- package/dist/Shared/Components/InfoBlock/constants.d.ts +1 -2
- package/dist/Shared/Components/Security/SecurityModal/config/CodeScan.d.ts +7 -7
- package/dist/Shared/Components/Table/BulkSelectionActionWidget.d.ts +1 -1
- package/dist/Shared/Components/Table/InternalTable.d.ts +1 -1
- package/dist/Shared/Components/Table/constants.d.ts +0 -1
- package/dist/Shared/Components/Table/index.d.ts +1 -1
- package/dist/Shared/Components/Table/types.d.ts +20 -47
- package/dist/Shared/Components/Table/useTableWithKeyboardShortcuts.d.ts +1 -1
- package/dist/Shared/Components/Table/utils.d.ts +0 -5
- package/dist/Shared/Components/index.d.ts +0 -2
- package/dist/Shared/Helpers.d.ts +1 -2
- package/dist/Shared/Providers/types.d.ts +2 -2
- package/dist/Shared/Services/types.d.ts +0 -1
- package/dist/Shared/constants.d.ts +0 -1
- package/dist/Shared/types.d.ts +1 -11
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/@common-rjsf.css +1 -1
- package/dist/assets/ic-check-all.0376437d.svg +21 -0
- package/dist/assets/ic-check-square.2a3d3fb9.svg +20 -0
- package/dist/assets/{ic-minus.aac464f7.svg → ic-minus.416da21b.svg} +1 -1
- package/dist/index.js +841 -849
- package/package.json +1 -1
- package/dist/Shared/Components/Badge/Badge.d.ts +0 -3
- package/dist/Shared/Components/Badge/index.d.ts +0 -2
- package/dist/Shared/Components/Badge/types.d.ts +0 -18
- package/dist/Shared/Components/Badge/utils.d.ts +0 -7
- package/dist/Shared/Components/Security/SeverityChip.d.ts +0 -6
- package/dist/Shared/Components/Table/TableContent.d.ts +0 -3
- package/dist/assets/ic-bug.8a8dc1fc.svg +0 -3
- package/dist/assets/ic-check-all.fdea6b38.svg +0 -5
- package/dist/assets/ic-check-square.e355731d.svg +0 -4
- package/dist/assets/ic-clean-brush.c21cbe1e.svg +0 -3
- package/dist/assets/ic-container.92a4c33a.svg +0 -3
- package/dist/assets/ic-download.468a0cb7.svg +0 -3
- package/dist/assets/ic-file-code.0926d194.svg +0 -3
- package/dist/assets/ic-gavel.a3b064b5.svg +0 -3
- package/dist/assets/ic-info-filled-color.47953fcf.svg +0 -8
- package/dist/assets/ic-logs.d310db72.svg +0 -3
- package/dist/assets/ic-pause-circle.f9405070.svg +0 -3
- package/dist/assets/ic-speedometer.3ecaae3b.svg +0 -3
- package/dist/assets/ic-two-cubes.056d1333.svg +0 -3
- /package/dist/assets/{ic-container-registry.4e1e6455.svg → ic-container.4e1e6455.svg} +0 -0
@@ -63,7 +63,6 @@ export declare const URLS: {
|
|
63
63
|
readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_CREATE: "/global-config/templates/devtron-apps/create";
|
64
64
|
readonly GLOBAL_CONFIG_TEMPLATES_DEVTRON_APP_DETAIL: "/global-config/templates/devtron-apps/detail/:appId";
|
65
65
|
readonly LICENSE_AUTH: "/license-auth";
|
66
|
-
readonly GLOBAL_CONFIG_EDIT_CLUSTER: "/global-config/cluster-env/edit/:clusterId";
|
67
66
|
};
|
68
67
|
export declare const ROUTES: {
|
69
68
|
readonly APP: "app";
|
@@ -294,7 +293,6 @@ export declare const API_STATUS_CODES: {
|
|
294
293
|
NOT_FOUND: number;
|
295
294
|
REQUEST_TIMEOUT: number;
|
296
295
|
CONFLICT: number;
|
297
|
-
PRE_CONDITION_FAILED: number;
|
298
296
|
EXPECTATION_FAILED: number;
|
299
297
|
UNPROCESSABLE_ENTITY: number;
|
300
298
|
LOCKED: number;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { UseRegisterShortcutProviderType } from './types';
|
2
|
-
declare const UseRegisterShortcutProvider: ({
|
2
|
+
declare const UseRegisterShortcutProvider: ({ ignoreTags, preventDefault, shortcutTimeout, children, }: UseRegisterShortcutProviderType) => JSX.Element;
|
3
3
|
export default UseRegisterShortcutProvider;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { RefObject } from 'react';
|
2
1
|
export declare const KEYBOARD_KEYS_MAP: {
|
3
2
|
readonly Control: "Ctrl";
|
4
3
|
readonly Shift: "⇧";
|
@@ -10,7 +9,6 @@ export declare const KEYBOARD_KEYS_MAP: {
|
|
10
9
|
readonly K: "K";
|
11
10
|
readonly X: "X";
|
12
11
|
readonly A: "A";
|
13
|
-
readonly N: "N";
|
14
12
|
readonly Escape: "Esc";
|
15
13
|
readonly Enter: "↩";
|
16
14
|
readonly ArrowLeft: "←";
|
@@ -58,7 +56,6 @@ export interface UseRegisterShortcutContextType {
|
|
58
56
|
triggerShortcut: (keys: ShortcutType['keys']) => void;
|
59
57
|
}
|
60
58
|
export interface UseRegisterShortcutProviderType {
|
61
|
-
containerRef?: RefObject<HTMLElement>;
|
62
59
|
children: React.ReactNode;
|
63
60
|
/**
|
64
61
|
* Defines how long after holding the keys down do we trigger the callback in milliseconds
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ShortcutType } from './types';
|
2
2
|
export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
|
3
|
-
keys: ("
|
3
|
+
keys: ("R" | "Alt" | "F" | "E" | "K" | "X" | "A" | "Home" | "End" | "." | "Space" | "Control" | "Shift" | "Meta" | "Escape" | "Enter" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "PageUp" | "PageDown" | "Backspace" | "Delete")[];
|
4
4
|
id: string;
|
5
5
|
};
|
6
6
|
export declare const verifyCallbackStack: (stack: ShortcutType["callbackStack"]) => void;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { UseUrlFiltersProps, UseUrlFiltersReturnType } from '../useUrlFilters';
|
2
|
-
export interface UseStateFiltersProps<T> extends Pick<UseUrlFiltersProps<T, never>, 'initialSortKey'
|
2
|
+
export interface UseStateFiltersProps<T> extends Pick<UseUrlFiltersProps<T, never>, 'initialSortKey'> {
|
3
3
|
}
|
4
|
-
export interface UseStateFiltersReturnType<T> extends Pick<UseUrlFiltersReturnType<T>, 'sortBy' | 'sortOrder' | 'handleSorting' | 'clearFilters' | 'changePage' | 'changePageSize' | 'offset' | 'pageSize' | 'searchKey' | 'handleSearch' | '
|
4
|
+
export interface UseStateFiltersReturnType<T> extends Pick<UseUrlFiltersReturnType<T>, 'sortBy' | 'sortOrder' | 'handleSorting' | 'clearFilters' | 'changePage' | 'changePageSize' | 'offset' | 'pageSize' | 'searchKey' | 'handleSearch' | 'isFilterApplied'> {
|
5
5
|
}
|
6
6
|
export interface PaginationType<T> extends Pick<UseUrlFiltersReturnType<T>, 'pageSize'> {
|
7
7
|
pageNumber: number;
|
@@ -12,5 +12,5 @@ import { UseStateFiltersProps, UseStateFiltersReturnType } from './types';
|
|
12
12
|
*
|
13
13
|
* To be extended to be used with pagination and search as and when required
|
14
14
|
*/
|
15
|
-
declare const useStateFilters: <T = string>({ initialSortKey,
|
15
|
+
declare const useStateFilters: <T = string>({ initialSortKey, }?: UseStateFiltersProps<T>) => UseStateFiltersReturnType<T>;
|
16
16
|
export default useStateFilters;
|
@@ -18,7 +18,6 @@ export interface UseUrlFiltersProps<T, K extends {}> {
|
|
18
18
|
* @default 'replace'
|
19
19
|
*/
|
20
20
|
redirectionMethod?: 'replace' | 'push';
|
21
|
-
defaultPageSize?: number;
|
22
21
|
}
|
23
22
|
export type UpdateSearchParamsOptionsType<T, K = {}> = Partial<Pick<UseUrlFiltersProps<T, K>, 'redirectionMethod'>>;
|
24
23
|
export type UseUrlFiltersReturnType<T, K = {}> = K & {
|
@@ -68,5 +67,5 @@ export type UseUrlFiltersReturnType<T, K = {}> = K & {
|
|
68
67
|
* Update the search params with the passed object
|
69
68
|
*/
|
70
69
|
updateSearchParams: (paramsToSerialize: Partial<K>, options?: UpdateSearchParamsOptionsType<T, K>) => void;
|
71
|
-
|
70
|
+
isFilterApplied: boolean;
|
72
71
|
};
|
@@ -16,5 +16,5 @@ import { UseUrlFiltersProps, UseUrlFiltersReturnType } from './types';
|
|
16
16
|
* ```
|
17
17
|
*
|
18
18
|
*/
|
19
|
-
declare const useUrlFilters: <T = string, K = {}>({ initialSortKey, parseSearchParams, localStorageKey, redirectionMethod,
|
19
|
+
declare const useUrlFilters: <T = string, K = {}>({ initialSortKey, parseSearchParams, localStorageKey, redirectionMethod, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
|
20
20
|
export default useUrlFilters;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
1
|
import { PopupMenuBodyType, PopupMenuButtonType, PopupMenuType } from './Types';
|
3
2
|
declare const PopupMenu: {
|
4
3
|
({ children, onToggleCallback, autoClose, autoPosition, shouldPreventDefault, }: PopupMenuType): any;
|
5
|
-
Button:
|
4
|
+
Button: ({ children, disabled, rootClassName, tabIndex, onHover, isKebab, dataTestId, }: PopupMenuButtonType) => JSX.Element;
|
6
5
|
Body: ({ children, rootClassName, style, autoWidth, preventWheelDisable, noBackDrop, }: PopupMenuBodyType) => JSX.Element;
|
7
6
|
};
|
8
7
|
export default PopupMenu;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { default as RJSF } from '@rjsf/core';
|
2
2
|
import { FormProps } from './types';
|
3
|
-
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "name" | "id" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "method" | "action" | "tagName" | "noValidate" | "readonly" | "uiSchema" | "schema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
|
3
|
+
export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "children" | "className" | "name" | "id" | "disabled" | "target" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "autoComplete" | "method" | "action" | "tagName" | "noValidate" | "readonly" | "uiSchema" | "schema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "experimental_customMergeAllOf" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<any, import('./types').RJSFFormSchema, any>>>;
|
@@ -1,7 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { GroupBase } from 'react-select';
|
3
|
-
import { ServerErrors } from '../../Common/ServerError';
|
4
|
-
import { SelectPickerOptionType } from '../../Shared/Components';
|
1
|
+
import { RefObject } from 'react';
|
5
2
|
import { Nodes, NodeType } from '../../Shared/types';
|
6
3
|
export interface GVKType {
|
7
4
|
Group: string;
|
@@ -37,37 +34,14 @@ export interface K8sResourceListPayloadType {
|
|
37
34
|
filter?: string;
|
38
35
|
k8sRequest: ResourceListPayloadK8sRequestType;
|
39
36
|
}
|
40
|
-
export declare enum ResourceRecommenderHeaderType {
|
41
|
-
NAME = "name",
|
42
|
-
NAMESPACE = "namespace",
|
43
|
-
KIND = "kind",
|
44
|
-
API_VERSION = "apiVersion",
|
45
|
-
CONTAINER_NAME = "containerName",
|
46
|
-
CPU_REQUEST = "cpuRequest",
|
47
|
-
CPU_LIMIT = "cpuLimit",
|
48
|
-
MEMORY_REQUEST = "memoryRequest",
|
49
|
-
MEMORY_LIMIT = "memoryLimit"
|
50
|
-
}
|
51
|
-
export type ResourceRecommenderHeaderWithStringValue = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.NAME | ResourceRecommenderHeaderType.NAMESPACE | ResourceRecommenderHeaderType.KIND | ResourceRecommenderHeaderType.API_VERSION | ResourceRecommenderHeaderType.CONTAINER_NAME>;
|
52
|
-
export type ResourceRecommenderHeaderWithRecommendation = Extract<ResourceRecommenderHeaderType, ResourceRecommenderHeaderType.CPU_REQUEST | ResourceRecommenderHeaderType.CPU_LIMIT | ResourceRecommenderHeaderType.MEMORY_REQUEST | ResourceRecommenderHeaderType.MEMORY_LIMIT>;
|
53
37
|
export type K8sResourceDetailDataType = {
|
54
38
|
[key: string]: string | number | object | boolean;
|
55
|
-
additionalMetadata?: Partial<Record<ResourceRecommenderHeaderWithRecommendation, {
|
56
|
-
current: {
|
57
|
-
value: string | 'none';
|
58
|
-
} | null;
|
59
|
-
recommended: {
|
60
|
-
value: string | 'none';
|
61
|
-
} | null;
|
62
|
-
delta: number | null;
|
63
|
-
}>>;
|
64
39
|
};
|
65
40
|
export interface K8sResourceDetailType {
|
66
41
|
headers: string[];
|
67
42
|
data: K8sResourceDetailDataType[];
|
68
43
|
}
|
69
44
|
export interface BulkSelectionActionWidgetProps {
|
70
|
-
isResourceRecommendationView: boolean;
|
71
45
|
count: number;
|
72
46
|
handleOpenBulkDeleteModal: () => void;
|
73
47
|
handleClearBulkSelection: () => void;
|
@@ -75,12 +49,11 @@ export interface BulkSelectionActionWidgetProps {
|
|
75
49
|
handleOpenUncordonNodeModal: () => void;
|
76
50
|
handleOpenDrainNodeModal: () => void;
|
77
51
|
handleOpenRestartWorkloadModal: () => void;
|
78
|
-
handleOpenApplyResourceRecommendationModal: () => void;
|
79
52
|
parentRef: RefObject<HTMLDivElement>;
|
80
53
|
showBulkRestartOption: boolean;
|
81
54
|
showNodeListingOptions: boolean;
|
82
55
|
}
|
83
|
-
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain'
|
56
|
+
export type RBBulkOperationType = 'restart' | 'delete' | 'cordon' | 'uncordon' | 'drain';
|
84
57
|
export interface CreateResourceRequestBodyType {
|
85
58
|
appId: string;
|
86
59
|
clusterId: number;
|
@@ -92,7 +65,6 @@ export interface CreateResourceRequestBodyType {
|
|
92
65
|
export interface ResourceManifestDTO {
|
93
66
|
manifestResponse: {
|
94
67
|
manifest: Record<string, unknown>;
|
95
|
-
recommendedManifest?: Record<string, unknown>;
|
96
68
|
};
|
97
69
|
secretViewAccess: boolean;
|
98
70
|
}
|
@@ -136,20 +108,4 @@ export interface NodeActionRequest {
|
|
136
108
|
version: string;
|
137
109
|
kind: string;
|
138
110
|
}
|
139
|
-
export interface GVKOptionValueType {
|
140
|
-
kind: string;
|
141
|
-
apiVersion: string;
|
142
|
-
}
|
143
|
-
export interface GetResourceRecommenderResourceListPropsType {
|
144
|
-
setShowAbsoluteValuesInResourceRecommender: Dispatch<SetStateAction<boolean>>;
|
145
|
-
showAbsoluteValuesInResourceRecommender: boolean;
|
146
|
-
gvkOptions: GroupBase<SelectPickerOptionType<GVKOptionValueType>>[];
|
147
|
-
areGVKOptionsLoading: boolean;
|
148
|
-
reloadGVKOptions: () => void;
|
149
|
-
gvkOptionsError: ServerErrors;
|
150
|
-
}
|
151
|
-
export interface ResourceRecommenderActionMenuProps {
|
152
|
-
children: ReactNode;
|
153
|
-
lastScannedOn: string;
|
154
|
-
}
|
155
111
|
export {};
|
@@ -2,7 +2,7 @@ import { APIOptions, ResponseType } from '../../Common/Types';
|
|
2
2
|
import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceType } from './ResourceBrowser.Types';
|
3
3
|
import { ClusterDetail, NodeCordonRequest } from './types';
|
4
4
|
export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
|
5
|
-
export declare const createNewResource: (resourceListPayload: CreateResourcePayload
|
5
|
+
export declare const createNewResource: (resourceListPayload: CreateResourcePayload) => Promise<ResponseType<CreateResourceDTO[]>>;
|
6
6
|
export declare const deleteResource: (resourceListPayload: ResourceListPayloadType, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ResourceType[]>>;
|
7
7
|
export declare const deleteNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
8
8
|
export declare const cordonNodeCapacity: (requestPayload: NodeCordonRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { BulkSelectionProps } from './types';
|
2
|
-
declare const BulkSelection:
|
2
|
+
declare const BulkSelection: <T>({ showPagination, disabled, showChevronDownIcon }: BulkSelectionProps) => JSX.Element;
|
3
3
|
export default BulkSelection;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { BulkSelectionDropdownItemsProps } from './types';
|
2
|
+
declare const BulkSelectionDropdownItems: <T>({ locator, label, isSelected, handleBulkSelection, icon: Icon, iconClass, }: BulkSelectionDropdownItemsProps<T>) => JSX.Element;
|
3
|
+
export default BulkSelectionDropdownItems;
|
@@ -33,7 +33,15 @@ export interface BulkSelectionProps {
|
|
33
33
|
*/
|
34
34
|
showChevronDownIcon?: boolean;
|
35
35
|
disabled?: boolean;
|
36
|
-
|
36
|
+
}
|
37
|
+
export interface BulkSelectionDropdownItemsType {
|
38
|
+
locator: BulkSelectionEvents;
|
39
|
+
label: string;
|
40
|
+
isSelected: boolean;
|
41
|
+
icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
42
|
+
iconClass?: string;
|
43
|
+
}
|
44
|
+
export interface BulkSelectionDropdownItemsProps<T> extends BulkSelectionDropdownItemsType, Pick<UseBulkSelectionReturnType<T>, 'handleBulkSelection'> {
|
37
45
|
}
|
38
46
|
export declare enum SelectAllDialogStatus {
|
39
47
|
OPEN = "OPEN",
|
@@ -22,7 +22,6 @@ export declare const iconMap: {
|
|
22
22
|
'ic-book-open': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
23
23
|
'ic-brain': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
24
24
|
'ic-browser': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
25
|
-
'ic-bug': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
26
25
|
'ic-build-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
27
26
|
'ic-calendar': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
28
27
|
'ic-cancelled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -33,14 +32,11 @@ export declare const iconMap: {
|
|
33
32
|
'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
34
33
|
'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
35
34
|
'ic-chat-circle-online': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
36
|
-
'ic-check-all': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
37
|
-
'ic-check-square': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
38
35
|
'ic-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
39
36
|
'ic-checks': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
40
37
|
'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
41
38
|
'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
42
39
|
'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
43
|
-
'ic-clean-brush': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
44
40
|
'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
45
41
|
'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
46
42
|
'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -48,7 +44,6 @@ export declare const iconMap: {
|
|
48
44
|
'ic-cluster-isolated': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
49
45
|
'ic-cluster': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
50
46
|
'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
51
|
-
'ic-container-registry': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
52
47
|
'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
53
48
|
'ic-cookr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
54
49
|
'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -67,7 +62,6 @@ export declare const iconMap: {
|
|
67
62
|
'ic-disconnect': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
68
63
|
'ic-discord-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
69
64
|
'ic-dockerhub': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
70
|
-
'ic-download': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
71
65
|
'ic-ecr': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
72
66
|
'ic-edit': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
73
67
|
'ic-email': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -81,7 +75,6 @@ export declare const iconMap: {
|
|
81
75
|
'ic-expand-sm': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
82
76
|
'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
83
77
|
'ic-fast-forward': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
84
|
-
'ic-file-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
85
78
|
'ic-file-edit': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
86
79
|
'ic-file-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
87
80
|
'ic-file': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -91,7 +84,6 @@ export declare const iconMap: {
|
|
91
84
|
'ic-flask': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
92
85
|
'ic-folder-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
93
86
|
'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
94
|
-
'ic-gavel': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
95
87
|
'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
96
88
|
'ic-gift-gradient': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
97
89
|
'ic-gift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -113,7 +105,6 @@ export declare const iconMap: {
|
|
113
105
|
'ic-hibernate-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
114
106
|
'ic-hibernate': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
115
107
|
'ic-in-progress': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
116
|
-
'ic-info-filled-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
117
108
|
'ic-info-filled': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
118
109
|
'ic-info-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
119
110
|
'ic-install': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -130,7 +121,6 @@ export declare const iconMap: {
|
|
130
121
|
'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
131
122
|
'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
132
123
|
'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
133
|
-
'ic-logs': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
134
124
|
'ic-magnifying-glass': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
135
125
|
'ic-medium-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
136
126
|
'ic-medium-paintbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -155,7 +145,6 @@ export declare const iconMap: {
|
|
155
145
|
'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
156
146
|
'ic-paper-plane': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
157
147
|
'ic-path': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
158
|
-
'ic-pause-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
159
148
|
'ic-pencil': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
160
149
|
'ic-play-outline': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
161
150
|
'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -171,7 +160,6 @@ export declare const iconMap: {
|
|
171
160
|
'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
172
161
|
'ic-sparkle-ai-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
173
162
|
'ic-sparkle-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
174
|
-
'ic-speedometer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
175
163
|
'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
176
164
|
'ic-spray-can': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
177
165
|
'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -198,7 +186,6 @@ export declare const iconMap: {
|
|
198
186
|
'ic-timer': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
199
187
|
'ic-traffic-signal': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
200
188
|
'ic-travclan': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
201
|
-
'ic-two-cubes': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
202
189
|
'ic-ubuntu': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
203
190
|
'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
204
191
|
'ic-user-circle': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
|
@@ -4,5 +4,4 @@ import { InfoBlockProps } from './types';
|
|
4
4
|
export declare const VARIANT_TO_ICON_MAP: Record<InfoBlockVariant, InfoBlockProps['customIcon']>;
|
5
5
|
export declare const CONTAINER_SIZE_TO_CLASS_MAP: Record<InfoBlockProps['size'], string>;
|
6
6
|
export declare const SIZE_TO_ICON_CLASS_MAP: Record<InfoBlockProps['size'], string>;
|
7
|
-
export declare const
|
8
|
-
export declare const CONTAINER_SIZE_TO_ICON_BUTTON_SIZE: Record<InfoBlockProps['size'], ButtonProps['size']>;
|
7
|
+
export declare const CONTAINER_SIZE_TO_BUTTON_SIZE: Record<InfoBlockProps['size'], ButtonProps['size']>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CodeScan, DetailViewDataType, EmptyStateType, InfoCardPropsType, OpenDetailViewButtonProps, ScanResultDTO, SecurityModalStateType,
|
1
|
+
import { CodeScan, DetailViewDataType, EmptyStateType, InfoCardPropsType, OpenDetailViewButtonProps, ScanResultDTO, SecurityModalStateType, StatusType, TablePropsType } from '../types';
|
2
2
|
export declare const getCodeScanVulnerabilities: (data: CodeScan["vulnerability"], hidePolicy: boolean) => {
|
3
3
|
headers: ({
|
4
4
|
headerText: string;
|
@@ -10,7 +10,7 @@ export declare const getCodeScanVulnerabilities: (data: CodeScan["vulnerability"
|
|
10
10
|
headerText: string;
|
11
11
|
isSortable: boolean;
|
12
12
|
width: number;
|
13
|
-
compareFunc: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
|
13
|
+
compareFunc: (a: import('../types').SeveritiesDTO, b: import('../types').SeveritiesDTO) => number;
|
14
14
|
defaultSortOrder: import('../types').SortOrderEnum;
|
15
15
|
})[];
|
16
16
|
rows: {
|
@@ -34,7 +34,7 @@ export declare const getCodeScanLicense: (data: CodeScan["license"]) => {
|
|
34
34
|
headerText: string;
|
35
35
|
isSortable: boolean;
|
36
36
|
width: number;
|
37
|
-
compareFunc: (a: SeveritiesDTO, b: SeveritiesDTO) => number;
|
37
|
+
compareFunc: (a: import('../types').SeveritiesDTO, b: import('../types').SeveritiesDTO) => number;
|
38
38
|
defaultSortOrder: import('../types').SortOrderEnum;
|
39
39
|
})[];
|
40
40
|
rows: {
|
@@ -57,7 +57,7 @@ export declare const getCodeScanMisconfigurations: (data: CodeScan["misConfigura
|
|
57
57
|
headerText: string;
|
58
58
|
isSortable: boolean;
|
59
59
|
width: number;
|
60
|
-
compareFunc: (a: Record<SeveritiesDTO, number>, b: Record<SeveritiesDTO, number>) => number;
|
60
|
+
compareFunc: (a: Record<import('../types').SeveritiesDTO, number>, b: Record<import('../types').SeveritiesDTO, number>) => number;
|
61
61
|
})[];
|
62
62
|
rows: {
|
63
63
|
id: number;
|
@@ -67,7 +67,7 @@ export declare const getCodeScanMisconfigurations: (data: CodeScan["misConfigura
|
|
67
67
|
cellContent: string;
|
68
68
|
} | {
|
69
69
|
component: JSX.Element;
|
70
|
-
cellContent: Partial<Record<SeveritiesDTO, number>>;
|
70
|
+
cellContent: Partial<Record<import('../types').SeveritiesDTO, number>>;
|
71
71
|
})[];
|
72
72
|
}[];
|
73
73
|
};
|
@@ -81,7 +81,7 @@ export declare const getCodeScanExposedSecrets: (data: CodeScan["exposedSecrets"
|
|
81
81
|
headerText: string;
|
82
82
|
isSortable: boolean;
|
83
83
|
width: number;
|
84
|
-
compareFunc: (a: Record<SeveritiesDTO, number>, b: Record<SeveritiesDTO, number>) => number;
|
84
|
+
compareFunc: (a: Record<import('../types').SeveritiesDTO, number>, b: Record<import('../types').SeveritiesDTO, number>) => number;
|
85
85
|
})[];
|
86
86
|
rows: {
|
87
87
|
id: number;
|
@@ -91,7 +91,7 @@ export declare const getCodeScanExposedSecrets: (data: CodeScan["exposedSecrets"
|
|
91
91
|
cellContent: string;
|
92
92
|
} | {
|
93
93
|
component: JSX.Element;
|
94
|
-
cellContent: Partial<Record<SeveritiesDTO, number>>;
|
94
|
+
cellContent: Partial<Record<import('../types').SeveritiesDTO, number>>;
|
95
95
|
})[];
|
96
96
|
}[];
|
97
97
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { BulkSelectionActionWidgetProps } from './types';
|
2
|
-
declare const BulkSelectionActionWidget: ({ count, handleClearBulkSelection, parentRef, BulkActionsComponent,
|
2
|
+
declare const BulkSelectionActionWidget: ({ count, handleClearBulkSelection, parentRef, BulkActionsComponent, }: BulkSelectionActionWidgetProps) => JSX.Element;
|
3
3
|
export default BulkSelectionActionWidget;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { InternalTableProps } from './types';
|
2
|
-
declare const InternalTable: ({ filtersVariant, filterData, rows, getRows, columns, ViewWrapper, resizableConfig, emptyStateConfig, additionalProps, areColumnsConfigurable, filter, setVisibleColumns, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent,
|
2
|
+
declare const InternalTable: ({ filtersVariant, filterData, rows, getRows, columns, ViewWrapper, resizableConfig, emptyStateConfig, additionalProps, areColumnsConfigurable, filter, setVisibleColumns, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, }: InternalTableProps) => JSX.Element;
|
3
3
|
export default InternalTable;
|
@@ -5,4 +5,3 @@ export declare const BULK_ACTION_GUTTER_LABEL = "bulk-action-gutter";
|
|
5
5
|
export declare const EVENT_TARGET: EventTarget;
|
6
6
|
export declare const DRAG_SELECTOR_IDENTIFIER = "table-drag-selector";
|
7
7
|
export declare const SHIMMER_DUMMY_ARRAY: number[];
|
8
|
-
export declare const NO_ROWS_OR_GET_ROWS_ERROR: Error;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
export { default as Table } from './Table.component';
|
2
|
-
export type {
|
2
|
+
export type { CellComponentProps as TableCellComponentProps, Column as TableColumnType, TableProps, ViewWrapperProps as TableViewWrapperProps, } from './types';
|
3
3
|
export { FiltersTypeEnum, PaginationEnum, SignalEnum as TableSignalEnum } from './types';
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Dispatch, FunctionComponent,
|
1
|
+
import { Dispatch, FunctionComponent, PropsWithChildren, SetStateAction } from 'react';
|
2
2
|
import { GenericFilterEmptyStateProps } from '../../../Common/EmptyState/types';
|
3
|
-
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps
|
3
|
+
import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps } from '../../../Common/Hooks';
|
4
4
|
import { GenericEmptyStateType } from '../../../Common/index';
|
5
|
-
import { PageSizeOption } from '../../../Common/Pagination/types';
|
6
5
|
import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
|
7
6
|
import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
|
8
7
|
export interface UseFiltersReturnType extends UseStateFiltersReturnType<string> {
|
@@ -51,16 +50,11 @@ export type RowType = {
|
|
51
50
|
data: Record<string, unknown>;
|
52
51
|
};
|
53
52
|
export type RowsType = RowType[];
|
54
|
-
export
|
55
|
-
STATE = "state",
|
56
|
-
URL = "url",
|
57
|
-
NONE = "none"
|
58
|
-
}
|
59
|
-
export interface CellComponentProps<T = FiltersTypeEnum.NONE> extends Pick<BaseColumnType, 'field'>, AdditionalProps {
|
53
|
+
export interface CellComponentProps extends Pick<BaseColumnType, 'field'>, AdditionalProps {
|
60
54
|
signals: SignalsType;
|
61
55
|
value: unknown;
|
62
56
|
row: RowType;
|
63
|
-
filterData:
|
57
|
+
filterData: UseFiltersReturnType;
|
64
58
|
isRowActive: boolean;
|
65
59
|
}
|
66
60
|
export type Column = Pick<SortableTableHeaderCellProps, 'showTippyOnTruncate'> & BaseColumnType & {
|
@@ -77,26 +71,21 @@ export type Column = Pick<SortableTableHeaderCellProps, 'showTippyOnTruncate'> &
|
|
77
71
|
isSortable?: false;
|
78
72
|
comparator?: never;
|
79
73
|
});
|
80
|
-
export interface BulkActionsComponentProps {
|
81
|
-
onActionClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
82
|
-
bulkActionsData: unknown;
|
83
|
-
}
|
84
|
-
type BulkSelectionReturnValueType = ReturnType<typeof useBulkSelection>;
|
85
|
-
export interface BulkOperationModalProps<T = string> extends Pick<BulkSelectionReturnValueType, 'isBulkSelectionApplied'> {
|
86
|
-
action: T;
|
87
|
-
onClose: () => void;
|
88
|
-
selections: RowsType | null;
|
89
|
-
bulkOperationModalData: unknown;
|
90
|
-
}
|
91
74
|
type BulkSelectionConfigType = Pick<UseBulkSelectionProps<unknown>, 'getSelectAllDialogStatus'> & {
|
92
|
-
|
93
|
-
|
94
|
-
|
75
|
+
/** Make sure to wrap it in useCallback */
|
76
|
+
onBulkSelectionChanged: (selectedRows: RowsType) => void;
|
77
|
+
BulkActionsComponent: FunctionComponent<{}>;
|
78
|
+
};
|
95
79
|
export declare enum PaginationEnum {
|
96
80
|
PAGINATED = "paginated",
|
97
81
|
INFINITE = "infinite",
|
98
82
|
NOT_PAGINATED = "not-paginated"
|
99
83
|
}
|
84
|
+
export declare enum FiltersTypeEnum {
|
85
|
+
STATE = "state",
|
86
|
+
URL = "url",
|
87
|
+
NONE = "none"
|
88
|
+
}
|
100
89
|
export interface ConfigurableColumnsType {
|
101
90
|
allColumns: Column[];
|
102
91
|
visibleColumns: Column[];
|
@@ -104,14 +93,14 @@ export interface ConfigurableColumnsType {
|
|
104
93
|
}
|
105
94
|
interface GetRowsProps extends Pick<UseFiltersReturnType, 'offset' | 'pageSize' | 'searchKey' | 'sortBy' | 'sortOrder'> {
|
106
95
|
}
|
107
|
-
type AdditionalFilterPropsType<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey'
|
108
|
-
export type ViewWrapperProps
|
96
|
+
type AdditionalFilterPropsType<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey'> : Pick<UseStateFiltersProps<string>, 'initialSortKey'>;
|
97
|
+
export type ViewWrapperProps = PropsWithChildren<Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'> & AdditionalProps & Partial<ConfigurableColumnsType> & {
|
109
98
|
areRowsLoading: boolean;
|
110
|
-
|
111
|
-
} & (T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersReturnType<string>, 'updateSearchParams'> : {})>;
|
99
|
+
}>;
|
112
100
|
export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visibleColumns' | 'setVisibleColumns'>> & {
|
113
101
|
id: `table__${string}`;
|
114
102
|
loading?: boolean;
|
103
|
+
paginationVariant: PaginationEnum;
|
115
104
|
/**
|
116
105
|
* Memoize columns before passing as props.
|
117
106
|
*
|
@@ -147,7 +136,7 @@ export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visible
|
|
147
136
|
RowActionsOnHoverComponent?: FunctionComponent<{
|
148
137
|
row: RowType;
|
149
138
|
}>;
|
150
|
-
bulkSelectionReturnValue:
|
139
|
+
bulkSelectionReturnValue: ReturnType<typeof useBulkSelection> | null;
|
151
140
|
handleClearBulkSelection: () => void;
|
152
141
|
handleToggleBulkSelectionOnRow: (row: RowType) => void;
|
153
142
|
ViewWrapper?: FunctionComponent<ViewWrapperProps>;
|
@@ -177,44 +166,28 @@ export type InternalTableProps = Required<Pick<ConfigurableColumnsType, 'visible
|
|
177
166
|
* If filter is only being used for sorting, then send `noop` in this prop
|
178
167
|
*/
|
179
168
|
filter: (row: RowType, filterData: UseFiltersReturnType) => boolean;
|
180
|
-
clearFilters?: () => void;
|
181
169
|
} | {
|
182
170
|
filtersVariant: FiltersTypeEnum.STATE;
|
183
171
|
additionalFilterProps?: AdditionalFilterPropsType<FiltersTypeEnum.STATE>;
|
184
172
|
filter: (row: RowType, filterData: UseFiltersReturnType) => boolean;
|
185
|
-
clearFilters?: never;
|
186
173
|
} | {
|
187
174
|
filtersVariant: FiltersTypeEnum.NONE;
|
188
175
|
additionalFilterProps?: never;
|
189
176
|
filter?: never;
|
190
|
-
clearFilters?: never;
|
191
|
-
}) & ({
|
192
|
-
paginationVariant: PaginationEnum.PAGINATED;
|
193
|
-
pageSizeOptions?: PageSizeOption[];
|
194
|
-
} | {
|
195
|
-
paginationVariant: Omit<PaginationEnum, 'PAGINATED'>;
|
196
|
-
pageSizeOptions?: never;
|
197
177
|
});
|
198
178
|
export type UseResizableTableConfigWrapperProps = Omit<InternalTableProps, 'resizableConfig'>;
|
199
179
|
export type TableWithBulkSelectionProps = Omit<UseResizableTableConfigWrapperProps, 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow'>;
|
200
180
|
export type VisibleColumnsWrapperProps = Omit<TableWithBulkSelectionProps, 'visibleColumns' | 'setVisibleColumns'>;
|
201
181
|
export type FilterWrapperProps = Omit<VisibleColumnsWrapperProps, 'filterData'>;
|
202
|
-
export type TableProps = Pick<FilterWrapperProps, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'RowActionsOnHoverComponent' | 'loading' | 'ViewWrapper'
|
203
|
-
export
|
204
|
-
export interface BulkSelectionActionWidgetProps extends Pick<BulkSelectionConfigType, 'BulkActionsComponent' | 'bulkActionsData'> {
|
182
|
+
export type TableProps = Pick<FilterWrapperProps, 'additionalFilterProps' | 'bulkSelectionConfig' | 'areColumnsConfigurable' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'RowActionsOnHoverComponent' | 'loading' | 'ViewWrapper'>;
|
183
|
+
export interface BulkSelectionActionWidgetProps extends Pick<BulkSelectionConfigType, 'BulkActionsComponent'> {
|
205
184
|
count: number;
|
206
185
|
handleClearBulkSelection: () => void;
|
207
186
|
parentRef: React.RefObject<HTMLDivElement>;
|
208
|
-
/** If it is null, we can say no bulk action has been selected yet */
|
209
|
-
setBulkActionState: Dispatch<SetStateAction<BulkActionStateType>>;
|
210
187
|
}
|
211
188
|
export type ConfigurableColumnsConfigType = Record<string, ConfigurableColumnsType['visibleColumns']>;
|
212
189
|
export interface GetFilteringPromiseProps {
|
213
190
|
searchSortTimeoutRef: React.MutableRefObject<number>;
|
214
191
|
callback: () => Promise<RowsType> | RowsType;
|
215
192
|
}
|
216
|
-
export interface TableContentProps extends Pick<InternalTableProps, 'filterData' | 'rows' | 'resizableConfig' | 'additionalProps' | 'visibleColumns' | 'stylesConfig' | 'loading' | 'bulkSelectionConfig' | 'bulkSelectionReturnValue' | 'handleClearBulkSelection' | 'handleToggleBulkSelectionOnRow' | 'paginationVariant' | 'RowActionsOnHoverComponent' | 'pageSizeOptions'> {
|
217
|
-
filteredRows: RowsType;
|
218
|
-
areFilteredRowsLoading: boolean;
|
219
|
-
}
|
220
193
|
export {};
|