Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@frui.ts/dataviews

Package Overview
Dependencies
Maintainers
5
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frui.ts/dataviews - npm Package Compare versions

Comparing version 0.16.0-rc.1 to 0.16.0-rc.2

dist/dataList/dataListRow.d.ts

2

dist/dataRepeater/index.js

@@ -35,3 +35,3 @@ "use strict";

var ItemWrapper = (_b = props.bodyWrapperType) !== null && _b !== void 0 ? _b : "tbody";
return (React.createElement(Wrapper, __assign({}, props.wrapperProps),
return (React.createElement(Wrapper, __assign({ id: props.id }, props.wrapperProps),
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 })),

@@ -38,0 +38,0 @@ 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 })); }))));

@@ -44,3 +44,3 @@ "use strict";

else if (props.pagingFilter && column.sortable && column.property) {
return (React.createElement(Item, __assign({ key: key, className: "sortable", onClick: function () { var _a; return (_a = props.onColumnSort) === null || _a === void 0 ? void 0 : _a.call(props, column); } }, props.itemCellProps, { style: column.headerStyle }),
return (React.createElement(Item, __assign({ key: key, className: column.headerClassName ? "sortable " + column.headerClassName : "sortable", onClick: function () { var _a; return (_a = props.onColumnSort) === null || _a === void 0 ? void 0 : _a.call(props, column); } }, props.itemCellProps),
column.titleFactory ? column.titleFactory(context) : column.title,

@@ -50,3 +50,3 @@ React.createElement("span", { className: getSortIndicatorClass(props.pagingFilter, column.property) })));

else {
return (React.createElement(Item, __assign({ key: key }, props.itemCellProps, { style: column.headerStyle }), column.titleFactory ? column.titleFactory(context) : column.title));
return (React.createElement(Item, __assign({ key: key, className: column.headerClassName }, props.itemCellProps), column.titleFactory ? column.titleFactory(context) : column.title));
}

@@ -53,0 +53,0 @@ })));

@@ -30,3 +30,3 @@ "use strict";

return (React.createElement(Wrapper, __assign({}, props.wrapperProps), columns.map(function (column, i) {
var _a;
var _a, _b;
var key = (_a = column.property) !== null && _a !== void 0 ? _a : i;

@@ -38,3 +38,3 @@ var value = column.property ? item[column.property] : undefined;

else {
return (React.createElement(Item, __assign({ key: key }, itemCellProps), column.valueFormatter ? column.valueFormatter({ value: value, item: item, column: column, context: context }) : value));
return (React.createElement(Item, __assign({ key: key, className: column.cellClassName }, itemCellProps, (_b = column.cellProps) === null || _b === void 0 ? void 0 : _b.call(column, { value: value, item: item, column: column, context: context })), column.valueFormatter ? column.valueFormatter({ value: value, item: item, column: column, context: context }) : value));
}

@@ -41,0 +41,0 @@ })));

@@ -7,3 +7,2 @@ /// <reference types="react" />

headerRowClassName?: string;
headerCellClassName?: string;
}

@@ -10,0 +9,0 @@ declare function dataTable<TItem, TContext>(props: DataTableProps<TItem, TContext>): JSX.Element;

@@ -22,5 +22,5 @@ "use strict";

var _a;
return (React.createElement("table", { className: props.className },
return (React.createElement("table", { id: props.id, className: props.className },
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(tableHeader_1.default, { columns: props.columns, context: props.context, pagingFilter: props.pagingFilter, onColumnSort: props.onColumnSort, className: props.headerRowClassName }))),
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, rowProps: props.rowProps })); }))));

@@ -27,0 +27,0 @@ }

@@ -8,3 +8,2 @@ /// <reference types="react" />

className?: string;
cellClassName?: string;
}

@@ -11,0 +10,0 @@ declare function tableHeader<TItem, TContext>(props: HeaderRowProps<TItem, TContext>): JSX.Element;

@@ -29,3 +29,3 @@ "use strict";

else if (props.pagingFilter && column.sortable && column.property) {
return (React.createElement("th", { key: key, className: "sortable", style: column.headerStyle, onClick: function () { var _a; return (_a = props.onColumnSort) === null || _a === void 0 ? void 0 : _a.call(props, column); } },
return (React.createElement("th", { key: key, className: column.headerClassName ? "sortable " + column.headerClassName : "sortable", onClick: function () { var _a; return (_a = props.onColumnSort) === null || _a === void 0 ? void 0 : _a.call(props, column); } },
column.titleFactory ? column.titleFactory(props.context) : column.title,

@@ -35,3 +35,3 @@ React.createElement("span", { className: getSortIndicatorClass(props.pagingFilter, column.property) })));

else {
return (React.createElement("th", { key: key, className: props.cellClassName, style: column.headerStyle }, column.titleFactory ? column.titleFactory(props.context) : column.title));
return (React.createElement("th", { key: key, className: column.headerClassName }, column.titleFactory ? column.titleFactory(props.context) : column.title));
}

@@ -38,0 +38,0 @@ })));

@@ -26,3 +26,3 @@ "use strict";

return (React.createElement("tr", __assign({}, rowProps === null || rowProps === void 0 ? void 0 : rowProps(item, context)), columns.map(function (column, i) {
var _a;
var _a, _b;
var key = (_a = column.property) !== null && _a !== void 0 ? _a : i;

@@ -34,3 +34,3 @@ var value = column.property ? item[column.property] : undefined;

else {
return (React.createElement("td", { key: key, className: column.cellClassName, style: column.cellStyle }, column.valueFormatter ? column.valueFormatter({ value: value, item: item, column: column, context: context }) : value));
return (React.createElement("td", __assign({ key: key, className: column.cellClassName }, (_b = column.cellProps) === null || _b === void 0 ? void 0 : _b.call(column, { value: value, item: item, column: column, context: context })), column.valueFormatter ? column.valueFormatter({ value: value, item: item, column: column, context: context }) : value));
}

@@ -37,0 +37,0 @@ })));

@@ -20,9 +20,14 @@ import { IPagingFilter } from "@frui.ts/data";

sortable?: boolean;
headerStyle?: React.CSSProperties;
headerClassName?: string;
headerFormatter?: (props: ColumnRenderProps<TItem, TContext, TProperty> & KeyRenderProps) => ReactNode;
valueFormatter?: (props: ValueRenderProps<TItem, TContext, TProperty>) => ReactNode;
cellStyle?: React.CSSProperties;
cellClassName?: string;
cellFormatter?: (props: ValueRenderProps<TItem, TContext, TProperty> & KeyRenderProps) => ReactNode;
cellProps?: (props: ValueRenderProps<TItem, TContext, TProperty>) => any;
}
export interface ResponsiveColumnDefinition<TItem, TContext> extends ColumnDefinition<TItem, TContext> {
responsiveTitle?: string | false;
responsiveTitleFactory?: (context: TContext) => string;
responsiveVisible?: boolean;
}
export interface PropsWithColumns<TItem, TContext> {

@@ -37,2 +42,3 @@ columns: ColumnDefinition<TItem, TContext>[];

export interface DataTablePropsBase<TItem, TContext> extends PropsWithColumns<TItem, TContext>, PropsWithItems<TItem> {
id?: string;
pagingFilter?: IPagingFilter;

@@ -39,0 +45,0 @@ onColumnSort?: (column: ColumnDefinition<TItem, TContext>) => any;

@@ -0,3 +1,5 @@

export { DataListProps, default as DataList } from "./dataList";
export { DataRepeaterProps, default as DataRepeater } from "./dataRepeater";
export { DataTableProps, default as DataTable } from "./dataTable";
export * from "./dataTypes";
export { default as DataRepeater, DataRepeaterProps } from "./dataRepeater";
export { default as DataTable, DataTableProps } from "./dataTable";
export { default as ResponsiveTable, ResponsiveTableProps } from "./responsiveTable";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var dataList_1 = require("./dataList");
exports.DataList = dataList_1.default;
var dataRepeater_1 = require("./dataRepeater");

@@ -7,2 +9,4 @@ exports.DataRepeater = dataRepeater_1.default;

exports.DataTable = dataTable_1.default;
var responsiveTable_1 = require("./responsiveTable");
exports.ResponsiveTable = responsiveTable_1.default;
//# sourceMappingURL=index.js.map

@@ -6,3 +6,3 @@ {

},
"version": "0.16.0-rc.1",
"version": "0.16.0-rc.2",
"description": "View components for data display",

@@ -41,3 +41,4 @@ "keywords": [

"dependencies": {
"@frui.ts/data": "^0.14.0-beta.2",
"@frui.ts/data": "^0.16.0-rc.2",
"@frui.ts/helpers": "^0.16.0-rc.2",
"mobx-react-lite": "^2.0.6"

@@ -52,3 +53,3 @@ },

},
"gitHead": "13b0c80767f5f6e1759b937fe4ca34a7dc20e191"
"gitHead": "38e6dc0f06106e5dd25b016f6d9f773e08ae3a73"
}

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc