Migrate the search Vuex store moduel to a Pinia store
Requires !1512 (merged), !1517 (merged) and !1518 (merged), closes #1157 (closed), resolves ARKINDEX-FRONTEND-B5A
The store itself is not that complicated, but typing the 3 search components and the search view is complex. This made me find out that Vue Router types the route's query string in a rather complicated way that translates to { [name: string]: string | null | (string | null)[] }
, which made me discover a whole bunch of bugs in many pages of the frontend that will be resolved by TypeScripting everything. There are many explicit casts (something as SomeType
) because various complicated details of JavaScript objects and iterators end up making TypeScript forget about more specific types like SearchSort
, casting it back to a mere string
.