Choose a package version from registry data
The reusable template loads package metadata with http-request
and queries the imported CEM nodes to populate a native select. It supports a current
version, optional publication dates, a projected label, value propagation,
and synchronization with the page hash.
This demo uses a small same-origin registry fixture so every case remains deterministic and works offline. It is a compact version/date list; a live registry endpoint also needs XPath functions for its response vocabulary and host authorization for that origin.
Before the first request starts, the registry slice can be absent.
The template uses ?? "" to give its state comparison an
explicit default and renders the version list only after loading.
- package
- Package name shown by the picker.
- initialversion
- Default version selected after the records load; user choices persist.
- currentversion
- Optional current selection, controlled on each render through native
select[value]. - showdate
- Set to
trueto append publication dates. - value
- Reflects the latest user selection.
- label slot
- Overrides the default package label.