Builds a selection list that will take its values from a JavaScript snippet.
The snippet runs in scope where the list filter (if any) and the view data are
available as filter and viewData respectively, along
with all flowscript functions. It must return a list of (value, label) pairs.
If an item has no label, its value is used as the label. If the declaration has
a catalogue attribute, the labels are interpreted as i18n keys in
that catalogue.