digitinary-ui 1.0.194 → 1.0.196

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.
@@ -1,8 +1,10 @@
1
- import { SortIconProps, SetSortingValueProps, ResizableColumnProps, DraggableColumnProps, SelectAllRowsProps, SelectRowProps, ExpandableSectionProps } from './types';
2
- export declare const getSortIcon: ({ columnName, sortable, onClick, currentHeadCell, sort, }: SortIconProps) => JSX.Element | null;
3
- export declare const setSortingValue: ({ headCell, currentHeadCell, setCurrentHeadCell, sort, setSort, }: SetSortingValueProps) => void;
1
+ import { SingleSortIconProps, setSingleSortProps, ResizableColumnProps, DraggableColumnProps, SelectAllRowsProps, SelectRowProps, ExpandableSectionProps, setMaltiSortProps, MaltiSortIconProps } from './types';
2
+ export declare const getSingleSortIcon: ({ columnName, sortable, onClick, currentHeadCell, sort, }: SingleSortIconProps) => JSX.Element | null;
3
+ export declare const getMaltiSortIcon: ({ columnName, sortable, onClick, sort, }: MaltiSortIconProps) => JSX.Element | null;
4
+ export declare const setSingleSortValue: ({ headCell, currentHeadCell, setCurrentHeadCell, sort, setSort, }: setSingleSortProps) => void;
5
+ export declare const setMaltiSortValue: ({ headCell, sort, setSort }: setMaltiSortProps) => void;
4
6
  export declare const ResizableColumn: ({ header, resizable }: ResizableColumnProps) => import("react/jsx-runtime").JSX.Element;
5
- export declare const DraggableColumn: ({ index, moveColumn, children, isDragAndDropEnabled, header, resizable, currentHeadCell, setCurrentHeadCell, sort, setSort, setSortingValue, sortable, }: DraggableColumnProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const DraggableColumn: ({ index, moveColumn, children, isDragAndDropEnabled, header, resizable, currentHeadCell, setCurrentHeadCell, sort, setSort, sortable, maltiSort, }: DraggableColumnProps) => import("react/jsx-runtime").JSX.Element;
6
8
  export declare const updatedData: (rowIndex: number, columnId: string, value: string | number | Function | [
7
9
  ] | Object, setData: (data: any) => void) => void;
8
10
  export declare const toggleRowExpanded: (rowId: string, setExpandedRows: (rows: any) => void) => void;
@@ -1,11 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import { TablePaginationProps } from 'types';
3
- export interface SortIconProps {
3
+ export interface SingleSortIconProps {
4
4
  columnName: string;
5
5
  sortable: boolean;
6
6
  onClick: () => void;
7
7
  currentHeadCell: string;
8
- sort: string;
8
+ sort: '' | 'asc' | 'desc';
9
+ }
10
+ export interface MaltiSortIconProps {
11
+ columnName: string;
12
+ sortable: boolean;
13
+ onClick: () => void;
14
+ sort: Record<string, 'asc' | 'desc' | ''>;
9
15
  }
10
16
  export interface TaskTableProps {
11
17
  columns: TableColoumn[];
@@ -22,19 +28,27 @@ export interface TaskTableProps {
22
28
  setSelectedRows: (rows: Set<number>) => void;
23
29
  isDragAndDropEnabled?: boolean;
24
30
  paginationOptions?: TablePaginationProps;
25
- sort?: string;
26
- setSort?: React.Dispatch<React.SetStateAction<string>>;
31
+ sort?: '' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>;
32
+ setSort?: React.Dispatch<React.SetStateAction<'' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>>>;
27
33
  currentHeadCell?: string;
28
34
  setCurrentHeadCell?: React.Dispatch<React.SetStateAction<string>>;
35
+ maltiSort: boolean;
29
36
  }
30
- export interface SetSortingValueProps {
37
+ export interface setSingleSortProps {
31
38
  headCell: {
32
39
  id: string;
33
40
  };
34
41
  currentHeadCell: string;
35
42
  setCurrentHeadCell: (value: string) => void;
36
- sort: string;
37
- setSort: (value: string) => void;
43
+ sort: '' | 'asc' | 'desc';
44
+ setSort: (value: '' | 'asc' | 'desc') => void;
45
+ }
46
+ export interface setMaltiSortProps {
47
+ headCell: {
48
+ id: string;
49
+ };
50
+ sort: Record<string, 'asc' | 'desc' | ''>;
51
+ setSort: (value: Record<string, 'asc' | 'desc' | ''>) => void;
38
52
  }
39
53
  export type HeaderType = {
40
54
  getResizeHandler: () => (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
@@ -51,11 +65,10 @@ export interface SortableHeaderProps {
51
65
  header: HeaderType;
52
66
  currentHeadCell: string;
53
67
  setCurrentHeadCell: (value: string) => void;
54
- sort: string;
55
- setSort: (value: string) => void;
56
- setSortingValue: (props: SetSortingValueProps) => void;
57
- getSortIcon: (props: SortIconProps) => JSX.Element | null;
68
+ sort: '' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>;
69
+ setSort: (value: '' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>) => void;
58
70
  sortable: boolean;
71
+ maltiSort: boolean;
59
72
  }
60
73
  export interface DraggableColumnProps {
61
74
  index: number;
@@ -67,14 +80,16 @@ export interface DraggableColumnProps {
67
80
  currentHeadCell?: string;
68
81
  setCurrentHeadCell?: (value: string) => void;
69
82
  sortable: boolean;
70
- sort?: string;
71
- setSort?: (value: string) => void;
72
- setSortingValue: (props: SetSortingValueProps) => void;
73
- getSortIcon: (props: SortIconProps) => JSX.Element | null;
83
+ sort?: '' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>;
84
+ setSort?: (value: '' | 'asc' | 'desc' | Record<string, '' | 'asc' | 'desc'>) => void;
85
+ maltiSort: boolean;
74
86
  }
75
- interface CellProps {
87
+ type CellProps = {
76
88
  getValue: () => void;
77
- }
89
+ row: {
90
+ original: Record<string, string | number | boolean | Record<string, string | number | boolean>>;
91
+ };
92
+ };
78
93
  export type TableColoumn = {
79
94
  accessorKey: string | number;
80
95
  header: string;