wini-web-components 1.0.2 → 1.0.3
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.
|
@@ -11,6 +11,7 @@ type TbCellProps = {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
style?: CSSProperties;
|
|
13
13
|
align?: CellAlignItems | string;
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLTableDataCellElement>;
|
|
14
15
|
};
|
|
15
16
|
export declare class TbCell extends React.Component<TbCellProps> {
|
|
16
17
|
render(): React.ReactNode;
|
|
@@ -45,7 +45,7 @@ var TbCell = /** @class */ (function (_super) {
|
|
|
45
45
|
}
|
|
46
46
|
TbCell.prototype.render = function () {
|
|
47
47
|
var _a, _b;
|
|
48
|
-
return react_1.default.createElement("td", { style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className: "tb-cell ".concat((_b = this.props.className) !== null && _b !== void 0 ? _b : '', " ").concat(this.props.fixed ? 'tb-cell-fixed' : '') }, this.props.children);
|
|
48
|
+
return react_1.default.createElement("td", { onClick: this.props.onClick, style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className: "tb-cell ".concat((_b = this.props.className) !== null && _b !== void 0 ? _b : '', " ").concat(this.props.fixed ? 'tb-cell-fixed' : '') }, this.props.children);
|
|
49
49
|
};
|
|
50
50
|
return TbCell;
|
|
51
51
|
}(react_1.default.Component));
|
|
@@ -68,7 +68,7 @@ var TbRow = /** @class */ (function (_super) {
|
|
|
68
68
|
return wValue ? typeof wValue === 'number' ? "".concat(wValue, "px") : wValue : '60px';
|
|
69
69
|
}).join(" + "), ")");
|
|
70
70
|
}
|
|
71
|
-
return react_1.default.createElement(TbCell, { key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, fixed: e.props.fixed, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
71
|
+
return react_1.default.createElement(TbCell, { key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, fixed: e.props.fixed, onClick: e.props.onClick, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
72
72
|
}));
|
|
73
73
|
};
|
|
74
74
|
return TbRow;
|
|
@@ -89,7 +89,7 @@ var TbHeader = /** @class */ (function (_super) {
|
|
|
89
89
|
if (_this.props.children && i > 0 && i < (_this.props.children.length - 1)) {
|
|
90
90
|
ox = "calc(".concat(_this.props.children.slice(0, i).map(function (tb) { var _a; return ((_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.width) ? typeof tb.props.style.width === 'number' ? "".concat(tb.props.style.width, "px") : tb.props.style.width : '60px'; }).join(" + "), ")");
|
|
91
91
|
}
|
|
92
|
-
return react_1.default.createElement(TbCell, { key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, fixed: e.props.fixed, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
92
|
+
return react_1.default.createElement(TbCell, { key: "tb-cell-".concat(i), align: e.props.align, children: e.props.children, onClick: e.props.onClick, fixed: e.props.fixed, style: e.props.fixed ? (_this.props.children && i === _this.props.children.length - 1) ? __assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : __assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
93
93
|
})));
|
|
94
94
|
};
|
|
95
95
|
return TbHeader;
|