@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,137 @@
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
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
19
+
20
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
21
+
22
+ /**
23
+ * @license
24
+ * Copyright 2022 Google LLC
25
+ * SPDX-License-Identifier: Apache-2.0
26
+ */
27
+
28
+ /**
29
+ * @license
30
+ * Copyright 2017 Google LLC
31
+ * SPDX-License-Identifier: BSD-3-Clause
32
+ */
33
+
34
+ /**
35
+ * @license
36
+ * Copyright 2018 Google LLC
37
+ * SPDX-License-Identifier: Apache-2.0
38
+ */
39
+
40
+ /**
41
+ * @license
42
+ * Copyright 2018 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */
45
+
46
+ /**
47
+ * @license
48
+ * Copyright 2019 Google LLC
49
+ * SPDX-License-Identifier: Apache-2.0
50
+ */
51
+
52
+ /**
53
+ * @license
54
+ * Copyright 2020 Google LLC
55
+ * SPDX-License-Identifier: BSD-3-Clause
56
+ */
57
+
58
+ /**
59
+ * @license
60
+ * Copyright 2021 Google LLC
61
+ * SPDX-License-Identifier: Apache-2.0
62
+ */
63
+
64
+ /**
65
+ * @license
66
+ * Copyright 2021 Google LLC
67
+ * SPDX-License-Identifier: BSD-3-Clause
68
+ */
69
+
70
+ /**
71
+ * @license
72
+ * Copyright 2022 Google LLC
73
+ * SPDX-License-Identifier: Apache-2.0
74
+ */
75
+
76
+ /**
77
+ * @license
78
+ * Copyright 2022 Google LLC
79
+ * SPDX-License-Identifier: BSD-3-Clause
80
+ */
81
+
82
+ /**
83
+ * @license
84
+ * Copyright 2023 Google LLC
85
+ * SPDX-License-Identifier: Apache-2.0
86
+ */
87
+
88
+ /**
89
+ * A JavaScript implementation of the JSON-LD API.
90
+ *
91
+ * @author Dave Longley
92
+ *
93
+ * @license BSD 3-Clause License
94
+ * Copyright (c) 2011-2022 Digital Bazaar, Inc.
95
+ * All rights reserved.
96
+ *
97
+ * Redistribution and use in source and binary forms, with or without
98
+ * modification, are permitted provided that the following conditions are met:
99
+ *
100
+ * Redistributions of source code must retain the above copyright notice,
101
+ * this list of conditions and the following disclaimer.
102
+ *
103
+ * Redistributions in binary form must reproduce the above copyright
104
+ * notice, this list of conditions and the following disclaimer in the
105
+ * documentation and/or other materials provided with the distribution.
106
+ *
107
+ * Neither the name of the Digital Bazaar, Inc. nor the names of its
108
+ * contributors may be used to endorse or promote products derived from
109
+ * this software without specific prior written permission.
110
+ *
111
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
112
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
113
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
114
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
115
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
116
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
117
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
118
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
119
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
120
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
121
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
122
+ */
123
+
124
+ /**
125
+ * Removes the @preserve keywords from expanded result of framing.
126
+ *
127
+ * @param input the framed, framed output.
128
+ * @param options the framing options used.
129
+ *
130
+ * @return the resulting output.
131
+ */
132
+
133
+ // disallow aliasing @context and @preserve
134
+
135
+ // remove @preserve
136
+
137
+ // remove @preserve from results
package/dist/plugin.d.ts CHANGED
@@ -3,6 +3,7 @@ import { Term } from '@rdfjs/types';
3
3
  export declare class Plugins {
4
4
  private plugins;
5
5
  register(plugin: Plugin): void;
6
+ list(): Plugin[];
6
7
  find(predicate: string | undefined, datatype: string | undefined): Plugin | undefined;
7
8
  }
8
9
  export type PluginOptions = {
@@ -12,7 +13,9 @@ export type PluginOptions = {
12
13
  export declare abstract class Plugin {
13
14
  predicate: string | undefined;
14
15
  datatype: string | undefined;
15
- constructor(options: PluginOptions);
16
- abstract createInstance(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
16
+ stylesheet: CSSStyleSheet | undefined;
17
+ constructor(options: PluginOptions, css?: string);
18
+ abstract createEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
19
+ createViewer(template: ShaclPropertyTemplate, value: Term): HTMLElement;
17
20
  }
18
21
  export type ClassInstanceProvider = (clazz: string) => Promise<string>;
@@ -1,9 +1,9 @@
1
1
  import { Plugin, PluginOptions } from '../plugin';
2
2
  import { Term } from '@rdfjs/types';
3
3
  import { ShaclPropertyTemplate } from '../property-template';
4
- import { InputListEntry } from '../editors';
4
+ import { InputListEntry } from '../theme';
5
5
  export declare class FixedListPlugin extends Plugin {
6
6
  entries: InputListEntry[];
7
7
  constructor(options: PluginOptions, entries: InputListEntry[]);
8
- createInstance(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
8
+ createEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
9
9
  }
@@ -0,0 +1 @@
1
+ var e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{n:()=>i});class r{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 i extends r{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)}}var s=t.n;export{s as FixedListPlugin};
@@ -1,26 +1,19 @@
1
1
  import { Term } from '@rdfjs/types';
2
2
  import { Plugin, PluginOptions } from '../plugin';
3
3
  import { ShaclPropertyTemplate } from '../property-template';
4
- import { Editor } from '../editors';
4
+ import { Editor } from '../theme';
5
5
  import mapboxgl from 'mapbox-gl';
6
6
  import MapboxDraw from '@mapbox/mapbox-gl-draw';
7
- import 'mapbox-gl/dist/mapbox-gl.css';
8
- import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css';
9
7
  export declare class MapBoxPlugin extends Plugin {
10
8
  map: mapboxgl.Map;
11
- dialog: HTMLDialogElement;
12
- currentEditor: Editor | undefined;
13
- currentMarker: mapboxgl.Marker | undefined;
14
9
  draw: MapboxDraw;
10
+ currentEditor: Editor | undefined;
15
11
  constructor(options: PluginOptions, apiKey: string);
16
- createInstance(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
12
+ initEditMode(form: HTMLElement): HTMLDialogElement;
13
+ createEditor(template: ShaclPropertyTemplate, value?: Term): HTMLElement;
14
+ createViewer(template: ShaclPropertyTemplate, value: Term): HTMLElement;
15
+ fitToGeometry(map: any, geometry: any): void;
17
16
  deleteAllButLastDrawing(): void;
18
- getEditorValue(): {
19
- type: string;
20
- coordinates: number[];
21
- } | {
22
- type: string;
23
- coordinates: number[][][];
24
- } | undefined;
25
- setEditorValue(): void;
17
+ wktToGeometry(wkt: string): any;
18
+ geometryToWkt(geometry: any): string;
26
19
  }