@react-fabric/data 1.0.0-beta.7 → 1.0.0-beta.9
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.
|
@@ -52,10 +52,11 @@ var Histogram = function Histogram(_ref) {
|
|
|
52
52
|
title: emptyTitle,
|
|
53
53
|
message: emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : t("histogram.empty")
|
|
54
54
|
}), sorted === null || sorted === void 0 ? void 0 : sorted.map(function (item) {
|
|
55
|
+
var _item$total;
|
|
55
56
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
56
57
|
role: "none",
|
|
57
58
|
"data-disabled": item.count === 0 || item.disabled,
|
|
58
|
-
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", Histogram_module.histoLabel, (item.count === 0 || item.disabled) && "pointer-events-none"),
|
|
59
|
+
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", Histogram_module.histoLabel, (((_item$total = item.total) !== null && _item$total !== void 0 ? _item$total : item.count) === 0 || item.disabled) && "pointer-events-none"),
|
|
59
60
|
"data-testid": item.id,
|
|
60
61
|
onClick: function onClick(e) {
|
|
61
62
|
return [_onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id), e.stopPropagation()];
|
|
@@ -52,10 +52,11 @@ var Histogram = function Histogram(_ref) {
|
|
|
52
52
|
title: emptyTitle,
|
|
53
53
|
message: emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : t("histogram.empty")
|
|
54
54
|
}), sorted === null || sorted === void 0 ? void 0 : sorted.map(function (item) {
|
|
55
|
+
var _item$total;
|
|
55
56
|
return /*#__PURE__*/jsxs("div", {
|
|
56
57
|
role: "none",
|
|
57
58
|
"data-disabled": item.count === 0 || item.disabled,
|
|
58
|
-
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", classes.histoLabel, (item.count === 0 || item.disabled) && "pointer-events-none"),
|
|
59
|
+
className: classNames("relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px", classes.histoLabel, (((_item$total = item.total) !== null && _item$total !== void 0 ? _item$total : item.count) === 0 || item.disabled) && "pointer-events-none"),
|
|
59
60
|
"data-testid": item.id,
|
|
60
61
|
onClick: function onClick(e) {
|
|
61
62
|
return [_onClick === null || _onClick === void 0 ? void 0 : _onClick(item.id), e.stopPropagation()];
|
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.9",
|
|
4
4
|
"description": "RUF: Data package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"watch": "npm-run-all -p watch:rollup watch:dts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@react-fabric/core": "^1.0.0-beta.
|
|
37
|
-
"@react-fabric/date": "^1.0.0-beta.
|
|
38
|
-
"@react-fabric/form": "^1.0.0-beta.
|
|
39
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
36
|
+
"@react-fabric/core": "^1.0.0-beta.9",
|
|
37
|
+
"@react-fabric/date": "^1.0.0-beta.9",
|
|
38
|
+
"@react-fabric/form": "^1.0.0-beta.9",
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.9",
|
|
40
40
|
"@tanstack/react-virtual": "^3.8.6",
|
|
41
41
|
"classnames": "^2.5.1",
|
|
42
42
|
"color": "^4.2.3",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"node": ">=18.12.0",
|
|
53
53
|
"npm": ">=8.19.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "3dde23444bcebf68c30198af5c2fef55572da38f"
|
|
56
56
|
}
|
|
@@ -128,7 +128,8 @@ export const Histogram = ({
|
|
|
128
128
|
className={classNames(
|
|
129
129
|
"relative cursor-pointer flex flex-nowrap items-center select-none overflow-hidden min-h-6 my-px",
|
|
130
130
|
classes.histoLabel,
|
|
131
|
-
(item.count === 0 || item.disabled) &&
|
|
131
|
+
((item.total ?? item.count) === 0 || item.disabled) &&
|
|
132
|
+
"pointer-events-none",
|
|
132
133
|
)}
|
|
133
134
|
data-testid={item.id}
|
|
134
135
|
onClick={(e) => [onClick?.(item.id), e.stopPropagation()]}
|