@true-engineering/true-react-common-ui-kit 3.33.0 → 3.33.2

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.
@@ -25926,7 +25926,8 @@
25926
25926
  sticky: _object_spread_props$k(_object_spread$l({
25927
25927
  zIndex: 19,
25928
25928
  paddingLeft: 24,
25929
- paddingRight: 12
25929
+ paddingRight: 12,
25930
+ left: 0
25930
25931
  }, trueReactPlatformHelpers.getTransition([
25931
25932
  "box-shadow"
25932
25933
  ])), {
@@ -26027,7 +26028,7 @@
26027
26028
  return target;
26028
26029
  }
26029
26030
  function FlexibleTableCell(_param) {
26030
- var row = _param.row, columnName = _param.columnName, config = _param.config, renderMode = _param.renderMode, isSecond = _param.isSecond, isSticky = _param.isSticky, isLoading = _param.isLoading, tweakStyles = _param.tweakStyles, valueComponentProps = _object_without_properties$7(_param, [
26031
+ var row = _param.row, columnName = _param.columnName, config = _param.config, renderMode = _param.renderMode, isSecond = _param.isSecond, isOldSticky = _param.isSticky, isLoading = _param.isLoading, tweakStyles = _param.tweakStyles, valueComponentProps = _object_without_properties$7(_param, [
26031
26032
  "row",
26032
26033
  "columnName",
26033
26034
  "config",
@@ -26042,7 +26043,8 @@
26042
26043
  });
26043
26044
  var value = row[columnName];
26044
26045
  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, left2 = _ref.left, right2 = _ref.right, position = _ref.position, cellAlign = _ref.cellAlign, cellVerticalAlign = _ref.cellVerticalAlign, shouldRenderDataId = _ref.shouldRenderDataId;
26046
+ 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, 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;
26047
+ var isSticky = isOldSticky || position === "sticky";
26046
26048
  var Table = TableRenders[renderMode];
26047
26049
  var _obj2;
26048
26050
  return /* @__PURE__ */ jsx(Table.Cell, _object_spread_props$j(_object_spread$k({
@@ -26051,7 +26053,7 @@
26051
26053
  textAlign: cellAlign,
26052
26054
  position: isSticky ? "sticky" : position,
26053
26055
  right: right2,
26054
- left: isSticky ? 0 : left2,
26056
+ left: left2,
26055
26057
  verticalAlign: cellVerticalAlign
26056
26058
  }
26057
26059
  }, addDataAttributes({
@@ -26060,7 +26062,7 @@
26060
26062
  children: isLoading ? /* @__PURE__ */ jsx("div", {
26061
26063
  className: classes.skeleton,
26062
26064
  children: /* @__PURE__ */ jsx(Skeleton, {})
26063
- }) : trueReactPlatformHelpers.isNotEmpty(value) && trueReactPlatformHelpers.applyAction(component, _object_spread_props$j(_object_spread$k({}, valueComponentProps), {
26065
+ }) : trueReactPlatformHelpers.applyAction(shouldRenderComponent, value, row, columnName) && trueReactPlatformHelpers.applyAction(component, _object_spread_props$j(_object_spread$k({}, valueComponentProps), {
26064
26066
  value,
26065
26067
  row
26066
26068
  }))
@@ -26535,24 +26537,28 @@
26535
26537
  children: /* @__PURE__ */ jsx(Table.Row, {
26536
26538
  className: classes.headerRow,
26537
26539
  children: columns.map(function(key, i) {
26538
- var itemConfig = config === null || config === void 0 ? void 0 : config[key];
26539
- var _itemConfig_titleAlign, _itemConfig_title;
26540
+ var _config_key;
26541
+ var _ref = (_config_key = config === null || config === void 0 ? void 0 : config[key]) !== null && _config_key !== void 0 ? _config_key : {}, position = _ref.position, minWidth = _ref.minWidth, width = _ref.width, maxWidth = _ref.maxWidth, _ref_titleAlign = _ref.titleAlign, titleAlign = _ref_titleAlign === void 0 ? "left" : _ref_titleAlign, right2 = _ref.right, left2 = _ref.left, _ref_title = _ref.title, title = _ref_title === void 0 ? "" : _ref_title, shouldRenderDataId = _ref.shouldRenderDataId;
26542
+ var isSticky = position === "sticky" || isFirstColumnSticky && i === 0;
26540
26543
  var _obj2;
26541
26544
  return /* @__PURE__ */ jsx(Table.Header, _object_spread_props$h(_object_spread$i({
26542
- className: clsx(classes.header, (_obj2 = {}, _define_property$j(_obj2, classes.headerSticky, isFirstColumnSticky && i === 0), _define_property$j(_obj2, classes.headerSecond, isFirstColumnSticky && i === 1), _obj2)),
26545
+ className: clsx(classes.header, (_obj2 = {}, _define_property$j(_obj2, classes.headerSticky, isSticky), _define_property$j(_obj2, classes.headerSecond, isFirstColumnSticky && i === 1), _obj2)),
26543
26546
  style: {
26544
- minWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.minWidth,
26545
- width: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.width,
26546
- maxWidth: itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.maxWidth,
26547
- textAlign: (_itemConfig_titleAlign = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleAlign) !== null && _itemConfig_titleAlign !== void 0 ? _itemConfig_titleAlign : "left"
26547
+ minWidth,
26548
+ width,
26549
+ maxWidth,
26550
+ textAlign: titleAlign,
26551
+ position: isSticky ? "sticky" : position,
26552
+ right: right2,
26553
+ left: left2
26548
26554
  },
26549
26555
  onClick: trueReactPlatformHelpers.isNotEmpty(onHeadClick) ? function() {
26550
26556
  return onHeadClick(key);
26551
26557
  } : void 0
26552
26558
  }, addDataAttributes({
26553
- id: (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.shouldRenderDataId) ? key : void 0
26559
+ id: shouldRenderDataId ? key : void 0
26554
26560
  })), {
26555
- children: trueReactPlatformHelpers.applyAction((_itemConfig_title = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "", {
26561
+ children: trueReactPlatformHelpers.applyAction(title, {
26556
26562
  value: headerContent === null || headerContent === void 0 ? void 0 : headerContent[key]
26557
26563
  })
26558
26564
  }), key);