@omniumretail/component-library 1.3.38 → 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,27 +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 getDisplayTypeAndColor = () => {
25057
+ const hasBackendSD = originalCellContent2?.type === "S" || originalCellContent2?.type === "D";
25058
+ const getTopLayerContent = () => {
25058
25059
  if (isSelected2) {
25059
25060
  const selectedCell = selectedCells[cellIndex2];
25060
25061
  return {
25061
25062
  type: selectedCell?.value?.type,
25062
- color: selectedCell?.value?.color
25063
+ color: selectedCell?.value?.color,
25064
+ isFromSelection: true
25063
25065
  };
25064
25066
  }
25065
- if (originalCellContent2?.type) {
25067
+ if (originalCellContent2?.type && !hasBackendSD) {
25066
25068
  return {
25067
25069
  type: originalCellContent2.type,
25068
- color: originalCellContent2.color
25070
+ color: originalCellContent2.color,
25071
+ isFromSelection: false
25069
25072
  };
25070
25073
  }
25071
- return { type: null, color: null };
25074
+ return null;
25072
25075
  };
25073
- const { type: displayType, color: displayColor } = getDisplayTypeAndColor();
25076
+ const topLayer = getTopLayerContent();
25074
25077
  const getBackgroundColor = () => {
25075
- if (!displayType) return void 0;
25076
- if (displayType === "F" || displayType === "S" || displayType === "D") {
25077
- return displayColor;
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;
25078
25086
  }
25079
25087
  return void 0;
25080
25088
  };
@@ -25102,8 +25110,11 @@ const ResponsiveTable = (props) => {
25102
25110
  if (isSelectable2) {
25103
25111
  const cellContent = (() => {
25104
25112
  if (templateEditMode) {
25105
- if (displayType) {
25106
- return /* @__PURE__ */ jsx(Tag, { color: displayColor, style: { margin: -4, cursor: "pointer" }, children: displayType });
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 });
25107
25118
  }
25108
25119
  return null;
25109
25120
  }