@eox/feedback 1.1.0 → 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.
- package/dist/eox-feedback.js +1845 -1814
- package/dist/eox-feedback.umd.cjs +44 -43
- package/dist/material-symbols-outlined.woff2 +0 -0
- package/dist/material-symbols-rounded.woff2 +0 -0
- package/dist/material-symbols-sharp.woff2 +0 -0
- package/dist/material-symbols-subset.woff2 +0 -0
- package/package.json +2 -2
- package/src/feedback-button.js +8 -2
- package/src/main.js +83 -14
- package/types/drawtools/src/main.d.ts +33 -7
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/index.d.ts +1 -0
- package/types/drawtools/src/methods/draw/init-layer.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/init-measuring.d.ts +10 -0
- package/types/drawtools/src/methods/draw/init-measuring.d.ts.map +1 -0
- package/types/feedback/src/feedback-button.d.ts +9 -3
- package/types/feedback/src/feedback-button.d.ts.map +1 -1
- package/types/feedback/src/main.d.ts +69 -22
- package/types/feedback/src/main.d.ts.map +1 -1
- package/types/jsonform/src/custom-inputs/ace-custom/createMarkdownToolbar.d.ts +2 -0
- package/types/jsonform/src/custom-inputs/ace-custom/createMarkdownToolbar.d.ts.map +1 -0
- package/types/jsonform/src/custom-inputs/ace-custom/index.d.ts +2 -0
- package/types/jsonform/src/custom-inputs/ace-custom/index.d.ts.map +1 -0
- package/types/jsonform/src/custom-inputs/ace-custom.d.ts +8 -0
- package/types/jsonform/src/custom-inputs/ace-custom.d.ts.map +1 -0
- package/types/jsonform/src/custom-inputs/binarycheckbox.d.ts +15 -0
- package/types/jsonform/src/custom-inputs/binarycheckbox.d.ts.map +1 -0
- package/types/jsonform/src/custom-inputs/index.d.ts.map +1 -1
- package/types/jsonform/src/helpers/editor.d.ts.map +1 -1
- package/types/jsonform/src/style.eox.d.ts.map +1 -1
- package/types/map/src/controls/GlobeSwitcher.d.ts +19 -0
- package/types/map/src/controls/GlobeSwitcher.d.ts.map +1 -0
- package/types/map/src/controls/controls.d.ts +1 -2
- package/types/map/src/controls/controls.d.ts.map +1 -1
- package/types/map/src/controls/geo-location.d.ts +14 -4
- package/types/map/src/controls/geo-location.d.ts.map +1 -1
- package/types/map/src/custom/sources/Cluster.d.ts +6 -2
- package/types/map/src/custom/sources/Cluster.d.ts.map +1 -1
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts +4 -2
- package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +1 -1
- package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +1 -1
- package/types/map/src/helpers/cluster-explode.d.ts +5 -1
- package/types/map/src/helpers/cluster-explode.d.ts.map +1 -1
- package/types/map/src/helpers/generate.d.ts.map +1 -1
- package/types/map/src/helpers/layer.d.ts +3 -1
- package/types/map/src/helpers/layer.d.ts.map +1 -1
- package/types/map/src/helpers/select.d.ts +5 -1
- package/types/map/src/helpers/select.d.ts.map +1 -1
- package/types/map/src/layers.d.ts +2 -1
- package/types/map/src/layers.d.ts.map +1 -1
- package/types/map/src/main.d.ts +24 -2
- package/types/map/src/main.d.ts.map +1 -1
- package/types/map/src/methods/map/index.d.ts +1 -1
- package/types/map/src/methods/map/setters.d.ts +1 -0
- package/types/map/src/methods/map/setters.d.ts.map +1 -1
- package/types/map/src/plugins/globe/openglobus.d.ts +9 -0
- package/types/map/src/plugins/globe/openglobus.d.ts.map +1 -1
- package/types/map/src/types.d.ts +16 -1
- package/types/map/src/types.d.ts.map +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/feedback",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@eox/elements-utils": "^1.1.0",
|
|
14
|
-
"@eox/ui": "^
|
|
14
|
+
"@eox/ui": "^1.1.0",
|
|
15
15
|
"region-screenshot-js": "^1.1.0"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
package/src/feedback-button.js
CHANGED
|
@@ -25,10 +25,16 @@ export class EOxFeedbackButton extends HTMLElement {
|
|
|
25
25
|
this._schema = null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* @returns {import("@eox/jsonform").JsonSchema|null}
|
|
30
|
+
*/
|
|
28
31
|
get schema() {
|
|
29
32
|
return this._schema;
|
|
30
33
|
}
|
|
31
34
|
|
|
35
|
+
/**
|
|
36
|
+
* @param {import("@eox/jsonform").JsonSchema|null} newSchema
|
|
37
|
+
*/
|
|
32
38
|
set schema(newSchema) {
|
|
33
39
|
this._schema = newSchema;
|
|
34
40
|
if (this.modal) {
|
|
@@ -83,8 +89,8 @@ export class EOxFeedbackButton extends HTMLElement {
|
|
|
83
89
|
${style}
|
|
84
90
|
${this.getAttribute("unstyled") === null && styleEOX}
|
|
85
91
|
:host {
|
|
86
|
-
position: fixed
|
|
87
|
-
margin: 0px 20px
|
|
92
|
+
position: fixed;
|
|
93
|
+
margin: 0px 20px;
|
|
88
94
|
${this.position.includes("top") ? "top: 0px;" : ""}
|
|
89
95
|
${this.position.includes("right") ? "right: 0px;" : ""}
|
|
90
96
|
${this.position.includes("bottom") ? "bottom: 0px;" : ""}
|
package/src/main.js
CHANGED
|
@@ -4,13 +4,36 @@ import { styleEOX } from "./style.eox";
|
|
|
4
4
|
import "./feedback-button.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The `eox-feedback` element provides a modal dialog for collecting user feedback.
|
|
8
|
-
*
|
|
7
|
+
* The `eox-feedback` element provides a modal dialog for collecting user feedback.
|
|
8
|
+
* It supports screenshot capture, customizable endpoint, and flexible styling.
|
|
9
|
+
* The feedback modal (`<eox-feedback></eox-feedback>`) can be included in the DOM
|
|
10
|
+
* directly or via a floating button (`<eox-feedback-button></eox-feedback-button>`),
|
|
11
|
+
* which can be positioned in any corner of the viewport.
|
|
12
|
+
*
|
|
13
|
+
* On submit, the element sends a `POST` request with `FormData` to the configured
|
|
14
|
+
* `endpoint`. The payload includes the feedback message (or custom form fields when
|
|
15
|
+
* using a `schema`), the current page URL, the browser's user agent, screen resolution and optionally
|
|
16
|
+
* a screenshot file. This makes it straightforward to connect to any backend — for
|
|
17
|
+
* example a service that creates issues in a Git platform (GitLab, GitHub, …), sends
|
|
18
|
+
* notifications, or stores feedback in a database.
|
|
19
|
+
*
|
|
20
|
+
* The backend only needs to accept a `multipart/form-data` POST request, extract the
|
|
21
|
+
* fields and the optional file attachment, and then forward them to whatever system
|
|
22
|
+
* you use for tracking or processing feedback. Because all authentication and API
|
|
23
|
+
* tokens live on the server side, the browser never sees sensitive credentials.
|
|
24
|
+
* Typical backend responsibilities include input sanitization, CORS configuration to
|
|
25
|
+
* restrict which origins may submit feedback, and mapping the received fields into the
|
|
26
|
+
* format expected by the target system (e.g. composing an issue title and body, or
|
|
27
|
+
* building an email).
|
|
9
28
|
*
|
|
10
29
|
* @element eox-feedback
|
|
11
30
|
*
|
|
12
31
|
* @attr {string} endpoint - The endpoint to send the feedback to as POST message.
|
|
13
|
-
* @attr {string
|
|
32
|
+
* @attr {string} unstyled - If provided, the element will not be styled with EOX styles.
|
|
33
|
+
*
|
|
34
|
+
* @property {string} endpoint - The endpoint to send the feedback to as POST message.
|
|
35
|
+
* @property {string} unstyled - If provided, the element will not be styled with EOX styles.
|
|
36
|
+
* @property {import("@eox/jsonform").JsonSchema} schema - The JSON schema for the feedback form (option). Requires `eox-jsonform` to be imported.
|
|
14
37
|
*
|
|
15
38
|
* @fires close - The modal was closed.
|
|
16
39
|
* @fires submit - The feedback was submitted. The `CustomEvent.detail` contains the FormData object.
|
|
@@ -22,38 +45,72 @@ export class EOxFeedback extends HTMLElement {
|
|
|
22
45
|
super();
|
|
23
46
|
this.attachShadow({ mode: "open" });
|
|
24
47
|
|
|
48
|
+
/** @private */
|
|
25
49
|
this.includeScreenshot = null;
|
|
50
|
+
/** @private */
|
|
26
51
|
this.areaSelection = null;
|
|
27
52
|
|
|
53
|
+
/** @private */
|
|
28
54
|
this.regionScreenshot = null;
|
|
29
55
|
|
|
56
|
+
/** @private */
|
|
30
57
|
this.screenShotFile = null;
|
|
31
58
|
|
|
32
|
-
|
|
59
|
+
/** @private */
|
|
60
|
+
this._endpoint = null;
|
|
33
61
|
|
|
62
|
+
/** @private */
|
|
34
63
|
this._schema = null;
|
|
35
64
|
|
|
65
|
+
/** @private */
|
|
36
66
|
this._submitted = false;
|
|
37
67
|
}
|
|
38
68
|
|
|
69
|
+
/**
|
|
70
|
+
* @returns {string}
|
|
71
|
+
*/
|
|
72
|
+
get endpoint() {
|
|
73
|
+
return this._endpoint;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @param {string} val
|
|
78
|
+
*/
|
|
79
|
+
set endpoint(val) {
|
|
80
|
+
this._endpoint = val;
|
|
81
|
+
if (val && this.getAttribute("endpoint") !== val) {
|
|
82
|
+
this.setAttribute("endpoint", val);
|
|
83
|
+
}
|
|
84
|
+
this.render();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @returns {import("@eox/jsonform").JsonSchema|null}
|
|
89
|
+
*/
|
|
39
90
|
get schema() {
|
|
40
91
|
return this._schema;
|
|
41
92
|
}
|
|
42
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @param {import("@eox/jsonform").JsonSchema|null} newSchema
|
|
96
|
+
*/
|
|
43
97
|
set schema(newSchema) {
|
|
44
98
|
this._schema = newSchema;
|
|
45
99
|
this.render();
|
|
46
100
|
}
|
|
47
101
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
102
|
+
attributeChangedCallback(name, oldVal, newVal) {
|
|
103
|
+
if (oldVal === newVal) return;
|
|
104
|
+
if (name === "endpoint" && this.endpoint !== newVal) {
|
|
105
|
+
this.endpoint = newVal;
|
|
106
|
+
} else if (name === "unstyled") {
|
|
107
|
+
this.render();
|
|
108
|
+
}
|
|
53
109
|
}
|
|
54
110
|
|
|
55
111
|
connectedCallback() {
|
|
56
112
|
this.endpoint =
|
|
113
|
+
this.endpoint ||
|
|
57
114
|
this.getAttribute("endpoint") ||
|
|
58
115
|
document.querySelector("eox-feedback-button")?.getAttribute("endpoint");
|
|
59
116
|
|
|
@@ -105,6 +162,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
105
162
|
document.removeEventListener("keyup", (e) => this.onKeyboardInput(e));
|
|
106
163
|
}
|
|
107
164
|
|
|
165
|
+
/** @private */
|
|
108
166
|
onKeyboardInput(e) {
|
|
109
167
|
if (e.keyCode === 27) {
|
|
110
168
|
this.onCancel();
|
|
@@ -117,6 +175,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
117
175
|
}
|
|
118
176
|
}
|
|
119
177
|
|
|
178
|
+
/** @private */
|
|
120
179
|
onTextareaInput() {
|
|
121
180
|
const submitButton = this.shadowRoot.querySelector("button#submit");
|
|
122
181
|
const textarea = this.shadowRoot.querySelector("textarea#message");
|
|
@@ -127,10 +186,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
127
186
|
}
|
|
128
187
|
}
|
|
129
188
|
|
|
130
|
-
|
|
131
|
-
this.areaSelection = e.detail;
|
|
132
|
-
}
|
|
133
|
-
|
|
189
|
+
/** @private */
|
|
134
190
|
onJsonFormChange() {
|
|
135
191
|
/** @type {import("@eox/jsonform").EOxJSONForm} */
|
|
136
192
|
const jsonForm = this.shadowRoot.querySelector("eox-jsonform");
|
|
@@ -145,6 +201,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
145
201
|
}
|
|
146
202
|
}
|
|
147
203
|
|
|
204
|
+
/** @private */
|
|
148
205
|
async onToggleScreenshot(e) {
|
|
149
206
|
this.includeScreenshot = e.target.checked;
|
|
150
207
|
|
|
@@ -167,10 +224,12 @@ export class EOxFeedback extends HTMLElement {
|
|
|
167
224
|
const submitButton = this.shadowRoot.querySelector("button#submit");
|
|
168
225
|
submitButton.classList.add("disabled");
|
|
169
226
|
|
|
227
|
+
this.classList.add("hidden");
|
|
170
228
|
this.regionScreenshot = new RegionScreenshot();
|
|
171
229
|
|
|
172
230
|
["closed", "errorCreated", "screenshotDownload"].forEach((event) => {
|
|
173
231
|
this.regionScreenshot.on(event, () => {
|
|
232
|
+
this.classList.remove("hidden");
|
|
174
233
|
const checkbox = this.shadowRoot.querySelector("input[type=checkbox]");
|
|
175
234
|
if (!(checkbox instanceof HTMLInputElement)) return;
|
|
176
235
|
checkbox.checked = false;
|
|
@@ -191,6 +250,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
191
250
|
});
|
|
192
251
|
|
|
193
252
|
this.regionScreenshot.on("screenshotGenerated", (dataUrl) => {
|
|
253
|
+
this.classList.remove("hidden");
|
|
194
254
|
const screenshot = document.createElement("img");
|
|
195
255
|
screenshot.src = dataUrl;
|
|
196
256
|
screenshot.classList.add("border");
|
|
@@ -212,6 +272,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
212
272
|
});
|
|
213
273
|
}
|
|
214
274
|
|
|
275
|
+
/** @private */
|
|
215
276
|
async onSubmit() {
|
|
216
277
|
const container = this.shadowRoot.querySelector("article > div");
|
|
217
278
|
const form = this.shadowRoot.querySelector("#form");
|
|
@@ -263,6 +324,11 @@ export class EOxFeedback extends HTMLElement {
|
|
|
263
324
|
|
|
264
325
|
requestBody.append("location", window.location.href);
|
|
265
326
|
|
|
327
|
+
requestBody.append(
|
|
328
|
+
"screenResolution",
|
|
329
|
+
`width: ${window.innerWidth}px | height: ${window.innerHeight}px`,
|
|
330
|
+
);
|
|
331
|
+
|
|
266
332
|
if (!this.endpoint) {
|
|
267
333
|
throw new Error("No endpoint attribute defined!");
|
|
268
334
|
}
|
|
@@ -293,6 +359,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
293
359
|
}, 4000);
|
|
294
360
|
}
|
|
295
361
|
|
|
362
|
+
/** @private */
|
|
296
363
|
onCancel() {
|
|
297
364
|
if (this.regionScreenshot) {
|
|
298
365
|
this.regionScreenshot.close();
|
|
@@ -301,6 +368,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
301
368
|
this.dispatchEvent(new Event("close"));
|
|
302
369
|
}
|
|
303
370
|
|
|
371
|
+
/** @private */
|
|
304
372
|
render() {
|
|
305
373
|
/**
|
|
306
374
|
* @type {import("./feedback-button").EOxFeedbackButton}
|
|
@@ -323,7 +391,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
323
391
|
}
|
|
324
392
|
} else {
|
|
325
393
|
formContent = `
|
|
326
|
-
<div class="field
|
|
394
|
+
<div class="field border">
|
|
327
395
|
<textarea id="message" placeholder="${
|
|
328
396
|
!this.endpoint
|
|
329
397
|
? "Missing endpoint attribute!"
|
|
@@ -354,6 +422,7 @@ export class EOxFeedback extends HTMLElement {
|
|
|
354
422
|
}
|
|
355
423
|
z-index: 10000;
|
|
356
424
|
}
|
|
425
|
+
:host(.hidden),
|
|
357
426
|
.hidden {
|
|
358
427
|
display: none !important;
|
|
359
428
|
}
|
|
@@ -72,6 +72,9 @@ export class EOxDrawTools extends LitElement {
|
|
|
72
72
|
attribute: string;
|
|
73
73
|
type: BooleanConstructor;
|
|
74
74
|
};
|
|
75
|
+
measure: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
};
|
|
75
78
|
importFeatures: {
|
|
76
79
|
attribute: string;
|
|
77
80
|
type: BooleanConstructor;
|
|
@@ -132,11 +135,6 @@ export class EOxDrawTools extends LitElement {
|
|
|
132
135
|
*/
|
|
133
136
|
set layerId(value: string);
|
|
134
137
|
get layerId(): string;
|
|
135
|
-
/**
|
|
136
|
-
* The array of drawn native OpenLayers features. Normally includes only one feature, until multiple feature drawing is enabled.
|
|
137
|
-
* @type Array<import("ol").Feature>
|
|
138
|
-
*/
|
|
139
|
-
drawnFeatures: Array<import("ol").Feature>;
|
|
140
138
|
/**
|
|
141
139
|
* The display name of drawn features, shown e.g. in the feature list.
|
|
142
140
|
*/
|
|
@@ -167,6 +165,13 @@ export class EOxDrawTools extends LitElement {
|
|
|
167
165
|
* Allow adding more than one feature at a time
|
|
168
166
|
*/
|
|
169
167
|
multipleFeatures: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Display area/line measurement for the drawn features.
|
|
170
|
+
* When enabled, a "measure" property is added to each drawn feature's properties,
|
|
171
|
+
* containing the calculated area (for Polygons and Circles) or length (for LineStrings).
|
|
172
|
+
* This measurement is also displayed as a text label on the map using OpenLayers flat styles.
|
|
173
|
+
*/
|
|
174
|
+
measure: boolean;
|
|
170
175
|
/**
|
|
171
176
|
* Allow import features using drag-drop and upload button
|
|
172
177
|
*/
|
|
@@ -216,6 +221,22 @@ export class EOxDrawTools extends LitElement {
|
|
|
216
221
|
*/
|
|
217
222
|
set continuous(value: boolean);
|
|
218
223
|
get continuous(): boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Used internally to update the drawnFeatures state without overwriting the map layer source.
|
|
226
|
+
* @param {Array<import("ol").Feature>} features
|
|
227
|
+
*/
|
|
228
|
+
setDrawnFeaturesInternal(features: Array<import("ol").Feature>): void;
|
|
229
|
+
/**
|
|
230
|
+
* The array of drawn native OpenLayers features. Normally includes only one feature, until multiple feature drawing is enabled.
|
|
231
|
+
* Pass features to be drawn on the map by setting this property. The features should be in the same projection as the map, or a projection should be specified via the `projection` property for proper transformation.
|
|
232
|
+
* @type {Array<import("ol").Feature>}
|
|
233
|
+
*/
|
|
234
|
+
set drawnFeatures(features: import("ol").Feature<import("ol/geom").Geometry, {
|
|
235
|
+
[x: string]: any;
|
|
236
|
+
}>[]);
|
|
237
|
+
get drawnFeatures(): import("ol").Feature<import("ol/geom").Geometry, {
|
|
238
|
+
[x: string]: any;
|
|
239
|
+
}>[];
|
|
219
240
|
/**
|
|
220
241
|
* @onClick Event handler triggered to start drawing on the map.
|
|
221
242
|
*/
|
|
@@ -252,9 +273,8 @@ export class EOxDrawTools extends LitElement {
|
|
|
252
273
|
/**
|
|
253
274
|
* initializes the EOxMap and OlMap instances
|
|
254
275
|
* And stores them in the private properties #eoxMap and #olMap, respectively.
|
|
255
|
-
* It then calls requestUpdate to trigger a re-render.
|
|
256
276
|
*/
|
|
257
|
-
|
|
277
|
+
updateLayer(): void;
|
|
258
278
|
resetLayer: (EoxDrawTool: import("./main").EOxDrawTools) => void;
|
|
259
279
|
set eoxMap(value: import("@eox/map").EOxMap);
|
|
260
280
|
/**
|
|
@@ -262,6 +282,12 @@ export class EOxDrawTools extends LitElement {
|
|
|
262
282
|
* @type {import("@eox/map").EOxMap}
|
|
263
283
|
*/
|
|
264
284
|
get eoxMap(): import("@eox/map").EOxMap;
|
|
285
|
+
/**
|
|
286
|
+
* initializes the EOxMap and OlMap instances
|
|
287
|
+
* And stores them in the private properties #eoxMap and #olMap, respectively.
|
|
288
|
+
* It then calls requestUpdate to trigger a re-render.
|
|
289
|
+
*/
|
|
290
|
+
firstUpdated(): void;
|
|
265
291
|
updated(changedProperties: any): void;
|
|
266
292
|
render(): import("lit-html").TemplateResult<1>;
|
|
267
293
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../drawtools/src/main.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAEE
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../drawtools/src/main.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBC;IAuCC;;OAEG;IACH,qBAAwB;IAExB;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;OAEG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,MAFS,OAAO,gBAAgB,EAAE,IAAI,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhF;IAEhB;;;OAGG;IAEH,WAHS,OAAO,iBAAiB,EAAE,OAAO,CAGrB;IA6JvB;;;OAGG;IACH,2BAGC;IAED,sBAEC;IAjKC;;OAEG;IACH,oBAA4B;IAE5B;;OAEG;IACH,oBAA0B;IAE1B;;;;;;;OAOG;IACH,eANU;QACP,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;QAC7C,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;QAC7C,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;KAC5C,GAAG,IAAI,CAEc;IAEzB;;;OAGG;IACH,QAFS,OAAO,gBAAgB,EAAE,MAAM,CAEtB;IAElB;;OAEG;IACH,0BAA6B;IAE7B;;;;;OAKG;IACH,iBAAoB;IAEpB;;OAEG;IACH,wBAA2B;IAE3B;;OAEG;IACH,oBAAuB;IAEvB;;OAEG;IACH,kBAAqB;IACrB;;OAEG;IACH,mBAA6B;IAE7B;;;OAGG;IACH,MAFU,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAE1C;IAErB;;OAEG;IACH,iBAFU,UAAU,CAAC,cAAc,sCAAsC,EAAE,OAAO,CAAC,CAExD;IAE3B;;;;;OAKG;IACH,QAFU,SAAS,GAAE,SAAS,GAAG,KAAK,CAEf;IAEvB;;OAEG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAGvB;;;;OAIG;IACH,+BAGC;IAED,0BAEC;IAED;;;OAGG;IACH,mCAFW,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,QAMrC;IAED;;;;OAIG;IACH;;UAyBC;IAED;;SAEC;IAeD;;OAEG;IACH,qBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,0BAJW,MAAM,oBACN,OAAO,YACP,OAAO,QAUjB;IAED;;OAEG;IACH,uBAFW,SAAS,IAAG,UAAU,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA,QAI/D;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,sBAMC;IAED;;OAEG;IACH,0BAaC;IASD;;;OAGG;IACH,oBAWC;IAHC,iEAAuB;IAgDzB,kBANU,OAAO,UAAU,EAAE,MAAM,EAUlC;IAZD;;;OAGG;IACH,cAFU,OAAO,UAAU,EAAE,MAAM,CAIlC;IAzCD;;;;OAIG;IACH,qBAYC;IAED,sCAcC;IA6BD,+CAqDC;;CACF;2BArgByC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-drawn-features.d.ts","sourceRoot":"","sources":["../../../../../../drawtools/src/methods/draw/emit-drawn-features.js"],"names":[],"mappings":";;;;yBAGa,OAAO,IAAI,EAAE,OAAO,EAAE,GAC9B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,aAAa,CAAC;AAHrC;;;;GAIG;AAEH;;;;;GAKG;AACH,sDAHW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"emit-drawn-features.d.ts","sourceRoot":"","sources":["../../../../../../drawtools/src/methods/draw/emit-drawn-features.js"],"names":[],"mappings":";;;;yBAGa,OAAO,IAAI,EAAE,OAAO,EAAE,GAC9B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,aAAa,CAAC;AAHrC;;;;GAIG;AAEH;;;;;GAKG;AACH,sDAHW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,QAqDpC;kCAjEgD,eAAe;8BAAf,eAAe"}
|
|
@@ -6,4 +6,5 @@ export { default as emitDrawnFeaturesMethod } from "./emit-drawn-features";
|
|
|
6
6
|
export { default as createSelectHandler } from "./create-select-handler";
|
|
7
7
|
export { default as initSelection } from "./init-selection";
|
|
8
8
|
export { default as handleLayerId } from "./handle-layer-id";
|
|
9
|
+
export { default as initMeasuring, updateMeasure } from "./init-measuring";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../../../../drawtools/src/methods/draw/init-layer.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../../../../drawtools/src/methods/draw/init-layer.js"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH,8CAHW,OAAO,YAAY,EAAE,YAAY;;;yBAsI/B,OAAO,YAAY,EAAE,YAAY;EAqB7C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function updateMeasure(feature: import("ol").Feature): void;
|
|
2
|
+
export default initMeasuring;
|
|
3
|
+
/**
|
|
4
|
+
* Initializes measuring on the draw layer.
|
|
5
|
+
* Updates the feature property "measure" on geometry change.
|
|
6
|
+
*
|
|
7
|
+
* @param {import("../../main").EOxDrawTools} EoxDrawTool
|
|
8
|
+
*/
|
|
9
|
+
declare function initMeasuring(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
10
|
+
//# sourceMappingURL=init-measuring.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-measuring.d.ts","sourceRoot":"","sources":["../../../../../../drawtools/src/methods/draw/init-measuring.js"],"names":[],"mappings":"AAKO,uCAFI,OAAO,IAAI,EAAE,OAAO,QAoC9B;;AAED;;;;;GAKG;AACH,4CAFW,OAAO,YAAY,EAAE,YAAY,QAqB3C"}
|
|
@@ -9,9 +9,15 @@ export class EOxFeedbackButton extends HTMLElement {
|
|
|
9
9
|
*/
|
|
10
10
|
modal: import("./main").EOxFeedback;
|
|
11
11
|
position: string;
|
|
12
|
-
_schema:
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
_schema: import("@eox/jsonform").JsonSchema;
|
|
13
|
+
/**
|
|
14
|
+
* @param {import("@eox/jsonform").JsonSchema|null} newSchema
|
|
15
|
+
*/
|
|
16
|
+
set schema(newSchema: import("@eox/jsonform").JsonSchema | null);
|
|
17
|
+
/**
|
|
18
|
+
* @returns {import("@eox/jsonform").JsonSchema|null}
|
|
19
|
+
*/
|
|
20
|
+
get schema(): import("@eox/jsonform").JsonSchema | null;
|
|
15
21
|
attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
|
|
16
22
|
connectedCallback(): void;
|
|
17
23
|
disconnectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-button.d.ts","sourceRoot":"","sources":["../../../src/feedback-button.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH;IACE,oCAAqD;IAMnD;;OAEG;IACH,OAFU,OAAO,QAAQ,EAAE,WAAW,CAErB;IAEjB,iBAA2B;IAE3B,
|
|
1
|
+
{"version":3,"file":"feedback-button.d.ts","sourceRoot":"","sources":["../../../src/feedback-button.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH;IACE,oCAAqD;IAMnD;;OAEG;IACH,OAFU,OAAO,QAAQ,EAAE,WAAW,CAErB;IAEjB,iBAA2B;IAE3B,4CAAmB;IAUrB;;OAEG;IACH,sBAFW,OAAO,eAAe,EAAE,UAAU,GAAC,IAAI,EAOjD;IAfD;;OAEG;IACH,cAFa,OAAO,eAAe,EAAE,UAAU,GAAC,IAAI,CAInD;IAYD,wEAOC;IAED,0BAKC;IAED,6BAIC;IAED,sBAiBC;IAED,eAuBC;CACF"}
|
|
@@ -1,39 +1,86 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `eox-feedback` element provides a modal dialog for collecting user feedback.
|
|
3
|
-
*
|
|
2
|
+
* The `eox-feedback` element provides a modal dialog for collecting user feedback.
|
|
3
|
+
* It supports screenshot capture, customizable endpoint, and flexible styling.
|
|
4
|
+
* The feedback modal (`<eox-feedback></eox-feedback>`) can be included in the DOM
|
|
5
|
+
* directly or via a floating button (`<eox-feedback-button></eox-feedback-button>`),
|
|
6
|
+
* which can be positioned in any corner of the viewport.
|
|
7
|
+
*
|
|
8
|
+
* On submit, the element sends a `POST` request with `FormData` to the configured
|
|
9
|
+
* `endpoint`. The payload includes the feedback message (or custom form fields when
|
|
10
|
+
* using a `schema`), the current page URL, the browser's user agent, screen resolution and optionally
|
|
11
|
+
* a screenshot file. This makes it straightforward to connect to any backend — for
|
|
12
|
+
* example a service that creates issues in a Git platform (GitLab, GitHub, …), sends
|
|
13
|
+
* notifications, or stores feedback in a database.
|
|
14
|
+
*
|
|
15
|
+
* The backend only needs to accept a `multipart/form-data` POST request, extract the
|
|
16
|
+
* fields and the optional file attachment, and then forward them to whatever system
|
|
17
|
+
* you use for tracking or processing feedback. Because all authentication and API
|
|
18
|
+
* tokens live on the server side, the browser never sees sensitive credentials.
|
|
19
|
+
* Typical backend responsibilities include input sanitization, CORS configuration to
|
|
20
|
+
* restrict which origins may submit feedback, and mapping the received fields into the
|
|
21
|
+
* format expected by the target system (e.g. composing an issue title and body, or
|
|
22
|
+
* building an email).
|
|
4
23
|
*
|
|
5
24
|
* @element eox-feedback
|
|
6
25
|
*
|
|
7
26
|
* @attr {string} endpoint - The endpoint to send the feedback to as POST message.
|
|
8
|
-
* @attr {string
|
|
27
|
+
* @attr {string} unstyled - If provided, the element will not be styled with EOX styles.
|
|
28
|
+
*
|
|
29
|
+
* @property {string} endpoint - The endpoint to send the feedback to as POST message.
|
|
30
|
+
* @property {string} unstyled - If provided, the element will not be styled with EOX styles.
|
|
31
|
+
* @property {import("@eox/jsonform").JsonSchema} schema - The JSON schema for the feedback form (option). Requires `eox-jsonform` to be imported.
|
|
9
32
|
*
|
|
10
33
|
* @fires close - The modal was closed.
|
|
11
34
|
* @fires submit - The feedback was submitted. The `CustomEvent.detail` contains the FormData object.
|
|
12
35
|
*/
|
|
13
36
|
export class EOxFeedback extends HTMLElement {
|
|
14
37
|
static observedAttributes: string[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
38
|
+
/** @private */
|
|
39
|
+
private includeScreenshot;
|
|
40
|
+
/** @private */
|
|
41
|
+
private areaSelection;
|
|
42
|
+
/** @private */
|
|
43
|
+
private regionScreenshot;
|
|
44
|
+
/** @private */
|
|
45
|
+
private screenShotFile;
|
|
46
|
+
/** @private */
|
|
47
|
+
private _endpoint;
|
|
48
|
+
/** @private */
|
|
49
|
+
private _schema;
|
|
50
|
+
/** @private */
|
|
51
|
+
private _submitted;
|
|
52
|
+
/**
|
|
53
|
+
* @param {string} val
|
|
54
|
+
*/
|
|
55
|
+
set endpoint(val: string);
|
|
56
|
+
/**
|
|
57
|
+
* @returns {string}
|
|
58
|
+
*/
|
|
59
|
+
get endpoint(): string;
|
|
60
|
+
/**
|
|
61
|
+
* @param {import("@eox/jsonform").JsonSchema|null} newSchema
|
|
62
|
+
*/
|
|
63
|
+
set schema(newSchema: import("@eox/jsonform").JsonSchema | null);
|
|
24
64
|
/**
|
|
25
|
-
* @returns {import("@eox/jsonform").
|
|
65
|
+
* @returns {import("@eox/jsonform").JsonSchema|null}
|
|
26
66
|
*/
|
|
27
|
-
get
|
|
67
|
+
get schema(): import("@eox/jsonform").JsonSchema | null;
|
|
68
|
+
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
28
69
|
connectedCallback(): void;
|
|
29
70
|
disconnectedCallback(): void;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
71
|
+
/** @private */
|
|
72
|
+
private onKeyboardInput;
|
|
73
|
+
/** @private */
|
|
74
|
+
private onTextareaInput;
|
|
75
|
+
/** @private */
|
|
76
|
+
private onJsonFormChange;
|
|
77
|
+
/** @private */
|
|
78
|
+
private onToggleScreenshot;
|
|
79
|
+
/** @private */
|
|
80
|
+
private onSubmit;
|
|
81
|
+
/** @private */
|
|
82
|
+
private onCancel;
|
|
83
|
+
/** @private */
|
|
84
|
+
private render;
|
|
38
85
|
}
|
|
39
86
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;IACE,oCAAqD;IAMnD,eAAe;IACf,0BAA6B;IAC7B,eAAe;IACf,sBAAyB;IAEzB,eAAe;IACf,yBAA4B;IAE5B,eAAe;IACf,uBAA0B;IAE1B,eAAe;IACf,kBAAqB;IAErB,eAAe;IACf,gBAAmB;IAEnB,eAAe;IACf,mBAAuB;IAUzB;;OAEG;IACH,kBAFW,MAAM,EAQhB;IAhBD;;OAEG;IACH,gBAFa,MAAM,CAIlB;IAoBD;;OAEG;IACH,sBAFW,OAAO,eAAe,EAAE,UAAU,GAAC,IAAI,EAKjD;IAbD;;OAEG;IACH,cAFa,OAAO,eAAe,EAAE,UAAU,GAAC,IAAI,CAInD;IAUD,oEAOC;IAED,0BA4BC;IAED,6BAsBC;IAED,eAAe;IACf,wBAUC;IAED,eAAe;IACf,wBAQC;IAED,eAAe;IACf,yBAYC;IAED,eAAe;IACf,2BAoEC;IAED,eAAe;IACf,iBAoFC;IAED,eAAe;IACf,iBAMC;IAED,eAAe;IACf,eAyGC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMarkdownToolbar.d.ts","sourceRoot":"","sources":["../../../../../../jsonform/src/custom-inputs/ace-custom/createMarkdownToolbar.js"],"names":[],"mappings":"AAIO,sDAFI,GAAG,QAoJb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../jsonform/src/custom-inputs/ace-custom/index.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ace-custom.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/custom-inputs/ace-custom.js"],"names":[],"mappings":"AAMA;;;GAGG;AACH;IACE,wBAQC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class BinaryCheckboxEditor {
|
|
2
|
+
register(): void;
|
|
3
|
+
unregister(): void;
|
|
4
|
+
build(): void;
|
|
5
|
+
header: any;
|
|
6
|
+
label: any;
|
|
7
|
+
description: any;
|
|
8
|
+
infoButton: any;
|
|
9
|
+
input: HTMLInputElement;
|
|
10
|
+
control: any;
|
|
11
|
+
value: any;
|
|
12
|
+
setValue(value: any): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=binarycheckbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binarycheckbox.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/custom-inputs/binarycheckbox.js"],"names":[],"mappings":"AAEA;IACE,iBAEC;IAED,mBAEC;IAED,cA8CC;IAxCG,YAGC;IAHa,WAGb;IAED,iBAEC;IAED,gBAEC;IAEH,wBAA4C;IAO5C,aAKC;IAUC,WAAuE;IAO3E,2BAIC;IAED,gBAQC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/custom-inputs/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/custom-inputs/index.js"],"names":[],"mappings":"AA8KO,2CAHI;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,uCAuB9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/helpers/editor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../../jsonform/src/helpers/editor.js"],"names":[],"mappings":"AA8cA;;;;;;GAMG;AACH,wCAHW,UAAU,SAAS,GACjB,OAAO,CAAC,UAAU,SAAS,CAAC,CAiBxC;AAhcM,sCAHI,OAAO,SAAS,EAAE,WAAW,GAC3B,UAAU,CA0atB;AAqEM,wCAFE,OAAO,SAAS,EAAE,WAAW,QAYrC;AAsBM,8CAFI,OAAO,SAAS,EAAE,WAAW,QAiGvC;;;;yBA/LY,IAAI,GAAG;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../../../../jsonform/src/style.eox.js"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../../../../jsonform/src/style.eox.js"],"names":[],"mappings":"AAKA,8BAwTE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A control to switch between 2D and 3D views.
|
|
3
|
+
* @param {Object} [opt_options] Control options.
|
|
4
|
+
* @param {import("../main").EOxMap} opt_options.eoxMap
|
|
5
|
+
*/
|
|
6
|
+
export class GlobeSwitcher extends Control {
|
|
7
|
+
/**
|
|
8
|
+
* @param {Object} [options] Control options.
|
|
9
|
+
* @param {import("../main").EOxMap} options.eoxMap
|
|
10
|
+
*/
|
|
11
|
+
constructor(options?: {
|
|
12
|
+
eoxMap: import("../main").EOxMap;
|
|
13
|
+
});
|
|
14
|
+
eoxMap: import("../main").EOxMap;
|
|
15
|
+
button: HTMLButtonElement;
|
|
16
|
+
handleClick(): void;
|
|
17
|
+
}
|
|
18
|
+
import Control from "ol/control/Control";
|
|
19
|
+
//# sourceMappingURL=GlobeSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobeSwitcher.d.ts","sourceRoot":"","sources":["../../../../../map/src/controls/GlobeSwitcher.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH;IACE;;;OAGG;IACH,sBAFG;QAA0C,MAAM,EAAxC,OAAO,SAAS,EAAE,MAAM;KAClC,EAoBA;IAJC,iCAA4B;IAC5B,0BAAoB;IAKtB,oBASC;CACF;oBA/CmB,oBAAoB"}
|