@eox/feedback 1.2.0 → 1.3.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.
Files changed (202) hide show
  1. package/dist/eox-feedback.js +4201 -5309
  2. package/dist/eox-feedback.umd.cjs +67 -61
  3. package/package.json +3 -3
  4. package/src/main.js +43 -33
  5. package/types/{feedback/src/enums → enums}/index.d.ts.map +1 -1
  6. package/types/{feedback/src/enums → enums}/test.d.ts.map +1 -1
  7. package/types/{feedback/src/feedback-button.d.ts → feedback-button.d.ts} +3 -3
  8. package/types/feedback-button.d.ts.map +1 -0
  9. package/types/{feedback/src/main.d.ts → main.d.ts} +8 -3
  10. package/types/main.d.ts.map +1 -0
  11. package/types/{feedback/src/style.d.ts.map → style.d.ts.map} +1 -1
  12. package/types/{feedback/src/style.eox.d.ts.map → style.eox.d.ts.map} +1 -1
  13. package/types/drawtools/src/components/controller.d.ts +0 -108
  14. package/types/drawtools/src/components/controller.d.ts.map +0 -1
  15. package/types/drawtools/src/components/list.d.ts +0 -144
  16. package/types/drawtools/src/components/list.d.ts.map +0 -1
  17. package/types/drawtools/src/enums/draw.d.ts +0 -9
  18. package/types/drawtools/src/enums/draw.d.ts.map +0 -1
  19. package/types/drawtools/src/enums/index.d.ts +0 -4
  20. package/types/drawtools/src/enums/index.d.ts.map +0 -1
  21. package/types/drawtools/src/enums/stories.d.ts +0 -26
  22. package/types/drawtools/src/enums/stories.d.ts.map +0 -1
  23. package/types/drawtools/src/enums/test.d.ts +0 -11
  24. package/types/drawtools/src/enums/test.d.ts.map +0 -1
  25. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts +0 -7
  26. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts.map +0 -1
  27. package/types/drawtools/src/helpers/features-to-geojson.d.ts +0 -12
  28. package/types/drawtools/src/helpers/features-to-geojson.d.ts.map +0 -1
  29. package/types/drawtools/src/helpers/features-to-wkt.d.ts +0 -9
  30. package/types/drawtools/src/helpers/features-to-wkt.d.ts.map +0 -1
  31. package/types/drawtools/src/helpers/generate-upload-events.d.ts +0 -19
  32. package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +0 -1
  33. package/types/drawtools/src/helpers/index.d.ts +0 -4
  34. package/types/drawtools/src/helpers/index.d.ts.map +0 -1
  35. package/types/drawtools/src/main.d.ts +0 -296
  36. package/types/drawtools/src/main.d.ts.map +0 -1
  37. package/types/drawtools/src/methods/controller/index.d.ts +0 -2
  38. package/types/drawtools/src/methods/controller/index.d.ts.map +0 -1
  39. package/types/drawtools/src/methods/controller/update-button-states.d.ts +0 -12
  40. package/types/drawtools/src/methods/controller/update-button-states.d.ts.map +0 -1
  41. package/types/drawtools/src/methods/draw/create-select-handler.d.ts +0 -6
  42. package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +0 -1
  43. package/types/drawtools/src/methods/draw/discard-drawing.d.ts +0 -9
  44. package/types/drawtools/src/methods/draw/discard-drawing.d.ts.map +0 -1
  45. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +0 -20
  46. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +0 -1
  47. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts +0 -12
  48. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts.map +0 -1
  49. package/types/drawtools/src/methods/draw/index.d.ts +0 -10
  50. package/types/drawtools/src/methods/draw/index.d.ts.map +0 -1
  51. package/types/drawtools/src/methods/draw/init-layer.d.ts +0 -13
  52. package/types/drawtools/src/methods/draw/init-layer.d.ts.map +0 -1
  53. package/types/drawtools/src/methods/draw/init-measuring.d.ts +0 -10
  54. package/types/drawtools/src/methods/draw/init-measuring.d.ts.map +0 -1
  55. package/types/drawtools/src/methods/draw/init-selection.d.ts +0 -10
  56. package/types/drawtools/src/methods/draw/init-selection.d.ts.map +0 -1
  57. package/types/drawtools/src/methods/draw/on-draw-end.d.ts +0 -9
  58. package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +0 -1
  59. package/types/drawtools/src/methods/draw/start-drawing.d.ts +0 -9
  60. package/types/drawtools/src/methods/draw/start-drawing.d.ts.map +0 -1
  61. package/types/drawtools/src/methods/list/delete-feature.d.ts +0 -11
  62. package/types/drawtools/src/methods/list/delete-feature.d.ts.map +0 -1
  63. package/types/drawtools/src/methods/list/first-update.d.ts +0 -8
  64. package/types/drawtools/src/methods/list/first-update.d.ts.map +0 -1
  65. package/types/drawtools/src/methods/list/hover-feature.d.ts +0 -10
  66. package/types/drawtools/src/methods/list/hover-feature.d.ts.map +0 -1
  67. package/types/drawtools/src/methods/list/index.d.ts +0 -5
  68. package/types/drawtools/src/methods/list/index.d.ts.map +0 -1
  69. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts +0 -9
  70. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +0 -1
  71. package/types/drawtools/src/style.eox.d.ts.map +0 -1
  72. package/types/feedback/src/feedback-button.d.ts.map +0 -1
  73. package/types/feedback/src/main.d.ts.map +0 -1
  74. package/types/feedback/src/style.eox.d.ts +0 -2
  75. package/types/jsonform/src/custom-inputs/ace-custom/createMarkdownToolbar.d.ts +0 -2
  76. package/types/jsonform/src/custom-inputs/ace-custom/createMarkdownToolbar.d.ts.map +0 -1
  77. package/types/jsonform/src/custom-inputs/ace-custom/index.d.ts +0 -2
  78. package/types/jsonform/src/custom-inputs/ace-custom/index.d.ts.map +0 -1
  79. package/types/jsonform/src/custom-inputs/ace-custom.d.ts +0 -8
  80. package/types/jsonform/src/custom-inputs/ace-custom.d.ts.map +0 -1
  81. package/types/jsonform/src/custom-inputs/binarycheckbox.d.ts +0 -15
  82. package/types/jsonform/src/custom-inputs/binarycheckbox.d.ts.map +0 -1
  83. package/types/jsonform/src/custom-inputs/buttons.d.ts +0 -20
  84. package/types/jsonform/src/custom-inputs/buttons.d.ts.map +0 -1
  85. package/types/jsonform/src/custom-inputs/index.d.ts +0 -5
  86. package/types/jsonform/src/custom-inputs/index.d.ts.map +0 -1
  87. package/types/jsonform/src/custom-inputs/minmax.d.ts +0 -16
  88. package/types/jsonform/src/custom-inputs/minmax.d.ts.map +0 -1
  89. package/types/jsonform/src/custom-inputs/spatial/editor.d.ts +0 -19
  90. package/types/jsonform/src/custom-inputs/spatial/editor.d.ts.map +0 -1
  91. package/types/jsonform/src/custom-inputs/spatial/index.d.ts +0 -3
  92. package/types/jsonform/src/custom-inputs/spatial/index.d.ts.map +0 -1
  93. package/types/jsonform/src/custom-inputs/spatial/utils.d.ts +0 -22
  94. package/types/jsonform/src/custom-inputs/spatial/utils.d.ts.map +0 -1
  95. package/types/jsonform/src/custom-inputs/spatial/validator.d.ts +0 -16
  96. package/types/jsonform/src/custom-inputs/spatial/validator.d.ts.map +0 -1
  97. package/types/jsonform/src/enums/editor.d.ts +0 -11
  98. package/types/jsonform/src/enums/editor.d.ts.map +0 -1
  99. package/types/jsonform/src/enums/index.d.ts +0 -4
  100. package/types/jsonform/src/enums/index.d.ts.map +0 -1
  101. package/types/jsonform/src/enums/stories.d.ts +0 -38
  102. package/types/jsonform/src/enums/stories.d.ts.map +0 -1
  103. package/types/jsonform/src/enums/test.d.ts +0 -4
  104. package/types/jsonform/src/enums/test.d.ts.map +0 -1
  105. package/types/jsonform/src/helpers/editor.d.ts +0 -18
  106. package/types/jsonform/src/helpers/editor.d.ts.map +0 -1
  107. package/types/jsonform/src/helpers/index.d.ts +0 -2
  108. package/types/jsonform/src/helpers/index.d.ts.map +0 -1
  109. package/types/jsonform/src/main.d.ts +0 -157
  110. package/types/jsonform/src/main.d.ts.map +0 -1
  111. package/types/jsonform/src/style.d.ts +0 -2
  112. package/types/jsonform/src/style.d.ts.map +0 -1
  113. package/types/jsonform/src/style.eox.d.ts +0 -2
  114. package/types/jsonform/src/style.eox.d.ts.map +0 -1
  115. package/types/map/src/components/compare.d.ts +0 -31
  116. package/types/map/src/components/compare.d.ts.map +0 -1
  117. package/types/map/src/components/tooltip.d.ts +0 -41
  118. package/types/map/src/components/tooltip.d.ts.map +0 -1
  119. package/types/map/src/controls/GlobeSwitcher.d.ts +0 -19
  120. package/types/map/src/controls/GlobeSwitcher.d.ts.map +0 -1
  121. package/types/map/src/controls/controls.d.ts +0 -20
  122. package/types/map/src/controls/controls.d.ts.map +0 -1
  123. package/types/map/src/controls/geo-location.d.ts +0 -51
  124. package/types/map/src/controls/geo-location.d.ts.map +0 -1
  125. package/types/map/src/controls/loading-indicator.d.ts +0 -20
  126. package/types/map/src/controls/loading-indicator.d.ts.map +0 -1
  127. package/types/map/src/custom/layers/MapboxStyle.d.ts +0 -13
  128. package/types/map/src/custom/layers/MapboxStyle.d.ts.map +0 -1
  129. package/types/map/src/custom/sources/Cluster.d.ts +0 -24
  130. package/types/map/src/custom/sources/Cluster.d.ts.map +0 -1
  131. package/types/map/src/custom/sources/FlatGeoBuf.d.ts +0 -30
  132. package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +0 -1
  133. package/types/map/src/custom/sources/WMTSCapabilities.d.ts +0 -35
  134. package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +0 -1
  135. package/types/map/src/enums/index.d.ts +0 -2
  136. package/types/map/src/enums/index.d.ts.map +0 -1
  137. package/types/map/src/enums/map.d.ts +0 -5
  138. package/types/map/src/enums/map.d.ts.map +0 -1
  139. package/types/map/src/helpers/add-new-feature.d.ts +0 -15
  140. package/types/map/src/helpers/add-new-feature.d.ts.map +0 -1
  141. package/types/map/src/helpers/cancel-animation.d.ts +0 -7
  142. package/types/map/src/helpers/cancel-animation.d.ts.map +0 -1
  143. package/types/map/src/helpers/center.d.ts +0 -12
  144. package/types/map/src/helpers/center.d.ts.map +0 -1
  145. package/types/map/src/helpers/cluster-explode.d.ts +0 -42
  146. package/types/map/src/helpers/cluster-explode.d.ts.map +0 -1
  147. package/types/map/src/helpers/coordinates-roughly-equals.d.ts +0 -12
  148. package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +0 -1
  149. package/types/map/src/helpers/draw.d.ts +0 -22
  150. package/types/map/src/helpers/draw.d.ts.map +0 -1
  151. package/types/map/src/helpers/generate.d.ts +0 -32
  152. package/types/map/src/helpers/generate.d.ts.map +0 -1
  153. package/types/map/src/helpers/index.d.ts +0 -17
  154. package/types/map/src/helpers/index.d.ts.map +0 -1
  155. package/types/map/src/helpers/interactions.d.ts +0 -16
  156. package/types/map/src/helpers/interactions.d.ts.map +0 -1
  157. package/types/map/src/helpers/layer.d.ts +0 -26
  158. package/types/map/src/helpers/layer.d.ts.map +0 -1
  159. package/types/map/src/helpers/parse-feature.d.ts +0 -8
  160. package/types/map/src/helpers/parse-feature.d.ts.map +0 -1
  161. package/types/map/src/helpers/parse-text.d.ts +0 -45
  162. package/types/map/src/helpers/parse-text.d.ts.map +0 -1
  163. package/types/map/src/helpers/register-projection-from-code.d.ts +0 -8
  164. package/types/map/src/helpers/register-projection-from-code.d.ts.map +0 -1
  165. package/types/map/src/helpers/register-projection.d.ts +0 -11
  166. package/types/map/src/helpers/register-projection.d.ts.map +0 -1
  167. package/types/map/src/helpers/select.d.ts +0 -99
  168. package/types/map/src/helpers/select.d.ts.map +0 -1
  169. package/types/map/src/helpers/tile-grid.d.ts +0 -10
  170. package/types/map/src/helpers/tile-grid.d.ts.map +0 -1
  171. package/types/map/src/helpers/transform.d.ts +0 -19
  172. package/types/map/src/helpers/transform.d.ts.map +0 -1
  173. package/types/map/src/layers.d.ts +0 -126
  174. package/types/map/src/layers.d.ts.map +0 -1
  175. package/types/map/src/main.d.ts +0 -481
  176. package/types/map/src/main.d.ts.map +0 -1
  177. package/types/map/src/methods/map/add-update-layer.d.ts +0 -13
  178. package/types/map/src/methods/map/add-update-layer.d.ts.map +0 -1
  179. package/types/map/src/methods/map/animate-to-state.d.ts +0 -7
  180. package/types/map/src/methods/map/animate-to-state.d.ts.map +0 -1
  181. package/types/map/src/methods/map/first-updated.d.ts +0 -9
  182. package/types/map/src/methods/map/first-updated.d.ts.map +0 -1
  183. package/types/map/src/methods/map/getters.d.ts +0 -22
  184. package/types/map/src/methods/map/getters.d.ts.map +0 -1
  185. package/types/map/src/methods/map/index.d.ts +0 -7
  186. package/types/map/src/methods/map/index.d.ts.map +0 -1
  187. package/types/map/src/methods/map/remove.d.ts +0 -22
  188. package/types/map/src/methods/map/remove.d.ts.map +0 -1
  189. package/types/map/src/methods/map/setters.d.ts +0 -83
  190. package/types/map/src/methods/map/setters.d.ts.map +0 -1
  191. package/types/map/src/plugins/globe/index.d.ts +0 -6
  192. package/types/map/src/plugins/globe/index.d.ts.map +0 -1
  193. package/types/map/src/plugins/globe/methods.d.ts +0 -8
  194. package/types/map/src/plugins/globe/methods.d.ts.map +0 -1
  195. package/types/map/src/plugins/globe/openglobus.d.ts +0 -25
  196. package/types/map/src/plugins/globe/openglobus.d.ts.map +0 -1
  197. package/types/map/src/types.d.ts +0 -193
  198. package/types/map/src/types.d.ts.map +0 -1
  199. /package/types/{feedback/src/enums → enums}/index.d.ts +0 -0
  200. /package/types/{feedback/src/enums → enums}/test.d.ts +0 -0
  201. /package/types/{feedback/src/style.d.ts → style.d.ts} +0 -0
  202. /package/types/{drawtools/src/style.eox.d.ts → style.eox.d.ts} +0 -0
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@eox/feedback",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git@github.com:EOX-A/EOxElements.git"
8
8
  },
9
9
  "devDependencies": {
10
- "vite": "^7.1.12"
10
+ "vite": "^8.3.5"
11
11
  },
12
12
  "dependencies": {
13
- "@eox/elements-utils": "^1.1.0",
13
+ "@eox/elements-utils": "^1.3.0",
14
14
  "@eox/ui": "^1.1.0",
15
15
  "region-screenshot-js": "^1.1.0"
16
16
  },
package/src/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import RegionScreenshot from "region-screenshot-js";
2
+ import { dispatchElementEvent } from "@eox/elements-utils";
2
3
  import { style } from "./style";
3
4
  import { styleEOX } from "./style.eox";
4
5
  import "./feedback-button.js";
@@ -37,10 +38,14 @@ import "./feedback-button.js";
37
38
  *
38
39
  * @fires close - The modal was closed.
39
40
  * @fires submit - The feedback was submitted. The `CustomEvent.detail` contains the FormData object.
41
+ * @fires {CustomEvent<import("@eox/elements-utils").EOxActivityDetail>} eox:activity - Fires on genuine user interactions, wrapping the original event for analytics tracking.
40
42
  */
41
43
  export class EOxFeedback extends HTMLElement {
42
44
  static observedAttributes = ["endpoint", "unstyled"];
43
45
 
46
+ /** @type {AbortController | null} */
47
+ #listenerController = null;
48
+
44
49
  constructor() {
45
50
  super();
46
51
  this.attachShadow({ mode: "open" });
@@ -109,6 +114,9 @@ export class EOxFeedback extends HTMLElement {
109
114
  }
110
115
 
111
116
  connectedCallback() {
117
+ this.#listenerController?.abort();
118
+ this.#listenerController = new AbortController();
119
+ const { signal } = this.#listenerController;
112
120
  this.endpoint =
113
121
  this.endpoint ||
114
122
  this.getAttribute("endpoint") ||
@@ -117,55 +125,42 @@ export class EOxFeedback extends HTMLElement {
117
125
  this.render();
118
126
  this.shadowRoot
119
127
  .querySelector("input[type=checkbox]")
120
- .addEventListener("click", (e) => this.onToggleScreenshot(e));
128
+ .addEventListener("click", (e) => this.onToggleScreenshot(e), { signal });
121
129
  this.shadowRoot
122
130
  .querySelector("button#submit")
123
- .addEventListener("click", () => this.onSubmit());
131
+ .addEventListener("click", () => this.onSubmit(), { signal });
124
132
  this.shadowRoot
125
133
  .querySelector("button#cancel")
126
- .addEventListener("click", () => this.onCancel());
134
+ .addEventListener("click", () => this.onCancel(true), { signal });
127
135
 
128
136
  const jsonForm = this.shadowRoot.querySelector("eox-jsonform");
129
137
  if (jsonForm) {
130
- jsonForm.addEventListener("change", () => this.onJsonFormChange());
138
+ jsonForm.addEventListener("change", () => this.onJsonFormChange(), {
139
+ signal,
140
+ });
131
141
  }
132
142
 
133
143
  const textarea = this.shadowRoot.querySelector("textarea#message");
134
144
  if (textarea) {
135
- textarea.addEventListener("input", () => this.onTextareaInput());
145
+ textarea.addEventListener("input", () => this.onTextareaInput(), {
146
+ signal,
147
+ });
136
148
  }
137
149
 
138
- document.addEventListener("keyup", (e) => this.onKeyboardInput(e));
150
+ document.addEventListener("keyup", (e) => this.onKeyboardInput(e), {
151
+ signal,
152
+ });
139
153
  }
140
154
 
141
155
  disconnectedCallback() {
142
- this.shadowRoot
143
- .querySelector("input[type=checkbox]")
144
- .removeEventListener("click", (e) => this.onToggleScreenshot(e));
145
- this.shadowRoot
146
- .querySelector("button#submit")
147
- .removeEventListener("click", () => this.onSubmit());
148
- this.shadowRoot
149
- .querySelector("button#cancel")
150
- .removeEventListener("click", () => this.onCancel());
151
-
152
- const jsonForm = this.shadowRoot.querySelector("eox-jsonform");
153
- if (jsonForm) {
154
- jsonForm.removeEventListener("change", () => this.onJsonFormChange());
155
- }
156
-
157
- const textarea = this.shadowRoot.querySelector("textarea#message");
158
- if (textarea) {
159
- textarea.removeEventListener("input", () => this.onTextareaInput());
160
- }
161
-
162
- document.removeEventListener("keyup", (e) => this.onKeyboardInput(e));
156
+ this.#listenerController?.abort();
157
+ this.#listenerController = null;
163
158
  }
164
159
 
165
160
  /** @private */
166
161
  onKeyboardInput(e) {
167
162
  if (e.keyCode === 27) {
168
- this.onCancel();
163
+ this.onCancel(true);
169
164
  }
170
165
  if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
171
166
  const submitButton = this.shadowRoot.querySelector("button#submit");
@@ -347,7 +342,11 @@ export class EOxFeedback extends HTMLElement {
347
342
  <p class="red-text middle-align center-align">Oh no - something went wrong! Apologies, we'll try to find out what happened.</p>
348
343
  `;
349
344
  }
350
- this.dispatchEvent(new CustomEvent("submit", { detail: requestBody }));
345
+ dispatchElementEvent(this, "submit", {
346
+ detail: requestBody,
347
+ activity: true,
348
+ action: "submit",
349
+ });
351
350
 
352
351
  form.classList.add("hidden");
353
352
  container.appendChild(message);
@@ -355,17 +354,23 @@ export class EOxFeedback extends HTMLElement {
355
354
  container.classList.remove("disabled");
356
355
  progress.classList.add("hidden");
357
356
  setTimeout(() => {
358
- this.onCancel();
357
+ this.onCancel(false);
359
358
  }, 4000);
360
359
  }
361
360
 
362
- /** @private */
363
- onCancel() {
361
+ /**
362
+ * @param {boolean} [isUser=false]
363
+ * @private
364
+ */
365
+ onCancel(isUser = false) {
364
366
  if (this.regionScreenshot) {
365
367
  this.regionScreenshot.close();
366
368
  }
369
+ dispatchElementEvent(this, "close", {
370
+ activity: isUser,
371
+ action: "close",
372
+ });
367
373
  this.remove();
368
- this.dispatchEvent(new Event("close"));
369
374
  }
370
375
 
371
376
  /** @private */
@@ -440,6 +445,10 @@ export class EOxFeedback extends HTMLElement {
440
445
  .region-screenshot_tools {
441
446
  z-index: 10001;
442
447
  }
448
+ article {
449
+ max-height: calc(100dvh - 2rem);
450
+ overflow-y: auto;
451
+ }
443
452
  </style>
444
453
  <article class="no-margin small-round">
445
454
  <div ${!this.endpoint ? 'class="disabled"' : ""}>
@@ -473,6 +482,7 @@ export class EOxFeedback extends HTMLElement {
473
482
  /** @type {import("@eox/jsonform").EOxJSONForm} */
474
483
  const jsonForm = this.shadowRoot.querySelector("eox-jsonform");
475
484
  jsonForm.schema = this.schema;
485
+ jsonForm.addEventListener("eox:activity", (e) => e.stopPropagation());
476
486
  }
477
487
  }
478
488
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enums/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../src/enums/test.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/enums/test.js"],"names":[],"mappings":""}
@@ -9,15 +9,15 @@ export class EOxFeedbackButton extends HTMLElement {
9
9
  */
10
10
  modal: import("./main").EOxFeedback;
11
11
  position: string;
12
- _schema: import("@eox/jsonform").JsonSchema;
12
+ _schema: any;
13
13
  /**
14
14
  * @param {import("@eox/jsonform").JsonSchema|null} newSchema
15
15
  */
16
- set schema(newSchema: import("@eox/jsonform").JsonSchema | null);
16
+ set schema(newSchema: any | null);
17
17
  /**
18
18
  * @returns {import("@eox/jsonform").JsonSchema|null}
19
19
  */
20
- get schema(): import("@eox/jsonform").JsonSchema | null;
20
+ get schema(): any | null;
21
21
  attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
22
22
  connectedCallback(): void;
23
23
  disconnectedCallback(): void;
@@ -0,0 +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,aAAmB;IAUrB;;OAEG;IACH,sBAFW,GAAkC,GAAC,IAAI,EAOjD;IAfD;;OAEG;IACH,cAFa,GAAkC,GAAC,IAAI,CAInD;IAYD,wEAOC;IAED,0BAKC;IAED,6BAIC;IAED,sBAiBC;IAED,eAuBC;CACF"}
@@ -32,6 +32,7 @@
32
32
  *
33
33
  * @fires close - The modal was closed.
34
34
  * @fires submit - The feedback was submitted. The `CustomEvent.detail` contains the FormData object.
35
+ * @fires {CustomEvent<import("@eox/elements-utils").EOxActivityDetail>} eox:activity - Fires on genuine user interactions, wrapping the original event for analytics tracking.
35
36
  */
36
37
  export class EOxFeedback extends HTMLElement {
37
38
  static observedAttributes: string[];
@@ -60,11 +61,11 @@ export class EOxFeedback extends HTMLElement {
60
61
  /**
61
62
  * @param {import("@eox/jsonform").JsonSchema|null} newSchema
62
63
  */
63
- set schema(newSchema: import("@eox/jsonform").JsonSchema | null);
64
+ set schema(newSchema: any | null);
64
65
  /**
65
66
  * @returns {import("@eox/jsonform").JsonSchema|null}
66
67
  */
67
- get schema(): import("@eox/jsonform").JsonSchema | null;
68
+ get schema(): any | null;
68
69
  attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
69
70
  connectedCallback(): void;
70
71
  disconnectedCallback(): void;
@@ -78,9 +79,13 @@ export class EOxFeedback extends HTMLElement {
78
79
  private onToggleScreenshot;
79
80
  /** @private */
80
81
  private onSubmit;
81
- /** @private */
82
+ /**
83
+ * @param {boolean} [isUser=false]
84
+ * @private
85
+ */
82
86
  private onCancel;
83
87
  /** @private */
84
88
  private render;
89
+ #private;
85
90
  }
86
91
  //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IACE,oCAAqD;IASnD,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,GAAkC,GAAC,IAAI,EAKjD;IAbD;;OAEG;IACH,cAFa,GAAkC,GAAC,IAAI,CAInD;IAUD,oEAOC;IAED,0BAqCC;IAED,6BAGC;IAED,eAAe;IACf,wBAUC;IAED,eAAe;IACf,wBAQC;IAED,eAAe;IACf,yBAYC;IAED,eAAe;IACf,2BAoEC;IAED,eAAe;IACf,iBAwFC;IAED;;;OAGG;IACH,iBASC;IAED,eAAe;IACf,eA8GC;;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/style.js"],"names":[],"mappings":"AAAA,yBACE"}
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.js"],"names":[],"mappings":"AAAA,yBACE"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../../../src/style.eox.js"],"names":[],"mappings":"AAKA,8BAEE"}
1
+ {"version":3,"file":"style.eox.d.ts","sourceRoot":"","sources":["../src/style.eox.js"],"names":[],"mappings":"AAKA,8BAEE"}
@@ -1,108 +0,0 @@
1
- /**
2
- * Controller component for drawing features
3
- *
4
- * @element eox-drawtools-controller
5
- */
6
- export class EOxDrawToolsController extends LitElement {
7
- static properties: {
8
- multipleFeatures: {
9
- attribute: boolean;
10
- type: BooleanConstructor;
11
- };
12
- drawnFeatures: {
13
- attribute: boolean;
14
- state: boolean;
15
- type: ArrayConstructor;
16
- };
17
- currentlyDrawing: {
18
- attribute: boolean;
19
- state: boolean;
20
- type: BooleanConstructor;
21
- };
22
- drawFunc: {
23
- attribute: boolean;
24
- type: ObjectConstructor;
25
- };
26
- select: {
27
- type: BooleanConstructor;
28
- };
29
- importFeatures: {
30
- attribute: string;
31
- type: BooleanConstructor;
32
- };
33
- showEditor: {
34
- attribute: string;
35
- type: BooleanConstructor;
36
- };
37
- geoJSON: {
38
- attribute: string;
39
- type: StringConstructor;
40
- };
41
- type: {
42
- attribute: string;
43
- type: StringConstructor;
44
- };
45
- unstyled: {
46
- type: BooleanConstructor;
47
- };
48
- };
49
- /**
50
- * Allow adding more than one feature at a time
51
- */
52
- multipleFeatures: boolean;
53
- /**
54
- * The array of drawn native OpenLayers features. Normally includes only one feature,
55
- * until multiple feature drawing is enabled.
56
- *
57
- * @type Array<import("ol").Feature>
58
- */
59
- drawnFeatures: Array<import("ol").Feature>;
60
- /**
61
- * Allow import features using drag-drop and upload button
62
- * @type Boolean
63
- */
64
- importFeatures: boolean;
65
- /**
66
- * Show geo-json editor for draw tool
67
- * @type Boolean
68
- */
69
- showEditor: boolean;
70
- /**
71
- * Whether the user is currently in the process of drawing or not
72
- */
73
- currentlyDrawing: boolean;
74
- /**
75
- * List of draw function object like start, discard etc.
76
- */
77
- drawFunc: any;
78
- /**
79
- * Parsed and Stringify Geo JSON
80
- * @type String
81
- */
82
- geoJSON: string;
83
- /**
84
- * Type of the drawn feature
85
- * @type {"Polygon" | "Point" | "LineString" | "Circle" | "Box"}
86
- */
87
- type: "Polygon" | "Point" | "LineString" | "Circle" | "Box";
88
- /**
89
- * Render the element without additional styles
90
- */
91
- unstyled: boolean;
92
- /**
93
- *
94
- */
95
- select: boolean;
96
- /**
97
- * Updates button states based on conditions
98
- */
99
- updateButtonStates(): void;
100
- /**
101
- * Overrides createRenderRoot to handle shadow DOM
102
- */
103
- createRenderRoot(): this;
104
- render(): import("lit-html").TemplateResult<1>;
105
- #private;
106
- }
107
- import { LitElement } from "lit";
108
- //# sourceMappingURL=controller.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/components/controller.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWE;IAeA;;OAEG;IACH,0BAA6B;IAE7B;;;;;OAKG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,oBAAuB;IAEvB;;OAEG;IACH,0BAA6B;IAE7B;;OAEG;IACH,cAAoB;IAEpB;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,MAFU,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAE1C;IAErB;;OAEG;IACH,kBAAqB;IAErB;;OAEG;IACH,gBAAmB;IAGrB;;OAEG;IACH,2BAKC;IAED;;OAEG;IACH,yBAEC;IAED,+CA0NC;;CACF;2BA5UyC,KAAK"}
@@ -1,144 +0,0 @@
1
- /**
2
- * Display list of features
3
- *
4
- * @element eox-drawtools-list
5
- */
6
- export class EOxDrawToolsList extends LitElement {
7
- static properties: {
8
- eoxDrawTools: {
9
- attribute: boolean;
10
- state: boolean;
11
- };
12
- eoxMap: {
13
- attribute: boolean;
14
- state: boolean;
15
- };
16
- olMap: {
17
- attribute: boolean;
18
- state: boolean;
19
- };
20
- draw: {
21
- attribute: boolean;
22
- state: boolean;
23
- };
24
- drawLayer: {
25
- attribute: boolean;
26
- state: boolean;
27
- };
28
- drawnFeatures: {
29
- attribute: boolean;
30
- state: boolean;
31
- type: ArrayConstructor;
32
- };
33
- featureName: {
34
- attribute: boolean;
35
- state: boolean;
36
- type: StringConstructor;
37
- };
38
- featureNameKey: {
39
- attribute: boolean;
40
- state: boolean;
41
- type: StringConstructor;
42
- };
43
- modify: {
44
- attribute: boolean;
45
- state: boolean;
46
- };
47
- unstyled: {
48
- type: BooleanConstructor;
49
- };
50
- };
51
- /**
52
- * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
53
- */
54
- hoverInteraction: import("@eox/map").EOxMap["selectInteractions"][string];
55
- /**
56
- * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
57
- */
58
- clickInteraction: import("@eox/map").EOxMap["selectInteractions"][string];
59
- /**
60
- * @type string | number
61
- */
62
- hoverId: string | number;
63
- /**
64
- * @type string | number
65
- */
66
- clickId: string | number;
67
- /**
68
- * @type import("../main").EOxDrawTools;
69
- */
70
- eoxDrawTools: import("../main").EOxDrawTools;
71
- /**
72
- * @type import("@eox/map").EOxMap
73
- */
74
- eoxMap: import("@eox/map").EOxMap;
75
- /**
76
- * @type import("ol").Map
77
- */
78
- olMap: import("ol").Map;
79
- /**
80
- * The current native OpenLayers `draw` interaction
81
- * @type import("ol/interaction").Draw
82
- */
83
- draw: import("ol/interaction").Draw;
84
- /**
85
- * The current native OpenLayers draw `layer`
86
- * @type import("ol/layer").Vector<import("ol/source").Vector>
87
- */
88
- drawLayer: import("ol/layer").Vector<import("ol/source").Vector>;
89
- /**
90
- * The array of drawn native OpenLayers features. Normally includes only one feature,
91
- * until multiple feature drawing is enabled.
92
- *
93
- * @type Array<import("ol").Feature>
94
- */
95
- drawnFeatures: Array<import("ol").Feature>;
96
- /**
97
- * Default display name for features
98
- */
99
- featureName: string;
100
- /**
101
- * The key of the property to display in the feature list.
102
- */
103
- featureNameKey: any;
104
- /**
105
- * The current native OpenLayers `modify` interaction
106
- * @type import("ol/interaction").Modify
107
- */
108
- modify: import("ol/interaction").Modify;
109
- /**
110
- * Render the element without additional styles
111
- */
112
- unstyled: boolean;
113
- /**
114
- * Handles the deletion of an individual feature.
115
- *
116
- * @param {Event & { target: HTMLButtonElement }} evt - Event object containing button target.
117
- */
118
- _handleDelete(evt: Event & {
119
- target: HTMLButtonElement;
120
- }): void;
121
- /**
122
- * Handles the selection and deselection of a feature from the list.
123
- *
124
- * @param {import("ol").Feature} feature - The selected feature.
125
- */
126
- _handleFeatureSelectAndDeselect(feature: import("ol").Feature): void;
127
- /**
128
- *
129
- * @param {number | string | undefined} featureId - The ID of the feature to hover.
130
- * @param {Boolean} mouseOut - Flag indicating mouse out event.
131
- */
132
- _handleHoverFeature(featureId: number | string | undefined, mouseOut?: boolean): void;
133
- /**
134
- * Initiates initial settings and event triggers upon the component's first update.
135
- */
136
- firstUpdated(): void;
137
- /**
138
- * Overrides createRenderRoot to handle shadow DOM.
139
- */
140
- createRenderRoot(): this;
141
- render(): import("lit-html").TemplateResult<1>;
142
- }
143
- import { LitElement } from "lit";
144
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/components/list.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWE;IAEF;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAER;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAKN;;OAEG;IACH,cAFS,OAAO,SAAS,EAAE,YAAY,CAEf;IAExB;;OAEG;IACH,QAFS,OAAO,UAAU,EAAE,MAAM,CAEhB;IAElB;;OAEG;IACH,OAFS,OAAO,IAAI,EAAE,GAAG,CAER;IAEjB;;;OAGG;IAEH,MAHS,OAAO,gBAAgB,EAAE,IAAI,CAGtB;IAEhB;;;OAGG;IAEH,WAHS,OAAO,UAAU,EAAE,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,CAGzC;IAErB;;;;;OAKG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;OAEG;IACH,oBAA4B;IAE5B;;OAEG;IACH,oBAA0B;IAE1B;;;OAGG;IAEH,QAHS,OAAO,gBAAgB,EAAE,MAAM,CAGtB;IAElB;;OAEG;IACH,kBAAqB;IAGvB;;;;OAIG;IACH,mBAFW,KAAK,GAAG;QAAE,MAAM,EAAE,iBAAiB,CAAA;KAAE,QAK/C;IAED;;;;OAIG;IACH,yCAFW,OAAO,IAAI,EAAE,OAAO,QAI9B;IAED;;;;OAIG;IACH,+BAHW,MAAM,GAAG,MAAM,GAAG,SAAS,4BAKrC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,yBAEC;IAED,+CAwEC;CACF;2BAlOyC,KAAK"}
@@ -1,9 +0,0 @@
1
- export namespace FIT_OPTIONS {
2
- let duration: number;
3
- let padding: number[];
4
- }
5
- export namespace DUMMY_GEO_JSON {
6
- let type: string;
7
- let features: any[];
8
- }
9
- //# sourceMappingURL=draw.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/enums/draw.js"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export { TEST_SELECTORS } from "./test";
2
- export { STORIES_MAP_STYLE, STORIES_LAYERS_ARRAY, STORIES_VECTOR_LAYERS } from "./stories";
3
- export { FIT_OPTIONS, DUMMY_GEO_JSON } from "./draw";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/enums/index.js"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- export const STORIES_LAYERS_ARRAY: {
2
- type: string;
3
- source: {
4
- type: string;
5
- };
6
- }[];
7
- export const STORIES_VECTOR_LAYERS: {
8
- type: string;
9
- background: string;
10
- properties: {
11
- id: string;
12
- };
13
- source: {
14
- type: string;
15
- url: string;
16
- format: string;
17
- attributions: string;
18
- };
19
- style: {
20
- "stroke-color": string;
21
- "stroke-width": number;
22
- "fill-color": string;
23
- };
24
- }[];
25
- export const STORIES_MAP_STYLE: "width: 400px; height: 300px;";
26
- //# sourceMappingURL=stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/enums/stories.js"],"names":[],"mappings":"AAAA;;;;;IAOE;AAEF;;;;;;;;;;;;;;;;;IAmBE;AAEF,gCAAiC,8BAA8B,CAAC"}
@@ -1,11 +0,0 @@
1
- export namespace TEST_SELECTORS {
2
- let drawTools: string;
3
- let controller: string;
4
- let drawBtn: string;
5
- let editorBtn: string;
6
- let copyBtn: string;
7
- let discardBtn: string;
8
- let list: string;
9
- let deleteFeatureBtn: string;
10
- }
11
- //# sourceMappingURL=test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/enums/test.js"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- /**
2
- * Copy a given text string to the clipboard
3
- *
4
- * @param {string} text - The text to be copied to the clipboard.
5
- */
6
- export default function copyTextToClipboard(text: string): void;
7
- //# sourceMappingURL=copy-text-to-clipboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copy-text-to-clipboard.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/helpers/copy-text-to-clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,kDAFW,MAAM,QAShB"}
@@ -1,12 +0,0 @@
1
- export default featuresToGeoJson;
2
- /**
3
- * Converts features to a GeoJSON representation.
4
- *
5
- * @param {import("ol").Feature[]} features
6
- * @param {(Parameters<GeoJson["writeFeaturesObject"]>)["1"]} [options]
7
- */
8
- declare function featuresToGeoJson(features: import("ol").Feature[], options?: Parameters<GeoJson["writeFeaturesObject"]>["1"]): import("geojson").FeatureCollection<import("geojson").Geometry, {
9
- [name: string]: any;
10
- }>;
11
- import GeoJson from "ol/format/GeoJSON";
12
- //# sourceMappingURL=features-to-geojson.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"features-to-geojson.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/helpers/features-to-geojson.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,6CAHW,OAAO,IAAI,EAAE,OAAO,EAAE,YACrB,UAAU,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAE,GAAG,CAAC;;GAK3D;oBAXmB,mBAAmB"}
@@ -1,9 +0,0 @@
1
- export default featureToWKT;
2
- /**
3
- * Converts features to a Well-Known Text (WKT) representation.
4
- *
5
- * @type {WKT["writeFeatures"]}
6
- */
7
- declare const featureToWKT: WKT["writeFeatures"];
8
- import WKT from "ol/format/WKT.js";
9
- //# sourceMappingURL=features-to-wkt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"features-to-wkt.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/helpers/features-to-wkt.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,4BAFU,GAAG,CAAC,eAAe,CAAC,CAK5B;gBAVc,kBAAkB"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Initializes upload-related event listeners for drag-and-drop interactions on a map element.
3
- * It configures the map to react visually to drag-and-drop actions and processes dropped files.
4
- *
5
- * @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
6
- * @param {import("@eox/map").EOxMap} EOxMap - The EOx Map instance.
7
- */
8
- export function initMapDragDropImport(EOxDrawTool: import("../main.js").EOxDrawTools, EOxMap: import("@eox/map").EOxMap): void;
9
- /**
10
- * Handles file input from drag-and-drop or file selection events,
11
- * forwarding each file to a specified processing function.
12
- *
13
- * @param {DragEvent | InputEvent & { target: HTMLInputElement }} e - The event object from the file input interaction.
14
- * @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
15
- */
16
- export function handleFiles(e: DragEvent | (InputEvent & {
17
- target: HTMLInputElement;
18
- }), EOxDrawTool: import("../main.js").EOxDrawTools): void;
19
- //# sourceMappingURL=generate-upload-events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-upload-events.d.ts","sourceRoot":"","sources":["../../../../../drawtools/src/helpers/generate-upload-events.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mDAHW,OAAO,YAAY,EAAE,YAAY,UACjC,OAAO,UAAU,EAAE,MAAM,QA6BnC;AAaD;;;;;;GAMG;AACH,+BAHW,SAAS,IAAG,UAAU,GAAG;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA,eACrD,OAAO,YAAY,EAAE,YAAY,QAiB3C"}