├── .babelrc.json ├── .github └── workflows │ ├── main.yml │ └── size.yml ├── .gitignore ├── LICENSE ├── README.md ├── demo ├── field.test.html ├── field.test.js ├── form.ttl ├── index.html ├── index.js ├── inline.html ├── inline.js ├── package.json ├── snowpack.config.js ├── snowpack.crt ├── snowpack.key └── tests │ ├── elements │ ├── checkbox.form.ttl │ ├── checkbox.ttl │ ├── dropdown.form.ttl │ ├── dropdown.ttl │ ├── reference.form.ttl │ ├── reference.ttl │ ├── unknown.form.ttl │ ├── unknown.ttl │ ├── url-image.form.ttl │ ├── url-image.ttl │ ├── url-uppy.form.ttl │ ├── url-uppy.ttl │ ├── wysiwyg.form.ttl │ └── wysiwyg.ttl │ ├── example.form.ttl │ └── example.ttl ├── package-lock.json ├── package.json ├── src ├── Translations │ ├── RdfForm.en.js │ └── RdfForm.nl.js ├── core │ ├── Comunica.ts │ ├── Debug.ts │ ├── FormDefinition.ts │ ├── JsonLdProxy.ts │ ├── Language.ts │ ├── RdfFormData.ts │ ├── Registry.ts │ ├── Renderer.ts │ └── i18n.ts ├── declaration.d.ts ├── elements │ ├── Checkbox.ts │ ├── Color.ts │ ├── Container.ts │ ├── Date.ts │ ├── Details.ts │ ├── Dropdown.ts │ ├── ElementBase.ts │ ├── Group.ts │ ├── LanguagePicker.ts │ ├── Mail.ts │ ├── Number.ts │ ├── Reference.ts │ ├── String.ts │ ├── Textarea.ts │ ├── Unknown.ts │ ├── Url.ts │ ├── UrlImage.ts │ ├── UrlUppy.ts │ ├── WYSIWYG.ts │ └── Wrapper.ts ├── helpers │ ├── applyProxy.ts │ ├── attributesDiff.ts │ ├── containerProxy.ts │ ├── createPixelArray.ts │ ├── dbpediaSuggestions.ts │ ├── debounce.ts │ ├── expand.ts │ ├── fa.ts │ ├── flatMapProxy.ts │ ├── getImage.ts │ ├── getImageColor.ts │ ├── getImageDimensionsByUrl.ts │ ├── getUriMeta.ts │ ├── icons.ts │ ├── importGlobalScript.ts │ ├── isFetchable.ts │ ├── kebabize.ts │ ├── lastPart.ts │ ├── onlyUnique.ts │ ├── searchSuggestionsSparqlQuery.ts │ ├── sparqlQueryToList.ts │ └── streamToString.ts ├── index.ts ├── languages.ts ├── plugins.ts ├── scss │ ├── _layout.scss │ ├── components │ │ ├── _actions.scss │ │ ├── _base.scss │ │ ├── _button.scss │ │ ├── _checkbox-label.scss │ │ ├── _form-element.scss │ │ ├── _items.scss │ │ ├── _pell.scss │ │ ├── _rdf-form.scss │ │ ├── _search-suggestions.scss │ │ ├── _select.scss │ │ ├── _slim-select.scss │ │ └── _uppy.scss │ ├── display-only.scss │ ├── elements │ │ ├── _checkbox.scss │ │ ├── _color.scss │ │ ├── _container.scss │ │ ├── _details.scss │ │ ├── _duration.scss │ │ ├── _group.scss │ │ ├── _language-picker.scss │ │ ├── _password.scss │ │ ├── _reference.scss │ │ ├── _url-image.scss │ │ └── _wysiwyg.scss │ └── rdf-form.scss ├── types │ ├── CoreComponent.ts │ ├── ElementInstance.ts │ ├── ExpandedJsonLdObject.ts │ ├── Field.ts │ └── Form.ts └── vendor │ ├── ProxyHandlerStatic-browser.js │ ├── comunica-browser.js │ ├── fontawesome-svg-core.js │ ├── pell.js │ ├── slimselect.js │ └── ttl2jsonld.js ├── test └── blah.test.ts ├── tsconfig.json └── tsdx.config.js /.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"], 3 | "targets": { 4 | "esmodules": true 5 | } 6 | } -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: [push] 3 | jobs: 4 | build: 5 | name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }} 6 | 7 | runs-on: ${{ matrix.os }} 8 | strategy: 9 | matrix: 10 | node: ['10.x', '12.x', '14.x'] 11 | os: [ubuntu-latest, windows-latest, macOS-latest] 12 | 13 | steps: 14 | - name: Checkout repo 15 | uses: actions/checkout@v2 16 | 17 | - name: Use Node ${{ matrix.node }} 18 | uses: actions/setup-node@v1 19 | with: 20 | node-version: ${{ matrix.node }} 21 | 22 | - name: Install deps and build (with cache) 23 | uses: bahmutov/npm-install@v1 24 | 25 | - name: Lint 26 | run: yarn lint 27 | 28 | - name: Test 29 | run: yarn test --ci --coverage --maxWorkers=2 30 | 31 | - name: Build 32 | run: yarn build 33 | -------------------------------------------------------------------------------- /.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: size 2 | on: [pull_request] 3 | jobs: 4 | size: 5 | runs-on: ubuntu-latest 6 | env: 7 | CI_JOB_NUMBER: 1 8 | steps: 9 | - uses: actions/checkout@v1 10 | - uses: andresz1/size-limit-action@v1 11 | with: 12 | github_token: ${{ secrets.GITHUB_TOKEN }} 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | node_modules 4 | dist 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Daniel Beeke 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Documentation for RDF form 2 | 3 | RDF form provides rendered forms via a form definition provided in RDF turtle format. It is easy to serialize to JSON-ld or turtle. This form builder is extendable and is build as generic as possible. 4 | 5 | See [rdf-form.danielbeeke.nl](http://rdf-form.danielbeeke.nl/) for documentation. 6 | 7 | ![screenshot][screenshot] 8 | 9 | [screenshot]: https://raw.githubusercontent.com/danielbeeke/rdf-form/master/screenshot/progress.png "Screenshot of progress" 10 | -------------------------------------------------------------------------------- /demo/field.test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |