@ulb-darmstadt/shacl-form 1.3.3 → 1.3.4

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 CHANGED
@@ -71,10 +71,16 @@ data-submit-button | [Ignored when `data-view` attribute is set] Whether to add
71
71
  ### Element functions
72
72
 
73
73
  ```typescript
74
- serialize(format?: string): string
74
+ toRDF(graph?: Store): Store
75
75
  ```
76
76
 
77
- Serializes the form data to RDF triples. <a name="formats"></a>Supported formats: `text/turtle` (default), `application/ld+json`, `application/n-triples`, `application/n-quads`, `application/trig`.
77
+ Adds the form values as RDF triples to the given graph. If no graph object is provided, creates a new [N3 Store](https://github.com/rdfjs/N3.js#storing).
78
+
79
+ ```typescript
80
+ serialize(format?: string, graph?: Store): string
81
+ ```
82
+
83
+ 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. <a name="formats"></a>Supported formats: `text/turtle` (default), `application/ld+json`, `application/n-triples`, `application/n-quads`, `application/trig`.
78
84
 
79
85
  ```typescript
80
86
  validate(ignoreEmptyValues: boolean): Promise<boolean>