@ulb-darmstadt/shacl-form 1.1.8 → 1.1.9
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 +18 -10
- package/dist/config.d.ts +5 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constraints.d.ts +2 -0
- package/dist/form.d.ts +3 -1
- package/dist/index-with-plugins.js +1 -1
- package/dist/index-with-plugins.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/fixed-list.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/mapbox.d.ts +1 -1
- package/dist/serialize.d.ts +1 -1
- package/dist/theme.d.ts +29 -0
- package/dist/util.d.ts +5 -5
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin, PluginOptions } from '../plugin';
|
|
2
2
|
import { Term } from '@rdfjs/types';
|
|
3
3
|
import { ShaclPropertyTemplate } from '../property-template';
|
|
4
|
-
import { InputListEntry } from '../
|
|
4
|
+
import { InputListEntry } from '../theme';
|
|
5
5
|
export declare class FixedListPlugin extends Plugin {
|
|
6
6
|
entries: InputListEntry[];
|
|
7
7
|
constructor(options: PluginOptions, entries: InputListEntry[]);
|
package/dist/plugins/index.d.ts
CHANGED
package/dist/plugins/mapbox.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Term } from '@rdfjs/types';
|
|
2
2
|
import { Plugin, PluginOptions } from '../plugin';
|
|
3
3
|
import { ShaclPropertyTemplate } from '../property-template';
|
|
4
|
-
import { Editor } from '../
|
|
4
|
+
import { Editor } from '../theme';
|
|
5
5
|
import mapboxgl from 'mapbox-gl';
|
|
6
6
|
import MapboxDraw from '@mapbox/mapbox-gl-draw';
|
|
7
7
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
package/dist/serialize.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Quad, Prefixes } from 'n3';
|
|
2
|
-
export declare function serialize(quads: Quad[], format: string, prefixes?: Prefixes): string
|
|
2
|
+
export declare function serialize(quads: Quad[], format: string, prefixes?: Prefixes): string;
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Literal, NamedNode } from 'n3';
|
|
2
|
+
import { Term } from '@rdfjs/types';
|
|
3
|
+
import { ShaclPropertyTemplate } from './property-template';
|
|
4
|
+
export type Editor = HTMLElement & {
|
|
5
|
+
value: string;
|
|
6
|
+
};
|
|
7
|
+
export type InputListEntry = {
|
|
8
|
+
value: Term | string;
|
|
9
|
+
label?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare abstract class Theme {
|
|
12
|
+
abstract createListEditor(template: ShaclPropertyTemplate, listEntries: InputListEntry[], value?: Term): HTMLElement;
|
|
13
|
+
abstract createLangStringEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
14
|
+
abstract createTextEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
15
|
+
abstract createNumberEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
16
|
+
abstract createDateEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
17
|
+
abstract createBooleanEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
18
|
+
createDefaultTemplate(template: ShaclPropertyTemplate, editor: Editor, value?: Term): HTMLElement;
|
|
19
|
+
}
|
|
20
|
+
export declare class NativeTheme extends Theme {
|
|
21
|
+
createDateEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
22
|
+
createTextEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
23
|
+
createLangStringEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
24
|
+
createBooleanEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
25
|
+
createNumberEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
26
|
+
createListEditor(template: ShaclPropertyTemplate, listEntries: InputListEntry[], value?: Term): HTMLElement;
|
|
27
|
+
}
|
|
28
|
+
export declare function toRDF(editor: Editor): Literal | NamedNode | undefined;
|
|
29
|
+
export declare function editorFactory(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
package/dist/util.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { NamedNode, Prefixes, Quad, Store } from 'n3';
|
|
2
2
|
import { Term } from '@rdfjs/types';
|
|
3
|
-
import { InputListEntry } from './
|
|
3
|
+
import { InputListEntry } from './theme';
|
|
4
4
|
import { Config } from './config';
|
|
5
|
-
export declare function findObjectValueByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string
|
|
6
|
-
export declare function findObjectByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string
|
|
5
|
+
export declare function findObjectValueByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string): string;
|
|
6
|
+
export declare function findObjectByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string): Term | undefined;
|
|
7
7
|
export declare function focusFirstInputElement(context: HTMLElement): void;
|
|
8
|
-
export declare function findLabel(quads: Quad[], language
|
|
9
|
-
export declare function createInputListEntries(subjects: Term[], shapesGraph: Store, language
|
|
8
|
+
export declare function findLabel(quads: Quad[], language: string): string;
|
|
9
|
+
export declare function createInputListEntries(subjects: Term[], shapesGraph: Store, language: string): InputListEntry[];
|
|
10
10
|
export declare function removePrefixes(id: string, prefixes: Prefixes): string;
|
|
11
11
|
export declare function findInstancesOf(clazz: NamedNode, config: Config): InputListEntry[];
|