@omniumretail/component-library 1.3.53 → 1.3.55

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.
@@ -25154,33 +25154,10 @@ const ResponsiveTable = (props) => {
25154
25154
  const isDisabled = originalCellContent?.disabled === true;
25155
25155
  const isReadonly = originalCellContent?.readonly === true;
25156
25156
  const hasBackendSD = originalCellContent?.type === "S" || originalCellContent?.type === "D";
25157
- let hasBackendBackground;
25158
- if (calendarMode) {
25159
- hasBackendBackground = hasBackendSD;
25160
- } else {
25161
- hasBackendBackground = hasBackendSD || originalCellContent?.type === "F";
25157
+ if (calendarMode) ;
25158
+ else {
25159
+ hasBackendSD || originalCellContent?.type === "F";
25162
25160
  }
25163
- !calendarMode && templateEditMode && originalCellContent?.type === "F" || !templateEditMode && !calendarMode && (originalCellContent?.type === "I" || originalCellContent?.type === "L");
25164
- const getTopLayerContent = () => {
25165
- if (isSelected) {
25166
- const selectedCell = selectedCells[cellIndex];
25167
- const cellType = selectedCell?.value?.type;
25168
- return {
25169
- type: cellType,
25170
- color: selectedCell?.value?.color,
25171
- isFromSelection: true
25172
- };
25173
- }
25174
- if (originalCellContent?.type && !hasBackendBackground) {
25175
- return {
25176
- type: originalCellContent.type,
25177
- color: originalCellContent.color,
25178
- isFromSelection: false
25179
- };
25180
- }
25181
- return null;
25182
- };
25183
- getTopLayerContent();
25184
25161
  const getBackgroundColor = () => {
25185
25162
  if (isSelected && selectedCells[cellIndex]?.value?.type === null && originalCellContent?.type === "F") {
25186
25163
  if (originalCellContent?.type === "D") {
@@ -25207,24 +25184,31 @@ const ResponsiveTable = (props) => {
25207
25184
  };
25208
25185
  const cellBackgroundColor = getBackgroundColor();
25209
25186
  if (isDisabled) {
25187
+ let content2 = null;
25210
25188
  if (originalCellContent?.type === "I" || originalCellContent?.type === "L" || isReadonly) {
25211
- return /* @__PURE__ */ jsx(Tag, { color: originalCellContent.color, style: { margin: -4, cursor: "not-allowed" }, children: originalCellContent.type });
25212
- } else {
25213
- return /* @__PURE__ */ jsx(
25214
- "div",
25215
- {
25216
- style: {
25217
- backgroundColor: "#e8e8e8",
25218
- cursor: "not-allowed",
25219
- textAlign: "center",
25220
- color: "#999",
25221
- padding: "8px",
25222
- border: "1px solid #d9d9d9"
25223
- },
25224
- children: "-"
25225
- }
25226
- );
25189
+ if (originalCellContent?.secondaryType) {
25190
+ content2 = /* @__PURE__ */ jsx(Tag, { color: originalCellContent.secondaryColor, style: { margin: 0 }, children: originalCellContent.secondaryType });
25191
+ } else if (originalCellContent?.type) {
25192
+ content2 = /* @__PURE__ */ jsx(Tag, { color: originalCellContent.color, style: { margin: 0 }, children: originalCellContent.type });
25193
+ }
25227
25194
  }
25195
+ return /* @__PURE__ */ jsx(
25196
+ "div",
25197
+ {
25198
+ style: {
25199
+ cursor: "not-allowed",
25200
+ backgroundColor: content2 ? cellBackgroundColor : "#e8e8e8",
25201
+ display: "flex",
25202
+ alignItems: "center",
25203
+ justifyContent: "center",
25204
+ padding: "4px",
25205
+ minHeight: "32px",
25206
+ color: "#999"
25207
+ },
25208
+ onClick: (e) => e.stopPropagation(),
25209
+ children: content2 || "-"
25210
+ }
25211
+ );
25228
25212
  }
25229
25213
  if (isSelectable) {
25230
25214
  const cellContent = (() => {
@@ -25301,14 +25285,22 @@ const ResponsiveTable = (props) => {
25301
25285
  const selectedCell = selectedCells[cellIndex];
25302
25286
  const cellColor = selectedCell?.value?.color || selectedCellColor;
25303
25287
  const cellType = selectedCell?.value?.type || "X";
25304
- return /* @__PURE__ */ jsx(
25305
- Tag,
25306
- {
25307
- color: cellColor,
25308
- style: { margin: -4, cursor: "pointer" },
25309
- children: cellType
25310
- }
25311
- );
25288
+ if (cellType === "X") {
25289
+ return /* @__PURE__ */ jsx(
25290
+ Tag,
25291
+ {
25292
+ color: cellColor,
25293
+ style: { margin: -4, cursor: "pointer" },
25294
+ children: cellType
25295
+ }
25296
+ );
25297
+ }
25298
+ if (originalCellContent?.secondaryType) {
25299
+ return /* @__PURE__ */ jsx(Tag, { color: originalCellContent.secondaryColor, style: { margin: -4, cursor: "pointer" }, children: originalCellContent.secondaryType });
25300
+ }
25301
+ }
25302
+ if (originalCellContent?.secondaryType) {
25303
+ return /* @__PURE__ */ jsx(Tag, { color: originalCellContent.secondaryColor, style: { margin: -4, cursor: "pointer" }, children: originalCellContent.secondaryType });
25312
25304
  }
25313
25305
  if (originalCellContent?.type) {
25314
25306
  return /* @__PURE__ */ jsx(Tag, { color: originalCellContent.color, style: { margin: -4, cursor: "pointer" }, children: originalCellContent.type });
@@ -25321,7 +25313,7 @@ const ResponsiveTable = (props) => {
25321
25313
  onClick: (e) => {
25322
25314
  e.stopPropagation();
25323
25315
  if (disableCellSelection) return;
25324
- if (!templateEditMode && !calendarMode && isSelected && selectedCells[cellIndex]?.value?.type === "L") {
25316
+ if (!templateEditMode && !calendarMode && isSelected && selectedCells[cellIndex]?.value?.type === "L" && selectedCells[cellIndex]?.value?.type === "I") {
25325
25317
  return;
25326
25318
  }
25327
25319
  handleCellClick(record, key);