@ulb-darmstadt/shacl-form 1.10.4 → 2.0.0-rc10
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 +6 -13
- package/dist/bundle.d.ts +6 -0
- package/dist/bundle.js +1163 -0
- package/dist/config.d.ts +12 -3
- package/dist/constants.d.ts +16 -16
- package/dist/constraints.d.ts +2 -2
- package/dist/form.d.ts +6 -4
- package/dist/index.js +63 -0
- package/dist/node-template.d.ts +19 -0
- package/dist/node.d.ts +7 -9
- package/dist/plugins/assets/plugin-VN3CfgGe.js +1 -0
- package/dist/plugins/file-upload.js +1 -0
- package/dist/plugins/leaflet.d.ts +8 -2
- package/dist/plugins/leaflet.js +5 -708
- package/dist/property-template.d.ts +14 -11
- package/dist/property.d.ts +5 -4
- package/dist/theme.d.ts +2 -0
- package/dist/{themes/default.d.ts → theme.default.d.ts} +3 -3
- package/package.json +23 -32
- package/dist/form-bootstrap.d.ts +0 -5
- package/dist/form-bootstrap.js +0 -413
- package/dist/form-default.d.ts +0 -5
- package/dist/form-default.js +0 -402
- package/dist/form-material.d.ts +0 -5
- package/dist/form-material.js +0 -722
- package/dist/plugins/fixed-list.d.ts +0 -9
- package/dist/plugins/map-util.d.ts +0 -5
- package/dist/plugins/mapbox.d.ts +0 -19
- package/dist/plugins/mapbox.js +0 -2904
- package/dist/themes/bootstrap.d.ts +0 -10
- package/dist/themes/material.d.ts +0 -15
- package/src/config.ts +0 -110
- package/src/constants.ts +0 -30
- package/src/constraints.ts +0 -149
- package/src/exports.ts +0 -7
- package/src/form-bootstrap.ts +0 -12
- package/src/form-default.ts +0 -12
- package/src/form-material.ts +0 -12
- package/src/form.ts +0 -319
- package/src/globals.d.ts +0 -2
- package/src/group.ts +0 -34
- package/src/loader.ts +0 -187
- package/src/node.ts +0 -192
- package/src/plugin.ts +0 -60
- package/src/plugins/file-upload.ts +0 -26
- package/src/plugins/fixed-list.ts +0 -19
- package/src/plugins/leaflet.ts +0 -196
- package/src/plugins/map-util.ts +0 -41
- package/src/plugins/mapbox.ts +0 -157
- package/src/property-template.ts +0 -151
- package/src/property.ts +0 -309
- package/src/serialize.ts +0 -96
- package/src/shacl-engine.d.ts +0 -2
- package/src/styles.css +0 -49
- package/src/theme.ts +0 -132
- package/src/themes/bootstrap.css +0 -6
- package/src/themes/bootstrap.ts +0 -44
- package/src/themes/default.css +0 -4
- package/src/themes/default.ts +0 -258
- package/src/themes/material.css +0 -14
- package/src/themes/material.ts +0 -253
- package/src/util.ts +0 -275
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Literal, NamedNode, Quad } from 'n3';
|
|
2
2
|
import { Term } from '@rdfjs/types';
|
|
3
3
|
import { Config } from './config';
|
|
4
|
-
import {
|
|
4
|
+
import { ShaclNodeTemplate } from './node-template';
|
|
5
5
|
export declare class ShaclPropertyTemplate {
|
|
6
|
-
parent: ShaclNode;
|
|
7
6
|
label: string;
|
|
8
7
|
name: Literal | undefined;
|
|
9
8
|
description: Literal | undefined;
|
|
10
9
|
path: string | undefined;
|
|
11
10
|
node: NamedNode | undefined;
|
|
11
|
+
group: string | undefined;
|
|
12
12
|
class: NamedNode | undefined;
|
|
13
13
|
minCount: number | undefined;
|
|
14
14
|
maxCount: number | undefined;
|
|
@@ -25,18 +25,21 @@ export declare class ShaclPropertyTemplate {
|
|
|
25
25
|
pattern: string | undefined;
|
|
26
26
|
order: number | undefined;
|
|
27
27
|
nodeKind: NamedNode | undefined;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
and: string | undefined;
|
|
29
|
+
in: string | undefined;
|
|
30
|
+
or: Term[] | undefined;
|
|
31
|
+
xone: Term[] | undefined;
|
|
32
32
|
languageIn: Term[] | undefined;
|
|
33
33
|
datatype: NamedNode | undefined;
|
|
34
34
|
hasValue: Term | undefined;
|
|
35
35
|
qualifiedValueShape: Term | undefined;
|
|
36
|
-
|
|
36
|
+
nodeShapes: Set<ShaclNodeTemplate>;
|
|
37
|
+
owlImports: Set<NamedNode>;
|
|
38
|
+
id: Term;
|
|
39
|
+
parent: ShaclNodeTemplate;
|
|
37
40
|
config: Config;
|
|
38
|
-
|
|
39
|
-
constructor(quads: Quad[], parent: ShaclNode, config: Config);
|
|
40
|
-
merge(quads: Quad[]): ShaclPropertyTemplate;
|
|
41
|
-
clone(): ShaclPropertyTemplate;
|
|
41
|
+
constructor(id: Term, parent: ShaclNodeTemplate);
|
|
42
42
|
}
|
|
43
|
+
export declare function cloneProperty(template: ShaclPropertyTemplate): ShaclPropertyTemplate;
|
|
44
|
+
export declare function mergeQuads(template: ShaclPropertyTemplate, quads: Quad[]): ShaclPropertyTemplate;
|
|
45
|
+
export declare function mergeProperty(target: ShaclPropertyTemplate, source: ShaclPropertyTemplate): void;
|
package/dist/property.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { BlankNode, NamedNode, Store } from 'n3';
|
|
1
|
+
import { BlankNode, NamedNode, Quad, Store } from 'n3';
|
|
2
2
|
import { Term } from '@rdfjs/types';
|
|
3
3
|
import { ShaclNode } from './node';
|
|
4
|
-
import { Config } from './config';
|
|
5
4
|
import { ShaclPropertyTemplate } from './property-template';
|
|
6
5
|
import { RokitSelect } from '@ro-kit/ui-widgets';
|
|
7
6
|
export declare class ShaclProperty extends HTMLElement {
|
|
8
7
|
template: ShaclPropertyTemplate;
|
|
9
8
|
addButton: RokitSelect | undefined;
|
|
10
9
|
container: HTMLElement;
|
|
11
|
-
|
|
10
|
+
parent: ShaclNode;
|
|
11
|
+
constructor(template: ShaclPropertyTemplate, parent: ShaclNode, valueSubject?: NamedNode | BlankNode);
|
|
12
12
|
addPropertyInstance(value?: Term): HTMLElement;
|
|
13
13
|
updateControls(): void;
|
|
14
|
+
instanceCount(): number;
|
|
14
15
|
toRDF(graph: Store, subject: NamedNode | BlankNode): void;
|
|
15
16
|
getRdfClassToLinkOrCreate(): NamedNode<string> | undefined;
|
|
16
|
-
|
|
17
|
+
filterValidValues(values: Quad[], valueSubject: NamedNode | BlankNode): Promise<Quad[]>;
|
|
17
18
|
createAddButton(): RokitSelect;
|
|
18
19
|
}
|
|
19
20
|
export declare function createPropertyInstance(template: ShaclPropertyTemplate, value?: Term, forceRemovable?: boolean, linked?: boolean): HTMLElement;
|
package/dist/theme.d.ts
CHANGED
|
@@ -16,8 +16,10 @@ export type InputListEntry = {
|
|
|
16
16
|
};
|
|
17
17
|
export declare abstract class Theme {
|
|
18
18
|
stylesheet: CSSStyleSheet;
|
|
19
|
+
dense: boolean;
|
|
19
20
|
constructor(styles?: string);
|
|
20
21
|
apply(_: HTMLFormElement): void;
|
|
22
|
+
setDense(dense: boolean): void;
|
|
21
23
|
createViewer(label: string, value: Term, template: ShaclPropertyTemplate): HTMLElement;
|
|
22
24
|
abstract createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement;
|
|
23
25
|
abstract createLangStringEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Term } from '@rdfjs/types';
|
|
2
|
-
import { ShaclPropertyTemplate } from
|
|
3
|
-
import { Editor, InputListEntry, Theme } from
|
|
2
|
+
import { ShaclPropertyTemplate } from "./property-template";
|
|
3
|
+
import { Editor, InputListEntry, Theme } from "./theme";
|
|
4
4
|
export declare class DefaultTheme extends Theme {
|
|
5
5
|
idCtr: number;
|
|
6
|
-
constructor(
|
|
6
|
+
constructor(overriddenCss?: string);
|
|
7
7
|
createDefaultTemplate(label: string, value: Term | null, required: boolean, editor: Editor, template?: ShaclPropertyTemplate): HTMLElement;
|
|
8
8
|
createDateEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
|
|
9
9
|
createTextEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulb-darmstadt/shacl-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc10",
|
|
4
4
|
"description": "SHACL form generator",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"module": "dist/
|
|
7
|
-
"types": "dist/form
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/form.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import": "./dist/
|
|
12
|
-
"types": "./dist/form
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/form.d.ts"
|
|
13
13
|
},
|
|
14
|
-
"
|
|
15
|
-
"./plugins/*.ts": "./src/plugins/*.ts"
|
|
14
|
+
"./plugins/*": "./dist/plugins/*"
|
|
16
15
|
},
|
|
17
16
|
"files": [
|
|
18
|
-
"dist"
|
|
19
|
-
"src"
|
|
17
|
+
"dist"
|
|
20
18
|
],
|
|
21
19
|
"repository": {
|
|
22
20
|
"type": "git",
|
|
@@ -36,49 +34,42 @@
|
|
|
36
34
|
],
|
|
37
35
|
"scripts": {
|
|
38
36
|
"dev": "vite serve ./demo --host",
|
|
39
|
-
"build": "
|
|
37
|
+
"build": "npm run clean && tsc && npm run build-lib && npm run build-bundle && npm run build-plugins",
|
|
40
38
|
"preview": "vite preview",
|
|
41
|
-
"test": "
|
|
42
|
-
"
|
|
43
|
-
"build-
|
|
44
|
-
"build-
|
|
45
|
-
"build-
|
|
46
|
-
"build-mapbox": "vite build -c ./vite.plugin-mapbox.config.ts"
|
|
39
|
+
"test": "web-test-runner --config test/config.js",
|
|
40
|
+
"clean": "rimraf dist",
|
|
41
|
+
"build-lib": "vite build -c ./vite.config.ts",
|
|
42
|
+
"build-bundle": "vite build -c ./vite.config.bundle.ts",
|
|
43
|
+
"build-plugins": "vite build -c ./vite.config.plugins.ts"
|
|
47
44
|
},
|
|
48
45
|
"devDependencies": {
|
|
49
46
|
"@open-wc/testing": "^4.0.0",
|
|
47
|
+
"@remcovaes/web-test-runner-vite-plugin": "^1.3.0",
|
|
50
48
|
"@types/jsonld": "^1.5.15",
|
|
51
49
|
"@types/leaflet": "^1.9.20",
|
|
52
50
|
"@types/leaflet-editable": "^1.2.7",
|
|
53
51
|
"@types/leaflet.fullscreen": "^3.0.3",
|
|
54
52
|
"@types/mapbox__mapbox-gl-draw": "^1.4.9",
|
|
53
|
+
"@types/mocha": "^10.0.10",
|
|
55
54
|
"@types/n3": "^1.26.0",
|
|
56
|
-
"@types/uuid": "^10.0.0",
|
|
57
|
-
"@web/dev-server-esbuild": "^1.0.4",
|
|
58
55
|
"@web/test-runner": "^0.20.2",
|
|
56
|
+
"@web/test-runner-chrome": "^0.18.1",
|
|
59
57
|
"rdf-isomorphic": "^2.0.1",
|
|
58
|
+
"rimraf": "^6.0.1",
|
|
60
59
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
61
|
-
"typescript": "^5.9.
|
|
62
|
-
"vite": "^7.1.
|
|
63
|
-
"vite-plugin-dts": "^4.5.4",
|
|
64
|
-
"vitest": "^3.2.4"
|
|
60
|
+
"typescript": "^5.9.3",
|
|
61
|
+
"vite": "^7.1.7"
|
|
65
62
|
},
|
|
66
|
-
"
|
|
67
|
-
"@
|
|
68
|
-
"bootstrap": "^5.3.8",
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@ro-kit/ui-widgets": "^1.0.9",
|
|
69
65
|
"jsonld": "^8.3.3",
|
|
70
66
|
"leaflet": "^1.9.4",
|
|
71
67
|
"leaflet-editable": "^1.3.2",
|
|
72
68
|
"leaflet.fullscreen": "^4.0.0",
|
|
73
|
-
"
|
|
69
|
+
"lit": "^3.3.1",
|
|
74
70
|
"n3": "^1.26.0",
|
|
75
71
|
"rdfxml-streaming-parser": "^3.1.0",
|
|
76
72
|
"shacl-engine": "^1.0.2",
|
|
77
73
|
"uuid": "^13.0.0"
|
|
78
|
-
},
|
|
79
|
-
"peerDependencies": {
|
|
80
|
-
"@ro-kit/ui-widgets": "^0.0.44",
|
|
81
|
-
"lit": "^3.3.1",
|
|
82
|
-
"mdui": "^2.1.4"
|
|
83
74
|
}
|
|
84
75
|
}
|