Sort a nested list of items via drag and drop

Nested Sort is a JavaScript library which helps you to sort a nested list of items via drag and drop. But I want to make this in vanilla javascript . How to I make this?

I try it in drag and drop system using index.I use html5 dragable attribute, I want to need it in row js