@natoora-libs/core 0.1.9-dev-doug-6 → 0.1.9-dev-doug-7
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.
|
@@ -7135,7 +7135,6 @@ var TableDesktop = ({
|
|
|
7135
7135
|
isLoading,
|
|
7136
7136
|
rowsPerPage = 50,
|
|
7137
7137
|
enableCheckboxSelection = false,
|
|
7138
|
-
enableRowActions = false,
|
|
7139
7138
|
disableInternalSort = false,
|
|
7140
7139
|
updateSort,
|
|
7141
7140
|
showClearFilterButton,
|
|
@@ -7198,7 +7197,6 @@ var TableDesktop = ({
|
|
|
7198
7197
|
[]
|
|
7199
7198
|
);
|
|
7200
7199
|
const renderTableRows = (0, import_react33.useMemo)(() => {
|
|
7201
|
-
const sortedData = disableInternalSort ? data : stableSort(data, getComparator(order, orderBy));
|
|
7202
7200
|
if (isLoading) {
|
|
7203
7201
|
return [...Array(Math.min(numRows, rowsPerPage))].map((_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableRow, { children: [...Array(visibleHeadCells.length)].map((_2, cellIndex) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material60.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
7204
7202
|
import_material60.Skeleton,
|
|
@@ -7206,11 +7204,12 @@ var TableDesktop = ({
|
|
|
7206
7204
|
animation: "pulse",
|
|
7207
7205
|
variant: "rounded",
|
|
7208
7206
|
height: ROW_HEIGHT - 33,
|
|
7209
|
-
sx: { bgcolor: colors.
|
|
7207
|
+
sx: { bgcolor: colors.neutral100 },
|
|
7210
7208
|
"data-testid": "loading-skeleton"
|
|
7211
7209
|
}
|
|
7212
7210
|
) }, cellIndex)) }, rowIndex));
|
|
7213
7211
|
}
|
|
7212
|
+
const sortedData = disableInternalSort ? data : stableSort(data, getComparator(order, orderBy));
|
|
7214
7213
|
return sortedData.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((row, index) => {
|
|
7215
7214
|
const isItemSelected = selected.has(row[keyField]);
|
|
7216
7215
|
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
@@ -7238,8 +7237,9 @@ var TableDesktop = ({
|
|
|
7238
7237
|
page,
|
|
7239
7238
|
rowsPerPage,
|
|
7240
7239
|
selected,
|
|
7240
|
+
isLoading,
|
|
7241
|
+
numRows,
|
|
7241
7242
|
enableCheckboxSelection,
|
|
7242
|
-
enableRowActions,
|
|
7243
7243
|
disableInternalSort,
|
|
7244
7244
|
deleteItem,
|
|
7245
7245
|
keyField,
|
|
@@ -7990,7 +7990,6 @@ var TableDesktopRowCell = ({
|
|
|
7990
7990
|
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Tooltip, { title: isOverflowed ? String(readOnlyValue) : "", arrow: true, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
7991
7991
|
import_material65.TableCell,
|
|
7992
7992
|
{
|
|
7993
|
-
ref: cellRef,
|
|
7994
7993
|
align: "left",
|
|
7995
7994
|
onMouseEnter: () => editableCellType && !disabled && setIsCellHovered(true),
|
|
7996
7995
|
onMouseLeave: () => editableCellType && !disabled && setIsCellHovered(false),
|
|
@@ -7998,9 +7997,6 @@ var TableDesktopRowCell = ({
|
|
|
7998
7997
|
sx: {
|
|
7999
7998
|
padding: 1,
|
|
8000
7999
|
width: width ?? "auto",
|
|
8001
|
-
overflow: "hidden",
|
|
8002
|
-
textOverflow: "ellipsis",
|
|
8003
|
-
whiteSpace: "nowrap",
|
|
8004
8000
|
position: "relative",
|
|
8005
8001
|
cursor: disabled ? "default" : "pointer",
|
|
8006
8002
|
opacity: disabled ? 0.2 : 1,
|
|
@@ -8009,23 +8005,33 @@ var TableDesktopRowCell = ({
|
|
|
8009
8005
|
},
|
|
8010
8006
|
background: isEditMode ? colors.lightBlueBackground : (theme) => theme.palette.background.default
|
|
8011
8007
|
},
|
|
8012
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8008
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
8009
|
+
import_material65.Box,
|
|
8010
|
+
{
|
|
8011
|
+
p: 1,
|
|
8012
|
+
ref: cellRef,
|
|
8013
|
+
overflow: "hidden",
|
|
8014
|
+
textOverflow: "ellipsis",
|
|
8015
|
+
whiteSpace: "nowrap",
|
|
8016
|
+
children: [
|
|
8017
|
+
isCellHovered ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_material65.Tooltip, { title: isEditMode ? "" : "Toggle Edit Mode", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
8018
|
+
import_material65.IconButton,
|
|
8019
|
+
{
|
|
8020
|
+
onClick: handleEditClick,
|
|
8021
|
+
sx: {
|
|
8022
|
+
top: 0,
|
|
8023
|
+
right: 0,
|
|
8024
|
+
zIndex: 1,
|
|
8025
|
+
borderRadius: 0,
|
|
8026
|
+
position: "absolute"
|
|
8027
|
+
},
|
|
8028
|
+
children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Close.default, { fontSize: "small", color: "error" }) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_Edit.default, { fontSize: "small" })
|
|
8029
|
+
}
|
|
8030
|
+
) }) : null,
|
|
8031
|
+
isEditMode && editableCellType ? editableComponents[editableCellType] : typeof readOnlyValue === "boolean" ? getReadOnlyBooleanIcon(readOnlyValue) : readOnlyValue
|
|
8032
|
+
]
|
|
8033
|
+
}
|
|
8034
|
+
)
|
|
8029
8035
|
}
|
|
8030
8036
|
) });
|
|
8031
8037
|
};
|