@ulb-darmstadt/shacl-form 1.4.6 → 1.4.8
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 +4 -4
- package/dist/config.d.ts +3 -1
- package/dist/constants.d.ts +2 -0
- package/dist/form-bootstrap.js +1 -1
- package/dist/form-default.js +1 -1
- package/dist/form-material.js +96 -96
- package/dist/plugins/leaflet.js +1 -1
- package/dist/plugins/mapbox.js +1 -1
- package/dist/util.d.ts +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ data-values | RDF triples (e.g. a turtle string) to use as existing data graph t
|
|
|
63
63
|
data-values-url | When `data-values` is not set, the data graph triples are loaded from this URL
|
|
64
64
|
data-values-subject | The subject (id) of the generated data. If this is not set, a blank node with a new UUID is created. If `data-values` or `data-values-url` is set, this id is also used to find the root node in the data graph to fill the form
|
|
65
65
|
data-values-namespace | RDF namespace to use when generating new RDF subjects. Default is empty, so that subjects will be blank nodes.
|
|
66
|
-
data-language | Language to use if shapes contain langStrings, e.g. in `sh:name` or `rdfs:label`. Default is [`navigator.language`](https://
|
|
66
|
+
data-language | Language to use if shapes contain langStrings, e.g. in `sh:name` or `rdfs:label`. Default is [`navigator.language`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language) with fallback to [`navigator.languages`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages)
|
|
67
67
|
data-loading | Text to display while the web component is initializing. Default: `"Loading..."`
|
|
68
68
|
data‑ignore‑owl‑imports | By default, `owl:imports` URLs are fetched and the resulting RDF triples are added to the shapes graph. Setting this attribute to any value disables this feature
|
|
69
69
|
data-view | When set, turns the web component into a viewer that displays the given data graph without editing functionality
|
|
@@ -111,7 +111,7 @@ Class hierarchies can be built using `rdfs:subClassOf` or `skos:broader`.
|
|
|
111
111
|
|
|
112
112
|
### Validation
|
|
113
113
|
|
|
114
|
-
In edit mode, `<shacl-form>` validates the constructed data graph using the library [
|
|
114
|
+
In edit mode, `<shacl-form>` validates the constructed data graph using the library [shacl-engine](https://github.com/rdf-ext/shacl-engine) and displays validation results as icons next to the respective form fields.
|
|
115
115
|
|
|
116
116
|
### Data graph binding
|
|
117
117
|
|
|
@@ -154,7 +154,7 @@ an `sh:class` predicate. The expected return value is a (promise of a) string (e
|
|
|
154
154
|
<http://example.org/alloy> a <http://example.org/Material>; <http://www.w3.org/2000/01/rdf-schema#label> "Alloy".
|
|
155
155
|
<http://example.org/plaster> a <http://example.org/Material>; <http://www.w3.org/2000/01/rdf-schema#label> "Plaster".
|
|
156
156
|
`
|
|
157
|
-
}
|
|
157
|
+
}}
|
|
158
158
|
)
|
|
159
159
|
```
|
|
160
160
|
returns instances of the class `http://example.org/Material` that are then used to populate the "Artwork material" dropdown in the form.
|
|
@@ -182,7 +182,7 @@ When adding a new attribution, `<shacl-form>` renders a dropdown to let the user
|
|
|
182
182
|
|
|
183
183
|
When binding an existing data graph to the form, the `sh:or` constraint is tried to be resolved depending on the respective data value:
|
|
184
184
|
- For RDF literals, an `sh:or` option with a matching `sh:datatype` is chosen
|
|
185
|
-
- For blank nodes or named nodes, the `rdf:type` of the value is tried to be matched with a node shape having a corresponding `sh:targetClass` or with a property shape having a corresponding `sh:class`
|
|
185
|
+
- For blank nodes or named nodes, the `rdf:type` of the value is tried to be matched with a node shape having a corresponding `sh:targetClass` or with a property shape having a corresponding `sh:class`. If there is no `rdf:type` but a `sh:nodeKind` of `sh:IRI`, the id of the the node is used as the value.
|
|
186
186
|
|
|
187
187
|
### SHACL shape inheritance
|
|
188
188
|
|
package/dist/config.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class ElementAttributes {
|
|
|
16
16
|
valuesSubject: string | null;
|
|
17
17
|
valuesNamespace: string;
|
|
18
18
|
view: string | null;
|
|
19
|
-
language: string;
|
|
19
|
+
language: string | null;
|
|
20
20
|
loading: string;
|
|
21
21
|
ignoreOwlImports: string | null;
|
|
22
22
|
collapse: string | null;
|
|
@@ -28,11 +28,13 @@ export declare class Config {
|
|
|
28
28
|
classInstanceProvider: ClassInstanceProvider | undefined;
|
|
29
29
|
prefixes: Prefixes;
|
|
30
30
|
editMode: boolean;
|
|
31
|
+
languages: string[];
|
|
31
32
|
dataGraph: Store<import("@rdfjs/types").Quad, import("n3").Quad, import("@rdfjs/types").Quad, import("@rdfjs/types").Quad>;
|
|
32
33
|
lists: Record<string, Term[]>;
|
|
33
34
|
groups: Array<string>;
|
|
34
35
|
theme: Theme;
|
|
35
36
|
form: HTMLElement;
|
|
37
|
+
renderedNodes: Set<string>;
|
|
36
38
|
private _shapesGraph;
|
|
37
39
|
constructor(theme: Theme, form: HTMLElement);
|
|
38
40
|
updateAttributes(elem: HTMLElement): void;
|
package/dist/constants.d.ts
CHANGED
|
@@ -13,5 +13,7 @@ export declare const RDFS_PREDICATE_SUBCLASS_OF: import("n3").NamedNode<string>;
|
|
|
13
13
|
export declare const SKOS_PREDICATE_BROADER: import("n3").NamedNode<string>;
|
|
14
14
|
export declare const OWL_OBJECT_NAMED_INDIVIDUAL: import("n3").NamedNode<string>;
|
|
15
15
|
export declare const SHACL_OBJECT_NODE_SHAPE: import("n3").NamedNode<string>;
|
|
16
|
+
export declare const SHACL_OBJECT_IRI: import("n3").NamedNode<string>;
|
|
16
17
|
export declare const SHACL_PREDICATE_CLASS: import("n3").NamedNode<string>;
|
|
17
18
|
export declare const SHACL_PREDICATE_TARGET_CLASS: import("n3").NamedNode<string>;
|
|
19
|
+
export declare const SHACL_PREDICATE_NODE_KIND: import("n3").NamedNode<string>;
|