@ulb-darmstadt/shacl-form 1.8.4 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/form-bootstrap.js +99 -73
- package/dist/form-default.js +87 -61
- package/dist/form-material.js +130 -104
- package/dist/loader.d.ts +2 -3
- package/dist/plugins/leaflet.js +6 -6
- package/dist/plugins/mapbox.js +10 -10
- package/package.json +3 -2
- package/src/loader.ts +108 -64
- package/src/util.ts +10 -7
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ Adds the form values as RDF triples to the given graph. If no graph object is pr
|
|
|
84
84
|
```typescript
|
|
85
85
|
serialize(format?: string, graph?: Store): string
|
|
86
86
|
```
|
|
87
|
-
Serializes the given RDF graph to the given format. If no graph object is provided, this function calls toRDF() (see above) to construct the form data graph
|
|
87
|
+
Serializes the given RDF graph to the given format. If no graph object is provided, this function calls toRDF() (see above) to construct the form data graph in one of the supported [output formats](#output-formats) (default is `text/turtle`).
|
|
88
88
|
|
|
89
89
|
```typescript
|
|
90
90
|
validate(ignoreEmptyValues: boolean): Promise<boolean>
|
|
@@ -233,6 +233,19 @@ When the element attribute `data-collapse` is set, `<shacl-form>` creates an acc
|
|
|
233
233
|
|
|
234
234
|
Apart from grouped properties, all properties having an `sh:node` predicate and `sh:maxCount` != 1 are collapsed.
|
|
235
235
|
|
|
236
|
+
### Supported RDF formats
|
|
237
|
+
|
|
238
|
+
#### Input formats
|
|
239
|
+
* text/turtle, application/n-triples, application/n-quads, application/trig using [N3 parser](https://github.com/rdfjs/N3.js?tab=readme-ov-file#parsing)
|
|
240
|
+
* application/ld+json using [jsonld](https://github.com/digitalbazaar/jsonld.js)
|
|
241
|
+
* application/rdf+xml using [rdfxml-streaming-parser](https://github.com/rdfjs/rdfxml-streaming-parser.js)
|
|
242
|
+
|
|
243
|
+
#### Output formats
|
|
244
|
+
<a id="output-formats"></a>
|
|
245
|
+
|
|
246
|
+
* text/turtle, application/n-triples, application/n-quads, application/trig using [N3 writer](https://github.com/rdfjs/N3.js?tab=readme-ov-file#writing)
|
|
247
|
+
* application/ld+json using [jsonld](https://github.com/digitalbazaar/jsonld.js)
|
|
248
|
+
|
|
236
249
|
### Use with Solid Pods
|
|
237
250
|
|
|
238
251
|
`<shacl-form>` can easily be integrated with [Solid Pods](https://solidproject.org/about). The output of `toRDF()` being a RDF/JS N3 Store, as explained [above](#toRDF), it can be presented to `solid-client`s `fromRdfJsDataset()` function, which converts the RDF graph into a Solid Dataset. The following example, based on Inrupt's basic [Solid Pod example](https://docs.inrupt.com/developer-tools/javascript/client-libraries/tutorial/getting-started/) shows how to merge data from a `<shacl-form>` with a Solid data resource at `readingListDataResourceURI`:
|