@ulb-darmstadt/shacl-form 1.0.8 → 1.0.10

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,16 @@
1
+ /*!
2
+ * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
3
+ */
4
+
5
+ /*!
6
+ * The buffer module from node.js, for the browser.
7
+ *
8
+ * @author Feross Aboukhadijeh <https://feross.org>
9
+ * @license MIT
10
+ */
11
+
12
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
13
+
14
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
15
+
16
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -0,0 +1,43 @@
1
+ import { Quad, NamedNode } from 'n3';
2
+ import { Term, Literal } from '@rdfjs/types';
3
+ import { Config } from './config';
4
+ export declare abstract class InputBase extends HTMLElement {
5
+ static idCtr: number;
6
+ editor: HTMLElement;
7
+ required: boolean;
8
+ name: string;
9
+ description: string;
10
+ defaultValue: string;
11
+ minCount: string;
12
+ maxCount: string;
13
+ path: string;
14
+ pattern: string;
15
+ dataType: NamedNode;
16
+ nodeKind: NamedNode;
17
+ constructor(quads: Quad[], language: string | null, dataType: NamedNode);
18
+ setValue(value: any): void;
19
+ abstract createEditor(quads: Quad[]): HTMLElement;
20
+ abstract toRDFObject(): Literal | NamedNode | undefined;
21
+ }
22
+ export declare class InputDate extends InputBase {
23
+ constructor(quads: Quad[], language: string | null, dataType: NamedNode);
24
+ createEditor(quads: Quad[]): HTMLElement;
25
+ toRDFObject(): Literal | undefined;
26
+ }
27
+ export declare class InputText extends InputBase {
28
+ constructor(quads: Quad[], language: string | null, dataType: NamedNode);
29
+ createEditor(quads: Quad[]): HTMLElement;
30
+ toRDFObject(): Literal | NamedNode | undefined;
31
+ }
32
+ export declare class InputNumber extends InputBase {
33
+ constructor(quads: Quad[], language: string | null, dataType: NamedNode);
34
+ createEditor(quads: Quad[]): HTMLElement;
35
+ toRDFObject(): Literal | undefined;
36
+ }
37
+ export declare class InputList extends InputBase {
38
+ constructor(quads: Quad[], language: string | null, dataType: NamedNode, list: Term[], config: Config);
39
+ findLabel(subject: NamedNode, config: Config): string | null;
40
+ createEditor(quads: Quad[]): HTMLElement;
41
+ toRDFObject(): Literal | NamedNode | undefined;
42
+ }
43
+ export declare function inputFactory(quads: Quad[], config: Config): InputBase;
package/dist/node.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { BlankNode, NamedNode, Store } from 'n3';
2
+ import { ShaclProperty } from './property';
3
+ import { Config } from './config';
4
+ export declare class ShaclNode extends HTMLElement {
5
+ static blankNodeIdCtr: number;
6
+ shaclSubject: NamedNode;
7
+ exportValueSubject: NamedNode | BlankNode;
8
+ targetClass: NamedNode | undefined;
9
+ parent: ShaclNode | ShaclProperty | null;
10
+ constructor(config: Config, shaclSubject: NamedNode, parent: ShaclNode | ShaclProperty | null, valueSubject?: NamedNode | BlankNode);
11
+ toRDF(graph: Store, subject?: NamedNode | BlankNode): (NamedNode | BlankNode);
12
+ }
@@ -0,0 +1,11 @@
1
+ export declare const PREFIX_SHACL = "http://www.w3.org/ns/shacl#";
2
+ export declare const PREFIX_DASH = "http://datashapes.org/dash#";
3
+ export declare const PREFIX_XSD = "http://www.w3.org/2001/XMLSchema#";
4
+ export declare const PREFIX_RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
5
+ export declare const PREFIX_RDFS = "http://www.w3.org/2000/01/rdf-schema#";
6
+ export declare const PREFIX_SCHEMA = "http://schema.org/";
7
+ export declare const DEFAULT_PREFIXES: {
8
+ xsd: string;
9
+ rdf: string;
10
+ schema: string;
11
+ };
@@ -0,0 +1,15 @@
1
+ import { BlankNode, NamedNode, Quad, Store, Quad_Object } from 'n3';
2
+ import { Config } from './config';
3
+ export declare class ShaclProperty extends HTMLElement {
4
+ name: string;
5
+ node: NamedNode | null;
6
+ minCount: number;
7
+ maxCount: number;
8
+ quads: Quad[];
9
+ config: Config;
10
+ addButton: HTMLElement;
11
+ constructor(config: Config, shaclSubject: BlankNode | NamedNode, valueSubject?: NamedNode | BlankNode);
12
+ createPropertyInstance(value?: Quad_Object): HTMLElement;
13
+ updateControls(): void;
14
+ toRDF(graph: Store, subject: NamedNode | BlankNode): void;
15
+ }
@@ -0,0 +1,9 @@
1
+ export interface Theme {
2
+ createTextInput(): HTMLElement;
3
+ }
4
+ export declare class DefaultTheme implements Theme {
5
+ createTextInput(): HTMLElement;
6
+ }
7
+ export declare class BootstrapTheme implements Theme {
8
+ createTextInput(): HTMLElement;
9
+ }
package/dist/util.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { Quad, Quad_Object } from 'n3';
2
+ export declare function findObjectValueByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string | null): string;
3
+ export declare function findObjectByPredicate(quads: Quad[], predicate: string, prefix?: string, language?: string | null): Quad_Object | null;
4
+ export declare function focusFirstInputElement(context: HTMLElement): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulb-darmstadt/shacl-form",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "SHACL form generator",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -10,17 +10,18 @@
10
10
  ],
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://gitlab.ulb.tu-darmstadt.de/tittel/shacl-form"
13
+ "url": "https://github.com/ULB-Darmstadt/shacl-form"
14
14
  },
15
15
  "author": "ULB Darmstadt",
16
16
  "license": "Apache-2.0",
17
- "homepage": "https://gitlab.ulb.tu-darmstadt.de/tittel/shacl-form",
17
+ "homepage": "https://ulb-darmstadt.github.io/shacl-form/",
18
18
  "keywords": [
19
19
  "SHACL",
20
20
  "form",
21
21
  "generator",
22
22
  "RDF",
23
- "metadata"
23
+ "metadata",
24
+ "editor"
24
25
  ],
25
26
  "scripts": {
26
27
  "build": "npm run clean && webpack --mode production",