@ulb-darmstadt/shacl-form 1.7.4 → 1.8.1
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 +20 -7
- package/dist/config.d.ts +4 -5
- package/dist/constants.d.ts +13 -13
- package/dist/constraints.d.ts +2 -2
- package/dist/exports.d.ts +2 -1
- package/dist/form-bootstrap.d.ts +1 -1
- package/dist/form-bootstrap.js +361 -2
- package/dist/form-default.d.ts +1 -1
- package/dist/form-default.js +350 -2
- package/dist/form-material.d.ts +1 -1
- package/dist/form-material.js +670 -2
- package/dist/form.d.ts +3 -2
- package/dist/node.d.ts +2 -1
- package/dist/plugins/leaflet.d.ts +2 -4
- package/dist/plugins/leaflet.js +720 -2
- package/dist/plugins/mapbox.d.ts +2 -2
- package/dist/plugins/mapbox.js +2764 -2
- package/dist/property-template.d.ts +1 -1
- package/dist/property.d.ts +6 -2
- package/dist/theme.d.ts +3 -3
- package/dist/themes/default.d.ts +3 -3
- package/dist/themes/material.d.ts +2 -3
- package/dist/util.d.ts +2 -2
- package/package.json +26 -12
- package/src/config.ts +11 -10
- package/src/constants.ts +3 -3
- package/src/constraints.ts +15 -18
- package/src/exports.ts +2 -1
- package/src/form.ts +32 -17
- package/src/group.ts +1 -1
- package/src/loader.ts +12 -13
- package/src/node.ts +40 -38
- package/src/plugins/leaflet.ts +2 -2
- package/src/plugins/mapbox.ts +4 -4
- package/src/property-template.ts +4 -5
- package/src/property.ts +154 -56
- package/src/serialize.ts +14 -1
- package/src/styles.css +8 -10
- package/src/theme.ts +6 -6
- package/src/themes/bootstrap.ts +1 -1
- package/src/themes/default.css +2 -2
- package/src/themes/default.ts +38 -30
- package/src/themes/material.ts +37 -34
- package/src/util.ts +26 -20
- package/dist/form-bootstrap.js.LICENSE.txt +0 -69
- package/dist/form-default.js.LICENSE.txt +0 -69
- package/dist/form-material.js.LICENSE.txt +0 -69
- package/dist/plugins/file-upload.js +0 -1
- package/dist/plugins/fixed-list.js +0 -1
- package/dist/plugins/leaflet.js.LICENSE.txt +0 -4
- package/dist/plugins/mapbox.js.LICENSE.txt +0 -10
package/src/theme.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ShaclPropertyTemplate } from './property-template'
|
|
|
6
6
|
import css from './styles.css?raw'
|
|
7
7
|
|
|
8
8
|
export type Editor = HTMLElement & { value: string, type?: string, shaclDatatype?: NamedNode<string>, binaryData?: string, checked?: boolean, disabled?: boolean }
|
|
9
|
-
export type InputListEntry = { value: Term | string, label?: string,
|
|
9
|
+
export type InputListEntry = { value: Term | string, label?: string, children?: InputListEntry[] }
|
|
10
10
|
|
|
11
11
|
export abstract class Theme {
|
|
12
12
|
stylesheet: CSSStyleSheet
|
|
@@ -20,7 +20,7 @@ export abstract class Theme {
|
|
|
20
20
|
this.stylesheet.replaceSync(aggregatedStyles)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
apply(
|
|
23
|
+
apply(_: HTMLFormElement) {
|
|
24
24
|
// NOP
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -35,7 +35,7 @@ export abstract class Theme {
|
|
|
35
35
|
let name = value.value
|
|
36
36
|
let lang: HTMLElement | null = null
|
|
37
37
|
if (value instanceof NamedNode) {
|
|
38
|
-
const quads = template.config.
|
|
38
|
+
const quads = template.config.store.getQuads(name, null, null, null)
|
|
39
39
|
if (quads.length) {
|
|
40
40
|
const s = findLabel(quads, template.config.languages)
|
|
41
41
|
if (s) {
|
|
@@ -79,8 +79,8 @@ export abstract class Theme {
|
|
|
79
79
|
abstract createButton(label: string, primary: boolean): HTMLElement
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
export function fieldFactory(template: ShaclPropertyTemplate, value: Term | null): HTMLElement {
|
|
83
|
-
if (
|
|
82
|
+
export function fieldFactory(template: ShaclPropertyTemplate, value: Term | null, editable: boolean): HTMLElement {
|
|
83
|
+
if (editable) {
|
|
84
84
|
const required = template.minCount !== undefined && template.minCount > 0
|
|
85
85
|
// if we have a class, find the instances and display them in a list
|
|
86
86
|
if (template.class) {
|
|
@@ -91,7 +91,7 @@ export function fieldFactory(template: ShaclPropertyTemplate, value: Term | null
|
|
|
91
91
|
if (template.shaclIn) {
|
|
92
92
|
const list = template.config.lists[template.shaclIn]
|
|
93
93
|
if (list?.length) {
|
|
94
|
-
const listEntries = createInputListEntries(list, template.config.
|
|
94
|
+
const listEntries = createInputListEntries(list, template.config.store, template.config.languages)
|
|
95
95
|
return template.config.theme.createListEditor(template.label, value, required, listEntries, template)
|
|
96
96
|
}
|
|
97
97
|
else {
|
package/src/themes/bootstrap.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { DefaultTheme } from './default'
|
|
|
2
2
|
import { Term } from '@rdfjs/types'
|
|
3
3
|
import { ShaclPropertyTemplate } from '../property-template'
|
|
4
4
|
import { Editor } from '../theme'
|
|
5
|
-
import bootstrap from 'bootstrap/dist/css/bootstrap.min.css'
|
|
5
|
+
import bootstrap from 'bootstrap/dist/css/bootstrap.min.css?raw'
|
|
6
6
|
import css from './bootstrap.css?raw'
|
|
7
7
|
|
|
8
8
|
export class BootstrapTheme extends DefaultTheme {
|
package/src/themes/default.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
.editor:not([type='checkbox']) { border: 1px solid #DDD; padding: 2px 4px; }
|
|
2
|
-
.property-instance label { display: inline-
|
|
3
|
-
.property-instance:not(:first-child) > label { visibility: hidden; max-height: 0; }
|
|
2
|
+
.property-instance label { display: inline-flex; word-break: break-word; line-height: 1em; padding-top: 0.15em; padding-right: 1em; flex-shrink: 0; position: relative; }
|
|
3
|
+
.property-instance:not(:first-child) > label:not(.persistent) { visibility: hidden; max-height: 0; }
|
|
4
4
|
.mode-edit .property-instance label { width: var(--label-width); }
|
package/src/themes/default.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Term } from '@rdfjs/types'
|
|
2
2
|
import { ShaclPropertyTemplate } from "../property-template"
|
|
3
3
|
import { Editor, InputListEntry, Theme } from "../theme"
|
|
4
|
-
import { PREFIX_XSD } from '../constants'
|
|
5
|
-
import { Literal } from 'n3'
|
|
4
|
+
import { PREFIX_SHACL, PREFIX_XSD } from '../constants'
|
|
5
|
+
import { Literal, NamedNode } from 'n3'
|
|
6
|
+
import { Term as N3Term } from 'n3'
|
|
6
7
|
import css from './default.css?raw'
|
|
8
|
+
import { RokitSelect } from '@ro-kit/ui-widgets'
|
|
7
9
|
|
|
8
10
|
export class DefaultTheme extends Theme {
|
|
9
11
|
idCtr = 0
|
|
@@ -17,7 +19,9 @@ export class DefaultTheme extends Theme {
|
|
|
17
19
|
editor.classList.add('editor')
|
|
18
20
|
if (template?.datatype) {
|
|
19
21
|
// store datatype on editor, this is used for RDF serialization
|
|
20
|
-
editor
|
|
22
|
+
editor.shaclDatatype = template.datatype
|
|
23
|
+
} else if (value instanceof Literal) {
|
|
24
|
+
editor.shaclDatatype = value.datatype
|
|
21
25
|
}
|
|
22
26
|
if (template?.minCount !== undefined) {
|
|
23
27
|
editor.dataset.minCount = String(template.minCount)
|
|
@@ -27,6 +31,8 @@ export class DefaultTheme extends Theme {
|
|
|
27
31
|
}
|
|
28
32
|
if (template?.nodeKind) {
|
|
29
33
|
editor.dataset.nodeKind = template.nodeKind.value
|
|
34
|
+
} else if (value instanceof NamedNode) {
|
|
35
|
+
editor.dataset.nodeKind = PREFIX_SHACL + 'IRI'
|
|
30
36
|
}
|
|
31
37
|
if (template?.hasValue || template?.readonly) {
|
|
32
38
|
editor.disabled = true
|
|
@@ -194,44 +200,46 @@ export class DefaultTheme extends Theme {
|
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement {
|
|
197
|
-
const editor =
|
|
203
|
+
const editor = new RokitSelect()
|
|
204
|
+
editor.dense = true
|
|
205
|
+
editor.clearable = true
|
|
206
|
+
editor.collapse = true
|
|
198
207
|
const result = this.createDefaultTemplate(label, null, required, editor, template)
|
|
199
|
-
|
|
208
|
+
const ul = document.createElement('ul')
|
|
200
209
|
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
if (value && value.value === itemValue) {
|
|
212
|
-
option.selected = true
|
|
213
|
-
}
|
|
214
|
-
if (itemValue === '') {
|
|
215
|
-
addEmptyOption = false
|
|
210
|
+
const appendListEntry = (entry: InputListEntry, parent: HTMLUListElement) => {
|
|
211
|
+
const li = document.createElement('li')
|
|
212
|
+
let entryValue = ''
|
|
213
|
+
if (typeof entry.value === 'string') {
|
|
214
|
+
entryValue = entry.value
|
|
215
|
+
} else {
|
|
216
|
+
// this is needed for typed rdf literals
|
|
217
|
+
entryValue = (entry.value as N3Term).id
|
|
216
218
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
li.innerText = entry.label ? entry.label : entryValue
|
|
220
|
+
li.dataset.value = entryValue
|
|
221
|
+
parent.appendChild(li)
|
|
222
|
+
if (entry.children?.length) {
|
|
223
|
+
const ul = document.createElement('ul')
|
|
224
|
+
li.appendChild(ul)
|
|
225
|
+
for (const child of entry.children) {
|
|
226
|
+
appendListEntry(child, ul)
|
|
227
|
+
}
|
|
225
228
|
}
|
|
226
|
-
editor.prepend(emptyOption)
|
|
227
229
|
}
|
|
230
|
+
|
|
231
|
+
for (const item of listEntries) {
|
|
232
|
+
appendListEntry(item, ul)
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
editor.appendChild(ul)
|
|
228
236
|
if (value) {
|
|
229
237
|
editor.value = value.value
|
|
230
238
|
}
|
|
231
239
|
return result
|
|
232
240
|
}
|
|
233
241
|
|
|
234
|
-
createButton(label: string,
|
|
242
|
+
createButton(label: string, _: boolean): HTMLElement {
|
|
235
243
|
const button = document.createElement('button')
|
|
236
244
|
button.type = 'button'
|
|
237
245
|
button.innerHTML = label
|
package/src/themes/material.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ShaclPropertyTemplate } from '../property-template'
|
|
2
2
|
import { Term } from '@rdfjs/types'
|
|
3
|
-
import { Button, TextField,
|
|
3
|
+
import { Button, TextField, Checkbox } from 'mdui'
|
|
4
4
|
import { Theme } from '../theme'
|
|
5
5
|
import { InputListEntry, Editor } from '../theme'
|
|
6
|
-
import { Literal } from 'n3'
|
|
6
|
+
import { Literal, NamedNode } from 'n3'
|
|
7
|
+
import { Term as N3Term } from 'n3'
|
|
7
8
|
import css from './material.css?raw'
|
|
8
|
-
import { PREFIX_XSD } from '../constants'
|
|
9
|
+
import { PREFIX_SHACL, PREFIX_XSD } from '../constants'
|
|
10
|
+
import { RokitSelect } from '@ro-kit/ui-widgets'
|
|
9
11
|
|
|
10
12
|
export class MaterialTheme extends Theme {
|
|
11
13
|
constructor() {
|
|
@@ -16,7 +18,9 @@ export class MaterialTheme extends Theme {
|
|
|
16
18
|
editor.classList.add('editor')
|
|
17
19
|
if (template?.datatype) {
|
|
18
20
|
// store datatype on editor, this is used for RDF serialization
|
|
19
|
-
editor
|
|
21
|
+
editor.shaclDatatype = template.datatype
|
|
22
|
+
} else if (value instanceof Literal) {
|
|
23
|
+
editor.shaclDatatype = value.datatype
|
|
20
24
|
}
|
|
21
25
|
if (template?.minCount !== undefined) {
|
|
22
26
|
editor.dataset.minCount = String(template.minCount)
|
|
@@ -26,6 +30,8 @@ export class MaterialTheme extends Theme {
|
|
|
26
30
|
}
|
|
27
31
|
if (template?.nodeKind) {
|
|
28
32
|
editor.dataset.nodeKind = template.nodeKind.value
|
|
33
|
+
} else if (value instanceof NamedNode) {
|
|
34
|
+
editor.dataset.nodeKind = PREFIX_SHACL + 'IRI'
|
|
29
35
|
}
|
|
30
36
|
if (template?.hasValue || template?.readonly) {
|
|
31
37
|
editor.disabled = true
|
|
@@ -89,41 +95,38 @@ export class MaterialTheme extends Theme {
|
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
createListEditor(label: string, value: Term | null, required: boolean, listEntries: InputListEntry[], template?: ShaclPropertyTemplate): HTMLElement {
|
|
92
|
-
const editor = new
|
|
93
|
-
editor.
|
|
94
|
-
editor.label = label
|
|
95
|
-
editor.helper = template?.description?.value
|
|
98
|
+
const editor = new RokitSelect()
|
|
99
|
+
editor.dense = true
|
|
96
100
|
editor.clearable = true
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
let addEmptyOption = true
|
|
101
|
+
const result = this.createDefaultTemplate(label, null, required, editor, template)
|
|
102
|
+
const ul = document.createElement('ul')
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
// }
|
|
110
|
-
if (item.indent) {
|
|
111
|
-
for (let i = 0; i < item.indent; i++) {
|
|
112
|
-
option.innerHTML = '  ' + option.innerHTML
|
|
113
|
-
}
|
|
104
|
+
const appendListEntry = (entry: InputListEntry, parent: HTMLUListElement) => {
|
|
105
|
+
const li = document.createElement('li')
|
|
106
|
+
let entryValue = ''
|
|
107
|
+
if (typeof entry.value === 'string') {
|
|
108
|
+
entryValue = entry.value
|
|
109
|
+
} else {
|
|
110
|
+
// this is needed for typed rdf literals
|
|
111
|
+
entryValue = (entry.value as N3Term).id
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
li.innerText = entry.label ? entry.label : entryValue
|
|
114
|
+
li.dataset.value = entryValue
|
|
115
|
+
parent.appendChild(li)
|
|
116
|
+
if (entry.children?.length) {
|
|
117
|
+
const ul = document.createElement('ul')
|
|
118
|
+
li.appendChild(ul)
|
|
119
|
+
for (const child of entry.children) {
|
|
120
|
+
appendListEntry(child, ul)
|
|
121
|
+
}
|
|
118
122
|
}
|
|
119
|
-
editor.appendChild(option)
|
|
120
123
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
empty.ariaLabel = 'blank'
|
|
125
|
-
editor.prepend(empty)
|
|
124
|
+
|
|
125
|
+
for (const item of listEntries) {
|
|
126
|
+
appendListEntry(item, ul)
|
|
126
127
|
}
|
|
128
|
+
|
|
129
|
+
editor.appendChild(ul)
|
|
127
130
|
if (value) {
|
|
128
131
|
editor.value = value.value
|
|
129
132
|
}
|
|
@@ -142,7 +145,7 @@ export class MaterialTheme extends Theme {
|
|
|
142
145
|
return result
|
|
143
146
|
}
|
|
144
147
|
|
|
145
|
-
createDateEditor(
|
|
148
|
+
createDateEditor(_: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement {
|
|
146
149
|
const editor = new TextField()
|
|
147
150
|
editor.variant = 'outlined'
|
|
148
151
|
editor.helper = template?.description?.value || template?.label || ''
|
package/src/util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Literal, NamedNode, Prefixes, Quad, Store } from 'n3'
|
|
2
|
-
import {
|
|
2
|
+
import { DATA_GRAPH, PREFIX_FOAF, PREFIX_RDFS, PREFIX_SHACL, PREFIX_SKOS, RDFS_PREDICATE_SUBCLASS_OF, RDF_PREDICATE_TYPE, SHAPES_GRAPH } from './constants'
|
|
3
3
|
import { Term } from '@rdfjs/types'
|
|
4
4
|
import { InputListEntry } from './theme'
|
|
5
5
|
import { ShaclPropertyTemplate } from './property-template'
|
|
@@ -48,17 +48,15 @@ export function focusFirstInputElement(context: HTMLElement) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function findLabel(quads: Quad[], languages: string[]): string {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
return findObjectValueByPredicate(quads, 'label', PREFIX_RDFS, languages)
|
|
51
|
+
return findObjectValueByPredicate(quads, 'prefLabel', PREFIX_SKOS, languages) ||
|
|
52
|
+
findObjectValueByPredicate(quads, 'label', PREFIX_RDFS, languages) ||
|
|
53
|
+
findObjectValueByPredicate(quads, 'name', PREFIX_FOAF, languages)
|
|
56
54
|
}
|
|
57
55
|
|
|
58
|
-
export function createInputListEntries(subjects: Term[], shapesGraph: Store, languages: string[]
|
|
56
|
+
export function createInputListEntries(subjects: Term[], shapesGraph: Store, languages: string[]): InputListEntry[] {
|
|
59
57
|
const entries: InputListEntry[] = []
|
|
60
58
|
for (const subject of subjects) {
|
|
61
|
-
entries.push({ value: subject, label: findLabel(shapesGraph.getQuads(subject, null, null, null), languages),
|
|
59
|
+
entries.push({ value: subject, label: findLabel(shapesGraph.getQuads(subject, null, null, null), languages), children: [] })
|
|
62
60
|
}
|
|
63
61
|
return entries
|
|
64
62
|
}
|
|
@@ -84,7 +82,7 @@ function findClassInstancesFromOwlImports(clazz: NamedNode, context: ShaclNode |
|
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
84
|
|
|
87
|
-
export function findInstancesOf(clazz: NamedNode, template: ShaclPropertyTemplate
|
|
85
|
+
export function findInstancesOf(clazz: NamedNode, template: ShaclPropertyTemplate): InputListEntry[] {
|
|
88
86
|
let instances: Term[]
|
|
89
87
|
// if template has sh:in, then just use that as class instances
|
|
90
88
|
if (template.shaclIn) {
|
|
@@ -92,23 +90,31 @@ export function findInstancesOf(clazz: NamedNode, template: ShaclPropertyTemplat
|
|
|
92
90
|
instances = list?.length ? list : []
|
|
93
91
|
} else {
|
|
94
92
|
// find instances in the shapes graph
|
|
95
|
-
instances = template.config.
|
|
93
|
+
instances = template.config.store.getSubjects(RDF_PREDICATE_TYPE, clazz, SHAPES_GRAPH)
|
|
96
94
|
// find instances in the data graph
|
|
97
|
-
instances.push(...template.config.
|
|
95
|
+
instances.push(...template.config.store.getSubjects(RDF_PREDICATE_TYPE, clazz, DATA_GRAPH))
|
|
98
96
|
// find instances in imported taxonomies
|
|
99
|
-
findClassInstancesFromOwlImports(clazz, template, template.config.
|
|
97
|
+
findClassInstancesFromOwlImports(clazz, template, template.config.store, instances)
|
|
100
98
|
}
|
|
101
99
|
|
|
102
|
-
const entries = createInputListEntries(instances, template.config.
|
|
100
|
+
const entries = createInputListEntries(instances, template.config.store, template.config.languages)
|
|
103
101
|
// build inheritance tree only if sh:in is not defined
|
|
104
102
|
if (template.shaclIn === undefined) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
// find sub classes via rdfs:subClassOf
|
|
104
|
+
for (const subClass of template.config.store.getSubjects(RDFS_PREDICATE_SUBCLASS_OF, clazz, null)) {
|
|
105
|
+
const subClassIntances = findInstancesOf(subClass as NamedNode, template)
|
|
106
|
+
for (const subClassIntance of subClassIntances) {
|
|
107
|
+
let isChild = false
|
|
108
|
+
// check if found sub class also is an instance of its super class. if yes, add it to the children of the InputListEntry.
|
|
109
|
+
for (const entry of entries) {
|
|
110
|
+
if (template.config.store.countQuads(subClassIntance.value, RDF_PREDICATE_TYPE, entry.value, null) > 0) {
|
|
111
|
+
entry.children!.push(subClassIntance)
|
|
112
|
+
isChild = true
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (!isChild) {
|
|
116
|
+
entries.push(subClassIntance)
|
|
117
|
+
}
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
120
|
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*!
|
|
6
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*!
|
|
10
|
-
* The buffer module from node.js, for the browser.
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
|
-
|
|
18
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A JavaScript implementation of the JSON-LD API.
|
|
22
|
-
*
|
|
23
|
-
* @author Dave Longley
|
|
24
|
-
*
|
|
25
|
-
* @license BSD 3-Clause License
|
|
26
|
-
* Copyright (c) 2011-2022 Digital Bazaar, Inc.
|
|
27
|
-
* All rights reserved.
|
|
28
|
-
*
|
|
29
|
-
* Redistribution and use in source and binary forms, with or without
|
|
30
|
-
* modification, are permitted provided that the following conditions are met:
|
|
31
|
-
*
|
|
32
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
33
|
-
* this list of conditions and the following disclaimer.
|
|
34
|
-
*
|
|
35
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
36
|
-
* notice, this list of conditions and the following disclaimer in the
|
|
37
|
-
* documentation and/or other materials provided with the distribution.
|
|
38
|
-
*
|
|
39
|
-
* Neither the name of the Digital Bazaar, Inc. nor the names of its
|
|
40
|
-
* contributors may be used to endorse or promote products derived from
|
|
41
|
-
* this software without specific prior written permission.
|
|
42
|
-
*
|
|
43
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
44
|
-
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
45
|
-
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
46
|
-
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
47
|
-
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
48
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
49
|
-
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
50
|
-
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
51
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
52
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
53
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Removes the @preserve keywords from expanded result of framing.
|
|
58
|
-
*
|
|
59
|
-
* @param input the framed, framed output.
|
|
60
|
-
* @param options the framing options used.
|
|
61
|
-
*
|
|
62
|
-
* @return the resulting output.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
// disallow aliasing @context and @preserve
|
|
66
|
-
|
|
67
|
-
// remove @preserve
|
|
68
|
-
|
|
69
|
-
// remove @preserve from results
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*!
|
|
6
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*!
|
|
10
|
-
* The buffer module from node.js, for the browser.
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
|
-
|
|
18
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A JavaScript implementation of the JSON-LD API.
|
|
22
|
-
*
|
|
23
|
-
* @author Dave Longley
|
|
24
|
-
*
|
|
25
|
-
* @license BSD 3-Clause License
|
|
26
|
-
* Copyright (c) 2011-2022 Digital Bazaar, Inc.
|
|
27
|
-
* All rights reserved.
|
|
28
|
-
*
|
|
29
|
-
* Redistribution and use in source and binary forms, with or without
|
|
30
|
-
* modification, are permitted provided that the following conditions are met:
|
|
31
|
-
*
|
|
32
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
33
|
-
* this list of conditions and the following disclaimer.
|
|
34
|
-
*
|
|
35
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
36
|
-
* notice, this list of conditions and the following disclaimer in the
|
|
37
|
-
* documentation and/or other materials provided with the distribution.
|
|
38
|
-
*
|
|
39
|
-
* Neither the name of the Digital Bazaar, Inc. nor the names of its
|
|
40
|
-
* contributors may be used to endorse or promote products derived from
|
|
41
|
-
* this software without specific prior written permission.
|
|
42
|
-
*
|
|
43
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
44
|
-
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
45
|
-
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
46
|
-
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
47
|
-
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
48
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
49
|
-
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
50
|
-
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
51
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
52
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
53
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Removes the @preserve keywords from expanded result of framing.
|
|
58
|
-
*
|
|
59
|
-
* @param input the framed, framed output.
|
|
60
|
-
* @param options the framing options used.
|
|
61
|
-
*
|
|
62
|
-
* @return the resulting output.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
// disallow aliasing @context and @preserve
|
|
66
|
-
|
|
67
|
-
// remove @preserve
|
|
68
|
-
|
|
69
|
-
// remove @preserve from results
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*!
|
|
6
|
-
* Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*!
|
|
10
|
-
* The buffer module from node.js, for the browser.
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
17
|
-
|
|
18
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A JavaScript implementation of the JSON-LD API.
|
|
22
|
-
*
|
|
23
|
-
* @author Dave Longley
|
|
24
|
-
*
|
|
25
|
-
* @license BSD 3-Clause License
|
|
26
|
-
* Copyright (c) 2011-2022 Digital Bazaar, Inc.
|
|
27
|
-
* All rights reserved.
|
|
28
|
-
*
|
|
29
|
-
* Redistribution and use in source and binary forms, with or without
|
|
30
|
-
* modification, are permitted provided that the following conditions are met:
|
|
31
|
-
*
|
|
32
|
-
* Redistributions of source code must retain the above copyright notice,
|
|
33
|
-
* this list of conditions and the following disclaimer.
|
|
34
|
-
*
|
|
35
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
36
|
-
* notice, this list of conditions and the following disclaimer in the
|
|
37
|
-
* documentation and/or other materials provided with the distribution.
|
|
38
|
-
*
|
|
39
|
-
* Neither the name of the Digital Bazaar, Inc. nor the names of its
|
|
40
|
-
* contributors may be used to endorse or promote products derived from
|
|
41
|
-
* this software without specific prior written permission.
|
|
42
|
-
*
|
|
43
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
44
|
-
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
45
|
-
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
|
46
|
-
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
47
|
-
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
48
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
49
|
-
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
50
|
-
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
51
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
52
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
53
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Removes the @preserve keywords from expanded result of framing.
|
|
58
|
-
*
|
|
59
|
-
* @param input the framed, framed output.
|
|
60
|
-
* @param options the framing options used.
|
|
61
|
-
*
|
|
62
|
-
* @return the resulting output.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
// disallow aliasing @context and @preserve
|
|
66
|
-
|
|
67
|
-
// remove @preserve
|
|
68
|
-
|
|
69
|
-
// remove @preserve from results
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class e{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 t extends e{constructor(e,t,i){super(e),this.onChange=t,this.fileType=i}createEditor(e){var t;const i=void 0!==e.minCount&&e.minCount>0,r=e.config.theme.createFileEditor(e.label,null,i,e);return r.addEventListener("change",(e=>{e.stopPropagation(),this.onChange(e)})),this.fileType&&(null===(t=r.querySelector('input[type="file"]'))||void 0===t||t.setAttribute("accept",this.fileType)),r}}export{t as FileUploadPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class e{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 t extends e{constructor(e,t){super(e),this.entries=t}createEditor(e,t){const r=void 0!==e.minCount&&e.minCount>0;return e.config.theme.createListEditor(e.label,t||null,r,this.entries,e)}}export{t as FixedListPlugin};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* martinez v0.7.4
|
|
5
|
-
* Martinez polygon clipping algorithm, does boolean operation on polygons (multipolygons, polygons with holes etc): intersection, union, difference, xor
|
|
6
|
-
*
|
|
7
|
-
* @author Alex Milevski <info@w8r.name>
|
|
8
|
-
* @license MIT
|
|
9
|
-
* @preserve
|
|
10
|
-
*/
|