@ulb-darmstadt/shacl-form 1.3.8 → 1.4.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 CHANGED
@@ -91,7 +91,7 @@ Validates the form data against the SHACL shapes graph and displays validation r
91
91
  ```typescript
92
92
  registerPlugin(plugin: Plugin)
93
93
  ```
94
- Register a [plugin](./src/plugin.ts) to customize editing/viewing certain property values. Plugins handle specific RDF predicates or `xsd:datatype`s or both. Examples: [Mapbox](./src/plugins/mapbox.ts), [FixedList](./src/plugins/fixed-list.ts)
94
+ Register a [plugin](./src/plugin.ts) to customize editing/viewing certain property values. Plugins handle specific RDF predicates or `xsd:datatype`s or both. Examples: [Leaflet](./src/plugins/leaflet.ts), [Mapbox](./src/plugins/mapbox.ts), [FixedList](./src/plugins/fixed-list.ts)
95
95
 
96
96
  ```typescript
97
97
  setTheme(theme: Theme)
@@ -198,11 +198,11 @@ Properties of inherited shapes are displayed first.
198
198
 
199
199
  Plugins can modify rendering of the form and add functionality to edit and view certain RDF datatypes or predicates (or a combination of both). As an example, the JavaScript of [this page](https://ulb-darmstadt.github.io/shacl-form/#example) contains the following code:
200
200
  ```typescript
201
- import { MapboxPlugin } from '@ulb-darmstadt/shacl-form/plugins/mapbox.js'
201
+ import { LeafletPlugin } from '@ulb-darmstadt/shacl-form/plugins/leaflet.js'
202
202
  const form = document.getElementById("shacl-form")
203
- form.registerPlugin(new MapboxPlugin({ datatype: 'http://www.opengis.net/ont/geosparql#wktLiteral' }, API_KEY))
203
+ form.registerPlugin(new LeafletPlugin({ datatype: 'http://www.opengis.net/ont/geosparql#wktLiteral' }))
204
204
  ```
205
- In effect, whenever a SHACL property has an `sh:datatype` of `http://www.opengis.net/ont/geosparql#wktLiteral`, the plugin is called to create the editor and/or viewer HTML elements. This specific plugin uses [Mapbox GL](https://docs.mapbox.com/mapbox-gl-js/guides/) to edit or view geometry in format [well known text](http://giswiki.org/wiki/Well_Known_Text) on a map.
205
+ In effect, whenever a SHACL property has an `sh:datatype` of `http://www.opengis.net/ont/geosparql#wktLiteral`, the plugin is called to create the editor and/or viewer HTML elements. This specific plugin uses [Leaflet](https://leafletjs.com/) to edit or view geometry in format [well known text](http://giswiki.org/wiki/Well_Known_Text) on a map.
206
206
  Custom plugins can be built by extending class [Plugin](https://github.com/ULB-Darmstadt/shacl-form/blob/main/src/plugin.ts#L40).
207
207
 
208
208
  ### Property grouping and collapsing
package/dist/exports.d.ts CHANGED
@@ -3,3 +3,4 @@ export { Loader } from './loader';
3
3
  export { Config } from './config';
4
4
  export { Plugin } from './plugin';
5
5
  export { ShaclPropertyTemplate } from './property-template';
6
+ export { findLabel } from './util';