@npm-questionpro/wick-ui-lib 1.30.2 → 1.32.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.
@@ -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
- export declare const WuTableBody: <T>({ table, size, NoDataContent, isLoading, CustomLoader, isRowDisabled, }: {
3
+ interface IWuTableBodyProps<T> {
4
4
  table: Table<T>;
5
- size?: "compact" | "default";
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
- }) => React.JSX.Element;
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;
@@ -47,3 +47,4 @@ export * from './components/typography';
47
47
  export * from './components/useTranslation';
48
48
  export * from './components/virtualScroll';
49
49
  export * from './docs/ui/colorSystem.ts';
50
+ export * from './translate';
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface IWuTranslateProps {
3
+ children: React.ReactNode;
4
+ __i18nKey: string;
5
+ }
6
+ export declare const WuTranslate: React.FC<IWuTranslateProps>;
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export type IWuDictionary = Record<string, string>;
3
+ interface IWuTranslateContextProps {
4
+ dictionary: IWuDictionary;
5
+ setDictionary: React.Dispatch<React.SetStateAction<IWuDictionary>>;
6
+ }
7
+ export declare const useTranslate: () => IWuTranslateContextProps;
8
+ export declare const WuTranslateProvider: React.FC<{
9
+ children: React.ReactNode;
10
+ dictionary?: IWuDictionary;
11
+ }>;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ export { WuTranslate, type IWuTranslateProps } from './WuTranslate';
2
+ export { useTranslate as useWickuiTranslate, WuTranslateProvider, } from './WuTranslateContext';