@ulb-darmstadt/shacl-form 1.8.0 → 1.8.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 +7 -4
- package/dist/constants.d.ts +0 -2
- package/dist/form-bootstrap.js +55 -55
- package/dist/form-default.js +52 -52
- package/dist/form-material.js +91 -91
- package/dist/plugins/leaflet.js +8 -8
- package/dist/plugins/mapbox.js +18 -18
- package/dist/theme.d.ts +1 -1
- package/dist/util.d.ts +2 -2
- package/package.json +8 -6
- package/src/constants.ts +0 -2
- package/src/property.ts +2 -2
- package/src/theme.ts +1 -1
- package/src/themes/default.ts +30 -31
- package/src/themes/material.ts +29 -35
- package/src/util.ts +19 -11
- package/dist/node-template.d.ts +0 -17
- package/src/node-template.ts +0 -82
package/README.md
CHANGED
|
@@ -141,11 +141,14 @@ Apart from setting the element attributes `data-shapes` or `data-shapes-url`, th
|
|
|
141
141
|
In this case, the URL references an ontology which among other things defines instances of class `prov:Role` that are then used to populate the "Role" dropdown in the form.
|
|
142
142
|
|
|
143
143
|
2. <a id="classInstanceProvider"></a>The `<shacl-form>` element has a function `setClassInstanceProvider((className: string) => Promise<string>)` that registers a callback function which is invoked when a SHACL property has
|
|
144
|
-
an `sh:class` predicate. The expected return value is a (promise of a) string (e.g. in format `text/turtle`) that contains RDF class instance definitions of the given class.
|
|
145
|
-
- `example:Instance a example:Class`
|
|
146
|
-
- `example:Instance a owl:NamedIndividual; skos:broader example:Class`
|
|
144
|
+
an `sh:class` predicate. The expected return value is a (promise of a) string (e.g. in format `text/turtle`) that contains RDF class instance definitions of the given class.
|
|
147
145
|
|
|
148
|
-
Class hierarchies can be built using `rdfs:subClassOf
|
|
146
|
+
Class hierarchies can be built using `rdfs:subClassOf`. Instance hierarchies can be modeled e.g. like:
|
|
147
|
+
```
|
|
148
|
+
ex:parent a ex:Class .
|
|
149
|
+
ex:child rdfs:subClassOf ex:parent; a ex:parent .
|
|
150
|
+
ex:grandchild rdfs:subClassOf ex:child; a ex:child .
|
|
151
|
+
```
|
|
149
152
|
|
|
150
153
|
In [this example](https://ulb-darmstadt.github.io/shacl-form/#example), the code:
|
|
151
154
|
|
package/dist/constants.d.ts
CHANGED
|
@@ -13,9 +13,7 @@ export declare const DATA_GRAPH: import('n3').NamedNode<"loaded-data">;
|
|
|
13
13
|
export declare const RDF_PREDICATE_TYPE: import('n3').NamedNode<string>;
|
|
14
14
|
export declare const DCTERMS_PREDICATE_CONFORMS_TO: import('n3').NamedNode<string>;
|
|
15
15
|
export declare const RDFS_PREDICATE_SUBCLASS_OF: import('n3').NamedNode<string>;
|
|
16
|
-
export declare const SKOS_PREDICATE_BROADER: import('n3').NamedNode<string>;
|
|
17
16
|
export declare const OWL_PREDICATE_IMPORTS: import('n3').NamedNode<string>;
|
|
18
|
-
export declare const OWL_OBJECT_NAMED_INDIVIDUAL: import('n3').NamedNode<string>;
|
|
19
17
|
export declare const SHACL_OBJECT_NODE_SHAPE: import('n3').NamedNode<string>;
|
|
20
18
|
export declare const SHACL_OBJECT_IRI: import('n3').NamedNode<string>;
|
|
21
19
|
export declare const SHACL_PREDICATE_PROPERTY: import('n3').NamedNode<string>;
|