@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.
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright 2017 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+
13
+ /**
14
+ * @license
15
+ * Copyright 2018 Google LLC
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
18
+
19
+ /**
20
+ * @license
21
+ * Copyright 2018 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+
25
+ /**
26
+ * @license
27
+ * Copyright 2019 Google LLC
28
+ * SPDX-License-Identifier: Apache-2.0
29
+ */
30
+
31
+ /**
32
+ * @license
33
+ * Copyright 2020 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */
36
+
37
+ /**
38
+ * @license
39
+ * Copyright 2021 Google LLC
40
+ * SPDX-License-Identifier: Apache-2.0
41
+ */
42
+
43
+ /**
44
+ * @license
45
+ * Copyright 2021 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */
48
+
49
+ /**
50
+ * @license
51
+ * Copyright 2022 Google LLC
52
+ * SPDX-License-Identifier: Apache-2.0
53
+ */
54
+
55
+ /**
56
+ * @license
57
+ * Copyright 2022 Google LLC
58
+ * SPDX-License-Identifier: BSD-3-Clause
59
+ */
60
+
61
+ /**
62
+ * @license
63
+ * Copyright 2023 Google LLC
64
+ * SPDX-License-Identifier: Apache-2.0
65
+ */
@@ -0,0 +1,15 @@
1
+ import { Term } from '@rdfjs/types';
2
+ import { ShaclPropertyTemplate } from "../property-template";
3
+ import { Editor, InputListEntry, Theme } from "../theme";
4
+ export declare class NativeTheme extends Theme {
5
+ idCtr: number;
6
+ constructor(overiddenCss?: string);
7
+ createDefaultTemplate(label: string, value: Term | null, required: boolean, editor: Editor, template?: ShaclPropertyTemplate): HTMLElement;
8
+ createDateEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
9
+ createTextEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
10
+ createLangStringEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
11
+ createBooleanEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
12
+ createNumberEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
13
+ createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement;
14
+ createButton(label: string, primary: boolean): HTMLElement;
15
+ }
package/dist/util.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { NamedNode, Prefixes, Quad, Store } from 'n3';
2
2
  import { Term } from '@rdfjs/types';
3
- import { InputListEntry } from './editors';
3
+ import { InputListEntry } from './theme';
4
4
  import { Config } from './config';
5
- export declare function findObjectValueByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string | null): string;
6
- export declare function findObjectByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string | null): Term | undefined;
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?: string | null): string;
9
- export declare function createInputListEntries(subjects: Term[], shapesGraph: Store, language?: string | null): InputListEntry[];
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[];
12
+ export declare function isURL(input: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulb-darmstadt/shacl-form",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "SHACL form generator",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -31,12 +31,8 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/n3": "^1.16.0",
34
- "buffer": "^6.0.3",
35
- "css-loader": "^6.8.1",
34
+ "raw-loader": "^4.0.2",
36
35
  "rimraf": "^5.0.1",
37
- "save": "^2.9.0",
38
- "stream-browserify": "^3.0.0",
39
- "style-loader": "^3.3.3",
40
36
  "ts-loader": "^9.4.4",
41
37
  "typescript": "^5.1.6",
42
38
  "webpack": "^5.88.2",
@@ -45,6 +41,8 @@
45
41
  },
46
42
  "dependencies": {
47
43
  "@mapbox/mapbox-gl-draw": "^1.4.2",
44
+ "@material/web": "^1.0.0",
45
+ "bootstrap": "^5.3.2",
48
46
  "jsonld": "^8.3.1",
49
47
  "mapbox-gl": "^2.15.0",
50
48
  "n3": "^1.17.0",
package/dist/editors.d.ts DELETED
@@ -1,19 +0,0 @@
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 declare function createDefaultTemplate(template: ShaclPropertyTemplate, editor: Editor, value?: Term): HTMLElement;
8
- export declare function createDateEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
9
- export declare function createTextEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
10
- export declare function createLangStringEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
11
- export declare function createBooleanEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
12
- export declare function createNumberEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
13
- export type InputListEntry = {
14
- value: Term | string;
15
- label?: string;
16
- };
17
- export declare function createListEditor(template: ShaclPropertyTemplate, listEntries: InputListEntry[], value?: Term): HTMLElement;
18
- export declare function toRDF(editor: Editor): Literal | NamedNode | undefined;
19
- export declare function editorFactory(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
@@ -1,2 +0,0 @@
1
- export * from './index';
2
- export * from './plugins/index';