Compact on board AC to 5VDC converter
You'll find hundreds of internal, print-mount, closed frame, open frame, ... power supplies on distributors like digikey. 

So, as usual, a single property, in this case supply size, is seldom the only thing you look at when choosing a device. 

The one you found is not a complete supply. Please at least open the datasheet from the website and look at the schematic... it's really just the controller for a power supply. All the bulky stuff is missing, and you'd have to add it yourself! Which is especially undesirable since that includes a custom flyback transformer.

So, the power supply category is right, but you're not looking into the right device. 

Notice that for proper operation, most of the AC/DC converters for board mounting will still need proper fusing, filtering, and output decoupling. 

You're typically off much cheaper and safer doing exactly what you did: Use a complete, enclosed, consumer power supply.