@omniumretail/component-library 1.3.30 → 1.3.32

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.
@@ -24895,6 +24895,10 @@ const ResponsiveTable = (props) => {
24895
24895
  if (!enableCellSelection || !selectableColumns?.includes(columnKey)) return;
24896
24896
  if (disableCellSelection) return;
24897
24897
  const rowKey = record[rowKeyValue];
24898
+ const originalCellContent = record[columnKey];
24899
+ if (templateEditMode && originalCellContent?.type && (originalCellContent.type === "S" || originalCellContent.type === "D")) {
24900
+ return;
24901
+ }
24898
24902
  if (useOrderedCellSelection) {
24899
24903
  const isAlreadySelected = selectedCells.some(
24900
24904
  (cell) => cell.rowKey === rowKey && cell.columnKey === columnKey
@@ -25080,12 +25084,13 @@ const ResponsiveTable = (props) => {
25080
25084
  const originalCellContent2 = record[key];
25081
25085
  const isDisabled = originalCellContent2?.disabled === true;
25082
25086
  const isReadonly = originalCellContent2?.readonly === true;
25087
+ const isFixedTemplate = templateEditMode && originalCellContent2?.type && (originalCellContent2.type === "S" || originalCellContent2.type === "D");
25083
25088
  const cellIndex2 = selectedCells.findIndex(
25084
25089
  (cell) => cell.rowKey === record[rowKeyValue] && cell.columnKey === key
25085
25090
  );
25086
25091
  const isSelected2 = cellIndex2 !== -1;
25087
- if (isDisabled && !templateEditMode) {
25088
- if (originalCellContent2?.type === "I" || isReadonly || originalCellContent2?.type === "L" || disableCellSelection) {
25092
+ if (isDisabled) {
25093
+ if (originalCellContent2?.type === "I" || originalCellContent2?.type === "L" || isReadonly) {
25089
25094
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent2.type });
25090
25095
  } else {
25091
25096
  return /* @__PURE__ */ jsx(
@@ -25104,30 +25109,8 @@ const ResponsiveTable = (props) => {
25104
25109
  );
25105
25110
  }
25106
25111
  }
25107
- if (isDisabled && templateEditMode) {
25108
- const cellContent = isSelected2 ? /* @__PURE__ */ jsx(
25109
- Tag,
25110
- {
25111
- color: selectedCells[cellIndex2]?.value?.color || selectedCellColor,
25112
- style: { margin: -4, cursor: "pointer" },
25113
- children: selectedCells[cellIndex2]?.value?.type || "X"
25114
- }
25115
- ) : originalCellContent2?.type ? /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4 }, children: originalCellContent2.type }) : null;
25116
- return /* @__PURE__ */ jsx(
25117
- "div",
25118
- {
25119
- onClick: (e) => {
25120
- e.stopPropagation();
25121
- handleCellClick(record, key);
25122
- },
25123
- className: classNames(
25124
- styles$7.selectableCell,
25125
- isSelected2 && styles$7.selected,
25126
- isSelected2 && styles$7.uniformSelection
25127
- ),
25128
- children: cellContent
25129
- }
25130
- );
25112
+ if (isFixedTemplate) {
25113
+ return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent2.type });
25131
25114
  }
25132
25115
  if (isSelectable2) {
25133
25116
  const cellContent = (() => {
@@ -25146,6 +25129,9 @@ const ResponsiveTable = (props) => {
25146
25129
  }
25147
25130
  );
25148
25131
  }
25132
+ if (templateEditMode) {
25133
+ return null;
25134
+ }
25149
25135
  if (originalCellContent2) {
25150
25136
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4 }, children: originalCellContent2.type });
25151
25137
  }