function updateSelectedCell(state, selection, updateCell) {
  if (!selection) {
    return state;
  }

  var tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']);
  var selectionSectionName = selection.sectionName,
      selectionRowIndex = selection.rowIndex;
  return Object(external_lodash_["mapValues"])(tableSections, function (section, sectionName) {
    if (selectionSectionName && selectionSectionName !== sectionName) {
      return section;
    }

    return section.map(function (row, rowIndex) {
      if (selectionRowIndex && selectionRowIndex !== rowIndex) {
        return row;
      }

      return {
        cells: row.cells.map(function (cellAttributes, columnIndex) {
          var cellLocation = {
            sectionName: sectionName,
            columnIndex: columnIndex,
            rowIndex: rowIndex
          };

          if (!isCellSelected(cellLocation, selection)) {
            return cellAttributes;
          }

          return updateCell(cellAttributes);
        })
      };
    });
  });
}
/**
 * Returns updated cell attributes after applying the `updateCell` function to the selection.
 *
 * @param {Object}   state      The block attributes.
 * @param {Object}   selection  The selection of cells to update.
 * @param {Function} updateCell A function to update the selected cell attributes.
 *
 * @return {Object} New table state including the updated cells.
 */
Returns updated cell attributes after applying the `updateCell` function to the selection.
@param {Object}   state      The block attributes.
@param {Object}   selection  The selection of cells to update.
@param {Function} updateCell A function to update the selected cell attributes.

@return {Object} New table state including the updated cells.
Returns updated cell attributes after applying the ` updateCell ` function to the selection . @param { Object } state The block attributes . @param { Object } selection The selection of cells to update . @param { Function } updateCell A function to update the selected cell attributes . @return { Object } New table state including the updated cells .
function updateSelectedCell(state, selection, updateCell) {
  if (!selection) {
    return state;
  }
  var tableSections = Object(external_lodash_["pick"])(state, ['head', 'body', 'foot']);
  var selectionSectionName = selection.sectionName,
      selectionRowIndex = selection.rowIndex;
  return Object(external_lodash_["mapValues"])(tableSections, function (section, sectionName) {
    if (selectionSectionName && selectionSectionName !== sectionName) {
      return section;
    }
    return section.map(function (row, rowIndex) {
      if (selectionRowIndex && selectionRowIndex !== rowIndex) {
        return row;
      }
      return {
        cells: row.cells.map(function (cellAttributes, columnIndex) {
          var cellLocation = {
            sectionName: sectionName,
            columnIndex: columnIndex,
            rowIndex: rowIndex
          };
          if (!isCellSelected(cellLocation, selection)) {
            return cellAttributes;
          }
          return updateCell(cellAttributes);
        })
      };
    });
  });
}
function updateSelectedCell ( state , selection , updateCell ) { if ( ! selection ) { return state ; } var tableSections = Object ( external_lodash_ [ "pick" ] ) ( state , [ 'head' , 'body' , 'foot' ] ) ; var selectionSectionName = selection . sectionName , selectionRowIndex = selection . rowIndex ; return Object ( external_lodash_ [ "mapValues" ] ) ( tableSections , function ( section , sectionName ) { if ( selectionSectionName && selectionSectionName !== sectionName ) { return section ; } return section . map ( function ( row , rowIndex ) { if ( selectionRowIndex && selectionRowIndex !== rowIndex ) { return row ; } return { cells : row . cells . map ( function ( cellAttributes , columnIndex ) { var cellLocation = { sectionName : sectionName , columnIndex : columnIndex , rowIndex : rowIndex } ; if ( ! isCellSelected ( cellLocation , selection ) ) { return cellAttributes ; } return updateCell ( cellAttributes ) ; } ) } ; } ) ; } ) ; }
Returns updated cell attributes after applying the `updateCell` function to the selection.
Returns updated cell attributes after applying the ` updateCell ` function to the selection .