@react-fabric/data 1.0.0-beta.42 → 1.0.0-beta.43
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.
|
@@ -46,7 +46,7 @@ var BodyCell = function BodyCell(_ref) {
|
|
|
46
46
|
var _column$dataType;
|
|
47
47
|
var value = utilities.getByPath(item, column.id.toString());
|
|
48
48
|
if (column.renderer != null) {
|
|
49
|
-
return column.renderer(
|
|
49
|
+
return column.renderer(value, item, index);
|
|
50
50
|
}
|
|
51
51
|
if (column.dataType === "boolean") {
|
|
52
52
|
var _column$valueMap;
|
|
@@ -73,7 +73,7 @@ var BodyCell = function BodyCell(_ref) {
|
|
|
73
73
|
return value !== null && value !== void 0 ? value : "";
|
|
74
74
|
}, [item, column]);
|
|
75
75
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
76
|
-
className: "overflow-hidden bg-inherit start-0 border-e",
|
|
76
|
+
className: "overflow-hidden bg-inherit start-0 border-e group/table-col",
|
|
77
77
|
style: {
|
|
78
78
|
width: width !== null && width !== void 0 ? width : types.COL_DEFAULT_WIDTH,
|
|
79
79
|
minWidth: (_column$minWidth = column.minWidth) !== null && _column$minWidth !== void 0 ? _column$minWidth : types.COL_MIN_WIDTH,
|
|
@@ -55,7 +55,7 @@ var BodyRow = function BodyRow(_ref) {
|
|
|
55
55
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
56
56
|
role: "none",
|
|
57
57
|
"data-row": index,
|
|
58
|
-
className: classNames("flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500", onRowClick && "hover:bg-primary-50 active:bg-primary-100", index % 2 ? "bg-even" : "bg-odd"),
|
|
58
|
+
className: classNames("flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500 group/table-row", onRowClick && "hover:bg-primary-50 active:bg-primary-100", index % 2 ? "bg-even" : "bg-odd"),
|
|
59
59
|
onClick: function onClick() {
|
|
60
60
|
return checkableRows && keyProperty && !onRowClick ? toggleChecked(data[keyProperty]) : onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(data);
|
|
61
61
|
},
|
|
@@ -46,7 +46,7 @@ var BodyCell = function BodyCell(_ref) {
|
|
|
46
46
|
var _column$dataType;
|
|
47
47
|
var value = getByPath(item, column.id.toString());
|
|
48
48
|
if (column.renderer != null) {
|
|
49
|
-
return column.renderer(
|
|
49
|
+
return column.renderer(value, item, index);
|
|
50
50
|
}
|
|
51
51
|
if (column.dataType === "boolean") {
|
|
52
52
|
var _column$valueMap;
|
|
@@ -73,7 +73,7 @@ var BodyCell = function BodyCell(_ref) {
|
|
|
73
73
|
return value !== null && value !== void 0 ? value : "";
|
|
74
74
|
}, [item, column]);
|
|
75
75
|
return /*#__PURE__*/jsx("div", {
|
|
76
|
-
className: "overflow-hidden bg-inherit start-0 border-e",
|
|
76
|
+
className: "overflow-hidden bg-inherit start-0 border-e group/table-col",
|
|
77
77
|
style: {
|
|
78
78
|
width: width !== null && width !== void 0 ? width : COL_DEFAULT_WIDTH,
|
|
79
79
|
minWidth: (_column$minWidth = column.minWidth) !== null && _column$minWidth !== void 0 ? _column$minWidth : COL_MIN_WIDTH,
|
|
@@ -55,7 +55,7 @@ var BodyRow = function BodyRow(_ref) {
|
|
|
55
55
|
children: [/*#__PURE__*/jsxs("div", {
|
|
56
56
|
role: "none",
|
|
57
57
|
"data-row": index,
|
|
58
|
-
className: classNames("flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500", onRowClick && "hover:bg-primary-50 active:bg-primary-100", index % 2 ? "bg-even" : "bg-odd"),
|
|
58
|
+
className: classNames("flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500 group/table-row", onRowClick && "hover:bg-primary-50 active:bg-primary-100", index % 2 ? "bg-even" : "bg-odd"),
|
|
59
59
|
onClick: function onClick() {
|
|
60
60
|
return checkableRows && keyProperty && !onRowClick ? toggleChecked(data[keyProperty]) : onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(data);
|
|
61
61
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/data",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.43",
|
|
4
4
|
"description": "RUF: Data package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
39
|
-
"@react-fabric/date": "^1.0.0-beta.
|
|
40
|
-
"@react-fabric/form": "^1.0.0-beta.
|
|
41
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
38
|
+
"@react-fabric/core": "^1.0.0-beta.43",
|
|
39
|
+
"@react-fabric/date": "^1.0.0-beta.43",
|
|
40
|
+
"@react-fabric/form": "^1.0.0-beta.43",
|
|
41
|
+
"@react-fabric/utilities": "^1.0.0-beta.43",
|
|
42
42
|
"@tanstack/react-virtual": "^3.8.6",
|
|
43
43
|
"classnames": "^2.5.1",
|
|
44
44
|
"color": "^4.2.3",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"node": ">=18.12.0",
|
|
55
55
|
"npm": ">=8.19.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "92cd2fc5c71e3f0e00a9cff83ff924c51d7adb57"
|
|
58
58
|
}
|
package/src/table/BodyCell.tsx
CHANGED
|
@@ -52,7 +52,7 @@ export const BodyCell = ({
|
|
|
52
52
|
const content = useMemo(() => {
|
|
53
53
|
const value = getByPath(item, column.id.toString());
|
|
54
54
|
if (column.renderer != null) {
|
|
55
|
-
return column.renderer(
|
|
55
|
+
return column.renderer(value, item, index);
|
|
56
56
|
}
|
|
57
57
|
if (column.dataType === "boolean") {
|
|
58
58
|
const map = column.valueMap ?? { true: "Yes", false: "no" };
|
|
@@ -74,7 +74,7 @@ export const BodyCell = ({
|
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
76
|
<div
|
|
77
|
-
className="overflow-hidden bg-inherit start-0 border-e"
|
|
77
|
+
className="overflow-hidden bg-inherit start-0 border-e group/table-col"
|
|
78
78
|
style={{
|
|
79
79
|
width: width ?? COL_DEFAULT_WIDTH,
|
|
80
80
|
minWidth: column.minWidth ?? COL_MIN_WIDTH,
|
package/src/table/BodyRow.tsx
CHANGED
|
@@ -74,7 +74,7 @@ export const BodyRow = ({
|
|
|
74
74
|
role="none"
|
|
75
75
|
data-row={index}
|
|
76
76
|
className={classNames(
|
|
77
|
-
"flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500",
|
|
77
|
+
"flex flex-nowrap datatable-row data-[hilight]:outline-1 -outline-offset-1 outline-primary-500 group/table-row",
|
|
78
78
|
onRowClick && "hover:bg-primary-50 active:bg-primary-100",
|
|
79
79
|
index % 2 ? "bg-even" : "bg-odd",
|
|
80
80
|
)}
|