@true-engineering/true-react-common-ui-kit 3.37.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 +12 -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 +19 -8
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +19 -8
- 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
- package/src/components/Select/Select.stories.tsx +1 -0
- package/src/components/Select/Select.tsx +5 -1
|
@@ -11766,6 +11766,9 @@
|
|
|
11766
11766
|
onBlur
|
|
11767
11767
|
]);
|
|
11768
11768
|
var handleListOpen = function() {
|
|
11769
|
+
if (isReadonly) {
|
|
11770
|
+
return;
|
|
11771
|
+
}
|
|
11769
11772
|
if (!isListOpen) {
|
|
11770
11773
|
setIsListOpen(true);
|
|
11771
11774
|
if (!(dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.shouldUsePopper)) {
|
|
@@ -12073,7 +12076,7 @@
|
|
|
12073
12076
|
children: [
|
|
12074
12077
|
/* @__PURE__ */ jsxs("div", {
|
|
12075
12078
|
className: clsx(classes.inputWrapper, isDisabled && classes.disabled),
|
|
12076
|
-
onClick: isDisabled ? void 0 : handleOnClick,
|
|
12079
|
+
onClick: isDisabled || isReadonly ? void 0 : handleOnClick,
|
|
12077
12080
|
ref: inputWrapper,
|
|
12078
12081
|
children: [
|
|
12079
12082
|
/* @__PURE__ */ jsx(Input, _object_spread$G({
|
|
@@ -25940,6 +25943,9 @@
|
|
|
25940
25943
|
loading: {},
|
|
25941
25944
|
skeleton: {
|
|
25942
25945
|
height: 21
|
|
25946
|
+
},
|
|
25947
|
+
clickable: {
|
|
25948
|
+
cursor: "pointer"
|
|
25943
25949
|
}
|
|
25944
25950
|
});
|
|
25945
25951
|
function _define_property$l(obj, key, value) {
|
|
@@ -26042,12 +26048,17 @@
|
|
|
26042
26048
|
});
|
|
26043
26049
|
var value = row[columnName];
|
|
26044
26050
|
var _config_columnName;
|
|
26045
|
-
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;
|
|
26046
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
|
+
});
|
|
26047
26058
|
var Table = TableRenders[renderMode];
|
|
26048
26059
|
var _obj2;
|
|
26049
26060
|
return /* @__PURE__ */ jsx(Table.Cell, _object_spread_props$j(_object_spread$k({
|
|
26050
|
-
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)),
|
|
26051
26062
|
style: {
|
|
26052
26063
|
textAlign: cellAlign,
|
|
26053
26064
|
position: isSticky ? "sticky" : position,
|
|
@@ -26057,17 +26068,17 @@
|
|
|
26057
26068
|
right: right2,
|
|
26058
26069
|
left: left2,
|
|
26059
26070
|
verticalAlign: cellVerticalAlign
|
|
26060
|
-
}
|
|
26071
|
+
},
|
|
26072
|
+
onClick: isClickable ? function(event) {
|
|
26073
|
+
return onCellClick === null || onCellClick === void 0 ? void 0 : onCellClick(event, cellComponentProps);
|
|
26074
|
+
} : void 0
|
|
26061
26075
|
}, addDataAttributes({
|
|
26062
26076
|
id: shouldRenderDataId ? columnName : void 0
|
|
26063
26077
|
})), {
|
|
26064
26078
|
children: isLoading ? /* @__PURE__ */ jsx("div", {
|
|
26065
26079
|
className: classes.skeleton,
|
|
26066
26080
|
children: /* @__PURE__ */ jsx(Skeleton, {})
|
|
26067
|
-
}) : trueReactPlatformHelpers.applyAction(shouldRenderComponent, value, row, columnName) && trueReactPlatformHelpers.applyAction(component,
|
|
26068
|
-
value,
|
|
26069
|
-
row
|
|
26070
|
-
}))
|
|
26081
|
+
}) : trueReactPlatformHelpers.applyAction(shouldRenderComponent, value, row, columnName) && trueReactPlatformHelpers.applyAction(component, cellComponentProps)
|
|
26071
26082
|
}));
|
|
26072
26083
|
}
|
|
26073
26084
|
var useStyles$h = createThemedStyles("FlexibleTableRow", {
|