(tableId, table, rowId, row, cellId, forceDel, skipMiddleware)
| 1448 | } |
| 1449 | }; |
| 1450 | const delValidCell = (tableId, table, rowId, row, cellId, forceDel, skipMiddleware) => { |
| 1451 | const defaultCell = mapGet( |
| 1452 | mapGet(tablesSchemaRowCache, tableId)?.[0], |
| 1453 | cellId |
| 1454 | ); |
| 1455 | if (!isUndefined(defaultCell) && !forceDel) { |
| 1456 | return setValidCell(tableId, rowId, row, cellId, defaultCell); |
| 1457 | } |
| 1458 | if (skipMiddleware || (whileMutating(() => middleware[10]?.(tableId, rowId, cellId)) ?? true)) { |
| 1459 | const delCell2 = (cellId2) => { |
| 1460 | cellChanged(tableId, rowId, cellId2, mapGet(row, cellId2)); |
| 1461 | cellIdsChanged(tableId, rowId, cellId2, -1); |
| 1462 | mapSet(row, cellId2); |
| 1463 | }; |
| 1464 | if (isUndefined(defaultCell)) { |
| 1465 | delCell2(cellId); |
| 1466 | } else { |
| 1467 | mapForEach(row, delCell2); |
| 1468 | } |
| 1469 | if (collIsEmpty(row)) { |
| 1470 | rowIdsChanged(tableId, rowId, -1); |
| 1471 | if (collIsEmpty(mapSet(table, rowId))) { |
| 1472 | tableIdsChanged(tableId, -1); |
| 1473 | mapSet(tablesMap, tableId); |
| 1474 | mapSet(tablePoolFunctions, tableId); |
| 1475 | mapSet(tableCellIds, tableId); |
| 1476 | } |
| 1477 | } |
| 1478 | } |
| 1479 | }; |
| 1480 | const delValidValue = (valueId, skipMiddleware) => { |
| 1481 | const defaultValue = mapGet(valuesDefaulted, valueId); |
| 1482 | if (!isUndefined(defaultValue)) { |
no test coverage detected
searching dependent graphs…