@ulb-darmstadt/shacl-form 1.2.0 → 1.2.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 +9 -7
- package/dist/bootstrap.js +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/material.js +3 -3
- package/dist/plugins/mapbox.d.ts +1 -1
- package/dist/plugins/mapbox.js +1 -1
- package/dist/themes/material.js +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,9 +60,11 @@ data-values | RDF triples (e.g. a turtle string) to use as existing data graph t
|
|
|
60
60
|
data-values-url | When `data-values` is not set, the data graph triples are loaded from this URL
|
|
61
61
|
data-value-subject | The subject (id) of the generated data. If this is not set, a blank node with a new UUID will be used. 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
|
|
62
62
|
data-language | Language to use if shapes contain langStrings, e.g. in `sh:name` or `rdfs:label`. Default is [`navigator.language`](https://www.w3schools.com/jsref/prop_nav_language.asp)
|
|
63
|
-
data
|
|
63
|
+
data-loading | Text to display while the web component is initializing. Default: `"Loading..."`
|
|
64
|
+
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
|
|
64
65
|
data-mode | When set to `"view"`, turns the web component into a viewer that displays the given data graph without editing functionality
|
|
65
|
-
data-
|
|
66
|
+
data-collapse | When this attribute is present or set to any value, `sh:group`s and properties with `sh:node` and `sh:maxCount` > 1 are displayed in a collapsible accordion-like widget. This enhances readability in edit and view mode
|
|
67
|
+
data-submit-button | [Only used in edit mode] Whether to add a submit button to the form. The value of this attribute is used as the button label. `submit` events will only fire after successful validation
|
|
66
68
|
|
|
67
69
|
### Element functions
|
|
68
70
|
```typescript
|
|
@@ -92,15 +94,15 @@ Sets a callback function that is called when a SHACL property has an `sh:class`
|
|
|
92
94
|
- `example:Instance a example:Class`
|
|
93
95
|
- `example:Instance a owl:NamedIndividual; skos:broader example:Class`
|
|
94
96
|
|
|
95
|
-
|
|
97
|
+
Class hierarchies can be built using `rdfs:subClassOf` or `skos:broader`.
|
|
96
98
|
|
|
97
99
|
## Theming
|
|
98
100
|
`<shacl-form>` comes in 3 different bundles, each providing a specific theme:
|
|
99
101
|
|
|
100
102
|
Theme | Import statement
|
|
101
103
|
--- | ---
|
|
102
|
-
|
|
103
|
-
[Bootstrap](./src/themes/bootstrap.ts) | `import '@ulb-darmstadt/shacl-form/bootstrap.js'`
|
|
104
|
-
[Material Design](./src/themes/material.ts) | `import '@ulb-darmstadt/shacl-form/material.js'`
|
|
104
|
+
Default (custom CSS) | `import '@ulb-darmstadt/shacl-form/index.js'`
|
|
105
|
+
[Bootstrap](./src/themes/bootstrap.ts) [alpha status] | `import '@ulb-darmstadt/shacl-form/bootstrap.js'`
|
|
106
|
+
[Material Design](./src/themes/material.ts) [alpha status] | `import '@ulb-darmstadt/shacl-form/material.js'`
|
|
105
107
|
|
|
106
|
-
Custom themes can be employed by implementing class [Theme](./src/theme.ts)
|
|
108
|
+
Custom themes can be employed by implementing class [Theme](./src/theme.ts), then activating it with function `setTheme()` on the `<shacl-form>` element.
|