Although most of Indonesian are often said that the original wayang come from Java /Indonesia, but it should be explained what is the wayang story. Why it always takes the story of the of Mahabharata  and the Ramayana ?
At the 4th century the Hindus came to Indonesia, especially the merchants who brought the doctrine of the Vedas  and the epic of India’s great story of Mahabharata and Ramayana in Sanskrit language. On the 9th century it was adapted into the ancient Javanese language.
Basically the story when we trace, the source of the story comes from India. Sourced from the epic Mahabharata which written by Viyasa and Epic Ramayana written by Valmiki.
Wayang story not only performed in Indonesia, but also in different areas of Southeast Asia (Cambodia, Thailand, Malaysia) that are commonly used source of the epic of Ramayana and Mahabharata from India. The Stories are usually integrated with a wayang which adapted to the local folk tales or fairy tales.
1) About Vedas (on Wikipedia)
2) About Mahabharata (on Wikipedia)
3) About Ramayana (on Wikipedia)