@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.
Files changed (51) hide show
  1. package/README.md +20 -7
  2. package/dist/config.d.ts +4 -5
  3. package/dist/constants.d.ts +13 -13
  4. package/dist/constraints.d.ts +2 -2
  5. package/dist/exports.d.ts +2 -1
  6. package/dist/form-bootstrap.d.ts +1 -1
  7. package/dist/form-bootstrap.js +361 -2
  8. package/dist/form-default.d.ts +1 -1
  9. package/dist/form-default.js +350 -2
  10. package/dist/form-material.d.ts +1 -1
  11. package/dist/form-material.js +670 -2
  12. package/dist/form.d.ts +3 -2
  13. package/dist/node.d.ts +2 -1
  14. package/dist/plugins/leaflet.d.ts +2 -4
  15. package/dist/plugins/leaflet.js +720 -2
  16. package/dist/plugins/mapbox.d.ts +2 -2
  17. package/dist/plugins/mapbox.js +2764 -2
  18. package/dist/property-template.d.ts +1 -1
  19. package/dist/property.d.ts +6 -2
  20. package/dist/theme.d.ts +3 -3
  21. package/dist/themes/default.d.ts +3 -3
  22. package/dist/themes/material.d.ts +2 -3
  23. package/dist/util.d.ts +2 -2
  24. package/package.json +26 -12
  25. package/src/config.ts +11 -10
  26. package/src/constants.ts +3 -3
  27. package/src/constraints.ts +15 -18
  28. package/src/exports.ts +2 -1
  29. package/src/form.ts +32 -17
  30. package/src/group.ts +1 -1
  31. package/src/loader.ts +12 -13
  32. package/src/node.ts +40 -38
  33. package/src/plugins/leaflet.ts +2 -2
  34. package/src/plugins/mapbox.ts +4 -4
  35. package/src/property-template.ts +4 -5
  36. package/src/property.ts +154 -56
  37. package/src/serialize.ts +14 -1
  38. package/src/styles.css +8 -10
  39. package/src/theme.ts +6 -6
  40. package/src/themes/bootstrap.ts +1 -1
  41. package/src/themes/default.css +2 -2
  42. package/src/themes/default.ts +38 -30
  43. package/src/themes/material.ts +37 -34
  44. package/src/util.ts +26 -20
  45. package/dist/form-bootstrap.js.LICENSE.txt +0 -69
  46. package/dist/form-default.js.LICENSE.txt +0 -69
  47. package/dist/form-material.js.LICENSE.txt +0 -69
  48. package/dist/plugins/file-upload.js +0 -1
  49. package/dist/plugins/fixed-list.js +0 -1
  50. package/dist/plugins/leaflet.js.LICENSE.txt +0 -4
  51. 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, indent?: number }
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(root: HTMLFormElement) {
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.shapesGraph.getQuads(name, null, null, null)
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 (template.config.editMode) {
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.shapesGraph, template.config.languages)
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 {
@@ -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 {
@@ -1,4 +1,4 @@
1
1
  .editor:not([type='checkbox']) { border: 1px solid #DDD; padding: 2px 4px; }
2
- .property-instance label { display: inline-block; 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 { 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); }
@@ -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['shaclDatatype'] = template.datatype
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 = document.createElement('select')
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
- let addEmptyOption = true
208
+ const ul = document.createElement('ul')
200
209
 
201
- for (const item of listEntries) {
202
- const option = document.createElement('option')
203
- const itemValue = (typeof item.value === 'string') ? item.value : item.value.value
204
- option.innerHTML = item.label ? item.label : itemValue
205
- option.value = itemValue
206
- if (item.indent) {
207
- for (let i = 0; i < item.indent; i++) {
208
- option.innerHTML = '&#160;&#160;' + option.innerHTML
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
- editor.appendChild(option)
218
- }
219
- if (addEmptyOption) {
220
- // add an empty element
221
- const emptyOption = document.createElement('option')
222
- emptyOption.value = ''
223
- if (!value) {
224
- emptyOption.selected = true
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, primary: boolean): HTMLElement {
242
+ createButton(label: string, _: boolean): HTMLElement {
235
243
  const button = document.createElement('button')
236
244
  button.type = 'button'
237
245
  button.innerHTML = label
@@ -1,11 +1,13 @@
1
1
  import { ShaclPropertyTemplate } from '../property-template'
2
2
  import { Term } from '@rdfjs/types'
3
- import { Button, TextField, Select, MenuItem, Checkbox } from 'mdui'
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['shaclDatatype'] = template.datatype
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 Select()
93
- editor.variant = 'outlined'
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
- // @ts-ignore
98
- const result = this.createDefaultTemplate('', null, required, editor, template)
99
- let addEmptyOption = true
101
+ const result = this.createDefaultTemplate(label, null, required, editor, template)
102
+ const ul = document.createElement('ul')
100
103
 
101
- for (const item of listEntries) {
102
- const option = new MenuItem()
103
- const itemValue = (typeof item.value === 'string') ? item.value : item.value.value
104
- const itemLabel = item.label ? item.label : itemValue
105
- option.value = itemValue
106
- option.textContent = itemLabel || itemValue
107
- // if (value && value.value === itemValue) {
108
- // option.selected = true
109
- // }
110
- if (item.indent) {
111
- for (let i = 0; i < item.indent; i++) {
112
- option.innerHTML = '&#160;&#160;' + 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
- if (itemValue === '') {
116
- addEmptyOption = false
117
- option.ariaLabel = 'blank'
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
- if (addEmptyOption) {
122
- // add an empty element
123
- const empty = new MenuItem()
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(label: string, value: Term | null, required: boolean, template: ShaclPropertyTemplate): HTMLElement {
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 { OWL_OBJECT_NAMED_INDIVIDUAL, PREFIX_RDFS, PREFIX_SHACL, PREFIX_SKOS, RDFS_PREDICATE_SUBCLASS_OF, RDF_PREDICATE_TYPE, SHAPES_GRAPH, SKOS_PREDICATE_BROADER } from './constants'
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
- let label = findObjectValueByPredicate(quads, 'prefLabel', PREFIX_SKOS, languages)
52
- if (label) {
53
- return label
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[], indent?: number): InputListEntry[] {
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), indent: indent })
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, indent = 0): InputListEntry[] {
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.shapesGraph.getSubjects(RDF_PREDICATE_TYPE, clazz, SHAPES_GRAPH)
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.dataGraph.getSubjects(RDF_PREDICATE_TYPE, clazz, null))
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.shapesGraph, instances)
97
+ findClassInstancesFromOwlImports(clazz, template, template.config.store, instances)
100
98
  }
101
99
 
102
- const entries = createInputListEntries(instances, template.config.shapesGraph, template.config.languages, indent)
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
- for (const subClass of template.config.shapesGraph.getSubjects(RDFS_PREDICATE_SUBCLASS_OF, clazz, null)) {
106
- entries.push(...findInstancesOf(subClass as NamedNode, template, indent + 1))
107
- }
108
- if (template.config.shapesGraph.getQuads(clazz, RDF_PREDICATE_TYPE, OWL_OBJECT_NAMED_INDIVIDUAL, null).length > 0) {
109
- entries.push(...createInputListEntries([ clazz ], template.config.shapesGraph, template.config.languages, indent))
110
- for (const subClass of template.config.shapesGraph.getSubjects(SKOS_PREDICATE_BROADER, clazz, null)) {
111
- entries.push(...findInstancesOf(subClass as NamedNode, template, indent + 1))
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,4 +0,0 @@
1
- /* @preserve
2
- * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3
- * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
- */
@@ -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
- */