@omniumretail/component-library 1.3.36 → 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.
|
@@ -24893,16 +24893,12 @@ const ResponsiveTable = (props) => {
|
|
|
24893
24893
|
if (!enableCellSelection || !selectableColumns?.includes(columnKey)) return;
|
|
24894
24894
|
if (disableCellSelection) return;
|
|
24895
24895
|
const rowKey = record[rowKeyValue];
|
|
24896
|
-
|
|
24897
|
-
const cellIndex = selectedCells.findIndex(
|
|
24898
|
-
(cell) => cell.rowKey === rowKey && cell.columnKey === columnKey
|
|
24899
|
-
);
|
|
24900
|
-
const hasSelectionOnTop = cellIndex >= 0;
|
|
24901
|
-
if (templateEditMode && !hasSelectionOnTop && originalCellContent?.type && (originalCellContent.type === "S" || originalCellContent.type === "D")) {
|
|
24902
|
-
return;
|
|
24903
|
-
}
|
|
24896
|
+
record[columnKey];
|
|
24904
24897
|
if (useOrderedCellSelection) ;
|
|
24905
24898
|
else {
|
|
24899
|
+
const cellIndex = selectedCells.findIndex(
|
|
24900
|
+
(cell) => cell.rowKey === rowKey && cell.columnKey === columnKey
|
|
24901
|
+
);
|
|
24906
24902
|
let newSelectedCells;
|
|
24907
24903
|
if (cellIndex >= 0) {
|
|
24908
24904
|
newSelectedCells = selectedCells.filter((_, index) => index !== cellIndex);
|
|
@@ -25058,25 +25054,27 @@ const ResponsiveTable = (props) => {
|
|
|
25058
25054
|
(cell) => cell.rowKey === record[rowKeyValue] && cell.columnKey === key
|
|
25059
25055
|
);
|
|
25060
25056
|
const isSelected2 = cellIndex2 !== -1;
|
|
25061
|
-
const
|
|
25062
|
-
|
|
25063
|
-
if (templateEditMode && isSelected2) {
|
|
25057
|
+
const getDisplayTypeAndColor = () => {
|
|
25058
|
+
if (isSelected2) {
|
|
25064
25059
|
const selectedCell = selectedCells[cellIndex2];
|
|
25065
|
-
|
|
25066
|
-
|
|
25067
|
-
|
|
25068
|
-
}
|
|
25069
|
-
return void 0;
|
|
25060
|
+
return {
|
|
25061
|
+
type: selectedCell?.value?.type,
|
|
25062
|
+
color: selectedCell?.value?.color
|
|
25063
|
+
};
|
|
25070
25064
|
}
|
|
25071
|
-
if (
|
|
25072
|
-
|
|
25073
|
-
|
|
25074
|
-
|
|
25065
|
+
if (originalCellContent2?.type) {
|
|
25066
|
+
return {
|
|
25067
|
+
type: originalCellContent2.type,
|
|
25068
|
+
color: originalCellContent2.color
|
|
25069
|
+
};
|
|
25075
25070
|
}
|
|
25076
|
-
|
|
25077
|
-
|
|
25078
|
-
|
|
25079
|
-
|
|
25071
|
+
return { type: null, color: null };
|
|
25072
|
+
};
|
|
25073
|
+
const { type: displayType, color: displayColor } = getDisplayTypeAndColor();
|
|
25074
|
+
const getBackgroundColor = () => {
|
|
25075
|
+
if (!displayType) return void 0;
|
|
25076
|
+
if (displayType === "F" || displayType === "S" || displayType === "D") {
|
|
25077
|
+
return displayColor;
|
|
25080
25078
|
}
|
|
25081
25079
|
return void 0;
|
|
25082
25080
|
};
|
|
@@ -25101,21 +25099,14 @@ const ResponsiveTable = (props) => {
|
|
|
25101
25099
|
);
|
|
25102
25100
|
}
|
|
25103
25101
|
}
|
|
25104
|
-
if (isFixedTemplate) {
|
|
25105
|
-
return /* @__PURE__ */ jsx(
|
|
25106
|
-
"div",
|
|
25107
|
-
{
|
|
25108
|
-
style: {
|
|
25109
|
-
backgroundColor: cellBackgroundColor,
|
|
25110
|
-
padding: "4px",
|
|
25111
|
-
textAlign: "center"
|
|
25112
|
-
},
|
|
25113
|
-
children: /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent2.type })
|
|
25114
|
-
}
|
|
25115
|
-
);
|
|
25116
|
-
}
|
|
25117
25102
|
if (isSelectable2) {
|
|
25118
25103
|
const cellContent = (() => {
|
|
25104
|
+
if (templateEditMode) {
|
|
25105
|
+
if (displayType) {
|
|
25106
|
+
return /* @__PURE__ */ jsx(Tag, { color: displayColor, style: { margin: -4, cursor: "pointer" }, children: displayType });
|
|
25107
|
+
}
|
|
25108
|
+
return null;
|
|
25109
|
+
}
|
|
25119
25110
|
if (isSelected2) {
|
|
25120
25111
|
const selectedCell = selectedCells[cellIndex2];
|
|
25121
25112
|
const cellColor = selectedCell?.value?.color || selectedCellColor;
|
|
@@ -25126,14 +25117,11 @@ const ResponsiveTable = (props) => {
|
|
|
25126
25117
|
Tag,
|
|
25127
25118
|
{
|
|
25128
25119
|
color: cellColor,
|
|
25129
|
-
style: { margin: -4, cursor:
|
|
25120
|
+
style: { margin: -4, cursor: isLicenseType || isReadonlyCell ? "not-allowed" : "pointer" },
|
|
25130
25121
|
children: cellType
|
|
25131
25122
|
}
|
|
25132
25123
|
);
|
|
25133
25124
|
}
|
|
25134
|
-
if (templateEditMode) {
|
|
25135
|
-
return null;
|
|
25136
|
-
}
|
|
25137
25125
|
if (originalCellContent2) {
|
|
25138
25126
|
return /* @__PURE__ */ jsx(Tag, { color: originalCellContent2.color, style: { margin: -4 }, children: originalCellContent2.type });
|
|
25139
25127
|
}
|