@luscii-healthtech/web-ui 0.2.1 → 0.2.2
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/components/ListTable/ListTable.d.ts +6 -4
- package/dist/web-ui.cjs.development.js +8 -4
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +8 -4
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ListTable/ListTable.tsx +11 -4
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TextProps } from "../Text/Text";
|
|
3
3
|
import { RestPropped } from "../../types/general.types";
|
|
4
|
-
import { Localization, OnPaginationChange } from "../PaginationMenu/PaginationMenu.types";
|
|
4
|
+
import { Localization, OnPaginationChange, PageSize } from "../PaginationMenu/PaginationMenu.types";
|
|
5
5
|
export declare type ListTableItem = RestPropped;
|
|
6
6
|
export interface ListTableProps<ItemType extends ListTableItem, CellType> extends RestPropped {
|
|
7
7
|
items?: ItemType[];
|
|
8
8
|
configuration: ListTablePropsConfiguration<ItemType, CellType>;
|
|
9
9
|
pageCount?: number;
|
|
10
10
|
currentPage?: number;
|
|
11
|
-
onRowClick?: (arg: ItemType) => void;
|
|
12
11
|
onPaginationChange?: OnPaginationChange;
|
|
12
|
+
pageSize?: PageSize;
|
|
13
|
+
localization?: Localization;
|
|
14
|
+
resultCount?: number;
|
|
15
|
+
onRowClick?: (arg: ItemType) => void;
|
|
13
16
|
isLoading?: boolean;
|
|
14
17
|
showHeader?: boolean;
|
|
15
18
|
className?: string;
|
|
16
|
-
localization: Localization;
|
|
17
19
|
}
|
|
18
20
|
export interface ListTablePropsConfiguration<ItemType extends ListTableItem, CellType> {
|
|
19
21
|
emptyValue?: string;
|
|
@@ -28,5 +30,5 @@ export interface ListTablePropsConfigurationField<ItemType extends ListTableItem
|
|
|
28
30
|
field: (arg: ItemType) => string | CellType;
|
|
29
31
|
textProps?: Omit<TextProps, "text">;
|
|
30
32
|
}
|
|
31
|
-
export declare function ListTable<ItemType extends ListTableItem, CellType>({ items, configuration, pageCount, currentPage, onPaginationChange, onRowClick, isLoading, showHeader, className,
|
|
33
|
+
export declare function ListTable<ItemType extends ListTableItem, CellType>({ items, configuration, pageCount, currentPage, onPaginationChange, pageSize, localization, resultCount, onRowClick, isLoading, showHeader, className, ...restProps }: ListTableProps<ItemType, CellType>): JSX.Element;
|
|
32
34
|
export default ListTable;
|
|
@@ -2301,7 +2301,7 @@ function ListTableHeader(_ref) {
|
|
|
2301
2301
|
})));
|
|
2302
2302
|
}
|
|
2303
2303
|
|
|
2304
|
-
var _excluded$9 = ["items", "configuration", "pageCount", "currentPage", "onPaginationChange", "onRowClick", "isLoading", "showHeader", "className"
|
|
2304
|
+
var _excluded$9 = ["items", "configuration", "pageCount", "currentPage", "onPaginationChange", "pageSize", "localization", "resultCount", "onRowClick", "isLoading", "showHeader", "className"];
|
|
2305
2305
|
function ListTable(_ref) {
|
|
2306
2306
|
var _ref$items = _ref.items,
|
|
2307
2307
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
@@ -2311,13 +2311,15 @@ function ListTable(_ref) {
|
|
|
2311
2311
|
_ref$currentPage = _ref.currentPage,
|
|
2312
2312
|
currentPage = _ref$currentPage === void 0 ? 1 : _ref$currentPage,
|
|
2313
2313
|
onPaginationChange = _ref.onPaginationChange,
|
|
2314
|
+
pageSize = _ref.pageSize,
|
|
2315
|
+
localization = _ref.localization,
|
|
2316
|
+
resultCount = _ref.resultCount,
|
|
2314
2317
|
onRowClick = _ref.onRowClick,
|
|
2315
2318
|
_ref$isLoading = _ref.isLoading,
|
|
2316
2319
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
2317
2320
|
_ref$showHeader = _ref.showHeader,
|
|
2318
2321
|
showHeader = _ref$showHeader === void 0 ? true : _ref$showHeader,
|
|
2319
2322
|
className = _ref.className,
|
|
2320
|
-
localization = _ref.localization,
|
|
2321
2323
|
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
2322
2324
|
|
|
2323
2325
|
// For not displaying empty view at creation
|
|
@@ -2363,10 +2365,12 @@ function ListTable(_ref) {
|
|
|
2363
2365
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2364
2366
|
className: classNames("cweb-list-table-footer", "flex justify-center flex-row items-center", "h-20 py-4 px-4")
|
|
2365
2367
|
}, /*#__PURE__*/React__default.createElement(PaginationMenu, {
|
|
2366
|
-
onChange: onPaginationChange,
|
|
2367
2368
|
pageCount: pageCount,
|
|
2368
2369
|
currentPageNumber: currentPage,
|
|
2369
|
-
|
|
2370
|
+
onChange: onPaginationChange,
|
|
2371
|
+
pageSize: pageSize,
|
|
2372
|
+
localization: localization,
|
|
2373
|
+
resultCount: resultCount
|
|
2370
2374
|
})))))));
|
|
2371
2375
|
}
|
|
2372
2376
|
|