@omniumretail/component-library 1.3.37 → 1.3.38

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.
@@ -25054,17 +25054,27 @@ const ResponsiveTable = (props) => {
25054
25054
  (cell) => cell.rowKey === record[rowKeyValue] && cell.columnKey === key
25055
25055
  );
25056
25056
  const isSelected2 = cellIndex2 !== -1;
25057
- const getDisplayContent = () => {
25057
+ const getDisplayTypeAndColor = () => {
25058
25058
  if (isSelected2) {
25059
- return selectedCells[cellIndex2];
25059
+ const selectedCell = selectedCells[cellIndex2];
25060
+ return {
25061
+ type: selectedCell?.value?.type,
25062
+ color: selectedCell?.value?.color
25063
+ };
25060
25064
  }
25061
- return originalCellContent2;
25065
+ if (originalCellContent2?.type) {
25066
+ return {
25067
+ type: originalCellContent2.type,
25068
+ color: originalCellContent2.color
25069
+ };
25070
+ }
25071
+ return { type: null, color: null };
25062
25072
  };
25063
- const displayContent = getDisplayContent();
25073
+ const { type: displayType, color: displayColor } = getDisplayTypeAndColor();
25064
25074
  const getBackgroundColor = () => {
25065
- if (!displayContent?.type) return void 0;
25066
- if (displayContent.type === "F" || displayContent.type === "S" || displayContent.type === "D") {
25067
- return displayContent.color;
25075
+ if (!displayType) return void 0;
25076
+ if (displayType === "F" || displayType === "S" || displayType === "D") {
25077
+ return displayColor;
25068
25078
  }
25069
25079
  return void 0;
25070
25080
  };
@@ -25092,8 +25102,8 @@ const ResponsiveTable = (props) => {
25092
25102
  if (isSelectable2) {
25093
25103
  const cellContent = (() => {
25094
25104
  if (templateEditMode) {
25095
- if (displayContent?.type) {
25096
- return /* @__PURE__ */ jsx(Tag, { color: displayContent.color, style: { margin: -4, cursor: "pointer" }, children: displayContent.type });
25105
+ if (displayType) {
25106
+ return /* @__PURE__ */ jsx(Tag, { color: displayColor, style: { margin: -4, cursor: "pointer" }, children: displayType });
25097
25107
  }
25098
25108
  return null;
25099
25109
  }
@@ -25136,7 +25146,6 @@ const ResponsiveTable = (props) => {
25136
25146
  style: {
25137
25147
  cursor: disableCellSelection ? "not-allowed" : void 0,
25138
25148
  backgroundColor: cellBackgroundColor,
25139
- // ⚡ Background do que está visível
25140
25149
  padding: cellBackgroundColor ? "4px" : void 0
25141
25150
  },
25142
25151
  children: cellContent