@ulb-darmstadt/shacl-form 1.4.2 → 1.4.4
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 +1 -2
- package/dist/constants.d.ts +1 -0
- package/dist/exports.d.ts +1 -1
- package/dist/form-bootstrap.js +1 -1
- package/dist/form-default.js +1 -1
- package/dist/form-material.js +99 -95
- package/dist/form.d.ts +4 -4
- package/dist/plugin.d.ts +3 -6
- package/dist/plugins/file-upload.d.ts +8 -0
- package/dist/plugins/file-upload.js +1 -0
- package/dist/plugins/leaflet.d.ts +4 -3
- package/dist/plugins/leaflet.js +1 -1
- package/dist/plugins/mapbox.d.ts +0 -1
- package/dist/plugins/mapbox.js +1 -1
- package/dist/plugins/mapbox.js.LICENSE.txt +8 -0
- package/dist/property-template.d.ts +2 -1
- package/dist/theme.d.ts +1 -0
- package/package.json +10 -10
package/dist/form.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ShaclNode } from './node';
|
|
2
2
|
import { Config } from './config';
|
|
3
|
-
import { ClassInstanceProvider, Plugin
|
|
3
|
+
import { ClassInstanceProvider, Plugin } from './plugin';
|
|
4
4
|
import { Quad, Store } from 'n3';
|
|
5
5
|
import { Theme } from './theme';
|
|
6
6
|
export declare class ShaclForm extends HTMLElement {
|
|
@@ -13,9 +13,9 @@ export declare class ShaclForm extends HTMLElement {
|
|
|
13
13
|
connectedCallback(): void;
|
|
14
14
|
attributeChangedCallback(): void;
|
|
15
15
|
private initialize;
|
|
16
|
-
serialize(format?: string, graph?: Store<import("
|
|
17
|
-
toRDF(graph?: Store<import("
|
|
18
|
-
registerPlugin(plugin: Plugin
|
|
16
|
+
serialize(format?: string, graph?: Store<import("@rdfjs/types").Quad, Quad, import("@rdfjs/types").Quad, import("@rdfjs/types").Quad>): string;
|
|
17
|
+
toRDF(graph?: Store<import("@rdfjs/types").Quad, Quad, import("@rdfjs/types").Quad, import("@rdfjs/types").Quad>): Store;
|
|
18
|
+
registerPlugin(plugin: Plugin): void;
|
|
19
19
|
setTheme(theme: Theme): void;
|
|
20
20
|
setClassInstanceProvider(provider: ClassInstanceProvider): void;
|
|
21
21
|
validate(ignoreEmptyValues?: boolean): Promise<boolean>;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { ShaclPropertyTemplate } from './property-template';
|
|
2
2
|
import { Term } from '@rdfjs/types';
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
list(): Plugin[];
|
|
7
|
-
find(predicate: string | undefined, datatype: string | undefined): Plugin | undefined;
|
|
8
|
-
}
|
|
3
|
+
export declare function registerPlugin(plugin: Plugin): void;
|
|
4
|
+
export declare function listPlugins(): Plugin[];
|
|
5
|
+
export declare function findPlugin(predicate: string | undefined, datatype: string | undefined): Plugin | undefined;
|
|
9
6
|
export type PluginOptions = {
|
|
10
7
|
predicate?: string;
|
|
11
8
|
datatype?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Plugin, PluginOptions } from '../plugin';
|
|
2
|
+
import { ShaclPropertyTemplate } from '../property-template';
|
|
3
|
+
export declare class FileUploadPlugin extends Plugin {
|
|
4
|
+
onChange: (event: Event) => void;
|
|
5
|
+
fileType: string | undefined;
|
|
6
|
+
constructor(options: PluginOptions, onChange: (event: Event) => void, fileType?: string);
|
|
7
|
+
createEditor(template: ShaclPropertyTemplate): HTMLElement;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{p:()=>i});class r{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}class i extends r{constructor(e,t,r){super(e),this.onChange=t,this.fileType=r}createEditor(e){var t;const r=void 0!==e.minCount&&e.minCount>0,i=e.config.theme.createFileEditor(e.label,null,r,e);return i.addEventListener("change",(e=>{e.stopPropagation(),this.onChange(e)})),this.fileType&&(null===(t=i.querySelector('input[type="file"]'))||void 0===t||t.setAttribute("accept",this.fileType)),i}}var a=t.p;export{a as FileUploadPlugin};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as L from 'leaflet';
|
|
2
|
+
import 'leaflet-editable/src/Leaflet.Editable.js';
|
|
2
3
|
import 'leaflet.fullscreen/Control.FullScreen.js';
|
|
3
|
-
import 'leaflet-draw/dist/leaflet.draw.js';
|
|
4
4
|
import { Term } from '@rdfjs/types';
|
|
5
5
|
import { Plugin, PluginOptions } from '../plugin';
|
|
6
6
|
import { Editor } from '../theme';
|
|
@@ -8,11 +8,12 @@ import { ShaclPropertyTemplate } from '../property-template';
|
|
|
8
8
|
import { Geometry } from './map-util';
|
|
9
9
|
export declare class LeafletPlugin extends Plugin {
|
|
10
10
|
map: L.Map | undefined;
|
|
11
|
-
drawLayer: L.FeatureGroup | undefined;
|
|
12
11
|
currentEditor: Editor | undefined;
|
|
12
|
+
createdGeometry: Geometry | undefined;
|
|
13
|
+
displayedShape: L.Polygon | L.Marker | undefined;
|
|
13
14
|
constructor(options: PluginOptions);
|
|
14
15
|
initEditMode(form: HTMLElement): HTMLDialogElement;
|
|
15
16
|
createEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
|
|
16
17
|
createViewer(template: ShaclPropertyTemplate, value: Term): HTMLElement;
|
|
17
|
-
drawAndZoomToGeometry(geometry: Geometry | undefined,
|
|
18
|
+
drawAndZoomToGeometry(geometry: Geometry | undefined, map: L.Map): void;
|
|
18
19
|
}
|