@npm-questionpro/wick-ui-lib 1.31.0 → 1.32.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.
- package/dist/src/components/table/components/dataTable/WuDataTable.d.ts +6 -1
- package/dist/src/components/table/components/table/WuTable.d.ts +6 -1
- package/dist/src/components/table/ui/_body.d.ts +5 -3
- package/dist/src/components/table/ui/_header.d.ts +2 -1
- package/dist/src/components/table/ui/_virtualBody.d.ts +15 -0
- package/dist/src/components/table/utils/tableStyles.d.ts +7 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/translate/WuTranslate.d.ts +1 -1
- package/dist/src/translate/WuTranslateContext.d.ts +5 -5
- package/dist/src/translate/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +5619 -5420
- package/dist/wick-ui-lib/umd/index.js +11 -11
- package/package.json +3 -3
|
@@ -18,5 +18,10 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
|
|
|
18
18
|
HeaderAction?: React.ReactNode;
|
|
19
19
|
NoDataContent?: React.ReactNode;
|
|
20
20
|
stickyHeader?: boolean;
|
|
21
|
+
virtualization?: {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
maxHeight?: number;
|
|
24
|
+
threshold?: number;
|
|
25
|
+
};
|
|
21
26
|
}
|
|
22
|
-
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
27
|
+
export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, virtualization, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
|
|
@@ -23,5 +23,10 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
|
|
|
23
23
|
CustomLoader?: React.ReactNode;
|
|
24
24
|
NoDataContent?: React.ReactNode;
|
|
25
25
|
rowSelection?: IWuTableRowSelection<T>;
|
|
26
|
+
virtualization?: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
maxHeight?: number;
|
|
29
|
+
threshold?: number;
|
|
30
|
+
};
|
|
26
31
|
}
|
|
27
|
-
export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, ...rest }: IWuTableProps<T>) => React.JSX.Element;
|
|
32
|
+
export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, virtualization, ...rest }: IWuTableProps<T>) => React.JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
|
|
3
|
+
interface IWuTableBodyProps<T> {
|
|
4
4
|
table: Table<T>;
|
|
5
|
-
size?:
|
|
5
|
+
size?: 'compact' | 'default';
|
|
6
6
|
NoDataContent?: React.ReactNode;
|
|
7
7
|
isLoading?: boolean;
|
|
8
8
|
CustomLoader?: React.ReactNode;
|
|
9
9
|
isRowDisabled?: (row: T) => boolean;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
export declare const WuTableBody: <T>({ table, size, NoDataContent, isLoading, CustomLoader, isRowDisabled, }: IWuTableBodyProps<T>) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Table } from '@tanstack/react-table';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { IWuManualSorting } from '../types/IWuManualSorting';
|
|
4
|
-
export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort, size, isRowSelected, HeaderAction, isStickyHeader, }: {
|
|
4
|
+
export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort, size, isRowSelected, HeaderAction, isStickyHeader, asVirtualContent, }: {
|
|
5
5
|
table: Table<T>;
|
|
6
6
|
sortableColumns: string[];
|
|
7
7
|
manual?: boolean;
|
|
@@ -10,4 +10,5 @@ export declare const WuTableHeader: <T>({ table, sortableColumns, manual, onSort
|
|
|
10
10
|
isRowSelected?: boolean;
|
|
11
11
|
HeaderAction?: React.ReactNode;
|
|
12
12
|
isStickyHeader?: boolean;
|
|
13
|
+
asVirtualContent?: boolean;
|
|
13
14
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Table } from '@tanstack/react-table';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { IWuManualSorting } from '../types/IWuManualSorting';
|
|
4
|
+
export interface IWuVirtualTableBodyProps<T> {
|
|
5
|
+
table: Table<T>;
|
|
6
|
+
size?: 'compact' | 'default';
|
|
7
|
+
isRowDisabled?: (row: T) => boolean;
|
|
8
|
+
containerHeight?: number;
|
|
9
|
+
sortableColumns: string[];
|
|
10
|
+
HeaderAction?: React.ReactNode;
|
|
11
|
+
isRowSelected?: boolean;
|
|
12
|
+
manual?: boolean;
|
|
13
|
+
onSort?: (meta: IWuManualSorting) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const WuVirtualTableBody: <T>({ table, size, isRowDisabled, containerHeight, sortableColumns, HeaderAction, isRowSelected, manual, onSort, }: IWuVirtualTableBodyProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const getTableRowClasses: (isSelected: boolean, isDisabled: boolean) => string;
|
|
2
|
+
export declare const getTableCellClasses: (columnId: string, size?: "compact" | "default", cellAlign?: "left" | "center" | "right", includeOverflow?: boolean) => string;
|
|
3
|
+
export declare const getHeaderHeightClass: (size?: "compact" | "default") => string;
|
|
4
|
+
export declare const getHeaderAlignClasses: (headerAlign?: "left" | "center" | "right") => string;
|
|
5
|
+
export declare const getSortIconAlignClasses: (headerAlign?: "left" | "center" | "right") => string;
|
|
6
|
+
export declare const getSortArrowUpClasses: (isDesc: boolean, isSorted: boolean) => string;
|
|
7
|
+
export declare const getSortArrowDownClasses: (isAsc: boolean, isSorted: boolean) => string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export interface IWuTranslateProps {
|
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
__i18nKey: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const WuTranslate: React.
|
|
6
|
+
export declare const WuTranslate: React.FC<IWuTranslateProps>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
type IWuDictionary = Record<string, string>;
|
|
2
|
+
export type IWuDictionary = Record<string, string>;
|
|
3
3
|
interface IWuTranslateContextProps {
|
|
4
4
|
dictionary: IWuDictionary;
|
|
5
5
|
setDictionary: React.Dispatch<React.SetStateAction<IWuDictionary>>;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const WuTranslateProvider:
|
|
9
|
-
children
|
|
7
|
+
export declare const useTranslate: () => IWuTranslateContextProps;
|
|
8
|
+
export declare const WuTranslateProvider: React.FC<{
|
|
9
|
+
children: React.ReactNode;
|
|
10
10
|
dictionary?: IWuDictionary;
|
|
11
|
-
}
|
|
11
|
+
}>;
|
|
12
12
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { WuTranslate, type IWuTranslateProps } from './WuTranslate';
|
|
2
|
-
export { useWickuiTranslate, WuTranslateProvider } from './WuTranslateContext';
|
|
2
|
+
export { useTranslate as useWickuiTranslate, WuTranslateProvider, } from './WuTranslateContext';
|