@ulb-darmstadt/shacl-form 1.1.9 → 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 @@
1
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -4,7 +4,7 @@ import { Config } from './config';
4
4
  import { ShaclPropertyTemplate } from './property-template';
5
5
  export declare class ShaclProperty extends HTMLElement {
6
6
  template: ShaclPropertyTemplate;
7
- addButton: HTMLElement;
7
+ addButton: HTMLElement | undefined;
8
8
  constructor(shaclSubject: BlankNode | NamedNode, config: Config, nodeId: NamedNode | BlankNode, valueSubject?: NamedNode | BlankNode);
9
9
  addPropertyInstance(value?: Term): HTMLElement;
10
10
  updateControls(): void;
package/dist/theme.d.ts CHANGED
@@ -9,21 +9,17 @@ export type InputListEntry = {
9
9
  label?: string;
10
10
  };
11
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;
12
+ stylesheet: CSSStyleSheet;
13
+ constructor(styles?: string);
14
+ apply(root: HTMLFormElement): void;
15
+ createViewer(label: string, value: Term, template: ShaclPropertyTemplate): HTMLElement;
16
+ abstract createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement;
17
+ abstract createLangStringEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
18
+ abstract createTextEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
19
+ abstract createNumberEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
20
+ abstract createDateEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
21
+ abstract createBooleanEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
22
+ abstract createButton(label: string, primary: boolean): HTMLElement;
27
23
  }
28
24
  export declare function toRDF(editor: Editor): Literal | NamedNode | undefined;
29
- export declare function editorFactory(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
25
+ export declare function fieldFactory(template: ShaclPropertyTemplate, value: Term | null): HTMLElement;
@@ -0,0 +1,10 @@
1
+ import { NativeTheme } from './native';
2
+ import { Term } from '@rdfjs/types';
3
+ import { ShaclPropertyTemplate } from '../property-template';
4
+ import { Editor } from '../theme';
5
+ export declare class BootstrapTheme extends NativeTheme {
6
+ constructor();
7
+ apply(root: HTMLFormElement): void;
8
+ createDefaultTemplate(label: string, value: Term | null, required: boolean, editor: Editor, template?: ShaclPropertyTemplate | undefined): HTMLElement;
9
+ createButton(label: string, primary: boolean): HTMLElement;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { ShaclPropertyTemplate } from '../property-template';
2
+ import { Term } from '@rdfjs/types';
3
+ import { Theme } from '../theme';
4
+ import { InputListEntry, Editor } from '../theme';
5
+ export declare class MaterialTheme extends Theme {
6
+ constructor();
7
+ createDefaultTemplate(label: string, value: Term | null, required: boolean, editor: Editor, template?: ShaclPropertyTemplate): HTMLElement;
8
+ createTextEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
9
+ createNumberEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
10
+ createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement;
11
+ createBooleanEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
12
+ createDateEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
13
+ createLangStringEditor(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement;
14
+ createButton(label: string, primary: boolean): HTMLElement;
15
+ }