Luka Doncic kept up his superb form with a historic triple-double as the Dallas Mavericks beat the Detroit Pistons 122-111.