@true-engineering/true-react-common-ui-kit 3.38.0 → 3.39.0
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.
- package/README.md +6 -0
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts +1 -1
- package/dist/components/FlexibleTable/types.d.ts +3 -1
- package/dist/true-react-common-ui-kit.js +15 -7
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +15 -7
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +4 -0
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +11 -1
- package/src/components/FlexibleTable/types.ts +7 -1
|
@@ -25943,6 +25943,9 @@
|
|
|
25943
25943
|
loading: {},
|
|
25944
25944
|
skeleton: {
|
|
25945
25945
|
height: 21
|
|
25946
|
+
},
|
|
25947
|
+
clickable: {
|
|
25948
|
+
cursor: "pointer"
|
|
25946
25949
|
}
|
|
25947
25950
|
});
|
|
25948
25951
|
function _define_property$l(obj, key, value) {
|
|
@@ -26045,12 +26048,17 @@
|
|
|
26045
26048
|
});
|
|
26046
26049
|
var value = row[columnName];
|
|
26047
26050
|
var _config_columnName;
|
|
26048
|
-
var _ref = (_config_columnName = config[columnName]) !== null && _config_columnName !== void 0 ? _config_columnName : {}, _ref_component = _ref.component, component = _ref_component === void 0 ? formatCellContent(value, config[columnName]) : _ref_component, width = _ref.width, maxWidth = _ref.maxWidth, minWidth = _ref.minWidth, left2 = _ref.left, right2 = _ref.right, position = _ref.position, cellAlign = _ref.cellAlign, cellVerticalAlign = _ref.cellVerticalAlign, shouldRenderDataId = _ref.shouldRenderDataId, _ref_shouldRenderComponent = _ref.shouldRenderComponent, shouldRenderComponent = _ref_shouldRenderComponent === void 0 ? trueReactPlatformHelpers.isNotEmpty : _ref_shouldRenderComponent;
|
|
26051
|
+
var _ref = (_config_columnName = config[columnName]) !== null && _config_columnName !== void 0 ? _config_columnName : {}, _ref_component = _ref.component, component = _ref_component === void 0 ? formatCellContent(value, config[columnName]) : _ref_component, width = _ref.width, maxWidth = _ref.maxWidth, minWidth = _ref.minWidth, left2 = _ref.left, right2 = _ref.right, position = _ref.position, cellAlign = _ref.cellAlign, cellVerticalAlign = _ref.cellVerticalAlign, shouldRenderDataId = _ref.shouldRenderDataId, _ref_shouldRenderComponent = _ref.shouldRenderComponent, shouldRenderComponent = _ref_shouldRenderComponent === void 0 ? trueReactPlatformHelpers.isNotEmpty : _ref_shouldRenderComponent, onCellClick = _ref.onCellClick;
|
|
26049
26052
|
var isSticky = isOldSticky || position === "sticky";
|
|
26053
|
+
var isClickable = !isLoading && trueReactPlatformHelpers.isNotEmpty(onCellClick);
|
|
26054
|
+
var cellComponentProps = _object_spread_props$j(_object_spread$k({}, valueComponentProps), {
|
|
26055
|
+
value,
|
|
26056
|
+
row
|
|
26057
|
+
});
|
|
26050
26058
|
var Table = TableRenders[renderMode];
|
|
26051
26059
|
var _obj2;
|
|
26052
26060
|
return /* @__PURE__ */ jsx(Table.Cell, _object_spread_props$j(_object_spread$k({
|
|
26053
|
-
className: clsx(classes.root, (_obj2 = {}, _define_property$l(_obj2, classes.sticky, isSticky), _define_property$l(_obj2, classes.second, isSecond), _define_property$l(_obj2, classes.loading, isLoading), _obj2)),
|
|
26061
|
+
className: clsx(classes.root, (_obj2 = {}, _define_property$l(_obj2, classes.sticky, isSticky), _define_property$l(_obj2, classes.second, isSecond), _define_property$l(_obj2, classes.loading, isLoading), _define_property$l(_obj2, classes.clickable, isClickable), _obj2)),
|
|
26054
26062
|
style: {
|
|
26055
26063
|
textAlign: cellAlign,
|
|
26056
26064
|
position: isSticky ? "sticky" : position,
|
|
@@ -26060,17 +26068,17 @@
|
|
|
26060
26068
|
right: right2,
|
|
26061
26069
|
left: left2,
|
|
26062
26070
|
verticalAlign: cellVerticalAlign
|
|
26063
|
-
}
|
|
26071
|
+
},
|
|
26072
|
+
onClick: isClickable ? function(event) {
|
|
26073
|
+
return onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(event, cellComponentProps);
|
|
26074
|
+
} : void 0
|
|
26064
26075
|
}, addDataAttributes({
|
|
26065
26076
|
id: shouldRenderDataId ? columnName : void 0
|
|
26066
26077
|
})), {
|
|
26067
26078
|
children: isLoading ? /* @__PURE__ */ jsx("div", {
|
|
26068
26079
|
className: classes.skeleton,
|
|
26069
26080
|
children: /* @__PURE__ */ jsx(Skeleton, {})
|
|
26070
|
-
}) : trueReactPlatformHelpers.applyAction(shouldRenderComponent, value, row, columnName) && trueReactPlatformHelpers.applyAction(component,
|
|
26071
|
-
value,
|
|
26072
|
-
row
|
|
26073
|
-
}))
|
|
26081
|
+
}) : trueReactPlatformHelpers.applyAction(shouldRenderComponent, value, row, columnName) && trueReactPlatformHelpers.applyAction(component, cellComponentProps)
|
|
26074
26082
|
}));
|
|
26075
26083
|
}
|
|
26076
26084
|
var useStyles$h = createThemedStyles("FlexibleTableRow", {
|