Trump warned Hong Kong was at risk of losing its status as a global financial centre if China's proposed national security law goes ahead as planned.