@devtron-labs/devtron-fe-common-lib 0.6.1-beta-6 → 0.6.1-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.
- package/dist/Common/Hooks/useUrlFilters/types.d.ts +1 -0
- package/dist/Common/Hooks/useUrlFilters/useUrlFilters.d.ts +1 -1
- package/dist/Common/Hooks/useUrlFilters/utils.d.ts +1 -0
- package/dist/Common/SortableTableHeaderCell/SortableTableHeaderCell.d.ts +1 -17
- package/dist/Common/SortableTableHeaderCell/index.d.ts +0 -1
- package/dist/Common/SortableTableHeaderCell/types.d.ts +16 -49
- package/dist/Shared/Components/SelectPicker/type.d.ts +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-K8H12v7j.js → cssMode-BMU6EYjy.js} +1 -1
- package/dist/{freemarker2-DqZHY7us.js → freemarker2-DdwnH3jz.js} +1 -1
- package/dist/{handlebars-DOwTtyDN.js → handlebars-D0ZzmK4q.js} +1 -1
- package/dist/{html-Cuel-bnX.js → html-DBHemnBi.js} +1 -1
- package/dist/{htmlMode-B0uNYk02.js → htmlMode-yB33T7us.js} +1 -1
- package/dist/{index-DNzvaC_C.js → index-B5_txzYq.js} +14606 -14608
- package/dist/index.js +25 -26
- package/dist/{javascript-CbKfi5nk.js → javascript-Bniqn1iX.js} +1 -1
- package/dist/{jsonMode-C8yx1ILD.js → jsonMode-DczaFWxo.js} +1 -1
- package/dist/{liquid-ZlV6B0HU.js → liquid-DI-QnklI.js} +1 -1
- package/dist/{mdx-DEJ0_BUr.js → mdx-CgvklWx9.js} +1 -1
- package/dist/{python-B7Csvvd1.js → python-DD96kNqx.js} +1 -1
- package/dist/{razor-BCgpMDNZ.js → razor-BhNmwM8H.js} +1 -1
- package/dist/{tsMode-CmxoASMc.js → tsMode-DL1QNVlX.js} +1 -1
- package/dist/{typescript-BnbI3tAO.js → typescript-CWOt8D1v.js} +1 -1
- package/dist/{xml-C0gQgpRl.js → xml-kdR12t8R.js} +1 -1
- package/dist/{yaml-DaHdTiuN.js → yaml-CpILAyPe.js} +1 -1
- package/package.json +1 -1
- package/dist/Common/SortableTableHeaderCell/useResizableTableConfig.d.ts +0 -9
|
@@ -8,6 +8,7 @@ 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}`;
|
|
11
12
|
}
|
|
12
13
|
export type UseUrlFiltersReturnType<T, K = unknown> = K & {
|
|
13
14
|
/**
|
|
@@ -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, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
|
|
19
|
+
declare const useUrlFilters: <T = string, K = unknown>({ initialSortKey, parseSearchParams, localStorageKey, }?: UseUrlFiltersProps<T, K>) => UseUrlFiltersReturnType<T, K>;
|
|
20
20
|
export default useUrlFilters;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setItemInLocalStorageIfKeyExists: (localStorageKey: string, value: string) => void;
|
|
@@ -12,22 +12,6 @@ import { SortableTableHeaderCellProps } from './types';
|
|
|
12
12
|
* disabled={isDisabled}
|
|
13
13
|
* />
|
|
14
14
|
* ```
|
|
15
|
-
*
|
|
16
|
-
* @example Non-sortable cell
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <SortableTableHeaderCell
|
|
19
|
-
* isSortable={false}
|
|
20
|
-
* title="Header Cell"
|
|
21
|
-
* />
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* * @example Resizable cell
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <SortableTableHeaderCell
|
|
27
|
-
* isSortable={false}
|
|
28
|
-
* title="Header Cell"
|
|
29
|
-
* />
|
|
30
|
-
* ```
|
|
31
15
|
*/
|
|
32
|
-
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate,
|
|
16
|
+
declare const SortableTableHeaderCell: ({ isSorted, triggerSorting, sortOrder, title, disabled, isSortable, showTippyOnTruncate, }: SortableTableHeaderCellProps) => JSX.Element;
|
|
33
17
|
export default SortableTableHeaderCell;
|
|
@@ -1,68 +1,35 @@
|
|
|
1
1
|
import { SortingOrder } from '../Constants';
|
|
2
|
-
export
|
|
2
|
+
export interface SortableTableHeaderCellProps {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
title: string;
|
|
7
|
-
/**
|
|
8
|
-
* If true, the tippy is shown on Sortable header if text is truncated
|
|
9
|
-
* @default false
|
|
4
|
+
* If true, the cell is sorted
|
|
10
5
|
*/
|
|
11
|
-
|
|
12
|
-
} & ({
|
|
6
|
+
isSorted: boolean;
|
|
13
7
|
/**
|
|
14
|
-
*
|
|
8
|
+
* Callback for handling the sorting of the cell
|
|
15
9
|
*/
|
|
16
|
-
|
|
10
|
+
triggerSorting: () => void;
|
|
17
11
|
/**
|
|
18
|
-
*
|
|
12
|
+
* Current sort order
|
|
19
13
|
*
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
isResizable: true | boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Resize handler for the table
|
|
14
|
+
* Note: On click, the sort order should be updated as required
|
|
25
15
|
*/
|
|
26
|
-
|
|
27
|
-
} | {
|
|
28
|
-
id?: never;
|
|
29
|
-
isResizable?: false | undefined;
|
|
30
|
-
handleResize?: never;
|
|
31
|
-
}) & ({
|
|
16
|
+
sortOrder: SortingOrder;
|
|
32
17
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @default true
|
|
18
|
+
* Label for the cell
|
|
35
19
|
*/
|
|
36
|
-
|
|
20
|
+
title: string;
|
|
37
21
|
/**
|
|
38
22
|
* If true, the cell is disabled
|
|
39
23
|
*/
|
|
40
24
|
disabled: boolean;
|
|
41
25
|
/**
|
|
42
|
-
* If
|
|
43
|
-
|
|
44
|
-
isSorted: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Callback for handling the sorting of the cell
|
|
26
|
+
* If false, the cell acts like normal table header cell
|
|
27
|
+
* @default true
|
|
47
28
|
*/
|
|
48
|
-
|
|
29
|
+
isSortable?: boolean;
|
|
49
30
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* Note: On click, the sort order should be updated as required
|
|
31
|
+
* If true, the tippy is shown on Sortable header if text is truncated
|
|
32
|
+
* @default false
|
|
53
33
|
*/
|
|
54
|
-
|
|
55
|
-
} | {
|
|
56
|
-
isSortable: false;
|
|
57
|
-
disabled?: never;
|
|
58
|
-
isSorted?: never;
|
|
59
|
-
triggerSorting?: never;
|
|
60
|
-
sortOrder?: never;
|
|
61
|
-
});
|
|
62
|
-
export interface UseResizableTableConfigProps {
|
|
63
|
-
headersConfig: (Pick<SortableTableHeaderCellProps, 'id'> & {
|
|
64
|
-
width: number | string;
|
|
65
|
-
maxWidth?: number;
|
|
66
|
-
minWidth?: number;
|
|
67
|
-
})[];
|
|
34
|
+
showTippyOnTruncate?: boolean;
|
|
68
35
|
}
|
|
@@ -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'> {
|
|
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'> {
|
|
172
172
|
appliedFilterOptions: SelectPickerOptionType[];
|
|
173
173
|
handleApplyFilter: (filtersToApply: SelectPickerOptionType<number | string>[]) => void;
|
|
174
174
|
}
|