DEICH-6318 - Replaced DataList with Autocomplete in Fuge
DEICH-6318 - DataList removal - AuthorizedValueSearch.svelte
DEICH-6318 - DataList removal - MediaTypeInput.svelte
DEICH-6318 - DataList removal - ExternalIdSelectInput.svelte
DEICH-6318 - DataList removal - LocationSignatureInput.svelte
A bit of extra job was done here, since AuthorizedValueLookupInput was modified to handle locationFormat, which is locally defined in location-format-suggestions.js. A prop called authorizedValuesSortedNorwegian was added to AuthorizedValueLookupInput, which takes precedence over server side fetch if present.
The values in location-format-suggestions.js were mapped to match the required object shape.
This solution makes uniform look and feel for locationFormat handling, and saves on number of code lines+complexity.
Property sourceAuthorityType is not needed any longer, and it was removed. It was used to distinguish between data lists, but this is not needed any longer since AutoComplete is used. That component takes care of unique ID generation on its own.
DEICH-6318 - Configured modern JS features (?. ??).
Note that fe-common is not the correct version yet, will be fixed after FE-common release.
DEICH-6318 - In case of closeOnSelect === true
and minCharsToSuggest === 0
the suggestion list did not close
DEICH-6318 - Layout improvements when not showing # of hits
* `Added` Autocomplete - `placeholder` property to set placeholder text for the input.
* `Added` Autocomplete - `labelFunction` property - to be used to extract label from whatever object.
* `Added` Autocomplete - no hits (ingen treff) is not displayed if no items are supplied or all of them were removed.
* `Added` Autocomplete - suggestion list is not displayed if no items are supplied or all of them were removed.
* `Added` Autocomplete - open/close icon is not displayed if no items are supplied or all of them were removed.
* `Added` Autocomplete - text input is disabled if no items are supplied or all of them were removed.
* `Added` Autocomplete - increased test coverage for user interaction tests (Autocomplete.test.ts).
* `Added` Autocomplete - added support for inputProps (props propagated to the input field).
* `Fixed` Autocomplete - better encapsulation in InternalItems - using private methods.
* `Fixed` Autocomplete - streamlined dropdown open event handling - using mouseDown all over the place to secure more
robust and concise functionality.
* `Fixed` Autocomplete - more consistent functionality if minCharsToSuggest is set to 0. The dropdown list can be closed
on all usual ways ([ESC], close icon, tabbing away/losing focus by any other means). Previously losing focus/close icon
was not working.
Closes DEICH-6318