Implement drag and drop functionalities upon clicking Replace

Reviewer: Tiffany Go (post-commit)

Issue: GCP-9759