@devtron-labs/devtron-fe-common-lib 1.10.0 → 1.10.1-beta-1

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/{@code-editor-Dd-Rsu69.js → @code-editor-BK2IgrtU.js} +7544 -6892
  2. package/dist/{@common-rjsf-B1NZSY87.js → @common-rjsf-h6_nZqkx.js} +1 -1
  3. package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +13 -0
  4. package/dist/Common/Hooks/UseRegisterShortcut/utils.d.ts +1 -1
  5. package/dist/Common/Hooks/useStateFilters/types.d.ts +1 -1
  6. package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -0
  7. package/dist/Common/SegmentedControl/Segment.d.ts +3 -0
  8. package/dist/Common/SegmentedControl/SegmentedControl.component.d.ts +1 -1
  9. package/dist/Common/SegmentedControl/constants.d.ts +2 -1
  10. package/dist/Common/SegmentedControl/index.d.ts +1 -1
  11. package/dist/Common/SegmentedControl/types.d.ts +59 -17
  12. package/dist/Shared/Components/Table/BulkSelectionActionWidget.d.ts +3 -0
  13. package/dist/Shared/Components/Table/InternalTable.d.ts +3 -0
  14. package/dist/Shared/Components/Table/Table.component.d.ts +3 -0
  15. package/dist/Shared/Components/Table/UseResizableTableConfigWrapper.d.ts +3 -0
  16. package/dist/Shared/Components/Table/UseStateFilterWrapper.d.ts +3 -0
  17. package/dist/Shared/Components/Table/UseUrlFilterWrapper.d.ts +3 -0
  18. package/dist/Shared/Components/Table/constants.d.ts +5 -0
  19. package/dist/Shared/Components/Table/index.d.ts +3 -0
  20. package/dist/Shared/Components/Table/types.d.ts +202 -0
  21. package/dist/Shared/Components/Table/useTableWithKeyboardShortcuts.d.ts +6 -0
  22. package/dist/Shared/Components/Table/utils.d.ts +7 -0
  23. package/dist/Shared/Components/index.d.ts +1 -0
  24. package/dist/Shared/types.d.ts +2 -2
  25. package/dist/assets/@code-editor.css +1 -1
  26. package/dist/index.js +581 -578
  27. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { j as n, aq as y, as as k, ar as W } from "./@vendor-DXbFZ041.js";
2
2
  import V, { forwardRef as J, useMemo as P } from "react";
3
3
  import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-Dd-Rsu69.js";
4
+ import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-BK2IgrtU.js";
5
5
  import Q, { components as D } from "react-select";
6
6
  import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
@@ -7,8 +7,21 @@ export declare const KEYBOARD_KEYS_MAP: {
7
7
  readonly E: "E";
8
8
  readonly R: "R";
9
9
  readonly K: "K";
10
+ readonly X: "X";
10
11
  readonly Escape: "Esc";
11
12
  readonly Enter: "↩";
13
+ readonly ArrowLeft: "←";
14
+ readonly ArrowRight: "→";
15
+ readonly ArrowUp: "↑";
16
+ readonly ArrowDown: "↓";
17
+ readonly PageUp: "PgUp";
18
+ readonly PageDown: "PgDn";
19
+ readonly Home: "Home";
20
+ readonly End: "End";
21
+ readonly Backspace: "⌫";
22
+ readonly Delete: "⌦";
23
+ readonly '.': ".";
24
+ readonly Space: "Space";
12
25
  };
13
26
  export type SupportedKeyboardKeysType = keyof typeof KEYBOARD_KEYS_MAP;
14
27
  export interface ShortcutType {
@@ -1,6 +1,6 @@
1
1
  import { ShortcutType } from './types';
2
2
  export declare const preprocessKeys: (keys: ShortcutType["keys"]) => {
3
- keys: ("Escape" | "Control" | "Alt" | "F" | "E" | "R" | "K" | "Shift" | "Meta" | "Enter")[];
3
+ keys: ("Escape" | "Control" | "Alt" | "F" | "E" | "R" | "K" | "X" | "Home" | "End" | "." | "Space" | "Shift" | "Meta" | "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
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;
@@ -67,4 +67,5 @@ export type UseUrlFiltersReturnType<T, K = unknown> = K & {
67
67
  * Update the search params with the passed object
68
68
  */
69
69
  updateSearchParams: (paramsToSerialize: Partial<K>, options?: UpdateSearchParamsOptionsType<T, K>) => void;
70
+ isFilterApplied: boolean;
70
71
  };
@@ -0,0 +1,3 @@
1
+ import { SegmentProps } from './types';
2
+ declare const Segment: ({ segment, isSelected, name, selectedSegmentRef, onChange, fullWidth, size, disabled, }: SegmentProps) => JSX.Element;
3
+ export default Segment;
@@ -1,3 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- declare const SegmentedControl: ({ tabs, initialTab, onChange, tooltips, disabled, rootClassName, name, variant, size, isControlled, }: SegmentedControlProps) => JSX.Element;
2
+ declare const SegmentedControl: ({ segments, onChange, name, size, value: controlledValue, fullWidth, disabled, }: SegmentedControlProps) => JSX.Element;
3
3
  export default SegmentedControl;
@@ -1,2 +1,3 @@
1
1
  import { SegmentedControlProps } from './types';
2
- export declare const SEGMENTED_CONTROL_SIZE_TO_CLASS_MAP: Record<SegmentedControlProps['size'], string>;
2
+ export declare const COMPONENT_SIZE_TO_SEGMENT_CLASS_MAP: Record<SegmentedControlProps['size'], string>;
3
+ export declare const COMPONENT_SIZE_TO_ICON_CLASS_MAP: Record<SegmentedControlProps['size'], string>;
@@ -1,2 +1,2 @@
1
- export { type SegmentedControlProps, SegmentedControlVariant } from './types';
2
1
  export { default as SegmentedControl } from './SegmentedControl.component';
2
+ export { type SegmentedControlProps } from './types';
@@ -1,25 +1,67 @@
1
- import { OptionType } from '../Types';
1
+ import { TooltipProps } from '../Tooltip';
2
+ import { IconsProps, SelectPickerOptionType } from '../../Shared/Components';
2
3
  import { ComponentSizeType } from '../../Shared/constants';
3
- import { ReactNode } from 'react';
4
- export declare enum SegmentedControlVariant {
5
- GRAY_ON_WHITE = "gui-yaml-switch",
6
- WHITE_ON_GRAY = "gui-yaml-switch-window-bg"
7
- }
8
- export interface SegmentedControlProps {
9
- tabs: OptionType<string, ReactNode>[];
10
- initialTab: string;
11
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
4
+ import { RefObject } from 'react';
5
+ type SegmentTooltipProps = Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo' | 'placement'>;
6
+ export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
7
+ /**
8
+ * If true, the segment will be in error state with error icon
9
+ */
10
+ isError?: boolean;
11
+ } & (({
12
+ /**
13
+ * Label for the segment
14
+ *
15
+ * Note: Either of label or icon is required
16
+ */
17
+ label: SelectPickerOptionType['label'];
18
+ /**
19
+ * Icon for the segment
20
+ *
21
+ * Note: Either of label or icon is required
22
+ */
23
+ icon?: IconsProps['name'];
24
+ /**
25
+ * Tooltip props for the segment
26
+ *
27
+ * Note: Required if only icon is provided
28
+ */
29
+ tooltipProps?: SegmentTooltipProps;
30
+ ariaLabel?: never;
31
+ } & Pick<SelectPickerOptionType, 'label'>) | {
32
+ label?: never;
33
+ tooltipProps: SegmentTooltipProps;
34
+ icon: IconsProps['name'];
35
+ /**
36
+ * Aria label for the segment
37
+ */
38
+ ariaLabel: string;
39
+ });
40
+ export type SegmentedControlProps = {
41
+ /**
42
+ * List of segments to be displayed
43
+ */
44
+ segments: SegmentType[];
12
45
  name: string;
13
- tooltips?: string[];
46
+ size?: Extract<ComponentSizeType, ComponentSizeType.xs | ComponentSizeType.small | ComponentSizeType.medium>;
47
+ fullWidth?: boolean;
14
48
  disabled?: boolean;
15
- rootClassName?: string;
16
- variant?: SegmentedControlVariant;
49
+ } & ({
50
+ value?: never;
17
51
  /**
18
- * @default ComponentSizeType.medium
52
+ * On change handler for the component
19
53
  */
20
- size?: ComponentSizeType.medium | ComponentSizeType.large;
54
+ onChange?: (selectedSegment: SegmentType) => void;
55
+ } | {
21
56
  /**
22
- * @default false
57
+ * If defined, the component is controlled and onChange needs to be handled by the parent
23
58
  */
24
- isControlled?: boolean;
59
+ value: SegmentType['value'];
60
+ onChange: (selectedSegment: SegmentType) => void;
61
+ });
62
+ export interface SegmentProps extends Required<Pick<SegmentedControlProps, 'name' | 'onChange' | 'fullWidth' | 'size' | 'disabled'>> {
63
+ isSelected: boolean;
64
+ segment: SegmentType;
65
+ selectedSegmentRef: RefObject<HTMLDivElement> | undefined;
25
66
  }
67
+ export {};
@@ -0,0 +1,3 @@
1
+ import { BulkSelectionActionWidgetProps } from './types';
2
+ declare const BulkSelectionActionWidget: ({ count, handleClearBulkSelection, parentRef, BulkActionsComponent, }: BulkSelectionActionWidgetProps) => JSX.Element;
3
+ export default BulkSelectionActionWidget;
@@ -0,0 +1,3 @@
1
+ import { InternalTablePropsWithWrappers } from './types';
2
+ declare const InternalTable: ({ filtersVariant, filterData, rows, getRows, columns, ViewWrapper, resizableConfig, emptyStateConfig, additionalProps, configurableColumns, filter, setVisibleColumns, visibleColumns, stylesConfig, loading, bulkSelectionConfig, bulkSelectionReturnValue, handleClearBulkSelection, handleToggleBulkSelectionOnRow, paginationVariant, RowActionsOnHoverComponent, }: InternalTablePropsWithWrappers) => JSX.Element;
3
+ export default InternalTable;
@@ -0,0 +1,3 @@
1
+ import { TableProps } from './types';
2
+ declare const TableWrapper: (tableProps: TableProps) => JSX.Element;
3
+ export default TableWrapper;
@@ -0,0 +1,3 @@
1
+ import { UseResizableTableConfigWrapperProps } from './types';
2
+ declare const UseResizableTableConfigWrapper: ({ children, columns }: UseResizableTableConfigWrapperProps) => import('react').ReactElement<import('./types').InternalTableProps, string | import('react').JSXElementConstructor<any>>;
3
+ export default UseResizableTableConfigWrapper;
@@ -0,0 +1,3 @@
1
+ import { FiltersTypeEnum, FilterWrapperProps } from './types';
2
+ declare const UseStateFilterWrapper: ({ children, additionalFilterProps }: FilterWrapperProps<FiltersTypeEnum.STATE>) => import('react').ReactElement<import('./types').InternalTableProps, string | import('react').JSXElementConstructor<any>>;
3
+ export default UseStateFilterWrapper;
@@ -0,0 +1,3 @@
1
+ import { FiltersTypeEnum, FilterWrapperProps } from './types';
2
+ declare const UseUrlFilterWrapper: ({ children, additionalFilterProps }: FilterWrapperProps<FiltersTypeEnum.URL>) => import('react').ReactElement<import('./types').InternalTableProps, string | import('react').JSXElementConstructor<any>>;
3
+ export default UseUrlFilterWrapper;
@@ -0,0 +1,5 @@
1
+ export declare const SEARCH_SORT_CHANGE_DEBOUNCE_TIME = 350; /** in ms */
2
+ export declare const LOCAL_STORAGE_EXISTS: boolean;
3
+ export declare const LOCAL_STORAGE_KEY_FOR_VISIBLE_COLUMNS = "generic-table-configurable-columns";
4
+ export declare const BULK_ACTION_GUTTER_LABEL = "bulk-action-gutter";
5
+ export declare const EVENT_TARGET: EventTarget;
@@ -0,0 +1,3 @@
1
+ export { default as Table } from './Table.component';
2
+ export { FiltersTypeEnum, PaginationEnum, SignalEnum as TableSignalEnum } from './types';
3
+ export type { ViewWrapperProps as TableViewWrapperProps, Column as TableColumnType, TableProps, CellComponentProps as TableCellComponentProps, } from './types';
@@ -0,0 +1,202 @@
1
+ import { Dispatch, FunctionComponent, ReactElement, SetStateAction } from 'react';
2
+ import { SortableTableHeaderCellProps, useResizableTableConfig } from '../../../Common/SortableTableHeaderCell';
3
+ import { UseStateFiltersProps, UseStateFiltersReturnType, UseUrlFiltersProps } from '../../../Common/Hooks';
4
+ import { GenericEmptyStateType } from '../../../Common/index';
5
+ import { GenericFilterEmptyStateProps } from '@Common/EmptyState/types';
6
+ import { useBulkSelection, UseBulkSelectionProps } from '../BulkSelection';
7
+ export interface UseFiltersReturnType extends UseStateFiltersReturnType<string> {
8
+ }
9
+ export declare enum SignalEnum {
10
+ ENTER_PRESSED = "enter-pressed",
11
+ DELETE_PRESSED = "delete-pressed",
12
+ ESCAPE_PRESSED = "escape-pressed",
13
+ OPEN_CONTEXT_MENU = "open-context-menu",
14
+ /** TODO: Not yet implemented */
15
+ BULK_SELECTION_CHANGED = "bulk-selection-changed",
16
+ ACTIVE_ROW_CHANGED = "active-row-changed",
17
+ ROW_CLICKED = "row-clicked"
18
+ }
19
+ export interface SignalsType<T extends string = SignalEnum> extends Pick<EventTarget, 'addEventListener' | 'removeEventListener'> {
20
+ addEventListener: (type: T, callback: (event: CustomEvent) => void, options?: Parameters<EventTarget['addEventListener']>[2]) => ReturnType<EventTarget['addEventListener']>;
21
+ removeEventListener: (type: T, callback: (event: CustomEvent) => void, options?: Parameters<EventTarget['removeEventListener']>[2]) => ReturnType<EventTarget['removeEventListener']>;
22
+ }
23
+ type SizeType = {
24
+ /** This signifies this column is resizable */
25
+ range: {
26
+ startWidth: number;
27
+ minWidth: number;
28
+ maxWidth: number | 'infinite';
29
+ };
30
+ /** If we want a fixed width */
31
+ fixed?: never;
32
+ } | {
33
+ range?: never;
34
+ fixed: number;
35
+ } | null;
36
+ type BaseColumnType = {
37
+ /** This is the key using which we will fetch the data of */
38
+ field: string;
39
+ /** This is the string that will be displayed to the user as header text */
40
+ label?: string;
41
+ /**
42
+ * If we want resizable columns, then every column has to have a fixed height
43
+ * If we specify size to be null then the size be will set to 1fr
44
+ */
45
+ size: SizeType;
46
+ horizontallySticky?: boolean;
47
+ };
48
+ interface AdditionalProps {
49
+ [key: string]: unknown;
50
+ }
51
+ type RowType = {
52
+ id: string;
53
+ data: Record<string, unknown>;
54
+ };
55
+ export type RowsType = RowType[];
56
+ export interface CellComponentProps extends Pick<BaseColumnType, 'field'>, AdditionalProps {
57
+ signals: SignalsType;
58
+ value: unknown;
59
+ row: RowType;
60
+ filterData: UseFiltersReturnType;
61
+ isRowActive: boolean;
62
+ }
63
+ export type Column = Pick<SortableTableHeaderCellProps, 'showTippyOnTruncate'> & BaseColumnType & {
64
+ CellComponent?: FunctionComponent<CellComponentProps>;
65
+ } & ({
66
+ isSortable: true;
67
+ /**
68
+ * Compare two rows when sorting is triggered on this column
69
+ * Values fed are from the field key in the row's data object
70
+ * @returns -1 if a < b, 0 if a === b, 1 if a > b
71
+ */
72
+ comparator?: (a: unknown, b: unknown) => number;
73
+ } | {
74
+ isSortable?: false;
75
+ comparator?: never;
76
+ });
77
+ type BulkSelectionConfigType = Pick<UseBulkSelectionProps<unknown>, 'getSelectAllDialogStatus'> & {
78
+ /** Make sure to wrap it in useCallback */
79
+ onBulkSelectionChanged: (selectedRows: RowsType) => void;
80
+ BulkActionsComponent: FunctionComponent<{}>;
81
+ };
82
+ export declare enum PaginationEnum {
83
+ PAGINATED = "paginated",
84
+ INFINITE = "infinite",
85
+ NOT_PAGINATED = "not-paginated"
86
+ }
87
+ export declare enum FiltersTypeEnum {
88
+ STATE = "state",
89
+ URL = "url",
90
+ NONE = "none"
91
+ }
92
+ export interface ConfigurableColumnsType {
93
+ allColumns: Column[];
94
+ visibleColumns: Column[];
95
+ setVisibleColumns: Dispatch<SetStateAction<ConfigurableColumnsType['visibleColumns']>>;
96
+ }
97
+ interface GetRowsProps extends Pick<UseFiltersReturnType, 'offset' | 'pageSize' | 'searchKey' | 'sortBy' | 'sortOrder'> {
98
+ }
99
+ type AdditionalFilterPropsType<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> = T extends FiltersTypeEnum.URL ? Pick<UseUrlFiltersProps<string, unknown>, 'parseSearchParams' | 'localStorageKey' | 'redirectionMethod' | 'initialSortKey'> : Pick<UseStateFiltersProps<string>, 'initialSortKey'>;
100
+ export type InternalTableProps = Record<'filterData', UseFiltersReturnType> & Record<'resizableConfig', ReturnType<typeof useResizableTableConfig>> & Required<Pick<ConfigurableColumnsType, 'visibleColumns' | 'setVisibleColumns'>> & {
101
+ id: string;
102
+ loading?: boolean;
103
+ paginationVariant: PaginationEnum;
104
+ /**
105
+ * Memoize columns before passing as props.
106
+ *
107
+ * For columns from backend: initialize as empty array and set loading
108
+ * to true until API call completes.
109
+ */
110
+ columns: Column[];
111
+ /** If bulk selections are not a concern omit this prop */
112
+ bulkSelectionConfig?: BulkSelectionConfigType;
113
+ emptyStateConfig: {
114
+ noRowsConfig: Omit<GenericEmptyStateType, 'children'>;
115
+ noRowsForFilterConfig?: Pick<GenericFilterEmptyStateProps, 'title' | 'subTitle'> & {
116
+ clearFilters: () => void;
117
+ };
118
+ };
119
+ /**
120
+ * Enable this to let users choose which columns to display.
121
+ * Example: Resource Browser > Node Listing
122
+ *
123
+ * Using the provided id for this table, we will store the user's preference in localStorage
124
+ */
125
+ configurableColumns?: boolean;
126
+ visibleRowsNumberRef: React.MutableRefObject<number>;
127
+ activeRowIndex: number;
128
+ additionalProps?: AdditionalProps;
129
+ /** Control the look of the table using this prop */
130
+ stylesConfig?: {
131
+ showSeparatorBetweenRows: boolean;
132
+ };
133
+ /**
134
+ * Use this component to display additional content at the end of a row when it is hovered over.
135
+ */
136
+ RowActionsOnHoverComponent?: FunctionComponent<{
137
+ row: RowsType[number];
138
+ }>;
139
+ bulkSelectionReturnValue: ReturnType<typeof useBulkSelection> | null;
140
+ handleClearBulkSelection: () => void;
141
+ handleToggleBulkSelectionOnRow: (row: RowsType[number]) => void;
142
+ bulkSelectedRowIdsRef: React.MutableRefObject<string[]>;
143
+ activeRowRef: React.MutableRefObject<RowsType[number] | null>;
144
+ } & ({
145
+ /**
146
+ * Direct rows data for frontend-only datasets like resource browser.
147
+ */
148
+ rows: RowsType;
149
+ /**
150
+ * Use `getRows` function instead for data that needs to be fetched from backend with pagination/sorting/filtering.
151
+ */
152
+ getRows?: never;
153
+ } | {
154
+ rows?: never;
155
+ /** NOTE: Sorting on frontend is only handled if rows is provided instead of getRows */
156
+ getRows: (props: GetRowsProps) => Promise<RowsType>;
157
+ }) & ({
158
+ filtersVariant: FiltersTypeEnum.URL;
159
+ /**
160
+ * props for useUrlFilters/useStateFilters hooks
161
+ */
162
+ additionalFilterProps?: AdditionalFilterPropsType<FiltersTypeEnum.URL>;
163
+ /**
164
+ * This func is used to filter the rows based on filter data.
165
+ * Only applicable if filtersVariant is NOT set to NONE
166
+ *
167
+ * If filter is only being used for sorting, then send `noop` in this prop
168
+ */
169
+ filter: (row: RowsType[number], filterData: UseFiltersReturnType) => boolean;
170
+ } | {
171
+ filtersVariant: FiltersTypeEnum.STATE;
172
+ additionalFilterProps?: AdditionalFilterPropsType<FiltersTypeEnum.STATE>;
173
+ filter: (row: RowsType[number], filterData: UseFiltersReturnType) => boolean;
174
+ } | {
175
+ filtersVariant: FiltersTypeEnum.NONE;
176
+ additionalFilterProps?: never;
177
+ filter?: never;
178
+ });
179
+ export interface WrapperProps {
180
+ children: ReactElement<InternalTableProps>;
181
+ }
182
+ export interface ViewWrapperProps extends Pick<UseFiltersReturnType, 'offset' | 'handleSearch' | 'searchKey' | 'sortBy' | 'sortOrder' | 'clearFilters'>, AdditionalProps, Partial<ConfigurableColumnsType>, WrapperProps {
183
+ areRowsLoading: boolean;
184
+ }
185
+ interface WrappersType {
186
+ ViewWrapper?: FunctionComponent<ViewWrapperProps>;
187
+ }
188
+ export type InternalTablePropsWithWrappers = InternalTableProps & WrappersType;
189
+ export type TableProps = Pick<InternalTableProps, 'additionalFilterProps' | 'bulkSelectionConfig' | 'configurableColumns' | 'emptyStateConfig' | 'filtersVariant' | 'filter' | 'additionalProps' | 'columns' | 'getRows' | 'rows' | 'paginationVariant' | 'stylesConfig' | 'id' | 'RowActionsOnHoverComponent' | 'loading'> & WrappersType;
190
+ export interface FilterWrapperProps<T extends Exclude<FiltersTypeEnum, FiltersTypeEnum.NONE>> extends WrapperProps {
191
+ additionalFilterProps?: AdditionalFilterPropsType<T>;
192
+ }
193
+ export interface UseResizableTableConfigWrapperProps extends WrapperProps {
194
+ columns: TableProps['columns'];
195
+ }
196
+ export interface BulkSelectionActionWidgetProps extends Pick<BulkSelectionConfigType, 'BulkActionsComponent'> {
197
+ count: number;
198
+ handleClearBulkSelection: () => void;
199
+ parentRef: React.RefObject<HTMLDivElement>;
200
+ }
201
+ export type ConfigurableColumnsConfigType = Record<string, ConfigurableColumnsType['visibleColumns']>;
202
+ export {};
@@ -0,0 +1,6 @@
1
+ import { InternalTablePropsWithWrappers, RowsType } from './types';
2
+ declare const useTableWithKeyboardShortcuts: ({ bulkSelectionConfig, handleToggleBulkSelectionOnRow, bulkSelectionReturnValue, }: Pick<InternalTablePropsWithWrappers, "bulkSelectionConfig" | "bulkSelectionReturnValue" | "handleToggleBulkSelectionOnRow">, visibleRows: RowsType) => {
3
+ activeRowIndex: number;
4
+ setActiveRowIndex: import('react').Dispatch<import('react').SetStateAction<number>>;
5
+ };
6
+ export default useTableWithKeyboardShortcuts;
@@ -0,0 +1,7 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { Column, ConfigurableColumnsType, FiltersTypeEnum, TableProps, UseFiltersReturnType, WrapperProps } from './types';
3
+ export declare const searchAndSortRows: (rows: TableProps["rows"], filter: TableProps["filter"], filterData: UseFiltersReturnType, comparator?: Column["comparator"]) => import('./types').RowsType;
4
+ export declare const getFilterWrapperComponent: (filtersVariant: FiltersTypeEnum) => FunctionComponent<WrapperProps>;
5
+ export declare const getVisibleColumnsFromLocalStorage: ({ allColumns, id, }: Pick<ConfigurableColumnsType, "allColumns"> & Pick<TableProps, "id">) => Column[];
6
+ export declare const setVisibleColumnsToLocalStorage: ({ id, visibleColumns, }: Pick<ConfigurableColumnsType, "visibleColumns"> & Pick<TableProps, "id">) => void;
7
+ export declare const getVisibleColumns: ({ configurableColumns, columns, id, }: Pick<TableProps, "configurableColumns" | "columns" | "id">) => Column[];
@@ -69,4 +69,5 @@ export * from './CustomInput';
69
69
  export * from './InfoBlock';
70
70
  export * from './CodeEditorWrapper';
71
71
  export * from './SSOProviderIcon';
72
+ export * from './Table';
72
73
  export * from './Confetti';
@@ -1,6 +1,6 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
3
- import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
3
+ import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType, SegmentedControlProps } from '../Common';
4
4
  import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
5
5
  import { SelectPickerOptionType } from './Components';
6
6
  export declare enum EnvType {
@@ -598,7 +598,7 @@ export declare enum ConfigurationType {
598
598
  GUI = "GUI",
599
599
  YAML = "YAML"
600
600
  }
601
- export declare const CONFIGURATION_TYPE_OPTIONS: OptionType<ConfigurationType, ConfigurationType>[];
601
+ export declare const CONFIGURATION_TYPE_OPTIONS: SegmentedControlProps['segments'];
602
602
  export interface BaseURLParams {
603
603
  appId: string;
604
604
  envId: string;