@omniumretail/component-library 1.3.27 → 1.3.29

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.
@@ -24860,7 +24860,8 @@ const ResponsiveTable = (props) => {
24860
24860
  renderSelectedCell,
24861
24861
  useOrderedCellSelection = true,
24862
24862
  initialSelectedCells,
24863
- selectedCellColor
24863
+ selectedCellColor,
24864
+ disableCellSelection
24864
24865
  } = props;
24865
24866
  const [customFilters, setCustomFilters] = useState([]);
24866
24867
  const [customColumns, setCustomColumns] = useState([]);
@@ -24888,7 +24889,7 @@ const ResponsiveTable = (props) => {
24888
24889
  secondCell: { ...defaultCellStyle.secondCell, ...cellSelectionStyle?.secondCell }
24889
24890
  };
24890
24891
  const handleCellClick = (record, columnKey, value) => {
24891
- if (!enableCellSelection || !selectableColumns?.includes(columnKey)) return;
24892
+ if (!enableCellSelection || !selectableColumns?.includes(columnKey) || disableCellSelection) return;
24892
24893
  const isAlreadySelected = selectedCells.some(
24893
24894
  (cell) => cell.rowKey === record[rowKeyValue] && cell.columnKey === columnKey
24894
24895
  );
@@ -25055,7 +25056,7 @@ const ResponsiveTable = (props) => {
25055
25056
  );
25056
25057
  const isSelected2 = cellIndex2 !== -1;
25057
25058
  if (isDisabled) {
25058
- if (originalCellContent2?.type === "I" || isReadonly || originalCellContent2?.type === "L") {
25059
+ if (originalCellContent2?.type === "I" || isReadonly || originalCellContent2?.type === "L" || disableCellSelection) {
25059
25060
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent2.type });
25060
25061
  } else {
25061
25062
  return /* @__PURE__ */ jsx(
@@ -25081,7 +25082,8 @@ const ResponsiveTable = (props) => {
25081
25082
  const cellColor = selectedCell?.value?.color || selectedCellColor;
25082
25083
  const cellType = selectedCell?.value?.type || "X";
25083
25084
  const isLicenseType = cellType === "L";
25084
- return /* @__PURE__ */ jsx(Tag, { color: cellColor, style: { margin: -4, cursor: isLicenseType ? "not-allowed" : "pointer" }, children: cellType });
25085
+ const isReadonlyCell = selectedCell?.value?.readonly || disableCellSelection;
25086
+ return /* @__PURE__ */ jsx(Tag, { color: cellColor, style: { margin: -4, cursor: isLicenseType || isReadonlyCell ? "not-allowed" : "pointer" }, children: cellType });
25085
25087
  }
25086
25088
  if (originalCellContent2) {
25087
25089
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4 }, children: originalCellContent2.type });
@@ -25093,6 +25095,7 @@ const ResponsiveTable = (props) => {
25093
25095
  {
25094
25096
  onClick: (e) => {
25095
25097
  e.stopPropagation();
25098
+ if (disableCellSelection) return;
25096
25099
  if (isSelected2 && selectedCells[cellIndex2]?.value?.type === "L") {
25097
25100
  return;
25098
25101
  }
@@ -25103,6 +25106,9 @@ const ResponsiveTable = (props) => {
25103
25106
  isSelected2 && styles$7.selected,
25104
25107
  isSelected2 && styles$7.uniformSelection
25105
25108
  ),
25109
+ style: {
25110
+ cursor: disableCellSelection ? "not-allowed" : void 0
25111
+ },
25106
25112
  children: cellContent
25107
25113
  }
25108
25114
  );