Parses data-component and data-config and returns cfg obj.