@ulb-darmstadt/shacl-form 1.1.8 → 1.2.0

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/dist/config.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Prefixes, Store } from 'n3';
2
2
  import { Term } from '@rdfjs/types';
3
3
  import { ClassInstanceProvider, Plugins } from './plugin';
4
4
  import { Loader } from './loader';
5
+ import { Theme } from './theme';
5
6
  export declare class ElementAttributes {
6
7
  shapes: string | null;
7
8
  shapesUrl: string | null;
@@ -9,7 +10,8 @@ export declare class ElementAttributes {
9
10
  values: string | null;
10
11
  valuesUrl: string | null;
11
12
  valueSubject: string | null;
12
- language: string | null;
13
+ mode: string | null;
14
+ language: string;
13
15
  ignoreOwlImports: string | null;
14
16
  submitButton: string | null;
15
17
  }
@@ -19,10 +21,14 @@ export declare class Config {
19
21
  classInstanceProvider: ClassInstanceProvider | undefined;
20
22
  prefixes: Prefixes;
21
23
  plugins: Plugins;
24
+ editMode: boolean;
22
25
  dataGraph: Store<import("@rdfjs/types").Quad, import("n3").Quad, import("@rdfjs/types").Quad, import("@rdfjs/types").Quad>;
23
26
  lists: Record<string, Term[]>;
24
27
  groups: Array<string>;
28
+ theme: Theme;
29
+ form: HTMLElement;
25
30
  private _shapesGraph;
31
+ constructor(theme: Theme, form: HTMLElement);
26
32
  updateAttributes(elem: HTMLElement): void;
27
33
  static dataAttributes(): Array<string>;
28
34
  get shapesGraph(): Store;
@@ -13,3 +13,4 @@ export declare const SKOS_PREDICATE_BROADER: import("n3").NamedNode<string>;
13
13
  export declare const OWL_OBJECT_NAMED_INDIVIDUAL: import("n3").NamedNode<string>;
14
14
  export declare const SHACL_OBJECT_NODE_SHAPE: import("n3").NamedNode<string>;
15
15
  export declare const SHACL_PREDICATE_CLASS: import("n3").NamedNode<string>;
16
+ export declare const SHACL_PREDICATE_TARGET_CLASS: import("n3").NamedNode<string>;
@@ -2,4 +2,6 @@ import { Term } from '@rdfjs/types';
2
2
  import { ShaclNode } from "./node";
3
3
  import { ShaclProperty } from "./property";
4
4
  import { Config } from './config';
5
+ import { ShaclPropertyTemplate } from './property-template';
5
6
  export declare function createShaclOrConstraint(options: Term[], context: ShaclNode | ShaclProperty, config: Config): HTMLElement;
7
+ export declare function resolveShaclOrConstraint(template: ShaclPropertyTemplate, value: Term): ShaclPropertyTemplate;
@@ -0,0 +1,4 @@
1
+ import { ShaclForm } from "./form";
2
+ export declare class ShaclFormElement extends ShaclForm {
3
+ constructor();
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ShaclForm } from "./form";
2
+ export declare class ShaclFormElement extends ShaclForm {
3
+ constructor();
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ShaclForm } from "./form";
2
+ export declare class ShaclFormElement extends ShaclForm {
3
+ constructor();
4
+ }
package/dist/form.d.ts CHANGED
@@ -1,19 +1,20 @@
1
1
  import { ShaclNode } from './node';
2
2
  import { Config } from './config';
3
- import { ClassInstanceProvider, Plugin } from './plugin';
4
- import './styles.css';
3
+ import { ClassInstanceProvider, Plugin, PluginOptions } from './plugin';
4
+ import { Theme } from './theme';
5
5
  export declare class ShaclForm extends HTMLElement {
6
6
  static get observedAttributes(): string[];
7
7
  config: Config;
8
8
  shape: ShaclNode | null;
9
9
  form: HTMLFormElement;
10
10
  initDebounceTimeout: ReturnType<typeof setTimeout> | undefined;
11
- constructor();
11
+ constructor(theme: Theme);
12
12
  connectedCallback(): void;
13
13
  attributeChangedCallback(): void;
14
14
  private initialize;
15
- serialize(format?: string): string | {}[];
16
- registerPlugin(plugin: Plugin): void;
15
+ serialize(format?: string): string;
16
+ registerPlugin(plugin: Plugin, options?: PluginOptions): void;
17
+ setTheme(theme: Theme): void;
17
18
  setClassInstanceProvider(provider: ClassInstanceProvider): void;
18
19
  validate(ignoreEmptyValues?: boolean): Promise<boolean>;
19
20
  private createValidationErrorDisplay;