@dbp-topics/sublibrary
Version:
[GitLab Repository](https://github.com/digital-blueprint/sublibrary-app) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/sublibrary) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/sublibrary/) | [Sublibrary Bundle](https://gitlab.tugraz.at
21 lines (16 loc) • 543 B
JavaScript
import {ResourceSelect} from '@dbp-toolkit/resource-select';
export class LibrarySelect extends ResourceSelect {
constructor() {
super();
this.resourcePath = 'sublibrary';
}
buildUrl(select, url) {
url += '/sublibraries';
url +=
'?' + new URLSearchParams({lang: select.lang, libraryManager: encodeURIComponent(select.auth['person-id'])}).toString();
return url;
}
formatResource(select, resource) {
return `${resource['name']} (${resource['code']})`;
}
}