@erpsquad/common 1.9.3 → 1.9.5
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.
- package/dist/{article-cell-editor-JDI676YI-Cj0FH4QZ.js → article-cell-editor-JDI676YI-CCRqt_2A.js} +2 -2
- package/dist/{article-cell-editor-JDI676YI-Cj0FH4QZ.js.map → article-cell-editor-JDI676YI-CCRqt_2A.js.map} +1 -1
- package/dist/{article-cell-editor-JDI676YI-Datekod9.esm.js → article-cell-editor-JDI676YI-D1C2oF1f.esm.js} +2 -2
- package/dist/{article-cell-editor-JDI676YI-Datekod9.esm.js.map → article-cell-editor-JDI676YI-D1C2oF1f.esm.js.map} +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{uom-field-wrapper-FGtdmzIf.js → uom-field-wrapper-CFgiU89g.js} +4 -4
- package/dist/{uom-field-wrapper-FGtdmzIf.js.map → uom-field-wrapper-CFgiU89g.js.map} +1 -1
- package/dist/{uom-field-wrapper-u_5j6Mqe.esm.js → uom-field-wrapper-RQOElitw.esm.js} +35 -26
- package/dist/{uom-field-wrapper-u_5j6Mqe.esm.js.map → uom-field-wrapper-RQOElitw.esm.js.map} +1 -1
- package/package.json +1 -1
|
@@ -34794,7 +34794,7 @@ var renderer5 = {
|
|
|
34794
34794
|
})
|
|
34795
34795
|
};
|
|
34796
34796
|
var dropdown_cell_default = renderer5;
|
|
34797
|
-
var ArticleCellEditor = React.lazy(async () => await import("./article-cell-editor-JDI676YI-
|
|
34797
|
+
var ArticleCellEditor = React.lazy(async () => await import("./article-cell-editor-JDI676YI-D1C2oF1f.esm.js"));
|
|
34798
34798
|
var renderer6 = {
|
|
34799
34799
|
kind: GridCellKind.Custom,
|
|
34800
34800
|
isMatch: (c2) => c2.data.kind === "article-cell",
|
|
@@ -36714,6 +36714,7 @@ const MaterialEditableTable = React__default.memo(({
|
|
|
36714
36714
|
handleSaveRow(editingRow, values, table2);
|
|
36715
36715
|
if (!isValid) return;
|
|
36716
36716
|
if (isValid) {
|
|
36717
|
+
setDisableNextEdit(false);
|
|
36717
36718
|
clearRow(editingRow.id);
|
|
36718
36719
|
setTimeout(() => table2.setCreatingRow(true), 200);
|
|
36719
36720
|
}
|
|
@@ -36731,7 +36732,8 @@ const MaterialEditableTable = React__default.memo(({
|
|
|
36731
36732
|
(_b = (_a = table2.options).onCreatingRowSave) == null ? void 0 : _b.call(_a, { row: creatingRow, values, table: table2 });
|
|
36732
36733
|
if (!isValid) return;
|
|
36733
36734
|
if (isValid) {
|
|
36734
|
-
|
|
36735
|
+
setDisableNextEdit(false);
|
|
36736
|
+
clearRow("mrt-row-create");
|
|
36735
36737
|
setTimeout(() => table2.setCreatingRow(true), 200);
|
|
36736
36738
|
}
|
|
36737
36739
|
},
|
|
@@ -36974,33 +36976,36 @@ const MaterialEditableTable = React__default.memo(({
|
|
|
36974
36976
|
muiTableBodyRowProps: ({ row: row2, table: table2 }) => {
|
|
36975
36977
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
36976
36978
|
const editingRowId = ((_b = (_a = table2.getState()) == null ? void 0 : _a.editingRow) == null ? void 0 : _b.id) || ((_d = (_c = table2.getState()) == null ? void 0 : _c.creatingRow) == null ? void 0 : _d.id) || null;
|
|
36977
|
-
|
|
36979
|
+
((_f = (_e = table2.getState()) == null ? void 0 : _e.creatingRow) == null ? void 0 : _f.id) || null;
|
|
36978
36980
|
const isErrorRow = Boolean((_g = row2 == null ? void 0 : row2.original) == null ? void 0 : _g.has_error);
|
|
36979
|
-
const isCurrentlyEditing = editingRowId === row2.id;
|
|
36980
36981
|
return {
|
|
36981
36982
|
onClick: () => {
|
|
36982
36983
|
setSelectedRow(row2.id);
|
|
36983
36984
|
},
|
|
36984
|
-
onKeyDown: (
|
|
36985
|
-
|
|
36986
|
-
|
|
36987
|
-
|
|
36988
|
-
|
|
36989
|
-
|
|
36990
|
-
|
|
36991
|
-
|
|
36992
|
-
|
|
36993
|
-
|
|
36994
|
-
|
|
36995
|
-
|
|
36996
|
-
|
|
36997
|
-
|
|
36998
|
-
|
|
36999
|
-
|
|
37000
|
-
|
|
37001
|
-
|
|
37002
|
-
|
|
37003
|
-
|
|
36985
|
+
// onKeyDown: (e) => {
|
|
36986
|
+
// // Handle keyboard events for editing
|
|
36987
|
+
// if (isCurrentlyEditing) {
|
|
36988
|
+
// if (e.key === 'Enter') {
|
|
36989
|
+
// // Save on Enter
|
|
36990
|
+
// e.preventDefault();
|
|
36991
|
+
// table.setEditingRow(null);
|
|
36992
|
+
// } else if (e.key === 'Escape') {
|
|
36993
|
+
// // Cancel on Escape
|
|
36994
|
+
// e.preventDefault();
|
|
36995
|
+
// console.log('Escape pressed, canceling edit for row:', row.id);
|
|
36996
|
+
// if (creatingRowId === row.id) {
|
|
36997
|
+
// table.setCreatingRow(null);
|
|
36998
|
+
// } else {
|
|
36999
|
+
// table.setEditingRow(null);
|
|
37000
|
+
// }
|
|
37001
|
+
// // Immediately reset disableNextEdit to allow re-editing
|
|
37002
|
+
// setDisableNextEdit(false);
|
|
37003
|
+
// if (creatingRowId !== row.id) {
|
|
37004
|
+
// handleSaveRow(row, row._valuesCache || row.original, table);
|
|
37005
|
+
// }
|
|
37006
|
+
// }
|
|
37007
|
+
// }
|
|
37008
|
+
// },
|
|
37004
37009
|
sx: {
|
|
37005
37010
|
cursor: "pointer",
|
|
37006
37011
|
// backgroundColor: !editingRowId
|
|
@@ -37124,6 +37129,10 @@ const MaterialEditableTable = React__default.memo(({
|
|
|
37124
37129
|
},
|
|
37125
37130
|
onClick: (e3) => {
|
|
37126
37131
|
var _a, _b, _c, _d;
|
|
37132
|
+
const target = e3.target;
|
|
37133
|
+
const tableCell = target.closest(".MuiTableCell-body");
|
|
37134
|
+
const isInsideTable = tableCell && !tableCell.querySelector(".delete-row");
|
|
37135
|
+
if (!isInsideTable) return;
|
|
37127
37136
|
const columnDef = column.columnDef;
|
|
37128
37137
|
const isOnClickEditable = columnDef.isOnClickEditable !== false;
|
|
37129
37138
|
if (!isOnClickEditable) {
|
|
@@ -37149,7 +37158,7 @@ const MaterialEditableTable = React__default.memo(({
|
|
|
37149
37158
|
const creatingRowId = ((_a = table2.getState().creatingRow) == null ? void 0 : _a.id) ?? null;
|
|
37150
37159
|
if (e3.key === "Escape") {
|
|
37151
37160
|
if (creatingRowId === row2.id) {
|
|
37152
|
-
clearRow(
|
|
37161
|
+
clearRow("mrt-row-create");
|
|
37153
37162
|
table2.setCreatingRow(null);
|
|
37154
37163
|
} else {
|
|
37155
37164
|
const editingRow = table2.getState().editingRow;
|
|
@@ -45716,4 +45725,4 @@ export {
|
|
|
45716
45725
|
AreaLineChart as y,
|
|
45717
45726
|
ChartLegends as z
|
|
45718
45727
|
};
|
|
45719
|
-
//# sourceMappingURL=uom-field-wrapper-
|
|
45728
|
+
//# sourceMappingURL=uom-field-wrapper-RQOElitw.esm.js.map
|