@omniumretail/component-library 1.3.37 → 1.3.39

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,35 @@ 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 hasBackendSD = originalCellContent2?.type === "S" || originalCellContent2?.type === "D";
25058
+ const getTopLayerContent = () => {
25058
25059
  if (isSelected2) {
25059
- return selectedCells[cellIndex2];
25060
+ const selectedCell = selectedCells[cellIndex2];
25061
+ return {
25062
+ type: selectedCell?.value?.type,
25063
+ color: selectedCell?.value?.color,
25064
+ isFromSelection: true
25065
+ };
25060
25066
  }
25061
- return originalCellContent2;
25067
+ if (originalCellContent2?.type && !hasBackendSD) {
25068
+ return {
25069
+ type: originalCellContent2.type,
25070
+ color: originalCellContent2.color,
25071
+ isFromSelection: false
25072
+ };
25073
+ }
25074
+ return null;
25062
25075
  };
25063
- const displayContent = getDisplayContent();
25076
+ const topLayer = getTopLayerContent();
25064
25077
  const getBackgroundColor = () => {
25065
- if (!displayContent?.type) return void 0;
25066
- if (displayContent.type === "F" || displayContent.type === "S" || displayContent.type === "D") {
25067
- return displayContent.color;
25078
+ if (hasBackendSD) {
25079
+ return originalCellContent2.color;
25080
+ }
25081
+ if (topLayer && (topLayer.type === "F" || topLayer.type === "S" || topLayer.type === "D")) {
25082
+ return topLayer.color;
25083
+ }
25084
+ if (originalCellContent2?.type === "F" && !hasBackendSD) {
25085
+ return originalCellContent2.color;
25068
25086
  }
25069
25087
  return void 0;
25070
25088
  };
@@ -25092,8 +25110,11 @@ const ResponsiveTable = (props) => {
25092
25110
  if (isSelectable2) {
25093
25111
  const cellContent = (() => {
25094
25112
  if (templateEditMode) {
25095
- if (displayContent?.type) {
25096
- return /* @__PURE__ */ jsx(Tag, { color: displayContent.color, style: { margin: -4, cursor: "pointer" }, children: displayContent.type });
25113
+ if (topLayer) {
25114
+ return /* @__PURE__ */ jsx(Tag, { color: topLayer.color, style: { margin: -4, cursor: "pointer" }, children: topLayer.type });
25115
+ }
25116
+ if (hasBackendSD) {
25117
+ return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "pointer" }, children: originalCellContent2.type });
25097
25118
  }
25098
25119
  return null;
25099
25120
  }
@@ -25136,7 +25157,6 @@ const ResponsiveTable = (props) => {
25136
25157
  style: {
25137
25158
  cursor: disableCellSelection ? "not-allowed" : void 0,
25138
25159
  backgroundColor: cellBackgroundColor,
25139
- // ⚡ Background do que está visível
25140
25160
  padding: cellBackgroundColor ? "4px" : void 0
25141
25161
  },
25142
25162
  children: cellContent