Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onroerenderfgoed/thesaurus-widget
A widget that can interact with a thesaurus api to select concepts
https://github.com/onroerenderfgoed/thesaurus-widget
aurelia javascript lib thesaurus widget
Last synced: about 4 hours ago
JSON representation
A widget that can interact with a thesaurus api to select concepts
- Host: GitHub
- URL: https://github.com/onroerenderfgoed/thesaurus-widget
- Owner: OnroerendErfgoed
- License: gpl-3.0
- Created: 2017-10-10T09:36:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-19T12:21:48.000Z (about 1 year ago)
- Last Synced: 2024-04-16T01:56:07.374Z (7 months ago)
- Topics: aurelia, javascript, lib, thesaurus, widget
- Language: JavaScript
- Size: 2.12 MB
- Stars: 1
- Watchers: 14
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# thesaurus-widget
A widget that can interact with a thesaurus api to select concepts.[![Build Status](https://travis-ci.org/OnroerendErfgoed/thesaurus-widget.svg)](https://travis-ci.org/OnroerendErfgoed/thesaurus-widget)
This widget is a pluggable component that acts as a frontend to a thesaurus api provided by [athramisis](https://github.com/OnroerendErfgoed/atramhasis). This API has following endpoints: http://atramhasis.readthedocs.io/en/latest/services.html
The widget is based on this [skeleton](https://github.com/manuel-guilbault/aurelia-skeleton-plugin-typescript).
Read the [specs](./docs/specs.md).
## Building the code
To build the code, you can run:
```shell
npm run build
```
You will find the compiled code in the `dist` folder, available in five module formats: AMD, CommonJS, ES2015, ES2017 and System.
The dist folder needs to be checked in in git to be able to reuse in other projects.## Running The Tests
You can run the tests with this command:
```shell
npm test
```Alternatively, you can run the tests in watch mode with this command:
```shell
npm run develop
```## Installing the plugin
### In a CLI-based app
```shell
npm install onroerenderfgoed/thesaurus-widget#{version} --save
```Add this to the aurelia.json config:
(can be found at metaaldetectievondstmeldingen/metaaldetectievondstmeldingen/static/formulier/aurelia_project/)
```json
{
"name": "thesaurus-widget",
"main": "index",
"path": "../node_modules/thesaurus-widget/dist/amd",
"resources": ["**/*.{css,html}"]
}
```Add the plugin in main.ts
```javascript
aurelia.use
.standardConfiguration()
.plugin('thesaurus-widget')
```Use the components in a template
```html
...
${suggestion.label}
```Or combined
```html
...
```