@ulb-darmstadt/shacl-form 1.0.11 → 1.0.12

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
@@ -2,6 +2,7 @@
2
2
  ```console
3
3
  npm i @ulb-darmstadt/shacl-form
4
4
  ```
5
+ This library provides an HTML5 web component that renders [SHACL shapes](https://www.w3.org/TR/shacl/) as a web form, outputting the entered data as RDF triples validated against these shapes.
5
6
 
6
7
  ## Demo
7
8
  [Visit demo page](https://ulb-darmstadt.github.io/shacl-form/)
@@ -11,6 +12,7 @@ npm i @ulb-darmstadt/shacl-form
11
12
  <html>
12
13
  <head>
13
14
  ...
15
+ <!-- load webcomponent -->
14
16
  <script src="https://cdn.jsdelivr.net/npm/@ulb-darmstadt/shacl-form/dist/index.js" type="module"></script>
15
17
  </head>
16
18
  <body>
package/dist/form.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import { ShaclNode } from './node';
2
2
  import { Config } from './config';
3
+ import { Plugin, Plugins } from './plugin';
3
4
  import { Quad } from 'n3';
5
+ import './styles.css';
4
6
  export declare class ShaclForm extends HTMLElement {
5
7
  static get observedAttributes(): string[];
6
8
  config: Config;
7
9
  shape: ShaclNode | undefined;
8
10
  form: HTMLFormElement;
11
+ plugins: Plugins;
9
12
  initTimeout: ReturnType<typeof setTimeout> | undefined;
10
13
  constructor();
11
14
  connectedCallback(): void;
@@ -13,7 +16,8 @@ export declare class ShaclForm extends HTMLElement {
13
16
  private initialize;
14
17
  toRDF(): Quad[];
15
18
  toRDFTurtle(): string;
19
+ registerPlugin(plugin: Plugin): void;
16
20
  reportValidity(): boolean;
17
- private validate;
21
+ validate(): Promise<boolean>;
18
22
  private findRootShaclShapeSubject;
19
23
  }
@@ -0,0 +1,2 @@
1
+ export * from './index';
2
+ export * from './plugins/index';