(
tableId: Id,
tableMap: TableMap,
rowId: Id,
row: Row,
forceDel?: boolean,
)
| 691 | ) as TableMap; |
| 692 | |
| 693 | const setValidRow = ( |
| 694 | tableId: Id, |
| 695 | tableMap: TableMap, |
| 696 | rowId: Id, |
| 697 | row: Row, |
| 698 | forceDel?: boolean, |
| 699 | ): RowMap => |
| 700 | ifTransformed( |
| 701 | row, |
| 702 | () => |
| 703 | forceDel |
| 704 | ? row |
| 705 | : ifNotUndefined( |
| 706 | middleware[3], |
| 707 | (willSetRow) => |
| 708 | whileMutating(() => |
| 709 | willSetRow(tableId, rowId, structuredClone(row)), |
| 710 | ), |
| 711 | () => row, |
| 712 | ), |
| 713 | (validRow) => |
| 714 | mapMatch( |
| 715 | mapEnsure(tableMap, rowId, () => { |
| 716 | rowIdsChanged(tableId, rowId, 1); |
| 717 | return mapNew(); |
| 718 | }), |
| 719 | validRow, |
| 720 | (rowMap, cellId, cell) => |
| 721 | setValidCell(tableId, rowId, rowMap, cellId, cell), |
| 722 | (rowMap, cellId) => |
| 723 | delValidCell(tableId, tableMap, rowId, rowMap, cellId, forceDel), |
| 724 | ), |
| 725 | objIsEqual, |
| 726 | ) as RowMap; |
| 727 | |
| 728 | const applyRowDirectly = ( |
| 729 | tableId: Id, |
no test coverage detected
searching dependent graphs…