Tsunami waves have been observed in New Caledonia and Vanuatu after a magnitude 7 earthquake struck between the islands.