@frui.ts/dataviews
Advanced tools
Comparing version 0.15.0-alpha.2 to 0.15.0-beta.1
@@ -18,3 +18,6 @@ import * as React from "react"; | ||
declare function dataRepeater<TItem, TContext, TWrapper extends React.ElementType, THeadWrapper extends React.ElementType, THeadCell extends React.ElementType, TBodyWrapper extends React.ElementType, TItemWrapper extends React.ElementType, TItemCell extends React.ElementType>(props: DataRepeaterProps<TItem, TContext, TWrapper, THeadWrapper, THeadCell, TBodyWrapper, TItemWrapper, TItemCell>): JSX.Element; | ||
declare namespace dataRepeater { | ||
var defaultProps: Partial<DataRepeaterProps<any, any, any, any, any, any, any, any>>; | ||
} | ||
declare const DataRepeater: typeof dataRepeater; | ||
export default DataRepeater; |
@@ -18,2 +18,5 @@ "use strict"; | ||
var repeaterRow_1 = require("./repeaterRow"); | ||
var defaultProps = { | ||
displayHeader: true, | ||
}; | ||
function dataRepeater(props) { | ||
@@ -24,7 +27,8 @@ var _a, _b; | ||
return (React.createElement(Wrapper, __assign({}, props.wrapperProps), | ||
React.createElement(repeaterHeader_1.default, { columns: props.columns, context: props.context, pagingFilter: props.pagingFilter, onColumnSort: props.onColumnSort, wrapperType: props.headWrapperType, wrapperProps: props.headWrapperProps, itemCellType: props.headCellType, itemCellProps: props.headCellProps }), | ||
props.displayHeader && (React.createElement(repeaterHeader_1.default, { columns: props.columns, context: props.context, pagingFilter: props.pagingFilter, onColumnSort: props.onColumnSort, wrapperType: props.headWrapperType, wrapperProps: props.headWrapperProps, itemCellType: props.headCellType, itemCellProps: props.headCellProps })), | ||
React.createElement(ItemWrapper, __assign({}, props.bodyWrapperProps), props.items.map(function (item) { return (React.createElement(repeaterRow_1.default, { key: String(item[props.itemKey]), item: item, columns: props.columns, context: props.context, wrapperType: props.itemWrapperType, wrapperProps: props.itemWrapperProps, itemCellType: props.itemCellType, itemCellProps: props.itemCellProps })); })))); | ||
} | ||
dataRepeater.defaultProps = defaultProps; | ||
var DataRepeater = mobx_react_lite_1.observer(dataRepeater); | ||
exports.default = DataRepeater; | ||
//# sourceMappingURL=index.js.map |
@@ -9,3 +9,6 @@ /// <reference types="react" /> | ||
declare function dataTable<TItem, TContext>(props: DataTableProps<TItem, TContext>): JSX.Element; | ||
declare namespace dataTable { | ||
var defaultProps: Partial<DataTableProps<any, any>>; | ||
} | ||
declare const DataTable: typeof dataTable; | ||
export default DataTable; |
@@ -7,11 +7,15 @@ "use strict"; | ||
var tableRow_1 = require("./tableRow"); | ||
var defaultProps = { | ||
displayHeader: true, | ||
}; | ||
function dataTable(props) { | ||
var _a; | ||
return (React.createElement("table", { className: props.className }, | ||
React.createElement("thead", null, | ||
React.createElement(tableHeader_1.default, { columns: props.columns, context: props.context, pagingFilter: props.pagingFilter, onColumnSort: props.onColumnSort, className: props.headerRowClassName, cellClassName: props.headerCellClassName })), | ||
props.displayHeader && (React.createElement("thead", null, | ||
React.createElement(tableHeader_1.default, { columns: props.columns, context: props.context, pagingFilter: props.pagingFilter, onColumnSort: props.onColumnSort, className: props.headerRowClassName, cellClassName: props.headerCellClassName }))), | ||
React.createElement("tbody", null, (_a = props.items) === null || _a === void 0 ? void 0 : _a.map(function (item) { return (React.createElement(tableRow_1.default, { key: String(item[props.itemKey]), item: item, columns: props.columns, context: props.context })); })))); | ||
} | ||
dataTable.defaultProps = defaultProps; | ||
var DataTable = mobx_react_lite_1.observer(dataTable); | ||
exports.default = DataTable; | ||
//# sourceMappingURL=index.js.map |
@@ -36,2 +36,3 @@ import { IPagingFilter } from "@frui.ts/data"; | ||
onColumnSort?: (column: ColumnDefinition<TItem, TContext>) => any; | ||
displayHeader?: boolean; | ||
} |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.15.0-alpha.2", | ||
"version": "0.15.0-beta.1", | ||
"description": "View components for data display", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "c284a116ec1f9f17be366936544e2a07bae554b6" | ||
"gitHead": "2d202d197d961a3cf539b5082fce1eaa416d1238" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40813
319