How to extract all the widgets in file format?
I don't believe you can directly download widgets from the platform any more (depending on the TWx version you have). However, you can download the WC SDK and have access to all of the widgets as web components. Just follow this guide here:
Hope that helps