elseware-ui 2.24.0 → 2.25.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/build/components/data-display/data-view/com/DataViewContent.d.ts +2 -1
- package/build/components/data-display/data-view/com/DataViewFooter.d.ts +6 -0
- package/build/components/data-display/data-view/controls/DataViewPageSize.d.ts +7 -0
- package/build/components/data-display/data-view/controls/DataViewPagination.d.ts +6 -0
- package/build/components/data-display/data-view/controls/DataViewSearch.d.ts +1 -1
- package/build/components/data-display/data-view/index.d.ts +5 -1
- package/build/components/data-display/index.d.ts +0 -1
- package/build/components/data-display/table/Table.d.ts +10 -8
- package/build/compositions/data-display/data-view-table/DataViewTable.d.ts +21 -0
- package/build/compositions/data-display/data-view-table/index.d.ts +2 -0
- package/build/compositions/data-display/index.d.ts +2 -0
- package/build/compositions/data-display/world-map-country-table/WorldMapCountryTable.d.ts +7 -0
- package/build/compositions/index.d.ts +1 -0
- package/build/index.d.ts +1 -1
- package/build/index.es.js +315 -330
- package/build/index.js +287 -303
- package/package.json +1 -1
- package/build/components/data-display/data-view/com/DataViewPagination.d.ts +0 -7
- package/build/components/data-display/table/TableContent.d.ts +0 -18
- package/build/components/data-display/world-map-country-table/WorldMapCountryTable.d.ts +0 -8
- /package/build/{components → compositions}/data-display/world-map-country-table/index.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { JSX } from "react";
|
|
2
3
|
type DataViewContentProps<T = any> = {
|
|
3
4
|
children: ReactNode | ((data: T[]) => ReactNode);
|
|
4
5
|
};
|
|
5
|
-
declare function DataViewContent<T = any>({ children }: DataViewContentProps<T>):
|
|
6
|
+
declare function DataViewContent<T = any>({ children, }: DataViewContentProps<T>): JSX.Element;
|
|
6
7
|
export default DataViewContent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Shape } from "../../../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
pageSizeOptions?: (number | "All")[];
|
|
4
|
+
shape?: Shape;
|
|
5
|
+
};
|
|
6
|
+
declare function DataViewPageSize({ pageSizeOptions, shape, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default DataViewPageSize;
|
|
@@ -2,16 +2,20 @@ import DataViewProvider from "./core/DataViewProvider";
|
|
|
2
2
|
import DataViewHeader from "./com/DataViewHeader";
|
|
3
3
|
import DataViewSidebar from "./com/DataViewSidebar";
|
|
4
4
|
import DataViewContent from "./com/DataViewContent";
|
|
5
|
-
import
|
|
5
|
+
import DataViewFooter from "./com/DataViewFooter";
|
|
6
6
|
import DataViewSearch from "./controls/DataViewSearch";
|
|
7
7
|
import DataViewSort from "./controls/DataViewSort";
|
|
8
8
|
import DataViewFilterGroup from "./controls/DataViewFilterGroup";
|
|
9
|
+
import DataViewPageSize from "./controls/DataViewPageSize";
|
|
10
|
+
import DataViewPagination from "./controls/DataViewPagination";
|
|
9
11
|
export declare const DataView: typeof DataViewProvider & {
|
|
10
12
|
Header: typeof DataViewHeader;
|
|
11
13
|
Sidebar: typeof DataViewSidebar;
|
|
12
14
|
Content: typeof DataViewContent;
|
|
15
|
+
Footer: typeof DataViewFooter;
|
|
13
16
|
Pagination: typeof DataViewPagination;
|
|
14
17
|
Search: typeof DataViewSearch;
|
|
15
18
|
Sort: typeof DataViewSort;
|
|
16
19
|
FilterGroup: typeof DataViewFilterGroup;
|
|
20
|
+
PageSize: typeof DataViewPageSize;
|
|
17
21
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Shape } from "../../../types";
|
|
3
|
+
export interface TableColumnConfig<T> {
|
|
4
|
+
key: keyof T | string;
|
|
5
|
+
header: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
render?: (value: any, row: T) => ReactNode;
|
|
8
|
+
}
|
|
2
9
|
export interface TableProps<T> {
|
|
3
10
|
title?: string;
|
|
4
11
|
columns: TableColumnConfig<T>[];
|
|
5
12
|
data: T[];
|
|
6
|
-
|
|
7
|
-
pageSizeOptions?: (number | "All")[];
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
isSuccess?: boolean;
|
|
10
|
-
isError?: boolean;
|
|
11
|
-
error?: unknown;
|
|
13
|
+
shape?: Shape;
|
|
12
14
|
}
|
|
13
|
-
declare function Table<T extends Record<string, any>>({ title, columns, data,
|
|
15
|
+
declare function Table<T extends Record<string, any>>({ title, columns, data, shape, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
export default Table;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TableColumnConfig } from "../../../components/data-display/table/Table";
|
|
2
|
+
import { SortConfig } from "../../../components/data-display/data-view/core/types";
|
|
3
|
+
type SortOption = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export interface DataViewTableProps<T> {
|
|
8
|
+
title?: string;
|
|
9
|
+
columns: TableColumnConfig<T>[];
|
|
10
|
+
data: T[];
|
|
11
|
+
sortOptions?: SortOption[];
|
|
12
|
+
sortConfig?: Record<string, SortConfig<T>>;
|
|
13
|
+
searchPlaceholder?: string;
|
|
14
|
+
defaultPageSize?: number;
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
isSuccess?: boolean;
|
|
17
|
+
isError?: boolean;
|
|
18
|
+
error?: unknown;
|
|
19
|
+
}
|
|
20
|
+
declare function DataViewTable<T extends Record<string, any>>({ title, columns, data, sortOptions, sortConfig, searchPlaceholder, defaultPageSize, isLoading, isSuccess, isError, error, }: DataViewTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default DataViewTable;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WorldMapPoint } from "../../../components/data-display/world-map/WorldMap";
|
|
2
|
+
interface WorldMapCountryTableProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
data: WorldMapPoint[];
|
|
5
|
+
}
|
|
6
|
+
export default function WorldMapCountryTable({ title, data, }: WorldMapCountryTableProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
package/build/index.d.ts
CHANGED